@mantou/gem 2.2.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gem.es.js +2007 -2020
- package/dist/gem.umd.js +15 -32
- package/elements/base/dialog.d.ts +1 -1
- package/elements/base/dialog.d.ts.map +1 -1
- package/elements/base/dialog.js +2 -2
- package/elements/base/dialog.js.map +1 -1
- package/elements/base/gesture.d.ts +1 -1
- package/elements/base/gesture.d.ts.map +1 -1
- package/elements/base/gesture.js +4 -4
- package/elements/base/gesture.js.map +1 -1
- package/elements/base/link.d.ts.map +1 -1
- package/elements/base/link.js +7 -12
- package/elements/base/link.js.map +1 -1
- package/elements/base/modal-factory.d.ts +23 -12
- package/elements/base/modal-factory.d.ts.map +1 -1
- package/elements/base/modal-factory.js +14 -14
- package/elements/base/modal-factory.js.map +1 -1
- package/elements/base/reflect.d.ts +1 -2
- package/elements/base/reflect.d.ts.map +1 -1
- package/elements/base/reflect.js +8 -10
- package/elements/base/reflect.js.map +1 -1
- package/elements/base/route.d.ts +17 -7
- package/elements/base/route.d.ts.map +1 -1
- package/elements/base/route.js +6 -6
- package/elements/base/route.js.map +1 -1
- package/elements/base/title.d.ts +1 -1
- package/elements/base/title.d.ts.map +1 -1
- package/elements/base/title.js +3 -3
- package/elements/base/title.js.map +1 -1
- package/elements/base/unsafe.d.ts +1 -1
- package/elements/base/unsafe.d.ts.map +1 -1
- package/elements/base/unsafe.js +1 -1
- package/elements/base/unsafe.js.map +1 -1
- package/elements/base/use.d.ts +1 -1
- package/elements/base/use.d.ts.map +1 -1
- package/elements/base/use.js +1 -1
- package/elements/base/use.js.map +1 -1
- package/elements/link.js +1 -1
- package/elements/link.js.map +1 -1
- package/elements/route.js +1 -1
- package/elements/route.js.map +1 -1
- package/helper/hmr.d.ts +11 -0
- package/helper/hmr.d.ts.map +1 -0
- package/helper/hmr.js +255 -0
- package/helper/hmr.js.map +1 -0
- package/helper/i18n.d.ts +2 -2
- package/helper/i18n.d.ts.map +1 -1
- package/helper/i18n.js +5 -4
- package/helper/i18n.js.map +1 -1
- package/helper/logger.d.ts +1 -1
- package/helper/logger.d.ts.map +1 -1
- package/helper/logger.js +8 -5
- package/helper/logger.js.map +1 -1
- package/helper/mediaquery.js +1 -1
- package/helper/mediaquery.js.map +1 -1
- package/helper/ssr-shim.d.ts.map +1 -1
- package/helper/ssr-shim.js +2 -0
- package/helper/ssr-shim.js.map +1 -1
- package/helper/theme.d.ts +3 -4
- package/helper/theme.d.ts.map +1 -1
- package/helper/theme.js +1 -1
- package/helper/theme.js.map +1 -1
- package/index.d.ts +1 -2
- package/index.d.ts.map +1 -1
- package/index.js +1 -3
- package/index.js.map +1 -1
- package/lib/decorators.d.ts +5 -13
- package/lib/decorators.d.ts.map +1 -1
- package/lib/decorators.js +40 -42
- package/lib/decorators.js.map +1 -1
- package/lib/directive.d.ts +0 -18
- package/lib/directive.d.ts.map +1 -1
- package/lib/directive.js +1 -2
- package/lib/directive.js.map +1 -1
- package/lib/element.d.ts +8 -137
- package/lib/element.d.ts.map +1 -1
- package/lib/element.js +16 -481
- package/lib/element.js.map +1 -1
- package/lib/history.d.ts +67 -9
- package/lib/history.d.ts.map +1 -1
- package/lib/history.js +12 -12
- package/lib/history.js.map +1 -1
- package/lib/lit-html.d.ts +5 -104
- package/lib/lit-html.d.ts.map +1 -1
- package/lib/lit-html.js +73 -27
- package/lib/lit-html.js.map +1 -1
- package/lib/reactive.d.ts +123 -0
- package/lib/reactive.d.ts.map +1 -0
- package/lib/reactive.js +478 -0
- package/lib/reactive.js.map +1 -0
- package/lib/repeat.d.ts +3 -3
- package/lib/repeat.d.ts.map +1 -1
- package/lib/repeat.js +3 -3
- package/lib/repeat.js.map +1 -1
- package/lib/store.d.ts +13 -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 +23 -11
- package/lib/utils.d.ts.map +1 -1
- package/lib/utils.js +20 -15
- package/lib/utils.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.d.ts.map +1 -1
- package/lib/version.js +1 -2
- package/lib/version.js.map +1 -1
- package/package.json +3 -3
- package/src/dist.ts +6 -8
- package/src/elements/base/dialog.ts +2 -2
- package/src/elements/base/gesture.ts +5 -5
- package/src/elements/base/link.ts +16 -22
- package/src/elements/base/modal-factory.ts +14 -14
- package/src/elements/base/reflect.ts +2 -3
- package/src/elements/base/route.ts +13 -14
- package/src/elements/base/title.ts +4 -4
- package/src/elements/base/unsafe.ts +1 -1
- package/src/elements/base/use.ts +1 -1
- package/src/elements/link.ts +1 -1
- package/src/elements/route.ts +1 -1
- package/src/helper/hmr.ts +305 -0
- package/src/helper/i18n.ts +7 -7
- package/src/helper/logger.ts +9 -5
- package/src/helper/mediaquery.ts +1 -1
- package/src/helper/ssr-shim.ts +3 -0
- package/src/helper/theme.ts +4 -4
- package/src/index.ts +1 -4
- package/src/lib/decorators.ts +56 -68
- package/src/lib/directive.ts +3 -5
- package/src/lib/element.ts +22 -600
- package/src/lib/history.ts +14 -15
- package/src/lib/lit-html.ts +86 -34
- package/src/lib/reactive.ts +596 -0
- package/src/lib/repeat.ts +5 -5
- package/src/lib/store.ts +1 -0
- package/src/lib/utils.ts +35 -30
- package/src/lib/version.ts +1 -2
- package/src/test/elements/link.test.ts +2 -2
- package/src/test/elements/reflect.test.ts +3 -3
- package/src/test/elements/title.test.ts +2 -2
- package/src/test/gem-element/advance.test.ts +10 -9
- package/src/test/gem-element/basic.test.ts +3 -3
- package/src/test/gem-element/decorators.test.ts +10 -10
- package/src/test/gem-element/multi.test.ts +2 -2
- package/src/test/history.test.ts +1 -2
- package/src/test/store.test.ts +2 -3
- package/src/test/utils.test.ts +4 -5
- package/src/test/utils.ts +2 -2
- package/helper/react-shim.d.ts +0 -15
- package/helper/react-shim.d.ts.map +0 -1
- package/helper/react-shim.js +0 -56
- package/helper/react-shim.js.map +0 -1
- package/lib/directives.d.ts +0 -4
- package/lib/directives.d.ts.map +0 -1
- package/lib/directives.js +0 -5
- package/lib/directives.js.map +0 -1
- package/lib/ref.d.ts +0 -1
- package/lib/ref.d.ts.map +0 -1
- package/lib/ref.js +0 -2
- package/lib/ref.js.map +0 -1
package/dist/gem.umd.js
CHANGED
|
@@ -1,30 +1,19 @@
|
|
|
1
|
-
(function(d,O){typeof exports=="object"&&typeof module<"u"?O(exports):typeof define=="function"&&define.amd?define(["exports"],O):(d=typeof globalThis<"u"?globalThis:d||self,O(d.Gem={}))})(this,function(d){"use strict";var Cl=Object.defineProperty;var nc=d=>{throw TypeError(d)};var bl=(d,O,z)=>O in d?Cl(d,O,{enumerable:!0,configurable:!0,writable:!0,value:z}):d[O]=z;var $=(d,O,z)=>bl(d,typeof O!="symbol"?O+"":O,z),Ls=(d,O,z)=>O.has(d)||nc("Cannot "+z);var f=(d,O,z)=>(Ls(d,O,"read from private field"),z?z.call(d):O.get(d)),C=(d,O,z)=>O.has(d)?nc("Cannot add the same private member more than once"):O instanceof WeakSet?O.add(d):O.set(d,z),A=(d,O,z,$t)=>(Ls(d,O,"write to private field"),$t?$t.call(d,z):O.set(d,z),z),Ns=(d,O,z)=>(Ls(d,O,"access private method"),z);var At,gt,Lt,_n,Rs,$e,jn,ut,Bt,fn,ye,we,Se,Ee,it,_t,Kt,vt,Ce,ht,be,Te,jt,lt,Oe,Is,Qn,Jn,pn,Pe,Qt,mn,Yn,Zn,gn,ke,W,Xn,rc,oc,$n,ti,vn;const O=Object.freeze(Object.defineProperty({__proto__:null,get adoptedStyle(){return xe},get aria(){return qe},get async(){return kr},get attribute(){return U},get boolattribute(){return Ve},get connectStore(){return Ue},get customElement(){return Mr},get effect(){return pt},get emitter(){return ie},get fallback(){return Er},get globalemitter(){return Tr},get light(){return yi},get memo(){return vi},get mounted(){return ne},get numattribute(){return wr},get part(){return $i},get property(){return B},get shadow(){return bt},get slot(){return br},get state(){return De},get template(){return zt},get unmounted(){return Sr},get willMount(){return An}},Symbol.toStringTag,{value:"Module"}));/**
|
|
1
|
+
(function(h,O){typeof exports=="object"&&typeof module<"u"?O(exports):typeof define=="function"&&define.amd?define(["exports"],O):(h=typeof globalThis<"u"?globalThis:h||self,O(h.Gem={}))})(this,function(h){"use strict";var Nh=Object.defineProperty;var oc=h=>{throw TypeError(h)};var Rh=(h,O,I)=>O in h?Nh(h,O,{enumerable:!0,configurable:!0,writable:!0,value:I}):h[O]=I;var $=(h,O,I)=>Rh(h,typeof O!="symbol"?O+"":O,I),Gs=(h,O,I)=>O.has(h)||oc("Cannot "+I);var f=(h,O,I)=>(Gs(h,O,"read from private field"),I?I.call(h):O.get(h)),C=(h,O,I)=>O.has(h)?oc("Cannot add the same private member more than once"):O instanceof WeakSet?O.add(h):O.set(h,I),L=(h,O,I,$n)=>(Gs(h,O,"write to private field"),$n?$n.call(h,I):O.set(h,I),I),zs=(h,O,I)=>(Gs(h,O,"access private method"),I);var Ot,gt,Lt,dn,Vs,ve,Jn,vt,qt,un,$e,Se,ye,st,ut,xt,$t,we,ct,Ee,Ce,Bt,lt,ke,Ds,Yn,Zn,_n,be,Kt,fn,Xn,ti,pn,Te,mn,Pe,ei,G,ni,cc,lc,vn,ii,gn;const{assign:O,fromEntries:I,entries:$n,keys:hc}=Object,si=new Set;function _t(n,t){if(si.has(n))return;const e=()=>{si.delete(n),n()};t?process.nextTick(e):Promise.resolve().then(e),si.add(n)}function Me(n,t){const e=t;return delete e.name,delete e.length,O(e,n),e}function ri(n="",t=""){const{pathname:e,search:i,hash:s}=new URL(t,location.origin+n);return e+i+decodeURIComponent(s)}function oi(n,t,e,i){return n.addEventListener(t,e,i),()=>n.removeEventListener(t,e,i)}class Us extends EventTarget{constructor(){super(...arguments);C(this,dn);C(this,Ot,new Map);C(this,gt);C(this,Lt)}get size(){return f(this,Ot).size}get first(){return f(this,gt)}get last(){return f(this,Lt)}isSuperLinkOf(e){let i=e.first;if(!i)return!0;let s=this.find(i.value);for(;s&&s.value===i.value;){if(i=i.next,!i)return!0;s=s.next}return!1}find(e){return f(this,Ot).get(e)}add(e){f(this,Lt)||this.dispatchEvent(new CustomEvent("start"));const i=zs(this,dn,Vs).call(this,e)||{value:e};i.prev=f(this,Lt),i.prev&&(i.prev.next=i),i.next=void 0,L(this,Lt,i),f(this,gt)||L(this,gt,i),f(this,Ot).set(e,i)}delete(e){const i=zs(this,dn,Vs).call(this,e);return f(this,gt)||this.dispatchEvent(new CustomEvent("end")),i}get(){const e=f(this,gt);if(e)return this.delete(e.value),e.value}}Ot=new WeakMap,gt=new WeakMap,Lt=new WeakMap,dn=new WeakSet,Vs=function(e){const i=f(this,Ot).get(e);return i&&(i.prev?i.prev.next=i.next:L(this,gt,i.next),i.next?i.next.prev=i.prev:L(this,Lt,i.prev),f(this,Ot).delete(e)),i};class Fs extends WeakMap{get(t){let e=super.get(t);return e||(e={},this.set(t,e)),e}}class jt extends URLSearchParams{constructor(){super(...arguments);C(this,ve,e=>typeof e=="string"?e:JSON.stringify(e));C(this,Jn,e=>{if(!e)return null;try{return JSON.parse(e)}catch{return null}})}concat(e){let i;typeof e=="string"?i=I(new URLSearchParams(e).entries()):i=e,$n(i).forEach(([s,o])=>{this.append(s,f(this,ve).call(this,o))})}setAny(e,i){if(Array.isArray(i))this.delete(e),i.forEach(s=>this.append(e,f(this,ve).call(this,s)));else{const s=f(this,ve).call(this,i);s?this.set(e,s):this.delete(e)}}getAny(e){return this.getAnyAll(e)[0]}getAnyAll(e){return this.getAll(e).filter(i=>i!=="").map(i=>f(this,Jn).call(this,i))}toString(){const e=super.toString();return e?`?${e}`:""}toJSON(){return this.toString()}}ve=new WeakMap,Jn=new WeakMap;function Sn(n,...t){return n.reduce((e,i,s)=>e+(t[s-1]??"")+i)}const dc=Sn;function yn(n=5){const t=Math.random().toString(36).slice(2,2+n);return t.length<n?t+yn(n-t.length):t}function At(n){return n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function uc(n){return n.replace(/-(.)/g,(t,e)=>e.toUpperCase())}function wn(n){return hc(n).forEach(t=>{delete n[t]}),n}class ft extends Error{constructor(t){super(t),this.message=`gem: ${this.message}`}}function qs(n,t){const e=n.length;if(t.length!==e)return!0;for(let i=0;i<e;i++)if(n[i]!==t[i])return!0;return!1}function En(n,t,e){let i=t;for(const s in n){const o=e(s,n[s]);i+=o?o+t:""}return i}function _c(n){return En(n,";",(t,e)=>e||e===0?`${At(t)}:${e}`:"")}function xs(n){return En(n," ",(t,e)=>e?t:"")}const fc=xs;function pc(n){return En(n,",",(t,e)=>e===!0||t===e?t:e?`${t}:${e}`:"")}const Oe=new WeakMap;function St(n){const t=Me(n,e=>{var i;Object.assign(t,e),(i=Oe.get(t))==null||i.forEach(s=>_t(s))});return Oe.set(t,new Set),t}function ht(n,t){const e=Oe.get(n);return e==null||e.add(t),()=>e==null?void 0:e.delete(t)}const mc=Object.freeze(Object.defineProperty({__proto__:null,_StoreListenerMap:Oe,connect:ht,createStore:St},Symbol.toStringTag,{value:"Module"}));h.html=(n,...t)=>Sn(n,...t.map(e=>e instanceof Element?e.outerHTML:e)),h.render=(n,t)=>t.innerHTML=n;function ai(n,t){h.html=n,h.render=t}const{assign:Bs,defineProperty:gc}=Object;gc(Symbol,"metadata",{value:Symbol.for("Symbol.metadata")});const Ks=n=>typeof n=="function"&&n(),yt=Symbol.for("gem@sheetToken"),Le=Symbol.for("gem@update"),js="gem-style-boundary",Cn="gem@render-error",vc=Le,ci=new WeakMap,Qs=new WeakMap;class $c extends CSSStyleSheet{constructor(){super(...arguments);C(this,vt);$(this,"cssText","")}get element(){return f(this,vt)||(L(this,vt,document.createElement("style")),f(this,vt).textContent=this.cssText),f(this,vt)}replaceSync(e){this.cssText=e,f(this,vt)&&(f(this,vt).textContent=e),super.replaceSync(e)}}vt=new WeakMap;class Sc{constructor(t=""){C(this,qt,"");C(this,un,"");C(this,$e,new Map);C(this,Se,new Map);L(this,un,t)}setContent(t){L(this,qt,t)}getStyle(t){var o;const e=t&&!((o=t.internals)!=null&&o.shadowRoot),i=e?t.constructor:this;if(!f(this,$e).has(i)){const a=new $c({media:f(this,un)});f(this,$e).set(i,a)}const s=f(this,$e).get(i);if(!f(this,Se).has(s)){let a=f(this,qt),c="";e&&(c=`@scope (${t.tagName}) to (:state(${js}) > *)`,a=`${c}{ ${a} }`),s.replaceSync(a),f(this,Se).set(s,c)}return s}updateStyle(){f(this,Se).forEach((t,e)=>{e.replaceSync(t?`${t}{${f(this,qt)}}`:f(this,qt))})}}qt=new WeakMap,un=new WeakMap,$e=new WeakMap,Se=new WeakMap;function Qt(n,...t){let e="",i="";const s=t.at(0);Array.isArray(n)?i=Sn(n,...t):s!==void 0?(e=n,i=s):i=n;const o=new Sc(e),a={[yt]:o};let c="";return typeof i=="string"?c=i:Object.keys(i).forEach(u=>{const d=u==="$";a[u]=d||u.includes("-")?u:`${u}-${yn()}`,c+=`${d?":where(:scope:not([hidden])),:host(:where(:not([hidden])))":`.${a[u]}`} {${i[u]}}`}),o.setContent(c),a}const li=typeof process<"u",Js=(n,t,e)=>{let i=!1;t.forEach(s=>{const o=n.get(s)||0;i||(i=e===1&&o===0||e===-1&&o===1),n.set(s,o+e)}),i&&_t(Qs.get(n),li)},yc=(n,t)=>{const e=n.getRootNode();if(!ci.has(e)){const s=new Map;ci.set(e,s),Qs.set(s,()=>{const o=e.adoptedStyleSheets.filter(a=>!s.has(a));s.forEach((a,c)=>a&&o.push(c)),e.adoptedStyleSheets=o.reverse()})}const i=ci.get(e);return Js(i,t,1),()=>Js(i,t,-1)};h.createState=void 0;function Ys(n){n==null||n.forEach(t=>{const{callback:e,getDep:i,values:s,preCallback:o}=t,a=i==null?void 0:i();(!i||!s||qs(s,a))&&(Ks(o),t.preCallback=e(a,s),t.values=a,t.initialized=!0)})}function Zs(n){return n.filter(t=>(Ks(t.preCallback),t.initialized=!1,t.values=void 0,t.fixed))}h._createTemplate=void 0;const Jt=new Us,hi=(n=performance.now())=>{if(performance.now()>n+16)return requestAnimationFrame(hi);const t=Jt.get();t&&(t(),hi(n))};Jt.addEventListener("start",()=>_t(hi));let Xs;class J extends HTMLElement{constructor(){super();C(this,lt);C(this,ye);C(this,st);C(this,ut,[]);C(this,xt,[]);C(this,$t,[]);C(this,we);C(this,ct);C(this,Ee);C(this,Ce);C(this,Bt);C(this,Yn,()=>{Ys(f(this,ut))});C(this,Zn,()=>{Ys(f(this,xt))});C(this,_n,e=>{try{L(this,Ce,!0),f(this,Zn).call(this);const i=f(this,ye)===this,s=e?e.render():i?void 0:h.html`<slot></slot>`;if(s===void 0)return;h.render(s!==null?s:i?h.html`<style>@scope{:scope{display:none !important}}</style>`:h.html`<style>:host{display:none !important}</style>`,f(this,ye))}catch(i){throw this.dispatchEvent(new CustomEvent(Cn,{bubbles:!0,composed:!0,detail:i})),i}finally{L(this,Ce,!1)}});C(this,be,()=>{const e=f(this,lt,Ds);f(this,ct)&&(e||!f(this,$t).length)&&(f(this,_n).call(this,e),_t(f(this,Yn)))});C(this,Kt,()=>{f(this,lt,ke).noBlocking?Jt.add(f(this,be)):f(this,be).call(this)});C(this,fn,()=>{const{adoptedStyleSheets:e=[]}=f(this,lt,ke),{shadowRoot:i,sheets:s}=f(this,st),o=e.map(a=>a[yt].getStyle(this));if(i)i.adoptedStyleSheets=o.concat(s);else return this.prepend(...s.map(a=>a.element)),yc(this,o)});C(this,Xn,()=>{var e;(e=f(this,ut))==null||e.forEach(i=>{const{callback:s,getDep:o,initialized:a}=i;a||(i.values=o==null?void 0:o(),i.preCallback=s(i.values),i.initialized=!0)})});C(this,ti,()=>{var e;this.willMount&&this.memo(this.willMount.bind(this),()=>[]),this.mounted&&this.effect(this.mounted.bind(this),()=>[]),this.updated&&this.effect((i,s)=>s&&this.updated.apply(this)),this.unmounted&&this.effect(()=>this.unmounted.bind(this),()=>[]),!f(this,$t).length&&this.render&&f(this,$t).push({render:this.render.bind(this),condition:(e=this.shouldUpdate)==null?void 0:e.bind(this)})});C(this,pn);C(this,Te,async()=>{var o;if(f(this,we)){L(this,we,!1),(o=f(this,Bt))==null||o.call(this),L(this,Bt,f(this,fn).call(this));return}L(this,Ee,!0),f(this,ti).call(this);const{observedStores:e,mode:i,penetrable:s}=f(this,lt,ke);!i&&f(this,$t).length&&!s&&f(this,st).states.add(js),L(this,pn,e==null?void 0:e.map(a=>ht(a,f(this,Kt)))),f(this,_n).call(this,f(this,lt,Ds)),L(this,ct,!0),L(this,Bt,f(this,fn).call(this)),_t(f(this,Xn))});$(this,"effect",(e,i)=>{const s={callback:e,getDep:i,initialized:f(this,ct),fixed:!f(this,Ee)};f(this,ct)&&(s.values=i==null?void 0:i(),s.preCallback=e(s.values)),f(this,ut).push(s)});$(this,"memo",(e,i)=>{f(this,xt).push({callback:e,getDep:i,fixed:!f(this,Ee)})});$(this,"update",()=>_t(f(this,Kt)));Xs=this;const{mode:e,serializable:i,delegatesFocus:s,slotAssignment:o,aria:a}=f(this,lt,ke),{focusable:c,...u}=a||{};L(this,ye,e?this.attachShadow({mode:e,serializable:i,delegatesFocus:s,slotAssignment:o}):this),L(this,st,this.attachInternals()),f(this,st).stateList=[],f(this,st).sheets=[],Bs(f(this,st),u);let d;f(this,ut).push({fixed:!0,getDep:()=>[this.disabled],callback:([m=!1])=>{if(d===void 0&&(d=this.hasAttribute("tabindex")),f(this,st).ariaDisabled=String(m),c&&!d&&(this.tabIndex=-Number(m)),(c||s)&&m)return oi(this,"click",r=>r.isTrusted&&r.stopImmediatePropagation(),{capture:!0})}})}[vc](){f(this,ct)&&_t(f(this,Kt))}get internals(){return f(this,st)}connectedCallback(){f(this,lt,ke).noBlocking?Jt.add(f(this,Te)):f(this,Te).call(this)}disconnectedCallback(){var e,i;if(this.isConnected){L(this,we,!0);return}Jt.delete(f(this,Te)),Jt.delete(f(this,be)),L(this,ct,!1),(e=f(this,pn))==null||e.forEach(s=>s()),L(this,ut,Zs(f(this,ut))),L(this,xt,Zs(f(this,xt))),(i=f(this,Bt))==null||i.call(this)}}ye=new WeakMap,st=new WeakMap,ut=new WeakMap,xt=new WeakMap,$t=new WeakMap,we=new WeakMap,ct=new WeakMap,Ee=new WeakMap,Ce=new WeakMap,Bt=new WeakMap,lt=new WeakSet,ke=function(){return this.constructor[Symbol.metadata]},Ds=function(){return f(this,$t).findLast(e=>!e.condition||e.condition())},Yn=new WeakMap,Zn=new WeakMap,_n=new WeakMap,be=new WeakMap,Kt=new WeakMap,fn=new WeakMap,Xn=new WeakMap,ti=new WeakMap,pn=new WeakMap,Te=new WeakMap,h.createState=e=>{const i=Xs,s=Me(e,o=>{const a=f(i,ut).at(0);if(f(i,ct)&&a&&!a.initialized)throw new ft("Do't set state sync before insert the DOM");Bs(s,o),!f(i,Ce)&&f(i,ct)&&_t(f(i,Kt))});return f(i,st).stateList.push(s),s},h._createTemplate=(e,i)=>f(e,$t).push(i);const wc=Object.freeze(Object.defineProperty({__proto__:null,GemElement:J,SheetToken:yt,UpdateToken:Le,_RenderErrorEvent:Cn,get _createTemplate(){return h._createTemplate},get createState(){return h.createState},css:Qt,get html(){return h.html},isSSR:li,get render(){return h.render},setEngine:ai},Symbol.toStringTag,{value:"Module"})),{deleteProperty:Ec,getOwnPropertyDescriptor:di,defineProperty:bn}=Reflect,{getPrototypeOf:Tn,assign:Cc,hasOwn:Pn}=Object,tr=new Fs;function wt(n,t,e){var s;const i=n.metadata;di(i,t)||bn(i,t,{value:((s=i[t])==null?void 0:s.filter(o=>o!==e))||[]}),i[t].push(e)}function kn(n,t){const{value:e}=di(n,t)||{};Ec(n,t),n[t]=e}const ui=new WeakMap,{setAttribute:er,toggleAttribute:bc,removeAttribute:nr}=Element.prototype,_i=(n,t)=>{var e;return(e=ui.get(Tn(n)))==null?void 0:e.get(t)};J.prototype.setAttribute=function(n,t){const e=_i(this,n);if(!e)return er.call(this,n,t);this[e]=t},J.prototype.removeAttribute=function(n){const t=_i(this,n);if(!t)return nr.call(this,n);this[t]=null},J.prototype.toggleAttribute=function(n,t){const e=_i(this,n);return e?this[e]=t??!this.hasAttribute(n):bc.call(this,n,t)};function Tc(){}const ir=Symbol("event handle");function fi(n,t,{attr:e,attrType:i,event:s,eventOptions:o}={}){bn(n,t,{configurable:!0,get(){const a=tr.get(this)[t];return s&&!a?(this[t]=Tc,this[t]):a},set(a){const c=this,u=tr.get(c);e&&(a=i===Boolean&&a===""?!0:i(a||""),a?er.call(this,e,i===Boolean?"":a):nr.call(this,e)),a!==u[t]&&(s?(u[t]=a!=null&&a[ir]?a:async(d,m)=>{await Promise.resolve();const r=new CustomEvent(s,{...m,...o,detail:d});c.dispatchEvent(r),await a(d,m)},u[t][ir]=!0):(u[t]=a,this[Le]()))}})}const sr=new WeakMap;function Ae(n,{metadata:t}){const e=sr.get(t);if(e)return e;let i=n;do i=Tn(i);while(i.constructor[Symbol.metadata]!==t);return sr.set(t,i),i}function pi(n,t){const e=n.name,i=At(e);return n.addInitializer(function(){const s=Ae(this,n);Pn(s,e)||(wt(n,"observedAttributes",i),fi(s,e,{attr:i,attrType:t})),kn(this,e);const o=Tn(this),a=ui.get(o)||new Map;a.set(i,e),ui.set(o,a)}),function(s){return this.getAttribute(i)??s}}function F(n,t){return pi(t,String)}function Ne(n,t){return pi(t,Boolean)}function rr(n,t){return pi(t,Number)}function x(n,t){const e=t.name;return t.addInitializer(function(){const i=Ae(this,t);Pn(i,e)||(wt(t,"observedProperties",e),fi(i,e)),kn(this,e)}),function(i){return this[e]??i}}function mi(n){return(t,e)=>{const{addInitializer:i,name:s,access:o,kind:a}=e;i(function(){const c=n&&(()=>n(this));if(a==="getter"){if(e.private)throw new ft("not support");const u=Ae(this,e),d=di(u,s).get.bind(this);this.memo(()=>{bn(this,s,{configurable:!0,value:d()})},c)}else this.memo(o.get.call(this,this).bind(this),c)})}}function pt(n){return(t,{addInitializer:e,access:i})=>{e(function(){this.effect(i.get.call(this,this).bind(this),n&&(()=>n(this)))})}}function or(){return(n,{addInitializer:t,access:e})=>{t(function(){this.effect(()=>e.get.call(this,this).bind(this),()=>[])})}}function Mn(){return mi(()=>[])}function Yt(){return pt(()=>[])}function Nt(n){return(t,{addInitializer:e,access:i})=>{e(function(){h._createTemplate(this,{render:i.get.call(this,this).bind(this),condition:n&&(()=>n(this))})})}}function ar(){return(n,{addInitializer:t,access:e})=>{t(function(){this.addEventListener(Cn,({detail:i})=>{h.render(e.get.call(this,this).apply(this,[i]),this.internals.shadowRoot||this)})})}}function Pc(n,t,e){bn(n,t,{configurable:!0,get(){const i=this,{states:s}=i.internals;return s==null?void 0:s.has(e)},set(i){const s=this,{states:o}=s.internals;i?o==null||o.add(e):o==null||o.delete(e)}})}function Re(n,t){const e=t.name,i=At(e);t.addInitializer(function(){const s=Ae(this,t);Pn(s,e)||(wt(t,"definedCSSStates",i),Pc(s,e,i)),kn(this,e)})}function cr(n,t,e,i){const s=n.name,o=At(s);if(n.static)wt(n,e,o);else{const a=Tn(t);a[s]||(a[s]=o,wt(n,e,o))}return i||o}function lr(n,t){return function(e){return cr(t,this,"definedSlots",e)}}function gi(n,t){return function(e){return cr(t,this,"definedParts",e)}}function Zt(n,t){dr(t)}function hr(n,t){dr(t,{bubbles:!0,composed:!0})}function dr(n,t){const e=n.name,i=At(e);n.addInitializer(function(){const s=Ae(this,n);Pn(s,e)||(wt(n,"definedEvents",i),fi(s,e,{event:i,eventOptions:t})),kn(this,e)})}function Ie(n){return(t,e)=>{wt(e,"adoptedStyleSheets",n)}}function He(n){return(t,e)=>{wt(e,"observedStores",n)}}function Et({mode:n="open",serializable:t=!0,delegatesFocus:e,slotAssignment:i}={}){return(s,o)=>{const a=o.metadata;Cc(a,{mode:n,serializable:t,delegatesFocus:e,slotAssignment:i})}}function vi({penetrable:n}){return(t,e)=>{const i=e.metadata;i.penetrable=n}}function ur(){return(n,t)=>{const e=t.metadata;e.noBlocking=!0}}function We(n){return(t,e)=>{const i=e.metadata;i.aria={...i.aria,...n}}}function _r(n){return(t,{addInitializer:e})=>{e(()=>{customElements.define(n,t)})}}const kc=Object.freeze(Object.defineProperty({__proto__:null,adoptedStyle:Ie,aria:We,async:ur,attribute:F,boolattribute:Ne,connectStore:He,customElement:_r,effect:pt,emitter:Zt,fallback:ar,globalemitter:hr,light:vi,memo:mi,mounted:Yt,numattribute:rr,part:gi,property:x,shadow:Et,slot:lr,state:Re,template:Nt,unmounted:or,willMount:Mn},Symbol.toStringTag,{value:"Module"}));/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2017 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const
|
|
6
|
-
\f\r]`,
|
|
7
|
-
\f\r"'\`<>=]`,lc=`[^\\s"'>=/]`,Ne=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Gs=1,ni=2,dc=3,Vs=/-->/g,Ds=/>/g,Rt=new RegExp(`>|${ei}(?:(${lc}+)(${ei}*=${ei}*(?:${hc}|("|')|))|$)`,"g"),uc=0,xs=1,_c=2,Us=3,qs=/'/g,Fs=/"/g,Bs=/^(?:script|style|textarea|title)$/i,ii=1,yn=2,fc=3,pc=4,mc=5,si=6,gc=7;class wn{constructor(t,e,i){$(this,"type");$(this,"strings");$(this,"values");this.type=t,this.strings=e,this.values=i}}const ri=n=>(t,...e)=>new wn(n,t,e),st=ri(0),Ks=ri(1),js=ri(2),oi=Symbol.for("lit-noChange"),Qs=new WeakMap,It=Nt.createTreeWalker(Nt,129);function vc(n,t){if(!Array.isArray(n))throw new Error("invalid template");return Hs!==void 0?Hs.createHTML(t):t}const $c=(n,t)=>{const e=n.length-1,i=[];let s=t===1?"<svg>":t===2?"<math>":"",r,a=Ne;for(let l=0;l<e;l++){const u=n[l];let m=-1,o,g=0,h;for(;g<u.length&&(a.lastIndex=g,h=a.exec(u),h!==null);)g=a.lastIndex,a===Ne?h[Gs]==="!--"?a=Vs:h[Gs]!==void 0?a=Ds:h[ni]!==void 0?(Bs.test(h[ni])&&(r=new RegExp(`</${h[ni]}`,"g")),a=Rt):h[dc]!==void 0&&(a=Rt):a===Rt?h[uc]===">"?(a=r??Ne,m=-1):h[xs]===void 0?m=-2:(m=a.lastIndex-h[_c].length,o=h[xs],a=h[Us]===void 0?Rt:h[Us]==='"'?Fs:qs):a===Fs||a===qs?a=Rt:a===Vs||a===Ds?a=Ne:(a=Rt,r=void 0);const v=a===Rt&&n[l+1].startsWith("/>")?" ":"";s+=a===Ne?u+ac:m>=0?(i.push(o),u.slice(0,m)+Ws+u.slice(m)+yt+v):u+yt+(m===-2?l:v)}const c=s+(n[e]||"<?>")+(t===1?"</svg>":t===2?"</math>":"");return[vc(n,c),i]};class ai{constructor({strings:t,type:e},i){$(this,"el");$(this,"parts",[]);let s,r=0,a=0;const c=t.length-1,l=this.parts,[u,m]=$c(t,e);if(this.el=ai.createElement(u,i),It.currentNode=this.el.content,e===1||e===2){const o=this.el.content.firstChild;o.replaceWith(...o.childNodes)}for(;(s=It.nextNode())!==null&&l.length<c;){if(s.nodeType===1){if(s.hasAttributes())for(const o of s.getAttributeNames())if(o.endsWith(Ws)){const g=m[a++],v=s.getAttribute(o).split(yt),y=/([.?@])?(.*)/.exec(g);l.push({type:ii,index:r,name:y[2],strings:v,ctor:y[1]==="."?wc:y[1]==="?"?Sc:y[1]==="@"?Ec:Sn}),s.removeAttribute(o)}else o.startsWith(yt)&&(l.push({type:si,index:r}),s.removeAttribute(o));if(Bs.test(s.tagName)){const o=s.textContent.split(yt),g=o.length-1;if(g>0){s.textContent=$t?$t.emptyScript:"";for(let h=0;h<g;h++)s.append(o[h],Ae()),It.nextNode(),l.push({type:yn,index:++r});s.append(o[g],Ae())}}}else if(s.nodeType===8)if(s.data===zs)l.push({type:yn,index:r});else{let g=-1;for(;(g=s.data.indexOf(yt,g+1))!==-1;)l.push({type:gc,index:r}),g+=yt.length-1}r++}}static createElement(t,e){const i=Nt.createElement("template");return i.innerHTML=t,i}}function Yt(n,t,e=n,i){var a,c;if(t===oi)return t;let s=i!==void 0?(a=e.__directives)==null?void 0:a[i]:e.__directive;const r=Le(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=Yt(n,s._$resolve(n,t.values),s,i)),t}class yc{constructor(t,e){$(this,"_$template");$(this,"_$parts",[]);$(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=((t==null?void 0:t.creationScope)??Nt).importNode(e,!0);It.currentNode=s;let r=It.nextNode(),a=0,c=0,l=i[0];for(;l!==void 0;){if(a===l.index){let u;l.type===yn?u=new Re(r,r.nextSibling,this,t):l.type===ii?u=new l.ctor(r,l.name,l.strings,this,t):l.type===si&&(u=new Cc(r,this,t)),this._$parts.push(u),l=i[++c]}a!==(l==null?void 0:l.index)&&(r=It.nextNode(),a++)}return It.currentNode=Nt,s}_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._$setValue(t[e])),e++}}class Re{constructor(t,e,i,s){$(this,"type",yn);$(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=Yt(this,t,e),Le(t)?Jt(t)||t===""?(Jt(this._$committedValue)||this._$clear(),this._$committedValue=void 0):t!==this._$committedValue&&t!==oi&&this._commitText(t):t instanceof wn?this._commitTemplateResult(t):t.nodeType!==void 0?this._commitNode(t):cc(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(!Jt(this._$committedValue)&&Le(this._$committedValue)){const e=this._$startNode.nextSibling;e.data=t}else this._commitNode(Nt.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 yc(i,this),a=r._clone(this.options);r._update(e),this._commitNode(a),this._$committedValue=r}}_$getTemplate(t){let e=Qs.get(t.strings);return e===void 0&&Qs.set(t.strings,e=new ai(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 Re(this._insert(Ae()),this._insert(Ae()),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 Sn{constructor(t,e,i,s,r){$(this,"type",ii);$(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=Yt(this,t,e,0),a=!Le(t)||t!==this._$committedValue,a&&(this._$committedValue=t);else{const c=t;t=r[0];let l,u;for(l=0;l<r.length-1;l++)u=Yt(this,c[i+l],e,l),a||(a=!Le(u)||u!==this._$committedValue[l]),Jt(u)?t=void 0:Jt(t)||(t+=u+r[l+1]),this._$committedValue[l]=u}a&&!s&&this._commitValue(t)}_commitValue(t){Jt(t)?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t)}}class wc extends Sn{constructor(){super(...arguments);$(this,"type",fc)}_commitValue(e){this.element[this.name]=e}}class Sc extends Sn{constructor(){super(...arguments);$(this,"type",pc)}_commitValue(e){this.element.toggleAttribute(this.name,!!e)}}class Ec extends Sn{constructor(e,i,s,r,a){super(e,i,s,r,a);$(this,"type",mc)}_$setValue(e,i=this){e=Yt(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 Cc{constructor(t,e,i){$(this,"type",si);$(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 Ys)t.value=this.element;else if(t._$litDirective$)Yt(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 Js=()=>new Ys;class Ys{constructor(){$(this,"value")}}const En=(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 Re(t.insertBefore(Ae(),r),r,void 0,e??{})}return s._$setValue(n),s},{assign:bc,fromEntries:Tc,entries:Pc,keys:kc}=Object,ci=new Set;function wt(n){ci.has(n)||(queueMicrotask(()=>{ci.delete(n),n()}),ci.add(n))}function Ie(n,t){const e=t;return delete e.name,delete e.length,bc(e,n),e}function hi(n="",t=""){const{pathname:e,search:i,hash:s}=new URL(t,location.origin+n);return e+i+decodeURIComponent(s)}function li(n,t,e,i){return n.addEventListener(t,e,i),()=>n.removeEventListener(t,e,i)}class Zs extends EventTarget{constructor(){super(...arguments);C(this,_n);C(this,At,new Map);C(this,gt);C(this,Lt)}get size(){return f(this,At).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,At).get(e)}add(e){f(this,Lt)||this.dispatchEvent(new CustomEvent("start"));const i=Ns(this,_n,Rs).call(this,e)||{value:e};i.prev=f(this,Lt),i.prev&&(i.prev.next=i),i.next=void 0,A(this,Lt,i),f(this,gt)||A(this,gt,i),f(this,At).set(e,i)}delete(e){const i=Ns(this,_n,Rs).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}}At=new WeakMap,gt=new WeakMap,Lt=new WeakMap,_n=new WeakSet,Rs=function(e){const i=f(this,At).get(e);return i&&(i.prev?i.prev.next=i.next:A(this,gt,i.next),i.next?i.next.prev=i.prev:A(this,Lt,i.prev),f(this,At).delete(e)),i};class Xs extends WeakMap{get(t){let e=super.get(t);return e||(e={},this.set(t,e)),e}}class Zt extends URLSearchParams{constructor(e){super(e);C(this,$e,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=Tc(new URLSearchParams(e).entries()):i=e,Pc(i).forEach(([s,r])=>{this.append(s,f(this,$e).call(this,r))})}setAny(e,i){if(Array.isArray(i))this.delete(e),i.forEach(s=>this.append(e,f(this,$e).call(this,s)));else{const s=f(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=>f(this,jn).call(this,i))}toString(){const e=super.toString();return e?`?${e}`:""}toJSON(){return this.toString()}}$e=new WeakMap,jn=new WeakMap;function di(n,...t){return n.reduce((e,i,s)=>e+(t[s-1]??"")+i)}const Mc=di;function Cn(n=5){const t=Math.random().toString(36).slice(2,2+n);return t.length<n?t+Cn(n-t.length):t}function Ht(n){return n.replace(/[A-Z]/g,t=>"-"+t.toLowerCase())}function Oc(n){return n.replace(/-(.)/g,(t,e)=>e.toUpperCase())}function bn(n){return kc(n).forEach(t=>{delete n[t]}),n}class ft extends Error{constructor(t){super(t),this.message=`gem: ${this.message}`}}function tr(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 Tn(n,t,e){let i=t;for(const s in n){const r=e(s,n[s]);i+=r?r+t:""}return i}function Ac(n){return Tn(n,";",(t,e)=>e||e===0?`${Ht(t)}:${e}`:"")}function er(n){return Tn(n," ",(t,e)=>e?t:"")}const Lc=er;function Nc(n){return Tn(n,",",(t,e)=>e===!0||t===e?t:e?`${t}:${e}`:"")}const He=new WeakMap;function St(n){const t=Ie(n,e=>{var i;Object.assign(t,e),(i=He.get(t))==null||i.forEach(s=>wt(s))});return He.set(t,new Set),t}function dt(n,t){const e=He.get(n);return e==null||e.add(t),()=>e==null?void 0:e.delete(t)}const Rc=Object.freeze(Object.defineProperty({__proto__:null,_StoreListenerMap:He,connect:dt,createStore:St},Symbol.toStringTag,{value:"Module"}));/**
|
|
5
|
+
*/const Ge=globalThis.trustedTypes,fr=Ge==null?void 0:Ge.createPolicy("lit-html",{createHTML:n=>n}),pr="$lit$",Ct=`lit$${Math.random().toFixed(9).slice(2)}$`,mr="?"+Ct,Mc=`<${mr}>`,Rt=document,Xt=()=>Rt.createComment(""),ze=n=>n===null||typeof n!="object"&&typeof n!="function",te=n=>n==null,Oc=n=>Symbol.iterator in n,$i=`[
|
|
6
|
+
\f\r]`,Lc=`[^
|
|
7
|
+
\f\r"'\`<>=]`,Ac=`[^\\s"'>=/]`,Ve=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,gr=1,Si=2,Nc=3,vr=/-->/g,$r=/>/g,It=new RegExp(`>|${$i}(?:(${Ac}+)(${$i}*=${$i}*(?:${Lc}|("|')|))|$)`,"g"),Rc=0,Sr=1,Ic=2,yr=3,wr=/'/g,Er=/"/g,Cr=/^(?:script|style|textarea|title)$/i,Hc=1,On=2,Ln=3,yi=1,An=2,Wc=3,Gc=4,zc=5,wi=6,Vc=7,br="v-if",Tr="v-else-if",Pr="v-else";class Ei{constructor(t,e,i){$(this,"type");$(this,"strings");$(this,"values");this.type=t,this.strings=e,this.values=i}}const Ci=n=>(t,...e)=>new Ei(n,t,e),Dc=Ci(Hc),Uc=Ci(On),Fc=Ci(Ln),bi=Symbol.for("lit-noChange"),kr=new WeakMap,Ht=Rt.createTreeWalker(Rt,129);function qc(n,t){if(!Array.isArray(n))throw new Error("invalid template");return fr!==void 0?fr.createHTML(t):t}const xc=(n,t)=>{const e=n.length-1,i=[];let s=t===On?"<svg>":t===Ln?"<math>":"",o,a=Ve;for(let u=0;u<e;u++){const d=n[u];let m=-1,r,g=0,l;for(;g<d.length&&(a.lastIndex=g,l=a.exec(d),l!==null);)g=a.lastIndex,a===Ve?l[gr]==="!--"?a=vr:l[gr]!==void 0?a=$r:l[Si]!==void 0?(Cr.test(l[Si])&&(o=new RegExp(`</${l[Si]}`,"g")),a=It):l[Nc]!==void 0&&(a=It):a===It?l[Rc]===">"?(a=o??Ve,m=-1):l[Sr]===void 0?m=-2:(m=a.lastIndex-l[Ic].length,r=l[Sr],a=l[yr]===void 0?It:l[yr]==='"'?Er:wr):a===Er||a===wr?a=It:a===vr||a===$r?a=Ve:(a=It,o=void 0);const v=a===It&&n[u+1].startsWith("/>")?" ":"";s+=a===Ve?d+Mc:m>=0?(i.push(r),d.slice(0,m)+pr+d.slice(m)+Ct+v):d+Ct+(m===-2?u:v)}const c=s+(n[e]||"<?>")+(t===On?"</svg>":t===Ln?"</math>":"");return[qc(n,c),i]};class Ti{constructor({strings:t,type:e},i){$(this,"el");$(this,"parts",[]);let s,o=0,a=0;const c=t.length-1,u=this.parts,[d,m]=xc(t,e);if(this.el=Ti.createElement(d,i),Ht.currentNode=this.el.content,e===On||e===Ln){const r=this.el.content.firstChild;r.replaceWith(...r.childNodes)}for(;(s=Ht.nextNode())!==null&&u.length<c;){if(s.nodeType===1){if(s.hasAttributes())for(const r of s.getAttributeNames())if(r.endsWith(pr)){const g=m[a++],v=s.getAttribute(r).split(Ct),S=/([.?@])?(.*)/.exec(g);u.push({type:yi,index:o,name:S[2],strings:v,ctor:S[1]==="."?jc:S[1]==="?"?Qc:S[1]==="@"?Jc:Nn}),s.removeAttribute(r)}else r.startsWith(Ct)&&(u.push({type:wi,index:o}),s.removeAttribute(r));if(Cr.test(s.tagName)){const r=s.textContent.split(Ct),g=r.length-1;if(g>0){s.textContent=Ge?Ge.emptyScript:"";for(let l=0;l<g;l++)s.append(r[l],Xt()),Ht.nextNode(),u.push({type:An,index:++o});s.append(r[g],Xt())}}}else if(s.nodeType===8)if(s.data===mr)u.push({type:An,index:o});else{let g=-1;for(;(g=s.data.indexOf(Ct,g+1))!==-1;)u.push({type:Vc,index:o}),g+=Ct.length-1}o++}}static createElement(t,e){const i=Rt.createElement("template");return i.innerHTML=t,i}}function ee(n,t,e=n,i){var a,c;if(t===bi)return t;let s=i!==void 0?(a=e.__directives)==null?void 0:a[i]:e.__directive;const o=ze(t)?void 0:t._$litDirective$;return(s==null?void 0:s.constructor)!==o&&((c=s==null?void 0:s._$notifyDirectiveConnectionChanged)==null||c.call(s,!1),o===void 0?s=void 0:(s=new o(n),s._$initialize(n,e,i)),i!==void 0?(e.__directives??(e.__directives=[]))[i]=s:e.__directive=s),s!==void 0&&(t=ee(n,s._$resolve(n,t.values),s,i)),t}class Bc{constructor(t,e){$(this,"_$template");$(this,"_$parts",[]);$(this,"_$conditions",[]);$(this,"_$parent");$(this,"_$disconnectableChildren");this._$template=t,this._$parent=e}get parentNode(){return this._$parent.parentNode}get _$isConnected(){return this._$parent._$isConnected}_clone(t){const{el:{content:e},parts:i}=this._$template,s=new Map,o=new Map,a=((t==null?void 0:t.creationScope)??Rt).importNode(e,!0);Ht.currentNode=a;let c=Ht.nextNode(),u=0,d=0,m=i[0];for(;m!==void 0;){if(u===m.index){let r;m.type===An?r=new De(c,c.nextSibling,this,t):m.type===yi?(m.name===br&&s.set(c,d),m.name===Tr&&o.set(c,d),r=new m.ctor(c,m.name,m.strings,this,t)):m.type===wi&&(r=new Yc(c,this,t)),this._$parts.push(r),m=i[++d]}u!==(m==null?void 0:m.index)&&(c=Ht.nextNode(),u++)}return s.forEach((r,g)=>{const l=new Kc(g,r);this._$conditions.push(l);let v=g;for(;v=v.nextElementSibling;){const S=o.get(v);if(S===void 0)break;l.push(v,S)}}),Ht.currentNode=Rt,a}_update(t){let e=0;for(const i of this._$parts)i!==void 0&&(i.strings!==void 0?(i._$setValue(t,i,e),e+=i.strings.length-2):i.name===br||i.name===Tr||i._$setValue(t[e])),e++;this._$conditions.forEach(i=>i.update(t))}}class Kc{constructor(t,e){$(this,"mark");$(this,"list");const i=Xt();t.before(i),this.mark=i,this.list=[{ele:t,idx:e}],this.check()}get next(){return this.list.at(-1).ele.nextElementSibling}push(t,e){this.list.push({ele:t,idx:e}),this.check()}check(){const t=this.next;t!=null&&t.attributes.getNamedItem(Pr)&&(this.list.push({ele:t}),t.removeAttribute(Pr))}update(t){const{mark:e,list:i}=this,s=i.find(({idx:o})=>o===void 0||!!t[o]);s&&!s.ele.parentNode&&e.after(s.ele),i.forEach(({ele:o})=>(!s||o!==s.ele)&&o.remove())}}class De{constructor(t,e,i,s){$(this,"type",An);$(this,"options");$(this,"_$committedValue");$(this,"__directive");$(this,"_$startNode");$(this,"_$endNode");$(this,"_$parent");$(this,"__isConnected");$(this,"_$disconnectableChildren");this._$startNode=t,this._$endNode=e,this._$parent=i,this.options=s,this.__isConnected=(s==null?void 0:s.isConnected)??!0}get _$isConnected(){var t;return((t=this._$parent)==null?void 0:t._$isConnected)??this.__isConnected}get parentNode(){let t=this._$startNode.parentNode;const e=this._$parent;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$startNode}get endNode(){return this._$endNode}_$setValue(t,e=this){this.parentNode&&(t=ee(this,t,e),ze(t)?te(t)||t===""?(te(this._$committedValue)||this._$clear(),this._$committedValue=void 0):t!==this._$committedValue&&t!==bi&&this._commitText(t):t instanceof Ei?this._commitTemplateResult(t):t.nodeType!==void 0?this._commitNode(t):Oc(t)?this._commitIterable(t):this._commitText(t))}_insert(t){return this._$startNode.parentNode.insertBefore(t,this._$endNode)}_commitNode(t){this._$committedValue!==t&&(this._$clear(),this._$committedValue=this._insert(t))}_commitText(t){if(!te(this._$committedValue)&&ze(this._$committedValue)){const e=this._$startNode.nextSibling;e.data=t}else this._commitNode(Rt.createTextNode(t));this._$committedValue=t}_commitTemplateResult(t){var s;const{values:e}=t,i=this._$getTemplate(t);if(((s=this._$committedValue)==null?void 0:s._$template)===i)this._$committedValue._update(e);else{const o=new Bc(i,this),a=o._clone(this.options);o._update(e),this._commitNode(a),this._$committedValue=o}}_$getTemplate(t){let e=kr.get(t.strings);return e===void 0&&kr.set(t.strings,e=new Ti(t)),e}_commitIterable(t){Array.isArray(this._$committedValue)||(this._$committedValue=[],this._$clear());const e=this._$committedValue;let i=0,s;for(const o of t)i===e.length?e.push(s=new De(this._insert(Xt()),this._insert(Xt()),this,this.options)):s=e[i],s._$setValue(o),i++;i<e.length&&(this._$clear(s&&s._$endNode.nextSibling,i),e.length=i)}_$clear(t=this._$startNode.nextSibling,e){var i;for((i=this._$notifyConnectionChanged)==null||i.call(this,!1,!0,e);t&&t!==this._$endNode;){const s=t.nextSibling;t.remove(),t=s}}setConnected(t){var e;this._$parent===void 0&&(this.__isConnected=t,(e=this._$notifyConnectionChanged)==null||e.call(this,t))}}class Nn{constructor(t,e,i,s,o){$(this,"type",yi);$(this,"element");$(this,"name");$(this,"options");$(this,"strings");$(this,"_$committedValue");$(this,"__directives");$(this,"_$parent");$(this,"_$disconnectableChildren");this.element=t,this.name=e,this._$parent=s,this.options=o,i.length>2||i[0]!==""||i[1]!==""?(this._$committedValue=new Array(i.length-1).fill(new String),this.strings=i):this._$committedValue=void 0}get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}_$setValue(t,e=this,i,s){const o=this.strings;let a=!1;if(o===void 0)t=ee(this,t,e,0),a=!ze(t)||t!==this._$committedValue,a&&(this._$committedValue=t);else{const c=t;t=o[0];let u,d;for(u=0;u<o.length-1;u++)d=ee(this,c[i+u],e,u),a||(a=!ze(d)||d!==this._$committedValue[u]),te(d)?t=void 0:te(t)||(t+=d+o[u+1]),this._$committedValue[u]=d}a&&!s&&this._commitValue(t)}_commitValue(t){te(t)?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t)}}class jc extends Nn{constructor(){super(...arguments);$(this,"type",Wc)}_commitValue(e){this.element[this.name]=e}}class Qc extends Nn{constructor(){super(...arguments);$(this,"type",Gc)}_commitValue(e){this.element.toggleAttribute(this.name,!!e)}}class Jc extends Nn{constructor(){super(...arguments);$(this,"type",zc)}_$setValue(e,i=this){e=ee(this,e,i,0);const s=this._$committedValue,o=s&&(!e||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive),a=e&&(!s||o);o&&this.element.removeEventListener(this.name,this,s),a&&this.element.addEventListener(this.name,this,e),this._$committedValue=e}handleEvent(e){var i;typeof this._$committedValue=="function"?this._$committedValue.call(((i=this.options)==null?void 0:i.host)??this.element,e):this._$committedValue.handleEvent(e)}}class Yc{constructor(t,e,i){$(this,"type",wi);$(this,"__directive");$(this,"_$committedValue");$(this,"_$parent");$(this,"_$disconnectableChildren");$(this,"_$props");$(this,"options");this.element=t,this._$parent=e,this.options=i}get _$isConnected(){return this._$parent._$isConnected}_$setValue(t){if(t)if(t instanceof Mr)t.value=this.element;else if(t._$litDirective$)ee(this,t);else{if(this._$props)for(const e in this._$props)Reflect.set(this.element,e,void 0);Object.assign(this.element,t),this._$props=t}}}const Zc=()=>new Mr;class Mr{constructor(){$(this,"value")}}const Xc=(n,t,e)=>{const i=(e==null?void 0:e.renderBefore)??t;let s=i._$litPart$;if(s===void 0){const o=(e==null?void 0:e.renderBefore)??null;i._$litPart$=s=new De(t.insertBefore(Xt(),o),o,void 0,e??{})}return s._$setValue(n),s},Or="2.2.1",tl=Object.freeze(Object.defineProperty({__proto__:null,version:Or},Symbol.toStringTag,{value:"Module"}));/**
|
|
8
8
|
* @license
|
|
9
9
|
* Copyright 2017 Google LLC
|
|
10
10
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
|
-
*/const Ic={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},ui=n=>(...t)=>({_$litDirective$:n,values:t});class Hc{constructor(t){$(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 nr=()=>document.createComment(""),We=(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(nr(),s),c=i.insertBefore(nr(),s);e=new Re(a,c,n,n.options)}else{const a=e._$endNode.nextSibling,c=e._$parent,l=c!==n;if(l){(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||l){let u=e._$startNode;for(;u!==a;){const m=u.nextSibling;i.insertBefore(u,s),u=m}}}return e},Wt=(n,t,e=n)=>(n._$setValue(t,e),n),Wc={},zc=(n,t=Wc)=>n._$committedValue=t,Gc=n=>n._$committedValue,_i=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}},ir=(n,t,e)=>{const i=new Map;for(let s=t;s<=e;s++)i.set(n[s],s);return i};class Vc extends Hc{constructor(e){super(e);$(this,"_itemKeys");if(e.type!==Ic.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 l=0;for(const u of e)a[l]=r?r(u,l):l,c[l]=s(u,l),l++;return{values:c,keys:a}}render(e,i,s){return this._getValuesAndKeys(e,i,s).values}update(e,[i,s,r]){const a=Gc(e),{values:c,keys:l}=this._getValuesAndKeys(i,s,r);if(!Array.isArray(a))return this._itemKeys=l,c;const u=this._itemKeys??(this._itemKeys=[]),m=[];let o,g,h=0,v=a.length-1,y=0,E=c.length-1;for(;h<=v&&y<=E;)if(a[h]===null)h++;else if(a[v]===null)v--;else if(u[h]===l[y])m[y]=Wt(a[h],c[y]),h++,y++;else if(u[v]===l[E])m[E]=Wt(a[v],c[E]),v--,E--;else if(u[h]===l[E])m[E]=Wt(a[h],c[E]),We(e,m[E+1],a[h]),h++,E--;else if(u[v]===l[y])m[y]=Wt(a[v],c[y]),We(e,a[h],a[v]),v--,y++;else if(o===void 0&&(o=ir(l,y,E),g=ir(u,h,v)),!o.has(u[h]))_i(a[h]),h++;else if(!o.has(u[v]))_i(a[v]),v--;else{const k=g.get(l[y]),p=k!==void 0?a[k]:null;if(p===null){const T=We(e,a[h]);Wt(T,c[y]),m[y]=T}else m[y]=Wt(p,c[y]),We(e,a[h],p),a[k]=null;y++}for(;y<=E;){const k=We(e,m[E+1]);Wt(k,c[y]),m[y++]=k}for(;h<=v;){const k=a[h++];k!==null&&_i(k)}return this._itemKeys=l,zc(e,m),oi}}const sr=ui(Vc),{assign:rr,defineProperty:Dc}=Object;Dc(Symbol,"metadata",{value:Symbol.for("Symbol.metadata")});const or=n=>typeof n=="function"&&n(),Et=Symbol.for("gem@sheetToken"),ze=Symbol.for("gem@update"),ar="gem-style-boundary",Pn="gem@render-error",xc=ze,fi=new WeakMap,cr=new WeakMap;class Uc extends CSSStyleSheet{constructor(){super(...arguments);C(this,ut);$(this,"cssText","")}get element(){return f(this,ut)||(A(this,ut,document.createElement("style")),f(this,ut).textContent=this.cssText,f(this,ut).dataset.gemStyle=""),f(this,ut)}replaceSync(e){this.cssText=e,f(this,ut)&&(f(this,ut).textContent=e),super.replaceSync(e)}}ut=new WeakMap;class qc{constructor(t=""){C(this,Bt,"");C(this,fn,"");C(this,ye,new Map);C(this,we,new Map);A(this,fn,t)}setContent(t){A(this,Bt,t)}getStyle(t){var r;const e=t&&!((r=t.internals)!=null&&r.shadowRoot),i=e?t.constructor:this;if(!f(this,ye).has(i)){const a=new Uc({media:f(this,fn)});f(this,ye).set(i,a)}const s=f(this,ye).get(i);if(!f(this,we).has(s)){let a=f(this,Bt),c="";e&&(c=`@scope (${t.tagName}) to (:state(${ar}) > *)`,a=`${c}{ ${a} }`),s.replaceSync(a),f(this,we).set(s,c)}return s}updateStyle(){f(this,we).forEach((t,e)=>{e.replaceSync(t?`${t}{${f(this,Bt)}}`:f(this,Bt))})}}Bt=new WeakMap,fn=new WeakMap,ye=new WeakMap,we=new WeakMap;function Xt(n,...t){let e="",i="";const s=t.at(0);Array.isArray(n)?i=di(n,...t):s!==void 0?(e=n,i=s):i=n;const r=new qc(e),a={[Et]:r};let c="";return typeof i=="string"?c=i:Object.keys(i).forEach(l=>{const u=l==="$";a[l]=u||l.includes("-")?l:`${l}-${Cn()}`,c+=`${u?":where(:scope:not([hidden])),:host(:where(:not([hidden])))":`.${a[l]}`} {${i[l]}}`}),r.setContent(c),a}const hr=(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&&wt(cr.get(n))},Fc=(n,t)=>{const e=n.getRootNode();if(!fi.has(e)){const s=new Map;fi.set(e,s),cr.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=fi.get(e);return hr(i,t,1),()=>hr(i,t,-1)};d.createState=void 0;function lr(n){n==null||n.forEach(t=>{const{callback:e,getDep:i,values:s,preCallback:r}=t,a=i==null?void 0:i();(!i||!s||tr(s,a))&&(or(r),t.preCallback=e(a,s),t.values=a,t.initialized=!0)})}function dr(n){return n.filter(t=>(or(t.preCallback),t.initialized=!1,t.values=void 0,t.fixed))}const Bc=st`
|
|
12
|
-
<style>
|
|
13
|
-
:host {
|
|
14
|
-
display: none !important;
|
|
15
|
-
}
|
|
16
|
-
@scope {
|
|
17
|
-
:scope {
|
|
18
|
-
display: none !important;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
</style>
|
|
22
|
-
`;d._createTemplate=void 0;const te=new Zs,pi=(n=performance.now())=>{if(performance.now()>n+16)return requestAnimationFrame(pi);const t=te.get();t&&(t(),pi(n))};te.addEventListener("start",()=>wt(pi));let ur;const Me=class Me extends HTMLElement{constructor(){super();C(this,lt);C(this,Ee);C(this,it);C(this,_t,[]);C(this,Kt,[]);C(this,vt,[]);C(this,Ce);C(this,ht);C(this,be);C(this,Te);C(this,jt);C(this,Qn,()=>{lr(f(this,_t))});C(this,Jn,()=>{lr(f(this,Kt))});C(this,pn,e=>{try{A(this,Te,!0),f(this,Jn).call(this);const i=f(this,Ee)===this,s=e?e.render():i?void 0:st`<slot></slot>`;if(A(this,Te,!1),s===void 0)return;En(s===null?Bc:s,f(this,Ee))}catch(i){throw this.dispatchEvent(new CustomEvent(Pn,{bubbles:!0,composed:!0,detail:i})),i}});C(this,Pe,()=>{const e=f(this,lt,Is);f(this,ht)&&(e||!f(this,vt).length)&&(f(this,pn).call(this,e),wt(f(this,Qn)))});C(this,Qt,()=>{f(this,lt,Oe).noBlocking?te.add(f(this,Pe)):f(this,Pe).call(this)});C(this,mn,()=>{const{adoptedStyleSheets:e=[]}=f(this,lt,Oe),{shadowRoot:i,sheets:s}=f(this,it),r=e.map(a=>a[Et].getStyle(this));if(i)i.adoptedStyleSheets=r.concat(s);else return this.prepend(...s.map(a=>a.element)),Fc(this,r)});C(this,Yn,()=>{var e;(e=f(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,Zn,()=>{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,vt).length&&this.render&&f(this,vt).push({render:this.render.bind(this),condition:(e=this.shouldUpdate)==null?void 0:e.bind(this)})});C(this,gn);C(this,ke,async()=>{var r;if(f(this,Ce)){A(this,Ce,!1),(r=f(this,jt))==null||r.call(this),A(this,jt,f(this,mn).call(this));return}A(this,be,!0),f(this,Zn).call(this);const{observedStores:e,mode:i,penetrable:s}=f(this,lt,Oe);!i&&f(this,vt).length&&!s&&f(this,it).states.add(ar),A(this,gn,e==null?void 0:e.map(a=>dt(a,f(this,Qt)))),f(this,pn).call(this,f(this,lt,Is)),A(this,ht,!0),A(this,jt,f(this,mn).call(this)),await Promise.resolve(),f(this,Yn).call(this)});$(this,"effect",(e,i)=>{const s={callback:e,getDep:i,initialized:f(this,ht),fixed:!f(this,be)};f(this,ht)&&(s.values=i==null?void 0:i(),s.preCallback=e(s.values)),f(this,_t).push(s)});$(this,"memo",(e,i)=>{f(this,Kt).push({callback:e,getDep:i,fixed:!f(this,be)})});$(this,"update",()=>wt(f(this,Qt)));ur=this;const{mode:e,serializable:i,delegatesFocus:s,slotAssignment:r,aria:a}=f(this,lt,Oe),{focusable:c,...l}=a||{};A(this,Ee,e?this.attachShadow({mode:e,serializable:i,delegatesFocus:s,slotAssignment:r}):this),A(this,it,this.attachInternals()),f(this,it).stateList=[],f(this,it).sheets=[],rr(f(this,it),l);let u;f(this,_t).push({fixed:!0,getDep:()=>[this.disabled],callback:([m=!1])=>{if(u===void 0&&(u=this.hasAttribute("tabindex")),f(this,it).ariaDisabled=String(m),c&&!u&&(this.tabIndex=-Number(m)),(c||s)&&m)return li(this,"click",o=>o.isTrusted&&o.stopImmediatePropagation(),{capture:!0})}})}[xc](){f(this,ht)&&wt(f(this,Qt))}get internals(){return f(this,it)}connectedCallback(){return f(this,lt,Oe).noBlocking?te.add(f(this,ke)):f(this,ke).call(this),f(Me,Se)}adoptedCallback(){return f(Me,Se)}disconnectedCallback(){var e,i;if(this.isConnected){A(this,Ce,!0);return}return te.delete(f(this,ke)),te.delete(f(this,Pe)),A(this,ht,!1),(e=f(this,gn))==null||e.forEach(s=>s()),A(this,_t,dr(f(this,_t))),A(this,Kt,dr(f(this,Kt))),(i=f(this,jt))==null||i.call(this),f(Me,Se)}};Se=new WeakMap,Ee=new WeakMap,it=new WeakMap,_t=new WeakMap,Kt=new WeakMap,vt=new WeakMap,Ce=new WeakMap,ht=new WeakMap,be=new WeakMap,Te=new WeakMap,jt=new WeakMap,lt=new WeakSet,Oe=function(){return this.constructor[Symbol.metadata]},Is=function(){return f(this,vt).findLast(e=>!e.condition||e.condition())},Qn=new WeakMap,Jn=new WeakMap,pn=new WeakMap,Pe=new WeakMap,Qt=new WeakMap,mn=new WeakMap,Yn=new WeakMap,Zn=new WeakMap,gn=new WeakMap,ke=new WeakMap,C(Me,Se,Symbol()),d.createState=e=>{const i=ur,s=Ie(e,r=>{const a=f(i,_t).at(0);if(f(i,ht)&&a&&!a.initialized)throw new ft("Do't set state sync before insert the DOM");rr(s,r),!f(i,Te)&&f(i,ht)&&wt(f(i,Qt))});return f(i,it).stateList.push(s),s},d._createTemplate=(e,i)=>f(e,vt).push(i);let F=Me;const Kc=Object.freeze(Object.defineProperty({__proto__:null,GemElement:F,SheetToken:Et,TemplateResult:wn,UpdateToken:ze,_RenderErrorEvent:Pn,get _createTemplate(){return d._createTemplate},createRef:Js,get createState(){return d.createState},css:Xt,directive:ui,html:st,mathml:js,render:En,repeat:sr,svg:Ks},Symbol.toStringTag,{value:"Module"})),_r="0.0.0",jc=Object.freeze(Object.defineProperty({__proto__:null,version:_r},Symbol.toStringTag,{value:"Module"})),{deleteProperty:Qc,getOwnPropertyDescriptor:fr,defineProperty:kn}=Reflect,{getPrototypeOf:ee,assign:pr}=Object,mr=new Xs;function Ct(n,t,e){var s;const i=n.metadata;fr(i,t)||kn(i,t,{value:((s=i[t])==null?void 0:s.filter(r=>r!==e))||[]}),i[t].push(e)}function Mn(n,t){const{value:e}=fr(n,t);Qc(n,t),n[t]=e}const Ge=new WeakMap,{setAttribute:gr,toggleAttribute:Jc,removeAttribute:vr}=Element.prototype;F.prototype.setAttribute=function(n,t){var i;const e=(i=Ge.get(ee(this)))==null?void 0:i.get(n);if(!e)return gr.call(this,n,t);this[e]=t},F.prototype.removeAttribute=function(n){var e;const t=(e=Ge.get(ee(this)))==null?void 0:e.get(n);if(!t)return vr.call(this,n);this[t]=null},F.prototype.toggleAttribute=function(n,t){var i;const e=(i=Ge.get(ee(this)))==null?void 0:i.get(n);return e?this[e]=t??!this.hasAttribute(n):Jc.call(this,n,t)};function Yc(){}const $r=Symbol("event handle");function mi(n,t,{attr:e,attrType:i,event:s,eventOptions:r}={}){kn(n,t,{configurable:!0,get(){const a=mr.get(this)[t];return s&&!a?(this[t]=Yc,this[t]):a},set(a){const c=this,l=mr.get(c);e&&(a=i===Boolean&&a===""?!0:i(a||""),a?gr.call(this,e,i===Boolean?"":a):vr.call(this,e)),a!==l[t]&&(s?(l[t]=a!=null&&a[$r]?a:async(u,m)=>{await Promise.resolve();const o=new CustomEvent(s,{...m,...r,detail:u});c.dispatchEvent(o),await a(u,m)},l[t][$r]=!0):(l[t]=a,this[ze]()))}})}const yr=new WeakMap;function On(n,{metadata:t}){const e=yr.get(t);if(e)return e;let i=n;do i=ee(i);while(i.constructor[Symbol.metadata]!==t);return yr.set(t,i),i}function gi(n,t){const e=n.name,i=Ht(e);return n.addInitializer(function(){const s=On(this,n);s.hasOwnProperty(e)||(Ct(n,"observedAttributes",i),mi(s,e,{attr:i,attrType:t})),Mn(this,e);const r=ee(this),a=Ge.get(r)||new Map;a.set(i,e),Ge.set(r,a)}),function(s){return this.getAttribute(i)??s}}function U(n,t){return gi(t,String)}function Ve(n,t){return gi(t,Boolean)}function wr(n,t){return gi(t,Number)}function B(n,t){const e=t.name;return t.addInitializer(function(){const i=On(this,t);i.hasOwnProperty(e)||(Ct(t,"observedProperties",e),mi(i,e)),Mn(this,e)}),function(i){return this[e]??i}}function vi(n){return function(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 ft("not support");this.memo(()=>kn(this,s,{configurable:!0,value:r.get(this)}),c)}else this.memo(r.get(this).bind(this),c)})}}function pt(n){return function(t,{addInitializer:e,access:i}){e(function(){this.effect(i.get(this).bind(this),n&&(()=>n(this)))})}}function Sr(){return function(n,{addInitializer:t,access:e}){t(function(){this.effect(()=>e.get(this).bind(this),()=>[])})}}function An(){return vi(()=>[])}function ne(){return pt(()=>[])}function zt(n){return function(t,{addInitializer:e,access:i}){e(function(){d._createTemplate(this,{render:i.get(this).bind(this),condition:n&&(()=>n(this))})})}}function Er(){return function(n,{addInitializer:t,access:e}){t(function(){this.addEventListener(Pn,({detail:i})=>{En(e.get(this).apply(this,[i]),this.internals.shadowRoot||this)})})}}function Zc(n,t,e){kn(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 De(n,t){const e=t.name,i=Ht(e);t.addInitializer(function(){const s=On(this,t);s.hasOwnProperty(e)||(Ct(t,"definedCSSStates",i),Zc(s,e,i)),Mn(this,e)})}function Cr(n,t,e,i){const s=n.name,r=Ht(s);if(n.static)Ct(n,e,r);else{const a=ee(t);a[s]||(a[s]=r,Ct(n,e,r))}return i||r}function br(n,t){return function(e){return Cr(t,this,"definedSlots",e)}}function $i(n,t){return function(e){return Cr(t,this,"definedParts",e)}}function ie(n,t){Pr(t)}function Tr(n,t){Pr(t,{bubbles:!0,composed:!0})}function Pr(n,t){const e=n.name,i=Ht(e);n.addInitializer(function(){const s=On(this,n);s.hasOwnProperty(e)||(Ct(n,"definedEvents",i),mi(s,e,{event:i,eventOptions:t})),Mn(this,e)})}function xe(n){return function(t,e){Ct(e,"adoptedStyleSheets",n)}}function Ue(n){return function(t,e){Ct(e,"observedStores",n)}}function bt({mode:n="open",serializable:t=!0,delegatesFocus:e,slotAssignment:i}={}){return function(s,r){const a=r.metadata;pr(a,{mode:n,serializable:t,delegatesFocus:e,slotAssignment:i})}}function yi({penetrable:n}){return function(t,e){const i=e.metadata;i.penetrable=n}}function kr(){return function(n,t){const e=t.metadata;e.noBlocking=!0}}function qe(n){return function(t,e){const i=e.metadata;i.aria={...i.aria,...n}}}function Mr(n){return function(t,{addInitializer:e}){e(function(){customElements.define(n,t)})}}window.__GEM_DEVTOOLS__HOOK__&&!window.__GEM_DEVTOOLS__HOOK__.GemElement&&pr(window.__GEM_DEVTOOLS__HOOK__,{...Kc,...O,...Rc,...jc});const Z=window.history,Or=Z.pushState.bind(Z),Ar=Z.replaceState.bind(Z);let Xc=0;const wi=()=>`${performance.now()}-${++Xc}`,L=St({$hasCloseHandle:!1,$hasOpenHandle:!1,$hasShouldCloseHandle:!1,$key:""}),K=new Map;function Lr(n){const{$key:t,$hasCloseHandle:e,$hasOpenHandle:i,$hasShouldCloseHandle:s}=n||{};if(L.$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 Nr(n){return X.basePath?X.basePath+n:n}function Si(n){return n===X.basePath?"/":n.replace(new RegExp(`^${X.basePath}/`),"/")}function Ei(){X.dispatchEvent(new CustomEvent("beforechange"))}function Ln(n){const t=K.get(L.$key)||{path:Si(location.pathname),query:new Zt},e=n.path?hi(t.path,n.path):Si(location.pathname),i=new Zt(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),l=n.close||n.data||n.open||n.shouldClose,u=decodeURIComponent(n.hash??(!a&&l?location.hash:""));return{...n,title:c,path:e,query:r,hash:u}}function Rr(n,t){Lr(n.data);const e=Ln(n),{title:i,path:s,query:r,hash:a,close:c,open:l,shouldClose:u,data:m}=e,o={$hasCloseHandle:!!c,$hasOpenHandle:!!l,$hasShouldCloseHandle:!!u,$key:wi(),$title:i,...m};K.set(o.$key,e),Ei(),bn(L),L(o);const g=Nr(s)+new Zt(r)+a,h=decodeURIComponent(location.hash);t(o,i,g),h!==a&&window.dispatchEvent(new CustomEvent("hashchange"))}function Ir(n,t,e,i){Lr(n);const s={$key:wi(),$title:t,...n||{}},{pathname:r,search:a,hash:c}=new URL(e,location.origin+location.pathname),l=Ln({path:r,query:new Zt(a),hash:c,title:t,data:n});K.set(s.$key,l),Ei(),bn(L),L(s);const u=Nr(r)+l.query+c,m=location.hash;i(s,t,u),m!==c&&window.dispatchEvent(new CustomEvent("hashchange"))}const Ci=St({basePath:""});class th extends EventTarget{get store(){return L}get currentKey(){return L.$key}get basePath(){return Ci.basePath}set basePath(t){Ci({basePath:t}),Object.assign(K.get(L.$key),{path:Si(location.pathname)})}getParams(){return K.get(L.$key)}updateParams(t){Object.assign(K.get(L.$key),t),L()}push(t){Rr(t,Or)}replace(t){Rr(t,Ar)}pushIgnoreCloseHandle(t){var e,i;L.$hasCloseHandle?((i=(e=K.get(L.$key))==null?void 0:e.close)==null||i.call(e),this.replace(t)):this.push(t)}forward(){Z.forward()}back(){Z.back()}}const X=new th,Fe=St({defaultTitle:document.title,url:"",title:""}),eh={history:X,titleStore:Fe,basePathStore:Ci};if(!window._GEMHISTORY){if(window._GEMHISTORY=eh,Z.pushState=function(t,e,i){Ir(t,e,i,Or)},Z.replaceState=function(t,e,i){Ir(t,e,i,Ar)},window.addEventListener("hashchange",({isTrusted:t})=>{t&&X.replace({hash:location.hash})}),Z.state)if(Z.state.$hasCloseHandle){L(Z.state);const t=Ln({title:document.title});K.set(L.$key,t),X.back()}else{const t=Ln({title:document.title,hash:location.hash});L({$key:wi(),...Z.state||{}}),K.set(L.$key,t)}else{const{protocol:t,pathname:e,search:i,hash:s}=location;t.startsWith("http")&&X.replace({path:e,query:i,hash:s})}dt(Fe,()=>{const t=K.get(L.$key);t&&(t.title=Fe.title)}),dt(L,()=>{const{title:t}=X.getParams();t!==Fe.title&&Fe({title:t})});let n=!1;window.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:l,hash:u}=location;K.set(e.$key,{path:c,query:new Zt(l),hash:decodeURIComponent(u),title:e.$title,data:e})}const i=L;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),l=c==null?void 0:c.close,u=c==null?void 0:c.shouldClose;if(u&&!u()){n=!0,X.forward();return}else l?l():e.$hasCloseHandle&&(n=!0,X.back())}Ei(),bn(L),L(e)})}const{history:N,titleStore:Tt,basePathStore:Hr}=window._GEMHISTORY;var nh=Object.create,bi=Object.defineProperty,ih=Object.getOwnPropertyDescriptor,Wr=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n),se=n=>{throw TypeError(n)},zr=(n,t,e)=>t in n?bi(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Gr=(n,t)=>bi(n,"name",{value:t,configurable:!0}),Vr=n=>[,,,nh((n==null?void 0:n[Wr("metadata")])??null)],Dr=["class","method","getter","setter","accessor","field","value","get","set"],Be=n=>n!==void 0&&typeof n!="function"?se("Function expected"):n,sh=(n,t,e,i,s)=>({kind:Dr[n],name:t,metadata:i,addInitializer:r=>e._?se("Already initialized"):s.push(Be(r||null))}),rh=(n,t)=>zr(t,Wr("metadata"),n[3]),P=(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,l,u,m,o=t&7,g=!!(t&8),h=!!(t&16),v=o>3?n.length+1:o?g?1:2:0,y=Dr[o+5],E=o>3&&(n[v-1]=[]),k=n[v]||(n[v]=[]),p=o&&(!h&&!g&&(s=s.prototype),o<5&&(o>3||!h)&&ih(o<4?s:{get[e](){return x(this,r)},set[e](_){return Nn(this,r,_)}},e));o?h&&o<4&&Gr(r,(o>2?"set ":o>1?"get ":"")+e):Gr(s,e);for(var T=i.length-1;T>=0;T--)u=sh(o,e,l={},n[3],k),o&&(u.static=g,u.private=h,m=u.access={has:h?_=>oh(s,_):_=>e in _},o^3&&(m.get=h?_=>(o^1?x:ah)(_,s,o^4?r:p.get):_=>_[e]),o>2&&(m.set=h?(_,M)=>Nn(_,s,M,o^4?r:p.set):(_,M)=>_[e]=M)),c=(0,i[T])(o?o<4?h?r:p[y]:o>4?void 0:{get:p.get,set:p.set}:s,u),l._=1,o^4||c===void 0?Be(c)&&(o>4?E.unshift(c):o?h?r=c:p[y]=c:s=c):typeof c!="object"||c===null?se("Object expected"):(Be(a=c.get)&&(p.get=a),Be(a=c.set)&&(p.set=a),Be(a=c.init)&&E.unshift(a));return o||rh(n,s),p&&bi(s,e,p),h?o^4?r:p:s},q=(n,t,e)=>zr(n,typeof t!="symbol"?t+"":t,e),Ti=(n,t,e)=>t.has(n)||se("Cannot "+e),oh=(n,t)=>Object(t)!==t?se('Cannot use the "in" operator on this value'):n.has(t),x=(n,t,e)=>(Ti(n,t,"read from private field"),e?e.call(n):t.get(n)),rt=(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),Nn=(n,t,e,i)=>(Ti(n,t,"write to private field"),i?i.call(n,e):t.set(n,e),e),ah=(n,t,e)=>(Ti(n,t,"access private method"),e),xr,Ur,qr,Fr,Br,Kr,jr,Qr,Jr,Yr,Zr,Xr,to,eo,no,Pi,io,w,Gt,re,Ke,Rn,ki,je,In,Mi,Oi,Ai,Li,Ni,so,Ri,ro;const oo="_";class ch extends RegExp{constructor(t){let e=0;super(`^${t.replace(/((:[^/$]+)|(\*))/g,(i,s)=>s==="*"?`(?<${oo}${e++}>.*)`:`(?<${s.slice(1)}>[^/]+)`)}$`)}}function Ii(n,t){if(window.URLPattern){const r=new window.URLPattern({pathname:n}),a=r.exec({pathname:t})||r.exec({pathname:`${t}/`});return a?a.pathname.groups:null}const e=new ch(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(oo)?r.slice(1):r]=a}),s}function Hn(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 ao(n,t){return{path:Hn(n,t),...t}}const Hi=st``,co=new Map;io=[yi({penetrable:!0})];class I extends(Pi=F,no=[Ve],eo=[B],to=[B],Xr=[B],Zr=[ie],Yr=[ie],Jr=[ie],Qr=[ie],jr=[B],Kr=[B],Br=[B],Fr=[pt(t=>[t.scrollContainer])],qr=[pt(t=>[t.scrollContainer])],Ur=[pt(t=>{var e;return x(e=t,Ai).call(e)})],xr=[zt(t=>!t.inert)],Pi){constructor(){super(...arguments),rt(this,Gt),q(this,"transition",P(w,8,this)),P(w,11,this),q(this,"routes",P(w,12,this)),P(w,15,this),q(this,"locationStore",P(w,16,this)),P(w,19,this),q(this,"key",P(w,20,this)),P(w,23,this),q(this,"loading",P(w,24,this)),P(w,27,this),q(this,"beforeroutechange",P(w,28,this)),P(w,31,this),q(this,"routechange",P(w,32,this)),P(w,35,this),q(this,"error",P(w,36,this)),P(w,39,this),q(this,"scrollContainer",P(w,40,this)),P(w,43,this),q(this,"scrollIgnoreHash",P(w,44,this)),P(w,47,this),q(this,"trigger",P(w,48,this,N)),P(w,51,this),q(this,"currentRoute"),q(this,"currentParams",{}),rt(this,Ke,d.createState({content:Hi})),rt(this,Rn,()=>{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,ki,()=>{if(!x(this,Gt,re))return;const t=co.get(N.currentKey);t?x(this,Gt,re).scroll(0,t):(this.scrollIgnoreHash||!N.getParams().hash)&&x(this,Gt,re).scroll(0,0)}),rt(this,je),rt(this,In,(t,e,i)=>{this.beforeroutechange(t),Nn(this,je,void 0),this.currentRoute=t,this.currentParams=e;const s=async()=>{x(this,Ke).call(this,{content:i}),x(this,Rn).call(this),await Promise.resolve(),x(this,ki).call(this),this.routechange(this.currentRoute)};this.transition&&"startViewTransition"in document?document.startViewTransition(()=>s()):s()}),rt(this,Mi,P(w,52,this,()=>{if(x(this,Gt,re))return li(N,"beforechange",()=>co.set(N.currentKey,x(this,Gt,re).scrollTop))})),P(w,55,this),rt(this,Oi,P(w,56,this,()=>this.trigger.store&&dt(this.trigger.store,()=>x(this,Ke).call(this)))),P(w,59,this),rt(this,Ai,()=>{const{path:t,query:e,hash:i}=this.trigger.getParams();return[this.key,t,e,i]}),rt(this,Li,P(w,60,this,([t,e],i)=>{if(i&&t===i[0]&&e===i[1]){x(this,Rn).call(this);return}this.update()})),P(w,63,this),rt(this,Ni,P(w,64,this,()=>{const{content:t}=x(this,Ke);if(t!==void 0)return this.shadowRoot?t===Hi?st`<slot></slot>`:t:t===Hi?void 0:st`${t}`})),P(w,67,this),q(this,"update",()=>{const{path:t,hash:e,query:i}=this.trigger.getParams(),{route:s,params:r={}}=oe.findRoute(this.routes,t),{redirect:a,content:c,getContent:l}=s||{};if(a){this.trigger.replace({path:Hn({pattern:a},{params:r}),query:i,hash:e});return}this.trigger===N&&(location.href!==Tt.url||s!=null&&s.title)&&Tt({url:location.href,title:s==null?void 0:s.title});const u=c||(l==null?void 0:l(r,this.shadowRoot||this));if(this.loading(s),u instanceof Promise){Nn(this,je,u);const m=()=>x(this,je)===u;u.then(o=>{m()&&x(this,In).call(this,s,r,o)}).catch(o=>{m()&&this.error(o)});return}x(this,In).call(this,s,r,u)})}}w=Vr(Pi),Gt=new WeakSet,re=function(){return typeof this.scrollContainer=="function"?this.scrollContainer():this.scrollContainer},Ke=new WeakMap,Rn=new WeakMap,ki=new WeakMap,je=new WeakMap,In=new WeakMap,Mi=new WeakMap,Oi=new WeakMap,Ai=new WeakMap,Li=new WeakMap,Ni=new WeakMap,D(w,5,"transition",no,I),D(w,5,"routes",eo,I),D(w,5,"locationStore",to,I),D(w,5,"key",Xr,I),D(w,5,"loading",Zr,I),D(w,5,"beforeroutechange",Yr,I),D(w,5,"routechange",Jr,I),D(w,5,"error",Qr,I),D(w,5,"scrollContainer",jr,I),D(w,5,"scrollIgnoreHash",Kr,I),D(w,5,"trigger",Br,I),D(w,21,"#rememberScrollPosition",Fr,Mi),D(w,21,"#connectTriggerStore",qr,Oi),D(w,21,"#updateContent",Ur,Li),D(w,21,"#content",xr,Ni),I=D(w,0,"GemLightRouteElement",io,I),q(I,"createLocationStore",()=>{const{path:n,query:t,hash:e,data:i}=N.getParams();return St({path:n,query:t,hash:e,data:i,params:{}})}),q(I,"findRoute",(n=[],t)=>{let e=null,i;n instanceof Array?i=n:i=Object.values(n);for(const s of i)if(s.pattern==="*")e=s;else{const r=Ii(s.pattern,t);if(r)return{route:s,params:r}}return{route:e}}),P(w,1,I);const hh=Xt`
|
|
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`
|
|
23
12
|
:host(:where(:not([hidden]))),
|
|
24
13
|
:not(:defined) {
|
|
25
14
|
display: contents;
|
|
26
15
|
}
|
|
27
|
-
`;
|
|
16
|
+
`;Co=[Et(),Ie(Nl)];class ce extends(bo=H){}Ji=ro(bo),ce=D(Ji,0,"GemRouteElement",Co,ce),P(Ji,1,ce);var Rl=Object.create,Xi=Object.defineProperty,Il=Object.getOwnPropertyDescriptor,Mo=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n),le=n=>{throw TypeError(n)},Oo=(n,t,e)=>t in n?Xi(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Lo=(n,t)=>Xi(n,"name",{value:t,configurable:!0}),Ao=n=>[,,,Rl((n==null?void 0:n[Mo("metadata")])??null)],No=["class","method","getter","setter","accessor","field","value","get","set"],en=n=>n!==void 0&&typeof n!="function"?le("Function expected"):n,Hl=(n,t,e,i,s)=>({kind:No[n],name:t,metadata:i,addInitializer:o=>e._?le("Already initialized"):s.push(en(o||null))}),Wl=(n,t)=>Oo(t,Mo("metadata"),n[3]),b=(n,t,e,i)=>{for(var s=0,o=n[t>>1],a=o&&o.length;s<a;s++)t&1?o[s].call(e):i=o[s].call(e,i);return i},W=(n,t,e,i,s,o)=>{var a,c,u,d,m,r=t&7,g=!!(t&8),l=!!(t&16),v=r>3?n.length+1:r?g?1:2:0,S=No[r+5],E=r>3&&(n[v-1]=[]),k=n[v]||(n[v]=[]),p=r&&(!l&&!g&&(s=s.prototype),r<5&&(r>3||!l)&&Il(r<4?s:{get[e](){return dt(this,o)},set[e](_){return Ro(this,o,_)}},e));r?l&&r<4&&Lo(o,(r>2?"set ":r>1?"get ":"")+e):Lo(s,e);for(var T=i.length-1;T>=0;T--)d=Hl(r,e,u={},n[3],k),r&&(d.static=g,d.private=l,m=d.access={has:l?_=>Gl(s,_):_=>e in _},r^3&&(m.get=l?_=>(r^1?dt:zl)(_,s,r^4?o:p.get):_=>_[e]),r>2&&(m.set=l?(_,M)=>Ro(_,s,M,r^4?o:p.set):(_,M)=>_[e]=M)),c=(0,i[T])(r?r<4?l?o:p[S]:r>4?void 0:{get:p.get,set:p.set}:s,d),u._=1,r^4||c===void 0?en(c)&&(r>4?E.unshift(c):r?l?o=c:p[S]=c:s=c):typeof c!="object"||c===null?le("Object expected"):(en(a=c.get)&&(p.get=a),en(a=c.set)&&(p.set=a),en(a=c.init)&&E.unshift(a));return r||Wl(n,s),p&&Xi(s,e,p),l?r^4?o:p:s},j=(n,t,e)=>Oo(n,typeof t!="symbol"?t+"":t,e),ts=(n,t,e)=>t.has(n)||le("Cannot "+e),Gl=(n,t)=>Object(t)!==t?le('Cannot use the "in" operator on this value'):n.has(t),dt=(n,t,e)=>(ts(n,t,"read from private field"),e?e.call(n):t.get(n)),he=(n,t,e)=>t.has(n)?le("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),Ro=(n,t,e,i)=>(ts(n,t,"write to private field"),i?i.call(n,e):t.set(n,e),e),zl=(n,t,e)=>(ts(n,t,"access private method"),e),Io,Ho,Wo,Go,zo,Vo,Do,Uo,Fo,qo,xo,Bo,Ko,jo,es,Qo,w,Tt,nn,Jo,ns,is,ss,rs,os,Yo,Zo,Xo,as,ta,nt,cs;function ea(n){return!n.startsWith("/")}const Vl=Qt`
|
|
28
17
|
:host {
|
|
29
18
|
/* link default style */
|
|
30
19
|
cursor: pointer;
|
|
@@ -38,13 +27,14 @@
|
|
|
38
27
|
a:visited {
|
|
39
28
|
color: unset;
|
|
40
29
|
}
|
|
41
|
-
`;Oo=[Ue(Hr),xe(mh),bt(),qe({focusable:!0})];class G extends(Gi=F,Mo=[U],ko=[U],Po=[U],To=[U],bo=[U],Co=[U],Eo=[Ve],So=[B],wo=[B],yo=[B],$o=[B],vo=[$i],go=[ne()],mo=[zt()],Gi){constructor(){super(...arguments),b(S,5,this),Vt(this,Pt),j(this,"href",b(S,8,this)),b(S,11,this),j(this,"target",b(S,12,this)),b(S,15,this),j(this,"path",b(S,16,this)),b(S,19,this),j(this,"query",b(S,20,this)),b(S,23,this),j(this,"hash",b(S,24,this)),b(S,27,this),j(this,"hint",b(S,28,this)),b(S,31,this),j(this,"preload",b(S,32,this)),b(S,35,this),j(this,"route",b(S,36,this)),b(S,39,this),j(this,"options",b(S,40,this)),b(S,43,this),j(this,"routeOptions",b(S,44,this)),b(S,47,this),j(this,"prepare",b(S,48,this)),b(S,51,this),j(this,"link",b(S,52,this)),b(S,55,this),Vt(this,Vi,async()=>{var r;const t=this._getLocationString();if(!t)return;if(Ho(t))switch(this.target){case"_self":window.location.href=t;return;case"_parent":window.parent.location.href=t;return;case"_top":window.top.location.href=t;return;default:window.open(t);return}const{path:e,query:i,hash:s}=N.getParams();if(e+i+s!==t)if(await((r=this.prepare)==null?void 0:r.call(this)),this.route)N.pushIgnoreCloseHandle(ao(this.route,ot(this,Pt,Je)));else if(this.href){const a=new URL(t,location.origin);N.pushIgnoreCloseHandle({path:a.pathname,query:a.search,hash:a.hash})}else N.pushIgnoreCloseHandle({path:this.path,query:this.query,hash:this.hash})}),Vt(this,Di,t=>t.preventDefault()),Vt(this,xi,()=>{const t=this._getLocationString();return Ho(t)?t:new URL(N.basePath+t,location.origin).toString()}),Vt(this,Ui,()=>{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)}),Vt(this,Fi,b(S,56,this,()=>st`<a
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
30
|
+
`;Qo=[He(Vr),Ie(Vl),Et(),We({focusable:!0})];class z extends(es=J,jo=[F],Ko=[F],Bo=[F],xo=[F],qo=[F],Fo=[F],Uo=[Ne],Do=[x],Vo=[x],zo=[x],Go=[x],Wo=[gi],Ho=[Yt()],Io=[Nt()],es){constructor(){super(...arguments),b(w,5,this),he(this,Tt),j(this,"href",b(w,8,this)),b(w,11,this),j(this,"target",b(w,12,this)),b(w,15,this),j(this,"path",b(w,16,this)),b(w,19,this),j(this,"query",b(w,20,this)),b(w,23,this),j(this,"hash",b(w,24,this)),b(w,27,this),j(this,"hint",b(w,28,this)),b(w,31,this),j(this,"preload",b(w,32,this)),b(w,35,this),j(this,"route",b(w,36,this)),b(w,39,this),j(this,"options",b(w,40,this)),b(w,43,this),j(this,"routeOptions",b(w,44,this)),b(w,47,this),j(this,"prepare",b(w,48,this)),b(w,51,this),j(this,"link",b(w,52,this)),b(w,55,this),he(this,ns,async t=>{var a;t.preventDefault();const e=this._getLocationString();if(!e)return;if(ea(e))switch(this.target){case"_self":window.location.href=e;return;case"_parent":window.parent.location.href=e;return;case"_top":window.top.location.href=e;return;default:window.open(e);return}const{path:i,query:s,hash:o}=N.getParams();if(i+s+o!==e)if(await((a=this.prepare)==null?void 0:a.call(this)),this.route)N.pushIgnoreCloseHandle(Po(this.route,dt(this,Tt,nn)));else if(this.href){const c=new URL(e,location.origin);N.pushIgnoreCloseHandle({path:c.pathname,query:c.search,hash:c.hash})}else N.pushIgnoreCloseHandle({path:this.path,query:this.query,hash:this.hash})}),he(this,is,()=>{const t=this._getLocationString();return ea(t)?t:new URL(N.basePath+t,location.origin).toString()}),he(this,ss,()=>{var t,e,i;(t=this.route)==null||t.content,(i=(e=this.route)==null?void 0:e.getContent)==null||i.call(e,{},this.shadowRoot)}),he(this,os,b(w,56,this,()=>{const t=dt(this,Tt,Jo)==="off"?null:dt(this,is).call(this);return h.html`<a part=${this.link} href=${t} tabindex="-1"><slot></slot></a>`})),b(w,59,this)}_getLocationString(){var t,e;if(this.route){const i=((t=dt(this,Tt,nn))==null?void 0:t.query)||"",s=((e=dt(this,Tt,nn))==null?void 0:e.hash)||"";return Un(this.route,dt(this,Tt,nn))+i+s}else{const i=this.href||this.path+this.query+this.hash,{path:s,query:o}=N.getParams();return i.startsWith("#")?`${s}${o}${i}`:i.startsWith("?")?`${s}${i}`:i.startsWith(".")?ri(s,i):i}}}w=Ao(es),Tt=new WeakSet,nn=function(){return this.routeOptions||this.options},Jo=function(){return this.hint||"on"},ns=new WeakMap,is=new WeakMap,ss=new WeakMap,rs=function(){this.addEventListener("click",dt(this,ns)),this.addEventListener("pointerenter",dt(this,ss))},os=new WeakMap,rs=W(w,17,"#init",Ho,Tt,rs),W(w,5,"href",jo,z),W(w,5,"target",Ko,z),W(w,5,"path",Bo,z),W(w,5,"query",xo,z),W(w,5,"hash",qo,z),W(w,5,"hint",Fo,z),W(w,5,"preload",Uo,z),W(w,5,"route",Do,z),W(w,5,"options",Vo,z),W(w,5,"routeOptions",zo,z),W(w,5,"prepare",Go,z),W(w,5,"link",Wo,z),W(w,21,"#content",Io,os),z=W(w,0,"GemLinkElement",Qo,z),b(w,1,z),ta=[He(N.store)];class Vt extends(as=z,Xo=[F],Zo=[Re],Yo=[pt()],as){constructor(){super(...arguments),j(this,"pattern",b(nt,8,this)),b(nt,11,this),j(this,"active",b(nt,12,this)),b(nt,15,this),he(this,cs,b(nt,16,this,()=>{const{path:t,query:e,hash:i}=N.getParams(),s=this.pattern&&Yi(this.pattern,t);this.active=!!s||t+e+i===this._getLocationString()})),b(nt,19,this)}}nt=Ao(as),cs=new WeakMap,W(nt,5,"pattern",Xo,Vt),W(nt,5,"active",Zo,Vt),W(nt,21,"#updateState",Yo,cs),Vt=W(nt,0,"GemActiveLinkElement",ta,Vt),b(nt,1,Vt),customElements.define("gem-link",z),customElements.define("gem-active-link",Vt);var Dl=Object.create,ls=Object.defineProperty,Ul=Object.getOwnPropertyDescriptor,na=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n),de=n=>{throw TypeError(n)},ia=(n,t,e)=>t in n?ls(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,sa=(n,t)=>ls(n,"name",{value:t,configurable:!0}),Fl=n=>[,,,Dl((n==null?void 0:n[na("metadata")])??null)],ra=["class","method","getter","setter","accessor","field","value","get","set"],sn=n=>n!==void 0&&typeof n!="function"?de("Function expected"):n,ql=(n,t,e,i,s)=>({kind:ra[n],name:t,metadata:i,addInitializer:o=>e._?de("Already initialized"):s.push(sn(o||null))}),oa=(n,t)=>ia(t,na("metadata"),n[3]),Pt=(n,t,e,i)=>{for(var s=0,o=n[t>>1],a=o&&o.length;s<a;s++)t&1?o[s].call(e):i=o[s].call(e,i);return i},Fn=(n,t,e,i,s,o)=>{var a,c,u,d,m,r=t&7,g=!!(t&8),l=!!(t&16),v=r>3?n.length+1:r?g?1:2:0,S=ra[r+5],E=r>3&&(n[v-1]=[]),k=n[v]||(n[v]=[]),p=r&&(!l&&!g&&(s=s.prototype),r<5&&(r>3||!l)&&Ul(r<4?s:{get[e](){return kt(this,o)},set[e](_){return ds(this,o,_)}},e));r?l&&r<4&&sa(o,(r>2?"set ":r>1?"get ":"")+e):sa(s,e);for(var T=i.length-1;T>=0;T--)d=ql(r,e,u={},n[3],k),r&&(d.static=g,d.private=l,m=d.access={has:l?_=>xl(s,_):_=>e in _},r^3&&(m.get=l?_=>(r^1?kt:Bl)(_,s,r^4?o:p.get):_=>_[e]),r>2&&(m.set=l?(_,M)=>ds(_,s,M,r^4?o:p.set):(_,M)=>_[e]=M)),c=(0,i[T])(r?r<4?l?o:p[S]:r>4?void 0:{get:p.get,set:p.set}:s,d),u._=1,r^4||c===void 0?sn(c)&&(r>4?E.unshift(c):r?l?o=c:p[S]=c:s=c):typeof c!="object"||c===null?de("Object expected"):(sn(a=c.get)&&(p.get=a),sn(a=c.set)&&(p.set=a),sn(a=c.init)&&E.unshift(a));return r||oa(n,s),p&&ls(s,e,p),l?r^4?o:p:s},aa=(n,t,e)=>ia(n,typeof t!="symbol"?t+"":t,e),hs=(n,t,e)=>t.has(n)||de("Cannot "+e),xl=(n,t)=>Object(t)!==t?de('Cannot use the "in" operator on this value'):n.has(t),kt=(n,t,e)=>(hs(n,t,"read from private field"),e?e.call(n):t.get(n)),ue=(n,t,e)=>t.has(n)?de("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),ds=(n,t,e,i)=>(hs(n,t,"write to private field"),i?i.call(n,e):t.set(n,e),e),Bl=(n,t,e)=>(hs(n,t,"access private method"),e),ca,la,ha,da,us,Q,_s,ua,fs,qn,ps,rn,ms;const Kl="gem-reflect-start",_a="gem-reflect-end",fa=n=>new Comment(n),jl=n=>{const t=[];let e=n;for(;e&&(t.push(e),e.nodeValue!==_a);)e=e.nextSibling;return t};class on extends(us=J,da=[F],ha=[x],la=[Mn()],ca=[pt(t=>[t.target])],us){constructor(){super(...arguments),ue(this,_s),aa(this,"method",Pt(Q,8,this)),Pt(Q,11,this),aa(this,"target",Pt(Q,12,this,document.head)),Pt(Q,15,this),ue(this,fs,Pt(Q,16,this,()=>{this.hidden=!0})),Pt(Q,19,this),ue(this,qn,fa(Kl)),ue(this,ps,fa(_a)),ue(this,rn),ue(this,ms,Pt(Q,20,this,()=>((kt(this,rn)||[kt(this,qn),...this.childNodes,kt(this,ps)]).forEach((t,e,i)=>{const s=i[e-1];s?s.after(t):this.target[kt(this,_s,ua)](t)}),()=>{ds(this,rn,jl(kt(this,qn))),kt(this,rn).forEach(t=>t.remove())}))),Pt(Q,23,this)}}Q=Fl(us),_s=new WeakSet,ua=function(){return this.method||"append"},fs=new WeakMap,qn=new WeakMap,ps=new WeakMap,rn=new WeakMap,ms=new WeakMap,Fn(Q,5,"method",da,on),Fn(Q,5,"target",ha,on),Fn(Q,21,"#init",la,fs),Fn(Q,21,"#changeTarget",ca,ms),oa(Q,on),customElements.define("gem-reflect",on),customElements.define("gem-route",ce),customElements.define("gem-light-route",H);var Ql=Object.create,gs=Object.defineProperty,Jl=Object.getOwnPropertyDescriptor,pa=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n),_e=n=>{throw TypeError(n)},ma=(n,t,e)=>t in n?gs(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,ga=(n,t)=>gs(n,"name",{value:t,configurable:!0}),Yl=n=>[,,,Ql((n==null?void 0:n[pa("metadata")])??null)],va=["class","method","getter","setter","accessor","field","value","get","set"],an=n=>n!==void 0&&typeof n!="function"?_e("Function expected"):n,Zl=(n,t,e,i,s)=>({kind:va[n],name:t,metadata:i,addInitializer:o=>e._?_e("Already initialized"):s.push(an(o||null))}),Xl=(n,t)=>ma(t,pa("metadata"),n[3]),Y=(n,t,e,i)=>{for(var s=0,o=n[t>>1],a=o&&o.length;s<a;s++)t&1?o[s].call(e):i=o[s].call(e,i);return i},Dt=(n,t,e,i,s,o)=>{var a,c,u,d,m,r=t&7,g=!!(t&8),l=!!(t&16),v=r>3?n.length+1:r?g?1:2:0,S=va[r+5],E=r>3&&(n[v-1]=[]),k=n[v]||(n[v]=[]),p=r&&(!l&&!g&&(s=s.prototype),r<5&&(r>3||!l)&&Jl(r<4?s:{get[e](){return $s(this,o)},set[e](_){return $a(this,o,_)}},e));r?l&&r<4&&ga(o,(r>2?"set ":r>1?"get ":"")+e):ga(s,e);for(var T=i.length-1;T>=0;T--)d=Zl(r,e,u={},n[3],k),r&&(d.static=g,d.private=l,m=d.access={has:l?_=>th(s,_):_=>e in _},r^3&&(m.get=l?_=>(r^1?$s:eh)(_,s,r^4?o:p.get):_=>_[e]),r>2&&(m.set=l?(_,M)=>$a(_,s,M,r^4?o:p.set):(_,M)=>_[e]=M)),c=(0,i[T])(r?r<4?l?o:p[S]:r>4?void 0:{get:p.get,set:p.set}:s,d),u._=1,r^4||c===void 0?an(c)&&(r>4?E.unshift(c):r?l?o=c:p[S]=c:s=c):typeof c!="object"||c===null?_e("Object expected"):(an(a=c.get)&&(p.get=a),an(a=c.set)&&(p.set=a),an(a=c.init)&&E.unshift(a));return r||Xl(n,s),p&&gs(s,e,p),l?r^4?o:p:s},xn=(n,t,e)=>ma(n,typeof t!="symbol"?t+"":t,e),vs=(n,t,e)=>t.has(n)||_e("Cannot "+e),th=(n,t)=>Object(t)!==t?_e('Cannot use the "in" operator on this value'):n.has(t),$s=(n,t,e)=>(vs(n,t,"read from private field"),e?e.call(n):t.get(n)),Bn=(n,t,e)=>t.has(n)?_e("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),$a=(n,t,e,i)=>(vs(n,t,"write to private field"),i?i.call(n,e):t.set(n,e),e),eh=(n,t,e)=>(vs(n,t,"access private method"),e),Sa,ya,wa,Ea,Ca,ba,Ss,Ta,R,ys,ws,Es,Cs;let Pa=0;const ka=n=>{clearTimeout(Pa),Pa=setTimeout(()=>document.title=n)};function nh(n,t="",e=""){const i=bt.title||n;i&&i!==bt.defaultTitle?(fe.title=i,ka(t+fe.title+e)):(fe.title=bt.defaultTitle,ka(fe.title))}Ta=[Et()];let Mt=class ac extends(Ss=J,ba=[F],Ca=[F],Ea=[Ne],wa=[pt(t=>[t.inert])],ya=[Yt()],Sa=[Nt()],Ss){constructor(){super(...arguments),xn(this,"prefix",Y(R,8,this)),Y(R,11,this),xn(this,"suffix",Y(R,12,this)),Y(R,15,this),xn(this,"inert",Y(R,16,this)),Y(R,19,this),Bn(this,ys,Y(R,20,this,()=>!this.inert&&ht(bt,this.update))),Y(R,23,this),Bn(this,ws,new MutationObserver(()=>this.update())),Bn(this,Es,Y(R,24,this,()=>{$s(this,ws).observe(this,{characterData:!0,childList:!0,subtree:!0})})),Y(R,27,this),Bn(this,Cs,Y(R,28,this,()=>{var t;return nh((t=this.textContent)==null?void 0:t.trim(),this.prefix,this.suffix),h.html`${ac.title}`})),Y(R,31,this)}static setTitle(t){bt({title:t})}};R=Yl(Ss),ys=new WeakMap,ws=new WeakMap,Es=new WeakMap,Cs=new WeakMap,Dt(R,5,"prefix",ba,Mt),Dt(R,5,"suffix",Ca,Mt),Dt(R,5,"inert",Ea,Mt),Dt(R,21,"#connectStore",wa,ys),Dt(R,21,"#obTextContent",ya,Es),Dt(R,21,"#content",Sa,Cs),Mt=Dt(R,0,"GemTitleElement",Ta,Mt),xn(Mt,"title",document.title),Y(R,1,Mt);let fe=Mt;customElements.define("gem-title",fe);var ih=Object.create,bs=Object.defineProperty,sh=Object.getOwnPropertyDescriptor,Ma=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n),pe=n=>{throw TypeError(n)},Oa=(n,t,e)=>t in n?bs(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,La=(n,t)=>bs(n,"name",{value:t,configurable:!0}),rh=n=>[,,,ih((n==null?void 0:n[Ma("metadata")])??null)],Aa=["class","method","getter","setter","accessor","field","value","get","set"],cn=n=>n!==void 0&&typeof n!="function"?pe("Function expected"):n,oh=(n,t,e,i,s)=>({kind:Aa[n],name:t,metadata:i,addInitializer:o=>e._?pe("Already initialized"):s.push(cn(o||null))}),ah=(n,t)=>Oa(t,Ma("metadata"),n[3]),Ut=(n,t,e,i)=>{for(var s=0,o=n[t>>1],a=o&&o.length;s<a;s++)t&1?o[s].call(e):i=o[s].call(e,i);return i},Kn=(n,t,e,i,s,o)=>{var a,c,u,d,m,r=t&7,g=!!(t&8),l=!!(t&16),v=r>3?n.length+1:r?g?1:2:0,S=Aa[r+5],E=r>3&&(n[v-1]=[]),k=n[v]||(n[v]=[]),p=r&&(!l&&!g&&(s=s.prototype),r<5&&(r>3||!l)&&sh(r<4?s:{get[e](){return Ra(this,o)},set[e](_){return Ia(this,o,_)}},e));r?l&&r<4&&La(o,(r>2?"set ":r>1?"get ":"")+e):La(s,e);for(var T=i.length-1;T>=0;T--)d=oh(r,e,u={},n[3],k),r&&(d.static=g,d.private=l,m=d.access={has:l?_=>ch(s,_):_=>e in _},r^3&&(m.get=l?_=>(r^1?Ra:hh)(_,s,r^4?o:p.get):_=>_[e]),r>2&&(m.set=l?(_,M)=>Ia(_,s,M,r^4?o:p.set):(_,M)=>_[e]=M)),c=(0,i[T])(r?r<4?l?o:p[S]:r>4?void 0:{get:p.get,set:p.set}:s,d),u._=1,r^4||c===void 0?cn(c)&&(r>4?E.unshift(c):r?l?o=c:p[S]=c:s=c):typeof c!="object"||c===null?pe("Object expected"):(cn(a=c.get)&&(p.get=a),cn(a=c.set)&&(p.set=a),cn(a=c.init)&&E.unshift(a));return r||ah(n,s),p&&bs(s,e,p),l?r^4?o:p:s},Na=(n,t,e)=>Oa(n,typeof t!="symbol"?t+"":t,e),Ts=(n,t,e)=>t.has(n)||pe("Cannot "+e),ch=(n,t)=>Object(t)!==t?pe('Cannot use the "in" operator on this value'):n.has(t),Ra=(n,t,e)=>(Ts(n,t,"read from private field"),e?e.call(n):t.get(n)),lh=(n,t,e)=>t.has(n)?pe("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),Ia=(n,t,e,i)=>(Ts(n,t,"write to private field"),i?i.call(n,e):t.set(n,e),e),hh=(n,t,e)=>(Ts(n,t,"access private method"),e),Ha,Wa,Ga,Ps,za,it,ks;za=[Et()];class Ft extends(Ps=J,Ga=[F],Wa=[F],Ha=[Nt()],Ps){constructor(){super(...arguments),Na(this,"content",Ut(it,8,this)),Ut(it,11,this),Na(this,"contentcss",Ut(it,12,this)),Ut(it,15,this),lh(this,ks,Ut(it,16,this,()=>{const t=`
|
|
31
|
+
<style>
|
|
32
|
+
:host(:where(:not([hidden]))) {
|
|
33
|
+
display: contents;
|
|
34
|
+
}
|
|
35
|
+
${this.contentcss}
|
|
36
|
+
</style>
|
|
37
|
+
`;this.shadowRoot.innerHTML=this.content+t.trim()})),Ut(it,19,this)}}it=rh(Ps),ks=new WeakMap,Kn(it,5,"content",Ga,Ft),Kn(it,5,"contentcss",Wa,Ft),Kn(it,21,"#content",Ha,ks),Ft=Kn(it,0,"GemUnsafeElement",za,Ft),Ut(it,1,Ft),customElements.define("gem-unsafe",Ft);var dh=Object.create,Ms=Object.defineProperty,uh=Object.getOwnPropertyDescriptor,Va=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n),me=n=>{throw TypeError(n)},Da=(n,t,e)=>t in n?Ms(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Ua=(n,t)=>Ms(n,"name",{value:t,configurable:!0}),_h=n=>[,,,dh((n==null?void 0:n[Va("metadata")])??null)],Fa=["class","method","getter","setter","accessor","field","value","get","set"],ln=n=>n!==void 0&&typeof n!="function"?me("Function expected"):n,fh=(n,t,e,i,s)=>({kind:Fa[n],name:t,metadata:i,addInitializer:o=>e._?me("Already initialized"):s.push(ln(o||null))}),ph=(n,t)=>Da(t,Va("metadata"),n[3]),at=(n,t,e,i)=>{for(var s=0,o=n[t>>1],a=o&&o.length;s<a;s++)t&1?o[s].call(e):i=o[s].call(e,i);return i},ge=(n,t,e,i,s,o)=>{var a,c,u,d,m,r=t&7,g=!!(t&8),l=!!(t&16),v=r>3?n.length+1:r?g?1:2:0,S=Fa[r+5],E=r>3&&(n[v-1]=[]),k=n[v]||(n[v]=[]),p=r&&(!l&&!g&&(s=s.prototype),r<5&&(r>3||!l)&&uh(r<4?s:{get[e](){return Ls(this,o)},set[e](_){return xa(this,o,_)}},e));r?l&&r<4&&Ua(o,(r>2?"set ":r>1?"get ":"")+e):Ua(s,e);for(var T=i.length-1;T>=0;T--)d=fh(r,e,u={},n[3],k),r&&(d.static=g,d.private=l,m=d.access={has:l?_=>mh(s,_):_=>e in _},r^3&&(m.get=l?_=>(r^1?Ls:gh)(_,s,r^4?o:p.get):_=>_[e]),r>2&&(m.set=l?(_,M)=>xa(_,s,M,r^4?o:p.set):(_,M)=>_[e]=M)),c=(0,i[T])(r?r<4?l?o:p[S]:r>4?void 0:{get:p.get,set:p.set}:s,d),u._=1,r^4||c===void 0?ln(c)&&(r>4?E.unshift(c):r?l?o=c:p[S]=c:s=c):typeof c!="object"||c===null?me("Object expected"):(ln(a=c.get)&&(p.get=a),ln(a=c.set)&&(p.set=a),ln(a=c.init)&&E.unshift(a));return r||ph(n,s),p&&Ms(s,e,p),l?r^4?o:p:s},jn=(n,t,e)=>Da(n,typeof t!="symbol"?t+"":t,e),Os=(n,t,e)=>t.has(n)||me("Cannot "+e),mh=(n,t)=>Object(t)!==t?me('Cannot use the "in" operator on this value'):n.has(t),Ls=(n,t,e)=>(Os(n,t,"read from private field"),e?e.call(n):t.get(n)),qa=(n,t,e)=>t.has(n)?me("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),xa=(n,t,e,i)=>(Os(n,t,"write to private field"),i?i.call(n,e):t.set(n,e),e),gh=(n,t,e)=>(Os(n,t,"access private method"),e),Ba,Ka,ja,Qa,Ja,As,Ya,V,Ns,Rs;const vh=Qt`
|
|
48
38
|
:host(:where(:not([hidden]))) {
|
|
49
39
|
position: relative;
|
|
50
40
|
display: inline-flex;
|
|
@@ -54,11 +44,4 @@
|
|
|
54
44
|
width: 100%;
|
|
55
45
|
height: 100%;
|
|
56
46
|
}
|
|
57
|
-
`,ha=new Map;ca=[bt(),xe(Lh)];class mt extends(rs=F,aa=[U],oa=[B],ra=[B],sa=[De],ia=[zt()],rs){constructor(){super(...arguments),Gn(this,"selector",at(V,8,this)),at(V,11,this),Gn(this,"root",at(V,12,this)),at(V,15,this),Gn(this,"element",at(V,16,this)),at(V,19,this),Gn(this,"active",at(V,20,this)),at(V,23,this),ea(this,os,()=>{const t=this.element||(this.selector?(this.root||document).querySelector(this.selector):null);if(typeof t=="string"){let e=ha.get(t);return e||(e=document.createElement("template"),e.innerHTML=t,ha.set(t,e)),e.content.cloneNode(!0)}else return t instanceof HTMLTemplateElement?t.content.cloneNode(!0):t==null?void 0:t.cloneNode(!0)}),ea(this,as,at(V,24,this,()=>st`${ss(this,os).call(this)}<slot></slot>`)),at(V,27,this)}}V=Ph(rs),os=new WeakMap,as=new WeakMap,de(V,5,"selector",aa,mt),de(V,5,"root",oa,mt),de(V,5,"element",ra,mt),de(V,5,"active",sa,mt),de(V,21,"#content",ia,as),mt=de(V,0,"GemUseElement",ca,mt),at(V,1,mt),customElements.define("gem-use",mt);var Nh=Object.create,cs=Object.defineProperty,Rh=Object.getOwnPropertyDescriptor,la=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n),ue=n=>{throw TypeError(n)},da=(n,t,e)=>t in n?cs(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,ua=(n,t)=>cs(n,"name",{value:t,configurable:!0}),Ih=n=>[,,,Nh((n==null?void 0:n[la("metadata")])??null)],_a=["class","method","getter","setter","accessor","field","value","get","set"],Xe=n=>n!==void 0&&typeof n!="function"?ue("Function expected"):n,Hh=(n,t,e,i,s)=>({kind:_a[n],name:t,metadata:i,addInitializer:r=>e._?ue("Already initialized"):s.push(Xe(r||null))}),Wh=(n,t)=>da(t,la("metadata"),n[3]),Ut=(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},Vn=(n,t,e,i,s,r)=>{var a,c,l,u,m,o=t&7,g=!!(t&8),h=!!(t&16),v=o>3?n.length+1:o?g?1:2:0,y=_a[o+5],E=o>3&&(n[v-1]=[]),k=n[v]||(n[v]=[]),p=o&&(!h&&!g&&(s=s.prototype),o<5&&(o>3||!h)&&Rh(o<4?s:{get[e](){return pa(this,r)},set[e](_){return ma(this,r,_)}},e));o?h&&o<4&&ua(r,(o>2?"set ":o>1?"get ":"")+e):ua(s,e);for(var T=i.length-1;T>=0;T--)u=Hh(o,e,l={},n[3],k),o&&(u.static=g,u.private=h,m=u.access={has:h?_=>zh(s,_):_=>e in _},o^3&&(m.get=h?_=>(o^1?pa:Vh)(_,s,o^4?r:p.get):_=>_[e]),o>2&&(m.set=h?(_,M)=>ma(_,s,M,o^4?r:p.set):(_,M)=>_[e]=M)),c=(0,i[T])(o?o<4?h?r:p[y]:o>4?void 0:{get:p.get,set:p.set}:s,u),l._=1,o^4||c===void 0?Xe(c)&&(o>4?E.unshift(c):o?h?r=c:p[y]=c:s=c):typeof c!="object"||c===null?ue("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||Wh(n,s),p&&cs(s,e,p),h?o^4?r:p:s},fa=(n,t,e)=>da(n,typeof t!="symbol"?t+"":t,e),hs=(n,t,e)=>t.has(n)||ue("Cannot "+e),zh=(n,t)=>Object(t)!==t?ue('Cannot use the "in" operator on this value'):n.has(t),pa=(n,t,e)=>(hs(n,t,"read from private field"),e?e.call(n):t.get(n)),Gh=(n,t,e)=>t.has(n)?ue("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),ma=(n,t,e,i)=>(hs(n,t,"write to private field"),i?i.call(n,e):t.set(n,e),e),Vh=(n,t,e)=>(hs(n,t,"access private method"),e),ga,va,$a,ls,ya,et,ds;ya=[bt()];class qt extends(ls=F,$a=[U],va=[U],ga=[zt()],ls){constructor(){super(...arguments),fa(this,"content",Ut(et,8,this)),Ut(et,11,this),fa(this,"contentcss",Ut(et,12,this)),Ut(et,15,this),Gh(this,ds,Ut(et,16,this,()=>{const t=`
|
|
58
|
-
<style>
|
|
59
|
-
:host(:where(:not([hidden]))) {
|
|
60
|
-
display: contents;
|
|
61
|
-
}
|
|
62
|
-
${this.contentcss}
|
|
63
|
-
</style>
|
|
64
|
-
`;this.shadowRoot.innerHTML=this.content+t.trim()})),Ut(et,19,this)}}et=Ih(ls),ds=new WeakMap,Vn(et,5,"content",$a,qt),Vn(et,5,"contentcss",va,qt),Vn(et,21,"#content",ga,ds),qt=Vn(et,0,"GemUnsafeElement",ya,qt),Ut(et,1,qt),customElements.define("gem-unsafe",qt);var Dh=Object.create,us=Object.defineProperty,xh=Object.getOwnPropertyDescriptor,wa=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n),_e=n=>{throw TypeError(n)},Sa=(n,t,e)=>t in n?us(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Ea=(n,t)=>us(n,"name",{value:t,configurable:!0}),Uh=n=>[,,,Dh((n==null?void 0:n[wa("metadata")])??null)],Ca=["class","method","getter","setter","accessor","field","value","get","set"],tn=n=>n!==void 0&&typeof n!="function"?_e("Function expected"):n,qh=(n,t,e,i,s)=>({kind:Ca[n],name:t,metadata:i,addInitializer:r=>e._?_e("Already initialized"):s.push(tn(r||null))}),ba=(n,t)=>Sa(t,wa("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},Dn=(n,t,e,i,s,r)=>{var a,c,l,u,m,o=t&7,g=!!(t&8),h=!!(t&16),v=o>3?n.length+1:o?g?1:2:0,y=Ca[o+5],E=o>3&&(n[v-1]=[]),k=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](_){return fs(this,r,_)}},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=qh(o,e,l={},n[3],k),o&&(u.static=g,u.private=h,m=u.access={has:h?_=>Fh(s,_):_=>e in _},o^3&&(m.get=h?_=>(o^1?Ot:Bh)(_,s,o^4?r:p.get):_=>_[e]),o>2&&(m.set=h?(_,M)=>fs(_,s,M,o^4?r:p.set):(_,M)=>_[e]=M)),c=(0,i[T])(o?o<4?h?r:p[y]:o>4?void 0:{get:p.get,set:p.set}:s,u),l._=1,o^4||c===void 0?tn(c)&&(o>4?E.unshift(c):o?h?r=c:p[y]=c:s=c):typeof c!="object"||c===null?_e("Object expected"):(tn(a=c.get)&&(p.get=a),tn(a=c.set)&&(p.set=a),tn(a=c.init)&&E.unshift(a));return o||ba(n,s),p&&us(s,e,p),h?o^4?r:p:s},Ta=(n,t,e)=>Sa(n,typeof t!="symbol"?t+"":t,e),_s=(n,t,e)=>t.has(n)||_e("Cannot "+e),Fh=(n,t)=>Object(t)!==t?_e('Cannot use the "in" operator on this value'):n.has(t),Ot=(n,t,e)=>(_s(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),fs=(n,t,e,i)=>(_s(n,t,"write to private field"),i?i.call(n,e):t.set(n,e),e),Bh=(n,t,e)=>(_s(n,t,"access private method"),e),Pa,ka,Ma,Oa,ps,Q,ms,Aa,gs,xn,vs,en,$s;const Kh="gem-reflect-start",La="gem-reflect-end",Na=n=>new Comment(n),jh=n=>{const t=[];let e=n;for(;e&&(t.push(e),e.nodeValue!==La);)e=e.nextSibling;return t};class nn extends(ps=F,Oa=[U],Ma=[B],ka=[An()],Pa=[pt(t=>[t.target])],ps){constructor(){super(...arguments),fe(this,ms),Ta(this,"method",Mt(Q,8,this)),Mt(Q,11,this),Ta(this,"target",Mt(Q,12,this,document.head)),Mt(Q,15,this),fe(this,gs,Mt(Q,16,this,()=>{this.hidden=!0,this.dataset.gemReflect=""})),Mt(Q,19,this),fe(this,xn,Na(Kh)),fe(this,vs,Na(La)),fe(this,en),fe(this,$s,Mt(Q,20,this,()=>((Ot(this,en)||[Ot(this,xn),...this.childNodes,Ot(this,vs)]).forEach((t,e,i)=>{const s=i[e-1];s?s.after(t):this.target[Ot(this,ms,Aa)](t)}),()=>{fs(this,en,jh(Ot(this,xn))),Ot(this,en).forEach(t=>t.remove())}))),Mt(Q,23,this)}}Q=Uh(ps),ms=new WeakSet,Aa=function(){return this.method||"append"},gs=new WeakMap,xn=new WeakMap,vs=new WeakMap,en=new WeakMap,$s=new WeakMap,Dn(Q,5,"method",Oa,nn),Dn(Q,5,"target",Ma,nn),Dn(Q,21,"#init",ka,gs),Dn(Q,21,"#changeTarget",Pa,$s),ba(Q,nn),customElements.define("gem-reflect",nn);var Qh=Object.create,ys=Object.defineProperty,Jh=Object.getOwnPropertyDescriptor,Ra=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n),pe=n=>{throw TypeError(n)},Ia=(n,t,e)=>t in n?ys(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Ha=(n,t)=>ys(n,"name",{value:t,configurable:!0}),Yh=n=>[,,,Qh((n==null?void 0:n[Ra("metadata")])??null)],Wa=["class","method","getter","setter","accessor","field","value","get","set"],sn=n=>n!==void 0&&typeof n!="function"?pe("Function expected"):n,Zh=(n,t,e,i,s)=>({kind:Wa[n],name:t,metadata:i,addInitializer:r=>e._?pe("Already initialized"):s.push(sn(r||null))}),Xh=(n,t)=>Ia(t,Ra("metadata"),n[3]),rn=(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},ws=(n,t,e,i,s,r)=>{var a,c,l,u,m,o=t&7,g=!!(t&8),h=!!(t&16),v=o>3?n.length+1:o?g?1:2:0,y=Wa[o+5],E=o>3&&(n[v-1]=[]),k=n[v]||(n[v]=[]),p=o&&(!h&&!g&&(s=s.prototype),o<5&&(o>3||!h)&&Jh(o<4?s:{get[e](){return za(this,r)},set[e](_){return Va(this,r,_)}},e));o?h&&o<4&&Ha(r,(o>2?"set ":o>1?"get ":"")+e):Ha(s,e);for(var T=i.length-1;T>=0;T--)u=Zh(o,e,l={},n[3],k),o&&(u.static=g,u.private=h,m=u.access={has:h?_=>tl(s,_):_=>e in _},o^3&&(m.get=h?_=>(o^1?za:el)(_,s,o^4?r:p.get):_=>_[e]),o>2&&(m.set=h?(_,M)=>Va(_,s,M,o^4?r:p.set):(_,M)=>_[e]=M)),c=(0,i[T])(o?o<4?h?r:p[y]:o>4?void 0:{get:p.get,set:p.set}:s,u),l._=1,o^4||c===void 0?sn(c)&&(o>4?E.unshift(c):o?h?r=c:p[y]=c:s=c):typeof c!="object"||c===null?pe("Object expected"):(sn(a=c.get)&&(p.get=a),sn(a=c.set)&&(p.set=a),sn(a=c.init)&&E.unshift(a));return o||Xh(n,s),p&&ys(s,e,p),h?o^4?r:p:s},Un=(n,t,e)=>Ia(n,typeof t!="symbol"?t+"":t,e),Ss=(n,t,e)=>t.has(n)||pe("Cannot "+e),tl=(n,t)=>Object(t)!==t?pe('Cannot use the "in" operator on this value'):n.has(t),za=(n,t,e)=>(Ss(n,t,"read from private field"),e?e.call(n):t.get(n)),Ga=(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),Va=(n,t,e,i)=>(Ss(n,t,"write to private field"),i?i.call(n,e):t.set(n,e),e),el=(n,t,e)=>(Ss(n,t,"access private method"),e);const qn=Symbol("open mark");function nl(n){var t,e,i,s,r,a,c;const l=Symbol();s=[bt(),qe({role:"alertdialog",ariaModal:"true"})];let u=class sc extends(i=F,e=[ne()],t=[ne()],i){constructor(){super(...arguments),Un(this,"label",""),Ga(this,a,rn(r,8,this,()=>dt(N.store,this.update))),rn(r,11,this),Ga(this,c,rn(r,12,this,()=>dt(sc.store,this.update))),rn(r,15,this)}static get isOpen(){return this.store[qn]}static open(g){const h=new this;this.instance=h,this.inertStore=[...document.body.children].filter(y=>!y.inert),this.inertStore.forEach(y=>y.inert=!0),document.body.append(h);const v=()=>this.store({[qn]:!0,...g});return setTimeout(()=>{v(),N.push({title:h.label,open:v,close:this.closeHandle.bind(this),shouldClose:this.shouldClose.bind(this)})},100),l}static close(){return N.back(),l}static closeHandle(){var g;return this.inertStore.forEach(h=>h.inert=!1),(g=this.instance)==null||g.remove(),this.store({[qn]:!1,...n}),l}static shouldClose(){return!0}};return r=Yh(i),a=new WeakMap,c=new WeakMap,ws(r,21,"#connectHistory",e,a),ws(r,21,"#connectStore",t,c),u=ws(r,0,"ModalElement",s,u),Un(u,"inertStore",[]),Un(u,"instance",null),Un(u,"store",St({[qn]:!1,...n})),rn(r,1,u),u}var il=Object.create,Es=Object.defineProperty,sl=Object.getOwnPropertyDescriptor,Da=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n),me=n=>{throw TypeError(n)},xa=(n,t,e)=>t in n?Es(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Ua=(n,t)=>Es(n,"name",{value:t,configurable:!0}),rl=n=>[,,,il((n==null?void 0:n[Da("metadata")])??null)],qa=["class","method","getter","setter","accessor","field","value","get","set"],on=n=>n!==void 0&&typeof n!="function"?me("Function expected"):n,ol=(n,t,e,i,s)=>({kind:qa[n],name:t,metadata:i,addInitializer:r=>e._?me("Already initialized"):s.push(on(r||null))}),al=(n,t)=>xa(t,Da("metadata"),n[3]),Ft=(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},Fn=(n,t,e,i,s,r)=>{var a,c,l,u,m,o=t&7,g=!!(t&8),h=!!(t&16),v=o>3?n.length+1:o?g?1:2:0,y=qa[o+5],E=o>3&&(n[v-1]=[]),k=n[v]||(n[v]=[]),p=o&&(!h&&!g&&(s=s.prototype),o<5&&(o>3||!h)&&sl(o<4?s:{get[e](){return ct(this,r)},set[e](_){return cn(this,r,_)}},e));o?h&&o<4&&Ua(r,(o>2?"set ":o>1?"get ":"")+e):Ua(s,e);for(var T=i.length-1;T>=0;T--)u=ol(o,e,l={},n[3],k),o&&(u.static=g,u.private=h,m=u.access={has:h?_=>cl(s,_):_=>e in _},o^3&&(m.get=h?_=>(o^1?ct:hl)(_,s,o^4?r:p.get):_=>_[e]),o>2&&(m.set=h?(_,M)=>cn(_,s,M,o^4?r:p.set):(_,M)=>_[e]=M)),c=(0,i[T])(o?o<4?h?r:p[y]:o>4?void 0:{get:p.get,set:p.set}:s,u),l._=1,o^4||c===void 0?on(c)&&(o>4?E.unshift(c):o?h?r=c:p[y]=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||al(n,s),p&&Es(s,e,p),h?o^4?r:p:s},an=(n,t,e)=>xa(n,typeof t!="symbol"?t+"":t,e),Cs=(n,t,e)=>t.has(n)||me("Cannot "+e),cl=(n,t)=>Object(t)!==t?me('Cannot use the "in" operator on this value'):n.has(t),ct=(n,t,e)=>(Cs(n,t,"read from private field"),e?e.call(n):t.get(n)),ge=(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),cn=(n,t,e,i)=>(Cs(n,t,"write to private field"),i?i.call(n,e):t.set(n,e),e),hl=(n,t,e)=>(Cs(n,t,"access private method"),e),Fa,Ba,Ka,bs,ja,nt,hn,ln,dn,Ts,Bn,Ps;const ks=Symbol();ja=[Ue(N.store),qe({role:"dialog",ariaModal:"true"})];class ve extends(bs=F,Ka=[U],Ba=[De],Fa=[An()],bs){constructor(){super(...arguments),an(this,"label",Ft(nt,8,this)),Ft(nt,11,this),an(this,"opened",Ft(nt,12,this)),Ft(nt,15,this),ge(this,hn),ge(this,ln),ge(this,dn,[]),ge(this,Ts,()=>{var t;this.inert=!0,ct(this,dn).forEach(e=>e.inert=!1),ct(this,hn)?ct(this,hn).before(this):ct(this,ln)&&((t=ct(this,ln))==null||t.appendChild(this)),this.dispatchEvent(new CustomEvent("close")),this.opened=!1}),ge(this,Bn,()=>{this.hidden=!1,this.inert=!1,cn(this,hn,this.nextSibling),cn(this,ln,this.parentElement||this.getRootNode()),cn(this,dn,[...document.body.children].filter(t=>!t.inert)),ct(this,dn).forEach(t=>t.inert=!0),document.body.append(this),this.dispatchEvent(new CustomEvent("open")),this.opened=!0}),ge(this,Ps,Ft(nt,16,this,()=>this.inert=!0)),Ft(nt,19,this),an(this,"open",()=>{if(!this.opened)return ct(this,Bn).call(this),N.push({title:this.label,open:ct(this,Bn),close:ct(this,Ts),shouldClose:this.shouldClose}),ks}),an(this,"close",()=>(N.back(),ks)),an(this,"forceClose",()=>(this.opened=!1,setTimeout(this.close,100),ks))}shouldClose(){return!0}}nt=rl(bs),hn=new WeakMap,ln=new WeakMap,dn=new WeakMap,Ts=new WeakMap,Bn=new WeakMap,Ps=new WeakMap,Fn(nt,5,"label",Ka,ve),Fn(nt,5,"opened",Ba,ve),Fn(nt,21,"#init",Fa,Ps),ve=Fn(nt,0,"GemDialogBaseElement",ja,ve),Ft(nt,1,ve);class Qa{constructor(t){$(this,"_type");$(this,"info",(...t)=>{console.log(`[${this._type}]:`,...t)});$(this,"warn",(...t)=>{console.warn(`[${this._type}]:`,...t)});$(this,"error",(...t)=>{console.error(`[${this._type}]:`,...t)});this._type=t}}const Ja=new Qa("GEM"),ll=/\$\d(?:<[^>]*>)?/,dl=/\$(\d)(<([^>]*)>)?/g,ul=3;function Ya(n,...t){const e=n.split(ll),i=[];let s;for(;s=dl.exec(n);){const r=s[ul],a=Number(s[1])-1,c=t[a];i.push(typeof c=="function"?c(r):c)}return st(e,...i)}const un=new Set,As=class As{constructor(t){C(this,W);$(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,vn,!0);if(!t.resources[t.fallbackLanguage])throw new ft("i18n: fallbackLanguage invalid");Object.assign(this,t);let e=f(this,W,rc)||this.currentLanguage||f(this,W,oc);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?(A(this,W,e,ti),this.setLanguage(e)):this.resetLanguage(),A(this,vn,!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?Ya(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;f(this,W,$n)&&un.forEach(async a=>await a.setLanguage(t));let e;const i=this.resources[t];if(!i)return Ja.warn(`${this.cachePrefix}: not found \`${t}\``),this.resetLanguage();if(typeof i=="string"){const a=`${this.cachePrefix}:`,c=`${a}${i}`,l=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(l)try{e=JSON.parse(l)}catch{e=await u()}else e=await u()}else e=i;if(this.resources[t]=e,!f(this,vn)){const a=[document.documentElement];for(;a.length;){const c=a.pop();(s=c[ze])==null||s.call(c),a.push(...[...c.children,...((r=c.shadowRoot)==null?void 0:r.children)||[]].reverse())}}return t!==this.currentLanguage&&A(this,W,t,ti),this.cache===!0&&this.setCache(),t}resetLanguage(){return f(this,W,$n)&&un.forEach(t=>t.resetLanguage()),A(this,W,this.fallbackLanguage,ti),this.cache&&localStorage.removeItem(f(this,W,Xn)),this.setLanguage(this.detectLanguage())}setCache(){f(this,W,$n)&&un.forEach(t=>t.setCache()),localStorage.setItem(f(this,W,Xn),this.currentLanguage)}createSubModule(t,e){const i=new As({resources:e,cachePrefix:`${this.cachePrefix}-${t}`,currentLanguage:this.currentLanguage,fallbackLanguage:this.fallbackLanguage,cache:this.cache});return un.add(i),i}toJSON(){return{currentLanguage:this.currentLanguage,currentLanguagePack:this.resources[this.currentLanguage]}}};W=new WeakSet,Xn=function(){return`${this.cachePrefix}:current`},rc=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:""}},oc=function(){return this.cache&&localStorage.getItem(f(this,W,Xn))||""},$n=function(){return!un.has(this)},ti=function(t){var e;f(this,W,$n)&&(document.documentElement.lang=t),this.currentLanguage=t,(e=this.onChange)==null||e.call(this,t)},vn=new WeakMap;let Ms=As;const Y=n=>window.matchMedia(n).matches,_l={PRINT:"print",get isPrint(){return Y(this.PRINT)},HOVER:"(hover: hover)",get isHover(){return Y(this.HOVER)},PWA:"(display-mode: standalone)",get isPWA(){return Y(this.PWA)},MOTION_REDUCE:"(prefers-reduced-motion: reduce)",get isMotionReduce(){return Y(this.MOTION_REDUCE)},DATA_REDUCE:"(prefers-reduced-data: reduce)",get isDataReduce(){return Y(this.DATA_REDUCE)},WATCH:"(width < 320px)",get isWatch(){return Y(this.WATCH)},SMALL_PHONE:"(320px <= width <= 480px) and (height <= 640px)",get isSmallPhone(){return Y(this.SMALL_PHONE)},PHONE:"(320px <= width <= 480px)",get isPhone(){return Y(this.PHONE)},PHONE_LANDSCAPE:"(480px < width < 960px) and (orientation: landscape)",get isPhoneLandscape(){return Y(this.PHONE_LANDSCAPE)},SHORT:"(width >= 480px) and (height <= 320px)",get isShort(){return Y(this.SHORT)},TABLET:"(480px < width <= 1280px)",get isTablet(){return Y(this.TABLET)},DESKTOP:"(width > 1280px) and (orientation: landscape)",get isDesktop(){return Y(this.DESKTOP)},WIDTHSCREEN:"(width >= 1920px) and (orientation: landscape)",get isWidthScreen(){return Y(this.WIDTHSCREEN)}},fl=Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)).constructor;function Za(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 fl||o instanceof URLSearchParams||o instanceof ReadableStream||o instanceof ArrayBuffer?o:typeof o=="object"?JSON.stringify(o):o,l=(o,g)=>{if(new URL(o,location.origin).pathname!==o)throw new ft("`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 y=h.headers.get("content-type"),E=v.status>=400;try{let k;if(y.includes("json")?k=await v.json():y.includes("octet-stream")?k=await v.arrayBuffer():k=await v.text(),E)throw new Error(v.statusText,{cause:k});return r(k,h)}catch{throw new Error("Parse error")}};return{request:m,get(o,g){const h=s(g);return m(l(o,h),{method:"GET",headers:i(h)})},del(o,g){const h=s(g);return m(l(o,h),{method:"DELETE",headers:i(h)})},put(o,g){const h=s(g);return m(l(o),{method:"PUT",headers:i(h),body:c(h)})},post(o,g){const h=s(g);return m(l(o),{method:"POST",headers:i(h),body:c(h)})}}}const{request:pl,del:ml,get:gl,post:vl,put:$l}=Za(),Xa=new WeakMap,tc=new WeakMap;function yl(n){return Xa.get(n)}function Os(n){return tc.get(n)}function Kn(n,t={}){const e=Cn(),i=Xt({})[Et],s=St(n),r=new Proxy(Ie({[Et]:i},c=>s(c)),{get(c,l){if(!c[l]){const[u,m,o]=l.match(/^(\w*Color)(\d+)$/)||[];m&&(c[l]=`oklch(from ${c[m]} calc(l - ${(Number(o)-400)/1e3}) c h)`)}return c[l]}});tc.set(r,t),Xa.set(r,s);const a=()=>{let c="";Object.keys(s).forEach(l=>{t[l]||(t[l]=`--${Ht(l)}-${e}`,r[l]=`var(${t[l]})`),c+=`${t[l]}:${s[l]};`}),i.setContent(`:scope,:host{${c}}`)};return a(),dt(s,()=>{a(),i.updateStyle()}),r}function ec(n){return Kn(n)}function wl(n){const t=ec(n);return document.adoptedStyleSheets.push(t[Et].getStyle()),t}function Sl(n,t){return Kn(t,Os(n))}function El(n){const t=Kn(n),e=Os(t);return Ie(t,s=>(r,{addInitializer:a,access:c})=>{a(function(){const l=Kn({...n},e);this.internals.sheets.push(l[Et].getStyle(this)),this.memo(()=>l(c.get(this).apply(this)),s&&(()=>s(this)))})})}d.GemActiveLinkElement=Dt,d.GemDialogBaseElement=ve,d.GemElement=F,d.GemError=ft,d.GemLightRouteElement=I,d.GemLinkElement=G,d.GemReflectElement=nn,d.GemRouteElement=oe,d.GemTitleElement=he,d.GemUnsafeElement=qt,d.GemUseElement=mt,d.I18n=Ms,d.LinkedList=Zs,d.Logger=Qa,d.PropProxyMap=Xs,d.QueryString=Zt,d.SheetToken=Et,d.TemplateResult=wn,d.UpdateToken=ze,d._RenderErrorEvent=Pn,d._StoreListenerMap=He,d.absoluteLocation=hi,d.addListener=li,d.addMicrotask=wt,d.adoptedStyle=xe,d.aria=qe,d.async=kr,d.attribute=U,d.basePathStore=Hr,d.boolattribute=Ve,d.camelToKebabCase=Ht,d.classMap=er,d.cleanObject=bn,d.connect=dt,d.connectStore=Ue,d.createDecoratorTheme=El,d.createHistoryParams=ao,d.createModalClass=nl,d.createOverrideTheme=Sl,d.createPath=Hn,d.createRef=Js,d.createScopedTheme=ec,d.createStore=St,d.createTheme=wl,d.createUpdater=Ie,d.css=Xt,d.customElement=Mr,d.del=ml,d.directive=ui,d.effect=pt,d.emitter=ie,d.exportPartsMap=Nc,d.fallback=Er,d.get=gl,d.getThemeProps=Os,d.getThemeStore=yl,d.globalemitter=Tr,d.history=N,d.html=st,d.initRequest=Za,d.isArrayChange=tr,d.kebabToCamelCase=Oc,d.light=yi,d.logger=Ja,d.matchPath=Ii,d.mathml=js,d.mediaQuery=_l,d.memo=vi,d.mounted=ne,d.numattribute=wr,d.objectMapToString=Tn,d.part=$i,d.partMap=Lc,d.post=vl,d.property=B,d.put=$l,d.randomStr=Cn,d.raw=di,d.render=En,d.repeat=sr,d.request=pl,d.shadow=bt,d.slot=br,d.splice=Ya,d.state=De,d.styleMap=Ac,d.styled=Mc,d.svg=Ks,d.template=zt,d.titleStore=Tt,d.unmounted=Sr,d.version=_r,d.willMount=An,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})});
|
|
47
|
+
`,Za=new Map;Ya=[Et(),Ie(vh)];class mt extends(As=J,Ja=[F],Qa=[x],ja=[x],Ka=[Re],Ba=[Nt()],As){constructor(){super(...arguments),jn(this,"selector",at(V,8,this)),at(V,11,this),jn(this,"root",at(V,12,this)),at(V,15,this),jn(this,"element",at(V,16,this)),at(V,19,this),jn(this,"active",at(V,20,this)),at(V,23,this),qa(this,Ns,()=>{const t=this.element||(this.selector?(this.root||document).querySelector(this.selector):null);if(typeof t=="string"){let e=Za.get(t);return e||(e=document.createElement("template"),e.innerHTML=t,Za.set(t,e)),e.content.cloneNode(!0)}else return t instanceof HTMLTemplateElement?t.content.cloneNode(!0):t==null?void 0:t.cloneNode(!0)}),qa(this,Rs,at(V,24,this,()=>h.html`${Ls(this,Ns).call(this)}<slot></slot>`)),at(V,27,this)}}V=_h(As),Ns=new WeakMap,Rs=new WeakMap,ge(V,5,"selector",Ja,mt),ge(V,5,"root",Qa,mt),ge(V,5,"element",ja,mt),ge(V,5,"active",Ka,mt),ge(V,21,"#content",Ba,Rs),mt=ge(V,0,"GemUseElement",Ya,mt),at(V,1,mt),customElements.define("gem-use",mt);class Xa{constructor(t){C(this,Pe);C(this,mn);$(this,"info",(...t)=>{console.log(f(this,Pe,ei),...t)});$(this,"warn",(...t)=>{console.warn(f(this,Pe,ei),...t)});$(this,"error",(...t)=>{console.error(f(this,Pe,ei),...t)});L(this,mn,t)}}mn=new WeakMap,Pe=new WeakSet,ei=function(){return`[${f(this,mn)}]`};const tc=new Xa("GEM"),$h=/\$\d(?:<[^>]*>)?/,Sh=/\$(\d)(<([^>]*)>)?/g,yh=3;function ec(n,...t){const e=n.split($h),i=[];let s;for(;s=Sh.exec(n);){const o=s[yh],a=Number(s[1])-1,c=t[a];i.push(typeof c=="function"?c(o):c)}return h.html(e,...i)}const hn=new Set,Ws=class Ws{constructor(t){C(this,G);$(this,"resources");$(this,"fallbackLanguage");$(this,"currentLanguage");$(this,"cache");$(this,"cachePrefix","gem-i18n");$(this,"urlParamsType");$(this,"urlParamsName");$(this,"onChange");$(this,"replace",({path:t})=>this.setLanguage(t));$(this,"getParams",()=>({path:this.currentLanguage}));C(this,gn,!0);if(!t.resources[t.fallbackLanguage])throw new ft("i18n: fallbackLanguage invalid");Object.assign(this,t);let e=f(this,G,cc)||this.currentLanguage||f(this,G,lc);const i=document.querySelector(`[type*=${this.cachePrefix}]`);if(i)try{const s=JSON.parse(i.textContent||"");e=s.currentLanguage,this.resources[s.currentLanguage]=s.currentLanguagePack}catch{}e?(L(this,G,e,ii),this.setLanguage(e)):this.resetLanguage(),L(this,gn,!1)}get(t,...e){const i=this.resources[this.currentLanguage],s=this.resources[this.fallbackLanguage],o=i[t]||s[t],a=(o==null?void 0:o.message)||o||`[${t}]`;return e.length?ec(a,...e):a}detectLanguage(){const t=Object.keys(this.resources),e=navigator.languages.map(i=>i.replace(/-(.*)/,s=>s.toUpperCase()));for(const i of e){const s=t.find(o=>o===i||i.startsWith(`${o}-`));if(s)return s}return this.fallbackLanguage}async setLanguage(t){var s,o;f(this,G,vn)&&hn.forEach(async a=>await a.setLanguage(t));let e;const i=this.resources[t];if(!i)return tc.warn(`${this.cachePrefix}: not found \`${t}\``),this.resetLanguage();if(typeof i=="string"){const a=`${this.cachePrefix}:`,c=`${a}${i}`,u=localStorage.getItem(c),d=async()=>{const m=await(await fetch(i)).json();if(this.cache){for(let r=0;r<localStorage.length;r++){const g=localStorage.key(r);g.startsWith(a)&&localStorage.removeItem(g)}localStorage.setItem(c,JSON.stringify(m))}return m};if(u)try{e=JSON.parse(u)}catch{e=await d()}else e=await d()}else e=i;if(this.resources[t]=e,!f(this,gn)){const a=[document.documentElement];for(;a.length;){const c=a.pop();(s=c[Le])==null||s.call(c),a.push(...[...c.children,...((o=c.shadowRoot)==null?void 0:o.children)||[]].reverse())}}return t!==this.currentLanguage&&L(this,G,t,ii),this.cache===!0&&this.setCache(),t}resetLanguage(){return f(this,G,vn)&&hn.forEach(t=>t.resetLanguage()),L(this,G,this.fallbackLanguage,ii),this.cache&&localStorage.removeItem(f(this,G,ni)),this.setLanguage(this.detectLanguage())}setCache(){f(this,G,vn)&&hn.forEach(t=>t.setCache()),localStorage.setItem(f(this,G,ni),this.currentLanguage)}createSubModule(t,e){const i=new Ws({resources:e,cachePrefix:`${this.cachePrefix}-${t}`,currentLanguage:this.currentLanguage,fallbackLanguage:this.fallbackLanguage,cache:this.cache});return hn.add(i),i}toJSON(){return{currentLanguage:this.currentLanguage,currentLanguagePack:this.resources[this.currentLanguage]}}};G=new WeakSet,ni=function(){return`${this.cachePrefix}:current`},cc=function(){const{hostname:t,pathname:e,search:i}=location,s=t.split(".");switch(this.urlParamsType){case"ccTLD":return s.pop();case"gTLD":return s.shift();case"path":return e.split("/")[1];default:{const o=this.urlParamsName&&new URLSearchParams(i).get(this.urlParamsName)||"";return o in this.resources?o:""}}},lc=function(){return this.cache&&localStorage.getItem(f(this,G,ni))||""},vn=function(){return!hn.has(this)},ii=function(t){var e;f(this,G,vn)&&(document.documentElement.lang=t),this.currentLanguage=t,(e=this.onChange)==null||e.call(this,t)},gn=new WeakMap;let Is=Ws;const Z=n=>matchMedia(n).matches,wh={PRINT:"print",get isPrint(){return Z(this.PRINT)},HOVER:"(hover: hover)",get isHover(){return Z(this.HOVER)},PWA:"(display-mode: standalone)",get isPWA(){return Z(this.PWA)},MOTION_REDUCE:"(prefers-reduced-motion: reduce)",get isMotionReduce(){return Z(this.MOTION_REDUCE)},DATA_REDUCE:"(prefers-reduced-data: reduce)",get isDataReduce(){return Z(this.DATA_REDUCE)},WATCH:"(width < 320px)",get isWatch(){return Z(this.WATCH)},SMALL_PHONE:"(320px <= width <= 480px) and (height <= 640px)",get isSmallPhone(){return Z(this.SMALL_PHONE)},PHONE:"(320px <= width <= 480px)",get isPhone(){return Z(this.PHONE)},PHONE_LANDSCAPE:"(480px < width < 960px) and (orientation: landscape)",get isPhoneLandscape(){return Z(this.PHONE_LANDSCAPE)},SHORT:"(width >= 480px) and (height <= 320px)",get isShort(){return Z(this.SHORT)},TABLET:"(480px < width <= 1280px)",get isTablet(){return Z(this.TABLET)},DESKTOP:"(width > 1280px) and (orientation: landscape)",get isDesktop(){return Z(this.DESKTOP)},WIDTHSCREEN:"(width >= 1920px) and (orientation: landscape)",get isWidthScreen(){return Z(this.WIDTHSCREEN)}},Eh=Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)).constructor;function nc(n={}){const{origin:t=location.origin,base:e="",appendHeaders:i=()=>({}),transformInput:s=r=>r,transformOutput:o=r=>r,...a}=n,c=r=>r instanceof FormData||r instanceof Blob||r instanceof Eh||r instanceof URLSearchParams||r instanceof ReadableStream||r instanceof ArrayBuffer?r:typeof r=="object"?JSON.stringify(r):r,u=(r,g)=>{if(new URL(r,location.origin).pathname!==r)throw new ft("`path` format is incorrect");const l=new URLSearchParams(g).toString();return`${t}${e}${r}${l?"?":""}${l}`},d=r=>{if(!r)return{};if(r instanceof Headers)return Object.fromEntries(r);const g=Array.isArray(r)?r:Object.entries(r);return Object.fromEntries(g.map(([l,v])=>[l.toLowerCase(),v]))},m=async(r,g={})=>{const l=new Request(r,{...a,...g,headers:new Headers({"content-type":"application/json",...d(a.headers),...d(g.headers)})}),v=await fetch(l);if(v.status===0)throw new Error("Request fail");if(v.status>=500)throw new Error(v.statusText);const S=l.headers.get("content-type"),E=v.status>=400;try{let k;if(S.includes("json")?k=await v.json():S.includes("octet-stream")?k=await v.arrayBuffer():k=await v.text(),E)throw new Error(v.statusText,{cause:k});return o(k,l)}catch{throw new Error("Parse error")}};return{request:m,get(r,g){const l=s(g);return m(u(r,l),{method:"GET",headers:i(l)})},del(r,g){const l=s(g);return m(u(r,l),{method:"DELETE",headers:i(l)})},put(r,g){const l=s(g);return m(u(r),{method:"PUT",headers:i(l),body:c(l)})},post(r,g){const l=s(g);return m(u(r),{method:"POST",headers:i(l),body:c(l)})}}}const{request:Ch,del:bh,get:Th,post:Ph,put:kh}=nc(),ic=new WeakMap,sc=new WeakMap;function Mh(n){return ic.get(n)}function Hs(n){return sc.get(n)}function Qn(n,t={}){const e=yn(),i=Qt({})[yt],s=St(n),o=new Proxy(Me({[yt]:i},c=>s(c)),{get(c,u){if(!c[u]){const[d,m,r]=u.match(/^(\w*Color)(\d+)$/)||[];m&&(c[u]=`oklch(from ${c[m]} calc(l - ${(Number(r)-400)/1e3}) c h)`)}return c[u]}});sc.set(o,t),ic.set(o,s);const a=()=>{let c="";Object.keys(s).forEach(u=>{t[u]||(t[u]=`--${At(u)}-${e}`,o[u]=`var(${t[u]})`),c+=`${t[u]}:${s[u]};`}),i.setContent(`:scope,:host{${c}}`)};return a(),ht(s,()=>{a(),i.updateStyle()}),o}function rc(n){return Qn(n)}function Oh(n){const t=rc(n);return document.adoptedStyleSheets.push(t[yt].getStyle()),t}function Lh(n,t){return Qn(t,Hs(n))}function Ah(n){const t=Qn(n),e=Hs(t);return Me(t,s=>(o,{addInitializer:a,access:c})=>{a(function(){const u=Qn({...n},e);this.internals.sheets.push(u[yt].getStyle(this)),this.memo(()=>u(c.get(this).apply(this)),s&&(()=>s(this)))})})}h.GemActiveLinkElement=Vt,h.GemDialogBaseElement=se,h.GemElement=J,h.GemError=ft,h.GemLightRouteElement=H,h.GemLinkElement=z,h.GemReflectElement=on,h.GemRouteElement=ce,h.GemTitleElement=fe,h.GemUnsafeElement=Ft,h.GemUseElement=mt,h.I18n=Is,h.LinkedList=Us,h.Logger=Xa,h.PropProxyMap=Fs,h.QueryString=jt,h.SheetToken=yt,h.TemplateResult=Ei,h.UpdateToken=Le,h._RenderErrorEvent=Cn,h._StoreListenerMap=Oe,h.absoluteLocation=ri,h.addListener=oi,h.addMicrotask=_t,h.adoptedStyle=Ie,h.aria=We,h.async=ur,h.attribute=F,h.basePathStore=Vr,h.boolattribute=Ne,h.camelToKebabCase=At,h.classMap=xs,h.cleanObject=wn,h.connect=ht,h.connectStore=He,h.createDecoratorTheme=Ah,h.createHistoryParams=Po,h.createModalClass=bl,h.createOverrideTheme=Lh,h.createPath=Un,h.createRef=Zc,h.createScopedTheme=rc,h.createStore=St,h.createTheme=Oh,h.createUpdater=Me,h.css=Qt,h.customElement=_r,h.del=bh,h.directive=Lr,h.effect=pt,h.emitter=Zt,h.exportPartsMap=pc,h.fallback=ar,h.get=Th,h.getThemeProps=Hs,h.getThemeStore=Mh,h.globalemitter=hr,h.history=N,h.initRequest=nc,h.isArrayChange=qs,h.isSSR=li,h.kebabToCamelCase=uc,h.light=vi,h.logger=tc,h.matchPath=Yi,h.mathml=Fc,h.mediaQuery=wh,h.memo=mi,h.mounted=Yt,h.numattribute=rr,h.objectMapToString=En,h.part=gi,h.partMap=fc,h.post=Ph,h.property=x,h.put=kh,h.randomStr=yn,h.raw=Sn,h.repeat=al,h.request=Ch,h.setEngine=ai,h.shadow=Et,h.slot=lr,h.splice=ec,h.state=Re,h.styleMap=_c,h.styled=dc,h.svg=Uc,h.template=Nt,h.titleStore=bt,h.unmounted=or,h.version=Or,h.willMount=Mn,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/elements/base/dialog.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/elements/base/dialog.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,QAAA,MAAM,KAAK,eAAW,CAAC;AAEvB;;;GAGG;AACH,8BAEsB,oBAAqB,SAAQ,UAAU;;IAChD,KAAK,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAuCvB,YAAY;IACZ,IAAI,iCAUF;IAEF,WAAW;IAIX,YAAY;IACZ,KAAK,eAGH;IAEF;;;;;OAKG;IACH,UAAU,eAIR;CACH"}
|
package/elements/base/dialog.js
CHANGED
|
@@ -32,9 +32,9 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
|
|
|
32
32
|
}
|
|
33
33
|
return useValue ? value : void 0;
|
|
34
34
|
};
|
|
35
|
-
import {
|
|
36
|
-
import { attribute, state, connectStore, aria, willMount } from '../../lib/decorators';
|
|
35
|
+
import { aria, attribute, connectStore, state, willMount } from '../../lib/decorators';
|
|
37
36
|
import { history } from '../../lib/history';
|
|
37
|
+
import { GemElement } from '../../lib/reactive';
|
|
38
38
|
const final = Symbol();
|
|
39
39
|
/**
|
|
40
40
|
* 在模版中声明的 dialog,使用 `open` 方法 打开;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../src/elements/base/dialog.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../src/elements/base/dialog.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACvF,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,MAAM,KAAK,GAAG,MAAM,EAAE,CAAC;AAEvB;;;GAGG;IAGmB,oBAAoB;4BAFzC,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,EAC3B,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;;;;sBACO,UAAU;;;;;;;;;;oCAAlB,SAAQ,WAAU;;;;iCAC1D,SAAS;kCACT,KAAK;wCAoCL,SAAS,EAAE;YArCD,iKAAA,KAAK,6BAAL,KAAK,qFAAS;YAClB,oKAAA,MAAM,6BAAN,MAAM,uFAAU;YAqCvB,uIAAA,KAAK,yBAAL,KAAK,6BAAL,KAAK,mGAA6B;YAvCpC,6KA2EC;;;YA3EqB,uDAAoB;;QAC7B,KAAK,wDAAS;QAClB,MAAM,8GAAU;QAEvB,YAAY,sDAAmB;QAC/B,cAAc,CAAc;QAC5B,WAAW,GAAkB,EAAE,CAAC;QAEhC;;WAEG;QACH,YAAY,GAAG,GAAG,EAAE;YAClB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;YAClB,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC;YACnD,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;gBACtB,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACjC,CAAC;iBAAM,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC;gBAC/B,IAAI,CAAC,cAAc,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC;YACzC,CAAC;YACD,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC;YAC7C,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACtB,CAAC,CAAC;QAEF;;WAEG;QACH,WAAW,GAAG,GAAG,EAAE;YACjB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;YACpB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;YACnB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,WAAW,CAAC;YACrC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YAC/D,IAAI,CAAC,WAAW,GAAI,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAmB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;YAC1F,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC;YAClD,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAC3B,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;YAC5C,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACrB,CAAC,CAAC;QAGF,KAAK,uDAAG,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,EAAC;QAElC,YAAY;QACZ,IAAI,8DAAG,GAAG,EAAE;YACV,IAAI,IAAI,CAAC,MAAM;gBAAE,OAAO;YACxB,IAAI,CAAC,WAAW,EAAE,CAAC;YACnB,OAAO,CAAC,IAAI,CAAC;gBACX,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,IAAI,EAAE,IAAI,CAAC,WAAW;gBACtB,KAAK,EAAE,IAAI,CAAC,YAAY;gBACxB,WAAW,EAAE,IAAI,CAAC,WAAW;aAC9B,CAAC,CAAC;YACH,OAAO,KAAK,CAAC;QACf,CAAC,EAAC;QAEF,WAAW;YACT,OAAO,IAAI,CAAC;QACd,CAAC;QAED,YAAY;QACZ,KAAK,GAAG,GAAG,EAAE;YACX,OAAO,CAAC,IAAI,EAAE,CAAC;YACf,OAAO,KAAK,CAAC;QACf,CAAC,CAAC;QAEF;;;;;WAKG;QACH,UAAU,GAAG,GAAG,EAAE;YAChB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;YACpB,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;YAC5B,OAAO,KAAK,CAAC;QACf,CAAC,CAAC;;;;SA1EkB,oBAAoB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gesture.d.ts","sourceRoot":"","sources":["../../src/elements/base/gesture.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
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;CACnB,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;IAgMzB,oBAAoB;IACpB,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,EAAE,CAAC,CAAa;CACrD"}
|
package/elements/base/gesture.js
CHANGED
|
@@ -32,8 +32,8 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
|
|
|
32
32
|
}
|
|
33
33
|
return useValue ? value : void 0;
|
|
34
34
|
};
|
|
35
|
-
import { css, GemElement } from '../../lib/element';
|
|
36
35
|
import { adoptedStyle, attribute, emitter, mounted, state } from '../../lib/decorators';
|
|
36
|
+
import { css, GemElement } from '../../lib/reactive';
|
|
37
37
|
function angleAB(a, b, c, { clientX: x1, clientY: y1 }, { clientX: x2, clientY: y2 }, { clientX: x3, clientY: y3 }) {
|
|
38
38
|
// https://en.wikipedia.org/wiki/Law_of_cosines
|
|
39
39
|
// https://blog.csdn.net/z278930050/article/details/53319091
|
|
@@ -174,7 +174,7 @@ let GemGestureElement = (() => {
|
|
|
174
174
|
this.#startEventMap.set(evt.pointerId, evt);
|
|
175
175
|
if (evt.isPrimary) {
|
|
176
176
|
this.#pressed = false;
|
|
177
|
-
this.#pressTimer =
|
|
177
|
+
this.#pressTimer = setTimeout(() => {
|
|
178
178
|
this.press(evt);
|
|
179
179
|
this.#pressed = true;
|
|
180
180
|
}, 251);
|
|
@@ -219,7 +219,7 @@ let GemGestureElement = (() => {
|
|
|
219
219
|
Math.abs(movementY) > accuracy ||
|
|
220
220
|
Math.abs(move.clientX - startEvent.clientX) > accuracy ||
|
|
221
221
|
Math.abs(move.clientY - startEvent.clientY) > accuracy) {
|
|
222
|
-
|
|
222
|
+
clearTimeout(this.#pressTimer);
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
225
|
};
|
|
@@ -236,7 +236,7 @@ let GemGestureElement = (() => {
|
|
|
236
236
|
#onEnd = async (evt) => {
|
|
237
237
|
evt.stopPropagation();
|
|
238
238
|
const { pointerId } = evt;
|
|
239
|
-
|
|
239
|
+
clearTimeout(this.#pressTimer);
|
|
240
240
|
if (this.movesMap.size === 1) {
|
|
241
241
|
this.grabbing = false;
|
|
242
242
|
this.end(evt);
|