forked from avelino/awesome-go
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
9142-455754397e0a9393.js.download
1 lines (1 loc) · 25.7 KB
/
9142-455754397e0a9393.js.download
1
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9142],{81817:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getFeatureKeyLabel=void 0;let n=r(4355);t.getFeatureKeyLabel=e=>{switch(e){case"feature:adminportal":return"Admin Portal";case"feature:adminportal:custombranding":return"Admin Portal (custom branding)";case"feature:adminportal:dns":return"Admin Portal (custom DNS)";case"feature:auditlogs":return"Audit logs";case"feature:auditlogs:retention:30day":return"Audit Log Organizations with 30 day retention";case"feature:auditlogs:retention:90day":return"Audit Log Organizations with 90 day retention";case"feature:auditlogs:retention:365day":return"Audit Log Organizations with 365 day retention";case"feature:auditlogs:streams":return"Log Streams";case"feature:audittrail":return"Audit trail";case"feature:billing:invoice":return"Billing invoice";case"feature:connections:all":return"Enterprise connections";case"feature:connections:dsync":return"Directory Sync connections";case"feature:connections:magiclink":return"Magic Link connections";case"feature:connections:oauth":return"OAuth connections";case"feature:connections:sso":return"Single Sign-On connections";case"feature:dashboard:sso":return"Dashboard Single Sign-On";case"feature:dashboard:dsync":return"Dashboard Directory Sync";case"feature:dashboard:mfa":return"Dashboard Multi-Factor Authentication";case"feature:dns:api:alias":return"Custom API alias";case"feature:dns:google:oauth:domain":return"Custom Google OAuth domain";case"feature:enterprisefee:monthly":return"Enterprise plan";case"feature:environments:multiple":return"Multiple environments";case"feature:compliance:soc2":return"SOC 2 report";case"feature:role:admin":return"User role (admin)";case"feature:role:member":return"User role (developer)";case"feature:role:support":return"User role (support)";case"feature:support:email":return"Email support";case"feature:support:enterprise":return"Enterprise support";case"feature:support:slack":return"Slack support";case"feature:growthplan:monthly":return"Growth Plan";case"feature:customdomains:monthly":return"Custom Domains";case"feature:customemaildomains:monthly":return"Custom Email Domains";default:return(0,n.unreachable)(e)}}},20625:function(e,t,r){var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},a=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.BILLING_PLANS=void 0;let o=r(91526);a(r(81817),t),a(r(84659),t),t.BILLING_PLANS=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},o.ADDON_ADMIN_PORTAL_CUSTOM_BRANDING_V1),o.ADDON_AUDIT_TRAIL_V1),o.ADDON_CUSTOM_DOMAINS_V1),o.ADDON_GRANDFATHERED_CUSTOM_EMAIL_DOMAINS_V1),o.ADDON_ENTERPRISE_FEE_V1),o.ADDON_GROWTH_PLAN_V1),o.FREE_V1)},26685:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.ADDON_GRANDFATHERED_CUSTOM_EMAIL_DOMAINS_V1=t.ADDON_CUSTOM_DOMAINS_V1=t.ADDON_GROWTH_PLAN_V1=t.ADDON_ENTERPRISE_FEE_V1=t.ADDON_AUDIT_TRAIL_V1=t.ADDON_ADMIN_PORTAL_CUSTOM_BRANDING_V1=void 0;let n=r(81817);t.ADDON_ADMIN_PORTAL_CUSTOM_BRANDING_V1={"addon:adminportal:custombranding@1":{name:"Add-on: Admin Portal Custom Branding",features:{"feature:adminportal:custombranding":{title:(0,n.getFeatureKeyLabel)("feature:adminportal:custombranding")},"feature:adminportal:dns":{title:(0,n.getFeatureKeyLabel)("feature:adminportal:dns")},"feature:dns:api:alias":{title:(0,n.getFeatureKeyLabel)("feature:dns:api:alias")}}}},t.ADDON_AUDIT_TRAIL_V1={"addon:audittrail@1":{name:"Add-on: Audit Trail",features:{"feature:audittrail":{title:(0,n.getFeatureKeyLabel)("feature:audittrail")}}}},t.ADDON_ENTERPRISE_FEE_V1={"addon:enterprisefee@1":{name:"Add-on: Enterprise Fee",features:{"feature:enterprisefee:monthly":{title:(0,n.getFeatureKeyLabel)("feature:enterprisefee:monthly")}}}},t.ADDON_GROWTH_PLAN_V1={"addon:growthplan@1":{name:"Add-on: Growth Plan",features:{"feature:growthplan:monthly":{title:(0,n.getFeatureKeyLabel)("feature:growthplan:monthly")},"feature:adminportal:custombranding":{title:(0,n.getFeatureKeyLabel)("feature:adminportal:custombranding")},"feature:adminportal:dns":{title:(0,n.getFeatureKeyLabel)("feature:adminportal:dns")},"feature:dns:api:alias":{title:(0,n.getFeatureKeyLabel)("feature:dns:api:alias")}}}},t.ADDON_CUSTOM_DOMAINS_V1={"addon:customdomains@1":{name:"Custom Domains",features:{"feature:customdomains:monthly":{title:(0,n.getFeatureKeyLabel)("feature:customdomains:monthly")}}}},t.ADDON_GRANDFATHERED_CUSTOM_EMAIL_DOMAINS_V1={"addon:granfatheredcustomemaildomains@1":{name:"Granfathered Custom Email Domains",features:{"feature:customemaildomains:monthly":{title:(0,n.getFeatureKeyLabel)("feature:customemaildomains:monthly")}}}}},70493:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.FREE_V1=void 0;let n=r(81817);t.FREE_V1={"plan:free@1":{name:"Free",features:{"feature:connections:magiclink":{title:(0,n.getFeatureKeyLabel)("feature:connections:magiclink")},"feature:connections:oauth":{title:(0,n.getFeatureKeyLabel)("feature:connections:oauth")},"feature:dashboard:mfa":{title:(0,n.getFeatureKeyLabel)("feature:dashboard:mfa")},"feature:role:admin":{title:(0,n.getFeatureKeyLabel)("feature:role:admin")},"feature:support:slack":{title:(0,n.getFeatureKeyLabel)("feature:support:slack")},"feature:dashboard:sso":{title:(0,n.getFeatureKeyLabel)("feature:dashboard:sso")},"feature:role:member":{title:(0,n.getFeatureKeyLabel)("feature:role:member")},"feature:compliance:soc2":{title:(0,n.getFeatureKeyLabel)("feature:compliance:soc2")},"feature:dns:google:oauth:domain":{title:(0,n.getFeatureKeyLabel)("feature:dns:google:oauth:domain")},"feature:adminportal":{title:(0,n.getFeatureKeyLabel)("feature:adminportal")},"feature:role:support":{title:(0,n.getFeatureKeyLabel)("feature:role:support")},"feature:support:email":{title:(0,n.getFeatureKeyLabel)("feature:support:email")}}}}},91526:function(e,t,r){var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},a=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),a(r(26685),t),a(r(70493),t)},68273:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isBillingPlanKey=t.BILLING_PLAN_KEYS=void 0,t.BILLING_PLAN_KEYS=["addon:adminportal:custombranding@1","addon:audittrail@1","addon:customdomains@1","addon:granfatheredcustomemaildomains@1","addon:enterprisefee@1","addon:growthplan@1","plan:free@1"],t.isBillingPlanKey=e=>!!t.BILLING_PLAN_KEYS.find(t=>t===e)},3386:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isFeatureKey=t.FEATURE_KEYS=void 0,t.FEATURE_KEYS=["feature:adminportal","feature:adminportal:custombranding","feature:adminportal:dns","feature:auditlogs","feature:auditlogs:retention:30day","feature:auditlogs:retention:90day","feature:auditlogs:retention:365day","feature:auditlogs:streams","feature:audittrail","feature:billing:invoice","feature:connections:dsync","feature:connections:magiclink","feature:connections:all","feature:connections:oauth","feature:connections:sso","feature:customdomains:monthly","feature:customemaildomains:monthly","feature:dashboard:dsync","feature:dashboard:mfa","feature:dashboard:sso","feature:dns:api:alias","feature:dns:google:oauth:domain","feature:enterprisefee:monthly","feature:environments:multiple","feature:compliance:soc2","feature:role:admin","feature:role:member","feature:role:support","feature:support:email","feature:support:enterprise","feature:support:slack","feature:growthplan:monthly"],t.isFeatureKey=e=>!!t.FEATURE_KEYS.find(t=>t===e)},84659:function(e,t,r){var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},a=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),a(r(3386),t),a(r(68273),t)},72360:function(e,t,r){r.d(t,{O:function(){return n}});var n={};r.r(n),r.d(n,{ck:function(){return p},fC:function(){return f},Z0:function(){return b},g7:function(){return m}});var a=r(75965),o=r(60031),i=r(91710),u=r(99719),l=r(95716);let c=i.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,a.jsx)(o.xv,{ref:t,"aria-hidden":"true",size:"2",style:{userSelect:"none",color:"var(--gray-a7)"},...n,children:"/"})});c.displayName="BreadcrumbsSeparator";let s=i.forwardRef((e,t)=>{let{children:r,active:n,href:i="",...u}=e;return(0,a.jsx)("div",{ref:t,style:n?void 0:{flexShrink:1,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},children:n?(0,a.jsx)(o.xv,{color:"gray",size:"2",...u,children:r}):(0,a.jsx)(l.r,{href:i,size:"2",...u,children:r})})});s.displayName="BreadcrumbsItem";let d=i.forwardRef((e,t)=>{let{children:r,...n}=e,[l,c]=i.useState(null);return(i.useEffect(()=>{c(document.querySelector("[data-breadcrumb-slot]"))},[]),l)?(0,u.createPortal)((0,a.jsx)(o.kC,{ref:t,asChild:!0,align:"center","aria-label":"Breadcrumbs",gap:"2",...n,children:(0,a.jsx)("nav",{style:{flexShrink:1,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},children:r})}),l):null});d.displayName="BreadcrumbsRoot";let f=d,m=e=>{let{children:t}=e;return(0,a.jsx)(o.xu,{asChild:!0,"data-breadcrumb-slot":"",children:t})},p=s,b=c},95716:function(e,t,r){r.d(t,{r:function(){return i}});var n=r(75965),a=r(60031),o=r(52642);let i=r(91710).forwardRef((e,t)=>{let{href:r,...i}=e;return(0,n.jsx)(o.default,{ref:t,legacyBehavior:!0,passHref:!0,prefetch:!0,href:r,children:(0,n.jsx)(a.rU,{...i})})});i.displayName="Link"},65971:function(e,t,r){r.d(t,{A:function(){return a}});var n=r(34406);let a=e=>!!(0,n.Vb)()[e]},84114:function(e,t,r){r.r(t),r.d(t,{AuthContext:function(){return l},AuthProvider:function(){return c},useAuth:function(){return s}});var n=r(75965),a=r(70135),o=r(91710),i=r(376),u=r(89352);let l=o.createContext(null),c=e=>{let{children:t,user:r,currentTeam:c}=e,[s,d]=o.useState(r),[f,m]=o.useState(c);return o.useEffect(()=>{var e;let t=window.matchMedia("(prefers-color-scheme: dark)").matches;u.c.identify(s.id,{email:s.email,theme:t?"dark":"light"}),a.v.setUser({userId:s.id,userRole:null===(e=s.users_teams[0])||void 0===e?void 0:e.role,email:s.email,name:"".concat(s.firstName," ").concat(s.lastName),teamId:f.id,teamName:f.name}),(0,i.C)(s)},[s,f]),(0,n.jsx)(l.Provider,{value:{user:s,setUser:d,currentTeam:f,setCurrentTeam:m},children:t})};function s(){let e=o.useContext(l);if(!e)throw TypeError("`useAuth` must be called from within an `AuthProvider`");return e}},41620:function(e,t,r){r.r(t),r.d(t,{BillableFeatureGateContext:function(){return m},BillableFeatureGateProvider:function(){return p},useTeamHasFeature:function(){return v}});var n=r(75965),a=r(20625),o=r(91710),i=r(65971),u=r(84114),l=r(30468);let c="plan:free@1",s=a.BILLING_PLANS[c];if(!(null==s?void 0:s.features))throw Error("Invalid Free Billing Plan id: ".concat(c));let d=new Set(Object.keys(s.features)),f=["feature:adminportal","feature:adminportal:custombranding","feature:connections:dsync","feature:connections:magiclink","feature:connections:oauth","feature:connections:sso"],m=o.createContext(null),p=e=>{var t;let{children:r}=e,{currentTeam:a}=(0,u.useAuth)(),{currentEnvironment:o}=(0,l.useCurrentEnvironment)(),i=null!==(t=a.entitlements.map(e=>{let{featureId:t}=e;return t}))&&void 0!==t?t:[];return o.sandbox&&i.push(...f),(0,n.jsx)(m.Provider,{value:{features:new Set(i)},children:r})},b=()=>{let e=o.useContext(m);if(!e)throw Error("`useBillableFeatureGate` must be used from within a `BillableFeatureGateProvider`");return e},v=e=>{let{features:t}=b(),r={"feature:dashboard:dsync":(0,i.A)("directory-sync-in-dashboard")}[e];return d.has(e)||t.has(e)||null!=r&&r}},30468:function(e,t,r){r.r(t),r.d(t,{CurrentEnvironmentContext:function(){return d},CurrentEnvironmentProvider:function(){return b},useCurrentEnvironment:function(){return v}});var n=r(75965),a=r(77058),o=r(91710),i=r(99719),u=r(14097),l=r(84114);let c=["/onboarding","/get-started","/signin","/settings","/branding","/signup","/domains"],s=e=>c.some(t=>e.startsWith(t)),d=o.createContext(null),f=/^(\/environment_\w+\/([^\/]+))\//,m=(e,t)=>{let r=e.match(f);if(r&&r.length>1){let e=r[1],n=r[2],a=n&&({"directory-sync":"/".concat(t,"/organizations"),sso:"/".concat(t,"/organizations")})[n]||e;return null==a?void 0:a.replace(/(environment_\w+)\//,"".concat(t,"/"))}},p=["before","after","limit"],b=e=>{let{children:t,currentEnvironment:r,availableEnvironments:c}=e,{currentTeam:f}=(0,l.useAuth)(),b=(0,a.useParams)(),[v,g]=o.useState(r),[y,O]=o.useState(c),h=y.find(e=>{let{id:t}=e;return t===b.environmentId}),_=(0,a.useRouter)(),P=(0,a.usePathname)(),j=(0,a.useSearchParams)(),{mutateAsync:w}=(0,u.ty1)(),E=o.useCallback(async e=>{let t=!e.sandbox&&"Active"!==f.productionState;if((0,i.flushSync)(()=>{g(e)}),w({currentEnvironmentId:e.id,currentProjectID:e.clientId}),t){let e="/get-started";if(P!==e)return _.replace(e)}let r=m(P,e.id);if(r)return _.replace(r);let n=!!b.environmentId,a=new URLSearchParams(j);p.forEach(e=>{a.delete(e)});let o=a.toString(),u=o.length?"?".concat(o):"";if(s(P))return _.replace("".concat(P).concat(u));if(!n)return _.replace("/".concat(e.id).concat(P).concat(u));let l=P.replace(/(environment_\w+)\//,"".concat(e.id,"/"));return _.push("".concat(l).concat(u))},[f.productionState,w,P,b.environmentId,j,_]);return o.useEffect(()=>{h&&v.id!==h.id?(g(h),w({currentEnvironmentId:h.id,currentProjectID:h.clientId})):b.environmentId&&!h&&_.replace("/get-started")},[v.id,h,w,b.environmentId,_]),(0,n.jsx)(d.Provider,{value:{availableEnvironments:y,setAvailableEnvironments:O,currentEnvironment:v,setCurrentEnvironment:E,environmentId:v.id},children:t})};function v(){let e=o.useContext(d);if(!e)throw TypeError("`useCurrentEnvironment` must be called from within an `CurrentEnvironmentProvider`");return e}},376:function(e,t,r){r.d(t,{C:function(){return s},D:function(){return c}});var n=r(38828),a=r(16070),o=r.n(a),i=r(82884),u=r(73056);let l=e=>o().error(e)?e:o().object(e)||o().string(e)?Error(JSON.stringify(e)):Error("Unknown Error"),c=(e,t)=>{let r=l(e);n.Tb(r,e=>((0,i.pipe)(t,u.fromNullable,u.chainNullableK(e=>e.tags),u.match(()=>({}),t=>e.setTags(t))),(0,i.pipe)(t,u.fromNullable,u.chainNullableK(e=>e.breadcrumbs),u.match(()=>[],t=>{for(let r of t)e.addBreadcrumb({message:r.message,data:r.data});return t})),e))},s=e=>{n.av({id:e.id,username:e.name||void 0})}},89352:function(e,t,r){r.d(t,{c:function(){return n}});let n=r(86120).b.load({writeKey:"PgDuFcIpUTMnKFj2r0mPiOJNN97laPzH",cdnURL:"https://".concat("analytics.workos.com")},{integrations:{"Segment.io":{apiHost:"".concat("d2nis22zuf6xa7.cloudfront.net","/v1"),protocol:"https"}}})},42247:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.delay=void 0,t.delay=(e,t)=>new Promise(r=>{let n=setTimeout(r,e);"function"==typeof t&&t(n)})},4355:function(e,t,r){var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},a=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),a(r(42247),t),a(r(24043),t),a(r(99458),t),a(r(99631),t),a(r(94781),t),a(r(45503),t)},24043:function(e,t,r){var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)}(r(81999),t)},81999:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.parseJson=void 0,t.parseJson=e=>n(e)?JSON.parse(e,r):JSON.parse(e);let r=(e,t)=>{if("__proto__"!==e&&"constructor"!==e)return t},n=e=>a.test(e)||o.test(e),a=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,o=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/},99458:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.mapUndefined=void 0,t.mapUndefined=e=>t=>void 0===t?void 0:e(t)},52550:function(e,t,r){var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},a=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.toArray=void 0;let i=o(r(73352)),u=o(r(73056));t.toArray=u.match(()=>[],i.of)},71618:function(e,t,r){var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},a=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),a(r(52550),t),a(r(49032),t)},49032:function(e,t,r){var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},a=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};Object.defineProperty(t,"__esModule",{value:!0}),t.trimAndCoerceEmptyToNull=t.fromTrimmedString=t.fromNullOrBlankString=t.fromBlankString=void 0;let o=r(82884),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return a(t,e),t}(r(73056)),u=r(55675),l=r(61905);t.fromBlankString=i.fromPredicate((0,u.not)(l.isBlank)),t.fromNullOrBlankString=(0,o.flow)(i.fromNullable,i.chain(t.fromBlankString)),t.fromTrimmedString=(0,o.flow)(e=>e.trim(),i.fromPredicate(e=>!!e)),t.trimAndCoerceEmptyToNull=i.map(e=>(null==e?void 0:e.trim())||null)},61905:function(e,t,r){var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)}(r(56245),t)},56245:function(e,t,r){var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},a=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};Object.defineProperty(t,"__esModule",{value:!0}),t.trimCharsRight=t.trimCharsLeft=t.isBlank=void 0;let o=r(82884),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return a(t,e),t}(r(23191));t.isBlank=e=>(0,o.pipe)(e.trim(),i.isEmpty),t.trimCharsLeft=e=>t=>e&&t.startsWith(e)?t.slice(e.length):t,t.trimCharsRight=e=>t=>e&&t.endsWith(e)?t.slice(0,-e.length):t},99631:function(e,t,r){var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},a=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return a(t,e),t},i=function(e,t,r,n){return new(r||(r=Promise))(function(a,o){function i(e){try{l(n.next(e))}catch(e){o(e)}}function u(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(i,u)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.tryWithTimeoutOrThrow=t.throwTryWithTimeoutError=t.TimeoutException=t.tryWithTimeout=void 0;let u=o(r(92827)),l=r(82884),c=o(r(28023)),s=r(42247),d=r(45503);t.tryWithTimeout=(e,t)=>{let{timeoutInMs:r}=t;return i(void 0,void 0,void 0,function*(){let t;let n=yield Promise.race([(0,l.pipe)(c.tryCatch(e,l.identity),c.map(e=>({tag:"Completed",value:e})))(),(0,l.pipe)(c.tryCatch(()=>(0,s.delay)(r,e=>{t=e}),l.identity),c.map(()=>({tag:"TimedOut"})))()]);if(clearTimeout(t),u.isLeft(n))return u.left({tag:"Error",error:n.left});switch(n.right.tag){case"Completed":return u.right(n.right.value);case"TimedOut":return u.left({tag:"TimedOut",timeoutInMs:r});default:return(0,d.unreachable)(n.right)}})};class f extends Error{constructor(e){super("Operation timed out after ".concat(e,"ms.")),this.timeoutInMs=e,this.name="TimeoutException"}}t.TimeoutException=f,t.throwTryWithTimeoutError=e=>{switch(e.tag){case"TimedOut":throw new f(e.timeoutInMs);case"Error":{let{error:t}=e;if(t instanceof Error)throw t;throw Error("Expected an error to be thrown, but received '".concat(t,"'."))}default:return(0,d.unreachable)(e)}},t.tryWithTimeoutOrThrow=(e,r)=>{let{timeoutInMs:n}=r;return i(void 0,void 0,void 0,function*(){let r=yield(0,t.tryWithTimeout)(e,{timeoutInMs:n});return u.isLeft(r)?(0,t.throwTryWithTimeoutError)(r.left):r.right})}},78426:function(e,t,r){var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},a=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};Object.defineProperty(t,"__esModule",{value:!0}),t.parseEmailOrThrow=t.parseEmail=void 0;let o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return a(t,e),t}(r(73056)),i=r(82884),u=r(53922),l=r(65695),c=r(73412);t.parseEmail=(0,i.flow)(c.toTrimmedString,l.toLowercasedString,u.parseNonBlankString,o.chain(e=>(0,i.pipe)(e,o.fromPredicate(e=>{let[t,r,n]=e.split("@");return!!(null==t?void 0:t.trim())&&!!(null==r?void 0:r.trim())&&!n}),o.map(e=>e)))),t.parseEmailOrThrow=e=>{let r=(0,t.parseEmail)(e);if(o.isNone(r))throw TypeError("Value is not a valid normalized email.");return r.value}},94781:function(e,t,r){var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},a=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),a(r(78426),t),a(r(65695),t),a(r(53922),t),a(r(75769),t),a(r(4356),t),a(r(73412),t)},65695:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.toLowercasedString=void 0,t.toLowercasedString=e=>e.toLowerCase()},53922:function(e,t,r){var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},a=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};Object.defineProperty(t,"__esModule",{value:!0}),t.parseNonBlankStringOrThrow=t.parseNonBlankString=void 0;let o=r(82884),i=r(71618),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return a(t,e),t}(r(73056));t.parseNonBlankString=e=>(0,o.pipe)(e,i.fromBlankString,u.map(e=>e)),t.parseNonBlankStringOrThrow=e=>{let r=(0,t.parseNonBlankString)(e);if(u.isNone(r))throw TypeError("Value is not a non-blank string.");return r.value}},75769:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},4356:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},73412:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.toTrimmedString=void 0,t.toTrimmedString=e=>e.trim()},45503:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.unreachable=void 0,t.unreachable=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Entered unreachable code. Received '".concat(e,"'.");throw TypeError(t)}}}]);