@akashjs/runtime 0.1.16 → 0.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-3KEQ56EQ.js → chunk-7AOFVBXQ.js} +3 -3
- package/dist/chunk-7AOFVBXQ.js.map +1 -0
- package/dist/{chunk-BQO3JCJG.cjs → chunk-HHQWJGM7.cjs} +3 -3
- package/dist/chunk-HHQWJGM7.cjs.map +1 -0
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/index.cjs +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/test.cjs +1 -1
- package/dist/test.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-3KEQ56EQ.js.map +0 -1
- package/dist/chunk-BQO3JCJG.cjs.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export{a as createMachine}from'./chunk-UCPFG5LP.js';export{b as generateSWScript,a as registerServiceWorker,c as subscribePush}from'./chunk-LYKTDMGS.js';import {B as B$1,z as z$1,u,y,e as e$1,f,h}from'./chunk-
|
|
1
|
+
export{a as createMachine}from'./chunk-UCPFG5LP.js';export{b as generateSWScript,a as registerServiceWorker,c as subscribePush}from'./chunk-LYKTDMGS.js';import {B as B$1,z as z$1,u,y,e as e$1,f,h}from'./chunk-7AOFVBXQ.js';export{t as For,s as Show,w as __getter,b as akashError,o as bindProperty,n as bindText,p as bindVisible,l as cloneTemplate,g as createContext,j as createElement,k as createText,B as defineComponent,a as formatError,d as getAllErrorCodes,e as getCurrentScope,c as getErrorDef,i as inject,v as insert,u as nodeToDOM,z as onError,x as onMount,y as onUnmount,h as provide,A as ref,q as renderConditional,r as renderList,f as runInScope,m as setProperty}from'./chunk-7AOFVBXQ.js';export{b as clearStores,a as defineStore}from'./chunk-GNH24HO7.js';export{b as isServerRendering,i as nodeToHtml,j as renderNodes,e as renderToStream,c as renderToString,d as renderToStringSync,f as ssrElement,h as ssrRaw,g as ssrText}from'./chunk-3HWR5MIF.js';export{a as LWWRegister,c as createLocalTransport,d as createSync,b as createWebSocketTransport}from'./chunk-MJP3WT7O.js';export{a as createOfflineStore}from'./chunk-DXY3PRM5.js';import {c,e,d,a}from'./chunk-JZWZVCDH.js';export{a as batch,d as computed,e as effect,b as flushSync,c as signal,f as untrack}from'./chunk-JZWZVCDH.js';export{a as animate,d as animateGroup,c as animateSequence,e as animateSpring,b as animateStagger,g as defineStates,f as keyframes}from'./chunk-Q3E2UVUK.js';function Yt(e,t){if(e){let n=e();return u(n)}return t?u(t()):document.createComment("empty slot")}function Xt(e){if(!e)return false;let t=e();return !(t==null||t===false||typeof t=="string"&&t.trim()==="")}function Zt(e,t){let n={};for(let r of t){let o=e[r];typeof o=="function"&&(n[r]=o);}return n}var en=B$1(e=>{let t=c(null);z$1(r=>{t.set(r);});function n(){t.set(null);}return ()=>{let r=t();return r?u(e.props.fallback(r,n)):u(e.children())}});var H=null;function tn(){return H}function nn(e){H&&H.addPending(e);}var rn=B$1(e$1=>{let t=c(false),n=[],r={addPending(s){n.push(s);},isResolved:()=>t()},o=H;H=r;let i;try{i=e$1.children();}finally{H=o;}return n.length>0?Promise.all(n).then(()=>{t.set(true);}):t.set(true),()=>{let s=document.createElement("div");return s.setAttribute("data-akash-suspense",""),s.style.display="contents",t()?s.appendChild(u(i)):s.appendChild(u(e$1.props.fallback())),e(()=>{if(t()){for(;s.firstChild;)s.removeChild(s.firstChild);s.appendChild(u(i));}}),s}});var N=false,O=null;function on(){return N}function X(e){let{container:t,component:n,props:r={}}=e;N=true,O=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT);try{n(r);}finally{N=false,O=null;}return ()=>{}}function sn(e){if(!N||!O)return null;let t=O.nextNode();for(;t;){if(t instanceof HTMLElement&&t.tagName.toLowerCase()===e.toLowerCase())return t;t=O.nextNode();}return null}function an(){if(!N||!O)return null;let e=O.nextNode();for(;e;){if(e instanceof Text)return e;e=O.nextNode();}return null}function cn(e){let{target:t,component:n,props:r,rootMargin:o="200px"}=e;if(typeof IntersectionObserver>"u")return X({container:t,component:n,props:r});let i=false,s=new IntersectionObserver(a=>{for(let c of a)c.isIntersecting&&!i&&(s.disconnect(),X({container:t,component:n,props:r}));},{rootMargin:o});return s.observe(t),()=>{i=true,s.disconnect();}}var me="data-akash-hydrate";function ln(e=document.body){return Array.from(e.querySelectorAll(`[${me}]`))}function ge(e){return {enterFrom:`${e}-enter-from`,enterActive:`${e}-enter-active`,enterTo:`${e}-enter-to`,exitFrom:`${e}-exit-from`,exitActive:`${e}-exit-active`,exitTo:`${e}-exit-to`}}function ye(e,t,n){return new Promise(r=>{e.classList.add(t.enterFrom,t.enterActive),e.offsetHeight,e.classList.remove(t.enterFrom),e.classList.add(t.enterTo);let o=()=>{e.classList.remove(t.enterActive,t.enterTo),e.removeEventListener("transitionend",o),r();};n!==void 0?setTimeout(o,n):(e.addEventListener("transitionend",o,{once:true}),setTimeout(o,5e3));})}function un(e,t,n){return new Promise(r=>{e.classList.add(t.exitFrom,t.exitActive),e.offsetHeight,e.classList.remove(t.exitFrom),e.classList.add(t.exitTo);let o=()=>{e.classList.remove(t.exitActive,t.exitTo),e.removeEventListener("transitionend",o),r();};n!==void 0?setTimeout(o,n):(e.addEventListener("transitionend",o,{once:true}),setTimeout(o,5e3));})}var dn=B$1(e=>{let t=e.props.name??"akash",n=ge(t);return ()=>{let r=document.createElement("div");if(r.style.display="contents",e.props.when){let o=u(e.children());r.appendChild(o),o instanceof HTMLElement&&(e.props.onEnter?.(o),ye(o,n,e.props.duration).then(()=>{e.props.onAfterEnter?.(o);}));}return r}});function pn(e,t={}){let{property:n="all",duration:r="0.3s",easing:o="ease"}=t;return `
|
|
2
2
|
.${e}-enter-active,
|
|
3
3
|
.${e}-exit-active {
|
|
4
4
|
transition: ${n} ${r} ${o};
|
|
@@ -68,6 +68,6 @@ ${n.stackTrace}`);}}}function Gn(){return {enabled:M,activeCount:D.size,totalTra
|
|
|
68
68
|
`),o&&(i+=`::view-transition-new(root) {
|
|
69
69
|
animation-name: ${o};
|
|
70
70
|
}
|
|
71
|
-
`),i}function fo(e,t){e.style.viewTransitionName=t;}function mo(e,t){let n=document.documentElement,r=new Promise(async o=>{n.style.transition="opacity 0.15s ease",n.style.opacity="0",await new Promise(i=>setTimeout(i,150)),await e(),n.style.opacity="1",await new Promise(i=>setTimeout(i,150)),n.style.transition="",n.style.opacity="",t.onAfter?.(),o();});return {finished:r,updateCallbackDone:r,ready:Promise.resolve(),skipTransition:()=>{n.style.transition="",n.style.opacity="";}}}function go(e){return Array.isArray(e)?e.join(","):typeof e=="boolean"?e?"true":"false":String(e)}function yo(e,t){return typeof t=="number"?Number(e):typeof t=="boolean"?e==="true"||e==="1":Array.isArray(t)?e?e.split(","):[]:e}function B(){return typeof window>"u"?new URLSearchParams:new URLSearchParams(window.location.search)}function ho(e,t){if(typeof window>"u")return;let n=e.toString(),r=n?`${window.location.pathname}?${n}${window.location.hash}`:`${window.location.pathname}${window.location.hash}`;t==="push"?window.history.pushState(null,"",r):window.history.replaceState(null,"",r);}var _=new Map,De=false;function To(){De||typeof window>"u"||(De=true,window.addEventListener("popstate",()=>{let e=B();a(()=>{for(let[t,n]of _){let r=e.get(t),o=r!==null?n.deserialize(r):n.defaultValue;n.signal.set(o);}});}));}function Me(e,t,n={}){let{serialize:r=m=>go(m),deserialize:o=m=>yo(m,t),history:i="replace",debounce:s=0,removeDefault:a=true}=n,l=B().get(e),d=l!==null?o(l):t,u=c(d);_.set(e,{signal:u,deserialize:o,defaultValue:t}),To();let f=null,p=false,y=u.set;u.set=m=>{if(y(m),p);let h=()=>{let b=B();a&&m===t?b.delete(e):b.set(e,r(m)),ho(b,i);};s>0?(f&&clearTimeout(f),f=setTimeout(h,s)):h();};u.update;return u.update=m=>{u.set(m(u()));},u}function vo(e,t){let n={};for(let[r,o]of Object.entries(e))n[r]=Me(r,o.default,{serialize:o.serialize,deserialize:o.deserialize,history:t?.history});return n}function bo(){if(typeof window>"u")return;let e=`${window.location.pathname}${window.location.hash}`;window.history.replaceState(null,"",e),a(()=>{for(let[,t]of _)t.signal.set(t.defaultValue);});}function wo(){let e=B(),t={};return e.forEach((n,r)=>{t[r]=n;}),t}function xo(e){_.delete(e);}function So(){_.clear();}var Ie={linear:e=>e,cubicIn:e=>e*e*e,cubicOut:e=>1-Math.pow(1-e,3),cubicInOut:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,quadIn:e=>e*e,quadOut:e=>1-(1-e)*(1-e),quintOut:e=>1-Math.pow(1-e,5),bounceOut:e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,elasticOut:e=>e===0||e===1?e:Math.pow(2,-10*e)*Math.sin((e-.1)*5*Math.PI)+1};function Eo(e,t,n){return typeof e=="number"&&typeof t=="number"?e+(t-e)*n:n<.5?e:t}function Po(e,t={}){let{duration:n=400,easing:r=Ie.cubicOut,interpolate:o=Eo,delay:i=0}=t,s=c(e),a=c(e),c$1=0,l=false,d=(()=>s());return d.set=(u,f)=>{let p=f?.duration??n,y=f?.easing??r,T=f?.interpolate??o,m=f?.delay??i,h=s();return a.set(u),p===0?(s.set(u),Promise.resolve()):(l&&(cancelAnimationFrame(c$1),l=false),new Promise(b=>{let P=performance.now()+m;l=true;function v(x){if(!l){b();return}let k=x-P;if(k<0){c$1=requestAnimationFrame(v);return}let A=Math.min(k/p,1),R=y(A);s.set(T(h,u,R)),A<1?c$1=requestAnimationFrame(v):(l=false,b());}c$1=requestAnimationFrame(v);}))},d.setImmediate=u=>{l&&(cancelAnimationFrame(c$1),l=false),s.set(u),a.set(u);},d.target=()=>a(),d}function He(e,t={}){let{duration:n=300,easing:r="cubic-bezier(0.2, 0, 0, 1)",delay:o=0,selector:i,keyAttribute:s="data-key",onComplete:a}=t,c=new Map;function l(){return Array.from(i?e.querySelectorAll(i):e.children)}function d(p){return p.getAttribute(s)??p.id??""}function u(){c=new Map;for(let p of l()){let y=d(p);if(y){let T=p.getBoundingClientRect();c.set(y,{left:T.left,top:T.top,width:T.width,height:T.height});}}}function f(){let p=l(),y=[];for(let m of p){let h=d(m),b=c.get(h);if(!b)continue;let P=m.getBoundingClientRect(),v=b.left-P.left,x=b.top-P.top,k=b.width/(P.width||1),A=b.height/(P.height||1);if(Math.abs(v)<.5&&Math.abs(x)<.5&&Math.abs(k-1)<.01&&Math.abs(A-1)<.01)continue;let R=m.animate([{transform:`translate(${v}px, ${x}px) scale(${k}, ${A})`},{transform:"translate(0, 0) scale(1, 1)"}],{duration:n,easing:r,delay:o,fill:"both"});y.push(R);}let T=new Set(p.map(d));for(let[m,h]of c)T.has(m);return c.clear(),new Promise(m=>{if(y.length===0){a?.(),m();return}Promise.all(y.map(h=>h.finished)).then(()=>{for(let h of y)h.cancel();a?.(),m();});})}return {measure:u,animate:f,async flip(p){return u(),p(),await new Promise(y=>requestAnimationFrame(y)),f()}}}async function ko(e,t,n){return He(e,n).flip(t)}var Co=B$1(e=>{let t=c({status:"pending"}),n=e.props.promise;return e.props.promise.then(r=>{e.props.promise===n&&t.set({status:"resolved",value:r});}).catch(r=>{e.props.promise===n&&t.set({status:"rejected",error:r instanceof Error?r:new Error(String(r))});}),()=>{let r=t();switch(r.status){case "pending":return e.props.pending?u(e.props.pending()):document.createComment("await-pending");case "resolved":return u(e.props.then(r.value));case "rejected":return e.props.catch?u(e.props.catch(r.error)):document.createComment("await-error")}}});function Ao(e){let t=c({status:"pending"});return e.then(n=>t.set({status:"resolved",value:n})).catch(n=>t.set({status:"rejected",error:n instanceof Error?n:new Error(String(n))})),()=>t()}function je(e,t){return n=>{t.self&&n.target!==n.currentTarget||(t.preventDefault&&n.preventDefault(),t.stopPropagation&&n.stopPropagation(),t.stopImmediatePropagation&&n.stopImmediatePropagation?.(),e(n));}}function Ro(e,t,n,r={}){let o=je(n,r),i={once:r.once,capture:r.capture,passive:r.passive};return e.addEventListener(t,o,i),()=>e.removeEventListener(t,o,i)}function Oo(e){let t=c(e.clientWidth),n=c(e.clientHeight);return typeof ResizeObserver<"u"&&new ResizeObserver(o=>{let i=o[0];i&&(t.set(i.contentRect.width),n.set(i.contentRect.height));}).observe(e),{width:()=>t(),height:()=>n()}}function Lo(e){let t=e??(typeof window<"u"?window:null),n=c(e?e.scrollLeft:window?.scrollX??0),r=c(e?e.scrollTop:window?.scrollY??0);if(t){let s=()=>{e?(n.set(e.scrollLeft),r.set(e.scrollTop)):(n.set(window.scrollX),r.set(window.scrollY));};t.addEventListener("scroll",s,{passive:true});}let o=r.set;r.set=s=>{o(s),e?e.scrollTop=s:window?.scrollTo(window.scrollX,s);};let i=n.set;return n.set=s=>{i(s),e?e.scrollLeft=s:window?.scrollTo(s,window.scrollY);},{scrollX:n,scrollY:r}}function Do(){return c(null)}function Mo(e){return c(null)}function Io(e$1,t,n){e$1.name=typeof n=="string"?n:"",e$1.addEventListener("change",()=>{e$1.checked&&t.set(n);}),e(()=>{e$1.checked=t()===n;});}function Fe(e$1,t,n){return e(()=>{n()?e$1.classList.add(t):e$1.classList.remove(t);})}function Ho(e,t){let n=Object.entries(t).map(([r,o])=>Fe(e,r,o));return ()=>n.forEach(r=>r())}function Ne(e$1,t,n){let r=t.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`);return e(()=>{let o=n();o==null?e$1.style.removeProperty(r):e$1.style.setProperty(r,typeof o=="number"?`${o}px`:String(o));})}function jo(e,t){let n=Object.entries(t).map(([r,o])=>Ne(e,r,o));return ()=>n.forEach(r=>r())}function Fo(e){return e}function No(...e$1){let t={},n=[];for(let a of e$1)typeof a=="function"?n.push(a):typeof a=="object"&&a!==null&&(t=a);let{label:r="inspect",level:o="log",logger:i,when:s}=t;return e(()=>{if(s&&!s())return;let a=n.map(c=>c());i?i(r,...a):console[o](`[${r}]`,...a);})}function $o(e,t={}){let{method:n="POST",headers:r={},onSuccess:o,onError:i,fetch:s=globalThis.fetch.bind(globalThis)}=t,a=c(false),c$1=c(null),l=c(null);async function d(u){a.set(true),l.set(null);try{let f=await s(e,{method:n,headers:{"Content-Type":"application/json",...r},body:JSON.stringify(u)});if(!f.ok)throw new Error(`Form action failed: ${f.status}`);let p=await f.json();return c$1.set(p),a.set(!1),o?.(p),p}catch(f){let p=f instanceof Error?f:new Error(String(f));throw l.set(p),a.set(false),i?.(p),p}}return {url:e,method:n,submitting:()=>a(),result:()=>c$1(),error:()=>l(),handle(u){return f=>{f.preventDefault();let p=f.target,y=new FormData(p),T={...u};y.forEach((m,h)=>{T[h]=m;}),d(T);}},submit:d}}function _o(e={}){if(typeof window>"u")return ()=>{};let{keyPrefix:t="akash-snapshot",capture:n=["scroll","forms"]}=e;function r(){let c={scrollX:window.scrollX,scrollY:window.scrollY,forms:{},timestamp:Date.now()};return n.includes("forms")&&document.querySelectorAll("form[id]").forEach(l=>{let d=l,u={};new FormData(d).forEach((f,p)=>{u[p]=String(f);}),c.forms[d.id]=u;}),c}function o(c){if(n.includes("scroll")&&requestAnimationFrame(()=>{window.scrollTo(c.scrollX,c.scrollY);}),n.includes("forms"))for(let[l,d]of Object.entries(c.forms)){let u=document.getElementById(l);if(u)for(let[f,p]of Object.entries(d)){let y=u.elements.namedItem(f);y&&(y.value=p);}}}let i=()=>`${t}-${window.location.pathname}`;function s(){try{let c=r();sessionStorage.setItem(i(),JSON.stringify(c));}catch{}}function a(){try{let c=sessionStorage.getItem(i());if(c){let l=JSON.parse(c);Date.now()-l.timestamp<1800*1e3&&o(l);}}catch{}}return window.addEventListener("beforeunload",s),window.addEventListener("popstate",()=>{requestAnimationFrame(a);}),performance.getEntriesByType("navigation")[0]?.type==="back_forward"&&requestAnimationFrame(a),()=>{window.removeEventListener("beforeunload",s);}}function se(e$1,t,n={}){let{immediate:r=false,once:o=false,debounce:i,deep:s=false}=n,a=Array.isArray(e$1),c=a?e$1:[e$1],l=c.map(()=>{}),d=true,u=null,f=false,p=null,y=()=>{f=true,u&&clearTimeout(u),p?.();};p=e(()=>{let m=c.map(P=>P());if(d){d=false,l=s?m.map($e):[...m],r&&T(m,c.map(()=>{}));return}if(!(s?m.some((P,v)=>!zo(P,l[v])):m.some((P,v)=>!Object.is(P,l[v]))))return;let b=[...l];l=s?m.map($e):[...m],T(m,b);});function T(m,h){if(f)return;let b=()=>{a?t(m,h):t(m[0],h[0]),o&&(u&&clearTimeout(u),f=true,y());};i&&i>0?(u&&clearTimeout(u),u=setTimeout(b,i)):b();}return y}function Ko(e,t){return se(e,t,{once:true,immediate:true})}function Vo(e,t,n){return se(e,t,{debounce:n})}function $e(e){if(e===null||typeof e!="object")return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function zo(e,t){if(Object.is(e,t))return true;if(e===null||t===null||typeof e!="object"||typeof t!="object")return false;try{return JSON.stringify(e)===JSON.stringify(t)}catch{return false}}var _e=Symbol("deepSignal"),Wo=Symbol("deepRaw");function qo(e){let t=c(0),n=JSON.parse(JSON.stringify(e));function r(){t.update(i=>i+1);}function o(i,s=[]){return new Proxy(i,{get(a,c,l){if(c==="$raw")return JSON.parse(JSON.stringify(n));if(c==="$signal")return ()=>(t(),JSON.parse(JSON.stringify(n)));if(c===_e)return t;if(c===Wo)return n;let d=Reflect.get(a,c,l);return t(),d!==null&&typeof d=="object"?o(d,[...s,String(c)]):d},set(a,c,l){let d=Reflect.set(a,c,l);return r(),d},deleteProperty(a,c){let l=Reflect.deleteProperty(a,c);return r(),l}})}return o(n)}function Bo(e){return e.$raw??e}function Uo(e){if(e===null||typeof e!="object")return false;try{return e[_e]!==void 0}catch{return false}}function Ke(){let e=new Map;function t(n){let r=e.get(n);return r||(r=new Set,e.set(n,r)),r}return {on(n,r){return t(n).add(r),()=>t(n).delete(r)},once(n,r){let o=i=>{t(n).delete(o),r(i);};return t(n).add(o),()=>t(n).delete(o)},emit(n,r){let o=e.get(n);if(o)for(let i of Array.from(o))i(r);},off(n,r){t(n).delete(r);},clear(n){n?e.delete(n):e.clear();},listenerCount(n){return e.get(n)?.size??0},hasListeners(n){return (e.get(n)?.size??0)>0}}}var ae=null;function Go(){return ae||(ae=Ke()),ae}var Qo=new Set(["a","abbr","address","article","aside","b","bdi","bdo","blockquote","br","caption","cite","code","col","colgroup","dd","del","details","dfn","div","dl","dt","em","figcaption","figure","footer","h1","h2","h3","h4","h5","h6","header","hr","i","img","ins","kbd","li","main","mark","nav","ol","p","pre","q","rp","rt","ruby","s","samp","section","small","span","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","time","tr","u","ul","var","wbr"]),Jo=new Set(["alt","class","dir","href","id","lang","name","rel","src","style","tabindex","target","title","type","width","height","colspan","rowspan","scope","loading","decoding"]),Yo=/^(javascript|data|vbscript):/i,Xo=/^on/i;function ze(e,t={}){if(typeof document>"u")return e.replace(/<[^>]*>/g,"");let{allowTags:n=[],allowAttrs:r=[],allowDataAttrs:o=true,allowAriaAttrs:i=true,allowStyle:s=false,tagFilter:a,attrFilter:c}=t,l=new Set([...Qo,...n]),d=new Set([...Jo,...r]);s||d.delete("style");let u=new DOMParser().parseFromString(e,"text/html");return We(u.body,l,d,o,i,a,c),u.body.innerHTML}function We(e,t,n,r,o,i,s){let a=Array.from(e.childNodes);for(let c of a)if(c.nodeType===Node.ELEMENT_NODE){let l=c,d=l.tagName.toLowerCase();if(!(i?i(d):t.has(d))){let p=document.createTextNode(l.textContent??"");e.replaceChild(p,c);continue}let f=Array.from(l.attributes);for(let p of f){let y=p.name.toLowerCase(),T=p.value;if(Xo.test(y)){l.removeAttribute(p.name);continue}if(!(y.startsWith("data-")&&r)&&!(y.startsWith("aria-")&&o)){if(s&&!s(y,T,d)){l.removeAttribute(p.name);continue}if(!n.has(y)){l.removeAttribute(p.name);continue}if((y==="href"||y==="src")&&Yo.test(T)){l.removeAttribute(p.name);continue}}}We(l,t,n,r,o,i,s);}}function Zo(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function ei(e,t){return n=>{e.innerHTML=ze(n,t);}}function qe(e={}){let n={...{"default-src":["'self'"],"script-src":["'self'"],"style-src":["'self'","'unsafe-inline'"],"img-src":["'self'","data:","https:"],"font-src":["'self'","https:"],"connect-src":["'self'"],"frame-ancestors":["'none'"],"base-uri":["'self'"],"form-action":["'self'"],"object-src":["'none'"]},...e.directives};if(e.nonce){let r=`'nonce-${e.nonce}'`;n["script-src"]&&n["script-src"].push(r),n["style-src"]&&n["style-src"].push(r);}return e.reportUri&&(n["report-uri"]=[e.reportUri]),Object.entries(n).map(([r,o])=>`${r} ${o.join(" ")}`).join("; ")}function Be(e={}){return e.reportOnly?"Content-Security-Policy-Report-Only":"Content-Security-Policy"}function ti(e={}){let t={};if(e.csp!==false){let n=e.csp??{};t[Be(n)]=qe(n);}if(e.frameOptions!==false&&(t["X-Frame-Options"]=e.frameOptions??"DENY"),e.contentTypeOptions!==false&&(t["X-Content-Type-Options"]="nosniff"),t["X-XSS-Protection"]=e.xssProtection?"1; mode=block":"0",e.hsts!==false){let n=e.hsts??{maxAge:31536e3,includeSubDomains:true},r=`max-age=${n.maxAge}`;n.includeSubDomains&&(r+="; includeSubDomains"),n.preload&&(r+="; preload"),t["Strict-Transport-Security"]=r;}if(e.referrerPolicy!==false&&(t["Referrer-Policy"]=e.referrerPolicy??"strict-origin-when-cross-origin"),e.permissionsPolicy!==false){let n=e.permissionsPolicy??{camera:[],microphone:[],geolocation:[],payment:[]};t["Permissions-Policy"]=Object.entries(n).map(([r,o])=>`${r}=(${o.join(" ")})`).join(", ");}return e.coop!==false&&(t["Cross-Origin-Opener-Policy"]=e.coop??"same-origin"),e.coep!==false&&(t["Cross-Origin-Embedder-Policy"]=e.coep??"require-corp"),t}function Ue(e,...t){let n=new Set(["__proto__","constructor","prototype"]);for(let r of t)if(!(!r||typeof r!="object"))for(let o of Object.keys(r)){if(n.has(o))continue;let i=e[o],s=r[o];Ve(s)&&Ve(i)?e[o]=Ue({...i},s):e[o]=s;}return e}function Ge(e){if(e===null||typeof e!="object")return e;Object.freeze(e);for(let t of Object.values(e))typeof t=="object"&&t!==null&&Ge(t);return e}function Ve(e){return e!==null&&typeof e=="object"&&Object.getPrototypeOf(e)===Object.prototype}async function ni(e,t="sha384"){let r=new TextEncoder().encode(e),o=t==="sha256"?"SHA-256":t==="sha384"?"SHA-384":"SHA-512",i=await crypto.subtle.digest(o,r),s=new Uint8Array(i),a=btoa(String.fromCharCode(...s));return `${t}-${a}`}function Qe(){let e=new Uint8Array(32);return crypto.getRandomValues(e),Array.from(e,t=>t.toString(16).padStart(2,"0")).join("")}function ri(e={}){let{headerName:t="X-CSRF-Token",cookieName:n="csrf-token",tokenGenerator:r=Qe}=e,o=null;function i(){if(!o){if(typeof document<"u"){let a=document.cookie.match(new RegExp(`${n}=([^;]+)`));if(a)return o=a[1],o}o=r();}return o}return {interceptor:async(a,c)=>{let l=a.method.toUpperCase();return ["POST","PUT","PATCH","DELETE"].includes(l)&&a.headers.set(t,i()),c(a)},token:i,refresh(){o=r();}}}function oi(e,t={}){let{allowedHosts:n,allowedProtocols:r=["http:","https:"],allowRelative:o=true}=t;if(e.startsWith("/")&&!e.startsWith("//"))return o?e:null;try{let i=new URL(e);return !r.includes(i.protocol)||n&&!n.includes(i.hostname)?null:i.toString()}catch{return null}}function ii(e){let{maxAttempts:t,windowMs:n}=e,r=[];return {check(){let o=Date.now();for(;r.length>0&&r[0]<o-n;)r.shift();return r.length>=t?false:(r.push(o),true)},remaining(){let o=Date.now();for(;r.length>0&&r[0]<o-n;)r.shift();return Math.max(0,t-r.length)},reset(){r.length=0;}}}var ce=new Set,Je=true,le=null;function si(e){Je=e;}function ai(e){le=e;}function ci(){ce.clear();}function li(e,t){let n=((...r)=>(Ye(t),e(...r)));return Object.keys(e).forEach(r=>{n[r]=e[r];}),n.__deprecated=t,n}function ui(e,t){return Ye(t),e}function Ye(e){if(!Je||ce.has(e.name))return;ce.add(e.name);let t=[`[AkashJS] DEPRECATED: ${e.name}() is deprecated since v${e.since}`];e.removeIn?t[0]+=` and will be removed in v${e.removeIn}.`:t[0]+=".",e.replacement&&t.push(` Migrate to: ${e.replacement}()`),e.message&&t.push(` ${e.message}`),t.push(` See: ${e.link??"https://akash.js.org/migration"}`);let n=t.join(`
|
|
71
|
+
`),i}function fo(e,t){e.style.viewTransitionName=t;}function mo(e,t){let n=document.documentElement,r=new Promise(async o=>{n.style.transition="opacity 0.15s ease",n.style.opacity="0",await new Promise(i=>setTimeout(i,150)),await e(),n.style.opacity="1",await new Promise(i=>setTimeout(i,150)),n.style.transition="",n.style.opacity="",t.onAfter?.(),o();});return {finished:r,updateCallbackDone:r,ready:Promise.resolve(),skipTransition:()=>{n.style.transition="",n.style.opacity="";}}}function go(e){return Array.isArray(e)?e.join(","):typeof e=="boolean"?e?"true":"false":String(e)}function yo(e,t){return typeof t=="number"?Number(e):typeof t=="boolean"?e==="true"||e==="1":Array.isArray(t)?e?e.split(","):[]:e}function B(){return typeof window>"u"?new URLSearchParams:new URLSearchParams(window.location.search)}function ho(e,t){if(typeof window>"u")return;let n=e.toString(),r=n?`${window.location.pathname}?${n}${window.location.hash}`:`${window.location.pathname}${window.location.hash}`;t==="push"?window.history.pushState(null,"",r):window.history.replaceState(null,"",r);}var _=new Map,De=false;function To(){De||typeof window>"u"||(De=true,window.addEventListener("popstate",()=>{let e=B();a(()=>{for(let[t,n]of _){let r=e.get(t),o=r!==null?n.deserialize(r):n.defaultValue;n.signal.set(o);}});}));}function Me(e,t,n={}){let{serialize:r=m=>go(m),deserialize:o=m=>yo(m,t),history:i="replace",debounce:s=0,removeDefault:a=true}=n,l=B().get(e),d=l!==null?o(l):t,u=c(d);_.set(e,{signal:u,deserialize:o,defaultValue:t}),To();let f=null,p=false,y=u.set;u.set=m=>{if(y(m),p);let h=()=>{let b=B();a&&m===t?b.delete(e):b.set(e,r(m)),ho(b,i);};s>0?(f&&clearTimeout(f),f=setTimeout(h,s)):h();};u.update;return u.update=m=>{u.set(m(u()));},u}function vo(e,t){let n={};for(let[r,o]of Object.entries(e))n[r]=Me(r,o.default,{serialize:o.serialize,deserialize:o.deserialize,history:t?.history});return n}function bo(){if(typeof window>"u")return;let e=`${window.location.pathname}${window.location.hash}`;window.history.replaceState(null,"",e),a(()=>{for(let[,t]of _)t.signal.set(t.defaultValue);});}function wo(){let e=B(),t={};return e.forEach((n,r)=>{t[r]=n;}),t}function xo(e){_.delete(e);}function So(){_.clear();}var Ie={linear:e=>e,cubicIn:e=>e*e*e,cubicOut:e=>1-Math.pow(1-e,3),cubicInOut:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,quadIn:e=>e*e,quadOut:e=>1-(1-e)*(1-e),quintOut:e=>1-Math.pow(1-e,5),bounceOut:e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,elasticOut:e=>e===0||e===1?e:Math.pow(2,-10*e)*Math.sin((e-.1)*5*Math.PI)+1};function Eo(e,t,n){return typeof e=="number"&&typeof t=="number"?e+(t-e)*n:n<.5?e:t}function Po(e,t={}){let{duration:n=400,easing:r=Ie.cubicOut,interpolate:o=Eo,delay:i=0}=t,s=c(e),a=c(e),c$1=0,l=false,d=(()=>s());return d.set=(u,f)=>{let p=f?.duration??n,y=f?.easing??r,T=f?.interpolate??o,m=f?.delay??i,h=s();return a.set(u),p===0?(s.set(u),Promise.resolve()):(l&&(cancelAnimationFrame(c$1),l=false),new Promise(b=>{let P=performance.now()+m;l=true;function v(x){if(!l){b();return}let k=x-P;if(k<0){c$1=requestAnimationFrame(v);return}let A=Math.min(k/p,1),R=y(A);s.set(T(h,u,R)),A<1?c$1=requestAnimationFrame(v):(l=false,b());}c$1=requestAnimationFrame(v);}))},d.setImmediate=u=>{l&&(cancelAnimationFrame(c$1),l=false),s.set(u),a.set(u);},d.target=()=>a(),d}function He(e,t={}){let{duration:n=300,easing:r="cubic-bezier(0.2, 0, 0, 1)",delay:o=0,selector:i,keyAttribute:s="data-key",onComplete:a}=t,c=new Map;function l(){return Array.from(i?e.querySelectorAll(i):e.children)}function d(p){return p.getAttribute(s)??p.id??""}function u(){c=new Map;for(let p of l()){let y=d(p);if(y){let T=p.getBoundingClientRect();c.set(y,{left:T.left,top:T.top,width:T.width,height:T.height});}}}function f(){let p=l(),y=[];for(let m of p){let h=d(m),b=c.get(h);if(!b)continue;let P=m.getBoundingClientRect(),v=b.left-P.left,x=b.top-P.top,k=b.width/(P.width||1),A=b.height/(P.height||1);if(Math.abs(v)<.5&&Math.abs(x)<.5&&Math.abs(k-1)<.01&&Math.abs(A-1)<.01)continue;let R=m.animate([{transform:`translate(${v}px, ${x}px) scale(${k}, ${A})`},{transform:"translate(0, 0) scale(1, 1)"}],{duration:n,easing:r,delay:o,fill:"both"});y.push(R);}let T=new Set(p.map(d));for(let[m,h]of c)T.has(m);return c.clear(),new Promise(m=>{if(y.length===0){a?.(),m();return}Promise.all(y.map(h=>h.finished)).then(()=>{for(let h of y)h.cancel();a?.(),m();});})}return {measure:u,animate:f,async flip(p){return u(),p(),await new Promise(y=>requestAnimationFrame(y)),f()}}}async function ko(e,t,n){return He(e,n).flip(t)}var Co=B$1(e=>{let t=c({status:"pending"}),n=e.props.promise;return e.props.promise.then(r=>{e.props.promise===n&&t.set({status:"resolved",value:r});}).catch(r=>{e.props.promise===n&&t.set({status:"rejected",error:r instanceof Error?r:new Error(String(r))});}),()=>{let r=t();switch(r.status){case "pending":return e.props.pending?u(e.props.pending()):document.createComment("await-pending");case "resolved":return u(e.props.then(r.value));case "rejected":return e.props.catch?u(e.props.catch(r.error)):document.createComment("await-error")}}});function Ao(e){let t=c({status:"pending"});return e.then(n=>t.set({status:"resolved",value:n})).catch(n=>t.set({status:"rejected",error:n instanceof Error?n:new Error(String(n))})),()=>t()}function je(e,t){return n=>{t.self&&n.target!==n.currentTarget||(t.preventDefault&&n.preventDefault(),t.stopPropagation&&n.stopPropagation(),t.stopImmediatePropagation&&n.stopImmediatePropagation?.(),e(n));}}function Ro(e,t,n,r={}){let o=je(n,r),i={once:r.once,capture:r.capture,passive:r.passive};return e.addEventListener(t,o,i),()=>e.removeEventListener(t,o,i)}function Oo(e){let t=c(e.clientWidth),n=c(e.clientHeight);return typeof ResizeObserver<"u"&&new ResizeObserver(o=>{let i=o[0];i&&(t.set(i.contentRect.width),n.set(i.contentRect.height));}).observe(e),{width:()=>t(),height:()=>n()}}function Lo(e){let t=e??(typeof window<"u"?window:null),n=c(e?e.scrollLeft:window?.scrollX??0),r=c(e?e.scrollTop:window?.scrollY??0);if(t){let s=()=>{e?(n.set(e.scrollLeft),r.set(e.scrollTop)):(n.set(window.scrollX),r.set(window.scrollY));};t.addEventListener("scroll",s,{passive:true});}let o=r.set;r.set=s=>{o(s),e?e.scrollTop=s:window?.scrollTo(window.scrollX,s);};let i=n.set;return n.set=s=>{i(s),e?e.scrollLeft=s:window?.scrollTo(s,window.scrollY);},{scrollX:n,scrollY:r}}function Do(){return c(null)}function Mo(e){return c(null)}function Io(e$1,t,n){e$1.name=typeof n=="string"?n:"",e$1.addEventListener("change",()=>{e$1.checked&&t.set(n);}),e(()=>{e$1.checked=t()===n;});}function Fe(e$1,t,n){return e(()=>{n()?e$1.classList.add(t):e$1.classList.remove(t);})}function Ho(e,t){let n=Object.entries(t).map(([r,o])=>Fe(e,r,o));return ()=>n.forEach(r=>r())}function Ne(e$1,t,n){let r=t.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`);return e(()=>{let o=n();o==null?e$1.style.removeProperty(r):e$1.style.setProperty(r,typeof o=="number"?`${o}px`:String(o));})}function jo(e,t){let n=Object.entries(t).map(([r,o])=>Ne(e,r,o));return ()=>n.forEach(r=>r())}function Fo(e){return e}function No(...e$1){let t={},n=[];for(let a of e$1)typeof a=="function"?n.push(a):typeof a=="object"&&a!==null&&(t=a);let{label:r="inspect",level:o="log",logger:i,when:s}=t;return e(()=>{if(s&&!s())return;let a=n.map(c=>c());i?i(r,...a):console[o](`[${r}]`,...a);})}function $o(e,t={}){let{method:n="POST",headers:r={},onSuccess:o,onError:i,fetch:s=globalThis.fetch.bind(globalThis)}=t,a=c(false),c$1=c(null),l=c(null);async function d(u){a.set(true),l.set(null);try{let f=await s(e,{method:n,headers:{"Content-Type":"application/json",...r},body:JSON.stringify(u)});if(!f.ok)throw new Error(`Form action failed: ${f.status}`);let p=await f.json();return c$1.set(p),a.set(!1),o?.(p),p}catch(f){let p=f instanceof Error?f:new Error(String(f));throw l.set(p),a.set(false),i?.(p),p}}return {url:e,method:n,submitting:()=>a(),result:()=>c$1(),error:()=>l(),handle(u){return f=>{f.preventDefault();let p=f.target,y=new FormData(p),T={...u};y.forEach((m,h)=>{T[h]=m;}),d(T);}},submit:d}}function _o(e={}){if(typeof window>"u")return ()=>{};let{keyPrefix:t="akash-snapshot",capture:n=["scroll","forms"]}=e;function r(){let c={scrollX:window.scrollX,scrollY:window.scrollY,forms:{},timestamp:Date.now()};return n.includes("forms")&&document.querySelectorAll("form[id]").forEach(l=>{let d=l,u={};new FormData(d).forEach((f,p)=>{u[p]=String(f);}),c.forms[d.id]=u;}),c}function o(c){if(n.includes("scroll")&&requestAnimationFrame(()=>{window.scrollTo(c.scrollX,c.scrollY);}),n.includes("forms"))for(let[l,d]of Object.entries(c.forms)){let u=document.getElementById(l);if(u)for(let[f,p]of Object.entries(d)){let y=u.elements.namedItem(f);y&&(y.value=p);}}}let i=()=>`${t}-${window.location.pathname}`;function s(){try{let c=r();sessionStorage.setItem(i(),JSON.stringify(c));}catch{}}function a(){try{let c=sessionStorage.getItem(i());if(c){let l=JSON.parse(c);Date.now()-l.timestamp<1800*1e3&&o(l);}}catch{}}return window.addEventListener("beforeunload",s),window.addEventListener("popstate",()=>{requestAnimationFrame(a);}),performance.getEntriesByType("navigation")[0]?.type==="back_forward"&&requestAnimationFrame(a),()=>{window.removeEventListener("beforeunload",s);}}function se(e$1,t,n={}){let{immediate:r=false,once:o=false,debounce:i,deep:s=false}=n,a=Array.isArray(e$1),c=a?e$1:[e$1],l=c.map(()=>{}),d=true,u=null,f=false,p=null,y=()=>{f=true,u&&clearTimeout(u),p?.();};p=e(()=>{let m=c.map(P=>P());if(d){d=false,l=s?m.map($e):[...m],r&&T(m,c.map(()=>{}));return}if(!(s?m.some((P,v)=>!zo(P,l[v])):m.some((P,v)=>!Object.is(P,l[v]))))return;let b=[...l];l=s?m.map($e):[...m],T(m,b);});function T(m,h){if(f)return;let b=()=>{o&&(f=true,queueMicrotask(y)),a?t(m,h):t(m[0],h[0]);};i&&i>0?(u&&clearTimeout(u),u=setTimeout(b,i)):b();}return y}function Ko(e,t){return se(e,t,{once:true})}function Vo(e,t,n){return se(e,t,{debounce:n})}function $e(e){if(e===null||typeof e!="object")return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function zo(e,t){if(Object.is(e,t))return true;if(e===null||t===null||typeof e!="object"||typeof t!="object")return false;try{return JSON.stringify(e)===JSON.stringify(t)}catch{return false}}var _e=Symbol("deepSignal"),Wo=Symbol("deepRaw");function qo(e){let t=c(0),n=JSON.parse(JSON.stringify(e));function r(){t.update(i=>i+1);}function o(i,s=[]){return new Proxy(i,{get(a,c,l){if(c==="$raw")return JSON.parse(JSON.stringify(n));if(c==="$signal")return ()=>(t(),JSON.parse(JSON.stringify(n)));if(c===_e)return t;if(c===Wo)return n;let d=Reflect.get(a,c,l);return t(),d!==null&&typeof d=="object"?o(d,[...s,String(c)]):d},set(a,c,l){let d=Reflect.set(a,c,l);return r(),d},deleteProperty(a,c){let l=Reflect.deleteProperty(a,c);return r(),l}})}return o(n)}function Bo(e){return e.$raw??e}function Uo(e){if(e===null||typeof e!="object")return false;try{return e[_e]!==void 0}catch{return false}}function Ke(){let e=new Map;function t(n){let r=e.get(n);return r||(r=new Set,e.set(n,r)),r}return {on(n,r){return t(n).add(r),()=>t(n).delete(r)},once(n,r){let o=i=>{t(n).delete(o),r(i);};return t(n).add(o),()=>t(n).delete(o)},emit(n,r){let o=e.get(n);if(o)for(let i of Array.from(o))i(r);},off(n,r){t(n).delete(r);},clear(n){n?e.delete(n):e.clear();},listenerCount(n){return e.get(n)?.size??0},hasListeners(n){return (e.get(n)?.size??0)>0}}}var ae=null;function Go(){return ae||(ae=Ke()),ae}var Qo=new Set(["a","abbr","address","article","aside","b","bdi","bdo","blockquote","br","caption","cite","code","col","colgroup","dd","del","details","dfn","div","dl","dt","em","figcaption","figure","footer","h1","h2","h3","h4","h5","h6","header","hr","i","img","ins","kbd","li","main","mark","nav","ol","p","pre","q","rp","rt","ruby","s","samp","section","small","span","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","time","tr","u","ul","var","wbr"]),Jo=new Set(["alt","class","dir","href","id","lang","name","rel","src","style","tabindex","target","title","type","width","height","colspan","rowspan","scope","loading","decoding"]),Yo=/^(javascript|data|vbscript):/i,Xo=/^on/i;function ze(e,t={}){if(typeof document>"u")return e.replace(/<[^>]*>/g,"");let{allowTags:n=[],allowAttrs:r=[],allowDataAttrs:o=true,allowAriaAttrs:i=true,allowStyle:s=false,tagFilter:a,attrFilter:c}=t,l=new Set([...Qo,...n]),d=new Set([...Jo,...r]);s||d.delete("style");let u=new DOMParser().parseFromString(e,"text/html");return We(u.body,l,d,o,i,a,c),u.body.innerHTML}function We(e,t,n,r,o,i,s){let a=Array.from(e.childNodes);for(let c of a)if(c.nodeType===Node.ELEMENT_NODE){let l=c,d=l.tagName.toLowerCase();if(!(i?i(d):t.has(d))){let p=document.createTextNode(l.textContent??"");e.replaceChild(p,c);continue}let f=Array.from(l.attributes);for(let p of f){let y=p.name.toLowerCase(),T=p.value;if(Xo.test(y)){l.removeAttribute(p.name);continue}if(!(y.startsWith("data-")&&r)&&!(y.startsWith("aria-")&&o)){if(s&&!s(y,T,d)){l.removeAttribute(p.name);continue}if(!n.has(y)){l.removeAttribute(p.name);continue}if((y==="href"||y==="src")&&Yo.test(T)){l.removeAttribute(p.name);continue}}}We(l,t,n,r,o,i,s);}}function Zo(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function ei(e,t){return n=>{e.innerHTML=ze(n,t);}}function qe(e={}){let n={...{"default-src":["'self'"],"script-src":["'self'"],"style-src":["'self'","'unsafe-inline'"],"img-src":["'self'","data:","https:"],"font-src":["'self'","https:"],"connect-src":["'self'"],"frame-ancestors":["'none'"],"base-uri":["'self'"],"form-action":["'self'"],"object-src":["'none'"]},...e.directives};if(e.nonce){let r=`'nonce-${e.nonce}'`;n["script-src"]&&n["script-src"].push(r),n["style-src"]&&n["style-src"].push(r);}return e.reportUri&&(n["report-uri"]=[e.reportUri]),Object.entries(n).map(([r,o])=>`${r} ${o.join(" ")}`).join("; ")}function Be(e={}){return e.reportOnly?"Content-Security-Policy-Report-Only":"Content-Security-Policy"}function ti(e={}){let t={};if(e.csp!==false){let n=e.csp??{};t[Be(n)]=qe(n);}if(e.frameOptions!==false&&(t["X-Frame-Options"]=e.frameOptions??"DENY"),e.contentTypeOptions!==false&&(t["X-Content-Type-Options"]="nosniff"),t["X-XSS-Protection"]=e.xssProtection?"1; mode=block":"0",e.hsts!==false){let n=e.hsts??{maxAge:31536e3,includeSubDomains:true},r=`max-age=${n.maxAge}`;n.includeSubDomains&&(r+="; includeSubDomains"),n.preload&&(r+="; preload"),t["Strict-Transport-Security"]=r;}if(e.referrerPolicy!==false&&(t["Referrer-Policy"]=e.referrerPolicy??"strict-origin-when-cross-origin"),e.permissionsPolicy!==false){let n=e.permissionsPolicy??{camera:[],microphone:[],geolocation:[],payment:[]};t["Permissions-Policy"]=Object.entries(n).map(([r,o])=>`${r}=(${o.join(" ")})`).join(", ");}return e.coop!==false&&(t["Cross-Origin-Opener-Policy"]=e.coop??"same-origin"),e.coep!==false&&(t["Cross-Origin-Embedder-Policy"]=e.coep??"require-corp"),t}function Ue(e,...t){let n=new Set(["__proto__","constructor","prototype"]);for(let r of t)if(!(!r||typeof r!="object"))for(let o of Object.keys(r)){if(n.has(o))continue;let i=e[o],s=r[o];Ve(s)&&Ve(i)?e[o]=Ue({...i},s):e[o]=s;}return e}function Ge(e){if(e===null||typeof e!="object")return e;Object.freeze(e);for(let t of Object.values(e))typeof t=="object"&&t!==null&&Ge(t);return e}function Ve(e){return e!==null&&typeof e=="object"&&Object.getPrototypeOf(e)===Object.prototype}async function ni(e,t="sha384"){let r=new TextEncoder().encode(e),o=t==="sha256"?"SHA-256":t==="sha384"?"SHA-384":"SHA-512",i=await crypto.subtle.digest(o,r),s=new Uint8Array(i),a=btoa(String.fromCharCode(...s));return `${t}-${a}`}function Qe(){let e=new Uint8Array(32);return crypto.getRandomValues(e),Array.from(e,t=>t.toString(16).padStart(2,"0")).join("")}function ri(e={}){let{headerName:t="X-CSRF-Token",cookieName:n="csrf-token",tokenGenerator:r=Qe}=e,o=null;function i(){if(!o){if(typeof document<"u"){let a=document.cookie.match(new RegExp(`${n}=([^;]+)`));if(a)return o=a[1],o}o=r();}return o}return {interceptor:async(a,c)=>{let l=a.method.toUpperCase();return ["POST","PUT","PATCH","DELETE"].includes(l)&&a.headers.set(t,i()),c(a)},token:i,refresh(){o=r();}}}function oi(e,t={}){let{allowedHosts:n,allowedProtocols:r=["http:","https:"],allowRelative:o=true}=t;if(e.startsWith("/")&&!e.startsWith("//"))return o?e:null;try{let i=new URL(e);return !r.includes(i.protocol)||n&&!n.includes(i.hostname)?null:i.toString()}catch{return null}}function ii(e){let{maxAttempts:t,windowMs:n}=e,r=[];return {check(){let o=Date.now();for(;r.length>0&&r[0]<o-n;)r.shift();return r.length>=t?false:(r.push(o),true)},remaining(){let o=Date.now();for(;r.length>0&&r[0]<o-n;)r.shift();return Math.max(0,t-r.length)},reset(){r.length=0;}}}var ce=new Set,Je=true,le=null;function si(e){Je=e;}function ai(e){le=e;}function ci(){ce.clear();}function li(e,t){let n=((...r)=>(Ye(t),e(...r)));return Object.keys(e).forEach(r=>{n[r]=e[r];}),n.__deprecated=t,n}function ui(e,t){return Ye(t),e}function Ye(e){if(!Je||ce.has(e.name))return;ce.add(e.name);let t=[`[AkashJS] DEPRECATED: ${e.name}() is deprecated since v${e.since}`];e.removeIn?t[0]+=` and will be removed in v${e.removeIn}.`:t[0]+=".",e.replacement&&t.push(` Migrate to: ${e.replacement}()`),e.message&&t.push(` ${e.message}`),t.push(` See: ${e.link??"https://akash.js.org/migration"}`);let n=t.join(`
|
|
72
72
|
`);le?le(n):typeof console<"u"&&console.warn(n);}var U=new Map;function di(e){U.set(e.name,e);}function Xe(){return Array.from(U.values())}function pi(e){return Xe().filter(t=>t.stability===e)}function fi(e){return U.get(e)?.stability==="deprecated"}function mi(e){return U.get(e)?.deprecation??null}function gi(e){let t=[],n=[],r=Object.entries(e);if(r.length===0)return {compatible:true,warnings:t,errors:n};let o=r.filter(([i])=>i.startsWith("@akashjs/"));if(o.length>1){let i=new Set(o.map(([,a])=>a.split(".")[0])),s=new Set(o.map(([,a])=>a.split(".").slice(0,2).join(".")));i.size>1?n.push(`Major version mismatch: ${o.map(([a,c])=>`${a}@${c}`).join(", ")}. All @akashjs packages should be on the same major version.`):s.size>1&&t.push(`Minor version mismatch: ${o.map(([a,c])=>`${a}@${c}`).join(", ")}. Consider updating all packages to the same version with \`akash update\`.`);}return {compatible:n.length===0,warnings:t,errors:n}}export{Co as Await,en as ErrorBoundary,me as HYDRATE_ATTR,ur as Image,Mn as Portal,rn as Suspense,Jr as Switch,dn as Transition,Nn as VirtualFor,Hr as applyDirective,fr as applyStyles,fo as assignTransitionName,Ao as awaitSignal,Fe as bindClass,Ho as bindClasses,Oo as bindDimensions,Do as bindElement,Mo as bindGroup,Io as bindGroupItem,Lo as bindScroll,Ne as bindStyle,jo as bindStyles,te as calculateRange,Sr as capitalize,vr as chain,gi as checkCompatibility,be as checkForLeaks,sn as claimElement,an as claimText,no as clearProviders,bo as clearQueryState,fn as collectSSRHead,_n as countOps,yn as createApp,ri as createCSRFInterceptor,mr as createDataTable,Ke as createEventBus,He as createFlip,Oe as createInjector,ii as createRateLimiter,ei as createSafeHTML,Zt as createSlots,tr as createTimer,Hn as createToaster,pr as css,Ar as currency,xe as cx,Cr as date,Ge as deepFreeze,qo as deepSignal,ro as defer,$n as defineAsyncComponent,zr as defineCustomElement,I as defineDirective,$o as defineFormAction,br as definePipe,gn as definePlugin,Zr as defineProvider,Fo as defineSnippet,li as deprecated,ui as deprecatedValue,Ir as directiveFromFn,Vn as disableLeakDetection,Ur as discoverStaticRoutes,Ie as easings,Kn as enableLeakDetection,_o as enableSnapshots,ye as enterTransition,Zo as escapeHtml,un as exitTransition,ln as findHydrationBoundaries,ko as flip,nr as formatProfile,qe as generateCSP,Qe as generateCSRFToken,Gr as generatePaths,ni as generateSRI,ti as generateSecurityHeaders,hr as generateSitemap,pn as generateTransitionCSS,pi as getAPIsByStability,Bn as getActiveEffects,Be as getCSPHeaderName,mi as getDeprecationInfo,Gn as getLeakDetectionStats,we as getProfileSummary,wo as getQueryParams,Xe as getRegisteredAPIs,tn as getSuspenseContext,ge as getTransitionClasses,Go as globalEventBus,Xt as hasSlot,X as hydrate,to as injectProvider,No as inspect,Uo as isDeepSignal,fi as isDeprecated,on as isHydrationActive,zn as isLeakDetectionEnabled,Xn as isProfiling,Lr as json,he as longestIncreasingSubsequence,xr as lowercase,Yr as match,er as measureAsync,Zn as measureSync,Rr as number,Ro as onEvent,Or as percent,Tr as pipe,Dr as plural,Br as prerender,cn as progressiveHydrate,Te as reconcileKeys,z as recordPerfEntry,di as registerAPI,nn as registerPending,Mr as relativeTime,Fr as removeDirectives,xo as removeQueryState,mn as renderHeadToString,Yt as renderSlot,Ae as renderSwitch,Un as reportLeaks,ci as resetDeprecationWarnings,So as resetQueryState,Ue as safeMerge,ze as sanitize,oi as sanitizeURL,si as setDeprecationWarnings,ai as setWarningHandler,Qr as sitemapFromResults,Jn as startProfiling,uo as startViewTransition,Yn as stopProfiling,Le as supportsViewTransitions,Er as titleCase,Wr as toCustomElement,Bo as toRaw,Wn as trackEffect,Pr as trim,kr as truncate,Po as tweened,qn as untrackEffect,jr as updateDirective,wr as uppercase,Ce as urlToFilePath,sr as useAnnounce,kn as useBreakpoint,Dn as useClickOutside,An as useClipboard,wn as useCounter,vn as useDebounce,or as useFocusTrap,On as useGeolocation,j as useHead,dr as useInfiniteScroll,hn as useInterval,ar as useKeyboard,En as useMediaQuery,Rn as useOnline,Pe as useOpenGraph,Sn as usePrevious,Me as useQueryState,vo as useQueryStates,yr as useSEO,Cn as useStorage,Ee as useStructuredData,jn as useTheme,bn as useThrottle,Tn as useTimeout,xn as useToggle,ke as useTwitterCard,Fn as useVirtualList,Ln as useWindowSize,Nr as vAutoFocus,$r as vClickOutside,Kr as vIntersect,_r as vLongPress,Vr as vResize,po as viewTransitionCSS,se as watch,Vo as watchDebounced,Ko as watchOnce,je as withModifiers};//# sourceMappingURL=index.js.map
|
|
73
73
|
//# sourceMappingURL=index.js.map
|