fairy-ring 0.2.2 → 0.2.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.
@@ -1,8 +1,8 @@
1
+ import { a as getPrev, d as defaultLoadingString, i as getNext, l as renderTemplate, n as fetchConfig, o as getRandom, s as logConfigErrors, u as defaultErrorString } from "./lib-TbJsM56s.js";
1
2
  import { Task } from "@lit/task";
2
3
  import { LitElement, css, html } from "lit";
3
4
  import { property } from "lit/decorators.js";
4
- import { a as getPrev, d as defaultLoadingString, i as getNext, l as renderTemplate, n as fetchConfig, o as getRandom, s as logConfigErrors, u as defaultErrorString } from "./lib-B5FPZH-w.js";
5
- // \0@oxc-project+runtime@0.159.0/helpers/esm/decorate.js
5
+ // \0@oxc-project+runtime@0.158.0/helpers/esm/decorate.js
6
6
  function __decorate(decorators, target, key, desc) {
7
7
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
8
8
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
package/dist/element.js CHANGED
@@ -1 +1 @@
1
- export { t as FairyRingElement, n as define } from "./element-CvyhlWFr.js";
1
+ export { t as FairyRingElement, n as define } from "./element-Bz4Q7JFB.js";
package/dist/lib.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import * as z from "zod/v4-mini";
2
1
  import { TemplateResult, nothing } from "lit";
2
+ import * as z from "zod/v4-mini";
3
3
  declare const locStringSchema: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>;
4
4
  type LocString = z.infer<typeof locStringSchema>;
5
5
  /** pick the most specific translation for the user's preferred locales. i.e. `en-US`, then `en`. default to first locale in object. */
package/dist/lib.js CHANGED
@@ -1 +1 @@
1
- export { t as configSchema, n as fetchConfig, r as getCurrent, i as getNext, a as getPrev, o as getRandom, f as localize, s as logConfigErrors, l as renderTemplate, c as siteSchema } from "./lib-B5FPZH-w.js";
1
+ export { t as configSchema, n as fetchConfig, r as getCurrent, i as getNext, a as getPrev, o as getRandom, f as localize, s as logConfigErrors, l as renderTemplate, c as siteSchema } from "./lib-TbJsM56s.js";
package/dist/react.js CHANGED
@@ -1,5 +1,5 @@
1
+ import { n as define } from "./element-Bz4Q7JFB.js";
1
2
  import { createElement } from "react";
2
- import { n as define } from "./element-CvyhlWFr.js";
3
3
  // src/react.ts
4
4
  function FairyRing() {
5
5
  define();
package/dist/solid.js CHANGED
@@ -1,4 +1,4 @@
1
- import { n as define } from "./element-CvyhlWFr.js";
1
+ import { n as define } from "./element-Bz4Q7JFB.js";
2
2
  // src/solid.ts
3
3
  function FairyRing() {
4
4
  define();
@@ -9,55 +9,55 @@ const e=globalThis,t=e.ShadowRoot&&(e.ShadyCSS===void 0||e.ShadyCSS.nativeShadow
9
9
  * Copyright 2017 Google LLC
10
10
  * SPDX-License-Identifier: BSD-3-Clause
11
11
  */
12
- switch(t){case Boolean:e=e?ne:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=e!==null;break;case Number:n=e===null?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch{n=null}}return n}},_=(e,t)=>!l(e,t),ie={attribute:!0,type:String,converter:g,reflect:!1,useDefault:!1,hasChanged:_};Symbol.metadata??=Symbol(`metadata`),m.litPropertyMetadata??=/* @__PURE__ */ new WeakMap;var v=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=ie){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let n=Symbol(),r=this.getPropertyDescriptor(e,n,t);r!==void 0&&u(this.prototype,e,r)}}static getPropertyDescriptor(e,t,n){let{get:r,set:i}=d(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:r,set(t){let a=r?.call(this);i?.call(this,t),this.requestUpdate(e,a,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??ie}static _$Ei(){if(this.hasOwnProperty(h(`elementProperties`)))return;let e=ee(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(h(`finalized`)))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(h(`properties`))){let e=this.properties,t=[...f(e),...p(e)];for(let n of t)this.createProperty(n,e[n])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[e,n]of t)this.elementProperties.set(e,n)}this._$Eh=/* @__PURE__ */ new Map;for(let[e,t]of this.elementProperties){let n=this._$Eu(e,t);n!==void 0&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let e of n)t.unshift(c(e))}else e!==void 0&&t.push(c(e));return t}static _$Eu(e,t){let n=t.attribute;return!1===n?void 0:typeof n==`string`?n:typeof e==`string`?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=/* @__PURE__ */ new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=/* @__PURE__ */ new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=/* @__PURE__ */ new Map,t=this.constructor.elementProperties;for(let n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return s(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ET(e,t){let n=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,n);if(r!==void 0&&!0===n.reflect){let i=(n.converter?.toAttribute===void 0?g:n.converter).toAttribute(t,n.type);this._$Em=e,i==null?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(e,t){let n=this.constructor,r=n._$Eh.get(e);if(r!==void 0&&this._$Em!==r){let e=n.getPropertyOptions(r),i=typeof e.converter==`function`?{fromAttribute:e.converter}:e.converter?.fromAttribute===void 0?g:e.converter;this._$Em=r;let a=i.fromAttribute(t,e.type);this[r]=a??this._$Ej?.get(r)??a,this._$Em=null}}requestUpdate(e,t,n,r=!1,i){if(e!==void 0){let a=this.constructor;if(!1===r&&(i=this[e]),n??=a.getPropertyOptions(e),!((n.hasChanged??_)(i,t)||n.useDefault&&n.reflect&&i===this._$Ej?.get(e)&&!this.hasAttribute(a._$Eu(e,n))))return;this.C(e,t,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:n,reflect:r,wrapped:i},a){n&&!(this._$Ej??=/* @__PURE__ */ new Map).has(e)&&(this._$Ej.set(e,a??t??this[e]),!0!==i||a!==void 0)||(this._$AL.has(e)||(this.hasUpdated||n||(t=void 0),this._$AL.set(e,t)),!0===r&&this._$Em!==e&&(this._$Eq??=/* @__PURE__ */ new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}let e=this.constructor.elementProperties;if(e.size>0)for(let[t,n]of e){let{wrapped:e}=n,r=this[t];!0!==e||this._$AL.has(t)||r===void 0||this.C(t,void 0,n,r)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(e=>e.hostUpdate?.()),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=/* @__PURE__ */ new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(e){}firstUpdated(e){}};v.elementStyles=[],v.shadowRootOptions={mode:`open`},v[h(`elementProperties`)]=/* @__PURE__ */ new Map,v[h(`finalized`)]=/* @__PURE__ */ new Map,re?.({ReactiveElement:v}),(m.reactiveElementVersions??=[]).push(`2.1.2`);const ae=Symbol();
12
+ switch(t){case Boolean:e=e?ne:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=e!==null;break;case Number:n=e===null?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch{n=null}}return n}},ie=(e,t)=>!l(e,t),ae={attribute:!0,type:String,converter:g,reflect:!1,useDefault:!1,hasChanged:ie};Symbol.metadata??=Symbol(`metadata`),m.litPropertyMetadata??=/* @__PURE__ */ new WeakMap;var _=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=ae){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let n=Symbol(),r=this.getPropertyDescriptor(e,n,t);r!==void 0&&u(this.prototype,e,r)}}static getPropertyDescriptor(e,t,n){let{get:r,set:i}=d(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:r,set(t){let a=r?.call(this);i?.call(this,t),this.requestUpdate(e,a,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??ae}static _$Ei(){if(this.hasOwnProperty(h(`elementProperties`)))return;let e=ee(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(h(`finalized`)))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(h(`properties`))){let e=this.properties,t=[...f(e),...p(e)];for(let n of t)this.createProperty(n,e[n])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[e,n]of t)this.elementProperties.set(e,n)}this._$Eh=/* @__PURE__ */ new Map;for(let[e,t]of this.elementProperties){let n=this._$Eu(e,t);n!==void 0&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let e of n)t.unshift(c(e))}else e!==void 0&&t.push(c(e));return t}static _$Eu(e,t){let n=t.attribute;return!1===n?void 0:typeof n==`string`?n:typeof e==`string`?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=/* @__PURE__ */ new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=/* @__PURE__ */ new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=/* @__PURE__ */ new Map,t=this.constructor.elementProperties;for(let n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return s(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ET(e,t){let n=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,n);if(r!==void 0&&!0===n.reflect){let i=(n.converter?.toAttribute===void 0?g:n.converter).toAttribute(t,n.type);this._$Em=e,i==null?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(e,t){let n=this.constructor,r=n._$Eh.get(e);if(r!==void 0&&this._$Em!==r){let e=n.getPropertyOptions(r),i=typeof e.converter==`function`?{fromAttribute:e.converter}:e.converter?.fromAttribute===void 0?g:e.converter;this._$Em=r;let a=i.fromAttribute(t,e.type);this[r]=a??this._$Ej?.get(r)??a,this._$Em=null}}requestUpdate(e,t,n,r=!1,i){if(e!==void 0){let a=this.constructor;if(!1===r&&(i=this[e]),n??=a.getPropertyOptions(e),!((n.hasChanged??ie)(i,t)||n.useDefault&&n.reflect&&i===this._$Ej?.get(e)&&!this.hasAttribute(a._$Eu(e,n))))return;this.C(e,t,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:n,reflect:r,wrapped:i},a){n&&!(this._$Ej??=/* @__PURE__ */ new Map).has(e)&&(this._$Ej.set(e,a??t??this[e]),!0!==i||a!==void 0)||(this._$AL.has(e)||(this.hasUpdated||n||(t=void 0),this._$AL.set(e,t)),!0===r&&this._$Em!==e&&(this._$Eq??=/* @__PURE__ */ new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}let e=this.constructor.elementProperties;if(e.size>0)for(let[t,n]of e){let{wrapped:e}=n,r=this[t];!0!==e||this._$AL.has(t)||r===void 0||this.C(t,void 0,n,r)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(e=>e.hostUpdate?.()),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=/* @__PURE__ */ new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(e){}firstUpdated(e){}};_.elementStyles=[],_.shadowRootOptions={mode:`open`},_[h(`elementProperties`)]=/* @__PURE__ */ new Map,_[h(`finalized`)]=/* @__PURE__ */ new Map,re?.({ReactiveElement:_}),(m.reactiveElementVersions??=[]).push(`2.1.2`);const oe=Symbol();
13
13
  /**
14
14
  * @license
15
15
  * Copyright 2017 Google LLC
16
16
  * SPDX-License-Identifier: BSD-3-Clause
17
17
  */
18
- var oe=class{get taskComplete(){return this.t||=this.i===1?new Promise(((e,t)=>{this.o=e,this.h=t})):this.i===3?Promise.reject(this.l):Promise.resolve(this.u),this.t}constructor(e,t,n){this.p=0,this.i=0,(this._=e).addController(this);let r=typeof t==`object`?t:{task:t,args:n};this.v=r.task,this.j=r.args,this.m=r.argsEqual??se,this.k=r.onComplete,this.A=r.onError,this.autoRun=r.autoRun??!0,`initialValue`in r&&(this.u=r.initialValue,this.i=2,this.O=this.T?.())}hostUpdate(){!0===this.autoRun&&this.S()}hostUpdated(){this.autoRun===`afterUpdate`&&this.S()}T(){if(this.j===void 0)return;let e=this.j();if(!Array.isArray(e))throw Error(`The args function must return an array`);return e}async S(){let e=this.T(),t=this.O;this.O=e,e===t||e===void 0||t!==void 0&&this.m(t,e)||await this.run(e)}async run(e){let t,n;e??=this.T(),this.O=e,this.i===1?this.q?.abort():(this.t=void 0,this.o=void 0,this.h=void 0),this.i=1,this.autoRun===`afterUpdate`?queueMicrotask((()=>this._.requestUpdate())):this._.requestUpdate();let r=++this.p;this.q=new AbortController;let i=!1;try{t=await this.v(e,{signal:this.q.signal})}catch(e){i=!0,n=e}if(this.p===r){if(t===ae)this.i=0;else{if(!1===i){try{this.k?.(t)}catch{}this.i=2,this.o?.(t)}else{try{this.A?.(n)}catch{}this.i=3,this.h?.(n)}this.u=t,this.l=n}this._.requestUpdate()}}abort(e){this.i===1&&this.q?.abort(e)}get value(){return this.u}get error(){return this.l}get status(){return this.i}render(e){switch(this.i){case 0:return e.initial?.();case 1:return e.pending?.();case 2:return e.complete?.(this.value);case 3:return e.error?.(this.error);default:throw Error(`Unexpected status: `+this.i)}}};const se=(e,t)=>e===t||e.length===t.length&&e.every(((e,n)=>!_(e,t[n]))),ce=globalThis,le=e=>e,ue=ce.trustedTypes,de=ue?ue.createPolicy(`lit-html`,{createHTML:e=>e}):void 0,fe=`$lit$`,y=`lit$${Math.random().toFixed(9).slice(2)}$`,pe=`?`+y,me=`<${pe}>`,b=document,x=()=>b.createComment(``),S=e=>e===null||typeof e!=`object`&&typeof e!=`function`,he=Array.isArray,ge=e=>he(e)||typeof e?.[Symbol.iterator]==`function`,_e=`[
19
- \f\r]`,C=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ve=/-->/g,ye=/>/g,w=RegExp(`>|${_e}(?:([^\\s"'>=/]+)(${_e}*=${_e}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,`g`),be=/'/g,xe=/"/g,Se=/^(?:script|style|textarea|title)$/i,T=(e=>(t,...n)=>({_$litType$:e,strings:t,values:n}))(1),E=Symbol.for(`lit-noChange`),D=Symbol.for(`lit-nothing`),Ce=/* @__PURE__ */ new WeakMap,O=b.createTreeWalker(b,129)
18
+ var se=class{get taskComplete(){return this.t||=this.i===1?new Promise(((e,t)=>{this.o=e,this.h=t})):this.i===3?Promise.reject(this.l):Promise.resolve(this.u),this.t}constructor(e,t,n){this.p=0,this.i=0,(this._=e).addController(this);let r=typeof t==`object`?t:{task:t,args:n};this.v=r.task,this.j=r.args,this.m=r.argsEqual??ce,this.k=r.onComplete,this.A=r.onError,this.autoRun=r.autoRun??!0,`initialValue`in r&&(this.u=r.initialValue,this.i=2,this.O=this.T?.())}hostUpdate(){!0===this.autoRun&&this.S()}hostUpdated(){this.autoRun===`afterUpdate`&&this.S()}T(){if(this.j===void 0)return;let e=this.j();if(!Array.isArray(e))throw Error(`The args function must return an array`);return e}async S(){let e=this.T(),t=this.O;this.O=e,e===t||e===void 0||t!==void 0&&this.m(t,e)||await this.run(e)}async run(e){let t,n;e??=this.T(),this.O=e,this.i===1?this.q?.abort():(this.t=void 0,this.o=void 0,this.h=void 0),this.i=1,this.autoRun===`afterUpdate`?queueMicrotask((()=>this._.requestUpdate())):this._.requestUpdate();let r=++this.p;this.q=new AbortController;let i=!1;try{t=await this.v(e,{signal:this.q.signal})}catch(e){i=!0,n=e}if(this.p===r){if(t===oe)this.i=0;else{if(!1===i){try{this.k?.(t)}catch{}this.i=2,this.o?.(t)}else{try{this.A?.(n)}catch{}this.i=3,this.h?.(n)}this.u=t,this.l=n}this._.requestUpdate()}}abort(e){this.i===1&&this.q?.abort(e)}get value(){return this.u}get error(){return this.l}get status(){return this.i}render(e){switch(this.i){case 0:return e.initial?.();case 1:return e.pending?.();case 2:return e.complete?.(this.value);case 3:return e.error?.(this.error);default:throw Error(`Unexpected status: `+this.i)}}};const ce=(e,t)=>e===t||e.length===t.length&&e.every(((e,n)=>!ie(e,t[n]))),le=globalThis,ue=e=>e,de=le.trustedTypes,fe=de?de.createPolicy(`lit-html`,{createHTML:e=>e}):void 0,pe=`$lit$`,v=`lit$${Math.random().toFixed(9).slice(2)}$`,me=`?`+v,he=`<${me}>`,y=document,b=()=>y.createComment(``),x=e=>e===null||typeof e!=`object`&&typeof e!=`function`,ge=Array.isArray,_e=e=>ge(e)||typeof e?.[Symbol.iterator]==`function`,ve=`[
19
+ \f\r]`,S=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ye=/-->/g,be=/>/g,C=RegExp(`>|${ve}(?:([^\\s"'>=/]+)(${ve}*=${ve}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,`g`),xe=/'/g,Se=/"/g,Ce=/^(?:script|style|textarea|title)$/i,w=(e=>(t,...n)=>({_$litType$:e,strings:t,values:n}))(1),T=Symbol.for(`lit-noChange`),E=Symbol.for(`lit-nothing`),we=/* @__PURE__ */ new WeakMap,D=y.createTreeWalker(y,129)
20
20
  /**
21
21
  * @license
22
22
  * Copyright 2017 Google LLC
23
23
  * SPDX-License-Identifier: BSD-3-Clause
24
24
  */
25
- ;function we(e,t){if(!he(e)||!e.hasOwnProperty(`raw`))throw Error(`invalid template strings array`);return de===void 0?t:de.createHTML(t)}const Te=(e,t)=>{let n=e.length-1,r=[],i,a=t===2?`<svg>`:t===3?`<math>`:``,o=C;for(let t=0;t<n;t++){let n=e[t],s,c,l=-1,u=0;for(;u<n.length&&(o.lastIndex=u,c=o.exec(n),c!==null);)u=o.lastIndex,o===C?c[1]===`!--`?o=ve:c[1]===void 0?c[2]===void 0?c[3]!==void 0&&(o=w):(Se.test(c[2])&&(i=RegExp(`</`+c[2],`g`)),o=w):o=ye:o===w?c[0]===`>`?(o=i??C,l=-1):c[1]===void 0?l=-2:(l=o.lastIndex-c[2].length,s=c[1],o=c[3]===void 0?w:c[3]===`"`?xe:be):o===xe||o===be?o=w:o===ve||o===ye?o=C:(o=w,i=void 0);let d=o===w&&e[t+1].startsWith(`/>`)?` `:``;a+=o===C?n+me:l>=0?(r.push(s),n.slice(0,l)+fe+n.slice(l)+y+d):n+y+(l===-2?t:d)}return[we(e,a+(e[n]||`<?>`)+(t===2?`</svg>`:t===3?`</math>`:``)),r]};var Ee=class e{constructor({strings:t,_$litType$:n},r){let i;this.parts=[];let a=0,o=0,s=t.length-1,c=this.parts,[l,u]=Te(t,n);if(this.el=e.createElement(l,r),O.currentNode=this.el.content,n===2||n===3){let e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;(i=O.nextNode())!==null&&c.length<s;){if(i.nodeType===1){if(i.hasAttributes())for(let e of i.getAttributeNames())if(e.endsWith(fe)){let t=u[o++],n=i.getAttribute(e).split(y),r=/([.?@])?(.*)/.exec(t);c.push({type:1,index:a,name:r[2],strings:n,ctor:r[1]===`.`?Oe:r[1]===`?`?ke:r[1]===`@`?Ae:j}),i.removeAttribute(e)}else e.startsWith(y)&&(c.push({type:6,index:a}),i.removeAttribute(e));if(Se.test(i.tagName)){let e=i.textContent.split(y),t=e.length-1;if(t>0){i.textContent=ue?ue.emptyScript:``;for(let n=0;n<t;n++)i.append(e[n],x()),O.nextNode(),c.push({type:2,index:++a});i.append(e[t],x())}}}else if(i.nodeType===8){if(i.data===pe)c.push({type:2,index:a});else{let e=-1;for(;(e=i.data.indexOf(y,e+1))!==-1;)c.push({type:7,index:a}),e+=y.length-1}}a++}}static createElement(e,t){let n=b.createElement(`template`);return n.innerHTML=e,n}};function k(e,t,n=e,r){if(t===E)return t;let i=r===void 0?n._$Cl:n._$Co?.[r],a=S(t)?void 0:t._$litDirective$;return i?.constructor!==a&&(i?._$AO?.(!1),a===void 0?i=void 0:(i=new a(e),i._$AT(e,n,r)),r===void 0?n._$Cl=i:(n._$Co??=[])[r]=i),i!==void 0&&(t=k(e,i._$AS(e,t.values),i,r)),t}var De=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:n}=this._$AD,r=(e?.creationScope??b).importNode(t,!0);O.currentNode=r;let i=O.nextNode(),a=0,o=0,s=n[0];for(;s!==void 0;){if(a===s.index){let t;s.type===2?t=new A(i,i.nextSibling,this,e):s.type===1?t=new s.ctor(i,s.name,s.strings,this,e):s.type===6&&(t=new je(i,this,e)),this._$AV.push(t),s=n[++o]}a!==s?.index&&(i=O.nextNode(),a++)}return O.currentNode=b,r}p(e){let t=0;for(let n of this._$AV)n!==void 0&&(n.strings===void 0?n._$AI(e[t]):(n._$AI(e,n,t),t+=n.strings.length-2)),t++}},A=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,r){this.type=2,this._$AH=D,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=k(this,e,t),S(e)?e===D||e==null||e===``?(this._$AH!==D&&this._$AR(),this._$AH=D):e!==this._$AH&&e!==E&&this._(e):e._$litType$===void 0?e.nodeType===void 0?ge(e)?this.k(e):this._(e):this.T(e):this.$(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==D&&S(this._$AH)?this._$AA.nextSibling.data=e:this.T(b.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:n}=e,r=typeof n==`number`?this._$AC(e):(n.el===void 0&&(n.el=Ee.createElement(we(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(t);else{let e=new De(r,this),n=e.u(this.options);e.p(t),this.T(n),this._$AH=e}}_$AC(e){let t=Ce.get(e.strings);return t===void 0&&Ce.set(e.strings,t=new Ee(e)),t}k(t){he(this._$AH)||(this._$AH=[],this._$AR());let n=this._$AH,r,i=0;for(let a of t)i===n.length?n.push(r=new e(this.O(x()),this.O(x()),this,this.options)):r=n[i],r._$AI(a),i++;i<n.length&&(this._$AR(r&&r._$AB.nextSibling,i),n.length=i)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let t=le(e).nextSibling;le(e).remove(),e=t}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},j=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,r,i){this.type=1,this._$AH=D,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=i,n.length>2||n[0]!==``||n[1]!==``?(this._$AH=Array(n.length-1).fill(/* @__PURE__ */ new String),this.strings=n):this._$AH=D}_$AI(e,t=this,n,r){let i=this.strings,a=!1;if(i===void 0)e=k(this,e,t,0),a=!S(e)||e!==this._$AH&&e!==E,a&&(this._$AH=e);else{let r=e,o,s;for(e=i[0],o=0;o<i.length-1;o++)s=k(this,r[n+o],t,o),s===E&&(s=this._$AH[o]),a||=!S(s)||s!==this._$AH[o],s===D?e=D:e!==D&&(e+=(s??``)+i[o+1]),this._$AH[o]=s}a&&!r&&this.j(e)}j(e){e===D?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??``)}},Oe=class extends j{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===D?void 0:e}},ke=class extends j{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==D)}},Ae=class extends j{constructor(e,t,n,r,i){super(e,t,n,r,i),this.type=5}_$AI(e,t=this){if((e=k(this,e,t,0)??D)===E)return;let n=this._$AH,r=e===D&&n!==D||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,i=e!==D&&(n===D||r);r&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH==`function`?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},je=class{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){k(this,e)}};const Me={M:fe,P:y,A:pe,C:1,L:Te,R:De,D:ge,V:k,I:A,H:j,N:ke,U:Ae,B:Oe,F:je};(0,ce.litHtmlPolyfillSupport)?.(Ee,A),(ce.litHtmlVersions??=[]).push(`3.3.3`);const Ne=(e,t,n)=>{let r=n?.renderBefore??t,i=r._$litPart$;if(i===void 0){let e=n?.renderBefore??null;r._$litPart$=i=new A(t.insertBefore(x(),e),e,void 0,n??{})}return i._$AI(e),i},Pe=globalThis
25
+ ;function Te(e,t){if(!ge(e)||!e.hasOwnProperty(`raw`))throw Error(`invalid template strings array`);return fe===void 0?t:fe.createHTML(t)}const Ee=(e,t)=>{let n=e.length-1,r=[],i,a=t===2?`<svg>`:t===3?`<math>`:``,o=S;for(let t=0;t<n;t++){let n=e[t],s,c,l=-1,u=0;for(;u<n.length&&(o.lastIndex=u,c=o.exec(n),c!==null);)u=o.lastIndex,o===S?c[1]===`!--`?o=ye:c[1]===void 0?c[2]===void 0?c[3]!==void 0&&(o=C):(Ce.test(c[2])&&(i=RegExp(`</`+c[2],`g`)),o=C):o=be:o===C?c[0]===`>`?(o=i??S,l=-1):c[1]===void 0?l=-2:(l=o.lastIndex-c[2].length,s=c[1],o=c[3]===void 0?C:c[3]===`"`?Se:xe):o===Se||o===xe?o=C:o===ye||o===be?o=S:(o=C,i=void 0);let d=o===C&&e[t+1].startsWith(`/>`)?` `:``;a+=o===S?n+he:l>=0?(r.push(s),n.slice(0,l)+pe+n.slice(l)+v+d):n+v+(l===-2?t:d)}return[Te(e,a+(e[n]||`<?>`)+(t===2?`</svg>`:t===3?`</math>`:``)),r]};var De=class e{constructor({strings:t,_$litType$:n},r){let i;this.parts=[];let a=0,o=0,s=t.length-1,c=this.parts,[l,u]=Ee(t,n);if(this.el=e.createElement(l,r),D.currentNode=this.el.content,n===2||n===3){let e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;(i=D.nextNode())!==null&&c.length<s;){if(i.nodeType===1){if(i.hasAttributes())for(let e of i.getAttributeNames())if(e.endsWith(pe)){let t=u[o++],n=i.getAttribute(e).split(v),r=/([.?@])?(.*)/.exec(t);c.push({type:1,index:a,name:r[2],strings:n,ctor:r[1]===`.`?ke:r[1]===`?`?Ae:r[1]===`@`?je:A}),i.removeAttribute(e)}else e.startsWith(v)&&(c.push({type:6,index:a}),i.removeAttribute(e));if(Ce.test(i.tagName)){let e=i.textContent.split(v),t=e.length-1;if(t>0){i.textContent=de?de.emptyScript:``;for(let n=0;n<t;n++)i.append(e[n],b()),D.nextNode(),c.push({type:2,index:++a});i.append(e[t],b())}}}else if(i.nodeType===8){if(i.data===me)c.push({type:2,index:a});else{let e=-1;for(;(e=i.data.indexOf(v,e+1))!==-1;)c.push({type:7,index:a}),e+=v.length-1}}a++}}static createElement(e,t){let n=y.createElement(`template`);return n.innerHTML=e,n}};function O(e,t,n=e,r){if(t===T)return t;let i=r===void 0?n._$Cl:n._$Co?.[r],a=x(t)?void 0:t._$litDirective$;return i?.constructor!==a&&(i?._$AO?.(!1),a===void 0?i=void 0:(i=new a(e),i._$AT(e,n,r)),r===void 0?n._$Cl=i:(n._$Co??=[])[r]=i),i!==void 0&&(t=O(e,i._$AS(e,t.values),i,r)),t}var Oe=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:n}=this._$AD,r=(e?.creationScope??y).importNode(t,!0);D.currentNode=r;let i=D.nextNode(),a=0,o=0,s=n[0];for(;s!==void 0;){if(a===s.index){let t;s.type===2?t=new k(i,i.nextSibling,this,e):s.type===1?t=new s.ctor(i,s.name,s.strings,this,e):s.type===6&&(t=new Me(i,this,e)),this._$AV.push(t),s=n[++o]}a!==s?.index&&(i=D.nextNode(),a++)}return D.currentNode=y,r}p(e){let t=0;for(let n of this._$AV)n!==void 0&&(n.strings===void 0?n._$AI(e[t]):(n._$AI(e,n,t),t+=n.strings.length-2)),t++}},k=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,r){this.type=2,this._$AH=E,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=O(this,e,t),x(e)?e===E||e==null||e===``?(this._$AH!==E&&this._$AR(),this._$AH=E):e!==this._$AH&&e!==T&&this._(e):e._$litType$===void 0?e.nodeType===void 0?_e(e)?this.k(e):this._(e):this.T(e):this.$(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==E&&x(this._$AH)?this._$AA.nextSibling.data=e:this.T(y.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:n}=e,r=typeof n==`number`?this._$AC(e):(n.el===void 0&&(n.el=De.createElement(Te(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(t);else{let e=new Oe(r,this),n=e.u(this.options);e.p(t),this.T(n),this._$AH=e}}_$AC(e){let t=we.get(e.strings);return t===void 0&&we.set(e.strings,t=new De(e)),t}k(t){ge(this._$AH)||(this._$AH=[],this._$AR());let n=this._$AH,r,i=0;for(let a of t)i===n.length?n.push(r=new e(this.O(b()),this.O(b()),this,this.options)):r=n[i],r._$AI(a),i++;i<n.length&&(this._$AR(r&&r._$AB.nextSibling,i),n.length=i)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let t=ue(e).nextSibling;ue(e).remove(),e=t}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},A=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,r,i){this.type=1,this._$AH=E,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=i,n.length>2||n[0]!==``||n[1]!==``?(this._$AH=Array(n.length-1).fill(/* @__PURE__ */ new String),this.strings=n):this._$AH=E}_$AI(e,t=this,n,r){let i=this.strings,a=!1;if(i===void 0)e=O(this,e,t,0),a=!x(e)||e!==this._$AH&&e!==T,a&&(this._$AH=e);else{let r=e,o,s;for(e=i[0],o=0;o<i.length-1;o++)s=O(this,r[n+o],t,o),s===T&&(s=this._$AH[o]),a||=!x(s)||s!==this._$AH[o],s===E?e=E:e!==E&&(e+=(s??``)+i[o+1]),this._$AH[o]=s}a&&!r&&this.j(e)}j(e){e===E?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??``)}},ke=class extends A{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===E?void 0:e}},Ae=class extends A{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==E)}},je=class extends A{constructor(e,t,n,r,i){super(e,t,n,r,i),this.type=5}_$AI(e,t=this){if((e=O(this,e,t,0)??E)===T)return;let n=this._$AH,r=e===E&&n!==E||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,i=e!==E&&(n===E||r);r&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH==`function`?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Me=class{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){O(this,e)}};const Ne={M:pe,P:v,A:me,C:1,L:Ee,R:Oe,D:_e,V:O,I:k,H:A,N:Ae,U:je,B:ke,F:Me},Pe=le.litHtmlPolyfillSupport;Pe?.(De,k),(le.litHtmlVersions??=[]).push(`3.3.3`);const Fe=(e,t,n)=>{let r=n?.renderBefore??t,i=r._$litPart$;if(i===void 0){let e=n?.renderBefore??null;r._$litPart$=i=new k(t.insertBefore(b(),e),e,void 0,n??{})}return i._$AI(e),i},Ie=globalThis
26
26
  /**
27
27
  * @license
28
28
  * Copyright 2017 Google LLC
29
29
  * SPDX-License-Identifier: BSD-3-Clause
30
30
  */
31
- ;var M=class extends v{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Ne(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return E}};M._$litElement$=!0,M.finalized=!0,Pe.litElementHydrateSupport?.({LitElement:M}),(0,Pe.litElementPolyfillSupport)?.({LitElement:M}),(Pe.litElementVersions??=[]).push(`4.2.2`);
31
+ ;var j=class extends _{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Fe(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return T}};j._$litElement$=!0,j.finalized=!0,Ie.litElementHydrateSupport?.({LitElement:j});const Le=Ie.litElementPolyfillSupport;Le?.({LitElement:j}),(Ie.litElementVersions??=[]).push(`4.2.2`);
32
32
  /**
33
33
  * @license
34
34
  * Copyright 2017 Google LLC
35
35
  * SPDX-License-Identifier: BSD-3-Clause
36
- */const Fe={attribute:!0,type:String,converter:g,reflect:!1,hasChanged:_},Ie=(e=Fe,t,n)=>{let{kind:r,metadata:i}=n,a=globalThis.litPropertyMetadata.get(i);if(a===void 0&&globalThis.litPropertyMetadata.set(i,a=/* @__PURE__ */ new Map),r===`setter`&&((e=Object.create(e)).wrapped=!0),a.set(n.name,e),r===`accessor`){let{name:r}=n;return{set(n){let i=t.get.call(this);t.set.call(this,n),this.requestUpdate(r,i,e,!0,n)},init(t){return t!==void 0&&this.C(r,void 0,e,t),t}}}if(r===`setter`){let{name:r}=n;return function(n){let i=this[r];t.call(this,n),this.requestUpdate(r,i,e,!0,n)}}throw Error(`Unsupported decorator location: `+r)};function Le(e){return(t,n)=>typeof n==`object`?Ie(e,t,n):((e,t,n)=>{let r=t.hasOwnProperty(n);return t.constructor.createProperty(n,e),r?Object.getOwnPropertyDescriptor(t,n):void 0})(e,t,n)}
36
+ */const Re={attribute:!0,type:String,converter:g,reflect:!1,hasChanged:ie},ze=(e=Re,t,n)=>{let{kind:r,metadata:i}=n,a=globalThis.litPropertyMetadata.get(i);if(a===void 0&&globalThis.litPropertyMetadata.set(i,a=/* @__PURE__ */ new Map),r===`setter`&&((e=Object.create(e)).wrapped=!0),a.set(n.name,e),r===`accessor`){let{name:r}=n;return{set(n){let i=t.get.call(this);t.set.call(this,n),this.requestUpdate(r,i,e,!0,n)},init(t){return t!==void 0&&this.C(r,void 0,e,t),t}}}if(r===`setter`){let{name:r}=n;return function(n){let i=this[r];t.call(this,n),this.requestUpdate(r,i,e,!0,n)}}throw Error(`Unsupported decorator location: `+r)};function Be(e){return(t,n)=>typeof n==`object`?ze(e,t,n):((e,t,n)=>{let r=t.hasOwnProperty(n);return t.constructor.createProperty(n,e),r?Object.getOwnPropertyDescriptor(t,n):void 0})(e,t,n)}
37
37
  /**
38
38
  * @license
39
39
  * Copyright 2017 Google LLC
40
40
  * SPDX-License-Identifier: BSD-3-Clause
41
41
  */
42
- function Re(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function ze(e,t){return typeof t==`bigint`?t.toString():t}var Be=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function Ve(e){return new Be(e)}function He(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function Ue(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}const We=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Ge(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Ke(e){if(Ge(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return Ge(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function qe(e){return Ke(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const Je=/* @__PURE__*/ new Set([`string`,`number`,`symbol`]);function Ye(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Xe(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function N(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function Ze(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}function P(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Qe(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function F(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function I(e){return typeof e==`string`?e:e?.message}function $e(e){let t=[];for(let n of e??[]){let e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function et(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function L(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:I(e.inst?._zod.def?.error?.(e))??I(a?.(e))??I(t?.error?.(e))??I(n.customError?.(e))??I(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}function tt(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):rt(e,n,r.value)}}function R(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function nt(e,t,n){return R(e,t,n,!1)}function rt(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:R(this,t,n.bind(this))},set(e){R(this,t,e)}})}function it(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}let at,z=!1;const ot={configurable:!0,get(){z=!0}};function B(e,t,n){let r=Object.getPrototypeOf(e._zod);t in r&&at!==e._zod?at=void 0:(at=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,ot);let e=z;z=!1;try{let r=n(this);return z?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),z||=e,r}catch(n){throw delete this[t],z||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}}))}function st(e,t,n,r){let i=it(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var ct;const lt={value:void 0,enumerable:!1};let ut=`captureStackTrace`in Error?Error:null;function dt(e){let t=ut;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return ut=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}/* @__NO_SIDE_EFFECTS__ */
43
- function V(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=/* @__PURE__ */ new Set}a.prototype=i;let o=n,s=o&&/* @__PURE__ */ new WeakSet;function c(n,r){if(!n._zod){lt.value=new a(r);try{Object.defineProperty(n,"_zod",lt)}finally{lt.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),tt(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?dt(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var H=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}};(ct=globalThis).__zod_globalConfig??(ct.__zod_globalConfig={});const U=globalThis.__zod_globalConfig;function W(e){return e&&Object.assign(U,e),U}function ft(){let e=this._zod;return e.message??=JSON.stringify(e.def,ze,2),e.message}function pt(e){this._zod.message=e}const mt={get:ft,set:pt,enumerable:!0,configurable:!0},ht={value:void 0,enumerable:!1},gt=/* @__PURE__ */ new WeakSet([Object.prototype,Error.prototype]),_t=(e,t)=>{e.name=`$ZodError`,ht.value=t,Object.defineProperty(e,"issues",ht),ht.value=void 0,Object.defineProperty(e,"message",mt);let n=Object.getPrototypeOf(e);gt.has(n)||(gt.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},vt=/* @__PURE__ */ V(`$ZodError`,_t),G=/* @__PURE__ */ V(`$ZodError`,_t,void 0,{Parent:Error});function yt(e){let t=[],n=e.map(e=>typeof e==`object`?e.key:e);for(let e of n)typeof e==`number`?t.push(`[${e}]`):typeof e==`symbol`?t.push(`[${JSON.stringify(String(e))}]`):/[^\w$]/.test(e)?t.push(`[${JSON.stringify(e)}]`):(t.length&&t.push(`.`),t.push(e));return t.join(``)}function bt(e){let t=[],n=[...e.issues].sort((e,t)=>(e.path??[]).length-(t.path??[]).length);for(let e of n)t.push(`✖ ${e.message}`),e.path?.length&&t.push(` → at ${yt(e.path)}`);return t.join(`
44
- `)}const xt=/* @__PURE__*/ (e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new H;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>L(e,o,W())));throw We(n,a?.callee??t),n}return s.value};return t})(G),St=/* @__PURE__*/ (e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>L(e,o,W())));throw We(n,a?.callee??t),n}return s.value};return t})(G),Ct=/* @__PURE__*/ (e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new H;return a.issues.length?wt(e,a.issues,i):{success:!0,data:a.value}})(G);function wt(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>L(e,n,W()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}const Tt=/* @__PURE__*/ (e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?wt(e,a.issues,i):{success:!0,data:a.value}})(G),Et=/^https?$/,Dt=/^[\s\S]{0,}$/,Ot=/^-?\d+(?:\.\d+)?$/,kt=/*@__PURE__*/ V(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),At=/*@__PURE__*/ V(`$ZodCheckStringFormat`,(e,t)=>{var n,r;kt.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),jt={major:4,minor:6,patch:7},K=/*@__PURE__*/ V(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=jt;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=P(t),a;for(let o of n){if(o._zod.def.when){if(Qe(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new H;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(et(t.issues,n,e),i||=P(t,n))});else{if(t.issues.length===n)continue;et(t.issues,n,e),i||=P(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(P(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new H;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new H;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return nt(this,`~standard`,Pt(this))},set"~standard"(e){R(this,`~standard`,e)}}),Mt=(e,t)=>e.issues.length?{issues:e.issues.map(e=>L(e,t,W()))}:{value:e.value};async function Nt(e,t){let n={async:!0};return Mt(await e._zod.run({value:t,issues:[]},n),n)}function Pt(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return Mt(r,n)}catch{}return Nt(e,t)},vendor:`zod`,version:1}}const Ft=/*@__PURE__*/ V(`$ZodString`,(e,t)=>{K.init(e,t),e._zod.pattern=t.pattern??Dt,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),It=/*@__PURE__*/ V(`$ZodStringFormat`,(e,t)=>{At.init(e,t),Ft.init(e,t)});function Lt(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function Rt(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?Lt(e)||2:zt(e,t)}function zt(e,t){if(!t.normalize&&t.protocol?.source===Et.source&&!/^https?:\/\//i.test(e))return 1;try{if(typeof URL<`u`){let t=URL;if(typeof t.parse==`function`)return t.parse(e)??2}return new URL(e)}catch{return 2}}const Bt=/[\t\n\r]/g;function Vt(e){return e.replace(Bt,``)}function Ht(e,t){return t.lastIndex=0,t.test(e.hostname)}function Ut(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}const Wt=/*@__PURE__*/ V(`$ZodURL`,(e,t)=>{It.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=Rt(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}if(i===!0){n.value=Vt(r);return}t.hostname&&!Ht(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!Ut(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:Vt(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}});function Gt(e,t){let n=$e(e._zod.def.checks);if(!n.length)return;let r=Math.min(...n.map(e=>e[0])),i=e._zod.parse;e._zod.parse=(n,a)=>{let o=t(n.value);if(o>r&&!a?.skipChecks&&a?.direction!==`backward`){for(let[t,r]of $e(e._zod.def.checks))if(o>t&&r._zod.def.when(n)){let t=n.issues.length;return r._zod.check(n),n.issues[t].continue=!1,et(n.issues,t,e),n}}return i(n,a)}}const Kt=e=>Array.isArray(e)?e.length:-1;function qt(e,t,n){e.issues.length&&t.issues.push(...F(n,e.issues)),t.value[n]=e.value}const Jt=/*@__PURE__*/ V(`$ZodArray`,(e,t)=>{K.init(e,t);let n=U.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){let n=a[e],c=t.element._zod.run({value:n,issues:[]},i);if(c instanceof Promise)o.push(c.then(t=>qt(t,r,e)));else if(qt(c,r,e),s&&c.issues.length!==0&&P(c))break}return o.length?Promise.all(o).then(()=>r):r},Gt(e,Kt)});function Yt(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...F(n,e.issues))}!o&&i===void 0?e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]}):e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}const Xt=[];function Zt(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:Xt,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=Ze(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function Qt(e,t,n,r,i,a,o){let s=[],c=i.keySet,l=i.catchall._zod,u=l.def.type,d=l.optin,f=l.optout,p=0;for(let i in t){if(o&&n.issues.length!==p){if(P(n,p))break;p=n.issues.length}if(c.has(i))continue;if(i===`__proto__`){u===`never`&&s.push(i);continue}if(u===`never`){s.push(i);continue}let a=l.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Yt(e,n,i,t,d,f))):Yt(a,n,i,t,d,f)}return s.length&&n.issues.push({code:`unrecognized_keys`,keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}const $t=/*@__PURE__*/ V(`$ZodObject`,(e,t)=>{K.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`),r=n?.get?n.get.raw:t.shape??{};if(r){let e=()=>{let n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}let i=Ve(()=>Zt(t));B(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||Ue(n,e,/* @__PURE__ */ new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let a=Ge,o=t.catchall,s,c=U.memoizer;c?.attach(e),e._zod.parse=(t,n)=>{s??=i.value;let r=t.value;if(!a(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=c?c.alloc(e,t,{},n):{};let l=[],u=s.shape,d=n?.abortEarly,f=t.issues.length;for(let e of s.allKeys){if(d&&t.issues.length!==f){if(P(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],a=i._zod.optin,o=i._zod.optout,s=i._zod.run({value:r[e],issues:[]},n);s instanceof Promise?l.push(s.then(n=>Yt(n,t,e,r,a,o))):Yt(s,t,e,r,a,o)}return o?Qt(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}});function en(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!P(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>L(e,r,W())))}),t)}const tn=/*@__PURE__*/ V(`$ZodUnion`,(e,t)=>{K.init(e,t),B(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),B(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),B(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),B(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>He(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>en(t,r,e,i)):en(o,r,e,i)}}),nn=/*@__PURE__*/ V(`$ZodRecord`,(e,t)=>{K.init(e,t);let n=U.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Ke(a))return r.issues.push({expected:`record`,code:`invalid_type`,input:a,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s&&!t.partial){r.value=n?n.alloc(e,r,{},i):{};let c=/* @__PURE__ */ new Set;for(let n of s)if(typeof n==`string`||typeof n==`number`||typeof n==`symbol`){if(c.add(typeof n==`number`?n.toString():n),n===`__proto__`)continue;let s=t.keyType._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){r.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>L(e,i,W())),input:n,path:[n],inst:e});continue}let l=s.value;if(l===`__proto__`)continue;let u=t.valueType._zod.run({value:a[n],issues:[]},i);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&r.issues.push(...F(n,e.issues)),r.value[l]=e.value})):(u.issues.length&&r.issues.push(...F(n,u.issues)),r.value[l]=u.value)}let l;for(let e in a)if(!c.has(e)){if(t.mode===`loose`){if(e===`__proto__`)continue;r.value[e]=a[e]}else l??=[],l.push(e)}l&&l.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:l,continue:!0})}else{r.value=n?n.alloc(e,r,{},i):{};let c;for(let n of Reflect.ownKeys(a)){if(n===`__proto__`||!Object.prototype.propertyIsEnumerable.call(a,n))continue;let l=t.keyType._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof n==`string`&&Ot.test(n)&&l.issues.length){let e=t.keyType._zod.run({value:Number(n),issues:[]},i);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(l=e)}if(l.issues.length){t.mode===`loose`?r.value[n]=a[n]:s?(c??=[],c.push(n)):r.issues.push({code:`invalid_key`,origin:`record`,issues:l.issues.map(e=>L(e,i,W())),input:n,path:[n],inst:e});continue}let u=l.value;if(u===`__proto__`)continue;let d=t.valueType._zod.run({value:a[n],issues:[]},i);d instanceof Promise?o.push(d.then(e=>{e.issues.length&&r.issues.push(...F(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...F(n,d.issues)),r.value[u]=d.value)}c&&c.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:c,continue:!0})}return o.length?Promise.all(o).then(()=>r):r}}),rn=/*@__PURE__*/ V(`$ZodEnum`,(e,t)=>{K.init(e,t);let n=Re(t.entries),r=new Set(n);e._zod.values=r,B(e,`pattern`,e=>{let t=Re(e.def.entries).filter(e=>Je.has(typeof e));return RegExp(t.length?`^(${t.map(e=>Ye(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),an=/*@__PURE__*/ V(`$ZodLiteral`,(e,t)=>{K.init(e,t);let n=new Set(t.values);e._zod.values=n,B(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?Ye(e):e?Ye(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}});function on(e,t){return e.value=t.issues.length?void 0:t.value,e}const sn=/*@__PURE__*/ V(`$ZodOptional`,(e,t)=>{K.init(e,t),B(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,B(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?/* @__PURE__ */ new Set([...t,void 0]):void 0}),B(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${He(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>on(e,t)):on(e,r)}return t.innerType._zod.run(e,n)}}),cn=/*@__PURE__*/ V(`$ZodDefault`,(e,t)=>{K.init(e,t),e._zod.optin=`defaulted`,B(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>ln(e,t)):ln(r,t)}});function ln(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const un=/*@__PURE__*/ V(`$ZodPrefault`,(e,t)=>{K.init(e,t),e._zod.optin=`defaulted`,B(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),dn=/*@__PURE__*/ V(`$ZodNonOptional`,(e,t)=>{K.init(e,t),B(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>fn(t,e)):fn(i,e)}});function fn(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var pn,mn=class{constructor(){this._map=/* @__PURE__ */ new WeakMap,this._idmap=/* @__PURE__ */ new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=/* @__PURE__ */ new WeakMap,this._idmap=/* @__PURE__ */ new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function hn(){return new mn}(pn=globalThis).__zod_globalRegistry??(pn.__zod_globalRegistry=hn());const gn=globalThis.__zod_globalRegistry;function _n(e){return e.checks&&=[...e.checks],e}// @__NO_SIDE_EFFECTS__
45
- function vn(e,t){return new e(_n({type:`string`,...N(t)}))}// @__NO_SIDE_EFFECTS__
46
- function yn(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...N(t)})}// @__NO_SIDE_EFFECTS__
47
- function bn(e){let t=new kt({check:`describe`});return t._zod.onattach=[t=>{let n=gn.get(t)??{};gn.add(t,{...n,description:e})}],t._zod.check=()=>{},t}// @__NO_SIDE_EFFECTS__
48
- function xn(e){let t=new kt({check:`meta`});return t._zod.onattach=[t=>{let n=gn.get(t)??{};gn.add(t,{...n,...e})}],t._zod.check=()=>{},t}const q=/*@__PURE__*/ V(`ZodMiniType`,(e,t)=>{if(!e._zod)throw Error(`Uninitialized schema in ZodMiniType.`);K.init(e,t),e.def=t,e.type=t.type},{get with(){return this.check},set with(e){R(this,`with`,e)},parse(e,t){return xt(this,e,t,{callee:this.parse})},parseAsync(e,t){return St(this,e,t,{callee:this.parseAsync})},safeParse(e,t){return Ct(this,e,t)},safeParseAsync(e,t){return Tt(this,e,t)},check(...e){let t=this.def;return this.clone({...t,checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]},{parent:!0})},clone(e,t){return Xe(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},apply(e,...t){return t.length===0?e(this):e(this,...t)}}),Sn=/*@__PURE__*/ V(`ZodMiniString`,(e,t)=>{Ft.init(e,t),q.init(e,t)});// @__NO_SIDE_EFFECTS__
49
- function Cn(e){return/* @__PURE__ */ vn(Sn,e)}const wn=/*@__PURE__*/ V(`ZodMiniStringFormat`,(e,t)=>{It.init(e,t),Sn.init(e,t)}),Tn=/*@__PURE__*/ V(`ZodMiniURL`,(e,t)=>{Wt.init(e,t),wn.init(e,t)});// @__NO_SIDE_EFFECTS__
50
- function En(e){return/* @__PURE__ */ yn(Tn,e)}const Dn=/*@__PURE__*/ V(`ZodMiniArray`,(e,t)=>{Jt.init(e,t),q.init(e,t)});// @__NO_SIDE_EFFECTS__
51
- function On(e,t){return new Dn({type:`array`,element:e,...N(t)})}const kn=/*@__PURE__*/ V(`ZodMiniObject`,(e,t)=>{$t.init(e,t),q.init(e,t),st(e,`shape`,e=>e._zod.def.shape,!1)});// @__NO_SIDE_EFFECTS__
52
- function An(e,t){let n={type:`object`,shape:e??{},...N(t)};return new kn(n)}const jn=/*@__PURE__*/ V(`ZodMiniUnion`,(e,t)=>{tn.init(e,t),q.init(e,t)});// @__NO_SIDE_EFFECTS__
53
- function Mn(e,t){return new jn({type:`union`,options:e,...N(t)})}const Nn=/*@__PURE__*/ V(`ZodMiniRecord`,(e,t)=>{nn.init(e,t),q.init(e,t)});// @__NO_SIDE_EFFECTS__
54
- function Pn(e,t,n){return!t||!t._zod?new Nn({type:`record`,keyType:/* @__PURE__ */ Cn(),valueType:e,...N(t)}):new Nn({type:`record`,keyType:e,valueType:t,...N(n)})}const Fn=/*@__PURE__*/ V(`ZodMiniEnum`,(e,t)=>{rn.init(e,t),q.init(e,t),e.options=[...e._zod.values]});// @__NO_SIDE_EFFECTS__
55
- function In(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new Fn({type:`enum`,entries:n,...N(t)})}const Ln=/*@__PURE__*/ V(`ZodMiniLiteral`,(e,t)=>{an.init(e,t),q.init(e,t)});// @__NO_SIDE_EFFECTS__
56
- function Rn(e,t){return new Ln({type:`literal`,values:Array.isArray(e)?e:[e],...N(t)})}const zn=/*@__PURE__*/ V(`ZodMiniOptional`,(e,t)=>{sn.init(e,t),q.init(e,t)});// @__NO_SIDE_EFFECTS__
57
- function Bn(e){return new zn({type:`optional`,innerType:e})}const Vn=/*@__PURE__*/ V(`ZodMiniDefault`,(e,t)=>{cn.init(e,t),q.init(e,t)});// @__NO_SIDE_EFFECTS__
58
- function Hn(e,t){return new Vn({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():qe(t)}})}const Un=/*@__PURE__*/ V(`ZodMiniPrefault`,(e,t)=>{un.init(e,t),q.init(e,t)});// @__NO_SIDE_EFFECTS__
59
- function Wn(e,t){return new Un({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():qe(t)}})}const Gn=/*@__PURE__*/ V(`ZodMiniNonOptional`,(e,t)=>{dn.init(e,t),q.init(e,t)});// @__NO_SIDE_EFFECTS__
60
- function Kn(e,t){return new Gn({type:`nonoptional`,innerType:e,...N(t)})}const J=bn,qn=xn;
42
+ function Ve(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function He(e,t){return typeof t==`bigint`?t.toString():t}var Ue=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function We(e){return new Ue(e)}function Ge(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function Ke(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}const qe=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Je(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Ye(e){if(Je(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return Je(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function Xe(e){return Ye(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const Ze=/* @__PURE__*/ new Set([`string`,`number`,`symbol`]);function Qe(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function $e(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function M(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function et(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}function N(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function tt(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function P(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function F(e){return typeof e==`string`?e:e?.message}function nt(e){let t=[];for(let n of e??[]){let e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function rt(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function I(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:F(e.inst?._zod.def?.error?.(e))??F(a?.(e))??F(t?.error?.(e))??F(n.customError?.(e))??F(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}function it(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):ot(e,n,r.value)}}function L(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function at(e,t,n){return L(e,t,n,!1)}function ot(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:L(this,t,n.bind(this))},set(e){L(this,t,e)}})}function st(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}let ct,R=!1;const lt={configurable:!0,get(){R=!0}};function z(e,t,n){let r=Object.getPrototypeOf(e._zod);t in r&&ct!==e._zod?ct=void 0:(ct=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,lt);let e=R;R=!1;try{let r=n(this);return R?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),R||=e,r}catch(n){throw delete this[t],R||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}}))}function ut(e,t,n,r){let i=st(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var dt;const ft={value:void 0,enumerable:!1};let pt=`captureStackTrace`in Error?Error:null;function mt(e){let t=pt;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return pt=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}/* @__NO_SIDE_EFFECTS__ */
43
+ function B(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=/* @__PURE__ */ new Set}a.prototype=i;let o=n,s=o&&/* @__PURE__ */ new WeakSet;function c(n,r){if(!n._zod){ft.value=new a(r);try{Object.defineProperty(n,"_zod",ft)}finally{ft.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),it(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?mt(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var V=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}};(dt=globalThis).__zod_globalConfig??(dt.__zod_globalConfig={});const H=globalThis.__zod_globalConfig;function U(e){return e&&Object.assign(H,e),H}function ht(){let e=this._zod;return e.message??=JSON.stringify(e.def,He,2),e.message}function gt(e){this._zod.message=e}const _t={get:ht,set:gt,enumerable:!0,configurable:!0},vt={value:void 0,enumerable:!1},yt=/* @__PURE__ */ new WeakSet([Object.prototype,Error.prototype]),bt=(e,t)=>{e.name=`$ZodError`,vt.value=t,Object.defineProperty(e,"issues",vt),vt.value=void 0,Object.defineProperty(e,"message",_t);let n=Object.getPrototypeOf(e);yt.has(n)||(yt.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},xt=/* @__PURE__ */ B(`$ZodError`,bt),W=/* @__PURE__ */ B(`$ZodError`,bt,void 0,{Parent:Error});function St(e){let t=[],n=e.map(e=>typeof e==`object`?e.key:e);for(let e of n)typeof e==`number`?t.push(`[${e}]`):typeof e==`symbol`?t.push(`[${JSON.stringify(String(e))}]`):/[^\w$]/.test(e)?t.push(`[${JSON.stringify(e)}]`):(t.length&&t.push(`.`),t.push(e));return t.join(``)}function Ct(e){let t=[],n=[...e.issues].sort((e,t)=>(e.path??[]).length-(t.path??[]).length);for(let e of n)t.push(`✖ ${e.message}`),e.path?.length&&t.push(` → at ${St(e.path)}`);return t.join(`
44
+ `)}const wt=/* @__PURE__*/ (e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new V;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>I(e,o,U())));throw qe(n,a?.callee??t),n}return s.value};return t})(W),Tt=/* @__PURE__*/ (e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>I(e,o,U())));throw qe(n,a?.callee??t),n}return s.value};return t})(W),Et=/* @__PURE__*/ (e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new V;return a.issues.length?Dt(e,a.issues,i):{success:!0,data:a.value}})(W);function Dt(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>I(e,n,U()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}const Ot=/* @__PURE__*/ (e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?Dt(e,a.issues,i):{success:!0,data:a.value}})(W),kt=/^https?$/,At=/^[\s\S]{0,}$/,jt=/^-?\d+(?:\.\d+)?$/,Mt=/*@__PURE__*/ B(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Nt=/*@__PURE__*/ B(`$ZodCheckStringFormat`,(e,t)=>{var n,r;Mt.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Pt={major:4,minor:6,patch:7},G=/*@__PURE__*/ B(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Pt;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=N(t),a;for(let o of n){if(o._zod.def.when){if(tt(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new V;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(rt(t.issues,n,e),i||=N(t,n))});else{if(t.issues.length===n)continue;rt(t.issues,n,e),i||=N(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(N(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new V;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new V;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return at(this,`~standard`,Lt(this))},set"~standard"(e){L(this,`~standard`,e)}}),Ft=(e,t)=>e.issues.length?{issues:e.issues.map(e=>I(e,t,U()))}:{value:e.value};async function It(e,t){let n={async:!0};return Ft(await e._zod.run({value:t,issues:[]},n),n)}function Lt(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return Ft(r,n)}catch{}return It(e,t)},vendor:`zod`,version:1}}const Rt=/*@__PURE__*/ B(`$ZodString`,(e,t)=>{G.init(e,t),e._zod.pattern=t.pattern??At,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),zt=/*@__PURE__*/ B(`$ZodStringFormat`,(e,t)=>{Nt.init(e,t),Rt.init(e,t)});function Bt(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function Vt(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?Bt(e)||2:Ht(e,t)}function Ht(e,t){if(!t.normalize&&t.protocol?.source===kt.source&&!/^https?:\/\//i.test(e))return 1;try{if(typeof URL<`u`){let t=URL;if(typeof t.parse==`function`)return t.parse(e)??2}return new URL(e)}catch{return 2}}const Ut=/[\t\n\r]/g;function Wt(e){return e.replace(Ut,``)}function Gt(e,t){return t.lastIndex=0,t.test(e.hostname)}function Kt(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}const qt=/*@__PURE__*/ B(`$ZodURL`,(e,t)=>{zt.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=Vt(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}if(i===!0){n.value=Wt(r);return}t.hostname&&!Gt(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!Kt(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:Wt(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}});function Jt(e,t){let n=nt(e._zod.def.checks);if(!n.length)return;let r=Math.min(...n.map(e=>e[0])),i=e._zod.parse;e._zod.parse=(n,a)=>{let o=t(n.value);if(o>r&&!a?.skipChecks&&a?.direction!==`backward`){for(let[t,r]of nt(e._zod.def.checks))if(o>t&&r._zod.def.when(n)){let t=n.issues.length;return r._zod.check(n),n.issues[t].continue=!1,rt(n.issues,t,e),n}}return i(n,a)}}const Yt=e=>Array.isArray(e)?e.length:-1;function Xt(e,t,n){e.issues.length&&t.issues.push(...P(n,e.issues)),t.value[n]=e.value}const Zt=/*@__PURE__*/ B(`$ZodArray`,(e,t)=>{G.init(e,t);let n=H.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){let n=a[e],c=t.element._zod.run({value:n,issues:[]},i);if(c instanceof Promise)o.push(c.then(t=>Xt(t,r,e)));else if(Xt(c,r,e),s&&c.issues.length!==0&&N(c))break}return o.length?Promise.all(o).then(()=>r):r},Jt(e,Yt)});function K(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...P(n,e.issues))}!o&&i===void 0?e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]}):e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}const Qt=[];function $t(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:Qt,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=et(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function en(e,t,n,r,i,a,o){let s=[],c=i.keySet,l=i.catchall._zod,u=l.def.type,d=l.optin,f=l.optout,p=0;for(let i in t){if(o&&n.issues.length!==p){if(N(n,p))break;p=n.issues.length}if(c.has(i))continue;if(i===`__proto__`){u===`never`&&s.push(i);continue}if(u===`never`){s.push(i);continue}let a=l.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>K(e,n,i,t,d,f))):K(a,n,i,t,d,f)}return s.length&&n.issues.push({code:`unrecognized_keys`,keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}const tn=/*@__PURE__*/ B(`$ZodObject`,(e,t)=>{G.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`),r=n?.get?n.get.raw:t.shape??{};if(r){let e=()=>{let n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}let i=We(()=>$t(t));z(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||Ke(n,e,/* @__PURE__ */ new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let a=Je,o=t.catchall,s,c=H.memoizer;c?.attach(e),e._zod.parse=(t,n)=>{s??=i.value;let r=t.value;if(!a(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=c?c.alloc(e,t,{},n):{};let l=[],u=s.shape,d=n?.abortEarly,f=t.issues.length;for(let e of s.allKeys){if(d&&t.issues.length!==f){if(N(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],a=i._zod.optin,o=i._zod.optout,s=i._zod.run({value:r[e],issues:[]},n);s instanceof Promise?l.push(s.then(n=>K(n,t,e,r,a,o))):K(s,t,e,r,a,o)}return o?en(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}});function nn(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!N(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>I(e,r,U())))}),t)}const rn=/*@__PURE__*/ B(`$ZodUnion`,(e,t)=>{G.init(e,t),z(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),z(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),z(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),z(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>Ge(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>nn(t,r,e,i)):nn(o,r,e,i)}}),an=/*@__PURE__*/ B(`$ZodRecord`,(e,t)=>{G.init(e,t);let n=H.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Ye(a))return r.issues.push({expected:`record`,code:`invalid_type`,input:a,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s&&!t.partial){r.value=n?n.alloc(e,r,{},i):{};let c=/* @__PURE__ */ new Set;for(let n of s)if(typeof n==`string`||typeof n==`number`||typeof n==`symbol`){if(c.add(typeof n==`number`?n.toString():n),n===`__proto__`)continue;let s=t.keyType._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){r.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>I(e,i,U())),input:n,path:[n],inst:e});continue}let l=s.value;if(l===`__proto__`)continue;let u=t.valueType._zod.run({value:a[n],issues:[]},i);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&r.issues.push(...P(n,e.issues)),r.value[l]=e.value})):(u.issues.length&&r.issues.push(...P(n,u.issues)),r.value[l]=u.value)}let l;for(let e in a)if(!c.has(e)){if(t.mode===`loose`){if(e===`__proto__`)continue;r.value[e]=a[e]}else l??=[],l.push(e)}l&&l.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:l,continue:!0})}else{r.value=n?n.alloc(e,r,{},i):{};let c;for(let n of Reflect.ownKeys(a)){if(n===`__proto__`||!Object.prototype.propertyIsEnumerable.call(a,n))continue;let l=t.keyType._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof n==`string`&&jt.test(n)&&l.issues.length){let e=t.keyType._zod.run({value:Number(n),issues:[]},i);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(l=e)}if(l.issues.length){t.mode===`loose`?r.value[n]=a[n]:s?(c??=[],c.push(n)):r.issues.push({code:`invalid_key`,origin:`record`,issues:l.issues.map(e=>I(e,i,U())),input:n,path:[n],inst:e});continue}let u=l.value;if(u===`__proto__`)continue;let d=t.valueType._zod.run({value:a[n],issues:[]},i);d instanceof Promise?o.push(d.then(e=>{e.issues.length&&r.issues.push(...P(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...P(n,d.issues)),r.value[u]=d.value)}c&&c.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:c,continue:!0})}return o.length?Promise.all(o).then(()=>r):r}}),on=/*@__PURE__*/ B(`$ZodEnum`,(e,t)=>{G.init(e,t);let n=Ve(t.entries),r=new Set(n);e._zod.values=r,z(e,`pattern`,e=>{let t=Ve(e.def.entries).filter(e=>Ze.has(typeof e));return RegExp(t.length?`^(${t.map(e=>Qe(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),sn=/*@__PURE__*/ B(`$ZodLiteral`,(e,t)=>{G.init(e,t);let n=new Set(t.values);e._zod.values=n,z(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?Qe(e):e?Qe(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}});function cn(e,t){return e.value=t.issues.length?void 0:t.value,e}const ln=/*@__PURE__*/ B(`$ZodOptional`,(e,t)=>{G.init(e,t),z(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,z(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?/* @__PURE__ */ new Set([...t,void 0]):void 0}),z(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${Ge(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>cn(e,t)):cn(e,r)}return t.innerType._zod.run(e,n)}}),un=/*@__PURE__*/ B(`$ZodDefault`,(e,t)=>{G.init(e,t),e._zod.optin=`defaulted`,z(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>dn(e,t)):dn(r,t)}});function dn(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const fn=/*@__PURE__*/ B(`$ZodPrefault`,(e,t)=>{G.init(e,t),e._zod.optin=`defaulted`,z(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),pn=/*@__PURE__*/ B(`$ZodNonOptional`,(e,t)=>{G.init(e,t),z(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>mn(t,e)):mn(i,e)}});function mn(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var hn,gn=class{constructor(){this._map=/* @__PURE__ */ new WeakMap,this._idmap=/* @__PURE__ */ new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=/* @__PURE__ */ new WeakMap,this._idmap=/* @__PURE__ */ new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function _n(){return new gn}(hn=globalThis).__zod_globalRegistry??(hn.__zod_globalRegistry=_n());const vn=globalThis.__zod_globalRegistry;function yn(e){return e.checks&&=[...e.checks],e}// @__NO_SIDE_EFFECTS__
45
+ function bn(e,t){return new e(yn({type:`string`,...M(t)}))}// @__NO_SIDE_EFFECTS__
46
+ function xn(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...M(t)})}// @__NO_SIDE_EFFECTS__
47
+ function Sn(e){let t=new Mt({check:`describe`});return t._zod.onattach=[t=>{let n=vn.get(t)??{};vn.add(t,{...n,description:e})}],t._zod.check=()=>{},t}// @__NO_SIDE_EFFECTS__
48
+ function Cn(e){let t=new Mt({check:`meta`});return t._zod.onattach=[t=>{let n=vn.get(t)??{};vn.add(t,{...n,...e})}],t._zod.check=()=>{},t}const q=/*@__PURE__*/ B(`ZodMiniType`,(e,t)=>{if(!e._zod)throw Error(`Uninitialized schema in ZodMiniType.`);G.init(e,t),e.def=t,e.type=t.type},{get with(){return this.check},set with(e){L(this,`with`,e)},parse(e,t){return wt(this,e,t,{callee:this.parse})},parseAsync(e,t){return Tt(this,e,t,{callee:this.parseAsync})},safeParse(e,t){return Et(this,e,t)},safeParseAsync(e,t){return Ot(this,e,t)},check(...e){let t=this.def;return this.clone({...t,checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]},{parent:!0})},clone(e,t){return $e(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},apply(e,...t){return t.length===0?e(this):e(this,...t)}}),wn=/*@__PURE__*/ B(`ZodMiniString`,(e,t)=>{Rt.init(e,t),q.init(e,t)});// @__NO_SIDE_EFFECTS__
49
+ function Tn(e){return/* @__PURE__ */ bn(wn,e)}const En=/*@__PURE__*/ B(`ZodMiniStringFormat`,(e,t)=>{zt.init(e,t),wn.init(e,t)}),Dn=/*@__PURE__*/ B(`ZodMiniURL`,(e,t)=>{qt.init(e,t),En.init(e,t)});// @__NO_SIDE_EFFECTS__
50
+ function On(e){return/* @__PURE__ */ xn(Dn,e)}const kn=/*@__PURE__*/ B(`ZodMiniArray`,(e,t)=>{Zt.init(e,t),q.init(e,t)});// @__NO_SIDE_EFFECTS__
51
+ function An(e,t){return new kn({type:`array`,element:e,...M(t)})}const jn=/*@__PURE__*/ B(`ZodMiniObject`,(e,t)=>{tn.init(e,t),q.init(e,t),ut(e,`shape`,e=>e._zod.def.shape,!1)});// @__NO_SIDE_EFFECTS__
52
+ function Mn(e,t){let n={type:`object`,shape:e??{},...M(t)};return new jn(n)}const Nn=/*@__PURE__*/ B(`ZodMiniUnion`,(e,t)=>{rn.init(e,t),q.init(e,t)});// @__NO_SIDE_EFFECTS__
53
+ function Pn(e,t){return new Nn({type:`union`,options:e,...M(t)})}const Fn=/*@__PURE__*/ B(`ZodMiniRecord`,(e,t)=>{an.init(e,t),q.init(e,t)});// @__NO_SIDE_EFFECTS__
54
+ function In(e,t,n){return!t||!t._zod?new Fn({type:`record`,keyType:/* @__PURE__ */ Tn(),valueType:e,...M(t)}):new Fn({type:`record`,keyType:e,valueType:t,...M(n)})}const Ln=/*@__PURE__*/ B(`ZodMiniEnum`,(e,t)=>{on.init(e,t),q.init(e,t),e.options=[...e._zod.values]});// @__NO_SIDE_EFFECTS__
55
+ function Rn(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new Ln({type:`enum`,entries:n,...M(t)})}const zn=/*@__PURE__*/ B(`ZodMiniLiteral`,(e,t)=>{sn.init(e,t),q.init(e,t)});// @__NO_SIDE_EFFECTS__
56
+ function Bn(e,t){return new zn({type:`literal`,values:Array.isArray(e)?e:[e],...M(t)})}const Vn=/*@__PURE__*/ B(`ZodMiniOptional`,(e,t)=>{ln.init(e,t),q.init(e,t)});// @__NO_SIDE_EFFECTS__
57
+ function Hn(e){return new Vn({type:`optional`,innerType:e})}const Un=/*@__PURE__*/ B(`ZodMiniDefault`,(e,t)=>{un.init(e,t),q.init(e,t)});// @__NO_SIDE_EFFECTS__
58
+ function Wn(e,t){return new Un({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():Xe(t)}})}const Gn=/*@__PURE__*/ B(`ZodMiniPrefault`,(e,t)=>{fn.init(e,t),q.init(e,t)});// @__NO_SIDE_EFFECTS__
59
+ function Kn(e,t){return new Gn({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():Xe(t)}})}const qn=/*@__PURE__*/ B(`ZodMiniNonOptional`,(e,t)=>{pn.init(e,t),q.init(e,t)});// @__NO_SIDE_EFFECTS__
60
+ function Jn(e,t){return new qn({type:`nonoptional`,innerType:e,...M(t)})}const J=Sn,Yn=Cn;
61
61
  /*!
62
62
  * Copyright (c) Squirrel Chat et al., All rights reserved.
63
63
  * SPDX-License-Identifier: BSD-3-Clause
@@ -85,9 +85,9 @@ function Kn(e,t){return new Gn({type:`nonoptional`,innerType:e,...N(t)})}const J
85
85
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
86
86
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
87
87
  */
88
- function Jn(e,t){let n=e.slice(0,t).split(/\r?\n/);return[n.length,n.pop().length+1]}function Yn(e,t,n){let r=e.split(/\r?\n/),i=``,a=(Math.log10(t+1)|0)+1;for(let e=t-1;e<=t+1;e++){let o=r[e-1];o&&(i+=e.toString().padEnd(a,` `),i+=`: `,i+=o,i+=`
88
+ function Xn(e,t){let n=e.slice(0,t).split(/\r?\n/);return[n.length,n.pop().length+1]}function Zn(e,t,n){let r=e.split(/\r?\n/),i=``,a=(Math.log10(t+1)|0)+1;for(let e=t-1;e<=t+1;e++){let o=r[e-1];o&&(i+=e.toString().padEnd(a,` `),i+=`: `,i+=o,i+=`
89
89
  `,e===t&&(i+=` `.repeat(a+n+2),i+=`^
90
- `))}return i}var Y=class e extends Error{line;column;codeblock;constructor(e,t){let[n,r]=Jn(t.toml,t.ptr),i=Yn(t.toml,n,r);super(`Invalid TOML document: ${e}\n\n${i}`,t),this.line=n,this.column=r,this.codeblock=i}static x(t,n,r){throw new e(t,{toml:n.s,ptr:r??n.p})}};
90
+ `))}return i}var Y=class e extends Error{line;column;codeblock;constructor(e,t){let[n,r]=Xn(t.toml,t.ptr),i=Zn(t.toml,n,r);super(`Invalid TOML document: ${e}\n\n${i}`,t),this.line=n,this.column=r,this.codeblock=i}static x(t,n,r){throw new e(t,{toml:n.s,ptr:r??n.p})}};
91
91
  /*!
92
92
  * Copyright (c) Squirrel Chat et al., All rights reserved.
93
93
  * SPDX-License-Identifier: BSD-3-Clause
@@ -115,7 +115,7 @@ function Jn(e,t){let n=e.slice(0,t).split(/\r?\n/);return[n.length,n.pop().lengt
115
115
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
116
116
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
117
117
  */
118
- function Xn(e){let t=e.p,n=e.s.charCodeAt(e.p++),r=n,i=n===39,a=n===e.s.charCodeAt(e.p)&&n===e.s.charCodeAt(e.p+1);a&&((n=e.s.charCodeAt(e.p+=2))===10?e.p++:n===13&&e.s.charCodeAt(e.p+1)===10&&(e.p+=2));let o=``,s=e.p,c=0;for(;e.p<e.s.length;e.p++)if(n=e.s.charCodeAt(e.p),a&&(n===10||n===13&&e.s.charCodeAt(e.p+1)===10))c&&=3;else if(n<32&&n!==9||n===127)Y.x(`control characters are not allowed in strings`,e);else if((!c||c===3)&&n===r&&(!a||e.s.charCodeAt(e.p+1)===r&&e.s.charCodeAt(e.p+2)===r)){if(a&&(e.s.charCodeAt(e.p+3)===r&&e.p++,e.s.charCodeAt(e.p+3)===r&&e.p++),!c){let t=e.s.slice(s,e.p);o=o?o+t:t}return e.p+=a?3:1,o}else if(!c)!i&&n===92&&(o+=e.s.slice(s,s=e.p),c=1);else if(c===1){if(n===120||n===117||n===85){let t=e.p++-1,r=0,i=n===120?2:n===117?4:8;for(let t=0;t<i;t++,e.p++){let t=e.s.charCodeAt(e.p),n=t>=48&&t<=57?t-48:t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:-1;n<0&&Y.x(`invalid non-hex character in unicode escape`,e),r=r<<4|n}(r<0||r>1114111||r>=55296&&r<=57343)&&Y.x(`invalid unicode escape`,e,t),o+=String.fromCodePoint(r),s=e.p--,c=0}else a&&(n===32||n===9)?c=2:(n===98?o+=`\b`:n===116?o+=` `:n===110?o+=`
118
+ function Qn(e){let t=e.p,n=e.s.charCodeAt(e.p++),r=n,i=n===39,a=n===e.s.charCodeAt(e.p)&&n===e.s.charCodeAt(e.p+1);a&&((n=e.s.charCodeAt(e.p+=2))===10?e.p++:n===13&&e.s.charCodeAt(e.p+1)===10&&(e.p+=2));let o=``,s=e.p,c=0;for(;e.p<e.s.length;e.p++)if(n=e.s.charCodeAt(e.p),a&&(n===10||n===13&&e.s.charCodeAt(e.p+1)===10))c&&=3;else if(n<32&&n!==9||n===127)Y.x(`control characters are not allowed in strings`,e);else if((!c||c===3)&&n===r&&(!a||e.s.charCodeAt(e.p+1)===r&&e.s.charCodeAt(e.p+2)===r)){if(a&&(e.s.charCodeAt(e.p+3)===r&&e.p++,e.s.charCodeAt(e.p+3)===r&&e.p++),!c){let t=e.s.slice(s,e.p);o=o?o+t:t}return e.p+=a?3:1,o}else if(!c)!i&&n===92&&(o+=e.s.slice(s,s=e.p),c=1);else if(c===1){if(n===120||n===117||n===85){let t=e.p++-1,r=0,i=n===120?2:n===117?4:8;for(let t=0;t<i;t++,e.p++){let t=e.s.charCodeAt(e.p),n=t>=48&&t<=57?t-48:t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:-1;n<0&&Y.x(`invalid non-hex character in unicode escape`,e),r=r<<4|n}(r<0||r>1114111||r>=55296&&r<=57343)&&Y.x(`invalid unicode escape`,e,t),o+=String.fromCodePoint(r),s=e.p--,c=0}else a&&(n===32||n===9)?c=2:(n===98?o+=`\b`:n===116?o+=` `:n===110?o+=`
119
119
  `:n===102?o+=`\f`:n===114?o+=`\r`:n===101?o+=`\x1B`:n===34?o+=`"`:n===92?o+=`\\`:Y.x(`unrecognised escape sequence`,e),s=e.p+1,c=0)}else n!==32&&n!==9&&(c===2&&Y.x(`invalid escape: only line-ending whitespace may be escaped`,e,s),c=+(!i&&n===92),s=e.p);Y.x(`unfinished string`,e,t)}
120
120
  /*!
121
121
  * Copyright (c) Squirrel Chat et al., All rights reserved.
@@ -144,7 +144,7 @@ function Xn(e){let t=e.p,n=e.s.charCodeAt(e.p++),r=n,i=n===39,a=n===e.s.charCode
144
144
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
145
145
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
146
146
  */
147
- let Zn=/^(\d{4}-\d{2}-\d{2})?[Tt ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|z|[-+]\d{2}:\d{2})?$/i;var Qn=class e extends Date{#e=!1;#t=!1;#n=null;constructor(e,t,n){let r=!0,i=!0,a=`Z`,o;if(typeof e==`string`){if(t)e:{if(t<3){if(+e.slice(11,13)>23){e=``;break e}t===2?(a=null,e+=`Z`):(o=e.charCodeAt(e.length-1))!==90&&o!==122&&(a=e.slice(e.length-6)),n&&(e=e.slice(0,10)+`T`+e.slice(11))}else t===4&&(e=+e.slice(0,2)>23?``:`0000-01-01T${e}Z`);r=t!==4,i=t!==3}else{let t=e.match(Zn);t?(t[1]||(r=!1,e=`0000-01-01T${e}`),i=!!t[2],i&&e[10]===` `&&(e=e.replace(` `,`T`)),t[2]&&+t[2]>23?e=``:(a=t[3]||null,!a&&i&&(e+=`Z`))):e=``}}super(e),isNaN(this.getTime())||(this.#e=r,this.#t=i,this.#n=a)}isDateTime(){return this.#e&&this.#t}isLocal(){return!this.#e||!this.#t||!this.#n}isDate(){return this.#e&&!this.#t}isTime(){return this.#t&&!this.#e}isValid(){return this.#e||this.#t}toISOString(){let e=super.toISOString();if(this.isDate())return e.slice(0,10);if(this.isTime())return e.slice(11,23);if(this.#n===null)return e.slice(0,-1);if(this.#n===`Z`||this.#n===`z`)return e;let t=this.#n.slice(1,3)*60+ +this.#n.slice(4,6);return t=this.#n[0]===`-`?t:-t,(/* @__PURE__ */ new Date(this.getTime()-t*6e4)).toISOString().slice(0,-1)+this.#n}static wrapAsOffsetDateTime(t,n=`Z`){let r=new e(t);return r.#n=n,r}static wrapAsLocalDateTime(t){let n=new e(t);return n.#n=null,n}static wrapAsLocalDate(t){let n=new e(t);return n.#t=!1,n.#n=null,n}static wrapAsLocalTime(t){let n=new e(t);return n.#e=!1,n.#n=null,n}};
147
+ let $n=/^(\d{4}-\d{2}-\d{2})?[Tt ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|z|[-+]\d{2}:\d{2})?$/i;var er=class e extends Date{#e=!1;#t=!1;#n=null;constructor(e,t,n){let r=!0,i=!0,a=`Z`,o;if(typeof e==`string`){if(t)prep:{if(t<3){if(+e.slice(11,13)>23){e=``;break prep}t===2?(a=null,e+=`Z`):(o=e.charCodeAt(e.length-1))!==90&&o!==122&&(a=e.slice(e.length-6)),n&&(e=e.slice(0,10)+`T`+e.slice(11))}else t===4&&(e=+e.slice(0,2)>23?``:`0000-01-01T${e}Z`);r=t!==4,i=t!==3}else{let t=e.match($n);t?(t[1]||(r=!1,e=`0000-01-01T${e}`),i=!!t[2],i&&e[10]===` `&&(e=e.replace(` `,`T`)),t[2]&&+t[2]>23?e=``:(a=t[3]||null,!a&&i&&(e+=`Z`))):e=``}}super(e),isNaN(this.getTime())||(this.#e=r,this.#t=i,this.#n=a)}isDateTime(){return this.#e&&this.#t}isLocal(){return!this.#e||!this.#t||!this.#n}isDate(){return this.#e&&!this.#t}isTime(){return this.#t&&!this.#e}isValid(){return this.#e||this.#t}toISOString(){let e=super.toISOString();if(this.isDate())return e.slice(0,10);if(this.isTime())return e.slice(11,23);if(this.#n===null)return e.slice(0,-1);if(this.#n===`Z`||this.#n===`z`)return e;let t=this.#n.slice(1,3)*60+ +this.#n.slice(4,6);return t=this.#n[0]===`-`?t:-t,(/* @__PURE__ */ new Date(this.getTime()-t*6e4)).toISOString().slice(0,-1)+this.#n}static wrapAsOffsetDateTime(t,n=`Z`){let r=new e(t);return r.#n=n,r}static wrapAsLocalDateTime(t){let n=new e(t);return n.#n=null,n}static wrapAsLocalDate(t){let n=new e(t);return n.#t=!1,n.#n=null,n}static wrapAsLocalTime(t){let n=new e(t);return n.#e=!1,n.#n=null,n}};
148
148
  /*!
149
149
  * Copyright (c) Squirrel Chat et al., All rights reserved.
150
150
  * SPDX-License-Identifier: BSD-3-Clause
@@ -172,7 +172,7 @@ let Zn=/^(\d{4}-\d{2}-\d{2})?[Tt ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|z|[
172
172
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
173
173
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
174
174
  */
175
- function X(e,t=10){return t===16?e>47&&e<58||e>64&&e<71||e>96&&e<103:e>47&&e<48+t}function $n(e,t){return e===32||e===9||e===10||e===13||t&&(e===t||e===44)||e===35}function er(e,t){let n=e.p,r=e.s.charCodeAt(e.p);if(r===91||r===123){e.d--||Y.x(`document contains excessively nested structures. aborting.`,e);let t=r===91?lr(e):cr(e);return e.d++,t}return r===34||r===39?Xn(e):r===116?((e.s.charCodeAt(++e.p)!==114||e.s.charCodeAt(++e.p)!==117||e.s.charCodeAt(++e.p)!==101)&&Y.x(`invalid value`,e,n),e.p++,!0):r===102?((e.s.charCodeAt(++e.p)!==97||e.s.charCodeAt(++e.p)!==108||e.s.charCodeAt(++e.p)!==115||e.s.charCodeAt(++e.p)!==101)&&Y.x(`invalid value`,e,n),e.p++,!1):r===43||r===45?tr(e,e.p,e.s.charCodeAt(++e.p),44-r,t):e.s.charCodeAt(e.p+4)===45&&e.s.charCodeAt(e.p+7)===45?ir(e,r,t):e.s.charCodeAt(e.p+2)===58?ar(e,r,t):tr(e,e.p,r,0,t)}function tr(e,t,n,r,i){let a=n,o=0,s=!1;if(a===105)return(e.s.charCodeAt(++e.p)!==110||e.s.charCodeAt(++e.p)!==102)&&Y.x(`invalid value`,e,t),e.p++,(r||1)/0;if(a===110)return(e.s.charCodeAt(++e.p)!==97||e.s.charCodeAt(++e.p)!==110)&&Y.x(`invalid value`,e,t),e.p++,NaN;if(a===48){if(++e.p>=e.s.length||$n(a=e.s.charCodeAt(e.p),i))return e.bi===!0?0n:0;if(!r){if(a===120)return nr(e,t,16,i);if(a===98)return nr(e,t,2,i);if(a===111)return nr(e,t,8,i)}a===46?o=2:a===101||a===69?o=4:Y.x(`illegal leading zero`,e,t)}else X(a)||Y.x(`invalid value`,e,t);for(;++e.p<e.s.length&&(a=e.s.charCodeAt(e.p),!$n(a,i));)o||=1,a===95?(o&1||Y.x(`illegal underscore`,e),o+=11,s=!0):o===1&&a===46?o=2:(o===1||o===3)&&(a===101||a===69)?o=4:o===4&&(a===43||a===45)?o=6:X(a)?o>9?o-=11:o&1||o++:Y.x(`illegal character in numeric literal`,e);if(!o){let t=(n-48)*(r||1);return e.bi===!0?BigInt(t):t}o&1||Y.x(`unfinished numeric value`,e,t);let c=e.s.slice(t,e.p);return s&&(c=c.replaceAll(`_`,``)),o>1?parseFloat(c):rr(e,c,10,t)}function nr(e,t,n,r){let i,a=1;for(;++e.p<e.s.length&&(i=e.s.charCodeAt(e.p),!$n(i,r));)i===95?(a&1&&Y.x(`illegal underscore`,e),a=3):X(i,n)?a&1&&a--:Y.x(`illegal character in numeric literal`,e);a&1&&Y.x(`unfinished numeric value`,e);let o=e.s.slice(t+2,e.p);return a&&(o=o.replaceAll(`_`,``)),rr(e,o,n,t)}function rr(e,t,n,r){if(e.bi!==!0)e:{let i=parseInt(t,n);if(!Number.isSafeInteger(i)){if(e.bi)break e;Y.x(`integer value cannot be represented losslessly`,e,r)}return i}return BigInt(n===10?t:(n===2?`0b`:n===8?`0o`:`0x`)+t)}function ir(e,t,n){let r=e.p++,i;if(!X(t)||!X(e.s.charCodeAt(e.p++))||!X(e.s.charCodeAt(e.p++))||!X(e.s.charCodeAt(e.p++)))return tr(e,e.p=r,t,0,n);if(e.p+=5,X(e.s.charCodeAt(e.p++))||Y.x(`invalid date-time: date part is malformed`,e,r),e.p>=e.s.length||((t=e.s.charCodeAt(e.p))!==32||(i=!0,!X(e.s.charCodeAt(e.p+1))))&&t!==84&&t!==116)return Z(e,e.s.slice(r,e.p),3,!1,r);if(e.s.charCodeAt(e.p+=3)!==58&&Y.x(`invalid date-time: time part is malformed`,e,r),e.s.charCodeAt(e.p+=3)===58&&(e.p+=3),e.s.charCodeAt(e.p)===46)for(;X(e.s.charCodeAt(++e.p)););if(t=e.s.charCodeAt(e.p)){if(t===90||t===122)return Z(e,e.s.slice(r,++e.p),1,i,r,`[+00:00]`);if(t===43||t===45)return Z(e,e.s.slice(r,e.p+=6),1,i,r,!e.ld&&`[`+e.s.slice(e.p-6,e.p)+`]`)}return Z(e,e.s.slice(r,e.p),2,i,r)}function ar(e,t,n){let r=e.p;if(!X(t)||!X(e.s.charCodeAt(++e.p)))return tr(e,--e.p,t,0,n);if(e.s.charCodeAt(e.p+=4)===58&&(e.p+=3),e.s.charCodeAt(e.p)===46)for(;X(e.s.charCodeAt(++e.p)););return Z(e,e.s.slice(r,e.p),4,!1,r)}function Z(e,t,n,r,i,a){if(e.ld){let a=new Qn(t,n,r);return a.isValid()||Y.x(`invalid date`,e,i),a}try{switch(a&&(t+=a),n){case 1:return Temporal.ZonedDateTime.from(t);case 2:return Temporal.PlainDateTime.from(t);case 3:return Temporal.PlainDate.from(t);case 4:return Temporal.PlainTime.from(t)}}catch(t){Y.x(t instanceof Error?t.message:``+t,e,i)}}
175
+ function X(e,t=10){return t===16?e>47&&e<58||e>64&&e<71||e>96&&e<103:e>47&&e<48+t}function tr(e,t){return e===32||e===9||e===10||e===13||t&&(e===t||e===44)||e===35}function nr(e,t){let n=e.p,r=e.s.charCodeAt(e.p);if(r===91||r===123){e.d--||Y.x(`document contains excessively nested structures. aborting.`,e);let t=r===91?dr(e):ur(e);return e.d++,t}return r===34||r===39?Qn(e):r===116?((e.s.charCodeAt(++e.p)!==114||e.s.charCodeAt(++e.p)!==117||e.s.charCodeAt(++e.p)!==101)&&Y.x(`invalid value`,e,n),e.p++,!0):r===102?((e.s.charCodeAt(++e.p)!==97||e.s.charCodeAt(++e.p)!==108||e.s.charCodeAt(++e.p)!==115||e.s.charCodeAt(++e.p)!==101)&&Y.x(`invalid value`,e,n),e.p++,!1):r===43||r===45?rr(e,e.p,e.s.charCodeAt(++e.p),44-r,t):e.s.charCodeAt(e.p+4)===45&&e.s.charCodeAt(e.p+7)===45?or(e,r,t):e.s.charCodeAt(e.p+2)===58?sr(e,r,t):rr(e,e.p,r,0,t)}function rr(e,t,n,r,i){let a=n,o=0,s=!1;if(a===105)return(e.s.charCodeAt(++e.p)!==110||e.s.charCodeAt(++e.p)!==102)&&Y.x(`invalid value`,e,t),e.p++,(r||1)/0;if(a===110)return(e.s.charCodeAt(++e.p)!==97||e.s.charCodeAt(++e.p)!==110)&&Y.x(`invalid value`,e,t),e.p++,NaN;if(a===48){if(++e.p>=e.s.length||tr(a=e.s.charCodeAt(e.p),i))return e.bi===!0?0n:0;if(!r){if(a===120)return ir(e,t,16,i);if(a===98)return ir(e,t,2,i);if(a===111)return ir(e,t,8,i)}a===46?o=2:a===101||a===69?o=4:Y.x(`illegal leading zero`,e,t)}else X(a)||Y.x(`invalid value`,e,t);for(;++e.p<e.s.length&&(a=e.s.charCodeAt(e.p),!tr(a,i));)o||=1,a===95?(o&1||Y.x(`illegal underscore`,e),o+=11,s=!0):o===1&&a===46?o=2:(o===1||o===3)&&(a===101||a===69)?o=4:o===4&&(a===43||a===45)?o=6:X(a)?o>9?o-=11:o&1||o++:Y.x(`illegal character in numeric literal`,e);if(!o){let t=(n-48)*(r||1);return e.bi===!0?BigInt(t):t}o&1||Y.x(`unfinished numeric value`,e,t);let c=e.s.slice(t,e.p);return s&&(c=c.replaceAll(`_`,``)),o>1?parseFloat(c):ar(e,c,10,t)}function ir(e,t,n,r){let i,a=1;for(;++e.p<e.s.length&&(i=e.s.charCodeAt(e.p),!tr(i,r));)i===95?(a&1&&Y.x(`illegal underscore`,e),a=3):X(i,n)?a&1&&a--:Y.x(`illegal character in numeric literal`,e);a&1&&Y.x(`unfinished numeric value`,e);let o=e.s.slice(t+2,e.p);return a&&(o=o.replaceAll(`_`,``)),ar(e,o,n,t)}function ar(e,t,n,r){if(e.bi!==!0)int:{let i=parseInt(t,n);if(!Number.isSafeInteger(i)){if(e.bi)break int;Y.x(`integer value cannot be represented losslessly`,e,r)}return i}return BigInt(n===10?t:(n===2?`0b`:n===8?`0o`:`0x`)+t)}function or(e,t,n){let r=e.p++,i;if(!X(t)||!X(e.s.charCodeAt(e.p++))||!X(e.s.charCodeAt(e.p++))||!X(e.s.charCodeAt(e.p++)))return rr(e,e.p=r,t,0,n);if(e.p+=5,X(e.s.charCodeAt(e.p++))||Y.x(`invalid date-time: date part is malformed`,e,r),e.p>=e.s.length||((t=e.s.charCodeAt(e.p))!==32||(i=!0,!X(e.s.charCodeAt(e.p+1))))&&t!==84&&t!==116)return Z(e,e.s.slice(r,e.p),3,!1,r);if(e.s.charCodeAt(e.p+=3)!==58&&Y.x(`invalid date-time: time part is malformed`,e,r),e.s.charCodeAt(e.p+=3)===58&&(e.p+=3),e.s.charCodeAt(e.p)===46)for(;X(e.s.charCodeAt(++e.p)););if(t=e.s.charCodeAt(e.p)){if(t===90||t===122)return Z(e,e.s.slice(r,++e.p),1,i,r,`[+00:00]`);if(t===43||t===45)return Z(e,e.s.slice(r,e.p+=6),1,i,r,!e.ld&&`[`+e.s.slice(e.p-6,e.p)+`]`)}return Z(e,e.s.slice(r,e.p),2,i,r)}function sr(e,t,n){let r=e.p;if(!X(t)||!X(e.s.charCodeAt(++e.p)))return rr(e,--e.p,t,0,n);if(e.s.charCodeAt(e.p+=4)===58&&(e.p+=3),e.s.charCodeAt(e.p)===46)for(;X(e.s.charCodeAt(++e.p)););return Z(e,e.s.slice(r,e.p),4,!1,r)}function Z(e,t,n,r,i,a){if(e.ld){let a=new er(t,n,r);return a.isValid()||Y.x(`invalid date`,e,i),a}try{switch(a&&(t+=a),n){case 1:return Temporal.ZonedDateTime.from(t);case 2:return Temporal.PlainDateTime.from(t);case 3:return Temporal.PlainDate.from(t);case 4:return Temporal.PlainTime.from(t)}}catch(t){Y.x(t instanceof Error?t.message:``+t,e,i)}}
176
176
  /*!
177
177
  * Copyright (c) Squirrel Chat et al., All rights reserved.
178
178
  * SPDX-License-Identifier: BSD-3-Clause
@@ -200,7 +200,7 @@ function X(e,t=10){return t===16?e>47&&e<58||e>64&&e<71||e>96&&e<103:e>47&&e<48+
200
200
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
201
201
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
202
202
  */
203
- function or(e){for(;e.p<e.s.length;e.p++){let t=e.s.charCodeAt(e.p);if(t===10)break;if(t===13&&e.s.charCodeAt(e.p+1)===10){e.p++;break}(t<32&&t!==9||t===127)&&Y.x(`control characters are not allowed in comments`,e)}}function Q(e,t,n){let r;for(;e.p<e.s.length;){for(;e.p<e.s.length&&((r=e.s.charCodeAt(e.p))===32||r===9||!t&&(r===10||r===13&&e.s.charCodeAt(e.p+1)===10));)e.p++;if(n||r!==35)break;or(e)}}
203
+ function cr(e){for(;e.p<e.s.length;e.p++){let t=e.s.charCodeAt(e.p);if(t===10)break;if(t===13&&e.s.charCodeAt(e.p+1)===10){e.p++;break}(t<32&&t!==9||t===127)&&Y.x(`control characters are not allowed in comments`,e)}}function Q(e,t,n){let r;for(;e.p<e.s.length;){for(;e.p<e.s.length&&((r=e.s.charCodeAt(e.p))===32||r===9||!t&&(r===10||r===13&&e.s.charCodeAt(e.p+1)===10));)e.p++;if(n||r!==35)break;cr(e)}}
204
204
  /*!
205
205
  * Copyright (c) Squirrel Chat et al., All rights reserved.
206
206
  * SPDX-License-Identifier: BSD-3-Clause
@@ -228,7 +228,7 @@ function or(e){for(;e.p<e.s.length;e.p++){let t=e.s.charCodeAt(e.p);if(t===10)br
228
228
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
229
229
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
230
230
  */
231
- function sr(e,t=61){let n,r=0,i=[],a,o=e.s.charCodeAt(n=e.p);do if(o===t)return r||Y.x(`unexpected end of key`,e),r===1&&i.push(e.s.slice(a,e.p)),e.p++,i;else o===46?(r||Y.x(`illegal empty bare key`,e),r===1&&i.push(e.s.slice(a,e.p)),r=0):!r&&(o===34||o===39)?(o===e.s.charCodeAt(e.p+1)&&o===e.s.charCodeAt(e.p+2)&&Y.x(`illegal quoted key: multiline strings are not allowed`,e),i.push(Xn(e)),r=2,e.p--):o===32||o===9?r===1&&(i.push(e.s.slice(a,e.p)),r=2):r===2||o<48&&o!==45||o>57&&o<65||o>90&&o<97&&o!==95||o>122?Y.x(`illegal character in key`,e):r||(r=1,a=e.p);while(o=e.s.charCodeAt(++e.p));Y.x(`incomplete key-value: cannot find end of key`,e,n)}function cr(e){let t=e.p++,n=Object.create(null),r=/* @__PURE__ */ new Set,i;for(;e.p<e.s.length;){if(Q(e),(i=e.s.charCodeAt(e.p))===125)return e.p++,n;let t,a=n,o=!1,s=e.p,c=sr(e);for(let n=0;n<c.length;n++){n&&(a=o?a[t]:a[t]=Object.create(null)),t=c[n],(o=Object.hasOwn(a,t))&&(typeof a[t]!=`object`||r.has(a[t]))&&Y.x(`trying to redefine an already defined value`,e,s);let i=t===`__proto__`;if(e.uk&&(i||t===`constructor`)){a=e.uk!==1&&Y.x(`document contains an unsafe property`,e,s);break}!o&&i&&Object.defineProperty(a,t,{enumerable:!0,configurable:!0,writable:!0})}o&&Y.x(`trying to redefine an already defined value`,e,s),Q(e,!0,!0);let l=er(e,125);if(a&&typeof(a[t]=l)==`object`&&r.add(l),Q(e),(i=e.s.charCodeAt(e.p++))===125)return n;i!==44&&Y.x(`expected comma or end of structure`,e,e.p-1)}Y.x(`unfinished table`,e,t)}function lr(e){let t=e.p++,n=[],r;for(;e.p<e.s.length;){if(Q(e),(r=e.s.charCodeAt(e.p))===93)return e.p++,n;if(n.push(er(e,93)),Q(e),(r=e.s.charCodeAt(e.p++))===93)return n;r!==44&&Y.x(`expected comma or end of structure`,e,e.p-1)}Y.x(`unfinished array`,e,t)}
231
+ function lr(e,t=61){let n,r=0,i=[],a,o=e.s.charCodeAt(n=e.p);do if(o===t)return r||Y.x(`unexpected end of key`,e),r===1&&i.push(e.s.slice(a,e.p)),e.p++,i;else o===46?(r||Y.x(`illegal empty bare key`,e),r===1&&i.push(e.s.slice(a,e.p)),r=0):!r&&(o===34||o===39)?(o===e.s.charCodeAt(e.p+1)&&o===e.s.charCodeAt(e.p+2)&&Y.x(`illegal quoted key: multiline strings are not allowed`,e),i.push(Qn(e)),r=2,e.p--):o===32||o===9?r===1&&(i.push(e.s.slice(a,e.p)),r=2):r===2||o<48&&o!==45||o>57&&o<65||o>90&&o<97&&o!==95||o>122?Y.x(`illegal character in key`,e):r||(r=1,a=e.p);while(o=e.s.charCodeAt(++e.p));Y.x(`incomplete key-value: cannot find end of key`,e,n)}function ur(e){let t=e.p++,n=Object.create(null),r=/* @__PURE__ */ new Set,i;for(;e.p<e.s.length;){if(Q(e),(i=e.s.charCodeAt(e.p))===125)return e.p++,n;let t,a=n,o=!1,s=e.p,c=lr(e);for(let n=0;n<c.length;n++){n&&(a=o?a[t]:a[t]=Object.create(null)),t=c[n],(o=Object.hasOwn(a,t))&&(typeof a[t]!=`object`||r.has(a[t]))&&Y.x(`trying to redefine an already defined value`,e,s);let i=t===`__proto__`;if(e.uk&&(i||t===`constructor`)){a=e.uk!==1&&Y.x(`document contains an unsafe property`,e,s);break}!o&&i&&Object.defineProperty(a,t,{enumerable:!0,configurable:!0,writable:!0})}o&&Y.x(`trying to redefine an already defined value`,e,s),Q(e,!0,!0);let l=nr(e,125);if(a&&typeof(a[t]=l)==`object`&&r.add(l),Q(e),(i=e.s.charCodeAt(e.p++))===125)return n;i!==44&&Y.x(`expected comma or end of structure`,e,e.p-1)}Y.x(`unfinished table`,e,t)}function dr(e){let t=e.p++,n=[],r;for(;e.p<e.s.length;){if(Q(e),(r=e.s.charCodeAt(e.p))===93)return e.p++,n;if(n.push(nr(e,93)),Q(e),(r=e.s.charCodeAt(e.p++))===93)return n;r!==44&&Y.x(`expected comma or end of structure`,e,e.p-1)}Y.x(`unfinished array`,e,t)}
232
232
  /*!
233
233
  * Copyright (c) Squirrel Chat et al., All rights reserved.
234
234
  * SPDX-License-Identifier: BSD-3-Clause
@@ -256,7 +256,7 @@ function sr(e,t=61){let n,r=0,i=[],a,o=e.s.charCodeAt(n=e.p);do if(o===t)return
256
256
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
257
257
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
258
258
  */
259
- function ur(e,t,n,r,i){let a=n,o=r,s,c=!1,l;for(let n=0;n<t.length;n++){if(n){if(a=c?a[s]:a[s]=Object.create(null),o=(l=o[s]).c,i===0&&(l.t===1||l.t===2))return null;if(l.t===2){let e=a.length-1;a=a[e],o=o[e].c}}if(s=t[n],(c=Object.hasOwn(a,s))&&o[s]?.t===0&&o[s]?.d)return null;if(!c){let r=s===`__proto__`;if(e.uk&&(r||s===`constructor`))return!1;r&&(Object.defineProperty(a,s,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(o,s,{enumerable:!0,configurable:!0,writable:!0})),o[s]={t:n<t.length-1&&i===2?3:i,d:!1,i:0,c:Object.create(null)}}}if(l=o[s],l.t!==i&&(i!==1||l.t!==3)||(i===2&&(l.d||(l.d=!0,a[s]=[]),a[s].push(a=Object.create(null)),l.c[l.i++]=l={t:1,d:!1,i:0,c:Object.create(null)}),l.d))return null;if(l.d=!0,i===1)a=c?a[s]:a[s]=Object.create(null);else if(i===0&&c)return null;return[s,a,l.c]}function dr(e,t,n){(t===null||e.uk===2)&&Y.x(t===null?`trying to redefine an already defined table or value`:`document contains an unsafe property`,e,n)}function fr(e,t={}){let n={s:e,p:0,d:t.maxDepth??1e3,bi:t.integersAsBigInt??!1,ld:t.useLegacyDate??!0,uk:t.unsafeKeyBehaviour===`throw`?2:+(t.unsafeKeyBehaviour===`drop`)},r=Object.create(null),i=Object.create(null),a,o=!1,s=r,c=i;for(e.charCodeAt(0)===65279&&n.p++,Q(n);n.p<e.length;){if(e.charCodeAt(n.p)===91){let t=e.charCodeAt(++n.p)===91;a=n.p+=+t,o=!1;let l=sr(n,93);t&&(e.charCodeAt(n.p)!==93&&Y.x(`expected end of table array declaration`,n),n.p++);let u=ur(n,l,r,i,t?2:1);u?(c=u[2],s=u[1]):(dr(n,u,a),o=!0)}else{a=n.p;let e=ur(n,sr(n),s,c,0);!e&&!o&&dr(n,e,a),Q(n,!0,!0);let t=er(n,void 0);e&&!o&&(e[1][e[0]]=t)}Q(n,!0),n.p<e.length&&(a=e.charCodeAt(n.p))!==10&&(a!==13||e.charCodeAt(n.p+1)!==10)&&Y.x(`each key-value declaration must be followed by an end-of-line`,n),Q(n)}return r}
259
+ function fr(e,t,n,r,i){let a=n,o=r,s,c=!1,l;for(let n=0;n<t.length;n++){if(n){if(a=c?a[s]:a[s]=Object.create(null),o=(l=o[s]).c,i===0&&(l.t===1||l.t===2))return null;if(l.t===2){let e=a.length-1;a=a[e],o=o[e].c}}if(s=t[n],(c=Object.hasOwn(a,s))&&o[s]?.t===0&&o[s]?.d)return null;if(!c){let r=s===`__proto__`;if(e.uk&&(r||s===`constructor`))return!1;r&&(Object.defineProperty(a,s,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(o,s,{enumerable:!0,configurable:!0,writable:!0})),o[s]={t:n<t.length-1&&i===2?3:i,d:!1,i:0,c:Object.create(null)}}}if(l=o[s],l.t!==i&&(i!==1||l.t!==3)||(i===2&&(l.d||(l.d=!0,a[s]=[]),a[s].push(a=Object.create(null)),l.c[l.i++]=l={t:1,d:!1,i:0,c:Object.create(null)}),l.d))return null;if(l.d=!0,i===1)a=c?a[s]:a[s]=Object.create(null);else if(i===0&&c)return null;return[s,a,l.c]}function pr(e,t,n){(t===null||e.uk===2)&&Y.x(t===null?`trying to redefine an already defined table or value`:`document contains an unsafe property`,e,n)}function mr(e,t={}){let n={s:e,p:0,d:t.maxDepth??1e3,bi:t.integersAsBigInt??!1,ld:t.useLegacyDate??!0,uk:t.unsafeKeyBehaviour===`throw`?2:+(t.unsafeKeyBehaviour===`drop`)},r=Object.create(null),i=Object.create(null),a,o=!1,s=r,c=i;for(e.charCodeAt(0)===65279&&n.p++,Q(n);n.p<e.length;){if(e.charCodeAt(n.p)===91){let t=e.charCodeAt(++n.p)===91;a=n.p+=+t,o=!1;let l=lr(n,93);t&&(e.charCodeAt(n.p)!==93&&Y.x(`expected end of table array declaration`,n),n.p++);let u=fr(n,l,r,i,t?2:1);u?(c=u[2],s=u[1]):(pr(n,u,a),o=!0)}else{a=n.p;let e=fr(n,lr(n),s,c,0);!e&&!o&&pr(n,e,a),Q(n,!0,!0);let t=nr(n,void 0);e&&!o&&(e[1][e[0]]=t)}Q(n,!0),n.p<e.length&&(a=e.charCodeAt(n.p))!==10&&(a!==13||e.charCodeAt(n.p+1)!==10)&&Y.x(`each key-value declaration must be followed by an end-of-line`,n),Q(n)}return r}
260
260
  /*!
261
261
  * Copyright (c) Squirrel Chat et al., All rights reserved.
262
262
  * SPDX-License-Identifier: BSD-3-Clause
@@ -312,12 +312,12 @@ function ur(e,t,n,r,i){let a=n,o=r,s,c=!1,l;for(let n=0;n<t.length;n++){if(n){if
312
312
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
313
313
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
314
314
  */
315
- const $=(/* @__PURE__ */ Pn((/* @__PURE__ */ Cn()).check(qn({title:`language`})),(/* @__PURE__ */ Cn()).check(J(`translation for a BCP 47 language tag, e.g. "en", "en-US"`)))).check(qn({id:`LocString`,description:`maps language tag -> translation`}));function pr(e){for(let t of navigator.languages){let n=t.split(`-`);for(let t=n.length;t>0;t--){let r=e[n.slice(0,t).join(`-`)];if(r!==void 0)return r}}return Object.values(e)[0]??``}const mr={en:`next`,es:`siguiente`,pt:`próximo`,fr:`suivant`,de:`weiter`,it:`successivo`,nl:`volgende`,pl:`następna`,ru:`следующий`,uk:`наступний`,tr:`sonraki`,ar:`التالي`,hi:`अगला`,bn:`পরবর্তী`,id:`berikutnya`,vi:`tiếp theo`,th:`ถัดไป`,ja:`次へ`,ko:`다음`,zh:`下一个`,"zh-TW":`下一個`},hr={en:`previous`,es:`anterior`,pt:`anterior`,fr:`précédent`,de:`zurück`,it:`precedente`,nl:`vorige`,pl:`poprzednia`,ru:`предыдущий`,uk:`попередній`,tr:`önceki`,ar:`السابق`,hi:`पिछला`,bn:`পূর্ববর্তী`,id:`sebelumnya`,vi:`trước`,th:`ก่อนหน้า`,ja:`前へ`,ko:`이전`,zh:`上一个`,"zh-TW":`上一個`},gr={en:`random`,es:`aleatorio`,pt:`aleatório`,fr:`aléatoire`,de:`zufällig`,it:`casuale`,nl:`willekeurig`,pl:`losowa`,ru:`случайный`,uk:`випадковий`,tr:`rastgele`,ar:`عشوائي`,hi:`रैंडम`,bn:`এলোমেলো`,id:`acak`,vi:`ngẫu nhiên`,th:`สุ่ม`,ja:`ランダム`,ko:`무작위`,zh:`随机`,"zh-TW":`隨機`},_r={en:`loading`,es:`cargando`,pt:`carregando`,fr:`chargement`,de:`lädt`,it:`caricamento`,nl:`laden`,pl:`ładowanie`,ru:`загрузка`,uk:`завантаження`,tr:`yükleniyor`,ar:`جارٍ التحميل`,hi:`लोड हो रहा है`,bn:`লোড হচ্ছে`,id:`memuat`,vi:`đang tải`,th:`กำลังโหลด`,ja:`読み込み中`,ko:`로딩 중`,zh:`加载中`,"zh-TW":`載入中`},vr={en:`error`,es:`error`,pt:`erro`,fr:`erreur`,de:`fehler`,it:`errore`,nl:`fout`,pl:`błąd`,ru:`ошибка`,uk:`помилка`,tr:`hata`,ar:`خطأ`,hi:`त्रुटि`,bn:`ত্রুটি`,id:`kesalahan`,vi:`lỗi`,th:`ข้อผิดพลาด`,ja:`エラー`,ko:`오류`,zh:`错误`,"zh-TW":`錯誤`};function yr(e){throw Error(`reached impossible variant: ${e}`)}
315
+ const $=(/* @__PURE__ */ In((/* @__PURE__ */ Tn()).check(Yn({title:`language`})),(/* @__PURE__ */ Tn()).check(J(`translation for a BCP 47 language tag, e.g. "en", "en-US"`)))).check(Yn({id:`LocString`,description:`maps language tag -> translation`}));function hr(e){for(let t of navigator.languages){let n=t.split(`-`);for(let t=n.length;t>0;t--){let r=e[n.slice(0,t).join(`-`)];if(r!==void 0)return r}}return Object.values(e)[0]??``}const gr={en:`next`,es:`siguiente`,pt:`próximo`,fr:`suivant`,de:`weiter`,it:`successivo`,nl:`volgende`,pl:`następna`,ru:`следующий`,uk:`наступний`,tr:`sonraki`,ar:`التالي`,hi:`अगला`,bn:`পরবর্তী`,id:`berikutnya`,vi:`tiếp theo`,th:`ถัดไป`,ja:`次へ`,ko:`다음`,zh:`下一个`,"zh-TW":`下一個`},_r={en:`previous`,es:`anterior`,pt:`anterior`,fr:`précédent`,de:`zurück`,it:`precedente`,nl:`vorige`,pl:`poprzednia`,ru:`предыдущий`,uk:`попередній`,tr:`önceki`,ar:`السابق`,hi:`पिछला`,bn:`পূর্ববর্তী`,id:`sebelumnya`,vi:`trước`,th:`ก่อนหน้า`,ja:`前へ`,ko:`이전`,zh:`上一个`,"zh-TW":`上一個`},vr={en:`random`,es:`aleatorio`,pt:`aleatório`,fr:`aléatoire`,de:`zufällig`,it:`casuale`,nl:`willekeurig`,pl:`losowa`,ru:`случайный`,uk:`випадковий`,tr:`rastgele`,ar:`عشوائي`,hi:`रैंडम`,bn:`এলোমেলো`,id:`acak`,vi:`ngẫu nhiên`,th:`สุ่ม`,ja:`ランダム`,ko:`무작위`,zh:`随机`,"zh-TW":`隨機`},yr={en:`loading`,es:`cargando`,pt:`carregando`,fr:`chargement`,de:`lädt`,it:`caricamento`,nl:`laden`,pl:`ładowanie`,ru:`загрузка`,uk:`завантаження`,tr:`yükleniyor`,ar:`جارٍ التحميل`,hi:`लोड हो रहा है`,bn:`লোড হচ্ছে`,id:`memuat`,vi:`đang tải`,th:`กำลังโหลด`,ja:`読み込み中`,ko:`로딩 중`,zh:`加载中`,"zh-TW":`載入中`},br={en:`error`,es:`error`,pt:`erro`,fr:`erreur`,de:`fehler`,it:`errore`,nl:`fout`,pl:`błąd`,ru:`ошибка`,uk:`помилка`,tr:`hata`,ar:`خطأ`,hi:`त्रुटि`,bn:`ত্রুটি`,id:`kesalahan`,vi:`lỗi`,th:`ข้อผิดพลาด`,ja:`エラー`,ko:`오류`,zh:`错误`,"zh-TW":`錯誤`};function xr(e){throw Error(`reached impossible variant: ${e}`)}
316
316
  /**
317
317
  * @license
318
318
  * Copyright 2020 Google LLC
319
319
  * SPDX-License-Identifier: BSD-3-Clause
320
- */const{I:br}=Me,xr=(e,t)=>t===void 0?e?._$litType$!==void 0:e?._$litType$===t;function Sr(e,t){let n=pr(e).split(/\{\{\s*(\w+)\s*\}\}/).map((e,n)=>{if(n%2==1){let n=Object.hasOwn(t,e)?t[e]:void 0;return xr(n)?n:typeof n==`object`?pr(n):n===void 0?(console.error(`[fairy-ring] unknown template key:`,e),D):n}return e});return T`${n}`}const Cr=/* @__PURE__ */ En({protocol:/^https?$/}),wr=(/* @__PURE__ */ An({url:Cr.check(J(`where to link to`)),scope:(/* @__PURE__ */ In([`host`,`path`])).check(J(`what part of this link does the site own? "host": all of my.example.com. "path": just sub-paths of my.example.com/path, not my.example.com/other`))})).check(qn({id:`Site`})),Tr=/* @__PURE__ */ An({configVersion:(/* @__PURE__ */ Mn([/* @__PURE__ */ Rn(1)])).check(J(`config schema version`)),name:(/* @__PURE__ */ Kn($)).check(J(`name of this webring. include in a string with {{name}}.`)),homeText:(/* @__PURE__ */ Hn($,{und:`{{name}}`})).check(J(`text that links to the homepage. defaults to "{{name}}".`)),homeUrl:(/* @__PURE__ */ Bn(Cr)).check(J(`a homepage for the webring, if one exists`)),sites:(/* @__PURE__ */ On(wr)).check(J(`list sites in the webring`)),strings:(/* @__PURE__ */ Wn((/* @__PURE__ */ An({next:(/* @__PURE__ */ Hn($,mr)).check(J(`link to the next site`)),previous:(/* @__PURE__ */ Hn($,hr)).check(J(`link to the previous site`)),random:(/* @__PURE__ */ Hn($,gr)).check(J(`link to a random site`))})).check(qn({id:`Strings`})),{})).check(J(`overrides for built-in translations`))});async function Er({url:e,init:t}){let n=await fetch(e,t);if(!n.ok)throw Error(`fetchConfig response error ${n.status}: ${await n.text()}`);let r=fr(await n.text());return Tr.parse(r)}async function Dr(e,t=console.error){try{return await e}catch(e){throw e instanceof vt?t(`[fairy-ring] invalid config:`,bt(e)):t(`[fairy-ring] error loading config:`,e),e}}function Or(e){let t=new URL(document.baseURI),n=e.sites.findIndex(e=>{let n=new URL(e.url);switch(e.scope){case`host`:return n.host.toLowerCase()===t.host.toLowerCase();case`path`:return n.host.toLowerCase()===t.host.toLowerCase()&&n.pathname===t.pathname;default:yr(e.scope)}});return n<0?null:[e.sites[n],n]}function kr(e,t){return(e%t+t)%t}function Ar(e){let t=Or(e);return t?e.sites[kr(t[1]+1,e.sites.length)]:null}function jr(e){let t=Or(e);return t?e.sites[kr(t[1]-1,e.sites.length)]:null}function Mr(e){if(e.sites.length===0)return null;if(e.sites.length===1)return e.sites[0];let[t,n=0]=Or(e)??[],r=0;for(let t=0;r===n&&t<10;++t)r=Math.floor(Math.random()*e.sites.length);return e.sites[r]}function Nr(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}var Pr=class extends M{static{this.styles=o`
320
+ */const{I:Sr}=Ne,Cr=(e,t)=>t===void 0?e?._$litType$!==void 0:e?._$litType$===t;function wr(e,t){let n=hr(e).split(/\{\{\s*(\w+)\s*\}\}/).map((e,n)=>{if(n%2==1){let n=Object.hasOwn(t,e)?t[e]:void 0;return Cr(n)?n:typeof n==`object`?hr(n):n===void 0?(console.error(`[fairy-ring] unknown template key:`,e),E):n}return e});return w`${n}`}const Tr=/* @__PURE__ */ On({protocol:/^https?$/}),Er=(/* @__PURE__ */ Mn({url:Tr.check(J(`where to link to`)),scope:(/* @__PURE__ */ Rn([`host`,`path`])).check(J(`what part of this link does the site own? "host": all of my.example.com. "path": just sub-paths of my.example.com/path, not my.example.com/other`))})).check(Yn({id:`Site`})),Dr=/* @__PURE__ */ Mn({configVersion:(/* @__PURE__ */ Pn([/* @__PURE__ */ Bn(1)])).check(J(`config schema version`)),name:(/* @__PURE__ */ Jn($)).check(J(`name of this webring. include in a string with {{name}}.`)),homeText:(/* @__PURE__ */ Wn($,{und:`{{name}}`})).check(J(`text that links to the homepage. defaults to "{{name}}".`)),homeUrl:(/* @__PURE__ */ Hn(Tr)).check(J(`a homepage for the webring, if one exists`)),sites:(/* @__PURE__ */ An(Er)).check(J(`list sites in the webring`)),strings:(/* @__PURE__ */ Kn((/* @__PURE__ */ Mn({next:(/* @__PURE__ */ Wn($,gr)).check(J(`link to the next site`)),previous:(/* @__PURE__ */ Wn($,_r)).check(J(`link to the previous site`)),random:(/* @__PURE__ */ Wn($,vr)).check(J(`link to a random site`))})).check(Yn({id:`Strings`})),{})).check(J(`overrides for built-in translations`))});async function Or({url:e,init:t}){let n=await fetch(e,t);if(!n.ok)throw Error(`fetchConfig response error ${n.status}: ${await n.text()}`);let r=mr(await n.text());return Dr.parse(r)}async function kr(e,t=console.error){try{return await e}catch(e){throw e instanceof xt?t(`[fairy-ring] invalid config:`,Ct(e)):t(`[fairy-ring] error loading config:`,e),e}}function Ar(e){let t=new URL(document.baseURI),n=e.sites.findIndex(e=>{let n=new URL(e.url);switch(e.scope){case`host`:return n.host.toLowerCase()===t.host.toLowerCase();case`path`:return n.host.toLowerCase()===t.host.toLowerCase()&&n.pathname===t.pathname;default:xr(e.scope)}});return n<0?null:[e.sites[n],n]}function jr(e,t){return(e%t+t)%t}function Mr(e){let t=Ar(e);return t?e.sites[jr(t[1]+1,e.sites.length)]:null}function Nr(e){let t=Ar(e);return t?e.sites[jr(t[1]-1,e.sites.length)]:null}function Pr(e){if(e.sites.length===0)return null;if(e.sites.length===1)return e.sites[0];let[t,n=0]=Ar(e)??[],r=0;for(let t=0;r===n&&t<10;++t)r=Math.floor(Math.random()*e.sites.length);return e.sites[r]}function Fr(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}var Ir=class extends j{static{this.styles=o`
321
321
  :host {
322
322
  display: grid;
323
323
  grid-template-areas: "prev home random next";
@@ -351,17 +351,17 @@ const $=(/* @__PURE__ */ Pn((/* @__PURE__ */ Cn()).check(qn({title:`language`}))
351
351
  a {
352
352
  color: inherit;
353
353
  }
354
- `}#e=new oe(this,{args:()=>[this.configUrl],task:async([e],{signal:t})=>{if(!e)throw Error(`missing config-url`);return Dr(Er({url:e,init:{signal:t}}))}});render(){return T`
355
- ${this.#e.render({pending:()=>T`<div part="loading">${Sr(_r,{})}</div>`,error:()=>T`<div part="error">${Sr(vr,{})}</div>`,complete:e=>{let t=t=>Sr(t,{name:e.name});return T`
356
- <a part="prev link widget" rel="prev" href=${jr(e)?.url??``}
354
+ `}#e=new se(this,{args:()=>[this.configUrl],task:async([e],{signal:t})=>{if(!e)throw Error(`missing config-url`);return kr(Or({url:e,init:{signal:t}}))}});render(){return w`
355
+ ${this.#e.render({pending:()=>w`<div part="loading">${wr(yr,{})}</div>`,error:()=>w`<div part="error">${wr(br,{})}</div>`,complete:e=>{let t=t=>wr(t,{name:e.name});return w`
356
+ <a part="prev link widget" rel="prev" href=${Nr(e)?.url??``}
357
357
  >${t(e.strings.previous)}</a
358
358
  >
359
- ${e.homeUrl?T`<a part="home link widget" href=${e.homeUrl}>${t(e.homeText)}</a>`:T`<div part="home widget">${t(e.homeText)}</div>`}
360
- <a part="random link widget" href=${Mr(e)?.url??``}
359
+ ${e.homeUrl?w`<a part="home link widget" href=${e.homeUrl}>${t(e.homeText)}</a>`:w`<div part="home widget">${t(e.homeText)}</div>`}
360
+ <a part="random link widget" href=${Pr(e)?.url??``}
361
361
  >${t(e.strings.random)}</a
362
362
  >
363
- <a part="next link widget" rel="next" href=${Ar(e)?.url??``}
363
+ <a part="next link widget" rel="next" href=${Mr(e)?.url??``}
364
364
  >${t(e.strings.next)}</a
365
365
  >
366
366
  `}})}
367
- `}};Nr([Le({attribute:`config-url`})],Pr.prototype,`configUrl`,void 0);function Fr(e=`fairy-ring`){customElements.get(e)||customElements.define(e,Pr)}Fr();export{Pr as FairyRingElement,Fr as define};
367
+ `}};Fr([Be({attribute:`config-url`})],Ir.prototype,`configUrl`,void 0);function Lr(e=`fairy-ring`){customElements.get(e)||customElements.define(e,Ir)}Lr();export{Ir as FairyRingElement,Lr as define};
package/dist/vue.js CHANGED
@@ -1,5 +1,5 @@
1
+ import { n as define } from "./element-Bz4Q7JFB.js";
1
2
  import { defineComponent, h } from "vue";
2
- import { n as define } from "./element-CvyhlWFr.js";
3
3
  // src/vue.ts
4
4
  const FairyRing = defineComponent(() => {
5
5
  define();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fairy-ring",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "repository": {
@@ -15,10 +15,6 @@
15
15
  "./dist/standalone.js"
16
16
  ],
17
17
  "exports": {
18
- ".": {
19
- "types": "./dist/index.d.ts",
20
- "default": "./dist/index.js"
21
- },
22
18
  "./element": {
23
19
  "types": "./dist/element.d.ts",
24
20
  "default": "./dist/element.js"
@@ -62,7 +58,7 @@
62
58
  "oxlint": "^1.94.0",
63
59
  "playwright": "^1.65.1",
64
60
  "react": "^19.3.1",
65
- "solid-js": "^2.0.1",
61
+ "solid-js": "^2.0.0",
66
62
  "storybook": "^10.6.7",
67
63
  "tsdown": "^0.23.7",
68
64
  "typescript": "7.1.0-beta",
package/dist/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export interface FairyRingOptions {}
package/dist/index.js DELETED
File without changes
@@ -1,6 +1,6 @@
1
+ import { html, nothing } from "lit";
1
2
  import * as z from "zod/v4-mini";
2
3
  import { parse } from "smol-toml";
3
- import { html, nothing } from "lit";
4
4
  import { isTemplateResult } from "lit/directive-helpers.js";
5
5
  // src/strings.ts
6
6
  const locStringSchema = z.record(z.string().check(z.meta({ title: "language" })), z.string().check(z.describe("translation for a BCP 47 language tag, e.g. \"en\", \"en-US\""))).check(z.meta({