1try{let e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`0599e31b-f8b3-420c-bafa-ee05e3310800`,e._sentryDebugIdIdentifier=`sentry-dbid-0599e31b-f8b3-420c-bafa-ee05e3310800`)}catch{}import{o as e}from"./_sentry-release-injection-file-BIr0W1zm.js";import{n as t,t as n}from"./jsx-runtime-zj0ecbIi.js";/* empty css */import{A as r,E as i,N as a,l as o,t as s}from"./icon-0N4IT-9A-C9RTZSFF.js";import{t as c}from"./clsx-BOYpCVEp.js";/* empty css *//* empty css */var l=e(t()),u=n(),d=Object.freeze({autoCloseTimeout:5e3,animationTransitionDuration:150}),f=(()=>{let e=0;return()=>`pluma-snackbar-instance-id:${e++}`})(),p=class{snackbars=[];create=e=>{let{id:t=f(),...n}=e,r=this.snackbars.filter(e=>e.id!==t);return this.snackbars=[...r,{id:t,...n}],this.emitChange(),()=>{this.destroy(t)}};destroy=e=>{this.snackbars=this.snackbars.filter(t=>t.id!==e),this.emitChange()};destroyAll=()=>{this.snackbars=[],this.emitChange()};listeners=[];emitChange=()=>{this.listeners.forEach(e=>e())};subscribe=e=>(this.listeners=[...this.listeners,e],()=>{this.listeners=this.listeners.filter(t=>t!==e)});getSnapshot=()=>this.snackbars;getServerSnapshot=()=>this.snackbars};function m(e){return(0,l.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getServerSnapshot),e}var h=`pluma-c-snackbar pluma-text-product-p`,g=`pluma-c-snackbar-button pluma-text-product-p-active`,_=`pluma-c-snackbar-close-button`,v=`pluma-c-snackbar-content`,y=`pluma-c-snackbar-critical`,b=`pluma-c-snackbar-layout-expanded`,x=`pluma-c-snackbar-success`,S=new Set([`layout`,`variant`,`action`,`onClose`,`isCloseButtonDisabled`,`shouldCloseOnAction`]);function C(e){let t=[h];return e?.variant===`critical`?t.push(y):e?.variant===`success`&&t.push(x),e?.layout===`expanded`&&t.push(b),c(t)}var w=l.forwardRef(function(e,t){let{className:n,children:d,action:f,shouldCloseOnAction:p=!1,onClose:m,isCloseButtonDisabled:h,...y}=e,{restProps:b,sprinkleProps:x}=a(y,S),w=f!=null&&`href`in f,T=f!=null&&!(`href`in f),E=m!=null,D=(0,l.useCallback)(e=>{h!==!0&&m?.(e.nativeEvent)},[m,h]),O=(0,l.useCallback)(e=>{f?.isDisabled!==!0&&(f!=null&&`onClick`in f&&f.onClick?.(e.nativeEvent),p&&m?.(e.nativeEvent))},[f,p,m]);return(0,u.jsxs)(r,{className:c(C(e),n),ref:t,role:`alert`,"aria-atomic":`true`,"aria-live":e.variant===`critical`?`assertive`:`polite`,...b,...x,children:[(0,u.jsx)(r,{className:v,children:(0,u.jsx)(o,{as:`p`,children:d})}),f==null?null:(0,u.jsxs)(u.Fragment,{children:[T?(0,u.jsx)(r,{as:`button`,className:g,onClick:O,"aria-disabled":f.isDisabled===!0?!0:void 0,type:`button`,children:f.label}):null,w?(0,u.jsx)(i,{className:g,onClick:O,isDisabled:f.isDisabled??!1,href:f.href,isExternal:f.isExternal??!1,children:f.label}):null]}),E?(0,u.jsx)(r,{as:`button`,className:_,onClick:D,"aria-label":`Close`,"aria-disabled":h===!0?!0:void 0,type:`button`,children:(0,u.jsx)(s,{name:`close`})}):null]})});w.displayName=`PlumaSnackbar`;export{m as i,w as n,d as r,p as t}; 2//# sourceMappingURL=snackbar-I4rlClpY-DSbcGayi.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.