@mantou/gem 1.7.11 → 2.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1 -1
  3. package/dist/gem.es.js +1962 -1689
  4. package/dist/gem.umd.js +52 -54
  5. package/elements/base/dialog.d.ts +0 -11
  6. package/elements/base/dialog.d.ts.map +1 -1
  7. package/elements/base/dialog.js +93 -66
  8. package/elements/base/dialog.js.map +1 -1
  9. package/elements/base/gesture.d.ts +1 -2
  10. package/elements/base/gesture.d.ts.map +1 -1
  11. package/elements/base/gesture.js +157 -96
  12. package/elements/base/gesture.js.map +1 -1
  13. package/elements/base/link.d.ts +5 -5
  14. package/elements/base/link.d.ts.map +1 -1
  15. package/elements/base/link.js +249 -145
  16. package/elements/base/link.js.map +1 -1
  17. package/elements/base/modal-factory.d.ts +147 -139
  18. package/elements/base/modal-factory.d.ts.map +1 -1
  19. package/elements/base/modal-factory.js +84 -25
  20. package/elements/base/modal-factory.js.map +1 -1
  21. package/elements/base/reflect.d.ts +0 -1
  22. package/elements/base/reflect.d.ts.map +1 -1
  23. package/elements/base/reflect.js +83 -38
  24. package/elements/base/reflect.js.map +1 -1
  25. package/elements/base/route.d.ts +12 -24
  26. package/elements/base/route.d.ts.map +1 -1
  27. package/elements/base/route.js +263 -164
  28. package/elements/base/route.js.map +1 -1
  29. package/elements/base/title.d.ts +3 -11
  30. package/elements/base/title.d.ts.map +1 -1
  31. package/elements/base/title.js +110 -59
  32. package/elements/base/title.js.map +1 -1
  33. package/elements/base/unsafe.d.ts +0 -1
  34. package/elements/base/unsafe.d.ts.map +1 -1
  35. package/elements/base/unsafe.js +82 -33
  36. package/elements/base/unsafe.js.map +1 -1
  37. package/elements/base/use.d.ts.map +1 -1
  38. package/elements/base/use.js +95 -47
  39. package/elements/base/use.js.map +1 -1
  40. package/helper/i18n.d.ts +4 -9
  41. package/helper/i18n.d.ts.map +1 -1
  42. package/helper/i18n.js +69 -65
  43. package/helper/i18n.js.map +1 -1
  44. package/helper/logger.js +10 -9
  45. package/helper/logger.js.map +1 -1
  46. package/helper/react-shim.d.ts +15 -0
  47. package/helper/react-shim.d.ts.map +1 -0
  48. package/helper/react-shim.js +56 -0
  49. package/helper/react-shim.js.map +1 -0
  50. package/helper/react-utils.d.ts +15 -0
  51. package/helper/react-utils.d.ts.map +1 -0
  52. package/helper/react-utils.js +50 -0
  53. package/helper/react-utils.js.map +1 -0
  54. package/helper/request.d.ts +17 -7
  55. package/helper/request.d.ts.map +1 -1
  56. package/helper/request.js +103 -53
  57. package/helper/request.js.map +1 -1
  58. package/helper/ssr-shim.d.ts.map +1 -1
  59. package/helper/ssr-shim.js +8 -1
  60. package/helper/ssr-shim.js.map +1 -1
  61. package/helper/theme.d.ts +14 -21
  62. package/helper/theme.d.ts.map +1 -1
  63. package/helper/theme.js +55 -38
  64. package/helper/theme.js.map +1 -1
  65. package/index.d.ts +4 -3
  66. package/index.d.ts.map +1 -1
  67. package/index.js +5 -3
  68. package/index.js.map +1 -1
  69. package/lib/decorators.d.ts +74 -41
  70. package/lib/decorators.d.ts.map +1 -1
  71. package/lib/decorators.js +324 -84
  72. package/lib/decorators.js.map +1 -1
  73. package/lib/directives.d.ts +4 -0
  74. package/lib/directives.d.ts.map +1 -0
  75. package/lib/directives.js +5 -0
  76. package/lib/directives.js.map +1 -0
  77. package/lib/element.d.ts +112 -110
  78. package/lib/element.d.ts.map +1 -1
  79. package/lib/element.js +431 -470
  80. package/lib/element.js.map +1 -1
  81. package/lib/history.d.ts +4 -0
  82. package/lib/history.d.ts.map +1 -1
  83. package/lib/history.js +12 -13
  84. package/lib/history.js.map +1 -1
  85. package/lib/store.d.ts +1 -1
  86. package/lib/store.d.ts.map +1 -1
  87. package/lib/store.js +4 -5
  88. package/lib/store.js.map +1 -1
  89. package/lib/utils.d.ts +3 -43
  90. package/lib/utils.d.ts.map +1 -1
  91. package/lib/utils.js +61 -246
  92. package/lib/utils.js.map +1 -1
  93. package/lib/version.d.ts +1 -1
  94. package/lib/version.d.ts.map +1 -1
  95. package/lib/version.js +2 -1
  96. package/lib/version.js.map +1 -1
  97. package/package.json +12 -11
  98. package/src/dist.ts +3 -2
  99. package/src/elements/base/dialog.ts +10 -20
  100. package/src/elements/base/gesture.ts +16 -14
  101. package/src/elements/base/link.ts +65 -44
  102. package/src/elements/base/modal-factory.ts +14 -14
  103. package/src/elements/base/reflect.ts +24 -32
  104. package/src/elements/base/route.ts +55 -68
  105. package/src/elements/base/title.ts +25 -42
  106. package/src/elements/base/unsafe.ts +12 -21
  107. package/src/elements/base/use.ts +17 -13
  108. package/src/helper/i18n.ts +20 -14
  109. package/src/helper/react-utils.ts +66 -0
  110. package/src/helper/request.ts +122 -53
  111. package/src/helper/ssr-shim.ts +8 -1
  112. package/src/helper/theme.ts +72 -45
  113. package/src/index.ts +6 -4
  114. package/src/lib/decorators.ts +394 -93
  115. package/src/lib/directives.ts +6 -0
  116. package/src/lib/element.ts +473 -499
  117. package/src/lib/history.ts +4 -3
  118. package/src/lib/store.ts +2 -1
  119. package/src/lib/utils.ts +19 -205
  120. package/src/lib/version.ts +2 -1
  121. package/src/test/elements/link.test.ts +1 -1
  122. package/src/test/elements/title.test.ts +1 -0
  123. package/src/test/gem-element/advance.test.ts +72 -49
  124. package/src/test/gem-element/basic.test.ts +37 -50
  125. package/src/test/gem-element/decorators.test.ts +22 -21
  126. package/src/test/gem-element/multi.test.ts +5 -5
  127. package/src/test/utils.test.ts +16 -38
