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