1import{t as e}from"./helpers-ePuekpbm.js";var t=function(){return t=Object.assign||function(e){let t,n=1,r=arguments.length;for(;n<r;n++){t=arguments[n];for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},t.apply(this,arguments)},n=function(){function e(e){this.options=e,this.listeners={}}return e.prototype.on=function(e,t){let n=this.listeners[e]||[];this.listeners[e]=n.concat([t])},e.prototype.triggerEvent=function(e,t){(this.listeners[e]||[]).forEach(e=>e({target:this,event:t}))},e}(),r;(function(e){e[e.Add=0]=`Add`,e[e.Remove=1]=`Remove`,e[e.Reduce=2]=`Reduce`})(r||={});var i=function(){function e(){this.notifications=[]}return e.prototype.push=function(e){this.notifications.push(e),this.updateFn(e,r.Add,this.notifications)},e.prototype.splice=function(e,t){let n=this.notifications.splice(e,t)[0];return this.updateFn(n,r.Remove,this.notifications),n},e.prototype.indexOf=function(e){return this.notifications.indexOf(e)},e.prototype.onUpdate=function(e){this.updateFn=e},e}(),a;(function(e){e.Dismiss=`dismiss`,e.Click=`click`})(a||={});var o={types:[{type:`success`,className:`notyf__toast--success`,backgroundColor:`var(--notyf-success-background-color)`,icon:`check`},{type:`warning`,className:`notyf__toast--warning`,backgroundColor:`var(--notyf-warning-background-color)`,icon:`information`},{type:`error`,className:`notyf__toast--error`,backgroundColor:`var(--notyf-error-background-color)`,icon:`close`},{type:`notice`,className:`notyf__toast--notice`,backgroundColor:`var(--notyf-notice-background-color)`,icon:`information`},{type:`style-switcher`,className:`notyf__toast--style-switcher`,backgroundColor:`var(--notyf-style-switcher-background-color)`,icon:``,reducible:!0,ll:{toggle:`toggle popup`,close:`close popup`}}],duration:2e3,ripple:!0,position:{x:`right`,y:`top`},dismissible:!0,reducible:!1,bigIcon:!1,colorscheme:``,ll:{toggle:`toggle popup`,close:`close popup`}},s=function(){function n(){this.notifications=[],this.events={},this.X_POSITION_FLEX_MAP={left:`flex-start`,center:`center`,right:`flex-end`},this.Y_POSITION_FLEX_MAP={top:`flex-start`,center:`center`,bottom:`flex-end`};let e=document.createDocumentFragment(),t=this._createHTMLElement({tagName:`div`,className:`notyf`});e.appendChild(t),document.body.appendChild(e),this.container=t,this.animationEndEventName=this._getAnimationEndEventName(),this._createA11yContainer()}return n.prototype.on=function(e,n){let r;this.events=t(t({},this.events),(r={},r[e]=n,r))},n.prototype.update=function(e,t){t===r.Add?this.addNotification(e):t===r.Remove&&this.removeNotification(e)},n.prototype.removeNotification=function(e){let t=this,n=this._popRenderedNotification(e);if(!n)return;let r=n.node;r.classList.add(`notyf__toast--disappear`);let i;r.addEventListener(this.animationEndEventName,i=function(e){e.target===r&&(r.removeEventListener(t.animationEndEventName,i),t.container.removeChild(r))})},n.prototype.addNotification=function(e){let t=this._renderNotification(e);this.notifications.push({notification:e,node:t}),this._announce(e.options.message||`Notification`)},n.prototype._renderNotification=function(e){let t,n=this._buildNotificationCard(e),r=e.options.className;return r&&(t=n.classList).add.apply(t,r.split(` `)),this.container.appendChild(n),n},n.prototype._popRenderedNotification=function(e){let t=-1;for(let n=0;n<this.notifications.length&&t<0;n++)this.notifications[n].notification===e&&(t=n);if(t!==-1)return this.notifications.splice(t,1)[0]},n.prototype.getXPosition=function(e){return e?.position?.x||`right`},n.prototype.getYPosition=function(e){return e?.position?.y||`bottom`},n.prototype.adjustContainerAlignment=function(e){let t=this.X_POSITION_FLEX_MAP[this.getXPosition(e)],n=this.Y_POSITION_FLEX_MAP[this.getYPosition(e)],r=this.container.style;r.setProperty(`justify-content`,n),r.setProperty(`align-items`,t)},n.prototype._buildNotificationCard=function(t){let n=this,r=t.options,i=[],o=`ndspopup`+this.notifications.indexOf(t),s=``,c=r.icon;r.bigIcon&&i.push(`big-icon`),r.reduceTransparent&&i.push(`reduce-transparent`),r.reducible&&i.push(`reducible`),r.reduced&&i.push(`reduced`),r.colorscheme&&i.push(`scheme-`+r.colorscheme),i.length>0&&(s=` notyf__toast--`+i.join(` notyf__toast--`)),r.reducible&&!c&&(c=`maximize`),this.adjustContainerAlignment(r);let l=this._createHTMLElement({tagName:`div`,className:`notyf__toast`+s});l.setAttribute(`id`,o);let u=this._createHTMLElement({tagName:`div`,className:`notyf__ripple`}),d=this._createHTMLElement({tagName:`div`,className:`notyf__wrapper`}),f=this._createHTMLElement({tagName:`div`,className:`notyf__message`});f.innerHTML=r.message||``;let p=r.background||r.backgroundColor,m=document.head.querySelector(`meta[name="iconpath"]`).content;if(c){let e=this._createHTMLElement({tagName:`div`,className:`notyf__icon`});if(r.reducible&&(e.setAttribute(`tabindex`,`0`),e.setAttribute(`role`,`button`),e.setAttribute(`aria-label`,r.ll.toggle),e.setAttribute(`aria-controls`,o)),(typeof c==`string`||c instanceof String)&&(e.innerHTML=`<i class="icon" aria-hidden="true"><svg class="icon__svg" data-url="/dist/svg/${m}/${c}.svg"></svg></i>`),typeof c==`object`){let{tagName:t=`i`,className:n,text:r,color:i=p}=c,a=this._createHTMLElement({tagName:t,className:n,text:r});i&&(a.style.color=i),e.appendChild(a)}d.appendChild(e)}
1if(d.appendChild(f),l.appendChild(d),p&&(r.ripple?(u.style.background=p,l.appendChild(u)):l.style.background=p),r.dismissible&&!r.reducible){let i=this._createHTMLElement({tagName:`div`,className:`notyf__dismiss`}),s=this._createHTMLElement({tagName:`button`,className:`btn btn--round notyf__dismiss-btn`});s.innerHTML=` 2 <i class="icon" aria-hidden="true"> 3 <svg class="icon__svg" data-url="/dist/svg/${m}/close.svg"></svg> 4 <span class="visually-hidden">${r.ll.close}</span> 5 </i>`,s.setAttribute(`aria-label`,r.ll.close),s.setAttribute(`aria-controls`,o),i.appendChild(s),d.appendChild(i),l.classList.add(`notyf__toast--dismissible`),e(s,e=>{n.events[a.Dismiss]&&n.events[a.Dismiss]({target:t,event:e}),e.stopPropagation()})}if(r.reducible){let t=this._createHTMLElement({tagName:`div`,className:`notyf__reduce`}),n=this._createHTMLElement({tagName:`button`,className:`btn btn--round notyf__reduce-btn`});n.setAttribute(`aria-label`,r.ll.toggle),n.setAttribute(`aria-controls`,o),n.innerHTML=` 6 <i class="icon" aria-hidden="true"> 7 <svg class="icon__svg" data-url="/dist/svg/${m}/close.svg"></svg> 8 <span class="visually-hidden">${r.ll.toggle}</span> 9 </i>`,t.appendChild(n),d.appendChild(t);let i=d.querySelector(`.notyf__icon`);i&&e(i,e=>{l.classList.toggle(`notyf__toast--reduced`),e.stopPropagation()}),e(n,e=>{l.classList.toggle(`notyf__toast--reduced`),e.stopPropagation()})}l.addEventListener(`click`,function(e){let r;return(r=n.events)[a.Click]?.call(r,{target:t,event:e})});let h=this.getYPosition(r)===`top`?`upper`:`lower`;return l.classList.add(`notyf__toast--`+h),l},n.prototype._createHTMLElement=function(e){let t=e.tagName,n=e.className,r=e.text,i=document.createElement(t);return n&&(i.className=n),i.textContent=r||null,i},n.prototype._createA11yContainer=function(){let e=this._createHTMLElement({tagName:`div`,className:`notyf-announcer`});e.setAttribute(`aria-atomic`,`true`),e.setAttribute(`aria-live`,`polite`),e.style.border=`0`,e.style.clip=`rect(0 0 0 0)`,e.style.height=`1px`,e.style.margin=`-1px`,e.style.overflow=`hidden`,e.style.padding=`0`,e.style.position=`absolute`,e.style.width=`1px`,e.style.outline=`0`,document.body.appendChild(e),this.a11yContainer=e},n.prototype._announce=function(e){let t=this;this.a11yContainer.textContent=``,setTimeout(function(){t.a11yContainer.textContent=e},100)},n.prototype._getAnimationEndEventName=function(){let e=document.createElement(`_fake`),t={MozTransition:`animationend`,OTransition:`oAnimationEnd`,WebkitTransition:`webkitAnimationEnd`,transition:`animationend`},n;for(n in t)if(e.style[n]!==void 0)return t[n];return`animationend`},n}(),c=new(function(){function e(e){let n=this;this.dismiss=this._removeNotification,this.notifications=new i,this.view=new s;let r=this.registerTypes(e);this.options=t(t({},o),e),this.options.types=r,this.notifications.onUpdate(function(e,t){return n.view.update(e,t)}),this.view.on(a.Dismiss,function(e){let t=e.target,r=e.event;n._removeNotification(t),t.triggerEvent(a.Dismiss,r)}),this.view.on(a.Click,function(e){let t=e.target,n=e.event;return t.triggerEvent(a.Click,n)})}return e.prototype.error=function(e){let t=this.normalizeOptions(`error`,e);return this.open(t)},e.prototype.success=function(e){let t=this.normalizeOptions(`success`,e);return this.open(t)},e.prototype.open=function(e){let r=this.options.types.find(function(t){return t.type===e.type})||{},i=t(t({},r),e);this.assignProps([`ripple`,`position`,`dismissible`],i);let a=new n(i);return this._pushNotification(a),a},e.prototype.dismissAll=function(){this.notifications.length=0},e.prototype.assignProps=function(e,t){let n=this;e.forEach(function(e){t[e]=t[e]==null?n.options[e]:t[e]})},e.prototype._pushNotification=function(e){let t=this;this.notifications.push(e);let n=e.options.duration===void 0?this.options.duration:e.options.duration;n&&setTimeout(function(){return t._removeNotification(e)},n)},e.prototype._removeNotification=function(e){let t=this.notifications.indexOf(e);t!==-1&&this.notifications.splice(t,1)},e.prototype.normalizeOptions=function(e,n){let r={type:e};return typeof n==`string`?r.message=n:typeof n==`object`&&(r=t(t({},r),n)),r},e.prototype.registerTypes=function(e){let n=(e&&e.types||[]).slice();return o.types.map(function(e){let r=-1;
9n.forEach(function(t,n){t.type===e.type&&(r=n)});let i=r===-1?{}:n.splice(r,1)[0];return t(t({},e),i)}).concat(n)},e}())({duration:0,position:{x:`right`,y:`top`}});export{c as t};
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.