From 116a556c2f3c0ca417101811763256060af9cc4e Mon Sep 17 00:00:00 2001 From: Snider Date: Tue, 14 Apr 2026 23:18:28 +0100 Subject: [PATCH] feat(build): UI surfaces richer discovery + stack settings + Apple/Xcode Cloud + CSS fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ui/src/build-config.ts: surface suggested_stack, distro, git ref/tag/SHA, Linux packages, computed build options, stack-specific settings (build_tags, obfuscation, cache, Deno, NSIS, WebView2, Docker/LinuxKit), Apple/Xcode Cloud config - CSS fixes: colour → color across build-config/artifacts/panel/sdk .ts - pkg/api/ui/dist/core-build.js: rebuilt embedded bundle Verified: npm run build + go test ./... passes Co-Authored-By: Virgil --- pkg/api/ui/dist/core-build.js | 1453 +++++++++++++++++++-------------- ui/src/build-artifacts.ts | 20 +- ui/src/build-config.ts | 427 +++++++++- ui/src/build-panel.ts | 12 +- ui/src/build-sdk.ts | 22 +- 5 files changed, 1282 insertions(+), 652 deletions(-) diff --git a/pkg/api/ui/dist/core-build.js b/pkg/api/ui/dist/core-build.js index bf2a8e1..190a5e1 100644 --- a/pkg/api/ui/dist/core-build.js +++ b/pkg/api/ui/dist/core-build.js @@ -3,18 +3,18 @@ * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const J = globalThis, re = J.ShadowRoot && (J.ShadyCSS === void 0 || J.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, oe = Symbol(), de = /* @__PURE__ */ new WeakMap(); +const Z = globalThis, ae = Z.ShadowRoot && (Z.ShadyCSS === void 0 || Z.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, oe = Symbol(), de = /* @__PURE__ */ new WeakMap(); let we = class { - constructor(e, t, r) { + constructor(e, s, r) { if (this._$cssResult$ = !0, r !== oe) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead."); - this.cssText = e, this.t = t; + this.cssText = e, this.t = s; } get styleSheet() { let e = this.o; - const t = this.t; - if (re && e === void 0) { - const r = t !== void 0 && t.length === 1; - r && (e = de.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), r && de.set(t, e)); + const s = this.t; + if (ae && e === void 0) { + const r = s !== void 0 && s.length === 1; + r && (e = de.get(s)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), r && de.set(s, e)); } return e; } @@ -22,119 +22,119 @@ let we = class { return this.cssText; } }; -const Se = (s) => new we(typeof s == "string" ? s : s + "", void 0, oe), F = (s, ...e) => { - const t = s.length === 1 ? s[0] : e.reduce((r, i, o) => r + ((a) => { - if (a._$cssResult$ === !0) return a.cssText; - if (typeof a == "number") return a; - throw Error("Value passed to 'css' function must be a 'css' function result: " + a + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security."); - })(i) + s[o + 1], s[0]); - return new we(t, s, oe); -}, Pe = (s, e) => { - if (re) s.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet); - else for (const t of e) { - const r = document.createElement("style"), i = J.litNonce; - i !== void 0 && r.setAttribute("nonce", i), r.textContent = t.cssText, s.appendChild(r); +const Pe = (t) => new we(typeof t == "string" ? t : t + "", void 0, oe), V = (t, ...e) => { + const s = t.length === 1 ? t[0] : e.reduce((r, i, a) => r + ((o) => { + if (o._$cssResult$ === !0) return o.cssText; + if (typeof o == "number") return o; + throw Error("Value passed to 'css' function must be a 'css' function result: " + o + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security."); + })(i) + t[a + 1], t[0]); + return new we(s, t, oe); +}, Ce = (t, e) => { + if (ae) t.adoptedStyleSheets = e.map((s) => s instanceof CSSStyleSheet ? s : s.styleSheet); + else for (const s of e) { + const r = document.createElement("style"), i = Z.litNonce; + i !== void 0 && r.setAttribute("nonce", i), r.textContent = s.cssText, t.appendChild(r); } -}, ce = re ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((e) => { - let t = ""; - for (const r of e.cssRules) t += r.cssText; - return Se(t); -})(s) : s; +}, ce = ae ? (t) => t : (t) => t instanceof CSSStyleSheet ? ((e) => { + let s = ""; + for (const r of e.cssRules) s += r.cssText; + return Pe(s); +})(t) : t; /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const { is: Ee, defineProperty: Ce, getOwnPropertyDescriptor: Oe, getOwnPropertyNames: Re, getOwnPropertySymbols: Ue, getPrototypeOf: ze } = Object, S = globalThis, fe = S.trustedTypes, De = fe ? fe.emptyScript : "", ee = S.reactiveElementPolyfillSupport, W = (s, e) => s, Z = { toAttribute(s, e) { +const { is: Ee, defineProperty: Oe, getOwnPropertyDescriptor: De, getOwnPropertyNames: Re, getOwnPropertySymbols: Ue, getPrototypeOf: Te } = Object, C = globalThis, pe = C.trustedTypes, ze = pe ? pe.emptyScript : "", te = C.reactiveElementPolyfillSupport, L = (t, e) => t, X = { toAttribute(t, e) { switch (e) { case Boolean: - s = s ? De : null; + t = t ? ze : null; break; case Object: case Array: - s = s == null ? s : JSON.stringify(s); + t = t == null ? t : JSON.stringify(t); } - return s; -}, fromAttribute(s, e) { - let t = s; + return t; +}, fromAttribute(t, e) { + let s = t; switch (e) { case Boolean: - t = s !== null; + s = t !== null; break; case Number: - t = s === null ? null : Number(s); + s = t === null ? null : Number(t); break; case Object: case Array: try { - t = JSON.parse(s); + s = JSON.parse(t); } catch { - t = null; + s = null; } } - return t; -} }, ae = (s, e) => !Ee(s, e), he = { attribute: !0, type: String, converter: Z, reflect: !1, useDefault: !1, hasChanged: ae }; -Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), S.litPropertyMetadata ?? (S.litPropertyMetadata = /* @__PURE__ */ new WeakMap()); -let T = class extends HTMLElement { + return s; +} }, ne = (t, e) => !Ee(t, e), fe = { attribute: !0, type: String, converter: X, reflect: !1, useDefault: !1, hasChanged: ne }; +Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), C.litPropertyMetadata ?? (C.litPropertyMetadata = /* @__PURE__ */ new WeakMap()); +let j = class extends HTMLElement { static addInitializer(e) { this._$Ei(), (this.l ?? (this.l = [])).push(e); } static get observedAttributes() { return this.finalize(), this._$Eh && [...this._$Eh.keys()]; } - static createProperty(e, t = he) { - 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) { - const r = Symbol(), i = this.getPropertyDescriptor(e, r, t); - i !== void 0 && Ce(this.prototype, e, i); + static createProperty(e, s = fe) { + if (s.state && (s.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(e) && ((s = Object.create(s)).wrapped = !0), this.elementProperties.set(e, s), !s.noAccessor) { + const r = Symbol(), i = this.getPropertyDescriptor(e, r, s); + i !== void 0 && Oe(this.prototype, e, i); } } - static getPropertyDescriptor(e, t, r) { - const { get: i, set: o } = Oe(this.prototype, e) ?? { get() { - return this[t]; - }, set(a) { - this[t] = a; + static getPropertyDescriptor(e, s, r) { + const { get: i, set: a } = De(this.prototype, e) ?? { get() { + return this[s]; + }, set(o) { + this[s] = o; } }; - return { get: i, set(a) { - const d = i == null ? void 0 : i.call(this); - o == null || o.call(this, a), this.requestUpdate(e, d, r); + return { get: i, set(o) { + const c = i == null ? void 0 : i.call(this); + a == null || a.call(this, o), this.requestUpdate(e, c, r); }, configurable: !0, enumerable: !0 }; } static getPropertyOptions(e) { - return this.elementProperties.get(e) ?? he; + return this.elementProperties.get(e) ?? fe; } static _$Ei() { - if (this.hasOwnProperty(W("elementProperties"))) return; - const e = ze(this); + if (this.hasOwnProperty(L("elementProperties"))) return; + const e = Te(this); e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties); } static finalize() { - if (this.hasOwnProperty(W("finalized"))) return; - if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(W("properties"))) { - const t = this.properties, r = [...Re(t), ...Ue(t)]; - for (const i of r) this.createProperty(i, t[i]); + if (this.hasOwnProperty(L("finalized"))) return; + if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(L("properties"))) { + const s = this.properties, r = [...Re(s), ...Ue(s)]; + for (const i of r) this.createProperty(i, s[i]); } const e = this[Symbol.metadata]; if (e !== null) { - const t = litPropertyMetadata.get(e); - if (t !== void 0) for (const [r, i] of t) this.elementProperties.set(r, i); + const s = litPropertyMetadata.get(e); + if (s !== void 0) for (const [r, i] of s) this.elementProperties.set(r, i); } this._$Eh = /* @__PURE__ */ new Map(); - for (const [t, r] of this.elementProperties) { - const i = this._$Eu(t, r); - i !== void 0 && this._$Eh.set(i, t); + for (const [s, r] of this.elementProperties) { + const i = this._$Eu(s, r); + i !== void 0 && this._$Eh.set(i, s); } this.elementStyles = this.finalizeStyles(this.styles); } static finalizeStyles(e) { - const t = []; + const s = []; if (Array.isArray(e)) { const r = new Set(e.flat(1 / 0).reverse()); - for (const i of r) t.unshift(ce(i)); - } else e !== void 0 && t.push(ce(e)); - return t; + for (const i of r) s.unshift(ce(i)); + } else e !== void 0 && s.push(ce(e)); + return s; } - static _$Eu(e, t) { - const r = t.attribute; + static _$Eu(e, s) { + const r = s.attribute; return r === !1 ? void 0 : typeof r == "string" ? r : typeof e == "string" ? e.toLowerCase() : void 0; } constructor() { @@ -142,80 +142,80 @@ let T = class extends HTMLElement { } _$Ev() { var e; - this._$ES = new Promise((t) => this.enableUpdating = t), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (e = this.constructor.l) == null || e.forEach((t) => t(this)); + this._$ES = new Promise((s) => this.enableUpdating = s), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (e = this.constructor.l) == null || e.forEach((s) => s(this)); } addController(e) { - var t; - (this._$EO ?? (this._$EO = /* @__PURE__ */ new Set())).add(e), this.renderRoot !== void 0 && this.isConnected && ((t = e.hostConnected) == null || t.call(e)); + var s; + (this._$EO ?? (this._$EO = /* @__PURE__ */ new Set())).add(e), this.renderRoot !== void 0 && this.isConnected && ((s = e.hostConnected) == null || s.call(e)); } removeController(e) { - var t; - (t = this._$EO) == null || t.delete(e); + var s; + (s = this._$EO) == null || s.delete(e); } _$E_() { - const e = /* @__PURE__ */ new Map(), t = this.constructor.elementProperties; - for (const r of t.keys()) this.hasOwnProperty(r) && (e.set(r, this[r]), delete this[r]); + const e = /* @__PURE__ */ new Map(), s = this.constructor.elementProperties; + for (const r of s.keys()) this.hasOwnProperty(r) && (e.set(r, this[r]), delete this[r]); e.size > 0 && (this._$Ep = e); } createRenderRoot() { const e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions); - return Pe(e, this.constructor.elementStyles), e; + return Ce(e, this.constructor.elementStyles), e; } connectedCallback() { var e; - this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (e = this._$EO) == null || e.forEach((t) => { + this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (e = this._$EO) == null || e.forEach((s) => { var r; - return (r = t.hostConnected) == null ? void 0 : r.call(t); + return (r = s.hostConnected) == null ? void 0 : r.call(s); }); } enableUpdating(e) { } disconnectedCallback() { var e; - (e = this._$EO) == null || e.forEach((t) => { + (e = this._$EO) == null || e.forEach((s) => { var r; - return (r = t.hostDisconnected) == null ? void 0 : r.call(t); + return (r = s.hostDisconnected) == null ? void 0 : r.call(s); }); } - attributeChangedCallback(e, t, r) { + attributeChangedCallback(e, s, r) { this._$AK(e, r); } - _$ET(e, t) { - var o; + _$ET(e, s) { + var a; const r = this.constructor.elementProperties.get(e), i = this.constructor._$Eu(e, r); if (i !== void 0 && r.reflect === !0) { - const a = (((o = r.converter) == null ? void 0 : o.toAttribute) !== void 0 ? r.converter : Z).toAttribute(t, r.type); - this._$Em = e, a == null ? this.removeAttribute(i) : this.setAttribute(i, a), this._$Em = null; + const o = (((a = r.converter) == null ? void 0 : a.toAttribute) !== void 0 ? r.converter : X).toAttribute(s, r.type); + this._$Em = e, o == null ? this.removeAttribute(i) : this.setAttribute(i, o), this._$Em = null; } } - _$AK(e, t) { - var o, a; + _$AK(e, s) { + var a, o; const r = this.constructor, i = r._$Eh.get(e); if (i !== void 0 && this._$Em !== i) { - const d = r.getPropertyOptions(i), n = typeof d.converter == "function" ? { fromAttribute: d.converter } : ((o = d.converter) == null ? void 0 : o.fromAttribute) !== void 0 ? d.converter : Z; + const c = r.getPropertyOptions(i), d = typeof c.converter == "function" ? { fromAttribute: c.converter } : ((a = c.converter) == null ? void 0 : a.fromAttribute) !== void 0 ? c.converter : X; this._$Em = i; - const u = n.fromAttribute(t, d.type); - this[i] = u ?? ((a = this._$Ej) == null ? void 0 : a.get(i)) ?? u, this._$Em = null; + const h = d.fromAttribute(s, c.type); + this[i] = h ?? ((o = this._$Ej) == null ? void 0 : o.get(i)) ?? h, this._$Em = null; } } - requestUpdate(e, t, r, i = !1, o) { - var a; + requestUpdate(e, s, r, i = !1, a) { + var o; if (e !== void 0) { - const d = this.constructor; - if (i === !1 && (o = this[e]), r ?? (r = d.getPropertyOptions(e)), !((r.hasChanged ?? ae)(o, t) || r.useDefault && r.reflect && o === ((a = this._$Ej) == null ? void 0 : a.get(e)) && !this.hasAttribute(d._$Eu(e, r)))) return; - this.C(e, t, r); + const c = this.constructor; + if (i === !1 && (a = this[e]), r ?? (r = c.getPropertyOptions(e)), !((r.hasChanged ?? ne)(a, s) || r.useDefault && r.reflect && a === ((o = this._$Ej) == null ? void 0 : o.get(e)) && !this.hasAttribute(c._$Eu(e, r)))) return; + this.C(e, s, r); } this.isUpdatePending === !1 && (this._$ES = this._$EP()); } - C(e, t, { useDefault: r, reflect: i, wrapped: o }, a) { - r && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(e) && (this._$Ej.set(e, a ?? t ?? this[e]), o !== !0 || a !== void 0) || (this._$AL.has(e) || (this.hasUpdated || r || (t = void 0), this._$AL.set(e, t)), i === !0 && this._$Em !== e && (this._$Eq ?? (this._$Eq = /* @__PURE__ */ new Set())).add(e)); + C(e, s, { useDefault: r, reflect: i, wrapped: a }, o) { + r && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(e) && (this._$Ej.set(e, o ?? s ?? this[e]), a !== !0 || o !== void 0) || (this._$AL.has(e) || (this.hasUpdated || r || (s = void 0), this._$AL.set(e, s)), i === !0 && this._$Em !== e && (this._$Eq ?? (this._$Eq = /* @__PURE__ */ new Set())).add(e)); } async _$EP() { this.isUpdatePending = !0; try { await this._$ES; - } catch (t) { - Promise.reject(t); + } catch (s) { + Promise.reject(s); } const e = this.scheduleUpdate(); return e != null && await e, !this.isUpdatePending; @@ -228,32 +228,32 @@ let T = class extends HTMLElement { if (!this.isUpdatePending) return; if (!this.hasUpdated) { if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) { - for (const [o, a] of this._$Ep) this[o] = a; + for (const [a, o] of this._$Ep) this[a] = o; this._$Ep = void 0; } const i = this.constructor.elementProperties; - if (i.size > 0) for (const [o, a] of i) { - const { wrapped: d } = a, n = this[o]; - d !== !0 || this._$AL.has(o) || n === void 0 || this.C(o, void 0, a, n); + if (i.size > 0) for (const [a, o] of i) { + const { wrapped: c } = o, d = this[a]; + c !== !0 || this._$AL.has(a) || d === void 0 || this.C(a, void 0, o, d); } } let e = !1; - const t = this._$AL; + const s = this._$AL; try { - e = this.shouldUpdate(t), e ? (this.willUpdate(t), (r = this._$EO) == null || r.forEach((i) => { - var o; - return (o = i.hostUpdate) == null ? void 0 : o.call(i); - }), this.update(t)) : this._$EM(); + e = this.shouldUpdate(s), e ? (this.willUpdate(s), (r = this._$EO) == null || r.forEach((i) => { + var a; + return (a = i.hostUpdate) == null ? void 0 : a.call(i); + }), this.update(s)) : this._$EM(); } catch (i) { throw e = !1, this._$EM(), i; } - e && this._$AE(t); + e && this._$AE(s); } willUpdate(e) { } _$AE(e) { - var t; - (t = this._$EO) == null || t.forEach((r) => { + var s; + (s = this._$EO) == null || s.forEach((r) => { var i; return (i = r.hostUpdated) == null ? void 0 : i.call(r); }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e); @@ -271,85 +271,85 @@ let T = class extends HTMLElement { return !0; } update(e) { - this._$Eq && (this._$Eq = this._$Eq.forEach((t) => this._$ET(t, this[t]))), this._$EM(); + this._$Eq && (this._$Eq = this._$Eq.forEach((s) => this._$ET(s, this[s]))), this._$EM(); } updated(e) { } firstUpdated(e) { } }; -T.elementStyles = [], T.shadowRootOptions = { mode: "open" }, T[W("elementProperties")] = /* @__PURE__ */ new Map(), T[W("finalized")] = /* @__PURE__ */ new Map(), ee == null || ee({ ReactiveElement: T }), (S.reactiveElementVersions ?? (S.reactiveElementVersions = [])).push("2.1.2"); +j.elementStyles = [], j.shadowRootOptions = { mode: "open" }, j[L("elementProperties")] = /* @__PURE__ */ new Map(), j[L("finalized")] = /* @__PURE__ */ new Map(), te == null || te({ ReactiveElement: j }), (C.reactiveElementVersions ?? (C.reactiveElementVersions = [])).push("2.1.2"); /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const L = globalThis, ue = (s) => s, Q = L.trustedTypes, pe = Q ? Q.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, _e = "$lit$", A = `lit$${Math.random().toFixed(9).slice(2)}$`, ke = "?" + A, Te = `<${ke}>`, z = document, q = () => z.createComment(""), I = (s) => s === null || typeof s != "object" && typeof s != "function", ne = Array.isArray, je = (s) => ne(s) || typeof (s == null ? void 0 : s[Symbol.iterator]) == "function", te = `[ -\f\r]`, M = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ge = /-->/g, be = />/g, O = RegExp(`>|${te}(?:([^\\s"'>=/]+)(${te}*=${te}*(?:[^ -\f\r"'\`<>=]|("|')|))|$)`, "g"), me = /'/g, ve = /"/g, xe = /^(?:script|style|textarea|title)$/i, Be = (s) => (e, ...t) => ({ _$litType$: s, strings: e, values: t }), l = Be(1), j = Symbol.for("lit-noChange"), c = Symbol.for("lit-nothing"), $e = /* @__PURE__ */ new WeakMap(), R = z.createTreeWalker(z, 129); -function Ae(s, e) { - if (!ne(s) || !s.hasOwnProperty("raw")) throw Error("invalid template strings array"); - return pe !== void 0 ? pe.createHTML(e) : e; +const q = globalThis, he = (t) => t, Q = q.trustedTypes, ue = Q ? Q.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, _e = "$lit$", P = `lit$${Math.random().toFixed(9).slice(2)}$`, ke = "?" + P, je = `<${ke}>`, T = document, I = () => T.createComment(""), F = (t) => t === null || typeof t != "object" && typeof t != "function", le = Array.isArray, Be = (t) => le(t) || typeof (t == null ? void 0 : t[Symbol.iterator]) == "function", se = `[ +\f\r]`, W = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ge = /-->/g, be = />/g, D = RegExp(`>|${se}(?:([^\\s"'>=/]+)(${se}*=${se}*(?:[^ +\f\r"'\`<>=]|("|')|))|$)`, "g"), me = /'/g, ve = /"/g, xe = /^(?:script|style|textarea|title)$/i, Ne = (t) => (e, ...s) => ({ _$litType$: t, strings: e, values: s }), n = Ne(1), B = Symbol.for("lit-noChange"), l = Symbol.for("lit-nothing"), $e = /* @__PURE__ */ new WeakMap(), R = T.createTreeWalker(T, 129); +function Ae(t, e) { + if (!le(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array"); + return ue !== void 0 ? ue.createHTML(e) : e; } -const Ne = (s, e) => { - const t = s.length - 1, r = []; - let i, o = e === 2 ? "" : e === 3 ? "" : "", a = M; - for (let d = 0; d < t; d++) { - const n = s[d]; - let u, p, h = -1, b = 0; - for (; b < n.length && (a.lastIndex = b, p = a.exec(n), p !== null); ) b = a.lastIndex, a === M ? p[1] === "!--" ? a = ge : p[1] !== void 0 ? a = be : p[2] !== void 0 ? (xe.test(p[2]) && (i = RegExp("" ? (a = i ?? M, h = -1) : p[1] === void 0 ? h = -2 : (h = a.lastIndex - p[2].length, u = p[1], a = p[3] === void 0 ? O : p[3] === '"' ? ve : me) : a === ve || a === me ? a = O : a === ge || a === be ? a = M : (a = O, i = void 0); - const $ = a === O && s[d + 1].startsWith("/>") ? " " : ""; - o += a === M ? n + Te : h >= 0 ? (r.push(u), n.slice(0, h) + _e + n.slice(h) + A + $) : n + A + (h === -2 ? d : $); +const Me = (t, e) => { + const s = t.length - 1, r = []; + let i, a = e === 2 ? "" : e === 3 ? "" : "", o = W; + for (let c = 0; c < s; c++) { + const d = t[c]; + let h, u, f = -1, g = 0; + for (; g < d.length && (o.lastIndex = g, u = o.exec(d), u !== null); ) g = o.lastIndex, o === W ? u[1] === "!--" ? o = ge : u[1] !== void 0 ? o = be : u[2] !== void 0 ? (xe.test(u[2]) && (i = RegExp("" ? (o = i ?? W, f = -1) : u[1] === void 0 ? f = -2 : (f = o.lastIndex - u[2].length, h = u[1], o = u[3] === void 0 ? D : u[3] === '"' ? ve : me) : o === ve || o === me ? o = D : o === ge || o === be ? o = W : (o = D, i = void 0); + const v = o === D && t[c + 1].startsWith("/>") ? " " : ""; + a += o === W ? d + je : f >= 0 ? (r.push(h), d.slice(0, f) + _e + d.slice(f) + P + v) : d + P + (f === -2 ? c : v); } - return [Ae(s, o + (s[t] || "") + (e === 2 ? "" : e === 3 ? "" : "")), r]; + return [Ae(t, a + (t[s] || "") + (e === 2 ? "" : e === 3 ? "" : "")), r]; }; class G { - constructor({ strings: e, _$litType$: t }, r) { + constructor({ strings: e, _$litType$: s }, r) { let i; this.parts = []; - let o = 0, a = 0; - const d = e.length - 1, n = this.parts, [u, p] = Ne(e, t); - if (this.el = G.createElement(u, r), R.currentNode = this.el.content, t === 2 || t === 3) { - const h = this.el.content.firstChild; - h.replaceWith(...h.childNodes); + let a = 0, o = 0; + const c = e.length - 1, d = this.parts, [h, u] = Me(e, s); + if (this.el = G.createElement(h, r), R.currentNode = this.el.content, s === 2 || s === 3) { + const f = this.el.content.firstChild; + f.replaceWith(...f.childNodes); } - for (; (i = R.nextNode()) !== null && n.length < d; ) { + for (; (i = R.nextNode()) !== null && d.length < c; ) { if (i.nodeType === 1) { - if (i.hasAttributes()) for (const h of i.getAttributeNames()) if (h.endsWith(_e)) { - const b = p[a++], $ = i.getAttribute(h).split(A), _ = /([.?@])?(.*)/.exec(b); - n.push({ type: 1, index: o, name: _[2], strings: $, ctor: _[1] === "." ? Me : _[1] === "?" ? We : _[1] === "@" ? Le : X }), i.removeAttribute(h); - } else h.startsWith(A) && (n.push({ type: 6, index: o }), i.removeAttribute(h)); + if (i.hasAttributes()) for (const f of i.getAttributeNames()) if (f.endsWith(_e)) { + const g = u[o++], v = i.getAttribute(f).split(P), w = /([.?@])?(.*)/.exec(g); + d.push({ type: 1, index: a, name: w[2], strings: v, ctor: w[1] === "." ? We : w[1] === "?" ? Le : w[1] === "@" ? qe : Y }), i.removeAttribute(f); + } else f.startsWith(P) && (d.push({ type: 6, index: a }), i.removeAttribute(f)); if (xe.test(i.tagName)) { - const h = i.textContent.split(A), b = h.length - 1; - if (b > 0) { + const f = i.textContent.split(P), g = f.length - 1; + if (g > 0) { i.textContent = Q ? Q.emptyScript : ""; - for (let $ = 0; $ < b; $++) i.append(h[$], q()), R.nextNode(), n.push({ type: 2, index: ++o }); - i.append(h[b], q()); + for (let v = 0; v < g; v++) i.append(f[v], I()), R.nextNode(), d.push({ type: 2, index: ++a }); + i.append(f[g], I()); } } - } else if (i.nodeType === 8) if (i.data === ke) n.push({ type: 2, index: o }); + } else if (i.nodeType === 8) if (i.data === ke) d.push({ type: 2, index: a }); else { - let h = -1; - for (; (h = i.data.indexOf(A, h + 1)) !== -1; ) n.push({ type: 7, index: o }), h += A.length - 1; + let f = -1; + for (; (f = i.data.indexOf(P, f + 1)) !== -1; ) d.push({ type: 7, index: a }), f += P.length - 1; } - o++; + a++; } } - static createElement(e, t) { - const r = z.createElement("template"); + static createElement(e, s) { + const r = T.createElement("template"); return r.innerHTML = e, r; } } -function B(s, e, t = s, r) { - var a, d; - if (e === j) return e; - let i = r !== void 0 ? (a = t._$Co) == null ? void 0 : a[r] : t._$Cl; - const o = I(e) ? void 0 : e._$litDirective$; - return (i == null ? void 0 : i.constructor) !== o && ((d = i == null ? void 0 : i._$AO) == null || d.call(i, !1), o === void 0 ? i = void 0 : (i = new o(s), i._$AT(s, t, r)), r !== void 0 ? (t._$Co ?? (t._$Co = []))[r] = i : t._$Cl = i), i !== void 0 && (e = B(s, i._$AS(s, e.values), i, r)), e; +function N(t, e, s = t, r) { + var o, c; + if (e === B) return e; + let i = r !== void 0 ? (o = s._$Co) == null ? void 0 : o[r] : s._$Cl; + const a = F(e) ? void 0 : e._$litDirective$; + return (i == null ? void 0 : i.constructor) !== a && ((c = i == null ? void 0 : i._$AO) == null || c.call(i, !1), a === void 0 ? i = void 0 : (i = new a(t), i._$AT(t, s, r)), r !== void 0 ? (s._$Co ?? (s._$Co = []))[r] = i : s._$Cl = i), i !== void 0 && (e = N(t, i._$AS(t, e.values), i, r)), e; } class He { - constructor(e, t) { - this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t; + constructor(e, s) { + this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = s; } get parentNode() { return this._$AM.parentNode; @@ -358,35 +358,35 @@ class He { return this._$AM._$AU; } u(e) { - const { el: { content: t }, parts: r } = this._$AD, i = ((e == null ? void 0 : e.creationScope) ?? z).importNode(t, !0); + const { el: { content: s }, parts: r } = this._$AD, i = ((e == null ? void 0 : e.creationScope) ?? T).importNode(s, !0); R.currentNode = i; - let o = R.nextNode(), a = 0, d = 0, n = r[0]; - for (; n !== void 0; ) { - if (a === n.index) { - let u; - n.type === 2 ? u = new V(o, o.nextSibling, this, e) : n.type === 1 ? u = new n.ctor(o, n.name, n.strings, this, e) : n.type === 6 && (u = new qe(o, this, e)), this._$AV.push(u), n = r[++d]; + let a = R.nextNode(), o = 0, c = 0, d = r[0]; + for (; d !== void 0; ) { + if (o === d.index) { + let h; + d.type === 2 ? h = new K(a, a.nextSibling, this, e) : d.type === 1 ? h = new d.ctor(a, d.name, d.strings, this, e) : d.type === 6 && (h = new Ie(a, this, e)), this._$AV.push(h), d = r[++c]; } - a !== (n == null ? void 0 : n.index) && (o = R.nextNode(), a++); + o !== (d == null ? void 0 : d.index) && (a = R.nextNode(), o++); } - return R.currentNode = z, i; + return R.currentNode = T, i; } p(e) { - let t = 0; - for (const r of this._$AV) r !== void 0 && (r.strings !== void 0 ? (r._$AI(e, r, t), t += r.strings.length - 2) : r._$AI(e[t])), t++; + let s = 0; + for (const r of this._$AV) r !== void 0 && (r.strings !== void 0 ? (r._$AI(e, r, s), s += r.strings.length - 2) : r._$AI(e[s])), s++; } } -class V { +class K { get _$AU() { var e; return ((e = this._$AM) == null ? void 0 : e._$AU) ?? this._$Cv; } - constructor(e, t, r, i) { - this.type = 2, this._$AH = c, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = r, this.options = i, this._$Cv = (i == null ? void 0 : i.isConnected) ?? !0; + constructor(e, s, r, i) { + this.type = 2, this._$AH = l, this._$AN = void 0, this._$AA = e, this._$AB = s, this._$AM = r, this.options = i, this._$Cv = (i == null ? void 0 : i.isConnected) ?? !0; } get parentNode() { let e = this._$AA.parentNode; - const t = this._$AM; - return t !== void 0 && (e == null ? void 0 : e.nodeType) === 11 && (e = t.parentNode), e; + const s = this._$AM; + return s !== void 0 && (e == null ? void 0 : e.nodeType) === 11 && (e = s.parentNode), e; } get startNode() { return this._$AA; @@ -394,8 +394,8 @@ class V { get endNode() { return this._$AB; } - _$AI(e, t = this) { - e = B(this, e, t), I(e) ? e === c || e == null || e === "" ? (this._$AH !== c && this._$AR(), this._$AH = c) : e !== this._$AH && e !== j && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : je(e) ? this.k(e) : this._(e); + _$AI(e, s = this) { + e = N(this, e, s), F(e) ? e === l || e == null || e === "" ? (this._$AH !== l && this._$AR(), this._$AH = l) : e !== this._$AH && e !== B && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Be(e) ? this.k(e) : this._(e); } O(e) { return this._$AA.parentNode.insertBefore(e, this._$AB); @@ -404,116 +404,116 @@ class V { this._$AH !== e && (this._$AR(), this._$AH = this.O(e)); } _(e) { - this._$AH !== c && I(this._$AH) ? this._$AA.nextSibling.data = e : this.T(z.createTextNode(e)), this._$AH = e; + this._$AH !== l && F(this._$AH) ? this._$AA.nextSibling.data = e : this.T(T.createTextNode(e)), this._$AH = e; } $(e) { - var o; - const { values: t, _$litType$: r } = e, i = typeof r == "number" ? this._$AC(e) : (r.el === void 0 && (r.el = G.createElement(Ae(r.h, r.h[0]), this.options)), r); - if (((o = this._$AH) == null ? void 0 : o._$AD) === i) this._$AH.p(t); + var a; + const { values: s, _$litType$: r } = e, i = typeof r == "number" ? this._$AC(e) : (r.el === void 0 && (r.el = G.createElement(Ae(r.h, r.h[0]), this.options)), r); + if (((a = this._$AH) == null ? void 0 : a._$AD) === i) this._$AH.p(s); else { - const a = new He(i, this), d = a.u(this.options); - a.p(t), this.T(d), this._$AH = a; + const o = new He(i, this), c = o.u(this.options); + o.p(s), this.T(c), this._$AH = o; } } _$AC(e) { - let t = $e.get(e.strings); - return t === void 0 && $e.set(e.strings, t = new G(e)), t; + let s = $e.get(e.strings); + return s === void 0 && $e.set(e.strings, s = new G(e)), s; } k(e) { - ne(this._$AH) || (this._$AH = [], this._$AR()); - const t = this._$AH; + le(this._$AH) || (this._$AH = [], this._$AR()); + const s = this._$AH; let r, i = 0; - for (const o of e) i === t.length ? t.push(r = new V(this.O(q()), this.O(q()), this, this.options)) : r = t[i], r._$AI(o), i++; - i < t.length && (this._$AR(r && r._$AB.nextSibling, i), t.length = i); + for (const a of e) i === s.length ? s.push(r = new K(this.O(I()), this.O(I()), this, this.options)) : r = s[i], r._$AI(a), i++; + i < s.length && (this._$AR(r && r._$AB.nextSibling, i), s.length = i); } - _$AR(e = this._$AA.nextSibling, t) { + _$AR(e = this._$AA.nextSibling, s) { var r; - for ((r = this._$AP) == null ? void 0 : r.call(this, !1, !0, t); e !== this._$AB; ) { - const i = ue(e).nextSibling; - ue(e).remove(), e = i; + for ((r = this._$AP) == null ? void 0 : r.call(this, !1, !0, s); e !== this._$AB; ) { + const i = he(e).nextSibling; + he(e).remove(), e = i; } } setConnected(e) { - var t; - this._$AM === void 0 && (this._$Cv = e, (t = this._$AP) == null || t.call(this, e)); + var s; + this._$AM === void 0 && (this._$Cv = e, (s = this._$AP) == null || s.call(this, e)); } } -class X { +class Y { get tagName() { return this.element.tagName; } get _$AU() { return this._$AM._$AU; } - constructor(e, t, r, i, o) { - this.type = 1, this._$AH = c, this._$AN = void 0, this.element = e, this.name = t, this._$AM = i, this.options = o, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = c; + constructor(e, s, r, i, a) { + this.type = 1, this._$AH = l, this._$AN = void 0, this.element = e, this.name = s, this._$AM = i, this.options = a, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = l; } - _$AI(e, t = this, r, i) { - const o = this.strings; - let a = !1; - if (o === void 0) e = B(this, e, t, 0), a = !I(e) || e !== this._$AH && e !== j, a && (this._$AH = e); + _$AI(e, s = this, r, i) { + const a = this.strings; + let o = !1; + if (a === void 0) e = N(this, e, s, 0), o = !F(e) || e !== this._$AH && e !== B, o && (this._$AH = e); else { - const d = e; - let n, u; - for (e = o[0], n = 0; n < o.length - 1; n++) u = B(this, d[r + n], t, n), u === j && (u = this._$AH[n]), a || (a = !I(u) || u !== this._$AH[n]), u === c ? e = c : e !== c && (e += (u ?? "") + o[n + 1]), this._$AH[n] = u; + const c = e; + let d, h; + for (e = a[0], d = 0; d < a.length - 1; d++) h = N(this, c[r + d], s, d), h === B && (h = this._$AH[d]), o || (o = !F(h) || h !== this._$AH[d]), h === l ? e = l : e !== l && (e += (h ?? "") + a[d + 1]), this._$AH[d] = h; } - a && !i && this.j(e); + o && !i && this.j(e); } j(e) { - e === c ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? ""); + e === l ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? ""); } } -class Me extends X { +class We extends Y { constructor() { super(...arguments), this.type = 3; } j(e) { - this.element[this.name] = e === c ? void 0 : e; + this.element[this.name] = e === l ? void 0 : e; } } -class We extends X { +class Le extends Y { constructor() { super(...arguments), this.type = 4; } j(e) { - this.element.toggleAttribute(this.name, !!e && e !== c); + this.element.toggleAttribute(this.name, !!e && e !== l); } } -class Le extends X { - constructor(e, t, r, i, o) { - super(e, t, r, i, o), this.type = 5; +class qe extends Y { + constructor(e, s, r, i, a) { + super(e, s, r, i, a), this.type = 5; } - _$AI(e, t = this) { - if ((e = B(this, e, t, 0) ?? c) === j) return; - const r = this._$AH, i = e === c && r !== c || e.capture !== r.capture || e.once !== r.once || e.passive !== r.passive, o = e !== c && (r === c || i); - i && this.element.removeEventListener(this.name, this, r), o && this.element.addEventListener(this.name, this, e), this._$AH = e; + _$AI(e, s = this) { + if ((e = N(this, e, s, 0) ?? l) === B) return; + const r = this._$AH, i = e === l && r !== l || e.capture !== r.capture || e.once !== r.once || e.passive !== r.passive, a = e !== l && (r === l || i); + i && this.element.removeEventListener(this.name, this, r), a && this.element.addEventListener(this.name, this, e), this._$AH = e; } handleEvent(e) { - var t; - typeof this._$AH == "function" ? this._$AH.call(((t = this.options) == null ? void 0 : t.host) ?? this.element, e) : this._$AH.handleEvent(e); + var s; + typeof this._$AH == "function" ? this._$AH.call(((s = this.options) == null ? void 0 : s.host) ?? this.element, e) : this._$AH.handleEvent(e); } } -class qe { - constructor(e, t, r) { - this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = r; +class Ie { + constructor(e, s, r) { + this.element = e, this.type = 6, this._$AN = void 0, this._$AM = s, this.options = r; } get _$AU() { return this._$AM._$AU; } _$AI(e) { - B(this, e); + N(this, e); } } -const se = L.litHtmlPolyfillSupport; -se == null || se(G, V), (L.litHtmlVersions ?? (L.litHtmlVersions = [])).push("3.3.2"); -const Ie = (s, e, t) => { - const r = (t == null ? void 0 : t.renderBefore) ?? e; +const ie = q.litHtmlPolyfillSupport; +ie == null || ie(G, K), (q.litHtmlVersions ?? (q.litHtmlVersions = [])).push("3.3.2"); +const Fe = (t, e, s) => { + const r = (s == null ? void 0 : s.renderBefore) ?? e; let i = r._$litPart$; if (i === void 0) { - const o = (t == null ? void 0 : t.renderBefore) ?? null; - r._$litPart$ = i = new V(e.insertBefore(q(), o), o, void 0, t ?? {}); + const a = (s == null ? void 0 : s.renderBefore) ?? null; + r._$litPart$ = i = new K(e.insertBefore(I(), a), a, void 0, s ?? {}); } - return i._$AI(s), i; + return i._$AI(t), i; }; /** * @license @@ -521,18 +521,18 @@ const Ie = (s, e, t) => { * SPDX-License-Identifier: BSD-3-Clause */ const U = globalThis; -class k extends T { +class A extends j { constructor() { super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0; } createRenderRoot() { - var t; + var s; const e = super.createRenderRoot(); - return (t = this.renderOptions).renderBefore ?? (t.renderBefore = e.firstChild), e; + return (s = this.renderOptions).renderBefore ?? (s.renderBefore = e.firstChild), e; } update(e) { - const t = this.render(); - this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = Ie(t, this.renderRoot, this.renderOptions); + const s = this.render(); + this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = Fe(s, this.renderRoot, this.renderOptions); } connectedCallback() { var e; @@ -543,87 +543,87 @@ class k extends T { super.disconnectedCallback(), (e = this._$Do) == null || e.setConnected(!1); } render() { - return j; + return B; } } var ye; -k._$litElement$ = !0, k.finalized = !0, (ye = U.litElementHydrateSupport) == null || ye.call(U, { LitElement: k }); -const ie = U.litElementPolyfillSupport; -ie == null || ie({ LitElement: k }); +A._$litElement$ = !0, A.finalized = !0, (ye = U.litElementHydrateSupport) == null || ye.call(U, { LitElement: A }); +const re = U.litElementPolyfillSupport; +re == null || re({ LitElement: A }); (U.litElementVersions ?? (U.litElementVersions = [])).push("4.2.2"); /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const K = (s) => (e, t) => { - t !== void 0 ? t.addInitializer(() => { - customElements.define(s, e); - }) : customElements.define(s, e); +const J = (t) => (e, s) => { + s !== void 0 ? s.addInitializer(() => { + customElements.define(t, e); + }) : customElements.define(t, e); }; /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const Ge = { attribute: !0, type: String, converter: Z, reflect: !1, hasChanged: ae }, Fe = (s = Ge, e, t) => { - const { kind: r, metadata: i } = t; - let o = globalThis.litPropertyMetadata.get(i); - if (o === void 0 && globalThis.litPropertyMetadata.set(i, o = /* @__PURE__ */ new Map()), r === "setter" && ((s = Object.create(s)).wrapped = !0), o.set(t.name, s), r === "accessor") { - const { name: a } = t; - return { set(d) { - const n = e.get.call(this); - e.set.call(this, d), this.requestUpdate(a, n, s, !0, d); - }, init(d) { - return d !== void 0 && this.C(a, void 0, s, d), d; +const Ge = { attribute: !0, type: String, converter: X, reflect: !1, hasChanged: ne }, Ve = (t = Ge, e, s) => { + const { kind: r, metadata: i } = s; + let a = globalThis.litPropertyMetadata.get(i); + if (a === void 0 && globalThis.litPropertyMetadata.set(i, a = /* @__PURE__ */ new Map()), r === "setter" && ((t = Object.create(t)).wrapped = !0), a.set(s.name, t), r === "accessor") { + const { name: o } = s; + return { set(c) { + const d = e.get.call(this); + e.set.call(this, c), this.requestUpdate(o, d, t, !0, c); + }, init(c) { + return c !== void 0 && this.C(o, void 0, t, c), c; } }; } if (r === "setter") { - const { name: a } = t; - return function(d) { - const n = this[a]; - e.call(this, d), this.requestUpdate(a, n, s, !0, d); + const { name: o } = s; + return function(c) { + const d = this[o]; + e.call(this, c), this.requestUpdate(o, d, t, !0, c); }; } throw Error("Unsupported decorator location: " + r); }; -function D(s) { - return (e, t) => typeof t == "object" ? Fe(s, e, t) : ((r, i, o) => { - const a = i.hasOwnProperty(o); - return i.constructor.createProperty(o, r), a ? Object.getOwnPropertyDescriptor(i, o) : void 0; - })(s, e, t); +function z(t) { + return (e, s) => typeof s == "object" ? Ve(t, e, s) : ((r, i, a) => { + const o = i.hasOwnProperty(a); + return i.constructor.createProperty(a, r), o ? Object.getOwnPropertyDescriptor(i, a) : void 0; + })(t, e, s); } /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -function f(s) { - return D({ ...s, state: !0, attribute: !1 }); +function p(t) { + return z({ ...t, state: !0, attribute: !1 }); } -function Ve(s, e) { - const t = new WebSocket(s); - return t.onmessage = (r) => { - var i, o, a, d, n, u, p, h, b, $, _, le; +function Ke(t, e) { + const s = new WebSocket(t); + return s.onmessage = (r) => { + var i, a, o, c, d, h, u, f, g, v, w, b; try { - const C = JSON.parse(r.data); - ((o = (i = C.type) == null ? void 0 : i.startsWith) != null && o.call(i, "build.") || (d = (a = C.type) == null ? void 0 : a.startsWith) != null && d.call(a, "release.") || (u = (n = C.type) == null ? void 0 : n.startsWith) != null && u.call(n, "sdk.") || (h = (p = C.channel) == null ? void 0 : p.startsWith) != null && h.call(p, "build.") || ($ = (b = C.channel) == null ? void 0 : b.startsWith) != null && $.call(b, "release.") || (le = (_ = C.channel) == null ? void 0 : _.startsWith) != null && le.call(_, "sdk.")) && e(C); + const x = JSON.parse(r.data); + ((a = (i = x.type) == null ? void 0 : i.startsWith) != null && a.call(i, "build.") || (c = (o = x.type) == null ? void 0 : o.startsWith) != null && c.call(o, "release.") || (h = (d = x.type) == null ? void 0 : d.startsWith) != null && h.call(d, "sdk.") || (f = (u = x.channel) == null ? void 0 : u.startsWith) != null && f.call(u, "build.") || (v = (g = x.channel) == null ? void 0 : g.startsWith) != null && v.call(g, "release.") || (b = (w = x.channel) == null ? void 0 : w.startsWith) != null && b.call(w, "sdk.")) && e(x); } catch { } - }, t; + }, s; } -class Y { +class ee { constructor(e = "") { this.baseUrl = e; } get base() { return `${this.baseUrl}/api/v1/build`; } - async request(e, t) { - var o; - const i = await (await fetch(`${this.base}${e}`, t)).json(); + async request(e, s) { + var a; + const i = await (await fetch(`${this.base}${e}`, s)).json(); if (!i.success) - throw new Error(((o = i.error) == null ? void 0 : o.message) ?? "Request failed"); + throw new Error(((a = i.error) == null ? void 0 : a.message) ?? "Request failed"); return i.data; } // -- Build ------------------------------------------------------------------ @@ -643,15 +643,15 @@ class Y { version() { return this.request("/release/version"); } - changelog(e, t) { + changelog(e, s) { const r = new URLSearchParams(); - e && r.set("from", e), t && r.set("to", t); + e && r.set("from", e), s && r.set("to", s); const i = r.toString(); return this.request(`/release/changelog${i ? `?${i}` : ""}`); } release(e = !1) { - const t = e ? "?dry_run=true" : ""; - return this.request(`/release${t}`, { method: "POST" }); + const s = e ? "?dry_run=true" : ""; + return this.request(`/release${s}`, { method: "POST" }); } releaseWorkflow(e = {}) { return this.request("/release/workflow", { @@ -661,54 +661,78 @@ class Y { }); } // -- SDK -------------------------------------------------------------------- - sdkDiff(e, t) { - const r = new URLSearchParams({ base: e, revision: t }); + sdkDiff(e, s) { + const r = new URLSearchParams({ base: e, revision: s }); return this.request(`/sdk/diff?${r.toString()}`); } sdkGenerate(e) { - const t = e ? JSON.stringify({ language: e }) : void 0; + const s = e ? JSON.stringify({ language: e }) : void 0; return this.request("/sdk/generate", { method: "POST", - headers: t ? { "Content-Type": "application/json" } : void 0, - body: t + headers: s ? { "Content-Type": "application/json" } : void 0, + body: s }); } } -var Ke = Object.defineProperty, Je = Object.getOwnPropertyDescriptor, N = (s, e, t, r) => { - for (var i = r > 1 ? void 0 : r ? Je(e, t) : e, o = s.length - 1, a; o >= 0; o--) - (a = s[o]) && (i = (r ? a(e, t, i) : a(i)) || i); - return r && i && Ke(e, t, i), i; +var Je = Object.defineProperty, Ze = Object.getOwnPropertyDescriptor, M = (t, e, s, r) => { + for (var i = r > 1 ? void 0 : r ? Ze(e, s) : e, a = t.length - 1, o; a >= 0; a--) + (o = t[a]) && (i = (r ? o(e, s, i) : o(i)) || i); + return r && i && Je(e, s, i), i; }; -let P = class extends k { +let E = class extends A { constructor() { super(...arguments), this.apiUrl = "", this.configData = null, this.discoverData = null, this.loading = !0, this.error = ""; } connectedCallback() { - super.connectedCallback(), this.api = new Y(this.apiUrl), this.reload(); + super.connectedCallback(), this.api = new ee(this.apiUrl), this.reload(); } async reload() { this.loading = !0, this.error = ""; try { - const [s, e] = await Promise.all([ + const [t, e] = await Promise.all([ this.api.config(), this.api.discover() ]); - this.configData = s, this.discoverData = e; - } catch (s) { - this.error = s.message ?? "Failed to load configuration"; + this.configData = t, this.discoverData = e; + } catch (t) { + this.error = t.message ?? "Failed to load configuration"; } finally { this.loading = !1; } } + hasAppleConfig(t) { + return t ? Object.entries(t).some(([, e]) => e == null ? !1 : Array.isArray(e) ? e.length > 0 : typeof e == "object" ? Object.keys(e).length > 0 : typeof e == "string" ? e.length > 0 : !0) : !1; + } + renderToggle(t, e, s = "Enabled", r = "Disabled") { + return e == null ? l : n` +
+ ${t} + + ${e ? s : r} + +
+ `; + } + renderFlags(t, e) { + return !e || e.length === 0 ? l : n` +
+ ${t} +
+ ${e.map((s) => n`${s}`)} +
+
+ `; + } render() { + var s, r, i, a, o, c, d, h, u, f, g, v, w; if (this.loading) - return l`
Loading configuration\u2026
`; + return n`
Loading configuration\u2026
`; if (this.error) - return l`
${this.error}
`; + return n`
${this.error}
`; if (!this.configData) - return l`
No configuration available.
`; - const s = this.configData.config, e = this.discoverData; - return l` + return n`
No configuration available.
`; + const t = this.configData.config, e = this.discoverData; + return n`
Project Detection
@@ -718,7 +742,7 @@ let P = class extends k { ${this.configData.has_config ? "Present" : "Using defaults"}
- ${e ? l` + ${e ? n`
Primary type ${e.primary || "none"} @@ -727,12 +751,12 @@ let P = class extends k { Suggested stack ${e.suggested_stack || e.primary_stack || e.primary || "none"}
- ${e.types.length > 1 ? l` + ${e.types.length > 1 ? n`
Detected types ${e.types.join(", ")}
- ` : c} + ` : l}
Frontend @@ -745,86 +769,292 @@ let P = class extends k { ${e.has_subtree_npm ? "Depth 2" : "None"}
- ${e.linux_packages && e.linux_packages.length > 0 ? l` + ${e.distro ? n` +
+ Distro + ${e.distro} +
+ ` : l} + ${e.linux_packages && e.linux_packages.length > 0 ? n`
Linux packages
- ${e.linux_packages.map((t) => l`${t}`)} + ${e.linux_packages.map((b) => n`${b}`)}
- ` : c} + ` : l} + ${e.build_options ? n` +
+ Computed options + ${e.build_options} +
+ ` : l} + ${this.renderToggle("Computed obfuscation", (s = e.options) == null ? void 0 : s.obfuscate)} + ${this.renderToggle("Computed NSIS", (r = e.options) == null ? void 0 : r.nsis)} + ${(i = e.options) != null && i.webview2 ? n` +
+ Computed WebView2 + ${e.options.webview2} +
+ ` : l} + ${this.renderFlags("Computed tags", (a = e.options) == null ? void 0 : a.tags)} + ${this.renderFlags("Computed LD flags", (o = e.options) == null ? void 0 : o.ldflags)} + ${e.ref ? n` +
+ Git ref + ${e.ref} +
+ ` : l} + ${e.branch ? n` +
+ Branch + ${e.branch} +
+ ` : l} + ${e.tag ? n` +
+ Tag + ${e.tag} +
+ ` : l} + ${e.short_sha ? n` +
+ Short SHA + ${e.short_sha} +
+ ` : l}
Directory ${e.dir}
- ` : c} + ` : l}
Project
- ${s.project.name ? l` + ${t.project.name ? n`
Name - ${s.project.name} + ${t.project.name}
- ` : c} - ${s.project.binary ? l` + ` : l} + ${t.project.description ? n` +
+ Description + ${t.project.description} +
+ ` : l} + ${t.project.binary ? n`
Binary - ${s.project.binary} + ${t.project.binary}
- ` : c} + ` : l}
Main - ${s.project.main} + ${t.project.main}
Build Settings
- ${s.build.type ? l` + ${t.build.type ? n`
Type override - ${s.build.type} + ${t.build.type}
- ` : c} + ` : l}
CGO - ${s.build.cgo ? "Enabled" : "Disabled"} + ${t.build.cgo ? "Enabled" : "Disabled"}
- ${s.build.flags && s.build.flags.length > 0 ? l` + ${this.renderToggle("Obfuscation", t.build.obfuscate)} + ${this.renderToggle("NSIS packaging", t.build.nsis)} + ${t.build.webview2 ? n` +
+ WebView2 mode + ${t.build.webview2} +
+ ` : l} + ${t.build.deno_build ? n` +
+ Deno build + ${t.build.deno_build} +
+ ` : l} + ${t.build.archive_format ? n` +
+ Archive format + ${t.build.archive_format} +
+ ` : l} + ${this.renderFlags("Build tags", t.build.build_tags)} + ${t.build.flags && t.build.flags.length > 0 ? n`
Flags
- ${s.build.flags.map((t) => l`${t}`)} + ${t.build.flags.map((b) => n`${b}`)}
- ` : c} - ${s.build.ldflags && s.build.ldflags.length > 0 ? l` + ` : l} + ${t.build.ldflags && t.build.ldflags.length > 0 ? n`
LD flags
- ${s.build.ldflags.map((t) => l`${t}`)} + ${t.build.ldflags.map((b) => n`${b}`)}
- ` : c} + ` : l} + ${this.renderFlags("Environment", t.build.env)} + ${(c = t.build.cache) != null && c.enabled || (d = t.build.cache) != null && d.path || (h = t.build.cache) != null && h.paths && t.build.cache.paths.length > 0 ? n` + ${this.renderToggle("Build cache", (u = t.build.cache) == null ? void 0 : u.enabled)} + ${(f = t.build.cache) != null && f.path ? n` +
+ Cache path + ${t.build.cache.path} +
+ ` : l} + ${this.renderFlags("Cache paths", (g = t.build.cache) == null ? void 0 : g.paths)} + ` : l} + ${t.build.dockerfile ? n` +
+ Dockerfile + ${t.build.dockerfile} +
+ ` : l} + ${t.build.image ? n` +
+ Image + ${t.build.image} +
+ ` : l} + ${t.build.registry ? n` +
+ Registry + ${t.build.registry} +
+ ` : l} + ${this.renderFlags("Image tags", t.build.tags)} + ${this.renderToggle("Push image", t.build.push)} + ${this.renderToggle("Load image", t.build.load)} + ${t.build.linuxkit_config ? n` +
+ LinuxKit config + ${t.build.linuxkit_config} +
+ ` : l} + ${this.renderFlags("LinuxKit formats", t.build.formats)}
Targets
- ${s.targets.map( - (t) => l`${t.os}/${t.arch}` + ${t.targets.map( + (b) => n`${b.os}/${b.arch}` )}
+ + ${t.apple && this.hasAppleConfig(t.apple) ? n` +
+
Apple Pipeline
+ ${t.apple.bundle_id ? n` +
+ Bundle ID + ${t.apple.bundle_id} +
+ ` : l} + ${t.apple.team_id ? n` +
+ Team ID + ${t.apple.team_id} +
+ ` : l} + ${t.apple.arch ? n` +
+ Architecture + ${t.apple.arch} +
+ ` : l} + ${t.apple.bundle_display_name ? n` +
+ Display name + ${t.apple.bundle_display_name} +
+ ` : l} + ${t.apple.min_system_version ? n` +
+ Minimum macOS + ${t.apple.min_system_version} +
+ ` : l} + ${t.apple.category ? n` +
+ Category + ${t.apple.category} +
+ ` : l} + ${this.renderToggle("Sign", t.apple.sign)} + ${this.renderToggle("Notarise", t.apple.notarise)} + ${this.renderToggle("DMG", t.apple.dmg)} + ${this.renderToggle("TestFlight", t.apple.testflight)} + ${this.renderToggle("App Store", t.apple.appstore)} + ${t.apple.metadata_path ? n` +
+ Metadata path + ${t.apple.metadata_path} +
+ ` : l} + ${t.apple.privacy_policy_url ? n` +
+ Privacy policy + ${t.apple.privacy_policy_url} +
+ ` : l} + ${t.apple.dmg_volume_name ? n` +
+ DMG volume + ${t.apple.dmg_volume_name} +
+ ` : l} + ${t.apple.dmg_background ? n` +
+ DMG background + ${t.apple.dmg_background} +
+ ` : l} + ${t.apple.entitlements_path ? n` +
+ Entitlements + ${t.apple.entitlements_path} +
+ ` : l} + ${(v = t.apple.xcode_cloud) != null && v.workflow ? n` +
+ Xcode Cloud workflow + ${t.apple.xcode_cloud.workflow} +
+ ` : l} + ${(w = t.apple.xcode_cloud) != null && w.triggers && t.apple.xcode_cloud.triggers.length > 0 ? n` +
+ Xcode Cloud triggers +
+ ${t.apple.xcode_cloud.triggers.map((b) => { + const x = b.branch ? `branch:${b.branch}` : b.tag ? `tag:${b.tag}` : "manual", Se = b.action ?? "archive"; + return n`${x} → ${Se}`; + })} +
+
+ ` : l} +
+ ` : l} `; } }; -P.styles = F` +E.styles = V` :host { display: block; font-family: system-ui, -apple-system, sans-serif; @@ -841,7 +1071,7 @@ P.styles = F` .section-title { font-size: 0.75rem; font-weight: 700; - colour: #6b7280; + color: #6b7280; text-transform: uppercase; letter-spacing: 0.025em; margin-bottom: 0.75rem; @@ -862,13 +1092,16 @@ P.styles = F` .field-label { font-size: 0.8125rem; font-weight: 500; - colour: #374151; + color: #374151; } .field-value { font-size: 0.8125rem; font-family: monospace; - colour: #6b7280; + color: #6b7280; + max-width: 36rem; + text-align: right; + word-break: break-word; } .badge { @@ -881,37 +1114,37 @@ P.styles = F` .badge.present { background: #dcfce7; - colour: #166534; + color: #166534; } .badge.absent { background: #fef3c7; - colour: #92400e; + color: #92400e; } .badge.type-go { background: #dbeafe; - colour: #1e40af; + color: #1e40af; } .badge.type-wails { background: #f3e8ff; - colour: #6b21a8; + color: #6b21a8; } .badge.type-node { background: #dcfce7; - colour: #166534; + color: #166534; } .badge.type-php { background: #fef3c7; - colour: #92400e; + color: #92400e; } .badge.type-docker { background: #e0e7ff; - colour: #3730a3; + color: #3730a3; } .targets { @@ -927,7 +1160,7 @@ P.styles = F` background: #f3f4f6; border-radius: 0.25rem; font-family: monospace; - colour: #374151; + color: #374151; } .flags { @@ -943,67 +1176,67 @@ P.styles = F` border: 1px solid #e5e7eb; border-radius: 0.25rem; font-family: monospace; - colour: #6b7280; + color: #6b7280; } .empty { text-align: center; padding: 2rem; - colour: #9ca3af; + color: #9ca3af; font-size: 0.875rem; } .loading { text-align: center; padding: 2rem; - colour: #6b7280; + color: #6b7280; } .error { - colour: #dc2626; + color: #dc2626; padding: 0.75rem; background: #fef2f2; border-radius: 0.375rem; font-size: 0.875rem; } `; -N([ - D({ attribute: "api-url" }) -], P.prototype, "apiUrl", 2); -N([ - f() -], P.prototype, "configData", 2); -N([ - f() -], P.prototype, "discoverData", 2); -N([ - f() -], P.prototype, "loading", 2); -N([ - f() -], P.prototype, "error", 2); -P = N([ - K("core-build-config") -], P); -var Ze = Object.defineProperty, Qe = Object.getOwnPropertyDescriptor, x = (s, e, t, r) => { - for (var i = r > 1 ? void 0 : r ? Qe(e, t) : e, o = s.length - 1, a; o >= 0; o--) - (a = s[o]) && (i = (r ? a(e, t, i) : a(i)) || i); - return r && i && Ze(e, t, i), i; +M([ + z({ attribute: "api-url" }) +], E.prototype, "apiUrl", 2); +M([ + p() +], E.prototype, "configData", 2); +M([ + p() +], E.prototype, "discoverData", 2); +M([ + p() +], E.prototype, "loading", 2); +M([ + p() +], E.prototype, "error", 2); +E = M([ + J("core-build-config") +], E); +var Xe = Object.defineProperty, Qe = Object.getOwnPropertyDescriptor, S = (t, e, s, r) => { + for (var i = r > 1 ? void 0 : r ? Qe(e, s) : e, a = t.length - 1, o; a >= 0; a--) + (o = t[a]) && (i = (r ? o(e, s, i) : o(i)) || i); + return r && i && Xe(e, s, i), i; }; -let y = class extends k { +let _ = class extends A { constructor() { super(...arguments), this.apiUrl = "", this.artifacts = [], this.distExists = !1, this.loading = !0, this.error = "", this.building = !1, this.confirmBuild = !1, this.buildSuccess = ""; } connectedCallback() { - super.connectedCallback(), this.api = new Y(this.apiUrl), this.reload(); + super.connectedCallback(), this.api = new ee(this.apiUrl), this.reload(); } async reload() { this.loading = !0, this.error = ""; try { - const s = await this.api.artifacts(); - this.artifacts = s.artifacts ?? [], this.distExists = s.exists ?? !1; - } catch (s) { - this.error = s.message ?? "Failed to load artifacts"; + const t = await this.api.artifacts(); + this.artifacts = t.artifacts ?? [], this.distExists = t.exists ?? !1; + } catch (t) { + this.error = t.message ?? "Failed to load artifacts"; } finally { this.loading = !1; } @@ -1015,22 +1248,22 @@ let y = class extends k { this.confirmBuild = !1; } async handleConfirmBuild() { - var s; + var t; this.confirmBuild = !1, this.building = !0, this.error = "", this.buildSuccess = ""; try { const e = await this.api.build(); - this.buildSuccess = `Build complete — ${((s = e.artifacts) == null ? void 0 : s.length) ?? 0} artifact(s) produced (${e.version})`, await this.reload(); + this.buildSuccess = `Build complete — ${((t = e.artifacts) == null ? void 0 : t.length) ?? 0} artifact(s) produced (${e.version})`, await this.reload(); } catch (e) { this.error = e.message ?? "Build failed"; } finally { this.building = !1; } } - formatSize(s) { - return s < 1024 ? `${s} B` : s < 1024 * 1024 ? `${(s / 1024).toFixed(1)} KB` : `${(s / (1024 * 1024)).toFixed(1)} MB`; + formatSize(t) { + return t < 1024 ? `${t} B` : t < 1024 * 1024 ? `${(t / 1024).toFixed(1)} KB` : `${(t / (1024 * 1024)).toFixed(1)} MB`; } render() { - return this.loading ? l`
Loading artifacts\u2026
` : l` + return this.loading ? n`
Loading artifacts\u2026
` : n`
${this.distExists ? `${this.artifacts.length} file(s) in dist/` : "No dist/ directory"} @@ -1044,24 +1277,24 @@ let y = class extends k {
- ${this.confirmBuild ? l` + ${this.confirmBuild ? n`
This will run a full build and overwrite dist/. Continue?
- ` : c} + ` : l} - ${this.error ? l`
${this.error}
` : c} - ${this.buildSuccess ? l`
${this.buildSuccess}
` : c} + ${this.error ? n`
${this.error}
` : l} + ${this.buildSuccess ? n`
${this.buildSuccess}
` : l} - ${this.artifacts.length === 0 ? l`
${this.distExists ? "dist/ is empty." : "Run a build to create artifacts."}
` : l` + ${this.artifacts.length === 0 ? n`
${this.distExists ? "dist/ is empty." : "Run a build to create artifacts."}
` : n`
${this.artifacts.map( - (s) => l` + (t) => n`
- ${s.name} - ${this.formatSize(s.size)} + ${t.name} + ${this.formatSize(t.size)}
` )} @@ -1070,7 +1303,7 @@ let y = class extends k { `; } }; -y.styles = F` +_.styles = V` :host { display: block; font-family: system-ui, -apple-system, sans-serif; @@ -1085,13 +1318,13 @@ y.styles = F` .toolbar-info { font-size: 0.8125rem; - colour: #6b7280; + color: #6b7280; } button.build { padding: 0.5rem 1.25rem; background: #6366f1; - colour: #fff; + color: #fff; border: none; border-radius: 0.375rem; font-size: 0.875rem; @@ -1123,13 +1356,13 @@ y.styles = F` .confirm-text { flex: 1; - colour: #92400e; + color: #92400e; } button.confirm-yes { padding: 0.375rem 1rem; background: #dc2626; - colour: #fff; + color: #fff; border: none; border-radius: 0.375rem; font-size: 0.8125rem; @@ -1169,29 +1402,29 @@ y.styles = F` font-size: 0.875rem; font-family: monospace; font-weight: 500; - colour: #111827; + color: #111827; } .artifact-size { font-size: 0.75rem; - colour: #6b7280; + color: #6b7280; } .empty { text-align: center; padding: 2rem; - colour: #9ca3af; + color: #9ca3af; font-size: 0.875rem; } .loading { text-align: center; padding: 2rem; - colour: #6b7280; + color: #6b7280; } .error { - colour: #dc2626; + color: #dc2626; padding: 0.75rem; background: #fef2f2; border-radius: 0.375rem; @@ -1205,59 +1438,59 @@ y.styles = F` border: 1px solid #bbf7d0; border-radius: 0.375rem; font-size: 0.875rem; - colour: #166534; + color: #166534; margin-bottom: 1rem; } `; -x([ - D({ attribute: "api-url" }) -], y.prototype, "apiUrl", 2); -x([ - f() -], y.prototype, "artifacts", 2); -x([ - f() -], y.prototype, "distExists", 2); -x([ - f() -], y.prototype, "loading", 2); -x([ - f() -], y.prototype, "error", 2); -x([ - f() -], y.prototype, "building", 2); -x([ - f() -], y.prototype, "confirmBuild", 2); -x([ - f() -], y.prototype, "buildSuccess", 2); -y = x([ - K("core-build-artifacts") -], y); -var Xe = Object.defineProperty, Ye = Object.getOwnPropertyDescriptor, v = (s, e, t, r) => { - for (var i = r > 1 ? void 0 : r ? Ye(e, t) : e, o = s.length - 1, a; o >= 0; o--) - (a = s[o]) && (i = (r ? a(e, t, i) : a(i)) || i); - return r && i && Xe(e, t, i), i; +S([ + z({ attribute: "api-url" }) +], _.prototype, "apiUrl", 2); +S([ + p() +], _.prototype, "artifacts", 2); +S([ + p() +], _.prototype, "distExists", 2); +S([ + p() +], _.prototype, "loading", 2); +S([ + p() +], _.prototype, "error", 2); +S([ + p() +], _.prototype, "building", 2); +S([ + p() +], _.prototype, "confirmBuild", 2); +S([ + p() +], _.prototype, "buildSuccess", 2); +_ = S([ + J("core-build-artifacts") +], _); +var Ye = Object.defineProperty, et = Object.getOwnPropertyDescriptor, y = (t, e, s, r) => { + for (var i = r > 1 ? void 0 : r ? et(e, s) : e, a = t.length - 1, o; a >= 0; a--) + (o = t[a]) && (i = (r ? o(e, s, i) : o(i)) || i); + return r && i && Ye(e, s, i), i; }; -let g = class extends k { +let m = class extends A { constructor() { super(...arguments), this.apiUrl = "", this.version = "", this.changelog = "", this.loading = !0, this.error = "", this.releasing = !1, this.confirmRelease = !1, this.releaseSuccess = "", this.workflowPath = ".github/workflows/release.yml", this.workflowOutputPath = "", this.generatingWorkflow = !1, this.workflowSuccess = ""; } connectedCallback() { - super.connectedCallback(), this.api = new Y(this.apiUrl), this.reload(); + super.connectedCallback(), this.api = new ee(this.apiUrl), this.reload(); } async reload() { this.loading = !0, this.error = ""; try { - const [s, e] = await Promise.all([ + const [t, e] = await Promise.all([ this.api.version(), this.api.changelog() ]); - this.version = s.version ?? "", this.changelog = e.changelog ?? ""; - } catch (s) { - this.error = s.message ?? "Failed to load release information"; + this.version = t.version ?? "", this.changelog = e.changelog ?? ""; + } catch (t) { + this.error = t.message ?? "Failed to load release information"; } finally { this.loading = !1; } @@ -1265,23 +1498,23 @@ let g = class extends k { handleReleaseClick() { this.confirmRelease = !0, this.releaseSuccess = ""; } - handleWorkflowPathInput(s) { - const e = s.target; + handleWorkflowPathInput(t) { + const e = t.target; this.workflowPath = (e == null ? void 0 : e.value) ?? ""; } - handleWorkflowOutputPathInput(s) { - const e = s.target; + handleWorkflowOutputPathInput(t) { + const e = t.target; this.workflowOutputPath = (e == null ? void 0 : e.value) ?? ""; } async handleGenerateWorkflow() { this.generatingWorkflow = !0, this.error = "", this.workflowSuccess = ""; try { - const s = {}, e = this.workflowPath.trim(), t = this.workflowOutputPath.trim(); - e && (s.path = e), e && (s.workflowPath = e, s.workflow_path = e, s["workflow-path"] = e), t && (s.outputPath = t), t && (s["output-path"] = t, s.output_path = t, s.output = t, s.workflowOutputPath = t, s.workflow_output = t, s["workflow-output"] = t, s.workflow_output_path = t, s["workflow-output-path"] = t); - const i = (await this.api.releaseWorkflow(s)).path ?? t ?? e ?? ".github/workflows/release.yml"; + const t = {}, e = this.workflowPath.trim(), s = this.workflowOutputPath.trim(); + e && (t.path = e), e && (t.workflowPath = e, t.workflow_path = e, t["workflow-path"] = e), s && (t.outputPath = s), s && (t["output-path"] = s, t.output_path = s, t.output = s, t.workflowOutputPath = s, t.workflow_output = s, t["workflow-output"] = s, t.workflow_output_path = s, t["workflow-output-path"] = s); + const i = (await this.api.releaseWorkflow(t)).path ?? s ?? e ?? ".github/workflows/release.yml"; this.workflowSuccess = `Workflow generated at ${i}`; - } catch (s) { - this.error = s.message ?? "Failed to generate release workflow"; + } catch (t) { + this.error = t.message ?? "Failed to generate release workflow"; } finally { this.generatingWorkflow = !1; } @@ -1295,23 +1528,23 @@ let g = class extends k { async handleDryRun() { await this.doRelease(!0); } - async doRelease(s) { + async doRelease(t) { var e; this.releasing = !0, this.error = "", this.releaseSuccess = ""; try { - const t = await this.api.release(s), r = s ? "Dry run complete" : "Release published"; - this.releaseSuccess = `${r} — ${t.version} (${((e = t.artifacts) == null ? void 0 : e.length) ?? 0} artifact(s))`, await this.reload(); - } catch (t) { - this.error = t.message ?? "Release failed"; + const s = await this.api.release(t), r = t ? "Dry run complete" : "Release published"; + this.releaseSuccess = `${r} — ${s.version} (${((e = s.artifacts) == null ? void 0 : e.length) ?? 0} artifact(s))`, await this.reload(); + } catch (s) { + this.error = s.message ?? "Release failed"; } finally { this.releasing = !1; } } render() { - return this.loading ? l`
Loading release information\u2026
` : l` - ${this.error ? l`
${this.error}
` : c} - ${this.releaseSuccess ? l`
${this.releaseSuccess}
` : c} - ${this.workflowSuccess ? l`
${this.workflowSuccess}
` : c} + return this.loading ? n`
Loading release information\u2026
` : n` + ${this.error ? n`
${this.error}
` : l} + ${this.releaseSuccess ? n`
${this.releaseSuccess}
` : l} + ${this.workflowSuccess ? n`
${this.workflowSuccess}
` : l}
@@ -1373,24 +1606,24 @@ let g = class extends k {
- ${this.confirmRelease ? l` + ${this.confirmRelease ? n`
This will publish ${this.version} to all configured targets. This action cannot be undone. Continue?
- ` : c} + ` : l} - ${this.changelog ? l` + ${this.changelog ? n`
Changelog
${this.changelog}
- ` : l`
No changelog available.
`} + ` : n`
No changelog available.
`} `; } }; -g.styles = F` +m.styles = V` :host { display: block; font-family: system-ui, -apple-system, sans-serif; @@ -1637,56 +1870,56 @@ g.styles = F` margin-bottom: 1rem; } `; -v([ - D({ attribute: "api-url" }) -], g.prototype, "apiUrl", 2); -v([ - f() -], g.prototype, "version", 2); -v([ - f() -], g.prototype, "changelog", 2); -v([ - f() -], g.prototype, "loading", 2); -v([ - f() -], g.prototype, "error", 2); -v([ - f() -], g.prototype, "releasing", 2); -v([ - f() -], g.prototype, "confirmRelease", 2); -v([ - f() -], g.prototype, "releaseSuccess", 2); -v([ - f() -], g.prototype, "workflowPath", 2); -v([ - f() -], g.prototype, "workflowOutputPath", 2); -v([ - f() -], g.prototype, "generatingWorkflow", 2); -v([ - f() -], g.prototype, "workflowSuccess", 2); -g = v([ - K("core-build-release") -], g); -var et = Object.defineProperty, tt = Object.getOwnPropertyDescriptor, w = (s, e, t, r) => { - for (var i = r > 1 ? void 0 : r ? tt(e, t) : e, o = s.length - 1, a; o >= 0; o--) - (a = s[o]) && (i = (r ? a(e, t, i) : a(i)) || i); - return r && i && et(e, t, i), i; +y([ + z({ attribute: "api-url" }) +], m.prototype, "apiUrl", 2); +y([ + p() +], m.prototype, "version", 2); +y([ + p() +], m.prototype, "changelog", 2); +y([ + p() +], m.prototype, "loading", 2); +y([ + p() +], m.prototype, "error", 2); +y([ + p() +], m.prototype, "releasing", 2); +y([ + p() +], m.prototype, "confirmRelease", 2); +y([ + p() +], m.prototype, "releaseSuccess", 2); +y([ + p() +], m.prototype, "workflowPath", 2); +y([ + p() +], m.prototype, "workflowOutputPath", 2); +y([ + p() +], m.prototype, "generatingWorkflow", 2); +y([ + p() +], m.prototype, "workflowSuccess", 2); +m = y([ + J("core-build-release") +], m); +var tt = Object.defineProperty, st = Object.getOwnPropertyDescriptor, k = (t, e, s, r) => { + for (var i = r > 1 ? void 0 : r ? st(e, s) : e, a = t.length - 1, o; a >= 0; a--) + (o = t[a]) && (i = (r ? o(e, s, i) : o(i)) || i); + return r && i && tt(e, s, i), i; }; -let m = class extends k { +let $ = class extends A { constructor() { super(...arguments), this.apiUrl = "", this.basePath = "", this.revisionPath = "", this.diffResult = null, this.diffing = !1, this.diffError = "", this.selectedLanguage = "", this.generating = !1, this.generateError = "", this.generateSuccess = ""; } connectedCallback() { - super.connectedCallback(), this.api = new Y(this.apiUrl); + super.connectedCallback(), this.api = new ee(this.apiUrl); } async reload() { this.diffResult = null, this.diffError = "", this.generateError = "", this.generateSuccess = ""; @@ -1699,8 +1932,8 @@ let m = class extends k { this.diffing = !0, this.diffError = "", this.diffResult = null; try { this.diffResult = await this.api.sdkDiff(this.basePath.trim(), this.revisionPath.trim()); - } catch (s) { - this.diffError = s.message ?? "Diff failed"; + } catch (t) { + this.diffError = t.message ?? "Diff failed"; } finally { this.diffing = !1; } @@ -1710,14 +1943,14 @@ let m = class extends k { try { const e = (await this.api.sdkGenerate(this.selectedLanguage || void 0)).language || "all languages"; this.generateSuccess = `SDK generated successfully for ${e}.`; - } catch (s) { - this.generateError = s.message ?? "Generation failed"; + } catch (t) { + this.generateError = t.message ?? "Generation failed"; } finally { this.generating = !1; } } render() { - return l` + return n`
OpenAPI Diff
@@ -1728,7 +1961,7 @@ let m = class extends k { type="text" placeholder="path/to/base.yaml" .value=${this.basePath} - @input=${(s) => this.basePath = s.target.value} + @input=${(t) => this.basePath = t.target.value} />
@@ -1737,7 +1970,7 @@ let m = class extends k { type="text" placeholder="path/to/revision.yaml" .value=${this.revisionPath} - @input=${(s) => this.revisionPath = s.target.value} + @input=${(t) => this.revisionPath = t.target.value} />
- ${this.diffError ? l`
${this.diffError}
` : c} + ${this.diffError ? n`
${this.diffError}
` : l} - ${this.diffResult ? l` + ${this.diffResult ? n`
${this.diffResult.Summary}
- ${this.diffResult.Changes && this.diffResult.Changes.length > 0 ? l` + ${this.diffResult.Changes && this.diffResult.Changes.length > 0 ? n`
    ${this.diffResult.Changes.map( - (s) => l`
  • ${s}
  • ` + (t) => n`
  • ${t}
  • ` )}
- ` : c} + ` : l}
- ` : c} + ` : l}
SDK Generation
- ${this.generateError ? l`
${this.generateError}
` : c} - ${this.generateSuccess ? l`
${this.generateSuccess}
` : c} + ${this.generateError ? n`
${this.generateError}
` : l} + ${this.generateSuccess ? n`
${this.generateSuccess}
` : l}