(function(){'use strict';function _hash(name){var h=0;for(var i=0;i<name.length;i++){h=((h<<5)-h)+name.charCodeAt(i);h|=0;}return Math.abs(h);}var PALETTE=['#6366f1','#8b5cf6','#ec4899','#f43f5e','#f97316','#eab308','#22c55e','#14b8a6','#06b6d4','#3b82f6'];function _initials(name){if(!name)return'?';var parts=name.trim().split(/\\s+/);if(parts.length>=2)return(parts[0][0]+parts[parts.length-1][0]).toUpperCase();return parts[0].slice(0,2).toUpperCase();}function _color(name){return PALETTE[_hash(name||'User')%PALETTE.length];}var SVG_TPL=['<svg width=\"32\" height=\"32\" viewBox=\"0 0 32 32\" xmlns=\"http://www.w3.org/2000/svg\">','<circle cx=\"16\" cy=\"16\" r=\"16\" fill=\"COLOR\"/>','<text x=\"16\" y=\"16\" text-anchor=\"middle\" dy=\".35em\" fill=\"#fff\" font-family=\"-apple-system,BlinkMacSystemFont,sans-serif\" font-weight=\"600\" font-size=\"14\">INITIALS</text>','</svg>'].join('');var api={initials:_initials,color:_color,svg:function(name){return SVG_TPL.replace('COLOR',_color(name)).replace('INITIALS',_initials(name));},dataUri:function(name){return'data:image/svg+xml,'+encodeURIComponent(this.svg(name));}};window.PrimeBridge=window.PrimeBridge||{};PrimeBridge.avatar=api;})();