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