@mantou/gem 1.6.2 → 1.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/element.js CHANGED
@@ -255,7 +255,7 @@ export class GemElement extends HTMLElement {
255
255
  sheets.forEach(({ style }) => {
256
256
  ele._sheets[style].count--;
257
257
  if (!ele._sheets[style].count) {
258
- ele._sheets[style].ele.remove();
258
+ delete ele._sheets[style];
259
259
  }
260
260
  });
261
261
  };
@@ -1 +1 @@
1
- {"version":3,"file":"element.js","sourceRoot":"","sources":["../src/lib/element.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAkB,MAAM,UAAU,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,UAAU,EAAS,MAAM,SAAS,CAAC;AACrD,OAAO,EACL,UAAU,EACV,YAAY,EAEZ,UAAU,EACV,aAAa,EACb,QAAQ,EACR,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,sBAAsB,GACvB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC3F,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEpD,kDAAkD;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAElD,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAsB3D,SAAS,aAAa;IACpB,WAAW;AACb,CAAC;AAED,SAAS,YAAY,CAAC,GAAQ;IAC5B,OAAO,GAAG,KAAK,UAAU,IAAI,GAAG,EAAE,CAAC;AACrC,CAAC;AAED,0BAA0B;AAC1B,MAAM,mBAAmB,GAAG,IAAI,UAAU,EAAc,CAAC;AACzD,MAAM,IAAI,GAAG,CAAC,SAAS,GAAG,WAAW,CAAC,GAAG,EAAE,EAAE,EAAE;IAC7C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iB,uBAAjB,iBAAiB,CAAE,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,cAAc,CAAC,GAAG,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC;QAC1E,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,cAAc,CAAC,GAAG,CAAC,SAAS,EAAE,gBAAgB,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;QAChG,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,cAAc,CAAC,GAAG,CAAC,SAAS,EAAE,gBAAgB,CAAC,KAAK,CAAC,EAAE,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC;QAC1G,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,EAAE,gBAAgB,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;KACpF;IAED,mBAAmB,CAAC,IAAI,EAAE,GAA+B,EAAE,OAAO,CAAC,CAAC;AACtE,CAAC,CAAC"}
package/lib/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const version = "1.6.2";
1
+ export declare const version = "1.6.3";
2
2
  //# sourceMappingURL=version.d.ts.map
package/lib/version.js CHANGED
@@ -1,3 +1,3 @@
1
1
  // Do not modify manually
2
- export const version = '1.6.2';
2
+ export const version = '1.6.3';
3
3
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mantou/gem",
3
- "version": "1.6.2",
3
+ "version": "1.6.3",
4
4
  "description": "💎 使用自定义元素的轻量级 WebApp 开发框架",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -152,7 +152,7 @@ export abstract class GemElement<T = Record<string, unknown>> extends HTMLElemen
152
152
  sheets.forEach(({ style }: any) => {
153
153
  ele._sheets[style].count--;
154
154
  if (!ele._sheets[style].count) {
155
- ele._sheets[style].ele.remove();
155
+ delete ele._sheets[style];
156
156
  }
157
157
  });
158
158
  };
@@ -1,2 +1,2 @@
1
1
  // Do not modify manually
2
- export const version = '1.6.2';
2
+ export const version = '1.6.3';
package/umd.js CHANGED
@@ -1,9 +1,9 @@
1
1
  /*! For license information please see umd.js.LICENSE.txt */
