Files
worldwideview/public/plugins/embassies/frontend.mjs

110 lines
3.3 KiB
JavaScript

//#region ../../node_modules/.pnpm/[email protected][email protected]/node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js
var e = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), t = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), n = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), r = (e) => {
let t = n(e);
return t.charAt(0).toUpperCase() + t.slice(1);
}, i = {
xmlns: "http://www.w3.org/2000/svg",
width: 24,
height: 24,
viewBox: "0 0 24 24",
fill: "none",
stroke: "currentColor",
strokeWidth: 2,
strokeLinecap: "round",
strokeLinejoin: "round"
}, a = (e) => {
for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
return !1;
}, o = globalThis.__WWV_HOST__.React.forwardRef(({ color: t = "currentColor", size: n = 24, strokeWidth: r = 2, absoluteStrokeWidth: o, className: s = "", children: c, iconNode: l, ...u }, d) => globalThis.__WWV_HOST__.React.createElement("svg", {
ref: d,
...i,
width: n,
height: n,
stroke: t,
strokeWidth: o ? Number(r) * 24 / Number(n) : r,
className: e("lucide", s),
...!c && !a(u) && { "aria-hidden": "true" },
...u
}, [...l.map(([e, t]) => globalThis.__WWV_HOST__.React.createElement(e, t)), ...Array.isArray(c) ? c : [c]])), s = ((n, i) => {
let a = globalThis.__WWV_HOST__.React.forwardRef(({ className: a, ...s }, c) => globalThis.__WWV_HOST__.React.createElement(o, {
ref: c,
iconNode: i,
className: e(`lucide-${t(r(n))}`, `lucide-${n}`, a),
...s
}));
return a.displayName = r(n), a;
})("landmark", [
["path", {
d: "M10 18v-7",
key: "wt116b"
}],
["path", {
d: "M11.12 2.198a2 2 0 0 1 1.76.006l7.866 3.847c.476.233.31.949-.22.949H3.474c-.53 0-.695-.716-.22-.949z",
key: "1m329m"
}],
["path", {
d: "M14 18v-7",
key: "vav6t3"
}],
["path", {
d: "M18 18v-7",
key: "aexdmj"
}],
["path", {
d: "M3 22h18",
key: "8prr45"
}],
["path", {
d: "M6 18v-7",
key: "1ivflk"
}]
]), c = class {
context = null;
iconUrls = {};
defaultLayerColor = "#3b82f6";
clusterDistance = 50;
maxEntities = 5e3;
iconScale = 1;
async initialize(e) {
this.context = e;
}
destroy() {
this.context = null;
}
async fetch(e) {
return [];
}
getPollingInterval() {
return 0;
}
getLayerConfig() {
return {
color: this.defaultLayerColor,
clusterEnabled: !0,
clusterDistance: this.clusterDistance,
maxEntities: this.maxEntities
};
}
getEntityColor(e) {
return this.defaultLayerColor;
}
getEntityIcon(e) {
return this.icon;
}
renderEntity(e) {
let t = this.getEntityColor(e), n = this.getEntityIcon(e), r = `${n?.displayName || n?.name || "default"}-${t}`;
return this.iconUrls[r] || (this.iconUrls[r] = globalThis.__WWV_HOST__.WWVPluginSDK.createSvgIconUrl(n, { color: t })), {
type: "billboard",
iconUrl: this.iconUrls[r],
color: t,
iconScale: this.iconScale
};
}
}, l = class extends c {
constructor(...e) {
super(...e), this.id = "embassies", this.name = "Embassies & Consulates", this.description = "Global embassies, consulates, and diplomatic missions from OpenStreetMap", this.icon = s, this.category = "infrastructure", this.version = "1.0.3", this.defaultLayerColor = "#a855f7", this.maxEntities = 1e3;
}
};
//#endregion
export { l as EmbassiesConsulatesPlugin };