@grasco/profile-picture 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
- var Ve=Object.defineProperty;var qe=Object.getOwnPropertyDescriptor;var d=(n,t,e,r)=>{for(var i=r>1?void 0:r?qe(t,e):t,o=n.length-1,s;o>=0;o--)(s=n[o])&&(i=(r?s(t,e,i):s(i))||i);return r&&i&&Ve(t,e,i),i};var Wt="grasco-profile-picture-styles",at=false;function Vt(){if(at||typeof document>"u")return;if(document.getElementById(Wt)){at=true;return}if(document.querySelector('link[href*="profile-picture"][href$="styles.css"]')){at=true;return}let t=Ye();if(!t)return;let e=document.createElement("link");e.id=Wt,e.rel="stylesheet",e.href=t,document.head.appendChild(e),at=true;}function Ye(){if(typeof window<"u"&&window.__GRASCO_PROFILE_PICTURE_CSS__)return window.__GRASCO_PROFILE_PICTURE_CSS__;try{let t=import.meta.url;if(t)return `${t.substring(0,t.lastIndexOf("/")+1)}dist/styles.css`}catch{}let n=document.currentScript;if(n?.src){let t=new URL(n.src);return `${t.href.substring(0,t.href.lastIndexOf("/")+1)}dist/styles.css`}return null}var qt=class{get shadowRoot(){return this.__host.__shadowRoot}constructor(t){this.ariaActiveDescendantElement=null,this.ariaAtomic="",this.ariaAutoComplete="",this.ariaBrailleLabel="",this.ariaBrailleRoleDescription="",this.ariaBusy="",this.ariaChecked="",this.ariaColCount="",this.ariaColIndex="",this.ariaColIndexText="",this.ariaColSpan="",this.ariaControlsElements=null,this.ariaCurrent="",this.ariaDescribedByElements=null,this.ariaDescription="",this.ariaDetailsElements=null,this.ariaDisabled="",this.ariaErrorMessageElements=null,this.ariaExpanded="",this.ariaFlowToElements=null,this.ariaHasPopup="",this.ariaHidden="",this.ariaInvalid="",this.ariaKeyShortcuts="",this.ariaLabel="",this.ariaLabelledByElements=null,this.ariaLevel="",this.ariaLive="",this.ariaModal="",this.ariaMultiLine="",this.ariaMultiSelectable="",this.ariaOrientation="",this.ariaOwnsElements=null,this.ariaPlaceholder="",this.ariaPosInSet="",this.ariaPressed="",this.ariaReadOnly="",this.ariaRelevant="",this.ariaRequired="",this.ariaRoleDescription="",this.ariaRowCount="",this.ariaRowIndex="",this.ariaRowIndexText="",this.ariaRowSpan="",this.ariaSelected="",this.ariaSetSize="",this.ariaSort="",this.ariaValueMax="",this.ariaValueMin="",this.ariaValueNow="",this.ariaValueText="",this.role="",this.form=null,this.labels=[],this.states=new Set,this.validationMessage="",this.validity={},this.willValidate=true,this.__host=t;}checkValidity(){return console.warn("`ElementInternals.checkValidity()` was called on the server.This method always returns true."),true}reportValidity(){return true}setFormValue(){}setValidity(){}};var C=function(n,t,e,r,i){if(typeof t=="function"?n!==t||true:!t.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(n,e),e},w=function(n,t,e,r){if(typeof t=="function"?n!==t||!r:!t.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?r:e==="a"?r.call(n):r?r.value:t.get(n)},H,pt,lt,q,$t,Y,dt,N,K,D,ct,Yt,Kt=n=>typeof n=="boolean"?n:n?.capture??false;var Ct=class{constructor(){this.__eventListeners=new Map,this.__captureEventListeners=new Map;}addEventListener(t,e,r){if(e==null)return;let i=Kt(r)?this.__captureEventListeners:this.__eventListeners,o=i.get(t);if(o===void 0)o=new Map,i.set(t,o);else if(o.has(e))return;let s=typeof r=="object"&&r?r:{};s.signal?.addEventListener("abort",()=>this.removeEventListener(t,e,r)),o.set(e,s??{});}removeEventListener(t,e,r){if(e==null)return;let i=Kt(r)?this.__captureEventListeners:this.__eventListeners,o=i.get(t);o!==void 0&&(o.delete(e),o.size||i.delete(t));}dispatchEvent(t){let e=[this],r=this.__eventTargetParent;if(t.composed)for(;r;)e.push(r),r=r.__eventTargetParent;else for(;r&&r!==this.__host;)e.push(r),r=r.__eventTargetParent;let i=false,o=false,s=0,p=null,a=null,u=null,m=t.stopPropagation,g=t.stopImmediatePropagation;Object.defineProperties(t,{target:{get(){return p??a},...f},srcElement:{get(){return t.target},...f},currentTarget:{get(){return u},...f},eventPhase:{get(){return s},...f},composedPath:{value:()=>e,...f},stopPropagation:{value:()=>{i=true,m.call(t);},...f},stopImmediatePropagation:{value:()=>{o=true,g.call(t);},...f}});let S=(x,k,V)=>{typeof x=="function"?x(t):typeof x?.handleEvent=="function"&&x.handleEvent(t),k.once&&V.delete(x);},_=()=>(u=null,s=0,!t.defaultPrevented),M=e.slice().reverse();p=!this.__host||!t.composed?this:null;let Gt=x=>{for(a=this;a.__host&&x.includes(a.__host);)a=a.__host;};for(let x of M){!p&&(!a||a===x.__host)&&Gt(M.slice(M.indexOf(x))),u=x,s=x===t.target?2:1;let k=x.__captureEventListeners.get(t.type);if(k){for(let[V,Et]of k)if(S(V,Et,k),o)return _()}if(i)return _()}let _t=t.bubbles?e:[this];a=null;for(let x of _t){!p&&(!a||x===a.__host)&&Gt(_t.slice(0,_t.indexOf(x)+1)),u=x,s=x===t.target?2:3;let k=x.__eventListeners.get(t.type);if(k){for(let[V,Et]of k)if(S(V,Et,k),o)return _()}if(i)return _()}return _()}},At=Ct;var f={__proto__:null};f.enumerable=true;Object.freeze(f);var Rt=(D=class{constructor(t,e={}){if(H.set(this,false),pt.set(this,false),lt.set(this,false),q.set(this,false),$t.set(this,Date.now()),Y.set(this,false),dt.set(this,void 0),N.set(this,void 0),K.set(this,void 0),this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,arguments.length===0)throw new Error("The type argument must be specified");if(typeof e!="object"||!e)throw new Error('The "options" argument must be an object');let{bubbles:r,cancelable:i,composed:o}=e;C(this,H,!!i),C(this,pt,!!r),C(this,lt,!!o),C(this,dt,`${t}`),C(this,N,null),C(this,K,false);}initEvent(t,e,r){throw new Error("Method not implemented.")}stopImmediatePropagation(){this.stopPropagation();}preventDefault(){C(this,q,true);}get target(){return w(this,N,"f")}get currentTarget(){return w(this,N,"f")}get srcElement(){return w(this,N,"f")}get type(){return w(this,dt,"f")}get cancelable(){return w(this,H,"f")}get defaultPrevented(){return w(this,H,"f")&&w(this,q,"f")}get timeStamp(){return w(this,$t,"f")}composedPath(){return w(this,K,"f")?[w(this,N,"f")]:[]}get returnValue(){return !w(this,H,"f")||!w(this,q,"f")}get bubbles(){return w(this,pt,"f")}get composed(){return w(this,lt,"f")}get eventPhase(){return w(this,K,"f")?D.AT_TARGET:D.NONE}get cancelBubble(){return w(this,Y,"f")}set cancelBubble(t){t&&C(this,Y,true);}stopPropagation(){C(this,Y,true);}get isTrusted(){return false}},H=new WeakMap,pt=new WeakMap,lt=new WeakMap,q=new WeakMap,$t=new WeakMap,Y=new WeakMap,dt=new WeakMap,N=new WeakMap,K=new WeakMap,D.NONE=0,D.CAPTURING_PHASE=1,D.AT_TARGET=2,D.BUBBLING_PHASE=3,D);Object.defineProperties(Rt.prototype,{initEvent:f,stopImmediatePropagation:f,preventDefault:f,target:f,currentTarget:f,srcElement:f,type:f,cancelable:f,defaultPrevented:f,timeStamp:f,composedPath:f,returnValue:f,bubbles:f,composed:f,eventPhase:f,cancelBubble:f,stopPropagation:f,isTrusted:f});var Jt=(Yt=class extends Rt{constructor(t,e={}){super(t,e),ct.set(this,void 0),C(this,ct,e?.detail??null);}initCustomEvent(t,e,r,i){throw new Error("Method not implemented.")}get detail(){return w(this,ct,"f")}},ct=new WeakMap,Yt);Object.defineProperties(Jt.prototype,{detail:f});var Tt=Rt,kt=Jt;var E;(E=class{constructor(){this.STYLE_RULE=1,this.CHARSET_RULE=2,this.IMPORT_RULE=3,this.MEDIA_RULE=4,this.FONT_FACE_RULE=5,this.PAGE_RULE=6,this.NAMESPACE_RULE=10,this.KEYFRAMES_RULE=7,this.KEYFRAME_RULE=8,this.SUPPORTS_RULE=12,this.COUNTER_STYLE_RULE=11,this.FONT_FEATURE_VALUES_RULE=14,this.__parentStyleSheet=null,this.cssText="";}get parentRule(){return null}get parentStyleSheet(){return this.__parentStyleSheet}get type(){return 0}},E.STYLE_RULE=1,E.CHARSET_RULE=2,E.IMPORT_RULE=3,E.MEDIA_RULE=4,E.FONT_FACE_RULE=5,E.PAGE_RULE=6,E.NAMESPACE_RULE=10,E.KEYFRAMES_RULE=7,E.KEYFRAME_RULE=8,E.SUPPORTS_RULE=12,E.COUNTER_STYLE_RULE=11,E.FONT_FEATURE_VALUES_RULE=14,E);globalThis.Event??=Tt;globalThis.CustomEvent??=kt;var Zt=new WeakMap,J=n=>{let t=Zt.get(n);return t===void 0&&Zt.set(n,t=new Map),t},Ke=class extends At{constructor(){super(...arguments),this.__shadowRootMode=null,this.__shadowRoot=null,this.__internals=null;}get attributes(){return Array.from(J(this)).map(([t,e])=>({name:t,value:e}))}get shadowRoot(){return this.__shadowRootMode==="closed"?null:this.__shadowRoot}get localName(){return this.constructor.__localName}get tagName(){return this.localName?.toUpperCase()}setAttribute(t,e){J(this).set(t,String(e));}removeAttribute(t){J(this).delete(t);}toggleAttribute(t,e){if(this.hasAttribute(t)){if(e===void 0||!e)return this.removeAttribute(t),false}else return e===void 0||e?(this.setAttribute(t,""),true):false;return true}hasAttribute(t){return J(this).has(t)}attachShadow(t){let e={host:this};return this.__shadowRootMode=t.mode,t&&t.mode==="open"&&(this.__shadowRoot=e),e}attachInternals(){if(this.__internals!==null)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");let t=new qt(this);return this.__internals=t,t}getAttribute(t){return J(this).get(t)??null}};var Je=class extends Ke{},Lt=Je;globalThis.litServerRoot??=Object.defineProperty(new Lt,"localName",{get(){return "lit-server-root"}});function Ze(){let n,t;return {promise:new Promise((r,i)=>{n=r,t=i;}),resolve:n,reject:t}}var It=class{constructor(){this.__definitions=new Map,this.__reverseDefinitions=new Map,this.__pendingWhenDefineds=new Map;}define(t,e){if(this.__definitions.has(t))if(process.env.NODE_ENV==="development")console.warn(`'CustomElementRegistry' already has "${t}" defined. This may have been caused by live reload or hot module replacement in which case it can be safely ignored.
2
- Make sure to test your application with a production build as repeat registrations will throw in production.`);else throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(this.__reverseDefinitions.has(e))throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the constructor has already been used with this registry for the tag name ${this.__reverseDefinitions.get(e)}`);e.__localName=t,this.__definitions.set(t,{ctor:e,observedAttributes:e.observedAttributes??[]}),this.__reverseDefinitions.set(e,t),this.__pendingWhenDefineds.get(t)?.resolve(e),this.__pendingWhenDefineds.delete(t);}get(t){return this.__definitions.get(t)?.ctor}getName(t){return this.__reverseDefinitions.get(t)??null}upgrade(t){throw new Error("customElements.upgrade is not currently supported in SSR. Please file a bug if you need it.")}async whenDefined(t){let e=this.__definitions.get(t);if(e)return e.ctor;let r=this.__pendingWhenDefineds.get(t);return r||(r=Ze(),this.__pendingWhenDefineds.set(t,r)),r.promise}},Xe=It;var Xt=new Xe;var Z=globalThis,ut=Z.ShadowRoot&&(Z.ShadyCSS===void 0||Z.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,te=Symbol(),Qt=new WeakMap,ht=class{constructor(t,e,r){if(this._$cssResult$=true,r!==te)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e;}get styleSheet(){let t=this.o,e=this.t;if(ut&&t===void 0){let r=e!==void 0&&e.length===1;r&&(t=Qt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&Qt.set(e,t));}return t}toString(){return this.cssText}},ee=n=>new ht(typeof n=="string"?n:n+"",void 0,te);var re=(n,t)=>{if(ut)n.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let r=document.createElement("style"),i=Z.litNonce;i!==void 0&&r.setAttribute("nonce",i),r.textContent=e.cssText,n.appendChild(r);}},Ut=ut||Z.CSSStyleSheet===void 0?n=>n:n=>n instanceof CSSStyleSheet?(t=>{let e="";for(let r of t.cssRules)e+=r.cssText;return ee(e)})(n):n;var{is:Qe,defineProperty:tr,getOwnPropertyDescriptor:er,getOwnPropertyNames:rr,getOwnPropertySymbols:nr,getPrototypeOf:ir}=Object,tt=globalThis;tt.customElements??=Xt;var ne=tt.trustedTypes,or=ne?ne.emptyScript:"",sr=tt.reactiveElementPolyfillSupport,X=(n,t)=>n,Q={toAttribute(n,t){switch(t){case Boolean:n=n?or:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n);}return n},fromAttribute(n,t){let e=n;switch(t){case Boolean:e=n!==null;break;case Number:e=n===null?null:Number(n);break;case Object:case Array:try{e=JSON.parse(n);}catch{e=null;}}return e}},gt=(n,t)=>!Qe(n,t),ie={attribute:true,type:String,converter:Q,reflect:false,useDefault:false,hasChanged:gt};Symbol.metadata??=Symbol("metadata"),tt.litPropertyMetadata??=new WeakMap;var I=class extends(globalThis.HTMLElement??Lt){static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=ie){if(e.state&&(e.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=true),this.elementProperties.set(t,e),!e.noAccessor){let r=Symbol(),i=this.getPropertyDescriptor(t,r,e);i!==void 0&&tr(this.prototype,t,i);}}static getPropertyDescriptor(t,e,r){let{get:i,set:o}=er(this.prototype,t)??{get(){return this[e]},set(s){this[e]=s;}};return {get:i,set(s){let p=i?.call(this);o?.call(this,s),this.requestUpdate(t,p,r);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??ie}static _$Ei(){if(this.hasOwnProperty(X("elementProperties")))return;let t=ir(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(X("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(X("properties"))){let e=this.properties,r=[...rr(e),...nr(e)];for(let i of r)this.createProperty(i,e[i]);}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[r,i]of e)this.elementProperties.set(r,i);}this._$Eh=new Map;for(let[e,r]of this.elementProperties){let i=this._$Eu(e,r);i!==void 0&&this._$Eh.set(i,e);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let r=new Set(t.flat(1/0).reverse());for(let i of r)e.unshift(Ut(i));}else t!==void 0&&e.push(Ut(t));return e}static _$Eu(t,e){let r=e.attribute;return r===false?void 0:typeof r=="string"?r:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this));}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let r of e.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t);}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return re(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach(t=>t.hostConnected?.());}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.());}attributeChangedCallback(t,e,r){this._$AK(t,r);}_$ET(t,e){let r=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,r);if(i!==void 0&&r.reflect===true){let o=(r.converter?.toAttribute!==void 0?r.converter:Q).toAttribute(e,r.type);this._$Em=t,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null;}}_$AK(t,e){let r=this.constructor,i=r._$Eh.get(t);if(i!==void 0&&this._$Em!==i){let o=r.getPropertyOptions(i),s=typeof o.converter=="function"?{fromAttribute:o.converter}:o.converter?.fromAttribute!==void 0?o.converter:Q;this._$Em=i;let p=s.fromAttribute(e,o.type);this[i]=p??this._$Ej?.get(i)??p,this._$Em=null;}}requestUpdate(t,e,r,i=false,o){if(t!==void 0){let s=this.constructor;if(i===false&&(o=this[t]),r??=s.getPropertyOptions(t),!((r.hasChanged??gt)(o,e)||r.useDefault&&r.reflect&&o===this._$Ej?.get(t)&&!this.hasAttribute(s._$Eu(t,r))))return;this.C(t,e,r);}this.isUpdatePending===false&&(this._$ES=this._$EP());}C(t,e,{useDefault:r,reflect:i,wrapped:o},s){r&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,s??e??this[t]),o!==true||s!==void 0)||(this._$AL.has(t)||(this.hasUpdated||r||(e=void 0),this._$AL.set(t,e)),i===true&&this._$Em!==t&&(this._$Eq??=new Set).add(t));}async _$EP(){this.isUpdatePending=true;try{await this._$ES;}catch(e){Promise.reject(e);}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[i,o]of this._$Ep)this[i]=o;this._$Ep=void 0;}let r=this.constructor.elementProperties;if(r.size>0)for(let[i,o]of r){let{wrapped:s}=o,p=this[i];s!==true||this._$AL.has(i)||p===void 0||this.C(i,void 0,o,p);}}let t=false,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(e)):this._$EM();}catch(r){throw t=false,this._$EM(),r}t&&this._$AE(e);}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t);}_$EM(){this._$AL=new Map,this.isUpdatePending=false;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM();}updated(t){}firstUpdated(t){}};I.elementStyles=[],I.shadowRootOptions={mode:"open"},I[X("elementProperties")]=new Map,I[X("finalized")]=new Map,sr?.({ReactiveElement:I}),(tt.reactiveElementVersions??=[]).push("2.1.2");var mt=globalThis,oe=n=>n,ft=mt.trustedTypes,se=ft?ft.createPolicy("lit-html",{createHTML:n=>n}):void 0,he="$lit$",O=`lit$${Math.random().toFixed(9).slice(2)}$`,ue="?"+O,ar=`<${ue}>`,P=mt.document===void 0?{createTreeWalker:()=>({})}:document,rt=()=>P.createComment(""),nt=n=>n===null||typeof n!="object"&&typeof n!="function",Pt=Array.isArray,pr=n=>Pt(n)||typeof n?.[Symbol.iterator]=="function",Mt=`[
3
- \f\r]`,et=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ae=/-->/g,pe=/>/g,z=RegExp(`>|${Mt}(?:([^\\s"'>=/]+)(${Mt}*=${Mt}*(?:[^
4
- \f\r"'\`<>=]|("|')|))|$)`,"g"),le=/'/g,de=/"/g,ge=/^(?:script|style|textarea|title)$/i,Ht=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),b=Ht(1),L=Symbol.for("lit-noChange"),c=Symbol.for("lit-nothing"),ce=new WeakMap,B=P.createTreeWalker(P,129);function fe(n,t){if(!Pt(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return se!==void 0?se.createHTML(t):t}var lr=(n,t)=>{let e=n.length-1,r=[],i,o=t===2?"<svg>":t===3?"<math>":"",s=et;for(let p=0;p<e;p++){let a=n[p],u,m,g=-1,S=0;for(;S<a.length&&(s.lastIndex=S,m=s.exec(a),m!==null);)S=s.lastIndex,s===et?m[1]==="!--"?s=ae:m[1]!==void 0?s=pe:m[2]!==void 0?(ge.test(m[2])&&(i=RegExp("</"+m[2],"g")),s=z):m[3]!==void 0&&(s=z):s===z?m[0]===">"?(s=i??et,g=-1):m[1]===void 0?g=-2:(g=s.lastIndex-m[2].length,u=m[1],s=m[3]===void 0?z:m[3]==='"'?de:le):s===de||s===le?s=z:s===ae||s===pe?s=et:(s=z,i=void 0);let _=s===z&&n[p+1].startsWith("/>")?" ":"";o+=s===et?a+ar:g>=0?(r.push(u),a.slice(0,g)+he+a.slice(g)+O+_):a+O+(g===-2?p:_);}return [fe(n,o+(n[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},it=class n{constructor({strings:t,_$litType$:e},r){let i;this.parts=[];let o=0,s=0,p=t.length-1,a=this.parts,[u,m]=lr(t,e);if(this.el=n.createElement(u,r),B.currentNode=this.el.content,e===2||e===3){let g=this.el.content.firstChild;g.replaceWith(...g.childNodes);}for(;(i=B.nextNode())!==null&&a.length<p;){if(i.nodeType===1){if(i.hasAttributes())for(let g of i.getAttributeNames())if(g.endsWith(he)){let S=m[s++],_=i.getAttribute(g).split(O),M=/([.?@])?(.*)/.exec(S);a.push({type:1,index:o,name:M[2],strings:_,ctor:M[1]==="."?Ot:M[1]==="?"?Nt:M[1]==="@"?zt:j}),i.removeAttribute(g);}else g.startsWith(O)&&(a.push({type:6,index:o}),i.removeAttribute(g));if(ge.test(i.tagName)){let g=i.textContent.split(O),S=g.length-1;if(S>0){i.textContent=ft?ft.emptyScript:"";for(let _=0;_<S;_++)i.append(g[_],rt()),B.nextNode(),a.push({type:2,index:++o});i.append(g[S],rt());}}}else if(i.nodeType===8)if(i.data===ue)a.push({type:2,index:o});else {let g=-1;for(;(g=i.data.indexOf(O,g+1))!==-1;)a.push({type:7,index:o}),g+=O.length-1;}o++;}}static createElement(t,e){let r=P.createElement("template");return r.innerHTML=t,r}};function F(n,t,e=n,r){if(t===L)return t;let i=r!==void 0?e._$Co?.[r]:e._$Cl,o=nt(t)?void 0:t._$litDirective$;return i?.constructor!==o&&(i?._$AO?.(false),o===void 0?i=void 0:(i=new o(n),i._$AT(n,e,r)),r!==void 0?(e._$Co??=[])[r]=i:e._$Cl=i),i!==void 0&&(t=F(n,i._$AS(n,t.values),i,r)),t}var Dt=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e;}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:r}=this._$AD,i=(t?.creationScope??P).importNode(e,true);B.currentNode=i;let o=B.nextNode(),s=0,p=0,a=r[0];for(;a!==void 0;){if(s===a.index){let u;a.type===2?u=new ot(o,o.nextSibling,this,t):a.type===1?u=new a.ctor(o,a.name,a.strings,this,t):a.type===6&&(u=new Bt(o,this,t)),this._$AV.push(u),a=r[++p];}s!==a?.index&&(o=B.nextNode(),s++);}return B.currentNode=P,i}p(t){let e=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++;}},ot=class n{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,r,i){this.type=2,this._$AH=c,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=i,this._$Cv=i?.isConnected??true;}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=F(this,t,e),nt(t)?t===c||t==null||t===""?(this._$AH!==c&&this._$AR(),this._$AH=c):t!==this._$AH&&t!==L&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):pr(t)?this.k(t):this._(t);}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t));}_(t){this._$AH!==c&&nt(this._$AH)?this._$AA.nextSibling.data=t:this.T(P.createTextNode(t)),this._$AH=t;}$(t){let{values:e,_$litType$:r}=t,i=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=it.createElement(fe(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===i)this._$AH.p(e);else {let o=new Dt(i,this),s=o.u(this.options);o.p(e),this.T(s),this._$AH=o;}}_$AC(t){let e=ce.get(t.strings);return e===void 0&&ce.set(t.strings,e=new it(t)),e}k(t){Pt(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,r,i=0;for(let o of t)i===e.length?e.push(r=new n(this.O(rt()),this.O(rt()),this,this.options)):r=e[i],r._$AI(o),i++;i<e.length&&(this._$AR(r&&r._$AB.nextSibling,i),e.length=i);}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(false,true,e);t!==this._$AB;){let r=oe(t).nextSibling;oe(t).remove(),t=r;}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t));}},j=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,i,o){this.type=1,this._$AH=c,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=o,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=c;}_$AI(t,e=this,r,i){let o=this.strings,s=false;if(o===void 0)t=F(this,t,e,0),s=!nt(t)||t!==this._$AH&&t!==L,s&&(this._$AH=t);else {let p=t,a,u;for(t=o[0],a=0;a<o.length-1;a++)u=F(this,p[r+a],e,a),u===L&&(u=this._$AH[a]),s||=!nt(u)||u!==this._$AH[a],u===c?t=c:t!==c&&(t+=(u??"")+o[a+1]),this._$AH[a]=u;}s&&!i&&this.j(t);}j(t){t===c?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"");}},Ot=class extends j{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===c?void 0:t;}},Nt=class extends j{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==c);}},zt=class extends j{constructor(t,e,r,i,o){super(t,e,r,i,o),this.type=5;}_$AI(t,e=this){if((t=F(this,t,e,0)??c)===L)return;let r=this._$AH,i=t===c&&r!==c||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,o=t!==c&&(r===c||i);i&&this.element.removeEventListener(this.name,this,r),o&&this.element.addEventListener(this.name,this,t),this._$AH=t;}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t);}},Bt=class{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r;}get _$AU(){return this._$AM._$AU}_$AI(t){F(this,t);}};var dr=mt.litHtmlPolyfillSupport;dr?.(it,ot),(mt.litHtmlVersions??=[]).push("3.3.2");var me=(n,t,e)=>{let r=e?.renderBefore??t,i=r._$litPart$;if(i===void 0){let o=e?.renderBefore??null;r._$litPart$=i=new ot(t.insertBefore(rt(),o),o,void 0,e??{});}return i._$AI(n),i};var Ft=globalThis,A=class extends I{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=me(e,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false);}render(){return L}};A._$litElement$=true,A.finalized=true,Ft.litElementHydrateSupport?.({LitElement:A});var cr=Ft.litElementPolyfillSupport;cr?.({LitElement:A});(Ft.litElementVersions??=[]).push("4.2.2");var bt=n=>(t,e)=>{e!==void 0?e.addInitializer(()=>{customElements.define(n,t);}):customElements.define(n,t);};var hr={attribute:true,type:String,converter:Q,reflect:false,hasChanged:gt},ur=(n=hr,t,e)=>{let{kind:r,metadata:i}=e,o=globalThis.litPropertyMetadata.get(i);if(o===void 0&&globalThis.litPropertyMetadata.set(i,o=new Map),r==="setter"&&((n=Object.create(n)).wrapped=true),o.set(e.name,n),r==="accessor"){let{name:s}=e;return {set(p){let a=t.get.call(this);t.set.call(this,p),this.requestUpdate(s,a,n,true,p);},init(p){return p!==void 0&&this.C(s,void 0,n,p),p}}}if(r==="setter"){let{name:s}=e;return function(p){let a=this[s];t.call(this,p),this.requestUpdate(s,a,n,true,p);}}throw Error("Unsupported decorator location: "+r)};function h(n){return (t,e)=>typeof e=="object"?ur(n,t,e):((r,i,o)=>{let s=i.hasOwnProperty(o);return i.constructor.createProperty(o,r),s?Object.getOwnPropertyDescriptor(i,o):void 0})(n,t,e)}function U(n){return h({...n,state:true,attribute:false})}var be={ATTRIBUTE:1},ye=n=>(...t)=>({_$litDirective$:n,values:t}),xt=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,r){this._$Ct=t,this._$AM=e,this._$Ci=r;}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var xe="important",gr=" !"+xe,y=ye(class extends xt{constructor(n){if(super(n),n.type!==be.ATTRIBUTE||n.name!=="style"||n.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(n){return Object.keys(n).reduce((t,e)=>{let r=n[e];return r==null?t:t+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`},"")}update(n,[t]){let{style:e}=n.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(let r of this.ft)t[r]==null&&(this.ft.delete(r),r.includes("-")?e.removeProperty(r):e[r]=null);for(let r in t){let i=t[r];if(i!=null){this.ft.add(r);let o=typeof i=="string"&&i.endsWith(gr);r.includes("-")||o?e.setProperty(r,o?i.slice(0,-11):i,o?xe:""):e[r]=i;}}return L}});var G={"2xs":20,xs:24,sm:32,md:40,lg:48,xl:64,"2xl":80,"3xl":120},ve={online:"#30D158",away:"#FFD60A",busy:"#FF453A",offline:"#8E8E93",dnd:"#FF453A"},we={none:"none",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)",glow:"0 0 20px 0 rgba(99, 102, 241, 0.3)"},R={size:"md",variant:"circle",loading:"lazy",placeholder:"shimmer",borderWidth:2,borderColor:"#ffffff",placeholderColor:"#f3f4f6",shadow:"sm"};var W={circle:"9999px",rounded:"12px",squircle:"30%",square:"0px"},T={max:4,direction:"ltr",overlap:.3,size:"md",tooltipDelay:300,dropdownMaxHeight:280,animated:true};function $(...n){return n.filter(Boolean).join(" ")}function st(n){return /^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$/.test(n)}function Se(n){return {"top-left":"np:top-0 np:left-0","top-right":"np:top-0 np:right-0","bottom-left":"np:bottom-0 np:left-0","bottom-right":"np:bottom-0 np:right-0"}[n]}function _e(n){return {"top-left":"np:-rotate-45 np:-translate-x-1/4 np:-translate-y-1/2","top-right":"np:rotate-45 np:translate-x-1/4 np:-translate-y-1/2","bottom-left":"np:rotate-45 np:-translate-x-1/4 np:translate-y-1/2","bottom-right":"np:-rotate-45 np:translate-x-1/4 np:translate-y-1/2"}[n]}function vt(n){let e=n.trim().replace(/[^\w\s]/g,"").split(/\s+/).filter(Boolean);return e.length===0?"?":e.length===1?e[0].slice(0,1).toUpperCase():(e[0][0]+e[e.length-1][0]).toUpperCase()}function jt(n){return Math.round(n*.38)}function Ee(n,t){let r=Math.max(t?18:10,Math.round(n*(t?.32:.22))),i=Math.round(r*.6);return {size:r,fontSize:i}}function $e(n,t){return Math.max(8,Math.round(n*.25))+(t-1)*2}function Ce(n,t){return typeof n=="string"?n:t&&n>t?`${t}+`:n.toString()}function Ae(n){return n.length===0?"transparent":n.length===1?n[0]:`conic-gradient(${n.map((e,r)=>{let i=r/n.length*360,o=(r+1)/n.length*360;return `${e} ${i}deg ${o}deg`}).join(", ")})`}function fr(n){let t=0;for(let e=0;e<n.length;e++){let r=n.charCodeAt(e);t=(t<<5)-t+r,t&=t;}return Math.abs(t)}function Re(n,t,e){let i=Math.max(0,Math.min(100,n))/100*360;return `conic-gradient(from 270deg, ${t} 0deg ${i}deg, ${e} ${i}deg 360deg)`}function wt(n){let t=["linear-gradient(135deg, #667eea 0%, #764ba2 100%)","linear-gradient(135deg, #f093fb 0%, #f5576c 100%)","linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)","linear-gradient(135deg, #43e97b 0%, #38f9d7 100%)","linear-gradient(135deg, #fa709a 0%, #fee140 100%)","linear-gradient(135deg, #a8edea 0%, #fed6e3 100%)","linear-gradient(135deg, #d299c2 0%, #fef9d7 100%)","linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%)","linear-gradient(135deg, #cd9cf2 0%, #f6f3ff 100%)","linear-gradient(135deg, #fddb92 0%, #d1fdff 100%)"],e=fr(n)%t.length;return t[e]}function Te(n){return typeof n=="number"?n:G[n]??G[T.size]}function ke(n,t,e){let r=e?t-1:t;if(n<=r)return {visible:n,hidden:0,showCounter:false};let i=r-1,o=n-i;return {visible:i,hidden:o,showCounter:true}}function St(n,t,e,r,i){let o=i??t*(1-e);return n*o}function Ie(n,t,e){return e==="ltr"?t-n:n+1}function Le(n,t,e,r){if(n===0)return 0;if(n===1)return t;let i=r??t*(1-e);return t+i*(n-1)}function Ue(n){return n>99?"+99":`+${n}`}function Me(n){return n<=80?"80":n<=120?"120":n<=240?"240":n<=480?"480":"960"}function De(n){if(!(n&&st(n)))return "light";let t=n.replace("#","");t.length===3&&(t=t.split("").map(s=>s+s).join(""));let e=Number.parseInt(t.slice(0,2),16),r=Number.parseInt(t.slice(2,4),16),i=Number.parseInt(t.slice(4,6),16);return (.299*e+.587*r+.114*i)/255>.5?"light":"dark"}function Oe(n,t,e,r,i){let o=n.endsWith("/")?n.slice(0,-1):n,s=`${t}_${e}_${r}.webp`;return `${o}/api/profile-picture/cdn/${s}?hostname=${i}`}function Ne(n){return {circle:"np:rounded-full",rounded:"np:rounded-xl",squircle:"np:rounded-[30%]",square:"np:rounded-none"}[n]}function ze(n,t){return {className:{1:"np:border",2:"np:border-2",3:"np:border-[3px]",4:"np:border-4",5:"np:border-[5px]",6:"np:border-[6px]",8:"np:border-8"}[n],style:{borderColor:t,borderStyle:"solid"}}}function Be(n,t){return t?{className:"",style:{background:t}}:n?n.includes("gradient")?{className:"",style:{background:n}}:{className:"",style:{backgroundColor:n}}:{className:"",style:{backgroundColor:"#e7e7e7"}}}function Pe(n){return {boxShadow:we[n]}}var mr={shimmer:`
1
+ var Ve=Object.defineProperty;var qe=Object.getOwnPropertyDescriptor;var d=(n,e,t,r)=>{for(var i=r>1?void 0:r?qe(e,t):e,o=n.length-1,s;o>=0;o--)(s=n[o])&&(i=(r?s(e,t,i):s(i))||i);return r&&i&&Ve(e,t,i),i};var qt="grasco-profile-picture-styles",ct=false;function Yt(){if(ct||typeof document>"u")return;if(document.getElementById(qt)){ct=true;return}if(document.querySelector('link[href*="profile-picture"][href$="styles.css"]')){ct=true;return}let e=Ye();if(!e)return;let t=document.createElement("link");t.id=qt,t.rel="stylesheet",t.href=e,document.head.appendChild(t),ct=true;}function Ye(){if(typeof window<"u"&&window.__GRASCO_PROFILE_PICTURE_CSS__)return window.__GRASCO_PROFILE_PICTURE_CSS__;try{let e=import.meta.url;if(e)return `${e.substring(0,e.lastIndexOf("/")+1)}dist/styles.css`}catch{}let n=document.currentScript;if(n?.src){let e=new URL(n.src);return `${e.href.substring(0,e.href.lastIndexOf("/")+1)}dist/styles.css`}return null}var Kt=class{get shadowRoot(){return this.__host.__shadowRoot}constructor(e){this.ariaActiveDescendantElement=null,this.ariaAtomic="",this.ariaAutoComplete="",this.ariaBrailleLabel="",this.ariaBrailleRoleDescription="",this.ariaBusy="",this.ariaChecked="",this.ariaColCount="",this.ariaColIndex="",this.ariaColIndexText="",this.ariaColSpan="",this.ariaControlsElements=null,this.ariaCurrent="",this.ariaDescribedByElements=null,this.ariaDescription="",this.ariaDetailsElements=null,this.ariaDisabled="",this.ariaErrorMessageElements=null,this.ariaExpanded="",this.ariaFlowToElements=null,this.ariaHasPopup="",this.ariaHidden="",this.ariaInvalid="",this.ariaKeyShortcuts="",this.ariaLabel="",this.ariaLabelledByElements=null,this.ariaLevel="",this.ariaLive="",this.ariaModal="",this.ariaMultiLine="",this.ariaMultiSelectable="",this.ariaOrientation="",this.ariaOwnsElements=null,this.ariaPlaceholder="",this.ariaPosInSet="",this.ariaPressed="",this.ariaReadOnly="",this.ariaRelevant="",this.ariaRequired="",this.ariaRoleDescription="",this.ariaRowCount="",this.ariaRowIndex="",this.ariaRowIndexText="",this.ariaRowSpan="",this.ariaSelected="",this.ariaSetSize="",this.ariaSort="",this.ariaValueMax="",this.ariaValueMin="",this.ariaValueNow="",this.ariaValueText="",this.role="",this.form=null,this.labels=[],this.states=new Set,this.validationMessage="",this.validity={},this.willValidate=true,this.__host=e;}checkValidity(){return console.warn("`ElementInternals.checkValidity()` was called on the server.This method always returns true."),true}reportValidity(){return true}setFormValue(){}setValidity(){}};var T=function(n,e,t,r,i){if(typeof e=="function"?n!==e||true:!e.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(n,t),t},_=function(n,e,t,r){if(typeof e=="function"?n!==e||!r:!e.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?r:t==="a"?r.call(n):r?r.value:e.get(n)},j,ht,ut,X,At,Z,gt,B,Q,N,mt,Jt,Xt=n=>typeof n=="boolean"?n:n?.capture??false;var Rt=class{constructor(){this.__eventListeners=new Map,this.__captureEventListeners=new Map;}addEventListener(e,t,r){if(t==null)return;let i=Xt(r)?this.__captureEventListeners:this.__eventListeners,o=i.get(e);if(o===void 0)o=new Map,i.set(e,o);else if(o.has(t))return;let s=typeof r=="object"&&r?r:{};s.signal?.addEventListener("abort",()=>this.removeEventListener(e,t,r)),o.set(t,s??{});}removeEventListener(e,t,r){if(t==null)return;let i=Xt(r)?this.__captureEventListeners:this.__eventListeners,o=i.get(e);o!==void 0&&(o.delete(t),o.size||i.delete(e));}dispatchEvent(e){let t=[this],r=this.__eventTargetParent;if(e.composed)for(;r;)t.push(r),r=r.__eventTargetParent;else for(;r&&r!==this.__host;)t.push(r),r=r.__eventTargetParent;let i=false,o=false,s=0,p=null,a=null,c=null,m=e.stopPropagation,g=e.stopImmediatePropagation;Object.defineProperties(e,{target:{get(){return p??a},...f},srcElement:{get(){return e.target},...f},currentTarget:{get(){return c},...f},eventPhase:{get(){return s},...f},composedPath:{value:()=>t,...f},stopPropagation:{value:()=>{i=true,m.call(e);},...f},stopImmediatePropagation:{value:()=>{o=true,g.call(e);},...f}});let w=(v,A,L)=>{typeof v=="function"?v(e):typeof v?.handleEvent=="function"&&v.handleEvent(e),A.once&&L.delete(v);},S=()=>(c=null,s=0,!e.defaultPrevented),b=t.slice().reverse();p=!this.__host||!e.composed?this:null;let $=v=>{for(a=this;a.__host&&v.includes(a.__host);)a=a.__host;};for(let v of b){!p&&(!a||a===v.__host)&&$(b.slice(b.indexOf(v))),c=v,s=v===e.target?2:1;let A=v.__captureEventListeners.get(e.type);if(A){for(let[L,J]of A)if(w(L,J,A),o)return S()}if(i)return S()}let G=e.bubbles?t:[this];a=null;for(let v of G){!p&&(!a||v===a.__host)&&$(G.slice(0,G.indexOf(v)+1)),c=v,s=v===e.target?2:3;let A=v.__eventListeners.get(e.type);if(A){for(let[L,J]of A)if(w(L,J,A),o)return S()}if(i)return S()}return S()}},Tt=Rt;var f={__proto__:null};f.enumerable=true;Object.freeze(f);var kt=(N=class{constructor(e,t={}){if(j.set(this,false),ht.set(this,false),ut.set(this,false),X.set(this,false),At.set(this,Date.now()),Z.set(this,false),gt.set(this,void 0),B.set(this,void 0),Q.set(this,void 0),this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,arguments.length===0)throw new Error("The type argument must be specified");if(typeof t!="object"||!t)throw new Error('The "options" argument must be an object');let{bubbles:r,cancelable:i,composed:o}=t;T(this,j,!!i),T(this,ht,!!r),T(this,ut,!!o),T(this,gt,`${e}`),T(this,B,null),T(this,Q,false);}initEvent(e,t,r){throw new Error("Method not implemented.")}stopImmediatePropagation(){this.stopPropagation();}preventDefault(){T(this,X,true);}get target(){return _(this,B,"f")}get currentTarget(){return _(this,B,"f")}get srcElement(){return _(this,B,"f")}get type(){return _(this,gt,"f")}get cancelable(){return _(this,j,"f")}get defaultPrevented(){return _(this,j,"f")&&_(this,X,"f")}get timeStamp(){return _(this,At,"f")}composedPath(){return _(this,Q,"f")?[_(this,B,"f")]:[]}get returnValue(){return !_(this,j,"f")||!_(this,X,"f")}get bubbles(){return _(this,ht,"f")}get composed(){return _(this,ut,"f")}get eventPhase(){return _(this,Q,"f")?N.AT_TARGET:N.NONE}get cancelBubble(){return _(this,Z,"f")}set cancelBubble(e){e&&T(this,Z,true);}stopPropagation(){T(this,Z,true);}get isTrusted(){return false}},j=new WeakMap,ht=new WeakMap,ut=new WeakMap,X=new WeakMap,At=new WeakMap,Z=new WeakMap,gt=new WeakMap,B=new WeakMap,Q=new WeakMap,N.NONE=0,N.CAPTURING_PHASE=1,N.AT_TARGET=2,N.BUBBLING_PHASE=3,N);Object.defineProperties(kt.prototype,{initEvent:f,stopImmediatePropagation:f,preventDefault:f,target:f,currentTarget:f,srcElement:f,type:f,cancelable:f,defaultPrevented:f,timeStamp:f,composedPath:f,returnValue:f,bubbles:f,composed:f,eventPhase:f,cancelBubble:f,stopPropagation:f,isTrusted:f});var Zt=(Jt=class extends kt{constructor(e,t={}){super(e,t),mt.set(this,void 0),T(this,mt,t?.detail??null);}initCustomEvent(e,t,r,i){throw new Error("Method not implemented.")}get detail(){return _(this,mt,"f")}},mt=new WeakMap,Jt);Object.defineProperties(Zt.prototype,{detail:f});var Mt=kt,It=Zt;var E;(E=class{constructor(){this.STYLE_RULE=1,this.CHARSET_RULE=2,this.IMPORT_RULE=3,this.MEDIA_RULE=4,this.FONT_FACE_RULE=5,this.PAGE_RULE=6,this.NAMESPACE_RULE=10,this.KEYFRAMES_RULE=7,this.KEYFRAME_RULE=8,this.SUPPORTS_RULE=12,this.COUNTER_STYLE_RULE=11,this.FONT_FEATURE_VALUES_RULE=14,this.__parentStyleSheet=null,this.cssText="";}get parentRule(){return null}get parentStyleSheet(){return this.__parentStyleSheet}get type(){return 0}},E.STYLE_RULE=1,E.CHARSET_RULE=2,E.IMPORT_RULE=3,E.MEDIA_RULE=4,E.FONT_FACE_RULE=5,E.PAGE_RULE=6,E.NAMESPACE_RULE=10,E.KEYFRAMES_RULE=7,E.KEYFRAME_RULE=8,E.SUPPORTS_RULE=12,E.COUNTER_STYLE_RULE=11,E.FONT_FEATURE_VALUES_RULE=14,E);globalThis.Event??=Mt;globalThis.CustomEvent??=It;var Qt=new WeakMap,tt=n=>{let e=Qt.get(n);return e===void 0&&Qt.set(n,e=new Map),e},Ke=class extends Tt{constructor(){super(...arguments),this.__shadowRootMode=null,this.__shadowRoot=null,this.__internals=null;}get attributes(){return Array.from(tt(this)).map(([e,t])=>({name:e,value:t}))}get shadowRoot(){return this.__shadowRootMode==="closed"?null:this.__shadowRoot}get localName(){return this.constructor.__localName}get tagName(){return this.localName?.toUpperCase()}setAttribute(e,t){tt(this).set(e,String(t));}removeAttribute(e){tt(this).delete(e);}toggleAttribute(e,t){if(this.hasAttribute(e)){if(t===void 0||!t)return this.removeAttribute(e),false}else return t===void 0||t?(this.setAttribute(e,""),true):false;return true}hasAttribute(e){return tt(this).has(e)}attachShadow(e){let t={host:this};return this.__shadowRootMode=e.mode,e&&e.mode==="open"&&(this.__shadowRoot=t),t}attachInternals(){if(this.__internals!==null)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");let e=new Kt(this);return this.__internals=e,e}getAttribute(e){return tt(this).get(e)??null}};var Je=class extends Ke{},Ut=Je;globalThis.litServerRoot??=Object.defineProperty(new Ut,"localName",{get(){return "lit-server-root"}});function Xe(){let n,e;return {promise:new Promise((r,i)=>{n=r,e=i;}),resolve:n,reject:e}}var Lt=class{constructor(){this.__definitions=new Map,this.__reverseDefinitions=new Map,this.__pendingWhenDefineds=new Map;}define(e,t){if(this.__definitions.has(e))if(process.env.NODE_ENV==="development")console.warn(`'CustomElementRegistry' already has "${e}" defined. This may have been caused by live reload or hot module replacement in which case it can be safely ignored.
2
+ Make sure to test your application with a production build as repeat registrations will throw in production.`);else throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the name "${e}" has already been used with this registry`);if(this.__reverseDefinitions.has(t))throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the constructor has already been used with this registry for the tag name ${this.__reverseDefinitions.get(t)}`);t.__localName=e,this.__definitions.set(e,{ctor:t,observedAttributes:t.observedAttributes??[]}),this.__reverseDefinitions.set(t,e),this.__pendingWhenDefineds.get(e)?.resolve(t),this.__pendingWhenDefineds.delete(e);}get(e){return this.__definitions.get(e)?.ctor}getName(e){return this.__reverseDefinitions.get(e)??null}upgrade(e){throw new Error("customElements.upgrade is not currently supported in SSR. Please file a bug if you need it.")}async whenDefined(e){let t=this.__definitions.get(e);if(t)return t.ctor;let r=this.__pendingWhenDefineds.get(e);return r||(r=Xe(),this.__pendingWhenDefineds.set(e,r)),r.promise}},Ze=Lt;var te=new Ze;var et=globalThis,bt=et.ShadowRoot&&(et.ShadyCSS===void 0||et.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,re=Symbol(),ee=new WeakMap,ft=class{constructor(e,t,r){if(this._$cssResult$=true,r!==re)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t;}get styleSheet(){let e=this.o,t=this.t;if(bt&&e===void 0){let r=t!==void 0&&t.length===1;r&&(e=ee.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&ee.set(t,e));}return e}toString(){return this.cssText}},ne=n=>new ft(typeof n=="string"?n:n+"",void 0,re);var ie=(n,e)=>{if(bt)n.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of e){let r=document.createElement("style"),i=et.litNonce;i!==void 0&&r.setAttribute("nonce",i),r.textContent=t.cssText,n.appendChild(r);}},Dt=bt||et.CSSStyleSheet===void 0?n=>n:n=>n instanceof CSSStyleSheet?(e=>{let t="";for(let r of e.cssRules)t+=r.cssText;return ne(t)})(n):n;var{is:Qe,defineProperty:tr,getOwnPropertyDescriptor:er,getOwnPropertyNames:rr,getOwnPropertySymbols:nr,getPrototypeOf:ir}=Object,it=globalThis;it.customElements??=te;var oe=it.trustedTypes,or=oe?oe.emptyScript:"",sr=it.reactiveElementPolyfillSupport,rt=(n,e)=>n,nt={toAttribute(n,e){switch(e){case Boolean:n=n?or:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n);}return n},fromAttribute(n,e){let t=n;switch(e){case Boolean:t=n!==null;break;case Number:t=n===null?null:Number(n);break;case Object:case Array:try{t=JSON.parse(n);}catch{t=null;}}return t}},xt=(n,e)=>!Qe(n,e),se={attribute:true,type:String,converter:nt,reflect:false,useDefault:false,hasChanged:xt};Symbol.metadata??=Symbol("metadata"),it.litPropertyMetadata??=new WeakMap;var U=class extends(globalThis.HTMLElement??Ut){static addInitializer(e){this._$Ei(),(this.l??=[]).push(e);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=se){if(t.state&&(t.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=true),this.elementProperties.set(e,t),!t.noAccessor){let r=Symbol(),i=this.getPropertyDescriptor(e,r,t);i!==void 0&&tr(this.prototype,e,i);}}static getPropertyDescriptor(e,t,r){let{get:i,set:o}=er(this.prototype,e)??{get(){return this[t]},set(s){this[t]=s;}};return {get:i,set(s){let p=i?.call(this);o?.call(this,s),this.requestUpdate(e,p,r);},configurable:true,enumerable:true}}static getPropertyOptions(e){return this.elementProperties.get(e)??se}static _$Ei(){if(this.hasOwnProperty(rt("elementProperties")))return;let e=ir(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties);}static finalize(){if(this.hasOwnProperty(rt("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(rt("properties"))){let t=this.properties,r=[...rr(t),...nr(t)];for(let i of r)this.createProperty(i,t[i]);}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[r,i]of t)this.elementProperties.set(r,i);}this._$Eh=new Map;for(let[t,r]of this.elementProperties){let i=this._$Eu(t,r);i!==void 0&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let r=new Set(e.flat(1/0).reverse());for(let i of r)t.unshift(Dt(i));}else e!==void 0&&t.push(Dt(e));return t}static _$Eu(e,t){let r=t.attribute;return r===false?void 0:typeof r=="string"?r:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this));}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.();}removeController(e){this._$EO?.delete(e);}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e);}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return ie(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach(e=>e.hostConnected?.());}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.());}attributeChangedCallback(e,t,r){this._$AK(e,r);}_$ET(e,t){let r=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,r);if(i!==void 0&&r.reflect===true){let o=(r.converter?.toAttribute!==void 0?r.converter:nt).toAttribute(t,r.type);this._$Em=e,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null;}}_$AK(e,t){let r=this.constructor,i=r._$Eh.get(e);if(i!==void 0&&this._$Em!==i){let o=r.getPropertyOptions(i),s=typeof o.converter=="function"?{fromAttribute:o.converter}:o.converter?.fromAttribute!==void 0?o.converter:nt;this._$Em=i;let p=s.fromAttribute(t,o.type);this[i]=p??this._$Ej?.get(i)??p,this._$Em=null;}}requestUpdate(e,t,r,i=false,o){if(e!==void 0){let s=this.constructor;if(i===false&&(o=this[e]),r??=s.getPropertyOptions(e),!((r.hasChanged??xt)(o,t)||r.useDefault&&r.reflect&&o===this._$Ej?.get(e)&&!this.hasAttribute(s._$Eu(e,r))))return;this.C(e,t,r);}this.isUpdatePending===false&&(this._$ES=this._$EP());}C(e,t,{useDefault:r,reflect:i,wrapped:o},s){r&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,s??t??this[e]),o!==true||s!==void 0)||(this._$AL.has(e)||(this.hasUpdated||r||(t=void 0),this._$AL.set(e,t)),i===true&&this._$Em!==e&&(this._$Eq??=new Set).add(e));}async _$EP(){this.isUpdatePending=true;try{await this._$ES;}catch(t){Promise.reject(t);}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[i,o]of this._$Ep)this[i]=o;this._$Ep=void 0;}let r=this.constructor.elementProperties;if(r.size>0)for(let[i,o]of r){let{wrapped:s}=o,p=this[i];s!==true||this._$AL.has(i)||p===void 0||this.C(i,void 0,o,p);}}let e=false,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(t)):this._$EM();}catch(r){throw e=false,this._$EM(),r}e&&this._$AE(t);}willUpdate(e){}_$AE(e){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(e)),this.updated(e);}_$EM(){this._$AL=new Map,this.isUpdatePending=false;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return true}update(e){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM();}updated(e){}firstUpdated(e){}};U.elementStyles=[],U.shadowRootOptions={mode:"open"},U[rt("elementProperties")]=new Map,U[rt("finalized")]=new Map,sr?.({ReactiveElement:U}),(it.reactiveElementVersions??=[]).push("2.1.2");var vt=globalThis,ae=n=>n,yt=vt.trustedTypes,pe=yt?yt.createPolicy("lit-html",{createHTML:n=>n}):void 0,ge="$lit$",z=`lit$${Math.random().toFixed(9).slice(2)}$`,me="?"+z,ar=`<${me}>`,F=vt.document===void 0?{createTreeWalker:()=>({})}:document,st=()=>F.createComment(""),at=n=>n===null||typeof n!="object"&&typeof n!="function",Ft=Array.isArray,pr=n=>Ft(n)||typeof n?.[Symbol.iterator]=="function",Ot=`[
3
+ \f\r]`,ot=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,le=/-->/g,de=/>/g,P=RegExp(`>|${Ot}(?:([^\\s"'>=/]+)(${Ot}*=${Ot}*(?:[^
4
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),ce=/'/g,he=/"/g,fe=/^(?:script|style|textarea|title)$/i,Gt=n=>(e,...t)=>({_$litType$:n,strings:e,values:t}),x=Gt(1),D=Symbol.for("lit-noChange"),h=Symbol.for("lit-nothing"),ue=new WeakMap,H=F.createTreeWalker(F,129);function be(n,e){if(!Ft(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return pe!==void 0?pe.createHTML(e):e}var lr=(n,e)=>{let t=n.length-1,r=[],i,o=e===2?"<svg>":e===3?"<math>":"",s=ot;for(let p=0;p<t;p++){let a=n[p],c,m,g=-1,w=0;for(;w<a.length&&(s.lastIndex=w,m=s.exec(a),m!==null);)w=s.lastIndex,s===ot?m[1]==="!--"?s=le:m[1]!==void 0?s=de:m[2]!==void 0?(fe.test(m[2])&&(i=RegExp("</"+m[2],"g")),s=P):m[3]!==void 0&&(s=P):s===P?m[0]===">"?(s=i??ot,g=-1):m[1]===void 0?g=-2:(g=s.lastIndex-m[2].length,c=m[1],s=m[3]===void 0?P:m[3]==='"'?he:ce):s===he||s===ce?s=P:s===le||s===de?s=ot:(s=P,i=void 0);let S=s===P&&n[p+1].startsWith("/>")?" ":"";o+=s===ot?a+ar:g>=0?(r.push(c),a.slice(0,g)+ge+a.slice(g)+z+S):a+z+(g===-2?p:S);}return [be(n,o+(n[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]},pt=class n{constructor({strings:e,_$litType$:t},r){let i;this.parts=[];let o=0,s=0,p=e.length-1,a=this.parts,[c,m]=lr(e,t);if(this.el=n.createElement(c,r),H.currentNode=this.el.content,t===2||t===3){let g=this.el.content.firstChild;g.replaceWith(...g.childNodes);}for(;(i=H.nextNode())!==null&&a.length<p;){if(i.nodeType===1){if(i.hasAttributes())for(let g of i.getAttributeNames())if(g.endsWith(ge)){let w=m[s++],S=i.getAttribute(g).split(z),b=/([.?@])?(.*)/.exec(w);a.push({type:1,index:o,name:b[2],strings:S,ctor:b[1]==="."?zt:b[1]==="?"?Bt:b[1]==="@"?Pt:V}),i.removeAttribute(g);}else g.startsWith(z)&&(a.push({type:6,index:o}),i.removeAttribute(g));if(fe.test(i.tagName)){let g=i.textContent.split(z),w=g.length-1;if(w>0){i.textContent=yt?yt.emptyScript:"";for(let S=0;S<w;S++)i.append(g[S],st()),H.nextNode(),a.push({type:2,index:++o});i.append(g[w],st());}}}else if(i.nodeType===8)if(i.data===me)a.push({type:2,index:o});else {let g=-1;for(;(g=i.data.indexOf(z,g+1))!==-1;)a.push({type:7,index:o}),g+=z.length-1;}o++;}}static createElement(e,t){let r=F.createElement("template");return r.innerHTML=e,r}};function W(n,e,t=n,r){if(e===D)return e;let i=r!==void 0?t._$Co?.[r]:t._$Cl,o=at(e)?void 0:e._$litDirective$;return i?.constructor!==o&&(i?._$AO?.(false),o===void 0?i=void 0:(i=new o(n),i._$AT(n,t,r)),r!==void 0?(t._$Co??=[])[r]=i:t._$Cl=i),i!==void 0&&(e=W(n,i._$AS(n,e.values),i,r)),e}var Nt=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t;}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:r}=this._$AD,i=(e?.creationScope??F).importNode(t,true);H.currentNode=i;let o=H.nextNode(),s=0,p=0,a=r[0];for(;a!==void 0;){if(s===a.index){let c;a.type===2?c=new lt(o,o.nextSibling,this,e):a.type===1?c=new a.ctor(o,a.name,a.strings,this,e):a.type===6&&(c=new Ht(o,this,e)),this._$AV.push(c),a=r[++p];}s!==a?.index&&(o=H.nextNode(),s++);}return H.currentNode=F,i}p(e){let t=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++;}},lt=class n{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,r,i){this.type=2,this._$AH=h,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=i,this._$Cv=i?.isConnected??true;}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=W(this,e,t),at(e)?e===h||e==null||e===""?(this._$AH!==h&&this._$AR(),this._$AH=h):e!==this._$AH&&e!==D&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):pr(e)?this.k(e):this._(e);}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e));}_(e){this._$AH!==h&&at(this._$AH)?this._$AA.nextSibling.data=e:this.T(F.createTextNode(e)),this._$AH=e;}$(e){let{values:t,_$litType$:r}=e,i=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=pt.createElement(be(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===i)this._$AH.p(t);else {let o=new Nt(i,this),s=o.u(this.options);o.p(t),this.T(s),this._$AH=o;}}_$AC(e){let t=ue.get(e.strings);return t===void 0&&ue.set(e.strings,t=new pt(e)),t}k(e){Ft(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,r,i=0;for(let o of e)i===t.length?t.push(r=new n(this.O(st()),this.O(st()),this,this.options)):r=t[i],r._$AI(o),i++;i<t.length&&(this._$AR(r&&r._$AB.nextSibling,i),t.length=i);}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(false,true,t);e!==this._$AB;){let r=ae(e).nextSibling;ae(e).remove(),e=r;}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e));}},V=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,i,o){this.type=1,this._$AH=h,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=o,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=h;}_$AI(e,t=this,r,i){let o=this.strings,s=false;if(o===void 0)e=W(this,e,t,0),s=!at(e)||e!==this._$AH&&e!==D,s&&(this._$AH=e);else {let p=e,a,c;for(e=o[0],a=0;a<o.length-1;a++)c=W(this,p[r+a],t,a),c===D&&(c=this._$AH[a]),s||=!at(c)||c!==this._$AH[a],c===h?e=h:e!==h&&(e+=(c??"")+o[a+1]),this._$AH[a]=c;}s&&!i&&this.j(e);}j(e){e===h?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"");}},zt=class extends V{constructor(){super(...arguments),this.type=3;}j(e){this.element[this.name]=e===h?void 0:e;}},Bt=class extends V{constructor(){super(...arguments),this.type=4;}j(e){this.element.toggleAttribute(this.name,!!e&&e!==h);}},Pt=class extends V{constructor(e,t,r,i,o){super(e,t,r,i,o),this.type=5;}_$AI(e,t=this){if((e=W(this,e,t,0)??h)===D)return;let r=this._$AH,i=e===h&&r!==h||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,o=e!==h&&(r===h||i);i&&this.element.removeEventListener(this.name,this,r),o&&this.element.addEventListener(this.name,this,e),this._$AH=e;}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e);}},Ht=class{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r;}get _$AU(){return this._$AM._$AU}_$AI(e){W(this,e);}};var dr=vt.litHtmlPolyfillSupport;dr?.(pt,lt),(vt.litHtmlVersions??=[]).push("3.3.2");var q=(n,e,t)=>{let r=t?.renderBefore??e,i=r._$litPart$;if(i===void 0){let o=t?.renderBefore??null;r._$litPart$=i=new lt(e.insertBefore(st(),o),o,void 0,t??{});}return i._$AI(n),i};var jt=globalThis,k=class extends U{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=q(t,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false);}render(){return D}};k._$litElement$=true,k.finalized=true,jt.litElementHydrateSupport?.({LitElement:k});var cr=jt.litElementPolyfillSupport;cr?.({LitElement:k});(jt.litElementVersions??=[]).push("4.2.2");var wt=n=>(e,t)=>{t!==void 0?t.addInitializer(()=>{customElements.define(n,e);}):customElements.define(n,e);};var hr={attribute:true,type:String,converter:nt,reflect:false,hasChanged:xt},ur=(n=hr,e,t)=>{let{kind:r,metadata:i}=t,o=globalThis.litPropertyMetadata.get(i);if(o===void 0&&globalThis.litPropertyMetadata.set(i,o=new Map),r==="setter"&&((n=Object.create(n)).wrapped=true),o.set(t.name,n),r==="accessor"){let{name:s}=t;return {set(p){let a=e.get.call(this);e.set.call(this,p),this.requestUpdate(s,a,n,true,p);},init(p){return p!==void 0&&this.C(s,void 0,n,p),p}}}if(r==="setter"){let{name:s}=t;return function(p){let a=this[s];e.call(this,p),this.requestUpdate(s,a,n,true,p);}}throw Error("Unsupported decorator location: "+r)};function u(n){return (e,t)=>typeof t=="object"?ur(n,e,t):((r,i,o)=>{let s=i.hasOwnProperty(o);return i.constructor.createProperty(o,r),s?Object.getOwnPropertyDescriptor(i,o):void 0})(n,e,t)}function O(n){return u({...n,state:true,attribute:false})}var xe={ATTRIBUTE:1},ye=n=>(...e)=>({_$litDirective$:n,values:e}),Ct=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this._$Ct=e,this._$AM=t,this._$Ci=r;}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};var ve="important",gr=" !"+ve,y=ye(class extends Ct{constructor(n){if(super(n),n.type!==xe.ATTRIBUTE||n.name!=="style"||n.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(n){return Object.keys(n).reduce((e,t)=>{let r=n[t];return r==null?e:e+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`},"")}update(n,[e]){let{style:t}=n.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(e)),this.render(e);for(let r of this.ft)e[r]==null&&(this.ft.delete(r),r.includes("-")?t.removeProperty(r):t[r]=null);for(let r in e){let i=e[r];if(i!=null){this.ft.add(r);let o=typeof i=="string"&&i.endsWith(gr);r.includes("-")||o?t.setProperty(r,o?i.slice(0,-11):i,o?ve:""):t[r]=i;}}return D}});var Y={"2xs":20,xs:24,sm:32,md:40,lg:48,xl:64,"2xl":80,"3xl":120},we={online:"#30D158",away:"#FFD60A",busy:"#FF453A",offline:"#8E8E93",dnd:"#FF453A"},Se={none:"none",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)",glow:"0 0 20px 0 rgba(99, 102, 241, 0.3)"},M={size:"md",variant:"circle",loading:"lazy",placeholder:"shimmer",borderWidth:2,borderColor:"#ffffff",placeholderColor:"#f3f4f6",shadow:"sm"};var K={circle:"9999px",rounded:"12px",squircle:"30%",square:"0px"},I={max:4,direction:"ltr",overlap:.3,size:"md",tooltipDelay:300,dropdownMaxHeight:280,animated:true};function R(...n){return n.filter(Boolean).join(" ")}function dt(n){return /^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$/.test(n)}function Ce(n){return {"top-left":"np:top-0 np:left-0","top-center":"np:top-0 np:left-1/2 np:-translate-x-1/2","top-right":"np:top-0 np:right-0","bottom-left":"np:bottom-0 np:left-0","bottom-center":"np:bottom-0 np:left-1/2 np:-translate-x-1/2","bottom-right":"np:bottom-0 np:right-0"}[n]}function _e(n){return {"top-left":"np:-rotate-45 np:-translate-x-1/4 np:-translate-y-1/2","top-center":"np:rotate-0 np:-translate-y-1/2","top-right":"np:rotate-45 np:translate-x-1/4 np:-translate-y-1/2","bottom-left":"np:rotate-45 np:-translate-x-1/4 np:translate-y-1/2","bottom-center":"np:rotate-0 np:translate-y-1/2","bottom-right":"np:-rotate-45 np:translate-x-1/4 np:translate-y-1/2"}[n]}function _t(n){let t=n.trim().replace(/[^\w\s]/g,"").split(/\s+/).filter(Boolean);return t.length===0?"?":t.length===1?t[0].slice(0,1).toUpperCase():(t[0][0]+(t.at(-1)?.[0]??"")).toUpperCase()}function Wt(n){return Math.round(n*.38)}function Ee(n,e){let t;if(e){let i=Math.round(n*.31);t=Math.min(24,Math.max(14,i));}else {let i=Math.round(n*.22);t=Math.min(14,Math.max(8,i));}let r=Math.max(9,Math.round(t*.55));return {size:t,fontSize:r}}function $e(n,e){let t=Math.min(16,Math.max(8,Math.round(n*.2)));return Math.min(18,t+(e-1)*2)}function Ae(n,e){return typeof n=="string"?n:e&&n>e?`${e}+`:n.toString()}function Re(n){return n.length===0?"transparent":n.length===1?n[0]:`conic-gradient(${n.map((t,r)=>{let i=r/n.length*360,o=(r+1)/n.length*360;return `${t} ${i}deg ${o}deg`}).join(", ")})`}function mr(n){let e=0;for(let t=0;t<n.length;t++){let r=n.charCodeAt(t);e=(e<<5)-e+r,e&=e;}return Math.abs(e)}function Te(n,e,t){let i=Math.max(0,Math.min(100,n))/100*360;return `conic-gradient(from 270deg, ${e} 0deg ${i}deg, ${t} ${i}deg 360deg)`}function Et(n){let e=["linear-gradient(135deg, #667eea 0%, #764ba2 100%)","linear-gradient(135deg, #f093fb 0%, #f5576c 100%)","linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)","linear-gradient(135deg, #43e97b 0%, #38f9d7 100%)","linear-gradient(135deg, #fa709a 0%, #fee140 100%)","linear-gradient(135deg, #a8edea 0%, #fed6e3 100%)","linear-gradient(135deg, #d299c2 0%, #fef9d7 100%)","linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%)","linear-gradient(135deg, #cd9cf2 0%, #f6f3ff 100%)","linear-gradient(135deg, #fddb92 0%, #d1fdff 100%)"],t=mr(n)%e.length;return e[t]}function ke(n){return typeof n=="number"?n:Y[n]??Y[I.size]}function Vt(n,e,t){let r=t?e-1:e;if(n<=r)return {visible:n,hidden:0,showCounter:false};let i=r-1,o=n-i;return {visible:i,hidden:o,showCounter:true}}function $t(n,e,t,r,i){let o=i??e*(1-t);return n*o}function Me(n,e,t){return t==="ltr"?e-n:n+1}function Ie(n,e,t,r){if(n===0)return 0;if(n===1)return e;let i=r??e*(1-t);return e+i*(n-1)}function Le(n){return n>99?"+99":`+${n}`}function Ue(n){return n<=80?"80":n<=120?"120":n<=240?"240":n<=480?"480":"960"}function De(n){if(!(n&&dt(n)))return "light";let e=n.replace("#","");e.length===3&&(e=e.split("").map(s=>s+s).join(""));let t=Number.parseInt(e.slice(0,2),16),r=Number.parseInt(e.slice(2,4),16),i=Number.parseInt(e.slice(4,6),16);return (.299*t+.587*r+.114*i)/255>.5?"light":"dark"}function Oe(n,e,t,r,i){let o=n.endsWith("/")?n.slice(0,-1):n,s=`${e}_${t}_${r}.webp`;return `${o}/api/profile-picture/cdn/${s}?hostname=${i}`}function Ne(n){return {circle:"np:rounded-full",rounded:"np:rounded-xl",squircle:"np:rounded-[30%]",square:"np:rounded-none"}[n]}function ze(n,e){return {className:{1:"np:border",2:"np:border-2",3:"np:border-[3px]",4:"np:border-4",5:"np:border-[5px]",6:"np:border-[6px]",8:"np:border-8"}[n],style:{borderColor:e,borderStyle:"solid"}}}function Be(n,e){return e?{className:"",style:{background:e}}:n?n.includes("gradient")?{className:"",style:{background:n}}:{className:"",style:{backgroundColor:n}}:{className:"",style:{backgroundColor:"#e7e7e7"}}}function Pe(n){return {boxShadow:Se[n]}}var fr={shimmer:`
5
5
  @keyframes pp-shimmer {
6
6
  0% { transform: translateX(-100%); }
7
7
  100% { transform: translateX(100%); }
@@ -39,8 +39,8 @@ Make sure to test your application with a production build as repeat registratio
39
39
  0% { transform: scale(0.8); opacity: 0; }
40
40
  50% { transform: scale(1.05); }
41
41
  100% { transform: scale(1); opacity: 1; }
42
- }`},br=Object.values(mr).join(`
43
- `),yr=`
42
+ }`},br=Object.values(fr).join(`
43
+ `),xr=`
44
44
  /* Profile Picture Component Styles */
45
45
  .pp-container {
46
46
  --pp-transition-duration: 200ms;
@@ -157,7 +157,6 @@ Make sure to test your application with a production build as repeat registratio
157
157
  display: flex;
158
158
  align-items: center;
159
159
  justify-content: center;
160
- border-radius: 9999px;
161
160
  font-weight: 600;
162
161
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
163
162
  line-height: 1;
@@ -263,7 +262,7 @@ Make sure to test your application with a production build as repeat registratio
263
262
  }
264
263
  }
265
264
  `,He=`${br}
266
- ${yr}`,Fe=`
265
+ ${xr}`,Fe=`
267
266
  @keyframes np-shimmer {
268
267
  0% { background-position: -200% 0; }
269
268
  100% { background-position: 200% 0; }
@@ -273,22 +272,22 @@ ${yr}`,Fe=`
273
272
  background-size: 200% 100%;
274
273
  animation: np-shimmer 1.5s infinite;
275
274
  }
276
- `;function je(n,t=.3){if(st(n)){let e=Number.parseInt(n.slice(1,3),16),r=Number.parseInt(n.slice(3,5),16),i=Number.parseInt(n.slice(5,7),16);return `0 0 20px 0 rgba(${e}, ${r}, ${i}, ${t})`}return `0 0 20px 0 ${n}`}var xr=`
275
+ `;function Ge(n,e=.3){if(dt(n)){let t=Number.parseInt(n.slice(1,3),16),r=Number.parseInt(n.slice(3,5),16),i=Number.parseInt(n.slice(5,7),16);return `0 0 20px 0 rgba(${t}, ${r}, ${i}, ${e})`}return `0 0 20px 0 ${n}`}var yr=`
277
276
  @keyframes ppg-tooltip-in {
278
277
  from {
279
278
  opacity: 0;
280
- transform: translateY(4px) scale(0.96);
279
+ transform: translateX(-50%) translateY(4px) scale(0.96);
281
280
  }
282
281
  to {
283
282
  opacity: 1;
284
- transform: translateY(0) scale(1);
283
+ transform: translateX(-50%) translateY(0) scale(1);
285
284
  }
286
285
  }
287
286
 
288
287
  @keyframes ppg-dropdown-in {
289
288
  from {
290
289
  opacity: 0;
291
- transform: translateY(-8px) scale(0.96);
290
+ transform: translateY(-6px) scale(0.95);
292
291
  }
293
292
  to {
294
293
  opacity: 1;
@@ -304,6 +303,26 @@ ${yr}`,Fe=`
304
303
  transform: translateY(-4px) scale(1.08);
305
304
  }
306
305
  }
306
+
307
+ @keyframes ppg-modal-in {
308
+ from {
309
+ opacity: 0;
310
+ transform: translate(-50%, -50%) scale(0.9);
311
+ }
312
+ to {
313
+ opacity: 1;
314
+ transform: translate(-50%, -50%) scale(1);
315
+ }
316
+ }
317
+
318
+ @keyframes ppg-backdrop-in {
319
+ from {
320
+ opacity: 0;
321
+ }
322
+ to {
323
+ opacity: 1;
324
+ }
325
+ }
307
326
  `,vr=`
308
327
  /* Profile Picture Group Container */
309
328
  .ppg-container {
@@ -385,7 +404,7 @@ ${yr}`,Fe=`
385
404
  }
386
405
 
387
406
  .ppg-counter:hover {
388
- background: #e8e8ed;
407
+ background: #ebebed;
389
408
  transform: scale(1.05);
390
409
  }
391
410
 
@@ -439,7 +458,7 @@ ${yr}`,Fe=`
439
458
 
440
459
  /* Tooltip */
441
460
  .ppg-tooltip {
442
- position: fixed;
461
+ position: absolute;
443
462
  z-index: 9999;
444
463
  padding: 6px 12px;
445
464
  background: var(--ppg-tooltip-bg);
@@ -451,7 +470,8 @@ ${yr}`,Fe=`
451
470
  box-shadow: var(--ppg-shadow-lg);
452
471
  pointer-events: none;
453
472
  white-space: nowrap;
454
- animation: ppg-tooltip-in 150ms ease-out;
473
+ transform: translateX(-50%);
474
+ animation: ppg-tooltip-in 150ms ease-out forwards;
455
475
  backdrop-filter: blur(20px);
456
476
  -webkit-backdrop-filter: blur(20px);
457
477
  }
@@ -480,111 +500,168 @@ ${yr}`,Fe=`
480
500
  /* Dropdown */
481
501
  .ppg-dropdown {
482
502
  position: absolute;
483
- z-index: 1000;
484
- min-width: 200px;
485
- max-width: 280px;
503
+ z-index: 9998;
504
+ right: 0;
505
+ min-width: 220px;
506
+ max-width: 300px;
486
507
  background: var(--ppg-dropdown-bg);
487
- border-radius: var(--ppg-radius);
488
- box-shadow: var(--ppg-shadow-lg);
489
- border: 1px solid var(--ppg-border);
508
+ border-radius: 14px;
509
+ box-shadow:
510
+ 0 4px 24px rgba(0, 0, 0, 0.12),
511
+ 0 1px 4px rgba(0, 0, 0, 0.08),
512
+ 0 0 0 1px var(--ppg-border);
490
513
  overflow: hidden;
491
- animation: ppg-dropdown-in 200ms ease-out;
514
+ animation: ppg-dropdown-in 200ms cubic-bezier(0.32, 0.72, 0, 1) forwards;
515
+ transform-origin: top right;
516
+ backdrop-filter: blur(20px);
517
+ -webkit-backdrop-filter: blur(20px);
492
518
  }
493
519
 
494
520
  .ppg-dropdown[data-position="bottom"] {
495
- top: calc(100% + 8px);
521
+ top: calc(100% + 10px);
496
522
  }
497
523
 
498
524
  .ppg-dropdown[data-position="top"] {
499
- bottom: calc(100% + 8px);
525
+ bottom: calc(100% + 10px);
526
+ transform-origin: bottom right;
527
+ }
528
+
529
+ /* Modal style for mobile */
530
+ .ppg-dropdown[data-position="modal"] {
531
+ transform-origin: center center;
532
+ animation: ppg-modal-in 250ms cubic-bezier(0.32, 0.72, 0, 1) forwards;
533
+ border-radius: 20px;
534
+ }
535
+
536
+ .ppg-backdrop-visible {
537
+ background: rgba(0, 0, 0, 0.4);
538
+ animation: ppg-backdrop-in 200ms ease-out forwards;
500
539
  }
501
540
 
502
541
  .ppg-dropdown-header {
503
- padding: 12px 16px 8px;
504
- font-size: 12px;
542
+ padding: 14px 16px 10px;
543
+ font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
544
+ font-size: 11px;
505
545
  font-weight: 600;
506
546
  color: #86868b;
507
547
  text-transform: uppercase;
508
- letter-spacing: 0.04em;
509
- border-bottom: 1px solid var(--ppg-border);
548
+ letter-spacing: 0.06em;
549
+ background: linear-gradient(to bottom, rgba(0,0,0,0.02), transparent);
510
550
  }
511
551
 
512
552
  .ppg-dropdown-list {
513
553
  overflow-y: auto;
514
- padding: 4px 0;
554
+ padding: 6px;
555
+ scrollbar-width: thin;
556
+ scrollbar-color: rgba(0,0,0,0.2) transparent;
557
+ }
558
+
559
+ .ppg-dropdown-list::-webkit-scrollbar {
560
+ width: 6px;
561
+ }
562
+
563
+ .ppg-dropdown-list::-webkit-scrollbar-track {
564
+ background: transparent;
565
+ }
566
+
567
+ .ppg-dropdown-list::-webkit-scrollbar-thumb {
568
+ background: rgba(0,0,0,0.15);
569
+ border-radius: 3px;
515
570
  }
516
571
 
517
572
  .ppg-dropdown-item {
518
573
  display: flex;
519
574
  align-items: center;
520
575
  gap: 12px;
521
- padding: 10px 16px;
576
+ padding: 10px 12px;
522
577
  cursor: pointer;
523
- transition: background-color var(--ppg-transition);
578
+ border-radius: 10px;
579
+ transition: all 150ms ease;
580
+ margin: 2px 0;
524
581
  }
525
582
 
526
583
  .ppg-dropdown-item:hover {
527
584
  background: var(--ppg-dropdown-hover);
585
+ transform: translateX(2px);
528
586
  }
529
587
 
530
588
  .ppg-dropdown-item:focus-visible {
531
589
  outline: none;
532
590
  background: var(--ppg-dropdown-hover);
591
+ box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.4);
592
+ }
593
+
594
+ .ppg-dropdown-item:active {
595
+ transform: scale(0.98);
533
596
  }
534
597
 
535
598
  .ppg-dropdown-avatar {
536
599
  flex-shrink: 0;
537
- width: 32px;
538
- height: 32px;
600
+ width: 36px;
601
+ height: 36px;
539
602
  border-radius: 9999px;
540
603
  object-fit: cover;
541
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
604
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
605
+ border: 2px solid rgba(255, 255, 255, 0.8);
542
606
  }
543
607
 
544
608
  .ppg-dropdown-avatar-fallback {
545
609
  flex-shrink: 0;
546
- width: 32px;
547
- height: 32px;
610
+ width: 36px;
611
+ height: 36px;
548
612
  border-radius: 9999px;
549
613
  display: flex;
550
614
  align-items: center;
551
615
  justify-content: center;
616
+ font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
552
617
  font-size: 13px;
553
618
  font-weight: 600;
554
619
  color: white;
620
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
621
+ border: 2px solid rgba(255, 255, 255, 0.3);
555
622
  }
556
623
 
557
624
  .ppg-dropdown-info {
558
625
  flex: 1;
559
626
  min-width: 0;
627
+ padding-right: 4px;
628
+ text-align: left;
560
629
  }
561
630
 
562
631
  .ppg-dropdown-name {
632
+ font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
563
633
  font-size: 14px;
564
634
  font-weight: 500;
565
635
  color: #1d1d1f;
566
636
  white-space: nowrap;
567
637
  overflow: hidden;
568
638
  text-overflow: ellipsis;
639
+ line-height: 1.3;
640
+ text-align: left;
569
641
  }
570
642
 
571
643
  .ppg-dropdown-status {
572
644
  display: flex;
573
645
  align-items: center;
574
- gap: 6px;
646
+ gap: 5px;
647
+ font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
575
648
  font-size: 12px;
576
649
  color: #86868b;
577
650
  margin-top: 2px;
651
+ line-height: 1.2;
578
652
  }
579
653
 
580
654
  .ppg-dropdown-presence {
581
- width: 8px;
582
- height: 8px;
655
+ width: 7px;
656
+ height: 7px;
583
657
  border-radius: 9999px;
658
+ flex-shrink: 0;
659
+ box-shadow: 0 0 0 1.5px var(--ppg-dropdown-bg);
584
660
  }
585
661
 
586
662
  .ppg-dropdown-presence[data-status="online"] {
587
663
  background: #30D158;
664
+ box-shadow: 0 0 0 1.5px var(--ppg-dropdown-bg), 0 0 6px rgba(48, 209, 88, 0.5);
588
665
  }
589
666
 
590
667
  .ppg-dropdown-presence[data-status="away"] {
@@ -604,7 +681,7 @@ ${yr}`,Fe=`
604
681
  .ppg-backdrop {
605
682
  position: fixed;
606
683
  inset: 0;
607
- z-index: 999;
684
+ z-index: 9997;
608
685
  }
609
686
 
610
687
  /* Reduced motion */
@@ -646,43 +723,79 @@ ${yr}`,Fe=`
646
723
  box-shadow: 0 0 0 1.5px rgba(28, 28, 30, 0.95), var(--ppg-shadow-sm);
647
724
  }
648
725
 
726
+ .ppg-counter:hover {
727
+ background: #3a3a3c;
728
+ }
729
+
730
+ .ppg-dropdown {
731
+ background: rgba(44, 44, 46, 0.95);
732
+ box-shadow:
733
+ 0 4px 24px rgba(0, 0, 0, 0.4),
734
+ 0 1px 4px rgba(0, 0, 0, 0.2),
735
+ 0 0 0 1px rgba(255, 255, 255, 0.08);
736
+ }
737
+
649
738
  .ppg-dropdown-name {
650
739
  color: #ffffff;
651
740
  }
652
741
 
653
742
  .ppg-dropdown-header {
654
743
  color: #98989d;
744
+ background: linear-gradient(to bottom, rgba(255,255,255,0.03), transparent);
745
+ }
746
+
747
+ .ppg-dropdown-avatar {
748
+ border-color: rgba(255, 255, 255, 0.15);
749
+ }
750
+
751
+ .ppg-dropdown-avatar-fallback {
655
752
  border-color: rgba(255, 255, 255, 0.1);
656
753
  }
754
+
755
+ .ppg-dropdown-list {
756
+ scrollbar-color: rgba(255,255,255,0.35) transparent;
757
+ }
758
+
759
+ .ppg-dropdown-list::-webkit-scrollbar-thumb {
760
+ background: rgba(255,255,255,0.35);
761
+ }
762
+
763
+ .ppg-dropdown-presence {
764
+ box-shadow: 0 0 0 1.5px rgba(44, 44, 46, 0.95);
765
+ }
766
+
767
+ .ppg-dropdown-presence[data-status="online"] {
768
+ box-shadow: 0 0 0 1.5px rgba(44, 44, 46, 0.95), 0 0 6px rgba(48, 209, 88, 0.5);
769
+ }
657
770
  }
658
- `,Ge=`${xr}
659
- ${vr}`;var l=class extends A{constructor(){super(...arguments);this.src="";this.alt="";this.size=R.size;this.variant=R.variant;this.shadow=R.shadow;this.border=false;this.borderWidth=R.borderWidth;this.borderColor=R.borderColor;this.rotation=0;this.loading=R.loading;this.placeholder=R.placeholder;this.placeholderColor=R.placeholderColor;this.isLoaded=false;this.hasError=false;this.cdnLoadFailed=false;this.previousSrc="";this.RETRY_DELAY_MS=3e4;}static setCdnBaseUrl(e){l.cdnBaseUrl=e,l.instances.forEach(r=>{r.extCustomerId&&!r.cdnImageUrl&&(r.cdnLoadFailed=false,r.retryTimeoutId&&(clearTimeout(r.retryTimeoutId),r.retryTimeoutId=void 0),r.previousExtCustomerId||(r.previousExtCustomerId=r.extCustomerId),r.loadCdnImage());});}static getCdnBaseUrl(){return l.cdnBaseUrl}createRenderRoot(){return l.injectStylesOnce(),this}static injectStylesOnce(){if(l.stylesInjected||typeof document>"u")return;let e=document.createElement("style");e.textContent=He,document.head.appendChild(e),l.stylesInjected=true;}get pixelSize(){let e=this.size;return typeof e=="number"?e:G[e]??G[R.size]}connectedCallback(){super.connectedCallback(),l.instances.add(this);}disconnectedCallback(){super.disconnectedCallback(),l.instances.delete(this),this.retryTimeoutId&&(clearTimeout(this.retryTimeoutId),this.retryTimeoutId=void 0);}firstUpdated(){this.extCustomerId&&l.cdnBaseUrl&&(this.previousExtCustomerId=this.extCustomerId,this.loadCdnImage());}updated(e){super.updated(e),this.extCustomerId&&l.cdnBaseUrl&&!this.cdnImageUrl&&(this.cdnLoadFailed||!this.previousExtCustomerId)&&(this.previousExtCustomerId||(this.previousExtCustomerId=this.extCustomerId),this.cdnLoadFailed=false,this.loadCdnImage());}willUpdate(e){e.has("src")&&this.src!==this.previousSrc&&(this.isLoaded=false,this.hasError=false,this.previousSrc=this.src),(e.has("extCustomerId")||e.has("size")||e.has("bgColor"))&&this.extCustomerId!==this.previousExtCustomerId&&(this.previousExtCustomerId=this.extCustomerId,this.cdnImageUrl=void 0,this.cdnLoadFailed=false,this.isLoaded=false,this.hasError=false,this.retryTimeoutId&&(clearTimeout(this.retryTimeoutId),this.retryTimeoutId=void 0),this.loadCdnImage());}handleLoad(){this.isLoaded=true,this.dispatchEvent(new CustomEvent("load",{bubbles:true,composed:true}));}handleError(){if(this.cdnImageUrl&&!this.cdnLoadFailed){this.cdnLoadFailed=true,this.cdnImageUrl=void 0,this.dispatchEvent(new CustomEvent("cdn-error",{bubbles:true,composed:true,detail:{error:"Image load failed"}})),this.retryTimeoutId&&clearTimeout(this.retryTimeoutId),this.retryTimeoutId=setTimeout(()=>{this.retryTimeoutId=void 0,this.extCustomerId&&l.cdnBaseUrl&&(this.cdnLoadFailed=false,this.hasError=false,this.isLoaded=false,this.loadCdnImage());},this.RETRY_DELAY_MS);return}this.hasError=true,this.isLoaded=true,this.dispatchEvent(new CustomEvent("error",{bubbles:true,composed:true}));}loadCdnImage(){if(!(this.extCustomerId&&l.cdnBaseUrl)){this.cdnLoadFailed=true;return}let e=Me(this.pixelSize),r=De(this.bgColor),i=typeof window<"u"?window.location.hostname:"localhost";this.cdnImageUrl=Oe(l.cdnBaseUrl,this.extCustomerId,e,r,i);}getContainerStyles(){let e=Be(this.bgColor,this.bgGradient),r=this.border?ze(this.borderWidth,this.borderColor):null,i=Pe(this.shadow),o={};if(this.glow){let p=this.glow.color??this.borderColor??"#6366f1";o={"--pp-glow-color":p,boxShadow:je(p,this.glow.intensity??.3)};}let s=this.interactive?.hoverable||this.interactive?.pressable;return {classes:$("pp-container",Ne(this.variant),e.className,r?.className,s&&"pp-interactive",this.glow?.animate&&"pp-glow"),styles:{width:`${this.pixelSize}px`,height:`${this.pixelSize}px`,borderRadius:W[this.variant],...e.style,...r?.style,...i,...o,cursor:this.interactive?.cursor??(s?"pointer":"default"),transform:this.rotation?`rotate(${this.rotation}deg)`:void 0}}}renderPlaceholder(){if(this.isLoaded||this.placeholder==="none")return c;let e={shimmer:"pp-shimmer",pulse:"pp-pulse",skeleton:"pp-skeleton",blur:"",none:""}[this.placeholder];return b`
660
- ${this.placeholder==="shimmer"?b`<style>${Fe}</style>`:c}
771
+ `,je=`${yr}
772
+ ${vr}`;var l=class extends k{constructor(){super(...arguments);this.src="";this.alt="";this.size=M.size;this.variant=M.variant;this.shadow=M.shadow;this.border=false;this.borderWidth=M.borderWidth;this.borderColor=M.borderColor;this.rotation=0;this.loading=M.loading;this.placeholder=M.placeholder;this.placeholderColor=M.placeholderColor;this.isLoaded=false;this.hasError=false;this.cdnLoadFailed=false;this.previousSrc="";this.RETRY_DELAY_MS=3e4;}static setCdnBaseUrl(t){l.cdnBaseUrl=t,l.instances.forEach(r=>{r.extCustomerId&&!r.cdnImageUrl&&(r.cdnLoadFailed=false,r.retryTimeoutId&&(clearTimeout(r.retryTimeoutId),r.retryTimeoutId=void 0),r.previousExtCustomerId||(r.previousExtCustomerId=r.extCustomerId),r.loadCdnImage());});}static getCdnBaseUrl(){return l.cdnBaseUrl}createRenderRoot(){return l.injectStylesOnce(),this}static injectStylesOnce(){if(l.stylesInjected||typeof document>"u")return;let t=document.createElement("style");t.textContent=He,document.head.appendChild(t),l.stylesInjected=true;}get pixelSize(){let t=this.size;return typeof t=="number"?t:Y[t]??Y[M.size]}connectedCallback(){super.connectedCallback(),l.instances.add(this);}disconnectedCallback(){super.disconnectedCallback(),l.instances.delete(this),this.retryTimeoutId&&(clearTimeout(this.retryTimeoutId),this.retryTimeoutId=void 0);}firstUpdated(){this.extCustomerId&&l.cdnBaseUrl&&(this.previousExtCustomerId=this.extCustomerId,this.loadCdnImage());}updated(t){super.updated(t),this.extCustomerId&&l.cdnBaseUrl&&!this.cdnImageUrl&&(this.cdnLoadFailed||!this.previousExtCustomerId)&&(this.previousExtCustomerId||(this.previousExtCustomerId=this.extCustomerId),this.cdnLoadFailed=false,this.loadCdnImage());}willUpdate(t){t.has("src")&&this.src!==this.previousSrc&&(this.isLoaded=false,this.hasError=false,this.previousSrc=this.src),(t.has("extCustomerId")||t.has("size")||t.has("bgColor"))&&this.extCustomerId!==this.previousExtCustomerId&&(this.previousExtCustomerId=this.extCustomerId,this.cdnImageUrl=void 0,this.cdnLoadFailed=false,this.isLoaded=false,this.hasError=false,this.retryTimeoutId&&(clearTimeout(this.retryTimeoutId),this.retryTimeoutId=void 0),this.loadCdnImage());}handleLoad(){this.isLoaded=true,this.dispatchEvent(new CustomEvent("load",{bubbles:true,composed:true}));}handleError(){if(this.cdnImageUrl&&!this.cdnLoadFailed){this.cdnLoadFailed=true,this.cdnImageUrl=void 0,this.dispatchEvent(new CustomEvent("cdn-error",{bubbles:true,composed:true,detail:{error:"Image load failed"}})),this.retryTimeoutId&&clearTimeout(this.retryTimeoutId),this.retryTimeoutId=setTimeout(()=>{this.retryTimeoutId=void 0,this.extCustomerId&&l.cdnBaseUrl&&(this.cdnLoadFailed=false,this.hasError=false,this.isLoaded=false,this.loadCdnImage());},this.RETRY_DELAY_MS);return}this.hasError=true,this.isLoaded=true,this.dispatchEvent(new CustomEvent("error",{bubbles:true,composed:true}));}loadCdnImage(){if(!(this.extCustomerId&&l.cdnBaseUrl)){this.cdnLoadFailed=true;return}let t=Ue(this.pixelSize),r=De(this.bgColor),i=typeof window<"u"?window.location.hostname:"localhost";this.cdnImageUrl=Oe(l.cdnBaseUrl,this.extCustomerId,t,r,i);}getContainerStyles(){let t=Be(this.bgColor,this.bgGradient),r=this.border?ze(this.borderWidth,this.borderColor):null,i=Pe(this.shadow),o={};if(this.glow){let p=this.glow.color??this.borderColor??"#6366f1";o={"--pp-glow-color":p,boxShadow:Ge(p,this.glow.intensity??.3)};}let s=this.interactive?.hoverable||this.interactive?.pressable;return {classes:R("pp-container",Ne(this.variant),t.className,r?.className,s&&"pp-interactive",this.glow?.animate&&"pp-glow"),styles:{width:`${this.pixelSize}px`,height:`${this.pixelSize}px`,borderRadius:K[this.variant],...t.style,...r?.style,...i,...o,cursor:this.interactive?.cursor??(s?"pointer":"default"),transform:this.rotation?`rotate(${this.rotation}deg)`:void 0}}}renderPlaceholder(){if(this.isLoaded||this.placeholder==="none")return h;let t={shimmer:"pp-shimmer",pulse:"pp-pulse",skeleton:"pp-skeleton",blur:"",none:""}[this.placeholder];return x`
773
+ ${this.placeholder==="shimmer"?x`<style>${Fe}</style>`:h}
661
774
  <div
662
- class=${$("np:absolute np:inset-0",e)}
775
+ class=${R("np:absolute np:inset-0",t)}
663
776
  style=${y({backgroundColor:this.placeholderColor,borderRadius:"inherit"})}>
664
777
  </div>
665
- `}renderFallback(){if(this.fallback)return b`
778
+ `}renderFallback(){if(this.fallback)return x`
666
779
  <span
667
780
  class="pp-fallback"
668
- style=${y({fontSize:`${jt(this.pixelSize)}px`})}>
781
+ style=${y({fontSize:`${Wt(this.pixelSize)}px`})}>
669
782
  ${this.fallback}
670
783
  </span>
671
- `;if(this.alt){let r=wt(this.alt);return b`
784
+ `;if(this.alt){let r=Et(this.alt);return x`
672
785
  <div
673
786
  class="pp-fallback np:absolute np:inset-0"
674
- style=${y({background:this.bgColor??r,fontSize:`${jt(this.pixelSize)}px`})}>
675
- ${vt(this.alt)}
787
+ style=${y({background:this.bgColor??r,fontSize:`${Wt(this.pixelSize)}px`})}>
788
+ ${_t(this.alt)}
676
789
  </div>
677
- `}let e=this.pixelSize*.5;return b`
790
+ `}let t=this.pixelSize*.5;return x`
678
791
  <svg
679
792
  class="pp-fallback-icon"
680
- style="width: ${e}px; height: ${e}px;"
793
+ style="width: ${t}px; height: ${t}px;"
681
794
  fill="currentColor"
682
795
  viewBox="0 0 24 24">
683
796
  <path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" />
684
797
  </svg>
685
- `}renderImage(){let e=!!(this.extCustomerId&&l.cdnBaseUrl),r;return this.cdnImageUrl?r=this.cdnImageUrl:(!e||this.cdnLoadFailed)&&(r=this.src),this.hasError||!r?this.renderFallback():b`
798
+ `}renderImage(){let t=!!(this.extCustomerId&&l.cdnBaseUrl),r;return this.cdnImageUrl?r=this.cdnImageUrl:(!t||this.cdnLoadFailed)&&(r=this.src),this.hasError||!r?this.renderFallback():x`
686
799
  <img
687
800
  src=${r}
688
801
  alt=${this.alt}
@@ -690,44 +803,44 @@ ${vr}`;var l=class extends A{constructor(){super(...arguments);this.src="";this.
690
803
  decoding="async"
691
804
  @load=${this.handleLoad}
692
805
  @error=${this.handleError}
693
- class=${$("pp-image",this.isLoaded?"pp-image-loaded":"pp-image-loading")}
806
+ class=${R("pp-image",this.isLoaded?"pp-image-loaded":"pp-image-loading")}
694
807
  draggable="false" />
695
- `}renderRing(){if(!this.ring?.show)return c;let e=this.ring.width??3,r=this.ring.gap??3,i=e+r,o,s=this.ring.progress!==void 0;if(s){let p=this.ring.progress??0,a=this.ring.color??"#30D158",u=this.ring.emptyColor??"#8E8E93";o=Re(p,a,u);}else this.ring.gradient&&this.ring.gradient.length>0?o=Ae(this.ring.gradient):o=this.ring.color??"linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888)";return b`
808
+ `}renderRing(){if(!this.ring?.show)return h;let t=this.ring.width??3,r=this.ring.gap??3,i=t+r,o,s=this.ring.progress!==void 0;if(s){let p=this.ring.progress??0,a=this.ring.color??"#30D158",c=this.ring.emptyColor??"#8E8E93";o=Te(p,a,c);}else this.ring.gradient&&this.ring.gradient.length>0?o=Re(this.ring.gradient):o=this.ring.color??"linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888)";return x`
696
809
  <div
697
- class=${$("pp-ring",this.ring.animate&&!s&&"pp-ring-animated",s&&"pp-ring-progress")}
698
- style=${y({inset:`-${i}px`,padding:`${e}px`,background:o,borderRadius:W[this.variant]})}>
810
+ class=${R("pp-ring",this.ring.animate&&!s&&"pp-ring-animated",s&&"pp-ring-progress")}
811
+ style=${y({inset:`-${i}px`,padding:`${t}px`,background:o,borderRadius:K[this.variant]})}>
699
812
  </div>
700
- `}renderPresence(){if(!this.presence)return c;let e=this.presence.thickness??2,r=$e(this.pixelSize,e),i=ve[this.presence.status],o=Math.max(0,this.pixelSize*.02);return b`
813
+ `}renderPresence(){if(!this.presence)return h;let t=this.presence.thickness??2,r=$e(this.pixelSize,t),i=we[this.presence.status],o=Math.max(0,this.pixelSize*.02);return x`
701
814
  <div
702
- class=${$("pp-presence",this.presence.animate&&"pp-presence-animated")}
815
+ class=${R("pp-presence",this.presence.animate&&"pp-presence-animated")}
703
816
  style=${y({width:`${r}px`,height:`${r}px`,backgroundColor:i,bottom:`${o}px`,right:`${o}px`,color:i})}
704
817
  title=${this.presence.status}>
705
818
  </div>
706
- `}renderBadge(){if(!this.badge)return c;let e=this.badge.position??"bottom-right",r=this.badge.content!==void 0,i=this.badge.icon!==void 0,o=r||i,{size:s,fontSize:p}=Ee(this.pixelSize,o),a=this.badge.bgColor??"#22c55e",u=this.badge.color??"#ffffff",m=r&&this.badge.content!==void 0?Ce(this.badge.content,this.badge.max):null,g=i?this.badge.icon:null,S=p*.9,_={"top-left":{top:"-4px",left:"-4px"},"top-right":{top:"-4px",right:"-4px"},"bottom-left":{bottom:"-4px",left:"-4px"},"bottom-right":{bottom:"-4px",right:"-4px"}};return b`
819
+ `}renderBadge(){if(!this.badge)return h;let t=this.badge.position??"bottom-right",r=this.badge.content!==void 0,i=this.badge.icon!==void 0,o=r||i,{size:s,fontSize:p}=Ee(this.pixelSize,o),a=this.badge.bgColor??"#22c55e",c=this.badge.color??"#ffffff",m=this.badge.borderRadius??"9999px",g=r&&this.badge.content!==void 0?Ae(this.badge.content,this.badge.max):null,w=i?this.badge.icon:null,S=p*.9,b=`${-Math.round(this.pixelSize*.06)}px`,$={"top-left":{top:b,left:b},"top-center":{top:b,left:"50%",transform:"translateX(-50%)"},"top-right":{top:b,right:b},"bottom-left":{bottom:b,left:b},"bottom-center":{bottom:b,left:"50%",transform:"translateX(-50%)"},"bottom-right":{bottom:b,right:b}};return x`
707
820
  <div
708
- class=${$("pp-badge",this.badge.pulse&&"pp-badge-pulse",this.badge.glow&&"pp-badge-glow",i&&"pp-badge-with-icon")}
709
- style=${y({width:o?"auto":`${s}px`,minWidth:`${s}px`,height:`${s}px`,padding:o?"0 6px":"0",fontSize:`${p}px`,backgroundColor:a,color:u,"--pp-badge-glow-color":a,gap:i&&r?"4px":"0",..._[e]})}>
710
- ${g?b`<span class="pp-badge-icon" style=${y({fontSize:`${S}px`})}>${g}</span>`:c}
711
- ${m??c}
821
+ class=${R("pp-badge",this.badge.pulse&&"pp-badge-pulse",this.badge.glow&&"pp-badge-glow",i&&"pp-badge-with-icon")}
822
+ style=${y({width:o?"auto":`${s}px`,minWidth:`${s}px`,height:`${s}px`,padding:o?"0 6px":"0",fontSize:`${p}px`,backgroundColor:a,color:c,borderRadius:m,"--pp-badge-glow-color":a,gap:i&&r?"4px":"0",...$[t]})}>
823
+ ${w?x`<span class="pp-badge-icon" style=${y({fontSize:`${S}px`})}>${w}</span>`:h}
824
+ ${g??h}
712
825
  </div>
713
- `}renderRibbon(){if(!this.ribbon)return c;let e=this.ribbon.position??"top-right",r=this.ribbon.bgColor??"#ef4444",i=this.ribbon.color??"#ffffff",o=st(r)?{backgroundColor:r}:{background:r},s={color:i},p=this.pixelSize*.9,a=this.pixelSize*.4,u=Math.max(8,this.pixelSize*.11);return b`
826
+ `}renderRibbon(){if(!this.ribbon)return h;let t=this.ribbon.position??"top-right",r=this.ribbon.bgColor??"#ef4444",i=this.ribbon.color??"#ffffff",o=dt(r)?{backgroundColor:r}:{background:r},s={color:i},p=Math.min(75,this.pixelSize*.9),a=Math.min(32,this.pixelSize*.4),c=Math.min(13,Math.max(8,this.pixelSize*.11));return x`
714
827
  <div
715
- class=${$("pp-ribbon-container",Se(e))}
828
+ class=${R("pp-ribbon-container",Ce(t))}
716
829
  style=${y({width:`${p}px`,height:`${a}px`})}>
717
830
  <div
718
- class=${$("pp-ribbon np:origin-center np:transform",_e(e))}
719
- style=${y({fontSize:`${u}px`,padding:`${u*.3}px 0`,...o,...s})}>
720
- ${this.ribbon.icon?b`<span style="margin-right: 2px">${this.ribbon.icon}</span>`:c}
831
+ class=${R("pp-ribbon np:origin-center np:transform",_e(t))}
832
+ style=${y({fontSize:`${c}px`,padding:`${c*.3}px 0`,...o,...s})}>
833
+ ${this.ribbon.icon?x`<span style="margin-right: 2px">${this.ribbon.icon}</span>`:h}
721
834
  ${this.ribbon.text}
722
835
  </div>
723
836
  </div>
724
- `}render(){let e=this.getContainerStyles(),r=this.interactive?.focusable||this.interactive?.pressable?0:void 0;return b`
837
+ `}render(){let t=this.getContainerStyles(),r=this.interactive?.focusable||this.interactive?.pressable?0:void 0;return x`
725
838
  <div
726
- class=${e.classes}
727
- style=${y(e.styles)}
728
- tabindex=${r??c}
729
- role=${this.interactive?.pressable?"button":c}
730
- aria-label=${this.alt||c}
839
+ class=${t.classes}
840
+ style=${y(t.styles)}
841
+ tabindex=${r??h}
842
+ role=${this.interactive?.pressable?"button":h}
843
+ aria-label=${this.alt||h}
731
844
  data-profile-picture>
732
845
 
733
846
  <!-- Ring Effect (behind everything) -->
@@ -736,7 +849,7 @@ ${vr}`;var l=class extends A{constructor(){super(...arguments);this.src="";this.
736
849
  <!-- Inner container for image clipping -->
737
850
  <div
738
851
  class="pp-inner"
739
- style=${y({borderRadius:W[this.variant]})}>
852
+ style=${y({borderRadius:K[this.variant]})}>
740
853
  <!-- Placeholder -->
741
854
  ${this.renderPlaceholder()}
742
855
 
@@ -753,51 +866,99 @@ ${vr}`;var l=class extends A{constructor(){super(...arguments);this.src="";this.
753
866
  <!-- Presence Indicator -->
754
867
  ${this.renderPresence()}
755
868
  </div>
756
- `}};l.stylesInjected=false,l.cdnBaseUrl="",l.instances=new Set,d([h({type:String})],l.prototype,"src",2),d([h({type:String})],l.prototype,"alt",2),d([h({type:String,attribute:"ext-customer-id"})],l.prototype,"extCustomerId",2),d([h({type:String})],l.prototype,"size",2),d([h({type:String})],l.prototype,"variant",2),d([h({type:String})],l.prototype,"shadow",2),d([h({type:Boolean})],l.prototype,"border",2),d([h({type:Number,attribute:"border-width"})],l.prototype,"borderWidth",2),d([h({type:String,attribute:"border-color"})],l.prototype,"borderColor",2),d([h({type:Number})],l.prototype,"rotation",2),d([h({type:String,attribute:"bg-color"})],l.prototype,"bgColor",2),d([h({type:String,attribute:"bg-gradient"})],l.prototype,"bgGradient",2),d([h({type:Object,attribute:"ring",converter:{fromAttribute:e=>{if(e)try{return JSON.parse(e)}catch{return}},toAttribute:e=>e?JSON.stringify(e):null}})],l.prototype,"ring",2),d([h({type:Object,attribute:"presence",converter:{fromAttribute:e=>{if(e)try{return JSON.parse(e)}catch{return}},toAttribute:e=>e?JSON.stringify(e):null}})],l.prototype,"presence",2),d([h({type:Object,attribute:"glow",converter:{fromAttribute:e=>{if(e)try{return JSON.parse(e)}catch{return}},toAttribute:e=>e?JSON.stringify(e):null}})],l.prototype,"glow",2),d([h({type:Object,attribute:"ribbon",converter:{fromAttribute:e=>{if(e)try{return JSON.parse(e)}catch{return}},toAttribute:e=>e?JSON.stringify(e):null}})],l.prototype,"ribbon",2),d([h({type:Object,attribute:"badge",converter:{fromAttribute:e=>{if(e)try{return JSON.parse(e)}catch{return}},toAttribute:e=>e?JSON.stringify(e):null}})],l.prototype,"badge",2),d([h({type:String})],l.prototype,"loading",2),d([h({type:String})],l.prototype,"placeholder",2),d([h({type:String,attribute:"placeholder-color"})],l.prototype,"placeholderColor",2),d([h({type:String})],l.prototype,"fallback",2),d([h({type:Object,attribute:"interactive",converter:{fromAttribute:e=>{if(e)try{return JSON.parse(e)}catch{return}},toAttribute:e=>e?JSON.stringify(e):null}})],l.prototype,"interactive",2),d([U()],l.prototype,"isLoaded",2),d([U()],l.prototype,"hasError",2),d([U()],l.prototype,"cdnImageUrl",2),d([U()],l.prototype,"cdnLoadFailed",2),l=d([bt("profile-picture")],l);var We=false;function wr(){if(We||typeof document>"u")return;let n=document.createElement("style");n.textContent=Ge,document.head.appendChild(n),We=true;}var v=class extends A{constructor(){super(...arguments);this.max=T.max;this.direction=T.direction;this.overlap=T.overlap;this.size=T.size;this.showAddButton=false;this.addButtonLabel="Add user";this.animated=T.animated;this.rotationAmount=0;this.users=[];this.dropdownOpen=false;this.tooltipData=null;this.tooltipTimeout=null;this.slotObserver=null;this.handleBackdropClick=()=>{this.dropdownOpen=false;};}createRenderRoot(){return wr(),this}get pixelSize(){return Te(this.size)}get tooltipEnabled(){return this.tooltip?.enabled!==false}get tooltipPosition(){return this.tooltip?.position??"top"}get tooltipDelay(){return this.tooltip?.delay??T.tooltipDelay}get dropdownMaxHeight(){return this.dropdown?.maxHeight??T.dropdownMaxHeight}get showPresence(){return this.dropdown?.showPresence!==false}get dropdownPosition(){return this.dropdown?.position??"bottom"}connectedCallback(){super.connectedCallback(),this.updateUsers(),this.setupSlotObserver();}disconnectedCallback(){super.disconnectedCallback(),this.slotObserver?.disconnect(),this.clearTooltipTimeout();}setupSlotObserver(){this.slotObserver=new MutationObserver(()=>{this.updateUsers();}),this.slotObserver.observe(this,{childList:true,subtree:true,attributes:true,attributeFilter:["src","alt","data-user-id","data-status","variant","shadow","border","border-width","border-color","bg-color","bg-gradient"]});}updateUsers(){let e=Array.from(this.children).filter(r=>r.tagName.toLowerCase()==="profile-picture"&&r.getAttribute("slot")!=="internal");this.users=e.map((r,i)=>{let o=r.getAttribute("border-width"),s=o?Number.parseInt(o,10):void 0;return {id:r.getAttribute("data-user-id")??void 0,name:r.getAttribute("alt")??`User ${i+1}`,src:r.getAttribute("src")??void 0,status:r.getAttribute("data-status")??void 0,element:r,index:i,variant:r.getAttribute("variant")??void 0,shadow:r.getAttribute("shadow")??void 0,border:r.hasAttribute("border"),borderWidth:s,borderColor:r.getAttribute("border-color")??void 0,bgColor:r.getAttribute("bg-color")??void 0,bgGradient:r.getAttribute("bg-gradient")??void 0}});for(let r of this.users)r.element&&(r.element.style.display="none");}handleAvatarClick(e){this.dispatchEvent(new CustomEvent("avatar-click",{detail:{user:e},bubbles:true,composed:true}));}handleAvatarHover(e,r){if(!this.tooltipEnabled)return;this.clearTooltipTimeout();let i=r.currentTarget;this.tooltipTimeout=window.setTimeout(()=>{this.tooltipData={user:e,rect:i.getBoundingClientRect()};},this.tooltipDelay),this.dispatchEvent(new CustomEvent("avatar-hover",{detail:{user:e},bubbles:true,composed:true}));}handleAvatarLeave(){this.clearTooltipTimeout(),this.tooltipData=null;}clearTooltipTimeout(){this.tooltipTimeout&&(window.clearTimeout(this.tooltipTimeout),this.tooltipTimeout=null);}handleCounterClick(e){this.dropdownOpen=!this.dropdownOpen,this.dispatchEvent(new CustomEvent("counter-click",{detail:{hiddenUsers:e,open:this.dropdownOpen},bubbles:true,composed:true}));}handleDropdownItemClick(e){this.dropdownOpen=false,this.dispatchEvent(new CustomEvent("dropdown-item-click",{detail:{user:e},bubbles:true,composed:true}));}handleAddClick(){this.dispatchEvent(new CustomEvent("add-click",{bubbles:true,composed:true}));}handleKeyDown(e,r){(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),r());}renderAvatar(e,r,i){let o=St(r,this.pixelSize,this.overlap,this.direction,this.spacing),s=Ie(r,i,this.direction),p=e.variant??"circle",a=e.shadow??"none",u=this.rotationAmount?r%2===0?-this.rotationAmount:this.rotationAmount:0;return b`
869
+ `}};l.stylesInjected=false,l.cdnBaseUrl="",l.instances=new Set,d([u({type:String})],l.prototype,"src",2),d([u({type:String})],l.prototype,"alt",2),d([u({type:String,attribute:"ext-customer-id"})],l.prototype,"extCustomerId",2),d([u({type:String})],l.prototype,"size",2),d([u({type:String})],l.prototype,"variant",2),d([u({type:String})],l.prototype,"shadow",2),d([u({type:Boolean})],l.prototype,"border",2),d([u({type:Number,attribute:"border-width"})],l.prototype,"borderWidth",2),d([u({type:String,attribute:"border-color"})],l.prototype,"borderColor",2),d([u({type:Number})],l.prototype,"rotation",2),d([u({type:String,attribute:"bg-color"})],l.prototype,"bgColor",2),d([u({type:String,attribute:"bg-gradient"})],l.prototype,"bgGradient",2),d([u({type:Object,attribute:"ring",converter:{fromAttribute:t=>{if(t)try{return JSON.parse(t)}catch{return}},toAttribute:t=>t?JSON.stringify(t):null}})],l.prototype,"ring",2),d([u({type:Object,attribute:"presence",converter:{fromAttribute:t=>{if(t)try{return JSON.parse(t)}catch{return}},toAttribute:t=>t?JSON.stringify(t):null}})],l.prototype,"presence",2),d([u({type:Object,attribute:"glow",converter:{fromAttribute:t=>{if(t)try{return JSON.parse(t)}catch{return}},toAttribute:t=>t?JSON.stringify(t):null}})],l.prototype,"glow",2),d([u({type:Object,attribute:"ribbon",converter:{fromAttribute:t=>{if(t)try{return JSON.parse(t)}catch{return}},toAttribute:t=>t?JSON.stringify(t):null}})],l.prototype,"ribbon",2),d([u({type:Object,attribute:"badge",converter:{fromAttribute:t=>{if(t)try{return JSON.parse(t)}catch{return}},toAttribute:t=>t?JSON.stringify(t):null}})],l.prototype,"badge",2),d([u({type:String})],l.prototype,"loading",2),d([u({type:String})],l.prototype,"placeholder",2),d([u({type:String,attribute:"placeholder-color"})],l.prototype,"placeholderColor",2),d([u({type:String})],l.prototype,"fallback",2),d([u({type:Object,attribute:"interactive",converter:{fromAttribute:t=>{if(t)try{return JSON.parse(t)}catch{return}},toAttribute:t=>t?JSON.stringify(t):null}})],l.prototype,"interactive",2),d([O()],l.prototype,"isLoaded",2),d([O()],l.prototype,"hasError",2),d([O()],l.prototype,"cdnImageUrl",2),d([O()],l.prototype,"cdnLoadFailed",2),l=d([wt("profile-picture")],l);var We=false;function wr(){if(We||typeof document>"u")return;let n=document.createElement("style");n.textContent=je,document.head.appendChild(n),We=true;}var C=class extends k{constructor(){super(...arguments);this.max=I.max;this.direction=I.direction;this.overlap=I.overlap;this.size=I.size;this.showAddButton=false;this.addButtonLabel="Add user";this.animated=I.animated;this.rotationAmount=0;this.users=[];this.dropdownOpen=false;this.tooltipData=null;this.tooltipTimeout=null;this.slotObserver=null;this.portalContainer=null;this.counterRef=null;this.handleBackdropClick=()=>{this.dropdownOpen=false,this.destroyPortal();};}createRenderRoot(){return wr(),this}get pixelSize(){return ke(this.size)}get tooltipEnabled(){return this.tooltip?.enabled!==false}get tooltipPosition(){return this.tooltip?.position??"top"}get tooltipDelay(){return this.tooltip?.delay??I.tooltipDelay}get dropdownMaxHeight(){return this.dropdown?.maxHeight??I.dropdownMaxHeight}get showPresence(){return this.dropdown?.showPresence!==false}get dropdownPosition(){return this.dropdown?.position??"bottom"}connectedCallback(){super.connectedCallback(),this.updateUsers(),this.setupSlotObserver();}disconnectedCallback(){super.disconnectedCallback(),this.slotObserver?.disconnect(),this.clearTooltipTimeout(),this.destroyPortal();}setupSlotObserver(){this.slotObserver=new MutationObserver(()=>{this.updateUsers();}),this.slotObserver.observe(this,{childList:true,subtree:true,attributes:true,attributeFilter:["src","alt","data-user-id","data-status","variant","shadow","border","border-width","border-color","bg-color","bg-gradient"]});}updateUsers(){let t=Array.from(this.children).filter(r=>r.tagName.toLowerCase()==="profile-picture"&&r.getAttribute("slot")!=="internal");this.users=t.map((r,i)=>{let o=r.getAttribute("border-width"),s=o?Number.parseInt(o,10):void 0;return {id:r.getAttribute("data-user-id")??void 0,name:r.getAttribute("alt")??`User ${i+1}`,src:r.getAttribute("src")??void 0,status:r.getAttribute("data-status")??void 0,element:r,index:i,variant:r.getAttribute("variant")??void 0,shadow:r.getAttribute("shadow")??void 0,border:r.hasAttribute("border"),borderWidth:s,borderColor:r.getAttribute("border-color")??void 0,bgColor:r.getAttribute("bg-color")??void 0,bgGradient:r.getAttribute("bg-gradient")??void 0}});for(let r of this.users)r.element&&(r.element.style.display="none");}createPortal(){this.portalContainer||(this.portalContainer=document.createElement("div"),this.portalContainer.className="ppg-portal",this.portalContainer.style.cssText="position: fixed; z-index: 99999; pointer-events: none;",document.body.appendChild(this.portalContainer),document.body.style.overflow="hidden");}destroyPortal(){this.portalContainer&&(q(h,this.portalContainer),this.portalContainer.remove(),this.portalContainer=null,document.body.style.overflow="");}updatePortalContent(t){if(!(this.portalContainer&&this.counterRef))return;let r=this.counterRef.getBoundingClientRect(),i=10,o=280,s=Math.min(this.dropdownMaxHeight+60,t.length*56+60),p=window.innerWidth,a=window.innerHeight;if(p<480){let L=x`
870
+ <div
871
+ class="ppg-backdrop ppg-backdrop-visible"
872
+ style="pointer-events: auto; background: rgba(0,0,0,0.5);"
873
+ @click=${this.handleBackdropClick}
874
+ aria-hidden="true"
875
+ ></div>
876
+ <div
877
+ class="ppg-dropdown ppg-dropdown-modal"
878
+ style=${y({position:"fixed",pointerEvents:"auto",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"calc(100vw - 32px)",maxWidth:"320px",maxHeight:"70vh"})}
879
+ data-position="modal"
880
+ role="menu"
881
+ aria-label="Hidden users"
882
+ >
883
+ <div class="ppg-dropdown-header">
884
+ ${t.length} more
885
+ </div>
886
+ <div
887
+ class="ppg-dropdown-list"
888
+ style=${y({maxHeight:"calc(70vh - 60px)"})}
889
+ >
890
+ ${t.map(J=>this.renderDropdownItem(J))}
891
+ </div>
892
+ </div>
893
+ `;q(L,this.portalContainer);return}let m=a-r.bottom-i,g=r.top-i,w=p-r.left,S=r.right,b=this.dropdownPosition;b==="bottom"&&m<s&&g>m?b="top":b==="top"&&g<s&&m>g&&(b="bottom");let $;w>=o?$=r.left:S>=o?$=r.right-o:$=(p-o)/2,$=Math.max(8,Math.min($,p-o-8));let G=b==="bottom"?r.bottom+i:void 0,v=b==="top"?a-r.top+i:void 0,A=x`
894
+ <div
895
+ class="ppg-backdrop"
896
+ style="pointer-events: auto;"
897
+ @click=${this.handleBackdropClick}
898
+ aria-hidden="true"
899
+ ></div>
900
+ <div
901
+ class="ppg-dropdown ppg-dropdown-portal"
902
+ style=${y({position:"fixed",pointerEvents:"auto",top:G!==void 0?`${G}px`:"auto",bottom:v!==void 0?`${v}px`:"auto",left:`${$}px`,width:`${o}px`})}
903
+ data-position=${b}
904
+ role="menu"
905
+ aria-label="Hidden users"
906
+ >
907
+ <div class="ppg-dropdown-header">
908
+ ${t.length} more
909
+ </div>
910
+ <div
911
+ class="ppg-dropdown-list"
912
+ style=${y({maxHeight:`${this.dropdownMaxHeight}px`})}
913
+ >
914
+ ${t.map(L=>this.renderDropdownItem(L))}
915
+ </div>
916
+ </div>
917
+ `;q(A,this.portalContainer);}handleAvatarClick(t){this.dispatchEvent(new CustomEvent("avatar-click",{detail:{user:t},bubbles:true,composed:true}));}handleAvatarHover(t,r){if(!this.tooltipEnabled)return;this.clearTooltipTimeout();let i=r.currentTarget;this.tooltipTimeout=window.setTimeout(()=>{this.tooltipData={user:t,rect:i.getBoundingClientRect()};},this.tooltipDelay),this.dispatchEvent(new CustomEvent("avatar-hover",{detail:{user:t},bubbles:true,composed:true}));}handleAvatarLeave(){this.clearTooltipTimeout(),this.tooltipData=null;}clearTooltipTimeout(){this.tooltipTimeout&&(window.clearTimeout(this.tooltipTimeout),this.tooltipTimeout=null);}handleCounterClick(t){this.dropdownOpen=!this.dropdownOpen,this.dropdownOpen?(this.createPortal(),this.updatePortalContent(t)):this.destroyPortal(),this.dispatchEvent(new CustomEvent("counter-click",{detail:{hiddenUsers:t,open:this.dropdownOpen},bubbles:true,composed:true}));}handleDropdownItemClick(t){this.dropdownOpen=false,this.destroyPortal(),this.dispatchEvent(new CustomEvent("dropdown-item-click",{detail:{user:t},bubbles:true,composed:true}));}handleAddClick(){this.dispatchEvent(new CustomEvent("add-click",{bubbles:true,composed:true}));}handleKeyDown(t,r){(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),r());}renderAvatar(t,r,i){let o=$t(r,this.pixelSize,this.overlap,this.direction,this.spacing),s=Me(r,i,this.direction),p=t.variant??"circle",a=t.shadow??"none",c=this.rotationAmount?r%2===0?-this.rotationAmount:this.rotationAmount:0;return x`
757
918
  <div
758
919
  class="ppg-avatar-wrapper"
759
920
  style=${y({left:`${o}px`,zIndex:String(s),width:`${this.pixelSize}px`,height:`${this.pixelSize}px`})}
760
921
  tabindex="0"
761
922
  role="button"
762
- aria-label=${e.name}
763
- @click=${()=>this.handleAvatarClick(e)}
764
- @mouseenter=${m=>this.handleAvatarHover(e,m)}
923
+ aria-label=${t.name}
924
+ @click=${()=>this.handleAvatarClick(t)}
925
+ @mouseenter=${m=>this.handleAvatarHover(t,m)}
765
926
  @mouseleave=${this.handleAvatarLeave}
766
- @keydown=${m=>this.handleKeyDown(m,()=>this.handleAvatarClick(e))}
927
+ @keydown=${m=>this.handleKeyDown(m,()=>this.handleAvatarClick(t))}
767
928
  >
768
- ${this.renderProfilePicture(e,p,a,u)}
929
+ ${this.renderProfilePicture(t,p,a,c)}
769
930
  </div>
770
- `}renderProfilePicture(e,r,i,o){return b`
931
+ `}renderProfilePicture(t,r,i,o){return x`
771
932
  <profile-picture
772
- .src=${e.src??""}
773
- .alt=${e.name}
933
+ .src=${t.src??""}
934
+ .alt=${t.name}
774
935
  .size=${this.pixelSize}
775
936
  .variant=${r}
776
937
  .shadow=${i}
777
938
  .rotation=${o}
778
- ?border=${e.border}
779
- .borderWidth=${e.border?e.borderWidth??2:2}
780
- .borderColor=${e.border?e.borderColor??"#ffffff":"#ffffff"}
781
- .bgColor=${e.bgGradient?void 0:e.bgColor??"#ffffff"}
782
- .bgGradient=${e.bgGradient??void 0}
783
- data-user-id=${e.id??""}
784
- data-status=${e.status??""}
939
+ ?border=${t.border}
940
+ .borderWidth=${t.border?t.borderWidth??2:2}
941
+ .borderColor=${t.border?t.borderColor??"#ffffff":"#ffffff"}
942
+ .bgColor=${t.bgGradient?void 0:t.bgColor??"#ffffff"}
943
+ .bgGradient=${t.bgGradient??void 0}
944
+ data-user-id=${t.id??""}
945
+ data-status=${t.status??""}
785
946
  ></profile-picture>
786
- `}renderCounter(e,r){return b`
947
+ `}renderCounter(t,r,i){return x`
787
948
  <button
788
949
  class="ppg-counter"
789
950
  style=${y({left:`${r}px`,width:`${this.pixelSize}px`,height:`${this.pixelSize}px`,zIndex:"1"})}
790
- aria-label=${`${e} more users`}
951
+ aria-label=${`${t} more users`}
791
952
  aria-expanded=${this.dropdownOpen}
792
953
  aria-haspopup="true"
793
- @click=${()=>this.handleCounterClick(this.users.slice(-e))}
954
+ @click=${()=>this.handleCounterClick(i)}
794
955
  >
795
- ${Ue(e)}
956
+ ${Le(t)}
796
957
  </button>
797
- `}renderAddButton(e){let r=Math.round(this.pixelSize*.4);return b`
958
+ `}renderAddButton(t){let r=Math.round(this.pixelSize*.4);return x`
798
959
  <button
799
960
  class="ppg-add-button"
800
- style=${y({left:`${e}px`,width:`${this.pixelSize}px`,height:`${this.pixelSize}px`,zIndex:"1"})}
961
+ style=${y({left:`${t}px`,width:`${this.pixelSize}px`,height:`${this.pixelSize}px`,zIndex:"1"})}
801
962
  aria-label=${this.addButtonLabel}
802
963
  @click=${this.handleAddClick}
803
964
  >
@@ -816,71 +977,49 @@ ${vr}`;var l=class extends A{constructor(){super(...arguments);this.src="";this.
816
977
  <line x1="5" y1="12" x2="19" y2="12"></line>
817
978
  </svg>
818
979
  </button>
819
- `}renderTooltip(){if(!this.tooltipData)return c;let{user:e,rect:r}=this.tooltipData,i=8,o,s;return this.tooltipPosition==="bottom"?(o=r.bottom+i,s=r.left+r.width/2):(o=r.top-i,s=r.left+r.width/2),b`
980
+ `}renderTooltip(){if(!this.tooltipData)return h;let{user:t,rect:r}=this.tooltipData,i=8,o=this.getBoundingClientRect(),s=r.left-o.left+r.width/2,p=r.top-o.top,a=r.bottom-o.top,c=this.tooltipPosition==="top";return x`
820
981
  <div
821
982
  class="ppg-tooltip"
822
- style=${y({top:this.tooltipPosition==="top"?"auto":`${o}px`,bottom:this.tooltipPosition==="top"?`${window.innerHeight-r.top+i}px`:"auto",left:`${s}px`,transform:"translateX(-50%)"})}
983
+ style=${y({top:c?"auto":`${a+i}px`,bottom:c?`${o.height-p+i}px`:"auto",left:`${s}px`})}
823
984
  data-position=${this.tooltipPosition}
824
985
  role="tooltip"
825
986
  >
826
- ${e.name}
827
- </div>
828
- `}renderDropdown(e){return this.dropdownOpen?b`
829
- <div
830
- class="ppg-backdrop"
831
- @click=${this.handleBackdropClick}
832
- aria-hidden="true"
833
- ></div>
834
- <div
835
- class="ppg-dropdown"
836
- data-position=${this.dropdownPosition}
837
- role="menu"
838
- aria-label="Hidden users"
839
- >
840
- <div class="ppg-dropdown-header">
841
- ${e.length} more
842
- </div>
843
- <div
844
- class="ppg-dropdown-list"
845
- style=${y({maxHeight:`${this.dropdownMaxHeight}px`})}
846
- >
847
- ${e.map(r=>this.renderDropdownItem(r))}
848
- </div>
987
+ ${t.name}
849
988
  </div>
850
- `:c}renderDropdownItem(e){let r=wt(e.name);return b`
989
+ `}renderDropdownItem(t){let r=Et(t.name);return x`
851
990
  <div
852
991
  class="ppg-dropdown-item"
853
992
  role="menuitem"
854
993
  tabindex="0"
855
- @click=${()=>this.handleDropdownItemClick(e)}
856
- @keydown=${i=>this.handleKeyDown(i,()=>this.handleDropdownItemClick(e))}
994
+ @click=${()=>this.handleDropdownItemClick(t)}
995
+ @keydown=${i=>this.handleKeyDown(i,()=>this.handleDropdownItemClick(t))}
857
996
  >
858
- ${e.src?b`<img
997
+ ${t.src?x`<img
859
998
  class="ppg-dropdown-avatar"
860
- src=${e.src}
861
- alt=${e.name}
862
- />`:b`<div
999
+ src=${t.src}
1000
+ alt=${t.name}
1001
+ />`:x`<div
863
1002
  class="ppg-dropdown-avatar-fallback"
864
1003
  style=${y({background:r})}
865
1004
  >
866
- ${vt(e.name)}
1005
+ ${_t(t.name)}
867
1006
  </div>`}
868
1007
  <div class="ppg-dropdown-info">
869
- <div class="ppg-dropdown-name">${e.name}</div>
870
- ${this.showPresence&&e.status?b`
1008
+ <div class="ppg-dropdown-name">${t.name}</div>
1009
+ ${this.showPresence&&t.status?x`
871
1010
  <div class="ppg-dropdown-status">
872
1011
  <span
873
1012
  class="ppg-dropdown-presence"
874
- data-status=${e.status}
1013
+ data-status=${t.status}
875
1014
  ></span>
876
- ${this.formatStatus(e.status)}
1015
+ ${this.formatStatus(t.status)}
877
1016
  </div>
878
- `:c}
1017
+ `:h}
879
1018
  </div>
880
1019
  </div>
881
- `}formatStatus(e){return {online:"Online",away:"Away",busy:"Busy",offline:"Offline",dnd:"Do not disturb"}[e]??e}render(){let{visible:e,hidden:r,showCounter:i}=ke(this.users.length,this.max,this.showAddButton),o=this.direction==="ltr"?this.users.slice(0,e):this.users.slice(0,e).reverse(),s=this.users.slice(e),p=e;i&&p++,this.showAddButton&&p++;let a=Le(p,this.pixelSize,this.overlap,this.spacing),u=i?St(e,this.pixelSize,this.overlap,this.direction,this.spacing):0,m=St(e+(i?1:0),this.pixelSize,this.overlap,this.direction,this.spacing);return b`
1020
+ `}formatStatus(t){return {online:"Online",away:"Away",busy:"Busy",offline:"Offline",dnd:"Do not disturb"}[t]??t}updated(t){super.updated(t);let r=this.querySelector(".ppg-counter");if(r&&(this.counterRef=r),this.dropdownOpen&&this.portalContainer){let{visible:i}=Vt(this.users.length,this.max,this.showAddButton),o=this.users.slice(i);this.updatePortalContent(o);}}render(){let{visible:t,hidden:r,showCounter:i}=Vt(this.users.length,this.max,this.showAddButton),o=this.direction==="ltr"?this.users.slice(0,t):this.users.slice(0,t).reverse(),s=this.users.slice(t),p=t;i&&p++,this.showAddButton&&p++;let a=Ie(p,this.pixelSize,this.overlap,this.spacing),c=i?$t(t,this.pixelSize,this.overlap,this.direction,this.spacing):0,m=$t(t+(i?1:0),this.pixelSize,this.overlap,this.direction,this.spacing);return x`
882
1021
  <div
883
- class=${$("ppg-container",this.animated&&"ppg-animated")}
1022
+ class=${R("ppg-container",this.animated&&"ppg-animated")}
884
1023
  style=${y({width:`${a}px`,height:`${this.pixelSize}px`})}
885
1024
  role="group"
886
1025
  aria-label="User avatars"
@@ -889,21 +1028,18 @@ ${vr}`;var l=class extends A{constructor(){super(...arguments);this.src="";this.
889
1028
  <slot style="display: none;"></slot>
890
1029
 
891
1030
  <!-- Visible avatars -->
892
- ${o.map((g,S)=>this.renderAvatar(g,S,e))}
1031
+ ${o.map((g,w)=>this.renderAvatar(g,w,t))}
893
1032
 
894
1033
  <!-- Counter -->
895
- ${i?this.renderCounter(r,u):c}
1034
+ ${i?this.renderCounter(r,c,s):h}
896
1035
 
897
1036
  <!-- Add button -->
898
- ${this.showAddButton?this.renderAddButton(m):c}
1037
+ ${this.showAddButton?this.renderAddButton(m):h}
899
1038
 
900
1039
  <!-- Tooltip -->
901
1040
  ${this.renderTooltip()}
902
-
903
- <!-- Dropdown -->
904
- ${i?this.renderDropdown(s):c}
905
1041
  </div>
906
- `}};d([h({type:Number})],v.prototype,"max",2),d([h({type:String})],v.prototype,"direction",2),d([h({type:Number})],v.prototype,"overlap",2),d([h({type:String})],v.prototype,"size",2),d([h({type:Number})],v.prototype,"spacing",2),d([h({type:Object})],v.prototype,"tooltip",2),d([h({type:Object})],v.prototype,"dropdown",2),d([h({type:Boolean,attribute:"show-add-button"})],v.prototype,"showAddButton",2),d([h({type:String,attribute:"add-button-label"})],v.prototype,"addButtonLabel",2),d([h({type:Boolean})],v.prototype,"animated",2),d([h({type:Number,attribute:"rotation-amount"})],v.prototype,"rotationAmount",2),d([U()],v.prototype,"users",2),d([U()],v.prototype,"dropdownOpen",2),d([U()],v.prototype,"tooltipData",2),v=d([bt("profile-picture-group")],v);Vt();
1042
+ `}};d([u({type:Number})],C.prototype,"max",2),d([u({type:String})],C.prototype,"direction",2),d([u({type:Number})],C.prototype,"overlap",2),d([u({type:String})],C.prototype,"size",2),d([u({type:Number})],C.prototype,"spacing",2),d([u({type:Object})],C.prototype,"tooltip",2),d([u({type:Object})],C.prototype,"dropdown",2),d([u({type:Boolean,attribute:"show-add-button"})],C.prototype,"showAddButton",2),d([u({type:String,attribute:"add-button-label"})],C.prototype,"addButtonLabel",2),d([u({type:Boolean})],C.prototype,"animated",2),d([u({type:Number,attribute:"rotation-amount"})],C.prototype,"rotationAmount",2),d([O()],C.prototype,"users",2),d([O()],C.prototype,"dropdownOpen",2),d([O()],C.prototype,"tooltipData",2),C=d([wt("profile-picture-group")],C);Yt();
907
1043
  /*! Bundled license information:
908
1044
 
909
1045
  @lit-labs/ssr-dom-shim/lib/element-internals.js: