@mantou/gem 2.2.3 → 2.2.5
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/README.md +1 -0
- package/dist/gem.js +36 -0
- package/dist/gem.mjs +36 -0
- package/elements/base/gesture.d.ts.map +1 -1
- package/elements/base/gesture.js +14 -0
- package/elements/base/gesture.js.map +1 -1
- package/helper/hmr.d.ts.map +1 -1
- package/helper/hmr.js +2 -1
- package/helper/hmr.js.map +1 -1
- package/helper/request.d.ts.map +1 -1
- package/helper/request.js +2 -0
- package/helper/request.js.map +1 -1
- package/lib/utils.d.ts +1 -1
- package/lib/utils.d.ts.map +1 -1
- package/lib/utils.js +8 -7
- package/lib/utils.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +5 -4
- package/src/elements/base/gesture.ts +13 -0
- package/src/helper/hmr.ts +2 -1
- package/src/helper/request.ts +1 -0
- package/src/lib/utils.ts +6 -6
- package/src/lib/version.ts +1 -1
- package/src/test/utils.test.ts +24 -0
- package/dist/gem.es.js +0 -2731
- package/dist/gem.umd.js +0 -44
package/dist/gem.umd.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
(function(l,L){typeof exports=="object"&&typeof module<"u"?L(exports):typeof define=="function"&&define.amd?define(["exports"],L):(l=typeof globalThis<"u"?globalThis:l||self,L(l.Gem={}))})(this,function(l){"use strict";var Fl=Object.defineProperty;var _c=l=>{throw TypeError(l)};var xl=(l,L,I)=>L in l?Fl(l,L,{enumerable:!0,configurable:!0,writable:!0,value:I}):l[L]=I;var $=(l,L,I)=>xl(l,typeof L!="symbol"?L+"":L,I),Us=(l,L,I)=>L.has(l)||_c("Cannot "+I);var _=(l,L,I)=>(Us(l,L,"read from private field"),I?I.call(l):L.get(l)),C=(l,L,I)=>L.has(l)?_c("Cannot add the same private member more than once"):L instanceof WeakSet?L.add(l):L.set(l,I),O=(l,L,I,vn)=>(Us(l,L,"write to private field"),vn?vn.call(l,I):L.set(l,I),I),qs=(l,L,I)=>(Us(l,L,"access private method"),I);var $t,ut,St,ln,Fs,$e,Qn,yt,Ft,dn,Se,ye,xt,X,_t,Bt,wt,we,at,Ee,Ce,Kt,ct,Pe,xs,Jn,Yn,un,be,jt,_n,Zn,Xn,fn,Te,pn,ke,ti,z,ei,gc,vc,gn,ni,mn;const{assign:L,fromEntries:I,entries:vn,keys:$c}=Object;function Sc(n){Promise.resolve().then(n)}const ii=new Set;function ft(n,t=Sc){ii.has(n)||(t(()=>{ii.delete(n),n()}),ii.add(n))}function Me(n,t){const e=t;return delete e.name,delete e.length,L(e,n),e}function si(n="",t=""){const{pathname:e,search:i,hash:s}=new URL(t,location.origin+n);return e+i+decodeURIComponent(s)}function ri(n,t,e,i){return n.addEventListener(t,e,i),()=>n.removeEventListener(t,e,i)}class Bs extends EventTarget{constructor(){super(...arguments);C(this,ln);C(this,$t,new Map);C(this,ut);C(this,St)}get size(){return _(this,$t).size}get first(){return _(this,ut)}get last(){return _(this,St)}isSuperLinkOf(e){let i=e.first;if(!i)return!0;let s=this.find(i.value);for(;s&&s.value===i.value;){if(i=i.next,!i)return!0;s=s.next}return!1}find(e){return _(this,$t).get(e)}add(e){_(this,St)||this.dispatchEvent(new CustomEvent("start"));const i=qs(this,ln,Fs).call(this,e)||{value:e};i.prev=_(this,St),i.prev&&(i.prev.next=i),i.next=void 0,O(this,St,i),_(this,ut)||O(this,ut,i),_(this,$t).set(e,i)}delete(e){const i=qs(this,ln,Fs).call(this,e);return _(this,ut)||this.dispatchEvent(new CustomEvent("end")),i}clear(){_(this,$t).clear(),O(this,ut,O(this,St,void 0))}get(){const e=_(this,ut);if(e)return this.delete(e.value),e.value}}$t=new WeakMap,ut=new WeakMap,St=new WeakMap,ln=new WeakSet,Fs=function(e){const i=_(this,$t).get(e);return i&&(i.prev?i.prev.next=i.next:O(this,ut,i.next),i.next?i.next.prev=i.prev:O(this,St,i.prev),_(this,$t).delete(e)),i};class Ks extends WeakMap{get(t){let e=super.get(t);return e||(e={},this.set(t,e)),e}}class Qt extends URLSearchParams{constructor(){super(...arguments);C(this,$e,e=>typeof e=="string"?e:JSON.stringify(e));C(this,Qn,e=>{if(!e)return null;try{return JSON.parse(e)}catch{return null}})}concat(e){let i;typeof e=="string"?i=I(new URLSearchParams(e).entries()):i=e,vn(i).forEach(([s,r])=>{this.append(s,_(this,$e).call(this,r))})}setAny(e,i){if(Array.isArray(i))this.delete(e),i.forEach(s=>this.append(e,_(this,$e).call(this,s)));else{const s=_(this,$e).call(this,i);s?this.set(e,s):this.delete(e)}}getAny(e){return this.getAnyAll(e)[0]}getAnyAll(e){return this.getAll(e).filter(i=>i!=="").map(i=>_(this,Qn).call(this,i))}toString(){const e=super.toString();return e?`?${e}`:""}toJSON(){return this.toString()}}$e=new WeakMap,Qn=new WeakMap;function $n(n,...t){return n.reduce((e,i,s)=>e+(t[s-1]??"")+i)}const yc=$n;function Sn(n=5){const t=Math.random().toString(36).slice(2,2+n);return t.length<n?t+Sn(n-t.length):t}function At(n){return n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function wc(n){return n.replace(/-(.)/g,(t,e)=>e.toUpperCase())}function yn(n){return $c(n).forEach(t=>{delete n[t]}),n}class pt extends Error{constructor(t){super(t),this.message=`gem: ${this.message}`}}function js(n,t){const e=n.length;if(t.length!==e)return!0;for(let i=0;i<e;i++)if(n[i]!==t[i])return!0;return!1}function wn(n,t,e){let i=t;for(const s in n){const r=e(s,n[s]);i+=r?r+t:""}return i}function Ec(n){return wn(n,";",(t,e)=>e||e===0?`${At(t)}:${e}`:"")}function Qs(n){return wn(n," ",(t,e)=>e?t:"")}const Cc=Qs;function bc(n){return wn(n,",",(t,e)=>e===!0||t===e?t:e?`${t}:${e}`:"")}const Oe=new WeakMap;function Et(n){const t=Me(n,e=>{var i;Object.assign(t,e),(i=Oe.get(t))==null||i.forEach(s=>ft(s))});return Oe.set(t,new Set),t}function ht(n,t){const e=Oe.get(n);return e==null||e.add(t),()=>e==null?void 0:e.delete(t)}const Tc=Object.freeze(Object.defineProperty({__proto__:null,_StoreListenerMap:Oe,connect:ht,createStore:Et},Symbol.toStringTag,{value:"Module"}));l.html=(n,...t)=>$n(n,...t.map(e=>e instanceof Element?e.outerHTML:e)),l.render=(n,t)=>t.innerHTML=n;function oi(n,t){l.html=n,l.render=t}let Js=(n,t)=>{};function Ys(n){Js=n}const{assign:Zs,defineProperty:kc}=Object;kc(Symbol,"metadata",{value:Symbol.for("Symbol.metadata")});const Xs=n=>typeof n=="function"&&n(),ai=globalThis.nQM,mt=Symbol.for("gem@sheetToken"),Le=Symbol.for("gem@update"),tr="gem-style-boundary",Pc="gem-element",En="gem@render-error",Mc=Le,ci=new WeakMap,er=new WeakMap;class Oc extends CSSStyleSheet{constructor(){super(...arguments);C(this,yt);$(this,"cssText","")}get element(){return _(this,yt)||(O(this,yt,document.createElement("style")),_(this,yt).textContent=this.cssText),_(this,yt)}replaceSync(e){this.cssText=e,_(this,yt)&&(_(this,yt).textContent=e),super.replaceSync(e)}}yt=new WeakMap;class Lc{constructor(t=""){C(this,Ft,"");C(this,dn,"");C(this,Se,new Map);C(this,ye,new Map);O(this,dn,t)}setContent(t){O(this,Ft,t)}getStyle(t,e){var a;const i=t&&!((a=t.internals)!=null&&a.shadowRoot),s=i?t.constructor:this;if(!_(this,Se).has(s)){const c=new Oc({media:_(this,dn)});_(this,Se).set(s,c)}const r=_(this,Se).get(s);if(!_(this,ye).has(r)){let c=_(this,Ft),d="";i&&(d=e?"@scope":`@scope (${t.tagName}) to (:state(${tr}) > *)`,c=`${d}{ ${c} }`),r.replaceSync(c),_(this,ye).set(r,d)}return r}updateStyle(){_(this,ye).forEach((t,e)=>{e.replaceSync(t?`${t}{${_(this,Ft)}}`:_(this,Ft))})}}Ft=new WeakMap,dn=new WeakMap,Se=new WeakMap,ye=new WeakMap;function Nt(n,...t){let e="",i="";const s=t.at(0);Array.isArray(n)?i=$n(n,...t):s!==void 0?(e=n,i=s):i=n;const r=new Lc(e),a={[mt]:r};let c="";return typeof i=="string"?c=i:Object.keys(i).forEach(d=>{const u=d==="$";a[d]=u||d.includes("-")?d:`${d}-${Sn()}`,c+=`${u?":where(&:not([hidden])),:host(:where(:not([hidden])))":`.${a[d]}`} {${i[d]}}`}),r.setContent(c),a}const nr=(n,t,e)=>{let i=!1;t.forEach(s=>{const r=n.get(s)||0;i||(i=e===1&&r===0||e===-1&&r===1),n.set(s,r+e)}),i&&ft(er.get(n),ai)},Ac=(n,t)=>{const e=n.getRootNode();if(!ci.has(e)){const s=new Map;ci.set(e,s),er.set(s,()=>{const r=(e.adoptedStyleSheets||[]).filter(a=>!s.has(a));s.forEach((a,c)=>a&&r.push(c)),e.adoptedStyleSheets=r.reverse()})}const i=ci.get(e);return nr(i,t,1),()=>nr(i,t,-1)};l.createState=void 0;function ir(n){n==null||n.forEach(t=>{const{callback:e,getDep:i,values:s,preCallback:r}=t,a=i==null?void 0:i();(!i||!s||js(s,a))&&(Xs(r),t.preCallback=e(a,s),t.values=a,t.initialized=!0)})}function sr(n){return n.filter(t=>(Xs(t.preCallback),t.initialized=!1,t.values=void 0,t.fixed))}l._createTemplate=void 0;const Jt=new Bs,hi=(n=performance.now())=>{if(performance.now()>n+50)return requestAnimationFrame(hi);const t=Jt.get();t&&(t(),hi(n))};Jt.addEventListener("start",()=>ft(hi));let rr;class J extends HTMLElement{constructor(){super();C(this,ct);C(this,xt);C(this,X);C(this,_t,[]);C(this,Bt,[]);C(this,wt,[]);C(this,we);C(this,at);C(this,Ee);C(this,Ce);C(this,Kt);C(this,Jn,()=>{ir(_(this,_t))});C(this,Yn,()=>{ir(_(this,Bt))});C(this,un,e=>{try{O(this,Ce,!0),_(this,Yn).call(this);const i=_(this,xt)===this,s=e?e.render():i?void 0:l.html`<slot></slot>`;if(s===void 0)return;const r=s!==null?s:l.html`<style>${i?"@scope":":host"}{&{display:none!important;}}</style>`;Js(r,_(this,xt))||l.render(r,_(this,xt))}catch(i){throw this.dispatchEvent(new CustomEvent(En,{bubbles:!0,composed:!0,detail:i})),i}finally{O(this,Ce,!1)}});C(this,be,()=>{const e=_(this,ct,xs);_(this,at)&&(e||!_(this,wt).length)&&(_(this,un).call(this,e),ft(_(this,Jn)))});C(this,jt,()=>{_(this,ct,Pe).noBlocking?Jt.add(_(this,be)):_(this,be).call(this)});C(this,_n,()=>{const{adoptedStyleSheets:e=[]}=_(this,ct,Pe),{shadowRoot:i,sheets:s}=_(this,X),r=e.map(a=>a[mt].getStyle(this));if(i)i.adoptedStyleSheets=r.concat(s);else return this.prepend(...s.map(a=>a.element)),Ac(this,r)});C(this,Zn,()=>{var e;(e=_(this,_t))==null||e.forEach(i=>{const{callback:s,getDep:r,initialized:a}=i;a||(i.values=r==null?void 0:r(),i.preCallback=s(i.values),i.initialized=!0)})});C(this,Xn,()=>{var e;this.willMount&&this.memo(this.willMount.bind(this),()=>[]),this.mounted&&this.effect(this.mounted.bind(this),()=>[]),this.updated&&this.effect((i,s)=>s&&this.updated.apply(this)),this.unmounted&&this.effect(()=>this.unmounted.bind(this),()=>[]),!_(this,wt).length&&this.render&&_(this,wt).push({render:this.render.bind(this),condition:(e=this.shouldUpdate)==null?void 0:e.bind(this)})});C(this,fn);C(this,Te,async()=>{var r;if(_(this,we)){O(this,we,!1),(r=_(this,Kt))==null||r.call(this),O(this,Kt,_(this,_n).call(this));return}O(this,Ee,!0),_(this,Xn).call(this);const{observedStores:e,mode:i,penetrable:s}=_(this,ct,Pe);_(this,X).states.add(Pc),!i&&_(this,wt).length&&!s&&_(this,X).states.add(tr),O(this,fn,e==null?void 0:e.map(a=>ht(a,_(this,jt)))),_(this,un).call(this,_(this,ct,xs)),O(this,at,!0),O(this,Kt,_(this,_n).call(this)),ft(_(this,Zn))});$(this,"effect",(e,i)=>{const s={callback:e,getDep:i,initialized:_(this,at),fixed:!_(this,Ee)};_(this,at)&&(s.values=i==null?void 0:i(),s.preCallback=e(s.values)),_(this,_t).push(s)});$(this,"memo",(e,i)=>{_(this,Bt).push({callback:e,getDep:i,fixed:!_(this,Ee)})});$(this,"update",()=>ft(_(this,jt)));rr=this;const{aria:e,mode:i,delegatesFocus:s,...r}=_(this,ct,Pe),{focusable:a,...c}=e||{};O(this,xt,i?this.shadowRoot||this.attachShadow({mode:i,delegatesFocus:s,...r}):this),O(this,X,this.attachInternals()),_(this,X).stateList=[],_(this,X).sheets=[],Zs(_(this,X),c);let d;_(this,_t).push({fixed:!0,getDep:()=>[this.disabled],callback:([u=!1])=>{if(d===void 0&&(d=this.hasAttribute("tabindex")),_(this,X).ariaDisabled=String(u),a&&!d&&(this.tabIndex=-Number(u)),(a||s)&&u)return ri(this,"click",m=>m.isTrusted&&m.stopImmediatePropagation(),{capture:!0})}})}[Mc](){_(this,at)&&ft(_(this,jt))}get internals(){return _(this,X)}connectedCallback(){_(this,ct,Pe).noBlocking?Jt.add(_(this,Te)):_(this,Te).call(this)}disconnectedCallback(){var e,i;if(this.isConnected){O(this,we,!0);return}Jt.delete(_(this,Te)),Jt.delete(_(this,be)),O(this,at,!1),(e=_(this,fn))==null||e.forEach(s=>s()),O(this,_t,sr(_(this,_t))),O(this,Bt,sr(_(this,Bt))),(i=_(this,Kt))==null||i.call(this)}}xt=new WeakMap,X=new WeakMap,_t=new WeakMap,Bt=new WeakMap,wt=new WeakMap,we=new WeakMap,at=new WeakMap,Ee=new WeakMap,Ce=new WeakMap,Kt=new WeakMap,ct=new WeakSet,Pe=function(){return this.constructor[Symbol.metadata]},xs=function(){return _(this,wt).findLast(e=>!e.condition||e.condition())},Jn=new WeakMap,Yn=new WeakMap,un=new WeakMap,be=new WeakMap,jt=new WeakMap,_n=new WeakMap,Zn=new WeakMap,Xn=new WeakMap,fn=new WeakMap,Te=new WeakMap,l.createState=e=>{const i=rr,s=Me(e,r=>{const a=_(i,_t).at(0);if(!ai&&_(i,at)&&a&&!a.initialized)throw new pt("Don't set state sync before insert the DOM");Zs(s,r),!_(i,Ce)&&_(i,at)&&ft(_(i,jt),ai)});return _(i,X).stateList.push(s),s},l._createTemplate=(e,i)=>_(e,wt).push(i);const Nc=Object.freeze(Object.defineProperty({__proto__:null,GemElement:J,SheetToken:mt,UpdateToken:Le,_RenderErrorEvent:En,get _createTemplate(){return l._createTemplate},get createState(){return l.createState},css:Nt,get html(){return l.html},get render(){return l.render},setEngine:oi,setHydrationEngine:Ys},Symbol.toStringTag,{value:"Module"})),{deleteProperty:Rc,getOwnPropertyDescriptor:li,defineProperty:Cn}=Reflect,{getPrototypeOf:bn,assign:Ic,hasOwn:Tn}=Object,or=new Ks;function Ct(n,t,e){var s;const i=n.metadata;li(i,t)||Cn(i,t,{value:((s=i[t])==null?void 0:s.filter(r=>r!==e))||[]}),i[t].push(e)}function kn(n,t){const{value:e}=li(n,t)||{};Rc(n,t),n[t]=e}const di=new WeakMap,{setAttribute:ar,toggleAttribute:Hc,removeAttribute:cr}=Element.prototype,ui=(n,t)=>{var e;return(e=di.get(bn(n)))==null?void 0:e.get(t)};J.prototype.setAttribute=function(n,t){const e=ui(this,n);if(!e)return ar.call(this,n,t);this[e]=t},J.prototype.removeAttribute=function(n){const t=ui(this,n);if(!t)return cr.call(this,n);this[t]=null},J.prototype.toggleAttribute=function(n,t){const e=ui(this,n);return e?this[e]=t??!this.hasAttribute(n):Hc.call(this,n,t)};function Wc(){}const hr=Symbol("event handle");function _i(n,t,{attr:e,attrType:i,event:s,eventOptions:r}={}){Cn(n,t,{configurable:!0,get(){const a=or.get(this)[t];return s&&!a?(this[t]=Wc,this[t]):a},set(a){const c=this,d=or.get(c);e&&(a=i===Boolean&&a===""?!0:i(a||""),a?ar.call(this,e,i===Boolean?"":a):cr.call(this,e)),a!==d[t]&&(s?(d[t]=a!=null&&a[hr]?a:async(u,m)=>{await Promise.resolve();const o=new CustomEvent(s,{...m,...r,detail:u});c.dispatchEvent(o),await a(u,m)},d[t][hr]=!0):(d[t]=a,this[Le]()))}})}const lr=new WeakMap;function Ae(n,{metadata:t}){const e=lr.get(t);if(e)return e;let i=n;do i=bn(i);while(i.constructor[Symbol.metadata]!==t);return lr.set(t,i),i}function fi(n,t){const e=n.name,i=At(e);return n.addInitializer(function(){const s=Ae(this,n);Tn(s,e)||(Ct(n,"observedAttributes",i),_i(s,e,{attr:i,attrType:t})),kn(this,e);const r=bn(this),a=di.get(r)||new Map;a.set(i,e),di.set(r,a)}),function(s){return this.getAttribute(i)??s}}function x(n,t){return fi(t,String)}function Ne(n,t){return fi(t,Boolean)}function dr(n,t){return fi(t,Number)}function U(n,t){const e=t.name;return t.addInitializer(function(){const i=Ae(this,t);Tn(i,e)||(Ct(t,"observedProperties",e),_i(i,e)),kn(this,e)}),function(i){return this[e]??i}}function pi(n){return(t,e)=>{const{addInitializer:i,name:s,access:r,kind:a}=e;i(function(){const c=n&&(()=>n(this));if(a==="getter"){if(e.private)throw new pt("not support");const d=Ae(this,e),u=li(d,s).get.bind(this);this.memo(()=>{Cn(this,s,{configurable:!0,value:u()})},c)}else this.memo(r.get.call(this,this).bind(this),c)})}}function lt(n){return(t,{addInitializer:e,access:i})=>{e(function(){this.effect(i.get.call(this,this).bind(this),n&&(()=>n(this)))})}}function ur(){return(n,{addInitializer:t,access:e})=>{t(function(){this.effect(()=>e.get.call(this,this).bind(this),()=>[])})}}function Pn(){return pi(()=>[])}function Yt(){return lt(()=>[])}function Rt(n){return(t,{addInitializer:e,access:i})=>{e(function(){l._createTemplate(this,{render:i.get.call(this,this).bind(this),condition:n&&(()=>n(this))})})}}function _r(){return(n,{addInitializer:t,access:e})=>{t(function(){this.addEventListener(En,({detail:i})=>{l.render(e.get.call(this,this).apply(this,[i]),this.internals.shadowRoot||this)})})}}function Gc(n,t,e){Cn(n,t,{configurable:!0,get(){const i=this,{states:s}=i.internals;return s==null?void 0:s.has(e)},set(i){const s=this,{states:r}=s.internals;i?r==null||r.add(e):r==null||r.delete(e)}})}function Re(n,t){const e=t.name,i=At(e);t.addInitializer(function(){const s=Ae(this,t);Tn(s,e)||(Ct(t,"definedCSSStates",i),Gc(s,e,i)),kn(this,e)})}function fr(n,t,e,i){const s=n.name,r=At(s);if(n.static)Ct(n,e,r);else{const a=bn(t);a[s]||(a[s]=r,Ct(n,e,r))}return i||r}function pr(n,t){return function(e){return fr(t,this,"definedSlots",e)}}function mi(n,t){return function(e){return fr(t,this,"definedParts",e)}}function Zt(n,t){gr(t)}function mr(n,t){gr(t,{bubbles:!0,composed:!0})}function gr(n,t){const e=n.name,i=At(e);n.addInitializer(function(){const s=Ae(this,n);Tn(s,e)||(Ct(n,"definedEvents",i),_i(s,e,{event:i,eventOptions:t})),kn(this,e)})}function Xt(n){return(t,e)=>{Ct(e,"adoptedStyleSheets",n)}}function Ie(n){return(t,e)=>{Ct(e,"observedStores",n)}}function bt({mode:n="open",serializable:t=!0,...e}={}){return(i,s)=>{const r=s.metadata;Ic(r,{mode:n,serializable:t,...e})}}function gi({penetrable:n}){return(t,e)=>{const i=e.metadata;i.penetrable=n}}function vr(){return(n,t)=>{const e=t.metadata;e.noBlocking=!0}}function He(n){return(t,e)=>{const i=e.metadata;i.aria={...i.aria,...n}}}function $r(n){return(t,{addInitializer:e})=>{e(()=>{customElements.define(n,t)})}}const zc=Object.freeze(Object.defineProperty({__proto__:null,adoptedStyle:Xt,aria:He,async:vr,attribute:x,boolattribute:Ne,connectStore:Ie,customElement:$r,effect:lt,emitter:Zt,fallback:_r,globalemitter:mr,light:gi,memo:pi,mounted:Yt,numattribute:dr,part:mi,property:U,shadow:bt,slot:pr,state:Re,template:Rt,unmounted:ur,willMount:Pn},Symbol.toStringTag,{value:"Module"}));/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2017 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const We=globalThis.trustedTypes,Sr=We==null?void 0:We.createPolicy("lit-html",{createHTML:n=>n}),yr="$lit$",Tt=`lit$${Math.random().toFixed(9).slice(2)}$`,wr="?"+Tt,Vc=`<${wr}>`,It=document,te=()=>It.createComment(""),Ge=n=>n===null||typeof n!="object"&&typeof n!="function",ee=n=>n==null,Dc=n=>Symbol.iterator in n,vi=`[
|
|
6
|
-
\f\r]`,Uc=`[^
|
|
7
|
-
\f\r"'\`<>=]`,qc=`[^\\s"'>=/]`,ze=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Er=1,$i=2,Fc=3,Cr=/-->/g,br=/>/g,Ht=new RegExp(`>|${vi}(?:(${qc}+)(${vi}*=${vi}*(?:${Uc}|("|')|))|$)`,"g"),xc=0,Tr=1,Bc=2,kr=3,Pr=/'/g,Mr=/"/g,Or=/^(?:script|style|textarea|title)$/i,Kc=1,Mn=2,On=3,Si=1,Ln=2,jc=3,Qc=4,Jc=5,yi=6,Yc=7,Lr="v-if",Ar="v-else-if",Nr="v-else";class wi{constructor(t,e,i){$(this,"type");$(this,"strings");$(this,"values");this.type=t,this.strings=e,this.values=i}}const Ei=n=>(t,...e)=>new wi(n,t,e),Zc=Ei(Kc),Xc=Ei(Mn),th=Ei(On),Ci=Symbol.for("lit-noChange"),Rr=new WeakMap,Wt=It.createTreeWalker(It,129);function eh(n,t){if(!Array.isArray(n))throw new Error("invalid template");return Sr!==void 0?Sr.createHTML(t):t}const nh=(n,t)=>{const e=n.length-1,i=[];let s=t===Mn?"<svg>":t===On?"<math>":"",r,a=ze;for(let d=0;d<e;d++){const u=n[d];let m=-1,o,g=0,h;for(;g<u.length&&(a.lastIndex=g,h=a.exec(u),h!==null);)g=a.lastIndex,a===ze?h[Er]==="!--"?a=Cr:h[Er]!==void 0?a=br:h[$i]!==void 0?(Or.test(h[$i])&&(r=new RegExp(`</${h[$i]}`,"g")),a=Ht):h[Fc]!==void 0&&(a=Ht):a===Ht?h[xc]===">"?(a=r??ze,m=-1):h[Tr]===void 0?m=-2:(m=a.lastIndex-h[Bc].length,o=h[Tr],a=h[kr]===void 0?Ht:h[kr]==='"'?Mr:Pr):a===Mr||a===Pr?a=Ht:a===Cr||a===br?a=ze:(a=Ht,r=void 0);const v=a===Ht&&n[d+1].startsWith("/>")?" ":"";s+=a===ze?u+Vc:m>=0?(i.push(o),u.slice(0,m)+yr+u.slice(m)+Tt+v):u+Tt+(m===-2?d:v)}const c=s+(n[e]||"<?>")+(t===Mn?"</svg>":t===On?"</math>":"");return[eh(n,c),i]};class bi{constructor({strings:t,type:e},i){$(this,"el");$(this,"parts",[]);let s,r=0,a=0;const c=t.length-1,d=this.parts,[u,m]=nh(t,e);if(this.el=bi.createElement(u,i),Wt.currentNode=this.el.content,e===Mn||e===On){const o=this.el.content.firstChild;o.replaceWith(...o.childNodes)}for(;(s=Wt.nextNode())!==null&&d.length<c;){if(s.nodeType===1){if(s.hasAttributes())for(const o of s.getAttributeNames())if(o.endsWith(yr)){const g=m[a++],v=s.getAttribute(o).split(Tt),S=/([.?@])?(.*)/.exec(g);d.push({type:Si,index:r,name:S[2],strings:v,ctor:S[1]==="."?rh:S[1]==="?"?oh:S[1]==="@"?ah:An}),s.removeAttribute(o)}else o.startsWith(Tt)&&(d.push({type:yi,index:r}),s.removeAttribute(o));if(Or.test(s.tagName)){const o=s.textContent.split(Tt),g=o.length-1;if(g>0){s.textContent=We?We.emptyScript:"";for(let h=0;h<g;h++)s.append(o[h],te()),Wt.nextNode(),d.push({type:Ln,index:++r});s.append(o[g],te())}}}else if(s.nodeType===8)if(s.data===wr)d.push({type:Ln,index:r});else{let g=-1;for(;(g=s.data.indexOf(Tt,g+1))!==-1;)d.push({type:Yc,index:r}),g+=Tt.length-1}r++}}static createElement(t,e){const i=It.createElement("template");return i.innerHTML=t,i}}function ne(n,t,e=n,i){var a,c;if(t===Ci)return t;let s=i!==void 0?(a=e.__directives)==null?void 0:a[i]:e.__directive;const r=Ge(t)?void 0:t._$litDirective$;return(s==null?void 0:s.constructor)!==r&&((c=s==null?void 0:s._$notifyDirectiveConnectionChanged)==null||c.call(s,!1),r===void 0?s=void 0:(s=new r(n),s._$initialize(n,e,i)),i!==void 0?(e.__directives??(e.__directives=[]))[i]=s:e.__directive=s),s!==void 0&&(t=ne(n,s._$resolve(n,t.values),s,i)),t}class ih{constructor(t,e){$(this,"_$template");$(this,"_$parts",[]);$(this,"_$conditions",[]);$(this,"_$parent");$(this,"_$disconnectableChildren");this._$template=t,this._$parent=e}get parentNode(){return this._$parent.parentNode}get _$isConnected(){return this._$parent._$isConnected}_clone(t){const{el:{content:e},parts:i}=this._$template,s=new Map,r=new Map,a=((t==null?void 0:t.creationScope)??It).importNode(e,!0);Wt.currentNode=a;let c=Wt.nextNode(),d=0,u=0,m=i[0];for(;m!==void 0;){if(d===m.index){let o;m.type===Ln?o=new Ve(c,c.nextSibling,this,t):m.type===Si?(m.name===Lr&&s.set(c,u),m.name===Ar&&r.set(c,u),o=new m.ctor(c,m.name,m.strings,this,t)):m.type===yi&&(o=new ch(c,this,t)),this._$parts.push(o),m=i[++u]}d!==(m==null?void 0:m.index)&&(c=Wt.nextNode(),d++)}return s.forEach((o,g)=>{const h=new sh(g,o);this._$conditions.push(h);let v=g;for(;v=v.nextElementSibling;){const S=r.get(v);if(S===void 0)break;h.push(v,S)}}),Wt.currentNode=It,a}_update(t){let e=0;for(const i of this._$parts)i!==void 0&&(i.strings!==void 0?(i._$setValue(t,i,e),e+=i.strings.length-2):i.name===Lr||i.name===Ar||i._$setValue(t[e])),e++;this._$conditions.forEach(i=>i.update(t))}}class sh{constructor(t,e){$(this,"mark");$(this,"list");const i=te();i._$chain=this,t.before(i),this.mark=i,this.list=[{ele:t,idx:e}],this.check()}get next(){return this.list.at(-1).ele.nextElementSibling}push(t,e){this.list.push({ele:t,idx:e}),this.check()}check(){const t=this.next;t!=null&&t.attributes.getNamedItem(Nr)&&(this.list.push({ele:t}),t.removeAttribute(Nr))}update(t){const{mark:e,list:i}=this,s=i.find(({idx:r})=>r===void 0||!!t[r]);s&&!s.ele.parentNode&&e.after(s.ele),i.forEach(({ele:r})=>(!s||r!==s.ele)&&r.remove())}}class Ve{constructor(t,e,i,s){$(this,"type",Ln);$(this,"options");$(this,"_$committedValue");$(this,"__directive");$(this,"_$startNode");$(this,"_$endNode");$(this,"_$parent");$(this,"__isConnected");$(this,"_$disconnectableChildren");this._$startNode=t,this._$endNode=e,this._$parent=i,this.options=s,this.__isConnected=(s==null?void 0:s.isConnected)??!0}get _$isConnected(){var t;return((t=this._$parent)==null?void 0:t._$isConnected)??this.__isConnected}get parentNode(){let t=this._$startNode.parentNode;const e=this._$parent;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$startNode}get endNode(){return this._$endNode}_$setValue(t,e=this){this.parentNode&&(t=ne(this,t,e),Ge(t)?ee(t)||t===""?(ee(this._$committedValue)||this._$clear(),this._$committedValue=void 0):t!==this._$committedValue&&t!==Ci&&this._commitText(t):t instanceof wi?this._commitTemplateResult(t):t.nodeType!==void 0?this._commitNode(t):Dc(t)?this._commitIterable(t):this._commitText(t))}_insert(t){return this._$startNode.parentNode.insertBefore(t,this._$endNode)}_commitNode(t){this._$committedValue!==t&&(this._$clear(),this._$committedValue=this._insert(t))}_commitText(t){if(!ee(this._$committedValue)&&Ge(this._$committedValue)){const e=this._$startNode.nextSibling;e.data=t}else this._commitNode(It.createTextNode(t));this._$committedValue=t}_commitTemplateResult(t){var s;const{values:e}=t,i=this._$getTemplate(t);if(((s=this._$committedValue)==null?void 0:s._$template)===i)this._$committedValue._update(e);else{const r=new ih(i,this),a=r._clone(this.options);r._update(e),this._commitNode(a),this._$committedValue=r}}_$getTemplate(t){let e=Rr.get(t.strings);return e===void 0&&Rr.set(t.strings,e=new bi(t)),e}_commitIterable(t){Array.isArray(this._$committedValue)||(this._$committedValue=[],this._$clear());const e=this._$committedValue;let i=0,s;for(const r of t)i===e.length?e.push(s=new Ve(this._insert(te()),this._insert(te()),this,this.options)):s=e[i],s._$setValue(r),i++;i<e.length&&(this._$clear(s&&s._$endNode.nextSibling,i),e.length=i)}_$clear(t=this._$startNode.nextSibling,e){var i;for((i=this._$notifyConnectionChanged)==null||i.call(this,!1,!0,e);t&&t!==this._$endNode;){const s=t.nextSibling;t.remove(),t=s}}setConnected(t){var e;this._$parent===void 0&&(this.__isConnected=t,(e=this._$notifyConnectionChanged)==null||e.call(this,t))}}class An{constructor(t,e,i,s,r){$(this,"type",Si);$(this,"element");$(this,"name");$(this,"options");$(this,"strings");$(this,"_$committedValue");$(this,"__directives");$(this,"_$parent");$(this,"_$disconnectableChildren");this.element=t,this.name=e,this._$parent=s,this.options=r,i.length>2||i[0]!==""||i[1]!==""?(this._$committedValue=new Array(i.length-1).fill(new String),this.strings=i):this._$committedValue=void 0}get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}_$setValue(t,e=this,i,s){const r=this.strings;let a=!1;if(r===void 0)t=ne(this,t,e,0),a=!Ge(t)||t!==this._$committedValue,a&&(this._$committedValue=t);else{const c=t;t=r[0];let d,u;for(d=0;d<r.length-1;d++)u=ne(this,c[i+d],e,d),a||(a=!Ge(u)||u!==this._$committedValue[d]),ee(u)?t=void 0:ee(t)||(t+=u+r[d+1]),this._$committedValue[d]=u}a&&!s&&this._commitValue(t)}_commitValue(t){ee(t)?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t)}}class rh extends An{constructor(){super(...arguments);$(this,"type",jc)}_commitValue(e){this.element[this.name]=e}}class oh extends An{constructor(){super(...arguments);$(this,"type",Qc)}_commitValue(e){this.element.toggleAttribute(this.name,!!e)}}class ah extends An{constructor(){super(...arguments);$(this,"type",Jc)}_$setValue(e,i=this){e=ne(this,e,i,0);const s=this._$committedValue,r=s&&(!e||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive),a=e&&(!s||r);r&&this.element.removeEventListener(this.name,this,s),a&&this.element.addEventListener(this.name,this,e),this._$committedValue=e}handleEvent(e){var i;typeof this._$committedValue=="function"?this._$committedValue.call(((i=this.options)==null?void 0:i.host)??this.element,e):this._$committedValue.handleEvent(e)}}class ch{constructor(t,e,i){$(this,"type",yi);$(this,"__directive");$(this,"_$committedValue");$(this,"_$parent");$(this,"_$disconnectableChildren");$(this,"_$props");$(this,"options");this.element=t,this._$parent=e,this.options=i}get _$isConnected(){return this._$parent._$isConnected}_$setValue(t){if(t)if(t instanceof Ir)t.value=this.element;else if(t._$litDirective$)ne(this,t);else{if(this._$props)for(const e in this._$props)Reflect.set(this.element,e,void 0);Object.assign(this.element,t),this._$props=t}}}const hh=()=>new Ir;class Ir{constructor(){$(this,"value")}}const lh=(n,t,e)=>{const i=(e==null?void 0:e.renderBefore)??t;let s=i._$litPart$;if(s===void 0){const r=(e==null?void 0:e.renderBefore)??null;i._$litPart$=s=new Ve(t.insertBefore(te(),r),r,void 0,e??{})}return s._$setValue(n),s},Hr="2.2.3",dh=Object.freeze(Object.defineProperty({__proto__:null,version:Hr},Symbol.toStringTag,{value:"Module"}));/**
|
|
8
|
-
* @license
|
|
9
|
-
* Copyright 2017 Google LLC
|
|
10
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
|
-
*/const uh={CHILD:2},Wr=n=>(...t)=>({_$litDirective$:n,values:t});class _h{constructor(){$(this,"__part");$(this,"__attributeIndex");$(this,"__directive");$(this,"_$parent");$(this,"_$disconnectableChildren")}get _$isConnected(){return this._$parent._$isConnected}_$initialize(t,e,i){this.__part=t,this._$parent=e,this.__attributeIndex=i}_$resolve(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}const Gr=()=>document.createComment(""),De=(n,t,e)=>{var r;const i=n._$startNode.parentNode,s=t===void 0?n._$endNode:t._$startNode;if(e===void 0){const a=i.insertBefore(Gr(),s),c=i.insertBefore(Gr(),s);e=new Ve(a,c,n,n.options)}else{const a=e._$endNode.nextSibling,c=e._$parent,d=c!==n;if(d){(r=e._$reparentDisconnectables)==null||r.call(e,n),e._$parent=n;let u;e._$notifyConnectionChanged!==void 0&&(u=n._$isConnected)!==c._$isConnected&&e._$notifyConnectionChanged(u)}if(a!==s||d){let u=e._$startNode;for(;u!==a;){const m=u.nextSibling;i.insertBefore(u,s),u=m}}}return e},Gt=(n,t,e=n)=>(n._$setValue(t,e),n),fh={},ph=(n,t=fh)=>n._$committedValue=t,mh=n=>n._$committedValue,Ti=n=>{var i;(i=n._$notifyConnectionChanged)==null||i.call(n,!1,!0);let t=n._$startNode;const e=n._$endNode.nextSibling;for(;t!==e;){const s=t.nextSibling;t.remove(),t=s}},zr=(n,t,e)=>{const i=new Map;for(let s=t;s<=e;s++)i.set(n[s],s);return i};class gh extends _h{constructor(e){super();$(this,"_itemKeys");if(e.type!==uh.CHILD)throw new Error("repeat() can only be used in text expressions")}_getValuesAndKeys(e,i,s){let r;s===void 0?s=i:i!==void 0&&(r=i);const a=[],c=[];let d=0;for(const u of e)a[d]=r?r(u,d):d,c[d]=s(u,d),d++;return{values:c,keys:a}}render(e,i,s){return this._getValuesAndKeys(e,i,s).values}update(e,[i,s,r]){const a=mh(e),{values:c,keys:d}=this._getValuesAndKeys(i,s,r);if(!Array.isArray(a))return this._itemKeys=d,c;const u=this._itemKeys??(this._itemKeys=[]),m=[];let o,g,h=0,v=a.length-1,S=0,E=c.length-1;for(;h<=v&&S<=E;)if(a[h]===null)h++;else if(a[v]===null)v--;else if(u[h]===d[S])m[S]=Gt(a[h],c[S]),h++,S++;else if(u[v]===d[E])m[E]=Gt(a[v],c[E]),v--,E--;else if(u[h]===d[E])m[E]=Gt(a[h],c[E]),De(e,m[E+1],a[h]),h++,E--;else if(u[v]===d[S])m[S]=Gt(a[v],c[S]),De(e,a[h],a[v]),v--,S++;else if(o===void 0&&(o=zr(d,S,E),g=zr(u,h,v)),!o.has(u[h]))Ti(a[h]),h++;else if(!o.has(u[v]))Ti(a[v]),v--;else{const P=g.get(d[S]),p=P!==void 0?a[P]:null;if(p===null){const T=De(e,a[h]);Gt(T,c[S]),m[S]=T}else m[S]=Gt(p,c[S]),De(e,a[h],p),a[P]=null;S++}for(;S<=E;){const P=De(e,m[E+1]);Gt(P,c[S]),m[S++]=P}for(;h<=v;){const P=a[h++];P!==null&&Ti(P)}return this._itemKeys=d,ph(e,m),Ci}}const vh=Wr(gh);oi(Zc,lh),globalThis.__GEM_DEVTOOLS__HOOK__&&!globalThis.__GEM_DEVTOOLS__HOOK__.GemElement&&Object.assign(globalThis.__GEM_DEVTOOLS__HOOK__,{...Nc,...zc,...Tc,...dh});const tt=globalThis.history,Vr=tt.pushState.bind(tt),Dr=tt.replaceState.bind(tt);let $h=0;const ki=()=>`${performance.now()}-${++$h}`,A=Et({$hasCloseHandle:!1,$hasOpenHandle:!1,$hasShouldCloseHandle:!1,$key:""}),K=new Map;function Ur(n){const{$key:t,$hasCloseHandle:e,$hasOpenHandle:i,$hasShouldCloseHandle:s}=n||{};if(A.$key!==t){if(t)throw new pt("`$key` is not allowed");if(e)throw new pt("`$hasCloseHandle` is not allowed");if(i)throw new pt("`$hasOpenHandle` is not allowed");if(s)throw new pt("`$hasShouldCloseHandle` is not allowed")}}function qr(n){return et.basePath?et.basePath+n:n}function Nn(n){return n===et.basePath?"/":n.replace(new RegExp(`^${et.basePath}/`),"/")}function Pi(){et.dispatchEvent(new CustomEvent("beforechange"))}function Rn(n){const t=K.get(A.$key)||{path:Nn(location.pathname),query:new Qt},e=n.path?si(t.path,n.path):Nn(location.pathname),i=new Qt(n.query??(n.path?"":location.search)),s=String(i)!==String(t.query),r=s?i:t.query,a=e!==t.path||s,c=n.title||(a?"":document.title),d=n.close||n.data||n.open||n.shouldClose,u=decodeURIComponent(n.hash??(!a&&d?location.hash:""));return{...n,title:c,path:e,query:r,hash:u}}function Fr(n,t){Ur(n.data);const e=Rn(n),{title:i,path:s,query:r,hash:a,close:c,open:d,shouldClose:u,data:m}=e,o={$hasCloseHandle:!!c,$hasOpenHandle:!!d,$hasShouldCloseHandle:!!u,$key:ki(),$title:i,...m};K.set(o.$key,e),Pi(),yn(A),A(o);const g=qr(s)+new Qt(r)+a,h=decodeURIComponent(location.hash);t(o,i,g),h!==a&&dispatchEvent(new CustomEvent("hashchange"))}function xr(n,t,e,i){Ur(n);const s={$key:ki(),$title:t,...n||{}},{pathname:r,search:a,hash:c}=new URL(e,location.origin+location.pathname),d=Rn({path:r,query:new Qt(a),hash:c,title:t,data:n});K.set(s.$key,d),Pi(),yn(A),A(s);const u=qr(r)+d.query+c,m=location.hash;i(s,t,u),m!==c&&dispatchEvent(new CustomEvent("hashchange"))}const Mi=Et({basePath:""});class Sh extends EventTarget{get store(){return A}get currentKey(){return A.$key}get basePath(){return Mi.basePath}set basePath(t){Mi({basePath:t}),Object.assign(K.get(A.$key),{path:Nn(location.pathname)})}getParams(){return K.get(A.$key)}updateParams(t){Object.assign(K.get(A.$key),t),A()}push(t){Fr(t,Vr)}replace(t){Fr(t,Dr)}pushIgnoreCloseHandle(t){var e,i;A.$hasCloseHandle?((i=(e=K.get(A.$key))==null?void 0:e.close)==null||i.call(e),this.replace(t)):this.push(t)}forward(){tt.forward()}back(){tt.back()}}const et=new Sh,ie=Et({defaultTitle:document.title,url:"",title:""}),yh={history:et,titleStore:ie,basePathStore:Mi};if(!globalThis._GEMHISTORY){if(globalThis._GEMHISTORY=yh,tt.pushState=(t,e,i)=>{xr(t,e,i,Vr)},tt.replaceState=(t,e,i)=>{xr(t,e,i,Dr)},addEventListener("hashchange",({isTrusted:t})=>{t&&et.replace({hash:location.hash})}),tt.state)if(tt.state.$hasCloseHandle){A(tt.state);const t=Rn({title:document.title});K.set(A.$key,t),et.back()}else{const t=Rn({title:document.title,hash:location.hash});A({$key:ki(),...tt.state||{}}),K.set(A.$key,t)}else{const{protocol:t,pathname:e,search:i,hash:s}=location;t.startsWith("http")&&et.replace({path:e,query:i,hash:s})}ht(ie,()=>{const t=K.get(A.$key);t&&(t.title=ie.title)}),ht(A,()=>{const{title:t}=et.getParams();t!==ie.title&&ie({title:t})});let n=!1;addEventListener("popstate",t=>{var r,a;const e=t.state;if(!(e!=null&&e.$key))return;if(n){n=!1;return}if(!K.has(e.$key)){const{pathname:c,search:d,hash:u}=location;K.set(e.$key,{path:Nn(c),query:new Qt(d),hash:decodeURIComponent(u),title:ie.title||e.$title,data:e})}const i=A;if(parseFloat(e.$key)>parseFloat(i.$key)&&e.$hasOpenHandle)(a=(r=K.get(e.$key))==null?void 0:r.open)==null||a.call(r);else if(i.$hasCloseHandle){const c=K.get(i.$key),d=c==null?void 0:c.close,u=c==null?void 0:c.shouldClose;if(u&&!u()){n=!0,et.forward();return}else d?d():e.$hasCloseHandle&&(n=!0,et.back())}Pi(),yn(A),A(e)})}const{history:N,titleStore:kt,basePathStore:Br}=globalThis._GEMHISTORY;var wh=Object.create,Oi=Object.defineProperty,Eh=Object.getOwnPropertyDescriptor,Kr=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n),se=n=>{throw TypeError(n)},jr=(n,t,e)=>t in n?Oi(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Qr=(n,t)=>Oi(n,"name",{value:t,configurable:!0}),Ch=n=>[,,,wh((n==null?void 0:n[Kr("metadata")])??null)],Jr=["class","method","getter","setter","accessor","field","value","get","set"],Ue=n=>n!==void 0&&typeof n!="function"?se("Function expected"):n,bh=(n,t,e,i,s)=>({kind:Jr[n],name:t,metadata:i,addInitializer:r=>e._?se("Already initialized"):s.push(Ue(r||null))}),Th=(n,t)=>jr(t,Kr("metadata"),n[3]),zt=(n,t,e,i)=>{for(var s=0,r=n[t>>1],a=r&&r.length;s<a;s++)t&1?r[s].call(e):i=r[s].call(e,i);return i},In=(n,t,e,i,s,r)=>{var a,c,d,u,m,o=t&7,g=!!(t&8),h=!!(t&16),v=o>3?n.length+1:o?g?1:2:0,S=Jr[o+5],E=o>3&&(n[v-1]=[]),P=n[v]||(n[v]=[]),p=o&&(!h&&!g&&(s=s.prototype),o<5&&(o>3||!h)&&Eh(o<4?s:{get[e](){return st(this,r)},set[e](f){return Fe(this,r,f)}},e));o?h&&o<4&&Qr(r,(o>2?"set ":o>1?"get ":"")+e):Qr(s,e);for(var T=i.length-1;T>=0;T--)u=bh(o,e,d={},n[3],P),o&&(u.static=g,u.private=h,m=u.access={has:h?f=>kh(s,f):f=>e in f},o^3&&(m.get=h?f=>(o^1?st:Ph)(f,s,o^4?r:p.get):f=>f[e]),o>2&&(m.set=h?(f,M)=>Fe(f,s,M,o^4?r:p.set):(f,M)=>f[e]=M)),c=(0,i[T])(o?o<4?h?r:p[S]:o>4?void 0:{get:p.get,set:p.set}:s,u),d._=1,o^4||c===void 0?Ue(c)&&(o>4?E.unshift(c):o?h?r=c:p[S]=c:s=c):typeof c!="object"||c===null?se("Object expected"):(Ue(a=c.get)&&(p.get=a),Ue(a=c.set)&&(p.set=a),Ue(a=c.init)&&E.unshift(a));return o||Th(n,s),p&&Oi(s,e,p),h?o^4?r:p:s},qe=(n,t,e)=>jr(n,typeof t!="symbol"?t+"":t,e),Li=(n,t,e)=>t.has(n)||se("Cannot "+e),kh=(n,t)=>Object(t)!==t?se('Cannot use the "in" operator on this value'):n.has(t),st=(n,t,e)=>(Li(n,t,"read from private field"),e?e.call(n):t.get(n)),re=(n,t,e)=>t.has(n)?se("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),Fe=(n,t,e,i)=>(Li(n,t,"write to private field"),i?i.call(n,e):t.set(n,e),e),Ph=(n,t,e)=>(Li(n,t,"access private method"),e),Yr,Zr,Xr,Ai,to,nt,xe,Be,Ke,Ni,Hn,Ri;const Ii=Symbol();to=[Ie(N.store),He({role:"dialog",ariaModal:"true"})];class oe extends(Ai=J,Xr=[x],Zr=[Re],Yr=[Pn()],Ai){constructor(){super(...arguments),qe(this,"label",zt(nt,8,this)),zt(nt,11,this),qe(this,"opened",zt(nt,12,this)),zt(nt,15,this),re(this,xe),re(this,Be),re(this,Ke,[]),re(this,Ni,()=>{var t;this.inert=!0,st(this,Ke).forEach(e=>e.inert=!1),st(this,xe)?st(this,xe).before(this):st(this,Be)&&((t=st(this,Be))==null||t.appendChild(this)),this.dispatchEvent(new CustomEvent("close")),this.opened=!1}),re(this,Hn,()=>{this.hidden=!1,this.inert=!1,Fe(this,xe,this.nextSibling),Fe(this,Be,this.parentElement||this.getRootNode()),Fe(this,Ke,[...document.body.children].filter(t=>!t.inert)),st(this,Ke).forEach(t=>t.inert=!0),document.body.append(this),this.dispatchEvent(new CustomEvent("open")),this.opened=!0}),re(this,Ri,zt(nt,16,this,()=>this.inert=!0)),zt(nt,19,this),qe(this,"open",()=>{if(!this.opened)return st(this,Hn).call(this),N.push({title:this.label,open:st(this,Hn),close:st(this,Ni),shouldClose:this.shouldClose}),Ii}),qe(this,"close",()=>(N.back(),Ii)),qe(this,"forceClose",()=>(this.opened=!1,setTimeout(this.close,100),Ii))}shouldClose(){return!0}}nt=Ch(Ai),xe=new WeakMap,Be=new WeakMap,Ke=new WeakMap,Ni=new WeakMap,Hn=new WeakMap,Ri=new WeakMap,In(nt,5,"label",Xr,oe),In(nt,5,"opened",Zr,oe),In(nt,21,"#init",Yr,Ri),oe=In(nt,0,"GemDialogBaseElement",to,oe),zt(nt,1,oe);var Mh=Object.create,Hi=Object.defineProperty,Oh=Object.getOwnPropertyDescriptor,eo=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n),ae=n=>{throw TypeError(n)},no=(n,t,e)=>t in n?Hi(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,io=(n,t)=>Hi(n,"name",{value:t,configurable:!0}),Lh=n=>[,,,Mh((n==null?void 0:n[eo("metadata")])??null)],so=["class","method","getter","setter","accessor","field","value","get","set"],je=n=>n!==void 0&&typeof n!="function"?ae("Function expected"):n,Ah=(n,t,e,i,s)=>({kind:so[n],name:t,metadata:i,addInitializer:r=>e._?ae("Already initialized"):s.push(je(r||null))}),Nh=(n,t)=>no(t,eo("metadata"),n[3]),Qe=(n,t,e,i)=>{for(var s=0,r=n[t>>1],a=r&&r.length;s<a;s++)t&1?r[s].call(e):i=r[s].call(e,i);return i},Wi=(n,t,e,i,s,r)=>{var a,c,d,u,m,o=t&7,g=!!(t&8),h=!!(t&16),v=o>3?n.length+1:o?g?1:2:0,S=so[o+5],E=o>3&&(n[v-1]=[]),P=n[v]||(n[v]=[]),p=o&&(!h&&!g&&(s=s.prototype),o<5&&(o>3||!h)&&Oh(o<4?s:{get[e](){return ro(this,r)},set[e](f){return ao(this,r,f)}},e));o?h&&o<4&&io(r,(o>2?"set ":o>1?"get ":"")+e):io(s,e);for(var T=i.length-1;T>=0;T--)u=Ah(o,e,d={},n[3],P),o&&(u.static=g,u.private=h,m=u.access={has:h?f=>Rh(s,f):f=>e in f},o^3&&(m.get=h?f=>(o^1?ro:Ih)(f,s,o^4?r:p.get):f=>f[e]),o>2&&(m.set=h?(f,M)=>ao(f,s,M,o^4?r:p.set):(f,M)=>f[e]=M)),c=(0,i[T])(o?o<4?h?r:p[S]:o>4?void 0:{get:p.get,set:p.set}:s,u),d._=1,o^4||c===void 0?je(c)&&(o>4?E.unshift(c):o?h?r=c:p[S]=c:s=c):typeof c!="object"||c===null?ae("Object expected"):(je(a=c.get)&&(p.get=a),je(a=c.set)&&(p.set=a),je(a=c.init)&&E.unshift(a));return o||Nh(n,s),p&&Hi(s,e,p),h?o^4?r:p:s},Wn=(n,t,e)=>no(n,typeof t!="symbol"?t+"":t,e),Gi=(n,t,e)=>t.has(n)||ae("Cannot "+e),Rh=(n,t)=>Object(t)!==t?ae('Cannot use the "in" operator on this value'):n.has(t),ro=(n,t,e)=>(Gi(n,t,"read from private field"),e?e.call(n):t.get(n)),oo=(n,t,e)=>t.has(n)?ae("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),ao=(n,t,e,i)=>(Gi(n,t,"write to private field"),i?i.call(n,e):t.set(n,e),e),Ih=(n,t,e)=>(Gi(n,t,"access private method"),e);const Gn=Symbol("open mark");function Hh(n){var t,e,i,s,r,a,c;const d=Symbol();s=[bt(),He({role:"alertdialog",ariaModal:"true"})];let u=class fc extends(i=J,e=[Yt()],t=[Yt()],i){constructor(){super(...arguments),Wn(this,"label",""),oo(this,a,Qe(r,8,this,()=>ht(N.store,this.update))),Qe(r,11,this),oo(this,c,Qe(r,12,this,()=>ht(fc.store,this.update))),Qe(r,15,this)}static get isOpen(){return this.store[Gn]}static open(g){const h=new this;this.instance=h,this.inertStore=[...document.body.children].filter(S=>!S.inert),this.inertStore.forEach(S=>S.inert=!0),document.body.append(h);const v=()=>this.store({[Gn]:!0,...g});return setTimeout(()=>{v(),N.push({title:h.label,open:v,close:this.closeHandle.bind(this),shouldClose:this.shouldClose.bind(this)})},100),d}static close(){return N.back(),d}static closeHandle(){var g;return this.inertStore.forEach(h=>h.inert=!1),(g=this.instance)==null||g.remove(),this.store({[Gn]:!1,...n}),d}static shouldClose(){return!0}};return r=Lh(i),a=new WeakMap,c=new WeakMap,Wi(r,21,"#connectHistory",e,a),Wi(r,21,"#connectStore",t,c),u=Wi(r,0,"ModalElement",s,u),Wn(u,"inertStore",[]),Wn(u,"instance",null),Wn(u,"store",Et({[Gn]:!1,...n})),Qe(r,1,u),u}var Wh=Object.create,zi=Object.defineProperty,Gh=Object.getOwnPropertyDescriptor,co=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n),ce=n=>{throw TypeError(n)},ho=(n,t,e)=>t in n?zi(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,lo=(n,t)=>zi(n,"name",{value:t,configurable:!0}),uo=n=>[,,,Wh((n==null?void 0:n[co("metadata")])??null)],_o=["class","method","getter","setter","accessor","field","value","get","set"],Je=n=>n!==void 0&&typeof n!="function"?ce("Function expected"):n,zh=(n,t,e,i,s)=>({kind:_o[n],name:t,metadata:i,addInitializer:r=>e._?ce("Already initialized"):s.push(Je(r||null))}),Vh=(n,t)=>ho(t,co("metadata"),n[3]),k=(n,t,e,i)=>{for(var s=0,r=n[t>>1],a=r&&r.length;s<a;s++)t&1?r[s].call(e):i=r[s].call(e,i);return i},D=(n,t,e,i,s,r)=>{var a,c,d,u,m,o=t&7,g=!!(t&8),h=!!(t&16),v=o>3?n.length+1:o?g?1:2:0,S=_o[o+5],E=o>3&&(n[v-1]=[]),P=n[v]||(n[v]=[]),p=o&&(!h&&!g&&(s=s.prototype),o<5&&(o>3||!h)&&Gh(o<4?s:{get[e](){return F(this,r)},set[e](f){return zn(this,r,f)}},e));o?h&&o<4&&lo(r,(o>2?"set ":o>1?"get ":"")+e):lo(s,e);for(var T=i.length-1;T>=0;T--)u=zh(o,e,d={},n[3],P),o&&(u.static=g,u.private=h,m=u.access={has:h?f=>Dh(s,f):f=>e in f},o^3&&(m.get=h?f=>(o^1?F:Uh)(f,s,o^4?r:p.get):f=>f[e]),o>2&&(m.set=h?(f,M)=>zn(f,s,M,o^4?r:p.set):(f,M)=>f[e]=M)),c=(0,i[T])(o?o<4?h?r:p[S]:o>4?void 0:{get:p.get,set:p.set}:s,u),d._=1,o^4||c===void 0?Je(c)&&(o>4?E.unshift(c):o?h?r=c:p[S]=c:s=c):typeof c!="object"||c===null?ce("Object expected"):(Je(a=c.get)&&(p.get=a),Je(a=c.set)&&(p.set=a),Je(a=c.init)&&E.unshift(a));return o||Vh(n,s),p&&zi(s,e,p),h?o^4?r:p:s},q=(n,t,e)=>ho(n,typeof t!="symbol"?t+"":t,e),Vi=(n,t,e)=>t.has(n)||ce("Cannot "+e),Dh=(n,t)=>Object(t)!==t?ce('Cannot use the "in" operator on this value'):n.has(t),F=(n,t,e)=>(Vi(n,t,"read from private field"),e?e.call(n):t.get(n)),rt=(n,t,e)=>t.has(n)?ce("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),zn=(n,t,e,i)=>(Vi(n,t,"write to private field"),i?i.call(n,e):t.set(n,e),e),Uh=(n,t,e)=>(Vi(n,t,"access private method"),e),fo,po,mo,go,vo,$o,So,yo,wo,Eo,Co,bo,To,ko,Po,Di,Mo,y,Vt,he,Ye,Vn,Ui,Ze,qi,Fi,xi,Bi,Ki,ji,Oo,Qi,Lo;const Ao="_";class qh extends RegExp{constructor(t){let e=0;super(`^${t.replace(/((:[^/$]+)|(\*))/g,(i,s)=>s==="*"?`(?<${Ao}${e++}>.*)`:`(?<${s.slice(1)}>[^/]+)`)}$`)}}function Ji(n,t){if(globalThis.URLPattern){const r=new URLPattern({pathname:n}),a=r.exec({pathname:t})||r.exec({pathname:`${t}/`});return a?a.pathname.groups:null}const e=new qh(n),i=t.match(e)||`${t}/`.match(e);if(!i)return null;const s={};return i.groups&&Object.entries(i.groups).forEach(([r,a])=>{s[r.startsWith(Ao)?r.slice(1):r]=a}),s}function Dn(n,t){let e=0,i=n.pattern.replaceAll("*",()=>`:${e++}`);const s=t==null?void 0:t.params;return s&&Object.keys(s).forEach(r=>{i=i.replace(new RegExp(`:${r}`,"g"),s[r])}),i}function No(n,t){return{path:Dn(n,t),...t}}const Yi=l.html``,Ro=new Map;Mo=[gi({penetrable:!0})];class H extends(Di=J,Po=[Ne],ko=[U],To=[U],bo=[U],Co=[Zt],Eo=[Zt],wo=[Zt],yo=[Zt],So=[U],$o=[U],vo=[U],go=[lt(t=>[t.scrollContainer])],mo=[lt(t=>[t.scrollContainer])],po=[lt(t=>{var e;return F(e=t,Bi).call(e)})],fo=[Rt(t=>!t.inert)],Di){constructor(){super(...arguments),rt(this,Vt),q(this,"transition",k(y,8,this)),k(y,11,this),q(this,"routes",k(y,12,this)),k(y,15,this),q(this,"locationStore",k(y,16,this)),k(y,19,this),q(this,"key",k(y,20,this)),k(y,23,this),q(this,"loading",k(y,24,this)),k(y,27,this),q(this,"beforeroutechange",k(y,28,this)),k(y,31,this),q(this,"routechange",k(y,32,this)),k(y,35,this),q(this,"error",k(y,36,this)),k(y,39,this),q(this,"scrollContainer",k(y,40,this)),k(y,43,this),q(this,"scrollIgnoreHash",k(y,44,this)),k(y,47,this),q(this,"trigger",k(y,48,this,N)),k(y,51,this),q(this,"currentRoute"),q(this,"currentParams",{}),rt(this,Ye,l.createState({content:Yi})),rt(this,Vn,()=>{if(!this.locationStore)return;const{path:t,query:e,hash:i,data:s}=N.getParams();this.locationStore({path:t,params:this.currentParams,query:e,hash:i,data:s})}),rt(this,Ui,()=>{if(!F(this,Vt,he))return;const t=Ro.get(N.currentKey);t?F(this,Vt,he).scroll(0,t):(this.scrollIgnoreHash||!N.getParams().hash)&&F(this,Vt,he).scroll(0,0)}),rt(this,Ze),rt(this,qi,(t,e,i)=>{this.beforeroutechange(t),zn(this,Ze,void 0),this.currentRoute=t,this.currentParams=e;const s=async()=>{F(this,Ye).call(this,{content:i}),F(this,Vn).call(this),await Promise.resolve(),F(this,Ui).call(this),this.routechange(this.currentRoute)};this.transition&&"startViewTransition"in document?document.startViewTransition(()=>s()):s()}),rt(this,Fi,k(y,52,this,()=>{if(F(this,Vt,he))return ri(N,"beforechange",()=>Ro.set(N.currentKey,F(this,Vt,he).scrollTop))})),k(y,55,this),rt(this,xi,k(y,56,this,()=>this.trigger.store&&ht(this.trigger.store,()=>F(this,Ye).call(this)))),k(y,59,this),rt(this,Bi,()=>{const{path:t,query:e,hash:i}=this.trigger.getParams();return[this.key,t,e,i]}),rt(this,Ki,k(y,60,this,([t,e],i)=>{if(i&&t===i[0]&&e===i[1]){F(this,Vn).call(this);return}this.update()})),k(y,63,this),rt(this,ji,k(y,64,this,()=>{const{content:t}=F(this,Ye);if(t!==void 0)return this.shadowRoot?t===Yi?l.html`<slot></slot>`:t:t===Yi?void 0:l.html`${t}`})),k(y,67,this),q(this,"update",async()=>{const{path:t,hash:e,query:i}=this.trigger.getParams(),{route:s,params:r={}}=le.findRoute(this.routes,t),{redirect:a,content:c,getContent:d}=s||{};if(a){this.trigger.replace({path:Dn({pattern:a},{params:r}),query:i,hash:e});return}this.trigger===N&&(location.href!==kt.url||s!=null&&s.title)&&kt({url:location.href,title:s==null?void 0:s.title});const u=c||(d==null?void 0:d(r,this.shadowRoot||this));this.loading(s),zn(this,Ze,u);const m=()=>F(this,Ze)===u;try{const o=await u;m()&&F(this,qi).call(this,s,r,o)}catch(o){m()&&this.error(o)}})}}y=uo(Di),Vt=new WeakSet,he=function(){return typeof this.scrollContainer=="function"?this.scrollContainer():this.scrollContainer},Ye=new WeakMap,Vn=new WeakMap,Ui=new WeakMap,Ze=new WeakMap,qi=new WeakMap,Fi=new WeakMap,xi=new WeakMap,Bi=new WeakMap,Ki=new WeakMap,ji=new WeakMap,D(y,5,"transition",Po,H),D(y,5,"routes",ko,H),D(y,5,"locationStore",To,H),D(y,5,"key",bo,H),D(y,5,"loading",Co,H),D(y,5,"beforeroutechange",Eo,H),D(y,5,"routechange",wo,H),D(y,5,"error",yo,H),D(y,5,"scrollContainer",So,H),D(y,5,"scrollIgnoreHash",$o,H),D(y,5,"trigger",vo,H),D(y,21,"#rememberScrollPosition",go,Fi),D(y,21,"#connectTriggerStore",mo,xi),D(y,21,"#updateContent",po,Ki),D(y,21,"#content",fo,ji),H=D(y,0,"GemLightRouteElement",Mo,H),q(H,"createLocationStore",()=>{const{path:n,query:t,hash:e,data:i}=N.getParams();return Et({path:n,query:t,hash:e,data:i,params:{}})}),q(H,"findRoute",(n=[],t)=>{let e=null,i;Array.isArray(n)?i=n:i=Object.values(n);for(const s of i)if(s.pattern==="*")e=s;else{const r=Ji(s.pattern,t);if(r)return{route:s,params:r}}return{route:e}}),k(y,1,H);const Fh=Nt`
|
|
12
|
-
:host(:where(:not([hidden]))),
|
|
13
|
-
:not(:defined) {
|
|
14
|
-
display: contents;
|
|
15
|
-
}
|
|
16
|
-
`;Oo=[bt(),Xt(Fh)];class le extends(Lo=H){}Qi=uo(Lo),le=D(Qi,0,"GemRouteElement",Oo,le),k(Qi,1,le);var xh=Object.create,Zi=Object.defineProperty,Bh=Object.getOwnPropertyDescriptor,Io=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n),de=n=>{throw TypeError(n)},Ho=(n,t,e)=>t in n?Zi(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Wo=(n,t)=>Zi(n,"name",{value:t,configurable:!0}),Go=n=>[,,,xh((n==null?void 0:n[Io("metadata")])??null)],zo=["class","method","getter","setter","accessor","field","value","get","set"],Xe=n=>n!==void 0&&typeof n!="function"?de("Function expected"):n,Kh=(n,t,e,i,s)=>({kind:zo[n],name:t,metadata:i,addInitializer:r=>e._?de("Already initialized"):s.push(Xe(r||null))}),jh=(n,t)=>Ho(t,Io("metadata"),n[3]),b=(n,t,e,i)=>{for(var s=0,r=n[t>>1],a=r&&r.length;s<a;s++)t&1?r[s].call(e):i=r[s].call(e,i);return i},W=(n,t,e,i,s,r)=>{var a,c,d,u,m,o=t&7,g=!!(t&8),h=!!(t&16),v=o>3?n.length+1:o?g?1:2:0,S=zo[o+5],E=o>3&&(n[v-1]=[]),P=n[v]||(n[v]=[]),p=o&&(!h&&!g&&(s=s.prototype),o<5&&(o>3||!h)&&Bh(o<4?s:{get[e](){return dt(this,r)},set[e](f){return Vo(this,r,f)}},e));o?h&&o<4&&Wo(r,(o>2?"set ":o>1?"get ":"")+e):Wo(s,e);for(var T=i.length-1;T>=0;T--)u=Kh(o,e,d={},n[3],P),o&&(u.static=g,u.private=h,m=u.access={has:h?f=>Qh(s,f):f=>e in f},o^3&&(m.get=h?f=>(o^1?dt:Jh)(f,s,o^4?r:p.get):f=>f[e]),o>2&&(m.set=h?(f,M)=>Vo(f,s,M,o^4?r:p.set):(f,M)=>f[e]=M)),c=(0,i[T])(o?o<4?h?r:p[S]:o>4?void 0:{get:p.get,set:p.set}:s,u),d._=1,o^4||c===void 0?Xe(c)&&(o>4?E.unshift(c):o?h?r=c:p[S]=c:s=c):typeof c!="object"||c===null?de("Object expected"):(Xe(a=c.get)&&(p.get=a),Xe(a=c.set)&&(p.set=a),Xe(a=c.init)&&E.unshift(a));return o||jh(n,s),p&&Zi(s,e,p),h?o^4?r:p:s},j=(n,t,e)=>Ho(n,typeof t!="symbol"?t+"":t,e),Xi=(n,t,e)=>t.has(n)||de("Cannot "+e),Qh=(n,t)=>Object(t)!==t?de('Cannot use the "in" operator on this value'):n.has(t),dt=(n,t,e)=>(Xi(n,t,"read from private field"),e?e.call(n):t.get(n)),ue=(n,t,e)=>t.has(n)?de("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),Vo=(n,t,e,i)=>(Xi(n,t,"write to private field"),i?i.call(n,e):t.set(n,e),e),Jh=(n,t,e)=>(Xi(n,t,"access private method"),e),Do,Uo,qo,Fo,xo,Bo,Ko,jo,Qo,Jo,Yo,Zo,Xo,ta,ts,ea,w,Pt,tn,na,es,ns,is,ss,rs,ia,sa,ra,os,oa,it,as;function aa(n){return!n.startsWith("/")}const Yh=Nt`
|
|
17
|
-
:host {
|
|
18
|
-
/* link default style */
|
|
19
|
-
cursor: pointer;
|
|
20
|
-
color: blue;
|
|
21
|
-
text-decoration: underline;
|
|
22
|
-
}
|
|
23
|
-
a {
|
|
24
|
-
all: unset;
|
|
25
|
-
display: contents;
|
|
26
|
-
}
|
|
27
|
-
a:visited {
|
|
28
|
-
color: unset;
|
|
29
|
-
}
|
|
30
|
-
`;ea=[Ie(Br),Xt(Yh),bt(),He({focusable:!0})];let G=class pc extends(ts=J,ta=[mi],Xo=[x],Zo=[x],Yo=[x],Jo=[x],Qo=[x],jo=[x],Ko=[Ne],Bo=[U],xo=[U],Fo=[U],qo=[U],Uo=[Yt()],Do=[Rt()],ts){constructor(){super(...arguments),b(w,5,this),ue(this,Pt),j(this,"href",b(w,12,this)),b(w,15,this),j(this,"target",b(w,16,this)),b(w,19,this),j(this,"path",b(w,20,this)),b(w,23,this),j(this,"query",b(w,24,this)),b(w,27,this),j(this,"hash",b(w,28,this)),b(w,31,this),j(this,"hint",b(w,32,this)),b(w,35,this),j(this,"preload",b(w,36,this)),b(w,39,this),j(this,"route",b(w,40,this)),b(w,43,this),j(this,"options",b(w,44,this)),b(w,47,this),j(this,"routeOptions",b(w,48,this)),b(w,51,this),j(this,"prepare",b(w,52,this)),b(w,55,this),ue(this,es,async t=>{var a;t.preventDefault();const e=this._getLocationString();if(!e)return;if(aa(e))switch(this.target){case"_self":window.location.href=e;return;case"_parent":window.parent.location.href=e;return;case"_top":window.top.location.href=e;return;default:window.open(e);return}const{path:i,query:s,hash:r}=N.getParams();if(i+s+r!==e)if(await((a=this.prepare)==null?void 0:a.call(this)),this.route)N.pushIgnoreCloseHandle(No(this.route,dt(this,Pt,tn)));else if(this.href){const c=new URL(e,location.origin);N.pushIgnoreCloseHandle({path:c.pathname,query:c.search,hash:c.hash})}else N.pushIgnoreCloseHandle({path:this.path,query:this.query,hash:this.hash})}),ue(this,ns,()=>{const t=this._getLocationString();return aa(t)?t:new URL(N.basePath+t,location.origin).toString()}),ue(this,is,()=>{var t,e,i;(t=this.route)==null||t.content,(i=(e=this.route)==null?void 0:e.getContent)==null||i.call(e,{},this.shadowRoot)}),ue(this,rs,b(w,56,this,()=>{const t=dt(this,Pt,na)==="off"?null:dt(this,ns).call(this);return l.html`<a part=${pc.link} href=${t} tabindex="-1"><slot></slot></a>`})),b(w,59,this)}_getLocationString(){var t,e;if(this.route){const i=((t=dt(this,Pt,tn))==null?void 0:t.query)||"",s=((e=dt(this,Pt,tn))==null?void 0:e.hash)||"";return Dn(this.route,dt(this,Pt,tn))+i+s}else{const i=this.href||this.path+this.query+this.hash,{path:s,query:r}=N.getParams();return i.startsWith("#")?`${s}${r}${i}`:i.startsWith("?")?`${s}${i}`:i.startsWith(".")?si(s,i):i}}};w=Go(ts),Pt=new WeakSet,tn=function(){return this.routeOptions||this.options},na=function(){return this.hint||"on"},es=new WeakMap,ns=new WeakMap,is=new WeakMap,ss=function(){this.addEventListener("click",dt(this,es)),this.addEventListener("pointerenter",dt(this,is))},rs=new WeakMap,ss=W(w,17,"#init",Uo,Pt,ss),W(w,13,"link",ta,G),W(w,5,"href",Xo,G),W(w,5,"target",Zo,G),W(w,5,"path",Yo,G),W(w,5,"query",Jo,G),W(w,5,"hash",Qo,G),W(w,5,"hint",jo,G),W(w,5,"preload",Ko,G),W(w,5,"route",Bo,G),W(w,5,"options",xo,G),W(w,5,"routeOptions",Fo,G),W(w,5,"prepare",qo,G),W(w,21,"#content",Do,rs),G=W(w,0,"GemLinkElement",ea,G),j(G,"link",b(w,8,G)),b(w,11,G),b(w,1,G);let cs=G;oa=[Ie(N.store)];class Dt extends(os=cs,ra=[x],sa=[Re],ia=[lt()],os){constructor(){super(...arguments),j(this,"pattern",b(it,8,this)),b(it,11,this),j(this,"active",b(it,12,this)),b(it,15,this),ue(this,as,b(it,16,this,()=>{const{path:t,query:e,hash:i}=N.getParams(),s=this.pattern&&Ji(this.pattern,t);this.active=!!s||t+e+i===this._getLocationString()})),b(it,19,this)}}it=Go(os),as=new WeakMap,W(it,5,"pattern",ra,Dt),W(it,5,"active",sa,Dt),W(it,21,"#updateState",ia,as),Dt=W(it,0,"GemActiveLinkElement",oa,Dt),b(it,1,Dt),customElements.define("gem-link",cs),customElements.define("gem-active-link",Dt);var Zh=Object.create,hs=Object.defineProperty,Xh=Object.getOwnPropertyDescriptor,ca=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n),_e=n=>{throw TypeError(n)},ha=(n,t,e)=>t in n?hs(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,la=(n,t)=>hs(n,"name",{value:t,configurable:!0}),tl=n=>[,,,Zh((n==null?void 0:n[ca("metadata")])??null)],da=["class","method","getter","setter","accessor","field","value","get","set"],en=n=>n!==void 0&&typeof n!="function"?_e("Function expected"):n,el=(n,t,e,i,s)=>({kind:da[n],name:t,metadata:i,addInitializer:r=>e._?_e("Already initialized"):s.push(en(r||null))}),ua=(n,t)=>ha(t,ca("metadata"),n[3]),Mt=(n,t,e,i)=>{for(var s=0,r=n[t>>1],a=r&&r.length;s<a;s++)t&1?r[s].call(e):i=r[s].call(e,i);return i},Un=(n,t,e,i,s,r)=>{var a,c,d,u,m,o=t&7,g=!!(t&8),h=!!(t&16),v=o>3?n.length+1:o?g?1:2:0,S=da[o+5],E=o>3&&(n[v-1]=[]),P=n[v]||(n[v]=[]),p=o&&(!h&&!g&&(s=s.prototype),o<5&&(o>3||!h)&&Xh(o<4?s:{get[e](){return Ot(this,r)},set[e](f){return ds(this,r,f)}},e));o?h&&o<4&&la(r,(o>2?"set ":o>1?"get ":"")+e):la(s,e);for(var T=i.length-1;T>=0;T--)u=el(o,e,d={},n[3],P),o&&(u.static=g,u.private=h,m=u.access={has:h?f=>nl(s,f):f=>e in f},o^3&&(m.get=h?f=>(o^1?Ot:il)(f,s,o^4?r:p.get):f=>f[e]),o>2&&(m.set=h?(f,M)=>ds(f,s,M,o^4?r:p.set):(f,M)=>f[e]=M)),c=(0,i[T])(o?o<4?h?r:p[S]:o>4?void 0:{get:p.get,set:p.set}:s,u),d._=1,o^4||c===void 0?en(c)&&(o>4?E.unshift(c):o?h?r=c:p[S]=c:s=c):typeof c!="object"||c===null?_e("Object expected"):(en(a=c.get)&&(p.get=a),en(a=c.set)&&(p.set=a),en(a=c.init)&&E.unshift(a));return o||ua(n,s),p&&hs(s,e,p),h?o^4?r:p:s},_a=(n,t,e)=>ha(n,typeof t!="symbol"?t+"":t,e),ls=(n,t,e)=>t.has(n)||_e("Cannot "+e),nl=(n,t)=>Object(t)!==t?_e('Cannot use the "in" operator on this value'):n.has(t),Ot=(n,t,e)=>(ls(n,t,"read from private field"),e?e.call(n):t.get(n)),fe=(n,t,e)=>t.has(n)?_e("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),ds=(n,t,e,i)=>(ls(n,t,"write to private field"),i?i.call(n,e):t.set(n,e),e),il=(n,t,e)=>(ls(n,t,"access private method"),e),fa,pa,ma,ga,us,Q,_s,va,fs,qn,ps,nn,ms;const sl="gem-reflect-start",$a="gem-reflect-end",Sa=n=>new Comment(n),rl=n=>{const t=[];let e=n;for(;e&&(t.push(e),e.nodeValue!==$a);)e=e.nextSibling;return t};class sn extends(us=J,ga=[x],ma=[U],pa=[Pn()],fa=[lt(t=>[t.target])],us){constructor(){super(...arguments),fe(this,_s),_a(this,"method",Mt(Q,8,this)),Mt(Q,11,this),_a(this,"target",Mt(Q,12,this,document.head)),Mt(Q,15,this),fe(this,fs,Mt(Q,16,this,()=>{this.hidden=!0})),Mt(Q,19,this),fe(this,qn,Sa(sl)),fe(this,ps,Sa($a)),fe(this,nn),fe(this,ms,Mt(Q,20,this,()=>((Ot(this,nn)||[Ot(this,qn),...this.childNodes,Ot(this,ps)]).forEach((t,e,i)=>{const s=i[e-1];s?s.after(t):this.target[Ot(this,_s,va)](t)}),()=>{ds(this,nn,rl(Ot(this,qn))),Ot(this,nn).forEach(t=>t.remove())}))),Mt(Q,23,this)}}Q=tl(us),_s=new WeakSet,va=function(){return this.method||"append"},fs=new WeakMap,qn=new WeakMap,ps=new WeakMap,nn=new WeakMap,ms=new WeakMap,Un(Q,5,"method",ga,sn),Un(Q,5,"target",ma,sn),Un(Q,21,"#init",pa,fs),Un(Q,21,"#changeTarget",fa,ms),ua(Q,sn),customElements.define("gem-reflect",sn),customElements.define("gem-route",le),customElements.define("gem-light-route",H);var ol=Object.create,gs=Object.defineProperty,al=Object.getOwnPropertyDescriptor,ya=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n),pe=n=>{throw TypeError(n)},wa=(n,t,e)=>t in n?gs(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Ea=(n,t)=>gs(n,"name",{value:t,configurable:!0}),cl=n=>[,,,ol((n==null?void 0:n[ya("metadata")])??null)],Ca=["class","method","getter","setter","accessor","field","value","get","set"],rn=n=>n!==void 0&&typeof n!="function"?pe("Function expected"):n,hl=(n,t,e,i,s)=>({kind:Ca[n],name:t,metadata:i,addInitializer:r=>e._?pe("Already initialized"):s.push(rn(r||null))}),ll=(n,t)=>wa(t,ya("metadata"),n[3]),Y=(n,t,e,i)=>{for(var s=0,r=n[t>>1],a=r&&r.length;s<a;s++)t&1?r[s].call(e):i=r[s].call(e,i);return i},Ut=(n,t,e,i,s,r)=>{var a,c,d,u,m,o=t&7,g=!!(t&8),h=!!(t&16),v=o>3?n.length+1:o?g?1:2:0,S=Ca[o+5],E=o>3&&(n[v-1]=[]),P=n[v]||(n[v]=[]),p=o&&(!h&&!g&&(s=s.prototype),o<5&&(o>3||!h)&&al(o<4?s:{get[e](){return $s(this,r)},set[e](f){return ba(this,r,f)}},e));o?h&&o<4&&Ea(r,(o>2?"set ":o>1?"get ":"")+e):Ea(s,e);for(var T=i.length-1;T>=0;T--)u=hl(o,e,d={},n[3],P),o&&(u.static=g,u.private=h,m=u.access={has:h?f=>dl(s,f):f=>e in f},o^3&&(m.get=h?f=>(o^1?$s:ul)(f,s,o^4?r:p.get):f=>f[e]),o>2&&(m.set=h?(f,M)=>ba(f,s,M,o^4?r:p.set):(f,M)=>f[e]=M)),c=(0,i[T])(o?o<4?h?r:p[S]:o>4?void 0:{get:p.get,set:p.set}:s,u),d._=1,o^4||c===void 0?rn(c)&&(o>4?E.unshift(c):o?h?r=c:p[S]=c:s=c):typeof c!="object"||c===null?pe("Object expected"):(rn(a=c.get)&&(p.get=a),rn(a=c.set)&&(p.set=a),rn(a=c.init)&&E.unshift(a));return o||ll(n,s),p&&gs(s,e,p),h?o^4?r:p:s},Fn=(n,t,e)=>wa(n,typeof t!="symbol"?t+"":t,e),vs=(n,t,e)=>t.has(n)||pe("Cannot "+e),dl=(n,t)=>Object(t)!==t?pe('Cannot use the "in" operator on this value'):n.has(t),$s=(n,t,e)=>(vs(n,t,"read from private field"),e?e.call(n):t.get(n)),xn=(n,t,e)=>t.has(n)?pe("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),ba=(n,t,e,i)=>(vs(n,t,"write to private field"),i?i.call(n,e):t.set(n,e),e),ul=(n,t,e)=>(vs(n,t,"access private method"),e),Ta,ka,Pa,Ma,Oa,La,Ss,Aa,R,ys,ws,Es,Cs;let Na=0;const Ra=n=>{clearTimeout(Na),Na=setTimeout(()=>document.title=n)};function _l(n,t="",e=""){const i=kt.title||n;i&&i!==kt.defaultTitle?Ra(t+(Bn.title=i)+e):Ra(Bn.title=kt.defaultTitle)}Aa=[bt()];let Lt=class mc extends(Ss=J,La=[x],Oa=[x],Ma=[Ne],Pa=[lt(t=>[t.inert])],ka=[Yt()],Ta=[Rt()],Ss){constructor(){super(...arguments),Fn(this,"prefix",Y(R,8,this)),Y(R,11,this),Fn(this,"suffix",Y(R,12,this)),Y(R,15,this),Fn(this,"inert",Y(R,16,this)),Y(R,19,this),xn(this,ys,Y(R,20,this,()=>!this.inert&&ht(kt,this.update))),Y(R,23,this),xn(this,ws,new MutationObserver(()=>this.update())),xn(this,Es,Y(R,24,this,()=>{$s(this,ws).observe(this,{characterData:!0,childList:!0,subtree:!0})})),Y(R,27,this),xn(this,Cs,Y(R,28,this,()=>{var t;return _l((t=this.textContent)==null?void 0:t.trim(),this.prefix,this.suffix),l.html`${mc.title}`})),Y(R,31,this)}static setTitle(t){kt({title:t})}};R=cl(Ss),ys=new WeakMap,ws=new WeakMap,Es=new WeakMap,Cs=new WeakMap,Ut(R,5,"prefix",La,Lt),Ut(R,5,"suffix",Oa,Lt),Ut(R,5,"inert",Ma,Lt),Ut(R,21,"#connectStore",Pa,ys),Ut(R,21,"#obTextContent",ka,Es),Ut(R,21,"#content",Ta,Cs),Lt=Ut(R,0,"GemTitleElement",Aa,Lt),Fn(Lt,"title",document.title),Y(R,1,Lt);let Bn=Lt;customElements.define("gem-title",Bn);var fl=Object.create,bs=Object.defineProperty,pl=Object.getOwnPropertyDescriptor,Ia=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n),me=n=>{throw TypeError(n)},Ha=(n,t,e)=>t in n?bs(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Wa=(n,t)=>bs(n,"name",{value:t,configurable:!0}),ml=n=>[,,,fl((n==null?void 0:n[Ia("metadata")])??null)],Ga=["class","method","getter","setter","accessor","field","value","get","set"],on=n=>n!==void 0&&typeof n!="function"?me("Function expected"):n,gl=(n,t,e,i,s)=>({kind:Ga[n],name:t,metadata:i,addInitializer:r=>e._?me("Already initialized"):s.push(on(r||null))}),vl=(n,t)=>Ha(t,Ia("metadata"),n[3]),gt=(n,t,e,i)=>{for(var s=0,r=n[t>>1],a=r&&r.length;s<a;s++)t&1?r[s].call(e):i=r[s].call(e,i);return i},an=(n,t,e,i,s,r)=>{var a,c,d,u,m,o=t&7,g=!!(t&8),h=!!(t&16),v=o>3?n.length+1:o?g?1:2:0,S=Ga[o+5],E=o>3&&(n[v-1]=[]),P=n[v]||(n[v]=[]),p=o&&(!h&&!g&&(s=s.prototype),o<5&&(o>3||!h)&&pl(o<4?s:{get[e](){return ks(this,r)},set[e](f){return Va(this,r,f)}},e));o?h&&o<4&&Wa(r,(o>2?"set ":o>1?"get ":"")+e):Wa(s,e);for(var T=i.length-1;T>=0;T--)u=gl(o,e,d={},n[3],P),o&&(u.static=g,u.private=h,m=u.access={has:h?f=>$l(s,f):f=>e in f},o^3&&(m.get=h?f=>(o^1?ks:Sl)(f,s,o^4?r:p.get):f=>f[e]),o>2&&(m.set=h?(f,M)=>Va(f,s,M,o^4?r:p.set):(f,M)=>f[e]=M)),c=(0,i[T])(o?o<4?h?r:p[S]:o>4?void 0:{get:p.get,set:p.set}:s,u),d._=1,o^4||c===void 0?on(c)&&(o>4?E.unshift(c):o?h?r=c:p[S]=c:s=c):typeof c!="object"||c===null?me("Object expected"):(on(a=c.get)&&(p.get=a),on(a=c.set)&&(p.set=a),on(a=c.init)&&E.unshift(a));return o||vl(n,s),p&&bs(s,e,p),h?o^4?r:p:s},za=(n,t,e)=>Ha(n,typeof t!="symbol"?t+"":t,e),Ts=(n,t,e)=>t.has(n)||me("Cannot "+e),$l=(n,t)=>Object(t)!==t?me('Cannot use the "in" operator on this value'):n.has(t),ks=(n,t,e)=>(Ts(n,t,"read from private field"),e?e.call(n):t.get(n)),Ps=(n,t,e)=>t.has(n)?me("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),Va=(n,t,e,i)=>(Ts(n,t,"write to private field"),i?i.call(n,e):t.set(n,e),e),Sl=(n,t,e)=>(Ts(n,t,"access private method"),e),Da,Ua,qa,Fa,Ms,xa,B,Os,Ba,Ls,As;const yl=Nt`
|
|
31
|
-
:host(:where(:not([hidden]))) {
|
|
32
|
-
display: contents;
|
|
33
|
-
}
|
|
34
|
-
`;xa=[bt(),Xt(yl)];class qt extends(Ms=J,Fa=[x],qa=[U],Ua=[lt()],Da=[Rt()],Ms){constructor(){super(...arguments),Ps(this,Os),za(this,"html",gt(B,8,this)),gt(B,11,this),za(this,"styles",gt(B,12,this)),gt(B,15,this),Ps(this,Ls,gt(B,16,this,()=>{const t=this.shadowRoot.adoptedStyleSheets;return this.shadowRoot.adoptedStyleSheets=t.concat(ks(this,Os,Ba)),()=>{this.shadowRoot.adoptedStyleSheets=t}})),gt(B,19,this),Ps(this,As,gt(B,20,this,()=>{this.shadowRoot.innerHTML=this.html})),gt(B,23,this)}}B=ml(Ms),Os=new WeakSet,Ba=function(){if(!this.styles)return[];if(typeof this.styles=="string"){const n=new CSSStyleSheet;return n.replaceSync(this.styles),[n]}else return[this.styles].flat().map(n=>n[mt].getStyle())},Ls=new WeakMap,As=new WeakMap,an(B,5,"html",Fa,qt),an(B,5,"styles",qa,qt),an(B,21,"#adoptStyles",Ua,Ls),an(B,21,"#content",Da,As),qt=an(B,0,"GemUnsafeElement",xa,qt),gt(B,1,qt),customElements.define("gem-unsafe",qt);var wl=Object.create,Ns=Object.defineProperty,El=Object.getOwnPropertyDescriptor,Ka=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n),ge=n=>{throw TypeError(n)},ja=(n,t,e)=>t in n?Ns(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Qa=(n,t)=>Ns(n,"name",{value:t,configurable:!0}),Cl=n=>[,,,wl((n==null?void 0:n[Ka("metadata")])??null)],Ja=["class","method","getter","setter","accessor","field","value","get","set"],cn=n=>n!==void 0&&typeof n!="function"?ge("Function expected"):n,bl=(n,t,e,i,s)=>({kind:Ja[n],name:t,metadata:i,addInitializer:r=>e._?ge("Already initialized"):s.push(cn(r||null))}),Tl=(n,t)=>ja(t,Ka("metadata"),n[3]),ot=(n,t,e,i)=>{for(var s=0,r=n[t>>1],a=r&&r.length;s<a;s++)t&1?r[s].call(e):i=r[s].call(e,i);return i},ve=(n,t,e,i,s,r)=>{var a,c,d,u,m,o=t&7,g=!!(t&8),h=!!(t&16),v=o>3?n.length+1:o?g?1:2:0,S=Ja[o+5],E=o>3&&(n[v-1]=[]),P=n[v]||(n[v]=[]),p=o&&(!h&&!g&&(s=s.prototype),o<5&&(o>3||!h)&&El(o<4?s:{get[e](){return Is(this,r)},set[e](f){return Za(this,r,f)}},e));o?h&&o<4&&Qa(r,(o>2?"set ":o>1?"get ":"")+e):Qa(s,e);for(var T=i.length-1;T>=0;T--)u=bl(o,e,d={},n[3],P),o&&(u.static=g,u.private=h,m=u.access={has:h?f=>kl(s,f):f=>e in f},o^3&&(m.get=h?f=>(o^1?Is:Pl)(f,s,o^4?r:p.get):f=>f[e]),o>2&&(m.set=h?(f,M)=>Za(f,s,M,o^4?r:p.set):(f,M)=>f[e]=M)),c=(0,i[T])(o?o<4?h?r:p[S]:o>4?void 0:{get:p.get,set:p.set}:s,u),d._=1,o^4||c===void 0?cn(c)&&(o>4?E.unshift(c):o?h?r=c:p[S]=c:s=c):typeof c!="object"||c===null?ge("Object expected"):(cn(a=c.get)&&(p.get=a),cn(a=c.set)&&(p.set=a),cn(a=c.init)&&E.unshift(a));return o||Tl(n,s),p&&Ns(s,e,p),h?o^4?r:p:s},Kn=(n,t,e)=>ja(n,typeof t!="symbol"?t+"":t,e),Rs=(n,t,e)=>t.has(n)||ge("Cannot "+e),kl=(n,t)=>Object(t)!==t?ge('Cannot use the "in" operator on this value'):n.has(t),Is=(n,t,e)=>(Rs(n,t,"read from private field"),e?e.call(n):t.get(n)),Ya=(n,t,e)=>t.has(n)?ge("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),Za=(n,t,e,i)=>(Rs(n,t,"write to private field"),i?i.call(n,e):t.set(n,e),e),Pl=(n,t,e)=>(Rs(n,t,"access private method"),e),Xa,tc,ec,nc,ic,Hs,sc,V,Ws,Gs;const Ml=Nt`
|
|
35
|
-
:host(:where(:not([hidden]))) {
|
|
36
|
-
position: relative;
|
|
37
|
-
display: inline-flex;
|
|
38
|
-
align-items: center;
|
|
39
|
-
}
|
|
40
|
-
svg {
|
|
41
|
-
width: 100%;
|
|
42
|
-
height: 100%;
|
|
43
|
-
}
|
|
44
|
-
`,rc=new Map;sc=[bt(),Xt(Ml)];class vt extends(Hs=J,ic=[x],nc=[U],ec=[U],tc=[Re],Xa=[Rt()],Hs){constructor(){super(...arguments),Kn(this,"selector",ot(V,8,this)),ot(V,11,this),Kn(this,"root",ot(V,12,this)),ot(V,15,this),Kn(this,"element",ot(V,16,this)),ot(V,19,this),Kn(this,"active",ot(V,20,this)),ot(V,23,this),Ya(this,Ws,()=>{const t=this.element||(this.selector?(this.root||document).querySelector(this.selector):null);if(typeof t=="string"){let e=rc.get(t);return e||(e=document.createElement("template"),e.innerHTML=t,rc.set(t,e)),e.content.cloneNode(!0)}else return t instanceof HTMLTemplateElement?t.content.cloneNode(!0):t==null?void 0:t.cloneNode(!0)}),Ya(this,Gs,ot(V,24,this,()=>l.html`${Is(this,Ws).call(this)}<slot></slot>`)),ot(V,27,this)}}V=Cl(Hs),Ws=new WeakMap,Gs=new WeakMap,ve(V,5,"selector",ic,vt),ve(V,5,"root",nc,vt),ve(V,5,"element",ec,vt),ve(V,5,"active",tc,vt),ve(V,21,"#content",Xa,Gs),vt=ve(V,0,"GemUseElement",sc,vt),ot(V,1,vt),customElements.define("gem-use",vt);class oc{constructor(t){C(this,ke);C(this,pn);$(this,"info",(...t)=>{console.log(_(this,ke,ti),...t)});$(this,"warn",(...t)=>{console.warn(_(this,ke,ti),...t)});$(this,"error",(...t)=>{console.error(_(this,ke,ti),...t)});O(this,pn,t)}}pn=new WeakMap,ke=new WeakSet,ti=function(){return`[${_(this,pn)}]`};const ac=new oc("GEM"),Ol=/\$\d(?:<[^>]*>)?/,Ll=/\$(\d)(<([^>]*)>)?/g,Al=3;function cc(n,...t){const e=n.split(Ol),i=[];let s;for(;s=Ll.exec(n);){const r=s[Al],a=Number(s[1])-1,c=t[a];i.push(typeof c=="function"?c(r):c)}return l.html(e,...i)}const hn=new Set,Ds=class Ds{constructor(t){C(this,z);$(this,"resources");$(this,"fallbackLanguage");$(this,"currentLanguage");$(this,"cache");$(this,"cachePrefix","gem-i18n");$(this,"urlParamsType");$(this,"urlParamsName");$(this,"onChange");$(this,"replace",({path:t})=>this.setLanguage(t));$(this,"getParams",()=>({path:this.currentLanguage}));C(this,mn,!0);if(!t.resources[t.fallbackLanguage])throw new pt("i18n: fallbackLanguage invalid");Object.assign(this,t);let e=_(this,z,gc)||this.currentLanguage||_(this,z,vc);const i=document.querySelector(`[type*=${this.cachePrefix}]`);if(i)try{const s=JSON.parse(i.textContent||"");e=s.currentLanguage,this.resources[s.currentLanguage]=s.currentLanguagePack}catch{}e?(O(this,z,e,ni),this.setLanguage(e)):this.resetLanguage(),O(this,mn,!1)}get(t,...e){const i=this.resources[this.currentLanguage],s=this.resources[this.fallbackLanguage],r=i[t]||s[t],a=(r==null?void 0:r.message)||r||`[${t}]`;return e.length?cc(a,...e):a}detectLanguage(){const t=Object.keys(this.resources),e=navigator.languages.map(i=>i.replace(/-(.*)/,s=>s.toUpperCase()));for(const i of e){const s=t.find(r=>r===i||i.startsWith(`${r}-`));if(s)return s}return this.fallbackLanguage}async setLanguage(t){var s,r;_(this,z,gn)&&hn.forEach(async a=>await a.setLanguage(t));let e;const i=this.resources[t];if(!i)return ac.warn(`${this.cachePrefix}: not found \`${t}\``),this.resetLanguage();if(typeof i=="string"){const a=`${this.cachePrefix}:`,c=`${a}${i}`,d=localStorage.getItem(c),u=async()=>{const m=await(await fetch(i)).json();if(this.cache){for(let o=0;o<localStorage.length;o++){const g=localStorage.key(o);g.startsWith(a)&&localStorage.removeItem(g)}localStorage.setItem(c,JSON.stringify(m))}return m};if(d)try{e=JSON.parse(d)}catch{e=await u()}else e=await u()}else e=i;if(this.resources[t]=e,!_(this,mn)){const a=[document.documentElement];for(;a.length;){const c=a.pop();(s=c[Le])==null||s.call(c),a.push(...[...c.children,...((r=c.shadowRoot)==null?void 0:r.children)||[]].reverse())}}return t!==this.currentLanguage&&O(this,z,t,ni),this.cache===!0&&this.setCache(),t}resetLanguage(){return _(this,z,gn)&&hn.forEach(t=>t.resetLanguage()),O(this,z,this.fallbackLanguage,ni),this.cache&&localStorage.removeItem(_(this,z,ei)),this.setLanguage(this.detectLanguage())}setCache(){_(this,z,gn)&&hn.forEach(t=>t.setCache()),localStorage.setItem(_(this,z,ei),this.currentLanguage)}createSubModule(t,e){const i=new Ds({resources:e,cachePrefix:`${this.cachePrefix}-${t}`,currentLanguage:this.currentLanguage,fallbackLanguage:this.fallbackLanguage,cache:this.cache});return hn.add(i),i}toJSON(){return{currentLanguage:this.currentLanguage,currentLanguagePack:this.resources[this.currentLanguage]}}};z=new WeakSet,ei=function(){return`${this.cachePrefix}:current`},gc=function(){const{hostname:t,pathname:e,search:i}=location,s=t.split(".");switch(this.urlParamsType){case"ccTLD":return s.pop();case"gTLD":return s.shift();case"path":return e.split("/")[1];default:{const r=this.urlParamsName&&new URLSearchParams(i).get(this.urlParamsName)||"";return r in this.resources?r:""}}},vc=function(){return this.cache&&localStorage.getItem(_(this,z,ei))||""},gn=function(){return!hn.has(this)},ni=function(t){var e;_(this,z,gn)&&(document.documentElement.lang=t),this.currentLanguage=t,(e=this.onChange)==null||e.call(this,t)},mn=new WeakMap;let zs=Ds;const Z=n=>matchMedia(n).matches,Nl={PRINT:"print",get isPrint(){return Z(this.PRINT)},HOVER:"(hover: hover)",get isHover(){return Z(this.HOVER)},PWA:"(display-mode: standalone)",get isPWA(){return Z(this.PWA)},MOTION_REDUCE:"(prefers-reduced-motion: reduce)",get isMotionReduce(){return Z(this.MOTION_REDUCE)},DATA_REDUCE:"(prefers-reduced-data: reduce)",get isDataReduce(){return Z(this.DATA_REDUCE)},WATCH:"(width < 320px)",get isWatch(){return Z(this.WATCH)},SMALL_PHONE:"(320px <= width <= 480px) and (height <= 640px)",get isSmallPhone(){return Z(this.SMALL_PHONE)},PHONE:"(320px <= width <= 480px)",get isPhone(){return Z(this.PHONE)},PHONE_LANDSCAPE:"(480px < width < 960px) and (orientation: landscape)",get isPhoneLandscape(){return Z(this.PHONE_LANDSCAPE)},SHORT:"(width >= 480px) and (height <= 320px)",get isShort(){return Z(this.SHORT)},TABLET:"(480px < width <= 1280px)",get isTablet(){return Z(this.TABLET)},DESKTOP:"(width > 1280px) and (orientation: landscape)",get isDesktop(){return Z(this.DESKTOP)},WIDTHSCREEN:"(width >= 1920px) and (orientation: landscape)",get isWidthScreen(){return Z(this.WIDTHSCREEN)}},Rl=Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)).constructor;function hc(n={}){const{origin:t=location.origin,base:e="",appendHeaders:i=()=>({}),transformInput:s=o=>o,transformOutput:r=o=>o,...a}=n,c=o=>o instanceof FormData||o instanceof Blob||o instanceof Rl||o instanceof URLSearchParams||o instanceof ReadableStream||o instanceof ArrayBuffer?o:typeof o=="object"?JSON.stringify(o):o,d=(o,g)=>{if(new URL(o,location.origin).pathname!==o)throw new pt("`path` format is incorrect");const h=new URLSearchParams(g).toString();return`${t}${e}${o}${h?"?":""}${h}`},u=o=>{if(!o)return{};if(o instanceof Headers)return Object.fromEntries(o);const g=Array.isArray(o)?o:Object.entries(o);return Object.fromEntries(g.map(([h,v])=>[h.toLowerCase(),v]))},m=async(o,g={})=>{const h=new Request(o,{...a,...g,headers:new Headers({"content-type":"application/json",...u(a.headers),...u(g.headers)})}),v=await fetch(h);if(v.status===0)throw new Error("Request fail");if(v.status>=500)throw new Error(v.statusText);const S=h.headers.get("content-type"),E=v.status>=400;try{let P;if(S.includes("json")?P=await v.json():S.includes("octet-stream")?P=await v.arrayBuffer():P=await v.text(),E)throw new Error(v.statusText,{cause:P});return await r(P,h)}catch{throw new Error("Parse error")}};return{request:m,async get(o,g){const h=await s(g);return m(d(o,h),{method:"GET",headers:await i(h)})},async del(o,g){const h=await s(g);return m(d(o,h),{method:"DELETE",headers:await i(h)})},async put(o,g){const h=await s(g);return m(d(o),{method:"PUT",headers:await i(h),body:c(h)})},async post(o,g){const h=await s(g);return m(d(o),{method:"POST",headers:await i(h),body:c(h)})}}}const{request:Il,del:Hl,get:Wl,post:Gl,put:zl}=hc(),lc=new WeakMap,dc=new WeakMap;function Vl(n){return lc.get(n)}function Vs(n){return dc.get(n)}function jn(n,t={}){const e=Sn(),i=Nt({})[mt],s=Et(n),r=new Proxy(Me({[mt]:i},c=>s(c)),{get(c,d){if(!c[d]){const[u,m,o]=d.match(/^(\w*Color)(\d+)$/)||[];m&&(c[d]=`oklch(from ${c[m]} calc(l - ${(Number(o)-400)/1e3}) c h)`)}return c[d]}});dc.set(r,t),lc.set(r,s);const a=()=>{let c="";Object.keys(s).forEach(d=>{t[d]||(t[d]=`--${At(d)}-${e}`,r[d]=`var(${t[d]})`),c+=`${t[d]}:${s[d]};`}),i.setContent(`&,:host{${c}}`)};return a(),ht(s,()=>{a(),i.updateStyle()}),r}function uc(n){return jn(n)}function Dl(n){const t=uc(n);return document.adoptedStyleSheets.push(t[mt].getStyle()),t}function Ul(n,t){return jn(t,Vs(n))}function ql(n){const t=jn(n),e=Vs(t);return Me(t,s=>(r,{addInitializer:a,access:c})=>{a(function(){const d=jn({...n},e);this.internals.sheets.push(d[mt].getStyle(this,!0)),this.memo(()=>d(c.get(this).apply(this)),s&&(()=>s(this)))})})}l.GemActiveLinkElement=Dt,l.GemDialogBaseElement=oe,l.GemElement=J,l.GemError=pt,l.GemLightRouteElement=H,l.GemLinkElement=cs,l.GemReflectElement=sn,l.GemRouteElement=le,l.GemTitleElement=Bn,l.GemUnsafeElement=qt,l.GemUseElement=vt,l.I18n=zs,l.LinkedList=Bs,l.Logger=oc,l.PropProxyMap=Ks,l.QueryString=Qt,l.SheetToken=mt,l.TemplateResult=wi,l.UpdateToken=Le,l._RenderErrorEvent=En,l._StoreListenerMap=Oe,l.absoluteLocation=si,l.addListener=ri,l.addMicrotask=ft,l.adoptedStyle=Xt,l.aria=He,l.async=vr,l.attribute=x,l.basePathStore=Br,l.boolattribute=Ne,l.camelToKebabCase=At,l.classMap=Qs,l.cleanObject=yn,l.connect=ht,l.connectStore=Ie,l.createDecoratorTheme=ql,l.createHistoryParams=No,l.createModalClass=Hh,l.createOverrideTheme=Ul,l.createPath=Dn,l.createRef=hh,l.createScopedTheme=uc,l.createStore=Et,l.createTheme=Dl,l.createUpdater=Me,l.css=Nt,l.customElement=$r,l.del=Hl,l.directive=Wr,l.effect=lt,l.emitter=Zt,l.exportPartsMap=bc,l.fallback=_r,l.get=Wl,l.getThemeProps=Vs,l.getThemeStore=Vl,l.globalemitter=mr,l.history=N,l.initRequest=hc,l.isArrayChange=js,l.kebabToCamelCase=wc,l.light=gi,l.logger=ac,l.matchPath=Ji,l.mathml=th,l.mediaQuery=Nl,l.memo=pi,l.mounted=Yt,l.numattribute=dr,l.objectMapToString=wn,l.part=mi,l.partMap=Cc,l.post=Gl,l.property=U,l.put=zl,l.randomStr=Sn,l.raw=$n,l.repeat=vh,l.request=Il,l.setEngine=oi,l.setHydrationEngine=Ys,l.shadow=bt,l.slot=pr,l.splice=cc,l.state=Re,l.styleMap=Ec,l.styled=yc,l.svg=Xc,l.template=Rt,l.titleStore=kt,l.unmounted=ur,l.version=Hr,l.willMount=Pn,Object.defineProperty(l,Symbol.toStringTag,{value:"Module"})});
|