mixin tooltip(a)
	-
		const required = ['text']
		const optional = ['tip-position', 'tip-align', 'inert', 'role' ].concat(required)
		
		// function to strip unallowed options.
		const allowed = (obj, whitelist) => {
			const set = new Set(whitelist);
			const result = {};
			for (const [k, v] of Object.entries(obj)) {
				if (set.has(k)) result[k] = v;
			}
			return result;
		}
		
		// default values
		const defaults = {
			"tip-position": "right",
			inert: "inert",
			role: "tooltip",
		}
		
		// unhyphenated to hypenated
		const map = {
			position: 'tip-position',
			align: 'tip-align'
		}
		for (const [from, to] of Object.entries(map)) {
			if (a[from] !== undefined) {
				a[to] = a[from]
				delete a[from]
			}
		}
	
	// recheck for required and output if everything required is there.
	if (a && required.some(key => !(key in a)))
		p Missing keys: #{required.filter(key => !(key in a))}
	else
		-
			text = a.text
			a.text = undefined
			a = allowed({...defaults, ...a}, optional)

		tooltip&attributes(a)!= text