@mantou/gem 2.2.11 → 2.2.12

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 CHANGED
@@ -1,6 +1,6 @@
1
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,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,tL,tO,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,eL,eO,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:()=>eO,GemUseElement:()=>eK,I18n:()=>sp,LinkedList:()=>e9,Logger:()=>sl,PropProxyMap:()=>nt,QueryString:()=>ne,SheetToken:()=>nx,TemplateResult:()=>rG,UpdateToken:()=>nP,_RenderErrorEvent:()=>nO,_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:()=>sO,createPath:()=>iG,createRef:()=>r9,createScopedTheme:()=>sP,createState:()=>t,createStore:()=>ng,createTheme:()=>sL,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:()=>iO,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:()=>nO,_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"),nL="gem-style-boundary",nO="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(${nL}) > *)`,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(nO,{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)};#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)})};#k;#j=async()=>{if(this.#g){this.#g=!1,this.#w?.(),this.#w=this.#P();return}this.#b=!0,this.#O();let{observedStores:t,mode:e,penetrable:n}=this.#$;this.#d.states.add("gem-element"),e||!this.#m.length||n||this.#d.states.add(nL),this.#k=t?.map(t=>ny(t,this.#S)),this.#T(this.#_),this.#y=!0,this.#w=this.#P(),e4(this.#L)};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(nO,({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}>`,rL=document,rO=()=>rL.createComment(""),rk=t=>null===t||"object"!=typeof t&&"function"!=typeof t,rj=t=>null==t,rN=`[
2
2
  \f\r]`,rA=`[^
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=rL.createTreeWalker(rL,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],rO()),rZ.nextNode(),a.push({type:2,index:++i});r.append(t[e],rO())}}}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=rL.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??rL).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=rL,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=rO();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(rL.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(rO()),this._insert(rO()),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.11",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(rO(),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,iL=ng({defaultTitle:document.title,url:"",title:""});if(!globalThis._GEMHISTORY){if(globalThis._GEMHISTORY={history:iP,titleStore:iL,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(iL,()=>{let t=ib.get(iy.$key);t&&(t.title=iL.title)}),ny(iy,()=>{let{title:t}=iP.getParams();t!==iL.title&&iL({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:iL.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:iO,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(iO.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 L=t,O=g.length-1;O>=0;O-=n?2:1){var k=b(g[O],"A decorator","be",!0),j=n?g[O-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,L,A),N.v=1,b(h,"class decorators","return")&&(L=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}),L=k.call(j,S?{get:T.get,set:T.set}:T[P],A),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,[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(),iO.push({title:this.label,open:this.#H,close:this.#I,shouldClose:this.shouldClose}),iA});shouldClose(){return!0}close=()=>(iO.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 L=t,O=g.length-1;O>=0;O-=n?2:1){var k=b(g[O],"A decorator","be",!0),j=n?g[O-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,L,A),N.v=1,b(h,"class decorators","return")&&(L=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}),L=k.call(j,S?{get:T.get,set:T.set}:T[P],A),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.#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(),iO.push({title:e.label,open:n,close:this.closeHandle.bind(this),shouldClose:this.shouldClose.bind(this)})},100),d}static close(){return iO.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(iO.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 L=t,O=m.length-1;O>=0;O-=n?2:1){var k=v(m[O],"A decorator","be",!0),j=n?m[O-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,L,A),N.v=1,v(d,"class decorators","return")&&(L=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}),L=k.call(j,S?{get:T.get,set:T.set}:T[P],A),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 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,L,O,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),L(this));beforeroutechange=(O(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,iO));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}=iO.getParams();this.locationStore({path:t,params:this.currentParams,query:e,hash:n,data:r})};#J=()=>{if(!this.#G)return;let t=iJ.get(iO.currentKey);t?this.#G.scroll(0,t):(this.scrollIgnoreHash||!iO.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(iO,"beforechange",()=>iJ.set(iO.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===iO&&(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}=iO.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`
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=rL.createTreeWalker(rL,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],rO()),rZ.nextNode(),a.push({type:2,index:++i});r.append(t[e],rO())}}}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=rL.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??rL).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=rL,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=rO();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(rL.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(rO()),this._insert(rO()),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.12",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(rO(),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,iL=ng({defaultTitle:document.title,url:"",title:""});if(!globalThis._GEMHISTORY){if(globalThis._GEMHISTORY={history:iP,titleStore:iL,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(iL,()=>{let t=ib.get(iy.$key);t&&(t.title=iL.title)}),ny(iy,()=>{let{title:t}=iP.getParams();t!==iL.title&&iL({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:iL.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:iO,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(iO.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 L=t,O=g.length-1;O>=0;O-=n?2:1){var k=b(g[O],"A decorator","be",!0),j=n?g[O-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,L,A),N.v=1,b(h,"class decorators","return")&&(L=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}),L=k.call(j,S?{get:T.get,set:T.set}:T[P],A),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,[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(),iO.push({title:this.label,open:this.#H,close:this.#I,shouldClose:this.shouldClose}),iA});shouldClose(){return!0}close=()=>(iO.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 L=t,O=g.length-1;O>=0;O-=n?2:1){var k=b(g[O],"A decorator","be",!0),j=n?g[O-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,L,A),N.v=1,b(h,"class decorators","return")&&(L=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}),L=k.call(j,S?{get:T.get,set:T.set}:T[P],A),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.#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(),iO.push({title:e.label,open:n,close:this.closeHandle.bind(this),shouldClose:this.shouldClose.bind(this)})},100),d}static close(){return iO.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(iO.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 L=t,O=m.length-1;O>=0;O-=n?2:1){var k=v(m[O],"A decorator","be",!0),j=n?m[O-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,L,A),N.v=1,v(d,"class decorators","return")&&(L=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}),L=k.call(j,S?{get:T.get,set:T.set}:T[P],A),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 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,L,O,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),L(this));beforeroutechange=(O(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,iO));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}=iO.getParams();this.locationStore({path:t,params:this.currentParams,query:e,hash:n,data:r})};#J=()=>{if(!this.#G)return;let t=iJ.get(iO.currentKey);t?this.#G.scroll(0,t):(this.scrollIgnoreHash||!iO.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(iO,"beforechange",()=>iJ.set(iO.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===iO&&(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}=iO.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`
4
4
  :host(:where(:not([hidden]))),
5
5
  :not(:defined) {
6
6
  display: contents;
package/dist/gem.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  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,k,j,N,A,M,R,I,H,D,V,z,W,U,G,q,B,K,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,tL,tO,tk,tj,tN,tA,tM,tR,tI,tH,tD,tV,tz,tW,tU,tG,tq,tB,tK,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,eL,eO,ek,ej,eN,eA,eM,eR,eI,eH,eD,eV,ez,eW,eU,eG,eq,eB;var eK={};eK.d=(t,e,n)=>{var r=(e,n)=>{for(var r in e)eK.o(e,r)&&!eK.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,[n]:e[r]})};r(e,"get"),r(n,"value")},eK.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),eK.r=t=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var eJ={};eK.r(eJ),eK.d(eJ,{adoptedStyle:()=>rm,aria:()=>rw,async:()=>rv,attribute:()=>n6,boolattribute:()=>n5,connectStore:()=>rg,customElement:()=>rS,effect:()=>rn,emitter:()=>rd,fallback:()=>ra,globalemitter:()=>rf,light:()=>rb,memo:()=>re,mounted:()=>rs,numattribute:()=>n9,part:()=>rh,property:()=>rt,shadow:()=>ry,slot:()=>ru,state:()=>rl,template:()=>ro,unmounted:()=>rr,willMount:()=>ri});var eF={};eK.r(eF),eK.d(eF,{GemElement:()=>nV,SheetToken:()=>nT,UpdateToken:()=>nx,_RenderErrorEvent:()=>nL,_createTemplate:()=>e,createState:()=>t,css:()=>nA,html:()=>ny,render:()=>nb,setEngine:()=>nv,setHydrationEngine:()=>nS});var eQ={};eK.r(eQ),eK.d(eQ,{_StoreListenerMap:()=>np,connect:()=>ng,createStore:()=>nm});var eY={};eK.r(eY),eK.d(eY,{version:()=>it});let{assign:eZ,fromEntries:eX,entries:e0,keys:e1}=Object;function e2(t){Promise.resolve().then(t)}let e3=new Set;function e8(t,e=e2){e3.has(t)||(e(()=>{e3.delete(t),t()}),e3.add(t))}function e4(t,e){return delete e.name,delete e.length,eZ(e,t),e}function e7(t="",e=""){let{pathname:n,search:r,hash:i}=new URL(e,location.origin+t);return n+r+decodeURIComponent(i)}function e6(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}class e5 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 e9 extends WeakMap{get(t){let e=super.get(t);return e||(e={},this.set(t,e)),e}}class nt extends URLSearchParams{concat(t){e0("string"==typeof t?eX(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 ne(t,...e){return t.reduce((t,n,r)=>t+(e[r-1]??"")+n)}let nn=ne;function nr(t=5){let e=Math.random().toString(36).slice(2,2+t);return e.length<t?e+nr(t-e.length):e}function ni(t){return t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function ns(t){return t.replace(/-(.)/g,(t,e)=>e.toUpperCase())}function no(t){return e1(t).forEach(e=>{delete t[e]}),t}class na extends Error{constructor(t){super(t),this.message=`gem: ${this.message}`}}function nl(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 nc(t,e,n){let r=e;for(let i in t){let s=n(i,t[i]);r+=s?s+e:""}return r}function nu(t){return nc(t,";",(t,e)=>e||0===e?`${ni(t)}:${e}`:"")}function nh(t){return nc(t," ",(t,e)=>e?t:"")}let nd=nh;function nf(t){return nc(t,",",(t,e)=>!0===e||t===e?t:e?`${t}:${e}`:"")}let np=new WeakMap;function nm(t){let e=e4(t,t=>{Object.assign(e,t),np.get(e)?.forEach(t=>e8(t))});return np.set(e,new Set),e}function ng(t,e){let n=np.get(t);return n?.add(e),()=>n?.delete(e)}let ny=(t,...e)=>ne(t,...e.map(t=>t instanceof Element?t.outerHTML:t)),nb=(t,e)=>e.innerHTML=t;function nv(t,e){ny=t,nb=e}let nw=(t,e)=>{};function nS(t){nw=t}let{assign:n_,defineProperty:n$}=Object;n$(Symbol,"metadata",{value:Symbol.for("Symbol.metadata")});let nE=t=>"function"==typeof t&&t(),nC=globalThis.nQM,nT=Symbol.for("gem@sheetToken"),nx=Symbol.for("gem@update"),nP="gem-style-boundary",nL="gem@render-error",nO=new WeakMap,nk=new WeakMap;class nj 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 nN{#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 nj({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(${nP}) > *)`,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 nA(t,...e){let n="",r="",i=e.at(0);Array.isArray(t)?r=ne(t,...e):void 0!==i?(n=t,r=i):r=t;let s=new nN(n),o={[nT]:s},a="";return"string"==typeof r?a=r:Object.keys(r).forEach(t=>{let e="$"===t;o[t]=e||t.includes("-")?t:`${t}-${nr()}`,a+=`${e?":where(&:not([hidden])),:host(:where(:not([hidden])))":`.${o[t]}`} {${r[t]}}`}),s.setContent(a),o}let nM=(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&&e8(nk.get(t),nC)};function nR(t){t?.forEach(t=>{let{callback:e,getDep:n,values:r,preCallback:i}=t,s=n?.();(!n||!r||nl(r,s))&&(nE(i),t.preCallback=e(s,r),t.values=s,t.initialized=!0)})}function nI(t){return t.filter(t=>(nE(t.preCallback),t.initialized=!1,t.values=void 0,t.fixed))}let nH=new e5,nD=(t=performance.now())=>{if(performance.now()>t+50)return requestAnimationFrame(nD);let e=nH.get();e&&(e(),nD(t))};nH.addEventListener("start",()=>e8(nD));class nV extends HTMLElement{#h;#d;#f=[];#p=[];#m=[];#g;#y;#b;#v;#w;[nx](){this.#y&&e8(this.#S)}static{t=t=>{let e=n,r=e4(t,t=>{let n=e.#f.at(0);if(!nC&&e.#y&&n&&!n.initialized)throw new na("Don't set state sync before insert the DOM");n_(r,t),!e.#v&&e.#y&&e8(e.#S,nC)});return e.#d.stateList.push(r),r},e=(t,e)=>t.#m.push(e)}constructor(){let t;super(),n=this;let{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 e6(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=()=>{nR(this.#f)};#C=()=>{nR(this.#p)};#T=t=>{try{this.#v=!0,this.#C();let e=this.#h===this,n=t?t.render():e?void 0:ny`<slot></slot>`;if(void 0===n)return;let r=null!==n?n:ny`<style>${e?"@scope":":host"}{&{display:none!important;}}</style>`;nw(r,this.#h)||nb(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),e8(this.#E))};#S=()=>{this.#_.noBlocking?nH.add(this.#x):this.#x()};#P=()=>{let{adoptedStyleSheets:t=[]}=this.#_,{shadowRoot:e,sheets:n}=this.#d,r=t.map(t=>t[nT].getStyle(this));if(!e)return this.prepend(...n.map(t=>t.element)),((t,e)=>{let n=t.getRootNode();if(!nO.has(n)){let t=new Map;nO.set(n,t),nk.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=nO.get(n);return nM(r,e,1),()=>nM(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)})};#k;#j=async()=>{if(this.#g){this.#g=!1,this.#w?.(),this.#w=this.#P();return}this.#b=!0,this.#O();let{observedStores:t,mode:e,penetrable:n}=this.#_;this.#d.states.add("gem-element"),e||!this.#m.length||n||this.#d.states.add(nP),this.#k=t?.map(t=>ng(t,this.#S)),this.#T(this.#$),this.#y=!0,this.#w=this.#P(),e8(this.#L)};connectedCallback(){this.#_.noBlocking?nH.add(this.#j):this.#j()}disconnectedCallback(){if(this.isConnected){this.#g=!0;return}nH.delete(this.#j),nH.delete(this.#x),this.#y=!1,this.#k?.forEach(t=>t()),this.#f=nI(this.#f),this.#p=nI(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=()=>e8(this.#S)}let{deleteProperty:nz,getOwnPropertyDescriptor:nW,defineProperty:nU}=Reflect,{getPrototypeOf:nG,assign:nq,hasOwn:nB}=Object,nK=new e9;function nJ(t,e,n){let r=t.metadata;nW(r,e)||nU(r,e,{value:r[e]?.filter(t=>t!==n)||[]}),r[e].push(n)}function nF(t,e){let{value:n}=nW(t,e)||{};nz(t,e),t[e]=n}let nQ=new WeakMap,{setAttribute:nY,toggleAttribute:nZ,removeAttribute:nX}=Element.prototype,n0=(t,e)=>nQ.get(nG(t))?.get(e);function n1(){}nV.prototype.setAttribute=function(t,e){let n=n0(this,t);if(!n)return nY.call(this,t,e);this[n]=e},nV.prototype.removeAttribute=function(t){let e=n0(this,t);if(!e)return nX.call(this,t);this[e]=null},nV.prototype.toggleAttribute=function(t,e){let n=n0(this,t);return n?this[n]=e??!this.hasAttribute(t):nZ.call(this,t,e)};let n2=Symbol("event handle");function n3(t,e,{attr:n,attrType:r,event:i,eventOptions:s}={}){nU(t,e,{configurable:!0,get(){let t=nK.get(this)[e];return i&&!t?(this[e]=n1,this[e]):t},set(t){let o=this,a=nK.get(o);n&&((t=r===Boolean&&""===t||r(t||""))?nY.call(this,n,r===Boolean?"":t):nX.call(this,n)),t!==a[e]&&(i?(a[e]=t?.[n2]?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][n2]=!0):(a[e]=t,this[nx]()))}})}let n8=new WeakMap;function n4(t,{metadata:e}){let n=n8.get(e);if(n)return n;let r=t;do r=nG(r);while(r.constructor[Symbol.metadata]!==e);return n8.set(e,r),r}function n7(t,e){let n=t.name,r=ni(n);return t.addInitializer(function(){let i=n4(this,t);nB(i,n)||(nJ(t,"observedAttributes",r),n3(i,n,{attr:r,attrType:e})),nF(this,n);let s=nG(this),o=nQ.get(s)||new Map;o.set(r,n),nQ.set(s,o)}),function(t){return this.getAttribute(r)??t}}function n6(t,e){return n7(e,String)}function n5(t,e){return n7(e,Boolean)}function n9(t,e){return n7(e,Number)}function rt(t,e){let n=e.name;return e.addInitializer(function(){let t=n4(this,e);nB(t,n)||(nJ(e,"observedProperties",n),n3(t,n)),nF(this,n)}),function(t){return this[n]??t}}function re(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 na("not support");let t=nW(n4(this,n),i).get.bind(this);this.memo(()=>{nU(this,i,{configurable:!0,value:t()})},e)}else this.memo(s.get.call(this,this).bind(this),e)})}}function rn(t){return(e,{addInitializer:n,access:r})=>{n(function(){this.effect(r.get.call(this,this).bind(this),t&&(()=>t(this)))})}}function rr(){return(t,{addInitializer:e,access:n})=>{e(function(){this.effect(()=>n.get.call(this,this).bind(this),()=>[])})}}function ri(){return re(()=>[])}function rs(){return rn(()=>[])}function ro(t){return(n,{addInitializer:r,access:i})=>{r(function(){e(this,{render:i.get.call(this,this).bind(this),condition:t&&(()=>t(this))})})}}function ra(){return(t,{addInitializer:e,access:n})=>{e(function(){this.addEventListener(nL,({detail:t})=>{nb(n.get.call(this,this).apply(this,[t]),this.internals.shadowRoot||this)})})}}function rl(t,e){let n=e.name,r=ni(n);e.addInitializer(function(){let t=n4(this,e);!nB(t,n)&&(nJ(e,"definedCSSStates",r),nU(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)}}));nF(this,n)})}function rc(t,e,n,r){let i=t.name,s=ni(i);if(t.static)nJ(t,n,s);else{let r=nG(e);r[i]||(r[i]=s,nJ(t,n,s))}return r||s}function ru(t,e){return function(t){return rc(e,this,"definedSlots",t)}}function rh(t,e){return function(t){return rc(e,this,"definedParts",t)}}function rd(t,e){rp(e)}function rf(t,e){rp(e,{bubbles:!0,composed:!0})}function rp(t,e){let n=t.name,r=ni(n);t.addInitializer(function(){let i=n4(this,t);nB(i,n)||(nJ(t,"definedEvents",r),n3(i,n,{event:r,eventOptions:e})),nF(this,n)})}function rm(t){return(e,n)=>{nJ(n,"adoptedStyleSheets",t)}}function rg(t){return(e,n)=>{nJ(n,"observedStores",t)}}function ry({mode:t="open",serializable:e=!0,...n}={}){return(r,i)=>{nq(i.metadata,{mode:t,serializable:e,...n})}}function rb({penetrable:t}){return(e,n)=>{n.metadata.penetrable=t}}function rv(){return(t,e)=>{e.metadata.noBlocking=!0}}function rw(t){return(e,n)=>{let r=n.metadata;r.aria={...r.aria,...t}}}function rS(t){return(e,{addInitializer:n})=>{n(()=>{customElements.define(t,e)})}}let r_=globalThis.trustedTypes,r$=r_?.createPolicy("lit-html",{createHTML:t=>t}),rE="$lit$",rC=`lit$${Math.random().toFixed(9).slice(2)}$`,rT="?"+rC,rx=`<${rT}>`,rP=document,rL=()=>rP.createComment(""),rO=t=>null===t||"object"!=typeof t&&"function"!=typeof t,rk=t=>null==t,rj=`[
2
2
  \f\r]`,rN=`[^
3
- \f\r"'\`<>=]`,rA=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,rM=/-->/g,rR=/>/g,rI=RegExp(`>|${rj}(?:([^\\s"'>=/]+)(${rj}*=${rj}*(?:${rN}|("|')|))|$)`,"g"),rH=/'/g,rD=/"/g,rV=/^(?:script|style|textarea|title)$/i,rz="v-if",rW="v-else-if",rU="v-else";class rG{type;strings;values;constructor(t,e,n){this.type=t,this.strings=e,this.values=n}}let rq=t=>(e,...n)=>new rG(t,e,n),rB=rq(1),rK=rq(2),rJ=rq(3),rF=Symbol.for("lit-noChange"),rQ=new WeakMap,rY=rP.createTreeWalker(rP,129);class rZ{el;parts=[];constructor({strings:t,type:e},n){let r,i=0,s=0,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=rA;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===rA?"!--"===a[1]?o=rM:void 0!==a[1]?o=rR:void 0!==a[2]?(rV.test(a[2])&&(n=RegExp(`</${a[2]}`,"g")),o=rI):void 0!==a[3]&&(o=rI):o===rI?">"===a[0]?(o=n??rA,c=-1):void 0===a[1]?c=-2:(c=o.lastIndex-a[2].length,r=a[1],o=void 0===a[3]?rI:'"'===a[3]?rD:rH):o===rD||o===rH?o=rI:o===rM||o===rR?o=rA:(o=rI,n=void 0);let h=o===rI&&t[e+1].startsWith("/>")?" ":"";s+=o===rA?l+rx:c>=0?(i.push(r),l.slice(0,c)+rE+l.slice(c)+rC+h):l+rC+(-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!==r$?r$.createHTML(e):e}(t,a),i]})(t,e);if(this.el=rZ.createElement(l,n),rY.currentNode=this.el.content,2===e||3===e){let t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=rY.nextNode())&&a.length<o;){if(1===r.nodeType){if(r.hasAttributes())for(let t of r.getAttributeNames())if(t.endsWith(rE)){let e=c[s++],n=r.getAttribute(t).split(rC),o=/([.?@])?(.*)/.exec(e);a.push({type:1,index:i,name:o[2],strings:n,ctor:"."===o[1]?r8:"?"===o[1]?r4:"@"===o[1]?r7:r3}),r.removeAttribute(t)}else t.startsWith(rC)&&(a.push({type:6,index:i}),r.removeAttribute(t));if(rV.test(r.tagName)){let t=r.textContent.split(rC),e=t.length-1;if(e>0){r.textContent=r_?r_.emptyScript:"";for(let n=0;n<e;n++)r.append(t[n],rL()),rY.nextNode(),a.push({type:2,index:++i});r.append(t[e],rL())}}}else if(8===r.nodeType)if(r.data===rT)a.push({type:2,index:i});else{let t=-1;for(;-1!==(t=r.data.indexOf(rC,t+1));)a.push({type:7,index:i}),t+=rC.length-1}i++}}static createElement(t,e){let n=rP.createElement("template");return n.innerHTML=t,n}}function rX(t,e,n=t,r){if(e===rF)return e;let i=void 0!==r?n.__directives?.[r]:n.__directive,s=rO(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=rX(t,i._$resolve(t,e.values),i,r)),e}class r0{_$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??rP).importNode(e,!0);rY.currentNode=s;let o=rY.nextNode(),a=0,l=0,c=n[0];for(;void 0!==c;){if(a===c.index){let e;2===c.type?e=new r2(o,o.nextSibling,this,t):1===c.type?(c.name===rz&&r.set(o,l),c.name===rW&&i.set(o,l),e=new c.ctor(o,c.name,c.strings,this,t)):6===c.type&&(e=new r6(o,this,t)),this._$parts.push(e),c=n[++l]}a!==c?.index&&(o=rY.nextNode(),a++)}let u=new Map;for(let t of(r.forEach((t,e)=>{let n=new r1(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 rY.currentNode=rP,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===rz||n.name===rW||n._$setValue(t[e])),e++;this._$conditions.forEach(e=>e.update(t))}}class r1{mark;list;constructor(t,e){let 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(rU)&&(this.list.push({ele:t}),t.removeAttribute(rU))}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 r2{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&&(rO(t=rX(this,t,e))?rk(t)||""===t?(rk(this._$committedValue)||this._$clear(),this._$committedValue=void 0):t!==this._$committedValue&&t!==rF&&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){!rk(this._$committedValue)&&rO(this._$committedValue)?this._$startNode.nextSibling.data=t:this._commitNode(rP.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 r0(n,this),r=t._clone(this.options);t._update(e),this._commitNode(r),this._$committedValue=t}}_$getTemplate(t){let e=rQ.get(t.strings);return void 0===e&&rQ.set(t.strings,e=new rZ(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 r2(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 r3{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=!rO(t=rX(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=rX(this,a[n+r],e,r),s||=!rO(o)||o!==this._$committedValue[r],rk(o)?t=void 0:rk(t)||(t+=o+i[r+1]),this._$committedValue[r]=o}s&&!r&&this._commitValue(t)}_commitValue(t){rk(t)?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t)}}class r8 extends r3{type=3;_commitValue(t){this.element[this.name]=t}}class r4 extends r3{type=4;_commitValue(t){this.element.toggleAttribute(this.name,!!t)}}class r7 extends r3{type=5;_$setValue(t,e=this){t=rX(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 r6{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 r9)t.value=this.element;else if(t._$litDirective$)rX(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 r5=()=>new r9;class r9{value}let it="2.2.11",ie=t=>(...e)=>({_$litDirective$:t,values:e});class ir{__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 ii=(t,e,n)=>{let r=t._$startNode.parentNode,i=void 0===e?t._$endNode:e._$startNode;if(void 0===n)n=new r2(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},is=(t,e,n=t)=>(t._$setValue(e,n),t),io={},ia=t=>{t._$notifyConnectionChanged?.(!1,!0);let e=t._$startNode,n=t._$endNode.nextSibling;for(;e!==n;){let t=e.nextSibling;e.remove(),e=t}},il=(t,e,n)=>{let r=new Map;for(let i=e;i<=n;i++)r.set(t[i],i);return r},ic=ie(class extends ir{_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]=is(o[h],a[f]),h++,f++;else if(c[d]===l[p])u[p]=is(o[d],a[p]),d--,p--;else if(c[h]===l[p])u[p]=is(o[h],a[p]),ii(t,u[p+1],o[h]),h++,p--;else if(c[d]===l[f])u[f]=is(o[d],a[f]),ii(t,o[h],o[d]),d--,f++;else if(void 0===i&&(i=il(l,f,p),s=il(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=ii(t,o[h]);is(e,a[f]),u[f]=e}else u[f]=is(n,a[f]),ii(t,o[h],n),o[e]=null;f++}else ia(o[d]),d--;else ia(o[h]),h++;for(;f<=p;){let e=ii(t,u[p+1]);is(e,a[f]),u[f++]=e}for(;h<=d;){let t=o[h++];null!==t&&ia(t)}return this._itemKeys=l,((t,e=io)=>t._$committedValue=e)(t,u),rF}});nv(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 r2(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__,{...eF,...eJ,...eQ,...eY});let iu=globalThis.history,ih=iu.pushState.bind(iu),id=iu.replaceState.bind(iu),ip=0,im=()=>`${performance.now()}-${++ip}`,ig=nm({$hasCloseHandle:!1,$hasOpenHandle:!1,$hasShouldCloseHandle:!1,$key:""}),iy=new Map;function ib(t){let{$key:e,$hasCloseHandle:n,$hasOpenHandle:r,$hasShouldCloseHandle:i}=t||{};if(ig.$key!==e){if(e)throw new na("`$key` is not allowed");if(n)throw new na("`$hasCloseHandle` is not allowed");if(r)throw new na("`$hasOpenHandle` is not allowed");if(i)throw new na("`$hasShouldCloseHandle` is not allowed")}}function iv(t){return ix.basePath?ix.basePath+t:t}function iw(t){return t===ix.basePath?"/":t.replace(RegExp(`^${ix.basePath}/`),"/")}function iS(){ix.dispatchEvent(new CustomEvent("beforechange"))}function i_(t){let e=iy.get(ig.$key)||{path:iw(location.pathname),query:new nt},n=t.path?e7(e.path,t.path):iw(location.pathname),r=new nt(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 i$(t,e){ib(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:im(),$title:r,...u};iy.set(h.$key,n),iS(),no(ig),ig(h);let d=iv(i)+new nt(s)+o,f=decodeURIComponent(location.hash);e(h,r,d),f!==o&&dispatchEvent(new CustomEvent("hashchange"))}function iE(t,e,n,r){ib(t);let i={$key:im(),$title:e,...t||{}},{pathname:s,search:o,hash:a}=new URL(n,location.origin+location.pathname),l=i_({path:s,query:new nt(o),hash:a,title:e,data:t});iy.set(i.$key,l),iS(),no(ig),ig(i);let c=iv(s)+l.query+a,u=location.hash;r(i,e,c),u!==a&&dispatchEvent(new CustomEvent("hashchange"))}let iC=nm({basePath:""});class iT extends EventTarget{get store(){return ig}get currentKey(){return ig.$key}get basePath(){return iC.basePath}set basePath(t){iC({basePath:t}),Object.assign(iy.get(ig.$key),{path:iw(location.pathname)})}getParams(){return iy.get(ig.$key)}updateParams(t){Object.assign(iy.get(ig.$key),t),ig()}push(t){i$(t,ih)}replace(t){i$(t,id)}pushIgnoreCloseHandle(t){ig.$hasCloseHandle?(iy.get(ig.$key)?.close?.(),this.replace(t)):this.push(t)}forward(){iu.forward()}back(){iu.back()}}let ix=new iT,iP=nm({defaultTitle:document.title,url:"",title:""});if(!globalThis._GEMHISTORY){if(globalThis._GEMHISTORY={history:ix,titleStore:iP,basePathStore:iC},iu.pushState=(t,e,n)=>{iE(t,e,n,ih)},iu.replaceState=(t,e,n)=>{iE(t,e,n,id)},addEventListener("hashchange",({isTrusted:t})=>{t&&ix.replace({hash:location.hash})}),iu.state)if(iu.state.$hasCloseHandle){ig(iu.state);let t=i_({title:document.title});iy.set(ig.$key,t),ix.back()}else{let t=i_({title:document.title,hash:location.hash});ig({$key:im(),...iu.state||{}}),iy.set(ig.$key,t)}else{let{protocol:t,pathname:e,search:n,hash:r}=location;(t.startsWith("http")||t.startsWith("tauri"))&&ix.replace({path:e,query:n,hash:r})}ng(iP,()=>{let t=iy.get(ig.$key);t&&(t.title=iP.title)}),ng(ig,()=>{let{title:t}=ix.getParams();t!==iP.title&&iP({title:t})});let t=!1;addEventListener("popstate",e=>{let n=e.state;if(n?.$key){if(t){t=!1;return}if(!iy.has(n.$key)){let{pathname:t,search:e,hash:r}=location;iy.set(n.$key,{path:iw(t),query:new nt(e),hash:decodeURIComponent(r),title:iP.title||n.$title,data:n})}if(parseFloat(n.$key)>parseFloat(ig.$key)&&n.$hasOpenHandle)iy.get(n.$key)?.open?.();else if(ig.$hasCloseHandle){let e=iy.get(ig.$key),r=e?.close,i=e?.shouldClose;if(i&&!i()){t=!0,ix.forward();return}r?r():n.$hasCloseHandle&&(t=!0,ix.back())}iS(),no(ig),ig(n)}})}let{history:iL,titleStore:iO,basePathStore:ik}=globalThis._GEMHISTORY;function ij(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 iN=Symbol();r=rg(iL.store),i=rw({role:"dialog",ariaModal:"true"}),o=nV,a=ri();class iA 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:ij(function(){return v(this)},r,"get"),set:function(t){e[4](this,t)}}:T[P]=v,c||ij(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 k=b(g[O],"A decorator","be",!0),j=n?g[O-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,L,A),N.v=1,b(h,"class decorators","return")&&(L=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}),L=k.call(j,S?{get:T.get,set:T.set}:T[P],A),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,[r,i],[[n6,0,"label"],[rl,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}),iN});shouldClose(){return!0}close=()=>(iL.back(),iN);forceClose=()=>(this.opened=!1,setTimeout(this.close,100),iN);static{s()}}function iM(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 iR(t){return t}let iI=Symbol("open mark");function iH(t){let e,n,r,i,s,o,a,l,c,u,h,d=Symbol();return e=ry(),n=rw({role:"alertdialog",ariaModal:"true"}),i=nV,s=rs(),o=rs(),new class extends iR{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:iM(function(){return v(this)},r,"get"),set:function(t){e[4](this,t)}}:T[P]=v,c||iM(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 k=b(g[O],"A decorator","be",!0),j=n?g[O-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,L,A),N.v=1,b(h,"class decorators","return")&&(L=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}),L=k.call(j,S?{get:T.get,set:T.set}:T[P],A),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[iI]}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({[iI]:!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({[iI]:!1,...t}),d}static shouldClose(){return!0}label="";#D=a(this,()=>ng(iL.store,this.update));#V=(l(this),c(this,()=>ng(h.store,this.update)))}];inertStore=[];instance=null;store=nm({[iI]:!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 iV(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 L=t,O=m.length-1;O>=0;O-=n?2:1){var k=v(m[O],"A decorator","be",!0),j=n?m[O-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,L,A),N.v=1,v(d,"class decorators","return")&&(L=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}),L=k.call(j,S?{get:T.get,set:T.set}:T[P],A),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 iz(t){return t}class iW extends RegExp{constructor(t){let e=0;super(`^${t.replace(/((:[^/$]+)|(\*))/g,(t,n)=>"*"===n?`(?<_${e++}>.*)`:`(?<${n.slice(1)}>[^/]+)`)}$`)}}function iU(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 iW(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 iq(t,e){return{path:iG(t,e),...e}}let iB=ny``,iK=new Map;m=rb({penetrable:!0}),y=nV,b=rn(t=>[t.scrollContainer]),v=rn(t=>[t.scrollContainer]),w=ro(t=>!t.inert),new class extends iz{constructor(){super(te),g()}static [class extends y{static{({e:[S,_,$,E,C,T,x,P,L,O,k,j,N,A,M,R,I,H,D,V,z,W,U,G,q,B,K,J,F,Q],c:[te,g]}=iV(this,[m],[[n5,0,"transition"],[rt,0,"routes"],[rt,0,"locationStore"],[rt,0,"key"],[rd,0,"loading"],[rd,0,"beforeroutechange"],[rd,0,"routechange"],[rd,0,"error"],[rt,0,"scrollContainer"],[rt,0,"scrollIgnoreHash"],[rt,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}],[rn(t=>t.#U()),0,"updateContent",function(t){return t.#G},function(t,e){t.#G=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),L(this));beforeroutechange=(O(this),k(this));routechange=(j(this),N(this));error=(A(this),M(this));scrollContainer=(R(this),I(this));scrollIgnoreHash=(H(this),D(this));trigger=(V(this),z(this,iL));currentRoute=void W(this);currentParams={};get #q(){return"function"==typeof this.scrollContainer?this.scrollContainer():this.scrollContainer}#B=t({content:iB});#K=()=>{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.#q)return;let t=iK.get(iL.currentKey);t?this.#q.scroll(0,t):(this.scrollIgnoreHash||!iL.getParams().hash)&&this.#q.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.#B({content:n}),this.#K(),await Promise.resolve(),this.#J(),this.routechange(this.currentRoute)};this.transition&&"startViewTransition"in document?document.startViewTransition(()=>r()):r()};#z=U(this,()=>{if(this.#q)return e6(iL,"beforechange",()=>iK.set(iL.currentKey,this.#q.scrollTop))});#W=(G(this),q(this,()=>this.trigger.store&&ng(this.trigger.store,()=>this.#B())));#U=(B(this),()=>{let{path:t,query:e,hash:n}=this.trigger.getParams();return[this.key,t,e,n]});#G=K(this,([t,e],n)=>{n&&t===n[0]&&e===n[1]?this.#K():this.update()});#a=(J(this),F(this,()=>{let{content:t}=this.#B;if(void 0!==t){if(!this.shadowRoot){if(t===iB)return;return ny`${t}`}return t===iB?ny`<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!==iO.url||r?.title)&&iO({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 nm({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=iU(r.pattern,e);if(t)return{route:r,params:t}}return{route:n}}};let iJ=nA`
3
+ \f\r"'\`<>=]`,rA=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,rM=/-->/g,rR=/>/g,rI=RegExp(`>|${rj}(?:([^\\s"'>=/]+)(${rj}*=${rj}*(?:${rN}|("|')|))|$)`,"g"),rH=/'/g,rD=/"/g,rV=/^(?:script|style|textarea|title)$/i,rz="v-if",rW="v-else-if",rU="v-else";class rG{type;strings;values;constructor(t,e,n){this.type=t,this.strings=e,this.values=n}}let rq=t=>(e,...n)=>new rG(t,e,n),rB=rq(1),rK=rq(2),rJ=rq(3),rF=Symbol.for("lit-noChange"),rQ=new WeakMap,rY=rP.createTreeWalker(rP,129);class rZ{el;parts=[];constructor({strings:t,type:e},n){let r,i=0,s=0,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=rA;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===rA?"!--"===a[1]?o=rM:void 0!==a[1]?o=rR:void 0!==a[2]?(rV.test(a[2])&&(n=RegExp(`</${a[2]}`,"g")),o=rI):void 0!==a[3]&&(o=rI):o===rI?">"===a[0]?(o=n??rA,c=-1):void 0===a[1]?c=-2:(c=o.lastIndex-a[2].length,r=a[1],o=void 0===a[3]?rI:'"'===a[3]?rD:rH):o===rD||o===rH?o=rI:o===rM||o===rR?o=rA:(o=rI,n=void 0);let h=o===rI&&t[e+1].startsWith("/>")?" ":"";s+=o===rA?l+rx:c>=0?(i.push(r),l.slice(0,c)+rE+l.slice(c)+rC+h):l+rC+(-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!==r$?r$.createHTML(e):e}(t,a),i]})(t,e);if(this.el=rZ.createElement(l,n),rY.currentNode=this.el.content,2===e||3===e){let t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=rY.nextNode())&&a.length<o;){if(1===r.nodeType){if(r.hasAttributes())for(let t of r.getAttributeNames())if(t.endsWith(rE)){let e=c[s++],n=r.getAttribute(t).split(rC),o=/([.?@])?(.*)/.exec(e);a.push({type:1,index:i,name:o[2],strings:n,ctor:"."===o[1]?r8:"?"===o[1]?r4:"@"===o[1]?r7:r3}),r.removeAttribute(t)}else t.startsWith(rC)&&(a.push({type:6,index:i}),r.removeAttribute(t));if(rV.test(r.tagName)){let t=r.textContent.split(rC),e=t.length-1;if(e>0){r.textContent=r_?r_.emptyScript:"";for(let n=0;n<e;n++)r.append(t[n],rL()),rY.nextNode(),a.push({type:2,index:++i});r.append(t[e],rL())}}}else if(8===r.nodeType)if(r.data===rT)a.push({type:2,index:i});else{let t=-1;for(;-1!==(t=r.data.indexOf(rC,t+1));)a.push({type:7,index:i}),t+=rC.length-1}i++}}static createElement(t,e){let n=rP.createElement("template");return n.innerHTML=t,n}}function rX(t,e,n=t,r){if(e===rF)return e;let i=void 0!==r?n.__directives?.[r]:n.__directive,s=rO(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=rX(t,i._$resolve(t,e.values),i,r)),e}class r0{_$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??rP).importNode(e,!0);rY.currentNode=s;let o=rY.nextNode(),a=0,l=0,c=n[0];for(;void 0!==c;){if(a===c.index){let e;2===c.type?e=new r2(o,o.nextSibling,this,t):1===c.type?(c.name===rz&&r.set(o,l),c.name===rW&&i.set(o,l),e=new c.ctor(o,c.name,c.strings,this,t)):6===c.type&&(e=new r6(o,this,t)),this._$parts.push(e),c=n[++l]}a!==c?.index&&(o=rY.nextNode(),a++)}let u=new Map;for(let t of(r.forEach((t,e)=>{let n=new r1(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 rY.currentNode=rP,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===rz||n.name===rW||n._$setValue(t[e])),e++;this._$conditions.forEach(e=>e.update(t))}}class r1{mark;list;constructor(t,e){let 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(rU)&&(this.list.push({ele:t}),t.removeAttribute(rU))}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 r2{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&&(rO(t=rX(this,t,e))?rk(t)||""===t?(rk(this._$committedValue)||this._$clear(),this._$committedValue=void 0):t!==this._$committedValue&&t!==rF&&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){!rk(this._$committedValue)&&rO(this._$committedValue)?this._$startNode.nextSibling.data=t:this._commitNode(rP.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 r0(n,this),r=t._clone(this.options);t._update(e),this._commitNode(r),this._$committedValue=t}}_$getTemplate(t){let e=rQ.get(t.strings);return void 0===e&&rQ.set(t.strings,e=new rZ(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 r2(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 r3{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=!rO(t=rX(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=rX(this,a[n+r],e,r),s||=!rO(o)||o!==this._$committedValue[r],rk(o)?t=void 0:rk(t)||(t+=o+i[r+1]),this._$committedValue[r]=o}s&&!r&&this._commitValue(t)}_commitValue(t){rk(t)?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t)}}class r8 extends r3{type=3;_commitValue(t){this.element[this.name]=t}}class r4 extends r3{type=4;_commitValue(t){this.element.toggleAttribute(this.name,!!t)}}class r7 extends r3{type=5;_$setValue(t,e=this){t=rX(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 r6{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 r9)t.value=this.element;else if(t._$litDirective$)rX(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 r5=()=>new r9;class r9{value}let it="2.2.12",ie=t=>(...e)=>({_$litDirective$:t,values:e});class ir{__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 ii=(t,e,n)=>{let r=t._$startNode.parentNode,i=void 0===e?t._$endNode:e._$startNode;if(void 0===n)n=new r2(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},is=(t,e,n=t)=>(t._$setValue(e,n),t),io={},ia=t=>{t._$notifyConnectionChanged?.(!1,!0);let e=t._$startNode,n=t._$endNode.nextSibling;for(;e!==n;){let t=e.nextSibling;e.remove(),e=t}},il=(t,e,n)=>{let r=new Map;for(let i=e;i<=n;i++)r.set(t[i],i);return r},ic=ie(class extends ir{_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]=is(o[h],a[f]),h++,f++;else if(c[d]===l[p])u[p]=is(o[d],a[p]),d--,p--;else if(c[h]===l[p])u[p]=is(o[h],a[p]),ii(t,u[p+1],o[h]),h++,p--;else if(c[d]===l[f])u[f]=is(o[d],a[f]),ii(t,o[h],o[d]),d--,f++;else if(void 0===i&&(i=il(l,f,p),s=il(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=ii(t,o[h]);is(e,a[f]),u[f]=e}else u[f]=is(n,a[f]),ii(t,o[h],n),o[e]=null;f++}else ia(o[d]),d--;else ia(o[h]),h++;for(;f<=p;){let e=ii(t,u[p+1]);is(e,a[f]),u[f++]=e}for(;h<=d;){let t=o[h++];null!==t&&ia(t)}return this._itemKeys=l,((t,e=io)=>t._$committedValue=e)(t,u),rF}});nv(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 r2(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__,{...eF,...eJ,...eQ,...eY});let iu=globalThis.history,ih=iu.pushState.bind(iu),id=iu.replaceState.bind(iu),ip=0,im=()=>`${performance.now()}-${++ip}`,ig=nm({$hasCloseHandle:!1,$hasOpenHandle:!1,$hasShouldCloseHandle:!1,$key:""}),iy=new Map;function ib(t){let{$key:e,$hasCloseHandle:n,$hasOpenHandle:r,$hasShouldCloseHandle:i}=t||{};if(ig.$key!==e){if(e)throw new na("`$key` is not allowed");if(n)throw new na("`$hasCloseHandle` is not allowed");if(r)throw new na("`$hasOpenHandle` is not allowed");if(i)throw new na("`$hasShouldCloseHandle` is not allowed")}}function iv(t){return ix.basePath?ix.basePath+t:t}function iw(t){return t===ix.basePath?"/":t.replace(RegExp(`^${ix.basePath}/`),"/")}function iS(){ix.dispatchEvent(new CustomEvent("beforechange"))}function i_(t){let e=iy.get(ig.$key)||{path:iw(location.pathname),query:new nt},n=t.path?e7(e.path,t.path):iw(location.pathname),r=new nt(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 i$(t,e){ib(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:im(),$title:r,...u};iy.set(h.$key,n),iS(),no(ig),ig(h);let d=iv(i)+new nt(s)+o,f=decodeURIComponent(location.hash);e(h,r,d),f!==o&&dispatchEvent(new CustomEvent("hashchange"))}function iE(t,e,n,r){ib(t);let i={$key:im(),$title:e,...t||{}},{pathname:s,search:o,hash:a}=new URL(n,location.origin+location.pathname),l=i_({path:s,query:new nt(o),hash:a,title:e,data:t});iy.set(i.$key,l),iS(),no(ig),ig(i);let c=iv(s)+l.query+a,u=location.hash;r(i,e,c),u!==a&&dispatchEvent(new CustomEvent("hashchange"))}let iC=nm({basePath:""});class iT extends EventTarget{get store(){return ig}get currentKey(){return ig.$key}get basePath(){return iC.basePath}set basePath(t){iC({basePath:t}),Object.assign(iy.get(ig.$key),{path:iw(location.pathname)})}getParams(){return iy.get(ig.$key)}updateParams(t){Object.assign(iy.get(ig.$key),t),ig()}push(t){i$(t,ih)}replace(t){i$(t,id)}pushIgnoreCloseHandle(t){ig.$hasCloseHandle?(iy.get(ig.$key)?.close?.(),this.replace(t)):this.push(t)}forward(){iu.forward()}back(){iu.back()}}let ix=new iT,iP=nm({defaultTitle:document.title,url:"",title:""});if(!globalThis._GEMHISTORY){if(globalThis._GEMHISTORY={history:ix,titleStore:iP,basePathStore:iC},iu.pushState=(t,e,n)=>{iE(t,e,n,ih)},iu.replaceState=(t,e,n)=>{iE(t,e,n,id)},addEventListener("hashchange",({isTrusted:t})=>{t&&ix.replace({hash:location.hash})}),iu.state)if(iu.state.$hasCloseHandle){ig(iu.state);let t=i_({title:document.title});iy.set(ig.$key,t),ix.back()}else{let t=i_({title:document.title,hash:location.hash});ig({$key:im(),...iu.state||{}}),iy.set(ig.$key,t)}else{let{protocol:t,pathname:e,search:n,hash:r}=location;(t.startsWith("http")||t.startsWith("tauri"))&&ix.replace({path:e,query:n,hash:r})}ng(iP,()=>{let t=iy.get(ig.$key);t&&(t.title=iP.title)}),ng(ig,()=>{let{title:t}=ix.getParams();t!==iP.title&&iP({title:t})});let t=!1;addEventListener("popstate",e=>{let n=e.state;if(n?.$key){if(t){t=!1;return}if(!iy.has(n.$key)){let{pathname:t,search:e,hash:r}=location;iy.set(n.$key,{path:iw(t),query:new nt(e),hash:decodeURIComponent(r),title:iP.title||n.$title,data:n})}if(parseFloat(n.$key)>parseFloat(ig.$key)&&n.$hasOpenHandle)iy.get(n.$key)?.open?.();else if(ig.$hasCloseHandle){let e=iy.get(ig.$key),r=e?.close,i=e?.shouldClose;if(i&&!i()){t=!0,ix.forward();return}r?r():n.$hasCloseHandle&&(t=!0,ix.back())}iS(),no(ig),ig(n)}})}let{history:iL,titleStore:iO,basePathStore:ik}=globalThis._GEMHISTORY;function ij(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 iN=Symbol();r=rg(iL.store),i=rw({role:"dialog",ariaModal:"true"}),o=nV,a=ri();class iA 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:ij(function(){return v(this)},r,"get"),set:function(t){e[4](this,t)}}:T[P]=v,c||ij(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 k=b(g[O],"A decorator","be",!0),j=n?g[O-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,L,A),N.v=1,b(h,"class decorators","return")&&(L=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}),L=k.call(j,S?{get:T.get,set:T.set}:T[P],A),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,[r,i],[[n6,0,"label"],[rl,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}),iN});shouldClose(){return!0}close=()=>(iL.back(),iN);forceClose=()=>(this.opened=!1,setTimeout(this.close,100),iN);static{s()}}function iM(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 iR(t){return t}let iI=Symbol("open mark");function iH(t){let e,n,r,i,s,o,a,l,c,u,h,d=Symbol();return e=ry(),n=rw({role:"alertdialog",ariaModal:"true"}),i=nV,s=rs(),o=rs(),new class extends iR{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:iM(function(){return v(this)},r,"get"),set:function(t){e[4](this,t)}}:T[P]=v,c||iM(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 k=b(g[O],"A decorator","be",!0),j=n?g[O-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,L,A),N.v=1,b(h,"class decorators","return")&&(L=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}),L=k.call(j,S?{get:T.get,set:T.set}:T[P],A),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[iI]}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({[iI]:!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({[iI]:!1,...t}),d}static shouldClose(){return!0}label="";#D=a(this,()=>ng(iL.store,this.update));#V=(l(this),c(this,()=>ng(h.store,this.update)))}];inertStore=[];instance=null;store=nm({[iI]:!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 iV(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 L=t,O=m.length-1;O>=0;O-=n?2:1){var k=v(m[O],"A decorator","be",!0),j=n?m[O-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,L,A),N.v=1,v(d,"class decorators","return")&&(L=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}),L=k.call(j,S?{get:T.get,set:T.set}:T[P],A),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 iz(t){return t}class iW extends RegExp{constructor(t){let e=0;super(`^${t.replace(/((:[^/$]+)|(\*))/g,(t,n)=>"*"===n?`(?<_${e++}>.*)`:`(?<${n.slice(1)}>[^/]+)`)}$`)}}function iU(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 iW(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 iq(t,e){return{path:iG(t,e),...e}}let iB=ny``,iK=new Map;m=rb({penetrable:!0}),y=nV,b=rn(t=>[t.scrollContainer]),v=rn(t=>[t.scrollContainer]),w=ro(t=>!t.inert),new class extends iz{constructor(){super(te),g()}static [class extends y{static{({e:[S,_,$,E,C,T,x,P,L,O,k,j,N,A,M,R,I,H,D,V,z,W,U,G,q,B,K,J,F,Q],c:[te,g]}=iV(this,[m],[[n5,0,"transition"],[rt,0,"routes"],[rt,0,"locationStore"],[rt,0,"key"],[rd,0,"loading"],[rd,0,"beforeroutechange"],[rd,0,"routechange"],[rd,0,"error"],[rt,0,"scrollContainer"],[rt,0,"scrollIgnoreHash"],[rt,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}],[rn(t=>t.#U()),0,"updateContent",function(t){return t.#G},function(t,e){t.#G=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),L(this));beforeroutechange=(O(this),k(this));routechange=(j(this),N(this));error=(A(this),M(this));scrollContainer=(R(this),I(this));scrollIgnoreHash=(H(this),D(this));trigger=(V(this),z(this,iL));currentRoute=void W(this);currentParams={};get #q(){return"function"==typeof this.scrollContainer?this.scrollContainer():this.scrollContainer}#B=t({content:iB});#K=()=>{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.#q)return;let t=iK.get(iL.currentKey);t?this.#q.scroll(0,t):(this.scrollIgnoreHash||!iL.getParams().hash)&&this.#q.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.#B({content:n}),this.#K(),await Promise.resolve(),this.#J(),this.routechange(this.currentRoute)};this.transition&&"startViewTransition"in document?document.startViewTransition(()=>r()):r()};#z=U(this,()=>{if(this.#q)return e6(iL,"beforechange",()=>iK.set(iL.currentKey,this.#q.scrollTop))});#W=(G(this),q(this,()=>this.trigger.store&&ng(this.trigger.store,()=>this.#B())));#U=(B(this),()=>{let{path:t,query:e,hash:n}=this.trigger.getParams();return[this.key,t,e,n]});#G=K(this,([t,e],n)=>{n&&t===n[0]&&e===n[1]?this.#K():this.update()});#a=(J(this),F(this,()=>{let{content:t}=this.#B;if(void 0!==t){if(!this.shadowRoot){if(t===iB)return;return ny`${t}`}return t===iB?ny`<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!==iO.url||r?.title)&&iO({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 nm({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=iU(r.pattern,e);if(t)return{route:r,params:t}}return{route:n}}};let iJ=nA`
4
4
  :host(:where(:not([hidden]))),
5
5
  :not(:defined) {
6
6
  display: contents;
@@ -24,6 +24,12 @@ export interface RotateEventDetail {
24
24
  y: number;
25
25
  rotate: number;
26
26
  }
27
+ export interface EndEventDetail {
28
+ /** 结束手势的原始事件,可通过 type 区分抬手、取消或离开。 */
29
+ event: PointerEvent;
30
+ /** 本次手势是否触发过 press,取消时也保留该状态。 */
31
+ pressed: boolean;
32
+ }
27
33
  /** Viewport coordinates in CSS pixels and a monotonic timestamp in milliseconds. */
28
34
  export interface GestureSample {
29
35
  clientX: number;
@@ -44,7 +50,7 @@ export declare class GemGestureElement extends GemElement {
44
50
  rotate: Emitter<RotateEventDetail>;
45
51
  swipe: Emitter<SwipeEventDetail>;
46
52
  press: Emitter<PointerEvent>;
47
- end: Emitter<PointerEvent>;
53
+ end: Emitter<EndEventDetail>;
48
54
  touchAction: string;
49
55
  grabbing: boolean;
50
56
  /** 一次手势的指针移动事件记录 */
@@ -1 +1 @@
1
- {"version":3,"file":"gesture.d.ts","sourceRoot":"","sources":["../../src/elements/base/gesture.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEpD,OAAO,EAAO,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,MAAM,cAAc,GAAG;IAE3B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,OAAO,EAAE,MAA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QD,oFAAoF;AACpF,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,mGAAmG;AACnG,wBAAgB,QAAQ,CACtB,UAAU,EAAE,aAAa,EACzB,KAAK,EAAE,SAAS,aAAa,EAAE,EAC/B,GAAG,EAAE,aAAa,EAClB,YAAY,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,MAAM,EAC/C,YAAY,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,MAAM,GAC9C,gBAAgB,GAAG,SAAS,CAgD9B;AA2BD;;;;GAIG;AACH,qBACa,iBAAkB,SAAQ,UAAU;;IACtC,GAAG,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IAC7B,KAAK,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACjC,MAAM,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACnC,KAAK,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACjC,KAAK,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IAC7B,GAAG,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IAE3B,WAAW,EAAE,MAAM,CAAC;IAExB,QAAQ,EAAE,OAAO,CAAC;IA2MzB,oBAAoB;IACpB,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,EAAE,CAAC,CAAa;CACrD"}
@@ -330,7 +330,7 @@ let GemGestureElement = (() => {
330
330
  if (ended) {
331
331
  this.grabbing = false;
332
332
  this.#gestureTriggered = false;
333
- this.end(evt);
333
+ this.end({ event: evt, pressed: this.#pressed });
334
334
  }
335
335
  // 确保外部 end 事件处理器中可以读取到,且不删除新手势的记录。
336
336
  await Promise.resolve();
@@ -1 +1 @@
1
- {"version":3,"file":"gesture.js","sourceRoot":"","sources":["../../src/elements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AI,CAAC,YAAY,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;QAC5E,CAAC,EAAC;QAEF,oBAAoB;QACpB,QAAQ,8DAAkC,IAAI,GAAG,EAAE,EAAC;;;;SAtNzC,iBAAiB"}
package/lib/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const version = "2.2.11";
1
+ export declare const version = "2.2.12";
2
2
  //# sourceMappingURL=version.d.ts.map
package/lib/version.js CHANGED
@@ -1,2 +1,2 @@
1
- export const version = '2.2.11';
1
+ export const version = '2.2.12';
2
2
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mantou/gem",
3
- "version": "2.2.11",
3
+ "version": "2.2.12",
4
4
  "description": "💎 使用自定义元素的轻量级 WebApp 开发框架",
5
5
  "keywords": [
6
6
  "frontend",
@@ -29,6 +29,12 @@ export interface RotateEventDetail {
29
29
  y: number;
30
30
  rotate: number;
31
31
  }
32
+ export interface EndEventDetail {
33
+ /** 结束手势的原始事件,可通过 type 区分抬手、取消或离开。 */
34
+ event: PointerEvent;
35
+ /** 本次手势是否触发过 press,取消时也保留该状态。 */
36
+ pressed: boolean;
37
+ }
32
38
 
33
39
  // 甩动手感的经验参数,非 UIKit 的公开阈值;坐标单位为 CSS px。
34
40
  const SWIPE_TIME_WINDOW = 100;
@@ -137,7 +143,7 @@ export class GemGestureElement extends GemElement {
137
143
  @emitter rotate: Emitter<RotateEventDetail>;
138
144
  @emitter swipe: Emitter<SwipeEventDetail>;
139
145
  @emitter press: Emitter<PointerEvent>;
140
- @emitter end: Emitter<PointerEvent>;
146
+ @emitter end: Emitter<EndEventDetail>;
141
147
 
142
148
  @attribute touchAction: string;
143
149
 
@@ -317,7 +323,7 @@ export class GemGestureElement extends GemElement {
317
323
  if (ended) {
318
324
  this.grabbing = false;
319
325
  this.#gestureTriggered = false;
320
- this.end(evt);
326
+ this.end({ event: evt, pressed: this.#pressed });
321
327
  }
322
328
 
323
329
  // 确保外部 end 事件处理器中可以读取到,且不删除新手势的记录。
@@ -1 +1 @@
1
- export const version = '2.2.11';
1
+ export const version = '2.2.12';
@@ -1,4 +1,4 @@
1
- import type { GemGestureElement, SwipeEventDetail } from '../../elements/gesture';
1
+ import type { EndEventDetail, GemGestureElement, SwipeEventDetail } from '../../elements/gesture';
2
2
  import { html } from '../../lib/element';
3
3
  import { aTimeout, expect, fixture } from '../utils';
4
4
 
@@ -37,6 +37,42 @@ async function setupGesture(touchAction = '') {
37
37
  return { el, swipes, events, dispatch };
38
38
  }
39
39
 
40
+ describe('GemGestureElement end', () => {
41
+ for (const type of ['pointerup', 'pointercancel', 'pointerleave']) {
42
+ it(`includes the original ${type} event and resets pressed for the next gesture`, async () => {
43
+ const { el, dispatch } = await setupGesture();
44
+ const ends: EndEventDetail[] = [];
45
+ el.addEventListener('end', (evt: CustomEvent<EndEventDetail>) => ends.push(evt.detail));
46
+ const pressed = new Promise((resolve) => el.addEventListener('press', resolve, { once: true }));
47
+ dispatch('pointerdown', [0, 0]);
48
+ await pressed;
49
+ const event = pointer(type, [300, 10, 20]);
50
+ el.dispatchEvent(event);
51
+ await Promise.resolve();
52
+ expect(ends).to.have.lengthOf(1);
53
+ expect(ends[0].event).to.equal(event);
54
+ expect(ends[0].pressed).to.equal(true);
55
+
56
+ dispatch('pointerdown', [400, 0]);
57
+ dispatch('pointerup', [450, 0]);
58
+ await Promise.resolve();
59
+ expect(ends).to.have.lengthOf(2);
60
+ expect(ends[1].pressed).to.equal(false);
61
+ expect(ends[0].pressed).to.equal(true);
62
+ });
63
+ }
64
+
65
+ it('sets pressed before a press handler synchronously ends the gesture', async () => {
66
+ const { el, dispatch } = await setupGesture();
67
+ const ended = new Promise<EndEventDetail>((resolve) => {
68
+ el.addEventListener('end', (evt: CustomEvent<EndEventDetail>) => resolve(evt.detail), { once: true });
69
+ });
70
+ el.addEventListener('press', () => dispatch('pointerup', [300, 0]), { once: true });
71
+ dispatch('pointerdown', [0, 0]);
72
+ expect((await ended).pressed).to.equal(true);
73
+ });
74
+ });
75
+
40
76
  describe('GemGestureElement swipe', () => {
41
77
  for (const [direction, x, y] of [
42
78
  ['right', 60, 0],