@webwriter/branching-scenario
Version:
Create adaptable learning experiences by authoring a gamebook, where you present the student with choices on how to continue.
1,129 lines (1,107 loc) • 1.17 MB
JavaScript
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : Symbol.for("Symbol." + name);
var __typeError = (msg2) => {
throw TypeError(msg2);
};
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __esm = (fn, res) => function __init() {
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
};
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __decoratorStart = (base) => [, , , __create(base?.[__knownSymbol("metadata")] ?? null)];
var __decoratorStrings = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"];
var __expectFn = (fn) => fn !== void 0 && typeof fn !== "function" ? __typeError("Function expected") : fn;
var __decoratorContext = (kind, name, done, metadata, fns) => ({ kind: __decoratorStrings[kind], name, metadata, addInitializer: (fn) => done._ ? __typeError("Already initialized") : fns.push(__expectFn(fn || null)) });
var __decoratorMetadata = (array, target) => __defNormalProp(target, __knownSymbol("metadata"), array[3]);
var __runInitializers = (array, flags, self2, value) => {
for (var i11 = 0, fns = array[flags >> 1], n13 = fns && fns.length; i11 < n13; i11++) flags & 1 ? fns[i11].call(self2) : value = fns[i11].call(self2, value);
return value;
};
var __decorateElement = (array, flags, name, decorators, target, extra) => {
var fn, it, done, ctx, access, k3 = flags & 7, s10 = !!(flags & 8), p5 = !!(flags & 16);
var j3 = k3 > 3 ? array.length + 1 : k3 ? s10 ? 1 : 2 : 0, key = __decoratorStrings[k3 + 5];
var initializers = k3 > 3 && (array[j3 - 1] = []), extraInitializers = array[j3] || (array[j3] = []);
var desc = k3 && (!p5 && !s10 && (target = target.prototype), k3 < 5 && (k3 > 3 || !p5) && __getOwnPropDesc(k3 < 4 ? target : { get [name]() {
return __privateGet(this, extra);
}, set [name](x3) {
return __privateSet(this, extra, x3);
} }, name));
k3 ? p5 && k3 < 4 && __name(extra, (k3 > 2 ? "set " : k3 > 1 ? "get " : "") + name) : __name(target, name);
for (var i11 = decorators.length - 1; i11 >= 0; i11--) {
ctx = __decoratorContext(k3, name, done = {}, array[3], extraInitializers);
if (k3) {
ctx.static = s10, ctx.private = p5, access = ctx.access = { has: p5 ? (x3) => __privateIn(target, x3) : (x3) => name in x3 };
if (k3 ^ 3) access.get = p5 ? (x3) => (k3 ^ 1 ? __privateGet : __privateMethod)(x3, target, k3 ^ 4 ? extra : desc.get) : (x3) => x3[name];
if (k3 > 2) access.set = p5 ? (x3, y4) => __privateSet(x3, target, y4, k3 ^ 4 ? extra : desc.set) : (x3, y4) => x3[name] = y4;
}
it = (0, decorators[i11])(k3 ? k3 < 4 ? p5 ? extra : desc[key] : k3 > 4 ? void 0 : { get: desc.get, set: desc.set } : target, ctx), done._ = 1;
if (k3 ^ 4 || it === void 0) __expectFn(it) && (k3 > 4 ? initializers.unshift(it) : k3 ? p5 ? extra = it : desc[key] = it : target = it);
else if (typeof it !== "object" || it === null) __typeError("Object expected");
else __expectFn(fn = it.get) && (desc.get = fn), __expectFn(fn = it.set) && (desc.set = fn), __expectFn(fn = it.init) && initializers.unshift(fn);
}
return k3 || __decoratorMetadata(array, target), desc && __defProp(target, name, desc), p5 ? k3 ^ 4 ? extra : desc : target;
};
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
var __accessCheck = (obj, member, msg2) => member.has(obj) || __typeError("Cannot " + msg2);
var __privateIn = (member, obj) => Object(obj) !== obj ? __typeError('Cannot use the "in" operator on this value') : member.has(obj);
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
// node_modules/@lit/reactive-element/css-tag.js
var t, e, s, o, n, r, i, S, c;
var init_css_tag = __esm({
"node_modules/@lit/reactive-element/css-tag.js"() {
t = globalThis;
e = t.ShadowRoot && (void 0 === t.ShadyCSS || t.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype;
s = Symbol();
o = /* @__PURE__ */ new WeakMap();
n = class {
constructor(t9, e15, o16) {
if (this._$cssResult$ = true, o16 !== s) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
this.cssText = t9, this.t = e15;
}
get styleSheet() {
let t9 = this.o;
const s10 = this.t;
if (e && void 0 === t9) {
const e15 = void 0 !== s10 && 1 === s10.length;
e15 && (t9 = o.get(s10)), void 0 === t9 && ((this.o = t9 = new CSSStyleSheet()).replaceSync(this.cssText), e15 && o.set(s10, t9));
}
return t9;
}
toString() {
return this.cssText;
}
};
r = (t9) => new n("string" == typeof t9 ? t9 : t9 + "", void 0, s);
i = (t9, ...e15) => {
const o16 = 1 === t9.length ? t9[0] : e15.reduce((e16, s10, o17) => e16 + ((t10) => {
if (true === t10._$cssResult$) return t10.cssText;
if ("number" == typeof t10) return t10;
throw Error("Value passed to 'css' function must be a 'css' function result: " + t10 + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
})(s10) + t9[o17 + 1], t9[0]);
return new n(o16, t9, s);
};
S = (s10, o16) => {
if (e) s10.adoptedStyleSheets = o16.map((t9) => t9 instanceof CSSStyleSheet ? t9 : t9.styleSheet);
else for (const e15 of o16) {
const o17 = document.createElement("style"), n13 = t.litNonce;
void 0 !== n13 && o17.setAttribute("nonce", n13), o17.textContent = e15.cssText, s10.appendChild(o17);
}
};
c = e ? (t9) => t9 : (t9) => t9 instanceof CSSStyleSheet ? ((t10) => {
let e15 = "";
for (const s10 of t10.cssRules) e15 += s10.cssText;
return r(e15);
})(t9) : t9;
}
});
// node_modules/@lit/reactive-element/reactive-element.js
var i2, e2, h, r2, o2, n2, a, c2, l, p, d, u, f, b, y;
var init_reactive_element = __esm({
"node_modules/@lit/reactive-element/reactive-element.js"() {
init_css_tag();
init_css_tag();
({ is: i2, defineProperty: e2, getOwnPropertyDescriptor: h, getOwnPropertyNames: r2, getOwnPropertySymbols: o2, getPrototypeOf: n2 } = Object);
a = globalThis;
c2 = a.trustedTypes;
l = c2 ? c2.emptyScript : "";
p = a.reactiveElementPolyfillSupport;
d = (t9, s10) => t9;
u = { toAttribute(t9, s10) {
switch (s10) {
case Boolean:
t9 = t9 ? l : null;
break;
case Object:
case Array:
t9 = null == t9 ? t9 : JSON.stringify(t9);
}
return t9;
}, fromAttribute(t9, s10) {
let i11 = t9;
switch (s10) {
case Boolean:
i11 = null !== t9;
break;
case Number:
i11 = null === t9 ? null : Number(t9);
break;
case Object:
case Array:
try {
i11 = JSON.parse(t9);
} catch (t10) {
i11 = null;
}
}
return i11;
} };
f = (t9, s10) => !i2(t9, s10);
b = { attribute: true, type: String, converter: u, reflect: false, useDefault: false, hasChanged: f };
Symbol.metadata ??= Symbol("metadata"), a.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
y = class extends HTMLElement {
static addInitializer(t9) {
this._$Ei(), (this.l ??= []).push(t9);
}
static get observedAttributes() {
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
}
static createProperty(t9, s10 = b) {
if (s10.state && (s10.attribute = false), this._$Ei(), this.prototype.hasOwnProperty(t9) && ((s10 = Object.create(s10)).wrapped = true), this.elementProperties.set(t9, s10), !s10.noAccessor) {
const i11 = Symbol(), h7 = this.getPropertyDescriptor(t9, i11, s10);
void 0 !== h7 && e2(this.prototype, t9, h7);
}
}
static getPropertyDescriptor(t9, s10, i11) {
const { get: e15, set: r12 } = h(this.prototype, t9) ?? { get() {
return this[s10];
}, set(t10) {
this[s10] = t10;
} };
return { get: e15, set(s11) {
const h7 = e15?.call(this);
r12?.call(this, s11), this.requestUpdate(t9, h7, i11);
}, configurable: true, enumerable: true };
}
static getPropertyOptions(t9) {
return this.elementProperties.get(t9) ?? b;
}
static _$Ei() {
if (this.hasOwnProperty(d("elementProperties"))) return;
const t9 = n2(this);
t9.finalize(), void 0 !== t9.l && (this.l = [...t9.l]), this.elementProperties = new Map(t9.elementProperties);
}
static finalize() {
if (this.hasOwnProperty(d("finalized"))) return;
if (this.finalized = true, this._$Ei(), this.hasOwnProperty(d("properties"))) {
const t10 = this.properties, s10 = [...r2(t10), ...o2(t10)];
for (const i11 of s10) this.createProperty(i11, t10[i11]);
}
const t9 = this[Symbol.metadata];
if (null !== t9) {
const s10 = litPropertyMetadata.get(t9);
if (void 0 !== s10) for (const [t10, i11] of s10) this.elementProperties.set(t10, i11);
}
this._$Eh = /* @__PURE__ */ new Map();
for (const [t10, s10] of this.elementProperties) {
const i11 = this._$Eu(t10, s10);
void 0 !== i11 && this._$Eh.set(i11, t10);
}
this.elementStyles = this.finalizeStyles(this.styles);
}
static finalizeStyles(s10) {
const i11 = [];
if (Array.isArray(s10)) {
const e15 = new Set(s10.flat(1 / 0).reverse());
for (const s11 of e15) i11.unshift(c(s11));
} else void 0 !== s10 && i11.push(c(s10));
return i11;
}
static _$Eu(t9, s10) {
const i11 = s10.attribute;
return false === i11 ? void 0 : "string" == typeof i11 ? i11 : "string" == typeof t9 ? t9.toLowerCase() : void 0;
}
constructor() {
super(), this._$Ep = void 0, this.isUpdatePending = false, this.hasUpdated = false, this._$Em = null, this._$Ev();
}
_$Ev() {
this._$ES = new Promise((t9) => this.enableUpdating = t9), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach((t9) => t9(this));
}
addController(t9) {
(this._$EO ??= /* @__PURE__ */ new Set()).add(t9), void 0 !== this.renderRoot && this.isConnected && t9.hostConnected?.();
}
removeController(t9) {
this._$EO?.delete(t9);
}
_$E_() {
const t9 = /* @__PURE__ */ new Map(), s10 = this.constructor.elementProperties;
for (const i11 of s10.keys()) this.hasOwnProperty(i11) && (t9.set(i11, this[i11]), delete this[i11]);
t9.size > 0 && (this._$Ep = t9);
}
createRenderRoot() {
const t9 = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
return S(t9, this.constructor.elementStyles), t9;
}
connectedCallback() {
this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(true), this._$EO?.forEach((t9) => t9.hostConnected?.());
}
enableUpdating(t9) {
}
disconnectedCallback() {
this._$EO?.forEach((t9) => t9.hostDisconnected?.());
}
attributeChangedCallback(t9, s10, i11) {
this._$AK(t9, i11);
}
_$ET(t9, s10) {
const i11 = this.constructor.elementProperties.get(t9), e15 = this.constructor._$Eu(t9, i11);
if (void 0 !== e15 && true === i11.reflect) {
const h7 = (void 0 !== i11.converter?.toAttribute ? i11.converter : u).toAttribute(s10, i11.type);
this._$Em = t9, null == h7 ? this.removeAttribute(e15) : this.setAttribute(e15, h7), this._$Em = null;
}
}
_$AK(t9, s10) {
const i11 = this.constructor, e15 = i11._$Eh.get(t9);
if (void 0 !== e15 && this._$Em !== e15) {
const t10 = i11.getPropertyOptions(e15), h7 = "function" == typeof t10.converter ? { fromAttribute: t10.converter } : void 0 !== t10.converter?.fromAttribute ? t10.converter : u;
this._$Em = e15;
const r12 = h7.fromAttribute(s10, t10.type);
this[e15] = r12 ?? this._$Ej?.get(e15) ?? r12, this._$Em = null;
}
}
requestUpdate(t9, s10, i11, e15 = false, h7) {
if (void 0 !== t9) {
const r12 = this.constructor;
if (false === e15 && (h7 = this[t9]), i11 ??= r12.getPropertyOptions(t9), !((i11.hasChanged ?? f)(h7, s10) || i11.useDefault && i11.reflect && h7 === this._$Ej?.get(t9) && !this.hasAttribute(r12._$Eu(t9, i11)))) return;
this.C(t9, s10, i11);
}
false === this.isUpdatePending && (this._$ES = this._$EP());
}
C(t9, s10, { useDefault: i11, reflect: e15, wrapped: h7 }, r12) {
i11 && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t9) && (this._$Ej.set(t9, r12 ?? s10 ?? this[t9]), true !== h7 || void 0 !== r12) || (this._$AL.has(t9) || (this.hasUpdated || i11 || (s10 = void 0), this._$AL.set(t9, s10)), true === e15 && this._$Em !== t9 && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t9));
}
async _$EP() {
this.isUpdatePending = true;
try {
await this._$ES;
} catch (t10) {
Promise.reject(t10);
}
const t9 = this.scheduleUpdate();
return null != t9 && await t9, !this.isUpdatePending;
}
scheduleUpdate() {
return this.performUpdate();
}
performUpdate() {
if (!this.isUpdatePending) return;
if (!this.hasUpdated) {
if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
for (const [t11, s11] of this._$Ep) this[t11] = s11;
this._$Ep = void 0;
}
const t10 = this.constructor.elementProperties;
if (t10.size > 0) for (const [s11, i11] of t10) {
const { wrapped: t11 } = i11, e15 = this[s11];
true !== t11 || this._$AL.has(s11) || void 0 === e15 || this.C(s11, void 0, i11, e15);
}
}
let t9 = false;
const s10 = this._$AL;
try {
t9 = this.shouldUpdate(s10), t9 ? (this.willUpdate(s10), this._$EO?.forEach((t10) => t10.hostUpdate?.()), this.update(s10)) : this._$EM();
} catch (s11) {
throw t9 = false, this._$EM(), s11;
}
t9 && this._$AE(s10);
}
willUpdate(t9) {
}
_$AE(t9) {
this._$EO?.forEach((t10) => t10.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(t9)), this.updated(t9);
}
_$EM() {
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = false;
}
get updateComplete() {
return this.getUpdateComplete();
}
getUpdateComplete() {
return this._$ES;
}
shouldUpdate(t9) {
return true;
}
update(t9) {
this._$Eq &&= this._$Eq.forEach((t10) => this._$ET(t10, this[t10])), this._$EM();
}
updated(t9) {
}
firstUpdated(t9) {
}
};
y.elementStyles = [], y.shadowRootOptions = { mode: "open" }, y[d("elementProperties")] = /* @__PURE__ */ new Map(), y[d("finalized")] = /* @__PURE__ */ new Map(), p?.({ ReactiveElement: y }), (a.reactiveElementVersions ??= []).push("2.1.2");
}
});
// node_modules/lit-html/lit-html.js
function V(t9, i11) {
if (!u2(t9) || !t9.hasOwnProperty("raw")) throw Error("invalid template strings array");
return void 0 !== e3 ? e3.createHTML(i11) : i11;
}
function M(t9, i11, s10 = t9, e15) {
if (i11 === E) return i11;
let h7 = void 0 !== e15 ? s10._$Co?.[e15] : s10._$Cl;
const o16 = a2(i11) ? void 0 : i11._$litDirective$;
return h7?.constructor !== o16 && (h7?._$AO?.(false), void 0 === o16 ? h7 = void 0 : (h7 = new o16(t9), h7._$AT(t9, s10, e15)), void 0 !== e15 ? (s10._$Co ??= [])[e15] = h7 : s10._$Cl = h7), void 0 !== h7 && (i11 = M(t9, h7._$AS(t9, i11.values), h7, e15)), i11;
}
var t2, i3, s2, e3, h2, o3, n3, r3, l2, c3, a2, u2, d2, f2, v, _, m, p2, g, $, y2, x, b2, w, T, E, A, C, P, N, S2, R, k, H, I, L, z, Z, j, B, D;
var init_lit_html = __esm({
"node_modules/lit-html/lit-html.js"() {
t2 = globalThis;
i3 = (t9) => t9;
s2 = t2.trustedTypes;
e3 = s2 ? s2.createPolicy("lit-html", { createHTML: (t9) => t9 }) : void 0;
h2 = "$lit$";
o3 = `lit$${Math.random().toFixed(9).slice(2)}$`;
n3 = "?" + o3;
r3 = `<${n3}>`;
l2 = document;
c3 = () => l2.createComment("");
a2 = (t9) => null === t9 || "object" != typeof t9 && "function" != typeof t9;
u2 = Array.isArray;
d2 = (t9) => u2(t9) || "function" == typeof t9?.[Symbol.iterator];
f2 = "[ \n\f\r]";
v = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g;
_ = /-->/g;
m = />/g;
p2 = RegExp(`>|${f2}(?:([^\\s"'>=/]+)(${f2}*=${f2}*(?:[^
\f\r"'\`<>=]|("|')|))|$)`, "g");
g = /'/g;
$ = /"/g;
y2 = /^(?:script|style|textarea|title)$/i;
x = (t9) => (i11, ...s10) => ({ _$litType$: t9, strings: i11, values: s10 });
b2 = x(1);
w = x(2);
T = x(3);
E = Symbol.for("lit-noChange");
A = Symbol.for("lit-nothing");
C = /* @__PURE__ */ new WeakMap();
P = l2.createTreeWalker(l2, 129);
N = (t9, i11) => {
const s10 = t9.length - 1, e15 = [];
let n13, l7 = 2 === i11 ? "<svg>" : 3 === i11 ? "<math>" : "", c9 = v;
for (let i12 = 0; i12 < s10; i12++) {
const s11 = t9[i12];
let a5, u7, d4 = -1, f5 = 0;
for (; f5 < s11.length && (c9.lastIndex = f5, u7 = c9.exec(s11), null !== u7); ) f5 = c9.lastIndex, c9 === v ? "!--" === u7[1] ? c9 = _ : void 0 !== u7[1] ? c9 = m : void 0 !== u7[2] ? (y2.test(u7[2]) && (n13 = RegExp("</" + u7[2], "g")), c9 = p2) : void 0 !== u7[3] && (c9 = p2) : c9 === p2 ? ">" === u7[0] ? (c9 = n13 ?? v, d4 = -1) : void 0 === u7[1] ? d4 = -2 : (d4 = c9.lastIndex - u7[2].length, a5 = u7[1], c9 = void 0 === u7[3] ? p2 : '"' === u7[3] ? $ : g) : c9 === $ || c9 === g ? c9 = p2 : c9 === _ || c9 === m ? c9 = v : (c9 = p2, n13 = void 0);
const x3 = c9 === p2 && t9[i12 + 1].startsWith("/>") ? " " : "";
l7 += c9 === v ? s11 + r3 : d4 >= 0 ? (e15.push(a5), s11.slice(0, d4) + h2 + s11.slice(d4) + o3 + x3) : s11 + o3 + (-2 === d4 ? i12 : x3);
}
return [V(t9, l7 + (t9[s10] || "<?>") + (2 === i11 ? "</svg>" : 3 === i11 ? "</math>" : "")), e15];
};
S2 = class _S {
constructor({ strings: t9, _$litType$: i11 }, e15) {
let r12;
this.parts = [];
let l7 = 0, a5 = 0;
const u7 = t9.length - 1, d4 = this.parts, [f5, v4] = N(t9, i11);
if (this.el = _S.createElement(f5, e15), P.currentNode = this.el.content, 2 === i11 || 3 === i11) {
const t10 = this.el.content.firstChild;
t10.replaceWith(...t10.childNodes);
}
for (; null !== (r12 = P.nextNode()) && d4.length < u7; ) {
if (1 === r12.nodeType) {
if (r12.hasAttributes()) for (const t10 of r12.getAttributeNames()) if (t10.endsWith(h2)) {
const i12 = v4[a5++], s10 = r12.getAttribute(t10).split(o3), e16 = /([.?@])?(.*)/.exec(i12);
d4.push({ type: 1, index: l7, name: e16[2], strings: s10, ctor: "." === e16[1] ? I : "?" === e16[1] ? L : "@" === e16[1] ? z : H }), r12.removeAttribute(t10);
} else t10.startsWith(o3) && (d4.push({ type: 6, index: l7 }), r12.removeAttribute(t10));
if (y2.test(r12.tagName)) {
const t10 = r12.textContent.split(o3), i12 = t10.length - 1;
if (i12 > 0) {
r12.textContent = s2 ? s2.emptyScript : "";
for (let s10 = 0; s10 < i12; s10++) r12.append(t10[s10], c3()), P.nextNode(), d4.push({ type: 2, index: ++l7 });
r12.append(t10[i12], c3());
}
}
} else if (8 === r12.nodeType) if (r12.data === n3) d4.push({ type: 2, index: l7 });
else {
let t10 = -1;
for (; -1 !== (t10 = r12.data.indexOf(o3, t10 + 1)); ) d4.push({ type: 7, index: l7 }), t10 += o3.length - 1;
}
l7++;
}
}
static createElement(t9, i11) {
const s10 = l2.createElement("template");
return s10.innerHTML = t9, s10;
}
};
R = class {
constructor(t9, i11) {
this._$AV = [], this._$AN = void 0, this._$AD = t9, this._$AM = i11;
}
get parentNode() {
return this._$AM.parentNode;
}
get _$AU() {
return this._$AM._$AU;
}
u(t9) {
const { el: { content: i11 }, parts: s10 } = this._$AD, e15 = (t9?.creationScope ?? l2).importNode(i11, true);
P.currentNode = e15;
let h7 = P.nextNode(), o16 = 0, n13 = 0, r12 = s10[0];
for (; void 0 !== r12; ) {
if (o16 === r12.index) {
let i12;
2 === r12.type ? i12 = new k(h7, h7.nextSibling, this, t9) : 1 === r12.type ? i12 = new r12.ctor(h7, r12.name, r12.strings, this, t9) : 6 === r12.type && (i12 = new Z(h7, this, t9)), this._$AV.push(i12), r12 = s10[++n13];
}
o16 !== r12?.index && (h7 = P.nextNode(), o16++);
}
return P.currentNode = l2, e15;
}
p(t9) {
let i11 = 0;
for (const s10 of this._$AV) void 0 !== s10 && (void 0 !== s10.strings ? (s10._$AI(t9, s10, i11), i11 += s10.strings.length - 2) : s10._$AI(t9[i11])), i11++;
}
};
k = class _k {
get _$AU() {
return this._$AM?._$AU ?? this._$Cv;
}
constructor(t9, i11, s10, e15) {
this.type = 2, this._$AH = A, this._$AN = void 0, this._$AA = t9, this._$AB = i11, this._$AM = s10, this.options = e15, this._$Cv = e15?.isConnected ?? true;
}
get parentNode() {
let t9 = this._$AA.parentNode;
const i11 = this._$AM;
return void 0 !== i11 && 11 === t9?.nodeType && (t9 = i11.parentNode), t9;
}
get startNode() {
return this._$AA;
}
get endNode() {
return this._$AB;
}
_$AI(t9, i11 = this) {
t9 = M(this, t9, i11), a2(t9) ? t9 === A || null == t9 || "" === t9 ? (this._$AH !== A && this._$AR(), this._$AH = A) : t9 !== this._$AH && t9 !== E && this._(t9) : void 0 !== t9._$litType$ ? this.$(t9) : void 0 !== t9.nodeType ? this.T(t9) : d2(t9) ? this.k(t9) : this._(t9);
}
O(t9) {
return this._$AA.parentNode.insertBefore(t9, this._$AB);
}
T(t9) {
this._$AH !== t9 && (this._$AR(), this._$AH = this.O(t9));
}
_(t9) {
this._$AH !== A && a2(this._$AH) ? this._$AA.nextSibling.data = t9 : this.T(l2.createTextNode(t9)), this._$AH = t9;
}
$(t9) {
const { values: i11, _$litType$: s10 } = t9, e15 = "number" == typeof s10 ? this._$AC(t9) : (void 0 === s10.el && (s10.el = S2.createElement(V(s10.h, s10.h[0]), this.options)), s10);
if (this._$AH?._$AD === e15) this._$AH.p(i11);
else {
const t10 = new R(e15, this), s11 = t10.u(this.options);
t10.p(i11), this.T(s11), this._$AH = t10;
}
}
_$AC(t9) {
let i11 = C.get(t9.strings);
return void 0 === i11 && C.set(t9.strings, i11 = new S2(t9)), i11;
}
k(t9) {
u2(this._$AH) || (this._$AH = [], this._$AR());
const i11 = this._$AH;
let s10, e15 = 0;
for (const h7 of t9) e15 === i11.length ? i11.push(s10 = new _k(this.O(c3()), this.O(c3()), this, this.options)) : s10 = i11[e15], s10._$AI(h7), e15++;
e15 < i11.length && (this._$AR(s10 && s10._$AB.nextSibling, e15), i11.length = e15);
}
_$AR(t9 = this._$AA.nextSibling, s10) {
for (this._$AP?.(false, true, s10); t9 !== this._$AB; ) {
const s11 = i3(t9).nextSibling;
i3(t9).remove(), t9 = s11;
}
}
setConnected(t9) {
void 0 === this._$AM && (this._$Cv = t9, this._$AP?.(t9));
}
};
H = class {
get tagName() {
return this.element.tagName;
}
get _$AU() {
return this._$AM._$AU;
}
constructor(t9, i11, s10, e15, h7) {
this.type = 1, this._$AH = A, this._$AN = void 0, this.element = t9, this.name = i11, this._$AM = e15, this.options = h7, s10.length > 2 || "" !== s10[0] || "" !== s10[1] ? (this._$AH = Array(s10.length - 1).fill(new String()), this.strings = s10) : this._$AH = A;
}
_$AI(t9, i11 = this, s10, e15) {
const h7 = this.strings;
let o16 = false;
if (void 0 === h7) t9 = M(this, t9, i11, 0), o16 = !a2(t9) || t9 !== this._$AH && t9 !== E, o16 && (this._$AH = t9);
else {
const e16 = t9;
let n13, r12;
for (t9 = h7[0], n13 = 0; n13 < h7.length - 1; n13++) r12 = M(this, e16[s10 + n13], i11, n13), r12 === E && (r12 = this._$AH[n13]), o16 ||= !a2(r12) || r12 !== this._$AH[n13], r12 === A ? t9 = A : t9 !== A && (t9 += (r12 ?? "") + h7[n13 + 1]), this._$AH[n13] = r12;
}
o16 && !e15 && this.j(t9);
}
j(t9) {
t9 === A ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t9 ?? "");
}
};
I = class extends H {
constructor() {
super(...arguments), this.type = 3;
}
j(t9) {
this.element[this.name] = t9 === A ? void 0 : t9;
}
};
L = class extends H {
constructor() {
super(...arguments), this.type = 4;
}
j(t9) {
this.element.toggleAttribute(this.name, !!t9 && t9 !== A);
}
};
z = class extends H {
constructor(t9, i11, s10, e15, h7) {
super(t9, i11, s10, e15, h7), this.type = 5;
}
_$AI(t9, i11 = this) {
if ((t9 = M(this, t9, i11, 0) ?? A) === E) return;
const s10 = this._$AH, e15 = t9 === A && s10 !== A || t9.capture !== s10.capture || t9.once !== s10.once || t9.passive !== s10.passive, h7 = t9 !== A && (s10 === A || e15);
e15 && this.element.removeEventListener(this.name, this, s10), h7 && this.element.addEventListener(this.name, this, t9), this._$AH = t9;
}
handleEvent(t9) {
"function" == typeof this._$AH ? this._$AH.call(this.options?.host ?? this.element, t9) : this._$AH.handleEvent(t9);
}
};
Z = class {
constructor(t9, i11, s10) {
this.element = t9, this.type = 6, this._$AN = void 0, this._$AM = i11, this.options = s10;
}
get _$AU() {
return this._$AM._$AU;
}
_$AI(t9) {
M(this, t9);
}
};
j = { M: h2, P: o3, A: n3, C: 1, L: N, R, D: d2, V: M, I: k, H, N: L, U: z, B: I, F: Z };
B = t2.litHtmlPolyfillSupport;
B?.(S2, k), (t2.litHtmlVersions ??= []).push("3.3.2");
D = (t9, i11, s10) => {
const e15 = s10?.renderBefore ?? i11;
let h7 = e15._$litPart$;
if (void 0 === h7) {
const t10 = s10?.renderBefore ?? null;
e15._$litPart$ = h7 = new k(i11.insertBefore(c3(), t10), t10, void 0, s10 ?? {});
}
return h7._$AI(t9), h7;
};
}
});
// node_modules/lit-element/lit-element.js
var s3, i4, o4;
var init_lit_element = __esm({
"node_modules/lit-element/lit-element.js"() {
init_reactive_element();
init_reactive_element();
init_lit_html();
init_lit_html();
s3 = globalThis;
i4 = class extends y {
constructor() {
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
}
createRenderRoot() {
const t9 = super.createRenderRoot();
return this.renderOptions.renderBefore ??= t9.firstChild, t9;
}
update(t9) {
const r12 = this.render();
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t9), this._$Do = D(r12, this.renderRoot, this.renderOptions);
}
connectedCallback() {
super.connectedCallback(), this._$Do?.setConnected(true);
}
disconnectedCallback() {
super.disconnectedCallback(), this._$Do?.setConnected(false);
}
render() {
return E;
}
};
i4._$litElement$ = true, i4["finalized"] = true, s3.litElementHydrateSupport?.({ LitElement: i4 });
o4 = s3.litElementPolyfillSupport;
o4?.({ LitElement: i4 });
(s3.litElementVersions ??= []).push("4.2.2");
}
});
// node_modules/lit-html/is-server.js
var init_is_server = __esm({
"node_modules/lit-html/is-server.js"() {
}
});
// node_modules/lit/index.js
var init_lit = __esm({
"node_modules/lit/index.js"() {
init_reactive_element();
init_lit_html();
init_lit_element();
init_is_server();
}
});
// node_modules/@lit/localize/internal/locale-status-event.js
var LOCALE_STATUS_EVENT;
var init_locale_status_event = __esm({
"node_modules/@lit/localize/internal/locale-status-event.js"() {
LOCALE_STATUS_EVENT = "lit-localize-status";
}
});
// node_modules/@lit/localize/internal/str-tag.js
var _str, str, isStrTagged, joinStringsAndValues;
var init_str_tag = __esm({
"node_modules/@lit/localize/internal/str-tag.js"() {
_str = (strings, ...values) => ({
strTag: true,
strings,
values
});
str = _str;
isStrTagged = (val) => typeof val !== "string" && "strTag" in val;
joinStringsAndValues = (strings, values, valueOrder) => {
let concat = strings[0];
for (let i11 = 1; i11 < strings.length; i11++) {
concat += values[valueOrder ? valueOrder[i11 - 1] : i11 - 1];
concat += strings[i11];
}
return concat;
};
}
});
// node_modules/@lit/localize/internal/types.js
var init_types = __esm({
"node_modules/@lit/localize/internal/types.js"() {
}
});
// node_modules/@lit/localize/internal/default-msg.js
var defaultMsg;
var init_default_msg = __esm({
"node_modules/@lit/localize/internal/default-msg.js"() {
init_str_tag();
defaultMsg = ((template) => isStrTagged(template) ? joinStringsAndValues(template.strings, template.values) : template);
}
});
// node_modules/@lit/localize/init/install.js
function _installMsgImplementation(impl) {
if (installed) {
throw new Error("lit-localize can only be configured once");
}
msg = impl;
installed = true;
}
var msg, installed;
var init_install = __esm({
"node_modules/@lit/localize/init/install.js"() {
init_default_msg();
msg = defaultMsg;
installed = false;
}
});
// node_modules/@lit/localize/internal/localized-controller.js
var LocalizeController, _updateWhenLocaleChanges, updateWhenLocaleChanges;
var init_localized_controller = __esm({
"node_modules/@lit/localize/internal/localized-controller.js"() {
init_locale_status_event();
LocalizeController = class {
constructor(host) {
this.__litLocalizeEventHandler = (event) => {
if (event.detail.status === "ready") {
this.host.requestUpdate();
}
};
this.host = host;
}
hostConnected() {
window.addEventListener(LOCALE_STATUS_EVENT, this.__litLocalizeEventHandler);
}
hostDisconnected() {
window.removeEventListener(LOCALE_STATUS_EVENT, this.__litLocalizeEventHandler);
}
};
_updateWhenLocaleChanges = (host) => host.addController(new LocalizeController(host));
updateWhenLocaleChanges = _updateWhenLocaleChanges;
}
});
// node_modules/@lit/localize/internal/localized-decorator.js
var localized;
var init_localized_decorator = __esm({
"node_modules/@lit/localize/internal/localized-decorator.js"() {
init_localized_controller();
localized = () => (clazz, _context) => {
clazz.addInitializer(updateWhenLocaleChanges);
return clazz;
};
}
});
// node_modules/@lit/localize/internal/deferred.js
var Deferred;
var init_deferred = __esm({
"node_modules/@lit/localize/internal/deferred.js"() {
Deferred = class {
constructor() {
this.settled = false;
this.promise = new Promise((resolve, reject) => {
this._resolve = resolve;
this._reject = reject;
});
}
resolve(value) {
this.settled = true;
this._resolve(value);
}
reject(error) {
this.settled = true;
this._reject(error);
}
};
}
});
// node_modules/@lit/localize/internal/fnv1a64.js
function fnv1a64(str4) {
let t0 = 0, v0 = 8997, t1 = 0, v1 = 33826, t23 = 0, v22 = 40164, t32 = 0, v32 = 52210;
for (let i11 = 0; i11 < str4.length; i11++) {
v0 ^= str4.charCodeAt(i11);
t0 = v0 * 435;
t1 = v1 * 435;
t23 = v22 * 435;
t32 = v32 * 435;
t23 += v0 << 8;
t32 += v1 << 8;
t1 += t0 >>> 16;
v0 = t0 & 65535;
t23 += t1 >>> 16;
v1 = t1 & 65535;
v32 = t32 + (t23 >>> 16) & 65535;
v22 = t23 & 65535;
}
return hl[v32 >> 8] + hl[v32 & 255] + hl[v22 >> 8] + hl[v22 & 255] + hl[v1 >> 8] + hl[v1 & 255] + hl[v0 >> 8] + hl[v0 & 255];
}
var hl;
var init_fnv1a64 = __esm({
"node_modules/@lit/localize/internal/fnv1a64.js"() {
hl = [];
for (let i11 = 0; i11 < 256; i11++) {
hl[i11] = (i11 >> 4 & 15).toString(16) + (i11 & 15).toString(16);
}
}
});
// node_modules/@lit/localize/internal/id-generation.js
function generateMsgId(strings, isHtmlTagged) {
return (isHtmlTagged ? HTML_PREFIX : STRING_PREFIX) + fnv1a64(typeof strings === "string" ? strings : strings.join(HASH_DELIMITER));
}
var HASH_DELIMITER, HTML_PREFIX, STRING_PREFIX;
var init_id_generation = __esm({
"node_modules/@lit/localize/internal/id-generation.js"() {
init_fnv1a64();
HASH_DELIMITER = "";
HTML_PREFIX = "h";
STRING_PREFIX = "s";
}
});
// node_modules/@lit/localize/internal/runtime-msg.js
function runtimeMsg(templates3, template, options) {
if (templates3) {
const id3 = options?.id ?? generateId(template);
const localized2 = templates3[id3];
if (localized2) {
if (typeof localized2 === "string") {
return localized2;
} else if ("strTag" in localized2) {
return joinStringsAndValues(
localized2.strings,
// Cast `template` because its type wasn't automatically narrowed (but
// we know it must be the same type as `localized`).
template.values,
localized2.values
);
} else {
let order = expressionOrders.get(localized2);
if (order === void 0) {
order = localized2.values;
expressionOrders.set(localized2, order);
}
return {
...localized2,
values: order.map((i11) => template.values[i11])
};
}
}
}
return defaultMsg(template);
}
function generateId(template) {
const strings = typeof template === "string" ? template : template.strings;
let id3 = hashCache.get(strings);
if (id3 === void 0) {
id3 = generateMsgId(strings, typeof template !== "string" && !("strTag" in template));
hashCache.set(strings, id3);
}
return id3;
}
var expressionOrders, hashCache;
var init_runtime_msg = __esm({
"node_modules/@lit/localize/internal/runtime-msg.js"() {
init_default_msg();
init_str_tag();
init_id_generation();
expressionOrders = /* @__PURE__ */ new WeakMap();
hashCache = /* @__PURE__ */ new Map();
}
});
// node_modules/@lit/localize/init/runtime.js
function dispatchStatusEvent(detail) {
window.dispatchEvent(new CustomEvent(LOCALE_STATUS_EVENT, { detail }));
}
var activeLocale, loadingLocale, sourceLocale, validLocales, loadLocale, templates, loading, requestId, configureLocalization, getLocale, setLocale;
var init_runtime = __esm({
"node_modules/@lit/localize/init/runtime.js"() {
init_deferred();
init_locale_status_event();
init_runtime_msg();
init_install();
activeLocale = "";
loading = new Deferred();
loading.resolve();
requestId = 0;
configureLocalization = (config) => {
_installMsgImplementation(((template, options) => runtimeMsg(templates, template, options)));
activeLocale = sourceLocale = config.sourceLocale;
validLocales = new Set(config.targetLocales);
validLocales.add(config.sourceLocale);
loadLocale = config.loadLocale;
return { getLocale, setLocale };
};
getLocale = () => {
return activeLocale;
};
setLocale = (newLocale) => {
if (newLocale === (loadingLocale ?? activeLocale)) {
return loading.promise;
}
if (!validLocales || !loadLocale) {
throw new Error("Internal error");
}
if (!validLocales.has(newLocale)) {
throw new Error("Invalid locale code");
}
requestId++;
const thisRequestId = requestId;
loadingLocale = newLocale;
if (loading.settled) {
loading = new Deferred();
}
dispatchStatusEvent({ status: "loading", loadingLocale: newLocale });
const localePromise = newLocale === sourceLocale ? (
// We could switch to the source locale synchronously, but we prefer to
// queue it on a microtask so that switching locales is consistently
// asynchronous.
Promise.resolve({ templates: void 0 })
) : loadLocale(newLocale);
localePromise.then((mod) => {
if (requestId === thisRequestId) {
activeLocale = newLocale;
loadingLocale = void 0;
templates = mod.templates;
dispatchStatusEvent({ status: "ready", readyLocale: newLocale });
loading.resolve();
}
}, (err) => {
if (requestId === thisRequestId) {
dispatchStatusEvent({
status: "error",
errorLocale: newLocale,
errorMessage: err.toString()
});
loading.reject(err);
}
});
return loading.promise;
};
}
});
// node_modules/@lit/localize/init/transform.js
var init_transform = __esm({
"node_modules/@lit/localize/init/transform.js"() {
init_default_msg();
init_install();
}
});
// node_modules/@lit/localize/lit-localize.js
var init_lit_localize = __esm({
"node_modules/@lit/localize/lit-localize.js"() {
init_locale_status_event();
init_str_tag();
init_types();
init_install();
init_localized_controller();
init_localized_decorator();
init_runtime();
init_transform();
}
});
// src/generated/locales/de.ts
var de_exports = {};
__export(de_exports, {
templates: () => templates2
});
var templates2;
var init_de = __esm({
"src/generated/locales/de.ts"() {
init_lit();
init_lit_localize();
templates2 = {
"h753ba5217e074fe6": b2`
Verwenden Sie die <strong>Suchleiste</strong> um Knoten zu finden nach
<strong>Titel</strong>, <strong>Typ</strong>, und
<strong>Inhalt</strong>. <br><br>
<em>Tipp:</em> Durch Anklicken der Suchleiste wird ein
<strong>Liste mit allen Knoten</strong>. Klicken Sie auf einen beliebigen Knoten in der Liste
um <strong>ihn im Knoteneditor</strong> auszuwählen.
`,
"h7eb8e051be10e053": b2`
Fügt ein vordefiniertes <strong>Muster</strong> aus mehreren
<strong>verbundenen Knoten</strong> in den Knoteneditor.<br><br>
Auf diese Weise können Sie schnell einen strukturierten Satz von Knoten hinzufügen
ohne manuelle Platzierung.
`,
"s03acb46b5470e0c9": `Geben Sie dem neuen`,
"s0491e53d9de2e899": `Abbrechen`,
"s060e481b4a246a3e": `Start Seite`,
"s081de6398e897576": `Vergr\xF6\xDFern/Verkleinern`,
"s09134f2a8084426d": `Zugriff auf`,
"s0b52f3ea315aa9be": `Seiten Knoten`,
"s0bdca49248ba4820": `Shortcuts`,
"s0c17144a11b9576e": ` Verbinden Sie einen Knoten um Regeln basierend auf dessen Inhalt zu erstellen!`,
"s1a30b9a78d158c62": str`Unbenannte Verzweigung ${0}`,
"s26d236d09a66a620": `Regeln`,
"s291e8cf07019837e": `Knoten suchen...`,
"s2ceb11be2290bb1b": `Abbrechen`,
"s2e192b19ed15fcf6": `Seite`,
"s3687049d1af562c4": `Kopieren`,
"s3b151ca64eb26ec1": `Ausklappen`,
"s42657469b069bee8": `Erste Seite`,
"s443fac2814907e18": str`Ausgänge (${0})`,
"s46d93e3b43f99a6f": `Unbenanntes Gamebook`,
"s487473fdf35474ff": `Verzweigungs Knoten`,
"s4993444bfd3f3e5e": `Einklappen`,
"s51cf605b81d7c915": `Verbindung ziehen`,
"s524638d3ef766239": `Keine Verzweigungsregeln`,
"s57f8d0db44da6177": `Ausgang l\xF6schen`,
"s5b01e19e4efa5a9e": `Schlie\xDFen verhindern`,
"s5c17e8980e6b5b18": `Klicken Sie auf einen Knoten um dessen Inhalt zu sehen`,
"s5f2f575fee43e7f8": `Einzelne Knoten`,
"s5f7ab55b6ba8729c": `Schreiben Sie etwas hier...`,
"s5fc4562bab5298a4": str` Eingehend (${0})`,
"s603d69217de4e83b": `Keine Knoten gefunden`,
"s629e3dc56b1d35e9": `einen Namen!`,
"s6abd1339f5659d50": `Mehrere Knoten`,
"s6ac0c20ddc5c15ff": `Seiten`,
"s6fd70a9a8c6d8355": str`Unbenannte Seite ${0}`,
"s748c82bdc348610f": `Wenn Neuladen dieses Problem nicht l\xF6st, versuchen Sie den Knoten neu zu erstellen.`,
"s75d83fc3f0cfab40": `Kopfzeile`,
"s7984347f31306aca": `Popup zu Seiten`,
"s7a07940a2b62f185": `Verzweigung`,
"s7aaa8587048ed4d9": `Element ausw\xE4hlen`,
"s7e617fb8024f45f4": `Quiz Verzweigung zu Seiten`,
"s7f747127243108b9": `Popup zu Popups`,
"s801ca3f7c573aebd": `Nicht verbunden`,
"s9e1a091f1c7c53b0": str`Unbenanntes Popup ${0}`,
"sa805b1e63ef896e4": str` Sie sind im Begriff den Ausgang ${0} zu löschen, obwohl dieser eine Verbindung hat. Wollen Sie fortfahren?`,
"sac7bd907d39a570e": `Graphen L\xF6schen`,
"sad79fd47752866d8": `Knoten neu erstellen`,
"sad9ce781382a9f6e": `Wenn keine Regel erf\xFCllt ist, gehe zu`,
"sae5d9ee99fe0a8f5": `Erfordert`,
"sb4f1dffbb6be6302": `L\xF6schen`,
"sb5a5848245f9e0e8": `Zur Start Seite machen`,
"sb89f410de72cb268": `Knoten hinzuf\xFCgen`,
"sc7aeb596f1dcb1bd": `Popup`,
"scda086c697995b38": `Der Inhalt dieses Knotens kann nicht gefunden werden.`,
"sd0182c6d73eaa2be": `Bedingung`,
"sd1c592ccade3cd3c": `Zum Ursprungsknoten`,
"sd374c80e17e18808": `Einf\xFCgen`,
"sd8c7b6a9132e593b": `M\xF6chten Sie den Inhalt des Graphen l\xF6schen? Ihr gesamter Fortschritt geht verloren.`,
"sd9bdfc0f95188eea": `Knoten l\xF6schen`,
"sdc3d2121c3bc5907": `Popup Knoten`,
"sdc673e73b5c13aea": `L\xF6schen`,
"secf2ae437afa81c6": `Erstellen Sie Regeln to diktieren wie ihr Gamebook weitergeht. Die erste Regel die erf\xFCllt ist, wird angewendet.`,
"sf80fa7d9bacf0a78": str`Sie sind dabei, den Knoten ${0} zu löschen. Wollen Sie fortfahren?`,
"sf9aee319a006c9b4": `Hinzuf\xFCgen`,
"sfc63e31ac7c956ed": `Ausw\xE4hlen`
};
}
});
// node_modules/drawflow/dist/drawflow.min.js
var require_drawflow_min = __commonJS({
"node_modules/drawflow/dist/drawflow.min.js"(exports, module) {
!(function(e15, t9) {
"object" == typeof exports && "object" == typeof module ? module.exports = t9() : "function" == typeof define && define.amd ? define([], t9) : "object" == typeof exports ? exports.Drawflow = t9() : e15.Drawflow = t9();
})("undefined" != typeof self ? self : exports, (function() {
return (function(e15) {
var t9 = {};
function n13(i11) {
if (t9[i11]) return t9[i11].exports;
var s10 = t9[i11] = { i: i11, l: false, exports: {} };
return e15[i11].call(s10.exports, s10, s10.exports, n13), s10.l = true, s10.exports;
}
return n13.m = e15, n13.c = t9, n13.d = function(e16, t10, i11) {
n13.o(e16, t10) || Object.defineProperty(e16, t10, { enumerable: true, get: i11 });
}, n13.r = function(e16) {
"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e16, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e16, "__esModule", { value: true });
}, n13.t = function(e16, t10) {
if (1 & t10 && (e16 = n13(e16)), 8 & t10) return e16;
if (4 & t10 && "object" == typeof e16 && e16 && e16.__esModule) return e16;
var i11 = /* @__PURE__ */ Object.create(null);
if (n13.r(i11), Object.defineProperty(i11, "default", { enumerable: true, value: e16 }), 2 & t10 && "string" != typeof e16) for (var s10 in e16) n13.d(i11, s10, function(t11) {
return e16[t11];
}.bind(null, s10));
return i11;
}, n13.n = function(e16) {
var t10 = e16 && e16.__esModule ? function() {
return e16.default;
} : function() {
return e16;
};
return n13.d(t10, "a", t10), t10;
}, n13.o = function(e16, t10) {
return Object.prototype.hasOwnProperty.call(e16, t10);
}, n13.p = "", n13(n13.s = 0);
})([function(e15, t9, n13) {
"use strict";
n13.r(t9), n13.d(t9, "default", (function() {
return i11;
}));
class i11 {
constructor(e16, t10 = null, n14 = null) {
this.events = {}, this.container = e16, this.precanvas = null, this.nodeId = 1, this.ele_selected = null, this.node_selected = null, this.drag = false, this.reroute = false, this.reroute_fix_curvature = false, this.curvature = 0.5, this.reroute_curvature_start_end = 0.5, this.reroute_curvature = 0.5, this.reroute_width = 6, this.drag_point = false, this.editor_selected = false, this.connection = false, this.connection_ele = null, this.connection_selected = null, this.canvas_x = 0, this.canvas_y = 0, this.pos_x = 0, this.pos_x_start = 0, this.pos_y = 0, this.pos_y_start = 0, this.mouse_x = 0, this.mouse_y = 0, this.line_path = 5, this.first_click = null, this.force_first_input = false, this.draggable_inputs = true, this.useuuid = false, this.parent = n14, this.noderegister = {}, this.render = t10, this.drawflow = { drawflow: { Home: { data: {} } } }, this.module = "Home", this.editor_mode = "edit", this.zoom = 1, this.zoom_max = 1.6, this.zoom_min = 0.5, this.zoom_value = 0.1, this.zoom_last_value = 1, this.evCache = new Array(), this.prevDiff = -1;
}
start() {
this.container.classList.add("parent-drawflow"), this.container.tabIndex = 0, this.precanvas = document.createElement("div"), this.precanvas.classList.add("drawflow"), this.container.appendChild(this.precanvas), this.container.addEventListener("mouseup", this.dragEnd.bind(this)), this.container.addEventListener("mousemove", this.position.bind(this)), this.container.addEventListener("mousedown", this.click.bind(this)), this.container.addEventListener("touchend", this.dragEnd.bind(this)), this.container.addEventListener("touchmove", this.position.bind(this)), this.container.addEventListener("touchstart", this.click.bind(this)), this.container.addEventListener("contextmenu", this.contextmenu.bind(this)), this.container.addEventListener("keydown", this.key.bind(this)), this.container.addEventListener("wheel", this.zoom_enter.bind(this)), this.container.addEventListener("input", this.updateNodeValue.bind(this)), this.container.addEventListener("dblclick", this.dblclick.bind(this)), this.container.onpointerdown = this.pointerdown_handler.bind(this), this.container.onpointermove = this.pointermove_handler.bind(this), this.container.onpointerup = this.pointerup_handler.bind(this), this.container.onpointercancel = this.pointerup_handler.bind(this), this.container.onpointerout = this.pointerup_handler.bind(this), this.container.onpointerleave = this.pointerup_handler.bind(this), this.load();
}
pointerdown_handler(e16) {
this.evCache.push(e16);
}
pointermove_handler(e16) {
for (var t10 = 0; t10 < this.evCache.length; t10++) if (e16.pointerId == this.evCa