@mantou/gem 2.2.13 → 2.2.15
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.js +7 -7
- package/dist/gem.mjs +7 -7
- package/elements/base/gesture.d.ts +7 -1
- package/elements/base/gesture.d.ts.map +1 -1
- package/elements/base/gesture.js +23 -15
- package/elements/base/gesture.js.map +1 -1
- package/elements/base/link.d.ts.map +1 -1
- package/elements/base/link.js +6 -3
- package/elements/base/link.js.map +1 -1
- package/elements/base/modal-factory.d.ts +1 -1
- package/elements/base/modal-factory.d.ts.map +1 -1
- package/elements/base/use.d.ts.map +1 -1
- package/elements/base/use.js +11 -0
- package/elements/base/use.js.map +1 -1
- package/helper/hmr.d.ts +3 -2
- package/helper/hmr.d.ts.map +1 -1
- package/helper/hmr.js +95 -23
- package/helper/hmr.js.map +1 -1
- package/helper/i18n.d.ts +2 -1
- package/helper/i18n.d.ts.map +1 -1
- package/helper/i18n.js +9 -1
- package/helper/i18n.js.map +1 -1
- package/helper/theme.d.ts.map +1 -1
- package/helper/theme.js +5 -0
- package/helper/theme.js.map +1 -1
- package/lib/decorators.d.ts +9 -1
- package/lib/decorators.d.ts.map +1 -1
- package/lib/decorators.js +4 -3
- package/lib/decorators.js.map +1 -1
- package/lib/history.d.ts +10 -7
- package/lib/history.d.ts.map +1 -1
- package/lib/history.js +20 -16
- package/lib/history.js.map +1 -1
- package/lib/lit-html.d.ts +15 -0
- package/lib/lit-html.d.ts.map +1 -1
- package/lib/lit-html.js +3 -1
- package/lib/lit-html.js.map +1 -1
- package/lib/reactive.d.ts +4 -1
- package/lib/reactive.d.ts.map +1 -1
- package/lib/reactive.js +41 -18
- package/lib/reactive.js.map +1 -1
- package/lib/server.d.ts +14 -0
- package/lib/server.d.ts.map +1 -0
- package/lib/server.js +43 -0
- package/lib/server.js.map +1 -0
- package/lib/store.d.ts +10 -1
- package/lib/store.d.ts.map +1 -1
- package/lib/store.js +36 -9
- package/lib/store.js.map +1 -1
- package/lib/utils.d.ts +2 -2
- package/lib/utils.d.ts.map +1 -1
- package/lib/utils.js +20 -7
- package/lib/utils.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/src/elements/base/gesture.ts +26 -15
- package/src/elements/base/link.ts +5 -3
- package/src/elements/base/use.ts +11 -0
- package/src/helper/hmr.ts +105 -37
- package/src/helper/i18n.ts +12 -1
- package/src/helper/theme.ts +4 -0
- package/src/lib/decorators.ts +10 -10
- package/src/lib/history.ts +20 -16
- package/src/lib/lit-html.ts +3 -1
- package/src/lib/reactive.ts +40 -18
- package/src/lib/server.ts +45 -0
- package/src/lib/store.ts +40 -9
- package/src/lib/utils.ts +22 -7
- package/src/lib/version.ts +1 -1
- package/src/test/elements/gesture.test.ts +26 -1
- package/src/test/gem-element/basic.test.ts +20 -0
- package/src/test/store.test.ts +12 -0
package/dist/gem.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Gem=e():t.Gem=e()}(globalThis,()=>(()=>{"use strict";let t,e,n,r,i,s,o,a,l,c,u,h,d,f,p,m,g,y,b,v,w,S,$,_,E,C,T,x,P,O,L,k,j,N,A,M,R,I,H,V,D,z,W,U,q,G,K,B,J,F,Q,Y,Z,X,tt,te,tn,tr,ti,ts,to,ta,tl,tc,tu,th,td,tf,tp,tm,tg,ty,tb,tv,tw,tS,t$,t_,tE,tC,tT,tx,tP,tO,tL,tk,tj,tN,tA,tM,tR,tI,tH,tV,tD,tz,tW,tU,tq,tG,tK,tB,tJ,tF,tQ,tY,tZ,tX,t0,t1,t2,t3,t8,t4,t7,t6,t5,t9,et,ee,en,er,ei,es,eo,ea,el,ec,eu,eh,ed,ef,ep,em,eg,ey,eb,ev,ew,eS,e$,e_,eE,eC,eT,ex,eP,eO,eL,ek,ej,eN,eA,eM,eR,eI,eH,eV,eD,ez,eW,eU,eq,eG,eK;var eB={};eB.d=(t,e,n)=>{var r=(e,n)=>{for(var r in e)eB.o(e,r)&&!eB.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,[n]:e[r]})};r(e,"get"),r(n,"value")},eB.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),eB.r=t=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var eJ={};eB.r(eJ),eB.d(eJ,{GemActiveLinkElement:()=>tQ,GemDialogBaseElement:()=>p,GemElement:()=>nz,GemError:()=>nl,GemLightRouteElement:()=>te,GemLinkElement:()=>tF,GemReflectElement:()=>i7,GemRouteElement:()=>tn,GemTitleElement:()=>em,GemUnsafeElement:()=>eL,GemUseElement:()=>eK,I18n:()=>sp,LinkedList:()=>e9,Logger:()=>sl,PropProxyMap:()=>nt,QueryString:()=>ne,SheetToken:()=>nx,TemplateResult:()=>rG,UpdateToken:()=>nP,_RenderErrorEvent:()=>nL,_StoreListenerMap:()=>nm,_createTemplate:()=>e,absoluteLocation:()=>e6,addListener:()=>e5,addMicrotask:()=>e4,adoptedStyle:()=>rg,aria:()=>rS,async:()=>rw,attribute:()=>n5,basePathStore:()=>ij,boolattribute:()=>n9,camelToKebabCase:()=>ns,classMap:()=>nd,cleanObject:()=>na,connect:()=>ny,connectStore:()=>ry,createDecoratorTheme:()=>sk,createHistoryParams:()=>iK,createModalClass:()=>iV,createOverrideTheme:()=>sL,createPath:()=>iG,createRef:()=>r9,createScopedTheme:()=>sP,createState:()=>t,createStore:()=>ng,createTheme:()=>sO,createUpdater:()=>e7,css:()=>nM,customElement:()=>r$,del:()=>sv,directive:()=>ir,effect:()=>rr,emitter:()=>rf,exportPartsMap:()=>np,fallback:()=>rl,get:()=>sw,getThemeProps:()=>sT,getThemeStore:()=>sC,globalemitter:()=>rp,history:()=>iL,html:()=>nb,initRequest:()=>sy,isArrayChange:()=>nc,kebabToCamelCase:()=>no,light:()=>rv,logger:()=>sc,matchPath:()=>iq,mathml:()=>rF,mediaQuery:()=>sm,memo:()=>rn,mounted:()=>ro,numattribute:()=>rt,objectMapToString:()=>nu,part:()=>rd,partMap:()=>nf,post:()=>sS,property:()=>re,put:()=>s$,randomStr:()=>ni,raw:()=>nn,render:()=>nv,repeat:()=>iu,request:()=>sb,setEngine:()=>nw,setHydrationEngine:()=>n$,shadow:()=>rb,slot:()=>rh,splice:()=>sd,state:()=>rc,styleMap:()=>nh,styled:()=>nr,svg:()=>rJ,template:()=>ra,titleStore:()=>ik,unmounted:()=>ri,version:()=>ie,willMount:()=>rs});var eF={};eB.r(eF),eB.d(eF,{_StoreListenerMap:()=>nm,connect:()=>ny,createStore:()=>ng});var eQ={};eB.r(eQ),eB.d(eQ,{GemElement:()=>nz,SheetToken:()=>nx,UpdateToken:()=>nP,_RenderErrorEvent:()=>nL,_createTemplate:()=>e,createState:()=>t,css:()=>nM,html:()=>nb,render:()=>nv,setEngine:()=>nw,setHydrationEngine:()=>n$});var eY={};eB.r(eY),eB.d(eY,{adoptedStyle:()=>rg,aria:()=>rS,async:()=>rw,attribute:()=>n5,boolattribute:()=>n9,connectStore:()=>ry,customElement:()=>r$,effect:()=>rr,emitter:()=>rf,fallback:()=>rl,globalemitter:()=>rp,light:()=>rv,memo:()=>rn,mounted:()=>ro,numattribute:()=>rt,part:()=>rd,property:()=>re,shadow:()=>rb,slot:()=>rh,state:()=>rc,template:()=>ra,unmounted:()=>ri,willMount:()=>rs});var eZ={};eB.r(eZ),eB.d(eZ,{version:()=>ie});let{assign:eX,fromEntries:e0,entries:e1,keys:e2}=Object;function e3(t){Promise.resolve().then(t)}let e8=new Set;function e4(t,e=e3){e8.has(t)||(e(()=>{e8.delete(t),t()}),e8.add(t))}function e7(t,e){return delete e.name,delete e.length,eX(e,t),e}function e6(t="",e=""){let{pathname:n,search:r,hash:i}=new URL(e,location.origin+t);return n+r+decodeURIComponent(i)}function e5(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}class e9 extends EventTarget{#t=new Map;#e;#n;#r(t){let e=this.#t.get(t);return e&&(e.prev?e.prev.next=e.next:this.#e=e.next,e.next?e.next.prev=e.prev:this.#n=e.prev,this.#t.delete(t)),e}get size(){return this.#t.size}get first(){return this.#e}get last(){return this.#n}isSuperLinkOf(t,e=!1){let n=t.first;if(!n)return!0;let r=e?this.#e:this.find(n.value);for(;r&&n;){if(r.value===n.value)n=n.next;else if(!e)return!1;r=r.next}return!n}find(t){return this.#t.get(t)}add(t){this.#n||this.dispatchEvent(new CustomEvent("start"));let e=this.#r(t)||{value:t};e.prev=this.#n,e.prev&&(e.prev.next=e),e.next=void 0,this.#n=e,this.#e||(this.#e=e),this.#t.set(t,e)}delete(t){let e=this.#r(t);return this.#e||this.dispatchEvent(new CustomEvent("end")),e}clear(){this.#t.clear(),this.#e=this.#n=void 0}get(){let t=this.#e;if(t)return this.delete(t.value),t.value}}class nt extends WeakMap{get(t){let e=super.get(t);return e||(e={},this.set(t,e)),e}}class ne extends URLSearchParams{concat(t){e1("string"==typeof t?e0(new URLSearchParams(t).entries()):t).forEach(([t,e])=>{this.append(t,this.#i(e))})}#i=t=>"string"==typeof t?t:JSON.stringify(t);setAny(t,e){if(Array.isArray(e))this.delete(t),e.forEach(e=>this.append(t,this.#i(e)));else{let n=this.#i(e);n?this.set(t,n):this.delete(t)}}#s=t=>{if(!t)return null;try{return JSON.parse(t)}catch{return null}};getAny(t){return this.getAnyAll(t)[0]}getAnyAll(t){return this.getAll(t).filter(t=>""!==t).map(t=>this.#s(t))}toString(){let t=super.toString();return t?`?${t}`:""}toJSON(){return this.toString()}}function nn(t,...e){return t.reduce((t,n,r)=>t+(e[r-1]??"")+n)}let nr=nn;function ni(t=5){let e=Math.random().toString(36).slice(2,2+t);return e.length<t?e+ni(t-e.length):e}function ns(t){return t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function no(t){return t.replace(/-(.)/g,(t,e)=>e.toUpperCase())}function na(t){return e2(t).forEach(e=>{delete t[e]}),t}class nl extends Error{constructor(t){super(t),this.message=`gem: ${this.message}`}}function nc(t,e){let n=t.length;if(e.length!==n)return!0;for(let r=0;r<n;r++)if(t[r]!==e[r])return!0;return!1}function nu(t,e,n){let r=e;for(let i in t){let s=n(i,t[i]);r+=s?s+e:""}return r}function nh(t){return nu(t,";",(t,e)=>e||0===e?`${ns(t)}:${e}`:"")}function nd(t){return nu(t," ",(t,e)=>e?t:"")}let nf=nd;function np(t){return nu(t,",",(t,e)=>!0===e||t===e?t:e?`${t}:${e}`:"")}let nm=new WeakMap;function ng(t){let e=e7(t,t=>{Object.assign(e,t),nm.get(e)?.forEach(t=>e4(t))});return nm.set(e,new Set),e}function ny(t,e){let n=nm.get(t);return n?.add(e),()=>n?.delete(e)}let nb=(t,...e)=>nn(t,...e.map(t=>t instanceof Element?t.outerHTML:t)),nv=(t,e)=>e.innerHTML=t;function nw(t,e){nb=t,nv=e}let nS=(t,e)=>{};function n$(t){nS=t}let{assign:n_,defineProperty:nE}=Object;nE(Symbol,"metadata",{value:Symbol.for("Symbol.metadata")});let nC=t=>"function"==typeof t&&t(),nT=globalThis.nQM,nx=Symbol.for("gem@sheetToken"),nP=Symbol.for("gem@update"),nO="gem-style-boundary",nL="gem@render-error",nk=new WeakMap,nj=new WeakMap;class nN extends CSSStyleSheet{#o;cssText="";get element(){return this.#o||(this.#o=document.createElement("style"),this.#o.textContent=this.cssText),this.#o}replaceSync(t){this.cssText=t,this.#o&&(this.#o.textContent=t),super.replaceSync(t)}}class nA{#a="";#l="";constructor(t=""){this.#l=t}setContent(t){this.#a=t}#c=new Map;#u=new Map;getStyle(t,e){let n=t&&!t.internals?.shadowRoot,r=n?t.constructor:this;if(!this.#c.has(r)){let t=new nN({media:this.#l});this.#c.set(r,t)}let i=this.#c.get(r);if(!this.#u.has(i)){let r=this.#a,s="";n&&(s=e?"@scope":`@scope (${t.tagName}) to (:state(${nO}) > *)`,r=`${s}{ ${r} }`),i.replaceSync(r),this.#u.set(i,s)}return i}updateStyle(){this.#u.forEach((t,e)=>{e.replaceSync(t?`${t}{${this.#a}}`:this.#a)})}}function nM(t,...e){let n="",r="",i=e.at(0);Array.isArray(t)?r=nn(t,...e):void 0!==i?(n=t,r=i):r=t;let s=new nA(n),o={[nx]:s},a="";return"string"==typeof r?a=r:Object.keys(r).forEach(t=>{let e="$"===t;o[t]=e||t.includes("-")?t:`${t}-${ni()}`,a+=`${e?":where(&:not([hidden])),:host(:where(:not([hidden])))":`.${o[t]}`} {${r[t]}}`}),s.setContent(a),o}let nR=(t,e,n)=>{let r=!1;e.forEach(e=>{let i=t.get(e)||0;r||=1===n&&0===i||-1===n&&1===i,t.set(e,i+n)}),r&&e4(nj.get(t),nT)};function nI(t){t?.forEach(t=>{let{callback:e,getDep:n,values:r,preCallback:i}=t,s=n?.();(!n||!r||nc(r,s))&&(nC(i),t.preCallback=e(s,r),t.values=s,t.initialized=!0)})}function nH(t){return t.filter(t=>(nC(t.preCallback),t.initialized=!1,t.values=void 0,t.fixed))}let nV=new e9,nD=(t=performance.now())=>{if(performance.now()>t+50)return requestAnimationFrame(nD);let e=nV.get();e&&(e(),nD(t))};nV.addEventListener("start",()=>e4(nD));class nz extends HTMLElement{#h;#d;#f=[];#p=[];#m=[];#g;#y;#b;#v;#w;[nP](){this.#y&&e4(this.#S)}static{t=t=>{let e=n,r=e7(t,t=>{let n=e.#f.at(0);if(!nT&&e.#y&&n&&!n.initialized)throw new nl("Don't set state sync before insert the DOM");n_(r,t),!e.#v&&e.#y&&e4(e.#S,nT)});return e.#d.stateList.push(r),r},e=(t,e)=>t.#m.push(e)}constructor(){let t;super(),n=this;const{aria:e,mode:r,delegatesFocus:i,...s}=this.#$,{focusable:o,...a}=e||{};this.#h=r?this.shadowRoot||this.attachShadow({mode:r,delegatesFocus:i,...s}):this,this.#d=this.attachInternals(),this.#d.stateList=[],this.#d.sheets=[],n_(this.#d,a),this.#f.push({fixed:!0,getDep:()=>[this.disabled],callback:([e=!1])=>{if(void 0===t&&(t=this.hasAttribute("tabindex")),this.#d.ariaDisabled=String(e),o&&!t&&(this.tabIndex=-Number(e)),(o||i)&&e)return e5(this,"click",t=>t.isTrusted&&t.stopImmediatePropagation(),{capture:!0})}})}get #$(){return this.constructor[Symbol.metadata]}get #_(){return this.#m.findLast(t=>!t.condition||t.condition())}get internals(){return this.#d}#E=()=>{nI(this.#f)};#C=()=>{nI(this.#p)};#T=t=>{try{this.#v=!0,this.#C();let e=this.#h===this,n=t?t.render():e?void 0:nb`<slot></slot>`;if(void 0===n)return;let r=null!==n?n:nb`<style>${e?"@scope":":host"}{&{display:none!important;}}</style>`;nS(r,this.#h)||nv(r,this.#h)}catch(t){throw this.dispatchEvent(new CustomEvent(nL,{bubbles:!0,composed:!0,detail:t})),t}finally{this.#v=!1}};#x=()=>{let t=this.#_;this.#y&&(t||!this.#m.length)&&(this.#T(t),e4(this.#E))};#S=()=>{this.#$.noBlocking?nV.add(this.#x):this.#x()};#P=()=>{let{adoptedStyleSheets:t=[]}=this.#$,{shadowRoot:e,sheets:n}=this.#d,r=t.map(t=>t[nx].getStyle(this));if(!e)return this.prepend(...n.map(t=>t.element)),((t,e)=>{let n=t.getRootNode();if(!nk.has(n)){let t=new Map;nk.set(n,t),nj.set(t,()=>{let e=(n.adoptedStyleSheets||[]).filter(e=>!t.has(e));t.forEach((t,n)=>t&&e.push(n)),n.adoptedStyleSheets=e.reverse()})}let r=nk.get(n);return nR(r,e,1),()=>nR(r,e,-1)})(this,r);e.adoptedStyleSheets=r.concat(n)};#O=()=>{this.#f?.forEach(t=>{let{callback:e,getDep:n,initialized:r}=t;r||(t.values=n?.(),t.preCallback=e(t.values),t.initialized=!0)})};#L=()=>{this.willMount&&this.memo(this.willMount.bind(this),()=>[]),this.mounted&&this.effect(this.mounted.bind(this),()=>[]),this.updated&&this.effect((t,e)=>e&&this.updated.apply(this)),this.unmounted&&this.effect(()=>this.unmounted.bind(this),()=>[]),!this.#m.length&&this.render&&this.#m.push({render:this.render.bind(this),condition:this.shouldUpdate?.bind(this)})};#k;#j=async()=>{if(this.#g){this.#g=!1,this.#w?.(),this.#w=this.#P();return}this.#b=!0,this.#L();let{observedStores:t,mode:e,penetrable:n}=this.#$;this.#d.states.add("gem-element"),e||!this.#m.length||n||this.#d.states.add(nO),this.#k=t?.map(t=>ny(t,this.#S)),this.#T(this.#_),this.#y=!0,this.#w=this.#P(),e4(this.#O)};connectedCallback(){this.#$.noBlocking?nV.add(this.#j):this.#j()}disconnectedCallback(){if(this.isConnected){this.#g=!0;return}nV.delete(this.#j),nV.delete(this.#x),this.#y=!1,this.#k?.forEach(t=>t()),this.#f=nH(this.#f),this.#p=nH(this.#p),this.#w?.()}effect=(t,e)=>{let n={callback:t,getDep:e,initialized:this.#y,fixed:!this.#b};this.#y&&(n.values=e?.(),n.preCallback=t(n.values)),this.#f.push(n)};memo=(t,e)=>{this.#p.push({callback:t,getDep:e,fixed:!this.#b})};update=()=>e4(this.#S)}let{deleteProperty:nW,getOwnPropertyDescriptor:nU,defineProperty:nq}=Reflect,{getPrototypeOf:nG,assign:nK,hasOwn:nB}=Object,nJ=new nt;function nF(t,e,n){let r=t.metadata;nU(r,e)||nq(r,e,{value:r[e]?.filter(t=>t!==n)||[]}),r[e].push(n)}function nQ(t,e){let{value:n}=nU(t,e)||{};nW(t,e),t[e]=n}let nY=new WeakMap,{setAttribute:nZ,toggleAttribute:nX,removeAttribute:n0}=Element.prototype,n1=(t,e)=>nY.get(nG(t))?.get(e);function n2(){}nz.prototype.setAttribute=function(t,e){let n=n1(this,t);if(!n)return nZ.call(this,t,e);this[n]=e},nz.prototype.removeAttribute=function(t){let e=n1(this,t);if(!e)return n0.call(this,t);this[e]=null},nz.prototype.toggleAttribute=function(t,e){let n=n1(this,t);return n?this[n]=e??!this.hasAttribute(t):nX.call(this,t,e)};let n3=Symbol("event handle");function n8(t,e,{attr:n,attrType:r,event:i,eventOptions:s}={}){nq(t,e,{configurable:!0,get(){let t=nJ.get(this)[e];return i&&!t?(this[e]=n2,this[e]):t},set(t){let o=this,a=nJ.get(o);n&&((t=r===Boolean&&""===t||r(t||""))?nZ.call(this,n,r===Boolean?"":t):n0.call(this,n)),t!==a[e]&&(i?(a[e]=t?.[n3]?t:async(e,n)=>{await Promise.resolve();let r=new CustomEvent(i,{...n,...s,detail:e});o.dispatchEvent(r),await t(e,n)},a[e][n3]=!0):(a[e]=t,this[nP]()))}})}let n4=new WeakMap;function n7(t,{metadata:e}){let n=n4.get(e);if(n)return n;let r=t;do r=nG(r);while(r.constructor[Symbol.metadata]!==e);return n4.set(e,r),r}function n6(t,e){let n=t.name,r=ns(n);return t.addInitializer(function(){let i=n7(this,t);nB(i,n)||(nF(t,"observedAttributes",r),n8(i,n,{attr:r,attrType:e})),nQ(this,n);let s=nG(this),o=nY.get(s)||new Map;o.set(r,n),nY.set(s,o)}),function(t){return this.getAttribute(r)??t}}function n5(t,e){return n6(e,String)}function n9(t,e){return n6(e,Boolean)}function rt(t,e){return n6(e,Number)}function re(t,e){let n=e.name;return e.addInitializer(function(){let t=n7(this,e);nB(t,n)||(nF(e,"observedProperties",n),n8(t,n)),nQ(this,n)}),function(t){return this[n]??t}}function rn(t){return(e,n)=>{let{addInitializer:r,name:i,access:s,kind:o}=n;r(function(){let e=t&&(()=>t(this));if("getter"===o){if(n.private)throw new nl("not support");let t=nU(n7(this,n),i).get.bind(this);this.memo(()=>{nq(this,i,{configurable:!0,value:t()})},e)}else this.memo(s.get.call(this,this).bind(this),e)})}}function rr(t){return(e,{addInitializer:n,access:r})=>{n(function(){this.effect(r.get.call(this,this).bind(this),t&&(()=>t(this)))})}}function ri(){return(t,{addInitializer:e,access:n})=>{e(function(){this.effect(()=>n.get.call(this,this).bind(this),()=>[])})}}function rs(){return rn(()=>[])}function ro(){return rr(()=>[])}function ra(t){return(n,{addInitializer:r,access:i})=>{r(function(){e(this,{render:i.get.call(this,this).bind(this),condition:t&&(()=>t(this))})})}}function rl(){return(t,{addInitializer:e,access:n})=>{e(function(){this.addEventListener(nL,({detail:t})=>{nv(n.get.call(this,this).apply(this,[t]),this.internals.shadowRoot||this)})})}}function rc(t,e){let n=e.name,r=ns(n);e.addInitializer(function(){let t=n7(this,e);!nB(t,n)&&(nF(e,"definedCSSStates",r),nq(t,n,{configurable:!0,get(){let{states:t}=this.internals;return t?.has(r)},set(t){let{states:e}=this.internals;t?e?.add(r):e?.delete(r)}}));nQ(this,n)})}function ru(t,e,n,r){let i=t.name,s=ns(i);if(t.static)nF(t,n,s);else{let r=nG(e);r[i]||(r[i]=s,nF(t,n,s))}return r||s}function rh(t,e){return function(t){return ru(e,this,"definedSlots",t)}}function rd(t,e){return function(t){return ru(e,this,"definedParts",t)}}function rf(t,e){rm(e)}function rp(t,e){rm(e,{bubbles:!0,composed:!0})}function rm(t,e){let n=t.name,r=ns(n);t.addInitializer(function(){let i=n7(this,t);nB(i,n)||(nF(t,"definedEvents",r),n8(i,n,{event:r,eventOptions:e})),nQ(this,n)})}function rg(t){return(e,n)=>{nF(n,"adoptedStyleSheets",t)}}function ry(t){return(e,n)=>{nF(n,"observedStores",t)}}function rb({mode:t="open",serializable:e=!0,...n}={}){return(r,i)=>{nK(i.metadata,{mode:t,serializable:e,...n})}}function rv({penetrable:t}){return(e,n)=>{n.metadata.penetrable=t}}function rw(){return(t,e)=>{e.metadata.noBlocking=!0}}function rS(t){return(e,n)=>{let r=n.metadata;r.aria={...r.aria,...t}}}function r$(t){return(e,{addInitializer:n})=>{n(()=>{customElements.define(t,e)})}}let r_=globalThis.trustedTypes,rE=r_?.createPolicy("lit-html",{createHTML:t=>t}),rC="$lit$",rT=`lit$${Math.random().toFixed(9).slice(2)}$`,rx="?"+rT,rP=`<${rx}>`,rO=document,rL=()=>rO.createComment(""),rk=t=>null===t||"object"!=typeof t&&"function"!=typeof t,rj=t=>null==t,rN=`[
|
|
2
|
-
\f\r]`,
|
|
3
|
-
\f\r"'\`<>=]`,rM=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,rR=/-->/g,rI=/>/g,rH=RegExp(`>|${rN}(?:([^\\s"'>=/]+)(${rN}*=${rN}*(?:${rA}|("|')|))|$)`,"g"),rV=/'/g,rD=/"/g,rz=/^(?:script|style|textarea|title)$/i,rW="v-if",rU="v-else-if",rq="v-else";class rG{type;strings;values;constructor(t,e,n){this.type=t,this.strings=e,this.values=n}}let rK=t=>(e,...n)=>new rG(t,e,n),rB=rK(1),rJ=rK(2),rF=rK(3),rQ=Symbol.for("lit-noChange"),rY=new WeakMap,rZ=rO.createTreeWalker(rO,129);class rX{el;parts=[];constructor({strings:t,type:e},n){let r,i=0,s=0;const o=t.length-1,a=this.parts,[l,c]=((t,e)=>{let n,r=t.length-1,i=[],s=2===e?"<svg>":3===e?"<math>":"",o=rM;for(let e=0;e<r;e++){let r,a,l=t[e],c=-1,u=0;for(;u<l.length&&(o.lastIndex=u,null!==(a=o.exec(l)));)u=o.lastIndex,o===rM?"!--"===a[1]?o=rR:void 0!==a[1]?o=rI:void 0!==a[2]?(rz.test(a[2])&&(n=RegExp(`</${a[2]}`,"g")),o=rH):void 0!==a[3]&&(o=rH):o===rH?">"===a[0]?(o=n??rM,c=-1):void 0===a[1]?c=-2:(c=o.lastIndex-a[2].length,r=a[1],o=void 0===a[3]?rH:'"'===a[3]?rD:rV):o===rD||o===rV?o=rH:o===rR||o===rI?o=rM:(o=rH,n=void 0);let h=o===rH&&t[e+1].startsWith("/>")?" ":"";s+=o===rM?l+rP:c>=0?(i.push(r),l.slice(0,c)+rC+l.slice(c)+rT+h):l+rT+(-2===c?e:h)}let a=s+(t[r]||"<?>")+(2===e?"</svg>":3===e?"</math>":"");return[function(t,e){if(!Array.isArray(t))throw Error("invalid template");return void 0!==rE?rE.createHTML(e):e}(t,a),i]})(t,e);if(this.el=rX.createElement(l,n),rZ.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=rZ.nextNode())&&a.length<o;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(rC)){const e=c[s++],n=r.getAttribute(t).split(rT),o=/([.?@])?(.*)/.exec(e);a.push({type:1,index:i,name:o[2],strings:n,ctor:"."===o[1]?r4:"?"===o[1]?r7:"@"===o[1]?r6:r8}),r.removeAttribute(t)}else t.startsWith(rT)&&(a.push({type:6,index:i}),r.removeAttribute(t));if(rz.test(r.tagName)){const t=r.textContent.split(rT),e=t.length-1;if(e>0){r.textContent=r_?r_.emptyScript:"";for(let n=0;n<e;n++)r.append(t[n],rL()),rZ.nextNode(),a.push({type:2,index:++i});r.append(t[e],rL())}}}else if(8===r.nodeType)if(r.data===rx)a.push({type:2,index:i});else{let t=-1;for(;-1!==(t=r.data.indexOf(rT,t+1));)a.push({type:7,index:i}),t+=rT.length-1}i++}}static createElement(t,e){let n=rO.createElement("template");return n.innerHTML=t,n}}function r0(t,e,n=t,r){if(e===rQ)return e;let i=void 0!==r?n.__directives?.[r]:n.__directive,s=rk(e)?void 0:e._$litDirective$;return i?.constructor!==s&&(i?._$notifyDirectiveConnectionChanged?.(!1),void 0===s?i=void 0:(i=new s(t))._$initialize(t,n,r),void 0!==r?(n.__directives??=[])[r]=i:n.__directive=i),void 0!==i&&(e=r0(t,i._$resolve(t,e.values),i,r)),e}class r1{_$template;_$parts=[];_$conditions=[];_$parent;_$disconnectableChildren=void 0;constructor(t,e){this._$template=t,this._$parent=e}get parentNode(){return this._$parent.parentNode}get _$isConnected(){return this._$parent._$isConnected}_clone(t){let{el:{content:e},parts:n}=this._$template,r=new Map,i=new Map,s=(t?.creationScope??rO).importNode(e,!0);rZ.currentNode=s;let o=rZ.nextNode(),a=0,l=0,c=n[0];for(;void 0!==c;){if(a===c.index){let e;2===c.type?e=new r3(o,o.nextSibling,this,t):1===c.type?(c.name===rW&&r.set(o,l),c.name===rU&&i.set(o,l),e=new c.ctor(o,c.name,c.strings,this,t)):6===c.type&&(e=new r5(o,this,t)),this._$parts.push(e),c=n[++l]}a!==c?.index&&(o=rZ.nextNode(),a++)}let u=new Map;for(let t of(r.forEach((t,e)=>{let n=new r2(e,t);this._$conditions.push(n),u.set(e,n);let r=e;for(;r=r.nextElementSibling;){let t=i.get(r);if(void 0===t)break;n.push(r,t)}}),this._$parts)){if(t?.type!==2)continue;let e=u.get(t._$endNode);e&&(t._$endNode=e.mark)}return rZ.currentNode=rO,s}_update(t){let e=0;for(let n of this._$parts)void 0!==n&&(void 0!==n.strings?(n._$setValue(t,n,e),e+=n.strings.length-2):n.name===rW||n.name===rU||n._$setValue(t[e])),e++;this._$conditions.forEach(e=>e.update(t))}}class r2{mark;list;constructor(t,e){const n=rL();n._$chain=this,t.before(n),this.mark=n,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(){let t=this.next;t?.attributes.getNamedItem(rq)&&(this.list.push({ele:t}),t.removeAttribute(rq))}update(t){let{mark:e,list:n}=this,r=n.find(({idx:e})=>void 0===e||!!t[e]);r&&!r.ele.parentNode&&e.after(r.ele),n.forEach(({ele:t})=>(!r||t!==r.ele)&&t.remove())}}class r3{type=2;options;_$committedValue;__directive;_$startNode;_$endNode;_$parent;__isConnected;get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}_$disconnectableChildren=void 0;constructor(t,e,n,r){this._$startNode=t,this._$endNode=e,this._$parent=n,this.options=r,this.__isConnected=r?.isConnected??!0}get parentNode(){let t=this._$startNode.parentNode,e=this._$parent;return void 0!==e&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$startNode}get endNode(){return this._$endNode}_$setValue(t,e=this){this.parentNode&&(rk(t=r0(this,t,e))?rj(t)||""===t?(rj(this._$committedValue)||this._$clear(),this._$committedValue=void 0):t!==this._$committedValue&&t!==rQ&&this._commitText(t):t instanceof rG?this._commitTemplateResult(t):void 0!==t.nodeType?this._commitNode(t):Symbol.iterator in 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){!rj(this._$committedValue)&&rk(this._$committedValue)?this._$startNode.nextSibling.data=t:this._commitNode(rO.createTextNode(t)),this._$committedValue=t}_commitTemplateResult(t){let{values:e}=t,n=this._$getTemplate(t);if(this._$committedValue?._$template===n)this._$committedValue._update(e);else{let t=new r1(n,this),r=t._clone(this.options);t._update(e),this._commitNode(r),this._$committedValue=t}}_$getTemplate(t){let e=rY.get(t.strings);return void 0===e&&rY.set(t.strings,e=new rX(t)),e}_commitIterable(t){let e;Array.isArray(this._$committedValue)||(this._$committedValue=[],this._$clear());let n=this._$committedValue,r=0;for(let i of t)r===n.length?n.push(e=new r3(this._insert(rL()),this._insert(rL()),this,this.options)):e=n[r],e._$setValue(i),r++;r<n.length&&(this._$clear(e&&e._$endNode.nextSibling,r),n.length=r)}_$clear(t=this._$startNode.nextSibling,e){for(this._$notifyConnectionChanged?.(!1,!0,e);t&&t!==this._$endNode;){let e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$parent&&(this.__isConnected=t,this._$notifyConnectionChanged?.(t))}}class r8{type=1;element;name;options;strings;_$committedValue;__directives;_$parent;_$disconnectableChildren=void 0;get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(t,e,n,r,i){this.element=t,this.name=e,this._$parent=r,this.options=i,n.length>2||""!==n[0]||""!==n[1]?(this._$committedValue=Array(n.length-1).fill(new String),this.strings=n):this._$committedValue=void 0}_$setValue(t,e=this,n,r){let i=this.strings,s=!1;if(void 0===i)(s=!rk(t=r0(this,t,e,0))||t!==this._$committedValue)&&(this._$committedValue=t);else{let r,o,a=t;for(t=i[0],r=0;r<i.length-1;r++)o=r0(this,a[n+r],e,r),s||=!rk(o)||o!==this._$committedValue[r],rj(o)?t=void 0:rj(t)||(t+=o+i[r+1]),this._$committedValue[r]=o}s&&!r&&this._commitValue(t)}_commitValue(t){rj(t)?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t)}}class r4 extends r8{type=3;_commitValue(t){this.element[this.name]=t}}class r7 extends r8{type=4;_commitValue(t){this.element.toggleAttribute(this.name,!!t)}}class r6 extends r8{type=5;_$setValue(t,e=this){t=r0(this,t,e,0);let n=this._$committedValue,r=n&&(!t||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive),i=t&&(!n||r);r&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,t),this._$committedValue=t}handleEvent(t){"function"==typeof this._$committedValue?this._$committedValue.call(this.options?.host??this.element,t):this._$committedValue.handleEvent(t)}}class r5{element;type=6;__directive;_$committedValue;_$parent;_$disconnectableChildren=void 0;_$props;options;constructor(t,e,n){this.element=t,this._$parent=e,this.options=n}get _$isConnected(){return this._$parent._$isConnected}_$setValue(t){if(t)if(t instanceof it)t.value=this.element;else if(t._$litDirective$)r0(this,t);else{if(this._$props)for(let t in this._$props)Reflect.set(this.element,t,void 0);Object.assign(this.element,t),this._$props=t}}}let r9=()=>new it;class it{value}let ie="2.2.13",ir=t=>(...e)=>({_$litDirective$:t,values:e});class ii{__part;__attributeIndex;__directive;_$parent;_$disconnectableChildren;get _$isConnected(){return this._$parent._$isConnected}_$initialize(t,e,n){this.__part=t,this._$parent=e,this.__attributeIndex=n}_$resolve(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}let is=(t,e,n)=>{let r=t._$startNode.parentNode,i=void 0===e?t._$endNode:e._$startNode;if(void 0===n)n=new r3(r.insertBefore(document.createComment(""),i),r.insertBefore(document.createComment(""),i),t,t.options);else{let e=n._$endNode.nextSibling,s=n._$parent,o=s!==t;if(o){let e;n._$reparentDisconnectables?.(t),n._$parent=t,void 0!==n._$notifyConnectionChanged&&(e=t._$isConnected)!==s._$isConnected&&n._$notifyConnectionChanged(e)}if(e!==i||o){let t=n._$startNode;for(;t!==e;){let e=t.nextSibling;r.insertBefore(t,i),t=e}}}return n},io=(t,e,n=t)=>(t._$setValue(e,n),t),ia={},il=t=>{t._$notifyConnectionChanged?.(!1,!0);let e=t._$startNode,n=t._$endNode.nextSibling;for(;e!==n;){let t=e.nextSibling;e.remove(),e=t}},ic=(t,e,n)=>{let r=new Map;for(let i=e;i<=n;i++)r.set(t[i],i);return r},iu=ir(class extends ii{_itemKeys;constructor(t){if(super(),2!==t.type)throw Error("repeat() can only be used in text expressions")}_getValuesAndKeys(t,e,n){let r;void 0===n?n=e:void 0!==e&&(r=e);let i=[],s=[],o=0;for(let e of t)i[o]=r?r(e,o):o,s[o]=n(e,o),o++;return{values:s,keys:i}}render(t,e,n){return this._getValuesAndKeys(t,e,n).values}update(t,[e,n,r]){let i,s,o=t._$committedValue,{values:a,keys:l}=this._getValuesAndKeys(e,n,r);if(!Array.isArray(o))return this._itemKeys=l,a;let c=this._itemKeys??=[],u=[],h=0,d=o.length-1,f=0,p=a.length-1;for(;h<=d&&f<=p;)if(null===o[h])h++;else if(null===o[d])d--;else if(c[h]===l[f])u[f]=io(o[h],a[f]),h++,f++;else if(c[d]===l[p])u[p]=io(o[d],a[p]),d--,p--;else if(c[h]===l[p])u[p]=io(o[h],a[p]),is(t,u[p+1],o[h]),h++,p--;else if(c[d]===l[f])u[f]=io(o[d],a[f]),is(t,o[h],o[d]),d--,f++;else if(void 0===i&&(i=ic(l,f,p),s=ic(c,h,d)),i.has(c[h]))if(i.has(c[d])){let e=s.get(l[f]),n=void 0!==e?o[e]:null;if(null===n){let e=is(t,o[h]);io(e,a[f]),u[f]=e}else u[f]=io(n,a[f]),is(t,o[h],n),o[e]=null;f++}else il(o[d]),d--;else il(o[h]),h++;for(;f<=p;){let e=is(t,u[p+1]);io(e,a[f]),u[f++]=e}for(;h<=d;){let t=o[h++];null!==t&&il(t)}return this._itemKeys=l,((t,e=ia)=>t._$committedValue=e)(t,u),rQ}});nw(rB,(t,e,n)=>{let r=n?.renderBefore??e,i=r._$litPart$;if(void 0===i){let t=n?.renderBefore??null;r._$litPart$=i=new r3(e.insertBefore(rL(),t),t,void 0,n??{})}return i._$setValue(t),i}),globalThis.__GEM_DEVTOOLS__HOOK__&&!globalThis.__GEM_DEVTOOLS__HOOK__.GemElement&&Object.assign(globalThis.__GEM_DEVTOOLS__HOOK__,{...eQ,...eY,...eF,...eZ});let ih=globalThis.history,id=ih.pushState.bind(ih),ip=ih.replaceState.bind(ih),im=0,ig=()=>`${performance.now()}-${++im}`,iy=ng({$hasCloseHandle:!1,$hasOpenHandle:!1,$hasShouldCloseHandle:!1,$key:""}),ib=new Map;function iv(t){let{$key:e,$hasCloseHandle:n,$hasOpenHandle:r,$hasShouldCloseHandle:i}=t||{};if(iy.$key!==e){if(e)throw new nl("`$key` is not allowed");if(n)throw new nl("`$hasCloseHandle` is not allowed");if(r)throw new nl("`$hasOpenHandle` is not allowed");if(i)throw new nl("`$hasShouldCloseHandle` is not allowed")}}function iw(t){return iP.basePath?iP.basePath+t:t}function iS(t){return t===iP.basePath?"/":t.replace(RegExp(`^${iP.basePath}/`),"/")}function i$(){iP.dispatchEvent(new CustomEvent("beforechange"))}function i_(t){let e=ib.get(iy.$key)||{path:iS(location.pathname),query:new ne},n=t.path?e6(e.path,t.path):iS(location.pathname),r=new ne(t.query??(t.path?"":location.search)),i=String(r)!==String(e.query),s=i?r:e.query,o=n!==e.path||i,a=t.title||(o?"":document.title),l=t.close||t.data||t.open||t.shouldClose,c=decodeURIComponent(t.hash??(!o&&l?location.hash:""));return{...t,title:a,path:n,query:s,hash:c}}function iE(t,e){iv(t.data);let n=i_(t),{title:r,path:i,query:s,hash:o,close:a,open:l,shouldClose:c,data:u}=n,h={$hasCloseHandle:!!a,$hasOpenHandle:!!l,$hasShouldCloseHandle:!!c,$key:ig(),$title:r,...u};ib.set(h.$key,n),i$(),na(iy),iy(h);let d=iw(i)+new ne(s)+o,f=decodeURIComponent(location.hash);e(h,r,d),f!==o&&dispatchEvent(new CustomEvent("hashchange"))}function iC(t,e,n,r){iv(t);let i={$key:ig(),$title:e,...t||{}},{pathname:s,search:o,hash:a}=new URL(n,location.origin+location.pathname),l=i_({path:s,query:new ne(o),hash:a,title:e,data:t});ib.set(i.$key,l),i$(),na(iy),iy(i);let c=iw(s)+l.query+a,u=location.hash;r(i,e,c),u!==a&&dispatchEvent(new CustomEvent("hashchange"))}let iT=ng({basePath:""});class ix extends EventTarget{get store(){return iy}get currentKey(){return iy.$key}get basePath(){return iT.basePath}set basePath(t){iT({basePath:t}),Object.assign(ib.get(iy.$key),{path:iS(location.pathname)})}getParams(){return ib.get(iy.$key)}updateParams(t){Object.assign(ib.get(iy.$key),t),iy()}push(t){iE(t,id)}replace(t){iE(t,ip)}pushIgnoreCloseHandle(t){iy.$hasCloseHandle?(ib.get(iy.$key)?.close?.(),this.replace(t)):this.push(t)}forward(){ih.forward()}back(){ih.back()}}let iP=new ix,iO=ng({defaultTitle:document.title,url:"",title:""});if(!globalThis._GEMHISTORY){if(globalThis._GEMHISTORY={history:iP,titleStore:iO,basePathStore:iT},ih.pushState=(t,e,n)=>{iC(t,e,n,id)},ih.replaceState=(t,e,n)=>{iC(t,e,n,ip)},addEventListener("hashchange",({isTrusted:t})=>{t&&iP.replace({hash:location.hash})}),ih.state)if(ih.state.$hasCloseHandle){iy(ih.state);let t=i_({title:document.title});ib.set(iy.$key,t),iP.back()}else{let t=i_({title:document.title,hash:location.hash});iy({$key:ig(),...ih.state||{}}),ib.set(iy.$key,t)}else{let{protocol:t,pathname:e,search:n,hash:r}=location;(t.startsWith("http")||t.startsWith("tauri"))&&iP.replace({path:e,query:n,hash:r})}ny(iO,()=>{let t=ib.get(iy.$key);t&&(t.title=iO.title)}),ny(iy,()=>{let{title:t}=iP.getParams();t!==iO.title&&iO({title:t})});let t=!1;addEventListener("popstate",e=>{let n=e.state;if(n?.$key){if(t){t=!1;return}if(!ib.has(n.$key)){let{pathname:t,search:e,hash:r}=location;ib.set(n.$key,{path:iS(t),query:new ne(e),hash:decodeURIComponent(r),title:iO.title||n.$title,data:n})}if(parseFloat(n.$key)>parseFloat(iy.$key)&&n.$hasOpenHandle)ib.get(n.$key)?.open?.();else if(iy.$hasCloseHandle){let e=ib.get(iy.$key),r=e?.close,i=e?.shouldClose;if(i&&!i()){t=!0,iP.forward();return}r?r():n.$hasCloseHandle&&(t=!0,iP.back())}i$(),na(iy),iy(n)}})}let{history:iL,titleStore:ik,basePathStore:ij}=globalThis._GEMHISTORY;function iN(t,e,n){"symbol"==typeof e&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:n?n+" "+e:e})}catch(t){}return t}let iA=Symbol();r=ry(iL.store),i=rS({role:"dialog",ariaModal:"true"}),o=nz,a=rs();class iM extends o{static{({e:[l,c,u,h,d,f],c:[p,s]}=function(t,e,n,r,i){var s,o,a,l,c,u,h,d=Symbol.metadata||Symbol.for("Symbol.metadata"),f=Object.defineProperty,p=Object.create,m=[p(null),p(null)],g=e.length;function y(e,n,r){return function(i,s){n&&(s=i,i=t);for(var o=0;o<e.length;o++)s=e[o].apply(i,r?[s]:[]);return r?s:i}}function b(t,e,n,r){if("function"!=typeof t&&(r||void 0!==t))throw TypeError(e+" must "+(n||"be")+" a function"+(r?"":" or undefined"));return t}function v(t,e,n,r,i,s,o,a,l,c,d){function p(t){if(!d(t))throw TypeError("Attempted to access private element on non-instance")}var g=[].concat(e[0]),v=e[3],w=!o,S=1===i,$=3===i,_=4===i,E=2===i;function C(e,n,r){return function(i,s){return n&&(s=i,i=t),r&&r(i),desc[e].call(i,s)}}var T={},x=[],P=$?"get":_||S?"set":"value";if(!w&&(l?(c||S?T={get:iN(function(){return v(this)},r,"get"),set:function(t){e[4](this,t)}}:T[P]=v,c||iN(T[P],r,E?"":P)):c||(T=Object.getOwnPropertyDescriptor(t,r)),!c&&!l)){if((h=m[+a][r])&&(h^i)!=7)throw Error("Decorating two elements with the same name ("+T[P].name+") is not supported yet");m[+a][r]=i<3?1:i}for(var O=t,L=g.length-1;L>=0;L-=n?2:1){var k=b(g[L],"A decorator","be",!0),j=n?g[L-1]:void 0,N={},A={kind:["field","accessor","method","getter","setter","class"][i],name:r,metadata:u,addInitializer:(function(t,e){if(t.v)throw TypeError("attempted to call addInitializer after decoration was finished");b(e,"An initializer","be",!0),s.push(e)}).bind(null,N)};if(w){h=k.call(j,O,A),N.v=1,b(h,"class decorators","return")&&(O=h);continue}if(A.static=a,A.private=l,h=A.access={has:l?d.bind():function(t){return r in t}},_||(h.get=l?E?function(t){return p(t),T.value}:C("get",0,p):function(t){return t[r]}),E||$||(h.set=l?C("set",0,p):function(t,e){t[r]=e}),O=k.call(j,S?{get:T.get,set:T.set}:T[P],A),N.v=1,S){if("object"==typeof O&&O)(h=b(O.get,"accessor.get"))&&(T.get=h),(h=b(O.set,"accessor.set"))&&(T.set=h),(h=b(O.init,"accessor.init"))&&x.unshift(h);else if(void 0!==O)throw TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else b(O,(c?"field":"method")+" decorators","return")&&(c?x.unshift(O):T[P]=O)}return i<2&&o.push(y(x,a,1),y(s,a,0)),c||w||(l?S?o.splice(-1,0,C("get",a),C("set",a)):o.push(E?T[P]:b.call.bind(T[P])):f(t,r,T)),O}function w(t){return f(t,d,{configurable:!0,enumerable:!0,value:u})}return void 0!==i&&(u=i[d]),u=p(null==u?null:u),a=[],l=function(t){t&&a.push(y(t))},(c=function(e,i){for(var l=0;l<n.length;l++){var c=n[l],u=c[1],h=7&u;if((8&u)==e&&!h==i){var d=c[2],f=!!c[3],p=16&u;v(e?t:t.prototype,c,p,f?"#"+d:function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(d),h,h<2?[]:e?o=o||[]:s=s||[],a,!!e,f,i,e&&f?function(e){return function(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(null!==t?typeof t:"null"));return t}(e)===t}:r)}}})(8,0),c(0,0),c(8,1),c(0,1),l(s),l(o),h=a,g||w(t),{e:h,get c(){var S=[];return g&&[w(t=v(t,[e],0,t.name,5,S)),y(S,1)]}}}(this,[r,i],[[n5,0,"label"],[rc,0,"opened"],[a,0,"init",function(t){return t.#N},function(t,e){t.#N=e}]],t=>#N in t,o))}label=l(this);opened=(c(this),u(this));#A=void h(this);#M;#R=[];#I=()=>{this.inert=!0,this.#R.forEach(t=>t.inert=!1),this.#A?this.#A.before(this):this.#M&&this.#M?.appendChild(this),this.dispatchEvent(new CustomEvent("close")),this.opened=!1};#H=()=>{this.hidden=!1,this.inert=!1,this.#A=this.nextSibling,this.#M=this.parentElement||this.getRootNode(),this.#R=[...document.body.children].filter(t=>!t.inert),this.#R.forEach(t=>t.inert=!0),document.body.append(this),this.dispatchEvent(new CustomEvent("open")),this.opened=!0};#N=d(this,()=>this.inert=!0);open=(f(this),()=>{if(!this.opened)return this.#H(),iL.push({title:this.label,open:this.#H,close:this.#I,shouldClose:this.shouldClose}),iA});shouldClose(){return!0}close=()=>(iL.back(),iA);forceClose=()=>(this.opened=!1,setTimeout(this.close,100),iA);static{s()}}function iR(t,e,n){"symbol"==typeof e&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:n?n+" "+e:e})}catch(t){}return t}function iI(t){return t}let iH=Symbol("open mark");function iV(t){let e,n,r,i,s,o,a,l,c,u,h,d=Symbol();return e=rb(),n=rS({role:"alertdialog",ariaModal:"true"}),i=nz,s=ro(),o=ro(),new class extends iI{constructor(){super(h),r()}static [class extends i{static{({e:[a,l,c,u],c:[h,r]}=function(t,e,n,r,i){var s,o,a,l,c,u,h,d=Symbol.metadata||Symbol.for("Symbol.metadata"),f=Object.defineProperty,p=Object.create,m=[p(null),p(null)],g=e.length;function y(e,n,r){return function(i,s){n&&(s=i,i=t);for(var o=0;o<e.length;o++)s=e[o].apply(i,r?[s]:[]);return r?s:i}}function b(t,e,n,r){if("function"!=typeof t&&(r||void 0!==t))throw TypeError(e+" must "+(n||"be")+" a function"+(r?"":" or undefined"));return t}function v(t,e,n,r,i,s,o,a,l,c,d){function p(t){if(!d(t))throw TypeError("Attempted to access private element on non-instance")}var g=[].concat(e[0]),v=e[3],w=!o,S=1===i,$=3===i,_=4===i,E=2===i;function C(e,n,r){return function(i,s){return n&&(s=i,i=t),r&&r(i),desc[e].call(i,s)}}var T={},x=[],P=$?"get":_||S?"set":"value";if(!w&&(l?(c||S?T={get:iR(function(){return v(this)},r,"get"),set:function(t){e[4](this,t)}}:T[P]=v,c||iR(T[P],r,E?"":P)):c||(T=Object.getOwnPropertyDescriptor(t,r)),!c&&!l)){if((h=m[+a][r])&&(h^i)!=7)throw Error("Decorating two elements with the same name ("+T[P].name+") is not supported yet");m[+a][r]=i<3?1:i}for(var O=t,L=g.length-1;L>=0;L-=n?2:1){var k=b(g[L],"A decorator","be",!0),j=n?g[L-1]:void 0,N={},A={kind:["field","accessor","method","getter","setter","class"][i],name:r,metadata:u,addInitializer:(function(t,e){if(t.v)throw TypeError("attempted to call addInitializer after decoration was finished");b(e,"An initializer","be",!0),s.push(e)}).bind(null,N)};if(w){h=k.call(j,O,A),N.v=1,b(h,"class decorators","return")&&(O=h);continue}if(A.static=a,A.private=l,h=A.access={has:l?d.bind():function(t){return r in t}},_||(h.get=l?E?function(t){return p(t),T.value}:C("get",0,p):function(t){return t[r]}),E||$||(h.set=l?C("set",0,p):function(t,e){t[r]=e}),O=k.call(j,S?{get:T.get,set:T.set}:T[P],A),N.v=1,S){if("object"==typeof O&&O)(h=b(O.get,"accessor.get"))&&(T.get=h),(h=b(O.set,"accessor.set"))&&(T.set=h),(h=b(O.init,"accessor.init"))&&x.unshift(h);else if(void 0!==O)throw TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else b(O,(c?"field":"method")+" decorators","return")&&(c?x.unshift(O):T[P]=O)}return i<2&&o.push(y(x,a,1),y(s,a,0)),c||w||(l?S?o.splice(-1,0,C("get",a),C("set",a)):o.push(E?T[P]:b.call.bind(T[P])):f(t,r,T)),O}function w(t){return f(t,d,{configurable:!0,enumerable:!0,value:u})}return void 0!==i&&(u=i[d]),u=p(null==u?null:u),a=[],l=function(t){t&&a.push(y(t))},(c=function(e,i){for(var l=0;l<n.length;l++){var c=n[l],u=c[1],h=7&u;if((8&u)==e&&!h==i){var d=c[2],f=!!c[3],p=16&u;v(e?t:t.prototype,c,p,f?"#"+d:function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(d),h,h<2?[]:e?o=o||[]:s=s||[],a,!!e,f,i,e&&f?function(e){return function(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(null!==t?typeof t:"null"));return t}(e)===t}:r)}}})(8,0),c(0,0),c(8,1),c(0,1),l(s),l(o),h=a,g||w(t),{e:h,get c(){var S=[];return g&&[w(t=v(t,[e],0,t.name,5,S)),y(S,1)]}}}(this,[e,n],[[s,0,"connectHistory",function(t){return t.#V},function(t,e){t.#V=e}],[o,0,"connectStore",function(t){return t.#D},function(t,e){t.#D=e}]],t=>#V in t,i))}constructor(...t){super(...t),u(this)}static get isOpen(){return this.store[iH]}static open(t){let e=new this;this.instance=e,this.inertStore=[...document.body.children].filter(t=>!t.inert),this.inertStore.forEach(t=>t.inert=!0),document.body.append(e);let n=()=>this.store({[iH]:!0,...t});return setTimeout(()=>{n(),iL.push({title:e.label,open:n,close:this.closeHandle.bind(this),shouldClose:this.shouldClose.bind(this)})},100),d}static close(){return iL.back(),d}static closeHandle(){return this.inertStore.forEach(t=>t.inert=!1),this.instance?.remove(),this.store({[iH]:!1,...t}),d}static shouldClose(){return!0}label="";#V=a(this,()=>ny(iL.store,this.update));#D=(l(this),c(this,()=>ny(h.store,this.update)))}];inertStore=[];instance=null;store=ng({[iH]:!1,...t})},h}function iD(t,e,n){"symbol"==typeof e&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:n?n+" "+e:e})}catch(t){}return t}function iz(t,e,n,r,i,s){var o,a,l,c,u,h,d,f=Symbol.metadata||Symbol.for("Symbol.metadata"),p=Object.defineProperty,m=Object.create,g=[m(null),m(null)],y=e.length;function b(e,n,r){return function(i,s){n&&(s=i,i=t);for(var o=0;o<e.length;o++)s=e[o].apply(i,r?[s]:[]);return r?s:i}}function v(t,e,n,r){if("function"!=typeof t&&(r||void 0!==t))throw TypeError(e+" must "+(n||"be")+" a function"+(r?"":" or undefined"));return t}function w(t,e,n,r,i,s,o,a,l,c,u){function f(t){if(!u(t))throw TypeError("Attempted to access private element on non-instance")}var m=[].concat(e[0]),y=e[3],w=!o,S=1===i,$=3===i,_=4===i,E=2===i;function C(e,n,r){return function(i,s){return n&&(s=i,i=t),r&&r(i),desc[e].call(i,s)}}var T={},x=[],P=$?"get":_||S?"set":"value";if(!w&&(l?(c||S?T={get:iD(function(){return y(this)},r,"get"),set:function(t){e[4](this,t)}}:T[P]=y,c||iD(T[P],r,E?"":P)):c||(T=Object.getOwnPropertyDescriptor(t,r)),!c&&!l)){if((d=g[+a][r])&&(d^i)!=7)throw Error("Decorating two elements with the same name ("+T[P].name+") is not supported yet");g[+a][r]=i<3?1:i}for(var O=t,L=m.length-1;L>=0;L-=n?2:1){var k=v(m[L],"A decorator","be",!0),j=n?m[L-1]:void 0,N={},A={kind:["field","accessor","method","getter","setter","class"][i],name:r,metadata:h,addInitializer:(function(t,e){if(t.v)throw TypeError("attempted to call addInitializer after decoration was finished");v(e,"An initializer","be",!0),s.push(e)}).bind(null,N)};if(w){d=k.call(j,O,A),N.v=1,v(d,"class decorators","return")&&(O=d);continue}if(A.static=a,A.private=l,d=A.access={has:l?u.bind():function(t){return r in t}},_||(d.get=l?E?function(t){return f(t),T.value}:C("get",0,f):function(t){return t[r]}),E||$||(d.set=l?C("set",0,f):function(t,e){t[r]=e}),O=k.call(j,S?{get:T.get,set:T.set}:T[P],A),N.v=1,S){if("object"==typeof O&&O)(d=v(O.get,"accessor.get"))&&(T.get=d),(d=v(O.set,"accessor.set"))&&(T.set=d),(d=v(O.init,"accessor.init"))&&x.unshift(d);else if(void 0!==O)throw TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else v(O,(c?"field":"method")+" decorators","return")&&(c?x.unshift(O):T[P]=O)}return i<2&&o.push(b(x,a,1),b(s,a,0)),c||w||(l?S?o.splice(-1,0,C("get",a),C("set",a)):o.push(E?T[P]:v.call.bind(T[P])):p(t,r,T)),O}function S(t){return p(t,f,{configurable:!0,enumerable:!0,value:h})}return void 0!==s&&(h=s[f]),h=m(null==h?null:h),l=[],c=function(t){t&&l.push(b(t))},(u=function(e,r){for(var s=0;s<n.length;s++){var c=n[s],u=c[1],h=7&u;if((8&u)==e&&!h==r){var d=c[2],f=!!c[3],p=16&u;w(e?t:t.prototype,c,p,f?"#"+d:function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(d),h,h<2?[]:e?a=a||[]:o=o||[],l,!!e,f,r,e&&f?function(e){return function(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(null!==t?typeof t:"null"));return t}(e)===t}:i)}}})(8,0),u(0,0),u(8,1),u(0,1),c(o),c(a),d=l,y||S(t),{e:d,get c(){var $=[];return y&&[S(t=w(t,[e],r,t.name,5,$)),b($,1)]}}}function iW(t){return t}class iU extends RegExp{constructor(t){let e=0;super(`^${t.replace(/((:[^/$]+)|(\*))/g,(t,n)=>"*"===n?`(?<_${e++}>.*)`:`(?<${n.slice(1)}>[^/]+)`)}$`)}}function iq(t,e){if(globalThis.URLPattern){let n=new URLPattern({pathname:t}),r=n.exec({pathname:e})||n.exec({pathname:`${e}/`});return r?r.pathname.groups:null}let n=new iU(t),r=e.match(n)||`${e}/`.match(n);if(!r)return null;let i={};return r.groups&&Object.entries(r.groups).forEach(([t,e])=>{i[t.startsWith("_")?t.slice(1):t]=e}),i}function iG(t,e){let n=0,r=t.pattern.replaceAll("*",()=>`:${n++}`),i=e?.params;return i&&Object.keys(i).forEach(t=>{r=r.replace(RegExp(`:${t}`,"g"),i[t])}),r}function iK(t,e){return{path:iG(t,e),...e}}let iB=nb``,iJ=new Map;m=rv({penetrable:!0}),y=nz,b=rr(t=>[t.scrollContainer]),v=rr(t=>[t.scrollContainer]),w=ra(t=>!t.inert),new class extends iW{constructor(){super(te),g()}static [class extends y{static{({e:[S,$,_,E,C,T,x,P,O,L,k,j,N,A,M,R,I,H,V,D,z,W,U,q,G,K,B,J,F,Q],c:[te,g]}=iz(this,[m],[[n9,0,"transition"],[re,0,"routes"],[re,0,"locationStore"],[re,0,"key"],[rf,0,"loading"],[rf,0,"beforeroutechange"],[rf,0,"routechange"],[rf,0,"error"],[re,0,"scrollContainer"],[re,0,"scrollIgnoreHash"],[re,0,"trigger"],[b,0,"rememberScrollPosition",function(t){return t.#z},function(t,e){t.#z=e}],[v,0,"connectTriggerStore",function(t){return t.#W},function(t,e){t.#W=e}],[rr(t=>t.#U()),0,"updateContent",function(t){return t.#q},function(t,e){t.#q=e}],[w,0,"content",function(t){return t.#a},function(t,e){t.#a=e}]],0,t=>#z in t,y))}transition=S(this);routes=($(this),_(this));locationStore=(E(this),C(this));key=(T(this),x(this));loading=(P(this),O(this));beforeroutechange=(L(this),k(this));routechange=(j(this),N(this));error=(A(this),M(this));scrollContainer=(R(this),I(this));scrollIgnoreHash=(H(this),V(this));trigger=(D(this),z(this,iL));currentRoute=void W(this);currentParams={};get #G(){return"function"==typeof this.scrollContainer?this.scrollContainer():this.scrollContainer}#K=t({content:iB});#B=()=>{if(!this.locationStore)return;let{path:t,query:e,hash:n,data:r}=iL.getParams();this.locationStore({path:t,params:this.currentParams,query:e,hash:n,data:r})};#J=()=>{if(!this.#G)return;let t=iJ.get(iL.currentKey);t?this.#G.scroll(0,t):(this.scrollIgnoreHash||!iL.getParams().hash)&&this.#G.scroll(0,0)};#F;#Q=(t,e,n)=>{this.beforeroutechange(t),this.#F=void 0,this.currentRoute=t,this.currentParams=e;let r=async()=>{this.#K({content:n}),this.#B(),await Promise.resolve(),this.#J(),this.routechange(this.currentRoute)};this.transition&&"startViewTransition"in document?document.startViewTransition(()=>r()):r()};#z=U(this,()=>{if(this.#G)return e5(iL,"beforechange",()=>iJ.set(iL.currentKey,this.#G.scrollTop))});#W=(q(this),G(this,()=>this.trigger.store&&ny(this.trigger.store,()=>this.#K())));#U=(K(this),()=>{let{path:t,query:e,hash:n}=this.trigger.getParams();return[this.key,t,e,n]});#q=B(this,([t,e],n)=>{n&&t===n[0]&&e===n[1]?this.#B():this.update()});#a=(J(this),F(this,()=>{let{content:t}=this.#K;if(void 0!==t){if(!this.shadowRoot){if(t===iB)return;return nb`${t}`}return t===iB?nb`<slot></slot>`:t}}));update=(Q(this),async()=>{let{path:t,hash:e,query:n}=this.trigger.getParams(),{route:r,params:i={}}=tn.findRoute(this.routes,t),{redirect:s,content:o,getContent:a}=r||{};if(s)return void this.trigger.replace({path:iG({pattern:s},{params:i}),query:n,hash:e});this.trigger===iL&&(location.href!==ik.url||r?.title)&&ik({url:location.href,title:r?.title});let l=o||a?.(i,this.shadowRoot||this);this.loading(r),this.#F=l;let c=()=>this.#F===l;try{let t=await l;c()&&this.#Q(r,i,t)}catch(t){c()&&this.error(t)}})}];createLocationStore=()=>{let{path:t,query:e,hash:n,data:r}=iL.getParams();return ng({path:t,query:e,hash:n,data:r,params:{}})};findRoute=(t=[],e)=>{let n=null;for(let r of Array.isArray(t)?t:Object.values(t))if("*"===r.pattern)n=r;else{let t=iq(r.pattern,e);if(t)return{route:r,params:t}}return{route:n}}};let iF=nM`
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Gem=e():t.Gem=e()}(globalThis,()=>(()=>{"use strict";let t,e,n,r,i,s,o,a,l,c,u,h,d,f,p,m,g,y,b,v,w,S,_,$,E,C,T,x,P,L,O,j,k,N,M,A,R,I,H,D,V,z,W,U,G,q,K,B,J,F,Y,Z,Q,X,tt,te,tn,tr,ti,ts,to,ta,tl,tc,tu,th,td,tf,tp,tm,tg,ty,tb,tv,tw,tS,t_,t$,tE,tC,tT,tx,tP,tL,tO,tj,tk,tN,tM,tA,tR,tI,tH,tD,tV,tz,tW,tU,tG,tq,tK,tB,tJ,tF,tY,tZ,tQ,tX,t0,t1,t2,t3,t8,t4,t7,t6,t5,t9,et,ee,en,er,ei,es,eo,ea,el,ec,eu,eh,ed,ef,ep,em,eg,ey,eb,ev,ew,eS,e_,e$,eE,eC,eT,ex,eP,eL,eO,ej,ek,eN,eM,eA,eR,eI,eH,eD,eV,ez,eW,eU,eG,eq,eK,eB,eJ;var eF={};eF.d=(t,e,n)=>{var r=(e,n)=>{for(var r in e)eF.o(e,r)&&!eF.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,[n]:e[r]})};r(e,"get"),r(n,"value")},eF.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),eF.r=t=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var eY={};eF.r(eY),eF.d(eY,{GemActiveLinkElement:()=>tQ,GemDialogBaseElement:()=>g,GemElement:()=>n6,GemError:()=>nE,GemLightRouteElement:()=>tr,GemLinkElement:()=>tZ,GemReflectElement:()=>sy,GemRouteElement:()=>ti,GemTitleElement:()=>ey,GemUnsafeElement:()=>ek,GemUseElement:()=>eJ,I18n:()=>sR,LinkedList:()=>nm,Logger:()=>sO,PropProxyMap:()=>ng,QueryString:()=>ny,SheetToken:()=>nB,TemplateResult:()=>ie,UpdateToken:()=>nJ,_RenderErrorEvent:()=>nY,_StoreListenerMap:()=>nj,_createTemplate:()=>r,_getUpdatedStores:()=>nM,_renderRoot:()=>nU,_setStoreRestorer:()=>nA,absoluteLocation:()=>nf,addListener:()=>np,addMicrotask:()=>nu,adoptedStyle:()=>rR,aria:()=>rz,assignState:()=>nh,async:()=>rV,attribute:()=>rb,basePathStore:()=>iX,boolattribute:()=>rv,camelToKebabCase:()=>nS,classMap:()=>nP,cleanObject:()=>n$,connect:()=>nI,connectStore:()=>rI,createDecoratorTheme:()=>sX,createHistoryParams:()=>sr,createModalClass:()=>i7,createOverrideTheme:()=>sQ,createPath:()=>sn,createRef:()=>iS,createScopedTheme:()=>sY,createState:()=>n,createStore:()=>nR,createTheme:()=>sZ,createUpdater:()=>nd,css:()=>n1,customElement:()=>rW,del:()=>sz,directive:()=>iE,effect:()=>r$,emitter:()=>rN,exportPartsMap:()=>nO,fallback:()=>rP,get:()=>sW,getThemeProps:()=>sJ,getThemeStore:()=>sB,globalemitter:()=>rM,history:()=>iZ,html:()=>nH,initRequest:()=>sD,isArrayChange:()=>nC,kebabToCamelCase:()=>n_,light:()=>rD,logger:()=>sj,matchPath:()=>se,mathml:()=>io,mediaQuery:()=>sI,memo:()=>r_,mounted:()=>rT,numattribute:()=>rw,objectMapToString:()=>nT,part:()=>rk,partMap:()=>nL,post:()=>sU,property:()=>rS,put:()=>sG,randomStr:()=>nw,raw:()=>nb,render:()=>nD,repeat:()=>ij,request:()=>sV,setEngine:()=>nV,setHydrationEngine:()=>nW,shadow:()=>rH,slot:()=>rj,splice:()=>sM,state:()=>rL,styleMap:()=>nx,styled:()=>nv,svg:()=>is,template:()=>rx,titleStore:()=>iQ,unmounted:()=>rE,version:()=>i$,willMount:()=>rC});var eZ={};eF.r(eZ),eF.d(eZ,{_StoreListenerMap:()=>nj,_getUpdatedStores:()=>nM,_setStoreRestorer:()=>nA,connect:()=>nI,createStore:()=>nR});var eQ={};eF.r(eQ),eF.d(eQ,{GemElement:()=>n6,SheetToken:()=>nB,UpdateToken:()=>nJ,_RenderErrorEvent:()=>nY,_createTemplate:()=>r,_renderRoot:()=>nU,createState:()=>n,css:()=>n1,html:()=>nH,render:()=>nD,setEngine:()=>nV,setHydrationEngine:()=>nW});var eX={};eF.r(eX),eF.d(eX,{adoptedStyle:()=>rR,aria:()=>rz,async:()=>rV,attribute:()=>rb,boolattribute:()=>rv,connectStore:()=>rI,customElement:()=>rW,effect:()=>r$,emitter:()=>rN,fallback:()=>rP,globalemitter:()=>rM,light:()=>rD,memo:()=>r_,mounted:()=>rT,numattribute:()=>rw,part:()=>rk,property:()=>rS,shadow:()=>rH,slot:()=>rj,state:()=>rL,template:()=>rx,unmounted:()=>rE,willMount:()=>rC});var e0={};eF.r(e0),eF.d(e0,{version:()=>i$});let{get:e1,set:e2,has:e3,deleteProperty:e8,defineProperty:e4,getOwnPropertyDescriptor:e7,ownKeys:e6}=Reflect,e5=globalThis.__GEM_SSR__,e9=!!e5,nt=e5?(t,e)=>{let n=e5();return n?(n.has(t)||n.set(t,e()),n.get(t)):t}:t=>t,ne=e5?t=>{let e=()=>({...t});return new Proxy(t,{get:(n,r)=>e1(nt(t,e),r),set:(n,r,i)=>e2(nt(t,e),r,i),has:(n,r)=>e3(nt(t,e),r),deleteProperty:(n,r)=>e8(nt(t,e),r),defineProperty:(n,r,i)=>e4(nt(t,e),r,i),getOwnPropertyDescriptor:(n,r)=>e7(nt(t,e),r),ownKeys:()=>e6(nt(t,e))})}:t=>t,{assign:nn,fromEntries:nr,entries:ni,keys:ns,defineProperty:no,hasOwn:na}=Object,nl=new Set,nc=()=>new Set;function nu(t){let e=nt(nl,nc);!e.has(t)&&(Promise.resolve().then(()=>{e.delete(t),t()}),e.add(t))}function nh(t,e){for(let n of["name","length"])e&&na(e,n)&&no(t,n,{value:e[n],writable:!0,enumerable:!0,configurable:!0});nn(t,e)}function nd(t,e){return delete e.name,delete e.length,nh(e,t),e}function nf(t="",e=""){let{pathname:n,search:r,hash:i}=new URL(e,location.origin+t);return n+r+decodeURIComponent(i)}function np(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}class nm extends EventTarget{#t=new Map;#e;#n;#r(t){let e=this.#t.get(t);return e&&(e.prev?e.prev.next=e.next:this.#e=e.next,e.next?e.next.prev=e.prev:this.#n=e.prev,this.#t.delete(t)),e}get size(){return this.#t.size}get first(){return this.#e}get last(){return this.#n}isSuperLinkOf(t,e=!1){let n=t.first;if(!n)return!0;let r=e?this.#e:this.find(n.value);for(;r&&n;){if(r.value===n.value)n=n.next;else if(!e)return!1;r=r.next}return!n}find(t){return this.#t.get(t)}add(t){this.#n||this.dispatchEvent(new CustomEvent("start"));let e=this.#r(t)||{value:t};e.prev=this.#n,e.prev&&(e.prev.next=e),e.next=void 0,this.#n=e,this.#e||(this.#e=e),this.#t.set(t,e)}delete(t){let e=this.#r(t);return this.#e||this.dispatchEvent(new CustomEvent("end")),e}clear(){this.#t.clear(),this.#e=this.#n=void 0}get(){let t=this.#e;if(t)return this.delete(t.value),t.value}}class ng extends WeakMap{get(t){let e=super.get(t);return e||(e={},this.set(t,e)),e}}class ny extends URLSearchParams{concat(t){ni("string"==typeof t?nr(new URLSearchParams(t).entries()):t).forEach(([t,e])=>{this.append(t,this.#i(e))})}#i=t=>"string"==typeof t?t:JSON.stringify(t);setAny(t,e){if(Array.isArray(e))this.delete(t),e.forEach(e=>this.append(t,this.#i(e)));else{let n=this.#i(e);n?this.set(t,n):this.delete(t)}}#s=t=>{if(!t)return null;try{return JSON.parse(t)}catch{return null}};getAny(t){return this.getAnyAll(t)[0]}getAnyAll(t){return this.getAll(t).filter(t=>""!==t).map(t=>this.#s(t))}toString(){let t=super.toString();return t?`?${t}`:""}toJSON(){return this.toString()}}function nb(t,...e){return t.reduce((t,n,r)=>t+(e[r-1]??"")+n)}let nv=nb;function nw(t=5){let e=Math.random().toString(36).slice(2,2+t);return e.length<t?e+nw(t-e.length):e}function nS(t){return t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function n_(t){return t.replace(/-(.)/g,(t,e)=>e.toUpperCase())}function n$(t){return ns(t).forEach(e=>{delete t[e]}),t}class nE extends Error{constructor(t){super(t),this.message=`gem: ${this.message}`}}function nC(t,e){let n=t.length;if(e.length!==n)return!0;for(let r=0;r<n;r++)if(t[r]!==e[r])return!0;return!1}function nT(t,e,n){let r=e;for(let i in t){let s=n(i,t[i]);r+=s?s+e:""}return r}function nx(t){return nT(t,";",(t,e)=>e||0===e?`${nS(t)}:${e}`:"")}function nP(t){return nT(t," ",(t,e)=>e?t:"")}let nL=nP;function nO(t){return nT(t,",",(t,e)=>!0===e||t===e?t:e?`${t}:${e}`:"")}let nj=new WeakMap,nk=()=>new Set,nN=new Map,nM=()=>nt(nN,()=>new Map);function nA(e){t=e}function nR(e,n){let r=nk(),i=ne(nd(e,t=>{if(nh(i,t),r.forEach(nu),!e9)return;nt(r,nk).forEach(nu);let e=nM();n&&e!==nN&&e.set(n,i)}));return n&&t&&nh(i,t(n)),nj.set(i,r),i}function nI(t,e){let n=nj.get(t),r=n&&nt(n,nk);return r?.add(e),()=>r?.delete(e)}let nH=(t,...e)=>nb(t,...e.map(t=>t instanceof Element?t.outerHTML:t)),nD=(t,e)=>e.innerHTML=t;function nV(t,e){nH=t,nD=e}let nz=(t,e)=>{};function nW(t,n){nz=t,e=n}let nU=(t,e)=>nz(t,e)||nD(t,e),{assign:nG,defineProperty:nq}=Object;nq(Symbol,"metadata",{value:Symbol.for("Symbol.metadata")});let nK=t=>"function"==typeof t&&t(),nB=Symbol.for("gem@sheetToken"),nJ=Symbol.for("gem@update"),nF="gem-style-boundary",nY="gem@render-error",nZ=new WeakMap,nQ=new WeakMap;class nX extends CSSStyleSheet{#o;cssText="";get element(){return this.#o||(this.#o=document.createElement("style"),this.#o.textContent=this.cssText),this.#o}replaceSync(t){this.cssText=t,this.#o&&(this.#o.textContent=t),super.replaceSync(t)}}class n0{#a="";#l="";constructor(t=""){this.#l=t}setContent(t){this.#a=t}#c=new Map;#u=new Map;getStyle(t,e){let n=t&&!t.internals?.shadowRoot,r=n?t.constructor:this;if(!this.#c.has(r)){let t=new nX({media:this.#l});this.#c.set(r,t)}let i=this.#c.get(r);if(!this.#u.has(i)){let r=this.#a,s="";n&&(s=e?"@scope":`@scope (${t.tagName}) to (:state(${nF}) > *)`,r=`${s}{ ${r} }`),i.replaceSync(r),this.#u.set(i,s)}return i}updateStyle(){this.#u.forEach((t,e)=>{e.replaceSync(t?`${t}{${this.#a}}`:this.#a)})}}function n1(t,...e){let n="",r="",i=e.at(0);Array.isArray(t)?r=nb(t,...e):void 0!==i?(n=t,r=i):r=t;let s=new n0(n),o={[nB]:s},a="";return"string"==typeof r?a=r:Object.keys(r).forEach(t=>{let e="$"===t;o[t]=e||t.includes("-")?t:`${t}-${nw()}`,a+=`${e?":where(&:not([hidden])),:host(:where(:not([hidden])))":`.${o[t]}`} {${r[t]}}`}),s.setContent(a),o}let n2=(t,e,n)=>{let r=!1;e.forEach(e=>{let i=t.get(e)||0;r||=1===n&&0===i||-1===n&&1===i,t.set(e,i+n)}),r&&nu(nQ.get(t))};function n3(t){t?.forEach(t=>{let{callback:e,getDep:n,values:r,preCallback:i}=t,s=n?.();(!n||!r||nC(r,s))&&(nK(i),t.preCallback=e(s,r),t.values=s,t.initialized=!0)})}function n8(t){return t.filter(t=>(nK(t.preCallback),t.initialized=!1,t.values=void 0,t.fixed))}let n4=new nm,n7=(t=performance.now())=>{if(performance.now()>t+50)return requestAnimationFrame(n7);let e=n4.get();if(e){try{e()}catch(t){reportError(t)}n7(t)}};n4.addEventListener("start",()=>nu(n7));class n6 extends HTMLElement{#h;#d;#f=[];#p=[];#m=[];#g;#y;#b;#v;#w;[nJ](){this.#y&&nu(this.#S)}static{n=t=>{let e=i,n=nd(t,t=>{let r=e.#f.at(0);if(!e9&&e.#y&&r&&!r.initialized)throw new nE("Don't set state sync before insert the DOM");nh(n,t),!e.#v&&e.#y&&nu(e.#S)});return e.#d.stateList.push(n),n},r=(t,e)=>t.#m.push(e)}constructor(){let t;super(),i=this;const{aria:e,mode:n,delegatesFocus:r,...s}=this.#_,{focusable:o,...a}=e||{};this.#h=n?this.shadowRoot||this.attachShadow({mode:n,delegatesFocus:r,...s}):this,this.#d=this.attachInternals(),this.#d.stateList=[],this.#d.sheets=[],nG(this.#d,a),this.#f.push({fixed:!0,getDep:()=>[this.disabled],callback:([e=!1])=>{if(void 0===t&&(t=this.hasAttribute("tabindex")),this.#d.ariaDisabled=String(e),o&&!t&&(this.tabIndex=-Number(e)),(o||r)&&e)return np(this,"click",t=>t.isTrusted&&t.stopImmediatePropagation(),{capture:!0})}})}get #_(){return this.constructor[Symbol.metadata]}get #$(){return this.#m.findLast(t=>!t.condition||t.condition())}get internals(){return this.#d}#E=()=>{n3(this.#f)};#C=()=>{n3(this.#p)};#T=t=>{try{this.#v=!0,this.#C();let e=this.#h===this,n=t?t.render():e?void 0:nH`<slot></slot>`;if(void 0===n)return;let r=n??(e?nH`<style>@scope{&{display:none!important;}}</style>`:nH`<style>:host{&{display:none!important;}}</style>`);nU(r,this.#h)}catch(e){let t=new CustomEvent(nY,{bubbles:!0,composed:!0,cancelable:!0,detail:e});if(this.dispatchEvent(t))throw e}finally{this.#v=!1}};#x=()=>{let t=this.#$;this.#y&&(t||!this.#m.length)&&(this.#T(t),e9||nu(this.#E))};#S=()=>{this.#_.noBlocking&&!e9?n4.add(this.#x):this.#x()};#P=()=>{let{adoptedStyleSheets:t=[]}=this.#_,{shadowRoot:e,sheets:n}=this.#d,r=t.map(t=>t[nB].getStyle(this));if(!e)return this.prepend(...n.map(t=>t.element)),((t,e)=>{let n=t.getRootNode();if(!nZ.has(n)){let t=new Map;nZ.set(n,t),nQ.set(t,()=>{let e=(n.adoptedStyleSheets||[]).filter(e=>!t.has(e));t.forEach((t,n)=>t&&e.push(n)),n.adoptedStyleSheets=e.reverse()})}let r=nZ.get(n);return n2(r,e,1),()=>n2(r,e,-1)})(this,r);e.adoptedStyleSheets=r.concat(n)};#L=()=>{this.#f?.forEach(t=>{let{callback:e,getDep:n,initialized:r}=t;r||(t.values=n?.(),t.preCallback=e(t.values),t.initialized=!0)})};#O=()=>{this.willMount&&this.memo(this.willMount.bind(this),()=>[]),this.mounted&&this.effect(this.mounted.bind(this),()=>[]),this.updated&&this.effect((t,e)=>e&&this.updated.apply(this)),this.unmounted&&this.effect(()=>this.unmounted.bind(this),()=>[]),!this.#m.length&&this.render&&this.#m.push({render:this.render.bind(this),condition:this.shouldUpdate?.bind(this)})};#j;#k=()=>{if(this.#g){this.#g=!1,this.#w?.(),this.#w=this.#P();return}this.#b=!0,this.#O();let{observedStores:t,mode:n,penetrable:r}=this.#_;this.#d.states.add("gem-element"),n||!this.#m.length||r||this.#d.states.add(nF),this.#j=t?.map(t=>nI(t,this.#S)),e?.(this),this.#T(this.#$),this.#y=!0,this.#w=this.#P(),e9||nu(this.#L)};connectedCallback(){this.#_.noBlocking&&!e9?n4.add(this.#k):this.#k()}disconnectedCallback(){if(this.isConnected){this.#g=!0;return}n4.delete(this.#k),n4.delete(this.#x),this.#y=!1,this.#j?.forEach(t=>t()),this.#f=n8(this.#f),this.#p=n8(this.#p),this.#w?.()}effect=(t,e)=>{let n={callback:t,getDep:e,initialized:this.#y,fixed:!this.#b};this.#y&&(n.values=e?.(),n.preCallback=t(n.values)),this.#f.push(n)};memo=(t,e)=>{this.#p.push({callback:t,getDep:e,fixed:!this.#b})};update=()=>nu(this.#S)}let{deleteProperty:n5,getOwnPropertyDescriptor:n9,defineProperty:rt}=Reflect,{getPrototypeOf:re,assign:rn,hasOwn:rr}=Object,ri=new ng;function rs(t,e,n){let r=t.metadata;n9(r,e)||rt(r,e,{value:r[e]?.filter(t=>t!==n)||[]}),r[e].push(n)}function ro(t,e){let{value:n}=n9(t,e)||{};n5(t,e),t[e]=n}let ra=new WeakMap,{setAttribute:rl,toggleAttribute:rc,removeAttribute:ru}=Element.prototype,rh=(t,e)=>ra.get(re(t))?.get(e);function rd(){}n6.prototype.setAttribute=function(t,e){let n=rh(this,t);if(!n)return rl.call(this,t,e);this[n]=e},n6.prototype.removeAttribute=function(t){let e=rh(this,t);if(!e)return ru.call(this,t);this[e]=null},n6.prototype.toggleAttribute=function(t,e){let n=rh(this,t);return n?this[n]=e??!this.hasAttribute(t):rc.call(this,t,e)};let rf=Symbol("event handle");function rp(t,e,{attr:n,attrType:r,event:i,eventOptions:s}={}){rt(t,e,{configurable:!0,get(){let t=ri.get(this)[e];return i&&!t?(this[e]=rd,this[e]):t},set(t){let o=this,a=ri.get(o);n&&((t=r===Boolean&&""===t||r(t||""))?rl.call(this,n,r===Boolean?"":t):ru.call(this,n)),t!==a[e]&&(i?(a[e]=t?.[rf]?t:async(e,n)=>{await Promise.resolve();let r=new CustomEvent(i,{...n,...s,detail:e});o.dispatchEvent(r),await t(e,n)},a[e][rf]=!0):(a[e]=t,this[nJ]()))}})}let rm=new WeakMap;function rg(t,{metadata:e}){let n=rm.get(e);if(n)return n;let r=t;do r=re(r);while(r.constructor[Symbol.metadata]!==e);return rm.set(e,r),r}function ry(t,e){let n=t.name,r=nS(n);return t.addInitializer(function(){let i=rg(this,t);rr(i,n)||(rs(t,"observedAttributes",r),rp(i,n,{attr:r,attrType:e})),ro(this,n);let s=re(this),o=ra.get(s)||new Map;o.set(r,n),ra.set(s,o)}),function(t){return this.getAttribute(r)??t}}function rb(t,e){return ry(e,String)}function rv(t,e){return ry(e,Boolean)}function rw(t,e){return ry(e,Number)}function rS(t,e){let n=e.name;return e.addInitializer(function(){let t=rg(this,e);rr(t,n)||(rs(e,"observedProperties",n),rp(t,n)),ro(this,n)}),function(t){return this[n]??t}}function r_(t){return(e,n)=>{let{addInitializer:r,name:i,access:s,kind:o}=n;r(function(){let e=t&&(()=>t(this));if("getter"===o){if(n.private)throw new nE("not support");let t=n9(rg(this,n),i).get.bind(this);this.memo(()=>{rt(this,i,{configurable:!0,value:t()})},e)}else this.memo(s.get.call(this,this).bind(this),e)})}}function r$(t){return(e,{addInitializer:n,access:r})=>{n(function(){this.effect(r.get.call(this,this).bind(this),t&&(()=>t(this)))})}}function rE(){return(t,{addInitializer:e,access:n})=>{e(function(){this.effect(()=>n.get.call(this,this).bind(this),()=>[])})}}function rC(){return r_(()=>[])}function rT(){return r$(()=>[])}function rx(t){return(e,{addInitializer:n,access:i})=>{n(function(){r(this,{render:i.get.call(this,this).bind(this),condition:t&&(()=>t(this))})})}}function rP(){return(t,{addInitializer:e,access:n})=>{e(function(){this.addEventListener(nY,t=>{t.preventDefault(),nU(n.get.call(this,this).apply(this,[t.detail]),this.internals.shadowRoot||this)})})}}function rL(t,e){let n=e.name,r=nS(n);e.addInitializer(function(){let t=rg(this,e);!rr(t,n)&&(rs(e,"definedCSSStates",r),rt(t,n,{configurable:!0,get(){let{states:t}=this.internals;return t?.has(r)},set(t){let{states:e}=this.internals;t?e?.add(r):e?.delete(r)}}));ro(this,n)})}function rO(t,e,n,r){let i=t.name,s=nS(i);if(t.static)rs(t,n,s);else{let r=re(e);r[i]||(r[i]=s,rs(t,n,s))}return r||s}function rj(t,e){return function(t){return rO(e,this,"definedSlots",t)}}function rk(t,e){return function(t){return rO(e,this,"definedParts",t)}}function rN(t,e){rA(e)}function rM(t,e){rA(e,{bubbles:!0,composed:!0})}function rA(t,e){let n=t.name,r=nS(n);t.addInitializer(function(){let i=rg(this,t);rr(i,n)||(rs(t,"definedEvents",r),rp(i,n,{event:r,eventOptions:e})),ro(this,n)})}function rR(t){return(e,n)=>{rs(n,"adoptedStyleSheets",t)}}function rI(t){return(e,n)=>{rs(n,"observedStores",t)}}function rH({mode:t="open",serializable:e=!0,...n}={}){return(r,i)=>{rn(i.metadata,{mode:t,serializable:e,...n})}}function rD({penetrable:t}){return(e,n)=>{n.metadata.penetrable=t}}function rV(){return(t,e)=>{e.metadata.noBlocking=!0}}function rz(t){return(e,n)=>{let r=n.metadata;r.aria={...r.aria,...t}}}function rW(t){return(e,{addInitializer:n})=>{n(()=>{customElements.define(t,e)})}}let rU=globalThis.trustedTypes,rG=rU?.createPolicy("lit-html",{createHTML:t=>t}),rq="$lit$",rK=`lit$${Math.random().toFixed(9).slice(2)}$`,rB="?"+rK,rJ=`<${rB}>`,rF=document,rY=()=>rF.createComment(""),rZ=t=>null===t||"object"!=typeof t&&"function"!=typeof t,rQ=t=>null==t,rX=`[
|
|
2
|
+
\f\r]`,r0=`[^
|
|
3
|
+
\f\r"'\`<>=]`,r1=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,r2=/-->/g,r3=/>/g,r8=RegExp(`>|${rX}(?:([^\\s"'>=/]+)(${rX}*=${rX}*(?:${r0}|("|')|))|$)`,"g"),r4=/'/g,r7=/"/g,r6=/^(?:script|style|textarea|title)$/i,r5="v-if",r9="v-else-if",it="v-else";class ie{type;strings;values;constructor(t,e,n){this.type=t,this.strings=e,this.values=n}}let ir=t=>(e,...n)=>new ie(t,e,n),ii=ir(1),is=ir(2),io=ir(3),ia=Symbol.for("lit-noChange"),il=new WeakMap,ic=rF.createTreeWalker(rF,129);class iu{el;parts=[];constructor({strings:t,type:e},n){let r,i=0,s=0;const o=t.length-1,a=this.parts,[l,c]=((t,e)=>{let n,r=t.length-1,i=[],s=2===e?"<svg>":3===e?"<math>":"",o=r1;for(let e=0;e<r;e++){let r,a,l=t[e],c=-1,u=0;for(;u<l.length&&(o.lastIndex=u,null!==(a=o.exec(l)));)u=o.lastIndex,o===r1?"!--"===a[1]?o=r2:void 0!==a[1]?o=r3:void 0!==a[2]?(r6.test(a[2])&&(n=RegExp(`</${a[2]}`,"g")),o=r8):void 0!==a[3]&&(o=r8):o===r8?">"===a[0]?(o=n??r1,c=-1):void 0===a[1]?c=-2:(c=o.lastIndex-a[2].length,r=a[1],o=void 0===a[3]?r8:'"'===a[3]?r7:r4):o===r7||o===r4?o=r8:o===r2||o===r3?o=r1:(o=r8,n=void 0);let h=o===r8&&t[e+1].startsWith("/>")?" ":"";s+=o===r1?l+rJ:c>=0?(i.push(r),l.slice(0,c)+rq+l.slice(c)+rK+h):l+rK+(-2===c?e:h)}let a=s+(t[r]||"<?>")+(2===e?"</svg>":3===e?"</math>":"");return[function(t,e){if(!Array.isArray(t))throw Error("invalid template");return void 0!==rG?rG.createHTML(e):e}(t,a),i]})(t,e);if(this.el=iu.createElement(l,n),ic.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=ic.nextNode())&&a.length<o;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(rq)){const e=c[s++],n=r.getAttribute(t).split(rK),o=/([.?@])?(.*)/.exec(e);a.push({type:1,index:i,name:o[2],strings:n,ctor:"."===o[1]?iy:"?"===o[1]?ib:"@"===o[1]?iv:ig}),r.removeAttribute(t)}else t.startsWith(rK)&&(a.push({type:6,index:i}),r.removeAttribute(t));if(r6.test(r.tagName)){const t=r.textContent.split(rK),e=t.length-1;if(e>0){r.textContent=rU?rU.emptyScript:"";for(let n=0;n<e;n++)r.append(t[n],rY()),ic.nextNode(),a.push({type:2,index:++i});r.append(t[e],rY())}}}else if(8===r.nodeType)if(r.data===rB)a.push({type:2,index:i});else{let t=-1;for(;-1!==(t=r.data.indexOf(rK,t+1));)a.push({type:7,index:i}),t+=rK.length-1}i++}}static createElement(t,e){let n=rF.createElement("template");return n.innerHTML=t,n}}function ih(t,e,n=t,r){if(e===ia)return e;let i=void 0!==r?n.__directives?.[r]:n.__directive,s=rZ(e)?void 0:e._$litDirective$;return i?.constructor!==s&&(i?._$notifyDirectiveConnectionChanged?.(!1),void 0===s?i=void 0:(i=new s(t))._$initialize(t,n,r),void 0!==r?(n.__directives??=[])[r]=i:n.__directive=i),void 0!==i&&(e=ih(t,i._$resolve(t,e.values),i,r)),e}class id{_$template;_$parts=[];_$conditions=[];_$parent;_$disconnectableChildren=void 0;constructor(t,e){this._$template=t,this._$parent=e}get parentNode(){return this._$parent.parentNode}get _$isConnected(){return this._$parent._$isConnected}_clone(t){let{el:{content:e},parts:n}=this._$template,r=new Map,i=new Map,s=(t?.creationScope??rF).importNode(e,!0);ic.currentNode=s;let o=ic.nextNode(),a=0,l=0,c=n[0];for(;void 0!==c;){if(a===c.index){let e;2===c.type?e=new im(o,o.nextSibling,this,t):1===c.type?(c.name===r5&&r.set(o,l),c.name===r9&&i.set(o,l),e=new c.ctor(o,c.name,c.strings,this,t)):6===c.type&&(e=new iw(o,this,t)),this._$parts.push(e),c=n[++l]}a!==c?.index&&(o=ic.nextNode(),a++)}let u=new Map;for(let t of(r.forEach((t,e)=>{let n=new ip(e,t);this._$conditions.push(n),u.set(e,n);let r=e;for(;r=r.nextElementSibling;){let t=i.get(r);if(void 0===t)break;n.push(r,t)}}),this._$parts)){if(t?.type!==2)continue;let e=u.get(t._$endNode);e&&(t._$endNode=e.mark)}return ic.currentNode=rF,s}_update(t){let e=0;for(let n of this._$parts)void 0!==n&&(void 0!==n.strings?(n._$setValue(t,n,e),e+=n.strings.length-2):n.name===r5||n.name===r9||n._$setValue(t[e])),e++;this._$conditions.forEach(e=>e.update(t))}}class ip{mark;list;constructor(t,e){const n=rY();n._$chain=this,t.before(n),this.mark=n,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(){let t=this.next;t?.attributes.getNamedItem(it)&&(this.list.push({ele:t}),t.removeAttribute(it))}update(t){let{mark:e,list:n}=this,r=n.find(({idx:e})=>void 0===e||!!t[e]);r&&!r.ele.parentNode&&e.after(r.ele),n.forEach(({ele:t})=>(!r||t!==r.ele)&&t.remove())}}class im{type=2;options;_$committedValue;__directive;_$startNode;_$endNode;_$parent;__isConnected;get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}_$disconnectableChildren=void 0;constructor(t,e,n,r){this._$startNode=t,this._$endNode=e,this._$parent=n,this.options=r,this.__isConnected=r?.isConnected??!0}get parentNode(){let t=this._$startNode.parentNode,e=this._$parent;return void 0!==e&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$startNode}get endNode(){return this._$endNode}_$setValue(t,e=this){this.parentNode&&(rZ(t=ih(this,t,e))?rQ(t)||""===t?(rQ(this._$committedValue)||this._$clear(),this._$committedValue=void 0):t!==this._$committedValue&&t!==ia&&this._commitText(t):t instanceof ie?this._commitTemplateResult(t):void 0!==t.nodeType?this._commitNode(t):Symbol.iterator in 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){!rQ(this._$committedValue)&&rZ(this._$committedValue)?this._$startNode.nextSibling.data=t:this._commitNode(rF.createTextNode(t)),this._$committedValue=t}_commitTemplateResult(t){let{values:e}=t,n=this._$getTemplate(t);if(this._$committedValue?._$template===n)this._$committedValue._update(e);else{let t=new id(n,this),r=t._clone(this.options);t._update(e),this._commitNode(r),this._$committedValue=t}}_$getTemplate(t){let e=il.get(t.strings);return void 0===e&&il.set(t.strings,e=new iu(t)),e}_commitIterable(t){let e;Array.isArray(this._$committedValue)||(this._$committedValue=[],this._$clear());let n=this._$committedValue,r=0;for(let i of t)r===n.length?n.push(e=new im(this._insert(rY()),this._insert(rY()),this,this.options)):e=n[r],e._$setValue(i),r++;r<n.length&&(this._$clear(e&&e._$endNode.nextSibling,r),n.length=r)}_$clear(t=this._$startNode.nextSibling,e){for(this._$notifyConnectionChanged?.(!1,!0,e);t&&t!==this._$endNode;){let e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$parent&&(this.__isConnected=t,this._$notifyConnectionChanged?.(t))}}class ig{type=1;element;name;options;strings;_$committedValue;__directives;_$parent;_$disconnectableChildren=void 0;get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(t,e,n,r,i){this.element=t,this.name=e,this._$parent=r,this.options=i,n.length>2||""!==n[0]||""!==n[1]?(this._$committedValue=Array(n.length-1).fill(new String),this.strings=n):this._$committedValue=void 0}_$setValue(t,e=this,n,r){let i=this.strings,s=!1;if(void 0===i)(s=!rZ(t=ih(this,t,e,0))||t!==this._$committedValue)&&(this._$committedValue=t);else{let r,o,a=t;for(t=i[0],r=0;r<i.length-1;r++)o=ih(this,a[n+r],e,r),s||=!rZ(o)||o!==this._$committedValue[r],rQ(o)?t=void 0:rQ(t)||(t+=o+i[r+1]),this._$committedValue[r]=o}s&&!r&&this._commitValue(t)}_commitValue(t){rQ(t)?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t)}}class iy extends ig{type=3;_commitValue(t){this.element[this.name]=t}}class ib extends ig{type=4;_commitValue(t){this.element.toggleAttribute(this.name,!!t)}}class iv extends ig{type=5;_$setValue(t,e=this){t=ih(this,t,e,0);let n=this._$committedValue,r=n&&(!t||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive),i=t&&(!n||r);r&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,t),this._$committedValue=t}handleEvent(t){"function"==typeof this._$committedValue?this._$committedValue.call(this.options?.host??this.element,t):this._$committedValue.handleEvent(t)}}class iw{element;type=6;__directive;_$committedValue;_$parent;_$disconnectableChildren=void 0;_$props;options;constructor(t,e,n){this.element=t,this._$parent=e,this.options=n}get _$isConnected(){return this._$parent._$isConnected}_$setValue(t){if(t)if(t instanceof i_)t.value=this.element;else if(t._$litDirective$)ih(this,t);else{if(this._$props)for(let t in this._$props)Reflect.set(this.element,t,void 0);Object.assign(this.element,t),this._$props=t}}}let iS=()=>new i_;class i_{value}let i$="2.2.15",iE=t=>(...e)=>({_$litDirective$:t,values:e});class iC{__part;__attributeIndex;__directive;_$parent;_$disconnectableChildren;get _$isConnected(){return this._$parent._$isConnected}_$initialize(t,e,n){this.__part=t,this._$parent=e,this.__attributeIndex=n}_$resolve(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}let iT=(t,e,n)=>{let r=t._$startNode.parentNode,i=void 0===e?t._$endNode:e._$startNode;if(void 0===n)n=new im(r.insertBefore(document.createComment(""),i),r.insertBefore(document.createComment(""),i),t,t.options);else{let e=n._$endNode.nextSibling,s=n._$parent,o=s!==t;if(o){let e;n._$reparentDisconnectables?.(t),n._$parent=t,void 0!==n._$notifyConnectionChanged&&(e=t._$isConnected)!==s._$isConnected&&n._$notifyConnectionChanged(e)}if(e!==i||o){let t=n._$startNode;for(;t!==e;){let e=t.nextSibling;r.insertBefore(t,i),t=e}}}return n},ix=(t,e,n=t)=>(t._$setValue(e,n),t),iP={},iL=t=>{t._$notifyConnectionChanged?.(!1,!0);let e=t._$startNode,n=t._$endNode.nextSibling;for(;e!==n;){let t=e.nextSibling;e.remove(),e=t}},iO=(t,e,n)=>{let r=new Map;for(let i=e;i<=n;i++)r.set(t[i],i);return r},ij=iE(class extends iC{_itemKeys;constructor(t){if(super(),2!==t.type)throw Error("repeat() can only be used in text expressions")}_getValuesAndKeys(t,e,n){let r;void 0===n?n=e:void 0!==e&&(r=e);let i=[],s=[],o=0;for(let e of t)i[o]=r?r(e,o):o,s[o]=n(e,o),o++;return{values:s,keys:i}}render(t,e,n){return this._getValuesAndKeys(t,e,n).values}update(t,[e,n,r]){let i,s,o=t._$committedValue,{values:a,keys:l}=this._getValuesAndKeys(e,n,r);if(!Array.isArray(o))return this._itemKeys=l,a;let c=this._itemKeys??=[],u=[],h=0,d=o.length-1,f=0,p=a.length-1;for(;h<=d&&f<=p;)if(null===o[h])h++;else if(null===o[d])d--;else if(c[h]===l[f])u[f]=ix(o[h],a[f]),h++,f++;else if(c[d]===l[p])u[p]=ix(o[d],a[p]),d--,p--;else if(c[h]===l[p])u[p]=ix(o[h],a[p]),iT(t,u[p+1],o[h]),h++,p--;else if(c[d]===l[f])u[f]=ix(o[d],a[f]),iT(t,o[h],o[d]),d--,f++;else if(void 0===i&&(i=iO(l,f,p),s=iO(c,h,d)),i.has(c[h]))if(i.has(c[d])){let e=s.get(l[f]),n=void 0!==e?o[e]:null;if(null===n){let e=iT(t,o[h]);ix(e,a[f]),u[f]=e}else u[f]=ix(n,a[f]),iT(t,o[h],n),o[e]=null;f++}else iL(o[d]),d--;else iL(o[h]),h++;for(;f<=p;){let e=iT(t,u[p+1]);ix(e,a[f]),u[f++]=e}for(;h<=d;){let t=o[h++];null!==t&&iL(t)}return this._itemKeys=l,((t,e=iP)=>t._$committedValue=e)(t,u),ia}});nV(ii,(t,e,n)=>{let r=n?.renderBefore??e,i=r._$litPart$;if(void 0===i){let t=n?.renderBefore??null;r._$litPart$=i=new im(e.insertBefore(rY(),t),t,void 0,n??{})}return i._$setValue(t),i}),globalThis.__GEM_DEVTOOLS__HOOK__&&!globalThis.__GEM_DEVTOOLS__HOOK__.GemElement&&Object.assign(globalThis.__GEM_DEVTOOLS__HOOK__,{...eQ,...eX,...eZ,...e0});let ik=globalThis.history,iN=ik.pushState.bind(ik),iM=ik.replaceState.bind(ik),iA=0,iR=()=>`${performance.now()}-${++iA}`,iI=nR({$hasCloseHandle:!1,$hasOpenHandle:!1,$hasShouldCloseHandle:!1,$key:""}),iH=new Map,iD=()=>new Map([...iH].map(([t,e])=>[t,{...e}]));function iV(t){let{$key:e,$hasCloseHandle:n,$hasOpenHandle:r,$hasShouldCloseHandle:i}=t||{};if(iI.$key!==e){if(e)throw new nE("`$key` is not allowed");if(n)throw new nE("`$hasCloseHandle` is not allowed");if(r)throw new nE("`$hasOpenHandle` is not allowed");if(i)throw new nE("`$hasShouldCloseHandle` is not allowed")}}function iz(t){return iF.basePath?iF.basePath+t:t}function iW(t){return t===iF.basePath?"/":t.replace(RegExp(`^${iF.basePath}/`),"/")}function iU(){iF.dispatchEvent(new CustomEvent("beforechange"))}function iG(t){let e=iF.getParams()||{path:iW(location.pathname),query:new ny},n=t.path?nf(e.path,t.path):iW(location.pathname),r=new ny(t.query??(t.path?"":location.search)),i=String(r)!==String(e.query),s=i?r:e.query,o=n!==e.path||i,a=t.title||(o?"":document.title),l=t.close||t.data||t.open||t.shouldClose,c=decodeURIComponent(t.hash??(!o&&l?location.hash:""));return{...t,title:a,path:n,query:s,hash:c}}function iq(t,e){iV(t.data);let n=iG(t),{title:r,path:i,query:s,hash:o,close:a,open:l,shouldClose:c,data:u}=n,h={$hasCloseHandle:!!a,$hasOpenHandle:!!l,$hasShouldCloseHandle:!!c,$key:iR(),$title:r,...u};nt(iH,iD).set(h.$key,n),iU(),n$(iI),iI(h);let d=iz(i)+new ny(s)+o,f=decodeURIComponent(location.hash);e(h,r,d),f!==o&&dispatchEvent(new CustomEvent("hashchange"))}function iK(t,e,n,r){iV(t);let i={$key:iR(),$title:e,...t||{}},{pathname:s,search:o,hash:a}=new URL(n,location.origin+location.pathname),l=iG({path:s,query:new ny(o),hash:a,title:e,data:t});nt(iH,iD).set(i.$key,l),iU(),n$(iI),iI(i);let c=iz(s)+l.query+a,u=location.hash;r(i,e,c),u!==a&&dispatchEvent(new CustomEvent("hashchange"))}let iB=nR({basePath:""});class iJ extends EventTarget{get store(){return iI}get currentKey(){return iI.$key}get basePath(){return iB.basePath}set basePath(t){iB({basePath:t}),Object.assign(this.getParams(),{path:iW(location.pathname)})}getParams(){return nt(iH,iD).get(iI.$key)}updateParams(t){Object.assign(this.getParams(),t),iI()}push(t){iq(t,iN)}replace(t){iq(t,iM)}pushIgnoreCloseHandle(t){iI.$hasCloseHandle?(this.getParams()?.close?.(),this.replace(t)):this.push(t)}forward(){ik.forward()}back(){ik.back()}}let iF=new iJ,iY=nR({defaultTitle:document.title,url:"",title:""});if(!globalThis._GEMHISTORY){if(globalThis._GEMHISTORY={history:iF,titleStore:iY,basePathStore:iB},ik.pushState=(t,e,n)=>{iK(t,e,n,iN)},ik.replaceState=(t,e,n)=>{iK(t,e,n,iM)},addEventListener("hashchange",({isTrusted:t})=>{t&&iF.replace({hash:location.hash})}),ik.state)if(ik.state.$hasCloseHandle){iI(ik.state);let t=iG({title:document.title});nt(iH,iD).set(iI.$key,t),iF.back()}else{let t=iG({title:document.title,hash:location.hash});iI({$key:iR(),...ik.state||{}}),nt(iH,iD).set(iI.$key,t)}else{let{protocol:t,pathname:e,search:n,hash:r}=location;(t.startsWith("http")||t.startsWith("tauri"))&&iF.replace({path:e,query:n,hash:r})}nI(iY,()=>{let t=iF.getParams();t&&(t.title=iY.title)}),nI(iI,()=>{let{title:t}=iF.getParams();t!==iY.title&&iY({title:t})});let t=!1;addEventListener("popstate",e=>{let n=e.state;if(n?.$key){if(t){t=!1;return}if(!nt(iH,iD).has(n.$key)){let{pathname:t,search:e,hash:r}=location;nt(iH,iD).set(n.$key,{path:iW(t),query:new ny(e),hash:decodeURIComponent(r),title:iY.title||n.$title,data:n})}if(parseFloat(n.$key)>parseFloat(iI.$key)&&n.$hasOpenHandle)nt(iH,iD).get(n.$key)?.open?.();else if(iI.$hasCloseHandle){let e=nt(iH,iD).get(iI.$key),r=e?.close,i=e?.shouldClose;if(i&&!i()){t=!0,iF.forward();return}r?r():n.$hasCloseHandle&&(t=!0,iF.back())}iU(),n$(iI),iI(n)}})}let{history:iZ,titleStore:iQ,basePathStore:iX}=globalThis._GEMHISTORY;function i0(t,e,n){"symbol"==typeof e&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:n?n+" "+e:e})}catch(t){}return t}let i1=Symbol();s=rI(iZ.store),o=rz({role:"dialog",ariaModal:"true"}),l=n6,c=rC();class i2 extends l{static{({e:[u,h,d,f,p,m],c:[g,a]}=function(t,e,n,r,i){var s,o,a,l,c,u,h,d=Symbol.metadata||Symbol.for("Symbol.metadata"),f=Object.defineProperty,p=Object.create,m=[p(null),p(null)],g=e.length;function y(e,n,r){return function(i,s){n&&(s=i,i=t);for(var o=0;o<e.length;o++)s=e[o].apply(i,r?[s]:[]);return r?s:i}}function b(t,e,n,r){if("function"!=typeof t&&(r||void 0!==t))throw TypeError(e+" must "+(n||"be")+" a function"+(r?"":" or undefined"));return t}function v(t,e,n,r,i,s,o,a,l,c,d){function p(t){if(!d(t))throw TypeError("Attempted to access private element on non-instance")}var g=[].concat(e[0]),v=e[3],w=!o,S=1===i,_=3===i,$=4===i,E=2===i;function C(e,n,r){return function(i,s){return n&&(s=i,i=t),r&&r(i),desc[e].call(i,s)}}var T={},x=[],P=_?"get":$||S?"set":"value";if(!w&&(l?(c||S?T={get:i0(function(){return v(this)},r,"get"),set:function(t){e[4](this,t)}}:T[P]=v,c||i0(T[P],r,E?"":P)):c||(T=Object.getOwnPropertyDescriptor(t,r)),!c&&!l)){if((h=m[+a][r])&&(h^i)!=7)throw Error("Decorating two elements with the same name ("+T[P].name+") is not supported yet");m[+a][r]=i<3?1:i}for(var L=t,O=g.length-1;O>=0;O-=n?2:1){var j=b(g[O],"A decorator","be",!0),k=n?g[O-1]:void 0,N={},M={kind:["field","accessor","method","getter","setter","class"][i],name:r,metadata:u,addInitializer:(function(t,e){if(t.v)throw TypeError("attempted to call addInitializer after decoration was finished");b(e,"An initializer","be",!0),s.push(e)}).bind(null,N)};if(w){h=j.call(k,L,M),N.v=1,b(h,"class decorators","return")&&(L=h);continue}if(M.static=a,M.private=l,h=M.access={has:l?d.bind():function(t){return r in t}},$||(h.get=l?E?function(t){return p(t),T.value}:C("get",0,p):function(t){return t[r]}),E||_||(h.set=l?C("set",0,p):function(t,e){t[r]=e}),L=j.call(k,S?{get:T.get,set:T.set}:T[P],M),N.v=1,S){if("object"==typeof L&&L)(h=b(L.get,"accessor.get"))&&(T.get=h),(h=b(L.set,"accessor.set"))&&(T.set=h),(h=b(L.init,"accessor.init"))&&x.unshift(h);else if(void 0!==L)throw TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else b(L,(c?"field":"method")+" decorators","return")&&(c?x.unshift(L):T[P]=L)}return i<2&&o.push(y(x,a,1),y(s,a,0)),c||w||(l?S?o.splice(-1,0,C("get",a),C("set",a)):o.push(E?T[P]:b.call.bind(T[P])):f(t,r,T)),L}function w(t){return f(t,d,{configurable:!0,enumerable:!0,value:u})}return void 0!==i&&(u=i[d]),u=p(null==u?null:u),a=[],l=function(t){t&&a.push(y(t))},(c=function(e,i){for(var l=0;l<n.length;l++){var c=n[l],u=c[1],h=7&u;if((8&u)==e&&!h==i){var d=c[2],f=!!c[3],p=16&u;v(e?t:t.prototype,c,p,f?"#"+d:function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(d),h,h<2?[]:e?o=o||[]:s=s||[],a,!!e,f,i,e&&f?function(e){return function(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(null!==t?typeof t:"null"));return t}(e)===t}:r)}}})(8,0),c(0,0),c(8,1),c(0,1),l(s),l(o),h=a,g||w(t),{e:h,get c(){var S=[];return g&&[w(t=v(t,[e],0,t.name,5,S)),y(S,1)]}}}(this,[s,o],[[rb,0,"label"],[rL,0,"opened"],[c,0,"init",function(t){return t.#N},function(t,e){t.#N=e}]],t=>#N in t,l))}label=u(this);opened=(h(this),d(this));#M=void f(this);#A;#R=[];#I=()=>{this.inert=!0,this.#R.forEach(t=>t.inert=!1),this.#M?this.#M.before(this):this.#A&&this.#A?.appendChild(this),this.dispatchEvent(new CustomEvent("close")),this.opened=!1};#H=()=>{this.hidden=!1,this.inert=!1,this.#M=this.nextSibling,this.#A=this.parentElement||this.getRootNode(),this.#R=[...document.body.children].filter(t=>!t.inert),this.#R.forEach(t=>t.inert=!0),document.body.append(this),this.dispatchEvent(new CustomEvent("open")),this.opened=!0};#N=p(this,()=>this.inert=!0);open=(m(this),()=>{if(!this.opened)return this.#H(),iZ.push({title:this.label,open:this.#H,close:this.#I,shouldClose:this.shouldClose}),i1});shouldClose(){return!0}close=()=>(iZ.back(),i1);forceClose=()=>(this.opened=!1,setTimeout(this.close,100),i1);static{a()}}function i3(t,e,n){"symbol"==typeof e&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:n?n+" "+e:e})}catch(t){}return t}function i8(t){return t}let i4=Symbol("open mark");function i7(t){let e,n,r,i,s,o,a,l,c,u,h,d=Symbol();return e=rH(),n=rz({role:"alertdialog",ariaModal:"true"}),i=n6,s=rT(),o=rT(),new class extends i8{constructor(){super(h),r()}static [class extends i{static{({e:[a,l,c,u],c:[h,r]}=function(t,e,n,r,i){var s,o,a,l,c,u,h,d=Symbol.metadata||Symbol.for("Symbol.metadata"),f=Object.defineProperty,p=Object.create,m=[p(null),p(null)],g=e.length;function y(e,n,r){return function(i,s){n&&(s=i,i=t);for(var o=0;o<e.length;o++)s=e[o].apply(i,r?[s]:[]);return r?s:i}}function b(t,e,n,r){if("function"!=typeof t&&(r||void 0!==t))throw TypeError(e+" must "+(n||"be")+" a function"+(r?"":" or undefined"));return t}function v(t,e,n,r,i,s,o,a,l,c,d){function p(t){if(!d(t))throw TypeError("Attempted to access private element on non-instance")}var g=[].concat(e[0]),v=e[3],w=!o,S=1===i,_=3===i,$=4===i,E=2===i;function C(e,n,r){return function(i,s){return n&&(s=i,i=t),r&&r(i),desc[e].call(i,s)}}var T={},x=[],P=_?"get":$||S?"set":"value";if(!w&&(l?(c||S?T={get:i3(function(){return v(this)},r,"get"),set:function(t){e[4](this,t)}}:T[P]=v,c||i3(T[P],r,E?"":P)):c||(T=Object.getOwnPropertyDescriptor(t,r)),!c&&!l)){if((h=m[+a][r])&&(h^i)!=7)throw Error("Decorating two elements with the same name ("+T[P].name+") is not supported yet");m[+a][r]=i<3?1:i}for(var L=t,O=g.length-1;O>=0;O-=n?2:1){var j=b(g[O],"A decorator","be",!0),k=n?g[O-1]:void 0,N={},M={kind:["field","accessor","method","getter","setter","class"][i],name:r,metadata:u,addInitializer:(function(t,e){if(t.v)throw TypeError("attempted to call addInitializer after decoration was finished");b(e,"An initializer","be",!0),s.push(e)}).bind(null,N)};if(w){h=j.call(k,L,M),N.v=1,b(h,"class decorators","return")&&(L=h);continue}if(M.static=a,M.private=l,h=M.access={has:l?d.bind():function(t){return r in t}},$||(h.get=l?E?function(t){return p(t),T.value}:C("get",0,p):function(t){return t[r]}),E||_||(h.set=l?C("set",0,p):function(t,e){t[r]=e}),L=j.call(k,S?{get:T.get,set:T.set}:T[P],M),N.v=1,S){if("object"==typeof L&&L)(h=b(L.get,"accessor.get"))&&(T.get=h),(h=b(L.set,"accessor.set"))&&(T.set=h),(h=b(L.init,"accessor.init"))&&x.unshift(h);else if(void 0!==L)throw TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else b(L,(c?"field":"method")+" decorators","return")&&(c?x.unshift(L):T[P]=L)}return i<2&&o.push(y(x,a,1),y(s,a,0)),c||w||(l?S?o.splice(-1,0,C("get",a),C("set",a)):o.push(E?T[P]:b.call.bind(T[P])):f(t,r,T)),L}function w(t){return f(t,d,{configurable:!0,enumerable:!0,value:u})}return void 0!==i&&(u=i[d]),u=p(null==u?null:u),a=[],l=function(t){t&&a.push(y(t))},(c=function(e,i){for(var l=0;l<n.length;l++){var c=n[l],u=c[1],h=7&u;if((8&u)==e&&!h==i){var d=c[2],f=!!c[3],p=16&u;v(e?t:t.prototype,c,p,f?"#"+d:function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(d),h,h<2?[]:e?o=o||[]:s=s||[],a,!!e,f,i,e&&f?function(e){return function(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(null!==t?typeof t:"null"));return t}(e)===t}:r)}}})(8,0),c(0,0),c(8,1),c(0,1),l(s),l(o),h=a,g||w(t),{e:h,get c(){var S=[];return g&&[w(t=v(t,[e],0,t.name,5,S)),y(S,1)]}}}(this,[e,n],[[s,0,"connectHistory",function(t){return t.#D},function(t,e){t.#D=e}],[o,0,"connectStore",function(t){return t.#V},function(t,e){t.#V=e}]],t=>#D in t,i))}constructor(...t){super(...t),u(this)}static get isOpen(){return this.store[i4]}static open(t){let e=new this;this.instance=e,this.inertStore=[...document.body.children].filter(t=>!t.inert),this.inertStore.forEach(t=>t.inert=!0),document.body.append(e);let n=()=>this.store({[i4]:!0,...t});return setTimeout(()=>{n(),iZ.push({title:e.label,open:n,close:this.closeHandle.bind(this),shouldClose:this.shouldClose.bind(this)})},100),d}static close(){return iZ.back(),d}static closeHandle(){return this.inertStore.forEach(t=>t.inert=!1),this.instance?.remove(),this.store({[i4]:!1,...t}),d}static shouldClose(){return!0}label="";#D=a(this,()=>nI(iZ.store,this.update));#V=(l(this),c(this,()=>nI(h.store,this.update)))}];inertStore=[];instance=null;store=nR({[i4]:!1,...t})},h}function i6(t,e,n){"symbol"==typeof e&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:n?n+" "+e:e})}catch(t){}return t}function i5(t,e,n,r,i,s){var o,a,l,c,u,h,d,f=Symbol.metadata||Symbol.for("Symbol.metadata"),p=Object.defineProperty,m=Object.create,g=[m(null),m(null)],y=e.length;function b(e,n,r){return function(i,s){n&&(s=i,i=t);for(var o=0;o<e.length;o++)s=e[o].apply(i,r?[s]:[]);return r?s:i}}function v(t,e,n,r){if("function"!=typeof t&&(r||void 0!==t))throw TypeError(e+" must "+(n||"be")+" a function"+(r?"":" or undefined"));return t}function w(t,e,n,r,i,s,o,a,l,c,u){function f(t){if(!u(t))throw TypeError("Attempted to access private element on non-instance")}var m=[].concat(e[0]),y=e[3],w=!o,S=1===i,_=3===i,$=4===i,E=2===i;function C(e,n,r){return function(i,s){return n&&(s=i,i=t),r&&r(i),desc[e].call(i,s)}}var T={},x=[],P=_?"get":$||S?"set":"value";if(!w&&(l?(c||S?T={get:i6(function(){return y(this)},r,"get"),set:function(t){e[4](this,t)}}:T[P]=y,c||i6(T[P],r,E?"":P)):c||(T=Object.getOwnPropertyDescriptor(t,r)),!c&&!l)){if((d=g[+a][r])&&(d^i)!=7)throw Error("Decorating two elements with the same name ("+T[P].name+") is not supported yet");g[+a][r]=i<3?1:i}for(var L=t,O=m.length-1;O>=0;O-=n?2:1){var j=v(m[O],"A decorator","be",!0),k=n?m[O-1]:void 0,N={},M={kind:["field","accessor","method","getter","setter","class"][i],name:r,metadata:h,addInitializer:(function(t,e){if(t.v)throw TypeError("attempted to call addInitializer after decoration was finished");v(e,"An initializer","be",!0),s.push(e)}).bind(null,N)};if(w){d=j.call(k,L,M),N.v=1,v(d,"class decorators","return")&&(L=d);continue}if(M.static=a,M.private=l,d=M.access={has:l?u.bind():function(t){return r in t}},$||(d.get=l?E?function(t){return f(t),T.value}:C("get",0,f):function(t){return t[r]}),E||_||(d.set=l?C("set",0,f):function(t,e){t[r]=e}),L=j.call(k,S?{get:T.get,set:T.set}:T[P],M),N.v=1,S){if("object"==typeof L&&L)(d=v(L.get,"accessor.get"))&&(T.get=d),(d=v(L.set,"accessor.set"))&&(T.set=d),(d=v(L.init,"accessor.init"))&&x.unshift(d);else if(void 0!==L)throw TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else v(L,(c?"field":"method")+" decorators","return")&&(c?x.unshift(L):T[P]=L)}return i<2&&o.push(b(x,a,1),b(s,a,0)),c||w||(l?S?o.splice(-1,0,C("get",a),C("set",a)):o.push(E?T[P]:v.call.bind(T[P])):p(t,r,T)),L}function S(t){return p(t,f,{configurable:!0,enumerable:!0,value:h})}return void 0!==s&&(h=s[f]),h=m(null==h?null:h),l=[],c=function(t){t&&l.push(b(t))},(u=function(e,r){for(var s=0;s<n.length;s++){var c=n[s],u=c[1],h=7&u;if((8&u)==e&&!h==r){var d=c[2],f=!!c[3],p=16&u;w(e?t:t.prototype,c,p,f?"#"+d:function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(d),h,h<2?[]:e?a=a||[]:o=o||[],l,!!e,f,r,e&&f?function(e){return function(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(null!==t?typeof t:"null"));return t}(e)===t}:i)}}})(8,0),u(0,0),u(8,1),u(0,1),c(o),c(a),d=l,y||S(t),{e:d,get c(){var _=[];return y&&[S(t=w(t,[e],r,t.name,5,_)),b(_,1)]}}}function i9(t){return t}class st extends RegExp{constructor(t){let e=0;super(`^${t.replace(/((:[^/$]+)|(\*))/g,(t,n)=>"*"===n?`(?<_${e++}>.*)`:`(?<${n.slice(1)}>[^/]+)`)}$`)}}function se(t,e){if(globalThis.URLPattern){let n=new URLPattern({pathname:t}),r=n.exec({pathname:e})||n.exec({pathname:`${e}/`});return r?r.pathname.groups:null}let n=new st(t),r=e.match(n)||`${e}/`.match(n);if(!r)return null;let i={};return r.groups&&Object.entries(r.groups).forEach(([t,e])=>{i[t.startsWith("_")?t.slice(1):t]=e}),i}function sn(t,e){let n=0,r=t.pattern.replaceAll("*",()=>`:${n++}`),i=e?.params;return i&&Object.keys(i).forEach(t=>{r=r.replace(RegExp(`:${t}`,"g"),i[t])}),r}function sr(t,e){return{path:sn(t,e),...e}}let si=nH``,ss=new Map;y=rD({penetrable:!0}),v=n6,w=r$(t=>[t.scrollContainer]),S=r$(t=>[t.scrollContainer]),_=rx(t=>!t.inert),new class extends i9{constructor(){super(tr),b()}static [class extends v{static{({e:[$,E,C,T,x,P,L,O,j,k,N,M,A,R,I,H,D,V,z,W,U,G,q,K,B,J,F,Y,Z,Q],c:[tr,b]}=i5(this,[y],[[rv,0,"transition"],[rS,0,"routes"],[rS,0,"locationStore"],[rS,0,"key"],[rN,0,"loading"],[rN,0,"beforeroutechange"],[rN,0,"routechange"],[rN,0,"error"],[rS,0,"scrollContainer"],[rS,0,"scrollIgnoreHash"],[rS,0,"trigger"],[w,0,"rememberScrollPosition",function(t){return t.#z},function(t,e){t.#z=e}],[S,0,"connectTriggerStore",function(t){return t.#W},function(t,e){t.#W=e}],[r$(t=>t.#U()),0,"updateContent",function(t){return t.#G},function(t,e){t.#G=e}],[_,0,"content",function(t){return t.#a},function(t,e){t.#a=e}]],0,t=>#z in t,v))}transition=$(this);routes=(E(this),C(this));locationStore=(T(this),x(this));key=(P(this),L(this));loading=(O(this),j(this));beforeroutechange=(k(this),N(this));routechange=(M(this),A(this));error=(R(this),I(this));scrollContainer=(H(this),D(this));scrollIgnoreHash=(V(this),z(this));trigger=(W(this),U(this,iZ));currentRoute=void G(this);currentParams={};get #q(){return"function"==typeof this.scrollContainer?this.scrollContainer():this.scrollContainer}#K=n({content:si});#B=()=>{if(!this.locationStore)return;let{path:t,query:e,hash:n,data:r}=iZ.getParams();this.locationStore({path:t,params:this.currentParams,query:e,hash:n,data:r})};#J=()=>{if(!this.#q)return;let t=ss.get(iZ.currentKey);t?this.#q.scroll(0,t):(this.scrollIgnoreHash||!iZ.getParams().hash)&&this.#q.scroll(0,0)};#F;#Y=(t,e,n)=>{this.beforeroutechange(t),this.#F=void 0,this.currentRoute=t,this.currentParams=e;let r=async()=>{this.#K({content:n}),this.#B(),await Promise.resolve(),this.#J(),this.routechange(this.currentRoute)};this.transition&&"startViewTransition"in document?document.startViewTransition(()=>r()):r()};#z=q(this,()=>{if(this.#q)return np(iZ,"beforechange",()=>ss.set(iZ.currentKey,this.#q.scrollTop))});#W=(K(this),B(this,()=>this.trigger.store&&nI(this.trigger.store,()=>this.#K())));#U=(J(this),()=>{let{path:t,query:e,hash:n}=this.trigger.getParams();return[this.key,t,e,n]});#G=F(this,([t,e],n)=>{n&&t===n[0]&&e===n[1]?this.#B():this.update()});#a=(Y(this),Z(this,()=>{let{content:t}=this.#K;if(void 0!==t){if(!this.shadowRoot){if(t===si)return;return nH`${t}`}return t===si?nH`<slot></slot>`:t}}));update=(Q(this),async()=>{let{path:t,hash:e,query:n}=this.trigger.getParams(),{route:r,params:i={}}=ti.findRoute(this.routes,t),{redirect:s,content:o,getContent:a}=r||{};if(s)return void this.trigger.replace({path:sn({pattern:s},{params:i}),query:n,hash:e});this.trigger===iZ&&(location.href!==iQ.url||r?.title)&&iQ({url:location.href,title:r?.title});let l=o||a?.(i,this.shadowRoot||this);this.loading(r),this.#F=l;let c=()=>this.#F===l;try{let t=await l;c()&&this.#Y(r,i,t)}catch(t){c()&&this.error(t)}})}];createLocationStore=()=>{let{path:t,query:e,hash:n,data:r}=iZ.getParams();return nR({path:t,query:e,hash:n,data:r,params:{}})};findRoute=(t=[],e)=>{let n=null;for(let r of Array.isArray(t)?t:Object.values(t))if("*"===r.pattern)n=r;else{let t=se(r.pattern,e);if(t)return{route:r,params:t}}return{route:n}}};let so=n1`
|
|
4
4
|
:host(:where(:not([hidden]))),
|
|
5
5
|
:not(:defined) {
|
|
6
6
|
display: contents;
|
|
7
7
|
}
|
|
8
|
-
`;
|
|
8
|
+
`;X=rH(),tt=rR(so),tn=tr;class sa extends tn{static{({c:[ti,te]}=i5(this,[X,tt],[],0,void 0,tn))}static{te()}}function sl(t,e,n){"symbol"==typeof e&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:n?n+" "+e:e})}catch(t){}return t}function sc(t,e,n,r,i,s){var o,a,l,c,u,h,d,f=Symbol.metadata||Symbol.for("Symbol.metadata"),p=Object.defineProperty,m=Object.create,g=[m(null),m(null)],y=e.length;function b(e,n,r){return function(i,s){n&&(s=i,i=t);for(var o=0;o<e.length;o++)s=e[o].apply(i,r?[s]:[]);return r?s:i}}function v(t,e,n,r){if("function"!=typeof t&&(r||void 0!==t))throw TypeError(e+" must "+(n||"be")+" a function"+(r?"":" or undefined"));return t}function w(t,e,n,r,i,s,o,a,l,c,u){function f(t){if(!u(t))throw TypeError("Attempted to access private element on non-instance")}var m=[].concat(e[0]),y=e[3],w=!o,S=1===i,_=3===i,$=4===i,E=2===i;function C(e,n,r){return function(i,s){return n&&(s=i,i=t),r&&r(i),desc[e].call(i,s)}}var T={},x=[],P=_?"get":$||S?"set":"value";if(!w&&(l?(c||S?T={get:sl(function(){return y(this)},r,"get"),set:function(t){e[4](this,t)}}:T[P]=y,c||sl(T[P],r,E?"":P)):c||(T=Object.getOwnPropertyDescriptor(t,r)),!c&&!l)){if((d=g[+a][r])&&(d^i)!=7)throw Error("Decorating two elements with the same name ("+T[P].name+") is not supported yet");g[+a][r]=i<3?1:i}for(var L=t,O=m.length-1;O>=0;O-=n?2:1){var j=v(m[O],"A decorator","be",!0),k=n?m[O-1]:void 0,N={},M={kind:["field","accessor","method","getter","setter","class"][i],name:r,metadata:h,addInitializer:(function(t,e){if(t.v)throw TypeError("attempted to call addInitializer after decoration was finished");v(e,"An initializer","be",!0),s.push(e)}).bind(null,N)};if(w){d=j.call(k,L,M),N.v=1,v(d,"class decorators","return")&&(L=d);continue}if(M.static=a,M.private=l,d=M.access={has:l?u.bind():function(t){return r in t}},$||(d.get=l?E?function(t){return f(t),T.value}:C("get",0,f):function(t){return t[r]}),E||_||(d.set=l?C("set",0,f):function(t,e){t[r]=e}),L=j.call(k,S?{get:T.get,set:T.set}:T[P],M),N.v=1,S){if("object"==typeof L&&L)(d=v(L.get,"accessor.get"))&&(T.get=d),(d=v(L.set,"accessor.set"))&&(T.set=d),(d=v(L.init,"accessor.init"))&&x.unshift(d);else if(void 0!==L)throw TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else v(L,(c?"field":"method")+" decorators","return")&&(c?x.unshift(L):T[P]=L)}return i<2&&o.push(b(x,a,1),b(s,a,0)),c||w||(l?S?o.splice(-1,0,C("get",a),C("set",a)):o.push(E?T[P]:v.call.bind(T[P])):p(t,r,T)),L}function S(t){return p(t,f,{configurable:!0,enumerable:!0,value:h})}return void 0!==s&&(h=s[f]),h=m(null==h?null:h),l=[],c=function(t){t&&l.push(b(t))},(u=function(e,r){for(var s=0;s<n.length;s++){var c=n[s],u=c[1],h=7&u;if((8&u)==e&&!h==r){var d=c[2],f=!!c[3],p=16&u;w(e?t:t.prototype,c,p,f?"#"+d:function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(d),h,h<2?[]:e?a=a||[]:o=o||[],l,!!e,f,r,e&&f?function(e){return function(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(null!==t?typeof t:"null"));return t}(e)===t}:i)}}})(8,0),u(0,0),u(8,1),u(0,1),c(o),c(a),d=l,y||S(t),{e:d,get c(){var _=[];return y&&[S(t=w(t,[e],r,t.name,5,_)),b(_,1)]}}}function su(t){return t}function sh(t){return!t.startsWith("/")}let sd=n1`
|
|
9
9
|
:host {
|
|
10
10
|
/* link default style */
|
|
11
11
|
cursor: pointer;
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
a:visited {
|
|
20
20
|
color: unset;
|
|
21
21
|
}
|
|
22
|
-
`;tr=ry(ij),ti=rg(i1),ts=rb(),to=rS({focusable:!0}),tl=nz,tc=ro(),tu=ra(),new class extends iX{constructor(){super(tF),ta()}static [class extends tl{static{({e:[tM,th,td,tf,tp,tm,tg,ty,tb,tv,tw,tS,t$,t_,tE,tC,tT,tx,tP,tO,tL,tk,tj,tN,tA,tR,tI,tH],c:[tF,ta]}=iZ(this,[tr,ti,ts,to],[[rd,8,"link"],[n5,0,"href"],[n5,0,"target"],[n5,0,"path"],[n5,0,"query"],[n5,0,"hash"],[n5,0,"hint"],[n9,0,"preload"],[re,0,"route"],[re,0,"options"],[re,0,"routeOptions"],[re,0,"prepare"],[tc,2,"init",function(){this.addEventListener("click",this.#Y),this.addEventListener("pointerenter",this.#Z)}],[tu,0,"content",function(t){return t.#a},function(t,e){t.#a=e}]],0,t=>#N in t,tl))}constructor(...t){super(...t),tI(this)}href=(tH(this),tf(this));target=(tp(this),tm(this));path=(tg(this),ty(this));query=(tb(this),tv(this));hash=(tw(this),tS(this));hint=(t$(this),t_(this));preload=(tE(this),tC(this));route=(tT(this),tx(this));options=(tP(this),tO(this));routeOptions=(tL(this),tk(this));prepare=(tj(this),tN(this));get #X(){return this.routeOptions||this.options}get #tt(){return this.hint||"on"}#Y=(tA(this),async t=>{t.preventDefault();let e=this._getLocationString();if(!e)return;if(i0(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}let{path:n,query:r,hash:i}=iL.getParams();if(n+r+i!==e)if(await this.prepare?.(),this.route)iL.pushIgnoreCloseHandle(iK(this.route,this.#X));else if(this.href){let t=new URL(e,location.origin);iL.pushIgnoreCloseHandle({path:t.pathname,query:t.search,hash:t.hash})}else iL.pushIgnoreCloseHandle({path:this.path,query:this.query,hash:this.hash})});#te=()=>{let t=this._getLocationString();return i0(t)?t:new URL(iL.basePath+t,location.origin).toString()};#Z=()=>{this.route?.content,this.route?.getContent?.({},this.shadowRoot)};get #N(){return tM}#a=tR(this,()=>{let t="off"===this.#tt?null:this.#te();return nb`<a part=${tF.link} href=${t} tabindex="-1"><slot></slot></a>`});_getLocationString(){if(this.route){let t=this.#X?.query||"",e=this.#X?.hash||"";return iG(this.route,this.#X)+t+e}{let t=this.href||this.path+this.query+this.hash,{path:e,query:n}=iL.getParams();return t.startsWith("#")?`${e}${n}${t}`:t.startsWith("?")?`${e}${t}`:t.startsWith(".")?e6(e,t):t}}}];link=(()=>{let t=th();return td(),t})()},tV=ry(iL.store),tz=tF,tW=rr();class i2 extends tz{static{({e:[tU,tq,tG,tK,tB,tJ],c:[tQ,tD]}=iZ(this,[tV],[[n5,0,"pattern"],[rc,0,"active"],[tW,0,"updateState",function(t){return t.#tn},function(t,e){t.#tn=e}]],0,t=>#tn in t,tz))}constructor(...t){super(...t),tJ(this)}pattern=tU(this);active=(tq(this),tG(this));#tn=(tK(this),tB(this,()=>{let{path:t,query:e,hash:n}=iL.getParams(),r=this.pattern&&iq(this.pattern,t);this.active=!!r||t+e+n===this._getLocationString()}));static{tD()}}function i3(t,e,n){"symbol"==typeof e&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:n?n+" "+e:e})}catch(t){}return t}customElements.define("gem-link",tF),customElements.define("gem-active-link",tQ);let i8="gem-reflect-end",i4=t=>new Comment(t);tY=rs(),tZ=rr(t=>[t.target]);class i7 extends nz{static{({e:[tX,t0,t1,t2,t3,t8,t4,t7]}=function(t,e,n,r){var i,s,o,a,l,c,u,h=Symbol.metadata||Symbol.for("Symbol.metadata"),d=Object.defineProperty,f=Object.create,p=[f(null),f(null)],m=e.length;function g(e,n,r){return function(i,s){n&&(s=i,i=t);for(var o=0;o<e.length;o++)s=e[o].apply(i,r?[s]:[]);return r?s:i}}function y(t,e,n,r){if("function"!=typeof t&&(r||void 0!==t))throw TypeError(e+" must "+(n||"be")+" a function"+(r?"":" or undefined"));return t}function b(t,e,n,r,i,s,o,a,l,h,f){function m(t){if(!f(t))throw TypeError("Attempted to access private element on non-instance")}var b=[].concat(e[0]),v=e[3],w=!o,S=1===i,$=3===i,_=4===i,E=2===i;function C(e,n,r){return function(i,s){return n&&(s=i,i=t),r&&r(i),desc[e].call(i,s)}}var T={},x=[],P=$?"get":_||S?"set":"value";if(!w&&(l?(h||S?T={get:i3(function(){return v(this)},r,"get"),set:function(t){e[4](this,t)}}:T[P]=v,h||i3(T[P],r,E?"":P)):h||(T=Object.getOwnPropertyDescriptor(t,r)),!h&&!l)){if((u=p[+a][r])&&(u^i)!=7)throw Error("Decorating two elements with the same name ("+T[P].name+") is not supported yet");p[+a][r]=i<3?1:i}for(var O=t,L=b.length-1;L>=0;L-=n?2:1){var k=y(b[L],"A decorator","be",!0),j=n?b[L-1]:void 0,N={},A={kind:["field","accessor","method","getter","setter","class"][i],name:r,metadata:c,addInitializer:(function(t,e){if(t.v)throw TypeError("attempted to call addInitializer after decoration was finished");y(e,"An initializer","be",!0),s.push(e)}).bind(null,N)};if(w){u=k.call(j,O,A),N.v=1,y(u,"class decorators","return")&&(O=u);continue}if(A.static=a,A.private=l,u=A.access={has:l?f.bind():function(t){return r in t}},_||(u.get=l?E?function(t){return m(t),T.value}:C("get",0,m):function(t){return t[r]}),E||$||(u.set=l?C("set",0,m):function(t,e){t[r]=e}),O=k.call(j,S?{get:T.get,set:T.set}:T[P],A),N.v=1,S){if("object"==typeof O&&O)(u=y(O.get,"accessor.get"))&&(T.get=u),(u=y(O.set,"accessor.set"))&&(T.set=u),(u=y(O.init,"accessor.init"))&&x.unshift(u);else if(void 0!==O)throw TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else y(O,(h?"field":"method")+" decorators","return")&&(h?x.unshift(O):T[P]=O)}return i<2&&o.push(g(x,a,1),g(s,a,0)),h||w||(l?S?o.splice(-1,0,C("get",a),C("set",a)):o.push(E?T[P]:y.call.bind(T[P])):d(t,r,T)),O}function v(t){return d(t,h,{configurable:!0,enumerable:!0,value:c})}return c=f(null==c?null:c),o=[],a=function(t){t&&o.push(g(t))},(l=function(e,a){for(var l=0;l<n.length;l++){var c=n[l],u=c[1],h=7&u;if((8&u)==e&&!h==a){var d=c[2],f=!!c[3],p=16&u;b(e?t:t.prototype,c,p,f?"#"+d:function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(d),h,h<2?[]:e?s=s||[]:i=i||[],o,!!e,f,a,e&&f?function(e){return function(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(null!==t?typeof t:"null"));return t}(e)===t}:r)}}})(8,0),l(0,0),l(8,1),l(0,1),a(i),a(s),u=o,m||v(t),{e:u,get c(){var w=[];return m&&[v(t=b(t,[e],0,t.name,5,w)),g(w,1)]}}}(this,[],[[n5,0,"method"],[re,0,"target"],[tY,0,"init",function(t){return t.#N},function(t,e){t.#N=e}],[tZ,0,"changeTarget",function(t){return t.#tr},function(t,e){t.#tr=e}]],t=>#N in t))}constructor(...t){super(...t),t7(this)}method=tX(this);target=(t0(this),t1(this,document.head));get #ti(){return this.method||"append"}#N=(t2(this),t3(this,()=>{this.hidden=!0}));#ts=(t8(this),i4("gem-reflect-start"));#to=i4(i8);#ta;#tr=t4(this,()=>((this.#ta||[this.#ts,...this.childNodes,this.#to]).forEach((t,e,n)=>{let r=n[e-1];r?r.after(t):this.target[this.#ti](t)}),()=>{this.#ta=(t=>{let e=[],n=t;for(;n&&(e.push(n),n.nodeValue!==i8);)n=n.nextSibling;return e})(this.#ts),this.#ta.forEach(t=>t.remove())}))}function i6(t,e,n){"symbol"==typeof e&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:n?n+" "+e:e})}catch(t){}return t}function i5(t){return t}customElements.define("gem-reflect",i7),customElements.define("gem-route",tn),customElements.define("gem-light-route",te);let i9=0,st=t=>{clearTimeout(i9),i9=setTimeout(()=>document.title=t)};function se(t,e,n){"symbol"==typeof e&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:n?n+" "+e:e})}catch(t){}return t}t6=rb(),t9=nz,et=rr(t=>[t.inert]),ee=ro(),en=ra(),new class extends i5{constructor(){super(em),t5()}static [class extends t9{static{({e:[er,ei,es,eo,ea,el,ec,eu,eh,ed,ef,ep],c:[em,t5]}=function(t,e,n,r,i){var s,o,a,l,c,u,h,d=Symbol.metadata||Symbol.for("Symbol.metadata"),f=Object.defineProperty,p=Object.create,m=[p(null),p(null)],g=e.length;function y(e,n,r){return function(i,s){n&&(s=i,i=t);for(var o=0;o<e.length;o++)s=e[o].apply(i,r?[s]:[]);return r?s:i}}function b(t,e,n,r){if("function"!=typeof t&&(r||void 0!==t))throw TypeError(e+" must "+(n||"be")+" a function"+(r?"":" or undefined"));return t}function v(t,e,n,r,i,s,o,a,l,c,d){function p(t){if(!d(t))throw TypeError("Attempted to access private element on non-instance")}var g=[].concat(e[0]),v=e[3],w=!o,S=1===i,$=3===i,_=4===i,E=2===i;function C(e,n,r){return function(i,s){return n&&(s=i,i=t),r&&r(i),desc[e].call(i,s)}}var T={},x=[],P=$?"get":_||S?"set":"value";if(!w&&(l?(c||S?T={get:i6(function(){return v(this)},r,"get"),set:function(t){e[4](this,t)}}:T[P]=v,c||i6(T[P],r,E?"":P)):c||(T=Object.getOwnPropertyDescriptor(t,r)),!c&&!l)){if((h=m[+a][r])&&(h^i)!=7)throw Error("Decorating two elements with the same name ("+T[P].name+") is not supported yet");m[+a][r]=i<3?1:i}for(var O=t,L=g.length-1;L>=0;L-=n?2:1){var k=b(g[L],"A decorator","be",!0),j=n?g[L-1]:void 0,N={},A={kind:["field","accessor","method","getter","setter","class"][i],name:r,metadata:u,addInitializer:(function(t,e){if(t.v)throw TypeError("attempted to call addInitializer after decoration was finished");b(e,"An initializer","be",!0),s.push(e)}).bind(null,N)};if(w){h=k.call(j,O,A),N.v=1,b(h,"class decorators","return")&&(O=h);continue}if(A.static=a,A.private=l,h=A.access={has:l?d.bind():function(t){return r in t}},_||(h.get=l?E?function(t){return p(t),T.value}:C("get",0,p):function(t){return t[r]}),E||$||(h.set=l?C("set",0,p):function(t,e){t[r]=e}),O=k.call(j,S?{get:T.get,set:T.set}:T[P],A),N.v=1,S){if("object"==typeof O&&O)(h=b(O.get,"accessor.get"))&&(T.get=h),(h=b(O.set,"accessor.set"))&&(T.set=h),(h=b(O.init,"accessor.init"))&&x.unshift(h);else if(void 0!==O)throw TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else b(O,(c?"field":"method")+" decorators","return")&&(c?x.unshift(O):T[P]=O)}return i<2&&o.push(y(x,a,1),y(s,a,0)),c||w||(l?S?o.splice(-1,0,C("get",a),C("set",a)):o.push(E?T[P]:b.call.bind(T[P])):f(t,r,T)),O}function w(t){return f(t,d,{configurable:!0,enumerable:!0,value:u})}return void 0!==i&&(u=i[d]),u=p(null==u?null:u),a=[],l=function(t){t&&a.push(y(t))},(c=function(e,i){for(var l=0;l<n.length;l++){var c=n[l],u=c[1],h=7&u;if((8&u)==e&&!h==i){var d=c[2],f=!!c[3],p=16&u;v(e?t:t.prototype,c,p,f?"#"+d:function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(d),h,h<2?[]:e?o=o||[]:s=s||[],a,!!e,f,i,e&&f?function(e){return function(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(null!==t?typeof t:"null"));return t}(e)===t}:r)}}})(8,0),c(0,0),c(8,1),c(0,1),l(s),l(o),h=a,g||w(t),{e:h,get c(){var S=[];return g&&[w(t=v(t,[e],0,t.name,5,S)),y(S,1)]}}}(this,[t6],[[n5,0,"prefix"],[n5,0,"suffix"],[n9,0,"inert"],[et,0,"connectStore",function(t){return t.#D},function(t,e){t.#D=e}],[ee,0,"obTextContent",function(t){return t.#tl},function(t,e){t.#tl=e}],[en,0,"content",function(t){return t.#a},function(t,e){t.#a=e}]],t=>#D in t,t9))}constructor(...t){super(...t),ep(this)}prefix=er(this);suffix=(ei(this),es(this));inert=(eo(this),ea(this));static setTitle(t){ik({title:t})}#D=(el(this),ec(this,()=>!this.inert&&ny(ik,this.update)));#tc=(eu(this),new MutationObserver(()=>this.update()));#tl=eh(this,()=>{this.#tc.observe(this,{characterData:!0,childList:!0,subtree:!0})});#a=(ed(this),ef(this,()=>(!function(t,e="",n=""){let r=ik.title||t;r&&r!==ik.defaultTitle?st(e+(em.title=r)+n):st(em.title=ik.defaultTitle)}(this.textContent?.trim(),this.prefix,this.suffix),nb`${em.title}`)))}];title=document.title},customElements.define("gem-title",em);let sn=nM`
|
|
22
|
+
`;ts=rI(iX),to=rR(sd),ta=rH(),tl=rz({focusable:!0}),tu=n6,th=rT(),td=rx(),new class extends su{constructor(){super(tZ),tc()}static [class extends tu{static{({e:[tI,tf,tp,tm,tg,ty,tb,tv,tw,tS,t_,t$,tE,tC,tT,tx,tP,tL,tO,tj,tk,tN,tM,tA,tR,tH,tD,tV],c:[tZ,tc]}=sc(this,[ts,to,ta,tl],[[rk,8,"link"],[rb,0,"href"],[rb,0,"target"],[rb,0,"path"],[rb,0,"query"],[rb,0,"hash"],[rb,0,"hint"],[rv,0,"preload"],[rS,0,"route"],[rS,0,"options"],[rS,0,"routeOptions"],[rS,0,"prepare"],[th,2,"init",function(){this.addEventListener("click",this.#Z),this.addEventListener("pointerenter",this.#Q)}],[td,0,"content",function(t){return t.#a},function(t,e){t.#a=e}]],0,t=>#N in t,tu))}constructor(...t){super(...t),tD(this)}href=(tV(this),tm(this));target=(tg(this),ty(this));path=(tb(this),tv(this));query=(tw(this),tS(this));hash=(t_(this),t$(this));hint=(tE(this),tC(this));preload=(tT(this),tx(this));route=(tP(this),tL(this));options=(tO(this),tj(this));routeOptions=(tk(this),tN(this));prepare=(tM(this),tA(this));get #X(){return this.routeOptions||this.options}get #tt(){return this.hint||"on"}#Z=(tR(this),async t=>{t.preventDefault();let e=this._getLocationString();if(!e)return;if(sh(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}let{path:n,query:r,hash:i}=iZ.getParams();if(n+r+i!==e)if(await this.prepare?.(),this.route)iZ.pushIgnoreCloseHandle(sr(this.route,this.#X));else if(this.href){let t=new URL(e,location.origin);iZ.pushIgnoreCloseHandle({path:t.pathname,query:t.search,hash:t.hash})}else iZ.pushIgnoreCloseHandle({path:this.path,query:this.query,hash:this.hash})});#te=()=>{let t=this._getLocationString();if(sh(t))return t;let e=new URL(iZ.basePath+t,location.origin);return e9?e.pathname+e.search+e.hash:e.toString()};#Q=()=>{this.route?.content,this.route?.getContent?.({},this.shadowRoot)};get #N(){return tI}#a=tH(this,()=>{let t="off"===this.#tt?null:this.#te();return nH`<a part=${tZ.link} href=${t} tabindex="-1"><slot></slot></a>`});_getLocationString(){if(this.route){let t=this.#X?.query||"",e=this.#X?.hash||"";return sn(this.route,this.#X)+t+e}{let t=this.href||this.path+this.query+this.hash,{path:e,query:n}=iZ.getParams();return t.startsWith("#")?`${e}${n}${t}`:t.startsWith("?")?`${e}${t}`:t.startsWith(".")?nf(e,t):t}}}];link=(()=>{let t=tf();return tp(),t})()},tz=rI(iZ.store),tU=tZ,tG=r$();class sf extends tU{static{({e:[tq,tK,tB,tJ,tF,tY],c:[tQ,tW]}=sc(this,[tz],[[rb,0,"pattern"],[rL,0,"active"],[tG,0,"updateState",function(t){return t.#tn},function(t,e){t.#tn=e}]],0,t=>#tn in t,tU))}constructor(...t){super(...t),tY(this)}pattern=tq(this);active=(tK(this),tB(this));#tn=(tJ(this),tF(this,()=>{let{path:t,query:e,hash:n}=iZ.getParams(),r=this.pattern&&se(this.pattern,t);this.active=!!r||t+e+n===this._getLocationString()}));static{tW()}}function sp(t,e,n){"symbol"==typeof e&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:n?n+" "+e:e})}catch(t){}return t}customElements.define("gem-link",tZ),customElements.define("gem-active-link",tQ);let sm="gem-reflect-end",sg=t=>new Comment(t);tX=rC(),t0=r$(t=>[t.target]);class sy extends n6{static{({e:[t1,t2,t3,t8,t4,t7,t6,t5]}=function(t,e,n,r){var i,s,o,a,l,c,u,h=Symbol.metadata||Symbol.for("Symbol.metadata"),d=Object.defineProperty,f=Object.create,p=[f(null),f(null)],m=e.length;function g(e,n,r){return function(i,s){n&&(s=i,i=t);for(var o=0;o<e.length;o++)s=e[o].apply(i,r?[s]:[]);return r?s:i}}function y(t,e,n,r){if("function"!=typeof t&&(r||void 0!==t))throw TypeError(e+" must "+(n||"be")+" a function"+(r?"":" or undefined"));return t}function b(t,e,n,r,i,s,o,a,l,h,f){function m(t){if(!f(t))throw TypeError("Attempted to access private element on non-instance")}var b=[].concat(e[0]),v=e[3],w=!o,S=1===i,_=3===i,$=4===i,E=2===i;function C(e,n,r){return function(i,s){return n&&(s=i,i=t),r&&r(i),desc[e].call(i,s)}}var T={},x=[],P=_?"get":$||S?"set":"value";if(!w&&(l?(h||S?T={get:sp(function(){return v(this)},r,"get"),set:function(t){e[4](this,t)}}:T[P]=v,h||sp(T[P],r,E?"":P)):h||(T=Object.getOwnPropertyDescriptor(t,r)),!h&&!l)){if((u=p[+a][r])&&(u^i)!=7)throw Error("Decorating two elements with the same name ("+T[P].name+") is not supported yet");p[+a][r]=i<3?1:i}for(var L=t,O=b.length-1;O>=0;O-=n?2:1){var j=y(b[O],"A decorator","be",!0),k=n?b[O-1]:void 0,N={},M={kind:["field","accessor","method","getter","setter","class"][i],name:r,metadata:c,addInitializer:(function(t,e){if(t.v)throw TypeError("attempted to call addInitializer after decoration was finished");y(e,"An initializer","be",!0),s.push(e)}).bind(null,N)};if(w){u=j.call(k,L,M),N.v=1,y(u,"class decorators","return")&&(L=u);continue}if(M.static=a,M.private=l,u=M.access={has:l?f.bind():function(t){return r in t}},$||(u.get=l?E?function(t){return m(t),T.value}:C("get",0,m):function(t){return t[r]}),E||_||(u.set=l?C("set",0,m):function(t,e){t[r]=e}),L=j.call(k,S?{get:T.get,set:T.set}:T[P],M),N.v=1,S){if("object"==typeof L&&L)(u=y(L.get,"accessor.get"))&&(T.get=u),(u=y(L.set,"accessor.set"))&&(T.set=u),(u=y(L.init,"accessor.init"))&&x.unshift(u);else if(void 0!==L)throw TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else y(L,(h?"field":"method")+" decorators","return")&&(h?x.unshift(L):T[P]=L)}return i<2&&o.push(g(x,a,1),g(s,a,0)),h||w||(l?S?o.splice(-1,0,C("get",a),C("set",a)):o.push(E?T[P]:y.call.bind(T[P])):d(t,r,T)),L}function v(t){return d(t,h,{configurable:!0,enumerable:!0,value:c})}return c=f(null==c?null:c),o=[],a=function(t){t&&o.push(g(t))},(l=function(e,a){for(var l=0;l<n.length;l++){var c=n[l],u=c[1],h=7&u;if((8&u)==e&&!h==a){var d=c[2],f=!!c[3],p=16&u;b(e?t:t.prototype,c,p,f?"#"+d:function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(d),h,h<2?[]:e?s=s||[]:i=i||[],o,!!e,f,a,e&&f?function(e){return function(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(null!==t?typeof t:"null"));return t}(e)===t}:r)}}})(8,0),l(0,0),l(8,1),l(0,1),a(i),a(s),u=o,m||v(t),{e:u,get c(){var w=[];return m&&[v(t=b(t,[e],0,t.name,5,w)),g(w,1)]}}}(this,[],[[rb,0,"method"],[rS,0,"target"],[tX,0,"init",function(t){return t.#N},function(t,e){t.#N=e}],[t0,0,"changeTarget",function(t){return t.#tr},function(t,e){t.#tr=e}]],t=>#N in t))}constructor(...t){super(...t),t5(this)}method=t1(this);target=(t2(this),t3(this,document.head));get #ti(){return this.method||"append"}#N=(t8(this),t4(this,()=>{this.hidden=!0}));#ts=(t7(this),sg("gem-reflect-start"));#to=sg(sm);#ta;#tr=t6(this,()=>((this.#ta||[this.#ts,...this.childNodes,this.#to]).forEach((t,e,n)=>{let r=n[e-1];r?r.after(t):this.target[this.#ti](t)}),()=>{this.#ta=(t=>{let e=[],n=t;for(;n&&(e.push(n),n.nodeValue!==sm);)n=n.nextSibling;return e})(this.#ts),this.#ta.forEach(t=>t.remove())}))}function sb(t,e,n){"symbol"==typeof e&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:n?n+" "+e:e})}catch(t){}return t}function sv(t){return t}customElements.define("gem-reflect",sy),customElements.define("gem-route",ti),customElements.define("gem-light-route",tr);let sw=0,sS=t=>{clearTimeout(sw),sw=setTimeout(()=>document.title=t)};function s_(t,e,n){"symbol"==typeof e&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:n?n+" "+e:e})}catch(t){}return t}t9=rH(),ee=n6,en=r$(t=>[t.inert]),er=rT(),ei=rx(),new class extends sv{constructor(){super(ey),et()}static [class extends ee{static{({e:[es,eo,ea,el,ec,eu,eh,ed,ef,ep,em,eg],c:[ey,et]}=function(t,e,n,r,i){var s,o,a,l,c,u,h,d=Symbol.metadata||Symbol.for("Symbol.metadata"),f=Object.defineProperty,p=Object.create,m=[p(null),p(null)],g=e.length;function y(e,n,r){return function(i,s){n&&(s=i,i=t);for(var o=0;o<e.length;o++)s=e[o].apply(i,r?[s]:[]);return r?s:i}}function b(t,e,n,r){if("function"!=typeof t&&(r||void 0!==t))throw TypeError(e+" must "+(n||"be")+" a function"+(r?"":" or undefined"));return t}function v(t,e,n,r,i,s,o,a,l,c,d){function p(t){if(!d(t))throw TypeError("Attempted to access private element on non-instance")}var g=[].concat(e[0]),v=e[3],w=!o,S=1===i,_=3===i,$=4===i,E=2===i;function C(e,n,r){return function(i,s){return n&&(s=i,i=t),r&&r(i),desc[e].call(i,s)}}var T={},x=[],P=_?"get":$||S?"set":"value";if(!w&&(l?(c||S?T={get:sb(function(){return v(this)},r,"get"),set:function(t){e[4](this,t)}}:T[P]=v,c||sb(T[P],r,E?"":P)):c||(T=Object.getOwnPropertyDescriptor(t,r)),!c&&!l)){if((h=m[+a][r])&&(h^i)!=7)throw Error("Decorating two elements with the same name ("+T[P].name+") is not supported yet");m[+a][r]=i<3?1:i}for(var L=t,O=g.length-1;O>=0;O-=n?2:1){var j=b(g[O],"A decorator","be",!0),k=n?g[O-1]:void 0,N={},M={kind:["field","accessor","method","getter","setter","class"][i],name:r,metadata:u,addInitializer:(function(t,e){if(t.v)throw TypeError("attempted to call addInitializer after decoration was finished");b(e,"An initializer","be",!0),s.push(e)}).bind(null,N)};if(w){h=j.call(k,L,M),N.v=1,b(h,"class decorators","return")&&(L=h);continue}if(M.static=a,M.private=l,h=M.access={has:l?d.bind():function(t){return r in t}},$||(h.get=l?E?function(t){return p(t),T.value}:C("get",0,p):function(t){return t[r]}),E||_||(h.set=l?C("set",0,p):function(t,e){t[r]=e}),L=j.call(k,S?{get:T.get,set:T.set}:T[P],M),N.v=1,S){if("object"==typeof L&&L)(h=b(L.get,"accessor.get"))&&(T.get=h),(h=b(L.set,"accessor.set"))&&(T.set=h),(h=b(L.init,"accessor.init"))&&x.unshift(h);else if(void 0!==L)throw TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else b(L,(c?"field":"method")+" decorators","return")&&(c?x.unshift(L):T[P]=L)}return i<2&&o.push(y(x,a,1),y(s,a,0)),c||w||(l?S?o.splice(-1,0,C("get",a),C("set",a)):o.push(E?T[P]:b.call.bind(T[P])):f(t,r,T)),L}function w(t){return f(t,d,{configurable:!0,enumerable:!0,value:u})}return void 0!==i&&(u=i[d]),u=p(null==u?null:u),a=[],l=function(t){t&&a.push(y(t))},(c=function(e,i){for(var l=0;l<n.length;l++){var c=n[l],u=c[1],h=7&u;if((8&u)==e&&!h==i){var d=c[2],f=!!c[3],p=16&u;v(e?t:t.prototype,c,p,f?"#"+d:function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(d),h,h<2?[]:e?o=o||[]:s=s||[],a,!!e,f,i,e&&f?function(e){return function(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(null!==t?typeof t:"null"));return t}(e)===t}:r)}}})(8,0),c(0,0),c(8,1),c(0,1),l(s),l(o),h=a,g||w(t),{e:h,get c(){var S=[];return g&&[w(t=v(t,[e],0,t.name,5,S)),y(S,1)]}}}(this,[t9],[[rb,0,"prefix"],[rb,0,"suffix"],[rv,0,"inert"],[en,0,"connectStore",function(t){return t.#V},function(t,e){t.#V=e}],[er,0,"obTextContent",function(t){return t.#tl},function(t,e){t.#tl=e}],[ei,0,"content",function(t){return t.#a},function(t,e){t.#a=e}]],t=>#V in t,ee))}constructor(...t){super(...t),eg(this)}prefix=es(this);suffix=(eo(this),ea(this));inert=(el(this),ec(this));static setTitle(t){iQ({title:t})}#V=(eu(this),eh(this,()=>!this.inert&&nI(iQ,this.update)));#tc=(ed(this),new MutationObserver(()=>this.update()));#tl=ef(this,()=>{this.#tc.observe(this,{characterData:!0,childList:!0,subtree:!0})});#a=(ep(this),em(this,()=>(!function(t,e="",n=""){let r=iQ.title||t;r&&r!==iQ.defaultTitle?sS(e+(ey.title=r)+n):sS(ey.title=iQ.defaultTitle)}(this.textContent?.trim(),this.prefix,this.suffix),nH`${ey.title}`)))}];title=document.title},customElements.define("gem-title",ey);let s$=n1`
|
|
23
23
|
:host(:where(:not([hidden]))) {
|
|
24
24
|
display: contents;
|
|
25
25
|
}
|
|
26
|
-
`;
|
|
26
|
+
`;eb=rH(),ev=rR(s$),eS=n6,e_=r$(),e$=rx();class sE extends eS{static{({e:[eE,eC,eT,ex,eP,eL,eO,ej],c:[ek,ew]}=function(t,e,n,r,i){var s,o,a,l,c,u,h,d=Symbol.metadata||Symbol.for("Symbol.metadata"),f=Object.defineProperty,p=Object.create,m=[p(null),p(null)],g=e.length;function y(e,n,r){return function(i,s){n&&(s=i,i=t);for(var o=0;o<e.length;o++)s=e[o].apply(i,r?[s]:[]);return r?s:i}}function b(t,e,n,r){if("function"!=typeof t&&(r||void 0!==t))throw TypeError(e+" must "+(n||"be")+" a function"+(r?"":" or undefined"));return t}function v(t,e,n,r,i,s,o,a,l,c,d){function p(t){if(!d(t))throw TypeError("Attempted to access private element on non-instance")}var g=[].concat(e[0]),v=e[3],w=!o,S=1===i,_=3===i,$=4===i,E=2===i;function C(e,n,r){return function(i,s){return n&&(s=i,i=t),r&&r(i),desc[e].call(i,s)}}var T={},x=[],P=_?"get":$||S?"set":"value";if(!w&&(l?(c||S?T={get:s_(function(){return v(this)},r,"get"),set:function(t){e[4](this,t)}}:T[P]=v,c||s_(T[P],r,E?"":P)):c||(T=Object.getOwnPropertyDescriptor(t,r)),!c&&!l)){if((h=m[+a][r])&&(h^i)!=7)throw Error("Decorating two elements with the same name ("+T[P].name+") is not supported yet");m[+a][r]=i<3?1:i}for(var L=t,O=g.length-1;O>=0;O-=n?2:1){var j=b(g[O],"A decorator","be",!0),k=n?g[O-1]:void 0,N={},M={kind:["field","accessor","method","getter","setter","class"][i],name:r,metadata:u,addInitializer:(function(t,e){if(t.v)throw TypeError("attempted to call addInitializer after decoration was finished");b(e,"An initializer","be",!0),s.push(e)}).bind(null,N)};if(w){h=j.call(k,L,M),N.v=1,b(h,"class decorators","return")&&(L=h);continue}if(M.static=a,M.private=l,h=M.access={has:l?d.bind():function(t){return r in t}},$||(h.get=l?E?function(t){return p(t),T.value}:C("get",0,p):function(t){return t[r]}),E||_||(h.set=l?C("set",0,p):function(t,e){t[r]=e}),L=j.call(k,S?{get:T.get,set:T.set}:T[P],M),N.v=1,S){if("object"==typeof L&&L)(h=b(L.get,"accessor.get"))&&(T.get=h),(h=b(L.set,"accessor.set"))&&(T.set=h),(h=b(L.init,"accessor.init"))&&x.unshift(h);else if(void 0!==L)throw TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else b(L,(c?"field":"method")+" decorators","return")&&(c?x.unshift(L):T[P]=L)}return i<2&&o.push(y(x,a,1),y(s,a,0)),c||w||(l?S?o.splice(-1,0,C("get",a),C("set",a)):o.push(E?T[P]:b.call.bind(T[P])):f(t,r,T)),L}function w(t){return f(t,d,{configurable:!0,enumerable:!0,value:u})}return void 0!==i&&(u=i[d]),u=p(null==u?null:u),a=[],l=function(t){t&&a.push(y(t))},(c=function(e,i){for(var l=0;l<n.length;l++){var c=n[l],u=c[1],h=7&u;if((8&u)==e&&!h==i){var d=c[2],f=!!c[3],p=16&u;v(e?t:t.prototype,c,p,f?"#"+d:function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(d),h,h<2?[]:e?o=o||[]:s=s||[],a,!!e,f,i,e&&f?function(e){return function(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(null!==t?typeof t:"null"));return t}(e)===t}:r)}}})(8,0),c(0,0),c(8,1),c(0,1),l(s),l(o),h=a,g||w(t),{e:h,get c(){var S=[];return g&&[w(t=v(t,[e],0,t.name,5,S)),y(S,1)]}}}(this,[eb,ev],[[rb,0,"html"],[rS,0,"styles"],[e_,0,"adoptStyles",function(t){return t.#tu},function(t,e){t.#tu=e}],[e$,0,"content",function(t){return t.#a},function(t,e){t.#a=e}]],t=>#tu in t,eS))}constructor(...t){super(...t),ej(this)}html=eE(this);styles=(eC(this),eT(this));get #th(){if(!this.styles)return[];if("string"!=typeof this.styles)return[this.styles].flat().map(t=>t[nB].getStyle());{let t=new CSSStyleSheet;return t.replaceSync(this.styles),[t]}}#tu=(ex(this),eP(this,()=>{let t=this.shadowRoot.adoptedStyleSheets;return this.shadowRoot.adoptedStyleSheets=t.concat(this.#th),()=>{this.shadowRoot.adoptedStyleSheets=t}}));#a=(eL(this),eO(this,()=>{this.shadowRoot.innerHTML=this.html}));static{ew()}}function sC(t,e,n){"symbol"==typeof e&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:n?n+" "+e:e})}catch(t){}return t}customElements.define("gem-unsafe",ek);let sT=n1`
|
|
27
27
|
:host(:where(:not([hidden]))) {
|
|
28
28
|
position: relative;
|
|
29
29
|
display: inline-flex;
|
|
@@ -33,4 +33,4 @@
|
|
|
33
33
|
width: 100%;
|
|
34
34
|
height: 100%;
|
|
35
35
|
}
|
|
36
|
-
`,so=new Map;ek=rb(),ej=rg(ss),eA=nz,eM=ra();class sa extends eA{static{({e:[eR,eI,eH,eV,eD,ez,eW,eU,eq,eG],c:[eK,eN]}=function(t,e,n,r,i){var s,o,a,l,c,u,h,d=Symbol.metadata||Symbol.for("Symbol.metadata"),f=Object.defineProperty,p=Object.create,m=[p(null),p(null)],g=e.length;function y(e,n,r){return function(i,s){n&&(s=i,i=t);for(var o=0;o<e.length;o++)s=e[o].apply(i,r?[s]:[]);return r?s:i}}function b(t,e,n,r){if("function"!=typeof t&&(r||void 0!==t))throw TypeError(e+" must "+(n||"be")+" a function"+(r?"":" or undefined"));return t}function v(t,e,n,r,i,s,o,a,l,c,d){function p(t){if(!d(t))throw TypeError("Attempted to access private element on non-instance")}var g=[].concat(e[0]),v=e[3],w=!o,S=1===i,$=3===i,_=4===i,E=2===i;function C(e,n,r){return function(i,s){return n&&(s=i,i=t),r&&r(i),desc[e].call(i,s)}}var T={},x=[],P=$?"get":_||S?"set":"value";if(!w&&(l?(c||S?T={get:si(function(){return v(this)},r,"get"),set:function(t){e[4](this,t)}}:T[P]=v,c||si(T[P],r,E?"":P)):c||(T=Object.getOwnPropertyDescriptor(t,r)),!c&&!l)){if((h=m[+a][r])&&(h^i)!=7)throw Error("Decorating two elements with the same name ("+T[P].name+") is not supported yet");m[+a][r]=i<3?1:i}for(var O=t,L=g.length-1;L>=0;L-=n?2:1){var k=b(g[L],"A decorator","be",!0),j=n?g[L-1]:void 0,N={},A={kind:["field","accessor","method","getter","setter","class"][i],name:r,metadata:u,addInitializer:(function(t,e){if(t.v)throw TypeError("attempted to call addInitializer after decoration was finished");b(e,"An initializer","be",!0),s.push(e)}).bind(null,N)};if(w){h=k.call(j,O,A),N.v=1,b(h,"class decorators","return")&&(O=h);continue}if(A.static=a,A.private=l,h=A.access={has:l?d.bind():function(t){return r in t}},_||(h.get=l?E?function(t){return p(t),T.value}:C("get",0,p):function(t){return t[r]}),E||$||(h.set=l?C("set",0,p):function(t,e){t[r]=e}),O=k.call(j,S?{get:T.get,set:T.set}:T[P],A),N.v=1,S){if("object"==typeof O&&O)(h=b(O.get,"accessor.get"))&&(T.get=h),(h=b(O.set,"accessor.set"))&&(T.set=h),(h=b(O.init,"accessor.init"))&&x.unshift(h);else if(void 0!==O)throw TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else b(O,(c?"field":"method")+" decorators","return")&&(c?x.unshift(O):T[P]=O)}return i<2&&o.push(y(x,a,1),y(s,a,0)),c||w||(l?S?o.splice(-1,0,C("get",a),C("set",a)):o.push(E?T[P]:b.call.bind(T[P])):f(t,r,T)),O}function w(t){return f(t,d,{configurable:!0,enumerable:!0,value:u})}return void 0!==i&&(u=i[d]),u=p(null==u?null:u),a=[],l=function(t){t&&a.push(y(t))},(c=function(e,i){for(var l=0;l<n.length;l++){var c=n[l],u=c[1],h=7&u;if((8&u)==e&&!h==i){var d=c[2],f=!!c[3],p=16&u;v(e?t:t.prototype,c,p,f?"#"+d:function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(d),h,h<2?[]:e?o=o||[]:s=s||[],a,!!e,f,i,e&&f?function(e){return function(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(null!==t?typeof t:"null"));return t}(e)===t}:r)}}})(8,0),c(0,0),c(8,1),c(0,1),l(s),l(o),h=a,g||w(t),{e:h,get c(){var S=[];return g&&[w(t=v(t,[e],0,t.name,5,S)),y(S,1)]}}}(this,[ek,ej],[[n5,0,"selector"],[re,0,"root"],[re,0,"element"],[rc,0,"active"],[eM,0,"content",function(t){return t.#a},function(t,e){t.#a=e}]],t=>#a in t,eA))}constructor(...t){super(...t),eG(this)}selector=eR(this);root=(eI(this),eH(this));element=(eV(this),eD(this));active=(ez(this),eW(this));#td=(eU(this),()=>{let t=this.element||(this.selector?(this.root||document).querySelector(this.selector):null);if("string"==typeof t){let e=so.get(t);return e||((e=document.createElement("template")).innerHTML=t,so.set(t,e)),e.content.cloneNode(!0)}return t instanceof HTMLTemplateElement?t.content.cloneNode(!0):t?.cloneNode(!0)});#a=eq(this,()=>nb`${this.#td()}<slot></slot>`);static{eN()}}customElements.define("gem-use",eK);class sl{#tf;get #tp(){return`[${this.#tf}]`}constructor(t){this.#tf=t}info=(...t)=>{console.log(this.#tp,...t)};warn=(...t)=>{console.warn(this.#tp,...t)};error=(...t)=>{console.error(this.#tp,...t)}}let sc=new sl("GEM"),su=/\$\d(?:<[^>]*>)?/,sh=/\$(\d)(<([^>]*)>)?/g;function sd(t,...e){let n,r=t.split(su),i=[];for(;n=sh.exec(t);){let t=n[3],r=e[Number(n[1])-1];i.push("function"==typeof r?r(t):r)}return nb(r,...i)}let sf=new Set;class sp{resources;fallbackLanguage;currentLanguage;cache;cachePrefix="gem-i18n";urlParamsType;urlParamsName;onChange;replace=({path:t})=>this.setLanguage(t);getParams=()=>({path:this.currentLanguage});get #tm(){return`${this.cachePrefix}:current`}get #tg(){let{hostname:t,pathname:e,search:n}=location,r=t.split(".");switch(this.urlParamsType){case"ccTLD":return r.pop();case"gTLD":return r.shift();case"path":return e.split("/")[1];default:{let t=this.urlParamsName&&new URLSearchParams(n).get(this.urlParamsName)||"";return t in this.resources?t:""}}}get #ty(){return this.cache&&localStorage.getItem(this.#tm)||""}get #tb(){return!sf.has(this)}set #tv(t){this.#tb&&(document.documentElement.lang=t),this.currentLanguage=t,this.onChange?.(t)}#tw=!0;constructor(t){if(!t.resources[t.fallbackLanguage])throw new nl("i18n: fallbackLanguage invalid");Object.assign(this,t);let e=this.#tg||this.currentLanguage||this.#ty;const n=document.querySelector(`[type*=${this.cachePrefix}]`);if(n)try{const t=JSON.parse(n.textContent||"");e=t.currentLanguage,this.resources[t.currentLanguage]=t.currentLanguagePack}catch{}e?(this.#tv=e,this.setLanguage(e)):this.resetLanguage(),this.#tw=!1}get(t,...e){let n=this.resources[this.currentLanguage],r=this.resources[this.fallbackLanguage],i=n[t]||r[t],s=i?.message||i||`[${t}]`;return e.length?sd(s,...e):s}detectLanguage(){let t=Object.keys(this.resources);for(let e of navigator.languages.map(t=>t.replace(/-(.*)/,t=>t.toUpperCase()))){let n=t.find(t=>t===e||e.startsWith(`${t}-`));if(n)return n}return this.fallbackLanguage}async setLanguage(t){let e;this.#tb&&sf.forEach(async e=>await e.setLanguage(t));let n=this.resources[t];if(!n)return sc.warn(`${this.cachePrefix}: not found \`${t}\``),this.resetLanguage();if("string"==typeof n){let t=`${this.cachePrefix}:`,r=`${t}${n}`,i=localStorage.getItem(r),s=async()=>{let e=await (await fetch(n)).json();if(this.cache){for(let e=0;e<localStorage.length;e++){let n=localStorage.key(e);n.startsWith(t)&&localStorage.removeItem(n)}localStorage.setItem(r,JSON.stringify(e))}return e};if(i)try{e=JSON.parse(i)}catch{e=await s()}else e=await s()}else e=n;if(this.resources[t]=e,!this.#tw){let t=[document.documentElement];for(;t.length;){let e=t.pop();e[nP]?.(),t.push(...[...e.children,...e.shadowRoot?.children||[]].reverse())}}return t!==this.currentLanguage&&(this.#tv=t),!0===this.cache&&this.setCache(),t}resetLanguage(){return this.#tb&&sf.forEach(t=>t.resetLanguage()),this.#tv=this.fallbackLanguage,this.cache&&localStorage.removeItem(this.#tm),this.setLanguage(this.detectLanguage())}setCache(){this.#tb&&sf.forEach(t=>t.setCache()),localStorage.setItem(this.#tm,this.currentLanguage)}createSubModule(t,e){let n=new sp({resources:e,cachePrefix:`${this.cachePrefix}-${t}`,currentLanguage:this.currentLanguage,fallbackLanguage:this.fallbackLanguage,cache:this.cache});return sf.add(n),n}toJSON(){return{currentLanguage:this.currentLanguage,currentLanguagePack:this.resources[this.currentLanguage]}}}let sm={PRINT:"print",get isPrint(){return matchMedia(this.PRINT).matches},HOVER:"(hover: hover)",get isHover(){return matchMedia(this.HOVER).matches},PWA:"(display-mode: standalone)",get isPWA(){return matchMedia(this.PWA).matches},MOTION_REDUCE:"(prefers-reduced-motion: reduce)",get isMotionReduce(){return matchMedia(this.MOTION_REDUCE).matches},DATA_REDUCE:"(prefers-reduced-data: reduce)",get isDataReduce(){return matchMedia(this.DATA_REDUCE).matches},WATCH:"(width < 320px)",get isWatch(){return matchMedia(this.WATCH).matches},SMALL_PHONE:"(320px <= width <= 480px) and (height <= 640px)",get isSmallPhone(){return matchMedia(this.SMALL_PHONE).matches},PHONE:"(320px <= width <= 480px)",get isPhone(){return matchMedia(this.PHONE).matches},PHONE_LANDSCAPE:"(480px < width < 960px) and (orientation: landscape)",get isPhoneLandscape(){return matchMedia(this.PHONE_LANDSCAPE).matches},SHORT:"(width >= 480px) and (height <= 320px)",get isShort(){return matchMedia(this.SHORT).matches},TABLET:"(480px < width <= 1280px)",get isTablet(){return matchMedia(this.TABLET).matches},DESKTOP:"(width > 1280px) and (orientation: landscape)",get isDesktop(){return matchMedia(this.DESKTOP).matches},WIDTHSCREEN:"(width >= 1920px) and (orientation: landscape)",get isWidthScreen(){return matchMedia(this.WIDTHSCREEN).matches}},sg=Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)).constructor;function sy(t={}){let{origin:e=location.origin,base:n="",appendHeaders:r=()=>({}),transformInput:i=t=>t,transformOutput:s=t=>t,...o}=t,a=t=>t instanceof FormData||t instanceof Blob||t instanceof sg||t instanceof URLSearchParams||t instanceof ReadableStream||t instanceof ArrayBuffer?t:"object"==typeof t?JSON.stringify(t):t,l=(t,r)=>{if(new URL(t,location.origin).pathname!==t)throw new nl("`path` format is incorrect");let i=new URLSearchParams(r).toString();return`${e}${n}${t}${i?"?":""}${i}`},c=t=>t?t instanceof Headers?Object.fromEntries(t):Object.fromEntries((Array.isArray(t)?t:Object.entries(t)).map(([t,e])=>[t.toLowerCase(),e])):{},u=async(t,e={})=>{let n=new Request(t,{...o,...e,headers:new Headers({"content-type":"application/json",...c(o.headers),...c(e.headers)})}),r=await fetch(n);if(204===r.status)return;if(0===r.status)throw Error("Request fail");if(r.status>=500)throw Error(r.statusText);let i=n.headers.get("content-type"),a=r.status>=400;try{let t;if(t=i.includes("json")?await r.json():i.includes("octet-stream")?await r.arrayBuffer():await r.text(),a)throw Error(r.statusText,{cause:t});return await s(t,n)}catch{throw Error("Parse error")}};return{request:u,async get(t,e){let n=await i(e);return u(l(t,n),{method:"GET",headers:await r(n)})},async del(t,e){let n=await i(e);return u(l(t,n),{method:"DELETE",headers:await r(n)})},async put(t,e){let n=await i(e);return u(l(t),{method:"PUT",headers:await r(n),body:a(n)})},async post(t,e){let n=await i(e);return u(l(t),{method:"POST",headers:await r(n),body:a(n)})}}}let{request:sb,del:sv,get:sw,post:sS,put:s$}=sy(),s_=new WeakMap,sE=new WeakMap;function sC(t){return s_.get(t)}function sT(t){return sE.get(t)}function sx(t,e={}){let n=ni(),r=nM({})[nx],i=ng(t),s=()=>{Object.keys(i).forEach(t=>{e[t]||(e[t]=`--${ns(t)}-${n}`,o[t]=`var(${e[t]})`)})},o=new Proxy(e7({[nx]:r},t=>{i(t),s()}),{get(t,e){if(!t[e]){let[n,r,i]=e.match(/^(\w*Color)(\d+)$/)||[];r&&(t[e]=`oklch(from ${t[r]} calc(l - ${(Number(i)-400)/1e3}) c h)`)}return t[e]}});sE.set(o,e),s_.set(o,i);let a=()=>{s();let t="";Object.keys(i).forEach(n=>{t+=`${e[n]}:${i[n]};`}),r.setContent(`&,:host{${t}}`)};return a(),ny(i,()=>{a(),r.updateStyle()}),o}function sP(t){return sx(t)}function sO(t){let e=sx(t);return document.adoptedStyleSheets.push(e[nx].getStyle()),e}function sL(t,e){return sx(e,sT(t))}function sk(t){let e=sx(t),n=sT(e);return e7(e,e=>(r,{addInitializer:i,access:s})=>{i(function(){let r=sx({...t},n)[nx].getStyle(this,!0);this.internals.sheets.push(r),this.memo(()=>{let t=s.get(this).apply(this),e=r.cssRules[0],i=this.shadowRoot?e:r.element?.sheet?.cssRules[0]?.cssRules?.[0];for(let e in n)i?.style.setProperty(n[e],t[e])},e&&(()=>e(this)))})})}return eJ})());
|
|
36
|
+
`,sx=new Map,sP=new Map;eN=rH(),eM=rR(sT),eR=n6,eI=rx();class sL extends eR{static{({e:[eH,eD,eV,ez,eW,eU,eG,eq,eK,eB],c:[eJ,eA]}=function(t,e,n,r,i){var s,o,a,l,c,u,h,d=Symbol.metadata||Symbol.for("Symbol.metadata"),f=Object.defineProperty,p=Object.create,m=[p(null),p(null)],g=e.length;function y(e,n,r){return function(i,s){n&&(s=i,i=t);for(var o=0;o<e.length;o++)s=e[o].apply(i,r?[s]:[]);return r?s:i}}function b(t,e,n,r){if("function"!=typeof t&&(r||void 0!==t))throw TypeError(e+" must "+(n||"be")+" a function"+(r?"":" or undefined"));return t}function v(t,e,n,r,i,s,o,a,l,c,d){function p(t){if(!d(t))throw TypeError("Attempted to access private element on non-instance")}var g=[].concat(e[0]),v=e[3],w=!o,S=1===i,_=3===i,$=4===i,E=2===i;function C(e,n,r){return function(i,s){return n&&(s=i,i=t),r&&r(i),desc[e].call(i,s)}}var T={},x=[],P=_?"get":$||S?"set":"value";if(!w&&(l?(c||S?T={get:sC(function(){return v(this)},r,"get"),set:function(t){e[4](this,t)}}:T[P]=v,c||sC(T[P],r,E?"":P)):c||(T=Object.getOwnPropertyDescriptor(t,r)),!c&&!l)){if((h=m[+a][r])&&(h^i)!=7)throw Error("Decorating two elements with the same name ("+T[P].name+") is not supported yet");m[+a][r]=i<3?1:i}for(var L=t,O=g.length-1;O>=0;O-=n?2:1){var j=b(g[O],"A decorator","be",!0),k=n?g[O-1]:void 0,N={},M={kind:["field","accessor","method","getter","setter","class"][i],name:r,metadata:u,addInitializer:(function(t,e){if(t.v)throw TypeError("attempted to call addInitializer after decoration was finished");b(e,"An initializer","be",!0),s.push(e)}).bind(null,N)};if(w){h=j.call(k,L,M),N.v=1,b(h,"class decorators","return")&&(L=h);continue}if(M.static=a,M.private=l,h=M.access={has:l?d.bind():function(t){return r in t}},$||(h.get=l?E?function(t){return p(t),T.value}:C("get",0,p):function(t){return t[r]}),E||_||(h.set=l?C("set",0,p):function(t,e){t[r]=e}),L=j.call(k,S?{get:T.get,set:T.set}:T[P],M),N.v=1,S){if("object"==typeof L&&L)(h=b(L.get,"accessor.get"))&&(T.get=h),(h=b(L.set,"accessor.set"))&&(T.set=h),(h=b(L.init,"accessor.init"))&&x.unshift(h);else if(void 0!==L)throw TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else b(L,(c?"field":"method")+" decorators","return")&&(c?x.unshift(L):T[P]=L)}return i<2&&o.push(y(x,a,1),y(s,a,0)),c||w||(l?S?o.splice(-1,0,C("get",a),C("set",a)):o.push(E?T[P]:b.call.bind(T[P])):f(t,r,T)),L}function w(t){return f(t,d,{configurable:!0,enumerable:!0,value:u})}return void 0!==i&&(u=i[d]),u=p(null==u?null:u),a=[],l=function(t){t&&a.push(y(t))},(c=function(e,i){for(var l=0;l<n.length;l++){var c=n[l],u=c[1],h=7&u;if((8&u)==e&&!h==i){var d=c[2],f=!!c[3],p=16&u;v(e?t:t.prototype,c,p,f?"#"+d:function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(d),h,h<2?[]:e?o=o||[]:s=s||[],a,!!e,f,i,e&&f?function(e){return function(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(null!==t?typeof t:"null"));return t}(e)===t}:r)}}})(8,0),c(0,0),c(8,1),c(0,1),l(s),l(o),h=a,g||w(t),{e:h,get c(){var S=[];return g&&[w(t=v(t,[e],0,t.name,5,S)),y(S,1)]}}}(this,[eN,eM],[[rb,0,"selector"],[rS,0,"root"],[rS,0,"element"],[rL,0,"active"],[eI,0,"content",function(t){return t.#a},function(t,e){t.#a=e}]],t=>#a in t,eR))}constructor(...t){super(...t),eB(this)}selector=eH(this);root=(eD(this),eV(this));element=(ez(this),eW(this));active=(eU(this),eG(this));#td=(eq(this),()=>{let t=this.element||(this.selector?(this.root||document).querySelector(this.selector):null);if("string"==typeof t&&e9){let e=sP.get(t);return e||(e=Object.assign([t],{raw:[t]}),sP.set(t,e)),nH(e)}if("string"==typeof t){let e=sx.get(t);return e||((e=document.createElement("template")).innerHTML=t,sx.set(t,e)),e.content.cloneNode(!0)}return t instanceof HTMLTemplateElement?t.content.cloneNode(!0):t?.cloneNode(!0)});#a=eK(this,()=>nH`${this.#td()}<slot></slot>`);static{eA()}}customElements.define("gem-use",eJ);class sO{#tf;get #tp(){return`[${this.#tf}]`}constructor(t){this.#tf=t}info=(...t)=>{console.log(this.#tp,...t)};warn=(...t)=>{console.warn(this.#tp,...t)};error=(...t)=>{console.error(this.#tp,...t)}}let sj=new sO("GEM"),sk=/\$\d(?:<[^>]*>)?/,sN=/\$(\d)(<([^>]*)>)?/g;function sM(t,...e){let n,r=t.split(sk),i=[];for(;n=sN.exec(t);){let t=n[3],r=e[Number(n[1])-1];i.push("function"==typeof r?r(t):r)}return nH(r,...i)}let sA=new Set;class sR{resources;fallbackLanguage;cache;cachePrefix="gem-i18n";urlParamsType;urlParamsName;onChange;#K=ne({currentLanguage:""});get currentLanguage(){return this.#K.currentLanguage}set currentLanguage(t){this.#K.currentLanguage=t}replace=({path:t})=>this.setLanguage(t);getParams=()=>({path:this.currentLanguage});get #tm(){return`${this.cachePrefix}:current`}get #tg(){let{hostname:t,pathname:e,search:n}=location,r=t.split(".");switch(this.urlParamsType){case"ccTLD":return r.pop();case"gTLD":return r.shift();case"path":return e.split("/")[1];default:{let t=this.urlParamsName&&new URLSearchParams(n).get(this.urlParamsName)||"";return t in this.resources?t:""}}}get #ty(){return this.cache&&localStorage.getItem(this.#tm)||""}get #tb(){return!sA.has(this)}set #tv(t){this.#tb&&(document.documentElement.lang=t),this.currentLanguage=t,this.onChange?.(t)}#tw=!0;constructor(t){if(!t.resources[t.fallbackLanguage])throw new nE("i18n: fallbackLanguage invalid");Object.assign(this,t);let e=this.#tg||this.currentLanguage||this.#ty;const n=document.querySelector(`[type*=${this.cachePrefix}]`);if(n)try{const t=JSON.parse(n.textContent||"");e=t.currentLanguage,this.resources[t.currentLanguage]=t.currentLanguagePack}catch{}e?(this.#tv=e,this.setLanguage(e)):this.resetLanguage(),this.#tw=!1}get(t,...e){let n=this.resources[this.currentLanguage],r=this.resources[this.fallbackLanguage],i=n[t]||r[t],s=i?.message||i||`[${t}]`;return e.length?sM(s,...e):s}detectLanguage(){let t=Object.keys(this.resources);for(let e of navigator.languages.map(t=>t.replace(/-(.*)/,t=>t.toUpperCase()))){let n=t.find(t=>t===e||e.startsWith(`${t}-`));if(n)return n}return this.fallbackLanguage}async setLanguage(t){let e;this.#tb&&sA.forEach(async e=>await e.setLanguage(t));let n=this.resources[t];if(!n)return sj.warn(`${this.cachePrefix}: not found \`${t}\``),this.resetLanguage();if("string"==typeof n){let t=`${this.cachePrefix}:`,r=`${t}${n}`,i=localStorage.getItem(r),s=async()=>{let e=await (await fetch(n)).json();if(this.cache){for(let e=0;e<localStorage.length;e++){let n=localStorage.key(e);n.startsWith(t)&&localStorage.removeItem(n)}localStorage.setItem(r,JSON.stringify(e))}return e};if(i)try{e=JSON.parse(i)}catch{e=await s()}else e=await s()}else e=n;if(this.resources[t]=e,!this.#tw){let t=[document.documentElement];for(;t.length;){let e=t.pop();e[nJ]?.(),t.push(...[...e.children,...e.shadowRoot?.children||[]].reverse())}}return t!==this.currentLanguage&&(this.#tv=t),!0===this.cache&&this.setCache(),t}resetLanguage(){return this.#tb&&sA.forEach(t=>t.resetLanguage()),this.#tv=this.fallbackLanguage,this.cache&&localStorage.removeItem(this.#tm),this.setLanguage(this.detectLanguage())}setCache(){this.#tb&&sA.forEach(t=>t.setCache()),localStorage.setItem(this.#tm,this.currentLanguage)}createSubModule(t,e){let n=new sR({resources:e,cachePrefix:`${this.cachePrefix}-${t}`,currentLanguage:this.currentLanguage,fallbackLanguage:this.fallbackLanguage,cache:this.cache});return sA.add(n),n}toJSON(){return{currentLanguage:this.currentLanguage,currentLanguagePack:this.resources[this.currentLanguage]}}}let sI={PRINT:"print",get isPrint(){return matchMedia(this.PRINT).matches},HOVER:"(hover: hover)",get isHover(){return matchMedia(this.HOVER).matches},PWA:"(display-mode: standalone)",get isPWA(){return matchMedia(this.PWA).matches},MOTION_REDUCE:"(prefers-reduced-motion: reduce)",get isMotionReduce(){return matchMedia(this.MOTION_REDUCE).matches},DATA_REDUCE:"(prefers-reduced-data: reduce)",get isDataReduce(){return matchMedia(this.DATA_REDUCE).matches},WATCH:"(width < 320px)",get isWatch(){return matchMedia(this.WATCH).matches},SMALL_PHONE:"(320px <= width <= 480px) and (height <= 640px)",get isSmallPhone(){return matchMedia(this.SMALL_PHONE).matches},PHONE:"(320px <= width <= 480px)",get isPhone(){return matchMedia(this.PHONE).matches},PHONE_LANDSCAPE:"(480px < width < 960px) and (orientation: landscape)",get isPhoneLandscape(){return matchMedia(this.PHONE_LANDSCAPE).matches},SHORT:"(width >= 480px) and (height <= 320px)",get isShort(){return matchMedia(this.SHORT).matches},TABLET:"(480px < width <= 1280px)",get isTablet(){return matchMedia(this.TABLET).matches},DESKTOP:"(width > 1280px) and (orientation: landscape)",get isDesktop(){return matchMedia(this.DESKTOP).matches},WIDTHSCREEN:"(width >= 1920px) and (orientation: landscape)",get isWidthScreen(){return matchMedia(this.WIDTHSCREEN).matches}},sH=Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)).constructor;function sD(t={}){let{origin:e=location.origin,base:n="",appendHeaders:r=()=>({}),transformInput:i=t=>t,transformOutput:s=t=>t,...o}=t,a=t=>t instanceof FormData||t instanceof Blob||t instanceof sH||t instanceof URLSearchParams||t instanceof ReadableStream||t instanceof ArrayBuffer?t:"object"==typeof t?JSON.stringify(t):t,l=(t,r)=>{if(new URL(t,location.origin).pathname!==t)throw new nE("`path` format is incorrect");let i=new URLSearchParams(r).toString();return`${e}${n}${t}${i?"?":""}${i}`},c=t=>t?t instanceof Headers?Object.fromEntries(t):Object.fromEntries((Array.isArray(t)?t:Object.entries(t)).map(([t,e])=>[t.toLowerCase(),e])):{},u=async(t,e={})=>{let n=new Request(t,{...o,...e,headers:new Headers({"content-type":"application/json",...c(o.headers),...c(e.headers)})}),r=await fetch(n);if(204===r.status)return;if(0===r.status)throw Error("Request fail");if(r.status>=500)throw Error(r.statusText);let i=n.headers.get("content-type"),a=r.status>=400;try{let t;if(t=i.includes("json")?await r.json():i.includes("octet-stream")?await r.arrayBuffer():await r.text(),a)throw Error(r.statusText,{cause:t});return await s(t,n)}catch{throw Error("Parse error")}};return{request:u,async get(t,e){let n=await i(e);return u(l(t,n),{method:"GET",headers:await r(n)})},async del(t,e){let n=await i(e);return u(l(t,n),{method:"DELETE",headers:await r(n)})},async put(t,e){let n=await i(e);return u(l(t),{method:"PUT",headers:await r(n),body:a(n)})},async post(t,e){let n=await i(e);return u(l(t),{method:"POST",headers:await r(n),body:a(n)})}}}let{request:sV,del:sz,get:sW,post:sU,put:sG}=sD(),sq=new WeakMap,sK=new WeakMap;function sB(t){return sq.get(t)}function sJ(t){return sK.get(t)}function sF(t,e={}){let n=nw(),r=n1({})[nB],i=nR(t),s=()=>{Object.keys(i).forEach(t=>{e[t]||(e[t]=`--${nS(t)}-${n}`,o[t]=`var(${e[t]})`)})},o=new Proxy(nd({[nB]:r},t=>{i(t),s()}),{get(t,e){if(!t[e]){let[n,r,i]=e.match(/^(\w*Color)(\d+)$/)||[];r&&(t[e]=`oklch(from ${t[r]} calc(l - ${(Number(i)-400)/1e3}) c h)`)}return t[e]}});sK.set(o,e),sq.set(o,i);let a=()=>{s();let t="";Object.keys(i).forEach(n=>{t+=`${e[n]}:${i[n]};`}),r.setContent(`&,:host{${t}}`)};return a(),nI(i,()=>{a(),r.updateStyle()}),o}function sY(t){return sF(t)}function sZ(t){let e=sF(t);return document.adoptedStyleSheets.push(e[nB].getStyle()),e}function sQ(t,e){return sF(e,sJ(t))}function sX(t){let e=sF(t),n=sJ(e);return nd(e,e=>(r,{addInitializer:i,access:s})=>{i(function(){let r=sF({...t},n),i=r[nB].getStyle(this,!0);this.internals.sheets.push(i),this.memo(()=>{if(e9||CSS.supports("font:-apple-system-body"))return r(s.get(this).apply(this));let t=s.get(this).apply(this),e=i.cssRules[0],o=this.shadowRoot?e:i.element?.sheet?.cssRules[0]?.cssRules?.[0];for(let e in n)o?.style.setProperty(n[e],t[e])},e&&(()=>e(this)))})})}return eY})());
|