@mantou/gem 1.7.0 → 1.7.1

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.
Files changed (51) hide show
  1. package/dist/gem.es.js +65 -201
  2. package/dist/gem.umd.js +28 -30
  3. package/elements/base/dialog.d.ts +2 -0
  4. package/elements/base/dialog.d.ts.map +1 -1
  5. package/elements/base/dialog.js +2 -0
  6. package/elements/base/dialog.js.map +1 -1
  7. package/elements/base/gesture.js +1 -1
  8. package/elements/base/link.d.ts +3 -0
  9. package/elements/base/link.d.ts.map +1 -1
  10. package/elements/base/link.js +17 -4
  11. package/elements/base/link.js.map +1 -1
  12. package/elements/base/modal-factory.d.ts +7 -6
  13. package/elements/base/modal-factory.d.ts.map +1 -1
  14. package/elements/base/route.js +1 -1
  15. package/elements/base/unsafe.js +1 -1
  16. package/elements/base/use.d.ts.map +1 -1
  17. package/elements/base/use.js +1 -3
  18. package/elements/base/use.js.map +1 -1
  19. package/helper/i18n.d.ts +2 -2
  20. package/helper/i18n.d.ts.map +1 -1
  21. package/helper/i18n.js.map +1 -1
  22. package/helper/ssr-shim.d.ts +2 -0
  23. package/helper/ssr-shim.d.ts.map +1 -0
  24. package/helper/ssr-shim.js +29 -0
  25. package/helper/ssr-shim.js.map +1 -0
  26. package/index.d.ts +0 -10
  27. package/index.d.ts.map +1 -1
  28. package/index.js +0 -7
  29. package/index.js.map +1 -1
  30. package/lib/element.d.ts +12 -4
  31. package/lib/element.d.ts.map +1 -1
  32. package/lib/element.js +21 -15
  33. package/lib/element.js.map +1 -1
  34. package/lib/utils.js +1 -1
  35. package/lib/utils.js.map +1 -1
  36. package/lib/version.d.ts +1 -1
  37. package/lib/version.js +1 -1
  38. package/package.json +1 -1
  39. package/src/elements/base/dialog.ts +2 -0
  40. package/src/elements/base/gesture.ts +1 -1
  41. package/src/elements/base/link.ts +10 -4
  42. package/src/elements/base/route.ts +1 -1
  43. package/src/elements/base/unsafe.ts +1 -1
  44. package/src/elements/base/use.ts +1 -3
  45. package/src/helper/i18n.ts +3 -3
  46. package/src/helper/ssr-shim.ts +29 -0
  47. package/src/index.ts +0 -16
  48. package/src/lib/element.ts +33 -19
  49. package/src/lib/utils.ts +1 -1
  50. package/src/lib/version.ts +1 -1
  51. package/src/test/gem-element/decorators.test.ts +6 -6
