1import { L as g } from "./LoaderIcon-BOkmnW5w.js"; 2import { r as m } from "./CameraIcon-DGGvJsLb.js"; 3import { o as r, c as a, a as t, e as c, b as p, u as h, t as y, g as b } from "./app-BQglH-tG.js"; 4const v = { class: "flex flex-wrap items-center" }, _ = { class: "group relative mr-6 inline-block shrink-0" }, x = { key: 0, class: "absolute inset-0 flex h-12 w-12 items-center justify-center rounded-full bg-gray-200/50" }, k = ["src", "alt"], w = { key: 2, class: "aspect-square h-12 w-12 rounded-full bg-gray-200" }, j = ["for"], B = ["id", "name"], S = ["for"], q = { __name: "ProfilePictureUpload", props: { name: { type: String, default: () => "picture" }, icon: { type: [Object, String] }, loading: { type: Boolean, default: () => false } }, emits: ["file-upload"], setup(e, { emit: d }) { 5 const n = e, u = d, l = b(() => n.icon === null ? null : typeof n.icon == "string" || n.icon instanceof String ? n.icon : n.icon.url), f = (o) => { 6 var s = o.target.files || o.dataTransfer.files; 7 for (let i = 0; i < s.length; i++) u("file-upload", s[i]); 8 }; 9 return (o, s) => (r(), a("div", v, [t("div", _, [e.loading ? (r(), a("div", x, [c(g, { class: "h-5 w-5 animate-spin text-gray-800" })])) : p("", true), l.value ? (r(), a("img", { key: 1, class: "inline-block aspect-square h-12 w-12 rounded-full object-cover", src: l.value, alt: o.$t("Extension icon") }, null, 8, k)) : (r(), a("div", w)), s[0] || (s[0] = t("div", { class: "absolute inset-0 hidden h-12 w-12 bg-gray-200/15 group-hover:inline-block" }, null, -1)), t("label", { for: e.name, class: "absolute left-[calc(50%_-_0.625rem)] top-[calc(50%_-_0.625rem)] hidden cursor-pointer group-hover:block" }, [c(h(m), { class: "h-5 w-5 rounded bg-gray-600 p-1 text-white", "aria-hidden": "true" }), t("input", { id: e.name, type: "file", name: e.name, accept: ".png, .jpg, .jpeg", class: "sr-only", onChange: f }, null, 40, B)], 8, j)]), t("div", null, [t("label", { for: e.name, class: "inline-flex items-center rounded-md border border-gray-300 bg-white px-3 py-1.5 text-xs font-medium text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2" }, y(o.$t("Upload")), 9, S)])])); 10} }; 11export { 12 q as _ 13};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.