@heybejs/core 1.5.1 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/db.ts +2 -1
- package/src/http/routes/health.ts +9 -0
- package/src/http/routes/realtime.ts +4 -0
- package/src/settings.ts +1 -1
- package/src/test-app.ts +5 -0
- package/ui/dist/assets/ApplicationPage-DkTYH6WR.js +1 -0
- package/ui/dist/assets/AuthCard-wJUv2Sdn.js +1 -0
- package/ui/dist/assets/AuthProvidersPage-Bx_JWAxt.js +1 -0
- package/ui/dist/assets/BackupsPage-BrFhpIgH.js +1 -0
- package/ui/dist/assets/Checkbox-qSXPT8qz.js +1 -0
- package/ui/dist/assets/CodeArea-D6AGlQG3.js +34 -0
- package/ui/dist/assets/CollectionsLayout-Bqr--gSO.js +8 -0
- package/ui/dist/assets/ConfirmEmailChangePage-C5AfNHo0.js +1 -0
- package/ui/dist/assets/ConfirmPasswordResetPage-Coe2vuTr.js +1 -0
- package/ui/dist/assets/ConfirmVerificationPage-BGX02YAe.js +1 -0
- package/ui/dist/assets/CopyButton-WiZL23ED.js +1 -0
- package/ui/dist/assets/CronsPage-BVCoYpo1.js +1 -0
- package/ui/dist/assets/EmptyState-BNvwv3Xw.js +1 -0
- package/ui/dist/assets/ExportPage-BLVcCe2X.js +1 -0
- package/ui/dist/assets/ExtensionPage-LezAvM5y.js +1 -0
- package/ui/dist/assets/FileField-BIdUasnF.js +1 -0
- package/ui/dist/assets/FormFooter-Ct4RFwgS.js +1 -0
- package/ui/dist/assets/ImportPage-DDr49aa6.js +1 -0
- package/ui/dist/assets/InstallerPage-DEl_f6Iv.js +1 -0
- package/ui/dist/assets/InvalidLink-DYrsAHEH.js +1 -0
- package/ui/dist/assets/LoginPage-DHnB3eBk.js +1 -0
- package/ui/dist/assets/Logo-Dn44Zx6g.js +1 -0
- package/ui/dist/assets/LogsPage-BAyH1SUu.js +1 -0
- package/ui/dist/assets/MailPage-BbLaQUdV.js +1 -0
- package/ui/dist/assets/Match-rL_mIMP3.js +1 -0
- package/ui/dist/assets/NumberField-83x9ooVV.js +1 -0
- package/ui/dist/assets/OAuth2RedirectPage-BGRd57zj.js +1 -0
- package/ui/dist/assets/Page-K-gAWDfu.js +1 -0
- package/ui/dist/assets/Popover-ykZ3O0Av.js +1 -0
- package/ui/dist/assets/ProviderDialog-DogoekAe.js +1 -0
- package/ui/dist/assets/QueryStatus-eTXKeftu.js +1 -0
- package/ui/dist/assets/RequestResetPage-CvVIo7hl.js +1 -0
- package/ui/dist/assets/{RichTextEditor-1oGZgu61.js → RichTextEditor-Bc3uTBp0.js} +5 -5
- package/ui/dist/assets/S3Fields-DejLGW2D.js +1 -0
- package/ui/dist/assets/SearchBar-DPaUcuh2.js +1 -0
- package/ui/dist/assets/Select-DsX5Ea_q.js +1 -0
- package/ui/dist/assets/SettingsLayout-wZHtJg8F.js +1 -0
- package/ui/dist/assets/SettingsPage-D8K4z39N.js +1 -0
- package/ui/dist/assets/SqlPage-CgdNUnO5.js +1 -0
- package/ui/dist/assets/StoragePage-Da-g-Cz5.js +1 -0
- package/ui/dist/assets/Switch-Duu2pizo.js +1 -0
- package/ui/dist/assets/Table-B0wJiwif.js +1 -0
- package/ui/dist/assets/TextField-IItAFjU7.js +1 -0
- package/ui/dist/assets/Tooltip-DMaATQZc.js +1 -0
- package/ui/dist/assets/atom-CsaMUDV6.js +1 -0
- package/ui/dist/assets/check-Dy5JlAkz.js +1 -0
- package/ui/dist/assets/chevron-down-CdFqRe9V.js +1 -0
- package/ui/dist/assets/clock-CQa7hjXl.js +1 -0
- package/ui/dist/assets/context-BLpmYnEM.js +2 -0
- package/ui/dist/assets/error-DIHpHIMq.js +1 -0
- package/ui/dist/assets/errors-BzXFkL79.js +3 -0
- package/ui/dist/assets/field-LSvWL6SU.js +1 -0
- package/ui/dist/assets/field-types-DmEN723Z.js +1 -0
- package/ui/dist/assets/glass-aa3ISPbD.js +1 -0
- package/ui/dist/assets/import-diff-CeufMjY3.js +1 -0
- package/ui/dist/assets/index-K3jp0HKn.js +10 -0
- package/ui/dist/assets/jwt-DZxaQ4-r.js +1 -0
- package/ui/dist/assets/link-IcX1XVhI.js +1 -0
- package/ui/dist/assets/preload-helper-DH03enJy.js +1 -0
- package/ui/dist/assets/queries-CUkLB99G.js +1 -0
- package/ui/dist/assets/search-CViJCnFi.js +1 -0
- package/ui/dist/assets/session-oCkjTB0W.js +3 -0
- package/ui/dist/assets/settings-Cj7IKVDy.js +1 -0
- package/ui/dist/assets/trash-BR5toR-2.js +1 -0
- package/ui/dist/assets/use-settings-1G2lnVQh.js +1 -0
- package/ui/dist/assets/use-settings-form-DWwEeaUC.js +3 -0
- package/ui/dist/assets/useControlledState-jTKE_mWM.js +1 -0
- package/ui/dist/assets/useForm-BJzA_-qG.js +1 -0
- package/ui/dist/assets/useMatch-CtmIEv-a.js +1 -0
- package/ui/dist/assets/useMutation-DQ60EOwe.js +1 -0
- package/ui/dist/assets/useNavigate-COQv2_P5.js +1 -0
- package/ui/dist/assets/useOverlayState-C6tmr5St.js +1 -0
- package/ui/dist/assets/useParams-DGtzGjmL.js +1 -0
- package/ui/dist/assets/useQuery-B14t2xNU.js +1 -0
- package/ui/dist/assets/useSearch-CNiDThqu.js +1 -0
- package/ui/dist/assets/useSelector-CNRxEOGR.js +1 -0
- package/ui/dist/assets/useStore-g5QKCOo7.js +1 -0
- package/ui/dist/assets/useTopLayer-Dh6x1Bza.js +1 -0
- package/ui/dist/assets/with-selector-B7Ab9ZeQ.js +1 -0
- package/ui/dist/index.html +33 -2
- package/ui/dist/assets/Popover-BKknruJI.js +0 -34
- package/ui/dist/assets/index-zHgtVQ8_.js +0 -23
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BWaJ3C7D.js";import{a as t,o as n}from"./field-LSvWL6SU.js";import{a as r,r as i}from"./context-BLpmYnEM.js";import{r as a}from"./errors-BzXFkL79.js";import{r as o}from"./glass-aa3ISPbD.js";import{c as s,d as c,i as l,l as u,r as d,u as f}from"./use-settings-form-DWwEeaUC.js";var p=e(n(),1),m=t();function h({form:e,prefix:t}){let n=t===`s3`?`secrets.s3Secret`:`secrets.backupsS3Secret`;return(0,m.jsx)(e.Subscribe,{selector:e=>t===`s3`?e.values.settings.s3.enabled:e.values.settings.backups.s3.enabled,children:r=>(0,m.jsx)(u,{errorPrefix:`${t}.`,title:`S3 storage`,badge:(0,m.jsx)(l,{on:r}),children:(0,m.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,m.jsx)(e.Field,{name:`settings.${t}.enabled`,children:e=>(0,m.jsx)(f,{path:`${t}.enabled`,label:`Use S3 storage`,field:e})}),(0,m.jsxs)(d,{enabled:r,children:[(0,m.jsx)(e.Field,{name:`settings.${t}.endpoint`,children:e=>(0,m.jsx)(c,{path:`${t}.endpoint`,label:`Endpoint`,field:e})}),(0,m.jsx)(e.Field,{name:`settings.${t}.bucket`,children:e=>(0,m.jsx)(c,{path:`${t}.bucket`,label:`Bucket`,field:e})}),(0,m.jsx)(e.Field,{name:`settings.${t}.region`,children:e=>(0,m.jsx)(c,{path:`${t}.region`,label:`Region`,field:e})}),(0,m.jsx)(e.Field,{name:`settings.${t}.accessKey`,children:e=>(0,m.jsx)(c,{path:`${t}.accessKey`,label:`Access key`,field:e})}),(0,m.jsx)(e.Field,{name:n,children:e=>(0,m.jsx)(s,{path:`${t}.secret`,label:`Secret`,field:e})}),(0,m.jsx)(e.Field,{name:`settings.${t}.forcePathStyle`,children:e=>(0,m.jsx)(f,{path:`${t}.forcePathStyle`,label:`Force path style`,field:e})})]})]})})})}function g({filesystem:e,disabled:t}){let n=i(),s=r(),[c,l]=(0,p.useState)(!1),u=async()=>{l(!0);try{await n.settings.testS3(e),s.success(`Connection works.`)}catch(e){s.error(a(e))}finally{l(!1)}};return(0,m.jsx)(o,{className:`self-start`,disabled:t,loading:c,onClick:()=>void u(),children:`Test connection`})}export{g as n,h as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BWaJ3C7D.js";import{a as t,o as n}from"./field-LSvWL6SU.js";import{d as r,f as i}from"./context-BLpmYnEM.js";import{r as a}from"./glass-aa3ISPbD.js";import{n as o,r as s}from"./useQuery-B14t2xNU.js";import{t as c}from"./CodeArea-D6AGlQG3.js";import{r as l}from"./search-CViJCnFi.js";var u=class extends s{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type=`infinite`,super.setOptions(e)}getOptimisticResult(e){return e._type=`infinite`,super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,a=super.createResult(e,t),{isFetching:o,isRefetching:s,isError:c,isRefetchError:l}=a,u=n.fetchMeta?.fetchMore?.direction,d=c&&u===`forward`,f=o&&u===`forward`,p=c&&u===`backward`,m=o&&u===`backward`;return{...a,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:r(t,n.data),hasPreviousPage:i(t,n.data),isFetchNextPageError:d,isFetchingNextPage:f,isFetchPreviousPageError:p,isFetchingPreviousPage:m,isRefetchError:l&&!d&&!p,isRefetching:s&&!f&&!m}}};function d(e,t){return o(e,u,t)}var f=new Intl.DateTimeFormat(`en-US`,{month:`short`,day:`numeric`,year:`numeric`}),p=new Intl.DateTimeFormat(`en-US`,{hour:`numeric`,minute:`2-digit`}),m=new Intl.DateTimeFormat(`en-US`,{hour:`numeric`,minute:`2-digit`,second:`2-digit`,timeZoneName:`shortOffset`});function h(e,t=`short`){let n=new Date(typeof e==`string`?e.replace(` `,`T`):e);return Number.isNaN(n.getTime())?String(e):`${f.format(n)}, ${(t===`full`?m:p).format(n)}`}var g=[`=`,`!=`,`>`,`>=`,`<`,`<=`,`~`,`!~`],_=[`@now`,`@yesterday`,`@tomorrow`,`@second`,`@minute`,`@hour`,`@day`,`@month`,`@weekday`,`@year`,`@todayStart`,`@todayEnd`,`@monthStart`,`@monthEnd`,`@yearStart`,`@yearEnd`],v=[`id`,`collectionId`,`collectionName`],y=/[\w@.:+-]+$/,b=/[?!=<>~]+$/,x=/[&|]+$/,S=/\s+|(["'`])(?:\\.|(?!\1)[^\\])*(?:\1|$)|&&|\|\||\??(?:!=|!~|>=|<=|=|>|<|~)|[\w@.:+-]+|[(),]|[^]/y,C={fields:[{name:`id`,type:`text`},{name:`created`,type:`autodate`},{name:`level`,type:`number`},{name:`message`,type:`text`},{name:`data.status`,type:`number`},{name:`data.method`,type:`text`},{name:`data.url`,type:`text`},{name:`data.auth`,type:`text`},{name:`data.userIP`,type:`text`},{name:`data.execTime`,type:`number`}]},w=(e,t,n=`variable`)=>({label:e,detail:t,type:n});function T(e){let t=[];S.lastIndex=0;let n;for(;S.lastIndex<e.length&&(n=S.exec(e));){let e=n[0];if(!/^\s/.test(e)){if(n[1]){if(e.length<2||!e.endsWith(n[1]))return null;t.push({kind:`word`})}else e===`&&`||e===`||`?t.push({kind:`logic`}):e===`(`?t.push({kind:`open`}):e===`)`?t.push({kind:`close`}):e===`,`?t.push({kind:`comma`}):/^\??[!=<>~]/.test(e)?t.push({kind:`op`}):/^[\w@.:+-]/.test(e)&&t.push({kind:`word`})}}return t}function E(e){let t=[],n=`operand`,r=!1,i=e=>{n=t.at(-1)?.fn?`arg`:e?`logic`:`operator`};return e.forEach((a,o)=>{if(a.kind===`word`)e[o+1]?.kind!==`open`&&i(r);else if(a.kind===`op`)n=`operand`,r=!0;else if(a.kind===`logic`)n=`operand`,r=!1;else if(a.kind===`open`){let i=e[o-1]?.kind===`word`;t.push({fn:i,right:r}),n=`operand`,r=i}else if(a.kind===`close`){let e=t.pop();e?.fn?(r=e.right,i(e.right)):n=`logic`}else n=`operand`,r=!0}),{state:n,depth:t.length}}var D=(e,t)=>e.type!==`password`&&(t||!e.hidden);function O(e,t){let n=!!e.request,r=e.collections??[],i=(e,t)=>t.fields.filter(e=>D(e,!1)).map(t=>w(`${e}.${t.name}`,t.type)),a=[];for(let t of e.fields){if(!D(t,n)||(a.push(w(t.name,t.type)),t.type!==`relation`))continue;let e=r.find(e=>e.id===t.collectionId);e&&a.push(...i(t.name,e))}for(let t of r)for(let n of t.fields){if(n.type!==`relation`||n.collectionId!==e.collectionId)continue;let r=`${t.name}_via_${n.name}`;a.push(w(r,`back-relation`),...i(r,t))}if(n){a.push(w(`@request.method`,`request`),w(`@request.context`,`request`),w(`@request.query.`,`request`),w(`@request.headers.`,`request`));for(let[e,t]of k(r))a.push(w(`@request.auth.${e}`,t));if(e.request.body)for(let t of e.fields)a.push(w(`@request.body.${t.name}`,t.type));let n=/^@collection\.(\w+)(?::\w+)?\./.exec(t),o=n&&r.find(e=>e.name===n[1]);if(n&&o)a.push(...i(n[0].slice(0,-1),o));else for(let e of r)a.push(w(`@collection.${e.name}.`,`collection`))}return a.push(..._.map(e=>w(e,`macro`)),w(`geoDistance(`,`function`,`function`),w(`strftime(`,`function`,`function`),w(`true`,`literal`,`keyword`),w(`false`,`literal`,`keyword`),w(`null`,`literal`,`keyword`),w(`""`,`literal`,`keyword`)),a}function k(e){let t=new Map(v.map(e=>[e,`text`]));for(let n of e)if(n.type===`auth`)for(let e of n.fields)D(e,!1)&&t.set(e.name,e.type);return t}var A=(e,t)=>e.find(e=>e.name===t)?.type;function j(e,t){let n=e.collections??[],r=e=>n.find(t=>t.name===e),i=A(e.fields,t);if(i)return i;if(t.startsWith(`@request.body.`))return A(e.fields,t.slice(14));if(t.startsWith(`@request.auth.`))return k(n).get(t.slice(14));let a=/^@collection\.(\w+)(?::\w+)?\.(.+)$/.exec(t),o=e.fields,s=t;if(a){let e=r(a[1]);if(!e)return;o=e.fields,s=a[2]}let c=s.split(`.`);for(let[e,t]of c.entries()){if(e===c.length-1)return A(o,t);let i=/^(\w+)_via_\w+$/.exec(t),a=o.find(e=>e.name===t),s=i?r(i[1]):n.find(e=>e.id===a?.collectionId);if(!s)return;o=s.fields}}var M=[`select`,`relation`,`file`],N=[...v,`email`,`emailVisibility`,`verified`];function P(e,t){let n=t.slice(0,t.lastIndexOf(`:`)),r=j(e,n),i=r!==void 0&&M.includes(r)?[`length`,`each`,`lower`]:[`lower`],a=i;return n.startsWith(`@request.body.`)?a=[`isset`,`changed`,...i]:n.startsWith(`@request.auth.`)?N.includes(n.slice(14))&&(a=[`isset`,`lower`]):n.startsWith(`@request.`)&&(a=[`isset`,`lower`]),a.map(e=>w(e,`modifier`,`keyword`))}var F=()=>[...g.map(e=>w(e,`operator`,`keyword`)),...g.map(e=>w(`?${e}`,`operator`,`keyword`))],I=()=>[w(`&&`,`logic`,`keyword`),w(`||`,`logic`,`keyword`)];function L(e){return(t,n)=>{let r=t.slice(0,n);if(!T(r))return null;let i=y.exec(r)??b.exec(r)??x.exec(r),a=i?.index??n,{state:o,depth:s}=E(T(r.slice(0,a))),c=(e,t)=>({from:e,options:t}),l=i&&y.test(i[0])?i[0]:``;if(l)return o===`operand`?l.replace(/^@collection\.\w+(?::\w+)?\./,``).includes(`:`)&&!/^@collection\.\w+:\w*$/.test(l)?c(a+l.lastIndexOf(`:`)+1,P(e,l)):c(a,O(e,l)):null;if(i&&b.test(i[0]))return o===`operator`?c(a,F()):null;if(i&&x.test(i[0]))return o===`logic`?c(a,I()):null;if(o===`operand`)return c(n,O(e,``));if(o===`operator`)return c(n,F());let u=w(`)`,`logic`,`keyword`);return o===`arg`?c(n,[w(`,`,`separator`,`keyword`),u]):c(n,[...I(),...s?[u]:[]])}}var R=e(n(),1);function z(e){try{let t=JSON.parse(localStorage.getItem(e)??`[]`);return Array.isArray(t)?t.filter(e=>typeof e==`string`):[]}catch{return[]}}function B(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch{}}var V=t(),H=`hb_filter_history`;function U({filter:e,error:t,label:n=`Filter records`,placeholder:r=`e.g. title ~ "hello" && created > "2026-01-01"`,suggest:i,onSearch:o}){let[s,u]=(0,R.useState)(e),[d,f]=(0,R.useState)(e),[p,m]=(0,R.useState)(()=>z(H));e!==d&&(f(e),u(e));let h=e=>{if(e){let t=[e,...p.filter(t=>t!==e)].slice(0,10);m(t),B(H,t)}o(e)};return(0,V.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,V.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,V.jsx)(c,{label:n,hideLabel:!0,singleLine:!0,placeholder:r,suggest:i,value:s,error:t,onChange:u,onRun:()=>h(s.trim())})}),(0,V.jsx)(a,{disabled:!s&&!e,onClick:()=>{u(``),o(``)},children:`Clear`}),(0,V.jsx)(l,{trigger:(0,V.jsx)(a,{disabled:p.length===0,children:`Recent filters`}),items:p.map(e=>({key:e,label:e})),placement:`bottom-end`,onAction:e=>{u(e),h(e)}})]})}export{C as a,L as i,z as n,h as o,B as r,d as s,U as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./chevron-down-CdFqRe9V.js";import{a as t,i as n,n as r,t as i}from"./field-LSvWL6SU.js";var a=t();function o({label:t,error:o,hint:s,children:c,...l}){let u=r({error:o,hint:s});return(0,a.jsx)(n,{...u,label:t,error:o,hint:s,children:(0,a.jsxs)(`div`,{className:`relative`,children:[(0,a.jsx)(`select`,{...l,...u.aria,className:`${i} appearance-none pr-8`,children:c}),(0,a.jsx)(e,{size:15,strokeWidth:1.75,"aria-hidden":!0,className:`pointer-events-none absolute right-2.5 top-1/2 -translate-y-1/2 text-muted`})]})})}export{o as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BWaJ3C7D.js";import{a as t,o as n}from"./field-LSvWL6SU.js";import{t as r}from"./link-IcX1XVhI.js";import{n as i}from"./Match-rL_mIMP3.js";import{n as a}from"./glass-aa3ISPbD.js";import{t as o}from"./clock-CQa7hjXl.js";import{n as s}from"./use-settings-1G2lnVQh.js";var c={name:`archive`,size:24,node:[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]};c.node;var l=a(c),u={name:`file-down`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M12 18v-6`,key:`17g6i2`}],[`path`,{d:`m9 15 3 3 3-3`,key:`1npd3o`}]]};u.node;var d=a(u),f={name:`file-up`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M12 12v6`,key:`3ahymv`}],[`path`,{d:`m15 15-3-3-3 3`,key:`15xj92`}]]};f.node;var p=a(f),m={name:`hard-drive`,size:24,node:[[`path`,{d:`M10 16h.01`,key:`1bzywj`}],[`path`,{d:`M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`18tbho`}],[`path`,{d:`M21.946 12.013H2.054`,key:`zqlbp7`}],[`path`,{d:`M6 16h.01`,key:`1pmjb7`}]]};m.node;var h=a(m),g={name:`key-round`,size:24,node:[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]};g.node;var _=a(g),v={name:`mail`,size:24,node:[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]};v.node;var y=a(v),b={name:`sliders-horizontal`,size:24,node:[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]};b.node;var x=a(b),S={name:`terminal`,size:24,node:[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]};S.node;var C=a(S),w=e(n(),1),T=t(),E={size:15,strokeWidth:1.75},D=[{title:`System`,links:[{to:`/settings`,label:`Application`,icon:(0,T.jsx)(x,{...E})},{to:`/settings/mail`,label:`Mail`,icon:(0,T.jsx)(y,{...E})},{to:`/settings/storage`,label:`File storage`,icon:(0,T.jsx)(h,{...E})},{to:`/settings/backups`,label:`Backups`,icon:(0,T.jsx)(l,{...E})},{to:`/settings/crons`,label:`Crons`,icon:(0,T.jsx)(o,{...E})}]},{title:`Sync`,links:[{to:`/settings/export-collections`,label:`Export collections`,icon:(0,T.jsx)(d,{...E})},{to:`/settings/import-collections`,label:`Import collections`,icon:(0,T.jsx)(p,{...E})}]},{title:`Authentication`,links:[{to:`/settings/auth-providers`,label:`Auth providers`,icon:(0,T.jsx)(_,{...E})}]},{title:`Debug`,links:[{to:`/settings/sql`,label:`SQL`,icon:(0,T.jsx)(C,{...E})}]}];function O(){let e=s();return(0,T.jsxs)(`div`,{className:`flex flex-col gap-6 md:flex-row`,children:[(0,T.jsx)(`nav`,{"aria-label":`Settings`,className:`flex flex-col gap-0.5 md:sticky md:top-0 md:w-48 md:shrink-0 md:self-start`,children:D.map((t,n)=>(0,T.jsxs)(w.Fragment,{children:[(0,T.jsx)(`h2`,{className:`px-2.5 pb-1 text-xs font-medium uppercase text-faint ${n>0?`mt-3`:``}`,children:t.title}),t.links.filter(t=>!(e&&t.label===`Import collections`)).map(e=>(0,T.jsxs)(r,{to:e.to,activeOptions:{exact:!0},className:`flex items-center gap-2 rounded-control px-2.5 py-1.5 text-muted hover:bg-hover/50 hover:text-text focus-visible:outline-2 focus-visible:outline-focus`,activeProps:{"aria-current":`page`,className:`bg-hover font-medium text-text hover:bg-hover`},children:[e.icon,e.label]},e.to))]},t.title))}),(0,T.jsx)(`div`,{className:`flex min-w-0 flex-1 flex-col`,children:(0,T.jsx)(i,{})})]})}export{O as SettingsLayout};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./Page-K-gAWDfu.js";import{a as t}from"./field-LSvWL6SU.js";var n=t();function r({title:t,width:r,children:i}){return(0,n.jsx)(e,{width:r,crumbs:[{label:`Settings`,to:`/settings`},{label:t}],children:i})}export{r as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BWaJ3C7D.js";import{t}from"./useForm-BJzA_-qG.js";import{a as n,o as r}from"./field-LSvWL6SU.js";import{o as i,r as a}from"./context-BLpmYnEM.js";import{r as o}from"./errors-BzXFkL79.js";import{n as s,r as c}from"./queries-CUkLB99G.js";import{t as l}from"./QueryStatus-eTXKeftu.js";import{t as u}from"./SettingsPage-D8K4z39N.js";import{r as d}from"./glass-aa3ISPbD.js";import{t as f}from"./CodeArea-D6AGlQG3.js";import{n as p,r as m,t as h}from"./Table-B0wJiwif.js";var g=e(r(),1),_=n(),v=/'(?:[^']|'')*'|"(?:[^"]|"")*"|`[^`]*`|\[[^\]]*\]|--[^\n]*|\/\*[\s\S]*?\*\//g;function y(e){return/\b(delete|update|drop|alter)\b|\b(replace\s+into|or\s+replace)\b/i.test(e.replace(v,` `))}function b(){let e=a(),[n,r]=(0,g.useState)(null),[v,b]=(0,g.useState)(``),x=i(),S=s(),C=c(),w=t({defaultValues:{query:``},onSubmit:async({value:t})=>{if(t.query.trim()&&(b(``),!y(t.query)||await x({title:`Run query`,message:`This query changes or removes data or tables. It cannot be undone. Run it?`,confirmLabel:`Run`,danger:!0})))try{r(await e.sql.run(t.query))}catch(e){r(null),b(o(e))}}});return(0,_.jsx)(u,{title:`SQL`,width:`full`,children:(0,_.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),w.handleSubmit()},className:`flex flex-col gap-3`,children:[S.isError&&(0,_.jsx)(l,{query:S}),(0,_.jsx)(`p`,{className:`rounded-control border border-warning-line bg-warning-bg p-3 text-sm text-warning-text`,children:`Queries run directly on the database. They skip API rules, hooks and migrations.`}),(0,_.jsx)(w.Field,{name:`query`,children:e=>(0,_.jsx)(f,{label:`SQL query`,language:`sql`,sqlSchema:C,rows:8,value:e.state.value,onChange:t=>{e.handleChange(t),b(``)},onRun:()=>void w.handleSubmit()})}),(0,_.jsx)(w.Subscribe,{selector:e=>e.isSubmitting,children:e=>(0,_.jsx)(d,{type:`submit`,className:`self-start`,variant:`primary`,loading:e,children:`Run`})}),v&&(0,_.jsx)(`div`,{role:`alert`,className:`rounded border border-danger/40 bg-danger/10 p-3 text-sm text-danger-text`,children:v}),n&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)(`p`,{className:`text-sm`,children:[n.rows.length,` rows, `,n.affectedRows,` affected,`,` `,n.execTime,` ms`]}),n.columns.length>0&&(0,_.jsxs)(h,{caption:`Result`,children:[(0,_.jsx)(`thead`,{children:(0,_.jsx)(`tr`,{children:n.columns.map((e,t)=>(0,_.jsx)(m,{children:e.name},t))})}),(0,_.jsx)(`tbody`,{children:n.rows.map((e,t)=>(0,_.jsx)(`tr`,{children:e.map((e,t)=>(0,_.jsx)(p,{children:e===null?`NULL`:e},t))},t))})]})]})]})})}export{b as SqlPage,y as changesRows};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./errors-BzXFkL79.js";import{t}from"./FormFooter-Ct4RFwgS.js";import{t as n}from"./QueryStatus-eTXKeftu.js";import{n as r,t as i}from"./S3Fields-DejLGW2D.js";import{t as a}from"./SettingsPage-D8K4z39N.js";import{i as o}from"./use-settings-1G2lnVQh.js";import{t as s}from"./use-settings-form-DWwEeaUC.js";import{a as c}from"./field-LSvWL6SU.js";var l=c();function u(){let e=o();return(0,l.jsx)(a,{title:`File storage`,children:e.data?(0,l.jsx)(d,{settings:e.data}):(0,l.jsx)(n,{query:e})})}function d({settings:n}){let{form:a,dirty:o,save:c,submit:u,reset:d}=s(n);return(0,l.jsx)(e,{error:c.error,children:(0,l.jsxs)(`form`,{onSubmit:u,className:`flex flex-col gap-4`,children:[(0,l.jsx)(`p`,{className:`text-sm text-muted`,children:`Existing files are not moved when you switch storage.`}),(0,l.jsx)(i,{form:a,prefix:`s3`}),(0,l.jsx)(r,{filesystem:`storage`,disabled:o}),(0,l.jsx)(t,{dirty:o,saving:c.isPending,onReset:d})]})})}export{u as StoragePage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./useControlledState-jTKE_mWM.js";import{a as t,n,r}from"./field-LSvWL6SU.js";var i=t();function a(t){let[n,r]=e(t.checked,t.defaultChecked??!1,t.onChange);return(0,i.jsx)(`button`,{type:`button`,role:`switch`,"aria-checked":n,"aria-label":t.label,"aria-describedby":t[`aria-describedby`],"aria-invalid":t[`aria-invalid`],disabled:t.disabled,className:t.className,"data-checked":n?``:void 0,"data-disabled":t.disabled?``:void 0,onClick:()=>r(!n),children:(0,i.jsx)(`span`,{"data-thumb":``})})}function o({label:e,error:t,hint:o,...s}){let{errorId:c,hintId:l,aria:u}=n({error:t,hint:o});return(0,i.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,i.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,i.jsx)(a,{...s,label:e,"aria-describedby":u[`aria-describedby`],"aria-invalid":u[`aria-invalid`],className:`relative h-5 w-9 shrink-0 rounded-full bg-control transition-colors duration-[var(--hb-duration)] motion-reduce:transition-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus aria-[invalid=true]:outline-2 aria-[invalid=true]:outline-danger disabled:opacity-50 data-[checked]:bg-accent [&>span]:absolute [&>span]:top-0.5 [&>span]:left-0.5 [&>span]:size-4 [&>span]:rounded-full [&>span]:bg-thumb [&>span]:transition-transform [&>span]:duration-[var(--hb-duration)] motion-reduce:[&>span]:transition-none data-[checked]:[&>span]:translate-x-4`}),(0,i.jsx)(`span`,{className:`text-sm text-text`,children:e})]}),(0,i.jsx)(r,{errorId:c,hintId:l,error:t,hint:o})]})}export{o as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./glass-aa3ISPbD.js";import{a as t}from"./field-LSvWL6SU.js";var n={name:`arrow-down`,size:24,node:[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]};n.node;var r=e(n),i={name:`arrow-up`,size:24,node:[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]};i.node;var a=e(i),o={name:`chevrons-up-down`,size:24,node:[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]};o.node;var s=e(o),c=t();function l({caption:e,stickyHeader:t,children:n}){return(0,c.jsx)(`div`,{className:`overflow-auto${t?` max-h-[calc(100dvh-12rem)]`:``}`,children:(0,c.jsxs)(`table`,{"data-sticky-header":t||void 0,className:`w-full border-collapse text-left text-sm${t?` [&_th]:sticky [&_th]:top-0 [&_th]:z-10 [&_th]:bg-surface`:``}`,children:[e&&(0,c.jsx)(`caption`,{className:`sr-only`,children:e}),n]})})}var u={asc:a,desc:r};function d({children:e,sort:t,onSort:n,align:r}){let i=t===`asc`?`ascending`:t===`desc`?`descending`:`none`,a=t?u[t]:s;return(0,c.jsx)(`th`,{scope:`col`,"aria-sort":n?i:void 0,className:`border-b border-line px-3 py-2 text-xs font-medium text-muted${r===`right`?` text-right`:``}`,children:n?(0,c.jsxs)(`button`,{type:`button`,onClick:n,className:`inline-flex items-center gap-1 rounded font-medium hover:text-text focus-visible:outline-2 focus-visible:outline-focus`,children:[e,(0,c.jsx)(a,{size:13,strokeWidth:1.75,"aria-hidden":!0,className:t?`text-text`:`text-faint`})]}):e})}function f({children:e,wrap:t,fill:n,align:r}){let i=!t&&typeof e==`string`;return(0,c.jsx)(`td`,{title:i?e:void 0,className:`border-b border-line px-3 py-2 text-text${r===`right`?` text-right`:``}${n?` w-full max-w-0`:t?``:` max-w-xs whitespace-nowrap`}${i?` truncate`:``}`,children:e})}export{r as a,a as i,f as n,d as r,l as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,i as t,n,t as r}from"./field-LSvWL6SU.js";var i=e();function a({label:e,error:a,hint:o,className:s,...c}){let l=n({error:a,hint:o});return(0,i.jsx)(t,{...l,label:e,error:a,hint:o,children:(0,i.jsx)(`input`,{type:`text`,...c,...l.aria,className:`${r} ${s??``}`})})}export{a as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BWaJ3C7D.js";import{a as t,o as n}from"./field-LSvWL6SU.js";import{a as r,i,t as a}from"./glass-aa3ISPbD.js";import{a as o,i as s,n as c,r as l,t as u}from"./useTopLayer-Dh6x1Bza.js";var d=e(r(),1),f=e(n(),1),p=0;function m(){let[e,t]=(0,f.useState)(!1),n=(0,f.useRef)(!1);n.current=e;let r=(0,f.useRef)(void 0),i=(0,f.useCallback)(()=>{clearTimeout(r.current),Date.now()<p?t(!0):r.current=setTimeout(()=>t(!0),700)},[]),a=(0,f.useCallback)(()=>{clearTimeout(r.current),n.current&&(p=Date.now()+300),t(!1)},[]);return(0,f.useEffect)(()=>()=>{clearTimeout(r.current),n.current&&(p=Date.now()+300)},[]),{open:e,onEnter:i,onLeave:a}}var h=t();function g(e){try{return e?.matches(`:focus-visible`)??!1}catch{return e===document.activeElement}}function _(e){let t=m(),n=(0,f.useId)(),r=(0,f.useRef)(null),i=o(r,e.children.props.ref),a=(0,f.useRef)(null),p=u(r,a,t.open),_=c(r,a,{open:t.open,placement:`top`});s(a,{open:t.open,onDismiss:t.onLeave,triggerRef:r});let v=(0,f.useRef)(void 0);(0,f.useEffect)(()=>()=>clearTimeout(v.current),[]);let y=()=>{g(r.current)||(clearTimeout(v.current),v.current=setTimeout(t.onLeave,100))},b=()=>clearTimeout(v.current),x=(0,f.cloneElement)(e.children,l(e.children.props,{ref:i,"aria-describedby":t.open?n:void 0,onMouseEnter:()=>{b(),t.onEnter()},onMouseLeave:y,onFocus:t.onEnter,onBlur:()=>{b(),t.onLeave()}}));return(0,h.jsxs)(h.Fragment,{children:[x,p&&(0,d.createPortal)((0,h.jsx)(`div`,{ref:a,id:n,role:`tooltip`,popover:`manual`,className:e.className,style:_.style,onMouseEnter:b,onMouseLeave:t.onLeave,"data-open":``,"data-placement":_.placement,children:e.content}),p)]})}var v=i({base:`${a} z-50 rounded-control px-2 py-1 text-xs text-text`});function y({className:e,...t}){return(0,h.jsx)(_,{...t,className:v({className:e})})}export{y as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0)n=e.nextSub;else{for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}}while(1)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(1)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function t(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var n=[],r=0,{link:i,unlink:a,propagate:o,checkDirty:s,shallowPropagate:c}=e({update(e){return e._update()},notify(e){n[u++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,m(e))}}),l=0,u=0,d,f=0;function p(e){try{++f,e()}finally{--f||h()}}function m(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=a(n,e)}function h(){if(!(f>0)){for(;l<u;){let e=n[l];n[l++]=void 0,e.notify()}l=0,u=0}}function g(e,n){let a=typeof e==`function`,l=e,u={_snapshot:a?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:+!a,get(){return d!==void 0&&i(u,d,r),u._snapshot},subscribe(e){let n=t(e),r={current:!1},i=_(()=>{u.get(),r.current?(d=void 0,n.next?.(u._snapshot)):r.current=!0});return{unsubscribe:()=>{i.stop()}}},_update(e){let t=d,i=n?.compare??Object.is;if(a)d=u,++r,u.depsTail=void 0;else if(e===void 0)return!1;a&&(u.flags=5);try{let t=u._snapshot,n=typeof e==`function`?e(t):e===void 0&&a?l(t):e;return t===void 0||!i(t,n)?(u._snapshot=n,!0):!1}finally{d=t,a&&(u.flags&=-5),m(u)}}};return a?(u.flags=17,u.get=function(){let e=u.flags;if(e&16||e&32&&s(u.deps,u)){if(u._update()){let e=u.subs;e!==void 0&&c(e)}}else e&32&&(u.flags=e&-33);return d!==void 0&&i(u,d,r),u._snapshot}):u.set=function(e){if(u._update(e)){let e=u.subs;e!==void 0&&(o(e),c(e),h())}},u}function _(e){let t=()=>{let t=d;d=n,++r,n.depsTail=void 0,n.flags=6;try{return e()}finally{d=t,n.flags&=-5,m(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){let e=this.flags;e&16||e&32&&s(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,m(this)}};return t(),n}export{g as n,t as r,p as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./glass-aa3ISPbD.js";var t={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./glass-aa3ISPbD.js";var t={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./glass-aa3ISPbD.js";var t={name:`clock`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BWaJ3C7D.js";import{a as t,o as n}from"./field-LSvWL6SU.js";import{a as r,i,n as a,r as o,t as s}from"./glass-aa3ISPbD.js";import{t as c}from"./TextField-IItAFjU7.js";function l(e){return e[e.length-1]}function u(e,t){return typeof e==`function`?e(t):e}var d=Object.prototype.hasOwnProperty;function f(e){for(let t in e)if(d.call(e,t))return!0;return!1}var p=()=>Object.create(null),m=(e,t)=>h(e,t,!0);function h(e,t,n,r=0){if(e===t)return e;if(r++>500)return t;let i=Array.isArray(e)&&Array.isArray(t);if(!i&&!(g(e)&&g(t)))return t;let a=Object.keys(e),o=a.length,s=Object.keys(t),c=s.length;if(i?o!==e.length||c!==t.length||o&&l(a)!==`${o-1}`||c&&l(s)!==`${c-1}`:o!==Object.getOwnPropertyNames(e).length||c!==Object.getOwnPropertyNames(t).length||Object.getOwnPropertySymbols(t).length)return t;let u=0,f,m,_;if(i){for(;u<c&&(_=u,m=e[_],f=t[_],f=m===f?m:typeof m==`object`?h(m,f,n,r):f,f===m);u++);if(u===c&&o===c)return e}else{let i=o===c,l=!0;for(;u<c;u++){_=s[u],m=e[_];let o=t[_];f=m===o?m:typeof m==`object`?h(m,o,n,r):o,i&&=f===m&&(a[u]===_||d.call(e,_)),l&&=Object.is(f,o),a[u]=f}if(i)return Object.getOwnPropertySymbols(e).length?t:e;if(l)return t}let v=i?s.fill(0):n?p():{};for(let o=0;o<c;o++)_=i?o:s[o],i?(m=e[_],o>u&&(f=t[_],f=m===f?m:typeof m==`object`?h(m,f,n,r):f),v[_]=o<u?m:f):v[_]=a[o];return v}function g(e){return!e||typeof e!=`object`?!1:(Object.getPrototypeOf(e)?.constructor??Object)===Object}function _(e,t,n,r){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let i=0,a=e.length;i<a;i++){let a=e[i],o=t[i];if(a!==o&&!_(a,o,n,r))return!1}return!0}if(g(e)&&g(t)){if(n){for(let i in t)if((r||t[i]!==void 0)&&!_(e[i],t[i],n,r))return!1;return!0}let i=0;if(r)i=Object.keys(e).length;else for(let t in e)e[t]!==void 0&&i++;for(let a in t)if((r||t[a]!==void 0)&&(i--===0||!_(e[a],t[a],n,r)))return!1;return i===0}return!1}function v(e){return typeof e?.message==`string`?e.message.startsWith(`Failed to fetch dynamically imported module`)||e.message.startsWith(`error loading dynamically imported module`)||e.message.startsWith(`Importing a module script failed`):!1}var y=/[\x00-\x1f\x7f"<>`{}]/g;function b(e){return e.replace(y,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function x(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return b(t)}var S=[`http:`,`https:`,`mailto:`,`tel:`];function C(e){if(e[0]!==`/`&&e.includes(`:`))return/^[\x00-\x20]*([a-z][a-z\d+.\t\n\r-]*:)/i.exec(e)?.[1]?.replace(/[\t\n\r]/g,``).toLowerCase()}var w=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function T(e,t){if(!e)return!1;if(w.test(e))return!0;let n=C(e);return n?!t.has(n):!1}function E(e){if(!e)return e;let t=e;if(/[%\\\x00-\x1f\x7f]/.test(e)){let n=/%25|%5C/gi,r=0,i;for(t=``;(i=n.exec(e))!==null;)t+=x(e.slice(r,i.index))+i[0],r=n.lastIndex;t+=x(r?e.slice(r):e)}return t}function ee(e){return/[\s\u0080-\uFFFF]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function D(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function te(){throw Error(`Invariant failed`)}function O(e){return e.replace(/\/{2,}/g,`/`)}function ne(e){return e===`/`?e:e.replace(/^\/+/,``)}function k(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/+$/,``):e}function re(e){return k(ne(e))}function ie(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function ae(e,t,n=`never`,r){if(t.includes(`//`)&&(t=O(t)),t.startsWith(`/`))return t.length===1||n===`preserve`?t:n===`always`?t.endsWith(`/`)?t:`${t}/`:t.endsWith(`/`)?t.slice(0,-1):t;let i=t===`.`,a;if(r){a=i?e:e+`\0`+t;let n=r.get(a);if(n)return n}let o;if(i)o=e.split(`/`);else{for(e.includes(`//`)&&(e=O(e)),o=e.split(`/`);o.length>1&&l(o)===``;)o.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&o.push(r):o=[r]:r===`..`?o.length>1?o.pop():o=[``]:r===`.`||o.push(r)}}o.length>1&&(l(o)===``?n===`never`&&o.pop():n===`always`&&o.push(``));let s=o.join(`/`),c=(i?O(s):s)||`/`;return a&&r&&r.set(a,c),c}function oe(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=new RegExp([...t.keys()].join(`|`).replace(/[.*()]/g,`\\$&`),`g`);return e=>e.replace(n,e=>t.get(e)??e)}function se(e){return e==null||e===``}function ce(e,t,n){if(typeof t!=`string`)return``+(t??void 0);let r=e===`_splat`;if(r&&(!t||/^[a-zA-Z0-9\-._~!/]*$/.test(t)))return t;let i=encodeURIComponent(t);return r&&(i=i.replaceAll(`%2F`,`/`)),n?n(i):i}function le(e,t,n,r,i){let a=e.endsWith(`/`)?`/`:``,o=``;for(let e of t){if(typeof e==`string`){o+=e;continue}let[t,s,c,l]=e,u=t===2,d=u&&l!==void 0?l+a:l,f=n[s];if(t!==3||f!=null){if(i&&(i[s]=f,u&&(i[`*`]=f)),u&&se(f)){if(c===`/`&&!d)continue;f=``}o+=c+ce(s,f,r)+(d||``)}}return o+a||`/`}function ue(e){return e?.isNotFound===!0}function de(){try{return sessionStorage}catch{return}}var fe=`tsr-scroll-restoration-v1_3`,pe=de();function me(){try{return JSON.parse(pe?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}var A=me(),he=`data-scroll-restoration-id`,ge=e=>e.state.__TSR_key||e.href;function _e(e){let t=e.getAttribute(he);if(t)return`[${he}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}var ve=!1,ye=`window`;function be(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function xe(e){let t=new Set;for(let n of e){if(n===ye)continue;let e=be(n);e&&t.add(e)}return t}function Se(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.e=!0);let i=e.options.getScrollRestorationKey||ge,a=new Set,o=e=>{let t=A[e]||={};for(let e of a)e===document?t[ye]={scrollX,scrollY}:e.isConnected&&(t[_e(e)]={scrollX:e.scrollLeft,scrollY:e.scrollTop})};n&&!r.s&&(r.s=!0,ve=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,e=>{ve||a.add(e.target)},!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&o(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{history.scrollRestoration=`auto`,o(i(e.stores.resolvedLocation.get()??e.stores.location.get()));try{pe?.setItem(fe,JSON.stringify(A))}catch{}}),addEventListener(`pageshow`,e=>{e.persisted&&(history.scrollRestoration=`manual`)})),r.r||(r.r=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.n,c=r.h,l;if(a.clear(),r.n=!0,r.h=!1,typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let u=i(t.toLocation),d=t.fromLocation&&i(t.fromLocation);if(r.e&&d&&d!==u){let e=A[d];if(e){let t=A[u];for(let n in e){if(n===ye){if(s)continue}else{let e=be(n);if(!e||s&&o&&(l??=xe(o),l.has(e)))continue}t||=A[u]={},t[n]??=e[n]}}}ve=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){!e&&o&&(l??=xe(o));let t=e&&i&&c,s=r.e?A[u]:void 0;if(s)for(let e in s){let{scrollX:r,scrollY:i}=s[e];if(e===ye){if(t)continue;scrollTo({top:i,left:r,behavior:n}),a=!0}else{let t=be(e);t&&(t.scrollLeft=r,t.scrollTop=i,l?.delete(t))}}if(!e){let e={top:0,left:0,behavior:n};if(a||scrollTo(e),l)for(let t of l)t.scrollTo(e)}}!a&&e&&i&&document.getElementById(e)?.scrollIntoView(i)}finally{ve=!1}}))}function Ce(e,t=String){let n;for(let r in e){let i=e[r];i!==void 0&&(n||=new URLSearchParams).set(r,t(i))}return n?n.toString():``}function we(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function Te(e){let t=new URLSearchParams(e),n=Object.create(null);for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=we(r):Array.isArray(t)?t.push(we(r)):n[e]=[t,we(r)]}return n}var Ee=/^(?:\s|["[{\d-]|fa|nu|tr)/,De=ke(JSON.parse),Oe=Ae(JSON.stringify,JSON.parse);function ke(e){let t=e===JSON.parse;return n=>{n[0]===`?`&&(n=n.slice(1));let r=Te(n);for(let n in r){let i=r[n];if(typeof i==`string`){if(t&&!Ee.test(i))continue;try{r[n]=e(i)}catch{}}}return r}}function Ae(e,t){let n=t===JSON.parse;function r(r){if(r&&typeof r==`object`)try{return e(r)}catch{}else if(t&&typeof r==`string`){if(n&&!Ee.test(r))return r;try{return t(r),e(r)}catch{}}return r}return e=>{let t=Ce(e,r);return t?`?${t}`:``}}var je=`__root__`;function Me(e){e.statusCode=e.statusCode||e.code||307;let t=new Headers(e.headers);e.href&&t.get(`Location`)===null&&t.set(`Location`,e.href);let n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function Ne(e){return e instanceof Response&&!!e.options}function Pe(e){let t=new Map,n,r;return{get(e){let n=t.get(e);if(n)return n.visited=!0,n.value},set(i,a){let o=t.get(i);if(o){o.value=a;return}if(t.size>=e){let e=n?.next().value;for(;!e||e.visited;)e?e.visited=!1:n=t.values(),e=n.next().value;e===r&&(n=void 0),t.delete(e.key)}let s={key:i,value:a,visited:!1};r=s,t.set(i,s)},clear(){t.clear(),n=void 0,r=void 0}}}var j=4,Fe=5;function Ie(e){let t=e.names;if(t)return t;let n=[];for(let t of e)typeof t!=`string`&&n.push(t[1]);return e.names=n}function Le(e,t,n){let r=e.slice(t,n);if(r.charCodeAt(0)===36)return r.length===1?[2,`_splat`,``,void 0]:[1,r.slice(1),``,``];let i=r.indexOf(`{`);if(i>=0){let a=r.indexOf(`}`,i),o=r.charCodeAt(i+1)===45,s=i+(o?3:2);if(a>=0&&r.charCodeAt(s-1)===36&&(!o||s<a)){let c=r.slice(s,a);return[o?3:c?1:2,c||`_splat`,r.slice(0,i),e.slice(t+a+1,c?n:e.length)]}}return r}function M(e,t,n,r,i,a){let o=n,s=t.fullPath??t.from,c=t.options,u=s.length,d=s.endsWith(`/`)?u-1:u,f=c?.caseSensitive??e,p=c?.params?.parse??c?.parseParams,m,h=a?n-1:0;if(!r||s.includes(`$`)){m=a?.slice()??[];let e=l(m);e&&typeof e!=`string`&&e[0]===2&&(m[m.length-1]=[e[0],e[1],e[2],e[3]===void 0?void 0:e[3]+s.substring(n-(s[n-2]===`/`?2:1),d)],h=u)}for(;o<u;){let e=o,t=s.indexOf(`/`,e),n=t===-1?u:t,a=Le(s,e,n);o=n+1;let c;if(typeof a==`string`){if(!r)continue;let e=a,t;f?t=r.static??=new Map:(e=a.toLowerCase(),t=r.staticInsensitive??=new Map);let n=t.get(e);if(n)c=n;else{let n=N(r);c=n,t.set(e,n)}}else{let t=a[0],l=a[2],g=a[3]??``;if(t===2&&(n=u,o=n+1),m&&h<n&&(h<e-1&&m.push(s.slice(h,e-1)),a[2]=`/`+l,t===2&&a[3]!==void 0&&d<u&&(a[3]=g.slice(0,-1)),m.push(a),h=n),!r)continue;let _=f&&!!(l||g);f||(l=l.toLowerCase(),g=g.toLowerCase());let v=t===1?r.dynamic??=[]:t===3?r.optional??=[]:r.wildcard??=[],y=t!==2&&!p&&v.find(e=>!e.parse&&e.caseSensitive===_&&e.prefix===l&&e.suffix===g);if(y)c=y;else{let e=N(r,t,_,l,g);c=e,v.push(e),v.length===2&&i?.push(v)}}r=c}m&&h<d&&m.push(s.slice(h,d));let g=m?.slice();if(!r)return g;if(p&&t.children&&!t.isRoot&&t.id&&t.id.charCodeAt(t.id.lastIndexOf(`/`)+1)===95){let e=N(r,Fe);(r.pathless??=[]).push(e),r=e}let _=(t.path||!t.children)&&!t.isRoot;if(_&&d<u){let e=N(r,j);r.index=e,r=e}return r.parse=p??null,r.priority=c?.params?.priority??0,r.route||(r.data=g,_&&(r.route=t)),[r,o,g]}function Re(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function N(e,t=0,n,r,i){return{kind:t,depth:e?e.depth+1:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,data:void 0,parent:e,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function ze(e,t){let n=N(),r=[];function i(e,t,n,a){let[o,s,c]=M(!1,e,t,n,r,a);if(e.children)for(let t of e.children)i(t,s,o,c)}for(let t of e)i(t,1,n);for(let e of r)e.sort(Re);t.masksTree=n,t.flatCache=Pe(1e3)}function Be(e,t){e||=`/`;let n=t.flatCache.get(e);if(n!==void 0)return n;let r=We(e,t.masksTree);return t.flatCache.set(e,r),r}function Ve(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=N(),M(t,{from:e},1,o),i.singleCache.set(a,o)),We(r,o,n)}function He(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=We(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=Ke(a.route)),t.matchCache.set(r,a),a}function Ue(e,t=!1){let n=N(),r=[],i={},a={},o=0;function s(e,n,c,l){if(e.init(o),e.id in i&&te(),i[e.id]=e,o!==0&&e.path){let t=k(e.fullPath);(!a[t]||e.fullPath.endsWith(`/`))&&(a[t]=e)}o++;let[u,d,f]=M(t,e,n,c,r,l);if(e._interpolation=f,e.children)for(let t of e.children)s(t,d,u,f)}s(e,1,n);for(let e of r)e.sort(Re);return{processedTree:{segmentTree:n,singleCache:Pe(1e3),matchCache:Pe(1e3),flatCache:null,masksTree:null},routesById:i,routesByPath:a}}function We(e,t,n=!1){let r=e.split(`/`),i=Je(e,r,t,n);if(!i)return null;let[a]=Ge(e,r,i);return{route:i.node.route,rawParams:a}}function Ge(e,t,n){let r=qe(n.node),i=n.node.data&&Ie(n.node.data),a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.param??0;for(;s<r.length;o++,s++,c++){let u=r[s];if(u.kind===j)break;if(u.kind===Fe){o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1||u.kind===3){let e=i[l++];if(u.kind===3&&n.skipped&1<<s){o--,c=f-1;continue}let t=u.suffix||u.prefix?d.substring(u.prefix.length,d.length-u.suffix.length):d;(t||u.kind===1)&&(a[e]=decodeURIComponent(t))}else if(u.kind===2){let t=u,n=e.substring(f+t.prefix.length,e.length-t.suffix.length),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,param:l}]}function Ke(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function qe(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Je(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!l(t),a=i&&e!==`/`,o=t.length-+!!i,s=[{node:n,index:1,skipped:0,statics:0,dynamics:0,optionals:0}],c=null,u=null;for(;s.length;){let n=s.pop(),{node:i,index:l,skipped:d,statics:f,dynamics:p,optionals:m}=n,{extract:h,rawParams:g}=n;if(i.kind===2&&i.route&&!Qe(u,n))continue;if(i.parse){if(!Ze(e,t,n))continue;g=n.rawParams,h=n.extract}r&&i.route&&i.kind!==j&&Qe(c,n)&&(c=n);let _=l===o;if(_&&(i.route&&(!a||i.kind===j||i.kind===2)&&Qe(u,n)&&(u=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let v=_?void 0:t[l],y;if(_&&i.index){let n={node:i.index,index:l,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g},r=!0;if(i.index.parse&&(Ze(e,t,n)||(r=!1)),r){if(!p&&!m&&!d&&Xe(f,o))return n;Qe(u,n)&&(u=n)}}if(i.wildcard)for(let e=i.wildcard.length-1;e>=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!r||!_&&(n.caseSensitive?v:y??=v.toLowerCase()).startsWith(r)){if(a){if(_)continue;let e=t.slice(l).join(`/`),i=e.slice(-a.length);if((n.caseSensitive?i:i.toLowerCase())!==a||e.length-a.length<r.length)continue}s.push({node:n,index:o,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(i.optional){let e=d|1<<i.depth+1;for(let t=i.optional.length-1;t>=0;t--){let n=i.optional[t];s.push({node:n,index:l,skipped:e,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_)for(let e=i.optional.length-1;e>=0;e--){let t=i.optional[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:l+1,skipped:d,statics:f,dynamics:p,optionals:m+Ye(o,l),extract:h,rawParams:g})}}if(!_&&i.dynamic&&v)for(let e=i.dynamic.length-1;e>=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:l+1,skipped:d,statics:f,dynamics:p+Ye(o,l),optionals:m,extract:h,rawParams:g})}if(!_&&i.staticInsensitive){let e=i.staticInsensitive.get(y??=v.toLowerCase());e&&s.push({node:e,index:l+1,skipped:d,statics:f+Ye(o,l),dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_&&i.static){let e=i.static.get(v);e&&s.push({node:e,index:l+1,skipped:d,statics:f+Ye(o,l),dynamics:p,optionals:m,extract:h,rawParams:g})}if(i.pathless)for(let e=i.pathless.length-1;e>=0;e--){let t=i.pathless[e];s.push({node:t,index:l,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(u)return u;if(r&&c){let n=c.index;for(let e=0;e<c.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return c.rawParams??=Object.create(null),c.rawParams[`**`]=decodeURIComponent(r),c}return null}function Ye(e,t){return 2**(e-t-1)}function Xe(e,t){return e===2**(t-1)-1}function Ze(e,t,n){let r,i;try{[r,i]=Ge(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function Qe(e,t){return!e||t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===j)>(e.node.kind===j)||t.node.kind===j==(e.node.kind===j)&&t.node.depth>e.node.depth)))}function $e(e,t,n){let r=re(e),i=`/${r}`,a=t?i:i.toLowerCase(),o=`${a}/`,s={input:({url:e})=>{let n=t?e.pathname:e.pathname.toLowerCase();return n===a?e.pathname=`/`:n.startsWith(o)&&(e.pathname=e.pathname.slice(i.length)),e},output:({url:e})=>(e.pathname=O(`/${r}${e.pathname}`),e)};return n?{input:({url:e})=>et(n,s.input({url:e})),output:({url:e})=>s.output({url:tt(n,e)})}:s}function et(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function tt(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function nt(e){let t=e;return{get(){return t},set(e){t=u(e,t)}}}function rt(e){return{get(){return e()}}}function it(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i}=t,a=new Map,o=n(`idle`),s=n(e),c=n(void 0),l=n([]),u=r(()=>l.get().map(e=>a.get(e).get())),d=r(()=>({status:o.get(),isLoading:o.get()===`pending`,matches:u.get(),location:s.get(),resolvedLocation:c.get()}));function f(e){let t=a.get(e);return t||(t=n(void 0),a.set(e,t)),t}let p={status:o,location:s,resolvedLocation:c,ids:l,matches:u,byRoute:a,__store:d,getMatchStore:f,setMatches:m};function m(e){let t=l.get(),n=e.map(e=>e.routeId);i(()=>{D(t,n)||l.set(n);for(let e of t)n.includes(e)||a.get(e).set(()=>void 0);for(let t of e){let e=f(t.routeId);e.get()!==t&&e.set(t)}})}return p}var P=`__TSR_index`,at=`popstate`,ot=`beforeunload`,st=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function ct(e){let t=st.exec(e);return t?`/`+e.slice(t[0].length):e}function lt(e){return/[\x00-\x1f\x7f]/.test(e)&&(e=e.replace(/[\x00-\x1f\x7f]/g,e=>`
|
|
2
|
+
\r`.includes(e)?``:encodeURIComponent(e))),ct(e)}function ut(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async n=>{let r=n.navigateOpts?.ignoreBlocker?void 0:e.getBlockers?.();if(typeof document<`u`&&r?.length&&(n.type===`PUSH`||n.type===`REPLACE`))for(let i of r){let r=mt(n.path,n.state);if(await i.blockerFn({currentLocation:t,nextLocation:r,action:n.type})){e.onBlocked?.();return}}n.task()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[P];i=dt(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[P];i=dt(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t,n?.ignoreBlocker??!1),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[P]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r,_getBlockers:()=>e.getBlockers?.()??[]}}function dt(e,t){let n=ht();return{...t,key:n,__TSR_key:n,[P]:e}}function ft(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=t=>lt(e?.createHref?e.createHref(t):t),c=e?.parseLocation??(()=>mt(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=ht();t.history.replaceState({[P]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_=()=>{g&&(S._ignoreSubscribers=!0,(g[2]?t.history.pushState:t.history.replaceState)(g[1],``,g[0]),S._ignoreSubscribers=!1,g=void 0,u=void 0)},v=(t,n,r)=>{let i=e?.createHref?s(n):void 0,a=!!g;a||(u=l),l=mt(n,r),g=[i??l.href,r,g?.[2]||t],a||queueMicrotask(()=>_())},y=e=>{l=c(),S.notify({type:e})},b=async()=>{if(m=!1,f){f=!1;return}let e=c(),n=e.state[P]-l.state[P],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let r=a();if(typeof document<`u`&&r.length){for(let i of r)if(await i.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(-n),S.notify(u);return}}}l=c(),S.notify(u)},x=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0||typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},S=ut({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>v(!0,e,t),replaceState:(e,t)=>v(!1,e,t),back:e=>(e&&(p=!0,m=!0),t.history.back()),forward:e=>{e&&(p=!0,m=!0),t.history.forward()},go:(e,n)=>{d=!0,n&&(p=!0,m=!0),t.history.go(e)},createHref:s,flush:_,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(ot,x,{capture:!0}),t.removeEventListener(at,b)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return S._ignoreNextBeforeUnload=e=>{m=!1;try{e=new URL(e,t.document.baseURI).href,m=/^https?:/.test(e)&&(!e.includes(`#`)||e.split(`#`)[0]!==t.location.href.split(`#`)[0])}catch{}},t.addEventListener(ot,x,{capture:!0}),t.addEventListener(at,b),t.history.pushState=function(...e){let r=n.apply(t.history,e);return S._ignoreSubscribers||y(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return S._ignoreSubscribers||y(`REPLACE`),n},S}function pt(e){let t=e?.window??(typeof document<`u`?window:void 0);return ft({window:t,parseLocation:()=>{let e=t.location.hash,n=e.indexOf(`#`,1);return n<0&&(n=e.length),mt(`${e?e.slice(1,n):`/`}${t.location.search}${e.slice(n)}`,t.history.state)},createHref:e=>`${t.location.pathname}${t.location.search}#${e}`})}function mt(e,t){let n=lt(e),r=n.indexOf(`#`),i=n.indexOf(`?`);if(!t){let e=ht();t={[P]:0,key:e,__TSR_key:e}}return{href:n,pathname:n.slice(0,r>-1?i>-1?Math.min(r,i):r:i>-1?i:n.length),hash:r>-1?n.slice(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t}}function ht(){return(Math.random()+1).toString(36).slice(7)}function gt(e,t){return e.protocol!==`http:`&&e.protocol!==`https:`||e.origin!==t||!!e.username||!!e.password}function _t(e){return e.pathname+e.search+e.hash}function vt(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function yt(e,t){return{fromLocation:t,toLocation:e,pathChanged:t?.pathname!==e.pathname,hrefChanged:t?.href!==e.href,hashChanged:t?.hash!==e.hash}}function bt({key:e,__TSR_key:t,__TSR_index:n,__hashScrollIntoViewOptions:r,...i}){return i}function xt(e){return e.findIndex(e=>e.status===`error`||e.status===`notFound`||e._notFound)+1}function St(e,t,n,r,i,a){r&&(t=t.slice(0,r)),i&&(n=n.slice(0,i));for(let r of t){if(a&&e._tx!==a)return;n.some(e=>e.routeId===r.routeId)||e.routesById[r.routeId].options.onLeave?.(r)}for(let r of n){if(a&&e._tx!==a)return;e.routesById[r.routeId].options[t.some(e=>e.routeId===r.routeId)?`onStay`:`onEnter`]?.(r)}}var Ct=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={n:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.startTransition=async e=>(e(),!1),this.update=e=>{let t=this.options;this.options={...t,...e},this.isServer=this.options.isServer??!1??typeof document>`u`,this.staticLocations=new WeakMap,this.protocolAllowlist=new Set(this.options.protocolAllowlist),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history?this.options.history:ft()),this.origin=this.options.origin,this.origin||=window?.origin&&window.origin!==`null`?window.origin:`http://localhost`;let n=this.options.basepath??`/`,r=this.options.rewrite,i=this.basepath!==n||t?.rewrite!==r||t?.caseSensitive!==this.options.caseSensitive;if(i&&(this.basepath=n,this.rewrite=n!==`/`&&re(n)?$e(n,this.options.caseSensitive,r):r),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;e=this.buildRouteTree(),this.setRoutes(e)}if(this.stores)i&&this.stores.location.set(this.latestLocation);else if(this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=it(this.latestLocation,e),Se(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=Ue(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&ze(this.options.routeMasks,e.processedTree),{...e,resolvePathCache:Pe(1e3)}},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{for(let t of this.subscribers)if(t.eventType===e.type)try{t.fn(e)}catch(e){console.error(e)}},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i},a)=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:E(e),external:!1,searchStr:o,search:m(t?.search,i),hash:E(r.slice(1)),state:h(t?.state,a)}}let o=et(this.rewrite,new URL(i,this.origin)),s=this.options.parseSearch(o.search),c=this.options.stringifySearch(s);return o.search=c,{href:o.href.replace(o.origin,``),publicHref:i,pathname:E(ct(o.pathname)),external:!!this.rewrite&>(o,this.origin),searchStr:c,search:m(t?.search,s),hash:E(o.hash.slice(1)),state:h(t?.state,a)}},r=n(e,e.state),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i,{...i.state,__tempLocation:void 0,key:r.state.key,__TSR_key:r.state.__TSR_key});return e.maskedLocation=r,e}return r},this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>{let t=Object.create(null),n=He(k(e),this.processedTree,!0);return n&&Object.assign(t,n.rawParams),[n?.branch||[this.routesById.__root__],t,n?.route]},this.buildLocation=e=>{{let t=this.staticLocations.get(e);if(t)return t}let t=!1,n=(n={})=>{if(n.href){let e=mt(n.href,{});n={...n,to:et(this.rewrite,new URL(e.pathname,this.origin)).pathname,search:this.options.parseSearch(e.search),hash:e.hash.slice(1)}}let r=e._fromLocation||this._pendingLocation||this.latestLocation,i,a=()=>(t=!0,r),o=()=>i??=this.matchRoutesLightweight(a()),s=n.to?`${n.to}`:`.`,c=ae(s[0]===`/`?``:n.unsafeRelative===`path`?a().pathname:n.from??o()[1],s,this.options.trailingSlash,this.resolvePathCache),l=this.routesByPath[k(c)],u=c.includes(`$`),d;if(l)d=l._branch??=Ke(l);else if(u)d=[];else{let[e,t,n]=this.getMatchedRoutes(c);d=e,this.options.notFoundRoute&&(!n||n.path!==`/`&&t[`**`])&&(d=[...d,this.options.notFoundRoute])}let m=u?l?._interpolation??M(!1,{fullPath:c},0):void 0,h;for(let e of d){let t=e.options.params?.stringify??e.options.stringifyParams;if(t){let e=o()[3];if(h??=Ot(n.params,e),!f(h))break;h===e&&(h=Object.assign(p(),h));try{Object.assign(h,t(h))}catch{}}}h??=Ot(n.params,kt(n.params,m)?o()[3]:At);let g=e.leaveParams?c:ct(E(m?le(c,m,h,this.pathParamsDecoder):c)),_=jt(d,e._includeValidateSearch),v=()=>{let t=o()[2];if(e._includeValidateSearch&&this.options.search?.strict){let e={};d.forEach(n=>{if(n.options.validateSearch)try{Object.assign(e,Dt(n.options.validateSearch,{...e,...t}))}catch{}}),t=e}return t},y=_.length?Mt(_,v(),n):n.search===!0?v():typeof n.search==`function`?n.search(v()):n.search||At,b=this.options.stringifySearch(y),x=n.hash===!0?a().hash:typeof n.hash==`function`?n.hash(a().hash):n.hash||void 0,S=x?`#${x}`:``,C=n.state?n.state===!0?a().state:typeof n.state==`function`?n.state(a().state):n.state:At,w=`${g}${b}${S}`,T,D,te=!1;if(this.rewrite){let e=new URL(w,this.origin),t=e.origin,n=tt(this.rewrite,e);T=_t(e),gt(n,t)?(D=n.href,te=!0):D=ct(_t(n))}else T=ee(w),D=T;return{publicHref:D,href:T,pathname:g,search:y,searchStr:b,state:C,hash:x??``,external:te,unmaskOnReload:n.unmaskOnReload}},r=n(e);if(e.mask)r.maskedLocation=n({from:e.from,...e.mask});else if(this.options.routeMasks){let t=Be(r.pathname,this.processedTree);if(t){let i=Object.assign(p(),t.rawParams),{from:a,params:o,...s}=t.route,c=Ot(o,i);r.maskedLocation=n({from:e.from,...s,params:c})}}return!t&&e._fromLocation&&this.staticLocations.set(e,r),r},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r=n.maskedLocation??n;if(r.external)return wt(this,r.publicHref,{replace:n.replace,ignoreBlocker:t});let i,a=k(this.latestLocation.href)===k(n.href)&&_(bt(n.state),bt(this.latestLocation.state)),o=this._commitPromise,s,c=new Promise(e=>{s=e});if(c.resolve=()=>{s(),o?.resolve()},this._commitPromise=c,a)this.load();else{let{maskedLocation:r,hashScrollIntoView:a,...o}=n;r&&(o={...r,state:{...r.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state={...o.state,__hashScrollIntoViewOptions:a??this.options.defaultHashScrollIntoView??!0},this.shouldViewTransition=e,i=n.replace?`REPLACE`:`PUSH`,this.history[i===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t}),this.history.subscribers.size||this.load({action:{type:i}})}return this._scroll.n=n.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,...a}={})=>{let o=this.buildLocation({...a,_includeValidateSearch:!0});this._pendingLocation=o;let s=this.commitLocation({...o,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return queueMicrotask(()=>{this._pendingLocation===o&&(this._pendingLocation=void 0)}),s},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=n?C(n):void 0;if(a||t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i}),a=t.maskedLocation??t;n??=a.publicHref,r??=a.publicHref}let t=!a&&r?r:n;return wt(this,t,i)}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.load=async e=>{this.updateLatestLocation(),e?.action&&(this._scroll.h=e.action.type===`PUSH`||e.action.type===`REPLACE`),await mn(this,e)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&window.CSS?.supports?.(`selector(:active-view-transition-type(a))`)){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(yt(r,i)):t.types;if(a===!1)return e();n={update:e,types:a}}else n=e;return document.startViewTransition(n).updateCallbackDone}return e()},this.invalidate=e=>{let t=this._committed,n=e?.filter,r=this._preloads,i=new Set,a=e=>{(!n||n(e))&&i.add(e.id)};t.forEach(a),this._cache.forEach(a),r?.forEach(e=>e.forEach(a)),this._tx?.[3].forEach(a);let o=[];for(let[e,t]of r??[])t.some(e=>i.has(e.id))&&(r.delete(e),o.push(e));let s=t=>{if(i.has(t.id)){let n=this.routesById[t.routeId],r={...t,invalid:!0,...(e?.forcePending||t.status===`error`||t.status===`notFound`)&&vt(n)?{status:`pending`,error:void 0}:void 0};return t._flight=void 0,r}return t};this._committed=t.map(s);for(let[t,n]of this._cache)i.has(t)&&(n.invalid=!0,e?.forcePending&&(n.status=`pending`));for(let e of i){let t=this._flights?.get(e);this._flights?.delete(e),t&&!t[2]&&o.push(t[1])}for(let e of o)e.abort();return this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.resolveRedirect=e=>{let t=e.options,n=e.headers.get(`Location`)||t.href;if(!n){let e=this.buildLocation(t);n=(e.maskedLocation??e).publicHref||`/`}let r;if(w.test(n)||(r=C(n))&&!this.protocolAllowlist.has(r))throw Error(`Redirect blocked: unsafe protocol`);if(r===`http:`||r===`https:`){let e=new URL(n);e.pathname.startsWith(`//`)?n=e.href:gt(e,this.origin)||(n=_t(e),r=void 0)}return r&&(t.reloadDocument=!0),t.href=n,e.headers.set(`Location`,n),e},this.clearCache=e=>{let t=this._cache,n=this._preloads,r=e?.filter,i=[],a=[];for(let[e,n]of t)(!r||r(n))&&(a.push(e),i.push(n));let o=[];for(let[e,t]of n??[])(!r||t.some(r))&&(o.push(e),i.push(...t));for(let e of a)t.delete(e);for(let e of o)n.delete(e);for(let e of i){let t=e._flight;e._flight=void 0,t&&!--t[2]&&(this._flights?.get(e.id)===t&&this._flights.delete(e.id),o.push(t[1]))}for(let e of o)e.abort()},this.loadRouteChunk=F,this.preloadRoute=e=>hn(this,e),this.matchRoute=(e,t)=>{let n={...e,to:e.to?ae(e.from||``,e.to,this.options.trailingSlash,this.resolvePathCache):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n),i=this.stores.status.get()===`pending`;if(t?.pending&&!i)return!1;let a=t?.pending??!i?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),o=Ve(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,a.pathname,this.processedTree);return!o||e.params&&!_(o.rawParams,e.params,!0)?!1:t?.includeSearch??!0?_(a.search,r.search,!0)?o.rawParams:!1:o.rawParams},this.getStoreConfig=t,e.pathParamsAllowedCharacters?.length&&(this.pathParamsDecoder=oe(e.pathParamsAllowedCharacters)),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??Oe,parseSearch:e.parseSearch??De,protocolAllowlist:e.protocolAllowlist??S}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes(e){Object.assign(this,e),this.lightweightCache=new WeakMap,this.staticLocations=new WeakMap;let t=this.options.notFoundRoute;t&&(t.init(99999999999),this.routesById[t.id]!==t&&(t._interpolation=M(!1,t,0)),this.routesById[t.id]=t)}matchRoutesInternal(e,t){let[n,r,i]=this.getMatchedRoutes(e.pathname),a=n,o=!1;(i?i.path!==`/`&&r[`**`]:k(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?Nt(this.options.notFoundMode,a):void 0,c=Array(a.length),l=this._committed,u=(e,t)=>{let n=l[t];return n?.routeId===e.id?n:e===this.options.notFoundRoute?l.find(t=>t.routeId===e.id):void 0},d;for(let n=0;n<a.length;n++){let i=a[n],o=c[n-1],l,f,g;{let n=o?.search??e.search,r=o?._strictSearch??void 0;try{let e=Dt(i.options.validateSearch,{...n})??void 0;l={...n,...e},f={...r,...e}}catch(e){let r=e;if(e instanceof Tt||(r=new Tt(e.message,{cause:e})),t?.throwOnError)throw r;l=n,f={},g=r}}let _=``,v=``;try{_=i.options.loaderDeps?.({search:l})??``,v=_&&JSON.stringify(_)||``}catch(e){if(t?.throwOnError)throw e;g??=e}let y=p(),b=i._interpolation?le(i.fullPath,i._interpolation,r,this.pathParamsDecoder,y):i.fullPath,x=i.id+b+v,S=u(i,n),C=this._cache.get(x)??(S?.id===x?S:void 0);d=C?._strictParams??Object.assign(y,d);let w;if(!C)try{Pt(i,d)}catch(e){if(w=ue(e)||Ne(e)?e:new Et(e.message,{cause:e}),t?.throwOnError)throw w}let T=S?`stay`:`enter`,E;if(C)E={...C,cause:T,search:m(S?S.search:C.search,l),_strictSearch:f,searchError:g};else{let e=vt(i)?`pending`:`success`;E={id:x,ssr:i.options.ssr,index:n,routeId:i.id,params:S?.params??d,_strictParams:d,pathname:b,updatedAt:Date.now(),search:S?m(S.search,l):l,_strictSearch:f,searchError:g,status:e,isFetching:!1,error:void 0,paramsError:w,context:{},abortController:t?._controller??new AbortController,cause:T,loaderDeps:S?h(S.loaderDeps,_):_,invalid:!1,preload:!1,staticData:i.options.staticData||{},fullPath:i.fullPath}}let ee=s===i.id;E._notFound&&!ee&&(E.error=void 0),E._notFound=ee,c[n]=E}for(let e=0;e<c.length;e++){let n=c[e];n.params=n.cause===`stay`?m(n.params,d):d,t?._controller&&(n.context={})}return c}matchRoutesLightweight(e){let t=l(this.stores.ids.get()),n=t?this.stores.byRoute.get(t).get():void 0,r=n?.id,i=this.lightweightCache.get(e);if(i&&i[0]===r)return i[1];let[a,o]=this.getMatchedRoutes(e.pathname),s=l(a),c={...e.search};for(let e of a)try{Object.assign(c,Dt(e.options.validateSearch,c))}catch{}let u=n&&n.routeId===s.id&&n.pathname===e.pathname,d;if(u)d=n.params;else{let e=o;for(let t of a)try{Pt(t,e)}catch{}d=e}let f=[a,s.fullPath,c,d];return this.lightweightCache.set(e,[r,f]),f}};async function wt(e,t,{replace:n,ignoreBlocker:r}){if(!T(t,e.protocolAllowlist)){if(!r){let t=e.history._getBlockers();for(let r of t)if(r?.blockerFn&&await r.blockerFn({currentLocation:e.history.location,nextLocation:e.history.location,action:n?`REPLACE`:`PUSH`}))return}e.history._ignoreNextBeforeUnload?.(t),n?window.location.replace(t):window.location.href=t}}var Tt=class extends Error{},Et=class extends Error{};function Dt(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new Tt(`Async validation not supported`);if(n.issues)throw new Tt(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return`parse`in e?e.parse(t):typeof e==`function`?e(t):{}}function Ot(e,t){if(e===void 0||e===!0)return t;let n=Object.create(null);return e===!1||e===null?n:typeof e==`function`?(Object.assign(n,t),Object.assign(n,e(n))):Object.assign(n,t,e)}function kt(e,t){return typeof e==`function`?!0:!t||e===!1||e===null?!1:e===void 0||e===!0||t.some(t=>typeof t!=`string`&&!d.call(e,t[1]))}var At=Object.freeze({});function jt(e,t){let n=[];for(let r=0;r<e.length;r++){let i=e[r].options;`search`in i?i.search?.middlewares&&n.push(...i.search.middlewares):(i.preSearchFilters||i.postSearchFilters)&&n.push(({search:e,next:t})=>{let n=t(i.preSearchFilters?i.preSearchFilters.reduce((e,t)=>t(e),e):e);return i.postSearchFilters?i.postSearchFilters.reduce((e,t)=>t(e),n):n});let a=i.validateSearch;t&&a&&n.push(({search:e,next:t,meta:n})=>{let r=t(e);try{let e=Dt(a,r);if(n&&e)for(let t in e)t in r||(n.defaulted||=new Map).set(t,e[t]);return{...r,...e}}catch{}return r})}return n}function Mt(e,t,n){let r=(t,i,a)=>{if(t>=e.length){if(!n.search)return{};if(n.search===!0)return i;let e=u(n.search,i);return a&&(a.explicit=e),e}return e[t]({search:i,next:(e,n)=>{if(n){let n=a||{};return{search:r(t+1,e,n),meta:n}}return r(t+1,e,a)},meta:a})};return r(0,t)}function Nt(e,t){if(e!==`root`){let e;for(let n=t.length-1;n>=0;n--){let r=t[n];if(r.options.notFoundComponent)return r.id;e||=r.children&&r.id}if(e)return e}return je}function Pt(e,t){let n=e.options.params?.parse??e.options.parseParams;n&&Object.assign(t,n(t))}function Ft(e,t){return e.options[t]?.preload?.()}function It(e,t){let n=Ft(e,`component`),r=Ft(e,`pendingComponent`);return t&&(r?r=r.then(t):t()),n&&r?Promise.all([n,r]).then(()=>{}):n??r}function F(e,t,n){let r=()=>t===!1?void 0:t?Ft(e,t):It(e,n),i=e._lazy;if(i)return i===!0?r():i.then(r);if(!e.lazyFn)return r();let a=e.lazyFn().then(t=>{{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazy=!0}},t=>{throw e._lazy=void 0,t});return e._lazy=a,a.then(r)}function Lt(e){let t=e.findIndex(e=>e.status!==`success`||e._notFound)+1;return t&&t<e.length?e.slice(0,t):e}function Rt(e,t,n){let r=e._tx;return t&&r?.[2]===n&&!r[3].some(e=>e.routeId===t)}var I=0,L=1,zt=2,R=3,z=[4];function Bt(e){return typeof e[0]==`number`}function B(e,t){return t.aborted?Promise.race([Promise.reject(t),e]):new Promise((n,r)=>{let i=()=>r(t);t.addEventListener(`abort`,i,{once:!0}),Promise.resolve(e).then(n,r).then(()=>t.removeEventListener(`abort`,i))})}function V(e,t){return e.routesById[t.routeId]}function Vt(e,t,n){return Ne(e)?[R,e]:ue(e)?(e.routeId||=n,[zt,e]):t?(typeof e?.then==`function`&&(e=Error(`A Promise was thrown`,{cause:e})),[L,e]):[I,e]}function Ht(e,t){let n=Vt(t,!0,e.id);if(n[0]!==L)return n;try{e.options.onError?.(n[1])}catch(t){n=Vt(t,!0,e.id)}return n}function Ut(e,t,n,r,i){return i[0].signal.aborted?z:tn(e,t,n,Ht(n,r),i)}async function Wt(e,t,n,r,i,a){let[o,s]=t,c=n[0].signal,l=!!n[3];for(let i=n[6]??0;i<r;i++){let r=s[i],u=V(e,r);r.abortController=n[0];let d=s[i-1]?.context??e.options.context??{},f={params:r.params,location:o,navigate:t=>e.navigate({...t,_fromLocation:o}),buildLocation:e.buildLocation,cause:l?`preload`:r.cause,abortController:n[0],preload:l,matches:s,routeId:u.id};try{let e=r._ctx||=u.options.context?u.options.context({...f,deps:r.loaderDeps,context:d})||{}:void 0;r.context={...d,...e}}catch(a){return H(e,r),[i,Ut(e,t,u,a,n)]}if(c.aborted)return[i,z];let p=r.paramsError??r.searchError;if(p!==void 0)return H(e,r),[i,Ut(e,t,u,p,n)];let m=u.options.beforeLoad;if(!m)continue;let h=r.status;i>=a&&(r.status=`pending`,n[7]?.());try{W(e,r,`beforeLoad`,n[0]);let a=m({...f,search:r.search,context:r.context,...e.options.additionalContext}),o=await(typeof a?.then==`function`?B(a,c):a);if(c.aborted)return[i,z];let s=tn(e,t,u,Vt(o,!1,u.id),n);if(s[0]!==I)return H(e,r),[i,s];r.context={...r.context,...o}}catch(a){return H(e,r),[i,Ut(e,t,u,a,n)]}finally{r.status=h,W(e,r,!1,n[0])}}i()}function Gt(e,t,n){if(!(!n||--n[2])){if(e._flights?.get(t.id)===n){let n=e._tx;if(n&&!n[0].signal.aborted&&!n[3].includes(t)&&n[3].some(e=>e.id===t.id)&&n[3].some(e=>e.isFetching===`beforeLoad`))return;e._flights.delete(t.id)}return n[1]}}function H(e,t){let n=t._flight;t._flight=void 0,Gt(e,t,n)?.abort()}function U(e,t,n,r){let i=[];for(let a of t)if(!n?.includes(a)){let t=a._flight;if(a._flight=void 0,r&&t?.[2]===1&&e._flights?.get(a.id)===t&&n?.some(e=>e.id===a.id))t[2]=0;else{let n=Gt(e,a,t);n&&i.push(n)}}for(let e of i)e.abort()}function Kt(e){for(let t of e){let e=t._flight;e&&e[2]++}}function W(e,t,n,r){if(t.isFetching=n,r&&e._tx?.[0]!==r)return;let i=e.stores.byRoute.get(t.routeId),a=i?.get();a?.id===t.id&&i.set({...a,isFetching:n})}function qt(e,t,n,r,i,a,o){let s=t[0];return{params:n.params,location:s,navigate:t=>e.navigate({...t,_fromLocation:s}),cause:o?`preload`:n.cause,abortController:i,preload:o,deps:n.loaderDeps,parentMatchPromise:a,context:n.context,route:r,...e.options.additionalContext}}async function Jt(e,t,n,r,i,a,o){let s=o[0],c=s.signal;if(c.aborted)return z;if(!i)return[I,void 0];let l=n._flight;W(e,n,`loader`,s);try{if(!l){let s=new AbortController;l=[Promise.resolve().then(()=>i(qt(e,t,n,r,s,a,!!o[3]))).then(e=>Vt(e,!1,r.id),e=>Vt(e,!0,r.id)).then(t=>(t[0]!==I&&e._flights?.get(n.id)===l&&(e._flights.delete(n.id),l[2]||s.abort()),t[0]===L&&l[2]?Ht(r,t[1]):t)),s,1],(e._flights??=new Map).set(n.id,l)}return n._flight=l,n.abortController=l[1],tn(e,t,r,await B(l[0],c),o)}catch(t){if(t!==c||!c.aborted)throw t;return H(e,n),z}finally{W(e,n,!1,s)}}function Yt(e,t,n){t[0]!==R&&(e.status=`success`,e.error=void 0,t[0]===I?(e.loaderData=t[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=n):e.invalid=!0)}function Xt(e,t,n){let r=e._cache.get(t.id);if(r!==n||e._committed.some(e=>e.id===t.id&&e._flight===t._flight))return;let i={...t,_notFound:void 0,context:{}};i._flight&&i._flight[2]++,e._cache.set(t.id,i),r&&H(e,r)}function Zt(e,t){return t[0]===L||t[0]===zt?{...e,status:t[0]===L?`error`:`notFound`,error:t[1],_flight:void 0}:e}function Qt(e,t,n,r,i,a,o){let s=t[1][n],c=V(e,s),l=!!a[3],u=e._cache.get(s.id),d,f=!1,p;try{if(s.status===`success`&&(d=c.options.shouldReload,typeof d==`function`&&(d=d(qt(e,t,s,c,a[0],i,l))),a[0].signal.aborted&&(p=z)),!p){if(s.status!==`success`)f=!0;else{let t=l||s.preload?c.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.options.defaultStaleTime??0;f=!!(s.invalid||d||d===void 0&&Date.now()-s.updatedAt>=t&&(a[5]||s.cause===`enter`||a[2].some(e=>e.routeId===s.routeId&&e.id!==s.id)))}}}catch(n){s.invalid=!0,H(e,s),p=Ut(e,t,c,n,a)}let m=c.options.loader,h=typeof m==`function`,g=h?m:m?.handler,_=!l||c.options.preload!==!1,v=_&&m?e._flights?.get(s.id):void 0;v===s._flight||p?v=void 0:v&&!f&&!l&&d===void 0?f=!0:f||(v=void 0);let y=!(!m||!f||s.status!==`success`||l||a[4]||((h?void 0:m.staleReloadMode)??e.options.defaultStaleReloadMode)===`blocking`),b=f&&_,x=b&&!y&&(s.status!==`success`||!!m),S=n>=o?a[7]:void 0,C=c.lazyFn&&c._lazy!==!0?S:void 0;if(b&&!m&&(s.invalid=!1,s.updatedAt=Date.now()),v&&v[2]++,x){let t=s._flight;s._flight=v,Gt(e,s,t)?.abort(),n>=o&&(s.status=`pending`),S?.()}b||(s.isFetching=!1);let w=!p&&x?Jt(e,t,s,c,g,i,a).then(t=>(Yt(s,t,l),t[0]===I&&(m&&!a[0].signal.aborted&&Xt(e,s,u),n>=o&&(s.status=`pending`)),t)):Promise.resolve(p??[I,s.loaderData]),T=(async()=>{try{let e=F(c,void 0,C);e&&await B(e,a[0].signal)}catch(r){if(!t[1].some((e,t)=>t<=n&&(e.status===`error`||e.status===`notFound`||e._notFound)))return[n,Ut(e,t,c,r,a)]}let r=await w;x&&r[0]===I&&s.status===`pending`&&!a[0].signal.aborted&&(s.status=`success`,S?.())})();if(r.push([n,w,T]),!y)return w.then(e=>Zt(s,e));let E={...s,status:`pending`,preload:!1,_flight:v};s.invalid=!1,s.isFetching=`loader`;let ee=Jt(e,t,E,c,g,i,a).then(e=>(s.isFetching=!1,Yt(E,e,!1),e));return(t[2]??=[]).push([n,ee,T,E]),ee.then(e=>Zt(E,e))}async function $t(e,t,n,r,i=0){let a=n?.[1][1],o=a?.routeId?t.findIndex(e=>e.routeId===a.routeId):n?.[0]??t.length-1;o<0&&(o=0);for(let n=o;n>=0;n--){let i=V(e,t[n]);try{let e=F(i,!1);e&&await B(e,r)}catch(e){if(e===r&&r.aborted)throw e}if(i.options.notFoundComponent)return n}return a?.routeId?o:i}function G(e,t){t[2]&&=(U(e,t[2].map(e=>e[3])),void 0)}async function en(e,t,n,r){let i;try{await Promise.all(e.map(e=>e[1].then(async t=>{let a=e[0];if(!(r&&a>=await r)){if(t[0]>=R)throw[a,t];!i&&t[0]!==I&&(i=[a,t],await Promise.all((n??[]).map(e=>{if(!(e[0]<=a))return e[1].then(t=>{if(t[0]===R)throw[e[0],t]})})))}})))}catch(e){return e}return t??i}function tn(e,t,n,r,i,a){for(;r[0]===R;){let o=r[1],s=o.options;try{if((s.href||o.headers.has(`Location`))&&(e.resolveRedirect(o),s.reloadDocument)||(s.reloadDocument?i[3]:i[1]>=20))return r;let n=e.buildLocation({...s,_fromLocation:t[0],_includeValidateSearch:!0}),a=n.maskedLocation??n;if(a.external){let t=o.clone();return t.options={...s},t.headers.set(`Location`,a.publicHref),e.resolveRedirect(t),i[3]?[R,t]:[R,t,a]}return[R,o,n]}catch(e){r=a?[L,e]:Ht(n,e),a=!0}}return r}async function nn(e,t,n,r,i,a){let o=t[1],s=await i,c=!1,l=o.findIndex(e=>e._notFound),u=t=>t[1][0]===zt?$t(e,o,t,r.signal):t[0],d=l<0?o.length:l;if((s?.[1][0]??0)>=R)d=0;else if(s){d=s[2]??=await u(s);for(let e of n){if(e[0]>=d)break;let t=await e[1];if(t[0]!==I&&t[0]<R&&!(`loaderData`in o[e[0]])){s=[e[0],t],d=s[2]=await u(s);break}}}for(let e of n){if(e[0]>=d)break;let t=await e[2];if(t){s=t;break}}if((s?.[1][0]??0)>=R){let n=s[1];if(n[0]!==R||n[1].options.reloadDocument||n[2])return G(e,t),n;c=!0,s=[0,[L,Error(`Too many redirects`)]]}let f=s?s[2]??await u(s):l;if(f>=0){let i=s?.[1],l=i?.[0],u=o[f],d=i?.[1],p=()=>{i&&(u._notFound=void 0,l===L?u.status=`error`:(d.routeId=u.routeId,u.routeId===e.routeTree.id?(u.status=`success`,u._notFound=!0):u.status=`notFound`),u.error=d,u.isFetching=!1)};p(),i||a?.();let m=V(e,u);try{await B(i?Promise.resolve().then(()=>F(m,l===L?`errorComponent`:`notFoundComponent`)):Promise.all([F(m),F(m,`notFoundComponent`)]),r.signal)}catch(n){if(n===r.signal&&r.signal.aborted)return G(e,t),z}i?c&&(r.abort(),await Promise.all([...n.map(e=>e[1]),...n.map(e=>e[2]),...(t[2]??[]).map(e=>e[1])]),G(e,t),U(e,o),p()):u.status=`success`}return t}async function rn(e,t,n,r=0,i=t[1].length){let a=t[1];for(let t=r;t<i;t++){let r=a[t],i=V(e,r).options;if(i.head||i.scripts)try{let t={ssr:e.options.ssr,matches:a,match:r,params:r.params,loaderData:r.loaderData},[o,s]=await B(Promise.all([i.head?.(t),i.scripts?.(t)]),n);r.meta=o?.meta,r.links=o?.links,r.headScripts=o?.scripts,r.styles=o?.styles,r.scripts=s}catch(e){if(e===n&&n.aborted)break;console.error(e)}if(r.status!==`success`||r._notFound)break}return t}async function an(e,t,n,r){let i=[t,n],a=r[0].signal,o;try{let t=e.stores.matches.get(),s=n.findIndex(e=>e._notFound);if(e.options.notFoundMode!==`root`&&s>=0){let t=await $t(e,n,void 0,a,s);n[s]._notFound=void 0,n[t]._notFound=!0,s=t}let c=s<0?n.length:s+1,l=0;for(;l<c&&l!==s;){let e=n[l],i=r[2][l],a=t[l];if(i?.id!==e.id||i.status!==`success`||e.preload||a?.id!==e.id||a.status!==`success`||(l++,i._notFound||a._notFound))break}let u=[],d=r[6]??0,f=d?Promise.resolve(n[d-1]):void 0,p=()=>{for(let t=d;t<c&&!a.aborted;t++)f=Qt(e,i,t,u,f,r,l)},m=await Wt(e,i,r,c,p,l);if(m){if(r[4]=!0,c=m[0],m[1][0]===zt){let t=await $t(e,n,m,a);m[2]=t,c=Math.min(c,t+1)}else m[1][0]>=R&&(c=0);p()}if(!a.aborted&&!r[3]){let t=[];for(let[n,r]of e._flights??[])r[2]||(e._flights.delete(n),t.push(r[1]));for(let e of t)e.abort()}let h=nn(e,i,u,r[0],en(u,m,i[2]),r[7]);i[2]?.length&&(i[3]=en(i[2],void 0,void 0,h.then(e=>Bt(e)?0:Lt(n).length,()=>0))),o=await h}catch(t){if(G(e,i),t===a&&a.aborted)return z;throw t}return Bt(o)?o:rn(e,o,a,r[6]===n.length?r[6]:0)}function on(e,t){if(e._tx!==t)return;let n=t[3],r=e.stores.matches.get(),i=e._pending;for(let a=0;a<n.length;a++){let o=n[a],s=o.status===`success`&&!o._notFound,c=r[a]?.id===o.id&&r[a]?.status===`pending`;if(s&&!c)continue;let l=V(e,o),u=s||o.invalid?0:l.options.pendingMs??e.options.defaultPendingMs,d=l.options.pendingComponent??e.options.defaultPendingComponent;if(!d||typeof u!=`number`||u===1/0){i&&(i[0]=t,i[2]=0,i[4]=!0);return}let f=l.options.pendingMinMs??e.options.defaultPendingMinMs??0,p=!1;if(i?.[1]===o.id?(p=i[0]!==t,i[0]=t):(clearTimeout(i?.[3]),e._pending=i=void 0),i||(e._pending=i=[t,o.id,c?Date.now()+f:t[4]+u,void 0,c||void 0,d]),i[4]&&!p&&i[5]===d)return;if(i[5]=d,!i[4]){clearTimeout(i[3]);let n=i[2]-Date.now();if(n>0){i[3]=setTimeout(()=>on(e,t),n);return}i[2]=0}let m=n.map(e=>({...e,_flight:void 0}));m[a].status=`pending`;let h=i[4]=e.startTransition(()=>e.stores.setMatches(m),m).then(t=>(t&&e._pending===i&&i[4]===h&&!i[2]&&(i[2]=Date.now()+f),t));return}}function K(e,t){let n=e._pending;e._tx!==t&&e._tx?.[3].some(e=>e.id===n?.[1])||(clearTimeout(n?.[3]),e._pending=void 0)}async function sn(e,t){let n=e._pending;if(!n)return;clearTimeout(n[3]);let r=n[2]-Date.now();if(!n[4]||r<=0||!Lt(t[3]).some(e=>e.id===n[1]))return;let i;try{await B(new Promise(e=>{i=setTimeout(e,r)}),t[0].signal)}catch{}clearTimeout(i)}function cn(e,t){e._committed=t,e.stores.setMatches(t)}function ln(e,t,n,r){let i=e._committed,a=e._lifecycleEnd,o=e._cache;for(let e of n)e.preload=!1,r&&(e._assetEnd=void 0);let s=Lt(n).length,c=new Map;{let t=Date.now(),r=new Set;for(let e=0;e<n.length;e++){let t=n[e];(e<s||t.status===`success`)&&r.add(t.id)}for(let n of[...i,...o.values()]){if(n.status!==`success`||r.has(n.id))continue;let i=V(e,n);!i.options.loader||t-n.updatedAt>=(n.preload?i.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:i.options.gcTime??e.options.defaultGcTime??3e5)||c.set(n.id,o.get(n.id)===n?n:{...n,_flight:void 0,isFetching:!1,context:{}})}}t[3]=[],e._cache=c;let l=e._lifecycleEnd=xt(n);cn(e,n),U(e,[...o.values(),...i].filter(e=>e._flight&&c.get(e.id)!==e),n),St(e,i,n,a,l,t)}async function un(e,t){let n=e._tx;for(;n&&n!==t;)t=n,await n[5],n=e._tx}function dn(e,t,n){let r=n[1].options,i=n[2];if(!i)return e.navigate({...r,replace:!0,ignoreBlocker:!0});if(r.reloadDocument)return e.navigate({href:(i.maskedLocation??i).publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});i._redirects=t[1]+1,e._pendingLocation=i;let a=e.commitLocation({...i,viewTransition:r.viewTransition,replace:!0,resetScroll:r.resetScroll,hashScrollIntoView:r.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{e._pendingLocation===i&&(e._pendingLocation=void 0)}),a}async function fn(e,t,n,r,i){let a=n.map(e=>({...e}));Kt(a);for(let t of r)H(e,a[t[0]]),a[t[0]]=t[3];let o=[t[2],a],s;try{s=await nn(e,o,r,t[0],i)}catch(t){throw U(e,a),t}if(Bt(s))U(e,a),s[0]===R&&e._tx===t&&e._committed===n&&await dn(e,t,s);else if(await rn(e,s,t[0].signal),e._tx!==t||e._committed!==n)U(e,a);else{for(let t of a){let n=e._cache.get(t.id);n?._flight&&n._flight===t._flight&&(e._cache.delete(t.id),H(e,n))}cn(e,a),U(e,n,a)}}async function pn(e,t,n,r,i,a){let o=await an(e,t[2],t[3],[t[0],t[1],e._committed,void 0,i,n,a,r]);if(Bt(o)){let n=o[0]===R&&e._tx===t;if((!n||o[1].options.reloadDocument)&&K(e,t),U(e,t[3]),t[3]=[],!n)return;if(e._tx!==t){K(e,t);return}await dn(e,t,o);return}let s=o[1];if(e._tx===t&&await sn(e,t),e._tx!==t){K(e,t),U(e,s),G(e,o);return}let c=t[2],l=yt(c,e.stores.resolvedLocation.get()),u=o[2];await e.startViewTransition(async()=>{if(e._tx===t&&await sn(e,t),e._tx!==t){K(e,t),U(e,s),G(e,o);return}let n=await e.startTransition(()=>{K(e,t),ln(e,t,s,a),e._tx===t&&(e.emit({type:`onLoad`,...l}),e._tx===t&&e.emit({type:`onBeforeRouteMount`,...l}))},s);e._tx===t?(u?.length&&fn(e,t,s,u,o[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(c),e.stores.status.set(`idle`),e._tx===t&&e.emit({type:`onResolved`,...l}),n&&e._tx===t&&e.emit({type:`onRendered`,...l})}),e._tx===t&&(e._commitPromise?.resolve(),e._commitPromise=void 0)):G(e,o)})}async function mn(e,t){let n=e._tx,r=e.stores.resolvedLocation.get(),i=r??e.stores.location.get(),a=e.latestLocation,o=e._pendingLocation,s=o?.href===a.href?o._redirects??0:0,c=e._handoff,l=c?.[0](),u=new AbortController,d=e._preflight;if(e._preflight=u,l||c?.[1](),d?.abort(),!u.signal.aborted){let t=yt(a,r);e.emit({type:`onBeforeNavigate`,...t}),u.signal.aborted||e.emit({type:`onBeforeLoad`,...t})}if(u.signal.aborted){await un(e,n);return}let f=i.href===a.href,p=u,m=e.matchRoutes(a,{_controller:u});Kt(m);let h=l?c[1](m):void 0;if(h?p=l:l?.abort(),u.signal.aborted){U(e,m),await un(e,n);return}e._preflight=void 0;let g,_=()=>pn(e,y,f,()=>on(e,y),t?.sync,h),v=t?.sync?new Promise(e=>g=e):Promise.resolve().then(_),y=[p,s,a,m,Date.now(),v.then(()=>un(e,y))];if(e._tx=y,n){for(let t of e.stores.matches.get()){if(e._tx!==y)break;t.isFetching&&W(e,t,!1)}n[0].abort(),U(e,n[3],y[3],!0)}e._tx===y?(e.batch(()=>{e.stores.status.set(`pending`),e.stores.location.set(a)}),(h||!e._committed.length&&m[0]?.status!==`success`&&!m.some(e=>e._notFound))&&on(e,y),g?.(_()),await y[5]):(U(e,y[3]),y[3]=[],g?.(),await un(e,y))}async function hn(e,t){let n=e.buildLocation(t);for(let t=0;;t++){let r=e._committed,i=new AbortController,a,o,s;try{try{a=e.matchRoutes(n,{_controller:i}),Kt(a),o=(e._preloads??=new Map).set(i,a),s=await an(e,n,a,[i,t,r,!0])}finally{o&&(o=o.delete(i),U(e,a)),i.abort()}if(!Bt(s))return s[1];if(!o||s.length<3)return;n=s[2]}catch(e){ue(e)||console.error(e);return}}}var q=e(n(),1),gn=q.createContext(null);function _n(e){return q.useContext(gn)}function vn(e,t){let n=e.stores.location,r=new Set,i,a,o=n=>{Rt(e,t,n)||(i=n,r.forEach(e=>e()))};return[()=>i??n.get(),e=>(r.size||(i=n.get(),a=n.subscribe(o).unsubscribe),r.add(e),()=>{r.delete(e),r.size||(a(),i=void 0)})]}var yn=q.createContext(void 0),bn=q.createContext(void 0),J=t(),xn=q.createContext(void 0),Sn=e=>{let t=q.useContext(xn);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},Cn=({client:e,children:t})=>(q.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,J.jsx)(xn.Provider,{value:e,children:t})),wn={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Tn=new class{#e=wn;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function En(e){setTimeout(e,0)}var Dn=typeof window>`u`||`Deno`in globalThis;function Y(){}function On(e,t){return typeof e==`function`?e(t):e}function kn(e){return typeof e==`number`&&e>=0&&e!==1/0}function An(e,t){return Math.max(e+(t||0)-Date.now(),0)}function X(e,t){return typeof e==`function`?e(t):e}function jn(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==Nn(o,t.options))return!1}else if(!Q(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function Mn(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Z(t.options.mutationKey)!==Z(a))return!1}else if(!Q(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Nn(e,t){return(t?.queryKeyHashFn||Z)(e)}function Z(e){return JSON.stringify(e,(e,t)=>Rn(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function Q(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let n=0;n<t.length;n++)if(!Q(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!Q(e[r],t[r]))return!1;return!0}return!1}var Pn=Object.prototype.hasOwnProperty;function Fn(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=Ln(e)&&Ln(t);if(!r&&!(Rn(e)&&Rn(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:Pn.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=Fn(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function In(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n of Object.keys(e))if(!Pn.call(t,n)||e[n]!==t[n])return!1;return!0}function Ln(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Rn(e){if(!zn(e))return!1;let t=Object.getPrototypeOf(e),n=t?.constructor;if(n===void 0)return!0;if(typeof n!=`function`)return!1;let r=n.prototype;return!(!zn(r)||!r.hasOwnProperty(`isPrototypeOf`)||t!==Object.prototype)}function zn(e){return Object.prototype.toString.call(e)===`[object Object]`}function Bn(e){return new Promise(t=>{Tn.setTimeout(t,e)})}function Vn(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:Fn(e,t)}function Hn(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(-n):r}function Un(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,n):r}var Wn=Symbol();function Gn(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Wn?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Kn(e,t){return typeof e==`function`?e(...t):!!e}var qn=Symbol();function Jn(e,t,n,r){let i=!1,a;return Object.defineProperties(e,{[qn]:{value:r},signal:{enumerable:!0,get:()=>(a??=t(),i||(i=!0,a.aborted?n():a.addEventListener(`abort`,n,{once:!0})),a)}}),e}var Yn=()=>Dn,Xn=()=>Yn(),Zn=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Qn=new class extends Zn{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},$n=En;function er(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=$n,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var $=er(),tr=new class extends Zn{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function nr(e){return Math.min(1e3*2**e,3e4)}function rr(e){return(e??`online`)!==`online`||tr.isOnline()}var ir=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function ar(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(Y);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new ir(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>Qn.isFocused()&&(e.networkMode===`always`||tr.isOnline())&&e.canRun(),p=()=>rr(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},h=e=>{c()||(r?.(),i=`rejected`,o(e))},g=t=>new Promise(n=>{r=e=>{(c()||t())&&n(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(m).catch(r=>{if(c())return;let i=e.retry??(Xn()?0:3),a=e.retryDelay??nr,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);t||!s?h(r):(n++,e.onFail?.(n,r),Bn(o).then(()=>c()||f()?void 0:g(f)).then(()=>{t?h(r):_()}))})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g(p).then(_),s)}}var or=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),kn(this.gcTime)&&(this.#e=Tn.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Xn()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(Tn.clearTimeout(this.#e),this.#e=void 0)}};function sr(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=t,u=e=>{Jn(e,()=>t.signal,()=>n=!0,l[qn])},d=Gn(t.options,t.fetchOptions),f=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return u(e),e})(),o=await d(a),{maxPages:s}=t.options,c=i?Un:Hn;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?lr:cr,n={pages:a,pageParams:o};s=await f(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]===void 0?r.initialPageParam:o[0]:cr(r,s);if(c>0&&e==null)break;s=await f(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function cr(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function lr(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function ur(e,t){return t?cr(e,t)!=null:!1}function dr(e,t){return!t||!e.getPreviousPageParam?!1:lr(e,t)!=null}var fr=class extends or{#e;#t;#n;#r;#i;#a;#o;#s;#c;constructor(e){super(),this.#c=!1,this.#s=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=hr(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#s,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=hr(this.options);e.data!==void 0&&(this.setState(mr(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=Vn(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(Y).catch(Y):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>X(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Wn||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.state.data!==void 0&&this.getObserversCount()>0&&this.observers.some(e=>X(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!An(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#c||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a&&this.#o)return this.#a.continueRetry(),this.#o}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperties(e,{[qn]:{value:n.signal,enumerable:!0},signal:{enumerable:!0,get:()=>(this.#c=!0,n.signal)}})},i=()=>{let e=Gn(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#c=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?sr(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=ar({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof ir&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}),s=(async()=>{try{let e=await o.promise;if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof ir){if(e.silent){if(this.#a!==o&&this.#o)return this.#o;throw e}if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0,this.#o=void 0),this.scheduleGc()}})();return this.#o=s,o.start(),s}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...pr(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...mr(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),$.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function pr(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:rr(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function mr(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function hr(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var gr=class extends or{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||_r(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status===`pending`?this.execute(this.state.variables):Promise.resolve())}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#r=ar({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),i=this.state.status===`pending`,a=!r.canStart();try{if(i)t();else{this.#i({type:`pending`,variables:e,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:a})}this.state.isPaused&&r.canStart()&&t();let o=await r.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#i({type:`success`,data:o}),o}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#r===r&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),$.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function _r(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var vr=class extends Zn{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,t,n){let r=new gr({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=yr(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=yr(e);if(typeof t==`string`){let n=this.#t.get(t);if(n){if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=yr(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=yr(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){$.batch(()=>{let e=this.getAll();this.#e.clear(),this.#t.clear(),e.forEach(e=>{this.notify({type:`removed`,mutation:e})})})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Mn(t,e))}findAll(e={}){return this.getAll().filter(t=>Mn(e,t))}notify(e){$.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return $.batch(()=>Promise.all(e.map(e=>e.continue().catch(Y))))}};function yr(e){return e.options.scope?.id}var br=class extends Zn{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??Nn(r,t),a=this.get(i);return a||(a=new fr({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){this.#e.get(e.queryHash)===e&&(e.destroy(),this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){$.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>jn(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>jn(e,t)):t}notify(e){$.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){$.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){$.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},xr=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new br,this.#t=e.mutationCache||new vr,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=Qn.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=tr.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(X(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=On(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return $.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;$.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return $.batch(()=>{let r=n.findAll(e),i=new Set(r);return r.forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,predicate:e=>i.has(e)},t)})}cancelQueries(e,t={}){let n={revert:!0,...t},r=$.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(Y).catch(Y)}invalidateQueries(e,t={}){return $.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=$.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n),r=e.state.fetchStatus===`paused`;return(!n.throwOnError||r)&&(t=t.catch(Y)),r?Promise.resolve():t}));return Promise.all(r).then(Y)}async query(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t),r=n.isStaleByTime(X(t.staleTime,n))?await n.fetch(t):n.state.data,i=t.select;return i?i(r):r}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(X(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Y).catch(Y)}infiniteQuery(e){return e._type=`infinite`,this.query(e)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Y).catch(Y)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return tr.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(Z(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{Q(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(Z(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{Q(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=Nn(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===Wn&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Sr={name:`circle-check`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]],aliases:[`check-circle-2`]};Sr.node;var Cr=a(Sr),wr={name:`circle-exclamation-point`,size:24,node:[[`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`}]],aliases:[`alert-circle`,`circle-alert`]};wr.node;var Tr=a(wr),Er={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};Er.node;var Dr=a(Er),Or=e(r(),1),kr=[`body`,`footer`].flatMap(e=>[`input`,`select`,`textarea`,`button`].map(t=>`[data-part=${e}] ${t}:not([disabled])`)).join(`, `);function Ar(e){let t=(0,q.useRef)(null),n=(0,q.useRef)(null),r=(0,q.useId)(),i=()=>{n.current?.focus?.(),n.current=null};return(0,q.useEffect)(()=>{let r=t.current;r&&(e.open&&!r.open&&(n.current=document.activeElement,r.showModal(),r.contains(document.activeElement)||([...r.querySelectorAll(kr)].find(e=>!e.closest(`[hidden]`))??r.querySelector(`[data-part=close]`))?.focus()),!e.open&&r.open&&(r.close(),i()))},[e.open]),(0,q.useEffect)(()=>i,[]),(0,Or.createPortal)((0,J.jsx)(`dialog`,{ref:t,"aria-labelledby":r,className:e.className,onSubmit:e=>e.stopPropagation(),onKeyDown:t=>{t.key===`Escape`&&(t.preventDefault(),t.stopPropagation(),e.onClose())},onClose:t=>{t.target===t.currentTarget&&(i(),e.open&&e.onClose())},children:e.open&&(0,J.jsxs)(`div`,{"data-part":`content`,children:[(0,J.jsxs)(`div`,{"data-part":`header`,children:[(0,J.jsx)(`h2`,{id:r,"data-part":`title`,children:e.title}),(0,J.jsx)(`button`,{type:`button`,"data-part":`close`,"aria-label":`Close`,onClick:e.onClose,children:e.closeIcon??`×`})]}),(0,J.jsx)(`div`,{"data-part":`body`,children:e.children}),e.footer&&(0,J.jsx)(`div`,{"data-part":`footer`,children:e.footer})]})}),document.body)}var jr=i({base:[`border border-line bg-raised p-0 text-text shadow-overlay backdrop:bg-scrim`,`[&_[data-part=content]]:flex [&_[data-part=content]]:max-h-dvh [&_[data-part=content]]:flex-col`,`[&_[data-part=header]]:flex [&_[data-part=header]]:items-center [&_[data-part=header]]:justify-between [&_[data-part=header]]:gap-2 [&_[data-part=header]]:border-b [&_[data-part=header]]:border-line [&_[data-part=header]]:py-3 [&_[data-part=header]]:pl-4 [&_[data-part=header]]:pr-3`,`[&_[data-part=title]]:text-base [&_[data-part=title]]:font-semibold`,`[&_[data-part=close]]:inline-flex [&_[data-part=close]]:size-8 [&_[data-part=close]]:items-center [&_[data-part=close]]:justify-center [&_[data-part=close]]:rounded-control [&_[data-part=close]]:text-muted [&_[data-part=close]:hover]:bg-hover [&_[data-part=close]:hover]:text-text [&_[data-part=close]:focus-visible]:outline-2 [&_[data-part=close]:focus-visible]:outline-focus`,`[&_[data-part=body]]:flex-1 [&_[data-part=body]]:overflow-auto [&_[data-part=body]]:p-4`,`[&_[data-part=footer]]:flex [&_[data-part=footer]]:flex-wrap [&_[data-part=footer]]:justify-end [&_[data-part=footer]]:gap-2 [&_[data-part=footer]]:border-t [&_[data-part=footer]]:border-line [&_[data-part=footer]]:p-4`],variants:{variant:{center:`m-auto w-full max-w-lg rounded-base`,side:`ml-auto h-dvh max-h-dvh w-full max-w-xl [&_[data-part=content]]:h-full`},size:{md:``,lg:``}},compoundVariants:[{variant:`center`,size:`lg`,class:`max-w-3xl`}],defaultVariants:{variant:`center`,size:`md`}});function Mr({variant:e,size:t,...n}){return(0,J.jsx)(Ar,{...n,closeIcon:(0,J.jsx)(Dr,{size:15,strokeWidth:1.75,"aria-hidden":!0}),className:jr({variant:e,size:t})})}var Nr=(0,q.createContext)(null);function Pr({children:e}){let[t,n]=(0,q.useState)(null),[r,i]=(0,q.useState)(``),a=(0,q.useRef)(()=>{}),s=(0,q.useCallback)(e=>new Promise(t=>{a.current(!1),a.current=t,i(``),n(e)}),[]),l=e=>{a.current(e),n(null)},u=!!t?.typeToConfirm&&r!==t.typeToConfirm;return(0,J.jsxs)(Nr.Provider,{value:s,children:[e,(0,J.jsxs)(Mr,{open:!!t,onClose:()=>l(!1),title:t?.title??``,footer:(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(o,{onClick:()=>l(!1),children:t?.cancelLabel??`Cancel`}),(0,J.jsx)(o,{variant:t?.danger?`danger`:`primary`,disabled:u,onClick:()=>l(!0),children:t?.confirmLabel})]}),children:[(0,J.jsx)(`p`,{className:`text-sm text-text`,children:t?.message}),t?.typeToConfirm&&(0,J.jsx)(`div`,{className:`mt-3`,children:(0,J.jsx)(c,{label:`Type "${t.typeToConfirm}" to confirm`,value:r,onChange:e=>i(e.target.value)})})]})]})}function Fr(){let e=(0,q.useContext)(Nr);if(!e)throw Error(`ConfirmProvider is missing`);return e}var Ir=(0,q.createContext)(null);function Lr(e){let t=e.kind===`error`?Tr:Cr;return(0,J.jsxs)(`div`,{role:e.kind===`error`?`alert`:void 0,className:`${s} flex items-center gap-2 rounded-base px-3 py-2 text-sm text-text`,children:[(0,J.jsx)(t,{size:15,strokeWidth:1.75,className:e.kind===`error`?`text-danger-text`:`text-accent-text`}),e.message]},e.id)}function Rr({children:e}){let[t,n]=(0,q.useState)([]),r=(0,q.useRef)(1),i=(0,q.useCallback)((e,t)=>{let i=r.current++;n(n=>[...n,{id:i,kind:e,message:t}]),setTimeout(()=>n(e=>e.filter(e=>e.id!==i)),4e3)},[]),a=(0,q.useMemo)(()=>({success:e=>i(`success`,e),error:e=>i(`error`,e)}),[i]);return(0,J.jsxs)(Ir.Provider,{value:a,children:[e,(0,J.jsx)(`div`,{role:`status`,"aria-live":`polite`,className:`fixed right-4 bottom-4 z-50 flex flex-col gap-2`,children:t.map(Lr)})]})}function zr(){let e=(0,q.useContext)(Ir);if(!e)throw Error(`ToastProvider is missing`);return e}var Br=(0,q.createContext)(null),Vr=(0,q.createContext)(null);function Hr(){let e=(0,q.useContext)(Vr);if(!e)throw Error(`ExtensionsContext is missing`);return e}function Ur(){let e=(0,q.useContext)(Br);if(!e)throw Error(`ClientContext is missing`);return e}function Wr(){return new xr({defaultOptions:{queries:{retry:!1},mutations:{retry:!1}}})}function Gr({client:e,queryClient:t,extensions:n,children:r}){return(0,J.jsx)(Br.Provider,{value:e,children:(0,J.jsx)(Vr.Provider,{value:n,children:(0,J.jsx)(Cn,{client:t,children:(0,J.jsx)(Rr,{children:(0,J.jsx)(Pr,{children:r})})})})})}export{_n as A,O as B,Kn as C,vn as D,Sn as E,nt as F,_ as G,ne as H,rt as I,f as J,u as K,Me as L,Ct as M,yt as N,bn as O,pt as P,je as R,In as S,Tn as T,k as U,ie as V,te as W,v as X,T as Y,h as Z,Z as _,zr as a,Vn as b,Dr as c,ur as d,dr as f,Xn as g,Zn as h,Hr as i,gn as j,yn as k,_r as l,Qn as m,Wr as n,Fr as o,$ as p,C as q,Ur as r,Mr as s,Gr as t,pr as u,kn as v,An as w,X as x,Y as y,ue as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=class extends Error{constructor(e={}){let t=e.response!==null&&typeof e.response==`object`?e.response:{},n=!!e.isAbort,r=typeof t.message==`string`&&t.message?t.message:n?`The request was aborted (most likely autocancelled).`:`Something went wrong.`;super(r),this.name=`HeybeError`,this.url=e.url??``,this.status=e.status??0,this.response=t,this.isAbort=n,this.cause=e.cause}};export{e as t};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BWaJ3C7D.js";import{a as t,o as n}from"./field-LSvWL6SU.js";var r=e(n(),1),i=t();function a(e){let t=e?.response;return typeof t?.message==`string`&&t.message?t.message:e instanceof Error&&e.message?e.message:`Something went wrong.`}function o(e){return e?.status===400?`Invalid filter. Check the syntax and field names.`:a(e)}function s(e,t=``){let n={};if(typeof e!=`object`||!e)return n;let r=e;if(typeof r.message==`string`&&t)return n[t]=r.message,n;for(let[e,i]of Object.entries(r))Object.assign(n,s(i,t?`${t}.${e}`:e));return n}var c=(0,r.createContext)(null),l=e=>e?.response?.data;function u({error:e,children:t}){let n=(0,r.useRef)(new Set),o=(0,r.useRef)(new Map),u=(0,r.useMemo)(()=>{let t=()=>n.current.forEach(e=>e());return{errors:e?s(l(e)):{},message:e?a(e):``,claimed:()=>new Set(o.current.keys()),subscribe(e){return n.current.add(e),()=>n.current.delete(e)},claim(e){o.current.set(e,(o.current.get(e)??0)+1),t()},release(e){let n=(o.current.get(e)??1)-1;n<=0?o.current.delete(e):o.current.set(e,n),t()}}},[e]);return(0,i.jsx)(c.Provider,{value:u,children:t})}function d(e){let t=(0,r.useContext)(c);return(0,r.useLayoutEffect)(()=>(t?.claim(e),()=>t?.release(e)),[t,e]),t?.errors[e]}function f(){let e=(0,r.useContext)(c),[,t]=(0,r.useState)(0),n=!!e?.message;if((0,r.useLayoutEffect)(()=>{if(!e||!n)return;let r=()=>t(e=>e+1);return r(),e.subscribe(r)},[e,n]),!e||!e.message)return null;let a=e.claimed(),o=Object.entries(e.errors).filter(([e])=>!a.has(e));return o.length===0&&Object.keys(e.errors).length>0?null:(0,i.jsxs)(`div`,{role:`alert`,className:`rounded border border-danger/40 bg-danger/10 p-3 text-sm text-danger-text`,children:[(0,i.jsx)(`p`,{children:e.message}),o.length>0&&(0,i.jsx)(`ul`,{className:`mt-1 list-disc pl-5`,children:o.map(([e,t])=>(0,i.jsxs)(`li`,{children:[e,`: `,t]},e))})]})}function p(e,t=!0){let n=(0,r.useContext)(c),i=Object.entries(n?.errors??{}).filter(([t])=>t.startsWith(e)),a=t?i.map(([e])=>e).join(`
|
|
2
|
+
`):``;return(0,r.useLayoutEffect)(()=>{if(!n||!a)return;let e=a.split(`
|
|
3
|
+
`);return e.forEach(e=>n.claim(e)),()=>e.forEach(e=>n.release(e))},[n,a]),i}export{s as a,d as c,o as i,f as n,l as o,a as r,p as s,u as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,t}from"./rolldown-runtime-BWaJ3C7D.js";var n=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var j=/\/+/g;function M(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function N(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function P(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,P(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+M(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(j,`$&/`)+`/`),P(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(j,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+M(a,u),c+=P(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+M(a,u++),c+=P(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return P(N(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function F(e,t,n){if(e==null)return e;var r=[],i=0;return P(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function I(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var L=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function R(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,L)}catch(e){L(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function z(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else R(z.bind(null,e))}var B={map:F,forEach:function(e,t,n){F(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return F(e,function(){t++}),t},toArray:function(e){return F(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=B,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=z,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return D(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)E.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=k,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:I}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=R,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.1`})),r=t(((e,t)=>{t.exports=n()})),i=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),a=t(((e,t)=>{t.exports=i()})),o=a();function s({errorId:e,hintId:t,error:n,hint:r}){return(0,o.jsxs)(o.Fragment,{children:[r&&(0,o.jsx)(`p`,{id:t,className:`text-xs text-muted`,children:r}),n&&(0,o.jsx)(`p`,{id:e,className:`text-xs text-danger-text`,children:n})]})}function c({id:e,errorId:t,hintId:n,label:r,error:i,hint:a,hideLabel:c,children:l}){return(0,o.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,o.jsx)(`label`,{htmlFor:e,className:c?`sr-only`:`text-sm font-medium text-text`,children:r}),l,(0,o.jsx)(s,{errorId:t,hintId:n,error:i,hint:a})]})}var l=e(r(),1);function u({error:e,hint:t}){let n=(0,l.useId)(),r=`${n}-error`,i=`${n}-hint`,a=[t?i:``,e?r:``].filter(Boolean).join(` `)||void 0;return{id:n,errorId:r,hintId:i,aria:{id:n,"aria-invalid":e?!0:void 0,"aria-describedby":a}}}var d=`h-9 w-full rounded-control border border-field-line bg-field px-2.5 text-sm text-text placeholder:text-faint focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:outline-focus aria-[invalid=true]:border-danger disabled:opacity-50`;export{a,c as i,u as n,r as o,s as r,d as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=0,t=()=>`f${++e}`,n=[{type:`text`,label:`Plain text`},{type:`editor`,label:`Rich editor`},{type:`number`,label:`Number`},{type:`bool`,label:`Bool`},{type:`email`,label:`Email`},{type:`url`,label:`URL`},{type:`date`,label:`Date`},{type:`autodate`,label:`Autodate`},{type:`select`,label:`Select`},{type:`file`,label:`File`},{type:`relation`,label:`Relation`},{type:`json`,label:`JSON`},{type:`geoPoint`,label:`Geo point`},{type:`password`,label:`Password`}],r=()=>({exceptDomains:[],onlyDomains:[]}),i={text:()=>({autogeneratePattern:``,max:0,min:0,pattern:``,primaryKey:!1}),number:()=>({max:null,min:null,onlyInt:!1}),bool:()=>({}),email:r,url:r,date:()=>({max:``,min:``}),autodate:()=>({onCreate:!1,onUpdate:!1}),select:()=>({maxSelect:0,values:[]}),json:()=>({maxSize:0}),relation:()=>({cascadeDelete:!1,collectionId:``,maxSelect:0,minSelect:0}),file:()=>({maxSelect:0,maxSize:0,mimeTypes:[],protected:!1,thumbs:[]}),editor:()=>({maxSize:0,convertURLs:!1}),geoPoint:()=>({}),password:()=>({cost:0,max:0,min:0,pattern:``})};function a(e){return n.find(t=>t.type===e)?.label??e}function o(e){return{_key:t(),name:``,type:e,system:!1,hidden:!1,presentable:!1,...e===`autodate`?{}:{help:``,required:!1},...i[e]()}}export{t as i,o as n,a as r,n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,t}from"./rolldown-runtime-BWaJ3C7D.js";import{a as n,o as r}from"./field-LSvWL6SU.js";var i=t((e=>{var t=r();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function i(){}var a={d:{f:i,r:function(){throw Error(n(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`),s=Symbol.for(`react.recoverable`),c=Symbol.for(`react.optimistic_key`);function l(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:r===c?c:``+r,children:e,containerInfo:t,implementation:n}}var u=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.browser=function(e){return{$$typeof:s,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return l(e,t,null,r)},e.flushSync=function(e){var t=u.T,n=a.p;try{if(u.T=null,a.p=2,e)return e()}finally{u.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=d(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??a.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=d(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else a.d.m(e)}},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return u.H.useFormState(e,t,n)},e.useFormStatus=function(){return u.H.useHostTransitionStatus()},e.version=`19.3.1`})),a=t(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=i()})),o=Array.isArray,s=e=>{if(!e&&e!==0&&e!==0n)return``;if(typeof e==`string`)return e;if(typeof e==`number`)return e===e?``+e:``;if(typeof e==`bigint`)return``+e;let t=``;if(o(e)){let n=e.length;for(let r=0;r<n;r++){let n=e[r];if(!n&&n!==0&&n!==0n)continue;let i=typeof n==`string`?n:s(n);i&&(t&&(t+=` `),t+=i)}return t}if(typeof e==`object`)for(let n in e)e[n]&&(t&&(t+=` `),t+=n);return t},c=/\s+/g,l=Array.isArray,u=e=>typeof e!=`string`||!e?e:e.replace(c,` `).trim(),d=/ {2}|[\t-\r\u00a0]/,f=e=>{let t=e.length;return t===0?!1:e.charCodeAt(0)===32||e.charCodeAt(t-1)===32||d.test(e)},p=e=>f(e)?u(e):e,m=function(){let e=arguments.length,t=``,n=0;for(;n<e;n++){let e=arguments[n];if(e||e===0||e===0n){if(typeof e!=`string`)break;t&&(t+=` `),t+=e}}for(;n<e;n++){let e=arguments[n];if(!e&&e!==0&&e!==0n)continue;let r=typeof e==`string`?e:s(e);r&&(t&&(t+=` `),t+=r)}return t?f(t)?u(t):t:``},h=e=>e===!1?`false`:e===!0?`true`:e===0?`0`:e,g=e=>{if(!e||typeof e!=`object`)return!0;for(let t in e)return!1;return!0},_=(e,t)=>{let n=e;for(let e in t)if(Object.hasOwn(t,e)){let r=t[e];n[e]=e in n?m(n[e],r):r}return e},v=(e,t)=>{for(let n=0;n<e.length;n++){let r=e[n];l(r)?v(r,t):r&&t.push(r)}},y=(...e)=>{let t=[];return v(e,t),t},b=e=>typeof e==`object`&&!!e&&!l(e),x=(e,t)=>{let n=e,r=t,i={};for(let e in n){let t=n[e];if(e in r){let n=r[e];i[e]=l(t)||l(n)?y(n,t):b(t)&&b(n)?x(t,n):b(t)&&typeof n==`string`?x(t,{base:n}):typeof t==`string`&&b(n)?x({base:t},n):n+` `+t}else i[e]=t}for(let e in r)e in n||(i[e]=r[e]);return i},S={twMerge:!0,twMergeConfig:{}},C=256,w=Symbol(`tv-cache-miss`),ee=e=>e?.class!=null&&e.class!==``||e?.className!=null&&e.className!==``,T=Symbol(`tv-non-finite`),E=(e,t)=>{if(typeof t==`number`&&!Number.isFinite(t))throw T;return t},D=e=>{if(e===void 0)return``;if(e===null)return`null`;let t=typeof e;if(t===`string`)return e;if(t===`boolean`)return e?`true`:`false`;if(t===`number`||t===`bigint`)return String(e);if(t===`object`)try{return JSON.stringify(e,E)}catch{return null}return null},O=0,k=1,te=2,ne=0,re=1,A=2,j=3,M=0,N=1,P=2,F=e=>{let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null},ie=e=>typeof e==`number`&&!Number.isFinite(e),ae=(e,t,n)=>{try{return e.kinds[t]=j,e.tokens[t]=JSON.stringify(n,E),!0}catch{return!1}},I=(e,t,n)=>{if(typeof n!=`object`||!n)return e.kinds[t]=ne,e.tokens[t]=n,!0;if(Array.isArray(n)){for(let r=0;r<n.length;r++){let i=n[r];if(typeof i==`object`&&i)return ae(e,t,n);if(ie(i))return!1}return e.kinds[t]=re,e.tokens[t]=n.slice(),!0}if(F(n)){let r=[];for(let i in n){let a=n[i];if(ie(a))return!1;if(typeof a==`object`&&a)return ae(e,t,n);if(typeof a==`bigint`)return!1;r.push(i,a)}return e.kinds[t]=A,e.tokens[t]=r,!0}return ae(e,t,n)},L=(e,t,n)=>{if(e===ne)return Object.is(t,n)?M:N;if(typeof n!=`object`||!n)return N;if(e===re){let e=t;if(!Array.isArray(n)||n.length!==e.length)return N;for(let t=0;t<e.length;t++)if(!Object.is(e[t],n[t]))return N;return M}if(e===A){if(Array.isArray(n)||!F(n))return N;let e=t,r=0;for(let t in n){if(r>=e.length||e[r]!==t||!Object.is(e[r+1],n[t]))return N;r+=2}return r===e.length?M:N}try{return JSON.stringify(n,E)===t?M:N}catch{return P}},R=e=>Array.isArray(e)?e:void 0,oe=(e,t,n)=>{let r=R(n);e.kinds[t]=r===void 0?ne:re,e.tokens[t]=r===void 0?void 0:r.slice()},se=(e,t,n)=>{let r=0;for(let n=0;n<t.length;n++){let{conditionKeys:i,source:a}=t[n];for(let t=0;t<i.length;t++)if(!I(e,r++,a[i[t]]))return!1;if(!I(e,r++,a.class)||!I(e,r++,a.className))return!1}for(let t=0;t<n.length;t++){let{conditionKeys:i,source:a}=n[t];for(let t=0;t<i.length;t++)if(!I(e,r++,a[i[t]]))return!1;if(oe(e,r++,a.slots),!I(e,r++,a.class)||!I(e,r++,a.className))return!1}return e.kinds.length=r,e.tokens.length=r,!0},ce=({kinds:e,tokens:t},n,r)=>{let i=e.length,a=0,o;for(let r=0;r<n.length;r++){let{conditionKeys:s,source:c}=n[r];if(a+s.length+2>i)return N;for(let n=0;n<s.length;n++,a++)if(o=L(e[a],t[a],c[s[n]]),o!==M)return o;if(o=L(e[a],t[a],c.class),o!==M||(a++,o=L(e[a],t[a],c.className),o!==M))return o;a++}for(let n=0;n<r.length;n++){let{conditionKeys:s,source:c}=r[n];if(a+s.length+3>i)return N;for(let n=0;n<s.length;n++,a++)if(o=L(e[a],t[a],c[s[n]]),o!==M)return o;if(o=L(e[a],t[a],R(c.slots)),o!==M||(a++,o=L(e[a],t[a],c.class),o!==M)||(a++,o=L(e[a],t[a],c.className),o!==M))return o;a++}return a===i?M:N},z=()=>{let e=null;return(t,n)=>{if(e!==null){let r=ce(e,t,n);if(r===M)return O;if(r===P)return e=null,te}let r={kinds:[],tokens:[]};return se(r,t,n)?(e=r,k):(e=null,te)}},B=Symbol(`tv-uncacheable`),le=()=>({children:new Map,hasLeaf:!1,leaf:void 0}),V=(e,t,n,r)=>{let i=t[e];return n&&n[e]!==void 0&&(i=n[e]),r&&r[e]!==void 0&&(i=r[e]),i},ue=(e,t,n)=>{let r=e.children.get(t);if(!r){if(!n)return;r=le(),e.children.set(t,r)}return r},de=(e,t=C)=>{let n=le(),r=null,i=0,a=Object.create(null);for(let t=0;t<e.length;t++)a[e[t]]=1;let o=(e,t,n)=>{let r=null,i=null;for(let t in e)t===`class`||t===`className`||a[t]||((i??=Object.create(null))[t]=1,(r??=[]).push(t));if(t)for(let e in t)e===`class`||e===`className`||a[e]||i?.[e]||t[e]===void 0||((i??=Object.create(null))[e]=1,(r??=[]).push(e));if(n)for(let e in n)e===`class`||e===`className`||a[e]||i?.[e]||n[e]===void 0||((i??=Object.create(null))[e]=1,(r??=[]).push(e));return r&&r.length>1&&r.sort(),r},s=(t,n,r,i,a,o)=>{let s=t;for(let t=0;t<e.length;t++){let a=D(V(e[t],n,r,i));if(a===null)return B;if(s=ue(s,a,o),!s)return}if(a)for(let e=0;e<a.length;e++){let t=a[e],c=D(V(t,n,r,i));if(c===null)return B;if(s=ue(s,t+`\0`+c,o),!s)return}return s};return{get(e,t,a){let c=o(e,t,a),l=s(n,e,t,a,c,!1);if(l===B)return B;if(l&&l.hasLeaf)return l.leaf;if(r){let o=s(r,e,t,a,c,!1);if(o===B)return B;if(o&&o.hasLeaf){let r=s(n,e,t,a,c,!0);return r!==B&&r&&(r.hasLeaf||i++,r.hasLeaf=!0,r.leaf=o.leaf),o.leaf}}return w},set(e,a,c,l){i>=t&&(r=n,n=le(),i=0);let u=o(e,a,c),d=s(n,e,a,c,u,!0);d!==B&&d&&(d.hasLeaf||i++,d.hasLeaf=!0,d.leaf=l)},clear(){n=le(),r=null,i=0}}},fe=e=>(t,n)=>ee(n)?e.override(t,n.class,n.className):t,pe=()=>({base:void 0,variants:{},defaultVariants:{},slots:{},compoundVariants:[],compoundSlots:[]}),me=e=>({base:e.base,variants:e.variants??{},defaultVariants:e.defaultVariants??{},slots:e.slots??{},compoundVariants:e.compoundVariants??[],compoundSlots:e.compoundSlots??[]}),he=(e,t)=>{let n=e.base!=null||t.base!=null?m(e.base,t.base):void 0,r=g(t.variants)?e.variants:g(e.variants)?t.variants:x(t.variants,e.variants),i=g(t.defaultVariants)?e.defaultVariants:{...e.defaultVariants,...t.defaultVariants},a=g(e.slots),o=g(t.slots),s;s=a&&o?{}:a?e.base==null?{...t.slots}:_({base:e.base},{...t.slots}):o?t.base==null?{...e.slots}:_({...e.slots},{base:t.base}):_({...e.slots},t.slots);let c=g(t.compoundVariants)?e.compoundVariants:g(e.compoundVariants)?t.compoundVariants:y(e.compoundVariants,t.compoundVariants),l=g(t.compoundSlots)?e.compoundSlots:g(e.compoundSlots)?t.compoundSlots:y(e.compoundSlots,t.compoundSlots);return{base:n,variants:r,defaultVariants:i,slots:s,compoundVariants:c,compoundSlots:l}},ge=e=>{let t=pe();for(let n=0;n<e.length;n++)t=he(t,me(e[n]));return t},H=e=>e?p(s(e)):``,_e=e=>{let t=H(e.class),n=H(e.className);return t?n?t+` `+n:t:n},ve=(e,t,n)=>{if(!n)return;let r=e[t];e[t]=r?r+` `+n:n},ye=e=>{let t={},n=[e.class,e.className];for(let e=0;e<n.length;e++){let r=n[e];if(typeof r==`string`||Array.isArray(r))ve(t,`base`,H(r));else if(r&&typeof r==`object`)for(let e in r)ve(t,e,H(r[e]))}return t},be=(e,t)=>{let n=[];for(let r=0;r<t.length;r++){let i=t[r],a=e[i];n.push({key:i,values:a,isEmpty:g(a),normalizedFrom:null,normalized:null})}return n},xe=(e,t,n,r)=>{let i;if(!r||typeof n==`string`||Array.isArray(n))i=H(n);else if(n&&typeof n==`object`){let e={};for(let t in n){let r=H(n[t]);r&&(e[t]=r)}i=e}else i=``;return(e.normalizedFrom??={})[t]=n,(e.normalized??={})[t]=i,i},Se=(e,t)=>{for(let t=0;t<e.length;t++)e[t].classes=null,e[t].slotClasses=null;for(let e=0;e<t.length;e++)t[e].classes=null},Ce=e=>{if(!Array.isArray(e)||e.length===0)return[];let t=[];for(let n=0;n<e.length;n++){let r=e[n],i=[];for(let e in r)e!==`class`&&e!==`className`&&i.push(e);t.push({conditionKeys:i,source:r,classes:null,slotClasses:null})}return t},we=e=>{if(!Array.isArray(e)||e.length===0)return[];let t=[];for(let n=0;n<e.length;n++){let r=e[n],i=[];for(let e in r)e!==`slots`&&e!==`class`&&e!==`className`&&i.push(e);t.push({conditionKeys:i,source:r,classes:null})}return t},Te=e=>{let t={};for(let n=0;n<e.length;n++){let r=e[n],i=r.source.slots;if(Array.isArray(i))for(let e=0;e<i.length;e++){let n=i[e];t[n]||(t[n]=[]),t[n].push(r)}}return t},Ee=(e,t)=>{let{extend:n=null,base:r,slots:i,variants:a={},compoundVariants:o=[],compoundSlots:s=[],defaultVariants:c={}}=e,l=i!==void 0,u=l?i:{},d=n,f=null;if(Array.isArray(d)){let e=d.filter(Boolean);e.length===1?f=e[0]:e.length>1&&(f=ge(e))}else d!=null&&(f=d);let p={...S,...t},h=f?.base?m(f.base,r):r,v=f?.variants&&!g(f.variants)?x(a,f.variants):a,b=f?.defaultVariants&&!g(f.defaultVariants)?{...f.defaultVariants,...c}:c,C=!f?.slots||g(f.slots),w=l?C&&f?.base?m(r,f.base):typeof r==`string`||r==null?r:m(r):void 0,ee=l?{base:w,...u}:{},T=C?ee:_({...f?.slots},g(ee)?{base:r}:ee),E=!f?.compoundVariants||g(f.compoundVariants)?o:y(f?.compoundVariants,o),D=!f?.compoundSlots||g(f.compoundSlots)?s:y(f?.compoundSlots,s),O=Object.keys(v);return{config:p,extend:d,base:h,variants:v,defaultVariants:b,slots:T,compoundVariants:E,compoundSlots:D,compiledVariants:null,compiledCompoundVariants:null,compiledCompoundSlots:null,compiledCompoundSlotsBySlot:null,deferredError:E&&!Array.isArray(E)?TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof E}`):D&&!Array.isArray(D)?TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof D}`):null,mode:l||!C?`slots`:O.length===0?`plain`:`variants`,slotKeys:null,variantKeys:O}},De=e=>(e.compiledVariants===null&&(e.compiledVariants=be(e.variants,e.variantKeys),e.compiledCompoundVariants=Ce(e.compoundVariants),e.compiledCompoundSlots=we(e.compoundSlots),e.compiledCompoundSlotsBySlot=Te(e.compiledCompoundSlots),e.slotKeys=Object.keys(e.slots)),e),Oe=[],ke=[],Ae=(e,t,n,r)=>{let i=t[e];return n&&n[e]!==void 0&&(i=n[e]),r&&r[e]!==void 0&&(i=r[e]),i},je=e=>e==null||e===!1,Me=(e,t)=>{if(!Array.isArray(e))return e===t||je(e)&&je(t);for(let n=0;n<e.length;n++){let r=e[n];if(r===t||je(r)&&je(t))return!0}return!1},Ne=(e,t)=>`${h(e[t])||`false`}`,Pe=(e,t,n,r,i)=>{if(e.isEmpty)return``;let a=r?.[e.key]??n?.[e.key];if(a===null)return``;let o=h(a);if(typeof o==`object`)return``;let s=t?.[e.key],c=(o??h(s))||`false`,l=e.values[c];if(!l)return``;if(typeof l==`string`)return l;let u=e.normalizedFrom;return u!==null&&u[c]===l?e.normalized[c]:xe(e,c,l,i)},Fe=(e,t)=>typeof e==`string`?t===`base`?e:``:e[t]??``,U=(e,t,n,r)=>{let{conditionKeys:i,source:a}=e;for(let e=0;e<i.length;e++){let o=i[e];if(!Me(a[o],Ae(o,t,n,r)))return!1}return!0},Ie=(e,t,n,r,i,a)=>{for(let o=0;o<n.length;o++){let s=n[o],c=Pe(s,r,i,void 0,!1);c&&(e[t++]=c,a&&(a[s.key]=c))}return t},Le=(e,t,n,r,i,a,o,s)=>{for(let c=0;c<r.length;c++){let l=r[c],u=Fe(Pe(l,i,a,o,!0),n);u&&(e[t++]=u,s&&(s[l.key]=u))}return t},Re=(e,t,n,r,i)=>{for(let a=0;a<n.length;a++){let o=n[a],s=o.classes;s!==``&&U(o,r,i)&&(s===null&&(s=o.classes=_e(o.source)),s&&(e[t++]=s))}return t},ze=(e,t,n,r,i,a,o)=>{for(let s=0;s<r.length;s++){let c=r[s],l=c.slotClasses;if(l!==null&&!l[n]||!U(c,i,a,o))continue;l===null&&(l=c.slotClasses=ye(c.source));let u=l[n];u&&(e[t++]=u)}return t},Be=(e,t,n,r,i,a)=>{for(let o=0;o<n.length;o++){let s=n[o],c=s.classes;c!==``&&U(s,r,i,a)&&(c===null&&(c=s.classes=_e(s.source)),c&&(e[t++]=c))}return t},Ve=0,W=1,He=2,Ue=(e,t)=>{let n=Object.create(null);for(let t=0;t<e.length;t++){let r=e[t].conditionKeys;for(let e=0;e<r.length;e++)n[r[e]]=1}for(let e=0;e<t.length;e++){let r=t[e].conditionKeys;for(let e=0;e<r.length;e++)n[r[e]]=1}return n},We=(e,t,n,r)=>{let i=W;for(let a in e){let o=e[a];if(a===`class`||a===`className`){o!=null&&o!==``&&(i=He);continue}if(o===void 0)continue;if(t[a]===void 0){if(r()[a])return Ve;continue}let s=n[a];if(o===s)continue;if(o===null)return Ve;let c=typeof o;if(c===typeof s&&(c===`string`||c===`boolean`)&&o!==``&&s!==``)return Ve;let l=h(o);if(typeof l==`object`||`${l||`false`}`!==Ne(n,a))return Ve}return i},Ge=()=>({defaults:[],optionKeys:[],options:[]}),Ke=(e,t,n)=>{for(let r=0;r<e.length;r++){let i=e[r],a=Ne(t,i.key);n.defaults[r]=t[i.key],n.optionKeys[r]=a,n.options[r]=i.isEmpty?void 0:i.values[a]}},qe=(e,t,n)=>{for(let r=0;r<e.length;r++){let i=e[r];if(t[i.key]!==n.defaults[r]||!i.isEmpty&&i.values[n.optionKeys[r]]!==n.options[r])return!1}return!0},Je=(e,t)=>{let{base:n,deferredError:r}=e,i=w,a=fe(t);return(e=>{if(r)throw r;if(i===w){let e=H(n);ke[0]=e,i=t.parts(ke,+!!e)}return a(i,e)})},Ye=(e,t)=>{let{base:n,defaultVariants:r,deferredError:i,variantKeys:a,variants:o}=e,s=e.compiledCompoundVariants,c=e.compiledVariants,l=Oe,u=``,d=!1,f=null,p=null,m=null,h=fe(t),g=1,_=null,v=null,y=()=>{(c===null||s===null)&&(De(e),c=e.compiledVariants,s=e.compiledCompoundVariants,l=e.compiledCompoundSlots??Oe,u=H(n),d=s.length>0||l.length>0)},b=()=>f??=Ue(s,l),x=e=>{let n=ke,i=0;return u&&(n[i++]=u),i=Ie(n,i,c,r,e),s.length>0&&(i=Re(n,i,s,r,e)),t.parts(n,i)},S=()=>{let e=(m??=z())(s,l);return e===O||(Se(s,l),e!==te&&(p=null,_=null,!0))},C=()=>(_!==null&&qe(c,r,v)||(_=x(void 0),Ke(c,r,v??=Ge())),_);return(e=>{if(i)throw i;y();let t=e==null?W:We(e,o,r,b);if(t!==Ve){let n;return d?g>0?(g=0,n=x(e)):n=S()?C():x(e):(g=0,n=C()),t===He?h(n,e):n}let n;if(g>0)g--,n=x(e);else if(d&&!S())n=x(e);else{p??=de(a);let t=p.get(r,e);t===B?n=x(e):t===w?(n=x(e),p.set(r,e,void 0,n)):n=t}return h(n,e)})},Xe=(e,t)=>{let{defaultVariants:n,deferredError:r,slots:i,variantKeys:a,variants:o}=e,s=null,c=null,l=null,u=null,d=null,f=!1,p=null,m=null,h=null,g=null,_=1,v=null,y=null,b=null,x=()=>{if(u!==null)return;(e.compiledVariants===null||e.compiledCompoundVariants===null||e.compiledCompoundSlots===null||e.compiledCompoundSlotsBySlot===null||e.slotKeys===null)&&De(e),s=e.compiledVariants,c=e.compiledCompoundVariants,l=e.compiledCompoundSlots;let r=e.compiledCompoundSlotsBySlot;u=e.slotKeys,f=c.length>0||l.length>0,m=fe(t);let a=Array(u.length);for(let e=0;e<u.length;e++){let o=u[e],l=r[o]??Oe,d,p=``;a[e]=(e,r)=>{let a=ke,u=0,m=i[o];return m!==d&&(d=m,p=H(m)),p&&(a[u++]=p),u=Le(a,u,o,s,n,e,r),f&&(u=ze(a,u,o,c,n,e,r),u=Be(a,u,l,n,e,r)),t.parts(a,u)}}d=a},S=e=>{let t=u,n=d,r=m,i={};for(let a=0;a<t.length;a++){let o=n[a],s=o(e,void 0);i[t[a]]=t=>{if(t==null)return s;let n=!1;for(let e in t)if(e!==`class`&&e!==`className`&&t[e]!==void 0){n=!0;break}return r(n?o(e,t):s,t)}}return i},C=()=>{let e=(g??=z())(c,l);return e===O||(Se(c,l),e!==te&&(h=null,v=null,!0))},ee=()=>p??=Ue(c,l),T=()=>{if(!qe(s,n,y))return!1;let e=u,t=b;for(let n=0;n<e.length;n++)if(i[e[n]]!==t[n])return!1;return!0},E=()=>{if(v===null||!T()){v=S(void 0),Ke(s,n,y??=Ge());let e=u,t=b??=[];for(let n=0;n<e.length;n++)t[n]=i[e[n]]}return v};return(e=>{if(r)throw r;if(x(),(e==null?W:We(e,o,n,ee))!==Ve)return f?_>0?(_=0,S(e)):C()?E():S(e):(_=0,E());if(_>0)return _--,S(e);if(f&&!C())return S(e);h??=de(a);let t=h.get(n,e);if(t===B)return S(e);if(t!==w)return t;let i=S(e);return h.set(n,e,void 0,i),i})},Ze=(e,t)=>{if(e.mode===`plain`)return Je(e,t);let n;return(r=>(n??=e.mode===`slots`?Xe(e,t):Ye(e,t),n(r)))},Qe=(e,t)=>{let n={...e,...t};return e.twMergeConfig&&t.twMergeConfig&&(n.twMergeConfig={...e.twMergeConfig,...t.twMergeConfig}),n},$e=(e,t)=>{e.variantKeys=t.variantKeys,e.extend=t.extend,e.base=t.base,e.slots=t.slots,e.variants=t.variants,e.defaultVariants=t.defaultVariants,e.compoundSlots=t.compoundSlots,e.compoundVariants=t.compoundVariants},G=(e,t)=>{let n=(n,r)=>{let i=Ee(n,r),a=Ze(i,e(i.config));return $e(a,i),t?t(a,i,$e):a};return{tv:n,createTV:e=>(t,r)=>n(t,r&&e?Qe(e,r):r??e)}},et=`line`in Error(),K=-1,tt=-1,nt=(e,t,n)=>{let r=2166136261;for(let i=t;i<n;i++)r=Math.imul(r^e.charCodeAt(i),16777619);return r},rt=(e,t,n)=>{let r=n-t,i=Math.imul(r,2654435761)^e.charCodeAt(t);if(r>3){let a=r>>2,o=r>>1;i=Math.imul(i^e.charCodeAt(t+1)<<8^e.charCodeAt(t+2)<<16^e.charCodeAt(t+a),2246822507),i=Math.imul(i^e.charCodeAt(t+o)<<8^e.charCodeAt(t+o+a)<<16^e.charCodeAt(n-3),3266489909),i^=e.charCodeAt(n-2)<<8^e.charCodeAt(n-1)<<16;for(let r=t+3,a=n-4;r<t+8&&r<a;r++,a--)i=Math.imul(i^e.charCodeAt(r)^e.charCodeAt(a)<<8,16777619)}return i^i>>>15},it=(e,t,n={})=>{let{GROUP_COUNT:r,edgeStart:i,labelStart:a,labelText:o,edgeTarget:s,nodeGroup:c,nodeVlist:l,vlistPat:u,vlistOps:d,vlistRef:f,vlistGroup:p,litAnchor:m,litGroup:h,litPool:g,poolOffsets:_,poolText:v,adjGid:y,adjStart:b,adjTgt:x,patGid:S,patTgt:C,postfixLookupGroups:w,customValidatorNames:ee,orderSensitiveModifiers:T}=e,E=new Int32Array(r).fill(-1);for(let e=0;e<y.length;e++)E[y[e]]=e;let D=0;for(let e=0;e+1<b.length;e++){let t=b[e+1]-b[e];t>D&&(D=t)}let O=32;for(;O<2*(1+D+S.length);)O<<=1;let k=new Int32Array(f.length+1);for(let e=0;e<f.length;e++)k[e+1]=k[e]+u[f[e]+1]-u[f[e]];let te=new Uint8Array(r);for(let e=0;e<w.length;e++)te[w[e]]=1;let ne=i.length-1,re=new Uint8Array(ne),A=0,j=!0;for(let e=0;e<m.length;e++){re[m[e]]=1;let t=_[g[e]*2+1];t>A&&(A=t);let n=v.charCodeAt(_[g[e]*2]);(n===91||n===40)&&(j=!1)}let M=1;for(;M<m.length*2;)M<<=1;let N=new Int32Array(M).fill(-1);for(let e=0;e<m.length;e++){let t=_[g[e]*2],n=(nt(v,t,t+_[g[e]*2+1])^Math.imul(m[e],2654435761)|0)&M-1;for(;N[n]!==-1;)n=n+1&M-1;N[n]=e}let P=(e,t,n,r)=>{let i=(nt(t,n,r)^Math.imul(e,2654435761)|0)&M-1,a=r-n;for(;;){let r=N[i];if(r===-1)return-1;if(m[r]===e&&_[g[r]*2+1]===a){let e=_[g[r]*2],i=!0;for(let r=0;r<a;r++)if(v.charCodeAt(e+r)!==t.charCodeAt(n+r)){i=!1;break}if(i)return h[r]}i=i+1&M-1}},F=n.cacheSize??8192,ie=n.prefix??e.prefix??``,ae=ie===``?``:ie+`:`,I=ae.length,L=(ee??[]).map(e=>{let n=t&&t[e];if(!n)throw Error(`cn: missing validator `+e);return n}),R=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,oe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,se=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ce=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,z=0,B=-1,le=-1,V=-1,ue=-1,de=e=>e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||e===95,fe=e=>/\s/.test(String.fromCharCode(e)),pe=(e,t,n)=>{if(z=0,B=-1,n-t<3)return;let r=e.charCodeAt(t),i=e.charCodeAt(n-1);if(r===91&&i===93)z=1;else if(r===40&&i===41)z=2;else return;V=t+1,ue=n-1;let a=t+1;if(de(e.charCodeAt(a))){for(a++;a<n-1;){let t=e.charCodeAt(a);if(!de(t)&&t!==45)break;a++}a<n-2&&e.charCodeAt(a)===58&&(B=t+1,le=a,V=a+1)}},me=(e,t,n,r)=>{if(n-t!==r.length)return!1;for(let n=0;n<r.length;n++)if(e.charCodeAt(t+n)!==r.charCodeAt(n))return!1;return!0},he=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ge=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,H=e=>!!e&&!Number.isNaN(Number(e)),_e=(e,t,n)=>{if(n-t<11||!me(e,t,t+10,`@container`))return!1;if(e.charCodeAt(t+10)===47)return n-t>=12;let r=e.charCodeAt(t+11);return r===115&&n-t>=17&&me(e,t+10,t+16,`-size/`)||r===110&&n-t>=19&&me(e,t+10,t+18,`-normal/`)},ve=[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2],ye=`length|number|number weight|family-name|position percentage|length size bg-size|image url|shadow|length|family-name|position percentage|length size bg-size|image url|shadow|number weight`.split(`|`).map(e=>e.split(` `)),be=[2,3,3,6,0,0,4,5,0,0,0,0,0,1,1],xe=(e,t,n,r)=>{if(e>=10){if(e>=25)return L[e-25](t.slice(n,r));let i=e-10;if(z!==ve[i])return!1;if(B>=0){for(let e of ye[i])if(me(t,B,le,e))return!0;return!1}switch(be[i]){case 0:return!1;case 1:return!0;case 2:{let e=t.slice(V,ue);return R.test(e)&&!oe.test(e)}case 3:return H(t.slice(V,ue));case 4:return ce.test(t.slice(V,ue));case 5:return se.test(t.slice(V,ue));default:return!H(t.slice(V,ue))}}switch(e){case 0:return!0;case 1:return z===0;case 2:return z===1;case 3:return z===2;case 4:return he.test(t.slice(n,r));case 5:return H(t.slice(n,r));case 6:{let e=t.slice(n,r);return!!e&&Number.isInteger(Number(e))}case 7:return r>n&&t.charCodeAt(r-1)===37&&H(t.slice(n,r-1));case 8:return ge.test(t.slice(n,r));default:return _e(t,n,r)}},Se=new Set(typeof T==`string`?T.split(` `):T),Ce=(e,t,n,r,i,a)=>{let o=nt(t,n,r)^(i?2654435769:0),s=e.get(o);if(s!==void 0)outer:for(let e=0;e<s.length;e++){let a=s[e];if(a.imp===i&&a.k.length===r-n){for(let e=0;e<a.k.length;e++)if(a.k.charCodeAt(e)!==t.charCodeAt(n+e))continue outer;return a.id}}else e.set(o,s=[]);let c=t.slice(n,r),l=a(c);return s.push({k:c,imp:i,id:l}),l},we=new Map,Te=new Map,Ee=2,De=4096,Oe=(e,t)=>{let n=[],r=0,i=0,a=0;for(let t=0;t<e.length;t++){let o=e.charCodeAt(t);r===0&&i===0&&o===58?(n.push(e.slice(a,t)),a=t+1):o===91?r++:o===93?r--:o===40?i++:o===41&&i--}n.push(e.slice(a));let o=n[0];if(n.length>1){let e=[],t=[];for(let r of n)r.charCodeAt(0)===91||Se.has(r)?(t.length&&(e.push(...t.sort()),t=[]),e.push(r)):t.push(r);t.length&&e.push(...t.sort()),o=e.join(`:`)}let s=t?o+` !`:o,c=Te.get(s);return c===void 0&&Te.set(s,c=Ee++),c},ke=new Map,Ae=r,je=r+4096,Me=()=>Ae++,Ne=2097152,Pe=8192,Fe=new Int32Array(Pe),U=Array(Pe).fill(null),Ie=new Int32Array(Pe),Le=new Int32Array(Pe),Re=new Uint8Array(Pe),ze=0,Be=(e,t,n,r,i,a,o,s)=>{let c=e;if(U[e]!==null){if(U[e|1]===null)c=e|1;else if(!(ze++&3))c=e|ze>>2&1;else return}U[c]=t.slice(n,r),Fe[c]=i,Ie[c]=a,Le[c]=o,Re[c]=s},Ve=()=>U.fill(null),W=256,He=[new Int32Array(W),new Int32Array(W),new Int32Array(W),new Int32Array(W)],[Ue,We,Ge,Ke]=He,qe=new Uint8Array(W),Je=new Uint8Array(W),Ye=()=>{W*=2,He=He.map(e=>{let t=new Int32Array(W);return t.set(e),t}),[Ue,We,Ge,Ke]=He;let e=new Uint8Array(W);e.set(qe),qe=e,Je=new Uint8Array(W)},Xe=64,Ze=new Int32Array(Xe),Qe=new Int32Array(Xe),$e=new Int32Array(r),G=2048,it=21,at=new Float64Array(G),ot=new Int32Array(G),q=0,ct=(e,t)=>{if(e===0&&t<r)return $e[t]===q?1:($e[t]=q,0);let n=e*2097152+t+1,i=Math.imul(n,2654435761)>>>it;for(;ot[i]===q;){if(at[i]===n)return 1;i=i+1&G-1}return at[i]=n,ot[i]=q,0},lt=(e,t,n,r,i)=>{if(n-t>=2&&e.charCodeAt(t)===91&&e.charCodeAt(n-1)===93){let r=-1;for(let i=t+1;i<n-1;i++)if(e.charCodeAt(i)===58){r=i;break}return r===-1||r===t+1?K:Ce(ke,e,t+1,r,0,Me)}if(r>=0&&c[r]>=0)return c[r];for(let t=i-1;t>=0;t--){let r=Qe[t];if(r>n)continue;let i=Ze[t],a=n-r;if(re[i]===1&&a>0&&a<=A){let t=e.charCodeAt(r);if(j===!1||t!==91&&t!==40){let t=P(i,e,r,n);if(t>=0)return t}}let o=l[i];if(o<0)continue;let s=f[o],c=u[s],m=u[s+1];if(c===m)continue;pe(e,r,n);let h=k[o]-c;for(let t=c;t<m;t++)if(xe(d[t],e,r,n))return p[h+t]}return K},ut=e=>{let t=e.length,n=0,c=0,u=!1;(Ee>De||we.size>De)&&(we=new Map,Te=new Map,Ee=2,Ve()),Ae>je&&(ke=new Map,Ae=r,Ve());let d=0;for(;d<t;){let f=e.charCodeAt(d);if(f===32||f>=9&&f<=13||f>=160&&fe(f)){f!==32&&(u=!0),d++;continue}let p=d,m=0;for(;d<t;){if(f=e.charCodeAt(d),f<=32){if(f===32)break;if(f>=9&&f<=13){u=!0;break}}else if(f>=160&&fe(f)){u=!0;break}m=Math.imul(m^f,16777619),d++}let h=d,g=h-p;n===W&&Ye();let _=n++;Ue[_]=p,We[_]=h,c+=g,m^=Math.imul(g,2654435761);let v=m^m>>>15,y=v&8190;{let t=-1;if(Fe[y]===v&&U[y]!==null&&U[y].length===g?t=y:Fe[y|1]===v&&U[y|1]!==null&&U[y|1].length===g&&(t=y|1),t>=0){let n=U[t],r=!0;for(let t=0;t<g;t++)if(n.charCodeAt(t)!==e.charCodeAt(p+t)){r=!1;break}if(r){Ge[_]=Ie[t],Ke[_]=Le[t],qe[_]=Re[t];continue}}}let b=p;if(I!==0){if(h-p<=I||!e.startsWith(ae,p)){Ge[_]=K,Be(y,e,p,h,v,K,0,0);continue}b=p+I}let x=0,S=0,C=-1,w=-1;for(let t=b;t<h;t++){let n=e.charCodeAt(t);if(x===0&&S===0){if(n===58){C=t;continue}if(n===47){w=t;continue}}n===91?x++:n===93?x--:n===40?S++:n===41&&S--}let ee=C>=b?C+1:b,T=ee,E=h,D=!1,O=0;E>T&&e.charCodeAt(E-1)===33?(D=!0,E--):E>T&&e.charCodeAt(T)===33&&(D=!0,T++,O=1);let k=-1;w>ee&&(k=w+O,k>=E&&(k=-1));let ne=T;E-T>1&&e.charCodeAt(T)===45&&(ne=T+1);let A=0,j=0,M=0,N=-1,P=0;(l[0]>=0||re[0]===1)&&(Ze[0]=0,Qe[0]=ne,P=1);let F=tt,ie=0;for(let t=ne;t<E;t++)if(t===k&&(F=j<M?tt:A,ie=P),A!==tt){let n=e.charCodeAt(t),r=-1;if(j<M)o.charCodeAt(j)===n?(j++,j===M&&(r=A=N)):A=tt;else{let e=i[A],t=i[A+1],c=tt;for(let i=e;i<t;i++){let e=a[i];if(o.charCodeAt(e)===n){a[i+1]-e===1?r=c=s[i]:(j=e+1,M=a[i+1],N=s[i],c=A);break}}A=c}if(r>=0&&(l[r]>=0||re[r]===1)&&t+1<E&&e.charCodeAt(t+1)===45){if(P===Xe){Xe*=2;let e=new Int32Array(Xe);e.set(Ze),Ze=e;let t=new Int32Array(Xe);t.set(Qe),Qe=t}Ze[P]=r,Qe[P]=t+2,P++}}k===E&&(F=j<M?tt:A,ie=P);let L=j<M?tt:A,R,oe=!1;if(k>=0){if(oe=!0,R=lt(e,T,k,F,ie),R!==K&&R<r&&te[R]){let t=lt(e,T,E,L,P);t!==K&&t!==R&&(R=t,oe=!1)}else R===K&&(R=lt(e,T,E,L,P),oe=!1)}else R=lt(e,T,E,L,P);let se=0,ce=0;R===K?Ge[_]=K:(ce=+!!oe,se=b>=C?+!!D:Ce(we,e,b,C,+!!D,e=>Oe(e,D)),Ge[_]=R,qe[_]=ce,Ke[_]=se),Be(y,e,p,h,v,R,se,ce)}if(n===0)return``;if(n===1)return Ue[0]===0&&We[0]===t?e:e.slice(Ue[0],We[0]);if(n*O>G){for(;n*O>G;)G<<=1,it--;at=new Float64Array(G),ot=new Int32Array(G)}if(Ee>=Ne||Ae>=Ne)throw Error(`cn: too many distinct classes in one merge`);q=q+1|0,q===0&&($e.fill(0),ot.fill(0),q=1);let f=!1;for(let e=n-1;e>=0;e--){let t=Ge[e];if(t===K){Je[e]=1;continue}let n=Ke[e];if(ct(n,t)===1)Je[e]=0,f=!0;else if(Je[e]=1,t<r){let r=E[t];if(r>=0)for(let e=b[r];e<b[r+1];e++)ct(n,x[e]);if(qe[e]&1)for(let e=0;e<S.length;e++)S[e]===t&&ct(n,C[e])}}if(!f&&!u&&t===c+n-1)return e;let p=``,m=0;for(;m<n;){if(!Je[m]){m++;continue}let t=Ue[m],r=We[m],i=m+1;for(;i<n&&Je[i]&&Ue[i]===r+1&&e.charCodeAt(r)===32;)r=We[i],i++;p.length>0&&(p+=` `),p+=e.slice(t,r),m=i}return p},J=16384,Y=new Int32Array(J*2),X=0,Z=1,Q=Object.create(null),dt=Object.create(null),ft=new Map,$=new Map,pt=0,mt=0,ht=()=>{X^=J,Z=Z+1|0,mt=0},gt=e=>{let t=Q[e];if(t!==void 0)return t;let n=rt(e,0,e.length),r=(n&16383)+X,i=Y[r]===(n^Z)||Y[r^J]===(n^Z-1);return i&&(t=dt[e],t!==void 0)?(Q[e]=t,t):(t=ut(e),i?(Q[e]=t,++pt>F&&(pt=0,dt=Q,Q=Object.create(null),ht())):(Y[r]=n^Z,++mt>J&&ht()),t)},_t=e=>{let t=ft.get(e);if(t!==void 0)return t;let n=rt(e,0,e.length),r=(n&16383)+X,i=Y[r]===(n^Z)||Y[r^J]===(n^Z-1);return i&&(t=$.get(e),t!==void 0)?(ft.set(e,t),t):(t=ut(e),i?(ft.set(e,t),++pt>F&&(pt=0,$=ft,ft=new Map,ht())):(Y[r]=n^Z,++mt>J&&ht()),t)},vt=e=>{let t=rt(e,0,e.length),n=(t&16383)+X;return Y[n]===(t^Z)||Y[n^J]===(t^Z-1)||(Y[n]=t^Z,++mt>J&&ht(),!1)},yt=F===0?ut:et?e=>{let t=ft.get(e);return t===void 0?_t(e):t}:gt;return{merge:function(){return arguments.length===1&&typeof arguments[0]==`string`?yt(arguments[0]):yt(st.apply(null,arguments))},mergeString:yt,seenBefore:F===0?()=>!1:vt,mergeUncached:ut}},at=(e,t)=>{if(!e)return``;if(typeof e==`string`)return e;let n=``;if(typeof e.length==`number`&&(!t||Array.isArray(e))){let r=e;for(let e=0;e<r.length;e++){let i=r[e];if(!i)continue;let a=typeof i==`string`?i:at(i,t);a&&(n&&(n+=` `),n+=a)}return n}if(t){if(typeof e==`number`)return``+e;if(typeof e==`object`)for(let t in e)e[t]&&(n&&(n+=` `),n+=t)}return n},ot=(e,t)=>{let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(!i)continue;let a=typeof i==`string`?i:at(i,t);a&&(n&&(n+=` `),n+=a)}return n},st=function(){return ot(arguments,!1)},q=256,ct=16,lt=1024,ut=4096,J=(e,t)=>{let n=t===void 0?()=>!0:t.seenBefore,r=t===void 0?e:t.mergeUncached,i=new Map,a=new Map,o=0,s=null,c=null,l=[],u=[],d=0,f=(t,n,r)=>{c===null&&(c=Array(ut).fill(``),l=Array(ut).fill(``),u=Array(ut).fill(``));let i=rt(t,0,t.length)&ut-2;if(c[i]===t&&l[i]===n)return u[i];if(c[i|1]===t&&l[i|1]===n)return u[i|1];let a=e(r?n+` `+t:t),o=c[i]===``?i:i|(c[i|1]===``?1:d++&1);return c[o]=t,l[o]=n,u[o]=a,a},p=(e,t,n,r)=>{let i=0;if(t){if(t!==e.a0)return!1;i=1}if(n){if(n!==(i===0?e.a0:e.a1))return!1;i++}if(r){if(r!==(i===0?e.a0:i===1?e.a1:e.a2))return!1;i++}return i===e.t},m=(e,t)=>{let n=e.a,r=0;for(let e=0;e<t.length;e++){let i=t[e];if(i){if(i!==n[r])return!1;r++}}return r===e.t},h=(t,c)=>{let l=t.length,u=s===null?null:s.n;if(!c){if(u!==null&&m(u,t))return s=u,u.r;if(s!==null&&s!==u&&m(s,t))return s.r}let d=``,p=-1,h=0,g=!1;for(let e=0;e<l;e++){let n=t[e];if(n){if(typeof n!=`string`){if(n=t[e]=at(n,!0),!n)continue;g=!0}p<0&&(d=n,p=e),h++}}if(h===0)return``;if(h===1)return e(d);if(g){if(u!==null&&m(u,t))return s=u,u.r;if(s!==null&&s!==u&&m(s,t))return s.r}let _=i.get(d);_===void 0&&(_=a.get(d),_!==void 0&&i.set(d,_));let v=null;if(_!==void 0){if(_.skip>0){_.skip--,s=null;let e=d;for(let n=p+1;n<l;n++){let r=t[n];r&&(e+=` `+r)}return f(e,``,!1)}let e=_.e;outer:for(let n=0;n<e.length;n++){let r=e[n];if(r.t!==h)continue;let i=r.a,a=1;for(let e=p+1;e<l;e++){let n=t[e];if(n&&n!==i[a++])continue outer}v=r;break}v!==null&&(_.miss=0)}if(v===null){let s=d,c=[d];for(let e=p+1;e<l;e++){let n=t[e];n&&(s+=` `+n,c.push(n))}if(!n(s))return r(s);v={r:e(s),t:c.length,a0:c[0],a1:c[1],a2:c[2]??``,a:c,n:null},_===void 0?i.set(d,_={e:[],miss:0,skip:0,at:0}):++_.miss>ct&&(_.miss=ct,_.skip=lt,_.e.length=0,_.at=0);let u=_.e;u.length<q?u.push(v):(u[_.at]=v,_.at=_.at+1&q-1),++o>1e3&&(o=0,a=i,i=new Map)}return s!==null&&s!==v&&(s.n=v),s=v,v.r},g=t=>Array.isArray(t)?h(t.slice(),!1):t===0||t===0n?`0`:e(at(t,!0));return function(t,n,r){let a=arguments.length;if((a|1)==3){let e=s;if(e!==null){let i=e.n;if(i!==null&&p(i,t,n,r))return s=i,i.r;if(e!==i&&p(e,t,n,r))return e.r}if(a===2&&typeof n==`string`&&n!==``){let e=i.get(t);if(e!==void 0&&e.skip>0)return e.skip--,s=null,f(n,t,!0)}return h([t,n,r],!0)}if(a===1)return typeof t==`string`?e(t):g(t);let o=s;if(o!==null){let e=o.n;if(e!==null){let t=e.a,n=0,r=!0;for(let e=0;e<a;e++){let i=arguments[e];if(i){if(i!==t[n]){r=!1;break}n++}}if(r&&n===e.t)return s=e,e.r}if(o!==e){let e=o.a,t=0,n=!0;for(let r=0;r<a;r++){let i=arguments[r];if(i){if(i!==e[t]){n=!1;break}t++}}if(n&&t===o.t)return o.r}}let c=[];for(let e=0;e<a;e++)c.push(arguments[e]);return h(c,!0)}},Y=48,X=(e,t=0)=>{let n=new Int32Array(e.length);for(let r=0;r<e.length;r++)n[r]=e.charCodeAt(r)-Y-t;return n},Z=e=>{let t=new Int32Array(e.length+1);for(let n=0;n<e.length;n++)t[n+1]=t[n]+e[n];return t},Q=e=>{let t=new Int32Array(e.length),n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r)-Y;n+=i>>>1^-(i&1),t[r]=n}return t},dt=384,ft=[],$=Z(X(`E0500002005282000000002000150000020021820000011200000003022202000300004200120000200420001200021200301200010400162000010000220021010:2192001200220012000220012000200200200400010200040000000000400200108200110100000022010313000162002000020020012020080213000228200000000082000000000120002000120020020040101020300130001001010`)),pt=Z(X(`:11111111211111119311546544411119731869:671397415686432441111111111161114151214313433415:78311132233313187211117221449443411141111151152226611131111112212518142224214215421421542142424242516171151615616347111111111197911327451111111111111111111113134714133513411111311111111111111111111112444411111342312715245411117:3`)),mt=`@containerabcdefghinlmoprstunderlineviawzccentlignnimatespectuto-colsrowsaglorightnessckdrop-sisbcontrastfiltergrayscalehue-rotateinvertopacityslurrightnessaturateepia-coniclinearpositionradialsizeockurrderttom-belrstxyespacing-xyaretoursorlnt-umnsendspantartainentrasteividerop-shadowurationcorationlay-xyasendillexontromlter-featuresstretchapr-xyayscaleidow-colsrowsue-rotatedentlinesetvert-beringsxyeshadoweiadingftnest-clamp-imageabein-lrstxyskx--b-coniclpositionrsizet-x-y-fromto-fromto-inearfromto-fromto-adialfromto-fromtofromtofromtofromtoblockhinlinew-screenesblockhinlinewbjectpacityrutlinederigin-offsetbelrstxyesrspective-originaceholderioghtng-offsettateundedw-xyz-belrstlreseslr-endspantartaturatecepiahizekewpace-taleroll-xyz-barmpbelrstxyesbelrstxyes-thumbrackadowrink-xyxyartrokeabextora-shadowpckingnsformitionlate-xyz-offsetill-changeoom`,ht=(()=>{let e=$.length-1,t=new Int32Array(e);for(let n=e-1;n>=0;n--){let e=1,r=n+1;for(let i=$[n];i<$[n+1];i++)e+=t[r],r+=t[r];t[n]=e}let n=new Int32Array($[e]),r=0;for(let i=0;i<e;i++){let e=i+1;for(let a=$[i];a<$[i+1];a++)n[r++]=e,e+=t[e]}return n})(),gt=X(`02000000000000900<=0?000B000F00F00ŏI0J0LNPRTVX0000]_a00000000000000000000000rst0000000zŏ00000000000
ŏ0000000ŏ00000000000000000000000000000000000000000000000000000000000000Ë000000000000000000000Þ000000000000000000ð0000000ø0ùúûüýþÿĀāĂ㥹Ć000000000000000000000000000000000000000000ħ0ĨĪ00000000000000000000ļĽ00000Ŭ000000`,1),_t=Z(X(`1233333593464636351265367151576`)),vt=X(`93203242332583253248325D>E?F@03263243255B:032523853:0325B:8GA032542H<C=12727B:0324325853;D>E?3257D>03258432585:0325B:;0328B:032`),yt=X(`012113445661666666789111:5;;;;;;;;444;;;:62999<1161=62>>?61:21@ABCD4446996:64E:::;:?::64:F114GHHIHHHHIHH1HH1HH1HHHHHH::EJK4444::EJ4444441691;644444114244444:;L6666555555555555555999666664444444444444444444444226?6:66644M9N?D:111::::6DJ199`),bt=Q(`020200202020020020020020020020200200200200200200200002020202001003040106000200200200200200200200200200200200200200200200200200200200200200200200200200200200020020020020020020002020200202002002002002002002002002002020002002020020200220200200200200200200200200200200020020020000200020002000200200200020020020002000200200200020020202002020202000200200020022000200200020020002002000200220002002000200W0Z00020020002002020002002000200g0j0002002000200200020020002002000200200020020002000200002000002002002002002000200020000200002002002002002002002020020020200200200200200200200200202020020020020020020020020002002002020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020002002002002002002000200200200200200200200200200020202020002000200020002002002002000020200200`),xt=(()=>{let e=new Int32Array(319).fill(-1),t=Q(`02422242:222222242224222242442222222422222244442242226224222426222422442462222422622222222626222462242622422622422424242422222222422222222242422222222222222222622442224222222222222224424442262222222222222222222226224222424242422224422422422222`),n=Q(`02222222222222222222202222222222222222222222221422222222222222222222222222222222222Y\\222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222221422222222222222222222222222222222222222Ŀł222222222222222222`);for(let r=0;r<t.length;r++)e[t[r]]=n[r];return e})(),St=`container |break-after- all auto avoid avoid-page column left page right|break-before- all auto avoid avoid-page column left page right|break-inside-a uto void void-column void-page|box-decoration- clone slice|box- border content| contents flow-root hidden table table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group| not-sr-only sr-only|float- end left none right start|clear- both end left none right start|isolat e ion-auto|overflow- auto clip hidden scroll visible|overflow-x- auto clip hidden scroll visible|overflow-y- auto clip hidden scroll visible|overscroll- auto contain none|overscroll-x- auto contain none|overscroll-y- auto contain none| absolute fixed relative static sticky| collapse invisible visible|justify- around baseline between center center-safe end end-safe evenly normal start stretch|justify-items- center center-safe end end-safe normal start stretch|justify-self- auto center center-safe end end-safe start stretch|items- baseline baseline-last center center-safe end end-safe start stretch|self- auto baseline baseline-last center center-safe end end-safe start stretch|place-content- around baseline between center center-safe end end-safe evenly start stretch|place-items- baseline center center-safe end end-safe start stretch|place-self- auto center center-safe end end-safe start stretch| antialiased subpixel-antialiased| italic not-italic|normal-nums |ordinal |slashed-zero | lining-nums oldstyle-nums| proportional-nums tabular-nums| diagonal-fractions stacked-fractions| no-underline overline| capitalize lowercase normal-case uppercase|truncate |whitespace- break-spaces normal nowrap pre pre-line pre-wrap|break- all keep normal words|wrap- anywhere break-word normal|hyphens- auto manual none|mix-blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay plus-darker plus-lighter saturation screen soft-light|table- auto fixed|caption- bottom top|backface- hidden visible|appearance- auto none|scheme- dark light light-dark normal only-dark only-light|field-sizing- content fixed|pointer-events- auto none|resize -none -x -y|snap- align-none center end start|snap- always normal|snap- both none x y|snap- mandatory proximity|touch- auto manipulation none|touch-pan- left right x|touch-pan- down up y|touch-pinch-zoom |select- all auto none text|forced-color-adjust- auto none| normal size| baseline bottom middle sub super text-bottom text-top top| bounce none ping pulse spin| auto square video| auto fr max min px|none | auto full px| fixed local scroll|clip- border content padding text|origin- border content padding| bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| no-repeat repeat repeat-round repeat-space repeat-x repeat-y| auto contain cover| gradient-to-b gradient-to-bl gradient-to-br gradient-to-l gradient-to-r gradient-to-t gradient-to-tl gradient-to-tr none|blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay saturation screen soft-light|to- b bl br l r t tl tr| auto dvh fit full lh lvh max min px screen svh| dashed dotted double hidden none solid| collapse separate|px |auto |full | content none strict| inline-size size|layout |paint |style | around baseline between center center-safe end end-safe evenly normal start stretch| alias all-scroll auto cell col-resize context-menu copy crosshair default e-resize ew-resize grab grabbing help move n-resize ne-resize nesw-resize no-drop none not-allowed ns-resize nw-resize nwse-resize pointer progress row-resize s-resize se-resize sw-resize text vertical-text w-resize wait zoom-in zoom-out| dashed dotted double solid wavy| auto from-font|reverse |initial | in in-out initial linear out| col col-reverse row row-reverse| nowrap wrap wrap-reverse| auto initial none| black bold extrabold extralight light medium normal semibold thin| condensed expanded extra-condensed extra-expanded normal semi-condensed semi-expanded ultra-condensed ultra-expanded|flow- col col-dense dense row row-dense| none subgrid| auto dvh dvw fit full lh lvh lvw max min px screen svh svw| block flex grid table| auto dvw fit full lvw max min px screen svw| loose none normal px relaxed snug tight|through |item | inside outside| decimal disc none| auto px| clip-border clip-content clip-fill clip-padding clip-stroke clip-view no-clip| add exclude intersect subtract| alpha luminance match|origin- border content fill padding stroke view|type- alpha luminance| circle ellipse| closest-corner closest-side farthest-corner farthest-side|at- bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| dvh fit full lh lvh max min none px screen svh| auto dvh dvw fit full lh lvh lvw max min none px screen svh svw| dvw fit full lvw max min none px screen svw| auto dvh dvw fit full lvh lvw max min none prose px svh svw| auto dvh dvw fit full lvh lvw max min none px screen svh svw| contain cover fill none scale-down| first last none| distant dramatic midrange near none normal|inset | full none|3d | auto smooth|gutter- auto both stable| auto none thin| inner none| auto dvh dvw fit full lvh lvw max min px svh svw|base | center end justify left right start| clip ellipsis| balance nowrap pretty wrap| normal tight tighter wide wider widest| cpu gpu none| 3d flat| all colors none opacity shadow transform| discrete normal| full px| auto dvh dvw fit full lvh lvw max min px screen svh svw| auto contents scroll transform`.split(`|`).map(e=>{let t=e.split(` `),n=t.shift();for(let e=0;e<t.length;e++)t[e]=n+t[e];return t}),Ct=Q(`0000000000000000000000000000000000000000000000000000000000000262242:6@200000006:240B428:4422400002046044222426220026642642462026224222824220022400000000\\00N222422242222222224062242222222422226264222422222222222222442804222422222222222222222222220<4<0204260002444020204224422`),wt=Q(`ɠ222222222222222222222222222222222222222222222222222222222222˕4222226>ʶ22ʷʺʷ2ʸʷ42ʴ2ʓ22>621422ɶ222ɹɼɷɺɷɺ22ɱ42222ɨ2ɧ26622ɘɓ244ƸƵ222]d24242ǖǓƚÄȫ2263ȨȥȨ2222222ǣ222222222222222222ǂƽ2ƾƵ2222222422222ƜƑ22222222222222222222144Ŧţ22Ţş222222222222222222222ĸ2ı68ĦģĦɡŰ4Ġ«®ĝ822ĔđĔ2ē2222622`),Tt=Q(`02222222222222222222222222222222222222222222222222222222222222222202022222222222EH2200IL021042222Y\\222IL0cf2e10j2222U00X202[^2y0000120|{~22
:22|22222222222G000qOVI00000}2>40000B00000I¨©000¬00000000000000021M®00°000000000000000000000222HGHa1º222¿2À2222ÉÌ000°2±`),Et=new Int32Array(995),Dt=new Int32Array(995),Ot=new Int32Array(995),kt=``,At=new Int32Array(1038);{let e=new Map,t=0,n=0;for(let r=0;r<Ct.length;r++)for(let i of St[Tt[r]]){let a=e.get(i);a===void 0&&(a=t++,e.set(i,a),At[a*2]=kt.length,At[a*2+1]=i.length,kt+=i),Et[n]=Ct[r],Dt[n]=wt[r],Ot[n]=a,n++}}var jt=Q(`0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p`),Mt=Z(X(`1::24444432:442:44:44>222222:44:4421322511111311111114`)),Nt=Q(`24A;33N=C@H4A;33N=C@<27;83:;8393NQ:3NQʰ222ˉºŴŽ2R2=18cƴÅŇ=cĞÛC1ƈǝȈ:ħ25=11D3A@4=<1;1DEr25;11B3?<6;:371BCn9@7=<8192>2E121@9@EHE@9>2T25511<398454131<=V25511<398454131<=ƧNž2Đå242L222290000f22500ɛ000ǘ222`),Pt=X(`ij`),Ft=X(``),It=X(`1`),Lt={GROUP_COUNT:dt,customValidatorNames:ft,edgeStart:$,labelStart:pt,labelText:mt,edgeTarget:ht,nodeGroup:gt,nodeVlist:xt,vlistPat:_t,vlistOps:vt,vlistRef:yt,vlistGroup:bt,litAnchor:Et,litGroup:Dt,litPool:Ot,poolOffsets:At,poolText:kt,adjGid:jt,adjStart:Mt,adjTgt:Nt,patGid:Pt,patTgt:Ft,postfixLookupGroups:It,orderSensitiveModifiers:`* ** after backdrop before details-content file first-letter first-line marker placeholder selection`},Rt=8192,zt=it(Lt,void 0,{cacheSize:Rt}),Bt=J(zt.mergeString,zt);zt.merge;var Vt=e=>e,Ht=[],Ut={reset(){for(let e=0;e<Ht.length;e++)Ht[e]()},onReset(e){Ht.push(e)}},Wt=e=>{if(e.indexOf(` `)!==-1)return!1;for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n>=9&&n<=13)return!1}return!0},Gt=1024,Kt=256,qt=1e3,Jt=e=>typeof e==`string`?e:e==null?``:s(e),Yt=(e,t,n)=>e?t?n?`${e} ${t} ${n}`:`${e} ${t}`:n?`${e} ${n}`:e:t?n?`${t} ${n}`:t:n,Xt=((e,t,n)=>{let{mergeString:r,mergeUncached:i,seenBefore:a}=e,o=n>0,s=new Map,c=new Map,l=0,u=(e,t)=>{if(t===0)return``;let n=e[0];if(t===1)return Wt(n)?n:o&&a(n)?r(n):i(n);if(!o){let r=n;for(let n=1;n<t;n++)r+=` ${e[n]}`;return i(r)}let u=s.get(n);if(u===void 0&&(u=c.get(n),u!==void 0&&s.set(n,u)),u!==void 0)outer:for(let n=0;n<u.length;n++){let r=u[n],i=r.a;if(i.length===t){for(let n=1;n<t;n++)if(e[n]!==i[n])continue outer;return r.r}}let d=n;for(let n=1;n<t;n++)d+=` ${e[n]}`;if(!a(d))return i(d);let f=r(d);return u===void 0&&s.set(n,u=[]),u.length>=Kt&&u.shift(),u.push({a:e.slice(0,t),r:f}),++l>qt&&(l=0,c=s,s=new Map),f},d=new Map,f=new Map,p=0,m=``,h=``,g=``,_=``;return{engine:e,cn:t,adapter:{parts:u,override:(e,t,n)=>{let s=Jt(t),c=Jt(n);if(!s&&!c)return e;if(!o)return i(Yt(e,s,c));if(e===m&&s===h&&c===g)return _;let l=s?c?`${s}\0${c}`:s:c,u=d.get(e);u===void 0&&(u=f.get(e),u!==void 0&&d.set(e,u));let v=u===void 0?void 0:u.get(l);if(v===void 0){let t=Yt(e,s,c);if(!a(t))return i(t);v=r(t),u===void 0&&d.set(e,u=new Map),u.set(l,v),++p>Gt&&(p=0,f=d,d=new Map)}return m=e,h=s,g=c,_=v,v}},reset(){s=new Map,c=new Map,l=0,d=new Map,f=new Map,p=0,m=``,h=``,g=``,_=``}}})(zt,Bt,Rt);Ut.onReset(()=>{Xt.reset()});var Zt=e=>{let t=e.twMergeConfig;return t!=null&&!g(t)},Qt=()=>TypeError("[tailwind-variants] `twMergeConfig` is only supported by the `tailwind-variants/config` entry. Import `tv`, `createTV`, or `cnMerge` from there, or inject a merge function with `twMerge`."),$t=(e,t)=>{if(t===0)return``;let n=e[0];for(let r=1;r<t;r++)n+=` ${e[r]}`;return n},en={parts:$t,override:(e,t,n)=>m(e,t,n)},tn=e=>{let t=t=>t?e(t):``;return{parts:(e,n)=>t($t(e,n)),override:(e,n,r)=>t(m(e,n,r))}},nn=e=>e.twMerge===!1?en:typeof e.twMerge==`function`?tn(e.twMerge):Zt(e)?null:Xt.adapter,rn=G(e=>{let t=nn(e);if(t===null)throw Qt();return t},Vt);rn.tv;var an=rn.createTV,on=an({twMerge:!0}),sn=n(),cn=on({base:`inline-flex shrink-0 items-center justify-center gap-1.5 rounded-control font-medium transition-colors duration-[var(--hb-duration)] motion-reduce:transition-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus disabled:opacity-50`,variants:{variant:{primary:`bg-accent text-accent-fg enabled:hover:bg-accent-hover`,secondary:`border border-line bg-surface text-text enabled:hover:bg-hover`,danger:`bg-danger text-danger-fg enabled:hover:bg-danger-hover`,ghost:`text-text enabled:hover:bg-hover`},size:{sm:`h-7 px-2.5 text-xs`,md:`h-9 px-4 text-sm`}},defaultVariants:{variant:`secondary`,size:`md`}});function ln({variant:e,size:t,icon:n,loading:r,disabled:i,className:a,children:o,type:s=`button`,...c}){return(0,sn.jsxs)(`button`,{type:s,disabled:i||r,"aria-busy":r||void 0,"data-size":t??`md`,className:cn({variant:e,size:t,className:a}),...c,children:[n,o]})}var un=e(r(),1),dn=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function fn(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:dn(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var pn=e=>{let t=``,n=!1;for(let r of e)r===`-`||r===`_`||r<=` `?n=t.length>0:(t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1);return t},mn=e=>{let t=pn(e);return t.charAt(0).toUpperCase()+t.slice(1)},hn=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),gn={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function _n(e){return e!=null}function vn(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??gn.width,a=e.size??e.height??gn.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?hn(...c):hn(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??gn[`stroke-width`])*Number(e.size??e.width??gn.width)/Number(t.size??t.width??gn.width):t.strokeWidth??gn[`stroke-width`];return[`svg`,{...Object.entries(gn).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&_n(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&_n(t.width)&&{[r(`width`)]:t.width},...`height`in t&&_n(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function yn(e,t={}){return vn(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var bn=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},xn=(0,un.createContext)({}),Sn=()=>(0,un.useContext)(xn),Cn=(0,un.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:c,iconNode:l=[],icon:u={node:l,aliases:[],size:24},...d},f)=>{let{size:p=24,strokeWidth:m=2,absoluteStrokeWidth:h=!1,nonScalingStroke:g=!1,color:_=`currentColor`,className:v=``}=Sn()??{},y=!!c||bn(d),[b,x,S=[]]=yn(u,{color:e??_,width:n??t??p,height:r??t??p,strokeWidth:i??m,absoluteStrokeWidth:a??h,nonScalingStroke:o??g,className:hn(v,s),hasA11yProp:y,attributes:d});return(0,un.createElement)(b,{ref:f,...x},[...S.map(([e,t])=>(0,un.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function wn(e,t=[],n=[]){let r=typeof e==`string`?fn(e,t,n):e,i=(0,un.forwardRef)(({className:e,...t},n)=>(0,un.createElement)(Cn,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=mn(r.name)),i}var Tn=`border border-line bg-glass-strong backdrop-blur-(--hb-glass-blur) backdrop-saturate-150 shadow-overlay`;export{a,on as i,wn as n,ln as r,Tn as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./field-types-DmEN723Z.js";function n(e){let t;try{t=JSON.parse(e)}catch(e){let t=e.message.replace(/\.$/,``);throw Error(`Invalid collections JSON: ${t}.`)}if(!Array.isArray(t))throw Error(`Invalid collections JSON: expected an array.`);return t.forEach((e,t)=>{let n=e?.name;if(typeof n!=`string`||!n)throw Error(`Invalid collections JSON: item ${t+1} has no name.`)}),t}function r(e){return JSON.stringify(e.map(({created:e,updated:t,...n})=>n),null,2)}var i=e=>JSON.stringify(e,(e,t)=>t&&typeof t==`object`&&!Array.isArray(t)?Object.fromEntries(Object.entries(t).sort(([e],[t])=>e<t?-1:1)):t),a=({id:e,created:t,updated:n,fields:r,...i})=>i,o=Array.from({length:256},(e,t)=>{let n=t;for(let e=0;e<8;e++)n=n&1?3988292384^n>>>1:n>>>1;return n>>>0});function s(e){let t=4294967295;for(let n of new TextEncoder().encode(e))t=o[(t^n)&255]^t>>>8;return String((t^4294967295)>>>0)}function c(e,t){let n=[...e];for(let e of t){let t={...e},r=!t.id;if(r){let e=`${String(t.type)}${s(String(t.name??``))}`,r=e;for(let t=2;t<1e3&&n.some(e=>e.id===r);t++)r=e+t;t.id=r}let i=n.findIndex(e=>r?t.name!==``&&e.name===t.name:e.id===t.id);i>=0?(r&&(t.id=n[i].id),n[i]=t):n.push(t)}return n}function l(e,t,n){let r=c([],t??[]);for(let t of e){if(!t.system&&n||r.some(e=>e.id===t.id))continue;let e=r.find(e=>e.name===t.name);e&&e.type===t.type&&(e.id=t.id),r=c(r,[t])}return r}function u(n){if(!t.some(e=>e.type===n.type))return n;let{_key:r,...i}=e(n.type);return{...i,...n}}function d(e,t,n){let r=l(e,t,n),a={added:[],changed:[],deleted:[]};for(let t of r){let n=e.find(e=>e.id===t.id);n?n.name===t.name?i(u(t))!==i(u(n))&&a.changed.push(String(t.name)):a.changed.push(`${String(n.name)} -> ${String(t.name)}`):a.added.push(String(t.name))}for(let t of e)r.some(e=>e.id===t.id)||a.deleted.push(String(t.name));return a}function f(e,t,n){let r={added:[],changed:[],deleted:[]},o=new Set;for(let s of t){let t=String(s.id||s.name),c=e.find(e=>e.id===t||e.name.toLowerCase()===t.toLowerCase());if(!c){r.added.push(String(s.name));continue}o.add(c);let l=(s.type??c.type)===`view`?{added:[],changed:[],deleted:[]}:d(c.fields,s.fields,n);if(i(a({...c,...s}))!==i(a(c))||l.added.length+l.changed.length+l.deleted.length>0){let e=String(s.name??c.name);r.changed.push(e===c.name?{name:e,fields:l}:{name:e,previousName:c.name,fields:l})}}if(n)for(let t of e)!o.has(t)&&!t.system&&r.deleted.push(t.name);return r}export{r as n,n as r,f as t};
|