@mantou/gem 1.6.16 → 1.6.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/gem.es.js CHANGED
@@ -1535,7 +1535,7 @@ var __privateSet$1 = (obj, member, value, setter) => {
1535
1535
  setter ? setter.call(obj, value) : member.set(obj, value);
1536
1536
  return value;
1537
1537
  };
1538
- var _renderRoot, _internals, _isAppendReason, _isAsync, _effectList, _momeList, _unmountCallback, _exec, _execEffect, _execMemo, _initEffect, _render, _shouldUpdate, _updateCallback, _update, _updated, _connectedCallback;
1538
+ var _renderRoot, _internals, _isAppendReason, _isMounted, _isAsync, _effectList, _memoList, _unmountCallback, _exec, _execEffect, _execMemo, _initEffect, _render, _shouldUpdate, _updateCallback, _update, _updated, _connectedCallback;
1539
1539
  function emptyFunction() {
1540
1540
  }
1541
1541
  function execCallback(fun) {
@@ -1560,9 +1560,10 @@ class GemElement extends HTMLElement {
1560
1560
  __privateAdd$1(this, _renderRoot, void 0);
1561
1561
  __privateAdd$1(this, _internals, void 0);
1562
1562
  __privateAdd$1(this, _isAppendReason, void 0);
1563
+ __privateAdd$1(this, _isMounted, void 0);
1563
1564
  __privateAdd$1(this, _isAsync, void 0);
1564
1565
  __privateAdd$1(this, _effectList, void 0);
1565
- __privateAdd$1(this, _momeList, void 0);
1566
+ __privateAdd$1(this, _memoList, void 0);
1566
1567
  __privateAdd$1(this, _unmountCallback, void 0);
1567
1568
  this.setState = (payload) => {
1568
1569
  if (!this.state)
@@ -1585,7 +1586,7 @@ class GemElement extends HTMLElement {
1585
1586
  __privateGet$1(this, _exec).call(this, __privateGet$1(this, _effectList));
1586
1587
  });
1587
1588
  __privateAdd$1(this, _execMemo, () => {
1588
- __privateGet$1(this, _exec).call(this, __privateGet$1(this, _momeList));
1589
+ __privateGet$1(this, _exec).call(this, __privateGet$1(this, _memoList));
1589
1590
  });
1590
1591
  this.effect = (callback, getDep) => {
1591
1592
  if (!__privateGet$1(this, _effectList))
@@ -1594,22 +1595,22 @@ class GemElement extends HTMLElement {
1594
1595
  callback,
1595
1596
  getDep,
1596
1597
  values: void 0,
1597
- initialized: !!this.isConnected
1598
+ initialized: !!__privateGet$1(this, _isMounted)
1598
1599
  };
1599
- if (this.isConnected) {
1600
+ if (__privateGet$1(this, _isMounted)) {
1600
1601
  effectItem.values = getDep == null ? void 0 : getDep();
1601
1602
  effectItem.preCallback = callback(effectItem.values);
1602
1603
  }
1603
1604
  __privateGet$1(this, _effectList).push(effectItem);
1604
1605
  };
1605
1606
  this.memo = (callback, getDep) => {
1606
- if (!__privateGet$1(this, _momeList))
1607
- __privateSet$1(this, _momeList, []);
1608
- __privateGet$1(this, _momeList).push({
1607
+ if (!__privateGet$1(this, _memoList))
1608
+ __privateSet$1(this, _memoList, []);
1609
+ __privateGet$1(this, _memoList).push({
1609
1610
  callback,
1610
1611
  getDep,
1611
1612
  values: [Symbol()],
1612
- initialized: this.isConnected
1613
+ initialized: !!__privateGet$1(this, _isMounted)
1613
1614
  });
1614
1615
  };
1615
1616
  __privateAdd$1(this, _initEffect, () => {
@@ -1641,7 +1642,7 @@ class GemElement extends HTMLElement {
1641
1642
  return this.shouldUpdate ? this.shouldUpdate() : true;
1642
1643
  });
1643
1644
  __privateAdd$1(this, _updateCallback, () => {
1644
- if (this.isConnected && __privateGet$1(this, _shouldUpdate).call(this)) {
1645
+ if (__privateGet$1(this, _isMounted) && __privateGet$1(this, _shouldUpdate).call(this)) {
1645
1646
  const temp = __privateGet$1(this, _render).call(this);
1646
1647
  temp !== void 0 && render(temp, __privateGet$1(this, _renderRoot));
1647
1648
  addMicrotask(__privateGet$1(this, _updated));
@@ -1675,6 +1676,7 @@ class GemElement extends HTMLElement {
1675
1676
  });
1676
1677
  const temp = __privateGet$1(this, _render).call(this);
1677
1678
  temp !== void 0 && render(temp, __privateGet$1(this, _renderRoot));
1679
+ __privateSet$1(this, _isMounted, true);
1678
1680
  __privateSet$1(this, _unmountCallback, (_b = this.mounted) == null ? void 0 : _b.call(this));
1679
1681
  __privateGet$1(this, _initEffect).call(this);
1680
1682
  if (rootElement2 && ((_c = this.getRootNode().host) == null ? void 0 : _c.tagName) !== rootElement2.toUpperCase()) {
@@ -1684,7 +1686,7 @@ class GemElement extends HTMLElement {
1684
1686
  addMicrotask(() => this[initSymbol] = false);
1685
1687
  this[initSymbol] = true;
1686
1688
  this[updateSymbol] = () => {
1687
- if (this.isConnected) {
1689
+ if (__privateGet$1(this, _isMounted)) {
1688
1690
  addMicrotask(__privateGet$1(this, _update));
1689
1691
  }
1690
1692
  };
@@ -1755,7 +1757,7 @@ class GemElement extends HTMLElement {
1755
1757
  return __privateGet$1(this, _internals);
1756
1758
  }
1757
1759
  attributeChangedCallback() {
1758
- if (this.isConnected) {
1760
+ if (__privateGet$1(this, _isMounted)) {
1759
1761
  addMicrotask(__privateGet$1(this, _update));
1760
1762
  }
1761
1763
  }
@@ -1790,6 +1792,7 @@ class GemElement extends HTMLElement {
1790
1792
  __privateSet$1(this, _isAppendReason, true);
1791
1793
  return;
1792
1794
  }
1795
+ __privateSet$1(this, _isMounted, false);
1793
1796
  const { observedStores } = this.constructor;
1794
1797
  observedStores == null ? void 0 : observedStores.forEach((store2) => {
1795
1798
  disconnect(store2, __privateGet$1(this, _update));
@@ -1799,15 +1802,16 @@ class GemElement extends HTMLElement {
1799
1802
  (_b = __privateGet$1(this, _effectList)) == null ? void 0 : _b.forEach((effectItem) => {
1800
1803
  execCallback(effectItem.preCallback);
1801
1804
  });
1802
- __privateSet$1(this, _momeList, (_c = __privateGet$1(this, _momeList)) == null ? void 0 : _c.filter(({ initialized }) => !initialized));
1805
+ __privateSet$1(this, _memoList, (_c = __privateGet$1(this, _memoList)) == null ? void 0 : _c.filter(({ initialized }) => !initialized));
1803
1806
  }
1804
1807
  }
1805
1808
  _renderRoot = new WeakMap();
1806
1809
  _internals = new WeakMap();
1807
1810
  _isAppendReason = new WeakMap();
1811
+ _isMounted = new WeakMap();
1808
1812
  _isAsync = new WeakMap();
1809
1813
  _effectList = new WeakMap();
1810
- _momeList = new WeakMap();
1814
+ _memoList = new WeakMap();
1811
1815
  _unmountCallback = new WeakMap();
1812
1816
  _exec = new WeakMap();
1813
1817
  _execEffect = new WeakMap();
@@ -2949,7 +2953,7 @@ function replaceStyle(style, theme) {
2949
2953
  const themeStore = themeStoreMap.get(theme);
2950
2954
  const themeProp = themePropMap.get(theme);
2951
2955
  const rules = Object.keys(themeStore).reduce((prev, key2) => {
2952
- if (!themeStore[key2])
2956
+ if (!themeStore[key2] || !themeProp[key2])
2953
2957
  return prev;
2954
2958
  return prev + `${themeProp[key2]}:${themeStore[key2]};`;
2955
2959
  }, "");
@@ -3236,7 +3240,7 @@ const mediaQuery = {
3236
3240
  get isWidthScreen() {
3237
3241
  return matche(this.WIDTHSCREEN);
3238
3242
  },
3239
- PHONE_LANDSCAPE: "(min-width: 479px) and (max-width: 767px) and (orientation: landscape)",
3243
+ PHONE_LANDSCAPE: "(min-width: 479px) and (max-width: 959px) and (orientation: landscape)",
3240
3244
  get isPhoneLandscape() {
3241
3245
  return matche(this.PHONE_LANDSCAPE);
3242
3246
  },
@@ -3269,7 +3273,7 @@ const mediaQuery = {
3269
3273
  return matche(this.DATA_REDUCE);
3270
3274
  }
3271
3275
  };
3272
- const version = "1.6.16";
3276
+ const version = "1.6.18";
3273
3277
  if (window.__GEM_DEVTOOLS__HOOK__) {
3274
3278
  Object.assign(window.__GEM_DEVTOOLS__HOOK__, __spreadValues({}, Gem));
3275
3279
  }
package/dist/gem.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- var ai=Object.defineProperty,ci=Object.defineProperties;var li=Object.getOwnPropertyDescriptors;var fs=Object.getOwnPropertySymbols;var hi=Object.prototype.hasOwnProperty,ui=Object.prototype.propertyIsEnumerable;var ms=(o,f,y)=>f in o?ai(o,f,{enumerable:!0,configurable:!0,writable:!0,value:y}):o[f]=y,T=(o,f)=>{for(var y in f||(f={}))hi.call(f,y)&&ms(o,y,f[y]);if(fs)for(var y of fs(f))ui.call(f,y)&&ms(o,y,f[y]);return o},qe=(o,f)=>ci(o,li(f));var Xt=(o,f,y)=>{if(!f.has(o))throw TypeError("Cannot "+y)};var g=(o,f,y)=>(Xt(o,f,"read from private field"),y?y.call(o):f.get(o)),M=(o,f,y)=>{if(f.has(o))throw TypeError("Cannot add the same private member more than once");f instanceof WeakSet?f.add(o):f.set(o,y)},G=(o,f,y,J)=>(Xt(o,f,"write to private field"),J?J.call(o,y):f.set(o,y),y);var ft=(o,f,y)=>(Xt(o,f,"access private method"),y);(function(o,f){typeof exports=="object"&&typeof module!="undefined"?f(exports):typeof define=="function"&&define.amd?define(["exports"],f):(o=typeof globalThis!="undefined"?globalThis:o||self,f(o.Gem={}))})(this,function(o){var ee,te,le,Se,en,Ee,ht,_e,ve,he,ds,be,tn,ut,di,dt,fi,ue,mt,Pe,nn;"use strict";var f=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",get StoreListenerMap(){return ne},get createStore(){return z},get createStoreSet(){return Tn},get updateStore(){return P},get connect(){return se},get disconnect(){return kt},get history(){return E},get titleStore(){return ae},get basePathStore(){return Ut},get html(){return N},get svg(){return yn},get render(){return xe},get directive(){return J},get TemplateResult(){return ke},get SVGTemplateResult(){return yt},get repeat(){return Nn},get guard(){return On},get ifDefined(){return Ot},get GemElement(){return A},get defineAttribute(){return et},get defineProperty(){return ye},get defineRef(){return tt},get defineCSSState(){return nt},get nativeDefineElement(){return st},get refobject(){return Hn},get attribute(){return k},get boolattribute(){return In},get numattribute(){return Vn},get property(){return q},get state(){return Ge},get slot(){return Wn},get part(){return Dt},get emitter(){return He},get globalemitter(){return jn},get adoptedStyle(){return qn},get connectStore(){return oe},get rootElement(){return xn},get customElement(){return Un},get addMicrotask(){return H},get addMicrotaskToStack(){return wn},get absoluteLocation(){return Ue},get LinkedList(){return _t},get PropProxyMap(){return vt},get QueryString(){return fe},get raw(){return me},get css(){return Sn},get SheetToken(){return Be},get useNativeCSSStyleSheet(){return o.useNativeCSSStyleSheet},get createCSSSheet(){return En},get randomStr(){return Me},get styled(){return vn},get camelToKebabCase(){return I},get kebabToCamelCase(){return pe},get cleanObject(){return Ne},get GemError(){return K},get isArrayChange(){return Pt},get removeItems(){return Ct},get objectMapToString(){return Oe},get styleMap(){return bn},get classMap(){return Tt},get partMap(){return Pn},get exportPartsMap(){return Cn},get version(){return us}});/**
1
+ var ci=Object.defineProperty,li=Object.defineProperties;var hi=Object.getOwnPropertyDescriptors;var ms=Object.getOwnPropertySymbols;var ui=Object.prototype.hasOwnProperty,di=Object.prototype.propertyIsEnumerable;var ps=(a,f,y)=>f in a?ci(a,f,{enumerable:!0,configurable:!0,writable:!0,value:y}):a[f]=y,C=(a,f)=>{for(var y in f||(f={}))ui.call(f,y)&&ps(a,y,f[y]);if(ms)for(var y of ms(f))di.call(f,y)&&ps(a,y,f[y]);return a},xe=(a,f)=>li(a,hi(f));var en=(a,f,y)=>{if(!f.has(a))throw TypeError("Cannot "+y)};var g=(a,f,y)=>(en(a,f,"read from private field"),y?y.call(a):f.get(a)),M=(a,f,y)=>{if(f.has(a))throw TypeError("Cannot add the same private member more than once");f instanceof WeakSet?f.add(a):f.set(a,y)},G=(a,f,y,Q)=>(en(a,f,"write to private field"),Q?Q.call(a,y):f.set(a,y),y);var mt=(a,f,y)=>(en(a,f,"access private method"),y);(function(a,f){typeof exports=="object"&&typeof module!="undefined"?f(exports):typeof define=="function"&&define.amd?define(["exports"],f):(a=typeof globalThis!="undefined"?globalThis:a||self,f(a.Gem={}))})(this,function(a){var te,ne,he,Ee,tn,_e,ut,ve,be,ue,fs,Pe,nn,dt,fi,ft,mi,de,pt,Te,sn;"use strict";var f=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",get StoreListenerMap(){return se},get createStore(){return F},get createStoreSet(){return kn},get updateStore(){return T},get connect(){return ie},get disconnect(){return Lt},get history(){return E},get titleStore(){return ce},get basePathStore(){return Bt},get html(){return N},get svg(){return wn},get render(){return Ue},get directive(){return Q},get TemplateResult(){return Le},get SVGTemplateResult(){return wt},get repeat(){return On},get guard(){return Rn},get ifDefined(){return Rt},get GemElement(){return A},get defineAttribute(){return tt},get defineProperty(){return we},get defineRef(){return nt},get defineCSSState(){return st},get nativeDefineElement(){return it},get refobject(){return In},get attribute(){return k},get boolattribute(){return Wn},get numattribute(){return Vn},get property(){return x},get state(){return He},get slot(){return jn},get part(){return qt},get emitter(){return Ie},get globalemitter(){return Dn},get adoptedStyle(){return xn},get connectStore(){return oe},get rootElement(){return Un},get customElement(){return Bn},get addMicrotask(){return H},get addMicrotaskToStack(){return Sn},get absoluteLocation(){return Be},get LinkedList(){return vt},get PropProxyMap(){return bt},get QueryString(){return me},get raw(){return pe},get css(){return En},get SheetToken(){return Ke},get useNativeCSSStyleSheet(){return a.useNativeCSSStyleSheet},get createCSSSheet(){return _n},get randomStr(){return Ne},get styled(){return bn},get camelToKebabCase(){return I},get kebabToCamelCase(){return ge},get cleanObject(){return Oe},get GemError(){return z},get isArrayChange(){return Tt},get removeItems(){return Ct},get objectMapToString(){return Re},get styleMap(){return Pn},get classMap(){return kt},get partMap(){return Tn},get exportPartsMap(){return Cn},get version(){return ds}});/**
2
2
  * @license
3
3
  * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
4
4
  * This code may only be used under the BSD style license found at
@@ -10,7 +10,7 @@ var ai=Object.defineProperty,ci=Object.defineProperties;var li=Object.getOwnProp
10
10
  * Code distributed by Google as part of the polymer project is also
11
11
  * subject to an additional IP rights grant found at
12
12
  * http://polymer.github.io/PATENTS.txt
13
- */const y=new WeakMap,J=n=>(...e)=>{const t=n(...e);return y.set(t,!0),t},Ce=n=>typeof n=="function"&&y.has(n);/**
13
+ */const y=new WeakMap,Q=n=>(...e)=>{const t=n(...e);return y.set(t,!0),t},Ce=n=>typeof n=="function"&&y.has(n);/**
14
14
  * @license
15
15
  * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
16
16
  * This code may only be used under the BSD style license found at
@@ -22,7 +22,7 @@ var ai=Object.defineProperty,ci=Object.defineProperties;var li=Object.getOwnProp
22
22
  * Code distributed by Google as part of the polymer project is also
23
23
  * subject to an additional IP rights grant found at
24
24
  * http://polymer.github.io/PATENTS.txt
25
- */const sn=typeof window!="undefined"&&window.customElements!=null&&window.customElements.polyfillWrapFlushCallback!==void 0,rn=(n,e,t=null,s=null)=>{for(;e!==t;){const i=e.nextSibling;n.insertBefore(e,s),e=i}},pt=(n,e,t=null)=>{for(;e!==t;){const s=e.nextSibling;n.removeChild(e),e=s}};/**
25
+ */const rn=typeof window!="undefined"&&window.customElements!=null&&window.customElements.polyfillWrapFlushCallback!==void 0,an=(n,e,t=null,s=null)=>{for(;e!==t;){const i=e.nextSibling;n.insertBefore(e,s),e=i}},gt=(n,e,t=null)=>{for(;e!==t;){const s=e.nextSibling;n.removeChild(e),e=s}};/**
26
26
  * @license
27
27
  * Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
28
28
  * This code may only be used under the BSD style license found at
@@ -46,7 +46,7 @@ var ai=Object.defineProperty,ci=Object.defineProperties;var li=Object.getOwnProp
46
46
  * Code distributed by Google as part of the polymer project is also
47
47
  * subject to an additional IP rights grant found at
48
48
  * http://polymer.github.io/PATENTS.txt
49
- */const Q=`{{lit-${String(Math.random()).slice(2)}}}`,an=`<!--${Q}-->`,cn=new RegExp(`${Q}|${an}`),Te="$lit$";class ps{constructor(e,t){this.parts=[],this.element=t;const s=[],i=[],r=document.createTreeWalker(t.content,133,null,!1);let a=0,c=-1,l=0;const{strings:h,values:{length:m}}=e;for(;l<m;){const u=r.nextNode();if(u===null){r.currentNode=i.pop();continue}if(c++,u.nodeType===1){if(u.hasAttributes()){const $=u.attributes,{length:w}=$;let S=0;for(let p=0;p<w;p++)ln($[p].name,Te)&&S++;for(;S-- >0;){const p=h[l],_=gt.exec(p)[2],b=_.toLowerCase()+Te,U=u.getAttribute(b);u.removeAttribute(b);const W=U.split(cn);this.parts.push({type:"attribute",index:c,name:_,strings:W}),l+=W.length-1}}u.tagName==="TEMPLATE"&&(i.push(u),r.currentNode=u.content)}else if(u.nodeType===3){const $=u.data;if($.indexOf(Q)>=0){const w=u.parentNode,S=$.split(cn),p=S.length-1;for(let _=0;_<p;_++){let b,U=S[_];if(U==="")b=B();else{const W=gt.exec(U);W!==null&&ln(W[2],Te)&&(U=U.slice(0,W.index)+W[1]+W[2].slice(0,-Te.length)+W[3]),b=document.createTextNode(U)}w.insertBefore(b,u),this.parts.push({type:"node",index:++c})}S[p]===""?(w.insertBefore(B(),u),s.push(u)):u.data=S[p],l+=p}}else if(u.nodeType===8)if(u.data===Q){const $=u.parentNode;(u.previousSibling===null||c===a)&&(c++,$.insertBefore(B(),u)),a=c,this.parts.push({type:"node",index:c}),u.nextSibling===null?u.data="":(s.push(u),c--),l++}else{let $=-1;for(;($=u.data.indexOf(Q,$+1))!==-1;)this.parts.push({type:"node",index:-1}),l++}}for(const u of s)u.parentNode.removeChild(u)}}const ln=(n,e)=>{const t=n.length-e.length;return t>=0&&n.slice(t)===e},gs=n=>n.index!==-1,B=()=>document.createComment(""),gt=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;/**
49
+ */const Y=`{{lit-${String(Math.random()).slice(2)}}}`,cn=`<!--${Y}-->`,ln=new RegExp(`${Y}|${cn}`),ke="$lit$";class gs{constructor(e,t){this.parts=[],this.element=t;const s=[],i=[],r=document.createTreeWalker(t.content,133,null,!1);let o=0,c=-1,l=0;const{strings:h,values:{length:m}}=e;for(;l<m;){const u=r.nextNode();if(u===null){r.currentNode=i.pop();continue}if(c++,u.nodeType===1){if(u.hasAttributes()){const $=u.attributes,{length:w}=$;let S=0;for(let p=0;p<w;p++)hn($[p].name,ke)&&S++;for(;S-- >0;){const p=h[l],_=yt.exec(p)[2],b=_.toLowerCase()+ke,B=u.getAttribute(b);u.removeAttribute(b);const V=B.split(ln);this.parts.push({type:"attribute",index:c,name:_,strings:V}),l+=V.length-1}}u.tagName==="TEMPLATE"&&(i.push(u),r.currentNode=u.content)}else if(u.nodeType===3){const $=u.data;if($.indexOf(Y)>=0){const w=u.parentNode,S=$.split(ln),p=S.length-1;for(let _=0;_<p;_++){let b,B=S[_];if(B==="")b=K();else{const V=yt.exec(B);V!==null&&hn(V[2],ke)&&(B=B.slice(0,V.index)+V[1]+V[2].slice(0,-ke.length)+V[3]),b=document.createTextNode(B)}w.insertBefore(b,u),this.parts.push({type:"node",index:++c})}S[p]===""?(w.insertBefore(K(),u),s.push(u)):u.data=S[p],l+=p}}else if(u.nodeType===8)if(u.data===Y){const $=u.parentNode;(u.previousSibling===null||c===o)&&(c++,$.insertBefore(K(),u)),o=c,this.parts.push({type:"node",index:c}),u.nextSibling===null?u.data="":(s.push(u),c--),l++}else{let $=-1;for(;($=u.data.indexOf(Y,$+1))!==-1;)this.parts.push({type:"node",index:-1}),l++}}for(const u of s)u.parentNode.removeChild(u)}}const hn=(n,e)=>{const t=n.length-e.length;return t>=0&&n.slice(t)===e},ys=n=>n.index!==-1,K=()=>document.createComment(""),yt=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;/**
50
50
  * @license
51
51
  * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
52
52
  * This code may only be used under the BSD style license found at
@@ -58,7 +58,7 @@ var ai=Object.defineProperty,ci=Object.defineProperties;var li=Object.getOwnProp
58
58
  * Code distributed by Google as part of the polymer project is also
59
59
  * subject to an additional IP rights grant found at
60
60
  * http://polymer.github.io/PATENTS.txt
61
- */class hn{constructor(e,t,s){this.__parts=[],this.template=e,this.processor=t,this.options=s}update(e){let t=0;for(const s of this.__parts)s!==void 0&&s.setValue(e[t]),t++;for(const s of this.__parts)s!==void 0&&s.commit()}_clone(){const e=sn?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),t=[],s=this.template.parts,i=document.createTreeWalker(e,133,null,!1);let r=0,a=0,c,l=i.nextNode();for(;r<s.length;){if(c=s[r],!gs(c)){this.__parts.push(void 0),r++;continue}for(;a<c.index;)a++,l.nodeName==="TEMPLATE"&&(t.push(l),i.currentNode=l.content),(l=i.nextNode())===null&&(i.currentNode=t.pop(),l=i.nextNode());if(c.type==="node"){const h=this.processor.handleTextExpression(this.options);h.insertAfterNode(l.previousSibling),this.__parts.push(h)}else this.__parts.push(...this.processor.handleAttributeExpressions(l,c.name,c.strings,this.options));r++}return sn&&(document.adoptNode(e),customElements.upgrade(e)),e}}/**
61
+ */class un{constructor(e,t,s){this.__parts=[],this.template=e,this.processor=t,this.options=s}update(e){let t=0;for(const s of this.__parts)s!==void 0&&s.setValue(e[t]),t++;for(const s of this.__parts)s!==void 0&&s.commit()}_clone(){const e=rn?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),t=[],s=this.template.parts,i=document.createTreeWalker(e,133,null,!1);let r=0,o=0,c,l=i.nextNode();for(;r<s.length;){if(c=s[r],!ys(c)){this.__parts.push(void 0),r++;continue}for(;o<c.index;)o++,l.nodeName==="TEMPLATE"&&(t.push(l),i.currentNode=l.content),(l=i.nextNode())===null&&(i.currentNode=t.pop(),l=i.nextNode());if(c.type==="node"){const h=this.processor.handleTextExpression(this.options);h.insertAfterNode(l.previousSibling),this.__parts.push(h)}else this.__parts.push(...this.processor.handleAttributeExpressions(l,c.name,c.strings,this.options));r++}return rn&&(document.adoptNode(e),customElements.upgrade(e)),e}}/**
62
62
  * @license
63
63
  * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
64
64
  * This code may only be used under the BSD style license found at
@@ -70,7 +70,7 @@ var ai=Object.defineProperty,ci=Object.defineProperties;var li=Object.getOwnProp
70
70
  * Code distributed by Google as part of the polymer project is also
71
71
  * subject to an additional IP rights grant found at
72
72
  * http://polymer.github.io/PATENTS.txt
73
- */const un=window.trustedTypes&&trustedTypes.createPolicy("lit-html",{createHTML:n=>n}),ys=` ${Q} `;class ke{constructor(e,t,s,i){this.strings=e,this.values=t,this.type=s,this.processor=i}getHTML(){const e=this.strings.length-1;let t="",s=!1;for(let i=0;i<e;i++){const r=this.strings[i],a=r.lastIndexOf("<!--");s=(a>-1||s)&&r.indexOf("-->",a+1)===-1;const c=gt.exec(r);c===null?t+=r+(s?ys:an):t+=r.substr(0,c.index)+c[1]+c[2]+Te+c[3]+Q}return t+=this.strings[e],t}getTemplateElement(){const e=document.createElement("template");let t=this.getHTML();return un!==void 0&&(t=un.createHTML(t)),e.innerHTML=t,e}}class yt extends ke{getHTML(){return`<svg>${super.getHTML()}</svg>`}getTemplateElement(){const e=super.getTemplateElement(),t=e.content,s=t.firstChild;return t.removeChild(s),rn(t,s.firstChild),e}}/**
73
+ */const dn=window.trustedTypes&&trustedTypes.createPolicy("lit-html",{createHTML:n=>n}),ws=` ${Y} `;class Le{constructor(e,t,s,i){this.strings=e,this.values=t,this.type=s,this.processor=i}getHTML(){const e=this.strings.length-1;let t="",s=!1;for(let i=0;i<e;i++){const r=this.strings[i],o=r.lastIndexOf("<!--");s=(o>-1||s)&&r.indexOf("-->",o+1)===-1;const c=yt.exec(r);c===null?t+=r+(s?ws:cn):t+=r.substr(0,c.index)+c[1]+c[2]+ke+c[3]+Y}return t+=this.strings[e],t}getTemplateElement(){const e=document.createElement("template");let t=this.getHTML();return dn!==void 0&&(t=dn.createHTML(t)),e.innerHTML=t,e}}class wt extends Le{getHTML(){return`<svg>${super.getHTML()}</svg>`}getTemplateElement(){const e=super.getTemplateElement(),t=e.content,s=t.firstChild;return t.removeChild(s),an(t,s.firstChild),e}}/**
74
74
  * @license
75
75
  * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
76
76
  * This code may only be used under the BSD style license found at
@@ -82,7 +82,7 @@ var ai=Object.defineProperty,ci=Object.defineProperties;var li=Object.getOwnProp
82
82
  * Code distributed by Google as part of the polymer project is also
83
83
  * subject to an additional IP rights grant found at
84
84
  * http://polymer.github.io/PATENTS.txt
85
- */const wt=n=>n===null||!(typeof n=="object"||typeof n=="function"),St=n=>Array.isArray(n)||!!(n&&n[Symbol.iterator]);class dn{constructor(e,t,s){this.dirty=!0,this.element=e,this.name=t,this.strings=s,this.parts=[];for(let i=0;i<s.length-1;i++)this.parts[i]=this._createPart()}_createPart(){return new Et(this)}_getValue(){const e=this.strings,t=e.length-1,s=this.parts;if(t===1&&e[0]===""&&e[1]===""){const r=s[0].value;if(typeof r=="symbol")return String(r);if(typeof r=="string"||!St(r))return r}let i="";for(let r=0;r<t;r++){i+=e[r];const a=s[r];if(a!==void 0){const c=a.value;if(wt(c)||!St(c))i+=typeof c=="string"?c:String(c);else for(const l of c)i+=typeof l=="string"?l:String(l)}}return i+=e[t],i}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}class Et{constructor(e){this.value=void 0,this.committer=e}setValue(e){e!==j&&(!wt(e)||e!==this.value)&&(this.value=e,Ce(e)||(this.committer.dirty=!0))}commit(){for(;Ce(this.value);){const e=this.value;this.value=j,e(this)}this.value!==j&&this.committer.commit()}}class de{constructor(e){this.value=void 0,this.__pendingValue=void 0,this.options=e}appendInto(e){this.startNode=e.appendChild(B()),this.endNode=e.appendChild(B())}insertAfterNode(e){this.startNode=e,this.endNode=e.nextSibling}appendIntoPart(e){e.__insert(this.startNode=B()),e.__insert(this.endNode=B())}insertAfterPart(e){e.__insert(this.startNode=B()),this.endNode=e.endNode,e.endNode=this.startNode}setValue(e){this.__pendingValue=e}commit(){if(this.startNode.parentNode===null)return;for(;Ce(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=j,t(this)}const e=this.__pendingValue;e!==j&&(wt(e)?e!==this.value&&this.__commitText(e):e instanceof ke?this.__commitTemplateResult(e):e instanceof Node?this.__commitNode(e):St(e)?this.__commitIterable(e):e===on?(this.value=on,this.clear()):this.__commitText(e))}__insert(e){this.endNode.parentNode.insertBefore(e,this.endNode)}__commitNode(e){this.value!==e&&(this.clear(),this.__insert(e),this.value=e)}__commitText(e){const t=this.startNode.nextSibling;e=e==null?"":e;const s=typeof e=="string"?e:String(e);t===this.endNode.previousSibling&&t.nodeType===3?t.data=s:this.__commitNode(document.createTextNode(s)),this.value=e}__commitTemplateResult(e){const t=this.options.templateFactory(e);if(this.value instanceof hn&&this.value.template===t)this.value.update(e.values);else{const s=new hn(t,e.processor,this.options),i=s._clone();s.update(e.values),this.__commitNode(i),this.value=s}}__commitIterable(e){Array.isArray(this.value)||(this.value=[],this.clear());const t=this.value;let s=0,i;for(const r of e)i=t[s],i===void 0&&(i=new de(this.options),t.push(i),s===0?i.appendIntoPart(this):i.insertAfterPart(t[s-1])),i.setValue(r),i.commit(),s++;s<t.length&&(t.length=s,this.clear(i&&i.endNode))}clear(e=this.startNode){pt(this.startNode.parentNode,e.nextSibling,this.endNode)}}class ws{constructor(e,t,s){if(this.value=void 0,this.__pendingValue=void 0,s.length!==2||s[0]!==""||s[1]!=="")throw new Error("Boolean attributes can only contain a single expression");this.element=e,this.name=t,this.strings=s}setValue(e){this.__pendingValue=e}commit(){for(;Ce(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=j,t(this)}if(this.__pendingValue===j)return;const e=!!this.__pendingValue;this.value!==e&&(e?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=e),this.__pendingValue=j}}class Ss extends dn{constructor(e,t,s){super(e,t,s);this.single=s.length===2&&s[0]===""&&s[1]===""}_createPart(){return new Es(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}class Es extends Et{}let fn=!1;(()=>{try{const n={get capture(){return fn=!0,!1}};window.addEventListener("test",n,n),window.removeEventListener("test",n,n)}catch{}})();class _s{constructor(e,t,s){this.value=void 0,this.__pendingValue=void 0,this.element=e,this.eventName=t,this.eventContext=s,this.__boundHandleEvent=i=>this.handleEvent(i)}setValue(e){this.__pendingValue=e}commit(){for(;Ce(this.__pendingValue);){const r=this.__pendingValue;this.__pendingValue=j,r(this)}if(this.__pendingValue===j)return;const e=this.__pendingValue,t=this.value,s=e==null||t!=null&&(e.capture!==t.capture||e.once!==t.once||e.passive!==t.passive),i=e!=null&&(t==null||s);s&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),i&&(this.__options=vs(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=j}handleEvent(e){typeof this.value=="function"?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}}const vs=n=>n&&(fn?{capture:n.capture,passive:n.passive,once:n.once}:n.capture);/**
85
+ */const St=n=>n===null||!(typeof n=="object"||typeof n=="function"),Et=n=>Array.isArray(n)||!!(n&&n[Symbol.iterator]);class fn{constructor(e,t,s){this.dirty=!0,this.element=e,this.name=t,this.strings=s,this.parts=[];for(let i=0;i<s.length-1;i++)this.parts[i]=this._createPart()}_createPart(){return new _t(this)}_getValue(){const e=this.strings,t=e.length-1,s=this.parts;if(t===1&&e[0]===""&&e[1]===""){const r=s[0].value;if(typeof r=="symbol")return String(r);if(typeof r=="string"||!Et(r))return r}let i="";for(let r=0;r<t;r++){i+=e[r];const o=s[r];if(o!==void 0){const c=o.value;if(St(c)||!Et(c))i+=typeof c=="string"?c:String(c);else for(const l of c)i+=typeof l=="string"?l:String(l)}}return i+=e[t],i}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}class _t{constructor(e){this.value=void 0,this.committer=e}setValue(e){e!==j&&(!St(e)||e!==this.value)&&(this.value=e,Ce(e)||(this.committer.dirty=!0))}commit(){for(;Ce(this.value);){const e=this.value;this.value=j,e(this)}this.value!==j&&this.committer.commit()}}class fe{constructor(e){this.value=void 0,this.__pendingValue=void 0,this.options=e}appendInto(e){this.startNode=e.appendChild(K()),this.endNode=e.appendChild(K())}insertAfterNode(e){this.startNode=e,this.endNode=e.nextSibling}appendIntoPart(e){e.__insert(this.startNode=K()),e.__insert(this.endNode=K())}insertAfterPart(e){e.__insert(this.startNode=K()),this.endNode=e.endNode,e.endNode=this.startNode}setValue(e){this.__pendingValue=e}commit(){if(this.startNode.parentNode===null)return;for(;Ce(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=j,t(this)}const e=this.__pendingValue;e!==j&&(St(e)?e!==this.value&&this.__commitText(e):e instanceof Le?this.__commitTemplateResult(e):e instanceof Node?this.__commitNode(e):Et(e)?this.__commitIterable(e):e===on?(this.value=on,this.clear()):this.__commitText(e))}__insert(e){this.endNode.parentNode.insertBefore(e,this.endNode)}__commitNode(e){this.value!==e&&(this.clear(),this.__insert(e),this.value=e)}__commitText(e){const t=this.startNode.nextSibling;e=e==null?"":e;const s=typeof e=="string"?e:String(e);t===this.endNode.previousSibling&&t.nodeType===3?t.data=s:this.__commitNode(document.createTextNode(s)),this.value=e}__commitTemplateResult(e){const t=this.options.templateFactory(e);if(this.value instanceof un&&this.value.template===t)this.value.update(e.values);else{const s=new un(t,e.processor,this.options),i=s._clone();s.update(e.values),this.__commitNode(i),this.value=s}}__commitIterable(e){Array.isArray(this.value)||(this.value=[],this.clear());const t=this.value;let s=0,i;for(const r of e)i=t[s],i===void 0&&(i=new fe(this.options),t.push(i),s===0?i.appendIntoPart(this):i.insertAfterPart(t[s-1])),i.setValue(r),i.commit(),s++;s<t.length&&(t.length=s,this.clear(i&&i.endNode))}clear(e=this.startNode){gt(this.startNode.parentNode,e.nextSibling,this.endNode)}}class Ss{constructor(e,t,s){if(this.value=void 0,this.__pendingValue=void 0,s.length!==2||s[0]!==""||s[1]!=="")throw new Error("Boolean attributes can only contain a single expression");this.element=e,this.name=t,this.strings=s}setValue(e){this.__pendingValue=e}commit(){for(;Ce(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=j,t(this)}if(this.__pendingValue===j)return;const e=!!this.__pendingValue;this.value!==e&&(e?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=e),this.__pendingValue=j}}class Es extends fn{constructor(e,t,s){super(e,t,s);this.single=s.length===2&&s[0]===""&&s[1]===""}_createPart(){return new _s(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}class _s extends _t{}let mn=!1;(()=>{try{const n={get capture(){return mn=!0,!1}};window.addEventListener("test",n,n),window.removeEventListener("test",n,n)}catch{}})();class vs{constructor(e,t,s){this.value=void 0,this.__pendingValue=void 0,this.element=e,this.eventName=t,this.eventContext=s,this.__boundHandleEvent=i=>this.handleEvent(i)}setValue(e){this.__pendingValue=e}commit(){for(;Ce(this.__pendingValue);){const r=this.__pendingValue;this.__pendingValue=j,r(this)}if(this.__pendingValue===j)return;const e=this.__pendingValue,t=this.value,s=e==null||t!=null&&(e.capture!==t.capture||e.once!==t.once||e.passive!==t.passive),i=e!=null&&(t==null||s);s&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),i&&(this.__options=bs(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=j}handleEvent(e){typeof this.value=="function"?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}}const bs=n=>n&&(mn?{capture:n.capture,passive:n.passive,once:n.once}:n.capture);/**
86
86
  * @license
87
87
  * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
88
88
  * This code may only be used under the BSD style license found at
@@ -94,7 +94,7 @@ var ai=Object.defineProperty,ci=Object.defineProperties;var li=Object.getOwnProp
94
94
  * Code distributed by Google as part of the polymer project is also
95
95
  * subject to an additional IP rights grant found at
96
96
  * http://polymer.github.io/PATENTS.txt
97
- */class bs{handleAttributeExpressions(e,t,s,i){const r=t[0];return r==="."?new Ss(e,t.slice(1),s).parts:r==="@"?[new _s(e,t.slice(1),i.eventContext)]:r==="?"?[new ws(e,t.slice(1),s)]:new dn(e,t,s).parts}handleTextExpression(e){return new de(e)}}const mn=new bs;/**
97
+ */class Ps{handleAttributeExpressions(e,t,s,i){const r=t[0];return r==="."?new Es(e,t.slice(1),s).parts:r==="@"?[new vs(e,t.slice(1),i.eventContext)]:r==="?"?[new Ss(e,t.slice(1),s)]:new fn(e,t,s).parts}handleTextExpression(e){return new fe(e)}}const pn=new Ps;/**
98
98
  * @license
99
99
  * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
100
100
  * This code may only be used under the BSD style license found at
@@ -106,7 +106,7 @@ var ai=Object.defineProperty,ci=Object.defineProperties;var li=Object.getOwnProp
106
106
  * Code distributed by Google as part of the polymer project is also
107
107
  * subject to an additional IP rights grant found at
108
108
  * http://polymer.github.io/PATENTS.txt
109
- */function Ps(n){let e=pn.get(n.type);e===void 0&&(e={stringsArray:new WeakMap,keyString:new Map},pn.set(n.type,e));let t=e.stringsArray.get(n.strings);if(t!==void 0)return t;const s=n.strings.join(Q);return t=e.keyString.get(s),t===void 0&&(t=new ps(n,n.getTemplateElement()),e.keyString.set(s,t)),e.stringsArray.set(n.strings,t),t}const pn=new Map;/**
109
+ */function Ts(n){let e=gn.get(n.type);e===void 0&&(e={stringsArray:new WeakMap,keyString:new Map},gn.set(n.type,e));let t=e.stringsArray.get(n.strings);if(t!==void 0)return t;const s=n.strings.join(Y);return t=e.keyString.get(s),t===void 0&&(t=new gs(n,n.getTemplateElement()),e.keyString.set(s,t)),e.stringsArray.set(n.strings,t),t}const gn=new Map;/**
110
110
  * @license
111
111
  * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
112
112
  * This code may only be used under the BSD style license found at
@@ -118,7 +118,7 @@ var ai=Object.defineProperty,ci=Object.defineProperties;var li=Object.getOwnProp
118
118
  * Code distributed by Google as part of the polymer project is also
119
119
  * subject to an additional IP rights grant found at
120
120
  * http://polymer.github.io/PATENTS.txt
121
- */const gn=new WeakMap,xe=(n,e,t)=>{let s=gn.get(e);s===void 0&&(pt(e,e.firstChild),gn.set(e,s=new de(Object.assign({templateFactory:Ps},t))),s.appendInto(e)),s.setValue(n),s.commit()};/**
121
+ */const yn=new WeakMap,Ue=(n,e,t)=>{let s=yn.get(e);s===void 0&&(gt(e,e.firstChild),yn.set(e,s=new fe(Object.assign({templateFactory:Ts},t))),s.appendInto(e)),s.setValue(n),s.commit()};/**
122
122
  * @license
123
123
  * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
124
124
  * This code may only be used under the BSD style license found at
@@ -130,8 +130,8 @@ var ai=Object.defineProperty,ci=Object.defineProperties;var li=Object.getOwnProp
130
130
  * Code distributed by Google as part of the polymer project is also
131
131
  * subject to an additional IP rights grant found at
132
132
  * http://polymer.github.io/PATENTS.txt
133
- */typeof window!="undefined"&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.4.1");const N=(n,...e)=>new ke(n,e,"html",mn),yn=(n,...e)=>new yt(n,e,"svg",mn),Le=new Set;function H(n){typeof n=="function"&&(Le.size||globalThis.queueMicrotask(()=>{Le.forEach(e=>e()),Le.clear()}),Le.delete(n),Le.add(n))}const $e=[];function Cs(){for(let n=$e.length-1;n>=0;n--)$e[n]();$e.length=0}function wn(n){$e.length||H(Cs),$e.push(n)}function Ue(n="",e=""){const{pathname:t,search:s,hash:i}=new URL(e,location.origin+n);return t+s+i}class _t extends(globalThis.EventTarget||Object){constructor(){super(...arguments);M(this,Se);M(this,ee,void 0);M(this,te,void 0);M(this,le,void 0);G(this,ee,new Map)}get size(){return g(this,ee).size}add(e){g(this,le)||this.dispatchEvent(new CustomEvent("start"));const t=ft(this,Se,en).call(this,e)||{value:e};t.prev=g(this,le),t.prev&&(t.prev.next=t),t.next=void 0,G(this,le,t),g(this,te)||G(this,te,t),g(this,ee).set(e,t)}delete(e){const t=ft(this,Se,en).call(this,e);return g(this,te)||this.dispatchEvent(new CustomEvent("end")),t}get(){const e=g(this,te);if(!!e)return ft(this,Se,en).call(this,e.value),e.value}}ee=new WeakMap,te=new WeakMap,le=new WeakMap,Se=new WeakSet,en=function(e){const t=g(this,ee).get(e);return t&&(t.prev?t.prev.next=t.next:G(this,te,t.next),t.next?t.next.prev=t.prev:G(this,le,t.prev),g(this,ee).delete(e)),t};class vt extends WeakMap{get(e){let t=super.get(e);return t||(t={},this.set(e,t)),t}}class fe extends URLSearchParams{constructor(e){super(e);M(this,Ee,e=>typeof e=="string"?e:JSON.stringify(e));M(this,ht,e=>{if(!e)return null;try{return JSON.parse(e)}catch{return null}})}concat(e){let t;typeof e=="string"?t=Object.fromEntries(new URLSearchParams(e).entries()):t=e,Object.entries(t).forEach(([s,i])=>{this.append(s,g(this,Ee).call(this,i))})}setAny(e,t){if(Array.isArray(t))this.delete(e),t.forEach(s=>this.append(e,g(this,Ee).call(this,s)));else{const s=g(this,Ee).call(this,t);s?this.set(e,s):this.delete(e)}}getAny(e){return this.getAnyAll(e)[0]}getAnyAll(e){return this.getAll(e).filter(t=>t!=="").map(t=>g(this,ht).call(this,t))}toString(){const e=super.toString();return e?`?${e}`:""}toJSON(){return this.toString()}}Ee=new WeakMap,ht=new WeakMap;function me(n,...e){return n.reduce((t,s,i)=>{var r;return t+((r=e[i-1])!=null?r:"")+s})}function Sn(n,...e){return me(n,...e)}const Be=Symbol.for("gem@sheetToken");o.useNativeCSSStyleSheet=!0;let bt=window.CSSStyleSheet;try{new bt}catch{o.useNativeCSSStyleSheet=!1,bt=class{constructor(){this.media={mediaText:""},this.style="",this.replaceSync=n=>this.style=n}}}function En(n,e=""){const t=new bt,s={};t.media.mediaText=e;let i="";return typeof n=="string"?i=n:Object.keys(n).forEach(r=>{s[r]=`${r}-${Me()}`,i+=n[r].styledContent.replace(/&/g,s[r])}),t.replaceSync(i),s[Be]=t,s}function Me(n=5,e="0123456789abcdefghijklmnopqrstuvwxyz"){const t=e.length;let s="";for(let i=0;i<n;i++)s+=e[Math.floor(Math.random()*t)];return s}const Ts=new RegExp(`&.*{((.|
134
- )*)}`,"g");function _n(n,e){const t=[];let s=`& {${n.replace(Ts,i=>(t.push(i),""))}}`+t.join("");return s=s.replace(/&/g,e==="class"?".&":"#&"),{styledContent:s,type:e}}const vn={class:(n,...e)=>{const t=me(n,...e);return _n(t,"class")},id:(n,...e)=>{const t=me(n,...e);return _n(t,"id")},keyframes:(n,...e)=>({styledContent:`@keyframes & {${me(n,...e)}}`,type:"keyframes"})};function I(n){return n.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function pe(n){return n.replace(/-(.)/g,(e,t)=>t.toUpperCase())}function Ne(n){return Object.keys(n).forEach(e=>{const t=e;delete n[t]}),n}class K extends Error{constructor(e){super(e);this.message=`gem: ${this.message}`}}function Pt(n,e){const t=n.length;if(e.length!==t)return!0;for(let s=0;s<t;s++)if(n[s]!==e[s])return!0;return!1}function Ct(n,e){const t=new Set(e);return n.filter(s=>t.has(s)?(t.delete(s),!1):!0)}function Oe(n,e,t){let s=e;for(const i in n){const r=t(i,n[i]);s+=r?r+e:""}return s}function bn(n){return Oe(n,";",(e,t)=>t!==void 0?`${I(e)}:${t}`:"")}function Tt(n){return Oe(n," ",(e,t)=>t?e:"")}const Pn=Tt;function Cn(n){return Oe(n,",",(e,t)=>t!==void 0?`${e}:${t}`:"")}const ne=new WeakMap;function z(n){if(ne.has(n))throw new K("argument error");return ne.set(n,new Set),n}function Tn(n){return Object.keys(n).forEach(t=>{z(n[t])}),n}function P(n,e){Object.assign(n,e);const t=ne.get(n);t==null||t.forEach(s=>{H(s)})}function se(n,e){const t=ne.get(n);t==null||t.add(e)}function kt(n,e){const t=ne.get(n);t==null||t.delete(e)}/**
133
+ */typeof window!="undefined"&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.4.1");const N=(n,...e)=>new Le(n,e,"html",pn),wn=(n,...e)=>new wt(n,e,"svg",pn),$e=new Set;function H(n){typeof n=="function"&&($e.size||globalThis.queueMicrotask(()=>{$e.forEach(e=>e()),$e.clear()}),$e.delete(n),$e.add(n))}const Me=[];function Cs(){for(let n=Me.length-1;n>=0;n--)Me[n]();Me.length=0}function Sn(n){Me.length||H(Cs),Me.push(n)}function Be(n="",e=""){const{pathname:t,search:s,hash:i}=new URL(e,location.origin+n);return t+s+i}class vt extends(globalThis.EventTarget||Object){constructor(){super(...arguments);M(this,Ee);M(this,te,void 0);M(this,ne,void 0);M(this,he,void 0);G(this,te,new Map)}get size(){return g(this,te).size}add(e){g(this,he)||this.dispatchEvent(new CustomEvent("start"));const t=mt(this,Ee,tn).call(this,e)||{value:e};t.prev=g(this,he),t.prev&&(t.prev.next=t),t.next=void 0,G(this,he,t),g(this,ne)||G(this,ne,t),g(this,te).set(e,t)}delete(e){const t=mt(this,Ee,tn).call(this,e);return g(this,ne)||this.dispatchEvent(new CustomEvent("end")),t}get(){const e=g(this,ne);if(!!e)return mt(this,Ee,tn).call(this,e.value),e.value}}te=new WeakMap,ne=new WeakMap,he=new WeakMap,Ee=new WeakSet,tn=function(e){const t=g(this,te).get(e);return t&&(t.prev?t.prev.next=t.next:G(this,ne,t.next),t.next?t.next.prev=t.prev:G(this,he,t.prev),g(this,te).delete(e)),t};class bt extends WeakMap{get(e){let t=super.get(e);return t||(t={},this.set(e,t)),t}}class me extends URLSearchParams{constructor(e){super(e);M(this,_e,e=>typeof e=="string"?e:JSON.stringify(e));M(this,ut,e=>{if(!e)return null;try{return JSON.parse(e)}catch{return null}})}concat(e){let t;typeof e=="string"?t=Object.fromEntries(new URLSearchParams(e).entries()):t=e,Object.entries(t).forEach(([s,i])=>{this.append(s,g(this,_e).call(this,i))})}setAny(e,t){if(Array.isArray(t))this.delete(e),t.forEach(s=>this.append(e,g(this,_e).call(this,s)));else{const s=g(this,_e).call(this,t);s?this.set(e,s):this.delete(e)}}getAny(e){return this.getAnyAll(e)[0]}getAnyAll(e){return this.getAll(e).filter(t=>t!=="").map(t=>g(this,ut).call(this,t))}toString(){const e=super.toString();return e?`?${e}`:""}toJSON(){return this.toString()}}_e=new WeakMap,ut=new WeakMap;function pe(n,...e){return n.reduce((t,s,i)=>{var r;return t+((r=e[i-1])!=null?r:"")+s})}function En(n,...e){return pe(n,...e)}const Ke=Symbol.for("gem@sheetToken");a.useNativeCSSStyleSheet=!0;let Pt=window.CSSStyleSheet;try{new Pt}catch{a.useNativeCSSStyleSheet=!1,Pt=class{constructor(){this.media={mediaText:""},this.style="",this.replaceSync=n=>this.style=n}}}function _n(n,e=""){const t=new Pt,s={};t.media.mediaText=e;let i="";return typeof n=="string"?i=n:Object.keys(n).forEach(r=>{s[r]=`${r}-${Ne()}`,i+=n[r].styledContent.replace(/&/g,s[r])}),t.replaceSync(i),s[Ke]=t,s}function Ne(n=5,e="0123456789abcdefghijklmnopqrstuvwxyz"){const t=e.length;let s="";for(let i=0;i<n;i++)s+=e[Math.floor(Math.random()*t)];return s}const ks=new RegExp(`&.*{((.|
134
+ )*)}`,"g");function vn(n,e){const t=[];let s=`& {${n.replace(ks,i=>(t.push(i),""))}}`+t.join("");return s=s.replace(/&/g,e==="class"?".&":"#&"),{styledContent:s,type:e}}const bn={class:(n,...e)=>{const t=pe(n,...e);return vn(t,"class")},id:(n,...e)=>{const t=pe(n,...e);return vn(t,"id")},keyframes:(n,...e)=>({styledContent:`@keyframes & {${pe(n,...e)}}`,type:"keyframes"})};function I(n){return n.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function ge(n){return n.replace(/-(.)/g,(e,t)=>t.toUpperCase())}function Oe(n){return Object.keys(n).forEach(e=>{const t=e;delete n[t]}),n}class z extends Error{constructor(e){super(e);this.message=`gem: ${this.message}`}}function Tt(n,e){const t=n.length;if(e.length!==t)return!0;for(let s=0;s<t;s++)if(n[s]!==e[s])return!0;return!1}function Ct(n,e){const t=new Set(e);return n.filter(s=>t.has(s)?(t.delete(s),!1):!0)}function Re(n,e,t){let s=e;for(const i in n){const r=t(i,n[i]);s+=r?r+e:""}return s}function Pn(n){return Re(n,";",(e,t)=>t!==void 0?`${I(e)}:${t}`:"")}function kt(n){return Re(n," ",(e,t)=>t?e:"")}const Tn=kt;function Cn(n){return Re(n,",",(e,t)=>t!==void 0?`${e}:${t}`:"")}const se=new WeakMap;function F(n){if(se.has(n))throw new z("argument error");return se.set(n,new Set),n}function kn(n){return Object.keys(n).forEach(t=>{F(n[t])}),n}function T(n,e){Object.assign(n,e);const t=se.get(n);t==null||t.forEach(s=>{H(s)})}function ie(n,e){const t=se.get(n);t==null||t.add(e)}function Lt(n,e){const t=se.get(n);t==null||t.delete(e)}/**
135
135
  * @license
136
136
  * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
137
137
  * This code may only be used under the BSD style license found at
@@ -143,7 +143,7 @@ var ai=Object.defineProperty,ci=Object.defineProperties;var li=Object.getOwnProp
143
143
  * Code distributed by Google as part of the polymer project is also
144
144
  * subject to an additional IP rights grant found at
145
145
  * http://polymer.github.io/PATENTS.txt
146
- */const kn=(n,e)=>{const t=n.startNode.parentNode,s=e===void 0?n.endNode:e.startNode,i=t.insertBefore(B(),s);t.insertBefore(B(),s);const r=new de(n.options);return r.insertAfterNode(i),r},ie=(n,e)=>(n.setValue(e),n.commit(),n),Lt=(n,e,t)=>{const s=n.startNode.parentNode,i=t?t.startNode:n.endNode,r=e.endNode.nextSibling;r!==i&&rn(s,e.startNode,r,i)},$t=n=>{pt(n.startNode.parentNode,n.startNode,n.endNode.nextSibling)},Ln=(n,e,t)=>{const s=new Map;for(let i=e;i<=t;i++)s.set(n[i],i);return s},$n=new WeakMap,Mn=new WeakMap,Nn=J((n,e,t)=>{let s;return t===void 0?t=e:e!==void 0&&(s=e),i=>{if(!(i instanceof de))throw new Error("repeat can only be used in text bindings");const r=$n.get(i)||[],a=Mn.get(i)||[],c=[],l=[],h=[];let m=0;for(const b of n)h[m]=s?s(b,m):m,l[m]=t(b,m),m++;let u,$,w=0,S=r.length-1,p=0,_=l.length-1;for(;w<=S&&p<=_;)if(r[w]===null)w++;else if(r[S]===null)S--;else if(a[w]===h[p])c[p]=ie(r[w],l[p]),w++,p++;else if(a[S]===h[_])c[_]=ie(r[S],l[_]),S--,_--;else if(a[w]===h[_])c[_]=ie(r[w],l[_]),Lt(i,r[w],c[_+1]),w++,_--;else if(a[S]===h[p])c[p]=ie(r[S],l[p]),Lt(i,r[S],r[w]),S--,p++;else if(u===void 0&&(u=Ln(h,p,_),$=Ln(a,w,S)),!u.has(a[w]))$t(r[w]),w++;else if(!u.has(a[S]))$t(r[S]),S--;else{const b=$.get(h[p]),U=b!==void 0?r[b]:null;if(U===null){const W=kn(i,r[w]);ie(W,l[p]),c[p]=W}else c[p]=ie(U,l[p]),Lt(i,U,r[w]),r[b]=null;p++}for(;p<=_;){const b=kn(i,c[_+1]);ie(b,l[p]),c[p++]=b}for(;w<=S;){const b=r[w++];b!==null&&$t(b)}$n.set(i,c),Mn.set(i,h)}});/**
146
+ */const Ln=(n,e)=>{const t=n.startNode.parentNode,s=e===void 0?n.endNode:e.startNode,i=t.insertBefore(K(),s);t.insertBefore(K(),s);const r=new fe(n.options);return r.insertAfterNode(i),r},re=(n,e)=>(n.setValue(e),n.commit(),n),$t=(n,e,t)=>{const s=n.startNode.parentNode,i=t?t.startNode:n.endNode,r=e.endNode.nextSibling;r!==i&&an(s,e.startNode,r,i)},Mt=n=>{gt(n.startNode.parentNode,n.startNode,n.endNode.nextSibling)},$n=(n,e,t)=>{const s=new Map;for(let i=e;i<=t;i++)s.set(n[i],i);return s},Mn=new WeakMap,Nn=new WeakMap,On=Q((n,e,t)=>{let s;return t===void 0?t=e:e!==void 0&&(s=e),i=>{if(!(i instanceof fe))throw new Error("repeat can only be used in text bindings");const r=Mn.get(i)||[],o=Nn.get(i)||[],c=[],l=[],h=[];let m=0;for(const b of n)h[m]=s?s(b,m):m,l[m]=t(b,m),m++;let u,$,w=0,S=r.length-1,p=0,_=l.length-1;for(;w<=S&&p<=_;)if(r[w]===null)w++;else if(r[S]===null)S--;else if(o[w]===h[p])c[p]=re(r[w],l[p]),w++,p++;else if(o[S]===h[_])c[_]=re(r[S],l[_]),S--,_--;else if(o[w]===h[_])c[_]=re(r[w],l[_]),$t(i,r[w],c[_+1]),w++,_--;else if(o[S]===h[p])c[p]=re(r[S],l[p]),$t(i,r[S],r[w]),S--,p++;else if(u===void 0&&(u=$n(h,p,_),$=$n(o,w,S)),!u.has(o[w]))Mt(r[w]),w++;else if(!u.has(o[S]))Mt(r[S]),S--;else{const b=$.get(h[p]),B=b!==void 0?r[b]:null;if(B===null){const V=Ln(i,r[w]);re(V,l[p]),c[p]=V}else c[p]=re(B,l[p]),$t(i,B,r[w]),r[b]=null;p++}for(;p<=_;){const b=Ln(i,c[_+1]);re(b,l[p]),c[p++]=b}for(;w<=S;){const b=r[w++];b!==null&&Mt(b)}Mn.set(i,c),Nn.set(i,h)}});/**
147
147
  * @license
148
148
  * Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
149
149
  * This code may only be used under the BSD style license found at
@@ -155,7 +155,7 @@ var ai=Object.defineProperty,ci=Object.defineProperties;var li=Object.getOwnProp
155
155
  * Code distributed by Google as part of the polymer project is also
156
156
  * subject to an additional IP rights grant found at
157
157
  * http://polymer.github.io/PATENTS.txt
158
- */const Mt=new WeakMap,On=J((n,e)=>t=>{const s=Mt.get(t);if(Array.isArray(n)){if(Array.isArray(s)&&s.length===n.length&&n.every((i,r)=>i===s[r]))return}else if(s===n&&(n!==void 0||Mt.has(t)))return;t.setValue(e()),Mt.set(t,Array.isArray(n)?Array.from(n):n)});/**
158
+ */const Nt=new WeakMap,Rn=Q((n,e)=>t=>{const s=Nt.get(t);if(Array.isArray(n)){if(Array.isArray(s)&&s.length===n.length&&n.every((i,r)=>i===s[r]))return}else if(s===n&&(n!==void 0||Nt.has(t)))return;t.setValue(e()),Nt.set(t,Array.isArray(n)?Array.from(n):n)});/**
159
159
  * @license
160
160
  * Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
161
161
  * This code may only be used under the BSD style license found at
@@ -167,11 +167,11 @@ var ai=Object.defineProperty,ci=Object.defineProperties;var li=Object.getOwnProp
167
167
  * Code distributed by Google as part of the polymer project is also
168
168
  * subject to an additional IP rights grant found at
169
169
  * http://polymer.github.io/PATENTS.txt
170
- */const Nt=new WeakMap,Ot=J(n=>e=>{const t=Nt.get(e);if(n===void 0&&e instanceof Et){if(t!==void 0||!Nt.has(e)){const s=e.committer.name;e.committer.element.removeAttribute(s)}}else n!==t&&e.setValue(n);Nt.set(e,n)});var Rn=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)},d=(n,e,t)=>(Rn(n,e,"read from private field"),t?t.call(n):e.get(n)),C=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)},F=(n,e,t,s)=>(Rn(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),ge,re,Re,Ae,Y,Z,Ke,ze,Rt,At,Gt,Fe,Ht,Je,X,It,Qe;function ks(){}function Vt(n){typeof n=="function"&&n()}const Ye=new _t,Wt=(n=performance.now())=>{if(performance.now()>n+16)return requestAnimationFrame(Wt);const e=Ye.get();e&&(e(),Wt(n))};Ye.addEventListener("start",()=>H(Wt));const Ze=Symbol("init"),An=Symbol("update");class A extends HTMLElement{constructor({isAsync:e,isLight:t,delegatesFocus:s}={}){super();C(this,ge,void 0),C(this,re,void 0),C(this,Re,void 0),C(this,Ae,void 0),C(this,Y,void 0),C(this,Z,void 0),C(this,Ke,void 0),this.setState=r=>{if(!this.state)throw new K("`state` not initialized");Object.assign(this.state,r),H(d(this,X))},C(this,ze,r=>{r==null||r.forEach(a=>{const{callback:c,getDep:l,values:h,preCallback:m}=a,u=l==null?void 0:l();(!l||!h||Pt(h,u))&&(Vt(m),a.preCallback=c(u,h),a.values=u)})}),C(this,Rt,()=>{d(this,ze).call(this,d(this,Y))}),C(this,At,()=>{d(this,ze).call(this,d(this,Z))}),this.effect=(r,a)=>{d(this,Y)||F(this,Y,[]);const c={callback:r,getDep:a,values:void 0,initialized:!!this.isConnected};this.isConnected&&(c.values=a==null?void 0:a(),c.preCallback=r(c.values)),d(this,Y).push(c)},this.memo=(r,a)=>{d(this,Z)||F(this,Z,[]),d(this,Z).push({callback:r,getDep:a,values:[Symbol()],initialized:this.isConnected})},C(this,Gt,()=>{var r;(r=d(this,Y))==null||r.forEach(a=>{const{callback:c,getDep:l,initialized:h}=a;h||(a.values=l==null?void 0:l(),a.preCallback=c(a.values),a.initialized=!0)})}),C(this,Fe,()=>{var a,c;d(this,At).call(this);const r=o.useNativeCSSStyleSheet?"":N`${(c=(a=this.shadowRoot)==null?void 0:a.adoptedStyleSheets)==null?void 0:c.map(l=>N`
170
+ */const Ot=new WeakMap,Rt=Q(n=>e=>{const t=Ot.get(e);if(n===void 0&&e instanceof _t){if(t!==void 0||!Ot.has(e)){const s=e.committer.name;e.committer.element.removeAttribute(s)}}else n!==t&&e.setValue(n);Ot.set(e,n)});var An=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)},d=(n,e,t)=>(An(n,e,"read from private field"),t?t.call(n):e.get(n)),P=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)},D=(n,e,t,s)=>(An(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),ye,ae,Ae,J,Ge,Z,X,ze,Fe,At,Gt,Ht,Je,It,Qe,ee,Wt,Ye;function Ls(){}function Vt(n){typeof n=="function"&&n()}const Ze=new vt,jt=(n=performance.now())=>{if(performance.now()>n+16)return requestAnimationFrame(jt);const e=Ze.get();e&&(e(),jt(n))};Ze.addEventListener("start",()=>H(jt));const Xe=Symbol("init"),Gn=Symbol("update");class A extends HTMLElement{constructor({isAsync:e,isLight:t,delegatesFocus:s}={}){super();P(this,ye,void 0),P(this,ae,void 0),P(this,Ae,void 0),P(this,J,void 0),P(this,Ge,void 0),P(this,Z,void 0),P(this,X,void 0),P(this,ze,void 0),this.setState=r=>{if(!this.state)throw new z("`state` not initialized");Object.assign(this.state,r),H(d(this,ee))},P(this,Fe,r=>{r==null||r.forEach(o=>{const{callback:c,getDep:l,values:h,preCallback:m}=o,u=l==null?void 0:l();(!l||!h||Tt(h,u))&&(Vt(m),o.preCallback=c(u,h),o.values=u)})}),P(this,At,()=>{d(this,Fe).call(this,d(this,Z))}),P(this,Gt,()=>{d(this,Fe).call(this,d(this,X))}),this.effect=(r,o)=>{d(this,Z)||D(this,Z,[]);const c={callback:r,getDep:o,values:void 0,initialized:!!d(this,J)};d(this,J)&&(c.values=o==null?void 0:o(),c.preCallback=r(c.values)),d(this,Z).push(c)},this.memo=(r,o)=>{d(this,X)||D(this,X,[]),d(this,X).push({callback:r,getDep:o,values:[Symbol()],initialized:!!d(this,J)})},P(this,Ht,()=>{var r;(r=d(this,Z))==null||r.forEach(o=>{const{callback:c,getDep:l,initialized:h}=o;h||(o.values=l==null?void 0:l(),o.preCallback=c(o.values),o.initialized=!0)})}),P(this,Je,()=>{var o,c;d(this,Gt).call(this);const r=a.useNativeCSSStyleSheet?"":N`${(c=(o=this.shadowRoot)==null?void 0:o.adoptedStyleSheets)==null?void 0:c.map(l=>N`
171
171
  <style media=${l.media.mediaText}>
172
172
  ${l.style}
173
173
  </style>
174
- `)}`;if(this.render){const l=this.render();return l&&N`${l}${r}`}return d(this,ge)===this?void 0:N`<slot></slot>${r}`}),C(this,Ht,()=>this.shouldUpdate?this.shouldUpdate():!0),C(this,Je,()=>{if(this.isConnected&&d(this,Ht).call(this)){const r=d(this,Fe).call(this);r!==void 0&&xe(r,d(this,ge)),H(d(this,It)),H(d(this,Rt))}}),C(this,X,()=>{d(this,Ae)?Ye.add(d(this,Je)):d(this,Je).call(this)}),this.update=()=>{H(d(this,X))},C(this,It,()=>{var r;(r=this.updated)==null||r.call(this)}),C(this,Qe,()=>{var l,h,m;if(d(this,Re)){F(this,Re,!1);return}(l=this.willMount)==null||l.call(this);const{observedStores:r,rootElement:a}=this.constructor;r==null||r.forEach(u=>{se(u,d(this,X))});const c=d(this,Fe).call(this);if(c!==void 0&&xe(c,d(this,ge)),F(this,Ke,(h=this.mounted)==null?void 0:h.call(this)),d(this,Gt).call(this),a&&((m=this.getRootNode().host)==null?void 0:m.tagName)!==a.toUpperCase())throw new K("not allow current root type")}),H(()=>this[Ze]=!1),this[Ze]=!0,this[An]=()=>{this.isConnected&&H(d(this,X))},F(this,Ae,e),F(this,ge,t?this:this.attachShadow({mode:"open",delegatesFocus:s}));const{adoptedStyleSheets:i}=new.target;if(i){const r=i.map(a=>a[Be]||a);this.shadowRoot?this.shadowRoot.adoptedStyleSheets=r:this.effect(()=>{const a=this.getRootNode();if(o.useNativeCSSStyleSheet)return a.adoptedStyleSheets=[...a.adoptedStyleSheets,...r],()=>{a.adoptedStyleSheets=Ct(a.adoptedStyleSheets,r)};{const c=a===document?document.body:a;return c._sheets=c._sheets||{},r.forEach(({style:l,media:h})=>{if(c._sheets[l])c._sheets[l].count++;else{const m=document.createElement("style");m.innerHTML=l,m.media=h.mediaText,c.append(m),c._sheets[l]={ele:m,count:1}}}),()=>{r.forEach(({style:l})=>{c._sheets[l].count--,c._sheets[l].count||delete c._sheets[l]})}}},()=>[])}}get internals(){if(!d(this,re)){const e=()=>{const t=s=>s.replace(/-/g,"");return{has:s=>t(s)in this.dataset,add:s=>{this.dataset[t(s)]=""},delete:s=>delete this.dataset[t(s)]}};this.attachInternals||(this.attachInternals=()=>({states:e()})),F(this,re,this.attachInternals()),d(this,re).states||(d(this,re).states=e())}return d(this,re)}attributeChangedCallback(){this.isConnected&&H(d(this,X))}closestElement(e){const t=typeof e=="function",s=typeof e=="string"&&e.toUpperCase(),i=r=>{const a=r.parentElement||r.getRootNode().host;if(!a)return null;if(t){if(a.constructor===e)return a}else if(a.tagName===s)return a;return i(a)};return i(this)}connectedCallback(){d(this,Ae)?Ye.add(d(this,Qe)):d(this,Qe).call(this)}disconnectedCallback(){var t,s,i;if(this.isConnected){F(this,Re,!0);return}const{observedStores:e}=this.constructor;e==null||e.forEach(r=>{kt(r,d(this,X))}),Vt(d(this,Ke)),(t=this.unmounted)==null||t.call(this),(s=d(this,Y))==null||s.forEach(r=>{Vt(r.preCallback)}),F(this,Z,(i=d(this,Z))==null?void 0:i.filter(({initialized:r})=>!r))}}ge=new WeakMap,re=new WeakMap,Re=new WeakMap,Ae=new WeakMap,Y=new WeakMap,Z=new WeakMap,Ke=new WeakMap,ze=new WeakMap,Rt=new WeakMap,At=new WeakMap,Gt=new WeakMap,Fe=new WeakMap,Ht=new WeakMap,Je=new WeakMap,X=new WeakMap,It=new WeakMap,Qe=new WeakMap;const Xe=new vt;function et(n,e,t){const{booleanAttributes:s,numberAttributes:i}=n.constructor;Object.defineProperty(n,e,{configurable:!0,get(){if(!(Ze in this))return;const a=this.getAttribute(t);return(s==null?void 0:s.has(t))?a!==null:(i==null?void 0:i.has(t))?Number(a):a||""},set(r){const a=this,c=Xe.get(this),l=c[e],h=a.getAttribute(t);if(this[Ze]&&h!==null&&!l)return;c[e]=!0;const m=s==null?void 0:s.has(t);r==null?a.removeAttribute(t):m?a.toggleAttribute(t,!!r):h!==String(r)&&a.setAttribute(t,String(r))}})}const Gn=Symbol("event handle");function ye(n,e,t,s){Object.defineProperty(n,e,{configurable:!0,get(){const i=Xe.get(this)[e];return i||!t?i:(this[e]=ks,this[e])},set(i){const r=this,a=Xe.get(r);i!==a[e]&&(t?(a[e]=(i==null?void 0:i[Gn])?i:(c,l)=>{const h=new CustomEvent(t,qe(T(T({},l),s),{detail:c}));r.dispatchEvent(h),i(c,l)},a[e][Gn]=!0):(a[e]=i,this[An]()))}})}function tt(n,e,t){Object.defineProperty(n,e,{configurable:!0,get(){const s=Xe.get(this);let i=s[e];if(!i){const r=this,a=r.shadowRoot||r;i={get ref(){return t},get element(){const c=[...a.querySelectorAll("[data-gemreflect]")].map(l=>l.target);for(const l of[a,...c]){const h=l.querySelector(`[ref=${t}]`);if(h)return h}}},s[e]=i}return i}})}function nt(n,e,t){Object.defineProperty(n,e,{configurable:!0,get(){var r;const s=this,{states:i}=s.internals;return(r=i.has)==null?void 0:r.call(i,t)},set(s){const i=this,{states:r}=i.internals;s?r.add(t):r.delete(t)}})}const st=customElements.define.bind(customElements);customElements.define=(n,e,t)=>{if(e.prototype instanceof A){const{observedAttributes:s,observedPropertys:i,defineEvents:r,defineCSSStates:a,defineRefs:c}=e;s==null||s.forEach(l=>et(e.prototype,pe(l),l)),i==null||i.forEach(l=>ye(e.prototype,l)),r==null||r.forEach(l=>ye(e.prototype,pe(l),l)),a==null||a.forEach(l=>nt(e.prototype,pe(l),`--${l}`)),c==null||c.forEach(l=>tt(e.prototype,pe(l),l))}st(n,e,t)};function D(n,e,t,s=!1){const i=n.constructor,r=i[e];i.hasOwnProperty(e)||Object.defineProperty(i,e,{value:s?new Set(r):r?Array.from(r):[]}),i[e][s?"add":"push"](t)}function Hn(n,e){const t=`${I(e)}-${Me()}`;D(n,"defineRefs",t),tt(n,e,t)}function jt(n,e,t){D(n,"observedAttributes",t),et(n,e,t)}function k(n,e){jt(n,e,I(e))}function In(n,e){const t=I(e);D(n,"booleanAttributes",t,!0),jt(n,e,t)}function Vn(n,e){const t=I(e);D(n,"numberAttributes",t,!0),jt(n,e,t)}function q(n,e){D(n,"observedPropertys",e),ye(n,e)}function Ge(n,e){const t=I(e);D(n,"defineCSSStates",t),nt(n,e,`--${t}`)}function Wn(n,e){const t=I(n[e]||e);n[e]=t,D(n instanceof A?n:n.prototype,"defineSlots",t)}function Dt(n,e){const t=I(n[e]||e);n[e]=t,D(n instanceof A?n:n.prototype,"defineParts",t)}function He(n,e){Dn(n,e)}function jn(n,e){Dn(n,e,{bubbles:!0,composed:!0})}function Dn(n,e,t){const s=I(e);D(n,"defineEvents",s),ye(n,e,s,t)}function qn(n){return function(e){D(e.prototype,"adoptedStyleSheets",n)}}function oe(n){return function(e){D(e.prototype,"observedStores",n)}}function xn(n){return function(e){const t=e;t.rootElement=n}}function Un(n){return function(e){st(n,e)}}const V=window.history,Bn=V.pushState.bind(V),Kn=V.replaceState.bind(V);let Ls=0;const qt=()=>`${performance.now()}-${++Ls}`,v=z({$hasCloseHandle:!1,$hasOpenHandle:!1,$hasShouldCloseHandle:!1,$key:""}),O=new Map;function zn(n){const{$key:e,$hasCloseHandle:t,$hasOpenHandle:s,$hasShouldCloseHandle:i}=n||{};if(v.$key!==e){if(e)throw new K("`$key` is not allowed");if(t)throw new K("`$hasCloseHandle` is not allowed");if(s)throw new K("`$hasOpenHandle` is not allowed");if(i)throw new K("`$hasShouldCloseHandle` is not allowed")}}function Fn(n){return x.basePath?x.basePath+n:n}function Jn(n){return n===x.basePath?"/":n.replace(new RegExp(`^${x.basePath}/`),"/")}function it(n){const e=O.get(v.$key)||{},t=n.path?Ue(e.path,n.path):Jn(location.pathname),s=new fe(n.query||(n.path?"":location.search)),i=n.path&&n.path!==e.path||n.query&&String(n.query)!==String(e.query),r=n.title||(i?"":document.title),a=n.close||n.data||n.open||n.shouldClose,c=n.hash||(!i&&a?decodeURIComponent(location.hash):"");return qe(T({},n),{title:r,path:t,query:s,hash:c})}function Qn(n,e){zn(n.data);const t=it(n),{title:s,path:i,query:r,hash:a,close:c,open:l,shouldClose:h,data:m}=t,u=T({$hasCloseHandle:!!c,$hasOpenHandle:!!l,$hasShouldCloseHandle:!!h,$key:qt()},m);O.set(u.$key,t),P(Ne(v),u);const $=Fn(i)+new fe(r)+a,w=decodeURIComponent(location.hash);e(u,s,$),w!==a&&window.dispatchEvent(new CustomEvent("hashchange"))}function Yn(n,e,t,s){zn(n);const i=T({$key:qt()},n||{}),{pathname:r,search:a,hash:c}=new URL(t,location.origin+location.pathname),l=it({path:r,query:new fe(a),hash:c,title:e,data:n});O.set(i.$key,l),P(Ne(v),i);const h=Fn(r)+l.query+c,m=location.hash;s(i,e,h),m!==c&&window.dispatchEvent(new CustomEvent("hashchange"))}const xt=z({basePath:""});class $s{get store(){return v}get basePath(){return xt.basePath}set basePath(e){P(xt,{basePath:e}),Object.assign(O.get(v.$key),{path:Jn(location.pathname)})}getParams(){return O.get(v.$key)}updateParams(e){Object.assign(O.get(v.$key),e),P(v,{})}push(e){Qn(e,Bn)}replace(e){Qn(e,Kn)}pushIgnoreCloseHandle(e){var t,s;v.$hasCloseHandle?((s=(t=O.get(v.$key))==null?void 0:t.close)==null||s.call(t),this.replace(e)):this.push(e)}forward(){V.forward()}back(){V.back()}}const x=new $s,Ie=z({title:""}),Ms={history:x,titleStore:Ie,basePathStore:xt};if(!window._GEMHISTORY){if(window._GEMHISTORY=Ms,V.pushState=function(e,t,s){Yn(e,t,s,Bn)},V.replaceState=function(e,t,s){Yn(e,t,s,Kn)},window.addEventListener("hashchange",({isTrusted:e})=>{e&&x.replace({hash:decodeURIComponent(location.hash)})}),V.state)if(V.state.$hasCloseHandle){P(v,V.state);const e=it({title:document.title});O.set(v.$key,e),x.back()}else{const e=it({title:document.title,hash:location.hash});P(v,T({$key:qt()},V.state||{})),O.set(v.$key,e)}else{const{pathname:e,search:t,hash:s}=location;x.replace({path:e,query:t,hash:s})}se(Ie,()=>{const e=O.get(v.$key);e&&(e.title=Ie.title)}),se(v,()=>{const{title:e}=x.getParams();e!==Ie.title&&P(Ie,{title:e})});let n=!1;window.addEventListener("popstate",e=>{var i,r;const t=e.state;if(!(t==null?void 0:t.$key))return;if(n){n=!1;return}if(!O.has(t.$key)){const{pathname:a,search:c,hash:l}=location;O.set(t.$key,{path:a,query:new fe(c),hash:l,title:document.title,data:t})}const s=v;if(parseFloat(t.$key)>parseFloat(s.$key)&&t.$hasOpenHandle)(r=(i=O.get(t.$key))==null?void 0:i.open)==null||r.call(i);else if(s.$hasCloseHandle){const a=O.get(s.$key),c=a==null?void 0:a.close,l=a==null?void 0:a.shouldClose;if(l&&!l()){n=!0,x.forward();return}else c?c():t.$hasCloseHandle&&(n=!0,x.back())}P(Ne(v),t)})}const{history:E,titleStore:ae,basePathStore:Ut}=window._GEMHISTORY;var Ns=Object.defineProperty,Os=Object.getOwnPropertyDescriptor,ce=(n,e,t,s)=>{for(var i=s>1?void 0:s?Os(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&Ns(e,t,i),i},Zn=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)},Ve=(n,e,t)=>(Zn(n,e,"read from private field"),t?t.call(n):e.get(n)),Bt=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)},Xn=(n,e,t,s)=>(Zn(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),We,rt,ot;class Rs extends RegExp{constructor(e){const t={};let s=0;super(`^${e.replace(/:([^/$]+)/g,(i,r)=>(t[r]=s++,"([^/]+)")).replace("*",".*")}$`,"i");this.namePosition=t}}function Kt(n,e){const t=new Rs(n),s=e.match(t)||`${e}/`.match(t);if(!s)return null;const i={};return s&&Object.keys(t.namePosition).forEach(r=>{i[r]=s[t.namePosition[r]+1]}),i}function zt(n,e){let t=n.pattern;const s=e==null?void 0:e.params;return s&&Object.keys(s).forEach(i=>{t=t.replace(new RegExp(`:${i}`,"g"),s[i])}),t}function es(n,e){const t=zt(n,e);return T({path:t},e)}o.GemRouteElement=class extends A{constructor({isLight:n,routes:e}={}){super({isLight:n});this.currentParams={},Bt(this,We,void 0),this.state={content:void 0},Bt(this,rt,()=>{if(this.locationStore){const{path:t,query:s,data:i}=E.getParams();P(this.locationStore,{path:t,params:this.currentParams,query:s,data:i})}}),Bt(this,ot,(t,s,i)=>{Xn(this,We,void 0),this.currentRoute=t,this.currentParams=s,this.setState({content:i}),this.routechange(this.currentRoute),Ve(this,rt).call(this)}),this.routes=e}mounted(){this.effect(([n,e],t)=>{if(t&&n===t[0]&&e===t[1]){Ve(this,rt).call(this);return}const{route:s,params:i={}}=o.GemRouteElement.findRoute(this.routes,e),{redirect:r,content:a,getContent:c}=s||{};if(r){E.replace({path:r});return}const l=s==null?void 0:s.title;l&&P(ae,{title:l});const h=a||(c==null?void 0:c(i));if(h instanceof Promise){this.loading(s),Xn(this,We,h);const m=()=>Ve(this,We)===h;h.then(u=>{m()&&Ve(this,ot).call(this,s,i,u)}).catch(u=>{m()&&this.error(u)});return}Ve(this,ot).call(this,s,i,h)},()=>{const{path:n}=E.getParams();return[this.key,n,location.search]})}shouldUpdate(){return!this.inert}render(){const{content:n}=this.state;return this.shadowRoot?N`
174
+ `)}`;if(this.render){const l=this.render();return l&&N`${l}${r}`}return d(this,ye)===this?void 0:N`<slot></slot>${r}`}),P(this,It,()=>this.shouldUpdate?this.shouldUpdate():!0),P(this,Qe,()=>{if(d(this,J)&&d(this,It).call(this)){const r=d(this,Je).call(this);r!==void 0&&Ue(r,d(this,ye)),H(d(this,Wt)),H(d(this,At))}}),P(this,ee,()=>{d(this,Ge)?Ze.add(d(this,Qe)):d(this,Qe).call(this)}),this.update=()=>{H(d(this,ee))},P(this,Wt,()=>{var r;(r=this.updated)==null||r.call(this)}),P(this,Ye,()=>{var l,h,m;if(d(this,Ae)){D(this,Ae,!1);return}(l=this.willMount)==null||l.call(this);const{observedStores:r,rootElement:o}=this.constructor;r==null||r.forEach(u=>{ie(u,d(this,ee))});const c=d(this,Je).call(this);if(c!==void 0&&Ue(c,d(this,ye)),D(this,J,!0),D(this,ze,(h=this.mounted)==null?void 0:h.call(this)),d(this,Ht).call(this),o&&((m=this.getRootNode().host)==null?void 0:m.tagName)!==o.toUpperCase())throw new z("not allow current root type")}),H(()=>this[Xe]=!1),this[Xe]=!0,this[Gn]=()=>{d(this,J)&&H(d(this,ee))},D(this,Ge,e),D(this,ye,t?this:this.attachShadow({mode:"open",delegatesFocus:s}));const{adoptedStyleSheets:i}=new.target;if(i){const r=i.map(o=>o[Ke]||o);this.shadowRoot?this.shadowRoot.adoptedStyleSheets=r:this.effect(()=>{const o=this.getRootNode();if(a.useNativeCSSStyleSheet)return o.adoptedStyleSheets=[...o.adoptedStyleSheets,...r],()=>{o.adoptedStyleSheets=Ct(o.adoptedStyleSheets,r)};{const c=o===document?document.body:o;return c._sheets=c._sheets||{},r.forEach(({style:l,media:h})=>{if(c._sheets[l])c._sheets[l].count++;else{const m=document.createElement("style");m.innerHTML=l,m.media=h.mediaText,c.append(m),c._sheets[l]={ele:m,count:1}}}),()=>{r.forEach(({style:l})=>{c._sheets[l].count--,c._sheets[l].count||delete c._sheets[l]})}}},()=>[])}}get internals(){if(!d(this,ae)){const e=()=>{const t=s=>s.replace(/-/g,"");return{has:s=>t(s)in this.dataset,add:s=>{this.dataset[t(s)]=""},delete:s=>delete this.dataset[t(s)]}};this.attachInternals||(this.attachInternals=()=>({states:e()})),D(this,ae,this.attachInternals()),d(this,ae).states||(d(this,ae).states=e())}return d(this,ae)}attributeChangedCallback(){d(this,J)&&H(d(this,ee))}closestElement(e){const t=typeof e=="function",s=typeof e=="string"&&e.toUpperCase(),i=r=>{const o=r.parentElement||r.getRootNode().host;if(!o)return null;if(t){if(o.constructor===e)return o}else if(o.tagName===s)return o;return i(o)};return i(this)}connectedCallback(){d(this,Ge)?Ze.add(d(this,Ye)):d(this,Ye).call(this)}disconnectedCallback(){var t,s,i;if(this.isConnected){D(this,Ae,!0);return}D(this,J,!1);const{observedStores:e}=this.constructor;e==null||e.forEach(r=>{Lt(r,d(this,ee))}),Vt(d(this,ze)),(t=this.unmounted)==null||t.call(this),(s=d(this,Z))==null||s.forEach(r=>{Vt(r.preCallback)}),D(this,X,(i=d(this,X))==null?void 0:i.filter(({initialized:r})=>!r))}}ye=new WeakMap,ae=new WeakMap,Ae=new WeakMap,J=new WeakMap,Ge=new WeakMap,Z=new WeakMap,X=new WeakMap,ze=new WeakMap,Fe=new WeakMap,At=new WeakMap,Gt=new WeakMap,Ht=new WeakMap,Je=new WeakMap,It=new WeakMap,Qe=new WeakMap,ee=new WeakMap,Wt=new WeakMap,Ye=new WeakMap;const et=new bt;function tt(n,e,t){const{booleanAttributes:s,numberAttributes:i}=n.constructor;Object.defineProperty(n,e,{configurable:!0,get(){if(!(Xe in this))return;const o=this.getAttribute(t);return(s==null?void 0:s.has(t))?o!==null:(i==null?void 0:i.has(t))?Number(o):o||""},set(r){const o=this,c=et.get(this),l=c[e],h=o.getAttribute(t);if(this[Xe]&&h!==null&&!l)return;c[e]=!0;const m=s==null?void 0:s.has(t);r==null?o.removeAttribute(t):m?o.toggleAttribute(t,!!r):h!==String(r)&&o.setAttribute(t,String(r))}})}const Hn=Symbol("event handle");function we(n,e,t,s){Object.defineProperty(n,e,{configurable:!0,get(){const i=et.get(this)[e];return i||!t?i:(this[e]=Ls,this[e])},set(i){const r=this,o=et.get(r);i!==o[e]&&(t?(o[e]=(i==null?void 0:i[Hn])?i:(c,l)=>{const h=new CustomEvent(t,xe(C(C({},l),s),{detail:c}));r.dispatchEvent(h),i(c,l)},o[e][Hn]=!0):(o[e]=i,this[Gn]()))}})}function nt(n,e,t){Object.defineProperty(n,e,{configurable:!0,get(){const s=et.get(this);let i=s[e];if(!i){const r=this,o=r.shadowRoot||r;i={get ref(){return t},get element(){const c=[...o.querySelectorAll("[data-gemreflect]")].map(l=>l.target);for(const l of[o,...c]){const h=l.querySelector(`[ref=${t}]`);if(h)return h}}},s[e]=i}return i}})}function st(n,e,t){Object.defineProperty(n,e,{configurable:!0,get(){var r;const s=this,{states:i}=s.internals;return(r=i.has)==null?void 0:r.call(i,t)},set(s){const i=this,{states:r}=i.internals;s?r.add(t):r.delete(t)}})}const it=customElements.define.bind(customElements);customElements.define=(n,e,t)=>{if(e.prototype instanceof A){const{observedAttributes:s,observedPropertys:i,defineEvents:r,defineCSSStates:o,defineRefs:c}=e;s==null||s.forEach(l=>tt(e.prototype,ge(l),l)),i==null||i.forEach(l=>we(e.prototype,l)),r==null||r.forEach(l=>we(e.prototype,ge(l),l)),o==null||o.forEach(l=>st(e.prototype,ge(l),`--${l}`)),c==null||c.forEach(l=>nt(e.prototype,ge(l),l))}it(n,e,t)};function q(n,e,t,s=!1){const i=n.constructor,r=i[e];i.hasOwnProperty(e)||Object.defineProperty(i,e,{value:s?new Set(r):r?Array.from(r):[]}),i[e][s?"add":"push"](t)}function In(n,e){const t=`${I(e)}-${Ne()}`;q(n,"defineRefs",t),nt(n,e,t)}function Dt(n,e,t){q(n,"observedAttributes",t),tt(n,e,t)}function k(n,e){Dt(n,e,I(e))}function Wn(n,e){const t=I(e);q(n,"booleanAttributes",t,!0),Dt(n,e,t)}function Vn(n,e){const t=I(e);q(n,"numberAttributes",t,!0),Dt(n,e,t)}function x(n,e){q(n,"observedPropertys",e),we(n,e)}function He(n,e){const t=I(e);q(n,"defineCSSStates",t),st(n,e,`--${t}`)}function jn(n,e){const t=I(n[e]||e);n[e]=t,q(n instanceof A?n:n.prototype,"defineSlots",t)}function qt(n,e){const t=I(n[e]||e);n[e]=t,q(n instanceof A?n:n.prototype,"defineParts",t)}function Ie(n,e){qn(n,e)}function Dn(n,e){qn(n,e,{bubbles:!0,composed:!0})}function qn(n,e,t){const s=I(e);q(n,"defineEvents",s),we(n,e,s,t)}function xn(n){return function(e){q(e.prototype,"adoptedStyleSheets",n)}}function oe(n){return function(e){q(e.prototype,"observedStores",n)}}function Un(n){return function(e){const t=e;t.rootElement=n}}function Bn(n){return function(e){it(n,e)}}const W=window.history,Kn=W.pushState.bind(W),zn=W.replaceState.bind(W);let $s=0;const xt=()=>`${performance.now()}-${++$s}`,v=F({$hasCloseHandle:!1,$hasOpenHandle:!1,$hasShouldCloseHandle:!1,$key:""}),O=new Map;function Fn(n){const{$key:e,$hasCloseHandle:t,$hasOpenHandle:s,$hasShouldCloseHandle:i}=n||{};if(v.$key!==e){if(e)throw new z("`$key` is not allowed");if(t)throw new z("`$hasCloseHandle` is not allowed");if(s)throw new z("`$hasOpenHandle` is not allowed");if(i)throw new z("`$hasShouldCloseHandle` is not allowed")}}function Jn(n){return U.basePath?U.basePath+n:n}function Qn(n){return n===U.basePath?"/":n.replace(new RegExp(`^${U.basePath}/`),"/")}function rt(n){const e=O.get(v.$key)||{},t=n.path?Be(e.path,n.path):Qn(location.pathname),s=new me(n.query||(n.path?"":location.search)),i=n.path&&n.path!==e.path||n.query&&String(n.query)!==String(e.query),r=n.title||(i?"":document.title),o=n.close||n.data||n.open||n.shouldClose,c=n.hash||(!i&&o?decodeURIComponent(location.hash):"");return xe(C({},n),{title:r,path:t,query:s,hash:c})}function Yn(n,e){Fn(n.data);const t=rt(n),{title:s,path:i,query:r,hash:o,close:c,open:l,shouldClose:h,data:m}=t,u=C({$hasCloseHandle:!!c,$hasOpenHandle:!!l,$hasShouldCloseHandle:!!h,$key:xt()},m);O.set(u.$key,t),T(Oe(v),u);const $=Jn(i)+new me(r)+o,w=decodeURIComponent(location.hash);e(u,s,$),w!==o&&window.dispatchEvent(new CustomEvent("hashchange"))}function Zn(n,e,t,s){Fn(n);const i=C({$key:xt()},n||{}),{pathname:r,search:o,hash:c}=new URL(t,location.origin+location.pathname),l=rt({path:r,query:new me(o),hash:c,title:e,data:n});O.set(i.$key,l),T(Oe(v),i);const h=Jn(r)+l.query+c,m=location.hash;s(i,e,h),m!==c&&window.dispatchEvent(new CustomEvent("hashchange"))}const Ut=F({basePath:""});class Ms{get store(){return v}get basePath(){return Ut.basePath}set basePath(e){T(Ut,{basePath:e}),Object.assign(O.get(v.$key),{path:Qn(location.pathname)})}getParams(){return O.get(v.$key)}updateParams(e){Object.assign(O.get(v.$key),e),T(v,{})}push(e){Yn(e,Kn)}replace(e){Yn(e,zn)}pushIgnoreCloseHandle(e){var t,s;v.$hasCloseHandle?((s=(t=O.get(v.$key))==null?void 0:t.close)==null||s.call(t),this.replace(e)):this.push(e)}forward(){W.forward()}back(){W.back()}}const U=new Ms,We=F({title:""}),Ns={history:U,titleStore:We,basePathStore:Ut};if(!window._GEMHISTORY){if(window._GEMHISTORY=Ns,W.pushState=function(e,t,s){Zn(e,t,s,Kn)},W.replaceState=function(e,t,s){Zn(e,t,s,zn)},window.addEventListener("hashchange",({isTrusted:e})=>{e&&U.replace({hash:decodeURIComponent(location.hash)})}),W.state)if(W.state.$hasCloseHandle){T(v,W.state);const e=rt({title:document.title});O.set(v.$key,e),U.back()}else{const e=rt({title:document.title,hash:location.hash});T(v,C({$key:xt()},W.state||{})),O.set(v.$key,e)}else{const{pathname:e,search:t,hash:s}=location;U.replace({path:e,query:t,hash:s})}ie(We,()=>{const e=O.get(v.$key);e&&(e.title=We.title)}),ie(v,()=>{const{title:e}=U.getParams();e!==We.title&&T(We,{title:e})});let n=!1;window.addEventListener("popstate",e=>{var i,r;const t=e.state;if(!(t==null?void 0:t.$key))return;if(n){n=!1;return}if(!O.has(t.$key)){const{pathname:o,search:c,hash:l}=location;O.set(t.$key,{path:o,query:new me(c),hash:l,title:document.title,data:t})}const s=v;if(parseFloat(t.$key)>parseFloat(s.$key)&&t.$hasOpenHandle)(r=(i=O.get(t.$key))==null?void 0:i.open)==null||r.call(i);else if(s.$hasCloseHandle){const o=O.get(s.$key),c=o==null?void 0:o.close,l=o==null?void 0:o.shouldClose;if(l&&!l()){n=!0,U.forward();return}else c?c():t.$hasCloseHandle&&(n=!0,U.back())}T(Oe(v),t)})}const{history:E,titleStore:ce,basePathStore:Bt}=window._GEMHISTORY;var Os=Object.defineProperty,Rs=Object.getOwnPropertyDescriptor,le=(n,e,t,s)=>{for(var i=s>1?void 0:s?Rs(e,t):e,r=n.length-1,o;r>=0;r--)(o=n[r])&&(i=(s?o(e,t,i):o(i))||i);return s&&i&&Os(e,t,i),i},Xn=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)},Ve=(n,e,t)=>(Xn(n,e,"read from private field"),t?t.call(n):e.get(n)),Kt=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)},es=(n,e,t,s)=>(Xn(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),je,at,ot;class As extends RegExp{constructor(e){const t={};let s=0;super(`^${e.replace(/:([^/$]+)/g,(i,r)=>(t[r]=s++,"([^/]+)")).replace("*",".*")}$`,"i");this.namePosition=t}}function zt(n,e){const t=new As(n),s=e.match(t)||`${e}/`.match(t);if(!s)return null;const i={};return s&&Object.keys(t.namePosition).forEach(r=>{i[r]=s[t.namePosition[r]+1]}),i}function Ft(n,e){let t=n.pattern;const s=e==null?void 0:e.params;return s&&Object.keys(s).forEach(i=>{t=t.replace(new RegExp(`:${i}`,"g"),s[i])}),t}function ts(n,e){const t=Ft(n,e);return C({path:t},e)}a.GemRouteElement=class extends A{constructor({isLight:n,routes:e}={}){super({isLight:n});this.currentParams={},Kt(this,je,void 0),this.state={content:void 0},Kt(this,at,()=>{if(this.locationStore){const{path:t,query:s,data:i}=E.getParams();T(this.locationStore,{path:t,params:this.currentParams,query:s,data:i})}}),Kt(this,ot,(t,s,i)=>{es(this,je,void 0),this.currentRoute=t,this.currentParams=s,this.setState({content:i}),this.routechange(this.currentRoute),Ve(this,at).call(this)}),this.routes=e}mounted(){this.effect(([n,e],t)=>{if(t&&n===t[0]&&e===t[1]){Ve(this,at).call(this);return}const{route:s,params:i={}}=a.GemRouteElement.findRoute(this.routes,e),{redirect:r,content:o,getContent:c}=s||{};if(r){E.replace({path:r});return}const l=s==null?void 0:s.title;l&&T(ce,{title:l});const h=o||(c==null?void 0:c(i));if(h instanceof Promise){this.loading(s),es(this,je,h);const m=()=>Ve(this,je)===h;h.then(u=>{m()&&Ve(this,ot).call(this,s,i,u)}).catch(u=>{m()&&this.error(u)});return}Ve(this,ot).call(this,s,i,h)},()=>{const{path:n}=E.getParams();return[this.key,n,location.search]})}shouldUpdate(){return!this.inert}render(){const{content:n}=this.state;return this.shadowRoot?N`
175
175
  <style>
176
176
  :host,
177
177
  :not(:defined) {
@@ -179,7 +179,7 @@ var ai=Object.defineProperty,ci=Object.defineProperties;var li=Object.getOwnProp
179
179
  }
180
180
  </style>
181
181
  ${n!=null?n:N`<slot></slot>`}
182
- `:N`${n}`}},We=new WeakMap,rt=new WeakMap,ot=new WeakMap,o.GemRouteElement.createLocationStore=()=>{const{path:n,query:e,data:t}=E.getParams();return z({path:n,query:e,data:t,params:{}})},o.GemRouteElement.findRoute=(n=[],e)=>{let t=null,s;n instanceof Array?s=n:s=Object.values(n);for(const i of s)if(i.pattern==="*")t=i;else{const r=Kt(i.pattern,e);if(r)return{route:i,params:r}}return{route:t}},ce([q],o.GemRouteElement.prototype,"routes",2),ce([q],o.GemRouteElement.prototype,"locationStore",2),ce([q],o.GemRouteElement.prototype,"key",2),ce([He],o.GemRouteElement.prototype,"routechange",2),ce([He],o.GemRouteElement.prototype,"loading",2),ce([He],o.GemRouteElement.prototype,"error",2),o.GemRouteElement=ce([oe(E.store)],o.GemRouteElement);class ts extends o.GemRouteElement{constructor(e={}){super(qe(T({},e),{isLight:!0}))}}var As=Object.defineProperty,Gs=Object.getOwnPropertyDescriptor,L=(n,e,t,s)=>{for(var i=s>1?void 0:s?Gs(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&As(e,t,i),i};o.GemLinkElement=class extends A{constructor(){super();this.clickHandle=async n=>{var r;const e=this.getPathInfo();if(!e)return;if(this.isExternal(e))switch(this.target){case"_self":window.location.href=e;return;case"_parent":window.parent.location.href=e;return;case"_top":window.top.location.href=e;return;default:window.open(e);return}const{path:t,query:s,hash:i}=E.getParams();if(t+s+i!==e)if(n.stopPropagation(),await((r=this.prepare)==null?void 0:r.call(this)),this.route)E.pushIgnoreCloseHandle(qe(T({},es(this.route,this.options)),{title:this.route.title||this.docTitle}));else if(this.href){const{pathname:a,search:c,hash:l}=new URL(e,location.origin);E.pushIgnoreCloseHandle({path:a,query:c,hash:l,title:this.docTitle})}else E.pushIgnoreCloseHandle({path:this.path,query:this.query,hash:this.hash,title:this.docTitle})},this.preventDefault=n=>{n.preventDefault()},this.tabIndex=0,this.addEventListener("click",this.clickHandle)}getPathInfo(){var n,e;if(this.route){const t=((n=this.options)==null?void 0:n.query)||"",s=((e=this.options)==null?void 0:e.hash)||"";return zt(this.route,this.options)+t+s}else{const t=this.href||this.path+this.query+this.hash,{path:s,query:i}=E.getParams();return t.startsWith("#")?`${s}${i}${t}`:t.startsWith("?")?`${s}${t}`:t.startsWith(".")?Ue(s,t):t}}isExternal(n){return!n.startsWith("/")}render(n=this.getPathInfo()){return N`
182
+ `:N`${n}`}},je=new WeakMap,at=new WeakMap,ot=new WeakMap,a.GemRouteElement.createLocationStore=()=>{const{path:n,query:e,data:t}=E.getParams();return F({path:n,query:e,data:t,params:{}})},a.GemRouteElement.findRoute=(n=[],e)=>{let t=null,s;n instanceof Array?s=n:s=Object.values(n);for(const i of s)if(i.pattern==="*")t=i;else{const r=zt(i.pattern,e);if(r)return{route:i,params:r}}return{route:t}},le([x],a.GemRouteElement.prototype,"routes",2),le([x],a.GemRouteElement.prototype,"locationStore",2),le([x],a.GemRouteElement.prototype,"key",2),le([Ie],a.GemRouteElement.prototype,"routechange",2),le([Ie],a.GemRouteElement.prototype,"loading",2),le([Ie],a.GemRouteElement.prototype,"error",2),a.GemRouteElement=le([oe(E.store)],a.GemRouteElement);class ns extends a.GemRouteElement{constructor(e={}){super(xe(C({},e),{isLight:!0}))}}var Gs=Object.defineProperty,Hs=Object.getOwnPropertyDescriptor,L=(n,e,t,s)=>{for(var i=s>1?void 0:s?Hs(e,t):e,r=n.length-1,o;r>=0;r--)(o=n[r])&&(i=(s?o(e,t,i):o(i))||i);return s&&i&&Gs(e,t,i),i};a.GemLinkElement=class extends A{constructor(){super();this.clickHandle=async n=>{var r;const e=this.getPathInfo();if(!e)return;if(this.isExternal(e))switch(this.target){case"_self":window.location.href=e;return;case"_parent":window.parent.location.href=e;return;case"_top":window.top.location.href=e;return;default:window.open(e);return}const{path:t,query:s,hash:i}=E.getParams();if(t+s+i!==e)if(n.stopPropagation(),await((r=this.prepare)==null?void 0:r.call(this)),this.route)E.pushIgnoreCloseHandle(xe(C({},ts(this.route,this.options)),{title:this.route.title||this.docTitle}));else if(this.href){const{pathname:o,search:c,hash:l}=new URL(e,location.origin);E.pushIgnoreCloseHandle({path:o,query:c,hash:l,title:this.docTitle})}else E.pushIgnoreCloseHandle({path:this.path,query:this.query,hash:this.hash,title:this.docTitle})},this.preventDefault=n=>{n.preventDefault()},this.tabIndex=0,this.addEventListener("click",this.clickHandle)}getPathInfo(){var n,e;if(this.route){const t=((n=this.options)==null?void 0:n.query)||"",s=((e=this.options)==null?void 0:e.hash)||"";return Ft(this.route,this.options)+t+s}else{const t=this.href||this.path+this.query+this.hash,{path:s,query:i}=E.getParams();return t.startsWith("#")?`${s}${i}${t}`:t.startsWith("?")?`${s}${t}`:t.startsWith(".")?Be(s,t):t}}isExternal(n){return!n.startsWith("/")}render(n=this.getPathInfo()){return N`
183
183
  <style>
184
184
  :host {
185
185
  /* link default style */
@@ -198,11 +198,11 @@ var ai=Object.defineProperty,ci=Object.defineProperties;var li=Object.getOwnProp
198
198
  <a
199
199
  part=${this.link}
200
200
  @click=${this.preventDefault}
201
- href=${Ot(this.hint==="off"?void 0:this.isExternal(n)?n:new URL(E.basePath+n,location.origin).toString())}
201
+ href=${Rt(this.hint==="off"?void 0:this.isExternal(n)?n:new URL(E.basePath+n,location.origin).toString())}
202
202
  >
203
203
  <slot></slot>
204
204
  </a>
205
- `}},L([k],o.GemLinkElement.prototype,"href",2),L([k],o.GemLinkElement.prototype,"target",2),L([k],o.GemLinkElement.prototype,"path",2),L([k],o.GemLinkElement.prototype,"query",2),L([k],o.GemLinkElement.prototype,"hash",2),L([k],o.GemLinkElement.prototype,"docTitle",2),L([k],o.GemLinkElement.prototype,"hint",2),L([q],o.GemLinkElement.prototype,"route",2),L([q],o.GemLinkElement.prototype,"options",2),L([q],o.GemLinkElement.prototype,"prepare",2),L([Dt],o.GemLinkElement.prototype,"link",2),o.GemLinkElement=L([oe(Ut)],o.GemLinkElement),o.GemActiveLinkElement=class extends o.GemLinkElement{render(){const{path:n,query:e,hash:t}=E.getParams(),s=this.pattern&&Kt(this.pattern,n),i=this.getPathInfo();return s||n+e+t===i?this.active=!0:this.active=!1,super.render(i)}},L([k],o.GemActiveLinkElement.prototype,"pattern",2),L([Ge],o.GemActiveLinkElement.prototype,"active",2),o.GemActiveLinkElement=L([oe(E.store)],o.GemActiveLinkElement),customElements.define("gem-link",o.GemLinkElement),customElements.define("gem-active-link",o.GemActiveLinkElement),customElements.define("gem-route",o.GemRouteElement),customElements.define("gem-light-route",ts);var Hs=Object.defineProperty,Is=Object.getOwnPropertyDescriptor,ns=(n,e,t,s)=>{for(var i=s>1?void 0:s?Is(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&Hs(e,t,i),i};o.GemTitleElement=class extends A{static setTitle(n){P(ae,{title:n})}static updateTitle(n="",e=""){const{title:t}=ae;t&&t!==o.GemTitleElement.defaultTitle?(o.GemTitleElement.title=t,document.title=o.GemTitleElement.title+e):n?(o.GemTitleElement.title=n,document.title=o.GemTitleElement.title+e):(o.GemTitleElement.title=o.GemTitleElement.defaultTitle,document.title=o.GemTitleElement.title)}constructor(){super();new MutationObserver(()=>this.update()).observe(this,{childList:!0,characterData:!0,subtree:!0})}render(){return o.GemTitleElement.updateTitle(this.textContent||"",this.suffix),this.hidden?N``:N`${o.GemTitleElement.title}`}},o.GemTitleElement.title=document.title,o.GemTitleElement.defaultTitle=document.title,o.GemTitleElement.defaultSuffix=` - ${document.title}`,ns([k],o.GemTitleElement.prototype,"suffix",2),o.GemTitleElement=ns([oe(ae)],o.GemTitleElement),se(ae,o.GemTitleElement.updateTitle),customElements.define("gem-title",o.GemTitleElement);var Vs=Object.defineProperty,Ws=Object.getOwnPropertyDescriptor,at=(n,e,t,s)=>{for(var i=s>1?void 0:s?Ws(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&Vs(e,t,i),i};const ss=new Map;class we extends A{getContent(){const e=this.element||(this.selector?(this.root||document).querySelector(this.selector):null);if(typeof e=="string"){let t=ss.get(e);return t||(t=document.createElement("template"),t.innerHTML=e,ss.set(e,t)),t.content.cloneNode(!0)}else return e instanceof HTMLTemplateElement?e.content.cloneNode(!0):e==null?void 0:e.cloneNode(!0)}render(){return N`
205
+ `}},L([k],a.GemLinkElement.prototype,"href",2),L([k],a.GemLinkElement.prototype,"target",2),L([k],a.GemLinkElement.prototype,"path",2),L([k],a.GemLinkElement.prototype,"query",2),L([k],a.GemLinkElement.prototype,"hash",2),L([k],a.GemLinkElement.prototype,"docTitle",2),L([k],a.GemLinkElement.prototype,"hint",2),L([x],a.GemLinkElement.prototype,"route",2),L([x],a.GemLinkElement.prototype,"options",2),L([x],a.GemLinkElement.prototype,"prepare",2),L([qt],a.GemLinkElement.prototype,"link",2),a.GemLinkElement=L([oe(Bt)],a.GemLinkElement),a.GemActiveLinkElement=class extends a.GemLinkElement{render(){const{path:n,query:e,hash:t}=E.getParams(),s=this.pattern&&zt(this.pattern,n),i=this.getPathInfo();return s||n+e+t===i?this.active=!0:this.active=!1,super.render(i)}},L([k],a.GemActiveLinkElement.prototype,"pattern",2),L([He],a.GemActiveLinkElement.prototype,"active",2),a.GemActiveLinkElement=L([oe(E.store)],a.GemActiveLinkElement),customElements.define("gem-link",a.GemLinkElement),customElements.define("gem-active-link",a.GemActiveLinkElement),customElements.define("gem-route",a.GemRouteElement),customElements.define("gem-light-route",ns);var Is=Object.defineProperty,Ws=Object.getOwnPropertyDescriptor,ss=(n,e,t,s)=>{for(var i=s>1?void 0:s?Ws(e,t):e,r=n.length-1,o;r>=0;r--)(o=n[r])&&(i=(s?o(e,t,i):o(i))||i);return s&&i&&Is(e,t,i),i};a.GemTitleElement=class extends A{static setTitle(n){T(ce,{title:n})}static updateTitle(n="",e=""){const{title:t}=ce;t&&t!==a.GemTitleElement.defaultTitle?(a.GemTitleElement.title=t,document.title=a.GemTitleElement.title+e):n?(a.GemTitleElement.title=n,document.title=a.GemTitleElement.title+e):(a.GemTitleElement.title=a.GemTitleElement.defaultTitle,document.title=a.GemTitleElement.title)}constructor(){super();new MutationObserver(()=>this.update()).observe(this,{childList:!0,characterData:!0,subtree:!0})}render(){return a.GemTitleElement.updateTitle(this.textContent||"",this.suffix),this.hidden?N``:N`${a.GemTitleElement.title}`}},a.GemTitleElement.title=document.title,a.GemTitleElement.defaultTitle=document.title,a.GemTitleElement.defaultSuffix=` - ${document.title}`,ss([k],a.GemTitleElement.prototype,"suffix",2),a.GemTitleElement=ss([oe(ce)],a.GemTitleElement),ie(ce,a.GemTitleElement.updateTitle),customElements.define("gem-title",a.GemTitleElement);var Vs=Object.defineProperty,js=Object.getOwnPropertyDescriptor,ct=(n,e,t,s)=>{for(var i=s>1?void 0:s?js(e,t):e,r=n.length-1,o;r>=0;r--)(o=n[r])&&(i=(s?o(e,t,i):o(i))||i);return s&&i&&Vs(e,t,i),i};const is=new Map;class Se extends A{getContent(){const e=this.element||(this.selector?(this.root||document).querySelector(this.selector):null);if(typeof e=="string"){let t=is.get(e);return t||(t=document.createElement("template"),t.innerHTML=e,is.set(e,t)),t.content.cloneNode(!0)}else return e instanceof HTMLTemplateElement?e.content.cloneNode(!0):e==null?void 0:e.cloneNode(!0)}render(){return N`
206
206
  <style>
207
207
  :host {
208
208
  position: relative;
@@ -218,7 +218,7 @@ var ai=Object.defineProperty,ci=Object.defineProperties;var li=Object.getOwnProp
218
218
  </style>
219
219
  ${this.getContent()}
220
220
  <slot></slot>
221
- `}}at([k],we.prototype,"selector",2),at([q],we.prototype,"root",2),at([q],we.prototype,"element",2),at([Ge],we.prototype,"active",2),customElements.define("gem-use",we);var js=Object.defineProperty,Ds=Object.getOwnPropertyDescriptor,is=(n,e,t,s)=>{for(var i=s>1?void 0:s?Ds(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&js(e,t,i),i};class ct extends A{constructor(){super();this.effect(()=>{this.shadowRoot&&(this.shadowRoot.innerHTML=`
221
+ `}}ct([k],Se.prototype,"selector",2),ct([x],Se.prototype,"root",2),ct([x],Se.prototype,"element",2),ct([He],Se.prototype,"active",2),customElements.define("gem-use",Se);var Ds=Object.defineProperty,qs=Object.getOwnPropertyDescriptor,rs=(n,e,t,s)=>{for(var i=s>1?void 0:s?qs(e,t):e,r=n.length-1,o;r>=0;r--)(o=n[r])&&(i=(s?o(e,t,i):o(i))||i);return s&&i&&Ds(e,t,i),i};class lt extends A{constructor(){super();this.effect(()=>{this.shadowRoot&&(this.shadowRoot.innerHTML=`
222
222
  <style>
223
223
  :host {
224
224
  display: contents;
@@ -226,4 +226,4 @@ var ai=Object.defineProperty,ci=Object.defineProperties;var li=Object.getOwnProp
226
226
  ${this.contentcss}
227
227
  </style>
228
228
  ${this.content}
229
- `)},()=>[this.content,this.contentcss])}render(){}}is([k],ct.prototype,"content",2),is([k],ct.prototype,"contentcss",2),customElements.define("gem-unsafe",ct);var qs=Object.defineProperty,xs=Object.getOwnPropertyDescriptor,Us=(n,e,t,s)=>{for(var i=s>1?void 0:s?xs(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&qs(e,t,i),i};document.querySelectorAll("[data-reflect]").forEach(n=>n.remove());class Ft extends A{constructor(){super({isLight:!0});this.target=document.head,this.hidden=!0,this.dataset.gemreflect="",this.effect(()=>{const e=[...this.childNodes];return e.forEach(t=>{t instanceof HTMLElement&&(t.dataset.reflect=""),this.target.append(t)}),()=>{e.forEach(t=>t.remove())}},()=>[this.target])}}Us([q],Ft.prototype,"target",2),customElements.define("gem-reflect",Ft);const lt=Symbol("open mark");function Bs(n){var e;return e=class extends A{constructor(){super();this.label="",this.internals.role="alertdialog",this.internals.ariaModal="true"}static get isOpen(){return this.store[lt]}static get observedStores(){return[E.store,this.store]}static open(t){const s=new this;this.instance=s,this.inertStore=[...document.body.children].filter(r=>!r.inert),this.inertStore.forEach(r=>r.inert=!0),document.body.append(s);const i=()=>P(this.store,T({[lt]:!0},t));setTimeout(()=>{i(),E.push({title:s.label,open:i,close:this.closeHandle.bind(this),shouldClose:this.shouldClose.bind(this)})},100)}static close(){E.back()}static closeHandle(){var t;this.inertStore.forEach(s=>s.inert=!1),(t=this.instance)==null||t.remove(),P(this.store,T({[lt]:!1},n))}static shouldClose(){return!0}},e.inertStore=[],e.instance=null,e.store=z(T({[lt]:!1},n)),e}var Ks=Object.defineProperty,zs=Object.getOwnPropertyDescriptor,Jt=(n,e,t,s)=>{for(var i=s>1?void 0:s?zs(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&Ks(e,t,i),i};o.GemDialogBaseElement=(ds=class extends A{constructor(){super();M(this,_e,void 0);M(this,ve,void 0);M(this,he,void 0);this.inert=!0,G(this,he,[]),this.closeHandle=()=>{var n;this.inert=!0,g(this,he).forEach(e=>e.inert=!1),g(this,_e)?g(this,_e).before(this):g(this,ve)&&((n=g(this,ve))==null||n.appendChild(this)),this.dispatchEvent(new CustomEvent("close")),this.opened=!1},this.openHandle=()=>{this.hidden=!1,this.inert=!1,G(this,_e,this.nextSibling),G(this,ve,this.parentElement||this.getRootNode()),G(this,he,[...document.body.children].filter(n=>!n.inert)),g(this,he).forEach(n=>n.inert=!0),document.body.append(this),this.dispatchEvent(new CustomEvent("open")),this.opened=!0},this.open=()=>{this.opened||(this.openHandle(),E.push({title:this.label,open:this.openHandle,close:this.closeHandle,shouldClose:this.shouldClose}))},this.close=()=>{E.back()},this.forceClose=()=>{this.opened=!1,setTimeout(this.close,100)},this.internals.role="dialog",this.internals.ariaModal="true"}shouldClose(){return!0}},_e=new WeakMap,ve=new WeakMap,he=new WeakMap,ds),Jt([k],o.GemDialogBaseElement.prototype,"label",2),Jt([Ge],o.GemDialogBaseElement.prototype,"opened",2),o.GemDialogBaseElement=Jt([oe(E.store)],o.GemDialogBaseElement);const Qt=new WeakMap;function rs(n){return Qt.get(n)}const Yt=new WeakMap;function Fs(n){return Yt.get(n)}function Js(n,e){const t=Qt.get(e),s=Yt.get(e),i=Object.keys(t).reduce((r,a)=>t[a]?r+`${s[a]}:${t[a]};`:r,"");n.textContent=`:root, :host {${i}}`}function Qs(n){const e=Me(),t=document.createElement("style"),s=z(n),i={},r={};Yt.set(i,r),Qt.set(i,s),Object.keys(s).forEach(c=>{r[c]=`--${I(c)}-${e}`,i[c]=`var(${r[c]})`});const a=()=>Js(t,i);return se(s,a),a(),(document.head||document.documentElement).append(t),i}function Ys(n,e){const t=rs(n);P(t,e)}const Zs=/\$\d(?:<[^>]*>)?/,Xs=/\$(\d)(<([^>]*)>)?/g,ei=3;function os(n,...e){const t=n.split(Zs),s=[];let i;for(;i=Xs.exec(n);){const r=i[ei],a=Number(i[1])-1,c=e[a];s.push(typeof c=="function"?c(r):c)}return N(t,...s)}const je=new Set,Zt=class{constructor(e){M(this,be);M(this,ut);M(this,dt);M(this,ue);M(this,Pe);if(this.cachePrefix="gem-i18n",!e.resources[e.fallbackLanguage])throw new K("i18n: fallbackLanguage invalid");this.store=z(this),Object.assign(this,e);let t=g(this,ut,di)||this.currentLanguage||g(this,dt,fi);const s=document.querySelector(`[type*=${this.cachePrefix}]`);if(s)try{const i=JSON.parse(s.textContent||"");t=i.currentLanguage,this.resources[i.currentLanguage]=i.currentLanguagePack}catch{}t?(G(this,Pe,t,nn),this.setLanguage(t)):this.resetLanguage()}get(e,...t){const s=this.resources[this.currentLanguage],i=this.resources[this.fallbackLanguage],r=s[e]||i[e],a=(r==null?void 0:r.message)||r||`[${e}]`;return t.length?os(a,...t):a}detectLanguage(){const e=Object.keys(this.resources),t=navigator.languages.map(s=>s.replace(/-(.*)/,i=>i.toUpperCase()));for(const s of t){const i=e.find(r=>r===s||s.startsWith(`${r}-`));if(i)return i}return this.fallbackLanguage}async setLanguage(e){g(this,ue,mt)&&je.forEach(async i=>await i.setLanguage(e));let t;const s=this.resources[e];if(!s)return console.warn(`${this.cachePrefix}: not found \`${e}\``),this.resetLanguage();if(typeof s=="string"){const i=`${this.cachePrefix}:`,r=`${i}${s}`,a=localStorage.getItem(r),c=async()=>{const l=await(await fetch(s)).json();if(this.cache){for(let h=0;h<localStorage.length;h++){const m=localStorage.key(h);m.startsWith(i)&&localStorage.removeItem(m)}localStorage.setItem(r,JSON.stringify(l))}return l};if(a)try{t=JSON.parse(a)}catch{t=await c()}else t=await c()}else t=s;return this.resources[e]=t,P(this.store,{}),e!==this.currentLanguage&&G(this,Pe,e,nn),this.cache===!0&&this.setCache(),e}resetLanguage(){return g(this,ue,mt)&&je.forEach(e=>e.resetLanguage()),G(this,Pe,this.fallbackLanguage,nn),this.cache&&localStorage.removeItem(g(this,be,tn)),this.setLanguage(this.detectLanguage())}setCache(){g(this,ue,mt)&&je.forEach(e=>e.setCache()),localStorage.setItem(g(this,be,tn),this.currentLanguage)}createSubModule(e,t){const s=new Zt({resources:t,cachePrefix:`${this.cachePrefix}-${e}`,currentLanguage:this.currentLanguage,fallbackLanguage:this.fallbackLanguage,cache:this.cache});return je.add(s),s}toJSON(){return{currentLanguage:this.currentLanguage,currentLanguagePack:this.resources[this.currentLanguage]}}};let as=Zt;be=new WeakSet,tn=function(){return`${this.cachePrefix}:current`},ut=new WeakSet,di=function(){const{hostname:e,pathname:t,search:s}=location,i=e.split(".");switch(this.urlParamsType){case"ccTLD":return i.pop();case"gTLD":return i.shift();case"path":return t.split("/")[1];default:const r=this.urlParamsName&&new URLSearchParams(s).get(this.urlParamsName)||"";return r in this.resources?r:""}},dt=new WeakSet,fi=function(){return this.cache&&localStorage.getItem(g(this,be,tn))||""},ue=new WeakSet,mt=function(){return!je.has(this)},Pe=new WeakSet,nn=function(e){var t;g(this,ue,mt)&&(document.documentElement.lang=e),this.currentLanguage=e,(t=this.onChange)==null||t.call(this,e)};const cs={headers:{"Content-Type":"application/json"}};async function De(n,e={}){const t=await fetch(n,T(T({},cs),e));if(t.status===0)throw new Error("Request fail");if(t.status>=500)throw new Error(t.statusText);try{const s=await t.json();if(t.status>=400)throw new Error((s==null?void 0:s.message)||t.statusText,{cause:s});return s}catch{throw new Error("Server error")}}const ti=Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)).constructor;function ls(n){return n instanceof FormData||n instanceof Blob||n instanceof ti||n instanceof URLSearchParams||n instanceof ReadableStream||n instanceof ArrayBuffer?n:typeof n=="object"?JSON.stringify(n):n}function hs(n,e){const{origin:t,pathname:s,search:i}=new URL(n,location.origin),r=new URLSearchParams(e).toString();return`${t}${s}${i?`${i}&`:r?"?":""}${r}`}function ni(n,e){return De(hs(n,e),{method:"GET"})}function si(n,e){return De(hs(n,e),{method:"DELETE"})}function ii(n,e){return De(n,{method:"PUT",body:ls(e)})}function ri(n,e){return De(n,{method:"POST",body:ls(e)})}const R=n=>window.matchMedia(n).matches,oi={PRINT:"print",get isPrint(){return R(this.PRINT)},HOVER:"(hover: hover)",get isHover(){return R(this.HOVER)},PHONE:"(min-width: 319px) and (max-width: 480px)",get isPhone(){return R(this.PHONE)},LAPTOP:"(min-width: 1023px) and (max-width: 1280px) and (orientation: landscape)",get isLaptop(){return R(this.LAPTOP)},DESKTOP:"(min-width: 1279px) and (orientation: landscape)",get isDesktop(){return R(this.DESKTOP)},WIDTHSCREEN:"(min-width: 1919px) and (orientation: landscape)",get isWidthScreen(){return R(this.WIDTHSCREEN)},PHONE_LANDSCAPE:"(min-width: 479px) and (max-width: 767px) and (orientation: landscape)",get isPhoneLandscape(){return R(this.PHONE_LANDSCAPE)},TABLET:"(min-width: 768px) and (max-width: 1024px)",get isTablet(){return R(this.TABLET)},SMALL_PHONE:"(min-width: 319px) and (max-width: 480px) and (max-height: 640px)",get isSmallPhone(){return R(this.SMALL_PHONE)},WATCH:"(max-width: 319px)",get isWatch(){return R(this.WATCH)},SHORT:"(min-width: 479px) and (max-height: 320px)",get isShort(){return R(this.SHORT)},PWA:"(display-mode: standalone)",get isPWA(){return R(this.PWA)},MOTION_REDUCE:"(prefers-reduced-motion: reduce)",get isMotionReduce(){return R(this.MOTION_REDUCE)},DATA_REDUCE:"(prefers-reduced-data: reduce)",get isDataReduce(){return R(this.DATA_REDUCE)}},us="1.6.16";window.__GEM_DEVTOOLS__HOOK__&&Object.assign(window.__GEM_DEVTOOLS__HOOK__,T({},f)),o.GemElement=A,o.GemError=K,o.GemLightRouteElement=ts,o.GemReflectElement=Ft,o.GemUnsafeElement=ct,o.GemUseElement=we,o.I18n=as,o.LinkedList=_t,o.PropProxyMap=vt,o.QueryString=fe,o.SVGTemplateResult=yt,o.SheetToken=Be,o.StoreListenerMap=ne,o.TemplateResult=ke,o.absoluteLocation=Ue,o.addMicrotask=H,o.addMicrotaskToStack=wn,o.adoptedStyle=qn,o.attribute=k,o.basePathStore=Ut,o.boolattribute=In,o.camelToKebabCase=I,o.classMap=Tt,o.cleanObject=Ne,o.connect=se,o.connectStore=oe,o.createCSSSheet=En,o.createHistoryParams=es,o.createModalClass=Bs,o.createPath=zt,o.createStore=z,o.createStoreSet=Tn,o.createTheme=Qs,o.css=Sn,o.customElement=Un,o.defaultReqInit=cs,o.defineAttribute=et,o.defineCSSState=nt,o.defineProperty=ye,o.defineRef=tt,o.del=si,o.directive=J,o.disconnect=kt,o.emitter=He,o.exportPartsMap=Cn,o.get=ni,o.getThemeProp=Fs,o.getThemeStore=rs,o.globalemitter=jn,o.guard=On,o.history=E,o.html=N,o.ifDefined=Ot,o.isArrayChange=Pt,o.kebabToCamelCase=pe,o.matchPath=Kt,o.mediaQuery=oi,o.nativeDefineElement=st,o.numattribute=Vn,o.objectMapToString=Oe,o.part=Dt,o.partMap=Pn,o.post=ri,o.property=q,o.put=ii,o.randomStr=Me,o.raw=me,o.refobject=Hn,o.removeItems=Ct,o.render=xe,o.repeat=Nn,o.request=De,o.rootElement=xn,o.slot=Wn,o.splice=os,o.state=Ge,o.styleMap=bn,o.styled=vn,o.svg=yn,o.titleStore=ae,o.updateStore=P,o.updateTheme=Ys,o.version=us,Object.defineProperty(o,"__esModule",{value:!0}),o[Symbol.toStringTag]="Module"});
229
+ `)},()=>[this.content,this.contentcss])}render(){}}rs([k],lt.prototype,"content",2),rs([k],lt.prototype,"contentcss",2),customElements.define("gem-unsafe",lt);var xs=Object.defineProperty,Us=Object.getOwnPropertyDescriptor,Bs=(n,e,t,s)=>{for(var i=s>1?void 0:s?Us(e,t):e,r=n.length-1,o;r>=0;r--)(o=n[r])&&(i=(s?o(e,t,i):o(i))||i);return s&&i&&xs(e,t,i),i};document.querySelectorAll("[data-reflect]").forEach(n=>n.remove());class Jt extends A{constructor(){super({isLight:!0});this.target=document.head,this.hidden=!0,this.dataset.gemreflect="",this.effect(()=>{const e=[...this.childNodes];return e.forEach(t=>{t instanceof HTMLElement&&(t.dataset.reflect=""),this.target.append(t)}),()=>{e.forEach(t=>t.remove())}},()=>[this.target])}}Bs([x],Jt.prototype,"target",2),customElements.define("gem-reflect",Jt);const ht=Symbol("open mark");function Ks(n){var e;return e=class extends A{constructor(){super();this.label="",this.internals.role="alertdialog",this.internals.ariaModal="true"}static get isOpen(){return this.store[ht]}static get observedStores(){return[E.store,this.store]}static open(t){const s=new this;this.instance=s,this.inertStore=[...document.body.children].filter(r=>!r.inert),this.inertStore.forEach(r=>r.inert=!0),document.body.append(s);const i=()=>T(this.store,C({[ht]:!0},t));setTimeout(()=>{i(),E.push({title:s.label,open:i,close:this.closeHandle.bind(this),shouldClose:this.shouldClose.bind(this)})},100)}static close(){E.back()}static closeHandle(){var t;this.inertStore.forEach(s=>s.inert=!1),(t=this.instance)==null||t.remove(),T(this.store,C({[ht]:!1},n))}static shouldClose(){return!0}},e.inertStore=[],e.instance=null,e.store=F(C({[ht]:!1},n)),e}var zs=Object.defineProperty,Fs=Object.getOwnPropertyDescriptor,Qt=(n,e,t,s)=>{for(var i=s>1?void 0:s?Fs(e,t):e,r=n.length-1,o;r>=0;r--)(o=n[r])&&(i=(s?o(e,t,i):o(i))||i);return s&&i&&zs(e,t,i),i};a.GemDialogBaseElement=(fs=class extends A{constructor(){super();M(this,ve,void 0);M(this,be,void 0);M(this,ue,void 0);this.inert=!0,G(this,ue,[]),this.closeHandle=()=>{var n;this.inert=!0,g(this,ue).forEach(e=>e.inert=!1),g(this,ve)?g(this,ve).before(this):g(this,be)&&((n=g(this,be))==null||n.appendChild(this)),this.dispatchEvent(new CustomEvent("close")),this.opened=!1},this.openHandle=()=>{this.hidden=!1,this.inert=!1,G(this,ve,this.nextSibling),G(this,be,this.parentElement||this.getRootNode()),G(this,ue,[...document.body.children].filter(n=>!n.inert)),g(this,ue).forEach(n=>n.inert=!0),document.body.append(this),this.dispatchEvent(new CustomEvent("open")),this.opened=!0},this.open=()=>{this.opened||(this.openHandle(),E.push({title:this.label,open:this.openHandle,close:this.closeHandle,shouldClose:this.shouldClose}))},this.close=()=>{E.back()},this.forceClose=()=>{this.opened=!1,setTimeout(this.close,100)},this.internals.role="dialog",this.internals.ariaModal="true"}shouldClose(){return!0}},ve=new WeakMap,be=new WeakMap,ue=new WeakMap,fs),Qt([k],a.GemDialogBaseElement.prototype,"label",2),Qt([He],a.GemDialogBaseElement.prototype,"opened",2),a.GemDialogBaseElement=Qt([oe(E.store)],a.GemDialogBaseElement);const Yt=new WeakMap;function as(n){return Yt.get(n)}const Zt=new WeakMap;function Js(n){return Zt.get(n)}function Qs(n,e){const t=Yt.get(e),s=Zt.get(e),i=Object.keys(t).reduce((r,o)=>!t[o]||!s[o]?r:r+`${s[o]}:${t[o]};`,"");n.textContent=`:root, :host {${i}}`}function Ys(n){const e=Ne(),t=document.createElement("style"),s=F(n),i={},r={};Zt.set(i,r),Yt.set(i,s),Object.keys(s).forEach(c=>{r[c]=`--${I(c)}-${e}`,i[c]=`var(${r[c]})`});const o=()=>Qs(t,i);return ie(s,o),o(),(document.head||document.documentElement).append(t),i}function Zs(n,e){const t=as(n);T(t,e)}const Xs=/\$\d(?:<[^>]*>)?/,ei=/\$(\d)(<([^>]*)>)?/g,ti=3;function os(n,...e){const t=n.split(Xs),s=[];let i;for(;i=ei.exec(n);){const r=i[ti],o=Number(i[1])-1,c=e[o];s.push(typeof c=="function"?c(r):c)}return N(t,...s)}const De=new Set,Xt=class{constructor(e){M(this,Pe);M(this,dt);M(this,ft);M(this,de);M(this,Te);if(this.cachePrefix="gem-i18n",!e.resources[e.fallbackLanguage])throw new z("i18n: fallbackLanguage invalid");this.store=F(this),Object.assign(this,e);let t=g(this,dt,fi)||this.currentLanguage||g(this,ft,mi);const s=document.querySelector(`[type*=${this.cachePrefix}]`);if(s)try{const i=JSON.parse(s.textContent||"");t=i.currentLanguage,this.resources[i.currentLanguage]=i.currentLanguagePack}catch{}t?(G(this,Te,t,sn),this.setLanguage(t)):this.resetLanguage()}get(e,...t){const s=this.resources[this.currentLanguage],i=this.resources[this.fallbackLanguage],r=s[e]||i[e],o=(r==null?void 0:r.message)||r||`[${e}]`;return t.length?os(o,...t):o}detectLanguage(){const e=Object.keys(this.resources),t=navigator.languages.map(s=>s.replace(/-(.*)/,i=>i.toUpperCase()));for(const s of t){const i=e.find(r=>r===s||s.startsWith(`${r}-`));if(i)return i}return this.fallbackLanguage}async setLanguage(e){g(this,de,pt)&&De.forEach(async i=>await i.setLanguage(e));let t;const s=this.resources[e];if(!s)return console.warn(`${this.cachePrefix}: not found \`${e}\``),this.resetLanguage();if(typeof s=="string"){const i=`${this.cachePrefix}:`,r=`${i}${s}`,o=localStorage.getItem(r),c=async()=>{const l=await(await fetch(s)).json();if(this.cache){for(let h=0;h<localStorage.length;h++){const m=localStorage.key(h);m.startsWith(i)&&localStorage.removeItem(m)}localStorage.setItem(r,JSON.stringify(l))}return l};if(o)try{t=JSON.parse(o)}catch{t=await c()}else t=await c()}else t=s;return this.resources[e]=t,T(this.store,{}),e!==this.currentLanguage&&G(this,Te,e,sn),this.cache===!0&&this.setCache(),e}resetLanguage(){return g(this,de,pt)&&De.forEach(e=>e.resetLanguage()),G(this,Te,this.fallbackLanguage,sn),this.cache&&localStorage.removeItem(g(this,Pe,nn)),this.setLanguage(this.detectLanguage())}setCache(){g(this,de,pt)&&De.forEach(e=>e.setCache()),localStorage.setItem(g(this,Pe,nn),this.currentLanguage)}createSubModule(e,t){const s=new Xt({resources:t,cachePrefix:`${this.cachePrefix}-${e}`,currentLanguage:this.currentLanguage,fallbackLanguage:this.fallbackLanguage,cache:this.cache});return De.add(s),s}toJSON(){return{currentLanguage:this.currentLanguage,currentLanguagePack:this.resources[this.currentLanguage]}}};let cs=Xt;Pe=new WeakSet,nn=function(){return`${this.cachePrefix}:current`},dt=new WeakSet,fi=function(){const{hostname:e,pathname:t,search:s}=location,i=e.split(".");switch(this.urlParamsType){case"ccTLD":return i.pop();case"gTLD":return i.shift();case"path":return t.split("/")[1];default:const r=this.urlParamsName&&new URLSearchParams(s).get(this.urlParamsName)||"";return r in this.resources?r:""}},ft=new WeakSet,mi=function(){return this.cache&&localStorage.getItem(g(this,Pe,nn))||""},de=new WeakSet,pt=function(){return!De.has(this)},Te=new WeakSet,sn=function(e){var t;g(this,de,pt)&&(document.documentElement.lang=e),this.currentLanguage=e,(t=this.onChange)==null||t.call(this,e)};const ls={headers:{"Content-Type":"application/json"}};async function qe(n,e={}){const t=await fetch(n,C(C({},ls),e));if(t.status===0)throw new Error("Request fail");if(t.status>=500)throw new Error(t.statusText);try{const s=await t.json();if(t.status>=400)throw new Error((s==null?void 0:s.message)||t.statusText,{cause:s});return s}catch{throw new Error("Server error")}}const ni=Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)).constructor;function hs(n){return n instanceof FormData||n instanceof Blob||n instanceof ni||n instanceof URLSearchParams||n instanceof ReadableStream||n instanceof ArrayBuffer?n:typeof n=="object"?JSON.stringify(n):n}function us(n,e){const{origin:t,pathname:s,search:i}=new URL(n,location.origin),r=new URLSearchParams(e).toString();return`${t}${s}${i?`${i}&`:r?"?":""}${r}`}function si(n,e){return qe(us(n,e),{method:"GET"})}function ii(n,e){return qe(us(n,e),{method:"DELETE"})}function ri(n,e){return qe(n,{method:"PUT",body:hs(e)})}function ai(n,e){return qe(n,{method:"POST",body:hs(e)})}const R=n=>window.matchMedia(n).matches,oi={PRINT:"print",get isPrint(){return R(this.PRINT)},HOVER:"(hover: hover)",get isHover(){return R(this.HOVER)},PHONE:"(min-width: 319px) and (max-width: 480px)",get isPhone(){return R(this.PHONE)},LAPTOP:"(min-width: 1023px) and (max-width: 1280px) and (orientation: landscape)",get isLaptop(){return R(this.LAPTOP)},DESKTOP:"(min-width: 1279px) and (orientation: landscape)",get isDesktop(){return R(this.DESKTOP)},WIDTHSCREEN:"(min-width: 1919px) and (orientation: landscape)",get isWidthScreen(){return R(this.WIDTHSCREEN)},PHONE_LANDSCAPE:"(min-width: 479px) and (max-width: 959px) and (orientation: landscape)",get isPhoneLandscape(){return R(this.PHONE_LANDSCAPE)},TABLET:"(min-width: 768px) and (max-width: 1024px)",get isTablet(){return R(this.TABLET)},SMALL_PHONE:"(min-width: 319px) and (max-width: 480px) and (max-height: 640px)",get isSmallPhone(){return R(this.SMALL_PHONE)},WATCH:"(max-width: 319px)",get isWatch(){return R(this.WATCH)},SHORT:"(min-width: 479px) and (max-height: 320px)",get isShort(){return R(this.SHORT)},PWA:"(display-mode: standalone)",get isPWA(){return R(this.PWA)},MOTION_REDUCE:"(prefers-reduced-motion: reduce)",get isMotionReduce(){return R(this.MOTION_REDUCE)},DATA_REDUCE:"(prefers-reduced-data: reduce)",get isDataReduce(){return R(this.DATA_REDUCE)}},ds="1.6.18";window.__GEM_DEVTOOLS__HOOK__&&Object.assign(window.__GEM_DEVTOOLS__HOOK__,C({},f)),a.GemElement=A,a.GemError=z,a.GemLightRouteElement=ns,a.GemReflectElement=Jt,a.GemUnsafeElement=lt,a.GemUseElement=Se,a.I18n=cs,a.LinkedList=vt,a.PropProxyMap=bt,a.QueryString=me,a.SVGTemplateResult=wt,a.SheetToken=Ke,a.StoreListenerMap=se,a.TemplateResult=Le,a.absoluteLocation=Be,a.addMicrotask=H,a.addMicrotaskToStack=Sn,a.adoptedStyle=xn,a.attribute=k,a.basePathStore=Bt,a.boolattribute=Wn,a.camelToKebabCase=I,a.classMap=kt,a.cleanObject=Oe,a.connect=ie,a.connectStore=oe,a.createCSSSheet=_n,a.createHistoryParams=ts,a.createModalClass=Ks,a.createPath=Ft,a.createStore=F,a.createStoreSet=kn,a.createTheme=Ys,a.css=En,a.customElement=Bn,a.defaultReqInit=ls,a.defineAttribute=tt,a.defineCSSState=st,a.defineProperty=we,a.defineRef=nt,a.del=ii,a.directive=Q,a.disconnect=Lt,a.emitter=Ie,a.exportPartsMap=Cn,a.get=si,a.getThemeProp=Js,a.getThemeStore=as,a.globalemitter=Dn,a.guard=Rn,a.history=E,a.html=N,a.ifDefined=Rt,a.isArrayChange=Tt,a.kebabToCamelCase=ge,a.matchPath=zt,a.mediaQuery=oi,a.nativeDefineElement=it,a.numattribute=Vn,a.objectMapToString=Re,a.part=qt,a.partMap=Tn,a.post=ai,a.property=x,a.put=ri,a.randomStr=Ne,a.raw=pe,a.refobject=In,a.removeItems=Ct,a.render=Ue,a.repeat=On,a.request=qe,a.rootElement=Un,a.slot=jn,a.splice=os,a.state=He,a.styleMap=Pn,a.styled=bn,a.svg=wn,a.titleStore=ce,a.updateStore=T,a.updateTheme=Zs,a.version=ds,Object.defineProperty(a,"__esModule",{value:!0}),a[Symbol.toStringTag]="Module"});
@@ -15,6 +15,7 @@ export declare function createModalClass<T extends Record<string, unknown>>(opti
15
15
  "__#3@#renderRoot": ShadowRoot | HTMLElement;
16
16
  "__#3@#internals"?: ElementInternals | undefined;
17
17
  "__#3@#isAppendReason"?: boolean | undefined;
18
+ "__#3@#isMounted"?: boolean | undefined;
18
19
  "__#3@#isAsync"?: boolean | undefined;
19
20
  "__#3@#effectList"?: {
20
21
  callback: (depValues: any, oldDepValues?: any) => any; /**
@@ -26,7 +27,7 @@ export declare function createModalClass<T extends Record<string, unknown>>(opti
26
27
  getDep?: (() => any) | undefined;
27
28
  preCallback?: (() => void) | undefined;
28
29
  }[] | undefined;
29
- "__#3@#momeList"?: {
30
+ "__#3@#memoList"?: {
30
31
  callback: (depValues: any, oldDepValues?: any) => any; /**
31
32
  * @final
32
33
  * UI 中执行关闭
@@ -1 +1 @@
1
- {"version":3,"file":"modal-factory.d.ts","sourceRoot":"","sources":["../../src/elements/base/modal-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mB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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBA/CgB,WAAW,EAAE;cACf,UAAU,GAAG,IAAI;IAClC;;;OAGG;;;;IAMH,YAAY;;IAKZ,YAAY;;;;IAKZ;;;;OAIG;eACe,GAAC;IAkBnB;;;OAGG;;IAKH;;;OAGG;;IAOH;;OAEG;;;;;;;;;;;;;EAaN"}
@@ -26,8 +26,8 @@ export const mediaQuery = {
26
26
  get isWidthScreen() {
27
27
  return matche(this.WIDTHSCREEN);
28
28
  },
29
- PHONE_LANDSCAPE: '(min-width: 479px) and (max-width: 767px) and (orientation: landscape)',
30
- // PHONE_LANDSCAPE: '(min-width: 481px) and (max-width: 767px)',
29
+ PHONE_LANDSCAPE: '(min-width: 479px) and (max-width: 959px) and (orientation: landscape)',
30
+ // PHONE_LANDSCAPE: '(min-width: 481px) and (max-width: 959px)',
31
31
  get isPhoneLandscape() {
32
32
  return matche(this.PHONE_LANDSCAPE);
33
33
  },
package/helper/theme.js CHANGED
@@ -12,7 +12,7 @@ function replaceStyle(style, theme) {
12
12
  const themeStore = themeStoreMap.get(theme);
13
13
  const themeProp = themePropMap.get(theme);
14
14
  const rules = Object.keys(themeStore).reduce((prev, key) => {
15
- if (!themeStore[key])
15
+ if (!themeStore[key] || !themeProp[key])
16
16
  return prev;
17
17
  return prev + `${themeProp[key]}:${themeStore[key]};`;
18
18
  }, '');
@@ -1 +1 @@
1
- {"version":3,"file":"theme.js","sourceRoot":"","sources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E,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,QAwC7E;AAGD,wBAAgB,cAAc,CAC5B,MAAM,EAAE,UAAU,EAClB,IAAI,EAAE,MAAM,EACZ,KAAK,CAAC,EAAE,MAAM,EACd,YAAY,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,QAkCxD;AAED,wBAAgB,SAAS,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,QA4BtE;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAkB7E;AAED,eAAO,MAAM,mBAAmB,KAA6C,CAAC"}
package/lib/element.js CHANGED
@@ -9,7 +9,7 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
9
9
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
10
10
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
11
11
  };
12
- var _GemElement_renderRoot, _GemElement_internals, _GemElement_isAppendReason, _GemElement_isAsync, _GemElement_effectList, _GemElement_momeList, _GemElement_unmountCallback, _GemElement_exec, _GemElement_execEffect, _GemElement_execMemo, _GemElement_initEffect, _GemElement_render, _GemElement_shouldUpdate, _GemElement_updateCallback, _GemElement_update, _GemElement_updated, _GemElement_connectedCallback;
12
+ var _GemElement_renderRoot, _GemElement_internals, _GemElement_isAppendReason, _GemElement_isMounted, _GemElement_isAsync, _GemElement_effectList, _GemElement_memoList, _GemElement_unmountCallback, _GemElement_exec, _GemElement_execEffect, _GemElement_execMemo, _GemElement_initEffect, _GemElement_render, _GemElement_shouldUpdate, _GemElement_updateCallback, _GemElement_update, _GemElement_updated, _GemElement_connectedCallback;
13
13
  import { html, render } from 'lit-html';
14
14
  import { connect, disconnect } from './store';
15
15
  import { LinkedList, addMicrotask, SheetToken, isArrayChange, GemError, kebabToCamelCase, PropProxyMap, removeItems, useNativeCSSStyleSheet, } from './utils';
@@ -44,9 +44,11 @@ export class GemElement extends HTMLElement {
44
44
  _GemElement_renderRoot.set(this, void 0);
45
45
  _GemElement_internals.set(this, void 0);
46
46
  _GemElement_isAppendReason.set(this, void 0);
47
+ // 和 isConnected 有区别
48
+ _GemElement_isMounted.set(this, void 0);
47
49
  _GemElement_isAsync.set(this, void 0);
48
50
  _GemElement_effectList.set(this, void 0);
49
- _GemElement_momeList.set(this, void 0);
51
+ _GemElement_memoList.set(this, void 0);
50
52
  _GemElement_unmountCallback.set(this, void 0);
51
53
  /**
52
54
  * @helper
@@ -84,7 +86,7 @@ export class GemElement extends HTMLElement {
84
86
  __classPrivateFieldGet(this, _GemElement_exec, "f").call(this, __classPrivateFieldGet(this, _GemElement_effectList, "f"));
85
87
  });
86
88
  _GemElement_execMemo.set(this, () => {
87
- __classPrivateFieldGet(this, _GemElement_exec, "f").call(this, __classPrivateFieldGet(this, _GemElement_momeList, "f"));
89
+ __classPrivateFieldGet(this, _GemElement_exec, "f").call(this, __classPrivateFieldGet(this, _GemElement_memoList, "f"));
88
90
  });
89
91
  /**
90
92
  * @helper
@@ -106,10 +108,10 @@ export class GemElement extends HTMLElement {
106
108
  callback,
107
109
  getDep,
108
110
  values: undefined,
109
- initialized: !!this.isConnected,
111
+ initialized: !!__classPrivateFieldGet(this, _GemElement_isMounted, "f"),
110
112
  };
111
113
  // 以挂载时立即执行副作用,未挂载时等挂载后执行
112
- if (this.isConnected) {
114
+ if (__classPrivateFieldGet(this, _GemElement_isMounted, "f")) {
113
115
  effectItem.values = getDep === null || getDep === void 0 ? void 0 : getDep();
114
116
  effectItem.preCallback = callback(effectItem.values);
115
117
  }
@@ -130,14 +132,14 @@ export class GemElement extends HTMLElement {
130
132
  * ```
131
133
  * */
132
134
  this.memo = (callback, getDep) => {
133
- if (!__classPrivateFieldGet(this, _GemElement_momeList, "f"))
134
- __classPrivateFieldSet(this, _GemElement_momeList, [], "f");
135
- __classPrivateFieldGet(this, _GemElement_momeList, "f").push({
135
+ if (!__classPrivateFieldGet(this, _GemElement_memoList, "f"))
136
+ __classPrivateFieldSet(this, _GemElement_memoList, [], "f");
137
+ __classPrivateFieldGet(this, _GemElement_memoList, "f").push({
136
138
  callback,
137
139
  getDep,
138
140
  values: [Symbol()],
139
141
  // 是否是 `willMount` 中定义
140
- initialized: this.isConnected,
142
+ initialized: !!__classPrivateFieldGet(this, _GemElement_isMounted, "f"),
141
143
  });
142
144
  };
143
145
  /**
@@ -174,7 +176,7 @@ export class GemElement extends HTMLElement {
174
176
  return this.shouldUpdate ? this.shouldUpdate() : true;
175
177
  });
176
178
  _GemElement_updateCallback.set(this, () => {
177
- if (this.isConnected && __classPrivateFieldGet(this, _GemElement_shouldUpdate, "f").call(this)) {
179
+ if (__classPrivateFieldGet(this, _GemElement_isMounted, "f") && __classPrivateFieldGet(this, _GemElement_shouldUpdate, "f").call(this)) {
178
180
  const temp = __classPrivateFieldGet(this, _GemElement_render, "f").call(this);
179
181
  temp !== undefined && render(temp, __classPrivateFieldGet(this, _GemElement_renderRoot, "f"));
180
182
  addMicrotask(__classPrivateFieldGet(this, _GemElement_updated, "f"));
@@ -213,6 +215,7 @@ export class GemElement extends HTMLElement {
213
215
  });
214
216
  const temp = __classPrivateFieldGet(this, _GemElement_render, "f").call(this);
215
217
  temp !== undefined && render(temp, __classPrivateFieldGet(this, _GemElement_renderRoot, "f"));
218
+ __classPrivateFieldSet(this, _GemElement_isMounted, true, "f");
216
219
  __classPrivateFieldSet(this, _GemElement_unmountCallback, (_b = this.mounted) === null || _b === void 0 ? void 0 : _b.call(this), "f");
217
220
  __classPrivateFieldGet(this, _GemElement_initEffect, "f").call(this);
218
221
  if (rootElement && ((_c = this.getRootNode().host) === null || _c === void 0 ? void 0 : _c.tagName) !== rootElement.toUpperCase()) {
@@ -223,7 +226,7 @@ export class GemElement extends HTMLElement {
223
226
  addMicrotask(() => (this[initSymbol] = false));
224
227
  this[initSymbol] = true;
225
228
  this[updateSymbol] = () => {
226
- if (this.isConnected) {
229
+ if (__classPrivateFieldGet(this, _GemElement_isMounted, "f")) {
227
230
  addMicrotask(__classPrivateFieldGet(this, _GemElement_update, "f"));
228
231
  }
229
232
  };
@@ -305,7 +308,7 @@ export class GemElement extends HTMLElement {
305
308
  * use `effect`
306
309
  */
307
310
  attributeChangedCallback() {
308
- if (this.isConnected) {
311
+ if (__classPrivateFieldGet(this, _GemElement_isMounted, "f")) {
309
312
  addMicrotask(__classPrivateFieldGet(this, _GemElement_update, "f"));
310
313
  }
311
314
  }
@@ -357,6 +360,7 @@ export class GemElement extends HTMLElement {
357
360
  __classPrivateFieldSet(this, _GemElement_isAppendReason, true, "f");
358
361
  return;
359
362
  }
363
+ __classPrivateFieldSet(this, _GemElement_isMounted, false, "f");
360
364
  const { observedStores } = this.constructor;
361
365
  observedStores === null || observedStores === void 0 ? void 0 : observedStores.forEach((store) => {
362
366
  disconnect(store, __classPrivateFieldGet(this, _GemElement_update, "f"));
@@ -366,10 +370,10 @@ export class GemElement extends HTMLElement {
366
370
  (_b = __classPrivateFieldGet(this, _GemElement_effectList, "f")) === null || _b === void 0 ? void 0 : _b.forEach((effectItem) => {
367
371
  execCallback(effectItem.preCallback);
368
372
  });
369
- __classPrivateFieldSet(this, _GemElement_momeList, (_c = __classPrivateFieldGet(this, _GemElement_momeList, "f")) === null || _c === void 0 ? void 0 : _c.filter(({ initialized }) => !initialized), "f");
373
+ __classPrivateFieldSet(this, _GemElement_memoList, (_c = __classPrivateFieldGet(this, _GemElement_memoList, "f")) === null || _c === void 0 ? void 0 : _c.filter(({ initialized }) => !initialized), "f");
370
374
  }
371
375
  }
372
- _GemElement_renderRoot = new WeakMap(), _GemElement_internals = new WeakMap(), _GemElement_isAppendReason = new WeakMap(), _GemElement_isAsync = new WeakMap(), _GemElement_effectList = new WeakMap(), _GemElement_momeList = new WeakMap(), _GemElement_unmountCallback = new WeakMap(), _GemElement_exec = new WeakMap(), _GemElement_execEffect = new WeakMap(), _GemElement_execMemo = new WeakMap(), _GemElement_initEffect = new WeakMap(), _GemElement_render = new WeakMap(), _GemElement_shouldUpdate = new WeakMap(), _GemElement_updateCallback = new WeakMap(), _GemElement_update = new WeakMap(), _GemElement_updated = new WeakMap(), _GemElement_connectedCallback = new WeakMap();
376
+ _GemElement_renderRoot = new WeakMap(), _GemElement_internals = new WeakMap(), _GemElement_isAppendReason = new WeakMap(), _GemElement_isMounted = new WeakMap(), _GemElement_isAsync = new WeakMap(), _GemElement_effectList = new WeakMap(), _GemElement_memoList = new WeakMap(), _GemElement_unmountCallback = new WeakMap(), _GemElement_exec = new WeakMap(), _GemElement_execEffect = new WeakMap(), _GemElement_execMemo = new WeakMap(), _GemElement_initEffect = new WeakMap(), _GemElement_render = new WeakMap(), _GemElement_shouldUpdate = new WeakMap(), _GemElement_updateCallback = new WeakMap(), _GemElement_update = new WeakMap(), _GemElement_updated = new WeakMap(), _GemElement_connectedCallback = new WeakMap();
373
377
  const gemElementProxyMap = new PropProxyMap();
374
378
  export function defineAttribute(target, prop, attr) {
375
379
  const { booleanAttributes, numberAttributes } = target.constructor;
@@ -1 +1 @@
1
- {"version":3,"file":"element.js","sourceRoot":"","sources":["../src/lib/element.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAkB,MAAM,UAAU,CAAC;AAIxD,OAAO,EAAE,OAAO,EAAE,UAAU,EAAS,MAAM,SAAS,CAAC;AACrD,OAAO,EACL,UAAU,EACV,YAAY,EAEZ,UAAU,EACV,aAAa,EACb,QAAQ,EACR,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,sBAAsB,GACvB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC3F,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AAC,CAAC;QAC1G,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,EAAE,gBAAgB,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;KACpF;IAED,mBAAmB,CAAC,IAAI,EAAE,GAA+B,EAAE,OAAO,CAAC,CAAC;AACtE,CAAC,CAAC"}
package/lib/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const version = "1.6.16";
1
+ export declare const version = "1.6.18";
2
2
  //# sourceMappingURL=version.d.ts.map
package/lib/version.js CHANGED
@@ -1,2 +1,2 @@
1
- export const version = '1.6.16';
1
+ export const version = '1.6.18';
2
2
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mantou/gem",
3
- "version": "1.6.16",
3
+ "version": "1.6.18",
4
4
  "description": "💎 使用自定义元素的轻量级 WebApp 开发框架",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -26,7 +26,7 @@
26
26
  "build:lib": "vite build",
27
27
  "build": "yarn build:module && yarn build:lib",
28
28
  "start": "yarn build:module --watch",
29
- "test": "wtr"
29
+ "test": "cross-env NODE_OPTIONS=--no-experimental-fetch wtr"
30
30
  },
31
31
  "keywords": [
32
32
  "web",
@@ -33,8 +33,8 @@ export const mediaQuery = {
33
33
  return matche(this.WIDTHSCREEN);
34
34
  },
35
35
 
36
- PHONE_LANDSCAPE: '(min-width: 479px) and (max-width: 767px) and (orientation: landscape)',
37
- // PHONE_LANDSCAPE: '(min-width: 481px) and (max-width: 767px)',
36
+ PHONE_LANDSCAPE: '(min-width: 479px) and (max-width: 959px) and (orientation: landscape)',
37
+ // PHONE_LANDSCAPE: '(min-width: 481px) and (max-width: 959px)',
38
38
  get isPhoneLandscape() {
39
39
  return matche(this.PHONE_LANDSCAPE);
40
40
  },
@@ -21,7 +21,7 @@ function replaceStyle(style: HTMLStyleElement, theme: Record<string, unknown>) {
21
21
  const themeStore = themeStoreMap.get(theme);
22
22
  const themeProp = themePropMap.get(theme);
23
23
  const rules = Object.keys(themeStore).reduce((prev, key) => {
24
- if (!themeStore[key]) return prev;
24
+ if (!themeStore[key] || !themeProp[key]) return prev;
25
25
  return prev + `${themeProp[key]}:${themeStore[key]};`;
26
26
  }, '');
27
27
  style.textContent = `:root, :host {${rules}}`;
@@ -106,9 +106,11 @@ export abstract class GemElement<T = Record<string, unknown>> extends HTMLElemen
106
106
  #renderRoot: HTMLElement | ShadowRoot;
107
107
  #internals?: ElementInternals;
108
108
  #isAppendReason?: boolean;
109
+ // 和 isConnected 有区别
110
+ #isMounted?: boolean;
109
111
  #isAsync?: boolean;
110
112
  #effectList?: EffectItem<any>[];
111
- #momeList?: EffectItem<any>[];
113
+ #memoList?: EffectItem<any>[];
112
114
  #unmountCallback?: any;
113
115
 
114
116
  constructor({ isAsync, isLight, delegatesFocus }: GemElementOptions = {}) {
@@ -118,7 +120,7 @@ export abstract class GemElement<T = Record<string, unknown>> extends HTMLElemen
118
120
  addMicrotask(() => ((this as any)[initSymbol] = false));
119
121
  (this as any)[initSymbol] = true;
120
122
  (this as any)[updateSymbol] = () => {
121
- if (this.isConnected) {
123
+ if (this.#isMounted) {
122
124
  addMicrotask(this.#update);
123
125
  }
124
126
  };
@@ -236,7 +238,7 @@ export abstract class GemElement<T = Record<string, unknown>> extends HTMLElemen
236
238
  };
237
239
 
238
240
  #execMemo = () => {
239
- this.#exec(this.#momeList);
241
+ this.#exec(this.#memoList);
240
242
  };
241
243
 
242
244
  /**
@@ -261,10 +263,10 @@ export abstract class GemElement<T = Record<string, unknown>> extends HTMLElemen
261
263
  callback,
262
264
  getDep,
263
265
  values: undefined,
264
- initialized: !!this.isConnected,
266
+ initialized: !!this.#isMounted,
265
267
  };
266
268
  // 以挂载时立即执行副作用,未挂载时等挂载后执行
267
- if (this.isConnected) {
269
+ if (this.#isMounted) {
268
270
  effectItem.values = getDep?.() as T;
269
271
  effectItem.preCallback = callback(effectItem.values);
270
272
  }
@@ -286,13 +288,13 @@ export abstract class GemElement<T = Record<string, unknown>> extends HTMLElemen
286
288
  * ```
287
289
  * */
288
290
  memo = <T = any[] | undefined>(callback: EffectCallback<T>, getDep?: T extends any[] ? () => [...T] : undefined) => {
289
- if (!this.#momeList) this.#momeList = [];
290
- this.#momeList.push({
291
+ if (!this.#memoList) this.#memoList = [];
292
+ this.#memoList.push({
291
293
  callback,
292
294
  getDep,
293
295
  values: [Symbol()],
294
296
  // 是否是 `willMount` 中定义
295
- initialized: this.isConnected,
297
+ initialized: !!this.#isMounted,
296
298
  });
297
299
  };
298
300
 
@@ -349,7 +351,7 @@ export abstract class GemElement<T = Record<string, unknown>> extends HTMLElemen
349
351
  };
350
352
 
351
353
  #updateCallback = () => {
352
- if (this.isConnected && this.#shouldUpdate()) {
354
+ if (this.#isMounted && this.#shouldUpdate()) {
353
355
  const temp = this.#render();
354
356
  temp !== undefined && render(temp, this.#renderRoot);
355
357
  addMicrotask(this.#updated);
@@ -392,7 +394,7 @@ export abstract class GemElement<T = Record<string, unknown>> extends HTMLElemen
392
394
  * use `effect`
393
395
  */
394
396
  attributeChangedCallback() {
395
- if (this.isConnected) {
397
+ if (this.#isMounted) {
396
398
  addMicrotask(this.#update);
397
399
  }
398
400
  }
@@ -409,6 +411,7 @@ export abstract class GemElement<T = Record<string, unknown>> extends HTMLElemen
409
411
  });
410
412
  const temp = this.#render();
411
413
  temp !== undefined && render(temp, this.#renderRoot);
414
+ this.#isMounted = true;
412
415
  this.#unmountCallback = this.mounted?.();
413
416
  this.#initEffect();
414
417
  if (rootElement && (this.getRootNode() as ShadowRoot).host?.tagName !== rootElement.toUpperCase()) {
@@ -465,6 +468,7 @@ export abstract class GemElement<T = Record<string, unknown>> extends HTMLElemen
465
468
  this.#isAppendReason = true;
466
469
  return;
467
470
  }
471
+ this.#isMounted = false;
468
472
  const { observedStores } = this.constructor as typeof GemElement;
469
473
  observedStores?.forEach((store) => {
470
474
  disconnect(store, this.#update);
@@ -474,7 +478,7 @@ export abstract class GemElement<T = Record<string, unknown>> extends HTMLElemen
474
478
  this.#effectList?.forEach((effectItem) => {
475
479
  execCallback(effectItem.preCallback);
476
480
  });
477
- this.#momeList = this.#momeList?.filter(({ initialized }) => !initialized);
481
+ this.#memoList = this.#memoList?.filter(({ initialized }) => !initialized);
478
482
  }
479
483
  }
480
484
 
@@ -1 +1 @@
1
- export const version = '1.6.16';
1
+ export const version = '1.6.18';
@@ -2,7 +2,7 @@ import { fixture, expect, nextFrame } from '@open-wc/testing';
2
2
 
3
3
  import { GemElement, html } from '../../lib/element';
4
4
  import { createStore, updateStore } from '../../lib/store';
5
- import { attribute, property, customElement, emitter, adoptedStyle } from '../../lib/decorators';
5
+ import { attribute, property, customElement, emitter, adoptedStyle, refobject, RefObject } from '../../lib/decorators';
6
6
  import { createCSSSheet, css } from '../../lib/utils';
7
7
 
8
8
  const store = createStore({
@@ -66,14 +66,22 @@ describe('没有 Shadow DOM 的 gem 元素', () => {
66
66
  });
67
67
  });
68
68
 
69
- @customElement('lifecycle-gem-demo')
70
69
  class LifecycleGemElement extends GemElement {
71
70
  @attribute appTitle = 'default';
72
71
  @attribute appTitle2 = 'default2';
72
+ @refobject divRef: RefObject<HTMLElement>;
73
+ refInConstructor?: HTMLElement;
74
+
73
75
  constructor(appTitle: string, appTitle2: string) {
74
76
  super();
75
77
  this.appTitle = appTitle;
76
78
  this.appTitle2 = appTitle2;
79
+ this.effect(
80
+ () => {
81
+ this.refInConstructor = this.divRef.element;
82
+ },
83
+ () => [],
84
+ );
77
85
  }
78
86
  renderCount = 0;
79
87
  mountedCount = 0;
@@ -92,12 +100,15 @@ class LifecycleGemElement extends GemElement {
92
100
 
93
101
  render() {
94
102
  this.renderCount++;
95
- return html``;
103
+ return html`<div ref=${this.divRef.ref}></div>`;
96
104
  }
97
105
  }
98
106
  describe('gem element 生命周期', () => {
99
107
  it('mounted/unmounted', async () => {
100
108
  const el: LifecycleGemElement = await fixture(html`<lifecycle-gem-demo></lifecycle-gem-demo>`);
109
+ // test #isMounted
110
+ customElements.define('lifecycle-gem-demo', LifecycleGemElement);
111
+ expect(!!el.refInConstructor).to.equal(true);
101
112
  expect(el.renderCount).to.equal(1);
102
113
  el.remove();
103
114
  expect(el.renderCount).to.equal(0);
@@ -247,7 +258,7 @@ describe('gem element Memo', () => {
247
258
  el.remove();
248
259
  await Promise.resolve();
249
260
  document.body.append(el);
250
- expect(el.memoCount).to.equal(8);
261
+ expect(el.memoCount).to.equal(9);
251
262
  });
252
263
  });
253
264
 
@@ -269,6 +280,7 @@ describe('gem element 继承', () => {
269
280
  expect(InheritGem.observedAttributes).to.eql(['app-title', 'app-title', 'app-title2']);
270
281
  });
271
282
  it('attr/prop/emitter 继承', async () => {
283
+ const name = window.name;
272
284
  const el: InheritGem = await fixture(html`<inherit-gem></inherit-gem>`);
273
285
  expect(el.appTitle).to.equal('1');
274
286
  expect(el.appData.a).to.equal(1);
@@ -280,7 +292,7 @@ describe('gem element 继承', () => {
280
292
  window.name += '2';
281
293
  });
282
294
  el.sayHi();
283
- expect(window.name).to.equal('21');
295
+ expect(window.name).to.equal(name + '21');
284
296
  });
285
297
  });
286
298
  @customElement('render-empty')