smbls 3.14.39 → 3.14.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/smbls.cjs +39 -39
- package/dist/smbls.embed.iife.js +15 -15
- package/dist/smbls.esm.js +21 -21
- package/dist/smbls.iife-string.js +1 -1
- package/dist/smbls.iife.js +39 -39
- package/package.json +2 -2
package/dist/smbls.embed.iife.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
"use strict";var SymbolsEmbed=(()=>{var Vt=Object.defineProperty;var xs=Object.getOwnPropertyDescriptor;var _s=Object.getOwnPropertyNames;var Ss=Object.prototype.hasOwnProperty;var w=(e,t)=>()=>(e&&(t=e(e=0)),t);var je=(e,t)=>{for(var n in t)Vt(e,n,{get:t[n],enumerable:!0})},ws=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of _s(t))!Ss.call(e,o)&&o!==n&&Vt(e,o,{get:()=>t[o],enumerable:!(r=xs(t,o))||r.enumerable});return e};var vs=e=>ws(Vt({},"__esModule",{value:!0}),e);var X,Oe,mt=w(()=>{"use strict";X=globalThis,Oe=X.document});var gt,en=w(()=>{"use strict";mt();gt=e=>typeof X<"u"&&(X.Node&&e instanceof X.Node||X.Window&&e instanceof X.Window||e===X||e===document)});var P,_,yt,C,T,be,qn,He=w(()=>{"use strict";P=e=>e===null?!1:typeof e=="object"&&e.constructor===Object,_=e=>typeof e=="string",yt=e=>typeof e=="number",C=e=>typeof e=="function",T=e=>Array.isArray(e),be=e=>e===null?!1:typeof e=="object",qn=e=>e===void 0});var Kn,tn=w(()=>{"use strict";bt();Kn=(e,t=[])=>e.reduce((n,r)=>nn(n,Ee(r,{exclude:t}),t),{})});function xt(e,t,n={}){let{bracketsLength:r=2}=n,o=r===3?"{{{":"{{";if(!e.includes(o))return e;let s=Es[r],i=t||this.state||{},a=this;return e.replace(s,(c,f,l,u)=>{let p=l.trim();if(u){let d=a?.context,h=d?.functions?.[u]||d?.utils?.[u]||d?.methods?.[u]||d?.snippets?.[u]||a?.[u];if(h&&typeof h=="function")try{return String(h.call(a,p)??"")}catch{return""}return""}if(f){let d=(f.match(/\.\.\//g)||[]).length,h=i;for(let b=0;b<d;b++){if(!h||!h.parent)return"";h=h.parent}if(p==="parent")return String(h.value??"");let m=qe(h,p);return String(m??"")}else{let d=qe(i,p);if(d!=null)return String(d);let h=a?.context?.polyglot;if(h?.translations){let m=i?.root?.lang||i?.lang||a?.context?.state?.lang||h.defaultLang||"en",b=h.translations[m];if(b){let g=qe(b,p);if(g!=null&&typeof g!="object")return String(g);for(let x in b){let S=b[x];if(S&&typeof S=="object"&&!Array.isArray(S)){let v=qe(S,p);if(v!=null&&typeof v!="object")return String(v)}}}let y=qe(h.translations,p);if(y!=null&&typeof y!="object")return String(y)}return""}})}var Es,qe,Qn=w(()=>{"use strict";Es={2:/{{\s*((?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}/g,3:/{{{(\s*(?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}}/g},qe=(e,t)=>t.split(".").reduce((n,r)=>n?.[r],e)});var $s,Ts,Ps,Jn,rn=w(()=>{"use strict";$s=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"]),Ts=new Set(["update","__element"]),Ps=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"]),Jn=new Set(["node","context","extends","__element","__ref",...Ps,...$s,...Ts])});var Xn,De,nn,Zn,Ee,bt=w(()=>{"use strict";mt();He();tn();en();rn();Xn=e=>e.charCodeAt(0)===95&&e.charCodeAt(1)===95,De=(e,t,n,r)=>{if(C(e))return t?typeof e.call!="function"?e:e.call(t,t,n||t.state,r||t.context):void 0;if(e!=null&&t?.context?.plugins&&(T(e)||P(e)&&!gt(e))){let o=t.context.plugins;for(let s of o)if(s.resolveHandler){let i=s.resolveHandler(e,t);if(typeof i=="function")return De(i,t,n,r)}}return e},nn=(e,t,n=Jn)=>Zn(e,t,n,null),Zn=(e,t,n,r)=>{if(e===t)return e;if(r){for(let s=0;s<r.length;s+=2)if(r[s]===e&&r[s+1]===t)return e}let o=n instanceof Set;for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s)||Xn(s)||s==="constructor"||s==="prototype"||(o?n.has(s):n.includes(s)))continue;let i=e[s],a=t[s];if(be(i)&&be(a)){let c=r||[];c.push(e,t),Zn(i,a,n,c),c.length-=2}else i===void 0&&(e[s]=a)}return e},Ee=(e,t={})=>{let{exclude:n=[],cleanUndefined:r=!1,cleanNull:o=!1,window:s,visited:i=new WeakMap,handleExtends:a=!1}=t,c=s||X||globalThis;if(!be(e)||gt(e))return e;if(i.has(e))return i.get(e);let l=T(e)?[]:{};i.set(e,l);let u=n instanceof Set?n:n.length>3?new Set(n):null;for(let p in e){if(!Object.prototype.hasOwnProperty.call(e,p)||Xn(p)||p==="__proto__"||(u?u.has(p):n.includes(p)))continue;let d=e[p];if(!(r&&d===void 0)&&!(o&&d===null)){if(gt(d)){l[p]=d;continue}if(a&&p==="extends"&&T(d)){l[p]=Kn(d,n);continue}if(C(d)){l[p]=d;continue}be(d)?l[p]=Ee(d,{...t,visited:i}):l[p]=d}}return l}});var Yn=w(()=>{"use strict"});var er,Rs,on,tr=w(()=>{"use strict";er="production",Rs=(e=er)=>e==="production",on=(e=er)=>!Rs(e)});var Ke,_t=w(()=>{"use strict";Ke=(e,t,...n)=>{let r=t?.context?.plugins;if(!r)return!1;let o=!1;for(let s of r)typeof s[e]=="function"&&(s[e](t,...n),o=!0);return o}});var nr=w(()=>{"use strict"});var rr=w(()=>{"use strict"});var Sa,or=w(()=>{"use strict";Sa=typeof navigator>"u"?!1:/Mobi/.test(navigator.userAgent)});var sr=w(()=>{"use strict"});var ir=w(()=>{"use strict"});var cr=w(()=>{"use strict"});var ar=w(()=>{"use strict"});var lr=w(()=>{"use strict"});var fr=w(()=>{"use strict"});var ur=w(()=>{"use strict"});var pr=w(()=>{"use strict"});var dr,sn=w(()=>{"use strict";dr={}});var gr={};je(gr,{setup:()=>js,supabaseAdapter:()=>mr});var hr,Is,js,cn,Ds,mr,yr=w(()=>{"use strict";hr=new Map,Is=(e,t,n)=>`${e}|${t}|${n?"off":"on"}`,js=async({url:e,key:t,projectId:n,createClient:r,auth:o,retry:s,adapter:i,...a})=>{let c=e||n&&`https://${n}.supabase.co`;if(!c||!t)throw new Error("@symbo.ls/fetch supabase: url (or projectId) and key are required");r||(r=(await import("@supabase/supabase-js")).createClient),o===!1&&(a.auth={autoRefreshToken:!1,persistSession:!1,detectSessionInUrl:!1});let f=Is(c,t,o===!1),l=hr.get(f);return l||(l=await r(c,t,a),l?.auth&&hr.set(f,l)),!l||!l.auth?null:mr(l)},cn=(e,t)=>{if(!t)return e;for(let n in t){let r=t[n];if(r===null)e=e.is(n,null);else if(Array.isArray(r))e=e.in(n,r);else if(typeof r=="object")for(let o in r)o==="gt"?e=e.gt(n,r[o]):o==="gte"?e=e.gte(n,r[o]):o==="lt"?e=e.lt(n,r[o]):o==="lte"?e=e.lte(n,r[o]):o==="neq"?e=e.neq(n,r[o]):o==="like"?e=e.like(n,r[o]):o==="ilike"?e=e.ilike(n,r[o]):o==="in"?e=e.in(n,r[o]):o==="is"?e=e.is(n,r[o]):o==="contains"?e=e.contains(n,r[o]):o==="containedBy"?e=e.containedBy(n,r[o]):o==="textSearch"&&(e=e.textSearch(n,r[o]));else e=e.eq(n,r)}return e},Ds=(e,{limit:t,offset:n,order:r,single:o}={})=>{if(r)if(Array.isArray(r))for(let s of r){let i=typeof s=="string"?s:s.by;e=e.order(i,{ascending:s.asc!==!1})}else{let s=typeof r=="string"?r:r.by;e=e.order(s,{ascending:r.asc!==!1})}return t&&(e=e.limit(t)),n&&(e=e.range(n,n+(t||20)-1)),o&&(e=e.single()),e},mr=e=>({name:"supabase",client:e,getSession:async()=>{let{data:t}=await e.auth.getSession();return t?.session||null},getUser:async()=>{let{data:t}=await e.auth.getUser();return t?.user||null},signIn:t=>t.provider?e.auth.signInWithOAuth({provider:t.provider}):t.token?e.auth.signInWithIdToken(t):e.auth.signInWithPassword(t),signUp:t=>e.auth.signUp(t),signOut:()=>e.auth.signOut(),onAuthStateChange:t=>{let{data:{subscription:n}}=e.auth.onAuthStateChange((r,o)=>t(r,o));return()=>n.unsubscribe()},select:async({from:t,schema:n,select:r,params:o,headers:s,...i})=>{let c=(n?e.schema(n):e).from(t).select(r||"*");if(c=cn(c,o),c=Ds(c,i),s)try{for(let f in s)c.setHeader?c=c.setHeader(f,s[f]):e.rest&&(e.rest.headers[f]=s[f])}catch(f){console.warn("[supabase] setHeader failed:",f.message)}return c},rpc:({from:t,params:n})=>e.rpc(t,n),insert:({from:t,schema:n,data:r,select:o})=>(n?e.schema(n):e).from(t).insert(r).select(o||"*"),update:({from:t,schema:n,data:r,params:o,select:s})=>{let a=(n?e.schema(n):e).from(t).update(r);return a=cn(a,o),a.select(s||"*")},upsert:({from:t,schema:n,data:r,select:o})=>(n?e.schema(n):e).from(t).upsert(r).select(o||"*"),delete:({from:t,params:n})=>{let r=e.from(t).delete();return r=cn(r,n),r},subscribe:({from:t,params:n,on:r},o)=>{let s=r||"*",i=e.channel(`db-${t}-${Date.now()}`).on("postgres_changes",{event:s,schema:"public",table:t,...n?.id?{filter:`id=eq.${n.id}`}:{}},a=>o(a.new,a.old,a)).subscribe();return()=>e.removeChannel(i)},upload:({bucket:t,path:n,file:r,options:o})=>e.storage.from(t).upload(n,r,o),download:({bucket:t,path:n})=>e.storage.from(t).download(n),getPublicUrl:({bucket:t,path:n})=>e.storage.from(t).getPublicUrl(n)})});var xr={};je(xr,{restAdapter:()=>br,setup:()=>Ms});var Fs,xe,Ms,br,_r=w(()=>{"use strict";Fs=(e,t,n)=>{let r=t&&!t.startsWith("/")?"/":"",o=new URL(`${e}${r}${t}`);if(n)for(let s in n){let i=n[s];i!=null&&o.searchParams.set(s,typeof i=="object"?JSON.stringify(i):i)}return o.toString()},xe=async(e,t)=>{let n=await globalThis.fetch(e,t),r=n.headers.get("content-type"),o=r&&r.includes("json")?await n.json():await n.text();return{data:o,error:n.ok?null:o?.message||o?.error||n.statusText,status:n.status}},Ms=async({url:e,headers:t,auth:n,fetchOptions:r})=>{if(!e)throw new Error("@symbo.ls/fetch rest: url is required");return br(e,t,n,r)},br=(e,t={},n,r={})=>{let o=n?.token||null,s=l=>{let u={...t,...l};return o&&(u.Authorization=`Bearer ${o}`),u},i=l=>({...s(l),"Content-Type":"application/json"}),a=l=>({...r,...l}),c=(l,u)=>{let p=u||e;if(l&&(l.startsWith("http://")||l.startsWith("https://")))return l;let d=l&&!l.startsWith("/")?"/":"";return`${p}${d}${l||""}`};return{name:"rest",setToken:l=>{o=l},getSession:async()=>{if(!n?.sessionUrl)return o?{token:o}:null;let l=await xe(c(n.sessionUrl,n.baseUrl),a({headers:s()}));return l.error?null:l.data},signIn:async l=>{if(!n?.signInUrl)throw new Error("rest: auth.signInUrl not configured");let u=await xe(c(n.signInUrl,n.baseUrl),a({method:"POST",headers:i(),body:JSON.stringify(l)}));return u.data?.token&&(o=u.data.token),u},signOut:async()=>(n?.signOutUrl&&await xe(c(n.signOutUrl,n.baseUrl),a({method:"POST",headers:s()})),o=null,{error:null}),select:({from:l,params:u,select:p,limit:d,offset:h,order:m,single:b,headers:y,baseUrl:g})=>{let x={...u};return p&&(x.select=p),d&&(x.limit=d),h&&(x.offset=h),b&&(x.single=!0),m&&(typeof m=="string"?x.order=m:Array.isArray(m)?x.order=m.map(S=>`${S.by}:${S.asc===!1?"desc":"asc"}`).join(","):m.by&&(x.order=`${m.by}:${m.asc===!1?"desc":"asc"}`)),xe(Fs(g||e,l||"",x),a({headers:s(y)}))},rpc:({from:l,params:u,headers:p,baseUrl:d})=>xe(c(`rpc/${l}`,d),a({method:"POST",headers:i(p),body:JSON.stringify(u)})),insert:({from:l,data:u,headers:p,baseUrl:d})=>xe(c(l,d),a({method:"POST",headers:i(p),body:JSON.stringify(u)})),update:({from:l,data:u,params:p,method:d,headers:h,baseUrl:m})=>{let b=p?.id||u?.id,y=b?`${l}/${b}`:l;return xe(c(y,m),a({method:d||"PATCH",headers:i(h),body:JSON.stringify(u)}))},delete:({from:l,params:u,headers:p,baseUrl:d})=>{let h=u?.id,m=h?`${l}/${h}`:l;return xe(c(m,d),a({method:"DELETE",headers:s(p)}))}}}});var wr={};je(wr,{localAdapter:()=>Sr,setup:()=>Ls});var an,Ns,Ls,Sr,vr=w(()=>{"use strict";an=(e,t)=>{if(!t)return!0;for(let n in t){let r=t[n];if(r===null){if(e[n]!==null&&e[n]!==void 0)return!1}else if(Array.isArray(r)){if(!r.includes(e[n]))return!1}else if(typeof r=="object"){for(let o in r)if(o==="gt"&&!(e[n]>r[o])||o==="gte"&&!(e[n]>=r[o])||o==="lt"&&!(e[n]<r[o])||o==="lte"&&!(e[n]<=r[o])||o==="neq"&&e[n]===r[o]||o==="like"&&!String(e[n]).includes(r[o]))return!1}else if(e[n]!==r)return!1}return!0},Ns=(e,{order:t,limit:n,offset:r,single:o})=>{let s=[...e];if(t){let i=typeof t=="string"?t:t.by,a=t.asc!==!1;s.sort((c,f)=>c[i]<f[i]?a?-1:1:c[i]>f[i]?a?1:-1:0)}return r&&(s=s.slice(r)),n&&(s=s.slice(0,n)),o?{data:s[0]||null,error:null}:{data:s,error:null}},Ls=async({data:e,...t})=>Sr(e,t),Sr=(e={},t={})=>{let n={},r={},o=t.persist!==!1&&typeof localStorage<"u",s=t.prefix||"smbls_db_",i=l=>{if(!n[l])if(o)try{let u=localStorage.getItem(s+l);n[l]=u?JSON.parse(u):e[l]||[]}catch{n[l]=e[l]||[]}else n[l]=e[l]||[];return n[l]},a=l=>{if(o)try{localStorage.setItem(s+l,JSON.stringify(n[l]))}catch{}},c=(l,u,p,d)=>{let h=r[l];if(h)for(let m of h)m(p,d,{event:u,table:l})},f=Date.now();return{name:"local",store:n,select:async({from:l,params:u,...p})=>{let h=i(l).filter(m=>an(m,u));return Ns(h,p)},insert:async({from:l,data:u})=>{let p=i(l),h=(Array.isArray(u)?u:[u]).map(m=>{let b={id:m.id||++f,...m};return p.push(b),b});a(l);for(let m of h)c(l,"INSERT",m,null);return{data:Array.isArray(u)?h:h[0],error:null}},update:async({from:l,data:u,params:p})=>{let d=i(l),h=[];for(let m=0;m<d.length;m++)if(an(d[m],p)){let b={...d[m]};Object.assign(d[m],u),h.push(d[m]),c(l,"UPDATE",d[m],b)}return a(l),{data:h,error:null}},delete:async({from:l,params:u})=>{let p=i(l),d=[];for(let h=p.length-1;h>=0;h--)an(p[h],u)&&(d.push(p[h]),p.splice(h,1),c(l,"DELETE",null,d[d.length-1]));return a(l),{data:d,error:null}},subscribe:({from:l,on:u},p)=>{r[l]||(r[l]=[]);let d=(h,m,b)=>{u&&u!=="*"&&u!==b.event||p(h,m,b)};return r[l].push(d),()=>{let h=r[l].indexOf(d);h>-1&&r[l].splice(h,1)}}}}});var tt={};je(tt,{createAdapter:()=>Us,default:()=>Ys,executeFetch:()=>dn,fetchPlugin:()=>Zs,initAdapterAuth:()=>Ct,parseDuration:()=>Je,queryClient:()=>Xs,registerAdapter:()=>Bs,resolveDb:()=>Er});var Vs,St,Or,Bs,Us,Er,Je,H,$r,Qe,Ws,et,Xe,Ze,wt,un,vt,Gs,Cr,ln,Tr,Pr,Fe,kr,zs,Ar,Hs,kt,Rr,Ct,pn,te,ce,Ye,$e,ue,_e,qs,Ks,Qs,fn,Js,dn,Xs,Zs,Ys,nt=w(()=>{"use strict";I();Vs=["select","rpc","insert","update","delete","subscribe"],St=Symbol.for("@symbo.ls/fetch:BUILTIN_ADAPTERS"),Or=(()=>{if(typeof globalThis<"u"&&globalThis[St])return globalThis[St];let e={supabase:()=>Promise.resolve().then(()=>(yr(),gr)),rest:()=>Promise.resolve().then(()=>(_r(),xr)),local:()=>Promise.resolve().then(()=>(vr(),wr))};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,St,{value:e,writable:!1,configurable:!1,enumerable:!1}),globalThis[St]}catch{}return e})(),Bs=(e,t)=>{Or[e]=t},Us=e=>{let t={};for(let n of Vs)e[n]&&(t[n]=e[n]);return t.name=e.name||"custom",t},Er=async e=>{if(!e)return null;if(typeof e.select=="function")return e;let{adapter:t,...n}=e,r=typeof t=="string"?t:typeof e=="string"?e:null;if(!r)return null;let o=Or[r];if(!o)throw new Error(`Unknown db adapter: "${r}". Use registerAdapter() for adapters with optional deps.`);return(await o()).setup(n)},Je=e=>{if(!e)return 0;if(typeof e=="number")return e;let t=e.match(/^(\d+)(ms|s|m|h)$/);if(!t)return 0;let n=parseInt(t[1]),r=t[2];return r==="ms"?n:r==="s"?n*1e3:r==="m"?n*6e4:r==="h"?n*36e5:0},H=new Map,$r=new Map,Qe=new Map,Ws=(e,t)=>{if(e.cache?.key)return e.cache.key;let n=Hs(e.params),r=`${e.from}:${e.method}:${JSON.stringify(n||"")}`;return t?`${r}:${t}`:r},et=e=>H.get(e)||null,Xe=(e,t,n)=>{let r=H.get(e),o={data:t,error:n,time:Date.now(),stale:!1};H.set(e,o);let s=$r.get(e);if(s)for(let i of s)C(i)&&i(o);return o},Ze=e=>{if(e){let t=H.get(e);t&&(t.stale=!0);return}for(let[,t]of H)t.stale=!0},wt=e=>{if(e){H.delete(e);return}H.clear()},un=e=>!e&&e!==!1?{staleTime:6e4,gcTime:3e5}:e===!1?null:e===!0?{staleTime:6e4,gcTime:3e5}:typeof e=="number"?{staleTime:e,gcTime:Math.max(e*5,3e5)}:_(e)?{staleTime:Je(e),gcTime:3e5}:{staleTime:Je(e.stale||e.staleTime)||6e4,gcTime:Je(e.gc||e.gcTime||e.expire)||3e5,key:e.key},vt=null,Gs=()=>{vt||(vt=setInterval(()=>{let e=Date.now();for(let[t,n]of H){let r=$r.get(t);!(r&&r.size>0)&&e-n.time>(n.gcTime||3e5)&&H.delete(t)}},3e4),vt.unref&&vt.unref())};Gs();Cr=3,ln=e=>Math.min(1e3*2**e,3e4),Tr=e=>{let t=e.retry;return t===!1?{count:0}:t===!0||t===void 0?{count:Cr,delay:ln}:typeof t=="number"?{count:t,delay:ln}:{count:t.count??Cr,delay:C(t.delay)?t.delay:typeof t.delay=="number"?()=>t.delay:ln}},Pr=async(e,t)=>{let{count:n,delay:r}=t,o;for(let s=0;s<=n;s++)try{let i=await e();if(i?.error){if(o=i.error,s<n){let a=C(r)?r(s,o):r;await new Promise(c=>setTimeout(c,a));continue}return i}return i}catch(i){if(o=i,s<n){let a=C(r)?r(s,i):r;await new Promise(c=>setTimeout(c,a));continue}throw i}return{data:null,error:o}},Fe={focus:new Set,online:new Set},kr=!1,zs=()=>{if(kr||typeof window>"u")return;kr=!0;let e=()=>{for(let n of Fe.focus)n()},t=()=>{for(let n of Fe.online)n()};window.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&e()}),window.addEventListener("focus",e),window.addEventListener("online",t)},Ar=(e,t)=>{let n=t.__ref;if(e===!0)return{from:n.__state||t.key,method:"select",query:!0,on:"create"};if(_(e))return{from:e,method:"select",query:!0,on:"create"};if(P(e)){let r={...e};return r.from=r.from||n.__state||t.key,r.method=r.method||"select",r.on=r.on||"create",r.query===void 0&&(r.query=!0),r}return null},Hs=e=>(!e||C(e),e),kt=(e,t)=>{let n=e?.state?.root||t?.state?.root;if(n?.lang)return n.lang},Rr=(e,t,n)=>{let r;if(!e)r=void 0;else if(C(e))r=e(t,t.state);else{r={};for(let o in e){let s=e[o];r[o]=C(s)?s(t,t.state):s}}return r},Ct=async(e,t)=>{if(!e||e.__authInitialized||(e.__authInitialized=!0,!e.getSession))return;let n=(r,o)=>{let s=t.state?.root;s?.update&&s.update({auth:{user:r,session:o,loading:!1}})};try{let r=await e.getSession();n(r?.user||null,r)}catch(r){console.warn("[fetch] Failed to restore auth session:",r.message)}e.onAuthStateChange&&e.onAuthStateChange((r,o)=>{n(o?.user||null,o)})},pn=async(e,t)=>{if(C(e.select))return e.auth!==!1&&await Ct(e,t),e;if(e.__resolved)return e.auth!==!1&&await Ct(e.__resolved,t),e.__resolved;if(e.__resolving)return e.__resolving;e.__resolving=Er(e);let n=await e.__resolving;return delete e.__resolving,n?(n.auth=e.auth,n.url=e.url,n.key=e.key,e.__resolved=n,t.fetch=n,e.auth!==!1&&await Ct(n,t),n):null},te=(e,t,...n)=>{let r=C(e[t])?e[t]:null;r&&r.call(e,...n,e,e.state,e.context)},ce=(e,t,n,...r)=>{let o=e&&C(e[n])?e[n]:null;o&&o.call(t,...r,t,t.state,t.context)},Ye=e=>{let t={},n=e.node;if(!n)return t;if(n.tagName==="FORM"){let o=new FormData(n);for(let[s,i]of o.entries())t[s]=i;return t}let r=n.querySelectorAll("input, textarea, select");for(let o=0;o<r.length;o++){let s=r[o],i=s.name||s.getAttribute("name");i&&(s.type==="checkbox"?t[i]=s.checked:s.type==="file"?t[i]=s.files:t[i]=s.value)}return t},$e=(e,t,n,r={})=>{let o=n&&n.startsWith("~/"),s=o&&e.state?.root||e.state;if(s?.update)if(o){let i=n.slice(2);t&&typeof t=="object"&&!Array.isArray(t)&&i in t?s.update(t,{preventFetch:!0,...r}):s.update({[i]:t},{preventFetch:!0,...r})}else{let i=n?{[n]:t}:t;s.update(i,{preventFetch:!0,...r})}},ue=(e,t)=>{let n=e?.__ref;n&&(n.__fetchStatus=t,n.__fetching=t.isFetching,n.__fetchError=t.error)},_e=async(e,t,n,r={})=>{let o=n?.fetch;if(!o||!t||!t.__ref||e.enabled===!1||C(e.enabled)&&!e.enabled(t,t.state)||e.skip===!0||C(e.skip)&&e.skip(t,t.state))return;let s=await pn(o,n);if(!s||!t.__ref)return;let i=t.__ref,{from:a,method:c,query:f,params:l,cache:u,transform:p,single:d,auth:h,fields:m,as:b,limit:y,offset:g,order:x,headers:S,baseUrl:v,page:j,cursor:G,getNextPageParam:B,getPreviousPageParam:V,infinite:D,placeholderData:L,initialData:Ie,select:le,keepPreviousData:he}=e,oe=_(le)?le:void 0;if(f&&C(t.getQuery)){let $=t.getQuery(s.name||"paths");$&&(oe=$.select||$.length&&$.join(",")||oe)}let fe=Rr(l,t,n),se=un(u),ft=Tr(e),Mt=kt(t,n),ys=Mt?`:${Mt}`:"",F=se?u?.key||`${a}:${c}:${JSON.stringify(fe||"")}${D?":infinite":""}${j?":p"+JSON.stringify(j):""}${ys}`:null;if(!i.__fetchInitialized&&F&&(i.__fetchInitialized=!0,Ie!==void 0)){let $=C(Ie)?Ie():Ie;Xe(F,$,null)}if((c==="select"||c==="rpc")&&F&&se){let $=et(F);if($&&!$.error){let E=Date.now()-$.time,R=$.stale||E>(se.staleTime||0),A=$.data;if(C(le)&&(A=le(A,t,t.state)),p&&(A=p(A,t,t.state)),$e(t,A,b),!R){ue(t,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"});return}}else if(L!==void 0){let E=C(L)?L(t,t.state):L;E!==void 0&&$e(t,E,b)}}if(F&&Qe.has(F)&&!r.force){let $=Qe.get(F);try{let E=await Promise.race([$,new Promise((R,A)=>setTimeout(()=>A("DEDUP_TIMEOUT"),15e3))]);if(E?.data!==void 0){let R=E.data;C(le)&&(R=le(R,t,t.state)),p&&(R=p(R,t,t.state)),$e(t,R,b),te(t,"onFetchComplete",R),ce(e,t,"onFetchComplete",R)}}catch{}return}let bs=!et(F)?.data;ue(t,{isFetching:!0,isLoading:bs,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),te(t,"onFetchStart"),ce(e,t,"onFetchStart");let me=n?.analyze?.emitNetwork,Nt=me?typeof performance<"u"?performance.now():Date.now():0;me&&me({phase:"start",mode:"query",from:a,method:c,cacheKey:F,lang:Mt});let Un=Pr(async()=>{if(h!==!1&&s.auth!==!1&&s.getSession){let A=await s.getSession();if(h===!0&&!A){let z={message:"Not authenticated"};return ue(t,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:z,status:"error",fetchStatus:"idle"}),te(t,"onFetchError",z),ce(e,t,"onFetchError",z),{data:null,error:z}}}let $=s[c];if(!C($))return{data:null,error:{message:`Method "${c}" not found on adapter`}};let E={from:a,select:oe,params:fe,single:d,limit:y,offset:g,order:x,headers:S,baseUrl:v},R=kt(t,n);if(R&&(E.headers={...E.headers,"Accept-Language":R}),j!==void 0){if(P(j))j.offset!==void 0&&(E.offset=j.offset),j.limit!==void 0&&(E.limit=j.limit),j.cursor!==void 0&&(E.params={...E.params,cursor:j.cursor});else if(typeof j=="number"){let A=e.pageSize||y||20;E.offset=(j-1)*A,E.limit=A}}if(G!==void 0&&(E.params={...E.params,cursor:G}),c==="insert"||c==="update"||c==="upsert"){let A;if(m===!0||e.on==="submit")A=Ye(t);else if(T(m)){let z=Ye(t);A={};for(let Lt of m)A[Lt]=z[Lt]}else t.state?.parse?A=t.state.parse():P(t.state)&&(A={...t.state});p&&(A=p(A,t,t.state)),E.data=A}if(c==="rpc"){let A=fe;if(e.on==="submit"){let z=Ye(t);A=e.transformParams?e.transformParams(z,t,t.state):z}E.params=A}if(c==="subscribe"){let A=s.subscribe({from:a,params:fe,on:e.subscribeOn},(z,Lt,Lc)=>{$e(t,z,b),te(t,"onFetchComplete",z),ce(e,t,"onFetchComplete",z)});return i.__unsubscribe=A,{data:null,error:null,subscribed:!0}}return $(E)},ft);F&&Qe.set(F,Un);try{let $=await Un;if($?.subscribed)return;let{data:E,error:R}=$||{};if(R){F&&Xe(F,null,R),ue(t,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:R,status:"error",fetchStatus:"idle"}),te(t,"onFetchError",R),ce(e,t,"onFetchError",R),me&&me({phase:"error",mode:"query",from:a,method:c,cacheKey:F,error:R.message||R,durationMs:(typeof performance<"u"?performance.now():Date.now())-Nt});return}if(E!==void 0){if((c==="select"||c==="rpc")&&F){let z=Xe(F,E,null);z.gcTime=se?.gcTime||3e5}let A=E;D&&T(E)&&(i.__pages||(i.__pages=[]),r.direction==="previous"?i.__pages.unshift(E):i.__pages.push(E),A=i.__pages.flat(),B&&(i.__nextPageParam=B(E,i.__pages),i.__hasNextPage=i.__nextPageParam!=null),V&&(i.__prevPageParam=V(E,i.__pages),i.__hasPreviousPage=i.__prevPageParam!=null)),C(le)&&(A=le(A,t,t.state)),p&&(A=p(A,t,t.state)),(!he||A!==void 0)&&$e(t,A,b),ue(t,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),te(t,"onFetchComplete",A),ce(e,t,"onFetchComplete",A),me&&me({phase:"success",mode:"query",ok:!0,from:a,method:c,cacheKey:F,durationMs:(typeof performance<"u"?performance.now():Date.now())-Nt})}}catch($){ue(t,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:$,status:"error",fetchStatus:"idle"}),te(t,"onFetchError",$),ce(e,t,"onFetchError",$),me&&me({phase:"error",mode:"query",from:a,method:c,cacheKey:F,error:$.message||String($),durationMs:(typeof performance<"u"?performance.now():Date.now())-Nt})}finally{F&&Qe.delete(F)}},qs=(e,t,n)=>{let r=e.on,o=t.__ref;o.__fetchListeners||(o.__fetchListeners=[]);let s=e.__runner||_e;if(r==="submit"){let i=c=>{c.preventDefault(),s(e,t,n)},a=t.node;a&&(a.addEventListener("submit",i),o.__fetchListeners.push(()=>a.removeEventListener("submit",i)))}else if(r==="click"){let i=()=>s(e,t,n),a=t.node;a&&(a.addEventListener("click",i),o.__fetchListeners.push(()=>a.removeEventListener("click",i)))}else r==="stateChange"&&(o.__fetchOnStateChange=()=>s(e,t,n))},Ks=(e,t,n)=>{let r=t.__ref;r.__fetchCleanups||(r.__fetchCleanups=[]),zs();let o=e.refetchInterval;if(o){let s=typeof o=="number"?o:Je(o);if(s>0){let i=setInterval(()=>{(e.refetchIntervalInBackground||typeof document>"u"||document.visibilityState==="visible")&&_e(e,t,n,{force:!0})},s);r.__fetchCleanups.push(()=>clearInterval(i))}}if(e.refetchOnWindowFocus!==!1){let s=()=>{let i=kt(t,n),a=Ws(e,i),c=et(a),f=un(e.cache);(!c||c.stale||Date.now()-c.time>(f?.staleTime||0))&&_e(e,t,n,{force:!0})};Fe.focus.add(s),r.__fetchCleanups.push(()=>Fe.focus.delete(s))}if(e.refetchOnReconnect!==!1){let s=()=>_e(e,t,n,{force:!0});Fe.online.add(s),r.__fetchCleanups.push(()=>Fe.online.delete(s))}},Qs=(e,t,n)=>{if(!t.optimistic)return null;let r=e.__ref,o=t.as,s=e.state?.parse?e.state.parse():P(e.state)?{...e.state}:e.state;r.__optimisticSnapshot=s;let i=C(t.optimistic)?t.optimistic(n,s,e):t.optimistic;return i!==void 0&&$e(e,i,o),s},fn=(e,t)=>{let n=e.__ref,r=n.__optimisticSnapshot;r!==void 0&&($e(e,r,t.as),delete n.__optimisticSnapshot)},Js=async(e,t,n)=>{let r=n?.fetch;if(!r)return;let o=await pn(r,n);if(!o)return;let s=t.__ref,{method:i,from:a,fields:c,transform:f,as:l,on:u,auth:p,headers:d,baseUrl:h,invalidates:m,optimistic:b,onMutate:y,onSuccess:g,onError:x,onSettled:S}=e,v;if(c===!0||u==="submit")v=Ye(t);else if(T(c)){let V=Ye(t);v={};for(let D of c)v[D]=V[D]}else t.state?.parse?v=t.state.parse():P(t.state)&&(v={...t.state});f&&(v=f(v,t,t.state)),C(y)&&y(v,t,t.state);let j=b?Qs(t,e,v):null;s.__fetching=!0,ue(t,{isFetching:!0,isLoading:!1,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),te(t,"onFetchStart"),ce(e,t,"onFetchStart");let G=n?.analyze?.emitNetwork,B=G?typeof performance<"u"?performance.now():Date.now():0;G&&G({phase:"start",mode:"mutation",from:a,method:i});try{if(p!==!1&&o.auth!==!1&&o.getSession){let fe=await o.getSession();if(p===!0&&!fe){j!==void 0&&fn(t,e);let se={message:"Not authenticated"};te(t,"onFetchError",se),ce(e,t,"onFetchError",se);return}}let V=o[i];if(!C(V))return;let D={from:a,data:v,headers:d,baseUrl:h};e.params&&(D.params=Rr(e.params,t,n));let L=kt(t,n);L&&(D.headers={...D.headers,"Accept-Language":L});let Ie=Tr(e),le=await Pr(()=>V(D),Ie),{data:he,error:oe}=le||{};if(oe){j!==void 0&&fn(t,e),ue(t,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:oe,status:"error",fetchStatus:"idle"}),te(t,"onFetchError",oe),C(x)&&x(oe,v,t),C(S)&&S(null,oe,v,t),G&&G({phase:"error",mode:"mutation",from:a,method:i,error:oe.message||String(oe),durationMs:(typeof performance<"u"?performance.now():Date.now())-B});return}if(delete s.__optimisticSnapshot,he!==void 0){let fe=l?{[l]:he}:he;t.state?.update&&t.state.update(fe,{preventFetch:!0})}if(ue(t,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),te(t,"onFetchComplete",he),ce(e,t,"onFetchComplete",he),C(g)&&g(he,v,t),C(S)&&S(he,null,v,t),G&&G({phase:"success",mode:"mutation",ok:!0,from:a,method:i,durationMs:(typeof performance<"u"?performance.now():Date.now())-B}),m){let fe=T(m)?m:[m];for(let se of fe)if(se===!0||se==="*")for(let[ft]of H)ft.startsWith(a+":")&&Ze(ft);else Ze(se)}}catch(V){j!==void 0&&fn(t,e),ue(t,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:V,status:"error",fetchStatus:"idle"}),te(t,"onFetchError",V),ce(e,t,"onFetchError",V),C(x)&&x(V,v,t),C(S)&&S(null,V,v,t),G&&G({phase:"error",mode:"mutation",from:a,method:i,error:V.message||String(V),durationMs:(typeof performance<"u"?performance.now():Date.now())-B})}finally{s.__fetching=!1}},dn=(e,t,n,r)=>{if(!e||!r?.fetch)return;let s=De(e,t);if(!s)return;let i=T(s)?s.map(c=>Ar(De(c,t),t)).filter(Boolean):[Ar(s,t)].filter(Boolean);for(let c of i){let f=c.method==="insert"||c.method==="update"||c.method==="upsert"||c.method==="delete",l=f?Js:_e;c.on==="create"?l(c,t,r):Promise.resolve().then(()=>{qs({...c,__runner:l},t,r)}),!f&&c.on==="create"&&(c.refetchInterval||c.refetchOnWindowFocus!==!1||c.refetchOnReconnect!==!1)&&Ks(c,t,r)}let a=t.__ref;a.refetch=c=>{for(let f of i)_e(f,t,r,{force:!0,...c})},a.fetchNextPage=()=>{let c=i[0];if(!c||!c.infinite)return;let f=a.__nextPageParam;if(f==null)return;let l={...c,cursor:f};_e(l,t,r,{direction:"next",force:!0})},a.fetchPreviousPage=()=>{let c=i[0];if(!c||!c.infinite)return;let f=a.__prevPageParam;if(f==null)return;let l={...c,cursor:f};_e(l,t,r,{direction:"previous",force:!0})}},Xs={invalidateQueries:e=>{if(!e){Ze();return}if(_(e))for(let[t]of H)(t.startsWith(e)||t.includes(e))&&Ze(t);else if(T(e)){let t=e.join(":");for(let[n]of H)n.includes(t)&&Ze(n)}},removeQueries:e=>{if(!e){wt();return}if(_(e))for(let[t]of H)(t.startsWith(e)||t.includes(e))&&wt(t)},getQueryData:e=>et(e)?.data??void 0,setQueryData:(e,t)=>{let n=et(e),r=C(t)?t(n?.data):t;Xe(e,r,null)},prefetchQuery:async(e,t)=>{let n=t?.fetch;if(!n)return;let r=await pn(n,t);if(!r)return;let o=e.cache?.key||`${e.from}:${e.method||"select"}:${JSON.stringify(e.params||"")}`,s=r[e.method||"select"];if(!C(s))return;let i=await s({from:e.from,params:e.params,limit:e.limit,offset:e.offset,order:e.order,single:e.single});if(i?.data!==void 0&&!i?.error){let a=Xe(o,i.data,null);a.gcTime=un(e.cache)?.gcTime||3e5}return i},getCache:()=>H,clear:()=>wt(),dropNonLang:e=>{if(!e)return;let t=`:${e}`;for(let[n]of H)n.match(/:([a-z]{2,3})$/i)&&(n.endsWith(t)||wt(n))}},Zs={name:"fetch",create(e){let t=e.fetch;t&&(e.parent||Qe.clear(),dn(t,e,e.state,e.context))}},Ys=dn});function Dr(e){let t=this,{__ref:n}=t,r=[].concat(e),o=n.root[r[0]];if(!r||!r.length)return console.log(r,"on",t.key,"is undefined");for(;o.key===r[0]&&(r.shift(),!!r.length);)if(o=o[r[0]],!o)return;return o}function Fr(){return this.getRef("__children").map(t=>this[t])}function Mr(){return this.getRef().path}function Nr(e){let t=null,n=r=>r.__element&&r.root?.isRootState;if(!this)t=Ir();else if(n(this))t=this.root;else if(this.__ref&&this.__ref.path){let r=this.state&&n(this.state),o=C(this.state)&&this.parent.state&&n(this.parent.state);(r||o)&&(t=this.state.root||this.parent.state.root)}return t||(t=Ir()),e?t?.[e]:t}function Lr(e){let t=this.getRootState()?.__element;return t&&Object.keys(t).length>0&&e?t[e]:t}function Vr(e){return this.getRoot("data")&&Object.keys(this.getRoot("data")).length>0&&e?this.getRoot("data")[e]:this.getRoot("data")}function Br(e){let t=this.getRoot()?.context;return e?t[e]:t}function Ur(e){let t=this.context;return e?t[e]:t}function mn(...e){if(Me!=="test"&&Me!=="development")return;let t=this,{__ref:n}=t;return console.groupCollapsed(t.key),e.length?e.forEach(r=>console.log(`%c${r}:
|
|
2
|
-
`,"font-weight: bold",
|
|
3
|
-
${
|
|
4
|
-
${
|
|
5
|
-
`):""},
|
|
6
|
-
${
|
|
7
|
-
}`,
|
|
8
|
-
`+
|
|
9
|
-
`):"";return`SELECT ${
|
|
10
|
-
FROM ${a}${f}`},ii=e=>{let t=[],n=(r,o)=>{for(let s in r){let i=o?`${o}/${s}`:s;r[s]===!0?t.push(i):n(r[s],i)}};return n(e,""),t},ci=e=>{let t=r=>{let o=[];for(let s in r)r[s]===!0?o.push(s):o.push(`${s}(${t(r[s])})`);return o.join(", ")},n=Object.keys(e);return n.length===1&&e[n[0]]!==!0?{from:n[0],select:t(e[n[0]])}:{from:null,select:t(e)}},ai={graphql:ni,"json-api":ri,odata:oi,sql:si,supabase:ci,paths:ii}});var Zr=w(()=>{"use strict"});var Yr=w(()=>{});var eo=w(()=>{"use strict"});var to=w(()=>{"use strict"});var no=w(()=>{"use strict"});var ro=w(()=>{"use strict"});var oo=w(()=>{"use strict"});var so=w(()=>{"use strict"});var io=w(()=>{"use strict"});var co=w(()=>{"use strict"});var ao=w(()=>{"use strict"});var lo=w(()=>{"use strict"});var fo,uo,po,ho=w(()=>{"use strict";He();fo=e=>(typeof e!="string"&&(e=String(e||"")),e.replace(/(?:^\w|[A-Z]|\b\w)/g,function(t,n){return n===0?t.toLowerCase():t.toUpperCase()}).replace(/\s+/g,"")),uo=e=>e.replace(/[^a-zA-Z0-9]/g," ").trim().toLowerCase().replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),po=e=>{if(T(e))return e;if(_(e))return e.split(" ");if(P(e))return Object.values(e);if(yt(e))return[e]}});var mo=w(()=>{"use strict"});var go=w(()=>{"use strict"});var I=w(()=>{"use strict";Yn();tr();He();bt();_t();tn();en();nr();rr();Qn();mt();or();sr();cr();ar();ir();lr();fr();rn();ur();Xr();sn();Zr();pr();Yr();eo();to();no();ro();oo();so();io();co();ao();lo();ho();mo();go()});var Mc={};je(Mc,{FACTORY:()=>Tt,REGISTRY:()=>K,applyExtends:()=>ct,batch:()=>ge,create:()=>re,createEffect:()=>M,createElement:()=>Dc,createSignal:()=>ie,createStore:()=>Y,getActiveConfig:()=>O,mount:()=>Fc,popConfig:()=>q,pushConfig:()=>Q,registerEvent:()=>it});var ke=null,ut=0,pt=[],dt=()=>ke;function ie(e){let t=new Set;function n(){return ke&&(t.add(ke),ke._sources.add(s)),e}function r(i){i!==e&&(e=i,As(t))}function o(){return e}let s={get:n,set:r,peek:o,_subscribers:t,_type:"signal"};return s}var Bt=new Set,Ut=!1;function M(e,t){let n=t?.depth??0,r={_sources:new Set,_type:"effect",_depth:n,_disposed:!1,_subscribers:new Set,_execute(){if(r._disposed)return;Wn(r);let o=ke;ke=r;try{e()}catch(s){console.error("[smbls] effect error:",s)}finally{ke=o}},_notify(){r._disposed||(ut>0?pt.push(r):Gn(r))},dispose(){r._disposed=!0,Wn(r)}};return r._execute(),r}function ge(e){ut++;try{e()}finally{ut--,ut===0&&ks()}}function Gn(e){Bt.add(e),Ut||(Ut=!0,queueMicrotask(Cs))}function Cs(){Ut=!1;let e=Array.from(Bt).sort((t,n)=>t._depth-n._depth);Bt=new Set;for(let t=0;t<e.length;t++){let n=e[t];n._disposed||n._execute()}}function ks(){for(let e=0;e<pt.length;e++)Gn(pt[e]);pt.length=0}function As(e){let t=Array.from(e);for(let n=0;n<t.length;n++)t[n]._notify()}function Wn(e){for(let t of e._sources)t._subscribers.delete(e);e._sources.clear()}var Ae=Symbol("store"),zt=Symbol("signals"),Wt=e=>!e||typeof e!="object"||Array.isArray(e)||e[Ae]||Object.isFrozen(e)||typeof Node<"u"&&e instanceof Node||e.__ref||e.nodeType||e.nodeName;function Y(e,t,n){n===void 0&&(n=0);let r={},o={},s=t&&t.maxDepth||8;if(e&&typeof e=="object")for(let y in e){if(y==="__proto__"||!Object.prototype.hasOwnProperty.call(e,y))continue;let g=e[y];n<s&&g&&typeof g=="object"&&!Wt(g)?(o[y]=g,r[y]=ie(Y(g,t,n+1))):(o[y]=g,r[y]=ie(g))}let i=new Proxy(o,{get(y,g){if(g===Ae)return!0;if(g===zt)return r;if(g==="__raw")return y;if(g==="update")return a;if(g==="parse")return f;if(g==="clean")return l;if(g==="keys")return u;if(g==="values")return p;if(g==="replace")return d;if(g==="add")return h;if(g==="remove")return m;if(g==="destroy")return b;if(g==="quietUpdate")return c;if(g==="__element")return y.__element;if(g==="parent")return y.parent;if(g==="root")return y.root;if(Object.prototype.hasOwnProperty.call(r,g))return r[g].get();if(y[g]!==void 0)return y[g];if(g!=="root"&&y.root&&y.root!==i)return y.root[g];if(typeof g=="string"&&!g.startsWith("__")&&g!=="then"&&g!=="constructor"&&dt()!=null)return r[g]=ie(void 0),r[g].get()},set(y,g,x){return g==="__proto__"?!1:g==="__element"||g==="parent"||g==="root"?(y[g]=x,!0):(Object.prototype.hasOwnProperty.call(r,g)?(y[g]=x,x&&typeof x=="object"&&!Wt(x)?r[g].set(Y(x,t,n+1)):r[g].set(x)):(y[g]=x,x&&typeof x=="object"&&!Wt(x)?r[g]=ie(Y(x,t,n+1)):r[g]=ie(x)),!0)},has(y,g){return g in r||g in y},ownKeys(y){return Object.keys(r)},getOwnPropertyDescriptor(y,g){return g in r?{enumerable:!0,configurable:!0,value:r[g].peek()}:Object.getOwnPropertyDescriptor(y,g)},deleteProperty(y,g){return r[g]&&(r[g].set(void 0),delete r[g]),delete y[g],!0}});function a(y,g){ge(()=>{for(let S in y)S!=="__proto__"&&(i[S]=y[S])});let x=o.__element;return x&&x.onUpdate&&!g?.quiet&&x.onUpdate(x,i,x.context),i}function c(y){return a(y,{quiet:!0})}function f(y){if(y||(y=new Set),y.has(i))return"[Circular]";y.add(i);let g={};for(let x in r){if(x==="parent"||x==="root"||x.startsWith("__"))continue;let S=r[x].peek();S&&S[Ae]?g[x]=S.parse(y):g[x]=S}return g}function l(){return ge(()=>{for(let y in r)delete i[y]}),i}function u(){return Object.keys(r)}function p(){return Object.keys(r).map(y=>r[y].peek())}function d(y){return ge(()=>{for(let g in r)g in y||delete i[g];for(let g in y)g!=="__proto__"&&(i[g]=y[g])}),i}function h(y,g){return i[y]=g,i}function m(y){return delete i[y],i}function b(){l(),o.__element=null,o.parent=null}return i}function ee(e){return e&&e[Ae]===!0}function Ht(e,t){let n={},r={};if(e&&typeof e=="object")for(let i in e)r[i]=e[i],n[i]=ie(e[i]);let o=i=>{if(Object.prototype.hasOwnProperty.call(n,i))return n;let a=t;for(;a;){let c=a[zt];if(c&&Object.prototype.hasOwnProperty.call(c,i))return c;a=a[Ae]?a[Gt]:null}return null};return new Proxy(r,{get(i,a){return a===Ae?!0:a===zt?n:a===Gt?t:a==="__raw"?i:Object.prototype.hasOwnProperty.call(n,a)?n[a].get():t&&a!=="then"&&a!=="constructor"?t[a]:i[a]},set(i,a,c){let f=o(a);return f?(f===n&&(i[a]=c),f[a].set(c),!0):(i[a]=c,n[a]=ie(c),!0)},has(i,a){if(a in n||a in i)return!0;let c=t;for(;c;){if(a in c)return!0;c=c[Ae]?c[Gt]:null}return!1},ownKeys(){return Object.keys(n)},getOwnPropertyDescriptor(i,a){return a in n?{enumerable:!0,configurable:!0,value:n[a].peek()}:Object.getOwnPropertyDescriptor(i,a)}})}var Gt=Symbol("scope.parent");var qt="http://www.w3.org/2000/svg",Jt=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"]),Os=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 Kt(e){return Os.has(e)||Jt.has(e)}function Xt(e){return Jt.has(e)}function We(e){let{tag:t,key:n}=e;if(typeof t=="function"&&(t=t(e)),t===!0&&(t=n),typeof t=="string"&&Kt(t))return t;if(!n||typeof n!="string")return"div";let r=new Set(["html","head","body","meta","link","script","style","title","base","noscript","template"]),o=n.toLowerCase();return o.includes(".")&&(o=o.split(".")[0]),o.includes("_")&&(o=o.split("_")[0]),Kt(o)&&!r.has(o)?o:"div"}var zn={};function Qt(e,t){let n=t?.context?.document||globalThis.document;if(!n)return null;if(e==="string")return n.createTextNode(t?.text||"");if(e==="fragment")return n.createDocumentFragment();if(Xt(e)){let r=t?.parent;if(e==="svg"||r?.node?.namespaceURI===qt)return n.createElementNS(qt,e);if(e!=="svg")return n.createElement("div")}return n.createElement(e)}function Ge(e){let t=e.tag=We(e),n=Xt(t)&&(t==="svg"||e.parent?.node?.namespaceURI===qt)?"svg:"+t:t,r=e?.context?.document||globalThis.document,o=zn[n];if(o||(o=zn[n]=Qt(t,e)),!o)return null;let s=r&&o.ownerDocument!==r?Qt(t,e):o.cloneNode(!0);return t==="string"&&(s.nodeValue=e.text||""),s}var K=new Set(["extends","children","content","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","__name","__ref","__hash","__text","parent","node"]);var ze=new Set(["start","init","complete","attachNode","stateInit","stateCreated","beforeUpdate","update","afterUpdate","beforeClassAssign","lazyLoad","render","renderRouter","done","create","frame","startUpdate","stateUpdate","beforeStateUpdate","initInspect","initSync","error","beforeRemove","remove"]),Hn=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),Zt=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 Yt=e=>e==="em"||e==="rem"||e==="vw"||e==="vh"||e==="vmax"||e==="vmin",ht=["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"];I();var yo=e=>{if(e==="")return[0,0,0,0];if(e.toLowerCase()==="transparent")return[0,0,0,0];if(e[0]==="#")return e.length<7&&(e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+(e.length>4?e[4]+e[4]:"")),[parseInt(e.substr(1,2),16),parseInt(e.substr(3,2),16),parseInt(e.substr(5,2),16),e.length>7?parseInt(e.substr(7,2),16)/255:1];if(e.indexOf("rgb")===-1&&Oe&&X){let t=Oe.body.appendChild(Oe.createElement("fictum")),n="rgb(1, 2, 3)";if(t.style.color=n,t.style.color!==n){Oe.body.removeChild(t);return}if(t.style.color=e,t.style.color===n||t.style.color==="")return Oe.body.removeChild(t),[0,0,0,0];e=X.getComputedStyle(t).color,Oe.body.removeChild(t)}return e.indexOf("rgb")===0?(e.indexOf("rgba")===-1&&(e=`${e}, 1`),e.match(/[\.\d]+/g).map(t=>+t)):[0,0,0,0]};var li=(e,t=1)=>{let[n,r,o]=e.match(/\w\w/g).map(s=>parseInt(s,16));return[n,r,o]};var fi=([e,t,n])=>((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1);var ui=(e,t,n)=>{let r=Math.max(e,t,n),o=r-Math.min(e,t,n),s=1-Math.abs(r+r-o-1),i=o&&(r==e?(t-n)/o:r==t?2+(n-e)/o:4+(e-t)/o);return[60*(i<0?i+6:i),s?o/s:0,(r+r-o)/2]},pi=(e,t,n,r=t*Math.min(n,1-n),o=(s,i=(s+e/30)%12)=>n-r*Math.max(Math.min(i-3,9-i,1),-1))=>[o(0),o(8),o(4)],di=(e,t)=>{let n=parseInt(e,16),r=(n>>16)+t;r>255?r=255:r<0&&(r=0);let o=(n>>8&255)+t;o>255?o=255:o<0&&(o=0);let s=(n&255)+t;return s>255?s=255:s<0&&(s=0),((s|o<<8|r<<16)+16777216).toString(16).slice(1)};var U=e=>e.charCodeAt(0)===45&&e.charCodeAt(1)===45,Te=/(?:rgba?\(|hsla?\(|#[0-9a-fA-F]{3,8}\b)/,hi=/^([a-zA-Z]\w*)(?:\.(\d+))?(?:([+-]\d+|=\d+))?$/,rt=e=>{if(!_(e))return null;if(Te.test(e))return{passthrough:e};if(U(e))return{cssVar:e};let t=e.match(hi);if(!t)return null;let[,n,r,o]=t,s=r!==void 0?`0.${r}`:void 0,i=o&&o[0]==="="?o.slice(1):o;return{name:n,alpha:s,tone:i}},Ne=e=>_(e)&&(e.includes("rgb")||e.includes("var(")||e.includes("#")),At=e=>{let t=[],n="",r=0;for(let o of e){if(o==="("?r+=1:o===")"&&r>0&&(r-=1),o===","&&r===0){t.push(n),n="";continue}n+=o}return(n.length||!t.length)&&t.push(n),t},bo=(e,t)=>{_(e)&&e.includes("rgb")&&(e=yo(e).join(", ")),_(e)&&(e=e.split(",").map(o=>parseFloat(o.trim()))),yt(t)&&(t+="");let n=fi(e),r=t.slice(0,1);if(r==="-"||r==="+"){let o=di(n,parseFloat(t));return li(o).join(", ")}else{let[o,s,i]=e,a=ui(o,s,i),[c,f,l]=a;return pi(c,f,parseFloat(t)/100*255)}};var gn=(e,t)=>{if(e[t])return e[t].value;if(e.default)return e[e.default].value;let n=Object.keys(e)[0];return n&&e[n]&&e[n].value};I();I();I();var Ot={};je(Ot,{animation:()=>Di,breakpoints:()=>Ii,class:()=>Bi,color:()=>Ci,devices:()=>ji,document:()=>Ri,font:()=>yi,fontFace:()=>_i,fontFamily:()=>bi,fontFamilyTypes:()=>xi,gradient:()=>ki,grid:()=>Vi,icons:()=>Ei,media:()=>Si,reset:()=>Ui,semanticIcons:()=>$i,sequence:()=>Pe,shadow:()=>Oi,spacing:()=>vi,svg:()=>Fi,svgData:()=>Mi,templates:()=>Ni,theme:()=>Ai,timing:()=>Pi,typography:()=>yn,unit:()=>mi,vars:()=>Wi});var Pe={"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 mi={default:"em"};var gi={browserDefault:16,base:16,type:"font-size",ratio:Pe["minor-third"],range:[-3,12],h1Matches:6,lineHeight:1.5,subSequence:!0,mediaRegenerate:!1,unit:"em",templates:{},sequence:{},scales:{},vars:{}},yn=gi;var yi={};var bi={},xi={"sans-serif":"Helvetica, Arial, sans-serif, --system-default",serif:"Times New Roman, Georgia, serif, --system-default",monospace:"Courier New, monospace, --system-default"},_i={};var Si={tv:"(min-width: 2780px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var wi={base:yn.base,type:"spacing",ratio:Pe.phi,range:[-5,15],subSequence:!0,mediaRegenerate:!1,unit:"em",sequence:{},scales:{},vars:{}},vi=wi;var Ci={},ki={};var Ai={};var Oi={};var Ei={},$i={};var Ti={default:150,base:150,type:"timing",ratio:Pe["perfect-fourth"],range:[-3,12],mediaRegenerate:!1,unit:"ms",sequence:{},scales:{},vars:{}},Pi=Ti;var Ri={};var Ii={screenL:1920,screenM:1680,screenS:1440,tabletL:1366,tabletM:1280,tabletS:1024,mobileL:768,mobileM:560,mobileS:480,mobileXS:375},ji={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 Di={};var Fi={},Mi={};var Ni={};var Li={},Vi=Li;var Bi={};var Ui={},Wi={};var xo={},_o={},Et=Ot,$t={},So=e=>e.replace(/_([a-z])/g,(t,n)=>n.toUpperCase());for(let e in Et){let t=e.toLowerCase();$t[t]=Et[e];let n=So(t);n!==t&&($t[n]=Et[e]),t!==e&&($t[e]=Et[e])}var bn={verbose:!1,useVariable:!0,useReset:!0,globalTheme:"auto",cssVars:xo,cssMediaVars:_o,CSS_VARS:xo,CSS_MEDIA_VARS:_o,_scratchConfig:!0,...$t},Rf=Ee(bn),Tt={active:"0",0:bn};var ot=[],Q=e=>{e&&e._scratchConfig&&ot.push(e)},q=()=>{ot.pop()},O=e=>ot.length?ot[ot.length-1]:Tt[e||Tt.active]||bn;var Pt={"-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"},wo=(e,t)=>{let{key:n,variable:r,value:o,scaling:s,index:i,scalingVariable:a}=e;t.sequence[n]={key:n,decimal:~~(o*100)/100,val:~~o,scaling:s,index:i,scalingVariable:a,variable:r},t.scales[n]=s;let c=vo.has(t.unit)?"rem":t.unit;t.vars[r]=s+c},Le=e=>{if(!e.includes("("))return e;let t=e.split("(")[0],n=e.slice(e.indexOf("(")+1,e.lastIndexOf(")"));return[t,n]},vo=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),Gi=(e,t)=>{let{base:n,type:r,unit:o}=t,s=vo.has(o)?"rem":o,i=(Yt(s)?1:n)+s;if(e===0)return i;let c="--"+(t.varPrefix?t.varPrefix+"-":"")+(r&&r.replace(".","-")),f=`${c}-ratio`;if(e>0){let l=Pt[e-1];return`calc(var(${c}-${l}) * var(${f}))`}if(e<0){let l=Pt[e+1],u=Math.abs(e),p=Math.pow(Co,2*u),d=Pt[u];return d?`max(calc(var(${c}-${l}) / var(${f})), calc(var(${c}-${d}) / ${p.toFixed(4)}))`:`calc(var(${c}-${l}) / var(${f}))`}},zi=(e,t,n,r)=>{let{type:o}=r,i=e===2&&t.length===2?e+1:e,f=`${"--"+(r.varPrefix?r.varPrefix+"-":"")+(o&&o.replace(".","-"))}-sub-ratio-`;return`calc(var(${n}) * var(${f+i}))`},Hi=(e,t)=>{let r=(e*t-e)/1.618,o=e*t-r,s=e+r,i=(o+s)/2;return[o,i,s]};var qi=(e,t)=>{let{key:n,base:r,value:o,ratio:s,variable:i,index:a}=e,f=~~(o*s)-~~o,l,[u,p,d]=Hi(o,s);f>16?l=[u,p,d]:l=[u,d],l.forEach((h,m)=>{let b=~~(h/r*1e3)/1e3,y=i+(m+1),g=a+(m+1)/10,x=zi(m+1,l,i,t),S={key:n+(m+1),variable:y,value:h,scaling:b,scalingVariable:x,index:g};wo(S,t)})},Co=1.618,Ki=(e,t,n)=>{if(e>=0)return t*Math.pow(n,e);let r=Math.abs(e),o=t*Math.pow(n,e),s=t*Math.pow(n,r)/Math.pow(Co,2*r);return Math.max(o,s)},Rt=e=>{let{type:t,base:n,ratio:r,range:o,subSequence:s}=e,i=Math.abs(o[0])+Math.abs(o[1]),c="--"+(e.varPrefix?e.varPrefix+"-":"")+(t&&t.replace(".","-"))+"-";for(let f=0;f<=i;f++){let l=o[1]-f,u=Pt[l],p=Ki(l,n,r),d=~~(p/n*100)/100,h=c+u,m=Gi(l,e),b={key:u,variable:h,value:p,base:n,scaling:d,scalingVariable:m,ratio:r,index:l};wo(b,e),s&&qi(b,e)}return e};var ko=(e="A",t)=>{let n=O(),{unit:r}=n;if(_(e)&&U(e))return`var(${e})`;let{sequence:o,unit:s=r.default,useVariable:i}=t,a=/^-?[a-zA-Z]/i,c=a.test(e);if(ht.some(x=>e.includes(x))||!c||["none","auto","max-content","min-content","fit-content","inherit","initial","unset","revert","revert-layer"].includes(e))return e;let p=`--${t.varPrefix?t.varPrefix+"-":""}${uo(t.type.replace(".","-"))}-`,d=e.toUpperCase(),h=d.slice(0,1)==="-"?"-":"",m=h?d.slice(1):d,b="";m.includes("_")&&(b="_"+m.split("_")[1].toLowerCase(),m=m.split("_")[0]);let y=x=>a.test(x)?`var(${p}${x}${b})`:x;if(m.includes("+")){let[x,S]=m.split("+"),v=`${y(x)} + ${y(S)}`;return h?`calc((${v}) * -1)`:`calc(${v})`}else if(m.includes("*")){let[x,S]=m.split("*"),v=`${y(x)} * ${y(S)}`;return h?`calc((${v}) * -1)`:`calc(${v})`}else if(m.includes("-")){let[x,S]=m.split("-"),v=`${y(x)} - ${y(S)}`;return h?`calc((${v}) * -1)`:`calc(${v})`}if(!o[m]&&m.length===2&&(n.verbose&&console.warn(m,"- value is not found because `subSequence` is set to false"),m=m.slice(0,1)),i||n.useVariable){let x=`var(${p}${m}${b})`;return h?`calc(${x} * -1)`:x}let g=o?o[m]:null;return g?s==="ms"||s==="s"?h+g.val+s:h+g.scaling+s:console.warn("can't find",o,m)},Qi=(e,t)=>{if(!["+","-","*","/",","].filter(s=>e.includes(s+" ")).length)return e;let r=/(\s*[+\-*/,]\s*)/;return e.split(r).map(s=>{let i=s.trim();return!i||["+","-","*","/",","].includes(i)?s:ko(i,t)}).join("")},Re=(e,t,n,r)=>{if(typeof e!="string")return O().verbose&&console.warn(t,e,"is not a string"),{[t]:e};if(e==="-"||e==="")return{};if(!r&&e.includes("(")){let s=Le(e);r=s[0],e=s[1]}return["+","-","*","/",","].filter(s=>e.includes(s+" ")).length?e=Qi(e,n):e=ko(e,n),{[t]:r?`${r}(${e})`:e}};I();var Kf=on();var Ji="line|circle|ellipse|rect|polyline|polygon|path|stop|use|image",Qf=new RegExp(`<(${Ji})\\b([^>]*?)\\s*/>`,"g");I();var pe=(e,t,n)=>{let r=n||O();if(!_(e)){r.verbose&&console.warn(e,"- type for color is not valid");return}if(U(e))return`var(${e})`;t&&e[t]&&(e=e[t]);let o,s,i;if(T(e))[o,s,i]=e;else{let u=rt(e);if(!u){let{color:p,gradient:d}=r,h=d[e]||p[e];return h?r.useVariable?`var(${h.var})`:h.value:e}if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;o=u.name,s=u.alpha,i=u.tone}let{color:a,gradient:c}=r,f=a[o]||c[o];if(!f)return r.verbose&&console.warn("Can't find color ",o),e;t&&(f[t]?f=f[t]:r.verbose&&console.warn(e," - does not have ",t));let l=f.rgb;return l?(i&&!f[i]&&(l=bo(l,i),f[i]={rgb:l,var:`${f.var}-${i}`}),f[i]&&(l=f[i].rgb),s?`rgba(${l}, ${s})`:i?`rgba(${l}, 1)`:r.useVariable?`var(${f.var})`:`rgb(${l})`):r.useVariable?`var(${f.var})`:f.value},ne=(e,t,n)=>{let r=n||O();if(t||(t=r.globalTheme==="auto"?null:r.globalTheme),!_(e)){r.verbose&&console.warn(e,"- type for color is not valid");return}if(U(e))return`var(${e})`;let o;if(T(e))o=e[0];else{let f=rt(e);if(!f)return e;if(f.passthrough)return f.passthrough;if(f.cssVar)return`var(${f.cssVar})`;o=f.name}let{color:s,gradient:i}=r,a=s[o]||i[o],c=P(a);if(c&&a.value)return pe(e,`@${t}`,n);if(c){if(r.useVariable&&a.var)return`var(${a.var})`;if(t)return pe(e,`@${t}`,n);{let f={};for(let l in a){if(l.charCodeAt(0)!==64)continue;let u=r.media[l.slice(1)];if(!u)continue;let p="@media "+(u==="print"?`${u}`:`screen and ${u}`);f[p]=pe(e,l,n)}return f}}else return r.verbose&&console.warn("Can't find color",e),e};I();var xn=e=>{let t=O(),n={};for(let r in e){let o=r.slice(0,1);if(be(e[r])){if(o==="@")continue;o===":"?n[`&${r}`]=xn(e[r]):o==="."&&(n[`&${r}`]=xn(e[r]))}else n[r]=e[r]}return n},Oo=(e,t)=>{let n=t.shift();return e[n]?Oo(e[n],t):e},Ao=(e,t)=>T(t)?Oo(e,t):_(t)&&e[t]?e[t]:e;var st=(e,t)=>{let n=O();if(_(e)&&U(e)&&(e=st(e.slice(2))),!e||!_(e)){n.verbose&&console.warn(`${e} - Theme is not a string`);return}let[r,...o]=T(e)?e:e.split(" "),s=n.theme[r];return s&&o.length?s=Ao(s,o):s&&t&&(s=Ao(s,t)),xn(s)};var Eo=(e,t)=>{let n=O(),{fontFamily:r}=n;return gn(t||r,e)};var To=e=>{let t=O(),{typography:n}=t;return Re(e,"fontSize",n)};I();I();var Po=e=>{let t=e.toLowerCase(),n=t.includes("width")||t.includes("height"),r=t.includes("border")||t.includes("outline");return n&&!r};var Yi=e=>{let t=O(),{spacing:n}=t;return!e||!e.sequence?n:Object.keys(e.sequence).length>0?e:Rt(e)},W=(e,t="padding",n,r)=>{let o=Yi(n);if(_(e)&&!r&&e.includes("(")){let i=Le(e);r=i[0],e=i[1]}let s=r?[e]:po(e);if(T(s)){if(s.length>1){let i="";t==="borderWidth"&&(t="border",i="Width");let a={2:["Block","Inline"],3:["BlockStart","Inline","BlockEnd"],4:["BlockStart","InlineEnd","BlockEnd","InlineStart"]},c=(f,l)=>Re(s[l],t+f+i,o,r);return a[s.length].map((f,l)=>c(f,l))}return Re(e,t,o,r)}},Ve=(e,t,n,r)=>{let o=O(),{spacing:s}=o,i=n||e[t];if(!r&&_(i)&&i.includes("(")){let a=Le(i);r=a[0],i=a[1]}if(e.spacingRatio){let a=applyCustomSequence(e);return W(i,t,a,r)}return W(i,t,s,r)},Ro=e=>{let t=n=>{let r=["+","-","*","/"].includes(n),o=ht.some(i=>e.includes(i));return r||o?n:n.length<3&&/[A-Z]/.test(n)?n+"_default":n};return e.split(",").map(n=>n.trim()).map(t).join(",").split(" ").map(t).join(" ")};I();var Io=(e,t)=>{let n=O();if(t||(t=n.globalTheme),!_(e)){n.verbose&&console.warn(e,"- type for color is not valid");return}if(U(e))return`var(${e})`;let[r]=T(e)?e:e.split(" "),s=n.shadow[r],i=P(s);if(!s)return n.verbose&&console.warn("Can't find color ",r),e;if(t){if(s[t])return s[t].value;n.verbose&&console.warn(e," - does not have ",t)}if(i&&s.value)return s.value;if(i){let a={};for(let c in s){let f=n.media[c.slice(1)],l="@media "+(f==="print"?`${f}`:`screen and ${f}`);a[l]=s.value}return a}return n.verbose&&console.warn("Can't find color",e),e};I();var ye=e=>{let t=O(),{timing:n}=t;return n[e]||n[fo(e)]||e},de=(e,t="timing")=>{let n=O(),{timing:r}=n;return Re(e,t,r)};I();var tc=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial"]),nc=new Set(["to","top","bottom","left","right","center","at","circle","ellipse","closest-side","farthest-side","closest-corner","farthest-corner"]),rc=e=>tc.has(e),Se=e=>{let t=e+"";if(Te.test(t))return t;let n=t.trim();return n==="none"||n==="0"||n==="initial"||n==="inherit"||n==="unset"?t:t.split(/\s+/).map(o=>{if(o=o.trim(),!o)return"";if(U(o))return`var(${o})`;if(rc(o)||/^\d/.test(o)||o==="0")return o;let s=pe(o);if(Ne(s))return s;let i=W(o,"border");return i&&i.border?i.border:o}).join(" ")},jo=e=>Te.test(e)?e:e.split(/\s+/).map(t=>{if(t=t.trim(),!t)return"";if(U(t))return`var(${t})`;if(/^\d/.test(t)||t.includes("px")||t==="0")return t;let n=pe(t);return Ne(n)?n:t}).join(" "),Do=(e,t)=>Io(e,t),_n=(e,t)=>Te.test(e)?e:At(e).map(n=>(n=n.trim(),n?n.split(/\s+/).map(r=>{if(r=r.trim(),!r)return"";if(U(r))return`var(${r})`;if(r==="inset"||r==="none")return r;let o=pe(r);if(Ne(o)){let i=ne(r,t);return P(i)?Object.values(i).filter(a=>a.includes(": "+t))[0]:i}if(/^\d/.test(r)||r==="0"||r.includes("px")||r.slice(-2)==="em")return r;let s=W(r,"shadow");return s&&s.shadow?s.shadow:r}).join(" "):"")).join(", "),Sn=(e,t)=>{let n=e.indexOf("(");if(n===-1)return e;let r=e.slice(0,n+1),o=e.slice(n+1,e.lastIndexOf(")")),s=")",a=At(o).map(c=>(c=c.trim(),c.split(/\s+/).map(l=>{if(!l||/^\d/.test(l)||l==="0"||nc.has(l)||l==="transparent"||Te.test(l))return l;let u=pe(l);return Ne(u)?u:l}).join(" ")));return r+a.join(", ")+s},Fo=(e,t)=>{let n=O();return e.split(", ").map(r=>U(r)?`var(${r})`:r.includes("url")?r:r.includes("gradient")?Sn(r,t):n.gradient[e]?{backgroundImage:ne(e,t||n.globalTheme)}:r.includes("/")||r.startsWith("http")||r.includes(".")&&!rt(r)?`url(${r})`:r).join(" ")},Mo=e=>_(e)&&e.split(" ").map(t=>W(t,"gap").gap).join(" "),oc=e=>{let t=e.split(" ");return t.length?t.map(n=>U(n)?`var(${n})`:n.length<3||n.includes("ms")?de(n).timing||n:ye(n)?ye(n):n).join(" "):e},wn=(e,t,n)=>{if(_(e))return e.split(",").map(r=>de(r).timing||r).join(",")},No=e=>{let t=e.split(",");if(t.length)return t.map(oc).join(",")};function N(e,t,n={},r={}){let o=De.call(this,t||n[e]);if(o==null)return;let s;if(_(o)){if(o.includes("(")){let c=Le(o);s=c[0],o=c[1]}let i=n.scaleBoxSize,a=Po(e);!i&&a&&!r.ratio&&(o=Ro(o))}return r.ratio?Ve(n,e,o,s):W(o,e,void 0,s)}var k=(e,t=null,n)=>N(e,t,n,{ratio:!0}),vn=(e,t,n)=>{if(_(e))return{borderRadius:e.split(" ").map((r,o)=>Ve(t,n,r)[n]).join(" ")}};var Cn=new WeakMap,sc={passive:!0},ic={passive:!0,capture:!0},kn=(e,t)=>Hn.has(e)?t?ic:sc:t||!1;function Vo(e){let t=Cn.get(e);return t||(t={handlers:new Map,installed:new Set},Cn.set(e,t)),t}function cc(e,t){let n=Vo(t);if(n.installed.has(e))return;n.installed.add(e);let r=e==="focus"||e==="blur"||e==="focusin"||e==="focusout"||e==="mouseenter"||e==="mouseleave",o=e==="mouseenter"||e==="mouseleave";t.addEventListener(e,s=>{let i=s.target;for(;i&&i!==t;){let a=n.handlers.get(e);if(a){let c=a.get(i);if(c){if(o&&s.relatedTarget&&i.contains(s.relatedTarget)){i=i.parentNode;continue}if(c(s),s.cancelBubble)return}}i=i.parentNode}},kn(e,r))}function Bo(e,t,n,r){r||(r=t.ownerDocument?.documentElement||t.getRootNode());let o=Vo(r);cc(e,r),o.handlers.has(e)||o.handlers.set(e,new WeakMap),o.handlers.get(e).set(t,n)}function Uo(e,t,n){n||(n=t.ownerDocument?.documentElement||t.getRootNode());let r=Cn.get(n);if(!r)return;let o=r.handlers.get(e);o&&o.delete(t)}function Lo(e){return Zt.has(e)&&!ze.has(e)}function it(e,t,n){let{node:r,context:o}=t;if(!r)return;let s=o?.designSystem,i=a=>{s&&Q(s);try{let c=n.call(t,a,t,t.state,o);if(c&&typeof c.then=="function"){c.catch(f=>{t.error=f,console.error("[DOMQL] Async event error:",f)}).finally(()=>{s&&q()});return}}catch(c){if(t.error=c,console.error("[DOMQL] Event error:",c),o?.strictMode)throw c}s&&q()};if(Lo(e)){let a=o?.rootNode||r.ownerDocument?.documentElement;Bo(e,r,i,a)}else r.addEventListener(e,i,kn(e,!1));t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{if(Lo(e)){let a=o?.rootNode||r.ownerDocument?.documentElement;Uo(e,r,a)}else r.removeEventListener(e,i,kn(e,!1))})}function Wo(e){let t=[];return e.extends&&(Array.isArray(e.extends)?t.push(...e.extends):t.push(e.extends)),e.extend&&(Array.isArray(e.extend)?t.push(...e.extend):t.push(e.extend)),t}function ct(e,t,n){let r=Wo(t);if(!r.length)return;let o=(e.context||n?.context||{}).components||{};for(let s=0;s<r.length;s++){let i=Go(r[s],o);i&&i!==t&&zo(e,i,n,new Set([t]))}}function Go(e,t){if(typeof e=="string"){if(e.includes(">")){let n=e.split(">").map(o=>o.trim()),r=t[n[0]]||t[`smbls.${n[0]}`];for(let o=1;o<n.length&&r;o++)r=r[n[o]];return r||null}return t[e]||t[`smbls.${e}`]||null}return typeof e=="object"&&e!==null?e:null}function zo(e,t,n,r=new Set){if(r.has(t))return;r.add(t);let o=Wo(t);if(o.length){let s=(e.context||n?.context||{}).components||{};for(let i=0;i<o.length;i++){let a=Go(o[i],s);a&&zo(e,a,n,r)}}for(let s in t){if(s==="extends"||s==="extend")continue;let i=t[s];e[s]===void 0?i&&typeof i=="object"&&!Array.isArray(i)&&typeof i!="function"?e[s]={...i}:e[s]=i:typeof e[s]=="object"&&typeof i=="object"&&!Array.isArray(e[s])&&!Array.isArray(i)&&e[s]!==null&&i!==null?e[s]=Ho(e[s],i):e[s]=i}}function Ho(e,t){let n={...e};for(let r in t){let o=n[r],s=t[r];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?n[r]=Ho(o,s):n[r]=s}return n}_t();function An(e={},t={}){let n=this,r=n.__ref;if(r){if((typeof e=="string"||typeof e=="number")&&(e={text:e}),!t.preventListeners&&typeof n.onBeforeUpdate=="function"&&n.onBeforeUpdate(n,n.state,n.context,t)===!1)return n;if(ge(()=>{if(e.state&&ee(n.state)&&n.state.update(e.state),e.text!==void 0&&(n.text=e.text,!r.__exec.text&&n.node&&(n.tag==="string"?n.node.nodeValue=e.text??"":n.node.textContent=e.text??"")),e.html!==void 0&&(n.html=e.html,!r.__exec.html&&n.node&&(n.node.innerHTML=e.html)),e.style&&n.node?.style){if(!r.__exec.style)for(let o in e.style){let s=e.style[o];if(s==null)continue;let i=o.replace(/[A-Z]/g,c=>"-"+c.toLowerCase()),a=String(s).replace(/\s*!important\s*$/,"");n.node.style.setProperty(i,a,"important")}n.style||(n.style={}),Object.assign(n.style,e.style)}if(e.attr&&n.node?.setAttribute){for(let o in e.attr){let s=e.attr[o];s==null||s===!1?n.node.removeAttribute(o):typeof s!="function"&&typeof s!="object"&&n.node.setAttribute(o,s===!0?"":s)}n.attr||(n.attr={}),Object.assign(n.attr,e.attr)}if(e.data&&n.node?.dataset){for(let o in e.data)n.node.dataset[o]=e.data[o];n.data||(n.data={}),Object.assign(n.data,e.data)}for(let o in e){if(K.has(o)||o==="state")continue;let s=e[o],i=n[o];if(i&&i.__ref&&typeof i.update=="function")i.update(s,t);else if(typeof s=="object"&&s!==null){let a=o.charCodeAt(0);a>=65&&a<=90&&re(s,n,o,t)}else o!=="text"&&o!=="html"&&o!=="style"&&o!=="attr"&&o!=="data"&&(n[o]=s)}}),n.node&&r.__conditionalRunners)for(let o of r.__conditionalRunners)o();return Ke("update",n),!t.preventListeners&&typeof n.onUpdate=="function"&&n.onUpdate(n,n.state,n.context,t),n}}function On(e){if(!e)return;let t=e.__ref;if(t){try{typeof e.onBeforeRemove=="function"&&e.onBeforeRemove(e,e.state,e.context)}catch(n){console.error("[smbls] onBeforeRemove error:",n)}if(t.__effects){for(let n=0;n<t.__effects.length;n++)t.__effects[n].dispose();t.__effects.length=0}if(t.__eventCleanup){for(let n=0;n<t.__eventCleanup.length;n++)t.__eventCleanup[n]();t.__eventCleanup.length=0}if(t.__children){for(let n=0;n<t.__children.length;n++){let r=t.__children[n],o=e[r];o&&o.__ref&&On(o)}t.__children.length=0}if(e.node?.parentNode&&e.node.remove(),e.state?.destroy&&e.state.__element===e&&e.state.destroy(),e.parent?.__ref?.__children){let n=e.parent.__ref.__children.indexOf(e.key);n!==-1&&e.parent.__ref.__children.splice(n,1),delete e.parent[e.key]}try{typeof e.onRemove=="function"&&e.onRemove(e)}catch(n){console.error("[smbls] onRemove error:",n)}e.node=null,e.parent=null,e.__ref=null}}function En(){On(this)}I();var at=new Map,ac=null,qo=null;function Xo(){try{let e=O();if(e?.document)return e.document}catch{}return typeof document<"u"?document:null}var lc={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 It(e){return e.replace(/[A-Z]/g,t=>"-"+t.toLowerCase())}function jt(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=t*16777619>>>0;return t.toString(36)}function fc(e){let t=String(e);return t.length<=20?t.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():jt(t)}function Ko(e,t,n){let r=(n?n+"":"")+e+":"+t,o=at.get(r),s=o?null:It(e);if(!o){let a=lc[e]||jt(e),c=fc(t);o=n?`_${n}_${a}-${c}`:`_${a}-${c}`,at.set(r,o)}if(typeof t=="string"&&(t.indexOf("}")!==-1||t.indexOf("{")!==-1))return o;let i=`.${o}{${s||It(e)}:${t}}`;return we(i),o}var Qo=new WeakMap;function we(e,t){let n=uc(t);if(!n)return;let r=Qo.get(n);if(r||(r=new Set,Qo.set(n,r)),!r.has(e)){r.add(e);try{n.insertRule(e,n.cssRules.length)}catch{}}}var Jo=new WeakMap;function uc(e){let t=e||Xo();if(!t||!t.head)return null;let n=Jo.get(t);if(n&&n.ownerNode&&n.ownerNode.parentNode===t.head)return n;let r=t.head.querySelector("style[data-smbls]");r||(r=t.createElement("style"),r.setAttribute("data-smbls",""),t.head.appendChild(r));let o=r.sheet;return Jo.set(t,o),ac=o,o}var pc=8;function Tn(e,t,n){if(!e||typeof e!="object")return"";let r=null,o=0,s=[],i=[];for(let c in e){let f=e[c];f==null||f===!1||f===""||(typeof f=="object"?i.push([c,f]):qo?(r||(r=[]),r.push(c,String(f)),o++):s.push(Ko(c,String(f),n)))}if(r&&o>=pc){let c=r.join("\0"),f=qo(c),l=f.indexOf("\0"),u=f.substring(0,l),p=f.substring(l+1);if(p){let d=p.split(`
|
|
11
|
-
`);for(let h=0;h<d.length;h++)d[h]&&we(d[h])}s.push(u)}else if(r)for(let c=0;c<r.length;c+=2)s.push(Ko(r[c],r[c+1],n));let a=[];for(let c=0;c<i.length;c++)a.push(dc(i[c][0],i[c][1],n));return s.concat(a).join(" ").trim()}var $n=new Map;function dc(e,t,n){let r=(n?n+"":"")+e+JSON.stringify(t),o=at.get(r);if(o){let p=$n.get(o);if(p)for(let d=0;d<p.length;d++)we(p[d]);return o}o=n?`_${n}_c${jt(r)}`:`_c${jt(r)}`;let s="",i=[],a=p=>typeof p=="string"&&(p.indexOf("{")!==-1||p.indexOf("}")!==-1),c=(p,d)=>{let h="";for(let m in d){let b=d[m];if(b!=null)if(typeof b=="object")c([...p,m],b);else{if(a(b))continue;h+=`${It(m)}:${b};`}}h&&(p.length===0?s+=h:i.push({chain:p,body:h}))};c([],t);let f=p=>{if(!p.length)return`.${o}`;let d=p[0].split(",").map(h=>h.trim()).map(h=>h.includes("&")?h.replace(/&/g,`.${o}`):h.startsWith(":")?`.${o}${h}`:`.${o} ${h}`);for(let h=1;h<p.length;h++){let m=p[h].split(",").map(y=>y.trim()),b=[];for(let y of d)for(let g of m)g.includes("&")?b.push(g.replace(/&/g,y)):g.startsWith(":")?b.push(y+g):b.push(y+" "+g);d=b}return d.join(", ")},l=[];if(e.startsWith("@media")||e.startsWith("@supports")){if(s){let p=`${e}{.${o}{${s}}}`;l.push(p),we(p)}for(let p of i){let d=f(p.chain),h=`${e}{${d}{${p.body}}}`;l.push(h),we(h)}return $n.set(o,l),at.set(r,o),o}let u=f([e]);if(s){let p=`${u}{${s}}`;l.push(p),we(p)}for(let p of i){let h=`${f([e,...p.chain])}{${p.body}}`;l.push(h),we(h)}return $n.set(o,l),at.set(r,o),o}function Dt(e,t){let n="";for(let r in t){let o="";for(let s in t[r])o+=`${It(s)}:${t[r][s]};`;n+=`${r}{${o}}`}return we(`@keyframes ${e}{${n}}`),e}var hc=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],mc=["none","forwards","backwards","both"],gc=["normal","reverse","alternate","alternate-reverse"],yc=["running","paused"],bc=e=>/^[\d.]+m?s$/.test(e),xc=0,Pn=(e,t)=>{let{animation:n}=t.context&&t.context.designSystem||{};if(P(e)){let o=`smbls-anim-${xc++}`;return{animationName:Dt(o,e)}}let r=n&&n[e];return P(r)?Dt(e,r):e},_c=(e,t)=>{let{animation:n}=t.context&&t.context.designSystem||{},r=e.split(/\s+/),o=null,s=[],i=null,a=null,c=null,f=null,l=null;for(let u of r)n&&n[u]?o=u:bc(u)?s.push(u):hc.includes(u)||u.startsWith("cubic-bezier")||u.startsWith("steps(")?i=u:u==="infinite"||/^\d+$/.test(u)?a=u==="infinite"?u:Number(u):gc.includes(u)?c=u:mc.includes(u)?f=u:yc.includes(u)?l=u:o||(o=u);return{name:o,durations:s,timingFunction:i,iterationCount:a,direction:c,fillMode:f,playState:l}},Zo={animation:(e,t)=>{if(_(e)&&e.includes(" ")){let n=_c(e,t);return{animationName:Pn(n.name||e,t),animationDuration:n.durations[0]||de(t.animationDuration||"A").timing,animationDelay:n.durations[1]||de(t.animationDelay||"0s").timing,animationTimingFunction:n.timingFunction||ye(t.animationTimingFunction||"ease"),animationFillMode:n.fillMode||t.animationFillMode||"both",animationIterationCount:n.iterationCount!=null?n.iterationCount:t.animationIterationCount||1,animationPlayState:n.playState||t.animationPlayState,animationDirection:n.direction||t.animationDirection}}return{animationName:Pn(e,t),animationDuration:de(t.animationDuration||"A").timing,animationDelay:de(t.animationDelay||"0s").timing,animationTimingFunction:ye(t.animationTimingFunction||"ease"),animationFillMode:t.animationFillMode||"both",animationIterationCount:t.animationIterationCount||1,animationPlayState:t.animationPlayState,animationDirection:t.animationDirection}},animationName:(e,t)=>({animationName:Pn(e,t)}),animationDuration:e=>({animationDuration:de(e).timing}),animationDelay:e=>({animationDelay:de(e).timing}),animationTimingFunction:e=>({animationTimingFunction:ye(e)}),animationIterationCount:e=>({animationIterationCount:e}),animationFillMode:e=>({animationFillMode:e}),animationPlayState:e=>({animationPlayState:e}),animationDirection:e=>({animationDirection:e})};I();var Yo={show:e=>e?void 0:{display:"none !important"},hide:e=>e?{display:"none !important"}:void 0,height:(e,t)=>k("height",e,t),width:(e,t)=>k("width",e,t),boxSizing:e=>qn(e)?{boxSizing:"border-box"}:{boxSizing:e},boxSize:e=>{if(!_(e))return;let[t,n]=e.split(" ");return{...N("height",t),...N("width",n||t)}},inlineSize:(e,t)=>k("inlineSize",e,t),blockSize:(e,t)=>k("blockSize",e,t),minWidth:(e,t)=>k("minWidth",e,t),maxWidth:(e,t)=>k("maxWidth",e,t),widthRange:e=>{if(!_(e))return;let[t,n]=e.split(" ");return{...N("minWidth",t),...N("maxWidth",n||t)}},minHeight:(e,t)=>k("minHeight",e,t),maxHeight:(e,t)=>k("maxHeight",e,t),heightRange:e=>{if(!_(e))return;let[t,n]=e.split(" ");return{...N("minHeight",t),...N("maxHeight",n||t)}},size:e=>{if(!_(e))return;let[t,n]=e.split(" ");return{...k("inlineSize",t),...k("blockSize",n||t)}},minBlockSize:(e,t)=>k("minBlockSize",e,t),minInlineSize:(e,t)=>k("minInlineSize",e,t),maxBlockSize:(e,t)=>k("maxBlockSize",e,t),maxInlineSize:(e,t)=>k("maxInlineSize",e,t),minSize:e=>{if(!_(e))return;let[t,n]=e.split(" ");return{...N("minInlineSize",t),...N("minBlockSize",n||t)}},maxSize:e=>{if(!_(e))return;let[t,n]=e.split(" ");return{...N("maxInlineSize",t),...N("maxBlockSize",n||t)}},borderWidth:(e,t)=>k("borderWidth",e,t),padding:(e,t)=>k("padding",e,t),scrollPadding:(e,t)=>k("scrollPadding",e,t),paddingInline:e=>{if(!_(e))return;let[t,n]=e.split(" ");return{...N("paddingInlineStart",t),...N("paddingInlineEnd",n||t)}},paddingBlock:e=>{if(!_(e))return;let[t,n]=e.split(" ");return{...N("paddingBlockStart",t),...N("paddingBlockEnd",n||t)}},paddingTop:(e,t)=>k("paddingBlockStart",e,t),paddingBottom:(e,t)=>k("paddingBlockEnd",e,t),paddingLeft:(e,t)=>k("paddingInlineStart",e,t),paddingRight:(e,t)=>k("paddingInlineEnd",e,t),paddingBlockStart:(e,t)=>k("paddingBlockStart",e,t),paddingBlockEnd:(e,t)=>k("paddingBlockEnd",e,t),paddingInlineStart:(e,t)=>k("paddingInlineStart",e,t),paddingInlineEnd:(e,t)=>k("paddingInlineEnd",e,t),margin:(e,t)=>k("margin",e,t),marginInline:e=>{if(!_(e))return;let[t,n]=e.split(" ");return{...N("marginInlineStart",t),...N("marginInlineEnd",n||t)}},marginBlock:(e,t)=>{if(!_(t.marginBlock))return;let[n,r]=t.marginBlock.split(" ");return{...N("marginBlockStart",n),...N("marginBlockEnd",r||n)}},marginTop:(e,t)=>k("marginBlockStart",e,t),marginBottom:(e,t)=>k("marginBlockEnd",e,t),marginLeft:(e,t)=>k("marginInlineStart",e,t),marginRight:(e,t)=>k("marginInlineEnd",e,t),marginInlineStart:(e,t)=>k("marginInlineStart",e,t),marginInlineEnd:(e,t)=>k("marginInlineEnd",e,t),marginBlockStart:(e,t)=>k("marginBlockStart",e,t),marginBlockEnd:(e,t)=>k("marginBlockEnd",e,t),gap:e=>({gap:Mo(e)}),columnGap:(e,t)=>Ve(t,"columnGap",e),rowGap:(e,t)=>Ve(t,"rowGap",e),flexWrap:e=>({display:"flex",flexWrap:e}),flexFlow:(e,t)=>{let n=t.reverse;if(!_(e))return;let[r,o]=(e||"row").split(" ");return(e.startsWith("x")||e==="row")&&(r="row"),(e.startsWith("y")||e==="column")&&(r="column"),{display:"flex",flexFlow:(r||"")+(!r.includes("-reverse")&&n?"-reverse":"")+" "+(o||"")}},flexAlign:e=>{if(!_(e))return;let[t,n]=e.split(" ");return{display:"flex",alignItems:t,justifyContent:n}},round:(e,t)=>vn(e??t.borderRadius,t,"round"),borderRadius:(e,t)=>vn(e??t.round,t,"borderRadius")};var es={fontSize:e=>To(e)||e,fontFamily:e=>({fontFamily:Eo(e)||e}),fontWeight:e=>({fontWeight:e,fontVariationSettings:'"wght" '+e})};var ts={overflow:e=>({overflow:e,scrollBehavior:"smooth"}),cursor:(e,t,n,r)=>{if(!e)return;let o=r.assets&&r.assets[e];if(o&&o.content)e=`url(${o.content.src})`;else{let s=r.files&&r.files[e];s&&s.content&&(e=`url(${s.content.src})`)}return{cursor:e}},opacity:e=>e!=null?{opacity:String(e)}:void 0,visibility:e=>e!=null?{visibility:e}:void 0,pointerEvents:e=>e!=null?{pointerEvents:e}:void 0};var ns={inset:(e,t)=>{if(t.call("isNumber",e))return{inset:e};if(t.call("isString",e))return{inset:e.split(" ").map(n=>W(n,"k").k).join(" ")}},left:e=>W(e,"left"),top:e=>W(e,"top"),right:e=>W(e,"right"),bottom:e=>W(e,"bottom"),verticalInset:e=>{if(typeof e!="string")return;let t=e.split(" ").map(n=>W(n,"k").k);return{top:t[0],bottom:t[1]||t[0]}},horizontalInset:e=>{if(typeof e!="string")return;let t=e.split(" ").map(n=>W(n,"k").k);return{left:t[0],right:t[1]||t[0]}}};I();var ae=({context:e,state:t})=>{let n=t?.root?.globalTheme||e.designSystem?.globalTheme;return n==="auto"?null:n},rs={theme:(e,t)=>{if(e)return t.themeModifier?st(e,`@${t.themeModifier}`):st(e)},color:(e,t)=>{let n=ae(t);if(e)return{color:ne(e,n)}},background:(e,t)=>{let n=ae(t);if(e)return _(e)&&e.includes("gradient")?{background:Sn(e,n)}:{background:ne(e,n)}},backgroundColor:(e,t)=>{let n=ae(t);if(e)return{backgroundColor:ne(e,n)}},backgroundImage:(e,t,n,r)=>{let o=ae(t);if(!e)return;let s=r.assets&&r.assets[e];if(s&&s.content)e=s.content.src;else{let i=r.files&&r.files[e];i&&i.content&&(e=i.content.src)}return{backgroundImage:Fo(e,o)}},textStroke:e=>({WebkitTextStroke:jo(e)}),outline:e=>({outline:Se(e)}),outlineOffset:(e,t)=>k("outlineOffset",e,t),border:e=>({border:Se(e)}),borderColor:(e,t)=>{let n=ae(t);if(e)return{borderColor:ne(e,n)}},borderTopColor:(e,t)=>{let n=ae(t);if(e)return{borderTopColor:ne(e,n)}},borderBottomColor:(e,t)=>{let n=ae(t);if(e)return{borderBottomColor:ne(e,n)}},borderLeftColor:(e,t)=>{let n=ae(t);if(e)return{borderLeftColor:ne(e,n)}},borderRightColor:(e,t)=>{let n=ae(t);if(e)return{borderRightColor:ne(e,n)}},borderLeft:e=>({borderLeft:Se(e)}),borderTop:e=>({borderTop:Se(e)}),borderRight:e=>({borderRight:Se(e)}),borderBottom:e=>({borderBottom:Se(e)}),shadow:(e,t)=>{let n=ae(t);if(e)return{boxShadow:Do(e,n)}},boxShadow:(e,t)=>{if(!_(e))return;let[n,r]=e.split("!importan"),o=ae(t),s=r?" !important":"";return{boxShadow:_n(n.trim(),o)+s}},textShadow:(e,{context:t})=>({textShadow:_n(e,t.designSystem.globalTheme)}),columnRule:e=>({columnRule:Se(e)})};var os={transition:e=>({transition:No(e)}),transitionDuration:e=>({transitionDuration:wn(e)}),transitionDelay:e=>({transitionDelay:wn(e)}),transitionTimingFunction:e=>({transitionTimingFunction:ye(e)}),transitionProperty:e=>({transitionProperty:e,willChange:e})};I();var ss={flow:(e,t)=>{let n=t.reverse;if(!_(e))return;let[r,o]=(e||"row").split(" ");return(e.startsWith("x")||e==="row")&&(r="row"),(e.startsWith("y")||e==="column")&&(r="column"),{display:"flex",flexFlow:(r||"")+(!r.includes("-reverse")&&n?"-reverse":"")+" "+(o||"")}},wrap:(e,t)=>({display:"flex",flexWrap:e}),align:(e,t)=>{let[n,r]=e.split(" ");return{display:"flex",alignItems:n,justifyContent:r}}};var is={area:e=>({gridArea:e}),template:e=>({gridTemplate:e}),templateAreas:e=>({gridTemplateAreas:e}),column:e=>({gridColumn:e}),columns:e=>({gridTemplateColumns:e}),templateColumns:e=>({gridTemplateColumns:e}),autoColumns:e=>({gridAutoColumns:e}),columnStart:e=>({gridColumnStart:e}),row:e=>({gridRow:e}),rows:e=>({gridTemplateRows:e}),templateRows:e=>({gridTemplateRows:e}),autoRows:e=>({gridAutoRows:e}),rowStart:e=>({gridRowStart:e}),autoFlow:e=>({gridAutoFlow:e})};var J={...Zo,...Yo,...es,...ts,...ns,...rs,...os,...ss,...is};var Z=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"]);I();function ls(e,t,n){let r=e?.context?.analyze;if(!r||!r.emit||t==="warn"&&!r.shouldCapture("warnings")||t==="error"&&!r.shouldCapture("errors"))return;let o=n.map(s=>s?.message||(typeof s=="string"?s:null)).filter(Boolean).join(" ");r.emit({id:`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,ts:Date.now(),type:t==="error"?"error":"warning",level:t,hook:t==="error"?"el.error":"el.warn",element:{key:e.key!=null?String(e.key):null,name:e.__name||null,tag:e.tag||null},message:o||null,args:n})}function Sc(...e){return ls(this,"warn",e),Wr.apply(this,e)}function wc(...e){return ls(this,"error",e),Gr.apply(this,e)}var cs={update:An,remove:En,getDB:Kr,getQuery:Qr,getRootData:Vr,getChildren:Fr,getPath:Mr,nextElement:zr,previousElement:Hr,verbose:mn,warn:Sc,error:wc,variables:qr,spotByPath:Dr,set(e,t){if(this.removeContent(),e!=null){let n=this.context?.__create;n&&n(e,this,"content",t)}this.__ref&&(this.__ref.contentManaged=!0)},reset(e){let t=this.context?.__create;if(!t)return this;let n=this.parent,r=this.key,o=this.parse();return this.remove(),t(o,n,r,e)},lookup(e){let t=this.parent;for(;t;){if(typeof e=="function"){if(e(t))return t}else if(typeof e=="string"){if(t.key===e)return t;if(t[e]&&t[e].__ref)return t[e]}t=t.parent}return null},lookdown(e){let t=this.__ref;if(!t?.__children)return null;for(let n of t.__children){let r=this[n];if(!r)continue;if(typeof e=="function"){if(e(r))return r}else if(typeof e=="string"&&r.key===e)return r;let o=r.lookdown?.(e);if(o)return o}return null},lookdownAll(e,t=[]){let n=this.__ref;if(!n?.__children)return t;for(let r of n.__children){let o=this[r];o&&(typeof e=="function"?e(o)&&t.push(o):typeof e=="string"&&o.key===e&&t.push(o),o.lookdownAll?.(e,t))}return t},getRef(){return this.__ref},getRoot:Lr,getRootState:Nr,getRootContext:Br,getContext:Ur,parse(e){let t={},n=e?new Set(e):null,r=this.__ref?.__exec;for(let o in this)if(!(o==="parent"||o==="node"||o==="__ref")&&!n?.has(o)){if(r&&r[o]!==void 0){t[o]=r[o];continue}typeof this[o]!="function"&&(t[o]=this[o])}return t},parseDeep(e){let t=this.parse(e),n=this.__ref;if(n?.__children)for(let r of n.__children)this[r]?.parseDeep&&(t[r]=this[r].parseDeep(e));return t},keys(){return Object.keys(this)},log(...e){if(e.length){let t={};for(let n of e)t[n]=this[n];console.log(t)}else console.log(this)},setProps(e,t){return this.update(e,t)},setNodeStyles(e){if(this.node?.style)for(let t in e){let n=e[t];if(n==null)continue;let r=t.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()),o=String(n).replace(/\s*!important\s*$/,"");this.node.style.setProperty(r,o,"important")}},call(e,...t){let n=this.context,r=n?.methods?.[e]||n?.functions?.[e]||n?.utils?.[e]||this[e];if(typeof r=="function")return r.call(this,...t)},removeContent(){let e=this.__ref;if(!e?.__children)return;let t=this.content;if(t?.remove){t.remove(),delete this.content;let n=e.__children.indexOf("content");n!==-1&&e.__children.splice(n,1)}t?.node?.parentNode&&t.node.parentNode.removeChild(t.node)}},as=new WeakMap;function vc(e){if(!e)return cs;let t=as.get(e);if(t)return t;t=Object.create(cs);let n=e.methods;if(n)for(let r in n)t[r]=n[r];return as.set(e,t),t}function Rn(e){let t=vc(e.context);Object.setPrototypeOf(e,t)}I();_t();var Cc=(e,t,n)=>{Object.defineProperty(e,t,{value:n,enumerable:!1,configurable:!0,writable:!0})},ve=(e,t)=>{if(ee(t)){let o=t.__raw||t;t.toggle||Object.defineProperty(o,"toggle",{value:function(s,i={}){t[s]=!t[s]},enumerable:!1,configurable:!0}),t.set||Object.defineProperty(o,"set",{value:function(s,i={}){return t.clean({preventStateUpdate:!0}),typeof s=="object"&&s!==null&&t.update(s,i),t},enumerable:!1,configurable:!0}),Object.defineProperty(o,"setByPath",{value:function(s,i,a={}){let c=s.split("."),f=t;for(let l=0;l<c.length-1;l++)f[c[l]]===void 0&&(f[c[l]]={}),f=f[c[l]];return f[c[c.length-1]]=i,t},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"getByPath",{value:function(s){let i=s.split("."),a=t;for(let c=0;c<i.length;c++){if(a==null)return;a=a[i[c]]}return a},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"removeByPath",{value:function(s,i={}){let a=s.split("."),c=t;for(let f=0;f<a.length-1;f++){if(c==null)return t;c=c[a[f]]}return c&&delete c[a[a.length-1]],t},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"reset",{value:function(s={}){let i=t.parse();return t.set(i,s)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"apply",{value:function(s,i={}){if(typeof s=="function"){let a=s(t);return t.update(a,i)}},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"applyFunction",{value:function(s,i={}){if(typeof s=="function")return s(t),t.update(t.parse(),i)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"rootUpdate",{value:function(s,i={}){let a=t;for(;a?.parent&&ee(a.parent);)a=a.parent;return a.update(s,i)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"parentUpdate",{value:function(s,i={}){if(t.parent)return t.parent.update(s,i)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"quietReplace",{value:function(s,i={}){return t.replace(s,{quiet:!0,...i})},enumerable:!1,configurable:!0,writable:!0}),Object.getOwnPropertyDescriptor(o,"root")||Object.defineProperty(o,"root",{get:function(){let s=t;for(;s?.parent&&ee(s.parent);)s=s.parent;return s},enumerable:!1,configurable:!0});return}if(!t||typeof t!="object")return;let n=()=>{for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&delete t[o]},r={update(o){if(!o||typeof o!="object")return t;for(let s in o)t[s]=o[s];return t},apply(o){if(typeof o!="function")return t;let s=o(t);return s?t.update(s):t},parse(){return{...t}},toggle(o){return t[o]=!t[o],t},set(o){if(!o||typeof o!="object")return t;n();for(let s in o)t[s]=o[s];return t},replace(o){return t.set(o)},clean(){return n(),t}};for(let o in r)typeof t[o]!="function"&&Cc(t,o,r[o])};var sh=new Proxy(Object.create(null),{get(){},has(){return!1}});I();var In={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 kc=e=>e.startsWith("aria")&&e.length>4&&e.charCodeAt(4)>=65&&e.charCodeAt(4)<=90?"aria-"+e.charAt(4).toLowerCase()+e.slice(5).replace(/([A-Z])/g,t=>"-"+t.toLowerCase()):e.startsWith("data")&&e.length>4&&e.charCodeAt(4)>=65&&e.charCodeAt(4)<=90?"data-"+e.charAt(4).toLowerCase()+e.slice(5).replace(/([A-Z])/g,t=>"-"+t.toLowerCase()):null,lt=(e,t)=>t.startsWith("aria-")||t.startsWith("data-")||kc(t)||In.default.includes(t)?!0:Object.prototype.hasOwnProperty.call(In,e)?In[e].includes(t):!1;var Ft=(e,t)=>{let n=e.call("exec",t,e);if(n)return _(n)&&n.includes("{{")&&(n=e.call("replaceLiteralsWithObjectFields",n)),n},fs=(e,t)=>{let n=(e.preSrc||"")+(Ft(e,t)||"");if(!n)return;try{return new URL(n),n}catch{}let{context:r}=e;if(!r.files&&!r.assets)return n;if(n.startsWith("/assets/")){let o=n.slice(8),s=r.assets&&(r.assets[n]||r.assets[o]);return s&&s.content?s.content.src:n}if(n.startsWith("/files/")){let o=n.slice(7),s=r.files&&(r.files[n]||r.files[o]);return s&&s.content?s.content.src:n}if(r.assets){let o=r.assets[n];if(o&&o.content)return o.content.src}if(r.files){let o=r.files[n];if(o&&o.content)return o.content.src}return n},us={src:e=>fs(e,e.src),href:e=>Ft(e,e.href),action:e=>Ft(e,e.action),poster:e=>fs(e,e.poster),data:e=>Ft(e,e.data)},ps=e=>{let t=e.tag||"div",n={};for(let r in us)if(e[r]!==void 0&<(t,r)){let o=us[r](e);o!==void 0&&(n[r]=o)}return n};var Ac=1;function Ue(e){return e.length>2&&e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>=65&&e.charCodeAt(2)<=90}function Oc(e){return e.charAt(2).toLowerCase()+e.slice(3)}function Ec(e){return e.toLowerCase()}function Fn(e,t){let n={...e};for(let r in t){let o=n[r],s=t[r];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?n[r]=Fn(o,s):n[r]=s}return n}function re(e,t,n,r={},o){if(e==null||e===!1)return null;(typeof e=="string"||typeof e=="number")&&(e={text:e});let s=Object.create(null);s.key=n||e.key||`_${Ac++}`,s.parent=t||null,s.context=e.context||t?.context||r.context||{},s.context.__create||(s.context.__create=re);let i=s.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:t?.__ref?.root||s,path:t?.__ref?.path?[...t.__ref.path,s.key]:[s.key]};if(n&&!e.extends&&!e.extend){let m=n.indexOf("_");if(m>0){let b=n.substring(0,m),y=s.context?.components;y&&(y[b]||y["smbls."+b])&&(e={extends:b,...e})}}ct(s,e,r);let a=new Set(["childProps","attr","style","scope","data"]),c=s.props&&typeof s.props=="object"?s.props:null;for(let m in e){if(m==="parent"||m==="node"||m==="__ref"||m==="extends"||m==="context"||m==="props")continue;let b=e[m],y=s[m],g=y&&b&&typeof y=="object"&&typeof b=="object"&&!Array.isArray(y)&&!Array.isArray(b)&&typeof y!="function"&&typeof b!="function";g&&m.charCodeAt(0)>=65&&m.charCodeAt(0)<=90?s[m]=Fn(y,b):g&&a.has(m)?s[m]={...y,...b}:s[m]=b}function f(m){for(let b in m){let y=m[b],g=s[b],x=g&&y&&typeof g=="object"&&typeof y=="object"&&!Array.isArray(g)&&!Array.isArray(y)&&typeof g!="function"&&typeof y!="function";x&&b.charCodeAt(0)>=65&&b.charCodeAt(0)<=90?s[b]=Fn(g,y):x&&a.has(b)?s[b]={...g,...y}:s[b]=y}}c&&f(c),e.props&&typeof e.props=="object"&&f(e.props),e.data!==void 0&&(s.data=e.data),e.classlist!==void 0&&(s.classlist=e.classlist),e.text!==void 0&&(s.text=e.text),e.html!==void 0&&(s.html=e.html);let l=s.scope&&typeof s.scope=="object"?s.scope:null,u=t?.scope,p=s.context&&typeof s.context.globalScope=="object"&&s.context.globalScope||null,d=u||p||null;if(e.scope!==void 0||l){let m={};l&&Object.assign(m,l),e.scope!==void 0&&Object.assign(m,e.scope),s.scope=Ht(m,d)}else d&&(s.scope=d);if(e.if!==void 0&&(s.if=e.if),Rn(s),$c(s,t,e),s.if!=null){let m=typeof s.if=="function"?s.if(s,s.state,s.context):s.if;i.__if=!!m}if(i.__if)typeof e.if=="function"&&(i.__ifInitialized=!0);else return t&&(t[s.key]=s),typeof e.if=="function"&&Mn(s,{if:e.if}),s;s.tag||(s.tag=We(s)),Ce("Init",s,r);let h=s.node=Ge(s);if(!h)return s;Ce("AttachNode",s,r),h.setAttribute&&s.key&&h.setAttribute("data-key",s.key),h.setAttribute&&s.context?.scopeSelector&&s.context.scopeSelector!==":root"&&s.context.key&&s.key===s.context.key&&h.setAttribute("data-smbls-app",s.context.key),s.id&&h.setAttribute&&(h.id=s.id),Mn(s,e),Nn(s),hs(s),ms(s,r);try{gs(s,r)}catch(m){if(typeof console<"u"&&console.error){let b=s.__ref?.path?.join(".")||s.key||"<root>";console.error(`[smbls] createChildren failed at ${b}:`,m?.message||m,m?.stack?`
|
|
12
|
-
`+
|
|
1
|
+
"use strict";var SymbolsEmbed=(()=>{var Ve=Object.defineProperty;var bs=Object.getOwnPropertyDescriptor;var _s=Object.getOwnPropertyNames;var Ss=Object.prototype.hasOwnProperty;var w=(t,e)=>()=>(t&&(e=t(t=0)),e);var Dt=(t,e)=>{for(var r in e)Ve(t,r,{get:e[r],enumerable:!0})},ws=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of _s(e))!Ss.call(t,o)&&o!==r&&Ve(t,o,{get:()=>e[o],enumerable:!(n=bs(e,o))||n.enumerable});return t};var Cs=t=>ws(Ve({},"__esModule",{value:!0}),t);var Y,Et,ge=w(()=>{"use strict";Y=globalThis,Et=Y.document});var ye,tr=w(()=>{"use strict";ge();ye=t=>typeof Y<"u"&&(Y.Node&&t instanceof Y.Node||Y.Window&&t instanceof Y.Window||t===Y||t===document)});var I,_,me,v,R,bt,Hr,Ht=w(()=>{"use strict";I=t=>t===null?!1:typeof t=="object"&&t.constructor===Object,_=t=>typeof t=="string",me=t=>typeof t=="number",v=t=>typeof t=="function",R=t=>Array.isArray(t),bt=t=>t===null?!1:typeof t=="object",Hr=t=>t===void 0});var Kr,er=w(()=>{"use strict";xe();Kr=(t,e=[])=>t.reduce((r,n)=>rr(r,$t(n,{exclude:e}),e),{})});function be(t,e,r={}){let{bracketsLength:n=2}=r,o=n===3?"{{{":"{{";if(!t.includes(o))return t;let s=Es[n],i=e||this.state||{},c=this;return t.replace(s,(a,l,f,u)=>{let p=f.trim();if(u){let d=c?.context,h=d?.functions?.[u]||d?.utils?.[u]||d?.methods?.[u]||d?.snippets?.[u]||c?.[u];if(h&&typeof h=="function")try{return String(h.call(c,p)??"")}catch{return""}return""}if(l){let d=(l.match(/\.\.\//g)||[]).length,h=i;for(let x=0;x<d;x++){if(!h||!h.parent)return"";h=h.parent}if(p==="parent")return String(h.value??"");let g=Kt(h,p);return String(g??"")}else{let d=Kt(i,p);if(d!=null)return String(d);let h=c?.context?.polyglot;if(h?.translations){let g=i?.root?.lang||i?.lang||c?.context?.state?.lang||h.defaultLang||"en",x=h.translations[g];if(x){let y=Kt(x,p);if(y!=null&&typeof y!="object")return String(y);for(let b in x){let C=x[b];if(C&&typeof C=="object"&&!Array.isArray(C)){let S=Kt(C,p);if(S!=null&&typeof S!="object")return String(S)}}}let m=Kt(h.translations,p);if(m!=null&&typeof m!="object")return String(m)}return""}})}var Es,Kt,qr=w(()=>{"use strict";Es={2:/{{\s*((?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}/g,3:/{{{(\s*(?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}}/g},Kt=(t,e)=>e.split(".").reduce((r,n)=>r?.[n],t)});var $s,Ts,Ps,Qr,nr=w(()=>{"use strict";$s=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"]),Ts=new Set(["update","__element"]),Ps=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"]),Qr=new Set(["node","context","extends","__element","__ref",...Ps,...$s,...Ts])});var Jr,jt,rr,Zr,$t,xe=w(()=>{"use strict";ge();Ht();er();tr();nr();Jr=t=>t.charCodeAt(0)===95&&t.charCodeAt(1)===95,jt=(t,e,r,n)=>{if(v(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)&&!ye(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 jt(i,e,r,n)}}return t},rr=(t,e,r=Qr)=>Zr(t,e,r,null),Zr=(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)||Jr(s)||s==="constructor"||s==="prototype"||(o?r.has(s):r.includes(s)))continue;let i=t[s],c=e[s];if(bt(i)&&bt(c)){let a=n||[];a.push(t,e),Zr(i,c,r,a),a.length-=2}else i===void 0&&(t[s]=c)}return t},$t=(t,e={})=>{let{exclude:r=[],cleanUndefined:n=!1,cleanNull:o=!1,window:s,visited:i=new WeakMap,handleExtends:c=!1}=e,a=s||Y||globalThis;if(!bt(t)||ye(t))return t;if(i.has(t))return i.get(t);let f=R(t)?[]:{};i.set(t,f);let u=r instanceof Set?r:r.length>3?new Set(r):null;for(let p in t){if(!Object.prototype.hasOwnProperty.call(t,p)||Jr(p)||p==="__proto__"||(u?u.has(p):r.includes(p)))continue;let d=t[p];if(!(n&&d===void 0)&&!(o&&d===null)){if(ye(d)){f[p]=d;continue}if(c&&p==="extends"&&R(d)){f[p]=Kr(d,r);continue}if(v(d)){f[p]=d;continue}bt(d)?f[p]=$t(d,{...e,visited:i}):f[p]=d}}return f}});var Xr=w(()=>{"use strict"});var Yr,Rs,or,tn=w(()=>{"use strict";Yr="production",Rs=(t=Yr)=>t==="production",or=(t=Yr)=>!Rs(t)});var qt,_e=w(()=>{"use strict";qt=(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 en=w(()=>{"use strict"});var rn=w(()=>{"use strict"});var Sa,nn=w(()=>{"use strict";Sa=typeof navigator>"u"?!1:/Mobi/.test(navigator.userAgent)});var on=w(()=>{"use strict"});var sn=w(()=>{"use strict"});var cn=w(()=>{"use strict"});var an=w(()=>{"use strict"});var fn=w(()=>{"use strict"});var ln=w(()=>{"use strict"});var un=w(()=>{"use strict"});var pn=w(()=>{"use strict"});var dn,sr=w(()=>{"use strict";dn={}});var yn={};Dt(yn,{setup:()=>Ds,supabaseAdapter:()=>gn});var hn,Is,Ds,ir,js,gn,mn=w(()=>{"use strict";hn=new Map,Is=(t,e,r)=>`${t}|${e}|${r?"off":"on"}`,Ds=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=Is(a,e,o===!1),f=hn.get(l);return f||(f=await n(a,e,c),f?.auth&&hn.set(l,f)),!f||!f.auth?null:gn(f)},ir=(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},js=(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},gn=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=ir(a,o),a=js(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=ir(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=ir(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 bn={};Dt(bn,{restAdapter:()=>xn,setup:()=>Ms});var Fs,_t,Ms,xn,_n=w(()=>{"use strict";Fs=(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}},Ms=async({url:t,headers:e,auth:r,fetchOptions:n})=>{if(!t)throw new Error("@symbo.ls/fetch rest: url is required");return xn(t,e,r,n)},xn=(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 d=f&&!f.startsWith("/")?"/":"";return`${p}${d}${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:d,offset:h,order:g,single:x,headers:m,baseUrl:y})=>{let b={...u};return p&&(b.select=p),d&&(b.limit=d),h&&(b.offset=h),x&&(b.single=!0),g&&(typeof g=="string"?b.order=g:Array.isArray(g)?b.order=g.map(C=>`${C.by}:${C.asc===!1?"desc":"asc"}`).join(","):g.by&&(b.order=`${g.by}:${g.asc===!1?"desc":"asc"}`)),_t(Fs(y||t,f||"",b),c({headers:s(m)}))},rpc:({from:f,params:u,headers:p,baseUrl:d})=>_t(a(`rpc/${f}`,d),c({method:"POST",headers:i(p),body:JSON.stringify(u)})),insert:({from:f,data:u,headers:p,baseUrl:d})=>_t(a(f,d),c({method:"POST",headers:i(p),body:JSON.stringify(u)})),update:({from:f,data:u,params:p,method:d,headers:h,baseUrl:g})=>{let x=p?.id||u?.id,m=x?`${f}/${x}`:f;return _t(a(m,g),c({method:d||"PATCH",headers:i(h),body:JSON.stringify(u)}))},delete:({from:f,params:u,headers:p,baseUrl:d})=>{let h=u?.id,g=h?`${f}/${h}`:f;return _t(a(g,d),c({method:"DELETE",headers:s(p)}))}}}});var wn={};Dt(wn,{localAdapter:()=>Sn,setup:()=>Ns});var cr,Ls,Ns,Sn,Cn=w(()=>{"use strict";cr=(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},Ls=(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}},Ns=async({data:t,...e})=>Sn(t,e),Sn=(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,d)=>{let h=n[f];if(h)for(let g of h)g(p,d,{event:u,table:f})},l=Date.now();return{name:"local",store:r,select:async({from:f,params:u,...p})=>{let h=i(f).filter(g=>cr(g,u));return Ls(h,p)},insert:async({from:f,data:u})=>{let p=i(f),h=(Array.isArray(u)?u:[u]).map(g=>{let x={id:g.id||++l,...g};return p.push(x),x});c(f);for(let g of h)a(f,"INSERT",g,null);return{data:Array.isArray(u)?h:h[0],error:null}},update:async({from:f,data:u,params:p})=>{let d=i(f),h=[];for(let g=0;g<d.length;g++)if(cr(d[g],p)){let x={...d[g]};Object.assign(d[g],u),h.push(d[g]),a(f,"UPDATE",d[g],x)}return c(f),{data:h,error:null}},delete:async({from:f,params:u})=>{let p=i(f),d=[];for(let h=p.length-1;h>=0;h--)cr(p[h],u)&&(d.push(p[h]),p.splice(h,1),a(f,"DELETE",null,d[d.length-1]));return c(f),{data:d,error:null}},subscribe:({from:f,on:u},p)=>{n[f]||(n[f]=[]);let d=(h,g,x)=>{u&&u!=="*"&&u!==x.event||p(h,g,x)};return n[f].push(d),()=>{let h=n[f].indexOf(d);h>-1&&n[f].splice(h,1)}}}}});var ee={};Dt(ee,{createAdapter:()=>Us,default:()=>Ys,executeFetch:()=>pr,fetchPlugin:()=>Xs,initAdapterAuth:()=>ve,parseDuration:()=>Jt,queryClient:()=>Zs,registerAdapter:()=>Bs,resolveDb:()=>En});var Vs,Se,On,Bs,Us,En,Jt,H,$n,Qt,Ws,te,Zt,Xt,we,lr,Ce,Gs,vn,ar,Tn,Pn,Ft,kn,zs,An,Hs,ke,Rn,ve,ur,nt,ft,Yt,Tt,pt,St,Ks,qs,Qs,fr,Js,pr,Zs,Xs,Ys,re=w(()=>{"use strict";F();Vs=["select","rpc","insert","update","delete","subscribe"],Se=Symbol.for("@symbo.ls/fetch:BUILTIN_ADAPTERS"),On=(()=>{if(typeof globalThis<"u"&&globalThis[Se])return globalThis[Se];let t={supabase:()=>Promise.resolve().then(()=>(mn(),yn)),rest:()=>Promise.resolve().then(()=>(_n(),bn)),local:()=>Promise.resolve().then(()=>(Cn(),wn))};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,Se,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[Se]}catch{}return t})(),Bs=(t,e)=>{On[t]=e},Us=t=>{let e={};for(let r of Vs)t[r]&&(e[r]=t[r]);return e.name=t.name||"custom",e},En=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=On[n];if(!o)throw new Error(`Unknown db adapter: "${n}". Use registerAdapter() for adapters with optional deps.`);return(await o()).setup(r)},Jt=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},H=new Map,$n=new Map,Qt=new Map,Ws=(t,e)=>{if(t.cache?.key)return t.cache.key;let r=Hs(t.params),n=`${t.from}:${t.method}:${JSON.stringify(r||"")}`;return e?`${n}:${e}`:n},te=t=>H.get(t)||null,Zt=(t,e,r)=>{let n=H.get(t),o={data:e,error:r,time:Date.now(),stale:!1};H.set(t,o);let s=$n.get(t);if(s)for(let i of s)v(i)&&i(o);return o},Xt=t=>{if(t){let e=H.get(t);e&&(e.stale=!0);return}for(let[,e]of H)e.stale=!0},we=t=>{if(t){H.delete(t);return}H.clear()},lr=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)}:_(t)?{staleTime:Jt(t),gcTime:3e5}:{staleTime:Jt(t.stale||t.staleTime)||6e4,gcTime:Jt(t.gc||t.gcTime||t.expire)||3e5,key:t.key},Ce=null,Gs=()=>{Ce||(Ce=setInterval(()=>{let t=Date.now();for(let[e,r]of H){let n=$n.get(e);!(n&&n.size>0)&&t-r.time>(r.gcTime||3e5)&&H.delete(e)}},3e4),Ce.unref&&Ce.unref())};Gs();vn=3,ar=t=>Math.min(1e3*2**t,3e4),Tn=t=>{let e=t.retry;return e===!1?{count:0}:e===!0||e===void 0?{count:vn,delay:ar}:typeof e=="number"?{count:e,delay:ar}:{count:e.count??vn,delay:v(e.delay)?e.delay:typeof e.delay=="number"?()=>e.delay:ar}},Pn=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=v(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=v(n)?n(s,i):n;await new Promise(a=>setTimeout(a,c));continue}throw i}return{data:null,error:o}},Ft={focus:new Set,online:new Set},kn=!1,zs=()=>{if(kn||typeof window>"u")return;kn=!0;let t=()=>{for(let r of Ft.focus)r()},e=()=>{for(let r of Ft.online)r()};window.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&t()}),window.addEventListener("focus",t),window.addEventListener("online",e)},An=(t,e)=>{let r=e.__ref;if(t===!0)return{from:r.__state||e.key,method:"select",query:!0,on:"create"};if(_(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},Hs=t=>(!t||v(t),t),ke=(t,e)=>{let r=t?.state?.root||e?.state?.root;if(r?.lang)return r.lang},Rn=(t,e,r)=>{let n;if(!t)n=void 0;else if(v(t))n=t(e,e.state);else{n={};for(let o in t){let s=t[o];n[o]=v(s)?s(e,e.state):s}}return n},ve=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)})},ur=async(t,e)=>{if(v(t.select))return t.auth!==!1&&await ve(t,e),t;if(t.__resolved)return t.auth!==!1&&await ve(t.__resolved,e),t.__resolved;if(t.__resolving)return t.__resolving;t.__resolving=En(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 ve(r,e),r):null},nt=(t,e,...r)=>{let n=v(t[e])?t[e]:null;n&&n.call(t,...r,t,t.state,t.context)},ft=(t,e,r,...n)=>{let o=t&&v(t[r])?t[r]:null;o&&o.call(e,...n,e,e.state,e.context)},Yt=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},Tt=(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||v(t.enabled)&&!t.enabled(e,e.state)||t.skip===!0||v(t.skip)&&t.skip(e,e.state))return;let s=await ur(o,r);if(!s||!e.__ref)return;let i=e.__ref,{from:c,method:a,query:l,params:f,cache:u,transform:p,single:d,auth:h,fields:g,as:x,limit:m,offset:y,order:b,headers:C,baseUrl:S,page:T,cursor:E,getNextPageParam:Z,getPreviousPageParam:B,infinite:X,placeholderData:U,initialData:gt,select:M,keepPreviousData:D}=t,it=_(M)?M:void 0;if(l&&v(e.getQuery)){let P=e.getQuery(s.name||"paths");P&&(it=P.select||P.length&&P.join(",")||it)}let ut=Rn(f,e,r),ct=lr(u),le=Tn(t),Me=ke(e,r),ms=Me?`:${Me}`:"",L=ct?u?.key||`${c}:${a}:${JSON.stringify(ut||"")}${X?":infinite":""}${T?":p"+JSON.stringify(T):""}${ms}`:null;if(!i.__fetchInitialized&&L&&(i.__fetchInitialized=!0,gt!==void 0)){let P=v(gt)?gt():gt;Zt(L,P,null)}if((a==="select"||a==="rpc")&&L&&ct){let P=te(L);if(P&&!P.error){let $=Date.now()-P.time,j=P.stale||$>(ct.staleTime||0),A=P.data;if(v(M)&&(A=M(A,e,e.state)),p&&(A=p(A,e,e.state)),Tt(e,A,x),!j){pt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"});return}}else if(U!==void 0){let $=v(U)?U(e,e.state):U;$!==void 0&&Tt(e,$,x)}}if(L&&Qt.has(L)&&!n.force){let P=Qt.get(L);try{let $=await Promise.race([P,new Promise((j,A)=>setTimeout(()=>A("DEDUP_TIMEOUT"),15e3))]);if($?.data!==void 0){let j=$.data;v(M)&&(j=M(j,e,e.state)),p&&(j=p(j,e,e.state)),Tt(e,j,x),nt(e,"onFetchComplete",j),ft(t,e,"onFetchComplete",j)}}catch{}return}let xs=!te(L)?.data;pt(e,{isFetching:!0,isLoading:xs,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),nt(e,"onFetchStart"),ft(t,e,"onFetchStart");let yt=r?.analyze?.emitNetwork,Le=yt?typeof performance<"u"?performance.now():Date.now():0;yt&&yt({phase:"start",mode:"query",from:c,method:a,cacheKey:L,lang:Me});let Br=Pn(async()=>{if(h!==!1&&s.auth!==!1&&s.getSession){let A=await s.getSession();if(h===!0&&!A){let z={message:"Not authenticated"};return pt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:z,status:"error",fetchStatus:"idle"}),nt(e,"onFetchError",z),ft(t,e,"onFetchError",z),{data:null,error:z}}}let P=s[a];if(!v(P))return{data:null,error:{message:`Method "${a}" not found on adapter`}};let $={from:c,select:it,params:ut,single:d,limit:m,offset:y,order:b,headers:C,baseUrl:S},j=ke(e,r);if(j&&($.headers={...$.headers,"Accept-Language":j}),T!==void 0){if(I(T))T.offset!==void 0&&($.offset=T.offset),T.limit!==void 0&&($.limit=T.limit),T.cursor!==void 0&&($.params={...$.params,cursor:T.cursor});else if(typeof T=="number"){let A=t.pageSize||m||20;$.offset=(T-1)*A,$.limit=A}}if(E!==void 0&&($.params={...$.params,cursor:E}),a==="insert"||a==="update"||a==="upsert"){let A;if(g===!0||t.on==="submit")A=Yt(e);else if(R(g)){let z=Yt(e);A={};for(let Ne of g)A[Ne]=z[Ne]}else e.state?.parse?A=e.state.parse():I(e.state)&&(A={...e.state});p&&(A=p(A,e,e.state)),$.data=A}if(a==="rpc"){let A=ut;if(t.on==="submit"){let z=Yt(e);A=t.transformParams?t.transformParams(z,e,e.state):z}$.params=A}if(a==="subscribe"){let A=s.subscribe({from:c,params:ut,on:t.subscribeOn},(z,Ne,Nc)=>{Tt(e,z,x),nt(e,"onFetchComplete",z),ft(t,e,"onFetchComplete",z)});return i.__unsubscribe=A,{data:null,error:null,subscribed:!0}}return P($)},le);L&&Qt.set(L,Br);try{let P=await Br;if(P?.subscribed)return;let{data:$,error:j}=P||{};if(j){L&&Zt(L,null,j),pt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:j,status:"error",fetchStatus:"idle"}),nt(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())-Le});return}if($!==void 0){if((a==="select"||a==="rpc")&&L){let z=Zt(L,$,null);z.gcTime=ct?.gcTime||3e5}let A=$;X&&R($)&&(i.__pages||(i.__pages=[]),n.direction==="previous"?i.__pages.unshift($):i.__pages.push($),A=i.__pages.flat(),Z&&(i.__nextPageParam=Z($,i.__pages),i.__hasNextPage=i.__nextPageParam!=null),B&&(i.__prevPageParam=B($,i.__pages),i.__hasPreviousPage=i.__prevPageParam!=null)),v(M)&&(A=M(A,e,e.state)),p&&(A=p(A,e,e.state)),(!D||A!==void 0)&&Tt(e,A,x),pt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),nt(e,"onFetchComplete",A),ft(t,e,"onFetchComplete",A),yt&&yt({phase:"success",mode:"query",ok:!0,from:c,method:a,cacheKey:L,durationMs:(typeof performance<"u"?performance.now():Date.now())-Le})}}catch(P){pt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:P,status:"error",fetchStatus:"idle"}),nt(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())-Le})}finally{L&&Qt.delete(L)}},Ks=(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))},qs=(t,e,r)=>{let n=e.__ref;n.__fetchCleanups||(n.__fetchCleanups=[]),zs();let o=t.refetchInterval;if(o){let s=typeof o=="number"?o:Jt(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=ke(e,r),c=Ws(t,i),a=te(c),l=lr(t.cache);(!a||a.stale||Date.now()-a.time>(l?.staleTime||0))&&St(t,e,r,{force:!0})};Ft.focus.add(s),n.__fetchCleanups.push(()=>Ft.focus.delete(s))}if(t.refetchOnReconnect!==!1){let s=()=>St(t,e,r,{force:!0});Ft.online.add(s),n.__fetchCleanups.push(()=>Ft.online.delete(s))}},Qs=(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=v(e.optimistic)?e.optimistic(r,s,t):e.optimistic;return i!==void 0&&Tt(t,i,o),s},fr=(t,e)=>{let r=t.__ref,n=r.__optimisticSnapshot;n!==void 0&&(Tt(t,n,e.as),delete r.__optimisticSnapshot)},Js=async(t,e,r)=>{let n=r?.fetch;if(!n)return;let o=await ur(n,r);if(!o)return;let s=e.__ref,{method:i,from:c,fields:a,transform:l,as:f,on:u,auth:p,headers:d,baseUrl:h,invalidates:g,optimistic:x,onMutate:m,onSuccess:y,onError:b,onSettled:C}=t,S;if(a===!0||u==="submit")S=Yt(e);else if(R(a)){let B=Yt(e);S={};for(let X of a)S[X]=B[X]}else e.state?.parse?S=e.state.parse():I(e.state)&&(S={...e.state});l&&(S=l(S,e,e.state)),v(m)&&m(S,e,e.state);let T=x?Qs(e,t,S):null;s.__fetching=!0,pt(e,{isFetching:!0,isLoading:!1,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),nt(e,"onFetchStart"),ft(t,e,"onFetchStart");let E=r?.analyze?.emitNetwork,Z=E?typeof performance<"u"?performance.now():Date.now():0;E&&E({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){T!==void 0&&fr(e,t);let ct={message:"Not authenticated"};nt(e,"onFetchError",ct),ft(t,e,"onFetchError",ct);return}}let B=o[i];if(!v(B))return;let X={from:c,data:S,headers:d,baseUrl:h};t.params&&(X.params=Rn(t.params,e,r));let U=ke(e,r);U&&(X.headers={...X.headers,"Accept-Language":U});let gt=Tn(t),M=await Pn(()=>B(X),gt),{data:D,error:it}=M||{};if(it){T!==void 0&&fr(e,t),pt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:it,status:"error",fetchStatus:"idle"}),nt(e,"onFetchError",it),v(b)&&b(it,S,e),v(C)&&C(null,it,S,e),E&&E({phase:"error",mode:"mutation",from:c,method:i,error:it.message||String(it),durationMs:(typeof performance<"u"?performance.now():Date.now())-Z});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"}),nt(e,"onFetchComplete",D),ft(t,e,"onFetchComplete",D),v(y)&&y(D,S,e),v(C)&&C(D,null,S,e),E&&E({phase:"success",mode:"mutation",ok:!0,from:c,method:i,durationMs:(typeof performance<"u"?performance.now():Date.now())-Z}),g){let ut=R(g)?g:[g];for(let ct of ut)if(ct===!0||ct==="*")for(let[le]of H)le.startsWith(c+":")&&Xt(le);else Xt(ct)}}catch(B){T!==void 0&&fr(e,t),pt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:B,status:"error",fetchStatus:"idle"}),nt(e,"onFetchError",B),ft(t,e,"onFetchError",B),v(b)&&b(B,S,e),v(C)&&C(null,B,S,e),E&&E({phase:"error",mode:"mutation",from:c,method:i,error:B.message||String(B),durationMs:(typeof performance<"u"?performance.now():Date.now())-Z})}finally{s.__fetching=!1}},pr=(t,e,r,n)=>{if(!t||!n?.fetch)return;let s=jt(t,e);if(!s)return;let i=R(s)?s.map(a=>An(jt(a,e),e)).filter(Boolean):[An(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?Js:St;a.on==="create"?f(a,e,n):Promise.resolve().then(()=>{Ks({...a,__runner:f},e,n)}),!l&&a.on==="create"&&(a.refetchInterval||a.refetchOnWindowFocus!==!1||a.refetchOnReconnect!==!1)&&qs(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})}},Zs={invalidateQueries:t=>{if(!t){Xt();return}if(_(t))for(let[e]of H)(e.startsWith(t)||e.includes(t))&&Xt(e);else if(R(t)){let e=t.join(":");for(let[r]of H)r.includes(e)&&Xt(r)}},removeQueries:t=>{if(!t){we();return}if(_(t))for(let[e]of H)(e.startsWith(t)||e.includes(t))&&we(e)},getQueryData:t=>te(t)?.data??void 0,setQueryData:(t,e)=>{let r=te(t),n=v(e)?e(r?.data):e;Zt(t,n,null)},prefetchQuery:async(t,e)=>{let r=e?.fetch;if(!r)return;let n=await ur(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(!v(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=Zt(o,i.data,null);c.gcTime=lr(t.cache)?.gcTime||3e5}return i},getCache:()=>H,clear:()=>we(),dropNonLang:t=>{if(!t)return;let e=`:${t}`;for(let[r]of H)r.match(/:([a-z]{2,3})$/i)&&(r.endsWith(e)||we(r))}},Xs={name:"fetch",create(t){let e=t.fetch;e&&(t.parent||Qt.clear(),pr(e,t,t.state,t.context))}},Ys=pr});function jn(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 Fn(){return this.getRef("__children").map(e=>this[e])}function Mn(){return this.getRef().path}function Ln(t){let e=null,r=n=>n.__element&&n.root?.isRootState;if(!this)e=In();else if(r(this))e=this.root;else if(this.__ref&&this.__ref.path){let n=this.state&&r(this.state),o=v(this.state)&&this.parent.state&&r(this.parent.state);(n||o)&&(e=this.state.root||this.parent.state.root)}return e||(e=In()),t?e?.[t]:e}function Nn(t){let e=this.getRootState()?.__element;return e&&Object.keys(e).length>0&&t?e[t]:e}function Vn(t){return this.getRoot("data")&&Object.keys(this.getRoot("data")).length>0&&t?this.getRoot("data")[t]:this.getRoot("data")}function Bn(t){let e=this.getRoot()?.context;return t?e[t]:e}function Un(t){let e=this.context;return t?e[t]:e}function hr(...t){if(Mt!=="test"&&Mt!=="development")return;let e=this,{__ref:r}=e;return console.groupCollapsed(e.key),t.length?t.forEach(n=>console.log(`%c${n}:
|
|
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 Wn(...t){(Mt==="test"||Mt==="development")&&console.warn(...t)}function Gn(...t){if(Mt==="test"||Mt==="development"){if(t[t.length-1]?.debugger)debugger;throw t[t.length-1]?.verbose&&hr.call(this),new Error(...t)}}function zn(){let t=this,{key:e,parent:r}=t,{__children:n}=r.__ref,o=n.indexOf(e),s=n[o+1];return r[s]}function Hn(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 Kn(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,$t(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 qn(){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(()=>(re(),ee));await o(e,t.context)}return e}if(e.__resolved){if(!e.__resolved.__authInitialized&&e.__resolved.getSession){let{initAdapterAuth:o}=await Promise.resolve().then(()=>(re(),ee));await o(e.__resolved,t.context)}return e.__resolved}if(e.__resolving)return e.__resolving;let r=Promise.resolve().then(()=>(re(),ee)).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(()=>(re(),ee));await o(n,t.context)}return n}function Qn(t){let e=this,r=t||dn.useStateQuery||e.context?.useStateQuery;if(!r)return null;let n={};if(dr(e,n),r===!0)return n;let o=ai[r];return o?o(n):n}var Mt,ti,In,dr,ei,Jn,ri,ni,oi,si,ii,ci,ai,Zn=w(()=>{"use strict";Ht();xe();sr();Mt="production";ti=null,In=()=>ti||null;dr=(t,e)=>{let r=t.__ref;if(!r)return;let n=r.__state;n&&typeof n=="string"&&ei(e,n);let o=r.__children;if(o)for(let c=0;c<o.length;c++){let a=t[o[c]];a&&a.__ref&&dr(a,e)}let s=r.contentElementKey||"content",i=t[s];i&&i.__ref&&dr(i,e)},ei=(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])}},Jn=(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
|
+
${Jn(i,e+1)}
|
|
4
|
+
${r}}`).join(`
|
|
5
|
+
`):""},ri=t=>`{
|
|
6
|
+
${Jn(t,1)}
|
|
7
|
+
}`,ni=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},oi=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("&")},si=(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 d in f)f[d]===!0?r.push(`${u}.${d}`):s(f[d],d,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
|
+
`+n.join(`
|
|
9
|
+
`):"";return`SELECT ${a}
|
|
10
|
+
FROM ${c}${l}`},ii=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},ci=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)}},ai={graphql:ri,"json-api":ni,odata:oi,sql:si,supabase:ci,paths:ii}});var Xn=w(()=>{"use strict"});var Yn=w(()=>{});var to=w(()=>{"use strict"});var eo=w(()=>{"use strict"});var ro=w(()=>{"use strict"});var no=w(()=>{"use strict"});var oo=w(()=>{"use strict"});var so=w(()=>{"use strict"});var io=w(()=>{"use strict"});var co=w(()=>{"use strict"});var ao=w(()=>{"use strict"});var fo=w(()=>{"use strict"});var lo,uo,po,ho=w(()=>{"use strict";Ht();lo=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,"")),uo=t=>t.replace(/[^a-zA-Z0-9]/g," ").trim().toLowerCase().replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),po=t=>{if(R(t))return t;if(_(t))return t.split(" ");if(I(t))return Object.values(t);if(me(t))return[t]}});var go=w(()=>{"use strict"});var yo=w(()=>{"use strict"});var F=w(()=>{"use strict";Xr();tn();Ht();xe();_e();er();tr();en();rn();qr();ge();nn();on();cn();an();sn();fn();ln();nr();un();Zn();sr();Xn();pn();Yn();to();eo();ro();no();oo();so();io();co();ao();fo();ho();go();yo()});var Mc={};Dt(Mc,{FACTORY:()=>Te,REGISTRY:()=>q,applyExtends:()=>ce,batch:()=>mt,create:()=>st,createEffect:()=>N,createElement:()=>jc,createSignal:()=>at,createStore:()=>et,getActiveConfig:()=>O,mount:()=>Fc,popConfig:()=>K,pushConfig:()=>Q,registerEvent:()=>ie});var At=null,ue=0,pe=[],de=()=>At;function at(t){let e=new Set;function r(){return At&&(e.add(At),At._sources.add(s)),t}function n(i){i!==t&&(t=i,As(e))}function o(){return t}let s={get:r,set:n,peek:o,_subscribers:e,_type:"signal"};return s}var Be=new Set,Ue=!1;function N(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;Ur(n);let o=At;At=n;try{t()}catch(s){console.error("[smbls] effect error:",s)}finally{At=o}},_notify(){n._disposed||(ue>0?pe.push(n):Wr(n))},dispose(){n._disposed=!0,Ur(n)}};return n._execute(),n}function mt(t){ue++;try{t()}finally{ue--,ue===0&&ks()}}function Wr(t){Be.add(t),Ue||(Ue=!0,queueMicrotask(vs))}function vs(){Ue=!1;let t=Array.from(Be).sort((e,r)=>e._depth-r._depth);Be=new Set;for(let e=0;e<t.length;e++){let r=t[e];r._disposed||r._execute()}}function ks(){for(let t=0;t<pe.length;t++)Wr(pe[t]);pe.length=0}function As(t){let e=Array.from(t);for(let r=0;r<e.length;r++)e[r]._notify()}function Ur(t){for(let e of t._sources)e._subscribers.delete(t);t._sources.clear()}var Ot=Symbol("store"),ze=Symbol("signals"),We=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"&&!We(y)?(o[m]=y,n[m]=at(et(y,e,r+1))):(o[m]=y,n[m]=at(y))}let i=new Proxy(o,{get(m,y){if(y===Ot)return!0;if(y===ze)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 d;if(y==="add")return h;if(y==="remove")return g;if(y==="destroy")return x;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"&&de()!=null)return n[y]=at(void 0),n[y].get()},set(m,y,b){return y==="__proto__"?!1:y==="__element"||y==="parent"||y==="root"?(m[y]=b,!0):(Object.prototype.hasOwnProperty.call(n,y)?(m[y]=b,b&&typeof b=="object"&&!We(b)?n[y].set(et(b,e,r+1)):n[y].set(b)):(m[y]=b,b&&typeof b=="object"&&!We(b)?n[y]=at(et(b,e,r+1)):n[y]=at(b)),!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 C in m)C!=="__proto__"&&(i[C]=m[C])});let b=o.__element;return b&&b.onUpdate&&!y?.quiet&&b.onUpdate(b,i,b.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 b in n){if(b==="parent"||b==="root"||b.startsWith("__"))continue;let C=n[b].peek();C&&C[Ot]?y[b]=C.parse(m):y[b]=C}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 d(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 h(m,y){return i[m]=y,i}function g(m){return delete i[m],i}function x(){f(),o.__element=null,o.parent=null}return i}function rt(t){return t&&t[Ot]===!0}function He(t,e){let r={},n={};if(t&&typeof t=="object")for(let i in t)n[i]=t[i],r[i]=at(t[i]);let o=i=>{if(Object.prototype.hasOwnProperty.call(r,i))return r;let c=e;for(;c;){let a=c[ze];if(a&&Object.prototype.hasOwnProperty.call(a,i))return a;c=c[Ot]?c[Ge]:null}return null};return new Proxy(n,{get(i,c){return c===Ot?!0:c===ze?r:c===Ge?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]=at(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[Ge]: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 Ge=Symbol("scope.parent");var Ke="http://www.w3.org/2000/svg",Je=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"]),Os=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 qe(t){return Os.has(t)||Je.has(t)}function Ze(t){return Je.has(t)}function Wt(t){let{tag:e,key:r}=t;if(typeof e=="function"&&(e=e(t)),e===!0&&(e=r),typeof e=="string"&&qe(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]),qe(o)&&!n.has(o)?o:"div"}var Gr={};function Qe(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(Ze(t)){let n=e?.parent;if(t==="svg"||n?.node?.namespaceURI===Ke)return r.createElementNS(Ke,t);if(t!=="svg")return r.createElement("div")}return r.createElement(t)}function Gt(t){let e=t.tag=Wt(t),n=Ze(e)&&(e==="svg"||t.parent?.node?.namespaceURI===Ke)?"svg:"+e:e,o=t?.context?.document||globalThis.document,s=Gr[n];if(s||(s=Gr[n]=Qe(e,t)),!s)return null;let i=o&&s.ownerDocument!==o?Qe(e,t):s.cloneNode(!0);return e==="string"&&(i.nodeValue=t.text||""),i}var q=new Set(["extends","children","content","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","__name","__ref","__hash","__text","parent","node"]);var zt=new Set(["start","init","complete","attachNode","stateInit","stateCreated","beforeUpdate","update","afterUpdate","beforeClassAssign","lazyLoad","render","renderRouter","done","create","frame","startUpdate","stateUpdate","beforeStateUpdate","initInspect","initSync","error","beforeRemove","remove"]),zr=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),Xe=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 Ye=t=>t==="em"||t==="rem"||t==="vw"||t==="vh"||t==="vmax"||t==="vmin",he=["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"];F();var mo=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&&Et&&Y){let e=Et.body.appendChild(Et.createElement("fictum")),r="rgb(1, 2, 3)";if(e.style.color=r,e.style.color!==r){Et.body.removeChild(e);return}if(e.style.color=t,e.style.color===r||e.style.color==="")return Et.body.removeChild(e),[0,0,0,0];t=Y.getComputedStyle(e).color,Et.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 fi=(t,e=1)=>{let[r,n,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return[r,n,o]};var li=([t,e,r])=>((1<<24)+(t<<16)+(e<<8)+r).toString(16).slice(1);var ui=(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]},pi=(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)],di=(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)/,hi=/^([a-zA-Z]\w*)(?:\.(\d+))?(?:([+-]\d+|=\d+))?$/,ne=t=>{if(!_(t))return null;if(Pt.test(t))return{passthrough:t};if(W(t))return{cssVar:t};let e=t.match(hi);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}},Lt=t=>_(t)&&(t.includes("rgb")||t.includes("var(")||t.includes("#")),Ae=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},xo=(t,e)=>{_(t)&&t.includes("rgb")&&(t=mo(t).join(", ")),_(t)&&(t=t.split(",").map(o=>parseFloat(o.trim()))),me(e)&&(e+="");let r=li(t),n=e.slice(0,1);if(n==="-"||n==="+"){let o=di(r,parseFloat(e));return fi(o).join(", ")}else{let[o,s,i]=t,c=ui(o,s,i),[a,l,f]=c;return pi(a,l,parseFloat(e)/100*255)}};var gr=(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};F();F();F();var Oe={};Dt(Oe,{animation:()=>ji,breakpoints:()=>Ii,class:()=>Bi,color:()=>vi,devices:()=>Di,document:()=>Ri,font:()=>mi,fontFace:()=>_i,fontFamily:()=>xi,fontFamilyTypes:()=>bi,gradient:()=>ki,grid:()=>Vi,icons:()=>Ei,media:()=>Si,reset:()=>Ui,semanticIcons:()=>$i,sequence:()=>Rt,shadow:()=>Oi,spacing:()=>Ci,svg:()=>Fi,svgData:()=>Mi,templates:()=>Li,theme:()=>Ai,timing:()=>Pi,typography:()=>yr,unit:()=>gi,vars:()=>Wi});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 gi={default:"em"};var yi={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:{}},yr=yi;var mi={};var xi={},bi={"sans-serif":"Helvetica, Arial, sans-serif, --system-default",serif:"Times New Roman, Georgia, serif, --system-default",monospace:"Courier New, monospace, --system-default"},_i={};var Si={tv:"(min-width: 2780px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var wi={base:yr.base,type:"spacing",ratio:Rt.phi,range:[-5,15],subSequence:!0,mediaRegenerate:!1,unit:"em",sequence:{},scales:{},vars:{}},Ci=wi;var vi={},ki={};var Ai={};var Oi={};var Ei={},$i={};var Ti={default:150,base:150,type:"timing",ratio:Rt["perfect-fourth"],range:[-3,12],mediaRegenerate:!1,unit:"ms",sequence:{},scales:{},vars:{}},Pi=Ti;var Ri={};var Ii={screenL:1920,screenM:1680,screenS:1440,tabletL:1366,tabletM:1280,tabletS:1024,mobileL:768,mobileM:560,mobileS:480,mobileXS:375},Di={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 ji={};var Fi={},Mi={};var Li={};var Ni={},Vi=Ni;var Bi={};var Ui={},Wi={};var bo={},_o={},Ee=Oe,$e={},So=t=>t.replace(/_([a-z])/g,(e,r)=>r.toUpperCase());for(let t in Ee){let e=t.toLowerCase();$e[e]=Ee[t];let r=So(e);r!==e&&($e[r]=Ee[t]),e!==t&&($e[t]=Ee[t])}var mr={verbose:!1,useVariable:!0,useReset:!0,globalTheme:"auto",cssVars:bo,cssMediaVars:_o,CSS_VARS:bo,CSS_MEDIA_VARS:_o,_scratchConfig:!0,...$e},Rl=$t(mr),Te={active:"0",0:mr};var oe=[],Q=t=>{t&&t._scratchConfig&&oe.push(t)},K=()=>{oe.pop()},O=t=>oe.length?oe[oe.length-1]:Te[t||Te.active]||mr;var Pe={"-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"},wo=(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=Co.has(e.unit)?"rem":e.unit;e.vars[n]=s+a},Nt=t=>{if(!t.includes("("))return t;let e=t.split("(")[0],r=t.slice(t.indexOf("(")+1,t.lastIndexOf(")"));return[e,r]},Co=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),Gi=(t,e)=>{let{base:r,type:n,unit:o}=e,s=Co.has(o)?"rem":o,i=(Ye(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=Pe[t-1];return`calc(var(${a}-${f}) * var(${l}))`}if(t<0){let f=Pe[t+1],u=Math.abs(t),p=Math.pow(vo,2*u),d=Pe[u];return d?`max(calc(var(${a}-${f}) / var(${l})), calc(var(${a}-${d}) / ${p.toFixed(4)}))`:`calc(var(${a}-${f}) / var(${l}))`}},zi=(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}))`},Hi=(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 Ki=(t,e)=>{let{key:r,base:n,value:o,ratio:s,variable:i,index:c}=t,l=~~(o*s)-~~o,f,[u,p,d]=Hi(o,s);l>16?f=[u,p,d]:f=[u,d],f.forEach((h,g)=>{let x=~~(h/n*1e3)/1e3,m=i+(g+1),y=c+(g+1)/10,b=zi(g+1,f,i,e),C={key:r+(g+1),variable:m,value:h,scaling:x,scalingVariable:b,index:y};wo(C,e)})},vo=1.618,qi=(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(vo,2*n);return Math.max(o,s)},Re=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=Pe[f],p=qi(f,r,n),d=~~(p/r*100)/100,h=a+u,g=Gi(f,t),x={key:u,variable:h,value:p,base:r,scaling:d,scalingVariable:g,ratio:n,index:f};wo(x,t),s&&Ki(x,t)}return t};var ko=(t="A",e)=>{let r=O(),{unit:n}=r;if(_(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(he.some(b=>t.includes(b))||!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+"-":""}${uo(e.type.replace(".","-"))}-`,d=t.toUpperCase(),h=d.slice(0,1)==="-"?"-":"",g=h?d.slice(1):d,x="";g.includes("_")&&(x="_"+g.split("_")[1].toLowerCase(),g=g.split("_")[0]);let m=b=>c.test(b)?`var(${p}${b}${x})`:b;if(g.includes("+")){let[b,C]=g.split("+"),S=`${m(b)} + ${m(C)}`;return h?`calc((${S}) * -1)`:`calc(${S})`}else if(g.includes("*")){let[b,C]=g.split("*"),S=`${m(b)} * ${m(C)}`;return h?`calc((${S}) * -1)`:`calc(${S})`}else if(g.includes("-")){let[b,C]=g.split("-"),S=`${m(b)} - ${m(C)}`;return h?`calc((${S}) * -1)`:`calc(${S})`}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 b=`var(${p}${g}${x})`;return h?`calc(${b} * -1)`:b}let y=o?o[g]:null;return y?s==="ms"||s==="s"?h+y.val+s:h+y.scaling+s:console.warn("can't find",o,g)},Qi=(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:ko(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=Nt(t);n=s[0],t=s[1]}return["+","-","*","/",","].filter(s=>t.includes(s+" ")).length?t=Qi(t,r):t=ko(t,r),{[e]:n?`${n}(${t})`:t}};F();var ql=or();var Ji="line|circle|ellipse|rect|polyline|polygon|path|stop|use|image",Ql=new RegExp(`<(${Ji})\\b([^>]*?)\\s*/>`,"g");F();var dt=(t,e,r)=>{let n=r||O();if(!_(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=ne(t);if(!u){let{color:p,gradient:d}=n,h=d[t]||p[t];return h?n.useVariable?`var(${h.var})`:h.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=xo(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},ot=(t,e,r)=>{let n=r||O();if(e||(e=n.globalTheme==="auto"?null:n.globalTheme),!_(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=ne(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};F();var xr=t=>{let e=O(),r={};for(let n in t){let o=n.slice(0,1);if(bt(t[n])){if(o==="@")continue;o===":"?r[`&${n}`]=xr(t[n]):o==="."&&(r[`&${n}`]=xr(t[n]))}else r[n]=t[n]}return r},Oo=(t,e)=>{let r=e.shift();return t[r]?Oo(t[r],e):t},Ao=(t,e)=>R(e)?Oo(t,e):_(e)&&t[e]?t[e]:t;var se=(t,e)=>{let r=O();if(_(t)&&W(t)&&(t=se(t.slice(2))),!t||!_(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=Ao(s,o):s&&e&&(s=Ao(s,e)),xr(s)};var Eo=(t,e)=>{let r=O(),{fontFamily:n}=r;return gr(e||n,t)};var To=t=>{let e=O(),{typography:r}=e;return It(t,"fontSize",r)};F();F();var Po=t=>{let e=t.toLowerCase(),r=e.includes("width")||e.includes("height"),n=e.includes("border")||e.includes("outline");return r&&!n};var Yi=t=>{let e=O(),{spacing:r}=e;return!t||!t.sequence?r:Object.keys(t.sequence).length>0?t:Re(t)},G=(t,e="padding",r,n)=>{let o=Yi(r);if(_(t)&&!n&&t.includes("(")){let i=Nt(t);n=i[0],t=i[1]}let s=n?[t]:po(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)}},Vt=(t,e,r,n)=>{let o=O(),{spacing:s}=o,i=r||t[e];if(!n&&_(i)&&i.includes("(")){let c=Nt(i);n=c[0],i=c[1]}if(t.spacingRatio){let c=applyCustomSequence(t);return G(i,e,c,n)}return G(i,e,s,n)},Ro=t=>{let e=r=>{let n=["+","-","*","/"].includes(r),o=he.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(" ")};F();var Io=(t,e)=>{let r=O();if(e||(e=r.globalTheme),!_(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};F();var xt=t=>{let e=O(),{timing:r}=e;return r[t]||r[lo(t)]||t},ht=(t,e="timing")=>{let r=O(),{timing:n}=r;return It(t,e,n)};F();var ec=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial"]),rc=new Set(["to","top","bottom","left","right","center","at","circle","ellipse","closest-side","farthest-side","closest-corner","farthest-corner"]),nc=t=>ec.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(nc(o)||/^\d/.test(o)||o==="0")return o;let s=dt(o);if(Lt(s))return s;let i=G(o,"border");return i&&i.border?i.border:o}).join(" ")},Do=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 Lt(r)?r:e}).join(" "),jo=(t,e)=>Io(t,e),br=(t,e)=>Pt.test(t)?t:Ae(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(Lt(o)){let i=ot(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=G(n,"shadow");return s&&s.shadow?s.shadow:n}).join(" "):"")).join(", "),_r=(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=Ae(o).map(a=>(a=a.trim(),a.split(/\s+/).map(f=>{if(!f||/^\d/.test(f)||f==="0"||rc.has(f)||f==="transparent"||Pt.test(f))return f;let u=dt(f);return Lt(u)?u:f}).join(" ")));return n+c.join(", ")+s},Fo=(t,e)=>{let r=O();return t.split(", ").map(n=>W(n)?`var(${n})`:n.includes("url")?n:n.includes("gradient")?_r(n,e):r.gradient[t]?{backgroundImage:ot(t,e||r.globalTheme)}:n.includes("/")||n.startsWith("http")||n.includes(".")&&!ne(n)?`url(${n})`:n).join(" ")},Mo=t=>_(t)&&t.split(" ").map(e=>G(e,"gap").gap).join(" "),oc=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:xt(r)?xt(r):r).join(" "):t},Sr=(t,e,r)=>{if(_(t))return t.split(",").map(n=>ht(n).timing||n).join(",")},Lo=t=>{let e=t.split(",");if(e.length)return e.map(oc).join(",")};function V(t,e,r={},n={}){let o=jt.call(this,e||r[t]);if(o==null)return;let s;if(_(o)){if(o.includes("(")){let a=Nt(o);s=a[0],o=a[1]}let i=r.scaleBoxSize,c=Po(t);!i&&c&&!n.ratio&&(o=Ro(o))}return n.ratio?Vt(r,t,o,s):G(o,t,void 0,s)}var k=(t,e=null,r)=>V(t,e,r,{ratio:!0}),wr=(t,e,r)=>{if(_(t))return{borderRadius:t.split(" ").map((n,o)=>Vt(e,r,n)[r]).join(" ")}};var Cr=new WeakMap,sc={passive:!0},ic={passive:!0,capture:!0},vr=(t,e)=>zr.has(t)?e?ic:sc:e||!1;function Vo(t){let e=Cr.get(t);return e||(e={handlers:new Map,installed:new Set},Cr.set(t,e)),e}function cc(t,e){let r=Vo(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}},vr(t,n))}function Bo(t,e,r,n){n||(n=e.ownerDocument?.documentElement||e.getRootNode());let o=Vo(n);cc(t,n),o.handlers.has(t)||o.handlers.set(t,new WeakMap),o.handlers.get(t).set(e,r)}function Uo(t,e,r){r||(r=e.ownerDocument?.documentElement||e.getRootNode());let n=Cr.get(r);if(!n)return;let o=n.handlers.get(t);o&&o.delete(e)}function No(t){return Xe.has(t)&&!zt.has(t)}function ie(t,e,r){let{node:n,context:o}=e;if(!n)return;let s=o?.designSystem,i=c=>{s&&Q(s);try{let a=r.call(e,c,e,e.state,o);if(a&&typeof a.then=="function"){a.catch(l=>{e.error=l,console.error("[DOMQL] Async event error:",l)}).finally(()=>{s&&K()});return}}catch(a){if(e.error=a,console.error("[DOMQL] Event error:",a),o?.strictMode)throw a}s&&K()};if(No(t)){let c=o?.rootNode||n.ownerDocument?.documentElement;Bo(t,n,i,c)}else n.addEventListener(t,i,vr(t,!1));e.__ref.__eventCleanup||(e.__ref.__eventCleanup=[]),e.__ref.__eventCleanup.push(()=>{if(No(t)){let c=o?.rootNode||n.ownerDocument?.documentElement;Uo(t,n,c)}else n.removeEventListener(t,i,vr(t,!1))})}function Wo(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 ce(t,e,r){let n=Wo(e);if(!n.length)return;let s=(t.context||r?.context||{}).components||{};for(let i=0;i<n.length;i++){let c=Go(n[i],s);c&&c!==e&&zo(t,c,r,new Set([e]))}}function Go(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 zo(t,e,r,n=new Set){if(n.has(e))return;n.add(e);let o=Wo(e);if(o.length){let i=(t.context||r?.context||{}).components||{};for(let c=0;c<o.length;c++){let a=Go(o[c],i);a&&zo(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]=Ho(t[s],i):t[s]=i}}function Ho(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]=Ho(o,s):r[n]=s}return r}_e();function kr(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&&rt(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(q.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&&st(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 qt("update",r),!e.preventListeners&&typeof r.onUpdate=="function"&&r.onUpdate(r,r.state,r.context,e),r}}function Ar(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&&Ar(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 Or(){Ar(this)}F();var ae=new Map,ac=null,Ko=null;function Zo(){try{let t=O();if(t?.document)return t.document}catch{}return typeof document<"u"?document:null}var fc={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 Ie(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function De(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 lc(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():De(e)}function qo(t,e,r){let n=(r?r+"":"")+t+":"+e,o=ae.get(n),s=o?null:Ie(t);if(!o){let c=fc[t]||De(t),a=lc(e);o=r?`_${r}_${c}-${a}`:`_${c}-${a}`,ae.set(n,o)}if(typeof e=="string"&&(e.indexOf("}")!==-1||e.indexOf("{")!==-1))return o;let i=`.${o}{${s||Ie(t)}:${e}}`;return Ct(i),o}var Qo=new WeakMap;function Ct(t,e){let r=uc(e);if(!r)return;let n=Qo.get(r);if(n||(n=new Set,Qo.set(r,n)),!n.has(t)){n.add(t);try{r.insertRule(t,r.cssRules.length)}catch{}}}var Jo=new WeakMap;function uc(t){let e=t||Zo();if(!e||!e.head)return null;let r=Jo.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 Jo.set(e,o),ac=o,o}var pc=8;function $r(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]):Ko?(n||(n=[]),n.push(a,String(l)),o++):s.push(qo(a,String(l),r)))}if(n&&o>=pc){let a=n.join("\0"),l=Ko(a),f=l.indexOf("\0"),u=l.substring(0,f),p=l.substring(f+1);if(p){let d=p.split(`
|
|
11
|
+
`);for(let h=0;h<d.length;h++)d[h]&&Ct(d[h])}s.push(u)}else if(n)for(let a=0;a<n.length;a+=2)s.push(qo(n[a],n[a+1],r));let c=[];for(let a=0;a<i.length;a++)c.push(dc(i[a][0],i[a][1],r));return s.concat(c).join(" ").trim()}var Er=new Map;function dc(t,e,r){let n=(r?r+"":"")+t+JSON.stringify(e),o=ae.get(n);if(o){let p=Er.get(o);if(p)for(let d=0;d<p.length;d++)Ct(p[d]);return o}o=r?`_${r}_c${De(n)}`:`_c${De(n)}`;let s="",i=[],c=p=>typeof p=="string"&&(p.indexOf("{")!==-1||p.indexOf("}")!==-1),a=(p,d)=>{let h="";for(let g in d){let x=d[g];if(x!=null)if(typeof x=="object")a([...p,g],x);else{if(c(x))continue;h+=`${Ie(g)}:${x};`}}h&&(p.length===0?s+=h:i.push({chain:p,body:h}))};a([],e);let l=p=>{if(!p.length)return`.${o}`;let d=p[0].split(",").map(h=>h.trim()).map(h=>h.includes("&")?h.replace(/&/g,`.${o}`):h.startsWith(":")?`.${o}${h}`:`.${o} ${h}`);for(let h=1;h<p.length;h++){let g=p[h].split(",").map(m=>m.trim()),x=[];for(let m of d)for(let y of g)y.includes("&")?x.push(y.replace(/&/g,m)):y.startsWith(":")?x.push(m+y):x.push(m+" "+y);d=x}return d.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 d=l(p.chain),h=`${t}{${d}{${p.body}}}`;f.push(h),Ct(h)}return Er.set(o,f),ae.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 h=`${l([t,...p.chain])}{${p.body}}`;f.push(h),Ct(h)}return Er.set(o,f),ae.set(n,o),o}function je(t,e){let r="";for(let n in e){let o="";for(let s in e[n])o+=`${Ie(s)}:${e[n][s]};`;r+=`${n}{${o}}`}return Ct(`@keyframes ${t}{${r}}`),t}var hc=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],gc=["none","forwards","backwards","both"],yc=["normal","reverse","alternate","alternate-reverse"],mc=["running","paused"],xc=t=>/^[\d.]+m?s$/.test(t),bc=0,Tr=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{};if(I(t)){let o=`smbls-anim-${bc++}`;return{animationName:je(o,t)}}let n=r&&r[t];return I(n)?je(t,n):t},_c=(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:xc(u)?s.push(u):hc.includes(u)||u.startsWith("cubic-bezier")||u.startsWith("steps(")?i=u:u==="infinite"||/^\d+$/.test(u)?c=u==="infinite"?u:Number(u):yc.includes(u)?a=u:gc.includes(u)?l=u:mc.includes(u)?f=u:o||(o=u);return{name:o,durations:s,timingFunction:i,iterationCount:c,direction:a,fillMode:l,playState:f}},Xo={animation:(t,e)=>{if(_(t)&&t.includes(" ")){let r=_c(t,e);return{animationName:Tr(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||xt(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:Tr(t,e),animationDuration:ht(e.animationDuration||"A").timing,animationDelay:ht(e.animationDelay||"0s").timing,animationTimingFunction:xt(e.animationTimingFunction||"ease"),animationFillMode:e.animationFillMode||"both",animationIterationCount:e.animationIterationCount||1,animationPlayState:e.animationPlayState,animationDirection:e.animationDirection}},animationName:(t,e)=>({animationName:Tr(t,e)}),animationDuration:t=>({animationDuration:ht(t).timing}),animationDelay:t=>({animationDelay:ht(t).timing}),animationTimingFunction:t=>({animationTimingFunction:xt(t)}),animationIterationCount:t=>({animationIterationCount:t}),animationFillMode:t=>({animationFillMode:t}),animationPlayState:t=>({animationPlayState:t}),animationDirection:t=>({animationDirection:t})};F();var Yo={show:t=>t?void 0:{display:"none !important"},hide:t=>t?{display:"none !important"}:void 0,height:(t,e)=>k("height",t,e),width:(t,e)=>k("width",t,e),boxSizing:t=>Hr(t)?{boxSizing:"border-box"}:{boxSizing:t},boxSize:t=>{if(!_(t))return;let[e,r]=t.split(" ");return{...V("height",e),...V("width",r||e)}},inlineSize:(t,e)=>k("inlineSize",t,e),blockSize:(t,e)=>k("blockSize",t,e),minWidth:(t,e)=>k("minWidth",t,e),maxWidth:(t,e)=>k("maxWidth",t,e),widthRange:t=>{if(!_(t))return;let[e,r]=t.split(" ");return{...V("minWidth",e),...V("maxWidth",r||e)}},minHeight:(t,e)=>k("minHeight",t,e),maxHeight:(t,e)=>k("maxHeight",t,e),heightRange:t=>{if(!_(t))return;let[e,r]=t.split(" ");return{...V("minHeight",e),...V("maxHeight",r||e)}},size:t=>{if(!_(t))return;let[e,r]=t.split(" ");return{...k("inlineSize",e),...k("blockSize",r||e)}},minBlockSize:(t,e)=>k("minBlockSize",t,e),minInlineSize:(t,e)=>k("minInlineSize",t,e),maxBlockSize:(t,e)=>k("maxBlockSize",t,e),maxInlineSize:(t,e)=>k("maxInlineSize",t,e),minSize:t=>{if(!_(t))return;let[e,r]=t.split(" ");return{...V("minInlineSize",e),...V("minBlockSize",r||e)}},maxSize:t=>{if(!_(t))return;let[e,r]=t.split(" ");return{...V("maxInlineSize",e),...V("maxBlockSize",r||e)}},borderWidth:(t,e)=>k("borderWidth",t,e),padding:(t,e)=>k("padding",t,e),scrollPadding:(t,e)=>k("scrollPadding",t,e),paddingInline:t=>{if(!_(t))return;let[e,r]=t.split(" ");return{...V("paddingInlineStart",e),...V("paddingInlineEnd",r||e)}},paddingBlock:t=>{if(!_(t))return;let[e,r]=t.split(" ");return{...V("paddingBlockStart",e),...V("paddingBlockEnd",r||e)}},paddingTop:(t,e)=>k("paddingBlockStart",t,e),paddingBottom:(t,e)=>k("paddingBlockEnd",t,e),paddingLeft:(t,e)=>k("paddingInlineStart",t,e),paddingRight:(t,e)=>k("paddingInlineEnd",t,e),paddingBlockStart:(t,e)=>k("paddingBlockStart",t,e),paddingBlockEnd:(t,e)=>k("paddingBlockEnd",t,e),paddingInlineStart:(t,e)=>k("paddingInlineStart",t,e),paddingInlineEnd:(t,e)=>k("paddingInlineEnd",t,e),margin:(t,e)=>k("margin",t,e),marginInline:t=>{if(!_(t))return;let[e,r]=t.split(" ");return{...V("marginInlineStart",e),...V("marginInlineEnd",r||e)}},marginBlock:(t,e)=>{if(!_(e.marginBlock))return;let[r,n]=e.marginBlock.split(" ");return{...V("marginBlockStart",r),...V("marginBlockEnd",n||r)}},marginTop:(t,e)=>k("marginBlockStart",t,e),marginBottom:(t,e)=>k("marginBlockEnd",t,e),marginLeft:(t,e)=>k("marginInlineStart",t,e),marginRight:(t,e)=>k("marginInlineEnd",t,e),marginInlineStart:(t,e)=>k("marginInlineStart",t,e),marginInlineEnd:(t,e)=>k("marginInlineEnd",t,e),marginBlockStart:(t,e)=>k("marginBlockStart",t,e),marginBlockEnd:(t,e)=>k("marginBlockEnd",t,e),gap:t=>({gap:Mo(t)}),columnGap:(t,e)=>Vt(e,"columnGap",t),rowGap:(t,e)=>Vt(e,"rowGap",t),flexWrap:t=>({display:"flex",flexWrap:t}),flexFlow:(t,e)=>{let r=e.reverse;if(!_(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(!_(t))return;let[e,r]=t.split(" ");return{display:"flex",alignItems:e,justifyContent:r}},round:(t,e)=>wr(t??e.borderRadius,e,"round"),borderRadius:(t,e)=>wr(t??e.round,e,"borderRadius")};var ts={fontSize:t=>To(t)||t,fontFamily:t=>({fontFamily:Eo(t)||t}),fontWeight:t=>({fontWeight:t,fontVariationSettings:'"wght" '+t})};var es={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 rs={inset:(t,e)=>{if(e.call("isNumber",t))return{inset:t};if(e.call("isString",t))return{inset:t.split(" ").map(r=>G(r,"k").k).join(" ")}},left:t=>G(t,"left"),top:t=>G(t,"top"),right:t=>G(t,"right"),bottom:t=>G(t,"bottom"),verticalInset:t=>{if(typeof t!="string")return;let e=t.split(" ").map(r=>G(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=>G(r,"k").k);return{left:e[0],right:e[1]||e[0]}}};F();var lt=({context:t,state:e})=>{let r=e?.root?.globalTheme||t.designSystem?.globalTheme;return r==="auto"?null:r},ns={theme:(t,e)=>{if(t)return e.themeModifier?se(t,`@${e.themeModifier}`):se(t)},color:(t,e)=>{let r=lt(e);if(t)return{color:ot(t,r)}},background:(t,e)=>{let r=lt(e);if(t)return _(t)&&t.includes("gradient")?{background:_r(t,r)}:{background:ot(t,r)}},backgroundColor:(t,e)=>{let r=lt(e);if(t)return{backgroundColor:ot(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:Fo(t,o)}},textStroke:t=>({WebkitTextStroke:Do(t)}),outline:t=>({outline:wt(t)}),outlineOffset:(t,e)=>k("outlineOffset",t,e),border:t=>({border:wt(t)}),borderColor:(t,e)=>{let r=lt(e);if(t)return{borderColor:ot(t,r)}},borderTopColor:(t,e)=>{let r=lt(e);if(t)return{borderTopColor:ot(t,r)}},borderBottomColor:(t,e)=>{let r=lt(e);if(t)return{borderBottomColor:ot(t,r)}},borderLeftColor:(t,e)=>{let r=lt(e);if(t)return{borderLeftColor:ot(t,r)}},borderRightColor:(t,e)=>{let r=lt(e);if(t)return{borderRightColor:ot(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:jo(t,r)}},boxShadow:(t,e)=>{if(!_(t))return;let[r,n]=t.split("!importan"),o=lt(e),s=n?" !important":"";return{boxShadow:br(r.trim(),o)+s}},textShadow:(t,{context:e})=>({textShadow:br(t,e.designSystem.globalTheme)}),columnRule:t=>({columnRule:wt(t)})};var os={transition:t=>({transition:Lo(t)}),transitionDuration:t=>({transitionDuration:Sr(t)}),transitionDelay:t=>({transitionDelay:Sr(t)}),transitionTimingFunction:t=>({transitionTimingFunction:xt(t)}),transitionProperty:t=>({transitionProperty:t,willChange:t})};F();var ss={flow:(t,e)=>{let r=e.reverse;if(!_(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 is={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 J={...Xo,...Yo,...ts,...es,...rs,...ns,...os,...ss,...is};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"]);F();function fs(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 Sc(...t){return fs(this,"warn",t),Wn.apply(this,t)}function wc(...t){return fs(this,"error",t),Gn.apply(this,t)}var cs={update:kr,remove:Or,getDB:qn,getQuery:Qn,getRootData:Vn,getChildren:Fn,getPath:Mn,nextElement:zn,previousElement:Hn,verbose:hr,warn:Sc,error:wc,variables:Kn,spotByPath:jn,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:Nn,getRootState:Ln,getRootContext:Bn,getContext:Un,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)}},as=new WeakMap;function Cc(t){if(!t)return cs;let e=as.get(t);if(e)return e;e=Object.create(cs);let r=t.methods;if(r)for(let n in r)e[n]=r[n];return as.set(t,e),e}function Pr(t){let e=Cc(t.context);Object.setPrototypeOf(t,e)}F();_e();var vc=(t,e,r)=>{Object.defineProperty(t,e,{value:r,enumerable:!1,configurable:!0,writable:!0})},vt=(t,e)=>{if(rt(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&&rt(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;for(;s?.parent&&rt(s.parent);)s=s.parent;return 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 sh=new Proxy(Object.create(null),{get(){},has(){return!1}});F();var Rr={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 kc=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,fe=(t,e)=>e.startsWith("aria-")||e.startsWith("data-")||kc(e)||Rr.default.includes(e)?!0:Object.prototype.hasOwnProperty.call(Rr,t)?Rr[t].includes(e):!1;var Fe=(t,e)=>{let r=t.call("exec",e,t);if(r)return _(r)&&r.includes("{{")&&(r=t.call("replaceLiteralsWithObjectFields",r)),r},ls=(t,e)=>{let r=(t.preSrc||"")+(Fe(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},us={src:t=>ls(t,t.src),href:t=>Fe(t,t.href),action:t=>Fe(t,t.action),poster:t=>ls(t,t.poster),data:t=>Fe(t,t.data)},ps=t=>{let e=t.tag||"div",r={};for(let n in us)if(t[n]!==void 0&&fe(e,n)){let o=us[n](t);o!==void 0&&(r[n]=o)}return r};var Ac=1;function Ut(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function Oc(t){return t.charAt(2).toLowerCase()+t.slice(3)}function Ec(t){return t.toLowerCase()}function jr(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]=jr(o,s):r[n]=s}return r}function st(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||`_${Ac++}`,s.parent=e||null,s.context=t.context||e?.context||n.context||{},s.context.__create||(s.context.__create=st);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 x=r.substring(0,g),m=s.context?.components;m&&(m[x]||m["smbls."+x])&&(t={extends:x,...t})}}ce(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 x=t[g],m=s[g],y=m&&x&&typeof m=="object"&&typeof x=="object"&&!Array.isArray(m)&&!Array.isArray(x)&&typeof m!="function"&&typeof x!="function";y&&g.charCodeAt(0)>=65&&g.charCodeAt(0)<=90?s[g]=jr(m,x):y&&c.has(g)?s[g]={...m,...x}:s[g]=x}function l(g){for(let x in g){let m=g[x],y=s[x],b=y&&m&&typeof y=="object"&&typeof m=="object"&&!Array.isArray(y)&&!Array.isArray(m)&&typeof y!="function"&&typeof m!="function";b&&x.charCodeAt(0)>=65&&x.charCodeAt(0)<=90?s[x]=jr(y,m):b&&c.has(x)?s[x]={...y,...m}:s[x]=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,d=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=He(g,d)}else d&&(s.scope=d);if(t.if!==void 0&&(s.if=t.if),Pr(s),$c(s,e,t),s.if!=null){let g=typeof s.if=="function"?s.if(s,s.state,s.context):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"&&Fr(s,{if:t.if}),s;s.tag||(s.tag=Wt(s)),kt("Init",s,n);let h=s.node=Gt(s);if(!h)return s;kt("AttachNode",s,n),h.setAttribute&&s.key&&h.setAttribute("data-key",s.key),h.setAttribute&&s.context?.scopeSelector&&s.context.scopeSelector!==":root"&&s.context.key&&s.key===s.context.key&&h.setAttribute("data-smbls-app",s.context.key),s.id&&h.setAttribute&&(h.id=s.id),Fr(s,t),Mr(s),hs(s),gs(s,n);try{ys(s,n)}catch(g){if(typeof console<"u"&&console.error){let x=s.__ref?.path?.join(".")||s.key||"<root>";console.error(`[smbls] createChildren failed at ${x}:`,g?.message||g,g?.stack?`
|
|
12
|
+
`+g.stack.split(`
|
|
13
13
|
`).slice(0,6).join(`
|
|
14
|
-
`):"")}}if(Bn(s,t,o),t&&(t[s.key]=s,t.__ref?.__children&&(t.__ref.__children.includes(s.key)||t.__ref.__children.push(s.key))),typeof s.html=="function"&&s.node&&!s.node.innerHTML){let m=s.context?.designSystem;m&&Q(m);try{let b=s.html(s,s.state,s.context);b!=null&&typeof b!="function"&&(s.node.innerHTML=b)}catch{}finally{m&&q()}}if(Ce("Create",s,r),Ce("Complete",s,r),Ce("Render",s,r),Ce("RenderRouter",s,r),typeof s.onFrame=="function"){let m=s.onFrame,b=s.context?.designSystem,y=()=>{if(s.node){if(s.node.isConnected){b&&Q(b);try{m(s,s.state,s.context)}catch(g){console.error("[DOMQL] onFrame error:",g)}finally{b&&q()}}requestAnimationFrame(y)}};requestAnimationFrame(y)}return s}function $c(e,t,n){let r=!t,o=n.state&&typeof n.state=="object"&&!Array.isArray(n.state)&&Object.keys(n.state).length===0,s=r&&o&&e.context?.state,i=n.state!==void 0&&!s?n.state:e.state&&!ee(e.state)?e.state:void 0;if(i==null){if(t?.state)e.state=t.state,ve(e,e.state);else if(e.context?.state){let a=e.context.state,c={...a},f=e.context?.polyglot;if(f?.translations){let l=a.lang||f.defaultLang||"en",u=f.translations[l];if(u&&typeof u=="object")for(let d in u)c[d]===void 0&&(c[d]=u[d]);let p=new Set(f.languages||[]);for(let d in f.translations)!p.has(d)&&c[d]===void 0&&(c[d]=f.translations[d])}e.state=ee(c)?c:Y(c),e.state.__element=e,e.state.root=e.state,ve(e,e.state)}else e.state={},Object.defineProperty(e.state,"root",{value:e.state,enumerable:!1,configurable:!0,writable:!0}),ve(e,e.state);return}if(typeof i=="string"){if(e.state=ds(i,t),e.state&&typeof e.state=="object"&&!ee(e.state)){let a=t?.state?.root||t?.state||e.state;Object.defineProperty(e.state,"root",{value:a,enumerable:!1,configurable:!0,writable:!0})}ve(e,e.state);return}if(typeof i=="function"){let a=i(e,t?.state);e.state=Y(a||{})}else e.state=Y({...i});e.state.__element=e,t?.state?(e.state.parent=t.state,e.state.root=t.state.root||t.state):e.state.root=e.state,ve(e,e.state)}function jn(e,t){if(!t)return e;let n=t.split("/"),r=e;for(let o of n){if(r==null)return{};r=r[o]}return r??{}}function ds(e,t){if(!t)return{};if(e===".")return t.state||{};if(e.startsWith("../")){let o=e.slice(3);return o?jn(t.state,o):t.state??{}}if(e.startsWith("~/")){let o=t.state?.root||t.state,s=e.slice(2);return s?jn(o,s):o??{}}if(t.state?.[e]!==void 0)return t.state[e];let n=jn(t.state,e);if(n!=null&&Object.keys(n).length>0)return n;let r=t.context?.polyglot;if(r?.translations){let o=t.state?.root?.lang||r.defaultLang||"en",s=r.translations[o];if(s?.[e]!==void 0)return s[e];if(r.translations[e]!==void 0)return r.translations[e]}return{}}function Tc(e){let t=e.__ref,n=e.tag||"div",r=e.context?.designSystem,o=[],s=Object.keys(e);for(let i=0;i<s.length;i++){let a=s[i];if(typeof e[a]!="function"||K.has(a))continue;let c=a.charCodeAt(0);c>=65&&c<=90||Ue(a)||J[a]||Z&&Z.has(a)||lt(n,a)||o.push({prop:a,fn:e[a]})}for(let i=0;i<o.length;i++){let{prop:a,fn:c}=o[i];t.__exec[a]=c,Object.defineProperty(e,a,{get(){r&&Q(r);try{return c(e,e.state,e.context)}catch{return}finally{r&&q()}},set(f){delete t.__exec[a],Object.defineProperty(e,a,{value:f,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function Mn(e,t){let n=e.__ref;if(Tc(e),typeof e.text=="function"){let o=e.text,s=M(()=>{if(!n.contentManaged)try{let i=o(e,e.state,e.context);e.node&&i!=null&&typeof i!="function"&&typeof i!="object"&&(typeof i=="string"&&i.includes("{{")&&(i=xt.call(e,i,e.state)),e.tag==="string"?e.node.nodeValue=i:e.node.textContent=i)}catch{}},{depth:n.path.length});n.__effects.push(s),n.__exec.text=o}else if(typeof e.text=="string"&&e.text.includes("{{")){let o=e.text,s=M(()=>{if(n.contentManaged)return;let i=xt.call(e,o,e.state);i!=null&&(e.text=i),e.node&&(e.tag==="string"?e.node.nodeValue=i??"":e.node.textContent=i??"")},{depth:n.path.length});n.__effects.push(s),n.__exec.text=o}for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&typeof e[o]=="function"&&!K.has(o)&&!Ue(o)&&!n.__exec[o]){if(J[o]){let s=e[o],i=o,a=M(()=>{let c=e.context?.designSystem;c&&Q(c);try{let f=s(e,e.state,e.context),l=J[i](f,e,e.state,e.context);l&&e.node?Be(e.node,l):e.node&&(i==="show"||i==="hide")&&(e.node.style.display="")}finally{c&&q()}},{depth:n.path.length});n.__effects.push(a),n.__exec[o]=s}else if(Z&&Z.has(o)){let s=e[o],i=o,a=M(()=>{let c=e.context?.designSystem;c&&Q(c);try{let f=s(e,e.state,e.context);e.node&&(f!=null?Be(e.node,{[i]:f}):e.node.style[i]="")}finally{c&&q()}},{depth:n.path.length});n.__effects.push(a),n.__exec[o]=s}}if(typeof t.html=="function"){let o=t.html,s=M(()=>{let i=e.context?.designSystem;i&&Q(i);try{let a=o(e,e.state,e.context);e.node&&a!=null&&typeof a!="function"&&(e.node.innerHTML=a)}finally{i&&q()}},{depth:n.path.length});n.__effects.push(s),n.__exec.html=o}if(typeof t.value=="function"){let o=t.value,s=M(()=>{try{let i=o(e,e.state,e.context);if(!e.node||!("value"in e.node))return;let a=i==null?"":String(i);if(e.node.value===a)return;let c=typeof document<"u"&&document.activeElement===e.node,f=c&&typeof e.node.selectionStart=="number"?e.node.selectionStart:null,l=c&&typeof e.node.selectionEnd=="number"?e.node.selectionEnd:null;if(e.node.value=a,c&&f!=null&&l!=null)try{e.node.setSelectionRange(f,l)}catch{}}catch{}},{depth:n.path.length});n.__effects.push(s),n.__exec.value=o}if(typeof t.style=="function"){let o=t.style,s=M(()=>{let i=o(e,e.state,e.context);Be(e.node,i)},{depth:n.path.length});n.__effects.push(s),n.__exec.style=o}else if(e.style&&typeof e.style=="object")for(let o in e.style){let s=e.style[o];if(typeof s!="function")continue;let i=M(()=>{try{let a=s(e,e.state,e.context);e.node&&Be(e.node,{[o]:a})}catch{}},{depth:n.path.length});n.__effects.push(i)}if(e.attr&&typeof e.attr=="object"){for(let o in e.attr)if(typeof e.attr[o]=="function"){let s=e.attr[o],i=o,a=M(()=>{try{let c=s(e,e.state,e.context);e.node?.setAttribute&&(c==null||c===!1?e.node.removeAttribute(i):typeof c!="function"&&typeof c!="object"&&e.node.setAttribute(i,c===!0?"":c))}catch{}},{depth:n.path.length});n.__effects.push(a)}}if(e.aria&&typeof e.aria=="object")for(let o in e.aria){let s=e.aria[o];if(typeof s!="function")continue;let i="aria-"+o.replace(/[A-Z]/g,c=>"-"+c.toLowerCase()),a=M(()=>{try{let c=s(e,e.state,e.context);if(!e.node?.setAttribute)return;c==null||c===!1?e.node.removeAttribute(i):typeof c!="function"&&typeof c!="object"&&e.node.setAttribute(i,c===!0?"":c)}catch{}},{depth:n.path.length});n.__effects.push(a)}if(e.data&&typeof e.data=="object")for(let o in e.data){let s=e.data[o];if(typeof s!="function")continue;let i="data-"+o.replace(/[A-Z]/g,c=>"-"+c.toLowerCase()),a=M(()=>{try{let c=s(e,e.state,e.context);if(!e.node?.setAttribute)return;c==null||c===!1?e.node.removeAttribute(i):typeof c!="function"&&typeof c!="object"&&e.node.setAttribute(i,c===!0?"":c)}catch{}},{depth:n.path.length});n.__effects.push(a)}let r=e.classlist&&typeof e.classlist=="object"&&!Array.isArray(e.classlist)?e.classlist:e.class&&typeof e.class=="object"&&!Array.isArray(e.class)?e.class:null;if(r)for(let o in r){let s=r[o];if(typeof s!="function")continue;let i=M(()=>{try{let a=s(e,e.state,e.context);if(!e.node?.classList)return;typeof a=="string"?e.node.classList.add(a):a?e.node.classList.add(o):e.node.classList.remove(o)}catch{}},{depth:n.path.length});n.__effects.push(i)}if(typeof t.if=="function"){let o=t.if,s=M(()=>{let i=o(e,e.state,e.context),a=n.__if;if(n.__if=!!i,a&&!n.__if&&e.node)e.node.remove();else if(!a&&n.__if)if(n.__ifInitialized){e.node||(e.node=Ge(e));let c=e.parent,f=c?.node;if(f&&e.node){let l=null,u=Object.keys(c),p=u.indexOf(e.key);for(let d=p+1;d<u.length;d++){let h=c[u[d]];if(h?.node?.parentNode===f){l=h.node;break}}l?f.insertBefore(e.node,l):f.appendChild(e.node)}else Bn(e,e.parent);Nn(e)}else{if(n.__ifInitialized=!0,e.tag||(e.tag=We(e)),Ce("Init",e,{}),e.node||(e.node=Ge(e)),!e.node)return;Ce("AttachNode",e,{}),e.node.setAttribute&&e.key&&e.node.setAttribute("data-key",e.key),e.id&&e.node.setAttribute&&(e.node.id=e.id);let c=t.if;delete t.if;try{Mn(e,t)}finally{t.if=c}Nn(e),hs(e),ms(e,{}),gs(e,{}),Bn(e,e.parent)}},{depth:n.path.length});n.__effects.push(s)}for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o)||K.has(o)||typeof e[o]!="function")continue;let s=o.charCodeAt(0);if(s>=65&&s<=90||Ue(o))continue;let i=e[o];n.__exec[o]=i;let a=e.tag||"div";if(lt(a,o)&&!J[o]&&!(Z&&Z.has(o))){let c=o,f=M(()=>{try{let l=i(e,e.state,e.context);e.node?.setAttribute&&(l==null||l===!1?e.node.removeAttribute(c):typeof l!="function"&&typeof l!="object"&&(c==="src"&&"src"in e.node?e.node.src=l:e.node.setAttribute(c,l===!0?"":l)))}catch{}},{depth:n.path.length});n.__effects.push(f)}}Ic(e)}function Nn(e){let{node:t}=e;if(t){if(typeof e.text=="string"&&!e.text.includes("{{")?e.tag==="string"?t.nodeValue=e.text:t.textContent=e.text:typeof e.text=="number"&&(t.textContent=e.text),jc(e),typeof e.html=="string"&&(t.innerHTML=e.html),e.value!=null&&typeof e.value!="function"&&"value"in t){let n=String(e.value);t.value!==n&&(t.value=n)}if(e.style&&typeof e.style=="object"&&Be(t,e.style),e.attr&&typeof e.attr=="object")for(let n in e.attr){let r=e.attr[n];typeof r=="function"||typeof r=="object"||r==null||r===!1||t.setAttribute&&t.setAttribute(n,r===!0?"":r)}if(e.data&&typeof e.data=="object")for(let n in e.data){let r=e.data[n];typeof r=="function"||typeof r=="object"||r==null||r===!1||t.dataset&&(t.dataset[n]=r===!0?"":r)}if(e.classlist||e.class){let n=e.classlist||e.class;if(typeof n=="string")n.split(" ").forEach(r=>r&&t.classList.add(r));else if(typeof n=="object")for(let r in n){let o=typeof n[r]=="function"?n[r](e,e.state,e.context):n[r];o&&t.classList.add(typeof o=="string"?o:r)}}}}function Be(e,t){if(!e||!t||!e.style)return;let n=null;for(let r in t){let o=t[r];if(o!=null){if(r.charAt(0)==="&"&&typeof o=="object"){n||(n={}),n[r]=o;continue}try{let s=String(o),i=r.replace(/[A-Z]/g,l=>"-"+l.toLowerCase()),a=s.trim(),c=/\s*!important\s*$/.test(a),f=a.replace(/\s*!important\s*$/,"");e.style.setProperty(i,f,c?"important":"")}catch{}}}n&&Rc(e,n)}var Pc=0;function Rc(e,t){let n=`_ds${Pc++}`;e.classList.add(n);let r=e.ownerDocument,o=r.querySelector("style[data-smbls-scoped]");o||(o=r.createElement("style"),o.setAttribute("data-smbls-scoped",""),r.head.appendChild(o));let s="";for(let i in t){let a="."+n,c=i.replace(/&/g,a).split(",").map(l=>{let u=l.trim();return u.includes(a)?u:a+u}).join(", "),f=t[i];if(typeof f=="object"){let l="",u="";for(let p in f){let d=f[p];if(typeof d=="object"){let h=p.includes("&")?c.split(", ").map(b=>p.replace(/&/g,b)).join(", "):c.split(", ").map(b=>`${b} ${p}`).join(", "),m="";for(let b in d)m+=`${b.replace(/[A-Z]/g,y=>"-"+y.toLowerCase())}: ${d[b]};`;u+=`${h} { ${m} }
|
|
15
|
-
`}else
|
|
16
|
-
`),u&&(s+=u)}}s&&(o.textContent+=s)}function Ic(e){let t=e.__ref;t.__conditionalRunners=[];for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let r=n.charAt(0);if(r!=="."&&r!=="!")continue;let o=n.slice(1);if(!o)continue;let s=e[n];if(!s||typeof s!="object")continue;let i=r==="!",a={lastMatch:!1,appliedKeys:null},c=()=>{if(!e.node)return;let l,u=e[o];if(u===void 0)if(e.state&&o in e.state)l=e.state[o];else{let h=e.context?.cases?.[o];if(h===void 0)return;l=typeof h=="function"?h.call(e,e):h}else typeof u=="function"?l=u(e,e.state,e.context):l=u;let p=i?!l:!!l;if(p===a.lastMatch)return;a.lastMatch=p;let d=e.context?.designSystem;d&&Q(d);try{if(p){let h={};for(let b in s){if(!Object.prototype.hasOwnProperty.call(s,b))continue;let y=typeof s[b]=="function"?s[b](e,e.state,e.context):s[b];if(y!=null)if(J[b]){let g=J[b](y,e,e.state,e.context);if(g){let x=Array.isArray(g)?g:[g];for(let S of x)S&&Object.assign(h,S)}}else Z&&Z.has(b)&&(h[b]=y)}let m=Object.keys(h);m.length?(Be(e.node,h),a.appliedKeys=m):a.appliedKeys=null}else if(a.appliedKeys){for(let h of a.appliedKeys)e.node.style[h]="";a.appliedKeys=null}}finally{d&&q()}};t.__conditionalRunners.push(c);let f=M(c,{depth:t.path.length});t.__effects.push(f)}}var Dn=new WeakSet;function jc(e){let{node:t}=e;if(!t)return;if(Dn.has(e)){console.error("[applyCssInProps] re-entry detected for element",e.key,"prop path:",e.__ref?.path);return}Dn.add(e);let n=e.context?.designSystem;n&&Q(n);try{let r={},o=!1;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s)||typeof e[s]=="function"||K.has(s))continue;let i=s.charCodeAt(0);if(!(i>=65&&i<=90)&&!Ue(s)){if(J[s]){let a=e[s],c=J[s](a,e,e.state,e.context);if(c){if(Array.isArray(c))for(let f of c)f&&Object.assign(r,f);else Object.assign(r,c);o=!0}}else if(Z&&Z.has(s)){let a=e[s];a!=null&&typeof a!="object"&&(r[s]=a,o=!0)}else if(s.charCodeAt(0)===45){let a=e[s];a!=null&&typeof a!="object"&&(r[s]=a,o=!0)}else if(s.charAt(0)==="&"){let a=e[s];a&&typeof a=="object"&&(r[s]=a,o=!0)}else if(s.charAt(0)==="@"||s.charAt(0)===":"){let a=e[s];if(a&&typeof a=="object"){let c={};for(let f in a){let l=a[f];if(typeof l=="function"&&(l=l(e,e.state,e.context)),!(l==null||typeof l=="function"))if(J[f]){let u=J[f](l,e,e.state,e.context);if(u)if(Array.isArray(u))for(let p of u)p&&Object.assign(c,p);else Object.assign(c,u)}else c[f]=l}if(Object.keys(c).length){if(s.length>1&&s.charAt(0)==="@"&&!s.startsWith("@media")&&!s.startsWith("@keyframes")&&!s.startsWith("@supports")&&(s==="@dark"||s==="@light"||!e.context?.designSystem?.media?.[s.slice(1)])){let f={};for(let u in c){let p=c[u];f[u]=typeof p=="string"&&!p.includes("!important")?p+" !important":p}let l=s.slice(1);r[`[data-theme="${l}"] &`]=f}else{let f=s;if(s.charAt(0)==="@"&&!s.startsWith("@media")&&!s.startsWith("@keyframes")){let u=s.slice(1),p=e.context?.designSystem?.media?.[u]||e.context?.designSystem?.media?.[u];p&&(f=`@media ${p}`)}let l={};for(let u in c){let p=c[u];if(p&&typeof p=="object"&&!Array.isArray(p)){let d={};for(let m in p)if(J[m]){let b=J[m](p[m],e,e.state,e.context);if(b)if(Array.isArray(b))for(let y of b)y&&Object.assign(d,y);else Object.assign(d,b)}else d[m]=p[m];let h=u.startsWith(":")?"":" ";if(f.includes(",")){let m=f.split(",").map(b=>`${b.trim()}${h}${u}`).join(", ");r[m]=d}else r[`${f}${h}${u}`]=d}else l[u]=p}Object.keys(l).length&&(r[f]=l)}o=!0}o=!0}}}}if(o){r.display&&String(r.display).includes("!important")&&(t.style.setProperty("display",String(r.display).replace(/\s*!important\s*$/,""),"important"),delete r.display);let s=Tn(r,null,e.context?.cssPrefix);s&&t.classList&&s.split(" ").forEach(a=>a&&t.classList.add(a));let i=e.display!=null&&typeof e.display!="function"?e.display:e.hide===!0||e.show===!1?"none":null;if(i!=null){let a=r.display;if(a&&a!==i)if(i==="none"){let c=[];for(let f of t.classList)f.startsWith("_d-")&&f!=="_d-none"&&c.push(f);for(let f of c)t.classList.remove(f);t.classList.add("_d-none")}else t.style.display=e.display}}}finally{n&&q(),Dn.delete(e)}}function hs(e){let{node:t}=e;if(!t||!t.setAttribute)return;if(e.aria&&typeof e.aria=="object")for(let o in e.aria){let s=e.aria[o];if(typeof s=="function"||typeof s=="object"||s==null||s===!1)continue;let i="aria-"+o.replace(/[A-Z]/g,a=>"-"+a.toLowerCase());t.setAttribute(i,s===!0?"":s)}let n=ps(e);for(let o in n){let s=n[o];s!=null&&s!==!1&&typeof s!="function"&&typeof s!="object"&&t.setAttribute(o,s===!0?"":s)}let r=e.tag||"div";for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o)||typeof e[o]=="function"||K.has(o)||o==="on"||n[o]!==void 0)continue;let s=o.charCodeAt(0);if(!(s>=65&&s<=90)&&!Ue(o)&&!(J[o]||Z&&Z.has(o))&<(r,o)){let i=e[o];if(i==null||i===!1||(typeof i=="string"&&i.includes("{{")&&(i=xt(i,e,e.state,e.context),e[o]=i),i==null||i===!1||typeof i=="function"||typeof i=="object"))continue;t.setAttribute(o,i===!0?"":i)}}}function ms(e,t){for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n)||!Ue(n))continue;let r=e[n];if(typeof r=="string"&&/^[A-Za-z_$][\w$]*$/.test(r)){let s=r;r=function(i){return e.call(s,i)}}if(typeof r!="function")continue;let o=Oc(n);ze.has(o)||it(Ec(o),e,r)}}function Ln(e,t){let n={...e};for(let r in t){let o=n[r],s=t[r];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?n[r]=Ln(o,s):n[r]=s}return n}function Vn(e,t,n){if(!t||!e.node)return;let r=e.childExtends;if(Array.isArray(t)){let o=(e.context?.document||globalThis.document)?.createDocumentFragment();if(!o)return;let s=e.childProps,i=e.childrenAs;for(let a=0;a<t.length;a++){let c=t[a],f=c;(typeof c=="string"||typeof c=="number")&&(c={text:c});let l=s;if(typeof s=="function")try{l=s(e,c)}catch{l=null}if(i==="state"){let d=f;(typeof f=="string"||typeof f=="number")&&(d={value:f,text:f}),c=l?{...l,state:d}:{state:d}}else l&&(c=Ln(l,c));if(r&&!c.ignoreChildExtends)if(c.extends){let d=Array.isArray(c.extends)?c.extends:[c.extends],h=Array.isArray(r)?r:[r];c={...c,extends:[...h,...d]}}else c={extends:r,...c};let u=c?.key||`${a}`,p=re(c,e,u,n);p?.node&&o.appendChild(p.node)}e.node.appendChild(o);return}if(typeof t=="string"){let o=ds(t,e);if(Array.isArray(o)){Vn(e,o,n);return}}if(typeof t=="object")for(let o in t){if(K.has(o))continue;let s=t[o];if(!(s==null||s===!1)){if((typeof s=="string"||typeof s=="number")&&(s={text:s}),e.childProps&&(s=Ln(e.childProps,s)),r&&!s.ignoreChildExtends)if(s.extends){let i=Array.isArray(s.extends)?s.extends:[s.extends],a=Array.isArray(r)?r:[r];s={...s,extends:[...a,...i]}}else s={extends:r,...s};re(s,e,o,n)}}}function gs(e,t){let{children:n,content:r}=e,o=e.childExtends;if(typeof n=="function"){let i=n;n=i(e,e.state,e.context),e.children=n;let a=e.__ref,c=!1,f=M(()=>{let l=i(e,e.state,e.context);if(!c){c=!0;return}if(l!==e.children){if(e.children=l,Array.isArray(l)&&e.childrenAs==="state"){let u=e.childProps,p=[],d=new Map;for(let g=0;g<l.length;g++){let x=l[g],S=u;if(typeof u=="function")try{S=u(e,x)}catch{S=null}let v=S&&S.key||x&&x.key||`${g}`;p.push(v),d.set(v,{rawChild:x,childProps:S})}let h=new Set(p),m=a.__children.slice();for(let g of m)if(!h.has(g)){let x=e[g];x?.remove&&x.remove(),delete e[g]}let b=e.childExtends,y=(e.context?.document||globalThis.document)?.createDocumentFragment();for(let g of p){let x=d.get(g),S=x.rawChild,v=e[g];if(v&&v.state){if(S&&typeof S=="object"){let D=v.state;if(typeof D.replace=="function")D.replace(S);else if(typeof D.update=="function"){for(let L in D)if(!(L==="__element"||L==="root"||L==="parent"||L==="update")&&!Object.prototype.hasOwnProperty.call(S,L))try{D[L]=void 0}catch{}D.update(S)}else for(let L in S)D[L]=S[L]}continue}let j=S;(typeof S=="string"||typeof S=="number")&&(j={value:S,text:S});let G=x.childProps,B=G?{...G,state:j}:{state:j};if(b&&!B.ignoreChildExtends)if(B.extends){let D=Array.isArray(B.extends)?B.extends:[B.extends],L=Array.isArray(b)?b:[b];B={...B,extends:[...L,...D]}}else B={extends:b,...B};let V=re(B,e,g,t);V?.node&&y&&y.appendChild(V.node)}y&&y.childNodes.length&&e.node&&e.node.appendChild(y),a.__children=p;return}for(let u of[...a.__children]){let p=e[u];p?.remove&&p.remove(),delete e[u]}a.__children=[],Vn(e,l,t)}},{depth:a.path.length});a.__effects.push(f)}if(Vn(e,n||r,t),n||r)return;let s=e.context?.components||{};{let i=Object.keys(e);for(let a=0;a<i.length;a++){let c=i[a];if(!c.endsWith("Extends")||typeof e[c]!="string")continue;let f=c.slice(0,-7);if(!f||f.charCodeAt(0)<65||f.charCodeAt(0)>90)continue;let l={extends:e[c]};delete e[c];for(let u=a+1;u<i.length;u++){let p=i[u],d=p.charCodeAt(0);if(d>=65&&d<=90||K.has(p)||typeof e[p]=="function"&&(p.startsWith("on")||p.startsWith(".")))break;let h=e[p];h!==void 0&&(l[p]=h,delete e[p])}e[f]&&typeof e[f]=="object"?e[f]={...l,...e[f]}:e[f]=l}}for(let i in e){if(!Object.prototype.hasOwnProperty.call(e,i)||K.has(i)||typeof e[i]!="object"||e[i]===null)continue;let a=i.charCodeAt(0);if(a<65||a>90)continue;let c=e[i];if(!c.__ref){if(!c.extends&&!c.extend){let f=s[i]||s[`smbls.${i}`];f&&(c={extends:f,...c})}if(e.childProps&&(c={...e.childProps,...c}),o&&!c.ignoreChildExtends)if(c.extends){let f=Array.isArray(c.extends)?c.extends:[c.extends],l=Array.isArray(o)?o:[o];c={...c,extends:[...l,...f]}}else c={extends:o,...c};re(c,e,i,t)}}}function Bn(e,t,n){let{node:r}=e;if(!r)return;let o=t?.node||(t?.nodeType?t:null);if(o)if(n?.position==="before"&&n.node)o.insertBefore(r,n.node);else if(n?.position==="after"&&n.node){let s=n.node.nextSibling;s?o.insertBefore(r,s):o.appendChild(r)}else o.appendChild(r)}function Ce(e,t,n){let r=e.charAt(0).toLowerCase()+e.slice(1);t.context?.plugins?.length&&Ke(r,t,n);let o="on"+e,s=t[o];if(typeof s=="function"){let i=t.context?.designSystem;i&&Q(i);try{if(s(t,t.state,t.context,n)===!1)return!1}catch(a){if(t.context?.plugins?.length&&Ke("error",t,{hook:o,error:a})||console.error(`[DOMQL] Lifecycle "${o}" error:`,a),t.context?.strictMode)throw a}finally{i&&q()}}return!0}var Dc=re;var Fc=(e,t,n={})=>{if(!e||typeof e!="object")throw new Error("[SymbolsEmbed.mount] rootDef must be an object");if(typeof Node>"u"||!(t instanceof Node))throw new Error("[SymbolsEmbed.mount] host must be a DOM element");let r=n.state?Y(n.state):void 0;return re(e,t,"Root",{state:r,context:n.context||{}})};return vs(Mc);})();
|
|
14
|
+
`):"")}}if(Vr(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 x=s.html(s,s.state,s.context);x!=null&&typeof x!="function"&&(s.node.innerHTML=x)}catch{}finally{g&&K()}}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,x=s.context?.designSystem,m=()=>{if(s.node){if(s.node.isConnected){x&&Q(x);try{g(s,s.state,s.context)}catch(y){console.error("[DOMQL] onFrame error:",y)}finally{x&&K()}}requestAnimationFrame(m)}};requestAnimationFrame(m)}return s}function $c(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&&!rt(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 d in u)a[d]===void 0&&(a[d]=u[d]);let p=new Set(l.languages||[]);for(let d in l.translations)!p.has(d)&&a[d]===void 0&&(a[d]=l.translations[d])}t.state=rt(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=ds(i,e),t.state&&typeof t.state=="object"&&!rt(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 Ir(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 ds(t,e){if(!e)return{};if(t===".")return e.state||{};if(t.startsWith("../")){let o=t.slice(3);return o?Ir(e.state,o):e.state??{}}if(t.startsWith("~/")){let o=e.state?.root||e.state,s=t.slice(2);return s?Ir(o,s):o??{}}if(e.state?.[t]!==void 0)return e.state[t];let r=Ir(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 Tc(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"||q.has(c))continue;let a=c.charCodeAt(0);a>=65&&a<=90||Ut(c)||J[c]||tt&&tt.has(c)||fe(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&&K()}},set(l){delete e.__exec[c],Object.defineProperty(t,c,{value:l,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function Fr(t,e){let r=t.__ref;if(Tc(t),typeof t.text=="function"){let o=t.text,s=N(()=>{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=be.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=N(()=>{if(r.contentManaged)return;let i=be.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"&&!q.has(o)&&!Ut(o)&&!r.__exec[o]){if(J[o]){let s=t[o],i=o,c=N(()=>{let a=t.context?.designSystem;a&&Q(a);try{let l=s(t,t.state,t.context),f=J[i](l,t,t.state,t.context);f&&t.node?Bt(t.node,f):t.node&&(i==="show"||i==="hide")&&(t.node.style.display="")}finally{a&&K()}},{depth:r.path.length});r.__effects.push(c),r.__exec[o]=s}else if(tt&&tt.has(o)){let s=t[o],i=o,c=N(()=>{let a=t.context?.designSystem;a&&Q(a);try{let l=s(t,t.state,t.context);t.node&&(l!=null?Bt(t.node,{[i]:l}):t.node.style[i]="")}finally{a&&K()}},{depth:r.path.length});r.__effects.push(c),r.__exec[o]=s}}if(typeof e.html=="function"){let o=e.html,s=N(()=>{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&&K()}},{depth:r.path.length});r.__effects.push(s),r.__exec.html=o}if(typeof e.value=="function"){let o=e.value,s=N(()=>{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=N(()=>{let i=o(t,t.state,t.context);Bt(t.node,i)},{depth:r.path.length});r.__effects.push(s),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=N(()=>{try{let c=s(t,t.state,t.context);t.node&&Bt(t.node,{[o]:c})}catch{}},{depth:r.path.length});r.__effects.push(i)}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=N(()=>{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=N(()=>{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=N(()=>{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=N(()=>{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=N(()=>{let i=o(t,t.state,t.context),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=Gt(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 d=p+1;d<u.length;d++){let h=a[u[d]];if(h?.node?.parentNode===l){f=h.node;break}}f?l.insertBefore(t.node,f):l.appendChild(t.node)}else Vr(t,t.parent);Mr(t)}else{if(r.__ifInitialized=!0,t.tag||(t.tag=Wt(t)),kt("Init",t,{}),t.node||(t.node=Gt(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);let a=e.if;delete e.if;try{Fr(t,e)}finally{e.if=a}Mr(t),hs(t),gs(t,{}),ys(t,{}),Vr(t,t.parent)}},{depth:r.path.length});r.__effects.push(s)}for(let o in t){if(!Object.prototype.hasOwnProperty.call(t,o)||q.has(o)||typeof t[o]!="function")continue;let s=o.charCodeAt(0);if(s>=65&&s<=90||Ut(o))continue;let i=t[o];r.__exec[o]=i;let c=t.tag||"div";if(fe(c,o)&&!J[o]&&!(tt&&tt.has(o))){let a=o,l=N(()=>{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)}}Ic(t)}function Mr(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),Dc(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"&&Bt(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 Bt(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&&Rc(t,r)}var Pc=0;function Rc(t,e){let r=`_ds${Pc++}`;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 d=l[p];if(typeof d=="object"){let h=p.includes("&")?a.split(", ").map(x=>p.replace(/&/g,x)).join(", "):a.split(", ").map(x=>`${x} ${p}`).join(", "),g="";for(let x in d)g+=`${x.replace(/[A-Z]/g,m=>"-"+m.toLowerCase())}: ${d[x]};`;u+=`${h} { ${g} }
|
|
15
|
+
`}else f+=`${p.replace(/[A-Z]/g,h=>"-"+h.toLowerCase())}: ${d};`}f&&(s+=`${a} { ${f} }
|
|
16
|
+
`),u&&(s+=u)}}s&&(o.textContent+=s)}function Ic(t){let e=t.__ref;e.__conditionalRunners=[];for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r))continue;let n=r.charAt(0);if(n!=="."&&n!=="!")continue;let o=r.slice(1);if(!o)continue;let s=t[r];if(!s||typeof s!="object")continue;let i=n==="!",c={lastMatch:!1,appliedKeys:null},a=()=>{if(!t.node)return;let f,u=t[o];if(u===void 0)if(t.state&&o in t.state)f=t.state[o];else{let h=t.context?.cases?.[o];if(h===void 0)return;f=typeof h=="function"?h.call(t,t):h}else typeof u=="function"?f=u(t,t.state,t.context):f=u;let p=i?!f:!!f;if(p===c.lastMatch)return;c.lastMatch=p;let d=t.context?.designSystem;d&&Q(d);try{if(p){let h={};for(let x in s){if(!Object.prototype.hasOwnProperty.call(s,x))continue;let m=typeof s[x]=="function"?s[x](t,t.state,t.context):s[x];if(m!=null)if(J[x]){let y=J[x](m,t,t.state,t.context);if(y){let b=Array.isArray(y)?y:[y];for(let C of b)C&&Object.assign(h,C)}}else tt&&tt.has(x)&&(h[x]=m)}let g=Object.keys(h);g.length?(Bt(t.node,h),c.appliedKeys=g):c.appliedKeys=null}else if(c.appliedKeys){for(let h of c.appliedKeys)t.node.style[h]="";c.appliedKeys=null}}finally{d&&K()}};e.__conditionalRunners.push(a);let l=N(a,{depth:e.path.length});e.__effects.push(l)}}var Dr=new WeakSet;function Dc(t){let{node:e}=t;if(!e)return;if(Dr.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}Dr.add(t);let r=t.context?.designSystem;r&&Q(r);try{let n={},o=!1;for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s)||typeof t[s]=="function"||q.has(s))continue;let i=s.charCodeAt(0);if(!(i>=65&&i<=90)&&!Ut(s)){if(J[s]){let c=t[s],a=J[s](c,t,t.state,t.context);if(a){if(Array.isArray(a))for(let l of a)l&&Object.assign(n,l);else Object.assign(n,a);o=!0}}else if(tt&&tt.has(s)){let c=t[s];c!=null&&typeof c!="object"&&(n[s]=c,o=!0)}else if(s.charCodeAt(0)===45){let c=t[s];c!=null&&typeof c!="object"&&(n[s]=c,o=!0)}else if(s.charAt(0)==="&"){let c=t[s];c&&typeof c=="object"&&(n[s]=c,o=!0)}else if(s.charAt(0)==="@"||s.charAt(0)===":"){let c=t[s];if(c&&typeof c=="object"){let a={};for(let l in c){let f=c[l];if(typeof f=="function"&&(f=f(t,t.state,t.context)),!(f==null||typeof f=="function"))if(J[l]){let u=J[l](f,t,t.state,t.context);if(u)if(Array.isArray(u))for(let p of u)p&&Object.assign(a,p);else Object.assign(a,u)}else a[l]=f}if(Object.keys(a).length){if(s.length>1&&s.charAt(0)==="@"&&!s.startsWith("@media")&&!s.startsWith("@keyframes")&&!s.startsWith("@supports")&&(s==="@dark"||s==="@light"||!t.context?.designSystem?.media?.[s.slice(1)])){let f={};for(let p in a){let d=a[p];f[p]=typeof d=="string"&&!d.includes("!important")?d+" !important":d}let u=s.slice(1);n[`[data-theme="${u}"] &`]=f}else{let f=s;if(s.charAt(0)==="@"&&!s.startsWith("@media")&&!s.startsWith("@keyframes")){let p=s.slice(1),d=t.context?.designSystem?.media?.[p]||t.context?.designSystem?.media?.[p];d&&(f=`@media ${d}`)}let u={};for(let p in a){let d=a[p];if(d&&typeof d=="object"&&!Array.isArray(d)){let h={};for(let x in d)if(J[x]){let m=J[x](d[x],t,t.state,t.context);if(m)if(Array.isArray(m))for(let y of m)y&&Object.assign(h,y);else Object.assign(h,m)}else h[x]=d[x];let g=p.startsWith(":")?"":" ";if(f.includes(",")){let x=f.split(",").map(m=>`${m.trim()}${g}${p}`).join(", ");n[x]=h}else n[`${f}${g}${p}`]=h}else u[p]=d}Object.keys(u).length&&(n[f]=u)}o=!0}o=!0}}}}if(o){n.display&&String(n.display).includes("!important")&&(e.style.setProperty("display",String(n.display).replace(/\s*!important\s*$/,""),"important"),delete n.display);let s=$r(n,null,t.context?.cssPrefix);s&&e.classList&&s.split(" ").forEach(c=>c&&e.classList.add(c));let i=t.display!=null&&typeof t.display!="function"?t.display:t.hide===!0||t.show===!1?"none":null;if(i!=null){let c=n.display;if(c&&c!==i)if(i==="none"){let a=[];for(let l of e.classList)l.startsWith("_d-")&&l!=="_d-none"&&a.push(l);for(let l of a)e.classList.remove(l);e.classList.add("_d-none")}else e.style.display=t.display}}}finally{r&&K(),Dr.delete(t)}}function hs(t){let{node:e}=t;if(!e||!e.setAttribute)return;if(t.aria&&typeof t.aria=="object")for(let o in t.aria){let s=t.aria[o];if(typeof s=="function"||typeof s=="object"||s==null||s===!1)continue;let i="aria-"+o.replace(/[A-Z]/g,c=>"-"+c.toLowerCase());e.setAttribute(i,s===!0?"":s)}let r=ps(t);for(let o in r){let s=r[o];s!=null&&s!==!1&&typeof s!="function"&&typeof s!="object"&&e.setAttribute(o,s===!0?"":s)}let n=t.tag||"div";for(let o in t){if(!Object.prototype.hasOwnProperty.call(t,o)||typeof t[o]=="function"||q.has(o)||o==="on"||r[o]!==void 0)continue;let s=o.charCodeAt(0);if(!(s>=65&&s<=90)&&!Ut(o)&&!(J[o]||tt&&tt.has(o))&&fe(n,o)){let i=t[o];if(i==null||i===!1||(typeof i=="string"&&i.includes("{{")&&(i=be(i,t,t.state,t.context),t[o]=i),i==null||i===!1||typeof i=="function"||typeof i=="object"))continue;e.setAttribute(o,i===!0?"":i)}}}function gs(t,e){for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||!Ut(r))continue;let n=t[r];if(typeof n=="string"&&/^[A-Za-z_$][\w$]*$/.test(n)){let s=n;n=function(c){return t.call(s,c)}}if(typeof n!="function")continue;let o=Oc(r);zt.has(o)||ie(Ec(o),t,n)}}function Lr(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]=Lr(o,s):r[n]=s}return r}function Nr(t,e,r){if(!e||!t.node)return;let n=t.childExtends;if(Array.isArray(e)){let s=(t.context?.document||globalThis.document)?.createDocumentFragment();if(!s)return;let i=t.childProps,c=t.childrenAs;for(let a=0;a<e.length;a++){let l=e[a],f=l;(typeof l=="string"||typeof l=="number")&&(l={text:l});let u=i;if(typeof i=="function")try{u=i(t,l)}catch{u=null}if(c==="state"){let h=f;(typeof f=="string"||typeof f=="number")&&(h={value:f,text:f}),l=u?{...u,state:h}:{state:h}}else u&&(l=Lr(u,l));if(n&&!l.ignoreChildExtends)if(l.extends){let h=Array.isArray(l.extends)?l.extends:[l.extends],g=Array.isArray(n)?n:[n];l={...l,extends:[...g,...h]}}else l={extends:n,...l};let p=l?.key||`${a}`,d=st(l,t,p,r);d?.node&&s.appendChild(d.node)}t.node.appendChild(s);return}if(typeof e=="string"){let o=ds(e,t);if(Array.isArray(o)){Nr(t,o,r);return}}if(typeof e=="object")for(let o in e){if(q.has(o))continue;let s=e[o];if(!(s==null||s===!1)){if((typeof s=="string"||typeof s=="number")&&(s={text:s}),t.childProps&&(s=Lr(t.childProps,s)),n&&!s.ignoreChildExtends)if(s.extends){let i=Array.isArray(s.extends)?s.extends:[s.extends],c=Array.isArray(n)?n:[n];s={...s,extends:[...c,...i]}}else s={extends:n,...s};st(s,t,o,r)}}}function ys(t,e){let{children:r,content:n}=t,o=t.childExtends;if(typeof r=="function"){let i=r;r=i(t,t.state,t.context),t.children=r;let c=t.__ref,a=!1,l=N(()=>{let f=i(t,t.state,t.context);if(!a){a=!0;return}if(f===t.children)return;if(t.children=f,Array.isArray(f)&&t.childrenAs==="state"){let d=t.childProps,h=[],g=new Map;for(let S=0;S<f.length;S++){let T=f[S],E=d;if(typeof d=="function")try{E=d(t,T)}catch{E=null}let Z=E&&E.key||T&&T.key||`${S}`;h.push(Z),g.set(Z,{rawChild:T,childProps:E})}let x=new Set(h),m=c.__children.slice();for(let S of m)if(!x.has(S)){let T=t[S];T?.remove&&T.remove(),delete t[S]}let y=t.childExtends,C=(t.context?.document||globalThis.document)?.createDocumentFragment();for(let S of h){let T=g.get(S),E=T.rawChild,Z=t[S];if(Z&&Z.state){if(E&&typeof E=="object"){let M=Z.state;if(typeof M.replace=="function")M.replace(E);else if(typeof M.update=="function"){for(let D in M)if(!(D==="__element"||D==="root"||D==="parent"||D==="update")&&!Object.prototype.hasOwnProperty.call(E,D))try{M[D]=void 0}catch{}M.update(E)}else for(let D in E)M[D]=E[D]}continue}let B=E;(typeof E=="string"||typeof E=="number")&&(B={value:E,text:E});let X=T.childProps,U=X?{...X,state:B}:{state:B};if(y&&!U.ignoreChildExtends)if(U.extends){let M=Array.isArray(U.extends)?U.extends:[U.extends],D=Array.isArray(y)?y:[y];U={...U,extends:[...D,...M]}}else U={extends:y,...U};let gt=st(U,t,S,e);gt?.node&&C&&C.appendChild(gt.node)}C&&C.childNodes.length&&t.node&&t.node.appendChild(C),c.__children=h;return}for(let d of[...c.__children]){let h=t[d];h?.remove&&h.remove(),delete t[d]}c.__children=[],Nr(t,f,e)},{depth:c.path.length});c.__effects.push(l)}if(Nr(t,r||n,e),r||n)return;let s=t.context?.components||{};{let i=Object.keys(t);for(let c=0;c<i.length;c++){let a=i[c];if(!a.endsWith("Extends")||typeof t[a]!="string")continue;let l=a.slice(0,-7);if(!l||l.charCodeAt(0)<65||l.charCodeAt(0)>90)continue;let f={extends:t[a]};delete t[a];for(let u=c+1;u<i.length;u++){let p=i[u],d=p.charCodeAt(0);if(d>=65&&d<=90||q.has(p)||typeof t[p]=="function"&&(p.startsWith("on")||p.startsWith(".")))break;let h=t[p];h!==void 0&&(f[p]=h,delete t[p])}t[l]&&typeof t[l]=="object"?t[l]={...f,...t[l]}:t[l]=f}}for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i)||q.has(i)||typeof t[i]!="object"||t[i]===null)continue;let c=i.charCodeAt(0);if(c<65||c>90)continue;let a=t[i];if(!a.__ref){if(!a.extends&&!a.extend){let l=s[i]||s[`smbls.${i}`];l&&(a={extends:l,...a})}if(t.childProps&&(a={...t.childProps,...a}),o&&!a.ignoreChildExtends)if(a.extends){let l=Array.isArray(a.extends)?a.extends:[a.extends],f=Array.isArray(o)?o:[o];a={...a,extends:[...f,...l]}}else a={extends:o,...a};st(a,t,i,e)}}}function Vr(t,e,r){let{node:n}=t;if(!n)return;let o=e?.node||(e?.nodeType?e:null);if(o)if(r?.position==="before"&&r.node)o.insertBefore(n,r.node);else if(r?.position==="after"&&r.node){let s=r.node.nextSibling;s?o.insertBefore(n,s):o.appendChild(n)}else o.appendChild(n)}function kt(t,e,r){let n=t.charAt(0).toLowerCase()+t.slice(1);e.context?.plugins?.length&&qt(n,e,r);let o="on"+t,s=e[o];if(typeof s=="function"){let i=e.context?.designSystem;i&&Q(i);try{if(s(e,e.state,e.context,r)===!1)return!1}catch(c){if(e.context?.plugins?.length&&qt("error",e,{hook:o,error:c})||console.error(`[DOMQL] Lifecycle "${o}" error:`,c),e.context?.strictMode)throw c}finally{i&&K()}}return!0}var jc=st;var Fc=(t,e,r={})=>{if(!t||typeof t!="object")throw new Error("[SymbolsEmbed.mount] rootDef must be an object");if(typeof Node>"u"||!(e instanceof Node))throw new Error("[SymbolsEmbed.mount] host must be a DOM element");let n=r.state?et(r.state):void 0;return st(t,e,"Root",{state:n,context:r.context||{}})};return Cs(Mc);})();
|