@zeus-js/zeus 0.1.1-beta.10 → 0.1.1-beta.12
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/capabilities.cjs +2 -2
- package/dist/capabilities.js +1 -1
- package/dist/capabilities.prod.cjs +2 -2
- package/dist/capabilities.prod.js +1 -1
- package/dist/server.cjs +1 -1
- package/dist/server.js +1 -1
- package/dist/server.prod.cjs +1 -1
- package/dist/server.prod.js +1 -1
- package/dist/zeus.cjs +1 -1
- package/dist/zeus.esm-browser.js +32 -19
- package/dist/zeus.esm-browser.prod.js +1 -1
- package/dist/zeus.esm-bundler.js +1 -1
- package/dist/zeus.global.js +32 -19
- package/dist/zeus.global.prod.js +1 -1
- package/dist/zeus.prod.cjs +1 -1
- package/package.json +4 -4
package/dist/capabilities.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* zeus v0.1.1-beta.
|
|
2
|
+
* zeus v0.1.1-beta.12
|
|
3
3
|
* (c) 2026 baicie
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
**/
|
|
@@ -9,7 +9,7 @@ Object.defineProperties(exports, {
|
|
|
9
9
|
});
|
|
10
10
|
const ZEUS_CAPABILITIES = {
|
|
11
11
|
packageName: "@zeus-js/zeus",
|
|
12
|
-
version: "0.1.1-beta.
|
|
12
|
+
version: "0.1.1-beta.12",
|
|
13
13
|
publicApi: {
|
|
14
14
|
createSignal: true,
|
|
15
15
|
createMemo: true,
|
package/dist/capabilities.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* zeus v0.1.1-beta.
|
|
2
|
+
* zeus v0.1.1-beta.12
|
|
3
3
|
* (c) 2026 baicie
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
**/
|
|
@@ -9,7 +9,7 @@ Object.defineProperties(exports, {
|
|
|
9
9
|
});
|
|
10
10
|
const ZEUS_CAPABILITIES = {
|
|
11
11
|
packageName: "@zeus-js/zeus",
|
|
12
|
-
version: "0.1.1-beta.
|
|
12
|
+
version: "0.1.1-beta.12",
|
|
13
13
|
publicApi: {
|
|
14
14
|
createSignal: true,
|
|
15
15
|
createMemo: true,
|
package/dist/server.cjs
CHANGED
package/dist/server.js
CHANGED
package/dist/server.prod.cjs
CHANGED
package/dist/server.prod.js
CHANGED
package/dist/zeus.cjs
CHANGED
package/dist/zeus.esm-browser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* zeus v0.1.1-beta.
|
|
2
|
+
* zeus v0.1.1-beta.12
|
|
3
3
|
* (c) 2026 baicie
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
**/
|
|
@@ -1790,22 +1790,25 @@ function applyBinding(value, once, apply) {
|
|
|
1790
1790
|
function setAttr(el, name, value) {
|
|
1791
1791
|
const attrName = normalizeAttrName(name);
|
|
1792
1792
|
const propName = getBooleanDomPropertyName(name);
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
if (
|
|
1796
|
-
|
|
1797
|
-
else el.setAttribute(attrName, String(value));
|
|
1798
|
-
return;
|
|
1799
|
-
}
|
|
1800
|
-
if (value == null || value === false) {
|
|
1801
|
-
el.removeAttribute(attrName);
|
|
1802
|
-
return;
|
|
1803
|
-
}
|
|
1804
|
-
if (value === true) {
|
|
1805
|
-
el.setAttribute(attrName, "");
|
|
1806
|
-
return;
|
|
1793
|
+
const serialized = serializeAttrValue(value);
|
|
1794
|
+
if (serialized === null ? !el.hasAttribute(attrName) : el.getAttribute(attrName) === serialized) {
|
|
1795
|
+
if (!propName || !(el instanceof HTMLElement)) return;
|
|
1796
|
+
if (Boolean(value) === Boolean(el[propName])) return;
|
|
1807
1797
|
}
|
|
1808
|
-
|
|
1798
|
+
if (propName && el instanceof HTMLElement) el[propName] = Boolean(value);
|
|
1799
|
+
if (serialized === null) el.removeAttribute(attrName);
|
|
1800
|
+
else el.setAttribute(attrName, serialized);
|
|
1801
|
+
}
|
|
1802
|
+
function writeAttr(el, name, value) {
|
|
1803
|
+
const attrName = normalizeAttrName(name);
|
|
1804
|
+
const propName = getBooleanDomPropertyName(name);
|
|
1805
|
+
const serialized = serializeAttrValue(value);
|
|
1806
|
+
if (propName && el instanceof HTMLElement) el[propName] = Boolean(value);
|
|
1807
|
+
if (serialized === null) el.removeAttribute(attrName);
|
|
1808
|
+
else el.setAttribute(attrName, serialized);
|
|
1809
|
+
}
|
|
1810
|
+
function serializeAttrValue(value) {
|
|
1811
|
+
return value == null || value === false ? null : value === true ? "" : String(value);
|
|
1809
1812
|
}
|
|
1810
1813
|
function getBooleanDomPropertyName(name) {
|
|
1811
1814
|
return BOOLEAN_DOM_PROPERTY_NAME[name];
|
|
@@ -1829,8 +1832,14 @@ function normalizeAttrName(name) {
|
|
|
1829
1832
|
return name === "className" ? "class" : name;
|
|
1830
1833
|
}
|
|
1831
1834
|
function bindAttr(el, name, value, once = false) {
|
|
1835
|
+
let previous;
|
|
1836
|
+
let hasPrevious = false;
|
|
1832
1837
|
applyBinding(value, once, (next) => {
|
|
1833
|
-
|
|
1838
|
+
const serialized = serializeAttrValue(next);
|
|
1839
|
+
if (hasPrevious && serialized === previous) setAttr(el, name, next);
|
|
1840
|
+
else writeAttr(el, name, next);
|
|
1841
|
+
previous = serialized;
|
|
1842
|
+
hasPrevious = true;
|
|
1834
1843
|
});
|
|
1835
1844
|
}
|
|
1836
1845
|
function bindProp(el, name, value, once = false) {
|
|
@@ -1871,10 +1880,13 @@ function bindStyle(el, value, once = false) {
|
|
|
1871
1880
|
function patchStyle(el, prev, next) {
|
|
1872
1881
|
const style = el.style;
|
|
1873
1882
|
const values = prev ? prev[0] : Object.create(null);
|
|
1874
|
-
const
|
|
1883
|
+
const keys = Object.keys(next);
|
|
1884
|
+
const state = style.cssText + keys.join(",");
|
|
1875
1885
|
const styleChanged = prev && state != prev[1];
|
|
1886
|
+
let wrote = false;
|
|
1876
1887
|
for (const key in values) if (!(key in next)) {
|
|
1877
1888
|
style.setProperty(key.replace(/[A-Z]/g, (match) => `-${match.toLowerCase()}`), "");
|
|
1889
|
+
wrote = true;
|
|
1878
1890
|
delete values[key];
|
|
1879
1891
|
}
|
|
1880
1892
|
for (const key in next) {
|
|
@@ -1882,9 +1894,10 @@ function patchStyle(el, prev, next) {
|
|
|
1882
1894
|
const expected = value == null ? "" : normalizeStyleValue(key, value);
|
|
1883
1895
|
if (values[key] === expected && !styleChanged) continue;
|
|
1884
1896
|
style.setProperty(key.replace(/[A-Z]/g, (match) => `-${match.toLowerCase()}`), expected);
|
|
1897
|
+
wrote = true;
|
|
1885
1898
|
values[key] = expected;
|
|
1886
1899
|
}
|
|
1887
|
-
return [values, style.cssText +
|
|
1900
|
+
return prev && !wrote ? prev : [values, style.cssText + keys.join(",")];
|
|
1888
1901
|
}
|
|
1889
1902
|
function normalizeStyleValue(key, value) {
|
|
1890
1903
|
if (typeof value === "number" && value !== 0 && unitlessNumbers[key] !== true) return `${value}px`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}const t=Object.assign,n=Object.prototype.hasOwnProperty,r=(e,t)=>n.call(e,t),i=Array.isArray,a=e=>d(e)===`[object Map]`,o=e=>typeof e==`function`,s=e=>typeof e==`string`,c=e=>typeof e==`symbol`,l=e=>typeof e==`object`&&!!e,u=Object.prototype.toString,d=e=>u.call(e),f=e=>d(e).slice(8,-1),ee=e=>s(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,p=(e,t)=>!Object.is(e,t);let m;var te=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&m&&(m.active?(this.parent=m,this.index=(m.scopes||(m.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].pause();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].resume();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].resume()}}run(e){if(this._active){let t=m;try{return m=this,e()}finally{m=t}}}on(){++this._on===1&&(this.prevScope=m,m=this)}off(){if(this._on>0&&--this._on===0){if(m===this)m=this.prevScope;else{let e=m;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(this.effects.length=0,t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}};function ne(e){return new te(e)}function re(){return m}function h(e,t=!1){m&&m.cleanups.push(e)}let g;const _=new WeakSet;var v=class{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanups=void 0,this.scheduler=void 0,this.scope=m,m&&(m.active?m.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,_.has(this)&&(_.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||ae(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,_e(this),oe(this);let e=g,t=C;g=this,C=!0;try{return this.fn()}finally{se(this),g=e,C=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)ue(e);this.deps=this.depsTail=void 0,_e(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?_.add(this):this.scheduler?this.scheduler():this.flags&128?this.runIfDirty():this.run()}runIfDirty(){ce(this)&&this.run()}get dirty(){return ce(this)}};let ie=0,y,b;function ae(e,t=!1){if(e.flags|=8,t){e.next=b,b=e;return}e.next=y,y=e}function x(){ie++}function S(){if(--ie>0)return;if(b){let e=b;for(b=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;y;){let t=y;for(y=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(t){e||(e=t)}t=n}}if(e)throw e}function oe(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function se(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),ue(r),de(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function ce(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(le(t.dep.computed)||t.dep.version!==t.version))return!0;return!1}function le(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===w)||(e.globalVersion=w,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!ce(e))))return;e.flags|=2;let t=e.dep,n=g,r=C;g=e,C=!0;try{oe(e);let n=e.fn(e._value);(t.version===0||p(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{g=n,C=r,se(e),e.flags&=-3}}function ue(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)ue(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function de(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}function fe(e,n){e.effect instanceof v&&(e=e.effect.fn);let r=new v(e);n&&t(r,n);try{r.run()}catch(e){throw r.stop(),e}let i=r.run.bind(r);return i.effect=r,i}let C=!0;const pe=[];function me(){pe.push(C),C=!1}function he(){let e=pe.pop();C=e===void 0?!0:e}function ge(e,t=!1){if(g instanceof v){var n,r;((r=(n=g).cleanups)==null?n.cleanups=[]:r).push(e)}}function _e(e){let t=e.cleanups;if(e.cleanups=void 0,t){let e=g;g=void 0;try{let e;for(let n of t)try{n()}catch(t){e!=null||(e=t)}if(e)throw e}finally{g=e}}}function ve(e){x();try{return e()}finally{S()}}function ye(e){me();try{return e()}finally{he()}}function be(){return g instanceof v?g:void 0}let w=0;var xe=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},Se=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!g||!C||g===this.computed)return;this.computed&&(g.flags|=128);let t=this.activeLink;if(t===void 0||t.sub!==g)t=this.activeLink=new xe(g,this),g.deps?(t.prevDep=g.depsTail,g.depsTail.nextDep=t,g.depsTail=t):g.deps=g.depsTail=t,Ce(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=g.depsTail,t.nextDep=void 0,g.depsTail.nextDep=t,g.depsTail=t,g.deps===t&&(g.deps=e)}return t}trigger(e){this.version++,w++,this.notify(e)}notify(e){x();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{S()}}};function Ce(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)Ce(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const we=new WeakMap,T=Symbol(``),E=Symbol(``),D=Symbol(``);function O(e,t,n){if(C&&g){let t=we.get(e);t||we.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new Se),r.map=t,r.key=n),r.track()}}function k(e,t,n,r,o,s){let l=we.get(e);if(!l){w++;return}let u=e=>{e&&e.trigger()};if(x(),t===`clear`)l.forEach(u);else{let o=i(e),s=o&&ee(n);if(o&&n===`length`){let e=Number(r);l.forEach((t,n)=>{(n===`length`||n===D||!c(n)&&n>=e)&&u(t)})}else switch((n!==void 0||l.has(void 0))&&u(l.get(n)),s&&u(l.get(D)),t){case`add`:o?s&&u(l.get(`length`)):(u(l.get(T)),a(e)&&u(l.get(E)));break;case`delete`:o||(u(l.get(T)),a(e)&&u(l.get(E)));break;case`set`:a(e)&&u(l.get(T));break}}S()}var Te=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new Se(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=w-1,this.next=void 0,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&g!==this)return ae(this,!0),!0}get value(){let e=this.dep.track();return le(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function Ee(e,t,n=!1){let r,i;return o(e)?r=e:(r=e.get,i=e.set),new Te(r,i,n)}function De(e){let t=be(),n=re();if(n&&(t==null?void 0:t.scope)!==n){h(e,!0);return}if(t){ge(e,!0);return}if(n){h(e,!0);return}}function A(e){let t=V(e);return t===e?t:(O(t,`iterate`,D),B(e)?t:t.map(H))}function Oe(e){return O(e=V(e),`iterate`,D),e}function j(e,t){return z(e)?U(et(e)?H(t):t):H(t)}const ke={__proto__:null,[Symbol.iterator](){return Ae(this,Symbol.iterator,e=>j(this,e))},concat(...e){return A(this).concat(...e.map(e=>i(e)?A(e):e))},entries(){return Ae(this,`entries`,e=>(e[1]=j(this,e[1]),e))},every(e,t){return M(this,`every`,e,t,void 0,arguments)},filter(e,t){return M(this,`filter`,e,t,e=>e.map(e=>j(this,e)),arguments)},find(e,t){return M(this,`find`,e,t,e=>j(this,e),arguments)},findIndex(e,t){return M(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return M(this,`findLast`,e,t,e=>j(this,e),arguments)},findLastIndex(e,t){return M(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return M(this,`forEach`,e,t,void 0,arguments)},includes(...e){return N(this,`includes`,e)},indexOf(...e){return N(this,`indexOf`,e)},join(e){return A(this).join(e)},lastIndexOf(...e){return N(this,`lastIndexOf`,e)},map(e,t){return M(this,`map`,e,t,void 0,arguments)},pop(){return P(this,`pop`)},push(...e){return P(this,`push`,e)},reduce(e,...t){return Me(this,`reduce`,e,t)},reduceRight(e,...t){return Me(this,`reduceRight`,e,t)},shift(){return P(this,`shift`)},some(e,t){return M(this,`some`,e,t,void 0,arguments)},splice(...e){return P(this,`splice`,e)},toReversed(){return A(this).toReversed()},toSorted(e){return A(this).toSorted(e)},toSpliced(...e){return A(this).toSpliced(...e)},unshift(...e){return P(this,`unshift`,e)},values(){return Ae(this,`values`,e=>j(this,e))}};function Ae(e,t,n){let r=Oe(e),i=r[t]();return r!==e&&!B(e)&&(i._next=i.next,i.next=()=>{let e=i._next();return e.done||(e.value=n(e.value)),e}),i}const je=Array.prototype;function M(e,t,n,r,i,a){let o=Oe(e),s=o!==e&&!B(e),c=o[t];if(c!==je[t]){let t=c.apply(e,a);return s?H(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,j(e,t),r,e)}:n.length>2&&(l=function(t,r){return n.call(this,t,r,e)}));let u=c.call(o,l,r);return s&&i?i(u):u}function Me(e,t,n,r){let i=Oe(e),a=i!==e&&!B(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=j(e,t)),n.call(this,t,j(e,r),i,e)}):n.length>3&&(o=function(t,r,i){return n.call(this,t,r,i,e)}));let c=i[t](o,...r);return s?j(e,c):c}function N(e,t,n){let r=V(e);O(r,`iterate`,D);let i=r[t](...n);return(i===-1||i===!1)&&tt(n[0])?(n[0]=V(n[0]),r[t](...n)):i}function P(e,t,n=[]){me(),x();let r=V(e)[t].apply(e,n);return S(),he(),r}const Ne=e(`__proto__,__v_isRef,__isVue`),Pe=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(c));function Fe(e){c(e)||(e=String(e));let t=V(this);return O(t,`has`,e),t.hasOwnProperty(e)}var Ie=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t===`__v_skip`)return e.__v_skip;let r=this._isReadonly,a=this._isShallow;if(t===`__v_isReactive`)return!r;if(t===`__v_isReadonly`)return r;if(t===`__v_isShallow`)return a;if(t===`__v_raw`)return n===(r?a?Ye:Je:a?qe:Ke).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let o=i(e);if(!r){let e;if(o&&(e=ke[t]))return e;if(t===`hasOwnProperty`)return Fe}let s=Reflect.get(e,t,W(e)?e:n);if((c(t)?Pe.has(t):Ne(t))||(r||O(e,`get`,t),a))return s;if(W(s)){let e=o&&ee(t)?s:s.value;return r&&l(e)?R(e):e}return l(s)?r?R(s):Qe(s):s}},Le=class extends Ie{constructor(e=!1){super(!1,e)}set(e,t,n,a){let o=e[t],s=i(e)&&ee(t);if(!this._isShallow){let e=z(o);if(!B(n)&&!z(n)&&(o=V(o),n=V(n)),!s&&W(o)&&!W(n))return e||(o.value=n),!0}let c=s?Number(t)<e.length:r(e,t),l=Reflect.set(e,t,n,W(e)?e:a);return e===V(a)&&(c?p(n,o)&&k(e,`set`,t,n,o):k(e,`add`,t,n)),l}deleteProperty(e,t){let n=r(e,t),i=e[t],a=Reflect.deleteProperty(e,t);return a&&n&&k(e,`delete`,t,void 0,i),a}has(e,t){let n=Reflect.has(e,t);return(!c(t)||!Pe.has(t))&&O(e,`has`,t),n}ownKeys(e){return O(e,`iterate`,i(e)?`length`:T),Reflect.ownKeys(e)}},Re=class extends Ie{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}};const ze=new Le,Be=new Re,F=e=>e,I=e=>Reflect.getPrototypeOf(e);function Ve(e,n,r){return function(...i){let o=this.__v_raw,s=V(o),c=a(s),l=e===`entries`||e===Symbol.iterator&&c,u=e===`keys`&&c,d=o[e](...i),f=r?F:n?U:H;return!n&&O(s,`iterate`,u?E:T),t(Object.create(d),{next(){let{value:e,done:t}=d.next();return t?{value:e,done:t}:{value:l?[f(e[0]),f(e[1])]:f(e),done:t}}})}}function L(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function He(e,n){let r={get(t){let r=this.__v_raw,i=V(r),a=V(t);e||(p(t,a)&&O(i,`get`,t),O(i,`get`,a));let{has:o}=I(i),s=n?F:e?U:H;if(o.call(i,t))return s(r.get(t));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(t)},get size(){let t=this.__v_raw;return!e&&O(V(t),`iterate`,T),t.size},has(t){let n=this.__v_raw,r=V(n),i=V(t);return e||(p(t,i)&&O(r,`has`,t),O(r,`has`,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(t,r){let i=this,a=i.__v_raw,o=V(a),s=n?F:e?U:H;return!e&&O(o,`iterate`,T),a.forEach((e,n)=>t.call(r,s(e),s(n),i))}};return t(r,e?{add:L(`add`),set:L(`set`),delete:L(`delete`),clear:L(`clear`)}:{add(e){let t=V(this),r=I(t),i=V(e),a=!n&&!B(e)&&!z(e)?i:e;return r.has.call(t,a)||p(e,a)&&r.has.call(t,e)||p(i,a)&&r.has.call(t,i)||(t.add(a),k(t,`add`,a,a)),this},set(e,t){!n&&!B(t)&&!z(t)&&(t=V(t));let r=V(this),{has:i,get:a}=I(r),o=i.call(r,e);o||(e=V(e),o=i.call(r,e));let s=a.call(r,e);return r.set(e,t),o?p(t,s)&&k(r,`set`,e,t,s):k(r,`add`,e,t),this},delete(e){let t=V(this),{has:n,get:r}=I(t),i=n.call(t,e);i||(e=V(e),i=n.call(t,e));let a=r?r.call(t,e):void 0,o=t.delete(e);return i&&k(t,`delete`,e,void 0,a),o},clear(){let e=V(this),t=e.size!==0,n=e.clear();return t&&k(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(t=>{r[t]=Ve(t,e,n)}),r}function Ue(e,t){let n=He(e,t);return(t,i,a)=>i===`__v_isReactive`?!e:i===`__v_isReadonly`?e:i===`__v_raw`?t:Reflect.get(r(n,i)&&i in t?n:t,i,a)}const We={get:Ue(!1,!1)},Ge={get:Ue(!0,!1)},Ke=new WeakMap,qe=new WeakMap,Je=new WeakMap,Ye=new WeakMap;function Xe(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function Ze(e){return e.__v_skip||!Object.isExtensible(e)?0:Xe(f(e))}function Qe(e){return z(e)?e:$e(e,!1,ze,We,Ke)}function R(e){return $e(e,!0,Be,Ge,Je)}function $e(e,t,n,r,i){if(!l(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;let a=Ze(e);if(a===0)return e;let o=i.get(e);if(o)return o;let s=new Proxy(e,a===2?r:n);return i.set(e,s),s}function et(e){return z(e)?et(e.__v_raw):!!(e&&e.__v_isReactive)}function z(e){return!!(e&&e.__v_isReadonly)}function B(e){return!!(e&&e.__v_isShallow)}function tt(e){return e?!!e.__v_raw:!1}function V(e){let t=e&&e.__v_raw;return t?V(t):e}const H=e=>l(e)?Qe(e):e,U=e=>l(e)?R(e):e;let nt,rt;function W(e){return e?e.__v_isRef===!0:!1}function it(e){return at(e,!1)}function G(e){return at(e,!0)}function at(e,t){return W(e)?e:new ot(e,t)}nt=`__v_isRef`,rt=`__v_isShallow`;var ot=class{constructor(e,t){this.dep=new Se,this[nt]=!0,this[rt]=!1,this._rawValue=t?e:V(e),this._value=t?e:H(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||B(e)||z(e);e=n?e:V(e),p(e,t)&&(this._rawValue=e,this._value=n?e:H(e),this.dep.trigger())}};function st(e){let t=G(e);return[()=>t.value,e=>{let n=typeof e==`function`?e(t.value):e;return t.value=n,n}]}function ct(e){let t=Ee(e);return()=>t.value}function lt(e){fe(e)}function ut(e){let t=ne(!0),n=!1,r=()=>{n||(n=!0,t.stop())};try{return t.run(()=>e(r))}catch(e){throw r(),e}}function dt(e){return arguments.length===0?it():pt(e)?Qe(e):it(e)}function ft(e){return arguments.length===0?G():G(e)}function pt(e){return typeof e!=`object`||!e?!1:Array.isArray(e)||e instanceof Map||e instanceof Set||e instanceof WeakMap||e instanceof WeakSet?!0:mt(e)}function mt(e){let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}const ht=new Set;function gt(e){let t=e;for(;t;){if(ht.has(t))return!0;if(t.parentNode){t=t.parentNode;continue}let e=t.getRootNode();t=`host`in e?e.host:null}return!1}const K=new WeakMap,_t=new WeakSet;function vt(e,t){let n={lightChildren:t};return K.set(e,n),()=>{K.get(e)===n&&K.delete(e)}}function yt(e,t){let n=K.get(e);if(n){if(t.nodeType===11){for(let e of t.childNodes)xt(n,e);return}xt(n,t)}}function bt(e){return _t.has(e)}function xt(e,t){e.lightChildren.includes(t)||_t.add(t)}function St(e,t,n=null){if(t===void 0||t==null||t===!1||t===!0)return[];if(Array.isArray(t)){let r=[];for(let i of t)r.push(...St(e,i,n));return r}if(t instanceof Node&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let r=Array.from(t.childNodes);for(let t of r)yt(e,t),e.insertBefore(t,n);return r}let r=t instanceof Node?t:document.createTextNode(String(t));return yt(e,r),e.insertBefore(r,n),[r]}let q;function Ct(){return q}function wt(e,t){let n=q;q=e;try{return t()}finally{q=n}}function J(e,t,n=null){t!==void 0&&St(e,t,n)}let Y;function X(e=Y){return{parent:e,provides:new Map}}function Z(e,t){let n=Y;Y=e;try{return t()}finally{Y=n}}function Tt(e){let t=arguments.length>0,n={id:Symbol(``),defaultValue:e,hasDefaultValue:t,Provider(e){let t=X(Y);return t.provides.set(n.id,e.value),Z(t,()=>{let t=Nt(e.children);return e.bridge?At(n,e.value,t):t})},Bridge(e){return At(n,e.value,Nt(e.children))}};return n}function Et(e,t){let n=Y;n&&n.provides.set(e.id,t)}function Dt(e,t){let n=Y;for(;n;){if(n.provides.has(e.id))return n.provides.get(e.id);n=n.parent}if(arguments.length>=2)return t;if(e.hasDefaultValue)return e.defaultValue;throw Error(`Context value was not provided.`)}function Ot(e,t){return arguments.length>=2?Dt(e,t):Dt(e)}const kt=`zeus:context-request`;function At(e,t,n){let r=document.createElement(`zeus-context`);return r.style.cssText=`display:contents;position:unset;width:0;height:0;overflow:hidden`,jt(r,e,t),J(r,n),r}function jt(e,t,n){let r=e=>{let r=e;r.type===`zeus:context-request`&&r.detail.id===t.id&&(r.stopPropagation(),r.detail.resolve(n))};e.addEventListener(kt,r),h(()=>{e.removeEventListener(kt,r)},!0)}function Mt(e,t){let n=!1,r,i=new CustomEvent(kt,{bubbles:!0,composed:!0,cancelable:!0,detail:{id:t.id,resolved:!1,value:void 0,resolve(e){n=!0,r=e,this.resolved=!0,this.value=e}}});return e.dispatchEvent(i),{found:n,value:r}}function Nt(e){return typeof e==`function`?e():e==null?null:e}function Pt(e){var t;typeof window>`u`||(t=window.__ZEUS_DEVTOOLS_HOOK__)==null||t.emit(e)}function Ft(e,t,n={}){var r;let i=ne(),a=(r=n.owner)==null?X():r;i.run(()=>{t.textContent=``,Z(a,()=>{J(t,It(e))})}),Pt({type:`render`,target:t});let o=!1;return()=>{o||(o=!0,i.stop(),t.textContent=``)}}function It(e){return typeof e==`function`?e():e==null?null:e}function Q(e,t,n){if(t){ye(()=>n(e()));return}fe(()=>{n(e())})}function Lt(e,t,n){let r=Bt(t),i=Rt(t);if(i&&e instanceof HTMLElement){e[i]=!!n,n==null||n===!1?e.removeAttribute(r):n===!0?e.setAttribute(r,``):e.setAttribute(r,String(n));return}if(n==null||n===!1){e.removeAttribute(r);return}if(n===!0){e.setAttribute(r,``);return}e.setAttribute(r,String(n))}function Rt(e){return zt[e]}const zt={hidden:`hidden`,disabled:`disabled`,readonly:`readOnly`,readOnly:`readOnly`,multiple:`multiple`,selected:`selected`,checked:`checked`,open:`open`,autofocus:`autofocus`,autoFocus:`autofocus`,indeterminate:`indeterminate`,noValidate:`noValidate`,novalidate:`noValidate`};function Bt(e){return e===`className`?`class`:e}function Vt(e,t,n,r=!1){Q(n,r,n=>{Lt(e,t,n)})}function Ht(e,t,n,r=!1){Q(n,r,n=>{e[t]=n})}function Ut(e,t,n=!1){Q(t,n,t=>{let n=Wt(t);n?e.setAttribute(`class`,n):e.removeAttribute(`class`)})}function Wt(e){return e?typeof e==`string`?e:Array.isArray(e)?e.map(Wt).filter(Boolean).join(` `):typeof e==`object`?Object.keys(e).filter(t=>e[t]).join(` `):``:``}function Gt(e,t,n=!1){let r;Q(t,n,t=>{if(t==null){e.removeAttribute(`style`),r=void 0;return}if(typeof t==`string`){e.setAttribute(`style`,t),r=void 0;return}r=Kt(e,r,t)})}function Kt(e,t,n){let r=e.style,i=t?t[0]:Object.create(null),a=r.cssText+Object.keys(n),o=t&&a!=t[1];for(let e in i)e in n||(r.setProperty(e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),``),delete i[e]);for(let e in n){let t=n[e],a=t==null?``:qt(e,t);i[e]===a&&!o||(r.setProperty(e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),a),i[e]=a)}return[i,r.cssText+Object.keys(n)]}function qt(e,t){return typeof t==`number`&&t!==0&&Jt[e]!==!0?`${t}px`:String(t)}const Jt={opacity:!0,zIndex:!0,fontWeight:!0,lineHeight:!0,flex:!0,flexGrow:!0,flexShrink:!0,order:!0};function Yt(e,t){return Z(X(),()=>e(t))}function Xt(e){return Zt(e.when?e.children:e.fallback)}function Zt(e){return typeof e==`function`?e():e==null?null:e}function Qt(e){var t,n;return(t=(n=e.each)==null?void 0:n.map((t,n)=>e.children(t,n)))==null?null:t}function $t(e){var t;if(e.attrName!==!1&&!(!sn(e.type)&&!e.deserialize))return cn((t=e.attrName)==null?ln(e.name):t)}function en(e){let t=new Set;for(let n of e){let e=$t(n);e&&t.add(e)}return Array.from(t)}function tn(e,t){if(typeof e.deserialize==`function`)return e.deserialize(t);if(e.deserialize===!0)return t;switch(e.type){case`boolean`:return t!==null;case`number`:return t===null?void 0:Number(t);case`string`:return t==null?void 0:t;case`object`:case`array`:return on(e,t);case`function`:return;default:return t}}function nn(e,t,n,r){let i=$t(t);if(!(!i||t.serialize===!0)){r==null||r.add(i);try{let r=an(t,n);r==null?e.removeAttribute(i):e.setAttribute(i,r)}finally{r==null||r.delete(i)}}}function rn(e){let t;return{connect(){return t!=null||(t=e()),t},disconnect(){let e=t;t=void 0,e==null||e.dispose()},current(){return t}}}function an(e,t){if(typeof e.serialize==`function`)return e.serialize(t);if(e.type===`boolean`)return t?``:null;if(t==null)return null;if(e.type===`object`||e.type===`array`)return JSON.stringify(t);if(e.type!==`function`)return String(t)}function on(e,t){if(t!==null)try{return JSON.parse(t)}catch(t){return e.type===`array`?[]:{}}}function sn(e){return e===`string`||e===`number`||e===`boolean`}function cn(e){return e.toLowerCase()}function ln(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function un(e,t){let n=Ct();if(!n||n.mode===`shadow`)return mn(e,t);if(n.projection)return n.projection.createSlot(e,t);let r=hn(n.lightChildren,e);return r.length>0?Array.from(r):t?t():null}function dn(e,t){let n=[],r,i,a=()=>{r==null||r.observe(e,{attributes:!0,attributeFilter:[`slot`],childList:!0,subtree:!0});for(let n of t)n.nodeType!==Node.ELEMENT_NODE||e.contains(n)||r==null||r.observe(n,{attributes:!0,attributeFilter:[`slot`]})},o=()=>{r==null||r.disconnect();let i=new Set;for(let e of n){let n=t.filter(t=>i.has(t)||!gn(t,e.name)?!1:(i.add(t),!0));fn(e,n.length>0?n:e.fallbackNodes)}for(let n of t)if(!i.has(n)&&e.contains(n)){var o;(o=n.parentNode)==null||o.removeChild(n)}r==null||r.takeRecords(),a()},s=n=>{let r=new Set,i=new Set,a=!1;for(let o of n){if(o.type===`attributes`){t.includes(o.target)&&(a=!0);continue}for(let e of o.removedNodes)t.includes(e)&&i.add(e);if(o.target!==e)continue;let n=Array.from(o.addedNodes).filter(e=>!bt(e));if(n.length!==0){for(let e of n)r.add(e);pn(t,n,o),a=!0}}for(let n of i){if(r.has(n)||e.contains(n))continue;let i=t.indexOf(n);i>=0&&(t.splice(i,1),a=!0)}a&&o()};return{createSlot(e,t){let r=document.createDocumentFragment(),i=document.createComment(e?`zeus-slot:${e}`:`zeus-slot`),a=document.createComment(`/zeus-slot`);r.append(i,a);let s={name:e,start:i,end:a,fallbackNodes:t?St(r,t(),a):[]};return n.push(s),o(),r},connect(){var n;if(r)return;let o=(n=e.ownerDocument.defaultView)==null?void 0:n.MutationObserver;o&&(i=vt(e,t),r=new o(s),a())},disconnect(){r==null||r.disconnect(),r=void 0,i==null||i(),i=void 0}}}function fn(e,t){let n=e.end.parentNode;if(!n||n!==e.start.parentNode)return;let r=[],i=e.start.nextSibling;for(;i&&i!==e.end;)r.push(i),i=i.nextSibling;if(!(r.length===t.length&&r.every((e,n)=>e===t[n]))){for(i=e.start.nextSibling;i&&i!==e.end;){let e=i.nextSibling;n.removeChild(i),i=e}for(let r of t)n.insertBefore(r,e.end)}}function pn(e,t,n){for(let n of t){let t=e.indexOf(n);t>=0&&e.splice(t,1)}let r=e.length,i=n.previousSibling?e.indexOf(n.previousSibling):-1,a=n.nextSibling?e.indexOf(n.nextSibling):-1;i>=0?r=i+1:a>=0?r=a:n.previousSibling===null&&(r=0),e.splice(r,0,...t)}function mn(e,t){let n=document.createElement(`slot`);e&&n.setAttribute(`name`,e);let r=t==null?void 0:t();return r!=null&&J(n,r),n}function hn(e,t){return e.filter(e=>gn(e,t))}function gn(e,t){return t?e.nodeType===Node.ELEMENT_NODE?e.getAttribute(`slot`)===t:!1:e.nodeType===Node.ELEMENT_NODE?!e.hasAttribute(`slot`):_n(e)}function _n(e){var t;return e.nodeType===Node.TEXT_NODE?!!((t=e.textContent)!=null&&t.trim()):!1}const vn=Symbol.for(`zeus.element.definition`);function yn(e,t={}){var n,r;if(Array.isArray(e))return{type:String,values:e,attr:t.attr,reflect:t.reflect,reactivity:t.reactivity,default:t.default,serialize:t.serialize,deserialize:t.deserialize};let i=e;return{type:i,attr:t.attr,reflect:i===Boolean?(n=t.reflect)==null?!0:n:t.reflect,reactivity:t.reactivity,default:i===Boolean?(r=t.default)==null?!1:r:t.default,serialize:t.serialize,deserialize:t.deserialize}}function bn(e){return typeof e==`string`?{__zeusEvent:!0,name:e}:{__zeusEvent:!0,name:e==null?void 0:e.name,bubbles:e==null?void 0:e.bubbles,composed:e==null?void 0:e.composed,cancelable:e==null?void 0:e.cancelable}}function xn(e){let t=new Map,n={};for(let r of e){let e=r.reactivity===`shallow`?ft():dt();t.set(r.name,e),Object.defineProperty(n,r.name,{configurable:!1,enumerable:!0,get(){return e.value},set(t){e.value=t}})}return{props:n,get(e){var n;return(n=t.get(e))==null?void 0:n.value},set(e,n){let r=t.get(e);r&&(r.value=n)},has(e){return t.has(e)}}}function Sn(e,t,n){var r;let i=Cn((r=t.props)==null?{}:r),a={tagName:e,options:t,setup:n,propDefs:i},o=en(i);class s extends HTMLElement{static get observedAttributes(){return o}constructor(){super(),this.lightChildren=[],this.capturedLightChildren=!1,this.attributeProps=new Set,this.reflectingAttrs=new Set,this.propStore=xn(i),this.props=this.propStore.props,wn(this.propStore,i),Tn(this,this.propStore,i),t.formAssociated&&(this.internals=On(this)),this.setupContext={host:this,internals:this.internals,emit:kn(this,t.emits),expose:An(this)},this.mountLifecycle=rn(()=>this.mountElement())}connectedCallback(){this.mountLifecycle.connect()}disconnectedCallback(){gt(this)||this.mountLifecycle.disconnect()}mountElement(){var e,r;let i=(e=t.shadow)==null?!1:e,a=i?`shadow`:`light`;a===`light`&&!this.capturedLightChildren&&(this.lightChildren=Array.from(this.childNodes),this.capturedLightChildren=!0);let o=a===`light`?dn(this,this.lightChildren):void 0,s=X();for(let e of(r=t.consumes)==null?[]:r){let t=Mt(this,e);t.found?s.provides.set(e.id,t.value):e.hasDefaultValue&&s.provides.set(e.id,e.defaultValue)}let c=this.resolveRenderTarget(i),l={host:this,mode:a,lightChildren:this.lightChildren,projection:o},u=Ft(()=>Z(s,()=>wt(l,()=>(En(this.props,this.setupContext,t.form),n(this.props,this.setupContext)))),c,{owner:s});return Nn(c,t.styles),o==null||o.connect(),{dispose(){o==null||o.disconnect(),u()}}}formAssociatedCallback(e){var n,r;(n=t.form)==null||(r=n.associated)==null||r.call(n,e,this.props,this.setupContext)}formDisabledCallback(e){var n,r;(n=t.form)==null||(r=n.disabled)==null||r.call(n,e,this.props,this.setupContext)}formResetCallback(){var e,n;(e=t.form)==null||(n=e.reset)==null||n.call(e,this.props,this.setupContext)}formStateRestoreCallback(e,n){var r,i;(r=t.form)==null||(i=r.stateRestore)==null||i.call(r,e,n,this.props,this.setupContext)}attributeChangedCallback(e,t,n){if(t===n||this.reflectingAttrs.has(e))return;let r=i.find(t=>t.attrName===e);r&&(this.attributeProps.add(r.name),this.propStore.set(r.name,tn(r,n)))}resolveRenderTarget(e){return this.target?this.target:e?(this.target=this.attachShadow(typeof e==`object`?e:{mode:`open`}),this.target):(this.target=this,this.target)}_writePropFromProperty(e,t){let n=i.find(t=>t.name===e);this.attributeProps.delete(e),this.propStore.set(e,t),n!=null&&n.reflect&&nn(this,n,t,this.reflectingAttrs)}}return s.formAssociated=!!t.formAssociated,customElements.get(e)||customElements.define(e,s),Object.defineProperty(s,vn,{value:a,configurable:!1}),s}function Cn(e){return Object.keys(e).map(t=>{let n=String(t),r=e[t];if(typeof r==`function`){let e=r;return{name:n,attrName:jn(e)?Pn(n):!1,type:Mn(e),reflect:!1,reactivity:`deep`}}let i=r==null?void 0:r.type,a=jn(i)?Pn(n):!1;return{name:n,attrName:(r==null?void 0:r.attr)===void 0?a:r.attr,type:Mn(i),reflect:!!(r!=null&&r.reflect),reactivity:(r==null?void 0:r.reactivity)===`shallow`?`shallow`:`deep`,default:r==null?void 0:r.default,serialize:r==null?void 0:r.serialize,deserialize:r==null?void 0:r.deserialize}})}function wn(e,t){for(let n of t){if(!(`default`in n))continue;let t=typeof n.default==`function`?n.default():n.default;e.set(n.name,t)}}function Tn(e,t,n){for(let r of n){let n=r.name,i=Object.prototype.hasOwnProperty.call(e,n),a=i?e[n]:void 0;i&&delete e[n];let o=Object.getOwnPropertyDescriptor(e,n);o&&o.configurable===!1||(Object.defineProperty(e,n,{configurable:!0,enumerable:!0,get(){return t.get(n)},set(t){e._writePropFromProperty(n,t)}}),i&&e._writePropFromProperty(n,a))}}function En(e,t,n){let r=n==null?void 0:n.value,i=n==null?void 0:n.state;!t.internals||r===void 0||fe(()=>{let n=Dn(e,r),a=i===void 0?void 0:Dn(e,i);t.internals.setFormValue(n,a)})}function Dn(e,t){if(typeof t==`function`){var n;return(n=t(e))==null?null:n}let r=e[t];return r==null?null:r}function On(e){let t=e.attachInternals;if(typeof t==`function`)try{return t.call(e)}catch(e){return}}function kn(e,t){let n={},r=(n,r,i)=>{var a,o,s,c,l,u,d;let f=t==null?void 0:t[n];return e.dispatchEvent(new CustomEvent((a=f==null?void 0:f.name)==null?Pn(n):a,{bubbles:(o=(s=i==null?void 0:i.bubbles)==null?f==null?void 0:f.bubbles:s)==null?!0:o,composed:(c=(l=i==null?void 0:i.composed)==null?f==null?void 0:f.composed:l)==null?!0:c,cancelable:(u=(d=i==null?void 0:i.cancelable)==null?f==null?void 0:f.cancelable:d)==null?!1:u,detail:r}))};if(t)for(let e of Object.keys(t))Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value(t,n){return r(e,t,n)}});return n}function An(e){return t=>{for(let n of Object.keys(t))Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value:t[n]})}}function jn(e){return e===String||e===Number||e===Boolean}function Mn(e){return e===String?`string`:e===Number?`number`:e===Boolean?`boolean`:e===Object?`object`:e===Array?`array`:e===Function?`function`:`unknown`}function Nn(e,t){if(!t)return;let n=Array.isArray(t)?t:[t];for(let t of n){let n=document.createElement(`style`);n.textContent=t,e.appendChild(n)}}function Pn(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function Fn(e,t){if(e!=null){if(typeof e==`function`){e(t);return}if(`value`in e){e.value=t;return}if(`current`in e){e.current=t;return}}}function In(e,t){Fn(t,e),re()&&h(()=>{Fn(t,null)},!0)}const Ln=new Set([`children`,`ref`,`class`,`className`,`style`,`_elements`]);function Rn(e){let t=Ct();return t&&Bn(t.host,e),Kn(e.children)}function zn(e){return un(e.name,()=>Kn(e.children))}function Bn(e,t){Vn(e,t),Hn(e,t),Un(e,t),Wn(e,t),`_elements`in t&&Gn(e,t)}function Vn(e,t){`ref`in t&&In(e,t.ref)}function Hn(e,t){if(!(`class`in t)&&!(`className`in t))return;let n=t.className===void 0?t.class:t.className;Ut(e,()=>$(n))}function Un(e,t){`style`in t&&Gt(e,()=>$(t.style))}function Wn(e,t){for(let n of Object.keys(t)){if(Ln.has(n)||qn(n))continue;let r=t[n];Vt(e,Jn(n),()=>$(r))}}function Gn(e,t){let n=t._elements;for(let e of Object.keys(n)){let r=n[e],i=r();if(i)for(let e of Object.keys(t)){if(Ln.has(e)||qn(e))continue;let n=t[e];Vt(i,Jn(e),()=>$(n))}}}function $(e){return typeof e==`function`?e():e}function Kn(e){return typeof e==`function`?e():e}function qn(e){return/^on[A-Z]/.test(e)||e.startsWith(`on:`)}function Jn(e){switch(e){case`className`:return`class`;case`htmlFor`:return`for`;case`tabIndex`:return`tabindex`;case`readOnly`:return`readonly`;default:return e}}const Yn=Symbol.for(`zeus.fragment`);function Xn(e,t){if(e===Yn)return t==null?void 0:t.children;if(typeof e==`function`)return Yt(e,t==null?{}:t);if(typeof e!=`string`)return null;let n=document.createElement(e);if(t){let e=t.children;for(let e of Object.keys(t)){if(e===`children`)continue;let r=t[e];if(e.startsWith(`on`)&&typeof r==`function`)n.addEventListener(e.slice(2).toLowerCase(),r);else if(e===`ref`)Zn(r,n);else if(e.startsWith(`prop:`)){let t=e.slice(5);typeof r==`function`?Ht(n,t,r):n[t]=r}else typeof r==`function`?Vt(n,e,r):r!=null&&r!==!1&&n.setAttribute(e===`className`?`class`:e,String(r))}e!==void 0&&J(n,e)}return n}function Zn(e,t){e!=null&&(typeof e==`function`?e(t):typeof e==`object`&&(`value`in e?e.value=t:`current`in e&&(e.current=t)))}export{Qt as For,Yn as Fragment,Rn as Host,Xt as Show,zn as Slot,ve as batch,Tt as createContext,lt as createEffect,ct as createMemo,ut as createRoot,st as createSignal,Sn as defineElement,bn as event,Dt as inject,Xn as jsx,Xn as jsxDEV,Xn as jsxs,De as onCleanup,yn as prop,Et as provide,Ft as render,Ot as useContext};
|
|
1
|
+
function e(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}const t=Object.assign,n=Object.prototype.hasOwnProperty,r=(e,t)=>n.call(e,t),i=Array.isArray,a=e=>d(e)===`[object Map]`,o=e=>typeof e==`function`,s=e=>typeof e==`string`,c=e=>typeof e==`symbol`,l=e=>typeof e==`object`&&!!e,u=Object.prototype.toString,d=e=>u.call(e),f=e=>d(e).slice(8,-1),ee=e=>s(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,p=(e,t)=>!Object.is(e,t);let m;var te=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&m&&(m.active?(this.parent=m,this.index=(m.scopes||(m.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].pause();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].resume();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].resume()}}run(e){if(this._active){let t=m;try{return m=this,e()}finally{m=t}}}on(){++this._on===1&&(this.prevScope=m,m=this)}off(){if(this._on>0&&--this._on===0){if(m===this)m=this.prevScope;else{let e=m;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(this.effects.length=0,t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}};function ne(e){return new te(e)}function re(){return m}function h(e,t=!1){m&&m.cleanups.push(e)}let g;const _=new WeakSet;var v=class{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanups=void 0,this.scheduler=void 0,this.scope=m,m&&(m.active?m.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,_.has(this)&&(_.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||ae(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,_e(this),oe(this);let e=g,t=C;g=this,C=!0;try{return this.fn()}finally{se(this),g=e,C=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)ue(e);this.deps=this.depsTail=void 0,_e(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?_.add(this):this.scheduler?this.scheduler():this.flags&128?this.runIfDirty():this.run()}runIfDirty(){ce(this)&&this.run()}get dirty(){return ce(this)}};let ie=0,y,b;function ae(e,t=!1){if(e.flags|=8,t){e.next=b,b=e;return}e.next=y,y=e}function x(){ie++}function S(){if(--ie>0)return;if(b){let e=b;for(b=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;y;){let t=y;for(y=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(t){e||(e=t)}t=n}}if(e)throw e}function oe(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function se(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),ue(r),de(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function ce(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(le(t.dep.computed)||t.dep.version!==t.version))return!0;return!1}function le(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===w)||(e.globalVersion=w,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!ce(e))))return;e.flags|=2;let t=e.dep,n=g,r=C;g=e,C=!0;try{oe(e);let n=e.fn(e._value);(t.version===0||p(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{g=n,C=r,se(e),e.flags&=-3}}function ue(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)ue(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function de(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}function fe(e,n){e.effect instanceof v&&(e=e.effect.fn);let r=new v(e);n&&t(r,n);try{r.run()}catch(e){throw r.stop(),e}let i=r.run.bind(r);return i.effect=r,i}let C=!0;const pe=[];function me(){pe.push(C),C=!1}function he(){let e=pe.pop();C=e===void 0?!0:e}function ge(e,t=!1){if(g instanceof v){var n,r;((r=(n=g).cleanups)==null?n.cleanups=[]:r).push(e)}}function _e(e){let t=e.cleanups;if(e.cleanups=void 0,t){let e=g;g=void 0;try{let e;for(let n of t)try{n()}catch(t){e!=null||(e=t)}if(e)throw e}finally{g=e}}}function ve(e){x();try{return e()}finally{S()}}function ye(e){me();try{return e()}finally{he()}}function be(){return g instanceof v?g:void 0}let w=0;var xe=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},Se=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!g||!C||g===this.computed)return;this.computed&&(g.flags|=128);let t=this.activeLink;if(t===void 0||t.sub!==g)t=this.activeLink=new xe(g,this),g.deps?(t.prevDep=g.depsTail,g.depsTail.nextDep=t,g.depsTail=t):g.deps=g.depsTail=t,Ce(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=g.depsTail,t.nextDep=void 0,g.depsTail.nextDep=t,g.depsTail=t,g.deps===t&&(g.deps=e)}return t}trigger(e){this.version++,w++,this.notify(e)}notify(e){x();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{S()}}};function Ce(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)Ce(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const we=new WeakMap,T=Symbol(``),E=Symbol(``),D=Symbol(``);function O(e,t,n){if(C&&g){let t=we.get(e);t||we.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new Se),r.map=t,r.key=n),r.track()}}function k(e,t,n,r,o,s){let l=we.get(e);if(!l){w++;return}let u=e=>{e&&e.trigger()};if(x(),t===`clear`)l.forEach(u);else{let o=i(e),s=o&&ee(n);if(o&&n===`length`){let e=Number(r);l.forEach((t,n)=>{(n===`length`||n===D||!c(n)&&n>=e)&&u(t)})}else switch((n!==void 0||l.has(void 0))&&u(l.get(n)),s&&u(l.get(D)),t){case`add`:o?s&&u(l.get(`length`)):(u(l.get(T)),a(e)&&u(l.get(E)));break;case`delete`:o||(u(l.get(T)),a(e)&&u(l.get(E)));break;case`set`:a(e)&&u(l.get(T));break}}S()}var Te=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new Se(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=w-1,this.next=void 0,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&g!==this)return ae(this,!0),!0}get value(){let e=this.dep.track();return le(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function Ee(e,t,n=!1){let r,i;return o(e)?r=e:(r=e.get,i=e.set),new Te(r,i,n)}function De(e){let t=be(),n=re();if(n&&(t==null?void 0:t.scope)!==n){h(e,!0);return}if(t){ge(e,!0);return}if(n){h(e,!0);return}}function A(e){let t=B(e);return t===e?t:(O(t,`iterate`,D),z(e)?t:t.map(V))}function Oe(e){return O(e=B(e),`iterate`,D),e}function j(e,t){return R(e)?H(tt(e)?V(t):t):V(t)}const ke={__proto__:null,[Symbol.iterator](){return Ae(this,Symbol.iterator,e=>j(this,e))},concat(...e){return A(this).concat(...e.map(e=>i(e)?A(e):e))},entries(){return Ae(this,`entries`,e=>(e[1]=j(this,e[1]),e))},every(e,t){return M(this,`every`,e,t,void 0,arguments)},filter(e,t){return M(this,`filter`,e,t,e=>e.map(e=>j(this,e)),arguments)},find(e,t){return M(this,`find`,e,t,e=>j(this,e),arguments)},findIndex(e,t){return M(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return M(this,`findLast`,e,t,e=>j(this,e),arguments)},findLastIndex(e,t){return M(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return M(this,`forEach`,e,t,void 0,arguments)},includes(...e){return N(this,`includes`,e)},indexOf(...e){return N(this,`indexOf`,e)},join(e){return A(this).join(e)},lastIndexOf(...e){return N(this,`lastIndexOf`,e)},map(e,t){return M(this,`map`,e,t,void 0,arguments)},pop(){return P(this,`pop`)},push(...e){return P(this,`push`,e)},reduce(e,...t){return Me(this,`reduce`,e,t)},reduceRight(e,...t){return Me(this,`reduceRight`,e,t)},shift(){return P(this,`shift`)},some(e,t){return M(this,`some`,e,t,void 0,arguments)},splice(...e){return P(this,`splice`,e)},toReversed(){return A(this).toReversed()},toSorted(e){return A(this).toSorted(e)},toSpliced(...e){return A(this).toSpliced(...e)},unshift(...e){return P(this,`unshift`,e)},values(){return Ae(this,`values`,e=>j(this,e))}};function Ae(e,t,n){let r=Oe(e),i=r[t]();return r!==e&&!z(e)&&(i._next=i.next,i.next=()=>{let e=i._next();return e.done||(e.value=n(e.value)),e}),i}const je=Array.prototype;function M(e,t,n,r,i,a){let o=Oe(e),s=o!==e&&!z(e),c=o[t];if(c!==je[t]){let t=c.apply(e,a);return s?V(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,j(e,t),r,e)}:n.length>2&&(l=function(t,r){return n.call(this,t,r,e)}));let u=c.call(o,l,r);return s&&i?i(u):u}function Me(e,t,n,r){let i=Oe(e),a=i!==e&&!z(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=j(e,t)),n.call(this,t,j(e,r),i,e)}):n.length>3&&(o=function(t,r,i){return n.call(this,t,r,i,e)}));let c=i[t](o,...r);return s?j(e,c):c}function N(e,t,n){let r=B(e);O(r,`iterate`,D);let i=r[t](...n);return(i===-1||i===!1)&&nt(n[0])?(n[0]=B(n[0]),r[t](...n)):i}function P(e,t,n=[]){me(),x();let r=B(e)[t].apply(e,n);return S(),he(),r}const Ne=e(`__proto__,__v_isRef,__isVue`),Pe=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(c));function Fe(e){c(e)||(e=String(e));let t=B(this);return O(t,`has`,e),t.hasOwnProperty(e)}var Ie=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t===`__v_skip`)return e.__v_skip;let r=this._isReadonly,a=this._isShallow;if(t===`__v_isReactive`)return!r;if(t===`__v_isReadonly`)return r;if(t===`__v_isShallow`)return a;if(t===`__v_raw`)return n===(r?a?Ye:Je:a?qe:Ke).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let o=i(e);if(!r){let e;if(o&&(e=ke[t]))return e;if(t===`hasOwnProperty`)return Fe}let s=Reflect.get(e,t,U(e)?e:n);if((c(t)?Pe.has(t):Ne(t))||(r||O(e,`get`,t),a))return s;if(U(s)){let e=o&&ee(t)?s:s.value;return r&&l(e)?$e(e):e}return l(s)?r?$e(s):Qe(s):s}},Le=class extends Ie{constructor(e=!1){super(!1,e)}set(e,t,n,a){let o=e[t],s=i(e)&&ee(t);if(!this._isShallow){let e=R(o);if(!z(n)&&!R(n)&&(o=B(o),n=B(n)),!s&&U(o)&&!U(n))return e||(o.value=n),!0}let c=s?Number(t)<e.length:r(e,t),l=Reflect.set(e,t,n,U(e)?e:a);return e===B(a)&&(c?p(n,o)&&k(e,`set`,t,n,o):k(e,`add`,t,n)),l}deleteProperty(e,t){let n=r(e,t),i=e[t],a=Reflect.deleteProperty(e,t);return a&&n&&k(e,`delete`,t,void 0,i),a}has(e,t){let n=Reflect.has(e,t);return(!c(t)||!Pe.has(t))&&O(e,`has`,t),n}ownKeys(e){return O(e,`iterate`,i(e)?`length`:T),Reflect.ownKeys(e)}},Re=class extends Ie{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}};const ze=new Le,Be=new Re,F=e=>e,I=e=>Reflect.getPrototypeOf(e);function Ve(e,n,r){return function(...i){let o=this.__v_raw,s=B(o),c=a(s),l=e===`entries`||e===Symbol.iterator&&c,u=e===`keys`&&c,d=o[e](...i),f=r?F:n?H:V;return!n&&O(s,`iterate`,u?E:T),t(Object.create(d),{next(){let{value:e,done:t}=d.next();return t?{value:e,done:t}:{value:l?[f(e[0]),f(e[1])]:f(e),done:t}}})}}function L(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function He(e,n){let r={get(t){let r=this.__v_raw,i=B(r),a=B(t);e||(p(t,a)&&O(i,`get`,t),O(i,`get`,a));let{has:o}=I(i),s=n?F:e?H:V;if(o.call(i,t))return s(r.get(t));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(t)},get size(){let t=this.__v_raw;return!e&&O(B(t),`iterate`,T),t.size},has(t){let n=this.__v_raw,r=B(n),i=B(t);return e||(p(t,i)&&O(r,`has`,t),O(r,`has`,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(t,r){let i=this,a=i.__v_raw,o=B(a),s=n?F:e?H:V;return!e&&O(o,`iterate`,T),a.forEach((e,n)=>t.call(r,s(e),s(n),i))}};return t(r,e?{add:L(`add`),set:L(`set`),delete:L(`delete`),clear:L(`clear`)}:{add(e){let t=B(this),r=I(t),i=B(e),a=!n&&!z(e)&&!R(e)?i:e;return r.has.call(t,a)||p(e,a)&&r.has.call(t,e)||p(i,a)&&r.has.call(t,i)||(t.add(a),k(t,`add`,a,a)),this},set(e,t){!n&&!z(t)&&!R(t)&&(t=B(t));let r=B(this),{has:i,get:a}=I(r),o=i.call(r,e);o||(e=B(e),o=i.call(r,e));let s=a.call(r,e);return r.set(e,t),o?p(t,s)&&k(r,`set`,e,t,s):k(r,`add`,e,t),this},delete(e){let t=B(this),{has:n,get:r}=I(t),i=n.call(t,e);i||(e=B(e),i=n.call(t,e));let a=r?r.call(t,e):void 0,o=t.delete(e);return i&&k(t,`delete`,e,void 0,a),o},clear(){let e=B(this),t=e.size!==0,n=e.clear();return t&&k(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(t=>{r[t]=Ve(t,e,n)}),r}function Ue(e,t){let n=He(e,t);return(t,i,a)=>i===`__v_isReactive`?!e:i===`__v_isReadonly`?e:i===`__v_raw`?t:Reflect.get(r(n,i)&&i in t?n:t,i,a)}const We={get:Ue(!1,!1)},Ge={get:Ue(!0,!1)},Ke=new WeakMap,qe=new WeakMap,Je=new WeakMap,Ye=new WeakMap;function Xe(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function Ze(e){return e.__v_skip||!Object.isExtensible(e)?0:Xe(f(e))}function Qe(e){return R(e)?e:et(e,!1,ze,We,Ke)}function $e(e){return et(e,!0,Be,Ge,Je)}function et(e,t,n,r,i){if(!l(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;let a=Ze(e);if(a===0)return e;let o=i.get(e);if(o)return o;let s=new Proxy(e,a===2?r:n);return i.set(e,s),s}function tt(e){return R(e)?tt(e.__v_raw):!!(e&&e.__v_isReactive)}function R(e){return!!(e&&e.__v_isReadonly)}function z(e){return!!(e&&e.__v_isShallow)}function nt(e){return e?!!e.__v_raw:!1}function B(e){let t=e&&e.__v_raw;return t?B(t):e}const V=e=>l(e)?Qe(e):e,H=e=>l(e)?$e(e):e;let rt,it;function U(e){return e?e.__v_isRef===!0:!1}function at(e){return ot(e,!1)}function W(e){return ot(e,!0)}function ot(e,t){return U(e)?e:new st(e,t)}rt=`__v_isRef`,it=`__v_isShallow`;var st=class{constructor(e,t){this.dep=new Se,this[rt]=!0,this[it]=!1,this._rawValue=t?e:B(e),this._value=t?e:V(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||z(e)||R(e);e=n?e:B(e),p(e,t)&&(this._rawValue=e,this._value=n?e:V(e),this.dep.trigger())}};function ct(e){let t=W(e);return[()=>t.value,e=>{let n=typeof e==`function`?e(t.value):e;return t.value=n,n}]}function lt(e){let t=Ee(e);return()=>t.value}function ut(e){fe(e)}function dt(e){let t=ne(!0),n=!1,r=()=>{n||(n=!0,t.stop())};try{return t.run(()=>e(r))}catch(e){throw r(),e}}function ft(e){return arguments.length===0?at():mt(e)?Qe(e):at(e)}function pt(e){return arguments.length===0?W():W(e)}function mt(e){return typeof e!=`object`||!e?!1:Array.isArray(e)||e instanceof Map||e instanceof Set||e instanceof WeakMap||e instanceof WeakSet?!0:ht(e)}function ht(e){let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}const gt=new Set;function _t(e){let t=e;for(;t;){if(gt.has(t))return!0;if(t.parentNode){t=t.parentNode;continue}let e=t.getRootNode();t=`host`in e?e.host:null}return!1}const G=new WeakMap,vt=new WeakSet;function yt(e,t){let n={lightChildren:t};return G.set(e,n),()=>{G.get(e)===n&&G.delete(e)}}function bt(e,t){let n=G.get(e);if(n){if(t.nodeType===11){for(let e of t.childNodes)St(n,e);return}St(n,t)}}function xt(e){return vt.has(e)}function St(e,t){e.lightChildren.includes(t)||vt.add(t)}function Ct(e,t,n=null){if(t===void 0||t==null||t===!1||t===!0)return[];if(Array.isArray(t)){let r=[];for(let i of t)r.push(...Ct(e,i,n));return r}if(t instanceof Node&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let r=Array.from(t.childNodes);for(let t of r)bt(e,t),e.insertBefore(t,n);return r}let r=t instanceof Node?t:document.createTextNode(String(t));return bt(e,r),e.insertBefore(r,n),[r]}let K;function wt(){return K}function Tt(e,t){let n=K;K=e;try{return t()}finally{K=n}}function q(e,t,n=null){t!==void 0&&Ct(e,t,n)}let J;function Y(e=J){return{parent:e,provides:new Map}}function X(e,t){let n=J;J=e;try{return t()}finally{J=n}}function Et(e){let t=arguments.length>0,n={id:Symbol(``),defaultValue:e,hasDefaultValue:t,Provider(e){let t=Y(J);return t.provides.set(n.id,e.value),X(t,()=>{let t=Pt(e.children);return e.bridge?jt(n,e.value,t):t})},Bridge(e){return jt(n,e.value,Pt(e.children))}};return n}function Dt(e,t){let n=J;n&&n.provides.set(e.id,t)}function Ot(e,t){let n=J;for(;n;){if(n.provides.has(e.id))return n.provides.get(e.id);n=n.parent}if(arguments.length>=2)return t;if(e.hasDefaultValue)return e.defaultValue;throw Error(`Context value was not provided.`)}function kt(e,t){return arguments.length>=2?Ot(e,t):Ot(e)}const At=`zeus:context-request`;function jt(e,t,n){let r=document.createElement(`zeus-context`);return r.style.cssText=`display:contents;position:unset;width:0;height:0;overflow:hidden`,Mt(r,e,t),q(r,n),r}function Mt(e,t,n){let r=e=>{let r=e;r.type===`zeus:context-request`&&r.detail.id===t.id&&(r.stopPropagation(),r.detail.resolve(n))};e.addEventListener(At,r),h(()=>{e.removeEventListener(At,r)},!0)}function Nt(e,t){let n=!1,r,i=new CustomEvent(At,{bubbles:!0,composed:!0,cancelable:!0,detail:{id:t.id,resolved:!1,value:void 0,resolve(e){n=!0,r=e,this.resolved=!0,this.value=e}}});return e.dispatchEvent(i),{found:n,value:r}}function Pt(e){return typeof e==`function`?e():e==null?null:e}function Ft(e){var t;typeof window>`u`||(t=window.__ZEUS_DEVTOOLS_HOOK__)==null||t.emit(e)}function It(e,t,n={}){var r;let i=ne(),a=(r=n.owner)==null?Y():r;i.run(()=>{t.textContent=``,X(a,()=>{q(t,Lt(e))})}),Ft({type:`render`,target:t});let o=!1;return()=>{o||(o=!0,i.stop(),t.textContent=``)}}function Lt(e){return typeof e==`function`?e():e==null?null:e}function Z(e,t,n){if(t){ye(()=>n(e()));return}fe(()=>{n(e())})}function Rt(e,t,n){let r=Ht(t),i=Bt(t),a=Q(n);(a===null?!e.hasAttribute(r):e.getAttribute(r)===a)&&(!i||!(e instanceof HTMLElement)||!!n==!!e[i])||(i&&e instanceof HTMLElement&&(e[i]=!!n),a===null?e.removeAttribute(r):e.setAttribute(r,a))}function zt(e,t,n){let r=Ht(t),i=Bt(t),a=Q(n);i&&e instanceof HTMLElement&&(e[i]=!!n),a===null?e.removeAttribute(r):e.setAttribute(r,a)}function Q(e){return e==null||e===!1?null:e===!0?``:String(e)}function Bt(e){return Vt[e]}const Vt={hidden:`hidden`,disabled:`disabled`,readonly:`readOnly`,readOnly:`readOnly`,multiple:`multiple`,selected:`selected`,checked:`checked`,open:`open`,autofocus:`autofocus`,autoFocus:`autofocus`,indeterminate:`indeterminate`,noValidate:`noValidate`,novalidate:`noValidate`};function Ht(e){return e===`className`?`class`:e}function Ut(e,t,n,r=!1){let i,a=!1;Z(n,r,n=>{let r=Q(n);a&&r===i?Rt(e,t,n):zt(e,t,n),i=r,a=!0})}function Wt(e,t,n,r=!1){Z(n,r,n=>{e[t]=n})}function Gt(e,t,n=!1){Z(t,n,t=>{let n=Kt(t);n?e.setAttribute(`class`,n):e.removeAttribute(`class`)})}function Kt(e){return e?typeof e==`string`?e:Array.isArray(e)?e.map(Kt).filter(Boolean).join(` `):typeof e==`object`?Object.keys(e).filter(t=>e[t]).join(` `):``:``}function qt(e,t,n=!1){let r;Z(t,n,t=>{if(t==null){e.removeAttribute(`style`),r=void 0;return}if(typeof t==`string`){e.setAttribute(`style`,t),r=void 0;return}r=Jt(e,r,t)})}function Jt(e,t,n){let r=e.style,i=t?t[0]:Object.create(null),a=Object.keys(n),o=r.cssText+a.join(`,`),s=t&&o!=t[1],c=!1;for(let e in i)e in n||(r.setProperty(e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),``),c=!0,delete i[e]);for(let e in n){let t=n[e],a=t==null?``:Yt(e,t);i[e]===a&&!s||(r.setProperty(e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),a),c=!0,i[e]=a)}return t&&!c?t:[i,r.cssText+a.join(`,`)]}function Yt(e,t){return typeof t==`number`&&t!==0&&Xt[e]!==!0?`${t}px`:String(t)}const Xt={opacity:!0,zIndex:!0,fontWeight:!0,lineHeight:!0,flex:!0,flexGrow:!0,flexShrink:!0,order:!0};function Zt(e,t){return X(Y(),()=>e(t))}function Qt(e){return $t(e.when?e.children:e.fallback)}function $t(e){return typeof e==`function`?e():e==null?null:e}function en(e){var t,n;return(t=(n=e.each)==null?void 0:n.map((t,n)=>e.children(t,n)))==null?null:t}function tn(e){var t;if(e.attrName!==!1&&!(!ln(e.type)&&!e.deserialize))return un((t=e.attrName)==null?dn(e.name):t)}function nn(e){let t=new Set;for(let n of e){let e=tn(n);e&&t.add(e)}return Array.from(t)}function rn(e,t){if(typeof e.deserialize==`function`)return e.deserialize(t);if(e.deserialize===!0)return t;switch(e.type){case`boolean`:return t!==null;case`number`:return t===null?void 0:Number(t);case`string`:return t==null?void 0:t;case`object`:case`array`:return cn(e,t);case`function`:return;default:return t}}function an(e,t,n,r){let i=tn(t);if(!(!i||t.serialize===!0)){r==null||r.add(i);try{let r=sn(t,n);r==null?e.removeAttribute(i):e.setAttribute(i,r)}finally{r==null||r.delete(i)}}}function on(e){let t;return{connect(){return t!=null||(t=e()),t},disconnect(){let e=t;t=void 0,e==null||e.dispose()},current(){return t}}}function sn(e,t){if(typeof e.serialize==`function`)return e.serialize(t);if(e.type===`boolean`)return t?``:null;if(t==null)return null;if(e.type===`object`||e.type===`array`)return JSON.stringify(t);if(e.type!==`function`)return String(t)}function cn(e,t){if(t!==null)try{return JSON.parse(t)}catch(t){return e.type===`array`?[]:{}}}function ln(e){return e===`string`||e===`number`||e===`boolean`}function un(e){return e.toLowerCase()}function dn(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function fn(e,t){let n=wt();if(!n||n.mode===`shadow`)return gn(e,t);if(n.projection)return n.projection.createSlot(e,t);let r=_n(n.lightChildren,e);return r.length>0?Array.from(r):t?t():null}function pn(e,t){let n=[],r,i,a=()=>{r==null||r.observe(e,{attributes:!0,attributeFilter:[`slot`],childList:!0,subtree:!0});for(let n of t)n.nodeType!==Node.ELEMENT_NODE||e.contains(n)||r==null||r.observe(n,{attributes:!0,attributeFilter:[`slot`]})},o=()=>{r==null||r.disconnect();let i=new Set;for(let e of n){let n=t.filter(t=>i.has(t)||!vn(t,e.name)?!1:(i.add(t),!0));mn(e,n.length>0?n:e.fallbackNodes)}for(let n of t)if(!i.has(n)&&e.contains(n)){var o;(o=n.parentNode)==null||o.removeChild(n)}r==null||r.takeRecords(),a()},s=n=>{let r=new Set,i=new Set,a=!1;for(let o of n){if(o.type===`attributes`){t.includes(o.target)&&(a=!0);continue}for(let e of o.removedNodes)t.includes(e)&&i.add(e);if(o.target!==e)continue;let n=Array.from(o.addedNodes).filter(e=>!xt(e));if(n.length!==0){for(let e of n)r.add(e);hn(t,n,o),a=!0}}for(let n of i){if(r.has(n)||e.contains(n))continue;let i=t.indexOf(n);i>=0&&(t.splice(i,1),a=!0)}a&&o()};return{createSlot(e,t){let r=document.createDocumentFragment(),i=document.createComment(e?`zeus-slot:${e}`:`zeus-slot`),a=document.createComment(`/zeus-slot`);r.append(i,a);let s={name:e,start:i,end:a,fallbackNodes:t?Ct(r,t(),a):[]};return n.push(s),o(),r},connect(){var n;if(r)return;let o=(n=e.ownerDocument.defaultView)==null?void 0:n.MutationObserver;o&&(i=yt(e,t),r=new o(s),a())},disconnect(){r==null||r.disconnect(),r=void 0,i==null||i(),i=void 0}}}function mn(e,t){let n=e.end.parentNode;if(!n||n!==e.start.parentNode)return;let r=[],i=e.start.nextSibling;for(;i&&i!==e.end;)r.push(i),i=i.nextSibling;if(!(r.length===t.length&&r.every((e,n)=>e===t[n]))){for(i=e.start.nextSibling;i&&i!==e.end;){let e=i.nextSibling;n.removeChild(i),i=e}for(let r of t)n.insertBefore(r,e.end)}}function hn(e,t,n){for(let n of t){let t=e.indexOf(n);t>=0&&e.splice(t,1)}let r=e.length,i=n.previousSibling?e.indexOf(n.previousSibling):-1,a=n.nextSibling?e.indexOf(n.nextSibling):-1;i>=0?r=i+1:a>=0?r=a:n.previousSibling===null&&(r=0),e.splice(r,0,...t)}function gn(e,t){let n=document.createElement(`slot`);e&&n.setAttribute(`name`,e);let r=t==null?void 0:t();return r!=null&&q(n,r),n}function _n(e,t){return e.filter(e=>vn(e,t))}function vn(e,t){return t?e.nodeType===Node.ELEMENT_NODE?e.getAttribute(`slot`)===t:!1:e.nodeType===Node.ELEMENT_NODE?!e.hasAttribute(`slot`):yn(e)}function yn(e){var t;return e.nodeType===Node.TEXT_NODE?!!((t=e.textContent)!=null&&t.trim()):!1}const bn=Symbol.for(`zeus.element.definition`);function xn(e,t={}){var n,r;if(Array.isArray(e))return{type:String,values:e,attr:t.attr,reflect:t.reflect,reactivity:t.reactivity,default:t.default,serialize:t.serialize,deserialize:t.deserialize};let i=e;return{type:i,attr:t.attr,reflect:i===Boolean?(n=t.reflect)==null?!0:n:t.reflect,reactivity:t.reactivity,default:i===Boolean?(r=t.default)==null?!1:r:t.default,serialize:t.serialize,deserialize:t.deserialize}}function Sn(e){return typeof e==`string`?{__zeusEvent:!0,name:e}:{__zeusEvent:!0,name:e==null?void 0:e.name,bubbles:e==null?void 0:e.bubbles,composed:e==null?void 0:e.composed,cancelable:e==null?void 0:e.cancelable}}function Cn(e){let t=new Map,n={};for(let r of e){let e=r.reactivity===`shallow`?pt():ft();t.set(r.name,e),Object.defineProperty(n,r.name,{configurable:!1,enumerable:!0,get(){return e.value},set(t){e.value=t}})}return{props:n,get(e){var n;return(n=t.get(e))==null?void 0:n.value},set(e,n){let r=t.get(e);r&&(r.value=n)},has(e){return t.has(e)}}}function wn(e,t,n){var r;let i=Tn((r=t.props)==null?{}:r),a={tagName:e,options:t,setup:n,propDefs:i},o=nn(i);class s extends HTMLElement{static get observedAttributes(){return o}constructor(){super(),this.lightChildren=[],this.capturedLightChildren=!1,this.attributeProps=new Set,this.reflectingAttrs=new Set,this.propStore=Cn(i),this.props=this.propStore.props,En(this.propStore,i),Dn(this,this.propStore,i),t.formAssociated&&(this.internals=An(this)),this.setupContext={host:this,internals:this.internals,emit:jn(this,t.emits),expose:Mn(this)},this.mountLifecycle=on(()=>this.mountElement())}connectedCallback(){this.mountLifecycle.connect()}disconnectedCallback(){_t(this)||this.mountLifecycle.disconnect()}mountElement(){var e,r;let i=(e=t.shadow)==null?!1:e,a=i?`shadow`:`light`;a===`light`&&!this.capturedLightChildren&&(this.lightChildren=Array.from(this.childNodes),this.capturedLightChildren=!0);let o=a===`light`?pn(this,this.lightChildren):void 0,s=Y();for(let e of(r=t.consumes)==null?[]:r){let t=Nt(this,e);t.found?s.provides.set(e.id,t.value):e.hasDefaultValue&&s.provides.set(e.id,e.defaultValue)}let c=this.resolveRenderTarget(i),l={host:this,mode:a,lightChildren:this.lightChildren,projection:o},u=It(()=>X(s,()=>Tt(l,()=>(On(this.props,this.setupContext,t.form),n(this.props,this.setupContext)))),c,{owner:s});return Fn(c,t.styles),o==null||o.connect(),{dispose(){o==null||o.disconnect(),u()}}}formAssociatedCallback(e){var n,r;(n=t.form)==null||(r=n.associated)==null||r.call(n,e,this.props,this.setupContext)}formDisabledCallback(e){var n,r;(n=t.form)==null||(r=n.disabled)==null||r.call(n,e,this.props,this.setupContext)}formResetCallback(){var e,n;(e=t.form)==null||(n=e.reset)==null||n.call(e,this.props,this.setupContext)}formStateRestoreCallback(e,n){var r,i;(r=t.form)==null||(i=r.stateRestore)==null||i.call(r,e,n,this.props,this.setupContext)}attributeChangedCallback(e,t,n){if(t===n||this.reflectingAttrs.has(e))return;let r=i.find(t=>t.attrName===e);r&&(this.attributeProps.add(r.name),this.propStore.set(r.name,rn(r,n)))}resolveRenderTarget(e){return this.target?this.target:e?(this.target=this.attachShadow(typeof e==`object`?e:{mode:`open`}),this.target):(this.target=this,this.target)}_writePropFromProperty(e,t){let n=i.find(t=>t.name===e);this.attributeProps.delete(e),this.propStore.set(e,t),n!=null&&n.reflect&&an(this,n,t,this.reflectingAttrs)}}return s.formAssociated=!!t.formAssociated,customElements.get(e)||customElements.define(e,s),Object.defineProperty(s,bn,{value:a,configurable:!1}),s}function Tn(e){return Object.keys(e).map(t=>{let n=String(t),r=e[t];if(typeof r==`function`){let e=r;return{name:n,attrName:Nn(e)?In(n):!1,type:Pn(e),reflect:!1,reactivity:`deep`}}let i=r==null?void 0:r.type,a=Nn(i)?In(n):!1;return{name:n,attrName:(r==null?void 0:r.attr)===void 0?a:r.attr,type:Pn(i),reflect:!!(r!=null&&r.reflect),reactivity:(r==null?void 0:r.reactivity)===`shallow`?`shallow`:`deep`,default:r==null?void 0:r.default,serialize:r==null?void 0:r.serialize,deserialize:r==null?void 0:r.deserialize}})}function En(e,t){for(let n of t){if(!(`default`in n))continue;let t=typeof n.default==`function`?n.default():n.default;e.set(n.name,t)}}function Dn(e,t,n){for(let r of n){let n=r.name,i=Object.prototype.hasOwnProperty.call(e,n),a=i?e[n]:void 0;i&&delete e[n];let o=Object.getOwnPropertyDescriptor(e,n);o&&o.configurable===!1||(Object.defineProperty(e,n,{configurable:!0,enumerable:!0,get(){return t.get(n)},set(t){e._writePropFromProperty(n,t)}}),i&&e._writePropFromProperty(n,a))}}function On(e,t,n){let r=n==null?void 0:n.value,i=n==null?void 0:n.state;!t.internals||r===void 0||fe(()=>{let n=kn(e,r),a=i===void 0?void 0:kn(e,i);t.internals.setFormValue(n,a)})}function kn(e,t){if(typeof t==`function`){var n;return(n=t(e))==null?null:n}let r=e[t];return r==null?null:r}function An(e){let t=e.attachInternals;if(typeof t==`function`)try{return t.call(e)}catch(e){return}}function jn(e,t){let n={},r=(n,r,i)=>{var a,o,s,c,l,u,d;let f=t==null?void 0:t[n];return e.dispatchEvent(new CustomEvent((a=f==null?void 0:f.name)==null?In(n):a,{bubbles:(o=(s=i==null?void 0:i.bubbles)==null?f==null?void 0:f.bubbles:s)==null?!0:o,composed:(c=(l=i==null?void 0:i.composed)==null?f==null?void 0:f.composed:l)==null?!0:c,cancelable:(u=(d=i==null?void 0:i.cancelable)==null?f==null?void 0:f.cancelable:d)==null?!1:u,detail:r}))};if(t)for(let e of Object.keys(t))Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value(t,n){return r(e,t,n)}});return n}function Mn(e){return t=>{for(let n of Object.keys(t))Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value:t[n]})}}function Nn(e){return e===String||e===Number||e===Boolean}function Pn(e){return e===String?`string`:e===Number?`number`:e===Boolean?`boolean`:e===Object?`object`:e===Array?`array`:e===Function?`function`:`unknown`}function Fn(e,t){if(!t)return;let n=Array.isArray(t)?t:[t];for(let t of n){let n=document.createElement(`style`);n.textContent=t,e.appendChild(n)}}function In(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function Ln(e,t){if(e!=null){if(typeof e==`function`){e(t);return}if(`value`in e){e.value=t;return}if(`current`in e){e.current=t;return}}}function Rn(e,t){Ln(t,e),re()&&h(()=>{Ln(t,null)},!0)}const zn=new Set([`children`,`ref`,`class`,`className`,`style`,`_elements`]);function Bn(e){let t=wt();return t&&Hn(t.host,e),Jn(e.children)}function Vn(e){return fn(e.name,()=>Jn(e.children))}function Hn(e,t){Un(e,t),Wn(e,t),Gn(e,t),Kn(e,t),`_elements`in t&&qn(e,t)}function Un(e,t){`ref`in t&&Rn(e,t.ref)}function Wn(e,t){if(!(`class`in t)&&!(`className`in t))return;let n=t.className===void 0?t.class:t.className;Gt(e,()=>$(n))}function Gn(e,t){`style`in t&&qt(e,()=>$(t.style))}function Kn(e,t){for(let n of Object.keys(t)){if(zn.has(n)||Yn(n))continue;let r=t[n];Ut(e,Xn(n),()=>$(r))}}function qn(e,t){let n=t._elements;for(let e of Object.keys(n)){let r=n[e],i=r();if(i)for(let e of Object.keys(t)){if(zn.has(e)||Yn(e))continue;let n=t[e];Ut(i,Xn(e),()=>$(n))}}}function $(e){return typeof e==`function`?e():e}function Jn(e){return typeof e==`function`?e():e}function Yn(e){return/^on[A-Z]/.test(e)||e.startsWith(`on:`)}function Xn(e){switch(e){case`className`:return`class`;case`htmlFor`:return`for`;case`tabIndex`:return`tabindex`;case`readOnly`:return`readonly`;default:return e}}const Zn=Symbol.for(`zeus.fragment`);function Qn(e,t){if(e===Zn)return t==null?void 0:t.children;if(typeof e==`function`)return Zt(e,t==null?{}:t);if(typeof e!=`string`)return null;let n=document.createElement(e);if(t){let e=t.children;for(let e of Object.keys(t)){if(e===`children`)continue;let r=t[e];if(e.startsWith(`on`)&&typeof r==`function`)n.addEventListener(e.slice(2).toLowerCase(),r);else if(e===`ref`)$n(r,n);else if(e.startsWith(`prop:`)){let t=e.slice(5);typeof r==`function`?Wt(n,t,r):n[t]=r}else typeof r==`function`?Ut(n,e,r):r!=null&&r!==!1&&n.setAttribute(e===`className`?`class`:e,String(r))}e!==void 0&&q(n,e)}return n}function $n(e,t){e!=null&&(typeof e==`function`?e(t):typeof e==`object`&&(`value`in e?e.value=t:`current`in e&&(e.current=t)))}export{en as For,Zn as Fragment,Bn as Host,Qt as Show,Vn as Slot,ve as batch,Et as createContext,ut as createEffect,lt as createMemo,dt as createRoot,ct as createSignal,wn as defineElement,Sn as event,Ot as inject,Qn as jsx,Qn as jsxDEV,Qn as jsxs,De as onCleanup,xn as prop,Dt as provide,It as render,kt as useContext};
|
package/dist/zeus.esm-bundler.js
CHANGED
package/dist/zeus.global.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* zeus v0.1.1-beta.
|
|
2
|
+
* zeus v0.1.1-beta.12
|
|
3
3
|
* (c) 2026 baicie
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
**/
|
|
@@ -1792,22 +1792,25 @@ var Zeus = (function(exports) {
|
|
|
1792
1792
|
function setAttr(el, name, value) {
|
|
1793
1793
|
const attrName = normalizeAttrName(name);
|
|
1794
1794
|
const propName = getBooleanDomPropertyName(name);
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
if (
|
|
1798
|
-
|
|
1799
|
-
else el.setAttribute(attrName, String(value));
|
|
1800
|
-
return;
|
|
1801
|
-
}
|
|
1802
|
-
if (value == null || value === false) {
|
|
1803
|
-
el.removeAttribute(attrName);
|
|
1804
|
-
return;
|
|
1805
|
-
}
|
|
1806
|
-
if (value === true) {
|
|
1807
|
-
el.setAttribute(attrName, "");
|
|
1808
|
-
return;
|
|
1795
|
+
const serialized = serializeAttrValue(value);
|
|
1796
|
+
if (serialized === null ? !el.hasAttribute(attrName) : el.getAttribute(attrName) === serialized) {
|
|
1797
|
+
if (!propName || !(el instanceof HTMLElement)) return;
|
|
1798
|
+
if (Boolean(value) === Boolean(el[propName])) return;
|
|
1809
1799
|
}
|
|
1810
|
-
|
|
1800
|
+
if (propName && el instanceof HTMLElement) el[propName] = Boolean(value);
|
|
1801
|
+
if (serialized === null) el.removeAttribute(attrName);
|
|
1802
|
+
else el.setAttribute(attrName, serialized);
|
|
1803
|
+
}
|
|
1804
|
+
function writeAttr(el, name, value) {
|
|
1805
|
+
const attrName = normalizeAttrName(name);
|
|
1806
|
+
const propName = getBooleanDomPropertyName(name);
|
|
1807
|
+
const serialized = serializeAttrValue(value);
|
|
1808
|
+
if (propName && el instanceof HTMLElement) el[propName] = Boolean(value);
|
|
1809
|
+
if (serialized === null) el.removeAttribute(attrName);
|
|
1810
|
+
else el.setAttribute(attrName, serialized);
|
|
1811
|
+
}
|
|
1812
|
+
function serializeAttrValue(value) {
|
|
1813
|
+
return value == null || value === false ? null : value === true ? "" : String(value);
|
|
1811
1814
|
}
|
|
1812
1815
|
function getBooleanDomPropertyName(name) {
|
|
1813
1816
|
return BOOLEAN_DOM_PROPERTY_NAME[name];
|
|
@@ -1831,8 +1834,14 @@ var Zeus = (function(exports) {
|
|
|
1831
1834
|
return name === "className" ? "class" : name;
|
|
1832
1835
|
}
|
|
1833
1836
|
function bindAttr(el, name, value, once = false) {
|
|
1837
|
+
let previous;
|
|
1838
|
+
let hasPrevious = false;
|
|
1834
1839
|
applyBinding(value, once, (next) => {
|
|
1835
|
-
|
|
1840
|
+
const serialized = serializeAttrValue(next);
|
|
1841
|
+
if (hasPrevious && serialized === previous) setAttr(el, name, next);
|
|
1842
|
+
else writeAttr(el, name, next);
|
|
1843
|
+
previous = serialized;
|
|
1844
|
+
hasPrevious = true;
|
|
1836
1845
|
});
|
|
1837
1846
|
}
|
|
1838
1847
|
function bindProp(el, name, value, once = false) {
|
|
@@ -1873,10 +1882,13 @@ var Zeus = (function(exports) {
|
|
|
1873
1882
|
function patchStyle(el, prev, next) {
|
|
1874
1883
|
const style = el.style;
|
|
1875
1884
|
const values = prev ? prev[0] : Object.create(null);
|
|
1876
|
-
const
|
|
1885
|
+
const keys = Object.keys(next);
|
|
1886
|
+
const state = style.cssText + keys.join(",");
|
|
1877
1887
|
const styleChanged = prev && state != prev[1];
|
|
1888
|
+
let wrote = false;
|
|
1878
1889
|
for (const key in values) if (!(key in next)) {
|
|
1879
1890
|
style.setProperty(key.replace(/[A-Z]/g, (match) => `-${match.toLowerCase()}`), "");
|
|
1891
|
+
wrote = true;
|
|
1880
1892
|
delete values[key];
|
|
1881
1893
|
}
|
|
1882
1894
|
for (const key in next) {
|
|
@@ -1884,9 +1896,10 @@ var Zeus = (function(exports) {
|
|
|
1884
1896
|
const expected = value == null ? "" : normalizeStyleValue(key, value);
|
|
1885
1897
|
if (values[key] === expected && !styleChanged) continue;
|
|
1886
1898
|
style.setProperty(key.replace(/[A-Z]/g, (match) => `-${match.toLowerCase()}`), expected);
|
|
1899
|
+
wrote = true;
|
|
1887
1900
|
values[key] = expected;
|
|
1888
1901
|
}
|
|
1889
|
-
return [values, style.cssText +
|
|
1902
|
+
return prev && !wrote ? prev : [values, style.cssText + keys.join(",")];
|
|
1890
1903
|
}
|
|
1891
1904
|
function normalizeStyleValue(key, value) {
|
|
1892
1905
|
if (typeof value === "number" && value !== 0 && unitlessNumbers[key] !== true) return `${value}px`;
|
package/dist/zeus.global.prod.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var Zeus=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}let n=Object.assign,r=Object.prototype.hasOwnProperty,i=(e,t)=>r.call(e,t),a=Array.isArray,o=e=>f(e)===`[object Map]`,s=e=>typeof e==`function`,c=e=>typeof e==`string`,l=e=>typeof e==`symbol`,u=e=>typeof e==`object`&&!!e,d=Object.prototype.toString,f=e=>d.call(e),ee=e=>f(e).slice(8,-1),p=e=>c(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,m=(e,t)=>!Object.is(e,t),h;var te=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&h&&(h.active?(this.parent=h,this.index=(h.scopes||(h.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].pause();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].resume();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].resume()}}run(e){if(this._active){let t=h;try{return h=this,e()}finally{h=t}}}on(){++this._on===1&&(this.prevScope=h,h=this)}off(){if(this._on>0&&--this._on===0){if(h===this)h=this.prevScope;else{let e=h;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(this.effects.length=0,t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}};function ne(e){return new te(e)}function re(){return h}function g(e,t=!1){h&&h.cleanups.push(e)}let _,ie=new WeakSet;var v=class{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanups=void 0,this.scheduler=void 0,this.scope=h,h&&(h.active?h.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,ie.has(this)&&(ie.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||oe(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,ge(this),se(this);let e=_,t=T;_=this,T=!0;try{return this.fn()}finally{ce(this),_=e,T=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)C(e);this.deps=this.depsTail=void 0,ge(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?ie.add(this):this.scheduler?this.scheduler():this.flags&128?this.runIfDirty():this.run()}runIfDirty(){le(this)&&this.run()}get dirty(){return le(this)}};let ae=0,y,b;function oe(e,t=!1){if(e.flags|=8,t){e.next=b,b=e;return}e.next=y,y=e}function x(){ae++}function S(){if(--ae>0)return;if(b){let e=b;for(b=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;y;){let t=y;for(y=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(t){e||(e=t)}t=n}}if(e)throw e}function se(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function ce(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),C(r),de(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function le(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(ue(t.dep.computed)||t.dep.version!==t.version))return!0;return!1}function ue(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===E)||(e.globalVersion=E,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!le(e))))return;e.flags|=2;let t=e.dep,n=_,r=T;_=e,T=!0;try{se(e);let n=e.fn(e._value);(t.version===0||m(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{_=n,T=r,ce(e),e.flags&=-3}}function C(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)C(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function de(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}function w(e,t){e.effect instanceof v&&(e=e.effect.fn);let r=new v(e);t&&n(r,t);try{r.run()}catch(e){throw r.stop(),e}let i=r.run.bind(r);return i.effect=r,i}let T=!0,fe=[];function pe(){fe.push(T),T=!1}function me(){let e=fe.pop();T=e===void 0?!0:e}function he(e,t=!1){if(_ instanceof v){var n,r;((r=(n=_).cleanups)==null?n.cleanups=[]:r).push(e)}}function ge(e){let t=e.cleanups;if(e.cleanups=void 0,t){let e=_;_=void 0;try{let e;for(let n of t)try{n()}catch(t){e!=null||(e=t)}if(e)throw e}finally{_=e}}}function _e(e){x();try{return e()}finally{S()}}function ve(e){pe();try{return e()}finally{me()}}function ye(){return _ instanceof v?_:void 0}let E=0;var be=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},xe=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!_||!T||_===this.computed)return;this.computed&&(_.flags|=128);let t=this.activeLink;if(t===void 0||t.sub!==_)t=this.activeLink=new be(_,this),_.deps?(t.prevDep=_.depsTail,_.depsTail.nextDep=t,_.depsTail=t):_.deps=_.depsTail=t,Se(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=_.depsTail,t.nextDep=void 0,_.depsTail.nextDep=t,_.depsTail=t,_.deps===t&&(_.deps=e)}return t}trigger(e){this.version++,E++,this.notify(e)}notify(e){x();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{S()}}};function Se(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)Se(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}let D=new WeakMap,O=Symbol(``),Ce=Symbol(``),k=Symbol(``);function A(e,t,n){if(T&&_){let t=D.get(e);t||D.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new xe),r.map=t,r.key=n),r.track()}}function j(e,t,n,r,i,s){let c=D.get(e);if(!c){E++;return}let u=e=>{e&&e.trigger()};if(x(),t===`clear`)c.forEach(u);else{let i=a(e),s=i&&p(n);if(i&&n===`length`){let e=Number(r);c.forEach((t,n)=>{(n===`length`||n===k||!l(n)&&n>=e)&&u(t)})}else switch((n!==void 0||c.has(void 0))&&u(c.get(n)),s&&u(c.get(k)),t){case`add`:i?s&&u(c.get(`length`)):(u(c.get(O)),o(e)&&u(c.get(Ce)));break;case`delete`:i||(u(c.get(O)),o(e)&&u(c.get(Ce)));break;case`set`:o(e)&&u(c.get(O));break}}S()}var we=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new xe(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=E-1,this.next=void 0,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&_!==this)return oe(this,!0),!0}get value(){let e=this.dep.track();return ue(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function Te(e,t,n=!1){let r,i;return s(e)?r=e:(r=e.get,i=e.set),new we(r,i,n)}function Ee(e){let t=ye(),n=re();if(n&&(t==null?void 0:t.scope)!==n){g(e,!0);return}if(t){he(e,!0);return}if(n){g(e,!0);return}}function M(e){let t=H(e);return t===e?t:(A(t,`iterate`,k),V(e)?t:t.map(U))}function N(e){return A(e=H(e),`iterate`,k),e}function P(e,t){return B(e)?W(et(e)?U(t):t):U(t)}let De={__proto__:null,[Symbol.iterator](){return Oe(this,Symbol.iterator,e=>P(this,e))},concat(...e){return M(this).concat(...e.map(e=>a(e)?M(e):e))},entries(){return Oe(this,`entries`,e=>(e[1]=P(this,e[1]),e))},every(e,t){return F(this,`every`,e,t,void 0,arguments)},filter(e,t){return F(this,`filter`,e,t,e=>e.map(e=>P(this,e)),arguments)},find(e,t){return F(this,`find`,e,t,e=>P(this,e),arguments)},findIndex(e,t){return F(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return F(this,`findLast`,e,t,e=>P(this,e),arguments)},findLastIndex(e,t){return F(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return F(this,`forEach`,e,t,void 0,arguments)},includes(...e){return I(this,`includes`,e)},indexOf(...e){return I(this,`indexOf`,e)},join(e){return M(this).join(e)},lastIndexOf(...e){return I(this,`lastIndexOf`,e)},map(e,t){return F(this,`map`,e,t,void 0,arguments)},pop(){return L(this,`pop`)},push(...e){return L(this,`push`,e)},reduce(e,...t){return Ae(this,`reduce`,e,t)},reduceRight(e,...t){return Ae(this,`reduceRight`,e,t)},shift(){return L(this,`shift`)},some(e,t){return F(this,`some`,e,t,void 0,arguments)},splice(...e){return L(this,`splice`,e)},toReversed(){return M(this).toReversed()},toSorted(e){return M(this).toSorted(e)},toSpliced(...e){return M(this).toSpliced(...e)},unshift(...e){return L(this,`unshift`,e)},values(){return Oe(this,`values`,e=>P(this,e))}};function Oe(e,t,n){let r=N(e),i=r[t]();return r!==e&&!V(e)&&(i._next=i.next,i.next=()=>{let e=i._next();return e.done||(e.value=n(e.value)),e}),i}let ke=Array.prototype;function F(e,t,n,r,i,a){let o=N(e),s=o!==e&&!V(e),c=o[t];if(c!==ke[t]){let t=c.apply(e,a);return s?U(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,P(e,t),r,e)}:n.length>2&&(l=function(t,r){return n.call(this,t,r,e)}));let u=c.call(o,l,r);return s&&i?i(u):u}function Ae(e,t,n,r){let i=N(e),a=i!==e&&!V(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=P(e,t)),n.call(this,t,P(e,r),i,e)}):n.length>3&&(o=function(t,r,i){return n.call(this,t,r,i,e)}));let c=i[t](o,...r);return s?P(e,c):c}function I(e,t,n){let r=H(e);A(r,`iterate`,k);let i=r[t](...n);return(i===-1||i===!1)&&tt(n[0])?(n[0]=H(n[0]),r[t](...n)):i}function L(e,t,n=[]){pe(),x();let r=H(e)[t].apply(e,n);return S(),me(),r}let je=t(`__proto__,__v_isRef,__isVue`),Me=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(l));function Ne(e){l(e)||(e=String(e));let t=H(this);return A(t,`has`,e),t.hasOwnProperty(e)}var Pe=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t===`__v_skip`)return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t===`__v_isReactive`)return!r;if(t===`__v_isReadonly`)return r;if(t===`__v_isShallow`)return i;if(t===`__v_raw`)return n===(r?i?Je:qe:i?Ke:Ge).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let o=a(e);if(!r){let e;if(o&&(e=De[t]))return e;if(t===`hasOwnProperty`)return Ne}let s=Reflect.get(e,t,G(e)?e:n);if((l(t)?Me.has(t):je(t))||(r||A(e,`get`,t),i))return s;if(G(s)){let e=o&&p(t)?s:s.value;return r&&u(e)?Qe(e):e}return u(s)?r?Qe(s):Ze(s):s}},Fe=class extends Pe{constructor(e=!1){super(!1,e)}set(e,t,n,r){let o=e[t],s=a(e)&&p(t);if(!this._isShallow){let e=B(o);if(!V(n)&&!B(n)&&(o=H(o),n=H(n)),!s&&G(o)&&!G(n))return e||(o.value=n),!0}let c=s?Number(t)<e.length:i(e,t),l=Reflect.set(e,t,n,G(e)?e:r);return e===H(r)&&(c?m(n,o)&&j(e,`set`,t,n,o):j(e,`add`,t,n)),l}deleteProperty(e,t){let n=i(e,t),r=e[t],a=Reflect.deleteProperty(e,t);return a&&n&&j(e,`delete`,t,void 0,r),a}has(e,t){let n=Reflect.has(e,t);return(!l(t)||!Me.has(t))&&A(e,`has`,t),n}ownKeys(e){return A(e,`iterate`,a(e)?`length`:O),Reflect.ownKeys(e)}},Ie=class extends Pe{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}};let Le=new Fe,Re=new Ie,ze=e=>e,R=e=>Reflect.getPrototypeOf(e);function Be(e,t,r){return function(...i){let a=this.__v_raw,s=H(a),c=o(s),l=e===`entries`||e===Symbol.iterator&&c,u=e===`keys`&&c,d=a[e](...i),f=r?ze:t?W:U;return!t&&A(s,`iterate`,u?Ce:O),n(Object.create(d),{next(){let{value:e,done:t}=d.next();return t?{value:e,done:t}:{value:l?[f(e[0]),f(e[1])]:f(e),done:t}}})}}function z(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function Ve(e,t){let r={get(n){let r=this.__v_raw,i=H(r),a=H(n);e||(m(n,a)&&A(i,`get`,n),A(i,`get`,a));let{has:o}=R(i),s=t?ze:e?W:U;if(o.call(i,n))return s(r.get(n));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(n)},get size(){let t=this.__v_raw;return!e&&A(H(t),`iterate`,O),t.size},has(t){let n=this.__v_raw,r=H(n),i=H(t);return e||(m(t,i)&&A(r,`has`,t),A(r,`has`,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,r){let i=this,a=i.__v_raw,o=H(a),s=t?ze:e?W:U;return!e&&A(o,`iterate`,O),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return n(r,e?{add:z(`add`),set:z(`set`),delete:z(`delete`),clear:z(`clear`)}:{add(e){let n=H(this),r=R(n),i=H(e),a=!t&&!V(e)&&!B(e)?i:e;return r.has.call(n,a)||m(e,a)&&r.has.call(n,e)||m(i,a)&&r.has.call(n,i)||(n.add(a),j(n,`add`,a,a)),this},set(e,n){!t&&!V(n)&&!B(n)&&(n=H(n));let r=H(this),{has:i,get:a}=R(r),o=i.call(r,e);o||(e=H(e),o=i.call(r,e));let s=a.call(r,e);return r.set(e,n),o?m(n,s)&&j(r,`set`,e,n,s):j(r,`add`,e,n),this},delete(e){let t=H(this),{has:n,get:r}=R(t),i=n.call(t,e);i||(e=H(e),i=n.call(t,e));let a=r?r.call(t,e):void 0,o=t.delete(e);return i&&j(t,`delete`,e,void 0,a),o},clear(){let e=H(this),t=e.size!==0,n=e.clear();return t&&j(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(n=>{r[n]=Be(n,e,t)}),r}function He(e,t){let n=Ve(e,t);return(t,r,a)=>r===`__v_isReactive`?!e:r===`__v_isReadonly`?e:r===`__v_raw`?t:Reflect.get(i(n,r)&&r in t?n:t,r,a)}let Ue={get:He(!1,!1)},We={get:He(!0,!1)},Ge=new WeakMap,Ke=new WeakMap,qe=new WeakMap,Je=new WeakMap;function Ye(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function Xe(e){return e.__v_skip||!Object.isExtensible(e)?0:Ye(ee(e))}function Ze(e){return B(e)?e:$e(e,!1,Le,Ue,Ge)}function Qe(e){return $e(e,!0,Re,We,qe)}function $e(e,t,n,r,i){if(!u(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;let a=Xe(e);if(a===0)return e;let o=i.get(e);if(o)return o;let s=new Proxy(e,a===2?r:n);return i.set(e,s),s}function et(e){return B(e)?et(e.__v_raw):!!(e&&e.__v_isReactive)}function B(e){return!!(e&&e.__v_isReadonly)}function V(e){return!!(e&&e.__v_isShallow)}function tt(e){return e?!!e.__v_raw:!1}function H(e){let t=e&&e.__v_raw;return t?H(t):e}let U=e=>u(e)?Ze(e):e,W=e=>u(e)?Qe(e):e,nt,rt;function G(e){return e?e.__v_isRef===!0:!1}function it(e){return ot(e,!1)}function at(e){return ot(e,!0)}function ot(e,t){return G(e)?e:new st(e,t)}nt=`__v_isRef`,rt=`__v_isShallow`;var st=class{constructor(e,t){this.dep=new xe,this[nt]=!0,this[rt]=!1,this._rawValue=t?e:H(e),this._value=t?e:U(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||V(e)||B(e);e=n?e:H(e),m(e,t)&&(this._rawValue=e,this._value=n?e:U(e),this.dep.trigger())}};function ct(e){let t=at(e);return[()=>t.value,e=>{let n=typeof e==`function`?e(t.value):e;return t.value=n,n}]}function lt(e){let t=Te(e);return()=>t.value}function ut(e){w(e)}function dt(e){let t=ne(!0),n=!1,r=()=>{n||(n=!0,t.stop())};try{return t.run(()=>e(r))}catch(e){throw r(),e}}function ft(e){return arguments.length===0?it():mt(e)?Ze(e):it(e)}function pt(e){return arguments.length===0?at():at(e)}function mt(e){return typeof e!=`object`||!e?!1:Array.isArray(e)||e instanceof Map||e instanceof Set||e instanceof WeakMap||e instanceof WeakSet?!0:ht(e)}function ht(e){let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}let gt=new Set;function _t(e){let t=e;for(;t;){if(gt.has(t))return!0;if(t.parentNode){t=t.parentNode;continue}let e=t.getRootNode();t=`host`in e?e.host:null}return!1}let K=new WeakMap,vt=new WeakSet;function yt(e,t){let n={lightChildren:t};return K.set(e,n),()=>{K.get(e)===n&&K.delete(e)}}function bt(e,t){let n=K.get(e);if(n){if(t.nodeType===11){for(let e of t.childNodes)St(n,e);return}St(n,t)}}function xt(e){return vt.has(e)}function St(e,t){e.lightChildren.includes(t)||vt.add(t)}function Ct(e,t,n=null){if(t===void 0||t==null||t===!1||t===!0)return[];if(Array.isArray(t)){let r=[];for(let i of t)r.push(...Ct(e,i,n));return r}if(t instanceof Node&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let r=Array.from(t.childNodes);for(let t of r)bt(e,t),e.insertBefore(t,n);return r}let r=t instanceof Node?t:document.createTextNode(String(t));return bt(e,r),e.insertBefore(r,n),[r]}let q;function wt(){return q}function Tt(e,t){let n=q;q=e;try{return t()}finally{q=n}}function J(e,t,n=null){t!==void 0&&Ct(e,t,n)}let Y;function X(e=Y){return{parent:e,provides:new Map}}function Z(e,t){let n=Y;Y=e;try{return t()}finally{Y=n}}function Et(e){let t=arguments.length>0,n={id:Symbol(``),defaultValue:e,hasDefaultValue:t,Provider(e){let t=X(Y);return t.provides.set(n.id,e.value),Z(t,()=>{let t=Pt(e.children);return e.bridge?jt(n,e.value,t):t})},Bridge(e){return jt(n,e.value,Pt(e.children))}};return n}function Dt(e,t){let n=Y;n&&n.provides.set(e.id,t)}function Ot(e,t){let n=Y;for(;n;){if(n.provides.has(e.id))return n.provides.get(e.id);n=n.parent}if(arguments.length>=2)return t;if(e.hasDefaultValue)return e.defaultValue;throw Error(`Context value was not provided.`)}function kt(e,t){return arguments.length>=2?Ot(e,t):Ot(e)}let At=`zeus:context-request`;function jt(e,t,n){let r=document.createElement(`zeus-context`);return r.style.cssText=`display:contents;position:unset;width:0;height:0;overflow:hidden`,Mt(r,e,t),J(r,n),r}function Mt(e,t,n){let r=e=>{let r=e;r.type===`zeus:context-request`&&r.detail.id===t.id&&(r.stopPropagation(),r.detail.resolve(n))};e.addEventListener(At,r),g(()=>{e.removeEventListener(At,r)},!0)}function Nt(e,t){let n=!1,r,i=new CustomEvent(At,{bubbles:!0,composed:!0,cancelable:!0,detail:{id:t.id,resolved:!1,value:void 0,resolve(e){n=!0,r=e,this.resolved=!0,this.value=e}}});return e.dispatchEvent(i),{found:n,value:r}}function Pt(e){return typeof e==`function`?e():e==null?null:e}function Ft(e){var t;typeof window>`u`||(t=window.__ZEUS_DEVTOOLS_HOOK__)==null||t.emit(e)}function It(e,t,n={}){var r;let i=ne(),a=(r=n.owner)==null?X():r;i.run(()=>{t.textContent=``,Z(a,()=>{J(t,Lt(e))})}),Ft({type:`render`,target:t});let o=!1;return()=>{o||(o=!0,i.stop(),t.textContent=``)}}function Lt(e){return typeof e==`function`?e():e==null?null:e}function Q(e,t,n){if(t){ve(()=>n(e()));return}w(()=>{n(e())})}function Rt(e,t,n){let r=Vt(t),i=zt(t);if(i&&e instanceof HTMLElement){e[i]=!!n,n==null||n===!1?e.removeAttribute(r):n===!0?e.setAttribute(r,``):e.setAttribute(r,String(n));return}if(n==null||n===!1){e.removeAttribute(r);return}if(n===!0){e.setAttribute(r,``);return}e.setAttribute(r,String(n))}function zt(e){return Bt[e]}let Bt={hidden:`hidden`,disabled:`disabled`,readonly:`readOnly`,readOnly:`readOnly`,multiple:`multiple`,selected:`selected`,checked:`checked`,open:`open`,autofocus:`autofocus`,autoFocus:`autofocus`,indeterminate:`indeterminate`,noValidate:`noValidate`,novalidate:`noValidate`};function Vt(e){return e===`className`?`class`:e}function Ht(e,t,n,r=!1){Q(n,r,n=>{Rt(e,t,n)})}function Ut(e,t,n,r=!1){Q(n,r,n=>{e[t]=n})}function Wt(e,t,n=!1){Q(t,n,t=>{let n=Gt(t);n?e.setAttribute(`class`,n):e.removeAttribute(`class`)})}function Gt(e){return e?typeof e==`string`?e:Array.isArray(e)?e.map(Gt).filter(Boolean).join(` `):typeof e==`object`?Object.keys(e).filter(t=>e[t]).join(` `):``:``}function Kt(e,t,n=!1){let r;Q(t,n,t=>{if(t==null){e.removeAttribute(`style`),r=void 0;return}if(typeof t==`string`){e.setAttribute(`style`,t),r=void 0;return}r=qt(e,r,t)})}function qt(e,t,n){let r=e.style,i=t?t[0]:Object.create(null),a=r.cssText+Object.keys(n),o=t&&a!=t[1];for(let e in i)e in n||(r.setProperty(e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),``),delete i[e]);for(let e in n){let t=n[e],a=t==null?``:Jt(e,t);i[e]===a&&!o||(r.setProperty(e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),a),i[e]=a)}return[i,r.cssText+Object.keys(n)]}function Jt(e,t){return typeof t==`number`&&t!==0&&Yt[e]!==!0?`${t}px`:String(t)}let Yt={opacity:!0,zIndex:!0,fontWeight:!0,lineHeight:!0,flex:!0,flexGrow:!0,flexShrink:!0,order:!0};function Xt(e,t){return Z(X(),()=>e(t))}function Zt(e){return Qt(e.when?e.children:e.fallback)}function Qt(e){return typeof e==`function`?e():e==null?null:e}function $t(e){var t,n;return(t=(n=e.each)==null?void 0:n.map((t,n)=>e.children(t,n)))==null?null:t}function en(e){var t;if(e.attrName!==!1&&!(!cn(e.type)&&!e.deserialize))return ln((t=e.attrName)==null?un(e.name):t)}function tn(e){let t=new Set;for(let n of e){let e=en(n);e&&t.add(e)}return Array.from(t)}function nn(e,t){if(typeof e.deserialize==`function`)return e.deserialize(t);if(e.deserialize===!0)return t;switch(e.type){case`boolean`:return t!==null;case`number`:return t===null?void 0:Number(t);case`string`:return t==null?void 0:t;case`object`:case`array`:return sn(e,t);case`function`:return;default:return t}}function rn(e,t,n,r){let i=en(t);if(!(!i||t.serialize===!0)){r==null||r.add(i);try{let r=on(t,n);r==null?e.removeAttribute(i):e.setAttribute(i,r)}finally{r==null||r.delete(i)}}}function an(e){let t;return{connect(){return t!=null||(t=e()),t},disconnect(){let e=t;t=void 0,e==null||e.dispose()},current(){return t}}}function on(e,t){if(typeof e.serialize==`function`)return e.serialize(t);if(e.type===`boolean`)return t?``:null;if(t==null)return null;if(e.type===`object`||e.type===`array`)return JSON.stringify(t);if(e.type!==`function`)return String(t)}function sn(e,t){if(t!==null)try{return JSON.parse(t)}catch(t){return e.type===`array`?[]:{}}}function cn(e){return e===`string`||e===`number`||e===`boolean`}function ln(e){return e.toLowerCase()}function un(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function dn(e,t){let n=wt();if(!n||n.mode===`shadow`)return hn(e,t);if(n.projection)return n.projection.createSlot(e,t);let r=gn(n.lightChildren,e);return r.length>0?Array.from(r):t?t():null}function fn(e,t){let n=[],r,i,a=()=>{r==null||r.observe(e,{attributes:!0,attributeFilter:[`slot`],childList:!0,subtree:!0});for(let n of t)n.nodeType!==Node.ELEMENT_NODE||e.contains(n)||r==null||r.observe(n,{attributes:!0,attributeFilter:[`slot`]})},o=()=>{r==null||r.disconnect();let i=new Set;for(let e of n){let n=t.filter(t=>i.has(t)||!_n(t,e.name)?!1:(i.add(t),!0));pn(e,n.length>0?n:e.fallbackNodes)}for(let n of t)if(!i.has(n)&&e.contains(n)){var o;(o=n.parentNode)==null||o.removeChild(n)}r==null||r.takeRecords(),a()},s=n=>{let r=new Set,i=new Set,a=!1;for(let o of n){if(o.type===`attributes`){t.includes(o.target)&&(a=!0);continue}for(let e of o.removedNodes)t.includes(e)&&i.add(e);if(o.target!==e)continue;let n=Array.from(o.addedNodes).filter(e=>!xt(e));if(n.length!==0){for(let e of n)r.add(e);mn(t,n,o),a=!0}}for(let n of i){if(r.has(n)||e.contains(n))continue;let i=t.indexOf(n);i>=0&&(t.splice(i,1),a=!0)}a&&o()};return{createSlot(e,t){let r=document.createDocumentFragment(),i=document.createComment(e?`zeus-slot:${e}`:`zeus-slot`),a=document.createComment(`/zeus-slot`);r.append(i,a);let s={name:e,start:i,end:a,fallbackNodes:t?Ct(r,t(),a):[]};return n.push(s),o(),r},connect(){var n;if(r)return;let o=(n=e.ownerDocument.defaultView)==null?void 0:n.MutationObserver;o&&(i=yt(e,t),r=new o(s),a())},disconnect(){r==null||r.disconnect(),r=void 0,i==null||i(),i=void 0}}}function pn(e,t){let n=e.end.parentNode;if(!n||n!==e.start.parentNode)return;let r=[],i=e.start.nextSibling;for(;i&&i!==e.end;)r.push(i),i=i.nextSibling;if(!(r.length===t.length&&r.every((e,n)=>e===t[n]))){for(i=e.start.nextSibling;i&&i!==e.end;){let e=i.nextSibling;n.removeChild(i),i=e}for(let r of t)n.insertBefore(r,e.end)}}function mn(e,t,n){for(let n of t){let t=e.indexOf(n);t>=0&&e.splice(t,1)}let r=e.length,i=n.previousSibling?e.indexOf(n.previousSibling):-1,a=n.nextSibling?e.indexOf(n.nextSibling):-1;i>=0?r=i+1:a>=0?r=a:n.previousSibling===null&&(r=0),e.splice(r,0,...t)}function hn(e,t){let n=document.createElement(`slot`);e&&n.setAttribute(`name`,e);let r=t==null?void 0:t();return r!=null&&J(n,r),n}function gn(e,t){return e.filter(e=>_n(e,t))}function _n(e,t){return t?e.nodeType===Node.ELEMENT_NODE?e.getAttribute(`slot`)===t:!1:e.nodeType===Node.ELEMENT_NODE?!e.hasAttribute(`slot`):vn(e)}function vn(e){var t;return e.nodeType===Node.TEXT_NODE?!!((t=e.textContent)!=null&&t.trim()):!1}let yn=Symbol.for(`zeus.element.definition`);function bn(e,t={}){var n,r;if(Array.isArray(e))return{type:String,values:e,attr:t.attr,reflect:t.reflect,reactivity:t.reactivity,default:t.default,serialize:t.serialize,deserialize:t.deserialize};let i=e;return{type:i,attr:t.attr,reflect:i===Boolean?(n=t.reflect)==null?!0:n:t.reflect,reactivity:t.reactivity,default:i===Boolean?(r=t.default)==null?!1:r:t.default,serialize:t.serialize,deserialize:t.deserialize}}function xn(e){return typeof e==`string`?{__zeusEvent:!0,name:e}:{__zeusEvent:!0,name:e==null?void 0:e.name,bubbles:e==null?void 0:e.bubbles,composed:e==null?void 0:e.composed,cancelable:e==null?void 0:e.cancelable}}function Sn(e){let t=new Map,n={};for(let r of e){let e=r.reactivity===`shallow`?pt():ft();t.set(r.name,e),Object.defineProperty(n,r.name,{configurable:!1,enumerable:!0,get(){return e.value},set(t){e.value=t}})}return{props:n,get(e){var n;return(n=t.get(e))==null?void 0:n.value},set(e,n){let r=t.get(e);r&&(r.value=n)},has(e){return t.has(e)}}}function Cn(e,t,n){var r;let i=wn((r=t.props)==null?{}:r),a={tagName:e,options:t,setup:n,propDefs:i},o=tn(i);class s extends HTMLElement{static get observedAttributes(){return o}constructor(){super(),this.lightChildren=[],this.capturedLightChildren=!1,this.attributeProps=new Set,this.reflectingAttrs=new Set,this.propStore=Sn(i),this.props=this.propStore.props,Tn(this.propStore,i),En(this,this.propStore,i),t.formAssociated&&(this.internals=kn(this)),this.setupContext={host:this,internals:this.internals,emit:An(this,t.emits),expose:jn(this)},this.mountLifecycle=an(()=>this.mountElement())}connectedCallback(){this.mountLifecycle.connect()}disconnectedCallback(){_t(this)||this.mountLifecycle.disconnect()}mountElement(){var e,r;let i=(e=t.shadow)==null?!1:e,a=i?`shadow`:`light`;a===`light`&&!this.capturedLightChildren&&(this.lightChildren=Array.from(this.childNodes),this.capturedLightChildren=!0);let o=a===`light`?fn(this,this.lightChildren):void 0,s=X();for(let e of(r=t.consumes)==null?[]:r){let t=Nt(this,e);t.found?s.provides.set(e.id,t.value):e.hasDefaultValue&&s.provides.set(e.id,e.defaultValue)}let c=this.resolveRenderTarget(i),l={host:this,mode:a,lightChildren:this.lightChildren,projection:o},u=It(()=>Z(s,()=>Tt(l,()=>(Dn(this.props,this.setupContext,t.form),n(this.props,this.setupContext)))),c,{owner:s});return Pn(c,t.styles),o==null||o.connect(),{dispose(){o==null||o.disconnect(),u()}}}formAssociatedCallback(e){var n,r;(n=t.form)==null||(r=n.associated)==null||r.call(n,e,this.props,this.setupContext)}formDisabledCallback(e){var n,r;(n=t.form)==null||(r=n.disabled)==null||r.call(n,e,this.props,this.setupContext)}formResetCallback(){var e,n;(e=t.form)==null||(n=e.reset)==null||n.call(e,this.props,this.setupContext)}formStateRestoreCallback(e,n){var r,i;(r=t.form)==null||(i=r.stateRestore)==null||i.call(r,e,n,this.props,this.setupContext)}attributeChangedCallback(e,t,n){if(t===n||this.reflectingAttrs.has(e))return;let r=i.find(t=>t.attrName===e);r&&(this.attributeProps.add(r.name),this.propStore.set(r.name,nn(r,n)))}resolveRenderTarget(e){return this.target?this.target:e?(this.target=this.attachShadow(typeof e==`object`?e:{mode:`open`}),this.target):(this.target=this,this.target)}_writePropFromProperty(e,t){let n=i.find(t=>t.name===e);this.attributeProps.delete(e),this.propStore.set(e,t),n!=null&&n.reflect&&rn(this,n,t,this.reflectingAttrs)}}return s.formAssociated=!!t.formAssociated,customElements.get(e)||customElements.define(e,s),Object.defineProperty(s,yn,{value:a,configurable:!1}),s}function wn(e){return Object.keys(e).map(t=>{let n=String(t),r=e[t];if(typeof r==`function`){let e=r;return{name:n,attrName:Mn(e)?Fn(n):!1,type:Nn(e),reflect:!1,reactivity:`deep`}}let i=r==null?void 0:r.type,a=Mn(i)?Fn(n):!1;return{name:n,attrName:(r==null?void 0:r.attr)===void 0?a:r.attr,type:Nn(i),reflect:!!(r!=null&&r.reflect),reactivity:(r==null?void 0:r.reactivity)===`shallow`?`shallow`:`deep`,default:r==null?void 0:r.default,serialize:r==null?void 0:r.serialize,deserialize:r==null?void 0:r.deserialize}})}function Tn(e,t){for(let n of t){if(!(`default`in n))continue;let t=typeof n.default==`function`?n.default():n.default;e.set(n.name,t)}}function En(e,t,n){for(let r of n){let n=r.name,i=Object.prototype.hasOwnProperty.call(e,n),a=i?e[n]:void 0;i&&delete e[n];let o=Object.getOwnPropertyDescriptor(e,n);o&&o.configurable===!1||(Object.defineProperty(e,n,{configurable:!0,enumerable:!0,get(){return t.get(n)},set(t){e._writePropFromProperty(n,t)}}),i&&e._writePropFromProperty(n,a))}}function Dn(e,t,n){let r=n==null?void 0:n.value,i=n==null?void 0:n.state;!t.internals||r===void 0||w(()=>{let n=On(e,r),a=i===void 0?void 0:On(e,i);t.internals.setFormValue(n,a)})}function On(e,t){if(typeof t==`function`){var n;return(n=t(e))==null?null:n}let r=e[t];return r==null?null:r}function kn(e){let t=e.attachInternals;if(typeof t==`function`)try{return t.call(e)}catch(e){return}}function An(e,t){let n={},r=(n,r,i)=>{var a,o,s,c,l,u,d;let f=t==null?void 0:t[n];return e.dispatchEvent(new CustomEvent((a=f==null?void 0:f.name)==null?Fn(n):a,{bubbles:(o=(s=i==null?void 0:i.bubbles)==null?f==null?void 0:f.bubbles:s)==null?!0:o,composed:(c=(l=i==null?void 0:i.composed)==null?f==null?void 0:f.composed:l)==null?!0:c,cancelable:(u=(d=i==null?void 0:i.cancelable)==null?f==null?void 0:f.cancelable:d)==null?!1:u,detail:r}))};if(t)for(let e of Object.keys(t))Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value(t,n){return r(e,t,n)}});return n}function jn(e){return t=>{for(let n of Object.keys(t))Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value:t[n]})}}function Mn(e){return e===String||e===Number||e===Boolean}function Nn(e){return e===String?`string`:e===Number?`number`:e===Boolean?`boolean`:e===Object?`object`:e===Array?`array`:e===Function?`function`:`unknown`}function Pn(e,t){if(!t)return;let n=Array.isArray(t)?t:[t];for(let t of n){let n=document.createElement(`style`);n.textContent=t,e.appendChild(n)}}function Fn(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function In(e,t){if(e!=null){if(typeof e==`function`){e(t);return}if(`value`in e){e.value=t;return}if(`current`in e){e.current=t;return}}}function Ln(e,t){In(t,e),re()&&g(()=>{In(t,null)},!0)}let Rn=new Set([`children`,`ref`,`class`,`className`,`style`,`_elements`]);function zn(e){let t=wt();return t&&Vn(t.host,e),qn(e.children)}function Bn(e){return dn(e.name,()=>qn(e.children))}function Vn(e,t){Hn(e,t),Un(e,t),Wn(e,t),Gn(e,t),`_elements`in t&&Kn(e,t)}function Hn(e,t){`ref`in t&&Ln(e,t.ref)}function Un(e,t){if(!(`class`in t)&&!(`className`in t))return;let n=t.className===void 0?t.class:t.className;Wt(e,()=>$(n))}function Wn(e,t){`style`in t&&Kt(e,()=>$(t.style))}function Gn(e,t){for(let n of Object.keys(t)){if(Rn.has(n)||Jn(n))continue;let r=t[n];Ht(e,Yn(n),()=>$(r))}}function Kn(e,t){let n=t._elements;for(let e of Object.keys(n)){let r=n[e],i=r();if(i)for(let e of Object.keys(t)){if(Rn.has(e)||Jn(e))continue;let n=t[e];Ht(i,Yn(e),()=>$(n))}}}function $(e){return typeof e==`function`?e():e}function qn(e){return typeof e==`function`?e():e}function Jn(e){return/^on[A-Z]/.test(e)||e.startsWith(`on:`)}function Yn(e){switch(e){case`className`:return`class`;case`htmlFor`:return`for`;case`tabIndex`:return`tabindex`;case`readOnly`:return`readonly`;default:return e}}let Xn=Symbol.for(`zeus.fragment`);function Zn(e,t){if(e===Xn)return t==null?void 0:t.children;if(typeof e==`function`)return Xt(e,t==null?{}:t);if(typeof e!=`string`)return null;let n=document.createElement(e);if(t){let e=t.children;for(let e of Object.keys(t)){if(e===`children`)continue;let r=t[e];if(e.startsWith(`on`)&&typeof r==`function`)n.addEventListener(e.slice(2).toLowerCase(),r);else if(e===`ref`)Qn(r,n);else if(e.startsWith(`prop:`)){let t=e.slice(5);typeof r==`function`?Ut(n,t,r):n[t]=r}else typeof r==`function`?Ht(n,e,r):r!=null&&r!==!1&&n.setAttribute(e===`className`?`class`:e,String(r))}e!==void 0&&J(n,e)}return n}function Qn(e,t){e!=null&&(typeof e==`function`?e(t):typeof e==`object`&&(`value`in e?e.value=t:`current`in e&&(e.current=t)))}return e.For=$t,e.Fragment=Xn,e.Host=zn,e.Show=Zt,e.Slot=Bn,e.batch=_e,e.createContext=Et,e.createEffect=ut,e.createMemo=lt,e.createRoot=dt,e.createSignal=ct,e.defineElement=Cn,e.event=xn,e.inject=Ot,e.jsx=Zn,e.jsxDEV=Zn,e.jsxs=Zn,e.onCleanup=Ee,e.prop=bn,e.provide=Dt,e.render=It,e.useContext=kt,e})({});
|
|
1
|
+
var Zeus=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}let n=Object.assign,r=Object.prototype.hasOwnProperty,i=(e,t)=>r.call(e,t),a=Array.isArray,o=e=>f(e)===`[object Map]`,s=e=>typeof e==`function`,c=e=>typeof e==`string`,l=e=>typeof e==`symbol`,u=e=>typeof e==`object`&&!!e,d=Object.prototype.toString,f=e=>d.call(e),ee=e=>f(e).slice(8,-1),te=e=>c(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,p=(e,t)=>!Object.is(e,t),m;var ne=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&m&&(m.active?(this.parent=m,this.index=(m.scopes||(m.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].pause();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].resume();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].resume()}}run(e){if(this._active){let t=m;try{return m=this,e()}finally{m=t}}}on(){++this._on===1&&(this.prevScope=m,m=this)}off(){if(this._on>0&&--this._on===0){if(m===this)m=this.prevScope;else{let e=m;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(this.effects.length=0,t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}};function re(e){return new ne(e)}function ie(){return m}function h(e,t=!1){m&&m.cleanups.push(e)}let g,ae=new WeakSet;var _=class{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanups=void 0,this.scheduler=void 0,this.scope=m,m&&(m.active?m.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,ae.has(this)&&(ae.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||se(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,_e(this),ce(this);let e=g,t=w;g=this,w=!0;try{return this.fn()}finally{le(this),g=e,w=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)C(e);this.deps=this.depsTail=void 0,_e(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?ae.add(this):this.scheduler?this.scheduler():this.flags&128?this.runIfDirty():this.run()}runIfDirty(){S(this)&&this.run()}get dirty(){return S(this)}};let oe=0,v,y;function se(e,t=!1){if(e.flags|=8,t){e.next=y,y=e;return}e.next=v,v=e}function b(){oe++}function x(){if(--oe>0)return;if(y){let e=y;for(y=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;v;){let t=v;for(v=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(t){e||(e=t)}t=n}}if(e)throw e}function ce(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function le(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),C(r),de(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function S(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(ue(t.dep.computed)||t.dep.version!==t.version))return!0;return!1}function ue(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===T)||(e.globalVersion=T,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!S(e))))return;e.flags|=2;let t=e.dep,n=g,r=w;g=e,w=!0;try{ce(e);let n=e.fn(e._value);(t.version===0||p(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{g=n,w=r,le(e),e.flags&=-3}}function C(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)C(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function de(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}function fe(e,t){e.effect instanceof _&&(e=e.effect.fn);let r=new _(e);t&&n(r,t);try{r.run()}catch(e){throw r.stop(),e}let i=r.run.bind(r);return i.effect=r,i}let w=!0,pe=[];function me(){pe.push(w),w=!1}function he(){let e=pe.pop();w=e===void 0?!0:e}function ge(e,t=!1){if(g instanceof _){var n,r;((r=(n=g).cleanups)==null?n.cleanups=[]:r).push(e)}}function _e(e){let t=e.cleanups;if(e.cleanups=void 0,t){let e=g;g=void 0;try{let e;for(let n of t)try{n()}catch(t){e!=null||(e=t)}if(e)throw e}finally{g=e}}}function ve(e){b();try{return e()}finally{x()}}function ye(e){me();try{return e()}finally{he()}}function be(){return g instanceof _?g:void 0}let T=0;var xe=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},Se=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!g||!w||g===this.computed)return;this.computed&&(g.flags|=128);let t=this.activeLink;if(t===void 0||t.sub!==g)t=this.activeLink=new xe(g,this),g.deps?(t.prevDep=g.depsTail,g.depsTail.nextDep=t,g.depsTail=t):g.deps=g.depsTail=t,Ce(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=g.depsTail,t.nextDep=void 0,g.depsTail.nextDep=t,g.depsTail=t,g.deps===t&&(g.deps=e)}return t}trigger(e){this.version++,T++,this.notify(e)}notify(e){b();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{x()}}};function Ce(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)Ce(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}let we=new WeakMap,E=Symbol(``),Te=Symbol(``),D=Symbol(``);function O(e,t,n){if(w&&g){let t=we.get(e);t||we.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new Se),r.map=t,r.key=n),r.track()}}function k(e,t,n,r,i,s){let c=we.get(e);if(!c){T++;return}let u=e=>{e&&e.trigger()};if(b(),t===`clear`)c.forEach(u);else{let i=a(e),s=i&&te(n);if(i&&n===`length`){let e=Number(r);c.forEach((t,n)=>{(n===`length`||n===D||!l(n)&&n>=e)&&u(t)})}else switch((n!==void 0||c.has(void 0))&&u(c.get(n)),s&&u(c.get(D)),t){case`add`:i?s&&u(c.get(`length`)):(u(c.get(E)),o(e)&&u(c.get(Te)));break;case`delete`:i||(u(c.get(E)),o(e)&&u(c.get(Te)));break;case`set`:o(e)&&u(c.get(E));break}}x()}var Ee=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new Se(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=T-1,this.next=void 0,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&g!==this)return se(this,!0),!0}get value(){let e=this.dep.track();return ue(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function De(e,t,n=!1){let r,i;return s(e)?r=e:(r=e.get,i=e.set),new Ee(r,i,n)}function Oe(e){let t=be(),n=ie();if(n&&(t==null?void 0:t.scope)!==n){h(e,!0);return}if(t){ge(e,!0);return}if(n){h(e,!0);return}}function A(e){let t=V(e);return t===e?t:(O(t,`iterate`,D),B(e)?t:t.map(H))}function ke(e){return O(e=V(e),`iterate`,D),e}function j(e,t){return z(e)?U(tt(e)?H(t):t):H(t)}let Ae={__proto__:null,[Symbol.iterator](){return M(this,Symbol.iterator,e=>j(this,e))},concat(...e){return A(this).concat(...e.map(e=>a(e)?A(e):e))},entries(){return M(this,`entries`,e=>(e[1]=j(this,e[1]),e))},every(e,t){return N(this,`every`,e,t,void 0,arguments)},filter(e,t){return N(this,`filter`,e,t,e=>e.map(e=>j(this,e)),arguments)},find(e,t){return N(this,`find`,e,t,e=>j(this,e),arguments)},findIndex(e,t){return N(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return N(this,`findLast`,e,t,e=>j(this,e),arguments)},findLastIndex(e,t){return N(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return N(this,`forEach`,e,t,void 0,arguments)},includes(...e){return P(this,`includes`,e)},indexOf(...e){return P(this,`indexOf`,e)},join(e){return A(this).join(e)},lastIndexOf(...e){return P(this,`lastIndexOf`,e)},map(e,t){return N(this,`map`,e,t,void 0,arguments)},pop(){return F(this,`pop`)},push(...e){return F(this,`push`,e)},reduce(e,...t){return Me(this,`reduce`,e,t)},reduceRight(e,...t){return Me(this,`reduceRight`,e,t)},shift(){return F(this,`shift`)},some(e,t){return N(this,`some`,e,t,void 0,arguments)},splice(...e){return F(this,`splice`,e)},toReversed(){return A(this).toReversed()},toSorted(e){return A(this).toSorted(e)},toSpliced(...e){return A(this).toSpliced(...e)},unshift(...e){return F(this,`unshift`,e)},values(){return M(this,`values`,e=>j(this,e))}};function M(e,t,n){let r=ke(e),i=r[t]();return r!==e&&!B(e)&&(i._next=i.next,i.next=()=>{let e=i._next();return e.done||(e.value=n(e.value)),e}),i}let je=Array.prototype;function N(e,t,n,r,i,a){let o=ke(e),s=o!==e&&!B(e),c=o[t];if(c!==je[t]){let t=c.apply(e,a);return s?H(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,j(e,t),r,e)}:n.length>2&&(l=function(t,r){return n.call(this,t,r,e)}));let u=c.call(o,l,r);return s&&i?i(u):u}function Me(e,t,n,r){let i=ke(e),a=i!==e&&!B(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=j(e,t)),n.call(this,t,j(e,r),i,e)}):n.length>3&&(o=function(t,r,i){return n.call(this,t,r,i,e)}));let c=i[t](o,...r);return s?j(e,c):c}function P(e,t,n){let r=V(e);O(r,`iterate`,D);let i=r[t](...n);return(i===-1||i===!1)&&nt(n[0])?(n[0]=V(n[0]),r[t](...n)):i}function F(e,t,n=[]){me(),b();let r=V(e)[t].apply(e,n);return x(),he(),r}let Ne=t(`__proto__,__v_isRef,__isVue`),Pe=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(l));function Fe(e){l(e)||(e=String(e));let t=V(this);return O(t,`has`,e),t.hasOwnProperty(e)}var Ie=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t===`__v_skip`)return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t===`__v_isReactive`)return!r;if(t===`__v_isReadonly`)return r;if(t===`__v_isShallow`)return i;if(t===`__v_raw`)return n===(r?i?Ye:Je:i?qe:Ke).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let o=a(e);if(!r){let e;if(o&&(e=Ae[t]))return e;if(t===`hasOwnProperty`)return Fe}let s=Reflect.get(e,t,W(e)?e:n);if((l(t)?Pe.has(t):Ne(t))||(r||O(e,`get`,t),i))return s;if(W(s)){let e=o&&te(t)?s:s.value;return r&&u(e)?$e(e):e}return u(s)?r?$e(s):Qe(s):s}},Le=class extends Ie{constructor(e=!1){super(!1,e)}set(e,t,n,r){let o=e[t],s=a(e)&&te(t);if(!this._isShallow){let e=z(o);if(!B(n)&&!z(n)&&(o=V(o),n=V(n)),!s&&W(o)&&!W(n))return e||(o.value=n),!0}let c=s?Number(t)<e.length:i(e,t),l=Reflect.set(e,t,n,W(e)?e:r);return e===V(r)&&(c?p(n,o)&&k(e,`set`,t,n,o):k(e,`add`,t,n)),l}deleteProperty(e,t){let n=i(e,t),r=e[t],a=Reflect.deleteProperty(e,t);return a&&n&&k(e,`delete`,t,void 0,r),a}has(e,t){let n=Reflect.has(e,t);return(!l(t)||!Pe.has(t))&&O(e,`has`,t),n}ownKeys(e){return O(e,`iterate`,a(e)?`length`:E),Reflect.ownKeys(e)}},Re=class extends Ie{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}};let ze=new Le,Be=new Re,I=e=>e,L=e=>Reflect.getPrototypeOf(e);function Ve(e,t,r){return function(...i){let a=this.__v_raw,s=V(a),c=o(s),l=e===`entries`||e===Symbol.iterator&&c,u=e===`keys`&&c,d=a[e](...i),f=r?I:t?U:H;return!t&&O(s,`iterate`,u?Te:E),n(Object.create(d),{next(){let{value:e,done:t}=d.next();return t?{value:e,done:t}:{value:l?[f(e[0]),f(e[1])]:f(e),done:t}}})}}function R(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function He(e,t){let r={get(n){let r=this.__v_raw,i=V(r),a=V(n);e||(p(n,a)&&O(i,`get`,n),O(i,`get`,a));let{has:o}=L(i),s=t?I:e?U:H;if(o.call(i,n))return s(r.get(n));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(n)},get size(){let t=this.__v_raw;return!e&&O(V(t),`iterate`,E),t.size},has(t){let n=this.__v_raw,r=V(n),i=V(t);return e||(p(t,i)&&O(r,`has`,t),O(r,`has`,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,r){let i=this,a=i.__v_raw,o=V(a),s=t?I:e?U:H;return!e&&O(o,`iterate`,E),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return n(r,e?{add:R(`add`),set:R(`set`),delete:R(`delete`),clear:R(`clear`)}:{add(e){let n=V(this),r=L(n),i=V(e),a=!t&&!B(e)&&!z(e)?i:e;return r.has.call(n,a)||p(e,a)&&r.has.call(n,e)||p(i,a)&&r.has.call(n,i)||(n.add(a),k(n,`add`,a,a)),this},set(e,n){!t&&!B(n)&&!z(n)&&(n=V(n));let r=V(this),{has:i,get:a}=L(r),o=i.call(r,e);o||(e=V(e),o=i.call(r,e));let s=a.call(r,e);return r.set(e,n),o?p(n,s)&&k(r,`set`,e,n,s):k(r,`add`,e,n),this},delete(e){let t=V(this),{has:n,get:r}=L(t),i=n.call(t,e);i||(e=V(e),i=n.call(t,e));let a=r?r.call(t,e):void 0,o=t.delete(e);return i&&k(t,`delete`,e,void 0,a),o},clear(){let e=V(this),t=e.size!==0,n=e.clear();return t&&k(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(n=>{r[n]=Ve(n,e,t)}),r}function Ue(e,t){let n=He(e,t);return(t,r,a)=>r===`__v_isReactive`?!e:r===`__v_isReadonly`?e:r===`__v_raw`?t:Reflect.get(i(n,r)&&r in t?n:t,r,a)}let We={get:Ue(!1,!1)},Ge={get:Ue(!0,!1)},Ke=new WeakMap,qe=new WeakMap,Je=new WeakMap,Ye=new WeakMap;function Xe(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function Ze(e){return e.__v_skip||!Object.isExtensible(e)?0:Xe(ee(e))}function Qe(e){return z(e)?e:et(e,!1,ze,We,Ke)}function $e(e){return et(e,!0,Be,Ge,Je)}function et(e,t,n,r,i){if(!u(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;let a=Ze(e);if(a===0)return e;let o=i.get(e);if(o)return o;let s=new Proxy(e,a===2?r:n);return i.set(e,s),s}function tt(e){return z(e)?tt(e.__v_raw):!!(e&&e.__v_isReactive)}function z(e){return!!(e&&e.__v_isReadonly)}function B(e){return!!(e&&e.__v_isShallow)}function nt(e){return e?!!e.__v_raw:!1}function V(e){let t=e&&e.__v_raw;return t?V(t):e}let H=e=>u(e)?Qe(e):e,U=e=>u(e)?$e(e):e,rt,it;function W(e){return e?e.__v_isRef===!0:!1}function at(e){return st(e,!1)}function ot(e){return st(e,!0)}function st(e,t){return W(e)?e:new ct(e,t)}rt=`__v_isRef`,it=`__v_isShallow`;var ct=class{constructor(e,t){this.dep=new Se,this[rt]=!0,this[it]=!1,this._rawValue=t?e:V(e),this._value=t?e:H(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||B(e)||z(e);e=n?e:V(e),p(e,t)&&(this._rawValue=e,this._value=n?e:H(e),this.dep.trigger())}};function lt(e){let t=ot(e);return[()=>t.value,e=>{let n=typeof e==`function`?e(t.value):e;return t.value=n,n}]}function ut(e){let t=De(e);return()=>t.value}function dt(e){fe(e)}function ft(e){let t=re(!0),n=!1,r=()=>{n||(n=!0,t.stop())};try{return t.run(()=>e(r))}catch(e){throw r(),e}}function pt(e){return arguments.length===0?at():ht(e)?Qe(e):at(e)}function mt(e){return arguments.length===0?ot():ot(e)}function ht(e){return typeof e!=`object`||!e?!1:Array.isArray(e)||e instanceof Map||e instanceof Set||e instanceof WeakMap||e instanceof WeakSet?!0:gt(e)}function gt(e){let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}let _t=new Set;function vt(e){let t=e;for(;t;){if(_t.has(t))return!0;if(t.parentNode){t=t.parentNode;continue}let e=t.getRootNode();t=`host`in e?e.host:null}return!1}let G=new WeakMap,yt=new WeakSet;function bt(e,t){let n={lightChildren:t};return G.set(e,n),()=>{G.get(e)===n&&G.delete(e)}}function xt(e,t){let n=G.get(e);if(n){if(t.nodeType===11){for(let e of t.childNodes)Ct(n,e);return}Ct(n,t)}}function St(e){return yt.has(e)}function Ct(e,t){e.lightChildren.includes(t)||yt.add(t)}function wt(e,t,n=null){if(t===void 0||t==null||t===!1||t===!0)return[];if(Array.isArray(t)){let r=[];for(let i of t)r.push(...wt(e,i,n));return r}if(t instanceof Node&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let r=Array.from(t.childNodes);for(let t of r)xt(e,t),e.insertBefore(t,n);return r}let r=t instanceof Node?t:document.createTextNode(String(t));return xt(e,r),e.insertBefore(r,n),[r]}let K;function Tt(){return K}function Et(e,t){let n=K;K=e;try{return t()}finally{K=n}}function q(e,t,n=null){t!==void 0&&wt(e,t,n)}let J;function Y(e=J){return{parent:e,provides:new Map}}function X(e,t){let n=J;J=e;try{return t()}finally{J=n}}function Dt(e){let t=arguments.length>0,n={id:Symbol(``),defaultValue:e,hasDefaultValue:t,Provider(e){let t=Y(J);return t.provides.set(n.id,e.value),X(t,()=>{let t=Ft(e.children);return e.bridge?Mt(n,e.value,t):t})},Bridge(e){return Mt(n,e.value,Ft(e.children))}};return n}function Ot(e,t){let n=J;n&&n.provides.set(e.id,t)}function kt(e,t){let n=J;for(;n;){if(n.provides.has(e.id))return n.provides.get(e.id);n=n.parent}if(arguments.length>=2)return t;if(e.hasDefaultValue)return e.defaultValue;throw Error(`Context value was not provided.`)}function At(e,t){return arguments.length>=2?kt(e,t):kt(e)}let jt=`zeus:context-request`;function Mt(e,t,n){let r=document.createElement(`zeus-context`);return r.style.cssText=`display:contents;position:unset;width:0;height:0;overflow:hidden`,Nt(r,e,t),q(r,n),r}function Nt(e,t,n){let r=e=>{let r=e;r.type===`zeus:context-request`&&r.detail.id===t.id&&(r.stopPropagation(),r.detail.resolve(n))};e.addEventListener(jt,r),h(()=>{e.removeEventListener(jt,r)},!0)}function Pt(e,t){let n=!1,r,i=new CustomEvent(jt,{bubbles:!0,composed:!0,cancelable:!0,detail:{id:t.id,resolved:!1,value:void 0,resolve(e){n=!0,r=e,this.resolved=!0,this.value=e}}});return e.dispatchEvent(i),{found:n,value:r}}function Ft(e){return typeof e==`function`?e():e==null?null:e}function It(e){var t;typeof window>`u`||(t=window.__ZEUS_DEVTOOLS_HOOK__)==null||t.emit(e)}function Lt(e,t,n={}){var r;let i=re(),a=(r=n.owner)==null?Y():r;i.run(()=>{t.textContent=``,X(a,()=>{q(t,Rt(e))})}),It({type:`render`,target:t});let o=!1;return()=>{o||(o=!0,i.stop(),t.textContent=``)}}function Rt(e){return typeof e==`function`?e():e==null?null:e}function Z(e,t,n){if(t){ye(()=>n(e()));return}fe(()=>{n(e())})}function zt(e,t,n){let r=Wt(t),i=Ht(t),a=Vt(n);(a===null?!e.hasAttribute(r):e.getAttribute(r)===a)&&(!i||!(e instanceof HTMLElement)||!!n==!!e[i])||(i&&e instanceof HTMLElement&&(e[i]=!!n),a===null?e.removeAttribute(r):e.setAttribute(r,a))}function Bt(e,t,n){let r=Wt(t),i=Ht(t),a=Vt(n);i&&e instanceof HTMLElement&&(e[i]=!!n),a===null?e.removeAttribute(r):e.setAttribute(r,a)}function Vt(e){return e==null||e===!1?null:e===!0?``:String(e)}function Ht(e){return Ut[e]}let Ut={hidden:`hidden`,disabled:`disabled`,readonly:`readOnly`,readOnly:`readOnly`,multiple:`multiple`,selected:`selected`,checked:`checked`,open:`open`,autofocus:`autofocus`,autoFocus:`autofocus`,indeterminate:`indeterminate`,noValidate:`noValidate`,novalidate:`noValidate`};function Wt(e){return e===`className`?`class`:e}function Q(e,t,n,r=!1){let i,a=!1;Z(n,r,n=>{let r=Vt(n);a&&r===i?zt(e,t,n):Bt(e,t,n),i=r,a=!0})}function Gt(e,t,n,r=!1){Z(n,r,n=>{e[t]=n})}function Kt(e,t,n=!1){Z(t,n,t=>{let n=qt(t);n?e.setAttribute(`class`,n):e.removeAttribute(`class`)})}function qt(e){return e?typeof e==`string`?e:Array.isArray(e)?e.map(qt).filter(Boolean).join(` `):typeof e==`object`?Object.keys(e).filter(t=>e[t]).join(` `):``:``}function Jt(e,t,n=!1){let r;Z(t,n,t=>{if(t==null){e.removeAttribute(`style`),r=void 0;return}if(typeof t==`string`){e.setAttribute(`style`,t),r=void 0;return}r=Yt(e,r,t)})}function Yt(e,t,n){let r=e.style,i=t?t[0]:Object.create(null),a=Object.keys(n),o=r.cssText+a.join(`,`),s=t&&o!=t[1],c=!1;for(let e in i)e in n||(r.setProperty(e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),``),c=!0,delete i[e]);for(let e in n){let t=n[e],a=t==null?``:Xt(e,t);i[e]===a&&!s||(r.setProperty(e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),a),c=!0,i[e]=a)}return t&&!c?t:[i,r.cssText+a.join(`,`)]}function Xt(e,t){return typeof t==`number`&&t!==0&&Zt[e]!==!0?`${t}px`:String(t)}let Zt={opacity:!0,zIndex:!0,fontWeight:!0,lineHeight:!0,flex:!0,flexGrow:!0,flexShrink:!0,order:!0};function Qt(e,t){return X(Y(),()=>e(t))}function $t(e){return en(e.when?e.children:e.fallback)}function en(e){return typeof e==`function`?e():e==null?null:e}function tn(e){var t,n;return(t=(n=e.each)==null?void 0:n.map((t,n)=>e.children(t,n)))==null?null:t}function nn(e){var t;if(e.attrName!==!1&&!(!un(e.type)&&!e.deserialize))return dn((t=e.attrName)==null?fn(e.name):t)}function rn(e){let t=new Set;for(let n of e){let e=nn(n);e&&t.add(e)}return Array.from(t)}function an(e,t){if(typeof e.deserialize==`function`)return e.deserialize(t);if(e.deserialize===!0)return t;switch(e.type){case`boolean`:return t!==null;case`number`:return t===null?void 0:Number(t);case`string`:return t==null?void 0:t;case`object`:case`array`:return ln(e,t);case`function`:return;default:return t}}function on(e,t,n,r){let i=nn(t);if(!(!i||t.serialize===!0)){r==null||r.add(i);try{let r=cn(t,n);r==null?e.removeAttribute(i):e.setAttribute(i,r)}finally{r==null||r.delete(i)}}}function sn(e){let t;return{connect(){return t!=null||(t=e()),t},disconnect(){let e=t;t=void 0,e==null||e.dispose()},current(){return t}}}function cn(e,t){if(typeof e.serialize==`function`)return e.serialize(t);if(e.type===`boolean`)return t?``:null;if(t==null)return null;if(e.type===`object`||e.type===`array`)return JSON.stringify(t);if(e.type!==`function`)return String(t)}function ln(e,t){if(t!==null)try{return JSON.parse(t)}catch(t){return e.type===`array`?[]:{}}}function un(e){return e===`string`||e===`number`||e===`boolean`}function dn(e){return e.toLowerCase()}function fn(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function pn(e,t){let n=Tt();if(!n||n.mode===`shadow`)return _n(e,t);if(n.projection)return n.projection.createSlot(e,t);let r=vn(n.lightChildren,e);return r.length>0?Array.from(r):t?t():null}function mn(e,t){let n=[],r,i,a=()=>{r==null||r.observe(e,{attributes:!0,attributeFilter:[`slot`],childList:!0,subtree:!0});for(let n of t)n.nodeType!==Node.ELEMENT_NODE||e.contains(n)||r==null||r.observe(n,{attributes:!0,attributeFilter:[`slot`]})},o=()=>{r==null||r.disconnect();let i=new Set;for(let e of n){let n=t.filter(t=>i.has(t)||!yn(t,e.name)?!1:(i.add(t),!0));hn(e,n.length>0?n:e.fallbackNodes)}for(let n of t)if(!i.has(n)&&e.contains(n)){var o;(o=n.parentNode)==null||o.removeChild(n)}r==null||r.takeRecords(),a()},s=n=>{let r=new Set,i=new Set,a=!1;for(let o of n){if(o.type===`attributes`){t.includes(o.target)&&(a=!0);continue}for(let e of o.removedNodes)t.includes(e)&&i.add(e);if(o.target!==e)continue;let n=Array.from(o.addedNodes).filter(e=>!St(e));if(n.length!==0){for(let e of n)r.add(e);gn(t,n,o),a=!0}}for(let n of i){if(r.has(n)||e.contains(n))continue;let i=t.indexOf(n);i>=0&&(t.splice(i,1),a=!0)}a&&o()};return{createSlot(e,t){let r=document.createDocumentFragment(),i=document.createComment(e?`zeus-slot:${e}`:`zeus-slot`),a=document.createComment(`/zeus-slot`);r.append(i,a);let s={name:e,start:i,end:a,fallbackNodes:t?wt(r,t(),a):[]};return n.push(s),o(),r},connect(){var n;if(r)return;let o=(n=e.ownerDocument.defaultView)==null?void 0:n.MutationObserver;o&&(i=bt(e,t),r=new o(s),a())},disconnect(){r==null||r.disconnect(),r=void 0,i==null||i(),i=void 0}}}function hn(e,t){let n=e.end.parentNode;if(!n||n!==e.start.parentNode)return;let r=[],i=e.start.nextSibling;for(;i&&i!==e.end;)r.push(i),i=i.nextSibling;if(!(r.length===t.length&&r.every((e,n)=>e===t[n]))){for(i=e.start.nextSibling;i&&i!==e.end;){let e=i.nextSibling;n.removeChild(i),i=e}for(let r of t)n.insertBefore(r,e.end)}}function gn(e,t,n){for(let n of t){let t=e.indexOf(n);t>=0&&e.splice(t,1)}let r=e.length,i=n.previousSibling?e.indexOf(n.previousSibling):-1,a=n.nextSibling?e.indexOf(n.nextSibling):-1;i>=0?r=i+1:a>=0?r=a:n.previousSibling===null&&(r=0),e.splice(r,0,...t)}function _n(e,t){let n=document.createElement(`slot`);e&&n.setAttribute(`name`,e);let r=t==null?void 0:t();return r!=null&&q(n,r),n}function vn(e,t){return e.filter(e=>yn(e,t))}function yn(e,t){return t?e.nodeType===Node.ELEMENT_NODE?e.getAttribute(`slot`)===t:!1:e.nodeType===Node.ELEMENT_NODE?!e.hasAttribute(`slot`):bn(e)}function bn(e){var t;return e.nodeType===Node.TEXT_NODE?!!((t=e.textContent)!=null&&t.trim()):!1}let xn=Symbol.for(`zeus.element.definition`);function Sn(e,t={}){var n,r;if(Array.isArray(e))return{type:String,values:e,attr:t.attr,reflect:t.reflect,reactivity:t.reactivity,default:t.default,serialize:t.serialize,deserialize:t.deserialize};let i=e;return{type:i,attr:t.attr,reflect:i===Boolean?(n=t.reflect)==null?!0:n:t.reflect,reactivity:t.reactivity,default:i===Boolean?(r=t.default)==null?!1:r:t.default,serialize:t.serialize,deserialize:t.deserialize}}function Cn(e){return typeof e==`string`?{__zeusEvent:!0,name:e}:{__zeusEvent:!0,name:e==null?void 0:e.name,bubbles:e==null?void 0:e.bubbles,composed:e==null?void 0:e.composed,cancelable:e==null?void 0:e.cancelable}}function wn(e){let t=new Map,n={};for(let r of e){let e=r.reactivity===`shallow`?mt():pt();t.set(r.name,e),Object.defineProperty(n,r.name,{configurable:!1,enumerable:!0,get(){return e.value},set(t){e.value=t}})}return{props:n,get(e){var n;return(n=t.get(e))==null?void 0:n.value},set(e,n){let r=t.get(e);r&&(r.value=n)},has(e){return t.has(e)}}}function Tn(e,t,n){var r;let i=En((r=t.props)==null?{}:r),a={tagName:e,options:t,setup:n,propDefs:i},o=rn(i);class s extends HTMLElement{static get observedAttributes(){return o}constructor(){super(),this.lightChildren=[],this.capturedLightChildren=!1,this.attributeProps=new Set,this.reflectingAttrs=new Set,this.propStore=wn(i),this.props=this.propStore.props,Dn(this.propStore,i),On(this,this.propStore,i),t.formAssociated&&(this.internals=jn(this)),this.setupContext={host:this,internals:this.internals,emit:Mn(this,t.emits),expose:Nn(this)},this.mountLifecycle=sn(()=>this.mountElement())}connectedCallback(){this.mountLifecycle.connect()}disconnectedCallback(){vt(this)||this.mountLifecycle.disconnect()}mountElement(){var e,r;let i=(e=t.shadow)==null?!1:e,a=i?`shadow`:`light`;a===`light`&&!this.capturedLightChildren&&(this.lightChildren=Array.from(this.childNodes),this.capturedLightChildren=!0);let o=a===`light`?mn(this,this.lightChildren):void 0,s=Y();for(let e of(r=t.consumes)==null?[]:r){let t=Pt(this,e);t.found?s.provides.set(e.id,t.value):e.hasDefaultValue&&s.provides.set(e.id,e.defaultValue)}let c=this.resolveRenderTarget(i),l={host:this,mode:a,lightChildren:this.lightChildren,projection:o},u=Lt(()=>X(s,()=>Et(l,()=>(kn(this.props,this.setupContext,t.form),n(this.props,this.setupContext)))),c,{owner:s});return In(c,t.styles),o==null||o.connect(),{dispose(){o==null||o.disconnect(),u()}}}formAssociatedCallback(e){var n,r;(n=t.form)==null||(r=n.associated)==null||r.call(n,e,this.props,this.setupContext)}formDisabledCallback(e){var n,r;(n=t.form)==null||(r=n.disabled)==null||r.call(n,e,this.props,this.setupContext)}formResetCallback(){var e,n;(e=t.form)==null||(n=e.reset)==null||n.call(e,this.props,this.setupContext)}formStateRestoreCallback(e,n){var r,i;(r=t.form)==null||(i=r.stateRestore)==null||i.call(r,e,n,this.props,this.setupContext)}attributeChangedCallback(e,t,n){if(t===n||this.reflectingAttrs.has(e))return;let r=i.find(t=>t.attrName===e);r&&(this.attributeProps.add(r.name),this.propStore.set(r.name,an(r,n)))}resolveRenderTarget(e){return this.target?this.target:e?(this.target=this.attachShadow(typeof e==`object`?e:{mode:`open`}),this.target):(this.target=this,this.target)}_writePropFromProperty(e,t){let n=i.find(t=>t.name===e);this.attributeProps.delete(e),this.propStore.set(e,t),n!=null&&n.reflect&&on(this,n,t,this.reflectingAttrs)}}return s.formAssociated=!!t.formAssociated,customElements.get(e)||customElements.define(e,s),Object.defineProperty(s,xn,{value:a,configurable:!1}),s}function En(e){return Object.keys(e).map(t=>{let n=String(t),r=e[t];if(typeof r==`function`){let e=r;return{name:n,attrName:Pn(e)?Ln(n):!1,type:Fn(e),reflect:!1,reactivity:`deep`}}let i=r==null?void 0:r.type,a=Pn(i)?Ln(n):!1;return{name:n,attrName:(r==null?void 0:r.attr)===void 0?a:r.attr,type:Fn(i),reflect:!!(r!=null&&r.reflect),reactivity:(r==null?void 0:r.reactivity)===`shallow`?`shallow`:`deep`,default:r==null?void 0:r.default,serialize:r==null?void 0:r.serialize,deserialize:r==null?void 0:r.deserialize}})}function Dn(e,t){for(let n of t){if(!(`default`in n))continue;let t=typeof n.default==`function`?n.default():n.default;e.set(n.name,t)}}function On(e,t,n){for(let r of n){let n=r.name,i=Object.prototype.hasOwnProperty.call(e,n),a=i?e[n]:void 0;i&&delete e[n];let o=Object.getOwnPropertyDescriptor(e,n);o&&o.configurable===!1||(Object.defineProperty(e,n,{configurable:!0,enumerable:!0,get(){return t.get(n)},set(t){e._writePropFromProperty(n,t)}}),i&&e._writePropFromProperty(n,a))}}function kn(e,t,n){let r=n==null?void 0:n.value,i=n==null?void 0:n.state;!t.internals||r===void 0||fe(()=>{let n=An(e,r),a=i===void 0?void 0:An(e,i);t.internals.setFormValue(n,a)})}function An(e,t){if(typeof t==`function`){var n;return(n=t(e))==null?null:n}let r=e[t];return r==null?null:r}function jn(e){let t=e.attachInternals;if(typeof t==`function`)try{return t.call(e)}catch(e){return}}function Mn(e,t){let n={},r=(n,r,i)=>{var a,o,s,c,l,u,d;let f=t==null?void 0:t[n];return e.dispatchEvent(new CustomEvent((a=f==null?void 0:f.name)==null?Ln(n):a,{bubbles:(o=(s=i==null?void 0:i.bubbles)==null?f==null?void 0:f.bubbles:s)==null?!0:o,composed:(c=(l=i==null?void 0:i.composed)==null?f==null?void 0:f.composed:l)==null?!0:c,cancelable:(u=(d=i==null?void 0:i.cancelable)==null?f==null?void 0:f.cancelable:d)==null?!1:u,detail:r}))};if(t)for(let e of Object.keys(t))Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value(t,n){return r(e,t,n)}});return n}function Nn(e){return t=>{for(let n of Object.keys(t))Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value:t[n]})}}function Pn(e){return e===String||e===Number||e===Boolean}function Fn(e){return e===String?`string`:e===Number?`number`:e===Boolean?`boolean`:e===Object?`object`:e===Array?`array`:e===Function?`function`:`unknown`}function In(e,t){if(!t)return;let n=Array.isArray(t)?t:[t];for(let t of n){let n=document.createElement(`style`);n.textContent=t,e.appendChild(n)}}function Ln(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function Rn(e,t){if(e!=null){if(typeof e==`function`){e(t);return}if(`value`in e){e.value=t;return}if(`current`in e){e.current=t;return}}}function zn(e,t){Rn(t,e),ie()&&h(()=>{Rn(t,null)},!0)}let Bn=new Set([`children`,`ref`,`class`,`className`,`style`,`_elements`]);function Vn(e){let t=Tt();return t&&Un(t.host,e),Yn(e.children)}function Hn(e){return pn(e.name,()=>Yn(e.children))}function Un(e,t){Wn(e,t),Gn(e,t),Kn(e,t),qn(e,t),`_elements`in t&&Jn(e,t)}function Wn(e,t){`ref`in t&&zn(e,t.ref)}function Gn(e,t){if(!(`class`in t)&&!(`className`in t))return;let n=t.className===void 0?t.class:t.className;Kt(e,()=>$(n))}function Kn(e,t){`style`in t&&Jt(e,()=>$(t.style))}function qn(e,t){for(let n of Object.keys(t)){if(Bn.has(n)||Xn(n))continue;let r=t[n];Q(e,Zn(n),()=>$(r))}}function Jn(e,t){let n=t._elements;for(let e of Object.keys(n)){let r=n[e],i=r();if(i)for(let e of Object.keys(t)){if(Bn.has(e)||Xn(e))continue;let n=t[e];Q(i,Zn(e),()=>$(n))}}}function $(e){return typeof e==`function`?e():e}function Yn(e){return typeof e==`function`?e():e}function Xn(e){return/^on[A-Z]/.test(e)||e.startsWith(`on:`)}function Zn(e){switch(e){case`className`:return`class`;case`htmlFor`:return`for`;case`tabIndex`:return`tabindex`;case`readOnly`:return`readonly`;default:return e}}let Qn=Symbol.for(`zeus.fragment`);function $n(e,t){if(e===Qn)return t==null?void 0:t.children;if(typeof e==`function`)return Qt(e,t==null?{}:t);if(typeof e!=`string`)return null;let n=document.createElement(e);if(t){let e=t.children;for(let e of Object.keys(t)){if(e===`children`)continue;let r=t[e];if(e.startsWith(`on`)&&typeof r==`function`)n.addEventListener(e.slice(2).toLowerCase(),r);else if(e===`ref`)er(r,n);else if(e.startsWith(`prop:`)){let t=e.slice(5);typeof r==`function`?Gt(n,t,r):n[t]=r}else typeof r==`function`?Q(n,e,r):r!=null&&r!==!1&&n.setAttribute(e===`className`?`class`:e,String(r))}e!==void 0&&q(n,e)}return n}function er(e,t){e!=null&&(typeof e==`function`?e(t):typeof e==`object`&&(`value`in e?e.value=t:`current`in e&&(e.current=t)))}return e.For=tn,e.Fragment=Qn,e.Host=Vn,e.Show=$t,e.Slot=Hn,e.batch=ve,e.createContext=Dt,e.createEffect=dt,e.createMemo=ut,e.createRoot=ft,e.createSignal=lt,e.defineElement=Tn,e.event=Cn,e.inject=kt,e.jsx=$n,e.jsxDEV=$n,e.jsxs=$n,e.onCleanup=Oe,e.prop=Sn,e.provide=Ot,e.render=Lt,e.useContext=At,e})({});
|
package/dist/zeus.prod.cjs
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeus-js/zeus",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.1-beta.
|
|
4
|
+
"version": "0.1.1-beta.12",
|
|
5
5
|
"description": "@zeus-js/zeus",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -65,9 +65,9 @@
|
|
|
65
65
|
"src/jsx.d.ts"
|
|
66
66
|
],
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@zeus-js/signal": "0.1.1-beta.
|
|
69
|
-
"@zeus-js/runtime-dom": "0.1.1-beta.
|
|
70
|
-
"@zeus-js/runtime-ssr": "0.1.1-beta.
|
|
68
|
+
"@zeus-js/signal": "0.1.1-beta.12",
|
|
69
|
+
"@zeus-js/runtime-dom": "0.1.1-beta.12",
|
|
70
|
+
"@zeus-js/runtime-ssr": "0.1.1-beta.12"
|
|
71
71
|
},
|
|
72
72
|
"author": "Baicie",
|
|
73
73
|
"bugs": {
|