@mantou/gem 2.2.1 → 2.2.3
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 +1154 -1154
- package/dist/gem.umd.js +12 -15
- package/elements/base/gesture.d.ts +1 -0
- package/elements/base/gesture.d.ts.map +1 -1
- package/elements/base/gesture.js +3 -2
- package/elements/base/gesture.js.map +1 -1
- package/elements/base/link.d.ts +1 -1
- package/elements/base/link.d.ts.map +1 -1
- package/elements/base/link.js +13 -9
- package/elements/base/link.js.map +1 -1
- package/elements/base/modal-factory.d.ts +73 -48
- package/elements/base/modal-factory.d.ts.map +1 -1
- package/elements/base/modal-factory.js +12 -11
- package/elements/base/modal-factory.js.map +1 -1
- package/elements/base/route.d.ts +1 -1
- package/elements/base/route.d.ts.map +1 -1
- package/elements/base/route.js +11 -15
- package/elements/base/route.js.map +1 -1
- package/elements/base/title.d.ts.map +1 -1
- package/elements/base/title.js +2 -4
- package/elements/base/title.js.map +1 -1
- package/elements/base/unsafe.d.ts +3 -2
- package/elements/base/unsafe.d.ts.map +1 -1
- package/elements/base/unsafe.js +45 -24
- package/elements/base/unsafe.js.map +1 -1
- package/helper/i18n.d.ts.map +1 -1
- package/helper/logger.d.ts.map +1 -1
- package/helper/react-utils.d.ts.map +1 -1
- package/helper/react-utils.js +2 -6
- package/helper/react-utils.js.map +1 -1
- package/helper/request.d.ts +4 -4
- package/helper/request.d.ts.map +1 -1
- package/helper/request.js +14 -14
- package/helper/request.js.map +1 -1
- package/helper/ssr-shim.d.ts.map +1 -1
- package/helper/ssr-shim.js +0 -1
- package/helper/ssr-shim.js.map +1 -1
- package/helper/theme.d.ts +15 -3
- package/helper/theme.d.ts.map +1 -1
- package/helper/theme.js +22 -7
- package/helper/theme.js.map +1 -1
- package/lib/decorators.d.ts +50 -50
- package/lib/decorators.d.ts.map +1 -1
- package/lib/decorators.js +52 -51
- package/lib/decorators.js.map +1 -1
- package/lib/directive.d.ts.map +1 -1
- package/lib/element.d.ts.map +1 -1
- package/lib/element.js.map +1 -1
- package/lib/history.d.ts +1 -1
- package/lib/history.d.ts.map +1 -1
- package/lib/history.js +3 -3
- package/lib/history.js.map +1 -1
- package/lib/lit-html.d.ts +17 -9
- package/lib/lit-html.d.ts.map +1 -1
- package/lib/lit-html.js +6 -9
- package/lib/lit-html.js.map +1 -1
- package/lib/reactive.d.ts +18 -5
- package/lib/reactive.d.ts.map +1 -1
- package/lib/reactive.js +29 -22
- package/lib/reactive.js.map +1 -1
- package/lib/repeat.d.ts.map +1 -1
- package/lib/store.d.ts +2 -2
- package/lib/store.d.ts.map +1 -1
- package/lib/store.js +1 -0
- package/lib/store.js.map +1 -1
- package/lib/utils.d.ts +4 -1
- package/lib/utils.d.ts.map +1 -1
- package/lib/utils.js +11 -9
- package/lib/utils.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +2 -2
- package/src/elements/base/gesture.ts +4 -2
- package/src/elements/base/link.ts +3 -3
- package/src/elements/base/modal-factory.ts +12 -11
- package/src/elements/base/route.ts +9 -15
- package/src/elements/base/title.ts +2 -4
- package/src/elements/base/unsafe.ts +33 -14
- package/src/helper/react-utils.ts +4 -12
- package/src/helper/request.ts +17 -17
- package/src/helper/ssr-shim.ts +0 -1
- package/src/helper/theme.ts +25 -10
- package/src/lib/decorators.ts +53 -56
- package/src/lib/element.ts +0 -1
- package/src/lib/history.ts +3 -4
- package/src/lib/lit-html.ts +13 -6
- package/src/lib/reactive.ts +66 -28
- package/src/lib/store.ts +3 -2
- package/src/lib/utils.ts +15 -8
- package/src/lib/version.ts +1 -1
- package/src/test/gem-element/advance.test.ts +1 -1
- package/src/test/gem-element/basic.test.ts +1 -2
- package/src/test/utils.test.ts +1 -1
package/dist/gem.umd.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
(function(h,O){typeof exports=="object"&&typeof module<"u"?O(exports):typeof define=="function"&&define.amd?define(["exports"],O):(h=typeof globalThis<"u"?globalThis:h||self,O(h.Gem={}))})(this,function(h){"use strict";var Nh=Object.defineProperty;var oc=h=>{throw TypeError(h)};var Rh=(h,O,I)=>O in h?Nh(h,O,{enumerable:!0,configurable:!0,writable:!0,value:I}):h[O]=I;var $=(h,O,I)=>Rh(h,typeof O!="symbol"?O+"":O,I),Gs=(h,O,I)=>O.has(h)||oc("Cannot "+I);var f=(h,O,I)=>(Gs(h,O,"read from private field"),I?I.call(h):O.get(h)),C=(h,O,I)=>O.has(h)?oc("Cannot add the same private member more than once"):O instanceof WeakSet?O.add(h):O.set(h,I),L=(h,O,I,$n)=>(Gs(h,O,"write to private field"),$n?$n.call(h,I):O.set(h,I),I),zs=(h,O,I)=>(Gs(h,O,"access private method"),I);var Ot,gt,Lt,dn,Vs,ve,Jn,vt,qt,un,$e,Se,ye,st,ut,xt,$t,we,ct,Ee,Ce,Bt,lt,ke,Ds,Yn,Zn,_n,be,Kt,fn,Xn,ti,pn,Te,mn,Pe,ei,G,ni,cc,lc,vn,ii,gn;const{assign:O,fromEntries:I,entries:$n,keys:hc}=Object,si=new Set;function _t(n,t){if(si.has(n))return;const e=()=>{si.delete(n),n()};t?process.nextTick(e):Promise.resolve().then(e),si.add(n)}function Me(n,t){const e=t;return delete e.name,delete e.length,O(e,n),e}function ri(n="",t=""){const{pathname:e,search:i,hash:s}=new URL(t,location.origin+n);return e+i+decodeURIComponent(s)}function oi(n,t,e,i){return n.addEventListener(t,e,i),()=>n.removeEventListener(t,e,i)}class Us extends EventTarget{constructor(){super(...arguments);C(this,dn);C(this,Ot,new Map);C(this,gt);C(this,Lt)}get size(){return f(this,Ot).size}get first(){return f(this,gt)}get last(){return f(this,Lt)}isSuperLinkOf(e){let i=e.first;if(!i)return!0;let s=this.find(i.value);for(;s&&s.value===i.value;){if(i=i.next,!i)return!0;s=s.next}return!1}find(e){return f(this,Ot).get(e)}add(e){f(this,Lt)||this.dispatchEvent(new CustomEvent("start"));const i=zs(this,dn,Vs).call(this,e)||{value:e};i.prev=f(this,Lt),i.prev&&(i.prev.next=i),i.next=void 0,L(this,Lt,i),f(this,gt)||L(this,gt,i),f(this,Ot).set(e,i)}delete(e){const i=zs(this,dn,Vs).call(this,e);return f(this,gt)||this.dispatchEvent(new CustomEvent("end")),i}get(){const e=f(this,gt);if(e)return this.delete(e.value),e.value}}Ot=new WeakMap,gt=new WeakMap,Lt=new WeakMap,dn=new WeakSet,Vs=function(e){const i=f(this,Ot).get(e);return i&&(i.prev?i.prev.next=i.next:L(this,gt,i.next),i.next?i.next.prev=i.prev:L(this,Lt,i.prev),f(this,Ot).delete(e)),i};class Fs extends WeakMap{get(t){let e=super.get(t);return e||(e={},this.set(t,e)),e}}class jt extends URLSearchParams{constructor(){super(...arguments);C(this,ve,e=>typeof e=="string"?e:JSON.stringify(e));C(this,Jn,e=>{if(!e)return null;try{return JSON.parse(e)}catch{return null}})}concat(e){let i;typeof e=="string"?i=I(new URLSearchParams(e).entries()):i=e,$n(i).forEach(([s,o])=>{this.append(s,f(this,ve).call(this,o))})}setAny(e,i){if(Array.isArray(i))this.delete(e),i.forEach(s=>this.append(e,f(this,ve).call(this,s)));else{const s=f(this,ve).call(this,i);s?this.set(e,s):this.delete(e)}}getAny(e){return this.getAnyAll(e)[0]}getAnyAll(e){return this.getAll(e).filter(i=>i!=="").map(i=>f(this,Jn).call(this,i))}toString(){const e=super.toString();return e?`?${e}`:""}toJSON(){return this.toString()}}ve=new WeakMap,Jn=new WeakMap;function Sn(n,...t){return n.reduce((e,i,s)=>e+(t[s-1]??"")+i)}const dc=Sn;function yn(n=5){const t=Math.random().toString(36).slice(2,2+n);return t.length<n?t+yn(n-t.length):t}function At(n){return n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function uc(n){return n.replace(/-(.)/g,(t,e)=>e.toUpperCase())}function wn(n){return hc(n).forEach(t=>{delete n[t]}),n}class ft extends Error{constructor(t){super(t),this.message=`gem: ${this.message}`}}function qs(n,t){const e=n.length;if(t.length!==e)return!0;for(let i=0;i<e;i++)if(n[i]!==t[i])return!0;return!1}function En(n,t,e){let i=t;for(const s in n){const o=e(s,n[s]);i+=o?o+t:""}return i}function _c(n){return En(n,";",(t,e)=>e||e===0?`${At(t)}:${e}`:"")}function xs(n){return En(n," ",(t,e)=>e?t:"")}const fc=xs;function pc(n){return En(n,",",(t,e)=>e===!0||t===e?t:e?`${t}:${e}`:"")}const Oe=new WeakMap;function St(n){const t=Me(n,e=>{var i;Object.assign(t,e),(i=Oe.get(t))==null||i.forEach(s=>_t(s))});return Oe.set(t,new Set),t}function ht(n,t){const e=Oe.get(n);return e==null||e.add(t),()=>e==null?void 0:e.delete(t)}const mc=Object.freeze(Object.defineProperty({__proto__:null,_StoreListenerMap:Oe,connect:ht,createStore:St},Symbol.toStringTag,{value:"Module"}));h.html=(n,...t)=>Sn(n,...t.map(e=>e instanceof Element?e.outerHTML:e)),h.render=(n,t)=>t.innerHTML=n;function ai(n,t){h.html=n,h.render=t}const{assign:Bs,defineProperty:gc}=Object;gc(Symbol,"metadata",{value:Symbol.for("Symbol.metadata")});const Ks=n=>typeof n=="function"&&n(),yt=Symbol.for("gem@sheetToken"),Le=Symbol.for("gem@update"),js="gem-style-boundary",Cn="gem@render-error",vc=Le,ci=new WeakMap,Qs=new WeakMap;class $c extends CSSStyleSheet{constructor(){super(...arguments);C(this,vt);$(this,"cssText","")}get element(){return f(this,vt)||(L(this,vt,document.createElement("style")),f(this,vt).textContent=this.cssText),f(this,vt)}replaceSync(e){this.cssText=e,f(this,vt)&&(f(this,vt).textContent=e),super.replaceSync(e)}}vt=new WeakMap;class Sc{constructor(t=""){C(this,qt,"");C(this,un,"");C(this,$e,new Map);C(this,Se,new Map);L(this,un,t)}setContent(t){L(this,qt,t)}getStyle(t){var o;const e=t&&!((o=t.internals)!=null&&o.shadowRoot),i=e?t.constructor:this;if(!f(this,$e).has(i)){const a=new $c({media:f(this,un)});f(this,$e).set(i,a)}const s=f(this,$e).get(i);if(!f(this,Se).has(s)){let a=f(this,qt),c="";e&&(c=`@scope (${t.tagName}) to (:state(${js}) > *)`,a=`${c}{ ${a} }`),s.replaceSync(a),f(this,Se).set(s,c)}return s}updateStyle(){f(this,Se).forEach((t,e)=>{e.replaceSync(t?`${t}{${f(this,qt)}}`:f(this,qt))})}}qt=new WeakMap,un=new WeakMap,$e=new WeakMap,Se=new WeakMap;function Qt(n,...t){let e="",i="";const s=t.at(0);Array.isArray(n)?i=Sn(n,...t):s!==void 0?(e=n,i=s):i=n;const o=new Sc(e),a={[yt]:o};let c="";return typeof i=="string"?c=i:Object.keys(i).forEach(u=>{const d=u==="$";a[u]=d||u.includes("-")?u:`${u}-${yn()}`,c+=`${d?":where(:scope:not([hidden])),:host(:where(:not([hidden])))":`.${a[u]}`} {${i[u]}}`}),o.setContent(c),a}const li=typeof process<"u",Js=(n,t,e)=>{let i=!1;t.forEach(s=>{const o=n.get(s)||0;i||(i=e===1&&o===0||e===-1&&o===1),n.set(s,o+e)}),i&&_t(Qs.get(n),li)},yc=(n,t)=>{const e=n.getRootNode();if(!ci.has(e)){const s=new Map;ci.set(e,s),Qs.set(s,()=>{const o=e.adoptedStyleSheets.filter(a=>!s.has(a));s.forEach((a,c)=>a&&o.push(c)),e.adoptedStyleSheets=o.reverse()})}const i=ci.get(e);return Js(i,t,1),()=>Js(i,t,-1)};h.createState=void 0;function Ys(n){n==null||n.forEach(t=>{const{callback:e,getDep:i,values:s,preCallback:o}=t,a=i==null?void 0:i();(!i||!s||qs(s,a))&&(Ks(o),t.preCallback=e(a,s),t.values=a,t.initialized=!0)})}function Zs(n){return n.filter(t=>(Ks(t.preCallback),t.initialized=!1,t.values=void 0,t.fixed))}h._createTemplate=void 0;const Jt=new Us,hi=(n=performance.now())=>{if(performance.now()>n+16)return requestAnimationFrame(hi);const t=Jt.get();t&&(t(),hi(n))};Jt.addEventListener("start",()=>_t(hi));let Xs;class J extends HTMLElement{constructor(){super();C(this,lt);C(this,ye);C(this,st);C(this,ut,[]);C(this,xt,[]);C(this,$t,[]);C(this,we);C(this,ct);C(this,Ee);C(this,Ce);C(this,Bt);C(this,Yn,()=>{Ys(f(this,ut))});C(this,Zn,()=>{Ys(f(this,xt))});C(this,_n,e=>{try{L(this,Ce,!0),f(this,Zn).call(this);const i=f(this,ye)===this,s=e?e.render():i?void 0:h.html`<slot></slot>`;if(s===void 0)return;h.render(s!==null?s:i?h.html`<style>@scope{:scope{display:none !important}}</style>`:h.html`<style>:host{display:none !important}</style>`,f(this,ye))}catch(i){throw this.dispatchEvent(new CustomEvent(Cn,{bubbles:!0,composed:!0,detail:i})),i}finally{L(this,Ce,!1)}});C(this,be,()=>{const e=f(this,lt,Ds);f(this,ct)&&(e||!f(this,$t).length)&&(f(this,_n).call(this,e),_t(f(this,Yn)))});C(this,Kt,()=>{f(this,lt,ke).noBlocking?Jt.add(f(this,be)):f(this,be).call(this)});C(this,fn,()=>{const{adoptedStyleSheets:e=[]}=f(this,lt,ke),{shadowRoot:i,sheets:s}=f(this,st),o=e.map(a=>a[yt].getStyle(this));if(i)i.adoptedStyleSheets=o.concat(s);else return this.prepend(...s.map(a=>a.element)),yc(this,o)});C(this,Xn,()=>{var e;(e=f(this,ut))==null||e.forEach(i=>{const{callback:s,getDep:o,initialized:a}=i;a||(i.values=o==null?void 0:o(),i.preCallback=s(i.values),i.initialized=!0)})});C(this,ti,()=>{var e;this.willMount&&this.memo(this.willMount.bind(this),()=>[]),this.mounted&&this.effect(this.mounted.bind(this),()=>[]),this.updated&&this.effect((i,s)=>s&&this.updated.apply(this)),this.unmounted&&this.effect(()=>this.unmounted.bind(this),()=>[]),!f(this,$t).length&&this.render&&f(this,$t).push({render:this.render.bind(this),condition:(e=this.shouldUpdate)==null?void 0:e.bind(this)})});C(this,pn);C(this,Te,async()=>{var o;if(f(this,we)){L(this,we,!1),(o=f(this,Bt))==null||o.call(this),L(this,Bt,f(this,fn).call(this));return}L(this,Ee,!0),f(this,ti).call(this);const{observedStores:e,mode:i,penetrable:s}=f(this,lt,ke);!i&&f(this,$t).length&&!s&&f(this,st).states.add(js),L(this,pn,e==null?void 0:e.map(a=>ht(a,f(this,Kt)))),f(this,_n).call(this,f(this,lt,Ds)),L(this,ct,!0),L(this,Bt,f(this,fn).call(this)),_t(f(this,Xn))});$(this,"effect",(e,i)=>{const s={callback:e,getDep:i,initialized:f(this,ct),fixed:!f(this,Ee)};f(this,ct)&&(s.values=i==null?void 0:i(),s.preCallback=e(s.values)),f(this,ut).push(s)});$(this,"memo",(e,i)=>{f(this,xt).push({callback:e,getDep:i,fixed:!f(this,Ee)})});$(this,"update",()=>_t(f(this,Kt)));Xs=this;const{mode:e,serializable:i,delegatesFocus:s,slotAssignment:o,aria:a}=f(this,lt,ke),{focusable:c,...u}=a||{};L(this,ye,e?this.attachShadow({mode:e,serializable:i,delegatesFocus:s,slotAssignment:o}):this),L(this,st,this.attachInternals()),f(this,st).stateList=[],f(this,st).sheets=[],Bs(f(this,st),u);let d;f(this,ut).push({fixed:!0,getDep:()=>[this.disabled],callback:([m=!1])=>{if(d===void 0&&(d=this.hasAttribute("tabindex")),f(this,st).ariaDisabled=String(m),c&&!d&&(this.tabIndex=-Number(m)),(c||s)&&m)return oi(this,"click",r=>r.isTrusted&&r.stopImmediatePropagation(),{capture:!0})}})}[vc](){f(this,ct)&&_t(f(this,Kt))}get internals(){return f(this,st)}connectedCallback(){f(this,lt,ke).noBlocking?Jt.add(f(this,Te)):f(this,Te).call(this)}disconnectedCallback(){var e,i;if(this.isConnected){L(this,we,!0);return}Jt.delete(f(this,Te)),Jt.delete(f(this,be)),L(this,ct,!1),(e=f(this,pn))==null||e.forEach(s=>s()),L(this,ut,Zs(f(this,ut))),L(this,xt,Zs(f(this,xt))),(i=f(this,Bt))==null||i.call(this)}}ye=new WeakMap,st=new WeakMap,ut=new WeakMap,xt=new WeakMap,$t=new WeakMap,we=new WeakMap,ct=new WeakMap,Ee=new WeakMap,Ce=new WeakMap,Bt=new WeakMap,lt=new WeakSet,ke=function(){return this.constructor[Symbol.metadata]},Ds=function(){return f(this,$t).findLast(e=>!e.condition||e.condition())},Yn=new WeakMap,Zn=new WeakMap,_n=new WeakMap,be=new WeakMap,Kt=new WeakMap,fn=new WeakMap,Xn=new WeakMap,ti=new WeakMap,pn=new WeakMap,Te=new WeakMap,h.createState=e=>{const i=Xs,s=Me(e,o=>{const a=f(i,ut).at(0);if(f(i,ct)&&a&&!a.initialized)throw new ft("Do't set state sync before insert the DOM");Bs(s,o),!f(i,Ce)&&f(i,ct)&&_t(f(i,Kt))});return f(i,st).stateList.push(s),s},h._createTemplate=(e,i)=>f(e,$t).push(i);const wc=Object.freeze(Object.defineProperty({__proto__:null,GemElement:J,SheetToken:yt,UpdateToken:Le,_RenderErrorEvent:Cn,get _createTemplate(){return h._createTemplate},get createState(){return h.createState},css:Qt,get html(){return h.html},isSSR:li,get render(){return h.render},setEngine:ai},Symbol.toStringTag,{value:"Module"})),{deleteProperty:Ec,getOwnPropertyDescriptor:di,defineProperty:bn}=Reflect,{getPrototypeOf:Tn,assign:Cc,hasOwn:Pn}=Object,tr=new Fs;function wt(n,t,e){var s;const i=n.metadata;di(i,t)||bn(i,t,{value:((s=i[t])==null?void 0:s.filter(o=>o!==e))||[]}),i[t].push(e)}function kn(n,t){const{value:e}=di(n,t)||{};Ec(n,t),n[t]=e}const ui=new WeakMap,{setAttribute:er,toggleAttribute:bc,removeAttribute:nr}=Element.prototype,_i=(n,t)=>{var e;return(e=ui.get(Tn(n)))==null?void 0:e.get(t)};J.prototype.setAttribute=function(n,t){const e=_i(this,n);if(!e)return er.call(this,n,t);this[e]=t},J.prototype.removeAttribute=function(n){const t=_i(this,n);if(!t)return nr.call(this,n);this[t]=null},J.prototype.toggleAttribute=function(n,t){const e=_i(this,n);return e?this[e]=t??!this.hasAttribute(n):bc.call(this,n,t)};function Tc(){}const ir=Symbol("event handle");function fi(n,t,{attr:e,attrType:i,event:s,eventOptions:o}={}){bn(n,t,{configurable:!0,get(){const a=tr.get(this)[t];return s&&!a?(this[t]=Tc,this[t]):a},set(a){const c=this,u=tr.get(c);e&&(a=i===Boolean&&a===""?!0:i(a||""),a?er.call(this,e,i===Boolean?"":a):nr.call(this,e)),a!==u[t]&&(s?(u[t]=a!=null&&a[ir]?a:async(d,m)=>{await Promise.resolve();const r=new CustomEvent(s,{...m,...o,detail:d});c.dispatchEvent(r),await a(d,m)},u[t][ir]=!0):(u[t]=a,this[Le]()))}})}const sr=new WeakMap;function Ae(n,{metadata:t}){const e=sr.get(t);if(e)return e;let i=n;do i=Tn(i);while(i.constructor[Symbol.metadata]!==t);return sr.set(t,i),i}function pi(n,t){const e=n.name,i=At(e);return n.addInitializer(function(){const s=Ae(this,n);Pn(s,e)||(wt(n,"observedAttributes",i),fi(s,e,{attr:i,attrType:t})),kn(this,e);const o=Tn(this),a=ui.get(o)||new Map;a.set(i,e),ui.set(o,a)}),function(s){return this.getAttribute(i)??s}}function F(n,t){return pi(t,String)}function Ne(n,t){return pi(t,Boolean)}function rr(n,t){return pi(t,Number)}function x(n,t){const e=t.name;return t.addInitializer(function(){const i=Ae(this,t);Pn(i,e)||(wt(t,"observedProperties",e),fi(i,e)),kn(this,e)}),function(i){return this[e]??i}}function mi(n){return(t,e)=>{const{addInitializer:i,name:s,access:o,kind:a}=e;i(function(){const c=n&&(()=>n(this));if(a==="getter"){if(e.private)throw new ft("not support");const u=Ae(this,e),d=di(u,s).get.bind(this);this.memo(()=>{bn(this,s,{configurable:!0,value:d()})},c)}else this.memo(o.get.call(this,this).bind(this),c)})}}function pt(n){return(t,{addInitializer:e,access:i})=>{e(function(){this.effect(i.get.call(this,this).bind(this),n&&(()=>n(this)))})}}function or(){return(n,{addInitializer:t,access:e})=>{t(function(){this.effect(()=>e.get.call(this,this).bind(this),()=>[])})}}function Mn(){return mi(()=>[])}function Yt(){return pt(()=>[])}function Nt(n){return(t,{addInitializer:e,access:i})=>{e(function(){h._createTemplate(this,{render:i.get.call(this,this).bind(this),condition:n&&(()=>n(this))})})}}function ar(){return(n,{addInitializer:t,access:e})=>{t(function(){this.addEventListener(Cn,({detail:i})=>{h.render(e.get.call(this,this).apply(this,[i]),this.internals.shadowRoot||this)})})}}function Pc(n,t,e){bn(n,t,{configurable:!0,get(){const i=this,{states:s}=i.internals;return s==null?void 0:s.has(e)},set(i){const s=this,{states:o}=s.internals;i?o==null||o.add(e):o==null||o.delete(e)}})}function Re(n,t){const e=t.name,i=At(e);t.addInitializer(function(){const s=Ae(this,t);Pn(s,e)||(wt(t,"definedCSSStates",i),Pc(s,e,i)),kn(this,e)})}function cr(n,t,e,i){const s=n.name,o=At(s);if(n.static)wt(n,e,o);else{const a=Tn(t);a[s]||(a[s]=o,wt(n,e,o))}return i||o}function lr(n,t){return function(e){return cr(t,this,"definedSlots",e)}}function gi(n,t){return function(e){return cr(t,this,"definedParts",e)}}function Zt(n,t){dr(t)}function hr(n,t){dr(t,{bubbles:!0,composed:!0})}function dr(n,t){const e=n.name,i=At(e);n.addInitializer(function(){const s=Ae(this,n);Pn(s,e)||(wt(n,"definedEvents",i),fi(s,e,{event:i,eventOptions:t})),kn(this,e)})}function Ie(n){return(t,e)=>{wt(e,"adoptedStyleSheets",n)}}function He(n){return(t,e)=>{wt(e,"observedStores",n)}}function Et({mode:n="open",serializable:t=!0,delegatesFocus:e,slotAssignment:i}={}){return(s,o)=>{const a=o.metadata;Cc(a,{mode:n,serializable:t,delegatesFocus:e,slotAssignment:i})}}function vi({penetrable:n}){return(t,e)=>{const i=e.metadata;i.penetrable=n}}function ur(){return(n,t)=>{const e=t.metadata;e.noBlocking=!0}}function We(n){return(t,e)=>{const i=e.metadata;i.aria={...i.aria,...n}}}function _r(n){return(t,{addInitializer:e})=>{e(()=>{customElements.define(n,t)})}}const kc=Object.freeze(Object.defineProperty({__proto__:null,adoptedStyle:Ie,aria:We,async:ur,attribute:F,boolattribute:Ne,connectStore:He,customElement:_r,effect:pt,emitter:Zt,fallback:ar,globalemitter:hr,light:vi,memo:mi,mounted:Yt,numattribute:rr,part:gi,property:x,shadow:Et,slot:lr,state:Re,template:Nt,unmounted:or,willMount:Mn},Symbol.toStringTag,{value:"Module"}));/**
|
|
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
2
|
* @license
|
|
3
3
|
* Copyright 2017 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const
|
|
6
|
-
\f\r]`,
|
|
7
|
-
\f\r"'\`<>=]`,
|
|
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
8
|
* @license
|
|
9
9
|
* Copyright 2017 Google LLC
|
|
10
10
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
|
-
*/const el={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Lr=n=>(...t)=>({_$litDirective$:n,values:t});class nl{constructor(){$(this,"__part");$(this,"__attributeIndex");$(this,"__directive");$(this,"_$parent");$(this,"_$disconnectableChildren")}get _$isConnected(){return this._$parent._$isConnected}_$initialize(t,e,i){this.__part=t,this._$parent=e,this.__attributeIndex=i}_$resolve(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}const Ar=()=>document.createComment(""),Ue=(n,t,e)=>{var o;const i=n._$startNode.parentNode,s=t===void 0?n._$endNode:t._$startNode;if(e===void 0){const a=i.insertBefore(Ar(),s),c=i.insertBefore(Ar(),s);e=new De(a,c,n,n.options)}else{const a=e._$endNode.nextSibling,c=e._$parent,u=c!==n;if(u){(o=e._$reparentDisconnectables)==null||o.call(e,n),e._$parent=n;let d;e._$notifyConnectionChanged!==void 0&&(d=n._$isConnected)!==c._$isConnected&&e._$notifyConnectionChanged(d)}if(a!==s||u){let d=e._$startNode;for(;d!==a;){const m=d.nextSibling;i.insertBefore(d,s),d=m}}}return e},Wt=(n,t,e=n)=>(n._$setValue(t,e),n),il={},sl=(n,t=il)=>n._$committedValue=t,rl=n=>n._$committedValue,Pi=n=>{var i;(i=n._$notifyConnectionChanged)==null||i.call(n,!1,!0);let t=n._$startNode;const e=n._$endNode.nextSibling;for(;t!==e;){const s=t.nextSibling;t.remove(),t=s}},Nr=(n,t,e)=>{const i=new Map;for(let s=t;s<=e;s++)i.set(n[s],s);return i};class ol extends nl{constructor(e){super();$(this,"_itemKeys");if(e.type!==el.CHILD)throw new Error("repeat() can only be used in text expressions")}_getValuesAndKeys(e,i,s){let o;s===void 0?s=i:i!==void 0&&(o=i);const a=[],c=[];let u=0;for(const d of e)a[u]=o?o(d,u):u,c[u]=s(d,u),u++;return{values:c,keys:a}}render(e,i,s){return this._getValuesAndKeys(e,i,s).values}update(e,[i,s,o]){const a=rl(e),{values:c,keys:u}=this._getValuesAndKeys(i,s,o);if(!Array.isArray(a))return this._itemKeys=u,c;const d=this._itemKeys??(this._itemKeys=[]),m=[];let r,g,l=0,v=a.length-1,S=0,E=c.length-1;for(;l<=v&&S<=E;)if(a[l]===null)l++;else if(a[v]===null)v--;else if(d[l]===u[S])m[S]=Wt(a[l],c[S]),l++,S++;else if(d[v]===u[E])m[E]=Wt(a[v],c[E]),v--,E--;else if(d[l]===u[E])m[E]=Wt(a[l],c[E]),Ue(e,m[E+1],a[l]),l++,E--;else if(d[v]===u[S])m[S]=Wt(a[v],c[S]),Ue(e,a[l],a[v]),v--,S++;else if(r===void 0&&(r=Nr(u,S,E),g=Nr(d,l,v)),!r.has(d[l]))Pi(a[l]),l++;else if(!r.has(d[v]))Pi(a[v]),v--;else{const k=g.get(u[S]),p=k!==void 0?a[k]:null;if(p===null){const T=Ue(e,a[l]);Wt(T,c[S]),m[S]=T}else m[S]=Wt(p,c[S]),Ue(e,a[l],p),a[k]=null;S++}for(;S<=E;){const k=Ue(e,m[E+1]);Wt(k,c[S]),m[S++]=k}for(;l<=v;){const k=a[l++];k!==null&&Pi(k)}return this._itemKeys=u,sl(e,m),bi}}const al=Lr(ol);ai(Dc,Xc),globalThis.__GEM_DEVTOOLS__HOOK__&&!globalThis.__GEM_DEVTOOLS__HOOK__.GemElement&&Object.assign(globalThis.__GEM_DEVTOOLS__HOOK__,{...wc,...kc,...mc,...tl});const X=globalThis.history,Rr=X.pushState.bind(X),Ir=X.replaceState.bind(X);let cl=0;const ki=()=>`${performance.now()}-${++cl}`,A=St({$hasCloseHandle:!1,$hasOpenHandle:!1,$hasShouldCloseHandle:!1,$key:""}),K=new Map;function Hr(n){const{$key:t,$hasCloseHandle:e,$hasOpenHandle:i,$hasShouldCloseHandle:s}=n||{};if(A.$key!==t){if(t)throw new ft("`$key` is not allowed");if(e)throw new ft("`$hasCloseHandle` is not allowed");if(i)throw new ft("`$hasOpenHandle` is not allowed");if(s)throw new ft("`$hasShouldCloseHandle` is not allowed")}}function Wr(n){return tt.basePath?tt.basePath+n:n}function Mi(n){return n===tt.basePath?"/":n.replace(new RegExp(`^${tt.basePath}/`),"/")}function Oi(){tt.dispatchEvent(new CustomEvent("beforechange"))}function Rn(n){const t=K.get(A.$key)||{path:Mi(location.pathname),query:new jt},e=n.path?ri(t.path,n.path):Mi(location.pathname),i=new jt(n.query??(n.path?"":location.search)),s=String(i)!==String(t.query),o=s?i:t.query,a=e!==t.path||s,c=n.title||(a?"":document.title),u=n.close||n.data||n.open||n.shouldClose,d=decodeURIComponent(n.hash??(!a&&u?location.hash:""));return{...n,title:c,path:e,query:o,hash:d}}function Gr(n,t){Hr(n.data);const e=Rn(n),{title:i,path:s,query:o,hash:a,close:c,open:u,shouldClose:d,data:m}=e,r={$hasCloseHandle:!!c,$hasOpenHandle:!!u,$hasShouldCloseHandle:!!d,$key:ki(),$title:i,...m};K.set(r.$key,e),Oi(),wn(A),A(r);const g=Wr(s)+new jt(o)+a,l=decodeURIComponent(location.hash);t(r,i,g),l!==a&&dispatchEvent(new CustomEvent("hashchange"))}function zr(n,t,e,i){Hr(n);const s={$key:ki(),$title:t,...n||{}},{pathname:o,search:a,hash:c}=new URL(e,location.origin+location.pathname),u=Rn({path:o,query:new jt(a),hash:c,title:t,data:n});K.set(s.$key,u),Oi(),wn(A),A(s);const d=Wr(o)+u.query+c,m=location.hash;i(s,t,d),m!==c&&dispatchEvent(new CustomEvent("hashchange"))}const Li=St({basePath:""});class ll extends EventTarget{get store(){return A}get currentKey(){return A.$key}get basePath(){return Li.basePath}set basePath(t){Li({basePath:t}),Object.assign(K.get(A.$key),{path:Mi(location.pathname)})}getParams(){return K.get(A.$key)}updateParams(t){Object.assign(K.get(A.$key),t),A()}push(t){Gr(t,Rr)}replace(t){Gr(t,Ir)}pushIgnoreCloseHandle(t){var e,i;A.$hasCloseHandle?((i=(e=K.get(A.$key))==null?void 0:e.close)==null||i.call(e),this.replace(t)):this.push(t)}forward(){X.forward()}back(){X.back()}}const tt=new ll,Fe=St({defaultTitle:document.title,url:"",title:""}),hl={history:tt,titleStore:Fe,basePathStore:Li};if(!globalThis._GEMHISTORY){if(globalThis._GEMHISTORY=hl,X.pushState=(t,e,i)=>{zr(t,e,i,Rr)},X.replaceState=(t,e,i)=>{zr(t,e,i,Ir)},addEventListener("hashchange",({isTrusted:t})=>{t&&tt.replace({hash:location.hash})}),X.state)if(X.state.$hasCloseHandle){A(X.state);const t=Rn({title:document.title});K.set(A.$key,t),tt.back()}else{const t=Rn({title:document.title,hash:location.hash});A({$key:ki(),...X.state||{}}),K.set(A.$key,t)}else{const{protocol:t,pathname:e,search:i,hash:s}=location;t.startsWith("http")&&tt.replace({path:e,query:i,hash:s})}ht(Fe,()=>{const t=K.get(A.$key);t&&(t.title=Fe.title)}),ht(A,()=>{const{title:t}=tt.getParams();t!==Fe.title&&Fe({title:t})});let n=!1;addEventListener("popstate",t=>{var o,a;const e=t.state;if(!(e!=null&&e.$key))return;if(n){n=!1;return}if(!K.has(e.$key)){const{pathname:c,search:u,hash:d}=location;K.set(e.$key,{path:c,query:new jt(u),hash:decodeURIComponent(d),title:e.$title,data:e})}const i=A;if(parseFloat(e.$key)>parseFloat(i.$key)&&e.$hasOpenHandle)(a=(o=K.get(e.$key))==null?void 0:o.open)==null||a.call(o);else if(i.$hasCloseHandle){const c=K.get(i.$key),u=c==null?void 0:c.close,d=c==null?void 0:c.shouldClose;if(d&&!d()){n=!0,tt.forward();return}else u?u():e.$hasCloseHandle&&(n=!0,tt.back())}Oi(),wn(A),A(e)})}const{history:N,titleStore:bt,basePathStore:Vr}=globalThis._GEMHISTORY;var dl=Object.create,Ai=Object.defineProperty,ul=Object.getOwnPropertyDescriptor,Dr=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n),ne=n=>{throw TypeError(n)},Ur=(n,t,e)=>t in n?Ai(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Fr=(n,t)=>Ai(n,"name",{value:t,configurable:!0}),_l=n=>[,,,dl((n==null?void 0:n[Dr("metadata")])??null)],qr=["class","method","getter","setter","accessor","field","value","get","set"],qe=n=>n!==void 0&&typeof n!="function"?ne("Function expected"):n,fl=(n,t,e,i,s)=>({kind:qr[n],name:t,metadata:i,addInitializer:o=>e._?ne("Already initialized"):s.push(qe(o||null))}),pl=(n,t)=>Ur(t,Dr("metadata"),n[3]),Gt=(n,t,e,i)=>{for(var s=0,o=n[t>>1],a=o&&o.length;s<a;s++)t&1?o[s].call(e):i=o[s].call(e,i);return i},In=(n,t,e,i,s,o)=>{var a,c,u,d,m,r=t&7,g=!!(t&8),l=!!(t&16),v=r>3?n.length+1:r?g?1:2:0,S=qr[r+5],E=r>3&&(n[v-1]=[]),k=n[v]||(n[v]=[]),p=r&&(!l&&!g&&(s=s.prototype),r<5&&(r>3||!l)&&ul(r<4?s:{get[e](){return rt(this,o)},set[e](_){return Be(this,o,_)}},e));r?l&&r<4&&Fr(o,(r>2?"set ":r>1?"get ":"")+e):Fr(s,e);for(var T=i.length-1;T>=0;T--)d=fl(r,e,u={},n[3],k),r&&(d.static=g,d.private=l,m=d.access={has:l?_=>ml(s,_):_=>e in _},r^3&&(m.get=l?_=>(r^1?rt:gl)(_,s,r^4?o:p.get):_=>_[e]),r>2&&(m.set=l?(_,M)=>Be(_,s,M,r^4?o:p.set):(_,M)=>_[e]=M)),c=(0,i[T])(r?r<4?l?o:p[S]:r>4?void 0:{get:p.get,set:p.set}:s,d),u._=1,r^4||c===void 0?qe(c)&&(r>4?E.unshift(c):r?l?o=c:p[S]=c:s=c):typeof c!="object"||c===null?ne("Object expected"):(qe(a=c.get)&&(p.get=a),qe(a=c.set)&&(p.set=a),qe(a=c.init)&&E.unshift(a));return r||pl(n,s),p&&Ai(s,e,p),l?r^4?o:p:s},xe=(n,t,e)=>Ur(n,typeof t!="symbol"?t+"":t,e),Ni=(n,t,e)=>t.has(n)||ne("Cannot "+e),ml=(n,t)=>Object(t)!==t?ne('Cannot use the "in" operator on this value'):n.has(t),rt=(n,t,e)=>(Ni(n,t,"read from private field"),e?e.call(n):t.get(n)),ie=(n,t,e)=>t.has(n)?ne("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),Be=(n,t,e,i)=>(Ni(n,t,"write to private field"),i?i.call(n,e):t.set(n,e),e),gl=(n,t,e)=>(Ni(n,t,"access private method"),e),xr,Br,Kr,Ri,jr,et,Ke,je,Qe,Ii,Hn,Hi;const Wi=Symbol();jr=[He(N.store),We({role:"dialog",ariaModal:"true"})];class se extends(Ri=J,Kr=[F],Br=[Re],xr=[Mn()],Ri){constructor(){super(...arguments),xe(this,"label",Gt(et,8,this)),Gt(et,11,this),xe(this,"opened",Gt(et,12,this)),Gt(et,15,this),ie(this,Ke),ie(this,je),ie(this,Qe,[]),ie(this,Ii,()=>{var t;this.inert=!0,rt(this,Qe).forEach(e=>e.inert=!1),rt(this,Ke)?rt(this,Ke).before(this):rt(this,je)&&((t=rt(this,je))==null||t.appendChild(this)),this.dispatchEvent(new CustomEvent("close")),this.opened=!1}),ie(this,Hn,()=>{this.hidden=!1,this.inert=!1,Be(this,Ke,this.nextSibling),Be(this,je,this.parentElement||this.getRootNode()),Be(this,Qe,[...document.body.children].filter(t=>!t.inert)),rt(this,Qe).forEach(t=>t.inert=!0),document.body.append(this),this.dispatchEvent(new CustomEvent("open")),this.opened=!0}),ie(this,Hi,Gt(et,16,this,()=>this.inert=!0)),Gt(et,19,this),xe(this,"open",()=>{if(!this.opened)return rt(this,Hn).call(this),N.push({title:this.label,open:rt(this,Hn),close:rt(this,Ii),shouldClose:this.shouldClose}),Wi}),xe(this,"close",()=>(N.back(),Wi)),xe(this,"forceClose",()=>(this.opened=!1,setTimeout(this.close,100),Wi))}shouldClose(){return!0}}et=_l(Ri),Ke=new WeakMap,je=new WeakMap,Qe=new WeakMap,Ii=new WeakMap,Hn=new WeakMap,Hi=new WeakMap,In(et,5,"label",Kr,se),In(et,5,"opened",Br,se),In(et,21,"#init",xr,Hi),se=In(et,0,"GemDialogBaseElement",jr,se),Gt(et,1,se);var vl=Object.create,Gi=Object.defineProperty,$l=Object.getOwnPropertyDescriptor,Qr=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n),re=n=>{throw TypeError(n)},Jr=(n,t,e)=>t in n?Gi(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Yr=(n,t)=>Gi(n,"name",{value:t,configurable:!0}),Sl=n=>[,,,vl((n==null?void 0:n[Qr("metadata")])??null)],Zr=["class","method","getter","setter","accessor","field","value","get","set"],Je=n=>n!==void 0&&typeof n!="function"?re("Function expected"):n,yl=(n,t,e,i,s)=>({kind:Zr[n],name:t,metadata:i,addInitializer:o=>e._?re("Already initialized"):s.push(Je(o||null))}),wl=(n,t)=>Jr(t,Qr("metadata"),n[3]),Ye=(n,t,e,i)=>{for(var s=0,o=n[t>>1],a=o&&o.length;s<a;s++)t&1?o[s].call(e):i=o[s].call(e,i);return i},zi=(n,t,e,i,s,o)=>{var a,c,u,d,m,r=t&7,g=!!(t&8),l=!!(t&16),v=r>3?n.length+1:r?g?1:2:0,S=Zr[r+5],E=r>3&&(n[v-1]=[]),k=n[v]||(n[v]=[]),p=r&&(!l&&!g&&(s=s.prototype),r<5&&(r>3||!l)&&$l(r<4?s:{get[e](){return Xr(this,o)},set[e](_){return eo(this,o,_)}},e));r?l&&r<4&&Yr(o,(r>2?"set ":r>1?"get ":"")+e):Yr(s,e);for(var T=i.length-1;T>=0;T--)d=yl(r,e,u={},n[3],k),r&&(d.static=g,d.private=l,m=d.access={has:l?_=>El(s,_):_=>e in _},r^3&&(m.get=l?_=>(r^1?Xr:Cl)(_,s,r^4?o:p.get):_=>_[e]),r>2&&(m.set=l?(_,M)=>eo(_,s,M,r^4?o:p.set):(_,M)=>_[e]=M)),c=(0,i[T])(r?r<4?l?o:p[S]:r>4?void 0:{get:p.get,set:p.set}:s,d),u._=1,r^4||c===void 0?Je(c)&&(r>4?E.unshift(c):r?l?o=c:p[S]=c:s=c):typeof c!="object"||c===null?re("Object expected"):(Je(a=c.get)&&(p.get=a),Je(a=c.set)&&(p.set=a),Je(a=c.init)&&E.unshift(a));return r||wl(n,s),p&&Gi(s,e,p),l?r^4?o:p:s},Wn=(n,t,e)=>Jr(n,typeof t!="symbol"?t+"":t,e),Vi=(n,t,e)=>t.has(n)||re("Cannot "+e),El=(n,t)=>Object(t)!==t?re('Cannot use the "in" operator on this value'):n.has(t),Xr=(n,t,e)=>(Vi(n,t,"read from private field"),e?e.call(n):t.get(n)),to=(n,t,e)=>t.has(n)?re("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),eo=(n,t,e,i)=>(Vi(n,t,"write to private field"),i?i.call(n,e):t.set(n,e),e),Cl=(n,t,e)=>(Vi(n,t,"access private method"),e);const Gn=Symbol("open mark");function bl(n){var t,e,i,s,o,a,c;const u=Symbol();s=[Et(),We({role:"alertdialog",ariaModal:"true"})];let d=class B extends(i=J,e=[Yt()],t=[Yt()],i){constructor(){super(...arguments),Wn(this,"label",""),to(this,a,Ye(o,8,this,()=>ht(N.store,this.update))),Ye(o,11,this),to(this,c,Ye(o,12,this,()=>ht(B.store,this.update))),Ye(o,15,this)}static get isOpen(){return B.store[Gn]}static open(g){const l=new B;B.instance=l,B.inertStore=[...document.body.children].filter(S=>!S.inert),B.inertStore.forEach(S=>S.inert=!0),document.body.append(l);const v=()=>B.store({[Gn]:!0,...g});return setTimeout(()=>{v(),N.push({title:l.label,open:v,close:B.closeHandle.bind(B),shouldClose:B.shouldClose.bind(B)})},100),u}static close(){return N.back(),u}static closeHandle(){var g;return B.inertStore.forEach(l=>l.inert=!1),(g=B.instance)==null||g.remove(),B.store({[Gn]:!1,...n}),u}static shouldClose(){return!0}};return o=Sl(i),a=new WeakMap,c=new WeakMap,zi(o,21,"#connectHistory",e,a),zi(o,21,"#connectStore",t,c),d=zi(o,0,"ModalElement",s,d),Wn(d,"inertStore",[]),Wn(d,"instance",null),Wn(d,"store",St({[Gn]:!1,...n})),Ye(o,1,d),d}var Tl=Object.create,Di=Object.defineProperty,Pl=Object.getOwnPropertyDescriptor,no=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n),oe=n=>{throw TypeError(n)},io=(n,t,e)=>t in n?Di(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,so=(n,t)=>Di(n,"name",{value:t,configurable:!0}),ro=n=>[,,,Tl((n==null?void 0:n[no("metadata")])??null)],oo=["class","method","getter","setter","accessor","field","value","get","set"],Ze=n=>n!==void 0&&typeof n!="function"?oe("Function expected"):n,kl=(n,t,e,i,s)=>({kind:oo[n],name:t,metadata:i,addInitializer:o=>e._?oe("Already initialized"):s.push(Ze(o||null))}),Ml=(n,t)=>io(t,no("metadata"),n[3]),P=(n,t,e,i)=>{for(var s=0,o=n[t>>1],a=o&&o.length;s<a;s++)t&1?o[s].call(e):i=o[s].call(e,i);return i},D=(n,t,e,i,s,o)=>{var a,c,u,d,m,r=t&7,g=!!(t&8),l=!!(t&16),v=r>3?n.length+1:r?g?1:2:0,S=oo[r+5],E=r>3&&(n[v-1]=[]),k=n[v]||(n[v]=[]),p=r&&(!l&&!g&&(s=s.prototype),r<5&&(r>3||!l)&&Pl(r<4?s:{get[e](){return U(this,o)},set[e](_){return zn(this,o,_)}},e));r?l&&r<4&&so(o,(r>2?"set ":r>1?"get ":"")+e):so(s,e);for(var T=i.length-1;T>=0;T--)d=kl(r,e,u={},n[3],k),r&&(d.static=g,d.private=l,m=d.access={has:l?_=>Ol(s,_):_=>e in _},r^3&&(m.get=l?_=>(r^1?U:Ll)(_,s,r^4?o:p.get):_=>_[e]),r>2&&(m.set=l?(_,M)=>zn(_,s,M,r^4?o:p.set):(_,M)=>_[e]=M)),c=(0,i[T])(r?r<4?l?o:p[S]:r>4?void 0:{get:p.get,set:p.set}:s,d),u._=1,r^4||c===void 0?Ze(c)&&(r>4?E.unshift(c):r?l?o=c:p[S]=c:s=c):typeof c!="object"||c===null?oe("Object expected"):(Ze(a=c.get)&&(p.get=a),Ze(a=c.set)&&(p.set=a),Ze(a=c.init)&&E.unshift(a));return r||Ml(n,s),p&&Di(s,e,p),l?r^4?o:p:s},q=(n,t,e)=>io(n,typeof t!="symbol"?t+"":t,e),Ui=(n,t,e)=>t.has(n)||oe("Cannot "+e),Ol=(n,t)=>Object(t)!==t?oe('Cannot use the "in" operator on this value'):n.has(t),U=(n,t,e)=>(Ui(n,t,"read from private field"),e?e.call(n):t.get(n)),ot=(n,t,e)=>t.has(n)?oe("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),zn=(n,t,e,i)=>(Ui(n,t,"write to private field"),i?i.call(n,e):t.set(n,e),e),Ll=(n,t,e)=>(Ui(n,t,"access private method"),e),ao,co,lo,ho,uo,_o,fo,po,mo,go,vo,$o,So,yo,wo,Fi,Eo,y,zt,ae,Xe,Vn,qi,tn,Dn,xi,Bi,Ki,ji,Qi,Co,Ji,bo;const To="_";class Al extends RegExp{constructor(t){let e=0;super(`^${t.replace(/((:[^/$]+)|(\*))/g,(i,s)=>s==="*"?`(?<${To}${e++}>.*)`:`(?<${s.slice(1)}>[^/]+)`)}$`)}}function Yi(n,t){if(globalThis.URLPattern){const o=new URLPattern({pathname:n}),a=o.exec({pathname:t})||o.exec({pathname:`${t}/`});return a?a.pathname.groups:null}const e=new Al(n),i=t.match(e)||`${t}/`.match(e);if(!i)return null;const s={};return i.groups&&Object.entries(i.groups).forEach(([o,a])=>{s[o.startsWith(To)?o.slice(1):o]=a}),s}function Un(n,t){let e=0,i=n.pattern.replaceAll("*",()=>`:${e++}`);const s=t==null?void 0:t.params;return s&&Object.keys(s).forEach(o=>{i=i.replace(new RegExp(`:${o}`,"g"),s[o])}),i}function Po(n,t){return{path:Un(n,t),...t}}const Zi=h.html``,ko=new Map;Eo=[vi({penetrable:!0})];class H extends(Fi=J,wo=[Ne],yo=[x],So=[x],$o=[x],vo=[Zt],go=[Zt],mo=[Zt],po=[Zt],fo=[x],_o=[x],uo=[x],ho=[pt(t=>[t.scrollContainer])],lo=[pt(t=>[t.scrollContainer])],co=[pt(t=>{var e;return U(e=t,Ki).call(e)})],ao=[Nt(t=>!t.inert)],Fi){constructor(){super(...arguments),ot(this,zt),q(this,"transition",P(y,8,this)),P(y,11,this),q(this,"routes",P(y,12,this)),P(y,15,this),q(this,"locationStore",P(y,16,this)),P(y,19,this),q(this,"key",P(y,20,this)),P(y,23,this),q(this,"loading",P(y,24,this)),P(y,27,this),q(this,"beforeroutechange",P(y,28,this)),P(y,31,this),q(this,"routechange",P(y,32,this)),P(y,35,this),q(this,"error",P(y,36,this)),P(y,39,this),q(this,"scrollContainer",P(y,40,this)),P(y,43,this),q(this,"scrollIgnoreHash",P(y,44,this)),P(y,47,this),q(this,"trigger",P(y,48,this,N)),P(y,51,this),q(this,"currentRoute"),q(this,"currentParams",{}),ot(this,Xe,h.createState({content:Zi})),ot(this,Vn,()=>{if(!this.locationStore)return;const{path:t,query:e,hash:i,data:s}=N.getParams();this.locationStore({path:t,params:this.currentParams,query:e,hash:i,data:s})}),ot(this,qi,()=>{if(!U(this,zt,ae))return;const t=ko.get(N.currentKey);t?U(this,zt,ae).scroll(0,t):(this.scrollIgnoreHash||!N.getParams().hash)&&U(this,zt,ae).scroll(0,0)}),ot(this,tn),ot(this,Dn,(t,e,i)=>{this.beforeroutechange(t),zn(this,tn,void 0),this.currentRoute=t,this.currentParams=e;const s=async()=>{U(this,Xe).call(this,{content:i}),U(this,Vn).call(this),await Promise.resolve(),U(this,qi).call(this),this.routechange(this.currentRoute)};this.transition&&"startViewTransition"in document?document.startViewTransition(()=>s()):s()}),ot(this,xi,P(y,52,this,()=>{if(U(this,zt,ae))return oi(N,"beforechange",()=>ko.set(N.currentKey,U(this,zt,ae).scrollTop))})),P(y,55,this),ot(this,Bi,P(y,56,this,()=>this.trigger.store&&ht(this.trigger.store,()=>U(this,Xe).call(this)))),P(y,59,this),ot(this,Ki,()=>{const{path:t,query:e,hash:i}=this.trigger.getParams();return[this.key,t,e,i]}),ot(this,ji,P(y,60,this,([t,e],i)=>{if(i&&t===i[0]&&e===i[1]){U(this,Vn).call(this);return}this.update()})),P(y,63,this),ot(this,Qi,P(y,64,this,()=>{const{content:t}=U(this,Xe);if(t!==void 0)return this.shadowRoot?t===Zi?h.html`<slot></slot>`:t:t===Zi?void 0:h.html`${t}`})),P(y,67,this),q(this,"update",()=>{const{path:t,hash:e,query:i}=this.trigger.getParams(),{route:s,params:o={}}=ce.findRoute(this.routes,t),{redirect:a,content:c,getContent:u}=s||{};if(a){this.trigger.replace({path:Un({pattern:a},{params:o}),query:i,hash:e});return}this.trigger===N&&(location.href!==bt.url||s!=null&&s.title)&&bt({url:location.href,title:s==null?void 0:s.title});const d=c||(u==null?void 0:u(o,this.shadowRoot||this));if(this.loading(s),d instanceof Promise){zn(this,tn,d);const m=()=>U(this,tn)===d;d.then(r=>{m()&&U(this,Dn).call(this,s,o,r)}).catch(r=>{m()&&this.error(r)});return}U(this,Dn).call(this,s,o,d)})}}y=ro(Fi),zt=new WeakSet,ae=function(){return typeof this.scrollContainer=="function"?this.scrollContainer():this.scrollContainer},Xe=new WeakMap,Vn=new WeakMap,qi=new WeakMap,tn=new WeakMap,Dn=new WeakMap,xi=new WeakMap,Bi=new WeakMap,Ki=new WeakMap,ji=new WeakMap,Qi=new WeakMap,D(y,5,"transition",wo,H),D(y,5,"routes",yo,H),D(y,5,"locationStore",So,H),D(y,5,"key",$o,H),D(y,5,"loading",vo,H),D(y,5,"beforeroutechange",go,H),D(y,5,"routechange",mo,H),D(y,5,"error",po,H),D(y,5,"scrollContainer",fo,H),D(y,5,"scrollIgnoreHash",_o,H),D(y,5,"trigger",uo,H),D(y,21,"#rememberScrollPosition",ho,xi),D(y,21,"#connectTriggerStore",lo,Bi),D(y,21,"#updateContent",co,ji),D(y,21,"#content",ao,Qi),H=D(y,0,"GemLightRouteElement",Eo,H),q(H,"createLocationStore",()=>{const{path:n,query:t,hash:e,data:i}=N.getParams();return St({path:n,query:t,hash:e,data:i,params:{}})}),q(H,"findRoute",(n=[],t)=>{let e=null,i;Array.isArray(n)?i=n:i=Object.values(n);for(const s of i)if(s.pattern==="*")e=s;else{const o=Yi(s.pattern,t);if(o)return{route:s,params:o}}return{route:e}}),P(y,1,H);const Nl=Qt`
|
|
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
12
|
:host(:where(:not([hidden]))),
|
|
13
13
|
:not(:defined) {
|
|
14
14
|
display: contents;
|
|
15
15
|
}
|
|
16
|
-
`;
|
|
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
17
|
:host {
|
|
18
18
|
/* link default style */
|
|
19
19
|
cursor: pointer;
|
|
@@ -27,14 +27,11 @@
|
|
|
27
27
|
a:visited {
|
|
28
28
|
color: unset;
|
|
29
29
|
}
|
|
30
|
-
`;Qo=[He(Vr),Ie(Vl),Et(),We({focusable:!0})];class z extends(es=J,jo=[F],Ko=[F],Bo=[F],xo=[F],qo=[F],Fo=[F],Uo=[Ne],Do=[x],Vo=[x],zo=[x],Go=[x],Wo=[gi],Ho=[Yt()],Io=[Nt()],es){constructor(){super(...arguments),b(w,5,this),he(this,Tt),j(this,"href",b(w,8,this)),b(w,11,this),j(this,"target",b(w,12,this)),b(w,15,this),j(this,"path",b(w,16,this)),b(w,19,this),j(this,"query",b(w,20,this)),b(w,23,this),j(this,"hash",b(w,24,this)),b(w,27,this),j(this,"hint",b(w,28,this)),b(w,31,this),j(this,"preload",b(w,32,this)),b(w,35,this),j(this,"route",b(w,36,this)),b(w,39,this),j(this,"options",b(w,40,this)),b(w,43,this),j(this,"routeOptions",b(w,44,this)),b(w,47,this),j(this,"prepare",b(w,48,this)),b(w,51,this),j(this,"link",b(w,52,this)),b(w,55,this),he(this,ns,async t=>{var a;t.preventDefault();const e=this._getLocationString();if(!e)return;if(ea(e))switch(this.target){case"_self":window.location.href=e;return;case"_parent":window.parent.location.href=e;return;case"_top":window.top.location.href=e;return;default:window.open(e);return}const{path:i,query:s,hash:o}=N.getParams();if(i+s+o!==e)if(await((a=this.prepare)==null?void 0:a.call(this)),this.route)N.pushIgnoreCloseHandle(Po(this.route,dt(this,Tt,nn)));else if(this.href){const c=new URL(e,location.origin);N.pushIgnoreCloseHandle({path:c.pathname,query:c.search,hash:c.hash})}else N.pushIgnoreCloseHandle({path:this.path,query:this.query,hash:this.hash})}),he(this,is,()=>{const t=this._getLocationString();return ea(t)?t:new URL(N.basePath+t,location.origin).toString()}),he(this,ss,()=>{var t,e,i;(t=this.route)==null||t.content,(i=(e=this.route)==null?void 0:e.getContent)==null||i.call(e,{},this.shadowRoot)}),he(this,os,b(w,56,this,()=>{const t=dt(this,Tt,Jo)==="off"?null:dt(this,is).call(this);return h.html`<a part=${this.link} href=${t} tabindex="-1"><slot></slot></a>`})),b(w,59,this)}_getLocationString(){var t,e;if(this.route){const i=((t=dt(this,Tt,nn))==null?void 0:t.query)||"",s=((e=dt(this,Tt,nn))==null?void 0:e.hash)||"";return Un(this.route,dt(this,Tt,nn))+i+s}else{const i=this.href||this.path+this.query+this.hash,{path:s,query:o}=N.getParams();return i.startsWith("#")?`${s}${o}${i}`:i.startsWith("?")?`${s}${i}`:i.startsWith(".")?ri(s,i):i}}}w=Ao(es),Tt=new WeakSet,nn=function(){return this.routeOptions||this.options},Jo=function(){return this.hint||"on"},ns=new WeakMap,is=new WeakMap,ss=new WeakMap,rs=function(){this.addEventListener("click",dt(this,ns)),this.addEventListener("pointerenter",dt(this,ss))},os=new WeakMap,rs=W(w,17,"#init",Ho,Tt,rs),W(w,5,"href",jo,z),W(w,5,"target",Ko,z),W(w,5,"path",Bo,z),W(w,5,"query",xo,z),W(w,5,"hash",qo,z),W(w,5,"hint",Fo,z),W(w,5,"preload",Uo,z),W(w,5,"route",Do,z),W(w,5,"options",Vo,z),W(w,5,"routeOptions",zo,z),W(w,5,"prepare",Go,z),W(w,5,"link",Wo,z),W(w,21,"#content",Io,os),z=W(w,0,"GemLinkElement",Qo,z),b(w,1,z),ta=[He(N.store)];class Vt extends(as=z,Xo=[F],Zo=[Re],Yo=[pt()],as){constructor(){super(...arguments),j(this,"pattern",b(nt,8,this)),b(nt,11,this),j(this,"active",b(nt,12,this)),b(nt,15,this),he(this,cs,b(nt,16,this,()=>{const{path:t,query:e,hash:i}=N.getParams(),s=this.pattern&&Yi(this.pattern,t);this.active=!!s||t+e+i===this._getLocationString()})),b(nt,19,this)}}nt=Ao(as),cs=new WeakMap,W(nt,5,"pattern",Xo,Vt),W(nt,5,"active",Zo,Vt),W(nt,21,"#updateState",Yo,cs),Vt=W(nt,0,"GemActiveLinkElement",ta,Vt),b(nt,1,Vt),customElements.define("gem-link",z),customElements.define("gem-active-link",Vt);var Dl=Object.create,ls=Object.defineProperty,Ul=Object.getOwnPropertyDescriptor,na=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n),de=n=>{throw TypeError(n)},ia=(n,t,e)=>t in n?ls(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,sa=(n,t)=>ls(n,"name",{value:t,configurable:!0}),Fl=n=>[,,,Dl((n==null?void 0:n[na("metadata")])??null)],ra=["class","method","getter","setter","accessor","field","value","get","set"],sn=n=>n!==void 0&&typeof n!="function"?de("Function expected"):n,ql=(n,t,e,i,s)=>({kind:ra[n],name:t,metadata:i,addInitializer:o=>e._?de("Already initialized"):s.push(sn(o||null))}),oa=(n,t)=>ia(t,na("metadata"),n[3]),Pt=(n,t,e,i)=>{for(var s=0,o=n[t>>1],a=o&&o.length;s<a;s++)t&1?o[s].call(e):i=o[s].call(e,i);return i},Fn=(n,t,e,i,s,o)=>{var a,c,u,d,m,r=t&7,g=!!(t&8),l=!!(t&16),v=r>3?n.length+1:r?g?1:2:0,S=ra[r+5],E=r>3&&(n[v-1]=[]),k=n[v]||(n[v]=[]),p=r&&(!l&&!g&&(s=s.prototype),r<5&&(r>3||!l)&&Ul(r<4?s:{get[e](){return kt(this,o)},set[e](_){return ds(this,o,_)}},e));r?l&&r<4&&sa(o,(r>2?"set ":r>1?"get ":"")+e):sa(s,e);for(var T=i.length-1;T>=0;T--)d=ql(r,e,u={},n[3],k),r&&(d.static=g,d.private=l,m=d.access={has:l?_=>xl(s,_):_=>e in _},r^3&&(m.get=l?_=>(r^1?kt:Bl)(_,s,r^4?o:p.get):_=>_[e]),r>2&&(m.set=l?(_,M)=>ds(_,s,M,r^4?o:p.set):(_,M)=>_[e]=M)),c=(0,i[T])(r?r<4?l?o:p[S]:r>4?void 0:{get:p.get,set:p.set}:s,d),u._=1,r^4||c===void 0?sn(c)&&(r>4?E.unshift(c):r?l?o=c:p[S]=c:s=c):typeof c!="object"||c===null?de("Object expected"):(sn(a=c.get)&&(p.get=a),sn(a=c.set)&&(p.set=a),sn(a=c.init)&&E.unshift(a));return r||oa(n,s),p&&ls(s,e,p),l?r^4?o:p:s},aa=(n,t,e)=>ia(n,typeof t!="symbol"?t+"":t,e),hs=(n,t,e)=>t.has(n)||de("Cannot "+e),xl=(n,t)=>Object(t)!==t?de('Cannot use the "in" operator on this value'):n.has(t),kt=(n,t,e)=>(hs(n,t,"read from private field"),e?e.call(n):t.get(n)),ue=(n,t,e)=>t.has(n)?de("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),ds=(n,t,e,i)=>(hs(n,t,"write to private field"),i?i.call(n,e):t.set(n,e),e),Bl=(n,t,e)=>(hs(n,t,"access private method"),e),ca,la,ha,da,us,Q,_s,ua,fs,qn,ps,rn,ms;const Kl="gem-reflect-start",_a="gem-reflect-end",fa=n=>new Comment(n),jl=n=>{const t=[];let e=n;for(;e&&(t.push(e),e.nodeValue!==_a);)e=e.nextSibling;return t};class on extends(us=J,da=[F],ha=[x],la=[Mn()],ca=[pt(t=>[t.target])],us){constructor(){super(...arguments),ue(this,_s),aa(this,"method",Pt(Q,8,this)),Pt(Q,11,this),aa(this,"target",Pt(Q,12,this,document.head)),Pt(Q,15,this),ue(this,fs,Pt(Q,16,this,()=>{this.hidden=!0})),Pt(Q,19,this),ue(this,qn,fa(Kl)),ue(this,ps,fa(_a)),ue(this,rn),ue(this,ms,Pt(Q,20,this,()=>((kt(this,rn)||[kt(this,qn),...this.childNodes,kt(this,ps)]).forEach((t,e,i)=>{const s=i[e-1];s?s.after(t):this.target[kt(this,_s,ua)](t)}),()=>{ds(this,rn,jl(kt(this,qn))),kt(this,rn).forEach(t=>t.remove())}))),Pt(Q,23,this)}}Q=Fl(us),_s=new WeakSet,ua=function(){return this.method||"append"},fs=new WeakMap,qn=new WeakMap,ps=new WeakMap,rn=new WeakMap,ms=new WeakMap,Fn(Q,5,"method",da,on),Fn(Q,5,"target",ha,on),Fn(Q,21,"#init",la,fs),Fn(Q,21,"#changeTarget",ca,ms),oa(Q,on),customElements.define("gem-reflect",on),customElements.define("gem-route",ce),customElements.define("gem-light-route",H);var Ql=Object.create,gs=Object.defineProperty,Jl=Object.getOwnPropertyDescriptor,pa=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n),_e=n=>{throw TypeError(n)},ma=(n,t,e)=>t in n?gs(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,ga=(n,t)=>gs(n,"name",{value:t,configurable:!0}),Yl=n=>[,,,Ql((n==null?void 0:n[pa("metadata")])??null)],va=["class","method","getter","setter","accessor","field","value","get","set"],an=n=>n!==void 0&&typeof n!="function"?_e("Function expected"):n,Zl=(n,t,e,i,s)=>({kind:va[n],name:t,metadata:i,addInitializer:o=>e._?_e("Already initialized"):s.push(an(o||null))}),Xl=(n,t)=>ma(t,pa("metadata"),n[3]),Y=(n,t,e,i)=>{for(var s=0,o=n[t>>1],a=o&&o.length;s<a;s++)t&1?o[s].call(e):i=o[s].call(e,i);return i},Dt=(n,t,e,i,s,o)=>{var a,c,u,d,m,r=t&7,g=!!(t&8),l=!!(t&16),v=r>3?n.length+1:r?g?1:2:0,S=va[r+5],E=r>3&&(n[v-1]=[]),k=n[v]||(n[v]=[]),p=r&&(!l&&!g&&(s=s.prototype),r<5&&(r>3||!l)&&Jl(r<4?s:{get[e](){return $s(this,o)},set[e](_){return $a(this,o,_)}},e));r?l&&r<4&&ga(o,(r>2?"set ":r>1?"get ":"")+e):ga(s,e);for(var T=i.length-1;T>=0;T--)d=Zl(r,e,u={},n[3],k),r&&(d.static=g,d.private=l,m=d.access={has:l?_=>th(s,_):_=>e in _},r^3&&(m.get=l?_=>(r^1?$s:eh)(_,s,r^4?o:p.get):_=>_[e]),r>2&&(m.set=l?(_,M)=>$a(_,s,M,r^4?o:p.set):(_,M)=>_[e]=M)),c=(0,i[T])(r?r<4?l?o:p[S]:r>4?void 0:{get:p.get,set:p.set}:s,d),u._=1,r^4||c===void 0?an(c)&&(r>4?E.unshift(c):r?l?o=c:p[S]=c:s=c):typeof c!="object"||c===null?_e("Object expected"):(an(a=c.get)&&(p.get=a),an(a=c.set)&&(p.set=a),an(a=c.init)&&E.unshift(a));return r||Xl(n,s),p&&gs(s,e,p),l?r^4?o:p:s},xn=(n,t,e)=>ma(n,typeof t!="symbol"?t+"":t,e),vs=(n,t,e)=>t.has(n)||_e("Cannot "+e),th=(n,t)=>Object(t)!==t?_e('Cannot use the "in" operator on this value'):n.has(t),$s=(n,t,e)=>(vs(n,t,"read from private field"),e?e.call(n):t.get(n)),Bn=(n,t,e)=>t.has(n)?_e("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),$a=(n,t,e,i)=>(vs(n,t,"write to private field"),i?i.call(n,e):t.set(n,e),e),eh=(n,t,e)=>(vs(n,t,"access private method"),e),Sa,ya,wa,Ea,Ca,ba,Ss,Ta,R,ys,ws,Es,Cs;let Pa=0;const ka=n=>{clearTimeout(Pa),Pa=setTimeout(()=>document.title=n)};function nh(n,t="",e=""){const i=bt.title||n;i&&i!==bt.defaultTitle?(fe.title=i,ka(t+fe.title+e)):(fe.title=bt.defaultTitle,ka(fe.title))}Ta=[Et()];let Mt=class ac extends(Ss=J,ba=[F],Ca=[F],Ea=[Ne],wa=[pt(t=>[t.inert])],ya=[Yt()],Sa=[Nt()],Ss){constructor(){super(...arguments),xn(this,"prefix",Y(R,8,this)),Y(R,11,this),xn(this,"suffix",Y(R,12,this)),Y(R,15,this),xn(this,"inert",Y(R,16,this)),Y(R,19,this),Bn(this,ys,Y(R,20,this,()=>!this.inert&&ht(bt,this.update))),Y(R,23,this),Bn(this,ws,new MutationObserver(()=>this.update())),Bn(this,Es,Y(R,24,this,()=>{$s(this,ws).observe(this,{characterData:!0,childList:!0,subtree:!0})})),Y(R,27,this),Bn(this,Cs,Y(R,28,this,()=>{var t;return nh((t=this.textContent)==null?void 0:t.trim(),this.prefix,this.suffix),h.html`${ac.title}`})),Y(R,31,this)}static setTitle(t){bt({title:t})}};R=Yl(Ss),ys=new WeakMap,ws=new WeakMap,Es=new WeakMap,Cs=new WeakMap,Dt(R,5,"prefix",ba,Mt),Dt(R,5,"suffix",Ca,Mt),Dt(R,5,"inert",Ea,Mt),Dt(R,21,"#connectStore",wa,ys),Dt(R,21,"#obTextContent",ya,Es),Dt(R,21,"#content",Sa,Cs),Mt=Dt(R,0,"GemTitleElement",Ta,Mt),xn(Mt,"title",document.title),Y(R,1,Mt);let fe=Mt;customElements.define("gem-title",fe);var ih=Object.create,bs=Object.defineProperty,sh=Object.getOwnPropertyDescriptor,Ma=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n),pe=n=>{throw TypeError(n)},Oa=(n,t,e)=>t in n?bs(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,La=(n,t)=>bs(n,"name",{value:t,configurable:!0}),rh=n=>[,,,ih((n==null?void 0:n[Ma("metadata")])??null)],Aa=["class","method","getter","setter","accessor","field","value","get","set"],cn=n=>n!==void 0&&typeof n!="function"?pe("Function expected"):n,oh=(n,t,e,i,s)=>({kind:Aa[n],name:t,metadata:i,addInitializer:o=>e._?pe("Already initialized"):s.push(cn(o||null))}),ah=(n,t)=>Oa(t,Ma("metadata"),n[3]),Ut=(n,t,e,i)=>{for(var s=0,o=n[t>>1],a=o&&o.length;s<a;s++)t&1?o[s].call(e):i=o[s].call(e,i);return i},Kn=(n,t,e,i,s,o)=>{var a,c,u,d,m,r=t&7,g=!!(t&8),l=!!(t&16),v=r>3?n.length+1:r?g?1:2:0,S=Aa[r+5],E=r>3&&(n[v-1]=[]),k=n[v]||(n[v]=[]),p=r&&(!l&&!g&&(s=s.prototype),r<5&&(r>3||!l)&&sh(r<4?s:{get[e](){return Ra(this,o)},set[e](_){return Ia(this,o,_)}},e));r?l&&r<4&&La(o,(r>2?"set ":r>1?"get ":"")+e):La(s,e);for(var T=i.length-1;T>=0;T--)d=oh(r,e,u={},n[3],k),r&&(d.static=g,d.private=l,m=d.access={has:l?_=>ch(s,_):_=>e in _},r^3&&(m.get=l?_=>(r^1?Ra:hh)(_,s,r^4?o:p.get):_=>_[e]),r>2&&(m.set=l?(_,M)=>Ia(_,s,M,r^4?o:p.set):(_,M)=>_[e]=M)),c=(0,i[T])(r?r<4?l?o:p[S]:r>4?void 0:{get:p.get,set:p.set}:s,d),u._=1,r^4||c===void 0?cn(c)&&(r>4?E.unshift(c):r?l?o=c:p[S]=c:s=c):typeof c!="object"||c===null?pe("Object expected"):(cn(a=c.get)&&(p.get=a),cn(a=c.set)&&(p.set=a),cn(a=c.init)&&E.unshift(a));return r||ah(n,s),p&&bs(s,e,p),l?r^4?o:p:s},Na=(n,t,e)=>Oa(n,typeof t!="symbol"?t+"":t,e),Ts=(n,t,e)=>t.has(n)||pe("Cannot "+e),ch=(n,t)=>Object(t)!==t?pe('Cannot use the "in" operator on this value'):n.has(t),Ra=(n,t,e)=>(Ts(n,t,"read from private field"),e?e.call(n):t.get(n)),lh=(n,t,e)=>t.has(n)?pe("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),Ia=(n,t,e,i)=>(Ts(n,t,"write to private field"),i?i.call(n,e):t.set(n,e),e),hh=(n,t,e)=>(Ts(n,t,"access private method"),e),Ha,Wa,Ga,Ps,za,it,ks;za=[Et()];class Ft extends(Ps=J,Ga=[F],Wa=[F],Ha=[Nt()],Ps){constructor(){super(...arguments),Na(this,"content",Ut(it,8,this)),Ut(it,11,this),Na(this,"contentcss",Ut(it,12,this)),Ut(it,15,this),lh(this,ks,Ut(it,16,this,()=>{const t=`
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
${this.contentcss}
|
|
36
|
-
</style>
|
|
37
|
-
`;this.shadowRoot.innerHTML=this.content+t.trim()})),Ut(it,19,this)}}it=rh(Ps),ks=new WeakMap,Kn(it,5,"content",Ga,Ft),Kn(it,5,"contentcss",Wa,Ft),Kn(it,21,"#content",Ha,ks),Ft=Kn(it,0,"GemUnsafeElement",za,Ft),Ut(it,1,Ft),customElements.define("gem-unsafe",Ft);var dh=Object.create,Ms=Object.defineProperty,uh=Object.getOwnPropertyDescriptor,Va=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n),me=n=>{throw TypeError(n)},Da=(n,t,e)=>t in n?Ms(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Ua=(n,t)=>Ms(n,"name",{value:t,configurable:!0}),_h=n=>[,,,dh((n==null?void 0:n[Va("metadata")])??null)],Fa=["class","method","getter","setter","accessor","field","value","get","set"],ln=n=>n!==void 0&&typeof n!="function"?me("Function expected"):n,fh=(n,t,e,i,s)=>({kind:Fa[n],name:t,metadata:i,addInitializer:o=>e._?me("Already initialized"):s.push(ln(o||null))}),ph=(n,t)=>Da(t,Va("metadata"),n[3]),at=(n,t,e,i)=>{for(var s=0,o=n[t>>1],a=o&&o.length;s<a;s++)t&1?o[s].call(e):i=o[s].call(e,i);return i},ge=(n,t,e,i,s,o)=>{var a,c,u,d,m,r=t&7,g=!!(t&8),l=!!(t&16),v=r>3?n.length+1:r?g?1:2:0,S=Fa[r+5],E=r>3&&(n[v-1]=[]),k=n[v]||(n[v]=[]),p=r&&(!l&&!g&&(s=s.prototype),r<5&&(r>3||!l)&&uh(r<4?s:{get[e](){return Ls(this,o)},set[e](_){return xa(this,o,_)}},e));r?l&&r<4&&Ua(o,(r>2?"set ":r>1?"get ":"")+e):Ua(s,e);for(var T=i.length-1;T>=0;T--)d=fh(r,e,u={},n[3],k),r&&(d.static=g,d.private=l,m=d.access={has:l?_=>mh(s,_):_=>e in _},r^3&&(m.get=l?_=>(r^1?Ls:gh)(_,s,r^4?o:p.get):_=>_[e]),r>2&&(m.set=l?(_,M)=>xa(_,s,M,r^4?o:p.set):(_,M)=>_[e]=M)),c=(0,i[T])(r?r<4?l?o:p[S]:r>4?void 0:{get:p.get,set:p.set}:s,d),u._=1,r^4||c===void 0?ln(c)&&(r>4?E.unshift(c):r?l?o=c:p[S]=c:s=c):typeof c!="object"||c===null?me("Object expected"):(ln(a=c.get)&&(p.get=a),ln(a=c.set)&&(p.set=a),ln(a=c.init)&&E.unshift(a));return r||ph(n,s),p&&Ms(s,e,p),l?r^4?o:p:s},jn=(n,t,e)=>Da(n,typeof t!="symbol"?t+"":t,e),Os=(n,t,e)=>t.has(n)||me("Cannot "+e),mh=(n,t)=>Object(t)!==t?me('Cannot use the "in" operator on this value'):n.has(t),Ls=(n,t,e)=>(Os(n,t,"read from private field"),e?e.call(n):t.get(n)),qa=(n,t,e)=>t.has(n)?me("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),xa=(n,t,e,i)=>(Os(n,t,"write to private field"),i?i.call(n,e):t.set(n,e),e),gh=(n,t,e)=>(Os(n,t,"access private method"),e),Ba,Ka,ja,Qa,Ja,As,Ya,V,Ns,Rs;const vh=Qt`
|
|
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`
|
|
38
35
|
:host(:where(:not([hidden]))) {
|
|
39
36
|
position: relative;
|
|
40
37
|
display: inline-flex;
|
|
@@ -44,4 +41,4 @@
|
|
|
44
41
|
width: 100%;
|
|
45
42
|
height: 100%;
|
|
46
43
|
}
|
|
47
|
-
`,Za=new Map;Ya=[Et(),Ie(vh)];class mt extends(As=J,Ja=[F],Qa=[x],ja=[x],Ka=[Re],Ba=[Nt()],As){constructor(){super(...arguments),jn(this,"selector",at(V,8,this)),at(V,11,this),jn(this,"root",at(V,12,this)),at(V,15,this),jn(this,"element",at(V,16,this)),at(V,19,this),jn(this,"active",at(V,20,this)),at(V,23,this),qa(this,Ns,()=>{const t=this.element||(this.selector?(this.root||document).querySelector(this.selector):null);if(typeof t=="string"){let e=Za.get(t);return e||(e=document.createElement("template"),e.innerHTML=t,Za.set(t,e)),e.content.cloneNode(!0)}else return t instanceof HTMLTemplateElement?t.content.cloneNode(!0):t==null?void 0:t.cloneNode(!0)}),qa(this,Rs,at(V,24,this,()=>h.html`${Ls(this,Ns).call(this)}<slot></slot>`)),at(V,27,this)}}V=_h(As),Ns=new WeakMap,Rs=new WeakMap,ge(V,5,"selector",Ja,mt),ge(V,5,"root",Qa,mt),ge(V,5,"element",ja,mt),ge(V,5,"active",Ka,mt),ge(V,21,"#content",Ba,Rs),mt=ge(V,0,"GemUseElement",Ya,mt),at(V,1,mt),customElements.define("gem-use",mt);class Xa{constructor(t){C(this,Pe);C(this,mn);$(this,"info",(...t)=>{console.log(f(this,Pe,ei),...t)});$(this,"warn",(...t)=>{console.warn(f(this,Pe,ei),...t)});$(this,"error",(...t)=>{console.error(f(this,Pe,ei),...t)});L(this,mn,t)}}mn=new WeakMap,Pe=new WeakSet,ei=function(){return`[${f(this,mn)}]`};const tc=new Xa("GEM"),$h=/\$\d(?:<[^>]*>)?/,Sh=/\$(\d)(<([^>]*)>)?/g,yh=3;function ec(n,...t){const e=n.split($h),i=[];let s;for(;s=Sh.exec(n);){const o=s[yh],a=Number(s[1])-1,c=t[a];i.push(typeof c=="function"?c(o):c)}return h.html(e,...i)}const hn=new Set,Ws=class Ws{constructor(t){C(this,G);$(this,"resources");$(this,"fallbackLanguage");$(this,"currentLanguage");$(this,"cache");$(this,"cachePrefix","gem-i18n");$(this,"urlParamsType");$(this,"urlParamsName");$(this,"onChange");$(this,"replace",({path:t})=>this.setLanguage(t));$(this,"getParams",()=>({path:this.currentLanguage}));C(this,gn,!0);if(!t.resources[t.fallbackLanguage])throw new ft("i18n: fallbackLanguage invalid");Object.assign(this,t);let e=f(this,G,cc)||this.currentLanguage||f(this,G,lc);const i=document.querySelector(`[type*=${this.cachePrefix}]`);if(i)try{const s=JSON.parse(i.textContent||"");e=s.currentLanguage,this.resources[s.currentLanguage]=s.currentLanguagePack}catch{}e?(L(this,G,e,ii),this.setLanguage(e)):this.resetLanguage(),L(this,gn,!1)}get(t,...e){const i=this.resources[this.currentLanguage],s=this.resources[this.fallbackLanguage],o=i[t]||s[t],a=(o==null?void 0:o.message)||o||`[${t}]`;return e.length?ec(a,...e):a}detectLanguage(){const t=Object.keys(this.resources),e=navigator.languages.map(i=>i.replace(/-(.*)/,s=>s.toUpperCase()));for(const i of e){const s=t.find(o=>o===i||i.startsWith(`${o}-`));if(s)return s}return this.fallbackLanguage}async setLanguage(t){var s,o;f(this,G,vn)&&hn.forEach(async a=>await a.setLanguage(t));let e;const i=this.resources[t];if(!i)return tc.warn(`${this.cachePrefix}: not found \`${t}\``),this.resetLanguage();if(typeof i=="string"){const a=`${this.cachePrefix}:`,c=`${a}${i}`,u=localStorage.getItem(c),d=async()=>{const m=await(await fetch(i)).json();if(this.cache){for(let r=0;r<localStorage.length;r++){const g=localStorage.key(r);g.startsWith(a)&&localStorage.removeItem(g)}localStorage.setItem(c,JSON.stringify(m))}return m};if(u)try{e=JSON.parse(u)}catch{e=await d()}else e=await d()}else e=i;if(this.resources[t]=e,!f(this,gn)){const a=[document.documentElement];for(;a.length;){const c=a.pop();(s=c[Le])==null||s.call(c),a.push(...[...c.children,...((o=c.shadowRoot)==null?void 0:o.children)||[]].reverse())}}return t!==this.currentLanguage&&L(this,G,t,ii),this.cache===!0&&this.setCache(),t}resetLanguage(){return f(this,G,vn)&&hn.forEach(t=>t.resetLanguage()),L(this,G,this.fallbackLanguage,ii),this.cache&&localStorage.removeItem(f(this,G,ni)),this.setLanguage(this.detectLanguage())}setCache(){f(this,G,vn)&&hn.forEach(t=>t.setCache()),localStorage.setItem(f(this,G,ni),this.currentLanguage)}createSubModule(t,e){const i=new Ws({resources:e,cachePrefix:`${this.cachePrefix}-${t}`,currentLanguage:this.currentLanguage,fallbackLanguage:this.fallbackLanguage,cache:this.cache});return hn.add(i),i}toJSON(){return{currentLanguage:this.currentLanguage,currentLanguagePack:this.resources[this.currentLanguage]}}};G=new WeakSet,ni=function(){return`${this.cachePrefix}:current`},cc=function(){const{hostname:t,pathname:e,search:i}=location,s=t.split(".");switch(this.urlParamsType){case"ccTLD":return s.pop();case"gTLD":return s.shift();case"path":return e.split("/")[1];default:{const o=this.urlParamsName&&new URLSearchParams(i).get(this.urlParamsName)||"";return o in this.resources?o:""}}},lc=function(){return this.cache&&localStorage.getItem(f(this,G,ni))||""},vn=function(){return!hn.has(this)},ii=function(t){var e;f(this,G,vn)&&(document.documentElement.lang=t),this.currentLanguage=t,(e=this.onChange)==null||e.call(this,t)},gn=new WeakMap;let Is=Ws;const Z=n=>matchMedia(n).matches,wh={PRINT:"print",get isPrint(){return Z(this.PRINT)},HOVER:"(hover: hover)",get isHover(){return Z(this.HOVER)},PWA:"(display-mode: standalone)",get isPWA(){return Z(this.PWA)},MOTION_REDUCE:"(prefers-reduced-motion: reduce)",get isMotionReduce(){return Z(this.MOTION_REDUCE)},DATA_REDUCE:"(prefers-reduced-data: reduce)",get isDataReduce(){return Z(this.DATA_REDUCE)},WATCH:"(width < 320px)",get isWatch(){return Z(this.WATCH)},SMALL_PHONE:"(320px <= width <= 480px) and (height <= 640px)",get isSmallPhone(){return Z(this.SMALL_PHONE)},PHONE:"(320px <= width <= 480px)",get isPhone(){return Z(this.PHONE)},PHONE_LANDSCAPE:"(480px < width < 960px) and (orientation: landscape)",get isPhoneLandscape(){return Z(this.PHONE_LANDSCAPE)},SHORT:"(width >= 480px) and (height <= 320px)",get isShort(){return Z(this.SHORT)},TABLET:"(480px < width <= 1280px)",get isTablet(){return Z(this.TABLET)},DESKTOP:"(width > 1280px) and (orientation: landscape)",get isDesktop(){return Z(this.DESKTOP)},WIDTHSCREEN:"(width >= 1920px) and (orientation: landscape)",get isWidthScreen(){return Z(this.WIDTHSCREEN)}},Eh=Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)).constructor;function nc(n={}){const{origin:t=location.origin,base:e="",appendHeaders:i=()=>({}),transformInput:s=r=>r,transformOutput:o=r=>r,...a}=n,c=r=>r instanceof FormData||r instanceof Blob||r instanceof Eh||r instanceof URLSearchParams||r instanceof ReadableStream||r instanceof ArrayBuffer?r:typeof r=="object"?JSON.stringify(r):r,u=(r,g)=>{if(new URL(r,location.origin).pathname!==r)throw new ft("`path` format is incorrect");const l=new URLSearchParams(g).toString();return`${t}${e}${r}${l?"?":""}${l}`},d=r=>{if(!r)return{};if(r instanceof Headers)return Object.fromEntries(r);const g=Array.isArray(r)?r:Object.entries(r);return Object.fromEntries(g.map(([l,v])=>[l.toLowerCase(),v]))},m=async(r,g={})=>{const l=new Request(r,{...a,...g,headers:new Headers({"content-type":"application/json",...d(a.headers),...d(g.headers)})}),v=await fetch(l);if(v.status===0)throw new Error("Request fail");if(v.status>=500)throw new Error(v.statusText);const S=l.headers.get("content-type"),E=v.status>=400;try{let k;if(S.includes("json")?k=await v.json():S.includes("octet-stream")?k=await v.arrayBuffer():k=await v.text(),E)throw new Error(v.statusText,{cause:k});return o(k,l)}catch{throw new Error("Parse error")}};return{request:m,get(r,g){const l=s(g);return m(u(r,l),{method:"GET",headers:i(l)})},del(r,g){const l=s(g);return m(u(r,l),{method:"DELETE",headers:i(l)})},put(r,g){const l=s(g);return m(u(r),{method:"PUT",headers:i(l),body:c(l)})},post(r,g){const l=s(g);return m(u(r),{method:"POST",headers:i(l),body:c(l)})}}}const{request:Ch,del:bh,get:Th,post:Ph,put:kh}=nc(),ic=new WeakMap,sc=new WeakMap;function Mh(n){return ic.get(n)}function Hs(n){return sc.get(n)}function Qn(n,t={}){const e=yn(),i=Qt({})[yt],s=St(n),o=new Proxy(Me({[yt]:i},c=>s(c)),{get(c,u){if(!c[u]){const[d,m,r]=u.match(/^(\w*Color)(\d+)$/)||[];m&&(c[u]=`oklch(from ${c[m]} calc(l - ${(Number(r)-400)/1e3}) c h)`)}return c[u]}});sc.set(o,t),ic.set(o,s);const a=()=>{let c="";Object.keys(s).forEach(u=>{t[u]||(t[u]=`--${At(u)}-${e}`,o[u]=`var(${t[u]})`),c+=`${t[u]}:${s[u]};`}),i.setContent(`:scope,:host{${c}}`)};return a(),ht(s,()=>{a(),i.updateStyle()}),o}function rc(n){return Qn(n)}function Oh(n){const t=rc(n);return document.adoptedStyleSheets.push(t[yt].getStyle()),t}function Lh(n,t){return Qn(t,Hs(n))}function Ah(n){const t=Qn(n),e=Hs(t);return Me(t,s=>(o,{addInitializer:a,access:c})=>{a(function(){const u=Qn({...n},e);this.internals.sheets.push(u[yt].getStyle(this)),this.memo(()=>u(c.get(this).apply(this)),s&&(()=>s(this)))})})}h.GemActiveLinkElement=Vt,h.GemDialogBaseElement=se,h.GemElement=J,h.GemError=ft,h.GemLightRouteElement=H,h.GemLinkElement=z,h.GemReflectElement=on,h.GemRouteElement=ce,h.GemTitleElement=fe,h.GemUnsafeElement=Ft,h.GemUseElement=mt,h.I18n=Is,h.LinkedList=Us,h.Logger=Xa,h.PropProxyMap=Fs,h.QueryString=jt,h.SheetToken=yt,h.TemplateResult=Ei,h.UpdateToken=Le,h._RenderErrorEvent=Cn,h._StoreListenerMap=Oe,h.absoluteLocation=ri,h.addListener=oi,h.addMicrotask=_t,h.adoptedStyle=Ie,h.aria=We,h.async=ur,h.attribute=F,h.basePathStore=Vr,h.boolattribute=Ne,h.camelToKebabCase=At,h.classMap=xs,h.cleanObject=wn,h.connect=ht,h.connectStore=He,h.createDecoratorTheme=Ah,h.createHistoryParams=Po,h.createModalClass=bl,h.createOverrideTheme=Lh,h.createPath=Un,h.createRef=Zc,h.createScopedTheme=rc,h.createStore=St,h.createTheme=Oh,h.createUpdater=Me,h.css=Qt,h.customElement=_r,h.del=bh,h.directive=Lr,h.effect=pt,h.emitter=Zt,h.exportPartsMap=pc,h.fallback=ar,h.get=Th,h.getThemeProps=Hs,h.getThemeStore=Mh,h.globalemitter=hr,h.history=N,h.initRequest=nc,h.isArrayChange=qs,h.isSSR=li,h.kebabToCamelCase=uc,h.light=vi,h.logger=tc,h.matchPath=Yi,h.mathml=Fc,h.mediaQuery=wh,h.memo=mi,h.mounted=Yt,h.numattribute=rr,h.objectMapToString=En,h.part=gi,h.partMap=fc,h.post=Ph,h.property=x,h.put=kh,h.randomStr=yn,h.raw=Sn,h.repeat=al,h.request=Ch,h.setEngine=ai,h.shadow=Et,h.slot=lr,h.splice=ec,h.state=Re,h.styleMap=_c,h.styled=dc,h.svg=Uc,h.template=Nt,h.titleStore=bt,h.unmounted=or,h.version=Or,h.willMount=Mn,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})});
|
|
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"})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gesture.d.ts","sourceRoot":"","sources":["../../src/elements/base/gesture.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEpD,OAAO,EAAO,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,MAAM,cAAc,GAAG;IAE3B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"gesture.d.ts","sourceRoot":"","sources":["../../src/elements/base/gesture.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEpD,OAAO,EAAO,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,MAAM,cAAc,GAAG;IAE3B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AACF,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC/C,KAAK,EAAE,MAAM,CAAC;CACf;AACD,MAAM,WAAW,gBAAgB;IAE/B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;CACf;AACD,MAAM,WAAW,iBAAiB;IAEhC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,MAAM,EAAE,MAAM,CAAC;CAChB;AA2BD;;;;GAIG;AACH,qBACa,iBAAkB,SAAQ,UAAU;;IACtC,GAAG,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IAC7B,KAAK,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACjC,MAAM,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACnC,KAAK,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACjC,KAAK,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IAC7B,GAAG,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IAEzB,WAAW,EAAE,MAAM,CAAC;IAExB,QAAQ,EAAE,OAAO,CAAC;IAiMzB,oBAAoB;IACpB,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,EAAE,CAAC,CAAa;CACrD"}
|
package/elements/base/gesture.js
CHANGED
|
@@ -41,7 +41,7 @@ function angleAB(a, b, c, { clientX: x1, clientY: y1 }, { clientX: x2, clientY:
|
|
|
41
41
|
}
|
|
42
42
|
const style = css `
|
|
43
43
|
@layer {
|
|
44
|
-
|
|
44
|
+
&:where(:not([hidden])) {
|
|
45
45
|
display: block;
|
|
46
46
|
user-select: none;
|
|
47
47
|
touch-action: attr(touch-action, none);
|
|
@@ -182,7 +182,7 @@ let GemGestureElement = (() => {
|
|
|
182
182
|
};
|
|
183
183
|
#onMove = (evt) => {
|
|
184
184
|
const { pointerId, clientX, clientY, isPrimary, pointerType, timeStamp } = evt;
|
|
185
|
-
if (
|
|
185
|
+
if (this.hasPointerCapture(pointerId)) {
|
|
186
186
|
const moves = this.#getMoves(pointerId);
|
|
187
187
|
const startEvent = this.#getStartEvent(pointerId);
|
|
188
188
|
const lastMove = moves[moves.length - 1] || startEvent;
|
|
@@ -201,6 +201,7 @@ let GemGestureElement = (() => {
|
|
|
201
201
|
timeStamp,
|
|
202
202
|
isPrimary,
|
|
203
203
|
pointerId,
|
|
204
|
+
pressed: this.#pressed,
|
|
204
205
|
};
|
|
205
206
|
moves.push(move);
|
|
206
207
|
this.pan(move);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gesture.js","sourceRoot":"","sources":["../../src/elements/base/gesture.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AACxF,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"gesture.js","sourceRoot":"","sources":["../../src/elements/base/gesture.ts"],"names":[],"mappings":"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"}
|
package/elements/base/link.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import type { RouteItem, RouteOptions } from './route';
|
|
|
5
5
|
*/
|
|
6
6
|
export declare class GemLinkElement extends GemElement {
|
|
7
7
|
#private;
|
|
8
|
+
static link: string;
|
|
8
9
|
href: string;
|
|
9
10
|
target: string;
|
|
10
11
|
path: string;
|
|
@@ -18,7 +19,6 @@ export declare class GemLinkElement extends GemElement {
|
|
|
18
19
|
options?: RouteOptions;
|
|
19
20
|
routeOptions?: RouteOptions;
|
|
20
21
|
prepare?: () => void | Promise<void>;
|
|
21
|
-
link: string;
|
|
22
22
|
/**
|
|
23
23
|
* 如果该元素是外部链接返回 URL,否则返回路径(不包含 basePath)
|
|
24
24
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../src/elements/base/link.ts"],"names":[],"mappings":"AAcA,OAAO,EAAO,UAAU,EAAQ,MAAM,mBAAmB,CAAC;AAG1D,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAuBvD;;GAEG;AACH,qBAIa,cAAe,SAAQ,UAAU;;
|
|
1
|
+
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../src/elements/base/link.ts"],"names":[],"mappings":"AAcA,OAAO,EAAO,UAAU,EAAQ,MAAM,mBAAmB,CAAC;AAG1D,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAuBvD;;GAEG;AACH,qBAIa,cAAe,SAAQ,UAAU;;IACtC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC;IAEf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,IAAI,GAAG,KAAK,CAAC;IAC9B,4CAA4C;IAC7B,OAAO,EAAE,OAAO,CAAC;IAGtB,KAAK,CAAC,EAAE,SAAS,CAAC;IAC5B,iBAAiB;IACP,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAuF/C;;OAEG;IACH,kBAAkB;CAmBnB;AAED,qBACa,oBAAqB,SAAQ,cAAc;;IAC3C,OAAO,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;CAQxB"}
|