compelem 0.27.0 → 0.28.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/README.md +182 -2
- package/index.d.ts +2 -0
- package/index.js +2 -2
- package/package.json +1 -1
- package/render/TemplateMeta.d.ts +1 -0
- package/render/UpdatePoint.d.ts +4 -0
- package/render/UpdatePointMeta.d.ts +2 -0
- package/render/render.d.ts +4 -4
- package/transition/index.d.ts +62 -0
- package/types.d.ts +34 -0
- package/viewTransition.d.ts +10 -0
package/README.md
CHANGED
|
@@ -285,7 +285,7 @@ export class PageTest extends CompElem {
|
|
|
285
285
|
- insertStyleSheet(sheet: CssTemplate | CSSStyleSheet): CSSStyleSheet 向组件ShadowDOM插入样式表,仅影响组件实例
|
|
286
286
|
- destroy() 销毁组件
|
|
287
287
|
|
|
288
|
-
## 组件渲染流程
|
|
288
|
+
## 组件渲染流程 Lifecycle
|
|
289
289
|
|
|
290
290
|
CompElem 组件既可以在 CompElem 环境内调用,也可以直接在原生环境调用,区别只是原生环境无法像组件传`递类型参数`。流程如下:
|
|
291
291
|
|
|
@@ -420,6 +420,186 @@ return h` <l-tooltip>
|
|
|
420
420
|
| when | TEXT/SLOT | 多条件分支,支持 switch/ifelse 两种模式 | ` ...>${when(condition,{c1:()=>h``,c2:...})}<... ` |
|
|
421
421
|
| slot | SLOT | 动态插槽 | ` ...>${slot((args) => h``)}<... ` |
|
|
422
422
|
| html | TAG/TEXT/SLOT | 向指定元素/文本位置插入HTML内容 | `<div a="b" ${html('<b>1</b>')}> ...>${html('<b>1</b>')}<...` |
|
|
423
|
+
| transition | TEXT/SLOT | 为内层结构指令的切换添加过渡动画,支持JS钩子。通常使用 `<transition>` 伪标签 | `${transition('fade', ifElse(...), {mode:'out-in'})}` |
|
|
424
|
+
|
|
425
|
+
## 过渡动画 Transition
|
|
426
|
+
|
|
427
|
+
`<transition>` 是模板解析期处理的伪标签(不产生真实DOM),用于为**直接子级结构指令**(ifElse/ifTrue/when/forEach)的插入/删除/移动添加过渡动画。动画由CSS声明:
|
|
428
|
+
|
|
429
|
+
| 类名 | 触发时机 |
|
|
430
|
+
|-------|-------|
|
|
431
|
+
| `{name}-enter-from` | 入场起点样式,下一帧移除 |
|
|
432
|
+
| `{name}-enter-active` | 入场期间,通常声明 `transition`/`animation` |
|
|
433
|
+
| `{name}-enter-to` | 入场终点样式 |
|
|
434
|
+
| `{name}-leave-from` | 离场起点样式 |
|
|
435
|
+
| `{name}-leave-active` | 离场期间;列表场景建议加 `position:absolute` 使位移动画平滑 |
|
|
436
|
+
| `{name}-leave-to` | 离场终点样式,动画结束后才从DOM移除节点 |
|
|
437
|
+
| `{name}-move` | 列表项移动(FLIP),通常声明 `transition: transform` |
|
|
438
|
+
|
|
439
|
+
```js
|
|
440
|
+
render() {
|
|
441
|
+
return h`
|
|
442
|
+
<transition name="fade" mode="out-in">
|
|
443
|
+
${ifElse(this.visible, h`<span>A</span>`, h`<span>B</span>`)}
|
|
444
|
+
</transition>
|
|
445
|
+
|
|
446
|
+
<transition name="list">
|
|
447
|
+
${forEach(this.items, it => h`<li key=${it.id}>${it.name}</li>`)}
|
|
448
|
+
</transition>`
|
|
449
|
+
}
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
```css
|
|
453
|
+
.fade-enter-active, .fade-leave-active { transition: opacity .3s }
|
|
454
|
+
.fade-enter-from, .fade-leave-to { opacity: 0 }
|
|
455
|
+
.list-move { transition: transform .3s }
|
|
456
|
+
.list-leave-active { position: absolute }
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
支持的属性:
|
|
460
|
+
|
|
461
|
+
| 属性 | 描述 |
|
|
462
|
+
|-------|-------|
|
|
463
|
+
| name | 必填,动画类名前缀 |
|
|
464
|
+
| mode | `out-in`(旧内容离场完成后新内容入场)/ `in-out`(新内容入场完成后旧内容离场),默认同时进行 |
|
|
465
|
+
| appear | 首次渲染时播放入场动画 |
|
|
466
|
+
| duration | 显式动画时长(ms),设置后不再自动探测 |
|
|
467
|
+
| `@before-enter` 等钩子 | JS 钩子,值必须为函数引用表达式,见下文 |
|
|
468
|
+
|
|
469
|
+
钩子属性(`@before-enter` / `@enter` / `@after-enter` / `@enter-cancelled` / `@before-leave` / `@leave` / `@after-leave` / `@leave-cancelled`):与事件绑定规则一致——**属性名静态,值为函数引用表达式**,组件方法自动绑定 `this`。提供 `@enter`/`@leave` 后结束时机交给 `done` 回调(不再自动探测 CSS 时长):
|
|
470
|
+
|
|
471
|
+
```js
|
|
472
|
+
render() {
|
|
473
|
+
return h`
|
|
474
|
+
<transition name="fade" appear
|
|
475
|
+
@before-enter="${this.onBeforeEnter}"
|
|
476
|
+
@enter="${this.onEnter}"
|
|
477
|
+
@after-enter="${this.onAfterEnter}"
|
|
478
|
+
>
|
|
479
|
+
${ifTrue(this.visible, () => h`<p class="pane">PANE</p>`)}
|
|
480
|
+
</transition>`
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
onEnter(el, done) {
|
|
484
|
+
animateEl(el).then(done) // GSAP等JS动画:动画结束后调用done
|
|
485
|
+
}
|
|
486
|
+
```
|
|
487
|
+
|
|
488
|
+
规则与说明:
|
|
489
|
+
|
|
490
|
+
- 只过渡 `<transition>` **直接子级**的指令锚点,且仅插入文档后的元素(根为纯文本时不动画)
|
|
491
|
+
- 离场动画期间节点保留在DOM中,`transitionend/animationend`(或显式 duration)后才执行移除与组件销毁;期间再次切换会取消未完成的过渡
|
|
492
|
+
|
|
493
|
+
|
|
494
|
+
### 路由切换动画
|
|
495
|
+
|
|
496
|
+
路由出口若通过结构指令切换路由组件,用 `<transition>` 包裹即可获得路由切换动画。整页级过渡可使用 View Transitions API 封装(不支持时降级为直接执行回调):
|
|
497
|
+
|
|
498
|
+
```js
|
|
499
|
+
import { startViewTransition } from 'compelem'
|
|
500
|
+
|
|
501
|
+
//compelem-router 或任意路由状态切换
|
|
502
|
+
startViewTransition(() => { this.route = nextRoute })
|
|
503
|
+
```
|
|
504
|
+
|
|
505
|
+
```css
|
|
506
|
+
::view-transition-old(root) { animation: fade-out .3s both }
|
|
507
|
+
::view-transition-new(root) { animation: fade-in .3s both }
|
|
508
|
+
```
|
|
509
|
+
|
|
510
|
+
`startViewTransition` 在支持 View Transitions API 的浏览器中返回 `ViewTransition.finished`(一个 Promise),不支持时(如 Firefox)返回 `undefined`,因此可安全地 `await` / `.then` 以感知动画结束,调用方无需关心兼容性。
|
|
511
|
+
|
|
512
|
+
下面是一个「列表 ↔ 详情」主从视图切换的完整组件示例:
|
|
513
|
+
|
|
514
|
+
```ts
|
|
515
|
+
import { CompElem, Template, forEach, h, ifElse, state, tag, startViewTransition } from 'compelem'
|
|
516
|
+
|
|
517
|
+
const ARTICLES = [
|
|
518
|
+
{ id: 1, title: 'Alpha', desc: '第一篇文章……' },
|
|
519
|
+
{ id: 2, title: 'Beta', desc: '第二篇文章……' },
|
|
520
|
+
{ id: 3, title: 'Gamma', desc: '第三篇文章……' },
|
|
521
|
+
]
|
|
522
|
+
|
|
523
|
+
@tag('vt-demo', true)
|
|
524
|
+
export class VtDemo extends CompElem {
|
|
525
|
+
@state view: 'list' | 'detail' = 'list'
|
|
526
|
+
@state currentId = 1
|
|
527
|
+
|
|
528
|
+
private goto(next: 'list' | 'detail', id = this.currentId) {
|
|
529
|
+
// 用 startViewTransition 包裹状态变更:支持时获得整页级过渡,不支持时直接切换
|
|
530
|
+
startViewTransition(() => {
|
|
531
|
+
this.currentId = id
|
|
532
|
+
this.view = next
|
|
533
|
+
})?.then(() => console.log('transition finished'))
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
render(): Template {
|
|
537
|
+
return h`
|
|
538
|
+
<div>
|
|
539
|
+
${ifElse(
|
|
540
|
+
this.view === 'list',
|
|
541
|
+
() => h`
|
|
542
|
+
<ul>
|
|
543
|
+
${forEach(ARTICLES, (it) => it.id, (it) => h`
|
|
544
|
+
<li @click="${() => this.goto('detail', it.id)}">${it.title}</li>
|
|
545
|
+
`)}
|
|
546
|
+
</ul>`,
|
|
547
|
+
() => {
|
|
548
|
+
const item = ARTICLES.find((i) => i.id === this.currentId)!
|
|
549
|
+
return h`
|
|
550
|
+
<button @click="${() => this.goto('list')}">← 返回</button>
|
|
551
|
+
<h2>${item.title}</h2>
|
|
552
|
+
<p>${item.desc}</p>`
|
|
553
|
+
},
|
|
554
|
+
)}
|
|
555
|
+
</div>`
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
```
|
|
559
|
+
|
|
560
|
+
> 注意:`::view-transition-old/new(root)` 是文档级伪元素,**必须写在全局 `<style>` 中**(组件 Shadow DOM 内的样式对其无效)。
|
|
561
|
+
|
|
562
|
+
### 配合 compelem-router 的组件路由动画
|
|
563
|
+
|
|
564
|
+
配合 [compelem-router](https://www.npmjs.com/package/compelem-router) 时,`outlet()` **直接被 `<transition>` 包裹即可获得组件级路由动画**:
|
|
565
|
+
|
|
566
|
+
```ts
|
|
567
|
+
import { CompElem, Csscope, Template, css, csscope, h, state, tag } from 'compelem'
|
|
568
|
+
import { RouterMode, createRouter, outlet, useRoute, useRouter } from 'compelem-router'
|
|
569
|
+
|
|
570
|
+
createRouter({
|
|
571
|
+
mode: RouterMode.Hash,
|
|
572
|
+
routes: [
|
|
573
|
+
{ path: '/', component: PageHome },
|
|
574
|
+
{ path: '/about', component: PageAbout },
|
|
575
|
+
],
|
|
576
|
+
})
|
|
577
|
+
|
|
578
|
+
@tag('rt-demo', true)
|
|
579
|
+
export class RtDemo extends CompElem {
|
|
580
|
+
@csscope(Csscope.INNER)
|
|
581
|
+
static get css() { /* page-enter-* / page-leave-* 过渡类定义在组件样式中 */ }
|
|
582
|
+
|
|
583
|
+
render(): Template {
|
|
584
|
+
return h`
|
|
585
|
+
<nav>
|
|
586
|
+
<l-router-link to="/">首页</l-router-link>
|
|
587
|
+
<l-router-link to="/about">关于</l-router-link>
|
|
588
|
+
</nav>
|
|
589
|
+
<div class="route-box">
|
|
590
|
+
<transition name="page" mode="out-in">
|
|
591
|
+
${outlet()}
|
|
592
|
+
</transition>
|
|
593
|
+
</div>
|
|
594
|
+
`
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
```
|
|
598
|
+
|
|
599
|
+
要点:
|
|
600
|
+
- 整页级过渡与 router 组合:`push()` 返回 Promise(状态更新 + 重渲染完成后 resolve),VT 回调内直接 `await` 即可:
|
|
601
|
+
`startViewTransition(async () => { await router.push(target) })`
|
|
602
|
+
|
|
423
603
|
|
|
424
604
|
## 装饰器 Decorator
|
|
425
605
|
|
|
@@ -438,7 +618,7 @@ return h` <l-tooltip>
|
|
|
438
618
|
### 继承
|
|
439
619
|
部分指令可由子类继承不会覆盖,包括@state/@prop/@watch/@computed/@emits
|
|
440
620
|
|
|
441
|
-
## 事件
|
|
621
|
+
## 事件 Event
|
|
442
622
|
在CompElem中有三类不同事件,分别返回原生事件对象或自定义对象
|
|
443
623
|
|
|
444
624
|
1. 原生事件 —— `<div @click="..."` 在原生元素上可以监听原生事件,监听器回调参数返回原生事件对象
|
package/index.d.ts
CHANGED
|
@@ -27,6 +27,8 @@ export * from "./directives/Show";
|
|
|
27
27
|
export * from "./directives/Slot";
|
|
28
28
|
export * from "./directives/Styles";
|
|
29
29
|
export * from "./directives/When";
|
|
30
|
+
export * from "./transition";
|
|
31
|
+
export * from "./viewTransition";
|
|
30
32
|
export { createRef, css, h, Template };
|
|
31
33
|
export declare function defineComponents(): void;
|
|
32
34
|
export * from './CompElem';
|
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* compelem v0.
|
|
2
|
+
* compelem v0.28.0.1788669366
|
|
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,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};
|
|
7
|
+
import e,{some as t,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 d,isSymbol as h,isFunction as p,isObject as f,concat as g,startsWith as m,get as _,toArray as v,defaults as w,merge as y,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 x,find as R,debounce as A,throttle as L,once as P,map as V,first as I,walkTree as O,filter as D,isNil as W,isNull as H,isDefined as $,trim as U,isBoolean as j,parseJSON as B,cloneDeep as K,keys as F,groupBy as z,last as G,reject as X,initial as q,except as Q,toString as Z,reduce as J,compact as Y,snakeCase as ee,range as te,replace as ne,bind as re,isPlainObject as se,isNumeric as oe,isNumber as ie,isElement as ae,toPath as le,split as ce,findIndex as ue,join as de}from"myfx";const he="default",pe=/\s+\.?key\s*=/;var fe,ge;!function(e){e[e.RENDER=1]="RENDER",e[e.COMPUTED=2]="COMPUTED",e[e.DIRECTIVE=3]="DIRECTIVE"}(fe||(fe={})),function(e){e.Prod="prod",e.Dev="dev"}(ge||(ge={}));const me={boolean:Boolean,string:String,number:Number,object:Object,array:Array,function:Function,undefined:Object},_e=new Map,ve=new WeakMap,we={},ye={},Ee=new WeakMap,be=new WeakMap,Se=new WeakMap,Ne=new WeakMap,Te=new Map,Me=new Map,Ce=new Map,ke=new WeakMap,xe=new WeakMap,Re=new WeakMap,Ae=new WeakMap,Le=new WeakMap,Pe=new WeakMap,Ve=new WeakMap,Ie=new WeakMap,Oe=new WeakMap,De=new WeakMap,We=new WeakMap,He=new WeakMap,$e=new WeakMap,Ue=new WeakMap,je=new WeakMap,Be=new WeakMap,Ke=new WeakMap,Fe=new WeakMap,ze=new Map,Ge=new WeakMap,Xe=new WeakMap,qe=new WeakMap,Qe=new WeakMap,Ze="__data_",Je="⟬Ċ⟭";class Ye{strings;vars;cssText;constructor(e,t){this.strings=e,this.vars=t}getCssText(){if(this.cssText)return this.cssText;let e="",t=this.strings.length-1;for(let n=0;n<=t;n++){const t=this.strings[n];let r=this.vars[n]??"";r instanceof Ye&&(r=r.getCssText()),e=e+t+r}return this.cssText=e,e}}function et(e){console.error("[CompElem]",e)}function tt(e,t){console.error(`[CompElem <${e}>]`,t)}function nt(...e){console.warn("[CompElem]",...e)}function rt(e,t){console.warn(`[CompElem <${e}>]`,t)}function st(e){return Object.getPrototypeOf(e)}function ot(e){return e===Boolean||t(e,(e=>e===Boolean))}function it(e){let t=e;return n(e)&&/(?:^true$)|(?:^false$)/.test(t)?t="true"===t:(r(t)||s(t))&&(t=!0),t}const at={getNodes(e,t){let n=e.nextSibling;if(!t)return[n];let r=[];for(;n&&n!==t;)r.push(n),n=n?.nextSibling;return r},insertBefore:function(e,t){if(!e.parentNode)return;let n=document.createDocumentFragment();n.append(...t),e.parentNode.insertBefore(n,e)},remove:function(e,t){if(e===t)return void e?.parentNode?.removeChild(e);let n=e.nextSibling;for(;n&&n!==t;)n?.parentNode?.removeChild(n),n=e.nextSibling},clear(e){if(!e)return;let t=[],n=e=>{let r=e.childNodes;for(let e=0,s=r.length;e<s;e++){let s=r[e];s.nodeType===Node.ELEMENT_NODE&&(s instanceof Vn&&t.push(s),n(s))}};n(e);for(let e=0,n=t.length;e<n;e++)t[e].destroy()}};function lt(e){return!!ye[e.tagName?.toLowerCase()]}function ct(e,t,n){let r=Xe.get(e);r||(r=new Map,Xe.set(e,r));let s=r.get(t)??{};r.set(t,o(s,n))}function ut(e,t){let n=Fe.get(e);n||(n=new Map,Fe.set(e,n));let r=n.get(t);return void 0===r&&(r="--"+i(t).replace(/^-+/,""),n.set(t,r)),r}const dt=new Map;function ht(e){let t=dt.get(e);return void 0!==t||(dt.size>1024&&dt.clear(),t=a(e),dt.set(e,t)),t}const pt=new WeakMap;function ft(e){let t=pt.get(e);return void 0===t&&(t=(e.name||"").toLowerCase(),pt.set(e,t)),t}var gt;function mt(...e){return(t,n,r)=>{let s=r.get();return(l(s)?s:[s]).forEach((n=>{let r;if(n instanceof Ye){if(r=je.get(n.strings),!r){let e=n.getCssText();r=new CSSStyleSheet,r.replaceSync(e),je.set(n.strings,r)}}else n instanceof CSSStyleSheet&&(r=n);if(!r)return;let s=Be.get(t);s||(s=new Map,Be.set(t,s)),c(e,(e=>{if(e===gt.GLOBAL)return void(document.adoptedStyleSheets.includes(r)||(document.adoptedStyleSheets=[...document.adoptedStyleSheets,r]));let t=s.get(e);t||(t=[],s.set(e,t)),t.push(r)}))})),r}}!function(e){e.INNER="inner",e.HOST="host",e.GLOBAL="global"}(gt||(gt={}));let _t=[],vt={},wt={};function yt(e){_t=u(e.css,(e=>{if(n(e)){let t=new CSSStyleSheet;return t.replaceSync(e),t}return e instanceof CSSStyleSheet?e:[]})),vt=e.global,c(e,((e,t)=>{d(t[0],/[A-Z]/)&&(wt[t]=e)})),Et.clear()}const Et=new Map;function bt(e){let t=Et.get(e);return t||(t=[...St(),...Be.get(e)?.get(gt.INNER)??[]],Et.set(e,t)),t}const St=()=>_t,Nt=()=>vt,Tt=()=>wt;function Mt(e,t){let n=t,r=Reflect.get(n[Ze],e);if(Pt&&Lt.push(e),null===r||"object"!=typeof r&&"function"!=typeof r)return r;let s=Ht.get(r);if(s||$t.get(r)){let o=Ut.get(r);o||(o=new Set,Ut.set(r,o));let i=s??r;if($t.get(i)?.deref()!==t){let n=Dt.get(t);n||(n={},Dt.set(t,n));let r=Wt.get(i);r&&(n[r[0]]=e)}return o.add(n.__thisRef),i}if(f(r)&&!p(r)&&!(r instanceof Node)&&!Object.isFrozen(r)){let t=Ie.get(n.constructor),s=t?.has(e);s||(t=Oe.get(n.constructor),s=t?.has(e)),r=s||"slots"===e?r:jt(r,n,e)}return r}function Ct(e,t,n){let r=n;if(!r.__inited)return void Reflect.set(r[Ze],e,t);let s=r[Ze][e],o=De.get(r.constructor),i=o?.get(e),a=Ht.get(s);if(i){if(!i.call(r,t,s,[e],t,s))return!0}else{if(Object.is(s,t))return!0;if(f(t)&&a===t)return!0}Reflect.set(r[Ze],e,t),Ft(n,t,s,[e])}function kt(e,t,n,r,s,o){let i=function(e){let t=Ve.get(e);if(void 0!==t)return t;let n=Object.getPrototypeOf(e),r=Re.get(e)??Re.get(n);return t=r?{rootMap:r,watchKeysDeep:xe.get(e)??xe.get(n),watchDeepUpdateMap:Le.get(e)??Le.get(n),watchUpdateMap:Ae.get(e)??Ae.get(n),onceMap:ke.get(e)??ke.get(n)}:null,Ve.set(e,t),t}(e.constructor);if(!i)return;let{rootMap:a,watchKeysDeep:l,watchDeepUpdateMap:c,watchUpdateMap:u,onceMap:d}=i,h=r.split(".")[0],p=a?.get(h);p?.forEach((i=>{(r===i||m(i,r+".")&&!Object.is(_(e._getPrivateData(),i),_(t,i))||m(r,i+".")&&l?.includes(i)&&!Object.is(_(e._getPrivateData(),i),_(t,i)))&&g(v(u[i]),v(c[i])).forEach((a=>{a&&!0!==d.get(i)&&(e._watchUpdateArgsInNextTick?.set(a,{newValue:t,oldValue:n,chain:r.split("."),rootObjNew:s,rootObjOld:o,fullMatch:i===r}),e._watchUpdateSetInNextTick?.add(a),d.has(i)&&d.set(i,!0))}))}))}function xt(e,t){let n=He.get(e.constructor);n?.has(t)&&n.get(t)?.forEach((t=>{e._computedUpdateSetInNextTick.add(t)}))}function Rt(e,t){let n=$e.get(e.constructor);if(!n)return;let r=t.split("."),s="";r.forEach((t=>{s=s?s+"."+t:t,n.has(s)&&(e._cssUpdateInNextTick=!0)}))}const At=new Set;let Lt=[],Pt=!1,Vt=null;const It={popDirectiveQ(){let e=[],t=Lt;for(let n=0;n<t.length;n++){let r=t[n];At.has(r)||(At.add(r),e.push(r))}return At.clear(),e},start(e){Pt=!0,Lt=[],Vt=e},end(e,t){e&&t&&e._regSubViewDeps(It.popVarPathList(),t),Pt=!1,Vt=null},popVarPathList(){let e=Array.from(new Set(Lt));return Lt=[],e},getVarPathList:()=>Lt,isCollection:()=>Pt};function Ot(){return Vt}const Dt=new WeakMap,Wt=new WeakMap,Ht=new WeakMap,$t=new WeakMap,Ut=new WeakMap;function jt(e,n,r){if(Ht.has(e))return Ht.get(e);if($t.has(e)){if(r){let r=Ut.get(e);r||(r=new Set,Ut.set(e,r)),t(r.values(),(e=>e.deref()===n))||r.add(new WeakRef(n))}return e}const s=new Proxy(e,{get(e,t,r){if(!t)return;const s=Reflect.get(e,t,r);if(h(t))return s;const o=l(e);if(p(s))return s;if("length"===t&&o)return s;if(95===t.charCodeAt(0)&&95===t.charCodeAt(1))return s;let i=Wt.get(r);if(Pt){let e=i?g(i):[];e.push(t),Lt.push(e.join("."))}if(null!==s&&"object"==typeof s&&Ht.has(s))return Ht.get(s);let a=s;if(f(s)&&!p(s)&&!(s instanceof Node)&&!Object.isFrozen(s)){let e=i?g(i):[];a=jt(s,n),e.push(t),Wt.set(a,e),Ht.set(s,a)}return a},set(e,t,r,s){if(!t)return!1;let o=e[t],i=Wt.get(s)??[],a=g(i,[t]),l=De.get(n.constructor),c=l?.get(a[0]),u=a.length>1,d=r,h=o;if(u&&(h=d=n._getPrivateData()[a[0]]),c){if(!c.call(n,d,h,a,r,o))return!0}else if(Object.is(o,r))return!0;let p=r,f=Reflect.set(e,t,p);Ft(n,p,o,a);let m=Ut.get(s),_=[];return m?.forEach((e=>{let t=e.deref();if(!t)return;if(t===n)return;if(t.isDestroyed)return void _.push(e);let r=(Dt.get(t)??{})[a[0]];if(void 0===r)return;let s=a.join(".");s=s.replace(a[0],r),Ft(t,p,o,s.split("."),d,h)})),_.forEach((e=>{let t=e.deref();Dt.delete(t),m.delete(e)})),f}});return Wt.has(s)||Wt.set(s,r?[r]:[]),Ht.set(e,s),r&&$t.set(s,new WeakRef(n)),s}function Bt(e,t,n,r,s,o){e._notify(t,n,r,s,o)}function Kt(e,t,n,r){let s=r.join(".");kt(e,t,n,s,t,n),xt(e,s),Rt(e,s)}function Ft(e,t,n,r,s,o){s=s??t,o=o??n,r.length>1&&(o=s=e._getPrivateData()[r[0]]);let i=r.join(".");kt(e,t,n,i,s,o),xt(e,i),Rt(e,i),Bt(e,s,o,r,t,n)}class zt{static nextSet=new Set;static nextPending=!1;static next;static flush(){zt.nextPending=!1;let e=Array.from(zt.nextSet);zt.nextSet.clear(),e.forEach((e=>e())),e=null}static pushNext(e){zt.nextSet.add(e),zt.nextPending||(zt.nextPending=!0,zt.next())}}function Gt(e){if(1===arguments.length)return(t,n,r)=>{e.required=e.required||!1,e.attribute=!1!==e.attribute,Xt(t,n,e)};let t=arguments[0],n=arguments[1],r=arguments[2];e={type:void 0,required:!1,attribute:!0},r&&"function"==typeof r.type&&(e=w(r,e),r=void 0),e.shallow=e.shallow||!1,Xt(t,n,e)}function Xt(e,t,n,r){let s;if(!Se.has(e.constructor)){const t={};let n=e.constructor;for(;(n=st(n))!==Vn;)y(t,E(Se.get(n)??{}));s=new Set,c(t,((e,t)=>{if(e.attribute){let e=i(t);s?.add(e)}})),Me.set(e.constructor,s),Se.set(e.constructor,t)}if(n.attribute){s||(s=Me.get(e.constructor));let n=i(t);s?.add(n)}if(n.model){let n=Ne.get(e.constructor);n||(n=[],Ne.set(e.constructor,n)),n.includes(t)||n.push(t)}if(b(e.constructor,"observedAttributes")||(e.constructor.observedAttributes=[]),s&&(e.constructor.observedAttributes=v(s)),S(Se.get(e.constructor),t,n),n.hasChanged){let r=De.get(e.constructor);r||(r=new Map,De.set(e.constructor,r)),r.set(t,n.hasChanged)}if(n.shallow){let n=Oe.get(e.constructor);n||(n=new Set,Oe.set(e.constructor,n)),n.add(t)}Reflect.defineProperty(e,t,{get(){return Mt(t,this)},set(n){Ne.get(e.constructor)?.includes(t)&&function(e,t,n){n.emit("update:"+e,{value:t})}(t,n,this)}})}(()=>{const e=Promise.resolve(),t=zt.flush;zt.next=()=>{e.then(t)}})();const qt=new Set;function Qt(e){return Me.get(e)??Me.get(st(e))??qt}const Zt=["resize","outside","mutate"],Jt=new WeakMap,Yt=[],en=[],tn=[],nn=new WeakSet,rn="undefined"!=typeof ResizeObserver?new ResizeObserver((e=>{for(const t of e){const e=Array.isArray(t.contentBoxSize)?t.contentBoxSize[0]:t.contentBoxSize,n=Array.isArray(t.borderBoxSize)?t.borderBoxSize[0]:t.borderBoxSize;if(!nn.has(t.target)){nn.add(t.target);continue}let r=Jt.get(t.target);r&&r.forEach((r=>{r({target:t.target,contentBoxSize:e,borderBoxSize:n,type:"resize"})}))}})):void 0;var sn;!function(e){e.Child="child",e.Tree="tree",e.Attr="attr",e.Char="char"}(sn||(sn={}));const on=new WeakMap,an="undefined"!=typeof MutationObserver?new MutationObserver((e=>{for(let t=0;t<e.length;t++){const n=e[t];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(t,n,r,s,o,i){if("resize"===t)return function(e,t,n,r){if(!rn)return;let s=Jt.get(e);s||(s=[],Jt.set(e,s));let o=rn;if(r){let n=t;t=(...r)=>{n(...r),T(s,(e=>e===t)),M(s)<1&&(o.unobserve(e),Jt.delete(e))}}return s.push(t),rn.observe(e),(n=!1)=>{T(s,(e=>e===t)),M(s)<1&&(o.unobserve(e),Jt.delete(e),n&&(o=e=null))}}(n,r,0,i);if("outside"===t)switch(s[0]){case"mousedown":return function(t,n){return Yt.push([t,n]),(r=!1)=>{e.remove(Yt,(e=>e[0]===t&&e[1]===n))}}(n,r);case"dblclick":return function(t,n){return tn.push([t,n]),(r=!1)=>{e.remove(tn,(e=>e[0]===t&&e[1]===n))}}(n,r);default:return function(t,n){return en.push([t,n]),(r=!1)=>{e.remove(en,(e=>e[0]===t&&e[1]===n))}}(n,r)}else if("mutate"===t)return function(e,t,n){if(!an)return;let r=C(n,"child"),s=C(n,"attr"),o=C(n,"char"),i=C(n,"tree"),a=on.get(e);return a?void 0:(a={},on.set(e,a),r&&(a[sn.Child]=t),s&&(a[sn.Attr]=t),o&&(a[sn.Char]=t),i&&(a[sn.Tree]=t),an.observe(e,{childList:r,attributes:s,characterData:o,subtree:i}),(t=!1)=>{on.delete(e),t&&(e=null)})}(n,r,s)}"undefined"!=typeof document&&(document.addEventListener("mousedown",(e=>{let t=_(e.composedPath(),0,e.target);Yt.forEach((([n,r])=>{n.contains(t)||n.contains(N(t,(e=>e instanceof ShadowRoot),"parentNode")?.host)||r({type:"outside",target:n,modifier:"mousedown",event:e})}))}),!1),document.addEventListener("click",(e=>{let t=_(e.composedPath(),0,e.target);en.forEach((([n,r])=>{n.contains(t)||n.contains(N(t,(e=>e instanceof ShadowRoot),"parentNode")?.host)||r({type:"outside",target:n,modifier:"click",event:e})}))}),!1),document.addEventListener("dblclick",(e=>{let t=_(e.composedPath(),0,e.target);tn.forEach((([n,r])=>{n.contains(t)||n.contains(N(t,(e=>e instanceof ShadowRoot),"parentNode")?.host)||r({type:"outside",target:n,modifier:"dblclick",event:e})}))}),!1));const cn=/,|^(debounce:.+)|(debounce$)/,un=/,|^(throttle:.+)|(throttle$)/,dn="once",hn={esc:"escape"},pn=()=>{},fn=new WeakMap;function gn(e){let t=fn.get(e);return void 0===t&&(t=_(globalThis,e.name)!==e,fn.set(e,t)),t}function mn(e,t){let n,r=e??pn;if(n=R(t,(e=>cn.test(e)))){let e=n.split(":");r=A(r,parseInt(e[1])||100)}if(n=R(t,(e=>un.test(e)))){let e=n.split(":");r=L(r,parseInt(e[1])||100)}return t.includes(dn)&&(r=P(r)),r}function _n(e,t,n=!1){return function(e,t,n=!1){let r=t.includes("capture")||!1,s=t.includes("passive")||!1;return{handler:r=>{if(t.includes("prevent")&&r.preventDefault(),t.includes("stop")&&r.stopPropagation(),n||!t.includes("self")||r.target===r.currentTarget){if(r instanceof MouseEvent){if(t.includes("left")&&0!=r.button)return;if(t.includes("right")&&2!=r.button)return;if(t.includes("middle")&&1!=r.button)return}else if(r instanceof KeyboardEvent){let e=t.slice();if(T(e,(e=>"ctrl"==e))[0]&&!r.ctrlKey)return;if(T(e,(e=>"alt"==e))[0]&&!r.altKey)return;if(T(e,(e=>"shift"==e))[0]&&!r.shiftKey)return;if(T(e,(e=>"meta"==e))[0]&&!r.metaKey)return;let n=V(e,(e=>hn[e]||e));if(M(n)>0&&!n.includes(r.key.toLowerCase()))return}e(r)}},options:{capture:r,once:t.includes(dn)||!1,passive:s}}}(mn(e,t),t,n)}function vn(e,t,n,r){let s=_(e,"__c_emit_event_")??t._subComponentEventSn++;S(e,"__c_emit_event_",s);let o=t._subComponentEventMap.get(s);o||(o={},t._subComponentEventMap.set(s,o)),o[n]=r}const wn=new Set(["focus","blur","visibilitychange","wheel"]),yn=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(e){let t=bn.get(e);return t||(t={bindList:[],docoEventMap:new Map,handlerMap:new WeakMap,releaseList:[],delegationKeySet:new Set,abortController:void 0,dispatch:t=>function(e,t){let n=e.renderRoot;if(!n)return;let r=t.type;const s=t.composedPath();let o=s.indexOf(n);if(o<0)return;let i=Sn(e);e:for(let e=0;e<=o;e++){const n=s[e];if(!(n instanceof HTMLElement))continue;let o=i.handlerMap.get(n)?.get(r);if(!x(o))for(let e=0;e<o.length;e++){let s=o[e];if((!s.parts.includes("self")||t.target===n)&&(s.parts.includes("once")&&(o.splice(e,1),e--,o.length<1&&i.handlerMap.get(n)?.delete(r)),s.handler(t),s.parts.includes("stop")))break e}}}(e,t)},bn.set(e,t)),t}function Nn(e){return Sn(e).bindList}function Tn(e){let t=Sn(e);t.abortController||(t.abortController=new AbortController)}function Mn(e){let t=Sn(e);const n=t.bindList;if(n.length>0){t.bindList=[];for(let t=0;t<n.length;t++){let r=n[t],s=r[0],o=r[1],i=r[2];if(!i)continue;if(r[3])continue;let a=o&&gn(o)?o.bind(e):o;Cn(e,s,a,i),r[3]=k}}let r=_e.get(e.constructor)??_e.get(st(e.constructor));r&&M(r)>0&&c(r,(({name:n,targetFn:r,fnName:s})=>{let o=n+"@"+s;if(t.docoEventMap.has(o))return;let i=r?r(e):e,a=_(e,s),l=a&&gn(a)?a.bind(e):a;Cn(e,n,l,i),t.docoEventMap.set(o,l)}))}function Cn(e,t,n,r){let{evName:s,parts:o}=function(e){let t=e.split(".");return{evName:t.shift(),parts:t}}(t);if(r instanceof Element){let t=ye[r.tagName?.toLowerCase()];if(t){let i=function(e,t){let n=e;for(;n&&n!==Vn;){let e=ve.get(n);if(e){if(e.has(t))return!0;for(let n of e)if(n.endsWith(":*")&&t.startsWith(n.slice(0,-1)))return!0}n=st(n)}return!1}(t,s);if(i)return void vn(r,e,s,mn(n,o))}}if(function(e){return Zt.includes(e)}(s)){let t=ln(s,r,mn(n,o),o,0,o.includes("once"));return void(t&&Sn(e).releaseList.push(t))}let i=function(e,t){if(!(t instanceof Element))return!1;let n=e.renderRoot;return!!n&&(t===n||n.contains(t))}(e,r)&&!En.has(s)&&!yn.has(s);if(i){let t=o.includes("capture")||wn.has(s);!function(e,t,n,r,s,o){if(!function(e,t,n){let r=e.renderRoot;if(!r)return!1;Tn(e);let s=Sn(e),o=(n?"c:":"b:")+t;return s.delegationKeySet.has(o)||(r.addEventListener(t,s.dispatch,{capture:n,signal:s.abortController.signal}),s.delegationKeySet.add(o)),!0}(e,t,o))return void kn(e,t,n,r,s);let{handler:i}=_n(n,r,!0),a=Sn(e),l=a.handlerMap.get(s);l||(l=new Map,a.handlerMap.set(s,l));let c=l.get(t);c||(c=[],l.set(t,c));c.push({handler:i,parts:r})}(e,s,n,o,r,t)}else kn(e,s,n,o,r)}function kn(e,t,n,r,s){Tn(e);let{handler:o,options:i}=_n(n,r);s.addEventListener(t,o,{capture:i.capture,once:i.once,passive:i.passive,signal:Sn(e).abortController.signal})}let xn=0;const Rn=new WeakMap,An={},Ln="slots",Pn={};class Vn extends HTMLElement{#e;#t={};__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.#e}get attrs(){return this.#s}get props(){return this.#o}get renderRoot(){return this.#i?.deref()}get renderRoots(){return this.#a.flatMap((e=>e.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 Be.get(this.constructor)?.get(gt.INNER)}get isMounted(){return this.#d}#s;#o;#i;#a;#l;#c;#h={};#u={};#p={};#d=!1;#f=!1;#g;#m;get cssVars(){return{}}__inited=!1;#_=!1;#v;__thisRef;__superComp;constructor(...e){super(),this.#e=xn++,this.__updateTree=[],this.__thisRef=new WeakRef(this),this.__superComp=st(this.constructor),this.#v=this.#w.bind(this),1===M(e)&&(this.#o={},o(this.#o,I(e))),Reflect.getOwnPropertyDescriptor(this.constructor.prototype,"slots")||Reflect.defineProperty(this.constructor.prototype,"slots",{get(){return Mt("slots",this)},set(e){Ct("slots",e,this)}});let t=Te.get(this.constructor)??Te.get(this.__superComp);t&&t.sort(((e,t)=>t.priority-e.priority)).forEach((e=>e.create(this))),this.#y=this.#E.bind(this)}insertStyleSheet(e){if(!this.#r)return null;let t;if(e instanceof Ye){if(t=Ke.get(e),!t){let n=e.getCssText();t=new CSSStyleSheet;try{t.replaceSync(n)}catch(e){}Ke.set(e,t)}}else if(e instanceof CSSStyleSheet){if(this.#r.adoptedStyleSheets.includes(e))return e;t=e}return t&&!this.#r.adoptedStyleSheets.includes(t)&&(this.#r.adoptedStyleSheets=[...this.#r.adoptedStyleSheets,t]),t}get rootComponent(){let e=this;for(;e.parentComponent;)e=e.parentComponent;return e}#y;connectedCallback(){let e=N(this.parentNode,(e=>e instanceof Vn||e.host instanceof Vn),"parentNode");this.#l=e?e instanceof Vn?new WeakRef(e):new WeakRef(e.host):void 0;let t=Qe.get(this);t&&(this.#c=new WeakRef(t),Qe.delete(this));let n=Be.get(this.constructor)?.get(gt.HOST);if(n){let e=this.#c?.deref()?.shadowRoot??this.#l?.deref()?.shadowRoot;e&&e.contains(this)||(e=this.ownerDocument),c(n,(t=>{e.adoptedStyleSheets.includes(t)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,t])}))}this.setup()}disconnectedCallback(){}beforeDestroyed(){}destroyed(){}get isDestroyed(){return this.#b}#b=!1;destroy(){if(this.#b)return;this.#b=!0;let e=Te.get(this.constructor)??Te.get(this.__superComp);if(e?.forEach((e=>{e.destroy(this)})),this.beforeDestroyed(),function(e){let t=Sn(e);t.abortController?.abort(),t.abortController=void 0,c(t.releaseList,(e=>{"function"==typeof e&&e(!0)})),t.releaseList=[],t.docoEventMap.clear(),t.handlerMap=new WeakMap,t.delegationKeySet.clear(),t.bindList.length=0}(this),Ge.get(this)?.clear(),Ge.delete(this),this._watchUpdateArgsInNextTick?.clear(),this._watchUpdateSetInNextTick?.clear(),this._computedUpdateSetInNextTick?.clear(),this._computedUpdateSetInNextTick=null,this.__updateSubViewDeps?.clear(),this.#l){let e=this.#l.deref();e&&O(e.__updateTree,(t=>{t.__destroyed||t.node===this&&(t.destroy(e),T(t.parent?t.parent.children:e.__updateTree,(e=>e===t)))}))}this.#r&&at.clear(this.#r),c(this.__updateTree,(e=>e?.destroy(this))),c(this.#h,(e=>{Rn.delete(e),e.remove()})),c(this.#p,(e=>{c(e,(e=>e.remove()))})),c(this.__data_.slots,((e,t)=>{c(e,(e=>e.remove()))})),this.#S.clear(),this.#v=this.__thisRef=this.#p=this.#h=this.#S=this.#t=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.#y=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 e=this.#N();this.#o={},o(this.#o,e),this.propsReady(e);for(const t in e){const n=e[t];this.__data_[t]=n}this.#T(),this.__data_.slots={},Reflect.defineProperty(this.__data_,"__isData",{enumerable:!1,value:!0});let t=this.__superComp;if(Re.get(this.constructor)??Re.get(t)){this._watchUpdateSetInNextTick=new Set,this._watchUpdateArgsInNextTick=new Map;let e=ke.get(this.constructor)??ke.get(t),n=Pe.get(this.constructor)??Pe.get(t);c(n,((t,n)=>{let r=_(this,n);t.forEach((e=>{e.call(this,r,void 0,n)})),e.has(n)&&e.set(n,!0)}))}let n=We.get(this.constructor);if(void 0===n&&(n=o({},Ee.get(this.constructor),Ee.get(t)),We.set(this.constructor,n)),n){this._computedUpdateSetInNextTick=new Set;let e=He.get(this.constructor);e?c(n,((e,t)=>{this[Ze][t]=e.call(this)})):(e=new Map,He.set(this.constructor,e),c(n,((t,n)=>{S(t,"key",n),It.start(this),this[Ze][n]=t.call(this),It.end(),It.popVarPathList().forEach((n=>{let r=e.get(n);r||(r=new Set,e.set(n,r)),r.add(t)}))})))}It.start(this);let r=this.render();It.end();let i,a=It.popVarPathList();Ce.has(this.constructor)||Ce.set(this.constructor,new Set(a)),null===r?(this.#a=[],this.#i=void 0):(this.#r=this.attachShadow({mode:"open"}),this.#r.adoptedStyleSheets=bt(this.constructor),i=function(e,t){let n,r=[];yr.has(t.constructor)?(n=yr.get(t.constructor),r=Sr(t,e)):(n=new ir(e,t,r),yr.set(t.constructor,n));let[s,o]=Cr(t,n,r);return t.__updateTree=o,s}(r,this),i&&M(i.children)>0&&(this.#a=D(i.children,(e=>e.nodeType===Node.ELEMENT_NODE)).map((e=>new WeakRef(e))),this.#i=this.#a[0])),this.__inited=!0,this.#M();let l=qe.get(this);l&&(this.#u=l,qe.delete(this)),c(this.#u,((e,t)=>{this.#C(t)}));const u=this;let d=Te.get(this.constructor)??Te.get(this.__superComp);if(d?.forEach((e=>{e.beforeMount(this,((e,t)=>(u.__data_[e]=t,u.__data_[e])))})),this.beforeMount(),this.isDestroyed)return;this.#d=!0,It.start(this);let h=this.cssVars;if(It.end(),!x(h)){this._cssVarOldValueMap={};let e=$e.get(this.constructor);e||(e=new Set(It.popVarPathList()),$e.set(this.constructor,e));let t="";c(h,((e,n)=>{let r=ut(this.constructor,n);(s(e)||W(e))&&(e="initial"),this._cssVarOldValueMap[r]=e,t+=";"+r+":"+e})),this.style.cssText+=t}i&&M(i.children)>0&&(this.#r.append(i),Xe.delete(this)),d&&d.forEach((e=>{e.mounted(this,((e,t)=>(u.__data_[e]=t,u.__data_[e])))})),this.#g&&this.#g.forEach((e=>zt.pushNext(e))),this.#f&&zt.pushNext(this.#y),Mn(this),this.mounted()}propsReady(e){}render(){return null}beforeMount(){}mounted(){}#w(e){let t=e.currentTarget,n="";c(this.#h,((e,r)=>{if(e===t)return n=r,!1})),this.__inited&&this.#k(t,n===he?"":n)}#k(e,t){this.#M();let n=_(this.#t[t],"props");n&&c(this.slots,((e,t)=>{e.filter((e=>e.nodeType===Node.ELEMENT_NODE)).forEach((e=>{e instanceof Vn?e.updateProps(n):c(n,((t,n)=>{if(e instanceof HTMLSlotElement){let r=Rn.get(e);if(r){let s=e.name||he,o=r.#t[s];o||(o=r.#t[s]={props:{}}),o.props||(o.props={}),o.props[n]=t,r.#k(e,s)}}else e.setAttribute(n,t)}))}))})),this.slotChange(e,t)}slotChange(e,t){}attributeChangedCallback(e,t,n){if(!this.__inited)return;if(Object.is(n,t))return;"undefined"===n&&(n=null);let r=ht(e),s=Se.get(this.constructor)??Se.get(this.__superComp);if(ot(_(s,r).type)){let e=!H(n)&&it(n);if(_(this,r)===e)return}this.#x(e,t,n)}shouldUpdate(e){return!0}updated(e){}_notify(e=void 0,t,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??e;a=0===l?c:a+"."+c,this.#n[a]={value:u,chain:a===Ln?[Ln]:o,oldValue:t,end:o.length===n.length,subNewValue:r,subOldValue:s}}this.isMounted?zt.pushNext(this.#y):this.#f=!0}requestUpdate(e,t,n,r,s){Bt(this,e,t,n,r,s)}#E(){if(M(this.#n)<1)return;if(!this.isMounted)return;const e=this.#n;if(this.#n={},!this.shouldUpdate(e))return;let t=Te.get(this.constructor)??Te.get(this.__superComp);t?.forEach((t=>{t.updated(this,e)})),this._watchUpdateSetInNextTick?.forEach((e=>{let{newValue:t,oldValue:n,chain:r,rootObjNew:s,rootObjOld:o,fullMatch:i}=this._watchUpdateArgsInNextTick.get(e),a=i?t:s,l=i?n:o;e.call(this,a,l,r,t,n)})),this._watchUpdateSetInNextTick?.clear(),this._watchUpdateArgsInNextTick?.clear();let n=0;for(;this._computedUpdateSetInNextTick?.size>0&&n<10;){n++;let t=Array.from(this._computedUpdateSetInNextTick);this._computedUpdateSetInNextTick.clear(),t.forEach((t=>{let n=_(t,"key"),r=this.__data_[n],s=t.call(this);(f(s)||s!==r)&&(this.__data_[n]=s,Kt(this,s,r,[n]),e[n]={value:s,chain:[n],oldValue:r,end:!0})}))}if(this._cssUpdateInNextTick){let e=this.cssVars;c(e,((e,t)=>{let n=ut(this.constructor,t);this._cssVarOldValueMap[n]!=e&&((s(e)||W(e))&&(e="initial"),this._cssVarOldValueMap[n]=e,this.style.setProperty(n,e+""))}))}let r,o=!1,i=Ce.get(this.constructor);if(c(e,((e,t)=>{if(!o&&i?.has(t)&&(o=!0),this.__updateSubViewDeps?.has(t)){let e=this.__updateSubViewDeps.get(t);e&&(r||(r=new Set),e.forEach((e=>{r.add(e)})))}})),this.#i?.deref()){if(o){let t=Sr(this,this.render()),n=this.#m;if(this.#m=t,xr(t,this,this.__updateTree,r,e,n),n)for(let e=0;e<n.length;e++){let t=n[e];null!==t&&"object"==typeof t&&(n[e]=void 0)}}r&&r.size>0&&r.forEach((t=>{!function(e,t,n,r){if(!e||e.__destroyed)return;let s=e.node;const[o,i,a,l]=e.value;let c,u=e.getSlotComponent(t);if(!n){let n=o(s,e.value[1],i,{renderComponent:t,slotComponent:u,varChain:l,updatedMap:r,pointType:_(ze.get(a),[0],Jn.TEXT)});if(!n)return;if(n[0]!==Yn.REFRESH)return;c=p(n[1])?Sr(t,n[1].call(t,e.value[1][0])):n[1]}if(!c)return;xr(c,t,e.children,void 0,r)}(t,this,void 0,e)}))}this.#S.forEach((e=>{this.#C(e)})),this.updated(e)}#N(){let e,t=Se.get(this.constructor)??Se.get(this.__superComp),n=this.attributes,s=this.tagName,a=Xe.get(this.wrapperComponent)?.get(this)??null;e=null==this.#o?a??Pn:null==a?this.#o:y(this.#o,a);let c={};for(let e=0,r=n.length;e<r;e++){let{name:r,value:s}=n[e];if(r[0]===ur||r[0]===dr||r[0]===hr||r===gr||"slot"===r)continue;let o=ht(r);t&&!t[o]&&(c[r]=s)}this.#s=this.#s?o(this.#s,c):c;let u={};if(!t)return u;let d=Object.keys(t),h=d.length;for(let o=0;o<h;o++){const a=d[o],c=i(a),h=this.hasAttribute(c);let p,g=t[a],m=b(e,a),v=_(this,a);if(!("_defaultValue"in g)&&(g._defaultValue=v,!g.type)){r(v)&&tt(s,"Prop '"+a+"' has neither propType nor defaultValue be used for type inference");let e=typeof v;l(v)&&(e="array");let t=me[e];g.type=t}if(m)p=W(e[a])?v:e[a];else{p=v;let e=n.getNamedItem(c)||n.getNamedItem(dr+c)||n.getNamedItem(c+dr);e&&(m=!0,p=e.value)}if(g.required&&!m){tt(s,"Prop '"+a+"' is required");break}p=this.#R(t,a,p,h),g.attribute&&$(p)&&!f(p)&&this.#A(g,a,p),this.__data_[a]=p,h&&(u[a]=p),delete this[a]}return u}#A(e,t,n){let r=i(t),s=U(n);ot(e.type)?(s=it(n),j(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)}#L(e,t){let n=e;try{for(let r=0;r<t.length;r++){const s=t[r];n=s===Boolean?it(e):s===Number?Number(e):s===String?String(e):s===Object||s===Array?B(e):s===Date?new Date(e):new s(e)}}catch(t){tt(this.tagName,"Convert attribute error with "+e)}return n}#R(e,r,s,o){let i=e[r];if(!i)return s;let a=i.isValid,c=i.type,u=l(c)?c:[c],d=i.converter,h=s;if(!t(u,(e=>e===String))&&n(h)&&!H(h))try{h=d?d(h):this.#L(h,u)}catch(e){tt(this.tagName,`Convert attribute '${r}' error with `+h)}for(let e=0;e<u.length;e++){"Boolean"===u[e].name&&o&&(h=it(h))}if(W(h))return h;let p=typeof h,f=!$(h);for(let e=0;e<u.length;e++){const t=u[e];if(p===ft(t)||h instanceof t||Object.prototype.toString.call(h)===Object.prototype.toString.call(t.prototype)){f=!0;break}}return f||tt(this.tagName,`Invalid prop '${r}'. expected '${u.map((e=>e.name||e))}' but got '${p}'`),a&&(a.call(this,h,this.__data_)||tt(this.tagName,`Invalid prop '${r}'. IsValid() check failed`)),h}#T(){let e=be.get(this.constructor)??be.get(this.__superComp);e&&c(e,((t,n)=>{let r=e[n],s=_(this,n);if(r){let e=r.prop;s=e?K(this.__data_[e]):_(this,n)}this.__data_[n]=s,delete this[n]}))}updateProps(e,t=!1){let n=Se.get(this.constructor)??Se.get(this.__superComp);if(!n)return;if(!this.__inited)return void o(this.#o,e);let r=[];c(e,((s,o)=>{let i=ht(o),a=n[i];if(!a)return;s=this.#R(n,i,s);let l=this.__data_[i];if(!t){let e=De.get(this.constructor),t=e?.get(i);if(t){if(!t.call(this,s,l,[i],s,l))return!0}else if(f(s)){let e=Oe.get(this.constructor);if(e?.has(i)&&Object.is(l,s))return!0}else if(Object.is(l,s))return!0}a.attribute&&$(s)&&!f(s)&&r.push([a,i,s]),S(this.__data_,i,s),e[i]=s,Ft(this,s,l,[i])})),o(this.#o,e),r.forEach((([e,t,n])=>{this.#A(e,t,n)}))}_initProps(e,t){this.#o=y(this.#o||{},e),this.#s=y(this.#s||{},t),c(e,((e,t)=>{if(f(e)){let n=Wt.get(e);if(n){let e=this.wrapperComponent?be.get(this.wrapperComponent?.constructor):null,r=n[0];if(e&&e[r]){let n=Se.get(this.constructor);S(n,[t,"shallow"],e[r].shallow)}}}}))}_bindSlot(e,t,n){this.#h[t]||(this.#h[t]=e,Rn.set(e,this));if(Cn(this,"slotchange",this.#v,e),!x(n)){let e=this.#t[t];e||(e=this.#t[t]={}),e.props=n}}#S=new Set;_updateSlot(e,t,n){let r=this.#h[e],s=this.#u[e];if(!s&&!r)return;let o=this.#t[e];if(t&&(o.props||(o.props={}),o.props[t]=n),s)this.#S.add(e);else{let e=r.assignedElements({flatten:!0});for(let r=0;r<e.length;r++){e[r].setAttribute(t,n+"")}}}#M(){if(!this.#i)return;let e=F(this.#h);if(x(e))return;const t=u(this.childNodes,(e=>e.nodeType===Node.COMMENT_NODE||e.nodeType===Node.TEXT_NODE&&s(e.textContent)?[]:e instanceof HTMLSlotElement?e.assignedNodes({flatten:!0}):e));let n=z(t,(t=>{if(t.nodeType===Node.TEXT_NODE&&e.includes(he))return he;if(t instanceof Element){let n=t.getAttribute("slot")||he;if(e.includes(n))return n}}));if(x(n))return void(this.slots={});c(n,((e,t)=>{if(t){for(;e.length>0;){let t=e[0];if(!(t.nodeType===Node.TEXT_NODE&&s(t.textContent)||t instanceof HTMLSlotElement&&x(t.assignedNodes({flatten:!0}))))break;e.shift()}for(;e.length>0;){let t=G(e);if(!(t.nodeType===Node.TEXT_NODE&&s(t.textContent)||t instanceof HTMLSlotElement&&x(t.assignedNodes({flatten:!0}))))break;e.pop()}}}));let r={};c(n,((e,t)=>{x(e)||(r[t]=e)})),this.slots=r}#C(e){let t=this.#u[e];if(!t)return;let n=this.#t[e];if(!this.__data_.slots)return;if(!this.__data_.slots[e])return;this.renderAsync(t,_(n,"props"));const r=this._asyncDirectives.get(t);let s=r?.buildView(t(_(n,"props"))),o=X(v(s),(e=>e.nodeType===Node.COMMENT_NODE));if(o){let t=this.#p[e];if(!x(t))for(let e=0;e<t.length;e++){const n=t[e];n.parentNode?.removeChild(n)}this.#p[e]=o,this.append(...o),this.#S.clear()}}_asyncDirectives=new WeakMap;renderAsync(e,...t){}#x(e,t,n){if(!this.__inited)return;if(Qt(this.constructor).has(e)){let t=ht(e);if(H(n)){let e=Se.get(this.constructor)??Se.get(this.__superComp);e&&(n=e[t]._defaultValue)}this.updateProps({[t]:n})}}_regSubViewDeps(e,t){this.__updateSubViewDeps||(this.__updateSubViewDeps=new Map),e.forEach((e=>{let n=this.__updateSubViewDeps.get(e);n||(n=new Set,this.__updateSubViewDeps.set(e,n)),n.add(t)}))}_getPrivateData(){return this.__data_}emit(e,t={},n){if(n&&(t.event=n),t.target=this,b(this.#s,"emit-native"))this.dispatchEvent(new CustomEvent(e,{bubbles:!1,composed:!1,cancelable:!0,detail:t}));else{let n=_(this,"__c_emit_event_");if(!this.wrapperComponent)return;!function(e,t,n,r){let s=e._subComponentEventMap.get(t),o=_(s,n);p(o)&&o.call(e,r)}(this.wrapperComponent,n,e,t)}}nextTick(e){if(!this.isMounted)return this.#g||(this.#g=[]),void this.#g.push(e);zt.pushNext(e)}forceUpdate(){let e=Ce.get(this.constructor);e&&e.size>0?e.forEach((e=>{this.#n[e]={value:void 0,chain:void 0}})):this.#n.__force__={value:void 0,chain:void 0},this.#E()}}function In(e){requestAnimationFrame((()=>requestAnimationFrame(e)))}function On(e){return 1e3*Number(e.slice(0,-1).replace(",","."))}function Dn(e,t){for(;e.length<t.length;)e=e.concat(e);let n=0;return t.forEach(((t,r)=>{n=Math.max(n,On(t)+On(e[r]??"0s"))})),n}function Wn(e,t,n){if(null!=t.duration)return void setTimeout(n,t.duration);const r=function(e){const t=getComputedStyle(e),n=e=>(t[e]||"").split(", "),r=n("transitionDelay"),s=n("transitionDuration"),o=Dn(r,s);if(o>0)return{endEvent:"transitionend",timeout:o,propCount:s.length};const i=n("animationDelay"),a=n("animationDuration"),l=Dn(i,a);return l>0?{endEvent:"animationend",timeout:l,propCount:a.length}:null}(e);if(!r)return void n();let s=0,o=!1;const i=()=>{o||(o=!0,clearTimeout(l),e.removeEventListener(r.endEvent,a),n())},a=t=>{t.target===e&&++s>=r.propCount&&i()},l=setTimeout(i,r.timeout+1);e.addEventListener(r.endEvent,a)}function Hn(e,t,n,r,s){if(!t.length)return s(),()=>{};const o=`${r.name}-${n}`,i=r.hooks??{},a="enter"===n?i["before-enter"]:i["before-leave"],l="enter"===n?i.enter:i.leave,u="enter"===n?i["after-enter"]:i["after-leave"],d="enter"===n?i["enter-cancelled"]:i["leave-cancelled"];let h=!1,p=t.length;const f=t=>{h||(t.classList.remove(`${o}-active`,`${o}-to`),u?.call(e,t),0==--p&&(h=!0,s()))};return c(t,(t=>a?.call(e,t))),c(t,(e=>{e.classList.add(`${o}-from`,`${o}-active`)})),In((()=>{h||(c(t,(e=>{e.classList.remove(`${o}-from`),e.classList.add(`${o}-to`)})),c(t,(t=>{l?l.call(e,t,(()=>f(t))):Wn(t,r,(()=>f(t)))})))})),function(){h||(h=!0,c(t,(t=>{t.classList.remove(`${o}-from`,`${o}-active`,`${o}-to`),d?.call(e,t)})))}}function $n(e,t){e&&(Array.isArray(e)?c(e,(e=>t.push(e))):c(e,(e=>{Array.isArray(e)?c(e,(e=>t.push(e))):t.push(e)})))}function Un(e,t){if(!e)return;if(!t)return{name:e};const{onBeforeEnter:n,onEnter:r,onAfterEnter:s,onEnterCancelled:o,onBeforeLeave:i,onLeave:a,onAfterLeave:l,onLeaveCancelled:c,...u}=t,d={onBeforeEnter:n,onEnter:r,onAfterEnter:s,onEnterCancelled:o,onBeforeLeave:i,onLeave:a,onAfterLeave:l,onLeaveCancelled:c};return{name:e,mode:u.mode,appear:u.appear,duration:u.duration,hooks:n||r||s||o||i||a||l||c?d:void 0}}function jn(e){return e.__transition??e.__resolvedTransition??e.metaInfo?.transitionCfg}function Bn(e,t,n){const r=e.metaInfo?.transitionCfg;if(!r?.hooks)return;const s=e.varIndex;null==s||s<0||(e.__resolvedTransition={...r,hooks:r?.hooks})}function Kn(e){const t=[];return $n(e,t),t.filter((e=>e instanceof Element))}function Fn(e,t,n){if(!t.length)return;const r=`${n.name}-enter`;c(t,(t=>n.hooks?.onBeforeEnter?.call(e,t))),c(t,(e=>e.classList.add(`${r}-from`,`${r}-active`)))}function zn(e,t,n,r){if(!t.length)return r?.(),()=>{};const s=`${n.name}-enter`,o=n.hooks;let i=!1,a=t.length;const l=t=>{i||(t.classList.remove(`${s}-active`,`${s}-to`),o?.onAfterEnter?.call(e,t),0==--a&&(i=!0,r?.()))};return In((()=>{i||(c(t,(e=>{e.classList.remove(`${s}-from`),e.classList.add(`${s}-to`)})),c(t,(t=>{o?.onEnter?o.onEnter.call(e,t,(()=>l(t))):Wn(t,n,(()=>l(t)))})))})),function(){i||(i=!0,c(t,(t=>{t.classList.remove(`${s}-from`,`${s}-active`,`${s}-to`),o?.onEnterCancelled?.call(e,t)})))}}const Gn=new WeakMap;function Xn(e,t,n){c(e,(e=>{e.remove(),e instanceof Vn&&e.destroy()})),c(t,(e=>e.destroy(n)))}function qn(e){const t=Gn.get(e);t&&(Gn.delete(e),t.cancel(),t.commit())}function Qn(e,t,n,r,s,o){const i=t.filter((e=>e instanceof Element));if(!s||0===i.length)return Xn(t,n,r),void o?.onAfter?.();!1!==o?.forceFinish&&qn(e),c(i,(e=>{e.classList.remove(`${s.name}-enter-from`,`${s.name}-enter-active`,`${s.name}-enter-to`)}));let a=!1;const l={cancel:()=>{},commit:()=>{a||(a=!0,Gn.get(e)===l&&Gn.delete(e),Xn(t,n,r))}};l.cancel=Hn(r,i,"leave",s,(()=>{l.commit(),o?.onAfter?.()})),Gn.set(e,l)}function Zn(e,t,n,r){const s=`${r.name}-move`,o=[],i=t=>{if(!(t instanceof Element))return;if(n.has(t))return;const r=e.get(t);if(!r)return;const i=t.getBoundingClientRect(),a=r.left-i.left,l=r.top-i.top;if(!a&&!l)return;const c=t.style;o.push({el:t,prev:c.transform}),t.classList.add(s),c.transitionDuration="0s",c.transform=`translate(${a}px, ${l}px)`};Array.isArray(t)?c(t,i):c(t,(e=>{Array.isArray(e)?c(e,i):i(e)})),o.length&&(document.body.offsetWidth,In((()=>{c(o,(({el:e})=>{e.style.removeProperty("transition-duration"),e.style.removeProperty("transform"),Wn(e,r,(()=>e.classList.remove(s)))}))})))}var Jn,Yn,er;function tr(e,t,n,r,s,o,i,a,u,d){let h,f=ze.get(e),g=f?f[0]:"";if(g===Jn.TEXT||g===Jn.SLOT?(It.start(o),h=s(t,n,r,{renderComponent:o,slotComponent:i,varChain:a,updatedMap:d,pointType:g}),It.end(o,u)):h=s(t,n,r,{renderComponent:o,slotComponent:i,varChain:a,updatedMap:d,pointType:g}),!h)return;let[w,y,E,b,N,T]=h;if(h.length>6&&(u.__transition=h[6]),w===Yn.NONE)return;if(w===Yn.REFRESH){let e=h[1],t=p(e)?Sr(o,e.call(o,n[0])):e;return t&&xr(t,o,u.children,void 0,d),!0}let M=T;l(T)||(M=V(T,((e,t)=>e)));let C=u.__subViewId;void 0===C&&(C=u.__subViewId=_(t,"__anchor__"));let k=u.__parentViewsIdMap;void 0===k&&(k=u.__parentViewsIdMap={},c(F(t),(e=>{"__anchor__"!==e&&m(e,"__c-")&&(k[e]=_(t,[e]))})));let R=u.subViewRootNodes,A=u.children;if(w===Yn.REMOVE){let e=jn(u),t=[];c(R,(e=>{l(e)?c(e,(e=>t.push(e))):t.push(e)}));let n=A?v(A):[];u.subViewRootNodes=l(R)?[]:{},u.children=[],Qn(u,t,n,o,e)}else if(w===Yn.REPLACE){let e=jn(u),n=[];c(R,(e=>n.push(e)));let r=A?v(A):[];u.children=[],u.subViewRootNodes=l(R)?[]:{};let[,s,i]=h;u.__transitionSn=(u.__transitionSn??0)+1;let a=u.__transitionSn;if("in-out"===e?.mode)kr(t,u,s,i,o,void 0,void 0,e,(()=>{u.__transitionSn===a?Qn(u,n,r,o,e):Qn(u,n,r,o,void 0)}));else{const l=()=>kr(t,u,s,i,o,void 0,void 0,e);"out-in"===e?.mode?Qn(u,n,r,o,e,{onAfter:()=>{u.__transitionSn===a&&l()}}):(Qn(u,n,r,o,e),l())}}else if(w===Yn.UPDATE){let e=jn(u);if(x(R))return void kr(t,u,N,y,o,T,((e,t,n)=>E[n]),e);let n={},r={},s=t.parentElement.childNodes,i="__c-"+C;for(let e=0;e<s.length;e++){let t=s[e],r=t[i];if(null!=r){let e=n[r];e||(e=n[r]=[]),e.push(t)}}u.children?.forEach((e=>{r[e.key]?r[e.key].push(e):r[e.key]=[e]}));let a=b,l=E,h=new Map,p=new Map;a.forEach(((e,t)=>{h.set(e,t)})),l.forEach(((e,t)=>{p.set(e,t)}));const f=new Uint8Array(a.length),g=[];for(let e=0;e<l.length;e++){const t=h.get(l[e]);void 0!==t&&(f[t]=1,g.push(l[e]))}const m=[];for(let e=0;e<a.length;e++)f[e]||m.push(a[e]);let _;e&&(_=new Map,c(n,(e=>{c(e,(e=>{e instanceof Element&&_.set(e,e.getBoundingClientRect())}))})));let w,L=[],P=[],V=!1;if(!x(l)){let e=-1,t=[],r=[],s=0,o=0;for(;o<l.length;o++){const i=l[o];let a=h.get(i)??-1;if(a<0){let e=l[o-1];n[i]=[],L.push({refKey:e,newKey:i}),s++}else if(a>-1&&a!==o-s){if(e<0||1===Math.abs(e-a)){let e=G(t),r=0===o?er.AFTER_BEGIN:e?e.newKey:l[o-1],s=!1;0!==o&&x(n[r])&&(s=!0),t.push({newKey:i,refKey:r,refNew:s})}else{r.push({moveGroup:t,moveIndex:o+t.length});let e=l[o-1],s=!1;x(n[e])&&(s=!0),t=[],t.push({newKey:i,refKey:e,refNew:s})}e=a}}if(t.length>0&&r.push({moveGroup:t,moveIndex:o+t.length}),r.length>0){V=!0;let e=r.sort(((e,t)=>e.moveGroup.length-t.moveGroup.length));if(e.length<2){let{moveGroup:t}=e[0];if(t.length>1){let e=G(t).refKey;t[t.length-2].newKey===e&&(t=q(t))}nr(t,n,b)}else e.forEach((({moveGroup:e})=>{e[0].refNew?P.push(e):nr(e,n,b)}))}}let O=[];L.length>0&&(L.forEach((e=>{let t=p.get(e.newKey)??-1,r=M[t],s=Sr(o,N.call(o,r,e.newKey,t)),[i,a]=Cr(o,y,s);e.fragment=i,c(a,(t=>{t.key=e.newKey,u.children?.push(t)}));let l=v(i.childNodes),d=n[e.newKey],h=e.newKey+"";c(l,(e=>{d.push(e),S(e,"__c-"+C,h),c(k,((t,n)=>S(e,n,t))),e instanceof Element&&O.push(e)}))})),e&&O.length>0&&Fn(o,O,e),Mn(o),w=function(e){let t,n=[];return e.forEach((e=>{let r=G(n);r&&t===e.refKey?(r.group||(r.group=[r.fragment]),r.group.push(e.fragment)):n.push(e),t=e.newKey})),n}(L),w.forEach(((e,r)=>{let s=e.fragment,o=n[e.refKey??b[0]],i=I(o),a=G(o);if(e.group){let t=document.createDocumentFragment();t.append(...e.group),s=t}i===t?i.before(s):e.refKey?"string"==typeof i||a.after(s):i.before(s)}))),c(P,(e=>{nr(e,n,b)}));let D=e?new Set:void 0,W=[],H=[];if(m.forEach((t=>{let s=n[t]||[],o=r[t]||[];e?(c(s,(e=>{delete e["__c-"+C]})),c(o,(e=>{let t=A.indexOf(e);t>-1&&A.splice(t,1)})),c(s,(e=>{W.push(e),e instanceof Element&&D.add(e)})),c(o,(e=>H.push(e)))):(c(s,(e=>{e.parentNode?.removeChild(e)})),c(o,(e=>{e.destroy()})))})),W.length>0&&Qn(u,W,H,o,e,{forceFinish:!1}),e&&_&&(V||m.length>0||w)&&Zn(_,n,D,e),e&&O.length>0&&zn(o,O,e),V||m.length>0||w){const e=z(A,(e=>e.key));let t=[],n=0;l.forEach((r=>{e[r]&&e[r].forEach((e=>{e.varIndex=n++,t.push(e)}))})),Q(A,t).forEach((e=>e.destroy(o))),u.children=t}if(V||m.length>0||w){let e={};c(M,((t,r)=>{let s=E[r],o=n[s];e[s]=o})),u.subViewRootNodes=e}if(g.length>0){let e=[];c(T,((t,n,r,s)=>{let i=t,a=Sr(o,N.call(o,i,n,s));for(let t=0;t<a.length;t++)e.push(a[t])})),xr(e,o,u.children,void 0,d)}}return!0}function nr(e,t,n){e.forEach((({refKey:e,newKey:r})=>{let s=t[r];if(e===er.AFTER_BEGIN){let e=t[n[0]];I(e).before(...s)}else if(t[e]){let n=t[e],r=G(n);r?.after(...s)}}))}function rr(e,t){return ze.set(e,t),(...t)=>[e(...t),t,e,It.popDirectiveQ()]}function sr(e,t,n){ze.get(e)}!function(e){e.ATTR="attr",e.PROP="prop",e.TEXT="text",e.SLOT="slot",e.TAG="tag"}(Jn||(Jn={})),function(e){e.NONE="NONE",e.REFRESH="REFRESH",e.REMOVE="REMOVE",e.REPLACE="REPLACE",e.UPDATE="UPDATE",e.INIT="INIT"}(Yn||(Yn={})),function(e){e.AFTER_BEGIN="afterbegin"}(er||(er={}));const or=new RegExp(`([a-z0-9"'${Je}])\\s*>\\s*<`,"img");class ir{updatePointMetas;fragment;emptyEvents;upmMap;slotNodeMap;skipVarIndexSet;constructor(e,t,n){let[r,u]=this.parseTemplate(e);n&&o(n,u),this.updatePointMetas=[],this.emptyEvents={},this.skipVarIndexSet=new Set,this.fragment=function(e,t,n,r,o,u){const d=document.createElement("template");d.innerHTML=t;const h=new Map;t.includes("<transition")&&(!function(e,t,n,r){const s=e.querySelectorAll("transition");for(let e=0;e<s.length;e++){const o=s[e],i=Tr(o,n,r);i&&v(o.childNodes).forEach((e=>{e.nodeType===Node.TEXT_NODE&&(e.nodeValue||"").includes(Je)&&t.set(e,i)}));const a=o.parentNode;a&&v(o.childNodes).forEach((e=>a.insertBefore(e,o))),o.remove()}}(d.content,h,n,u),n=Y(n));const f=document.createNodeIterator(d.content,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT);let g,m,_=0,w=-1,y=-1;for(;g=f.nextNode();)if(w++,m&&!m.contains(g)&&(m=void 0,y=-1),g instanceof HTMLElement||g instanceof SVGElement){lt(g)&&(m=g,y=w);let t={};const c=g.attributes,u=[];for(let d=0;d<c.length;d++){let h=c[d].name,f=c[d].value;if(h!==wr)if(mr.test(h)){let t=n[_];if(l(t)&&p(t[0])){let[,,n,s]=t;sr(n,Jn.TAG,r.tagName);let o=new cr(_);o.isDirective=!0,o.directiveType=Jn.TAG,o.nodeSn=w,o.directiveVarChain=s,m&&(o.slotNodeSn=y),e.push(o),_++}u.push(h)}else if(h[0]!==ur)if(h!==gr)if(G(h)!==dr){if(f.includes(Je)){let t=new cr(_);if(t.attrName=h.replace(/\.|\?|@/,""),t.nodeSn=w,m&&(t.slotNodeSn=y),h[0]===dr||h[0]===hr||h[0]===pr){if(h[0]===hr)t.isToggleProp=!0,t.attrName=h.substring(1);else if(h[0]===pr){t.isRefAttr=!0;let e=h.substring(1);const[n,r]=e.split(fr);let s=n;switch(r){case"camel":s=a(s);break;case"kebab":s=i(s);break;case"snake":s=ee(s)}t.attrName=s}else{let e=ye[g.tagName.toLowerCase()];Se.get(e);{let e=a(h.substring(1));t.isProp=!0,t.attrName=e}}u.push(h)}else t.attrTmpl=f,t.isPureTmpl=f===Je+_;e.push(t),_++}}else{t[h.substring(0,h.length-1)]=f,u.push(h);let e=new cr(_);e.attrName=h.substring(0,h.length-1),e.nodeSn=w,e.isPropPerfix=!0}else{if(mr.test(f)){n[_];let t=new cr(_);t.isRef=!0,t.nodeSn=w,e.push(t),_++}u.push(h)}else{let t=h.substring(1);if(mr.test(f)){let r=new cr(_);r.isEvent=!0,r.attrName=t,r.nodeSn=w,e.push(r),n[_],_++}else if(s(f)){let e=o[w];e||(e=o[w]=[]),e.push(t)}u.push(h)}}for(let e=0;e<u.length;e++)g.removeAttribute(u[e])}else{let t=U(g.nodeValue).split(mr);if(t.length<2)continue;c(te(t.length-1),(o=>{let i=U(t[o]);if(!s(i)){let e=document.createTextNode(i);g.parentNode.insertBefore(e,g),w++}let a=document.createTextNode("");g.parentNode.insertBefore(a,g);let c=new cr(_);c.isText=!0,c.nodeSn=w,e.push(c);let u=n[_];if(l(u)&&p(u[0])){let e=m?Jn.SLOT:Jn.TEXT;c.isDirective=!0,c.directiveType=e,m&&(c.slotNodeSn=y);const t=h.get(g);t&&(c.transitionCfg=t);let[,,n]=u;sr(n,0,r.tagName),u=void 0}_++,w++})),w--;let o=U(G(t));if(s(o)){let e=g.previousSibling;g.parentNode.removeChild(g),g=e}else g.nodeValue=o,w++}return d.content}(this.updatePointMetas,r,u,t,this.emptyEvents,this.skipVarIndexSet),this.upmMap={},this.slotNodeMap={},this.updatePointMetas.forEach(((e,t)=>{this.upmMap[e.nodeSn]||(this.upmMap[e.nodeSn]=[]),this.upmMap[e.nodeSn].push(e),e.slotNodeSn>-1&&(this.slotNodeMap[e.slotNodeSn]=null)}))}parseTemplate(e){let t="",n=g(e.vars),r=e.strings.length-1,s=e.vars.length-1,o=0;for(let i=0;i<=r;i++){const r=e.strings[i];let a=o<n.length?n[o]:"";if(a instanceof ar){let[e,t]=this.parseTemplate(a);a=e,n.splice(o,1,...t),o+=t.length-1}else a=i>s?"":Je+o;o++,t=t+r+a}return t=t.replace(or,"$1><").trim(),t=br(t),[t,n]}}class ar{strings;vars;constructor(e,t){this.strings=e,this.vars=t}getKey(){let e=this.vars,t="";return c(this.strings,((n,r)=>{if(pe.test(n))return t=Z(e[r]),!1})),t}getKeys(){let e=this.vars,t=[];for(let n=0;n<this.strings.length;n++){const r=this.strings[n];if(pe.test(r)){let r=Z(e[n]);t.push(r)}}return x(t)&&e.forEach((e=>{if(e instanceof ar){let n=e.getKey();t.push(n)}})),t}append(e){this.strings=g(this.strings);let t=G(this.strings);return e.strings.forEach(((e,n)=>{0!=n?this.strings.push(e):this.strings[this.strings.length-1]=t+e})),this.vars=g(this.vars,e.vars),this}insert(e,t){this.strings=g(this.strings);let n=t.strings[0];return this.strings[e]+=n,this.strings.splice(e+1,0,...t.strings.slice(1)),this.vars.splice(e,0,...t.vars),this}getHTML(e){let t=[],n=new ir(this,e,t),[r,s]=Cr(e,n,t);return J(r.childNodes,((e,t)=>e+(t.nodeType==Node.TEXT_NODE?t.nodeValue:t.outerHTML??"")),"")}destroy(){this.strings=this.vars=null}}class lr{metaInfo;key;varIndex;value;node;subViewRootNodes;__destroyed=!1;children;parent;__slotCompResolved=!1;__slotComp=null;__subViewId;__parentViewsIdMap;__transition;__resolvedTransition;__transitionSn;constructor(e){this.varIndex=e}getSlotComponent(e){if(!this.__slotCompResolved&&(this.__slotCompResolved=!0,this.node)){let t=N(this.node,(e=>e.host&&e.host instanceof Vn),"parentNode");t&&t.host!==e&&(this.__slotComp=t.host)}return this.__slotComp}static createFrom(e){let t=new lr(e.varIndex);return t.metaInfo=e,t}destroy(e){if(this.__destroyed)return;this.__destroyed=!0;let t=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,!t)return;let r=n;r?.forEach(((t,n)=>{t.destroy(e)})),t instanceof Vn&&t.destroy(),e&&t instanceof Element&&at.clear(t),t?.remove()}insert(e){e.parent=this,this.children||(this.children=[]),this.children.push(e)}}class cr{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;transitionCfg;constructor(e){this.varIndex=e}}const ur="@",dr=".",hr="?",pr="*",fr=":",gr="ref",mr=new RegExp(`${Je}\\d+`),_r=/(<\/?)\s*([A-Z][A-Za-z0-9]*)([\s>])/gm,vr=/\s+([\.?@*])?((?:[a-zA-Z]*[A-Z][^\s<>="']+))(?=[\s=>])/gm,wr="slot-props",yr=new Map;let Er=0;function br(e){return n(e)?e=(e=e.replace(vr,((e,t,n)=>` ${t??""}${i(n)}`))).replace(_r,((e,t,n,r)=>t+we[n]+r)):e+""}function Sr(e,t){const n=[],r=[t],s=yr.get(e.constructor)?.skipVarIndexSet;for(;r.length;){const e=r.pop(),t=e.strings.length-1;for(let o=0;o<t;o++){if(s?.has(o))continue;const t=e.vars[o];t instanceof ar?r.push(t):n.push(t??"")}}return n}const Nr=new RegExp(`${Je}(\\d+)`);function Tr(e,t,n){let r,s,o,i,a;return c(e.attributes,(e=>{let l=e.nodeValue;if(mr.test(l??"")){const r=Nr.exec(e.value.trim());let s=parseInt(r[1]);l=t[s],t[s]=null,n.add(s)}let c=e.nodeName;if(c[0]===ur)return a||(a={}),void(a[c.substring(1)]=l);switch(c){case"name":r=l;break;case"mode":s=l;break;case"appear":o="true"===l||""===l;break;case"duration":if(l){const e=parseFloat(l);!isNaN(e)&&e>=0&&(i=e)}}})),r?{name:r,mode:s,appear:o,duration:i,hooks:a}:void 0}function Mr(e,t){let n=e.childNodes;for(let e=0,r=n.length;e<r;e++){let r=n[e],s=r.nodeType;s===Node.ELEMENT_NODE?(t.push(r),Mr(r,t)):s===Node.TEXT_NODE&&t.push(r)}}function Cr(e,t,n){const{fragment:r,updatePointMetas:s,emptyEvents:o,upmMap:i,slotNodeMap:a}=t;let l,c=r.cloneNode(!0),u=[];t.skipVarIndexSet?.size&&(n=n.filter(((e,n)=>!t.skipVarIndexSet?.has(n))));let d=[],h=[],p=Nn(e);const f=[];Mr(c,f);let g=-1,m=0;for(let t=0;t<f.length;t++){l=f[t],g++,null===a[g]&&(a[g]=l);let r,s=o[g];s&&s.forEach((e=>{p.push([e,k,l])}));const c=i[g];c&&c.forEach((e=>{let t=n[m++],s=lr.createFrom(e);if(s.node=l,s.value=t,e.isProp||e.isPropPerfix)(r??(r={}))[e.attrName]=t;else if(e.isRef)t.__setRef(new WeakRef(l));else if(e.isEvent)p.push([e.attrName,t,l]);else if(e.isToggleProp)s.value=!!t,l.toggleAttribute(e.attrName,s.value);else if(e.isRefAttr)l.setAttribute(e.attrName,t);else if(e.isText)if(e.isDirective){let n=e.attrName,r=a[e.slotNodeSn],[o,i,,c]=t;d.push([l,n,r,o,i,c,s])}else e.isPlaceholder||(l.textContent=t);else if(e.isDirective){let n=a[e.slotNodeSn],[r,s,,o]=t,i=e.attrName;x(o)&&M(e.directiveVarChain)>0&&(o=e.directiveVarChain),h.push([l,i,n,r,s,o,e.directiveType])}else l.setAttribute(e.attrName,e.attrTmpl.replace(mr,t));u.push(s)})),l instanceof HTMLSlotElement?e._bindSlot(l,l.name||"default",r):l instanceof HTMLElement&<(l)&&(Qe.set(l,e),r&&ct(e,l,r))}return d.forEach((([t,n,r,s,o,i,a])=>{t.__anchor__=Er++,It.start(e);let l=s(t,o,void 0,{renderComponent:e,slotComponent:r,varChain:i,attrName:n,pointType:a.directiveType});if(It.end(e,a),l&&l.length>6&&(a.__transition=l[6]),l&&l.length>1&&l[1]&&l[2]){let[,n,r,s,o]=l;Bn(a);const i=jn(a);kr(t,a,n,r,e,s,o,i?.appear?i:void 0)}})),h.forEach((([t,n,r,s,o,i,a])=>{s(t,o,void 0,{renderComponent:e,slotComponent:r,varChain:i,attrName:n,pointType:a})})),[c,u]}function kr(e,t,n,r,s,o,i,a,l){let u=[],d=i?{}:void 0;o=o??[0];let h=i?document.createDocumentFragment():void 0,p=_(e,"__anchor__");c(o,((e,o,a,l)=>{It.start(s);let c=Sr(s,n.call(s,e,o,l));It.end(s);let[f,g]=Cr(s,r,c),m=v(f.childNodes);if(i){let t=i.call(s,e,o,l)+"";m.forEach((e=>{e["__c-"+p]=t})),d[t]=m;for(let e=0;e<g.length;e++)g[e].key=t,u.push(g[e]);h.append(f)}else h=f,t.subViewRootNodes=m,g.forEach((e=>{t.insert(e)}))})),d&&(t.subViewRootNodes=d,u.forEach(((e,n)=>{e.varIndex=n,t.insert(e)}))),(h?h.childNodes.length:0)>0&&(a&&Fn(s,Kn(t.subViewRootNodes),a),Mn(s),e.parentNode.insertBefore(h,e)),a?zn(s,Kn(t.subViewRootNodes),a,l):l?.()}function xr(e,t,n,r,o,i){if(s(e))return;if(!n)return;let a;if(i&&i.length===e.length){a=new Uint8Array(e.length);for(let t=0;t<e.length;t++){const n=e[t];n===i[t]&&"object"!=typeof n&&(a[t]=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 d,h=i.value,p=i.node;if(!p)continue;if(d=e[c],!f(h)&&h===d)continue;let g=p;if(u.isDirective){let[e,n,s,a]=i.value;if(!l(d))continue;let c=i.getSlotComponent(t),[,u]=d;tr(s,p,u,n,e,t,c,a,i,o)&&r?.delete(i)}else if(u.isToggleProp){if(!!d===h)continue;g.toggleAttribute(u.attrName,!!d),g instanceof Vn&&g.updateProps({[u.attrName]:!!d})}else if(u.isProp){if(!f(d)&&d===h)continue;p instanceof Vn?p.updateProps({[u.attrName]:d}):p instanceof HTMLSlotElement&&t._updateSlot(p.getAttribute("name")||"default",u.attrName,d)}else if(u.attrName)h!=d&&("value"===u.attrName&&p instanceof HTMLInputElement?p.value=d:u.isPureTmpl?p.setAttribute(u.attrName,d+""):p.setAttribute(u.attrName,ne(u.attrTmpl,mr,d+"")));else if(u.isText){let e=Z(d??"");e!==p.textContent&&(p.textContent=e)}i.value=d}}function Rr(e,...t){return new ar(n(e)?[e]:e,t)}function Ar(e,...t){if(Ue.has(e))return Ue.get(e);let n=new Ye(e,t),r=e.join("");return x(r)||Ue.set(e,n),n}class Lr{__ref;get current(){return this.__ref?.deref()}__setRef(e){this.__ref=e}}function Pr(){return new Lr}var Vr;!function(e){e.CLASS="class",e.FIELD="field",e.METHOD="method"}(Vr||(Vr={}));class Ir{static get priority(){return 0}created(e,...t){}beforeMount(e,t,...n){}mounted(e,t,...n){}updated(e,t){}beforeDestroy(e,...t){}}class Or{metadata;decorator;key;priority=0;constructor(e,t,n){this.metadata=t,this.decorator=new n(...e),this.priority=_(n,"priority",0)}dispose(){this.metadata=null,this.decorator=null}create(e){let t,n=this.decorator.targets,s=this.metadata[1];f(s)&&$(_(s,"configurable"))?t=Vr.METHOD:r(this.metadata[1])&&(t=Vr.FIELD),!x(n)&&t&&n.includes(t)?this.decorator.created(e,...this.metadata):et(`Decorator '${this.decorator.constructor.name}' is out of targets, expect '${n.join(",")}' bug got '${t}'`)}beforeMount(e,t){this.decorator.beforeMount(e,t,...this.metadata)}mounted(e,t){this.decorator.mounted(e,t,...this.metadata)}updated(e,t){this.decorator.updated(e,t)}destroy(e){this.decorator.beforeDestroy(e,...this.metadata)}}function Dr(e){return(...t)=>(...n)=>{let r=n[0].constructor,s=Te.get(r);if(!Te.has(r)){let e=Object.getPrototypeOf(r);s=e?g(Te.get(e)??[]):[],Te.set(r,s)}let o=new Or(t,n.splice(1),e);return s?.push(o),s?.sort(((e,t)=>t.priority-e.priority)),o}}function Wr(e){return(...t)=>{if(!t||t.length<1)return;let n=t[0].constructor,r=Te.get(n);if(!Te.has(n)){let e=Object.getPrototypeOf(n);r=e?g(Te.get(e)??[]):[],Te.set(n,r)}let s=new Or([],t.splice(1),e);return r?.push(s),r?.sort(((e,t)=>t.priority-e.priority)),s}}function Hr(e,t,n){return Ee.has(e.constructor)||Ee.set(e.constructor,{}),Ee.get(e.constructor)[t]=n.get,delete e[t],Reflect.defineProperty(e,t,{get(){return It.isCollection()&&It.getVarPathList().push(t),Reflect.get(this[Ze],t)}}),Reflect.getOwnPropertyDescriptor(e,t)}const $r=Dr(class extends Ir{static get priority(){return Number.MAX_VALUE}created(e,t,...n){let r=_(e,t);S(e,t,A(r,this.wait,this.immediate)),S(e,t+"_$__",r)}beforeDestroy(e,t){S(e,t,null),S(e,t+"_$__",null)}get targets(){return[Vr.METHOD]}wait;immediate;constructor(e,t=!1){super(),this.wait=e,this.immediate=t}});function Ur(...e){return t=>{let n=ve.get(t);n||(n=new Set,ve.set(t,n)),e.forEach((e=>n.add(e)))}}function jr(e,t){return(n,r,s)=>{if(!_e.has(n.constructor)){let e=[],t=n.constructor;for(;(t=st(t))!==Vn;)e=g(e,_e.get(t)??[]);_e.set(n.constructor,e)}_e.get(n.constructor)?.push({name:e,targetFn:t,fnName:r})}}const Br=Dr(class extends Ir{static get priority(){return Number.MAX_VALUE}created(e,t,n,...r){let s=re(_(e,n),e);S(e,n,P(s)),S(e,n+"_$__",s)}beforeDestroy(e,t){S(e,t,null),S(e,t+"_$__",null)}get targets(){return[Vr.METHOD]}});var Kr;!function(e){e.ONCE="once"}(Kr||(Kr={}));const Fr=new WeakMap;class zr extends Ir{static get priority(){return Number.MAX_VALUE}get targets(){return[Vr.FIELD]}selector;cache;constructor(e,t){super(),this.selector=e,this.cache=t}static getKey(e){return e}getter(e){let t=e?.shadowRoot?.querySelector(this.selector),n=Fr.get(e);n||(n=new Map,Fr.set(e,n)),n.set(this.selector,t)}mounted(e,t,n,...r){const s=this;let o=new WeakRef(e);Reflect.defineProperty(e,n,{configurable:!0,get(){let e=o.deref();return Fr.has(e)&&Fr.get(e)?.has(s.selector)&&s.cache===Kr.ONCE||s.getter(e),Fr.get(e)?.get(s.selector)}})}beforeDestroy(e,t){Fr.get(e)?.clear(),Fr.delete(e)}updated(e,t){this.cache!==Kr.ONCE&&this.getter(e)}}const Gr=Dr(zr),Xr=Dr(class extends zr{getter(e){let t=e.shadowRoot?.querySelectorAll(this.selector),n=Fr.get(e);n||(n=new Map,Fr.set(e,n)),n.set(this.selector,t)}});function qr(e){if(1===arguments.length)return(t,n)=>{Qr(t,n,e)};Qr(arguments[0],arguments[1],{prop:""})}function Qr(e,t,n){if(!be.has(e.constructor)){const t={};let n=e.constructor;for(;(n=st(n))!==Vn;)y(t,be.get(n)??{});be.set(e.constructor,t)}if(n.shallow=n.shallow||!1,S(be.get(e.constructor),t,n),n.hasChanged){let r=De.get(e.constructor);r||(r=new Map,De.set(e.constructor,r)),r.set(t,n.hasChanged)}if(n.shallow){let n=Ie.get(e.constructor);n||(n=new Set,Ie.set(e.constructor,n)),n.add(t)}Reflect.defineProperty(e,t,{get(){return Mt(t,this)},set(e){Ct(t,e,this)}})}function Zr(e,t,n){Qr(e.prototype,t,n||{prop:""})}function Jr(e,t=!1){return n=>{n&&(t?customElements.define(e,n):(we[n.name]=e,ye[e]=n))}}const Yr=Dr(class extends Ir{static get priority(){return Number.MAX_VALUE}created(e,t,...n){let r=_(e,t);S(e,t,L(r,this.wait)),S(e,t+"_$__",r)}beforeDestroy(e,t){S(e,t,null),S(e,t+"_$__",null)}get targets(){return[Vr.METHOD]}wait;constructor(e){super(),this.wait=e}});function es(e,t){return(n,r)=>{let s=Le.get(n.constructor),i=Ae.get(n.constructor),a=ke.get(n.constructor),c=xe.get(n.constructor),u=Re.get(n.constructor),d=Pe.get(n.constructor);if(!u){u=new Map,Re.set(n.constructor,u),c=[],xe.set(n.constructor,c),a=new Map,ke.set(n.constructor,a),s={},Le.set(n.constructor,s),i={},Ae.set(n.constructor,i),d={},Pe.set(n.constructor,d);let e=st(n.constructor);for(;e;)Re.has(e)&&(Re.get(e)?.forEach(((e,t)=>{u.set(t,e)})),c.push(...xe.get(e)),ke.get(e)?.forEach(((e,t)=>{a.set(t,e)})),o(s,Le.get(e)),o(i,Ae.get(e)),o(d,Pe.get(e))),e=st(e)}(l(e)?e:[e]).forEach((e=>{let o=n[r];_(t,"once",!1)&&a.set(e,!1);let l=_(t,"deep",!1),h=e.split(".")[0],p=u.get(h);if(p||(p=[],u.set(h,p)),p.includes(e)||p.push(e),l?(s[e]=s[e]??new Set,s[e].add(o),c.push(e)):(i[e]=i[e]??new Set,i[e].add(o)),_(t,"immediate",!1)){let t=d[e];t||(t=d[e]=new Set),t.add(o)}}))}}const ts=new WeakMap;function ns(e){if("string"==typeof e)return e.trim();if(se(e)){let t="";return c(e,((e,n)=>{e&&(t+=(t?" ":"")+n)})),t}if(Array.isArray(e)){let t="";return c(e,(e=>{const n=ns(e);n&&(t+=(t?" ":"")+n)})),t}return""}const rs=rr((function(e){return(e,[t],n)=>{const r=e,s=ns(t),o=ts.get(r)??"";s!==o&&(o&&r.classList.remove(...o.split(" ").filter(Boolean)),s&&r.classList.add(...s.split(" ").filter(Boolean)),ts.set(r,s))}}),[Jn.TAG]),ss=new Map,os=new WeakMap,is=new WeakMap,as=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 ls(e){if(x(e))return;let t={value:""};if(f(e))t=e;else{if(!n(e)&&!ie(e))return;t.value=e,t.important=!1}return t}function cs(e){let t={};if(n(e)){const n=e.trim();return n&&n.split(";").filter((e=>e.trim())).forEach((e=>{const n=e.indexOf(":");if(n>0){const r=e.slice(0,n).trim();let s=ls(e.slice(n+1).trim());s&&(t[r]=s)}})),t}let r={};if(Array.isArray(e))for(const t of e){const e=cs(t);Object.assign(r,e)}else f(e)&&(r=e);return c(r,((e,n)=>{let r=function(e){if(e.startsWith("--"))return e;if(ss.has(e))return ss.get(e);const t=i(e);return ss.set(e,t),t}(n),s=ls(e);s&&(as.has(r)&&!r.startsWith("--")&&oe(s.value)&&(s.value=s.value+"px"),t[r]=s)})),t}const us=rr((function(e){return(e,t,n)=>{let r=e;const s=cs(t[0]),o=new Set(Object.keys(s)),i=os.get(r);let a=is.get(r);a||(a={},is.set(r,a)),c(i,(e=>{o.has(e)||(r.style.removeProperty(e),delete a[e])})),c(s,((e,t)=>{const n=e.value+""+(e.important?" !important":"");a[t]!==n&&(r.style.setProperty(t,e.value+"",e.important?"important":""),a[t]=n)})),os.set(r,o)}}),[Jn.TAG]),ds=["key","ref","emit-native"],hs=new WeakMap,ps=new WeakMap,fs=new WeakMap,gs=new WeakMap,ms="class",_s="style";const vs=rr((function(e){return(e,[t],n,{renderComponent:r})=>{let s=e;if(function(e,t,n){const r=n?ns(t):"",s=ps.get(e)??"";r!==s&&(s&&e.classList.remove(...s.split(" ").filter(Boolean)),r&&e.classList.add(...r.split(" ").filter(Boolean)),ps.set(e,r))}(s,t[ms],ms in t),function(e,t,n){const r=n?cs(t):{},s=new Set(Object.keys(r)),o=fs.get(e);let i=gs.get(e);i||(i={},gs.set(e,i)),o&&o.forEach((t=>{s.has(t)||(e.style.removeProperty(t),delete i[t])})),c(r,((t,n)=>{const r=t.value+""+(t.important?" !important":"");i[n]!==r&&(e.style.setProperty(n,t.value+"",t.important?"important":""),i[n]=r)})),fs.set(e,s)}(s,t[_s],_s in t),n){let e=hs.get(s);return e||(e={},hs.set(s,e)),void c(t,((t,n)=>{ds.includes(n)||n===ms||n===_s||(e[n]!==t||null!==t&&"object"==typeof t)&&(s.setAttribute(n,t),e[n]=t)}))}if(lt(s)){let e={},n=Se.get(s.constructor),o={};hs.set(s,o),c(t,((t,r)=>{if(ds.includes(r)||r===ms||r===_s)return;let i=a(r);(n?n[i]:void 0)?e[r]=t:(s.setAttribute(r,t+""),o[r]=t)})),ct(r,s,e)}else{let e={};hs.set(s,e),c(t,((t,n)=>{ds.includes(n)||n===ms||n===_s||(s.setAttribute(n,t),e[n]=t)}))}}}),[Jn.TAG]),ws=new WeakMap,ys=new WeakMap,Es=new WeakMap;function bs(e,t){let n=Wt.get(e);if(!n||0===n.length)return null;let r=n.join("."),s=Dt.get(t),o=s?.[n[0]];return{proxyRoot:r,ctxRoot:void 0!==o?[o,...n.slice(1)].join("."):r}}function Ss(e,t,n){let r=It.getVarPathList(),s=t+"."+n;for(let n=e;n<r.length;n++){let e=r[n];if(e===t||m(e,t+".")&&e!==s&&!m(e,s+"."))return!0}return!1}function Ns(e,t,n,r,s,o){let i=[],a=[],l=!1,u=void 0!==r&&It.isCollection(),d=0;return c(e,((e,s)=>{let o=u?It.getVarPathList().length:0,c=Sr(n,t.call(n,e,s));u&&!l&&(l=Ss(o,r,d)),a.push(c);for(let e=0;e<c.length;e++)i.push(c[e]);d++})),void 0!==o&&void 0!==r&&void 0!==s&&(u?Es.set(o,{keys:ws.get(o),varsPerItem:a,cross:l}):Es.delete(o)),i}const Ts=rr((function(e,t,n){return(e,s,o,{renderComponent:i,updatedMap:a})=>{let l=s[0];if(x(l)&&r(o))return[Yn.INIT];let u=ws.get(e);if(o&&u&&!x(l)&&o[0]===l){let r=bs(l,i);if(r){let s=function(e,t){if(!e)return null;let n=Object.keys(e);if(0===n.length)return null;let r=t+".",s=new Set;for(let o=0;o<n.length;o++){let i=n[o];if(i===t||m(t,i+".")){if(e[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 e of s){if(e>=o.length){a=!0;break}let n=t(o[e],e,e);if((W(n)?null:"string"==typeof n?n:String(n))!==u[e]){a=!0;break}}if(!a){let t=Es.get(e);if(t&&t.keys===u&&!t.cross&&t.varsPerItem.length===u.length){let e=It.isCollection(),a=!1;for(let l of s){let s=e?It.getVarPathList().length:0;if(t.varsPerItem[l]=Sr(i,n.call(i,o[l],l)),e&&!t.cross&&Ss(s,r.proxyRoot,l)){t.cross=!0,a=!0;break}}if(!a){let e=[];for(let n=0;n<t.varsPerItem.length;n++){let r=t.varsPerItem[n];for(let t=0;t<r.length;t++)e.push(r[t])}return[Yn.REFRESH,e]}}return[Yn.REFRESH,Ns(l,n,i,r.proxyRoot,r.ctxRoot,e)]}}}}const d=[],h=new Set;let p,f=0;if(c(l,((e,n)=>{let r=t(e,n,f++);if(W(r))return;const s="string"==typeof r?r:String(r);h.has(s)?et(`forEach - duplicate key in '${d}'`):(h.add(s),d.push(s))})),ws.set(e,d),o){if(x(d))return[Yn.REMOVE];if(u&&d.length===u.length&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(d,u)){let t=bs(l,i);return[Yn.REFRESH,t?Ns(l,n,i,t.proxyRoot,t.ctxRoot,e):Ns(l,n,i)]}}Es.delete(e);let g=s[2];if(ys.has(e))p=ys.get(e);else{let t=F(l)[0],n=l[t],r=g.call(i,n,t,0);p=new ir(r,i),ys.set(e,p)}return o?[Yn.UPDATE,p,d,u,g,l]:[Yn.INIT,n,p,l,t]}}),[Jn.TEXT,Jn.SLOT]);let Ms=document.createElement("template"),Cs=new WeakMap;const ks=rr((function(e){return(e,t,n,{renderComponent:r})=>{if(!(n&&t[0]==n[0]||W(t[0])))if(ae(e))e.innerHTML=br(t[0]);else{let r=Cs.get(e);r||(r=document.createTextNode(""),e.parentNode?.insertBefore(r,e),Cs.set(e,r)),Ms.innerHTML=br(t[0]),s(n)||at.remove(r,e),e.before(Ms.content.cloneNode(!0))}}}),[Jn.TAG,Jn.TEXT,Jn.SLOT]),xs=new WeakMap,Rs=new WeakMap,As=new WeakMap,Ls=rr((function(e,t,n){return(e,[t,n,r],s,{renderComponent:o})=>{let i;if(s){if(!!t==!!s[0]){let t=xs.get(e);return[Yn.REFRESH,t]}let a=t?n:r;return t?(i=Rs.get(e),i||(i=new ir(a.call(o,t),o),Rs.set(e,i))):(i=As.get(e),i||(i=new ir(a.call(o,t),o),As.set(e,i))),[Yn.REPLACE,a,i]}let a=t?n:r;return t?(i=Rs.get(e),i||(i=new ir(a.call(o,t),o),Rs.set(e,i))):(i=As.get(e),i||(i=new ir(a.call(o,t),o),As.set(e,i))),xs.set(e,a),[Yn.INIT,a,i]}}),[Jn.TEXT,Jn.SLOT]),Ps=new WeakMap,Vs=rr((function(e,t){return(e,[t,n],r,{renderComponent:s})=>{let o=Ps.get(e);return t&&!Ps.has(e)&&(o=new ir(n.call(s),s),Ps.set(e,o)),r?r[0]?t?[Yn.REFRESH,n]:[Yn.REMOVE]:t?[Yn.REPLACE,n,o]:[Yn.NONE]:[Yn.INIT,...t?[n,o]:[]]}}),[Jn.TEXT,Jn.SLOT]);var Is;!function(e){e.CHANGE="change",e.INPUT="input"}(Is||(Is={}));const Os=rr((function(e,t="value",r){return(e,[t,r,s],o,{varChain:i,renderComponent:a})=>{r=r??"value";const l=e;if(o){const e=o[0],n=t;if(!f(n)&&Object.is(n,e))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 e=R(l.querySelectorAll("option"),(e=>e.value==n));e&&(e.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)?le(s)[0]:G(i);const u=ce(c,".")[0];let d=Dt.get(a),h="";d&&(h=d[u]),u in a||!h||h in a||et(`model - property '${u}' is not defined on the instance of `+a.tagName);let p=Nn(a);if(f(t)||U(t)||(t=""),ye[l.tagName.toLowerCase()]){ct(a,l,{[r]:t}),vn(l,a,"update:"+r,(function(e){let t=this,n=(Dt.get(t)??{})[u];!(u in t)&&n&&_(t.wrapperComponent,u)===_(t,n)&&(t=t.wrapperComponent||t),S(t,c,e.value)}))}else if(l instanceof HTMLTextAreaElement){l.setAttribute(r,t+"");let e="input";p.push([e,function(e){let t=e.target;S(this,c,t.value)},l])}else if(l instanceof HTMLInputElement){let e="",n="";switch(l.type){case"checkbox":case"radio":e="checked",n="change";break;default:e="value",n="input"}l.setAttribute(r??e,t+""),p.push([n,function(e){let t=e.target;S(this,c,t.value)},l])}else l instanceof HTMLSelectElement&&(l.setAttribute(r,t+""),p.push(["change",function(e){let t=e.target,n=this,r=(Dt.get(n)??{})[u];!(u in n)&&r&&_(n.wrapperComponent,u)===_(n,r)&&(n=n.wrapperComponent||n),S(n,c,t.value)},l]))}}),[Jn.TAG]),Ds=new WeakMap,Ws=rr((function(e,t){return(e,[t,n],r)=>{if(r&&t===r[0])return;let s=e;if(!Ds.has(s)){let e=s.style.display;Ds.set(s,"none"==e?"unset":e)}s.style.display=t?Ds.get(s):"none",n&&n(s,t)}}),[Jn.TAG]),Hs=rr((function(e,t){return(e,[t,n],r,{renderComponent:s,slotComponent:o})=>{if(r)return;t=t.bind(s);let i=qe.get(o);i||(i={},qe.set(o,i)),i[n||"default"]=t}}),[Jn.SLOT]),$s=new WeakMap,Us=new WeakMap,js=rr((function(e,t){return(e,[t,n],r,{renderComponent:s})=>{let o=()=>Rr``,i=[],a=[];c(n,((e,t)=>{if(p(e))i.push(t),a.push(e);else{let t=e[0],n=e[1];i.push(t),a.push(n)}"default"===t&&(o=e)}));let l=ue(i,(e=>p(e)?e(t):e==t)),u=$s.get(e);$s.set(e,l);let d=Us.get(e);if(d||(d=[],Us.set(e,d)),!d[l]){let e=new ir((a[l]??o).call(s),s);d[l]=e}return r?u==l?[Yn.REFRESH,a[l]??o]:[Yn.REPLACE,a[l]??o,d[l]]:[Yn.INIT,a[l]??o,d[l]]}}),[Jn.TEXT,Jn.SLOT]);function Bs(e){const t="undefined"!=typeof document?document:void 0;if("function"==typeof t?.startViewTransition){return t.startViewTransition((()=>Promise.resolve(e()))).finished}e()}class Ks{static getCssText(e,t=!1){return n(e)?e:de(V(e,((e,n)=>n.startsWith("--")?n+":"+e+(t?" !important":""):i(n)+":"+e+(t?" !important":""))),";")+";"}static setStyle(e,t){if(n(e)&&!U(e))return;let r=Ks.getCssText(e);t.style.cssText=r}}function Fs(){c(ye,((e,t)=>{customElements.get(t)||customElements.define(t,e)}))}export{Vn as CompElem,Ks as CssHelper,gt as Csscope,Ir as Decorator,Vr as DecoratorType,Or as DecoratorWrapper,Yn as DirectiveUpdateTag,at as DomUtil,Jn as EnterPointType,Is as ModelTriggerType,Kr as QueryCache,ar as Template,Qt as _getObservedAttrs,st as _getSuper,ct as addUninitializedSubComponentProp,Fn as beginEnter,vs as bind,Un as buildTransitionCfg,ht as camelCaseCached,rs as classes,Kn as collectElementRoots,$n as collectRootNodes,Hr as computed,jt as createReactiveState,Pr as createRef,Ar as css,mt as csscope,$r as debounced,Dr as decorator,Wr as decoratorWithNoArgs,Fs as defineComponents,rr as directive,sr as directiveScopeChecker,Ur as emits,jr as event,Ts as forEach,qn as forceFinishLeave,bt as getBaseSheets,it as getBooleanValue,Tt as getComponentDefaultProps,ut as getCssVarKey,Ot as getCurrentRenderComponent,St as getDefaultCss,Nt as getGlobalDefaultProps,jn as getTransitionCfg,Rr as h,ks as html,Ls as ifElse,Vs as ifTrue,ot as isBooleanProp,lt as isCompElemNode,Zr as makeState,Os as model,ns as normalizeClass,cs as normalizeStyle,Br as onced,Zn as playMove,Gt as prop,Gr as query,Xr as queryAll,Qn as removeNodesAnimated,Bn as resolveAnchorHooks,Hn as runTransition,yt as setDefaults,zn as settleEnter,Ws as show,et as showError,tt as showTagError,rt as showTagWarn,nt as showWarn,Hs as slot,Bs as startViewTransition,qr as state,us as styles,Jr as tag,Yr as throttled,ft as typeNameLower,tr as updateDirective,es as watch,js as when};
|
package/package.json
CHANGED
package/render/TemplateMeta.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export declare class TemplateMeta {
|
|
|
11
11
|
emptyEvents: Record<number, string[]>;
|
|
12
12
|
upmMap: Record<number, UpdatePointMeta[]>;
|
|
13
13
|
slotNodeMap: Record<number, Node | null>;
|
|
14
|
+
skipVarIndexSet: Set<number> | undefined;
|
|
14
15
|
constructor(tmpl: Template, component: CompElem<any>, vars?: any[]);
|
|
15
16
|
parseTemplate(tmpl: Template): [string, any[]];
|
|
16
17
|
}
|
package/render/UpdatePoint.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CompElem } from "../CompElem";
|
|
2
|
+
import { TransitionCfg } from "../types";
|
|
2
3
|
import { UpdatePointMeta } from "./UpdatePointMeta";
|
|
3
4
|
/**
|
|
4
5
|
* 视图更新点
|
|
@@ -17,6 +18,9 @@ export declare class UpdatePoint {
|
|
|
17
18
|
private __slotComp;
|
|
18
19
|
__subViewId: number | undefined;
|
|
19
20
|
__parentViewsIdMap: Record<string, string> | undefined;
|
|
21
|
+
__transition?: TransitionCfg;
|
|
22
|
+
__resolvedTransition?: TransitionCfg;
|
|
23
|
+
__transitionSn?: number;
|
|
20
24
|
constructor(varIndex: number);
|
|
21
25
|
/**
|
|
22
26
|
* 获取更新点所属的slot组件(带缓存)
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TransitionCfg } from "../types";
|
|
1
2
|
/**
|
|
2
3
|
* 视图更新点元数据
|
|
3
4
|
*/
|
|
@@ -22,5 +23,6 @@ export declare class UpdatePointMeta {
|
|
|
22
23
|
isSlot: boolean;
|
|
23
24
|
nodeSn: number;
|
|
24
25
|
slotNodeSn: number;
|
|
26
|
+
transitionCfg?: TransitionCfg;
|
|
25
27
|
constructor(varIndex: number);
|
|
26
28
|
}
|
package/render/render.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CompElem } from "../CompElem";
|
|
2
|
-
import { KeyFn, TplFn, UpdatedSource } from "../types";
|
|
2
|
+
import { KeyFn, TplFn, TransitionCfg, UpdatedSource } from "../types";
|
|
3
3
|
import { CssTemplate } from "./CssTemplate";
|
|
4
4
|
import { Template } from "./Template";
|
|
5
5
|
import { TemplateMeta } from "./TemplateMeta";
|
|
@@ -16,15 +16,15 @@ export declare const ATTR_REF = "ref";
|
|
|
16
16
|
* @author holyhigh2
|
|
17
17
|
*/
|
|
18
18
|
export declare function convertHTML(html: string): string;
|
|
19
|
-
export declare function buildVars(tmpl: Template): any[];
|
|
19
|
+
export declare function buildVars(comp: CompElem<any>, tmpl: Template): any[];
|
|
20
20
|
/**
|
|
21
21
|
* 构建模板DOM
|
|
22
22
|
* @param html
|
|
23
23
|
*/
|
|
24
|
-
export declare function createTemplate(updatePoints: Array<UpdatePointMeta>, html: string, vars: any[], renderComponent: CompElem, emptyEvents: Record<number, string[]>): DocumentFragment;
|
|
24
|
+
export declare function createTemplate(updatePoints: Array<UpdatePointMeta>, html: string, vars: any[], renderComponent: CompElem, emptyEvents: Record<number, string[]>, skipVarIndexSet: Set<number>): DocumentFragment;
|
|
25
25
|
export declare function renderTemplate(component: CompElem<any>, tmplM: TemplateMeta, vars: any[]): [DocumentFragment, UpdatePoint[]];
|
|
26
26
|
export declare function buildView(tmpl: Template, component: CompElem<any>): DocumentFragment;
|
|
27
|
-
export declare function insertSubView(node: Node, point: UpdatePoint, tmplFn: TplFn, tmplM: TemplateMeta, component: CompElem<any>, valueAry?: any[], keyFn?: KeyFn): void;
|
|
27
|
+
export declare function insertSubView(node: Node, point: UpdatePoint, tmplFn: TplFn, tmplM: TemplateMeta, component: CompElem<any>, valueAry?: any[], keyFn?: KeyFn, enterCfg?: TransitionCfg, onEnterDone?: () => void): void;
|
|
28
28
|
export declare function updateView(vars: any[], renderComponent: CompElem<any>, updatePoints: UpdatePoint[], renderedUps?: Set<UpdatePoint>, changed?: Record<string, UpdatedSource>, oldVars?: any[]): void;
|
|
29
29
|
export declare function updateSubScopeView(subScopeUpdatePoint: UpdatePoint, renderComponent: CompElem<any>, tmpl?: Template, updatedMap?: Record<string, UpdatedSource>): void;
|
|
30
30
|
/**
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { CompElem } from "../CompElem";
|
|
2
|
+
import { UpdatePoint } from "../render/UpdatePoint";
|
|
3
|
+
import { TransitionCfg, TransitionOptions } from "../types";
|
|
4
|
+
/**
|
|
5
|
+
* 对一组元素按类名协议执行入场/离场时序。
|
|
6
|
+
* 返回取消函数:清理类名并触发cancelled钩子,但不调用done(由中断方接管后续)。
|
|
7
|
+
*/
|
|
8
|
+
export declare function runTransition(component: CompElem, els: Element[], kind: 'enter' | 'leave', cfg: TransitionCfg, done: () => void): () => void;
|
|
9
|
+
/**
|
|
10
|
+
* 收集子视图根节点(数组/按key记录两种形态)
|
|
11
|
+
*/
|
|
12
|
+
export declare function collectRootNodes(subViewRootNodes: any, out: Node[]): void;
|
|
13
|
+
/**
|
|
14
|
+
* 由 transition 指令选项构建内部配置
|
|
15
|
+
*/
|
|
16
|
+
export declare function buildTransitionCfg(name: string, options?: TransitionOptions): TransitionCfg | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* 读取更新点上的过渡配置:
|
|
19
|
+
* - `<transition>` 伪标签:附着在模板元数据上(解析期),钩子表达式经 resolveAnchorHooks 解析后存于 __resolvedTransition
|
|
20
|
+
* - transition() 指令:每次更新附着在更新点上(钩子为实函数,无需解析)
|
|
21
|
+
*/
|
|
22
|
+
export declare function getTransitionCfg(up: UpdatePoint): TransitionCfg | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* 解析<transition>伪标签钩子引用:按锚点vars槽位偏移从当前vars取函数并绑定组件实例。
|
|
25
|
+
* 结果写入 up.__resolvedTransition(每次更新重算)。
|
|
26
|
+
* ⚠️ 必须返回/写入拷贝:metaInfo.transitionCfg 属于模板级共享元数据,不可原地注入运行时函数。
|
|
27
|
+
*/
|
|
28
|
+
export declare function resolveAnchorHooks(up: UpdatePoint, vars: any[], component: CompElem<any>): void;
|
|
29
|
+
/**
|
|
30
|
+
* 收集子视图根元素
|
|
31
|
+
*/
|
|
32
|
+
export declare function collectElementRoots(subViewRootNodes: any): Element[];
|
|
33
|
+
/**
|
|
34
|
+
* 入场第一阶段:必须在元素插入文档【之前】调用。
|
|
35
|
+
* 提前打好 enter-from/enter-active,使元素的首个计算样式即为入场起点;
|
|
36
|
+
* 若插入后才加类,浏览器会以插入态(如opacity:1)为过渡起点产生幻影过渡,入场动画不可见。
|
|
37
|
+
*/
|
|
38
|
+
export declare function beginEnter(component: CompElem, els: Element[], cfg: TransitionCfg): void;
|
|
39
|
+
/**
|
|
40
|
+
* 入场第二阶段:元素插入文档后调用——下一帧移除enter-from换enter-to并等待过渡结束。
|
|
41
|
+
* 返回取消函数(清理类名并触发onEnterCancelled,不调用done)。
|
|
42
|
+
*/
|
|
43
|
+
export declare function settleEnter(component: CompElem, els: Element[], cfg: TransitionCfg, done?: () => void): () => void;
|
|
44
|
+
/**
|
|
45
|
+
* 立即结束锚点上进行中的离场动画并完成移除。
|
|
46
|
+
* 用于 REMOVE/REPLACE 开始前清理旧离场批次:中断过渡、立即移除节点与更新点,
|
|
47
|
+
* 且不触发该批次挂起的 onAfter(如out-in模式下已被取代的延迟插入)。
|
|
48
|
+
*/
|
|
49
|
+
export declare function forceFinishLeave(up: UpdatePoint): void;
|
|
50
|
+
/**
|
|
51
|
+
* 延迟离场移除:对元素打 leave 类,过渡结束后才执行真正的节点移除与更新点销毁。
|
|
52
|
+
* 无配置或无可动画元素时立即移除(与原行为一致)。
|
|
53
|
+
*/
|
|
54
|
+
export declare function removeNodesAnimated(up: UpdatePoint, nodes: Node[], ups: UpdatePoint[], component: CompElem, cfg: TransitionCfg | undefined, opts?: {
|
|
55
|
+
onAfter?: () => void;
|
|
56
|
+
forceFinish?: boolean;
|
|
57
|
+
}): void;
|
|
58
|
+
/**
|
|
59
|
+
* FLIP回放列表位移:从First位置到当前Last位置的反向transform过渡。
|
|
60
|
+
* leaving中的元素不在回放范围内。
|
|
61
|
+
*/
|
|
62
|
+
export declare function playMove(flipRects: Map<Element, DOMRect>, nodeMap: Record<string, any> | any[], leavingEls: Set<Element>, cfg: TransitionCfg): void;
|
package/types.d.ts
CHANGED
|
@@ -151,6 +151,40 @@ export declare enum DirectiveUpdateTag {
|
|
|
151
151
|
UPDATE = "UPDATE",//对比更新
|
|
152
152
|
INIT = "INIT"
|
|
153
153
|
}
|
|
154
|
+
/**
|
|
155
|
+
* 新旧内容交替模式
|
|
156
|
+
* - default:离场与入场同时进行
|
|
157
|
+
* - out-in:旧内容离场完成后新内容再入场
|
|
158
|
+
* - in-out:新内容入场完成后旧内容再离场
|
|
159
|
+
*/
|
|
160
|
+
export type TransitionMode = 'default' | 'out-in' | 'in-out';
|
|
161
|
+
/**
|
|
162
|
+
* transition指令选项
|
|
163
|
+
*/
|
|
164
|
+
export type TransitionOptions = Record<string, Function> & {
|
|
165
|
+
/**
|
|
166
|
+
* 新旧内容交替模式,默认default
|
|
167
|
+
*/
|
|
168
|
+
mode?: TransitionMode;
|
|
169
|
+
/**
|
|
170
|
+
* 首次渲染时是否播放入场动画,默认false
|
|
171
|
+
*/
|
|
172
|
+
appear?: boolean;
|
|
173
|
+
/**
|
|
174
|
+
* 显式动画时长(ms),设置后不再自动探测transition/animation时长
|
|
175
|
+
*/
|
|
176
|
+
duration?: number;
|
|
177
|
+
};
|
|
178
|
+
/**
|
|
179
|
+
* 解析后的过渡动画配置
|
|
180
|
+
*/
|
|
181
|
+
export type TransitionCfg = {
|
|
182
|
+
name: string;
|
|
183
|
+
mode?: TransitionMode;
|
|
184
|
+
appear?: boolean;
|
|
185
|
+
duration?: number;
|
|
186
|
+
hooks?: Record<string, Function>;
|
|
187
|
+
};
|
|
154
188
|
export type DefaultProps = Partial<{
|
|
155
189
|
css: Array<string | CSSStyleSheet>;
|
|
156
190
|
global: Record<string, any>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* View Transitions API 封装:在浏览器支持的环境下返回过渡的 finished Promise,
|
|
3
|
+
* 可用 ::view-transition-old(root) / ::view-transition-new(root) CSS 控制过渡效果。
|
|
4
|
+
* 不支持时(如Firefox)降级为直接执行回调。
|
|
5
|
+
*
|
|
6
|
+
* 适合整页级路由切换:
|
|
7
|
+
* @example
|
|
8
|
+
* startViewTransition(() => { location.href = '#/next' })
|
|
9
|
+
*/
|
|
10
|
+
export declare function startViewTransition(callback: () => void | Promise<void>): Promise<void> | undefined;
|