1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8705],{58705:function(o,n,i){i.r(n),i.d(n,{nylas_notification:function(){return e},warning_icon:function(){return t}});var a=i(39986);i(67294),i(85893),i(73935);let e=class{constructor(o){(0,a.r)(this,o),this.ttl=5e3,this.allowedCategories=["component","api","validation","invalid_session"],this.notifications=[]}onError(o){(0,a.b)(`[nylas-notification] Error: ${o.detail.notification.title}`),this.handleNotification(o)}onWarning(o){(0,a.b)(`[nylas-notification] Warning: ${o.detail.notification.title}`),this.handleNotification(o)}onInfo(o){(0,a.b)(`[nylas-notification] Info: ${o.detail.notification.title}`),this.handleNotification(o)}onSuccess(o){(0,a.b)(`[nylas-notification] Success: ${o.detail.notification.title}`),this.handleNotification(o)}onDismissNotification(o){this.dismissNotification(o.detail.id)}isChildOf(o){let n=this.host.parentNode;for(;n;){if(n===o)return!0;n instanceof ShadowRoot?n=n.host:n=n.parentNode}return!1}handleNotification(o){let n=o.detail.host;if(o.defaultPrevented){(0,a.b)("[nylas-notification] Event default prevented");return}if(n&&!this.isChildOf(n)){(0,a.b)("[nylas-notification] Host not a parent");return}if(0===this.ttl){(0,a.b)("[nylas-notification] TTL is 0");return}if(this.allowedCategories.length>0&&!this.allowedCategories.includes(o.detail.notification.category)){(0,a.b)("[nylas-notification] Category not allowed");return}if(this.notifications.find(n=>n.id===o.detail.notification.id)){(0,a.b)("[nylas-notification] Notification already exists");return}if(this.notifications=[...this.notifications,{...o.detail.notification}],"none"!==o.detail.notification.ttl){let n=o.detail.notification.ttl?o.detail.notification.ttl:this.ttl;window.setTimeout(()=>{this.notifications=this.notifications.filter(n=>n.id!==o.detail.notification.id)},n)}}dismissNotification(o){this.notifications=this.notifications.filter(n=>n.id!==o)}render(){return(0,a.h)(a.H,{key:"f0e6fb311ba12bebf3970afb5850a7995c5bcd83"},(0,a.h)(a.F,{key:"2f9bd098337a72908c4c292e03d1ddafa54f7c61"},this.notifications.map(o=>(0,a.h)("div",{class:`notif ${o.type}`,key:o.id},(0,a.h)("div",{class:"content"},(0,a.h)("span",{class:`icon ${o.type}`},("error"===o.type||"warning"===o.type)&&(0,a.h)("warning-icon",null)),(0,a.h)("span",{class:"message"},(0,a.h)("span",{class:"title"},o.title),o.description&&(0,a.h)("span",{class:"description"},o.description))),(0,a.h)("button",{class:"dismiss-btn",onClick:()=>this.dismissNotification(o.id)},(0,a.h)("close-icon",null)))),(0,a.h)("slot",{key:"575b3ecb1b22b23c84c75a6900215795a5695fff"})))}get host(){return(0,a.g)(this)}};e.style=':host{display:block;margin-bottom:-12px;width:100%;z-index:1;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.notif{display:flex;padding:17px;align-items:flex-start;justify-content:space-between;gap:16px;border-radius:var(--nylas-border-radius-2x);border:1.5px solid var(--nylas-error);background:var(--nylas-base-0)}
1@media screen and (max-width: 768px){.notif{width:auto}}.notif .content{display:flex;flex-direction:row;gap:8px}.notif .content .message{font-size:14px;font-weight:400;color:var(--nylas-base-800)}.notif .content .message .title{font-size:16px;font-weight:600;color:var(--nylas-base-950);display:block}.notif .content .message .description{font-size:14px;font-weight:400;color:var(--nylas-base-800);display:block;word-break:break-word}.notif .content .icon.error{color:var(--nylas-error)}.notif.error{border-color:var(--nylas-error);background:rgb(255, 248, 248)}.notif.warning{border-color:var(--nylas-warning)}.notif.info{border-color:var(--nylas-info)}.notif.success{border-color:var(--nylas-success)}.notif .dismiss-btn{background:none;border:none;color:var(--nylas-base-950);cursor:pointer}';let t=class{constructor(o){(0,a.r)(this,o),this.width="16",this.height="16"}render(){return(0,a.h)("svg",{key:"7934b2980705106a978e817555c1065704e626c7",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,a.h)("path",{key:"3942fd2b948a46bd0fb8c7322b6b0c7db439b66e",d:"M7.68551 1.35232L1.12678 13.2773C0.576954 14.277 1.3002 15.5002 2.4411 15.5002H15.5586C16.6995 15.5002 17.4227 14.277 16.8729 13.2773L10.3142 1.35232C9.74426 0.316153 8.2554 0.316157 7.68551 1.35232ZM8.99982 5.25016C9.41403 5.25016 9.74982 5.58595 9.74982 6.00016V10.0002C9.74982 10.4144 9.41403 10.7502 8.99982 10.7502C8.5856 10.7502 8.24982 10.4144 8.24982 10.0002V6.00016C8.24982 5.58595 8.5856 5.25016 8.99982 5.25016ZM9.74982 12.2502C9.74982 12.6644 9.41403 13.0002 8.99982 13.0002C8.5856 13.0002 8.24982 12.6644 8.24982 12.2502C8.24982 11.8359 8.5856 11.5002 8.99982 11.5002C9.41403 11.5002 9.74982 11.8359 9.74982 12.2502Z",fill:"currentColor"}))}};t.style=".sc-warning-icon-h{display:flex}"}}]); 2//# sourceMappingURL=8705.6b3fb5bb0f8d1822.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.