package/dist/gem.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- var Cn=(o,v,L)=>{if(!v.has(o))throw TypeError("Cannot "+L)};var g=(o,v,L)=>(Cn(o,v,"read from private field"),L?L.call(o):v.get(o)),N=(o,v,L)=>{if(v.has(o))throw TypeError("Cannot add the same private member more than once");v instanceof WeakSet?v.add(o):v.set(o,L)},Y=(o,v,L,Z)=>(Cn(o,v,"write to private field"),Z?Z.call(o,L):v.set(o,L),L);var kn=(o,v,L)=>(Cn(o,v,"access private method"),L);(function(o,v){typeof exports=="object"&&typeof module<"u"?v(exports):typeof define=="function"&&define.amd?define(["exports"],v):(o=typeof globalThis<"u"?globalThis:o||self,v(o.Gem={}))})(this,function(o){var oe,X,ae,Qe,Ln,ke,Mt,Xe,Nt,js,Le,At,Ot,Bs,Rt,Fs,de,Ze,Te,Ht;"use strict";const v=Object.freeze(Object.defineProperty({__proto__:null,get GemElement(){return R},get SVGTemplateResult(){return It},get TemplateResult(){return Ne},get defineAttribute(){return pt},get defineCSSState(){return gt},get defineProperty(){return we},get defineRef(){return mt},get directive(){return Z},get guard(){return es},get html(){return V},get ifDefined(){return Qt},get nativeDefineElement(){return yt},get render(){return qt},get repeat(){return Zn},get svg(){return Dn}},Symbol.toStringTag,{value:"Module"}));/**
1
+ (function(h,M){typeof exports=="object"&&typeof module<"u"?M(exports):typeof define=="function"&&define.amd?define(["exports"],M):(h=typeof globalThis<"u"?globalThis:h||self,M(h.Gem={}))})(this,function(h){"use strict";var Yl=Object.defineProperty;var qa=h=>{throw TypeError(h)};var Xl=(h,M,A)=>M in h?Yl(h,M,{enumerable:!0,configurable:!0,writable:!0,value:A}):h[M]=A;var N=(h,M,A)=>Xl(h,typeof M!="symbol"?M+"":M,A),Ps=(h,M,A)=>M.has(h)||qa("Cannot "+A);var p=(h,M,A)=>(Ps(h,M,"read from private field"),A?A.call(h):M.get(h)),C=(h,M,A)=>M.has(h)?qa("Cannot add the same private member more than once"):M instanceof WeakSet?M.add(h):M.set(h,A),O=(h,M,A,St)=>(Ps(h,M,"write to private field"),St?St.call(h,A):M.set(h,A),A),ks=(h,M,A)=>(Ps(h,M,"access private method"),A);var At,gt,Rt,dn,Ts,pe,Gn,ut,Ft,fn,_e,me,ge,ve,nt,vt,qt,It,we,wt,Se,ye,pn,ct,Ce,Ms,Vn,Dn,_n,$e,Ut,Fn,qn,Un,mn,Ee,R,Bn,ja,Ka,gn,jn;const M=Object.freeze(Object.defineProperty({__proto__:null,get adoptedStyle(){return Cn},get aria(){return Ge},get async(){return pr},get attribute(){return D},get boolattribute(){return He},get connectStore(){return ze},get customElement(){return _r},get effect(){return ft},get emitter(){return Yt},get fallback(){return lr},get globalemitter(){return dr},get memo(){return hi},get mounted(){return Qt},get numattribute(){return ar},get part(){return di},get property(){return U},get shadow(){return kt},get slot(){return ur},get state(){return xe},get template(){return ui},get unmounted(){return cr},get willMount(){return We}},Symbol.toStringTag,{value:"Module"}));/**
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 Cn=(o,v,L)=>{if(!v.has(o))throw TypeError("Cannot "+L)};var g=(o,v,L)=>(Cn(o
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 L=new WeakMap,Z=n=>(...e)=>{const t=n(...e);return L.set(t,!0),t},$e=n=>typeof n=="function"&&L.has(n);/**
13
+ */const A=new WeakMap,St=e=>(...t)=>{const n=e(...t);return A.set(n,!0),n},Pe=e=>typeof e=="function"&&A.has(e);/**
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 Cn=(o,v,L)=>{if(!v.has(o))throw TypeError("Cannot "+L)};var g=(o,v,L)=>(Cn(o
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 Tn=typeof window<"u"&&window.customElements!=null&&window.customElements.polyfillWrapFlushCallback!==void 0,$n=(n,e,t=null,s=null)=>{for(;e!==t;){const i=e.nextSibling;n.insertBefore(e,s),e=i}},Gt=(n,e,t=null)=>{for(;e!==t;){const s=e.nextSibling;n.removeChild(e),e=s}};/**
25
+ */const Os=typeof window<"u"&&window.customElements!=null&&window.customElements.polyfillWrapFlushCallback!==void 0,Ls=(e,t,n=null,i=null)=>{for(;t!==n;){const s=t.nextSibling;e.insertBefore(t,i),t=s}},Kn=(e,t,n=null)=>{for(;t!==n;){const i=t.nextSibling;e.removeChild(t),t=i}};/**
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 Cn=(o,v,L)=>{if(!v.has(o))throw TypeError("Cannot "+L)};var g=(o,v,L)=>(Cn(o
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 x={},Mn={};/**
37
+ */const it={},Ns={};/**
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 Cn=(o,v,L)=>{if(!v.has(o))throw TypeError("Cannot "+L)};var g=(o,v,L)=>(Cn(o
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 ee=`{{lit-${String(Math.random()).slice(2)}}}`,Nn=`<!--${ee}-->`,On=new RegExp(`${ee}|${Nn}`),Me="$lit$";class Ks{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:u,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 b=d.attributes,{length:f}=b;let w=0;for(let p=0;p<f;p++)Rn(b[p].name,Me)&&w++;for(;w-- >0;){const p=u[l],E=Wt.exec(p)[2],S=E.toLowerCase()+Me,B=d.getAttribute(S);d.removeAttribute(S);const I=B.split(On);this.parts.push({type:"attribute",index:c,name:E,strings:I}),l+=I.length-1}}d.tagName==="TEMPLATE"&&(i.push(d),r.currentNode=d.content)}else if(d.nodeType===3){const b=d.data;if(b.indexOf(ee)>=0){const f=d.parentNode,w=b.split(On),p=w.length-1;for(let E=0;E<p;E++){let S,B=w[E];if(B==="")S=F();else{const I=Wt.exec(B);I!==null&&Rn(I[2],Me)&&(B=B.slice(0,I.index)+I[1]+I[2].slice(0,-Me.length)+I[3]),S=document.createTextNode(B)}f.insertBefore(S,d),this.parts.push({type:"node",index:++c})}w[p]===""?(f.insertBefore(F(),d),s.push(d)):d.data=w[p],l+=p}}else if(d.nodeType===8)if(d.data===ee){const b=d.parentNode;(d.previousSibling===null||c===a)&&(c++,b.insertBefore(F(),d)),a=c,this.parts.push({type:"node",index:c}),d.nextSibling===null?d.data="":(s.push(d),c--),l++}else{let b=-1;for(;(b=d.data.indexOf(ee,b+1))!==-1;)this.parts.push({type:"node",index:-1}),l++}}for(const d of s)d.parentNode.removeChild(d)}}const Rn=(n,e)=>{const t=n.length-e.length;return t>=0&&n.slice(t)===e},zs=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 yt=`{{lit-${String(Math.random()).slice(2)}}}`,As=`<!--${yt}-->`,Rs=new RegExp(`${yt}|${As}`),ke="$lit$";class Ja{constructor(t,n){this.parts=[],this.element=n;const i=[],s=[],o=document.createTreeWalker(n.content,133,null,!1);let c=0,a=-1,_=0;const{strings:u,values:{length:v}}=t;for(;_<v;){const r=o.nextNode();if(r===null){o.currentNode=s.pop();continue}if(a++,r.nodeType===1){if(r.hasAttributes()){const m=r.attributes,{length:l}=m;let g=0;for(let w=0;w<l;w++)Is(m[w].name,ke)&&g++;for(;g-- >0;){const w=u[_],y=Jn.exec(w)[2],b=y.toLowerCase()+ke,f=r.getAttribute(b);r.removeAttribute(b);const $=f.split(Rs);this.parts.push({type:"attribute",index:a,name:y,strings:$}),_+=$.length-1}}r.tagName==="TEMPLATE"&&(s.push(r),o.currentNode=r.content)}else if(r.nodeType===3){const m=r.data;if(m.indexOf(yt)>=0){const l=r.parentNode,g=m.split(Rs),w=g.length-1;for(let y=0;y<w;y++){let b,f=g[y];if(f==="")b=lt();else{const $=Jn.exec(f);$!==null&&Is($[2],ke)&&(f=f.slice(0,$.index)+$[1]+$[2].slice(0,-ke.length)+$[3]),b=document.createTextNode(f)}l.insertBefore(b,r),this.parts.push({type:"node",index:++a})}g[w]===""?(l.insertBefore(lt(),r),i.push(r)):r.data=g[w],_+=w}}else if(r.nodeType===8)if(r.data===yt){const m=r.parentNode;(r.previousSibling===null||a===c)&&(a++,m.insertBefore(lt(),r)),c=a,this.parts.push({type:"node",index:a}),r.nextSibling===null?r.data="":(i.push(r),a--),_++}else{let m=-1;for(;(m=r.data.indexOf(yt,m+1))!==-1;)this.parts.push({type:"node",index:-1}),_++}}for(const r of i)r.parentNode.removeChild(r)}}const Is=(e,t)=>{const n=e.length-t.length;return n>=0&&e.slice(n)===t},Qa=e=>e.index!==-1,lt=()=>document.createComment(""),Jn=/([ \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 Cn=(o,v,L)=>{if(!v.has(o))throw TypeError("Cannot "+L)};var g=(o,v,L)=>(Cn(o
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 An{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=Tn?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],!zs(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 u=this.processor.handleTextExpression(this.options);u.insertAfterNode(l.previousSibling),this.__parts.push(u)}else this.__parts.push(...this.processor.handleAttributeExpressions(l,c.name,c.strings,this.options));r++}return Tn&&(document.adoptNode(e),customElements.upgrade(e)),e}}/**
61
+ */class Hs{constructor(t,n,i){this.__parts=[],this.template=t,this.processor=n,this.options=i}update(t){let n=0;for(const i of this.__parts)i!==void 0&&i.setValue(t[n]),n++;for(const i of this.__parts)i!==void 0&&i.commit()}_clone(){const t=Os?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),n=[],i=this.template.parts,s=document.createTreeWalker(t,133,null,!1);let o=0,c=0,a,_=s.nextNode();for(;o<i.length;){if(a=i[o],!Qa(a)){this.__parts.push(void 0),o++;continue}for(;c<a.index;)c++,_.nodeName==="TEMPLATE"&&(n.push(_),s.currentNode=_.content),(_=s.nextNode())===null&&(s.currentNode=n.pop(),_=s.nextNode());if(a.type==="node"){const u=this.processor.handleTextExpression(this.options);u.insertAfterNode(_.previousSibling),this.__parts.push(u)}else this.__parts.push(...this.processor.handleAttributeExpressions(_,a.name,a.strings,this.options));o++}return Os&&(document.adoptNode(t),customElements.upgrade(t)),t}}/**
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 Cn=(o,v,L)=>{if(!v.has(o))throw TypeError("Cannot "+L)};var g=(o,v,L)=>(Cn(o
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 Hn=window.trustedTypes&&trustedTypes.createPolicy("lit-html",{createHTML:n=>n}),Js=` ${ee} `;class Ne{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?Js:Nn):t+=r.substr(0,c.index)+c[1]+c[2]+Me+c[3]+ee}return t+=this.strings[e],t}getTemplateElement(){const e=document.createElement("template");let t=this.getHTML();return Hn!==void 0&&(t=Hn.createHTML(t)),e.innerHTML=t,e}}class It extends Ne{getHTML(){return`<svg>${super.getHTML()}</svg>`}getTemplateElement(){const e=super.getTemplateElement(),t=e.content,s=t.firstChild;return t.removeChild(s),$n(t,s.firstChild),e}}/**
73
+ */const Ws=window.trustedTypes&&trustedTypes.createPolicy("lit-html",{createHTML:e=>e}),Ya=` ${yt} `;class Te{constructor(t,n,i,s){this.strings=t,this.values=n,this.type=i,this.processor=s}getHTML(){const t=this.strings.length-1;let n="",i=!1;for(let s=0;s<t;s++){const o=this.strings[s],c=o.lastIndexOf("<!--");i=(c>-1||i)&&o.indexOf("-->",c+1)===-1;const a=Jn.exec(o);a===null?n+=o+(i?Ya:As):n+=o.substr(0,a.index)+a[1]+a[2]+ke+a[3]+yt}return n+=this.strings[t],n}getTemplateElement(){const t=document.createElement("template");let n=this.getHTML();return Ws!==void 0&&(n=Ws.createHTML(n)),t.innerHTML=n,t}}class Qn extends Te{getHTML(){return`<svg>${super.getHTML()}</svg>`}getTemplateElement(){const t=super.getTemplateElement(),n=t.content,i=n.firstChild;return n.removeChild(i),Ls(n,i.firstChild),t}}/**
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 Cn=(o,v,L)=>{if(!v.has(o))throw TypeError("Cannot "+L)};var g=(o,v,L)=>(Cn(o
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 xt=n=>n===null||!(typeof n=="object"||typeof n=="function"),Vt=n=>Array.isArray(n)||!!(n&&n[Symbol.iterator]);class Gn{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 Dt(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(xt(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 Dt{constructor(e){this.value=void 0,this.committer=e}setValue(e){e!==x&&(!xt(e)||e!==this.value)&&(this.value=e,$e(e)||(this.committer.dirty=!0))}commit(){for(;$e(this.value);){const e=this.value;this.value=x,e(this)}this.value!==x&&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(;$e(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=x,t(this)}const e=this.__pendingValue;e!==x&&(xt(e)?e!==this.value&&this.__commitText(e):e instanceof Ne?this.__commitTemplateResult(e):e instanceof Node?this.__commitNode(e):Vt(e)?this.__commitIterable(e):e===Mn?(this.value=Mn,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??"";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 An&&this.value.template===t)this.value.update(e.values);else{const s=new An(t,e.processor,this.options),i=s._clone();s.update(e.values),this.__commitNode(i),this.value=s}}__commitIterable(e){Array.isArray(this.value)||(this.value=[],this.clear());const t=this.value;let s=0,i;for(const r of e)i=t[s],i===void 0&&(i=new fe(this.options),t.push(i),s===0?i.appendIntoPart(this):i.insertAfterPart(t[s-1])),i.setValue(r),i.commit(),s++;s<t.length&&(t.length=s,this.clear(i&&i.endNode))}clear(e=this.startNode){Gt(this.startNode.parentNode,e.nextSibling,this.endNode)}}class Qs{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(;$e(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=x,t(this)}if(this.__pendingValue===x)return;const e=!!this.__pendingValue;this.value!==e&&(e?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=e),this.__pendingValue=x}}class Xs extends Gn{constructor(e,t,s){super(e,t,s),this.single=s.length===2&&s[0]===""&&s[1]===""}_createPart(){return new Ys(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}class Ys extends Dt{}let Wn=!1;(()=>{try{const n={get capture(){return Wn=!0,!1}};window.addEventListener("test",n,n),window.removeEventListener("test",n,n)}catch{}})();class Zs{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(;$e(this.__pendingValue);){const r=this.__pendingValue;this.__pendingValue=x,r(this)}if(this.__pendingValue===x)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=ei(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=x}handleEvent(e){typeof this.value=="function"?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}}const ei=n=>n&&(Wn?{capture:n.capture,passive:n.passive,once:n.once}:n.capture);/**
85
+ */const Yn=e=>e===null||!(typeof e=="object"||typeof e=="function"),Xn=e=>Array.isArray(e)||!!(e&&e[Symbol.iterator]);class xs{constructor(t,n,i){this.dirty=!0,this.element=t,this.name=n,this.strings=i,this.parts=[];for(let s=0;s<i.length-1;s++)this.parts[s]=this._createPart()}_createPart(){return new Zn(this)}_getValue(){const t=this.strings,n=t.length-1,i=this.parts;if(n===1&&t[0]===""&&t[1]===""){const o=i[0].value;if(typeof o=="symbol")return String(o);if(typeof o=="string"||!Xn(o))return o}let s="";for(let o=0;o<n;o++){s+=t[o];const c=i[o];if(c!==void 0){const a=c.value;if(Yn(a)||!Xn(a))s+=typeof a=="string"?a:String(a);else for(const _ of a)s+=typeof _=="string"?_:String(_)}}return s+=t[n],s}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}class Zn{constructor(t){this.value=void 0,this.committer=t}setValue(t){t!==it&&(!Yn(t)||t!==this.value)&&(this.value=t,Pe(t)||(this.committer.dirty=!0))}commit(){for(;Pe(this.value);){const t=this.value;this.value=it,t(this)}this.value!==it&&this.committer.commit()}}class Bt{constructor(t){this.value=void 0,this.__pendingValue=void 0,this.options=t}appendInto(t){this.startNode=t.appendChild(lt()),this.endNode=t.appendChild(lt())}insertAfterNode(t){this.startNode=t,this.endNode=t.nextSibling}appendIntoPart(t){t.__insert(this.startNode=lt()),t.__insert(this.endNode=lt())}insertAfterPart(t){t.__insert(this.startNode=lt()),this.endNode=t.endNode,t.endNode=this.startNode}setValue(t){this.__pendingValue=t}commit(){if(this.startNode.parentNode===null)return;for(;Pe(this.__pendingValue);){const n=this.__pendingValue;this.__pendingValue=it,n(this)}const t=this.__pendingValue;t!==it&&(Yn(t)?t!==this.value&&this.__commitText(t):t instanceof Te?this.__commitTemplateResult(t):t instanceof Node?this.__commitNode(t):Xn(t)?this.__commitIterable(t):t===Ns?(this.value=Ns,this.clear()):this.__commitText(t))}__insert(t){this.endNode.parentNode.insertBefore(t,this.endNode)}__commitNode(t){this.value!==t&&(this.clear(),this.__insert(t),this.value=t)}__commitText(t){const n=this.startNode.nextSibling;t=t??"";const i=typeof t=="string"?t:String(t);n===this.endNode.previousSibling&&n.nodeType===3?n.data=i:this.__commitNode(document.createTextNode(i)),this.value=t}__commitTemplateResult(t){const n=this.options.templateFactory(t);if(this.value instanceof Hs&&this.value.template===n)this.value.update(t.values);else{const i=new Hs(n,t.processor,this.options),s=i._clone();i.update(t.values),this.__commitNode(s),this.value=i}}__commitIterable(t){Array.isArray(this.value)||(this.value=[],this.clear());const n=this.value;let i=0,s;for(const o of t)s=n[i],s===void 0&&(s=new Bt(this.options),n.push(s),i===0?s.appendIntoPart(this):s.insertAfterPart(n[i-1])),s.setValue(o),s.commit(),i++;i<n.length&&(n.length=i,this.clear(s&&s.endNode))}clear(t=this.startNode){Kn(this.startNode.parentNode,t.nextSibling,this.endNode)}}class Xa{constructor(t,n,i){if(this.value=void 0,this.__pendingValue=void 0,i.length!==2||i[0]!==""||i[1]!=="")throw new Error("Boolean attributes can only contain a single expression");this.element=t,this.name=n,this.strings=i}setValue(t){this.__pendingValue=t}commit(){for(;Pe(this.__pendingValue);){const n=this.__pendingValue;this.__pendingValue=it,n(this)}if(this.__pendingValue===it)return;const t=!!this.__pendingValue;this.value!==t&&(t?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=t),this.__pendingValue=it}}class Za extends xs{constructor(t,n,i){super(t,n,i),this.single=i.length===2&&i[0]===""&&i[1]===""}_createPart(){return new tc(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}class tc extends Zn{}let zs=!1;(()=>{try{const e={get capture(){return zs=!0,!1}};window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch{}})();class ec{constructor(t,n,i){this.value=void 0,this.__pendingValue=void 0,this.element=t,this.eventName=n,this.eventContext=i,this.__boundHandleEvent=s=>this.handleEvent(s)}setValue(t){this.__pendingValue=t}commit(){for(;Pe(this.__pendingValue);){const o=this.__pendingValue;this.__pendingValue=it,o(this)}if(this.__pendingValue===it)return;const t=this.__pendingValue,n=this.value,i=t==null||n!=null&&(t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive),s=t!=null&&(n==null||i);i&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),s&&(this.__options=nc(t),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=t,this.__pendingValue=it}handleEvent(t){typeof this.value=="function"?this.value.call(this.eventContext||this.element,t):this.value.handleEvent(t)}}const nc=e=>e&&(zs?{capture:e.capture,passive:e.passive,once:e.once}:e.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 Cn=(o,v,L)=>{if(!v.has(o))throw TypeError("Cannot "+L)};var g=(o,v,L)=>(Cn(o
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 ti{handleAttributeExpressions(e,t,s,i){const r=t[0];return r==="."?new Xs(e,t.slice(1),s).parts:r==="@"?[new Zs(e,t.slice(1),i.eventContext)]:r==="?"?[new Qs(e,t.slice(1),s)]:new Gn(e,t,s).parts}handleTextExpression(e){return new fe(e)}}const In=new ti;/**
97
+ */class ic{handleAttributeExpressions(t,n,i,s){const o=n[0];return o==="."?new Za(t,n.slice(1),i).parts:o==="@"?[new ec(t,n.slice(1),s.eventContext)]:o==="?"?[new Xa(t,n.slice(1),i)]:new xs(t,n,i).parts}handleTextExpression(t){return new Bt(t)}}const Gs=new ic;/**
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 Cn=(o,v,L)=>{if(!v.has(o))throw TypeError("Cannot "+L)};var g=(o,v,L)=>(Cn(o
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 ni(n){let e=xn.get(n.type);e===void 0&&(e={stringsArray:new WeakMap,keyString:new Map},xn.set(n.type,e));let t=e.stringsArray.get(n.strings);if(t!==void 0)return t;const s=n.strings.join(ee);return t=e.keyString.get(s),t===void 0&&(t=new Ks(n,n.getTemplateElement()),e.keyString.set(s,t)),e.stringsArray.set(n.strings,t),t}const xn=new Map;/**
109
+ */function sc(e){let t=Vs.get(e.type);t===void 0&&(t={stringsArray:new WeakMap,keyString:new Map},Vs.set(e.type,t));let n=t.stringsArray.get(e.strings);if(n!==void 0)return n;const i=e.strings.join(yt);return n=t.keyString.get(i),n===void 0&&(n=new Ja(e,e.getTemplateElement()),t.keyString.set(i,n)),t.stringsArray.set(e.strings,n),n}const Vs=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 Cn=(o,v,L)=>{if(!v.has(o))throw TypeError("Cannot "+L)};var g=(o,v,L)=>(Cn(o
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 Vn=new WeakMap,qt=(n,e,t)=>{let s=Vn.get(e);s===void 0&&(Gt(e,e.firstChild),Vn.set(e,s=new fe(Object.assign({templateFactory:ni},t))),s.appendInto(e)),s.setValue(n),s.commit()};/**
121
+ */const Ds=new WeakMap,vn=(e,t,n)=>{let i=Ds.get(t);i===void 0&&(Kn(t,t.firstChild),Ds.set(t,i=new Bt(Object.assign({templateFactory:sc},n))),i.appendInto(t)),i.setValue(e),i.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,7 @@ var Cn=(o,v,L)=>{if(!v.has(o))throw TypeError("Cannot "+L)};var g=(o,v,L)=>(Cn(o
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<"u"&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.4.1");const V=(n,...e)=>new Ne(n,e,"html",In),Dn=(n,...e)=>new It(n,e,"svg",In),Oe=new Set;function H(n){typeof n=="function"&&(Oe.size||globalThis.queueMicrotask(()=>{Oe.forEach(e=>e()),Oe.clear()}),Oe.delete(n),Oe.add(n))}const Re=[];function si(){for(let n=Re.length-1;n>=0;n--)Re[n]();Re.length=0}function ii(n){Re.length||H(si),Re.push(n)}function Ut(n="",e=""){const{pathname:t,search:s,hash:i}=new URL(e,location.origin+n);return t+s+decodeURIComponent(i)}function jt(n,e,t,s){return n.addEventListener(e,t,s),()=>n.removeEventListener(e,t,s)}class qn extends EventTarget{constructor(){super(...arguments);N(this,Qe);N(this,oe,new Map);N(this,X,void 0);N(this,ae,void 0)}get size(){return g(this,oe).size}get first(){return g(this,X)}get last(){return g(this,ae)}isSuperLinkOf(t){let s=t.first;if(!s)return!0;let i=this.find(s.value);for(;i&&i.value===s.value;){if(s=s.next,!s)return!0;i=i.next}return!1}find(t){return g(this,oe).get(t)}add(t){g(this,ae)||this.dispatchEvent(new CustomEvent("start"));const s=kn(this,Qe,Ln).call(this,t)||{value:t};s.prev=g(this,ae),s.prev&&(s.prev.next=s),s.next=void 0,Y(this,ae,s),g(this,X)||Y(this,X,s),g(this,oe).set(t,s)}delete(t){const s=kn(this,Qe,Ln).call(this,t);return g(this,X)||this.dispatchEvent(new CustomEvent("end")),s}get(){const t=g(this,X);if(t)return this.delete(t.value),t.value}}oe=new WeakMap,X=new WeakMap,ae=new WeakMap,Qe=new WeakSet,Ln=function(t){const s=g(this,oe).get(t);return s&&(s.prev?s.prev.next=s.next:Y(this,X,s.next),s.next?s.next.prev=s.prev:Y(this,ae,s.prev),g(this,oe).delete(t)),s};class Un extends WeakMap{get(e){let t=super.get(e);return t||(t={},this.set(e,t)),t}}class pe extends URLSearchParams{constructor(t){super(t);N(this,ke,t=>typeof t=="string"?t:JSON.stringify(t));N(this,Mt,t=>{if(!t)return null;try{return JSON.parse(t)}catch{return null}})}concat(t){let s;typeof t=="string"?s=Object.fromEntries(new URLSearchParams(t).entries()):s=t,Object.entries(s).forEach(([i,r])=>{this.append(i,g(this,ke).call(this,r))})}setAny(t,s){if(Array.isArray(s))this.delete(t),s.forEach(i=>this.append(t,g(this,ke).call(this,i)));else{const i=g(this,ke).call(this,s);i?this.set(t,i):this.delete(t)}}getAny(t){return this.getAnyAll(t)[0]}getAnyAll(t){return this.getAll(t).filter(s=>s!=="").map(s=>g(this,Mt).call(this,s))}toString(){const t=super.toString();return t?`?${t}`:""}toJSON(){return this.toString()}}ke=new WeakMap,Mt=new WeakMap;function Ae(n,...e){return n.reduce((t,s,i)=>t+(e[i-1]??"")+s)}function ri(n,...e){return Ae(n,...e)}const Bt=Symbol.for("gem@sheetToken");function oi(n,e=""){const t=new CSSStyleSheet,s={};t.media.mediaText=e;let i="";return typeof n=="string"?i=n:Object.keys(n).forEach(r=>{s[r]=`${r}-${He()}`,i+=n[r].styledContent.replace(/&/g,s[r])}),t.replaceSync(i),s[Bt]=t,s}function He(n=5){const e=Math.random().toString(36).slice(2).slice(0,n);return e.length<n?e+He(n-e.length):e}const ai=new RegExp(`&.*{((.|
134
- )*)}`,"g");function jn(n,e){const t=[];let s=`& {${n.replace(ai,i=>(t.push(i),""))}}`+t.join("");return s=s.replace(/&/g,e==="class"?".&":"#&"),{styledContent:s,type:e}}const ci={class:(n,...e)=>{const t=Ae(n,...e);return jn(t,"class")},id:(n,...e)=>{const t=Ae(n,...e);return jn(t,"id")},keyframes:(n,...e)=>({styledContent:`@keyframes & {${Ae(n,...e)}}`,type:"keyframes"})};function D(n){return n.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function te(n){return n.replace(/-(.)/g,(e,t)=>t.toUpperCase())}function et(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 Bn(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 Fn(n,e){const t=new Set(e);return n.filter(s=>t.has(s)?(t.delete(s),!1):!0)}function tt(n,e,t){let s=e;for(const i in n){const r=t(i,n[i]);s+=r?r+e:""}return s}function li(n){return tt(n,";",(e,t)=>t||t===0?`${D(e)}:${t}`:"")}function Kn(n){return tt(n," ",(e,t)=>t?e:"")}const hi=Kn;function ui(n){return tt(n,",",(e,t)=>t===!0||e===t?e:t?`${e}:${t}`:"")}const me=new WeakMap;function ge(n){if(me.has(n))throw new K("argument error");return me.set(n,new Set),n}function z(n,e){var t;Object.assign(n,e),(t=me.get(n))==null||t.forEach(s=>{H(s)})}function nt(n){const e=ge(n);return[e,t=>z(e,t)]}function ne(n,e){const t=me.get(n);return t==null||t.add(e),()=>{t==null||t.delete(e)}}function di(n,e){const t=me.get(n);t==null||t.delete(e)}const zn="1.7.11",fi=Object.freeze(Object.defineProperty({__proto__:null,version:zn},Symbol.toStringTag,{value:"Module"}));/**
133
+ */typeof window<"u"&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.4.1");const st=(e,...t)=>new Te(e,t,"html",Gs),Fs=(e,...t)=>new Qn(e,t,"svg",Gs);let Me=new Set;function $t(e){typeof e=="function"&&(Me.size||globalThis.queueMicrotask(()=>{const t=Me;Me=new Set,t.forEach(n=>n())}),Me.delete(e),Me.add(e))}function ti(e="",t=""){const{pathname:n,search:i,hash:s}=new URL(t,location.origin+e);return n+i+decodeURIComponent(s)}function ei(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}class qs extends EventTarget{constructor(){super(...arguments);C(this,dn);C(this,At,new Map);C(this,gt);C(this,Rt)}get size(){return p(this,At).size}get first(){return p(this,gt)}get last(){return p(this,Rt)}isSuperLinkOf(n){let i=n.first;if(!i)return!0;let s=this.find(i.value);for(;s&&s.value===i.value;){if(i=i.next,!i)return!0;s=s.next}return!1}find(n){return p(this,At).get(n)}add(n){p(this,Rt)||this.dispatchEvent(new CustomEvent("start"));const i=ks(this,dn,Ts).call(this,n)||{value:n};i.prev=p(this,Rt),i.prev&&(i.prev.next=i),i.next=void 0,O(this,Rt,i),p(this,gt)||O(this,gt,i),p(this,At).set(n,i)}delete(n){const i=ks(this,dn,Ts).call(this,n);return p(this,gt)||this.dispatchEvent(new CustomEvent("end")),i}get(){const n=p(this,gt);if(n)return this.delete(n.value),n.value}}At=new WeakMap,gt=new WeakMap,Rt=new WeakMap,dn=new WeakSet,Ts=function(n){const i=p(this,At).get(n);return i&&(i.prev?i.prev.next=i.next:O(this,gt,i.next),i.next?i.next.prev=i.prev:O(this,Rt,i.prev),p(this,At).delete(n)),i};class Us extends WeakMap{get(t){let n=super.get(t);return n||(n={},this.set(t,n)),n}}class jt extends URLSearchParams{constructor(n){super(n);C(this,pe,n=>typeof n=="string"?n:JSON.stringify(n));C(this,Gn,n=>{if(!n)return null;try{return JSON.parse(n)}catch{return null}})}concat(n){let i;typeof n=="string"?i=Object.fromEntries(new URLSearchParams(n).entries()):i=n,Object.entries(i).forEach(([s,o])=>{this.append(s,p(this,pe).call(this,o))})}setAny(n,i){if(Array.isArray(i))this.delete(n),i.forEach(s=>this.append(n,p(this,pe).call(this,s)));else{const s=p(this,pe).call(this,i);s?this.set(n,s):this.delete(n)}}getAny(n){return this.getAnyAll(n)[0]}getAnyAll(n){return this.getAll(n).filter(i=>i!=="").map(i=>p(this,Gn).call(this,i))}toString(){const n=super.toString();return n?`?${n}`:""}toJSON(){return this.toString()}}pe=new WeakMap,Gn=new WeakMap;function wn(e,...t){return e.reduce((n,i,s)=>n+(t[s-1]??"")+i)}const ni=wn;function Oe(e=5){const t=Math.random().toString(36).slice(2,2+e);return t.length<e?t+Oe(e-t.length):t}const rc={class:wn};function Ht(e){return e.replace(/[A-Z]/g,t=>"-"+t.toLowerCase())}function oc(e){return e.replace(/-(.)/g,(t,n)=>n.toUpperCase())}function Sn(e){return Object.keys(e).forEach(t=>{delete e[t]}),e}class dt extends Error{constructor(t){super(t),this.message=`gem: ${this.message}`}}function Bs(e,t){const n=e.length;if(t.length!==n)return!0;for(let i=0;i<n;i++)if(e[i]!==t[i])return!0;return!1}function yn(e,t,n){let i=t;for(const s in e){const o=n(s,e[s]);i+=o?o+t:""}return i}function ac(e){return yn(e,";",(t,n)=>n||n===0?`${Ht(t)}:${n}`:"")}function js(e){return yn(e," ",(t,n)=>n?t:"")}const cc=js;function lc(e){return yn(e,",",(t,n)=>n===!0||t===n?t:n?`${t}:${n}`:"")}const Wt=new WeakMap;function Le(e){if(Wt.has(e))throw new dt("argument error");return Wt.set(e,new Set),e}function Et(e,t){var n;Object.assign(e,t),(n=Wt.get(e))==null||n.forEach(i=>{$t(i)})}function Kt(e){const t=Le(e);return[t,n=>Et(t,n)]}function ht(e,t){const n=Wt.get(e);return n==null||n.add(t),()=>{n==null||n.delete(t)}}function Ks(e,t){const n=Wt.get(e);n==null||n.delete(t)}const hc=Object.freeze(Object.defineProperty({__proto__:null,StoreListenerMap:Wt,connect:ht,createStore:Le,disconnect:Ks,updateStore:Et,useStore:Kt},Symbol.toStringTag,{value:"Module"})),{assign:ii,defineProperty:uc,setPrototypeOf:dc}=Object;uc(Symbol,"metadata",{value:Symbol.for("Symbol.metadata")});const si=e=>typeof e=="function"&&e(),bt=Symbol.for("gem@sheetToken"),Ne=Symbol.for("gem@update"),Ae="gem-style-boundary",$n="gem@render-error",fc=Ne,ri=new WeakMap,Js=new WeakMap,Qs=e=>[...e.querySelectorAll("[data-gem-reflect]")].map(t=>t.target);class pc{constructor(t){N(this,"refSelector");N(this,"ele");N(this,"ref");const n=`ref-${Oe()}`;this.refSelector=`[ref=${n}]`,this.ele=t.internals.shadowRoot||t,this.ref=n}get element(){for(const t of[this.ele,...Qs(this.ele)]){const n=t.querySelector(this.refSelector);if(n)return n}}get elements(){return[this.ele,...Qs(this.ele)].map(t=>[...t.querySelectorAll(this.refSelector)]).flat()}toString(){return this.ref}}h.createRef=void 0;class _c extends CSSStyleSheet{constructor(){super(...arguments);C(this,ut);N(this,"cssText","")}get element(){return p(this,ut)||(O(this,ut,document.createElement("style")),p(this,ut).textContent=this.cssText,p(this,ut).dataset.gemStyle=""),p(this,ut)}replaceSync(n){this.cssText=n,p(this,ut)&&(p(this,ut).textContent=n),super.replaceSync(n)}}ut=new WeakMap;class mc{constructor(t=""){C(this,Ft,"");C(this,fn,"");C(this,_e,new Map);C(this,me,new Map);O(this,fn,t)}setContent(t){O(this,Ft,t)}getStyle(t){var o;const n=t&&!((o=t.internals)!=null&&o.shadowRoot),i=n?t.constructor:this;if(!p(this,_e).has(i)){const c=new _c({media:p(this,fn)});p(this,_e).set(i,c)}const s=p(this,_e).get(i);if(!p(this,me).has(s)){let c=p(this,Ft),a="";n&&(a=`@scope (${t.tagName}) to (:state(${Ae}) > *)`,c=`${a}{ ${c} }`),s.replaceSync(c),p(this,me).set(s,a)}return s}updateStyle(){p(this,me).forEach((t,n)=>{n.replaceSync(t?`${t}{${p(this,Ft)}}`:p(this,Ft))})}}Ft=new WeakMap,fn=new WeakMap,_e=new WeakMap,me=new WeakMap;function Re(e,t){const n=t?e:"",i=t||e,s=new mc(n),o={[bt]:s};let c="";return typeof i=="string"?c=i:Object.keys(i).forEach(a=>{const _=a==="$";o[a]=_||a.includes("-")?a:`${a}-${Oe()}`,c+=`${_?":scope,:host":`.${o[a]}`} {${i[a]}}`}),s.setContent(c),o}const Ys=(e,t,n)=>{let i=!1;t.forEach(s=>{const o=e.get(s)||0;i||(i=n===1&&o===0||n===-1&&o===1),e.set(s,o+n)}),i&&$t(Js.get(e))},gc=(e,t)=>{const n=e.getRootNode();if(!ri.has(n)){const s=new Map;ri.set(n,s),Js.set(s,()=>{const o=n.adoptedStyleSheets.filter(c=>!s.has(c));s.forEach((c,a)=>c&&o.push(a)),n.adoptedStyleSheets=o.reverse()})}const i=ri.get(n);return Ys(i,t,1),()=>Ys(i,t,-1)};h.createState=void 0;function Xs(e){e==null||e.forEach(t=>{const{callback:n,getDep:i,values:s,preCallback:o}=t,c=i==null?void 0:i();(!i||!s||Bs(s,c))&&(si(o),t.preCallback=n(c,s),t.values=c,t.initialized=!0)})}function Zs(e){return e.filter(t=>(si(t.preCallback),t.initialized=!1,t.values=void 0,t.fixed))}h.createTemplate=void 0;const Jt=new qs,oi=(e=performance.now())=>{if(performance.now()>e+16)return requestAnimationFrame(oi);const t=Jt.get();t&&(t(),oi(e))};Jt.addEventListener("start",()=>$t(oi));let ai;const be=class be extends HTMLElement{constructor(){super();C(this,ct);C(this,ve);C(this,nt);C(this,vt,[]);C(this,qt,[]);C(this,It,[]);C(this,we);C(this,wt);C(this,Se);C(this,ye);C(this,pn);C(this,Vn,()=>{Xs(p(this,vt))});C(this,Dn,()=>{Xs(p(this,qt))});C(this,_n,n=>{try{O(this,ye,!0),p(this,Dn).call(this);const i=p(this,ve)===this,s=n?n.render():i?void 0:st`<slot></slot>`;if(O(this,ye,!1),s===void 0)return;vn(s,p(this,ve))}catch(i){this.dispatchEvent(new CustomEvent($n,{bubbles:!0,composed:!0,detail:i}))}});C(this,$e,()=>{const n=p(this,ct,Ms);p(this,wt)&&(n||!p(this,It).length)&&(p(this,_n).call(this,n),$t(p(this,Vn)))});C(this,Ut,()=>{p(this,ct,Ce).noBlocking?Jt.add(p(this,$e)):p(this,$e).call(this)});C(this,Fn,()=>{const{adoptedStyleSheets:n=[]}=p(this,ct,Ce),{shadowRoot:i,sheets:s}=p(this,nt),o=n.map(c=>c[bt].getStyle(this));if(i)i.adoptedStyleSheets=o.concat(s);else return this.prepend(...s.map(c=>c.element)),gc(this,o)});C(this,qn,()=>{var n;(n=p(this,vt))==null||n.forEach(i=>{const{callback:s,getDep:o,initialized:c}=i;c||(i.values=o==null?void 0:o(),i.preCallback=s(i.values),i.initialized=!0)})});C(this,Un,()=>{var n;this.willMount&&this.memo(this.willMount.bind(this),()=>[]),this.mounted&&this.effect(this.mounted.bind(this),()=>[]),this.updated&&this.effect((i,s)=>s&&this.updated.apply(this)),this.unmounted&&this.effect(()=>this.unmounted.bind(this),()=>[]),!p(this,It).length&&this.render&&p(this,It).push({render:this.render.bind(this),condition:(n=this.shouldUpdate)==null?void 0:n.bind(this)})});C(this,mn);C(this,Ee,async()=>{if(p(this,we)){O(this,we,!1);return}p(this,Un).call(this);const{observedStores:n}=p(this,ct,Ce);O(this,Se,!0),O(this,mn,n==null?void 0:n.map(i=>ht(i,p(this,Ut)))),p(this,_n).call(this,p(this,ct,Ms)),O(this,wt,!0),O(this,pn,p(this,Fn).call(this)),await Promise.resolve(),p(this,qn).call(this)});N(this,"effect",(n,i)=>{const s={callback:n,getDep:i,initialized:p(this,wt),fixed:!p(this,Se)};p(this,wt)&&(s.values=i==null?void 0:i(),s.preCallback=n(s.values)),p(this,vt).push(s)});N(this,"memo",(n,i)=>{p(this,qt).push({callback:n,getDep:i,fixed:!p(this,Se)})});N(this,"update",()=>$t(p(this,Ut)));ai=this;const{mode:n,serializable:i,delegatesFocus:s,slotAssignment:o,aria:c}=p(this,ct,Ce),{focusable:a,..._}=c||{};O(this,ve,n?this.attachShadow({mode:n,serializable:i,delegatesFocus:s,slotAssignment:o}):this),O(this,nt,this.attachInternals()),p(this,nt).stateList=[],p(this,nt).sheets=[],ii(p(this,nt),_),n||p(this,nt).states.add(Ae);let u;p(this,vt).push({fixed:!0,getDep:()=>[this.disabled],callback:([v=!1])=>{if(u===void 0&&(u=this.hasAttribute("tabindex")),p(this,nt).ariaDisabled=String(v),a&&!u&&(this.tabIndex=-Number(v)),(a||s)&&v)return ei(this,"click",r=>r.isTrusted&&r.stopImmediatePropagation(),{capture:!0})}})}[fc](){p(this,wt)&&$t(p(this,Ut))}get internals(){return p(this,nt)}connectedCallback(){return p(this,ct,Ce).noBlocking?Jt.add(p(this,Ee)):p(this,Ee).call(this),p(be,ge)}adoptedCallback(){return p(be,ge)}disconnectedCallback(){var n;if(this.isConnected){O(this,we,!0);return}return Jt.delete(p(this,Ee)),Jt.delete(p(this,$e)),O(this,wt,!1),(n=p(this,mn))==null||n.forEach(i=>i()),O(this,vt,Zs(p(this,vt))),O(this,qt,Zs(p(this,qt))),si(p(this,pn)),p(be,ge)}};ge=new WeakMap,ve=new WeakMap,nt=new WeakMap,vt=new WeakMap,qt=new WeakMap,It=new WeakMap,we=new WeakMap,wt=new WeakMap,Se=new WeakMap,ye=new WeakMap,pn=new WeakMap,ct=new WeakSet,Ce=function(){return this.constructor[Symbol.metadata]},Ms=function(){return p(this,It).find(n=>!n.condition||n.condition())},Vn=new WeakMap,Dn=new WeakMap,_n=new WeakMap,$e=new WeakMap,Ut=new WeakMap,Fn=new WeakMap,qn=new WeakMap,Un=new WeakMap,mn=new WeakMap,Ee=new WeakMap,C(be,ge,Symbol()),h.createState=n=>{const i=ai,s=o=>{ii(s,o),p(i,ye)||$t(p(i,Ut))};return dc(s,null),delete s.name,delete s.length,p(i,nt).stateList.push(s),ii(s,n),s},h.createRef=()=>new pc(ai),h.createTemplate=(n,i)=>p(n,It).push(i);let q=be;const vc=Object.freeze(Object.defineProperty({__proto__:null,BoundaryCSSState:Ae,GemElement:q,RenderErrorEvent:$n,SVGTemplateResult:Qn,SheetToken:bt,TemplateResult:Te,UpdateToken:Ne,createCSSSheet:Re,get createRef(){return h.createRef},get createState(){return h.createState},get createTemplate(){return h.createTemplate},directive:St,html:st,render:vn,svg:Fs},Symbol.toStringTag,{value:"Module"})),tr="0.0.0",wc=Object.freeze(Object.defineProperty({__proto__:null,version:tr},Symbol.toStringTag,{value:"Module"})),{deleteProperty:Sc,getOwnPropertyDescriptor:er,defineProperty:En}=Reflect,{getPrototypeOf:Ct,assign:nr}=Object,ir=new Us;function Pt(e,t,n){const i=e.metadata;if(!er(i,t)){const s=new Set(i[t]);s.delete(n),En(i,t,{value:[...s]})}i[t].push(n)}function bn(e,t){const{value:n}=er(e,t);Sc(e,t),e[t]=n}const Ie=new WeakMap,{setAttribute:sr,toggleAttribute:yc,removeAttribute:rr}=Element.prototype;q.prototype.setAttribute=function(e,t){var i;const n=(i=Ie.get(Ct(this)))==null?void 0:i.get(e);if(!n)return sr.call(this,e,t);this[n]=t},q.prototype.removeAttribute=function(e){var n;const t=(n=Ie.get(Ct(this)))==null?void 0:n.get(e);if(!t)return rr.call(this,e);this[t]=null},q.prototype.toggleAttribute=function(e,t){var i;const n=(i=Ie.get(Ct(this)))==null?void 0:i.get(e);return n?this[n]=t??!this.hasAttribute(e):yc.call(this,e,t)};function $c(){}const or=Symbol("event handle");function ci(e,t,{attr:n,attrType:i,event:s,eventOptions:o}={}){En(e,t,{configurable:!0,get(){const c=ir.get(this)[t];return s&&!c?(this[t]=$c,this[t]):c},set(c){const a=this,_=ir.get(a);n&&(c=i===Boolean&&c===""?!0:i(c||""),c?sr.call(this,n,i===Boolean?"":c):rr.call(this,n)),c!==_[t]&&(s?(_[t]=c!=null&&c[or]?c:(u,v)=>{const r=new CustomEvent(s,{...v,...o,detail:u});a.dispatchEvent(r),c(u,v)},_[t][or]=!0):(_[t]=c,this[Ne]()))}})}function li(e,t){const n=e.name,i=Ht(n);return e.addInitializer(function(){const s=Ct(this);if(!s.hasOwnProperty(n)){Pt(e,"observedAttributes",i),ci(s,n,{attr:i,attrType:t});const o=Ie.get(s)||new Map;o.set(i,n),Ie.set(s,o)}bn(this,n)}),function(s){return this.getAttribute(i)??s}}function D(e,t){return li(t,String)}function He(e,t){return li(t,Boolean)}function ar(e,t){return li(t,Number)}function U(e,t){const n=t.name;return t.addInitializer(function(){const i=Ct(this);i.hasOwnProperty(n)||(Pt(t,"observedProperties",n),ci(i,n)),bn(this,n)}),function(i){return this[n]??i}}function hi(e){return function(t,n){const{addInitializer:i,name:s,access:o,kind:c}=n;i(function(){const a=e&&(()=>e(this));if(c==="getter"){if(n.private)throw new dt("not support");this.memo(()=>En(this,s,{configurable:!0,value:o.get(this)}),a)}else this.memo(o.get(this).bind(this),a)})}}function ft(e){return function(t,{addInitializer:n,access:i}){n(function(){this.effect(i.get(this).bind(this),e&&(()=>e(this)))})}}function cr(){return function(e,{addInitializer:t,access:n}){t(function(){this.effect(()=>n.get(this).bind(this),()=>[])})}}function We(){return hi(()=>[])}function Qt(){return ft(()=>[])}function ui(e){return function(t,{addInitializer:n,access:i}){n(function(){h.createTemplate(this,{render:i.get(this).bind(this),condition:e&&(()=>e(this))})})}}function lr(){return function(e,{addInitializer:t,access:n}){t(function(){this.addEventListener($n,({detail:i})=>{vn(n.get(this).apply(this,[i]),this.internals.shadowRoot||this)})})}}function Ec(e,t,n){En(e,t,{configurable:!0,get(){const i=this,{states:s}=i.internals;return s==null?void 0:s.has(n)},set(i){const s=this,{states:o}=s.internals;i?o==null||o.add(n):o==null||o.delete(n)}})}function xe(e,t){t.addInitializer(function(){const n=Ct(this),i=t.name;if(!n.hasOwnProperty(i)){const s=Ht(i);Pt(t,"definedCSSStates",s),Ec(n,i,s)}bn(this,i)})}function hr(e,t,n,i){const s=e.name,o=Ht(s);if(e.static)Pt(e,n,o);else{const c=Ct(t);c[s]||(c[s]=o,Pt(e,n,o))}return i||o}function ur(e,t){return function(n){return hr(t,this,"definedSlots",n)}}function di(e,t){return function(n){return hr(t,this,"definedParts",n)}}function Yt(e,t){t.addInitializer(function(){fr(t,this,t.name)})}function dr(e,t){t.addInitializer(function(){fr(t,this,t.name,{bubbles:!0,composed:!0})})}function fr(e,t,n,i){const s=Ct(t);if(!s.hasOwnProperty(n)){const o=Ht(n);Pt(e,"definedEvents",o),ci(s,n,{event:o,eventOptions:i})}bn(t,n)}function Cn(e){return function(t,n){Pt(n,"adoptedStyleSheets",e)}}function ze(e){return function(t,n){Pt(n,"observedStores",e)}}function kt({mode:e="open",serializable:t=!0,delegatesFocus:n,slotAssignment:i}={}){return function(s,o){const c=o.metadata;nr(c,{mode:e,serializable:t,delegatesFocus:n,slotAssignment:i})}}function pr(){return function(e,t){const n=t.metadata;n.noBlocking=!0}}function Ge(e){return function(t,n){const i=n.metadata;i.aria={...i.aria,...e}}}function _r(e){return function(t,{addInitializer:n}){n(function(){customElements.define(e,t)})}}window.__GEM_DEVTOOLS__HOOK__&&!window.__GEM_DEVTOOLS__HOOK__.GemElement&&nr(window.__GEM_DEVTOOLS__HOOK__,{...vc,...M,...hc,...wc});const Y=window.history,mr=Y.pushState.bind(Y),gr=Y.replaceState.bind(Y);let bc=0;const fi=()=>`${performance.now()}-${++bc}`,[x,Xt]=Kt({$hasCloseHandle:!1,$hasOpenHandle:!1,$hasShouldCloseHandle:!1,$key:""}),j=new Map;function vr(e){const{$key:t,$hasCloseHandle:n,$hasOpenHandle:i,$hasShouldCloseHandle:s}=e||{};if(x.$key!==t){if(t)throw new dt("`$key` is not allowed");if(n)throw new dt("`$hasCloseHandle` is not allowed");if(i)throw new dt("`$hasOpenHandle` is not allowed");if(s)throw new dt("`$hasShouldCloseHandle` is not allowed")}}function wr(e){return X.basePath?X.basePath+e:e}function pi(e){return e===X.basePath?"/":e.replace(new RegExp(`^${X.basePath}/`),"/")}function _i(){X.dispatchEvent(new CustomEvent("beforechange"))}function Pn(e){const t=j.get(x.$key)||{path:pi(location.pathname),query:new jt},n=e.path?ti(t.path,e.path):pi(location.pathname),i=new jt(e.query??(e.path?"":location.search)),s=String(i)!==String(t.query),o=s?i:t.query,c=n!==t.path||s,a=e.title||(c?"":document.title),_=e.close||e.data||e.open||e.shouldClose,u=decodeURIComponent(e.hash??(!c&&_?location.hash:""));return{...e,title:a,path:n,query:o,hash:u}}function Sr(e,t){vr(e.data);const n=Pn(e),{title:i,path:s,query:o,hash:c,close:a,open:_,shouldClose:u,data:v}=n,r={$hasCloseHandle:!!a,$hasOpenHandle:!!_,$hasShouldCloseHandle:!!u,$key:fi(),$title:i,...v};j.set(r.$key,n),_i(),Sn(x),Xt(r);const m=wr(s)+new jt(o)+c,l=decodeURIComponent(location.hash);t(r,i,m),l!==c&&window.dispatchEvent(new CustomEvent("hashchange"))}function yr(e,t,n,i){vr(e);const s={$key:fi(),$title:t,...e||{}},{pathname:o,search:c,hash:a}=new URL(n,location.origin+location.pathname),_=Pn({path:o,query:new jt(c),hash:a,title:t,data:e});j.set(s.$key,_),_i(),Sn(x),Xt(s);const u=wr(o)+_.query+a,v=location.hash;i(s,t,u),v!==a&&window.dispatchEvent(new CustomEvent("hashchange"))}const[$r,Cc]=Kt({basePath:""});class Pc extends EventTarget{get store(){return x}get currentKey(){return x.$key}get basePath(){return $r.basePath}set basePath(t){Cc({basePath:t}),Object.assign(j.get(x.$key),{path:pi(location.pathname)})}getParams(){return j.get(x.$key)}updateParams(t){Object.assign(j.get(x.$key),t),Xt()}push(t){Sr(t,mr)}replace(t){Sr(t,gr)}pushIgnoreCloseHandle(t){var n,i;x.$hasCloseHandle?((i=(n=j.get(x.$key))==null?void 0:n.close)==null||i.call(n),this.replace(t)):this.push(t)}forward(){Y.forward()}back(){Y.back()}}const X=new Pc,[kn,kc]=Kt({defaultTitle:document.title,url:"",title:""}),Tc={history:X,titleStore:kn,basePathStore:$r};if(!window._GEMHISTORY){if(window._GEMHISTORY=Tc,Y.pushState=function(t,n,i){yr(t,n,i,mr)},Y.replaceState=function(t,n,i){yr(t,n,i,gr)},window.addEventListener("hashchange",({isTrusted:t})=>{t&&X.replace({hash:location.hash})}),Y.state)if(Y.state.$hasCloseHandle){Xt(Y.state);const t=Pn({title:document.title});j.set(x.$key,t),X.back()}else{const t=Pn({title:document.title,hash:location.hash});Xt({$key:fi(),...Y.state||{}}),j.set(x.$key,t)}else{const{protocol:t,pathname:n,search:i,hash:s}=location;t.startsWith("http")&&X.replace({path:n,query:i,hash:s})}ht(kn,()=>{const t=j.get(x.$key);t&&(t.title=kn.title)}),ht(x,()=>{const{title:t}=X.getParams();t!==kn.title&&kc({title:t})});let e=!1;window.addEventListener("popstate",t=>{var o,c;const n=t.state;if(!(n!=null&&n.$key))return;if(e){e=!1;return}if(!j.has(n.$key)){const{pathname:a,search:_,hash:u}=location;j.set(n.$key,{path:a,query:new jt(_),hash:decodeURIComponent(u),title:n.$title,data:n})}const i=x;if(parseFloat(n.$key)>parseFloat(i.$key)&&n.$hasOpenHandle)(c=(o=j.get(n.$key))==null?void 0:o.open)==null||c.call(o);else if(i.$hasCloseHandle){const a=j.get(i.$key),_=a==null?void 0:a.close,u=a==null?void 0:a.shouldClose;if(u&&!u()){e=!0,X.forward();return}else _?_():n.$hasCloseHandle&&(e=!0,X.back())}_i(),Sn(x),Xt(n)})}const{history:L,titleStore:Tt,basePathStore:Er}=window._GEMHISTORY;/**
135
134
  * @license
136
135
  * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
137
136
  * This code may only be used under the BSD style license found at
@@ -143,7 +142,7 @@ var Cn=(o,v,L)=>{if(!v.has(o))throw TypeError("Cannot "+L)};var g=(o,v,L)=>(Cn(o
143
142
  * Code distributed by Google as part of the polymer project is also
144
143
  * subject to an additional IP rights grant found at
145
144
  * http://polymer.github.io/PATENTS.txt
146
- */const Jn=(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},ce=(n,e)=>(n.setValue(e),n.commit(),n),Ft=(n,e,t)=>{const s=n.startNode.parentNode,i=t?t.startNode:n.endNode,r=e.endNode.nextSibling;r!==i&&$n(s,e.startNode,r,i)},Kt=n=>{Gt(n.startNode.parentNode,n.startNode,n.endNode.nextSibling)},Qn=(n,e,t)=>{const s=new Map;for(let i=e;i<=t;i++)s.set(n[i],i);return s},Xn=new WeakMap,Yn=new WeakMap,Zn=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=Xn.get(i)||[],a=Yn.get(i)||[],c=[],l=[],u=[];let m=0;for(const S of n)u[m]=s?s(S,m):m,l[m]=t(S,m),m++;let d,b,f=0,w=r.length-1,p=0,E=l.length-1;for(;f<=w&&p<=E;)if(r[f]===null)f++;else if(r[w]===null)w--;else if(a[f]===u[p])c[p]=ce(r[f],l[p]),f++,p++;else if(a[w]===u[E])c[E]=ce(r[w],l[E]),w--,E--;else if(a[f]===u[E])c[E]=ce(r[f],l[E]),Ft(i,r[f],c[E+1]),f++,E--;else if(a[w]===u[p])c[p]=ce(r[w],l[p]),Ft(i,r[w],r[f]),w--,p++;else if(d===void 0&&(d=Qn(u,p,E),b=Qn(a,f,w)),!d.has(a[f]))Kt(r[f]),f++;else if(!d.has(a[w]))Kt(r[w]),w--;else{const S=b.get(u[p]),B=S!==void 0?r[S]:null;if(B===null){const I=Jn(i,r[f]);ce(I,l[p]),c[p]=I}else c[p]=ce(B,l[p]),Ft(i,B,r[f]),r[S]=null;p++}for(;p<=E;){const S=Jn(i,c[E+1]);ce(S,l[p]),c[p++]=S}for(;f<=w;){const S=r[f++];S!==null&&Kt(S)}Xn.set(i,c),Yn.set(i,u)}});/**
145
+ */const br=(e,t)=>{const n=e.startNode.parentNode,i=t===void 0?e.endNode:t.startNode,s=n.insertBefore(lt(),i);n.insertBefore(lt(),i);const o=new Bt(e.options);return o.insertAfterNode(s),o},xt=(e,t)=>(e.setValue(t),e.commit(),e),mi=(e,t,n)=>{const i=e.startNode.parentNode,s=n?n.startNode:e.endNode,o=t.endNode.nextSibling;o!==s&&Ls(i,t.startNode,o,s)},gi=e=>{Kn(e.startNode.parentNode,e.startNode,e.endNode.nextSibling)},Cr=(e,t,n)=>{const i=new Map;for(let s=t;s<=n;s++)i.set(e[s],s);return i},Pr=new WeakMap,kr=new WeakMap,Mc=St((e,t,n)=>{let i;return n===void 0?n=t:t!==void 0&&(i=t),s=>{if(!(s instanceof Bt))throw new Error("repeat can only be used in text bindings");const o=Pr.get(s)||[],c=kr.get(s)||[],a=[],_=[],u=[];let v=0;for(const b of e)u[v]=i?i(b,v):v,_[v]=n(b,v),v++;let r,m,l=0,g=o.length-1,w=0,y=_.length-1;for(;l<=g&&w<=y;)if(o[l]===null)l++;else if(o[g]===null)g--;else if(c[l]===u[w])a[w]=xt(o[l],_[w]),l++,w++;else if(c[g]===u[y])a[y]=xt(o[g],_[y]),g--,y--;else if(c[l]===u[y])a[y]=xt(o[l],_[y]),mi(s,o[l],a[y+1]),l++,y--;else if(c[g]===u[w])a[w]=xt(o[g],_[w]),mi(s,o[g],o[l]),g--,w++;else if(r===void 0&&(r=Cr(u,w,y),m=Cr(c,l,g)),!r.has(c[l]))gi(o[l]),l++;else if(!r.has(c[g]))gi(o[g]),g--;else{const b=m.get(u[w]),f=b!==void 0?o[b]:null;if(f===null){const $=br(s,o[l]);xt($,_[w]),a[w]=$}else a[w]=xt(f,_[w]),mi(s,f,o[l]),o[b]=null;w++}for(;w<=y;){const b=br(s,a[y+1]);xt(b,_[w]),a[w++]=b}for(;l<=g;){const b=o[l++];b!==null&&gi(b)}Pr.set(s,a),kr.set(s,u)}});/**
147
146
  * @license
148
147
  * Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
149
148
  * This code may only be used under the BSD style license found at
@@ -155,7 +154,7 @@ var Cn=(o,v,L)=>{if(!v.has(o))throw TypeError("Cannot "+L)};var g=(o,v,L)=>(Cn(o
155
154
  * Code distributed by Google as part of the polymer project is also
156
155
  * subject to an additional IP rights grant found at
157
156
  * http://polymer.github.io/PATENTS.txt
158
- */const zt=new WeakMap,es=Z((n,e)=>t=>{const s=zt.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||zt.has(t)))return;t.setValue(e()),zt.set(t,Array.isArray(n)?Array.from(n):n)});/**
157
+ */const vi=new WeakMap,Oc=St((e,t)=>n=>{const i=vi.get(n);if(Array.isArray(e)){if(Array.isArray(i)&&i.length===e.length&&e.every((s,o)=>s===i[o]))return}else if(i===e&&(e!==void 0||vi.has(n)))return;n.setValue(t()),vi.set(n,Array.isArray(e)?Array.from(e):e)});/**
159
158
  * @license
160
159
  * Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
161
160
  * This code may only be used under the BSD style license found at
@@ -167,57 +166,56 @@ var Cn=(o,v,L)=>{if(!v.has(o))throw TypeError("Cannot "+L)};var g=(o,v,L)=>(Cn(o
167
166
  * Code distributed by Google as part of the polymer project is also
168
167
  * subject to an additional IP rights grant found at
169
168
  * http://polymer.github.io/PATENTS.txt
170
- */const Jt=new WeakMap,Qt=Z(n=>e=>{const t=Jt.get(e);if(n===void 0&&e instanceof Dt){if(t!==void 0||!Jt.has(e)){const s=e.committer.name;e.committer.element.removeAttribute(s)}}else n!==t&&e.setValue(n);Jt.set(e,n)});var ts=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)},h=(n,e,t)=>(ts(n,e,"read from private field"),t?t.call(n):e.get(n)),_=(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)},O=(n,e,t,s)=>(ts(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),ye,Ge,se,We,J,Ie,Q,ie,st,it,Xt,Yt,Zt,rt,en,ot,le,tn,at,ct,lt;function pi(){}function nn(n){typeof n=="function"&&n()}const ht=new qn,sn=(n=performance.now())=>{if(performance.now()>n+16)return requestAnimationFrame(sn);const e=ht.get();e&&(e(),sn(n))};ht.addEventListener("start",()=>H(sn));const ut=Symbol("constructor"),dt=Symbol("init"),ns=Symbol("update"),ss=class Ye extends HTMLElement{constructor(e={}){super(),_(this,Ge,void 0),_(this,se,void 0),_(this,We,void 0),_(this,J,void 0),_(this,Ie,void 0),_(this,Q,void 0),_(this,ie,void 0),_(this,st,void 0),this.setState=i=>{if(!this.state)throw new K("`state` not initialized");Object.assign(this.state,i),H(h(this,le))},_(this,it,i=>{i==null||i.forEach(r=>{const{callback:a,getDep:c,values:l,preCallback:u}=r,m=c==null?void 0:c();(!c||!l||Bn(l,m))&&(nn(u),r.preCallback=a(m,l),r.values=m)})}),_(this,Xt,()=>{h(this,it).call(this,h(this,Q))}),_(this,Yt,()=>{h(this,it).call(this,h(this,ie))}),this.effect=(i,r)=>{h(this,Q)||O(this,Q,[]);const a={callback:i,getDep:r,initialized:h(this,J),inConstructor:this[ut]};h(this,J)&&(a.values=r==null?void 0:r(),a.preCallback=i(a.values)),h(this,Q).push(a)},this.memo=(i,r)=>{h(this,ie)||O(this,ie,[]),h(this,ie).push({callback:i,getDep:r,inConstructor:this[ut]})},_(this,Zt,()=>{var i;(i=h(this,Q))==null||i.forEach(r=>{const{callback:a,getDep:c,initialized:l}=r;l||(r.values=c==null?void 0:c(),r.preCallback=a(r.values),r.initialized=!0)})}),_(this,rt,()=>{h(this,Yt).call(this);const i=h(this,Ge)===this,r=this.render?this.render():i?void 0:V`<slot></slot>`;r!==void 0&&qt(r,h(this,Ge))}),_(this,en,()=>this.shouldUpdate?this.shouldUpdate():!0),_(this,ot,()=>{h(this,J)&&h(this,en).call(this)&&(h(this,rt).call(this),H(h(this,tn)),H(h(this,Xt)))}),_(this,le,()=>{h(this,Ie)?ht.add(h(this,ot)):h(this,ot).call(this)}),this.update=()=>{H(h(this,le))},_(this,tn,()=>{var i;(i=this.updated)==null||i.call(this)}),_(this,at,void 0),_(this,ct,()=>{var a,c,l;if(h(this,We)){O(this,We,!1);return}Reflect.set(this,ut,!1),(a=this.willMount)==null||a.call(this);const{observedStores:i,rootElement:r}=this.constructor;if(O(this,at,i==null?void 0:i.map(u=>ne(u,h(this,le)))),h(this,rt).call(this),O(this,J,!0),O(this,st,(c=this.mounted)==null?void 0:c.call(this)),h(this,Zt).call(this),r&&this.isConnected&&((l=this.getRootNode().host)==null?void 0:l.tagName)!==r.toUpperCase())throw new K("not allow current root type")}),_(this,lt,i=>i==null?void 0:i.filter(r=>(nn(r.preCallback),r.initialized=!1,r.inConstructor))),H(()=>Reflect.set(this,dt,!1)),Reflect.set(this,ut,!0),Reflect.set(this,dt,!0),Reflect.set(this,ns,()=>{h(this,J)&&H(h(this,le))}),O(this,Ie,e.isAsync),O(this,Ge,e.isLight?this:this.attachShadow({mode:e.mode||"open",delegatesFocus:e.delegatesFocus,slotAssignment:e.slotAssignment}));let t;this.effect(([i=!1])=>{if(t===void 0&&(t=this.hasAttribute("tabindex")),this.internals.ariaDisabled=String(i),e.focusable&&!t&&(this.tabIndex=-Number(i)),(e.focusable||e.delegatesFocus)&&i)return jt(this,"click",r=>r.isTrusted&&r.stopImmediatePropagation(),{capture:!0})},()=>[Reflect.get(this,"disabled")]);const{adoptedStyleSheets:s}=new.target;if(s){const i=s.map(r=>r[Bt]||r);this.shadowRoot?this.shadowRoot.adoptedStyleSheets=i:this.effect(()=>{const r=this.getRootNode();return r.adoptedStyleSheets=[...r.adoptedStyleSheets,...i],()=>{r.adoptedStyleSheets=Fn(r.adoptedStyleSheets,i)}},()=>[])}}get internals(){if(!h(this,se)){O(this,se,this.attachInternals());try{h(this,se).states.add("foo"),h(this,se).states.delete("foo")}catch{Reflect.defineProperty(h(this,se),"states",{value:{has:e=>te(e)in this.dataset,add:e=>this.dataset[te(e)]="",delete:e=>delete this.dataset[te(e)]}})}}return h(this,se)}attributeChangedCallback(){return h(this,J)&&H(h(this,le)),h(Ye,ye)}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(){return this.isConnected&&h(this,Ie)?ht.add(h(this,ct)):h(this,ct).call(this),h(Ye,ye)}adoptedCallback(){return h(Ye,ye)}disconnectedCallback(){var e,t;if(this.isConnected){O(this,We,!0);return}return O(this,J,!1),(e=h(this,at))==null||e.forEach(s=>s()),nn(h(this,st)),(t=this.unmounted)==null||t.call(this),O(this,Q,h(this,lt).call(this,h(this,Q))),O(this,ie,h(this,lt).call(this,h(this,ie))),h(Ye,ye)}};ye=new WeakMap,Ge=new WeakMap,se=new WeakMap,We=new WeakMap,J=new WeakMap,Ie=new WeakMap,Q=new WeakMap,ie=new WeakMap,st=new WeakMap,it=new WeakMap,Xt=new WeakMap,Yt=new WeakMap,Zt=new WeakMap,rt=new WeakMap,en=new WeakMap,ot=new WeakMap,le=new WeakMap,tn=new WeakMap,at=new WeakMap,ct=new WeakMap,lt=new WeakMap,_(ss,ye,Symbol());let R=ss;const ft=new Un;function pt(n,e,t){const{booleanAttributes:s,numberAttributes:i}=n.constructor;Object.defineProperty(n,e,{configurable:!0,get(){if(!(dt in this))return;const a=this.getAttribute(t);return s!=null&&s.has(t)?a!==null:i!=null&&i.has(t)?Number(a):a||""},set(r){const a=this,c=ft.get(this),l=c[e],u=a.getAttribute(t);if(this[dt]&&u!==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):u!==String(r)&&a.setAttribute(t,String(r))}})}const is=Symbol("event handle");function we(n,e,t,s){Object.defineProperty(n,e,{configurable:!0,get(){const i=ft.get(this)[e];return i||!t?i:(this[e]=pi,this[e])},set(i){const r=this,a=ft.get(r);i!==a[e]&&(t?(a[e]=i!=null&&i[is]?i:(c,l)=>{const u=new CustomEvent(t,{...l,...s,detail:c});r.dispatchEvent(u),i(c,l)},Reflect.set(a[e],is,!0)):(a[e]=i,this[ns]()))}})}function mt(n,e,t){Object.defineProperty(n,e,{configurable:!0,get(){const s=ft.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 u=l.querySelector(`[ref=${t}]`);if(u)return u}}},s[e]=i}return i}})}function gt(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 yt=customElements.define.bind(customElements);customElements.define=(n,e,t)=>{if(e.prototype instanceof R){const{observedAttributes:s,observedProperties:i,defineEvents:r,defineCSSStates:a,defineRefs:c}=e;s==null||s.forEach(l=>pt(e.prototype,te(l),l)),i==null||i.forEach(l=>we(e.prototype,l)),r==null||r.forEach(l=>we(e.prototype,te(l),l)),a==null||a.forEach(l=>gt(e.prototype,te(l),l)),c==null||c.forEach(l=>mt(e.prototype,te(l),l))}yt(n,e,t)},window.__GEM_DEVTOOLS__HOOK__&&Object.assign(window.__GEM_DEVTOOLS__HOOK__,{...v,...fi});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 mi(n,e){const t=`${D(e)}-${He()}`;q(n,"defineRefs",t),mt(n,e,t)}function rn(n,e,t){q(n,"observedAttributes",t),pt(n,e,t)}function C(n,e){rn(n,e,D(e))}function on(n,e){const t=D(e);q(n,"booleanAttributes",t,!0),rn(n,e,t)}function gi(n,e){const t=D(e);q(n,"numberAttributes",t,!0),rn(n,e,t)}function T(n,e){q(n,"observedProperties",e),we(n,e)}function wt(n,e){const t=D(e);q(n,"defineCSSStates",t),gt(n,e,t)}function yi(n,e){const t=D(n[e]||e);n[e]=t,q(n instanceof R?n:n.prototype,"defineSlots",t)}function rs(n,e){const t=D(n[e]||e);n[e]=t,q(n instanceof R?n:n.prototype,"defineParts",t)}function xe(n,e){os(n,e)}function wi(n,e){os(n,e,{bubbles:!0,composed:!0})}function os(n,e,t){const s=D(e);q(n,"defineEvents",s),we(n,e,s,t)}function _i(n){return function(e){q(e.prototype,"adoptedStyleSheets",n)}}function _t(n){return function(e){q(e.prototype,"observedStores",n)}}function vi(n){return function(e){const t=e;t.rootElement=n}}function Ei(n){return function(e){yt(n,e)}}const G=window.history,as=G.pushState.bind(G),cs=G.replaceState.bind(G);let Si=0;const an=()=>`${performance.now()}-${++Si}`,[P,_e]=nt({$hasCloseHandle:!1,$hasOpenHandle:!1,$hasShouldCloseHandle:!1,$key:""}),$=new Map;function ls(n){const{$key:e,$hasCloseHandle:t,$hasOpenHandle:s,$hasShouldCloseHandle:i}=n||{};if(P.$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 hs(n){return W.basePath?W.basePath+n:n}function cn(n){return n===W.basePath?"/":n.replace(new RegExp(`^${W.basePath}/`),"/")}function ln(){W.dispatchEvent(new CustomEvent("beforechange"))}function vt(n){const e=$.get(P.$key)||{path:cn(location.pathname),query:new pe},t=n.path?Ut(e.path,n.path):cn(location.pathname),s=new pe(n.query??(n.path?"":location.search)),i=String(s)!==String(e.query),r=i?s:e.query,a=t!==e.path||i,c=n.title||(a?"":document.title),l=n.close||n.data||n.open||n.shouldClose,u=decodeURIComponent(n.hash??(!a&&l?location.hash:""));return{...n,title:c,path:t,query:r,hash:u}}function us(n,e){ls(n.data);const t=vt(n),{title:s,path:i,query:r,hash:a,close:c,open:l,shouldClose:u,data:m}=t,d={$hasCloseHandle:!!c,$hasOpenHandle:!!l,$hasShouldCloseHandle:!!u,$key:an(),$title:s,...m};$.set(d.$key,t),ln(),et(P),_e(d);const b=hs(i)+new pe(r)+a,f=decodeURIComponent(location.hash);e(d,s,b),f!==a&&window.dispatchEvent(new CustomEvent("hashchange"))}function ds(n,e,t,s){ls(n);const i={$key:an(),$title:e,...n||{}},{pathname:r,search:a,hash:c}=new URL(t,location.origin+location.pathname),l=vt({path:r,query:new pe(a),hash:c,title:e,data:n});$.set(i.$key,l),ln(),et(P),_e(i);const u=hs(r)+l.query+c,m=location.hash;s(i,e,u),m!==c&&window.dispatchEvent(new CustomEvent("hashchange"))}const[fs,bi]=nt({basePath:""});class Pi extends EventTarget{get store(){return P}get currentKey(){return P.$key}get basePath(){return fs.basePath}set basePath(e){bi({basePath:e}),Object.assign($.get(P.$key),{path:cn(location.pathname)})}getParams(){return $.get(P.$key)}updateParams(e){Object.assign($.get(P.$key),e),_e()}push(e){us(e,as)}replace(e){us(e,cs)}pushIgnoreCloseHandle(e){var t,s;P.$hasCloseHandle?((s=(t=$.get(P.$key))==null?void 0:t.close)==null||s.call(t),this.replace(e)):this.push(e)}forward(){G.forward()}back(){G.back()}}const W=new Pi,[Et,Ci]=nt({title:""}),ki={history:W,titleStore:Et,basePathStore:fs};if(!window._GEMHISTORY){if(window._GEMHISTORY=ki,G.pushState=function(e,t,s){ds(e,t,s,as)},G.replaceState=function(e,t,s){ds(e,t,s,cs)},window.addEventListener("hashchange",({isTrusted:e})=>{e&&W.replace({hash:location.hash})}),G.state)if(G.state.$hasCloseHandle){_e(G.state);const e=vt({title:document.title});$.set(P.$key,e),W.back()}else{const e=vt({title:document.title,hash:location.hash});_e({$key:an(),...G.state||{}}),$.set(P.$key,e)}else{const{pathname:e,search:t,hash:s}=location;W.replace({path:e,query:t,hash:s})}ne(Et,()=>{const e=$.get(P.$key);e&&(e.title=Et.title)}),ne(P,()=>{const{title:e}=W.getParams();e!==Et.title&&Ci({title:e})});let n=!1;window.addEventListener("popstate",e=>{var r,a;const t=e.state;if(!(t!=null&&t.$key))return;if(n){n=!1;return}if(!$.has(t.$key)){const{pathname:c,search:l,hash:u}=location;$.set(t.$key,{path:c,query:new pe(l),hash:decodeURIComponent(u),title:t.$title,data:t})}const s=P;if(parseFloat(t.$key)>parseFloat(s.$key)&&t.$hasOpenHandle)(a=(r=$.get(t.$key))==null?void 0:r.open)==null||a.call(r);else if(s.$hasCloseHandle){const c=$.get(s.$key),l=c==null?void 0:c.close,u=c==null?void 0:c.shouldClose;if(u&&!u()){n=!0,W.forward();return}else l?l():t.$hasCloseHandle&&(n=!0,W.back())}ln(),et(P),_e(t)})}const{history:y,titleStore:ve,basePathStore:ps}=window._GEMHISTORY;var Li=Object.defineProperty,Ti=Object.getOwnPropertyDescriptor,U=(n,e,t,s)=>{for(var i=s>1?void 0:s?Ti(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&&Li(e,t,i),i},ms=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)},j=(n,e,t)=>(ms(n,e,"read from private field"),t?t.call(n):e.get(n)),Ve=(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)},gs=(n,e,t,s)=>(ms(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),De,he,Ee,St,hn,bt;const ys="_";class $i extends RegExp{constructor(e){let t=0;super(`^${e.replace(/((:[^/$]+)|(\*))/g,(s,i)=>i==="*"?`(?<${ys}${t++}>.*)`:`(?<${i.slice(1)}>[^/]+)`)}$`)}}function un(n,e){if(window.URLPattern){const r=new window.URLPattern({pathname:n}),a=r.exec({pathname:e})||r.exec({pathname:`${e}/`});return a?a.pathname.groups:null}const t=new $i(n),s=e.match(t)||`${e}/`.match(t);if(!s)return null;const i={};return s.groups&&Object.entries(s.groups).forEach(([r,a])=>{i[r.startsWith(ys)?r.slice(1):r]=a}),i}function Pt(n,e){let t=0,s=n.pattern.replaceAll("*",()=>`:${t++}`);const i=e==null?void 0:e.params;return i&&Object.keys(i).forEach(r=>{s=s.replace(new RegExp(`:${r}`,"g"),i[r])}),s}function ws(n,e){return{path:Pt(n,e),...e}}const dn=V``,_s=new Map,M=class qs extends R{constructor({isLight:e,routes:t}={}){super({isLight:e}),Ve(this,he),this.trigger=y,this.currentParams={},Ve(this,De,void 0),this.state={content:dn},Ve(this,St,()=>{if(!this.locationStore)return;const{path:s,query:i,hash:r,data:a}=y.getParams();z(this.locationStore,{path:s,params:this.currentParams,query:i,hash:r,data:a})}),Ve(this,hn,()=>{if(!j(this,he,Ee))return;const s=_s.get(y.currentKey);s?j(this,he,Ee).scroll(0,s):(this.scrollIgnoreHash||!y.getParams().hash)&&j(this,he,Ee).scroll(0,0)}),Ve(this,bt,(s,i,r)=>{this.beforeroutechange(s),gs(this,De,void 0),this.currentRoute=s,this.currentParams=i;const a=async()=>{this.setState({content:r}),j(this,St).call(this),await Promise.resolve(),j(this,hn).call(this),this.routechange(this.currentRoute)};this.transition&&"startViewTransition"in document?document.startViewTransition(()=>a()):a()}),this.update=()=>{const{path:s,hash:i,query:r}=this.trigger.getParams(),{route:a,params:c={}}=qs.findRoute(this.routes,s),{redirect:l,content:u,getContent:m}=a||{};if(l){this.trigger.replace({path:Pt({pattern:l},{params:c}),query:r,hash:i});return}this.trigger===y&&z(ve,{title:a==null?void 0:a.title});const d=u||(m==null?void 0:m(c,this.shadowRoot||this));if(this.loading(a),d instanceof Promise){gs(this,De,d);const b=()=>j(this,De)===d;d.then(f=>{b()&&j(this,bt).call(this,a,c,f)}).catch(f=>{b()&&this.error(f)});return}j(this,bt).call(this,a,c,d)},this.routes=this.routes||t}mounted(){this.effect(()=>{if(j(this,he,Ee))return jt(y,"beforechange",()=>_s.set(y.currentKey,j(this,he,Ee).scrollTop))},()=>[this.scrollContainer]),this.effect(()=>ne(this.trigger.store,()=>this.setState({})),()=>[this.trigger]),this.effect(([e,t],s)=>{if(s&&e===s[0]&&t===s[1]){j(this,St).call(this);return}this.update()},()=>{const{path:e,query:t,hash:s}=this.trigger.getParams();return[this.key,e,t,s]})}shouldUpdate(){return!this.inert}render(){const{content:e}=this.state;if(e!==void 0)return this.shadowRoot?V`
169
+ */const wi=new WeakMap,Tr=St(e=>t=>{const n=wi.get(t);if(e===void 0&&t instanceof Zn){if(n!==void 0||!wi.has(t)){const i=t.committer.name;t.committer.element.removeAttribute(i)}}else e!==n&&t.setValue(e);wi.set(t,e)});var Lc=Object.create,Si=Object.defineProperty,Nc=Object.getOwnPropertyDescriptor,Mr=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Zt=e=>{throw TypeError(e)},Or=(e,t,n)=>t in e?Si(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Lr=(e,t)=>Si(e,"name",{value:t,configurable:!0}),Nr=e=>[,,,Lc((e==null?void 0:e[Mr("metadata")])??null)],Ar=["class","method","getter","setter","accessor","field","value","get","set"],Ve=e=>e!==void 0&&typeof e!="function"?Zt("Function expected"):e,Ac=(e,t,n,i,s)=>({kind:Ar[e],name:t,metadata:i,addInitializer:o=>n._?Zt("Already initialized"):s.push(Ve(o||null))}),Rr=(e,t)=>Or(t,Mr("metadata"),e[3]),P=(e,t,n,i)=>{for(var s=0,o=e[t>>1],c=o&&o.length;s<c;s++)t&1?o[s].call(n):i=o[s].call(n,i);return i},z=(e,t,n,i,s,o)=>{var c,a,_,u,v,r=t&7,m=!!(t&8),l=!!(t&16),g=r>3?e.length+1:r?m?1:2:0,w=Ar[r+5],y=r>3&&(e[g-1]=[]),b=e[g]||(e[g]=[]),f=r&&(!l&&!m&&(s=s.prototype),r<5&&(r>3||!l)&&Nc(r<4?s:{get[n](){return G(this,o)},set[n](d){return Tn(this,o,d)}},n));r?l&&r<4&&Lr(o,(r>2?"set ":r>1?"get ":"")+n):Lr(s,n);for(var $=i.length-1;$>=0;$--)u=Ac(r,n,_={},e[3],b),r&&(u.static=m,u.private=l,v=u.access={has:l?d=>Rc(s,d):d=>n in d},r^3&&(v.get=l?d=>(r^1?G:Ic)(d,s,r^4?o:f.get):d=>d[n]),r>2&&(v.set=l?(d,T)=>Tn(d,s,T,r^4?o:f.set):(d,T)=>d[n]=T)),a=(0,i[$])(r?r<4?l?o:f[w]:r>4?void 0:{get:f.get,set:f.set}:s,u),_._=1,r^4||a===void 0?Ve(a)&&(r>4?y.unshift(a):r?l?o=a:f[w]=a:s=a):typeof a!="object"||a===null?Zt("Object expected"):(Ve(c=a.get)&&(f.get=c),Ve(c=a.set)&&(f.set=c),Ve(c=a.init)&&y.unshift(c));return r||Rr(e,s),f&&Si(s,n,f),l?r^4?o:f:s},F=(e,t,n)=>Or(e,typeof t!="symbol"?t+"":t,n),yi=(e,t,n)=>t.has(e)||Zt("Cannot "+n),Rc=(e,t)=>Object(t)!==t?Zt('Cannot use the "in" operator on this value'):e.has(t),G=(e,t,n)=>(yi(e,t,"read from private field"),n?n.call(e):t.get(e)),Z=(e,t,n)=>t.has(e)?Zt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Tn=(e,t,n,i)=>(yi(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Ic=(e,t,n)=>(yi(e,t,"access private method"),n),Ir,Hr,Wr,xr,zr,Gr,Vr,Dr,Fr,qr,Ur,Br,jr,Kr,Jr,Qr,$i,S,zt,te,De,Mn,Ei,Fe,On,bi,Ci,Pi,ki,Ti,Mi,Yr,Oi,Xr;const Zr="_";class Hc extends RegExp{constructor(t){let n=0;super(`^${t.replace(/((:[^/$]+)|(\*))/g,(i,s)=>s==="*"?`(?<${Zr}${n++}>.*)`:`(?<${s.slice(1)}>[^/]+)`)}$`)}}function Li(e,t){if(window.URLPattern){const o=new window.URLPattern({pathname:e}),c=o.exec({pathname:t})||o.exec({pathname:`${t}/`});return c?c.pathname.groups:null}const n=new Hc(e),i=t.match(n)||`${t}/`.match(n);if(!i)return null;const s={};return i.groups&&Object.entries(i.groups).forEach(([o,c])=>{s[o.startsWith(Zr)?o.slice(1):o]=c}),s}function Ln(e,t){let n=0,i=e.pattern.replaceAll("*",()=>`:${n++}`);const s=t==null?void 0:t.params;return s&&Object.keys(s).forEach(o=>{i=i.replace(new RegExp(`:${o}`,"g"),s[o])}),i}function to(e,t){return{path:Ln(e,t),...t}}const Ni=st``,eo=new Map;class V extends($i=q,Qr=[He],Jr=[U],Kr=[U],jr=[U],Br=[Yt],Ur=[Yt],qr=[Yt],Fr=[Yt],Dr=[U],Vr=[U],Gr=[U],zr=[We()],xr=[ft(t=>[t.scrollContainer])],Wr=[ft(t=>[t.scrollContainer])],Hr=[ft(t=>{var n;return G(n=t,ki).call(n)})],Ir=[ui(t=>!t.inert)],$i){constructor(){super(...arguments),Z(this,zt),F(this,"transition",P(S,8,this)),P(S,11,this),F(this,"routes",P(S,12,this)),P(S,15,this),F(this,"locationStore",P(S,16,this)),P(S,19,this),F(this,"key",P(S,20,this)),P(S,23,this),F(this,"loading",P(S,24,this)),P(S,27,this),F(this,"beforeroutechange",P(S,28,this)),P(S,31,this),F(this,"routechange",P(S,32,this)),P(S,35,this),F(this,"error",P(S,36,this)),P(S,39,this),F(this,"scrollContainer",P(S,40,this)),P(S,43,this),F(this,"scrollIgnoreHash",P(S,44,this)),P(S,47,this),F(this,"trigger",P(S,48,this,L)),P(S,51,this),F(this,"currentRoute"),F(this,"currentParams",{}),Z(this,De,h.createState({content:Ni})),Z(this,Mn,()=>{if(!this.locationStore)return;const{path:t,query:n,hash:i,data:s}=L.getParams();Et(this.locationStore,{path:t,params:this.currentParams,query:n,hash:i,data:s})}),Z(this,Ei,()=>{if(!G(this,zt,te))return;const t=eo.get(L.currentKey);t?G(this,zt,te).scroll(0,t):(this.scrollIgnoreHash||!L.getParams().hash)&&G(this,zt,te).scroll(0,0)}),Z(this,Fe),Z(this,On,(t,n,i)=>{this.beforeroutechange(t),Tn(this,Fe,void 0),this.currentRoute=t,this.currentParams=n;const s=async()=>{G(this,De).call(this,{content:i}),G(this,Mn).call(this),await Promise.resolve(),G(this,Ei).call(this),this.routechange(this.currentRoute)};this.transition&&"startViewTransition"in document?document.startViewTransition(()=>s()):s()}),Z(this,bi,P(S,52,this,()=>this.internals.states.delete(Ae))),P(S,55,this),Z(this,Ci,P(S,56,this,()=>{if(G(this,zt,te))return ei(L,"beforechange",()=>eo.set(L.currentKey,G(this,zt,te).scrollTop))})),P(S,59,this),Z(this,Pi,P(S,60,this,()=>ht(this.trigger.store,()=>G(this,De).call(this,{})))),P(S,63,this),Z(this,ki,()=>{const{path:t,query:n,hash:i}=this.trigger.getParams();return[this.key,t,n,i]}),Z(this,Ti,P(S,64,this,([t,n],i)=>{if(i&&t===i[0]&&n===i[1]){G(this,Mn).call(this);return}this.update()})),P(S,67,this),Z(this,Mi,P(S,68,this,()=>{const{content:t}=G(this,De);if(t!==void 0)return this.shadowRoot?st`
171
170
  <style>
172
171
  :host(:where(:not([hidden]))),
173
172
  :not(:defined) {
174
173
  display: contents;
175
174
  }
176
175
  </style>
177
- ${e===dn?V`<slot></slot>`:e}
178
- `:e===dn?void 0:V`${e}`}};De=new WeakMap,he=new WeakSet,Ee=function(){return typeof this.scrollContainer=="function"?this.scrollContainer():this.scrollContainer},St=new WeakMap,hn=new WeakMap,bt=new WeakMap,M.createLocationStore=()=>{const{path:n,query:e,hash:t,data:s}=y.getParams();return ge({path:n,query:e,hash:t,data:s,params:{}})},M.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=un(i.pattern,e);if(r)return{route:i,params:r}}return{route:t}},U([on],M.prototype,"transition",2),U([T],M.prototype,"routes",2),U([T],M.prototype,"locationStore",2),U([T],M.prototype,"key",2),U([xe],M.prototype,"loading",2),U([xe],M.prototype,"beforeroutechange",2),U([xe],M.prototype,"routechange",2),U([xe],M.prototype,"error",2),U([T],M.prototype,"scrollContainer",2),U([T],M.prototype,"scrollIgnoreHash",2),U([T],M.prototype,"trigger",2);let fn=M;class vs extends fn{constructor(e={}){super({...e,isLight:!0})}}var Mi=Object.defineProperty,Ni=Object.getOwnPropertyDescriptor,k=(n,e,t,s)=>{for(var i=s>1?void 0:s?Ni(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&&Mi(e,t,i),i},Oi=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)},re=(n,e,t)=>(Oi(n,e,"read from private field"),t?t.call(n):e.get(n)),qe=(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)},Se,Ue,pn,Es,mn,gn,yn;function Ss(n){return!n.startsWith("/")}o.GemLinkElement=class extends R{constructor(){super({focusable:!0}),qe(this,Se),qe(this,pn),qe(this,mn,async()=>{var r;const e=this.getLocationString();if(!e)return;if(Ss(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}=y.getParams();if(t+s+i!==e)if(await((r=this.prepare)==null?void 0:r.call(this)),this.route)y.pushIgnoreCloseHandle({...ws(this.route,re(this,Se,Ue)),title:this.route.title||this.docTitle});else if(this.href){const{pathname:a,search:c,hash:l}=new URL(e,location.origin);y.pushIgnoreCloseHandle({path:a,query:c,hash:l,title:this.docTitle})}else y.pushIgnoreCloseHandle({path:this.path,query:this.query,hash:this.hash,title:this.docTitle})}),qe(this,gn,e=>{e.preventDefault()}),qe(this,yn,()=>{const e=this.getLocationString();return Ss(e)?e:new URL(y.basePath+e,location.origin).toString()}),this.addEventListener("click",re(this,mn))}render(){return V`
179
- <style>
180
- :host {
181
- /* link default style */
182
- cursor: pointer;
183
- color: blue;
184
- text-decoration: underline;
185
- }
186
- a {
187
- all: unset;
188
- display: contents;
189
- }
190
- a:visited {
191
- color: unset;
192
- }
193
- </style>
176
+ ${t===Ni?st`<slot></slot>`:t}
177
+ `:t===Ni?void 0:st`${t}`})),P(S,71,this),F(this,"update",()=>{const{path:t,hash:n,query:i}=this.trigger.getParams(),{route:s,params:o={}}=ee.findRoute(this.routes,t),{redirect:c,content:a,getContent:_}=s||{};if(c){this.trigger.replace({path:Ln({pattern:c},{params:o}),query:i,hash:n});return}this.trigger===L&&(location.href!==Tt.url||s!=null&&s.title)&&Et(Tt,{url:location.href,title:s==null?void 0:s.title});const u=a||(_==null?void 0:_(o,this.shadowRoot||this));if(this.loading(s),u instanceof Promise){Tn(this,Fe,u);const v=()=>G(this,Fe)===u;u.then(r=>{v()&&G(this,On).call(this,s,o,r)}).catch(r=>{v()&&this.error(r)});return}G(this,On).call(this,s,o,u)})}}S=Nr($i),zt=new WeakSet,te=function(){return typeof this.scrollContainer=="function"?this.scrollContainer():this.scrollContainer},De=new WeakMap,Mn=new WeakMap,Ei=new WeakMap,Fe=new WeakMap,On=new WeakMap,bi=new WeakMap,Ci=new WeakMap,Pi=new WeakMap,ki=new WeakMap,Ti=new WeakMap,Mi=new WeakMap,z(S,5,"transition",Qr,V),z(S,5,"routes",Jr,V),z(S,5,"locationStore",Kr,V),z(S,5,"key",jr,V),z(S,5,"loading",Br,V),z(S,5,"beforeroutechange",Ur,V),z(S,5,"routechange",qr,V),z(S,5,"error",Fr,V),z(S,5,"scrollContainer",Dr,V),z(S,5,"scrollIgnoreHash",Vr,V),z(S,5,"trigger",Gr,V),z(S,21,"#unBoundary",zr,bi),z(S,21,"#rememberScrollPosition",xr,Ci),z(S,21,"#connectTriggerStore",Wr,Pi),z(S,21,"#updateContent",Hr,Ti),z(S,21,"#content",Ir,Mi),Rr(S,V),F(V,"createLocationStore",()=>{const{path:e,query:t,hash:n,data:i}=L.getParams();return Le({path:e,query:t,hash:n,data:i,params:{}})}),F(V,"findRoute",(e=[],t)=>{let n=null,i;e instanceof Array?i=e:i=Object.values(e);for(const s of i)if(s.pattern==="*")n=s;else{const o=Li(s.pattern,t);if(o)return{route:s,params:o}}return{route:n}}),Yr=[kt()];class ee extends(Xr=V){}Oi=Nr(Xr),ee=z(Oi,0,"GemRouteElement",Yr,ee),P(Oi,1,ee);var Wc=Object.create,Ai=Object.defineProperty,xc=Object.getOwnPropertyDescriptor,no=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),ne=e=>{throw TypeError(e)},io=(e,t,n)=>t in e?Ai(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,so=(e,t)=>Ai(e,"name",{value:t,configurable:!0}),ro=e=>[,,,Wc((e==null?void 0:e[no("metadata")])??null)],oo=["class","method","getter","setter","accessor","field","value","get","set"],qe=e=>e!==void 0&&typeof e!="function"?ne("Function expected"):e,zc=(e,t,n,i,s)=>({kind:oo[e],name:t,metadata:i,addInitializer:o=>n._?ne("Already initialized"):s.push(qe(o||null))}),Gc=(e,t)=>io(t,no("metadata"),e[3]),k=(e,t,n,i)=>{for(var s=0,o=e[t>>1],c=o&&o.length;s<c;s++)t&1?o[s].call(n):i=o[s].call(n,i);return i},I=(e,t,n,i,s,o)=>{var c,a,_,u,v,r=t&7,m=!!(t&8),l=!!(t&16),g=r>3?e.length+1:r?m?1:2:0,w=oo[r+5],y=r>3&&(e[g-1]=[]),b=e[g]||(e[g]=[]),f=r&&(!l&&!m&&(s=s.prototype),r<5&&(r>3||!l)&&xc(r<4?s:{get[n](){return rt(this,o)},set[n](d){return ao(this,o,d)}},n));r?l&&r<4&&so(o,(r>2?"set ":r>1?"get ":"")+n):so(s,n);for(var $=i.length-1;$>=0;$--)u=zc(r,n,_={},e[3],b),r&&(u.static=m,u.private=l,v=u.access={has:l?d=>Vc(s,d):d=>n in d},r^3&&(v.get=l?d=>(r^1?rt:Dc)(d,s,r^4?o:f.get):d=>d[n]),r>2&&(v.set=l?(d,T)=>ao(d,s,T,r^4?o:f.set):(d,T)=>d[n]=T)),a=(0,i[$])(r?r<4?l?o:f[w]:r>4?void 0:{get:f.get,set:f.set}:s,u),_._=1,r^4||a===void 0?qe(a)&&(r>4?y.unshift(a):r?l?o=a:f[w]=a:s=a):typeof a!="object"||a===null?ne("Object expected"):(qe(c=a.get)&&(f.get=c),qe(c=a.set)&&(f.set=c),qe(c=a.init)&&y.unshift(c));return r||Gc(e,s),f&&Ai(s,n,f),l?r^4?o:f:s},K=(e,t,n)=>io(e,typeof t!="symbol"?t+"":t,n),Ri=(e,t,n)=>t.has(e)||ne("Cannot "+n),Vc=(e,t)=>Object(t)!==t?ne('Cannot use the "in" operator on this value'):e.has(t),rt=(e,t,n)=>(Ri(e,t,"read from private field"),n?n.call(e):t.get(e)),ie=(e,t,n)=>t.has(e)?ne("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ao=(e,t,n,i)=>(Ri(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Dc=(e,t,n)=>(Ri(e,t,"access private method"),n),co,lo,ho,uo,fo,po,_o,mo,go,vo,wo,So,yo,Ii,$o,E,Mt,Ue,Eo,Hi,Wi,xi,zi,Gi,bo,Co,Po,Vi,ko,tt,Di;function To(e){return!e.startsWith("/")}const Fc=Re(ni`
178
+ :host {
179
+ /* link default style */
180
+ cursor: pointer;
181
+ color: blue;
182
+ text-decoration: underline;
183
+ }
184
+ a {
185
+ all: unset;
186
+ display: contents;
187
+ }
188
+ a:visited {
189
+ color: unset;
190
+ }
191
+ `);$o=[ze(Er),Cn(Fc),kt(),Ge({focusable:!0})];class H extends(Ii=q,yo=[D],So=[D],wo=[D],vo=[D],go=[D],mo=[D],_o=[He],po=[U],fo=[U],uo=[U],ho=[U],lo=[di],co=[Qt()],Ii){constructor(){super(...arguments),k(E,5,this),ie(this,Mt),K(this,"href",k(E,8,this)),k(E,11,this),K(this,"target",k(E,12,this)),k(E,15,this),K(this,"path",k(E,16,this)),k(E,19,this),K(this,"query",k(E,20,this)),k(E,23,this),K(this,"hash",k(E,24,this)),k(E,27,this),K(this,"hint",k(E,28,this)),k(E,31,this),K(this,"preload",k(E,32,this)),k(E,35,this),K(this,"route",k(E,36,this)),k(E,39,this),K(this,"options",k(E,40,this)),k(E,43,this),K(this,"routeOptions",k(E,44,this)),k(E,47,this),K(this,"prepare",k(E,48,this)),k(E,51,this),K(this,"link",k(E,52,this)),k(E,55,this),ie(this,Hi,async()=>{var o;const t=this.getLocationString();if(!t)return;if(To(t))switch(this.target){case"_self":window.location.href=t;return;case"_parent":window.parent.location.href=t;return;case"_top":window.top.location.href=t;return;default:window.open(t);return}const{path:n,query:i,hash:s}=L.getParams();if(n+i+s!==t)if(await((o=this.prepare)==null?void 0:o.call(this)),this.route)L.pushIgnoreCloseHandle(to(this.route,rt(this,Mt,Ue)));else if(this.href){const c=new URL(t,location.origin);L.pushIgnoreCloseHandle({path:c.pathname,query:c.search,hash:c.hash})}else L.pushIgnoreCloseHandle({path:this.path,query:this.query,hash:this.hash})}),ie(this,Wi,t=>{t.preventDefault()}),ie(this,xi,()=>{const t=this.getLocationString();return To(t)?t:new URL(L.basePath+t,location.origin).toString()}),ie(this,zi,()=>{var t,n,i;(t=this.route)==null||t.content,(i=(n=this.route)==null?void 0:n.getContent)==null||i.call(n,{},this.shadowRoot)})}render(){return st`
194
192
  <a
195
193
  part=${this.link}
196
- @click=${re(this,gn)}
197
- href=${Qt(re(this,pn,Es)==="off"?void 0:re(this,yn).call(this))}
194
+ @click=${rt(this,Wi)}
195
+ href=${Tr(rt(this,Mt,Eo)==="off"?void 0:rt(this,xi).call(this))}
196
+ tabindex="-1"
198
197
  >
199
198
  <slot></slot>
200
199
  </a>
201
- `}getLocationString(){var e,t;if(this.route){const s=((e=re(this,Se,Ue))==null?void 0:e.query)||"",i=((t=re(this,Se,Ue))==null?void 0:t.hash)||"";return Pt(this.route,re(this,Se,Ue))+s+i}else{const s=this.href||this.path+this.query+this.hash,{path:i,query:r}=y.getParams();return s.startsWith("#")?`${i}${r}${s}`:s.startsWith("?")?`${i}${s}`:s.startsWith(".")?Ut(i,s):s}}},Se=new WeakSet,Ue=function(){return this.routeOptions||this.options},pn=new WeakSet,Es=function(){return this.hint||"on"},mn=new WeakMap,gn=new WeakMap,yn=new WeakMap,k([C],o.GemLinkElement.prototype,"href",2),k([C],o.GemLinkElement.prototype,"target",2),k([C],o.GemLinkElement.prototype,"path",2),k([C],o.GemLinkElement.prototype,"query",2),k([C],o.GemLinkElement.prototype,"hash",2),k([C],o.GemLinkElement.prototype,"docTitle",2),k([C],o.GemLinkElement.prototype,"hint",2),k([T],o.GemLinkElement.prototype,"route",2),k([T],o.GemLinkElement.prototype,"options",2),k([T],o.GemLinkElement.prototype,"routeOptions",2),k([T],o.GemLinkElement.prototype,"prepare",2),k([rs],o.GemLinkElement.prototype,"link",2),o.GemLinkElement=k([_t(ps)],o.GemLinkElement),o.GemActiveLinkElement=class extends o.GemLinkElement{constructor(){super(),this.effect(()=>{const{path:e,query:t,hash:s}=y.getParams(),i=this.pattern&&un(this.pattern,e);this.active=!!i||e+t+s===this.getLocationString()})}},k([C],o.GemActiveLinkElement.prototype,"pattern",2),k([wt],o.GemActiveLinkElement.prototype,"active",2),o.GemActiveLinkElement=k([_t(y.store)],o.GemActiveLinkElement),customElements.define("gem-link",o.GemLinkElement),customElements.define("gem-active-link",o.GemActiveLinkElement),customElements.define("gem-route",fn),customElements.define("gem-light-route",vs);var Ri=Object.defineProperty,Ai=Object.getOwnPropertyDescriptor,wn=(n,e,t,s)=>{for(var i=s>1?void 0:s?Ai(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&&Ri(e,t,i),i};const Ct=document.title;let _n="";const Hi=()=>document.title=_n;function bs(n,e="",t=""){const s=ve.title||n;s&&s!==Ct?(be.title=s,_n=e+be.title+t):(be.title=Ct,_n=be.title),H(Hi)}ne(ve,bs);const Ps=`${Ct} | `,Cs=` - ${Ct}`,ue=class Us extends R{constructor(){super(),this.mounted=()=>{this.effect(()=>!this.inert&&ne(ve,this.update),()=>[this.inert])},new MutationObserver(()=>this.update()).observe(this,{characterData:!0,childList:!0,subtree:!0})}static setTitle(e){z(ve,{title:e})}render(){var e;return bs((e=this.textContent)==null?void 0:e.trim(),this.prefix,this.suffix),V`${Us.title}`}};ue.title=document.title,ue.defaultPrefix=Ps,ue.defaultSuffix=Cs,wn([C],ue.prototype,"prefix",2),wn([C],ue.prototype,"suffix",2),wn([on],ue.prototype,"inert",2);let be=ue;customElements.define("gem-title",be);var Gi=Object.defineProperty,Wi=Object.getOwnPropertyDescriptor,kt=(n,e,t,s)=>{for(var i=s>1?void 0:s?Wi(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&&Gi(e,t,i),i};const ks=new Map;class Pe extends R{constructor(){super(...arguments);N(this,Xe,void 0);Y(this,Xe,()=>{const t=this.element||(this.selector?(this.root||document).querySelector(this.selector):null);if(typeof t=="string"){let s=ks.get(t);return s||(s=document.createElement("template"),s.innerHTML=t,ks.set(t,s)),s.content.cloneNode(!0)}else return t instanceof HTMLTemplateElement?t.content.cloneNode(!0):t==null?void 0:t.cloneNode(!0)})}render(){return V`
200
+ `}getLocationString(){var t,n;if(this.route){const i=((t=rt(this,Mt,Ue))==null?void 0:t.query)||"",s=((n=rt(this,Mt,Ue))==null?void 0:n.hash)||"";return Ln(this.route,rt(this,Mt,Ue))+i+s}else{const i=this.href||this.path+this.query+this.hash,{path:s,query:o}=L.getParams();return i.startsWith("#")?`${s}${o}${i}`:i.startsWith("?")?`${s}${i}`:i.startsWith(".")?ti(s,i):i}}}E=ro(Ii),Mt=new WeakSet,Ue=function(){return this.routeOptions||this.options},Eo=function(){return this.hint||"on"},Hi=new WeakMap,Wi=new WeakMap,xi=new WeakMap,zi=new WeakMap,Gi=function(){this.addEventListener("click",rt(this,Hi)),this.addEventListener("pointerenter",rt(this,zi))},Gi=I(E,17,"#init",co,Mt,Gi),I(E,5,"href",yo,H),I(E,5,"target",So,H),I(E,5,"path",wo,H),I(E,5,"query",vo,H),I(E,5,"hash",go,H),I(E,5,"hint",mo,H),I(E,5,"preload",_o,H),I(E,5,"route",po,H),I(E,5,"options",fo,H),I(E,5,"routeOptions",uo,H),I(E,5,"prepare",ho,H),I(E,5,"link",lo,H),H=I(E,0,"GemLinkElement",$o,H),k(E,1,H),ko=[ze(L.store)];class Gt extends(Vi=H,Po=[D],Co=[xe],bo=[ft()],Vi){constructor(){super(...arguments),K(this,"pattern",k(tt,8,this)),k(tt,11,this),K(this,"active",k(tt,12,this)),k(tt,15,this),ie(this,Di,k(tt,16,this,()=>{const{path:t,query:n,hash:i}=L.getParams(),s=this.pattern&&Li(this.pattern,t);this.active=!!s||t+n+i===this.getLocationString()})),k(tt,19,this)}}tt=ro(Vi),Di=new WeakMap,I(tt,5,"pattern",Po,Gt),I(tt,5,"active",Co,Gt),I(tt,21,"#updateState",bo,Di),Gt=I(tt,0,"GemActiveLinkElement",ko,Gt),k(tt,1,Gt),customElements.define("gem-link",H),customElements.define("gem-active-link",Gt),customElements.define("gem-route",ee),customElements.define("gem-light-route",V);var qc=Object.create,Fi=Object.defineProperty,Uc=Object.getOwnPropertyDescriptor,Mo=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),se=e=>{throw TypeError(e)},Oo=(e,t,n)=>t in e?Fi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Lo=(e,t)=>Fi(e,"name",{value:t,configurable:!0}),Bc=e=>[,,,qc((e==null?void 0:e[Mo("metadata")])??null)],No=["class","method","getter","setter","accessor","field","value","get","set"],Be=e=>e!==void 0&&typeof e!="function"?se("Function expected"):e,jc=(e,t,n,i,s)=>({kind:No[e],name:t,metadata:i,addInitializer:o=>n._?se("Already initialized"):s.push(Be(o||null))}),Kc=(e,t)=>Oo(t,Mo("metadata"),e[3]),ot=(e,t,n,i)=>{for(var s=0,o=e[t>>1],c=o&&o.length;s<c;s++)t&1?o[s].call(n):i=o[s].call(n,i);return i},re=(e,t,n,i,s,o)=>{var c,a,_,u,v,r=t&7,m=!!(t&8),l=!!(t&16),g=r>3?e.length+1:r?m?1:2:0,w=No[r+5],y=r>3&&(e[g-1]=[]),b=e[g]||(e[g]=[]),f=r&&(!l&&!m&&(s=s.prototype),r<5&&(r>3||!l)&&Uc(r<4?s:{get[n](){return Ui(this,o)},set[n](d){return Ao(this,o,d)}},n));r?l&&r<4&&Lo(o,(r>2?"set ":r>1?"get ":"")+n):Lo(s,n);for(var $=i.length-1;$>=0;$--)u=jc(r,n,_={},e[3],b),r&&(u.static=m,u.private=l,v=u.access={has:l?d=>Jc(s,d):d=>n in d},r^3&&(v.get=l?d=>(r^1?Ui:Qc)(d,s,r^4?o:f.get):d=>d[n]),r>2&&(v.set=l?(d,T)=>Ao(d,s,T,r^4?o:f.set):(d,T)=>d[n]=T)),a=(0,i[$])(r?r<4?l?o:f[w]:r>4?void 0:{get:f.get,set:f.set}:s,u),_._=1,r^4||a===void 0?Be(a)&&(r>4?y.unshift(a):r?l?o=a:f[w]=a:s=a):typeof a!="object"||a===null?se("Object expected"):(Be(c=a.get)&&(f.get=c),Be(c=a.set)&&(f.set=c),Be(c=a.init)&&y.unshift(c));return r||Kc(e,s),f&&Fi(s,n,f),l?r^4?o:f:s},je=(e,t,n)=>Oo(e,typeof t!="symbol"?t+"":t,n),qi=(e,t,n)=>t.has(e)||se("Cannot "+n),Jc=(e,t)=>Object(t)!==t?se('Cannot use the "in" operator on this value'):e.has(t),Ui=(e,t,n)=>(qi(e,t,"read from private field"),n?n.call(e):t.get(e)),Bi=(e,t,n)=>t.has(e)?se("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Ao=(e,t,n,i)=>(qi(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Qc=(e,t,n)=>(qi(e,t,"access private method"),n),Ro,Io,Ho,Wo,xo,ji,zo,W,Ki,Ji,Qi;let Go=0;const Vo=e=>{clearTimeout(Go),Go=window.setTimeout(()=>document.title=e)};function Yc(e,t="",n=""){const i=Tt.title||e;i&&i!==Tt.defaultTitle?(oe.title=i,Vo(t+oe.title+n)):(oe.title=Tt.defaultTitle,Vo(oe.title))}zo=[kt()];let Ot=class Ua extends(ji=q,xo=[D],Wo=[D],Ho=[He],Io=[ft(t=>[t.inert])],Ro=[Qt()],ji){constructor(){super(...arguments),je(this,"prefix",ot(W,8,this)),ot(W,11,this),je(this,"suffix",ot(W,12,this)),ot(W,15,this),je(this,"inert",ot(W,16,this)),ot(W,19,this),Bi(this,Ki,ot(W,20,this,()=>!this.inert&&ht(Tt,this.update))),ot(W,23,this),Bi(this,Ji,new MutationObserver(()=>this.update())),Bi(this,Qi,ot(W,24,this,()=>{Ui(this,Ji).observe(this,{characterData:!0,childList:!0,subtree:!0})})),ot(W,27,this),je(this,"render",()=>{var t;return Yc((t=this.textContent)==null?void 0:t.trim(),this.prefix,this.suffix),st`${Ua.title}`})}static setTitle(t){Et(Tt,{title:t})}};W=Bc(ji),Ki=new WeakMap,Ji=new WeakMap,Qi=new WeakMap,re(W,5,"prefix",xo,Ot),re(W,5,"suffix",Wo,Ot),re(W,5,"inert",Ho,Ot),re(W,21,"#connectStore",Io,Ki),re(W,21,"#obTextContent",Ro,Qi),Ot=re(W,0,"GemTitleElement",zo,Ot),je(Ot,"title",document.title),ot(W,1,Ot);let oe=Ot;customElements.define("gem-title",oe);var Xc=Object.create,Yi=Object.defineProperty,Zc=Object.getOwnPropertyDescriptor,Do=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),ae=e=>{throw TypeError(e)},Fo=(e,t,n)=>t in e?Yi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qo=(e,t)=>Yi(e,"name",{value:t,configurable:!0}),tl=e=>[,,,Xc((e==null?void 0:e[Do("metadata")])??null)],Uo=["class","method","getter","setter","accessor","field","value","get","set"],Ke=e=>e!==void 0&&typeof e!="function"?ae("Function expected"):e,el=(e,t,n,i,s)=>({kind:Uo[e],name:t,metadata:i,addInitializer:o=>n._?ae("Already initialized"):s.push(Ke(o||null))}),nl=(e,t)=>Fo(t,Do("metadata"),e[3]),pt=(e,t,n,i)=>{for(var s=0,o=e[t>>1],c=o&&o.length;s<c;s++)t&1?o[s].call(n):i=o[s].call(n,i);return i},Je=(e,t,n,i,s,o)=>{var c,a,_,u,v,r=t&7,m=!!(t&8),l=!!(t&16),g=r>3?e.length+1:r?m?1:2:0,w=Uo[r+5],y=r>3&&(e[g-1]=[]),b=e[g]||(e[g]=[]),f=r&&(!l&&!m&&(s=s.prototype),r<5&&(r>3||!l)&&Zc(r<4?s:{get[n](){return Zi(this,o)},set[n](d){return Bo(this,o,d)}},n));r?l&&r<4&&qo(o,(r>2?"set ":r>1?"get ":"")+n):qo(s,n);for(var $=i.length-1;$>=0;$--)u=el(r,n,_={},e[3],b),r&&(u.static=m,u.private=l,v=u.access={has:l?d=>il(s,d):d=>n in d},r^3&&(v.get=l?d=>(r^1?Zi:rl)(d,s,r^4?o:f.get):d=>d[n]),r>2&&(v.set=l?(d,T)=>Bo(d,s,T,r^4?o:f.set):(d,T)=>d[n]=T)),a=(0,i[$])(r?r<4?l?o:f[w]:r>4?void 0:{get:f.get,set:f.set}:s,u),_._=1,r^4||a===void 0?Ke(a)&&(r>4?y.unshift(a):r?l?o=a:f[w]=a:s=a):typeof a!="object"||a===null?ae("Object expected"):(Ke(c=a.get)&&(f.get=c),Ke(c=a.set)&&(f.set=c),Ke(c=a.init)&&y.unshift(c));return r||nl(e,s),f&&Yi(s,n,f),l?r^4?o:f:s},Nn=(e,t,n)=>Fo(e,typeof t!="symbol"?t+"":t,n),Xi=(e,t,n)=>t.has(e)||ae("Cannot "+n),il=(e,t)=>Object(t)!==t?ae('Cannot use the "in" operator on this value'):e.has(t),Zi=(e,t,n)=>(Xi(e,t,"read from private field"),n?n.call(e):t.get(e)),sl=(e,t,n)=>t.has(e)?ae("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Bo=(e,t,n,i)=>(Xi(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),rl=(e,t,n)=>(Xi(e,t,"access private method"),n),jo,Ko,Jo,Qo,ts,Yo,B,es;const ol=Re(ni`
201
+ :host(:where(:not([hidden]))) {
202
+ position: relative;
203
+ display: inline-flex;
204
+ align-items: center;
205
+ }
206
+ svg {
207
+ width: 100%;
208
+ height: 100%;
209
+ }
210
+ `),Xo=new Map;Yo=[kt(),Cn(ol)];class _t extends(ts=q,Qo=[D],Jo=[U],Ko=[U],jo=[xe],ts){constructor(){super(...arguments),Nn(this,"selector",pt(B,8,this)),pt(B,11,this),Nn(this,"root",pt(B,12,this)),pt(B,15,this),Nn(this,"element",pt(B,16,this)),pt(B,19,this),Nn(this,"active",pt(B,20,this)),pt(B,23,this),sl(this,es,()=>{const t=this.element||(this.selector?(this.root||document).querySelector(this.selector):null);if(typeof t=="string"){let n=Xo.get(t);return n||(n=document.createElement("template"),n.innerHTML=t,Xo.set(t,n)),n.content.cloneNode(!0)}else return t instanceof HTMLTemplateElement?t.content.cloneNode(!0):t==null?void 0:t.cloneNode(!0)})}render(){return st`
211
+ ${Zi(this,es).call(this)}
212
+ <slot></slot>
213
+ `}}B=tl(ts),es=new WeakMap,Je(B,5,"selector",Qo,_t),Je(B,5,"root",Jo,_t),Je(B,5,"element",Ko,_t),Je(B,5,"active",jo,_t),_t=Je(B,0,"GemUseElement",Yo,_t),pt(B,1,_t),customElements.define("gem-use",_t);var al=Object.create,ns=Object.defineProperty,cl=Object.getOwnPropertyDescriptor,Zo=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Qe=e=>{throw TypeError(e)},ta=(e,t,n)=>t in e?ns(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ea=(e,t)=>ns(e,"name",{value:t,configurable:!0}),ll=e=>[,,,al((e==null?void 0:e[Zo("metadata")])??null)],na=["class","method","getter","setter","accessor","field","value","get","set"],Ye=e=>e!==void 0&&typeof e!="function"?Qe("Function expected"):e,hl=(e,t,n,i,s)=>({kind:na[e],name:t,metadata:i,addInitializer:o=>n._?Qe("Already initialized"):s.push(Ye(o||null))}),ul=(e,t)=>ta(t,Zo("metadata"),e[3]),Xe=(e,t,n,i)=>{for(var s=0,o=e[t>>1],c=o&&o.length;s<c;s++)t&1?o[s].call(n):i=o[s].call(n,i);return i},is=(e,t,n,i,s,o)=>{var c,a,_,u,v,r=t&7,m=!!(t&8),l=!!(t&16),g=r>3?e.length+1:r?m?1:2:0,w=na[r+5],y=r>3&&(e[g-1]=[]),b=e[g]||(e[g]=[]),f=r&&(!l&&!m&&(s=s.prototype),r<5&&(r>3||!l)&&cl(r<4?s:{get[n](){return sa(this,o)},set[n](d){return ra(this,o,d)}},n));r?l&&r<4&&ea(o,(r>2?"set ":r>1?"get ":"")+n):ea(s,n);for(var $=i.length-1;$>=0;$--)u=hl(r,n,_={},e[3],b),r&&(u.static=m,u.private=l,v=u.access={has:l?d=>dl(s,d):d=>n in d},r^3&&(v.get=l?d=>(r^1?sa:fl)(d,s,r^4?o:f.get):d=>d[n]),r>2&&(v.set=l?(d,T)=>ra(d,s,T,r^4?o:f.set):(d,T)=>d[n]=T)),a=(0,i[$])(r?r<4?l?o:f[w]:r>4?void 0:{get:f.get,set:f.set}:s,u),_._=1,r^4||a===void 0?Ye(a)&&(r>4?y.unshift(a):r?l?o=a:f[w]=a:s=a):typeof a!="object"||a===null?Qe("Object expected"):(Ye(c=a.get)&&(f.get=c),Ye(c=a.set)&&(f.set=c),Ye(c=a.init)&&y.unshift(c));return r||ul(e,s),f&&ns(s,n,f),l?r^4?o:f:s},ia=(e,t,n)=>ta(e,typeof t!="symbol"?t+"":t,n),ss=(e,t,n)=>t.has(e)||Qe("Cannot "+n),dl=(e,t)=>Object(t)!==t?Qe('Cannot use the "in" operator on this value'):e.has(t),sa=(e,t,n)=>(ss(e,t,"read from private field"),n?n.call(e):t.get(e)),ra=(e,t,n,i)=>(ss(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),fl=(e,t,n)=>(ss(e,t,"access private method"),n),oa,aa,rs,ca,mt;ca=[kt()];class Vt extends(rs=q,aa=[D],oa=[D],rs){constructor(){super(...arguments),ia(this,"content",Xe(mt,8,this)),Xe(mt,11,this),ia(this,"contentcss",Xe(mt,12,this)),Xe(mt,15,this)}render(){this.shadowRoot.innerHTML=wn`
202
214
  <style>
203
215
  :host(:where(:not([hidden]))) {
204
- position: relative;
205
- display: inline-flex;
206
- align-items: center;
207
- }
208
- svg {
209
- width: 100%;
210
- height: 100%;
216
+ display: contents;
211
217
  }
218
+ ${this.contentcss}
212
219
  </style>
213
- ${g(this,Xe).call(this)}
214
- <slot></slot>
215
- `}}Xe=new WeakMap,kt([C],Pe.prototype,"selector",2),kt([T],Pe.prototype,"root",2),kt([T],Pe.prototype,"element",2),kt([wt],Pe.prototype,"active",2),customElements.define("gem-use",Pe);var Ii=Object.defineProperty,xi=Object.getOwnPropertyDescriptor,Ls=(n,e,t,s)=>{for(var i=s>1?void 0:s?xi(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&&Ii(e,t,i),i};class Lt extends R{constructor(){super(),this.effect(()=>{this.shadowRoot&&(this.shadowRoot.innerHTML=`
216
- <style>
217
- :host(:where(:not([hidden]))) {
218
- display: contents;
219
- }
220
- ${this.contentcss}
221
- </style>
222
- ${this.content}
223
- `)},()=>[this.content,this.contentcss])}render(){}}Ls([C],Lt.prototype,"content",2),Ls([C],Lt.prototype,"contentcss",2),customElements.define("gem-unsafe",Lt);var Vi=Object.defineProperty,Di=Object.getOwnPropertyDescriptor,Ts=(n,e,t,s)=>{for(var i=s>1?void 0:s?Di(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&&Vi(e,t,i),i};const qi="gem-reflect-start",$s="gem-reflect-end",Ms=n=>new Comment(n),Ui=n=>{const e=[];let t=n;for(;t&&(e.push(t),t.nodeValue!==$s);)t=t.nextSibling;return e};class Tt extends R{constructor(){super({isLight:!0});N(this,Nt);this.target=document.head,this.effect(()=>{this.hidden=!0,this.dataset.gemReflect=""},()=>[]);const t=Ms(qi),s=Ms($s);let i;this.effect(()=>((i||[t,...this.childNodes,s]).forEach((r,a,c)=>{const l=c[a-1];l?l.after(r):this.target[g(this,Nt,js)](r)}),()=>{i=Ui(t),i.forEach(r=>r.remove())}),()=>[this.target])}}Nt=new WeakSet,js=function(){return this.method||"append"},Ts([C],Tt.prototype,"method",2),Ts([T],Tt.prototype,"target",2),customElements.define("gem-reflect",Tt);const $t=Symbol("open mark");function ji(n){var e;const t=Symbol();return e=class extends R{constructor(){super(),this.label="",this.internals.role="alertdialog",this.internals.ariaModal="true"}static get isOpen(){return this.store[$t]}static get observedStores(){return[y.store,this.store]}static open(s){const i=new this;this.instance=i,this.inertStore=[...document.body.children].filter(a=>!a.inert),this.inertStore.forEach(a=>a.inert=!0),document.body.append(i);const r=()=>z(this.store,{[$t]:!0,...s});return setTimeout(()=>{r(),y.push({title:i.label,open:r,close:this.closeHandle.bind(this),shouldClose:this.shouldClose.bind(this)})},100),t}static close(){return y.back(),t}static closeHandle(){var s;return this.inertStore.forEach(i=>i.inert=!1),(s=this.instance)==null||s.remove(),z(this.store,{[$t]:!1,...n}),t}static shouldClose(){return!0}},e.inertStore=[],e.instance=null,e.store=ge({[$t]:!1,...n}),e}var Bi=Object.defineProperty,Fi=Object.getOwnPropertyDescriptor,vn=(n,e,t,s)=>{for(var i=s>1?void 0:s?Fi(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&&Bi(e,t,i),i},Ns=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)},Ce=(n,e,t)=>(Ns(n,e,"read from private field"),t?t.call(n):e.get(n)),En=(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)},Sn=(n,e,t,s)=>(Ns(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),je,Be,Fe;const Ke=Symbol();o.GemDialogBaseElement=class extends R{constructor(){super(),En(this,je,void 0),En(this,Be,void 0),En(this,Fe,[]),this.closeHandle=()=>{var e;return this.inert=!0,Ce(this,Fe).forEach(t=>t.inert=!1),Ce(this,je)?Ce(this,je).before(this):Ce(this,Be)&&((e=Ce(this,Be))==null||e.appendChild(this)),this.dispatchEvent(new CustomEvent("close")),this.opened=!1,Ke},this.openHandle=()=>(this.hidden=!1,this.inert=!1,Sn(this,je,this.nextSibling),Sn(this,Be,this.parentElement||this.getRootNode()),Sn(this,Fe,[...document.body.children].filter(e=>!e.inert)),Ce(this,Fe).forEach(e=>e.inert=!0),document.body.append(this),this.dispatchEvent(new CustomEvent("open")),this.opened=!0,Ke),this.open=()=>{if(!this.opened)return this.openHandle(),y.push({title:this.label,open:this.openHandle,close:this.closeHandle,shouldClose:this.shouldClose}),Ke},this.close=()=>(y.back(),Ke),this.forceClose=()=>(this.opened=!1,setTimeout(this.close,100),Ke),this.effect(()=>this.inert=!0,()=>[]),this.internals.role="dialog",this.internals.ariaModal="true"}shouldClose(){return!0}},je=new WeakMap,Be=new WeakMap,Fe=new WeakMap,vn([C],o.GemDialogBaseElement.prototype,"label",2),vn([wt],o.GemDialogBaseElement.prototype,"opened",2),o.GemDialogBaseElement=vn([_t(y.store)],o.GemDialogBaseElement);const Os=new WeakMap;function Rs(n){return Os.get(n)}const As=new WeakMap;function Ki(n){return As.get(n)}const Hs=new WeakMap;function Gs(n){const e=He(),t=document.createElement("style"),s=ge(n),i={},r={};As.set(i,r),Os.set(i,s);const a=()=>Object.keys(s).forEach(u=>{r[u]||(r[u]=`--${D(u)}-${e}`,i[u]=`var(${r[u]})`)});Hs.set(i,a),a();const c=()=>`:root, :host {${Object.keys(s).reduce((u,m)=>u+`${r[m]}:${s[m]};`,"")}}`,l=()=>t.textContent=c();return ne(s,l),l(),(document.head||document.documentElement).append(t),i}function Ws(n,e){z(Rs(n),e),Hs.get(n)()}function zi(n){const e=Gs(n);return[e,t=>Ws(e,t)]}class Ji{constructor(e){this.info=(...t)=>{console.log(`[${this._type}]:`,...t)},this.warn=(...t)=>{console.warn(`[${this._type}]:`,...t)},this.error=(...t)=>{console.error(`[${this._type}]:`,...t)},this._type=e}}const Qi=new Ji("GEM"),Xi=/\$\d(?:<[^>]*>)?/,Yi=/\$(\d)(<([^>]*)>)?/g,Zi=3;function Is(n,...e){const t=n.split(Xi),s=[];let i;for(;i=Yi.exec(n);){const r=i[Zi],a=Number(i[1])-1,c=e[a];s.push(typeof c=="function"?c(r):c)}return V(t,...s)}const ze=new Set,Pn=class Pn{constructor(e){N(this,Le);N(this,Ot);N(this,Rt);N(this,de);N(this,Te);if(this.cachePrefix="gem-i18n",this.replace=({path:i})=>this.setLanguage(i),this.getParams=()=>({path:this.currentLanguage}),!e.resources[e.fallbackLanguage])throw new K("i18n: fallbackLanguage invalid");this.store=ge(this),Object.assign(this,e);let t=g(this,Ot,Bs)||this.currentLanguage||g(this,Rt,Fs);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?(Y(this,Te,t,Ht),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?Is(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,Ze)&&ze.forEach(async i=>await i.setLanguage(e));let t;const s=this.resources[e];if(!s)return Qi.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 u=0;u<localStorage.length;u++){const m=localStorage.key(u);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,z(this.store),e!==this.currentLanguage&&Y(this,Te,e,Ht),this.cache===!0&&this.setCache(),e}resetLanguage(){return g(this,de,Ze)&&ze.forEach(e=>e.resetLanguage()),Y(this,Te,this.fallbackLanguage,Ht),this.cache&&localStorage.removeItem(g(this,Le,At)),this.setLanguage(this.detectLanguage())}setCache(){g(this,de,Ze)&&ze.forEach(e=>e.setCache()),localStorage.setItem(g(this,Le,At),this.currentLanguage)}createSubModule(e,t){const s=new Pn({resources:t,cachePrefix:`${this.cachePrefix}-${e}`,currentLanguage:this.currentLanguage,fallbackLanguage:this.fallbackLanguage,cache:this.cache});return ze.add(s),s}toJSON(){return{currentLanguage:this.currentLanguage,currentLanguagePack:this.resources[this.currentLanguage]}}};Le=new WeakSet,At=function(){return`${this.cachePrefix}:current`},Ot=new WeakSet,Bs=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:""}},Rt=new WeakSet,Fs=function(){return this.cache&&localStorage.getItem(g(this,Le,At))||""},de=new WeakSet,Ze=function(){return!ze.has(this)},Te=new WeakSet,Ht=function(e){var t;g(this,de,Ze)&&(document.documentElement.lang=e),this.currentLanguage=e,(t=this.onChange)==null||t.call(this,e)};let bn=Pn;const xs={headers:{"Content-Type":"application/json"}};async function Je(n,e={}){const t=await fetch(n,{...xs,...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 er=Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)).constructor;function Vs(n){return n instanceof FormData||n instanceof Blob||n instanceof er||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 tr(n,e){return Je(Ds(n,e),{method:"GET"})}function nr(n,e){return Je(Ds(n,e),{method:"DELETE"})}function sr(n,e){return Je(n,{method:"PUT",body:Vs(e)})}function ir(n,e){return Je(n,{method:"POST",body:Vs(e)})}const A=n=>window.matchMedia(n).matches,rr={PRINT:"print",get isPrint(){return A(this.PRINT)},HOVER:"(hover: hover)",get isHover(){return A(this.HOVER)},PWA:"(display-mode: standalone)",get isPWA(){return A(this.PWA)},MOTION_REDUCE:"(prefers-reduced-motion: reduce)",get isMotionReduce(){return A(this.MOTION_REDUCE)},DATA_REDUCE:"(prefers-reduced-data: reduce)",get isDataReduce(){return A(this.DATA_REDUCE)},WATCH:"(width < 320px)",get isWatch(){return A(this.WATCH)},SMALL_PHONE:"(320px <= width <= 480px) and (height <= 640px)",get isSmallPhone(){return A(this.SMALL_PHONE)},PHONE:"(320px <= width <= 480px)",get isPhone(){return A(this.PHONE)},PHONE_LANDSCAPE:"(480px < width < 960px) and (orientation: landscape)",get isPhoneLandscape(){return A(this.PHONE_LANDSCAPE)},SHORT:"(width >= 480px) and (height <= 320px)",get isShort(){return A(this.SHORT)},TABLET:"(480px < width <= 1280px)",get isTablet(){return A(this.TABLET)},DESKTOP:"(width > 1280px) and (orientation: landscape)",get isDesktop(){return A(this.DESKTOP)},WIDTHSCREEN:"(width >= 1920px) and (orientation: landscape)",get isWidthScreen(){return A(this.WIDTHSCREEN)}};o.GemElement=R,o.GemError=K,o.GemLightRouteElement=vs,o.GemReflectElement=Tt,o.GemRouteElement=fn,o.GemTitleElement=be,o.GemUnsafeElement=Lt,o.GemUseElement=Pe,o.I18n=bn,o.LinkedList=qn,o.PREFIX=Ps,o.PropProxyMap=Un,o.QueryString=pe,o.SUFFIX=Cs,o.SVGTemplateResult=It,o.SheetToken=Bt,o.StoreListenerMap=me,o.TemplateResult=Ne,o.absoluteLocation=Ut,o.addListener=jt,o.addMicrotask=H,o.addMicrotaskToStack=ii,o.adoptedStyle=_i,o.attribute=C,o.basePathStore=ps,o.boolattribute=on,o.camelToKebabCase=D,o.classMap=Kn,o.cleanObject=et,o.connect=ne,o.connectStore=_t,o.createCSSSheet=oi,o.createHistoryParams=ws,o.createModalClass=ji,o.createPath=Pt,o.createStore=ge,o.createTheme=Gs,o.css=ri,o.customElement=Ei,o.defaultReqInit=xs,o.defineAttribute=pt,o.defineCSSState=gt,o.defineProperty=we,o.defineRef=mt,o.del=nr,o.directive=Z,o.disconnect=di,o.emitter=xe,o.exportPartsMap=ui,o.get=tr,o.getThemeProps=Ki,o.getThemeStore=Rs,o.globalemitter=wi,o.guard=es,o.history=y,o.html=V,o.ifDefined=Qt,o.isArrayChange=Bn,o.kebabToCamelCase=te,o.matchPath=un,o.mediaQuery=rr,o.nativeDefineElement=yt,o.numattribute=gi,o.objectMapToString=tt,o.part=rs,o.partMap=hi,o.post=ir,o.property=T,o.put=sr,o.randomStr=He,o.raw=Ae,o.refobject=mi,o.removeItems=Fn,o.render=qt,o.repeat=Zn,o.request=Je,o.rootElement=vi,o.slot=yi,o.splice=Is,o.state=wt,o.styleMap=li,o.styled=ci,o.svg=Dn,o.titleStore=ve,o.updateStore=z,o.updateTheme=Ws,o.useStore=nt,o.useTheme=zi,o.version=zn,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})});
220
+ ${this.content}
221
+ `}}mt=ll(rs),is(mt,5,"content",aa,Vt),is(mt,5,"contentcss",oa,Vt),Vt=is(mt,0,"GemUnsafeElement",ca,Vt),Xe(mt,1,Vt),customElements.define("gem-unsafe",Vt);var pl=Object.create,os=Object.defineProperty,_l=Object.getOwnPropertyDescriptor,la=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),ce=e=>{throw TypeError(e)},ha=(e,t,n)=>t in e?os(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ua=(e,t)=>os(e,"name",{value:t,configurable:!0}),ml=e=>[,,,pl((e==null?void 0:e[la("metadata")])??null)],da=["class","method","getter","setter","accessor","field","value","get","set"],Ze=e=>e!==void 0&&typeof e!="function"?ce("Function expected"):e,gl=(e,t,n,i,s)=>({kind:da[e],name:t,metadata:i,addInitializer:o=>n._?ce("Already initialized"):s.push(Ze(o||null))}),fa=(e,t)=>ha(t,la("metadata"),e[3]),Lt=(e,t,n,i)=>{for(var s=0,o=e[t>>1],c=o&&o.length;s<c;s++)t&1?o[s].call(n):i=o[s].call(n,i);return i},An=(e,t,n,i,s,o)=>{var c,a,_,u,v,r=t&7,m=!!(t&8),l=!!(t&16),g=r>3?e.length+1:r?m?1:2:0,w=da[r+5],y=r>3&&(e[g-1]=[]),b=e[g]||(e[g]=[]),f=r&&(!l&&!m&&(s=s.prototype),r<5&&(r>3||!l)&&_l(r<4?s:{get[n](){return Nt(this,o)},set[n](d){return cs(this,o,d)}},n));r?l&&r<4&&ua(o,(r>2?"set ":r>1?"get ":"")+n):ua(s,n);for(var $=i.length-1;$>=0;$--)u=gl(r,n,_={},e[3],b),r&&(u.static=m,u.private=l,v=u.access={has:l?d=>vl(s,d):d=>n in d},r^3&&(v.get=l?d=>(r^1?Nt:wl)(d,s,r^4?o:f.get):d=>d[n]),r>2&&(v.set=l?(d,T)=>cs(d,s,T,r^4?o:f.set):(d,T)=>d[n]=T)),a=(0,i[$])(r?r<4?l?o:f[w]:r>4?void 0:{get:f.get,set:f.set}:s,u),_._=1,r^4||a===void 0?Ze(a)&&(r>4?y.unshift(a):r?l?o=a:f[w]=a:s=a):typeof a!="object"||a===null?ce("Object expected"):(Ze(c=a.get)&&(f.get=c),Ze(c=a.set)&&(f.set=c),Ze(c=a.init)&&y.unshift(c));return r||fa(e,s),f&&os(s,n,f),l?r^4?o:f:s},pa=(e,t,n)=>ha(e,typeof t!="symbol"?t+"":t,n),as=(e,t,n)=>t.has(e)||ce("Cannot "+n),vl=(e,t)=>Object(t)!==t?ce('Cannot use the "in" operator on this value'):e.has(t),Nt=(e,t,n)=>(as(e,t,"read from private field"),n?n.call(e):t.get(e)),le=(e,t,n)=>t.has(e)?ce("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),cs=(e,t,n,i)=>(as(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),wl=(e,t,n)=>(as(e,t,"access private method"),n),_a,ma,ga,va,ls,J,hs,wa,us,Rn,ds,tn,fs;const Sl="gem-reflect-start",Sa="gem-reflect-end",ya=e=>new Comment(e),yl=e=>{const t=[];let n=e;for(;n&&(t.push(n),n.nodeValue!==Sa);)n=n.nextSibling;return t};class en extends(ls=q,va=[D],ga=[U],ma=[We()],_a=[ft(t=>[t.target])],ls){constructor(){super(...arguments),le(this,hs),pa(this,"method",Lt(J,8,this)),Lt(J,11,this),pa(this,"target",Lt(J,12,this,document.head)),Lt(J,15,this),le(this,us,Lt(J,16,this,()=>{this.hidden=!0,this.dataset.gemReflect=""})),Lt(J,19,this),le(this,Rn,ya(Sl)),le(this,ds,ya(Sa)),le(this,tn),le(this,fs,Lt(J,20,this,()=>((Nt(this,tn)||[Nt(this,Rn),...this.childNodes,Nt(this,ds)]).forEach((t,n,i)=>{const s=i[n-1];s?s.after(t):this.target[Nt(this,hs,wa)](t)}),()=>{cs(this,tn,yl(Nt(this,Rn))),Nt(this,tn).forEach(t=>t.remove())}))),Lt(J,23,this)}}J=ml(ls),hs=new WeakSet,wa=function(){return this.method||"append"},us=new WeakMap,Rn=new WeakMap,ds=new WeakMap,tn=new WeakMap,fs=new WeakMap,An(J,5,"method",va,en),An(J,5,"target",ga,en),An(J,21,"#init",ma,us),An(J,21,"#changeTarget",_a,fs),fa(J,en),customElements.define("gem-reflect",en);var $l=Object.create,ps=Object.defineProperty,El=Object.getOwnPropertyDescriptor,$a=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),he=e=>{throw TypeError(e)},Ea=(e,t,n)=>t in e?ps(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ba=(e,t)=>ps(e,"name",{value:t,configurable:!0}),bl=e=>[,,,$l((e==null?void 0:e[$a("metadata")])??null)],Ca=["class","method","getter","setter","accessor","field","value","get","set"],nn=e=>e!==void 0&&typeof e!="function"?he("Function expected"):e,Cl=(e,t,n,i,s)=>({kind:Ca[e],name:t,metadata:i,addInitializer:o=>n._?he("Already initialized"):s.push(nn(o||null))}),Pl=(e,t)=>Ea(t,$a("metadata"),e[3]),sn=(e,t,n,i)=>{for(var s=0,o=e[t>>1],c=o&&o.length;s<c;s++)t&1?o[s].call(n):i=o[s].call(n,i);return i},_s=(e,t,n,i,s,o)=>{var c,a,_,u,v,r=t&7,m=!!(t&8),l=!!(t&16),g=r>3?e.length+1:r?m?1:2:0,w=Ca[r+5],y=r>3&&(e[g-1]=[]),b=e[g]||(e[g]=[]),f=r&&(!l&&!m&&(s=s.prototype),r<5&&(r>3||!l)&&El(r<4?s:{get[n](){return Pa(this,o)},set[n](d){return Ta(this,o,d)}},n));r?l&&r<4&&ba(o,(r>2?"set ":r>1?"get ":"")+n):ba(s,n);for(var $=i.length-1;$>=0;$--)u=Cl(r,n,_={},e[3],b),r&&(u.static=m,u.private=l,v=u.access={has:l?d=>kl(s,d):d=>n in d},r^3&&(v.get=l?d=>(r^1?Pa:Tl)(d,s,r^4?o:f.get):d=>d[n]),r>2&&(v.set=l?(d,T)=>Ta(d,s,T,r^4?o:f.set):(d,T)=>d[n]=T)),a=(0,i[$])(r?r<4?l?o:f[w]:r>4?void 0:{get:f.get,set:f.set}:s,u),_._=1,r^4||a===void 0?nn(a)&&(r>4?y.unshift(a):r?l?o=a:f[w]=a:s=a):typeof a!="object"||a===null?he("Object expected"):(nn(c=a.get)&&(f.get=c),nn(c=a.set)&&(f.set=c),nn(c=a.init)&&y.unshift(c));return r||Pl(e,s),f&&ps(s,n,f),l?r^4?o:f:s},In=(e,t,n)=>Ea(e,typeof t!="symbol"?t+"":t,n),ms=(e,t,n)=>t.has(e)||he("Cannot "+n),kl=(e,t)=>Object(t)!==t?he('Cannot use the "in" operator on this value'):e.has(t),Pa=(e,t,n)=>(ms(e,t,"read from private field"),n?n.call(e):t.get(e)),ka=(e,t,n)=>t.has(e)?he("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Ta=(e,t,n,i)=>(ms(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Tl=(e,t,n)=>(ms(e,t,"access private method"),n);const Hn=Symbol("open mark");function Ml(e){var t,n,i,s,o,c,a;const _=Symbol();s=[kt(),Ge({role:"alertdialog",ariaModal:"true"})];let u=class Ba extends(i=q,n=[Qt()],t=[Qt()],i){constructor(){super(...arguments),In(this,"label",""),ka(this,c,sn(o,8,this,()=>ht(L.store,this.update))),sn(o,11,this),ka(this,a,sn(o,12,this,()=>ht(Ba.store,this.update))),sn(o,15,this)}static get isOpen(){return this.store[Hn]}static open(m){const l=new this;this.instance=l,this.inertStore=[...document.body.children].filter(w=>!w.inert),this.inertStore.forEach(w=>w.inert=!0),document.body.append(l);const g=()=>Et(this.store,{[Hn]:!0,...m});return setTimeout(()=>{g(),L.push({title:l.label,open:g,close:this.closeHandle.bind(this),shouldClose:this.shouldClose.bind(this)})},100),_}static close(){return L.back(),_}static closeHandle(){var m;return this.inertStore.forEach(l=>l.inert=!1),(m=this.instance)==null||m.remove(),Et(this.store,{[Hn]:!1,...e}),_}static shouldClose(){return!0}};return o=bl(i),c=new WeakMap,a=new WeakMap,_s(o,21,"#connectHistory",n,c),_s(o,21,"#connectStore",t,a),u=_s(o,0,"ModalElement",s,u),In(u,"inertStore",[]),In(u,"instance",null),In(u,"store",Le({[Hn]:!1,...e})),sn(o,1,u),u}var Ol=Object.create,gs=Object.defineProperty,Ll=Object.getOwnPropertyDescriptor,Ma=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),ue=e=>{throw TypeError(e)},Oa=(e,t,n)=>t in e?gs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,La=(e,t)=>gs(e,"name",{value:t,configurable:!0}),Nl=e=>[,,,Ol((e==null?void 0:e[Ma("metadata")])??null)],Na=["class","method","getter","setter","accessor","field","value","get","set"],rn=e=>e!==void 0&&typeof e!="function"?ue("Function expected"):e,Al=(e,t,n,i,s)=>({kind:Na[e],name:t,metadata:i,addInitializer:o=>n._?ue("Already initialized"):s.push(rn(o||null))}),Rl=(e,t)=>Oa(t,Ma("metadata"),e[3]),Dt=(e,t,n,i)=>{for(var s=0,o=e[t>>1],c=o&&o.length;s<c;s++)t&1?o[s].call(n):i=o[s].call(n,i);return i},Wn=(e,t,n,i,s,o)=>{var c,a,_,u,v,r=t&7,m=!!(t&8),l=!!(t&16),g=r>3?e.length+1:r?m?1:2:0,w=Na[r+5],y=r>3&&(e[g-1]=[]),b=e[g]||(e[g]=[]),f=r&&(!l&&!m&&(s=s.prototype),r<5&&(r>3||!l)&&Ll(r<4?s:{get[n](){return at(this,o)},set[n](d){return an(this,o,d)}},n));r?l&&r<4&&La(o,(r>2?"set ":r>1?"get ":"")+n):La(s,n);for(var $=i.length-1;$>=0;$--)u=Al(r,n,_={},e[3],b),r&&(u.static=m,u.private=l,v=u.access={has:l?d=>Il(s,d):d=>n in d},r^3&&(v.get=l?d=>(r^1?at:Hl)(d,s,r^4?o:f.get):d=>d[n]),r>2&&(v.set=l?(d,T)=>an(d,s,T,r^4?o:f.set):(d,T)=>d[n]=T)),a=(0,i[$])(r?r<4?l?o:f[w]:r>4?void 0:{get:f.get,set:f.set}:s,u),_._=1,r^4||a===void 0?rn(a)&&(r>4?y.unshift(a):r?l?o=a:f[w]=a:s=a):typeof a!="object"||a===null?ue("Object expected"):(rn(c=a.get)&&(f.get=c),rn(c=a.set)&&(f.set=c),rn(c=a.init)&&y.unshift(c));return r||Rl(e,s),f&&gs(s,n,f),l?r^4?o:f:s},on=(e,t,n)=>Oa(e,typeof t!="symbol"?t+"":t,n),vs=(e,t,n)=>t.has(e)||ue("Cannot "+n),Il=(e,t)=>Object(t)!==t?ue('Cannot use the "in" operator on this value'):e.has(t),at=(e,t,n)=>(vs(e,t,"read from private field"),n?n.call(e):t.get(e)),de=(e,t,n)=>t.has(e)?ue("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),an=(e,t,n,i)=>(vs(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Hl=(e,t,n)=>(vs(e,t,"access private method"),n),Aa,Ra,Ia,ws,Ha,et,cn,ln,hn,Ss,xn,ys;const $s=Symbol();Ha=[ze(L.store),Ge({role:"dialog",ariaModal:"true"})];class fe extends(ws=q,Ia=[D],Ra=[xe],Aa=[We()],ws){constructor(){super(...arguments),on(this,"label",Dt(et,8,this)),Dt(et,11,this),on(this,"opened",Dt(et,12,this)),Dt(et,15,this),de(this,cn),de(this,ln),de(this,hn,[]),de(this,Ss,()=>{var t;this.inert=!0,at(this,hn).forEach(n=>n.inert=!1),at(this,cn)?at(this,cn).before(this):at(this,ln)&&((t=at(this,ln))==null||t.appendChild(this)),this.dispatchEvent(new CustomEvent("close")),this.opened=!1}),de(this,xn,()=>{this.hidden=!1,this.inert=!1,an(this,cn,this.nextSibling),an(this,ln,this.parentElement||this.getRootNode()),an(this,hn,[...document.body.children].filter(t=>!t.inert)),at(this,hn).forEach(t=>t.inert=!0),document.body.append(this),this.dispatchEvent(new CustomEvent("open")),this.opened=!0}),de(this,ys,Dt(et,16,this,()=>this.inert=!0)),Dt(et,19,this),on(this,"open",()=>{if(!this.opened)return at(this,xn).call(this),L.push({title:this.label,open:at(this,xn),close:at(this,Ss),shouldClose:this.shouldClose}),$s}),on(this,"close",()=>(L.back(),$s)),on(this,"forceClose",()=>(this.opened=!1,setTimeout(this.close,100),$s))}shouldClose(){return!0}}et=Nl(ws),cn=new WeakMap,ln=new WeakMap,hn=new WeakMap,Ss=new WeakMap,xn=new WeakMap,ys=new WeakMap,Wn(et,5,"label",Ia,fe),Wn(et,5,"opened",Ra,fe),Wn(et,21,"#init",Aa,ys),fe=Wn(et,0,"GemDialogBaseElement",Ha,fe),Dt(et,1,fe);class Wa{constructor(t){N(this,"_type");N(this,"info",(...t)=>{console.log(`[${this._type}]:`,...t)});N(this,"warn",(...t)=>{console.warn(`[${this._type}]:`,...t)});N(this,"error",(...t)=>{console.error(`[${this._type}]:`,...t)});this._type=t}}const xa=new Wa("GEM"),Wl=/\$\d(?:<[^>]*>)?/,xl=/\$(\d)(<([^>]*)>)?/g,zl=3;function za(e,...t){const n=e.split(Wl),i=[];let s;for(;s=xl.exec(e);){const o=s[zl],c=Number(s[1])-1,a=t[c];i.push(typeof a=="function"?a(o):a)}return st(n,...i)}const un=new Set,Cs=class Cs{constructor(t){C(this,R);N(this,"resources");N(this,"fallbackLanguage");N(this,"currentLanguage");N(this,"cache");N(this,"cachePrefix","gem-i18n");N(this,"urlParamsType");N(this,"urlParamsName");N(this,"onChange");N(this,"replace",({path:t})=>this.setLanguage(t));N(this,"getParams",()=>({path:this.currentLanguage}));if(!t.resources[t.fallbackLanguage])throw new dt("i18n: fallbackLanguage invalid");Object.assign(this,t);let n=p(this,R,ja)||this.currentLanguage||p(this,R,Ka);const i=document.querySelector(`[type*=${this.cachePrefix}]`);if(i)try{const s=JSON.parse(i.textContent||"");n=s.currentLanguage,this.resources[s.currentLanguage]=s.currentLanguagePack}catch{}n?(O(this,R,n,jn),this.setLanguage(n)):this.resetLanguage()}get(t,...n){const i=this.resources[this.currentLanguage],s=this.resources[this.fallbackLanguage],o=i[t]||s[t],c=(o==null?void 0:o.message)||o||`[${t}]`;return n.length?za(c,...n):c}detectLanguage(){const t=Object.keys(this.resources),n=navigator.languages.map(i=>i.replace(/-(.*)/,s=>s.toUpperCase()));for(const i of n){const s=t.find(o=>o===i||i.startsWith(`${o}-`));if(s)return s}return this.fallbackLanguage}async setLanguage(t){var o,c;p(this,R,gn)&&un.forEach(async a=>await a.setLanguage(t));let n;const i=this.resources[t];if(!i)return xa.warn(`${this.cachePrefix}: not found \`${t}\``),this.resetLanguage();if(typeof i=="string"){const a=`${this.cachePrefix}:`,_=`${a}${i}`,u=localStorage.getItem(_),v=async()=>{const r=await(await fetch(i)).json();if(this.cache){for(let m=0;m<localStorage.length;m++){const l=localStorage.key(m);l.startsWith(a)&&localStorage.removeItem(l)}localStorage.setItem(_,JSON.stringify(r))}return r};if(u)try{n=JSON.parse(u)}catch{n=await v()}else n=await v()}else n=i;this.resources[t]=n;const s=[document.documentElement];for(;s.length;){const a=s.pop();(o=a[Ne])==null||o.call(a),(c=a.shadowRoot)!=null&&c.firstElementChild&&s.push(a.shadowRoot.firstElementChild),a.firstElementChild&&s.push(a.firstElementChild),a.nextElementSibling&&s.push(a.nextElementSibling)}return t!==this.currentLanguage&&O(this,R,t,jn),this.cache===!0&&this.setCache(),t}resetLanguage(){return p(this,R,gn)&&un.forEach(t=>t.resetLanguage()),O(this,R,this.fallbackLanguage,jn),this.cache&&localStorage.removeItem(p(this,R,Bn)),this.setLanguage(this.detectLanguage())}setCache(){p(this,R,gn)&&un.forEach(t=>t.setCache()),localStorage.setItem(p(this,R,Bn),this.currentLanguage)}createSubModule(t,n){const i=new Cs({resources:n,cachePrefix:`${this.cachePrefix}-${t}`,currentLanguage:this.currentLanguage,fallbackLanguage:this.fallbackLanguage,cache:this.cache});return un.add(i),i}toJSON(){return{currentLanguage:this.currentLanguage,currentLanguagePack:this.resources[this.currentLanguage]}}};R=new WeakSet,Bn=function(){return`${this.cachePrefix}:current`},ja=function(){const{hostname:t,pathname:n,search:i}=location,s=t.split(".");switch(this.urlParamsType){case"ccTLD":return s.pop();case"gTLD":return s.shift();case"path":return n.split("/")[1];default:const o=this.urlParamsName&&new URLSearchParams(i).get(this.urlParamsName)||"";return o in this.resources?o:""}},Ka=function(){return this.cache&&localStorage.getItem(p(this,R,Bn))||""},gn=function(){return!un.has(this)},jn=function(t){var n;p(this,R,gn)&&(document.documentElement.lang=t),this.currentLanguage=t,(n=this.onChange)==null||n.call(this,t)};let Es=Cs;const Q=e=>window.matchMedia(e).matches,Gl={PRINT:"print",get isPrint(){return Q(this.PRINT)},HOVER:"(hover: hover)",get isHover(){return Q(this.HOVER)},PWA:"(display-mode: standalone)",get isPWA(){return Q(this.PWA)},MOTION_REDUCE:"(prefers-reduced-motion: reduce)",get isMotionReduce(){return Q(this.MOTION_REDUCE)},DATA_REDUCE:"(prefers-reduced-data: reduce)",get isDataReduce(){return Q(this.DATA_REDUCE)},WATCH:"(width < 320px)",get isWatch(){return Q(this.WATCH)},SMALL_PHONE:"(320px <= width <= 480px) and (height <= 640px)",get isSmallPhone(){return Q(this.SMALL_PHONE)},PHONE:"(320px <= width <= 480px)",get isPhone(){return Q(this.PHONE)},PHONE_LANDSCAPE:"(480px < width < 960px) and (orientation: landscape)",get isPhoneLandscape(){return Q(this.PHONE_LANDSCAPE)},SHORT:"(width >= 480px) and (height <= 320px)",get isShort(){return Q(this.SHORT)},TABLET:"(480px < width <= 1280px)",get isTablet(){return Q(this.TABLET)},DESKTOP:"(width > 1280px) and (orientation: landscape)",get isDesktop(){return Q(this.DESKTOP)},WIDTHSCREEN:"(width >= 1920px) and (orientation: landscape)",get isWidthScreen(){return Q(this.WIDTHSCREEN)}},Vl=Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)).constructor;function Ga(e={}){const{origin:t=location.origin,base:n="",appendHeaders:i=()=>({}),transformInput:s=r=>r,transformOutput:o=r=>r,...c}=e,a=r=>r instanceof FormData||r instanceof Blob||r instanceof Vl||r instanceof URLSearchParams||r instanceof ReadableStream||r instanceof ArrayBuffer?r:typeof r=="object"?JSON.stringify(r):r,_=(r,m)=>{if(new URL(r,location.origin).pathname!==r)throw new dt("`path` format is incorrect");const l=new URLSearchParams(m).toString();return`${t}${n}${r}${l?"?":""}${l}`},u=r=>{if(!r)return{};if(r instanceof Headers)return Object.fromEntries(r);const m=Array.isArray(r)?r:Object.entries(r);return Object.fromEntries(m.map(([l,g])=>[l.toLowerCase(),g]))},v=async(r,m={})=>{const l=new Request(r,{...c,...m,headers:new Headers({"content-type":"application/json",...u(c.headers),...u(m.headers)})}),g=await fetch(l);if(g.status===0)throw new Error("Request fail");if(g.status>=500)throw new Error(g.statusText);const w=l.headers.get("content-type"),y=g.status>=400;try{let b;if(w.includes("json")?b=await g.json():w.includes("octet-stream")?b=await g.arrayBuffer():b=await g.text(),y)throw new Error(g.statusText,{cause:b});return o(b,l)}catch{throw new Error("Parse error")}};return{request:v,get(r,m){const l=s(m);return v(_(r,l),{method:"GET",headers:i(l)})},del(r,m){const l=s(m);return v(_(r,l),{method:"DELETE",headers:i(l)})},put(r,m){const l=s(m);return v(_(r),{method:"PUT",headers:i(l),body:a(l)})},post(r,m){const l=s(m);return v(_(r),{method:"POST",headers:i(l),body:a(l)})}}}const{request:Dl,del:Fl,get:ql,post:Ul,put:Bl}=Ga(),Va=new WeakMap,Da=new WeakMap;function jl(e){return Va.get(e)}function bs(e){return Da.get(e)}function zn(e,t={}){const n=Oe(),i=Re({})[bt],[s,o]=Kt(e),c=new Proxy({[bt]:i},{get(_,u){if(!_[u]){const[v,r,m]=u.match(/^(\w*Color)(\d+)$/)||[];r&&(_[u]=`oklch(from ${_[r]} calc(l - ${(Number(m)-400)/1e3}) c h)`)}return _[u]}});Da.set(c,t),Va.set(c,s);const a=()=>{let _="";Object.keys(s).forEach(u=>{t[u]||(t[u]=`--${Ht(u)}-${n}`,c[u]=`var(${t[u]})`),_+=`${t[u]}:${s[u]};`}),i.setContent(`:scope,:host{${_}}`)};return a(),ht(s,()=>{a(),i.updateStyle()}),[c,o]}function Fa(e){return zn(e)}function Kl(e){const t=Fa(e);return document.adoptedStyleSheets.push(t[0][bt].getStyle()),t}function Jl(e,t){return zn(t,bs(e))}function Ql(e){const[t]=zn(e),n=bs(t);return[t,s=>(o,{addInitializer:c,access:a})=>{c(function(){const[_,u]=zn({...e},n);this.internals.sheets.push(_[bt].getStyle(this)),this.memo(()=>u(a.get(this).apply(this)),s&&(()=>s(this)))})}]}h.BoundaryCSSState=Ae,h.GemActiveLinkElement=Gt,h.GemDialogBaseElement=fe,h.GemElement=q,h.GemError=dt,h.GemLightRouteElement=V,h.GemLinkElement=H,h.GemReflectElement=en,h.GemRouteElement=ee,h.GemTitleElement=oe,h.GemUnsafeElement=Vt,h.GemUseElement=_t,h.I18n=Es,h.LinkedList=qs,h.Logger=Wa,h.PropProxyMap=Us,h.QueryString=jt,h.RenderErrorEvent=$n,h.SVGTemplateResult=Qn,h.SheetToken=bt,h.StoreListenerMap=Wt,h.TemplateResult=Te,h.UpdateToken=Ne,h.absoluteLocation=ti,h.addListener=ei,h.addMicrotask=$t,h.adoptedStyle=Cn,h.aria=Ge,h.async=pr,h.attribute=D,h.basePathStore=Er,h.boolattribute=He,h.camelToKebabCase=Ht,h.classMap=js,h.cleanObject=Sn,h.connect=ht,h.connectStore=ze,h.createCSSSheet=Re,h.createHistoryParams=to,h.createModalClass=Ml,h.createPath=Ln,h.createStore=Le,h.css=ni,h.customElement=_r,h.del=Fl,h.directive=St,h.disconnect=Ks,h.effect=ft,h.emitter=Yt,h.exportPartsMap=lc,h.fallback=lr,h.get=ql,h.getThemeProps=bs,h.getThemeStore=jl,h.globalemitter=dr,h.guard=Oc,h.history=L,h.html=st,h.ifDefined=Tr,h.initRequest=Ga,h.isArrayChange=Bs,h.kebabToCamelCase=oc,h.logger=xa,h.matchPath=Li,h.mediaQuery=Gl,h.memo=hi,h.mounted=Qt,h.numattribute=ar,h.objectMapToString=yn,h.part=di,h.partMap=cc,h.post=Ul,h.property=U,h.put=Bl,h.randomStr=Oe,h.raw=wn,h.render=vn,h.repeat=Mc,h.request=Dl,h.shadow=kt,h.slot=ur,h.splice=za,h.state=xe,h.styleMap=ac,h.styled=rc,h.svg=Fs,h.template=ui,h.titleStore=Tt,h.unmounted=cr,h.updateStore=Et,h.useDecoratorTheme=Ql,h.useOverrideTheme=Jl,h.useScopedTheme=Fa,h.useStore=Kt,h.useTheme=Kl,h.version=tr,h.willMount=We,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})});