You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
996 B
2 lines
996 B
function t(t){if(!t)return[];const r=t.venue_types;if(Array.isArray(r)&&r.length)return r.map(t=>String(t)).filter(Boolean);if("string"==typeof r){const t=r.trim();if(t.startsWith("["))try{const r=JSON.parse(t);if(Array.isArray(r))return r.map(t=>String(t)).filter(Boolean)}catch{}}return t.venue_type?[String(t.venue_type)]:[]}function r(t,r){let n=t.replace("#","").trim();if(3===n.length&&(n=n.split("").map(t=>t+t).join("")),6!==n.length)return`rgba(5, 201, 172, ${r})`;const e=parseInt(n,16);return`rgba(${e>>16&255},${e>>8&255},${255&e},${r})`}function n(t,r){const n=null==r?void 0:r.find(r=>r.value===t);return(null==n?void 0:n.color)||"#05c9ac"}function e(t){const n=function(t){let r=(t||"#05c9ac").trim();r.startsWith("#")||(r=`#${r}`);const n=r.match(/^#([0-9a-f]{3}|[0-9a-f]{6})$/i);if(!n)return"#05c9ac";let e=n[1];return 3===e.length&&(e=`${e[0]}${e[0]}${e[1]}${e[1]}${e[2]}${e[2]}`),`#${e.toLowerCase()}`}(t);return{color:n,backgroundColor:r(n,.14)}}export{t as a,n as c,e as v};
|