compelem 0.26.5 → 0.27.0
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/CompElem.d.ts +1 -0
- package/IComponent.d.ts +11 -0
- package/README.md +26 -1
- package/index.d.ts +1 -0
- package/index.js +2 -2
- package/package.json +2 -1
- package/reactive.d.ts +5 -4
package/CompElem.d.ts
CHANGED
|
@@ -77,6 +77,7 @@ export declare class CompElem<T = HTMLElement> extends HTMLElement implements IC
|
|
|
77
77
|
* @returns
|
|
78
78
|
*/
|
|
79
79
|
_notify(nv: any | undefined, ov: any, chain: string[], subNewValue?: any, subOldValue?: any): void;
|
|
80
|
+
requestUpdate(nv: any, ov: any, chain: string[], subNewValue?: any, subOldValue?: any): void;
|
|
80
81
|
updateProps(props: Record<string, any>, force?: boolean): void;
|
|
81
82
|
_initProps(props: Record<string, any>, attrs?: Record<string, any>): void;
|
|
82
83
|
/**
|
package/IComponent.d.ts
CHANGED
|
@@ -42,11 +42,22 @@ export interface IComponent<T = HTMLElement> {
|
|
|
42
42
|
* @param args 自定义参数
|
|
43
43
|
*/
|
|
44
44
|
emit(evName: string, arg: Record<string, any>, event?: Event): void;
|
|
45
|
+
/**
|
|
46
|
+
* 创建下一帧执行的逻辑
|
|
47
|
+
* @param cbk
|
|
48
|
+
*/
|
|
45
49
|
nextTick(cbk: () => void): void;
|
|
46
50
|
/**
|
|
47
51
|
* 强制更新视图
|
|
48
52
|
*/
|
|
49
53
|
forceUpdate(): void;
|
|
54
|
+
/**
|
|
55
|
+
* 请求指定路径更新
|
|
56
|
+
* @param nv new value
|
|
57
|
+
* @param ov old value
|
|
58
|
+
* @param chain path segment
|
|
59
|
+
*/
|
|
60
|
+
requestUpdate(nv: any, ov: any, chain: string[], subNewValue?: any, subOldValue?: any): void;
|
|
50
61
|
/**
|
|
51
62
|
* 向组件插入样式表,没有shadowDOM的组件调用无效
|
|
52
63
|
* @param sheet
|
package/README.md
CHANGED
|
@@ -504,6 +504,31 @@ class CustomButton{
|
|
|
504
504
|
}
|
|
505
505
|
```
|
|
506
506
|
|
|
507
|
+
## 全局注入
|
|
508
|
+
### 样式
|
|
509
|
+
对于依赖外部样式表或第三方样式库如 TailwindCSS 可通过`setDefaults`接口进行注入
|
|
510
|
+
```ts
|
|
511
|
+
//main.ts
|
|
512
|
+
import tailwindStyle from "./tailwind.css?inline";
|
|
513
|
+
...
|
|
514
|
+
setDefaults({
|
|
515
|
+
css: [tailwindStyle]
|
|
516
|
+
});
|
|
517
|
+
```
|
|
518
|
+
然后就可以在组件中直接使用样式名书写
|
|
519
|
+
```ts
|
|
520
|
+
return h`
|
|
521
|
+
<button
|
|
522
|
+
class="
|
|
523
|
+
inline-flex items-center justify-center
|
|
524
|
+
font-medium rounded-md" ...>
|
|
525
|
+
...
|
|
526
|
+
</button>
|
|
527
|
+
`
|
|
528
|
+
```
|
|
529
|
+
|
|
530
|
+
|
|
507
531
|
## 扩展
|
|
508
532
|
- [VSCode](https://marketplace.visualstudio.com/items?itemName=holyhigh2.compelem-vscode) - 为h函数和css片段提供语法加亮/智能提示/诊断等功能
|
|
509
|
-
- [Vite](https://www.npmjs.com/package/vite-plugin-compelem-css) - 用于在导入scss/css文件时直接转换为CssTemplate
|
|
533
|
+
- [Vite-css](https://www.npmjs.com/package/vite-plugin-compelem-css) - 用于在导入scss/css文件时直接转换为CssTemplate
|
|
534
|
+
- [Vite-comments](https://www.npmjs.com/package/vite-plugin-compelem-strip-comments) - 用于支持h``模板中的html注释
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createRef, css, h } from "./render/render";
|
|
2
2
|
import { Template } from './render/Template';
|
|
3
|
+
export { reactive as createReactiveState, getCurrentRenderComponent } from "./reactive";
|
|
3
4
|
export * from "./decorator/Decorator";
|
|
4
5
|
export * from "./decorator/index";
|
|
5
6
|
export * from "./decorators/computed";
|
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* compelem v0.
|
|
2
|
+
* compelem v0.27.0.1788539994
|
|
3
3
|
* A modern, reactive, fast, lightweight and flexible lib for building web components
|
|
4
4
|
* @holyhigh2
|
|
5
5
|
* git+https://github.com/holyhigh2/compelem.git
|
|
6
6
|
*/
|
|
7
|
-
import t,{some as e,isString as n,isUndefined as r,isBlank as s,assign as o,kebabCase as i,camelCase as a,isArray as l,each as c,flatMap as u,test as h,isObject as d,isFunction as p,isSymbol as f,concat as g,startsWith as m,get as _,toArray as w,defaults as y,merge as v,clone as E,has as b,set as S,closest as N,remove as T,size as M,includes as C,noop as k,isEmpty as R,find as x,debounce as A,throttle as P,once as I,map as O,first as L,walkTree as V,filter as D,isNil as W,isNull as H,isDefined as U,trim as j,isBoolean as K,parseJSON as B,cloneDeep as F,keys as $,groupBy as z,last as G,reject as X,compact as q,initial as Q,except as Z,toString as J,reduce as Y,snakeCase as tt,range as et,replace as nt,bind as rt,isPlainObject as st,isNumeric as ot,isNumber as it,isElement as at,toPath as lt,split as ct,findIndex as ut,join as ht}from"myfx";const dt="default",pt=/\s+\.?key\s*=/;var ft,gt;!function(t){t[t.RENDER=1]="RENDER",t[t.COMPUTED=2]="COMPUTED",t[t.DIRECTIVE=3]="DIRECTIVE"}(ft||(ft={})),function(t){t.Prod="prod",t.Dev="dev"}(gt||(gt={}));const mt={boolean:Boolean,string:String,number:Number,object:Object,array:Array,function:Function,undefined:Object},_t=new Map,wt=new WeakMap,yt={},vt={},Et=new WeakMap,bt=new WeakMap,St=new WeakMap,Nt=new WeakMap,Tt=new Map,Mt=new Map,Ct=new Map,kt=new WeakMap,Rt=new WeakMap,xt=new WeakMap,At=new WeakMap,Pt=new WeakMap,It=new WeakMap,Ot=new WeakMap,Lt=new WeakMap,Vt=new WeakMap,Dt=new WeakMap,Wt=new WeakMap,Ht=new WeakMap,Ut=new WeakMap,jt=new WeakMap,Kt=new WeakMap,Bt=new WeakMap,Ft=new WeakMap,$t=new WeakMap,zt=new Map,Gt=new WeakMap,Xt=new WeakMap,qt=new WeakMap,Qt=new WeakMap,Zt="__data_",Jt="⟬Ċ⟭";class Yt{strings;vars;cssText;constructor(t,e){this.strings=t,this.vars=e}getCssText(){if(this.cssText)return this.cssText;let t="",e=this.strings.length-1;for(let n=0;n<=e;n++){const e=this.strings[n];let r=this.vars[n]??"";r instanceof Yt&&(r=r.getCssText()),t=t+e+r}return this.cssText=t,t}}function te(t){console.error("[CompElem]",t)}function ee(t,e){console.error(`[CompElem <${t}>]`,e)}function ne(...t){console.warn("[CompElem]",...t)}function re(t,e){console.warn(`[CompElem <${t}>]`,e)}function se(t){return Object.getPrototypeOf(t)}function oe(t){return t===Boolean||e(t,(t=>t===Boolean))}function ie(t){let e=t;return n(t)&&/(?:^true$)|(?:^false$)/.test(e)?e="true"===e:(r(e)||s(e))&&(e=!0),e}const ae={getNodes(t,e){let n=t.nextSibling;if(!e)return[n];let r=[];for(;n&&n!==e;)r.push(n),n=n?.nextSibling;return r},insertBefore:function(t,e){if(!t.parentNode)return;let n=document.createDocumentFragment();n.append(...e),t.parentNode.insertBefore(n,t)},remove:function(t,e){if(t===e)return void t?.parentNode?.removeChild(t);let n=t.nextSibling;for(;n&&n!==e;)n?.parentNode?.removeChild(n),n=t.nextSibling},clear(t){if(!t)return;let e=[],n=t=>{let r=t.childNodes;for(let t=0,s=r.length;t<s;t++){let s=r[t];s.nodeType===Node.ELEMENT_NODE&&(s instanceof Rn&&e.push(s),n(s))}};n(t);for(let t=0,n=e.length;t<n;t++)e[t].destroy()}};function le(t){return!!vt[t.tagName?.toLowerCase()]}function ce(t,e,n){let r=Xt.get(t);r||(r=new Map,Xt.set(t,r));let s=r.get(e)??{};r.set(e,o(s,n))}function ue(t,e){let n=$t.get(t);n||(n=new Map,$t.set(t,n));let r=n.get(e);return void 0===r&&(r="--"+i(e).replace(/^-+/,""),n.set(e,r)),r}const he=new Map;function de(t){let e=he.get(t);return void 0!==e||(he.size>1024&&he.clear(),e=a(t),he.set(t,e)),e}const pe=new WeakMap;function fe(t){let e=pe.get(t);return void 0===e&&(e=(t.name||"").toLowerCase(),pe.set(t,e)),e}var ge;function me(...t){return(e,n,r)=>{let s=r.get();return(l(s)?s:[s]).forEach((n=>{let r;if(n instanceof Yt){if(r=Kt.get(n.strings),!r){let t=n.getCssText();r=new CSSStyleSheet,r.replaceSync(t),Kt.set(n.strings,r)}}else n instanceof CSSStyleSheet&&(r=n);if(!r)return;let s=Bt.get(e);s||(s=new Map,Bt.set(e,s)),c(t,(t=>{if(t===ge.GLOBAL)return void(document.adoptedStyleSheets.includes(r)||(document.adoptedStyleSheets=[...document.adoptedStyleSheets,r]));let e=s.get(t);e||(e=[],s.set(t,e)),e.push(r)}))})),r}}!function(t){t.INNER="inner",t.HOST="host",t.GLOBAL="global"}(ge||(ge={}));let _e=[],we={},ye={};function ve(t){_e=u(t.css,(t=>{if(n(t)){let e=new CSSStyleSheet;return e.replaceSync(t),e}return t instanceof CSSStyleSheet?t:[]})),we=t.global,c(t,((t,e)=>{h(e[0],/[A-Z]/)&&(ye[e]=t)})),Ee.clear()}const Ee=new Map;function be(t){let e=Ee.get(t);return e||(e=[...Se(),...Bt.get(t)?.get(ge.INNER)??[]],Ee.set(t,e)),e}const Se=()=>_e,Ne=()=>we,Te=()=>ye;function Me(t,e){let n=e,r=Reflect.get(n[Zt],t);if(Pe.__collecting&&Pe.__varPathList.push(t),null===r||"object"!=typeof r&&"function"!=typeof r)return r;let s=Le.get(r);if(s||Ve.get(r)){let o=De.get(r);o||(o=new Set,De.set(r,o));let i=s??r;if(Ve.get(i)?.deref()!==e){let n=Ie.get(e);n||(n={},Ie.set(e,n));let r=Oe.get(i);r&&(n[r[0]]=t)}return o.add(n.__thisRef),i}if(d(r)&&!p(r)&&!(r instanceof Node)&&!Object.isFrozen(r)){let e=Lt.get(n.constructor),s=e?.has(t);s||(e=Vt.get(n.constructor),s=e?.has(t)),r=s||"slots"===t?r:We(r,n,t)}return r}function Ce(t,e,n){let r=n;if(!r.__inited)return void Reflect.set(r[Zt],t,e);let s=r[Zt][t],o=Dt.get(r.constructor),i=o?.get(t),a=Le.get(s);if(i){if(!i.call(r,e,s,[t],e,s))return!0}else{if(Object.is(s,e))return!0;if(d(e)&&a===e)return!0}Reflect.set(r[Zt],t,e),Ue(n,e,s,[t])}function ke(t,e,n,r,s,o){let i=function(t){let e=Ot.get(t);if(void 0!==e)return e;let n=Object.getPrototypeOf(t),r=xt.get(t)??xt.get(n);return e=r?{rootMap:r,watchKeysDeep:Rt.get(t)??Rt.get(n),watchDeepUpdateMap:Pt.get(t)??Pt.get(n),watchUpdateMap:At.get(t)??At.get(n),onceMap:kt.get(t)??kt.get(n)}:null,Ot.set(t,e),e}(t.constructor);if(!i)return;let{rootMap:a,watchKeysDeep:l,watchDeepUpdateMap:c,watchUpdateMap:u,onceMap:h}=i,d=r.split(".")[0],p=a?.get(d);p?.forEach((i=>{(r===i||m(i,r+".")&&!Object.is(_(t._getPrivateData(),i),_(e,i))||m(r,i+".")&&l?.includes(i)&&!Object.is(_(t._getPrivateData(),i),_(e,i)))&&g(w(u[i]),w(c[i])).forEach((a=>{a&&!0!==h.get(i)&&(t._watchUpdateArgsInNextTick?.set(a,{newValue:e,oldValue:n,chain:r.split("."),rootObjNew:s,rootObjOld:o,fullMatch:i===r}),t._watchUpdateSetInNextTick?.add(a),h.has(i)&&h.set(i,!0))}))}))}function Re(t,e){let n=Ht.get(t.constructor);n?.has(e)&&n.get(e)?.forEach((e=>{t._computedUpdateSetInNextTick.add(e)}))}function xe(t,e){let n=Ut.get(t.constructor);if(!n)return;let r=e.split("."),s="";r.forEach((e=>{s=s?s+"."+e:e,n.has(s)&&(t._cssUpdateInNextTick=!0)}))}const Ae=new Set,Pe={popDirectiveQ(){let t=[],e=this.__varPathList;for(let n=0;n<e.length;n++){let r=e[n];Ae.has(r)||(Ae.add(r),t.push(r))}return Ae.clear(),t},start(){this.__collecting=!0,this.__varPathList=[]},end(t,e){t&&e&&t._regSubViewDeps(Pe.popVarPathList(),e),this.__collecting=!1},popVarPathList(){let t=Array.from(new Set(this.__varPathList));return this.__varPathList=[],t},__varPathList:[],__collecting:!1},Ie=new WeakMap,Oe=new WeakMap,Le=new WeakMap,Ve=new WeakMap,De=new WeakMap;function We(t,n,r){if(Le.has(t))return Le.get(t);if(Ve.has(t)){if(r){let r=De.get(t);r||(r=new Set,De.set(t,r)),e(r.values(),(t=>t.deref()===n))||r.add(new WeakRef(n))}return t}const s=new Proxy(t,{get(t,e,r){if(!e)return;const s=Reflect.get(t,e,r);if(f(e))return s;const o=l(t);if(p(s))return s;if("length"===e&&o)return s;if(95===e.charCodeAt(0)&&95===e.charCodeAt(1))return s;let i=Oe.get(r);if(Pe.__collecting){let t=i?g(i):[];t.push(e),Pe.__varPathList.push(t.join("."))}if(null!==s&&"object"==typeof s&&Le.has(s))return Le.get(s);let a=s;if(d(s)&&!p(s)&&!(s instanceof Node)&&!Object.isFrozen(s)){let t=i?g(i):[];a=We(s,n),t.push(e),Oe.set(a,t),Le.set(s,a)}return a},set(t,e,r,s){if(!e)return!1;let o=t[e],i=Oe.get(s)??[],a=g(i,[e]),l=Dt.get(n.constructor),c=l?.get(a[0]),u=a.length>1,h=r,d=o;if(u&&(d=h=n._getPrivateData()[a[0]]),c){if(!c.call(n,h,d,a,r,o))return!0}else if(Object.is(o,r))return!0;let p=r,f=Reflect.set(t,e,p);Ue(n,p,o,a);let m=De.get(s),_=[];return m?.forEach((t=>{let e=t.deref();if(!e)return;if(e===n)return;if(e.isDestroyed)return void _.push(t);let r=(Ie.get(e)??{})[a[0]];if(void 0===r)return;let s=a.join(".");s=s.replace(a[0],r),Ue(e,p,o,s.split("."),h,d)})),_.forEach((t=>{let e=t.deref();Ie.delete(e),m.delete(t)})),f}});return Oe.has(s)||Oe.set(s,r?[r]:[]),Le.set(t,s),r&&Ve.set(s,new WeakRef(n)),s}function He(t,e,n,r){let s=r.join(".");ke(t,e,n,s,e,n),Re(t,s),xe(t,s)}function Ue(t,e,n,r,s,o){s=s??e,o=o??n,r.length>1&&(o=s=t._getPrivateData()[r[0]]);let i=r.join(".");ke(t,e,n,i,s,o),Re(t,i),xe(t,i),function(t,e,n,r){t._notify(e,n,r)}(t,s,o,r)}class je{static nextSet=new Set;static nextPending=!1;static next;static flush(){je.nextPending=!1;let t=Array.from(je.nextSet);je.nextSet.clear(),t.forEach((t=>t())),t=null}static pushNext(t){je.nextSet.add(t),je.nextPending||(je.nextPending=!0,je.next())}}function Ke(t){if(1===arguments.length)return(e,n,r)=>{t.required=t.required||!1,t.attribute=!1!==t.attribute,Be(e,n,t)};let e=arguments[0],n=arguments[1],r=arguments[2];t={type:void 0,required:!1,attribute:!0},r&&"function"==typeof r.type&&(t=y(r,t),r=void 0),t.shallow=t.shallow||!1,Be(e,n,t)}function Be(t,e,n,r){let s;if(!St.has(t.constructor)){const e={};let n=t.constructor;for(;(n=se(n))!==Rn;)v(e,E(St.get(n)??{}));s=new Set,c(e,((t,e)=>{if(t.attribute){let t=i(e);s?.add(t)}})),Mt.set(t.constructor,s),St.set(t.constructor,e)}if(n.attribute){s||(s=Mt.get(t.constructor));let n=i(e);s?.add(n)}if(n.model){let n=Nt.get(t.constructor);n||(n=[],Nt.set(t.constructor,n)),n.includes(e)||n.push(e)}if(b(t.constructor,"observedAttributes")||(t.constructor.observedAttributes=[]),s&&(t.constructor.observedAttributes=w(s)),S(St.get(t.constructor),e,n),n.hasChanged){let r=Dt.get(t.constructor);r||(r=new Map,Dt.set(t.constructor,r)),r.set(e,n.hasChanged)}if(n.shallow){let n=Vt.get(t.constructor);n||(n=new Set,Vt.set(t.constructor,n)),n.add(e)}Reflect.defineProperty(t,e,{get(){return Me(e,this)},set(n){Nt.get(t.constructor)?.includes(e)&&function(t,e,n){n.emit("update:"+t,{value:e})}(e,n,this)}})}(()=>{const t=Promise.resolve(),e=je.flush;je.next=()=>{t.then(e)}})();const Fe=new Set;function $e(t){return Mt.get(t)??Mt.get(se(t))??Fe}const ze=["resize","outside","mutate"],Ge=new WeakMap,Xe=[],qe=[],Qe=[],Ze=new WeakSet,Je="undefined"!=typeof ResizeObserver?new ResizeObserver((t=>{for(const e of t){const t=Array.isArray(e.contentBoxSize)?e.contentBoxSize[0]:e.contentBoxSize,n=Array.isArray(e.borderBoxSize)?e.borderBoxSize[0]:e.borderBoxSize;if(!Ze.has(e.target)){Ze.add(e.target);continue}let r=Ge.get(e.target);r&&r.forEach((r=>{r({target:e.target,contentBoxSize:t,borderBoxSize:n,type:"resize"})}))}})):void 0;var Ye;!function(t){t.Child="child",t.Tree="tree",t.Attr="attr",t.Char="char"}(Ye||(Ye={}));const tn=new WeakMap,en="undefined"!=typeof MutationObserver?new MutationObserver((t=>{for(let e=0;e<t.length;e++){const n=t[e];let r=tn.get(n.target);if(!r)return;let s={target:n.target},o=null;switch(n.type){case"subtree":s.type=Ye.Tree,o=r[Ye.Tree];break;case"childList":s.type=Ye.Child,s.addedNodes=n.addedNodes,s.removedNodes=n.removedNodes,o=r[Ye.Child];break;case"attributes":s.type=Ye.Attr,s.attributeName=n.attributeName,s.oldValue=n.oldValue,o=r[Ye.Attr];break;case"characterData":s.type=Ye.Char,s.oldValue=n.oldValue,o=r[Ye.Char]}o&&(s.type="mutate",o(s))}})):void 0;function nn(e,n,r,s,o,i){if("resize"===e)return function(t,e,n,r){if(!Je)return;let s=Ge.get(t);s||(s=[],Ge.set(t,s));let o=Je;if(r){let n=e;e=(...r)=>{n(...r),T(s,(t=>t===e)),M(s)<1&&(o.unobserve(t),Ge.delete(t))}}return s.push(e),Je.observe(t),(n=!1)=>{T(s,(t=>t===e)),M(s)<1&&(o.unobserve(t),Ge.delete(t),n&&(o=t=null))}}(n,r,0,i);if("outside"===e)switch(s[0]){case"mousedown":return function(e,n){return Xe.push([e,n]),(r=!1)=>{t.remove(Xe,(t=>t[0]===e&&t[1]===n))}}(n,r);case"dblclick":return function(e,n){return Qe.push([e,n]),(r=!1)=>{t.remove(Qe,(t=>t[0]===e&&t[1]===n))}}(n,r);default:return function(e,n){return qe.push([e,n]),(r=!1)=>{t.remove(qe,(t=>t[0]===e&&t[1]===n))}}(n,r)}else if("mutate"===e)return function(t,e,n){if(!en)return;let r=C(n,"child"),s=C(n,"attr"),o=C(n,"char"),i=C(n,"tree"),a=tn.get(t);return a?void 0:(a={},tn.set(t,a),r&&(a[Ye.Child]=e),s&&(a[Ye.Attr]=e),o&&(a[Ye.Char]=e),i&&(a[Ye.Tree]=e),en.observe(t,{childList:r,attributes:s,characterData:o,subtree:i}),(e=!1)=>{tn.delete(t),e&&(t=null)})}(n,r,s)}"undefined"!=typeof document&&(document.addEventListener("mousedown",(t=>{let e=_(t.composedPath(),0,t.target);Xe.forEach((([n,r])=>{n.contains(e)||n.contains(N(e,(t=>t instanceof ShadowRoot),"parentNode")?.host)||r({type:"outside",target:n,modifier:"mousedown",event:t})}))}),!1),document.addEventListener("click",(t=>{let e=_(t.composedPath(),0,t.target);qe.forEach((([n,r])=>{n.contains(e)||n.contains(N(e,(t=>t instanceof ShadowRoot),"parentNode")?.host)||r({type:"outside",target:n,modifier:"click",event:t})}))}),!1),document.addEventListener("dblclick",(t=>{let e=_(t.composedPath(),0,t.target);Qe.forEach((([n,r])=>{n.contains(e)||n.contains(N(e,(t=>t instanceof ShadowRoot),"parentNode")?.host)||r({type:"outside",target:n,modifier:"dblclick",event:t})}))}),!1));const rn=/,|^(debounce:.+)|(debounce$)/,sn=/,|^(throttle:.+)|(throttle$)/,on="once",an={esc:"escape"},ln=()=>{},cn=new WeakMap;function un(t){let e=cn.get(t);return void 0===e&&(e=_(globalThis,t.name)!==t,cn.set(t,e)),e}function hn(t,e){let n,r=t??ln;if(n=x(e,(t=>rn.test(t)))){let t=n.split(":");r=A(r,parseInt(t[1])||100)}if(n=x(e,(t=>sn.test(t)))){let t=n.split(":");r=P(r,parseInt(t[1])||100)}return e.includes(on)&&(r=I(r)),r}function dn(t,e,n=!1){return function(t,e,n=!1){let r=e.includes("capture")||!1,s=e.includes("passive")||!1;return{handler:r=>{if(e.includes("prevent")&&r.preventDefault(),e.includes("stop")&&r.stopPropagation(),n||!e.includes("self")||r.target===r.currentTarget){if(r instanceof MouseEvent){if(e.includes("left")&&0!=r.button)return;if(e.includes("right")&&2!=r.button)return;if(e.includes("middle")&&1!=r.button)return}else if(r instanceof KeyboardEvent){let t=e.slice();if(T(t,(t=>"ctrl"==t))[0]&&!r.ctrlKey)return;if(T(t,(t=>"alt"==t))[0]&&!r.altKey)return;if(T(t,(t=>"shift"==t))[0]&&!r.shiftKey)return;if(T(t,(t=>"meta"==t))[0]&&!r.metaKey)return;let n=O(t,(t=>an[t]||t));if(M(n)>0&&!n.includes(r.key.toLowerCase()))return}t(r)}},options:{capture:r,once:e.includes(on)||!1,passive:s}}}(hn(t,e),e,n)}function pn(t,e,n,r){let s=_(t,"__c_emit_event_")??e._subComponentEventSn++;S(t,"__c_emit_event_",s);let o=e._subComponentEventMap.get(s);o||(o={},e._subComponentEventMap.set(s,o)),o[n]=r}const fn=new Set(["focus","blur","visibilitychange","wheel"]),gn=new Set(["mouseenter","mouseleave","pointerenter","pointerleave"]),mn=new Set(["load","error","abort","play","pause","playing","waiting","canplay","canplaythrough","loadedmetadata","loadeddata","ended","timeupdate","volumechange","seeking","seeked","progress","stalled","suspend","emptied","ratechange","durationchange","loadstart","transitionstart","transitionrun","transitionend","transitioncancel","animationstart","animationend","animationcancel","animationiteration","scroll","slotchange"]),_n=new WeakMap;function wn(t){let e=_n.get(t);return e||(e={bindList:[],docoEventMap:new Map,handlerMap:new WeakMap,releaseList:[],delegationKeySet:new Set,abortController:void 0,dispatch:e=>function(t,e){let n=t.renderRoot;if(!n)return;let r=e.type;const s=e.composedPath();let o=s.indexOf(n);if(o<0)return;let i=wn(t);t:for(let t=0;t<=o;t++){const n=s[t];if(!(n instanceof HTMLElement))continue;let o=i.handlerMap.get(n)?.get(r);if(!R(o))for(let t=0;t<o.length;t++){let s=o[t];if((!s.parts.includes("self")||e.target===n)&&(s.parts.includes("once")&&(o.splice(t,1),t--,o.length<1&&i.handlerMap.get(n)?.delete(r)),s.handler(e),s.parts.includes("stop")))break t}}}(t,e)},_n.set(t,e)),e}function yn(t){return wn(t).bindList}function vn(t){let e=wn(t);e.abortController||(e.abortController=new AbortController)}function En(t){let e=wn(t);const n=e.bindList;if(n.length>0){e.bindList=[];for(let e=0;e<n.length;e++){let r=n[e],s=r[0],o=r[1],i=r[2];if(!i)continue;if(r[3])continue;let a=o&&un(o)?o.bind(t):o;bn(t,s,a,i),r[3]=k}}let r=_t.get(t.constructor)??_t.get(se(t.constructor));r&&M(r)>0&&c(r,(({name:n,targetFn:r,fnName:s})=>{let o=n+"@"+s;if(e.docoEventMap.has(o))return;let i=r?r(t):t,a=_(t,s),l=a&&un(a)?a.bind(t):a;bn(t,n,l,i),e.docoEventMap.set(o,l)}))}function bn(t,e,n,r){let{evName:s,parts:o}=function(t){let e=t.split(".");return{evName:e.shift(),parts:e}}(e);if(r instanceof Element){let e=vt[r.tagName?.toLowerCase()];if(e){let i=function(t,e){let n=t;for(;n&&n!==Rn;){let t=wt.get(n);if(t){if(t.has(e))return!0;for(let n of t)if(n.endsWith(":*")&&e.startsWith(n.slice(0,-1)))return!0}n=se(n)}return!1}(e,s);if(i)return void pn(r,t,s,hn(n,o))}}if(function(t){return ze.includes(t)}(s)){let e=nn(s,r,hn(n,o),o,0,o.includes("once"));return void(e&&wn(t).releaseList.push(e))}let i=function(t,e){if(!(e instanceof Element))return!1;let n=t.renderRoot;return!!n&&(e===n||n.contains(e))}(t,r)&&!mn.has(s)&&!gn.has(s);if(i){let e=o.includes("capture")||fn.has(s);!function(t,e,n,r,s,o){if(!function(t,e,n){let r=t.renderRoot;if(!r)return!1;vn(t);let s=wn(t),o=(n?"c:":"b:")+e;return s.delegationKeySet.has(o)||(r.addEventListener(e,s.dispatch,{capture:n,signal:s.abortController.signal}),s.delegationKeySet.add(o)),!0}(t,e,o))return void Sn(t,e,n,r,s);let{handler:i}=dn(n,r,!0),a=wn(t),l=a.handlerMap.get(s);l||(l=new Map,a.handlerMap.set(s,l));let c=l.get(e);c||(c=[],l.set(e,c));c.push({handler:i,parts:r})}(t,s,n,o,r,e)}else Sn(t,s,n,o,r)}function Sn(t,e,n,r,s){vn(t);let{handler:o,options:i}=dn(n,r);s.addEventListener(e,o,{capture:i.capture,once:i.once,passive:i.passive,signal:wn(t).abortController.signal})}let Nn=0;const Tn=new WeakMap,Mn={},Cn="slots",kn={};class Rn extends HTMLElement{#t;#e={};__data_={};#n={};#r;__updateTree;__updateSubViewDeps;_cssUpdateInNextTick=!1;_cssVarOldValueMap;_watchUpdateSetInNextTick;_watchUpdateArgsInNextTick;_computedUpdateSetInNextTick;_subComponentEventSn=0;_subComponentEventMap=new Map;get[Symbol.toStringTag](){return this.constructor.name}get cid(){return this.#t}get attrs(){return this.#s}get props(){return this.#o}get renderRoot(){return this.#i?.deref()}get renderRoots(){return this.#a.flatMap((t=>t.deref()??[]))}get parentComponent(){return this.#l?.deref()}get wrapperComponent(){return this.#c?.deref()}get slots(){return Mn}get slotHooks(){return this.#u}get cssSheets(){return Bt.get(this.constructor)?.get(ge.INNER)}get isMounted(){return this.#h}#s;#o;#i;#a;#l;#c;#d={};#u={};#p={};#h=!1;#f=!1;#g;#m;get cssVars(){return{}}__inited=!1;#_=!1;#w;__thisRef;__superComp;constructor(...t){super(),this.#t=Nn++,this.__updateTree=[],this.__thisRef=new WeakRef(this),this.__superComp=se(this.constructor),this.#w=this.#y.bind(this),1===M(t)&&(this.#o={},o(this.#o,L(t))),Reflect.getOwnPropertyDescriptor(this.constructor.prototype,"slots")||Reflect.defineProperty(this.constructor.prototype,"slots",{get(){return Me("slots",this)},set(t){Ce("slots",t,this)}});let e=Tt.get(this.constructor)??Tt.get(this.__superComp);e&&e.sort(((t,e)=>e.priority-t.priority)).forEach((t=>t.create(this))),this.#v=this.#E.bind(this)}insertStyleSheet(t){if(!this.#r)return null;let e;if(t instanceof Yt){if(e=Ft.get(t),!e){let n=t.getCssText();e=new CSSStyleSheet;try{e.replaceSync(n)}catch(t){}Ft.set(t,e)}}else if(t instanceof CSSStyleSheet){if(this.#r.adoptedStyleSheets.includes(t))return t;e=t}return e&&!this.#r.adoptedStyleSheets.includes(e)&&(this.#r.adoptedStyleSheets=[...this.#r.adoptedStyleSheets,e]),e}get rootComponent(){let t=this;for(;t.parentComponent;)t=t.parentComponent;return t}#v;connectedCallback(){let t=N(this.parentNode,(t=>t instanceof Rn||t.host instanceof Rn),"parentNode");this.#l=t?t instanceof Rn?new WeakRef(t):new WeakRef(t.host):void 0;let e=Qt.get(this);e&&(this.#c=new WeakRef(e),Qt.delete(this));let n=Bt.get(this.constructor)?.get(ge.HOST);if(n){let t=this.#c?.deref()?.shadowRoot??this.#l?.deref()?.shadowRoot;t&&t.contains(this)||(t=this.ownerDocument),c(n,(e=>{t.adoptedStyleSheets.includes(e)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,e])}))}this.setup()}disconnectedCallback(){}beforeDestroyed(){}destroyed(){}get isDestroyed(){return this.#b}#b=!1;destroy(){if(this.#b)return;this.#b=!0;let t=Tt.get(this.constructor)??Tt.get(this.__superComp);if(t?.forEach((t=>{t.destroy(this)})),this.beforeDestroyed(),function(t){let e=wn(t);e.abortController?.abort(),e.abortController=void 0,c(e.releaseList,(t=>{"function"==typeof t&&t(!0)})),e.releaseList=[],e.docoEventMap.clear(),e.handlerMap=new WeakMap,e.delegationKeySet.clear(),e.bindList.length=0}(this),Gt.get(this)?.clear(),Gt.delete(this),this._watchUpdateArgsInNextTick?.clear(),this._watchUpdateSetInNextTick?.clear(),this._computedUpdateSetInNextTick?.clear(),this._computedUpdateSetInNextTick=null,this.__updateSubViewDeps?.clear(),this.#l){let t=this.#l.deref();t&&V(t.__updateTree,(e=>{e.__destroyed||e.node===this&&(e.destroy(t),T(e.parent?e.parent.children:t.__updateTree,(t=>t===e)))}))}this.#r&&ae.clear(this.#r),c(this.__updateTree,(t=>t?.destroy(this))),c(this.#d,(t=>{Tn.delete(t),t.remove()})),c(this.#p,(t=>{c(t,(t=>t.remove()))})),c(this.__data_.slots,((t,e)=>{c(t,(t=>t.remove()))})),this.#S.clear(),this.#w=this.__thisRef=this.#p=this.#d=this.#S=this.#e=this.__data_.slots=null,this.remove(),this.#i=this.#a=this.#r=this.#n=this.#s=this.#o=this.#i=this.#a=this.#u=this.#v=this.__data_=this.__updateTree=this.#l=this._asyncDirectives=this.#c=null,this.#m=null,this.destroyed()}setup(){if(this.__inited)return;if(this.#_)return;this.#_=!0;const t=this.#N();this.#o={},o(this.#o,t),this.propsReady(t);for(const e in t){const n=t[e];this.__data_[e]=n}this.#T(),this.__data_.slots={},Reflect.defineProperty(this.__data_,"__isData",{enumerable:!1,value:!0});let e=this.__superComp;if(xt.get(this.constructor)??xt.get(e)){this._watchUpdateSetInNextTick=new Set,this._watchUpdateArgsInNextTick=new Map;let t=kt.get(this.constructor)??kt.get(e),n=It.get(this.constructor)??It.get(e);c(n,((e,n)=>{let r=_(this,n);e.forEach((t=>{t.call(this,r,void 0,n)})),t.has(n)&&t.set(n,!0)}))}let n=Wt.get(this.constructor);if(void 0===n&&(n=o({},Et.get(this.constructor),Et.get(e)),Wt.set(this.constructor,n)),n){this._computedUpdateSetInNextTick=new Set;let t=Ht.get(this.constructor);t?c(n,((t,e)=>{this[Zt][e]=t.call(this)})):(t=new Map,Ht.set(this.constructor,t),c(n,((e,n)=>{S(e,"key",n),Pe.start(),this[Zt][n]=e.call(this),Pe.end(),Pe.popVarPathList().forEach((n=>{let r=t.get(n);r||(r=new Set,t.set(n,r)),r.add(e)}))})))}Pe.start();let r=this.render();Pe.end();let i,a=Pe.popVarPathList();Ct.has(this.constructor)||Ct.set(this.constructor,new Set(a)),null===r?(this.#a=[],this.#i=void 0):(this.#r=this.attachShadow({mode:"open"}),this.#r.adoptedStyleSheets=be(this.constructor),i=function(t,e){let n,r=[];Jn.has(e.constructor)?(n=Jn.get(e.constructor),r=er(t)):(n=new Wn(t,e,r),Jn.set(e.constructor,n));let[s,o]=rr(e,n,r);return e.__updateTree=o,s}(r,this),i&&M(i.children)>0&&(this.#a=D(i.children,(t=>t.nodeType===Node.ELEMENT_NODE)).map((t=>new WeakRef(t))),this.#i=this.#a[0])),this.__inited=!0,this.#M();let l=qt.get(this);l&&(this.#u=l,qt.delete(this)),c(this.#u,((t,e)=>{this.#C(e)}));const u=this;let h=Tt.get(this.constructor)??Tt.get(this.__superComp);if(h?.forEach((t=>{t.beforeMount(this,((t,e)=>(u.__data_[t]=e,u.__data_[t])))})),this.beforeMount(),this.isDestroyed)return;this.#h=!0,Pe.start();let d=this.cssVars;if(Pe.end(),!R(d)){this._cssVarOldValueMap={};let t=Ut.get(this.constructor);t||(t=new Set(Pe.popVarPathList()),Ut.set(this.constructor,t));let e="";c(d,((t,n)=>{let r=ue(this.constructor,n);(s(t)||W(t))&&(t="initial"),this._cssVarOldValueMap[r]=t,e+=";"+r+":"+t})),this.style.cssText+=e}i&&M(i.children)>0&&(this.#r.append(i),Xt.delete(this)),h&&h.forEach((t=>{t.mounted(this,((t,e)=>(u.__data_[t]=e,u.__data_[t])))})),this.#g&&this.#g.forEach((t=>je.pushNext(t))),this.#f&&je.pushNext(this.#v),En(this),this.mounted()}propsReady(t){}render(){return null}beforeMount(){}mounted(){}#y(t){let e=t.currentTarget,n="";c(this.#d,((t,r)=>{if(t===e)return n=r,!1})),this.__inited&&this.#k(e,n===dt?"":n)}#k(t,e){this.#M();let n=_(this.#e[e],"props");n&&c(this.slots,((t,e)=>{t.filter((t=>t.nodeType===Node.ELEMENT_NODE)).forEach((t=>{t instanceof Rn?t.updateProps(n):c(n,((e,n)=>{if(t instanceof HTMLSlotElement){let r=Tn.get(t);if(r){let s=t.name||dt,o=r.#e[s];o||(o=r.#e[s]={props:{}}),o.props||(o.props={}),o.props[n]=e,r.#k(t,s)}}else t.setAttribute(n,e)}))}))})),this.slotChange(t,e)}slotChange(t,e){}attributeChangedCallback(t,e,n){if(!this.__inited)return;if(Object.is(n,e))return;"undefined"===n&&(n=null);let r=de(t),s=St.get(this.constructor)??St.get(this.__superComp);if(oe(_(s,r).type)){let t=!H(n)&&ie(n);if(_(this,r)===t)return}this.#R(t,e,n)}shouldUpdate(t){return!0}updated(t){}_notify(t=void 0,e,n,r,s){let o=[],i=this,a="";for(let l=0;l<n.length;l++){const c=n[l];o.push(c),i=null==i?i:i[c];let u=i??t;a=0===l?c:a+"."+c,this.#n[a]={value:u,chain:a===Cn?[Cn]:o,oldValue:e,end:o.length===n.length,subNewValue:r,subOldValue:s}}this.isMounted?je.pushNext(this.#v):this.#f=!0}#E(){if(M(this.#n)<1)return;if(!this.isMounted)return;const t=this.#n;if(this.#n={},!this.shouldUpdate(t))return;let e=Tt.get(this.constructor)??Tt.get(this.__superComp);e?.forEach((e=>{e.updated(this,t)})),this._watchUpdateSetInNextTick?.forEach((t=>{let{newValue:e,oldValue:n,chain:r,rootObjNew:s,rootObjOld:o,fullMatch:i}=this._watchUpdateArgsInNextTick.get(t),a=i?e:s,l=i?n:o;t.call(this,a,l,r,e,n)})),this._watchUpdateSetInNextTick?.clear(),this._watchUpdateArgsInNextTick?.clear();let n=0;for(;this._computedUpdateSetInNextTick?.size>0&&n<10;){n++;let e=Array.from(this._computedUpdateSetInNextTick);this._computedUpdateSetInNextTick.clear(),e.forEach((e=>{let n=_(e,"key"),r=this.__data_[n],s=e.call(this);(d(s)||s!==r)&&(this.__data_[n]=s,He(this,s,r,[n]),t[n]={value:s,chain:[n],oldValue:r,end:!0})}))}if(this._cssUpdateInNextTick){let t=this.cssVars;c(t,((t,e)=>{let n=ue(this.constructor,e);this._cssVarOldValueMap[n]!=t&&((s(t)||W(t))&&(t="initial"),this._cssVarOldValueMap[n]=t,this.style.setProperty(n,t+""))}))}let r,o=!1,i=Ct.get(this.constructor);if(c(t,((t,e)=>{if(!o&&i?.has(e)&&(o=!0),this.__updateSubViewDeps?.has(e)){let t=this.__updateSubViewDeps.get(e);t&&(r||(r=new Set),t.forEach((t=>{r.add(t)})))}})),this.#i?.deref()){if(o){let e=er(this.render()),n=this.#m;if(this.#m=e,or(e,this,this.__updateTree,r,t,n),n)for(let t=0;t<n.length;t++){let e=n[t];null!==e&&"object"==typeof e&&(n[t]=void 0)}}r&&r.size>0&&r.forEach((e=>{!function(t,e,n,r){if(!t||t.__destroyed)return;let s=t.node;const[o,i,a,l]=t.value;let c,u=t.getSlotComponent(e);if(!n){let n=o(s,t.value[1],i,{renderComponent:e,slotComponent:u,varChain:l,updatedMap:r,pointType:_(zt.get(a),[0],xn.TEXT)});if(!n)return;if(n[0]!==An.REFRESH)return;c=p(n[1])?er(n[1].call(e,t.value[1][0])):n[1]}if(!c)return;or(c,e,t.children,void 0,r)}(e,this,void 0,t)}))}this.#S.forEach((t=>{this.#C(t)})),this.updated(t)}#N(){let t,e=St.get(this.constructor)??St.get(this.__superComp),n=this.attributes,s=this.tagName,a=Xt.get(this.wrapperComponent)?.get(this)??null;t=null==this.#o?a??kn:null==a?this.#o:v(this.#o,a);let c={};for(let t=0,r=n.length;t<r;t++){let{name:r,value:s}=n[t];if(r[0]===Kn||r[0]===Bn||r[0]===Fn||r===Gn||"slot"===r)continue;let o=de(r);e&&!e[o]&&(c[r]=s)}this.#s=this.#s?o(this.#s,c):c;let u={};if(!e)return u;let h=Object.keys(e),p=h.length;for(let o=0;o<p;o++){const a=h[o],c=i(a),p=this.hasAttribute(c);let f,g=e[a],m=b(t,a),w=_(this,a);if(!("_defaultValue"in g)&&(g._defaultValue=w,!g.type)){r(w)&&ee(s,"Prop '"+a+"' has neither propType nor defaultValue be used for type inference");let t=typeof w;l(w)&&(t="array");let e=mt[t];g.type=e}if(m)f=W(t[a])?w:t[a];else{f=w;let t=n.getNamedItem(c)||n.getNamedItem(Bn+c)||n.getNamedItem(c+Bn);t&&(m=!0,f=t.value)}if(g.required&&!m){ee(s,"Prop '"+a+"' is required");break}f=this.#x(e,a,f,p),g.attribute&&U(f)&&!d(f)&&this.#A(g,a,f),this.__data_[a]=f,p&&(u[a]=f),delete this[a]}return u}#A(t,e,n){let r=i(e),s=j(n);oe(t.type)?(s=ie(n),K(s)?s&&!this.hasAttribute(r)?this.toggleAttribute(r,!0):!s&&this.hasAttribute(r)&&this.toggleAttribute(r,!1):this.getAttribute(r)!==s&&this.setAttribute(r,s)):this.getAttribute(r)!==s&&this.setAttribute(r,s)}#P(t,e){let n=t;try{for(let r=0;r<e.length;r++){const s=e[r];n=s===Boolean?ie(t):s===Number?Number(t):s===String?String(t):s===Object||s===Array?B(t):s===Date?new Date(t):new s(t)}}catch(e){ee(this.tagName,"Convert attribute error with "+t)}return n}#x(t,r,s,o){let i=t[r];if(!i)return s;let a=i.isValid,c=i.type,u=l(c)?c:[c],h=i.converter,d=s;if(!e(u,(t=>t===String))&&n(d)&&!H(d))try{d=h?h(d):this.#P(d,u)}catch(t){ee(this.tagName,`Convert attribute '${r}' error with `+d)}for(let t=0;t<u.length;t++){"Boolean"===u[t].name&&o&&(d=ie(d))}if(W(d))return d;let p=typeof d,f=!U(d);for(let t=0;t<u.length;t++){const e=u[t];if(p===fe(e)||d instanceof e||Object.prototype.toString.call(d)===Object.prototype.toString.call(e.prototype)){f=!0;break}}return f||ee(this.tagName,`Invalid prop '${r}'. expected '${u.map((t=>t.name||t))}' but got '${p}'`),a&&(a.call(this,d,this.__data_)||ee(this.tagName,`Invalid prop '${r}'. IsValid() check failed`)),d}#T(){let t=bt.get(this.constructor)??bt.get(this.__superComp);t&&c(t,((e,n)=>{let r=t[n],s=_(this,n);if(r){let t=r.prop;s=t?F(this.__data_[t]):_(this,n)}this.__data_[n]=s,delete this[n]}))}updateProps(t,e=!1){let n=St.get(this.constructor)??St.get(this.__superComp);if(!n)return;if(!this.__inited)return void o(this.#o,t);let r=[];c(t,((s,o)=>{let i=de(o),a=n[i];if(!a)return;s=this.#x(n,i,s);let l=this.__data_[i];if(!e){let t=Dt.get(this.constructor),e=t?.get(i);if(e){if(!e.call(this,s,l,[i],s,l))return!0}else if(d(s)){let t=Vt.get(this.constructor);if(t?.has(i)&&Object.is(l,s))return!0}else if(Object.is(l,s))return!0}a.attribute&&U(s)&&!d(s)&&r.push([a,i,s]),S(this.__data_,i,s),t[i]=s,Ue(this,s,l,[i])})),o(this.#o,t),r.forEach((([t,e,n])=>{this.#A(t,e,n)}))}_initProps(t,e){this.#o=v(this.#o||{},t),this.#s=v(this.#s||{},e),c(t,((t,e)=>{if(d(t)){let n=Oe.get(t);if(n){let t=this.wrapperComponent?bt.get(this.wrapperComponent?.constructor):null,r=n[0];if(t&&t[r]){let n=St.get(this.constructor);S(n,[e,"shallow"],t[r].shallow)}}}}))}_bindSlot(t,e,n){this.#d[e]||(this.#d[e]=t,Tn.set(t,this));if(bn(this,"slotchange",this.#w,t),!R(n)){let t=this.#e[e];t||(t=this.#e[e]={}),t.props=n}}#S=new Set;_updateSlot(t,e,n){let r=this.#d[t],s=this.#u[t];if(!s&&!r)return;let o=this.#e[t];if(e&&(o.props||(o.props={}),o.props[e]=n),s)this.#S.add(t);else{let t=r.assignedElements({flatten:!0});for(let r=0;r<t.length;r++){t[r].setAttribute(e,n+"")}}}#M(){if(!this.#i)return;let t=$(this.#d);if(R(t))return;const e=u(this.childNodes,(t=>t.nodeType===Node.COMMENT_NODE||t.nodeType===Node.TEXT_NODE&&s(t.textContent)?[]:t instanceof HTMLSlotElement?t.assignedNodes({flatten:!0}):t));let n=z(e,(e=>{if(e.nodeType===Node.TEXT_NODE&&t.includes(dt))return dt;if(e instanceof Element){let n=e.getAttribute("slot")||dt;if(t.includes(n))return n}}));if(R(n))return void(this.slots={});c(n,((t,e)=>{if(e){for(;t.length>0;){let e=t[0];if(!(e.nodeType===Node.TEXT_NODE&&s(e.textContent)||e instanceof HTMLSlotElement&&R(e.assignedNodes({flatten:!0}))))break;t.shift()}for(;t.length>0;){let e=G(t);if(!(e.nodeType===Node.TEXT_NODE&&s(e.textContent)||e instanceof HTMLSlotElement&&R(e.assignedNodes({flatten:!0}))))break;t.pop()}}}));let r={};c(n,((t,e)=>{R(t)||(r[e]=t)})),this.slots=r}#C(t){let e=this.#u[t];if(!e)return;let n=this.#e[t];if(!this.__data_.slots)return;if(!this.__data_.slots[t])return;this.renderAsync(e,_(n,"props"));const r=this._asyncDirectives.get(e);let s=r?.buildView(e(_(n,"props"))),o=X(w(s),(t=>t.nodeType===Node.COMMENT_NODE));if(o){let e=this.#p[t];if(!R(e))for(let t=0;t<e.length;t++){const n=e[t];n.parentNode?.removeChild(n)}this.#p[t]=o,this.append(...o),this.#S.clear()}}_asyncDirectives=new WeakMap;renderAsync(t,...e){}#R(t,e,n){if(!this.__inited)return;if($e(this.constructor).has(t)){let e=de(t);if(H(n)){let t=St.get(this.constructor)??St.get(this.__superComp);t&&(n=t[e]._defaultValue)}this.updateProps({[e]:n})}}_regSubViewDeps(t,e){this.__updateSubViewDeps||(this.__updateSubViewDeps=new Map),t.forEach((t=>{let n=this.__updateSubViewDeps.get(t);n||(n=new Set,this.__updateSubViewDeps.set(t,n)),n.add(e)}))}_getPrivateData(){return this.__data_}emit(t,e={},n){if(n&&(e.event=n),e.target=this,b(this.#s,"emit-native"))this.dispatchEvent(new CustomEvent(t,{bubbles:!1,composed:!1,cancelable:!0,detail:e}));else{let n=_(this,"__c_emit_event_");if(!this.wrapperComponent)return;!function(t,e,n,r){let s=t._subComponentEventMap.get(e),o=_(s,n);p(o)&&o.call(t,r)}(this.wrapperComponent,n,t,e)}}nextTick(t){if(!this.isMounted)return this.#g||(this.#g=[]),void this.#g.push(t);je.pushNext(t)}forceUpdate(){let t=Ct.get(this.constructor);t&&t.size>0?t.forEach((t=>{this.#n[t]={value:void 0,chain:void 0}})):this.#n.__force__={value:void 0,chain:void 0},this.#E()}}var xn,An,Pn;function In(t,e,n,r,s,o,i,a,u,h){let d,f=zt.get(t),g=f?f[0]:"";if(g===xn.TEXT||g===xn.SLOT?(Pe.start(),d=s(e,n,r,{renderComponent:o,slotComponent:i,varChain:a,updatedMap:h,pointType:g}),Pe.end(o,u)):d=s(e,n,r,{renderComponent:o,slotComponent:i,varChain:a,updatedMap:h,pointType:g}),!d)return;let[y,v,E,b,N,M]=d;if(y===An.NONE)return;if(y===An.REFRESH){let t=d[1],e=p(t)?er(t.call(o,n[0])):t;return e&&or(e,o,u.children,void 0,h),!0}let C=M;l(M)||(C=O(M,((t,e)=>t)));let k=u.__subViewId;void 0===k&&(k=u.__subViewId=_(e,"__anchor__"));let x=u.__parentViewsIdMap;void 0===x&&(x=u.__parentViewsIdMap={},c($(e),(t=>{"__anchor__"!==t&&m(t,"__c-")&&(x[t]=_(e,[t]))})));let A=u.subViewRootNodes,P=u.children;if(y===An.REMOVE){let t=[];c(A,((e,n)=>{if(l(e))c(e,(t=>{t.remove(),t instanceof Rn&&t.destroy()}));else{let n=e;n.remove(),t.push(e),n instanceof Rn&&n.destroy()}})),t.forEach((t=>{T(A,(e=>e===t))})),P?.forEach(((t,e)=>{t.destroy(o),P[e]=null})),u.children=q(P),l(A)?u.subViewRootNodes=[]:u.subViewRootNodes={}}else if(y===An.REPLACE){c(A,(t=>{t.remove(),t instanceof Rn&&t.destroy()})),P?.forEach(((t,e)=>{t.destroy(o),P[e]=null})),u.children=q(P);let[,t,n]=d;sr(e,u,t,n,o)}else if(y===An.UPDATE){if(R(A))return void sr(e,u,N,v,o,M,((t,e,n)=>E[n]));let t={},n={},r=e.parentElement.childNodes,s="__c-"+k;for(let e=0;e<r.length;e++){let n=r[e],o=n[s];if(null!=o){let e=t[o];e||(e=t[o]=[]),e.push(n)}}u.children?.forEach((t=>{n[t.key]?n[t.key].push(t):n[t.key]=[t]}));let i=b,a=E,l=new Map,d=new Map;i.forEach(((t,e)=>{l.set(t,e)})),a.forEach(((t,e)=>{d.set(t,e)}));const p=new Uint8Array(i.length),f=[];for(let t=0;t<a.length;t++){const e=l.get(a[t]);void 0!==e&&(p[e]=1,f.push(a[t]))}const g=[];for(let t=0;t<i.length;t++)p[t]||g.push(i[t]);let m,_=[],y=[],T=!1;if(!R(a)){let e=-1,n=[],r=[],s=0,o=0;for(;o<a.length;o++){const i=a[o];let c=l.get(i)??-1;if(c<0){let e=a[o-1];t[i]=[],_.push({refKey:e,newKey:i}),s++}else if(c>-1&&c!==o-s){if(e<0||1===Math.abs(e-c)){let e=G(n),r=0===o?Pn.AFTER_BEGIN:e?e.newKey:a[o-1],s=!1;0!==o&&R(t[r])&&(s=!0),n.push({newKey:i,refKey:r,refNew:s})}else{r.push({moveGroup:n,moveIndex:o+n.length});let e=a[o-1],s=!1;R(t[e])&&(s=!0),n=[],n.push({newKey:i,refKey:e,refNew:s})}e=c}}if(n.length>0&&r.push({moveGroup:n,moveIndex:o+n.length}),r.length>0){T=!0;let e=r.sort(((t,e)=>t.moveGroup.length-e.moveGroup.length));if(e.length<2){let{moveGroup:n}=e[0];if(n.length>1){let t=G(n).refKey;n[n.length-2].newKey===t&&(n=Q(n))}On(n,t,b)}else e.forEach((({moveGroup:e})=>{e[0].refNew?y.push(e):On(e,t,b)}))}}if(_.length>0&&(_.forEach((e=>{let n=d.get(e.newKey)??-1,r=C[n],s=er(N.call(o,r,e.newKey,n)),[i,a]=rr(o,v,s);e.fragment=i,c(a,(t=>{t.key=e.newKey,u.children?.push(t)}));let l=w(i.childNodes),h=t[e.newKey],p=e.newKey+"";c(l,(t=>{h.push(t),S(t,"__c-"+k,p),c(x,((e,n)=>S(t,n,e)))}))})),En(o),m=function(t){let e,n=[];return t.forEach((t=>{let r=G(n);r&&e===t.refKey?(r.group||(r.group=[r.fragment]),r.group.push(t.fragment)):n.push(t),e=t.newKey})),n}(_),m.forEach(((n,r)=>{let s=n.fragment,o=t[n.refKey??b[0]],i=L(o),a=G(o);if(n.group){let t=document.createDocumentFragment();t.append(...n.group),s=t}i===e?i.before(s):n.refKey?"string"==typeof i||a.after(s):i.before(s)}))),c(y,(e=>{On(e,t,b)})),g.forEach((e=>{t[e].forEach((t=>{t.parentNode?.removeChild(t)})),n[e].forEach((t=>{t.destroy()}))})),T||g.length>0||m){const t=z(P,(t=>t.key));let e=[],n=0;a.forEach((r=>{t[r]&&t[r].forEach((t=>{t.varIndex=n++,e.push(t)}))})),Z(P,e).forEach((t=>t.destroy(o))),u.children=e}if(T||g.length>0||m){let e={};c(C,((n,r)=>{let s=E[r],o=t[s];e[s]=o})),u.subViewRootNodes=e}if(f.length>0){let t=[];c(M,((e,n,r,s)=>{let i=e,a=er(N.call(o,i,n,s));for(let e=0;e<a.length;e++)t.push(a[e])})),or(t,o,u.children,void 0,h)}}return!0}function On(t,e,n){t.forEach((({refKey:t,newKey:r})=>{let s=e[r];if(t===Pn.AFTER_BEGIN){let t=e[n[0]];L(t).before(...s)}else if(e[t]){let n=e[t],r=G(n);r?.after(...s)}}))}function Ln(t,e){return zt.set(t,e),(...e)=>[t(...e),e,t,Pe.popDirectiveQ()]}function Vn(t,e,n){zt.get(t)}!function(t){t.ATTR="attr",t.PROP="prop",t.TEXT="text",t.SLOT="slot",t.TAG="tag"}(xn||(xn={})),function(t){t.NONE="NONE",t.REFRESH="REFRESH",t.REMOVE="REMOVE",t.REPLACE="REPLACE",t.UPDATE="UPDATE",t.INIT="INIT"}(An||(An={})),function(t){t.AFTER_BEGIN="afterbegin"}(Pn||(Pn={}));const Dn=new RegExp(`([a-z0-9"'${Jt}])\\s*>\\s*<`,"img");class Wn{updatePointMetas;fragment;emptyEvents;upmMap;slotNodeMap;constructor(t,e,n){let[r,u]=this.parseTemplate(t);n&&o(n,u),this.updatePointMetas=[],this.emptyEvents={},this.fragment=function(t,e,n,r,o){const u=document.createElement("template");u.innerHTML=e;const h=document.createNodeIterator(u.content,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT);let d,f,g=0,m=-1,_=-1;for(;d=h.nextNode();)if(m++,f&&!f.contains(d)&&(f=void 0,_=-1),d instanceof HTMLElement||d instanceof SVGElement){le(d)&&(f=d,_=m);let e={};const c=d.attributes,u=[];for(let h=0;h<c.length;h++){let w=c[h].name,y=c[h].value;if(w!==Zn)if(Xn.test(w)){let e=n[g];if(l(e)&&p(e[0])){let[,,n,s]=e;Vn(n,xn.TAG,r.tagName);let o=new jn(g);o.isDirective=!0,o.directiveType=xn.TAG,o.nodeSn=m,o.directiveVarChain=s,f&&(o.slotNodeSn=_),t.push(o),g++}u.push(w)}else if(w[0]!==Kn)if(w!==Gn)if(G(w)!==Bn){if(y.includes(Jt)){let e=new jn(g);if(e.attrName=w.replace(/\.|\?|@/,""),e.nodeSn=m,f&&(e.slotNodeSn=_),w[0]===Bn||w[0]===Fn||w[0]===$n){if(w[0]===Fn)e.isToggleProp=!0,e.attrName=w.substring(1);else if(w[0]===$n){e.isRefAttr=!0;let t=w.substring(1);const[n,r]=t.split(zn);let s=n;switch(r){case"camel":s=a(s);break;case"kebab":s=i(s);break;case"snake":s=tt(s)}e.attrName=s}else{let t=vt[d.tagName.toLowerCase()];St.get(t);{let t=a(w.substring(1));e.isProp=!0,e.attrName=t}}u.push(w)}else e.attrTmpl=y,e.isPureTmpl=y===Jt+g;t.push(e),g++}}else{e[w.substring(0,w.length-1)]=y,u.push(w);let t=new jn(g);t.attrName=w.substring(0,w.length-1),t.nodeSn=m,t.isPropPerfix=!0}else{if(Xn.test(y)){n[g];let e=new jn(g);e.isRef=!0,e.nodeSn=m,t.push(e),g++}u.push(w)}else{let e=w.substring(1);if(Xn.test(y)){let r=new jn(g);r.isEvent=!0,r.attrName=e,r.nodeSn=m,t.push(r),n[g],g++}else if(s(y)){let t=o[m];t||(t=o[m]=[]),t.push(e)}u.push(w)}}for(let t=0;t<u.length;t++)d.removeAttribute(u[t])}else{let e=j(d.nodeValue).split(Xn);if(e.length<2)continue;c(et(e.length-1),(o=>{let i=j(e[o]);if(!s(i)){let t=document.createTextNode(i);d.parentNode.insertBefore(t,d),m++}let a=document.createTextNode("");d.parentNode.insertBefore(a,d);let c=new jn(g);c.isText=!0,c.nodeSn=m,t.push(c);let u=n[g];if(l(u)&&p(u[0])){let t=f?xn.SLOT:xn.TEXT;c.isDirective=!0,c.directiveType=t,f&&(c.slotNodeSn=_);let[,,e]=u;Vn(e,0,r.tagName),u=void 0}g++,m++})),m--;let o=j(G(e));if(s(o)){let t=d.previousSibling;d.parentNode.removeChild(d),d=t}else d.nodeValue=o,m++}return u.content}(this.updatePointMetas,r,u,e,this.emptyEvents),this.upmMap={},this.slotNodeMap={},this.updatePointMetas.forEach(((t,e)=>{this.upmMap[t.nodeSn]||(this.upmMap[t.nodeSn]=[]),this.upmMap[t.nodeSn].push(t),t.slotNodeSn>-1&&(this.slotNodeMap[t.slotNodeSn]=null)}))}parseTemplate(t){let e="",n=g(t.vars),r=t.strings.length-1,s=t.vars.length-1,o=0;for(let i=0;i<=r;i++){const r=t.strings[i];let a=o<n.length?n[o]:"";if(a instanceof Hn){let[t,e]=this.parseTemplate(a);a=t,n.splice(o,1,...e),o+=e.length-1}else a=i>s?"":Jt+o;o++,e=e+r+a}return e=e.replace(Dn,"$1><").trim(),e=tr(e),[e,n]}}class Hn{strings;vars;constructor(t,e){this.strings=t,this.vars=e}getKey(){let t=this.vars,e="";return c(this.strings,((n,r)=>{if(pt.test(n))return e=J(t[r]),!1})),e}getKeys(){let t=this.vars,e=[];for(let n=0;n<this.strings.length;n++){const r=this.strings[n];if(pt.test(r)){let r=J(t[n]);e.push(r)}}return R(e)&&t.forEach((t=>{if(t instanceof Hn){let n=t.getKey();e.push(n)}})),e}append(t){this.strings=g(this.strings);let e=G(this.strings);return t.strings.forEach(((t,n)=>{0!=n?this.strings.push(t):this.strings[this.strings.length-1]=e+t})),this.vars=g(this.vars,t.vars),this}insert(t,e){this.strings=g(this.strings);let n=e.strings[0];return this.strings[t]+=n,this.strings.splice(t+1,0,...e.strings.slice(1)),this.vars.splice(t,0,...e.vars),this}getHTML(t){let e=[],n=new Wn(this,t,e),[r,s]=rr(t,n,e);return Y(r.childNodes,((t,e)=>t+(e.nodeType==Node.TEXT_NODE?e.nodeValue:e.outerHTML??"")),"")}destroy(){this.strings=this.vars=null}}class Un{metaInfo;key;varIndex;value;node;subViewRootNodes;__destroyed=!1;children;parent;__slotCompResolved=!1;__slotComp=null;__subViewId;__parentViewsIdMap;constructor(t){this.varIndex=t}getSlotComponent(t){if(!this.__slotCompResolved&&(this.__slotCompResolved=!0,this.node)){let e=N(this.node,(t=>t.host&&t.host instanceof Rn),"parentNode");e&&e.host!==t&&(this.__slotComp=e.host)}return this.__slotComp}static createFrom(t){let e=new Un(t.varIndex);return e.metaInfo=t,e}destroy(t){if(this.__destroyed)return;this.__destroyed=!0;let e=this.node,n=this.children;if(this.node=this.value=this.children=this.parent=this.metaInfo=null,this.__slotComp=null,this.__parentViewsIdMap=void 0,this.__subViewId=void 0,!e)return;let r=n;r?.forEach(((e,n)=>{e.destroy(t)})),e instanceof Rn&&e.destroy(),t&&e instanceof Element&&ae.clear(e),e?.remove()}insert(t){t.parent=this,this.children||(this.children=[]),this.children.push(t)}}class jn{varIndex;attrName;attrTmpl;isPureTmpl=!1;isText=!1;isDirective=!1;directiveType;directiveVarChain;isProp=!1;isPropPerfix=!1;isToggleProp=!1;isPlaceholder=!1;isEvent=!1;isRef=!1;isKey=!1;isRefAttr=!1;isComponent=!1;isSlot=!1;nodeSn=-1;slotNodeSn=-1;constructor(t){this.varIndex=t}}const Kn="@",Bn=".",Fn="?",$n="*",zn=":",Gn="ref",Xn=new RegExp(`${Jt}\\d+`),qn=/(<\/?)\s*([A-Z][A-Za-z0-9]*)([\s>])/gm,Qn=/\s+([\.?@*])?((?:[a-zA-Z]*[A-Z][^\s<>="']+))(?=[\s=>])/gm,Zn="slot-props",Jn=new Map;let Yn=0;function tr(t){return n(t)?t=(t=t.replace(Qn,((t,e,n)=>` ${e??""}${i(n)}`))).replace(qn,((t,e,n,r)=>e+yt[n]+r)):t+""}function er(t){const e=[],n=[t];for(;n.length;){const t=n.pop(),r=t.strings.length-1;for(let s=0;s<r;s++){const r=t.vars[s];r instanceof Hn?n.push(r):e.push(r??"")}}return e}function nr(t,e){let n=t.childNodes;for(let t=0,r=n.length;t<r;t++){let r=n[t],s=r.nodeType;s===Node.ELEMENT_NODE?(e.push(r),nr(r,e)):s===Node.TEXT_NODE&&e.push(r)}}function rr(t,e,n){const{fragment:r,updatePointMetas:s,emptyEvents:o,upmMap:i,slotNodeMap:a}=e;let l,c=r.cloneNode(!0),u=[],h=[],d=[],p=yn(t);const f=[];nr(c,f);let g=-1,m=0;for(let e=0;e<f.length;e++){l=f[e],g++,null===a[g]&&(a[g]=l);let r,s=o[g];s&&s.forEach((t=>{p.push([t,k,l])}));const c=i[g];c&&c.forEach((t=>{let e=n[m++],s=Un.createFrom(t);if(s.node=l,s.value=e,t.isProp||t.isPropPerfix)(r??(r={}))[t.attrName]=e;else if(t.isRef)e.__setRef(new WeakRef(l));else if(t.isEvent)p.push([t.attrName,e,l]);else if(t.isToggleProp)s.value=!!e,l.toggleAttribute(t.attrName,s.value);else if(t.isRefAttr)l.setAttribute(t.attrName,e);else if(t.isText)if(t.isDirective){let n=t.attrName,r=a[t.slotNodeSn],[o,i,,c]=e;h.push([l,n,r,o,i,c,s])}else l.textContent=e;else if(t.isDirective){let n=a[t.slotNodeSn],[r,s,,o]=e,i=t.attrName;R(o)&&M(t.directiveVarChain)>0&&(o=t.directiveVarChain),d.push([l,i,n,r,s,o,t.directiveType])}else l.setAttribute(t.attrName,t.attrTmpl.replace(Xn,e));u.push(s)})),l instanceof HTMLSlotElement?t._bindSlot(l,l.name||"default",r):l instanceof HTMLElement&&le(l)&&(Qt.set(l,t),r&&ce(t,l,r))}return h.forEach((([e,n,r,s,o,i,a])=>{e.__anchor__=Yn++,Pe.start();let l=s(e,o,void 0,{renderComponent:t,slotComponent:r,varChain:i,attrName:n,pointType:a.directiveType});if(Pe.end(t,a),l&&l.length>1){let[,n,r,s,o]=l;sr(e,a,n,r,t,s,o)}})),d.forEach((([e,n,r,s,o,i,a])=>{s(e,o,void 0,{renderComponent:t,slotComponent:r,varChain:i,attrName:n,pointType:a})})),[c,u]}function sr(t,e,n,r,s,o,i){let a=[],l=i?{}:void 0;o=o??[0];let u=i?document.createDocumentFragment():void 0,h=_(t,"__anchor__");c(o,((t,o,c,d)=>{Pe.start();let p=er(n.call(s,t,o,d));Pe.end(s);let[f,g]=rr(s,r,p),m=w(f.childNodes);if(i){let e=i.call(s,t,o,d)+"";m.forEach((t=>{t["__c-"+h]=e})),l[e]=m;for(let t=0;t<g.length;t++)g[t].key=e,a.push(g[t]);u.append(f)}else u=f,e.subViewRootNodes=m,g.forEach((t=>{e.insert(t)}))})),l&&(e.subViewRootNodes=l,a.forEach(((t,n)=>{t.varIndex=n,e.insert(t)}))),(u?u.childNodes.length:0)>0&&(En(s),t.parentNode.insertBefore(u,t))}function or(t,e,n,r,o,i){if(s(t))return;if(!n)return;let a;if(i&&i.length===t.length){a=new Uint8Array(t.length);for(let e=0;e<t.length;e++){const n=t[e];n===i[e]&&"object"!=typeof n&&(a[e]=1)}}for(let s=0;s<n.length;s++){const i=n[s];let c=i.varIndex;if(c<0)continue;let u=i.metaInfo;if(u.isPlaceholder||u.isPropPerfix||u.isRef||u.isEvent||u.isRefAttr||u.isKey)continue;if(i.__destroyed)continue;if(a&&a[c])continue;let h,p=i.value,f=i.node;if(!f)continue;if(h=t[c],!d(p)&&p===h)continue;let g=f;if(u.isDirective){let[t,n,s,a]=i.value;if(!l(h))continue;let c=i.getSlotComponent(e),[,u]=h;In(s,f,u,n,t,e,c,a,i,o)&&r?.delete(i)}else if(u.isToggleProp){if(!!h===p)continue;g.toggleAttribute(u.attrName,!!h),g instanceof Rn&&g.updateProps({[u.attrName]:!!h})}else if(u.isProp){if(!d(h)&&h===p)continue;f instanceof Rn?f.updateProps({[u.attrName]:h}):f instanceof HTMLSlotElement&&e._updateSlot(f.getAttribute("name")||"default",u.attrName,h)}else if(u.attrName)p!=h&&("value"===u.attrName&&f instanceof HTMLInputElement?f.value=h:u.isPureTmpl?f.setAttribute(u.attrName,h+""):f.setAttribute(u.attrName,nt(u.attrTmpl,Xn,h+"")));else if(u.isText){let t=J(h??"");t!==f.textContent&&(f.textContent=t)}i.value=h}}function ir(t,...e){return new Hn(n(t)?[t]:t,e)}function ar(t,...e){if(jt.has(t))return jt.get(t);let n=new Yt(t,e),r=t.join("");return R(r)||jt.set(t,n),n}class lr{__ref;get current(){return this.__ref?.deref()}__setRef(t){this.__ref=t}}function cr(){return new lr}var ur;!function(t){t.CLASS="class",t.FIELD="field",t.METHOD="method"}(ur||(ur={}));class hr{static get priority(){return 0}created(t,...e){}beforeMount(t,e,...n){}mounted(t,e,...n){}updated(t,e){}beforeDestroy(t,...e){}}class dr{metadata;decorator;key;priority=0;constructor(t,e,n){this.metadata=e,this.decorator=new n(...t),this.priority=_(n,"priority",0)}dispose(){this.metadata=null,this.decorator=null}create(t){let e,n=this.decorator.targets,s=this.metadata[1];d(s)&&U(_(s,"configurable"))?e=ur.METHOD:r(this.metadata[1])&&(e=ur.FIELD),!R(n)&&e&&n.includes(e)?this.decorator.created(t,...this.metadata):te(`Decorator '${this.decorator.constructor.name}' is out of targets, expect '${n.join(",")}' bug got '${e}'`)}beforeMount(t,e){this.decorator.beforeMount(t,e,...this.metadata)}mounted(t,e){this.decorator.mounted(t,e,...this.metadata)}updated(t,e){this.decorator.updated(t,e)}destroy(t){this.decorator.beforeDestroy(t,...this.metadata)}}function pr(t){return(...e)=>(...n)=>{let r=n[0].constructor,s=Tt.get(r);if(!Tt.has(r)){let t=Object.getPrototypeOf(r);s=t?g(Tt.get(t)??[]):[],Tt.set(r,s)}let o=new dr(e,n.splice(1),t);return s?.push(o),s?.sort(((t,e)=>e.priority-t.priority)),o}}function fr(t){return(...e)=>{if(!e||e.length<1)return;let n=e[0].constructor,r=Tt.get(n);if(!Tt.has(n)){let t=Object.getPrototypeOf(n);r=t?g(Tt.get(t)??[]):[],Tt.set(n,r)}let s=new dr([],e.splice(1),t);return r?.push(s),r?.sort(((t,e)=>e.priority-t.priority)),s}}function gr(t,e,n){return Et.has(t.constructor)||Et.set(t.constructor,{}),Et.get(t.constructor)[e]=n.get,delete t[e],Reflect.defineProperty(t,e,{get(){return Pe.__collecting&&Pe.__varPathList.push(e),Reflect.get(this[Zt],e)}}),Reflect.getOwnPropertyDescriptor(t,e)}const mr=pr(class extends hr{static get priority(){return Number.MAX_VALUE}created(t,e,...n){let r=_(t,e);S(t,e,A(r,this.wait,this.immediate)),S(t,e+"_$__",r)}beforeDestroy(t,e){S(t,e,null),S(t,e+"_$__",null)}get targets(){return[ur.METHOD]}wait;immediate;constructor(t,e=!1){super(),this.wait=t,this.immediate=e}});function _r(...t){return e=>{let n=wt.get(e);n||(n=new Set,wt.set(e,n)),t.forEach((t=>n.add(t)))}}function wr(t,e){return(n,r,s)=>{if(!_t.has(n.constructor)){let t=[],e=n.constructor;for(;(e=se(e))!==Rn;)t=g(t,_t.get(e)??[]);_t.set(n.constructor,t)}_t.get(n.constructor)?.push({name:t,targetFn:e,fnName:r})}}const yr=pr(class extends hr{static get priority(){return Number.MAX_VALUE}created(t,e,n,...r){let s=rt(_(t,n),t);S(t,n,I(s)),S(t,n+"_$__",s)}beforeDestroy(t,e){S(t,e,null),S(t,e+"_$__",null)}get targets(){return[ur.METHOD]}});var vr;!function(t){t.ONCE="once"}(vr||(vr={}));const Er=new WeakMap;class br extends hr{static get priority(){return Number.MAX_VALUE}get targets(){return[ur.FIELD]}selector;cache;constructor(t,e){super(),this.selector=t,this.cache=e}static getKey(t){return t}getter(t){let e=t?.shadowRoot?.querySelector(this.selector),n=Er.get(t);n||(n=new Map,Er.set(t,n)),n.set(this.selector,e)}mounted(t,e,n,...r){const s=this;let o=new WeakRef(t);Reflect.defineProperty(t,n,{configurable:!0,get(){let t=o.deref();return Er.has(t)&&Er.get(t)?.has(s.selector)&&s.cache===vr.ONCE||s.getter(t),Er.get(t)?.get(s.selector)}})}beforeDestroy(t,e){Er.get(t)?.clear(),Er.delete(t)}updated(t,e){this.cache!==vr.ONCE&&this.getter(t)}}const Sr=pr(br),Nr=pr(class extends br{getter(t){let e=t.shadowRoot?.querySelectorAll(this.selector),n=Er.get(t);n||(n=new Map,Er.set(t,n)),n.set(this.selector,e)}});function Tr(t){if(1===arguments.length)return(e,n)=>{Mr(e,n,t)};Mr(arguments[0],arguments[1],{prop:""})}function Mr(t,e,n){if(!bt.has(t.constructor)){const e={};let n=t.constructor;for(;(n=se(n))!==Rn;)v(e,bt.get(n)??{});bt.set(t.constructor,e)}if(n.shallow=n.shallow||!1,S(bt.get(t.constructor),e,n),n.hasChanged){let r=Dt.get(t.constructor);r||(r=new Map,Dt.set(t.constructor,r)),r.set(e,n.hasChanged)}if(n.shallow){let n=Lt.get(t.constructor);n||(n=new Set,Lt.set(t.constructor,n)),n.add(e)}Reflect.defineProperty(t,e,{get(){return Me(e,this)},set(t){Ce(e,t,this)}})}function Cr(t,e,n){Mr(t.prototype,e,n||{prop:""})}function kr(t,e=!1){return n=>{n&&(e?customElements.define(t,n):(yt[n.name]=t,vt[t]=n))}}const Rr=pr(class extends hr{static get priority(){return Number.MAX_VALUE}created(t,e,...n){let r=_(t,e);S(t,e,P(r,this.wait)),S(t,e+"_$__",r)}beforeDestroy(t,e){S(t,e,null),S(t,e+"_$__",null)}get targets(){return[ur.METHOD]}wait;constructor(t){super(),this.wait=t}});function xr(t,e){return(n,r)=>{let s=Pt.get(n.constructor),i=At.get(n.constructor),a=kt.get(n.constructor),c=Rt.get(n.constructor),u=xt.get(n.constructor),h=It.get(n.constructor);if(!u){u=new Map,xt.set(n.constructor,u),c=[],Rt.set(n.constructor,c),a=new Map,kt.set(n.constructor,a),s={},Pt.set(n.constructor,s),i={},At.set(n.constructor,i),h={},It.set(n.constructor,h);let t=se(n.constructor);for(;t;)xt.has(t)&&(xt.get(t)?.forEach(((t,e)=>{u.set(e,t)})),c.push(...Rt.get(t)),kt.get(t)?.forEach(((t,e)=>{a.set(e,t)})),o(s,Pt.get(t)),o(i,At.get(t)),o(h,It.get(t))),t=se(t)}(l(t)?t:[t]).forEach((t=>{let o=n[r];_(e,"once",!1)&&a.set(t,!1);let l=_(e,"deep",!1),d=t.split(".")[0],p=u.get(d);if(p||(p=[],u.set(d,p)),p.includes(t)||p.push(t),l?(s[t]=s[t]??new Set,s[t].add(o),c.push(t)):(i[t]=i[t]??new Set,i[t].add(o)),_(e,"immediate",!1)){let e=h[t];e||(e=h[t]=new Set),e.add(o)}}))}}const Ar=new WeakMap;function Pr(t){if("string"==typeof t)return t.trim();if(st(t)){let e="";return c(t,((t,n)=>{t&&(e+=(e?" ":"")+n)})),e}if(Array.isArray(t)){let e="";return c(t,(t=>{const n=Pr(t);n&&(e+=(e?" ":"")+n)})),e}return""}const Ir=Ln((function(t){return(t,[e],n)=>{const r=t,s=Pr(e),o=Ar.get(r)??"";s!==o&&(o&&r.classList.remove(...o.split(" ").filter(Boolean)),s&&r.classList.add(...s.split(" ").filter(Boolean)),Ar.set(r,s))}}),[xn.TAG]),Or=new Map,Lr=new WeakMap,Vr=new WeakMap,Dr=new Set(["width","height","min-width","max-width","min-height","max-height","padding","padding-top","padding-right","padding-bottom","padding-left","margin","margin-top","margin-right","margin-bottom","margin-left","border-width","border-radius","outline-width","outline-offset","top","right","bottom","left","inset","inset-block","inset-inline","inset-block-start","inset-block-end","inset-inline-start","inset-inline-end","font-size","letter-spacing","word-spacing","text-indent","gap","row-gap","column-gap","grid-gap","grid-row-gap","grid-column-gap"]);function Wr(t){if(R(t))return;let e={value:""};if(d(t))e=t;else{if(!n(t)&&!it(t))return;e.value=t,e.important=!1}return e}function Hr(t){let e={};if(n(t)){const n=t.trim();return n&&n.split(";").filter((t=>t.trim())).forEach((t=>{const n=t.indexOf(":");if(n>0){const r=t.slice(0,n).trim();let s=Wr(t.slice(n+1).trim());s&&(e[r]=s)}})),e}let r={};if(Array.isArray(t))for(const e of t){const t=Hr(e);Object.assign(r,t)}else d(t)&&(r=t);return c(r,((t,n)=>{let r=function(t){if(t.startsWith("--"))return t;if(Or.has(t))return Or.get(t);const e=i(t);return Or.set(t,e),e}(n),s=Wr(t);s&&(Dr.has(r)&&!r.startsWith("--")&&ot(s.value)&&(s.value=s.value+"px"),e[r]=s)})),e}const Ur=Ln((function(t){return(t,e,n)=>{let r=t;const s=Hr(e[0]),o=new Set(Object.keys(s)),i=Lr.get(r);let a=Vr.get(r);a||(a={},Vr.set(r,a)),c(i,(t=>{o.has(t)||(r.style.removeProperty(t),delete a[t])})),c(s,((t,e)=>{const n=t.value+""+(t.important?" !important":"");a[e]!==n&&(r.style.setProperty(e,t.value+"",t.important?"important":""),a[e]=n)})),Lr.set(r,o)}}),[xn.TAG]),jr=["key","ref","emit-native"],Kr=new WeakMap,Br=new WeakMap,Fr=new WeakMap,$r=new WeakMap,zr="class",Gr="style";const Xr=Ln((function(t){return(t,[e],n,{renderComponent:r})=>{let s=t;if(function(t,e,n){const r=n?Pr(e):"",s=Br.get(t)??"";r!==s&&(s&&t.classList.remove(...s.split(" ").filter(Boolean)),r&&t.classList.add(...r.split(" ").filter(Boolean)),Br.set(t,r))}(s,e[zr],zr in e),function(t,e,n){const r=n?Hr(e):{},s=new Set(Object.keys(r)),o=Fr.get(t);let i=$r.get(t);i||(i={},$r.set(t,i)),o&&o.forEach((e=>{s.has(e)||(t.style.removeProperty(e),delete i[e])})),c(r,((e,n)=>{const r=e.value+""+(e.important?" !important":"");i[n]!==r&&(t.style.setProperty(n,e.value+"",e.important?"important":""),i[n]=r)})),Fr.set(t,s)}(s,e[Gr],Gr in e),n){let t=Kr.get(s);return t||(t={},Kr.set(s,t)),void c(e,((e,n)=>{jr.includes(n)||n===zr||n===Gr||(t[n]!==e||null!==e&&"object"==typeof e)&&(s.setAttribute(n,e),t[n]=e)}))}if(le(s)){let t={},n=St.get(s.constructor),o={};Kr.set(s,o),c(e,((e,r)=>{if(jr.includes(r)||r===zr||r===Gr)return;let i=a(r);(n?n[i]:void 0)?t[r]=e:(s.setAttribute(r,e+""),o[r]=e)})),ce(r,s,t)}else{let t={};Kr.set(s,t),c(e,((e,n)=>{jr.includes(n)||n===zr||n===Gr||(s.setAttribute(n,e),t[n]=e)}))}}}),[xn.TAG]),qr=new WeakMap,Qr=new WeakMap,Zr=new WeakMap;function Jr(t,e){let n=Oe.get(t);if(!n||0===n.length)return null;let r=n.join("."),s=Ie.get(e),o=s?.[n[0]];return{proxyRoot:r,ctxRoot:void 0!==o?[o,...n.slice(1)].join("."):r}}function Yr(t,e,n){let r=Pe.__varPathList,s=e+"."+n;for(let n=t;n<r.length;n++){let t=r[n];if(t===e||m(t,e+".")&&t!==s&&!m(t,s+"."))return!0}return!1}function ts(t,e,n,r,s,o){let i=[],a=[],l=!1,u=void 0!==r&&Pe.__collecting,h=0;return c(t,((t,s)=>{let o=u?Pe.__varPathList.length:0,c=er(e.call(n,t,s));u&&!l&&(l=Yr(o,r,h)),a.push(c);for(let t=0;t<c.length;t++)i.push(c[t]);h++})),void 0!==o&&void 0!==r&&void 0!==s&&(u?Zr.set(o,{keys:qr.get(o),varsPerItem:a,cross:l}):Zr.delete(o)),i}const es=Ln((function(t,e,n){return(t,s,o,{renderComponent:i,updatedMap:a})=>{let l=s[0];if(R(l)&&r(o))return[An.INIT];let u=qr.get(t);if(o&&u&&!R(l)&&o[0]===l){let r=Jr(l,i);if(r){let s=function(t,e){if(!t)return null;let n=Object.keys(t);if(0===n.length)return null;let r=e+".",s=new Set;for(let o=0;o<n.length;o++){let i=n[o];if(i===e||m(e,i+".")){if(t[i].end)return null;continue}if(!m(i,r))return null;let a=i.slice(r.length),l=a.indexOf("."),c=l<0?a:a.slice(0,l),u=Number(c);if(!Number.isInteger(u)||u<0||String(u)!==c)return null;s.add(u)}return s}(a,r.ctxRoot);if(s){let o=l,a=!1;for(let t of s){if(t>=o.length){a=!0;break}let n=e(o[t],t,t);if((W(n)?null:"string"==typeof n?n:String(n))!==u[t]){a=!0;break}}if(!a){let e=Zr.get(t);if(e&&e.keys===u&&!e.cross&&e.varsPerItem.length===u.length){let t=Pe.__collecting,a=!1;for(let l of s){let s=t?Pe.__varPathList.length:0;if(e.varsPerItem[l]=er(n.call(i,o[l],l)),t&&!e.cross&&Yr(s,r.proxyRoot,l)){e.cross=!0,a=!0;break}}if(!a){let t=[];for(let n=0;n<e.varsPerItem.length;n++){let r=e.varsPerItem[n];for(let e=0;e<r.length;e++)t.push(r[e])}return[An.REFRESH,t]}}return[An.REFRESH,ts(l,n,i,r.proxyRoot,r.ctxRoot,t)]}}}}const h=[],d=new Set;let p,f=0;if(c(l,((t,n)=>{let r=e(t,n,f++);if(W(r))return;const s="string"==typeof r?r:String(r);d.has(s)?te(`forEach - duplicate key in '${h}'`):(d.add(s),h.push(s))})),qr.set(t,h),o){if(R(h))return[An.REMOVE];if(u&&h.length===u.length&&function(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}(h,u)){let e=Jr(l,i);return[An.REFRESH,e?ts(l,n,i,e.proxyRoot,e.ctxRoot,t):ts(l,n,i)]}}Zr.delete(t);let g=s[2];if(Qr.has(t))p=Qr.get(t);else{let e=$(l)[0],n=l[e],r=g.call(i,n,e,0);p=new Wn(r,i),Qr.set(t,p)}return o?[An.UPDATE,p,h,u,g,l]:[An.INIT,n,p,l,e]}}),[xn.TEXT,xn.SLOT]);let ns=document.createElement("template"),rs=new WeakMap;const ss=Ln((function(t){return(t,e,n,{renderComponent:r})=>{if(!(n&&e[0]==n[0]||W(e[0])))if(at(t))t.innerHTML=tr(e[0]);else{let r=rs.get(t);r||(r=document.createTextNode(""),t.parentNode?.insertBefore(r,t),rs.set(t,r)),ns.innerHTML=tr(e[0]),s(n)||ae.remove(r,t),t.before(ns.content.cloneNode(!0))}}}),[xn.TAG,xn.TEXT,xn.SLOT]),os=new WeakMap,is=new WeakMap,as=new WeakMap,ls=Ln((function(t,e,n){return(t,[e,n,r],s,{renderComponent:o})=>{let i;if(s){if(!!e==!!s[0]){let e=os.get(t);return[An.REFRESH,e]}let a=e?n:r;return e?(i=is.get(t),i||(i=new Wn(a.call(o,e),o),is.set(t,i))):(i=as.get(t),i||(i=new Wn(a.call(o,e),o),as.set(t,i))),[An.REPLACE,a,i]}let a=e?n:r;return e?(i=is.get(t),i||(i=new Wn(a.call(o,e),o),is.set(t,i))):(i=as.get(t),i||(i=new Wn(a.call(o,e),o),as.set(t,i))),os.set(t,a),[An.INIT,a,i]}}),[xn.TEXT,xn.SLOT]),cs=new WeakMap,us=Ln((function(t,e){return(t,[e,n],r,{renderComponent:s})=>{let o=cs.get(t);return e&&!cs.has(t)&&(o=new Wn(n.call(s),s),cs.set(t,o)),r?r[0]?e?[An.REFRESH,n]:[An.REMOVE]:e?[An.REPLACE,n,o]:[An.NONE]:[An.INIT,...e?[n,o]:[]]}}),[xn.TEXT,xn.SLOT]);var hs;!function(t){t.CHANGE="change",t.INPUT="input"}(hs||(hs={}));const ds=Ln((function(t,e="value",r){return(t,[e,r,s],o,{varChain:i,renderComponent:a})=>{r=r??"value";const l=t;if(o){const t=o[0],n=e;if(!d(n)&&Object.is(n,t))return;if(l instanceof Rn)l.updateProps({[r]:n});else if(l instanceof HTMLTextAreaElement||l instanceof HTMLSelectElement){if(l.setAttribute(r,n+""),l instanceof HTMLSelectElement){let t=x(l.querySelectorAll("option"),(t=>t.value==n));t&&(t.selected=!0)}}else if(l instanceof HTMLInputElement){if(l.value==n)return;switch(l.type){case"checkbox":case"radio":n?l.setAttribute("checked",""):l.removeAttribute("checked");break;case"text":case"email":case"number":case"password":case"search":case"tel":case"url":l.setAttribute(r,n+""),S(l,r,n);break;default:l.setAttribute(r,n+"")}}return}let c;c=n(s)?lt(s)[0]:G(i);const u=ct(c,".")[0];let h=Ie.get(a),p="";h&&(p=h[u]),u in a||!p||p in a||te(`model - property '${u}' is not defined on the instance of `+a.tagName);let f=yn(a);if(d(e)||j(e)||(e=""),vt[l.tagName.toLowerCase()]){ce(a,l,{[r]:e}),pn(l,a,"update:"+r,(function(t){let e=this,n=(Ie.get(e)??{})[u];!(u in e)&&n&&_(e.wrapperComponent,u)===_(e,n)&&(e=e.wrapperComponent||e),S(e,c,t.value)}))}else if(l instanceof HTMLTextAreaElement){l.setAttribute(r,e+"");let t="input";f.push([t,function(t){let e=t.target;S(this,c,e.value)},l])}else if(l instanceof HTMLInputElement){let t="",n="";switch(l.type){case"checkbox":case"radio":t="checked",n="change";break;default:t="value",n="input"}l.setAttribute(r??t,e+""),f.push([n,function(t){let e=t.target;S(this,c,e.value)},l])}else l instanceof HTMLSelectElement&&(l.setAttribute(r,e+""),f.push(["change",function(t){let e=t.target,n=this,r=(Ie.get(n)??{})[u];!(u in n)&&r&&_(n.wrapperComponent,u)===_(n,r)&&(n=n.wrapperComponent||n),S(n,c,e.value)},l]))}}),[xn.TAG]),ps=new WeakMap,fs=Ln((function(t,e){return(t,[e,n],r)=>{if(r&&e===r[0])return;let s=t;if(!ps.has(s)){let t=s.style.display;ps.set(s,"none"==t?"unset":t)}s.style.display=e?ps.get(s):"none",n&&n(s,e)}}),[xn.TAG]),gs=Ln((function(t,e){return(t,[e,n],r,{renderComponent:s,slotComponent:o})=>{if(r)return;e=e.bind(s);let i=qt.get(o);i||(i={},qt.set(o,i)),i[n||"default"]=e}}),[xn.SLOT]),ms=new WeakMap,_s=new WeakMap,ws=Ln((function(t,e){return(t,[e,n],r,{renderComponent:s})=>{let o=()=>ir``,i=[],a=[];c(n,((t,e)=>{if(p(t))i.push(e),a.push(t);else{let e=t[0],n=t[1];i.push(e),a.push(n)}"default"===e&&(o=t)}));let l=ut(i,(t=>p(t)?t(e):t==e)),u=ms.get(t);ms.set(t,l);let h=_s.get(t);if(h||(h=[],_s.set(t,h)),!h[l]){let t=new Wn((a[l]??o).call(s),s);h[l]=t}return r?u==l?[An.REFRESH,a[l]??o]:[An.REPLACE,a[l]??o,h[l]]:[An.INIT,a[l]??o,h[l]]}}),[xn.TEXT,xn.SLOT]);class ys{static getCssText(t,e=!1){return n(t)?t:ht(O(t,((t,n)=>n.startsWith("--")?n+":"+t+(e?" !important":""):i(n)+":"+t+(e?" !important":""))),";")+";"}static setStyle(t,e){if(n(t)&&!j(t))return;let r=ys.getCssText(t);e.style.cssText=r}}function vs(){c(vt,((t,e)=>{customElements.get(e)||customElements.define(e,t)}))}export{Rn as CompElem,ys as CssHelper,ge as Csscope,hr as Decorator,ur as DecoratorType,dr as DecoratorWrapper,An as DirectiveUpdateTag,ae as DomUtil,xn as EnterPointType,hs as ModelTriggerType,vr as QueryCache,Hn as Template,$e as _getObservedAttrs,se as _getSuper,ce as addUninitializedSubComponentProp,Xr as bind,de as camelCaseCached,Ir as classes,gr as computed,cr as createRef,ar as css,me as csscope,mr as debounced,pr as decorator,fr as decoratorWithNoArgs,vs as defineComponents,Ln as directive,Vn as directiveScopeChecker,_r as emits,wr as event,es as forEach,be as getBaseSheets,ie as getBooleanValue,Te as getComponentDefaultProps,ue as getCssVarKey,Se as getDefaultCss,Ne as getGlobalDefaultProps,ir as h,ss as html,ls as ifElse,us as ifTrue,oe as isBooleanProp,le as isCompElemNode,Cr as makeState,ds as model,Pr as normalizeClass,Hr as normalizeStyle,yr as onced,Ke as prop,Sr as query,Nr as queryAll,ve as setDefaults,fs as show,te as showError,ee as showTagError,re as showTagWarn,ne as showWarn,gs as slot,Tr as state,Ur as styles,kr as tag,Rr as throttled,fe as typeNameLower,In as updateDirective,xr as watch,ws as when};
|
|
7
|
+
import t,{some as e,isString as n,isUndefined as r,isBlank as s,assign as o,kebabCase as i,camelCase as a,isArray as l,each as c,flatMap as u,test as h,isSymbol as d,isFunction as p,isObject as f,concat as g,startsWith as m,get as _,toArray as w,defaults as y,merge as v,clone as E,has as b,set as S,closest as N,remove as T,size as M,includes as C,noop as k,isEmpty as R,find as x,debounce as A,throttle as P,once as I,map as V,first as O,walkTree as L,filter as D,isNil as W,isNull as H,isDefined as U,trim as j,isBoolean as K,parseJSON as B,cloneDeep as F,keys as $,groupBy as z,last as G,reject as X,compact as q,initial as Q,except as Z,toString as J,reduce as Y,snakeCase as tt,range as et,replace as nt,bind as rt,isPlainObject as st,isNumeric as ot,isNumber as it,isElement as at,toPath as lt,split as ct,findIndex as ut,join as ht}from"myfx";const dt="default",pt=/\s+\.?key\s*=/;var ft,gt;!function(t){t[t.RENDER=1]="RENDER",t[t.COMPUTED=2]="COMPUTED",t[t.DIRECTIVE=3]="DIRECTIVE"}(ft||(ft={})),function(t){t.Prod="prod",t.Dev="dev"}(gt||(gt={}));const mt={boolean:Boolean,string:String,number:Number,object:Object,array:Array,function:Function,undefined:Object},_t=new Map,wt=new WeakMap,yt={},vt={},Et=new WeakMap,bt=new WeakMap,St=new WeakMap,Nt=new WeakMap,Tt=new Map,Mt=new Map,Ct=new Map,kt=new WeakMap,Rt=new WeakMap,xt=new WeakMap,At=new WeakMap,Pt=new WeakMap,It=new WeakMap,Vt=new WeakMap,Ot=new WeakMap,Lt=new WeakMap,Dt=new WeakMap,Wt=new WeakMap,Ht=new WeakMap,Ut=new WeakMap,jt=new WeakMap,Kt=new WeakMap,Bt=new WeakMap,Ft=new WeakMap,$t=new WeakMap,zt=new Map,Gt=new WeakMap,Xt=new WeakMap,qt=new WeakMap,Qt=new WeakMap,Zt="__data_",Jt="⟬Ċ⟭";class Yt{strings;vars;cssText;constructor(t,e){this.strings=t,this.vars=e}getCssText(){if(this.cssText)return this.cssText;let t="",e=this.strings.length-1;for(let n=0;n<=e;n++){const e=this.strings[n];let r=this.vars[n]??"";r instanceof Yt&&(r=r.getCssText()),t=t+e+r}return this.cssText=t,t}}function te(t){console.error("[CompElem]",t)}function ee(t,e){console.error(`[CompElem <${t}>]`,e)}function ne(...t){console.warn("[CompElem]",...t)}function re(t,e){console.warn(`[CompElem <${t}>]`,e)}function se(t){return Object.getPrototypeOf(t)}function oe(t){return t===Boolean||e(t,(t=>t===Boolean))}function ie(t){let e=t;return n(t)&&/(?:^true$)|(?:^false$)/.test(e)?e="true"===e:(r(e)||s(e))&&(e=!0),e}const ae={getNodes(t,e){let n=t.nextSibling;if(!e)return[n];let r=[];for(;n&&n!==e;)r.push(n),n=n?.nextSibling;return r},insertBefore:function(t,e){if(!t.parentNode)return;let n=document.createDocumentFragment();n.append(...e),t.parentNode.insertBefore(n,t)},remove:function(t,e){if(t===e)return void t?.parentNode?.removeChild(t);let n=t.nextSibling;for(;n&&n!==e;)n?.parentNode?.removeChild(n),n=t.nextSibling},clear(t){if(!t)return;let e=[],n=t=>{let r=t.childNodes;for(let t=0,s=r.length;t<s;t++){let s=r[t];s.nodeType===Node.ELEMENT_NODE&&(s instanceof Vn&&e.push(s),n(s))}};n(t);for(let t=0,n=e.length;t<n;t++)e[t].destroy()}};function le(t){return!!vt[t.tagName?.toLowerCase()]}function ce(t,e,n){let r=Xt.get(t);r||(r=new Map,Xt.set(t,r));let s=r.get(e)??{};r.set(e,o(s,n))}function ue(t,e){let n=$t.get(t);n||(n=new Map,$t.set(t,n));let r=n.get(e);return void 0===r&&(r="--"+i(e).replace(/^-+/,""),n.set(e,r)),r}const he=new Map;function de(t){let e=he.get(t);return void 0!==e||(he.size>1024&&he.clear(),e=a(t),he.set(t,e)),e}const pe=new WeakMap;function fe(t){let e=pe.get(t);return void 0===e&&(e=(t.name||"").toLowerCase(),pe.set(t,e)),e}var ge;function me(...t){return(e,n,r)=>{let s=r.get();return(l(s)?s:[s]).forEach((n=>{let r;if(n instanceof Yt){if(r=Kt.get(n.strings),!r){let t=n.getCssText();r=new CSSStyleSheet,r.replaceSync(t),Kt.set(n.strings,r)}}else n instanceof CSSStyleSheet&&(r=n);if(!r)return;let s=Bt.get(e);s||(s=new Map,Bt.set(e,s)),c(t,(t=>{if(t===ge.GLOBAL)return void(document.adoptedStyleSheets.includes(r)||(document.adoptedStyleSheets=[...document.adoptedStyleSheets,r]));let e=s.get(t);e||(e=[],s.set(t,e)),e.push(r)}))})),r}}!function(t){t.INNER="inner",t.HOST="host",t.GLOBAL="global"}(ge||(ge={}));let _e=[],we={},ye={};function ve(t){_e=u(t.css,(t=>{if(n(t)){let e=new CSSStyleSheet;return e.replaceSync(t),e}return t instanceof CSSStyleSheet?t:[]})),we=t.global,c(t,((t,e)=>{h(e[0],/[A-Z]/)&&(ye[e]=t)})),Ee.clear()}const Ee=new Map;function be(t){let e=Ee.get(t);return e||(e=[...Se(),...Bt.get(t)?.get(ge.INNER)??[]],Ee.set(t,e)),e}const Se=()=>_e,Ne=()=>we,Te=()=>ye;function Me(t,e){let n=e,r=Reflect.get(n[Zt],t);if(Ie&&Pe.push(t),null===r||"object"!=typeof r&&"function"!=typeof r)return r;let s=He.get(r);if(s||Ue.get(r)){let o=je.get(r);o||(o=new Set,je.set(r,o));let i=s??r;if(Ue.get(i)?.deref()!==e){let n=De.get(e);n||(n={},De.set(e,n));let r=We.get(i);r&&(n[r[0]]=t)}return o.add(n.__thisRef),i}if(f(r)&&!p(r)&&!(r instanceof Node)&&!Object.isFrozen(r)){let e=Ot.get(n.constructor),s=e?.has(t);s||(e=Lt.get(n.constructor),s=e?.has(t)),r=s||"slots"===t?r:Ke(r,n,t)}return r}function Ce(t,e,n){let r=n;if(!r.__inited)return void Reflect.set(r[Zt],t,e);let s=r[Zt][t],o=Dt.get(r.constructor),i=o?.get(t),a=He.get(s);if(i){if(!i.call(r,e,s,[t],e,s))return!0}else{if(Object.is(s,e))return!0;if(f(e)&&a===e)return!0}Reflect.set(r[Zt],t,e),$e(n,e,s,[t])}function ke(t,e,n,r,s,o){let i=function(t){let e=Vt.get(t);if(void 0!==e)return e;let n=Object.getPrototypeOf(t),r=xt.get(t)??xt.get(n);return e=r?{rootMap:r,watchKeysDeep:Rt.get(t)??Rt.get(n),watchDeepUpdateMap:Pt.get(t)??Pt.get(n),watchUpdateMap:At.get(t)??At.get(n),onceMap:kt.get(t)??kt.get(n)}:null,Vt.set(t,e),e}(t.constructor);if(!i)return;let{rootMap:a,watchKeysDeep:l,watchDeepUpdateMap:c,watchUpdateMap:u,onceMap:h}=i,d=r.split(".")[0],p=a?.get(d);p?.forEach((i=>{(r===i||m(i,r+".")&&!Object.is(_(t._getPrivateData(),i),_(e,i))||m(r,i+".")&&l?.includes(i)&&!Object.is(_(t._getPrivateData(),i),_(e,i)))&&g(w(u[i]),w(c[i])).forEach((a=>{a&&!0!==h.get(i)&&(t._watchUpdateArgsInNextTick?.set(a,{newValue:e,oldValue:n,chain:r.split("."),rootObjNew:s,rootObjOld:o,fullMatch:i===r}),t._watchUpdateSetInNextTick?.add(a),h.has(i)&&h.set(i,!0))}))}))}function Re(t,e){let n=Ht.get(t.constructor);n?.has(e)&&n.get(e)?.forEach((e=>{t._computedUpdateSetInNextTick.add(e)}))}function xe(t,e){let n=Ut.get(t.constructor);if(!n)return;let r=e.split("."),s="";r.forEach((e=>{s=s?s+"."+e:e,n.has(s)&&(t._cssUpdateInNextTick=!0)}))}const Ae=new Set;let Pe=[],Ie=!1,Ve=null;const Oe={popDirectiveQ(){let t=[],e=Pe;for(let n=0;n<e.length;n++){let r=e[n];Ae.has(r)||(Ae.add(r),t.push(r))}return Ae.clear(),t},start(t){Ie=!0,Pe=[],Ve=t},end(t,e){t&&e&&t._regSubViewDeps(Oe.popVarPathList(),e),Ie=!1,Ve=null},popVarPathList(){let t=Array.from(new Set(Pe));return Pe=[],t},getVarPathList:()=>Pe,isCollection:()=>Ie};function Le(){return Ve}const De=new WeakMap,We=new WeakMap,He=new WeakMap,Ue=new WeakMap,je=new WeakMap;function Ke(t,n,r){if(He.has(t))return He.get(t);if(Ue.has(t)){if(r){let r=je.get(t);r||(r=new Set,je.set(t,r)),e(r.values(),(t=>t.deref()===n))||r.add(new WeakRef(n))}return t}const s=new Proxy(t,{get(t,e,r){if(!e)return;const s=Reflect.get(t,e,r);if(d(e))return s;const o=l(t);if(p(s))return s;if("length"===e&&o)return s;if(95===e.charCodeAt(0)&&95===e.charCodeAt(1))return s;let i=We.get(r);if(Ie){let t=i?g(i):[];t.push(e),Pe.push(t.join("."))}if(null!==s&&"object"==typeof s&&He.has(s))return He.get(s);let a=s;if(f(s)&&!p(s)&&!(s instanceof Node)&&!Object.isFrozen(s)){let t=i?g(i):[];a=Ke(s,n),t.push(e),We.set(a,t),He.set(s,a)}return a},set(t,e,r,s){if(!e)return!1;let o=t[e],i=We.get(s)??[],a=g(i,[e]),l=Dt.get(n.constructor),c=l?.get(a[0]),u=a.length>1,h=r,d=o;if(u&&(d=h=n._getPrivateData()[a[0]]),c){if(!c.call(n,h,d,a,r,o))return!0}else if(Object.is(o,r))return!0;let p=r,f=Reflect.set(t,e,p);$e(n,p,o,a);let m=je.get(s),_=[];return m?.forEach((t=>{let e=t.deref();if(!e)return;if(e===n)return;if(e.isDestroyed)return void _.push(t);let r=(De.get(e)??{})[a[0]];if(void 0===r)return;let s=a.join(".");s=s.replace(a[0],r),$e(e,p,o,s.split("."),h,d)})),_.forEach((t=>{let e=t.deref();De.delete(e),m.delete(t)})),f}});return We.has(s)||We.set(s,r?[r]:[]),He.set(t,s),r&&Ue.set(s,new WeakRef(n)),s}function Be(t,e,n,r,s,o){t._notify(e,n,r,s,o)}function Fe(t,e,n,r){let s=r.join(".");ke(t,e,n,s,e,n),Re(t,s),xe(t,s)}function $e(t,e,n,r,s,o){s=s??e,o=o??n,r.length>1&&(o=s=t._getPrivateData()[r[0]]);let i=r.join(".");ke(t,e,n,i,s,o),Re(t,i),xe(t,i),Be(t,s,o,r,e,n)}class ze{static nextSet=new Set;static nextPending=!1;static next;static flush(){ze.nextPending=!1;let t=Array.from(ze.nextSet);ze.nextSet.clear(),t.forEach((t=>t())),t=null}static pushNext(t){ze.nextSet.add(t),ze.nextPending||(ze.nextPending=!0,ze.next())}}function Ge(t){if(1===arguments.length)return(e,n,r)=>{t.required=t.required||!1,t.attribute=!1!==t.attribute,Xe(e,n,t)};let e=arguments[0],n=arguments[1],r=arguments[2];t={type:void 0,required:!1,attribute:!0},r&&"function"==typeof r.type&&(t=y(r,t),r=void 0),t.shallow=t.shallow||!1,Xe(e,n,t)}function Xe(t,e,n,r){let s;if(!St.has(t.constructor)){const e={};let n=t.constructor;for(;(n=se(n))!==Vn;)v(e,E(St.get(n)??{}));s=new Set,c(e,((t,e)=>{if(t.attribute){let t=i(e);s?.add(t)}})),Mt.set(t.constructor,s),St.set(t.constructor,e)}if(n.attribute){s||(s=Mt.get(t.constructor));let n=i(e);s?.add(n)}if(n.model){let n=Nt.get(t.constructor);n||(n=[],Nt.set(t.constructor,n)),n.includes(e)||n.push(e)}if(b(t.constructor,"observedAttributes")||(t.constructor.observedAttributes=[]),s&&(t.constructor.observedAttributes=w(s)),S(St.get(t.constructor),e,n),n.hasChanged){let r=Dt.get(t.constructor);r||(r=new Map,Dt.set(t.constructor,r)),r.set(e,n.hasChanged)}if(n.shallow){let n=Lt.get(t.constructor);n||(n=new Set,Lt.set(t.constructor,n)),n.add(e)}Reflect.defineProperty(t,e,{get(){return Me(e,this)},set(n){Nt.get(t.constructor)?.includes(e)&&function(t,e,n){n.emit("update:"+t,{value:e})}(e,n,this)}})}(()=>{const t=Promise.resolve(),e=ze.flush;ze.next=()=>{t.then(e)}})();const qe=new Set;function Qe(t){return Mt.get(t)??Mt.get(se(t))??qe}const Ze=["resize","outside","mutate"],Je=new WeakMap,Ye=[],tn=[],en=[],nn=new WeakSet,rn="undefined"!=typeof ResizeObserver?new ResizeObserver((t=>{for(const e of t){const t=Array.isArray(e.contentBoxSize)?e.contentBoxSize[0]:e.contentBoxSize,n=Array.isArray(e.borderBoxSize)?e.borderBoxSize[0]:e.borderBoxSize;if(!nn.has(e.target)){nn.add(e.target);continue}let r=Je.get(e.target);r&&r.forEach((r=>{r({target:e.target,contentBoxSize:t,borderBoxSize:n,type:"resize"})}))}})):void 0;var sn;!function(t){t.Child="child",t.Tree="tree",t.Attr="attr",t.Char="char"}(sn||(sn={}));const on=new WeakMap,an="undefined"!=typeof MutationObserver?new MutationObserver((t=>{for(let e=0;e<t.length;e++){const n=t[e];let r=on.get(n.target);if(!r)return;let s={target:n.target},o=null;switch(n.type){case"subtree":s.type=sn.Tree,o=r[sn.Tree];break;case"childList":s.type=sn.Child,s.addedNodes=n.addedNodes,s.removedNodes=n.removedNodes,o=r[sn.Child];break;case"attributes":s.type=sn.Attr,s.attributeName=n.attributeName,s.oldValue=n.oldValue,o=r[sn.Attr];break;case"characterData":s.type=sn.Char,s.oldValue=n.oldValue,o=r[sn.Char]}o&&(s.type="mutate",o(s))}})):void 0;function ln(e,n,r,s,o,i){if("resize"===e)return function(t,e,n,r){if(!rn)return;let s=Je.get(t);s||(s=[],Je.set(t,s));let o=rn;if(r){let n=e;e=(...r)=>{n(...r),T(s,(t=>t===e)),M(s)<1&&(o.unobserve(t),Je.delete(t))}}return s.push(e),rn.observe(t),(n=!1)=>{T(s,(t=>t===e)),M(s)<1&&(o.unobserve(t),Je.delete(t),n&&(o=t=null))}}(n,r,0,i);if("outside"===e)switch(s[0]){case"mousedown":return function(e,n){return Ye.push([e,n]),(r=!1)=>{t.remove(Ye,(t=>t[0]===e&&t[1]===n))}}(n,r);case"dblclick":return function(e,n){return en.push([e,n]),(r=!1)=>{t.remove(en,(t=>t[0]===e&&t[1]===n))}}(n,r);default:return function(e,n){return tn.push([e,n]),(r=!1)=>{t.remove(tn,(t=>t[0]===e&&t[1]===n))}}(n,r)}else if("mutate"===e)return function(t,e,n){if(!an)return;let r=C(n,"child"),s=C(n,"attr"),o=C(n,"char"),i=C(n,"tree"),a=on.get(t);return a?void 0:(a={},on.set(t,a),r&&(a[sn.Child]=e),s&&(a[sn.Attr]=e),o&&(a[sn.Char]=e),i&&(a[sn.Tree]=e),an.observe(t,{childList:r,attributes:s,characterData:o,subtree:i}),(e=!1)=>{on.delete(t),e&&(t=null)})}(n,r,s)}"undefined"!=typeof document&&(document.addEventListener("mousedown",(t=>{let e=_(t.composedPath(),0,t.target);Ye.forEach((([n,r])=>{n.contains(e)||n.contains(N(e,(t=>t instanceof ShadowRoot),"parentNode")?.host)||r({type:"outside",target:n,modifier:"mousedown",event:t})}))}),!1),document.addEventListener("click",(t=>{let e=_(t.composedPath(),0,t.target);tn.forEach((([n,r])=>{n.contains(e)||n.contains(N(e,(t=>t instanceof ShadowRoot),"parentNode")?.host)||r({type:"outside",target:n,modifier:"click",event:t})}))}),!1),document.addEventListener("dblclick",(t=>{let e=_(t.composedPath(),0,t.target);en.forEach((([n,r])=>{n.contains(e)||n.contains(N(e,(t=>t instanceof ShadowRoot),"parentNode")?.host)||r({type:"outside",target:n,modifier:"dblclick",event:t})}))}),!1));const cn=/,|^(debounce:.+)|(debounce$)/,un=/,|^(throttle:.+)|(throttle$)/,hn="once",dn={esc:"escape"},pn=()=>{},fn=new WeakMap;function gn(t){let e=fn.get(t);return void 0===e&&(e=_(globalThis,t.name)!==t,fn.set(t,e)),e}function mn(t,e){let n,r=t??pn;if(n=x(e,(t=>cn.test(t)))){let t=n.split(":");r=A(r,parseInt(t[1])||100)}if(n=x(e,(t=>un.test(t)))){let t=n.split(":");r=P(r,parseInt(t[1])||100)}return e.includes(hn)&&(r=I(r)),r}function _n(t,e,n=!1){return function(t,e,n=!1){let r=e.includes("capture")||!1,s=e.includes("passive")||!1;return{handler:r=>{if(e.includes("prevent")&&r.preventDefault(),e.includes("stop")&&r.stopPropagation(),n||!e.includes("self")||r.target===r.currentTarget){if(r instanceof MouseEvent){if(e.includes("left")&&0!=r.button)return;if(e.includes("right")&&2!=r.button)return;if(e.includes("middle")&&1!=r.button)return}else if(r instanceof KeyboardEvent){let t=e.slice();if(T(t,(t=>"ctrl"==t))[0]&&!r.ctrlKey)return;if(T(t,(t=>"alt"==t))[0]&&!r.altKey)return;if(T(t,(t=>"shift"==t))[0]&&!r.shiftKey)return;if(T(t,(t=>"meta"==t))[0]&&!r.metaKey)return;let n=V(t,(t=>dn[t]||t));if(M(n)>0&&!n.includes(r.key.toLowerCase()))return}t(r)}},options:{capture:r,once:e.includes(hn)||!1,passive:s}}}(mn(t,e),e,n)}function wn(t,e,n,r){let s=_(t,"__c_emit_event_")??e._subComponentEventSn++;S(t,"__c_emit_event_",s);let o=e._subComponentEventMap.get(s);o||(o={},e._subComponentEventMap.set(s,o)),o[n]=r}const yn=new Set(["focus","blur","visibilitychange","wheel"]),vn=new Set(["mouseenter","mouseleave","pointerenter","pointerleave"]),En=new Set(["load","error","abort","play","pause","playing","waiting","canplay","canplaythrough","loadedmetadata","loadeddata","ended","timeupdate","volumechange","seeking","seeked","progress","stalled","suspend","emptied","ratechange","durationchange","loadstart","transitionstart","transitionrun","transitionend","transitioncancel","animationstart","animationend","animationcancel","animationiteration","scroll","slotchange"]),bn=new WeakMap;function Sn(t){let e=bn.get(t);return e||(e={bindList:[],docoEventMap:new Map,handlerMap:new WeakMap,releaseList:[],delegationKeySet:new Set,abortController:void 0,dispatch:e=>function(t,e){let n=t.renderRoot;if(!n)return;let r=e.type;const s=e.composedPath();let o=s.indexOf(n);if(o<0)return;let i=Sn(t);t:for(let t=0;t<=o;t++){const n=s[t];if(!(n instanceof HTMLElement))continue;let o=i.handlerMap.get(n)?.get(r);if(!R(o))for(let t=0;t<o.length;t++){let s=o[t];if((!s.parts.includes("self")||e.target===n)&&(s.parts.includes("once")&&(o.splice(t,1),t--,o.length<1&&i.handlerMap.get(n)?.delete(r)),s.handler(e),s.parts.includes("stop")))break t}}}(t,e)},bn.set(t,e)),e}function Nn(t){return Sn(t).bindList}function Tn(t){let e=Sn(t);e.abortController||(e.abortController=new AbortController)}function Mn(t){let e=Sn(t);const n=e.bindList;if(n.length>0){e.bindList=[];for(let e=0;e<n.length;e++){let r=n[e],s=r[0],o=r[1],i=r[2];if(!i)continue;if(r[3])continue;let a=o&&gn(o)?o.bind(t):o;Cn(t,s,a,i),r[3]=k}}let r=_t.get(t.constructor)??_t.get(se(t.constructor));r&&M(r)>0&&c(r,(({name:n,targetFn:r,fnName:s})=>{let o=n+"@"+s;if(e.docoEventMap.has(o))return;let i=r?r(t):t,a=_(t,s),l=a&&gn(a)?a.bind(t):a;Cn(t,n,l,i),e.docoEventMap.set(o,l)}))}function Cn(t,e,n,r){let{evName:s,parts:o}=function(t){let e=t.split(".");return{evName:e.shift(),parts:e}}(e);if(r instanceof Element){let e=vt[r.tagName?.toLowerCase()];if(e){let i=function(t,e){let n=t;for(;n&&n!==Vn;){let t=wt.get(n);if(t){if(t.has(e))return!0;for(let n of t)if(n.endsWith(":*")&&e.startsWith(n.slice(0,-1)))return!0}n=se(n)}return!1}(e,s);if(i)return void wn(r,t,s,mn(n,o))}}if(function(t){return Ze.includes(t)}(s)){let e=ln(s,r,mn(n,o),o,0,o.includes("once"));return void(e&&Sn(t).releaseList.push(e))}let i=function(t,e){if(!(e instanceof Element))return!1;let n=t.renderRoot;return!!n&&(e===n||n.contains(e))}(t,r)&&!En.has(s)&&!vn.has(s);if(i){let e=o.includes("capture")||yn.has(s);!function(t,e,n,r,s,o){if(!function(t,e,n){let r=t.renderRoot;if(!r)return!1;Tn(t);let s=Sn(t),o=(n?"c:":"b:")+e;return s.delegationKeySet.has(o)||(r.addEventListener(e,s.dispatch,{capture:n,signal:s.abortController.signal}),s.delegationKeySet.add(o)),!0}(t,e,o))return void kn(t,e,n,r,s);let{handler:i}=_n(n,r,!0),a=Sn(t),l=a.handlerMap.get(s);l||(l=new Map,a.handlerMap.set(s,l));let c=l.get(e);c||(c=[],l.set(e,c));c.push({handler:i,parts:r})}(t,s,n,o,r,e)}else kn(t,s,n,o,r)}function kn(t,e,n,r,s){Tn(t);let{handler:o,options:i}=_n(n,r);s.addEventListener(e,o,{capture:i.capture,once:i.once,passive:i.passive,signal:Sn(t).abortController.signal})}let Rn=0;const xn=new WeakMap,An={},Pn="slots",In={};class Vn extends HTMLElement{#t;#e={};__data_={};#n={};#r;__updateTree;__updateSubViewDeps;_cssUpdateInNextTick=!1;_cssVarOldValueMap;_watchUpdateSetInNextTick;_watchUpdateArgsInNextTick;_computedUpdateSetInNextTick;_subComponentEventSn=0;_subComponentEventMap=new Map;get[Symbol.toStringTag](){return this.constructor.name}get cid(){return this.#t}get attrs(){return this.#s}get props(){return this.#o}get renderRoot(){return this.#i?.deref()}get renderRoots(){return this.#a.flatMap((t=>t.deref()??[]))}get parentComponent(){return this.#l?.deref()}get wrapperComponent(){return this.#c?.deref()}get slots(){return An}get slotHooks(){return this.#u}get cssSheets(){return Bt.get(this.constructor)?.get(ge.INNER)}get isMounted(){return this.#h}#s;#o;#i;#a;#l;#c;#d={};#u={};#p={};#h=!1;#f=!1;#g;#m;get cssVars(){return{}}__inited=!1;#_=!1;#w;__thisRef;__superComp;constructor(...t){super(),this.#t=Rn++,this.__updateTree=[],this.__thisRef=new WeakRef(this),this.__superComp=se(this.constructor),this.#w=this.#y.bind(this),1===M(t)&&(this.#o={},o(this.#o,O(t))),Reflect.getOwnPropertyDescriptor(this.constructor.prototype,"slots")||Reflect.defineProperty(this.constructor.prototype,"slots",{get(){return Me("slots",this)},set(t){Ce("slots",t,this)}});let e=Tt.get(this.constructor)??Tt.get(this.__superComp);e&&e.sort(((t,e)=>e.priority-t.priority)).forEach((t=>t.create(this))),this.#v=this.#E.bind(this)}insertStyleSheet(t){if(!this.#r)return null;let e;if(t instanceof Yt){if(e=Ft.get(t),!e){let n=t.getCssText();e=new CSSStyleSheet;try{e.replaceSync(n)}catch(t){}Ft.set(t,e)}}else if(t instanceof CSSStyleSheet){if(this.#r.adoptedStyleSheets.includes(t))return t;e=t}return e&&!this.#r.adoptedStyleSheets.includes(e)&&(this.#r.adoptedStyleSheets=[...this.#r.adoptedStyleSheets,e]),e}get rootComponent(){let t=this;for(;t.parentComponent;)t=t.parentComponent;return t}#v;connectedCallback(){let t=N(this.parentNode,(t=>t instanceof Vn||t.host instanceof Vn),"parentNode");this.#l=t?t instanceof Vn?new WeakRef(t):new WeakRef(t.host):void 0;let e=Qt.get(this);e&&(this.#c=new WeakRef(e),Qt.delete(this));let n=Bt.get(this.constructor)?.get(ge.HOST);if(n){let t=this.#c?.deref()?.shadowRoot??this.#l?.deref()?.shadowRoot;t&&t.contains(this)||(t=this.ownerDocument),c(n,(e=>{t.adoptedStyleSheets.includes(e)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,e])}))}this.setup()}disconnectedCallback(){}beforeDestroyed(){}destroyed(){}get isDestroyed(){return this.#b}#b=!1;destroy(){if(this.#b)return;this.#b=!0;let t=Tt.get(this.constructor)??Tt.get(this.__superComp);if(t?.forEach((t=>{t.destroy(this)})),this.beforeDestroyed(),function(t){let e=Sn(t);e.abortController?.abort(),e.abortController=void 0,c(e.releaseList,(t=>{"function"==typeof t&&t(!0)})),e.releaseList=[],e.docoEventMap.clear(),e.handlerMap=new WeakMap,e.delegationKeySet.clear(),e.bindList.length=0}(this),Gt.get(this)?.clear(),Gt.delete(this),this._watchUpdateArgsInNextTick?.clear(),this._watchUpdateSetInNextTick?.clear(),this._computedUpdateSetInNextTick?.clear(),this._computedUpdateSetInNextTick=null,this.__updateSubViewDeps?.clear(),this.#l){let t=this.#l.deref();t&&L(t.__updateTree,(e=>{e.__destroyed||e.node===this&&(e.destroy(t),T(e.parent?e.parent.children:t.__updateTree,(t=>t===e)))}))}this.#r&&ae.clear(this.#r),c(this.__updateTree,(t=>t?.destroy(this))),c(this.#d,(t=>{xn.delete(t),t.remove()})),c(this.#p,(t=>{c(t,(t=>t.remove()))})),c(this.__data_.slots,((t,e)=>{c(t,(t=>t.remove()))})),this.#S.clear(),this.#w=this.__thisRef=this.#p=this.#d=this.#S=this.#e=this.__data_.slots=null,this.remove(),this.#i=this.#a=this.#r=this.#n=this.#s=this.#o=this.#i=this.#a=this.#u=this.#v=this.__data_=this.__updateTree=this.#l=this._asyncDirectives=this.#c=null,this.#m=null,this.destroyed()}setup(){if(this.__inited)return;if(this.#_)return;this.#_=!0;const t=this.#N();this.#o={},o(this.#o,t),this.propsReady(t);for(const e in t){const n=t[e];this.__data_[e]=n}this.#T(),this.__data_.slots={},Reflect.defineProperty(this.__data_,"__isData",{enumerable:!1,value:!0});let e=this.__superComp;if(xt.get(this.constructor)??xt.get(e)){this._watchUpdateSetInNextTick=new Set,this._watchUpdateArgsInNextTick=new Map;let t=kt.get(this.constructor)??kt.get(e),n=It.get(this.constructor)??It.get(e);c(n,((e,n)=>{let r=_(this,n);e.forEach((t=>{t.call(this,r,void 0,n)})),t.has(n)&&t.set(n,!0)}))}let n=Wt.get(this.constructor);if(void 0===n&&(n=o({},Et.get(this.constructor),Et.get(e)),Wt.set(this.constructor,n)),n){this._computedUpdateSetInNextTick=new Set;let t=Ht.get(this.constructor);t?c(n,((t,e)=>{this[Zt][e]=t.call(this)})):(t=new Map,Ht.set(this.constructor,t),c(n,((e,n)=>{S(e,"key",n),Oe.start(this),this[Zt][n]=e.call(this),Oe.end(),Oe.popVarPathList().forEach((n=>{let r=t.get(n);r||(r=new Set,t.set(n,r)),r.add(e)}))})))}Oe.start(this);let r=this.render();Oe.end();let i,a=Oe.popVarPathList();Ct.has(this.constructor)||Ct.set(this.constructor,new Set(a)),null===r?(this.#a=[],this.#i=void 0):(this.#r=this.attachShadow({mode:"open"}),this.#r.adoptedStyleSheets=be(this.constructor),i=function(t,e){let n,r=[];rr.has(e.constructor)?(n=rr.get(e.constructor),r=ir(t)):(n=new Bn(t,e,r),rr.set(e.constructor,n));let[s,o]=lr(e,n,r);return e.__updateTree=o,s}(r,this),i&&M(i.children)>0&&(this.#a=D(i.children,(t=>t.nodeType===Node.ELEMENT_NODE)).map((t=>new WeakRef(t))),this.#i=this.#a[0])),this.__inited=!0,this.#M();let l=qt.get(this);l&&(this.#u=l,qt.delete(this)),c(this.#u,((t,e)=>{this.#C(e)}));const u=this;let h=Tt.get(this.constructor)??Tt.get(this.__superComp);if(h?.forEach((t=>{t.beforeMount(this,((t,e)=>(u.__data_[t]=e,u.__data_[t])))})),this.beforeMount(),this.isDestroyed)return;this.#h=!0,Oe.start(this);let d=this.cssVars;if(Oe.end(),!R(d)){this._cssVarOldValueMap={};let t=Ut.get(this.constructor);t||(t=new Set(Oe.popVarPathList()),Ut.set(this.constructor,t));let e="";c(d,((t,n)=>{let r=ue(this.constructor,n);(s(t)||W(t))&&(t="initial"),this._cssVarOldValueMap[r]=t,e+=";"+r+":"+t})),this.style.cssText+=e}i&&M(i.children)>0&&(this.#r.append(i),Xt.delete(this)),h&&h.forEach((t=>{t.mounted(this,((t,e)=>(u.__data_[t]=e,u.__data_[t])))})),this.#g&&this.#g.forEach((t=>ze.pushNext(t))),this.#f&&ze.pushNext(this.#v),Mn(this),this.mounted()}propsReady(t){}render(){return null}beforeMount(){}mounted(){}#y(t){let e=t.currentTarget,n="";c(this.#d,((t,r)=>{if(t===e)return n=r,!1})),this.__inited&&this.#k(e,n===dt?"":n)}#k(t,e){this.#M();let n=_(this.#e[e],"props");n&&c(this.slots,((t,e)=>{t.filter((t=>t.nodeType===Node.ELEMENT_NODE)).forEach((t=>{t instanceof Vn?t.updateProps(n):c(n,((e,n)=>{if(t instanceof HTMLSlotElement){let r=xn.get(t);if(r){let s=t.name||dt,o=r.#e[s];o||(o=r.#e[s]={props:{}}),o.props||(o.props={}),o.props[n]=e,r.#k(t,s)}}else t.setAttribute(n,e)}))}))})),this.slotChange(t,e)}slotChange(t,e){}attributeChangedCallback(t,e,n){if(!this.__inited)return;if(Object.is(n,e))return;"undefined"===n&&(n=null);let r=de(t),s=St.get(this.constructor)??St.get(this.__superComp);if(oe(_(s,r).type)){let t=!H(n)&&ie(n);if(_(this,r)===t)return}this.#R(t,e,n)}shouldUpdate(t){return!0}updated(t){}_notify(t=void 0,e,n,r,s){let o=[],i=this,a="";for(let l=0;l<n.length;l++){const c=n[l];o.push(c),i=null==i?i:i[c];let u=i??t;a=0===l?c:a+"."+c,this.#n[a]={value:u,chain:a===Pn?[Pn]:o,oldValue:e,end:o.length===n.length,subNewValue:r,subOldValue:s}}this.isMounted?ze.pushNext(this.#v):this.#f=!0}requestUpdate(t,e,n,r,s){Be(this,t,e,n,r,s)}#E(){if(M(this.#n)<1)return;if(!this.isMounted)return;const t=this.#n;if(this.#n={},!this.shouldUpdate(t))return;let e=Tt.get(this.constructor)??Tt.get(this.__superComp);e?.forEach((e=>{e.updated(this,t)})),this._watchUpdateSetInNextTick?.forEach((t=>{let{newValue:e,oldValue:n,chain:r,rootObjNew:s,rootObjOld:o,fullMatch:i}=this._watchUpdateArgsInNextTick.get(t),a=i?e:s,l=i?n:o;t.call(this,a,l,r,e,n)})),this._watchUpdateSetInNextTick?.clear(),this._watchUpdateArgsInNextTick?.clear();let n=0;for(;this._computedUpdateSetInNextTick?.size>0&&n<10;){n++;let e=Array.from(this._computedUpdateSetInNextTick);this._computedUpdateSetInNextTick.clear(),e.forEach((e=>{let n=_(e,"key"),r=this.__data_[n],s=e.call(this);(f(s)||s!==r)&&(this.__data_[n]=s,Fe(this,s,r,[n]),t[n]={value:s,chain:[n],oldValue:r,end:!0})}))}if(this._cssUpdateInNextTick){let t=this.cssVars;c(t,((t,e)=>{let n=ue(this.constructor,e);this._cssVarOldValueMap[n]!=t&&((s(t)||W(t))&&(t="initial"),this._cssVarOldValueMap[n]=t,this.style.setProperty(n,t+""))}))}let r,o=!1,i=Ct.get(this.constructor);if(c(t,((t,e)=>{if(!o&&i?.has(e)&&(o=!0),this.__updateSubViewDeps?.has(e)){let t=this.__updateSubViewDeps.get(e);t&&(r||(r=new Set),t.forEach((t=>{r.add(t)})))}})),this.#i?.deref()){if(o){let e=ir(this.render()),n=this.#m;if(this.#m=e,ur(e,this,this.__updateTree,r,t,n),n)for(let t=0;t<n.length;t++){let e=n[t];null!==e&&"object"==typeof e&&(n[t]=void 0)}}r&&r.size>0&&r.forEach((e=>{!function(t,e,n,r){if(!t||t.__destroyed)return;let s=t.node;const[o,i,a,l]=t.value;let c,u=t.getSlotComponent(e);if(!n){let n=o(s,t.value[1],i,{renderComponent:e,slotComponent:u,varChain:l,updatedMap:r,pointType:_(zt.get(a),[0],On.TEXT)});if(!n)return;if(n[0]!==Ln.REFRESH)return;c=p(n[1])?ir(n[1].call(e,t.value[1][0])):n[1]}if(!c)return;ur(c,e,t.children,void 0,r)}(e,this,void 0,t)}))}this.#S.forEach((t=>{this.#C(t)})),this.updated(t)}#N(){let t,e=St.get(this.constructor)??St.get(this.__superComp),n=this.attributes,s=this.tagName,a=Xt.get(this.wrapperComponent)?.get(this)??null;t=null==this.#o?a??In:null==a?this.#o:v(this.#o,a);let c={};for(let t=0,r=n.length;t<r;t++){let{name:r,value:s}=n[t];if(r[0]===Gn||r[0]===Xn||r[0]===qn||r===Jn||"slot"===r)continue;let o=de(r);e&&!e[o]&&(c[r]=s)}this.#s=this.#s?o(this.#s,c):c;let u={};if(!e)return u;let h=Object.keys(e),d=h.length;for(let o=0;o<d;o++){const a=h[o],c=i(a),d=this.hasAttribute(c);let p,g=e[a],m=b(t,a),w=_(this,a);if(!("_defaultValue"in g)&&(g._defaultValue=w,!g.type)){r(w)&&ee(s,"Prop '"+a+"' has neither propType nor defaultValue be used for type inference");let t=typeof w;l(w)&&(t="array");let e=mt[t];g.type=e}if(m)p=W(t[a])?w:t[a];else{p=w;let t=n.getNamedItem(c)||n.getNamedItem(Xn+c)||n.getNamedItem(c+Xn);t&&(m=!0,p=t.value)}if(g.required&&!m){ee(s,"Prop '"+a+"' is required");break}p=this.#x(e,a,p,d),g.attribute&&U(p)&&!f(p)&&this.#A(g,a,p),this.__data_[a]=p,d&&(u[a]=p),delete this[a]}return u}#A(t,e,n){let r=i(e),s=j(n);oe(t.type)?(s=ie(n),K(s)?s&&!this.hasAttribute(r)?this.toggleAttribute(r,!0):!s&&this.hasAttribute(r)&&this.toggleAttribute(r,!1):this.getAttribute(r)!==s&&this.setAttribute(r,s)):this.getAttribute(r)!==s&&this.setAttribute(r,s)}#P(t,e){let n=t;try{for(let r=0;r<e.length;r++){const s=e[r];n=s===Boolean?ie(t):s===Number?Number(t):s===String?String(t):s===Object||s===Array?B(t):s===Date?new Date(t):new s(t)}}catch(e){ee(this.tagName,"Convert attribute error with "+t)}return n}#x(t,r,s,o){let i=t[r];if(!i)return s;let a=i.isValid,c=i.type,u=l(c)?c:[c],h=i.converter,d=s;if(!e(u,(t=>t===String))&&n(d)&&!H(d))try{d=h?h(d):this.#P(d,u)}catch(t){ee(this.tagName,`Convert attribute '${r}' error with `+d)}for(let t=0;t<u.length;t++){"Boolean"===u[t].name&&o&&(d=ie(d))}if(W(d))return d;let p=typeof d,f=!U(d);for(let t=0;t<u.length;t++){const e=u[t];if(p===fe(e)||d instanceof e||Object.prototype.toString.call(d)===Object.prototype.toString.call(e.prototype)){f=!0;break}}return f||ee(this.tagName,`Invalid prop '${r}'. expected '${u.map((t=>t.name||t))}' but got '${p}'`),a&&(a.call(this,d,this.__data_)||ee(this.tagName,`Invalid prop '${r}'. IsValid() check failed`)),d}#T(){let t=bt.get(this.constructor)??bt.get(this.__superComp);t&&c(t,((e,n)=>{let r=t[n],s=_(this,n);if(r){let t=r.prop;s=t?F(this.__data_[t]):_(this,n)}this.__data_[n]=s,delete this[n]}))}updateProps(t,e=!1){let n=St.get(this.constructor)??St.get(this.__superComp);if(!n)return;if(!this.__inited)return void o(this.#o,t);let r=[];c(t,((s,o)=>{let i=de(o),a=n[i];if(!a)return;s=this.#x(n,i,s);let l=this.__data_[i];if(!e){let t=Dt.get(this.constructor),e=t?.get(i);if(e){if(!e.call(this,s,l,[i],s,l))return!0}else if(f(s)){let t=Lt.get(this.constructor);if(t?.has(i)&&Object.is(l,s))return!0}else if(Object.is(l,s))return!0}a.attribute&&U(s)&&!f(s)&&r.push([a,i,s]),S(this.__data_,i,s),t[i]=s,$e(this,s,l,[i])})),o(this.#o,t),r.forEach((([t,e,n])=>{this.#A(t,e,n)}))}_initProps(t,e){this.#o=v(this.#o||{},t),this.#s=v(this.#s||{},e),c(t,((t,e)=>{if(f(t)){let n=We.get(t);if(n){let t=this.wrapperComponent?bt.get(this.wrapperComponent?.constructor):null,r=n[0];if(t&&t[r]){let n=St.get(this.constructor);S(n,[e,"shallow"],t[r].shallow)}}}}))}_bindSlot(t,e,n){this.#d[e]||(this.#d[e]=t,xn.set(t,this));if(Cn(this,"slotchange",this.#w,t),!R(n)){let t=this.#e[e];t||(t=this.#e[e]={}),t.props=n}}#S=new Set;_updateSlot(t,e,n){let r=this.#d[t],s=this.#u[t];if(!s&&!r)return;let o=this.#e[t];if(e&&(o.props||(o.props={}),o.props[e]=n),s)this.#S.add(t);else{let t=r.assignedElements({flatten:!0});for(let r=0;r<t.length;r++){t[r].setAttribute(e,n+"")}}}#M(){if(!this.#i)return;let t=$(this.#d);if(R(t))return;const e=u(this.childNodes,(t=>t.nodeType===Node.COMMENT_NODE||t.nodeType===Node.TEXT_NODE&&s(t.textContent)?[]:t instanceof HTMLSlotElement?t.assignedNodes({flatten:!0}):t));let n=z(e,(e=>{if(e.nodeType===Node.TEXT_NODE&&t.includes(dt))return dt;if(e instanceof Element){let n=e.getAttribute("slot")||dt;if(t.includes(n))return n}}));if(R(n))return void(this.slots={});c(n,((t,e)=>{if(e){for(;t.length>0;){let e=t[0];if(!(e.nodeType===Node.TEXT_NODE&&s(e.textContent)||e instanceof HTMLSlotElement&&R(e.assignedNodes({flatten:!0}))))break;t.shift()}for(;t.length>0;){let e=G(t);if(!(e.nodeType===Node.TEXT_NODE&&s(e.textContent)||e instanceof HTMLSlotElement&&R(e.assignedNodes({flatten:!0}))))break;t.pop()}}}));let r={};c(n,((t,e)=>{R(t)||(r[e]=t)})),this.slots=r}#C(t){let e=this.#u[t];if(!e)return;let n=this.#e[t];if(!this.__data_.slots)return;if(!this.__data_.slots[t])return;this.renderAsync(e,_(n,"props"));const r=this._asyncDirectives.get(e);let s=r?.buildView(e(_(n,"props"))),o=X(w(s),(t=>t.nodeType===Node.COMMENT_NODE));if(o){let e=this.#p[t];if(!R(e))for(let t=0;t<e.length;t++){const n=e[t];n.parentNode?.removeChild(n)}this.#p[t]=o,this.append(...o),this.#S.clear()}}_asyncDirectives=new WeakMap;renderAsync(t,...e){}#R(t,e,n){if(!this.__inited)return;if(Qe(this.constructor).has(t)){let e=de(t);if(H(n)){let t=St.get(this.constructor)??St.get(this.__superComp);t&&(n=t[e]._defaultValue)}this.updateProps({[e]:n})}}_regSubViewDeps(t,e){this.__updateSubViewDeps||(this.__updateSubViewDeps=new Map),t.forEach((t=>{let n=this.__updateSubViewDeps.get(t);n||(n=new Set,this.__updateSubViewDeps.set(t,n)),n.add(e)}))}_getPrivateData(){return this.__data_}emit(t,e={},n){if(n&&(e.event=n),e.target=this,b(this.#s,"emit-native"))this.dispatchEvent(new CustomEvent(t,{bubbles:!1,composed:!1,cancelable:!0,detail:e}));else{let n=_(this,"__c_emit_event_");if(!this.wrapperComponent)return;!function(t,e,n,r){let s=t._subComponentEventMap.get(e),o=_(s,n);p(o)&&o.call(t,r)}(this.wrapperComponent,n,t,e)}}nextTick(t){if(!this.isMounted)return this.#g||(this.#g=[]),void this.#g.push(t);ze.pushNext(t)}forceUpdate(){let t=Ct.get(this.constructor);t&&t.size>0?t.forEach((t=>{this.#n[t]={value:void 0,chain:void 0}})):this.#n.__force__={value:void 0,chain:void 0},this.#E()}}var On,Ln,Dn;function Wn(t,e,n,r,s,o,i,a,u,h){let d,f=zt.get(t),g=f?f[0]:"";if(g===On.TEXT||g===On.SLOT?(Oe.start(o),d=s(e,n,r,{renderComponent:o,slotComponent:i,varChain:a,updatedMap:h,pointType:g}),Oe.end(o,u)):d=s(e,n,r,{renderComponent:o,slotComponent:i,varChain:a,updatedMap:h,pointType:g}),!d)return;let[y,v,E,b,N,M]=d;if(y===Ln.NONE)return;if(y===Ln.REFRESH){let t=d[1],e=p(t)?ir(t.call(o,n[0])):t;return e&&ur(e,o,u.children,void 0,h),!0}let C=M;l(M)||(C=V(M,((t,e)=>t)));let k=u.__subViewId;void 0===k&&(k=u.__subViewId=_(e,"__anchor__"));let x=u.__parentViewsIdMap;void 0===x&&(x=u.__parentViewsIdMap={},c($(e),(t=>{"__anchor__"!==t&&m(t,"__c-")&&(x[t]=_(e,[t]))})));let A=u.subViewRootNodes,P=u.children;if(y===Ln.REMOVE){let t=[];c(A,((e,n)=>{if(l(e))c(e,(t=>{t.remove(),t instanceof Vn&&t.destroy()}));else{let n=e;n.remove(),t.push(e),n instanceof Vn&&n.destroy()}})),t.forEach((t=>{T(A,(e=>e===t))})),P?.forEach(((t,e)=>{t.destroy(o),P[e]=null})),u.children=q(P),l(A)?u.subViewRootNodes=[]:u.subViewRootNodes={}}else if(y===Ln.REPLACE){c(A,(t=>{t.remove(),t instanceof Vn&&t.destroy()})),P?.forEach(((t,e)=>{t.destroy(o),P[e]=null})),u.children=q(P);let[,t,n]=d;cr(e,u,t,n,o)}else if(y===Ln.UPDATE){if(R(A))return void cr(e,u,N,v,o,M,((t,e,n)=>E[n]));let t={},n={},r=e.parentElement.childNodes,s="__c-"+k;for(let e=0;e<r.length;e++){let n=r[e],o=n[s];if(null!=o){let e=t[o];e||(e=t[o]=[]),e.push(n)}}u.children?.forEach((t=>{n[t.key]?n[t.key].push(t):n[t.key]=[t]}));let i=b,a=E,l=new Map,d=new Map;i.forEach(((t,e)=>{l.set(t,e)})),a.forEach(((t,e)=>{d.set(t,e)}));const p=new Uint8Array(i.length),f=[];for(let t=0;t<a.length;t++){const e=l.get(a[t]);void 0!==e&&(p[e]=1,f.push(a[t]))}const g=[];for(let t=0;t<i.length;t++)p[t]||g.push(i[t]);let m,_=[],y=[],T=!1;if(!R(a)){let e=-1,n=[],r=[],s=0,o=0;for(;o<a.length;o++){const i=a[o];let c=l.get(i)??-1;if(c<0){let e=a[o-1];t[i]=[],_.push({refKey:e,newKey:i}),s++}else if(c>-1&&c!==o-s){if(e<0||1===Math.abs(e-c)){let e=G(n),r=0===o?Dn.AFTER_BEGIN:e?e.newKey:a[o-1],s=!1;0!==o&&R(t[r])&&(s=!0),n.push({newKey:i,refKey:r,refNew:s})}else{r.push({moveGroup:n,moveIndex:o+n.length});let e=a[o-1],s=!1;R(t[e])&&(s=!0),n=[],n.push({newKey:i,refKey:e,refNew:s})}e=c}}if(n.length>0&&r.push({moveGroup:n,moveIndex:o+n.length}),r.length>0){T=!0;let e=r.sort(((t,e)=>t.moveGroup.length-e.moveGroup.length));if(e.length<2){let{moveGroup:n}=e[0];if(n.length>1){let t=G(n).refKey;n[n.length-2].newKey===t&&(n=Q(n))}Hn(n,t,b)}else e.forEach((({moveGroup:e})=>{e[0].refNew?y.push(e):Hn(e,t,b)}))}}if(_.length>0&&(_.forEach((e=>{let n=d.get(e.newKey)??-1,r=C[n],s=ir(N.call(o,r,e.newKey,n)),[i,a]=lr(o,v,s);e.fragment=i,c(a,(t=>{t.key=e.newKey,u.children?.push(t)}));let l=w(i.childNodes),h=t[e.newKey],p=e.newKey+"";c(l,(t=>{h.push(t),S(t,"__c-"+k,p),c(x,((e,n)=>S(t,n,e)))}))})),Mn(o),m=function(t){let e,n=[];return t.forEach((t=>{let r=G(n);r&&e===t.refKey?(r.group||(r.group=[r.fragment]),r.group.push(t.fragment)):n.push(t),e=t.newKey})),n}(_),m.forEach(((n,r)=>{let s=n.fragment,o=t[n.refKey??b[0]],i=O(o),a=G(o);if(n.group){let t=document.createDocumentFragment();t.append(...n.group),s=t}i===e?i.before(s):n.refKey?"string"==typeof i||a.after(s):i.before(s)}))),c(y,(e=>{Hn(e,t,b)})),g.forEach((e=>{t[e].forEach((t=>{t.parentNode?.removeChild(t)})),n[e].forEach((t=>{t.destroy()}))})),T||g.length>0||m){const t=z(P,(t=>t.key));let e=[],n=0;a.forEach((r=>{t[r]&&t[r].forEach((t=>{t.varIndex=n++,e.push(t)}))})),Z(P,e).forEach((t=>t.destroy(o))),u.children=e}if(T||g.length>0||m){let e={};c(C,((n,r)=>{let s=E[r],o=t[s];e[s]=o})),u.subViewRootNodes=e}if(f.length>0){let t=[];c(M,((e,n,r,s)=>{let i=e,a=ir(N.call(o,i,n,s));for(let e=0;e<a.length;e++)t.push(a[e])})),ur(t,o,u.children,void 0,h)}}return!0}function Hn(t,e,n){t.forEach((({refKey:t,newKey:r})=>{let s=e[r];if(t===Dn.AFTER_BEGIN){let t=e[n[0]];O(t).before(...s)}else if(e[t]){let n=e[t],r=G(n);r?.after(...s)}}))}function Un(t,e){return zt.set(t,e),(...e)=>[t(...e),e,t,Oe.popDirectiveQ()]}function jn(t,e,n){zt.get(t)}!function(t){t.ATTR="attr",t.PROP="prop",t.TEXT="text",t.SLOT="slot",t.TAG="tag"}(On||(On={})),function(t){t.NONE="NONE",t.REFRESH="REFRESH",t.REMOVE="REMOVE",t.REPLACE="REPLACE",t.UPDATE="UPDATE",t.INIT="INIT"}(Ln||(Ln={})),function(t){t.AFTER_BEGIN="afterbegin"}(Dn||(Dn={}));const Kn=new RegExp(`([a-z0-9"'${Jt}])\\s*>\\s*<`,"img");class Bn{updatePointMetas;fragment;emptyEvents;upmMap;slotNodeMap;constructor(t,e,n){let[r,u]=this.parseTemplate(t);n&&o(n,u),this.updatePointMetas=[],this.emptyEvents={},this.fragment=function(t,e,n,r,o){const u=document.createElement("template");u.innerHTML=e;const h=document.createNodeIterator(u.content,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT);let d,f,g=0,m=-1,_=-1;for(;d=h.nextNode();)if(m++,f&&!f.contains(d)&&(f=void 0,_=-1),d instanceof HTMLElement||d instanceof SVGElement){le(d)&&(f=d,_=m);let e={};const c=d.attributes,u=[];for(let h=0;h<c.length;h++){let w=c[h].name,y=c[h].value;if(w!==nr)if(Yn.test(w)){let e=n[g];if(l(e)&&p(e[0])){let[,,n,s]=e;jn(n,On.TAG,r.tagName);let o=new zn(g);o.isDirective=!0,o.directiveType=On.TAG,o.nodeSn=m,o.directiveVarChain=s,f&&(o.slotNodeSn=_),t.push(o),g++}u.push(w)}else if(w[0]!==Gn)if(w!==Jn)if(G(w)!==Xn){if(y.includes(Jt)){let e=new zn(g);if(e.attrName=w.replace(/\.|\?|@/,""),e.nodeSn=m,f&&(e.slotNodeSn=_),w[0]===Xn||w[0]===qn||w[0]===Qn){if(w[0]===qn)e.isToggleProp=!0,e.attrName=w.substring(1);else if(w[0]===Qn){e.isRefAttr=!0;let t=w.substring(1);const[n,r]=t.split(Zn);let s=n;switch(r){case"camel":s=a(s);break;case"kebab":s=i(s);break;case"snake":s=tt(s)}e.attrName=s}else{let t=vt[d.tagName.toLowerCase()];St.get(t);{let t=a(w.substring(1));e.isProp=!0,e.attrName=t}}u.push(w)}else e.attrTmpl=y,e.isPureTmpl=y===Jt+g;t.push(e),g++}}else{e[w.substring(0,w.length-1)]=y,u.push(w);let t=new zn(g);t.attrName=w.substring(0,w.length-1),t.nodeSn=m,t.isPropPerfix=!0}else{if(Yn.test(y)){n[g];let e=new zn(g);e.isRef=!0,e.nodeSn=m,t.push(e),g++}u.push(w)}else{let e=w.substring(1);if(Yn.test(y)){let r=new zn(g);r.isEvent=!0,r.attrName=e,r.nodeSn=m,t.push(r),n[g],g++}else if(s(y)){let t=o[m];t||(t=o[m]=[]),t.push(e)}u.push(w)}}for(let t=0;t<u.length;t++)d.removeAttribute(u[t])}else{let e=j(d.nodeValue).split(Yn);if(e.length<2)continue;c(et(e.length-1),(o=>{let i=j(e[o]);if(!s(i)){let t=document.createTextNode(i);d.parentNode.insertBefore(t,d),m++}let a=document.createTextNode("");d.parentNode.insertBefore(a,d);let c=new zn(g);c.isText=!0,c.nodeSn=m,t.push(c);let u=n[g];if(l(u)&&p(u[0])){let t=f?On.SLOT:On.TEXT;c.isDirective=!0,c.directiveType=t,f&&(c.slotNodeSn=_);let[,,e]=u;jn(e,0,r.tagName),u=void 0}g++,m++})),m--;let o=j(G(e));if(s(o)){let t=d.previousSibling;d.parentNode.removeChild(d),d=t}else d.nodeValue=o,m++}return u.content}(this.updatePointMetas,r,u,e,this.emptyEvents),this.upmMap={},this.slotNodeMap={},this.updatePointMetas.forEach(((t,e)=>{this.upmMap[t.nodeSn]||(this.upmMap[t.nodeSn]=[]),this.upmMap[t.nodeSn].push(t),t.slotNodeSn>-1&&(this.slotNodeMap[t.slotNodeSn]=null)}))}parseTemplate(t){let e="",n=g(t.vars),r=t.strings.length-1,s=t.vars.length-1,o=0;for(let i=0;i<=r;i++){const r=t.strings[i];let a=o<n.length?n[o]:"";if(a instanceof Fn){let[t,e]=this.parseTemplate(a);a=t,n.splice(o,1,...e),o+=e.length-1}else a=i>s?"":Jt+o;o++,e=e+r+a}return e=e.replace(Kn,"$1><").trim(),e=or(e),[e,n]}}class Fn{strings;vars;constructor(t,e){this.strings=t,this.vars=e}getKey(){let t=this.vars,e="";return c(this.strings,((n,r)=>{if(pt.test(n))return e=J(t[r]),!1})),e}getKeys(){let t=this.vars,e=[];for(let n=0;n<this.strings.length;n++){const r=this.strings[n];if(pt.test(r)){let r=J(t[n]);e.push(r)}}return R(e)&&t.forEach((t=>{if(t instanceof Fn){let n=t.getKey();e.push(n)}})),e}append(t){this.strings=g(this.strings);let e=G(this.strings);return t.strings.forEach(((t,n)=>{0!=n?this.strings.push(t):this.strings[this.strings.length-1]=e+t})),this.vars=g(this.vars,t.vars),this}insert(t,e){this.strings=g(this.strings);let n=e.strings[0];return this.strings[t]+=n,this.strings.splice(t+1,0,...e.strings.slice(1)),this.vars.splice(t,0,...e.vars),this}getHTML(t){let e=[],n=new Bn(this,t,e),[r,s]=lr(t,n,e);return Y(r.childNodes,((t,e)=>t+(e.nodeType==Node.TEXT_NODE?e.nodeValue:e.outerHTML??"")),"")}destroy(){this.strings=this.vars=null}}class $n{metaInfo;key;varIndex;value;node;subViewRootNodes;__destroyed=!1;children;parent;__slotCompResolved=!1;__slotComp=null;__subViewId;__parentViewsIdMap;constructor(t){this.varIndex=t}getSlotComponent(t){if(!this.__slotCompResolved&&(this.__slotCompResolved=!0,this.node)){let e=N(this.node,(t=>t.host&&t.host instanceof Vn),"parentNode");e&&e.host!==t&&(this.__slotComp=e.host)}return this.__slotComp}static createFrom(t){let e=new $n(t.varIndex);return e.metaInfo=t,e}destroy(t){if(this.__destroyed)return;this.__destroyed=!0;let e=this.node,n=this.children;if(this.node=this.value=this.children=this.parent=this.metaInfo=null,this.__slotComp=null,this.__parentViewsIdMap=void 0,this.__subViewId=void 0,!e)return;let r=n;r?.forEach(((e,n)=>{e.destroy(t)})),e instanceof Vn&&e.destroy(),t&&e instanceof Element&&ae.clear(e),e?.remove()}insert(t){t.parent=this,this.children||(this.children=[]),this.children.push(t)}}class zn{varIndex;attrName;attrTmpl;isPureTmpl=!1;isText=!1;isDirective=!1;directiveType;directiveVarChain;isProp=!1;isPropPerfix=!1;isToggleProp=!1;isPlaceholder=!1;isEvent=!1;isRef=!1;isKey=!1;isRefAttr=!1;isComponent=!1;isSlot=!1;nodeSn=-1;slotNodeSn=-1;constructor(t){this.varIndex=t}}const Gn="@",Xn=".",qn="?",Qn="*",Zn=":",Jn="ref",Yn=new RegExp(`${Jt}\\d+`),tr=/(<\/?)\s*([A-Z][A-Za-z0-9]*)([\s>])/gm,er=/\s+([\.?@*])?((?:[a-zA-Z]*[A-Z][^\s<>="']+))(?=[\s=>])/gm,nr="slot-props",rr=new Map;let sr=0;function or(t){return n(t)?t=(t=t.replace(er,((t,e,n)=>` ${e??""}${i(n)}`))).replace(tr,((t,e,n,r)=>e+yt[n]+r)):t+""}function ir(t){const e=[],n=[t];for(;n.length;){const t=n.pop(),r=t.strings.length-1;for(let s=0;s<r;s++){const r=t.vars[s];r instanceof Fn?n.push(r):e.push(r??"")}}return e}function ar(t,e){let n=t.childNodes;for(let t=0,r=n.length;t<r;t++){let r=n[t],s=r.nodeType;s===Node.ELEMENT_NODE?(e.push(r),ar(r,e)):s===Node.TEXT_NODE&&e.push(r)}}function lr(t,e,n){const{fragment:r,updatePointMetas:s,emptyEvents:o,upmMap:i,slotNodeMap:a}=e;let l,c=r.cloneNode(!0),u=[],h=[],d=[],p=Nn(t);const f=[];ar(c,f);let g=-1,m=0;for(let e=0;e<f.length;e++){l=f[e],g++,null===a[g]&&(a[g]=l);let r,s=o[g];s&&s.forEach((t=>{p.push([t,k,l])}));const c=i[g];c&&c.forEach((t=>{let e=n[m++],s=$n.createFrom(t);if(s.node=l,s.value=e,t.isProp||t.isPropPerfix)(r??(r={}))[t.attrName]=e;else if(t.isRef)e.__setRef(new WeakRef(l));else if(t.isEvent)p.push([t.attrName,e,l]);else if(t.isToggleProp)s.value=!!e,l.toggleAttribute(t.attrName,s.value);else if(t.isRefAttr)l.setAttribute(t.attrName,e);else if(t.isText)if(t.isDirective){let n=t.attrName,r=a[t.slotNodeSn],[o,i,,c]=e;h.push([l,n,r,o,i,c,s])}else l.textContent=e;else if(t.isDirective){let n=a[t.slotNodeSn],[r,s,,o]=e,i=t.attrName;R(o)&&M(t.directiveVarChain)>0&&(o=t.directiveVarChain),d.push([l,i,n,r,s,o,t.directiveType])}else l.setAttribute(t.attrName,t.attrTmpl.replace(Yn,e));u.push(s)})),l instanceof HTMLSlotElement?t._bindSlot(l,l.name||"default",r):l instanceof HTMLElement&&le(l)&&(Qt.set(l,t),r&&ce(t,l,r))}return h.forEach((([e,n,r,s,o,i,a])=>{e.__anchor__=sr++,Oe.start(t);let l=s(e,o,void 0,{renderComponent:t,slotComponent:r,varChain:i,attrName:n,pointType:a.directiveType});if(Oe.end(t,a),l&&l.length>1){let[,n,r,s,o]=l;cr(e,a,n,r,t,s,o)}})),d.forEach((([e,n,r,s,o,i,a])=>{s(e,o,void 0,{renderComponent:t,slotComponent:r,varChain:i,attrName:n,pointType:a})})),[c,u]}function cr(t,e,n,r,s,o,i){let a=[],l=i?{}:void 0;o=o??[0];let u=i?document.createDocumentFragment():void 0,h=_(t,"__anchor__");c(o,((t,o,c,d)=>{Oe.start(s);let p=ir(n.call(s,t,o,d));Oe.end(s);let[f,g]=lr(s,r,p),m=w(f.childNodes);if(i){let e=i.call(s,t,o,d)+"";m.forEach((t=>{t["__c-"+h]=e})),l[e]=m;for(let t=0;t<g.length;t++)g[t].key=e,a.push(g[t]);u.append(f)}else u=f,e.subViewRootNodes=m,g.forEach((t=>{e.insert(t)}))})),l&&(e.subViewRootNodes=l,a.forEach(((t,n)=>{t.varIndex=n,e.insert(t)}))),(u?u.childNodes.length:0)>0&&(Mn(s),t.parentNode.insertBefore(u,t))}function ur(t,e,n,r,o,i){if(s(t))return;if(!n)return;let a;if(i&&i.length===t.length){a=new Uint8Array(t.length);for(let e=0;e<t.length;e++){const n=t[e];n===i[e]&&"object"!=typeof n&&(a[e]=1)}}for(let s=0;s<n.length;s++){const i=n[s];let c=i.varIndex;if(c<0)continue;let u=i.metaInfo;if(u.isPlaceholder||u.isPropPerfix||u.isRef||u.isEvent||u.isRefAttr||u.isKey)continue;if(i.__destroyed)continue;if(a&&a[c])continue;let h,d=i.value,p=i.node;if(!p)continue;if(h=t[c],!f(d)&&d===h)continue;let g=p;if(u.isDirective){let[t,n,s,a]=i.value;if(!l(h))continue;let c=i.getSlotComponent(e),[,u]=h;Wn(s,p,u,n,t,e,c,a,i,o)&&r?.delete(i)}else if(u.isToggleProp){if(!!h===d)continue;g.toggleAttribute(u.attrName,!!h),g instanceof Vn&&g.updateProps({[u.attrName]:!!h})}else if(u.isProp){if(!f(h)&&h===d)continue;p instanceof Vn?p.updateProps({[u.attrName]:h}):p instanceof HTMLSlotElement&&e._updateSlot(p.getAttribute("name")||"default",u.attrName,h)}else if(u.attrName)d!=h&&("value"===u.attrName&&p instanceof HTMLInputElement?p.value=h:u.isPureTmpl?p.setAttribute(u.attrName,h+""):p.setAttribute(u.attrName,nt(u.attrTmpl,Yn,h+"")));else if(u.isText){let t=J(h??"");t!==p.textContent&&(p.textContent=t)}i.value=h}}function hr(t,...e){return new Fn(n(t)?[t]:t,e)}function dr(t,...e){if(jt.has(t))return jt.get(t);let n=new Yt(t,e),r=t.join("");return R(r)||jt.set(t,n),n}class pr{__ref;get current(){return this.__ref?.deref()}__setRef(t){this.__ref=t}}function fr(){return new pr}var gr;!function(t){t.CLASS="class",t.FIELD="field",t.METHOD="method"}(gr||(gr={}));class mr{static get priority(){return 0}created(t,...e){}beforeMount(t,e,...n){}mounted(t,e,...n){}updated(t,e){}beforeDestroy(t,...e){}}class _r{metadata;decorator;key;priority=0;constructor(t,e,n){this.metadata=e,this.decorator=new n(...t),this.priority=_(n,"priority",0)}dispose(){this.metadata=null,this.decorator=null}create(t){let e,n=this.decorator.targets,s=this.metadata[1];f(s)&&U(_(s,"configurable"))?e=gr.METHOD:r(this.metadata[1])&&(e=gr.FIELD),!R(n)&&e&&n.includes(e)?this.decorator.created(t,...this.metadata):te(`Decorator '${this.decorator.constructor.name}' is out of targets, expect '${n.join(",")}' bug got '${e}'`)}beforeMount(t,e){this.decorator.beforeMount(t,e,...this.metadata)}mounted(t,e){this.decorator.mounted(t,e,...this.metadata)}updated(t,e){this.decorator.updated(t,e)}destroy(t){this.decorator.beforeDestroy(t,...this.metadata)}}function wr(t){return(...e)=>(...n)=>{let r=n[0].constructor,s=Tt.get(r);if(!Tt.has(r)){let t=Object.getPrototypeOf(r);s=t?g(Tt.get(t)??[]):[],Tt.set(r,s)}let o=new _r(e,n.splice(1),t);return s?.push(o),s?.sort(((t,e)=>e.priority-t.priority)),o}}function yr(t){return(...e)=>{if(!e||e.length<1)return;let n=e[0].constructor,r=Tt.get(n);if(!Tt.has(n)){let t=Object.getPrototypeOf(n);r=t?g(Tt.get(t)??[]):[],Tt.set(n,r)}let s=new _r([],e.splice(1),t);return r?.push(s),r?.sort(((t,e)=>e.priority-t.priority)),s}}function vr(t,e,n){return Et.has(t.constructor)||Et.set(t.constructor,{}),Et.get(t.constructor)[e]=n.get,delete t[e],Reflect.defineProperty(t,e,{get(){return Oe.isCollection()&&Oe.getVarPathList().push(e),Reflect.get(this[Zt],e)}}),Reflect.getOwnPropertyDescriptor(t,e)}const Er=wr(class extends mr{static get priority(){return Number.MAX_VALUE}created(t,e,...n){let r=_(t,e);S(t,e,A(r,this.wait,this.immediate)),S(t,e+"_$__",r)}beforeDestroy(t,e){S(t,e,null),S(t,e+"_$__",null)}get targets(){return[gr.METHOD]}wait;immediate;constructor(t,e=!1){super(),this.wait=t,this.immediate=e}});function br(...t){return e=>{let n=wt.get(e);n||(n=new Set,wt.set(e,n)),t.forEach((t=>n.add(t)))}}function Sr(t,e){return(n,r,s)=>{if(!_t.has(n.constructor)){let t=[],e=n.constructor;for(;(e=se(e))!==Vn;)t=g(t,_t.get(e)??[]);_t.set(n.constructor,t)}_t.get(n.constructor)?.push({name:t,targetFn:e,fnName:r})}}const Nr=wr(class extends mr{static get priority(){return Number.MAX_VALUE}created(t,e,n,...r){let s=rt(_(t,n),t);S(t,n,I(s)),S(t,n+"_$__",s)}beforeDestroy(t,e){S(t,e,null),S(t,e+"_$__",null)}get targets(){return[gr.METHOD]}});var Tr;!function(t){t.ONCE="once"}(Tr||(Tr={}));const Mr=new WeakMap;class Cr extends mr{static get priority(){return Number.MAX_VALUE}get targets(){return[gr.FIELD]}selector;cache;constructor(t,e){super(),this.selector=t,this.cache=e}static getKey(t){return t}getter(t){let e=t?.shadowRoot?.querySelector(this.selector),n=Mr.get(t);n||(n=new Map,Mr.set(t,n)),n.set(this.selector,e)}mounted(t,e,n,...r){const s=this;let o=new WeakRef(t);Reflect.defineProperty(t,n,{configurable:!0,get(){let t=o.deref();return Mr.has(t)&&Mr.get(t)?.has(s.selector)&&s.cache===Tr.ONCE||s.getter(t),Mr.get(t)?.get(s.selector)}})}beforeDestroy(t,e){Mr.get(t)?.clear(),Mr.delete(t)}updated(t,e){this.cache!==Tr.ONCE&&this.getter(t)}}const kr=wr(Cr),Rr=wr(class extends Cr{getter(t){let e=t.shadowRoot?.querySelectorAll(this.selector),n=Mr.get(t);n||(n=new Map,Mr.set(t,n)),n.set(this.selector,e)}});function xr(t){if(1===arguments.length)return(e,n)=>{Ar(e,n,t)};Ar(arguments[0],arguments[1],{prop:""})}function Ar(t,e,n){if(!bt.has(t.constructor)){const e={};let n=t.constructor;for(;(n=se(n))!==Vn;)v(e,bt.get(n)??{});bt.set(t.constructor,e)}if(n.shallow=n.shallow||!1,S(bt.get(t.constructor),e,n),n.hasChanged){let r=Dt.get(t.constructor);r||(r=new Map,Dt.set(t.constructor,r)),r.set(e,n.hasChanged)}if(n.shallow){let n=Ot.get(t.constructor);n||(n=new Set,Ot.set(t.constructor,n)),n.add(e)}Reflect.defineProperty(t,e,{get(){return Me(e,this)},set(t){Ce(e,t,this)}})}function Pr(t,e,n){Ar(t.prototype,e,n||{prop:""})}function Ir(t,e=!1){return n=>{n&&(e?customElements.define(t,n):(yt[n.name]=t,vt[t]=n))}}const Vr=wr(class extends mr{static get priority(){return Number.MAX_VALUE}created(t,e,...n){let r=_(t,e);S(t,e,P(r,this.wait)),S(t,e+"_$__",r)}beforeDestroy(t,e){S(t,e,null),S(t,e+"_$__",null)}get targets(){return[gr.METHOD]}wait;constructor(t){super(),this.wait=t}});function Or(t,e){return(n,r)=>{let s=Pt.get(n.constructor),i=At.get(n.constructor),a=kt.get(n.constructor),c=Rt.get(n.constructor),u=xt.get(n.constructor),h=It.get(n.constructor);if(!u){u=new Map,xt.set(n.constructor,u),c=[],Rt.set(n.constructor,c),a=new Map,kt.set(n.constructor,a),s={},Pt.set(n.constructor,s),i={},At.set(n.constructor,i),h={},It.set(n.constructor,h);let t=se(n.constructor);for(;t;)xt.has(t)&&(xt.get(t)?.forEach(((t,e)=>{u.set(e,t)})),c.push(...Rt.get(t)),kt.get(t)?.forEach(((t,e)=>{a.set(e,t)})),o(s,Pt.get(t)),o(i,At.get(t)),o(h,It.get(t))),t=se(t)}(l(t)?t:[t]).forEach((t=>{let o=n[r];_(e,"once",!1)&&a.set(t,!1);let l=_(e,"deep",!1),d=t.split(".")[0],p=u.get(d);if(p||(p=[],u.set(d,p)),p.includes(t)||p.push(t),l?(s[t]=s[t]??new Set,s[t].add(o),c.push(t)):(i[t]=i[t]??new Set,i[t].add(o)),_(e,"immediate",!1)){let e=h[t];e||(e=h[t]=new Set),e.add(o)}}))}}const Lr=new WeakMap;function Dr(t){if("string"==typeof t)return t.trim();if(st(t)){let e="";return c(t,((t,n)=>{t&&(e+=(e?" ":"")+n)})),e}if(Array.isArray(t)){let e="";return c(t,(t=>{const n=Dr(t);n&&(e+=(e?" ":"")+n)})),e}return""}const Wr=Un((function(t){return(t,[e],n)=>{const r=t,s=Dr(e),o=Lr.get(r)??"";s!==o&&(o&&r.classList.remove(...o.split(" ").filter(Boolean)),s&&r.classList.add(...s.split(" ").filter(Boolean)),Lr.set(r,s))}}),[On.TAG]),Hr=new Map,Ur=new WeakMap,jr=new WeakMap,Kr=new Set(["width","height","min-width","max-width","min-height","max-height","padding","padding-top","padding-right","padding-bottom","padding-left","margin","margin-top","margin-right","margin-bottom","margin-left","border-width","border-radius","outline-width","outline-offset","top","right","bottom","left","inset","inset-block","inset-inline","inset-block-start","inset-block-end","inset-inline-start","inset-inline-end","font-size","letter-spacing","word-spacing","text-indent","gap","row-gap","column-gap","grid-gap","grid-row-gap","grid-column-gap"]);function Br(t){if(R(t))return;let e={value:""};if(f(t))e=t;else{if(!n(t)&&!it(t))return;e.value=t,e.important=!1}return e}function Fr(t){let e={};if(n(t)){const n=t.trim();return n&&n.split(";").filter((t=>t.trim())).forEach((t=>{const n=t.indexOf(":");if(n>0){const r=t.slice(0,n).trim();let s=Br(t.slice(n+1).trim());s&&(e[r]=s)}})),e}let r={};if(Array.isArray(t))for(const e of t){const t=Fr(e);Object.assign(r,t)}else f(t)&&(r=t);return c(r,((t,n)=>{let r=function(t){if(t.startsWith("--"))return t;if(Hr.has(t))return Hr.get(t);const e=i(t);return Hr.set(t,e),e}(n),s=Br(t);s&&(Kr.has(r)&&!r.startsWith("--")&&ot(s.value)&&(s.value=s.value+"px"),e[r]=s)})),e}const $r=Un((function(t){return(t,e,n)=>{let r=t;const s=Fr(e[0]),o=new Set(Object.keys(s)),i=Ur.get(r);let a=jr.get(r);a||(a={},jr.set(r,a)),c(i,(t=>{o.has(t)||(r.style.removeProperty(t),delete a[t])})),c(s,((t,e)=>{const n=t.value+""+(t.important?" !important":"");a[e]!==n&&(r.style.setProperty(e,t.value+"",t.important?"important":""),a[e]=n)})),Ur.set(r,o)}}),[On.TAG]),zr=["key","ref","emit-native"],Gr=new WeakMap,Xr=new WeakMap,qr=new WeakMap,Qr=new WeakMap,Zr="class",Jr="style";const Yr=Un((function(t){return(t,[e],n,{renderComponent:r})=>{let s=t;if(function(t,e,n){const r=n?Dr(e):"",s=Xr.get(t)??"";r!==s&&(s&&t.classList.remove(...s.split(" ").filter(Boolean)),r&&t.classList.add(...r.split(" ").filter(Boolean)),Xr.set(t,r))}(s,e[Zr],Zr in e),function(t,e,n){const r=n?Fr(e):{},s=new Set(Object.keys(r)),o=qr.get(t);let i=Qr.get(t);i||(i={},Qr.set(t,i)),o&&o.forEach((e=>{s.has(e)||(t.style.removeProperty(e),delete i[e])})),c(r,((e,n)=>{const r=e.value+""+(e.important?" !important":"");i[n]!==r&&(t.style.setProperty(n,e.value+"",e.important?"important":""),i[n]=r)})),qr.set(t,s)}(s,e[Jr],Jr in e),n){let t=Gr.get(s);return t||(t={},Gr.set(s,t)),void c(e,((e,n)=>{zr.includes(n)||n===Zr||n===Jr||(t[n]!==e||null!==e&&"object"==typeof e)&&(s.setAttribute(n,e),t[n]=e)}))}if(le(s)){let t={},n=St.get(s.constructor),o={};Gr.set(s,o),c(e,((e,r)=>{if(zr.includes(r)||r===Zr||r===Jr)return;let i=a(r);(n?n[i]:void 0)?t[r]=e:(s.setAttribute(r,e+""),o[r]=e)})),ce(r,s,t)}else{let t={};Gr.set(s,t),c(e,((e,n)=>{zr.includes(n)||n===Zr||n===Jr||(s.setAttribute(n,e),t[n]=e)}))}}}),[On.TAG]),ts=new WeakMap,es=new WeakMap,ns=new WeakMap;function rs(t,e){let n=We.get(t);if(!n||0===n.length)return null;let r=n.join("."),s=De.get(e),o=s?.[n[0]];return{proxyRoot:r,ctxRoot:void 0!==o?[o,...n.slice(1)].join("."):r}}function ss(t,e,n){let r=Oe.getVarPathList(),s=e+"."+n;for(let n=t;n<r.length;n++){let t=r[n];if(t===e||m(t,e+".")&&t!==s&&!m(t,s+"."))return!0}return!1}function os(t,e,n,r,s,o){let i=[],a=[],l=!1,u=void 0!==r&&Oe.isCollection(),h=0;return c(t,((t,s)=>{let o=u?Oe.getVarPathList().length:0,c=ir(e.call(n,t,s));u&&!l&&(l=ss(o,r,h)),a.push(c);for(let t=0;t<c.length;t++)i.push(c[t]);h++})),void 0!==o&&void 0!==r&&void 0!==s&&(u?ns.set(o,{keys:ts.get(o),varsPerItem:a,cross:l}):ns.delete(o)),i}const is=Un((function(t,e,n){return(t,s,o,{renderComponent:i,updatedMap:a})=>{let l=s[0];if(R(l)&&r(o))return[Ln.INIT];let u=ts.get(t);if(o&&u&&!R(l)&&o[0]===l){let r=rs(l,i);if(r){let s=function(t,e){if(!t)return null;let n=Object.keys(t);if(0===n.length)return null;let r=e+".",s=new Set;for(let o=0;o<n.length;o++){let i=n[o];if(i===e||m(e,i+".")){if(t[i].end)return null;continue}if(!m(i,r))return null;let a=i.slice(r.length),l=a.indexOf("."),c=l<0?a:a.slice(0,l),u=Number(c);if(!Number.isInteger(u)||u<0||String(u)!==c)return null;s.add(u)}return s}(a,r.ctxRoot);if(s){let o=l,a=!1;for(let t of s){if(t>=o.length){a=!0;break}let n=e(o[t],t,t);if((W(n)?null:"string"==typeof n?n:String(n))!==u[t]){a=!0;break}}if(!a){let e=ns.get(t);if(e&&e.keys===u&&!e.cross&&e.varsPerItem.length===u.length){let t=Oe.isCollection(),a=!1;for(let l of s){let s=t?Oe.getVarPathList().length:0;if(e.varsPerItem[l]=ir(n.call(i,o[l],l)),t&&!e.cross&&ss(s,r.proxyRoot,l)){e.cross=!0,a=!0;break}}if(!a){let t=[];for(let n=0;n<e.varsPerItem.length;n++){let r=e.varsPerItem[n];for(let e=0;e<r.length;e++)t.push(r[e])}return[Ln.REFRESH,t]}}return[Ln.REFRESH,os(l,n,i,r.proxyRoot,r.ctxRoot,t)]}}}}const h=[],d=new Set;let p,f=0;if(c(l,((t,n)=>{let r=e(t,n,f++);if(W(r))return;const s="string"==typeof r?r:String(r);d.has(s)?te(`forEach - duplicate key in '${h}'`):(d.add(s),h.push(s))})),ts.set(t,h),o){if(R(h))return[Ln.REMOVE];if(u&&h.length===u.length&&function(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}(h,u)){let e=rs(l,i);return[Ln.REFRESH,e?os(l,n,i,e.proxyRoot,e.ctxRoot,t):os(l,n,i)]}}ns.delete(t);let g=s[2];if(es.has(t))p=es.get(t);else{let e=$(l)[0],n=l[e],r=g.call(i,n,e,0);p=new Bn(r,i),es.set(t,p)}return o?[Ln.UPDATE,p,h,u,g,l]:[Ln.INIT,n,p,l,e]}}),[On.TEXT,On.SLOT]);let as=document.createElement("template"),ls=new WeakMap;const cs=Un((function(t){return(t,e,n,{renderComponent:r})=>{if(!(n&&e[0]==n[0]||W(e[0])))if(at(t))t.innerHTML=or(e[0]);else{let r=ls.get(t);r||(r=document.createTextNode(""),t.parentNode?.insertBefore(r,t),ls.set(t,r)),as.innerHTML=or(e[0]),s(n)||ae.remove(r,t),t.before(as.content.cloneNode(!0))}}}),[On.TAG,On.TEXT,On.SLOT]),us=new WeakMap,hs=new WeakMap,ds=new WeakMap,ps=Un((function(t,e,n){return(t,[e,n,r],s,{renderComponent:o})=>{let i;if(s){if(!!e==!!s[0]){let e=us.get(t);return[Ln.REFRESH,e]}let a=e?n:r;return e?(i=hs.get(t),i||(i=new Bn(a.call(o,e),o),hs.set(t,i))):(i=ds.get(t),i||(i=new Bn(a.call(o,e),o),ds.set(t,i))),[Ln.REPLACE,a,i]}let a=e?n:r;return e?(i=hs.get(t),i||(i=new Bn(a.call(o,e),o),hs.set(t,i))):(i=ds.get(t),i||(i=new Bn(a.call(o,e),o),ds.set(t,i))),us.set(t,a),[Ln.INIT,a,i]}}),[On.TEXT,On.SLOT]),fs=new WeakMap,gs=Un((function(t,e){return(t,[e,n],r,{renderComponent:s})=>{let o=fs.get(t);return e&&!fs.has(t)&&(o=new Bn(n.call(s),s),fs.set(t,o)),r?r[0]?e?[Ln.REFRESH,n]:[Ln.REMOVE]:e?[Ln.REPLACE,n,o]:[Ln.NONE]:[Ln.INIT,...e?[n,o]:[]]}}),[On.TEXT,On.SLOT]);var ms;!function(t){t.CHANGE="change",t.INPUT="input"}(ms||(ms={}));const _s=Un((function(t,e="value",r){return(t,[e,r,s],o,{varChain:i,renderComponent:a})=>{r=r??"value";const l=t;if(o){const t=o[0],n=e;if(!f(n)&&Object.is(n,t))return;if(l instanceof Vn)l.updateProps({[r]:n});else if(l instanceof HTMLTextAreaElement||l instanceof HTMLSelectElement){if(l.setAttribute(r,n+""),l instanceof HTMLSelectElement){let t=x(l.querySelectorAll("option"),(t=>t.value==n));t&&(t.selected=!0)}}else if(l instanceof HTMLInputElement){if(l.value==n)return;switch(l.type){case"checkbox":case"radio":n?l.setAttribute("checked",""):l.removeAttribute("checked");break;case"text":case"email":case"number":case"password":case"search":case"tel":case"url":l.setAttribute(r,n+""),S(l,r,n);break;default:l.setAttribute(r,n+"")}}return}let c;c=n(s)?lt(s)[0]:G(i);const u=ct(c,".")[0];let h=De.get(a),d="";h&&(d=h[u]),u in a||!d||d in a||te(`model - property '${u}' is not defined on the instance of `+a.tagName);let p=Nn(a);if(f(e)||j(e)||(e=""),vt[l.tagName.toLowerCase()]){ce(a,l,{[r]:e}),wn(l,a,"update:"+r,(function(t){let e=this,n=(De.get(e)??{})[u];!(u in e)&&n&&_(e.wrapperComponent,u)===_(e,n)&&(e=e.wrapperComponent||e),S(e,c,t.value)}))}else if(l instanceof HTMLTextAreaElement){l.setAttribute(r,e+"");let t="input";p.push([t,function(t){let e=t.target;S(this,c,e.value)},l])}else if(l instanceof HTMLInputElement){let t="",n="";switch(l.type){case"checkbox":case"radio":t="checked",n="change";break;default:t="value",n="input"}l.setAttribute(r??t,e+""),p.push([n,function(t){let e=t.target;S(this,c,e.value)},l])}else l instanceof HTMLSelectElement&&(l.setAttribute(r,e+""),p.push(["change",function(t){let e=t.target,n=this,r=(De.get(n)??{})[u];!(u in n)&&r&&_(n.wrapperComponent,u)===_(n,r)&&(n=n.wrapperComponent||n),S(n,c,e.value)},l]))}}),[On.TAG]),ws=new WeakMap,ys=Un((function(t,e){return(t,[e,n],r)=>{if(r&&e===r[0])return;let s=t;if(!ws.has(s)){let t=s.style.display;ws.set(s,"none"==t?"unset":t)}s.style.display=e?ws.get(s):"none",n&&n(s,e)}}),[On.TAG]),vs=Un((function(t,e){return(t,[e,n],r,{renderComponent:s,slotComponent:o})=>{if(r)return;e=e.bind(s);let i=qt.get(o);i||(i={},qt.set(o,i)),i[n||"default"]=e}}),[On.SLOT]),Es=new WeakMap,bs=new WeakMap,Ss=Un((function(t,e){return(t,[e,n],r,{renderComponent:s})=>{let o=()=>hr``,i=[],a=[];c(n,((t,e)=>{if(p(t))i.push(e),a.push(t);else{let e=t[0],n=t[1];i.push(e),a.push(n)}"default"===e&&(o=t)}));let l=ut(i,(t=>p(t)?t(e):t==e)),u=Es.get(t);Es.set(t,l);let h=bs.get(t);if(h||(h=[],bs.set(t,h)),!h[l]){let t=new Bn((a[l]??o).call(s),s);h[l]=t}return r?u==l?[Ln.REFRESH,a[l]??o]:[Ln.REPLACE,a[l]??o,h[l]]:[Ln.INIT,a[l]??o,h[l]]}}),[On.TEXT,On.SLOT]);class Ns{static getCssText(t,e=!1){return n(t)?t:ht(V(t,((t,n)=>n.startsWith("--")?n+":"+t+(e?" !important":""):i(n)+":"+t+(e?" !important":""))),";")+";"}static setStyle(t,e){if(n(t)&&!j(t))return;let r=Ns.getCssText(t);e.style.cssText=r}}function Ts(){c(vt,((t,e)=>{customElements.get(e)||customElements.define(e,t)}))}export{Vn as CompElem,Ns as CssHelper,ge as Csscope,mr as Decorator,gr as DecoratorType,_r as DecoratorWrapper,Ln as DirectiveUpdateTag,ae as DomUtil,On as EnterPointType,ms as ModelTriggerType,Tr as QueryCache,Fn as Template,Qe as _getObservedAttrs,se as _getSuper,ce as addUninitializedSubComponentProp,Yr as bind,de as camelCaseCached,Wr as classes,vr as computed,Ke as createReactiveState,fr as createRef,dr as css,me as csscope,Er as debounced,wr as decorator,yr as decoratorWithNoArgs,Ts as defineComponents,Un as directive,jn as directiveScopeChecker,br as emits,Sr as event,is as forEach,be as getBaseSheets,ie as getBooleanValue,Te as getComponentDefaultProps,ue as getCssVarKey,Le as getCurrentRenderComponent,Se as getDefaultCss,Ne as getGlobalDefaultProps,hr as h,cs as html,ps as ifElse,gs as ifTrue,oe as isBooleanProp,le as isCompElemNode,Pr as makeState,_s as model,Dr as normalizeClass,Fr as normalizeStyle,Nr as onced,Ge as prop,kr as query,Rr as queryAll,ve as setDefaults,ys as show,te as showError,ee as showTagError,re as showTagWarn,ne as showWarn,vs as slot,xr as state,$r as styles,Ir as tag,Vr as throttled,fe as typeNameLower,Wn as updateDirective,Or as watch,Ss as when};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "compelem",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.0",
|
|
4
4
|
"description": "A modern, reactive, fast, lightweight and flexible lib for building web components",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.js",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"@rollup/plugin-node-resolve": "14.1.0",
|
|
31
31
|
"@rollup/plugin-replace": "^6.0.2",
|
|
32
32
|
"@rollup/plugin-terser": "0.4.1",
|
|
33
|
+
"@types/node": "^26.4.1",
|
|
33
34
|
"@typescript-eslint/eslint-plugin": "8.23.0",
|
|
34
35
|
"@typescript-eslint/parser": "^8.23.0",
|
|
35
36
|
"autoprefixer": "^10.4.19",
|
package/reactive.d.ts
CHANGED
|
@@ -10,18 +10,19 @@ export declare function setterValue(propertyKey: string, v: any, context: CompEl
|
|
|
10
10
|
export declare function emitModelEvent(propertyKey: string, v: any, context: CompElem): void;
|
|
11
11
|
export declare const Collector: {
|
|
12
12
|
popDirectiveQ(): string[];
|
|
13
|
-
start(): void;
|
|
13
|
+
start(comp: CompElem<any>): void;
|
|
14
14
|
end(renderComponent?: CompElem, up?: UpdatePoint): void;
|
|
15
15
|
popVarPathList(): string[];
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
getVarPathList(): string[];
|
|
17
|
+
isCollection(): boolean;
|
|
18
18
|
};
|
|
19
|
+
export declare function getCurrentRenderComponent(): CompElem<HTMLElement> | null;
|
|
19
20
|
export declare const OBJECT_VAR_ROOT_PATH_IN_CONTEXT: WeakMap<CompElem<any>, Record<string, string>>;
|
|
20
21
|
export declare const OBJECT_VAR_PATH: WeakMap<any, string[]>;
|
|
21
22
|
export declare const PROXY_MAP: WeakMap<Record<string, any>, ProxyConstructor>;
|
|
22
23
|
export declare const EXTRA_CONTEXT_OF_VAR: WeakMap<any, Set<WeakRef<CompElem<any>>>>;
|
|
23
24
|
export declare function reactive(obj: Record<string, any>, context: CompElem<any>, rootProp?: string): ProxyConstructor;
|
|
24
|
-
export declare function notifyUpdate(context: CompElem
|
|
25
|
+
export declare function notifyUpdate(context: CompElem<any>, newValue: any, oldValue: any, path: string[], subNewValue?: any, subOldValue?: any): void;
|
|
25
26
|
export declare function appendUpdate(context: CompElem<any>, nv: any, ov: any, path: string[]): void;
|
|
26
27
|
export declare function requestUpdate(context: CompElem<any>, nv: any, ov: any, subChain: string[], rootObjNew?: any, rootObjOld?: any): void;
|
|
27
28
|
export declare class Queue {
|