package/dist/gem.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- var li=Object.defineProperty,hi=Object.defineProperties;var ui=Object.getOwnPropertyDescriptors;var ps=Object.getOwnPropertySymbols;var di=Object.prototype.hasOwnProperty,fi=Object.prototype.propertyIsEnumerable;var gs=(o,f,y)=>f in o?li(o,f,{enumerable:!0,configurable:!0,writable:!0,value:y}):o[f]=y,C=(o,f)=>{for(var y in f||(f={}))di.call(f,y)&&gs(o,y,f[y]);if(ps)for(var y of ps(f))fi.call(f,y)&&gs(o,y,f[y]);return o},xe=(o,f)=>hi(o,ui(f));var nn=(o,f,y)=>{if(!f.has(o))throw TypeError("Cannot "+y)};var g=(o,f,y)=>(nn(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,Z)=>(nn(o,f,"write to private field"),Z?Z.call(o,y):f.set(o,y),y);var pt=(o,f,y)=>(nn(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 se,ie,he,Ee,sn,ve,dt,_e,be,ue,ms,Pe,rn,ft,mi,mt,pi,de,gt,Te,on;"use strict";var f=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",get StoreListenerMap(){return re},get createStore(){return z},get createStoreSet(){return $n},get updateStore(){return T},get connect(){return oe},get disconnect(){return $t},get history(){return E},get titleStore(){return le},get basePathStore(){return Kt},get html(){return N},get svg(){return En},get render(){return Ue},get directive(){return Z},get TemplateResult(){return Le},get SVGTemplateResult(){return St},get repeat(){return An},get guard(){return Gn},get ifDefined(){return At},get GemElement(){return A},get defineAttribute(){return nt},get defineProperty(){return we},get defineRef(){return st},get defineCSSState(){return it},get nativeDefineElement(){return rt},get refobject(){return Wn},get attribute(){return k},get boolattribute(){return xt},get numattribute(){return jn},get property(){return x},get state(){return He},get slot(){return Dn},get part(){return Ut},get emitter(){return Ie},get globalemitter(){return qn},get adoptedStyle(){return Un},get connectStore(){return ce},get rootElement(){return Bn},get customElement(){return Fn},get addMicrotask(){return H},get addMicrotaskToStack(){return vn},get absoluteLocation(){return Be},get LinkedList(){return bt},get PropProxyMap(){return Pt},get QueryString(){return me},get raw(){return pe},get css(){return _n},get SheetToken(){return Fe},get useNativeCSSStyleSheet(){return o.useNativeCSSStyleSheet},get createCSSSheet(){return bn},get randomStr(){return Ne},get styled(){return Tn},get camelToKebabCase(){return I},get kebabToCamelCase(){return ge},get cleanObject(){return Oe},get GemError(){return K},get isArrayChange(){return Ct},get removeItems(){return kt},get objectMapToString(){return Re},get styleMap(){return Cn},get classMap(){return Lt},get partMap(){return kn},get exportPartsMap(){return Ln},get version(){return fs}});/**
1
+ var fi=Object.defineProperty,mi=Object.defineProperties;var pi=Object.getOwnPropertyDescriptors;var ss=Object.getOwnPropertySymbols;var gi=Object.prototype.hasOwnProperty,yi=Object.prototype.propertyIsEnumerable;var is=(o,f,y)=>f in o?fi(o,f,{enumerable:!0,configurable:!0,writable:!0,value:y}):o[f]=y,C=(o,f)=>{for(var y in f||(f={}))gi.call(f,y)&&is(o,y,f[y]);if(ss)for(var y of ss(f))yi.call(f,y)&&is(o,y,f[y]);return o},We=(o,f)=>mi(o,pi(f));var Jt=(o,f,y)=>{if(!f.has(o))throw TypeError("Cannot "+y)};var m=(o,f,y)=>(Jt(o,f,"read from private field"),y?y.call(o):f.get(o)),$=(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,Y)=>(Jt(o,f,"write to private field"),Y?Y.call(o,y):f.set(o,y),y);var mt=(o,f,y)=>(Jt(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 ie,re,ae,Ee,Qt,_e,ut,ce,pt,ts,Se,ve,le,ns,be,Yt,dt,wi,ft,Ei,he,gt,Pe,Zt;"use strict";var f=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",get GemElement(){return A},get defineAttribute(){return Xe},get defineProperty(){return pe},get defineRef(){return et},get defineCSSState(){return tt},get nativeDefineElement(){return nt},get html(){return N},get svg(){return fn},get render(){return je},get directive(){return Y},get TemplateResult(){return ke},get SVGTemplateResult(){return Et},get repeat(){return Cn},get guard(){return kn},get ifDefined(){return Nt}});/**
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 li=Object.defineProperty,hi=Object.defineProperties;var ui=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,Z=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,Y=n=>(...e)=>{const t=n(...e);return y.set(t,!0),t},Te=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 li=Object.defineProperty,hi=Object.defineProperties;var ui=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 an=typeof window!="undefined"&&window.customElements!=null&&window.customElements.polyfillWrapFlushCallback!==void 0,cn=(n,e,t=null,s=null)=>{for(;e!==t;){const i=e.nextSibling;n.insertBefore(e,s),e=i}},yt=(n,e,t=null)=>{for(;e!==t;){const s=e.nextSibling;n.removeChild(e),e=s}};/**
25
+ */const Xt=typeof window!="undefined"&&window.customElements!=null&&window.customElements.polyfillWrapFlushCallback!==void 0,en=(n,e,t=null,s=null)=>{for(;e!==t;){const i=e.nextSibling;n.insertBefore(e,s),e=i}},yt=(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
@@ -34,7 +34,7 @@ var li=Object.defineProperty,hi=Object.defineProperties;var ui=Object.getOwnProp
34
34
  * Code distributed by Google as part of the polymer project is also
35
35
  * subject to an additional IP rights grant found at
36
36
  * http://polymer.github.io/PATENTS.txt
37
- */const D={},ln={};/**
37
+ */const W={},tn={};/**
38
38
  * @license
39
39
  * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
40
40
  * This code may only be used under the BSD style license found at
@@ -46,7 +46,7 @@ var li=Object.defineProperty,hi=Object.defineProperties;var ui=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 X=`{{lit-${String(Math.random()).slice(2)}}}`,hn=`<!--${X}-->`,un=new RegExp(`${X}|${hn}`),ke="$lit$";class ys{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 d=r.nextNode();if(d===null){r.currentNode=i.pop();continue}if(c++,d.nodeType===1){if(d.hasAttributes()){const $=d.attributes,{length:w}=$;let S=0;for(let p=0;p<w;p++)dn($[p].name,ke)&&S++;for(;S-- >0;){const p=h[l],v=wt.exec(p)[2],b=v.toLowerCase()+ke,B=d.getAttribute(b);d.removeAttribute(b);const j=B.split(un);this.parts.push({type:"attribute",index:c,name:v,strings:j}),l+=j.length-1}}d.tagName==="TEMPLATE"&&(i.push(d),r.currentNode=d.content)}else if(d.nodeType===3){const $=d.data;if($.indexOf(X)>=0){const w=d.parentNode,S=$.split(un),p=S.length-1;for(let v=0;v<p;v++){let b,B=S[v];if(B==="")b=F();else{const j=wt.exec(B);j!==null&&dn(j[2],ke)&&(B=B.slice(0,j.index)+j[1]+j[2].slice(0,-ke.length)+j[3]),b=document.createTextNode(B)}w.insertBefore(b,d),this.parts.push({type:"node",index:++c})}S[p]===""?(w.insertBefore(F(),d),s.push(d)):d.data=S[p],l+=p}}else if(d.nodeType===8)if(d.data===X){const $=d.parentNode;(d.previousSibling===null||c===a)&&(c++,$.insertBefore(F(),d)),a=c,this.parts.push({type:"node",index:c}),d.nextSibling===null?d.data="":(s.push(d),c--),l++}else{let $=-1;for(;($=d.data.indexOf(X,$+1))!==-1;)this.parts.push({type:"node",index:-1}),l++}}for(const d of s)d.parentNode.removeChild(d)}}const dn=(n,e)=>{const t=n.length-e.length;return t>=0&&n.slice(t)===e},ws=n=>n.index!==-1,F=()=>document.createComment(""),wt=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;/**
49
+ */const Z=`{{lit-${String(Math.random()).slice(2)}}}`,nn=`<!--${Z}-->`,sn=new RegExp(`${Z}|${nn}`),Ce="$lit$";class rs{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:p}}=e;for(;l<p;){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 E=0;for(let g=0;g<w;g++)rn(_[g].name,Ce)&&E++;for(;E-- >0;){const g=h[l],v=wt.exec(g)[2],P=v.toLowerCase()+Ce,B=u.getAttribute(P);u.removeAttribute(P);const V=B.split(sn);this.parts.push({type:"attribute",index:c,name:v,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(Z)>=0){const w=u.parentNode,E=_.split(sn),g=E.length-1;for(let v=0;v<g;v++){let P,B=E[v];if(B==="")P=F();else{const V=wt.exec(B);V!==null&&rn(V[2],Ce)&&(B=B.slice(0,V.index)+V[1]+V[2].slice(0,-Ce.length)+V[3]),P=document.createTextNode(B)}w.insertBefore(P,u),this.parts.push({type:"node",index:++c})}E[g]===""?(w.insertBefore(F(),u),s.push(u)):u.data=E[g],l+=g}}else if(u.nodeType===8)if(u.data===Z){const _=u.parentNode;(u.previousSibling===null||c===a)&&(c++,_.insertBefore(F(),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(Z,_+1))!==-1;)this.parts.push({type:"node",index:-1}),l++}}for(const u of s)u.parentNode.removeChild(u)}}const rn=(n,e)=>{const t=n.length-e.length;return t>=0&&n.slice(t)===e},os=n=>n.index!==-1,F=()=>document.createComment(""),wt=/([ \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 li=Object.defineProperty,hi=Object.defineProperties;var ui=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 fn{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=an?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],!ws(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 an&&(document.adoptNode(e),customElements.upgrade(e)),e}}/**
61
+ */class on{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=Xt?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],!os(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 Xt&&(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 li=Object.defineProperty,hi=Object.defineProperties;var ui=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 mn=window.trustedTypes&&trustedTypes.createPolicy("lit-html",{createHTML:n=>n}),Ss=` ${X} `;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],a=r.lastIndexOf("<!--");s=(a>-1||s)&&r.indexOf("-->",a+1)===-1;const c=wt.exec(r);c===null?t+=r+(s?Ss:hn):t+=r.substr(0,c.index)+c[1]+c[2]+ke+c[3]+X}return t+=this.strings[e],t}getTemplateElement(){const e=document.createElement("template");let t=this.getHTML();return mn!==void 0&&(t=mn.createHTML(t)),e.innerHTML=t,e}}class St extends Le{getHTML(){return`<svg>${super.getHTML()}</svg>`}getTemplateElement(){const e=super.getTemplateElement(),t=e.content,s=t.firstChild;return t.removeChild(s),cn(t,s.firstChild),e}}/**
73
+ */const an=window.trustedTypes&&trustedTypes.createPolicy("lit-html",{createHTML:n=>n}),as=` ${Z} `;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=wt.exec(r);c===null?t+=r+(s?as:nn):t+=r.substr(0,c.index)+c[1]+c[2]+Ce+c[3]+Z}return t+=this.strings[e],t}getTemplateElement(){const e=document.createElement("template");let t=this.getHTML();return an!==void 0&&(t=an.createHTML(t)),e.innerHTML=t,e}}class Et extends ke{getHTML(){return`<svg>${super.getHTML()}</svg>`}getTemplateElement(){const e=super.getTemplateElement(),t=e.content,s=t.firstChild;return t.removeChild(s),en(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 li=Object.defineProperty,hi=Object.defineProperties;var ui=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 Et=n=>n===null||!(typeof n=="object"||typeof n=="function"),vt=n=>Array.isArray(n)||!!(n&&n[Symbol.iterator]);class pn{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"||!vt(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(Et(c)||!vt(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!==D&&(!Et(e)||e!==this.value)&&(this.value=e,Ce(e)||(this.committer.dirty=!0))}commit(){for(;Ce(this.value);){const e=this.value;this.value=D,e(this)}this.value!==D&&this.committer.commit()}}class fe{constructor(e){this.value=void 0,this.__pendingValue=void 0,this.options=e}appendInto(e){this.startNode=e.appendChild(F()),this.endNode=e.appendChild(F())}insertAfterNode(e){this.startNode=e,this.endNode=e.nextSibling}appendIntoPart(e){e.__insert(this.startNode=F()),e.__insert(this.endNode=F())}insertAfterPart(e){e.__insert(this.startNode=F()),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=D,t(this)}const e=this.__pendingValue;e!==D&&(Et(e)?e!==this.value&&this.__commitText(e):e instanceof Le?this.__commitTemplateResult(e):e instanceof Node?this.__commitNode(e):vt(e)?this.__commitIterable(e):e===ln?(this.value=ln,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 fn&&this.value.template===t)this.value.update(e.values);else{const s=new fn(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){yt(this.startNode.parentNode,e.nextSibling,this.endNode)}}class Es{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=D,t(this)}if(this.__pendingValue===D)return;const e=!!this.__pendingValue;this.value!==e&&(e?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=e),this.__pendingValue=D}}class vs extends pn{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 gn=!1;(()=>{try{const n={get capture(){return gn=!0,!1}};window.addEventListener("test",n,n),window.removeEventListener("test",n,n)}catch{}})();class bs{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=D,r(this)}if(this.__pendingValue===D)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=Ps(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=D}handleEvent(e){typeof this.value=="function"?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}}const Ps=n=>n&&(gn?{capture:n.capture,passive:n.passive,once:n.once}:n.capture);/**
85
+ */const _t=n=>n===null||!(typeof n=="object"||typeof n=="function"),St=n=>Array.isArray(n)||!!(n&&n[Symbol.iterator]);class cn{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 vt(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(_t(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 vt{constructor(e){this.value=void 0,this.committer=e}setValue(e){e!==W&&(!_t(e)||e!==this.value)&&(this.value=e,Te(e)||(this.committer.dirty=!0))}commit(){for(;Te(this.value);){const e=this.value;this.value=W,e(this)}this.value!==W&&this.committer.commit()}}class ue{constructor(e){this.value=void 0,this.__pendingValue=void 0,this.options=e}appendInto(e){this.startNode=e.appendChild(F()),this.endNode=e.appendChild(F())}insertAfterNode(e){this.startNode=e,this.endNode=e.nextSibling}appendIntoPart(e){e.__insert(this.startNode=F()),e.__insert(this.endNode=F())}insertAfterPart(e){e.__insert(this.startNode=F()),this.endNode=e.endNode,e.endNode=this.startNode}setValue(e){this.__pendingValue=e}commit(){if(this.startNode.parentNode===null)return;for(;Te(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=W,t(this)}const e=this.__pendingValue;e!==W&&(_t(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===tn?(this.value=tn,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 on&&this.value.template===t)this.value.update(e.values);else{const s=new on(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 ue(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){yt(this.startNode.parentNode,e.nextSibling,this.endNode)}}class cs{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(;Te(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=W,t(this)}if(this.__pendingValue===W)return;const e=!!this.__pendingValue;this.value!==e&&(e?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=e),this.__pendingValue=W}}class ls extends cn{constructor(e,t,s){super(e,t,s);this.single=s.length===2&&s[0]===""&&s[1]===""}_createPart(){return new hs(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}class hs extends vt{}let ln=!1;(()=>{try{const n={get capture(){return ln=!0,!1}};window.addEventListener("test",n,n),window.removeEventListener("test",n,n)}catch{}})();class us{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(;Te(this.__pendingValue);){const r=this.__pendingValue;this.__pendingValue=W,r(this)}if(this.__pendingValue===W)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=ds(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=W}handleEvent(e){typeof this.value=="function"?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}}const ds=n=>n&&(ln?{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 li=Object.defineProperty,hi=Object.defineProperties;var ui=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 Ts{handleAttributeExpressions(e,t,s,i){const r=t[0];return r==="."?new vs(e,t.slice(1),s).parts:r==="@"?[new bs(e,t.slice(1),i.eventContext)]:r==="?"?[new Es(e,t.slice(1),s)]:new pn(e,t,s).parts}handleTextExpression(e){return new fe(e)}}const yn=new Ts;/**
97
+ */class fs{handleAttributeExpressions(e,t,s,i){const r=t[0];return r==="."?new ls(e,t.slice(1),s).parts:r==="@"?[new us(e,t.slice(1),i.eventContext)]:r==="?"?[new cs(e,t.slice(1),s)]:new cn(e,t,s).parts}handleTextExpression(e){return new ue(e)}}const hn=new fs;/**
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 li=Object.defineProperty,hi=Object.defineProperties;var ui=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 Cs(n){let e=wn.get(n.type);e===void 0&&(e={stringsArray:new WeakMap,keyString:new Map},wn.set(n.type,e));let t=e.stringsArray.get(n.strings);if(t!==void 0)return t;const s=n.strings.join(X);return t=e.keyString.get(s),t===void 0&&(t=new ys(n,n.getTemplateElement()),e.keyString.set(s,t)),e.stringsArray.set(n.strings,t),t}const wn=new Map;/**
109
+ */function ms(n){let e=un.get(n.type);e===void 0&&(e={stringsArray:new WeakMap,keyString:new Map},un.set(n.type,e));let t=e.stringsArray.get(n.strings);if(t!==void 0)return t;const s=n.strings.join(Z);return t=e.keyString.get(s),t===void 0&&(t=new rs(n,n.getTemplateElement()),e.keyString.set(s,t)),e.stringsArray.set(n.strings,t),t}const un=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 li=Object.defineProperty,hi=Object.defineProperties;var ui=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 Sn=new WeakMap,Ue=(n,e,t)=>{let s=Sn.get(e);s===void 0&&(yt(e,e.firstChild),Sn.set(e,s=new fe(Object.assign({templateFactory:Cs},t))),s.appendInto(e)),s.setValue(n),s.commit()};/**
121
+ */const dn=new WeakMap,je=(n,e,t)=>{let s=dn.get(e);s===void 0&&(yt(e,e.firstChild),dn.set(e,s=new ue(Object.assign({templateFactory:ms},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 li=Object.defineProperty,hi=Object.defineProperties;var ui=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 Le(n,e,"html",yn),En=(n,...e)=>new St(n,e,"svg",yn),$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 ks(){for(let n=Me.length-1;n>=0;n--)Me[n]();Me.length=0}function vn(n){Me.length||H(ks),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 bt extends(globalThis.EventTarget||Object){constructor(){super(...arguments);M(this,Ee);M(this,se,void 0);M(this,ie,void 0);M(this,he,void 0);G(this,se,new Map)}get size(){return g(this,se).size}add(e){g(this,he)||this.dispatchEvent(new CustomEvent("start"));const t=pt(this,Ee,sn).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,ie)||G(this,ie,t),g(this,se).set(e,t)}delete(e){const t=pt(this,Ee,sn).call(this,e);return g(this,ie)||this.dispatchEvent(new CustomEvent("end")),t}get(){const e=g(this,ie);if(!!e)return pt(this,Ee,sn).call(this,e.value),e.value}}se=new WeakMap,ie=new WeakMap,he=new WeakMap,Ee=new WeakSet,sn=function(e){const t=g(this,se).get(e);return t&&(t.prev?t.prev.next=t.next:G(this,ie,t.next),t.next?t.next.prev=t.prev:G(this,he,t.prev),g(this,se).delete(e)),t};class Pt 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,ve,e=>typeof e=="string"?e:JSON.stringify(e));M(this,dt,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,ve).call(this,i))})}setAny(e,t){if(Array.isArray(t))this.delete(e),t.forEach(s=>this.append(e,g(this,ve).call(this,s)));else{const s=g(this,ve).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,dt).call(this,t))}toString(){const e=super.toString();return e?`?${e}`:""}toJSON(){return this.toString()}}ve=new WeakMap,dt=new WeakMap;function pe(n,...e){return n.reduce((t,s,i)=>{var r;return t+((r=e[i-1])!=null?r:"")+s})}function _n(n,...e){return pe(n,...e)}const Fe=Symbol.for("gem@sheetToken");o.useNativeCSSStyleSheet=!0;let Tt=window.CSSStyleSheet;try{new Tt}catch{o.useNativeCSSStyleSheet=!1,Tt=class{constructor(){this.media={mediaText:""},this.style="",this.replaceSync=n=>this.style=n}}}function bn(n,e=""){const t=new Tt,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[Fe]=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 Ls=new RegExp(`&.*{((.|
134
- )*)}`,"g");function Pn(n,e){const t=[];let s=`& {${n.replace(Ls,i=>(t.push(i),""))}}`+t.join("");return s=s.replace(/&/g,e==="class"?".&":"#&"),{styledContent:s,type:e}}const Tn={class:(n,...e)=>{const t=pe(n,...e);return Pn(t,"class")},id:(n,...e)=>{const t=pe(n,...e);return Pn(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 K extends Error{constructor(e){super(e);this.message=`gem: ${this.message}`}}function Ct(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 kt(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 Cn(n){return Re(n,";",(e,t)=>t!==void 0?`${I(e)}:${t}`:"")}function Lt(n){return Re(n," ",(e,t)=>t?e:"")}const kn=Lt;function Ln(n){return Re(n,",",(e,t)=>t!==void 0?`${e}:${t}`:"")}const re=new WeakMap;function z(n){if(re.has(n))throw new K("argument error");return re.set(n,new Set),n}function $n(n){return Object.keys(n).forEach(t=>{z(n[t])}),n}function T(n,e){Object.assign(n,e);const t=re.get(n);t==null||t.forEach(s=>{H(s)})}function oe(n,e){const t=re.get(n);t==null||t.add(e)}function $t(n,e){const t=re.get(n);t==null||t.delete(e)}/**
133
+ */typeof window!="undefined"&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.4.1");const N=(n,...e)=>new ke(n,e,"html",hn),fn=(n,...e)=>new Et(n,e,"svg",hn),Le=new Set;function j(n){typeof n=="function"&&(Le.size||globalThis.queueMicrotask(()=>{Le.forEach(e=>e()),Le.clear()}),Le.delete(n),Le.add(n))}const $e=[];function ps(){for(let n=$e.length-1;n>=0;n--)$e[n]();$e.length=0}function gs(n){$e.length||j(ps),$e.push(n)}function bt(n="",e=""){const{pathname:t,search:s,hash:i}=new URL(e,location.origin+n);return t+s+i}class mn extends(globalThis.EventTarget||Object){constructor(){super(...arguments);$(this,Ee);$(this,ie,void 0);$(this,re,void 0);$(this,ae,void 0);G(this,ie,new Map)}get size(){return m(this,ie).size}add(e){m(this,ae)||this.dispatchEvent(new CustomEvent("start"));const t=mt(this,Ee,Qt).call(this,e)||{value:e};t.prev=m(this,ae),t.prev&&(t.prev.next=t),t.next=void 0,G(this,ae,t),m(this,re)||G(this,re,t),m(this,ie).set(e,t)}delete(e){const t=mt(this,Ee,Qt).call(this,e);return m(this,re)||this.dispatchEvent(new CustomEvent("end")),t}get(){const e=m(this,re);if(!!e)return mt(this,Ee,Qt).call(this,e.value),e.value}}ie=new WeakMap,re=new WeakMap,ae=new WeakMap,Ee=new WeakSet,Qt=function(e){const t=m(this,ie).get(e);return t&&(t.prev?t.prev.next=t.next:G(this,re,t.next),t.next?t.next.prev=t.prev:G(this,ae,t.prev),m(this,ie).delete(e)),t};class pn extends WeakMap{get(e){let t=super.get(e);return t||(t={},this.set(e,t)),t}}class Ne extends URLSearchParams{constructor(e){super(e);$(this,_e,e=>typeof e=="string"?e:JSON.stringify(e));$(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,m(this,_e).call(this,i))})}setAny(e,t){if(Array.isArray(t))this.delete(e),t.forEach(s=>this.append(e,m(this,_e).call(this,s)));else{const s=m(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=>m(this,ut).call(this,t))}toString(){const e=super.toString();return e?`?${e}`:""}toJSON(){return this.toString()}}_e=new WeakMap,ut=new WeakMap;function Me(n,...e){return n.reduce((t,s,i)=>{var r;return t+((r=e[i-1])!=null?r:"")+s})}function ys(n,...e){return Me(n,...e)}const Pt=Symbol.for("gem@sheetToken");o.useNativeCSSStyleSheet=!0;let Tt=globalThis.CSSStyleSheet;try{new Tt}catch{o.useNativeCSSStyleSheet=!1,Tt=class{constructor(){this.media={mediaText:""},this.style="",this.replaceSync=n=>this.style=n}}}function ws(n,e=""){const t=new Tt,s={};t.media.mediaText=e;let i="";return typeof n=="string"?i=n:Object.keys(n).forEach(r=>{s[r]=`${r}-${De()}`,i+=n[r].styledContent.replace(/&/g,s[r])}),t.replaceSync(i),s[Pt]=t,s}function De(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 Es=new RegExp(`&.*{((.|
134
+ )*)}`,"g");function gn(n,e){const t=[];let s=`& {${n.replace(Es,i=>(t.push(i),""))}}`+t.join("");return s=s.replace(/&/g,e==="class"?".&":"#&"),{styledContent:s,type:e}}const _s={class:(n,...e)=>{const t=Me(n,...e);return gn(t,"class")},id:(n,...e)=>{const t=Me(n,...e);return gn(t,"id")},keyframes:(n,...e)=>({styledContent:`@keyframes & {${Me(n,...e)}}`,type:"keyframes"})};function D(n){return n.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function X(n){return n.replace(/-(.)/g,(e,t)=>t.toUpperCase())}function qe(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 yn(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 wn(n,e){const t=new Set(e);return n.filter(s=>t.has(s)?(t.delete(s),!1):!0)}function xe(n,e,t){let s=e;for(const i in n){const r=t(i,n[i]);s+=r?r+e:""}return s}function Ss(n){return xe(n,";",(e,t)=>t!==void 0?`${D(e)}:${t}`:"")}function En(n){return xe(n," ",(e,t)=>t?e:"")}const vs=En;function bs(n){return xe(n,",",(e,t)=>t!==void 0?`${e}:${t}`:"")}const de=new WeakMap;function J(n){if(de.has(n))throw new K("argument error");return de.set(n,new Set),n}function Ps(n){return Object.keys(n).forEach(t=>{J(n[t])}),n}function k(n,e){Object.assign(n,e);const t=de.get(n);t==null||t.forEach(s=>{j(s)})}function fe(n,e){const t=de.get(n);t==null||t.add(e)}function _n(n,e){const t=de.get(n);t==null||t.delete(e)}const Sn="1.7.1";var Ts=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",version:Sn});/**
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 li=Object.defineProperty,hi=Object.defineProperties;var ui=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 Mn=(n,e)=>{const t=n.startNode.parentNode,s=e===void 0?n.endNode:e.startNode,i=t.insertBefore(F(),s);t.insertBefore(F(),s);const r=new fe(n.options);return r.insertAfterNode(i),r},ae=(n,e)=>(n.setValue(e),n.commit(),n),Mt=(n,e,t)=>{const s=n.startNode.parentNode,i=t?t.startNode:n.endNode,r=e.endNode.nextSibling;r!==i&&cn(s,e.startNode,r,i)},Nt=n=>{yt(n.startNode.parentNode,n.startNode,n.endNode.nextSibling)},Nn=(n,e,t)=>{const s=new Map;for(let i=e;i<=t;i++)s.set(n[i],i);return s},On=new WeakMap,Rn=new WeakMap,An=Z((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=On.get(i)||[],a=Rn.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 d,$,w=0,S=r.length-1,p=0,v=l.length-1;for(;w<=S&&p<=v;)if(r[w]===null)w++;else if(r[S]===null)S--;else if(a[w]===h[p])c[p]=ae(r[w],l[p]),w++,p++;else if(a[S]===h[v])c[v]=ae(r[S],l[v]),S--,v--;else if(a[w]===h[v])c[v]=ae(r[w],l[v]),Mt(i,r[w],c[v+1]),w++,v--;else if(a[S]===h[p])c[p]=ae(r[S],l[p]),Mt(i,r[S],r[w]),S--,p++;else if(d===void 0&&(d=Nn(h,p,v),$=Nn(a,w,S)),!d.has(a[w]))Nt(r[w]),w++;else if(!d.has(a[S]))Nt(r[S]),S--;else{const b=$.get(h[p]),B=b!==void 0?r[b]:null;if(B===null){const j=Mn(i,r[w]);ae(j,l[p]),c[p]=j}else c[p]=ae(B,l[p]),Mt(i,B,r[w]),r[b]=null;p++}for(;p<=v;){const b=Mn(i,c[v+1]);ae(b,l[p]),c[p++]=b}for(;w<=S;){const b=r[w++];b!==null&&Nt(b)}On.set(i,c),Rn.set(i,h)}});/**
146
+ */const vn=(n,e)=>{const t=n.startNode.parentNode,s=e===void 0?n.endNode:e.startNode,i=t.insertBefore(F(),s);t.insertBefore(F(),s);const r=new ue(n.options);return r.insertAfterNode(i),r},oe=(n,e)=>(n.setValue(e),n.commit(),n),Ct=(n,e,t)=>{const s=n.startNode.parentNode,i=t?t.startNode:n.endNode,r=e.endNode.nextSibling;r!==i&&en(s,e.startNode,r,i)},kt=n=>{yt(n.startNode.parentNode,n.startNode,n.endNode.nextSibling)},bn=(n,e,t)=>{const s=new Map;for(let i=e;i<=t;i++)s.set(n[i],i);return s},Pn=new WeakMap,Tn=new WeakMap,Cn=Y((n,e,t)=>{let s;return t===void 0?t=e:e!==void 0&&(s=e),i=>{if(!(i instanceof ue))throw new Error("repeat can only be used in text bindings");const r=Pn.get(i)||[],a=Tn.get(i)||[],c=[],l=[],h=[];let p=0;for(const P of n)h[p]=s?s(P,p):p,l[p]=t(P,p),p++;let u,_,w=0,E=r.length-1,g=0,v=l.length-1;for(;w<=E&&g<=v;)if(r[w]===null)w++;else if(r[E]===null)E--;else if(a[w]===h[g])c[g]=oe(r[w],l[g]),w++,g++;else if(a[E]===h[v])c[v]=oe(r[E],l[v]),E--,v--;else if(a[w]===h[v])c[v]=oe(r[w],l[v]),Ct(i,r[w],c[v+1]),w++,v--;else if(a[E]===h[g])c[g]=oe(r[E],l[g]),Ct(i,r[E],r[w]),E--,g++;else if(u===void 0&&(u=bn(h,g,v),_=bn(a,w,E)),!u.has(a[w]))kt(r[w]),w++;else if(!u.has(a[E]))kt(r[E]),E--;else{const P=_.get(h[g]),B=P!==void 0?r[P]:null;if(B===null){const V=vn(i,r[w]);oe(V,l[g]),c[g]=V}else c[g]=oe(B,l[g]),Ct(i,B,r[w]),r[P]=null;g++}for(;g<=v;){const P=vn(i,c[v+1]);oe(P,l[g]),c[g++]=P}for(;w<=E;){const P=r[w++];P!==null&&kt(P)}Pn.set(i,c),Tn.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 li=Object.defineProperty,hi=Object.defineProperties;var ui=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 Ot=new WeakMap,Gn=Z((n,e)=>t=>{const s=Ot.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||Ot.has(t)))return;t.setValue(e()),Ot.set(t,Array.isArray(n)?Array.from(n):n)});/**
158
+ */const Lt=new WeakMap,kn=Y((n,e)=>t=>{const s=Lt.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||Lt.has(t)))return;t.setValue(e()),Lt.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,19 +167,19 @@ var li=Object.defineProperty,hi=Object.defineProperties;var ui=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 Rt=new WeakMap,At=Z(n=>e=>{const t=Rt.get(e);if(n===void 0&&e instanceof _t){if(t!==void 0||!Rt.has(e)){const s=e.committer.name;e.committer.element.removeAttribute(s)}}else n!==t&&e.setValue(n);Rt.set(e,n)});var Hn=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)},u=(n,e,t)=>(Hn(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)},V=(n,e,t,s)=>(Hn(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),ye,Q,Ae,Y,Ge,J,ee,Ke,ze,Gt,Ht,It,Je,Vt,Qe,te,Wt,Ye;function $s(){}function jt(n){typeof n=="function"&&n()}const Ze=new bt,Dt=(n=performance.now())=>{if(performance.now()>n+16)return requestAnimationFrame(Dt);const e=Ze.get();e&&(e(),Dt(n))};Ze.addEventListener("start",()=>H(Dt));const Xe=Symbol("constructor"),et=Symbol("init"),In=Symbol("update");class A extends HTMLElement{constructor({isAsync:e,isLight:t,delegatesFocus:s}={}){super();P(this,ye,void 0),P(this,Q,void 0),P(this,Ae,void 0),P(this,Y,void 0),P(this,Ge,void 0),P(this,J,void 0),P(this,ee,void 0),P(this,Ke,void 0),this.setState=r=>{if(!this.state)throw new K("`state` not initialized");Object.assign(this.state,r),H(u(this,te))},P(this,ze,r=>{r==null||r.forEach(a=>{const{callback:c,getDep:l,values:h,preCallback:m}=a,d=l==null?void 0:l();(!l||!h||Ct(h,d))&&(jt(m),a.preCallback=c(d,h),a.values=d)})}),P(this,Gt,()=>{u(this,ze).call(this,u(this,J))}),P(this,Ht,()=>{u(this,ze).call(this,u(this,ee))}),this.effect=(r,a)=>{u(this,J)||V(this,J,[]);const c={callback:r,getDep:a,values:void 0,initialized:u(this,Y),inConstructor:this[Xe]};u(this,Y)&&(c.values=a==null?void 0:a(),c.preCallback=r(c.values)),u(this,J).push(c)},this.memo=(r,a)=>{u(this,ee)||V(this,ee,[]),u(this,ee).push({callback:r,getDep:a,values:[Symbol()],inConstructor:this[Xe]})},P(this,It,()=>{var r;(r=u(this,J))==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)})}),P(this,Je,()=>{var a,c;u(this,Ht).call(this);const r=o.useNativeCSSStyleSheet?"":N`${(c=(a=this.shadowRoot)==null?void 0:a.adoptedStyleSheets)==null?void 0:c.map(l=>N`
171
- <style media=${l.media.mediaText}>
172
- ${l.style}
173
- </style>
174
- `)}`;if(this.render){const l=this.render();return l&&N`${l}${r}`}return u(this,ye)===this?void 0:N`<slot></slot>${r}`}),P(this,Vt,()=>this.shouldUpdate?this.shouldUpdate():!0),P(this,Qe,()=>{if(u(this,Y)&&u(this,Vt).call(this)){const r=u(this,Je).call(this);r!==void 0&&Ue(r,u(this,ye)),H(u(this,Wt)),H(u(this,Gt))}}),P(this,te,()=>{u(this,Ge)?Ze.add(u(this,Qe)):u(this,Qe).call(this)}),this.update=()=>{H(u(this,te))},P(this,Wt,()=>{var r;(r=this.updated)==null||r.call(this)}),P(this,Ye,()=>{var l,h,m;if(this[Xe]=!1,u(this,Ae)){V(this,Ae,!1);return}(l=this.willMount)==null||l.call(this);const{observedStores:r,rootElement:a}=this.constructor;r==null||r.forEach(d=>{oe(d,u(this,te))});const c=u(this,Je).call(this);if(c!==void 0&&Ue(c,u(this,ye)),V(this,Y,!0),V(this,Ke,(h=this.mounted)==null?void 0:h.call(this)),u(this,It).call(this),a&&((m=this.getRootNode().host)==null?void 0:m.tagName)!==a.toUpperCase())throw new K("not allow current root type")}),this[Xe]=!0,H(()=>this[et]=!1),this[et]=!0,this[In]=()=>{u(this,Y)&&H(u(this,te))},V(this,Ge,e),V(this,ye,t?this:this.attachShadow({mode:"open",delegatesFocus:s}));const{adoptedStyleSheets:i}=new.target;if(i){const r=i.map(a=>a[Fe]||a);this.shadowRoot?this.shadowRoot.adoptedStyleSheets=r:this.effect(()=>{const a=this.getRootNode();if(o.useNativeCSSStyleSheet)return a.adoptedStyleSheets=[...a.adoptedStyleSheets,...r],()=>{a.adoptedStyleSheets=kt(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(){var e,t;if(!u(this,Q)){V(this,Q,this.attachInternals());try{(e=u(this,Q).states)==null||e.add("foo"),(t=u(this,Q).states)==null||t.delete("foo")}catch{Reflect.defineProperty(u(this,Q),"states",{value:new Proxy(u(this,Q).states,{get(s,i){return r=>s[i](`--${r}`)}})})}}return u(this,Q)}attributeChangedCallback(){u(this,Y)&&H(u(this,te))}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(){u(this,Ge)?Ze.add(u(this,Ye)):u(this,Ye).call(this)}disconnectedCallback(){var t,s,i,r;if(this.isConnected){V(this,Ae,!0);return}V(this,Y,!1);const{observedStores:e}=this.constructor;e==null||e.forEach(a=>{$t(a,u(this,te))}),jt(u(this,Ke)),(t=this.unmounted)==null||t.call(this),(s=u(this,J))==null||s.forEach(a=>{jt(a.preCallback)}),V(this,J,(i=u(this,J))==null?void 0:i.filter(({inConstructor:a})=>a)),V(this,ee,(r=u(this,ee))==null?void 0:r.filter(({inConstructor:a})=>a))}}ye=new WeakMap,Q=new WeakMap,Ae=new WeakMap,Y=new WeakMap,Ge=new WeakMap,J=new WeakMap,ee=new WeakMap,Ke=new WeakMap,ze=new WeakMap,Gt=new WeakMap,Ht=new WeakMap,It=new WeakMap,Je=new WeakMap,Vt=new WeakMap,Qe=new WeakMap,te=new WeakMap,Wt=new WeakMap,Ye=new WeakMap;const tt=new Pt;function nt(n,e,t){const{booleanAttributes:s,numberAttributes:i}=n.constructor;Object.defineProperty(n,e,{configurable:!0,get(){if(!(et 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=tt.get(this),l=c[e],h=a.getAttribute(t);if(this[et]&&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 Vn=Symbol("event handle");function we(n,e,t,s){Object.defineProperty(n,e,{configurable:!0,get(){const i=tt.get(this)[e];return i||!t?i:(this[e]=$s,this[e])},set(i){const r=this,a=tt.get(r);i!==a[e]&&(t?(a[e]=(i==null?void 0:i[Vn])?i:(c,l)=>{const h=new CustomEvent(t,xe(C(C({},l),s),{detail:c}));r.dispatchEvent(h),i(c,l)},a[e][Vn]=!0):(a[e]=i,this[In]()))}})}function st(n,e,t){Object.defineProperty(n,e,{configurable:!0,get(){const s=tt.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-gem-reflect]")].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 it(n,e,t){Object.defineProperty(n,e,{configurable:!0,get(){const s=this,{states:i}=s.internals;return i==null?void 0:i.has(t)},set(s){const i=this,{states:r}=i.internals;s?r==null||r.add(t):r==null||r.delete(t)}})}const rt=customElements.define.bind(customElements);customElements.define=(n,e,t)=>{if(e.prototype instanceof A){const{observedAttributes:s,observedProperties:i,defineEvents:r,defineCSSStates:a,defineRefs:c}=e;s==null||s.forEach(l=>nt(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)),a==null||a.forEach(l=>it(e.prototype,ge(l),l)),c==null||c.forEach(l=>st(e.prototype,ge(l),l))}rt(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 Wn(n,e){const t=`${I(e)}-${Ne()}`;q(n,"defineRefs",t),st(n,e,t)}function qt(n,e,t){q(n,"observedAttributes",t),nt(n,e,t)}function k(n,e){qt(n,e,I(e))}function xt(n,e){const t=I(e);q(n,"booleanAttributes",t,!0),qt(n,e,t)}function jn(n,e){const t=I(e);q(n,"numberAttributes",t,!0),qt(n,e,t)}function x(n,e){q(n,"observedProperties",e),we(n,e)}function He(n,e){const t=I(e);q(n,"defineCSSStates",t),it(n,e,t)}function Dn(n,e){const t=I(n[e]||e);n[e]=t,q(n instanceof A?n:n.prototype,"defineSlots",t)}function Ut(n,e){const t=I(n[e]||e);n[e]=t,q(n instanceof A?n:n.prototype,"defineParts",t)}function Ie(n,e){xn(n,e)}function qn(n,e){xn(n,e,{bubbles:!0,composed:!0})}function xn(n,e,t){const s=I(e);q(n,"defineEvents",s),we(n,e,s,t)}function Un(n){return function(e){q(e.prototype,"adoptedStyleSheets",n)}}function ce(n){return function(e){q(e.prototype,"observedStores",n)}}function Bn(n){return function(e){const t=e;t.rootElement=n}}function Fn(n){return function(e){rt(n,e)}}const W=window.history,Kn=W.pushState.bind(W),zn=W.replaceState.bind(W);let Ms=0;const Bt=()=>`${performance.now()}-${++Ms}`,_=z({$hasCloseHandle:!1,$hasOpenHandle:!1,$hasShouldCloseHandle:!1,$key:""}),O=new Map;function Jn(n){const{$key:e,$hasCloseHandle:t,$hasOpenHandle:s,$hasShouldCloseHandle:i}=n||{};if(_.$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 Qn(n){return U.basePath?U.basePath+n:n}function Yn(n){return n===U.basePath?"/":n.replace(new RegExp(`^${U.basePath}/`),"/")}function ot(n){const e=O.get(_.$key)||{},t=n.path?Be(e.path,n.path):Yn(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),a=n.close||n.data||n.open||n.shouldClose,c=n.hash||(!i&&a?decodeURIComponent(location.hash):"");return xe(C({},n),{title:r,path:t,query:s,hash:c})}function Zn(n,e){Jn(n.data);const t=ot(n),{title:s,path:i,query:r,hash:a,close:c,open:l,shouldClose:h,data:m}=t,d=C({$hasCloseHandle:!!c,$hasOpenHandle:!!l,$hasShouldCloseHandle:!!h,$key:Bt()},m);O.set(d.$key,t),T(Oe(_),d);const $=Qn(i)+new me(r)+a,w=decodeURIComponent(location.hash);e(d,s,$),w!==a&&window.dispatchEvent(new CustomEvent("hashchange"))}function Xn(n,e,t,s){Jn(n);const i=C({$key:Bt()},n||{}),{pathname:r,search:a,hash:c}=new URL(t,location.origin+location.pathname),l=ot({path:r,query:new me(a),hash:c,title:e,data:n});O.set(i.$key,l),T(Oe(_),i);const h=Qn(r)+l.query+c,m=location.hash;s(i,e,h),m!==c&&window.dispatchEvent(new CustomEvent("hashchange"))}const Ft=z({basePath:""});class Ns{get store(){return _}get basePath(){return Ft.basePath}set basePath(e){T(Ft,{basePath:e}),Object.assign(O.get(_.$key),{path:Yn(location.pathname)})}getParams(){return O.get(_.$key)}updateParams(e){Object.assign(O.get(_.$key),e),T(_,{})}push(e){Zn(e,Kn)}replace(e){Zn(e,zn)}pushIgnoreCloseHandle(e){var t,s;_.$hasCloseHandle?((s=(t=O.get(_.$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 Ns,Ve=z({title:""}),Os={history:U,titleStore:Ve,basePathStore:Ft};if(!window._GEMHISTORY){if(window._GEMHISTORY=Os,W.pushState=function(e,t,s){Xn(e,t,s,Kn)},W.replaceState=function(e,t,s){Xn(e,t,s,zn)},window.addEventListener("hashchange",({isTrusted:e})=>{e&&U.replace({hash:decodeURIComponent(location.hash)})}),W.state)if(W.state.$hasCloseHandle){T(_,W.state);const e=ot({title:document.title});O.set(_.$key,e),U.back()}else{const e=ot({title:document.title,hash:location.hash});T(_,C({$key:Bt()},W.state||{})),O.set(_.$key,e)}else{const{pathname:e,search:t,hash:s}=location;U.replace({path:e,query:t,hash:s})}oe(Ve,()=>{const e=O.get(_.$key);e&&(e.title=Ve.title)}),oe(_,()=>{const{title:e}=U.getParams();e!==Ve.title&&T(Ve,{title:e})});let n=!1;window.addEventListener("popstate",e=>{var r,a;const t=e.state;if(!(t==null?void 0:t.$key))return;if(n){n=!1;return}if(!O.has(t.$key)){const{pathname:c,search:l,hash:h}=location;O.set(t.$key,{path:c,query:new me(l),hash:h,title:document.title,data:t})}const s=_;if(parseFloat(t.$key)>parseFloat(s.$key)&&t.$hasOpenHandle)(a=(r=O.get(t.$key))==null?void 0:r.open)==null||a.call(r);else if(s.$hasCloseHandle){const c=O.get(s.$key),l=c==null?void 0:c.close,h=c==null?void 0:c.shouldClose;if(h&&!h()){n=!0,U.forward();return}else l?l():t.$hasCloseHandle&&(n=!0,U.back())}T(Oe(_),t)})}const{history:E,titleStore:le,basePathStore:Kt}=window._GEMHISTORY;var Rs=Object.defineProperty,As=Object.getOwnPropertyDescriptor,ne=(n,e,t,s)=>{for(var i=s>1?void 0:s?As(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&&Rs(e,t,i),i},es=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)},We=(n,e,t)=>(es(n,e,"read from private field"),t?t.call(n):e.get(n)),zt=(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)},ts=(n,e,t,s)=>(es(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),je,at,ct;class Gs extends RegExp{constructor(e){const t={};let s=0;super(`^${e.replace(/:([^/$]+)/g,(i,r)=>(t[r]=s++,"([^/]+)")).replace("*",".*")}$`,"i");this.namePosition=t}}function Jt(n,e){const t=new Gs(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 Qt(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 ns(n,e){const t=Qt(n,e);return C({path:t},e)}o.GemRouteElement=class extends A{constructor({isLight:n,routes:e}={}){super({isLight:n});this.currentParams={},zt(this,je,void 0),this.state={content:void 0},zt(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})}}),zt(this,ct,(t,s,i)=>{ts(this,je,void 0),this.currentRoute=t,this.currentParams=s;const r=()=>(this.setState({content:i}),this.routechange(this.currentRoute),We(this,at).call(this),Promise.resolve());this.transition&&"startViewTransition"in document?document.startViewTransition(r):r()}),this.routes=e}mounted(){this.effect(([n,e],t)=>{if(t&&n===t[0]&&e===t[1]){We(this,at).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&&T(le,{title:l});const h=a||(c==null?void 0:c(i));if(h instanceof Promise){this.loading(s),ts(this,je,h);const m=()=>We(this,je)===h;h.then(d=>{m()&&We(this,ct).call(this,s,i,d)}).catch(d=>{m()&&this.error(d)});return}We(this,ct).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`
170
+ */const $t=new WeakMap,Nt=Y(n=>e=>{const t=$t.get(e);if(n===void 0&&e instanceof vt){if(t!==void 0||!$t.has(e)){const s=e.committer.name;e.committer.element.removeAttribute(s)}}else n!==t&&e.setValue(n);$t.set(e,n)});var Ln=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)},d=(n,e,t)=>(Ln(n,e,"read from private field"),t?t.call(n):e.get(n)),T=(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)},H=(n,e,t,s)=>(Ln(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),me,ee,Oe,Q,Re,z,te,Ue,Be,Mt,Ot,Rt,Fe,At,ze,ne,Gt,Ke;function Cs(){}function Ht(n){typeof n=="function"&&n()}const Je=new mn,It=(n=performance.now())=>{if(performance.now()>n+16)return requestAnimationFrame(It);const e=Je.get();e&&(e(),It(n))};Je.addEventListener("start",()=>j(It));const Qe=Symbol("constructor"),Ye=Symbol("init"),$n=Symbol("update");class A extends HTMLElement{constructor({isAsync:e,isLight:t,delegatesFocus:s,slotAssignment:i}={}){super();T(this,me,void 0),T(this,ee,void 0),T(this,Oe,void 0),T(this,Q,void 0),T(this,Re,void 0),T(this,z,void 0),T(this,te,void 0),T(this,Ue,void 0),this.setState=a=>{if(!this.state)throw new K("`state` not initialized");Object.assign(this.state,a),j(d(this,ne))},T(this,Be,a=>{a==null||a.forEach(c=>{const{callback:l,getDep:h,values:p,preCallback:u}=c,_=h==null?void 0:h();(!h||!p||yn(p,_))&&(Ht(u),c.preCallback=l(_,p),c.values=_)})}),T(this,Mt,()=>{d(this,Be).call(this,d(this,z))}),T(this,Ot,()=>{d(this,Be).call(this,d(this,te))}),this.effect=(a,c)=>{d(this,z)||H(this,z,[]);const l={callback:a,getDep:c,values:void 0,initialized:d(this,Q),inConstructor:this[Qe]};d(this,Q)&&(l.values=c==null?void 0:c(),l.preCallback=a(l.values)),d(this,z).push(l)},this.memo=(a,c)=>{d(this,te)||H(this,te,[]),d(this,te).push({callback:a,getDep:c,values:[Symbol()],inConstructor:this[Qe]})},T(this,Rt,()=>{var a;(a=d(this,z))==null||a.forEach(c=>{const{callback:l,getDep:h,initialized:p}=c;p||(c.values=h==null?void 0:h(),c.preCallback=l(c.values),c.initialized=!0)})}),T(this,Fe,()=>{var c,l;d(this,Ot).call(this);const a=o.useNativeCSSStyleSheet?"":N`${(l=(c=this.shadowRoot)==null?void 0:c.adoptedStyleSheets)==null?void 0:l.map(h=>N`
171
+ <style media=${h.media.mediaText}>
172
+ ${h.style}
173
+ </style>
174
+ `)}`;if(this.render){const h=this.render();return h&&N`${h}${a}`}return d(this,me)===this?void 0:N`<slot></slot>${a}`}),T(this,At,()=>this.shouldUpdate?this.shouldUpdate():!0),T(this,ze,()=>{if(d(this,Q)&&d(this,At).call(this)){const a=d(this,Fe).call(this);a!==void 0&&je(a,d(this,me)),j(d(this,Gt)),j(d(this,Mt))}}),T(this,ne,()=>{d(this,Re)?Je.add(d(this,ze)):d(this,ze).call(this)}),this.update=()=>{j(d(this,ne))},T(this,Gt,()=>{var a;(a=this.updated)==null||a.call(this)}),T(this,Ke,()=>{var h,p,u;if(this[Qe]=!1,d(this,Oe)){H(this,Oe,!1);return}(h=this.willMount)==null||h.call(this);const{observedStores:a,rootElement:c}=this.constructor;a==null||a.forEach(_=>{fe(_,d(this,ne))});const l=d(this,Fe).call(this);if(l!==void 0&&je(l,d(this,me)),H(this,Q,!0),H(this,Ue,(p=this.mounted)==null?void 0:p.call(this)),d(this,Rt).call(this),c&&((u=this.getRootNode().host)==null?void 0:u.tagName)!==c.toUpperCase())throw new K("not allow current root type")}),this[Qe]=!0,j(()=>this[Ye]=!1),this[Ye]=!0,this[$n]=()=>{d(this,Q)&&j(d(this,ne))},H(this,Re,e),H(this,me,t?this:this.attachShadow({mode:"open",delegatesFocus:s,slotAssignment:i}));const{adoptedStyleSheets:r}=new.target;if(r){const a=r.map(c=>c[Pt]||c);this.shadowRoot?this.shadowRoot.adoptedStyleSheets=a:this.effect(()=>{const c=this.getRootNode();if(o.useNativeCSSStyleSheet)return c.adoptedStyleSheets=[...c.adoptedStyleSheets,...a],()=>{c.adoptedStyleSheets=wn(c.adoptedStyleSheets,a)};{const l=c===document?document.body:c;return l._sheets=l._sheets||{},a.forEach(({style:h,media:p})=>{if(l._sheets[h])l._sheets[h].count++;else{const u=document.createElement("style");u.innerHTML=h,u.media=p.mediaText,l.append(u),l._sheets[h]={ele:u,count:1}}}),()=>{a.forEach(({style:h})=>{l._sheets[h].count--,l._sheets[h].count||delete l._sheets[h]})}}},()=>[])}}get internals(){if(!d(this,ee)){H(this,ee,this.attachInternals());try{d(this,ee).states.add("foo"),d(this,ee).states.delete("foo")}catch{Reflect.defineProperty(d(this,ee),"states",{value:{has:e=>X(e)in this.dataset,add:e=>this.dataset[X(e)]="",delete:e=>delete this.dataset[X(e)]}})}}return d(this,ee)}attributeChangedCallback(){d(this,Q)&&j(d(this,ne))}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,Re)?Je.add(d(this,Ke)):d(this,Ke).call(this)}disconnectedCallback(){var t,s,i,r;if(this.isConnected){H(this,Oe,!0);return}H(this,Q,!1);const{observedStores:e}=this.constructor;e==null||e.forEach(a=>{_n(a,d(this,ne))}),Ht(d(this,Ue)),(t=this.unmounted)==null||t.call(this),(s=d(this,z))==null||s.forEach(a=>{Ht(a.preCallback)}),H(this,z,(i=d(this,z))==null?void 0:i.filter(({inConstructor:a})=>a)),H(this,te,(r=d(this,te))==null?void 0:r.filter(({inConstructor:a})=>a))}}me=new WeakMap,ee=new WeakMap,Oe=new WeakMap,Q=new WeakMap,Re=new WeakMap,z=new WeakMap,te=new WeakMap,Ue=new WeakMap,Be=new WeakMap,Mt=new WeakMap,Ot=new WeakMap,Rt=new WeakMap,Fe=new WeakMap,At=new WeakMap,ze=new WeakMap,ne=new WeakMap,Gt=new WeakMap,Ke=new WeakMap;const Ze=new pn;function Xe(n,e,t){const{booleanAttributes:s,numberAttributes:i}=n.constructor;Object.defineProperty(n,e,{configurable:!0,get(){if(!(Ye 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=Ze.get(this),l=c[e],h=a.getAttribute(t);if(this[Ye]&&h!==null&&!l)return;c[e]=!0;const p=s==null?void 0:s.has(t);r==null?a.removeAttribute(t):p?a.toggleAttribute(t,!!r):h!==String(r)&&a.setAttribute(t,String(r))}})}const Nn=Symbol("event handle");function pe(n,e,t,s){Object.defineProperty(n,e,{configurable:!0,get(){const i=Ze.get(this)[e];return i||!t?i:(this[e]=Cs,this[e])},set(i){const r=this,a=Ze.get(r);i!==a[e]&&(t?(a[e]=(i==null?void 0:i[Nn])?i:(c,l)=>{const h=new CustomEvent(t,We(C(C({},l),s),{detail:c}));r.dispatchEvent(h),i(c,l)},a[e][Nn]=!0):(a[e]=i,this[$n]()))}})}function et(n,e,t){Object.defineProperty(n,e,{configurable:!0,get(){const s=Ze.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-gem-reflect]")].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 tt(n,e,t){Object.defineProperty(n,e,{configurable:!0,get(){const s=this,{states:i}=s.internals;return i==null?void 0:i.has(t)},set(s){const i=this,{states:r}=i.internals;s?r==null||r.add(t):r==null||r.delete(t)}})}const nt=customElements.define.bind(customElements);customElements.define=(n,e,t)=>{if(e.prototype instanceof A){const{observedAttributes:s,observedProperties:i,defineEvents:r,defineCSSStates:a,defineRefs:c}=e;s==null||s.forEach(l=>Xe(e.prototype,X(l),l)),i==null||i.forEach(l=>pe(e.prototype,l)),r==null||r.forEach(l=>pe(e.prototype,X(l),l)),a==null||a.forEach(l=>tt(e.prototype,X(l),l)),c==null||c.forEach(l=>et(e.prototype,X(l),l))}nt(n,e,t)},window.__GEM_DEVTOOLS__HOOK__&&Object.assign(window.__GEM_DEVTOOLS__HOOK__,C(C({},f),Ts));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 ks(n,e){const t=`${D(e)}-${De()}`;q(n,"defineRefs",t),et(n,e,t)}function Vt(n,e,t){q(n,"observedAttributes",t),Xe(n,e,t)}function M(n,e){Vt(n,e,D(e))}function Mn(n,e){const t=D(e);q(n,"booleanAttributes",t,!0),Vt(n,e,t)}function Ls(n,e){const t=D(e);q(n,"numberAttributes",t,!0),Vt(n,e,t)}function x(n,e){q(n,"observedProperties",e),pe(n,e)}function st(n,e){const t=D(e);q(n,"defineCSSStates",t),tt(n,e,t)}function $s(n,e){const t=D(n[e]||e);n[e]=t,q(n instanceof A?n:n.prototype,"defineSlots",t)}function On(n,e){const t=D(n[e]||e);n[e]=t,q(n instanceof A?n:n.prototype,"defineParts",t)}function it(n,e){Rn(n,e)}function Ns(n,e){Rn(n,e,{bubbles:!0,composed:!0})}function Rn(n,e,t){const s=D(e);q(n,"defineEvents",s),pe(n,e,s,t)}function Ms(n){return function(e){q(e.prototype,"adoptedStyleSheets",n)}}function ge(n){return function(e){q(e.prototype,"observedStores",n)}}function Os(n){return function(e){const t=e;t.rootElement=n}}function Rs(n){return function(e){nt(n,e)}}const I=window.history,An=I.pushState.bind(I),Gn=I.replaceState.bind(I);let As=0;const Wt=()=>`${performance.now()}-${++As}`,b=J({$hasCloseHandle:!1,$hasOpenHandle:!1,$hasShouldCloseHandle:!1,$key:""}),O=new Map;function Hn(n){const{$key:e,$hasCloseHandle:t,$hasOpenHandle:s,$hasShouldCloseHandle:i}=n||{};if(b.$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 In(n){return U.basePath?U.basePath+n:n}function Vn(n){return n===U.basePath?"/":n.replace(new RegExp(`^${U.basePath}/`),"/")}function rt(n){const e=O.get(b.$key)||{},t=n.path?bt(e.path,n.path):Vn(location.pathname),s=new Ne(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 We(C({},n),{title:r,path:t,query:s,hash:c})}function Wn(n,e){Hn(n.data);const t=rt(n),{title:s,path:i,query:r,hash:a,close:c,open:l,shouldClose:h,data:p}=t,u=C({$hasCloseHandle:!!c,$hasOpenHandle:!!l,$hasShouldCloseHandle:!!h,$key:Wt()},p);O.set(u.$key,t),k(qe(b),u);const _=In(i)+new Ne(r)+a,w=decodeURIComponent(location.hash);e(u,s,_),w!==a&&window.dispatchEvent(new CustomEvent("hashchange"))}function jn(n,e,t,s){Hn(n);const i=C({$key:Wt()},n||{}),{pathname:r,search:a,hash:c}=new URL(t,location.origin+location.pathname),l=rt({path:r,query:new Ne(a),hash:c,title:e,data:n});O.set(i.$key,l),k(qe(b),i);const h=In(r)+l.query+c,p=location.hash;s(i,e,h),p!==c&&window.dispatchEvent(new CustomEvent("hashchange"))}const jt=J({basePath:""});class Gs{get store(){return b}get basePath(){return jt.basePath}set basePath(e){k(jt,{basePath:e}),Object.assign(O.get(b.$key),{path:Vn(location.pathname)})}getParams(){return O.get(b.$key)}updateParams(e){Object.assign(O.get(b.$key),e),k(b,{})}push(e){Wn(e,An)}replace(e){Wn(e,Gn)}pushIgnoreCloseHandle(e){var t,s;b.$hasCloseHandle?((s=(t=O.get(b.$key))==null?void 0:t.close)==null||s.call(t),this.replace(e)):this.push(e)}forward(){I.forward()}back(){I.back()}}const U=new Gs,Ae=J({title:""}),Hs={history:U,titleStore:Ae,basePathStore:jt};if(!window._GEMHISTORY){if(window._GEMHISTORY=Hs,I.pushState=function(e,t,s){jn(e,t,s,An)},I.replaceState=function(e,t,s){jn(e,t,s,Gn)},window.addEventListener("hashchange",({isTrusted:e})=>{e&&U.replace({hash:decodeURIComponent(location.hash)})}),I.state)if(I.state.$hasCloseHandle){k(b,I.state);const e=rt({title:document.title});O.set(b.$key,e),U.back()}else{const e=rt({title:document.title,hash:location.hash});k(b,C({$key:Wt()},I.state||{})),O.set(b.$key,e)}else{const{pathname:e,search:t,hash:s}=location;U.replace({path:e,query:t,hash:s})}fe(Ae,()=>{const e=O.get(b.$key);e&&(e.title=Ae.title)}),fe(b,()=>{const{title:e}=U.getParams();e!==Ae.title&&k(Ae,{title:e})});let n=!1;window.addEventListener("popstate",e=>{var r,a;const t=e.state;if(!(t==null?void 0:t.$key))return;if(n){n=!1;return}if(!O.has(t.$key)){const{pathname:c,search:l,hash:h}=location;O.set(t.$key,{path:c,query:new Ne(l),hash:h,title:document.title,data:t})}const s=b;if(parseFloat(t.$key)>parseFloat(s.$key)&&t.$hasOpenHandle)(a=(r=O.get(t.$key))==null?void 0:r.open)==null||a.call(r);else if(s.$hasCloseHandle){const c=O.get(s.$key),l=c==null?void 0:c.close,h=c==null?void 0:c.shouldClose;if(h&&!h()){n=!0,U.forward();return}else l?l():t.$hasCloseHandle&&(n=!0,U.back())}k(qe(b),t)})}const{history:S,titleStore:ye,basePathStore:Dn}=window._GEMHISTORY;var Is=Object.defineProperty,Vs=Object.getOwnPropertyDescriptor,se=(n,e,t,s)=>{for(var i=s>1?void 0:s?Vs(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&&Is(e,t,i),i},qn=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)},Ge=(n,e,t)=>(qn(n,e,"read from private field"),t?t.call(n):e.get(n)),Dt=(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)=>(qn(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),He,ot,at;class Ws extends RegExp{constructor(e){const t={};let s=0;super(`^${e.replace(/:([^/$]+)/g,(i,r)=>(t[r]=s++,"([^/]+)")).replace("*",".*")}$`,"i");this.namePosition=t}}function qt(n,e){const t=new Ws(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 xt(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 Un(n,e){const t=xt(n,e);return C({path:t},e)}o.GemRouteElement=class extends A{constructor({isLight:n,routes:e}={}){super({isLight:n});this.currentParams={},Dt(this,He,void 0),this.state={content:void 0},Dt(this,ot,()=>{if(this.locationStore){const{path:t,query:s,data:i}=S.getParams();k(this.locationStore,{path:t,params:this.currentParams,query:s,data:i})}}),Dt(this,at,(t,s,i)=>{xn(this,He,void 0),this.currentRoute=t,this.currentParams=s;const r=()=>(this.setState({content:i}),this.routechange(this.currentRoute),Ge(this,ot).call(this),Promise.resolve());this.transition&&"startViewTransition"in document?document.startViewTransition(r):r()}),this.routes=e}mounted(){this.effect(([n,e],t)=>{if(t&&n===t[0]&&e===t[1]){Ge(this,ot).call(this);return}const{route:s,params:i={}}=o.GemRouteElement.findRoute(this.routes,e),{redirect:r,content:a,getContent:c}=s||{};if(r){S.replace({path:r});return}const l=s==null?void 0:s.title;l&&k(ye,{title:l});const h=a||(c==null?void 0:c(i));if(h instanceof Promise){this.loading(s),xn(this,He,h);const p=()=>Ge(this,He)===h;h.then(u=>{p()&&Ge(this,at).call(this,s,i,u)}).catch(u=>{p()&&this.error(u)});return}Ge(this,at).call(this,s,i,h)},()=>{const{path:n}=S.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
- :host,
176
+ :host(:where(:not([hidden]))),
177
177
  :not(:defined) {
178
178
  display: contents;
179
179
  }
180
180
  </style>
181
181
  ${n!=null?n:N`<slot></slot>`}
182
- `:N`${n}`}},je=new WeakMap,at=new WeakMap,ct=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=Jt(i.pattern,e);if(r)return{route:i,params:r}}return{route:t}},ne([xt],o.GemRouteElement.prototype,"transition",2),ne([x],o.GemRouteElement.prototype,"routes",2),ne([x],o.GemRouteElement.prototype,"locationStore",2),ne([x],o.GemRouteElement.prototype,"key",2),ne([Ie],o.GemRouteElement.prototype,"routechange",2),ne([Ie],o.GemRouteElement.prototype,"loading",2),ne([Ie],o.GemRouteElement.prototype,"error",2),o.GemRouteElement=ne([ce(E.store)],o.GemRouteElement);class ss extends o.GemRouteElement{constructor(e={}){super(xe(C({},e),{isLight:!0}))}}var Hs=Object.defineProperty,Is=Object.getOwnPropertyDescriptor,L=(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.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({},ns(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 Qt(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`
182
+ `:N`${n}`}},He=new WeakMap,ot=new WeakMap,at=new WeakMap,o.GemRouteElement.createLocationStore=()=>{const{path:n,query:e,data:t}=S.getParams();return J({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=qt(i.pattern,e);if(r)return{route:i,params:r}}return{route:t}},se([Mn],o.GemRouteElement.prototype,"transition",2),se([x],o.GemRouteElement.prototype,"routes",2),se([x],o.GemRouteElement.prototype,"locationStore",2),se([x],o.GemRouteElement.prototype,"key",2),se([it],o.GemRouteElement.prototype,"routechange",2),se([it],o.GemRouteElement.prototype,"loading",2),se([it],o.GemRouteElement.prototype,"error",2),o.GemRouteElement=se([ge(S.store)],o.GemRouteElement);class Bn extends o.GemRouteElement{constructor(e={}){super(We(C({},e),{isLight:!0}))}}var js=Object.defineProperty,Ds=Object.getOwnPropertyDescriptor,L=(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};o.GemLinkElement=(ts=class extends A{constructor(){super();$(this,ce);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}=S.getParams();if(t+s+i!==e)if(n.stopPropagation(),await((r=this.prepare)==null?void 0:r.call(this)),this.route)S.pushIgnoreCloseHandle(We(C({},Un(this.route,m(this,ce,pt))),{title:this.route.title||this.docTitle}));else if(this.href){const{pathname:a,search:c,hash:l}=new URL(e,location.origin);S.pushIgnoreCloseHandle({path:a,query:c,hash:l,title:this.docTitle})}else S.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=m(this,ce,pt))==null?void 0:n.query)||"",s=((e=m(this,ce,pt))==null?void 0:e.hash)||"";return xt(this.route,m(this,ce,pt))+t+s}else{const t=this.href||this.path+this.query+this.hash,{path:s,query:i}=S.getParams();return t.startsWith("#")?`${s}${i}${t}`:t.startsWith("?")?`${s}${t}`:t.startsWith(".")?bt(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,16 +198,14 @@ var li=Object.defineProperty,hi=Object.defineProperties;var ui=Object.getOwnProp
198
198
  <a
199
199
  part=${this.link}
200
200
  @click=${this.preventDefault}
201
- href=${At(this.hint==="off"?void 0:this.isExternal(n)?n:new URL(E.basePath+n,location.origin).toString())}
201
+ href=${Nt(this.hint==="off"?void 0:this.isExternal(n)?n:new URL(S.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([x],o.GemLinkElement.prototype,"route",2),L([x],o.GemLinkElement.prototype,"options",2),L([x],o.GemLinkElement.prototype,"prepare",2),L([Ut],o.GemLinkElement.prototype,"link",2),o.GemLinkElement=L([ce(Kt)],o.GemLinkElement),o.GemActiveLinkElement=class extends o.GemLinkElement{render(){const{path:n,query:e,hash:t}=E.getParams(),s=this.pattern&&Jt(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([He],o.GemActiveLinkElement.prototype,"active",2),o.GemActiveLinkElement=L([ce(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",ss);var Vs=Object.defineProperty,Ws=Object.getOwnPropertyDescriptor,is=(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};o.GemTitleElement=class extends A{static setTitle(n){T(le,{title:n})}static updateTitle(n="",e=""){const{title:t}=le;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}`,is([k],o.GemTitleElement.prototype,"suffix",2),o.GemTitleElement=is([ce(le)],o.GemTitleElement),oe(le,o.GemTitleElement.updateTitle),customElements.define("gem-title",o.GemTitleElement);var js=Object.defineProperty,Ds=Object.getOwnPropertyDescriptor,lt=(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};const rs=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=rs.get(e);return t||(t=document.createElement("template"),t.innerHTML=e,rs.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
+ `}},ce=new WeakSet,pt=function(){return this.routeOptions||this.options},ts),L([M],o.GemLinkElement.prototype,"href",2),L([M],o.GemLinkElement.prototype,"target",2),L([M],o.GemLinkElement.prototype,"path",2),L([M],o.GemLinkElement.prototype,"query",2),L([M],o.GemLinkElement.prototype,"hash",2),L([M],o.GemLinkElement.prototype,"docTitle",2),L([M],o.GemLinkElement.prototype,"hint",2),L([x],o.GemLinkElement.prototype,"route",2),L([x],o.GemLinkElement.prototype,"options",2),L([x],o.GemLinkElement.prototype,"routeOptions",2),L([x],o.GemLinkElement.prototype,"prepare",2),L([On],o.GemLinkElement.prototype,"link",2),o.GemLinkElement=L([ge(Dn)],o.GemLinkElement),o.GemActiveLinkElement=class extends o.GemLinkElement{render(){const{path:n,query:e,hash:t}=S.getParams(),s=this.pattern&&qt(this.pattern,n),i=this.getPathInfo();return s||n+e+t===i?this.active=!0:this.active=!1,super.render(i)}},L([M],o.GemActiveLinkElement.prototype,"pattern",2),L([st],o.GemActiveLinkElement.prototype,"active",2),o.GemActiveLinkElement=L([ge(S.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",Bn);var qs=Object.defineProperty,xs=Object.getOwnPropertyDescriptor,Fn=(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};o.GemTitleElement=class extends A{static setTitle(n){k(ye,{title:n})}static updateTitle(n="",e=""){const{title:t}=ye;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}`,Fn([M],o.GemTitleElement.prototype,"suffix",2),o.GemTitleElement=Fn([ge(ye)],o.GemTitleElement),fe(ye,o.GemTitleElement.updateTitle),customElements.define("gem-title",o.GemTitleElement);var Us=Object.defineProperty,Bs=Object.getOwnPropertyDescriptor,ct=(n,e,t,s)=>{for(var i=s>1?void 0:s?Bs(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&&Us(e,t,i),i};const zn=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=zn.get(e);return t||(t=document.createElement("template"),t.innerHTML=e,zn.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
- :host {
207
+ :host(:where(:not([hidden]))) {
208
208
  position: relative;
209
- }
210
- :host(:not([hidden])) {
211
209
  display: inline-flex;
212
210
  align-items: center;
213
211
  }
@@ -218,12 +216,12 @@ var li=Object.defineProperty,hi=Object.defineProperties;var ui=Object.getOwnProp
218
216
  </style>
219
217
  ${this.getContent()}
220
218
  <slot></slot>
221
- `}}lt([k],Se.prototype,"selector",2),lt([x],Se.prototype,"root",2),lt([x],Se.prototype,"element",2),lt([He],Se.prototype,"active",2),customElements.define("gem-use",Se);var qs=Object.defineProperty,xs=Object.getOwnPropertyDescriptor,os=(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};class ht extends A{constructor(){super();this.effect(()=>{this.shadowRoot&&(this.shadowRoot.innerHTML=`
219
+ `}}ct([M],we.prototype,"selector",2),ct([x],we.prototype,"root",2),ct([x],we.prototype,"element",2),ct([st],we.prototype,"active",2),customElements.define("gem-use",we);var Fs=Object.defineProperty,zs=Object.getOwnPropertyDescriptor,Kn=(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&&Fs(e,t,i),i};class lt extends A{constructor(){super();this.effect(()=>{this.shadowRoot&&(this.shadowRoot.innerHTML=`
222
220
  <style>
223
- :host {
221
+ :host(:where(:not([hidden]))) {
224
222
  display: contents;
225
223
  }
226
224
  ${this.contentcss}
227
225
  </style>
228
226
  ${this.content}
229
- `)},()=>[this.content,this.contentcss])}render(){}}os([k],ht.prototype,"content",2),os([k],ht.prototype,"contentcss",2),customElements.define("gem-unsafe",ht);var Us=Object.defineProperty,Bs=Object.getOwnPropertyDescriptor,Fs=(n,e,t,s)=>{for(var i=s>1?void 0:s?Bs(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&&Us(e,t,i),i};class Yt 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])}}Fs([x],Yt.prototype,"target",2),customElements.define("gem-reflect",Yt);const ut=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[ut]}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({[ut]:!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({[ut]:!1},n))}static shouldClose(){return!0}},e.inertStore=[],e.instance=null,e.store=z(C({[ut]:!1},n)),e}var zs=Object.defineProperty,Js=Object.getOwnPropertyDescriptor,Zt=(n,e,t,s)=>{for(var i=s>1?void 0:s?Js(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&&zs(e,t,i),i};o.GemDialogBaseElement=(ms=class extends A{constructor(){super();M(this,_e,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,_e)?g(this,_e).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,_e,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}},_e=new WeakMap,be=new WeakMap,ue=new WeakMap,ms),Zt([k],o.GemDialogBaseElement.prototype,"label",2),Zt([He],o.GemDialogBaseElement.prototype,"opened",2),o.GemDialogBaseElement=Zt([ce(E.store)],o.GemDialogBaseElement);const Xt=new WeakMap;function as(n){return Xt.get(n)}const en=new WeakMap;function Qs(n){return en.get(n)}function Ys(n,e){const t=Xt.get(e),s=en.get(e),i=Object.keys(t).reduce((r,a)=>!t[a]||!s[a]?r:r+`${s[a]}:${t[a]};`,"");n.textContent=`:root, :host {${i}}`}function Zs(n){const e=Ne(),t=document.createElement("style"),s=z(n),i={},r={};en.set(i,r),Xt.set(i,s),Object.keys(s).forEach(c=>{r[c]=`--${I(c)}-${e}`,i[c]=`var(${r[c]})`});const a=()=>Ys(t,i);return oe(s,a),a(),(document.head||document.documentElement).append(t),i}function Xs(n,e){const t=as(n);T(t,e)}const ei=/\$\d(?:<[^>]*>)?/,ti=/\$(\d)(<([^>]*)>)?/g,ni=3;function cs(n,...e){const t=n.split(ei),s=[];let i;for(;i=ti.exec(n);){const r=i[ni],a=Number(i[1])-1,c=e[a];s.push(typeof c=="function"?c(r):c)}return N(t,...s)}const De=new Set,tn=class{constructor(e){M(this,Pe);M(this,ft);M(this,mt);M(this,de);M(this,Te);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,ft,mi)||this.currentLanguage||g(this,mt,pi);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,on),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?cs(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,de,gt)&&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}`,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,T(this.store,{}),e!==this.currentLanguage&&G(this,Te,e,on),this.cache===!0&&this.setCache(),e}resetLanguage(){return g(this,de,gt)&&De.forEach(e=>e.resetLanguage()),G(this,Te,this.fallbackLanguage,on),this.cache&&localStorage.removeItem(g(this,Pe,rn)),this.setLanguage(this.detectLanguage())}setCache(){g(this,de,gt)&&De.forEach(e=>e.setCache()),localStorage.setItem(g(this,Pe,rn),this.currentLanguage)}createSubModule(e,t){const s=new tn({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 ls=tn;Pe=new WeakSet,rn=function(){return`${this.cachePrefix}:current`},ft=new WeakSet,mi=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:""}},mt=new WeakSet,pi=function(){return this.cache&&localStorage.getItem(g(this,Pe,rn))||""},de=new WeakSet,gt=function(){return!De.has(this)},Te=new WeakSet,on=function(e){var t;g(this,de,gt)&&(document.documentElement.lang=e),this.currentLanguage=e,(t=this.onChange)==null||t.call(this,e)};const hs={headers:{"Content-Type":"application/json"}};async function qe(n,e={}){const t=await fetch(n,C(C({},hs),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 si=Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)).constructor;function us(n){return n instanceof FormData||n instanceof Blob||n instanceof si||n instanceof URLSearchParams||n instanceof ReadableStream||n instanceof ArrayBuffer?n:typeof n=="object"?JSON.stringify(n):n}function ds(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 ii(n,e){return qe(ds(n,e),{method:"GET"})}function ri(n,e){return qe(ds(n,e),{method:"DELETE"})}function oi(n,e){return qe(n,{method:"PUT",body:us(e)})}function ai(n,e){return qe(n,{method:"POST",body:us(e)})}const R=n=>window.matchMedia(n).matches,ci={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)}},fs="1.7.0";window.__GEM_DEVTOOLS__HOOK__&&Object.assign(window.__GEM_DEVTOOLS__HOOK__,C({},f)),o.GemElement=A,o.GemError=K,o.GemLightRouteElement=ss,o.GemReflectElement=Yt,o.GemUnsafeElement=ht,o.GemUseElement=Se,o.I18n=ls,o.LinkedList=bt,o.PropProxyMap=Pt,o.QueryString=me,o.SVGTemplateResult=St,o.SheetToken=Fe,o.StoreListenerMap=re,o.TemplateResult=Le,o.absoluteLocation=Be,o.addMicrotask=H,o.addMicrotaskToStack=vn,o.adoptedStyle=Un,o.attribute=k,o.basePathStore=Kt,o.boolattribute=xt,o.camelToKebabCase=I,o.classMap=Lt,o.cleanObject=Oe,o.connect=oe,o.connectStore=ce,o.createCSSSheet=bn,o.createHistoryParams=ns,o.createModalClass=Ks,o.createPath=Qt,o.createStore=z,o.createStoreSet=$n,o.createTheme=Zs,o.css=_n,o.customElement=Fn,o.defaultReqInit=hs,o.defineAttribute=nt,o.defineCSSState=it,o.defineProperty=we,o.defineRef=st,o.del=ri,o.directive=Z,o.disconnect=$t,o.emitter=Ie,o.exportPartsMap=Ln,o.get=ii,o.getThemeProp=Qs,o.getThemeStore=as,o.globalemitter=qn,o.guard=Gn,o.history=E,o.html=N,o.ifDefined=At,o.isArrayChange=Ct,o.kebabToCamelCase=ge,o.matchPath=Jt,o.mediaQuery=ci,o.nativeDefineElement=rt,o.numattribute=jn,o.objectMapToString=Re,o.part=Ut,o.partMap=kn,o.post=ai,o.property=x,o.put=oi,o.randomStr=Ne,o.raw=pe,o.refobject=Wn,o.removeItems=kt,o.render=Ue,o.repeat=An,o.request=qe,o.rootElement=Bn,o.slot=Dn,o.splice=cs,o.state=He,o.styleMap=Cn,o.styled=Tn,o.svg=En,o.titleStore=le,o.updateStore=T,o.updateTheme=Xs,o.version=fs,Object.defineProperty(o,"__esModule",{value:!0}),o[Symbol.toStringTag]="Module"});
227
+ `)},()=>[this.content,this.contentcss])}render(){}}Kn([M],lt.prototype,"content",2),Kn([M],lt.prototype,"contentcss",2),customElements.define("gem-unsafe",lt);var Ks=Object.defineProperty,Js=Object.getOwnPropertyDescriptor,Qs=(n,e,t,s)=>{for(var i=s>1?void 0:s?Js(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};class Ut 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])}}Qs([x],Ut.prototype,"target",2),customElements.define("gem-reflect",Ut);const ht=Symbol("open mark");function Ys(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[S.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=()=>k(this.store,C({[ht]:!0},t));setTimeout(()=>{i(),S.push({title:s.label,open:i,close:this.closeHandle.bind(this),shouldClose:this.shouldClose.bind(this)})},100)}static close(){S.back()}static closeHandle(){var t;this.inertStore.forEach(s=>s.inert=!1),(t=this.instance)==null||t.remove(),k(this.store,C({[ht]:!1},n))}static shouldClose(){return!0}},e.inertStore=[],e.instance=null,e.store=J(C({[ht]:!1},n)),e}var Zs=Object.defineProperty,Xs=Object.getOwnPropertyDescriptor,Bt=(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&&Zs(e,t,i),i};o.GemDialogBaseElement=(ns=class extends A{constructor(){super();$(this,Se,void 0);$(this,ve,void 0);$(this,le,void 0);this.inert=!0,G(this,le,[]),this.closeHandle=()=>{var n;this.inert=!0,m(this,le).forEach(e=>e.inert=!1),m(this,Se)?m(this,Se).before(this):m(this,ve)&&((n=m(this,ve))==null||n.appendChild(this)),this.dispatchEvent(new CustomEvent("close")),this.opened=!1},this.openHandle=()=>{this.hidden=!1,this.inert=!1,G(this,Se,this.nextSibling),G(this,ve,this.parentElement||this.getRootNode()),G(this,le,[...document.body.children].filter(n=>!n.inert)),m(this,le).forEach(n=>n.inert=!0),document.body.append(this),this.dispatchEvent(new CustomEvent("open")),this.opened=!0},this.open=()=>{this.opened||(this.openHandle(),S.push({title:this.label,open:this.openHandle,close:this.closeHandle,shouldClose:this.shouldClose}))},this.close=()=>{S.back()},this.forceClose=()=>{this.opened=!1,setTimeout(this.close,100)},this.internals.role="dialog",this.internals.ariaModal="true"}shouldClose(){return!0}},Se=new WeakMap,ve=new WeakMap,le=new WeakMap,ns),Bt([M],o.GemDialogBaseElement.prototype,"label",2),Bt([st],o.GemDialogBaseElement.prototype,"opened",2),o.GemDialogBaseElement=Bt([ge(S.store)],o.GemDialogBaseElement);const Ft=new WeakMap;function Jn(n){return Ft.get(n)}const zt=new WeakMap;function ei(n){return zt.get(n)}function ti(n,e){const t=Ft.get(e),s=zt.get(e),i=Object.keys(t).reduce((r,a)=>!t[a]||!s[a]?r:r+`${s[a]}:${t[a]};`,"");n.textContent=`:root, :host {${i}}`}function ni(n){const e=De(),t=document.createElement("style"),s=J(n),i={},r={};zt.set(i,r),Ft.set(i,s),Object.keys(s).forEach(c=>{r[c]=`--${D(c)}-${e}`,i[c]=`var(${r[c]})`});const a=()=>ti(t,i);return fe(s,a),a(),(document.head||document.documentElement).append(t),i}function si(n,e){const t=Jn(n);k(t,e)}const ii=/\$\d(?:<[^>]*>)?/,ri=/\$(\d)(<([^>]*)>)?/g,oi=3;function Qn(n,...e){const t=n.split(ii),s=[];let i;for(;i=ri.exec(n);){const r=i[oi],a=Number(i[1])-1,c=e[a];s.push(typeof c=="function"?c(r):c)}return N(t,...s)}const Ie=new Set,Kt=class{constructor(e){$(this,be);$(this,dt);$(this,ft);$(this,he);$(this,Pe);if(this.cachePrefix="gem-i18n",!e.resources[e.fallbackLanguage])throw new K("i18n: fallbackLanguage invalid");this.store=J(this),Object.assign(this,e);let t=m(this,dt,wi)||this.currentLanguage||m(this,ft,Ei);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,Zt),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?Qn(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){m(this,he,gt)&&Ie.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 p=localStorage.key(h);p.startsWith(i)&&localStorage.removeItem(p)}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,k(this.store,{}),e!==this.currentLanguage&&G(this,Pe,e,Zt),this.cache===!0&&this.setCache(),e}resetLanguage(){return m(this,he,gt)&&Ie.forEach(e=>e.resetLanguage()),G(this,Pe,this.fallbackLanguage,Zt),this.cache&&localStorage.removeItem(m(this,be,Yt)),this.setLanguage(this.detectLanguage())}setCache(){m(this,he,gt)&&Ie.forEach(e=>e.setCache()),localStorage.setItem(m(this,be,Yt),this.currentLanguage)}createSubModule(e,t){const s=new Kt({resources:t,cachePrefix:`${this.cachePrefix}-${e}`,currentLanguage:this.currentLanguage,fallbackLanguage:this.fallbackLanguage,cache:this.cache});return Ie.add(s),s}toJSON(){return{currentLanguage:this.currentLanguage,currentLanguagePack:this.resources[this.currentLanguage]}}};let Yn=Kt;be=new WeakSet,Yt=function(){return`${this.cachePrefix}:current`},dt=new WeakSet,wi=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,Ei=function(){return this.cache&&localStorage.getItem(m(this,be,Yt))||""},he=new WeakSet,gt=function(){return!Ie.has(this)},Pe=new WeakSet,Zt=function(e){var t;m(this,he,gt)&&(document.documentElement.lang=e),this.currentLanguage=e,(t=this.onChange)==null||t.call(this,e)};const Zn={headers:{"Content-Type":"application/json"}};async function Ve(n,e={}){const t=await fetch(n,C(C({},Zn),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 ai=Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)).constructor;function Xn(n){return n instanceof FormData||n instanceof Blob||n instanceof ai||n instanceof URLSearchParams||n instanceof ReadableStream||n instanceof ArrayBuffer?n:typeof n=="object"?JSON.stringify(n):n}function es(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 ci(n,e){return Ve(es(n,e),{method:"GET"})}function li(n,e){return Ve(es(n,e),{method:"DELETE"})}function hi(n,e){return Ve(n,{method:"PUT",body:Xn(e)})}function ui(n,e){return Ve(n,{method:"POST",body:Xn(e)})}const R=n=>window.matchMedia(n).matches,di={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)}};o.GemElement=A,o.GemError=K,o.GemLightRouteElement=Bn,o.GemReflectElement=Ut,o.GemUnsafeElement=lt,o.GemUseElement=we,o.I18n=Yn,o.LinkedList=mn,o.PropProxyMap=pn,o.QueryString=Ne,o.SVGTemplateResult=Et,o.SheetToken=Pt,o.StoreListenerMap=de,o.TemplateResult=ke,o.absoluteLocation=bt,o.addMicrotask=j,o.addMicrotaskToStack=gs,o.adoptedStyle=Ms,o.attribute=M,o.basePathStore=Dn,o.boolattribute=Mn,o.camelToKebabCase=D,o.classMap=En,o.cleanObject=qe,o.connect=fe,o.connectStore=ge,o.createCSSSheet=ws,o.createHistoryParams=Un,o.createModalClass=Ys,o.createPath=xt,o.createStore=J,o.createStoreSet=Ps,o.createTheme=ni,o.css=ys,o.customElement=Rs,o.defaultReqInit=Zn,o.defineAttribute=Xe,o.defineCSSState=tt,o.defineProperty=pe,o.defineRef=et,o.del=li,o.directive=Y,o.disconnect=_n,o.emitter=it,o.exportPartsMap=bs,o.get=ci,o.getThemeProp=ei,o.getThemeStore=Jn,o.globalemitter=Ns,o.guard=kn,o.history=S,o.html=N,o.ifDefined=Nt,o.isArrayChange=yn,o.kebabToCamelCase=X,o.matchPath=qt,o.mediaQuery=di,o.nativeDefineElement=nt,o.numattribute=Ls,o.objectMapToString=xe,o.part=On,o.partMap=vs,o.post=ui,o.property=x,o.put=hi,o.randomStr=De,o.raw=Me,o.refobject=ks,o.removeItems=wn,o.render=je,o.repeat=Cn,o.request=Ve,o.rootElement=Os,o.slot=$s,o.splice=Qn,o.state=st,o.styleMap=Ss,o.styled=_s,o.svg=fn,o.titleStore=ye,o.updateStore=k,o.updateTheme=si,o.version=Sn,Object.defineProperty(o,"__esModule",{value:!0}),o[Symbol.toStringTag]="Module"});
@@ -5,6 +5,8 @@ import { GemElement } from '../../lib/element';
5
5
  * 模拟 top layer:https://github.com/whatwg/html/issues/4633.
6
6
  *
7
7
  * @attr label
8
+ * @fires open
9
+ * @fires close
8
10
  */
9
11
  export declare abstract class GemDialogBaseElement extends GemElement {
10
12
  #private;
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/elements/base/dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAI/C;;;;;;GAMG;AACH,8BACsB,oBAAqB,SAAQ,UAAU;;IAChD,KAAK,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAEvB,KAAK,UAAQ;;IAYb;;;OAGG;IACH,WAAW,aAUT;IAEF;;;OAGG;IACH,UAAU,aAUR;IAEF,YAAY;IACZ,IAAI,aASF;IAEF,WAAW;IAIX,YAAY;IACZ,KAAK,aAEH;IAEF;;;;;OAKG;IACH,UAAU,aAGR;CACH"}
1
+ {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/elements/base/dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAI/C;;;;;;;;GAQG;AACH,8BACsB,oBAAqB,SAAQ,UAAU;;IAChD,KAAK,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAEvB,KAAK,UAAQ;;IAYb;;;OAGG;IACH,WAAW,aAUT;IAEF;;;OAGG;IACH,UAAU,aAUR;IAEF,YAAY;IACZ,IAAI,aASF;IAEF,WAAW;IAIX,YAAY;IACZ,KAAK,aAEH;IAEF;;;;;OAKG;IACH,UAAU,aAGR;CACH"}
@@ -25,6 +25,8 @@ import { history } from '../../lib/history';
25
25
  * 模拟 top layer:https://github.com/whatwg/html/issues/4633.
26
26
  *
27
27
  * @attr label
28
+ * @fires open
29
+ * @fires close
28
30
  */
29
31
  let GemDialogBaseElement = class GemDialogBaseElement extends GemElement {
30
32
  constructor() {
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../src/elements/base/dialog.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C;;;;;;GAMG;AAEH,IAAsB,oBAAoB,GAA1C,MAAsB,oBAAqB,SAAQ,UAAU;IAU3D;QACE,KAAK,EAAE,CAAC;QAPV,UAAK,GAAG,IAAI,CAAC;QAEb,oDAA+B;QAC/B,sDAA4B;QAC5B,2CAA6B,EAAE,EAAC;QAQhC;;;WAGG;QACH,gBAAW,GAAG,GAAG,EAAE;;YACjB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;YAClB,uBAAA,IAAI,wCAAY,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC;YACnD,IAAI,uBAAA,IAAI,yCAAa,EAAE;gBACrB,uBAAA,IAAI,yCAAa,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;aAChC;iBAAM,IAAI,uBAAA,IAAI,2CAAe,EAAE;gBAC9B,MAAA,uBAAA,IAAI,2CAAe,0CAAE,WAAW,CAAC,IAAI,CAAC,CAAC;aACxC;YACD,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC;YAC7C,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACtB,CAAC,CAAC;QAEF;;;WAGG;QACH,eAAU,GAAG,GAAG,EAAE;YAChB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;YACpB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;YACnB,uBAAA,IAAI,qCAAgB,IAAI,CAAC,WAAW,MAAA,CAAC;YACrC,uBAAA,IAAI,uCAAkB,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,WAAW,EAAE,MAAA,CAAC;YAC/D,uBAAA,IAAI,oCAAgB,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAmB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,MAAA,CAAC;YAC1F,uBAAA,IAAI,wCAAY,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC;YAClD,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAC3B,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;YAC5C,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACrB,CAAC,CAAC;QAEF,YAAY;QACZ,SAAI,GAAG,GAAG,EAAE;YACV,IAAI,IAAI,CAAC,MAAM;gBAAE,OAAO;YACxB,IAAI,CAAC,UAAU,EAAE,CAAC;YAClB,OAAO,CAAC,IAAI,CAAC;gBACX,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,IAAI,EAAE,IAAI,CAAC,UAAU;gBACrB,KAAK,EAAE,IAAI,CAAC,WAAW;gBACvB,WAAW,EAAE,IAAI,CAAC,WAAW;aAC9B,CAAC,CAAC;QACL,CAAC,CAAC;QAMF,YAAY;QACZ,UAAK,GAAG,GAAG,EAAE;YACX,OAAO,CAAC,IAAI,EAAE,CAAC;QACjB,CAAC,CAAC;QAEF;;;;;WAKG;QACH,eAAU,GAAG,GAAG,EAAE;YAChB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;YACpB,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAC9B,CAAC,CAAC;QAlEA,IAAI,CAAC,SAAS,CAAC,IAAI,GAAG,QAAQ,CAAC;QAC/B,IAAI,CAAC,SAAS,CAAC,SAAS,GAAG,MAAM,CAAC;IACpC,CAAC;IA8CD,WAAW;QACT,OAAO,IAAI,CAAC;IACd,CAAC;CAiBF,CAAA;;AA9EY;IAAV,SAAS;mDAAe;AAClB;IAAN,KAAK;oDAAiB;AAFH,oBAAoB;IADzC,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC;GACN,oBAAoB,CA+EzC;SA/EqB,oBAAoB"}
1
+ {"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../src/elements/base/dialog.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C;;;;;;;;GAQG;AAEH,IAAsB,oBAAoB,GAA1C,MAAsB,oBAAqB,SAAQ,UAAU;IAU3D;QACE,KAAK,EAAE,CAAC;QAPV,UAAK,GAAG,IAAI,CAAC;QAEb,oDAA+B;QAC/B,sDAA4B;QAC5B,2CAA6B,EAAE,EAAC;QAQhC;;;WAGG;QACH,gBAAW,GAAG,GAAG,EAAE;;YACjB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;YAClB,uBAAA,IAAI,wCAAY,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC;YACnD,IAAI,uBAAA,IAAI,yCAAa,EAAE;gBACrB,uBAAA,IAAI,yCAAa,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;aAChC;iBAAM,IAAI,uBAAA,IAAI,2CAAe,EAAE;gBAC9B,MAAA,uBAAA,IAAI,2CAAe,0CAAE,WAAW,CAAC,IAAI,CAAC,CAAC;aACxC;YACD,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC;YAC7C,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACtB,CAAC,CAAC;QAEF;;;WAGG;QACH,eAAU,GAAG,GAAG,EAAE;YAChB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;YACpB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;YACnB,uBAAA,IAAI,qCAAgB,IAAI,CAAC,WAAW,MAAA,CAAC;YACrC,uBAAA,IAAI,uCAAkB,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,WAAW,EAAE,MAAA,CAAC;YAC/D,uBAAA,IAAI,oCAAgB,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAmB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,MAAA,CAAC;YAC1F,uBAAA,IAAI,wCAAY,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC;YAClD,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAC3B,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;YAC5C,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACrB,CAAC,CAAC;QAEF,YAAY;QACZ,SAAI,GAAG,GAAG,EAAE;YACV,IAAI,IAAI,CAAC,MAAM;gBAAE,OAAO;YACxB,IAAI,CAAC,UAAU,EAAE,CAAC;YAClB,OAAO,CAAC,IAAI,CAAC;gBACX,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,IAAI,EAAE,IAAI,CAAC,UAAU;gBACrB,KAAK,EAAE,IAAI,CAAC,WAAW;gBACvB,WAAW,EAAE,IAAI,CAAC,WAAW;aAC9B,CAAC,CAAC;QACL,CAAC,CAAC;QAMF,YAAY;QACZ,UAAK,GAAG,GAAG,EAAE;YACX,OAAO,CAAC,IAAI,EAAE,CAAC;QACjB,CAAC,CAAC;QAEF;;;;;WAKG;QACH,eAAU,GAAG,GAAG,EAAE;YAChB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;YACpB,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAC9B,CAAC,CAAC;QAlEA,IAAI,CAAC,SAAS,CAAC,IAAI,GAAG,QAAQ,CAAC;QAC/B,IAAI,CAAC,SAAS,CAAC,SAAS,GAAG,MAAM,CAAC;IACpC,CAAC;IA8CD,WAAW;QACT,OAAO,IAAI,CAAC;IACd,CAAC;CAiBF,CAAA;;AA9EY;IAAV,SAAS;mDAAe;AAClB;IAAN,KAAK;oDAAiB;AAFH,oBAAoB;IADzC,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC;GACN,oBAAoB,CA+EzC;SA/EqB,oBAAoB"}
@@ -180,7 +180,7 @@ export class GemGestureElement extends GemElement {
180
180
  render() {
181
181
  return html `
182
182
  <style>
183
- :host {
183
+ :host(:where(:not([hidden]))) {
184
184
  display: block;
185
185
  user-select: none;
186
186
  touch-action: ${this.touchAction || 'none'};
@@ -14,6 +14,7 @@ import { RouteItem, RouteOptions } from './route';
14
14
  * print bug: https://github.com/mantou132/gem/issues/36
15
15
  */
16
16
  export declare class GemLinkElement extends GemElement {
17
+ #private;
17
18
  href: string;
18
19
  target: string;
19
20
  path: string;
@@ -22,7 +23,9 @@ export declare class GemLinkElement extends GemElement {
22
23
  docTitle: string;
23
24
  hint: 'on' | 'off';
24
25
  route: RouteItem | undefined;
26
+ /**@deprecated */
25
27
  options: RouteOptions | undefined;
28
+ routeOptions: RouteOptions | undefined;
26
29
  prepare: (() => void | Promise<void>) | undefined;
27
30
  link: string;
28
31
  constructor();
@@ -1 +1 @@
1
- {"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../src/elements/base/link.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAmB,MAAM,mBAAmB,CAAC;AAKhE,OAAO,EAAa,SAAS,EAAE,YAAY,EAAmC,MAAM,SAAS,CAAC;AAE9F;;;;;;;;;;;;GAYG;AACH,qBACa,cAAe,SAAQ,UAAU;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,IAAI,GAAG,KAAK,CAAC;IAGpB,KAAK,EAAE,SAAS,GAAG,SAAS,CAAC;IAC7B,OAAO,EAAE,YAAY,GAAG,SAAS,CAAC;IAClC,OAAO,EAAE,CAAC,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,SAAS,CAAC;IAEtD,IAAI,EAAE,MAAM,CAAC;;IASnB,WAAW;IAoBX,UAAU,CAAC,QAAQ,EAAE,MAAM;IAI3B,WAAW,MAAa,UAAU,mBAiDhC;IAEF,cAAc,MAAO,UAAU,UAE7B;IAEF,MAAM,CAAC,QAAQ,SAAqB;CAgCrC;AAED;;;GAGG;AACH,qBACa,oBAAqB,SAAQ,cAAc;IAC3C,OAAO,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAEvB,MAAM;CAWP"}
1
+ {"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../src/elements/base/link.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAmB,MAAM,mBAAmB,CAAC;AAKhE,OAAO,EAAa,SAAS,EAAE,YAAY,EAAmC,MAAM,SAAS,CAAC;AAE9F;;;;;;;;;;;;GAYG;AACH,qBACa,cAAe,SAAQ,UAAU;;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,IAAI,GAAG,KAAK,CAAC;IAGpB,KAAK,EAAE,SAAS,GAAG,SAAS,CAAC;IACvC,iBAAiB;IACP,OAAO,EAAE,YAAY,GAAG,SAAS,CAAC;IAClC,YAAY,EAAE,YAAY,GAAG,SAAS,CAAC;IACvC,OAAO,EAAE,CAAC,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,SAAS,CAAC;IAEtD,IAAI,EAAE,MAAM,CAAC;;IAanB,WAAW;IAoBX,UAAU,CAAC,QAAQ,EAAE,MAAM;IAI3B,WAAW,MAAa,UAAU,mBAiDhC;IAEF,cAAc,MAAO,UAAU,UAE7B;IAEF,MAAM,CAAC,QAAQ,SAAqB;CAgCrC;AAED;;;GAGG;AACH,qBACa,oBAAqB,SAAQ,cAAc;IAC3C,OAAO,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAEvB,MAAM;CAWP"}
@@ -4,6 +4,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
8
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
9
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
10
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
11
+ };
12
+ var _GemLinkElement_instances, _GemLinkElement_routeOptions_get;
7
13
  import { GemElement, html, ifDefined } from '../../lib/element';
8
14
  import { attribute, property, state, part, connectStore } from '../../lib/decorators';
9
15
  import { history, basePathStore } from '../../lib/history';
@@ -25,6 +31,7 @@ import { matchPath, createHistoryParams, createPath } from './route';
25
31
  let GemLinkElement = class GemLinkElement extends GemElement {
26
32
  constructor() {
27
33
  super();
34
+ _GemLinkElement_instances.add(this);
28
35
  this.clickHandle = async (e) => {
29
36
  var _a;
30
37
  const pathInfo = this.getPathInfo();
@@ -56,7 +63,7 @@ let GemLinkElement = class GemLinkElement extends GemElement {
56
63
  await ((_a = this.prepare) === null || _a === void 0 ? void 0 : _a.call(this));
57
64
  if (this.route) {
58
65
  history.pushIgnoreCloseHandle({
59
- ...createHistoryParams(this.route, this.options),
66
+ ...createHistoryParams(this.route, __classPrivateFieldGet(this, _GemLinkElement_instances, "a", _GemLinkElement_routeOptions_get)),
60
67
  title: this.route.title || this.docTitle,
61
68
  });
62
69
  }
@@ -83,9 +90,9 @@ let GemLinkElement = class GemLinkElement extends GemElement {
83
90
  getPathInfo() {
84
91
  var _a, _b;
85
92
  if (this.route) {
86
- const queryProp = ((_a = this.options) === null || _a === void 0 ? void 0 : _a.query) || '';
87
- const hashProp = ((_b = this.options) === null || _b === void 0 ? void 0 : _b.hash) || '';
88
- return createPath(this.route, this.options) + queryProp + hashProp;
93
+ const queryProp = ((_a = __classPrivateFieldGet(this, _GemLinkElement_instances, "a", _GemLinkElement_routeOptions_get)) === null || _a === void 0 ? void 0 : _a.query) || '';
94
+ const hashProp = ((_b = __classPrivateFieldGet(this, _GemLinkElement_instances, "a", _GemLinkElement_routeOptions_get)) === null || _b === void 0 ? void 0 : _b.hash) || '';
95
+ return createPath(this.route, __classPrivateFieldGet(this, _GemLinkElement_instances, "a", _GemLinkElement_routeOptions_get)) + queryProp + hashProp;
89
96
  }
90
97
  else {
91
98
  const url = this.href || this.path + this.query + this.hash;
@@ -138,6 +145,9 @@ let GemLinkElement = class GemLinkElement extends GemElement {
138
145
  `;
139
146
  }
140
147
  };
148
+ _GemLinkElement_instances = new WeakSet(), _GemLinkElement_routeOptions_get = function _GemLinkElement_routeOptions_get() {
149
+ return this.routeOptions || this.options;
150
+ };
141
151
  __decorate([
142
152
  attribute
143
153
  ], GemLinkElement.prototype, "href", void 0);
@@ -165,6 +175,9 @@ __decorate([
165
175
  __decorate([
166
176
  property
167
177
  ], GemLinkElement.prototype, "options", void 0);
178
+ __decorate([
179
+ property
180
+ ], GemLinkElement.prototype, "routeOptions", void 0);
168
181
  __decorate([
169
182
  property
170
183
  ], GemLinkElement.prototype, "prepare", void 0);