smbls 3.14.310 → 3.14.319

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.
@@ -1,4 +1,4 @@
1
- "use strict";var SymbolsEmbed=(()=>{var ze=Object.defineProperty;var Ts=Object.getOwnPropertyDescriptor;var $s=Object.getOwnPropertyNames;var Ps=Object.prototype.hasOwnProperty;var C=(t,e)=>()=>(t&&(e=t(t=0)),e);var Dt=(t,e)=>{for(var r in e)ze(t,r,{get:e[r],enumerable:!0})},Rs=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of $s(e))!Ps.call(t,o)&&o!==r&&ze(t,o,{get:()=>e[o],enumerable:!(n=Ts(e,o))||n.enumerable});return t};var Is=t=>Rs(ze({},"__esModule",{value:!0}),t);var at,Tt,cr=C(()=>{"use strict";at=globalThis,Tt=at.document});var Se,ar=C(()=>{"use strict";cr();Se=t=>typeof at<"u"&&(at.Node&&t instanceof at.Node||at.Window&&t instanceof at.Window||t===at||t===document)});var I,S,we,k,R,xt,tn,Qt=C(()=>{"use strict";I=t=>t===null?!1:typeof t=="object"&&t.constructor===Object,S=t=>typeof t=="string",we=t=>typeof t=="number",k=t=>typeof t=="function",R=t=>Array.isArray(t),xt=t=>t===null?!1:typeof t=="object",tn=t=>t===void 0});var en,fr=C(()=>{"use strict";Ce();en=(t,e=[])=>t.reduce((r,n)=>lr(r,Ft(n,{exclude:e}),e),{})});function ve(t,e,r={}){let{bracketsLength:n=2}=r,o=n===3?"{{{":"{{";if(!t.includes(o))return t;let s=Ls[n],i=e||this.state||{},c=this;return t.replace(s,(a,l,f,u)=>{let p=f.trim();if(u){let h=c?.context,d=h?.functions?.[u]||h?.utils?.[u]||h?.methods?.[u]||h?.snippets?.[u]||c?.[u];if(d&&typeof d=="function")try{return String(d.call(c,p)??"")}catch{return""}return""}if(l){let h=(l.match(/\.\.\//g)||[]).length,d=i;for(let b=0;b<h;b++){if(!d||!d.parent)return"";d=d.parent}if(p==="parent")return String(d.value??"");let g=Jt(d,p);return String(g??"")}else{let h=Jt(i,p);if(h!=null)return String(h);let d=c?.context?.polyglot;if(d?.translations){let g=i?.root?.lang||i?.lang||c?.context?.state?.lang||d.defaultLang||"en",b=d.translations[g];if(b){let y=Jt(b,p);if(y!=null&&typeof y!="object")return String(y);for(let x in b){let _=b[x];if(_&&typeof _=="object"&&!Array.isArray(_)){let w=Jt(_,p);if(w!=null&&typeof w!="object")return String(w)}}}let m=Jt(d.translations,p);if(m!=null&&typeof m!="object")return String(m)}return""}})}var Ls,Jt,rn=C(()=>{"use strict";Ls={2:/{{\s*((?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}/g,3:/{{{(\s*(?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}}/g},Jt=(t,e)=>e.split(".").reduce((r,n)=>r?.[n],t)});var Vs,Bs,Us,nn,ur=C(()=>{"use strict";Vs=new Set(["update","parse","clean","create","destroy","add","toggle","remove","apply","set","reset","replace","quietReplace","quietUpdate","applyReplace","applyFunction","keys","values","ref","rootUpdate","parentUpdate","parent","__element","__depends","__ref","__children","root","setByPath","setPathCollection","removeByPath","removePathCollection","getByPath"]),Bs=new Set(["update","__element"]),Us=new Set(["set","reset","update","remove","updateContent","removeContent","lookup","lookdown","lookdownAll","getRef","getPath","setNodeStyles","spotByPath","keys","parse","setProps","parseDeep","variables","if","log","verbose","warn","error","call","nextElement","previousElement","getRootState","getRoot","getRootData","getRootContext","getContext","getQuery","getDB","getChildren","preventContentUpdate","preventContentRecreate"]),nn=new Set(["node","context","extends","__element","__ref",...Us,...Vs,...Bs])});var on,Mt,lr,sn,Ft,Ce=C(()=>{"use strict";Qt();fr();ar();ur();on=t=>t.charCodeAt(0)===95&&t.charCodeAt(1)===95,Mt=(t,e,r,n)=>{if(k(t))return e?typeof t.call!="function"?t:t.call(e,e,r||e.state,n||e.context):void 0;if(t!=null&&e?.context?.plugins&&(R(t)||I(t)&&!Se(t))){let o=e.context.plugins;for(let s of o)if(s.resolveHandler){let i=s.resolveHandler(t,e);if(typeof i=="function")return Mt(i,e,r,n)}}return t},lr=(t,e,r=nn)=>sn(t,e,r,null),sn=(t,e,r,n)=>{if(t===e)return t;if(n){for(let s=0;s<n.length;s+=2)if(n[s]===t&&n[s+1]===e)return t}let o=r instanceof Set;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s)||on(s)||s==="constructor"||s==="prototype"||(o?r.has(s):r.includes(s)))continue;let i=t[s],c=e[s];if(xt(i)&&xt(c)){let a=n||[];a.push(t,e),sn(i,c,r,a),a.length-=2}else i===void 0&&(t[s]=c)}return t},Ft=(t,e={})=>{let{exclude:r=[],cleanUndefined:n=!1,cleanNull:o=!1,visited:s=new WeakMap,handleExtends:i=!1}=e;if(!xt(t)||Se(t))return t;if(s.has(t))return s.get(t);let c=r instanceof Set?r:r.length>3?new Set(r):null,a=u=>c?c.has(u):r.includes(u),l=R(t)?[]:{};s.set(t,l);let f=[[t,l]];for(;f.length;){let[u,p]=f.pop();for(let h in u){if(!Object.prototype.hasOwnProperty.call(u,h)||on(h)||h==="__proto__"||a(h))continue;let d=u[h];if(!(n&&d===void 0)&&!(o&&d===null)){if(Se(d)){p[h]=d;continue}if(i&&h==="extends"&&R(d)){p[h]=en(d,r);continue}if(k(d)){p[h]=d;continue}if(xt(d))if(s.has(d))p[h]=s.get(d);else{let g=R(d)?[]:{};s.set(d,g),p[h]=g,f.push([d,g])}else p[h]=d}}}return l}});var cn=C(()=>{"use strict"});var an,Gs,pr,fn=C(()=>{"use strict";an="production",Gs=(t=an)=>t==="production",pr=(t=an)=>!Gs(t)});var Nt,ke=C(()=>{"use strict";Nt=(t,e,...r)=>{let n=e?.context?.plugins;if(!n)return!1;let o=!1;for(let s of n)typeof s[t]=="function"&&(s[t](e,...r),o=!0);return o}});var ln=C(()=>{"use strict"});var un=C(()=>{"use strict"});var Va,pn=C(()=>{"use strict";Va=typeof navigator>"u"?!1:/Mobi/.test(navigator.userAgent)});var dn=C(()=>{"use strict"});var hn=C(()=>{"use strict"});var gn=C(()=>{"use strict"});var yn=C(()=>{"use strict"});var mn=C(()=>{"use strict"});var bn=C(()=>{"use strict"});var xn=C(()=>{"use strict"});var _n=C(()=>{"use strict"});var Sn,dr=C(()=>{"use strict";Sn={}});var vn={};Dt(vn,{setup:()=>zs,supabaseAdapter:()=>Cn});var wn,Ws,zs,hr,Hs,Cn,kn=C(()=>{"use strict";wn=new Map,Ws=(t,e,r)=>`${t}|${e}|${r?"off":"on"}`,zs=async({url:t,key:e,projectId:r,createClient:n,auth:o,retry:s,adapter:i,...c})=>{let a=t||r&&`https://${r}.supabase.co`;if(!a||!e)throw new Error("@symbo.ls/fetch supabase: url (or projectId) and key are required");n||(n=(await import("@supabase/supabase-js")).createClient),o===!1&&(c.auth={autoRefreshToken:!1,persistSession:!1,detectSessionInUrl:!1});let l=Ws(a,e,o===!1),f=wn.get(l);return f||(f=await n(a,e,c),f?.auth&&wn.set(l,f)),!f||!f.auth?null:Cn(f)},hr=(t,e)=>{if(!e)return t;for(let r in e){let n=e[r];if(n===null)t=t.is(r,null);else if(Array.isArray(n))t=t.in(r,n);else if(typeof n=="object")for(let o in n)o==="gt"?t=t.gt(r,n[o]):o==="gte"?t=t.gte(r,n[o]):o==="lt"?t=t.lt(r,n[o]):o==="lte"?t=t.lte(r,n[o]):o==="neq"?t=t.neq(r,n[o]):o==="like"?t=t.like(r,n[o]):o==="ilike"?t=t.ilike(r,n[o]):o==="in"?t=t.in(r,n[o]):o==="is"?t=t.is(r,n[o]):o==="contains"?t=t.contains(r,n[o]):o==="containedBy"?t=t.containedBy(r,n[o]):o==="textSearch"&&(t=t.textSearch(r,n[o]));else t=t.eq(r,n)}return t},Hs=(t,{limit:e,offset:r,order:n,single:o}={})=>{if(n)if(Array.isArray(n))for(let s of n){let i=typeof s=="string"?s:s.by;t=t.order(i,{ascending:s.asc!==!1})}else{let s=typeof n=="string"?n:n.by;t=t.order(s,{ascending:n.asc!==!1})}return e&&(t=t.limit(e)),r&&(t=t.range(r,r+(e||20)-1)),o&&(t=t.single()),t},Cn=t=>({name:"supabase",client:t,getSession:async()=>{let{data:e}=await t.auth.getSession();return e?.session||null},getUser:async()=>{let{data:e}=await t.auth.getUser();return e?.user||null},signIn:e=>e.provider?t.auth.signInWithOAuth({provider:e.provider}):e.token?t.auth.signInWithIdToken(e):t.auth.signInWithPassword(e),signUp:e=>t.auth.signUp(e),signOut:()=>t.auth.signOut(),onAuthStateChange:e=>{let{data:{subscription:r}}=t.auth.onAuthStateChange((n,o)=>e(n,o));return()=>r.unsubscribe()},select:async({from:e,schema:r,select:n,params:o,headers:s,...i})=>{let a=(r?t.schema(r):t).from(e).select(n||"*");if(a=hr(a,o),a=Hs(a,i),s)try{for(let l in s)a.setHeader?a=a.setHeader(l,s[l]):t.rest&&(t.rest.headers[l]=s[l])}catch(l){console.warn("[supabase] setHeader failed:",l.message)}return a},rpc:({from:e,params:r})=>t.rpc(e,r),insert:({from:e,schema:r,data:n,select:o})=>(r?t.schema(r):t).from(e).insert(n).select(o||"*"),update:({from:e,schema:r,data:n,params:o,select:s})=>{let c=(r?t.schema(r):t).from(e).update(n);return c=hr(c,o),c.select(s||"*")},upsert:({from:e,schema:r,data:n,select:o})=>(r?t.schema(r):t).from(e).upsert(n).select(o||"*"),delete:({from:e,params:r})=>{let n=t.from(e).delete();return n=hr(n,r),n},subscribe:({from:e,params:r,on:n},o)=>{let s=n||"*",i=t.channel(`db-${e}-${Date.now()}`).on("postgres_changes",{event:s,schema:"public",table:e,...r?.id?{filter:`id=eq.${r.id}`}:{}},c=>o(c.new,c.old,c)).subscribe();return()=>t.removeChannel(i)},upload:({bucket:e,path:r,file:n,options:o})=>t.storage.from(e).upload(r,n,o),download:({bucket:e,path:r})=>t.storage.from(e).download(r),getPublicUrl:({bucket:e,path:r})=>t.storage.from(e).getPublicUrl(r)})});var En={};Dt(En,{restAdapter:()=>An,setup:()=>qs});var Ks,_t,qs,An,On=C(()=>{"use strict";Ks=(t,e,r)=>{let n=e&&!e.startsWith("/")?"/":"",o=new URL(`${t}${n}${e}`);if(r)for(let s in r){let i=r[s];i!=null&&o.searchParams.set(s,typeof i=="object"?JSON.stringify(i):i)}return o.toString()},_t=async(t,e)=>{let r=await globalThis.fetch(t,e),n=r.headers.get("content-type"),o=n&&n.includes("json")?await r.json():await r.text();return{data:o,error:r.ok?null:o?.message||o?.error||r.statusText,status:r.status}},qs=async({url:t,headers:e,auth:r,fetchOptions:n})=>{if(!t)throw new Error("@symbo.ls/fetch rest: url is required");return An(t,e,r,n)},An=(t,e={},r,n={})=>{let o=r?.token||null,s=f=>{let u={...e,...f};return o&&(u.Authorization=`Bearer ${o}`),u},i=f=>({...s(f),"Content-Type":"application/json"}),c=f=>({...n,...f}),a=(f,u)=>{let p=u||t;if(f&&(f.startsWith("http://")||f.startsWith("https://")))return f;let h=f&&!f.startsWith("/")?"/":"";return`${p}${h}${f||""}`};return{name:"rest",setToken:f=>{o=f},getSession:async()=>{if(!r?.sessionUrl)return o?{token:o}:null;let f=await _t(a(r.sessionUrl,r.baseUrl),c({headers:s()}));return f.error?null:f.data},signIn:async f=>{if(!r?.signInUrl)throw new Error("rest: auth.signInUrl not configured");let u=await _t(a(r.signInUrl,r.baseUrl),c({method:"POST",headers:i(),body:JSON.stringify(f)}));return u.data?.token&&(o=u.data.token),u},signOut:async()=>(r?.signOutUrl&&await _t(a(r.signOutUrl,r.baseUrl),c({method:"POST",headers:s()})),o=null,{error:null}),select:({from:f,params:u,select:p,limit:h,offset:d,order:g,single:b,headers:m,baseUrl:y})=>{let x={...u};return p&&(x.select=p),h&&(x.limit=h),d&&(x.offset=d),b&&(x.single=!0),g&&(typeof g=="string"?x.order=g:Array.isArray(g)?x.order=g.map(_=>`${_.by}:${_.asc===!1?"desc":"asc"}`).join(","):g.by&&(x.order=`${g.by}:${g.asc===!1?"desc":"asc"}`)),_t(Ks(y||t,f||"",x),c({headers:s(m)}))},rpc:({from:f,params:u,headers:p,baseUrl:h})=>_t(a(`rpc/${f}`,h),c({method:"POST",headers:i(p),body:JSON.stringify(u)})),insert:({from:f,data:u,headers:p,baseUrl:h})=>_t(a(f,h),c({method:"POST",headers:i(p),body:JSON.stringify(u)})),update:({from:f,data:u,params:p,method:h,headers:d,baseUrl:g})=>{let b=p?.id||u?.id,m=b?`${f}/${b}`:f;return _t(a(m,g),c({method:h||"PATCH",headers:i(d),body:JSON.stringify(u)}))},delete:({from:f,params:u,headers:p,baseUrl:h})=>{let d=u?.id,g=d?`${f}/${d}`:f;return _t(a(g,h),c({method:"DELETE",headers:s(p)}))}}}});var $n={};Dt($n,{localAdapter:()=>Tn,setup:()=>Js});var gr,Qs,Js,Tn,Pn=C(()=>{"use strict";gr=(t,e)=>{if(!e)return!0;for(let r in e){let n=e[r];if(n===null){if(t[r]!==null&&t[r]!==void 0)return!1}else if(Array.isArray(n)){if(!n.includes(t[r]))return!1}else if(typeof n=="object"){for(let o in n)if(o==="gt"&&!(t[r]>n[o])||o==="gte"&&!(t[r]>=n[o])||o==="lt"&&!(t[r]<n[o])||o==="lte"&&!(t[r]<=n[o])||o==="neq"&&t[r]===n[o]||o==="like"&&!String(t[r]).includes(n[o]))return!1}else if(t[r]!==n)return!1}return!0},Qs=(t,{order:e,limit:r,offset:n,single:o})=>{let s=[...t];if(e){let i=typeof e=="string"?e:e.by,c=e.asc!==!1;s.sort((a,l)=>a[i]<l[i]?c?-1:1:a[i]>l[i]?c?1:-1:0)}return n&&(s=s.slice(n)),r&&(s=s.slice(0,r)),o?{data:s[0]||null,error:null}:{data:s,error:null}},Js=async({data:t,...e})=>Tn(t,e),Tn=(t={},e={})=>{let r={},n={},o=e.persist!==!1&&typeof localStorage<"u",s=e.prefix||"smbls_db_",i=f=>{if(!r[f])if(o)try{let u=localStorage.getItem(s+f);r[f]=u?JSON.parse(u):t[f]||[]}catch{r[f]=t[f]||[]}else r[f]=t[f]||[];return r[f]},c=f=>{if(o)try{localStorage.setItem(s+f,JSON.stringify(r[f]))}catch{}},a=(f,u,p,h)=>{let d=n[f];if(d)for(let g of d)g(p,h,{event:u,table:f})},l=Date.now();return{name:"local",store:r,select:async({from:f,params:u,...p})=>{let d=i(f).filter(g=>gr(g,u));return Qs(d,p)},insert:async({from:f,data:u})=>{let p=i(f),d=(Array.isArray(u)?u:[u]).map(g=>{let b={id:g.id||++l,...g};return p.push(b),b});c(f);for(let g of d)a(f,"INSERT",g,null);return{data:Array.isArray(u)?d:d[0],error:null}},update:async({from:f,data:u,params:p})=>{let h=i(f),d=[];for(let g=0;g<h.length;g++)if(gr(h[g],p)){let b={...h[g]};Object.assign(h[g],u),d.push(h[g]),a(f,"UPDATE",h[g],b)}return c(f),{data:d,error:null}},delete:async({from:f,params:u})=>{let p=i(f),h=[];for(let d=p.length-1;d>=0;d--)gr(p[d],u)&&(h.push(p[d]),p.splice(d,1),a(f,"DELETE",null,h[h.length-1]));return c(f),{data:h,error:null}},subscribe:({from:f,on:u},p)=>{n[f]||(n[f]=[]);let h=(d,g,b)=>{u&&u!=="*"&&u!==b.event||p(d,g,b)};return n[f].push(h),()=>{let d=n[f].indexOf(h);d>-1&&n[f].splice(d,1)}}}}});var se={};Dt(se,{createAdapter:()=>ri,default:()=>di,executeFetch:()=>_r,fetchPlugin:()=>pi,initAdapterAuth:()=>$e,parseDuration:()=>te,queryClient:()=>ui,registerAdapter:()=>ei,resolveDb:()=>jn});var Xs,Ys,Ae,Yt,Ee,Zt,Zs,ti,ei,ri,jn,te,q,Fn,Xt,ni,oe,ee,re,Oe,br,Te,oi,Rn,yr,Mn,Nn,Lt,In,si,Dn,ii,Pe,Ln,$e,xr,rt,ft,ne,$t,pt,St,ci,ai,fi,mr,li,_r,ui,pi,di,ie=C(()=>{"use strict";M();Xs=["select","rpc","insert","update","delete","subscribe"],Ys={supabase:()=>Promise.resolve().then(()=>(kn(),vn)),rest:()=>Promise.resolve().then(()=>(On(),En)),local:()=>Promise.resolve().then(()=>(Pn(),$n))},Ae=Symbol.for("@symbo.ls/fetch:CUSTOM_ADAPTERS"),Yt=(()=>{if(typeof globalThis<"u"&&globalThis[Ae])return globalThis[Ae];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,Ae,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[Ae]}catch{}return t})(),Ee=Symbol.for("@symbo.ls/fetch:PENDING_ADAPTERS"),Zt=(()=>{if(typeof globalThis<"u"&&globalThis[Ee])return globalThis[Ee];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,Ee,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[Ee]}catch{}return t})(),Zs=5e3,ti=t=>new Promise(e=>{if(Yt[t])return e(Yt[t]);let r=Zt[t]||(Zt[t]=[]),n=!1,o=()=>{n||(n=!0,e(Yt[t]||null))};r.push(o),setTimeout(o,Zs)}),ei=(t,e)=>{Yt[t]=e;let r=Zt[t];if(r&&r.length){Zt[t]=[];for(let n of r)n()}},ri=t=>{let e={};for(let r of Xs)t[r]&&(e[r]=t[r]);return e.name=t.name||"custom",e},jn=async t=>{if(!t)return null;if(typeof t.select=="function")return t;let{adapter:e,...r}=t,n=typeof e=="string"?e:typeof t=="string"?t:null;if(!n)return null;let o=Yt[n]||Ys[n];if(!o&&(o=await ti(n),!o))throw new Error(`Unknown db adapter: "${n}". Use registerAdapter() for adapters with optional deps.`);let s=await o();if(!s||typeof s.setup!="function")throw new Error(`Adapter "${n}" loader returned a module without a setup() function. Got keys: [${Object.keys(s||{}).join(", ")}]. Likely a bundler chunk-resolution issue.`);return s.setup(r)},te=t=>{if(!t)return 0;if(typeof t=="number")return t;let e=t.match(/^(\d+)(ms|s|m|h)$/);if(!e)return 0;let r=parseInt(e[1]),n=e[2];return n==="ms"?r:n==="s"?r*1e3:n==="m"?r*6e4:n==="h"?r*36e5:0},q=new Map,Fn=new Map,Xt=new Map,ni=(t,e)=>{if(t.cache?.key)return t.cache.key;let r=ii(t.params),n=`${t.from}:${t.method}:${JSON.stringify(r||"")}`;return e?`${n}:${e}`:n},oe=t=>q.get(t)||null,ee=(t,e,r)=>{let n=q.get(t),o={data:e,error:r,time:Date.now(),stale:!1};q.set(t,o);let s=Fn.get(t);if(s)for(let i of s)k(i)&&i(o);return o},re=t=>{if(t){let e=q.get(t);e&&(e.stale=!0);return}for(let[,e]of q)e.stale=!0},Oe=t=>{if(t){q.delete(t);return}q.clear()},br=t=>!t&&t!==!1?{staleTime:6e4,gcTime:3e5}:t===!1?null:t===!0?{staleTime:6e4,gcTime:3e5}:typeof t=="number"?{staleTime:t,gcTime:Math.max(t*5,3e5)}:S(t)?{staleTime:te(t),gcTime:3e5}:{staleTime:te(t.stale||t.staleTime)||6e4,gcTime:te(t.gc||t.gcTime||t.expire)||3e5,key:t.key},Te=null,oi=()=>{Te||(Te=setInterval(()=>{let t=Date.now();for(let[e,r]of q){let n=Fn.get(e);!(n&&n.size>0)&&t-r.time>(r.gcTime||3e5)&&q.delete(e)}},3e4),Te.unref&&Te.unref())};oi();Rn=3,yr=t=>Math.min(1e3*2**t,3e4),Mn=t=>{let e=t.retry;return e===!1?{count:0}:e===!0||e===void 0?{count:Rn,delay:yr}:typeof e=="number"?{count:e,delay:yr}:{count:e.count??Rn,delay:k(e.delay)?e.delay:typeof e.delay=="number"?()=>e.delay:yr}},Nn=async(t,e)=>{let{count:r,delay:n}=e,o;for(let s=0;s<=r;s++)try{let i=await t();if(i?.error){if(o=i.error,s<r){let c=k(n)?n(s,o):n;await new Promise(a=>setTimeout(a,c));continue}return i}return i}catch(i){if(o=i,s<r){let c=k(n)?n(s,i):n;await new Promise(a=>setTimeout(a,c));continue}throw i}return{data:null,error:o}},Lt={focus:new Set,online:new Set},In=!1,si=()=>{if(In||typeof window>"u")return;In=!0;let t=()=>{for(let r of Lt.focus)r()},e=()=>{for(let r of Lt.online)r()};window.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&t()}),window.addEventListener("focus",t),window.addEventListener("online",e)},Dn=(t,e)=>{let r=e.__ref;if(t===!0)return{from:r.__state||e.key,method:"select",query:!0,on:"create"};if(S(t))return{from:t,method:"select",query:!0,on:"create"};if(I(t)){let n={...t};return n.from=n.from||r.__state||e.key,n.method=n.method||"select",n.on=n.on||"create",n.query===void 0&&(n.query=!0),n}return null},ii=t=>(!t||k(t),t),Pe=(t,e)=>{let r=t?.state?.root||e?.state?.root;if(r?.lang)return r.lang},Ln=(t,e,r)=>{let n;if(!t)n=void 0;else if(k(t))n=t(e,e.state);else{n={};for(let o in t){let s=t[o];n[o]=k(s)?s(e,e.state):s}}return n},$e=async(t,e)=>{if(!t||t.__authInitialized||(t.__authInitialized=!0,!t.getSession))return;let r=(n,o)=>{let s=e.state?.root;s?.update&&s.update({auth:{user:n,session:o,loading:!1}})};try{let n=await t.getSession();r(n?.user||null,n)}catch(n){console.warn("[fetch] Failed to restore auth session:",n.message)}t.onAuthStateChange&&t.onAuthStateChange((n,o)=>{r(o?.user||null,o)})},xr=async(t,e)=>{if(k(t.select))return t.auth!==!1&&await $e(t,e),t;if(t.__resolved)return t.auth!==!1&&await $e(t.__resolved,e),t.__resolved;if(t.__resolving)return t.__resolving;t.__resolving=jn(t);let r=await t.__resolving;return delete t.__resolving,r?(r.auth=t.auth,r.url=t.url,r.key=t.key,t.__resolved=r,e.fetch=r,t.auth!==!1&&await $e(r,e),r):null},rt=(t,e,...r)=>{let n=k(t[e])?t[e]:null;n&&n.call(t,...r,t,t.state,t.context)},ft=(t,e,r,...n)=>{let o=t&&k(t[r])?t[r]:null;o&&o.call(e,...n,e,e.state,e.context)},ne=t=>{let e={},r=t.node;if(!r)return e;if(r.tagName==="FORM"){let o=new FormData(r);for(let[s,i]of o.entries())e[s]=i;return e}let n=r.querySelectorAll("input, textarea, select");for(let o=0;o<n.length;o++){let s=n[o],i=s.name||s.getAttribute("name");i&&(s.type==="checkbox"?e[i]=s.checked:s.type==="file"?e[i]=s.files:e[i]=s.value)}return e},$t=(t,e,r,n={})=>{let o=r&&r.startsWith("~/"),s=o&&t.state?.root||t.state;if(s?.update)if(o){let i=r.slice(2);e&&typeof e=="object"&&!Array.isArray(e)&&i in e?s.update(e,{preventFetch:!0,...n}):s.update({[i]:e},{preventFetch:!0,...n})}else{let i=r?{[r]:e}:e;s.update(i,{preventFetch:!0,...n})}},pt=(t,e)=>{let r=t?.__ref;r&&(r.__fetchStatus=e,r.__fetching=e.isFetching,r.__fetchError=e.error)},St=async(t,e,r,n={})=>{let o=r?.fetch;if(!o||!e||!e.__ref||t.enabled===!1||k(t.enabled)&&!t.enabled(e,e.state)||t.skip===!0||k(t.skip)&&t.skip(e,e.state))return;let s=await xr(o,r);if(!s||!e.__ref)return;let i=e.__ref,{from:c,method:a,query:l,params:f,cache:u,transform:p,single:h,auth:d,fields:g,as:b,limit:m,offset:y,order:x,headers:_,baseUrl:w,page:v,cursor:T,getNextPageParam:Y,getPreviousPageParam:B,infinite:Z,placeholderData:U,initialData:gt,select:N,keepPreviousData:D}=t,st=S(N)?N:void 0;if(l&&k(e.getQuery)){let P=e.getQuery(s.name||"paths");P&&(st=P.select||P.length&&P.join(",")||st)}let ut=Ln(f,e,r),it=br(u),ge=Mn(t),Ue=Pe(e,r),Es=Ue?`:${Ue}`:"",L=it?u?.key||`${c}:${a}:${JSON.stringify(ut||"")}${Z?":infinite":""}${v?":p"+JSON.stringify(v):""}${Es}`:null;if(!i.__fetchInitialized&&L&&(i.__fetchInitialized=!0,gt!==void 0)){let P=k(gt)?gt():gt;ee(L,P,null)}if((a==="select"||a==="rpc")&&L&&it){let P=oe(L);if(P&&!P.error){let $=Date.now()-P.time,j=P.stale||$>(it.staleTime||0),E=P.data;if(k(N)&&(E=N(E,e,e.state)),p&&(E=p(E,e,e.state)),$t(e,E,b),!j){pt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"});return}}else if(U!==void 0){let $=k(U)?U(e,e.state):U;$!==void 0&&$t(e,$,b)}}if(L&&Xt.has(L)&&!n.force){let P=Xt.get(L);try{let $=await Promise.race([P,new Promise((j,E)=>setTimeout(()=>E("DEDUP_TIMEOUT"),15e3))]);if($?.data!==void 0){let j=$.data;k(N)&&(j=N(j,e,e.state)),p&&(j=p(j,e,e.state)),$t(e,j,b),rt(e,"onFetchComplete",j),ft(t,e,"onFetchComplete",j)}}catch{}return}let Os=!oe(L)?.data;pt(e,{isFetching:!0,isLoading:Os,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),rt(e,"onFetchStart"),ft(t,e,"onFetchStart");let yt=r?.analyze?.emitNetwork,Ge=yt?typeof performance<"u"?performance.now():Date.now():0;yt&&yt({phase:"start",mode:"query",from:c,method:a,cacheKey:L,lang:Ue});let Jr=Nn(async()=>{if(d!==!1&&s.auth!==!1&&s.getSession){let E=await s.getSession();if(d===!0&&!E){let K={message:"Not authenticated"};return pt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:K,status:"error",fetchStatus:"idle"}),rt(e,"onFetchError",K),ft(t,e,"onFetchError",K),{data:null,error:K}}}let P=s[a];if(!k(P))return{data:null,error:{message:`Method "${a}" not found on adapter`}};let $={from:c,select:st,params:ut,single:h,limit:m,offset:y,order:x,headers:_,baseUrl:w},j=Pe(e,r);if(j&&($.headers={...$.headers,"Accept-Language":j}),v!==void 0){if(I(v))v.offset!==void 0&&($.offset=v.offset),v.limit!==void 0&&($.limit=v.limit),v.cursor!==void 0&&($.params={...$.params,cursor:v.cursor});else if(typeof v=="number"){let E=t.pageSize||m||20;$.offset=(v-1)*E,$.limit=E}}if(T!==void 0&&($.params={...$.params,cursor:T}),a==="insert"||a==="update"||a==="upsert"){let E;if(g===!0||t.on==="submit")E=ne(e);else if(R(g)){let K=ne(e);E={};for(let We of g)E[We]=K[We]}else e.state?.parse?E=e.state.parse():I(e.state)&&(E={...e.state});p&&(E=p(E,e,e.state)),$.data=E}if(a==="rpc"){let E=ut;if(t.on==="submit"){let K=ne(e);E=t.transformParams?t.transformParams(K,e,e.state):K}$.params=E}if(a==="subscribe"){let E=s.subscribe({from:c,params:ut,on:t.subscribeOn},(K,We,sa)=>{$t(e,K,b),rt(e,"onFetchComplete",K),ft(t,e,"onFetchComplete",K)});return i.__unsubscribe=E,{data:null,error:null,subscribed:!0}}return P($)},ge);L&&Xt.set(L,Jr);try{let P=await Jr;if(P?.subscribed)return;let{data:$,error:j}=P||{};if(j){L&&ee(L,null,j),pt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:j,status:"error",fetchStatus:"idle"}),rt(e,"onFetchError",j),ft(t,e,"onFetchError",j),yt&&yt({phase:"error",mode:"query",from:c,method:a,cacheKey:L,error:j.message||j,durationMs:(typeof performance<"u"?performance.now():Date.now())-Ge});return}if($!==void 0){if((a==="select"||a==="rpc")&&L){let K=ee(L,$,null);K.gcTime=it?.gcTime||3e5}let E=$;Z&&R($)&&(i.__pages||(i.__pages=[]),n.direction==="previous"?i.__pages.unshift($):i.__pages.push($),E=i.__pages.flat(),Y&&(i.__nextPageParam=Y($,i.__pages),i.__hasNextPage=i.__nextPageParam!=null),B&&(i.__prevPageParam=B($,i.__pages),i.__hasPreviousPage=i.__prevPageParam!=null)),k(N)&&(E=N(E,e,e.state)),p&&(E=p(E,e,e.state)),(!D||E!==void 0)&&$t(e,E,b),pt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),rt(e,"onFetchComplete",E),ft(t,e,"onFetchComplete",E),yt&&yt({phase:"success",mode:"query",ok:!0,from:c,method:a,cacheKey:L,durationMs:(typeof performance<"u"?performance.now():Date.now())-Ge})}}catch(P){pt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:P,status:"error",fetchStatus:"idle"}),rt(e,"onFetchError",P),ft(t,e,"onFetchError",P),yt&&yt({phase:"error",mode:"query",from:c,method:a,cacheKey:L,error:P.message||String(P),durationMs:(typeof performance<"u"?performance.now():Date.now())-Ge})}finally{L&&Xt.delete(L)}},ci=(t,e,r)=>{let n=t.on,o=e.__ref;o.__fetchListeners||(o.__fetchListeners=[]);let s=t.__runner||St;if(n==="submit"){let i=a=>{a.preventDefault(),s(t,e,r)},c=e.node;c&&(c.addEventListener("submit",i),o.__fetchListeners.push(()=>c.removeEventListener("submit",i)))}else if(n==="click"){let i=()=>s(t,e,r),c=e.node;c&&(c.addEventListener("click",i),o.__fetchListeners.push(()=>c.removeEventListener("click",i)))}else n==="stateChange"&&(o.__fetchOnStateChange=()=>s(t,e,r))},ai=(t,e,r)=>{let n=e.__ref;n.__fetchCleanups||(n.__fetchCleanups=[]),si();let o=t.refetchInterval;if(o){let s=typeof o=="number"?o:te(o);if(s>0){let i=setInterval(()=>{(t.refetchIntervalInBackground||typeof document>"u"||document.visibilityState==="visible")&&St(t,e,r,{force:!0})},s);n.__fetchCleanups.push(()=>clearInterval(i))}}if(t.refetchOnWindowFocus!==!1){let s=()=>{let i=Pe(e,r),c=ni(t,i),a=oe(c),l=br(t.cache);(!a||a.stale||Date.now()-a.time>(l?.staleTime||0))&&St(t,e,r,{force:!0})};Lt.focus.add(s),n.__fetchCleanups.push(()=>Lt.focus.delete(s))}if(t.refetchOnReconnect!==!1){let s=()=>St(t,e,r,{force:!0});Lt.online.add(s),n.__fetchCleanups.push(()=>Lt.online.delete(s))}},fi=(t,e,r)=>{if(!e.optimistic)return null;let n=t.__ref,o=e.as,s=t.state?.parse?t.state.parse():I(t.state)?{...t.state}:t.state;n.__optimisticSnapshot=s;let i=k(e.optimistic)?e.optimistic(r,s,t):e.optimistic;return i!==void 0&&$t(t,i,o),s},mr=(t,e)=>{let r=t.__ref,n=r.__optimisticSnapshot;n!==void 0&&($t(t,n,e.as),delete r.__optimisticSnapshot)},li=async(t,e,r)=>{let n=r?.fetch;if(!n)return;let o=await xr(n,r);if(!o)return;let s=e.__ref,{method:i,from:c,fields:a,transform:l,as:f,on:u,auth:p,headers:h,baseUrl:d,invalidates:g,optimistic:b,onMutate:m,onSuccess:y,onError:x,onSettled:_}=t,w;if(a===!0||u==="submit")w=ne(e);else if(R(a)){let B=ne(e);w={};for(let Z of a)w[Z]=B[Z]}else e.state?.parse?w=e.state.parse():I(e.state)&&(w={...e.state});l&&(w=l(w,e,e.state)),k(m)&&m(w,e,e.state);let v=b?fi(e,t,w):null;s.__fetching=!0,pt(e,{isFetching:!0,isLoading:!1,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),rt(e,"onFetchStart"),ft(t,e,"onFetchStart");let T=r?.analyze?.emitNetwork,Y=T?typeof performance<"u"?performance.now():Date.now():0;T&&T({phase:"start",mode:"mutation",from:c,method:i});try{if(p!==!1&&o.auth!==!1&&o.getSession){let ut=await o.getSession();if(p===!0&&!ut){v!==void 0&&mr(e,t);let it={message:"Not authenticated"};rt(e,"onFetchError",it),ft(t,e,"onFetchError",it);return}}let B=o[i];if(!k(B))return;let Z={from:c,data:w,headers:h,baseUrl:d};t.params&&(Z.params=Ln(t.params,e,r));let U=Pe(e,r);U&&(Z.headers={...Z.headers,"Accept-Language":U});let gt=Mn(t),N=await Nn(()=>B(Z),gt),{data:D,error:st}=N||{};if(st){v!==void 0&&mr(e,t),pt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:st,status:"error",fetchStatus:"idle"}),rt(e,"onFetchError",st),k(x)&&x(st,w,e),k(_)&&_(null,st,w,e),T&&T({phase:"error",mode:"mutation",from:c,method:i,error:st.message||String(st),durationMs:(typeof performance<"u"?performance.now():Date.now())-Y});return}if(delete s.__optimisticSnapshot,D!==void 0){let ut=f?{[f]:D}:D;e.state?.update&&e.state.update(ut,{preventFetch:!0})}if(pt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),rt(e,"onFetchComplete",D),ft(t,e,"onFetchComplete",D),k(y)&&y(D,w,e),k(_)&&_(D,null,w,e),T&&T({phase:"success",mode:"mutation",ok:!0,from:c,method:i,durationMs:(typeof performance<"u"?performance.now():Date.now())-Y}),g){let ut=R(g)?g:[g];for(let it of ut)if(it===!0||it==="*")for(let[ge]of q)ge.startsWith(c+":")&&re(ge);else re(it)}}catch(B){v!==void 0&&mr(e,t),pt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:B,status:"error",fetchStatus:"idle"}),rt(e,"onFetchError",B),ft(t,e,"onFetchError",B),k(x)&&x(B,w,e),k(_)&&_(null,B,w,e),T&&T({phase:"error",mode:"mutation",from:c,method:i,error:B.message||String(B),durationMs:(typeof performance<"u"?performance.now():Date.now())-Y})}finally{s.__fetching=!1}},_r=(t,e,r,n)=>{if(!t||!n?.fetch)return;let s=Mt(t,e);if(!s)return;let i=R(s)?s.map(a=>Dn(Mt(a,e),e)).filter(Boolean):[Dn(s,e)].filter(Boolean);for(let a of i){let l=a.method==="insert"||a.method==="update"||a.method==="upsert"||a.method==="delete",f=l?li:St;a.on==="create"?f(a,e,n):Promise.resolve().then(()=>{ci({...a,__runner:f},e,n)}),!l&&a.on==="create"&&(a.refetchInterval||a.refetchOnWindowFocus!==!1||a.refetchOnReconnect!==!1)&&ai(a,e,n)}let c=e.__ref;c.refetch=a=>{for(let l of i)St(l,e,n,{force:!0,...a})},c.fetchNextPage=()=>{let a=i[0];if(!a||!a.infinite)return;let l=c.__nextPageParam;if(l==null)return;let f={...a,cursor:l};St(f,e,n,{direction:"next",force:!0})},c.fetchPreviousPage=()=>{let a=i[0];if(!a||!a.infinite)return;let l=c.__prevPageParam;if(l==null)return;let f={...a,cursor:l};St(f,e,n,{direction:"previous",force:!0})}},ui={invalidateQueries:t=>{if(!t){re();return}if(S(t))for(let[e]of q)(e.startsWith(t)||e.includes(t))&&re(e);else if(R(t)){let e=t.join(":");for(let[r]of q)r.includes(e)&&re(r)}},removeQueries:t=>{if(!t){Oe();return}if(S(t))for(let[e]of q)(e.startsWith(t)||e.includes(t))&&Oe(e)},getQueryData:t=>oe(t)?.data??void 0,setQueryData:(t,e)=>{let r=oe(t),n=k(e)?e(r?.data):e;ee(t,n,null)},prefetchQuery:async(t,e)=>{let r=e?.fetch;if(!r)return;let n=await xr(r,e);if(!n)return;let o=t.cache?.key||`${t.from}:${t.method||"select"}:${JSON.stringify(t.params||"")}`,s=n[t.method||"select"];if(!k(s))return;let i=await s({from:t.from,params:t.params,limit:t.limit,offset:t.offset,order:t.order,single:t.single});if(i?.data!==void 0&&!i?.error){let c=ee(o,i.data,null);c.gcTime=br(t.cache)?.gcTime||3e5}return i},getCache:()=>q,clear:()=>Oe(),dropNonLang:t=>{if(!t)return;let e=`:${t}`;for(let[r]of q)r.match(/:([a-z]{2,3})$/i)&&(r.endsWith(e)||Oe(r))}},pi={name:"fetch",create(t){let e=t.fetch;e&&(t.parent||Xt.clear(),_r(e,t,t.state,t.context))}},di=_r});function Un(t){let e=this,{__ref:r}=e,n=[].concat(t),o=r.root[n[0]];if(!n||!n.length)return console.log(n,"on",e.key,"is undefined");for(;o.key===n[0]&&(n.shift(),!!n.length);)if(o=o[n[0]],!o)return;return o}function Gn(){return this.getRef("__children").map(e=>this[e])}function Wn(){return this.getRef().path}function zn(t){let e=null,r=n=>n.__element&&n.root?.isRootState;if(!this)e=Vn();else if(r(this))e=this.root;else if(this.__ref&&this.__ref.path){let n=this.state&&r(this.state),o=k(this.state)&&this.parent.state&&r(this.parent.state);(n||o)&&(e=this.state.root||this.parent.state.root)}return e||(e=Vn()),t?e?.[t]:e}function Hn(t){let e=this.getRootState()?.__element;return e&&Object.keys(e).length>0&&t?e[t]:e}function Kn(t){return this.getRoot("data")&&Object.keys(this.getRoot("data")).length>0&&t?this.getRoot("data")[t]:this.getRoot("data")}function qn(t){let e=this.getRoot()?.context;return t?e[t]:e}function Qn(t){let e=this.context;return t?e[t]:e}function wr(...t){if(Vt!=="test"&&Vt!=="development")return;let e=this,{__ref:r}=e;return console.groupCollapsed(e.key),t.length?t.forEach(n=>console.log(`%c${n}:
1
+ "use strict";var SymbolsEmbed=(()=>{var ze=Object.defineProperty;var Ts=Object.getOwnPropertyDescriptor;var $s=Object.getOwnPropertyNames;var Ps=Object.prototype.hasOwnProperty;var C=(t,e)=>()=>(t&&(e=t(t=0)),e);var Dt=(t,e)=>{for(var r in e)ze(t,r,{get:e[r],enumerable:!0})},Rs=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of $s(e))!Ps.call(t,o)&&o!==r&&ze(t,o,{get:()=>e[o],enumerable:!(n=Ts(e,o))||n.enumerable});return t};var Is=t=>Rs(ze({},"__esModule",{value:!0}),t);var at,Tt,cr=C(()=>{"use strict";at=globalThis,Tt=at.document});var Se,ar=C(()=>{"use strict";cr();Se=t=>typeof at<"u"&&(at.Node&&t instanceof at.Node||at.Window&&t instanceof at.Window||t===at||t===document)});var I,S,we,k,R,xt,tn,Qt=C(()=>{"use strict";I=t=>t===null?!1:typeof t=="object"&&t.constructor===Object,S=t=>typeof t=="string",we=t=>typeof t=="number",k=t=>typeof t=="function",R=t=>Array.isArray(t),xt=t=>t===null?!1:typeof t=="object",tn=t=>t===void 0});var en,fr=C(()=>{"use strict";Ce();en=(t,e=[])=>t.reduce((r,n)=>lr(r,Ft(n,{exclude:e}),e),{})});function ve(t,e,r={}){let{bracketsLength:n=2}=r,o=n===3?"{{{":"{{";if(!t.includes(o))return t;let s=Ls[n],i=e||this.state||{},c=this;return t.replace(s,(a,l,f,u)=>{let p=f.trim();if(u){let h=c?.context,d=h?.functions?.[u]||h?.utils?.[u]||h?.methods?.[u]||h?.snippets?.[u]||c?.[u];if(d&&typeof d=="function")try{return String(d.call(c,p)??"")}catch{return""}return""}if(l){let h=(l.match(/\.\.\//g)||[]).length,d=i;for(let b=0;b<h;b++){if(!d||!d.parent)return"";d=d.parent}if(p==="parent")return String(d.value??"");let g=Jt(d,p);return String(g??"")}else{let h=Jt(i,p);if(h!=null)return String(h);let d=c?.context?.polyglot;if(d?.translations){let g=i?.root?.lang||i?.lang||c?.context?.state?.lang||d.defaultLang||"en",b=d.translations[g];if(b){let y=Jt(b,p);if(y!=null&&typeof y!="object")return String(y);for(let x in b){let _=b[x];if(_&&typeof _=="object"&&!Array.isArray(_)){let w=Jt(_,p);if(w!=null&&typeof w!="object")return String(w)}}}let m=Jt(d.translations,p);if(m!=null&&typeof m!="object")return String(m)}return""}})}var Ls,Jt,rn=C(()=>{"use strict";Ls={2:/{{\s*((?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}/g,3:/{{{(\s*(?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}}/g},Jt=(t,e)=>e.split(".").reduce((r,n)=>r?.[n],t)});var Vs,Bs,Us,nn,ur=C(()=>{"use strict";Vs=new Set(["update","parse","clean","create","destroy","add","toggle","remove","apply","set","reset","replace","quietReplace","quietUpdate","applyReplace","applyFunction","keys","values","ref","rootUpdate","parentUpdate","parent","__element","__depends","__ref","__children","root","setByPath","setPathCollection","removeByPath","removePathCollection","getByPath"]),Bs=new Set(["update","__element"]),Us=new Set(["set","reset","update","remove","updateContent","removeContent","lookup","lookdown","lookdownAll","getRef","getPath","setNodeStyles","spotByPath","keys","parse","setProps","parseDeep","variables","if","log","verbose","warn","error","call","nextElement","previousElement","getRootState","getRoot","getRootData","getRootContext","getContext","getQuery","getDB","getChildren","preventContentUpdate","preventContentRecreate"]),nn=new Set(["node","context","extends","__element","__ref",...Us,...Vs,...Bs])});var on,Mt,lr,sn,Ft,Ce=C(()=>{"use strict";Qt();fr();ar();ur();on=t=>t.charCodeAt(0)===95&&t.charCodeAt(1)===95,Mt=(t,e,r,n)=>{if(k(t))return e?typeof t.call!="function"?t:t.call(e,e,r||e.state,n||e.context):void 0;if(t!=null&&e?.context?.plugins&&(R(t)||I(t)&&!Se(t))){let o=e.context.plugins;for(let s of o)if(s.resolveHandler){let i=s.resolveHandler(t,e);if(typeof i=="function")return Mt(i,e,r,n)}}return t},lr=(t,e,r=nn)=>sn(t,e,r,null),sn=(t,e,r,n)=>{if(t===e)return t;if(n){for(let s=0;s<n.length;s+=2)if(n[s]===t&&n[s+1]===e)return t}let o=r instanceof Set;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s)||on(s)||s==="constructor"||s==="prototype"||(o?r.has(s):r.includes(s)))continue;let i=t[s],c=e[s];if(xt(i)&&xt(c)){let a=n||[];a.push(t,e),sn(i,c,r,a),a.length-=2}else i===void 0&&(t[s]=c)}return t},Ft=(t,e={})=>{let{exclude:r=[],cleanUndefined:n=!1,cleanNull:o=!1,visited:s=new WeakMap,handleExtends:i=!1}=e;if(!xt(t)||Se(t))return t;if(s.has(t))return s.get(t);let c=r instanceof Set?r:r.length>3?new Set(r):null,a=u=>c?c.has(u):r.includes(u),l=R(t)?[]:{};s.set(t,l);let f=[[t,l]];for(;f.length;){let[u,p]=f.pop();for(let h in u){if(!Object.prototype.hasOwnProperty.call(u,h)||on(h)||h==="__proto__"||a(h))continue;let d=u[h];if(!(n&&d===void 0)&&!(o&&d===null)){if(Se(d)){p[h]=d;continue}if(i&&h==="extends"&&R(d)){p[h]=en(d,r);continue}if(k(d)){p[h]=d;continue}if(xt(d))if(s.has(d))p[h]=s.get(d);else{let g=R(d)?[]:{};s.set(d,g),p[h]=g,f.push([d,g])}else p[h]=d}}}return l}});var cn=C(()=>{"use strict"});var an,Gs,pr,fn=C(()=>{"use strict";an="production",Gs=(t=an)=>t==="production",pr=(t=an)=>!Gs(t)});var Nt,ke=C(()=>{"use strict";Nt=(t,e,...r)=>{let n=e?.context?.plugins;if(!n)return!1;let o=!1;for(let s of n)typeof s[t]=="function"&&(s[t](e,...r),o=!0);return o}});var ln=C(()=>{"use strict"});var un=C(()=>{"use strict"});var Va,pn=C(()=>{"use strict";Va=typeof navigator>"u"?!1:/Mobi/.test(navigator.userAgent)});var dn=C(()=>{"use strict"});var hn=C(()=>{"use strict"});var gn=C(()=>{"use strict"});var yn=C(()=>{"use strict"});var mn=C(()=>{"use strict"});var bn=C(()=>{"use strict"});var xn=C(()=>{"use strict"});var _n=C(()=>{"use strict"});var Sn,dr=C(()=>{"use strict";Sn={}});var vn={};Dt(vn,{setup:()=>zs,supabaseAdapter:()=>Cn});var wn,Ws,zs,hr,Hs,Cn,kn=C(()=>{"use strict";wn=new Map,Ws=(t,e,r)=>`${t}|${e}|${r?"off":"on"}`,zs=async({url:t,key:e,projectId:r,createClient:n,auth:o,retry:s,adapter:i,...c})=>{let a=t||r&&`https://${r}.supabase.co`;if(!a||!e)throw new Error("@symbo.ls/fetch supabase: url (or projectId) and key are required");n||(n=(await import("@supabase/supabase-js")).createClient),o===!1&&(c.auth={autoRefreshToken:!1,persistSession:!1,detectSessionInUrl:!1});let l=Ws(a,e,o===!1),f=wn.get(l);return f||(f=await n(a,e,c),f?.auth&&wn.set(l,f)),!f||!f.auth?null:Cn(f)},hr=(t,e)=>{if(!e)return t;for(let r in e){let n=e[r];if(n===null)t=t.is(r,null);else if(Array.isArray(n))t=t.in(r,n);else if(typeof n=="object")for(let o in n)o==="gt"?t=t.gt(r,n[o]):o==="gte"?t=t.gte(r,n[o]):o==="lt"?t=t.lt(r,n[o]):o==="lte"?t=t.lte(r,n[o]):o==="neq"?t=t.neq(r,n[o]):o==="like"?t=t.like(r,n[o]):o==="ilike"?t=t.ilike(r,n[o]):o==="in"?t=t.in(r,n[o]):o==="is"?t=t.is(r,n[o]):o==="contains"?t=t.contains(r,n[o]):o==="containedBy"?t=t.containedBy(r,n[o]):o==="textSearch"&&(t=t.textSearch(r,n[o]));else t=t.eq(r,n)}return t},Hs=(t,{limit:e,offset:r,order:n,single:o}={})=>{if(n)if(Array.isArray(n))for(let s of n){let i=typeof s=="string"?s:s.by;t=t.order(i,{ascending:s.asc!==!1})}else{let s=typeof n=="string"?n:n.by;t=t.order(s,{ascending:n.asc!==!1})}return e&&(t=t.limit(e)),r&&(t=t.range(r,r+(e||20)-1)),o&&(t=t.single()),t},Cn=t=>({name:"supabase",client:t,getSession:async()=>{let{data:e}=await t.auth.getSession();return e?.session||null},getUser:async()=>{let{data:e}=await t.auth.getUser();return e?.user||null},signIn:e=>e.provider?t.auth.signInWithOAuth({provider:e.provider}):e.token?t.auth.signInWithIdToken(e):t.auth.signInWithPassword(e),signUp:e=>t.auth.signUp(e),signOut:()=>t.auth.signOut(),onAuthStateChange:e=>{let{data:{subscription:r}}=t.auth.onAuthStateChange((n,o)=>e(n,o));return()=>r.unsubscribe()},select:async({from:e,schema:r,select:n,params:o,headers:s,...i})=>{let a=(r?t.schema(r):t).from(e).select(n||"*");if(a=hr(a,o),a=Hs(a,i),s)try{for(let l in s)a.setHeader?a=a.setHeader(l,s[l]):t.rest&&(t.rest.headers[l]=s[l])}catch(l){console.warn("[supabase] setHeader failed:",l.message)}return a},rpc:({from:e,params:r})=>t.rpc(e,r),insert:({from:e,schema:r,data:n,select:o})=>(r?t.schema(r):t).from(e).insert(n).select(o||"*"),update:({from:e,schema:r,data:n,params:o,select:s})=>{let c=(r?t.schema(r):t).from(e).update(n);return c=hr(c,o),c.select(s||"*")},upsert:({from:e,schema:r,data:n,select:o})=>(r?t.schema(r):t).from(e).upsert(n).select(o||"*"),delete:({from:e,params:r})=>{let n=t.from(e).delete();return n=hr(n,r),n},subscribe:({from:e,params:r,on:n},o)=>{let s=n||"*",i=t.channel(`db-${e}-${Date.now()}`).on("postgres_changes",{event:s,schema:"public",table:e,...r?.id?{filter:`id=eq.${r.id}`}:{}},c=>o(c.new,c.old,c)).subscribe();return()=>t.removeChannel(i)},upload:({bucket:e,path:r,file:n,options:o})=>t.storage.from(e).upload(r,n,o),download:({bucket:e,path:r})=>t.storage.from(e).download(r),getPublicUrl:({bucket:e,path:r})=>t.storage.from(e).getPublicUrl(r)})});var En={};Dt(En,{restAdapter:()=>An,setup:()=>qs});var Ks,_t,qs,An,On=C(()=>{"use strict";Ks=(t,e,r)=>{let n=e&&!e.startsWith("/")?"/":"",o=new URL(`${t}${n}${e}`);if(r)for(let s in r){let i=r[s];i!=null&&o.searchParams.set(s,typeof i=="object"?JSON.stringify(i):i)}return o.toString()},_t=async(t,e)=>{let r=await globalThis.fetch(t,e),n=r.headers.get("content-type"),o=n&&n.includes("json")?await r.json():await r.text();return{data:o,error:r.ok?null:o?.message||o?.error||r.statusText,status:r.status}},qs=async({url:t,headers:e,auth:r,fetchOptions:n})=>{if(!t)throw new Error("@symbo.ls/fetch rest: url is required");return An(t,e,r,n)},An=(t,e={},r,n={})=>{let o=r?.token||null,s=f=>{let u={...e,...f};return o&&(u.Authorization=`Bearer ${o}`),u},i=f=>({...s(f),"Content-Type":"application/json"}),c=f=>({...n,...f}),a=(f,u)=>{let p=u||t;if(f&&(f.startsWith("http://")||f.startsWith("https://")))return f;let h=f&&!f.startsWith("/")?"/":"";return`${p}${h}${f||""}`};return{name:"rest",setToken:f=>{o=f},getSession:async()=>{if(!r?.sessionUrl)return o?{token:o}:null;let f=await _t(a(r.sessionUrl,r.baseUrl),c({headers:s()}));return f.error?null:f.data},signIn:async f=>{if(!r?.signInUrl)throw new Error("rest: auth.signInUrl not configured");let u=await _t(a(r.signInUrl,r.baseUrl),c({method:"POST",headers:i(),body:JSON.stringify(f)}));return u.data?.token&&(o=u.data.token),u},signOut:async()=>(r?.signOutUrl&&await _t(a(r.signOutUrl,r.baseUrl),c({method:"POST",headers:s()})),o=null,{error:null}),select:({from:f,params:u,select:p,limit:h,offset:d,order:g,single:b,headers:m,baseUrl:y})=>{let x={...u};return p&&(x.select=p),h&&(x.limit=h),d&&(x.offset=d),b&&(x.single=!0),g&&(typeof g=="string"?x.order=g:Array.isArray(g)?x.order=g.map(_=>`${_.by}:${_.asc===!1?"desc":"asc"}`).join(","):g.by&&(x.order=`${g.by}:${g.asc===!1?"desc":"asc"}`)),_t(Ks(y||t,f||"",x),c({headers:s(m)}))},rpc:({from:f,params:u,headers:p,baseUrl:h})=>_t(a(`rpc/${f}`,h),c({method:"POST",headers:i(p),body:JSON.stringify(u)})),insert:({from:f,data:u,headers:p,baseUrl:h})=>_t(a(f,h),c({method:"POST",headers:i(p),body:JSON.stringify(u)})),update:({from:f,data:u,params:p,method:h,headers:d,baseUrl:g})=>{let b=p?.id||u?.id,m=b?`${f}/${b}`:f;return _t(a(m,g),c({method:h||"PATCH",headers:i(d),body:JSON.stringify(u)}))},delete:({from:f,params:u,headers:p,baseUrl:h})=>{let d=u?.id,g=d?`${f}/${d}`:f;return _t(a(g,h),c({method:"DELETE",headers:s(p)}))}}}});var $n={};Dt($n,{localAdapter:()=>Tn,setup:()=>Js});var gr,Qs,Js,Tn,Pn=C(()=>{"use strict";gr=(t,e)=>{if(!e)return!0;for(let r in e){let n=e[r];if(n===null){if(t[r]!==null&&t[r]!==void 0)return!1}else if(Array.isArray(n)){if(!n.includes(t[r]))return!1}else if(typeof n=="object"){for(let o in n)if(o==="gt"&&!(t[r]>n[o])||o==="gte"&&!(t[r]>=n[o])||o==="lt"&&!(t[r]<n[o])||o==="lte"&&!(t[r]<=n[o])||o==="neq"&&t[r]===n[o]||o==="like"&&!String(t[r]).includes(n[o]))return!1}else if(t[r]!==n)return!1}return!0},Qs=(t,{order:e,limit:r,offset:n,single:o})=>{let s=[...t];if(e){let i=typeof e=="string"?e:e.by,c=e.asc!==!1;s.sort((a,l)=>a[i]<l[i]?c?-1:1:a[i]>l[i]?c?1:-1:0)}return n&&(s=s.slice(n)),r&&(s=s.slice(0,r)),o?{data:s[0]||null,error:null}:{data:s,error:null}},Js=async({data:t,...e})=>Tn(t,e),Tn=(t={},e={})=>{let r={},n={},o=e.persist!==!1&&typeof localStorage<"u",s=e.prefix||"smbls_db_",i=f=>{if(!r[f])if(o)try{let u=localStorage.getItem(s+f);r[f]=u?JSON.parse(u):t[f]||[]}catch{r[f]=t[f]||[]}else r[f]=t[f]||[];return r[f]},c=f=>{if(o)try{localStorage.setItem(s+f,JSON.stringify(r[f]))}catch{}},a=(f,u,p,h)=>{let d=n[f];if(d)for(let g of d)g(p,h,{event:u,table:f})},l=Date.now();return{name:"local",store:r,select:async({from:f,params:u,...p})=>{let d=i(f).filter(g=>gr(g,u));return Qs(d,p)},insert:async({from:f,data:u})=>{let p=i(f),d=(Array.isArray(u)?u:[u]).map(g=>{let b={id:g.id||++l,...g};return p.push(b),b});c(f);for(let g of d)a(f,"INSERT",g,null);return{data:Array.isArray(u)?d:d[0],error:null}},update:async({from:f,data:u,params:p})=>{let h=i(f),d=[];for(let g=0;g<h.length;g++)if(gr(h[g],p)){let b={...h[g]};Object.assign(h[g],u),d.push(h[g]),a(f,"UPDATE",h[g],b)}return c(f),{data:d,error:null}},delete:async({from:f,params:u})=>{let p=i(f),h=[];for(let d=p.length-1;d>=0;d--)gr(p[d],u)&&(h.push(p[d]),p.splice(d,1),a(f,"DELETE",null,h[h.length-1]));return c(f),{data:h,error:null}},subscribe:({from:f,on:u},p)=>{n[f]||(n[f]=[]);let h=(d,g,b)=>{u&&u!=="*"&&u!==b.event||p(d,g,b)};return n[f].push(h),()=>{let d=n[f].indexOf(h);d>-1&&n[f].splice(d,1)}}}}});var se={};Dt(se,{createAdapter:()=>ri,default:()=>di,executeFetch:()=>_r,fetchPlugin:()=>pi,initAdapterAuth:()=>$e,parseDuration:()=>te,queryClient:()=>ui,registerAdapter:()=>ei,resolveDb:()=>jn});var Xs,Ys,Ae,Yt,Ee,Zt,Zs,ti,ei,ri,jn,te,q,Fn,Xt,ni,oe,ee,re,Oe,br,Te,oi,Rn,yr,Mn,Nn,Lt,In,si,Dn,ii,Pe,Ln,$e,xr,rt,ft,ne,$t,dt,St,ci,ai,fi,mr,li,_r,ui,pi,di,ie=C(()=>{"use strict";M();Xs=["select","rpc","insert","update","delete","subscribe"],Ys={supabase:()=>Promise.resolve().then(()=>(kn(),vn)),rest:()=>Promise.resolve().then(()=>(On(),En)),local:()=>Promise.resolve().then(()=>(Pn(),$n))},Ae=Symbol.for("@symbo.ls/fetch:CUSTOM_ADAPTERS"),Yt=(()=>{if(typeof globalThis<"u"&&globalThis[Ae])return globalThis[Ae];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,Ae,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[Ae]}catch{}return t})(),Ee=Symbol.for("@symbo.ls/fetch:PENDING_ADAPTERS"),Zt=(()=>{if(typeof globalThis<"u"&&globalThis[Ee])return globalThis[Ee];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,Ee,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[Ee]}catch{}return t})(),Zs=5e3,ti=t=>new Promise(e=>{if(Yt[t])return e(Yt[t]);let r=Zt[t]||(Zt[t]=[]),n=!1,o=()=>{n||(n=!0,e(Yt[t]||null))};r.push(o),setTimeout(o,Zs)}),ei=(t,e)=>{Yt[t]=e;let r=Zt[t];if(r&&r.length){Zt[t]=[];for(let n of r)n()}},ri=t=>{let e={};for(let r of Xs)t[r]&&(e[r]=t[r]);return e.name=t.name||"custom",e},jn=async t=>{if(!t)return null;if(typeof t.select=="function")return t;let{adapter:e,...r}=t,n=typeof e=="string"?e:typeof t=="string"?t:null;if(!n)return null;let o=Yt[n]||Ys[n];if(!o&&(o=await ti(n),!o))throw new Error(`Unknown db adapter: "${n}". Use registerAdapter() for adapters with optional deps.`);let s=await o();if(!s||typeof s.setup!="function")throw new Error(`Adapter "${n}" loader returned a module without a setup() function. Got keys: [${Object.keys(s||{}).join(", ")}]. Likely a bundler chunk-resolution issue.`);return s.setup(r)},te=t=>{if(!t)return 0;if(typeof t=="number")return t;let e=t.match(/^(\d+)(ms|s|m|h)$/);if(!e)return 0;let r=parseInt(e[1]),n=e[2];return n==="ms"?r:n==="s"?r*1e3:n==="m"?r*6e4:n==="h"?r*36e5:0},q=new Map,Fn=new Map,Xt=new Map,ni=(t,e)=>{if(t.cache?.key)return t.cache.key;let r=ii(t.params),n=`${t.from}:${t.method}:${JSON.stringify(r||"")}`;return e?`${n}:${e}`:n},oe=t=>q.get(t)||null,ee=(t,e,r)=>{let n=q.get(t),o={data:e,error:r,time:Date.now(),stale:!1};q.set(t,o);let s=Fn.get(t);if(s)for(let i of s)k(i)&&i(o);return o},re=t=>{if(t){let e=q.get(t);e&&(e.stale=!0);return}for(let[,e]of q)e.stale=!0},Oe=t=>{if(t){q.delete(t);return}q.clear()},br=t=>!t&&t!==!1?{staleTime:6e4,gcTime:3e5}:t===!1?null:t===!0?{staleTime:6e4,gcTime:3e5}:typeof t=="number"?{staleTime:t,gcTime:Math.max(t*5,3e5)}:S(t)?{staleTime:te(t),gcTime:3e5}:{staleTime:te(t.stale||t.staleTime)||6e4,gcTime:te(t.gc||t.gcTime||t.expire)||3e5,key:t.key},Te=null,oi=()=>{Te||(Te=setInterval(()=>{let t=Date.now();for(let[e,r]of q){let n=Fn.get(e);!(n&&n.size>0)&&t-r.time>(r.gcTime||3e5)&&q.delete(e)}},3e4),Te.unref&&Te.unref())};oi();Rn=3,yr=t=>Math.min(1e3*2**t,3e4),Mn=t=>{let e=t.retry;return e===!1?{count:0}:e===!0||e===void 0?{count:Rn,delay:yr}:typeof e=="number"?{count:e,delay:yr}:{count:e.count??Rn,delay:k(e.delay)?e.delay:typeof e.delay=="number"?()=>e.delay:yr}},Nn=async(t,e)=>{let{count:r,delay:n}=e,o;for(let s=0;s<=r;s++)try{let i=await t();if(i?.error){if(o=i.error,s<r){let c=k(n)?n(s,o):n;await new Promise(a=>setTimeout(a,c));continue}return i}return i}catch(i){if(o=i,s<r){let c=k(n)?n(s,i):n;await new Promise(a=>setTimeout(a,c));continue}throw i}return{data:null,error:o}},Lt={focus:new Set,online:new Set},In=!1,si=()=>{if(In||typeof window>"u")return;In=!0;let t=()=>{for(let r of Lt.focus)r()},e=()=>{for(let r of Lt.online)r()};window.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&t()}),window.addEventListener("focus",t),window.addEventListener("online",e)},Dn=(t,e)=>{let r=e.__ref;if(t===!0)return{from:r.__state||e.key,method:"select",query:!0,on:"create"};if(S(t))return{from:t,method:"select",query:!0,on:"create"};if(I(t)){let n={...t};return n.from=n.from||r.__state||e.key,n.method=n.method||"select",n.on=n.on||"create",n.query===void 0&&(n.query=!0),n}return null},ii=t=>(!t||k(t),t),Pe=(t,e)=>{let r=t?.state?.root||e?.state?.root;if(r?.lang)return r.lang},Ln=(t,e,r)=>{let n;if(!t)n=void 0;else if(k(t))n=t(e,e.state);else{n={};for(let o in t){let s=t[o];n[o]=k(s)?s(e,e.state):s}}return n},$e=async(t,e)=>{if(!t||t.__authInitialized||(t.__authInitialized=!0,!t.getSession))return;let r=(n,o)=>{let s=e.state?.root;s?.update&&s.update({auth:{user:n,session:o,loading:!1}})};try{let n=await t.getSession();r(n?.user||null,n)}catch(n){console.warn("[fetch] Failed to restore auth session:",n.message)}t.onAuthStateChange&&t.onAuthStateChange((n,o)=>{r(o?.user||null,o)})},xr=async(t,e)=>{if(k(t.select))return t.auth!==!1&&await $e(t,e),t;if(t.__resolved)return t.auth!==!1&&await $e(t.__resolved,e),t.__resolved;if(t.__resolving)return t.__resolving;t.__resolving=jn(t);let r=await t.__resolving;return delete t.__resolving,r?(r.auth=t.auth,r.url=t.url,r.key=t.key,t.__resolved=r,e.fetch=r,t.auth!==!1&&await $e(r,e),r):null},rt=(t,e,...r)=>{let n=k(t[e])?t[e]:null;n&&n.call(t,...r,t,t.state,t.context)},ft=(t,e,r,...n)=>{let o=t&&k(t[r])?t[r]:null;o&&o.call(e,...n,e,e.state,e.context)},ne=t=>{let e={},r=t.node;if(!r)return e;if(r.tagName==="FORM"){let o=new FormData(r);for(let[s,i]of o.entries())e[s]=i;return e}let n=r.querySelectorAll("input, textarea, select");for(let o=0;o<n.length;o++){let s=n[o],i=s.name||s.getAttribute("name");i&&(s.type==="checkbox"?e[i]=s.checked:s.type==="file"?e[i]=s.files:e[i]=s.value)}return e},$t=(t,e,r,n={})=>{let o=r&&r.startsWith("~/"),s=o&&t.state?.root||t.state;if(s?.update)if(o){let i=r.slice(2);e&&typeof e=="object"&&!Array.isArray(e)&&i in e?s.update(e,{preventFetch:!0,...n}):s.update({[i]:e},{preventFetch:!0,...n})}else{let i=r?{[r]:e}:e;s.update(i,{preventFetch:!0,...n})}},dt=(t,e)=>{let r=t?.__ref;r&&(r.__fetchStatus=e,r.__fetching=e.isFetching,r.__fetchError=e.error)},St=async(t,e,r,n={})=>{let o=r?.fetch;if(!o||!e||!e.__ref||t.enabled===!1||k(t.enabled)&&!t.enabled(e,e.state)||t.skip===!0||k(t.skip)&&t.skip(e,e.state))return;let s=await xr(o,r);if(!s||!e.__ref)return;let i=e.__ref,{from:c,method:a,query:l,params:f,cache:u,transform:p,single:h,auth:d,fields:g,as:b,limit:m,offset:y,order:x,headers:_,baseUrl:w,page:v,cursor:T,getNextPageParam:Y,getPreviousPageParam:B,infinite:Z,placeholderData:U,initialData:gt,select:N,keepPreviousData:D}=t,st=S(N)?N:void 0;if(l&&k(e.getQuery)){let P=e.getQuery(s.name||"paths");P&&(st=P.select||P.length&&P.join(",")||st)}let pt=Ln(f,e,r),it=br(u),ge=Mn(t),Ue=Pe(e,r),Es=Ue?`:${Ue}`:"",L=it?u?.key||`${c}:${a}:${JSON.stringify(pt||"")}${Z?":infinite":""}${v?":p"+JSON.stringify(v):""}${Es}`:null;if(!i.__fetchInitialized&&L&&(i.__fetchInitialized=!0,gt!==void 0)){let P=k(gt)?gt():gt;ee(L,P,null)}if((a==="select"||a==="rpc")&&L&&it){let P=oe(L);if(P&&!P.error){let $=Date.now()-P.time,j=P.stale||$>(it.staleTime||0),E=P.data;if(k(N)&&(E=N(E,e,e.state)),p&&(E=p(E,e,e.state)),$t(e,E,b),!j){dt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"});return}}else if(U!==void 0){let $=k(U)?U(e,e.state):U;$!==void 0&&$t(e,$,b)}}if(L&&Xt.has(L)&&!n.force){let P=Xt.get(L);try{let $=await Promise.race([P,new Promise((j,E)=>setTimeout(()=>E("DEDUP_TIMEOUT"),15e3))]);if($?.data!==void 0){let j=$.data;k(N)&&(j=N(j,e,e.state)),p&&(j=p(j,e,e.state)),$t(e,j,b),rt(e,"onFetchComplete",j),ft(t,e,"onFetchComplete",j)}}catch{}return}let Os=!oe(L)?.data;dt(e,{isFetching:!0,isLoading:Os,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),rt(e,"onFetchStart"),ft(t,e,"onFetchStart");let yt=r?.analyze?.emitNetwork,Ge=yt?typeof performance<"u"?performance.now():Date.now():0;yt&&yt({phase:"start",mode:"query",from:c,method:a,cacheKey:L,lang:Ue});let Jr=Nn(async()=>{if(d!==!1&&s.auth!==!1&&s.getSession){let E=await s.getSession();if(d===!0&&!E){let K={message:"Not authenticated"};return dt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:K,status:"error",fetchStatus:"idle"}),rt(e,"onFetchError",K),ft(t,e,"onFetchError",K),{data:null,error:K}}}let P=s[a];if(!k(P))return{data:null,error:{message:`Method "${a}" not found on adapter`}};let $={from:c,select:st,params:pt,single:h,limit:m,offset:y,order:x,headers:_,baseUrl:w},j=Pe(e,r);if(j&&($.headers={...$.headers,"Accept-Language":j}),v!==void 0){if(I(v))v.offset!==void 0&&($.offset=v.offset),v.limit!==void 0&&($.limit=v.limit),v.cursor!==void 0&&($.params={...$.params,cursor:v.cursor});else if(typeof v=="number"){let E=t.pageSize||m||20;$.offset=(v-1)*E,$.limit=E}}if(T!==void 0&&($.params={...$.params,cursor:T}),a==="insert"||a==="update"||a==="upsert"){let E;if(g===!0||t.on==="submit")E=ne(e);else if(R(g)){let K=ne(e);E={};for(let We of g)E[We]=K[We]}else e.state?.parse?E=e.state.parse():I(e.state)&&(E={...e.state});p&&(E=p(E,e,e.state)),$.data=E}if(a==="rpc"){let E=pt;if(t.on==="submit"){let K=ne(e);E=t.transformParams?t.transformParams(K,e,e.state):K}$.params=E}if(a==="subscribe"){let E=s.subscribe({from:c,params:pt,on:t.subscribeOn},(K,We,sa)=>{$t(e,K,b),rt(e,"onFetchComplete",K),ft(t,e,"onFetchComplete",K)});return i.__unsubscribe=E,{data:null,error:null,subscribed:!0}}return P($)},ge);L&&Xt.set(L,Jr);try{let P=await Jr;if(P?.subscribed)return;let{data:$,error:j}=P||{};if(j){L&&ee(L,null,j),dt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:j,status:"error",fetchStatus:"idle"}),rt(e,"onFetchError",j),ft(t,e,"onFetchError",j),yt&&yt({phase:"error",mode:"query",from:c,method:a,cacheKey:L,error:j.message||j,durationMs:(typeof performance<"u"?performance.now():Date.now())-Ge});return}if($!==void 0){if((a==="select"||a==="rpc")&&L){let K=ee(L,$,null);K.gcTime=it?.gcTime||3e5}let E=$;Z&&R($)&&(i.__pages||(i.__pages=[]),n.direction==="previous"?i.__pages.unshift($):i.__pages.push($),E=i.__pages.flat(),Y&&(i.__nextPageParam=Y($,i.__pages),i.__hasNextPage=i.__nextPageParam!=null),B&&(i.__prevPageParam=B($,i.__pages),i.__hasPreviousPage=i.__prevPageParam!=null)),k(N)&&(E=N(E,e,e.state)),p&&(E=p(E,e,e.state)),(!D||E!==void 0)&&$t(e,E,b),dt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),rt(e,"onFetchComplete",E),ft(t,e,"onFetchComplete",E),yt&&yt({phase:"success",mode:"query",ok:!0,from:c,method:a,cacheKey:L,durationMs:(typeof performance<"u"?performance.now():Date.now())-Ge})}}catch(P){dt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:P,status:"error",fetchStatus:"idle"}),rt(e,"onFetchError",P),ft(t,e,"onFetchError",P),yt&&yt({phase:"error",mode:"query",from:c,method:a,cacheKey:L,error:P.message||String(P),durationMs:(typeof performance<"u"?performance.now():Date.now())-Ge})}finally{L&&Xt.delete(L)}},ci=(t,e,r)=>{let n=t.on,o=e.__ref;o.__fetchListeners||(o.__fetchListeners=[]);let s=t.__runner||St;if(n==="submit"){let i=a=>{a.preventDefault(),s(t,e,r)},c=e.node;c&&(c.addEventListener("submit",i),o.__fetchListeners.push(()=>c.removeEventListener("submit",i)))}else if(n==="click"){let i=()=>s(t,e,r),c=e.node;c&&(c.addEventListener("click",i),o.__fetchListeners.push(()=>c.removeEventListener("click",i)))}else n==="stateChange"&&(o.__fetchOnStateChange=()=>s(t,e,r))},ai=(t,e,r)=>{let n=e.__ref;n.__fetchCleanups||(n.__fetchCleanups=[]),si();let o=t.refetchInterval;if(o){let s=typeof o=="number"?o:te(o);if(s>0){let i=setInterval(()=>{(t.refetchIntervalInBackground||typeof document>"u"||document.visibilityState==="visible")&&St(t,e,r,{force:!0})},s);n.__fetchCleanups.push(()=>clearInterval(i))}}if(t.refetchOnWindowFocus!==!1){let s=()=>{let i=Pe(e,r),c=ni(t,i),a=oe(c),l=br(t.cache);(!a||a.stale||Date.now()-a.time>(l?.staleTime||0))&&St(t,e,r,{force:!0})};Lt.focus.add(s),n.__fetchCleanups.push(()=>Lt.focus.delete(s))}if(t.refetchOnReconnect!==!1){let s=()=>St(t,e,r,{force:!0});Lt.online.add(s),n.__fetchCleanups.push(()=>Lt.online.delete(s))}},fi=(t,e,r)=>{if(!e.optimistic)return null;let n=t.__ref,o=e.as,s=t.state?.parse?t.state.parse():I(t.state)?{...t.state}:t.state;n.__optimisticSnapshot=s;let i=k(e.optimistic)?e.optimistic(r,s,t):e.optimistic;return i!==void 0&&$t(t,i,o),s},mr=(t,e)=>{let r=t.__ref,n=r.__optimisticSnapshot;n!==void 0&&($t(t,n,e.as),delete r.__optimisticSnapshot)},li=async(t,e,r)=>{let n=r?.fetch;if(!n)return;let o=await xr(n,r);if(!o)return;let s=e.__ref,{method:i,from:c,fields:a,transform:l,as:f,on:u,auth:p,headers:h,baseUrl:d,invalidates:g,optimistic:b,onMutate:m,onSuccess:y,onError:x,onSettled:_}=t,w;if(a===!0||u==="submit")w=ne(e);else if(R(a)){let B=ne(e);w={};for(let Z of a)w[Z]=B[Z]}else e.state?.parse?w=e.state.parse():I(e.state)&&(w={...e.state});l&&(w=l(w,e,e.state)),k(m)&&m(w,e,e.state);let v=b?fi(e,t,w):null;s.__fetching=!0,dt(e,{isFetching:!0,isLoading:!1,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),rt(e,"onFetchStart"),ft(t,e,"onFetchStart");let T=r?.analyze?.emitNetwork,Y=T?typeof performance<"u"?performance.now():Date.now():0;T&&T({phase:"start",mode:"mutation",from:c,method:i});try{if(p!==!1&&o.auth!==!1&&o.getSession){let pt=await o.getSession();if(p===!0&&!pt){v!==void 0&&mr(e,t);let it={message:"Not authenticated"};rt(e,"onFetchError",it),ft(t,e,"onFetchError",it);return}}let B=o[i];if(!k(B))return;let Z={from:c,data:w,headers:h,baseUrl:d};t.params&&(Z.params=Ln(t.params,e,r));let U=Pe(e,r);U&&(Z.headers={...Z.headers,"Accept-Language":U});let gt=Mn(t),N=await Nn(()=>B(Z),gt),{data:D,error:st}=N||{};if(st){v!==void 0&&mr(e,t),dt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:st,status:"error",fetchStatus:"idle"}),rt(e,"onFetchError",st),k(x)&&x(st,w,e),k(_)&&_(null,st,w,e),T&&T({phase:"error",mode:"mutation",from:c,method:i,error:st.message||String(st),durationMs:(typeof performance<"u"?performance.now():Date.now())-Y});return}if(delete s.__optimisticSnapshot,D!==void 0){let pt=f?{[f]:D}:D;e.state?.update&&e.state.update(pt,{preventFetch:!0})}if(dt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),rt(e,"onFetchComplete",D),ft(t,e,"onFetchComplete",D),k(y)&&y(D,w,e),k(_)&&_(D,null,w,e),T&&T({phase:"success",mode:"mutation",ok:!0,from:c,method:i,durationMs:(typeof performance<"u"?performance.now():Date.now())-Y}),g){let pt=R(g)?g:[g];for(let it of pt)if(it===!0||it==="*")for(let[ge]of q)ge.startsWith(c+":")&&re(ge);else re(it)}}catch(B){v!==void 0&&mr(e,t),dt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:B,status:"error",fetchStatus:"idle"}),rt(e,"onFetchError",B),ft(t,e,"onFetchError",B),k(x)&&x(B,w,e),k(_)&&_(null,B,w,e),T&&T({phase:"error",mode:"mutation",from:c,method:i,error:B.message||String(B),durationMs:(typeof performance<"u"?performance.now():Date.now())-Y})}finally{s.__fetching=!1}},_r=(t,e,r,n)=>{if(!t||!n?.fetch)return;let s=Mt(t,e);if(!s)return;let i=R(s)?s.map(a=>Dn(Mt(a,e),e)).filter(Boolean):[Dn(s,e)].filter(Boolean);for(let a of i){let l=a.method==="insert"||a.method==="update"||a.method==="upsert"||a.method==="delete",f=l?li:St;a.on==="create"?f(a,e,n):Promise.resolve().then(()=>{ci({...a,__runner:f},e,n)}),!l&&a.on==="create"&&(a.refetchInterval||a.refetchOnWindowFocus!==!1||a.refetchOnReconnect!==!1)&&ai(a,e,n)}let c=e.__ref;c.refetch=a=>{for(let l of i)St(l,e,n,{force:!0,...a})},c.fetchNextPage=()=>{let a=i[0];if(!a||!a.infinite)return;let l=c.__nextPageParam;if(l==null)return;let f={...a,cursor:l};St(f,e,n,{direction:"next",force:!0})},c.fetchPreviousPage=()=>{let a=i[0];if(!a||!a.infinite)return;let l=c.__prevPageParam;if(l==null)return;let f={...a,cursor:l};St(f,e,n,{direction:"previous",force:!0})}},ui={invalidateQueries:t=>{if(!t){re();return}if(S(t))for(let[e]of q)(e.startsWith(t)||e.includes(t))&&re(e);else if(R(t)){let e=t.join(":");for(let[r]of q)r.includes(e)&&re(r)}},removeQueries:t=>{if(!t){Oe();return}if(S(t))for(let[e]of q)(e.startsWith(t)||e.includes(t))&&Oe(e)},getQueryData:t=>oe(t)?.data??void 0,setQueryData:(t,e)=>{let r=oe(t),n=k(e)?e(r?.data):e;ee(t,n,null)},prefetchQuery:async(t,e)=>{let r=e?.fetch;if(!r)return;let n=await xr(r,e);if(!n)return;let o=t.cache?.key||`${t.from}:${t.method||"select"}:${JSON.stringify(t.params||"")}`,s=n[t.method||"select"];if(!k(s))return;let i=await s({from:t.from,params:t.params,limit:t.limit,offset:t.offset,order:t.order,single:t.single});if(i?.data!==void 0&&!i?.error){let c=ee(o,i.data,null);c.gcTime=br(t.cache)?.gcTime||3e5}return i},getCache:()=>q,clear:()=>Oe(),dropNonLang:t=>{if(!t)return;let e=`:${t}`;for(let[r]of q)r.match(/:([a-z]{2,3})$/i)&&(r.endsWith(e)||Oe(r))}},pi={name:"fetch",create(t){let e=t.fetch;e&&(t.parent||Xt.clear(),_r(e,t,t.state,t.context))}},di=_r});function Un(t){let e=this,{__ref:r}=e,n=[].concat(t),o=r.root[n[0]];if(!n||!n.length)return console.log(n,"on",e.key,"is undefined");for(;o.key===n[0]&&(n.shift(),!!n.length);)if(o=o[n[0]],!o)return;return o}function Gn(){return this.getRef("__children").map(e=>this[e])}function Wn(){return this.getRef().path}function zn(t){let e=null,r=n=>n.__element&&n.root?.isRootState;if(!this)e=Vn();else if(r(this))e=this.root;else if(this.__ref&&this.__ref.path){let n=this.state&&r(this.state),o=k(this.state)&&this.parent.state&&r(this.parent.state);(n||o)&&(e=this.state.root||this.parent.state.root)}return e||(e=Vn()),t?e?.[t]:e}function Hn(t){let e=this.getRootState()?.__element;return e&&Object.keys(e).length>0&&t?e[t]:e}function Kn(t){return this.getRoot("data")&&Object.keys(this.getRoot("data")).length>0&&t?this.getRoot("data")[t]:this.getRoot("data")}function qn(t){let e=this.getRoot()?.context;return t?e[t]:e}function Qn(t){let e=this.context;return t?e[t]:e}function wr(...t){if(Vt!=="test"&&Vt!=="development")return;let e=this,{__ref:r}=e;return console.groupCollapsed(e.key),t.length?t.forEach(n=>console.log(`%c${n}:
2
2
  `,"font-weight: bold",e[n])):(console.log(r.path),e.keys().forEach(o=>console.log(`%c${o}:`,"font-weight: bold",e[o]))),console.log(e),console.groupEnd(e.key),e}function Jn(...t){(Vt==="test"||Vt==="development")&&console.warn(...t)}function Xn(...t){if(Vt==="test"||Vt==="development"){if(t[t.length-1]?.debugger)debugger;throw t[t.length-1]?.verbose&&wr.call(this),new Error(...t)}}function Yn(){let t=this,{key:e,parent:r}=t,{__children:n}=r.__ref,o=n.indexOf(e),s=n[o+1];return r[s]}function Zn(t){let e=t||this,{key:r,parent:n}=e,{__children:o}=n.__ref;if(!o)return;let s=o.indexOf(r);return n[o[s-1]]}function to(t={}){let e=this;e.data||(e.data={}),e.data.varCaches||(e.data.varCaches={});let r=e.data.varCaches,n={},o;for(let s in t)t[s]!==r[s]&&(o=!0,n[s]=t[s]);return{changed:s=>{if(!o)return;let i=s(n,Ft(r));for(let c in n)r[c]=n[c];return i},timeout:(s,i)=>{if(!o)return;let c=setTimeout(()=>{s(n),clearTimeout(c)},i)}}}async function eo(){let t=this,e=t.context?.fetch;if(!e)return null;if(typeof e.select=="function"){if(!e.__authInitialized&&e.getSession){let{initAdapterAuth:o}=await Promise.resolve().then(()=>(ie(),se));await o(e,t.context)}return e}if(e.__resolved){if(!e.__resolved.__authInitialized&&e.__resolved.getSession){let{initAdapterAuth:o}=await Promise.resolve().then(()=>(ie(),se));await o(e.__resolved,t.context)}return e.__resolved}if(e.__resolving)return e.__resolving;let r=Promise.resolve().then(()=>(ie(),se)).then(({resolveDb:o})=>o(e));e.__resolving=r;let n=await r;if(e.__resolved=n,t.context.fetch=n,delete e.__resolving,n?.getSession){let{initAdapterAuth:o}=await Promise.resolve().then(()=>(ie(),se));await o(n,t.context)}return n}function ro(t){let e=this,r=t||Sn.useStateQuery||e.context?.useStateQuery;if(!r)return null;let n={};if(Sr(e,n),r===!0)return n;let o=wi[r];return o?o(n):n}var Vt,hi,Vn,Sr,gi,no,yi,mi,bi,xi,_i,Si,wi,oo=C(()=>{"use strict";Qt();Ce();dr();Vt="production";hi=null,Vn=()=>hi||null;Sr=(t,e)=>{let r=t.__ref;if(!r)return;let n=r.__state;n&&typeof n=="string"&&gi(e,n);let o=r.__children;if(o)for(let c=0;c<o.length;c++){let a=t[o[c]];a&&a.__ref&&Sr(a,e)}let s=r.contentElementKey||"content",i=t[s];i&&i.__ref&&Sr(i,e)},gi=(t,e)=>{let n=e.replaceAll("../","").replaceAll("~/","").split("/"),o=t;for(let s=0;s<n.length;s++){let i=n[s];s===n.length-1?o[i]||(o[i]=!0):(o[i]===!0&&(o[i]={}),o[i]||(o[i]={}),o=o[i])}},no=(t,e=0)=>{let r=" ".repeat(e),n=Object.entries(t);return n.length?n.map(([s,i])=>i===!0?`${r}${s}`:`${r}${s} {
3
3
  ${no(i,e+1)}
4
4
  ${r}}`).join(`
@@ -7,8 +7,8 @@ ${no(t,1)}
7
7
  }`,mi=t=>{let e={fields:{},include:[]},r=(n,o)=>{let s=[];for(let i in n)if(n[i]===!0)s.push(i);else{let c=o?`${o}.${i}`:i;e.include.push(c),r(n[i],c)}s.length&&(e.fields[o||"_root"]=s)};return r(t,""),e},bi=t=>{let e=s=>{let i=[],c=[];for(let a in s)if(s[a]===!0)i.push(a);else{let l=e(s[a]),f=[];l.select&&f.push(`$select=${l.select}`),l.expand&&f.push(`$expand=${l.expand}`),c.push(f.length?`${a}(${f.join(";")})`:a)}return{select:i.length?i.join(","):"",expand:c.length?c.join(","):""}},{select:r,expand:n}=e(t),o=[];return r&&o.push(`$select=${r}`),n&&o.push(`$expand=${n}`),o.join("&")},xi=(t,e)=>{let r=[],n=[],o=new Set,s=(f,u,p)=>{o.add(u),p&&n.push(`LEFT JOIN ${u} ON ${u}.${p}_id = ${p}.id`);for(let h in f)f[h]===!0?r.push(`${u}.${h}`):s(f[h],h,u)},i=Object.keys(t);i.length===1&&t[i[0]]!==!0?s(t[i[0]],i[0],null):s(t,"_root",null);let c=[...o][0]||"_root",a=r.length?r.join(", "):"*",l=n.length?`
8
8
  `+n.join(`
9
9
  `):"";return`SELECT ${a}
10
- FROM ${c}${l}`},_i=t=>{let e=[],r=(n,o)=>{for(let s in n){let i=o?`${o}/${s}`:s;n[s]===!0?e.push(i):r(n[s],i)}};return r(t,""),e},Si=t=>{let e=n=>{let o=[];for(let s in n)n[s]===!0?o.push(s):o.push(`${s}(${e(n[s])})`);return o.join(", ")},r=Object.keys(t);return r.length===1&&t[r[0]]!==!0?{from:r[0],select:e(t[r[0]])}:{from:null,select:e(t)}},wi={graphql:yi,"json-api":mi,odata:bi,sql:xi,supabase:Si,paths:_i}});var so=C(()=>{"use strict"});var io=C(()=>{});var co=C(()=>{"use strict"});var ao=C(()=>{"use strict"});var fo=C(()=>{"use strict"});var lo=C(()=>{"use strict"});var uo=C(()=>{"use strict"});var po=C(()=>{"use strict"});var ho=C(()=>{"use strict"});var go=C(()=>{"use strict"});var yo=C(()=>{"use strict"});var mo=C(()=>{"use strict"});var bo,xo,_o,So=C(()=>{"use strict";Qt();bo=t=>(typeof t!="string"&&(t=String(t||"")),t.replace(/(?:^\w|[A-Z]|\b\w)/g,function(e,r){return r===0?e.toLowerCase():e.toUpperCase()}).replace(/\s+/g,"")),xo=t=>t.replace(/[^a-zA-Z0-9]/g," ").trim().toLowerCase().replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),_o=t=>{if(R(t))return t;if(S(t))return t.split(" ");if(I(t))return Object.values(t);if(we(t))return[t]}});var wo=C(()=>{"use strict"});var Co=C(()=>{"use strict"});var M=C(()=>{"use strict";cn();fn();Qt();Ce();ke();fr();ar();ln();un();rn();cr();pn();dn();gn();yn();hn();mn();bn();ur();xn();oo();dr();so();_n();io();co();ao();fo();lo();uo();po();ho();go();yo();mo();So();wo();Co()});var na={};Dt(na,{FACTORY:()=>Fe,REGISTRY:()=>J,applyExtends:()=>pe,batch:()=>mt,create:()=>ot,createEffect:()=>F,createElement:()=>ea,createSignal:()=>ct,createStore:()=>et,getActiveConfig:()=>O,mount:()=>ra,popConfig:()=>z,pushConfig:()=>Q,registerEvent:()=>ue});var Et=null,ye=0,me=[],xe=()=>Et;var be=0,He=[];function ct(t){let e=new Set;function r(){return Et&&(e.add(Et),Et._sources.add(s)),t}function n(i){i!==t&&(t=i,Ms(e))}function o(){return t}let s={get:r,set:n,peek:o,_subscribers:e,_type:"signal"};return s}var At=new Set,Ke=!1;function F(t,e){let r=e?.depth??0,n={_sources:new Set,_type:"effect",_depth:r,_disposed:!1,_subscribers:new Set,_execute(){if(n._disposed)return;Xr(n);let o=Et;Et=n;try{t()}catch(s){console.error("[smbls] effect error:",s)}finally{Et=o}},_notify(){n._disposed||(ye>0?me.push(n):be>0?He.push(n):qe(n))},dispose(){n._disposed=!0,Xr(n)}};return n._execute(),n}function mt(t){ye++;try{t()}finally{ye--,ye===0&&js()}}function qe(t){At.add(t),Ke||(Ke=!0,queueMicrotask(Ds))}var jt=[];function Ds(){if(Ke=!1,At.size!==0){if(At.size===1){let[t]=At;At.clear(),t._disposed||t._execute();return}jt.length=0;for(let t of At)jt.push(t);At.clear(),jt.sort((t,e)=>t._depth-e._depth);for(let t=0;t<jt.length;t++){let e=jt[t];e._disposed||e._execute()}jt.length=0}}function js(){for(let t=0;t<me.length;t++)qe(me[t]);me.length=0}function Fs(t){be++;try{for(let e of t)e._notify()}finally{if(be--,be===0&&He.length>0){let e=He.splice(0);for(let r=0;r<e.length;r++)qe(e[r])}}}function Ms(t){Fs(t)}function Xr(t){for(let e of t._sources)e._subscribers.delete(t);t._sources.clear()}var Ot=Symbol("store"),Xe=Symbol("signals"),Qe=t=>!t||typeof t!="object"||Array.isArray(t)||t[Ot]||Object.isFrozen(t)||typeof Node<"u"&&t instanceof Node||t.__ref||t.nodeType||t.nodeName;function et(t,e,r){r===void 0&&(r=0);let n={},o={},s=e&&e.maxDepth||8;if(t&&typeof t=="object")for(let m in t){if(m==="__proto__"||!Object.prototype.hasOwnProperty.call(t,m))continue;let y=t[m];r<s&&y&&typeof y=="object"&&!Qe(y)?(o[m]=y,n[m]=ct(et(y,e,r+1))):(o[m]=y,n[m]=ct(y))}let i=new Proxy(o,{get(m,y){if(y===Ot)return!0;if(y===Xe)return n;if(y==="__raw")return m;if(y==="update")return c;if(y==="parse")return l;if(y==="clean")return f;if(y==="keys")return u;if(y==="values")return p;if(y==="replace")return h;if(y==="add")return d;if(y==="remove")return g;if(y==="destroy")return b;if(y==="quietUpdate")return a;if(y==="__element")return m.__element;if(y==="parent")return m.parent;if(y==="root")return m.root;if(Object.prototype.hasOwnProperty.call(n,y))return n[y].get();if(m[y]!==void 0)return m[y];if(y!=="root"&&m.root&&m.root!==i)return m.root[y];if(typeof y=="string"&&!y.startsWith("__")&&y!=="then"&&y!=="constructor"&&xe()!=null)return n[y]=ct(void 0),n[y].get()},set(m,y,x){return y==="__proto__"?!1:y==="__element"||y==="parent"||y==="root"?(m[y]=x,!0):(Object.prototype.hasOwnProperty.call(n,y)?(m[y]=x,x&&typeof x=="object"&&!Qe(x)?n[y].set(et(x,e,r+1)):n[y].set(x)):(m[y]=x,x&&typeof x=="object"&&!Qe(x)?n[y]=ct(et(x,e,r+1)):n[y]=ct(x)),!0)},has(m,y){return y in n||y in m},ownKeys(m){return Object.keys(n)},getOwnPropertyDescriptor(m,y){return y in n?{enumerable:!0,configurable:!0,value:n[y].peek()}:Object.getOwnPropertyDescriptor(m,y)},deleteProperty(m,y){return n[y]&&(n[y].set(void 0),delete n[y]),delete m[y],!0}});function c(m,y){mt(()=>{for(let _ in m)_!=="__proto__"&&(i[_]=m[_])});let x=o.__element;return x&&x.onUpdate&&!y?.quiet&&x.onUpdate(x,i,x.context),i}function a(m){return c(m,{quiet:!0})}function l(m){if(m||(m=new Set),m.has(i))return"[Circular]";m.add(i);let y={};for(let x in n){if(x==="parent"||x==="root"||x.startsWith("__"))continue;let _=n[x].peek();_&&_[Ot]?y[x]=_.parse(m):y[x]=_}return y}function f(){return mt(()=>{for(let m in n)delete i[m]}),i}function u(){return Object.keys(n)}function p(){return Object.keys(n).map(m=>n[m].peek())}function h(m){return mt(()=>{for(let y in n)y in m||delete i[y];for(let y in m)y!=="__proto__"&&(i[y]=m[y])}),i}function d(m,y){return i[m]=y,i}function g(m){return delete i[m],i}function b(){f(),o.__element=null,o.parent=null}return i}function G(t){return t&&t[Ot]===!0}function Ye(t,e){let r={},n={};if(t&&typeof t=="object")for(let i in t)n[i]=t[i],r[i]=ct(t[i]);let o=i=>{if(Object.prototype.hasOwnProperty.call(r,i))return r;let c=e;for(;c;){let a=c[Xe];if(a&&Object.prototype.hasOwnProperty.call(a,i))return a;c=c[Ot]?c[Je]:null}return null};return new Proxy(n,{get(i,c){return c===Ot?!0:c===Xe?r:c===Je?e:c==="__raw"?i:Object.prototype.hasOwnProperty.call(r,c)?r[c].get():e&&c!=="then"&&c!=="constructor"?e[c]:i[c]},set(i,c,a){let l=o(c);return l?(l===r&&(i[c]=a),l[c].set(a),!0):(i[c]=a,r[c]=ct(a),!0)},has(i,c){if(c in r||c in i)return!0;let a=e;for(;a;){if(c in a)return!0;a=a[Ot]?a[Je]:null}return!1},ownKeys(){return Object.keys(r)},getOwnPropertyDescriptor(i,c){return c in r?{enumerable:!0,configurable:!0,value:r[c].peek()}:Object.getOwnPropertyDescriptor(i,c)}})}var Je=Symbol("scope.parent");var Ze="http://www.w3.org/2000/svg",rr=new Set(["svg","path","circle","ellipse","line","polyline","polygon","rect","g","defs","use","symbol","clipPath","mask","pattern","image","text","tspan","textPath","marker","linearGradient","radialGradient","stop","filter","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","animate","animateMotion","animateTransform","set","foreignObject","desc","title","metadata"]),Ns=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","menu","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","search","section","select","slot","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","string","fragment","shadow"]);function tr(t){return Ns.has(t)||rr.has(t)}function nr(t){return rr.has(t)}function Ht(t){let{tag:e,key:r}=t;if(typeof e=="function"&&(e=e(t)),e===!0&&(e=r),typeof e=="string"&&tr(e))return e;if(!r||typeof r!="string")return"div";let n=new Set(["html","head","body","meta","link","script","style","title","base","noscript","template"]),o=r.toLowerCase();return o.includes(".")&&(o=o.split(".")[0]),o.includes("_")&&(o=o.split("_")[0]),tr(o)&&!n.has(o)?o:"div"}var Yr={};function er(t,e){let r=e?.context?.document||globalThis.document;if(!r)return null;if(t==="string")return r.createTextNode(e?.text||"");if(t==="fragment")return r.createDocumentFragment();if(nr(t)){let n=e?.parent;if(t==="svg"||n?.node?.namespaceURI===Ze)return r.createElementNS(Ze,t);if(t!=="svg")return r.createElement("div")}return r.createElement(t)}function Kt(t){let e=t.tag=Ht(t),n=nr(e)&&(e==="svg"||t.parent?.node?.namespaceURI===Ze)?"svg:"+e:e,o=t?.context?.document||globalThis.document,s=Yr[n];if(s||(s=Yr[n]=er(e,t)),!s)return null;let i=o&&s.ownerDocument!==o?er(e,t):s.cloneNode(!0);return e==="string"&&(i.nodeValue=t.text||""),i}var J=new Set(["extends","children","content","childrenAs","childExtends","childExtendsRecursive","childProps","inheritParentProps","state","if","define","deps","tag","attr","style","text","html","value","data","classlist","class","scope","root","context","$router","routes","fetch","variables","query","key","component","preventContentUpdate","preventContentRecreate","subscribeTo","autoGrow","__name","__ref","__hash","__text","parent","node"]);var qt=new Set(["start","init","complete","attachNode","stateInit","stateCreated","beforeUpdate","update","afterUpdate","beforeClassAssign","lazyLoad","render","renderRouter","done","create","frame","startUpdate","stateUpdate","beforeStateUpdate","initInspect","initSync","beforeRemove","remove"]),or=new Set(["load","error","abort","canplay","canplaythrough","ended","pause","play","playing","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting","durationchange","loadeddata","loadedmetadata","progress","emptied","resize"]),Zr=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),sr=new Set(["click","dblclick","mousedown","mouseup","mousemove","mouseenter","mouseleave","mouseover","mouseout","pointerdown","pointerup","pointermove","pointerenter","pointerleave","pointerover","pointerout","touchstart","touchend","touchmove","keydown","keyup","keypress","input","change","submit","reset","focus","blur","focusin","focusout","scroll","wheel","contextmenu","drag","dragstart","dragend","dragenter","dragleave","dragover","drop"]);var ir=t=>t==="em"||t==="rem"||t==="vw"||t==="vh"||t==="vmax"||t==="vmin",_e=["px","cm","mm","in","pt","pc","em","rem","ex","cap","ch","ic","lh","rlh","%","vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh","cqw","cqh","cqi","cqb","cqmin","cqmax","deg","rad","grad","turn","s","ms","dpi","dpcm","dppx","fr","auto"];M();var vo=t=>{if(t==="")return[0,0,0,0];if(t.toLowerCase()==="transparent")return[0,0,0,0];if(t[0]==="#")return t.length<7&&(t="#"+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+(t.length>4?t[4]+t[4]:"")),[parseInt(t.substr(1,2),16),parseInt(t.substr(3,2),16),parseInt(t.substr(5,2),16),t.length>7?parseInt(t.substr(7,2),16)/255:1];if(t.indexOf("rgb")===-1&&Tt&&at){let e=Tt.body.appendChild(Tt.createElement("fictum")),r="rgb(1, 2, 3)";if(e.style.color=r,e.style.color!==r){Tt.body.removeChild(e);return}if(e.style.color=t,e.style.color===r||e.style.color==="")return Tt.body.removeChild(e),[0,0,0,0];t=at.getComputedStyle(e).color,Tt.body.removeChild(e)}return t.indexOf("rgb")===0?(t.indexOf("rgba")===-1&&(t=`${t}, 1`),t.match(/[\.\d]+/g).map(e=>+e)):[0,0,0,0]};var Ci=(t,e=1)=>{let[r,n,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return[r,n,o]};var vi=([t,e,r])=>((1<<24)+(t<<16)+(e<<8)+r).toString(16).slice(1);var ki=(t,e,r)=>{let n=Math.max(t,e,r),o=n-Math.min(t,e,r),s=1-Math.abs(n+n-o-1),i=o&&(n==t?(e-r)/o:n==e?2+(r-t)/o:4+(t-e)/o);return[60*(i<0?i+6:i),s?o/s:0,(n+n-o)/2]},Ai=(t,e,r,n=e*Math.min(r,1-r),o=(s,i=(s+t/30)%12)=>r-n*Math.max(Math.min(i-3,9-i,1),-1))=>[o(0),o(8),o(4)],Ei=(t,e)=>{let r=parseInt(t,16),n=(r>>16)+e;n>255?n=255:n<0&&(n=0);let o=(r>>8&255)+e;o>255?o=255:o<0&&(o=0);let s=(r&255)+e;return s>255?s=255:s<0&&(s=0),((s|o<<8|n<<16)+16777216).toString(16).slice(1)};var W=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,Pt=/(?:rgba?\(|hsla?\(|#[0-9a-fA-F]{3,8}\b)/,Oi=/^([a-zA-Z]\w*)(?:\.(\d+))?(?:([+-]\d+|=\d+))?$/,ce=t=>{if(!S(t))return null;if(Pt.test(t))return{passthrough:t};if(W(t))return{cssVar:t};let e=t.match(Oi);if(!e)return null;let[,r,n,o]=e,s=n!==void 0?`0.${n}`:void 0,i=o&&o[0]==="="?o.slice(1):o;return{name:r,alpha:s,tone:i}},Bt=t=>S(t)&&(t.includes("rgb")||t.includes("var(")||t.includes("#")),Re=t=>{let e=[],r="",n=0;for(let o of t){if(o==="("?n+=1:o===")"&&n>0&&(n-=1),o===","&&n===0){e.push(r),r="";continue}r+=o}return(r.length||!e.length)&&e.push(r),e},ko=(t,e)=>{S(t)&&t.includes("rgb")&&(t=vo(t).join(", ")),S(t)&&(t=t.split(",").map(o=>parseFloat(o.trim()))),we(e)&&(e+="");let r=vi(t),n=e.slice(0,1);if(n==="-"||n==="+"){let o=Ei(r,parseFloat(e));return Ci(o).join(", ")}else{let[o,s,i]=t,c=ki(o,s,i),[a,l,f]=c;return Ai(a,l,parseFloat(e)/100*255)}};var Cr=(t,e)=>{if(t[e])return t[e].value;if(t.default)return t[t.default].value;let r=Object.keys(t)[0];return r&&t[r]&&t[r].value};M();M();M();var Ie={};Dt(Ie,{animation:()=>Qi,breakpoints:()=>Ki,class:()=>ec,color:()=>Ni,devices:()=>qi,document:()=>Hi,font:()=>Pi,fontFace:()=>Di,fontFamily:()=>Ri,fontFamilyTypes:()=>Ii,gradient:()=>Li,grid:()=>tc,icons:()=>Ui,media:()=>ji,reset:()=>rc,semanticIcons:()=>Gi,sequence:()=>Rt,shadow:()=>Bi,sizes:()=>oc,spacing:()=>Mi,svg:()=>Ji,svgData:()=>Xi,templates:()=>Yi,theme:()=>Vi,timing:()=>zi,typography:()=>vr,unit:()=>Ti,vars:()=>nc});var Rt={"minor-second":1.067,"major-second":1.125,"minor-third":1.2,"major-third":1.25,"perfect-fourth":1.333,"augmented-fourth":1.414,"perfect-fifth":1.5,"minor-sixth":1.6,phi:1.618,"major-sixth":1.667,"square-root-3":1.732,"minor-seventh":1.778,"major-seventh":1.875,octave:2,"square-root-5":2.23,"major-tenth":2.5,"major-eleventh":2.667,"major-twelfth":3,pi:3.14,"double-octave":4};var Ti={default:"em"};var $i={browserDefault:16,base:16,type:"font-size",ratio:Rt["minor-third"],range:[-3,12],h1Matches:6,lineHeight:1.5,subSequence:!0,mediaRegenerate:!1,unit:"em",templates:{},sequence:{},scales:{},vars:{}},vr=$i;var Pi={};var Ri={},Ii={"sans-serif":"Helvetica, Arial, sans-serif, --system-default",serif:"Times New Roman, Georgia, serif, --system-default",monospace:"Courier New, monospace, --system-default"},Di={};var ji={tv:"(min-width: 2780px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var Fi={base:vr.base,type:"spacing",ratio:Rt.phi,range:[-5,15],subSequence:!0,mediaRegenerate:!1,unit:"em",sequence:{},scales:{},vars:{}},Mi=Fi;var Ni={},Li={};var Vi={};var Bi={};var Ui={},Gi={};var Wi={default:150,base:150,type:"timing",ratio:Rt["perfect-fourth"],range:[-3,12],mediaRegenerate:!1,unit:"ms",sequence:{},scales:{},vars:{}},zi=Wi;var Hi={};var Ki={screenL:1920,screenM:1680,screenS:1440,tabletL:1366,tabletM:1280,tabletS:1024,mobileL:768,mobileM:560,mobileS:480,mobileXS:375},qi={screenXXL:[2560,1440],screenXL:[2240,1260],screenL:[1920,1024],screenM:[1680,1024],screenS:[1440,720],tabletL:[1366,926],tabletM:[1280,768],tabletS:[1024,768],mobileL:[768,375],mobileM:[560,768],mobileS:[480,768],mobileXS:[375,768]};var Qi={};var Ji={},Xi={};var Yi={};var Zi={},tc=Zi;var ec={};var rc={},nc={},oc={};var Ao={},Eo={},De=Ie,je={},Oo=t=>t.replace(/_([a-z])/g,(e,r)=>r.toUpperCase());for(let t in De){let e=t.toLowerCase();je[e]=De[t];let r=Oo(e);r!==e&&(je[r]=De[t]),e!==t&&(je[t]=De[t])}var kr={verbose:!1,useVariable:!0,useReset:!0,globalTheme:"auto",cssVars:Ao,cssMediaVars:Eo,CSS_VARS:Ao,CSS_MEDIA_VARS:Eo,_scratchConfig:!0,...je},Xl=Ft(kr),Fe={active:"0",0:kr};var ae=[],Q=t=>{t&&t._scratchConfig&&ae.push(t)},z=()=>{ae.pop()},O=t=>ae.length?ae[ae.length-1]:Fe[t||Fe.active]||kr;var Me={"-6":"U","-5":"V","-4":"W","-3":"X","-2":"Y","-1":"Z",0:"A",1:"B",2:"C",3:"D",4:"E",5:"F",6:"G",7:"H",8:"I",9:"J",10:"K",11:"L",12:"M",13:"N",14:"O",15:"P",16:"Q",17:"R",18:"S",19:"T"},To=(t,e)=>{let{key:r,variable:n,value:o,scaling:s,index:i,scalingVariable:c}=t;e.sequence[r]={key:r,decimal:~~(o*100)/100,val:~~o,scaling:s,index:i,scalingVariable:c,variable:n},e.scales[r]=s;let a=$o.has(e.unit)?"rem":e.unit;e.vars[n]=s+a},Ut=t=>{if(!t.includes("("))return t;let e=t.split("(")[0],r=t.slice(t.indexOf("(")+1,t.lastIndexOf(")"));return[e,r]},$o=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),sc=(t,e)=>{let{base:r,type:n,unit:o}=e,s=$o.has(o)?"rem":o,i=(ir(s)?1:r)+s;if(t===0)return i;let a="--"+(e.varPrefix?e.varPrefix+"-":"")+(n&&n.replace(".","-")),l=`${a}-ratio`;if(t>0){let f=Me[t-1];return`calc(var(${a}-${f}) * var(${l}))`}if(t<0){let f=Me[t+1],u=Math.abs(t),p=Math.pow(Po,2*u),h=Me[u];return h?`max(calc(var(${a}-${f}) / var(${l})), calc(var(${a}-${h}) / ${p.toFixed(4)}))`:`calc(var(${a}-${f}) / var(${l}))`}},ic=(t,e,r,n)=>{let{type:o}=n,i=t===2&&e.length===2?t+1:t,l=`${"--"+(n.varPrefix?n.varPrefix+"-":"")+(o&&o.replace(".","-"))}-sub-ratio-`;return`calc(var(${r}) * var(${l+i}))`},cc=(t,e)=>{let n=(t*e-t)/1.618,o=t*e-n,s=t+n,i=(o+s)/2;return[o,i,s]};var ac=(t,e)=>{let{key:r,base:n,value:o,ratio:s,variable:i,index:c}=t,l=~~(o*s)-~~o,f,[u,p,h]=cc(o,s);l>16?f=[u,p,h]:f=[u,h],f.forEach((d,g)=>{let b=~~(d/n*1e3)/1e3,m=i+(g+1),y=c+(g+1)/10,x=ic(g+1,f,i,e),_={key:r+(g+1),variable:m,value:d,scaling:b,scalingVariable:x,index:y};To(_,e)})},Po=1.618,fc=(t,e,r)=>{if(t>=0)return e*Math.pow(r,t);let n=Math.abs(t),o=e*Math.pow(r,t),s=e*Math.pow(r,n)/Math.pow(Po,2*n);return Math.max(o,s)},fe=t=>{let{type:e,base:r,ratio:n,range:o,subSequence:s}=t,i=Math.abs(o[0])+Math.abs(o[1]),a="--"+(t.varPrefix?t.varPrefix+"-":"")+(e&&e.replace(".","-"))+"-";for(let l=0;l<=i;l++){let f=o[1]-l,u=Me[f],p=fc(f,r,n),h=~~(p/r*100)/100,d=a+u,g=sc(f,t),b={key:u,variable:d,value:p,base:r,scaling:h,scalingVariable:g,ratio:n,index:f};To(b,t),s&&ac(b,t)}return t};var Ro=(t="A",e)=>{let r=O(),{unit:n}=r;if(S(t)&&W(t))return`var(${t})`;let{sequence:o,unit:s=n.default,useVariable:i}=e,c=/^-?[a-zA-Z]/i,a=c.test(t);if(_e.some(_=>t.includes(_))||!a||["none","auto","max-content","min-content","fit-content","inherit","initial","unset","revert","revert-layer"].includes(t))return t;let p=`--${e.varPrefix?e.varPrefix+"-":""}${xo(e.type.replace(".","-"))}-`,h=t.toUpperCase(),d=h.slice(0,1)==="-"?"-":"",g=d?h.slice(1):h,b="";g.includes("_")&&(b="_"+g.split("_")[1].toLowerCase(),g=g.split("_")[0]);let m=_=>c.test(_)?`var(${p}${_}${b})`:_;if(g.includes("+")){let[_,w]=g.split("+"),v=`${m(_)} + ${m(w)}`;return d?`calc((${v}) * -1)`:`calc(${v})`}else if(g.includes("*")){let[_,w]=g.split("*"),v=`${m(_)} * ${m(w)}`;return d?`calc((${v}) * -1)`:`calc(${v})`}else if(g.includes("-")){let[_,w]=g.split("-"),v=`${m(_)} - ${m(w)}`;return d?`calc((${v}) * -1)`:`calc(${v})`}let y=r.sizes;if(y){let _=y[t]||y[t.toLowerCase()];if(_!==void 0)return d?`calc(${_} * -1)`:_}if(!o[g]&&g.length===2&&(r.verbose&&console.warn(g,"- value is not found because `subSequence` is set to false"),g=g.slice(0,1)),i||r.useVariable){let _=`var(${p}${g}${b})`;return d?`calc(${_} * -1)`:_}let x=o?o[g]:null;return x?s==="ms"||s==="s"?d+x.val+s:d+x.scaling+s:console.warn("can't find",o,g)},lc=(t,e)=>{if(!["+","-","*","/",","].filter(s=>t.includes(s+" ")).length)return t;let n=/(\s*[+\-*/,]\s*)/;return t.split(n).map(s=>{let i=s.trim();return!i||["+","-","*","/",","].includes(i)?s:Ro(i,e)}).join("")},It=(t,e,r,n)=>{if(typeof t!="string")return O().verbose&&console.warn(e,t,"is not a string"),{[e]:t};if(t==="-"||t==="")return{};if(!n&&t.includes("(")){let s=Ut(t);n=s[0],t=s[1]}return["+","-","*","/",","].filter(s=>t.includes(s+" ")).length?t=lc(t,r):t=Ro(t,r),{[e]:n?`${n}(${t})`:t}};M();var du=pr();var uc="line|circle|ellipse|rect|polyline|polygon|path|stop|use|image",hu=new RegExp(`<(${uc})\\b([^>]*?)\\s*/>`,"g");M();var dt=(t,e,r)=>{let n=r||O();if(!S(t)){n.verbose&&console.warn(t,"- type for color is not valid");return}if(W(t))return`var(${t})`;e&&t[e]&&(t=t[e]);let o,s,i;if(R(t))[o,s,i]=t;else{let u=ce(t);if(!u){let{color:p,gradient:h}=n,d=h[t]||p[t];return d?n.useVariable?`var(${d.var})`:d.value:t}if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;o=u.name,s=u.alpha,i=u.tone}let{color:c,gradient:a}=n,l=c[o]||a[o];if(!l)return n.verbose&&console.warn("Can't find color ",o),t;e&&(l[e]?l=l[e]:n.verbose&&console.warn(t," - does not have ",e));let f=l.rgb;return f?(i&&!l[i]&&(f=ko(f,i),l[i]={rgb:f,var:`${l.var}-${i}`}),l[i]&&(f=l[i].rgb),s?`rgba(${f}, ${s})`:i?`rgba(${f}, 1)`:n.useVariable?`var(${l.var})`:`rgb(${f})`):n.useVariable?`var(${l.var})`:l.value},nt=(t,e,r)=>{let n=r||O();if(e||(e=n.globalTheme==="auto"?null:n.globalTheme),!S(t)){n.verbose&&console.warn(t,"- type for color is not valid");return}if(W(t))return`var(${t})`;let o;if(R(t))o=t[0];else{let l=ce(t);if(!l)return t;if(l.passthrough)return l.passthrough;if(l.cssVar)return`var(${l.cssVar})`;o=l.name}let{color:s,gradient:i}=n,c=s[o]||i[o],a=I(c);if(a&&c.value)return dt(t,`@${e}`,r);if(a){if(n.useVariable&&c.var)return`var(${c.var})`;if(e)return dt(t,`@${e}`,r);{let l={};for(let f in c){if(f.charCodeAt(0)!==64)continue;let u=n.media[f.slice(1)];if(!u)continue;let p="@media "+(u==="print"?`${u}`:`screen and ${u}`);l[p]=dt(t,f,r)}return l}}else return n.verbose&&console.warn("Can't find color",t),t};M();var Ar=t=>{let e=O(),r={};for(let n in t){let o=n.slice(0,1);if(xt(t[n])){if(o==="@")continue;o===":"?r[`&${n}`]=Ar(t[n]):o==="."&&(r[`&${n}`]=Ar(t[n]))}else r[n]=t[n]}return r},Do=(t,e)=>{let r=e.shift();return t[r]?Do(t[r],e):t},Io=(t,e)=>R(e)?Do(t,e):S(e)&&t[e]?t[e]:t;var le=(t,e)=>{let r=O();if(S(t)&&W(t)&&(t=le(t.slice(2))),!t||!S(t)){r.verbose&&console.warn(`${t} - Theme is not a string`);return}let[n,...o]=R(t)?t:t.split(" "),s=r.theme[n];return s&&o.length?s=Io(s,o):s&&e&&(s=Io(s,e)),Ar(s)};var jo=(t,e)=>{let r=O(),{fontFamily:n}=r;return Cr(e||n,t)};var Mo=t=>{let e=O(),{typography:r}=e;return It(t,"fontSize",r)};M();M();var hc=t=>{let r=O().spacing||{},n=parseFloat(t.spacingRatio),o={...r,ratio:Number.isFinite(n)?n:r.ratio,sequence:{},scales:{}};return fe(o),o};var No=t=>{let e=t.toLowerCase(),r=e.includes("width")||e.includes("height"),n=e.includes("border")||e.includes("outline");return r&&!n};var gc=t=>{let e=O(),{spacing:r}=e;return!t||!t.sequence?r:Object.keys(t.sequence).length>0?t:fe(t)},H=(t,e="padding",r,n)=>{let o=gc(r);if(S(t)&&!n&&t.includes("(")){let i=Ut(t);n=i[0],t=i[1]}let s=n?[t]:_o(t);if(R(s)){if(s.length>1){let i="";e==="borderWidth"&&(e="border",i="Width");let c={2:["Block","Inline"],3:["BlockStart","Inline","BlockEnd"],4:["BlockStart","InlineEnd","BlockEnd","InlineStart"]},a=(l,f)=>It(s[f],e+l+i,o,n);return c[s.length].map((l,f)=>a(l,f))}return It(t,e,o,n)}},Gt=(t,e,r,n)=>{let o=O(),{spacing:s}=o,i=r||t[e];if(!n&&S(i)&&i.includes("(")){let c=Ut(i);n=c[0],i=c[1]}if(t.spacingRatio){let c=hc(t);return H(i,e,c,n)}return H(i,e,s,n)},Lo=t=>{let e=r=>{let n=["+","-","*","/"].includes(r),o=_e.some(i=>t.includes(i));return n||o?r:r.length<3&&/[A-Z]/.test(r)?r+"_default":r};return t.split(",").map(r=>r.trim()).map(e).join(",").split(" ").map(e).join(" ")};M();var Vo=(t,e)=>{let r=O();if(e||(e=r.globalTheme),!S(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(W(t))return`var(${t})`;let[n]=R(t)?t:t.split(" "),s=r.shadow[n],i=I(s);if(!s)return r.verbose&&console.warn("Can't find color ",n),t;if(e){if(s[e])return s[e].value;r.verbose&&console.warn(t," - does not have ",e)}if(i&&s.value)return s.value;if(i){let c={};for(let a in s){let l=r.media[a.slice(1)],f="@media "+(l==="print"?`${l}`:`screen and ${l}`);c[f]=s.value}return c}return r.verbose&&console.warn("Can't find color",t),t};M();var bt=t=>{let e=O(),{timing:r}=e;return r[t]||r[bo(t)]||t},ht=(t,e="timing")=>{let r=O(),{timing:n}=r;return It(t,e,n)};M();var mc=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial"]),bc=new Set(["to","top","bottom","left","right","center","at","circle","ellipse","closest-side","farthest-side","closest-corner","farthest-corner"]),xc=t=>mc.has(t),wt=t=>{let e=t+"";if(Pt.test(e))return e;let r=e.trim();return r==="none"||r==="0"||r==="initial"||r==="inherit"||r==="unset"?e:e.split(/\s+/).map(o=>{if(o=o.trim(),!o)return"";if(W(o))return`var(${o})`;if(xc(o)||/^\d/.test(o)||o==="0")return o;let s=dt(o);if(Bt(s))return s;let i=H(o,"border");return i&&i.border?i.border:o}).join(" ")},Bo=t=>Pt.test(t)?t:t.split(/\s+/).map(e=>{if(e=e.trim(),!e)return"";if(W(e))return`var(${e})`;if(/^\d/.test(e)||e.includes("px")||e==="0")return e;let r=dt(e);return Bt(r)?r:e}).join(" "),Uo=(t,e)=>Vo(t,e),Er=(t,e)=>Pt.test(t)?t:Re(t).map(r=>(r=r.trim(),r?r.split(/\s+/).map(n=>{if(n=n.trim(),!n)return"";if(W(n))return`var(${n})`;if(n==="inset"||n==="none")return n;let o=dt(n);if(Bt(o)){let i=nt(n,e);return I(i)?Object.values(i).filter(c=>c.includes(": "+e))[0]:i}if(/^\d/.test(n)||n==="0"||n.includes("px")||n.slice(-2)==="em")return n;let s=H(n,"shadow");return s&&s.shadow?s.shadow:n}).join(" "):"")).join(", "),Or=(t,e)=>{let r=t.indexOf("(");if(r===-1)return t;let n=t.slice(0,r+1),o=t.slice(r+1,t.lastIndexOf(")")),s=")",c=Re(o).map(a=>(a=a.trim(),a.split(/\s+/).map(f=>{if(!f||/^\d/.test(f)||f==="0"||bc.has(f)||f==="transparent"||Pt.test(f))return f;let u=dt(f);return Bt(u)?u:f}).join(" ")));return n+c.join(", ")+s},Go=(t,e)=>{let r=O();return t.split(", ").map(n=>W(n)?`var(${n})`:n.includes("url")?n:n.includes("gradient")?Or(n,e):r.gradient[t]?{backgroundImage:nt(t,e||r.globalTheme)}:n.includes("/")||n.startsWith("http")||n.includes(".")&&!ce(n)?`url(${n})`:n).join(" ")},Wo=t=>S(t)&&t.split(" ").map(e=>H(e,"gap").gap).join(" "),_c=t=>{let e=t.split(" ");return e.length?e.map(r=>W(r)?`var(${r})`:r.length<3||r.includes("ms")?ht(r).timing||r:bt(r)?bt(r):r).join(" "):t},Tr=(t,e,r)=>{if(S(t))return t.split(",").map(n=>ht(n).timing||n).join(",")},zo=t=>{let e=t.split(",");if(e.length)return e.map(_c).join(",")};function V(t,e,r={},n={}){let o=Mt.call(this,e||r[t]);if(o==null)return;let s;if(S(o)){if(o.includes("(")){let a=Ut(o);s=a[0],o=a[1]}let i=r.scaleBoxSize,c=No(t);!i&&c&&!n.ratio&&(o=Lo(o))}return n.ratio?Gt(r,t,o,s):H(o,t,void 0,s)}var A=(t,e=null,r)=>V(t,e,r,{ratio:!0}),$r=(t,e,r)=>{if(S(t))return{borderRadius:t.split(" ").map((n,o)=>Gt(e,r,n)[r]).join(" ")}};var Pr=new WeakMap,Sc={passive:!0},wc={passive:!0,capture:!0},Rr=(t,e)=>Zr.has(t)?e?wc:Sc:e||!1;function Ko(t){let e=Pr.get(t);return e||(e={handlers:new Map,installed:new Set},Pr.set(t,e)),e}function Cc(t,e){let r=Ko(e);if(r.installed.has(t))return;r.installed.add(t);let n=t==="focus"||t==="blur"||t==="focusin"||t==="focusout"||t==="mouseenter"||t==="mouseleave",o=t==="mouseenter"||t==="mouseleave";e.addEventListener(t,s=>{let i=s.target;for(;i&&i!==e;){let c=r.handlers.get(t);if(c){let a=c.get(i);if(a){if(o&&s.relatedTarget&&i.contains(s.relatedTarget)){i=i.parentNode;continue}if(a(s),s.cancelBubble)return}}i=i.parentNode}},Rr(t,n))}function qo(t,e,r,n){n||(n=e.ownerDocument?.documentElement||e.getRootNode());let o=Ko(n);Cc(t,n),o.handlers.has(t)||o.handlers.set(t,new WeakMap),o.handlers.get(t).set(e,r)}function Qo(t,e,r){r||(r=e.ownerDocument?.documentElement||e.getRootNode());let n=Pr.get(r);if(!n)return;let o=n.handlers.get(t);o&&o.delete(e)}function Ho(t){return sr.has(t)&&!qt.has(t)}function ue(t,e,r){let{node:n,context:o}=e;if(!n)return;let s=o?.designSystem,i=a=>{s&&Q(s);try{let l=r.call(e,a,e,e.state,o);if(l&&typeof l.then=="function"){l.catch(f=>{e.error=f,console.error("[DOMQL] Async event error:",f)}).finally(()=>{s&&z()});return}}catch(l){if(e.error=l,console.error("[DOMQL] Event error:",l),o?.strictMode)throw l}s&&z()},c=or.has(t);if(!c&&Ho(t)){let a=o?.rootNode||n.ownerDocument?.documentElement;qo(t,n,i,a)}else n.addEventListener(t,i,Rr(t,!1));e.__ref.__eventCleanup||(e.__ref.__eventCleanup=[]),e.__ref.__eventCleanup.push(()=>{if(!c&&Ho(t)){let a=o?.rootNode||n.ownerDocument?.documentElement;Qo(t,n,a)}else n.removeEventListener(t,i,Rr(t,!1))})}function Jo(t){let e=[];return t.extends&&(Array.isArray(t.extends)?e.push(...t.extends):e.push(t.extends)),t.extend&&(Array.isArray(t.extend)?e.push(...t.extend):e.push(t.extend)),e}function pe(t,e,r){let n=Jo(e);if(!n.length)return;let s=(t.context||r?.context||{}).components||{};for(let i=0;i<n.length;i++){let c=Xo(n[i],s);c&&c!==e&&Yo(t,c,r,new Set([e]))}}function Xo(t,e){if(typeof t=="string"){if(t.includes(">")){let r=t.split(">").map(o=>o.trim()),n=e[r[0]]||e[`smbls.${r[0]}`];for(let o=1;o<r.length&&n;o++)n=n[r[o]];return n||null}return e[t]||e[`smbls.${t}`]||null}return typeof t=="object"&&t!==null?t:null}function Yo(t,e,r,n=new Set){if(n.has(e))return;n.add(e);let o=Jo(e);if(o.length){let i=(t.context||r?.context||{}).components||{};for(let c=0;c<o.length;c++){let a=Xo(o[c],i);a&&Yo(t,a,r,n)}}for(let s in e){if(s==="extends"||s==="extend")continue;let i=e[s];t[s]===void 0?i&&typeof i=="object"&&!Array.isArray(i)&&typeof i!="function"?t[s]={...i}:t[s]=i:typeof t[s]=="object"&&typeof i=="object"&&!Array.isArray(t[s])&&!Array.isArray(i)&&t[s]!==null&&i!==null?t[s]=Zo(t[s],i):t[s]=i}}function Zo(t,e){let r={...t};for(let n in e){let o=r[n],s=e[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=Zo(o,s):r[n]=s}return r}ke();function Ir(t={},e={}){let r=this,n=r.__ref;if(n){if((typeof t=="string"||typeof t=="number")&&(t={text:t}),!e.preventListeners&&typeof r.onBeforeUpdate=="function"&&r.onBeforeUpdate(r,r.state,r.context,e)===!1)return r;if(mt(()=>{if(t.state&&G(r.state)&&r.state.update(t.state),t.text!==void 0&&(r.text=t.text,!n.__exec.text&&r.node&&(r.tag==="string"?r.node.nodeValue=t.text??"":r.node.textContent=t.text??"")),t.html!==void 0&&(r.html=t.html,!n.__exec.html&&r.node&&(r.node.innerHTML=t.html)),t.style&&r.node?.style){if(!n.__exec.style)for(let o in t.style){let s=t.style[o];if(s==null)continue;let i=o.replace(/[A-Z]/g,a=>"-"+a.toLowerCase()),c=String(s).replace(/\s*!important\s*$/,"");r.node.style.setProperty(i,c,"important")}r.style||(r.style={}),Object.assign(r.style,t.style)}if(t.attr&&r.node?.setAttribute){for(let o in t.attr){let s=t.attr[o];s==null||s===!1?r.node.removeAttribute(o):typeof s!="function"&&typeof s!="object"&&r.node.setAttribute(o,s===!0?"":s)}r.attr||(r.attr={}),Object.assign(r.attr,t.attr)}if(t.data&&r.node?.dataset){for(let o in t.data)r.node.dataset[o]=t.data[o];r.data||(r.data={}),Object.assign(r.data,t.data)}for(let o in t){if(J.has(o)||o==="state")continue;let s=t[o],i=r[o];if(i&&i.__ref&&typeof i.update=="function")i.update(s,e);else if(typeof s=="object"&&s!==null){let c=o.charCodeAt(0);c>=65&&c<=90&&ot(s,r,o,e)}else o!=="text"&&o!=="html"&&o!=="style"&&o!=="attr"&&o!=="data"&&(r[o]=s)}}),r.node&&n.__conditionalRunners)for(let o of n.__conditionalRunners)o();return Nt("update",r),!e.preventListeners&&typeof r.onUpdate=="function"&&r.onUpdate(r,r.state,r.context,e),r}}function Dr(t){if(!t)return;let e=t.__ref;if(e){try{typeof t.onBeforeRemove=="function"&&t.onBeforeRemove(t,t.state,t.context)}catch(r){console.error("[smbls] onBeforeRemove error:",r)}if(e.__effects){for(let r=0;r<e.__effects.length;r++)e.__effects[r].dispose();e.__effects.length=0}if(e.__eventCleanup){for(let r=0;r<e.__eventCleanup.length;r++)e.__eventCleanup[r]();e.__eventCleanup.length=0}if(e.__children){for(let r=0;r<e.__children.length;r++){let n=e.__children[r],o=t[n];o&&o.__ref&&Dr(o)}e.__children.length=0}if(t.node?.parentNode&&t.node.remove(),t.state?.destroy&&t.state.__element===t&&t.state.destroy(),t.parent?.__ref?.__children){let r=t.parent.__ref.__children.indexOf(t.key);r!==-1&&t.parent.__ref.__children.splice(r,1),delete t.parent[t.key]}try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(r){console.error("[smbls] onRemove error:",r)}t.node=null,t.parent=null,t.__ref=null}}function jr(){Dr(this)}M();var de=new Map,vc=null,ts=null;function os(){try{let t=O();if(t?.document)return t.document}catch{}return typeof document<"u"?document:null}var kc={display:"d",position:"pos",padding:"p",paddingTop:"pt",paddingRight:"pr",paddingBottom:"pb",paddingLeft:"pl",margin:"m",marginTop:"mt",marginRight:"mr",marginBottom:"mb",marginLeft:"ml",width:"w",height:"h",minWidth:"mnw",minHeight:"mnh",maxWidth:"mxw",maxHeight:"mxh",top:"t",right:"r",bottom:"b",left:"l",flex:"fx",flexDirection:"fxd",flexWrap:"fxw",flexGrow:"fxg",flexShrink:"fxs",flexBasis:"fxb",justifyContent:"jc",alignItems:"ai",alignSelf:"as",alignContent:"ac",gap:"g",rowGap:"rg",columnGap:"cg",gridTemplateColumns:"gtc",gridTemplateRows:"gtr",gridColumn:"gc",gridRow:"gr",overflow:"of",overflowX:"ofx",overflowY:"ofy",fontSize:"fs",fontWeight:"fw",fontFamily:"ff",fontStyle:"fst",lineHeight:"lh",letterSpacing:"ls",textAlign:"ta",textDecoration:"td",textTransform:"tt",color:"c",background:"bg",backgroundColor:"bgc",backgroundImage:"bgi",border:"bd",borderRadius:"br",borderColor:"bdc",borderWidth:"bdw",borderStyle:"bds",boxShadow:"bxsh",opacity:"op",zIndex:"z",cursor:"cur",transition:"tr",transform:"tf",animation:"an",visibility:"vis",whiteSpace:"ws",wordBreak:"wb",objectFit:"obj",pointerEvents:"pe",userSelect:"us",boxSizing:"bxz",outline:"ol",listStyle:"lis",textOverflow:"txo",verticalAlign:"va",float:"fl",clear:"cl",content:"cnt",backdropFilter:"bdf",filter:"flt",resize:"rsz",appearance:"apr",fill:"fil",stroke:"stk"};function Ne(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function Le(t){let e=2166136261;for(let r=0;r<t.length;r++)e^=t.charCodeAt(r),e=e*16777619>>>0;return e.toString(36)}function Ac(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():Le(e)}function es(t,e,r){let n=(r?r+"":"")+t+":"+e,o=de.get(n),s=o?null:Ne(t);if(!o){let c=kc[t]||Le(t),a=Ac(e);o=r?`_${r}_${c}-${a}`:`_${c}-${a}`,de.set(n,o)}if(typeof e=="string"&&(e.indexOf("}")!==-1||e.indexOf("{")!==-1))return o;let i=`.${o}{${s||Ne(t)}:${e}}`;return Ct(i),o}var rs=new WeakMap;function Ct(t,e){let r=Ec(e);if(!r)return;let n=rs.get(r);if(n||(n=new Set,rs.set(r,n)),!n.has(t)){n.add(t);try{r.insertRule(t,r.cssRules.length)}catch{}}}var ns=new WeakMap;function Ec(t){let e=t||os();if(!e||!e.head)return null;let r=ns.get(e);if(r&&r.ownerNode&&r.ownerNode.parentNode===e.head)return r;let n=e.head.querySelector("style[data-smbls]");n||(n=e.createElement("style"),n.setAttribute("data-smbls",""),e.head.appendChild(n));let o=n.sheet;return ns.set(e,o),vc=o,o}var Oc=8;function Mr(t,e,r){if(!t||typeof t!="object")return"";let n=null,o=0,s=[],i=[];for(let a in t){let l=t[a];l==null||l===!1||l===""||(typeof l=="object"?i.push([a,l]):ts?(n||(n=[]),n.push(a,String(l)),o++):s.push(es(a,String(l),r)))}if(n&&o>=Oc){let a=n.join("\0"),l=ts(a),f=l.indexOf("\0"),u=l.substring(0,f),p=l.substring(f+1);if(p){let h=p.split(`
11
- `);for(let d=0;d<h.length;d++)h[d]&&Ct(h[d])}s.push(u)}else if(n)for(let a=0;a<n.length;a+=2)s.push(es(n[a],n[a+1],r));let c=[];for(let a=0;a<i.length;a++)c.push(Tc(i[a][0],i[a][1],r));return s.concat(c).join(" ").trim()}var Fr=new Map;function Tc(t,e,r){let n=(r?r+"":"")+t+JSON.stringify(e),o=de.get(n);if(o){let p=Fr.get(o);if(p)for(let h=0;h<p.length;h++)Ct(p[h]);return o}o=r?`_${r}_c${Le(n)}`:`_c${Le(n)}`;let s="",i=[],c=p=>typeof p=="string"&&(p.indexOf("{")!==-1||p.indexOf("}")!==-1),a=(p,h)=>{let d="";for(let g in h){let b=h[g];if(b!=null)if(typeof b=="object")a([...p,g],b);else{if(c(b))continue;d+=`${Ne(g)}:${b};`}}d&&(p.length===0?s+=d:i.push({chain:p,body:d}))};a([],e);let l=p=>{if(!p.length)return`.${o}`;let h=p[0].split(",").map(d=>d.trim()).map(d=>d.includes("&")?d.replace(/&/g,`.${o}`):d.startsWith(":")?`.${o}${d}`:`.${o} ${d}`);for(let d=1;d<p.length;d++){let g=p[d].split(",").map(m=>m.trim()),b=[];for(let m of h)for(let y of g)y.includes("&")?b.push(y.replace(/&/g,m)):y.startsWith(":")?b.push(m+y):b.push(m+" "+y);h=b}return h.join(", ")},f=[];if(t.startsWith("@media")||t.startsWith("@supports")){if(s){let p=`${t}{.${o}{${s}}}`;f.push(p),Ct(p)}for(let p of i){let h=l(p.chain),d=`${t}{${h}{${p.body}}}`;f.push(d),Ct(d)}return Fr.set(o,f),de.set(n,o),o}let u=l([t]);if(s){let p=`${u}{${s}}`;f.push(p),Ct(p)}for(let p of i){let d=`${l([t,...p.chain])}{${p.body}}`;f.push(d),Ct(d)}return Fr.set(o,f),de.set(n,o),o}function Ve(t,e){let r="";for(let n in e){let o="";for(let s in e[n])o+=`${Ne(s)}:${e[n][s]};`;r+=`${n}{${o}}`}return Ct(`@keyframes ${t}{${r}}`),t}var $c=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],Pc=["none","forwards","backwards","both"],Rc=["normal","reverse","alternate","alternate-reverse"],Ic=["running","paused"],Dc=t=>/^[\d.]+m?s$/.test(t),jc=0,ss=new Map,Nr=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{};if(I(t)){let o=JSON.stringify(t),s=ss.get(o);if(s)return s;let i=`smbls-anim-${jc++}`,c=Ve(i,t);return ss.set(o,c),c}let n=r&&r[t];return I(n)?Ve(t,n):t},Fc=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{},n=t.split(/\s+/),o=null,s=[],i=null,c=null,a=null,l=null,f=null;for(let u of n)r&&r[u]?o=u:Dc(u)?s.push(u):$c.includes(u)||u.startsWith("cubic-bezier")||u.startsWith("steps(")?i=u:u==="infinite"||/^\d+$/.test(u)?c=u==="infinite"?u:Number(u):Rc.includes(u)?a=u:Pc.includes(u)?l=u:Ic.includes(u)?f=u:o||(o=u);return{name:o,durations:s,timingFunction:i,iterationCount:c,direction:a,fillMode:l,playState:f}},is={animation:(t,e)=>{if(S(t)&&t.includes(" ")){let r=Fc(t,e);return{animationName:Nr(r.name||t,e),animationDuration:r.durations[0]||ht(e.animationDuration||"A").timing,animationDelay:r.durations[1]||ht(e.animationDelay||"0s").timing,animationTimingFunction:r.timingFunction||bt(e.animationTimingFunction||"ease"),animationFillMode:r.fillMode||e.animationFillMode||"both",animationIterationCount:r.iterationCount!=null?r.iterationCount:e.animationIterationCount||1,animationPlayState:r.playState||e.animationPlayState,animationDirection:r.direction||e.animationDirection}}return{animationName:Nr(t,e),animationDuration:ht(e.animationDuration||"A").timing,animationDelay:ht(e.animationDelay||"0s").timing,animationTimingFunction:bt(e.animationTimingFunction||"ease"),animationFillMode:e.animationFillMode||"both",animationIterationCount:e.animationIterationCount||1,animationPlayState:e.animationPlayState,animationDirection:e.animationDirection}},animationName:(t,e)=>({animationName:Nr(t,e)}),animationDuration:t=>({animationDuration:ht(t).timing}),animationDelay:t=>({animationDelay:ht(t).timing}),animationTimingFunction:t=>({animationTimingFunction:bt(t)}),animationIterationCount:t=>({animationIterationCount:t}),animationFillMode:t=>({animationFillMode:t}),animationPlayState:t=>({animationPlayState:t}),animationDirection:t=>({animationDirection:t})};M();var cs={show:t=>t?void 0:{display:"none !important"},hide:t=>t?{display:"none !important"}:void 0,height:(t,e)=>A("height",t,e),width:(t,e)=>A("width",t,e),boxSizing:t=>tn(t)?{boxSizing:"border-box"}:{boxSizing:t},boxSize:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...V("height",e),...V("width",r||e)}},inlineSize:(t,e)=>A("inlineSize",t,e),blockSize:(t,e)=>A("blockSize",t,e),minWidth:(t,e)=>A("minWidth",t,e),maxWidth:(t,e)=>A("maxWidth",t,e),widthRange:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...V("minWidth",e),...V("maxWidth",r||e)}},minHeight:(t,e)=>A("minHeight",t,e),maxHeight:(t,e)=>A("maxHeight",t,e),heightRange:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...V("minHeight",e),...V("maxHeight",r||e)}},size:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...A("inlineSize",e),...A("blockSize",r||e)}},minBlockSize:(t,e)=>A("minBlockSize",t,e),minInlineSize:(t,e)=>A("minInlineSize",t,e),maxBlockSize:(t,e)=>A("maxBlockSize",t,e),maxInlineSize:(t,e)=>A("maxInlineSize",t,e),minSize:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...V("minInlineSize",e),...V("minBlockSize",r||e)}},maxSize:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...V("maxInlineSize",e),...V("maxBlockSize",r||e)}},borderWidth:(t,e)=>A("borderWidth",t,e),padding:(t,e)=>A("padding",t,e),scrollPadding:(t,e)=>A("scrollPadding",t,e),paddingInline:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...V("paddingInlineStart",e),...V("paddingInlineEnd",r||e)}},paddingBlock:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...V("paddingBlockStart",e),...V("paddingBlockEnd",r||e)}},paddingTop:(t,e)=>A("paddingBlockStart",t,e),paddingBottom:(t,e)=>A("paddingBlockEnd",t,e),paddingLeft:(t,e)=>A("paddingInlineStart",t,e),paddingRight:(t,e)=>A("paddingInlineEnd",t,e),paddingBlockStart:(t,e)=>A("paddingBlockStart",t,e),paddingBlockEnd:(t,e)=>A("paddingBlockEnd",t,e),paddingInlineStart:(t,e)=>A("paddingInlineStart",t,e),paddingInlineEnd:(t,e)=>A("paddingInlineEnd",t,e),margin:(t,e)=>A("margin",t,e),marginInline:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...V("marginInlineStart",e),...V("marginInlineEnd",r||e)}},marginBlock:(t,e)=>{if(!S(e.marginBlock))return;let[r,n]=e.marginBlock.split(" ");return{...V("marginBlockStart",r),...V("marginBlockEnd",n||r)}},marginTop:(t,e)=>A("marginBlockStart",t,e),marginBottom:(t,e)=>A("marginBlockEnd",t,e),marginLeft:(t,e)=>A("marginInlineStart",t,e),marginRight:(t,e)=>A("marginInlineEnd",t,e),marginInlineStart:(t,e)=>A("marginInlineStart",t,e),marginInlineEnd:(t,e)=>A("marginInlineEnd",t,e),marginBlockStart:(t,e)=>A("marginBlockStart",t,e),marginBlockEnd:(t,e)=>A("marginBlockEnd",t,e),gap:t=>({gap:Wo(t)}),columnGap:(t,e)=>Gt(e,"columnGap",t),rowGap:(t,e)=>Gt(e,"rowGap",t),flexWrap:t=>({display:"flex",flexWrap:t}),flexFlow:(t,e)=>{let r=e.reverse;if(!S(t))return;let[n,o]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(n="row"),(t.startsWith("y")||t==="column")&&(n="column"),{display:"flex",flexFlow:(n||"")+(!n.includes("-reverse")&&r?"-reverse":"")+" "+(o||"")}},flexAlign:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{display:"flex",alignItems:e,justifyContent:r}},round:(t,e)=>$r(t??e.borderRadius,e,"round"),borderRadius:(t,e)=>$r(t??e.round,e,"borderRadius")};var as={fontSize:t=>Mo(t)||t,fontFamily:t=>({fontFamily:jo(t)||t}),fontWeight:t=>({fontWeight:t,fontVariationSettings:'"wght" '+t})};var fs={overflow:t=>({overflow:t,scrollBehavior:"smooth"}),cursor:(t,e,r,n)=>{if(!t)return;let o=n.assets&&n.assets[t];if(o&&o.content)t=`url(${o.content.src})`;else{let s=n.files&&n.files[t];s&&s.content&&(t=`url(${s.content.src})`)}return{cursor:t}},opacity:t=>t!=null?{opacity:String(t)}:void 0,visibility:t=>t!=null?{visibility:t}:void 0,pointerEvents:t=>t!=null?{pointerEvents:t}:void 0};var ls={inset:(t,e)=>{if(e.call("isNumber",t))return{inset:t};if(e.call("isString",t))return{inset:t.split(" ").map(r=>H(r,"k").k).join(" ")}},left:t=>H(t,"left"),top:t=>H(t,"top"),right:t=>H(t,"right"),bottom:t=>H(t,"bottom"),verticalInset:t=>{if(typeof t!="string")return;let e=t.split(" ").map(r=>H(r,"k").k);return{top:e[0],bottom:e[1]||e[0]}},horizontalInset:t=>{if(typeof t!="string")return;let e=t.split(" ").map(r=>H(r,"k").k);return{left:e[0],right:e[1]||e[0]}}};M();var lt=({context:t,state:e})=>{let r=e?.root?.globalTheme||t.designSystem?.globalTheme;return r==="auto"?null:r},us={theme:(t,e)=>{if(t)return e.themeModifier?le(t,`@${e.themeModifier}`):le(t)},color:(t,e)=>{let r=lt(e);if(t)return{color:nt(t,r)}},background:(t,e)=>{let r=lt(e);if(t)return S(t)&&t.includes("gradient")?{background:Or(t,r)}:{background:nt(t,r)}},backgroundColor:(t,e)=>{let r=lt(e);if(t)return{backgroundColor:nt(t,r)}},backgroundImage:(t,e,r,n)=>{let o=lt(e);if(!t)return;let s=n.assets&&n.assets[t];if(s&&s.content)t=s.content.src;else{let i=n.files&&n.files[t];i&&i.content&&(t=i.content.src)}return{backgroundImage:Go(t,o)}},textStroke:t=>({WebkitTextStroke:Bo(t)}),outline:t=>({outline:wt(t)}),outlineOffset:(t,e)=>A("outlineOffset",t,e),border:t=>({border:wt(t)}),borderColor:(t,e)=>{let r=lt(e);if(t)return{borderColor:nt(t,r)}},borderTopColor:(t,e)=>{let r=lt(e);if(t)return{borderTopColor:nt(t,r)}},borderBottomColor:(t,e)=>{let r=lt(e);if(t)return{borderBottomColor:nt(t,r)}},borderLeftColor:(t,e)=>{let r=lt(e);if(t)return{borderLeftColor:nt(t,r)}},borderRightColor:(t,e)=>{let r=lt(e);if(t)return{borderRightColor:nt(t,r)}},borderLeft:t=>({borderLeft:wt(t)}),borderTop:t=>({borderTop:wt(t)}),borderRight:t=>({borderRight:wt(t)}),borderBottom:t=>({borderBottom:wt(t)}),shadow:(t,e)=>{let r=lt(e);if(t)return{boxShadow:Uo(t,r)}},boxShadow:(t,e)=>{if(!S(t))return;let[r,n]=t.split("!importan"),o=lt(e),s=n?" !important":"";return{boxShadow:Er(r.trim(),o)+s}},textShadow:(t,{context:e})=>({textShadow:Er(t,e.designSystem.globalTheme)}),columnRule:t=>({columnRule:wt(t)})};var ps={transition:t=>({transition:zo(t)}),transitionDuration:t=>({transitionDuration:Tr(t)}),transitionDelay:t=>({transitionDelay:Tr(t)}),transitionTimingFunction:t=>({transitionTimingFunction:bt(t)}),transitionProperty:t=>({transitionProperty:t,willChange:t})};M();var ds={flow:(t,e)=>{let r=e.reverse;if(!S(t))return;let[n,o]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(n="row"),(t.startsWith("y")||t==="column")&&(n="column"),{display:"flex",flexFlow:(n||"")+(!n.includes("-reverse")&&r?"-reverse":"")+" "+(o||"")}},wrap:(t,e)=>({display:"flex",flexWrap:t}),align:(t,e)=>{let[r,n]=t.split(" ");return{display:"flex",alignItems:r,justifyContent:n}}};var hs={area:t=>({gridArea:t}),template:t=>({gridTemplate:t}),templateAreas:t=>({gridTemplateAreas:t}),column:t=>({gridColumn:t}),columns:t=>({gridTemplateColumns:t}),templateColumns:t=>({gridTemplateColumns:t}),autoColumns:t=>({gridAutoColumns:t}),columnStart:t=>({gridColumnStart:t}),row:t=>({gridRow:t}),rows:t=>({gridTemplateRows:t}),templateRows:t=>({gridTemplateRows:t}),autoRows:t=>({gridAutoRows:t}),rowStart:t=>({gridRowStart:t}),autoFlow:t=>({gridAutoFlow:t})};var X={...is,...cs,...as,...fs,...ls,...us,...ps,...ds,...hs};var tt=new Set(["accentColor","alignContent","alignItems","alignSelf","alignmentBaseline","all","animation","animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationTimingFunction","appearance","aspectRatio","backdropFilter","backfaceVisibility","background","backgroundAttachment","backgroundBlendMode","backgroundClip","backgroundColor","backgroundImage","backgroundOrigin","backgroundPosition","backgroundPositionX","backgroundPositionY","backgroundRepeat","backgroundRepeatX","backgroundRepeatY","backgroundSize","baselineShift","blockSize","border","borderBlock","borderBlockColor","borderBlockEnd","borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth","borderBlockStart","borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth","borderBlockStyle","borderBlockWidth","borderBottom","borderBottomColor","borderBottomLeftRadius","borderBottomRightRadius","borderBottomStyle","borderBottomWidth","borderCollapse","borderColor","borderImage","borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth","borderLeft","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRadius","borderRight","borderRightColor","borderRightStyle","borderRightWidth","borderSpacing","borderStyle","borderTop","borderTopColor","borderTopLeftRadius","borderTopRightRadius","borderTopStyle","borderTopWidth","borderWidth","bottom","boxDecorationBreak","boxShadow","boxSizing","breakAfter","breakBefore","breakInside","captionSide","caretColor","clear","clip","clipPath","color","colorAdjust","colorInterpolation","colorInterpolationFilters","colorRendering","columnCount","columnFill","columnGap","columnRule","columnRuleColor","columnRuleStyle","columnRuleWidth","columnSpan","columnWidth","columns","contain","content","counterIncrement","counterReset","cursor","direction","display","emptyCells","filter","flex","flexBasis","flexDirection","flexFlow","flexGrow","flexShrink","flexWrap","float","font","fontFamily","fontFeatureSettings","fontKerning","fontLanguageOverride","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantNumeric","fontVariantPosition","fontWeight","fontVariationSettings","fontSynthesis","forcedColorAdjust","gap","grid","gridArea","gridAutoColumns","gridAutoFlow","gridAutoRows","gridColumn","gridColumnEnd","gridColumnGap","gridColumnStart","gridGap","gridRow","gridRowEnd","gridRowGap","gridRowStart","gridTemplate","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","height","hyphens","imageOrientation","imageRendering","imeMode","inset","insetBlock","insetBlockEnd","insetBlockStart","insetInline","insetInlineEnd","insetInlineStart","initialLetter","isolation","justifyContent","justifyItems","justifySelf","left","letterSpacing","lineBreak","lineClamp","lineHeight","listStyle","listStyleImage","listStylePosition","listStyleType","margin","marginBottom","marginLeft","marginRight","marginTop","marginBlock","marginBlockEnd","marginBlockStart","marginInline","marginInlineEnd","marginInlineStart","mask","maskBorder","maskBorderImage","maskBorderOutset","maskBorderRepeat","maskBorderSlice","maskBorderSource","maskBorderWidth","maskClip","maskComposite","maskImage","maskOrigin","maskPosition","maskRepeat","maskSize","maskType","maxBlockSize","maxHeight","maxInlineSize","maxWidth","minBlockSize","minHeight","minInlineSize","minWidth","mixBlendMode","objectFit","objectPosition","objectViewBox","offset","offsetDistance","offsetPath","offsetRotate","opacity","order","orientation","outline","outlineColor","outlineOffset","outlineStyle","outlineWidth","overflow","overflowAnchor","overflowClip","overflowScrolling","overflowWrap","overflowX","overflowY","padding","paddingBottom","paddingLeft","paddingRight","paddingTop","pageBreakAfter","pageBreakBefore","pageBreakInside","paintOrder","perspective","perspectiveOrigin","placeContent","placeItems","placeSelf","pointerEvents","position","resize","right","rotate","rowGap","scrollBehavior","scrollPadding","scrollSnapAlign","scrollSnapType","scrollbarColor","scrollbarWidth","shapeImageThreshold","shapeMargin","shapeOutside","tabSize","tableLayout","textAlign","textAlignLast","textDecoration","textDecorationColor","textDecorationLine","textDecorationSkipInk","textDecorationStyle","textDecorationThickness","textIndent","textOverflow","textShadow","textTransform","textUnderlineOffset","top","transform","transformOrigin","transformStyle","transition","transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction","translate","translateX","translateY","translateZ","unicodeBidi","userSelect","verticalAlign","visibility","whiteSpace","widows","width","willChange","wordBreak","wordSpacing","wordWrap","writingMode","zIndex"]);M();function ms(t,e,r){let n=t?.context?.analyze;if(!n||!n.emit||e==="warn"&&!n.shouldCapture("warnings")||e==="error"&&!n.shouldCapture("errors"))return;let o=r.map(s=>s?.message||(typeof s=="string"?s:null)).filter(Boolean).join(" ");n.emit({id:`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,ts:Date.now(),type:e==="error"?"error":"warning",level:e,hook:e==="error"?"el.error":"el.warn",element:{key:t.key!=null?String(t.key):null,name:t.__name||null,tag:t.tag||null},message:o||null,args:r})}function Mc(...t){return ms(this,"warn",t),Jn.apply(this,t)}function Nc(...t){return ms(this,"error",t),Xn.apply(this,t)}var gs={update:Ir,remove:jr,getDB:eo,getQuery:ro,getRootData:Kn,getChildren:Gn,getPath:Wn,nextElement:Yn,previousElement:Zn,verbose:wr,warn:Mc,error:Nc,variables:to,spotByPath:Un,set(t,e){if(this.removeContent(),t!=null){let r=this.context?.__create;r&&r(t,this,"content",e)}this.__ref&&(this.__ref.contentManaged=!0)},reset(t){let e=this.context?.__create;if(!e)return this;let r=this.parent,n=this.key,o=this.parse();return this.remove(),e(o,r,n,t)},lookup(t){let e=this.parent;for(;e;){if(typeof t=="function"){if(t(e))return e}else if(typeof t=="string"){if(e.key===t)return e;if(e[t]&&e[t].__ref)return e[t]}e=e.parent}return null},lookdown(t){let e=this.__ref;if(!e?.__children)return null;for(let r of e.__children){let n=this[r];if(!n)continue;if(typeof t=="function"){if(t(n))return n}else if(typeof t=="string"&&n.key===t)return n;let o=n.lookdown?.(t);if(o)return o}return null},lookdownAll(t,e=[]){let r=this.__ref;if(!r?.__children)return e;for(let n of r.__children){let o=this[n];o&&(typeof t=="function"?t(o)&&e.push(o):typeof t=="string"&&o.key===t&&e.push(o),o.lookdownAll?.(t,e))}return e},getRef(){return this.__ref},getRoot:Hn,getRootState:zn,getRootContext:qn,getContext:Qn,parse(t){let e={},r=t?new Set(t):null,n=this.__ref?.__exec;for(let o in this)if(!(o==="parent"||o==="node"||o==="__ref")&&!r?.has(o)){if(n&&n[o]!==void 0){e[o]=n[o];continue}typeof this[o]!="function"&&(e[o]=this[o])}return e},parseDeep(t){let e=this.parse(t),r=this.__ref;if(r?.__children)for(let n of r.__children)this[n]?.parseDeep&&(e[n]=this[n].parseDeep(t));return e},keys(){return Object.keys(this)},log(...t){if(t.length){let e={};for(let r of t)e[r]=this[r];console.log(e)}else console.log(this)},setProps(t,e){return this.update(t,e)},setNodeStyles(t){if(this.node?.style)for(let e in t){let r=t[e];if(r==null)continue;let n=e.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()),o=String(r).replace(/\s*!important\s*$/,"");this.node.style.setProperty(n,o,"important")}},call(t,...e){let r=this.context,n=r?.methods?.[t]||r?.functions?.[t]||r?.utils?.[t]||this[t];if(typeof n=="function")return n.call(this,...e)},removeContent(){let t=this.__ref;if(!t?.__children)return;let e=this.content;if(e?.remove){e.remove(),delete this.content;let r=t.__children.indexOf("content");r!==-1&&t.__children.splice(r,1)}e?.node?.parentNode&&e.node.parentNode.removeChild(e.node)}},ys=new WeakMap;function Lc(t){if(!t)return gs;let e=ys.get(t);if(e)return e;e=Object.create(gs);let r=t.methods;if(r)for(let n in r)e[n]=r[n];return ys.set(t,e),e}function Lr(t){let e=Lc(t.context);Object.setPrototypeOf(t,e)}M();ke();var Vc=(t,e,r)=>{Object.defineProperty(t,e,{value:r,enumerable:!1,configurable:!0,writable:!0})},vt=(t,e)=>{if(G(e)){let o=e.__raw||e;e.toggle||Object.defineProperty(o,"toggle",{value:function(s,i={}){e[s]=!e[s]},enumerable:!1,configurable:!0}),e.set||Object.defineProperty(o,"set",{value:function(s,i={}){return e.clean({preventStateUpdate:!0}),typeof s=="object"&&s!==null&&e.update(s,i),e},enumerable:!1,configurable:!0}),Object.defineProperty(o,"setByPath",{value:function(s,i,c={}){let a=s.split("."),l=e;for(let f=0;f<a.length-1;f++)l[a[f]]===void 0&&(l[a[f]]={}),l=l[a[f]];return l[a[a.length-1]]=i,e},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"getByPath",{value:function(s){let i=s.split("."),c=e;for(let a=0;a<i.length;a++){if(c==null)return;c=c[i[a]]}return c},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"removeByPath",{value:function(s,i={}){let c=s.split("."),a=e;for(let l=0;l<c.length-1;l++){if(a==null)return e;a=a[c[l]]}return a&&delete a[c[c.length-1]],e},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"reset",{value:function(s={}){let i=e.parse();return e.set(i,s)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"apply",{value:function(s,i={}){if(typeof s=="function"){let c=s(e);return e.update(c,i)}},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"applyFunction",{value:function(s,i={}){if(typeof s=="function")return s(e),e.update(e.parse(),i)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"rootUpdate",{value:function(s,i={}){let c=e;for(;c?.parent&&G(c.parent);)c=c.parent;return c.update(s,i)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"parentUpdate",{value:function(s,i={}){if(e.parent)return e.parent.update(s,i)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"quietReplace",{value:function(s,i={}){return e.replace(s,{quiet:!0,...i})},enumerable:!1,configurable:!0,writable:!0}),Object.getOwnPropertyDescriptor(o,"root")||Object.defineProperty(o,"root",{get:function(){let s=e,i=G(s)?s:null;for(let c=0;c<64&&s?.parent&&s.parent!==s;c++)s=s.parent,G(s)&&(i=s);return i||s},enumerable:!1,configurable:!0});return}if(!e||typeof e!="object")return;let r=()=>{for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&delete e[o]},n={update(o){if(!o||typeof o!="object")return e;for(let s in o)e[s]=o[s];return e},apply(o){if(typeof o!="function")return e;let s=o(e);return s?e.update(s):e},parse(){return{...e}},toggle(o){return e[o]=!e[o],e},set(o){if(!o||typeof o!="object")return e;r();for(let s in o)e[s]=o[s];return e},replace(o){return e.set(o)},clean(){return r(),e}};for(let o in n)typeof e[o]!="function"&&Vc(e,o,n[o])};var vh=new Proxy(Object.create(null),{get(){},has(){return!1}});M();var Vr={default:["accesskey","autofocus","class","contenteditable","contextmenu","dir","draggable","hidden","id","lang","part","placeholder","slot","spellcheck","style","tabindex","title","translate","inert","radiogroup","role","about","datatype","inlist","prefix","property","resource","typeof","vocab","autocapitalize","autocorrect","autosave","color","itemprop","itemscope","itemtype","itemid","itemref","results","security","unselectable","is"],a:["accesskey","charset","coords","download","href","hreflang","name","rel","rev","shape","target","type"],aria:["aria-activedescendant","aria-atomic","aria-autocomplete","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-dropeffect","aria-errormessage","aria-expanded","aria-flowto","aria-grabbed","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"],anchor:["download","href","hreflang","media","ping","rel","target","type","referrerpolicy"],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],area:["alt","coords","download","href","hreflang","media","referrerpolicy","rel","shape","target","ping"],base:["href","target"],blockquote:["cite"],button:["disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","type","value"],canvas:["height","width"],col:["span","width"],colgroup:["span"],data:["value"],details:["open"],del:["cite","datetime"],dialog:["open"],embed:["height","src","type","width"],fieldset:["disabled","form","name"],form:["acceptcharset","action","autocomplete","enctype","method","name","novalidate","target","rel"],html:["manifest"],iframe:["allow","allowfullscreen","allowtransparency","frameborder","height","loading","marginheight","marginwidth","mozallowfullscreen","name","referrerpolicy","sandbox","scrolling","seamless","src","srcdoc","webkitallowfullscreen","width"],img:["alt","crossorigin","decoding","height","ismap","loading","referrerpolicy","sizes","src","srcset","usemap","width"],ins:["cite","datetime"],input:["accept","alt","autocomplete","capture","checked","crossorigin","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","indeterminate","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","readonly","required","size","src","step","type","value","width"],keygen:["challenge","disabled","form","keytype","keyparams","name"],label:["form","for"],li:["value"],link:["as","crossorigin","href","hreflang","integrity","media","imagesrcset","imagesizes","referrerpolicy","rel","sizes","type","charset"],map:["name"],menu:["type"],media:["autoplay","controls","currenttime","defaultmuted","defaultplaybackrate","loop","mediagroup","muted","playsinline","preload","src","volume"],meta:["charset","content","http-equiv","name","media"],meter:["form","high","low","max","min","optimum","value"],quote:["cite"],object:["classid","data","form","height","name","type","usemap","width","wmode"],ol:["reversed","start","type"],optgroup:["disabled","label"],option:["disabled","label","selected","value"],output:["form","for","name"],param:["name","value"],progress:["max","value"],slot:["name"],script:["async","charset","crossorigin","defer","integrity","nomodule","nonce","referrerpolicy","src","type"],select:["autocomplete","disabled","form","multiple","name","required","size","value","onchange"],source:["height","media","sizes","src","srcset","type","width"],style:["media","nonce","scoped","type"],table:["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"],textarea:["autocomplete","cols","dirname","disabled","form","maxlength","minlength","name","placeholder","readonly","required","rows","value","wrap"],td:["align","colspan","headers","rowspan","scope","abbr","height","width","valign"],th:["align","colspan","headers","rowspan","scope","abbr"],time:["datetime"],track:["default","kind","label","src","srclang"],video:["autoplay","controls","crossorigin","disablepictureinpicture","disableremoteplayback","height","loop","muted","playsinline","poster","preload","src","width"],svg:["className","class","color","height","id","lang","max","media","method","min","name","style","target","type","width","role","tabindex","crossorigin","accent-height","accumulate","additive","alignment-baseline","allowReorder","alphabetic","amplitude","arabic-form","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baseline-shift","baseProfile","bbox","begin","bias","by","calcMode","cap-height","clip","clip-path","clipPathUnits","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominant-baseline","dur","dx","dy","edgeMode","elevation","enable-background","end","exponent","externalResourcesRequired","fill","fill-opacity","fill-rule","filter","filterRes","filterUnits","flood-color","flood-opacity","focusable","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","format","from","fx","fy","g1","g2","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","glyphRef","gradientTransform","gradientUnits","hanging","href","horiz-adv-x","horiz-origin-x","ideographic","image-rendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letter-spacing","lighting-color","limitingConeAngle","local","marker-end","markerHeight","marker-mid","marker-start","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overline-position","overline-thickness","paint-order","panose-1","path","pathLength","patternContentUnits","patternTransform","patternUnits","pointer-events","points","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","rendering-intent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","scale","seed","shape-rendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","string","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","surfaceScale","systemLanguage","tableValues","targetX","targetY","text-anchor","text-decoration","textLength","text-rendering","to","transform","u1","u2","underline-position","underline-thickness","unicode","unicode-bidi","unicode-range","units-per-em","v-alphabetic","values","vector-effect","version","vert-adv-y","vert-origin-x","vert-origin-y","v-hanging","v-ideographic","viewBox","viewTarget","visibility","v-mathematical","widths","word-spacing","writing-mode","x1","x2","x","xChannelSelector","x-height","xlink:actuate","xlink:arcrole","xlink:href","xlink:role","xlink:show","xlink:title","xlink:type","xml:base","xml:lang","xmlns","xmlns:xlink","xml:space","y1","y2","y","yChannelSelector","z","zoomAndPan"]};var Bc=t=>t.startsWith("aria")&&t.length>4&&t.charCodeAt(4)>=65&&t.charCodeAt(4)<=90?"aria-"+t.charAt(4).toLowerCase()+t.slice(5).replace(/([A-Z])/g,e=>"-"+e.toLowerCase()):t.startsWith("data")&&t.length>4&&t.charCodeAt(4)>=65&&t.charCodeAt(4)<=90?"data-"+t.charAt(4).toLowerCase()+t.slice(5).replace(/([A-Z])/g,e=>"-"+e.toLowerCase()):null,he=(t,e)=>e.startsWith("aria-")||e.startsWith("data-")||Bc(e)||Vr.default.includes(e)?!0:Object.prototype.hasOwnProperty.call(Vr,t)?Vr[t].includes(e):!1;var Be=(t,e)=>{let r=t.call("exec",e,t);if(r)return S(r)&&r.includes("{{")&&(r=t.call("replaceLiteralsWithObjectFields",r)),r},bs=(t,e)=>{let r=(t.preSrc||"")+(Be(t,e)||"");if(!r)return;try{return new URL(r),r}catch{}let{context:n}=t;if(!n.files&&!n.assets)return r;if(r.startsWith("/assets/")){let o=r.slice(8),s=n.assets&&(n.assets[r]||n.assets[o]);return s&&s.content?s.content.src:r}if(r.startsWith("/files/")){let o=r.slice(7),s=n.files&&(n.files[r]||n.files[o]);return s&&s.content?s.content.src:r}if(n.assets){let o=n.assets[r];if(o&&o.content)return o.content.src}if(n.files){let o=n.files[r];if(o&&o.content)return o.content.src}return r},xs={src:t=>bs(t,t.src),href:t=>Be(t,t.href),action:t=>Be(t,t.action),poster:t=>bs(t,t.poster),data:t=>Be(t,t.data)},_s=t=>{let e=t.tag||"div",r={};for(let n in xs)if(t[n]!==void 0&&he(e,n)){let o=xs[n](t);o!==void 0&&(r[n]=o)}return r};var Uc=1;function zt(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function Gc(t){return t.charAt(2).toLowerCase()+t.slice(3)}function Wc(t){return t.toLowerCase()}function Wr(t,e){let r={...t};for(let n in e){let o=r[n],s=e[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=Wr(o,s):r[n]=s}return r}function ot(t,e,r,n={},o){if(t==null||t===!1)return null;(typeof t=="string"||typeof t=="number")&&(t={text:t});let s=Object.create(null);s.key=r||t.key||`_${Uc++}`,s.parent=e||null,s.context=t.context||e?.context||n.context||{},s.context.__create||(s.context.__create=ot);let i=s.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:e?.__ref?.root||s,path:e?.__ref?.path?[...e.__ref.path,s.key]:[s.key]};if(r&&!t.extends&&!t.extend){let g=r.indexOf("_");if(g>0){let b=r.substring(0,g),m=s.context?.components;m&&(m[b]||m["smbls."+b])&&(t={extends:b,...t})}}pe(s,t,n);let c=new Set(["childProps","attr","style","scope","data"]),a=s.props&&typeof s.props=="object"?s.props:null;for(let g in t){if(g==="parent"||g==="node"||g==="__ref"||g==="extends"||g==="context"||g==="props")continue;let b=t[g],m=s[g],y=m&&b&&typeof m=="object"&&typeof b=="object"&&!Array.isArray(m)&&!Array.isArray(b)&&typeof m!="function"&&typeof b!="function";y&&g.charCodeAt(0)>=65&&g.charCodeAt(0)<=90?s[g]=Wr(m,b):y&&c.has(g)?s[g]={...m,...b}:s[g]=b}function l(g){for(let b in g){let m=g[b],y=s[b],x=y&&m&&typeof y=="object"&&typeof m=="object"&&!Array.isArray(y)&&!Array.isArray(m)&&typeof y!="function"&&typeof m!="function";x&&b.charCodeAt(0)>=65&&b.charCodeAt(0)<=90?s[b]=Wr(y,m):x&&c.has(b)?s[b]={...y,...m}:s[b]=m}}a&&l(a),t.props&&typeof t.props=="object"&&l(t.props),t.data!==void 0&&(s.data=t.data),t.classlist!==void 0&&(s.classlist=t.classlist),t.text!==void 0&&(s.text=t.text),t.html!==void 0&&(s.html=t.html);let f=s.scope&&typeof s.scope=="object"?s.scope:null,u=e?.scope,p=s.context&&typeof s.context.globalScope=="object"&&s.context.globalScope||null,h=u||p||null;if(t.scope!==void 0||f){let g={};f&&Object.assign(g,f),t.scope!==void 0&&Object.assign(g,t.scope),s.scope=Ye(g,h)}else h&&(s.scope=h);if(t.if!==void 0&&(s.if=t.if),Lr(s),zc(s,e,t),s.if!=null){let g;if(typeof s.if=="function")try{g=s.if(s,s.state,s.context)}catch(b){if(g=!1,i.__ifError=b,typeof console<"u"&&console.warn){let m=s.key||s.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${m} \u2014 treating as false:`,b?.message||b)}}else g=s.if;i.__if=!!g}if(i.__if)typeof t.if=="function"&&(i.__ifInitialized=!0);else return e&&(e[s.key]=s),typeof t.if=="function"&&zr(s,{if:t.if}),s;s.tag||(s.tag=Ht(s)),kt("Init",s,n);let d=s.node=Kt(s);if(!d)return s;kt("AttachNode",s,n),d.setAttribute&&s.key&&d.setAttribute("data-key",s.key),d.setAttribute&&s.context?.scopeSelector&&s.context.scopeSelector!==":root"&&s.context.key&&s.key===s.context.key&&d.setAttribute("data-smbls-app",s.context.key),s.id&&d.setAttribute&&(d.id=s.id),ks(s,n),zr(s,t),Hr(s),Cs(s),Zc(s);try{As(s,n)}catch(g){if(typeof console<"u"&&console.error){let b=s.__ref?.path?.join(".")||s.key||"<root>";console.error(`[smbls] createChildren failed at ${b}:`,g?.message||g,g?.stack?`
10
+ FROM ${c}${l}`},_i=t=>{let e=[],r=(n,o)=>{for(let s in n){let i=o?`${o}/${s}`:s;n[s]===!0?e.push(i):r(n[s],i)}};return r(t,""),e},Si=t=>{let e=n=>{let o=[];for(let s in n)n[s]===!0?o.push(s):o.push(`${s}(${e(n[s])})`);return o.join(", ")},r=Object.keys(t);return r.length===1&&t[r[0]]!==!0?{from:r[0],select:e(t[r[0]])}:{from:null,select:e(t)}},wi={graphql:yi,"json-api":mi,odata:bi,sql:xi,supabase:Si,paths:_i}});var so=C(()=>{"use strict"});var io=C(()=>{});var co=C(()=>{"use strict"});var ao=C(()=>{"use strict"});var fo=C(()=>{"use strict"});var lo=C(()=>{"use strict"});var uo=C(()=>{"use strict"});var po=C(()=>{"use strict"});var ho=C(()=>{"use strict"});var go=C(()=>{"use strict"});var yo=C(()=>{"use strict"});var mo=C(()=>{"use strict"});var bo,xo,_o,So=C(()=>{"use strict";Qt();bo=t=>(typeof t!="string"&&(t=String(t||"")),t.replace(/(?:^\w|[A-Z]|\b\w)/g,function(e,r){return r===0?e.toLowerCase():e.toUpperCase()}).replace(/\s+/g,"")),xo=t=>t.replace(/[^a-zA-Z0-9]/g," ").trim().toLowerCase().replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),_o=t=>{if(R(t))return t;if(S(t))return t.split(" ");if(I(t))return Object.values(t);if(we(t))return[t]}});var wo=C(()=>{"use strict"});var Co=C(()=>{"use strict"});var M=C(()=>{"use strict";cn();fn();Qt();Ce();ke();fr();ar();ln();un();rn();cr();pn();dn();gn();yn();hn();mn();bn();ur();xn();oo();dr();so();_n();io();co();ao();fo();lo();uo();po();ho();go();yo();mo();So();wo();Co()});var na={};Dt(na,{FACTORY:()=>Fe,REGISTRY:()=>J,applyExtends:()=>pe,batch:()=>mt,create:()=>ot,createEffect:()=>F,createElement:()=>ea,createSignal:()=>ct,createStore:()=>et,getActiveConfig:()=>O,mount:()=>ra,popConfig:()=>z,pushConfig:()=>Q,registerEvent:()=>ue});var Et=null,ye=0,me=[],xe=()=>Et;var be=0,He=[];function ct(t){let e=new Set;function r(){return Et&&(e.add(Et),Et._sources.add(s)),t}function n(i){i!==t&&(t=i,Ms(e))}function o(){return t}let s={get:r,set:n,peek:o,_subscribers:e,_type:"signal"};return s}var At=new Set,Ke=!1;function F(t,e){let r=e?.depth??0,n={_sources:new Set,_type:"effect",_depth:r,_disposed:!1,_subscribers:new Set,_execute(){if(n._disposed)return;Xr(n);let o=Et;Et=n;try{t()}catch(s){console.error("[smbls] effect error:",s)}finally{Et=o}},_notify(){n._disposed||(ye>0?me.push(n):be>0?He.push(n):qe(n))},dispose(){n._disposed=!0,Xr(n)}};return n._execute(),n}function mt(t){ye++;try{t()}finally{ye--,ye===0&&js()}}function qe(t){At.add(t),Ke||(Ke=!0,queueMicrotask(Ds))}var jt=[];function Ds(){if(Ke=!1,At.size!==0){if(At.size===1){let[t]=At;At.clear(),t._disposed||t._execute();return}jt.length=0;for(let t of At)jt.push(t);At.clear(),jt.sort((t,e)=>t._depth-e._depth);for(let t=0;t<jt.length;t++){let e=jt[t];e._disposed||e._execute()}jt.length=0}}function js(){for(let t=0;t<me.length;t++)qe(me[t]);me.length=0}function Fs(t){be++;try{for(let e of t)e._notify()}finally{if(be--,be===0&&He.length>0){let e=He.splice(0);for(let r=0;r<e.length;r++)qe(e[r])}}}function Ms(t){Fs(t)}function Xr(t){for(let e of t._sources)e._subscribers.delete(t);t._sources.clear()}var Ot=Symbol("store"),Xe=Symbol("signals"),Qe=t=>!t||typeof t!="object"||Array.isArray(t)||t[Ot]||Object.isFrozen(t)||typeof Node<"u"&&t instanceof Node||t.__ref||t.nodeType||t.nodeName;function et(t,e,r){r===void 0&&(r=0);let n={},o={},s=e&&e.maxDepth||8;if(t&&typeof t=="object")for(let m in t){if(m==="__proto__"||!Object.prototype.hasOwnProperty.call(t,m))continue;let y=t[m];r<s&&y&&typeof y=="object"&&!Qe(y)?(o[m]=y,n[m]=ct(et(y,e,r+1))):(o[m]=y,n[m]=ct(y))}let i=new Proxy(o,{get(m,y){if(y===Ot)return!0;if(y===Xe)return n;if(y==="__raw")return m;if(y==="update")return c;if(y==="parse")return l;if(y==="clean")return f;if(y==="keys")return u;if(y==="values")return p;if(y==="replace")return h;if(y==="add")return d;if(y==="remove")return g;if(y==="destroy")return b;if(y==="quietUpdate")return a;if(y==="__element")return m.__element;if(y==="parent")return m.parent;if(y==="root")return m.root;if(Object.prototype.hasOwnProperty.call(n,y))return n[y].get();if(m[y]!==void 0)return m[y];if(y!=="root"&&m.root&&m.root!==i)return m.root[y];if(typeof y=="string"&&!y.startsWith("__")&&y!=="then"&&y!=="constructor"&&xe()!=null)return n[y]=ct(void 0),n[y].get()},set(m,y,x){return y==="__proto__"?!1:y==="__element"||y==="parent"||y==="root"?(m[y]=x,!0):(Object.prototype.hasOwnProperty.call(n,y)?(m[y]=x,x&&typeof x=="object"&&!Qe(x)?n[y].set(et(x,e,r+1)):n[y].set(x)):(m[y]=x,x&&typeof x=="object"&&!Qe(x)?n[y]=ct(et(x,e,r+1)):n[y]=ct(x)),!0)},has(m,y){return y in n||y in m},ownKeys(m){return Object.keys(n)},getOwnPropertyDescriptor(m,y){return y in n?{enumerable:!0,configurable:!0,value:n[y].peek()}:Object.getOwnPropertyDescriptor(m,y)},deleteProperty(m,y){return n[y]&&(n[y].set(void 0),delete n[y]),delete m[y],!0}});function c(m,y){mt(()=>{for(let _ in m)_!=="__proto__"&&(i[_]=m[_])});let x=o.__element;return x&&x.onUpdate&&!y?.quiet&&x.onUpdate(x,i,x.context),i}function a(m){return c(m,{quiet:!0})}function l(m){if(m||(m=new Set),m.has(i))return"[Circular]";m.add(i);let y={};for(let x in n){if(x==="parent"||x==="root"||x.startsWith("__"))continue;let _=n[x].peek();_&&_[Ot]?y[x]=_.parse(m):y[x]=_}return y}function f(){return mt(()=>{for(let m in n)delete i[m]}),i}function u(){return Object.keys(n)}function p(){return Object.keys(n).map(m=>n[m].peek())}function h(m){return mt(()=>{for(let y in n)y in m||delete i[y];for(let y in m)y!=="__proto__"&&(i[y]=m[y])}),i}function d(m,y){return i[m]=y,i}function g(m){return delete i[m],i}function b(){f(),o.__element=null,o.parent=null}return i}function G(t){return t&&t[Ot]===!0}function Ye(t,e){let r={},n={};if(t&&typeof t=="object")for(let i in t)n[i]=t[i],r[i]=ct(t[i]);let o=i=>{if(Object.prototype.hasOwnProperty.call(r,i))return r;let c=e;for(;c;){let a=c[Xe];if(a&&Object.prototype.hasOwnProperty.call(a,i))return a;c=c[Ot]?c[Je]:null}return null};return new Proxy(n,{get(i,c){return c===Ot?!0:c===Xe?r:c===Je?e:c==="__raw"?i:Object.prototype.hasOwnProperty.call(r,c)?r[c].get():e&&c!=="then"&&c!=="constructor"?e[c]:i[c]},set(i,c,a){let l=o(c);return l?(l===r&&(i[c]=a),l[c].set(a),!0):(i[c]=a,r[c]=ct(a),!0)},has(i,c){if(c in r||c in i)return!0;let a=e;for(;a;){if(c in a)return!0;a=a[Ot]?a[Je]:null}return!1},ownKeys(){return Object.keys(r)},getOwnPropertyDescriptor(i,c){return c in r?{enumerable:!0,configurable:!0,value:r[c].peek()}:Object.getOwnPropertyDescriptor(i,c)}})}var Je=Symbol("scope.parent");var Ze="http://www.w3.org/2000/svg",rr=new Set(["svg","path","circle","ellipse","line","polyline","polygon","rect","g","defs","use","symbol","clipPath","mask","pattern","image","text","tspan","textPath","marker","linearGradient","radialGradient","stop","filter","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","animate","animateMotion","animateTransform","set","foreignObject","desc","title","metadata"]),Ns=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","menu","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","search","section","select","slot","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","string","fragment","shadow"]);function tr(t){return Ns.has(t)||rr.has(t)}function nr(t){return rr.has(t)}function Ht(t){let{tag:e,key:r}=t;if(typeof e=="function"&&(e=e(t)),e===!0&&(e=r),typeof e=="string"&&tr(e))return e;if(!r||typeof r!="string")return"div";let n=new Set(["html","head","body","meta","link","script","style","title","base","noscript","template"]),o=r.toLowerCase();return o.includes(".")&&(o=o.split(".")[0]),o.includes("_")&&(o=o.split("_")[0]),tr(o)&&!n.has(o)?o:"div"}var Yr={};function er(t,e){let r=e?.context?.document||globalThis.document;if(!r)return null;if(t==="string")return r.createTextNode(e?.text||"");if(t==="fragment")return r.createDocumentFragment();if(nr(t)){let n=e?.parent;if(t==="svg"||n?.node?.namespaceURI===Ze)return r.createElementNS(Ze,t);if(t!=="svg")return r.createElement("div")}return r.createElement(t)}function Kt(t){let e=t.tag=Ht(t),n=nr(e)&&(e==="svg"||t.parent?.node?.namespaceURI===Ze)?"svg:"+e:e,o=t?.context?.document||globalThis.document,s=Yr[n];if(s||(s=Yr[n]=er(e,t)),!s)return null;let i=o&&s.ownerDocument!==o?er(e,t):s.cloneNode(!0);return e==="string"&&(i.nodeValue=t.text||""),i}var J=new Set(["extends","children","content","childrenAs","childExtends","childExtendsRecursive","childProps","inheritParentProps","state","if","define","deps","tag","attr","style","text","html","value","data","classlist","class","scope","root","context","$router","routes","fetch","variables","query","key","component","preventContentUpdate","preventContentRecreate","subscribeTo","autoGrow","__name","__ref","__hash","__text","parent","node"]);var qt=new Set(["start","init","complete","attachNode","stateInit","stateCreated","beforeUpdate","update","afterUpdate","beforeClassAssign","lazyLoad","render","renderRouter","done","create","frame","startUpdate","stateUpdate","beforeStateUpdate","initInspect","initSync","beforeRemove","remove"]),or=new Set(["load","error","abort","canplay","canplaythrough","ended","pause","play","playing","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting","durationchange","loadeddata","loadedmetadata","progress","emptied","resize"]),Zr=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),sr=new Set(["click","dblclick","mousedown","mouseup","mousemove","mouseenter","mouseleave","mouseover","mouseout","pointerdown","pointerup","pointermove","pointerenter","pointerleave","pointerover","pointerout","touchstart","touchend","touchmove","keydown","keyup","keypress","input","change","submit","reset","focus","blur","focusin","focusout","scroll","wheel","contextmenu","drag","dragstart","dragend","dragenter","dragleave","dragover","drop"]);var ir=t=>t==="em"||t==="rem"||t==="vw"||t==="vh"||t==="vmax"||t==="vmin",_e=["px","cm","mm","in","pt","pc","em","rem","ex","cap","ch","ic","lh","rlh","%","vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh","cqw","cqh","cqi","cqb","cqmin","cqmax","deg","rad","grad","turn","s","ms","dpi","dpcm","dppx","fr","auto"];M();var vo=t=>{if(t==="")return[0,0,0,0];if(t.toLowerCase()==="transparent")return[0,0,0,0];if(t[0]==="#")return t.length<7&&(t="#"+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+(t.length>4?t[4]+t[4]:"")),[parseInt(t.substr(1,2),16),parseInt(t.substr(3,2),16),parseInt(t.substr(5,2),16),t.length>7?parseInt(t.substr(7,2),16)/255:1];if(t.indexOf("rgb")===-1&&Tt&&at){let e=Tt.body.appendChild(Tt.createElement("fictum")),r="rgb(1, 2, 3)";if(e.style.color=r,e.style.color!==r){Tt.body.removeChild(e);return}if(e.style.color=t,e.style.color===r||e.style.color==="")return Tt.body.removeChild(e),[0,0,0,0];t=at.getComputedStyle(e).color,Tt.body.removeChild(e)}return t.indexOf("rgb")===0?(t.indexOf("rgba")===-1&&(t=`${t}, 1`),t.match(/[\.\d]+/g).map(e=>+e)):[0,0,0,0]};var Ci=(t,e=1)=>{let[r,n,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return[r,n,o]};var vi=([t,e,r])=>((1<<24)+(t<<16)+(e<<8)+r).toString(16).slice(1);var ki=(t,e,r)=>{let n=Math.max(t,e,r),o=n-Math.min(t,e,r),s=1-Math.abs(n+n-o-1),i=o&&(n==t?(e-r)/o:n==e?2+(r-t)/o:4+(t-e)/o);return[60*(i<0?i+6:i),s?o/s:0,(n+n-o)/2]},Ai=(t,e,r,n=e*Math.min(r,1-r),o=(s,i=(s+t/30)%12)=>r-n*Math.max(Math.min(i-3,9-i,1),-1))=>[o(0),o(8),o(4)],Ei=(t,e)=>{let r=parseInt(t,16),n=(r>>16)+e;n>255?n=255:n<0&&(n=0);let o=(r>>8&255)+e;o>255?o=255:o<0&&(o=0);let s=(r&255)+e;return s>255?s=255:s<0&&(s=0),((s|o<<8|n<<16)+16777216).toString(16).slice(1)};var W=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,Pt=/(?:rgba?\(|hsla?\(|#[0-9a-fA-F]{3,8}\b)/,Oi=/^([a-zA-Z]\w*(?:-[a-zA-Z]\w*)*)(?:\.(\d+))?(?:([+-]\d+|=\d+))?$/,ce=t=>{if(!S(t))return null;if(Pt.test(t))return{passthrough:t};if(W(t))return{cssVar:t};let e=t.match(Oi);if(!e)return null;let[,r,n,o]=e,s=n!==void 0?`0.${n}`:void 0,i=o&&o[0]==="="?o.slice(1):o;return{name:r,alpha:s,tone:i}},Bt=t=>S(t)&&(t.includes("rgb")||t.includes("var(")||t.includes("#")),Re=t=>{let e=[],r="",n=0;for(let o of t){if(o==="("?n+=1:o===")"&&n>0&&(n-=1),o===","&&n===0){e.push(r),r="";continue}r+=o}return(r.length||!e.length)&&e.push(r),e},ko=(t,e)=>{S(t)&&t.includes("rgb")&&(t=vo(t).join(", ")),S(t)&&(t=t.split(",").map(o=>parseFloat(o.trim()))),we(e)&&(e+="");let r=vi(t),n=e.slice(0,1);if(n==="-"||n==="+"){let o=Ei(r,parseFloat(e));return Ci(o).join(", ")}else{let[o,s,i]=t,c=ki(o,s,i),[a,l,f]=c;return Ai(a,l,parseFloat(e)/100*255)}};var Cr=(t,e)=>{if(t[e])return t[e].value;if(t.default)return t[t.default].value;let r=Object.keys(t)[0];return r&&t[r]&&t[r].value};M();M();M();var Ie={};Dt(Ie,{animation:()=>Qi,breakpoints:()=>Ki,class:()=>ec,color:()=>Ni,devices:()=>qi,document:()=>Hi,font:()=>Pi,fontFace:()=>Di,fontFamily:()=>Ri,fontFamilyTypes:()=>Ii,gradient:()=>Li,grid:()=>tc,icons:()=>Ui,media:()=>ji,reset:()=>rc,semanticIcons:()=>Gi,sequence:()=>Rt,shadow:()=>Bi,sizes:()=>oc,spacing:()=>Mi,svg:()=>Ji,svgData:()=>Xi,templates:()=>Yi,theme:()=>Vi,timing:()=>zi,typography:()=>vr,unit:()=>Ti,vars:()=>nc});var Rt={"minor-second":1.067,"major-second":1.125,"minor-third":1.2,"major-third":1.25,"perfect-fourth":1.333,"augmented-fourth":1.414,"perfect-fifth":1.5,"minor-sixth":1.6,phi:1.618,"major-sixth":1.667,"square-root-3":1.732,"minor-seventh":1.778,"major-seventh":1.875,octave:2,"square-root-5":2.23,"major-tenth":2.5,"major-eleventh":2.667,"major-twelfth":3,pi:3.14,"double-octave":4};var Ti={default:"em"};var $i={browserDefault:16,base:16,type:"font-size",ratio:Rt["minor-third"],range:[-3,12],h1Matches:6,lineHeight:1.5,subSequence:!0,mediaRegenerate:!1,unit:"em",templates:{},sequence:{},scales:{},vars:{}},vr=$i;var Pi={};var Ri={},Ii={"sans-serif":"Helvetica, Arial, sans-serif, --system-default",serif:"Times New Roman, Georgia, serif, --system-default",monospace:"Courier New, monospace, --system-default"},Di={};var ji={tv:"(min-width: 2780px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var Fi={base:vr.base,type:"spacing",ratio:Rt.phi,range:[-5,15],subSequence:!0,mediaRegenerate:!1,unit:"em",sequence:{},scales:{},vars:{}},Mi=Fi;var Ni={},Li={};var Vi={};var Bi={};var Ui={},Gi={};var Wi={default:150,base:150,type:"timing",ratio:Rt["perfect-fourth"],range:[-3,12],mediaRegenerate:!1,unit:"ms",sequence:{},scales:{},vars:{}},zi=Wi;var Hi={};var Ki={screenL:1920,screenM:1680,screenS:1440,tabletL:1366,tabletM:1280,tabletS:1024,mobileL:768,mobileM:560,mobileS:480,mobileXS:375},qi={screenXXL:[2560,1440],screenXL:[2240,1260],screenL:[1920,1024],screenM:[1680,1024],screenS:[1440,720],tabletL:[1366,926],tabletM:[1280,768],tabletS:[1024,768],mobileL:[768,375],mobileM:[560,768],mobileS:[480,768],mobileXS:[375,768]};var Qi={};var Ji={},Xi={};var Yi={};var Zi={},tc=Zi;var ec={};var rc={},nc={},oc={};var Ao={},Eo={},De=Ie,je={},Oo=t=>t.replace(/_([a-z])/g,(e,r)=>r.toUpperCase());for(let t in De){let e=t.toLowerCase();je[e]=De[t];let r=Oo(e);r!==e&&(je[r]=De[t]),e!==t&&(je[t]=De[t])}var kr={verbose:!1,useVariable:!0,useReset:!0,globalTheme:"auto",cssVars:Ao,cssMediaVars:Eo,CSS_VARS:Ao,CSS_MEDIA_VARS:Eo,_scratchConfig:!0,...je},Xl=Ft(kr),Fe={active:"0",0:kr};var ae=[],Q=t=>{t&&t._scratchConfig&&ae.push(t)},z=()=>{ae.pop()},O=t=>ae.length?ae[ae.length-1]:Fe[t||Fe.active]||kr;var Me={"-6":"U","-5":"V","-4":"W","-3":"X","-2":"Y","-1":"Z",0:"A",1:"B",2:"C",3:"D",4:"E",5:"F",6:"G",7:"H",8:"I",9:"J",10:"K",11:"L",12:"M",13:"N",14:"O",15:"P",16:"Q",17:"R",18:"S",19:"T"},To=(t,e)=>{let{key:r,variable:n,value:o,scaling:s,index:i,scalingVariable:c}=t;e.sequence[r]={key:r,decimal:~~(o*100)/100,val:~~o,scaling:s,index:i,scalingVariable:c,variable:n},e.scales[r]=s;let a=$o.has(e.unit)?"rem":e.unit;e.vars[n]=s+a},Ut=t=>{if(!t.includes("("))return t;let e=t.split("(")[0],r=t.slice(t.indexOf("(")+1,t.lastIndexOf(")"));return[e,r]},$o=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),sc=(t,e)=>{let{base:r,type:n,unit:o}=e,s=$o.has(o)?"rem":o,i=(ir(s)?1:r)+s;if(t===0)return i;let a="--"+(e.varPrefix?e.varPrefix+"-":"")+(n&&n.replace(".","-")),l=`${a}-ratio`;if(t>0){let f=Me[t-1];return`calc(var(${a}-${f}) * var(${l}))`}if(t<0){let f=Me[t+1],u=Math.abs(t),p=Math.pow(Po,2*u),h=Me[u];return h?`max(calc(var(${a}-${f}) / var(${l})), calc(var(${a}-${h}) / ${p.toFixed(4)}))`:`calc(var(${a}-${f}) / var(${l}))`}},ic=(t,e,r,n)=>{let{type:o}=n,i=t===2&&e.length===2?t+1:t,l=`${"--"+(n.varPrefix?n.varPrefix+"-":"")+(o&&o.replace(".","-"))}-sub-ratio-`;return`calc(var(${r}) * var(${l+i}))`},cc=(t,e)=>{let n=(t*e-t)/1.618,o=t*e-n,s=t+n,i=(o+s)/2;return[o,i,s]};var ac=(t,e)=>{let{key:r,base:n,value:o,ratio:s,variable:i,index:c}=t,l=~~(o*s)-~~o,f,[u,p,h]=cc(o,s);l>16?f=[u,p,h]:f=[u,h],f.forEach((d,g)=>{let b=~~(d/n*1e3)/1e3,m=i+(g+1),y=c+(g+1)/10,x=ic(g+1,f,i,e),_={key:r+(g+1),variable:m,value:d,scaling:b,scalingVariable:x,index:y};To(_,e)})},Po=1.618,fc=(t,e,r)=>{if(t>=0)return e*Math.pow(r,t);let n=Math.abs(t),o=e*Math.pow(r,t),s=e*Math.pow(r,n)/Math.pow(Po,2*n);return Math.max(o,s)},fe=t=>{let{type:e,base:r,ratio:n,range:o,subSequence:s}=t,i=Math.abs(o[0])+Math.abs(o[1]),a="--"+(t.varPrefix?t.varPrefix+"-":"")+(e&&e.replace(".","-"))+"-";for(let l=0;l<=i;l++){let f=o[1]-l,u=Me[f],p=fc(f,r,n),h=~~(p/r*100)/100,d=a+u,g=sc(f,t),b={key:u,variable:d,value:p,base:r,scaling:h,scalingVariable:g,ratio:n,index:f};To(b,t),s&&ac(b,t)}return t};var Ro=(t="A",e)=>{let r=O(),{unit:n}=r;if(S(t)&&W(t))return`var(${t})`;let{sequence:o,unit:s=n.default,useVariable:i}=e,c=/^-?[a-zA-Z]/i,a=c.test(t);if(_e.some(_=>t.includes(_))||!a||["none","auto","max-content","min-content","fit-content","inherit","initial","unset","revert","revert-layer"].includes(t))return t;let p=`--${e.varPrefix?e.varPrefix+"-":""}${xo(e.type.replace(".","-"))}-`,h=t.toUpperCase(),d=h.slice(0,1)==="-"?"-":"",g=d?h.slice(1):h,b="";g.includes("_")&&(b="_"+g.split("_")[1].toLowerCase(),g=g.split("_")[0]);let m=_=>c.test(_)?`var(${p}${_}${b})`:_;if(g.includes("+")){let[_,w]=g.split("+"),v=`${m(_)} + ${m(w)}`;return d?`calc((${v}) * -1)`:`calc(${v})`}else if(g.includes("*")){let[_,w]=g.split("*"),v=`${m(_)} * ${m(w)}`;return d?`calc((${v}) * -1)`:`calc(${v})`}else if(g.includes("-")){let[_,w]=g.split("-"),v=`${m(_)} - ${m(w)}`;return d?`calc((${v}) * -1)`:`calc(${v})`}let y=r.sizes;if(y){let _=y[t]||y[t.toLowerCase()];if(_!==void 0)return d?`calc(${_} * -1)`:_}if(!o[g]&&g.length===2&&(r.verbose&&console.warn(g,"- value is not found because `subSequence` is set to false"),g=g.slice(0,1)),i||r.useVariable){let _=`var(${p}${g}${b})`;return d?`calc(${_} * -1)`:_}let x=o?o[g]:null;return x?s==="ms"||s==="s"?d+x.val+s:d+x.scaling+s:console.warn("can't find",o,g)},lc=(t,e)=>{if(!["+","-","*","/",","].filter(s=>t.includes(s+" ")).length)return t;let n=/(\s*[+\-*/,]\s*)/;return t.split(n).map(s=>{let i=s.trim();return!i||["+","-","*","/",","].includes(i)?s:Ro(i,e)}).join("")},It=(t,e,r,n)=>{if(typeof t!="string")return O().verbose&&console.warn(e,t,"is not a string"),{[e]:t};if(t==="-"||t==="")return{};if(!n&&t.includes("(")){let s=Ut(t);n=s[0],t=s[1]}return["+","-","*","/",","].filter(s=>t.includes(s+" ")).length?t=lc(t,r):t=Ro(t,r),{[e]:n?`${n}(${t})`:t}};M();var du=pr();var uc="line|circle|ellipse|rect|polyline|polygon|path|stop|use|image",hu=new RegExp(`<(${uc})\\b([^>]*?)\\s*/>`,"g");M();var lt=(t,e,r)=>{let n=r||O();if(!S(t)){n.verbose&&console.warn(t,"- type for color is not valid");return}if(W(t))return`var(${t})`;e&&t[e]&&(t=t[e]);let o,s,i;if(R(t))[o,s,i]=t;else{let u=ce(t);if(!u){let{color:p,gradient:h}=n,d=h[t]||p[t];return d?(e&&d[e]&&(d=d[e]),n.useVariable?`var(${d.var})`:d.value):t}if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;o=u.name,s=u.alpha,i=u.tone}let{color:c,gradient:a}=n,l=c[o]||a[o];if(!l)return n.verbose&&console.warn("Can't find color ",o),t;e&&(l[e]?l=l[e]:n.verbose&&console.warn(t," - does not have ",e));let f=l.rgb;if(!f){let u=n.useVariable?`var(${l.var})`:l.value;if(s&&u){let p=Math.round(parseFloat(s)*100);return`color-mix(in srgb, ${u} ${p}%, transparent)`}return u}return i&&!l[i]&&(f=ko(f,i),l[i]={rgb:f,var:`${l.var}-${i}`}),l[i]&&(f=l[i].rgb),s?`rgba(${f}, ${s})`:i?`rgba(${f}, 1)`:n.useVariable?`var(${l.var})`:`rgb(${f})`},nt=(t,e,r)=>{let n=r||O();if(e||(e=n.globalTheme==="auto"?null:n.globalTheme),!S(t)){n.verbose&&console.warn(t,"- type for color is not valid");return}if(W(t))return`var(${t})`;let o,s,i;if(R(t))o=t[0];else{let u=ce(t);if(u){if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;o=u.name,s=u.alpha,i=u.tone}else o=t}let{color:c,gradient:a}=n,l=c[o]||a[o],f=I(l);if(f&&l.value)return lt(t,`@${e}`,r);if(f){if(n.useVariable&&l.var)return s||i?lt(t,null,r):`var(${l.var})`;if(e)return lt(t,`@${e}`,r);{let u={};for(let p in l){if(p.charCodeAt(0)!==64)continue;let h=n.media[p.slice(1)];if(!h)continue;let d="@media "+(h==="print"?`${h}`:`screen and ${h}`);u[d]=lt(t,p,r)}return u}}else return n.verbose&&console.warn("Can't find color",t),t};M();var Ar=t=>{let e=O(),r={};for(let n in t){let o=n.slice(0,1);if(xt(t[n])){if(o==="@")continue;o===":"?r[`&${n}`]=Ar(t[n]):o==="."&&(r[`&${n}`]=Ar(t[n]))}else r[n]=t[n]}return r},Do=(t,e)=>{let r=e.shift();return t[r]?Do(t[r],e):t},Io=(t,e)=>R(e)?Do(t,e):S(e)&&t[e]?t[e]:t;var le=(t,e)=>{let r=O();if(S(t)&&W(t)&&(t=le(t.slice(2))),!t||!S(t)){r.verbose&&console.warn(`${t} - Theme is not a string`);return}let[n,...o]=R(t)?t:t.split(" "),s=r.theme[n];return s&&o.length?s=Io(s,o):s&&e&&(s=Io(s,e)),Ar(s)};var jo=(t,e)=>{let r=O(),{fontFamily:n}=r;return Cr(e||n,t)};var Mo=t=>{let e=O(),{typography:r}=e;return It(t,"fontSize",r)};M();M();var hc=t=>{let r=O().spacing||{},n=parseFloat(t.spacingRatio),o={...r,ratio:Number.isFinite(n)?n:r.ratio,sequence:{},scales:{}};return fe(o),o};var No=t=>{let e=t.toLowerCase(),r=e.includes("width")||e.includes("height"),n=e.includes("border")||e.includes("outline");return r&&!n};var gc=t=>{let e=O(),{spacing:r}=e;return!t||!t.sequence?r:Object.keys(t.sequence).length>0?t:fe(t)},H=(t,e="padding",r,n)=>{let o=gc(r);if(S(t)&&!n&&t.includes("(")){let i=Ut(t);n=i[0],t=i[1]}let s=n?[t]:_o(t);if(R(s)){if(s.length>1){let i="";e==="borderWidth"&&(e="border",i="Width");let c={2:["Block","Inline"],3:["BlockStart","Inline","BlockEnd"],4:["BlockStart","InlineEnd","BlockEnd","InlineStart"]},a=(l,f)=>It(s[f],e+l+i,o,n);return c[s.length].map((l,f)=>a(l,f))}return It(t,e,o,n)}},Gt=(t,e,r,n)=>{let o=O(),{spacing:s}=o,i=r||t[e];if(!n&&S(i)&&i.includes("(")){let c=Ut(i);n=c[0],i=c[1]}if(t.spacingRatio){let c=hc(t);return H(i,e,c,n)}return H(i,e,s,n)},Lo=t=>{let e=r=>{let n=["+","-","*","/"].includes(r),o=_e.some(i=>t.includes(i));return n||o?r:r.length<3&&/[A-Z]/.test(r)?r+"_default":r};return t.split(",").map(r=>r.trim()).map(e).join(",").split(" ").map(e).join(" ")};M();var Vo=(t,e)=>{let r=O();if(e||(e=r.globalTheme),!S(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(W(t))return`var(${t})`;let[n]=R(t)?t:t.split(" "),s=r.shadow[n],i=I(s);if(!s)return r.verbose&&console.warn("Can't find color ",n),t;if(e){if(s[e])return s[e].value;r.verbose&&console.warn(t," - does not have ",e)}if(i&&s.value)return s.value;if(i){let c={};for(let a in s){let l=r.media[a.slice(1)],f="@media "+(l==="print"?`${l}`:`screen and ${l}`);c[f]=s.value}return c}return r.verbose&&console.warn("Can't find color",t),t};M();var bt=t=>{let e=O(),{timing:r}=e;return r[t]||r[bo(t)]||t},ht=(t,e="timing")=>{let r=O(),{timing:n}=r;return It(t,e,n)};M();var mc=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial"]),bc=new Set(["to","top","bottom","left","right","center","at","circle","ellipse","closest-side","farthest-side","closest-corner","farthest-corner"]),xc=t=>mc.has(t),wt=t=>{let e=t+"";if(Pt.test(e))return e;let r=e.trim();return r==="none"||r==="0"||r==="initial"||r==="inherit"||r==="unset"?e:e.split(/\s+/).map(o=>{if(o=o.trim(),!o)return"";if(W(o))return`var(${o})`;if(xc(o)||/^\d/.test(o)||o==="0")return o;let s=lt(o);if(Bt(s))return s;let i=H(o,"border");return i&&i.border?i.border:o}).join(" ")},Bo=t=>Pt.test(t)?t:t.split(/\s+/).map(e=>{if(e=e.trim(),!e)return"";if(W(e))return`var(${e})`;if(/^\d/.test(e)||e.includes("px")||e==="0")return e;let r=lt(e);return Bt(r)?r:e}).join(" "),Uo=(t,e)=>Vo(t,e),Er=(t,e)=>Pt.test(t)?t:Re(t).map(r=>(r=r.trim(),r?r.split(/\s+/).map(n=>{if(n=n.trim(),!n)return"";if(W(n))return`var(${n})`;if(n==="inset"||n==="none")return n;let o=lt(n);if(Bt(o)){let i=nt(n,e);return I(i)?Object.values(i).filter(c=>c.includes(": "+e))[0]:i}if(/^\d/.test(n)||n==="0"||n.includes("px")||n.slice(-2)==="em")return n;let s=H(n,"shadow");return s&&s.shadow?s.shadow:n}).join(" "):"")).join(", "),Or=(t,e)=>{let r=t.indexOf("(");if(r===-1)return t;let n=t.slice(0,r+1),o=t.slice(r+1,t.lastIndexOf(")")),s=")",c=Re(o).map(a=>(a=a.trim(),a.split(/\s+/).map(f=>{if(!f||/^\d/.test(f)||f==="0"||bc.has(f)||f==="transparent"||Pt.test(f))return f;let u=lt(f);return Bt(u)?u:f}).join(" ")));return n+c.join(", ")+s},Go=(t,e)=>{let r=O();return t.split(", ").map(n=>W(n)?`var(${n})`:n.includes("url")?n:n.includes("gradient")?Or(n,e):r.gradient[t]?{backgroundImage:nt(t,e||r.globalTheme)}:n.includes("/")||n.startsWith("http")||n.includes(".")&&!ce(n)?`url(${n})`:n).join(" ")},Wo=t=>S(t)&&t.split(" ").map(e=>H(e,"gap").gap).join(" "),_c=t=>{let e=t.split(" ");return e.length?e.map(r=>W(r)?`var(${r})`:r.length<3||r.includes("ms")?ht(r).timing||r:bt(r)?bt(r):r).join(" "):t},Tr=(t,e,r)=>{if(S(t))return t.split(",").map(n=>ht(n).timing||n).join(",")},zo=t=>{let e=t.split(",");if(e.length)return e.map(_c).join(",")};function V(t,e,r={},n={}){let o=Mt.call(this,e||r[t]);if(o==null)return;let s;if(S(o)){if(o.includes("(")){let a=Ut(o);s=a[0],o=a[1]}let i=r.scaleBoxSize,c=No(t);!i&&c&&!n.ratio&&(o=Lo(o))}return n.ratio?Gt(r,t,o,s):H(o,t,void 0,s)}var A=(t,e=null,r)=>V(t,e,r,{ratio:!0}),$r=(t,e,r)=>{if(S(t))return{borderRadius:t.split(" ").map((n,o)=>Gt(e,r,n)[r]).join(" ")}};var Pr=new WeakMap,Sc={passive:!0},wc={passive:!0,capture:!0},Rr=(t,e)=>Zr.has(t)?e?wc:Sc:e||!1;function Ko(t){let e=Pr.get(t);return e||(e={handlers:new Map,installed:new Set},Pr.set(t,e)),e}function Cc(t,e){let r=Ko(e);if(r.installed.has(t))return;r.installed.add(t);let n=t==="focus"||t==="blur"||t==="focusin"||t==="focusout"||t==="mouseenter"||t==="mouseleave",o=t==="mouseenter"||t==="mouseleave";e.addEventListener(t,s=>{let i=s.target;for(;i&&i!==e;){let c=r.handlers.get(t);if(c){let a=c.get(i);if(a){if(o&&s.relatedTarget&&i.contains(s.relatedTarget)){i=i.parentNode;continue}if(a(s),s.cancelBubble)return}}i=i.parentNode}},Rr(t,n))}function qo(t,e,r,n){n||(n=e.ownerDocument?.documentElement||e.getRootNode());let o=Ko(n);Cc(t,n),o.handlers.has(t)||o.handlers.set(t,new WeakMap),o.handlers.get(t).set(e,r)}function Qo(t,e,r){r||(r=e.ownerDocument?.documentElement||e.getRootNode());let n=Pr.get(r);if(!n)return;let o=n.handlers.get(t);o&&o.delete(e)}function Ho(t){return sr.has(t)&&!qt.has(t)}function ue(t,e,r){let{node:n,context:o}=e;if(!n)return;let s=o?.designSystem,i=a=>{s&&Q(s);try{let l=r.call(e,a,e,e.state,o);if(l&&typeof l.then=="function"){l.catch(f=>{e.error=f,console.error("[DOMQL] Async event error:",f)}).finally(()=>{s&&z()});return}}catch(l){if(e.error=l,console.error("[DOMQL] Event error:",l),o?.strictMode)throw l}s&&z()},c=or.has(t);if(!c&&Ho(t)){let a=o?.rootNode||n.ownerDocument?.documentElement;qo(t,n,i,a)}else n.addEventListener(t,i,Rr(t,!1));e.__ref.__eventCleanup||(e.__ref.__eventCleanup=[]),e.__ref.__eventCleanup.push(()=>{if(!c&&Ho(t)){let a=o?.rootNode||n.ownerDocument?.documentElement;Qo(t,n,a)}else n.removeEventListener(t,i,Rr(t,!1))})}function Jo(t){let e=[];return t.extends&&(Array.isArray(t.extends)?e.push(...t.extends):e.push(t.extends)),t.extend&&(Array.isArray(t.extend)?e.push(...t.extend):e.push(t.extend)),e}function pe(t,e,r){let n=Jo(e);if(!n.length)return;let s=(t.context||r?.context||{}).components||{};for(let i=0;i<n.length;i++){let c=Xo(n[i],s);c&&c!==e&&Yo(t,c,r,new Set([e]))}}function Xo(t,e){if(typeof t=="string"){if(t.includes(">")){let r=t.split(">").map(o=>o.trim()),n=e[r[0]]||e[`smbls.${r[0]}`];for(let o=1;o<r.length&&n;o++)n=n[r[o]];return n||null}return e[t]||e[`smbls.${t}`]||null}return typeof t=="object"&&t!==null?t:null}function Yo(t,e,r,n=new Set){if(n.has(e))return;n.add(e);let o=Jo(e);if(o.length){let i=(t.context||r?.context||{}).components||{};for(let c=0;c<o.length;c++){let a=Xo(o[c],i);a&&Yo(t,a,r,n)}}for(let s in e){if(s==="extends"||s==="extend")continue;let i=e[s];t[s]===void 0?i&&typeof i=="object"&&!Array.isArray(i)&&typeof i!="function"?t[s]={...i}:t[s]=i:typeof t[s]=="object"&&typeof i=="object"&&!Array.isArray(t[s])&&!Array.isArray(i)&&t[s]!==null&&i!==null?t[s]=Zo(t[s],i):t[s]=i}}function Zo(t,e){let r={...t};for(let n in e){let o=r[n],s=e[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=Zo(o,s):r[n]=s}return r}ke();function Ir(t={},e={}){let r=this,n=r.__ref;if(n){if((typeof t=="string"||typeof t=="number")&&(t={text:t}),!e.preventListeners&&typeof r.onBeforeUpdate=="function"&&r.onBeforeUpdate(r,r.state,r.context,e)===!1)return r;if(mt(()=>{if(t.state&&G(r.state)&&r.state.update(t.state),t.text!==void 0&&(r.text=t.text,!n.__exec.text&&r.node&&(r.tag==="string"?r.node.nodeValue=t.text??"":r.node.textContent=t.text??"")),t.html!==void 0&&(r.html=t.html,!n.__exec.html&&r.node&&(r.node.innerHTML=t.html)),t.style&&r.node?.style){if(!n.__exec.style)for(let o in t.style){let s=t.style[o];if(s==null)continue;let i=o.replace(/[A-Z]/g,a=>"-"+a.toLowerCase()),c=String(s).replace(/\s*!important\s*$/,"");r.node.style.setProperty(i,c,"important")}r.style||(r.style={}),Object.assign(r.style,t.style)}if(t.attr&&r.node?.setAttribute){for(let o in t.attr){let s=t.attr[o];s==null||s===!1?r.node.removeAttribute(o):typeof s!="function"&&typeof s!="object"&&r.node.setAttribute(o,s===!0?"":s)}r.attr||(r.attr={}),Object.assign(r.attr,t.attr)}if(t.data&&r.node?.dataset){for(let o in t.data)r.node.dataset[o]=t.data[o];r.data||(r.data={}),Object.assign(r.data,t.data)}for(let o in t){if(J.has(o)||o==="state")continue;let s=t[o],i=r[o];if(i&&i.__ref&&typeof i.update=="function")i.update(s,e);else if(typeof s=="object"&&s!==null){let c=o.charCodeAt(0);c>=65&&c<=90&&ot(s,r,o,e)}else o!=="text"&&o!=="html"&&o!=="style"&&o!=="attr"&&o!=="data"&&(r[o]=s)}}),r.node&&n.__conditionalRunners)for(let o of n.__conditionalRunners)o();return Nt("update",r),!e.preventListeners&&typeof r.onUpdate=="function"&&r.onUpdate(r,r.state,r.context,e),r}}function Dr(t){if(!t)return;let e=t.__ref;if(e){try{typeof t.onBeforeRemove=="function"&&t.onBeforeRemove(t,t.state,t.context)}catch(r){console.error("[smbls] onBeforeRemove error:",r)}if(e.__effects){for(let r=0;r<e.__effects.length;r++)e.__effects[r].dispose();e.__effects.length=0}if(e.__eventCleanup){for(let r=0;r<e.__eventCleanup.length;r++)e.__eventCleanup[r]();e.__eventCleanup.length=0}if(e.__children){for(let r=0;r<e.__children.length;r++){let n=e.__children[r],o=t[n];o&&o.__ref&&Dr(o)}e.__children.length=0}if(t.node?.parentNode&&t.node.remove(),t.state?.destroy&&t.state.__element===t&&t.state.destroy(),t.parent?.__ref?.__children){let r=t.parent.__ref.__children.indexOf(t.key);r!==-1&&t.parent.__ref.__children.splice(r,1),delete t.parent[t.key]}try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(r){console.error("[smbls] onRemove error:",r)}t.node=null,t.parent=null,t.__ref=null}}function jr(){Dr(this)}M();var de=new Map,vc=null,ts=null;function os(){try{let t=O();if(t?.document)return t.document}catch{}return typeof document<"u"?document:null}var kc={display:"d",position:"pos",padding:"p",paddingTop:"pt",paddingRight:"pr",paddingBottom:"pb",paddingLeft:"pl",margin:"m",marginTop:"mt",marginRight:"mr",marginBottom:"mb",marginLeft:"ml",width:"w",height:"h",minWidth:"mnw",minHeight:"mnh",maxWidth:"mxw",maxHeight:"mxh",top:"t",right:"r",bottom:"b",left:"l",flex:"fx",flexDirection:"fxd",flexWrap:"fxw",flexGrow:"fxg",flexShrink:"fxs",flexBasis:"fxb",justifyContent:"jc",alignItems:"ai",alignSelf:"as",alignContent:"ac",gap:"g",rowGap:"rg",columnGap:"cg",gridTemplateColumns:"gtc",gridTemplateRows:"gtr",gridColumn:"gc",gridRow:"gr",overflow:"of",overflowX:"ofx",overflowY:"ofy",fontSize:"fs",fontWeight:"fw",fontFamily:"ff",fontStyle:"fst",lineHeight:"lh",letterSpacing:"ls",textAlign:"ta",textDecoration:"td",textTransform:"tt",color:"c",background:"bg",backgroundColor:"bgc",backgroundImage:"bgi",border:"bd",borderRadius:"br",borderColor:"bdc",borderWidth:"bdw",borderStyle:"bds",boxShadow:"bxsh",opacity:"op",zIndex:"z",cursor:"cur",transition:"tr",transform:"tf",animation:"an",visibility:"vis",whiteSpace:"ws",wordBreak:"wb",objectFit:"obj",pointerEvents:"pe",userSelect:"us",boxSizing:"bxz",outline:"ol",listStyle:"lis",textOverflow:"txo",verticalAlign:"va",float:"fl",clear:"cl",content:"cnt",backdropFilter:"bdf",filter:"flt",resize:"rsz",appearance:"apr",fill:"fil",stroke:"stk"};function Ne(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function Le(t){let e=2166136261;for(let r=0;r<t.length;r++)e^=t.charCodeAt(r),e=e*16777619>>>0;return e.toString(36)}function Ac(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():Le(e)}function es(t,e,r){let n=(r?r+"":"")+t+":"+e,o=de.get(n),s=o?null:Ne(t);if(!o){let c=kc[t]||Le(t),a=Ac(e);o=r?`_${r}_${c}-${a}`:`_${c}-${a}`,de.set(n,o)}if(typeof e=="string"&&(e.indexOf("}")!==-1||e.indexOf("{")!==-1))return o;let i=`.${o}{${s||Ne(t)}:${e}}`;return Ct(i),o}var rs=new WeakMap;function Ct(t,e){let r=Ec(e);if(!r)return;let n=rs.get(r);if(n||(n=new Set,rs.set(r,n)),!n.has(t)){n.add(t);try{r.insertRule(t,r.cssRules.length)}catch{}}}var ns=new WeakMap;function Ec(t){let e=t||os();if(!e||!e.head)return null;let r=ns.get(e);if(r&&r.ownerNode&&r.ownerNode.parentNode===e.head)return r;let n=e.head.querySelector("style[data-smbls]");n||(n=e.createElement("style"),n.setAttribute("data-smbls",""),e.head.appendChild(n));let o=n.sheet;return ns.set(e,o),vc=o,o}var Oc=8;function Mr(t,e,r){if(!t||typeof t!="object")return"";let n=null,o=0,s=[],i=[];for(let a in t){let l=t[a];l==null||l===!1||l===""||(typeof l=="object"?i.push([a,l]):ts?(n||(n=[]),n.push(a,String(l)),o++):s.push(es(a,String(l),r)))}if(n&&o>=Oc){let a=n.join("\0"),l=ts(a),f=l.indexOf("\0"),u=l.substring(0,f),p=l.substring(f+1);if(p){let h=p.split(`
11
+ `);for(let d=0;d<h.length;d++)h[d]&&Ct(h[d])}s.push(u)}else if(n)for(let a=0;a<n.length;a+=2)s.push(es(n[a],n[a+1],r));let c=[];for(let a=0;a<i.length;a++)c.push(Tc(i[a][0],i[a][1],r));return s.concat(c).join(" ").trim()}var Fr=new Map;function Tc(t,e,r){let n=(r?r+"":"")+t+JSON.stringify(e),o=de.get(n);if(o){let p=Fr.get(o);if(p)for(let h=0;h<p.length;h++)Ct(p[h]);return o}o=r?`_${r}_c${Le(n)}`:`_c${Le(n)}`;let s="",i=[],c=p=>typeof p=="string"&&(p.indexOf("{")!==-1||p.indexOf("}")!==-1),a=(p,h)=>{let d="";for(let g in h){let b=h[g];if(b!=null)if(typeof b=="object")a([...p,g],b);else{if(c(b))continue;d+=`${Ne(g)}:${b};`}}d&&(p.length===0?s+=d:i.push({chain:p,body:d}))};a([],e);let l=p=>{if(!p.length)return`.${o}`;let h=p[0].split(",").map(d=>d.trim()).map(d=>d.includes("&")?d.replace(/&/g,`.${o}`):d.startsWith(":")?`.${o}${d}`:`.${o} ${d}`);for(let d=1;d<p.length;d++){let g=p[d].split(",").map(m=>m.trim()),b=[];for(let m of h)for(let y of g)y.includes("&")?b.push(y.replace(/&/g,m)):y.startsWith(":")?b.push(m+y):b.push(m+" "+y);h=b}return h.join(", ")},f=[];if(t.startsWith("@media")||t.startsWith("@supports")){if(s){let p=`${t}{.${o}{${s}}}`;f.push(p),Ct(p)}for(let p of i){let h=l(p.chain),d=`${t}{${h}{${p.body}}}`;f.push(d),Ct(d)}return Fr.set(o,f),de.set(n,o),o}let u=l([t]);if(s){let p=`${u}{${s}}`;f.push(p),Ct(p)}for(let p of i){let d=`${l([t,...p.chain])}{${p.body}}`;f.push(d),Ct(d)}return Fr.set(o,f),de.set(n,o),o}function Ve(t,e){let r="";for(let n in e){let o="";for(let s in e[n])o+=`${Ne(s)}:${e[n][s]};`;r+=`${n}{${o}}`}return Ct(`@keyframes ${t}{${r}}`),t}var $c=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],Pc=["none","forwards","backwards","both"],Rc=["normal","reverse","alternate","alternate-reverse"],Ic=["running","paused"],Dc=t=>/^[\d.]+m?s$/.test(t),jc=0,ss=new Map,Nr=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{};if(I(t)){let o=JSON.stringify(t),s=ss.get(o);if(s)return s;let i=`smbls-anim-${jc++}`,c=Ve(i,t);return ss.set(o,c),c}let n=r&&r[t];return I(n)?Ve(t,n):t},Fc=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{},n=t.split(/\s+/),o=null,s=[],i=null,c=null,a=null,l=null,f=null;for(let u of n)r&&r[u]?o=u:Dc(u)?s.push(u):$c.includes(u)||u.startsWith("cubic-bezier")||u.startsWith("steps(")?i=u:u==="infinite"||/^\d+$/.test(u)?c=u==="infinite"?u:Number(u):Rc.includes(u)?a=u:Pc.includes(u)?l=u:Ic.includes(u)?f=u:o||(o=u);return{name:o,durations:s,timingFunction:i,iterationCount:c,direction:a,fillMode:l,playState:f}},is={animation:(t,e)=>{if(S(t)&&t.includes(" ")){let r=Fc(t,e);return{animationName:Nr(r.name||t,e),animationDuration:r.durations[0]||ht(e.animationDuration||"A").timing,animationDelay:r.durations[1]||ht(e.animationDelay||"0s").timing,animationTimingFunction:r.timingFunction||bt(e.animationTimingFunction||"ease"),animationFillMode:r.fillMode||e.animationFillMode||"both",animationIterationCount:r.iterationCount!=null?r.iterationCount:e.animationIterationCount||1,animationPlayState:r.playState||e.animationPlayState,animationDirection:r.direction||e.animationDirection}}return{animationName:Nr(t,e),animationDuration:ht(e.animationDuration||"A").timing,animationDelay:ht(e.animationDelay||"0s").timing,animationTimingFunction:bt(e.animationTimingFunction||"ease"),animationFillMode:e.animationFillMode||"both",animationIterationCount:e.animationIterationCount||1,animationPlayState:e.animationPlayState,animationDirection:e.animationDirection}},animationName:(t,e)=>({animationName:Nr(t,e)}),animationDuration:t=>({animationDuration:ht(t).timing}),animationDelay:t=>({animationDelay:ht(t).timing}),animationTimingFunction:t=>({animationTimingFunction:bt(t)}),animationIterationCount:t=>({animationIterationCount:t}),animationFillMode:t=>({animationFillMode:t}),animationPlayState:t=>({animationPlayState:t}),animationDirection:t=>({animationDirection:t})};M();var cs={show:t=>t?void 0:{display:"none !important"},hide:t=>t?{display:"none !important"}:void 0,height:(t,e)=>A("height",t,e),width:(t,e)=>A("width",t,e),boxSizing:t=>tn(t)?{boxSizing:"border-box"}:{boxSizing:t},boxSize:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...V("height",e),...V("width",r||e)}},inlineSize:(t,e)=>A("inlineSize",t,e),blockSize:(t,e)=>A("blockSize",t,e),minWidth:(t,e)=>A("minWidth",t,e),maxWidth:(t,e)=>A("maxWidth",t,e),widthRange:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...V("minWidth",e),...V("maxWidth",r||e)}},minHeight:(t,e)=>A("minHeight",t,e),maxHeight:(t,e)=>A("maxHeight",t,e),heightRange:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...V("minHeight",e),...V("maxHeight",r||e)}},size:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...A("inlineSize",e),...A("blockSize",r||e)}},minBlockSize:(t,e)=>A("minBlockSize",t,e),minInlineSize:(t,e)=>A("minInlineSize",t,e),maxBlockSize:(t,e)=>A("maxBlockSize",t,e),maxInlineSize:(t,e)=>A("maxInlineSize",t,e),minSize:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...V("minInlineSize",e),...V("minBlockSize",r||e)}},maxSize:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...V("maxInlineSize",e),...V("maxBlockSize",r||e)}},borderWidth:(t,e)=>A("borderWidth",t,e),padding:(t,e)=>A("padding",t,e),scrollPadding:(t,e)=>A("scrollPadding",t,e),paddingInline:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...V("paddingInlineStart",e),...V("paddingInlineEnd",r||e)}},paddingBlock:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...V("paddingBlockStart",e),...V("paddingBlockEnd",r||e)}},paddingTop:(t,e)=>A("paddingBlockStart",t,e),paddingBottom:(t,e)=>A("paddingBlockEnd",t,e),paddingLeft:(t,e)=>A("paddingInlineStart",t,e),paddingRight:(t,e)=>A("paddingInlineEnd",t,e),paddingBlockStart:(t,e)=>A("paddingBlockStart",t,e),paddingBlockEnd:(t,e)=>A("paddingBlockEnd",t,e),paddingInlineStart:(t,e)=>A("paddingInlineStart",t,e),paddingInlineEnd:(t,e)=>A("paddingInlineEnd",t,e),margin:(t,e)=>A("margin",t,e),marginInline:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...V("marginInlineStart",e),...V("marginInlineEnd",r||e)}},marginBlock:(t,e)=>{if(!S(e.marginBlock))return;let[r,n]=e.marginBlock.split(" ");return{...V("marginBlockStart",r),...V("marginBlockEnd",n||r)}},marginTop:(t,e)=>A("marginBlockStart",t,e),marginBottom:(t,e)=>A("marginBlockEnd",t,e),marginLeft:(t,e)=>A("marginInlineStart",t,e),marginRight:(t,e)=>A("marginInlineEnd",t,e),marginInlineStart:(t,e)=>A("marginInlineStart",t,e),marginInlineEnd:(t,e)=>A("marginInlineEnd",t,e),marginBlockStart:(t,e)=>A("marginBlockStart",t,e),marginBlockEnd:(t,e)=>A("marginBlockEnd",t,e),gap:t=>({gap:Wo(t)}),columnGap:(t,e)=>Gt(e,"columnGap",t),rowGap:(t,e)=>Gt(e,"rowGap",t),flexWrap:t=>({display:"flex",flexWrap:t}),flexFlow:(t,e)=>{let r=e.reverse;if(!S(t))return;let[n,o]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(n="row"),(t.startsWith("y")||t==="column")&&(n="column"),{display:"flex",flexFlow:(n||"")+(!n.includes("-reverse")&&r?"-reverse":"")+" "+(o||"")}},flexAlign:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{display:"flex",alignItems:e,justifyContent:r}},round:(t,e)=>$r(t??e.borderRadius,e,"round"),borderRadius:(t,e)=>$r(t??e.round,e,"borderRadius")};var as={fontSize:t=>Mo(t)||t,fontFamily:t=>({fontFamily:jo(t)||t}),fontWeight:t=>({fontWeight:t,fontVariationSettings:'"wght" '+t})};var fs={overflow:t=>({overflow:t,scrollBehavior:"smooth"}),cursor:(t,e,r,n)=>{if(!t)return;let o=n.assets&&n.assets[t];if(o&&o.content)t=`url(${o.content.src})`;else{let s=n.files&&n.files[t];s&&s.content&&(t=`url(${s.content.src})`)}return{cursor:t}},opacity:t=>t!=null?{opacity:String(t)}:void 0,visibility:t=>t!=null?{visibility:t}:void 0,pointerEvents:t=>t!=null?{pointerEvents:t}:void 0};var ls={inset:(t,e)=>{if(e.call("isNumber",t))return{inset:t};if(e.call("isString",t))return{inset:t.split(" ").map(r=>H(r,"k").k).join(" ")}},left:t=>H(t,"left"),top:t=>H(t,"top"),right:t=>H(t,"right"),bottom:t=>H(t,"bottom"),verticalInset:t=>{if(typeof t!="string")return;let e=t.split(" ").map(r=>H(r,"k").k);return{top:e[0],bottom:e[1]||e[0]}},horizontalInset:t=>{if(typeof t!="string")return;let e=t.split(" ").map(r=>H(r,"k").k);return{left:e[0],right:e[1]||e[0]}}};M();var ut=({context:t,state:e})=>{let r=e?.root?.globalTheme||t.designSystem?.globalTheme;return r==="auto"?null:r},us={theme:(t,e)=>{if(t)return e.themeModifier?le(t,`@${e.themeModifier}`):le(t)},color:(t,e)=>{let r=ut(e);if(t)return{color:nt(t,r)}},background:(t,e)=>{let r=ut(e);if(t)return S(t)&&t.includes("gradient")?{background:Or(t,r)}:{background:nt(t,r)}},backgroundColor:(t,e)=>{let r=ut(e);if(t)return{backgroundColor:nt(t,r)}},backgroundImage:(t,e,r,n)=>{let o=ut(e);if(!t)return;let s=n.assets&&n.assets[t];if(s&&s.content)t=s.content.src;else{let i=n.files&&n.files[t];i&&i.content&&(t=i.content.src)}return{backgroundImage:Go(t,o)}},textStroke:t=>({WebkitTextStroke:Bo(t)}),outline:t=>({outline:wt(t)}),outlineOffset:(t,e)=>A("outlineOffset",t,e),border:t=>({border:wt(t)}),borderColor:(t,e)=>{let r=ut(e);if(t)return{borderColor:nt(t,r)}},borderTopColor:(t,e)=>{let r=ut(e);if(t)return{borderTopColor:nt(t,r)}},borderBottomColor:(t,e)=>{let r=ut(e);if(t)return{borderBottomColor:nt(t,r)}},borderLeftColor:(t,e)=>{let r=ut(e);if(t)return{borderLeftColor:nt(t,r)}},borderRightColor:(t,e)=>{let r=ut(e);if(t)return{borderRightColor:nt(t,r)}},borderLeft:t=>({borderLeft:wt(t)}),borderTop:t=>({borderTop:wt(t)}),borderRight:t=>({borderRight:wt(t)}),borderBottom:t=>({borderBottom:wt(t)}),shadow:(t,e)=>{let r=ut(e);if(t)return{boxShadow:Uo(t,r)}},boxShadow:(t,e)=>{if(!S(t))return;let[r,n]=t.split("!importan"),o=ut(e),s=n?" !important":"";return{boxShadow:Er(r.trim(),o)+s}},textShadow:(t,{context:e})=>({textShadow:Er(t,e.designSystem.globalTheme)}),columnRule:t=>({columnRule:wt(t)})};var ps={transition:t=>({transition:zo(t)}),transitionDuration:t=>({transitionDuration:Tr(t)}),transitionDelay:t=>({transitionDelay:Tr(t)}),transitionTimingFunction:t=>({transitionTimingFunction:bt(t)}),transitionProperty:t=>({transitionProperty:t,willChange:t})};M();var ds={flow:(t,e)=>{let r=e.reverse;if(!S(t))return;let[n,o]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(n="row"),(t.startsWith("y")||t==="column")&&(n="column"),{display:"flex",flexFlow:(n||"")+(!n.includes("-reverse")&&r?"-reverse":"")+" "+(o||"")}},wrap:(t,e)=>({display:"flex",flexWrap:t}),align:(t,e)=>{let[r,n]=t.split(" ");return{display:"flex",alignItems:r,justifyContent:n}}};var hs={area:t=>({gridArea:t}),template:t=>({gridTemplate:t}),templateAreas:t=>({gridTemplateAreas:t}),column:t=>({gridColumn:t}),columns:t=>({gridTemplateColumns:t}),templateColumns:t=>({gridTemplateColumns:t}),autoColumns:t=>({gridAutoColumns:t}),columnStart:t=>({gridColumnStart:t}),row:t=>({gridRow:t}),rows:t=>({gridTemplateRows:t}),templateRows:t=>({gridTemplateRows:t}),autoRows:t=>({gridAutoRows:t}),rowStart:t=>({gridRowStart:t}),autoFlow:t=>({gridAutoFlow:t})};var X={...is,...cs,...as,...fs,...ls,...us,...ps,...ds,...hs};var tt=new Set(["accentColor","alignContent","alignItems","alignSelf","alignmentBaseline","all","animation","animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationTimingFunction","appearance","aspectRatio","backdropFilter","backfaceVisibility","background","backgroundAttachment","backgroundBlendMode","backgroundClip","backgroundColor","backgroundImage","backgroundOrigin","backgroundPosition","backgroundPositionX","backgroundPositionY","backgroundRepeat","backgroundRepeatX","backgroundRepeatY","backgroundSize","baselineShift","blockSize","border","borderBlock","borderBlockColor","borderBlockEnd","borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth","borderBlockStart","borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth","borderBlockStyle","borderBlockWidth","borderBottom","borderBottomColor","borderBottomLeftRadius","borderBottomRightRadius","borderBottomStyle","borderBottomWidth","borderCollapse","borderColor","borderImage","borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth","borderLeft","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRadius","borderRight","borderRightColor","borderRightStyle","borderRightWidth","borderSpacing","borderStyle","borderTop","borderTopColor","borderTopLeftRadius","borderTopRightRadius","borderTopStyle","borderTopWidth","borderWidth","bottom","boxDecorationBreak","boxShadow","boxSizing","breakAfter","breakBefore","breakInside","captionSide","caretColor","clear","clip","clipPath","color","colorAdjust","colorInterpolation","colorInterpolationFilters","colorRendering","columnCount","columnFill","columnGap","columnRule","columnRuleColor","columnRuleStyle","columnRuleWidth","columnSpan","columnWidth","columns","contain","content","counterIncrement","counterReset","cursor","direction","display","emptyCells","filter","flex","flexBasis","flexDirection","flexFlow","flexGrow","flexShrink","flexWrap","float","font","fontFamily","fontFeatureSettings","fontKerning","fontLanguageOverride","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantNumeric","fontVariantPosition","fontWeight","fontVariationSettings","fontSynthesis","forcedColorAdjust","gap","grid","gridArea","gridAutoColumns","gridAutoFlow","gridAutoRows","gridColumn","gridColumnEnd","gridColumnGap","gridColumnStart","gridGap","gridRow","gridRowEnd","gridRowGap","gridRowStart","gridTemplate","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","height","hyphens","imageOrientation","imageRendering","imeMode","inset","insetBlock","insetBlockEnd","insetBlockStart","insetInline","insetInlineEnd","insetInlineStart","initialLetter","isolation","justifyContent","justifyItems","justifySelf","left","letterSpacing","lineBreak","lineClamp","lineHeight","listStyle","listStyleImage","listStylePosition","listStyleType","margin","marginBottom","marginLeft","marginRight","marginTop","marginBlock","marginBlockEnd","marginBlockStart","marginInline","marginInlineEnd","marginInlineStart","mask","maskBorder","maskBorderImage","maskBorderOutset","maskBorderRepeat","maskBorderSlice","maskBorderSource","maskBorderWidth","maskClip","maskComposite","maskImage","maskOrigin","maskPosition","maskRepeat","maskSize","maskType","maxBlockSize","maxHeight","maxInlineSize","maxWidth","minBlockSize","minHeight","minInlineSize","minWidth","mixBlendMode","objectFit","objectPosition","objectViewBox","offset","offsetDistance","offsetPath","offsetRotate","opacity","order","orientation","outline","outlineColor","outlineOffset","outlineStyle","outlineWidth","overflow","overflowAnchor","overflowClip","overflowScrolling","overflowWrap","overflowX","overflowY","padding","paddingBottom","paddingLeft","paddingRight","paddingTop","pageBreakAfter","pageBreakBefore","pageBreakInside","paintOrder","perspective","perspectiveOrigin","placeContent","placeItems","placeSelf","pointerEvents","position","resize","right","rotate","rowGap","scrollBehavior","scrollPadding","scrollSnapAlign","scrollSnapType","scrollbarColor","scrollbarWidth","shapeImageThreshold","shapeMargin","shapeOutside","tabSize","tableLayout","textAlign","textAlignLast","textDecoration","textDecorationColor","textDecorationLine","textDecorationSkipInk","textDecorationStyle","textDecorationThickness","textIndent","textOverflow","textShadow","textTransform","textUnderlineOffset","top","transform","transformOrigin","transformStyle","transition","transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction","translate","translateX","translateY","translateZ","unicodeBidi","userSelect","verticalAlign","visibility","whiteSpace","widows","width","willChange","wordBreak","wordSpacing","wordWrap","writingMode","zIndex"]);M();function ms(t,e,r){let n=t?.context?.analyze;if(!n||!n.emit||e==="warn"&&!n.shouldCapture("warnings")||e==="error"&&!n.shouldCapture("errors"))return;let o=r.map(s=>s?.message||(typeof s=="string"?s:null)).filter(Boolean).join(" ");n.emit({id:`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,ts:Date.now(),type:e==="error"?"error":"warning",level:e,hook:e==="error"?"el.error":"el.warn",element:{key:t.key!=null?String(t.key):null,name:t.__name||null,tag:t.tag||null},message:o||null,args:r})}function Mc(...t){return ms(this,"warn",t),Jn.apply(this,t)}function Nc(...t){return ms(this,"error",t),Xn.apply(this,t)}var gs={update:Ir,remove:jr,getDB:eo,getQuery:ro,getRootData:Kn,getChildren:Gn,getPath:Wn,nextElement:Yn,previousElement:Zn,verbose:wr,warn:Mc,error:Nc,variables:to,spotByPath:Un,set(t,e){if(this.removeContent(),t!=null){let r=this.context?.__create;r&&r(t,this,"content",e)}this.__ref&&(this.__ref.contentManaged=!0)},reset(t){let e=this.context?.__create;if(!e)return this;let r=this.parent,n=this.key,o=this.parse();return this.remove(),e(o,r,n,t)},lookup(t){let e=this.parent;for(;e;){if(typeof t=="function"){if(t(e))return e}else if(typeof t=="string"){if(e.key===t)return e;if(e[t]&&e[t].__ref)return e[t]}e=e.parent}return null},lookdown(t){let e=this.__ref;if(!e?.__children)return null;for(let r of e.__children){let n=this[r];if(!n)continue;if(typeof t=="function"){if(t(n))return n}else if(typeof t=="string"&&n.key===t)return n;let o=n.lookdown?.(t);if(o)return o}return null},lookdownAll(t,e=[]){let r=this.__ref;if(!r?.__children)return e;for(let n of r.__children){let o=this[n];o&&(typeof t=="function"?t(o)&&e.push(o):typeof t=="string"&&o.key===t&&e.push(o),o.lookdownAll?.(t,e))}return e},getRef(){return this.__ref},getRoot:Hn,getRootState:zn,getRootContext:qn,getContext:Qn,parse(t){let e={},r=t?new Set(t):null,n=this.__ref?.__exec;for(let o in this)if(!(o==="parent"||o==="node"||o==="__ref")&&!r?.has(o)){if(n&&n[o]!==void 0){e[o]=n[o];continue}typeof this[o]!="function"&&(e[o]=this[o])}return e},parseDeep(t){let e=this.parse(t),r=this.__ref;if(r?.__children)for(let n of r.__children)this[n]?.parseDeep&&(e[n]=this[n].parseDeep(t));return e},keys(){return Object.keys(this)},log(...t){if(t.length){let e={};for(let r of t)e[r]=this[r];console.log(e)}else console.log(this)},setProps(t,e){return this.update(t,e)},setNodeStyles(t){if(this.node?.style)for(let e in t){let r=t[e];if(r==null)continue;let n=e.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()),o=String(r).replace(/\s*!important\s*$/,"");this.node.style.setProperty(n,o,"important")}},call(t,...e){let r=this.context,n=r?.methods?.[t]||r?.functions?.[t]||r?.utils?.[t]||this[t];if(typeof n=="function")return n.call(this,...e)},removeContent(){let t=this.__ref;if(!t?.__children)return;let e=this.content;if(e?.remove){e.remove(),delete this.content;let r=t.__children.indexOf("content");r!==-1&&t.__children.splice(r,1)}e?.node?.parentNode&&e.node.parentNode.removeChild(e.node)}},ys=new WeakMap;function Lc(t){if(!t)return gs;let e=ys.get(t);if(e)return e;e=Object.create(gs);let r=t.methods;if(r)for(let n in r)e[n]=r[n];return ys.set(t,e),e}function Lr(t){let e=Lc(t.context);Object.setPrototypeOf(t,e)}M();ke();var Vc=(t,e,r)=>{Object.defineProperty(t,e,{value:r,enumerable:!1,configurable:!0,writable:!0})},vt=(t,e)=>{if(G(e)){let o=e.__raw||e;e.toggle||Object.defineProperty(o,"toggle",{value:function(s,i={}){e[s]=!e[s]},enumerable:!1,configurable:!0}),e.set||Object.defineProperty(o,"set",{value:function(s,i={}){return e.clean({preventStateUpdate:!0}),typeof s=="object"&&s!==null&&e.update(s,i),e},enumerable:!1,configurable:!0}),Object.defineProperty(o,"setByPath",{value:function(s,i,c={}){let a=s.split("."),l=e;for(let f=0;f<a.length-1;f++)l[a[f]]===void 0&&(l[a[f]]={}),l=l[a[f]];return l[a[a.length-1]]=i,e},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"getByPath",{value:function(s){let i=s.split("."),c=e;for(let a=0;a<i.length;a++){if(c==null)return;c=c[i[a]]}return c},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"removeByPath",{value:function(s,i={}){let c=s.split("."),a=e;for(let l=0;l<c.length-1;l++){if(a==null)return e;a=a[c[l]]}return a&&delete a[c[c.length-1]],e},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"reset",{value:function(s={}){let i=e.parse();return e.set(i,s)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"apply",{value:function(s,i={}){if(typeof s=="function"){let c=s(e);return e.update(c,i)}},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"applyFunction",{value:function(s,i={}){if(typeof s=="function")return s(e),e.update(e.parse(),i)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"rootUpdate",{value:function(s,i={}){let c=e;for(;c?.parent&&G(c.parent);)c=c.parent;return c.update(s,i)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"parentUpdate",{value:function(s,i={}){if(e.parent)return e.parent.update(s,i)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"quietReplace",{value:function(s,i={}){return e.replace(s,{quiet:!0,...i})},enumerable:!1,configurable:!0,writable:!0}),Object.getOwnPropertyDescriptor(o,"root")||Object.defineProperty(o,"root",{get:function(){let s=e,i=G(s)?s:null;for(let c=0;c<64&&s?.parent&&s.parent!==s;c++)s=s.parent,G(s)&&(i=s);return i||s},enumerable:!1,configurable:!0});return}if(!e||typeof e!="object")return;let r=()=>{for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&delete e[o]},n={update(o){if(!o||typeof o!="object")return e;for(let s in o)e[s]=o[s];return e},apply(o){if(typeof o!="function")return e;let s=o(e);return s?e.update(s):e},parse(){return{...e}},toggle(o){return e[o]=!e[o],e},set(o){if(!o||typeof o!="object")return e;r();for(let s in o)e[s]=o[s];return e},replace(o){return e.set(o)},clean(){return r(),e}};for(let o in n)typeof e[o]!="function"&&Vc(e,o,n[o])};var vh=new Proxy(Object.create(null),{get(){},has(){return!1}});M();var Vr={default:["accesskey","autofocus","class","contenteditable","contextmenu","dir","draggable","hidden","id","lang","part","placeholder","slot","spellcheck","style","tabindex","title","translate","inert","radiogroup","role","about","datatype","inlist","prefix","property","resource","typeof","vocab","autocapitalize","autocorrect","autosave","color","itemprop","itemscope","itemtype","itemid","itemref","results","security","unselectable","is"],a:["accesskey","charset","coords","download","href","hreflang","name","rel","rev","shape","target","type"],aria:["aria-activedescendant","aria-atomic","aria-autocomplete","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-dropeffect","aria-errormessage","aria-expanded","aria-flowto","aria-grabbed","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"],anchor:["download","href","hreflang","media","ping","rel","target","type","referrerpolicy"],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],area:["alt","coords","download","href","hreflang","media","referrerpolicy","rel","shape","target","ping"],base:["href","target"],blockquote:["cite"],button:["disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","type","value"],canvas:["height","width"],col:["span","width"],colgroup:["span"],data:["value"],details:["open"],del:["cite","datetime"],dialog:["open"],embed:["height","src","type","width"],fieldset:["disabled","form","name"],form:["acceptcharset","action","autocomplete","enctype","method","name","novalidate","target","rel"],html:["manifest"],iframe:["allow","allowfullscreen","allowtransparency","frameborder","height","loading","marginheight","marginwidth","mozallowfullscreen","name","referrerpolicy","sandbox","scrolling","seamless","src","srcdoc","webkitallowfullscreen","width"],img:["alt","crossorigin","decoding","height","ismap","loading","referrerpolicy","sizes","src","srcset","usemap","width"],ins:["cite","datetime"],input:["accept","alt","autocomplete","capture","checked","crossorigin","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","indeterminate","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","readonly","required","size","src","step","type","value","width"],keygen:["challenge","disabled","form","keytype","keyparams","name"],label:["form","for"],li:["value"],link:["as","crossorigin","href","hreflang","integrity","media","imagesrcset","imagesizes","referrerpolicy","rel","sizes","type","charset"],map:["name"],menu:["type"],media:["autoplay","controls","currenttime","defaultmuted","defaultplaybackrate","loop","mediagroup","muted","playsinline","preload","src","volume"],meta:["charset","content","http-equiv","name","media"],meter:["form","high","low","max","min","optimum","value"],quote:["cite"],object:["classid","data","form","height","name","type","usemap","width","wmode"],ol:["reversed","start","type"],optgroup:["disabled","label"],option:["disabled","label","selected","value"],output:["form","for","name"],param:["name","value"],progress:["max","value"],slot:["name"],script:["async","charset","crossorigin","defer","integrity","nomodule","nonce","referrerpolicy","src","type"],select:["autocomplete","disabled","form","multiple","name","required","size","value","onchange"],source:["height","media","sizes","src","srcset","type","width"],style:["media","nonce","scoped","type"],table:["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"],textarea:["autocomplete","cols","dirname","disabled","form","maxlength","minlength","name","placeholder","readonly","required","rows","value","wrap"],td:["align","colspan","headers","rowspan","scope","abbr","height","width","valign"],th:["align","colspan","headers","rowspan","scope","abbr"],time:["datetime"],track:["default","kind","label","src","srclang"],video:["autoplay","controls","crossorigin","disablepictureinpicture","disableremoteplayback","height","loop","muted","playsinline","poster","preload","src","width"],svg:["className","class","color","height","id","lang","max","media","method","min","name","style","target","type","width","role","tabindex","crossorigin","accent-height","accumulate","additive","alignment-baseline","allowReorder","alphabetic","amplitude","arabic-form","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baseline-shift","baseProfile","bbox","begin","bias","by","calcMode","cap-height","clip","clip-path","clipPathUnits","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominant-baseline","dur","dx","dy","edgeMode","elevation","enable-background","end","exponent","externalResourcesRequired","fill","fill-opacity","fill-rule","filter","filterRes","filterUnits","flood-color","flood-opacity","focusable","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","format","from","fx","fy","g1","g2","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","glyphRef","gradientTransform","gradientUnits","hanging","href","horiz-adv-x","horiz-origin-x","ideographic","image-rendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letter-spacing","lighting-color","limitingConeAngle","local","marker-end","markerHeight","marker-mid","marker-start","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overline-position","overline-thickness","paint-order","panose-1","path","pathLength","patternContentUnits","patternTransform","patternUnits","pointer-events","points","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","rendering-intent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","scale","seed","shape-rendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","string","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","surfaceScale","systemLanguage","tableValues","targetX","targetY","text-anchor","text-decoration","textLength","text-rendering","to","transform","u1","u2","underline-position","underline-thickness","unicode","unicode-bidi","unicode-range","units-per-em","v-alphabetic","values","vector-effect","version","vert-adv-y","vert-origin-x","vert-origin-y","v-hanging","v-ideographic","viewBox","viewTarget","visibility","v-mathematical","widths","word-spacing","writing-mode","x1","x2","x","xChannelSelector","x-height","xlink:actuate","xlink:arcrole","xlink:href","xlink:role","xlink:show","xlink:title","xlink:type","xml:base","xml:lang","xmlns","xmlns:xlink","xml:space","y1","y2","y","yChannelSelector","z","zoomAndPan"]};var Bc=t=>t.startsWith("aria")&&t.length>4&&t.charCodeAt(4)>=65&&t.charCodeAt(4)<=90?"aria-"+t.charAt(4).toLowerCase()+t.slice(5).replace(/([A-Z])/g,e=>"-"+e.toLowerCase()):t.startsWith("data")&&t.length>4&&t.charCodeAt(4)>=65&&t.charCodeAt(4)<=90?"data-"+t.charAt(4).toLowerCase()+t.slice(5).replace(/([A-Z])/g,e=>"-"+e.toLowerCase()):null,he=(t,e)=>e.startsWith("aria-")||e.startsWith("data-")||Bc(e)||Vr.default.includes(e)?!0:Object.prototype.hasOwnProperty.call(Vr,t)?Vr[t].includes(e):!1;var Be=(t,e)=>{let r=t.call("exec",e,t);if(r)return S(r)&&r.includes("{{")&&(r=t.call("replaceLiteralsWithObjectFields",r)),r},bs=(t,e)=>{let r=(t.preSrc||"")+(Be(t,e)||"");if(!r)return;try{return new URL(r),r}catch{}let{context:n}=t;if(!n.files&&!n.assets)return r;if(r.startsWith("/assets/")){let o=r.slice(8),s=n.assets&&(n.assets[r]||n.assets[o]);return s&&s.content?s.content.src:r}if(r.startsWith("/files/")){let o=r.slice(7),s=n.files&&(n.files[r]||n.files[o]);return s&&s.content?s.content.src:r}if(n.assets){let o=n.assets[r];if(o&&o.content)return o.content.src}if(n.files){let o=n.files[r];if(o&&o.content)return o.content.src}return r},xs={src:t=>bs(t,t.src),href:t=>Be(t,t.href),action:t=>Be(t,t.action),poster:t=>bs(t,t.poster),data:t=>Be(t,t.data)},_s=t=>{let e=t.tag||"div",r={};for(let n in xs)if(t[n]!==void 0&&he(e,n)){let o=xs[n](t);o!==void 0&&(r[n]=o)}return r};var Uc=1;function zt(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function Gc(t){return t.charAt(2).toLowerCase()+t.slice(3)}function Wc(t){return t.toLowerCase()}function Wr(t,e){let r={...t};for(let n in e){let o=r[n],s=e[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=Wr(o,s):r[n]=s}return r}function ot(t,e,r,n={},o){if(t==null||t===!1)return null;(typeof t=="string"||typeof t=="number")&&(t={text:t});let s=Object.create(null);s.key=r||t.key||`_${Uc++}`,s.parent=e||null,s.context=t.context||e?.context||n.context||{},s.context.__create||(s.context.__create=ot);let i=s.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:e?.__ref?.root||s,path:e?.__ref?.path?[...e.__ref.path,s.key]:[s.key]};if(r&&!t.extends&&!t.extend){let g=r.indexOf("_");if(g>0){let b=r.substring(0,g),m=s.context?.components;m&&(m[b]||m["smbls."+b])&&(t={extends:b,...t})}}pe(s,t,n);let c=new Set(["childProps","attr","style","scope","data"]),a=s.props&&typeof s.props=="object"?s.props:null;for(let g in t){if(g==="parent"||g==="node"||g==="__ref"||g==="extends"||g==="context"||g==="props")continue;let b=t[g],m=s[g],y=m&&b&&typeof m=="object"&&typeof b=="object"&&!Array.isArray(m)&&!Array.isArray(b)&&typeof m!="function"&&typeof b!="function";y&&g.charCodeAt(0)>=65&&g.charCodeAt(0)<=90?s[g]=Wr(m,b):y&&c.has(g)?s[g]={...m,...b}:s[g]=b}function l(g){for(let b in g){let m=g[b],y=s[b],x=y&&m&&typeof y=="object"&&typeof m=="object"&&!Array.isArray(y)&&!Array.isArray(m)&&typeof y!="function"&&typeof m!="function";x&&b.charCodeAt(0)>=65&&b.charCodeAt(0)<=90?s[b]=Wr(y,m):x&&c.has(b)?s[b]={...y,...m}:s[b]=m}}a&&l(a),t.props&&typeof t.props=="object"&&l(t.props),t.data!==void 0&&(s.data=t.data),t.classlist!==void 0&&(s.classlist=t.classlist),t.text!==void 0&&(s.text=t.text),t.html!==void 0&&(s.html=t.html);let f=s.scope&&typeof s.scope=="object"?s.scope:null,u=e?.scope,p=s.context&&typeof s.context.globalScope=="object"&&s.context.globalScope||null,h=u||p||null;if(t.scope!==void 0||f){let g={};f&&Object.assign(g,f),t.scope!==void 0&&Object.assign(g,t.scope),s.scope=Ye(g,h)}else h&&(s.scope=h);if(t.if!==void 0&&(s.if=t.if),Lr(s),zc(s,e,t),s.if!=null){let g;if(typeof s.if=="function")try{g=s.if(s,s.state,s.context)}catch(b){if(g=!1,i.__ifError=b,typeof console<"u"&&console.warn){let m=s.key||s.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${m} \u2014 treating as false:`,b?.message||b)}}else g=s.if;i.__if=!!g}if(i.__if)typeof t.if=="function"&&(i.__ifInitialized=!0);else return e&&(e[s.key]=s),typeof t.if=="function"&&zr(s,{if:t.if}),s;s.tag||(s.tag=Ht(s)),kt("Init",s,n);let d=s.node=Kt(s);if(!d)return s;kt("AttachNode",s,n),d.setAttribute&&s.key&&d.setAttribute("data-key",s.key),d.setAttribute&&s.context?.scopeSelector&&s.context.scopeSelector!==":root"&&s.context.key&&s.key===s.context.key&&d.setAttribute("data-smbls-app",s.context.key),s.id&&d.setAttribute&&(d.id=s.id),ks(s,n),zr(s,t),Hr(s),Cs(s),Zc(s);try{As(s,n)}catch(g){if(typeof console<"u"&&console.error){let b=s.__ref?.path?.join(".")||s.key||"<root>";console.error(`[smbls] createChildren failed at ${b}:`,g?.message||g,g?.stack?`
12
12
  `+g.stack.split(`
13
13
  `).slice(0,6).join(`
14
14
  `):"")}}if(Qr(s,e,o),e&&(e[s.key]=s,e.__ref?.__children&&(e.__ref.__children.includes(s.key)||e.__ref.__children.push(s.key))),typeof s.html=="function"&&s.node&&!s.node.innerHTML){let g=s.context?.designSystem;g&&Q(g);try{let b=s.html(s,s.state,s.context);b!=null&&typeof b!="function"&&(s.node.innerHTML=b)}catch{}finally{g&&z()}}if(kt("Create",s,n),kt("Complete",s,n),kt("Render",s,n),kt("RenderRouter",s,n),typeof s.onFrame=="function"){let g=s.onFrame,b=s.context?.designSystem,m=()=>{if(s.node){if(s.node.isConnected){b&&Q(b);try{g(s,s.state,s.context)}catch(y){console.error("[DOMQL] onFrame error:",y)}finally{b&&z()}}requestAnimationFrame(m)}};requestAnimationFrame(m)}return s}function zc(t,e,r){let n=!e,o=r.state&&typeof r.state=="object"&&!Array.isArray(r.state)&&Object.keys(r.state).length===0,s=n&&o&&t.context?.state,i=r.state!==void 0&&!s?r.state:t.state&&!G(t.state)?t.state:void 0;if(i==null){if(e?.state)t.state=e.state,vt(t,t.state);else if(t.context?.state){let c=t.context.state,a={...c},l=t.context?.polyglot;if(l?.translations){let f=c.lang||l.defaultLang||"en",u=l.translations[f];if(u&&typeof u=="object")for(let h in u)a[h]===void 0&&(a[h]=u[h]);let p=new Set(l.languages||[]);for(let h in l.translations)!p.has(h)&&a[h]===void 0&&(a[h]=l.translations[h])}t.state=G(a)?a:et(a),t.state.__element=t,t.state.root=t.state,vt(t,t.state)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),vt(t,t.state);return}if(typeof i=="string"){if(t.state=ws(i,e),t.state&&typeof t.state=="object"&&!G(t.state)){let c=e?.state?.root||e?.state||t.state;Object.defineProperty(t.state,"root",{value:c,enumerable:!1,configurable:!0,writable:!0})}vt(t,t.state);return}if(typeof i=="function"){let c=i(t,e?.state);t.state=et(c||{})}else t.state=et({...i});t.state.__element=t,e?.state?(t.state.parent=e.state,t.state.root=e.state.root||e.state):t.state.root=t.state,vt(t,t.state)}function Br(t,e){if(!e)return t;let r=e.split("/"),n=t;for(let o of r){if(n==null)return{};n=n[o]}return n??{}}function ws(t,e){if(!e)return{};if(t===".")return e.state||{};if(t.startsWith("../")){let o=t.slice(3);return o?Br(e.state,o):e.state??{}}if(t.startsWith("~/")){let o=e.state?.root||e.state,s=t.slice(2);return s?Br(o,s):o??{}}if(e.state?.[t]!==void 0)return e.state[t];let r=Br(e.state,t);if(r!=null&&Object.keys(r).length>0)return r;let n=e.context?.polyglot;if(n?.translations){let o=e.state?.root?.lang||n.defaultLang||"en",s=n.translations[o];if(s?.[t]!==void 0)return s[t];if(n.translations[t]!==void 0)return n.translations[t]}return{}}function Hc(t){let e=t.__ref,r=t.tag||"div",n=t.context?.designSystem,o=[],s=Object.keys(t);for(let i=0;i<s.length;i++){let c=s[i];if(typeof t[c]!="function"||J.has(c))continue;let a=c.charCodeAt(0);a>=65&&a<=90||zt(c)||X[c]||tt&&tt.has(c)||he(r,c)||o.push({prop:c,fn:t[c]})}for(let i=0;i<o.length;i++){let{prop:c,fn:a}=o[i];e.__exec[c]=a,Object.defineProperty(t,c,{get(){n&&Q(n);try{return a(t,t.state,t.context)}catch{return}finally{n&&z()}},set(l){delete e.__exec[c],Object.defineProperty(t,c,{value:l,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function zr(t,e){let r=t.__ref;if(Hc(t),typeof t.text=="function"){let o=t.text,s=F(()=>{if(!r.contentManaged)try{let i=o(t,t.state,t.context);t.node&&i!=null&&typeof i!="function"&&typeof i!="object"&&(typeof i=="string"&&i.includes("{{")&&(i=ve.call(t,i,t.state)),t.tag==="string"?t.node.nodeValue=i:t.node.textContent=i)}catch{}},{depth:r.path.length});r.__effects.push(s),r.__exec.text=o}else if(typeof t.text=="string"&&t.text.includes("{{")){let o=t.text,s=F(()=>{if(r.contentManaged)return;let i=ve.call(t,o,t.state);i!=null&&(t.text=i),t.node&&(t.tag==="string"?t.node.nodeValue=i??"":t.node.textContent=i??"")},{depth:r.path.length});r.__effects.push(s),r.__exec.text=o}for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o)&&typeof t[o]=="function"&&!J.has(o)&&!zt(o)&&!r.__exec[o]){if(X[o]){let s=t[o],i=o,c,a=F(()=>{let l=t.context?.designSystem;l&&Q(l);try{let f=s(t,t.state,t.context),u=X[i](f,t,t.state,t.context);if(u&&t.node){let p=Ss(u);(p===null||p!==c)&&(c=p,Wt(t.node,u))}else t.node&&(i==="show"||i==="hide")&&(c=void 0,t.node.style.display="")}finally{l&&z()}},{depth:r.path.length});r.__effects.push(a),r.__exec[o]=s}else if(tt&&tt.has(o)){let s=t[o],i=o,c,a=F(()=>{let l=t.context?.designSystem;l&&Q(l);try{let f=s(t,t.state,t.context);if(t.node)if(f!=null){let u=i+":"+String(f);u!==c&&(c=u,Wt(t.node,{[i]:f}))}else c=void 0,t.node.style[i]=""}finally{l&&z()}},{depth:r.path.length});r.__effects.push(a),r.__exec[o]=s}}if(typeof e.html=="function"){let o=e.html,s=F(()=>{let i=t.context?.designSystem;i&&Q(i);try{let c=o(t,t.state,t.context);t.node&&c!=null&&typeof c!="function"&&(t.node.innerHTML=c)}finally{i&&z()}},{depth:r.path.length});r.__effects.push(s),r.__exec.html=o}if(typeof e.value=="function"){let o=e.value,s=F(()=>{try{let i=o(t,t.state,t.context);if(!t.node||!("value"in t.node))return;let c=i==null?"":String(i);if(t.node.value===c)return;let a=typeof document<"u"&&document.activeElement===t.node,l=a&&typeof t.node.selectionStart=="number"?t.node.selectionStart:null,f=a&&typeof t.node.selectionEnd=="number"?t.node.selectionEnd:null;if(t.node.value=c,a&&l!=null&&f!=null)try{t.node.setSelectionRange(l,f)}catch{}}catch{}},{depth:r.path.length});r.__effects.push(s),r.__exec.value=o}if(typeof e.style=="function"){let o=e.style,s,i=F(()=>{let c=o(t,t.state,t.context),a=Ss(c);(a===null||a!==s)&&(s=a,Wt(t.node,c))},{depth:r.path.length});r.__effects.push(i),r.__exec.style=o}else if(t.style&&typeof t.style=="object")for(let o in t.style){let s=t.style[o];if(typeof s!="function")continue;let i,c=F(()=>{try{let a=s(t,t.state,t.context);if(t.node){let l=o+":"+String(a);l!==i&&(i=l,Wt(t.node,{[o]:a}))}}catch{}},{depth:r.path.length});r.__effects.push(c)}if(t.attr&&typeof t.attr=="object"){for(let o in t.attr)if(typeof t.attr[o]=="function"){let s=t.attr[o],i=o,c=F(()=>{try{let a=s(t,t.state,t.context);t.node?.setAttribute&&(a==null||a===!1?t.node.removeAttribute(i):typeof a!="function"&&typeof a!="object"&&t.node.setAttribute(i,a===!0?"":a))}catch{}},{depth:r.path.length});r.__effects.push(c)}}if(t.aria&&typeof t.aria=="object")for(let o in t.aria){let s=t.aria[o];if(typeof s!="function")continue;let i="aria-"+o.replace(/[A-Z]/g,a=>"-"+a.toLowerCase()),c=F(()=>{try{let a=s(t,t.state,t.context);if(!t.node?.setAttribute)return;a==null||a===!1?t.node.removeAttribute(i):typeof a!="function"&&typeof a!="object"&&t.node.setAttribute(i,a===!0?"":a)}catch{}},{depth:r.path.length});r.__effects.push(c)}if(t.data&&typeof t.data=="object")for(let o in t.data){let s=t.data[o];if(typeof s!="function")continue;let c="data-"+o.replace(/[A-Z]/g,l=>"-"+l.toLowerCase()),a=F(()=>{try{let l=s(t,t.state,t.context);if(!t.node?.setAttribute)return;l==null||l===!1?t.node.removeAttribute(c):typeof l!="function"&&typeof l!="object"&&t.node.setAttribute(c,l===!0?"":l)}catch{}},{depth:r.path.length});r.__effects.push(a)}let n=t.classlist&&typeof t.classlist=="object"&&!Array.isArray(t.classlist)?t.classlist:t.class&&typeof t.class=="object"&&!Array.isArray(t.class)?t.class:null;if(n)for(let o in n){let s=n[o];if(typeof s!="function")continue;let i=F(()=>{try{let c=s(t,t.state,t.context);if(!t.node?.classList)return;typeof c=="string"?t.node.classList.add(c):c?t.node.classList.add(o):t.node.classList.remove(o)}catch{}},{depth:r.path.length});r.__effects.push(i)}if(typeof e.if=="function"){let o=e.if,s=F(()=>{let i;try{i=o(t,t.state,t.context)}catch(a){if(i=!1,r.__ifError=a,typeof console<"u"&&console.warn){let l=t.key||t.tag||"?";console.warn(`[smbls] \`if:\` reactive effect threw on ${l} \u2014 treating as false:`,a?.message||a)}return}let c=r.__if;if(r.__if=!!i,c&&!r.__if&&t.node)t.node.remove();else if(!c&&r.__if)if(r.__ifInitialized){t.node||(t.node=Kt(t));let a=t.parent,l=a?.node;if(l&&t.node){let f=null,u=Object.keys(a),p=u.indexOf(t.key);for(let h=p+1;h<u.length;h++){let d=a[u[h]];if(d?.node?.parentNode===l){f=d.node;break}}f?l.insertBefore(t.node,f):l.appendChild(t.node)}else Qr(t,t.parent);Hr(t)}else{if(r.__ifInitialized=!0,t.tag||(t.tag=Ht(t)),kt("Init",t,{}),t.node||(t.node=Kt(t)),!t.node)return;kt("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id),ks(t,{});let a=e.if;delete e.if;try{zr(t,e)}finally{e.if=a}Hr(t),Cs(t),As(t,{}),Qr(t,t.parent)}},{depth:r.path.length});r.__effects.push(s)}for(let o in t){if(!Object.prototype.hasOwnProperty.call(t,o)||J.has(o)||typeof t[o]!="function")continue;let s=o.charCodeAt(0);if(s>=65&&s<=90||zt(o))continue;let i=t[o];r.__exec[o]=i;let c=t.tag||"div";if(he(c,o)&&!X[o]&&!(tt&&tt.has(o))){let a=o,l=F(()=>{try{let f=i(t,t.state,t.context);t.node?.setAttribute&&(f==null||f===!1?t.node.removeAttribute(a):typeof f!="function"&&typeof f!="object"&&(a==="src"&&"src"in t.node?t.node.src=f:t.node.setAttribute(a,f===!0?"":f)))}catch{}},{depth:r.path.length});r.__effects.push(l)}}Qc(t),Jc(t)}function Hr(t){let{node:e}=t;if(e){if(typeof t.text=="string"&&!t.text.includes("{{")?t.tag==="string"?e.nodeValue=t.text:e.textContent=t.text:typeof t.text=="number"&&(e.textContent=t.text),Yc(t),typeof t.html=="string"&&(e.innerHTML=t.html),t.value!=null&&typeof t.value!="function"&&"value"in e){let r=String(t.value);e.value!==r&&(e.value=r)}if(t.style&&typeof t.style=="object"&&Wt(e,t.style),t.attr&&typeof t.attr=="object")for(let r in t.attr){let n=t.attr[r];typeof n=="function"||typeof n=="object"||n==null||n===!1||e.setAttribute&&e.setAttribute(r,n===!0?"":n)}if(t.data&&typeof t.data=="object")for(let r in t.data){let n=t.data[r];typeof n=="function"||typeof n=="object"||n==null||n===!1||e.dataset&&(e.dataset[r]=n===!0?"":n)}if(t.classlist||t.class){let r=t.classlist||t.class;if(typeof r=="string")r.split(" ").forEach(n=>n&&e.classList.add(n));else if(typeof r=="object")for(let n in r){let o=typeof r[n]=="function"?r[n](t,t.state,t.context):r[n];o&&e.classList.add(typeof o=="string"?o:n)}}}}function Ss(t){if(t==null||typeof t!="object")return"s:"+String(t);try{return"o:"+JSON.stringify(t)}catch{return null}}function Wt(t,e){if(!t||!e||!t.style)return;let r=null;for(let n in e){let o=e[n];if(o!=null){if(n.charAt(0)==="&"&&typeof o=="object"){r||(r={}),r[n]=o;continue}try{let s=String(o),i=n.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),c=s.trim(),a=/\s*!important\s*$/.test(c),l=c.replace(/\s*!important\s*$/,"");t.style.setProperty(i,l,a?"important":"")}catch{}}}r&&qc(t,r)}var Kc=0;function qc(t,e){let r=`_ds${Kc++}`;t.classList.add(r);let n=t.ownerDocument,o=n.querySelector("style[data-smbls-scoped]");o||(o=n.createElement("style"),o.setAttribute("data-smbls-scoped",""),n.head.appendChild(o));let s="";for(let i in e){let c="."+r,a=i.replace(/&/g,c).split(",").map(f=>{let u=f.trim();return u.includes(c)?u:c+u}).join(", "),l=e[i];if(typeof l=="object"){let f="",u="";for(let p in l){let h=l[p];if(typeof h=="object"){let d=p.includes("&")?a.split(", ").map(b=>p.replace(/&/g,b)).join(", "):a.split(", ").map(b=>`${b} ${p}`).join(", "),g="";for(let b in h)g+=`${b.replace(/[A-Z]/g,m=>"-"+m.toLowerCase())}: ${h[b]};`;u+=`${d} { ${g} }