2
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Gem=e():t.Gem=e()}(self,(function(){return(()=>{"use strict";var t={d:(e,n)=>{for(var s in n)t.o(n,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:n[s]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{DialogBaseElement:()=>Vn,GemActiveLinkElement:()=>bn,GemElement:()=>Le,GemError:()=>M,GemLightRouteElement:()=>vn,GemLinkElement:()=>wn,GemReflectElement:()=>$n,GemRouteElement:()=>gn,GemTitleElement:()=>xn,GemUnsafeElement:()=>Cn,GemUseElement:()=>kn,I18n:()=>os,LinkedList:()=>y,PropProxyMap:()=>w,QueryString:()=>b,SVGTemplateResult:()=>$t,SheetToken:()=>x,StoreListenerMap:()=>D,TemplateResult:()=>Ot,absoluteLocation:()=>v,addMicrotask:()=>p,addMicrotaskToStack:()=>g,adoptedStyle:()=>Ye,attribute:()=>Ue,basePathStore:()=>rt,boolattribute:()=>Ge,camelToKebabCase:()=>N,classMap:()=>W,cleanObject:()=>j,connect:()=>G,connectStore:()=>tn,createCSSSheet:()=>k,createHistoryParams:()=>mn,createModalClass:()=>Ln,createPath:()=>fn,createStore:()=>I,createStoreSet:()=>q,createTheme:()=>Gn,css:()=>E,customElement:()=>nn,defineAttribute:()=>Me,defineCSSState:()=>We,defineProperty:()=>Ae,defineRef:()=>He,del:()=>us,directive:()=>ht,disconnect:()=>B,emitter:()=>Qe,get:()=>hs,getThemeProp:()=>Un,getThemeStore:()=>In,globalemitter:()=>Ze,guard:()=>ie,history:()=>F,html:()=>zt,ifDefined:()=>re,isArrayChange:()=>R,kebabToCamelCase:()=>L,matchPath:()=>pn,mediaQuery:()=>ms,nativeDefineElement:()=>Ve,numattribute:()=>Be,part:()=>Ke,partMap:()=>V,post:()=>ps,property:()=>Fe,put:()=>ds,randomStr:()=>T,raw:()=>S,refobject:()=>Ie,removeItems:()=>A,render:()=>Ft,repeat:()=>ne,request:()=>as,rootElement:()=>en,slot:()=>Je,splice:()=>ss,state:()=>ze,styleMap:()=>H,styled:()=>$,svg:()=>Jt,titleStore:()=>at,updateStore:()=>U,updateTheme:()=>Bn,useNativeCSSStyleSheet:()=>_,version:()=>sn});var n={};t.r(n),t.d(n,{GemElement:()=>Le,GemError:()=>M,LinkedList:()=>y,PropProxyMap:()=>w,QueryString:()=>b,SVGTemplateResult:()=>$t,SheetToken:()=>x,StoreListenerMap:()=>D,TemplateResult:()=>Ot,absoluteLocation:()=>v,addMicrotask:()=>p,addMicrotaskToStack:()=>g,adoptedStyle:()=>Ye,attribute:()=>Ue,basePathStore:()=>rt,boolattribute:()=>Ge,camelToKebabCase:()=>N,classMap:()=>W,cleanObject:()=>j,connect:()=>G,connectStore:()=>tn,createCSSSheet:()=>k,createStore:()=>I,createStoreSet:()=>q,css:()=>E,customElement:()=>nn,defineAttribute:()=>Me,defineCSSState:()=>We,defineProperty:()=>Ae,defineRef:()=>He,directive:()=>ht,disconnect:()=>B,emitter:()=>Qe,globalemitter:()=>Ze,guard:()=>ie,history:()=>F,html:()=>zt,ifDefined:()=>re,isArrayChange:()=>R,kebabToCamelCase:()=>L,nativeDefineElement:()=>Ve,numattribute:()=>Be,part:()=>Ke,partMap:()=>V,property:()=>Fe,randomStr:()=>T,raw:()=>S,refobject:()=>Ie,removeItems:()=>A,render:()=>Ft,repeat:()=>ne,rootElement:()=>en,slot:()=>Je,state:()=>ze,styleMap:()=>H,styled:()=>$,svg:()=>Jt,titleStore:()=>at,updateStore:()=>U,useNativeCSSStyleSheet:()=>_,version:()=>sn});var s,i,o,r,a,l,c,h=function(t,e,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(t):s?s.value:e.get(t)},u=function(t,e,n,s,i){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?i.call(t,n):i?i.value=n:e.set(t,n),n};const d=new Set;function p(t){"function"==typeof t&&(d.size||globalThis.queueMicrotask((()=>{d.forEach((t=>t())),d.clear()})),d.delete(t),d.add(t))}const f=[];function m(){for(let t=f.length-1;t>=0;t--)f[t]();f.length=0}function g(t){f.length||p(m),f.push(t)}function v(t="",e=""){const{pathname:n,search:s,hash:i}=new URL(e,location.origin+t);return n+s+i}class y extends(globalThis.EventTarget||Object){constructor(){super(...arguments),s.add(this),i.set(this,new Map),o.set(this,void 0),r.set(this,void 0)}get size(){return h(this,i,"f").size}add(t){h(this,r,"f")||this.dispatchEvent(new CustomEvent("start"));const e=h(this,s,"m",a).call(this,t)||{value:t};e.prev=h(this,r,"f"),e.prev&&(e.prev.next=e),e.next=void 0,u(this,r,e,"f"),h(this,o,"f")||u(this,o,e,"f"),h(this,i,"f").set(t,e)}delete(t){const e=h(this,s,"m",a).call(this,t);return h(this,o,"f")||this.dispatchEvent(new CustomEvent("end")),e}get(){const t=h(this,o,"f");if(t)return h(this,s,"m",a).call(this,t.value),t.value}}i=new WeakMap,o=new WeakMap,r=new WeakMap,s=new WeakSet,a=function(t){const e=h(this,i,"f").get(t);return e&&(e.prev?e.prev.next=e.next:u(this,o,e.next,"f"),e.next?e.next.prev=e.prev:u(this,r,e.prev,"f"),h(this,i,"f").delete(t)),e};class w extends WeakMap{get(t){let e=super.get(t);return e||(e={},this.set(t,e)),e}}class b extends URLSearchParams{constructor(t){super(t),l.set(this,(t=>"string"==typeof t?t:JSON.stringify(t))),c.set(this,(t=>{if(!t)return null;try{return JSON.parse(t)}catch(t){return null}}))}concat(t){let e;e="string"==typeof t?Object.fromEntries(new URLSearchParams(t).entries()):t,Object.entries(e).forEach((([t,e])=>{this.append(t,h(this,l,"f").call(this,e))}))}setAny(t,e){if(Array.isArray(e))this.delete(t),e.forEach((e=>this.append(t,h(this,l,"f").call(this,e))));else{const n=h(this,l,"f").call(this,e);n?this.set(t,n):this.delete(t)}}getAny(t){return this.getAnyAll(t)[0]}getAnyAll(t){return this.getAll(t).filter((t=>""!==t)).map((t=>h(this,c,"f").call(this,t)))}toString(){const t=super.toString();return t?`?${t}`:""}toJSON(){return this.toString()}}function S(t,...e){return t.reduce(((t,n,s)=>{var i;return t+(null!==(i=e[s-1])&&void 0!==i?i:"")+n}))}function E(t,...e){return S(t,...e)}l=new WeakMap,c=new WeakMap;const x=Symbol("sheet token");let _=!0,P=window.CSSStyleSheet;try{new P}catch(t){_=!1,P=class{constructor(){this.media={mediaText:""},this.style="",this.replaceSync=t=>this.style=t}}}function k(t,e=""){const n=new P,s={};n.media.mediaText=e;let i="";return"string"==typeof t?i=t:Object.keys(t).forEach((e=>{s[e]=`${e}-${T()}`,i+=t[e].styledContent.replace(/&/g,s[e])})),n.replaceSync(i),s[x]=n,s}function T(t=5,e="0123456789abcdefghijklmnopqrstuvwxyz"){const n=e.length;let s="";for(let i=0;i<t;i++)s+=e[Math.floor(Math.random()*n)];return s}const C=new RegExp("&.*{((.|\n)*)}","g");function O(t,e){const n=[];let s=`& {${t.replace(C,(t=>(n.push(t),"")))}}`+n.join("");return s=s.replace(/&/g,"class"===e?".&":"#&"),{styledContent:s,type:e}}const $={class:(t,...e)=>O(S(t,...e),"class"),id:(t,...e)=>O(S(t,...e),"id"),keyframes:(t,...e)=>({styledContent:`@keyframes & {${S(t,...e)}}`,type:"keyframes"})};function N(t){return t.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))}function L(t){return t.replace(/-(.)/g,((t,e)=>e.toUpperCase()))}function j(t){return Object.keys(t).forEach((e=>{delete t[e]})),t}class M extends Error{constructor(t){super(t),this.message=`gem: ${this.message}`}}function R(t,e){const n=t.length;for(let s=0;s<n;s++)if(t[s]!==e[s])return!0;return!1}function A(t,e){const n=new Set(e);return t.filter((t=>!n.has(t)||(n.delete(t),!1)))}function H(t){let e="";for(const n in t)t[n]&&(e+=`${N(n)}:${t[n]};`);return e}function W(t){let e=" ";for(const n in t)t[n]&&(e+=`${n} `);return e}const V=W,D=new WeakMap;function I(t){if(D.has(t))throw new M("argument error");return D.set(t,new Set),t}function q(t){return Object.keys(t).forEach((e=>{I(t[e])})),t}function U(t,e){Object.assign(t,e);const n=D.get(t);null==n||n.forEach((t=>{p(t)}))}function G(t,e){const n=D.get(t);null==n||n.add(e)}function B(t,e){const n=D.get(t);null==n||n.delete(e)}const F=window.history,z=window.location,J=F.pushState.bind(F),K=F.replaceState.bind(F);let Q=0;const Z=()=>`${performance.now()}-${++Q}`,X=I({$hasCloseHandle:!1,$hasOpenHandle:!1,$hasShouldCloseHandle:!1,$key:""}),Y=new Map;function tt({$key:t,$hasCloseHandle:e,$hasOpenHandle:n,$hasShouldCloseHandle:s}={}){if(X.$key!==t){if(t)throw new M("`$key` is not allowed");if(e)throw new M("`$hasCloseHandle` is not allowed");if(n)throw new M("`$hasOpenHandle` is not allowed");if(s)throw new M("`$hasShouldCloseHandle` is not allowed")}}function et(t){return F.basePath?F.basePath+t:t}function nt(t){return t===F.basePath?"/":t.replace(new RegExp(`^${F.basePath}/`),"/")}function st(t){const e=Y.get(X.$key)||{},n=t.path?v(e.path,t.path):nt(z.pathname),s=new b(t.query||(t.path?"":z.search)),i=t.path&&t.path!==e.path||t.query&&String(t.query)!==String(e.query),o=t.title||"",r=t.close||t.data||t.open||t.shouldClose,a=t.hash||(!i&&r?decodeURIComponent(z.hash):"");return Object.assign(Object.assign({},t),{title:o,path:n,query:s,hash:a})}function it(t,e){tt(e.data);const n=st(e),{title:s,path:i,query:o,hash:r,close:a,open:l,shouldClose:c,data:h}=n,u=Object.assign({$hasCloseHandle:!!a,$hasOpenHandle:!!l,$hasShouldCloseHandle:!!c,$key:Z()},h);Y.set(u.$key,n),U(j(X),u);const d=et(i)+new b(o)+r,p=decodeURIComponent(z.hash);("push"===t?J:K)(u,s,d),p!==r&&window.dispatchEvent(new CustomEvent("hashchange"))}function ot(t,e,n,s){tt(e);const i=Object.assign({$key:Z()},e||{}),{pathname:o,search:r,hash:a}=new URL(s,z.origin+z.pathname),l=st({path:o,query:new b(r),hash:a,title:n,data:e});Y.set(i.$key,l),U(j(X),i);const c=et(o)+l.query+a,h=z.hash;("push"===t?J:K)(i,n,c),h!==a&&window.dispatchEvent(new CustomEvent("hashchange"))}const rt=I({basePath:""});if(window.addEventListener("hashchange",(({isTrusted:t})=>{t&&F.replace({hash:decodeURIComponent(z.hash)})})),Object.defineProperties(F,{basePath:{get:()=>rt.basePath,set(t){U(rt,{basePath:t}),Object.assign(Y.get(X.$key),{path:nt(z.pathname)})}},getParams:{value:function(){return Y.get(X.$key)}},updateParams:{value:function(t){Object.assign(Y.get(X.$key),t),U(X,{})}},store:{value:X},push:{value:function(t){F.pushState(t,"")}},pushIgnoreCloseHandle:{value:function(t){var e,n;X.$hasCloseHandle?(null===(n=null===(e=Y.get(X.$key))||void 0===e?void 0:e.close)||void 0===n||n.call(e),F.replace(t)):F.push(t)}},replace:{value:function(t){it("replace",t)}}}),F.pushState=function(t,e,n){n?ot("push",t,e,n):it("push",t)},F.replaceState=function(t,e,n){ot("replace",t,e,n)},F.state)if(F.state.$hasCloseHandle){U(X,F.state);const t=st({title:document.title});Y.set(X.$key,t),F.back()}else{const t=st({title:document.title,hash:z.hash});U(X,Object.assign({$key:Z()},F.state||{})),Y.set(X.$key,t)}else{const{pathname:t,search:e,hash:n}=z;F.replace({path:t,query:e,hash:n})}const at=I({title:""});G(at,(()=>{const t=Y.get(X.$key);t&&(t.title=at.title)})),G(X,(()=>{const{title:t}=F.getParams();t!==at.title&&U(at,{title:t})}));let lt=!1;window.addEventListener("popstate",(t=>{var e,n;const s=t.state;if(!(null==s?void 0:s.$key))return;if(lt)return void(lt=!1);if(!Y.has(s.$key)){const{pathname:t,search:e,hash:n}=z;Y.set(s.$key,{path:t,query:new b(e),hash:n,title:document.title,data:s})}const i=X;if(parseFloat(s.$key)>parseFloat(i.$key)&&s.$hasOpenHandle)null===(n=null===(e=Y.get(s.$key))||void 0===e?void 0:e.open)||void 0===n||n.call(e);else if(i.$hasCloseHandle){const t=Y.get(i.$key),e=null==t?void 0:t.close,n=null==t?void 0:t.shouldClose;if(n&&!n())return lt=!0,void F.forward();e?e():s.$hasCloseHandle&&(lt=!0,F.back())}U(j(X),s)}));const ct=new WeakMap,ht=t=>(...e)=>{const n=t(...e);return ct.set(n,!0),n},ut=t=>"function"==typeof t&&ct.has(t),dt="undefined"!=typeof window&&null!=window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,pt=(t,e,n=null,s=null)=>{for(;e!==n;){const n=e.nextSibling;t.insertBefore(e,s),e=n}},ft=(t,e,n=null)=>{for(;e!==n;){const n=e.nextSibling;t.removeChild(e),e=n}},mt={},gt={},vt=`{{lit-${String(Math.random()).slice(2)}}}`,yt=`\x3c!--${vt}--\x3e`,wt=new RegExp(`${vt}|${yt}`),bt="$lit$";class St{constructor(t,e){this.parts=[],this.element=e;const n=[],s=[],i=document.createTreeWalker(e.content,133,null,!1);let o=0,r=-1,a=0;const{strings:l,values:{length:c}}=t;for(;a<c;){const t=i.nextNode();if(null!==t){if(r++,1===t.nodeType){if(t.hasAttributes()){const e=t.attributes,{length:n}=e;let s=0;for(let t=0;t<n;t++)Et(e[t].name,bt)&&s++;for(;s-- >0;){const e=l[a],n=Pt.exec(e)[2],s=n.toLowerCase()+bt,i=t.getAttribute(s);t.removeAttribute(s);const o=i.split(wt);this.parts.push({type:"attribute",index:r,name:n,strings:o}),a+=o.length-1}}"TEMPLATE"===t.tagName&&(s.push(t),i.currentNode=t.content)}else if(3===t.nodeType){const e=t.data;if(e.indexOf(vt)>=0){const s=t.parentNode,i=e.split(wt),o=i.length-1;for(let e=0;e<o;e++){let n,o=i[e];if(""===o)n=_t();else{const t=Pt.exec(o);null!==t&&Et(t[2],bt)&&(o=o.slice(0,t.index)+t[1]+t[2].slice(0,-bt.length)+t[3]),n=document.createTextNode(o)}s.insertBefore(n,t),this.parts.push({type:"node",index:++r})}""===i[o]?(s.insertBefore(_t(),t),n.push(t)):t.data=i[o],a+=o}}else if(8===t.nodeType)if(t.data===vt){const e=t.parentNode;null!==t.previousSibling&&r!==o||(r++,e.insertBefore(_t(),t)),o=r,this.parts.push({type:"node",index:r}),null===t.nextSibling?t.data="":(n.push(t),r--),a++}else{let e=-1;for(;-1!==(e=t.data.indexOf(vt,e+1));)this.parts.push({type:"node",index:-1}),a++}}else i.currentNode=s.pop()}for(const t of n)t.parentNode.removeChild(t)}}const Et=(t,e)=>{const n=t.length-e.length;return n>=0&&t.slice(n)===e},xt=t=>-1!==t.index,_t=()=>document.createComment(""),Pt=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;class kt{constructor(t,e,n){this.__parts=[],this.template=t,this.processor=e,this.options=n}update(t){let e=0;for(const n of this.__parts)void 0!==n&&n.setValue(t[e]),e++;for(const t of this.__parts)void 0!==t&&t.commit()}_clone(){const t=dt?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),e=[],n=this.template.parts,s=document.createTreeWalker(t,133,null,!1);let i,o=0,r=0,a=s.nextNode();for(;o<n.length;)if(i=n[o],xt(i)){for(;r<i.index;)r++,"TEMPLATE"===a.nodeName&&(e.push(a),s.currentNode=a.content),null===(a=s.nextNode())&&(s.currentNode=e.pop(),a=s.nextNode());if("node"===i.type){const t=this.processor.handleTextExpression(this.options);t.insertAfterNode(a.previousSibling),this.__parts.push(t)}else this.__parts.push(...this.processor.handleAttributeExpressions(a,i.name,i.strings,this.options));o++}else this.__parts.push(void 0),o++;return dt&&(document.adoptNode(t),customElements.upgrade(t)),t}}const Tt=window.trustedTypes&&trustedTypes.createPolicy("lit-html",{createHTML:t=>t}),Ct=` ${vt} `;class Ot{constructor(t,e,n,s){this.strings=t,this.values=e,this.type=n,this.processor=s}getHTML(){const t=this.strings.length-1;let e="",n=!1;for(let s=0;s<t;s++){const t=this.strings[s],i=t.lastIndexOf("\x3c!--");n=(i>-1||n)&&-1===t.indexOf("--\x3e",i+1);const o=Pt.exec(t);e+=null===o?t+(n?Ct:yt):t.substr(0,o.index)+o[1]+o[2]+bt+o[3]+vt}return e+=this.strings[t],e}getTemplateElement(){const t=document.createElement("template");let e=this.getHTML();return void 0!==Tt&&(e=Tt.createHTML(e)),t.innerHTML=e,t}}class $t extends Ot{getHTML(){return`<svg>${super.getHTML()}</svg>`}getTemplateElement(){const t=super.getTemplateElement(),e=t.content,n=e.firstChild;return e.removeChild(n),pt(e,n.firstChild),t}}const Nt=t=>null===t||!("object"==typeof t||"function"==typeof t),Lt=t=>Array.isArray(t)||!(!t||!t[Symbol.iterator]);class jt{constructor(t,e,n){this.dirty=!0,this.element=t,this.name=e,this.strings=n,this.parts=[];for(let t=0;t<n.length-1;t++)this.parts[t]=this._createPart()}_createPart(){return new Mt(this)}_getValue(){const t=this.strings,e=t.length-1,n=this.parts;if(1===e&&""===t[0]&&""===t[1]){const t=n[0].value;if("symbol"==typeof t)return String(t);if("string"==typeof t||!Lt(t))return t}let s="";for(let i=0;i<e;i++){s+=t[i];const e=n[i];if(void 0!==e){const t=e.value;if(Nt(t)||!Lt(t))s+="string"==typeof t?t:String(t);else for(const e of t)s+="string"==typeof e?e:String(e)}}return s+=t[e],s}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}class Mt{constructor(t){this.value=void 0,this.committer=t}setValue(t){t===mt||Nt(t)&&t===this.value||(this.value=t,ut(t)||(this.committer.dirty=!0))}commit(){for(;ut(this.value);){const t=this.value;this.value=mt,t(this)}this.value!==mt&&this.committer.commit()}}class Rt{constructor(t){this.value=void 0,this.__pendingValue=void 0,this.options=t}appendInto(t){this.startNode=t.appendChild(_t()),this.endNode=t.appendChild(_t())}insertAfterNode(t){this.startNode=t,this.endNode=t.nextSibling}appendIntoPart(t){t.__insert(this.startNode=_t()),t.__insert(this.endNode=_t())}insertAfterPart(t){t.__insert(this.startNode=_t()),this.endNode=t.endNode,t.endNode=this.startNode}setValue(t){this.__pendingValue=t}commit(){if(null===this.startNode.parentNode)return;for(;ut(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=mt,t(this)}const t=this.__pendingValue;t!==mt&&(Nt(t)?t!==this.value&&this.__commitText(t):t instanceof Ot?this.__commitTemplateResult(t):t instanceof Node?this.__commitNode(t):Lt(t)?this.__commitIterable(t):t===gt?(this.value=gt,this.clear()):this.__commitText(t))}__insert(t){this.endNode.parentNode.insertBefore(t,this.endNode)}__commitNode(t){this.value!==t&&(this.clear(),this.__insert(t),this.value=t)}__commitText(t){const e=this.startNode.nextSibling,n="string"==typeof(t=null==t?"":t)?t:String(t);e===this.endNode.previousSibling&&3===e.nodeType?e.data=n:this.__commitNode(document.createTextNode(n)),this.value=t}__commitTemplateResult(t){const e=this.options.templateFactory(t);if(this.value instanceof kt&&this.value.template===e)this.value.update(t.values);else{const n=new kt(e,t.processor,this.options),s=n._clone();n.update(t.values),this.__commitNode(s),this.value=n}}__commitIterable(t){Array.isArray(this.value)||(this.value=[],this.clear());const e=this.value;let n,s=0;for(const i of t)n=e[s],void 0===n&&(n=new Rt(this.options),e.push(n),0===s?n.appendIntoPart(this):n.insertAfterPart(e[s-1])),n.setValue(i),n.commit(),s++;s<e.length&&(e.length=s,this.clear(n&&n.endNode))}clear(t=this.startNode){ft(this.startNode.parentNode,t.nextSibling,this.endNode)}}class At{constructor(t,e,n){if(this.value=void 0,this.__pendingValue=void 0,2!==n.length||""!==n[0]||""!==n[1])throw new Error("Boolean attributes can only contain a single expression");this.element=t,this.name=e,this.strings=n}setValue(t){this.__pendingValue=t}commit(){for(;ut(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=mt,t(this)}if(this.__pendingValue===mt)return;const t=!!this.__pendingValue;this.value!==t&&(t?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=t),this.__pendingValue=mt}}class Ht extends jt{constructor(t,e,n){super(t,e,n),this.single=2===n.length&&""===n[0]&&""===n[1]}_createPart(){return new Wt(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}class Wt extends Mt{}let Vt=!1;(()=>{try{const t={get capture(){return Vt=!0,!1}};window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){}})();class Dt{constructor(t,e,n){this.value=void 0,this.__pendingValue=void 0,this.element=t,this.eventName=e,this.eventContext=n,this.__boundHandleEvent=t=>this.handleEvent(t)}setValue(t){this.__pendingValue=t}commit(){for(;ut(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=mt,t(this)}if(this.__pendingValue===mt)return;const t=this.__pendingValue,e=this.value,n=null==t||null!=e&&(t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive),s=null!=t&&(null==e||n);n&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),s&&(this.__options=It(t),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=t,this.__pendingValue=mt}handleEvent(t){"function"==typeof this.value?this.value.call(this.eventContext||this.element,t):this.value.handleEvent(t)}}const It=t=>t&&(Vt?{capture:t.capture,passive:t.passive,once:t.once}:t.capture),qt=new class{handleAttributeExpressions(t,e,n,s){const i=e[0];return"."===i?new Ht(t,e.slice(1),n).parts:"@"===i?[new Dt(t,e.slice(1),s.eventContext)]:"?"===i?[new At(t,e.slice(1),n)]:new jt(t,e,n).parts}handleTextExpression(t){return new Rt(t)}};function Ut(t){let e=Gt.get(t.type);void 0===e&&(e={stringsArray:new WeakMap,keyString:new Map},Gt.set(t.type,e));let n=e.stringsArray.get(t.strings);if(void 0!==n)return n;const s=t.strings.join(vt);return n=e.keyString.get(s),void 0===n&&(n=new St(t,t.getTemplateElement()),e.keyString.set(s,n)),e.stringsArray.set(t.strings,n),n}const Gt=new Map,Bt=new WeakMap,Ft=(t,e,n)=>{let s=Bt.get(e);void 0===s&&(ft(e,e.firstChild),Bt.set(e,s=new Rt(Object.assign({templateFactory:Ut},n))),s.appendInto(e)),s.setValue(t),s.commit()};"undefined"!=typeof window&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.4.1");const zt=(t,...e)=>new Ot(t,e,"html",qt),Jt=(t,...e)=>new $t(t,e,"svg",qt),Kt=(t,e)=>{const n=t.startNode.parentNode,s=void 0===e?t.endNode:e.startNode,i=n.insertBefore(_t(),s);n.insertBefore(_t(),s);const o=new Rt(t.options);return o.insertAfterNode(i),o},Qt=(t,e)=>(t.setValue(e),t.commit(),t),Zt=(t,e,n)=>{const s=t.startNode.parentNode,i=n?n.startNode:t.endNode,o=e.endNode.nextSibling;o!==i&&pt(s,e.startNode,o,i)},Xt=t=>{ft(t.startNode.parentNode,t.startNode,t.endNode.nextSibling)},Yt=(t,e,n)=>{const s=new Map;for(let i=e;i<=n;i++)s.set(t[i],i);return s},te=new WeakMap,ee=new WeakMap,ne=ht(((t,e,n)=>{let s;return void 0===n?n=e:void 0!==e&&(s=e),e=>{if(!(e instanceof Rt))throw new Error("repeat can only be used in text bindings");const i=te.get(e)||[],o=ee.get(e)||[],r=[],a=[],l=[];let c,h,u=0;for(const e of t)l[u]=s?s(e,u):u,a[u]=n(e,u),u++;let d=0,p=i.length-1,f=0,m=a.length-1;for(;d<=p&&f<=m;)if(null===i[d])d++;else if(null===i[p])p--;else if(o[d]===l[f])r[f]=Qt(i[d],a[f]),d++,f++;else if(o[p]===l[m])r[m]=Qt(i[p],a[m]),p--,m--;else if(o[d]===l[m])r[m]=Qt(i[d],a[m]),Zt(e,i[d],r[m+1]),d++,m--;else if(o[p]===l[f])r[f]=Qt(i[p],a[f]),Zt(e,i[p],i[d]),p--,f++;else if(void 0===c&&(c=Yt(l,f,m),h=Yt(o,d,p)),c.has(o[d]))if(c.has(o[p])){const t=h.get(l[f]),n=void 0!==t?i[t]:null;if(null===n){const t=Kt(e,i[d]);Qt(t,a[f]),r[f]=t}else r[f]=Qt(n,a[f]),Zt(e,n,i[d]),i[t]=null;f++}else Xt(i[p]),p--;else Xt(i[d]),d++;for(;f<=m;){const t=Kt(e,r[m+1]);Qt(t,a[f]),r[f++]=t}for(;d<=p;){const t=i[d++];null!==t&&Xt(t)}te.set(e,r),ee.set(e,l)}})),se=new WeakMap,ie=ht(((t,e)=>n=>{const s=se.get(n);if(Array.isArray(t)){if(Array.isArray(s)&&s.length===t.length&&t.every(((t,e)=>t===s[e])))return}else if(s===t&&(void 0!==t||se.has(n)))return;n.setValue(e()),se.set(n,Array.isArray(t)?Array.from(t):t)})),oe=new WeakMap,re=ht((t=>e=>{const n=oe.get(e);if(void 0===t&&e instanceof Mt){if(void 0!==n||!oe.has(e)){const t=e.committer.name;e.committer.element.removeAttribute(t)}}else t!==n&&e.setValue(t);oe.set(e,t)}));var ae,le,ce,he,ue,de,pe,fe,me,ge,ve,ye,we,be,Se,Ee,xe,_e=function(t,e,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(t):s?s.value:e.get(t)},Pe=function(t,e,n,s,i){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?i.call(t,n):i?i.value=n:e.set(t,n),n};function ke(){}function Te(t){"function"==typeof t&&t()}const Ce=new y,Oe=(t=performance.now())=>{if(performance.now()>t+16)return requestAnimationFrame(Oe);const e=Ce.get();e&&(e(),Oe(t))};Ce.addEventListener("start",(()=>p(Oe)));const $e=Symbol("init"),Ne=Symbol("update");class Le extends HTMLElement{constructor({isAsync:t,isLight:e,delegatesFocus:n}={}){super(),ae.set(this,void 0),le.set(this,void 0),ce.set(this,void 0),he.set(this,void 0),ue.set(this,void 0),de.set(this,void 0),pe.set(this,void 0),this.setState=t=>{if(!this.state)throw new M("`state` not initialized");Object.assign(this.state,t),p(_e(this,Se,"f"))},fe.set(this,(t=>{null==t||t.forEach((t=>{const{callback:e,getDep:n,values:s,preCallback:i}=t,o=null==n?void 0:n();n&&s&&!R(s,o)||(Te(i),t.preCallback=e(o,s),t.values=o)}))})),me.set(this,(()=>{_e(this,fe,"f").call(this,_e(this,ue,"f"))})),ge.set(this,(()=>{_e(this,fe,"f").call(this,_e(this,de,"f"))})),this.effect=(t,e)=>{_e(this,ue,"f")||Pe(this,ue,[],"f");const n={callback:t,getDep:e,values:void 0,initialized:!!this.isConnected};this.isConnected&&(n.values=null==e?void 0:e(),n.preCallback=t(n.values)),_e(this,ue,"f").push(n)},this.memo=(t,e)=>{_e(this,de,"f")||Pe(this,de,[],"f"),_e(this,de,"f").push({callback:t,getDep:e,values:[Symbol()],initialized:this.isConnected})},ve.set(this,(()=>{var t;null===(t=_e(this,ue,"f"))||void 0===t||t.forEach((t=>{const{callback:e,getDep:n,initialized:s}=t;s||(t.values=null==n?void 0:n(),t.preCallback=e(t.values),t.initialized=!0)}))})),ye.set(this,(()=>{var t,e;_e(this,ge,"f").call(this);const n=_?"":zt`${null===(e=null===(t=this.shadowRoot)||void 0===t?void 0:t.adoptedStyleSheets)||void 0===e?void 0:e.map((t=>zt`
2
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Gem=e():t.Gem=e()}(self,(function(){return(()=>{"use strict";var t={d:(e,n)=>{for(var s in n)t.o(n,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:n[s]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{DialogBaseElement:()=>Vn,GemActiveLinkElement:()=>bn,GemElement:()=>Le,GemError:()=>M,GemLightRouteElement:()=>vn,GemLinkElement:()=>wn,GemReflectElement:()=>$n,GemRouteElement:()=>mn,GemTitleElement:()=>xn,GemUnsafeElement:()=>Cn,GemUseElement:()=>kn,I18n:()=>os,LinkedList:()=>y,PropProxyMap:()=>w,QueryString:()=>b,SVGTemplateResult:()=>$t,SheetToken:()=>x,StoreListenerMap:()=>D,TemplateResult:()=>Ot,absoluteLocation:()=>v,addMicrotask:()=>p,addMicrotaskToStack:()=>m,adoptedStyle:()=>Ye,attribute:()=>Ue,basePathStore:()=>rt,boolattribute:()=>Ge,camelToKebabCase:()=>N,classMap:()=>W,cleanObject:()=>j,connect:()=>G,connectStore:()=>tn,createCSSSheet:()=>k,createHistoryParams:()=>gn,createModalClass:()=>Ln,createPath:()=>fn,createStore:()=>I,createStoreSet:()=>q,createTheme:()=>Gn,css:()=>E,customElement:()=>nn,defineAttribute:()=>Me,defineCSSState:()=>We,defineProperty:()=>Ae,defineRef:()=>He,del:()=>us,directive:()=>ht,disconnect:()=>B,emitter:()=>Qe,get:()=>hs,getThemeProp:()=>Un,getThemeStore:()=>In,globalemitter:()=>Ze,guard:()=>ie,history:()=>F,html:()=>zt,ifDefined:()=>re,isArrayChange:()=>R,kebabToCamelCase:()=>L,matchPath:()=>pn,mediaQuery:()=>gs,nativeDefineElement:()=>Ve,numattribute:()=>Be,part:()=>Ke,partMap:()=>V,post:()=>ps,property:()=>Fe,put:()=>ds,randomStr:()=>T,raw:()=>S,refobject:()=>Ie,removeItems:()=>A,render:()=>Ft,repeat:()=>ne,request:()=>as,rootElement:()=>en,slot:()=>Je,splice:()=>ss,state:()=>ze,styleMap:()=>H,styled:()=>$,svg:()=>Jt,titleStore:()=>at,updateStore:()=>U,updateTheme:()=>Bn,useNativeCSSStyleSheet:()=>_,version:()=>sn});var n={};t.r(n),t.d(n,{GemElement:()=>Le,GemError:()=>M,LinkedList:()=>y,PropProxyMap:()=>w,QueryString:()=>b,SVGTemplateResult:()=>$t,SheetToken:()=>x,StoreListenerMap:()=>D,TemplateResult:()=>Ot,absoluteLocation:()=>v,addMicrotask:()=>p,addMicrotaskToStack:()=>m,adoptedStyle:()=>Ye,attribute:()=>Ue,basePathStore:()=>rt,boolattribute:()=>Ge,camelToKebabCase:()=>N,classMap:()=>W,cleanObject:()=>j,connect:()=>G,connectStore:()=>tn,createCSSSheet:()=>k,createStore:()=>I,createStoreSet:()=>q,css:()=>E,customElement:()=>nn,defineAttribute:()=>Me,defineCSSState:()=>We,defineProperty:()=>Ae,defineRef:()=>He,directive:()=>ht,disconnect:()=>B,emitter:()=>Qe,globalemitter:()=>Ze,guard:()=>ie,history:()=>F,html:()=>zt,ifDefined:()=>re,isArrayChange:()=>R,kebabToCamelCase:()=>L,nativeDefineElement:()=>Ve,numattribute:()=>Be,part:()=>Ke,partMap:()=>V,property:()=>Fe,randomStr:()=>T,raw:()=>S,refobject:()=>Ie,removeItems:()=>A,render:()=>Ft,repeat:()=>ne,rootElement:()=>en,slot:()=>Je,state:()=>ze,styleMap:()=>H,styled:()=>$,svg:()=>Jt,titleStore:()=>at,updateStore:()=>U,useNativeCSSStyleSheet:()=>_,version:()=>sn});var s,i,o,r,a,l,c,h=function(t,e,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(t):s?s.value:e.get(t)},u=function(t,e,n,s,i){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?i.call(t,n):i?i.value=n:e.set(t,n),n};const d=new Set;function p(t){"function"==typeof t&&(d.size||globalThis.queueMicrotask((()=>{d.forEach((t=>t())),d.clear()})),d.delete(t),d.add(t))}const f=[];function g(){for(let t=f.length-1;t>=0;t--)f[t]();f.length=0}function m(t){f.length||p(g),f.push(t)}function v(t="",e=""){const{pathname:n,search:s,hash:i}=new URL(e,location.origin+t);return n+s+i}class y extends(globalThis.EventTarget||Object){constructor(){super(...arguments),s.add(this),i.set(this,new Map),o.set(this,void 0),r.set(this,void 0)}get size(){return h(this,i,"f").size}add(t){h(this,r,"f")||this.dispatchEvent(new CustomEvent("start"));const e=h(this,s,"m",a).call(this,t)||{value:t};e.prev=h(this,r,"f"),e.prev&&(e.prev.next=e),e.next=void 0,u(this,r,e,"f"),h(this,o,"f")||u(this,o,e,"f"),h(this,i,"f").set(t,e)}delete(t){const e=h(this,s,"m",a).call(this,t);return h(this,o,"f")||this.dispatchEvent(new CustomEvent("end")),e}get(){const t=h(this,o,"f");if(t)return h(this,s,"m",a).call(this,t.value),t.value}}i=new WeakMap,o=new WeakMap,r=new WeakMap,s=new WeakSet,a=function(t){const e=h(this,i,"f").get(t);return e&&(e.prev?e.prev.next=e.next:u(this,o,e.next,"f"),e.next?e.next.prev=e.prev:u(this,r,e.prev,"f"),h(this,i,"f").delete(t)),e};class w extends WeakMap{get(t){let e=super.get(t);return e||(e={},this.set(t,e)),e}}class b extends URLSearchParams{constructor(t){super(t),l.set(this,(t=>"string"==typeof t?t:JSON.stringify(t))),c.set(this,(t=>{if(!t)return null;try{return JSON.parse(t)}catch(t){return null}}))}concat(t){let e;e="string"==typeof t?Object.fromEntries(new URLSearchParams(t).entries()):t,Object.entries(e).forEach((([t,e])=>{this.append(t,h(this,l,"f").call(this,e))}))}setAny(t,e){if(Array.isArray(e))this.delete(t),e.forEach((e=>this.append(t,h(this,l,"f").call(this,e))));else{const n=h(this,l,"f").call(this,e);n?this.set(t,n):this.delete(t)}}getAny(t){return this.getAnyAll(t)[0]}getAnyAll(t){return this.getAll(t).filter((t=>""!==t)).map((t=>h(this,c,"f").call(this,t)))}toString(){const t=super.toString();return t?`?${t}`:""}toJSON(){return this.toString()}}function S(t,...e){return t.reduce(((t,n,s)=>{var i;return t+(null!==(i=e[s-1])&&void 0!==i?i:"")+n}))}function E(t,...e){return S(t,...e)}l=new WeakMap,c=new WeakMap;const x=Symbol("sheet token");let _=!0,P=window.CSSStyleSheet;try{new P}catch(t){_=!1,P=class{constructor(){this.media={mediaText:""},this.style="",this.replaceSync=t=>this.style=t}}}function k(t,e=""){const n=new P,s={};n.media.mediaText=e;let i="";return"string"==typeof t?i=t:Object.keys(t).forEach((e=>{s[e]=`${e}-${T()}`,i+=t[e].styledContent.replace(/&/g,s[e])})),n.replaceSync(i),s[x]=n,s}function T(t=5,e="0123456789abcdefghijklmnopqrstuvwxyz"){const n=e.length;let s="";for(let i=0;i<t;i++)s+=e[Math.floor(Math.random()*n)];return s}const C=new RegExp("&.*{((.|\n)*)}","g");function O(t,e){const n=[];let s=`& {${t.replace(C,(t=>(n.push(t),"")))}}`+n.join("");return s=s.replace(/&/g,"class"===e?".&":"#&"),{styledContent:s,type:e}}const $={class:(t,...e)=>O(S(t,...e),"class"),id:(t,...e)=>O(S(t,...e),"id"),keyframes:(t,...e)=>({styledContent:`@keyframes & {${S(t,...e)}}`,type:"keyframes"})};function N(t){return t.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))}function L(t){return t.replace(/-(.)/g,((t,e)=>e.toUpperCase()))}function j(t){return Object.keys(t).forEach((e=>{delete t[e]})),t}class M extends Error{constructor(t){super(t),this.message=`gem: ${this.message}`}}function R(t,e){const n=t.length;for(let s=0;s<n;s++)if(t[s]!==e[s])return!0;return!1}function A(t,e){const n=new Set(e);return t.filter((t=>!n.has(t)||(n.delete(t),!1)))}function H(t){let e="";for(const n in t)t[n]&&(e+=`${N(n)}:${t[n]};`);return e}function W(t){let e=" ";for(const n in t)t[n]&&(e+=`${n} `);return e}const V=W,D=new WeakMap;function I(t){if(D.has(t))throw new M("argument error");return D.set(t,new Set),t}function q(t){return Object.keys(t).forEach((e=>{I(t[e])})),t}function U(t,e){Object.assign(t,e);const n=D.get(t);null==n||n.forEach((t=>{p(t)}))}function G(t,e){const n=D.get(t);null==n||n.add(e)}function B(t,e){const n=D.get(t);null==n||n.delete(e)}const F=window.history,z=window.location,J=F.pushState.bind(F),K=F.replaceState.bind(F);let Q=0;const Z=()=>`${performance.now()}-${++Q}`,X=I({$hasCloseHandle:!1,$hasOpenHandle:!1,$hasShouldCloseHandle:!1,$key:""}),Y=new Map;function tt({$key:t,$hasCloseHandle:e,$hasOpenHandle:n,$hasShouldCloseHandle:s}={}){if(X.$key!==t){if(t)throw new M("`$key` is not allowed");if(e)throw new M("`$hasCloseHandle` is not allowed");if(n)throw new M("`$hasOpenHandle` is not allowed");if(s)throw new M("`$hasShouldCloseHandle` is not allowed")}}function et(t){return F.basePath?F.basePath+t:t}function nt(t){return t===F.basePath?"/":t.replace(new RegExp(`^${F.basePath}/`),"/")}function st(t){const e=Y.get(X.$key)||{},n=t.path?v(e.path,t.path):nt(z.pathname),s=new b(t.query||(t.path?"":z.search)),i=t.path&&t.path!==e.path||t.query&&String(t.query)!==String(e.query),o=t.title||"",r=t.close||t.data||t.open||t.shouldClose,a=t.hash||(!i&&r?decodeURIComponent(z.hash):"");return Object.assign(Object.assign({},t),{title:o,path:n,query:s,hash:a})}function it(t,e){tt(e.data);const n=st(e),{title:s,path:i,query:o,hash:r,close:a,open:l,shouldClose:c,data:h}=n,u=Object.assign({$hasCloseHandle:!!a,$hasOpenHandle:!!l,$hasShouldCloseHandle:!!c,$key:Z()},h);Y.set(u.$key,n),U(j(X),u);const d=et(i)+new b(o)+r,p=decodeURIComponent(z.hash);("push"===t?J:K)(u,s,d),p!==r&&window.dispatchEvent(new CustomEvent("hashchange"))}function ot(t,e,n,s){tt(e);const i=Object.assign({$key:Z()},e||{}),{pathname:o,search:r,hash:a}=new URL(s,z.origin+z.pathname),l=st({path:o,query:new b(r),hash:a,title:n,data:e});Y.set(i.$key,l),U(j(X),i);const c=et(o)+l.query+a,h=z.hash;("push"===t?J:K)(i,n,c),h!==a&&window.dispatchEvent(new CustomEvent("hashchange"))}const rt=I({basePath:""});if(window.addEventListener("hashchange",(({isTrusted:t})=>{t&&F.replace({hash:decodeURIComponent(z.hash)})})),Object.defineProperties(F,{basePath:{get:()=>rt.basePath,set(t){U(rt,{basePath:t}),Object.assign(Y.get(X.$key),{path:nt(z.pathname)})}},getParams:{value:function(){return Y.get(X.$key)}},updateParams:{value:function(t){Object.assign(Y.get(X.$key),t),U(X,{})}},store:{value:X},push:{value:function(t){F.pushState(t,"")}},pushIgnoreCloseHandle:{value:function(t){var e,n;X.$hasCloseHandle?(null===(n=null===(e=Y.get(X.$key))||void 0===e?void 0:e.close)||void 0===n||n.call(e),F.replace(t)):F.push(t)}},replace:{value:function(t){it("replace",t)}}}),F.pushState=function(t,e,n){n?ot("push",t,e,n):it("push",t)},F.replaceState=function(t,e,n){ot("replace",t,e,n)},F.state)if(F.state.$hasCloseHandle){U(X,F.state);const t=st({title:document.title});Y.set(X.$key,t),F.back()}else{const t=st({title:document.title,hash:z.hash});U(X,Object.assign({$key:Z()},F.state||{})),Y.set(X.$key,t)}else{const{pathname:t,search:e,hash:n}=z;F.replace({path:t,query:e,hash:n})}const at=I({title:""});G(at,(()=>{const t=Y.get(X.$key);t&&(t.title=at.title)})),G(X,(()=>{const{title:t}=F.getParams();t!==at.title&&U(at,{title:t})}));let lt=!1;window.addEventListener("popstate",(t=>{var e,n;const s=t.state;if(!(null==s?void 0:s.$key))return;if(lt)return void(lt=!1);if(!Y.has(s.$key)){const{pathname:t,search:e,hash:n}=z;Y.set(s.$key,{path:t,query:new b(e),hash:n,title:document.title,data:s})}const i=X;if(parseFloat(s.$key)>parseFloat(i.$key)&&s.$hasOpenHandle)null===(n=null===(e=Y.get(s.$key))||void 0===e?void 0:e.open)||void 0===n||n.call(e);else if(i.$hasCloseHandle){const t=Y.get(i.$key),e=null==t?void 0:t.close,n=null==t?void 0:t.shouldClose;if(n&&!n())return lt=!0,void F.forward();e?e():s.$hasCloseHandle&&(lt=!0,F.back())}U(j(X),s)}));const ct=new WeakMap,ht=t=>(...e)=>{const n=t(...e);return ct.set(n,!0),n},ut=t=>"function"==typeof t&&ct.has(t),dt="undefined"!=typeof window&&null!=window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,pt=(t,e,n=null,s=null)=>{for(;e!==n;){const n=e.nextSibling;t.insertBefore(e,s),e=n}},ft=(t,e,n=null)=>{for(;e!==n;){const n=e.nextSibling;t.removeChild(e),e=n}},gt={},mt={},vt=`{{lit-${String(Math.random()).slice(2)}}}`,yt=`\x3c!--${vt}--\x3e`,wt=new RegExp(`${vt}|${yt}`),bt="$lit$";class St{constructor(t,e){this.parts=[],this.element=e;const n=[],s=[],i=document.createTreeWalker(e.content,133,null,!1);let o=0,r=-1,a=0;const{strings:l,values:{length:c}}=t;for(;a<c;){const t=i.nextNode();if(null!==t){if(r++,1===t.nodeType){if(t.hasAttributes()){const e=t.attributes,{length:n}=e;let s=0;for(let t=0;t<n;t++)Et(e[t].name,bt)&&s++;for(;s-- >0;){const e=l[a],n=Pt.exec(e)[2],s=n.toLowerCase()+bt,i=t.getAttribute(s);t.removeAttribute(s);const o=i.split(wt);this.parts.push({type:"attribute",index:r,name:n,strings:o}),a+=o.length-1}}"TEMPLATE"===t.tagName&&(s.push(t),i.currentNode=t.content)}else if(3===t.nodeType){const e=t.data;if(e.indexOf(vt)>=0){const s=t.parentNode,i=e.split(wt),o=i.length-1;for(let e=0;e<o;e++){let n,o=i[e];if(""===o)n=_t();else{const t=Pt.exec(o);null!==t&&Et(t[2],bt)&&(o=o.slice(0,t.index)+t[1]+t[2].slice(0,-bt.length)+t[3]),n=document.createTextNode(o)}s.insertBefore(n,t),this.parts.push({type:"node",index:++r})}""===i[o]?(s.insertBefore(_t(),t),n.push(t)):t.data=i[o],a+=o}}else if(8===t.nodeType)if(t.data===vt){const e=t.parentNode;null!==t.previousSibling&&r!==o||(r++,e.insertBefore(_t(),t)),o=r,this.parts.push({type:"node",index:r}),null===t.nextSibling?t.data="":(n.push(t),r--),a++}else{let e=-1;for(;-1!==(e=t.data.indexOf(vt,e+1));)this.parts.push({type:"node",index:-1}),a++}}else i.currentNode=s.pop()}for(const t of n)t.parentNode.removeChild(t)}}const Et=(t,e)=>{const n=t.length-e.length;return n>=0&&t.slice(n)===e},xt=t=>-1!==t.index,_t=()=>document.createComment(""),Pt=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;class kt{constructor(t,e,n){this.__parts=[],this.template=t,this.processor=e,this.options=n}update(t){let e=0;for(const n of this.__parts)void 0!==n&&n.setValue(t[e]),e++;for(const t of this.__parts)void 0!==t&&t.commit()}_clone(){const t=dt?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),e=[],n=this.template.parts,s=document.createTreeWalker(t,133,null,!1);let i,o=0,r=0,a=s.nextNode();for(;o<n.length;)if(i=n[o],xt(i)){for(;r<i.index;)r++,"TEMPLATE"===a.nodeName&&(e.push(a),s.currentNode=a.content),null===(a=s.nextNode())&&(s.currentNode=e.pop(),a=s.nextNode());if("node"===i.type){const t=this.processor.handleTextExpression(this.options);t.insertAfterNode(a.previousSibling),this.__parts.push(t)}else this.__parts.push(...this.processor.handleAttributeExpressions(a,i.name,i.strings,this.options));o++}else this.__parts.push(void 0),o++;return dt&&(document.adoptNode(t),customElements.upgrade(t)),t}}const Tt=window.trustedTypes&&trustedTypes.createPolicy("lit-html",{createHTML:t=>t}),Ct=` ${vt} `;class Ot{constructor(t,e,n,s){this.strings=t,this.values=e,this.type=n,this.processor=s}getHTML(){const t=this.strings.length-1;let e="",n=!1;for(let s=0;s<t;s++){const t=this.strings[s],i=t.lastIndexOf("\x3c!--");n=(i>-1||n)&&-1===t.indexOf("--\x3e",i+1);const o=Pt.exec(t);e+=null===o?t+(n?Ct:yt):t.substr(0,o.index)+o[1]+o[2]+bt+o[3]+vt}return e+=this.strings[t],e}getTemplateElement(){const t=document.createElement("template");let e=this.getHTML();return void 0!==Tt&&(e=Tt.createHTML(e)),t.innerHTML=e,t}}class $t extends Ot{getHTML(){return`<svg>${super.getHTML()}</svg>`}getTemplateElement(){const t=super.getTemplateElement(),e=t.content,n=e.firstChild;return e.removeChild(n),pt(e,n.firstChild),t}}const Nt=t=>null===t||!("object"==typeof t||"function"==typeof t),Lt=t=>Array.isArray(t)||!(!t||!t[Symbol.iterator]);class jt{constructor(t,e,n){this.dirty=!0,this.element=t,this.name=e,this.strings=n,this.parts=[];for(let t=0;t<n.length-1;t++)this.parts[t]=this._createPart()}_createPart(){return new Mt(this)}_getValue(){const t=this.strings,e=t.length-1,n=this.parts;if(1===e&&""===t[0]&&""===t[1]){const t=n[0].value;if("symbol"==typeof t)return String(t);if("string"==typeof t||!Lt(t))return t}let s="";for(let i=0;i<e;i++){s+=t[i];const e=n[i];if(void 0!==e){const t=e.value;if(Nt(t)||!Lt(t))s+="string"==typeof t?t:String(t);else for(const e of t)s+="string"==typeof e?e:String(e)}}return s+=t[e],s}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}class Mt{constructor(t){this.value=void 0,this.committer=t}setValue(t){t===gt||Nt(t)&&t===this.value||(this.value=t,ut(t)||(this.committer.dirty=!0))}commit(){for(;ut(this.value);){const t=this.value;this.value=gt,t(this)}this.value!==gt&&this.committer.commit()}}class Rt{constructor(t){this.value=void 0,this.__pendingValue=void 0,this.options=t}appendInto(t){this.startNode=t.appendChild(_t()),this.endNode=t.appendChild(_t())}insertAfterNode(t){this.startNode=t,this.endNode=t.nextSibling}appendIntoPart(t){t.__insert(this.startNode=_t()),t.__insert(this.endNode=_t())}insertAfterPart(t){t.__insert(this.startNode=_t()),this.endNode=t.endNode,t.endNode=this.startNode}setValue(t){this.__pendingValue=t}commit(){if(null===this.startNode.parentNode)return;for(;ut(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=gt,t(this)}const t=this.__pendingValue;t!==gt&&(Nt(t)?t!==this.value&&this.__commitText(t):t instanceof Ot?this.__commitTemplateResult(t):t instanceof Node?this.__commitNode(t):Lt(t)?this.__commitIterable(t):t===mt?(this.value=mt,this.clear()):this.__commitText(t))}__insert(t){this.endNode.parentNode.insertBefore(t,this.endNode)}__commitNode(t){this.value!==t&&(this.clear(),this.__insert(t),this.value=t)}__commitText(t){const e=this.startNode.nextSibling,n="string"==typeof(t=null==t?"":t)?t:String(t);e===this.endNode.previousSibling&&3===e.nodeType?e.data=n:this.__commitNode(document.createTextNode(n)),this.value=t}__commitTemplateResult(t){const e=this.options.templateFactory(t);if(this.value instanceof kt&&this.value.template===e)this.value.update(t.values);else{const n=new kt(e,t.processor,this.options),s=n._clone();n.update(t.values),this.__commitNode(s),this.value=n}}__commitIterable(t){Array.isArray(this.value)||(this.value=[],this.clear());const e=this.value;let n,s=0;for(const i of t)n=e[s],void 0===n&&(n=new Rt(this.options),e.push(n),0===s?n.appendIntoPart(this):n.insertAfterPart(e[s-1])),n.setValue(i),n.commit(),s++;s<e.length&&(e.length=s,this.clear(n&&n.endNode))}clear(t=this.startNode){ft(this.startNode.parentNode,t.nextSibling,this.endNode)}}class At{constructor(t,e,n){if(this.value=void 0,this.__pendingValue=void 0,2!==n.length||""!==n[0]||""!==n[1])throw new Error("Boolean attributes can only contain a single expression");this.element=t,this.name=e,this.strings=n}setValue(t){this.__pendingValue=t}commit(){for(;ut(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=gt,t(this)}if(this.__pendingValue===gt)return;const t=!!this.__pendingValue;this.value!==t&&(t?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=t),this.__pendingValue=gt}}class Ht extends jt{constructor(t,e,n){super(t,e,n),this.single=2===n.length&&""===n[0]&&""===n[1]}_createPart(){return new Wt(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}class Wt extends Mt{}let Vt=!1;(()=>{try{const t={get capture(){return Vt=!0,!1}};window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){}})();class Dt{constructor(t,e,n){this.value=void 0,this.__pendingValue=void 0,this.element=t,this.eventName=e,this.eventContext=n,this.__boundHandleEvent=t=>this.handleEvent(t)}setValue(t){this.__pendingValue=t}commit(){for(;ut(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=gt,t(this)}if(this.__pendingValue===gt)return;const t=this.__pendingValue,e=this.value,n=null==t||null!=e&&(t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive),s=null!=t&&(null==e||n);n&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),s&&(this.__options=It(t),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=t,this.__pendingValue=gt}handleEvent(t){"function"==typeof this.value?this.value.call(this.eventContext||this.element,t):this.value.handleEvent(t)}}const It=t=>t&&(Vt?{capture:t.capture,passive:t.passive,once:t.once}:t.capture),qt=new class{handleAttributeExpressions(t,e,n,s){const i=e[0];return"."===i?new Ht(t,e.slice(1),n).parts:"@"===i?[new Dt(t,e.slice(1),s.eventContext)]:"?"===i?[new At(t,e.slice(1),n)]:new jt(t,e,n).parts}handleTextExpression(t){return new Rt(t)}};function Ut(t){let e=Gt.get(t.type);void 0===e&&(e={stringsArray:new WeakMap,keyString:new Map},Gt.set(t.type,e));let n=e.stringsArray.get(t.strings);if(void 0!==n)return n;const s=t.strings.join(vt);return n=e.keyString.get(s),void 0===n&&(n=new St(t,t.getTemplateElement()),e.keyString.set(s,n)),e.stringsArray.set(t.strings,n),n}const Gt=new Map,Bt=new WeakMap,Ft=(t,e,n)=>{let s=Bt.get(e);void 0===s&&(ft(e,e.firstChild),Bt.set(e,s=new Rt(Object.assign({templateFactory:Ut},n))),s.appendInto(e)),s.setValue(t),s.commit()};"undefined"!=typeof window&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.4.1");const zt=(t,...e)=>new Ot(t,e,"html",qt),Jt=(t,...e)=>new $t(t,e,"svg",qt),Kt=(t,e)=>{const n=t.startNode.parentNode,s=void 0===e?t.endNode:e.startNode,i=n.insertBefore(_t(),s);n.insertBefore(_t(),s);const o=new Rt(t.options);return o.insertAfterNode(i),o},Qt=(t,e)=>(t.setValue(e),t.commit(),t),Zt=(t,e,n)=>{const s=t.startNode.parentNode,i=n?n.startNode:t.endNode,o=e.endNode.nextSibling;o!==i&&pt(s,e.startNode,o,i)},Xt=t=>{ft(t.startNode.parentNode,t.startNode,t.endNode.nextSibling)},Yt=(t,e,n)=>{const s=new Map;for(let i=e;i<=n;i++)s.set(t[i],i);return s},te=new WeakMap,ee=new WeakMap,ne=ht(((t,e,n)=>{let s;return void 0===n?n=e:void 0!==e&&(s=e),e=>{if(!(e instanceof Rt))throw new Error("repeat can only be used in text bindings");const i=te.get(e)||[],o=ee.get(e)||[],r=[],a=[],l=[];let c,h,u=0;for(const e of t)l[u]=s?s(e,u):u,a[u]=n(e,u),u++;let d=0,p=i.length-1,f=0,g=a.length-1;for(;d<=p&&f<=g;)if(null===i[d])d++;else if(null===i[p])p--;else if(o[d]===l[f])r[f]=Qt(i[d],a[f]),d++,f++;else if(o[p]===l[g])r[g]=Qt(i[p],a[g]),p--,g--;else if(o[d]===l[g])r[g]=Qt(i[d],a[g]),Zt(e,i[d],r[g+1]),d++,g--;else if(o[p]===l[f])r[f]=Qt(i[p],a[f]),Zt(e,i[p],i[d]),p--,f++;else if(void 0===c&&(c=Yt(l,f,g),h=Yt(o,d,p)),c.has(o[d]))if(c.has(o[p])){const t=h.get(l[f]),n=void 0!==t?i[t]:null;if(null===n){const t=Kt(e,i[d]);Qt(t,a[f]),r[f]=t}else r[f]=Qt(n,a[f]),Zt(e,n,i[d]),i[t]=null;f++}else Xt(i[p]),p--;else Xt(i[d]),d++;for(;f<=g;){const t=Kt(e,r[g+1]);Qt(t,a[f]),r[f++]=t}for(;d<=p;){const t=i[d++];null!==t&&Xt(t)}te.set(e,r),ee.set(e,l)}})),se=new WeakMap,ie=ht(((t,e)=>n=>{const s=se.get(n);if(Array.isArray(t)){if(Array.isArray(s)&&s.length===t.length&&t.every(((t,e)=>t===s[e])))return}else if(s===t&&(void 0!==t||se.has(n)))return;n.setValue(e()),se.set(n,Array.isArray(t)?Array.from(t):t)})),oe=new WeakMap,re=ht((t=>e=>{const n=oe.get(e);if(void 0===t&&e instanceof Mt){if(void 0!==n||!oe.has(e)){const t=e.committer.name;e.committer.element.removeAttribute(t)}}else t!==n&&e.setValue(t);oe.set(e,t)}));var ae,le,ce,he,ue,de,pe,fe,ge,me,ve,ye,we,be,Se,Ee,xe,_e=function(t,e,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(t):s?s.value:e.get(t)},Pe=function(t,e,n,s,i){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?i.call(t,n):i?i.value=n:e.set(t,n),n};function ke(){}function Te(t){"function"==typeof t&&t()}const Ce=new y,Oe=(t=performance.now())=>{if(performance.now()>t+16)return requestAnimationFrame(Oe);const e=Ce.get();e&&(e(),Oe(t))};Ce.addEventListener("start",(()=>p(Oe)));const $e=Symbol("init"),Ne=Symbol("update");class Le extends HTMLElement{constructor({isAsync:t,isLight:e,delegatesFocus:n}={}){super(),ae.set(this,void 0),le.set(this,void 0),ce.set(this,void 0),he.set(this,void 0),ue.set(this,void 0),de.set(this,void 0),pe.set(this,void 0),this.setState=t=>{if(!this.state)throw new M("`state` not initialized");Object.assign(this.state,t),p(_e(this,Se,"f"))},fe.set(this,(t=>{null==t||t.forEach((t=>{const{callback:e,getDep:n,values:s,preCallback:i}=t,o=null==n?void 0:n();n&&s&&!R(s,o)||(Te(i),t.preCallback=e(o,s),t.values=o)}))})),ge.set(this,(()=>{_e(this,fe,"f").call(this,_e(this,ue,"f"))})),me.set(this,(()=>{_e(this,fe,"f").call(this,_e(this,de,"f"))})),this.effect=(t,e)=>{_e(this,ue,"f")||Pe(this,ue,[],"f");const n={callback:t,getDep:e,values:void 0,initialized:!!this.isConnected};this.isConnected&&(n.values=null==e?void 0:e(),n.preCallback=t(n.values)),_e(this,ue,"f").push(n)},this.memo=(t,e)=>{_e(this,de,"f")||Pe(this,de,[],"f"),_e(this,de,"f").push({callback:t,getDep:e,values:[Symbol()],initialized:this.isConnected})},ve.set(this,(()=>{var t;null===(t=_e(this,ue,"f"))||void 0===t||t.forEach((t=>{const{callback:e,getDep:n,initialized:s}=t;s||(t.values=null==n?void 0:n(),t.preCallback=e(t.values),t.initialized=!0)}))})),ye.set(this,(()=>{var t,e;_e(this,me,"f").call(this);const n=_?"":zt`${null===(e=null===(t=this.shadowRoot)||void 0===t?void 0:t.adoptedStyleSheets)||void 0===e?void 0:e.map((t=>zt`
3
3
  <style media=${t.media.mediaText}>
4
4
  ${t.style}
5
5
  </style>
6
- `))}`;return this.render?zt`${this.render()}${n}`:_e(this,ae,"f")===this?void 0:zt`<slot></slot>${n}`})),we.set(this,(()=>!this.shouldUpdate||this.shouldUpdate())),be.set(this,(()=>{if(this.isConnected&&_e(this,we,"f").call(this)){const t=_e(this,ye,"f").call(this);void 0!==t&&Ft(t,_e(this,ae,"f")),p(_e(this,Ee,"f")),p(_e(this,me,"f"))}})),Se.set(this,(()=>{_e(this,he,"f")?Ce.add(_e(this,be,"f")):_e(this,be,"f").call(this)})),this.update=()=>{p(_e(this,Se,"f"))},Ee.set(this,(()=>{var t;null===(t=this.updated)||void 0===t||t.call(this)})),xe.set(this,(()=>{var t,e,n;if(_e(this,ce,"f"))return void Pe(this,ce,!1,"f");null===(t=this.willMount)||void 0===t||t.call(this);const{observedStores:s,rootElement:i}=this.constructor;null==s||s.forEach((t=>{G(t,_e(this,Se,"f"))}));const o=_e(this,ye,"f").call(this);if(void 0!==o&&Ft(o,_e(this,ae,"f")),Pe(this,pe,null===(e=this.mounted)||void 0===e?void 0:e.call(this),"f"),_e(this,ve,"f").call(this),i&&(null===(n=this.getRootNode().host)||void 0===n?void 0:n.tagName)!==i.toUpperCase())throw new M("not allow current root type")})),p((()=>this[$e]=!1)),this[$e]=!0,this[Ne]=()=>{this.isConnected&&p(_e(this,Se,"f"))},Pe(this,he,t,"f"),Pe(this,ae,e?this:this.attachShadow({mode:"open",delegatesFocus:n}),"f");const{adoptedStyleSheets:s}=new.target;if(s){const t=s.map((t=>t[x]||t));this.shadowRoot?this.shadowRoot.adoptedStyleSheets=t:this.effect((()=>{const e=this.getRootNode();if(_)return e.adoptedStyleSheets=[...e.adoptedStyleSheets,...t],()=>{e.adoptedStyleSheets=A(e.adoptedStyleSheets,t)};{const n=e===document?document.body:e;return n._sheets=n._sheets||{},t.forEach((({style:t,media:e})=>{if(n._sheets[t])n._sheets[t].count++;else{const s=document.createElement("style");s.innerHTML=t,s.media=e.mediaText,n.append(s),n._sheets[t]={ele:s,count:1}}})),()=>{t.forEach((({style:t})=>{n._sheets[t].count--,n._sheets[t].count||n._sheets[t].ele.remove()}))}}}),(()=>[]))}}get internals(){if(!_e(this,le,"f")){const t=()=>{const t=t=>t.replace(/-/g,"");return{has:e=>t(e)in this.dataset,add:e=>{this.dataset[t(e)]=""},delete:e=>delete this.dataset[t(e)]}};this.attachInternals||(this.attachInternals=()=>({states:t()})),Pe(this,le,this.attachInternals(),"f"),_e(this,le,"f").states||(_e(this,le,"f").states=t())}return _e(this,le,"f")}attributeChangedCallback(){this.isConnected&&p(_e(this,Se,"f"))}closestElement(t){const e="function"==typeof t,n="string"==typeof t&&t.toUpperCase(),s=i=>{const o=i.parentElement||i.getRootNode().host;if(!o)return null;if(e){if(o.constructor===t)return o}else if(o.tagName===n)return o;return s(o)};return s(this)}connectedCallback(){_e(this,he,"f")?Ce.add(_e(this,xe,"f")):_e(this,xe,"f").call(this)}disconnectedCallback(){var t,e,n;if(this.isConnected)return void Pe(this,ce,!0,"f");const{observedStores:s}=this.constructor;null==s||s.forEach((t=>{B(t,_e(this,Se,"f"))})),Te(_e(this,pe,"f")),null===(t=this.unmounted)||void 0===t||t.call(this),null===(e=_e(this,ue,"f"))||void 0===e||e.forEach((t=>{Te(t.preCallback)})),Pe(this,de,null===(n=_e(this,de,"f"))||void 0===n?void 0:n.filter((({initialized:t})=>!t)),"f")}}ae=new WeakMap,le=new WeakMap,ce=new WeakMap,he=new WeakMap,ue=new WeakMap,de=new WeakMap,pe=new WeakMap,fe=new WeakMap,me=new WeakMap,ge=new WeakMap,ve=new WeakMap,ye=new WeakMap,we=new WeakMap,be=new WeakMap,Se=new WeakMap,Ee=new WeakMap,xe=new WeakMap;const je=new w;function Me(t,e,n){const{booleanAttributes:s,numberAttributes:i}=t.constructor;Object.defineProperty(t,e,{configurable:!0,get(){if(!($e in this))return;const t=this.getAttribute(n);return(null==s?void 0:s.has(n))?null!==t:(null==i?void 0:i.has(n))?Number(t):t||""},set(t){const i=this,o=je.get(this),r=o[e],a=i.getAttribute(n);if(this[$e]&&null!==a&&!r)return;o[e]=!0;const l=null==s?void 0:s.has(n);null==t?i.removeAttribute(n):l?i.toggleAttribute(n,!!t):a!==String(t)&&i.setAttribute(n,String(t))}})}const Re=Symbol("event handle");function Ae(t,e,n,s){Object.defineProperty(t,e,{configurable:!0,get(){const t=je.get(this)[e];return t||!n?t:(this[e]=ke,this[e])},set(t){const i=this,o=je.get(i);t!==o[e]&&(n?(o[e]=(null==t?void 0:t[Re])?t:(e,o)=>{const r=new CustomEvent(n,Object.assign(Object.assign(Object.assign({},o),s),{detail:e}));i.dispatchEvent(r),t(e,o)},o[e][Re]=!0):(o[e]=t,this[Ne]()))}})}function He(t,e,n){Object.defineProperty(t,e,{configurable:!0,get(){const t=je.get(this);let s=t[e];if(!s){const i=this,o=i.shadowRoot||i;s={get ref(){return n},get element(){const t=[...o.querySelectorAll("gem-reflect")].map((t=>t.target));for(const e of[o,...t]){const t=e.querySelector(`[ref=${n}]`);if(t)return t}}},t[e]=s}return s}})}function We(t,e,n){Object.defineProperty(t,e,{configurable:!0,get(){var t;const{states:e}=this.internals;return null===(t=e.has)||void 0===t?void 0:t.call(e,n)},set(t){const{states:e}=this.internals;t?e.add(n):e.delete(n)}})}const Ve=customElements.define.bind(customElements);function De(t,e,n,s=!1){const i=t.constructor,o=i[e];i.hasOwnProperty(e)||Object.defineProperty(i,e,{value:s?new Set(o):o?Array.from(o):[]}),i[e][s?"add":"push"](n)}function Ie(t,e){const n=`${N(e)}-${T()}`;De(t,"defineRefs",n),He(t,e,n)}function qe(t,e,n){De(t,"observedAttributes",n),Me(t,e,n)}function Ue(t,e){qe(t,e,N(e))}function Ge(t,e){const n=N(e);De(t,"booleanAttributes",n,!0),qe(t,e,n)}function Be(t,e){const n=N(e);De(t,"numberAttributes",n,!0),qe(t,e,n)}function Fe(t,e){De(t,"observedPropertys",e),Ae(t,e)}function ze(t,e){const n=N(e);De(t,"defineCSSStates",n),We(t,e,`--${n}`)}function Je(t,e){const n=N(t[e]||e);t[e]=n,De(t instanceof Le?t:t.prototype,"defineSlots",n)}function Ke(t,e){const n=N(t[e]||e);t[e]=n,De(t instanceof Le?t:t.prototype,"defineParts",n)}function Qe(t,e){Xe(t,e)}function Ze(t,e){Xe(t,e,{bubbles:!0,composed:!0})}function Xe(t,e,n){const s=N(e);De(t,"defineEvents",s),Ae(t,e,s,n)}function Ye(t){return function(e){De(e.prototype,"adoptedStyleSheets",t)}}function tn(t){return function(e){De(e.prototype,"observedStores",t)}}function en(t){return function(e){e.rootElement=t}}function nn(t){return function(e){Ve(t,e)}}customElements.define=(t,e,n)=>{if(e.prototype instanceof Le){const{observedAttributes:t,observedPropertys:n,defineEvents:s,defineCSSStates:i,defineRefs:o}=e;null==t||t.forEach((t=>Me(e.prototype,L(t),t))),null==n||n.forEach((t=>Ae(e.prototype,t))),null==s||s.forEach((t=>Ae(e.prototype,L(t),t))),null==i||i.forEach((t=>We(e.prototype,L(t),`--${t}`))),null==o||o.forEach((t=>He(e.prototype,L(t),t)))}Ve(t,e,n)};const sn="1.6.2";window.__GEM_DEVTOOLS__HOOK__&&Object.assign(window.__GEM_DEVTOOLS__HOOK__,Object.assign({},n));var on,rn,an,ln,cn=function(t,e,n,s){var i,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(r=(o<3?i(r):o>3?i(e,n,r):i(e,n))||r);return o>3&&r&&Object.defineProperty(e,n,r),r},hn=function(t,e,n,s,i){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?i.call(t,n):i?i.value=n:e.set(t,n),n},un=function(t,e,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(t):s?s.value:e.get(t)};class dn extends RegExp{constructor(t){const e={};let n=0;super(`^${t.replace(/:([^/$]+)/g,((t,s)=>(e[s]=n++,"([^/]+)"))).replace("*",".*")}$`,"i"),this.namePosition=e}}function pn(t,e){const n=new dn(t),s=e.match(n)||`${e}/`.match(n);if(!s)return null;const i={};return s&&Object.keys(n.namePosition).forEach((t=>{i[t]=s[n.namePosition[t]+1]})),i}function fn(t,e){let n=t.pattern;const s=null==e?void 0:e.params;return s&&Object.keys(s).forEach((t=>{n=n.replace(new RegExp(`:${t}`,"g"),s[t])})),n}function mn(t,e){const n=fn(t,e);return Object.assign({path:n},e)}let gn=ln=class extends Le{constructor({isLight:t,routes:e}={}){super({isLight:t}),this.currentParams={},on.set(this,void 0),this.state={content:void 0},rn.set(this,(()=>{if(this.locationStore){const{path:t,query:e,data:n}=F.getParams();U(this.locationStore,{path:t,params:this.currentParams,query:e,data:n})}})),an.set(this,((t,e,n)=>{hn(this,on,void 0,"f"),this.currentRoute=t,this.currentParams=e,this.setState({content:n}),this.routeChange(this.currentRoute);const s=null==t?void 0:t.title;s&&U(at,{title:s}),un(this,rn,"f").call(this)})),this.routes=e}mounted(){this.effect((([t,e],n)=>{if(n&&t===n[0]&&e===n[1])return void un(this,rn,"f").call(this);const{route:s,params:i={}}=ln.findRoute(this.routes,e),{redirect:o,content:r,getContent:a}=s||{};if(o)return void F.replace({path:o});const l=r||(null==a?void 0:a(i));if(l instanceof Promise){this.loading(s),hn(this,on,l,"f");const t=()=>un(this,on,"f")===l;l.then((e=>{t()&&un(this,an,"f").call(this,s,i,e)})).catch((e=>{t()&&this.error(e)}))}else un(this,an,"f").call(this,s,i,l)}),(()=>{const{path:t}=F.getParams();return[this.key,t,location.search]}))}shouldUpdate(){return!this.inert}render(){const{content:t}=this.state;return this.shadowRoot?zt`
6
+ `))}`;return this.render?zt`${this.render()}${n}`:_e(this,ae,"f")===this?void 0:zt`<slot></slot>${n}`})),we.set(this,(()=>!this.shouldUpdate||this.shouldUpdate())),be.set(this,(()=>{if(this.isConnected&&_e(this,we,"f").call(this)){const t=_e(this,ye,"f").call(this);void 0!==t&&Ft(t,_e(this,ae,"f")),p(_e(this,Ee,"f")),p(_e(this,ge,"f"))}})),Se.set(this,(()=>{_e(this,he,"f")?Ce.add(_e(this,be,"f")):_e(this,be,"f").call(this)})),this.update=()=>{p(_e(this,Se,"f"))},Ee.set(this,(()=>{var t;null===(t=this.updated)||void 0===t||t.call(this)})),xe.set(this,(()=>{var t,e,n;if(_e(this,ce,"f"))return void Pe(this,ce,!1,"f");null===(t=this.willMount)||void 0===t||t.call(this);const{observedStores:s,rootElement:i}=this.constructor;null==s||s.forEach((t=>{G(t,_e(this,Se,"f"))}));const o=_e(this,ye,"f").call(this);if(void 0!==o&&Ft(o,_e(this,ae,"f")),Pe(this,pe,null===(e=this.mounted)||void 0===e?void 0:e.call(this),"f"),_e(this,ve,"f").call(this),i&&(null===(n=this.getRootNode().host)||void 0===n?void 0:n.tagName)!==i.toUpperCase())throw new M("not allow current root type")})),p((()=>this[$e]=!1)),this[$e]=!0,this[Ne]=()=>{this.isConnected&&p(_e(this,Se,"f"))},Pe(this,he,t,"f"),Pe(this,ae,e?this:this.attachShadow({mode:"open",delegatesFocus:n}),"f");const{adoptedStyleSheets:s}=new.target;if(s){const t=s.map((t=>t[x]||t));this.shadowRoot?this.shadowRoot.adoptedStyleSheets=t:this.effect((()=>{const e=this.getRootNode();if(_)return e.adoptedStyleSheets=[...e.adoptedStyleSheets,...t],()=>{e.adoptedStyleSheets=A(e.adoptedStyleSheets,t)};{const n=e===document?document.body:e;return n._sheets=n._sheets||{},t.forEach((({style:t,media:e})=>{if(n._sheets[t])n._sheets[t].count++;else{const s=document.createElement("style");s.innerHTML=t,s.media=e.mediaText,n.append(s),n._sheets[t]={ele:s,count:1}}})),()=>{t.forEach((({style:t})=>{n._sheets[t].count--,n._sheets[t].count||delete n._sheets[t]}))}}}),(()=>[]))}}get internals(){if(!_e(this,le,"f")){const t=()=>{const t=t=>t.replace(/-/g,"");return{has:e=>t(e)in this.dataset,add:e=>{this.dataset[t(e)]=""},delete:e=>delete this.dataset[t(e)]}};this.attachInternals||(this.attachInternals=()=>({states:t()})),Pe(this,le,this.attachInternals(),"f"),_e(this,le,"f").states||(_e(this,le,"f").states=t())}return _e(this,le,"f")}attributeChangedCallback(){this.isConnected&&p(_e(this,Se,"f"))}closestElement(t){const e="function"==typeof t,n="string"==typeof t&&t.toUpperCase(),s=i=>{const o=i.parentElement||i.getRootNode().host;if(!o)return null;if(e){if(o.constructor===t)return o}else if(o.tagName===n)return o;return s(o)};return s(this)}connectedCallback(){_e(this,he,"f")?Ce.add(_e(this,xe,"f")):_e(this,xe,"f").call(this)}disconnectedCallback(){var t,e,n;if(this.isConnected)return void Pe(this,ce,!0,"f");const{observedStores:s}=this.constructor;null==s||s.forEach((t=>{B(t,_e(this,Se,"f"))})),Te(_e(this,pe,"f")),null===(t=this.unmounted)||void 0===t||t.call(this),null===(e=_e(this,ue,"f"))||void 0===e||e.forEach((t=>{Te(t.preCallback)})),Pe(this,de,null===(n=_e(this,de,"f"))||void 0===n?void 0:n.filter((({initialized:t})=>!t)),"f")}}ae=new WeakMap,le=new WeakMap,ce=new WeakMap,he=new WeakMap,ue=new WeakMap,de=new WeakMap,pe=new WeakMap,fe=new WeakMap,ge=new WeakMap,me=new WeakMap,ve=new WeakMap,ye=new WeakMap,we=new WeakMap,be=new WeakMap,Se=new WeakMap,Ee=new WeakMap,xe=new WeakMap;const je=new w;function Me(t,e,n){const{booleanAttributes:s,numberAttributes:i}=t.constructor;Object.defineProperty(t,e,{configurable:!0,get(){if(!($e in this))return;const t=this.getAttribute(n);return(null==s?void 0:s.has(n))?null!==t:(null==i?void 0:i.has(n))?Number(t):t||""},set(t){const i=this,o=je.get(this),r=o[e],a=i.getAttribute(n);if(this[$e]&&null!==a&&!r)return;o[e]=!0;const l=null==s?void 0:s.has(n);null==t?i.removeAttribute(n):l?i.toggleAttribute(n,!!t):a!==String(t)&&i.setAttribute(n,String(t))}})}const Re=Symbol("event handle");function Ae(t,e,n,s){Object.defineProperty(t,e,{configurable:!0,get(){const t=je.get(this)[e];return t||!n?t:(this[e]=ke,this[e])},set(t){const i=this,o=je.get(i);t!==o[e]&&(n?(o[e]=(null==t?void 0:t[Re])?t:(e,o)=>{const r=new CustomEvent(n,Object.assign(Object.assign(Object.assign({},o),s),{detail:e}));i.dispatchEvent(r),t(e,o)},o[e][Re]=!0):(o[e]=t,this[Ne]()))}})}function He(t,e,n){Object.defineProperty(t,e,{configurable:!0,get(){const t=je.get(this);let s=t[e];if(!s){const i=this,o=i.shadowRoot||i;s={get ref(){return n},get element(){const t=[...o.querySelectorAll("gem-reflect")].map((t=>t.target));for(const e of[o,...t]){const t=e.querySelector(`[ref=${n}]`);if(t)return t}}},t[e]=s}return s}})}function We(t,e,n){Object.defineProperty(t,e,{configurable:!0,get(){var t;const{states:e}=this.internals;return null===(t=e.has)||void 0===t?void 0:t.call(e,n)},set(t){const{states:e}=this.internals;t?e.add(n):e.delete(n)}})}const Ve=customElements.define.bind(customElements);function De(t,e,n,s=!1){const i=t.constructor,o=i[e];i.hasOwnProperty(e)||Object.defineProperty(i,e,{value:s?new Set(o):o?Array.from(o):[]}),i[e][s?"add":"push"](n)}function Ie(t,e){const n=`${N(e)}-${T()}`;De(t,"defineRefs",n),He(t,e,n)}function qe(t,e,n){De(t,"observedAttributes",n),Me(t,e,n)}function Ue(t,e){qe(t,e,N(e))}function Ge(t,e){const n=N(e);De(t,"booleanAttributes",n,!0),qe(t,e,n)}function Be(t,e){const n=N(e);De(t,"numberAttributes",n,!0),qe(t,e,n)}function Fe(t,e){De(t,"observedPropertys",e),Ae(t,e)}function ze(t,e){const n=N(e);De(t,"defineCSSStates",n),We(t,e,`--${n}`)}function Je(t,e){const n=N(t[e]||e);t[e]=n,De(t instanceof Le?t:t.prototype,"defineSlots",n)}function Ke(t,e){const n=N(t[e]||e);t[e]=n,De(t instanceof Le?t:t.prototype,"defineParts",n)}function Qe(t,e){Xe(t,e)}function Ze(t,e){Xe(t,e,{bubbles:!0,composed:!0})}function Xe(t,e,n){const s=N(e);De(t,"defineEvents",s),Ae(t,e,s,n)}function Ye(t){return function(e){De(e.prototype,"adoptedStyleSheets",t)}}function tn(t){return function(e){De(e.prototype,"observedStores",t)}}function en(t){return function(e){e.rootElement=t}}function nn(t){return function(e){Ve(t,e)}}customElements.define=(t,e,n)=>{if(e.prototype instanceof Le){const{observedAttributes:t,observedPropertys:n,defineEvents:s,defineCSSStates:i,defineRefs:o}=e;null==t||t.forEach((t=>Me(e.prototype,L(t),t))),null==n||n.forEach((t=>Ae(e.prototype,t))),null==s||s.forEach((t=>Ae(e.prototype,L(t),t))),null==i||i.forEach((t=>We(e.prototype,L(t),`--${t}`))),null==o||o.forEach((t=>He(e.prototype,L(t),t)))}Ve(t,e,n)};const sn="1.6.3";window.__GEM_DEVTOOLS__HOOK__&&Object.assign(window.__GEM_DEVTOOLS__HOOK__,Object.assign({},n));var on,rn,an,ln,cn=function(t,e,n,s){var i,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(r=(o<3?i(r):o>3?i(e,n,r):i(e,n))||r);return o>3&&r&&Object.defineProperty(e,n,r),r},hn=function(t,e,n,s,i){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?i.call(t,n):i?i.value=n:e.set(t,n),n},un=function(t,e,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(t):s?s.value:e.get(t)};class dn extends RegExp{constructor(t){const e={};let n=0;super(`^${t.replace(/:([^/$]+)/g,((t,s)=>(e[s]=n++,"([^/]+)"))).replace("*",".*")}$`,"i"),this.namePosition=e}}function pn(t,e){const n=new dn(t),s=e.match(n)||`${e}/`.match(n);if(!s)return null;const i={};return s&&Object.keys(n.namePosition).forEach((t=>{i[t]=s[n.namePosition[t]+1]})),i}function fn(t,e){let n=t.pattern;const s=null==e?void 0:e.params;return s&&Object.keys(s).forEach((t=>{n=n.replace(new RegExp(`:${t}`,"g"),s[t])})),n}function gn(t,e){const n=fn(t,e);return Object.assign({path:n},e)}let mn=ln=class extends Le{constructor({isLight:t,routes:e}={}){super({isLight:t}),this.currentParams={},on.set(this,void 0),this.state={content:void 0},rn.set(this,(()=>{if(this.locationStore){const{path:t,query:e,data:n}=F.getParams();U(this.locationStore,{path:t,params:this.currentParams,query:e,data:n})}})),an.set(this,((t,e,n)=>{hn(this,on,void 0,"f"),this.currentRoute=t,this.currentParams=e,this.setState({content:n}),this.routeChange(this.currentRoute);const s=null==t?void 0:t.title;s&&U(at,{title:s}),un(this,rn,"f").call(this)})),this.routes=e}mounted(){this.effect((([t,e],n)=>{if(n&&t===n[0]&&e===n[1])return void un(this,rn,"f").call(this);const{route:s,params:i={}}=ln.findRoute(this.routes,e),{redirect:o,content:r,getContent:a}=s||{};if(o)return void F.replace({path:o});const l=r||(null==a?void 0:a(i));if(l instanceof Promise){this.loading(s),hn(this,on,l,"f");const t=()=>un(this,on,"f")===l;l.then((e=>{t()&&un(this,an,"f").call(this,s,i,e)})).catch((e=>{t()&&this.error(e)}))}else un(this,an,"f").call(this,s,i,l)}),(()=>{const{path:t}=F.getParams();return[this.key,t,location.search]}))}shouldUpdate(){return!this.inert}render(){const{content:t}=this.state;return this.shadowRoot?zt`
7
7
  <style>
8
8
  :host,
9
9
  :not(:defined) {
@@ -11,7 +11,7 @@
11
11
  }
12
12
  </style>
13
13
  ${null!=t?t:zt`<slot></slot>`}
14
- `:zt`${t}`}};on=new WeakMap,rn=new WeakMap,an=new WeakMap,gn.createLocationStore=()=>{const{path:t,query:e,data:n}=F.getParams();return I({path:t,query:e,data:n,params:{}})},gn.findRoute=(t=[],e)=>{let n,s=null;n=t instanceof Array?t:Object.values(t);for(const t of n)if("*"===t.pattern)s=t;else{const n=pn(t.pattern,e);if(n)return{route:t,params:n}}return{route:s}},cn([Fe],gn.prototype,"routes",void 0),cn([Fe],gn.prototype,"locationStore",void 0),cn([Fe],gn.prototype,"key",void 0),cn([Qe],gn.prototype,"routeChange",void 0),cn([Qe],gn.prototype,"loading",void 0),cn([Qe],gn.prototype,"error",void 0),gn=ln=cn([tn(F.store),nn("gem-route")],gn);let vn=class extends gn{constructor(t={}){super(Object.assign(Object.assign({},t),{isLight:!0}))}};vn=cn([nn("gem-light-route")],vn);var yn=function(t,e,n,s){var i,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(r=(o<3?i(r):o>3?i(e,n,r):i(e,n))||r);return o>3&&r&&Object.defineProperty(e,n,r),r};let wn=class extends Le{constructor(){super(),this.clickHandle=t=>{return e=this,n=void 0,i=function*(){var e;const n=this.getPathInfo();if(!n)return;if(this.isExternal(n))switch(this.target){case"_self":return void(window.location.href=n);case"_parent":return void(window.parent.location.href=n);case"_top":return void(window.top.location.href=n);default:return void window.open(n)}const{path:s,query:i,hash:o}=F.getParams();if(s+i+o!==n)if(t.stopPropagation(),yield null===(e=this.prepare)||void 0===e?void 0:e.call(this),this.route)F.pushIgnoreCloseHandle(Object.assign(Object.assign({},mn(this.route,this.options)),{title:this.route.title||this.docTitle}));else if(this.href){const{pathname:t,search:e,hash:s}=new URL(n,location.origin);F.pushIgnoreCloseHandle({path:t,query:e,hash:decodeURIComponent(s),title:this.docTitle})}else F.pushIgnoreCloseHandle({path:this.path,query:this.query,hash:this.hash,title:this.docTitle})},new((s=void 0)||(s=Promise))((function(t,o){function r(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(e){var n;e.done?t(e.value):(n=e.value,n instanceof s?n:new s((function(t){t(n)}))).then(r,a)}l((i=i.apply(e,n||[])).next())}));var e,n,s,i},this.preventDefault=t=>{t.preventDefault()},this.addEventListener("click",this.clickHandle)}getPathInfo(){var t,e;if(this.route){const n=(null===(t=this.options)||void 0===t?void 0:t.query)||"",s=(null===(e=this.options)||void 0===e?void 0:e.hash)||"";return fn(this.route,this.options)+n+s}{const t=this.href||this.path+this.query+this.hash,{path:e,query:n}=F.getParams();return t.startsWith("#")?`${e}${n}${t}`:t.startsWith("?")?`${e}${t}`:t.startsWith(".")?v(e,t):t}}isExternal(t){return!t.startsWith("/")}render(t=this.getPathInfo()){return zt`
14
+ `:zt`${t}`}};on=new WeakMap,rn=new WeakMap,an=new WeakMap,mn.createLocationStore=()=>{const{path:t,query:e,data:n}=F.getParams();return I({path:t,query:e,data:n,params:{}})},mn.findRoute=(t=[],e)=>{let n,s=null;n=t instanceof Array?t:Object.values(t);for(const t of n)if("*"===t.pattern)s=t;else{const n=pn(t.pattern,e);if(n)return{route:t,params:n}}return{route:s}},cn([Fe],mn.prototype,"routes",void 0),cn([Fe],mn.prototype,"locationStore",void 0),cn([Fe],mn.prototype,"key",void 0),cn([Qe],mn.prototype,"routeChange",void 0),cn([Qe],mn.prototype,"loading",void 0),cn([Qe],mn.prototype,"error",void 0),mn=ln=cn([tn(F.store),nn("gem-route")],mn);let vn=class extends mn{constructor(t={}){super(Object.assign(Object.assign({},t),{isLight:!0}))}};vn=cn([nn("gem-light-route")],vn);var yn=function(t,e,n,s){var i,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(r=(o<3?i(r):o>3?i(e,n,r):i(e,n))||r);return o>3&&r&&Object.defineProperty(e,n,r),r};let wn=class extends Le{constructor(){super(),this.clickHandle=t=>{return e=this,n=void 0,i=function*(){var e;const n=this.getPathInfo();if(!n)return;if(this.isExternal(n))switch(this.target){case"_self":return void(window.location.href=n);case"_parent":return void(window.parent.location.href=n);case"_top":return void(window.top.location.href=n);default:return void window.open(n)}const{path:s,query:i,hash:o}=F.getParams();if(s+i+o!==n)if(t.stopPropagation(),yield null===(e=this.prepare)||void 0===e?void 0:e.call(this),this.route)F.pushIgnoreCloseHandle(Object.assign(Object.assign({},gn(this.route,this.options)),{title:this.route.title||this.docTitle}));else if(this.href){const{pathname:t,search:e,hash:s}=new URL(n,location.origin);F.pushIgnoreCloseHandle({path:t,query:e,hash:decodeURIComponent(s),title:this.docTitle})}else F.pushIgnoreCloseHandle({path:this.path,query:this.query,hash:this.hash,title:this.docTitle})},new((s=void 0)||(s=Promise))((function(t,o){function r(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(e){var n;e.done?t(e.value):(n=e.value,n instanceof s?n:new s((function(t){t(n)}))).then(r,a)}l((i=i.apply(e,n||[])).next())}));var e,n,s,i},this.preventDefault=t=>{t.preventDefault()},this.addEventListener("click",this.clickHandle)}getPathInfo(){var t,e;if(this.route){const n=(null===(t=this.options)||void 0===t?void 0:t.query)||"",s=(null===(e=this.options)||void 0===e?void 0:e.hash)||"";return fn(this.route,this.options)+n+s}{const t=this.href||this.path+this.query+this.hash,{path:e,query:n}=F.getParams();return t.startsWith("#")?`${e}${n}${t}`:t.startsWith("?")?`${e}${t}`:t.startsWith(".")?v(e,t):t}}isExternal(t){return!t.startsWith("/")}render(t=this.getPathInfo()){return zt`
15
15
  <style>
16
16
  :host {
17
17
  /* link default style */
@@ -50,5 +50,5 @@
50
50
  </style>
51
51
  ${this.getContent()}
52
52
  <slot></slot>
53
- `}};_n([Ue],kn.prototype,"selector",void 0),_n([Fe],kn.prototype,"root",void 0),_n([Fe],kn.prototype,"element",void 0),_n([ze],kn.prototype,"active",void 0),kn=_n([nn("gem-use")],kn);var Tn=function(t,e,n,s){var i,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(r=(o<3?i(r):o>3?i(e,n,r):i(e,n))||r);return o>3&&r&&Object.defineProperty(e,n,r),r};let Cn=class extends Le{constructor(){super(),this.effect((()=>{this.shadowRoot&&(this.shadowRoot.innerHTML=`\n <style>\n :host {\n display: contents;\n }\n ${this.contentcss}\n </style>\n ${this.content}\n `)}),(()=>[this.content,this.contentcss]))}render(){}};Tn([Ue],Cn.prototype,"content",void 0),Tn([Ue],Cn.prototype,"contentcss",void 0),Cn=Tn([nn("gem-unsafe")],Cn);var On=function(t,e,n,s){var i,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(r=(o<3?i(r):o>3?i(e,n,r):i(e,n))||r);return o>3&&r&&Object.defineProperty(e,n,r),r};document.querySelectorAll("[data-reflect]").forEach((t=>t.remove()));let $n=class extends Le{constructor(){super({isLight:!0}),this.target=document.head,this.hidden=!0,this.effect((()=>{const t=[...this.childNodes];return t.forEach((t=>{t instanceof HTMLElement&&(t.dataset.reflect=""),this.target.append(t)})),()=>{t.forEach((t=>t.remove()))}}),(()=>[this.target]))}};On([Fe],$n.prototype,"target",void 0),$n=On([nn("gem-reflect")],$n);const Nn=Symbol("open mark");function Ln(t){var e;return(e=class extends Le{constructor(){super(),this.label="",this.internals.role="alertdialog",this.internals.ariaModal="true"}static get isOpen(){return this.store[Nn]}static get observedStores(){return[F.store,this.store]}static open(t){const 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);const n=()=>U(this.store,Object.assign({[Nn]:!0},t));setTimeout((()=>{n(),F.push({title:e.label,open:n,close:this.closeHandle.bind(this),shouldClose:this.shouldClose.bind(this)})}),100)}static close(){F.back()}static closeHandle(){var e;this.inertStore.forEach((t=>t.inert=!1)),null===(e=this.instance)||void 0===e||e.remove(),U(this.store,Object.assign({[Nn]:!1},t))}static shouldClose(){return!0}}).inertStore=[],e.instance=null,e.store=I(Object.assign({[Nn]:!1},t)),e}var jn,Mn,Rn,An=function(t,e,n,s){var i,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(r=(o<3?i(r):o>3?i(e,n,r):i(e,n))||r);return o>3&&r&&Object.defineProperty(e,n,r),r},Hn=function(t,e,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(t):s?s.value:e.get(t)},Wn=function(t,e,n,s,i){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?i.call(t,n):i?i.value=n:e.set(t,n),n};let Vn=class extends Le{constructor(){super(),this.opened=!1,this.inert=!0,jn.set(this,void 0),Mn.set(this,void 0),Rn.set(this,[]),this.label="",this.closeHandle=()=>{var t;this.inert=!0,Hn(this,Rn,"f").forEach((t=>t.inert=!1)),Hn(this,jn,"f")?Hn(this,jn,"f").before(this):Hn(this,Mn,"f")&&(null===(t=Hn(this,Mn,"f"))||void 0===t||t.appendChild(this)),this.dispatchEvent(new CustomEvent("close")),this.opened=!1},this.openHandle=()=>{this.hidden=!1,this.inert=!1,Wn(this,jn,this.nextSibling,"f"),Wn(this,Mn,this.parentElement||this.getRootNode(),"f"),Wn(this,Rn,[...document.body.children].filter((t=>!t.inert)),"f"),Hn(this,Rn,"f").forEach((t=>t.inert=!0)),document.body.append(this),this.dispatchEvent(new CustomEvent("open")),this.opened=!0},this.open=()=>{this.opened||(this.openHandle(),F.push({title:this.label,open:this.openHandle,close:this.closeHandle,shouldClose:this.shouldClose}))},this.close=()=>{F.back()},this.forceClose=()=>{this.opened=!1,setTimeout(this.close,100)},this.internals.role="dialog",this.internals.ariaModal="true"}shouldClose(){return!0}};jn=new WeakMap,Mn=new WeakMap,Rn=new WeakMap,An([ze],Vn.prototype,"opened",void 0),An([Ue],Vn.prototype,"label",void 0),Vn=An([tn(F.store)],Vn);const Dn=new WeakMap;function In(t){return Dn.get(t)}const qn=new WeakMap;function Un(t){return qn.get(t)}function Gn(t){const e=T(),n=document.createElement("style"),s=I(t),i={},o={};qn.set(i,o),Dn.set(i,s),Object.keys(s).forEach((t=>{o[t]=`--${N(t)}-${e}`,i[t]=`var(${o[t]})`}));const r=()=>function(t,e){const n=Dn.get(e),s=qn.get(e),i=Object.keys(n).reduce(((t,e)=>n[e]?t+`${s[e]}:${n[e]};`:t),"");t.textContent=`:root, :host {${i}}`}(n,i);return G(s,r),r(),(document.head||document.documentElement).append(n),i}function Bn(t,e){U(In(t),e)}var Fn,zn,Jn,Kn,Qn,Zn,Xn=function(t,e,n,s){return new(n||(n=Promise))((function(i,o){function r(t){try{l(s.next(t))}catch(t){o(t)}}function a(t){try{l(s.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(r,a)}l((s=s.apply(t,e||[])).next())}))},Yn=function(t,e,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(t):s?s.value:e.get(t)},ts=function(t,e,n,s,i){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?i.call(t,n):i?i.value=n:e.set(t,n),n};const es=/\$\d(?:<[^>]*>)?/,ns=/\$(\d)(<([^>]*)>)?/g;function ss(t,...e){const n=t.split(es),s=[];let i;for(;i=ns.exec(t);){const t=i[3],n=e[Number(i[1])-1];s.push("string"==typeof n?n:n(t))}return zt(n,...s)}const is=new Set;class os{constructor(t){if(Fn.add(this),this.cachePrefix="gem-i18n",!t.resources[t.fallbackLanguage])throw new M("i18n: fallbackLanguage invalid");this.store=I(this),Object.assign(this,t);let e=Yn(this,Fn,"a",Jn)||this.currentLanguage||Yn(this,Fn,"a",Kn);const n=document.querySelector(`[type*=${this.cachePrefix}]`);if(n)try{const t=JSON.parse(n.textContent||"");e=t.currentLanguage,this.resources[t.currentLanguage]=t.currentLanguagePack}catch(t){}e?(ts(this,Fn,e,"a",Zn),this.setLanguage(e)):this.resetLanguage()}get(t,...e){const n=this.resources[this.currentLanguage],s=this.resources[this.fallbackLanguage],i=n[t]||s[t],o=(null==i?void 0:i.message)||i||`[${t}]`;return e.length?ss(o,...e):o}detectLanguage(){const t=Object.keys(this.resources),e=navigator.languages.map((t=>t.replace(/-(.*)/,(t=>t.toUpperCase()))));for(const n of e){const e=t.find((t=>t===n||n.startsWith(`${t}-`)));if(e)return e}return this.fallbackLanguage}setLanguage(t){return Xn(this,void 0,void 0,(function*(){let e;Yn(this,Fn,"a",Qn)&&is.forEach((e=>Xn(this,void 0,void 0,(function*(){return yield e.setLanguage(t)}))));const n=this.resources[t];if(!n)return console.warn(`${this.cachePrefix}: not found \`${t}\``),this.resetLanguage();if("string"==typeof n){const t=`${this.cachePrefix}:`,s=`${t}${n}`,i=localStorage.getItem(s),o=()=>Xn(this,void 0,void 0,(function*(){const e=yield(yield fetch(n)).json();if(this.cache){for(let e=0;e<localStorage.length;e++){const n=localStorage.key(e);n.startsWith(t)&&localStorage.removeItem(n)}localStorage.setItem(s,JSON.stringify(e))}return e}));if(i)try{e=JSON.parse(i)}catch(t){e=yield o()}else e=yield o()}else e=n;return this.resources[t]=e,U(this.store,{}),t!==this.currentLanguage&&ts(this,Fn,t,"a",Zn),!0===this.cache&&this.setCache(),t}))}resetLanguage(){return Yn(this,Fn,"a",Qn)&&is.forEach((t=>t.resetLanguage())),ts(this,Fn,this.fallbackLanguage,"a",Zn),this.cache&&localStorage.removeItem(Yn(this,Fn,"a",zn)),this.setLanguage(this.detectLanguage())}setCache(){Yn(this,Fn,"a",Qn)&&is.forEach((t=>t.setCache())),localStorage.setItem(Yn(this,Fn,"a",zn),this.currentLanguage)}createSubModule(t,e){const n=new os({resources:e,cachePrefix:`${this.cachePrefix}-${t}`,currentLanguage:this.currentLanguage,fallbackLanguage:this.fallbackLanguage,cache:this.cache});return is.add(n),n}toJSON(){return{currentLanguage:this.currentLanguage,currentLanguagePack:this.resources[this.currentLanguage]}}}Fn=new WeakSet,zn=function(){return`${this.cachePrefix}:current`},Jn=function(){const{hostname:t,pathname:e,search:n}=location,s=t.split(".");switch(this.urlParamsType){case"ccTLD":return s.pop();case"gTLD":return s.shift();case"path":return e.split("/")[1];default:const t=this.urlParamsName&&new URLSearchParams(n).get(this.urlParamsName)||"";return t in this.resources?t:""}},Kn=function(){return this.cache&&localStorage.getItem(Yn(this,Fn,"a",zn))||""},Qn=function(){return!is.has(this)},Zn=function(t){var e;Yn(this,Fn,"a",Qn)&&(document.documentElement.lang=t),this.currentLanguage=t,null===(e=this.onChange)||void 0===e||e.call(this,t)};const rs={credentials:"include",mode:"cors"};function as(t,e={}){return n=this,s=void 0,o=function*(){const n=yield fetch(t,Object.assign(Object.assign({},rs),e));if(0===n.status)throw new Error("Request fail");if(n.status>=500)throw new Error(n.statusText);if(n.status>=400)throw new Error((yield n.text())||n.statusText);return yield n.json()},new((i=void 0)||(i=Promise))((function(t,e){function r(t){try{l(o.next(t))}catch(t){e(t)}}function a(t){try{l(o.throw(t))}catch(t){e(t)}}function l(e){var n;e.done?t(e.value):(n=e.value,n instanceof i?n:new i((function(t){t(n)}))).then(r,a)}l((o=o.apply(n,s||[])).next())}));var n,s,i,o}const ls=Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array));function cs(t){return t instanceof FormData||t instanceof Blob||t instanceof ls||t instanceof URLSearchParams||t instanceof ReadableStream||t instanceof ArrayBuffer?t:"object"==typeof t?JSON.stringify(t):t}function hs(t,e){const{origin:n,pathname:s,search:i}=new URL(t,location.origin),o=new URLSearchParams(e).toString();return as(`${n}${s}${i?`${i}&`:o?"?":""}${o}`,{method:"GET"})}function us(t){return as(t,{method:"DELETE"})}function ds(t,e){return as(t,{method:"PUT",body:cs(e)})}function ps(t,e){return as(t,{method:"POST",body:cs(e)})}const fs=t=>window.matchMedia(t).matches,ms={PRINT:"print",get isPrint(){return fs(this.PRINT)},HOVER:"(hover: hover)",get isHover(){return fs(this.HOVER)},PHONE:"(min-width: 319px) and (max-width: 480px)",get isPhone(){return fs(this.PHONE)},LAPTOP:"(min-width: 1023px) and (max-width: 1280px) and (orientation: landscape)",get isLaptop(){return fs(this.LAPTOP)},DESKTOP:"(min-width: 1279px) and (orientation: landscape)",get isDesktop(){return fs(this.DESKTOP)},WIDTHSCREEN:"(min-width: 1919px) and (orientation: landscape)",get isWidthScreen(){return fs(this.WIDTHSCREEN)},PHONE_LANDSCAPE:"(min-width: 479px) and (max-width: 767px) and (orientation: landscape)",get isPhoneLandscape(){return fs(this.PHONE_LANDSCAPE)},TABLET:"(min-width: 768px) and (max-width: 1024px)",get isTablet(){return fs(this.TABLET)},SMALL_PHONE:"(min-width: 319px) and (max-width: 480px) and (max-height: 640px)",get isSmallPhone(){return fs(this.SMALL_PHONE)},WATCH:"(max-width: 319px)",get isWatch(){return fs(this.WATCH)},SHORT:"(min-width: 479px) and (max-height: 320px)",get isShort(){return fs(this.SHORT)},PWA:"(display-mode: standalone)",get isPWA(){return fs(this.PWA)},MOTION_REDUCE:"(prefers-reduced-motion: reduce)",get isMotionReduce(){return fs(this.MOTION_REDUCE)},DATA_REDUCE:"(prefers-reduced-data: reduce)",get isDataReduce(){return fs(this.DATA_REDUCE)}};return e})()}));
53
+ `}};_n([Ue],kn.prototype,"selector",void 0),_n([Fe],kn.prototype,"root",void 0),_n([Fe],kn.prototype,"element",void 0),_n([ze],kn.prototype,"active",void 0),kn=_n([nn("gem-use")],kn);var Tn=function(t,e,n,s){var i,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(r=(o<3?i(r):o>3?i(e,n,r):i(e,n))||r);return o>3&&r&&Object.defineProperty(e,n,r),r};let Cn=class extends Le{constructor(){super(),this.effect((()=>{this.shadowRoot&&(this.shadowRoot.innerHTML=`\n <style>\n :host {\n display: contents;\n }\n ${this.contentcss}\n </style>\n ${this.content}\n `)}),(()=>[this.content,this.contentcss]))}render(){}};Tn([Ue],Cn.prototype,"content",void 0),Tn([Ue],Cn.prototype,"contentcss",void 0),Cn=Tn([nn("gem-unsafe")],Cn);var On=function(t,e,n,s){var i,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(r=(o<3?i(r):o>3?i(e,n,r):i(e,n))||r);return o>3&&r&&Object.defineProperty(e,n,r),r};document.querySelectorAll("[data-reflect]").forEach((t=>t.remove()));let $n=class extends Le{constructor(){super({isLight:!0}),this.target=document.head,this.hidden=!0,this.effect((()=>{const t=[...this.childNodes];return t.forEach((t=>{t instanceof HTMLElement&&(t.dataset.reflect=""),this.target.append(t)})),()=>{t.forEach((t=>t.remove()))}}),(()=>[this.target]))}};On([Fe],$n.prototype,"target",void 0),$n=On([nn("gem-reflect")],$n);const Nn=Symbol("open mark");function Ln(t){var e;return(e=class extends Le{constructor(){super(),this.label="",this.internals.role="alertdialog",this.internals.ariaModal="true"}static get isOpen(){return this.store[Nn]}static get observedStores(){return[F.store,this.store]}static open(t){const 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);const n=()=>U(this.store,Object.assign({[Nn]:!0},t));setTimeout((()=>{n(),F.push({title:e.label,open:n,close:this.closeHandle.bind(this),shouldClose:this.shouldClose.bind(this)})}),100)}static close(){F.back()}static closeHandle(){var e;this.inertStore.forEach((t=>t.inert=!1)),null===(e=this.instance)||void 0===e||e.remove(),U(this.store,Object.assign({[Nn]:!1},t))}static shouldClose(){return!0}}).inertStore=[],e.instance=null,e.store=I(Object.assign({[Nn]:!1},t)),e}var jn,Mn,Rn,An=function(t,e,n,s){var i,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(r=(o<3?i(r):o>3?i(e,n,r):i(e,n))||r);return o>3&&r&&Object.defineProperty(e,n,r),r},Hn=function(t,e,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(t):s?s.value:e.get(t)},Wn=function(t,e,n,s,i){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?i.call(t,n):i?i.value=n:e.set(t,n),n};let Vn=class extends Le{constructor(){super(),this.opened=!1,this.inert=!0,jn.set(this,void 0),Mn.set(this,void 0),Rn.set(this,[]),this.label="",this.closeHandle=()=>{var t;this.inert=!0,Hn(this,Rn,"f").forEach((t=>t.inert=!1)),Hn(this,jn,"f")?Hn(this,jn,"f").before(this):Hn(this,Mn,"f")&&(null===(t=Hn(this,Mn,"f"))||void 0===t||t.appendChild(this)),this.dispatchEvent(new CustomEvent("close")),this.opened=!1},this.openHandle=()=>{this.hidden=!1,this.inert=!1,Wn(this,jn,this.nextSibling,"f"),Wn(this,Mn,this.parentElement||this.getRootNode(),"f"),Wn(this,Rn,[...document.body.children].filter((t=>!t.inert)),"f"),Hn(this,Rn,"f").forEach((t=>t.inert=!0)),document.body.append(this),this.dispatchEvent(new CustomEvent("open")),this.opened=!0},this.open=()=>{this.opened||(this.openHandle(),F.push({title:this.label,open:this.openHandle,close:this.closeHandle,shouldClose:this.shouldClose}))},this.close=()=>{F.back()},this.forceClose=()=>{this.opened=!1,setTimeout(this.close,100)},this.internals.role="dialog",this.internals.ariaModal="true"}shouldClose(){return!0}};jn=new WeakMap,Mn=new WeakMap,Rn=new WeakMap,An([ze],Vn.prototype,"opened",void 0),An([Ue],Vn.prototype,"label",void 0),Vn=An([tn(F.store)],Vn);const Dn=new WeakMap;function In(t){return Dn.get(t)}const qn=new WeakMap;function Un(t){return qn.get(t)}function Gn(t){const e=T(),n=document.createElement("style"),s=I(t),i={},o={};qn.set(i,o),Dn.set(i,s),Object.keys(s).forEach((t=>{o[t]=`--${N(t)}-${e}`,i[t]=`var(${o[t]})`}));const r=()=>function(t,e){const n=Dn.get(e),s=qn.get(e),i=Object.keys(n).reduce(((t,e)=>n[e]?t+`${s[e]}:${n[e]};`:t),"");t.textContent=`:root, :host {${i}}`}(n,i);return G(s,r),r(),(document.head||document.documentElement).append(n),i}function Bn(t,e){U(In(t),e)}var Fn,zn,Jn,Kn,Qn,Zn,Xn=function(t,e,n,s){return new(n||(n=Promise))((function(i,o){function r(t){try{l(s.next(t))}catch(t){o(t)}}function a(t){try{l(s.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(r,a)}l((s=s.apply(t,e||[])).next())}))},Yn=function(t,e,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(t):s?s.value:e.get(t)},ts=function(t,e,n,s,i){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?i.call(t,n):i?i.value=n:e.set(t,n),n};const es=/\$\d(?:<[^>]*>)?/,ns=/\$(\d)(<([^>]*)>)?/g;function ss(t,...e){const n=t.split(es),s=[];let i;for(;i=ns.exec(t);){const t=i[3],n=e[Number(i[1])-1];s.push("string"==typeof n?n:n(t))}return zt(n,...s)}const is=new Set;class os{constructor(t){if(Fn.add(this),this.cachePrefix="gem-i18n",!t.resources[t.fallbackLanguage])throw new M("i18n: fallbackLanguage invalid");this.store=I(this),Object.assign(this,t);let e=Yn(this,Fn,"a",Jn)||this.currentLanguage||Yn(this,Fn,"a",Kn);const n=document.querySelector(`[type*=${this.cachePrefix}]`);if(n)try{const t=JSON.parse(n.textContent||"");e=t.currentLanguage,this.resources[t.currentLanguage]=t.currentLanguagePack}catch(t){}e?(ts(this,Fn,e,"a",Zn),this.setLanguage(e)):this.resetLanguage()}get(t,...e){const n=this.resources[this.currentLanguage],s=this.resources[this.fallbackLanguage],i=n[t]||s[t],o=(null==i?void 0:i.message)||i||`[${t}]`;return e.length?ss(o,...e):o}detectLanguage(){const t=Object.keys(this.resources),e=navigator.languages.map((t=>t.replace(/-(.*)/,(t=>t.toUpperCase()))));for(const n of e){const e=t.find((t=>t===n||n.startsWith(`${t}-`)));if(e)return e}return this.fallbackLanguage}setLanguage(t){return Xn(this,void 0,void 0,(function*(){let e;Yn(this,Fn,"a",Qn)&&is.forEach((e=>Xn(this,void 0,void 0,(function*(){return yield e.setLanguage(t)}))));const n=this.resources[t];if(!n)return console.warn(`${this.cachePrefix}: not found \`${t}\``),this.resetLanguage();if("string"==typeof n){const t=`${this.cachePrefix}:`,s=`${t}${n}`,i=localStorage.getItem(s),o=()=>Xn(this,void 0,void 0,(function*(){const e=yield(yield fetch(n)).json();if(this.cache){for(let e=0;e<localStorage.length;e++){const n=localStorage.key(e);n.startsWith(t)&&localStorage.removeItem(n)}localStorage.setItem(s,JSON.stringify(e))}return e}));if(i)try{e=JSON.parse(i)}catch(t){e=yield o()}else e=yield o()}else e=n;return this.resources[t]=e,U(this.store,{}),t!==this.currentLanguage&&ts(this,Fn,t,"a",Zn),!0===this.cache&&this.setCache(),t}))}resetLanguage(){return Yn(this,Fn,"a",Qn)&&is.forEach((t=>t.resetLanguage())),ts(this,Fn,this.fallbackLanguage,"a",Zn),this.cache&&localStorage.removeItem(Yn(this,Fn,"a",zn)),this.setLanguage(this.detectLanguage())}setCache(){Yn(this,Fn,"a",Qn)&&is.forEach((t=>t.setCache())),localStorage.setItem(Yn(this,Fn,"a",zn),this.currentLanguage)}createSubModule(t,e){const n=new os({resources:e,cachePrefix:`${this.cachePrefix}-${t}`,currentLanguage:this.currentLanguage,fallbackLanguage:this.fallbackLanguage,cache:this.cache});return is.add(n),n}toJSON(){return{currentLanguage:this.currentLanguage,currentLanguagePack:this.resources[this.currentLanguage]}}}Fn=new WeakSet,zn=function(){return`${this.cachePrefix}:current`},Jn=function(){const{hostname:t,pathname:e,search:n}=location,s=t.split(".");switch(this.urlParamsType){case"ccTLD":return s.pop();case"gTLD":return s.shift();case"path":return e.split("/")[1];default:const t=this.urlParamsName&&new URLSearchParams(n).get(this.urlParamsName)||"";return t in this.resources?t:""}},Kn=function(){return this.cache&&localStorage.getItem(Yn(this,Fn,"a",zn))||""},Qn=function(){return!is.has(this)},Zn=function(t){var e;Yn(this,Fn,"a",Qn)&&(document.documentElement.lang=t),this.currentLanguage=t,null===(e=this.onChange)||void 0===e||e.call(this,t)};const rs={credentials:"include",mode:"cors"};function as(t,e={}){return n=this,s=void 0,o=function*(){const n=yield fetch(t,Object.assign(Object.assign({},rs),e));if(0===n.status)throw new Error("Request fail");if(n.status>=500)throw new Error(n.statusText);if(n.status>=400)throw new Error((yield n.text())||n.statusText);return yield n.json()},new((i=void 0)||(i=Promise))((function(t,e){function r(t){try{l(o.next(t))}catch(t){e(t)}}function a(t){try{l(o.throw(t))}catch(t){e(t)}}function l(e){var n;e.done?t(e.value):(n=e.value,n instanceof i?n:new i((function(t){t(n)}))).then(r,a)}l((o=o.apply(n,s||[])).next())}));var n,s,i,o}const ls=Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array));function cs(t){return t instanceof FormData||t instanceof Blob||t instanceof ls||t instanceof URLSearchParams||t instanceof ReadableStream||t instanceof ArrayBuffer?t:"object"==typeof t?JSON.stringify(t):t}function hs(t,e){const{origin:n,pathname:s,search:i}=new URL(t,location.origin),o=new URLSearchParams(e).toString();return as(`${n}${s}${i?`${i}&`:o?"?":""}${o}`,{method:"GET"})}function us(t){return as(t,{method:"DELETE"})}function ds(t,e){return as(t,{method:"PUT",body:cs(e)})}function ps(t,e){return as(t,{method:"POST",body:cs(e)})}const fs=t=>window.matchMedia(t).matches,gs={PRINT:"print",get isPrint(){return fs(this.PRINT)},HOVER:"(hover: hover)",get isHover(){return fs(this.HOVER)},PHONE:"(min-width: 319px) and (max-width: 480px)",get isPhone(){return fs(this.PHONE)},LAPTOP:"(min-width: 1023px) and (max-width: 1280px) and (orientation: landscape)",get isLaptop(){return fs(this.LAPTOP)},DESKTOP:"(min-width: 1279px) and (orientation: landscape)",get isDesktop(){return fs(this.DESKTOP)},WIDTHSCREEN:"(min-width: 1919px) and (orientation: landscape)",get isWidthScreen(){return fs(this.WIDTHSCREEN)},PHONE_LANDSCAPE:"(min-width: 479px) and (max-width: 767px) and (orientation: landscape)",get isPhoneLandscape(){return fs(this.PHONE_LANDSCAPE)},TABLET:"(min-width: 768px) and (max-width: 1024px)",get isTablet(){return fs(this.TABLET)},SMALL_PHONE:"(min-width: 319px) and (max-width: 480px) and (max-height: 640px)",get isSmallPhone(){return fs(this.SMALL_PHONE)},WATCH:"(max-width: 319px)",get isWatch(){return fs(this.WATCH)},SHORT:"(min-width: 479px) and (max-height: 320px)",get isShort(){return fs(this.SHORT)},PWA:"(display-mode: standalone)",get isPWA(){return fs(this.PWA)},MOTION_REDUCE:"(prefers-reduced-motion: reduce)",get isMotionReduce(){return fs(this.MOTION_REDUCE)},DATA_REDUCE:"(prefers-reduced-data: reduce)",get isDataReduce(){return fs(this.DATA_REDUCE)}};return e})()}));
54
54
  //# sourceMappingURL=umd.js.map