'use strict';

var index = require('./index-C_OnxXhP.js');

var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
//#region src/core/platform.ts
var n = { };
//#endregion
//#region src/limetype/property.ts
function i(e) {
	return e && [
		"belongsto",
		"hasone",
		"hasmany",
		"hasandbelongstomany"
	].includes(e.type);
}
function a(e) {
	return e && ["belongsto", "hasone"].includes(e.type);
}
//#endregion
//#region src/limetype/types.ts
n.LimeTypeRepository = "state.limetypes";
//#endregion
//#region node_modules/tslib/tslib.es6.mjs
var l = function(e, t) {
	return l = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
		e.__proto__ = t;
	} || function(e, t) {
		for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
	}, l(e, t);
};
function u(e, t) {
	if (typeof t != "function" && t !== null) throw TypeError("Class extends value " + String(t) + " is not a constructor or null");
	l(e, t);
	function n() {
		this.constructor = e;
	}
	e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n());
}
function d(e) {
	var t = typeof Symbol == "function" && Symbol.iterator, n = t && e[t], r = 0;
	if (n) return n.call(e);
	if (e && typeof e.length == "number") return { next: function() {
		return e && r >= e.length && (e = void 0), {
			value: e && e[r++],
			done: !e
		};
	} };
	throw TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
function f(e, t) {
	var n = typeof Symbol == "function" && e[Symbol.iterator];
	if (!n) return e;
	var r = n.call(e), i, a = [], o;
	try {
		for (; !(i = r.next()).done;) a.push(i.value);
	} catch (e) {
		o = { error: e };
	} finally {
		try {
			i && !i.done && (n = r.return) && n.call(r);
		} finally {
			if (o) throw o.error;
		}
	}
	return a;
}
function p(e, t, n) {
	if (arguments.length === 2) for (var r = 0, i = t.length, a; r < i; r++) (a || !(r in t)) && (a ||= Array.prototype.slice.call(t, 0, r), a[r] = t[r]);
	return e.concat(a || Array.prototype.slice.call(t));
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/util/isFunction.js
function m(e) {
	return typeof e == "function";
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js
function h(e) {
	var t = e(function(e) {
		Error.call(e), e.stack = (/* @__PURE__ */ Error()).stack;
	});
	return t.prototype = Object.create(Error.prototype), t.prototype.constructor = t, t;
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js
var g = h(function(e) {
	return function(t) {
		e(this), this.message = t ? t.length + " errors occurred during unsubscription:\n" + t.map(function(e, t) {
			return t + 1 + ") " + e.toString();
		}).join("\n  ") : "", this.name = "UnsubscriptionError", this.errors = t;
	};
});
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/util/arrRemove.js
function _(e, t) {
	if (e) {
		var n = e.indexOf(t);
		0 <= n && e.splice(n, 1);
	}
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/Subscription.js
var v = function() {
	function e(e) {
		this.initialTeardown = e, this.closed = false, this._parentage = null, this._finalizers = null;
	}
	return e.prototype.unsubscribe = function() {
		var e, t, n, r, i;
		if (!this.closed) {
			this.closed = true;
			var a = this._parentage;
			if (a) if (this._parentage = null, Array.isArray(a)) try {
				for (var o = d(a), s = o.next(); !s.done; s = o.next()) s.value.remove(this);
			} catch (t) {
				e = { error: t };
			} finally {
				try {
					s && !s.done && (t = o.return) && t.call(o);
				} finally {
					if (e) throw e.error;
				}
			}
			else a.remove(this);
			var c = this.initialTeardown;
			if (m(c)) try {
				c();
			} catch (e) {
				i = e instanceof g ? e.errors : [e];
			}
			var l = this._finalizers;
			if (l) {
				this._finalizers = null;
				try {
					for (var u = d(l), h = u.next(); !h.done; h = u.next()) {
						var _ = h.value;
						try {
							b(_);
						} catch (e) {
							i ??= [], e instanceof g ? i = p(p([], f(i)), f(e.errors)) : i.push(e);
						}
					}
				} catch (e) {
					n = { error: e };
				} finally {
					try {
						h && !h.done && (r = u.return) && r.call(u);
					} finally {
						if (n) throw n.error;
					}
				}
			}
			if (i) throw new g(i);
		}
	}, e.prototype.add = function(t) {
		if (t && t !== this) if (this.closed) b(t);
		else {
			if (t instanceof e) {
				if (t.closed || t._hasParent(this)) return;
				t._addParent(this);
			}
			(this._finalizers = this._finalizers ?? []).push(t);
		}
	}, e.prototype._hasParent = function(e) {
		var t = this._parentage;
		return t === e || Array.isArray(t) && t.includes(e);
	}, e.prototype._addParent = function(e) {
		var t = this._parentage;
		this._parentage = Array.isArray(t) ? (t.push(e), t) : t ? [t, e] : e;
	}, e.prototype._removeParent = function(e) {
		var t = this._parentage;
		t === e ? this._parentage = null : Array.isArray(t) && _(t, e);
	}, e.prototype.remove = function(t) {
		var n = this._finalizers;
		n && _(n, t), t instanceof e && t._removeParent(this);
	}, e.EMPTY = (function() {
		var t = new e();
		return t.closed = true, t;
	})(), e;
}(), ee = v.EMPTY;
function y(e) {
	return e instanceof v || e && "closed" in e && m(e.remove) && m(e.add) && m(e.unsubscribe);
}
function b(e) {
	m(e) ? e() : e.unsubscribe();
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/config.js
var x = {
	Promise: void 0}, S = {
	setTimeout: function(e, t) {
		var n = [...arguments].slice(2);
		return setTimeout.apply(void 0, p([e, t], f(n)));
	},
	clearTimeout: function(e) {
		return (clearTimeout)(e);
	},
	delegate: void 0
};
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js
function te(e) {
	S.setTimeout(function() {
		throw e;
	});
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/util/noop.js
function C() {}
function E(e) {
	e();
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/Subscriber.js
var oe = function(e) {
	u(t, e);
	function t(t) {
		var n = e.call(this) || this;
		return n.isStopped = false, t ? (n.destination = t, y(t) && t.add(n)) : n.destination = ue, n;
	}
	return t.create = function(e, t, n) {
		return new O(e, t, n);
	}, t.prototype.next = function(e) {
		this.isStopped ? A() : this._next(e);
	}, t.prototype.error = function(e) {
		this.isStopped ? A() : (this.isStopped = true, this._error(e));
	}, t.prototype.complete = function() {
		this.isStopped ? A() : (this.isStopped = true, this._complete());
	}, t.prototype.unsubscribe = function() {
		this.closed || (this.isStopped = true, e.prototype.unsubscribe.call(this), this.destination = null);
	}, t.prototype._next = function(e) {
		this.destination.next(e);
	}, t.prototype._error = function(e) {
		try {
			this.destination.error(e);
		} finally {
			this.unsubscribe();
		}
	}, t.prototype._complete = function() {
		try {
			this.destination.complete();
		} finally {
			this.unsubscribe();
		}
	}, t;
}(v);
var ce = function() {
	function e(e) {
		this.partialObserver = e;
	}
	return e.prototype.next = function(e) {
		var t = this.partialObserver;
		if (t.next) try {
			t.next(e);
		} catch (e) {
			k(e);
		}
	}, e.prototype.error = function(e) {
		var t = this.partialObserver;
		if (t.error) try {
			t.error(e);
		} catch (e) {
			k(e);
		}
		else k(e);
	}, e.prototype.complete = function() {
		var e = this.partialObserver;
		if (e.complete) try {
			e.complete();
		} catch (e) {
			k(e);
		}
	}, e;
}(), O = function(e) {
	u(t, e);
	function t(t, n, r) {
		var i = e.call(this) || this, a;
		if (m(t) || !t) a = {
			next: t ?? void 0,
			error: n ?? void 0,
			complete: r ?? void 0
		};
		else {
			a = t;
		}
		return i.destination = new ce(a), i;
	}
	return t;
}(oe);
function k(e) {
	te(e);
}
function le(e) {
	throw e;
}
function A(e, t) {
}
var ue = {
	closed: true,
	next: C,
	error: le,
	complete: C
}, de = (function() {
	return typeof Symbol == "function" && Symbol.observable || "@@observable";
})();
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/util/identity.js
function fe(e) {
	return e;
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/util/pipe.js
function pe(e) {
	return e.length === 0 ? fe : e.length === 1 ? e[0] : function(t) {
		return e.reduce(function(e, t) {
			return t(e);
		}, t);
	};
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/Observable.js
var j = function() {
	function e(e) {
		e && (this._subscribe = e);
	}
	return e.prototype.lift = function(t) {
		var n = new e();
		return n.source = this, n.operator = t, n;
	}, e.prototype.subscribe = function(e, t, n) {
		var r = this, i = he(e) ? e : new O(e, t, n);
		return E(function() {
			var e = r, t = e.operator, n = e.source;
			i.add(t ? t.call(i, n) : n ? r._subscribe(i) : r._trySubscribe(i));
		}), i;
	}, e.prototype._trySubscribe = function(e) {
		try {
			return this._subscribe(e);
		} catch (t) {
			e.error(t);
		}
	}, e.prototype.forEach = function(e, t) {
		var n = this;
		return t = M(t), new t(function(t, r) {
			var i = new O({
				next: function(t) {
					try {
						e(t);
					} catch (e) {
						r(e), i.unsubscribe();
					}
				},
				error: r,
				complete: t
			});
			n.subscribe(i);
		});
	}, e.prototype._subscribe = function(e) {
		return this.source?.subscribe(e);
	}, e.prototype[de] = function() {
		return this;
	}, e.prototype.pipe = function() {
		return pe([...arguments])(this);
	}, e.prototype.toPromise = function(e) {
		var t = this;
		return e = M(e), new e(function(e, n) {
			var r;
			t.subscribe(function(e) {
				return r = e;
			}, function(e) {
				return n(e);
			}, function() {
				return e(r);
			});
		});
	}, e.create = function(t) {
		return new e(t);
	}, e;
}();
function M(e) {
	return e ?? x.Promise ?? Promise;
}
function me(e) {
	return e && m(e.next) && m(e.error) && m(e.complete);
}
function he(e) {
	return e && e instanceof oe || me(e) && y(e);
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/util/ObjectUnsubscribedError.js
var ge = h(function(e) {
	return function() {
		e(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
	};
}), N = function(e) {
	u(t, e);
	function t() {
		var t = e.call(this) || this;
		return t.closed = false, t.currentObservers = null, t.observers = [], t.isStopped = false, t.hasError = false, t.thrownError = null, t;
	}
	return t.prototype.lift = function(e) {
		var t = new P(this, this);
		return t.operator = e, t;
	}, t.prototype._throwIfClosed = function() {
		if (this.closed) throw new ge();
	}, t.prototype.next = function(e) {
		var t = this;
		E(function() {
			var n, r;
			if (t._throwIfClosed(), !t.isStopped) {
				t.currentObservers ||= Array.from(t.observers);
				try {
					for (var i = d(t.currentObservers), a = i.next(); !a.done; a = i.next()) a.value.next(e);
				} catch (e) {
					n = { error: e };
				} finally {
					try {
						a && !a.done && (r = i.return) && r.call(i);
					} finally {
						if (n) throw n.error;
					}
				}
			}
		});
	}, t.prototype.error = function(e) {
		var t = this;
		E(function() {
			if (t._throwIfClosed(), !t.isStopped) {
				t.hasError = t.isStopped = true, t.thrownError = e;
				for (var n = t.observers; n.length;) n.shift().error(e);
			}
		});
	}, t.prototype.complete = function() {
		var e = this;
		E(function() {
			if (e._throwIfClosed(), !e.isStopped) {
				e.isStopped = true;
				for (var t = e.observers; t.length;) t.shift().complete();
			}
		});
	}, t.prototype.unsubscribe = function() {
		this.isStopped = this.closed = true, this.observers = this.currentObservers = null;
	}, Object.defineProperty(t.prototype, "observed", {
		get: function() {
			return this.observers?.length > 0;
		},
		enumerable: false,
		configurable: true
	}), t.prototype._trySubscribe = function(t) {
		return this._throwIfClosed(), e.prototype._trySubscribe.call(this, t);
	}, t.prototype._subscribe = function(e) {
		return this._throwIfClosed(), this._checkFinalizedStatuses(e), this._innerSubscribe(e);
	}, t.prototype._innerSubscribe = function(e) {
		var t = this, n = this, r = n.hasError, i = n.isStopped, a = n.observers;
		return r || i ? ee : (this.currentObservers = null, a.push(e), new v(function() {
			t.currentObservers = null, _(a, e);
		}));
	}, t.prototype._checkFinalizedStatuses = function(e) {
		var t = this, n = t.hasError, r = t.thrownError, i = t.isStopped;
		n ? e.error(r) : i && e.complete();
	}, t.prototype.asObservable = function() {
		var e = new j();
		return e.source = this, e;
	}, t.create = function(e, t) {
		return new P(e, t);
	}, t;
}(j), P = function(e) {
	u(t, e);
	function t(t, n) {
		var r = e.call(this) || this;
		return r.destination = t, r.source = n, r;
	}
	return t.prototype.next = function(e) {
		var t, n;
		(n = (t = this.destination)?.next) == null || n.call(t, e);
	}, t.prototype.error = function(e) {
		var t, n;
		(n = (t = this.destination)?.error) == null || n.call(t, e);
	}, t.prototype.complete = function() {
		var e, t;
		(t = (e = this.destination)?.complete) == null || t.call(e);
	}, t.prototype._subscribe = function(e) {
		return this.source?.subscribe(e) ?? ee;
	}, t;
}(N), _e = function(e) {
	u(t, e);
	function t(t) {
		var n = e.call(this) || this;
		return n._value = t, n;
	}
	return Object.defineProperty(t.prototype, "value", {
		get: function() {
			return this.getValue();
		},
		enumerable: false,
		configurable: true
	}), t.prototype._subscribe = function(t) {
		var n = e.prototype._subscribe.call(this, t);
		return !n.closed && t.next(this._value), n;
	}, t.prototype.getValue = function() {
		var e = this, t = e.hasError, n = e.thrownError, r = e._value;
		if (t) throw n;
		return this._throwIfClosed(), r;
	}, t.prototype.next = function(t) {
		e.prototype.next.call(this, this._value = t);
	}, t;
}(N);
//#endregion
//#region src/core/decorators/factory.ts
function ve(e) {
	return e;
}
function F(e, t) {
	return (n, r) => {
		let i = be(n, r, e, t);
		i.length === 1 && xe(n, i);
	};
}
var I = /* @__PURE__ */ new WeakMap(), L = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ new WeakMap();
function be(e, t, n, r) {
	let i = I.get(e);
	return i || (i = [], I.set(e, i)), i.push({
		options: n,
		name: t,
		optionFactory: r.optionFactory || ve,
		service: {
			name: r.name,
			method: r.method || "subscribe"
		}
	}), i;
}
function xe(e, t) {
	e.connectedCallback = Se(e.connectedCallback, t), e.componentWillLoad = Ce(e.componentWillLoad, t), e.componentDidUnload = R(e.componentDidUnload), e.disconnectedCallback = R(e.disconnectedCallback);
}
function Se(e, t) {
	return async function(...n) {
		ye.set(this, true), L.set(this, []), await z(this);
		let r = new _e(this.context);
		Te(this, "context", r);
		for (let e of t) e.options = e.optionFactory(e.options, this), we(e.options) && (e.options.context = r), Ee(this, e);
		if (e) return e.apply(this, n);
	};
}
function Ce(e, t) {
	return async function(...n) {
		return ye.get(this) === true ? (await z(this), e ? e.apply(this, n) : void 0) : Se(e, t).apply(this, n);
	};
}
function R(e) {
	return async function(...t) {
		let n;
		return e && (n = e.apply(this, t)), De(this), n;
	};
}
function we(e) {
	return "context" in e;
}
function z(e) {
	let t = [];
	return e.platform || t.push(B(e, "platform")), e.context || t.push(B(e, "context")), t.length === 0 ? Promise.resolve() : Promise.all(t);
}
function B(t, n) {
	let r = index.getElement(t);
	return new Promise((e) => {
		Object.defineProperty(r, n, {
			configurable: true,
			set: (t) => {
				delete r[n], r[n] = t, e();
			}
		});
	});
}
function Te(t, n, r) {
	let i = index.getElement(t), { get: a, set: o } = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(i), n);
	Object.defineProperty(i, n, {
		configurable: true,
		get: a,
		set: function(e) {
			o.call(this, e), r.next(e);
		}
	});
}
function Ee(e, t) {
	let n = ke(e, t);
	typeof n == "function" && L.get(e).push(n);
}
function De(e) {
	let t = L.get(e);
	for (let e of t) e();
	L.set(e, []);
}
function Oe(e, t) {
	return (n) => {
		e[t] = n;
	};
}
function ke(e, t) {
	let n = { ...t.options };
	Ae(n, e);
	let r = t.service.name, i = e.platform;
	if (!i.has(r)) throw Error(`Service ${r} does not exist`);
	return i.get(r)[t.service.method](Oe(e, t.name), n);
}
function Ae(e, t) {
	e.filter &&= e.filter.map((e) => e.bind(t)), e.map &&= e.map.map((e) => e.bind(t));
}
//#endregion
//#region src/limetype/decorator.ts
function je(e = {}) {
	return F(e, { name: n.LimeTypeRepository });
}
function Me(e = {}) {
	let t = { name: n.LimeTypeRepository };
	return e.map = [Ne, ...e.map || []], e.context = null, F(e, t);
}
function Ne(e) {
	let { limetype: t } = this.context;
	return e[t];
}
//#endregion
//#region src/limeobject/types.ts
n.LimeObjectRepository = "state.limeobjects";
function ze(e = {}) {
	let t = { name: n.LimeObjectRepository };
	return e.map = [Be, ...e.map || []], e.context = null, F(e, t);
}
function Be(e) {
	let { limetype: t, id: n } = this.context;
	if (e[t]) return e[t].find((e) => e.id === n);
}
function H(e) {
	return (t) => {
		Ue(t, e.id), We(t, e.id);
	};
}
function Ue(e, t) {
	e.commandId = t;
}
function We(e, t) {
	Object.defineProperty(e, Symbol.hasInstance, { value: (e) => W(e).includes(t) });
}
function U(e) {
	return typeof e == "string" ? e : e && e.constructor && e.constructor.commandId ? e.constructor.commandId : e && e.commandId ? e.commandId : null;
}
function W(e) {
	let t = [], n, r = e;
	for (; n = U(r);) t = [...t, n], r = Object.getPrototypeOf(r);
	return [...new Set(t)];
}
//#endregion
//#region src/commandbus/types.ts
n.CommandBus = "commandBus";
//#endregion
//#region \0@oxc-project+runtime@0.127.0/helpers/decorate.js
function G(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}
//#endregion
//#region src/limeobject/commands/bulk-create-dialog.ts
var Ge = "limeobject.bulk-create-dialog", K = class {
	context;
	filter;
	relation;
};
K = G([H({ id: Ge })], K);
//#endregion
//#region src/limeobject/commands/create-dialog.ts
var Ke = "limeobject.create-dialog", q = class {
	limetype;
	limeobject;
	route = false;
	title;
	subtitle;
	context;
	autoAttachRelation;
	saveCommand;
};
q = G([H({ id: Ke })], q);
//#endregion
//#region src/limeobject/commands/delete-object.ts
var qe = "limeobject.delete-object", J = class {
	context;
};
J = G([H({ id: qe })], J);
//#endregion
//#region src/limeobject/commands/object-access.ts
var Je = "limeobject.object-access", Y = class {
	context;
};
Y = G([H({ id: Je })], Y);
//#endregion
//#region src/limeobject/commands/save-object.ts
var Ye = "limeobject.save-object", X = class {
	context;
	limeobject;
	route = false;
	label;
};
X = G([H({ id: Ye })], X);
//#endregion
//#region src/query/query.ts
var Xe = /* @__PURE__ */ function(e) {
	return e.AND = "AND", e.OR = "OR", e.NOT = "!", e.EQUALS = "=", e.NOT_EQUALS = "!=", e.GREATER = ">", e.LESS = "<", e.IN = "IN", e.BEGINS = "=?", e.LIKE = "?", e.LESS_OR_EQUAL = "<=", e.GREATER_OR_EQUAL = ">=", e.ENDS = "=$", e;
}({}), Ze = {
	Count: "COUNT"};
//#endregion
//#region src/query/types.ts
n.Query = "query";
//#endregion
//#region src/http/http.ts
var Qe = {
	Post: "POST"};
//#endregion
//#region src/navigator/types.ts
n.Http = "http", n.EventDispatcher = "eventDispatcher", n.Translate = "translate", n.Dialog = "dialog", n.KeybindingRegistry = "keybindingRegistry", n.Navigator = "navigator";
//#endregion
//#region src/navigator/command.ts
var et = "navigator.navigate", Z = class {
	path;
	query;
	hash;
	state;
};
//#endregion
//#region src/routeregistry/types.ts
Z = G([H({ id: et })], Z), n.Notification = "notifications", n.RouteRegistry = "routeRegistry";
//#endregion
//#region src/config/types.ts
n.TaskRepository = "state.tasks", n.ConfigRepository = "state.configs";
//#endregion
//#region src/config/decorator.ts
function rt(e) {
	return F(e, { name: n.ConfigRepository });
}
//#endregion
//#region src/device/types.ts
n.Device = "state.device";
//#endregion
//#region src/filter/types.ts
n.FilterRepository = "state.filters";
//#endregion
//#region src/filter/decorator.ts
function at(e = {}) {
	return F(e, { name: n.FilterRepository });
}
//#endregion
//#region src/userdata/types.ts
n.UserDataRepository = "state.user-data";
//#endregion
//#region src/application/types.ts
n.Application = "state.application";
//#endregion
//#region src/datetimeformatter/types.ts
n.UserPreferencesRepository = "userPreferences", n.DateTimeFormatter = "datetimeformatter";
//#endregion
//#region src/poller/types.ts
n.ConditionRegistry = "conditionRegistry", n.ViewFactoryRegistry = "viewFactoryRegistry", n.WebComponentRegistry = "webComponentRegistry", n.NotificationRepository = "state.notifications", n.PollerFactory = "pollerFactory";
//#endregion
//#region src/logger/types.ts
n.Logger = "logger";
//#endregion
//#region src/logger/factory.ts
var Q, $;
function gt(e) {
	let t = window.Lime?.logger?.createLogger;
	return typeof t == "function" ? ($ === void 0 && ($ = yt(_t())), $ && (e = `${$}:${e}`), t(e)) : (console.warn(`Logger factory is not configured. Returning console logger for scope "${e}".`), console);
}
function _t() {
	return Q === void 0 ? typeof (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.esm-iA818ZYg.js', document.baseURI).href)) == "string" ? (Q = (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.esm-iA818ZYg.js', document.baseURI).href)), Q) : (Q = vt(), Q) : Q;
}
function vt() {
	try {
		let e = (/* @__PURE__ */ Error(".")).stack;
		if (!e) return null;
		let t = e.split("\n");
		for (let e of t) {
			let t = e.match(/(https?:\/\/[^)\s:]+)/);
			if (t) return t[1];
		}
		return null;
	} catch {
		return null;
	}
}
function yt(e) {
	return e && (bt(e) || xt(e) || St(e) || Ct(e)) || null;
}
function bt(e) {
	let t = e.match(/\/([^/]+)-lwc-components\//);
	return t ? t[1] : null;
}
function xt(e) {
	let t = e.match(/\/packages\/(?:@[^/]+\/)?([^/]+)/);
	return t ? t[1] : null;
}
function St(e) {
	let t = e.indexOf("+");
	if (t === -1) return null;
	let n = e.slice(0, t), r = n.lastIndexOf("/");
	return r === -1 ? null : n.slice(r + 1);
}
function Ct(e) {
	let t = e.match(/\/static\/([^/]+)\//);
	return t ? t[1] : null;
}
//#endregion
//#region src/ai-context/types.ts
n.ProblemRepository = "problemRepository", n.AIContextRegistry = "aiContextRegistry";
//#endregion
//#region src/error/error.ts
var Tt = null;
function Et(e, t) {
	Tt ||= gt("uncaught-error");
	let n = {};
	t && (n.element = t.tagName, t.id && (n.elementId = t.id));
	let r = e instanceof Error ? e.message : String(e), i = e instanceof Error ? e : void 0;
	Tt.error(r, i, n);
}
try {
	index.setErrorHandler(Et);
} catch {}

exports.H = H;
exports.Me = Me;
exports.Qe = Qe;
exports.Xe = Xe;
exports.Ze = Ze;
exports.a = a;
exports.at = at;
exports.gt = gt;
exports.i = i;
exports.je = je;
exports.n = n;
exports.rt = rt;
exports.ze = ze;
