ga-toasts 1.0.0 → 2.1.0
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.
- package/LICENSE +21 -0
- package/README.md +327 -554
- package/dist/ga-toasts.css +608 -0
- package/dist/ga-toasts.global.js +2 -0
- package/dist/index.cjs +1242 -0
- package/dist/index.d.cts +247 -0
- package/dist/index.d.ts +247 -0
- package/dist/index.js +1235 -0
- package/package.json +85 -23
- package/.htaccess +0 -75
- package/REDIRECT_SETUP.md +0 -149
- package/ga-toasts.d.ts +0 -99
- package/images/gennie_logo.png +0 -0
- package/index.html +0 -1034
- package/robots.txt +0 -54
- package/sitemap.xml +0 -47
- package/src/demo.css +0 -698
- package/src/demo.js +0 -467
- package/src/toasts.css +0 -1644
- package/src/toasts.js +0 -1005
- package/src/variables.css +0 -480
- package/vercel.json +0 -50
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var GaToasts=(()=>{var et=Object.defineProperty;var me=Object.getOwnPropertyDescriptor;var he=Object.getOwnPropertyNames;var be=Object.prototype.hasOwnProperty;var ve=(o,u)=>{for(var h in u)et(o,h,{get:u[h],enumerable:!0})},xe=(o,u,h,p)=>{if(u&&typeof u=="object"||typeof u=="function")for(let b of he(u))!be.call(o,b)&&b!==h&&et(o,b,{get:()=>u[b],enumerable:!(p=me(u,b))||p.enumerable});return o};var Te=o=>xe(et({},"__esModule",{value:!0}),o);var ze={};ve(ze,{default:()=>$e});var St='.ga-toast-container{--gat-width: 380px;--gat-radius: 14px;--gat-gap: 14px;--gat-edge: 22px;--gat-pad-y: 12px;--gat-pad-x: 16px;--gat-font-size: .875rem;--gat-accent-edge: 0px;--gat-font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--gat-surface: rgba(255, 255, 255, .82);--gat-surface-solid: #ffffff;--gat-border: rgba(15, 23, 42, .07);--gat-ring: rgba(15, 23, 42, .05);--gat-highlight: rgba(255, 255, 255, .75);--gat-text: #0f172a;--gat-text-soft: #475569;--gat-text-muted: #64748b;--gat-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 20px -12px rgba(15, 23, 42, .16);--gat-shadow-hover: 0 2px 4px -2px rgba(15, 23, 42, .12), 0 14px 32px -12px rgba(15, 23, 42, .26);--gat-chip: rgba(15, 23, 42, .05);--gat-success: #16a34a;--gat-error: #e11d48;--gat-warning: #d97706;--gat-info: #2563eb;--gat-primary: #6366f1;--gat-secondary: #64748b;--gat-loading: #2563eb;--gat-ease: cubic-bezier(.22, 1, .36, 1)}[data-ga-theme=dark] .ga-toast-container,.ga-theme-dark .ga-toast-container,.ga-toast-container.ga-theme-dark{--gat-surface: rgba(30, 34, 44, .72);--gat-surface-solid: #22262f;--gat-border: rgba(255, 255, 255, .09);--gat-ring: rgba(255, 255, 255, .06);--gat-highlight: rgba(255, 255, 255, .07);--gat-text: #f8fafc;--gat-text-soft: #cbd5e1;--gat-text-muted: #9aa7ba;--gat-shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 28px -14px rgba(0, 0, 0, .5);--gat-shadow-hover: 0 2px 6px -2px rgba(0, 0, 0, .5), 0 16px 38px -12px rgba(0, 0, 0, .64);--gat-chip: rgba(255, 255, 255, .08)}@media(prefers-color-scheme:dark){:root:not([data-ga-theme]):not(.ga-theme-light):not(.ga-theme-dark) .ga-toast-container{--gat-surface: rgba(24, 27, 34, .82);--gat-surface-solid: #191c22;--gat-border: rgba(255, 255, 255, .09);--gat-ring: rgba(255, 255, 255, .06);--gat-highlight: rgba(255, 255, 255, .07);--gat-text: #f8fafc;--gat-text-soft: #cbd5e1;--gat-text-muted: #9aa7ba;--gat-shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 28px -14px rgba(0, 0, 0, .5);--gat-chip: rgba(255, 255, 255, .08)}}.ga-toast-backdrop{position:fixed;inset:0;z-index:2147482990;background:#0a0c146b;backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);opacity:0;transition:opacity .22s ease}.ga-toast-backdrop-show{opacity:1}@media(prefers-reduced-transparency:reduce){.ga-toast-backdrop{backdrop-filter:none;-webkit-backdrop-filter:none}}.ga-toast-container{position:fixed;z-index:2147483000;width:var(--gat-width);max-width:calc(100vw - 2 * var(--gat-edge));pointer-events:none;font-family:var(--gat-font)}.ga-toast-container-top-start{inset-block-start:var(--gat-edge);inset-inline-start:var(--gat-edge)}.ga-toast-container-top-end{inset-block-start:var(--gat-edge);inset-inline-end:var(--gat-edge)}.ga-toast-container-top-center{inset-block-start:var(--gat-edge);left:50%;transform:translate(-50%)}.ga-toast-container-bottom-start{inset-block-end:var(--gat-edge);inset-inline-start:var(--gat-edge)}.ga-toast-container-bottom-end{inset-block-end:var(--gat-edge);inset-inline-end:var(--gat-edge)}.ga-toast-container-bottom-center{inset-block-end:var(--gat-edge);left:50%;transform:translate(-50%)}.ga-toast-container-middle-start{top:50%;inset-inline-start:var(--gat-edge)}.ga-toast-container-middle-end{top:50%;inset-inline-end:var(--gat-edge)}.ga-toast-container-middle-center{top:50%;left:50%;transform:translate(-50%)}.ga-toast{position:absolute;inset-inline:0;width:100%;box-sizing:border-box;display:flex;flex-direction:row;align-items:flex-start;gap:11px;padding:var(--gat-pad-y, 12px) var(--gat-pad-x, 16px);color:var(--gat-text);background:var(--gat-surface-solid);border:none;border-radius:var(--gat-radius);box-shadow:var(--gat-shadow),inset 0 1px 0 var(--gat-highlight);pointer-events:auto;opacity:0;transform:translateY(-140%);transition:transform .5s var(--gat-ease),opacity .35s ease,box-shadow .2s ease;will-change:transform,opacity;overflow:hidden;font-size:var(--gat-font-size, .875rem);line-height:1.5;-webkit-font-smoothing:antialiased;text-align:start;touch-action:pan-y;overscroll-behavior:contain}@media(hover:hover){.ga-toast:hover{box-shadow:var(--gat-shadow-hover),inset 0 1px 0 var(--gat-highlight)}}[data-ga-position^=top] .ga-toast,[data-ga-position^=middle] .ga-toast{top:0;transform-origin:top center}[data-ga-position^=bottom] .ga-toast{bottom:0;transform-origin:bottom center}.ga-toast-glass{background:var(--gat-surface);backdrop-filter:blur(16px) saturate(160%);-webkit-backdrop-filter:blur(16px) saturate(160%)}.ga-toast-outline{background:transparent;border:1px solid var(--gat-border);box-shadow:var(--gat-shadow);backdrop-filter:none;-webkit-backdrop-filter:none}.ga-toast:before{content:"";position:absolute;inset-block:0;inset-inline-start:0;width:var(--gat-accent-edge, 0px);background:var(--gat-accent, var(--gat-info));pointer-events:none}.ga-toast-hide{pointer-events:none}.ga-toast-swiping,.ga-toast-swiping *{user-select:none;-webkit-user-select:none;cursor:grabbing}.ga-toast-success{--gat-accent: var(--gat-success)}.ga-toast-error{--gat-accent: var(--gat-error)}.ga-toast-warning{--gat-accent: var(--gat-warning)}.ga-toast-info{--gat-accent: var(--gat-info)}.ga-toast-primary{--gat-accent: var(--gat-primary)}.ga-toast-secondary{--gat-accent: var(--gat-secondary)}.ga-toast-loading{--gat-accent: var(--gat-loading)}.ga-toast-content{display:flex;flex-direction:column;gap:4px;flex:1;min-width:0}.ga-toast-header{display:flex;align-items:center;gap:8px;min-width:0}.ga-toast-icon{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;margin-top:1px;color:var(--gat-accent, var(--gat-info))}.ga-toast-icon svg{width:1.25rem;height:1.25rem;display:block;overflow:visible}.ga-toast-spinner{animation:ga-toast-spin .8s linear infinite}.ga-toast-icon-ring{position:relative;width:2rem;height:2rem;margin-top:0}.ga-toast-icon-ring>svg:not(.ga-toast-ring){width:1.1rem;height:1.1rem}.ga-toast-ring{position:absolute;inset:0;width:100%!important;height:100%!important;transform:rotate(-90deg);overflow:visible}.ga-toast-ring-track{fill:none;stroke:var(--gat-chip);stroke-width:2.4}.ga-toast-ring-bar{fill:none;stroke:var(--gat-accent, var(--gat-info));stroke-width:2.4;stroke-linecap:round}@media(prefers-reduced-motion:no-preference){.ga-toast-icon .ga-ic-ring{stroke-dasharray:64;stroke-dashoffset:64;animation:ga-toast-ic-draw .5s var(--gat-ease) .02s forwards}.ga-toast-icon .ga-ic-draw{stroke-dasharray:28;stroke-dashoffset:28;animation:ga-toast-ic-draw .4s var(--gat-ease) .16s forwards}}@keyframes ga-toast-ic-draw{to{stroke-dashoffset:0}}.ga-toast-avatar{flex-shrink:0;width:34px;height:34px;border-radius:50%;object-fit:cover;border:1px solid var(--gat-border)}.ga-toast-unread-dot{flex-shrink:0;width:8px;height:8px;border-radius:50%;background:var(--gat-accent, var(--gat-info))}.ga-toast-title{font-weight:600;font-size:.9rem;color:var(--gat-text);flex:1;min-width:0;letter-spacing:-.011em}.ga-toast-title-truncate{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ga-toast-status{flex-shrink:0;padding:2px 9px;border-radius:999px;font-size:.6875rem;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--gat-accent, var(--gat-info));color:color-mix(in srgb,var(--gat-accent, var(--gat-info)) 58%,var(--gat-text));background:var(--gat-chip);background:color-mix(in srgb,var(--gat-accent, var(--gat-info)) 18%,transparent)}.ga-toast-close{flex-shrink:0;align-self:flex-start;margin-top:-1px;margin-inline-end:-4px;display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;padding:0;border:none;border-radius:7px;color:var(--gat-text-muted);background:transparent;cursor:pointer;opacity:.9;transition:background .15s ease,color .15s ease,opacity .15s ease}.ga-toast:hover .ga-toast-close,.ga-toast:focus-within .ga-toast-close{opacity:1}.ga-toast-close svg{width:15px;height:15px;display:block}.ga-toast-close:hover{background:var(--gat-chip);color:var(--gat-text)}.ga-toast-close:focus-visible{outline:2px solid currentColor;outline-offset:2px}.ga-toast-body{min-width:0}.ga-toast-meta{font-size:.75rem;color:var(--gat-text-muted);margin-bottom:2px}.ga-toast-message{color:var(--gat-text-soft);font-size:.85rem;word-break:break-word;max-height:40vh;overflow-y:auto;overscroll-behavior:contain}.ga-toast-message a{color:var(--gat-accent, var(--gat-info));font-weight:500;text-decoration:underline}.ga-toast:not([class*=-filled]) .ga-toast-content>.ga-toast-body:only-child .ga-toast-message{color:var(--gat-text)}.ga-toast-actions{display:flex;gap:8px;margin-top:2px}.ga-toast-btn{flex:1;padding:8px 14px;font:inherit;font-size:.8125rem;font-weight:600;border-radius:9px;border:1px solid var(--gat-border);background:var(--gat-chip);color:var(--gat-text);cursor:pointer;transition:filter .15s ease,background .15s ease}.ga-toast-btn:hover{filter:brightness(.97)}.ga-toast-btn:focus-visible{outline:2px solid currentColor;outline-offset:2px}.ga-toast-btn-primary{background:var(--gat-accent, var(--gat-primary));border-color:transparent;color:#fff}.ga-toast-btn-primary:hover{filter:brightness(1.06)}.ga-toast-progress{position:absolute;left:0;bottom:0;height:2px;width:100%;transform:scaleX(1);transform-origin:left center;background:var(--gat-accent, var(--gat-info));opacity:.4}.ga-toast-progress-top{top:0;bottom:auto}.ga-toast-steps{display:flex;gap:4px;margin-top:4px}.ga-toast-step{flex:1;height:3px;border-radius:999px;background:var(--gat-chip)}.ga-toast-step-active{background:var(--gat-accent, var(--gat-info))}.ga-toast[class*=-filled]{background:var(--gat-accent, var(--gat-info));border-color:transparent;color:#fff}.ga-toast-success[class*=-filled]{background:#15803d}.ga-toast-primary[class*=-filled]{background:#4f46e5}.ga-toast[class*=-filled] .ga-toast-title,.ga-toast[class*=-filled] .ga-toast-message,.ga-toast[class*=-filled] .ga-toast-meta,.ga-toast[class*=-filled] .ga-toast-icon,.ga-toast[class*=-filled] .ga-toast-close{color:#fff}.ga-toast[class*=-filled] .ga-toast-close:hover{background:#fff3}.ga-toast[class*=-filled] .ga-toast-progress{background:#fff;opacity:.55}.ga-toast[class*=-filled] .ga-toast-step{background:#ffffff47}.ga-toast[class*=-filled] .ga-toast-step-active{background:#fff}.ga-toast[class*=-filled] .ga-toast-status{color:#fff;background:#ffffff38}.ga-toast[class*=-filled] .ga-toast-message a{color:#fff;text-decoration:underline}.ga-toast-warning[class*=-filled],.ga-toast-warning[class*=-filled] .ga-toast-title,.ga-toast-warning[class*=-filled] .ga-toast-message,.ga-toast-warning[class*=-filled] .ga-toast-meta,.ga-toast-warning[class*=-filled] .ga-toast-icon,.ga-toast-warning[class*=-filled] .ga-toast-close,.ga-toast-warning[class*=-filled] .ga-toast-message a{color:#2e2100}.ga-toast-warning[class*=-filled] .ga-toast-progress{background:#2e2100;opacity:.6}.ga-toast-warning[class*=-filled] .ga-toast-step{background:#0000002e}.ga-toast-warning[class*=-filled] .ga-toast-step-active{background:#2e2100}.ga-toast-warning[class*=-filled] .ga-toast-status{color:#2e2100;background:#00000029}.ga-toast-warning[class*=-filled] .ga-toast-close:hover{background:#00000024}.ga-toast[class*=-light]{background:var(--gat-surface);background-image:linear-gradient(0deg,color-mix(in srgb,var(--gat-accent, var(--gat-info)) 14%,transparent),color-mix(in srgb,var(--gat-accent, var(--gat-info)) 14%,transparent));border-color:color-mix(in srgb,var(--gat-accent, var(--gat-info)) 38%,var(--gat-border))}.ga-toast[class*=-light] .ga-toast-meta{color:var(--gat-text-soft)}.ga-toast[class*=-light] .ga-toast-message a{color:color-mix(in srgb,var(--gat-accent, var(--gat-info)) 55%,var(--gat-text));text-decoration:underline}.ga-toast-xs{padding:10px 13px;font-size:.78rem}.ga-toast-xs .ga-toast-icon svg{width:1.05rem;height:1.05rem}.ga-toast-xs .ga-toast-message{font-size:.78rem}.ga-toast-sm{padding:11px 14px;gap:9px}.ga-toast-lg{padding:18px 20px}.ga-toast-lg .ga-toast-title{font-size:1rem}.ga-toast-lg .ga-toast-message{font-size:.95rem}.ga-toast-lg .ga-toast-icon svg{width:1.4rem;height:1.4rem}.ga-toast-xl{padding:22px 24px}.ga-toast-xl .ga-toast-title{font-size:1.125rem}.ga-toast-xl .ga-toast-message{font-size:1.05rem}.ga-toast-xl .ga-toast-icon svg{width:1.6rem;height:1.6rem}.ga-toast-compact{align-items:center;gap:10px;padding:10px 14px}.ga-toast-compact .ga-toast-content{gap:2px}.ga-toast-compact .ga-toast-icon{margin-top:0}.ga-toast-compact .ga-toast-close{align-self:center;margin-top:0}.ga-toast-compact .ga-toast-steps{display:none}.ga-toast-compact .ga-toast-icon svg{width:1.05rem;height:1.05rem}.ga-toast-live-region{position:fixed;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}@media(max-width:520px){.ga-toast-container{--gat-width: auto;left:var(--gat-edge);right:var(--gat-edge);transform:none}.ga-toast-container-top-center,.ga-toast-container-bottom-center,.ga-toast-container-middle-center{transform:none}}[dir=rtl] .ga-toast-progress{transform-origin:right center}@media(prefers-reduced-motion:reduce){.ga-toast{transition:opacity .15s ease}.ga-toast-spinner{animation-duration:1.4s}}@media(prefers-reduced-transparency:reduce){.ga-toast-glass{background:var(--gat-surface-solid);backdrop-filter:none;-webkit-backdrop-filter:none}}.ga-toast-custom{min-width:0}.ga-toast-has-custom{padding:0}.ga-toast-has-custom .ga-toast-close{position:absolute;inset-block-start:8px;inset-inline-end:8px;z-index:1}@keyframes ga-toast-spin{to{transform:rotate(360deg)}}';var x=typeof window<"u"&&typeof document<"u",ye="ga-toast",at="ga-toasts-styles",we=450,Ee=140,ke=3,Ce=14,Me=14,Le=.05,H='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">',Se={success:`${H}<circle cx="12" cy="12" r="9" class="ga-ic-ring"/><path d="M7.75 12.5l2.75 2.75L16.5 9" class="ga-ic-draw"/></svg>`,error:`${H}<circle cx="12" cy="12" r="9" class="ga-ic-ring"/><path d="M15 9l-6 6M9 9l6 6" class="ga-ic-draw"/></svg>`,warning:`${H}<path d="M12 3.6 2.4 20.4h19.2L12 3.6z" class="ga-ic-ring"/><path d="M12 10v4" class="ga-ic-draw"/><path d="M12 17.4v.01"/></svg>`,info:`${H}<circle cx="12" cy="12" r="9" class="ga-ic-ring"/><path d="M12 11v5" class="ga-ic-draw"/><path d="M12 7.6v.01"/></svg>`,primary:`${H}<path d="M12 3.5l2.6 5.27 5.82.85-4.21 4.1.99 5.79L12 16.77 6.8 19.5l.99-5.79-4.21-4.1 5.82-.85L12 3.5z" class="ga-ic-draw"/></svg>`,secondary:`${H}<path d="M6 9a6 6 0 0112 0c0 4.5 1.8 5.6 1.8 5.6H4.2S6 13.5 6 9z" class="ga-ic-draw"/><path d="M10 19a2 2 0 004 0"/></svg>`,loading:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" aria-hidden="true" class="ga-toast-spinner"><circle cx="12" cy="12" r="9" opacity="0.25"/><path d="M12 3a9 9 0 019 9"/></svg>'},He='<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" aria-hidden="true"><path d="M6 6l12 12M18 6 6 18"/></svg>',Ht=new Set(["error","warning"]),Ae=["top-start","top-center","top-end","middle-start","middle-center","middle-end","bottom-start","bottom-center","bottom-end"],Oe={success:5e3,error:8e3,warning:6e3,info:4e3,primary:5e3,secondary:5e3,loading:0},At={soft:{},solid:{surface:"solid",elevation:"raised"},minimal:{surface:"outline",elevation:"flat",radius:10,accentEdge:0},sharp:{radius:4},material:{surface:"solid",elevation:"floating",radius:12}},Ot={compact:["8px","13px","0.82rem"],comfortable:["12px","16px","0.875rem"],spacious:["16px","20px","0.94rem"]},Nt={flat:"0 1px 2px rgba(15,23,42,0.06)",raised:"0 1px 2px rgba(15,23,42,0.05), 0 8px 20px -12px rgba(15,23,42,0.16)",floating:"0 4px 10px -3px rgba(15,23,42,0.12), 0 20px 44px -14px rgba(15,23,42,0.34)"};function I(o){return typeof o=="number"?`${o}px`:String(o)}function nt(o){if(!o)return{};if(typeof o=="string")return{...At[o]||{}};let{preset:u,...h}=o;return{...u?At[u]||{}:{},...h}}function Pt(o){let u={};if(o.width!=null&&(u["--gat-width"]=I(o.width)),o.radius!=null&&(u["--gat-radius"]=I(o.radius)),o.gap!=null&&(u["--gat-gap"]=I(o.gap)),o.edge!=null&&(u["--gat-edge"]=I(o.edge)),o.font&&(u["--gat-font"]=o.font),o.density&&Ot[o.density]){let[h,p,b]=Ot[o.density];u["--gat-pad-y"]=h,u["--gat-pad-x"]=p,u["--gat-font-size"]=b}if(o.elevation&&Nt[o.elevation]&&(u["--gat-shadow"]=Nt[o.elevation]),o.accentEdge!=null&&(u["--gat-accent-edge"]=I(o.accentEdge)),o.accent&&(u["--gat-primary"]=o.accent),o.colors)for(let h of Object.keys(o.colors))o.colors[h]&&(u[`--gat-${h}`]=o.colors[h]);return o.text&&(u["--gat-text"]=o.text),o.textSoft&&(u["--gat-text-soft"]=o.textSoft),o.textMuted&&(u["--gat-text-muted"]=o.textMuted),o.surfaceColor&&(u["--gat-surface"]=o.surfaceColor,u["--gat-surface-solid"]=o.surfaceColor),o.border&&(u["--gat-border"]=o.border),o.shadow&&(u["--gat-shadow"]=o.shadow),o.chip&&(u["--gat-chip"]=o.chip),o.ease&&(u["--gat-ease"]=o.ease),u}function $t(o){return o.startsWith("bottom")?-1:1}function Ne(){return x?(document.documentElement.getAttribute("dir")||document.body&&document.body.getAttribute("dir"))==="rtl":!1}function It(o){let u="translateX(-115%)",h="translateX(115%)",p=Ne();return o.endsWith("start")?p?h:u:o.endsWith("end")?p?u:h:$t(o)===1?"translateY(-140%)":"translateY(140%)"}function Pe(o){return Math.max(.15,1-Math.abs(o)/220)}function V(o){return o.startsWith("#")?o.slice(1):o}function Rt(){return typeof performance<"u"?performance.now():Date.now()}function Ie(){return x&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}var Re=0;function zt(o={}){let u=Re+=1,h=`ga-toaster-${u}`,p=new Map,b=new Map,_={...o.defaults||{}},R=o.logger||null,k=null,st=!1,rt=!1,it=0,C=null,y=null,Y={...Se},lt=He,$={...Oe},z=ke,ct=Ce,U=Me,dt=Le,M="hover",gt=!1,ut=o.injectStyles!==!1,F=o.styleNonce,ft=o.render||null,D={},B,G="bar",w=null,A=o.root||(x?document.body:null),L=!!o.root&&typeof o.root.host<"u"?o.root:x?document.head:null;function pt(t){if(t)for(let e of Object.keys(t))typeof t[e]=="number"&&($[e]=t[e])}function mt(t){if(t)for(let e of Object.keys(t)){if(e==="close"){t.close&&(lt=t.close);continue}Y[e]=t[e]}}function ht(t){t&&(typeof t.peek=="number"&&(ct=t.peek),typeof t.gap=="number"&&(U=t.gap),typeof t.scaleStep=="number"&&(dt=t.scaleStep),t.expand&&(M=t.expand),typeof t.newestOnTop=="boolean"&&(gt=t.newestOnTop))}pt(o.durations),mt(o.icons),ht(o.stack),typeof o.maxVisible=="number"&&(z=Math.max(1,Math.floor(o.maxVisible)||1));function bt(){it+=1;let t=Math.random().toString(36).slice(2,8);return`${ye}-${it}-${t}`}function S(t,e){if(R)try{R(t,e)}catch{}}function vt(){if(!x||!ut||!L)return;let t=document;if(L.querySelector?.(`#${at}`)||L===t.head&&t.getElementById(at))return;let e=t.createElement("style");e.id=at,F&&e.setAttribute("nonce",F),e.textContent=St,L.appendChild(e)}function W(){if(!x||!L)return;let t=D;B=t.surface,G=t.progress||"bar";let e=`.${h}.ga-toast-container`,a=Pt(t),n=Object.entries(a).map(([l,i])=>`${l}:${i}`).join(";"),c=t.dark?Pt(t.dark):{},d=Object.entries(c).map(([l,i])=>`${l}:${i}`).join(";"),s="";if(n&&(s+=`${e}{${n}}`),d&&(s+=`[data-ga-theme="dark"] ${e},.ga-theme-dark ${e}{${d}}`),!s){w?.remove(),w=null;return}w||(w=document.createElement("style"),w.id=`ga-toasts-theme-${u}`,F&&w.setAttribute("nonce",F),L.appendChild(w)),w.textContent=s}function Dt(){if(!x||!A||k&&k.polite.isConnected&&k.assertive.isConnected)return;let t=e=>{let a=document.createElement("div");return a.className="ga-toast-live-region",a.setAttribute("aria-live",e),a.setAttribute("aria-atomic","true"),a.setAttribute("role",e==="assertive"?"alert":"status"),A.appendChild(a),a};k={polite:t("polite"),assertive:t("assertive")}}function Bt(t,e){if(!t||(Dt(),!k))return;let a=e?k.assertive:k.polite;a.textContent="",window.setTimeout(()=>{a.textContent=t},50)}function jt(t){let e=b.get(t);if(e&&e.isConnected)return e;let a=document.createElement("div");if(a.className=`ga-toast-container ga-toast-container-${t} ${h}`,a.setAttribute("data-ga-position",t),a.setAttribute("role","region"),a.setAttribute("aria-label","Notifications"),M==="always"&&(a.dataset.gaExpanded="true"),M==="hover"){let n=null,c=()=>{n!=null&&(clearTimeout(n),n=null)},d=()=>{c(),xt(a,!0)},s=()=>{c(),n=setTimeout(()=>{n=null,xt(a,!1)},Ee)};a.addEventListener("pointerenter",d),a.addEventListener("pointerleave",s),a.addEventListener("focusin",d),a.addEventListener("focusout",l=>{a.contains(l.relatedTarget)||s()})}return A?.appendChild(a),b.set(t,a),a}function xt(t,e){M==="hover"&&t.dataset.gaExpanded==="true"!==e&&(t.dataset.gaExpanded=e?"true":"false",T(t))}function Xt(t){return Array.from(t.children).map(e=>p.get(e.id)).filter(e=>!!e)}function T(t){let e=Xt(t),a=t.dataset.gaPosition||"top-end",n=$t(a),c=M==="always"||M==="hover"&&t.dataset.gaExpanded==="true",d=Ie(),s=gt?e.slice():e.slice().reverse();t.style.setProperty("--ga-toasts-count",String(s.length));let l=0;s.forEach((i,f)=>{if(i.closing)return;if(!i.el.dataset.gaMounted){l+=i.height+U;return}let r,g,m,E=f>=z;E?O(i,"overflow"):N(i,"overflow"),c||d?(r=n*l,g=1,m=1):(r=n*f*ct,g=Math.max(1-f*dt,.85),m=E?0:1);let Lt=i.swipeX?` translateX(${i.swipeX}px)`:"",pe=a.startsWith("middle")?`calc(-50% + ${r}px)`:`${r}px`;i.el.style.transform=`translateY(${pe})${Lt} scale(${g})`,i.el.style.opacity=i.swipeX?String(Pe(i.swipeX)):String(m),i.el.style.zIndex=String(1e3+s.length-f),i.el.style.pointerEvents=m===0?"none":"auto",i.el.setAttribute("aria-hidden",m===0?"true":"false"),l+=i.height+U})}function Tt(t){let e=t.el.offsetHeight;e>0&&(t.height=e)}function Vt(t){let e={type:"info",duration:5e3,closable:!0,position:"top-end",animation:"slide",swipeToClose:!0,closeOnEscape:!0,progress:!0,progressPosition:"bottom",pauseOnHover:!0,pauseOnPageHidden:!0,autoIcon:!0,glassmorphism:!0,html:!1,..._,...t};return e.position=e.position||"top-end",Ae.includes(e.position)||(e.position="top-end"),e}function yt(t){return Y[t]??Y.info??null}function K(){let t=document.createElement("button");return t.type="button",t.className="ga-toast-close",t.setAttribute("aria-label","Close notification"),t.setAttribute("data-ga-close",""),t.innerHTML=lt,t}function wt(t,e,a){if(G==="ring"||!e.progress||(e.duration||0)<=0||e.progressPosition==="none")return null;let n=document.createElement("div");return n.className=`ga-toast-progress ga-toast-progress-${a}`+(e.progressPosition==="top"?" ga-toast-progress-top":""),t.appendChild(n),n}function qt(t,e){let a=document.createElement("div");if(a.className="ga-toast-icon",a.innerHTML=t,!(G==="ring"&&e.progress!==!1&&(e.duration||0)>0))return{el:a,ring:null};a.classList.add("ga-toast-icon-ring");let c="http://www.w3.org/2000/svg",d=document.createElementNS(c,"svg");d.setAttribute("class","ga-toast-ring"),d.setAttribute("viewBox","0 0 36 36"),d.setAttribute("aria-hidden","true");let s=document.createElementNS(c,"circle");s.setAttribute("class","ga-toast-ring-track"),s.setAttribute("cx","18"),s.setAttribute("cy","18"),s.setAttribute("r","16");let l=document.createElementNS(c,"circle");return l.setAttribute("class","ga-toast-ring-bar"),l.setAttribute("cx","18"),l.setAttribute("cy","18"),l.setAttribute("r","16"),d.appendChild(s),d.appendChild(l),a.appendChild(d),{el:a,ring:l}}function _t(t,e){let a=t.type||"info",n=document.createElement("div");n.id=e;let c=B==="glass"||B===void 0&&t.glassmorphism;n.className=["ga-toast",`ga-toast-${a}`,t.size?`ga-toast-${t.size}`:"",t.variant?`ga-toast-${a}-${t.variant}`:"",t.animation||"",t.compact?"ga-toast-compact":"",c?"ga-toast-glass":"",B==="outline"?"ga-toast-outline":"",a==="loading"?"ga-toast-loading":"",t.className||""].filter(Boolean).join(" ");let d=t.role||(Ht.has(a)?"alert":"status");if(n.setAttribute("role",d),n.setAttribute("aria-live","off"),n.setAttribute("data-ga-type",a),d==="alertdialog"||d==="dialog"){let r=[t.title,t.message].filter(Boolean).join(". ");r&&n.setAttribute("aria-label",r)}let s=null;if(t.content!=null)s=typeof t.content=="function"?t.content():t.content;else if(ft){let r=ft(t,{id:e,close:()=>v(e)});r&&(s=r)}if(s!=null){n.classList.add("ga-toast-has-custom");let r=document.createElement("div");return r.className="ga-toast-custom",typeof s=="string"?r.innerHTML=s:r.appendChild(s),n.appendChild(r),t.closable&&n.appendChild(K()),{el:n,progressEl:wt(n,t,a),ring:null}}if(t.avatar){let r=document.createElement("img");r.className="ga-toast-avatar",r.src=t.avatar,r.alt=t.avatarAlt||t.title||"Notification",n.appendChild(r)}let l=null;t.icon?l=String(t.icon):t.icon!==!1&&t.autoIcon!==!1&&!t.avatar&&(l=yt(a));let i=null;if(l){let r=qt(l,t);i=r.ring,n.appendChild(r.el)}let f=document.createElement("div");if(f.className="ga-toast-content",t.title||t.showStatus||t.unread){let r=document.createElement("div");if(r.className="ga-toast-header",t.unread){let g=document.createElement("span");g.className="ga-toast-unread-dot",r.appendChild(g)}if(t.title){let g=document.createElement("div");g.className="ga-toast-title"+(t.truncateTitle?" ga-toast-title-truncate":""),g.textContent=t.title,r.appendChild(g)}if(t.showStatus){let g=document.createElement("span");g.className="ga-toast-status";let m=String(t.statusText||a);g.textContent=m.charAt(0).toUpperCase()+m.slice(1),r.appendChild(g)}f.appendChild(r)}if(t.message||t.meta){let r=document.createElement("div");if(r.className="ga-toast-body",t.meta){let g=document.createElement("div");g.className="ga-toast-meta",g.textContent=t.meta,r.appendChild(g)}if(t.message){let g=document.createElement("div");g.className="ga-toast-message",t.html?g.innerHTML=t.message:g.textContent=t.message,r.appendChild(g)}f.appendChild(r)}if(t.actions&&t.actions.length&&!t.compact){let r=document.createElement("div");r.className="ga-toast-actions";for(let g of t.actions){let m=document.createElement("button");m.type="button",m.className=["ga-toast-btn",g.className||g.class||"ga-toast-btn-secondary"].join(" "),m.textContent=g.text,m.setAttribute("data-ga-action",""),r.appendChild(m)}f.appendChild(r)}if(t.steps&&t.steps>1){let r=document.createElement("div");r.className="ga-toast-steps";let g=Math.min(t.steps,Math.max(1,t.currentStep||1));for(let m=1;m<=t.steps;m+=1){let E=document.createElement("div");E.className="ga-toast-step"+(m<=g?" ga-toast-step-active":""),r.appendChild(E)}f.appendChild(r)}return n.appendChild(f),t.closable&&n.appendChild(K()),{el:n,progressEl:wt(n,t,a),ring:i}}let j=2*Math.PI*16;function J(t){let{timer:e}=t;e.duration<=0||e.remaining<=0||e.holds.size>0||(e.startedAt=Rt(),e.handle=setTimeout(()=>v(t.id),e.remaining),Yt(t,e.remaining))}function O(t,e){let{timer:a}=t,n=a.holds.size>0;if(a.holds.add(e),n||a.handle==null)return;clearTimeout(a.handle),a.handle=null;let c=Rt()-a.startedAt;a.remaining=Math.max(0,a.remaining-c),Ut(t)}function N(t,e){let{timer:a}=t;a.holds.delete(e)&&(a.holds.size>0||J(t))}function Yt(t,e){let a=t.timer.duration>0?e/t.timer.duration:0;if(t.ring){let c=t.ring;c.style.transition="none",c.style.strokeDasharray=String(j),c.style.strokeDashoffset=String(j*(1-a)),c.getBoundingClientRect?.(),c.style.transition=`stroke-dashoffset ${e}ms linear`,c.style.strokeDashoffset=String(j);return}let n=t.progressEl;n&&(n.style.transition="none",n.style.transform=`scaleX(${a})`,n.offsetWidth,n.style.transition=`transform ${e}ms linear`,n.style.transform="scaleX(0)")}function Ut(t){let e=t.timer.duration>0?t.timer.remaining/t.timer.duration:0;if(t.ring){t.ring.style.transition="none",t.ring.style.strokeDashoffset=String(j*(1-e));return}let a=t.progressEl;a&&(a.style.transition="none",a.style.transform=`scaleX(${e})`)}function Gt(t,e){let{el:a,controller:n}=t,c=n.signal;a.addEventListener("click",d=>{let s=d.target;if(s.closest("[data-ga-close]")){d.preventDefault(),v(t.id);return}let l=s.closest("[data-ga-action]");if(l&&e.actions){let i=Array.from(l.parentElement?.children||[]).indexOf(l),f=e.actions[i];if(f){let r=f.onClick||f.click;r&&r(d,t.handle),f.closeOnClick!==!1&&v(t.id)}return}e.clickToClose&&!s.closest(".ga-toast-actions")&&v(t.id)},{signal:c}),e.pauseOnHover&&(a.addEventListener("pointerenter",()=>O(t,"hover"),{signal:c}),a.addEventListener("pointerleave",()=>N(t,"hover"),{signal:c}),a.addEventListener("focusin",()=>O(t,"focus"),{signal:c}),a.addEventListener("focusout",()=>N(t,"focus"),{signal:c})),e.swipeToClose&&Wt(t),e.modal&&a.addEventListener("keydown",d=>{if(d.key!=="Tab")return;let s=a.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(!s.length)return;let l=s[0],i=s[s.length-1],f=document.activeElement;d.shiftKey&&f===l?(d.preventDefault(),i.focus()):!d.shiftKey&&f===i&&(d.preventDefault(),l.focus())},{signal:c})}function Wt(t){let{el:e,controller:a}=t,n=a.signal,c=70,d=!1,s=!1,l=0,i=0;e.addEventListener("pointerdown",r=>{if(!(r.pointerType==="mouse"&&r.button!==0)&&!r.target.closest("button, a, input, textarea, select")){d=!0,s=!1,l=r.clientX,i=r.clientY,O(t,"swipe");try{e.setPointerCapture(r.pointerId)}catch{}}},{signal:n}),e.addEventListener("pointermove",r=>{if(!d)return;let g=r.clientX-l,m=r.clientY-i;if(Math.abs(g)<6||Math.abs(g)<Math.abs(m))return;r.preventDefault(),s||(s=!0,e.classList.add("ga-toast-swiping"),(typeof window<"u"&&typeof window.getSelection=="function"?window.getSelection():null)?.removeAllRanges()),t.swipeX=g;let E=e.parentElement;E&&T(E)},{signal:n});let f=r=>{if(!d)return;d=!1,s=!1,e.classList.remove("ga-toast-swiping");let g=r.clientX-l;if(Math.abs(g)>c){let m=g>0?1:-1;t.el.style.transition="transform 0.2s ease, opacity 0.2s ease",t.el.style.transform=`translateX(${m*400}px)`,t.el.style.opacity="0",v(t.id)}else{t.swipeX=0;let m=e.parentElement;m&&T(m),N(t,"swipe")}};e.addEventListener("pointerup",f,{signal:n}),e.addEventListener("pointercancel",f,{signal:n})}function Kt(){st||!x||(st=!0,document.addEventListener("keydown",t=>{if(t.key!=="Escape")return;let e=null;for(let a of p.values())a.closing||a.opts.closeOnEscape===!1||!a.opts.closable||(e=a);e&&v(e.id)}))}function Jt(){rt||!x||typeof document.addEventListener!="function"||(rt=!0,document.addEventListener("visibilitychange",()=>{let t=document.hidden;for(let e of p.values())e.closing||e.opts.pauseOnPageHidden===!1||(t?O(e,"tab"):N(e,"tab"))}))}function Qt(){if(!x||!A)return;y||(y=document.createElement("div"),y.className="ga-toast-backdrop"),y.isConnected||A.appendChild(y);let t=y;requestAnimationFrame(()=>t.classList.add("ga-toast-backdrop-show"))}function Zt(){if(!y)return;let t=y;t.classList.remove("ga-toast-backdrop-show"),setTimeout(()=>{C==null&&t.parentNode&&t.remove()},220)}function Et(t){let e={id:t,el:x?document.createElement("div"):{},update:()=>e,close:()=>{}};return e}function P(t={}){if(!x)return Et(t.id||bt());let e=Vt(t);if(e.id&&p.has(e.id))return Q(e.id,t)||Et(e.id);if(e.modal){if(C&&p.has(C))return p.get(C).handle;e.swipeToClose=!1,e.closeOnEscape=!1,e.moveFocus=!0}vt(),Kt(),Jt();let a=e.id||bt(),{el:n,progressEl:c,ring:d}=_t(e,a),s=new AbortController,l={duration:e.duration||0,remaining:e.duration||0,startedAt:0,handle:null,holds:new Set},i={id:a,el:n,update:g=>(Q(a,g),i),close:()=>v(a)},f={id:a,el:n,handle:i,opts:e,controller:s,progressEl:c,ring:d,timer:l,height:0,closing:!1,swipeX:0,resizeObserver:null,prevFocus:e.moveFocus?document.activeElement:null};p.set(a,f),e.modal&&(C=a,n.setAttribute("aria-modal","true"),Qt());let r=jt(e.position);if(n.style.transform=It(e.position),n.style.opacity="0",r.appendChild(n),Gt(f,e),typeof ResizeObserver<"u"&&(f.resizeObserver=new ResizeObserver(()=>{Tt(f);let g=n.parentElement;g&&T(g)}),f.resizeObserver.observe(n)),requestAnimationFrame(()=>{requestAnimationFrame(()=>{if(p.has(a)&&(Tt(f),n.dataset.gaMounted="true",n.style.opacity="1",T(r),J(f),e.moveFocus)){let g=n.querySelector("[data-ga-action]")||n;g===n&&(n.tabIndex=-1);try{g.focus({preventScroll:!0})}catch{}}})}),!e.modal&&e.role!=="alertdialog"&&Bt([e.title,e.message].filter(Boolean).join(". "),Ht.has(e.type||"info")),e.onShow)try{e.onShow(i)}catch(g){S("toast:onShow:error",g)}return S("toast:show",{id:a,type:e.type}),i}function v(t){if(!t)return;let e=typeof t=="string"?V(t):t.id,a=p.get(e);if(!a||a.closing)return;a.closing=!0,a.timer.handle!=null&&(clearTimeout(a.timer.handle),a.timer.handle=null),a.controller.abort(),a.resizeObserver?.disconnect();let{el:n}=a,c=n.parentElement;a.swipeX||(n.style.transition="",n.classList.add("ga-toast-hide"),n.style.transform=It(a.opts.position),n.style.opacity="0");let d=!1,s=()=>{if(d)return;d=!0,n.removeEventListener("transitionend",l),p.delete(e),n.remove(),C===e&&(C=null,Zt()),c&&T(c);let i=a.prevFocus;if(i&&typeof i.focus=="function"&&document.contains(i))try{i.focus({preventScroll:!0})}catch{}if(a.opts.onClose)try{a.opts.onClose(a.handle)}catch(f){S("toast:onClose:error",f)}S("toast:close",{id:e})},l=i=>{i.target===n&&(i.propertyName==="transform"||i.propertyName==="opacity")&&s()};n.addEventListener("transitionend",l),setTimeout(s,we)}function Q(t,e){let a=typeof t=="string"?V(t):t.id,n=p.get(a);if(!n)return S("toast:update:not-found",a),null;let c=n.opts;if(e.title!==void 0){let s=n.el.querySelector(".ga-toast-title");if(!s&&e.title){let l=n.el.querySelector(".ga-toast-content");if(l){let i=l.querySelector(".ga-toast-header");i||(i=document.createElement("div"),i.className="ga-toast-header",l.insertBefore(i,l.firstChild)),s=document.createElement("div"),s.className="ga-toast-title",i.appendChild(s)}}s&&(s.textContent=e.title),c.title=e.title}if(e.message!==void 0){let s=e.html??c.html,l=n.el.querySelector(".ga-toast-message");if(!l&&e.message){let i=n.el.querySelector(".ga-toast-body");if(!i){i=document.createElement("div"),i.className="ga-toast-body";let f=n.el.querySelector(".ga-toast-content"),r=f?.querySelector(".ga-toast-actions, .ga-toast-steps");r?f.insertBefore(i,r):f?.appendChild(i)}l=document.createElement("div"),l.className="ga-toast-message",i.appendChild(l)}l&&(s?l.innerHTML=e.message:l.textContent=e.message),c.message=e.message}if(e.type&&e.type!==c.type){let s=c.type;n.el.classList.remove(`ga-toast-${s}`,"ga-toast-loading"),n.el.classList.add(`ga-toast-${e.type}`),n.el.setAttribute("data-ga-type",e.type),e.type==="loading"&&n.el.classList.add("ga-toast-loading"),n.progressEl&&(n.progressEl.className=n.progressEl.className.replace(/ga-toast-progress-\w+/,`ga-toast-progress-${e.type}`));let l=n.el.querySelector(".ga-toast-icon");if(l&&c.autoIcon!==!1&&!e.icon){let i=yt(e.type);i!=null&&(l.innerHTML=i)}c.type=e.type}if(e.icon!==void 0){let s=n.el.querySelector(".ga-toast-icon");if(e.icon){if(!s){s=document.createElement("div"),s.className="ga-toast-icon";let l=n.el.querySelector(".ga-toast-content");n.el.insertBefore(s,l)}s.innerHTML=String(e.icon)}else s&&s.remove()}if(e.closable!==void 0){let s=n.el.querySelector(":scope > .ga-toast-close");e.closable&&!s?n.el.insertBefore(K(),n.progressEl||null):!e.closable&&s&&s.remove(),c.closable=e.closable}e.duration!==void 0&&(n.timer.handle!=null&&clearTimeout(n.timer.handle),n.timer.duration=e.duration,n.timer.remaining=e.duration,c.duration=e.duration,e.duration>0&&n.el.dataset.gaMounted&&J(n));let d=n.el.parentElement;return d&&T(d),S("toast:update",{id:a}),n.handle}function Z(){for(let t of Array.from(p.keys()))v(t)}function te(t){if(!t)return Z();for(let e of Array.from(p.values()))e.opts.type===t&&v(e.id)}function ee(t){if(!t)return p.size;let e=0;for(let a of p.values())a.opts.type===t&&(e+=1);return e}function ae(t){return p.has(V(t))}function ne(t){return p.get(V(t))?.el||null}function X(t){return(e,a={})=>P({...a,type:t,message:e,duration:a.duration??$[t]})}let oe=X("success"),se=X("error"),re=X("warning"),kt=X("info");function Ct(t="Loading\u2026",e={}){return P({closable:!1,...e,type:"loading",message:t,duration:0,progress:!1})}function ie(t,e={}){let{confirmText:a,cancelText:n,onConfirm:c,onCancel:d,...s}=e;return P({type:"warning",duration:0,closable:!1,swipeToClose:!1,role:"alertdialog",moveFocus:!0,modal:!0,position:"middle-center",...s,message:t,actions:[{text:n||"Cancel",className:"ga-toast-btn-secondary",onClick:()=>d?.()},{text:a||"Confirm",className:"ga-toast-btn-primary",onClick:()=>c?.()}]})}function le(t,e,a={}){let n=typeof t=="function"?t():t,c=Ct(e.loading,a);return n.then(d=>(c.update({type:"success",message:typeof e.success=="function"?e.success(d):e.success,duration:a.duration??$.success,closable:!0}),d),d=>{throw c.update({type:"error",message:typeof e.error=="function"?e.error(d):e.error,duration:a.duration??$.error,closable:!0}),d})}function ce(t,e={}){return P({...e,content:t})}function Mt(t){_={..._,...t}}function de(t){R=typeof t=="function"?t:null}function ge(t){z=Math.max(1,Math.floor(t)||1),b.forEach(e=>T(e))}function ue(t){return D=nt(t),W(),b.forEach(e=>T(e)),tt}function fe(t){return t.defaults&&Mt(t.defaults),t.logger!==void 0&&(R=t.logger),pt(t.durations),mt(t.icons),ht(t.stack),typeof t.maxVisible=="number"&&(z=Math.max(1,Math.floor(t.maxVisible)||1)),t.injectStyles!==void 0&&(ut=t.injectStyles!==!1),t.theme!==void 0&&(D=nt(t.theme),W()),b.forEach(e=>T(e)),tt}let tt=Object.assign((t,e)=>kt(t,e),{show:P,success:oe,error:se,warning:re,info:kt,loading:Ct,confirm:ie,promise:le,custom:ce,close:v,closeAll:Z,dismiss:v,dismissAll:Z,clear:te,update:Q,get:ne,exists:ae,getCount:ee,setDefaults:Mt,setMaxVisible:ge,setLogger:de,configure:fe,theme:ue,injectStyles:vt});return o.theme!==void 0&&(D=nt(o.theme),W()),tt}function Ft(o={}){return zt(o)}var ot=zt(),q=ot;q.toast=ot;q.createToaster=Ft;var $e=q;return Te(ze);})();
|
|
2
|
+
GaToasts=GaToasts.default;
|