@undefineds.co/xpod 0.4.32 → 0.4.34
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/dist/api/auth/SolidTokenAuthenticator.d.ts +4 -1
- package/dist/api/auth/SolidTokenAuthenticator.js +43 -25
- package/dist/api/container/common.js +1 -0
- package/dist/api/container/index.js +1 -0
- package/dist/api/container/types.d.ts +2 -0
- package/dist/http/SubgraphSparqlHttpHandler.d.ts +32 -0
- package/dist/http/SubgraphSparqlHttpHandler.js +448 -1
- package/dist/http/SubgraphSparqlHttpHandler.jsonld +36 -0
- package/dist/storage/rdf/QleverSparqlEngine.d.ts +15 -0
- package/dist/storage/rdf/QleverSparqlEngine.js +40 -0
- package/dist/storage/rdf/QleverSparqlEngine.jsonld +8 -0
- package/dist/storage/rdf/RdfAccessScope.d.ts +12 -0
- package/dist/storage/rdf/RdfAccessScope.js +63 -3
- package/dist/storage/rdf/RdfQuerySparqlEngine.d.ts +7 -0
- package/dist/storage/rdf/RdfQuerySparqlEngine.js +30 -0
- package/dist/storage/rdf/RdfQuerySparqlEngine.jsonld +8 -0
- package/dist/storage/rdf/index.d.ts +1 -1
- package/dist/storage/rdf/index.js +6 -2
- package/dist/storage/sparql/SubgraphQueryEngine.d.ts +5 -0
- package/dist/storage/sparql/SubgraphQueryEngine.js +9 -0
- package/dist/storage/sparql/SubgraphQueryEngine.jsonld +16 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiBuiltinProvidersSection.d.ts +32 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiBuiltinProvidersSection.js +8 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiConnectionsPanel.js +35 -1
- package/node_modules/@undefineds.co/ai-connections/dist/AiGatewayKeysSection.d.ts +9 -1
- package/node_modules/@undefineds.co/ai-connections/dist/AiGatewayKeysSection.js +32 -6
- package/node_modules/@undefineds.co/ai-connections/dist/index.d.ts +1 -0
- package/node_modules/@undefineds.co/ai-connections/dist/index.js +1 -0
- package/node_modules/@undefineds.co/ai-connections/package.json +2 -2
- package/node_modules/@undefineds.co/ai-connections-runtime/dist/contract/ai-connections-client.d.ts +1 -1
- package/node_modules/@undefineds.co/ai-connections-runtime/dist/contract/client/normalize.d.ts +16 -1
- package/node_modules/@undefineds.co/ai-connections-runtime/dist/contract/client/normalize.js +80 -2
- package/node_modules/@undefineds.co/ai-connections-runtime/dist/contract/client/request.js +19 -1
- package/node_modules/@undefineds.co/ai-connections-runtime/dist/contract/client/types.d.ts +31 -0
- package/node_modules/@undefineds.co/ai-connections-runtime/dist/materials/build-provenance.json +4 -4
- package/node_modules/@undefineds.co/ai-connections-runtime/dist/materials/index.json +15 -15
- package/node_modules/@undefineds.co/ai-connections-runtime/dist/materials/javascript/provider-catalog/index.json +2 -2
- package/node_modules/@undefineds.co/ai-connections-runtime/dist/materials/javascript/service-access-resources/index.json +2 -2
- package/node_modules/@undefineds.co/ai-connections-runtime/dist/materials/source/package.json +1 -1
- package/node_modules/@undefineds.co/ai-connections-runtime/dist/materials/source-inventory.json +11 -11
- package/node_modules/@undefineds.co/ai-connections-runtime/dist/provider-catalog-inputs.json +1 -1
- package/node_modules/@undefineds.co/ai-connections-runtime/dist/service-access-resources-inputs.json +1 -1
- package/node_modules/@undefineds.co/ai-connections-runtime/package.json +1 -1
- package/node_modules/@undefineds.co/extension-host-contracts/dist/materials/build-provenance.json +1 -1
- package/node_modules/@undefineds.co/extension-host-contracts/dist/materials/index.json +3 -3
- package/node_modules/@undefineds.co/extension-host-contracts/dist/materials/source-inventory.json +1 -1
- package/node_modules/@undefineds.co/xpod-afs/dist/licenses/cli-producer-original-binding.json +1 -1
- package/node_modules/@undefineds.co/xpod-cli/dist/producer-materials/index.json +1 -1
- package/package.json +4 -4
- package/static/dashboard/assets/{AccountAuthBoundary-D2peXpst.js → AccountAuthBoundary-DXBGmvsI.js} +1 -1
- package/static/dashboard/assets/{DesktopOidcCallback-DXWArav6.js → DesktopOidcCallback-p24MYq1P.js} +1 -1
- package/static/dashboard/assets/{DevicePages-BULFk95K.js → DevicePages-DbvhTnse.js} +1 -1
- package/static/dashboard/assets/ModelsPage-UMDnRyLA.js +12 -0
- package/static/dashboard/assets/{PaneListHeader-BSfEbecP.js → PaneListHeader-DkEH0TT_.js} +1 -1
- package/static/dashboard/assets/{PodDeletionAuthorizationPanel-CH-Sx18g.js → PodDeletionAuthorizationPanel-CzrI8Pgw.js} +3 -3
- package/static/dashboard/assets/{PodPage-BMpejIra.js → PodPage-TaiWqMBx.js} +1 -1
- package/static/dashboard/assets/{SystemSettingsPage-H_Jj6WfF.js → SystemSettingsPage-D4gQjDt1.js} +1 -1
- package/static/dashboard/assets/{TasksPage-CTDxlQra.js → TasksPage-CmkiMYil.js} +1 -1
- package/static/dashboard/assets/{WebDesktopEntry-Ch7-0C9a.js → WebDesktopEntry-D9kEfhbz.js} +1 -1
- package/static/dashboard/assets/{XpodAiConnectionsPodStore-ggRE9fmE.js → XpodAiConnectionsPodStore-orY8vQFl.js} +2 -2
- package/static/dashboard/assets/{XpodShellApp-Bwf9UmeJ.js → XpodShellApp-DR65DMOb.js} +4 -4
- package/static/dashboard/assets/{account-session-CVzooxS2.js → account-session-BZ2ttIdq.js} +1 -1
- package/static/dashboard/assets/{button-DGh2QVt2.js → button-_rwfCMMH.js} +1 -1
- package/static/dashboard/assets/{collection-runtime-DwV_9rt2.js → collection-runtime-C74icLtf.js} +1 -1
- package/static/dashboard/assets/{createLucideIcon-yLhAxnfL.js → createLucideIcon-DrgScGhc.js} +1 -1
- package/static/dashboard/assets/{dashboard-xbXlitKr.js → dashboard--DWjqkYt.js} +2 -2
- package/static/dashboard/assets/{index-CMigfjqD.js → index-D6dB-UNq.js} +1 -1
- package/static/dashboard/assets/{index-BSiKqEdo.js → index-dx5sc4rE.js} +1 -1
- package/static/dashboard/assets/{label-CrDv_y1q.js → label-D02Jpvm9.js} +1 -1
- package/static/dashboard/assets/{list-BJM0nqti.js → list-DpFAisnq.js} +1 -1
- package/static/dashboard/assets/{nav-item-style-CQbGyYLb.js → nav-item-style-B1-0JkON.js} +1 -1
- package/static/dashboard/assets/{safe-continuation-ZTBQTFWB.js → safe-continuation-DUTIOFe5.js} +1 -1
- package/static/dashboard/assets/{section-header-CWHRWGXl.js → section-header-CtBnllbG.js} +1 -1
- package/static/dashboard/assets/{setting-row-qWtxYGK1.js → setting-row-D_JPuHAJ.js} +1 -1
- package/static/dashboard/assets/{xpod-remembered-login-DPMxurVN.js → xpod-remembered-login-CtmMI8xG.js} +3 -3
- package/static/dashboard/dashboard.html +1 -1
- package/static/settings/assets/{AccountAuthBoundary-4Ywjpb8o.js → AccountAuthBoundary-njIhHpLf.js} +1 -1
- package/static/settings/assets/{DesktopOidcCallback-CAmwMT_J.js → DesktopOidcCallback-BjjNwTxc.js} +1 -1
- package/static/settings/assets/{DevicePages-DvuHyfHo.js → DevicePages-FFJMu_zL.js} +1 -1
- package/static/settings/assets/ModelsPage-6567dZKQ.js +12 -0
- package/static/settings/assets/{PaneListHeader-CuFgIbhe.js → PaneListHeader-CuPah5aC.js} +1 -1
- package/static/settings/assets/{PodDeletionAuthorizationPanel-DdNgDHH5.js → PodDeletionAuthorizationPanel-aJCKasGz.js} +3 -3
- package/static/settings/assets/{PodPage-DnWCNGTO.js → PodPage-BA0DQ3AB.js} +1 -1
- package/static/settings/assets/{SystemSettingsPage-k9P_wQcl.js → SystemSettingsPage-BNPH4VWf.js} +1 -1
- package/static/settings/assets/{TasksPage-Dk7gUH3J.js → TasksPage-B5m82wjD.js} +1 -1
- package/static/settings/assets/{WebDesktopEntry-DJwPVVnU.js → WebDesktopEntry-DgwwIUhg.js} +1 -1
- package/static/settings/assets/{XpodAiConnectionsPodStore-BtJQiJsx.js → XpodAiConnectionsPodStore-BJm-rFPs.js} +2 -2
- package/static/settings/assets/{XpodShellApp-B47vEQJp.js → XpodShellApp-BwvekJJR.js} +4 -4
- package/static/settings/assets/{XpodThemeProvider-Ciuwo_yl.js → XpodThemeProvider-DyX0rUID.js} +2 -2
- package/static/settings/assets/{account-session-CMc10iEj.js → account-session-D6vibAra.js} +1 -1
- package/static/settings/assets/auth-callback-DXxmF0-p.js +1 -0
- package/static/settings/assets/{button-D1dGKY1f.js → button-CV4KJ59A.js} +1 -1
- package/static/settings/assets/{collection-runtime-hK37-47o.js → collection-runtime-CARp4Cii.js} +1 -1
- package/static/settings/assets/{createLucideIcon-nEiQH43b.js → createLucideIcon-BIwq0vQx.js} +1 -1
- package/static/settings/assets/{index-DNdvma6J.js → index-D-LgcKAb.js} +1 -1
- package/static/settings/assets/{label-C3EGk_2E.js → label-CFTl2bC_.js} +1 -1
- package/static/settings/assets/{list-BensBGZp.js → list-D2aO7Nu-.js} +1 -1
- package/static/settings/assets/{nav-item-style-BOKCPNz8.js → nav-item-style-BKpK5_1m.js} +1 -1
- package/static/settings/assets/{safe-continuation-BPwW6jdq.js → safe-continuation-DRRY_t4F.js} +1 -1
- package/static/settings/assets/{section-header-DOSj5RvJ.js → section-header-COECjyL5.js} +1 -1
- package/static/settings/assets/{setting-row-C9k4cGNM.js → setting-row-cGgL78vR.js} +1 -1
- package/static/settings/assets/{settings-DtP5C8hi.js → settings-Bvrm5N-k.js} +1 -1
- package/static/settings/assets/{xpod-remembered-login-DKFG-zi3.js → xpod-remembered-login-YAmn8ZiP.js} +3 -3
- package/static/settings/auth-callback.html +2 -2
- package/static/settings/settings.html +2 -2
- package/static/dashboard/assets/ModelsPage-xvsVzhGZ.js +0 -12
- package/static/settings/assets/ModelsPage-BDXqetwk.js +0 -12
- package/static/settings/assets/auth-callback-fcOBaX2w.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as d,r as R}from"./XpodThemeProvider-
|
|
1
|
+
import{j as d,r as R}from"./XpodThemeProvider-DyX0rUID.js";function Y({size:e=24,...t}){return d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",width:e,height:e,"aria-hidden":"true",focusable:"false",...t,children:[d.jsx("rect",{x:"10",y:"10",width:"80",height:"80",rx:"18",fill:"#563E84"}),d.jsxs("g",{fill:"#F7F4ED",children:[d.jsx("path",{d:"M31 24H52V45H73V73Q73 76 70 76H31Q28 76 28 73V27Q28 24 31 24Z"}),d.jsx("path",{d:"M58 24L76 39H58Z"})]})]})}function X(e){if(e)try{const t=new URL(e,window.location.origin);return!["https:","http:"].includes(t.protocol)||t.username||t.password||t.pathname!=="/.account/"?void 0:(t.search="",t.hash="",new URL("account/",t).href)}catch{return}}const O=R.createContext(null);function Z(){const e=R.useContext(O);if(!e)throw new Error("useAuth must be used within AuthProvider");return e}const b="x-xpod-canonical-url",E="x-xpod-canonical-origin",_="x-xpod-canonical-host",T="x-xpod-local-route-url",x=1e3;async function B(e){if(e.signal?.aborted)return;const t=new AbortController,n=setTimeout(()=>t.abort(),x),r=()=>t.abort();e.signal?.addEventListener("abort",r,{once:!0}),e.signal?.aborted&&t.abort();try{return await I(t.signal,async()=>{const o=await e.fetch.call(globalThis,e.url,{credentials:"include",headers:{accept:"application/json"},signal:t.signal});return e.read(o)})}catch{return}finally{clearTimeout(n),e.signal?.removeEventListener("abort",r)}}async function I(e,t){if(e.aborted)return Promise.reject(e.reason??new DOMException("Aborted","AbortError"));let n=()=>{};const r=new Promise((o,c)=>{const s=()=>c(e.reason??new DOMException("Aborted","AbortError"));e.addEventListener("abort",s,{once:!0}),n=()=>e.removeEventListener("abort",s)});try{return await Promise.race([t(),r])}finally{n()}}async function H(e){const t=await B({fetch:e.fetch,url:e.statusUrl??"/provision/status",signal:e.signal,read:async n=>{if(!n.ok)return;const r=await n.json().catch(()=>{});return typeof r?.publicUrl=="string"?r.publicUrl:void 0}});if(typeof t=="string")try{return S({canonicalBaseUrl:t,localBaseUrl:e.localBaseUrl})}catch{return}}function f(e,t){let n;try{n=e instanceof URL?new URL(e.href):new URL(e)}catch{return}const r=t.map(S).filter(o=>k(n,o.canonicalBaseUrl)).sort((o,c)=>c.canonicalBaseUrl.length-o.canonicalBaseUrl.length)[0];return r?N(n,r):void 0}function J(e){return async(t,n)=>{const r=j(t);if(!r)return n===void 0?e.fetch.call(globalThis,t):e.fetch.call(globalThis,t,n);const o=e.routes(),c=f(r,o);if(!c)return n===void 0?e.fetch.call(globalThis,t):e.fetch.call(globalThis,t,n);const s=$(t,n,r,c);let a;if(t instanceof Request){const i=new Request(new Request(c,t),{headers:s});a=n===void 0?await e.fetch.call(globalThis,i):await e.fetch.call(globalThis,i,{...n,headers:s})}else a=await e.fetch.call(globalThis,c,{...n,headers:s});const u=f(a.url,o.map(i=>({canonicalBaseUrl:i.localBaseUrl,localBaseUrl:i.canonicalBaseUrl})));return u?y(a,u.href):a}}function y(e,t){const n=e.clone.bind(e);return Object.defineProperties(e,{url:{value:t,configurable:!0},clone:{value:()=>y(n(),t),configurable:!0}}),e}function j(e){if(e instanceof Request)return new URL(e.url);try{return new URL(String(e))}catch{return}}function S(e){return{canonicalBaseUrl:m(e.canonicalBaseUrl),localBaseUrl:m(e.localBaseUrl)}}function m(e){const t=new URL(e);if(t.protocol!=="http:"&&t.protocol!=="https:")throw new TypeError("Solid local routes must use http or https");return t.search="",t.hash="",t.href.endsWith("/")?t.href:`${t.href}/`}function k(e,t){const n=new URL(t);return e.origin===n.origin&&e.pathname.startsWith(n.pathname)}function N(e,t){const n=new URL(t.canonicalBaseUrl),r=new URL(t.localBaseUrl),o=e.pathname.slice(n.pathname.length),c=new URL(o,r);return c.search=e.search,c.hash=e.hash,c}function $(e,t,n,r){const o=e instanceof Request?e:void 0,c=new Headers(o?.headers??void 0);return new Headers(t?.headers??void 0).forEach((s,a)=>c.set(a,s)),c.set(b,n.toString()),c.set(E,n.origin),c.set(_,n.host),c.set(T,r.toString()),c}function D(e=typeof window>"u"?"/.account/":window.location.pathname){return/^\/\.account\/interaction\/[^/]+(?=\/|$)/u.exec(e)?.[0]??"/.account"}function h(e,t=typeof window>"u"?void 0:window.location){const n=String(e);if(!t)return n;const r=D(t.pathname);if(r==="/.account")return n;const o=new URL(n,t.href);return o.origin!==t.origin||!o.pathname.startsWith("/.account/")||o.pathname.startsWith("/.account/interaction/")?n:(o.pathname=`${r}${o.pathname.slice(9)}`,n.startsWith("/")&&!n.startsWith("//")?`${o.pathname}${o.search}${o.hash}`:o.href)}let p,A;function M(e){if(typeof window>"u"||typeof e!="string"||!e.trim())return;const t=e.trim();try{const n=new URL(t,window.location.origin);return n.origin!==window.location.origin||!["http:","https:"].includes(n.protocol)||n.username||n.password?void 0:h(n)}catch{return}}async function ee(e,t=fetch,n){if(typeof window>"u"||typeof e!="string"||!e.trim())return;if(n)try{const i=new URL(n,window.location.origin),l=new URL(e.trim(),i);if(l.origin===i.origin&&i.pathname.startsWith("/.account/")&&l.pathname.startsWith("/.account/")&&["http:","https:"].includes(l.protocol)&&!l.username&&!l.password)return h(l)}catch{}const r=M(e);if(r)return r;let o;try{o=new URL(e)}catch{return}if(!["http:","https:"].includes(o.protocol)||o.username||o.password||!o.pathname.startsWith("/.account/"))return;if(p&&A===window.location.origin){const i=f(o,[p]);if(i)return h(i)}const c={localBaseUrl:`${window.location.origin}/`,statusUrl:new URL("/provision/status",window.location.origin).href},s=await Promise.resolve(t.call(globalThis,c.statusUrl,{credentials:"include",headers:{accept:"application/json"}})).catch(()=>{}),a=s?await H({...c,fetch:async()=>s.clone()}):void 0;a&&(p=a,A=window.location.origin);const u=a?f(o,[a]):void 0;return u?h(u):void 0}const U="css-account",L="xpod.cssAccountToken",g="xpod.cssAccountAuthority",P="CSS-Account-Token";function w(){return typeof window<"u"&&typeof document<"u"}function v(){if(!w())return;const e=document.cookie.split(";");for(const t of e){const[n,...r]=t.trim().split("=");if(n===U){const o=r.join("=");try{return o?decodeURIComponent(o):void 0}catch{return}}}}function W(e){w()&&(document.cookie=`${U}=${encodeURIComponent(e)}; Path=/; SameSite=Lax`)}function q(){w()&&(document.cookie=`${U}=; Path=/; SameSite=Lax; Max-Age=0`)}function z(){if(!(typeof window>"u")){try{window.localStorage.removeItem(L)}catch{}try{window.sessionStorage.removeItem(L)}catch{}}}function te(e){if(!w())return!1;const t=C(e),n=window.localStorage.getItem(g),r=n!==null?n!==t:new URL(t).origin!==window.location.origin;return window.localStorage.setItem(g,t),r&&K(),r}function C(e){const t=new URL(e,window.location.origin);if(!["http:","https:"].includes(t.protocol)||t.username||t.password||t.pathname!=="/.account/"||t.search||t.hash)throw new Error("Invalid Account authority");return t.href}function ne(e){!e||v()===e||W(e)}function K(){z(),q()}function V(){return v()}function F(e,t={Accept:"application/json"}){const n={...t};return e&&!G(n,"Authorization")&&(n.Authorization=`${P} ${e}`),n}function oe(e={Accept:"application/json"},t){if(t)try{if(window.localStorage.getItem(g)!==C(t))return{...e}}catch{return{...e}}return F(V(),e)}function G(e,t){const n=t.toLowerCase();return Object.keys(e).some(r=>r.toLowerCase()===n)}export{O as A,Y as X,X as a,te as b,h as c,K as d,ne as e,f,V as g,J as h,B as p,ee as r,oe as s,Z as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as t,c as o,j as e,X as r,a}from"./XpodThemeProvider-DyX0rUID.js";t();o.createRoot(document.getElementById("root")).render(e.jsx(r,{children:e.jsx(a,{callback:!0})}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as A,R as Qe,j as eo}from"./XpodThemeProvider-Ciuwo_yl.js";var oo=Object.defineProperty,de=(e,t)=>oo(e,"name",{value:t,configurable:!0});function ae(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}de(ae,"setRef");function Ee(...e){return t=>{let o=!1;const r=e.map(n=>{const l=ae(n,t);return!o&&typeof l=="function"&&(o=!0),l});if(o)return()=>{for(let n=0;n<r.length;n++){const l=r[n];typeof l=="function"?l():ae(e[n],null)}}}}de(Ee,"composeRefs");function Ie(...e){return A.useCallback(Ee(...e),e)}de(Ie,"useComposedRefs");var to=Object.defineProperty,I=(e,t)=>to(e,"name",{value:t,configurable:!0});function je(e){const t=A.forwardRef((o,r)=>{let{children:n,...l}=o,s=null,m=!1;const p=[];le(n)&&typeof J=="function"&&(n=J(n._payload)),A.Children.forEach(n,y=>{if(Oe(y)){m=!0;const v=y;let P="child"in v.props?v.props.child:v.props.children;le(P)&&typeof J=="function"&&(P=J(P._payload)),s=so(v,P),p.push(s?.props?.children)}else p.push(y)}),s?s=A.cloneElement(s,void 0,p):!m&&A.Children.count(n)===1&&A.isValidElement(n)&&(s=n);const d=s?Me(s):void 0,b=Ie(r,d);if(!s){if(n||n===0)throw new Error(m?lo(e):ao(e));return n}const g=_e(l,s.props??{});return s.type!==A.Fragment&&(g.ref=r?b:d),A.cloneElement(s,g)});return t.displayName=`${e}.Slot`,t}I(je,"createSlot");var ro=je("Slot"),Ge=Symbol.for("radix.slottable");function no(e){const t=I(o=>"child"in o?o.children(o.child):o.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=Ge,t}I(no,"createSlottable");var so=I((e,t)=>{if("child"in e.props){const o=e.props.child;return A.isValidElement(o)?A.cloneElement(o,void 0,e.props.children(o.props.children)):null}return A.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function _e(e,t){const o={...t};for(const r in t){const n=e[r],l=t[r];/^on[A-Z]/.test(r)?n&&l?o[r]=(...m)=>{const p=l(...m);return n(...m),p}:n&&(o[r]=n):r==="style"?o[r]={...n,...l}:r==="className"&&(o[r]=[n,l].filter(Boolean).join(" "))}return{...e,...o}}I(_e,"mergeProps");function Me(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}I(Me,"getElementRef");function Oe(e){return A.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ge}I(Oe,"isSlottable");var io=Symbol.for("react.lazy");function le(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===io&&"_payload"in e&&Te(e._payload)}I(le,"isLazyComponent");function Te(e){return typeof e=="object"&&e!==null&&"then"in e}I(Te,"isPromiseLike");var ao=I(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),lo=I(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),J=Qe[" use ".trim().toString()];function Le(e){var t,o,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(o=Le(e[t]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function Ne(){for(var e,t,o=0,r="",n=arguments.length;o<n;o++)(e=arguments[o])&&(t=Le(e))&&(r&&(r+=" "),r+=t);return r}const co=(e,t)=>{const o=new Array(e.length+t.length);for(let r=0;r<e.length;r++)o[r]=e[r];for(let r=0;r<t.length;r++)o[e.length+r]=t[r];return o},uo=(e,t)=>({classGroupId:e,validator:t}),Ve=(e=new Map,t=null,o)=>({nextPart:e,validators:t,classGroupId:o}),ee="-",ke=[],mo="arbitrary..",fo=e=>{const t=bo(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return po(s);const m=s.split(ee),p=m[0]===""&&m.length>1?1:0;return We(m,p,t)},getConflictingClassGroupIds:(s,m)=>{if(m){const p=r[s],d=o[s];return p?d?co(d,p):p:d||ke}return o[s]||ke}}},We=(e,t,o)=>{if(e.length-t===0)return o.classGroupId;const n=e[t],l=o.nextPart.get(n);if(l){const d=We(e,t+1,l);if(d)return d}const s=o.validators;if(s===null)return;const m=t===0?e.join(ee):e.slice(t).join(ee),p=s.length;for(let d=0;d<p;d++){const b=s[d];if(b.validator(m))return b.classGroupId}},po=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),o=t.indexOf(":"),r=t.slice(0,o);return r?mo+r:void 0})(),bo=e=>{const{theme:t,classGroups:o}=e;return go(o,t)},go=(e,t)=>{const o=Ve();for(const r in e){const n=e[r];ue(n,o,r,t)}return o},ue=(e,t,o,r)=>{const n=e.length;for(let l=0;l<n;l++){const s=e[l];ho(s,t,o,r)}},ho=(e,t,o,r)=>{if(typeof e=="string"){yo(e,t,o);return}if(typeof e=="function"){xo(e,t,o,r);return}vo(e,t,o,r)},yo=(e,t,o)=>{const r=e===""?t:Fe(t,e);r.classGroupId=o},xo=(e,t,o,r)=>{if(ko(e)){ue(e(r),t,o,r);return}t.validators===null&&(t.validators=[]),t.validators.push(uo(o,e))},vo=(e,t,o,r)=>{const n=Object.entries(e),l=n.length;for(let s=0;s<l;s++){const[m,p]=n[s];ue(p,Fe(t,m),o,r)}},Fe=(e,t)=>{let o=e;const r=t.split(ee),n=r.length;for(let l=0;l<n;l++){const s=r[l];let m=o.nextPart.get(s);m||(m=Ve(),o.nextPart.set(s,m)),o=m}return o},ko=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,wo=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=Object.create(null),r=Object.create(null);const n=(l,s)=>{o[l]=s,t++,t>e&&(t=0,r=o,o=Object.create(null))};return{get(l){let s=o[l];if(s!==void 0)return s;if((s=r[l])!==void 0)return n(l,s),s},set(l,s){l in o?o[l]=s:n(l,s)}}},ce="!",we=":",Co=[],Ce=(e,t,o,r,n)=>({modifiers:e,hasImportantModifier:t,baseClassName:o,maybePostfixModifierPosition:r,isExternal:n}),zo=e=>{const{prefix:t,experimentalParseClassName:o}=e;let r=n=>{const l=[];let s=0,m=0,p=0,d;const b=n.length;for(let k=0;k<b;k++){const w=n[k];if(s===0&&m===0){if(w===we){l.push(n.slice(p,k)),p=k+1;continue}if(w==="/"){d=k;continue}}w==="["?s++:w==="]"?s--:w==="("?m++:w===")"&&m--}const g=l.length===0?n:n.slice(p);let y=g,v=!1;g.endsWith(ce)?(y=g.slice(0,-1),v=!0):g.startsWith(ce)&&(y=g.slice(1),v=!0);const P=d&&d>p?d-p:void 0;return Ce(l,v,y,P)};if(t){const n=t+we,l=r;r=s=>s.startsWith(n)?l(s.slice(n.length)):Ce(Co,!1,s,void 0,!0)}if(o){const n=r;r=l=>o({className:l,parseClassName:n})}return r},So=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((o,r)=>{t.set(o,1e6+r)}),o=>{const r=[];let n=[];for(let l=0;l<o.length;l++){const s=o[l],m=s[0]==="[",p=t.has(s);m||p?(n.length>0&&(n.sort(),r.push(...n),n=[]),r.push(s)):n.push(s)}return n.length>0&&(n.sort(),r.push(...n)),r}},Ro=e=>({cache:wo(e.cacheSize),parseClassName:zo(e),sortModifiers:So(e),postfixLookupClassGroupIds:Ao(e),...fo(e)}),Ao=e=>{const t=Object.create(null),o=e.postfixLookupClassGroups;if(o)for(let r=0;r<o.length;r++)t[o[r]]=!0;return t},Po=/\s+/,Eo=(e,t)=>{const{parseClassName:o,getClassGroupId:r,getConflictingClassGroupIds:n,sortModifiers:l,postfixLookupClassGroupIds:s}=t,m=[],p=e.trim().split(Po);let d="";for(let b=p.length-1;b>=0;b-=1){const g=p[b],{isExternal:y,modifiers:v,hasImportantModifier:P,baseClassName:k,maybePostfixModifierPosition:w}=o(g);if(y){d=g+(d.length>0?" "+d:d);continue}let T=!!w,S;if(T){const G=k.substring(0,w);S=r(G);const c=S&&s[S]?r(k):void 0;c&&c!==S&&(S=c,T=!1)}else S=r(k);if(!S){if(!T){d=g+(d.length>0?" "+d:d);continue}if(S=r(k),!S){d=g+(d.length>0?" "+d:d);continue}T=!1}const D=v.length===0?"":v.length===1?v[0]:l(v).join(":"),W=P?D+ce:D,F=W+S;if(m.indexOf(F)>-1)continue;m.push(F);const $=n(S,T);for(let G=0;G<$.length;++G){const c=$[G];m.push(W+c)}d=g+(d.length>0?" "+d:d)}return d},Io=(...e)=>{let t=0,o,r,n="";for(;t<e.length;)(o=e[t++])&&(r=$e(o))&&(n&&(n+=" "),n+=r);return n},$e=e=>{if(typeof e=="string")return e;let t,o="";for(let r=0;r<e.length;r++)e[r]&&(t=$e(e[r]))&&(o&&(o+=" "),o+=t);return o},jo=(e,...t)=>{let o,r,n,l;const s=p=>{const d=t.reduce((b,g)=>g(b),e());return o=Ro(d),r=o.cache.get,n=o.cache.set,l=m,m(p)},m=p=>{const d=r(p);if(d)return d;const b=Eo(p,o);return n(p,b),b};return l=s,(...p)=>l(Io(...p))},Go=[],h=e=>{const t=o=>o[e]||Go;return t.isThemeGetter=!0,t},Be=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,De=/^\((?:(\w[\w-]*):)?(.+)\)$/i,_o=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Mo=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Oo=/\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$/,To=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Lo=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,No=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,M=e=>_o.test(e),f=e=>!!e&&!Number.isNaN(Number(e)),j=e=>!!e&&Number.isInteger(Number(e)),ie=e=>e.endsWith("%")&&f(e.slice(0,-1)),_=e=>Mo.test(e),Ue=()=>!0,Vo=e=>Oo.test(e)&&!To.test(e),me=()=>!1,Wo=e=>Lo.test(e),Fo=e=>No.test(e),$o=e=>!i(e)&&!a(e),Bo=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),Do=e=>O(e,He,me),i=e=>Be.test(e),N=e=>O(e,Xe,Vo),ze=e=>O(e,Ko,f),Uo=e=>O(e,Je,Ue),Yo=e=>O(e,Ze,me),Se=e=>O(e,Ye,me),qo=e=>O(e,qe,Fo),K=e=>O(e,Ke,Wo),a=e=>De.test(e),U=e=>V(e,Xe),Ho=e=>V(e,Ze),Re=e=>V(e,Ye),Xo=e=>V(e,He),Zo=e=>V(e,qe),Q=e=>V(e,Ke,!0),Jo=e=>V(e,Je,!0),O=(e,t,o)=>{const r=Be.exec(e);return r?r[1]?t(r[1]):o(r[2]):!1},V=(e,t,o=!1)=>{const r=De.exec(e);return r?r[1]?t(r[1]):o:!1},Ye=e=>e==="position"||e==="percentage",qe=e=>e==="image"||e==="url",He=e=>e==="length"||e==="size"||e==="bg-size",Xe=e=>e==="length",Ko=e=>e==="number",Ze=e=>e==="family-name",Je=e=>e==="number"||e==="weight",Ke=e=>e==="shadow",Qo=()=>{const e=h("color"),t=h("font"),o=h("text"),r=h("font-weight"),n=h("tracking"),l=h("leading"),s=h("breakpoint"),m=h("container"),p=h("spacing"),d=h("radius"),b=h("shadow"),g=h("inset-shadow"),y=h("text-shadow"),v=h("drop-shadow"),P=h("blur"),k=h("perspective"),w=h("aspect"),T=h("ease"),S=h("animate"),D=()=>["auto","avoid","all","avoid-page","page","left","right","column"],W=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],F=()=>[...W(),a,i],$=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto","contain","none"],c=()=>[a,i,p],R=()=>[M,"full","auto",...c()],fe=()=>[j,"none","subgrid",a,i],pe=()=>["auto",{span:["full",j,a,i]},j,a,i],Y=()=>[j,"auto",a,i],be=()=>["auto","min","max","fr",a,i],oe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],B=()=>["start","end","center","stretch","center-safe","end-safe"],E=()=>["auto",...c()],L=()=>[M,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...c()],te=()=>[M,"screen","full","dvw","lvw","svw","min","max","fit",...c()],re=()=>[M,"screen","full","lh","dvh","lvh","svh","min","max","fit",...c()],u=()=>[e,a,i],ge=()=>[...W(),Re,Se,{position:[a,i]}],he=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ye=()=>["auto","cover","contain",Xo,Do,{size:[a,i]}],ne=()=>[ie,U,N],C=()=>["","none","full",d,a,i],z=()=>["",f,U,N],q=()=>["solid","dashed","dotted","double"],xe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],x=()=>[f,ie,Re,Se],ve=()=>["","none",P,a,i],H=()=>["none",f,a,i],X=()=>["none",f,a,i],se=()=>[f,a,i],Z=()=>[M,"full",...c()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[_],breakpoint:[_],color:[Ue],container:[_],"drop-shadow":[_],ease:["in","out","in-out"],font:[$o],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[_],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[_],shadow:[_],spacing:["px",f],text:[_],"text-shadow":[_],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",M,i,a,w]}],container:["container"],"container-type":[{"@container":["","normal","size",a,i]}],"container-named":[Bo],columns:[{columns:[f,i,a,m]}],"break-after":[{"break-after":D()}],"break-before":[{"break-before":D()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:F()}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:G()}],"overscroll-x":[{"overscroll-x":G()}],"overscroll-y":[{"overscroll-y":G()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:R()}],"inset-x":[{"inset-x":R()}],"inset-y":[{"inset-y":R()}],start:[{"inset-s":R(),start:R()}],end:[{"inset-e":R(),end:R()}],"inset-bs":[{"inset-bs":R()}],"inset-be":[{"inset-be":R()}],top:[{top:R()}],right:[{right:R()}],bottom:[{bottom:R()}],left:[{left:R()}],visibility:["visible","invisible","collapse"],z:[{z:[j,"auto",a,i]}],basis:[{basis:[M,"full","auto",m,...c()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[f,M,"auto","initial","none",i]}],grow:[{grow:["",f,a,i]}],shrink:[{shrink:["",f,a,i]}],order:[{order:[j,"first","last","none",a,i]}],"grid-cols":[{"grid-cols":fe()}],"col-start-end":[{col:pe()}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":fe()}],"row-start-end":[{row:pe()}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":be()}],"auto-rows":[{"auto-rows":be()}],gap:[{gap:c()}],"gap-x":[{"gap-x":c()}],"gap-y":[{"gap-y":c()}],"justify-content":[{justify:[...oe(),"normal"]}],"justify-items":[{"justify-items":[...B(),"normal"]}],"justify-self":[{"justify-self":["auto",...B()]}],"align-content":[{content:["normal",...oe()]}],"align-items":[{items:[...B(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...B(),{baseline:["","last"]}]}],"place-content":[{"place-content":oe()}],"place-items":[{"place-items":[...B(),"baseline"]}],"place-self":[{"place-self":["auto",...B()]}],p:[{p:c()}],px:[{px:c()}],py:[{py:c()}],ps:[{ps:c()}],pe:[{pe:c()}],pbs:[{pbs:c()}],pbe:[{pbe:c()}],pt:[{pt:c()}],pr:[{pr:c()}],pb:[{pb:c()}],pl:[{pl:c()}],m:[{m:E()}],mx:[{mx:E()}],my:[{my:E()}],ms:[{ms:E()}],me:[{me:E()}],mbs:[{mbs:E()}],mbe:[{mbe:E()}],mt:[{mt:E()}],mr:[{mr:E()}],mb:[{mb:E()}],ml:[{ml:E()}],"space-x":[{"space-x":c()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":c()}],"space-y-reverse":["space-y-reverse"],size:[{size:L()}],"inline-size":[{inline:["auto",...te()]}],"min-inline-size":[{"min-inline":["auto",...te()]}],"max-inline-size":[{"max-inline":["none",...te()]}],"block-size":[{block:["auto",...re()]}],"min-block-size":[{"min-block":["auto",...re()]}],"max-block-size":[{"max-block":["none",...re()]}],w:[{w:[m,"screen",...L()]}],"min-w":[{"min-w":[m,"screen","none",...L()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[s]},...L()]}],h:[{h:["screen","lh",...L()]}],"min-h":[{"min-h":["screen","lh","none",...L()]}],"max-h":[{"max-h":["screen","lh",...L()]}],"font-size":[{text:["base",o,U,N]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Jo,Uo]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ie,i]}],"font-family":[{font:[Ho,Yo,t]}],"font-features":[{"font-features":[i]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[n,a,i]}],"line-clamp":[{"line-clamp":[f,"none",a,ze]}],leading:[{leading:[l,...c()]}],"list-image":[{"list-image":["none",a,i]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",a,i]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:u()}],"text-color":[{text:u()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...q(),"wavy"]}],"text-decoration-thickness":[{decoration:[f,"from-font","auto",a,N]}],"text-decoration-color":[{decoration:u()}],"underline-offset":[{"underline-offset":[f,"auto",a,i]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:c()}],"tab-size":[{tab:[j,a,i]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",a,i]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",a,i]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ge()}],"bg-repeat":[{bg:he()}],"bg-size":[{bg:ye()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},j,a,i],radial:["",a,i],conic:[j,a,i]},Zo,qo]}],"bg-color":[{bg:u()}],"gradient-from-pos":[{from:ne()}],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:u()}],"gradient-via":[{via:u()}],"gradient-to":[{to:u()}],rounded:[{rounded:C()}],"rounded-s":[{"rounded-s":C()}],"rounded-e":[{"rounded-e":C()}],"rounded-t":[{"rounded-t":C()}],"rounded-r":[{"rounded-r":C()}],"rounded-b":[{"rounded-b":C()}],"rounded-l":[{"rounded-l":C()}],"rounded-ss":[{"rounded-ss":C()}],"rounded-se":[{"rounded-se":C()}],"rounded-ee":[{"rounded-ee":C()}],"rounded-es":[{"rounded-es":C()}],"rounded-tl":[{"rounded-tl":C()}],"rounded-tr":[{"rounded-tr":C()}],"rounded-br":[{"rounded-br":C()}],"rounded-bl":[{"rounded-bl":C()}],"border-w":[{border:z()}],"border-w-x":[{"border-x":z()}],"border-w-y":[{"border-y":z()}],"border-w-s":[{"border-s":z()}],"border-w-e":[{"border-e":z()}],"border-w-bs":[{"border-bs":z()}],"border-w-be":[{"border-be":z()}],"border-w-t":[{"border-t":z()}],"border-w-r":[{"border-r":z()}],"border-w-b":[{"border-b":z()}],"border-w-l":[{"border-l":z()}],"divide-x":[{"divide-x":z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...q(),"hidden","none"]}],"divide-style":[{divide:[...q(),"hidden","none"]}],"border-color":[{border:u()}],"border-color-x":[{"border-x":u()}],"border-color-y":[{"border-y":u()}],"border-color-s":[{"border-s":u()}],"border-color-e":[{"border-e":u()}],"border-color-bs":[{"border-bs":u()}],"border-color-be":[{"border-be":u()}],"border-color-t":[{"border-t":u()}],"border-color-r":[{"border-r":u()}],"border-color-b":[{"border-b":u()}],"border-color-l":[{"border-l":u()}],"divide-color":[{divide:u()}],"outline-style":[{outline:[...q(),"none","hidden"]}],"outline-offset":[{"outline-offset":[f,a,i]}],"outline-w":[{outline:["",f,U,N]}],"outline-color":[{outline:u()}],shadow:[{shadow:["","none",b,Q,K]}],"shadow-color":[{shadow:u()}],"inset-shadow":[{"inset-shadow":["none",g,Q,K]}],"inset-shadow-color":[{"inset-shadow":u()}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:u()}],"ring-offset-w":[{"ring-offset":[f,N]}],"ring-offset-color":[{"ring-offset":u()}],"inset-ring-w":[{"inset-ring":z()}],"inset-ring-color":[{"inset-ring":u()}],"text-shadow":[{"text-shadow":["none",y,Q,K]}],"text-shadow-color":[{"text-shadow":u()}],opacity:[{opacity:[f,a,i]}],"mix-blend":[{"mix-blend":[...xe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":xe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[f]}],"mask-image-linear-from-pos":[{"mask-linear-from":x()}],"mask-image-linear-to-pos":[{"mask-linear-to":x()}],"mask-image-linear-from-color":[{"mask-linear-from":u()}],"mask-image-linear-to-color":[{"mask-linear-to":u()}],"mask-image-t-from-pos":[{"mask-t-from":x()}],"mask-image-t-to-pos":[{"mask-t-to":x()}],"mask-image-t-from-color":[{"mask-t-from":u()}],"mask-image-t-to-color":[{"mask-t-to":u()}],"mask-image-r-from-pos":[{"mask-r-from":x()}],"mask-image-r-to-pos":[{"mask-r-to":x()}],"mask-image-r-from-color":[{"mask-r-from":u()}],"mask-image-r-to-color":[{"mask-r-to":u()}],"mask-image-b-from-pos":[{"mask-b-from":x()}],"mask-image-b-to-pos":[{"mask-b-to":x()}],"mask-image-b-from-color":[{"mask-b-from":u()}],"mask-image-b-to-color":[{"mask-b-to":u()}],"mask-image-l-from-pos":[{"mask-l-from":x()}],"mask-image-l-to-pos":[{"mask-l-to":x()}],"mask-image-l-from-color":[{"mask-l-from":u()}],"mask-image-l-to-color":[{"mask-l-to":u()}],"mask-image-x-from-pos":[{"mask-x-from":x()}],"mask-image-x-to-pos":[{"mask-x-to":x()}],"mask-image-x-from-color":[{"mask-x-from":u()}],"mask-image-x-to-color":[{"mask-x-to":u()}],"mask-image-y-from-pos":[{"mask-y-from":x()}],"mask-image-y-to-pos":[{"mask-y-to":x()}],"mask-image-y-from-color":[{"mask-y-from":u()}],"mask-image-y-to-color":[{"mask-y-to":u()}],"mask-image-radial":[{"mask-radial":[a,i]}],"mask-image-radial-from-pos":[{"mask-radial-from":x()}],"mask-image-radial-to-pos":[{"mask-radial-to":x()}],"mask-image-radial-from-color":[{"mask-radial-from":u()}],"mask-image-radial-to-color":[{"mask-radial-to":u()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":W()}],"mask-image-conic-pos":[{"mask-conic":[f]}],"mask-image-conic-from-pos":[{"mask-conic-from":x()}],"mask-image-conic-to-pos":[{"mask-conic-to":x()}],"mask-image-conic-from-color":[{"mask-conic-from":u()}],"mask-image-conic-to-color":[{"mask-conic-to":u()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ge()}],"mask-repeat":[{mask:he()}],"mask-size":[{mask:ye()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",a,i]}],filter:[{filter:["","none",a,i]}],blur:[{blur:ve()}],brightness:[{brightness:[f,a,i]}],contrast:[{contrast:[f,a,i]}],"drop-shadow":[{"drop-shadow":["","none",v,Q,K]}],"drop-shadow-color":[{"drop-shadow":u()}],grayscale:[{grayscale:["",f,a,i]}],"hue-rotate":[{"hue-rotate":[f,a,i]}],invert:[{invert:["",f,a,i]}],saturate:[{saturate:[f,a,i]}],sepia:[{sepia:["",f,a,i]}],"backdrop-filter":[{"backdrop-filter":["","none",a,i]}],"backdrop-blur":[{"backdrop-blur":ve()}],"backdrop-brightness":[{"backdrop-brightness":[f,a,i]}],"backdrop-contrast":[{"backdrop-contrast":[f,a,i]}],"backdrop-grayscale":[{"backdrop-grayscale":["",f,a,i]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f,a,i]}],"backdrop-invert":[{"backdrop-invert":["",f,a,i]}],"backdrop-opacity":[{"backdrop-opacity":[f,a,i]}],"backdrop-saturate":[{"backdrop-saturate":[f,a,i]}],"backdrop-sepia":[{"backdrop-sepia":["",f,a,i]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":c()}],"border-spacing-x":[{"border-spacing-x":c()}],"border-spacing-y":[{"border-spacing-y":c()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",a,i]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[f,"initial",a,i]}],ease:[{ease:["linear","initial",T,a,i]}],delay:[{delay:[f,a,i]}],animate:[{animate:["none",S,a,i]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,a,i]}],"perspective-origin":[{"perspective-origin":F()}],rotate:[{rotate:H()}],"rotate-x":[{"rotate-x":H()}],"rotate-y":[{"rotate-y":H()}],"rotate-z":[{"rotate-z":H()}],scale:[{scale:X()}],"scale-x":[{"scale-x":X()}],"scale-y":[{"scale-y":X()}],"scale-z":[{"scale-z":X()}],"scale-3d":["scale-3d"],skew:[{skew:se()}],"skew-x":[{"skew-x":se()}],"skew-y":[{"skew-y":se()}],transform:[{transform:[a,i,"","none","gpu","cpu"]}],"transform-origin":[{origin:F()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Z()}],"translate-x":[{"translate-x":Z()}],"translate-y":[{"translate-y":Z()}],"translate-z":[{"translate-z":Z()}],"translate-none":["translate-none"],zoom:[{zoom:[j,a,i]}],accent:[{accent:u()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:u()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",a,i]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":u()}],"scrollbar-track-color":[{"scrollbar-track":u()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":c()}],"scroll-mx":[{"scroll-mx":c()}],"scroll-my":[{"scroll-my":c()}],"scroll-ms":[{"scroll-ms":c()}],"scroll-me":[{"scroll-me":c()}],"scroll-mbs":[{"scroll-mbs":c()}],"scroll-mbe":[{"scroll-mbe":c()}],"scroll-mt":[{"scroll-mt":c()}],"scroll-mr":[{"scroll-mr":c()}],"scroll-mb":[{"scroll-mb":c()}],"scroll-ml":[{"scroll-ml":c()}],"scroll-p":[{"scroll-p":c()}],"scroll-px":[{"scroll-px":c()}],"scroll-py":[{"scroll-py":c()}],"scroll-ps":[{"scroll-ps":c()}],"scroll-pe":[{"scroll-pe":c()}],"scroll-pbs":[{"scroll-pbs":c()}],"scroll-pbe":[{"scroll-pbe":c()}],"scroll-pt":[{"scroll-pt":c()}],"scroll-pr":[{"scroll-pr":c()}],"scroll-pb":[{"scroll-pb":c()}],"scroll-pl":[{"scroll-pl":c()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",a,i]}],fill:[{fill:["none",...u()]}],"stroke-w":[{stroke:[f,U,N,ze]}],stroke:[{stroke:["none",...u()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},et=jo(Qo);function ot(...e){return et(Ne(e))}const Ae=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Pe=Ne,tt=(e,t)=>o=>{var r;if(t?.variants==null)return Pe(e,o?.class,o?.className);const{variants:n,defaultVariants:l}=t,s=Object.keys(n).map(d=>{const b=o?.[d],g=l?.[d];if(b===null)return null;const y=Ae(b)||Ae(g);return n[d][y]}),m=o&&Object.entries(o).reduce((d,b)=>{let[g,y]=b;return y===void 0||(d[g]=y),d},{}),p=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,b)=>{let{class:g,className:y,...v}=b;return Object.entries(v).every(P=>{let[k,w]=P;return Array.isArray(w)?w.includes({...l,...m}[k]):{...l,...m}[k]===w})?[...d,g,y]:d},[]);return Pe(e,s,p,o?.class,o?.className)},at="focus:[outline:none] focus:[box-shadow:none] focus:border-ring focus-visible:[outline:none] focus-visible:border-2 focus-visible:border-ring",lt="focus:outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",rt="focus:outline-none focus:ring-0 focus-visible:outline-none",nt=tt(`inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors active:translate-y-px ${rt} disabled:pointer-events-none disabled:opacity-50`,{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90 focus-visible:bg-primary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:bg-destructive/80",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground focus-visible:border-ring focus-visible:bg-accent focus-visible:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 focus-visible:bg-secondary/70",ghost:"hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline focus-visible:underline",subtle:"bg-muted text-muted-foreground hover:bg-muted/80 focus-visible:bg-muted/60"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),st=A.forwardRef(({className:e,variant:t,size:o,asChild:r=!1,...n},l)=>{const s=r?ro:"button";return eo.jsx(s,{className:ot(nt({variant:t,size:o,className:e})),ref:l,...n})});st.displayName="Button";export{st as B,ro as S,tt as a,je as b,ot as c,at as d,no as e,rt as f,Ne as g,lt as i,Ie as u};
|
|
1
|
+
import{r as A,R as Qe,j as eo}from"./XpodThemeProvider-DyX0rUID.js";var oo=Object.defineProperty,de=(e,t)=>oo(e,"name",{value:t,configurable:!0});function ae(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}de(ae,"setRef");function Ee(...e){return t=>{let o=!1;const r=e.map(n=>{const l=ae(n,t);return!o&&typeof l=="function"&&(o=!0),l});if(o)return()=>{for(let n=0;n<r.length;n++){const l=r[n];typeof l=="function"?l():ae(e[n],null)}}}}de(Ee,"composeRefs");function Ie(...e){return A.useCallback(Ee(...e),e)}de(Ie,"useComposedRefs");var to=Object.defineProperty,I=(e,t)=>to(e,"name",{value:t,configurable:!0});function je(e){const t=A.forwardRef((o,r)=>{let{children:n,...l}=o,s=null,m=!1;const p=[];le(n)&&typeof J=="function"&&(n=J(n._payload)),A.Children.forEach(n,y=>{if(Oe(y)){m=!0;const v=y;let P="child"in v.props?v.props.child:v.props.children;le(P)&&typeof J=="function"&&(P=J(P._payload)),s=so(v,P),p.push(s?.props?.children)}else p.push(y)}),s?s=A.cloneElement(s,void 0,p):!m&&A.Children.count(n)===1&&A.isValidElement(n)&&(s=n);const d=s?Me(s):void 0,b=Ie(r,d);if(!s){if(n||n===0)throw new Error(m?lo(e):ao(e));return n}const g=_e(l,s.props??{});return s.type!==A.Fragment&&(g.ref=r?b:d),A.cloneElement(s,g)});return t.displayName=`${e}.Slot`,t}I(je,"createSlot");var ro=je("Slot"),Ge=Symbol.for("radix.slottable");function no(e){const t=I(o=>"child"in o?o.children(o.child):o.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=Ge,t}I(no,"createSlottable");var so=I((e,t)=>{if("child"in e.props){const o=e.props.child;return A.isValidElement(o)?A.cloneElement(o,void 0,e.props.children(o.props.children)):null}return A.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function _e(e,t){const o={...t};for(const r in t){const n=e[r],l=t[r];/^on[A-Z]/.test(r)?n&&l?o[r]=(...m)=>{const p=l(...m);return n(...m),p}:n&&(o[r]=n):r==="style"?o[r]={...n,...l}:r==="className"&&(o[r]=[n,l].filter(Boolean).join(" "))}return{...e,...o}}I(_e,"mergeProps");function Me(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}I(Me,"getElementRef");function Oe(e){return A.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ge}I(Oe,"isSlottable");var io=Symbol.for("react.lazy");function le(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===io&&"_payload"in e&&Te(e._payload)}I(le,"isLazyComponent");function Te(e){return typeof e=="object"&&e!==null&&"then"in e}I(Te,"isPromiseLike");var ao=I(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),lo=I(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),J=Qe[" use ".trim().toString()];function Le(e){var t,o,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(o=Le(e[t]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function Ne(){for(var e,t,o=0,r="",n=arguments.length;o<n;o++)(e=arguments[o])&&(t=Le(e))&&(r&&(r+=" "),r+=t);return r}const co=(e,t)=>{const o=new Array(e.length+t.length);for(let r=0;r<e.length;r++)o[r]=e[r];for(let r=0;r<t.length;r++)o[e.length+r]=t[r];return o},uo=(e,t)=>({classGroupId:e,validator:t}),Ve=(e=new Map,t=null,o)=>({nextPart:e,validators:t,classGroupId:o}),ee="-",ke=[],mo="arbitrary..",fo=e=>{const t=bo(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return po(s);const m=s.split(ee),p=m[0]===""&&m.length>1?1:0;return We(m,p,t)},getConflictingClassGroupIds:(s,m)=>{if(m){const p=r[s],d=o[s];return p?d?co(d,p):p:d||ke}return o[s]||ke}}},We=(e,t,o)=>{if(e.length-t===0)return o.classGroupId;const n=e[t],l=o.nextPart.get(n);if(l){const d=We(e,t+1,l);if(d)return d}const s=o.validators;if(s===null)return;const m=t===0?e.join(ee):e.slice(t).join(ee),p=s.length;for(let d=0;d<p;d++){const b=s[d];if(b.validator(m))return b.classGroupId}},po=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),o=t.indexOf(":"),r=t.slice(0,o);return r?mo+r:void 0})(),bo=e=>{const{theme:t,classGroups:o}=e;return go(o,t)},go=(e,t)=>{const o=Ve();for(const r in e){const n=e[r];ue(n,o,r,t)}return o},ue=(e,t,o,r)=>{const n=e.length;for(let l=0;l<n;l++){const s=e[l];ho(s,t,o,r)}},ho=(e,t,o,r)=>{if(typeof e=="string"){yo(e,t,o);return}if(typeof e=="function"){xo(e,t,o,r);return}vo(e,t,o,r)},yo=(e,t,o)=>{const r=e===""?t:Fe(t,e);r.classGroupId=o},xo=(e,t,o,r)=>{if(ko(e)){ue(e(r),t,o,r);return}t.validators===null&&(t.validators=[]),t.validators.push(uo(o,e))},vo=(e,t,o,r)=>{const n=Object.entries(e),l=n.length;for(let s=0;s<l;s++){const[m,p]=n[s];ue(p,Fe(t,m),o,r)}},Fe=(e,t)=>{let o=e;const r=t.split(ee),n=r.length;for(let l=0;l<n;l++){const s=r[l];let m=o.nextPart.get(s);m||(m=Ve(),o.nextPart.set(s,m)),o=m}return o},ko=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,wo=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=Object.create(null),r=Object.create(null);const n=(l,s)=>{o[l]=s,t++,t>e&&(t=0,r=o,o=Object.create(null))};return{get(l){let s=o[l];if(s!==void 0)return s;if((s=r[l])!==void 0)return n(l,s),s},set(l,s){l in o?o[l]=s:n(l,s)}}},ce="!",we=":",Co=[],Ce=(e,t,o,r,n)=>({modifiers:e,hasImportantModifier:t,baseClassName:o,maybePostfixModifierPosition:r,isExternal:n}),zo=e=>{const{prefix:t,experimentalParseClassName:o}=e;let r=n=>{const l=[];let s=0,m=0,p=0,d;const b=n.length;for(let k=0;k<b;k++){const w=n[k];if(s===0&&m===0){if(w===we){l.push(n.slice(p,k)),p=k+1;continue}if(w==="/"){d=k;continue}}w==="["?s++:w==="]"?s--:w==="("?m++:w===")"&&m--}const g=l.length===0?n:n.slice(p);let y=g,v=!1;g.endsWith(ce)?(y=g.slice(0,-1),v=!0):g.startsWith(ce)&&(y=g.slice(1),v=!0);const P=d&&d>p?d-p:void 0;return Ce(l,v,y,P)};if(t){const n=t+we,l=r;r=s=>s.startsWith(n)?l(s.slice(n.length)):Ce(Co,!1,s,void 0,!0)}if(o){const n=r;r=l=>o({className:l,parseClassName:n})}return r},So=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((o,r)=>{t.set(o,1e6+r)}),o=>{const r=[];let n=[];for(let l=0;l<o.length;l++){const s=o[l],m=s[0]==="[",p=t.has(s);m||p?(n.length>0&&(n.sort(),r.push(...n),n=[]),r.push(s)):n.push(s)}return n.length>0&&(n.sort(),r.push(...n)),r}},Ro=e=>({cache:wo(e.cacheSize),parseClassName:zo(e),sortModifiers:So(e),postfixLookupClassGroupIds:Ao(e),...fo(e)}),Ao=e=>{const t=Object.create(null),o=e.postfixLookupClassGroups;if(o)for(let r=0;r<o.length;r++)t[o[r]]=!0;return t},Po=/\s+/,Eo=(e,t)=>{const{parseClassName:o,getClassGroupId:r,getConflictingClassGroupIds:n,sortModifiers:l,postfixLookupClassGroupIds:s}=t,m=[],p=e.trim().split(Po);let d="";for(let b=p.length-1;b>=0;b-=1){const g=p[b],{isExternal:y,modifiers:v,hasImportantModifier:P,baseClassName:k,maybePostfixModifierPosition:w}=o(g);if(y){d=g+(d.length>0?" "+d:d);continue}let T=!!w,S;if(T){const G=k.substring(0,w);S=r(G);const c=S&&s[S]?r(k):void 0;c&&c!==S&&(S=c,T=!1)}else S=r(k);if(!S){if(!T){d=g+(d.length>0?" "+d:d);continue}if(S=r(k),!S){d=g+(d.length>0?" "+d:d);continue}T=!1}const D=v.length===0?"":v.length===1?v[0]:l(v).join(":"),W=P?D+ce:D,F=W+S;if(m.indexOf(F)>-1)continue;m.push(F);const $=n(S,T);for(let G=0;G<$.length;++G){const c=$[G];m.push(W+c)}d=g+(d.length>0?" "+d:d)}return d},Io=(...e)=>{let t=0,o,r,n="";for(;t<e.length;)(o=e[t++])&&(r=$e(o))&&(n&&(n+=" "),n+=r);return n},$e=e=>{if(typeof e=="string")return e;let t,o="";for(let r=0;r<e.length;r++)e[r]&&(t=$e(e[r]))&&(o&&(o+=" "),o+=t);return o},jo=(e,...t)=>{let o,r,n,l;const s=p=>{const d=t.reduce((b,g)=>g(b),e());return o=Ro(d),r=o.cache.get,n=o.cache.set,l=m,m(p)},m=p=>{const d=r(p);if(d)return d;const b=Eo(p,o);return n(p,b),b};return l=s,(...p)=>l(Io(...p))},Go=[],h=e=>{const t=o=>o[e]||Go;return t.isThemeGetter=!0,t},Be=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,De=/^\((?:(\w[\w-]*):)?(.+)\)$/i,_o=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Mo=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Oo=/\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$/,To=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Lo=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,No=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,M=e=>_o.test(e),f=e=>!!e&&!Number.isNaN(Number(e)),j=e=>!!e&&Number.isInteger(Number(e)),ie=e=>e.endsWith("%")&&f(e.slice(0,-1)),_=e=>Mo.test(e),Ue=()=>!0,Vo=e=>Oo.test(e)&&!To.test(e),me=()=>!1,Wo=e=>Lo.test(e),Fo=e=>No.test(e),$o=e=>!i(e)&&!a(e),Bo=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),Do=e=>O(e,He,me),i=e=>Be.test(e),N=e=>O(e,Xe,Vo),ze=e=>O(e,Ko,f),Uo=e=>O(e,Je,Ue),Yo=e=>O(e,Ze,me),Se=e=>O(e,Ye,me),qo=e=>O(e,qe,Fo),K=e=>O(e,Ke,Wo),a=e=>De.test(e),U=e=>V(e,Xe),Ho=e=>V(e,Ze),Re=e=>V(e,Ye),Xo=e=>V(e,He),Zo=e=>V(e,qe),Q=e=>V(e,Ke,!0),Jo=e=>V(e,Je,!0),O=(e,t,o)=>{const r=Be.exec(e);return r?r[1]?t(r[1]):o(r[2]):!1},V=(e,t,o=!1)=>{const r=De.exec(e);return r?r[1]?t(r[1]):o:!1},Ye=e=>e==="position"||e==="percentage",qe=e=>e==="image"||e==="url",He=e=>e==="length"||e==="size"||e==="bg-size",Xe=e=>e==="length",Ko=e=>e==="number",Ze=e=>e==="family-name",Je=e=>e==="number"||e==="weight",Ke=e=>e==="shadow",Qo=()=>{const e=h("color"),t=h("font"),o=h("text"),r=h("font-weight"),n=h("tracking"),l=h("leading"),s=h("breakpoint"),m=h("container"),p=h("spacing"),d=h("radius"),b=h("shadow"),g=h("inset-shadow"),y=h("text-shadow"),v=h("drop-shadow"),P=h("blur"),k=h("perspective"),w=h("aspect"),T=h("ease"),S=h("animate"),D=()=>["auto","avoid","all","avoid-page","page","left","right","column"],W=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],F=()=>[...W(),a,i],$=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto","contain","none"],c=()=>[a,i,p],R=()=>[M,"full","auto",...c()],fe=()=>[j,"none","subgrid",a,i],pe=()=>["auto",{span:["full",j,a,i]},j,a,i],Y=()=>[j,"auto",a,i],be=()=>["auto","min","max","fr",a,i],oe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],B=()=>["start","end","center","stretch","center-safe","end-safe"],E=()=>["auto",...c()],L=()=>[M,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...c()],te=()=>[M,"screen","full","dvw","lvw","svw","min","max","fit",...c()],re=()=>[M,"screen","full","lh","dvh","lvh","svh","min","max","fit",...c()],u=()=>[e,a,i],ge=()=>[...W(),Re,Se,{position:[a,i]}],he=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ye=()=>["auto","cover","contain",Xo,Do,{size:[a,i]}],ne=()=>[ie,U,N],C=()=>["","none","full",d,a,i],z=()=>["",f,U,N],q=()=>["solid","dashed","dotted","double"],xe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],x=()=>[f,ie,Re,Se],ve=()=>["","none",P,a,i],H=()=>["none",f,a,i],X=()=>["none",f,a,i],se=()=>[f,a,i],Z=()=>[M,"full",...c()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[_],breakpoint:[_],color:[Ue],container:[_],"drop-shadow":[_],ease:["in","out","in-out"],font:[$o],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[_],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[_],shadow:[_],spacing:["px",f],text:[_],"text-shadow":[_],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",M,i,a,w]}],container:["container"],"container-type":[{"@container":["","normal","size",a,i]}],"container-named":[Bo],columns:[{columns:[f,i,a,m]}],"break-after":[{"break-after":D()}],"break-before":[{"break-before":D()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:F()}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:G()}],"overscroll-x":[{"overscroll-x":G()}],"overscroll-y":[{"overscroll-y":G()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:R()}],"inset-x":[{"inset-x":R()}],"inset-y":[{"inset-y":R()}],start:[{"inset-s":R(),start:R()}],end:[{"inset-e":R(),end:R()}],"inset-bs":[{"inset-bs":R()}],"inset-be":[{"inset-be":R()}],top:[{top:R()}],right:[{right:R()}],bottom:[{bottom:R()}],left:[{left:R()}],visibility:["visible","invisible","collapse"],z:[{z:[j,"auto",a,i]}],basis:[{basis:[M,"full","auto",m,...c()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[f,M,"auto","initial","none",i]}],grow:[{grow:["",f,a,i]}],shrink:[{shrink:["",f,a,i]}],order:[{order:[j,"first","last","none",a,i]}],"grid-cols":[{"grid-cols":fe()}],"col-start-end":[{col:pe()}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":fe()}],"row-start-end":[{row:pe()}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":be()}],"auto-rows":[{"auto-rows":be()}],gap:[{gap:c()}],"gap-x":[{"gap-x":c()}],"gap-y":[{"gap-y":c()}],"justify-content":[{justify:[...oe(),"normal"]}],"justify-items":[{"justify-items":[...B(),"normal"]}],"justify-self":[{"justify-self":["auto",...B()]}],"align-content":[{content:["normal",...oe()]}],"align-items":[{items:[...B(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...B(),{baseline:["","last"]}]}],"place-content":[{"place-content":oe()}],"place-items":[{"place-items":[...B(),"baseline"]}],"place-self":[{"place-self":["auto",...B()]}],p:[{p:c()}],px:[{px:c()}],py:[{py:c()}],ps:[{ps:c()}],pe:[{pe:c()}],pbs:[{pbs:c()}],pbe:[{pbe:c()}],pt:[{pt:c()}],pr:[{pr:c()}],pb:[{pb:c()}],pl:[{pl:c()}],m:[{m:E()}],mx:[{mx:E()}],my:[{my:E()}],ms:[{ms:E()}],me:[{me:E()}],mbs:[{mbs:E()}],mbe:[{mbe:E()}],mt:[{mt:E()}],mr:[{mr:E()}],mb:[{mb:E()}],ml:[{ml:E()}],"space-x":[{"space-x":c()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":c()}],"space-y-reverse":["space-y-reverse"],size:[{size:L()}],"inline-size":[{inline:["auto",...te()]}],"min-inline-size":[{"min-inline":["auto",...te()]}],"max-inline-size":[{"max-inline":["none",...te()]}],"block-size":[{block:["auto",...re()]}],"min-block-size":[{"min-block":["auto",...re()]}],"max-block-size":[{"max-block":["none",...re()]}],w:[{w:[m,"screen",...L()]}],"min-w":[{"min-w":[m,"screen","none",...L()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[s]},...L()]}],h:[{h:["screen","lh",...L()]}],"min-h":[{"min-h":["screen","lh","none",...L()]}],"max-h":[{"max-h":["screen","lh",...L()]}],"font-size":[{text:["base",o,U,N]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Jo,Uo]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ie,i]}],"font-family":[{font:[Ho,Yo,t]}],"font-features":[{"font-features":[i]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[n,a,i]}],"line-clamp":[{"line-clamp":[f,"none",a,ze]}],leading:[{leading:[l,...c()]}],"list-image":[{"list-image":["none",a,i]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",a,i]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:u()}],"text-color":[{text:u()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...q(),"wavy"]}],"text-decoration-thickness":[{decoration:[f,"from-font","auto",a,N]}],"text-decoration-color":[{decoration:u()}],"underline-offset":[{"underline-offset":[f,"auto",a,i]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:c()}],"tab-size":[{tab:[j,a,i]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",a,i]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",a,i]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ge()}],"bg-repeat":[{bg:he()}],"bg-size":[{bg:ye()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},j,a,i],radial:["",a,i],conic:[j,a,i]},Zo,qo]}],"bg-color":[{bg:u()}],"gradient-from-pos":[{from:ne()}],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:u()}],"gradient-via":[{via:u()}],"gradient-to":[{to:u()}],rounded:[{rounded:C()}],"rounded-s":[{"rounded-s":C()}],"rounded-e":[{"rounded-e":C()}],"rounded-t":[{"rounded-t":C()}],"rounded-r":[{"rounded-r":C()}],"rounded-b":[{"rounded-b":C()}],"rounded-l":[{"rounded-l":C()}],"rounded-ss":[{"rounded-ss":C()}],"rounded-se":[{"rounded-se":C()}],"rounded-ee":[{"rounded-ee":C()}],"rounded-es":[{"rounded-es":C()}],"rounded-tl":[{"rounded-tl":C()}],"rounded-tr":[{"rounded-tr":C()}],"rounded-br":[{"rounded-br":C()}],"rounded-bl":[{"rounded-bl":C()}],"border-w":[{border:z()}],"border-w-x":[{"border-x":z()}],"border-w-y":[{"border-y":z()}],"border-w-s":[{"border-s":z()}],"border-w-e":[{"border-e":z()}],"border-w-bs":[{"border-bs":z()}],"border-w-be":[{"border-be":z()}],"border-w-t":[{"border-t":z()}],"border-w-r":[{"border-r":z()}],"border-w-b":[{"border-b":z()}],"border-w-l":[{"border-l":z()}],"divide-x":[{"divide-x":z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...q(),"hidden","none"]}],"divide-style":[{divide:[...q(),"hidden","none"]}],"border-color":[{border:u()}],"border-color-x":[{"border-x":u()}],"border-color-y":[{"border-y":u()}],"border-color-s":[{"border-s":u()}],"border-color-e":[{"border-e":u()}],"border-color-bs":[{"border-bs":u()}],"border-color-be":[{"border-be":u()}],"border-color-t":[{"border-t":u()}],"border-color-r":[{"border-r":u()}],"border-color-b":[{"border-b":u()}],"border-color-l":[{"border-l":u()}],"divide-color":[{divide:u()}],"outline-style":[{outline:[...q(),"none","hidden"]}],"outline-offset":[{"outline-offset":[f,a,i]}],"outline-w":[{outline:["",f,U,N]}],"outline-color":[{outline:u()}],shadow:[{shadow:["","none",b,Q,K]}],"shadow-color":[{shadow:u()}],"inset-shadow":[{"inset-shadow":["none",g,Q,K]}],"inset-shadow-color":[{"inset-shadow":u()}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:u()}],"ring-offset-w":[{"ring-offset":[f,N]}],"ring-offset-color":[{"ring-offset":u()}],"inset-ring-w":[{"inset-ring":z()}],"inset-ring-color":[{"inset-ring":u()}],"text-shadow":[{"text-shadow":["none",y,Q,K]}],"text-shadow-color":[{"text-shadow":u()}],opacity:[{opacity:[f,a,i]}],"mix-blend":[{"mix-blend":[...xe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":xe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[f]}],"mask-image-linear-from-pos":[{"mask-linear-from":x()}],"mask-image-linear-to-pos":[{"mask-linear-to":x()}],"mask-image-linear-from-color":[{"mask-linear-from":u()}],"mask-image-linear-to-color":[{"mask-linear-to":u()}],"mask-image-t-from-pos":[{"mask-t-from":x()}],"mask-image-t-to-pos":[{"mask-t-to":x()}],"mask-image-t-from-color":[{"mask-t-from":u()}],"mask-image-t-to-color":[{"mask-t-to":u()}],"mask-image-r-from-pos":[{"mask-r-from":x()}],"mask-image-r-to-pos":[{"mask-r-to":x()}],"mask-image-r-from-color":[{"mask-r-from":u()}],"mask-image-r-to-color":[{"mask-r-to":u()}],"mask-image-b-from-pos":[{"mask-b-from":x()}],"mask-image-b-to-pos":[{"mask-b-to":x()}],"mask-image-b-from-color":[{"mask-b-from":u()}],"mask-image-b-to-color":[{"mask-b-to":u()}],"mask-image-l-from-pos":[{"mask-l-from":x()}],"mask-image-l-to-pos":[{"mask-l-to":x()}],"mask-image-l-from-color":[{"mask-l-from":u()}],"mask-image-l-to-color":[{"mask-l-to":u()}],"mask-image-x-from-pos":[{"mask-x-from":x()}],"mask-image-x-to-pos":[{"mask-x-to":x()}],"mask-image-x-from-color":[{"mask-x-from":u()}],"mask-image-x-to-color":[{"mask-x-to":u()}],"mask-image-y-from-pos":[{"mask-y-from":x()}],"mask-image-y-to-pos":[{"mask-y-to":x()}],"mask-image-y-from-color":[{"mask-y-from":u()}],"mask-image-y-to-color":[{"mask-y-to":u()}],"mask-image-radial":[{"mask-radial":[a,i]}],"mask-image-radial-from-pos":[{"mask-radial-from":x()}],"mask-image-radial-to-pos":[{"mask-radial-to":x()}],"mask-image-radial-from-color":[{"mask-radial-from":u()}],"mask-image-radial-to-color":[{"mask-radial-to":u()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":W()}],"mask-image-conic-pos":[{"mask-conic":[f]}],"mask-image-conic-from-pos":[{"mask-conic-from":x()}],"mask-image-conic-to-pos":[{"mask-conic-to":x()}],"mask-image-conic-from-color":[{"mask-conic-from":u()}],"mask-image-conic-to-color":[{"mask-conic-to":u()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ge()}],"mask-repeat":[{mask:he()}],"mask-size":[{mask:ye()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",a,i]}],filter:[{filter:["","none",a,i]}],blur:[{blur:ve()}],brightness:[{brightness:[f,a,i]}],contrast:[{contrast:[f,a,i]}],"drop-shadow":[{"drop-shadow":["","none",v,Q,K]}],"drop-shadow-color":[{"drop-shadow":u()}],grayscale:[{grayscale:["",f,a,i]}],"hue-rotate":[{"hue-rotate":[f,a,i]}],invert:[{invert:["",f,a,i]}],saturate:[{saturate:[f,a,i]}],sepia:[{sepia:["",f,a,i]}],"backdrop-filter":[{"backdrop-filter":["","none",a,i]}],"backdrop-blur":[{"backdrop-blur":ve()}],"backdrop-brightness":[{"backdrop-brightness":[f,a,i]}],"backdrop-contrast":[{"backdrop-contrast":[f,a,i]}],"backdrop-grayscale":[{"backdrop-grayscale":["",f,a,i]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f,a,i]}],"backdrop-invert":[{"backdrop-invert":["",f,a,i]}],"backdrop-opacity":[{"backdrop-opacity":[f,a,i]}],"backdrop-saturate":[{"backdrop-saturate":[f,a,i]}],"backdrop-sepia":[{"backdrop-sepia":["",f,a,i]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":c()}],"border-spacing-x":[{"border-spacing-x":c()}],"border-spacing-y":[{"border-spacing-y":c()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",a,i]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[f,"initial",a,i]}],ease:[{ease:["linear","initial",T,a,i]}],delay:[{delay:[f,a,i]}],animate:[{animate:["none",S,a,i]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,a,i]}],"perspective-origin":[{"perspective-origin":F()}],rotate:[{rotate:H()}],"rotate-x":[{"rotate-x":H()}],"rotate-y":[{"rotate-y":H()}],"rotate-z":[{"rotate-z":H()}],scale:[{scale:X()}],"scale-x":[{"scale-x":X()}],"scale-y":[{"scale-y":X()}],"scale-z":[{"scale-z":X()}],"scale-3d":["scale-3d"],skew:[{skew:se()}],"skew-x":[{"skew-x":se()}],"skew-y":[{"skew-y":se()}],transform:[{transform:[a,i,"","none","gpu","cpu"]}],"transform-origin":[{origin:F()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Z()}],"translate-x":[{"translate-x":Z()}],"translate-y":[{"translate-y":Z()}],"translate-z":[{"translate-z":Z()}],"translate-none":["translate-none"],zoom:[{zoom:[j,a,i]}],accent:[{accent:u()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:u()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",a,i]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":u()}],"scrollbar-track-color":[{"scrollbar-track":u()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":c()}],"scroll-mx":[{"scroll-mx":c()}],"scroll-my":[{"scroll-my":c()}],"scroll-ms":[{"scroll-ms":c()}],"scroll-me":[{"scroll-me":c()}],"scroll-mbs":[{"scroll-mbs":c()}],"scroll-mbe":[{"scroll-mbe":c()}],"scroll-mt":[{"scroll-mt":c()}],"scroll-mr":[{"scroll-mr":c()}],"scroll-mb":[{"scroll-mb":c()}],"scroll-ml":[{"scroll-ml":c()}],"scroll-p":[{"scroll-p":c()}],"scroll-px":[{"scroll-px":c()}],"scroll-py":[{"scroll-py":c()}],"scroll-ps":[{"scroll-ps":c()}],"scroll-pe":[{"scroll-pe":c()}],"scroll-pbs":[{"scroll-pbs":c()}],"scroll-pbe":[{"scroll-pbe":c()}],"scroll-pt":[{"scroll-pt":c()}],"scroll-pr":[{"scroll-pr":c()}],"scroll-pb":[{"scroll-pb":c()}],"scroll-pl":[{"scroll-pl":c()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",a,i]}],fill:[{fill:["none",...u()]}],"stroke-w":[{stroke:[f,U,N,ze]}],stroke:[{stroke:["none",...u()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},et=jo(Qo);function ot(...e){return et(Ne(e))}const Ae=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Pe=Ne,tt=(e,t)=>o=>{var r;if(t?.variants==null)return Pe(e,o?.class,o?.className);const{variants:n,defaultVariants:l}=t,s=Object.keys(n).map(d=>{const b=o?.[d],g=l?.[d];if(b===null)return null;const y=Ae(b)||Ae(g);return n[d][y]}),m=o&&Object.entries(o).reduce((d,b)=>{let[g,y]=b;return y===void 0||(d[g]=y),d},{}),p=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,b)=>{let{class:g,className:y,...v}=b;return Object.entries(v).every(P=>{let[k,w]=P;return Array.isArray(w)?w.includes({...l,...m}[k]):{...l,...m}[k]===w})?[...d,g,y]:d},[]);return Pe(e,s,p,o?.class,o?.className)},at="focus:[outline:none] focus:[box-shadow:none] focus:border-ring focus-visible:[outline:none] focus-visible:border-2 focus-visible:border-ring",lt="focus:outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",rt="focus:outline-none focus:ring-0 focus-visible:outline-none",nt=tt(`inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors active:translate-y-px ${rt} disabled:pointer-events-none disabled:opacity-50`,{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90 focus-visible:bg-primary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:bg-destructive/80",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground focus-visible:border-ring focus-visible:bg-accent focus-visible:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 focus-visible:bg-secondary/70",ghost:"hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline focus-visible:underline",subtle:"bg-muted text-muted-foreground hover:bg-muted/80 focus-visible:bg-muted/60"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),st=A.forwardRef(({className:e,variant:t,size:o,asChild:r=!1,...n},l)=>{const s=r?ro:"button";return eo.jsx(s,{className:ot(nt({variant:t,size:o,className:e})),ref:l,...n})});st.displayName="Button";export{st as B,ro as S,tt as a,je as b,ot as c,at as d,no as e,rt as f,Ne as g,lt as i,Ie as u};
|
package/static/settings/assets/{collection-runtime-hK37-47o.js → collection-runtime-CARp4Cii.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as w,a as u,b,s as U,d as L,o as x,n as K,e as P,f as R,g as _}from"./XpodAiConnectionsPodStore-
|
|
1
|
+
import{c as w,a as u,b,s as U,d as L,o as x,n as K,e as P,f as R,g as _}from"./XpodAiConnectionsPodStore-BJm-rFPs.js";import"./xpod-remembered-login-YAmn8ZiP.js";import{c as O}from"./ModelsPage-6567dZKQ.js";import{r as I}from"./layout-DB3pMyTl.js";import"./createLucideIcon-BIwq0vQx.js";import"./XpodThemeProvider-DyX0rUID.js";import"./button-CV4KJ59A.js";import"./PodDeletionAuthorizationPanel-aJCKasGz.js";import"./account-session-D6vibAra.js";import"./XpodShellApp-BwvekJJR.js";import"./safe-continuation-DRRY_t4F.js";import"./nav-item-style-BKpK5_1m.js";import"./list-D2aO7Nu-.js";import"./section-header-COECjyL5.js";import"./label-CFTl2bC_.js";async function G(o){const a=o.capabilities.podCollections;if(a)try{return a.load?{collection:await a.load(u,{table:b})}:{collection:a.define(u,{table:b})}}catch{return}}function h(o){return o.includes("#")?I(u,{id:o}):o}async function M(o,a){await o.insert(a).isPersisted.promise}async function p(o,a,i){await o.update(a,d=>{Object.assign(d,i)}).isPersisted.promise}async function C(o,a){await o.delete(a).isPersisted.promise}function g(o,a){const{provider:i}=a,d=U(i,a.offeringId??L(i,a.authMode)),c=a.baseUrl??x(i,d),f=K(a.proxyUrl);return{id:o,service:"ai",provider:i==="custom"?R(o):_(i),authMode:a.authMode,status:"active",accountLabel:a.accountLabel,label:a.accountLabel,keyVersion:"1",reauthRequired:!1,encryptionAlgorithm:"PLAINTEXT",offeringId:d,...c?{baseUrl:c}:{},...f?{proxyUrl:f}:{},metadata:P({offeringId:d,baseUrl:c})}}function H(o,a){const{collection:i}=o,d=async r=>{await C(i,r).catch(()=>{})},c=(r,t)=>{const e=i.get(r);return e?O(e,t):void 0},f=async(r,t,e,n)=>{await M(i,e);try{const s=await n(b.buildId({id:t}))??c(t,r);if(!s)throw new Error("credential_create_failed");return s}catch(l){throw await d(t),l}};return{async createApiKeyCredential(r,t){if(!a.createApiKeyCredential)throw new Error("credential_store_unavailable");const e=w(r,"apiKey"),n=t.label??r;return await f(r,e,g(e,{provider:r,authMode:"apiKey",accountLabel:n,offeringId:t.offeringId,baseUrl:t.baseUrl,proxyUrl:t.proxyUrl}),l=>a.createApiKeyCredential(r,{...t,label:n,id:l}))},async createLocalCredential(r,t){if(!a.createLocalCredential)throw new Error("credential_store_unavailable");const e=w(r,"local"),n=t.label??"Local";return await f(r,e,g(e,{provider:r,authMode:"local",accountLabel:n,offeringId:t.offeringId,baseUrl:t.baseUrl}),l=>a.createLocalCredential(r,{...t,label:n,id:l}))},async updateProviderCredential(r,t,e){const n=h(t);if(!n)throw new Error("credential_not_found");const l={...e.label===void 0?{}:{label:e.label,accountLabel:e.label},...e.enabled===void 0?{}:{status:e.enabled?"active":"disabled"}},s=i.get(n);Object.keys(l).length>0&&await p(i,n,l);const y={...e.apiKey===void 0?{}:{apiKey:e.apiKey},...e.priority===void 0?{}:{priority:e.priority},...e.baseUrl===void 0?{}:{baseUrl:e.baseUrl},...e.proxyUrl===void 0?{}:{proxyUrl:e.proxyUrl}};if(Object.keys(y).length===0)return c(n,r);if(!a.updateProviderCredential)throw new Error("credential_store_unavailable");try{return await a.updateProviderCredential(r,t,{expectedVersion:e.expectedVersion,...y})??c(n,r)}catch(m){throw s&&Object.keys(l).length>0&&await p(i,n,{...l.label===void 0?{}:{label:s.label,accountLabel:s.accountLabel},...l.status===void 0?{}:{status:s.status}}).catch(()=>{}),m}},async deleteProviderCredential(r,t){const e=h(t);if(!e)return;const n=c(e,r);return await C(i,e),n}}}export{H as collectionCredentialMutations,h as credentialRowKey,G as openCredentialCollection};
|
package/static/settings/assets/{createLucideIcon-nEiQH43b.js → createLucideIcon-BIwq0vQx.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s}from"./XpodThemeProvider-
|
|
1
|
+
import{r as s}from"./XpodThemeProvider-DyX0rUID.js";const l=(...t)=>t.filter((e,r,o)=>!!e&&e.trim()!==""&&o.indexOf(e)===r).join(" ").trim();const C=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const f=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,o)=>o?o.toUpperCase():r.toLowerCase());const i=t=>{const e=f(t);return e.charAt(0).toUpperCase()+e.slice(1)};var w={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const h=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0;return!1};const g=s.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:n="",children:a,iconNode:u,...c},p)=>s.createElement("svg",{ref:p,...w,width:e,height:e,stroke:t,strokeWidth:o?Number(r)*24/Number(e):r,className:l("lucide",n),...!a&&!h(c)&&{"aria-hidden":"true"},...c},[...u.map(([m,d])=>s.createElement(m,d)),...Array.isArray(a)?a:[a]]));const b=(t,e)=>{const r=s.forwardRef(({className:o,...n},a)=>s.createElement(g,{ref:a,iconNode:e,className:l(`lucide-${C(i(t))}`,`lucide-${t}`,o),...n}));return r.displayName=i(t),r};export{b as c};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as m,D as R,T as j,N as B}from"./XpodShellApp-
|
|
1
|
+
import{n as m,D as R,T as j,N as B}from"./XpodShellApp-BwvekJJR.js";import{B as F,d as W,e as z,L as H,f as V,Q as Z,Q as X,V as Y}from"./XpodShellApp-BwvekJJR.js";import"./xpod-remembered-login-YAmn8ZiP.js";import"./createLucideIcon-BIwq0vQx.js";import"./XpodThemeProvider-DyX0rUID.js";import"./button-CV4KJ59A.js";import"./PodDeletionAuthorizationPanel-aJCKasGz.js";import"./account-session-D6vibAra.js";import"./safe-continuation-DRRY_t4F.js";import"./nav-item-style-BKpK5_1m.js";function O(a){return!!a&&a.termType==="DefaultGraph"}function f(a){return a.replace(/[\]\/\(\)\*\+\?\.\\\$]/g,"\\$&")}const P=/^:?[^:?#]*(?:[?#]|$)|^file:|^[^:]*:\/*[^?#]+?\/(?:\.\.?(?:\/|$)|\/)/i,T=/^(?:(?:[^/?#]{3,}|\.?[^/?#.]\.?)(?:\/[^/?#]{3,}|\.?[^/?#.]\.?)*\/?)?(?:[?#]|$)/,g="./",Q="../",p="?",$="#";class b{constructor(e){this.base=e,this._baseLength=0,this._baseMatcher=null,this._pathReplacements=new Array(e.length+1)}static supports(e){return!P.test(e)}_getBaseMatcher(){if(this._baseMatcher)return this._baseMatcher;if(!b.supports(this.base))return this._baseMatcher=/.^/;const e=/^[^:]*:\/*/.exec(this.base)[0],t=["^",f(e)],i=[],s=[],r=/[^/?#]*([/?#])/y;let n,h=0,u=0,o=r.lastIndex=e.length;for(;!h&&!u&&(n=r.exec(this.base));)n[1]===$?u=r.lastIndex-1:(t.push(f(n[0]),"(?:"),i.push(")?"),n[1]!==p?s.push(o=r.lastIndex):(h=o=r.lastIndex,u=this.base.indexOf($,h),this._pathReplacements[h]=p));for(let _=0;_<s.length;_++)this._pathReplacements[s[_]]=Q.repeat(s.length-_-1);return this._pathReplacements[s[s.length-1]]=g,this._baseLength=u>0?u:this.base.length,t.push(f(this.base.substring(o,this._baseLength)),h?"(?:#|$)":"(?:[?#]|$)"),this._baseMatcher=new RegExp([...t,...i].join(""))}toRelative(e){const t=this._getBaseMatcher().exec(e);if(!t)return e;const i=t[0].length;if(i===this._baseLength&&i===e.length)return"";const s=this._pathReplacements[i];if(s){const r=e.substring(i);return s!==p&&!T.test(r)?e:s===g&&/^[^?#]/.test(r)?r:s+r}return e.substring(i-1)}}const c=R.defaultGraph(),{rdf:S,xsd:l}=m,x=/["\\\t\n\r\b\f\u0000-\u0019\ud800-\udbff]/,w=/["\\\t\n\r\b\f\u0000-\u0019]|[\ud800-\udbff][\udc00-\udfff]/g,k={"\\":"\\\\",'"':'\\"'," ":"\\t","\n":"\\n","\r":"\\r","\b":"\\b","\f":"\\f"};class d extends j{equals(e){return e===this}}class G{constructor(e,t){if(this._prefixRegex=/$0^/,e&&typeof e.write!="function"&&(t=e,e=null),t=t||{},this._lists=t.lists,e)this._outputStream=e,this._endStream=t.end===void 0?!0:!!t.end;else{let i="";this._outputStream={write(s,r,n){i+=s,n&&n()},end:s=>{s&&s(null,i)}},this._endStream=!0}this._subject=null,/triple|quad/i.test(t.format)?(this._lineMode=!0,this._writeQuad=this._writeQuadLine):(this._lineMode=!1,this._graph=c,this._prefixIRIs=Object.create(null),t.prefixes&&this.addPrefixes(t.prefixes),t.baseIRI&&(this._baseIri=new b(t.baseIRI)))}get _inDefaultGraph(){return c.equals(this._graph)}_write(e,t){this._outputStream.write(e,"utf8",t)}_writeQuad(e,t,i,s,r){try{s.equals(this._graph)||(this._write((this._subject===null?"":this._inDefaultGraph?`.
|
|
2
2
|
`:`
|
|
3
3
|
}
|
|
4
4
|
`)+(c.equals(s)?"":`${this._encodeIriOrBlank(s)} {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,j as o}from"./XpodThemeProvider-
|
|
1
|
+
import{r as t,j as o}from"./XpodThemeProvider-DyX0rUID.js";import{c as s}from"./button-CV4KJ59A.js";const m=t.forwardRef(({className:e,...a},r)=>o.jsx("label",{ref:r,className:s("text-sm font-medium leading-none text-muted-foreground",e),...a}));m.displayName="Label";export{m as L};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as d,j as s}from"./XpodThemeProvider-
|
|
1
|
+
import{r as d,j as s}from"./XpodThemeProvider-DyX0rUID.js";import{S as m,c}from"./button-CV4KJ59A.js";const u=d.forwardRef(({className:o,asChild:e=!1,children:r,...a},l)=>{const n=e?m:"div";return s.jsx(n,{ref:l,className:c("divide-y rounded-xl border border-border bg-card",o),...a,children:r})});u.displayName="ListSurface";const j=d.forwardRef(({className:o,leading:e,title:r,description:a,trailing:l,asChild:n=!1,children:t,...i},x)=>{const f=c("flex flex-wrap items-center gap-3 p-4 text-sm leading-normal",o),p=n?m:"div";return s.jsx(p,{ref:x,className:f,...i,children:n?t:s.jsxs(s.Fragment,{children:[e?s.jsx("span",{className:"shrink-0",children:e}):null,s.jsxs("div",{className:"min-w-0 flex-1 break-words",children:[r?s.jsx("div",{children:r}):null,a?s.jsx("p",{className:"mt-0.5 text-xs leading-normal text-muted-foreground",children:a}):null]}),l?s.jsx("span",{className:"shrink-0",children:l}):null,t?s.jsx("div",{className:"w-full min-w-0 break-words",children:t}):null]})})});j.displayName="ListRow";export{u as L,j as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as B}from"./createLucideIcon-nEiQH43b.js";import{r as o,j as l}from"./XpodThemeProvider-Ciuwo_yl.js";import{c as g}from"./button-D1dGKY1f.js";const V=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],de=B("database",V);function fe(e){if(!R(e))throw new Error("Applet layout descriptor must be an object");if(typeof e.type!="string")throw new Error("Applet layout descriptor type must be a string");switch(e.type){case"single-pane":case"two-pane":return P(e.context),e;case"three-pane":return P(e.context),e;default:throw new Error(`Unsupported applet layout type: ${e.type}`)}}function R(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function P(e){if(e!==void 0){if(!R(e))throw new Error("Applet layout descriptor context must be an object");if("collapsible"in e&&typeof e.collapsible!="boolean")throw new Error("Applet layout descriptor context.collapsible must be a boolean");if("initiallyCollapsed"in e&&typeof e.initiallyCollapsed!="boolean")throw new Error("Applet layout descriptor context.initiallyCollapsed must be a boolean")}}const G=184,p={narrow:768,wideObjects:1100};function K(e){const{pageType:t,contentWidth:n}=e,a=e.hasObjectCollection===!0;if(!Number.isFinite(n)||n<=0)throw new Error("Applet pane plan needs a positive contentWidth");return n<p.narrow?{pageType:t,navigation:"task-bar",panes:"single",showObjectColumn:!1}:n>=p.wideObjects&&t==="collection"&&a?{pageType:t,navigation:"rail",panes:"list-detail",showObjectColumn:!0}:{pageType:t,navigation:"rail",panes:t==="collection"&&n<p.wideObjects?"stack":"single",showObjectColumn:!1}}const D=o.createContext(null);function pe(){const e=o.useContext(D);if(!e)throw new Error("useWorkspaceLayout must be used inside TwoPaneLayout");return e}const Q=o.createContext(void 0),N="(max-width: 767px)",X={gridTemplateColumns:"210px minmax(0, 1fr)"};function Y(e){return e==="context"?"main":e}function I(e){if(typeof window>"u"||typeof window.matchMedia!="function")return()=>{};const t=window.matchMedia(N);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function U(){return typeof window>"u"||typeof window.matchMedia!="function"?"split":window.matchMedia(N).matches?"stack":"split"}function F(){return"split"}function z(e){const t=o.useSyncExternalStore(I,U,F);return e==="auto"?t:e}const T=`(min-width: ${p.wideObjects+G}px)`;function J(){return o.useSyncExternalStore(e=>{if(typeof window>"u"||typeof window.matchMedia!="function")return()=>{};const t=window.matchMedia(T);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)},()=>typeof window>"u"||typeof window.matchMedia!="function"?!0:window.matchMedia(T).matches,()=>!0)}function q(e){const t=o.useSyncExternalStore(I,U,F)==="stack",a=J()?p.wideObjects:t?p.narrow-1:p.narrow,r=K({pageType:e.pageType,contentWidth:a,hasObjectCollection:e.hasObjectCollection}),i=r.panes==="list-detail"?"split":"stack";return{resolvedMode:e.mode==="auto"?i:e.mode,showObjectColumn:r.showObjectColumn}}function Z({resolvedMode:e,history:t,resolvePane:n}){const[a,r]=o.useState("list"),i=o.useRef(null),x=o.useRef(null),k=o.useRef(null),y=o.useRef(null),m=o.useMemo(()=>({list:x,main:k,context:y}),[]),s=o.useCallback((c,f={})=>{const w=n?.(c)??c;r(w),e==="stack"&&(i.current=w,f.fromHistory||t?.push(w))},[t,n,e]),j=o.useCallback(()=>s("list"),[s]),v=o.useCallback(()=>s("main"),[s]),u=o.useCallback(()=>s("context"),[s]);return o.useLayoutEffect(()=>{if(e!=="stack"){i.current=null;return}const c=i.current;c&&(i.current=null,m[c].current?.focus())},[a,m,e]),o.useLayoutEffect(()=>{if(!(e!=="stack"||!t))return t.subscribe(c=>{s(c,{fromHistory:!0})})},[t,s,e]),{activePane:a,paneRefs:m,openList:j,openMain:v,openContext:u}}function he({listHeader:e,list:t,mainHeader:n,main:a,mode:r="auto",history:i,copy:x,className:k,pageType:y="collection",hasObjectCollection:m=!0}){const s=o.useContext(Q),{resolvedMode:j}=q({mode:r,pageType:y,hasObjectCollection:m}),v=z(r),u=s?v:j,c=y==="collection"&&m,{activePane:f,paneRefs:w,openList:C,openMain:A,openContext:S}=Z({resolvedMode:u,history:i,resolvePane:Y}),L=s?.onClose,O=o.useCallback(()=>{A(),L?.()},[A,L]),H=o.useMemo(()=>({mode:u,activePane:f,openList:C,openMain:O,openContext:S}),[f,S,C,O,u]),d=c&&u==="stack",M=!c||(s?u==="stack"&&!s.open:d&&f!=="list"),E=!s&&d&&f!=="main";return l.jsx(D.Provider,{value:H,children:l.jsx("section",{className:g("flex min-h-0 flex-1 flex-col bg-background",k),"data-workspace-layout":"two-pane","data-workspace-mode":u,children:l.jsxs("div",{className:g("grid min-h-0 flex-1",d||!c?"grid-cols-1":null),style:d||!c?void 0:X,"data-workspace-layout-mode":r,"data-workspace-object-column":c&&u==="split"?"shown":"hidden","data-workspace-active-pane":f,children:[l.jsxs("aside",{ref:w.list,className:g("min-h-0 flex-col overflow-hidden bg-layout-list-item @container",M?"hidden":"flex",d?"border-r-0":"border-r border-border"),"data-testid":"workspace-list-pane","data-workspace-pane":"list",hidden:M,tabIndex:d?-1:void 0,children:[l.jsx("header",{className:"h-12 shrink-0 border-b border-border bg-layout-list-header","data-workspace-list-header":"true",children:e}),l.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:t})]}),l.jsxs("main",{ref:w.main,className:g("min-h-0 flex-col overflow-hidden bg-layout-content @container",E?"hidden":"flex"),"data-testid":"workspace-main-pane","data-workspace-pane":"main",hidden:E,inert:s?.open&&u==="stack"?!0:void 0,tabIndex:d?-1:void 0,children:[l.jsxs("header",{className:g("h-12 shrink-0 border-b border-border bg-layout-content",s?.headerLeading&&"flex min-w-0 items-center"),"data-workspace-main-header":"true",children:[s?.headerLeading?l.jsx("div",{className:"flex h-full shrink-0 items-center md:hidden","data-workspace-header-leading":!0,children:s.headerLeading}):null,s?.headerLeading?l.jsx("div",{className:"h-full min-w-0 flex-1",children:n}):n]}),l.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto",children:[d&&!s?l.jsx("button",{type:"button",className:"inline-flex items-center px-4 py-3 text-sm text-muted-foreground hover:text-foreground",onClick:C,children:x?.backToList??"返回列表"}):null,a]})]})]})})})}const h="/api/admin";async function ee(e={}){try{const t=await fetch(`${h}/status`,{signal:e.signal});if(t.ok)return await t.json()}catch(t){console.error("Failed to get admin status:",t)}return null}async function te(e={}){try{const t=await fetch(`${h}/config`,{signal:e.signal});if(t.ok)return await t.json()}catch(t){console.error("Failed to get admin config:",t)}return null}async function ne(e,t={}){try{const n=e?"?baseUrl="+encodeURIComponent(e):"",a=await fetch(h+"/public-ip"+n,{signal:t.signal});if(a.ok)return await a.json()}catch(n){console.error("Failed to get public ip check:",n)}return null}async function me(e){try{return(await fetch(`${h}/config`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({env:e})})).ok}catch(t){return console.error("Failed to update admin config:",t),!1}}async function we(){try{return(await fetch(`${h}/restart`,{method:"POST"})).ok}catch(e){return console.error("Failed to trigger restart:",e),!1}}async function ae(e={}){try{const t=await fetch("/service/status",{signal:e.signal});if(t.ok){const n=await t.json();if(Array.isArray(n))return n}}catch(t){console.error("Failed to get gateway status:",t)}return null}async function ge(e){try{const t=new URLSearchParams;e?.limit&&t.set("limit",e.limit.toString()),e?.level&&e.level!=="all"&&t.set("level",e.level),e?.source&&e.source!=="all"&&t.set("source",e.source);const n=t.toString(),a=n?`?${n}`:"";let r=await fetch(`/service/logs${a}`);if((r.status===404||r.status===405)&&(r=await fetch(`${h}/logs${a}`)),r.ok){const i=await r.json();return Array.isArray(i)?i:i.logs??[]}}catch(t){console.error("Failed to get logs:",t)}return[]}function oe(e){return e?e.startsWith("http://")||e.startsWith("https://")?e:`https://${e}/`:""}function re(e,t,n=""){return t?.baseUrl||oe(t?.fqdn)||e.CSS_BASE_URL||n}async function se(e={}){try{const t=await fetch(`${h}/ddns`,{signal:e.signal});if(t.ok)return await t.json()}catch(t){console.error("Failed to get ddns status:",t)}return null}async function ye(e={}){try{const t=await fetch("/provision/status",{signal:e.signal,credentials:"include",headers:{accept:"application/json"}});if(!t.ok)return null;const n=await t.json();return{registered:n.registered===!0,managed:n.managed===!0,nodeId:b(n.nodeId),cloudUrl:b(n.cloudUrl),serviceProviderDomain:b(n.spDomain),publicUrl:b(n.publicUrl)}}catch(t){return console.error("Failed to get provision status:",t),null}}function b(e){return typeof e=="string"&&e.length>0?e:null}async function be(e={}){const[t,n,a,r]=await Promise.all([ae(e),ee(e),te(e),se(e)]),i=await ne(re(a?.env??{},r),e);return{servicesData:t,adminData:n,configData:a,ddnsData:r,publicCheck:i,checkedAt:new Date}}function xe(e){if(!["ArrowDown","ArrowUp","Home","End"].includes(e.key))return;const t=e.currentTarget.closest("[data-list-navigation]")??e.currentTarget.closest("nav");if(!t)return;const n=[...t.querySelectorAll('a[href]:not([aria-disabled="true"])')],a=n.indexOf(e.currentTarget);if(a<0||n.length===0)return;e.preventDefault();const r=e.key==="Home"?0:e.key==="End"?n.length-1:e.key==="ArrowDown"?(a+1)%n.length:(a-1+n.length)%n.length;n[r]?.focus()}const $="rounded-lg transition-colors",W="text-foreground hover:bg-accent/60",_="focus:outline-none focus:ring-0 focus-visible:bg-accent/70";function ke(e){return[$,_,e?"bg-accent text-accent-foreground":`text-foreground ${W}`,"relative flex h-[40px] w-[40px] items-center justify-center rounded-lg"].join(" ")}function je(e,t){const n=t?.compact===!0;return[$,_,e?"bg-accent text-accent-foreground":"",n?"rounded-lg px-2 py-2":"rounded-lg px-3 py-2.5","mx-2 flex items-center gap-3 text-sm transition-colors",e?"font-medium":`${W} text-foreground`].join(" ")}export{de as D,he as T,Q as W,se as a,je as b,ge as c,te as d,me as e,be as f,ye as g,xe as h,fe as i,D as j,ne as k,ke as l,we as t,pe as u};
|
|
1
|
+
import{c as B}from"./createLucideIcon-BIwq0vQx.js";import{r as o,j as l}from"./XpodThemeProvider-DyX0rUID.js";import{c as g}from"./button-CV4KJ59A.js";const V=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],de=B("database",V);function fe(e){if(!R(e))throw new Error("Applet layout descriptor must be an object");if(typeof e.type!="string")throw new Error("Applet layout descriptor type must be a string");switch(e.type){case"single-pane":case"two-pane":return P(e.context),e;case"three-pane":return P(e.context),e;default:throw new Error(`Unsupported applet layout type: ${e.type}`)}}function R(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function P(e){if(e!==void 0){if(!R(e))throw new Error("Applet layout descriptor context must be an object");if("collapsible"in e&&typeof e.collapsible!="boolean")throw new Error("Applet layout descriptor context.collapsible must be a boolean");if("initiallyCollapsed"in e&&typeof e.initiallyCollapsed!="boolean")throw new Error("Applet layout descriptor context.initiallyCollapsed must be a boolean")}}const G=184,p={narrow:768,wideObjects:1100};function K(e){const{pageType:t,contentWidth:n}=e,a=e.hasObjectCollection===!0;if(!Number.isFinite(n)||n<=0)throw new Error("Applet pane plan needs a positive contentWidth");return n<p.narrow?{pageType:t,navigation:"task-bar",panes:"single",showObjectColumn:!1}:n>=p.wideObjects&&t==="collection"&&a?{pageType:t,navigation:"rail",panes:"list-detail",showObjectColumn:!0}:{pageType:t,navigation:"rail",panes:t==="collection"&&n<p.wideObjects?"stack":"single",showObjectColumn:!1}}const D=o.createContext(null);function pe(){const e=o.useContext(D);if(!e)throw new Error("useWorkspaceLayout must be used inside TwoPaneLayout");return e}const Q=o.createContext(void 0),N="(max-width: 767px)",X={gridTemplateColumns:"210px minmax(0, 1fr)"};function Y(e){return e==="context"?"main":e}function I(e){if(typeof window>"u"||typeof window.matchMedia!="function")return()=>{};const t=window.matchMedia(N);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function U(){return typeof window>"u"||typeof window.matchMedia!="function"?"split":window.matchMedia(N).matches?"stack":"split"}function F(){return"split"}function z(e){const t=o.useSyncExternalStore(I,U,F);return e==="auto"?t:e}const T=`(min-width: ${p.wideObjects+G}px)`;function J(){return o.useSyncExternalStore(e=>{if(typeof window>"u"||typeof window.matchMedia!="function")return()=>{};const t=window.matchMedia(T);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)},()=>typeof window>"u"||typeof window.matchMedia!="function"?!0:window.matchMedia(T).matches,()=>!0)}function q(e){const t=o.useSyncExternalStore(I,U,F)==="stack",a=J()?p.wideObjects:t?p.narrow-1:p.narrow,r=K({pageType:e.pageType,contentWidth:a,hasObjectCollection:e.hasObjectCollection}),i=r.panes==="list-detail"?"split":"stack";return{resolvedMode:e.mode==="auto"?i:e.mode,showObjectColumn:r.showObjectColumn}}function Z({resolvedMode:e,history:t,resolvePane:n}){const[a,r]=o.useState("list"),i=o.useRef(null),x=o.useRef(null),k=o.useRef(null),y=o.useRef(null),m=o.useMemo(()=>({list:x,main:k,context:y}),[]),s=o.useCallback((c,f={})=>{const w=n?.(c)??c;r(w),e==="stack"&&(i.current=w,f.fromHistory||t?.push(w))},[t,n,e]),j=o.useCallback(()=>s("list"),[s]),v=o.useCallback(()=>s("main"),[s]),u=o.useCallback(()=>s("context"),[s]);return o.useLayoutEffect(()=>{if(e!=="stack"){i.current=null;return}const c=i.current;c&&(i.current=null,m[c].current?.focus())},[a,m,e]),o.useLayoutEffect(()=>{if(!(e!=="stack"||!t))return t.subscribe(c=>{s(c,{fromHistory:!0})})},[t,s,e]),{activePane:a,paneRefs:m,openList:j,openMain:v,openContext:u}}function he({listHeader:e,list:t,mainHeader:n,main:a,mode:r="auto",history:i,copy:x,className:k,pageType:y="collection",hasObjectCollection:m=!0}){const s=o.useContext(Q),{resolvedMode:j}=q({mode:r,pageType:y,hasObjectCollection:m}),v=z(r),u=s?v:j,c=y==="collection"&&m,{activePane:f,paneRefs:w,openList:C,openMain:A,openContext:S}=Z({resolvedMode:u,history:i,resolvePane:Y}),L=s?.onClose,O=o.useCallback(()=>{A(),L?.()},[A,L]),H=o.useMemo(()=>({mode:u,activePane:f,openList:C,openMain:O,openContext:S}),[f,S,C,O,u]),d=c&&u==="stack",M=!c||(s?u==="stack"&&!s.open:d&&f!=="list"),E=!s&&d&&f!=="main";return l.jsx(D.Provider,{value:H,children:l.jsx("section",{className:g("flex min-h-0 flex-1 flex-col bg-background",k),"data-workspace-layout":"two-pane","data-workspace-mode":u,children:l.jsxs("div",{className:g("grid min-h-0 flex-1",d||!c?"grid-cols-1":null),style:d||!c?void 0:X,"data-workspace-layout-mode":r,"data-workspace-object-column":c&&u==="split"?"shown":"hidden","data-workspace-active-pane":f,children:[l.jsxs("aside",{ref:w.list,className:g("min-h-0 flex-col overflow-hidden bg-layout-list-item @container",M?"hidden":"flex",d?"border-r-0":"border-r border-border"),"data-testid":"workspace-list-pane","data-workspace-pane":"list",hidden:M,tabIndex:d?-1:void 0,children:[l.jsx("header",{className:"h-12 shrink-0 border-b border-border bg-layout-list-header","data-workspace-list-header":"true",children:e}),l.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:t})]}),l.jsxs("main",{ref:w.main,className:g("min-h-0 flex-col overflow-hidden bg-layout-content @container",E?"hidden":"flex"),"data-testid":"workspace-main-pane","data-workspace-pane":"main",hidden:E,inert:s?.open&&u==="stack"?!0:void 0,tabIndex:d?-1:void 0,children:[l.jsxs("header",{className:g("h-12 shrink-0 border-b border-border bg-layout-content",s?.headerLeading&&"flex min-w-0 items-center"),"data-workspace-main-header":"true",children:[s?.headerLeading?l.jsx("div",{className:"flex h-full shrink-0 items-center md:hidden","data-workspace-header-leading":!0,children:s.headerLeading}):null,s?.headerLeading?l.jsx("div",{className:"h-full min-w-0 flex-1",children:n}):n]}),l.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto",children:[d&&!s?l.jsx("button",{type:"button",className:"inline-flex items-center px-4 py-3 text-sm text-muted-foreground hover:text-foreground",onClick:C,children:x?.backToList??"返回列表"}):null,a]})]})]})})})}const h="/api/admin";async function ee(e={}){try{const t=await fetch(`${h}/status`,{signal:e.signal});if(t.ok)return await t.json()}catch(t){console.error("Failed to get admin status:",t)}return null}async function te(e={}){try{const t=await fetch(`${h}/config`,{signal:e.signal});if(t.ok)return await t.json()}catch(t){console.error("Failed to get admin config:",t)}return null}async function ne(e,t={}){try{const n=e?"?baseUrl="+encodeURIComponent(e):"",a=await fetch(h+"/public-ip"+n,{signal:t.signal});if(a.ok)return await a.json()}catch(n){console.error("Failed to get public ip check:",n)}return null}async function me(e){try{return(await fetch(`${h}/config`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({env:e})})).ok}catch(t){return console.error("Failed to update admin config:",t),!1}}async function we(){try{return(await fetch(`${h}/restart`,{method:"POST"})).ok}catch(e){return console.error("Failed to trigger restart:",e),!1}}async function ae(e={}){try{const t=await fetch("/service/status",{signal:e.signal});if(t.ok){const n=await t.json();if(Array.isArray(n))return n}}catch(t){console.error("Failed to get gateway status:",t)}return null}async function ge(e){try{const t=new URLSearchParams;e?.limit&&t.set("limit",e.limit.toString()),e?.level&&e.level!=="all"&&t.set("level",e.level),e?.source&&e.source!=="all"&&t.set("source",e.source);const n=t.toString(),a=n?`?${n}`:"";let r=await fetch(`/service/logs${a}`);if((r.status===404||r.status===405)&&(r=await fetch(`${h}/logs${a}`)),r.ok){const i=await r.json();return Array.isArray(i)?i:i.logs??[]}}catch(t){console.error("Failed to get logs:",t)}return[]}function oe(e){return e?e.startsWith("http://")||e.startsWith("https://")?e:`https://${e}/`:""}function re(e,t,n=""){return t?.baseUrl||oe(t?.fqdn)||e.CSS_BASE_URL||n}async function se(e={}){try{const t=await fetch(`${h}/ddns`,{signal:e.signal});if(t.ok)return await t.json()}catch(t){console.error("Failed to get ddns status:",t)}return null}async function ye(e={}){try{const t=await fetch("/provision/status",{signal:e.signal,credentials:"include",headers:{accept:"application/json"}});if(!t.ok)return null;const n=await t.json();return{registered:n.registered===!0,managed:n.managed===!0,nodeId:b(n.nodeId),cloudUrl:b(n.cloudUrl),serviceProviderDomain:b(n.spDomain),publicUrl:b(n.publicUrl)}}catch(t){return console.error("Failed to get provision status:",t),null}}function b(e){return typeof e=="string"&&e.length>0?e:null}async function be(e={}){const[t,n,a,r]=await Promise.all([ae(e),ee(e),te(e),se(e)]),i=await ne(re(a?.env??{},r),e);return{servicesData:t,adminData:n,configData:a,ddnsData:r,publicCheck:i,checkedAt:new Date}}function xe(e){if(!["ArrowDown","ArrowUp","Home","End"].includes(e.key))return;const t=e.currentTarget.closest("[data-list-navigation]")??e.currentTarget.closest("nav");if(!t)return;const n=[...t.querySelectorAll('a[href]:not([aria-disabled="true"])')],a=n.indexOf(e.currentTarget);if(a<0||n.length===0)return;e.preventDefault();const r=e.key==="Home"?0:e.key==="End"?n.length-1:e.key==="ArrowDown"?(a+1)%n.length:(a-1+n.length)%n.length;n[r]?.focus()}const $="rounded-lg transition-colors",W="text-foreground hover:bg-accent/60",_="focus:outline-none focus:ring-0 focus-visible:bg-accent/70";function ke(e){return[$,_,e?"bg-accent text-accent-foreground":`text-foreground ${W}`,"relative flex h-[40px] w-[40px] items-center justify-center rounded-lg"].join(" ")}function je(e,t){const n=t?.compact===!0;return[$,_,e?"bg-accent text-accent-foreground":"",n?"rounded-lg px-2 py-2":"rounded-lg px-3 py-2.5","mx-2 flex items-center gap-3 text-sm transition-colors",e?"font-medium":`${W} text-foreground`].join(" ")}export{de as D,he as T,Q as W,se as a,je as b,ge as c,te as d,me as e,be as f,ye as g,xe as h,fe as i,D as j,ne as k,ke as l,we as t,pe as u};
|
package/static/settings/assets/{safe-continuation-BPwW6jdq.js → safe-continuation-DRRY_t4F.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as c,j as $t}from"./XpodThemeProvider-Ciuwo_yl.js";import{r as bt,g as J,b as Gt,c as Y,s as ct,d as yt,A as Wt}from"./account-session-CMc10iEj.js";const Xt="Cloud storage is not ready. Please wait for Xpod to reconnect and try again.",Et=new WeakMap;function it(){typeof window<"u"&&Et.delete(window)}function Jt(t){typeof window<"u"&&Et.set(window,t)}function Yt(t){try{sessionStorage.setItem("provisionCode",t)}catch{}}async function gn(t){const n=kt(t.accountIndex);if(!n)return;const e=ut(t);let o;try{o=await e(n,{headers:{accept:"application/json"},credentials:"omit"})}catch{return}if(!o.ok)return;const f=(await o.json().catch(()=>{}))?.controls?.account?.clientCredentials;if(typeof f!="string"||!f)return;const l=await bt(f,e,n);if(!l)return;const w=new URL(l,n);return w.origin===new URL(n).origin&&w.pathname.startsWith("/.account/")&&!w.username&&!w.password&&!w.hash?{collection:l,webId:t.webId}:void 0}function ut(t){const n=kt(t.accountIndex);return async(e,o)=>{if(t.assertCurrent?.(),!n)throw new Error("Invalid session Account authority");const s=new Headers(e instanceof Request?e.headers:void 0);new Headers(o?.headers).forEach((z,y)=>s.set(y,z)),/^CSS-Account-Token(?:\s|$)/iu.test(s.get("authorization")??"")&&s.delete("authorization");const f={...o,headers:s,credentials:"omit",redirect:"error"},l=new URL(e instanceof Request?e.url:String(e));if(l.origin!==new URL(n).origin||!l.pathname.startsWith("/.account/")||l.username||l.password||l.hash)throw new Error("Session Account request leaves the trusted authority");const w=new Request(e,f),p=e instanceof Request?await t.fetch(w):await t.fetch(w.url,f);try{t.assertCurrent?.()}catch(z){throw p.body?.cancel().catch(()=>{}),z}return p}}function kt(t){try{const n=new URL(t);return!["http:","https:"].includes(n.protocol)||n.username||n.password||n.pathname!=="/.account/"||n.search||n.hash?void 0:n.href}catch{return}}const B="/.account/";function Vt(t){return!!t&&typeof t=="object"&&!Array.isArray(t)}async function mt(t=fetch){if(typeof window>"u")return B;if(!Qt(window.location.hostname)){const o=window.__XPOD__?.idpIndex;if(o!==void 0){try{const s=new URL(o,window.location.origin);if(typeof o=="string"&&o.trim()&&["http:","https:"].includes(s.protocol)&&s.pathname===B&&!s.username&&!s.password&&!s.search&&!s.hash)return it(),s.href}catch{}throw new Error("Server bootstrap did not expose a valid Account index")}}const n=await t(new URL("/provision/status",window.location.origin),{credentials:"include",headers:{accept:"application/json"}});if(n.status===404)return it(),new URL(B,window.location.origin).href;if(!n.ok)throw new Error(`Local provisioning status request failed (${n.status})`);let e;try{e=await n.json()}catch{throw new Error("Local provisioning status response was not valid JSON")}if(!Vt(e)||typeof e.managed!="boolean")throw new Error("Local provisioning status response was not valid");if(e.managed===!1)return it(),new URL(B,window.location.origin).href;if(typeof e.oidcIssuer=="string")try{const o=new URL(e.oidcIssuer);if(["http:","https:"].includes(o.protocol)&&!o.username&&!o.password)return Kt(t),typeof e.provisionCode=="string"&&Yt(e.provisionCode),new URL(B,o).href}catch{}throw new Error("Local provisioning status did not expose a valid OIDC issuer")}function Kt(t){const n=new URL("/provision/status",window.location.origin);Jt(async()=>{const e=await t(n,{credentials:"include",headers:{accept:"application/json"}}),o=e.ok?await e.json().catch(()=>{}):void 0;if(o?.managed!==!0||o?.registered!==!0||typeof o?.provisionCode!="string")throw new Error(Xt);return o.provisionCode})}function Qt(t){return t==="localhost"||t==="::1"||t==="[::1]"||/^127(?:\.\d{1,3}){3}$/u.test(t)}const Zt="/.account/",L="Xpod 登录服务暂时不可用,请稍后重试。",at=[250,750,1500],tn=300,Ct=3e3;function nn(){if(typeof window>"u")return!1;const t=window.location.pathname;return t==="/.account"||t.startsWith("/.account/")}function en(t){const n=t?.account;if(!n)return;const e={...typeof n.id=="string"?{id:n.id}:{},...typeof n.username=="string"?{username:n.username}:{},...typeof n.displayName=="string"?{displayName:n.displayName}:{}};return Object.keys(e).length>0?e:void 0}function At(t){return t?.account?.logout?{status:"authenticated"}:{status:"anonymous",mode:"login"}}function vt(t){return t===502||t===503||t===504}function Rt(t){return t?{status:"error",mode:"login",message:L}:{status:"initializing"}}function It(t){return new Promise(n=>setTimeout(n,t))}function yn({children:t}){const[n,e]=c.useState(),[o,s]=c.useState(null),[f,l]=c.useState(!0),[w,p]=c.useState(null),[z,y]=c.useState(!1),[tt,h]=c.useState({status:"initializing"}),T=c.useRef(0),v=c.useRef(!0),P=c.useRef(0),b=c.useRef(void 0),j=c.useRef(null),O=c.useRef(!1),E=c.useRef(void 0),_=c.useRef(void 0),dt=c.useRef(void 0),[Nt,Pt]=c.useState(0),nt=c.useRef(void 0),et=c.useRef(0),q=c.useRef(0),G=c.useRef(!1),F=c.useCallback(()=>{const r=j.current?.account;return r?.logout?JSON.stringify([b.current,r.id,r.logout,r.clientCredentials]):void 0},[]),R=c.useCallback(()=>{et.current+=1,G.current=!0},[]),g=c.useCallback((r,i,u)=>{const a=F(),d=nt.current,k=_.current;j.current=r,nt.current=i,_.current=u,(a!==F()||d!==i||k!==u)&&R(),G.current=!F()},[F,R]),rt=c.useCallback(()=>{const r=F(),i=et.current,u=J(),a=_.current;let d=!!r&&u===nt.current&&!G.current&&q.current===0;return()=>{if(a)try{if(a!==E.current||a!==_.current)throw new Error("Stale Account source");a.assertCurrent()}catch{d=!1}if(!d||!v.current||G.current||q.current>0||i!==et.current||r!==F()||u!==J())throw d=!1,new Error("Account 登录状态已改变,请重新打开客户端凭据操作。")}},[F]),jt=c.useCallback(r=>{const i=()=>{j.current?.account?.logout&&!_.current||(P.current+=1,(_.current||!j.current?.account?.logout&&E.current)&&(g(null),s(null),O.current=!1,h({status:"initializing"}),l(!0)),Pt(u=>u+1))};return E.current=r,i(),()=>{E.current===r&&(E.current=void 0,i())}},[g]),Ft=c.useCallback(async(r,i)=>{const u=b.current,a=new URL(r instanceof Request?r.url:String(r),u);if(!u||a.origin!==new URL(u).origin||!a.pathname.startsWith("/.account/")||a.username||a.password)throw new Error("Account request outside current authority");const d=rt(),k=_.current;d();const S=await(k?ut({accountIndex:u,fetch:k.fetch,assertCurrent:d}):fetch)(r instanceof Request?r:a.href,{...i,redirect:"error"});try{d()}catch(C){throw S.body?.cancel().catch(()=>{}),C}return S},[rt]),Mt=tt.status==="authenticated",Dt=f||tt.status==="submitting",W=c.useCallback(r=>{(Gt(r)||b.current&&b.current!==r)&&(P.current+=1,T.current+=1,O.current=!1,g(null),s(null),y(!1),h({status:"initializing"})),b.current=r,e(r)},[g]),X=c.useCallback(async()=>{l(!0),p(null),h(r=>r.status==="authenticated"?r:{status:"initializing"});try{const r=await mt();return v.current?(W(r),r):void 0}catch{if(!v.current)return;g(null),s(null),y(!1),p(L),h({status:"error",mode:"login",message:L}),l(!1);return}},[W,g]);c.useEffect(()=>{let r=!0;return mt().then(i=>{r&&v.current&&W(i)}).catch(()=>{!r||!v.current||(g(null),s(null),y(!1),p(L),h({status:"error",mode:"login",message:L}),l(!1))}),()=>{r=!1}},[W,g]),c.useEffect(()=>(v.current=!0,()=>{v.current=!1,R(),P.current+=1}),[R]);const m=c.useCallback(r=>v.current&&r===P.current,[]),ht=c.useCallback(async()=>{const r=new AbortController,i=setTimeout(()=>r.abort(),Ct);try{const u=b.current;if(!u)return!1;const a=await fetch(Y(new URL("oidc/consent/",u)),{headers:ct(void 0,u),credentials:"include",signal:r.signal});return a.ok?!!(await a.json()).client:!1}catch{return!1}finally{clearTimeout(i)}},[]),ot=c.useCallback(async({exposeTransientError:r,generation:i,confirmUnauthenticated:u})=>{const a=b.current;if(!a)return"stale";const d=J(),k=()=>d===J()?!0:(R(),!1);try{const I=await fetch(Y(a),{headers:ct(void 0,a),credentials:"include"});if(!m(i))return"stale";if(!k())return"transient-error";if(I.ok){const S=await I.json();if(!m(i))return"stale";if(!k())return"transient-error";if(!S?.controls||typeof S.controls!="object"||Array.isArray(S.controls))throw new Error("Invalid CSS Account controls response");let C=S.controls,wt;const A=E.current;if(!C.account?.logout&&A&&A!==dt.current&&q.current===0&&new URL(".account/",A.issuer).href===new URL(a).href){h(M=>M.status==="authenticated"?M:{status:"initializing"}),A.assertCurrent();const N=await ut({accountIndex:a,fetch:A.fetch,assertCurrent:()=>A.assertCurrent()})(Y(a),{headers:{accept:"application/json"},signal:AbortSignal.timeout(Ct)});if(!m(i)||A!==E.current)return"stale";if(A.assertCurrent(),!k())return"transient-error";if(N.ok){const M=await N.json();if(!m(i)||A!==E.current)return"stale";if(A.assertCurrent(),!k())return"transient-error";if(!M?.controls||typeof M.controls!="object"||Array.isArray(M.controls))throw new Error("Invalid CSS Account controls response");C=M.controls,C.account?.logout&&(wt=A)}else if(N.status!==401&&N.status!==403){if(vt(N.status)||N.status===408||N.status===429||N.status===500)throw new Error("Transient CSS Account controls response");return T.current+=1,y(!1),R(),p(L),h({status:"error",mode:"login",message:L}),"terminal-error"}}const Ht=++T.current;y(!1),g(C,d,wt),s(C),p(null);const pt=At(C);return O.current=pt.status==="anonymous",h(pt),C.account?.logout&&nn()&&ht().then(gt=>{m(i)&&Ht===T.current&&y(gt)}),"ok"}else{if(I.status===401||I.status===403)return u?(T.current+=1,yt(),O.current=!0,y(!1),g({}),s({}),h({status:"anonymous",mode:"login"}),p(null),"ok"):"unauthenticated";if(T.current+=1,y(!1),vt(I.status))return p(null),h(C=>C.status==="authenticated"?C:Rt(r)),"transient-error";R();const S=`Failed to load account controls (Status: ${I.status})`;return p(S),h({status:"error",mode:"login",message:S}),"terminal-error"}}catch{return m(i)?(T.current+=1,y(!1),p(null),h(I=>I.status==="authenticated"?I:Rt(r)),"transient-error"):"stale"}},[g,ht,m,R]),D=c.useCallback(async()=>{const r=++P.current;for(let i=0;i<=at.length;i+=1){const u=i===at.length,a=await ot({exposeTransientError:u,generation:r});if(a==="unauthenticated")return!m(r)||(await It(tn),!m(r))?"stale":ot({exposeTransientError:!0,generation:r,confirmUnauthenticated:!0});if(a!=="transient-error")return a;if(!m(r)||!u&&(h(d=>d.status==="authenticated"?d:{status:"initializing"}),await It(at[i]),!m(r)))return"stale"}return"transient-error"},[ot,m]);c.useEffect(()=>{if(!n)return;let r=!0;return(async()=>(await D(),r&&v.current&&l(!1)))(),()=>{r=!1}},[D,n,Nt]);const st=c.useCallback(async()=>{const r=await X();if(r&&r===n){const i=await D();if(v.current&&l(!1),i==="ok")return At(j.current)}return{status:"error",mode:"login",message:L}},[D,n,X]),zt=c.useCallback(async()=>{await st()},[st]),qt=c.useCallback(async()=>{q.current+=1,dt.current=E.current;try{R(),P.current+=1,T.current+=1,(_.current||!j.current?.account?.logout)&&(O.current=!1,(b.current??await X())&&await D());const r=b.current,i=j.current?.account?.logout,u=await bt(i,fetch,r);let a=!u&&(!!i||!O.current);if(u)try{const d=await fetch(Y(u),{method:"POST",headers:ct(void 0,r),credentials:"include"});a=!d.ok&&d.status!==401&&d.status!==403}catch{a=!0}if(a){h({status:"error",mode:"login",message:L});return}P.current+=1,T.current+=1,O.current=!0,l(!1),yt(),y(!1),g({}),s({}),p(null),h({status:"anonymous",mode:"login"})}finally{q.current-=1}},[g,D,X,R]),Bt=c.useMemo(()=>en(o),[o]);return $t.jsx(Wt.Provider,{value:{controls:o,isInitializing:f,initError:w,idpIndex:n??Zt,isLoggedIn:Mt,isAnonymous:()=>O.current,bindAccountCapability:rt,authenticating:Dt,hasOidcPending:z,refetchControls:st,registerAccountSession:jt,accountFetch:Ft,retry:zt,logout:qt,accountState:tt,identity:Bt},children:t})}const St=600*1e3,H=2048,x="xpod.safe-continuation.consent.v2",V="xpod.safe-continuation.management.v2",rn=/^\/\.account\/interaction\/([^/?#]+)$/u,on=/^\/\.account\/(?:interaction\/[^/?#]+\/)?account\/([^/?#]+)\//u;function K(){if(!(typeof window>"u"))try{return window.location.origin}catch{return}}function Lt(){if(!(typeof window>"u"))try{return window.sessionStorage}catch{return}}function lt(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Q(t){return typeof t=="string"&&t.length>0&&t.length<=H}function $(t){return Q(t)&&t===t.trim()}function Tt(t){return typeof t=="number"&&Number.isFinite(t)&&t>0}function xt(t){return Q(t)&&rn.test(t)}function sn(t){if(typeof t!="string"||!t||t.length>H)return;const n=cn(t);if(n)return n;if(/^[^/?#:]+$/u.test(t)&&t===t.trim())return t}function cn(t){if(typeof t!="string"||!t||t.length>H)return;let n;try{n=new URL(t,K()??"http://localhost")}catch{return}if(!["http:","https:"].includes(n.protocol)||n.username||n.password)return;const e=on.exec(n.pathname);return e?e[1]:void 0}function mn(t,n){const e=t?.account,o=[n?.id,e?.id,e?.logout,e?.clientCredentials,e?.bindings,e?.pod].map(sn).filter(l=>!!l);if(o.length===0)return;const[s,...f]=o;return f.every(l=>l===s)?s:void 0}function an(t,n=K()){if(!n||typeof t!="string"||!t||t.length>H)return!1;let e;try{e=new URL(t,n)}catch{return!1}return e.origin===n&&!e.username&&!e.password&&e.pathname.startsWith("/.account/")}function Ut(t,n,e=K()){if(!e||!xt(t)||typeof n!="string"||!n||n.length>H)return!1;let o;try{o=new URL(n,e)}catch{return!1}return o.origin===e&&!o.username&&!o.password&&o.pathname===`${t}/oidc/consent/`&&o.search===""&&o.hash===""}function un(t){const n=Lt();if(!n)return null;try{return n.getItem(t)}catch{return null}}function Z(t){const n=un(t);if(n===null)return;let e;try{e=JSON.parse(n)}catch{return}return lt(e)?e:void 0}function U(t){const n=Lt();if(n)try{n.removeItem(t)}catch{}}function Ot(t){const{createdAt:n,expiresAt:e}=t;if(!Tt(n)||!Tt(e))return!1;const o=Date.now();if(n>o)return!1;const s=e-n;return s<=0||s>St||e>n+St?!1:e>o}function _t(t,n){return t.accountId===n.accountId&&t.interaction===n.interaction&&t.returnTo===n.returnTo&&t.createdAt===n.createdAt&&t.expiresAt===n.expiresAt}function ft(t){if(!t||t.kind!=="consent")return null;const{accountId:n,interaction:e,returnTo:o}=t;return!$(n)||!xt(e)||!Q(o)||!Ot(t)||!Ut(e,o)?null:{kind:"consent",accountId:n,interaction:e,returnTo:o,createdAt:t.createdAt,expiresAt:t.expiresAt}}function ln(t){if(!t||t.kind!=="management")return null;const{accountId:n,returnTo:e}=t;return!$(n)||!Q(e)||!Ot(t)||!an(e)?null:{kind:"management",accountId:n,returnTo:e,createdAt:t.createdAt,expiresAt:t.expiresAt}}function fn(t){const n=t?.accountId;if(!$(n))return U(V),null;const e=ln(Z(V));return!e||e.accountId!==n?(U(V),null):e}function Cn(t){const n=fn(t);return U(V),n}function dn(t){const n=t?.accountId;if(!$(n))return U(x),null;const e=ft(Z(x));return!e||e.accountId!==n?(U(x),null):e}function An(t,n,e={}){const o=n?.accountId;if(!$(o))return U(x),null;const s=ft(Z(x));if(!s||s.accountId!==o||!_t(s,t))return U(x),null;try{e.assertCurrent?.()}catch{return null}return U(x),s}async function hn(t,n={}){const e=n.origin??K();if(!e||!Ut(t.interaction,t.returnTo,e))return!1;const o=n.fetch??(typeof fetch=="function"?fetch:void 0);if(!o)return!1;const s=new URL(t.returnTo,e).href;let f;try{n.assertCurrent?.(),f=await o(s,{method:"GET",credentials:"include",redirect:"manual",headers:{accept:"application/json",...n.headers??{}}})}catch{return!1}try{n.assertCurrent?.()}catch{return!1}if(f.redirected===!0||typeof f.status=="number"&&f.status>=300&&f.status<400||!f.ok||typeof f.url=="string"&&f.url&&f.url!==s)return!1;const l=await f.json().catch(()=>{});if(!lt(l))return!1;const w=l.client;return lt(w)&&(typeof w.client_id=="string"||typeof w.client_name=="string")}async function vn(t,n={}){const e=dn(t);if(!e)return null;const o=await hn(e,n),s=ft(Z(x));if(!o||!s||s.accountId!==t.accountId||!_t(s,e))return U(x),null;try{n.assertCurrent?.()}catch{return null}return s}export{yn as A,vn as a,fn as b,hn as c,An as d,Cn as e,ut as f,gn as g,mn as r};
|
|
1
|
+
import{r as c,j as $t}from"./XpodThemeProvider-DyX0rUID.js";import{r as bt,g as J,b as Gt,c as Y,s as ct,d as yt,A as Wt}from"./account-session-D6vibAra.js";const Xt="Cloud storage is not ready. Please wait for Xpod to reconnect and try again.",Et=new WeakMap;function it(){typeof window<"u"&&Et.delete(window)}function Jt(t){typeof window<"u"&&Et.set(window,t)}function Yt(t){try{sessionStorage.setItem("provisionCode",t)}catch{}}async function gn(t){const n=kt(t.accountIndex);if(!n)return;const e=ut(t);let o;try{o=await e(n,{headers:{accept:"application/json"},credentials:"omit"})}catch{return}if(!o.ok)return;const f=(await o.json().catch(()=>{}))?.controls?.account?.clientCredentials;if(typeof f!="string"||!f)return;const l=await bt(f,e,n);if(!l)return;const w=new URL(l,n);return w.origin===new URL(n).origin&&w.pathname.startsWith("/.account/")&&!w.username&&!w.password&&!w.hash?{collection:l,webId:t.webId}:void 0}function ut(t){const n=kt(t.accountIndex);return async(e,o)=>{if(t.assertCurrent?.(),!n)throw new Error("Invalid session Account authority");const s=new Headers(e instanceof Request?e.headers:void 0);new Headers(o?.headers).forEach((z,y)=>s.set(y,z)),/^CSS-Account-Token(?:\s|$)/iu.test(s.get("authorization")??"")&&s.delete("authorization");const f={...o,headers:s,credentials:"omit",redirect:"error"},l=new URL(e instanceof Request?e.url:String(e));if(l.origin!==new URL(n).origin||!l.pathname.startsWith("/.account/")||l.username||l.password||l.hash)throw new Error("Session Account request leaves the trusted authority");const w=new Request(e,f),p=e instanceof Request?await t.fetch(w):await t.fetch(w.url,f);try{t.assertCurrent?.()}catch(z){throw p.body?.cancel().catch(()=>{}),z}return p}}function kt(t){try{const n=new URL(t);return!["http:","https:"].includes(n.protocol)||n.username||n.password||n.pathname!=="/.account/"||n.search||n.hash?void 0:n.href}catch{return}}const B="/.account/";function Vt(t){return!!t&&typeof t=="object"&&!Array.isArray(t)}async function mt(t=fetch){if(typeof window>"u")return B;if(!Qt(window.location.hostname)){const o=window.__XPOD__?.idpIndex;if(o!==void 0){try{const s=new URL(o,window.location.origin);if(typeof o=="string"&&o.trim()&&["http:","https:"].includes(s.protocol)&&s.pathname===B&&!s.username&&!s.password&&!s.search&&!s.hash)return it(),s.href}catch{}throw new Error("Server bootstrap did not expose a valid Account index")}}const n=await t(new URL("/provision/status",window.location.origin),{credentials:"include",headers:{accept:"application/json"}});if(n.status===404)return it(),new URL(B,window.location.origin).href;if(!n.ok)throw new Error(`Local provisioning status request failed (${n.status})`);let e;try{e=await n.json()}catch{throw new Error("Local provisioning status response was not valid JSON")}if(!Vt(e)||typeof e.managed!="boolean")throw new Error("Local provisioning status response was not valid");if(e.managed===!1)return it(),new URL(B,window.location.origin).href;if(typeof e.oidcIssuer=="string")try{const o=new URL(e.oidcIssuer);if(["http:","https:"].includes(o.protocol)&&!o.username&&!o.password)return Kt(t),typeof e.provisionCode=="string"&&Yt(e.provisionCode),new URL(B,o).href}catch{}throw new Error("Local provisioning status did not expose a valid OIDC issuer")}function Kt(t){const n=new URL("/provision/status",window.location.origin);Jt(async()=>{const e=await t(n,{credentials:"include",headers:{accept:"application/json"}}),o=e.ok?await e.json().catch(()=>{}):void 0;if(o?.managed!==!0||o?.registered!==!0||typeof o?.provisionCode!="string")throw new Error(Xt);return o.provisionCode})}function Qt(t){return t==="localhost"||t==="::1"||t==="[::1]"||/^127(?:\.\d{1,3}){3}$/u.test(t)}const Zt="/.account/",L="Xpod 登录服务暂时不可用,请稍后重试。",at=[250,750,1500],tn=300,Ct=3e3;function nn(){if(typeof window>"u")return!1;const t=window.location.pathname;return t==="/.account"||t.startsWith("/.account/")}function en(t){const n=t?.account;if(!n)return;const e={...typeof n.id=="string"?{id:n.id}:{},...typeof n.username=="string"?{username:n.username}:{},...typeof n.displayName=="string"?{displayName:n.displayName}:{}};return Object.keys(e).length>0?e:void 0}function At(t){return t?.account?.logout?{status:"authenticated"}:{status:"anonymous",mode:"login"}}function vt(t){return t===502||t===503||t===504}function Rt(t){return t?{status:"error",mode:"login",message:L}:{status:"initializing"}}function It(t){return new Promise(n=>setTimeout(n,t))}function yn({children:t}){const[n,e]=c.useState(),[o,s]=c.useState(null),[f,l]=c.useState(!0),[w,p]=c.useState(null),[z,y]=c.useState(!1),[tt,h]=c.useState({status:"initializing"}),T=c.useRef(0),v=c.useRef(!0),P=c.useRef(0),b=c.useRef(void 0),j=c.useRef(null),O=c.useRef(!1),E=c.useRef(void 0),_=c.useRef(void 0),dt=c.useRef(void 0),[Nt,Pt]=c.useState(0),nt=c.useRef(void 0),et=c.useRef(0),q=c.useRef(0),G=c.useRef(!1),F=c.useCallback(()=>{const r=j.current?.account;return r?.logout?JSON.stringify([b.current,r.id,r.logout,r.clientCredentials]):void 0},[]),R=c.useCallback(()=>{et.current+=1,G.current=!0},[]),g=c.useCallback((r,i,u)=>{const a=F(),d=nt.current,k=_.current;j.current=r,nt.current=i,_.current=u,(a!==F()||d!==i||k!==u)&&R(),G.current=!F()},[F,R]),rt=c.useCallback(()=>{const r=F(),i=et.current,u=J(),a=_.current;let d=!!r&&u===nt.current&&!G.current&&q.current===0;return()=>{if(a)try{if(a!==E.current||a!==_.current)throw new Error("Stale Account source");a.assertCurrent()}catch{d=!1}if(!d||!v.current||G.current||q.current>0||i!==et.current||r!==F()||u!==J())throw d=!1,new Error("Account 登录状态已改变,请重新打开客户端凭据操作。")}},[F]),jt=c.useCallback(r=>{const i=()=>{j.current?.account?.logout&&!_.current||(P.current+=1,(_.current||!j.current?.account?.logout&&E.current)&&(g(null),s(null),O.current=!1,h({status:"initializing"}),l(!0)),Pt(u=>u+1))};return E.current=r,i(),()=>{E.current===r&&(E.current=void 0,i())}},[g]),Ft=c.useCallback(async(r,i)=>{const u=b.current,a=new URL(r instanceof Request?r.url:String(r),u);if(!u||a.origin!==new URL(u).origin||!a.pathname.startsWith("/.account/")||a.username||a.password)throw new Error("Account request outside current authority");const d=rt(),k=_.current;d();const S=await(k?ut({accountIndex:u,fetch:k.fetch,assertCurrent:d}):fetch)(r instanceof Request?r:a.href,{...i,redirect:"error"});try{d()}catch(C){throw S.body?.cancel().catch(()=>{}),C}return S},[rt]),Mt=tt.status==="authenticated",Dt=f||tt.status==="submitting",W=c.useCallback(r=>{(Gt(r)||b.current&&b.current!==r)&&(P.current+=1,T.current+=1,O.current=!1,g(null),s(null),y(!1),h({status:"initializing"})),b.current=r,e(r)},[g]),X=c.useCallback(async()=>{l(!0),p(null),h(r=>r.status==="authenticated"?r:{status:"initializing"});try{const r=await mt();return v.current?(W(r),r):void 0}catch{if(!v.current)return;g(null),s(null),y(!1),p(L),h({status:"error",mode:"login",message:L}),l(!1);return}},[W,g]);c.useEffect(()=>{let r=!0;return mt().then(i=>{r&&v.current&&W(i)}).catch(()=>{!r||!v.current||(g(null),s(null),y(!1),p(L),h({status:"error",mode:"login",message:L}),l(!1))}),()=>{r=!1}},[W,g]),c.useEffect(()=>(v.current=!0,()=>{v.current=!1,R(),P.current+=1}),[R]);const m=c.useCallback(r=>v.current&&r===P.current,[]),ht=c.useCallback(async()=>{const r=new AbortController,i=setTimeout(()=>r.abort(),Ct);try{const u=b.current;if(!u)return!1;const a=await fetch(Y(new URL("oidc/consent/",u)),{headers:ct(void 0,u),credentials:"include",signal:r.signal});return a.ok?!!(await a.json()).client:!1}catch{return!1}finally{clearTimeout(i)}},[]),ot=c.useCallback(async({exposeTransientError:r,generation:i,confirmUnauthenticated:u})=>{const a=b.current;if(!a)return"stale";const d=J(),k=()=>d===J()?!0:(R(),!1);try{const I=await fetch(Y(a),{headers:ct(void 0,a),credentials:"include"});if(!m(i))return"stale";if(!k())return"transient-error";if(I.ok){const S=await I.json();if(!m(i))return"stale";if(!k())return"transient-error";if(!S?.controls||typeof S.controls!="object"||Array.isArray(S.controls))throw new Error("Invalid CSS Account controls response");let C=S.controls,wt;const A=E.current;if(!C.account?.logout&&A&&A!==dt.current&&q.current===0&&new URL(".account/",A.issuer).href===new URL(a).href){h(M=>M.status==="authenticated"?M:{status:"initializing"}),A.assertCurrent();const N=await ut({accountIndex:a,fetch:A.fetch,assertCurrent:()=>A.assertCurrent()})(Y(a),{headers:{accept:"application/json"},signal:AbortSignal.timeout(Ct)});if(!m(i)||A!==E.current)return"stale";if(A.assertCurrent(),!k())return"transient-error";if(N.ok){const M=await N.json();if(!m(i)||A!==E.current)return"stale";if(A.assertCurrent(),!k())return"transient-error";if(!M?.controls||typeof M.controls!="object"||Array.isArray(M.controls))throw new Error("Invalid CSS Account controls response");C=M.controls,C.account?.logout&&(wt=A)}else if(N.status!==401&&N.status!==403){if(vt(N.status)||N.status===408||N.status===429||N.status===500)throw new Error("Transient CSS Account controls response");return T.current+=1,y(!1),R(),p(L),h({status:"error",mode:"login",message:L}),"terminal-error"}}const Ht=++T.current;y(!1),g(C,d,wt),s(C),p(null);const pt=At(C);return O.current=pt.status==="anonymous",h(pt),C.account?.logout&&nn()&&ht().then(gt=>{m(i)&&Ht===T.current&&y(gt)}),"ok"}else{if(I.status===401||I.status===403)return u?(T.current+=1,yt(),O.current=!0,y(!1),g({}),s({}),h({status:"anonymous",mode:"login"}),p(null),"ok"):"unauthenticated";if(T.current+=1,y(!1),vt(I.status))return p(null),h(C=>C.status==="authenticated"?C:Rt(r)),"transient-error";R();const S=`Failed to load account controls (Status: ${I.status})`;return p(S),h({status:"error",mode:"login",message:S}),"terminal-error"}}catch{return m(i)?(T.current+=1,y(!1),p(null),h(I=>I.status==="authenticated"?I:Rt(r)),"transient-error"):"stale"}},[g,ht,m,R]),D=c.useCallback(async()=>{const r=++P.current;for(let i=0;i<=at.length;i+=1){const u=i===at.length,a=await ot({exposeTransientError:u,generation:r});if(a==="unauthenticated")return!m(r)||(await It(tn),!m(r))?"stale":ot({exposeTransientError:!0,generation:r,confirmUnauthenticated:!0});if(a!=="transient-error")return a;if(!m(r)||!u&&(h(d=>d.status==="authenticated"?d:{status:"initializing"}),await It(at[i]),!m(r)))return"stale"}return"transient-error"},[ot,m]);c.useEffect(()=>{if(!n)return;let r=!0;return(async()=>(await D(),r&&v.current&&l(!1)))(),()=>{r=!1}},[D,n,Nt]);const st=c.useCallback(async()=>{const r=await X();if(r&&r===n){const i=await D();if(v.current&&l(!1),i==="ok")return At(j.current)}return{status:"error",mode:"login",message:L}},[D,n,X]),zt=c.useCallback(async()=>{await st()},[st]),qt=c.useCallback(async()=>{q.current+=1,dt.current=E.current;try{R(),P.current+=1,T.current+=1,(_.current||!j.current?.account?.logout)&&(O.current=!1,(b.current??await X())&&await D());const r=b.current,i=j.current?.account?.logout,u=await bt(i,fetch,r);let a=!u&&(!!i||!O.current);if(u)try{const d=await fetch(Y(u),{method:"POST",headers:ct(void 0,r),credentials:"include"});a=!d.ok&&d.status!==401&&d.status!==403}catch{a=!0}if(a){h({status:"error",mode:"login",message:L});return}P.current+=1,T.current+=1,O.current=!0,l(!1),yt(),y(!1),g({}),s({}),p(null),h({status:"anonymous",mode:"login"})}finally{q.current-=1}},[g,D,X,R]),Bt=c.useMemo(()=>en(o),[o]);return $t.jsx(Wt.Provider,{value:{controls:o,isInitializing:f,initError:w,idpIndex:n??Zt,isLoggedIn:Mt,isAnonymous:()=>O.current,bindAccountCapability:rt,authenticating:Dt,hasOidcPending:z,refetchControls:st,registerAccountSession:jt,accountFetch:Ft,retry:zt,logout:qt,accountState:tt,identity:Bt},children:t})}const St=600*1e3,H=2048,x="xpod.safe-continuation.consent.v2",V="xpod.safe-continuation.management.v2",rn=/^\/\.account\/interaction\/([^/?#]+)$/u,on=/^\/\.account\/(?:interaction\/[^/?#]+\/)?account\/([^/?#]+)\//u;function K(){if(!(typeof window>"u"))try{return window.location.origin}catch{return}}function Lt(){if(!(typeof window>"u"))try{return window.sessionStorage}catch{return}}function lt(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Q(t){return typeof t=="string"&&t.length>0&&t.length<=H}function $(t){return Q(t)&&t===t.trim()}function Tt(t){return typeof t=="number"&&Number.isFinite(t)&&t>0}function xt(t){return Q(t)&&rn.test(t)}function sn(t){if(typeof t!="string"||!t||t.length>H)return;const n=cn(t);if(n)return n;if(/^[^/?#:]+$/u.test(t)&&t===t.trim())return t}function cn(t){if(typeof t!="string"||!t||t.length>H)return;let n;try{n=new URL(t,K()??"http://localhost")}catch{return}if(!["http:","https:"].includes(n.protocol)||n.username||n.password)return;const e=on.exec(n.pathname);return e?e[1]:void 0}function mn(t,n){const e=t?.account,o=[n?.id,e?.id,e?.logout,e?.clientCredentials,e?.bindings,e?.pod].map(sn).filter(l=>!!l);if(o.length===0)return;const[s,...f]=o;return f.every(l=>l===s)?s:void 0}function an(t,n=K()){if(!n||typeof t!="string"||!t||t.length>H)return!1;let e;try{e=new URL(t,n)}catch{return!1}return e.origin===n&&!e.username&&!e.password&&e.pathname.startsWith("/.account/")}function Ut(t,n,e=K()){if(!e||!xt(t)||typeof n!="string"||!n||n.length>H)return!1;let o;try{o=new URL(n,e)}catch{return!1}return o.origin===e&&!o.username&&!o.password&&o.pathname===`${t}/oidc/consent/`&&o.search===""&&o.hash===""}function un(t){const n=Lt();if(!n)return null;try{return n.getItem(t)}catch{return null}}function Z(t){const n=un(t);if(n===null)return;let e;try{e=JSON.parse(n)}catch{return}return lt(e)?e:void 0}function U(t){const n=Lt();if(n)try{n.removeItem(t)}catch{}}function Ot(t){const{createdAt:n,expiresAt:e}=t;if(!Tt(n)||!Tt(e))return!1;const o=Date.now();if(n>o)return!1;const s=e-n;return s<=0||s>St||e>n+St?!1:e>o}function _t(t,n){return t.accountId===n.accountId&&t.interaction===n.interaction&&t.returnTo===n.returnTo&&t.createdAt===n.createdAt&&t.expiresAt===n.expiresAt}function ft(t){if(!t||t.kind!=="consent")return null;const{accountId:n,interaction:e,returnTo:o}=t;return!$(n)||!xt(e)||!Q(o)||!Ot(t)||!Ut(e,o)?null:{kind:"consent",accountId:n,interaction:e,returnTo:o,createdAt:t.createdAt,expiresAt:t.expiresAt}}function ln(t){if(!t||t.kind!=="management")return null;const{accountId:n,returnTo:e}=t;return!$(n)||!Q(e)||!Ot(t)||!an(e)?null:{kind:"management",accountId:n,returnTo:e,createdAt:t.createdAt,expiresAt:t.expiresAt}}function fn(t){const n=t?.accountId;if(!$(n))return U(V),null;const e=ln(Z(V));return!e||e.accountId!==n?(U(V),null):e}function Cn(t){const n=fn(t);return U(V),n}function dn(t){const n=t?.accountId;if(!$(n))return U(x),null;const e=ft(Z(x));return!e||e.accountId!==n?(U(x),null):e}function An(t,n,e={}){const o=n?.accountId;if(!$(o))return U(x),null;const s=ft(Z(x));if(!s||s.accountId!==o||!_t(s,t))return U(x),null;try{e.assertCurrent?.()}catch{return null}return U(x),s}async function hn(t,n={}){const e=n.origin??K();if(!e||!Ut(t.interaction,t.returnTo,e))return!1;const o=n.fetch??(typeof fetch=="function"?fetch:void 0);if(!o)return!1;const s=new URL(t.returnTo,e).href;let f;try{n.assertCurrent?.(),f=await o(s,{method:"GET",credentials:"include",redirect:"manual",headers:{accept:"application/json",...n.headers??{}}})}catch{return!1}try{n.assertCurrent?.()}catch{return!1}if(f.redirected===!0||typeof f.status=="number"&&f.status>=300&&f.status<400||!f.ok||typeof f.url=="string"&&f.url&&f.url!==s)return!1;const l=await f.json().catch(()=>{});if(!lt(l))return!1;const w=l.client;return lt(w)&&(typeof w.client_id=="string"||typeof w.client_name=="string")}async function vn(t,n={}){const e=dn(t);if(!e)return null;const o=await hn(e,n),s=ft(Z(x));if(!o||!s||s.accountId!==t.accountId||!_t(s,e))return U(x),null;try{n.assertCurrent?.()}catch{return null}return s}export{yn as A,vn as a,fn as b,hn as c,An as d,Cn as e,ut as f,gn as g,mn as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./XpodThemeProvider-
|
|
1
|
+
import{j as e}from"./XpodThemeProvider-DyX0rUID.js";import{c as n,a as m,i as c}from"./button-CV4KJ59A.js";const u=m(`inline-flex items-center rounded-lg border px-2.5 py-0.5 text-xs font-semibold transition-all duration-200 ${c}`,{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow-sm shadow-primary/20 hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow-sm shadow-destructive/20 hover:bg-destructive/90",outline:"border-border/40 text-foreground bg-muted/30 backdrop-blur-sm",pending:"border border-dashed border-muted-foreground bg-transparent text-muted-foreground shadow-none hover:bg-transparent"}},defaultVariants:{variant:"default"}});function b({className:r,variant:a,...s}){return e.jsx("div",{className:n(u({variant:a}),r),...s})}function f({title:r,description:a,actions:s,level:d=2,titleClassName:o,className:i,...l}){const t=n("text-sm leading-normal text-foreground",o);return e.jsxs("div",{...l,className:n("flex flex-wrap items-start justify-between gap-3",i),children:[e.jsxs("div",{className:"min-w-0",children:[d===3?e.jsx("h3",{className:t,children:r}):d===4?e.jsx("h4",{className:t,children:r}):e.jsx("h2",{className:t,children:r}),a?e.jsx("p",{className:"mt-1 text-xs leading-normal text-muted-foreground",children:a}):null]}),s?e.jsx("div",{className:"flex min-w-0 max-w-full flex-wrap items-center gap-2",children:s}):null]})}export{b as B,f as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,j as r}from"./XpodThemeProvider-
|
|
1
|
+
import{r as o,j as r}from"./XpodThemeProvider-DyX0rUID.js";import{c as G,P,a as F,u as $}from"./PodDeletionAuthorizationPanel-aJCKasGz.js";import{u as M,c as j,i as W}from"./button-CV4KJ59A.js";import{u as X}from"./xpod-remembered-login-YAmn8ZiP.js";var J=Object.defineProperty,w=(n,e)=>J(n,"name",{value:e,configurable:!0}),E="Switch",[K,de]=G(E),[Q,y]=K(E);function U(n){const{__scopeSwitch:e,checked:s,children:c,defaultChecked:a,disabled:t,form:i,name:l,onCheckedChange:d,required:h,value:S="on",internal_do_not_use_render:m}=n,[f,b]=$({prop:s,defaultProp:a??!1,onChange:d,caller:E}),[g,C]=o.useState(null),[x,v]=o.useState(null),R=o.useRef(!1),[u,p]=o.useReducer(k=>k+1,0),I=g?!!i||!!g.closest("form"):!0,_={checked:f,setChecked:b,disabled:t,control:g,setControl:C,name:l,form:i,value:S,hasConsumerStoppedPropagationRef:R,userInteractionCount:u,onUserInteraction:p,required:h,defaultChecked:a,isFormControl:I,bubbleInput:x,setBubbleInput:v};return r.jsx(Q,{scope:e,..._,children:H(m)?m(_):c})}w(U,"SwitchProvider");var V="SwitchTrigger",Y=o.forwardRef(w(function({__scopeSwitch:e,onClick:s,...c},a){const{control:t,form:i,value:l,disabled:d,checked:h,required:S,setControl:m,setChecked:f,hasConsumerStoppedPropagationRef:b,onUserInteraction:g,isFormControl:C,bubbleInput:x}=y(V,e),v=M(a,m),R=o.useRef(h);return o.useEffect(()=>{const u=i?t?.ownerDocument.getElementById(i):t?.form;if(u instanceof HTMLFormElement){const p=w(()=>f(R.current),"reset");return u.addEventListener("reset",p),()=>u.removeEventListener("reset",p)}},[t,i,f]),r.jsx(P.button,{type:"button",role:"switch","aria-checked":h,"aria-required":S,"data-state":N(h),"data-disabled":d?"":void 0,disabled:d,value:l,...c,ref:v,onClick:F(s,u=>{g(),f(p=>!p),x&&C&&(b.current=u.isPropagationStopped(),b.current||u.stopPropagation())})})},"SwitchTrigger")),q=o.forwardRef(w(function(e,s){const{__scopeSwitch:c,name:a,checked:t,defaultChecked:i,required:l,disabled:d,value:h,onCheckedChange:S,form:m,...f}=e;return r.jsx(U,{__scopeSwitch:c,checked:t,defaultChecked:i,disabled:d,required:l,onCheckedChange:S,name:a,form:m,value:h,internal_do_not_use_render:({isFormControl:b})=>r.jsxs(r.Fragment,{children:[r.jsx(Y,{...f,ref:s,__scopeSwitch:c}),b&&r.jsx(re,{__scopeSwitch:c})]})})},"Switch")),Z="SwitchThumb",ee=o.forwardRef(w(function(e,s){const{__scopeSwitch:c,...a}=e,t=y(Z,c);return r.jsx(P.span,{"data-state":N(t.checked),"data-disabled":t.disabled?"":void 0,...a,ref:s})},"SwitchThumb")),te="SwitchBubbleInput",re=o.forwardRef(w(function({__scopeSwitch:e,onClick:s,...c},a){const{control:t,hasConsumerStoppedPropagationRef:i,userInteractionCount:l,checked:d,defaultChecked:h,required:S,disabled:m,name:f,value:b,form:g,bubbleInput:C,setBubbleInput:x}=y(te,e),v=M(a,x),R=X(t),u=o.useRef(!1),p=o.useRef(d),I=o.useRef(l);o.useEffect(()=>{const k=C;if(!k)return;const A=window.HTMLInputElement.prototype,T=Object.getOwnPropertyDescriptor(A,"checked").set,B=l!==I.current;I.current=l;const O=p.current!==d;p.current=d;const z=!(B&&i.current);if(O&&T){u.current=!B;const D=new Event("click",{bubbles:z});T.call(k,d),k.dispatchEvent(D),u.current=!1}},[C,d,i,l]);const _=o.useRef(d);return r.jsx(P.input,{type:"checkbox","aria-hidden":!0,defaultChecked:h??_.current,required:S,disabled:m,name:f,value:b,form:g,...c,tabIndex:-1,ref:v,onClick:F(s,k=>{u.current&&k.stopPropagation()}),style:{...c.style,...R,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"SwitchBubbleInput"));function H(n){return typeof n=="function"}w(H,"isFunction");function N(n){return n?"checked":"unchecked"}w(N,"getState");const L=o.forwardRef(({className:n,...e},s)=>r.jsx(q,{className:j("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full","border-2 border-transparent","transition-all duration-200",W,"disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:bg-primary","data-[state=unchecked]:bg-muted/50",n),...e,ref:s,children:r.jsx(ee,{className:j("pointer-events-none block h-5 w-5 rounded-full bg-background","shadow-md ring-0","transition-transform duration-200","data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));L.displayName=q.displayName;function ne({label:n,description:e,control:s,className:c,...a}){const t=o.useId(),i=e?`${t}-description`:void 0;return r.jsxs("div",{className:j("flex min-h-16 items-center justify-between gap-3 border-b border-border",c),...a,children:[r.jsxs("div",{className:"min-w-0",children:[r.jsx("label",{htmlFor:t,className:"text-sm leading-normal text-foreground",children:n}),e?r.jsx("p",{id:i,className:"mt-1 text-xs leading-normal text-muted-foreground",children:e}):null]}),r.jsx("div",{className:"shrink-0",children:s({id:t,"aria-describedby":i})})]})}function ue({checked:n,onCheckedChange:e,disabled:s,...c}){return r.jsx(ne,{...c,control:({id:a,"aria-describedby":t})=>r.jsx(L,{id:a,checked:n,onCheckedChange:e,disabled:s,"aria-describedby":t})})}export{ne as S,ue as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as r,c as t,j as e,r as o,X as s,a as i}from"./XpodThemeProvider-
|
|
1
|
+
import{i as r,c as t,j as e,r as o,X as s,a as i}from"./XpodThemeProvider-DyX0rUID.js";r();t.createRoot(document.getElementById("root")).render(e.jsx(o.StrictMode,{children:e.jsx(s,{children:e.jsx(i,{})})}));
|