@mantou/gem 2.2.13 → 2.2.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gem.js +7 -7
- package/dist/gem.mjs +7 -7
- package/elements/base/gesture.d.ts +7 -1
- package/elements/base/gesture.d.ts.map +1 -1
- package/elements/base/gesture.js +23 -15
- package/elements/base/gesture.js.map +1 -1
- package/elements/base/link.d.ts.map +1 -1
- package/elements/base/link.js +6 -3
- package/elements/base/link.js.map +1 -1
- package/elements/base/modal-factory.d.ts +1 -1
- package/elements/base/modal-factory.d.ts.map +1 -1
- package/elements/base/use.d.ts.map +1 -1
- package/elements/base/use.js +11 -0
- package/elements/base/use.js.map +1 -1
- package/helper/hmr.d.ts +3 -2
- package/helper/hmr.d.ts.map +1 -1
- package/helper/hmr.js +95 -23
- package/helper/hmr.js.map +1 -1
- package/helper/i18n.d.ts +2 -1
- package/helper/i18n.d.ts.map +1 -1
- package/helper/i18n.js +9 -1
- package/helper/i18n.js.map +1 -1
- package/helper/theme.d.ts.map +1 -1
- package/helper/theme.js +5 -0
- package/helper/theme.js.map +1 -1
- package/lib/decorators.d.ts +9 -1
- package/lib/decorators.d.ts.map +1 -1
- package/lib/decorators.js +4 -3
- package/lib/decorators.js.map +1 -1
- package/lib/history.d.ts +10 -7
- package/lib/history.d.ts.map +1 -1
- package/lib/history.js +20 -16
- package/lib/history.js.map +1 -1
- package/lib/lit-html.d.ts +15 -0
- package/lib/lit-html.d.ts.map +1 -1
- package/lib/lit-html.js +3 -1
- package/lib/lit-html.js.map +1 -1
- package/lib/reactive.d.ts +4 -1
- package/lib/reactive.d.ts.map +1 -1
- package/lib/reactive.js +41 -18
- package/lib/reactive.js.map +1 -1
- package/lib/server.d.ts +14 -0
- package/lib/server.d.ts.map +1 -0
- package/lib/server.js +43 -0
- package/lib/server.js.map +1 -0
- package/lib/store.d.ts +10 -1
- package/lib/store.d.ts.map +1 -1
- package/lib/store.js +36 -9
- package/lib/store.js.map +1 -1
- package/lib/utils.d.ts +2 -2
- package/lib/utils.d.ts.map +1 -1
- package/lib/utils.js +20 -7
- package/lib/utils.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/src/elements/base/gesture.ts +26 -15
- package/src/elements/base/link.ts +5 -3
- package/src/elements/base/use.ts +11 -0
- package/src/helper/hmr.ts +105 -37
- package/src/helper/i18n.ts +12 -1
- package/src/helper/theme.ts +4 -0
- package/src/lib/decorators.ts +10 -10
- package/src/lib/history.ts +20 -16
- package/src/lib/lit-html.ts +3 -1
- package/src/lib/reactive.ts +40 -18
- package/src/lib/server.ts +45 -0
- package/src/lib/store.ts +40 -9
- package/src/lib/utils.ts +22 -7
- package/src/lib/version.ts +1 -1
- package/src/test/elements/gesture.test.ts +26 -1
- package/src/test/gem-element/basic.test.ts +20 -0
- package/src/test/store.test.ts +12 -0
package/dist/gem.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
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,O,L,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,tO,tL,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,eO,eL,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:()=>nO,_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",nO="gem@render-error",nL=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(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),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(!nL.has(n)){let t=new Map;nL.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=nL.get(n);return nM(r,e,1),()=>nM(r,e,-1)})(this,r);e.adoptedStyleSheets=r.concat(n)};#O=()=>{this.#f?.forEach(t=>{let{callback:e,getDep:n,initialized:r}=t;r||(t.values=n?.(),t.preCallback=e(t.values),t.initialized=!0)})};#L=()=>{this.willMount&&this.memo(this.willMount.bind(this),()=>[]),this.mounted&&this.effect(this.mounted.bind(this),()=>[]),this.updated&&this.effect((t,e)=>e&&this.updated.apply(this)),this.unmounted&&this.effect(()=>this.unmounted.bind(this),()=>[]),!this.#m.length&&this.render&&this.#m.push({render:this.render.bind(this),condition:this.shouldUpdate?.bind(this)})};#k;#j=async()=>{if(this.#g){this.#g=!1,this.#w?.(),this.#w=this.#P();return}this.#b=!0,this.#L();let{observedStores:t,mode:e,penetrable:n}=this.#_;this.#d.states.add("gem-element"),e||!this.#m.length||n||this.#d.states.add(nP),this.#k=t?.map(t=>ng(t,this.#S)),this.#T(this.#$),this.#y=!0,this.#w=this.#P(),e8(this.#O)};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(nO,({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,rO=()=>rP.createComment(""),rL=t=>null===t||"object"!=typeof t&&"function"!=typeof t,rk=t=>null==t,rj=`[
|
|
2
|
-
\f\r]`,
|
|
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],rO()),rY.nextNode(),a.push({type:2,index:++i});r.append(t[e],rO())}}}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=rL(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=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(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&&(rL(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)&&rL(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(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 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=!rL(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||=!rL(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.13",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(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__,{...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:iO,titleStore:iL,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(iO.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 O=t,L=g.length-1;L>=0;L-=n?2:1){var k=b(g[L],"A decorator","be",!0),j=n?g[L-1]:void 0,N={},A={kind:["field","accessor","method","getter","setter","class"][i],name:r,metadata:u,addInitializer:(function(t,e){if(t.v)throw TypeError("attempted to call addInitializer after decoration was finished");b(e,"An initializer","be",!0),s.push(e)}).bind(null,N)};if(w){h=k.call(j,O,A),N.v=1,b(h,"class decorators","return")&&(O=h);continue}if(A.static=a,A.private=l,h=A.access={has:l?d.bind():function(t){return r in t}},$||(h.get=l?E?function(t){return p(t),T.value}:C("get",0,p):function(t){return t[r]}),E||_||(h.set=l?C("set",0,p):function(t,e){t[r]=e}),O=k.call(j,S?{get:T.get,set:T.set}:T[P],A),N.v=1,S){if("object"==typeof O&&O)(h=b(O.get,"accessor.get"))&&(T.get=h),(h=b(O.set,"accessor.set"))&&(T.set=h),(h=b(O.init,"accessor.init"))&&x.unshift(h);else if(void 0!==O)throw TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else b(O,(c?"field":"method")+" decorators","return")&&(c?x.unshift(O):T[P]=O)}return i<2&&o.push(y(x,a,1),y(s,a,0)),c||w||(l?S?o.splice(-1,0,C("get",a),C("set",a)):o.push(E?T[P]:b.call.bind(T[P])):f(t,r,T)),O}function w(t){return f(t,d,{configurable:!0,enumerable:!0,value:u})}return void 0!==i&&(u=i[d]),u=p(null==u?null:u),a=[],l=function(t){t&&a.push(y(t))},(c=function(e,i){for(var l=0;l<n.length;l++){var c=n[l],u=c[1],h=7&u;if((8&u)==e&&!h==i){var d=c[2],f=!!c[3],p=16&u;v(e?t:t.prototype,c,p,f?"#"+d:function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(d),h,h<2?[]:e?o=o||[]:s=s||[],a,!!e,f,i,e&&f?function(e){return function(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(null!==t?typeof t:"null"));return t}(e)===t}:r)}}})(8,0),c(0,0),c(8,1),c(0,1),l(s),l(o),h=a,g||w(t),{e:h,get c(){var S=[];return g&&[w(t=v(t,[e],0,t.name,5,S)),y(S,1)]}}}(this,[r,i],[[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(),iO.push({title:this.label,open:this.#H,close:this.#I,shouldClose:this.shouldClose}),iN});shouldClose(){return!0}close=()=>(iO.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 O=t,L=g.length-1;L>=0;L-=n?2:1){var k=b(g[L],"A decorator","be",!0),j=n?g[L-1]:void 0,N={},A={kind:["field","accessor","method","getter","setter","class"][i],name:r,metadata:u,addInitializer:(function(t,e){if(t.v)throw TypeError("attempted to call addInitializer after decoration was finished");b(e,"An initializer","be",!0),s.push(e)}).bind(null,N)};if(w){h=k.call(j,O,A),N.v=1,b(h,"class decorators","return")&&(O=h);continue}if(A.static=a,A.private=l,h=A.access={has:l?d.bind():function(t){return r in t}},$||(h.get=l?E?function(t){return p(t),T.value}:C("get",0,p):function(t){return t[r]}),E||_||(h.set=l?C("set",0,p):function(t,e){t[r]=e}),O=k.call(j,S?{get:T.get,set:T.set}:T[P],A),N.v=1,S){if("object"==typeof O&&O)(h=b(O.get,"accessor.get"))&&(T.get=h),(h=b(O.set,"accessor.set"))&&(T.set=h),(h=b(O.init,"accessor.init"))&&x.unshift(h);else if(void 0!==O)throw TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else b(O,(c?"field":"method")+" decorators","return")&&(c?x.unshift(O):T[P]=O)}return i<2&&o.push(y(x,a,1),y(s,a,0)),c||w||(l?S?o.splice(-1,0,C("get",a),C("set",a)):o.push(E?T[P]:b.call.bind(T[P])):f(t,r,T)),O}function w(t){return f(t,d,{configurable:!0,enumerable:!0,value:u})}return void 0!==i&&(u=i[d]),u=p(null==u?null:u),a=[],l=function(t){t&&a.push(y(t))},(c=function(e,i){for(var l=0;l<n.length;l++){var c=n[l],u=c[1],h=7&u;if((8&u)==e&&!h==i){var d=c[2],f=!!c[3],p=16&u;v(e?t:t.prototype,c,p,f?"#"+d:function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(d),h,h<2?[]:e?o=o||[]:s=s||[],a,!!e,f,i,e&&f?function(e){return function(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(null!==t?typeof t:"null"));return t}(e)===t}:r)}}})(8,0),c(0,0),c(8,1),c(0,1),l(s),l(o),h=a,g||w(t),{e:h,get c(){var S=[];return g&&[w(t=v(t,[e],0,t.name,5,S)),y(S,1)]}}}(this,[e,n],[[s,0,"connectHistory",function(t){return t.#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(),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({[iI]:!1,...t}),d}static shouldClose(){return!0}label="";#D=a(this,()=>ng(iO.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 O=t,L=m.length-1;L>=0;L-=n?2:1){var k=v(m[L],"A decorator","be",!0),j=n?m[L-1]:void 0,N={},A={kind:["field","accessor","method","getter","setter","class"][i],name:r,metadata:h,addInitializer:(function(t,e){if(t.v)throw TypeError("attempted to call addInitializer after decoration was finished");v(e,"An initializer","be",!0),s.push(e)}).bind(null,N)};if(w){d=k.call(j,O,A),N.v=1,v(d,"class decorators","return")&&(O=d);continue}if(A.static=a,A.private=l,d=A.access={has:l?u.bind():function(t){return r in t}},$||(d.get=l?E?function(t){return f(t),T.value}:C("get",0,f):function(t){return t[r]}),E||_||(d.set=l?C("set",0,f):function(t,e){t[r]=e}),O=k.call(j,S?{get:T.get,set:T.set}:T[P],A),N.v=1,S){if("object"==typeof O&&O)(d=v(O.get,"accessor.get"))&&(T.get=d),(d=v(O.set,"accessor.set"))&&(T.set=d),(d=v(O.init,"accessor.init"))&&x.unshift(d);else if(void 0!==O)throw TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else v(O,(c?"field":"method")+" decorators","return")&&(c?x.unshift(O):T[P]=O)}return i<2&&o.push(b(x,a,1),b(s,a,0)),c||w||(l?S?o.splice(-1,0,C("get",a),C("set",a)):o.push(E?T[P]:v.call.bind(T[P])):p(t,r,T)),O}function S(t){return p(t,f,{configurable:!0,enumerable:!0,value:h})}return void 0!==s&&(h=s[f]),h=m(null==h?null:h),l=[],c=function(t){t&&l.push(b(t))},(u=function(e,r){for(var s=0;s<n.length;s++){var c=n[s],u=c[1],h=7&u;if((8&u)==e&&!h==r){var d=c[2],f=!!c[3],p=16&u;w(e?t:t.prototype,c,p,f?"#"+d:function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(d),h,h<2?[]:e?a=a||[]:o=o||[],l,!!e,f,r,e&&f?function(e){return function(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(null!==t?typeof t:"null"));return t}(e)===t}:i)}}})(8,0),u(0,0),u(8,1),u(0,1),c(o),c(a),d=l,y||S(t),{e:d,get c(){var _=[];return y&&[S(t=w(t,[e],r,t.name,5,_)),b(_,1)]}}}function 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,O,L,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),O(this));beforeroutechange=(L(this),k(this));routechange=(j(this),N(this));error=(A(this),M(this));scrollContainer=(R(this),I(this));scrollIgnoreHash=(H(this),D(this));trigger=(V(this),z(this,iO));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}=iO.getParams();this.locationStore({path:t,params:this.currentParams,query:e,hash:n,data:r})};#J=()=>{if(!this.#q)return;let t=iK.get(iO.currentKey);t?this.#q.scroll(0,t):(this.scrollIgnoreHash||!iO.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(iO,"beforechange",()=>iK.set(iO.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===iO&&(location.href!==iL.url||r?.title)&&iL({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 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`
|
|
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,P,x,L,O,k,j,N,A,M,R,I,H,D,V,z,U,W,G,q,K,B,J,F,Y,Z,Q,X,tt,te,tn,tr,ti,ts,to,ta,tl,tc,tu,th,td,tf,tp,tm,tg,ty,tb,tv,tw,tS,t_,t$,tE,tC,tT,tP,tx,tL,tO,tk,tj,tN,tA,tM,tR,tI,tH,tD,tV,tz,tU,tW,tG,tq,tK,tB,tJ,tF,tY,tZ,tQ,tX,t0,t1,t2,t3,t8,t4,t7,t6,t5,t9,et,ee,en,er,ei,es,eo,ea,el,ec,eu,eh,ed,ef,ep,em,eg,ey,eb,ev,ew,eS,e_,e$,eE,eC,eT,eP,ex,eL,eO,ek,ej,eN,eA,eM,eR,eI,eH,eD,eV,ez,eU,eW,eG,eq,eK,eB,eJ;var eF={};eF.d=(t,e,n)=>{var r=(e,n)=>{for(var r in e)eF.o(e,r)&&!eF.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,[n]:e[r]})};r(e,"get"),r(n,"value")},eF.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),eF.r=t=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var eY={};eF.r(eY),eF.d(eY,{adoptedStyle:()=>rM,aria:()=>rV,async:()=>rD,attribute:()=>ry,boolattribute:()=>rb,connectStore:()=>rR,customElement:()=>rz,effect:()=>r_,emitter:()=>rj,fallback:()=>rP,globalemitter:()=>rN,light:()=>rH,memo:()=>rS,mounted:()=>rC,numattribute:()=>rv,part:()=>rk,property:()=>rw,shadow:()=>rI,slot:()=>rO,state:()=>rx,template:()=>rT,unmounted:()=>r$,willMount:()=>rE});var eZ={};eF.r(eZ),eF.d(eZ,{GemElement:()=>n7,SheetToken:()=>nK,UpdateToken:()=>nB,_RenderErrorEvent:()=>nF,_createTemplate:()=>r,_renderRoot:()=>nU,createState:()=>n,css:()=>n0,html:()=>nI,render:()=>nH,setEngine:()=>nD,setHydrationEngine:()=>nz});var eQ={};eF.r(eQ),eF.d(eQ,{_StoreListenerMap:()=>nO,_getUpdatedStores:()=>nN,_setStoreRestorer:()=>nA,connect:()=>nR,createStore:()=>nM});var eX={};eF.r(eX),eF.d(eX,{version:()=>i_});let{get:e0,set:e1,has:e2,deleteProperty:e3,defineProperty:e8,getOwnPropertyDescriptor:e4,ownKeys:e7}=Reflect,e6=globalThis.__GEM_SSR__,e5=!!e6,e9=e6?(t,e)=>{let n=e6();return n?(n.has(t)||n.set(t,e()),n.get(t)):t}:t=>t,nt=e6?t=>{let e=()=>({...t});return new Proxy(t,{get:(n,r)=>e0(e9(t,e),r),set:(n,r,i)=>e1(e9(t,e),r,i),has:(n,r)=>e2(e9(t,e),r),deleteProperty:(n,r)=>e3(e9(t,e),r),defineProperty:(n,r,i)=>e8(e9(t,e),r,i),getOwnPropertyDescriptor:(n,r)=>e4(e9(t,e),r),ownKeys:()=>e7(e9(t,e))})}:t=>t,{assign:ne,fromEntries:nn,entries:nr,keys:ni,defineProperty:ns,hasOwn:no}=Object,na=new Set,nl=()=>new Set;function nc(t){let e=e9(na,nl);!e.has(t)&&(Promise.resolve().then(()=>{e.delete(t),t()}),e.add(t))}function nu(t,e){for(let n of["name","length"])e&&no(e,n)&&ns(t,n,{value:e[n],writable:!0,enumerable:!0,configurable:!0});ne(t,e)}function nh(t,e){return delete e.name,delete e.length,nu(e,t),e}function nd(t="",e=""){let{pathname:n,search:r,hash:i}=new URL(e,location.origin+t);return n+r+decodeURIComponent(i)}function nf(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}class np 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 nm extends WeakMap{get(t){let e=super.get(t);return e||(e={},this.set(t,e)),e}}class ng extends URLSearchParams{concat(t){nr("string"==typeof t?nn(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 ny(t,...e){return t.reduce((t,n,r)=>t+(e[r-1]??"")+n)}let nb=ny;function nv(t=5){let e=Math.random().toString(36).slice(2,2+t);return e.length<t?e+nv(t-e.length):e}function nw(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 n_(t){return ni(t).forEach(e=>{delete t[e]}),t}class n$ extends Error{constructor(t){super(t),this.message=`gem: ${this.message}`}}function nE(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 nT(t){return nC(t,";",(t,e)=>e||0===e?`${nw(t)}:${e}`:"")}function nP(t){return nC(t," ",(t,e)=>e?t:"")}let nx=nP;function nL(t){return nC(t,",",(t,e)=>!0===e||t===e?t:e?`${t}:${e}`:"")}let nO=new WeakMap,nk=()=>new Set,nj=new Map,nN=()=>e9(nj,()=>new Map);function nA(e){t=e}function nM(e,n){let r=nk(),i=nt(nh(e,t=>{if(nu(i,t),r.forEach(nc),!e5)return;e9(r,nk).forEach(nc);let e=nN();n&&e!==nj&&e.set(n,i)}));return n&&t&&nu(i,t(n)),nO.set(i,r),i}function nR(t,e){let n=nO.get(t),r=n&&e9(n,nk);return r?.add(e),()=>r?.delete(e)}let nI=(t,...e)=>ny(t,...e.map(t=>t instanceof Element?t.outerHTML:t)),nH=(t,e)=>e.innerHTML=t;function nD(t,e){nI=t,nH=e}let nV=(t,e)=>{};function nz(t,n){nV=t,e=n}let nU=(t,e)=>nV(t,e)||nH(t,e),{assign:nW,defineProperty:nG}=Object;nG(Symbol,"metadata",{value:Symbol.for("Symbol.metadata")});let nq=t=>"function"==typeof t&&t(),nK=Symbol.for("gem@sheetToken"),nB=Symbol.for("gem@update"),nJ="gem-style-boundary",nF="gem@render-error",nY=new WeakMap,nZ=new WeakMap;class nQ 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 nX{#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 nQ({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(${nJ}) > *)`,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 n0(t,...e){let n="",r="",i=e.at(0);Array.isArray(t)?r=ny(t,...e):void 0!==i?(n=t,r=i):r=t;let s=new nX(n),o={[nK]:s},a="";return"string"==typeof r?a=r:Object.keys(r).forEach(t=>{let e="$"===t;o[t]=e||t.includes("-")?t:`${t}-${nv()}`,a+=`${e?":where(&:not([hidden])),:host(:where(:not([hidden])))":`.${o[t]}`} {${r[t]}}`}),s.setContent(a),o}let n1=(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&&nc(nZ.get(t))};function n2(t){t?.forEach(t=>{let{callback:e,getDep:n,values:r,preCallback:i}=t,s=n?.();(!n||!r||nE(r,s))&&(nq(i),t.preCallback=e(s,r),t.values=s,t.initialized=!0)})}function n3(t){return t.filter(t=>(nq(t.preCallback),t.initialized=!1,t.values=void 0,t.fixed))}let n8=new np,n4=(t=performance.now())=>{if(performance.now()>t+50)return requestAnimationFrame(n4);let e=n8.get();if(e){try{e()}catch(t){reportError(t)}n4(t)}};n8.addEventListener("start",()=>nc(n4));class n7 extends HTMLElement{#h;#d;#f=[];#p=[];#m=[];#g;#y;#b;#v;#w;[nB](){this.#y&&nc(this.#S)}static{n=t=>{let e=i,n=nh(t,t=>{let r=e.#f.at(0);if(!e5&&e.#y&&r&&!r.initialized)throw new n$("Don't set state sync before insert the DOM");nu(n,t),!e.#v&&e.#y&&nc(e.#S)});return e.#d.stateList.push(n),n},r=(t,e)=>t.#m.push(e)}constructor(){let t;super(),i=this;let{aria:e,mode:n,delegatesFocus:r,...s}=this.#_,{focusable:o,...a}=e||{};this.#h=n?this.shadowRoot||this.attachShadow({mode:n,delegatesFocus:r,...s}):this,this.#d=this.attachInternals(),this.#d.stateList=[],this.#d.sheets=[],nW(this.#d,a),this.#f.push({fixed:!0,getDep:()=>[this.disabled],callback:([e=!1])=>{if(void 0===t&&(t=this.hasAttribute("tabindex")),this.#d.ariaDisabled=String(e),o&&!t&&(this.tabIndex=-Number(e)),(o||r)&&e)return nf(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=()=>{n2(this.#f)};#C=()=>{n2(this.#p)};#T=t=>{try{this.#v=!0,this.#C();let e=this.#h===this,n=t?t.render():e?void 0:nI`<slot></slot>`;if(void 0===n)return;let r=n??(e?nI`<style>@scope{&{display:none!important;}}</style>`:nI`<style>:host{&{display:none!important;}}</style>`);nU(r,this.#h)}catch(e){let t=new CustomEvent(nF,{bubbles:!0,composed:!0,cancelable:!0,detail:e});if(this.dispatchEvent(t))throw e}finally{this.#v=!1}};#P=()=>{let t=this.#$;this.#y&&(t||!this.#m.length)&&(this.#T(t),e5||nc(this.#E))};#S=()=>{this.#_.noBlocking&&!e5?n8.add(this.#P):this.#P()};#x=()=>{let{adoptedStyleSheets:t=[]}=this.#_,{shadowRoot:e,sheets:n}=this.#d,r=t.map(t=>t[nK].getStyle(this));if(!e)return this.prepend(...n.map(t=>t.element)),((t,e)=>{let n=t.getRootNode();if(!nY.has(n)){let t=new Map;nY.set(n,t),nZ.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=nY.get(n);return n1(r,e,1),()=>n1(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=()=>{if(this.#g){this.#g=!1,this.#w?.(),this.#w=this.#x();return}this.#b=!0,this.#O();let{observedStores:t,mode:n,penetrable:r}=this.#_;this.#d.states.add("gem-element"),n||!this.#m.length||r||this.#d.states.add(nJ),this.#k=t?.map(t=>nR(t,this.#S)),e?.(this),this.#T(this.#$),this.#y=!0,this.#w=this.#x(),e5||nc(this.#L)};connectedCallback(){this.#_.noBlocking&&!e5?n8.add(this.#j):this.#j()}disconnectedCallback(){if(this.isConnected){this.#g=!0;return}n8.delete(this.#j),n8.delete(this.#P),this.#y=!1,this.#k?.forEach(t=>t()),this.#f=n3(this.#f),this.#p=n3(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=()=>nc(this.#S)}let{deleteProperty:n6,getOwnPropertyDescriptor:n5,defineProperty:n9}=Reflect,{getPrototypeOf:rt,assign:re,hasOwn:rn}=Object,rr=new nm;function ri(t,e,n){let r=t.metadata;n5(r,e)||n9(r,e,{value:r[e]?.filter(t=>t!==n)||[]}),r[e].push(n)}function rs(t,e){let{value:n}=n5(t,e)||{};n6(t,e),t[e]=n}let ro=new WeakMap,{setAttribute:ra,toggleAttribute:rl,removeAttribute:rc}=Element.prototype,ru=(t,e)=>ro.get(rt(t))?.get(e);function rh(){}n7.prototype.setAttribute=function(t,e){let n=ru(this,t);if(!n)return ra.call(this,t,e);this[n]=e},n7.prototype.removeAttribute=function(t){let e=ru(this,t);if(!e)return rc.call(this,t);this[e]=null},n7.prototype.toggleAttribute=function(t,e){let n=ru(this,t);return n?this[n]=e??!this.hasAttribute(t):rl.call(this,t,e)};let rd=Symbol("event handle");function rf(t,e,{attr:n,attrType:r,event:i,eventOptions:s}={}){n9(t,e,{configurable:!0,get(){let t=rr.get(this)[e];return i&&!t?(this[e]=rh,this[e]):t},set(t){let o=this,a=rr.get(o);n&&((t=r===Boolean&&""===t||r(t||""))?ra.call(this,n,r===Boolean?"":t):rc.call(this,n)),t!==a[e]&&(i?(a[e]=t?.[rd]?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][rd]=!0):(a[e]=t,this[nB]()))}})}let rp=new WeakMap;function rm(t,{metadata:e}){let n=rp.get(e);if(n)return n;let r=t;do r=rt(r);while(r.constructor[Symbol.metadata]!==e);return rp.set(e,r),r}function rg(t,e){let n=t.name,r=nw(n);return t.addInitializer(function(){let i=rm(this,t);rn(i,n)||(ri(t,"observedAttributes",r),rf(i,n,{attr:r,attrType:e})),rs(this,n);let s=rt(this),o=ro.get(s)||new Map;o.set(r,n),ro.set(s,o)}),function(t){return this.getAttribute(r)??t}}function ry(t,e){return rg(e,String)}function rb(t,e){return rg(e,Boolean)}function rv(t,e){return rg(e,Number)}function rw(t,e){let n=e.name;return e.addInitializer(function(){let t=rm(this,e);rn(t,n)||(ri(e,"observedProperties",n),rf(t,n)),rs(this,n)}),function(t){return this[n]??t}}function rS(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 n$("not support");let t=n5(rm(this,n),i).get.bind(this);this.memo(()=>{n9(this,i,{configurable:!0,value:t()})},e)}else this.memo(s.get.call(this,this).bind(this),e)})}}function r_(t){return(e,{addInitializer:n,access:r})=>{n(function(){this.effect(r.get.call(this,this).bind(this),t&&(()=>t(this)))})}}function r$(){return(t,{addInitializer:e,access:n})=>{e(function(){this.effect(()=>n.get.call(this,this).bind(this),()=>[])})}}function rE(){return rS(()=>[])}function rC(){return r_(()=>[])}function rT(t){return(e,{addInitializer:n,access:i})=>{n(function(){r(this,{render:i.get.call(this,this).bind(this),condition:t&&(()=>t(this))})})}}function rP(){return(t,{addInitializer:e,access:n})=>{e(function(){this.addEventListener(nF,t=>{t.preventDefault(),nU(n.get.call(this,this).apply(this,[t.detail]),this.internals.shadowRoot||this)})})}}function rx(t,e){let n=e.name,r=nw(n);e.addInitializer(function(){let t=rm(this,e);!rn(t,n)&&(ri(e,"definedCSSStates",r),n9(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)}}));rs(this,n)})}function rL(t,e,n,r){let i=t.name,s=nw(i);if(t.static)ri(t,n,s);else{let r=rt(e);r[i]||(r[i]=s,ri(t,n,s))}return r||s}function rO(t,e){return function(t){return rL(e,this,"definedSlots",t)}}function rk(t,e){return function(t){return rL(e,this,"definedParts",t)}}function rj(t,e){rA(e)}function rN(t,e){rA(e,{bubbles:!0,composed:!0})}function rA(t,e){let n=t.name,r=nw(n);t.addInitializer(function(){let i=rm(this,t);rn(i,n)||(ri(t,"definedEvents",r),rf(i,n,{event:r,eventOptions:e})),rs(this,n)})}function rM(t){return(e,n)=>{ri(n,"adoptedStyleSheets",t)}}function rR(t){return(e,n)=>{ri(n,"observedStores",t)}}function rI({mode:t="open",serializable:e=!0,...n}={}){return(r,i)=>{re(i.metadata,{mode:t,serializable:e,...n})}}function rH({penetrable:t}){return(e,n)=>{n.metadata.penetrable=t}}function rD(){return(t,e)=>{e.metadata.noBlocking=!0}}function rV(t){return(e,n)=>{let r=n.metadata;r.aria={...r.aria,...t}}}function rz(t){return(e,{addInitializer:n})=>{n(()=>{customElements.define(t,e)})}}let rU=globalThis.trustedTypes,rW=rU?.createPolicy("lit-html",{createHTML:t=>t}),rG="$lit$",rq=`lit$${Math.random().toFixed(9).slice(2)}$`,rK="?"+rq,rB=`<${rK}>`,rJ=document,rF=()=>rJ.createComment(""),rY=t=>null===t||"object"!=typeof t&&"function"!=typeof t,rZ=t=>null==t,rQ=`[
|
|
2
|
+
\f\r]`,rX=`[^
|
|
3
|
+
\f\r"'\`<>=]`,r0=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,r1=/-->/g,r2=/>/g,r3=RegExp(`>|${rQ}(?:([^\\s"'>=/]+)(${rQ}*=${rQ}*(?:${rX}|("|')|))|$)`,"g"),r8=/'/g,r4=/"/g,r7=/^(?:script|style|textarea|title)$/i,r6="v-if",r5="v-else-if",r9="v-else";class it{type;strings;values;constructor(t,e,n){this.type=t,this.strings=e,this.values=n}}let ie=t=>(e,...n)=>new it(t,e,n),ir=ie(1),ii=ie(2),is=ie(3),io=Symbol.for("lit-noChange"),ia=new WeakMap,il=rJ.createTreeWalker(rJ,129);class ic{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=r0;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===r0?"!--"===a[1]?o=r1:void 0!==a[1]?o=r2:void 0!==a[2]?(r7.test(a[2])&&(n=RegExp(`</${a[2]}`,"g")),o=r3):void 0!==a[3]&&(o=r3):o===r3?">"===a[0]?(o=n??r0,c=-1):void 0===a[1]?c=-2:(c=o.lastIndex-a[2].length,r=a[1],o=void 0===a[3]?r3:'"'===a[3]?r4:r8):o===r4||o===r8?o=r3:o===r1||o===r2?o=r0:(o=r3,n=void 0);let h=o===r3&&t[e+1].startsWith("/>")?" ":"";s+=o===r0?l+rB:c>=0?(i.push(r),l.slice(0,c)+rG+l.slice(c)+rq+h):l+rq+(-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!==rW?rW.createHTML(e):e}(t,a),i]})(t,e);if(this.el=ic.createElement(l,n),il.currentNode=this.el.content,2===e||3===e){let t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=il.nextNode())&&a.length<o;){if(1===r.nodeType){if(r.hasAttributes())for(let t of r.getAttributeNames())if(t.endsWith(rG)){let e=c[s++],n=r.getAttribute(t).split(rq),o=/([.?@])?(.*)/.exec(e);a.push({type:1,index:i,name:o[2],strings:n,ctor:"."===o[1]?ig:"?"===o[1]?iy:"@"===o[1]?ib:im}),r.removeAttribute(t)}else t.startsWith(rq)&&(a.push({type:6,index:i}),r.removeAttribute(t));if(r7.test(r.tagName)){let t=r.textContent.split(rq),e=t.length-1;if(e>0){r.textContent=rU?rU.emptyScript:"";for(let n=0;n<e;n++)r.append(t[n],rF()),il.nextNode(),a.push({type:2,index:++i});r.append(t[e],rF())}}}else if(8===r.nodeType)if(r.data===rK)a.push({type:2,index:i});else{let t=-1;for(;-1!==(t=r.data.indexOf(rq,t+1));)a.push({type:7,index:i}),t+=rq.length-1}i++}}static createElement(t,e){let n=rJ.createElement("template");return n.innerHTML=t,n}}function iu(t,e,n=t,r){if(e===io)return e;let i=void 0!==r?n.__directives?.[r]:n.__directive,s=rY(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=iu(t,i._$resolve(t,e.values),i,r)),e}class ih{_$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??rJ).importNode(e,!0);il.currentNode=s;let o=il.nextNode(),a=0,l=0,c=n[0];for(;void 0!==c;){if(a===c.index){let e;2===c.type?e=new ip(o,o.nextSibling,this,t):1===c.type?(c.name===r6&&r.set(o,l),c.name===r5&&i.set(o,l),e=new c.ctor(o,c.name,c.strings,this,t)):6===c.type&&(e=new iv(o,this,t)),this._$parts.push(e),c=n[++l]}a!==c?.index&&(o=il.nextNode(),a++)}let u=new Map;for(let t of(r.forEach((t,e)=>{let n=new id(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 il.currentNode=rJ,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===r6||n.name===r5||n._$setValue(t[e])),e++;this._$conditions.forEach(e=>e.update(t))}}class id{mark;list;constructor(t,e){let n=rF();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(r9)&&(this.list.push({ele:t}),t.removeAttribute(r9))}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 ip{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&&(rY(t=iu(this,t,e))?rZ(t)||""===t?(rZ(this._$committedValue)||this._$clear(),this._$committedValue=void 0):t!==this._$committedValue&&t!==io&&this._commitText(t):t instanceof it?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){!rZ(this._$committedValue)&&rY(this._$committedValue)?this._$startNode.nextSibling.data=t:this._commitNode(rJ.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 ih(n,this),r=t._clone(this.options);t._update(e),this._commitNode(r),this._$committedValue=t}}_$getTemplate(t){let e=ia.get(t.strings);return void 0===e&&ia.set(t.strings,e=new ic(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 ip(this._insert(rF()),this._insert(rF()),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 im{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=!rY(t=iu(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=iu(this,a[n+r],e,r),s||=!rY(o)||o!==this._$committedValue[r],rZ(o)?t=void 0:rZ(t)||(t+=o+i[r+1]),this._$committedValue[r]=o}s&&!r&&this._commitValue(t)}_commitValue(t){rZ(t)?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t)}}class ig extends im{type=3;_commitValue(t){this.element[this.name]=t}}class iy extends im{type=4;_commitValue(t){this.element.toggleAttribute(this.name,!!t)}}class ib extends im{type=5;_$setValue(t,e=this){t=iu(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 iv{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 iS)t.value=this.element;else if(t._$litDirective$)iu(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 iw=()=>new iS;class iS{value}let i_="2.2.15",i$=t=>(...e)=>({_$litDirective$:t,values:e});class iE{__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 iC=(t,e,n)=>{let r=t._$startNode.parentNode,i=void 0===e?t._$endNode:e._$startNode;if(void 0===n)n=new ip(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},iT=(t,e,n=t)=>(t._$setValue(e,n),t),iP={},ix=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},iO=i$(class extends iE{_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]=iT(o[h],a[f]),h++,f++;else if(c[d]===l[p])u[p]=iT(o[d],a[p]),d--,p--;else if(c[h]===l[p])u[p]=iT(o[h],a[p]),iC(t,u[p+1],o[h]),h++,p--;else if(c[d]===l[f])u[f]=iT(o[d],a[f]),iC(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=iC(t,o[h]);iT(e,a[f]),u[f]=e}else u[f]=iT(n,a[f]),iC(t,o[h],n),o[e]=null;f++}else ix(o[d]),d--;else ix(o[h]),h++;for(;f<=p;){let e=iC(t,u[p+1]);iT(e,a[f]),u[f++]=e}for(;h<=d;){let t=o[h++];null!==t&&ix(t)}return this._itemKeys=l,((t,e=iP)=>t._$committedValue=e)(t,u),io}});nD(ir,(t,e,n)=>{let r=n?.renderBefore??e,i=r._$litPart$;if(void 0===i){let t=n?.renderBefore??null;r._$litPart$=i=new ip(e.insertBefore(rF(),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__,{...eZ,...eY,...eQ,...eX});let ik=globalThis.history,ij=ik.pushState.bind(ik),iN=ik.replaceState.bind(ik),iA=0,iM=()=>`${performance.now()}-${++iA}`,iR=nM({$hasCloseHandle:!1,$hasOpenHandle:!1,$hasShouldCloseHandle:!1,$key:""}),iI=new Map,iH=()=>new Map([...iI].map(([t,e])=>[t,{...e}]));function iD(t){let{$key:e,$hasCloseHandle:n,$hasOpenHandle:r,$hasShouldCloseHandle:i}=t||{};if(iR.$key!==e){if(e)throw new n$("`$key` is not allowed");if(n)throw new n$("`$hasCloseHandle` is not allowed");if(r)throw new n$("`$hasOpenHandle` is not allowed");if(i)throw new n$("`$hasShouldCloseHandle` is not allowed")}}function iV(t){return iJ.basePath?iJ.basePath+t:t}function iz(t){return t===iJ.basePath?"/":t.replace(RegExp(`^${iJ.basePath}/`),"/")}function iU(){iJ.dispatchEvent(new CustomEvent("beforechange"))}function iW(t){let e=iJ.getParams()||{path:iz(location.pathname),query:new ng},n=t.path?nd(e.path,t.path):iz(location.pathname),r=new ng(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 iG(t,e){iD(t.data);let n=iW(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};e9(iI,iH).set(h.$key,n),iU(),n_(iR),iR(h);let d=iV(i)+new ng(s)+o,f=decodeURIComponent(location.hash);e(h,r,d),f!==o&&dispatchEvent(new CustomEvent("hashchange"))}function iq(t,e,n,r){iD(t);let i={$key:iM(),$title:e,...t||{}},{pathname:s,search:o,hash:a}=new URL(n,location.origin+location.pathname),l=iW({path:s,query:new ng(o),hash:a,title:e,data:t});e9(iI,iH).set(i.$key,l),iU(),n_(iR),iR(i);let c=iV(s)+l.query+a,u=location.hash;r(i,e,c),u!==a&&dispatchEvent(new CustomEvent("hashchange"))}let iK=nM({basePath:""});class iB extends EventTarget{get store(){return iR}get currentKey(){return iR.$key}get basePath(){return iK.basePath}set basePath(t){iK({basePath:t}),Object.assign(this.getParams(),{path:iz(location.pathname)})}getParams(){return e9(iI,iH).get(iR.$key)}updateParams(t){Object.assign(this.getParams(),t),iR()}push(t){iG(t,ij)}replace(t){iG(t,iN)}pushIgnoreCloseHandle(t){iR.$hasCloseHandle?(this.getParams()?.close?.(),this.replace(t)):this.push(t)}forward(){ik.forward()}back(){ik.back()}}let iJ=new iB,iF=nM({defaultTitle:document.title,url:"",title:""});if(!globalThis._GEMHISTORY){if(globalThis._GEMHISTORY={history:iJ,titleStore:iF,basePathStore:iK},ik.pushState=(t,e,n)=>{iq(t,e,n,ij)},ik.replaceState=(t,e,n)=>{iq(t,e,n,iN)},addEventListener("hashchange",({isTrusted:t})=>{t&&iJ.replace({hash:location.hash})}),ik.state)if(ik.state.$hasCloseHandle){iR(ik.state);let t=iW({title:document.title});e9(iI,iH).set(iR.$key,t),iJ.back()}else{let t=iW({title:document.title,hash:location.hash});iR({$key:iM(),...ik.state||{}}),e9(iI,iH).set(iR.$key,t)}else{let{protocol:t,pathname:e,search:n,hash:r}=location;(t.startsWith("http")||t.startsWith("tauri"))&&iJ.replace({path:e,query:n,hash:r})}nR(iF,()=>{let t=iJ.getParams();t&&(t.title=iF.title)}),nR(iR,()=>{let{title:t}=iJ.getParams();t!==iF.title&&iF({title:t})});let t=!1;addEventListener("popstate",e=>{let n=e.state;if(n?.$key){if(t){t=!1;return}if(!e9(iI,iH).has(n.$key)){let{pathname:t,search:e,hash:r}=location;e9(iI,iH).set(n.$key,{path:iz(t),query:new ng(e),hash:decodeURIComponent(r),title:iF.title||n.$title,data:n})}if(parseFloat(n.$key)>parseFloat(iR.$key)&&n.$hasOpenHandle)e9(iI,iH).get(n.$key)?.open?.();else if(iR.$hasCloseHandle){let e=e9(iI,iH).get(iR.$key),r=e?.close,i=e?.shouldClose;if(i&&!i()){t=!0,iJ.forward();return}r?r():n.$hasCloseHandle&&(t=!0,iJ.back())}iU(),n_(iR),iR(n)}})}let{history:iY,titleStore:iZ,basePathStore:iQ}=globalThis._GEMHISTORY;function iX(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 i0=Symbol();s=rR(iY.store),o=rV({role:"dialog",ariaModal:"true"}),l=n7,c=rE();class i1 extends l{static{({e:[u,h,d,f,p,m],c:[g,a]}=function(t,e,n,r,i){var s,o,a,l,c,u,h,d=Symbol.metadata||Symbol.for("Symbol.metadata"),f=Object.defineProperty,p=Object.create,m=[p(null),p(null)],g=e.length;function y(e,n,r){return function(i,s){n&&(s=i,i=t);for(var o=0;o<e.length;o++)s=e[o].apply(i,r?[s]:[]);return r?s:i}}function b(t,e,n,r){if("function"!=typeof t&&(r||void 0!==t))throw TypeError(e+" must "+(n||"be")+" a function"+(r?"":" or undefined"));return t}function v(t,e,n,r,i,s,o,a,l,c,d){function p(t){if(!d(t))throw TypeError("Attempted to access private element on non-instance")}var g=[].concat(e[0]),v=e[3],w=!o,S=1===i,_=3===i,$=4===i,E=2===i;function C(e,n,r){return function(i,s){return n&&(s=i,i=t),r&&r(i),desc[e].call(i,s)}}var T={},P=[],x=_?"get":$||S?"set":"value";if(!w&&(l?(c||S?T={get:iX(function(){return v(this)},r,"get"),set:function(t){e[4](this,t)}}:T[x]=v,c||iX(T[x],r,E?"":x)):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[x].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[x],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"))&&P.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?P.unshift(L):T[x]=L)}return i<2&&o.push(y(P,a,1),y(s,a,0)),c||w||(l?S?o.splice(-1,0,C("get",a),C("set",a)):o.push(E?T[x]:b.call.bind(T[x])):f(t,r,T)),L}function w(t){return f(t,d,{configurable:!0,enumerable:!0,value:u})}return void 0!==i&&(u=i[d]),u=p(null==u?null:u),a=[],l=function(t){t&&a.push(y(t))},(c=function(e,i){for(var l=0;l<n.length;l++){var c=n[l],u=c[1],h=7&u;if((8&u)==e&&!h==i){var d=c[2],f=!!c[3],p=16&u;v(e?t:t.prototype,c,p,f?"#"+d:function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(d),h,h<2?[]:e?o=o||[]:s=s||[],a,!!e,f,i,e&&f?function(e){return function(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(null!==t?typeof t:"null"));return t}(e)===t}:r)}}})(8,0),c(0,0),c(8,1),c(0,1),l(s),l(o),h=a,g||w(t),{e:h,get c(){var S=[];return g&&[w(t=v(t,[e],0,t.name,5,S)),y(S,1)]}}}(this,[s,o],[[ry,0,"label"],[rx,0,"opened"],[c,0,"init",function(t){return t.#N},function(t,e){t.#N=e}]],t=>#N in t,l))}label=u(this);opened=(h(this),d(this));#A=void f(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=p(this,()=>this.inert=!0);open=(m(this),()=>{if(!this.opened)return this.#H(),iY.push({title:this.label,open:this.#H,close:this.#I,shouldClose:this.shouldClose}),i0});shouldClose(){return!0}close=()=>(iY.back(),i0);forceClose=()=>(this.opened=!1,setTimeout(this.close,100),i0);static{a()}}function i2(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 i3(t){return t}let i8=Symbol("open mark");function i4(t){let e,n,r,i,s,o,a,l,c,u,h,d=Symbol();return e=rI(),n=rV({role:"alertdialog",ariaModal:"true"}),i=n7,s=rC(),o=rC(),new class extends i3{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={},P=[],x=_?"get":$||S?"set":"value";if(!w&&(l?(c||S?T={get:i2(function(){return v(this)},r,"get"),set:function(t){e[4](this,t)}}:T[x]=v,c||i2(T[x],r,E?"":x)):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[x].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[x],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"))&&P.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?P.unshift(L):T[x]=L)}return i<2&&o.push(y(P,a,1),y(s,a,0)),c||w||(l?S?o.splice(-1,0,C("get",a),C("set",a)):o.push(E?T[x]:b.call.bind(T[x])):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[i8]}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({[i8]:!0,...t});return setTimeout(()=>{n(),iY.push({title:e.label,open:n,close:this.closeHandle.bind(this),shouldClose:this.shouldClose.bind(this)})},100),d}static close(){return iY.back(),d}static closeHandle(){return this.inertStore.forEach(t=>t.inert=!1),this.instance?.remove(),this.store({[i8]:!1,...t}),d}static shouldClose(){return!0}label="";#D=a(this,()=>nR(iY.store,this.update));#V=(l(this),c(this,()=>nR(h.store,this.update)))}];inertStore=[];instance=null;store=nM({[i8]:!1,...t})},h}function i7(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 i6(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={},P=[],x=_?"get":$||S?"set":"value";if(!w&&(l?(c||S?T={get:i7(function(){return y(this)},r,"get"),set:function(t){e[4](this,t)}}:T[x]=y,c||i7(T[x],r,E?"":x)):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[x].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[x],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"))&&P.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?P.unshift(L):T[x]=L)}return i<2&&o.push(b(P,a,1),b(s,a,0)),c||w||(l?S?o.splice(-1,0,C("get",a),C("set",a)):o.push(E?T[x]:v.call.bind(T[x])):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 i5(t){return t}class i9 extends RegExp{constructor(t){let e=0;super(`^${t.replace(/((:[^/$]+)|(\*))/g,(t,n)=>"*"===n?`(?<_${e++}>.*)`:`(?<${n.slice(1)}>[^/]+)`)}$`)}}function st(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 i9(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 se(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 sn(t,e){return{path:se(t,e),...e}}let sr=nI``,si=new Map;y=rH({penetrable:!0}),v=n7,w=r_(t=>[t.scrollContainer]),S=r_(t=>[t.scrollContainer]),_=rT(t=>!t.inert),new class extends i5{constructor(){super(tr),b()}static [class extends v{static{({e:[$,E,C,T,P,x,L,O,k,j,N,A,M,R,I,H,D,V,z,U,W,G,q,K,B,J,F,Y,Z,Q],c:[tr,b]}=i6(this,[y],[[rb,0,"transition"],[rw,0,"routes"],[rw,0,"locationStore"],[rw,0,"key"],[rj,0,"loading"],[rj,0,"beforeroutechange"],[rj,0,"routechange"],[rj,0,"error"],[rw,0,"scrollContainer"],[rw,0,"scrollIgnoreHash"],[rw,0,"trigger"],[w,0,"rememberScrollPosition",function(t){return t.#z},function(t,e){t.#z=e}],[S,0,"connectTriggerStore",function(t){return t.#U},function(t,e){t.#U=e}],[r_(t=>t.#W()),0,"updateContent",function(t){return t.#G},function(t,e){t.#G=e}],[_,0,"content",function(t){return t.#a},function(t,e){t.#a=e}]],0,t=>#z in t,v))}transition=$(this);routes=(E(this),C(this));locationStore=(T(this),P(this));key=(x(this),L(this));loading=(O(this),k(this));beforeroutechange=(j(this),N(this));routechange=(A(this),M(this));error=(R(this),I(this));scrollContainer=(H(this),D(this));scrollIgnoreHash=(V(this),z(this));trigger=(U(this),W(this,iY));currentRoute=void G(this);currentParams={};get #q(){return"function"==typeof this.scrollContainer?this.scrollContainer():this.scrollContainer}#K=n({content:sr});#B=()=>{if(!this.locationStore)return;let{path:t,query:e,hash:n,data:r}=iY.getParams();this.locationStore({path:t,params:this.currentParams,query:e,hash:n,data:r})};#J=()=>{if(!this.#q)return;let t=si.get(iY.currentKey);t?this.#q.scroll(0,t):(this.scrollIgnoreHash||!iY.getParams().hash)&&this.#q.scroll(0,0)};#F;#Y=(t,e,n)=>{this.beforeroutechange(t),this.#F=void 0,this.currentRoute=t,this.currentParams=e;let r=async()=>{this.#K({content:n}),this.#B(),await Promise.resolve(),this.#J(),this.routechange(this.currentRoute)};this.transition&&"startViewTransition"in document?document.startViewTransition(()=>r()):r()};#z=q(this,()=>{if(this.#q)return nf(iY,"beforechange",()=>si.set(iY.currentKey,this.#q.scrollTop))});#U=(K(this),B(this,()=>this.trigger.store&&nR(this.trigger.store,()=>this.#K())));#W=(J(this),()=>{let{path:t,query:e,hash:n}=this.trigger.getParams();return[this.key,t,e,n]});#G=F(this,([t,e],n)=>{n&&t===n[0]&&e===n[1]?this.#B():this.update()});#a=(Y(this),Z(this,()=>{let{content:t}=this.#K;if(void 0!==t){if(!this.shadowRoot){if(t===sr)return;return nI`${t}`}return t===sr?nI`<slot></slot>`:t}}));update=(Q(this),async()=>{let{path:t,hash:e,query:n}=this.trigger.getParams(),{route:r,params:i={}}=ti.findRoute(this.routes,t),{redirect:s,content:o,getContent:a}=r||{};if(s)return void this.trigger.replace({path:se({pattern:s},{params:i}),query:n,hash:e});this.trigger===iY&&(location.href!==iZ.url||r?.title)&&iZ({url:location.href,title:r?.title});let l=o||a?.(i,this.shadowRoot||this);this.loading(r),this.#F=l;let c=()=>this.#F===l;try{let t=await l;c()&&this.#Y(r,i,t)}catch(t){c()&&this.error(t)}})}];createLocationStore=()=>{let{path:t,query:e,hash:n,data:r}=iY.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=st(r.pattern,e);if(t)return{route:r,params:t}}return{route:n}}};let ss=n0`
|
|
4
4
|
:host(:where(:not([hidden]))),
|
|
5
5
|
:not(:defined) {
|
|
6
6
|
display: contents;
|
|
7
7
|
}
|
|
8
|
-
`;
|
|
8
|
+
`;X=rI(),tt=rM(ss),tn=tr;class so extends tn{static{({c:[ti,te]}=i6(this,[X,tt],[],0,void 0,tn))}static{te()}}function sa(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 sl(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={},P=[],x=_?"get":$||S?"set":"value";if(!w&&(l?(c||S?T={get:sa(function(){return y(this)},r,"get"),set:function(t){e[4](this,t)}}:T[x]=y,c||sa(T[x],r,E?"":x)):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[x].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[x],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"))&&P.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?P.unshift(L):T[x]=L)}return i<2&&o.push(b(P,a,1),b(s,a,0)),c||w||(l?S?o.splice(-1,0,C("get",a),C("set",a)):o.push(E?T[x]:v.call.bind(T[x])):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 sc(t){return t}function su(t){return!t.startsWith("/")}let sh=n0`
|
|
9
9
|
:host {
|
|
10
10
|
/* link default style */
|
|
11
11
|
cursor: pointer;
|
|
@@ -19,11 +19,11 @@ let t,e,n,r,i,s,o,a,l,c,u,h,d,f,p,m,g,y,b,v,w,S,_,$,E,C,T,x,P,O,L,k,j,N,A,M,R,I,
|
|
|
19
19
|
a:visited {
|
|
20
20
|
color: unset;
|
|
21
21
|
}
|
|
22
|
-
`;tr=rg(ik),ti=rm(i0),ts=ry(),to=rw({focusable:!0}),tl=nV,tc=rs(),tu=ro(),new class extends iZ{constructor(){super(tF),ta()}static [class extends tl{static{({e:[tM,th,td,tf,tp,tm,tg,ty,tb,tv,tw,tS,t_,t$,tE,tC,tT,tx,tP,tO,tL,tk,tj,tN,tA,tR,tI,tH],c:[tF,ta]}=iY(this,[tr,ti,ts,to],[[rh,8,"link"],[n6,0,"href"],[n6,0,"target"],[n6,0,"path"],[n6,0,"query"],[n6,0,"hash"],[n6,0,"hint"],[n5,0,"preload"],[rt,0,"route"],[rt,0,"options"],[rt,0,"routeOptions"],[rt,0,"prepare"],[tc,2,"init",function(){this.addEventListener("click",this.#Y),this.addEventListener("pointerenter",this.#Z)}],[tu,0,"content",function(t){return t.#a},function(t,e){t.#a=e}]],0,t=>#N in t,tl))}constructor(...t){super(...t),tI(this)}href=(tH(this),tf(this));target=(tp(this),tm(this));path=(tg(this),ty(this));query=(tb(this),tv(this));hash=(tw(this),tS(this));hint=(t_(this),t$(this));preload=(tE(this),tC(this));route=(tT(this),tx(this));options=(tP(this),tO(this));routeOptions=(tL(this),tk(this));prepare=(tj(this),tN(this));get #X(){return this.routeOptions||this.options}get #tt(){return this.hint||"on"}#Y=(tA(this),async t=>{t.preventDefault();let e=this._getLocationString();if(!e)return;if(iX(e))switch(this.target){case"_self":window.location.href=e;return;case"_parent":window.parent.location.href=e;return;case"_top":window.top.location.href=e;return;default:window.open(e);return}let{path:n,query:r,hash:i}=iO.getParams();if(n+r+i!==e)if(await this.prepare?.(),this.route)iO.pushIgnoreCloseHandle(iq(this.route,this.#X));else if(this.href){let t=new URL(e,location.origin);iO.pushIgnoreCloseHandle({path:t.pathname,query:t.search,hash:t.hash})}else iO.pushIgnoreCloseHandle({path:this.path,query:this.query,hash:this.hash})});#te=()=>{let t=this._getLocationString();return iX(t)?t:new URL(iO.basePath+t,location.origin).toString()};#Z=()=>{this.route?.content,this.route?.getContent?.({},this.shadowRoot)};get #N(){return tM}#a=tR(this,()=>{let t="off"===this.#tt?null:this.#te();return ny`<a part=${tF.link} href=${t} tabindex="-1"><slot></slot></a>`});_getLocationString(){if(this.route){let t=this.#X?.query||"",e=this.#X?.hash||"";return iG(this.route,this.#X)+t+e}{let t=this.href||this.path+this.query+this.hash,{path:e,query:n}=iO.getParams();return t.startsWith("#")?`${e}${n}${t}`:t.startsWith("?")?`${e}${t}`:t.startsWith(".")?e7(e,t):t}}}];link=(()=>{let t=th();return td(),t})()},tD=rg(iO.store),tz=tF,tW=rn();class i1 extends tz{static{({e:[tU,tG,tq,tB,tK,tJ],c:[tQ,tV]}=iY(this,[tD],[[n6,0,"pattern"],[rl,0,"active"],[tW,0,"updateState",function(t){return t.#tn},function(t,e){t.#tn=e}]],0,t=>#tn in t,tz))}constructor(...t){super(...t),tJ(this)}pattern=tU(this);active=(tG(this),tq(this));#tn=(tB(this),tK(this,()=>{let{path:t,query:e,hash:n}=iO.getParams(),r=this.pattern&&iU(this.pattern,t);this.active=!!r||t+e+n===this._getLocationString()}));static{tV()}}function i2(t,e,n){"symbol"==typeof e&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:n?n+" "+e:e})}catch(t){}return t}customElements.define("gem-link",tF),customElements.define("gem-active-link",tQ);let i3="gem-reflect-end",i8=t=>new Comment(t);tY=ri(),tZ=rn(t=>[t.target]);class i4 extends nV{static{({e:[tX,t0,t1,t2,t3,t8,t4,t7]}=function(t,e,n,r){var i,s,o,a,l,c,u,h=Symbol.metadata||Symbol.for("Symbol.metadata"),d=Object.defineProperty,f=Object.create,p=[f(null),f(null)],m=e.length;function g(e,n,r){return function(i,s){n&&(s=i,i=t);for(var o=0;o<e.length;o++)s=e[o].apply(i,r?[s]:[]);return r?s:i}}function y(t,e,n,r){if("function"!=typeof t&&(r||void 0!==t))throw TypeError(e+" must "+(n||"be")+" a function"+(r?"":" or undefined"));return t}function b(t,e,n,r,i,s,o,a,l,h,f){function m(t){if(!f(t))throw TypeError("Attempted to access private element on non-instance")}var b=[].concat(e[0]),v=e[3],w=!o,S=1===i,_=3===i,$=4===i,E=2===i;function C(e,n,r){return function(i,s){return n&&(s=i,i=t),r&&r(i),desc[e].call(i,s)}}var T={},x=[],P=_?"get":$||S?"set":"value";if(!w&&(l?(h||S?T={get:i2(function(){return v(this)},r,"get"),set:function(t){e[4](this,t)}}:T[P]=v,h||i2(T[P],r,E?"":P)):h||(T=Object.getOwnPropertyDescriptor(t,r)),!h&&!l)){if((u=p[+a][r])&&(u^i)!=7)throw Error("Decorating two elements with the same name ("+T[P].name+") is not supported yet");p[+a][r]=i<3?1:i}for(var O=t,L=b.length-1;L>=0;L-=n?2:1){var k=y(b[L],"A decorator","be",!0),j=n?b[L-1]:void 0,N={},A={kind:["field","accessor","method","getter","setter","class"][i],name:r,metadata:c,addInitializer:(function(t,e){if(t.v)throw TypeError("attempted to call addInitializer after decoration was finished");y(e,"An initializer","be",!0),s.push(e)}).bind(null,N)};if(w){u=k.call(j,O,A),N.v=1,y(u,"class decorators","return")&&(O=u);continue}if(A.static=a,A.private=l,u=A.access={has:l?f.bind():function(t){return r in t}},$||(u.get=l?E?function(t){return m(t),T.value}:C("get",0,m):function(t){return t[r]}),E||_||(u.set=l?C("set",0,m):function(t,e){t[r]=e}),O=k.call(j,S?{get:T.get,set:T.set}:T[P],A),N.v=1,S){if("object"==typeof O&&O)(u=y(O.get,"accessor.get"))&&(T.get=u),(u=y(O.set,"accessor.set"))&&(T.set=u),(u=y(O.init,"accessor.init"))&&x.unshift(u);else if(void 0!==O)throw TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else y(O,(h?"field":"method")+" decorators","return")&&(h?x.unshift(O):T[P]=O)}return i<2&&o.push(g(x,a,1),g(s,a,0)),h||w||(l?S?o.splice(-1,0,C("get",a),C("set",a)):o.push(E?T[P]:y.call.bind(T[P])):d(t,r,T)),O}function v(t){return d(t,h,{configurable:!0,enumerable:!0,value:c})}return c=f(null==c?null:c),o=[],a=function(t){t&&o.push(g(t))},(l=function(e,a){for(var l=0;l<n.length;l++){var c=n[l],u=c[1],h=7&u;if((8&u)==e&&!h==a){var d=c[2],f=!!c[3],p=16&u;b(e?t:t.prototype,c,p,f?"#"+d:function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(d),h,h<2?[]:e?s=s||[]:i=i||[],o,!!e,f,a,e&&f?function(e){return function(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(null!==t?typeof t:"null"));return t}(e)===t}:r)}}})(8,0),l(0,0),l(8,1),l(0,1),a(i),a(s),u=o,m||v(t),{e:u,get c(){var w=[];return m&&[v(t=b(t,[e],0,t.name,5,w)),g(w,1)]}}}(this,[],[[n6,0,"method"],[rt,0,"target"],[tY,0,"init",function(t){return t.#N},function(t,e){t.#N=e}],[tZ,0,"changeTarget",function(t){return t.#tr},function(t,e){t.#tr=e}]],t=>#N in t))}constructor(...t){super(...t),t7(this)}method=tX(this);target=(t0(this),t1(this,document.head));get #ti(){return this.method||"append"}#N=(t2(this),t3(this,()=>{this.hidden=!0}));#ts=(t8(this),i8("gem-reflect-start"));#to=i8(i3);#ta;#tr=t4(this,()=>((this.#ta||[this.#ts,...this.childNodes,this.#to]).forEach((t,e,n)=>{let r=n[e-1];r?r.after(t):this.target[this.#ti](t)}),()=>{this.#ta=(t=>{let e=[],n=t;for(;n&&(e.push(n),n.nodeValue!==i3);)n=n.nextSibling;return e})(this.#ts),this.#ta.forEach(t=>t.remove())}))}function i7(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 i6(t){return t}customElements.define("gem-reflect",i4),customElements.define("gem-route",tn),customElements.define("gem-light-route",te);let i5=0,i9=t=>{clearTimeout(i5),i5=setTimeout(()=>document.title=t)};function st(t,e,n){"symbol"==typeof e&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:n?n+" "+e:e})}catch(t){}return t}t6=ry(),t9=nV,et=rn(t=>[t.inert]),ee=rs(),en=ro(),new class extends i6{constructor(){super(em),t5()}static [class extends t9{static{({e:[er,ei,es,eo,ea,el,ec,eu,eh,ed,ef,ep],c:[em,t5]}=function(t,e,n,r,i){var s,o,a,l,c,u,h,d=Symbol.metadata||Symbol.for("Symbol.metadata"),f=Object.defineProperty,p=Object.create,m=[p(null),p(null)],g=e.length;function y(e,n,r){return function(i,s){n&&(s=i,i=t);for(var o=0;o<e.length;o++)s=e[o].apply(i,r?[s]:[]);return r?s:i}}function b(t,e,n,r){if("function"!=typeof t&&(r||void 0!==t))throw TypeError(e+" must "+(n||"be")+" a function"+(r?"":" or undefined"));return t}function v(t,e,n,r,i,s,o,a,l,c,d){function p(t){if(!d(t))throw TypeError("Attempted to access private element on non-instance")}var g=[].concat(e[0]),v=e[3],w=!o,S=1===i,_=3===i,$=4===i,E=2===i;function C(e,n,r){return function(i,s){return n&&(s=i,i=t),r&&r(i),desc[e].call(i,s)}}var T={},x=[],P=_?"get":$||S?"set":"value";if(!w&&(l?(c||S?T={get:i7(function(){return v(this)},r,"get"),set:function(t){e[4](this,t)}}:T[P]=v,c||i7(T[P],r,E?"":P)):c||(T=Object.getOwnPropertyDescriptor(t,r)),!c&&!l)){if((h=m[+a][r])&&(h^i)!=7)throw Error("Decorating two elements with the same name ("+T[P].name+") is not supported yet");m[+a][r]=i<3?1:i}for(var O=t,L=g.length-1;L>=0;L-=n?2:1){var k=b(g[L],"A decorator","be",!0),j=n?g[L-1]:void 0,N={},A={kind:["field","accessor","method","getter","setter","class"][i],name:r,metadata:u,addInitializer:(function(t,e){if(t.v)throw TypeError("attempted to call addInitializer after decoration was finished");b(e,"An initializer","be",!0),s.push(e)}).bind(null,N)};if(w){h=k.call(j,O,A),N.v=1,b(h,"class decorators","return")&&(O=h);continue}if(A.static=a,A.private=l,h=A.access={has:l?d.bind():function(t){return r in t}},$||(h.get=l?E?function(t){return p(t),T.value}:C("get",0,p):function(t){return t[r]}),E||_||(h.set=l?C("set",0,p):function(t,e){t[r]=e}),O=k.call(j,S?{get:T.get,set:T.set}:T[P],A),N.v=1,S){if("object"==typeof O&&O)(h=b(O.get,"accessor.get"))&&(T.get=h),(h=b(O.set,"accessor.set"))&&(T.set=h),(h=b(O.init,"accessor.init"))&&x.unshift(h);else if(void 0!==O)throw TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else b(O,(c?"field":"method")+" decorators","return")&&(c?x.unshift(O):T[P]=O)}return i<2&&o.push(y(x,a,1),y(s,a,0)),c||w||(l?S?o.splice(-1,0,C("get",a),C("set",a)):o.push(E?T[P]:b.call.bind(T[P])):f(t,r,T)),O}function w(t){return f(t,d,{configurable:!0,enumerable:!0,value:u})}return void 0!==i&&(u=i[d]),u=p(null==u?null:u),a=[],l=function(t){t&&a.push(y(t))},(c=function(e,i){for(var l=0;l<n.length;l++){var c=n[l],u=c[1],h=7&u;if((8&u)==e&&!h==i){var d=c[2],f=!!c[3],p=16&u;v(e?t:t.prototype,c,p,f?"#"+d:function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(d),h,h<2?[]:e?o=o||[]:s=s||[],a,!!e,f,i,e&&f?function(e){return function(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(null!==t?typeof t:"null"));return t}(e)===t}:r)}}})(8,0),c(0,0),c(8,1),c(0,1),l(s),l(o),h=a,g||w(t),{e:h,get c(){var S=[];return g&&[w(t=v(t,[e],0,t.name,5,S)),y(S,1)]}}}(this,[t6],[[n6,0,"prefix"],[n6,0,"suffix"],[n5,0,"inert"],[et,0,"connectStore",function(t){return t.#V},function(t,e){t.#V=e}],[ee,0,"obTextContent",function(t){return t.#tl},function(t,e){t.#tl=e}],[en,0,"content",function(t){return t.#a},function(t,e){t.#a=e}]],t=>#V in t,t9))}constructor(...t){super(...t),ep(this)}prefix=er(this);suffix=(ei(this),es(this));inert=(eo(this),ea(this));static setTitle(t){iL({title:t})}#V=(el(this),ec(this,()=>!this.inert&&ng(iL,this.update)));#tc=(eu(this),new MutationObserver(()=>this.update()));#tl=eh(this,()=>{this.#tc.observe(this,{characterData:!0,childList:!0,subtree:!0})});#a=(ed(this),ef(this,()=>(!function(t,e="",n=""){let r=iL.title||t;r&&r!==iL.defaultTitle?i9(e+(em.title=r)+n):i9(em.title=iL.defaultTitle)}(this.textContent?.trim(),this.prefix,this.suffix),ny`${em.title}`)))}];title=document.title},customElements.define("gem-title",em);let se=nA`
|
|
22
|
+
`;ts=rR(iQ),to=rM(sh),ta=rI(),tl=rV({focusable:!0}),tu=n7,th=rC(),td=rT(),new class extends sc{constructor(){super(tZ),tc()}static [class extends tu{static{({e:[tI,tf,tp,tm,tg,ty,tb,tv,tw,tS,t_,t$,tE,tC,tT,tP,tx,tL,tO,tk,tj,tN,tA,tM,tR,tH,tD,tV],c:[tZ,tc]}=sl(this,[ts,to,ta,tl],[[rk,8,"link"],[ry,0,"href"],[ry,0,"target"],[ry,0,"path"],[ry,0,"query"],[ry,0,"hash"],[ry,0,"hint"],[rb,0,"preload"],[rw,0,"route"],[rw,0,"options"],[rw,0,"routeOptions"],[rw,0,"prepare"],[th,2,"init",function(){this.addEventListener("click",this.#Z),this.addEventListener("pointerenter",this.#Q)}],[td,0,"content",function(t){return t.#a},function(t,e){t.#a=e}]],0,t=>#N in t,tu))}constructor(...t){super(...t),tD(this)}href=(tV(this),tm(this));target=(tg(this),ty(this));path=(tb(this),tv(this));query=(tw(this),tS(this));hash=(t_(this),t$(this));hint=(tE(this),tC(this));preload=(tT(this),tP(this));route=(tx(this),tL(this));options=(tO(this),tk(this));routeOptions=(tj(this),tN(this));prepare=(tA(this),tM(this));get #X(){return this.routeOptions||this.options}get #tt(){return this.hint||"on"}#Z=(tR(this),async t=>{t.preventDefault();let e=this._getLocationString();if(!e)return;if(su(e))switch(this.target){case"_self":window.location.href=e;return;case"_parent":window.parent.location.href=e;return;case"_top":window.top.location.href=e;return;default:window.open(e);return}let{path:n,query:r,hash:i}=iY.getParams();if(n+r+i!==e)if(await this.prepare?.(),this.route)iY.pushIgnoreCloseHandle(sn(this.route,this.#X));else if(this.href){let t=new URL(e,location.origin);iY.pushIgnoreCloseHandle({path:t.pathname,query:t.search,hash:t.hash})}else iY.pushIgnoreCloseHandle({path:this.path,query:this.query,hash:this.hash})});#te=()=>{let t=this._getLocationString();if(su(t))return t;let e=new URL(iY.basePath+t,location.origin);return e5?e.pathname+e.search+e.hash:e.toString()};#Q=()=>{this.route?.content,this.route?.getContent?.({},this.shadowRoot)};get #N(){return tI}#a=tH(this,()=>{let t="off"===this.#tt?null:this.#te();return nI`<a part=${tZ.link} href=${t} tabindex="-1"><slot></slot></a>`});_getLocationString(){if(this.route){let t=this.#X?.query||"",e=this.#X?.hash||"";return se(this.route,this.#X)+t+e}{let t=this.href||this.path+this.query+this.hash,{path:e,query:n}=iY.getParams();return t.startsWith("#")?`${e}${n}${t}`:t.startsWith("?")?`${e}${t}`:t.startsWith(".")?nd(e,t):t}}}];link=(()=>{let t=tf();return tp(),t})()},tz=rR(iY.store),tW=tZ,tG=r_();class sd extends tW{static{({e:[tq,tK,tB,tJ,tF,tY],c:[tQ,tU]}=sl(this,[tz],[[ry,0,"pattern"],[rx,0,"active"],[tG,0,"updateState",function(t){return t.#tn},function(t,e){t.#tn=e}]],0,t=>#tn in t,tW))}constructor(...t){super(...t),tY(this)}pattern=tq(this);active=(tK(this),tB(this));#tn=(tJ(this),tF(this,()=>{let{path:t,query:e,hash:n}=iY.getParams(),r=this.pattern&&st(this.pattern,t);this.active=!!r||t+e+n===this._getLocationString()}));static{tU()}}function sf(t,e,n){"symbol"==typeof e&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:n?n+" "+e:e})}catch(t){}return t}customElements.define("gem-link",tZ),customElements.define("gem-active-link",tQ);let sp="gem-reflect-end",sm=t=>new Comment(t);tX=rE(),t0=r_(t=>[t.target]);class sg extends n7{static{({e:[t1,t2,t3,t8,t4,t7,t6,t5]}=function(t,e,n,r){var i,s,o,a,l,c,u,h=Symbol.metadata||Symbol.for("Symbol.metadata"),d=Object.defineProperty,f=Object.create,p=[f(null),f(null)],m=e.length;function g(e,n,r){return function(i,s){n&&(s=i,i=t);for(var o=0;o<e.length;o++)s=e[o].apply(i,r?[s]:[]);return r?s:i}}function y(t,e,n,r){if("function"!=typeof t&&(r||void 0!==t))throw TypeError(e+" must "+(n||"be")+" a function"+(r?"":" or undefined"));return t}function b(t,e,n,r,i,s,o,a,l,h,f){function m(t){if(!f(t))throw TypeError("Attempted to access private element on non-instance")}var b=[].concat(e[0]),v=e[3],w=!o,S=1===i,_=3===i,$=4===i,E=2===i;function C(e,n,r){return function(i,s){return n&&(s=i,i=t),r&&r(i),desc[e].call(i,s)}}var T={},P=[],x=_?"get":$||S?"set":"value";if(!w&&(l?(h||S?T={get:sf(function(){return v(this)},r,"get"),set:function(t){e[4](this,t)}}:T[x]=v,h||sf(T[x],r,E?"":x)):h||(T=Object.getOwnPropertyDescriptor(t,r)),!h&&!l)){if((u=p[+a][r])&&(u^i)!=7)throw Error("Decorating two elements with the same name ("+T[x].name+") is not supported yet");p[+a][r]=i<3?1:i}for(var L=t,O=b.length-1;O>=0;O-=n?2:1){var k=y(b[O],"A decorator","be",!0),j=n?b[O-1]:void 0,N={},A={kind:["field","accessor","method","getter","setter","class"][i],name:r,metadata:c,addInitializer:(function(t,e){if(t.v)throw TypeError("attempted to call addInitializer after decoration was finished");y(e,"An initializer","be",!0),s.push(e)}).bind(null,N)};if(w){u=k.call(j,L,A),N.v=1,y(u,"class decorators","return")&&(L=u);continue}if(A.static=a,A.private=l,u=A.access={has:l?f.bind():function(t){return r in t}},$||(u.get=l?E?function(t){return m(t),T.value}:C("get",0,m):function(t){return t[r]}),E||_||(u.set=l?C("set",0,m):function(t,e){t[r]=e}),L=k.call(j,S?{get:T.get,set:T.set}:T[x],A),N.v=1,S){if("object"==typeof L&&L)(u=y(L.get,"accessor.get"))&&(T.get=u),(u=y(L.set,"accessor.set"))&&(T.set=u),(u=y(L.init,"accessor.init"))&&P.unshift(u);else if(void 0!==L)throw TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else y(L,(h?"field":"method")+" decorators","return")&&(h?P.unshift(L):T[x]=L)}return i<2&&o.push(g(P,a,1),g(s,a,0)),h||w||(l?S?o.splice(-1,0,C("get",a),C("set",a)):o.push(E?T[x]:y.call.bind(T[x])):d(t,r,T)),L}function v(t){return d(t,h,{configurable:!0,enumerable:!0,value:c})}return c=f(null==c?null:c),o=[],a=function(t){t&&o.push(g(t))},(l=function(e,a){for(var l=0;l<n.length;l++){var c=n[l],u=c[1],h=7&u;if((8&u)==e&&!h==a){var d=c[2],f=!!c[3],p=16&u;b(e?t:t.prototype,c,p,f?"#"+d:function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(d),h,h<2?[]:e?s=s||[]:i=i||[],o,!!e,f,a,e&&f?function(e){return function(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(null!==t?typeof t:"null"));return t}(e)===t}:r)}}})(8,0),l(0,0),l(8,1),l(0,1),a(i),a(s),u=o,m||v(t),{e:u,get c(){var w=[];return m&&[v(t=b(t,[e],0,t.name,5,w)),g(w,1)]}}}(this,[],[[ry,0,"method"],[rw,0,"target"],[tX,0,"init",function(t){return t.#N},function(t,e){t.#N=e}],[t0,0,"changeTarget",function(t){return t.#tr},function(t,e){t.#tr=e}]],t=>#N in t))}constructor(...t){super(...t),t5(this)}method=t1(this);target=(t2(this),t3(this,document.head));get #ti(){return this.method||"append"}#N=(t8(this),t4(this,()=>{this.hidden=!0}));#ts=(t7(this),sm("gem-reflect-start"));#to=sm(sp);#ta;#tr=t6(this,()=>((this.#ta||[this.#ts,...this.childNodes,this.#to]).forEach((t,e,n)=>{let r=n[e-1];r?r.after(t):this.target[this.#ti](t)}),()=>{this.#ta=(t=>{let e=[],n=t;for(;n&&(e.push(n),n.nodeValue!==sp);)n=n.nextSibling;return e})(this.#ts),this.#ta.forEach(t=>t.remove())}))}function sy(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 sb(t){return t}customElements.define("gem-reflect",sg),customElements.define("gem-route",ti),customElements.define("gem-light-route",tr);let sv=0,sw=t=>{clearTimeout(sv),sv=setTimeout(()=>document.title=t)};function sS(t,e,n){"symbol"==typeof e&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:n?n+" "+e:e})}catch(t){}return t}t9=rI(),ee=n7,en=r_(t=>[t.inert]),er=rC(),ei=rT(),new class extends sb{constructor(){super(ey),et()}static [class extends ee{static{({e:[es,eo,ea,el,ec,eu,eh,ed,ef,ep,em,eg],c:[ey,et]}=function(t,e,n,r,i){var s,o,a,l,c,u,h,d=Symbol.metadata||Symbol.for("Symbol.metadata"),f=Object.defineProperty,p=Object.create,m=[p(null),p(null)],g=e.length;function y(e,n,r){return function(i,s){n&&(s=i,i=t);for(var o=0;o<e.length;o++)s=e[o].apply(i,r?[s]:[]);return r?s:i}}function b(t,e,n,r){if("function"!=typeof t&&(r||void 0!==t))throw TypeError(e+" must "+(n||"be")+" a function"+(r?"":" or undefined"));return t}function v(t,e,n,r,i,s,o,a,l,c,d){function p(t){if(!d(t))throw TypeError("Attempted to access private element on non-instance")}var g=[].concat(e[0]),v=e[3],w=!o,S=1===i,_=3===i,$=4===i,E=2===i;function C(e,n,r){return function(i,s){return n&&(s=i,i=t),r&&r(i),desc[e].call(i,s)}}var T={},P=[],x=_?"get":$||S?"set":"value";if(!w&&(l?(c||S?T={get:sy(function(){return v(this)},r,"get"),set:function(t){e[4](this,t)}}:T[x]=v,c||sy(T[x],r,E?"":x)):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[x].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[x],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"))&&P.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?P.unshift(L):T[x]=L)}return i<2&&o.push(y(P,a,1),y(s,a,0)),c||w||(l?S?o.splice(-1,0,C("get",a),C("set",a)):o.push(E?T[x]:b.call.bind(T[x])):f(t,r,T)),L}function w(t){return f(t,d,{configurable:!0,enumerable:!0,value:u})}return void 0!==i&&(u=i[d]),u=p(null==u?null:u),a=[],l=function(t){t&&a.push(y(t))},(c=function(e,i){for(var l=0;l<n.length;l++){var c=n[l],u=c[1],h=7&u;if((8&u)==e&&!h==i){var d=c[2],f=!!c[3],p=16&u;v(e?t:t.prototype,c,p,f?"#"+d:function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(d),h,h<2?[]:e?o=o||[]:s=s||[],a,!!e,f,i,e&&f?function(e){return function(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(null!==t?typeof t:"null"));return t}(e)===t}:r)}}})(8,0),c(0,0),c(8,1),c(0,1),l(s),l(o),h=a,g||w(t),{e:h,get c(){var S=[];return g&&[w(t=v(t,[e],0,t.name,5,S)),y(S,1)]}}}(this,[t9],[[ry,0,"prefix"],[ry,0,"suffix"],[rb,0,"inert"],[en,0,"connectStore",function(t){return t.#V},function(t,e){t.#V=e}],[er,0,"obTextContent",function(t){return t.#tl},function(t,e){t.#tl=e}],[ei,0,"content",function(t){return t.#a},function(t,e){t.#a=e}]],t=>#V in t,ee))}constructor(...t){super(...t),eg(this)}prefix=es(this);suffix=(eo(this),ea(this));inert=(el(this),ec(this));static setTitle(t){iZ({title:t})}#V=(eu(this),eh(this,()=>!this.inert&&nR(iZ,this.update)));#tc=(ed(this),new MutationObserver(()=>this.update()));#tl=ef(this,()=>{this.#tc.observe(this,{characterData:!0,childList:!0,subtree:!0})});#a=(ep(this),em(this,()=>(!function(t,e="",n=""){let r=iZ.title||t;r&&r!==iZ.defaultTitle?sw(e+(ey.title=r)+n):sw(ey.title=iZ.defaultTitle)}(this.textContent?.trim(),this.prefix,this.suffix),nI`${ey.title}`)))}];title=document.title},customElements.define("gem-title",ey);let s_=n0`
|
|
23
23
|
:host(:where(:not([hidden]))) {
|
|
24
24
|
display: contents;
|
|
25
25
|
}
|
|
26
|
-
`;
|
|
26
|
+
`;eb=rI(),ev=rM(s_),eS=n7,e_=r_(),e$=rT();class s$ extends eS{static{({e:[eE,eC,eT,eP,ex,eL,eO,ek],c:[ej,ew]}=function(t,e,n,r,i){var s,o,a,l,c,u,h,d=Symbol.metadata||Symbol.for("Symbol.metadata"),f=Object.defineProperty,p=Object.create,m=[p(null),p(null)],g=e.length;function y(e,n,r){return function(i,s){n&&(s=i,i=t);for(var o=0;o<e.length;o++)s=e[o].apply(i,r?[s]:[]);return r?s:i}}function b(t,e,n,r){if("function"!=typeof t&&(r||void 0!==t))throw TypeError(e+" must "+(n||"be")+" a function"+(r?"":" or undefined"));return t}function v(t,e,n,r,i,s,o,a,l,c,d){function p(t){if(!d(t))throw TypeError("Attempted to access private element on non-instance")}var g=[].concat(e[0]),v=e[3],w=!o,S=1===i,_=3===i,$=4===i,E=2===i;function C(e,n,r){return function(i,s){return n&&(s=i,i=t),r&&r(i),desc[e].call(i,s)}}var T={},P=[],x=_?"get":$||S?"set":"value";if(!w&&(l?(c||S?T={get:sS(function(){return v(this)},r,"get"),set:function(t){e[4](this,t)}}:T[x]=v,c||sS(T[x],r,E?"":x)):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[x].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[x],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"))&&P.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?P.unshift(L):T[x]=L)}return i<2&&o.push(y(P,a,1),y(s,a,0)),c||w||(l?S?o.splice(-1,0,C("get",a),C("set",a)):o.push(E?T[x]:b.call.bind(T[x])):f(t,r,T)),L}function w(t){return f(t,d,{configurable:!0,enumerable:!0,value:u})}return void 0!==i&&(u=i[d]),u=p(null==u?null:u),a=[],l=function(t){t&&a.push(y(t))},(c=function(e,i){for(var l=0;l<n.length;l++){var c=n[l],u=c[1],h=7&u;if((8&u)==e&&!h==i){var d=c[2],f=!!c[3],p=16&u;v(e?t:t.prototype,c,p,f?"#"+d:function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(d),h,h<2?[]:e?o=o||[]:s=s||[],a,!!e,f,i,e&&f?function(e){return function(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(null!==t?typeof t:"null"));return t}(e)===t}:r)}}})(8,0),c(0,0),c(8,1),c(0,1),l(s),l(o),h=a,g||w(t),{e:h,get c(){var S=[];return g&&[w(t=v(t,[e],0,t.name,5,S)),y(S,1)]}}}(this,[eb,ev],[[ry,0,"html"],[rw,0,"styles"],[e_,0,"adoptStyles",function(t){return t.#tu},function(t,e){t.#tu=e}],[e$,0,"content",function(t){return t.#a},function(t,e){t.#a=e}]],t=>#tu in t,eS))}constructor(...t){super(...t),ek(this)}html=eE(this);styles=(eC(this),eT(this));get #th(){if(!this.styles)return[];if("string"!=typeof this.styles)return[this.styles].flat().map(t=>t[nK].getStyle());{let t=new CSSStyleSheet;return t.replaceSync(this.styles),[t]}}#tu=(eP(this),ex(this,()=>{let t=this.shadowRoot.adoptedStyleSheets;return this.shadowRoot.adoptedStyleSheets=t.concat(this.#th),()=>{this.shadowRoot.adoptedStyleSheets=t}}));#a=(eL(this),eO(this,()=>{this.shadowRoot.innerHTML=this.html}));static{ew()}}function sE(t,e,n){"symbol"==typeof e&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:n?n+" "+e:e})}catch(t){}return t}customElements.define("gem-unsafe",ej);let sC=n0`
|
|
27
27
|
:host(:where(:not([hidden]))) {
|
|
28
28
|
position: relative;
|
|
29
29
|
display: inline-flex;
|
|
@@ -33,4 +33,4 @@ let t,e,n,r,i,s,o,a,l,c,u,h,d,f,p,m,g,y,b,v,w,S,_,$,E,C,T,x,P,O,L,k,j,N,A,M,R,I,
|
|
|
33
33
|
width: 100%;
|
|
34
34
|
height: 100%;
|
|
35
35
|
}
|
|
36
|
-
`,ss=new Map;ek=ry(),ej=rm(si),eA=nV,eM=ro();class so extends eA{static{({e:[eR,eI,eH,eD,eV,ez,eW,eU,eG,eq],c:[eB,eN]}=function(t,e,n,r,i){var s,o,a,l,c,u,h,d=Symbol.metadata||Symbol.for("Symbol.metadata"),f=Object.defineProperty,p=Object.create,m=[p(null),p(null)],g=e.length;function y(e,n,r){return function(i,s){n&&(s=i,i=t);for(var o=0;o<e.length;o++)s=e[o].apply(i,r?[s]:[]);return r?s:i}}function b(t,e,n,r){if("function"!=typeof t&&(r||void 0!==t))throw TypeError(e+" must "+(n||"be")+" a function"+(r?"":" or undefined"));return t}function v(t,e,n,r,i,s,o,a,l,c,d){function p(t){if(!d(t))throw TypeError("Attempted to access private element on non-instance")}var g=[].concat(e[0]),v=e[3],w=!o,S=1===i,_=3===i,$=4===i,E=2===i;function C(e,n,r){return function(i,s){return n&&(s=i,i=t),r&&r(i),desc[e].call(i,s)}}var T={},x=[],P=_?"get":$||S?"set":"value";if(!w&&(l?(c||S?T={get:sr(function(){return v(this)},r,"get"),set:function(t){e[4](this,t)}}:T[P]=v,c||sr(T[P],r,E?"":P)):c||(T=Object.getOwnPropertyDescriptor(t,r)),!c&&!l)){if((h=m[+a][r])&&(h^i)!=7)throw Error("Decorating two elements with the same name ("+T[P].name+") is not supported yet");m[+a][r]=i<3?1:i}for(var O=t,L=g.length-1;L>=0;L-=n?2:1){var k=b(g[L],"A decorator","be",!0),j=n?g[L-1]:void 0,N={},A={kind:["field","accessor","method","getter","setter","class"][i],name:r,metadata:u,addInitializer:(function(t,e){if(t.v)throw TypeError("attempted to call addInitializer after decoration was finished");b(e,"An initializer","be",!0),s.push(e)}).bind(null,N)};if(w){h=k.call(j,O,A),N.v=1,b(h,"class decorators","return")&&(O=h);continue}if(A.static=a,A.private=l,h=A.access={has:l?d.bind():function(t){return r in t}},$||(h.get=l?E?function(t){return p(t),T.value}:C("get",0,p):function(t){return t[r]}),E||_||(h.set=l?C("set",0,p):function(t,e){t[r]=e}),O=k.call(j,S?{get:T.get,set:T.set}:T[P],A),N.v=1,S){if("object"==typeof O&&O)(h=b(O.get,"accessor.get"))&&(T.get=h),(h=b(O.set,"accessor.set"))&&(T.set=h),(h=b(O.init,"accessor.init"))&&x.unshift(h);else if(void 0!==O)throw TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else b(O,(c?"field":"method")+" decorators","return")&&(c?x.unshift(O):T[P]=O)}return i<2&&o.push(y(x,a,1),y(s,a,0)),c||w||(l?S?o.splice(-1,0,C("get",a),C("set",a)):o.push(E?T[P]:b.call.bind(T[P])):f(t,r,T)),O}function w(t){return f(t,d,{configurable:!0,enumerable:!0,value:u})}return void 0!==i&&(u=i[d]),u=p(null==u?null:u),a=[],l=function(t){t&&a.push(y(t))},(c=function(e,i){for(var l=0;l<n.length;l++){var c=n[l],u=c[1],h=7&u;if((8&u)==e&&!h==i){var d=c[2],f=!!c[3],p=16&u;v(e?t:t.prototype,c,p,f?"#"+d:function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(d),h,h<2?[]:e?o=o||[]:s=s||[],a,!!e,f,i,e&&f?function(e){return function(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(null!==t?typeof t:"null"));return t}(e)===t}:r)}}})(8,0),c(0,0),c(8,1),c(0,1),l(s),l(o),h=a,g||w(t),{e:h,get c(){var S=[];return g&&[w(t=v(t,[e],0,t.name,5,S)),y(S,1)]}}}(this,[ek,ej],[[n6,0,"selector"],[rt,0,"root"],[rt,0,"element"],[rl,0,"active"],[eM,0,"content",function(t){return t.#a},function(t,e){t.#a=e}]],t=>#a in t,eA))}constructor(...t){super(...t),eq(this)}selector=eR(this);root=(eI(this),eH(this));element=(eD(this),eV(this));active=(ez(this),eW(this));#td=(eU(this),()=>{let t=this.element||(this.selector?(this.root||document).querySelector(this.selector):null);if("string"==typeof t){let e=ss.get(t);return e||((e=document.createElement("template")).innerHTML=t,ss.set(t,e)),e.content.cloneNode(!0)}return t instanceof HTMLTemplateElement?t.content.cloneNode(!0):t?.cloneNode(!0)});#a=eG(this,()=>ny`${this.#td()}<slot></slot>`);static{eN()}}customElements.define("gem-use",eB);class sa{#tf;get #tp(){return`[${this.#tf}]`}constructor(t){this.#tf=t}info=(...t)=>{console.log(this.#tp,...t)};warn=(...t)=>{console.warn(this.#tp,...t)};error=(...t)=>{console.error(this.#tp,...t)}}let sl=new sa("GEM"),sc=/\$\d(?:<[^>]*>)?/,su=/\$(\d)(<([^>]*)>)?/g;function sh(t,...e){let n,r=t.split(sc),i=[];for(;n=su.exec(t);){let t=n[3],r=e[Number(n[1])-1];i.push("function"==typeof r?r(t):r)}return ny(r,...i)}let sd=new Set;class sf{resources;fallbackLanguage;currentLanguage;cache;cachePrefix="gem-i18n";urlParamsType;urlParamsName;onChange;replace=({path:t})=>this.setLanguage(t);getParams=()=>({path:this.currentLanguage});get #tm(){return`${this.cachePrefix}:current`}get #tg(){let{hostname:t,pathname:e,search:n}=location,r=t.split(".");switch(this.urlParamsType){case"ccTLD":return r.pop();case"gTLD":return r.shift();case"path":return e.split("/")[1];default:{let t=this.urlParamsName&&new URLSearchParams(n).get(this.urlParamsName)||"";return t in this.resources?t:""}}}get #ty(){return this.cache&&localStorage.getItem(this.#tm)||""}get #tb(){return!sd.has(this)}set #tv(t){this.#tb&&(document.documentElement.lang=t),this.currentLanguage=t,this.onChange?.(t)}#tw=!0;constructor(t){if(!t.resources[t.fallbackLanguage])throw new na("i18n: fallbackLanguage invalid");Object.assign(this,t);let e=this.#tg||this.currentLanguage||this.#ty,n=document.querySelector(`[type*=${this.cachePrefix}]`);if(n)try{let t=JSON.parse(n.textContent||"");e=t.currentLanguage,this.resources[t.currentLanguage]=t.currentLanguagePack}catch{}e?(this.#tv=e,this.setLanguage(e)):this.resetLanguage(),this.#tw=!1}get(t,...e){let n=this.resources[this.currentLanguage],r=this.resources[this.fallbackLanguage],i=n[t]||r[t],s=i?.message||i||`[${t}]`;return e.length?sh(s,...e):s}detectLanguage(){let t=Object.keys(this.resources);for(let e of navigator.languages.map(t=>t.replace(/-(.*)/,t=>t.toUpperCase()))){let n=t.find(t=>t===e||e.startsWith(`${t}-`));if(n)return n}return this.fallbackLanguage}async setLanguage(t){let e;this.#tb&&sd.forEach(async e=>await e.setLanguage(t));let n=this.resources[t];if(!n)return sl.warn(`${this.cachePrefix}: not found \`${t}\``),this.resetLanguage();if("string"==typeof n){let t=`${this.cachePrefix}:`,r=`${t}${n}`,i=localStorage.getItem(r),s=async()=>{let e=await (await fetch(n)).json();if(this.cache){for(let e=0;e<localStorage.length;e++){let n=localStorage.key(e);n.startsWith(t)&&localStorage.removeItem(n)}localStorage.setItem(r,JSON.stringify(e))}return e};if(i)try{e=JSON.parse(i)}catch{e=await s()}else e=await s()}else e=n;if(this.resources[t]=e,!this.#tw){let t=[document.documentElement];for(;t.length;){let e=t.pop();e[nx]?.(),t.push(...[...e.children,...e.shadowRoot?.children||[]].reverse())}}return t!==this.currentLanguage&&(this.#tv=t),!0===this.cache&&this.setCache(),t}resetLanguage(){return this.#tb&&sd.forEach(t=>t.resetLanguage()),this.#tv=this.fallbackLanguage,this.cache&&localStorage.removeItem(this.#tm),this.setLanguage(this.detectLanguage())}setCache(){this.#tb&&sd.forEach(t=>t.setCache()),localStorage.setItem(this.#tm,this.currentLanguage)}createSubModule(t,e){let n=new sf({resources:e,cachePrefix:`${this.cachePrefix}-${t}`,currentLanguage:this.currentLanguage,fallbackLanguage:this.fallbackLanguage,cache:this.cache});return sd.add(n),n}toJSON(){return{currentLanguage:this.currentLanguage,currentLanguagePack:this.resources[this.currentLanguage]}}}let sp={PRINT:"print",get isPrint(){return matchMedia(this.PRINT).matches},HOVER:"(hover: hover)",get isHover(){return matchMedia(this.HOVER).matches},PWA:"(display-mode: standalone)",get isPWA(){return matchMedia(this.PWA).matches},MOTION_REDUCE:"(prefers-reduced-motion: reduce)",get isMotionReduce(){return matchMedia(this.MOTION_REDUCE).matches},DATA_REDUCE:"(prefers-reduced-data: reduce)",get isDataReduce(){return matchMedia(this.DATA_REDUCE).matches},WATCH:"(width < 320px)",get isWatch(){return matchMedia(this.WATCH).matches},SMALL_PHONE:"(320px <= width <= 480px) and (height <= 640px)",get isSmallPhone(){return matchMedia(this.SMALL_PHONE).matches},PHONE:"(320px <= width <= 480px)",get isPhone(){return matchMedia(this.PHONE).matches},PHONE_LANDSCAPE:"(480px < width < 960px) and (orientation: landscape)",get isPhoneLandscape(){return matchMedia(this.PHONE_LANDSCAPE).matches},SHORT:"(width >= 480px) and (height <= 320px)",get isShort(){return matchMedia(this.SHORT).matches},TABLET:"(480px < width <= 1280px)",get isTablet(){return matchMedia(this.TABLET).matches},DESKTOP:"(width > 1280px) and (orientation: landscape)",get isDesktop(){return matchMedia(this.DESKTOP).matches},WIDTHSCREEN:"(width >= 1920px) and (orientation: landscape)",get isWidthScreen(){return matchMedia(this.WIDTHSCREEN).matches}},sm=Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)).constructor;function sg(t={}){let{origin:e=location.origin,base:n="",appendHeaders:r=()=>({}),transformInput:i=t=>t,transformOutput:s=t=>t,...o}=t,a=t=>t instanceof FormData||t instanceof Blob||t instanceof sm||t instanceof URLSearchParams||t instanceof ReadableStream||t instanceof ArrayBuffer?t:"object"==typeof t?JSON.stringify(t):t,l=(t,r)=>{if(new URL(t,location.origin).pathname!==t)throw new na("`path` format is incorrect");let i=new URLSearchParams(r).toString();return`${e}${n}${t}${i?"?":""}${i}`},c=t=>t?t instanceof Headers?Object.fromEntries(t):Object.fromEntries((Array.isArray(t)?t:Object.entries(t)).map(([t,e])=>[t.toLowerCase(),e])):{},u=async(t,e={})=>{let n=new Request(t,{...o,...e,headers:new Headers({"content-type":"application/json",...c(o.headers),...c(e.headers)})}),r=await fetch(n);if(204===r.status)return;if(0===r.status)throw Error("Request fail");if(r.status>=500)throw Error(r.statusText);let i=n.headers.get("content-type"),a=r.status>=400;try{let t;if(t=i.includes("json")?await r.json():i.includes("octet-stream")?await r.arrayBuffer():await r.text(),a)throw Error(r.statusText,{cause:t});return await s(t,n)}catch{throw Error("Parse error")}};return{request:u,async get(t,e){let n=await i(e);return u(l(t,n),{method:"GET",headers:await r(n)})},async del(t,e){let n=await i(e);return u(l(t,n),{method:"DELETE",headers:await r(n)})},async put(t,e){let n=await i(e);return u(l(t),{method:"PUT",headers:await r(n),body:a(n)})},async post(t,e){let n=await i(e);return u(l(t),{method:"POST",headers:await r(n),body:a(n)})}}}let{request:sy,del:sb,get:sv,post:sw,put:sS}=sg(),s_=new WeakMap,s$=new WeakMap;function sE(t){return s_.get(t)}function sC(t){return s$.get(t)}function sT(t,e={}){let n=nr(),r=nA({})[nT],i=nm(t),s=()=>{Object.keys(i).forEach(t=>{e[t]||(e[t]=`--${ni(t)}-${n}`,o[t]=`var(${e[t]})`)})},o=new Proxy(e4({[nT]:r},t=>{i(t),s()}),{get(t,e){if(!t[e]){let[n,r,i]=e.match(/^(\w*Color)(\d+)$/)||[];r&&(t[e]=`oklch(from ${t[r]} calc(l - ${(Number(i)-400)/1e3}) c h)`)}return t[e]}});s$.set(o,e),s_.set(o,i);let a=()=>{s();let t="";Object.keys(i).forEach(n=>{t+=`${e[n]}:${i[n]};`}),r.setContent(`&,:host{${t}}`)};return a(),ng(i,()=>{a(),r.updateStyle()}),o}function sx(t){return sT(t)}function sP(t){let e=sx(t);return document.adoptedStyleSheets.push(e[nT].getStyle()),e}function sO(t,e){return sT(e,sC(t))}function sL(t){let e=sT(t),n=sC(e);return e4(e,e=>(r,{addInitializer:i,access:s})=>{i(function(){let r=sT({...t},n)[nT].getStyle(this,!0);this.internals.sheets.push(r),this.memo(()=>{let t=s.get(this).apply(this),e=r.cssRules[0],i=this.shadowRoot?e:r.element?.sheet?.cssRules[0]?.cssRules?.[0];for(let e in n)i?.style.setProperty(n[e],t[e])},e&&(()=>e(this)))})})}export{nV as GemElement,na as GemError,i4 as GemReflectElement,sf as I18n,e5 as LinkedList,sa as Logger,e9 as PropProxyMap,nt as QueryString,nT as SheetToken,rG as TemplateResult,nx as UpdateToken,tQ as GemActiveLinkElement,p as GemDialogBaseElement,te as GemLightRouteElement,tF as GemLinkElement,tn as GemRouteElement,em as GemTitleElement,eL as GemUnsafeElement,eB as GemUseElement,nO as _RenderErrorEvent,np as _StoreListenerMap,e as _createTemplate,e7 as absoluteLocation,e6 as addListener,e8 as addMicrotask,rm as adoptedStyle,n6 as attribute,ik as basePathStore,n5 as boolattribute,ni as camelToKebabCase,nh as classMap,no as cleanObject,ng as connect,rg as connectStore,sL as createDecoratorTheme,iq as createHistoryParams,iH as createModalClass,sO as createOverrideTheme,iG as createPath,r5 as createRef,sx as createScopedTheme,t as createState,nm as createStore,sP as createTheme,e4 as createUpdater,nA as css,rS as customElement,rw as aria,rv as async,rn as effect,rh as part,rl as state,ro as template,sb as del,ie as directive,rd as emitter,nf as exportPartsMap,ra as fallback,sv as get,sC as getThemeProps,sE as getThemeStore,rf as globalemitter,iO as history,ny as html,sg as initRequest,nl as isArrayChange,ns as kebabToCamelCase,rb as light,sl as logger,iU as matchPath,rJ as mathml,sp as mediaQuery,re as memo,rs as mounted,n9 as numattribute,nc as objectMapToString,nd as partMap,sw as post,rt as property,sS as put,nr as randomStr,ne as raw,nb as render,ic as repeat,sy as request,nv as setEngine,nS as setHydrationEngine,ry as shadow,ru as slot,sh as splice,nu as styleMap,nn as styled,rK as svg,iL as titleStore,rr as unmounted,it as version,ri as willMount};
|
|
36
|
+
`,sT=new Map,sP=new Map;eN=rI(),eA=rM(sC),eR=n7,eI=rT();class sx extends eR{static{({e:[eH,eD,eV,ez,eU,eW,eG,eq,eK,eB],c:[eJ,eM]}=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={},P=[],x=_?"get":$||S?"set":"value";if(!w&&(l?(c||S?T={get:sE(function(){return v(this)},r,"get"),set:function(t){e[4](this,t)}}:T[x]=v,c||sE(T[x],r,E?"":x)):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[x].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[x],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"))&&P.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?P.unshift(L):T[x]=L)}return i<2&&o.push(y(P,a,1),y(s,a,0)),c||w||(l?S?o.splice(-1,0,C("get",a),C("set",a)):o.push(E?T[x]:b.call.bind(T[x])):f(t,r,T)),L}function w(t){return f(t,d,{configurable:!0,enumerable:!0,value:u})}return void 0!==i&&(u=i[d]),u=p(null==u?null:u),a=[],l=function(t){t&&a.push(y(t))},(c=function(e,i){for(var l=0;l<n.length;l++){var c=n[l],u=c[1],h=7&u;if((8&u)==e&&!h==i){var d=c[2],f=!!c[3],p=16&u;v(e?t:t.prototype,c,p,f?"#"+d:function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(d),h,h<2?[]:e?o=o||[]:s=s||[],a,!!e,f,i,e&&f?function(e){return function(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(null!==t?typeof t:"null"));return t}(e)===t}:r)}}})(8,0),c(0,0),c(8,1),c(0,1),l(s),l(o),h=a,g||w(t),{e:h,get c(){var S=[];return g&&[w(t=v(t,[e],0,t.name,5,S)),y(S,1)]}}}(this,[eN,eA],[[ry,0,"selector"],[rw,0,"root"],[rw,0,"element"],[rx,0,"active"],[eI,0,"content",function(t){return t.#a},function(t,e){t.#a=e}]],t=>#a in t,eR))}constructor(...t){super(...t),eB(this)}selector=eH(this);root=(eD(this),eV(this));element=(ez(this),eU(this));active=(eW(this),eG(this));#td=(eq(this),()=>{let t=this.element||(this.selector?(this.root||document).querySelector(this.selector):null);if("string"==typeof t&&e5){let e=sP.get(t);return e||(e=Object.assign([t],{raw:[t]}),sP.set(t,e)),nI(e)}if("string"==typeof t){let e=sT.get(t);return e||((e=document.createElement("template")).innerHTML=t,sT.set(t,e)),e.content.cloneNode(!0)}return t instanceof HTMLTemplateElement?t.content.cloneNode(!0):t?.cloneNode(!0)});#a=eK(this,()=>nI`${this.#td()}<slot></slot>`);static{eM()}}customElements.define("gem-use",eJ);class sL{#tf;get #tp(){return`[${this.#tf}]`}constructor(t){this.#tf=t}info=(...t)=>{console.log(this.#tp,...t)};warn=(...t)=>{console.warn(this.#tp,...t)};error=(...t)=>{console.error(this.#tp,...t)}}let sO=new sL("GEM"),sk=/\$\d(?:<[^>]*>)?/,sj=/\$(\d)(<([^>]*)>)?/g;function sN(t,...e){let n,r=t.split(sk),i=[];for(;n=sj.exec(t);){let t=n[3],r=e[Number(n[1])-1];i.push("function"==typeof r?r(t):r)}return nI(r,...i)}let sA=new Set;class sM{resources;fallbackLanguage;cache;cachePrefix="gem-i18n";urlParamsType;urlParamsName;onChange;#K=nt({currentLanguage:""});get currentLanguage(){return this.#K.currentLanguage}set currentLanguage(t){this.#K.currentLanguage=t}replace=({path:t})=>this.setLanguage(t);getParams=()=>({path:this.currentLanguage});get #tm(){return`${this.cachePrefix}:current`}get #tg(){let{hostname:t,pathname:e,search:n}=location,r=t.split(".");switch(this.urlParamsType){case"ccTLD":return r.pop();case"gTLD":return r.shift();case"path":return e.split("/")[1];default:{let t=this.urlParamsName&&new URLSearchParams(n).get(this.urlParamsName)||"";return t in this.resources?t:""}}}get #ty(){return this.cache&&localStorage.getItem(this.#tm)||""}get #tb(){return!sA.has(this)}set #tv(t){this.#tb&&(document.documentElement.lang=t),this.currentLanguage=t,this.onChange?.(t)}#tw=!0;constructor(t){if(!t.resources[t.fallbackLanguage])throw new n$("i18n: fallbackLanguage invalid");Object.assign(this,t);let e=this.#tg||this.currentLanguage||this.#ty,n=document.querySelector(`[type*=${this.cachePrefix}]`);if(n)try{let t=JSON.parse(n.textContent||"");e=t.currentLanguage,this.resources[t.currentLanguage]=t.currentLanguagePack}catch{}e?(this.#tv=e,this.setLanguage(e)):this.resetLanguage(),this.#tw=!1}get(t,...e){let n=this.resources[this.currentLanguage],r=this.resources[this.fallbackLanguage],i=n[t]||r[t],s=i?.message||i||`[${t}]`;return e.length?sN(s,...e):s}detectLanguage(){let t=Object.keys(this.resources);for(let e of navigator.languages.map(t=>t.replace(/-(.*)/,t=>t.toUpperCase()))){let n=t.find(t=>t===e||e.startsWith(`${t}-`));if(n)return n}return this.fallbackLanguage}async setLanguage(t){let e;this.#tb&&sA.forEach(async e=>await e.setLanguage(t));let n=this.resources[t];if(!n)return sO.warn(`${this.cachePrefix}: not found \`${t}\``),this.resetLanguage();if("string"==typeof n){let t=`${this.cachePrefix}:`,r=`${t}${n}`,i=localStorage.getItem(r),s=async()=>{let e=await (await fetch(n)).json();if(this.cache){for(let e=0;e<localStorage.length;e++){let n=localStorage.key(e);n.startsWith(t)&&localStorage.removeItem(n)}localStorage.setItem(r,JSON.stringify(e))}return e};if(i)try{e=JSON.parse(i)}catch{e=await s()}else e=await s()}else e=n;if(this.resources[t]=e,!this.#tw){let t=[document.documentElement];for(;t.length;){let e=t.pop();e[nB]?.(),t.push(...[...e.children,...e.shadowRoot?.children||[]].reverse())}}return t!==this.currentLanguage&&(this.#tv=t),!0===this.cache&&this.setCache(),t}resetLanguage(){return this.#tb&&sA.forEach(t=>t.resetLanguage()),this.#tv=this.fallbackLanguage,this.cache&&localStorage.removeItem(this.#tm),this.setLanguage(this.detectLanguage())}setCache(){this.#tb&&sA.forEach(t=>t.setCache()),localStorage.setItem(this.#tm,this.currentLanguage)}createSubModule(t,e){let n=new sM({resources:e,cachePrefix:`${this.cachePrefix}-${t}`,currentLanguage:this.currentLanguage,fallbackLanguage:this.fallbackLanguage,cache:this.cache});return sA.add(n),n}toJSON(){return{currentLanguage:this.currentLanguage,currentLanguagePack:this.resources[this.currentLanguage]}}}let sR={PRINT:"print",get isPrint(){return matchMedia(this.PRINT).matches},HOVER:"(hover: hover)",get isHover(){return matchMedia(this.HOVER).matches},PWA:"(display-mode: standalone)",get isPWA(){return matchMedia(this.PWA).matches},MOTION_REDUCE:"(prefers-reduced-motion: reduce)",get isMotionReduce(){return matchMedia(this.MOTION_REDUCE).matches},DATA_REDUCE:"(prefers-reduced-data: reduce)",get isDataReduce(){return matchMedia(this.DATA_REDUCE).matches},WATCH:"(width < 320px)",get isWatch(){return matchMedia(this.WATCH).matches},SMALL_PHONE:"(320px <= width <= 480px) and (height <= 640px)",get isSmallPhone(){return matchMedia(this.SMALL_PHONE).matches},PHONE:"(320px <= width <= 480px)",get isPhone(){return matchMedia(this.PHONE).matches},PHONE_LANDSCAPE:"(480px < width < 960px) and (orientation: landscape)",get isPhoneLandscape(){return matchMedia(this.PHONE_LANDSCAPE).matches},SHORT:"(width >= 480px) and (height <= 320px)",get isShort(){return matchMedia(this.SHORT).matches},TABLET:"(480px < width <= 1280px)",get isTablet(){return matchMedia(this.TABLET).matches},DESKTOP:"(width > 1280px) and (orientation: landscape)",get isDesktop(){return matchMedia(this.DESKTOP).matches},WIDTHSCREEN:"(width >= 1920px) and (orientation: landscape)",get isWidthScreen(){return matchMedia(this.WIDTHSCREEN).matches}},sI=Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)).constructor;function sH(t={}){let{origin:e=location.origin,base:n="",appendHeaders:r=()=>({}),transformInput:i=t=>t,transformOutput:s=t=>t,...o}=t,a=t=>t instanceof FormData||t instanceof Blob||t instanceof sI||t instanceof URLSearchParams||t instanceof ReadableStream||t instanceof ArrayBuffer?t:"object"==typeof t?JSON.stringify(t):t,l=(t,r)=>{if(new URL(t,location.origin).pathname!==t)throw new n$("`path` format is incorrect");let i=new URLSearchParams(r).toString();return`${e}${n}${t}${i?"?":""}${i}`},c=t=>t?t instanceof Headers?Object.fromEntries(t):Object.fromEntries((Array.isArray(t)?t:Object.entries(t)).map(([t,e])=>[t.toLowerCase(),e])):{},u=async(t,e={})=>{let n=new Request(t,{...o,...e,headers:new Headers({"content-type":"application/json",...c(o.headers),...c(e.headers)})}),r=await fetch(n);if(204===r.status)return;if(0===r.status)throw Error("Request fail");if(r.status>=500)throw Error(r.statusText);let i=n.headers.get("content-type"),a=r.status>=400;try{let t;if(t=i.includes("json")?await r.json():i.includes("octet-stream")?await r.arrayBuffer():await r.text(),a)throw Error(r.statusText,{cause:t});return await s(t,n)}catch{throw Error("Parse error")}};return{request:u,async get(t,e){let n=await i(e);return u(l(t,n),{method:"GET",headers:await r(n)})},async del(t,e){let n=await i(e);return u(l(t,n),{method:"DELETE",headers:await r(n)})},async put(t,e){let n=await i(e);return u(l(t),{method:"PUT",headers:await r(n),body:a(n)})},async post(t,e){let n=await i(e);return u(l(t),{method:"POST",headers:await r(n),body:a(n)})}}}let{request:sD,del:sV,get:sz,post:sU,put:sW}=sH(),sG=new WeakMap,sq=new WeakMap;function sK(t){return sG.get(t)}function sB(t){return sq.get(t)}function sJ(t,e={}){let n=nv(),r=n0({})[nK],i=nM(t),s=()=>{Object.keys(i).forEach(t=>{e[t]||(e[t]=`--${nw(t)}-${n}`,o[t]=`var(${e[t]})`)})},o=new Proxy(nh({[nK]:r},t=>{i(t),s()}),{get(t,e){if(!t[e]){let[n,r,i]=e.match(/^(\w*Color)(\d+)$/)||[];r&&(t[e]=`oklch(from ${t[r]} calc(l - ${(Number(i)-400)/1e3}) c h)`)}return t[e]}});sq.set(o,e),sG.set(o,i);let a=()=>{s();let t="";Object.keys(i).forEach(n=>{t+=`${e[n]}:${i[n]};`}),r.setContent(`&,:host{${t}}`)};return a(),nR(i,()=>{a(),r.updateStyle()}),o}function sF(t){return sJ(t)}function sY(t){let e=sF(t);return document.adoptedStyleSheets.push(e[nK].getStyle()),e}function sZ(t,e){return sJ(e,sB(t))}function sQ(t){let e=sJ(t),n=sB(e);return nh(e,e=>(r,{addInitializer:i,access:s})=>{i(function(){let r=sJ({...t},n),i=r[nK].getStyle(this,!0);this.internals.sheets.push(i),this.memo(()=>{if(e5||CSS.supports("font:-apple-system-body"))return r(s.get(this).apply(this));let t=s.get(this).apply(this),e=i.cssRules[0],o=this.shadowRoot?e:i.element?.sheet?.cssRules[0]?.cssRules?.[0];for(let e in n)o?.style.setProperty(n[e],t[e])},e&&(()=>e(this)))})})}export{n7 as GemElement,n$ as GemError,sg as GemReflectElement,sM as I18n,np as LinkedList,sL as Logger,nm as PropProxyMap,ng as QueryString,nK as SheetToken,it as TemplateResult,nB as UpdateToken,tQ as GemActiveLinkElement,g as GemDialogBaseElement,tr as GemLightRouteElement,tZ as GemLinkElement,ti as GemRouteElement,ey as GemTitleElement,ej as GemUnsafeElement,eJ as GemUseElement,nF as _RenderErrorEvent,nO as _StoreListenerMap,r as _createTemplate,nN as _getUpdatedStores,nU as _renderRoot,nA as _setStoreRestorer,nd as absoluteLocation,nf as addListener,nc as addMicrotask,rM as adoptedStyle,nu as assignState,ry as attribute,iQ as basePathStore,rb as boolattribute,nw as camelToKebabCase,nP as classMap,n_ as cleanObject,nR as connect,rR as connectStore,sQ as createDecoratorTheme,sn as createHistoryParams,i4 as createModalClass,sZ as createOverrideTheme,se as createPath,iw as createRef,sF as createScopedTheme,n as createState,nM as createStore,sY as createTheme,nh as createUpdater,n0 as css,rz as customElement,rV as aria,rD as async,r_ as effect,rk as part,rx as state,rT as template,sV as del,i$ as directive,rj as emitter,nL as exportPartsMap,rP as fallback,sB as getThemeProps,sK as getThemeStore,rN as globalemitter,iY as history,nI as html,sH as initRequest,nE as isArrayChange,nS as kebabToCamelCase,rH as light,sO as logger,st as matchPath,is as mathml,sR as mediaQuery,rS as memo,rC as mounted,rv as numattribute,nC as objectMapToString,nx as partMap,sU as post,rw as property,sW as put,nv as randomStr,ny as raw,nH as render,iO as repeat,sz as get,sD as request,nD as setEngine,nz as setHydrationEngine,rI as shadow,rO as slot,sN as splice,nT as styleMap,nb as styled,ii as svg,iZ as titleStore,r$ as unmounted,i_ as version,rE as willMount};
|
|
@@ -30,6 +30,12 @@ export interface EndEventDetail {
|
|
|
30
30
|
/** 本次手势是否触发过 press,取消时也保留该状态。 */
|
|
31
31
|
pressed: boolean;
|
|
32
32
|
}
|
|
33
|
+
/** 移动超过该距离后锁定本次触摸的方向,与 iOS 一样同一次触摸只交给一个方向的手势。 */
|
|
34
|
+
export declare const AXIS_LOCK_SLOP = 10;
|
|
35
|
+
/** 判定偏向纵向,滚动、下拉不会因为拇指的横向抖动被抢走。 */
|
|
36
|
+
export declare const AXIS_LOCK_BIAS = 1.5;
|
|
37
|
+
/** 根据相对起点的位移锁定方向,位移不足时返回 `undefined`。 */
|
|
38
|
+
export declare function lockAxis(dx: number, dy: number): 'x' | 'y' | undefined;
|
|
33
39
|
/** Viewport coordinates in CSS pixels and a monotonic timestamp in milliseconds. */
|
|
34
40
|
export interface GestureSample {
|
|
35
41
|
clientX: number;
|
|
@@ -37,7 +43,7 @@ export interface GestureSample {
|
|
|
37
43
|
timeStamp: number;
|
|
38
44
|
}
|
|
39
45
|
/** Detect the final flick from chronological samples, including the release position and pause. */
|
|
40
|
-
export declare function getSwipe(startEvent: GestureSample, moves: readonly GestureSample[], evt: GestureSample, getMovementX?: (x: number
|
|
46
|
+
export declare function getSwipe(startEvent: GestureSample, moves: readonly GestureSample[], evt: GestureSample, getMovementX?: (x: number) => number, getMovementY?: (y: number) => number): SwipeEventDetail | undefined;
|
|
41
47
|
/**
|
|
42
48
|
* 块级元素,如果要设置成 `contents`,则内容块要设置 `touch-action: none`
|
|
43
49
|
* https://javascript.info/pointer-events#event-pointercancel
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gesture.d.ts","sourceRoot":"","sources":["../../src/elements/base/gesture.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEpD,OAAO,EAAO,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,MAAM,cAAc,GAAG;IAE3B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AACF,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC/C,KAAK,EAAE,MAAM,CAAC;CACf;AACD,MAAM,WAAW,gBAAgB;IAE/B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;CACf;AACD,MAAM,WAAW,iBAAiB;IAEhC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,MAAM,EAAE,MAAM,CAAC;CAChB;AACD,MAAM,WAAW,cAAc;IAC7B,qCAAqC;IACrC,KAAK,EAAE,YAAY,CAAC;IACpB,iCAAiC;IACjC,OAAO,EAAE,OAAO,CAAC;CAClB;AAQD,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,
|
|
1
|
+
{"version":3,"file":"gesture.d.ts","sourceRoot":"","sources":["../../src/elements/base/gesture.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEpD,OAAO,EAAO,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,MAAM,cAAc,GAAG;IAE3B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AACF,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC/C,KAAK,EAAE,MAAM,CAAC;CACf;AACD,MAAM,WAAW,gBAAgB;IAE/B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;CACf;AACD,MAAM,WAAW,iBAAiB;IAEhC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,MAAM,EAAE,MAAM,CAAC;CAChB;AACD,MAAM,WAAW,cAAc;IAC7B,qCAAqC;IACrC,KAAK,EAAE,YAAY,CAAC;IACpB,iCAAiC;IACjC,OAAO,EAAE,OAAO,CAAC;CAClB;AAQD,iDAAiD;AACjD,eAAO,MAAM,cAAc,KAAK,CAAC;AACjC,kCAAkC;AAClC,eAAO,MAAM,cAAc,MAAM,CAAC;AAElC,yCAAyC;AACzC,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,GAAG,GAAG,GAAG,GAAG,SAAS,CAGtE;AAED,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,KAAK,MAAM,EACpC,YAAY,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,GACnC,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"}
|
package/elements/base/gesture.js
CHANGED
|
@@ -39,6 +39,16 @@ const SWIPE_TIME_WINDOW = 100;
|
|
|
39
39
|
const SWIPE_MIN_SPEED = 0.3; // px/ms
|
|
40
40
|
const SWIPE_MIN_DISTANCE = 20;
|
|
41
41
|
const SWIPE_DIRECTION_SLOP = 10;
|
|
42
|
+
/** 移动超过该距离后锁定本次触摸的方向,与 iOS 一样同一次触摸只交给一个方向的手势。 */
|
|
43
|
+
export const AXIS_LOCK_SLOP = 10;
|
|
44
|
+
/** 判定偏向纵向,滚动、下拉不会因为拇指的横向抖动被抢走。 */
|
|
45
|
+
export const AXIS_LOCK_BIAS = 1.5;
|
|
46
|
+
/** 根据相对起点的位移锁定方向,位移不足时返回 `undefined`。 */
|
|
47
|
+
export function lockAxis(dx, dy) {
|
|
48
|
+
if (Math.max(Math.abs(dx), Math.abs(dy)) < AXIS_LOCK_SLOP)
|
|
49
|
+
return;
|
|
50
|
+
return Math.abs(dx) > Math.abs(dy) * AXIS_LOCK_BIAS ? 'x' : 'y';
|
|
51
|
+
}
|
|
42
52
|
/** Detect the final flick from chronological samples, including the release position and pause. */
|
|
43
53
|
export function getSwipe(startEvent, moves, evt, getMovementX, getMovementY) {
|
|
44
54
|
const targetTime = Math.max(startEvent.timeStamp, evt.timeStamp - SWIPE_TIME_WINDOW);
|
|
@@ -85,7 +95,7 @@ export function getSwipe(startEvent, moves, evt, getMovementX, getMovementY) {
|
|
|
85
95
|
const horizontal = Math.abs(dx) > Math.abs(dy);
|
|
86
96
|
if (Math.abs(dx) === Math.abs(dy))
|
|
87
97
|
return;
|
|
88
|
-
const movement = horizontal ? (getMovementX?.(dx
|
|
98
|
+
const movement = horizontal ? (getMovementX?.(dx) ?? dx) : (getMovementY?.(dy) ?? dy);
|
|
89
99
|
const distance = Math.abs(movement);
|
|
90
100
|
const speed = distance / duration;
|
|
91
101
|
if (distance < SWIPE_MIN_DISTANCE || speed < SWIPE_MIN_SPEED)
|
|
@@ -182,6 +192,7 @@ let GemGestureElement = (() => {
|
|
|
182
192
|
grabbing = (__runInitializers(this, _touchAction_extraInitializers), __runInitializers(this, _grabbing_initializers, void 0));
|
|
183
193
|
#pressed = (__runInitializers(this, _grabbing_extraInitializers), false); // 触发 press 之后不触发其他事件
|
|
184
194
|
#gestureTriggered = false; // 会排除 touchAction 方向
|
|
195
|
+
#axis; // 设置了 touchAction 时,本次单指触摸锁定的方向
|
|
185
196
|
#multiTouch = false;
|
|
186
197
|
#pressTimer = 0;
|
|
187
198
|
#startEventMap = new Map();
|
|
@@ -199,30 +210,23 @@ let GemGestureElement = (() => {
|
|
|
199
210
|
}
|
|
200
211
|
}
|
|
201
212
|
};
|
|
202
|
-
|
|
213
|
+
// 交给浏览器的方向,以及方向锁定之前和锁定之外的位移都不属于本元素
|
|
214
|
+
#getMovementX = (x) => {
|
|
203
215
|
const touchAction = this.touchAction;
|
|
204
216
|
if ((touchAction.includes('pan-right') && x > 0) ||
|
|
205
217
|
(touchAction.includes('pan-left') && x < 0) ||
|
|
206
218
|
touchAction.includes('pan-x') ||
|
|
207
|
-
(
|
|
208
|
-
(touchAction.includes('pan-up') && y < 0) ||
|
|
209
|
-
touchAction.includes('pan-y')) &&
|
|
210
|
-
Math.abs(y) > Math.abs(x)) // horizontally scrolling
|
|
211
|
-
) {
|
|
219
|
+
(touchAction.includes('pan-') && this.#axis !== 'x')) {
|
|
212
220
|
return 0;
|
|
213
221
|
}
|
|
214
222
|
return x;
|
|
215
223
|
};
|
|
216
|
-
#getMovementY = (
|
|
224
|
+
#getMovementY = (y) => {
|
|
217
225
|
const touchAction = this.touchAction;
|
|
218
226
|
if ((touchAction.includes('pan-down') && y > 0) ||
|
|
219
227
|
(touchAction.includes('pan-up') && y < 0) ||
|
|
220
228
|
touchAction.includes('pan-y') ||
|
|
221
|
-
(
|
|
222
|
-
(touchAction.includes('pan-left') && x < 0) ||
|
|
223
|
-
touchAction.includes('pan-x')) &&
|
|
224
|
-
Math.abs(x) > Math.abs(y)) // vertical scrolling
|
|
225
|
-
) {
|
|
229
|
+
(touchAction.includes('pan-') && this.#axis !== 'y')) {
|
|
226
230
|
return 0;
|
|
227
231
|
}
|
|
228
232
|
return y;
|
|
@@ -237,6 +241,7 @@ let GemGestureElement = (() => {
|
|
|
237
241
|
if (evt.isPrimary) {
|
|
238
242
|
this.#pressed = false;
|
|
239
243
|
this.#gestureTriggered = false;
|
|
244
|
+
this.#axis = undefined;
|
|
240
245
|
this.#pressTimer = setTimeout(() => {
|
|
241
246
|
this.press(evt);
|
|
242
247
|
this.#pressed = true;
|
|
@@ -259,9 +264,12 @@ let GemGestureElement = (() => {
|
|
|
259
264
|
// https://bugs.chromium.org/p/chromium/issues/detail?id=1092358
|
|
260
265
|
const movementX = clientX - lastMove.clientX;
|
|
261
266
|
const movementY = clientY - lastMove.clientY;
|
|
267
|
+
if (!this.#axis && this.#startEventMap.size === 1) {
|
|
268
|
+
this.#axis = lockAxis(clientX - startEvent.clientX, clientY - startEvent.clientY);
|
|
269
|
+
}
|
|
262
270
|
const move = {
|
|
263
|
-
x: this.#getMovementX(movementX
|
|
264
|
-
y: this.#getMovementY(
|
|
271
|
+
x: this.#getMovementX(movementX),
|
|
272
|
+
y: this.#getMovementY(movementY),
|
|
265
273
|
clientX,
|
|
266
274
|
clientY,
|
|
267
275
|
timeStamp,
|