One Year Later – Honouring the Past, Building the Future
180) return true;
if (displayName.length < 1) return true;
if (displayName.length > 60) return true;
if (email.length > 120) return true;
if (/(.)\1{8,}/.test(message)) return true;
return false;
}
async function submitFlower() {
var now = Date.now();
if (now - lastSubmissionAt < APP_CONFIG.clientCooldownSeconds * 1000) {
setStatus("Please wait about 15 seconds before placing another flower. Then start again by choosing a flower.", "error");
return;
}
if (!supabaseReady) {
setStatus("The flower wall connection is not ready. Please refresh the page and try again.", "error");
return;
}
if (!selectedFlower) {
setStatus("Please choose a flower first.", "error");
return;
}
if (!selectedPosition) {
setStatus("Please click or tap an open flower-laying area inside the dashed box first.", "error");
return;
}
if (elements.websiteField.value) {
elements.websiteField.value = "";
setStatus("Something interrupted the submission. Please select your flower location again and try once more.", "error");
return;
}
var message = normalizeText(elements.message.value).slice(0, 180);
var displayName = safeDisplayName(elements.displayName.value).slice(0, 60);
var email = normalizeEmail(elements.email.value).slice(0, 120);
if (!message) {
setStatus("Please add a short message.", "error");
elements.message.focus();
return;
}
if (!displayName) {
setStatus("Please add your name or initials.", "error");
elements.displayName.focus();
return;
}
if (!email) {
setStatus("Please add a valid email address. It will not be published.", "error");
elements.email.focus();
return;
}
if (!isValidEmail(email)) {
setStatus("Please add a valid email address. It will not be published.", "error");
elements.email.focus();
return;
}
var failedSpamCheck = isLikelySpam(message, displayName, email);
var record = {
flower_type: selectedFlower.id,
x_percent: Number(selectedPosition.x.toFixed(2)),
y_percent: Number(selectedPosition.y.toFixed(2)),
message: message,
display_name: displayName,
email: email,
approved: failedSpamCheck ? false : true
};
elements.placeButton.disabled = true;
setStatus("Placing your flower…");
try {
var saved = await saveSubmission(record);
lastSubmissionAt = now;
if (saved.pending) {
renderSubmission(saved, true);
setStatus("Thank you. Your flower was received and will appear publicly after review.", "success");
} else {
submissions.push(saved);
renderAll();
setStatus("Thank you. Your flower has been placed.", "success");
}
resetForm({ keepStatus: true });
} catch (error) {
console.error(error);
elements.placeButton.disabled = false;
var details = error.message || error.details || error.hint || "";
setStatus("The flower could not be submitted. " + (details || "Please try again."), "error");
}
}
elements.wall.addEventListener("click", choosePosition);
elements.placeButton.addEventListener("click", submitFlower);
elements.clearChoice.addEventListener("click", function () { resetForm(); });
elements.message.addEventListener("input", function () {
elements.messageCount.textContent = elements.message.value.length + " / 180";
});
elements.openHelp.addEventListener("click", function () {
if (!elements.helpDialog) return;
if (!elements.helpDialog.showModal) return;
elements.helpDialog.showModal();
});
if (elements.openVideoButton) {
elements.openVideoButton.addEventListener("click", function (event) {
event.stopPropagation();
if (!elements.videoDialog) return;
if (elements.videoDialog.showModal) elements.videoDialog.showModal();
});
}
if (elements.videoDialog) {
elements.videoDialog.addEventListener("click", function (event) {
event.stopPropagation();
});
elements.videoDialog.addEventListener("close", function () {
if (elements.flowerRemembranceVideo) elements.flowerRemembranceVideo.pause();
});
}
window.addEventListener("resize", function () {
if (resizeTimer) {
window.clearTimeout(resizeTimer);
}
resizeTimer = window.setTimeout(function () {
renderAll();
}, 250);
});
async function initAimVigil() {
console.log("AIM vigil script started.");
renderFlowerPicker();
await initializeDataLayer();
try {
await loadSubmissions();
} catch (error) {
console.error(error);
setStatus("The public wall could not be loaded. Please refresh the page.", "error");
}
}
initAimVigil();
}
if (document.readyState === "loading") {
document.addEventListener("DOMContentLoaded", startAimVigilWhenReady);
} else {
startAimVigilWhenReady();
}
})();
In memory of the AIM Clinic
Virtual Flower-Laying Wall
UHN Asian Initiative in Mental Health (AIM) · One-Year Anniversary of Closure · June 18, 2026
Remember · Honour · Advocate
This public community wall is a space to remember the UHN AIM Clinic, honour its impact,
grieve what has been lost, and affirm the continuing need for culturally responsive
mental health care for East and Southeast Asian communities.
Remembrance Video
1
Choose a flower
2
3
Choose a place on the wall
Click or tap an open flower-laying space around the centre image and candle.
Then select Place my flower. You may also double-click or double-tap the same area to place it immediately.
Phone users: choose a flower first. Then tap once to preview the location, and tap the same spot again to place it.
Click or tap the flower-laying space around the centre image and candle