@authhero/widget 0.6.1 → 0.6.2
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/dist/authhero-widget/authhero-widget.esm.js +1 -1
- package/dist/authhero-widget/index.esm.js +1 -1
- package/dist/authhero-widget/{p-fa60ab6e.entry.js → p-21535878.entry.js} +1 -1
- package/dist/authhero-widget/{p-7989dabd.entry.js → p-7ee9b91f.entry.js} +1 -1
- package/dist/cjs/authhero-node.cjs.entry.js +1 -1
- package/dist/cjs/authhero-widget.cjs.entry.js +1 -1
- package/dist/cjs/authhero-widget.cjs.js +2 -2
- package/dist/cjs/{index-Db4bZu99.js → index-CFDpaA1R.js} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/components/authhero-node.js +1 -1
- package/dist/components/authhero-widget.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/{p-uIy4ySa4.js → p-03Jc7wx1.js} +1 -1
- package/dist/esm/authhero-node.entry.js +1 -1
- package/dist/esm/authhero-widget.entry.js +1 -1
- package/dist/esm/authhero-widget.js +3 -3
- package/dist/esm/{index-bMtPc5Dm.js → index-DKg5ozw7.js} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/types/stencil-public-runtime.d.ts +1 -1
- package/hydrate/index.js +8327 -8332
- package/hydrate/index.mjs +8327 -8332
- package/package.json +2 -2
- /package/dist/authhero-widget/{p-bMtPc5Dm.js → p-DKg5ozw7.js} +0 -0
- /package/dist/components/{p-pupmqprs.js → p-JzMtjMQb.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,g as i,h as r}from"./p-bMtPc5Dm.js";function s(t,e){if(void 0!==e)return`${e}px`;switch(t){case"pill":return"9999px";case"rounded":return"8px";case"sharp":return"0";default:return}}function a(t){if(!t)return{};const e={};if(t.colors?.primary&&(e["--ah-color-primary"]=t.colors.primary,e["--ah-color-primary-hover"]=t.colors.primary),t.colors?.page_background){const i=t.colors.page_background;"solid"===i.type&&i.start?e["--ah-page-bg"]=i.start:"gradient"===i.type&&i.start&&i.end&&(e["--ah-page-bg"]=`linear-gradient(${i.angle_deg??180}deg, ${i.start}, ${i.end})`)}return t.logo_url&&(e["--ah-logo-url"]=`url(${t.logo_url})`),t.font?.url&&(e["--ah-font-url"]=t.font.url),e}function o(t){if(!t)return{};const e={};if(t.borders){const i=t.borders;void 0!==i.widget_corner_radius&&(e["--ah-widget-radius"]=`${i.widget_corner_radius}px`),void 0!==i.widget_border_weight&&(e["--ah-widget-border-width"]=`${i.widget_border_weight}px`),!1===i.show_widget_shadow&&(e["--ah-widget-shadow"]="none");const r=s(i.buttons_style,i.button_border_radius);r&&(e["--ah-btn-radius"]=r),void 0!==i.button_border_weight&&(e["--ah-btn-border-width"]=`${i.button_border_weight}px`);const a=s(i.inputs_style,i.input_border_radius);a&&(e["--ah-input-radius"]=a),void 0!==i.input_border_weight&&(e["--ah-input-border-width"]=`${i.input_border_weight}px`)}if(t.colors){const i=t.colors;i.primary_button&&(e["--ah-color-primary"]=i.primary_button,e["--ah-color-primary-hover"]=i.primary_button),i.primary_button_label&&(e["--ah-btn-primary-text"]=i.primary_button_label),i.secondary_button_border&&(e["--ah-btn-secondary-border"]=i.secondary_button_border),i.secondary_button_label&&(e["--ah-btn-secondary-text"]=i.secondary_button_label),i.body_text&&(e["--ah-color-text"]=i.body_text),i.header&&(e["--ah-color-text-header"]=i.header),i.input_labels_placeholders&&(e["--ah-color-text-label"]=i.input_labels_placeholders,e["--ah-color-text-muted"]=i.input_labels_placeholders),i.input_filled_text&&(e["--ah-color-input-text"]=i.input_filled_text),i.widget_background&&(e["--ah-color-bg"]=i.widget_background),i.input_background&&(e["--ah-color-input-bg"]=i.input_background),i.widget_border&&(e["--ah-widget-border-color"]=i.widget_border),i.input_border&&(e["--ah-color-border"]=i.input_border),i.links_focused_components&&(e["--ah-color-link"]=i.links_focused_components),i.base_focus_color&&(e["--ah-color-focus-ring"]=i.base_focus_color),i.base_hover_color&&(e["--ah-color-primary-hover"]=i.base_hover_color),i.error&&(e["--ah-color-error"]=i.error),i.success&&(e["--ah-color-success"]=i.success),i.icons&&(e["--ah-color-icon"]=i.icons)}if(t.fonts){const i=t.fonts,r=i.reference_text_size||16;if(i.font_url&&(e["--ah-font-url"]=i.font_url),i.reference_text_size&&(e["--ah-font-size-base"]=`${i.reference_text_size}px`),i.title?.size){const t=Math.round(i.title.size/100*r);e["--ah-font-size-title"]=`${t}px`}if(i.subtitle?.size){const t=Math.round(i.subtitle.size/100*r);e["--ah-font-size-subtitle"]=`${t}px`}if(i.body_text?.size){const t=Math.round(i.body_text.size/100*r);e["--ah-font-size-body"]=`${t}px`}if(i.input_labels?.size){const t=Math.round(i.input_labels.size/100*r);e["--ah-font-size-label"]=`${t}px`}if(i.buttons_text?.size){const t=Math.round(i.buttons_text.size/100*r);e["--ah-font-size-btn"]=`${t}px`}if(i.links?.size){const t=Math.round(i.links.size/100*r);e["--ah-font-size-link"]=`${t}px`}"underlined"===i.links_style&&(e["--ah-link-decoration"]="underline"),void 0!==i.title?.bold&&(e["--ah-font-weight-title"]=i.title.bold?"700":"400"),void 0!==i.subtitle?.bold&&(e["--ah-font-weight-subtitle"]=i.subtitle.bold?"700":"400"),void 0!==i.body_text?.bold&&(e["--ah-font-weight-body"]=i.body_text.bold?"700":"400"),void 0!==i.input_labels?.bold&&(e["--ah-font-weight-label"]=i.input_labels.bold?"700":"400"),void 0!==i.buttons_text?.bold&&(e["--ah-font-weight-btn"]=i.buttons_text.bold?"600":"400"),void 0!==i.links?.bold&&(e["--ah-font-weight-link"]=i.links.bold?"700":"400")}if(t.widget){const i=t.widget;if(i.header_text_alignment&&(e["--ah-title-align"]=i.header_text_alignment),i.logo_height&&(e["--ah-logo-height"]=`${i.logo_height}px`),i.logo_position){const t={center:"center",left:"flex-start",right:"flex-end"};"none"===i.logo_position?e["--ah-logo-display"]="none":e["--ah-logo-align"]=t[i.logo_position]??"center"}i.social_buttons_layout&&("top"===i.social_buttons_layout?(e["--ah-social-order"]="0",e["--ah-divider-order"]="1",e["--ah-fields-order"]="2"):(e["--ah-social-order"]="2",e["--ah-divider-order"]="1",e["--ah-fields-order"]="0"))}if(t.page_background){const i=t.page_background;i.background_color&&(e["--ah-page-bg"]=i.background_color),i.background_image_url&&(e["--ah-page-bg-image"]=`url(${i.background_image_url})`)}return e}const n=class{constructor(i){t(this,i),this.formSubmit=e(this,"formSubmit"),this.buttonClick=e(this,"buttonClick"),this.linkClick=e(this,"linkClick"),this.navigate=e(this,"navigate"),this.flowComplete=e(this,"flowComplete"),this.flowError=e(this,"flowError"),this.screenChange=e(this,"screenChange")}get el(){return i(this)}screen;apiUrl;branding;theme;loading=!1;autoSubmit=!1;_screen;_branding;_theme;formData={};formSubmit;buttonClick;linkClick;navigate;flowComplete;flowError;screenChange;watchScreen(t){if("string"==typeof t)try{this._screen=JSON.parse(t)}catch{console.error("Failed to parse screen JSON")}else this._screen=t;this._screen&&this.screenChange.emit(this._screen)}watchBranding(t){if("string"==typeof t)try{this._branding=JSON.parse(t)}catch{console.error("Failed to parse branding JSON")}else this._branding=t;this.applyThemeStyles()}watchTheme(t){if("string"==typeof t)try{this._theme=JSON.parse(t)}catch{console.error("Failed to parse theme JSON")}else this._theme=t;this.applyThemeStyles()}applyThemeStyles(){const t=(e=this._theme,{...a(this._branding),...o(e)});var e;!function(t,e){Object.entries(e).forEach((([e,i])=>{t.style.setProperty(e,i)}))}(this.el,t)}async componentWillLoad(){this.watchScreen(this.screen),this.watchBranding(this.branding),this.watchTheme(this.theme),this.apiUrl&&!this._screen&&await this.fetchScreen()}async fetchScreen(){if(this.apiUrl){this.loading=!0;try{const t=await fetch(this.apiUrl,{credentials:"include",headers:{Accept:"application/json"}});t.ok&&(this._screen=await t.json(),this._screen&&this.screenChange.emit(this._screen))}catch(t){console.error("Failed to fetch screen:",t)}finally{this.loading=!1}}}handleInputChange=(t,e)=>{this.formData={...this.formData,[t]:e}};handleSubmit=async t=>{if(t.preventDefault(),this._screen&&(this.formSubmit.emit({screen:this._screen,data:this.formData}),this.autoSubmit)){this.loading=!0;try{const t=await fetch(this._screen.action,{method:this._screen.method,credentials:"include",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({data:this.formData})}),e=t.headers.get("content-type");if(e?.includes("application/json")){const e=await t.json();e.redirect?(this.flowComplete.emit({redirectUrl:e.redirect}),this.navigate.emit({url:e.redirect})):e.screen?(this._screen=e.screen,this.formData={},this.screenChange.emit(e.screen),e.branding&&(this._branding=e.branding,this.applyThemeStyles())):e.complete&&this.flowComplete.emit({}),!t.ok&&e.screen&&(this._screen=e.screen,this.screenChange.emit(e.screen))}}catch(t){console.error("Form submission failed:",t),this.flowError.emit({message:t instanceof Error?t.message:"Form submission failed"})}finally{this.loading=!1}}};handleButtonClick=t=>{"submit"!==t.type?this.buttonClick.emit(t):this.handleSubmit({preventDefault:()=>{}})};handleLinkClick=(t,e)=>{this.linkClick.emit({id:e.id,href:e.href,text:e.text}),this.autoSubmit||t.preventDefault()};getScreenErrors(){return this._screen?.messages?.filter((t=>"error"===t.type))||[]}getScreenSuccesses(){return this._screen?.messages?.filter((t=>"success"===t.type))||[]}getOrderedComponents(){return this._screen?[...this._screen.components].filter((t=>!1!==t.visible)).sort(((t,e)=>(t.order??0)-(e.order??0))):[]}isSocialComponent(t){return"SOCIAL"===t.type}isDividerComponent(t){return"DIVIDER"===t.type}render(){if(this.loading&&!this._screen)return r("div",{class:"widget-container"},r("div",{class:"loading-spinner"}));if(!this._screen)return r("div",{class:"widget-container"},r("div",{class:"error-message"},"No screen configuration provided"));const t=this.getScreenErrors(),e=this.getScreenSuccesses(),i=this.getOrderedComponents(),s=i.filter((t=>this.isSocialComponent(t))),a=i.filter((t=>!this.isSocialComponent(t)&&!this.isDividerComponent(t))),o=i.some((t=>this.isDividerComponent(t))),n=this._theme?.widget?.logo_url||this._branding?.logo_url;return r("div",{class:"widget-container",part:"container"},r("header",{class:"widget-header",part:"header"},n&&r("div",{class:"logo-wrapper",part:"logo-wrapper"},r("img",{class:"logo",part:"logo",src:n,alt:"Logo"})),this._screen.title&&r("h1",{class:"title",part:"title"},this._screen.title),this._screen.description&&r("p",{class:"description",part:"description"},this._screen.description)),r("div",{class:"widget-body",part:"body"},t.map((t=>r("div",{class:"message message-error",part:"message message-error",key:t.id??t.text},t.text))),e.map((t=>r("div",{class:"message message-success",part:"message message-success",key:t.id??t.text},t.text))),r("form",{onSubmit:this.handleSubmit,part:"form"},r("div",{class:"form-content"},s.length>0&&r("div",{class:"social-section",part:"social-section"},s.map((t=>r("authhero-node",{key:t.id,component:t,value:this.formData[t.id],onFieldChange:t=>this.handleInputChange(t.detail.id,t.detail.value),onButtonClick:t=>this.handleButtonClick(t.detail),disabled:this.loading})))),s.length>0&&a.length>0&&o&&r("div",{class:"divider",part:"divider"},r("span",{class:"divider-text"},"Or")),r("div",{class:"fields-section",part:"fields-section"},a.map((t=>r("authhero-node",{key:t.id,component:t,value:this.formData[t.id],onFieldChange:t=>this.handleInputChange(t.detail.id,t.detail.value),onButtonClick:t=>this.handleButtonClick(t.detail),disabled:this.loading})))))),this._screen.links&&this._screen.links.length>0&&r("div",{class:"links",part:"links"},this._screen.links.map((t=>r("span",{class:"link-wrapper",part:"link-wrapper",key:t.id??t.href},t.linkText?r("span",null,t.text," ",r("a",{href:t.href,class:"link",part:"link",onClick:e=>this.handleLinkClick(e,{id:t.id,href:t.href,text:t.linkText||t.text})},t.linkText)):r("a",{href:t.href,class:"link",part:"link",onClick:e=>this.handleLinkClick(e,{id:t.id,href:t.href,text:t.text})},t.text)))))))}static get watchers(){return{screen:[{watchScreen:0}],branding:[{watchBranding:0}],theme:[{watchTheme:0}]}}};n.style=":host{display:block;font-family:var(--ah-font-family, 'ulp-font', -apple-system, BlinkMacSystemFont, Roboto, Helvetica, sans-serif);font-size:var(--ah-font-size-base, 14px);line-height:var(--ah-line-height-base, 1.5);color:var(--ah-color-text, #1e212a);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.widget-container{max-width:var(--ah-widget-max-width, 400px);width:100%;margin:0 auto;background-color:var(--ah-color-bg, #ffffff);border-radius:var(--ah-widget-radius, 5px);box-shadow:var(--ah-widget-shadow, 0 4px 22px 0 rgba(0, 0, 0, 0.11));box-sizing:border-box}.widget-header{padding:var(--ah-header-padding, 40px 40px 24px)}.widget-body{padding:var(--ah-body-padding, 0 40px 40px)}.logo-wrapper{display:var(--ah-logo-display, flex);justify-content:var(--ah-logo-align, center)}.logo{display:block;height:var(--ah-logo-height, 52px);max-width:100%;width:auto;object-fit:contain}.title{font-size:var(--ah-font-size-title, 24px);font-weight:var(--ah-font-weight-title, 700);text-align:var(--ah-title-align, center);margin:var(--ah-title-margin, 24px 0 16px);color:var(--ah-color-header, #1e212a);line-height:1.2}.description{font-size:var(--ah-font-size-description, 14px);text-align:var(--ah-title-align, center);margin:var(--ah-description-margin, 0);color:var(--ah-color-text, #1e212a);line-height:1.5}.message{padding:12px 16px;border-radius:4px;margin-bottom:16px;font-size:14px;line-height:1.5}.message-error{background-color:var(--ah-color-error-bg, #ffeaea);color:var(--ah-color-error, #d03c38);border-left:3px solid var(--ah-color-error, #d03c38)}.message-success{background-color:var(--ah-color-success-bg, #e6f9f1);color:var(--ah-color-success, #13a769);border-left:3px solid var(--ah-color-success, #13a769)}form{display:flex;flex-direction:column}.form-content{display:flex;flex-direction:column}.social-section{display:flex;flex-direction:column;gap:8px;order:var(--ah-social-order, 2)}.fields-section{display:flex;flex-direction:column;order:var(--ah-fields-order, 0)}.divider{display:flex;align-items:center;text-align:center;margin:16px 0;order:var(--ah-divider-order, 1)}.divider::before,.divider::after{content:'';flex:1;border-bottom:1px solid var(--ah-color-border-muted, #c9cace)}.divider-text{padding:0 10px;font-size:12px;font-weight:400;color:var(--ah-color-text-muted, #65676e);text-transform:uppercase;letter-spacing:0}.links{display:flex;flex-direction:column;align-items:center;gap:8px;margin-top:16px}.link-wrapper{font-size:14px;color:var(--ah-color-text, #1e212a)}.link{color:var(--ah-color-link, #635dff);text-decoration:var(--ah-link-decoration, none);font-size:14px;font-weight:var(--ah-font-weight-link, 400);transition:color 150ms ease}.link:hover{text-decoration:underline}.link:focus-visible{outline:2px solid var(--ah-color-link, #635dff);outline-offset:2px;border-radius:2px}.loading-spinner{width:32px;height:32px;margin:24px auto;border:3px solid var(--ah-color-border-muted, #e0e1e3);border-top-color:var(--ah-color-primary, #635dff);border-radius:50%;animation:spin 0.8s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.error-message{text-align:center;color:var(--ah-color-error, #d03c38);padding:16px;font-size:14px}";export{n as authhero_widget}
|
|
1
|
+
import{r as t,c as e,g as i,h as r}from"./p-DKg5ozw7.js";function s(t,e){if(void 0!==e)return`${e}px`;switch(t){case"pill":return"9999px";case"rounded":return"8px";case"sharp":return"0";default:return}}function a(t){if(!t)return{};const e={};if(t.colors?.primary&&(e["--ah-color-primary"]=t.colors.primary,e["--ah-color-primary-hover"]=t.colors.primary),t.colors?.page_background){const i=t.colors.page_background;"solid"===i.type&&i.start?e["--ah-page-bg"]=i.start:"gradient"===i.type&&i.start&&i.end&&(e["--ah-page-bg"]=`linear-gradient(${i.angle_deg??180}deg, ${i.start}, ${i.end})`)}return t.logo_url&&(e["--ah-logo-url"]=`url(${t.logo_url})`),t.font?.url&&(e["--ah-font-url"]=t.font.url),e}function o(t){if(!t)return{};const e={};if(t.borders){const i=t.borders;void 0!==i.widget_corner_radius&&(e["--ah-widget-radius"]=`${i.widget_corner_radius}px`),void 0!==i.widget_border_weight&&(e["--ah-widget-border-width"]=`${i.widget_border_weight}px`),!1===i.show_widget_shadow&&(e["--ah-widget-shadow"]="none");const r=s(i.buttons_style,i.button_border_radius);r&&(e["--ah-btn-radius"]=r),void 0!==i.button_border_weight&&(e["--ah-btn-border-width"]=`${i.button_border_weight}px`);const a=s(i.inputs_style,i.input_border_radius);a&&(e["--ah-input-radius"]=a),void 0!==i.input_border_weight&&(e["--ah-input-border-width"]=`${i.input_border_weight}px`)}if(t.colors){const i=t.colors;i.primary_button&&(e["--ah-color-primary"]=i.primary_button,e["--ah-color-primary-hover"]=i.primary_button),i.primary_button_label&&(e["--ah-btn-primary-text"]=i.primary_button_label),i.secondary_button_border&&(e["--ah-btn-secondary-border"]=i.secondary_button_border),i.secondary_button_label&&(e["--ah-btn-secondary-text"]=i.secondary_button_label),i.body_text&&(e["--ah-color-text"]=i.body_text),i.header&&(e["--ah-color-text-header"]=i.header),i.input_labels_placeholders&&(e["--ah-color-text-label"]=i.input_labels_placeholders,e["--ah-color-text-muted"]=i.input_labels_placeholders),i.input_filled_text&&(e["--ah-color-input-text"]=i.input_filled_text),i.widget_background&&(e["--ah-color-bg"]=i.widget_background),i.input_background&&(e["--ah-color-input-bg"]=i.input_background),i.widget_border&&(e["--ah-widget-border-color"]=i.widget_border),i.input_border&&(e["--ah-color-border"]=i.input_border),i.links_focused_components&&(e["--ah-color-link"]=i.links_focused_components),i.base_focus_color&&(e["--ah-color-focus-ring"]=i.base_focus_color),i.base_hover_color&&(e["--ah-color-primary-hover"]=i.base_hover_color),i.error&&(e["--ah-color-error"]=i.error),i.success&&(e["--ah-color-success"]=i.success),i.icons&&(e["--ah-color-icon"]=i.icons)}if(t.fonts){const i=t.fonts,r=i.reference_text_size||16;if(i.font_url&&(e["--ah-font-url"]=i.font_url),i.reference_text_size&&(e["--ah-font-size-base"]=`${i.reference_text_size}px`),i.title?.size){const t=Math.round(i.title.size/100*r);e["--ah-font-size-title"]=`${t}px`}if(i.subtitle?.size){const t=Math.round(i.subtitle.size/100*r);e["--ah-font-size-subtitle"]=`${t}px`}if(i.body_text?.size){const t=Math.round(i.body_text.size/100*r);e["--ah-font-size-body"]=`${t}px`}if(i.input_labels?.size){const t=Math.round(i.input_labels.size/100*r);e["--ah-font-size-label"]=`${t}px`}if(i.buttons_text?.size){const t=Math.round(i.buttons_text.size/100*r);e["--ah-font-size-btn"]=`${t}px`}if(i.links?.size){const t=Math.round(i.links.size/100*r);e["--ah-font-size-link"]=`${t}px`}"underlined"===i.links_style&&(e["--ah-link-decoration"]="underline"),void 0!==i.title?.bold&&(e["--ah-font-weight-title"]=i.title.bold?"700":"400"),void 0!==i.subtitle?.bold&&(e["--ah-font-weight-subtitle"]=i.subtitle.bold?"700":"400"),void 0!==i.body_text?.bold&&(e["--ah-font-weight-body"]=i.body_text.bold?"700":"400"),void 0!==i.input_labels?.bold&&(e["--ah-font-weight-label"]=i.input_labels.bold?"700":"400"),void 0!==i.buttons_text?.bold&&(e["--ah-font-weight-btn"]=i.buttons_text.bold?"600":"400"),void 0!==i.links?.bold&&(e["--ah-font-weight-link"]=i.links.bold?"700":"400")}if(t.widget){const i=t.widget;if(i.header_text_alignment&&(e["--ah-title-align"]=i.header_text_alignment),i.logo_height&&(e["--ah-logo-height"]=`${i.logo_height}px`),i.logo_position){const t={center:"center",left:"flex-start",right:"flex-end"};"none"===i.logo_position?e["--ah-logo-display"]="none":e["--ah-logo-align"]=t[i.logo_position]??"center"}i.social_buttons_layout&&("top"===i.social_buttons_layout?(e["--ah-social-order"]="0",e["--ah-divider-order"]="1",e["--ah-fields-order"]="2"):(e["--ah-social-order"]="2",e["--ah-divider-order"]="1",e["--ah-fields-order"]="0"))}if(t.page_background){const i=t.page_background;i.background_color&&(e["--ah-page-bg"]=i.background_color),i.background_image_url&&(e["--ah-page-bg-image"]=`url(${i.background_image_url})`)}return e}const n=class{constructor(i){t(this,i),this.formSubmit=e(this,"formSubmit"),this.buttonClick=e(this,"buttonClick"),this.linkClick=e(this,"linkClick"),this.navigate=e(this,"navigate"),this.flowComplete=e(this,"flowComplete"),this.flowError=e(this,"flowError"),this.screenChange=e(this,"screenChange")}get el(){return i(this)}screen;apiUrl;branding;theme;loading=!1;autoSubmit=!1;_screen;_branding;_theme;formData={};formSubmit;buttonClick;linkClick;navigate;flowComplete;flowError;screenChange;watchScreen(t){if("string"==typeof t)try{this._screen=JSON.parse(t)}catch{console.error("Failed to parse screen JSON")}else this._screen=t;this._screen&&this.screenChange.emit(this._screen)}watchBranding(t){if("string"==typeof t)try{this._branding=JSON.parse(t)}catch{console.error("Failed to parse branding JSON")}else this._branding=t;this.applyThemeStyles()}watchTheme(t){if("string"==typeof t)try{this._theme=JSON.parse(t)}catch{console.error("Failed to parse theme JSON")}else this._theme=t;this.applyThemeStyles()}applyThemeStyles(){const t=(e=this._theme,{...a(this._branding),...o(e)});var e;!function(t,e){Object.entries(e).forEach((([e,i])=>{t.style.setProperty(e,i)}))}(this.el,t)}async componentWillLoad(){this.watchScreen(this.screen),this.watchBranding(this.branding),this.watchTheme(this.theme),this.apiUrl&&!this._screen&&await this.fetchScreen()}async fetchScreen(){if(this.apiUrl){this.loading=!0;try{const t=await fetch(this.apiUrl,{credentials:"include",headers:{Accept:"application/json"}});t.ok&&(this._screen=await t.json(),this._screen&&this.screenChange.emit(this._screen))}catch(t){console.error("Failed to fetch screen:",t)}finally{this.loading=!1}}}handleInputChange=(t,e)=>{this.formData={...this.formData,[t]:e}};handleSubmit=async t=>{if(t.preventDefault(),this._screen&&(this.formSubmit.emit({screen:this._screen,data:this.formData}),this.autoSubmit)){this.loading=!0;try{const t=await fetch(this._screen.action,{method:this._screen.method,credentials:"include",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({data:this.formData})}),e=t.headers.get("content-type");if(e?.includes("application/json")){const e=await t.json();e.redirect?(this.flowComplete.emit({redirectUrl:e.redirect}),this.navigate.emit({url:e.redirect})):e.screen?(this._screen=e.screen,this.formData={},this.screenChange.emit(e.screen),e.branding&&(this._branding=e.branding,this.applyThemeStyles())):e.complete&&this.flowComplete.emit({}),!t.ok&&e.screen&&(this._screen=e.screen,this.screenChange.emit(e.screen))}}catch(t){console.error("Form submission failed:",t),this.flowError.emit({message:t instanceof Error?t.message:"Form submission failed"})}finally{this.loading=!1}}};handleButtonClick=t=>{"submit"!==t.type?this.buttonClick.emit(t):this.handleSubmit({preventDefault:()=>{}})};handleLinkClick=(t,e)=>{this.linkClick.emit({id:e.id,href:e.href,text:e.text}),this.autoSubmit||t.preventDefault()};getScreenErrors(){return this._screen?.messages?.filter((t=>"error"===t.type))||[]}getScreenSuccesses(){return this._screen?.messages?.filter((t=>"success"===t.type))||[]}getOrderedComponents(){return this._screen?[...this._screen.components].filter((t=>!1!==t.visible)).sort(((t,e)=>(t.order??0)-(e.order??0))):[]}isSocialComponent(t){return"SOCIAL"===t.type}isDividerComponent(t){return"DIVIDER"===t.type}render(){if(this.loading&&!this._screen)return r("div",{class:"widget-container"},r("div",{class:"loading-spinner"}));if(!this._screen)return r("div",{class:"widget-container"},r("div",{class:"error-message"},"No screen configuration provided"));const t=this.getScreenErrors(),e=this.getScreenSuccesses(),i=this.getOrderedComponents(),s=i.filter((t=>this.isSocialComponent(t))),a=i.filter((t=>!this.isSocialComponent(t)&&!this.isDividerComponent(t))),o=i.some((t=>this.isDividerComponent(t))),n=this._theme?.widget?.logo_url||this._branding?.logo_url;return r("div",{class:"widget-container",part:"container"},r("header",{class:"widget-header",part:"header"},n&&r("div",{class:"logo-wrapper",part:"logo-wrapper"},r("img",{class:"logo",part:"logo",src:n,alt:"Logo"})),this._screen.title&&r("h1",{class:"title",part:"title"},this._screen.title),this._screen.description&&r("p",{class:"description",part:"description"},this._screen.description)),r("div",{class:"widget-body",part:"body"},t.map((t=>r("div",{class:"message message-error",part:"message message-error",key:t.id??t.text},t.text))),e.map((t=>r("div",{class:"message message-success",part:"message message-success",key:t.id??t.text},t.text))),r("form",{onSubmit:this.handleSubmit,part:"form"},r("div",{class:"form-content"},s.length>0&&r("div",{class:"social-section",part:"social-section"},s.map((t=>r("authhero-node",{key:t.id,component:t,value:this.formData[t.id],onFieldChange:t=>this.handleInputChange(t.detail.id,t.detail.value),onButtonClick:t=>this.handleButtonClick(t.detail),disabled:this.loading})))),s.length>0&&a.length>0&&o&&r("div",{class:"divider",part:"divider"},r("span",{class:"divider-text"},"Or")),r("div",{class:"fields-section",part:"fields-section"},a.map((t=>r("authhero-node",{key:t.id,component:t,value:this.formData[t.id],onFieldChange:t=>this.handleInputChange(t.detail.id,t.detail.value),onButtonClick:t=>this.handleButtonClick(t.detail),disabled:this.loading})))))),this._screen.links&&this._screen.links.length>0&&r("div",{class:"links",part:"links"},this._screen.links.map((t=>r("span",{class:"link-wrapper",part:"link-wrapper",key:t.id??t.href},t.linkText?r("span",null,t.text," ",r("a",{href:t.href,class:"link",part:"link",onClick:e=>this.handleLinkClick(e,{id:t.id,href:t.href,text:t.linkText||t.text})},t.linkText)):r("a",{href:t.href,class:"link",part:"link",onClick:e=>this.handleLinkClick(e,{id:t.id,href:t.href,text:t.text})},t.text)))))))}static get watchers(){return{screen:[{watchScreen:0}],branding:[{watchBranding:0}],theme:[{watchTheme:0}]}}};n.style=":host{display:block;font-family:var(--ah-font-family, 'ulp-font', -apple-system, BlinkMacSystemFont, Roboto, Helvetica, sans-serif);font-size:var(--ah-font-size-base, 14px);line-height:var(--ah-line-height-base, 1.5);color:var(--ah-color-text, #1e212a);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.widget-container{max-width:var(--ah-widget-max-width, 400px);width:100%;margin:0 auto;background-color:var(--ah-color-bg, #ffffff);border-radius:var(--ah-widget-radius, 5px);box-shadow:var(--ah-widget-shadow, 0 4px 22px 0 rgba(0, 0, 0, 0.11));box-sizing:border-box}.widget-header{padding:var(--ah-header-padding, 40px 40px 24px)}.widget-body{padding:var(--ah-body-padding, 0 40px 40px)}.logo-wrapper{display:var(--ah-logo-display, flex);justify-content:var(--ah-logo-align, center)}.logo{display:block;height:var(--ah-logo-height, 52px);max-width:100%;width:auto;object-fit:contain}.title{font-size:var(--ah-font-size-title, 24px);font-weight:var(--ah-font-weight-title, 700);text-align:var(--ah-title-align, center);margin:var(--ah-title-margin, 24px 0 16px);color:var(--ah-color-header, #1e212a);line-height:1.2}.description{font-size:var(--ah-font-size-description, 14px);text-align:var(--ah-title-align, center);margin:var(--ah-description-margin, 0);color:var(--ah-color-text, #1e212a);line-height:1.5}.message{padding:12px 16px;border-radius:4px;margin-bottom:16px;font-size:14px;line-height:1.5}.message-error{background-color:var(--ah-color-error-bg, #ffeaea);color:var(--ah-color-error, #d03c38);border-left:3px solid var(--ah-color-error, #d03c38)}.message-success{background-color:var(--ah-color-success-bg, #e6f9f1);color:var(--ah-color-success, #13a769);border-left:3px solid var(--ah-color-success, #13a769)}form{display:flex;flex-direction:column}.form-content{display:flex;flex-direction:column}.social-section{display:flex;flex-direction:column;gap:8px;order:var(--ah-social-order, 2)}.fields-section{display:flex;flex-direction:column;order:var(--ah-fields-order, 0)}.divider{display:flex;align-items:center;text-align:center;margin:16px 0;order:var(--ah-divider-order, 1)}.divider::before,.divider::after{content:'';flex:1;border-bottom:1px solid var(--ah-color-border-muted, #c9cace)}.divider-text{padding:0 10px;font-size:12px;font-weight:400;color:var(--ah-color-text-muted, #65676e);text-transform:uppercase;letter-spacing:0}.links{display:flex;flex-direction:column;align-items:center;gap:8px;margin-top:16px}.link-wrapper{font-size:14px;color:var(--ah-color-text, #1e212a)}.link{color:var(--ah-color-link, #635dff);text-decoration:var(--ah-link-decoration, none);font-size:14px;font-weight:var(--ah-font-weight-link, 400);transition:color 150ms ease}.link:hover{text-decoration:underline}.link:focus-visible{outline:2px solid var(--ah-color-link, #635dff);outline-offset:2px;border-radius:2px}.loading-spinner{width:32px;height:32px;margin:24px auto;border:3px solid var(--ah-color-border-muted, #e0e1e3);border-top-color:var(--ah-color-primary, #635dff);border-radius:50%;animation:spin 0.8s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.error-message{text-align:center;color:var(--ah-color-error, #d03c38);padding:16px;font-size:14px}";export{n as authhero_widget}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,h as r}from"./p-bMtPc5Dm.js";const i=class{constructor(r){t(this,r),this.fieldChange=e(this,"fieldChange"),this.buttonClick=e(this,"buttonClick")}component;value;disabled=!1;passwordVisible=!1;fieldChange;buttonClick;handleInput=t=>{this.fieldChange.emit({id:this.component.id,value:t.target.value})};handleCheckbox=t=>{this.fieldChange.emit({id:this.component.id,value:t.target.checked?"true":"false"})};handleButtonClick=(t,e,r)=>{"submit"!==e&&t.preventDefault(),this.buttonClick.emit({id:this.component.id,type:e,value:r})};togglePasswordVisibility=()=>{this.passwordVisible=!this.passwordVisible};getErrors(){const t=this.component;return t.messages?.filter((t=>"error"===t.type))||[]}renderFloatingLabel(t,e,i,o){return t?r("label",{class:{"input-label":!0,floating:!!o},part:"label",htmlFor:e},t,i&&r("span",{class:"required"},"*")):null}renderLabel(t,e,i){return t?r("label",{class:"input-label",part:"label",htmlFor:e},t,i&&r("span",{class:"required"},"*")):null}renderPasswordToggle(){return this.passwordVisible?r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},r("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"}),r("line",{x1:"1",y1:"1",x2:"23",y2:"23"})):r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},r("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),r("circle",{cx:"12",cy:"12",r:"3"}))}renderErrors(){return this.getErrors().map((t=>r("span",{class:"error-text",part:"error-text",key:t.id??t.text},t.text)))}renderHint(t){return t?r("span",{class:"helper-text",part:"helper-text"},t):null}renderDivider(){return r("hr",{class:"divider",part:"divider"})}renderHtml(t){return r("div",{class:"html-content",part:"html-content",innerHTML:t.config?.content??""})}renderImage(t){const{src:e,alt:i,width:o,height:a}=t.config??{};return e?r("img",{class:"image",part:"image",src:e,alt:i??"",width:o,height:a,loading:"lazy"}):null}renderRichText(t){return r("div",{class:"rich-text",part:"rich-text",innerHTML:t.config?.content??""})}renderNextButton(t){return r("button",{type:"submit",class:"btn btn-primary",part:"button button-primary",disabled:this.disabled,onClick:t=>this.handleButtonClick(t,"submit","next")},t.config.text??"Continue")}renderPreviousButton(t){return r("button",{type:"button",class:"btn btn-secondary",part:"button button-secondary",disabled:this.disabled,onClick:t=>this.handleButtonClick(t,"previous","back")},t.config.text??"Back")}renderJumpButton(t){return r("button",{type:"button",class:"btn btn-link",part:"button button-link",disabled:this.disabled,onClick:e=>this.handleButtonClick(e,"jump",t.config.target_step)},t.config.text??"Go")}renderResendButton(t){return r("button",{type:"button",class:"btn btn-link",part:"button button-link",disabled:this.disabled,onClick:e=>this.handleButtonClick(e,"resend",t.config.resend_action)},t.config.text??"Resend")}renderTextField(t){const e=`input-${t.id}`,i=this.getErrors(),{multiline:o,max_length:a}=t.config??{},n=!!(this.value&&this.value.length>0);return o?r("div",{class:"input-wrapper",part:"input-wrapper"},this.renderLabel(t.label,e,t.required),r("textarea",{id:e,class:{"input-field":!0,"has-error":i.length>0},part:"input textarea",name:t.id,placeholder:" ",required:t.required,disabled:this.disabled,maxLength:a,onInput:this.handleInput},this.value??""),this.renderErrors(),0===i.length&&this.renderHint(t.hint)):r("div",{class:"input-wrapper",part:"input-wrapper"},r("div",{class:"input-container"},r("input",{id:e,class:{"input-field":!0,"has-error":i.length>0},part:"input",type:t.sensitive?"password":"text",name:t.id,value:this.value??"",placeholder:" ",required:t.required,disabled:this.disabled,maxLength:a,onInput:this.handleInput}),this.renderFloatingLabel(t.label,e,t.required,n)),this.renderErrors(),0===i.length&&this.renderHint(t.hint))}renderEmailField(t){const e=`input-${t.id}`,i=this.getErrors(),o=!!(this.value&&this.value.length>0);return r("div",{class:"input-wrapper",part:"input-wrapper"},r("div",{class:"input-container"},r("input",{id:e,class:{"input-field":!0,"has-error":i.length>0},part:"input",type:"email",name:t.id,value:this.value??"",placeholder:" ",required:t.required,disabled:this.disabled,autocomplete:"email",onInput:this.handleInput}),this.renderFloatingLabel(t.label,e,t.required,o)),this.renderErrors(),0===i.length&&this.renderHint(t.hint))}renderPasswordField(t){const e=`input-${t.id}`,i=this.getErrors(),o=!!(this.value&&this.value.length>0),a=t.config?.forgot_password_link;return r("div",{class:"input-wrapper",part:"input-wrapper"},r("div",{class:"input-container password-container"},r("input",{id:e,class:{"input-field":!0,"has-error":i.length>0},part:"input",type:this.passwordVisible?"text":"password",name:t.id,value:this.value??"",placeholder:" ",required:t.required,disabled:this.disabled,minLength:t.config?.min_length,autocomplete:"current-password",onInput:this.handleInput}),this.renderFloatingLabel(t.label,e,t.required,o),r("button",{type:"button",class:"password-toggle",part:"password-toggle",onClick:this.togglePasswordVisibility,"aria-label":"Toggle password visibility","aria-pressed":this.passwordVisible?"true":"false"},this.renderPasswordToggle())),this.renderErrors(),0===i.length&&this.renderHint(t.hint),a&&r("div",{class:"field-link",part:"field-link"},r("a",{href:a,class:"link",part:"link"},"Forgot password?")))}renderNumberField(t){const e=`input-${t.id}`,i=this.getErrors(),{placeholder:o,min:a,max:n,step:s}=t.config??{};return r("div",{class:"input-wrapper",part:"input-wrapper"},this.renderLabel(t.label,e,t.required),r("input",{id:e,class:{"input-field":!0,"has-error":i.length>0},part:"input",type:"number",name:t.id,value:this.value??"",placeholder:o,required:t.required,disabled:this.disabled,min:a,max:n,step:s,onInput:this.handleInput}),this.renderErrors(),0===i.length&&this.renderHint(t.hint))}renderTelField(t){const e=`input-${t.id}`,i=this.getErrors();return r("div",{class:"input-wrapper",part:"input-wrapper"},this.renderLabel(t.label,e,t.required),r("input",{id:e,class:{"input-field":!0,"has-error":i.length>0},part:"input",type:"tel",name:t.id,value:this.value??"",placeholder:t.config?.placeholder,required:t.required,disabled:this.disabled,autocomplete:"tel",onInput:this.handleInput}),this.renderErrors(),0===i.length&&this.renderHint(t.hint))}renderUrlField(t){const e=`input-${t.id}`,i=this.getErrors();return r("div",{class:"input-wrapper",part:"input-wrapper"},this.renderLabel(t.label,e,t.required),r("input",{id:e,class:{"input-field":!0,"has-error":i.length>0},part:"input",type:"url",name:t.id,value:this.value??"",placeholder:t.config?.placeholder,required:t.required,disabled:this.disabled,onInput:this.handleInput}),this.renderErrors(),0===i.length&&this.renderHint(t.hint))}renderDateField(t){const e=`input-${t.id}`,i=this.getErrors(),{min:o,max:a}=t.config??{};return r("div",{class:"input-wrapper",part:"input-wrapper"},this.renderLabel(t.label,e,t.required),r("input",{id:e,class:{"input-field":!0,"has-error":i.length>0},part:"input",type:"date",name:t.id,value:this.value??"",required:t.required,disabled:this.disabled,min:o,max:a,onInput:this.handleInput}),this.renderErrors(),0===i.length&&this.renderHint(t.hint))}renderBooleanField(t){return r("label",{class:"checkbox-wrapper",part:"checkbox-wrapper"},r("input",{type:"checkbox",part:"checkbox",name:t.id,checked:"true"===this.value||!0===t.config?.default_value,required:t.required,disabled:this.disabled,onChange:this.handleCheckbox}),r("span",{class:"checkbox-label",part:"checkbox-label"},t.label))}renderLegalField(t){const e=t.config?.text??t.label??"",i=!0===t.config?.html;return r("label",{class:"checkbox-wrapper",part:"checkbox-wrapper"},r("input",{type:"checkbox",part:"checkbox",name:t.id,checked:"true"===this.value,required:t.required,disabled:this.disabled,onChange:this.handleCheckbox}),i?r("span",{class:"checkbox-label",part:"checkbox-label",innerHTML:e}):r("span",{class:"checkbox-label",part:"checkbox-label"},e))}renderDropdownField(t){const e=`input-${t.id}`,i=this.getErrors(),{options:o,placeholder:a}=t.config??{};return r("div",{class:"input-wrapper",part:"input-wrapper"},this.renderLabel(t.label,e,t.required),r("select",{id:e,class:{"input-field":!0,"has-error":i.length>0},part:"input select",name:t.id,required:t.required,disabled:this.disabled,onChange:this.handleInput},a&&r("option",{value:"",disabled:!0,selected:!this.value},a),o?.map((t=>r("option",{value:t.value,selected:this.value===t.value,key:t.value},t.label)))),this.renderErrors(),0===i.length&&this.renderHint(t.hint))}renderChoiceField(t){const e=this.getErrors(),{options:i,display:o}=t.config??{},a="checkbox"===o,n=a?"checkbox":"radio";return r("div",{class:"choice-wrapper",part:"choice-wrapper"},t.label&&r("span",{class:"choice-label",part:"choice-label"},t.label,t.required&&r("span",{class:"required"},"*")),r("div",{class:"choice-options",part:"choice-options"},i?.map((e=>r("label",{class:"choice-option",part:"choice-option",key:e.value},r("input",{type:n,part:n,name:t.id,value:e.value,checked:this.value===e.value,required:t.required&&!a,disabled:this.disabled,onChange:this.handleInput}),r("span",null,e.label))))),this.renderErrors(),0===e.length&&this.renderHint(t.hint))}renderSocialField(t){return r("div",{class:"social-buttons",part:"social-buttons"},(t.config?.providers??[]).map((t=>r("button",{type:"button",class:"btn btn-secondary btn-social",part:"button button-secondary button-social","data-provider":t,disabled:this.disabled,onClick:e=>this.handleButtonClick(e,"social",t),key:t},(t=>{const e=t.toLowerCase();return"google-oauth2"===e||"google"===e?r("svg",{class:"social-icon",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},r("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z",fill:"#4285F4"}),r("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),r("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"}),r("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"})):"facebook"===e?r("svg",{class:"social-icon",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},r("path",{d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z",fill:"#1877F2"})):"apple"===e?r("svg",{class:"social-icon",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},r("path",{d:"M17.05 20.28c-.98.95-2.05.8-3.08.35-1.09-.46-2.09-.48-3.24 0-1.44.62-2.2.44-3.06-.35C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.54 4.09l.01-.01zM12.03 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z",fill:"#000000"})):"github"===e?r("svg",{class:"social-icon",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},r("path",{d:"M12 0C5.374 0 0 5.373 0 12c0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23A11.509 11.509 0 0112 5.803c1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576C20.566 21.797 24 17.3 24 12c0-6.627-5.373-12-12-12z",fill:"#181717"})):"microsoft"===e||"windowslive"===e?r("svg",{class:"social-icon",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},r("path",{d:"M0 0h11.377v11.372H0V0z",fill:"#f25022"}),r("path",{d:"M12.623 0H24v11.372H12.623V0z",fill:"#7fba00"}),r("path",{d:"M0 12.623h11.377V24H0v-11.377z",fill:"#00a4ef"}),r("path",{d:"M12.623 12.623H24V24H12.623v-11.377z",fill:"#ffb900"})):"linkedin"===e?r("svg",{class:"social-icon",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},r("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z",fill:"#0A66C2"})):null})(t),r("span",null,"Continue with ",(t=>({"google-oauth2":"Google",facebook:"Facebook",twitter:"Twitter",github:"GitHub",linkedin:"LinkedIn",apple:"Apple",microsoft:"Microsoft",windowslive:"Microsoft",amazon:"Amazon",dropbox:"Dropbox",bitbucket:"Bitbucket",spotify:"Spotify",slack:"Slack",discord:"Discord",twitch:"Twitch",line:"LINE",shopify:"Shopify",paypal:"PayPal","paypal-sandbox":"PayPal",box:"Box",salesforce:"Salesforce","salesforce-sandbox":"Salesforce",yahoo:"Yahoo",auth0:"Auth0"}[t.toLowerCase()]||t.split("-").map((t=>t.charAt(0).toUpperCase()+t.slice(1))).join(" ")))(t))))))}render(){if(!this.component)return null;if(!1===this.component.visible)return null;switch(this.component.type){case"DIVIDER":return this.renderDivider();case"HTML":return this.renderHtml(this.component);case"IMAGE":return this.renderImage(this.component);case"RICH_TEXT":return this.renderRichText(this.component);case"NEXT_BUTTON":return this.renderNextButton(this.component);case"PREVIOUS_BUTTON":return this.renderPreviousButton(this.component);case"JUMP_BUTTON":return this.renderJumpButton(this.component);case"RESEND_BUTTON":return this.renderResendButton(this.component);case"TEXT":return this.renderTextField(this.component);case"EMAIL":return this.renderEmailField(this.component);case"PASSWORD":return this.renderPasswordField(this.component);case"NUMBER":return this.renderNumberField(this.component);case"TEL":return this.renderTelField(this.component);case"URL":return this.renderUrlField(this.component);case"DATE":return this.renderDateField(this.component);case"BOOLEAN":return this.renderBooleanField(this.component);case"LEGAL":return this.renderLegalField(this.component);case"DROPDOWN":return this.renderDropdownField(this.component);case"CHOICE":return this.renderChoiceField(this.component);case"SOCIAL":return this.renderSocialField(this.component);case"AUTH0_VERIFIABLE_CREDENTIALS":case"GMAPS_ADDRESS":case"RECAPTCHA":return console.warn(`Widget component "${this.component.type}" not yet implemented`),null;case"CARDS":case"CUSTOM":case"FILE":case"PAYMENT":return console.warn(`Component "${this.component.type}" not yet implemented`),null;default:return console.warn(`Unknown component type: ${this.component.type}`),null}}};i.style=":host{display:block}.input-wrapper{display:flex;flex-direction:column;position:relative;margin-bottom:16px}.input-container{position:relative;width:100%}.input-label{position:absolute;left:16px;top:50%;transform:translateY(-50%);font-size:16px;font-weight:var(--ah-font-weight-label, 400);color:var(--ah-color-text-muted, #65676e);pointer-events:none;transition:all 0.15s ease-out;background-color:transparent;padding:0;z-index:1}.input-label.floating,.input-field:focus+.input-label,.input-field:not(:placeholder-shown)+.input-label{top:-8px;transform:translateY(0);font-size:12px;background-color:var(--ah-color-bg, #ffffff);padding:0 4px;left:12px;color:var(--ah-color-text-muted, #65676e)}.input-field:focus+.input-label{color:var(--ah-color-primary, #635dff)}.required{color:var(--ah-color-error, #d03c38);margin-left:2px}.input-field{width:100%;padding:16px;font-size:16px;font-family:inherit;color:var(--ah-color-text, #1e212a);background-color:var(--ah-color-input-bg, #ffffff);border:1px solid var(--ah-color-border, #c9cace);border-radius:var(--ah-input-radius, 3px);outline:none;transition:border-color 0.15s ease-out, box-shadow 0.15s ease-out;box-sizing:border-box}.input-field::placeholder{color:transparent}.input-field:hover{border-color:var(--ah-color-border-hover, #65676e)}.input-field:focus{border-color:var(--ah-color-primary, #635dff);box-shadow:inset 0 0 0 1px var(--ah-color-primary, #635dff)}.input-field.has-error{border-color:var(--ah-color-error, #d03c38)}.input-field.has-error:focus{box-shadow:inset 0 0 0 1px var(--ah-color-error, #d03c38)}.input-field:disabled{background-color:var(--ah-color-bg-disabled, #f5f5f5);border-color:var(--ah-color-border-disabled, #e0e1e3);cursor:not-allowed;opacity:0.7}.password-container{position:relative;display:flex;align-items:center}.password-container .input-field{padding-right:48px}.password-toggle{position:absolute;right:12px;top:50%;transform:translateY(-50%);background:none;border:none;cursor:pointer;padding:4px;display:flex;align-items:center;justify-content:center;color:var(--ah-color-text-muted, #65676e);transition:color 0.15s ease}.password-toggle:hover{color:var(--ah-color-text, #1e212a)}.password-toggle svg{width:20px;height:20px}.error-text{font-size:12px;color:var(--ah-color-error, #d03c38);margin-top:4px;line-height:1.4}.helper-text{font-size:12px;color:var(--ah-color-text-muted, #65676e);margin-top:4px;line-height:1.4}.field-link{display:block;text-align:left;margin-top:8px;margin-bottom:16px}.field-link a{color:var(--ah-color-link, #635dff);text-decoration:var(--ah-link-decoration, none);font-size:14px;font-weight:var(--ah-font-weight-link, 400)}.field-link a:hover{text-decoration:underline}.checkbox-wrapper{display:flex;align-items:flex-start;gap:10px;cursor:pointer;margin-bottom:16px}.checkbox-wrapper input[type='checkbox']{width:18px;height:18px;margin:0;accent-color:var(--ah-color-primary, #635dff);cursor:pointer;flex-shrink:0}.checkbox-label{font-size:14px;color:var(--ah-color-text, #1e212a);line-height:1.5}.btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:14px 20px;font-size:16px;font-weight:var(--ah-font-weight-btn, 400);font-family:inherit;line-height:1.25;text-align:center;text-decoration:none;border:none;border-radius:var(--ah-btn-radius, 3px);cursor:pointer;transition:background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;box-sizing:border-box}.btn:disabled{opacity:0.6;cursor:not-allowed}.btn:not(:disabled):active{transform:scale(0.98)}.btn:focus-visible{outline:2px solid var(--ah-color-primary, #635dff);outline-offset:2px}.btn-primary{background-color:var(--ah-color-primary, #635dff);color:var(--ah-color-text-on-primary, #ffffff);margin-top:8px}.btn-primary:not(:disabled):hover{background-color:var(--ah-color-primary-hover);filter:brightness(0.9)}.btn-secondary{background-color:var(--ah-color-bg, #ffffff);color:var(--ah-color-text, #1e212a);border:1px solid var(--ah-color-border, #c9cace)}.btn-secondary:not(:disabled):hover{background-color:var(--ah-color-bg-hover, #f5f5f5);border-color:var(--ah-color-border-hover, #65676e)}.btn-link{background:none;border:none;color:var(--ah-color-link, #635dff);padding:8px 0;font-weight:var(--ah-font-weight-link, 400);text-decoration:none}.btn-link:hover{text-decoration:underline}.btn-social{display:flex;align-items:center;justify-content:center;gap:12px}.social-icon{width:20px;height:20px;flex-shrink:0}.btn-icon{width:20px;height:20px;flex-shrink:0}.btn-icon img{width:100%;height:100%;object-fit:contain}.text-title{font-size:20px;font-weight:400;color:var(--ah-color-text, #1e212a);margin:8px 0;line-height:1.3}.text-title.text-success{color:var(--ah-color-success, #13a769)}.text-description{font-size:14px;color:var(--ah-color-text-muted, #65676e);margin:4px 0;line-height:1.5}.image{display:block;max-width:100%;height:auto;border-radius:4px}.image-centered{margin:0 auto 16px;width:52px;height:52px;object-fit:contain}.link{color:var(--ah-color-link, #635dff);text-decoration:var(--ah-link-decoration, none);font-size:14px;transition:color 0.15s ease}.link:hover{text-decoration:underline}.link:focus-visible{outline:2px solid var(--ah-color-link, #635dff);outline-offset:2px;border-radius:2px}.node-error{padding:12px 16px;background-color:var(--ah-color-error-bg, #ffeaea);color:var(--ah-color-error, #d03c38);border-left:3px solid var(--ah-color-error, #d03c38);border-radius:0;font-size:14px;margin-bottom:16px}.node-success{padding:12px 16px;background-color:var(--ah-color-success-bg, #e6f9f1);color:var(--ah-color-success, #13a769);border-left:3px solid var(--ah-color-success, #13a769);border-radius:0;font-size:14px;margin-bottom:16px}.divider{display:flex;align-items:center;text-align:center;margin:16px 0}.divider::before,.divider::after{content:'';flex:1;border-bottom:1px solid var(--ah-color-border-muted, #c9cace)}.divider-text{padding:0 10px;font-size:12px;font-weight:400;color:var(--ah-color-text-muted, #65676e);text-transform:uppercase;letter-spacing:0.5px}";export{i as authhero_node}
|
|
1
|
+
import{r as t,c as e,h as r}from"./p-DKg5ozw7.js";const i=class{constructor(r){t(this,r),this.fieldChange=e(this,"fieldChange"),this.buttonClick=e(this,"buttonClick")}component;value;disabled=!1;passwordVisible=!1;fieldChange;buttonClick;handleInput=t=>{this.fieldChange.emit({id:this.component.id,value:t.target.value})};handleCheckbox=t=>{this.fieldChange.emit({id:this.component.id,value:t.target.checked?"true":"false"})};handleButtonClick=(t,e,r)=>{"submit"!==e&&t.preventDefault(),this.buttonClick.emit({id:this.component.id,type:e,value:r})};togglePasswordVisibility=()=>{this.passwordVisible=!this.passwordVisible};getErrors(){const t=this.component;return t.messages?.filter((t=>"error"===t.type))||[]}renderFloatingLabel(t,e,i,o){return t?r("label",{class:{"input-label":!0,floating:!!o},part:"label",htmlFor:e},t,i&&r("span",{class:"required"},"*")):null}renderLabel(t,e,i){return t?r("label",{class:"input-label",part:"label",htmlFor:e},t,i&&r("span",{class:"required"},"*")):null}renderPasswordToggle(){return this.passwordVisible?r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},r("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"}),r("line",{x1:"1",y1:"1",x2:"23",y2:"23"})):r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},r("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),r("circle",{cx:"12",cy:"12",r:"3"}))}renderErrors(){return this.getErrors().map((t=>r("span",{class:"error-text",part:"error-text",key:t.id??t.text},t.text)))}renderHint(t){return t?r("span",{class:"helper-text",part:"helper-text"},t):null}renderDivider(){return r("hr",{class:"divider",part:"divider"})}renderHtml(t){return r("div",{class:"html-content",part:"html-content",innerHTML:t.config?.content??""})}renderImage(t){const{src:e,alt:i,width:o,height:a}=t.config??{};return e?r("img",{class:"image",part:"image",src:e,alt:i??"",width:o,height:a,loading:"lazy"}):null}renderRichText(t){return r("div",{class:"rich-text",part:"rich-text",innerHTML:t.config?.content??""})}renderNextButton(t){return r("button",{type:"submit",class:"btn btn-primary",part:"button button-primary",disabled:this.disabled,onClick:t=>this.handleButtonClick(t,"submit","next")},t.config.text??"Continue")}renderPreviousButton(t){return r("button",{type:"button",class:"btn btn-secondary",part:"button button-secondary",disabled:this.disabled,onClick:t=>this.handleButtonClick(t,"previous","back")},t.config.text??"Back")}renderJumpButton(t){return r("button",{type:"button",class:"btn btn-link",part:"button button-link",disabled:this.disabled,onClick:e=>this.handleButtonClick(e,"jump",t.config.target_step)},t.config.text??"Go")}renderResendButton(t){return r("button",{type:"button",class:"btn btn-link",part:"button button-link",disabled:this.disabled,onClick:e=>this.handleButtonClick(e,"resend",t.config.resend_action)},t.config.text??"Resend")}renderTextField(t){const e=`input-${t.id}`,i=this.getErrors(),{multiline:o,max_length:a}=t.config??{},n=!!(this.value&&this.value.length>0);return o?r("div",{class:"input-wrapper",part:"input-wrapper"},this.renderLabel(t.label,e,t.required),r("textarea",{id:e,class:{"input-field":!0,"has-error":i.length>0},part:"input textarea",name:t.id,placeholder:" ",required:t.required,disabled:this.disabled,maxLength:a,onInput:this.handleInput},this.value??""),this.renderErrors(),0===i.length&&this.renderHint(t.hint)):r("div",{class:"input-wrapper",part:"input-wrapper"},r("div",{class:"input-container"},r("input",{id:e,class:{"input-field":!0,"has-error":i.length>0},part:"input",type:t.sensitive?"password":"text",name:t.id,value:this.value??"",placeholder:" ",required:t.required,disabled:this.disabled,maxLength:a,onInput:this.handleInput}),this.renderFloatingLabel(t.label,e,t.required,n)),this.renderErrors(),0===i.length&&this.renderHint(t.hint))}renderEmailField(t){const e=`input-${t.id}`,i=this.getErrors(),o=!!(this.value&&this.value.length>0);return r("div",{class:"input-wrapper",part:"input-wrapper"},r("div",{class:"input-container"},r("input",{id:e,class:{"input-field":!0,"has-error":i.length>0},part:"input",type:"email",name:t.id,value:this.value??"",placeholder:" ",required:t.required,disabled:this.disabled,autocomplete:"email",onInput:this.handleInput}),this.renderFloatingLabel(t.label,e,t.required,o)),this.renderErrors(),0===i.length&&this.renderHint(t.hint))}renderPasswordField(t){const e=`input-${t.id}`,i=this.getErrors(),o=!!(this.value&&this.value.length>0),a=t.config?.forgot_password_link;return r("div",{class:"input-wrapper",part:"input-wrapper"},r("div",{class:"input-container password-container"},r("input",{id:e,class:{"input-field":!0,"has-error":i.length>0},part:"input",type:this.passwordVisible?"text":"password",name:t.id,value:this.value??"",placeholder:" ",required:t.required,disabled:this.disabled,minLength:t.config?.min_length,autocomplete:"current-password",onInput:this.handleInput}),this.renderFloatingLabel(t.label,e,t.required,o),r("button",{type:"button",class:"password-toggle",part:"password-toggle",onClick:this.togglePasswordVisibility,"aria-label":"Toggle password visibility","aria-pressed":this.passwordVisible?"true":"false"},this.renderPasswordToggle())),this.renderErrors(),0===i.length&&this.renderHint(t.hint),a&&r("div",{class:"field-link",part:"field-link"},r("a",{href:a,class:"link",part:"link"},"Forgot password?")))}renderNumberField(t){const e=`input-${t.id}`,i=this.getErrors(),{placeholder:o,min:a,max:n,step:s}=t.config??{};return r("div",{class:"input-wrapper",part:"input-wrapper"},this.renderLabel(t.label,e,t.required),r("input",{id:e,class:{"input-field":!0,"has-error":i.length>0},part:"input",type:"number",name:t.id,value:this.value??"",placeholder:o,required:t.required,disabled:this.disabled,min:a,max:n,step:s,onInput:this.handleInput}),this.renderErrors(),0===i.length&&this.renderHint(t.hint))}renderTelField(t){const e=`input-${t.id}`,i=this.getErrors();return r("div",{class:"input-wrapper",part:"input-wrapper"},this.renderLabel(t.label,e,t.required),r("input",{id:e,class:{"input-field":!0,"has-error":i.length>0},part:"input",type:"tel",name:t.id,value:this.value??"",placeholder:t.config?.placeholder,required:t.required,disabled:this.disabled,autocomplete:"tel",onInput:this.handleInput}),this.renderErrors(),0===i.length&&this.renderHint(t.hint))}renderUrlField(t){const e=`input-${t.id}`,i=this.getErrors();return r("div",{class:"input-wrapper",part:"input-wrapper"},this.renderLabel(t.label,e,t.required),r("input",{id:e,class:{"input-field":!0,"has-error":i.length>0},part:"input",type:"url",name:t.id,value:this.value??"",placeholder:t.config?.placeholder,required:t.required,disabled:this.disabled,onInput:this.handleInput}),this.renderErrors(),0===i.length&&this.renderHint(t.hint))}renderDateField(t){const e=`input-${t.id}`,i=this.getErrors(),{min:o,max:a}=t.config??{};return r("div",{class:"input-wrapper",part:"input-wrapper"},this.renderLabel(t.label,e,t.required),r("input",{id:e,class:{"input-field":!0,"has-error":i.length>0},part:"input",type:"date",name:t.id,value:this.value??"",required:t.required,disabled:this.disabled,min:o,max:a,onInput:this.handleInput}),this.renderErrors(),0===i.length&&this.renderHint(t.hint))}renderBooleanField(t){return r("label",{class:"checkbox-wrapper",part:"checkbox-wrapper"},r("input",{type:"checkbox",part:"checkbox",name:t.id,checked:"true"===this.value||!0===t.config?.default_value,required:t.required,disabled:this.disabled,onChange:this.handleCheckbox}),r("span",{class:"checkbox-label",part:"checkbox-label"},t.label))}renderLegalField(t){const e=t.config?.text??t.label??"",i=!0===t.config?.html;return r("label",{class:"checkbox-wrapper",part:"checkbox-wrapper"},r("input",{type:"checkbox",part:"checkbox",name:t.id,checked:"true"===this.value,required:t.required,disabled:this.disabled,onChange:this.handleCheckbox}),i?r("span",{class:"checkbox-label",part:"checkbox-label",innerHTML:e}):r("span",{class:"checkbox-label",part:"checkbox-label"},e))}renderDropdownField(t){const e=`input-${t.id}`,i=this.getErrors(),{options:o,placeholder:a}=t.config??{};return r("div",{class:"input-wrapper",part:"input-wrapper"},this.renderLabel(t.label,e,t.required),r("select",{id:e,class:{"input-field":!0,"has-error":i.length>0},part:"input select",name:t.id,required:t.required,disabled:this.disabled,onChange:this.handleInput},a&&r("option",{value:"",disabled:!0,selected:!this.value},a),o?.map((t=>r("option",{value:t.value,selected:this.value===t.value,key:t.value},t.label)))),this.renderErrors(),0===i.length&&this.renderHint(t.hint))}renderChoiceField(t){const e=this.getErrors(),{options:i,display:o}=t.config??{},a="checkbox"===o,n=a?"checkbox":"radio";return r("div",{class:"choice-wrapper",part:"choice-wrapper"},t.label&&r("span",{class:"choice-label",part:"choice-label"},t.label,t.required&&r("span",{class:"required"},"*")),r("div",{class:"choice-options",part:"choice-options"},i?.map((e=>r("label",{class:"choice-option",part:"choice-option",key:e.value},r("input",{type:n,part:n,name:t.id,value:e.value,checked:this.value===e.value,required:t.required&&!a,disabled:this.disabled,onChange:this.handleInput}),r("span",null,e.label))))),this.renderErrors(),0===e.length&&this.renderHint(t.hint))}renderSocialField(t){return r("div",{class:"social-buttons",part:"social-buttons"},(t.config?.providers??[]).map((t=>r("button",{type:"button",class:"btn btn-secondary btn-social",part:"button button-secondary button-social","data-provider":t,disabled:this.disabled,onClick:e=>this.handleButtonClick(e,"social",t),key:t},(t=>{const e=t.toLowerCase();return"google-oauth2"===e||"google"===e?r("svg",{class:"social-icon",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},r("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z",fill:"#4285F4"}),r("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),r("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"}),r("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"})):"facebook"===e?r("svg",{class:"social-icon",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},r("path",{d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z",fill:"#1877F2"})):"apple"===e?r("svg",{class:"social-icon",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},r("path",{d:"M17.05 20.28c-.98.95-2.05.8-3.08.35-1.09-.46-2.09-.48-3.24 0-1.44.62-2.2.44-3.06-.35C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.54 4.09l.01-.01zM12.03 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z",fill:"#000000"})):"github"===e?r("svg",{class:"social-icon",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},r("path",{d:"M12 0C5.374 0 0 5.373 0 12c0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23A11.509 11.509 0 0112 5.803c1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576C20.566 21.797 24 17.3 24 12c0-6.627-5.373-12-12-12z",fill:"#181717"})):"microsoft"===e||"windowslive"===e?r("svg",{class:"social-icon",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},r("path",{d:"M0 0h11.377v11.372H0V0z",fill:"#f25022"}),r("path",{d:"M12.623 0H24v11.372H12.623V0z",fill:"#7fba00"}),r("path",{d:"M0 12.623h11.377V24H0v-11.377z",fill:"#00a4ef"}),r("path",{d:"M12.623 12.623H24V24H12.623v-11.377z",fill:"#ffb900"})):"linkedin"===e?r("svg",{class:"social-icon",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},r("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z",fill:"#0A66C2"})):null})(t),r("span",null,"Continue with ",(t=>({"google-oauth2":"Google",facebook:"Facebook",twitter:"Twitter",github:"GitHub",linkedin:"LinkedIn",apple:"Apple",microsoft:"Microsoft",windowslive:"Microsoft",amazon:"Amazon",dropbox:"Dropbox",bitbucket:"Bitbucket",spotify:"Spotify",slack:"Slack",discord:"Discord",twitch:"Twitch",line:"LINE",shopify:"Shopify",paypal:"PayPal","paypal-sandbox":"PayPal",box:"Box",salesforce:"Salesforce","salesforce-sandbox":"Salesforce",yahoo:"Yahoo",auth0:"Auth0"}[t.toLowerCase()]||t.split("-").map((t=>t.charAt(0).toUpperCase()+t.slice(1))).join(" ")))(t))))))}render(){if(!this.component)return null;if(!1===this.component.visible)return null;switch(this.component.type){case"DIVIDER":return this.renderDivider();case"HTML":return this.renderHtml(this.component);case"IMAGE":return this.renderImage(this.component);case"RICH_TEXT":return this.renderRichText(this.component);case"NEXT_BUTTON":return this.renderNextButton(this.component);case"PREVIOUS_BUTTON":return this.renderPreviousButton(this.component);case"JUMP_BUTTON":return this.renderJumpButton(this.component);case"RESEND_BUTTON":return this.renderResendButton(this.component);case"TEXT":return this.renderTextField(this.component);case"EMAIL":return this.renderEmailField(this.component);case"PASSWORD":return this.renderPasswordField(this.component);case"NUMBER":return this.renderNumberField(this.component);case"TEL":return this.renderTelField(this.component);case"URL":return this.renderUrlField(this.component);case"DATE":return this.renderDateField(this.component);case"BOOLEAN":return this.renderBooleanField(this.component);case"LEGAL":return this.renderLegalField(this.component);case"DROPDOWN":return this.renderDropdownField(this.component);case"CHOICE":return this.renderChoiceField(this.component);case"SOCIAL":return this.renderSocialField(this.component);case"AUTH0_VERIFIABLE_CREDENTIALS":case"GMAPS_ADDRESS":case"RECAPTCHA":return console.warn(`Widget component "${this.component.type}" not yet implemented`),null;case"CARDS":case"CUSTOM":case"FILE":case"PAYMENT":return console.warn(`Component "${this.component.type}" not yet implemented`),null;default:return console.warn(`Unknown component type: ${this.component.type}`),null}}};i.style=":host{display:block}.input-wrapper{display:flex;flex-direction:column;position:relative;margin-bottom:16px}.input-container{position:relative;width:100%}.input-label{position:absolute;left:16px;top:50%;transform:translateY(-50%);font-size:16px;font-weight:var(--ah-font-weight-label, 400);color:var(--ah-color-text-muted, #65676e);pointer-events:none;transition:all 0.15s ease-out;background-color:transparent;padding:0;z-index:1}.input-label.floating,.input-field:focus+.input-label,.input-field:not(:placeholder-shown)+.input-label{top:-8px;transform:translateY(0);font-size:12px;background-color:var(--ah-color-bg, #ffffff);padding:0 4px;left:12px;color:var(--ah-color-text-muted, #65676e)}.input-field:focus+.input-label{color:var(--ah-color-primary, #635dff)}.required{color:var(--ah-color-error, #d03c38);margin-left:2px}.input-field{width:100%;padding:16px;font-size:16px;font-family:inherit;color:var(--ah-color-text, #1e212a);background-color:var(--ah-color-input-bg, #ffffff);border:1px solid var(--ah-color-border, #c9cace);border-radius:var(--ah-input-radius, 3px);outline:none;transition:border-color 0.15s ease-out, box-shadow 0.15s ease-out;box-sizing:border-box}.input-field::placeholder{color:transparent}.input-field:hover{border-color:var(--ah-color-border-hover, #65676e)}.input-field:focus{border-color:var(--ah-color-primary, #635dff);box-shadow:inset 0 0 0 1px var(--ah-color-primary, #635dff)}.input-field.has-error{border-color:var(--ah-color-error, #d03c38)}.input-field.has-error:focus{box-shadow:inset 0 0 0 1px var(--ah-color-error, #d03c38)}.input-field:disabled{background-color:var(--ah-color-bg-disabled, #f5f5f5);border-color:var(--ah-color-border-disabled, #e0e1e3);cursor:not-allowed;opacity:0.7}.password-container{position:relative;display:flex;align-items:center}.password-container .input-field{padding-right:48px}.password-toggle{position:absolute;right:12px;top:50%;transform:translateY(-50%);background:none;border:none;cursor:pointer;padding:4px;display:flex;align-items:center;justify-content:center;color:var(--ah-color-text-muted, #65676e);transition:color 0.15s ease}.password-toggle:hover{color:var(--ah-color-text, #1e212a)}.password-toggle svg{width:20px;height:20px}.error-text{font-size:12px;color:var(--ah-color-error, #d03c38);margin-top:4px;line-height:1.4}.helper-text{font-size:12px;color:var(--ah-color-text-muted, #65676e);margin-top:4px;line-height:1.4}.field-link{display:block;text-align:left;margin-top:8px;margin-bottom:16px}.field-link a{color:var(--ah-color-link, #635dff);text-decoration:var(--ah-link-decoration, none);font-size:14px;font-weight:var(--ah-font-weight-link, 400)}.field-link a:hover{text-decoration:underline}.checkbox-wrapper{display:flex;align-items:flex-start;gap:10px;cursor:pointer;margin-bottom:16px}.checkbox-wrapper input[type='checkbox']{width:18px;height:18px;margin:0;accent-color:var(--ah-color-primary, #635dff);cursor:pointer;flex-shrink:0}.checkbox-label{font-size:14px;color:var(--ah-color-text, #1e212a);line-height:1.5}.btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:14px 20px;font-size:16px;font-weight:var(--ah-font-weight-btn, 400);font-family:inherit;line-height:1.25;text-align:center;text-decoration:none;border:none;border-radius:var(--ah-btn-radius, 3px);cursor:pointer;transition:background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;box-sizing:border-box}.btn:disabled{opacity:0.6;cursor:not-allowed}.btn:not(:disabled):active{transform:scale(0.98)}.btn:focus-visible{outline:2px solid var(--ah-color-primary, #635dff);outline-offset:2px}.btn-primary{background-color:var(--ah-color-primary, #635dff);color:var(--ah-color-text-on-primary, #ffffff);margin-top:8px}.btn-primary:not(:disabled):hover{background-color:var(--ah-color-primary-hover);filter:brightness(0.9)}.btn-secondary{background-color:var(--ah-color-bg, #ffffff);color:var(--ah-color-text, #1e212a);border:1px solid var(--ah-color-border, #c9cace)}.btn-secondary:not(:disabled):hover{background-color:var(--ah-color-bg-hover, #f5f5f5);border-color:var(--ah-color-border-hover, #65676e)}.btn-link{background:none;border:none;color:var(--ah-color-link, #635dff);padding:8px 0;font-weight:var(--ah-font-weight-link, 400);text-decoration:none}.btn-link:hover{text-decoration:underline}.btn-social{display:flex;align-items:center;justify-content:center;gap:12px}.social-icon{width:20px;height:20px;flex-shrink:0}.btn-icon{width:20px;height:20px;flex-shrink:0}.btn-icon img{width:100%;height:100%;object-fit:contain}.text-title{font-size:20px;font-weight:400;color:var(--ah-color-text, #1e212a);margin:8px 0;line-height:1.3}.text-title.text-success{color:var(--ah-color-success, #13a769)}.text-description{font-size:14px;color:var(--ah-color-text-muted, #65676e);margin:4px 0;line-height:1.5}.image{display:block;max-width:100%;height:auto;border-radius:4px}.image-centered{margin:0 auto 16px;width:52px;height:52px;object-fit:contain}.link{color:var(--ah-color-link, #635dff);text-decoration:var(--ah-link-decoration, none);font-size:14px;transition:color 0.15s ease}.link:hover{text-decoration:underline}.link:focus-visible{outline:2px solid var(--ah-color-link, #635dff);outline-offset:2px;border-radius:2px}.node-error{padding:12px 16px;background-color:var(--ah-color-error-bg, #ffeaea);color:var(--ah-color-error, #d03c38);border-left:3px solid var(--ah-color-error, #d03c38);border-radius:0;font-size:14px;margin-bottom:16px}.node-success{padding:12px 16px;background-color:var(--ah-color-success-bg, #e6f9f1);color:var(--ah-color-success, #13a769);border-left:3px solid var(--ah-color-success, #13a769);border-radius:0;font-size:14px;margin-bottom:16px}.divider{display:flex;align-items:center;text-align:center;margin:16px 0}.divider::before,.divider::after{content:'';flex:1;border-bottom:1px solid var(--ah-color-border-muted, #c9cace)}.divider-text{padding:0 10px;font-size:12px;font-weight:400;color:var(--ah-color-text-muted, #65676e);text-transform:uppercase;letter-spacing:0.5px}";export{i as authhero_node}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-CFDpaA1R.js');
|
|
4
4
|
|
|
5
5
|
const authheroNodeCss = () => `:host{display:block}.input-wrapper{display:flex;flex-direction:column;position:relative;margin-bottom:16px}.input-container{position:relative;width:100%}.input-label{position:absolute;left:16px;top:50%;transform:translateY(-50%);font-size:16px;font-weight:var(--ah-font-weight-label, 400);color:var(--ah-color-text-muted, #65676e);pointer-events:none;transition:all 0.15s ease-out;background-color:transparent;padding:0;z-index:1}.input-label.floating,.input-field:focus+.input-label,.input-field:not(:placeholder-shown)+.input-label{top:-8px;transform:translateY(0);font-size:12px;background-color:var(--ah-color-bg, #ffffff);padding:0 4px;left:12px;color:var(--ah-color-text-muted, #65676e)}.input-field:focus+.input-label{color:var(--ah-color-primary, #635dff)}.required{color:var(--ah-color-error, #d03c38);margin-left:2px}.input-field{width:100%;padding:16px;font-size:16px;font-family:inherit;color:var(--ah-color-text, #1e212a);background-color:var(--ah-color-input-bg, #ffffff);border:1px solid var(--ah-color-border, #c9cace);border-radius:var(--ah-input-radius, 3px);outline:none;transition:border-color 0.15s ease-out, box-shadow 0.15s ease-out;box-sizing:border-box}.input-field::placeholder{color:transparent}.input-field:hover{border-color:var(--ah-color-border-hover, #65676e)}.input-field:focus{border-color:var(--ah-color-primary, #635dff);box-shadow:inset 0 0 0 1px var(--ah-color-primary, #635dff)}.input-field.has-error{border-color:var(--ah-color-error, #d03c38)}.input-field.has-error:focus{box-shadow:inset 0 0 0 1px var(--ah-color-error, #d03c38)}.input-field:disabled{background-color:var(--ah-color-bg-disabled, #f5f5f5);border-color:var(--ah-color-border-disabled, #e0e1e3);cursor:not-allowed;opacity:0.7}.password-container{position:relative;display:flex;align-items:center}.password-container .input-field{padding-right:48px}.password-toggle{position:absolute;right:12px;top:50%;transform:translateY(-50%);background:none;border:none;cursor:pointer;padding:4px;display:flex;align-items:center;justify-content:center;color:var(--ah-color-text-muted, #65676e);transition:color 0.15s ease}.password-toggle:hover{color:var(--ah-color-text, #1e212a)}.password-toggle svg{width:20px;height:20px}.error-text{font-size:12px;color:var(--ah-color-error, #d03c38);margin-top:4px;line-height:1.4}.helper-text{font-size:12px;color:var(--ah-color-text-muted, #65676e);margin-top:4px;line-height:1.4}.field-link{display:block;text-align:left;margin-top:8px;margin-bottom:16px}.field-link a{color:var(--ah-color-link, #635dff);text-decoration:var(--ah-link-decoration, none);font-size:14px;font-weight:var(--ah-font-weight-link, 400)}.field-link a:hover{text-decoration:underline}.checkbox-wrapper{display:flex;align-items:flex-start;gap:10px;cursor:pointer;margin-bottom:16px}.checkbox-wrapper input[type='checkbox']{width:18px;height:18px;margin:0;accent-color:var(--ah-color-primary, #635dff);cursor:pointer;flex-shrink:0}.checkbox-label{font-size:14px;color:var(--ah-color-text, #1e212a);line-height:1.5}.btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:14px 20px;font-size:16px;font-weight:var(--ah-font-weight-btn, 400);font-family:inherit;line-height:1.25;text-align:center;text-decoration:none;border:none;border-radius:var(--ah-btn-radius, 3px);cursor:pointer;transition:background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;box-sizing:border-box}.btn:disabled{opacity:0.6;cursor:not-allowed}.btn:not(:disabled):active{transform:scale(0.98)}.btn:focus-visible{outline:2px solid var(--ah-color-primary, #635dff);outline-offset:2px}.btn-primary{background-color:var(--ah-color-primary, #635dff);color:var(--ah-color-text-on-primary, #ffffff);margin-top:8px}.btn-primary:not(:disabled):hover{background-color:var(--ah-color-primary-hover);filter:brightness(0.9)}.btn-secondary{background-color:var(--ah-color-bg, #ffffff);color:var(--ah-color-text, #1e212a);border:1px solid var(--ah-color-border, #c9cace)}.btn-secondary:not(:disabled):hover{background-color:var(--ah-color-bg-hover, #f5f5f5);border-color:var(--ah-color-border-hover, #65676e)}.btn-link{background:none;border:none;color:var(--ah-color-link, #635dff);padding:8px 0;font-weight:var(--ah-font-weight-link, 400);text-decoration:none}.btn-link:hover{text-decoration:underline}.btn-social{display:flex;align-items:center;justify-content:center;gap:12px}.social-icon{width:20px;height:20px;flex-shrink:0}.btn-icon{width:20px;height:20px;flex-shrink:0}.btn-icon img{width:100%;height:100%;object-fit:contain}.text-title{font-size:20px;font-weight:400;color:var(--ah-color-text, #1e212a);margin:8px 0;line-height:1.3}.text-title.text-success{color:var(--ah-color-success, #13a769)}.text-description{font-size:14px;color:var(--ah-color-text-muted, #65676e);margin:4px 0;line-height:1.5}.image{display:block;max-width:100%;height:auto;border-radius:4px}.image-centered{margin:0 auto 16px;width:52px;height:52px;object-fit:contain}.link{color:var(--ah-color-link, #635dff);text-decoration:var(--ah-link-decoration, none);font-size:14px;transition:color 0.15s ease}.link:hover{text-decoration:underline}.link:focus-visible{outline:2px solid var(--ah-color-link, #635dff);outline-offset:2px;border-radius:2px}.node-error{padding:12px 16px;background-color:var(--ah-color-error-bg, #ffeaea);color:var(--ah-color-error, #d03c38);border-left:3px solid var(--ah-color-error, #d03c38);border-radius:0;font-size:14px;margin-bottom:16px}.node-success{padding:12px 16px;background-color:var(--ah-color-success-bg, #e6f9f1);color:var(--ah-color-success, #13a769);border-left:3px solid var(--ah-color-success, #13a769);border-radius:0;font-size:14px;margin-bottom:16px}.divider{display:flex;align-items:center;text-align:center;margin:16px 0}.divider::before,.divider::after{content:'';flex:1;border-bottom:1px solid var(--ah-color-border-muted, #c9cace)}.divider-text{padding:0 10px;font-size:12px;font-weight:400;color:var(--ah-color-text-muted, #65676e);text-transform:uppercase;letter-spacing:0.5px}`;
|
|
6
6
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-CFDpaA1R.js');
|
|
4
4
|
var appGlobals = require('./app-globals-V2Kpy_OQ.js');
|
|
5
5
|
|
|
6
6
|
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Patch Browser v4.41.
|
|
8
|
+
Stencil Client Patch Browser v4.41.1 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
var patchBrowser = () => {
|
|
@@ -4,7 +4,7 @@ const NAMESPACE = 'authhero-widget';
|
|
|
4
4
|
const BUILD = /* authhero-widget */ { hotModuleReplacement: false, hydratedSelectorName: "hydrated", lazyLoad: true, propChangeCallback: true, state: true, updatable: true};
|
|
5
5
|
|
|
6
6
|
/*
|
|
7
|
-
Stencil Client Platform v4.41.
|
|
7
|
+
Stencil Client Platform v4.41.1 | MIT Licensed | https://stenciljs.com
|
|
8
8
|
*/
|
|
9
9
|
var __create = Object.create;
|
|
10
10
|
var __defProp = Object.defineProperty;
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -8111,7 +8111,7 @@ function requireAdapterInterfaces () {
|
|
|
8111
8111
|
if (hasRequiredAdapterInterfaces) return adapterInterfaces;
|
|
8112
8112
|
hasRequiredAdapterInterfaces = 1;
|
|
8113
8113
|
(function (exports) {
|
|
8114
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require$$0,s=e.z.object({created_at:e.z.string(),updated_at:e.z.string()}),gt=e.z.enum(["AUTH0","EMAIL","REDIRECT"]),mt=e.z.enum(["CREATE_USER","GET_USER","UPDATE_USER","SEND_REQUEST","SEND_EMAIL"]),ut=e.z.enum(["VERIFY_EMAIL"]),R=e.z.object({require_mx_record:e.z.boolean().optional(),block_aliases:e.z.boolean().optional(),block_free_emails:e.z.boolean().optional(),block_disposable_emails:e.z.boolean().optional(),blocklist:e.z.array(e.z.string()).optional(),allowlist:e.z.array(e.z.string()).optional()}),L=e.z.object({id:e.z.string(),alias:e.z.string().max(100).optional(),type:e.z.literal("AUTH0"),action:e.z.literal("UPDATE_USER"),allow_failure:e.z.boolean().optional(),mask_output:e.z.boolean().optional(),params:e.z.object({connection_id:e.z.string().optional(),user_id:e.z.string(),changes:e.z.record(e.z.string(),e.z.any())})}),D=e.z.object({id:e.z.string(),alias:e.z.string().max(100).optional(),type:e.z.literal("EMAIL"),action:e.z.literal("VERIFY_EMAIL"),allow_failure:e.z.boolean().optional(),mask_output:e.z.boolean().optional(),params:e.z.object({email:e.z.string(),rules:R.optional()})}),w=e.z.enum(["change-email","account","custom"]),j=e.z.object({id:e.z.string(),alias:e.z.string().max(100).optional(),type:e.z.literal("REDIRECT"),action:e.z.literal("REDIRECT_USER"),allow_failure:e.z.boolean().optional(),mask_output:e.z.boolean().optional(),params:e.z.object({target:w.openapi({description:"The predefined target to redirect to, or 'custom' for a custom URL"}),custom_url:e.z.string().optional().openapi({description:"Custom URL to redirect to when target is 'custom'"})})}),k=e.z.union([L,D,j]),U=e.z.object({name:e.z.string().min(1).max(150).openapi({description:"The name of the flow"}),actions:e.z.array(k).optional().default([]).openapi({description:"The list of actions to execute in sequence"})}),ht=U.extend({...s.shape,id:e.z.string().openapi({description:"Unique identifier for the flow",example:"af_12tMpdJ3iek7svMyZkSh5M"})}),St=e.z.object({page:e.z.string().min(0).optional().default("0").transform(t=>parseInt(t,10)).openapi({description:"The page number where 0 is the first page"}),per_page:e.z.string().min(1).optional().default("10").transform(t=>parseInt(t,10)).openapi({description:"The number of items per page"}),include_totals:e.z.string().optional().default("false").transform(t=>t==="true").openapi({description:"If the total number of items should be included in the response"}),sort:e.z.string().regex(/^.+:(-1|1)$/).optional().openapi({description:"A property that should have the format 'string:-1' or 'string:1'"}),q:e.z.string().optional().openapi({description:"A lucene query string used to filter the results"})}),bt=e.z.object({start:e.z.number(),limit:e.z.number(),length:e.z.number(),total:e.z.number().optional()}),F=e.z.object({email:e.z.string().optional(),email_verified:e.z.boolean().optional(),name:e.z.string().optional(),username:e.z.string().optional(),given_name:e.z.string().optional(),phone_number:e.z.string().optional(),phone_verified:e.z.boolean().optional(),family_name:e.z.string().optional()}).catchall(e.z.any()),v=e.z.object({connection:e.z.string(),user_id:e.z.string(),provider:e.z.string(),isSocial:e.z.boolean(),access_token:e.z.string().optional(),access_token_secret:e.z.string().optional(),refresh_token:e.z.string().optional(),profileData:F.optional()}),S=e.z.object({email:e.z.string().optional().transform(t=>t&&t.toLowerCase()),username:e.z.string().optional(),phone_number:e.z.string().optional(),given_name:e.z.string().optional(),family_name:e.z.string().optional(),nickname:e.z.string().optional(),name:e.z.string().optional(),picture:e.z.string().optional(),locale:e.z.string().optional(),linked_to:e.z.string().optional(),profileData:e.z.string().optional(),user_id:e.z.string().optional(),app_metadata:e.z.any().default({}).optional(),user_metadata:e.z.any().default({}).optional()}),x=S.extend({email_verified:e.z.boolean().default(false),verify_email:e.z.boolean().optional(),last_ip:e.z.string().optional(),last_login:e.z.string().optional(),user_id:e.z.string().optional(),provider:e.z.string().optional(),connection:e.z.string(),is_social:e.z.boolean().optional()}),P=e.z.object({...x.shape,...s.shape,user_id:e.z.string(),provider:e.z.string(),is_social:e.z.boolean(),email:e.z.string().optional(),login_count:e.z.number().default(0),identities:e.z.array(v).optional()}),ft=P,Et=S.extend({login_count:e.z.number(),multifactor:e.z.array(e.z.string()).optional(),last_ip:e.z.string().optional(),last_login:e.z.string().optional(),user_id:e.z.string()}).catchall(e.z.any()),At="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let It=(t=21)=>{let a="",c=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)a+=At[c[t]&63];return a};const M=e.z.object({client_id:e.z.string().openapi({description:"ID of this client."}),name:e.z.string().min(1).openapi({description:"Name of this client (min length: 1 character, does not allow < or >)."}),description:e.z.string().max(140).optional().openapi({description:"Free text description of this client (max length: 140 characters)."}),global:e.z.boolean().default(false).openapi({description:"Whether this is your global 'All Applications' client representing legacy tenant settings (true) or a regular client (false)."}),client_secret:e.z.string().default(()=>It()).optional().openapi({description:"Client secret (which you must not make public)."}),app_type:e.z.enum(["native","spa","regular_web","non_interactive","resource_server","express_configuration","rms","box","cloudbees","concur","dropbox","mscrm","echosign","egnyte","newrelic","office365","salesforce","sentry","sharepoint","slack","springcm","zendesk","zoom","sso_integration","oag"]).default("regular_web").optional().openapi({description:"The type of application this client represents"}),logo_uri:e.z.string().url().optional().openapi({description:"URL of the logo to display for this client. Recommended size is 150x150 pixels."}),is_first_party:e.z.boolean().default(false).openapi({description:"Whether this client a first party client (true) or not (false)."}),oidc_conformant:e.z.boolean().default(true).openapi({description:"Whether this client conforms to strict OIDC specifications (true) or uses legacy features (false)."}),callbacks:e.z.array(e.z.string()).default([]).optional().openapi({description:"Comma-separated list of URLs whitelisted for Auth0 to use as a callback to the client after authentication."}),allowed_origins:e.z.array(e.z.string()).default([]).optional().openapi({description:"Comma-separated list of URLs allowed to make requests from JavaScript to Auth0 API (typically used with CORS). By default, all your callback URLs will be allowed. This field allows you to enter other origins if necessary. You can also use wildcards at the subdomain level (e.g., https://*.contoso.com). Query strings and hash information are not taken into account when validating these URLs."}),web_origins:e.z.array(e.z.string()).default([]).optional().openapi({description:"Comma-separated list of allowed origins for use with Cross-Origin Authentication, Device Flow, and web message response mode."}),client_aliases:e.z.array(e.z.string()).default([]).optional().openapi({description:"List of audiences/realms for SAML protocol. Used by the wsfed addon."}),allowed_clients:e.z.array(e.z.string()).default([]).optional().openapi({description:"List of allow clients and API ids that are allowed to make delegation requests. Empty means all all your clients are allowed."}),connections:e.z.array(e.z.string()).default([]).optional().openapi({description:"List of connection IDs enabled for this client. The order determines the display order on the login page."}),allowed_logout_urls:e.z.array(e.z.string()).default([]).optional().openapi({description:"Comma-separated list of URLs that are valid to redirect to after logout from Auth0. Wildcards are allowed for subdomains."}),session_transfer:e.z.record(e.z.any()).default({}).optional().openapi({description:"Native to Web SSO Configuration"}),oidc_logout:e.z.record(e.z.any()).default({}).optional().openapi({description:"Configuration for OIDC backchannel logout"}),grant_types:e.z.array(e.z.string()).default([]).optional().openapi({description:"List of grant types supported for this application. Can include authorization_code, implicit, refresh_token, client_credentials, password, http://auth0.com/oauth/grant-type/password-realm, http://auth0.com/oauth/grant-type/mfa-oob, http://auth0.com/oauth/grant-type/mfa-otp, http://auth0.com/oauth/grant-type/mfa-recovery-code, urn:openid:params:grant-type:ciba, and urn:ietf:params:oauth:grant-type:device_code."}),jwt_configuration:e.z.record(e.z.any()).default({}).optional().openapi({description:"Configuration related to JWTs for the client."}),signing_keys:e.z.array(e.z.record(e.z.any())).default([]).optional().openapi({description:"Signing certificates associated with this client."}),encryption_key:e.z.record(e.z.any()).default({}).optional().openapi({description:"Encryption used for WsFed responses with this client."}),sso:e.z.boolean().default(false).openapi({description:"Applies only to SSO clients and determines whether Auth0 will handle Single Sign On (true) or whether the Identity Provider will (false)."}),sso_disabled:e.z.boolean().default(true).openapi({description:"Whether Single Sign On is disabled (true) or enabled (true). Defaults to true."}),cross_origin_authentication:e.z.boolean().default(false).openapi({description:"Whether this client can be used to make cross-origin authentication requests (true) or it is not allowed to make such requests (false)."}),cross_origin_loc:e.z.string().url().optional().openapi({description:"URL of the location in your site where the cross origin verification takes place for the cross-origin auth flow when performing Auth in your own domain instead of Auth0 hosted login page."}),custom_login_page_on:e.z.boolean().default(false).openapi({description:"Whether a custom login page is to be used (true) or the default provided login page (false)."}),custom_login_page:e.z.string().optional().openapi({description:"The content (HTML, CSS, JS) of the custom login page."}),custom_login_page_preview:e.z.string().optional().openapi({description:"The content (HTML, CSS, JS) of the custom login page. (Used on Previews)"}),form_template:e.z.string().optional().openapi({description:"HTML form template to be used for WS-Federation."}),addons:e.z.record(e.z.any()).default({}).optional().openapi({description:"Addons enabled for this client and their associated configurations."}),token_endpoint_auth_method:e.z.enum(["none","client_secret_post","client_secret_basic"]).default("client_secret_basic").optional().openapi({description:"Defines the requested authentication method for the token endpoint. Can be none (public client without a client secret), client_secret_post (client uses HTTP POST parameters), or client_secret_basic (client uses HTTP Basic)."}),client_metadata:e.z.record(e.z.string().max(255)).default({}).optional().openapi({description:'Metadata associated with the client, in the form of an object with string values (max 255 chars). Maximum of 10 metadata properties allowed. Field names (max 255 chars) are alphanumeric and may only include the following special characters: :,-+=_*?"/()<>@ [Tab][Space]'}),mobile:e.z.record(e.z.any()).default({}).optional().openapi({description:"Additional configuration for native mobile apps."}),initiate_login_uri:e.z.string().url().optional().openapi({description:"Initiate login uri, must be https"}),native_social_login:e.z.record(e.z.any()).default({}).optional(),refresh_token:e.z.record(e.z.any()).default({}).optional().openapi({description:"Refresh token configuration"}),default_organization:e.z.record(e.z.any()).default({}).optional().openapi({description:"Defines the default Organization ID and flows"}),organization_usage:e.z.enum(["deny","allow","require"]).default("deny").optional().openapi({description:"Defines how to proceed during an authentication transaction with regards an organization. Can be deny (default), allow or require."}),organization_require_behavior:e.z.enum(["no_prompt","pre_login_prompt","post_login_prompt"]).default("no_prompt").optional().openapi({description:"Defines how to proceed during an authentication transaction when client.organization_usage: 'require'. Can be no_prompt (default), pre_login_prompt or post_login_prompt. post_login_prompt requires oidc_conformant: true."}),client_authentication_methods:e.z.record(e.z.any()).default({}).optional().openapi({description:"Defines client authentication methods."}),require_pushed_authorization_requests:e.z.boolean().default(false).openapi({description:"Makes the use of Pushed Authorization Requests mandatory for this client"}),require_proof_of_possession:e.z.boolean().default(false).openapi({description:"Makes the use of Proof-of-Possession mandatory for this client"}),signed_request_object:e.z.record(e.z.any()).default({}).optional().openapi({description:"JWT-secured Authorization Requests (JAR) settings."}),compliance_level:e.z.enum(["none","fapi1_adv_pkj_par","fapi1_adv_mtls_par","fapi2_sp_pkj_mtls","fapi2_sp_mtls_mtls"]).optional().openapi({description:"Defines the compliance level for this client, which may restrict it's capabilities"}),par_request_expiry:e.z.number().optional().openapi({description:"Specifies how long, in seconds, a Pushed Authorization Request URI remains valid"}),token_quota:e.z.record(e.z.any()).default({}).optional()}),H=e.z.object({created_at:e.z.string(),updated_at:e.z.string(),...M.shape}),G=e.z.object({client_id:e.z.string().min(1).openapi({description:"ID of the client."}),audience:e.z.string().min(1).openapi({description:"The audience (API identifier) of this client grant."}),scope:e.z.array(e.z.string()).optional().openapi({description:"Scopes allowed for this client grant."}),organization_usage:e.z.enum(["deny","allow","require"]).optional().openapi({description:"Defines whether organizations can be used with client credentials exchanges for this grant."}),allow_any_organization:e.z.boolean().optional().openapi({description:"If enabled, any organization can be used with this grant. If disabled (default), the grant must be explicitly assigned to the desired organizations."}),is_system:e.z.boolean().optional().openapi({description:"If enabled, this grant is a special grant created by Auth0. It cannot be modified or deleted directly."}),subject_type:e.z.enum(["client","user"]).optional().openapi({description:"The type of application access the client grant allows. Use of this field is subject to the applicable Free Trial terms in Okta's Master Subscription Agreement."}),authorization_details_types:e.z.array(e.z.string()).optional().openapi({description:"Types of authorization_details allowed for this client grant. Use of this field is subject to the applicable Free Trial terms in Okta's Master Subscription Agreement."})}),B=e.z.object({id:e.z.string().openapi({description:"ID of the client grant."}),...G.shape,created_at:e.z.string().optional(),updated_at:e.z.string().optional()}),Ct=e.z.array(B),l=e.z.object({x:e.z.number(),y:e.z.number()});var b=(t=>(t.RICH_TEXT="RICH_TEXT",t.NEXT_BUTTON="NEXT_BUTTON",t.BACK_BUTTON="BACK_BUTTON",t.SUBMIT_BUTTON="SUBMIT_BUTTON",t.DIVIDER="DIVIDER",t.TEXT="TEXT",t.EMAIL="EMAIL",t.PASSWORD="PASSWORD",t.NUMBER="NUMBER",t.PHONE="PHONE",t.DATE="DATE",t.CHECKBOX="CHECKBOX",t.RADIO="RADIO",t.SELECT="SELECT",t.HIDDEN="HIDDEN",t.LEGAL="LEGAL",t))(b||{}),f=(t=>(t.BLOCK="BLOCK",t.FIELD="FIELD",t))(f||{});const g=e.z.object({id:e.z.string(),category:e.z.nativeEnum(f),type:e.z.nativeEnum(b)}),K=g.extend({category:e.z.literal("BLOCK"),type:e.z.literal("RICH_TEXT"),config:e.z.object({content:e.z.string()}).passthrough()}),W=g.extend({category:e.z.literal("BLOCK"),type:e.z.union([e.z.literal("NEXT_BUTTON"),e.z.literal("BACK_BUTTON"),e.z.literal("SUBMIT_BUTTON")]),config:e.z.object({text:e.z.string()}).passthrough()}),V=g.extend({category:e.z.literal("FIELD"),type:e.z.literal("LEGAL"),required:e.z.boolean().optional(),sensitive:e.z.boolean().optional(),config:e.z.object({text:e.z.string()}).passthrough()}),X=g.extend({category:e.z.literal("FIELD"),type:e.z.union([e.z.literal("TEXT"),e.z.literal("EMAIL"),e.z.literal("PASSWORD"),e.z.literal("NUMBER"),e.z.literal("PHONE"),e.z.literal("DATE"),e.z.literal("CHECKBOX"),e.z.literal("RADIO"),e.z.literal("SELECT"),e.z.literal("HIDDEN")]),required:e.z.boolean().optional(),sensitive:e.z.boolean().optional(),config:e.z.object({label:e.z.string().optional(),placeholder:e.z.string().optional()}).passthrough()}),q=e.z.object({id:e.z.string(),category:e.z.string(),type:e.z.string()}).passthrough(),Y=e.z.union([K,W,V,X,q]);var Q=(t=>(t.STEP="STEP",t.FLOW="FLOW",t.CONDITION="CONDITION",t.ACTION="ACTION",t))(Q||{});const J=e.z.object({id:e.z.string(),type:e.z.literal("STEP"),coordinates:l,alias:e.z.string().optional(),config:e.z.object({components:e.z.array(Y),next_node:e.z.string()}).passthrough()}),Z=e.z.object({id:e.z.string(),type:e.z.literal("FLOW"),coordinates:l,alias:e.z.string().optional(),config:e.z.object({flow_id:e.z.string(),next_node:e.z.string()})}),$=e.z.object({id:e.z.string(),type:e.z.literal("ACTION"),coordinates:l,alias:e.z.string().optional(),config:e.z.object({action_type:e.z.enum(["REDIRECT"]).openapi({description:"The type of action to perform"}),target:e.z.enum(["change-email","account","custom"]).openapi({description:"The predefined target to redirect to"}),custom_url:e.z.string().optional().openapi({description:"Custom URL when target is 'custom'"}),next_node:e.z.string().openapi({description:"The next node to navigate to after action (for non-redirect actions)"})}).passthrough()}),ee=e.z.object({id:e.z.string(),type:e.z.string(),coordinates:l}).passthrough(),te=e.z.union([J,Z,$,ee]),oe=e.z.object({next_node:e.z.string(),coordinates:l}).passthrough(),ne=e.z.object({resume_flow:e.z.boolean().optional(),coordinates:l}).passthrough(),ie=e.z.object({id:e.z.string(),name:e.z.string(),languages:e.z.object({primary:e.z.string()}).passthrough(),nodes:e.z.array(te),start:oe,ending:ne,created_at:e.z.string(),updated_at:e.z.string(),links:e.z.object({sdkSrc:e.z.string().optional(),sdk_src:e.z.string().optional()}).passthrough()}).passthrough(),yt=ie.omit({id:true,created_at:true,updated_at:true});var E=(t=>(t.TOKEN="token",t.TOKEN_ID_TOKEN="token id_token",t.CODE="code",t))(E||{}),A=(t=>(t.QUERY="query",t.FRAGMENT="fragment",t.FORM_POST="form_post",t.WEB_MESSAGE="web_message",t.SAML_POST="saml_post",t))(A||{}),I=(t=>(t.S256="S256",t.Plain="plain",t))(I||{});const ae=e.z.object({client_id:e.z.string(),act_as:e.z.string().optional(),response_type:e.z.nativeEnum(E).optional(),response_mode:e.z.nativeEnum(A).optional(),redirect_uri:e.z.string().optional(),audience:e.z.string().optional(),organization:e.z.string().optional(),state:e.z.string().optional(),nonce:e.z.string().optional(),scope:e.z.string().optional(),prompt:e.z.string().optional(),code_challenge_method:e.z.nativeEnum(I).optional(),code_challenge:e.z.string().optional(),username:e.z.string().optional(),ui_locales:e.z.string().optional(),vendor_id:e.z.string().optional()}),Tt=e.z.object({colors:e.z.object({primary:e.z.string(),page_background:e.z.object({type:e.z.string().optional(),start:e.z.string().optional(),end:e.z.string().optional(),angle_deg:e.z.number().optional()}).optional()}).optional(),logo_url:e.z.string().optional(),favicon_url:e.z.string().optional(),powered_by_logo_url:e.z.string().optional(),font:e.z.object({url:e.z.string()}).optional()}),re=e.z.object({kid:e.z.string().optional(),team_id:e.z.string().optional(),realms:e.z.string().optional(),authentication_method:e.z.string().optional(),client_id:e.z.string().optional(),client_secret:e.z.string().optional(),app_secret:e.z.string().optional(),scope:e.z.string().optional(),authorization_endpoint:e.z.string().optional(),token_endpoint:e.z.string().optional(),userinfo_endpoint:e.z.string().optional(),jwks_uri:e.z.string().optional(),discovery_url:e.z.string().optional(),issuer:e.z.string().optional(),provider:e.z.string().optional(),from:e.z.string().optional(),twilio_sid:e.z.string().optional(),twilio_token:e.z.string().optional(),icon_url:e.z.string().optional()}),se=e.z.object({id:e.z.string().optional(),name:e.z.string(),display_name:e.z.string().optional(),strategy:e.z.string(),options:re.default({}),enabled_clients:e.z.array(e.z.string()).default([]).optional(),response_type:e.z.custom().optional(),response_mode:e.z.custom().optional(),is_domain_connection:e.z.boolean().optional(),show_as_button:e.z.boolean().optional(),metadata:e.z.record(e.z.any()).optional(),is_system:e.z.boolean().optional()}),le=e.z.object({id:e.z.string(),created_at:e.z.string().transform(t=>t===null?"":t),updated_at:e.z.string().transform(t=>t===null?"":t)}).extend(se.shape),ce=e.z.object({id:e.z.string().optional(),audience:e.z.string(),friendly_name:e.z.string(),picture_url:e.z.string().optional(),support_email:e.z.string().optional(),support_url:e.z.string().optional(),sender_email:e.z.string().email(),sender_name:e.z.string(),session_lifetime:e.z.number().optional(),idle_session_lifetime:e.z.number().optional(),ephemeral_session_lifetime:e.z.number().optional(),idle_ephemeral_session_lifetime:e.z.number().optional(),session_cookie:e.z.object({mode:e.z.enum(["persistent","non-persistent"]).optional()}).optional(),allowed_logout_urls:e.z.array(e.z.string()).optional(),default_redirection_uri:e.z.string().optional(),enabled_locales:e.z.array(e.z.string()).optional(),default_directory:e.z.string().optional(),error_page:e.z.object({html:e.z.string().optional(),show_log_link:e.z.boolean().optional(),url:e.z.string().optional()}).optional(),flags:e.z.object({allow_changing_enable_sso:e.z.boolean().optional(),allow_legacy_delegation_grant_types:e.z.boolean().optional(),allow_legacy_ro_grant_types:e.z.boolean().optional(),allow_legacy_tokeninfo_endpoint:e.z.boolean().optional(),change_pwd_flow_v1:e.z.boolean().optional(),custom_domains_provisioning:e.z.boolean().optional(),dashboard_insights_view:e.z.boolean().optional(),dashboard_log_streams_next:e.z.boolean().optional(),disable_clickjack_protection_headers:e.z.boolean().optional(),disable_fields_map_fix:e.z.boolean().optional(),disable_impersonation:e.z.boolean().optional(),disable_management_api_sms_obfuscation:e.z.boolean().optional(),enable_adfs_waad_email_verification:e.z.boolean().optional(),enable_apis_section:e.z.boolean().optional(),enable_client_connections:e.z.boolean().optional(),enable_custom_domain_in_emails:e.z.boolean().optional(),enable_dynamic_client_registration:e.z.boolean().optional(),enable_idtoken_api2:e.z.boolean().optional(),enable_legacy_logs_search_v2:e.z.boolean().optional(),enable_legacy_profile:e.z.boolean().optional(),enable_pipeline2:e.z.boolean().optional(),enable_public_signup_user_exists_error:e.z.boolean().optional(),enable_sso:e.z.boolean().optional(),enforce_client_authentication_on_passwordless_start:e.z.boolean().optional(),genai_trial:e.z.boolean().optional(),improved_signup_bot_detection_in_classic:e.z.boolean().optional(),mfa_show_factor_list_on_enrollment:e.z.boolean().optional(),no_disclose_enterprise_connections:e.z.boolean().optional(),remove_alg_from_jwks:e.z.boolean().optional(),revoke_refresh_token_grant:e.z.boolean().optional(),trust_azure_adfs_email_verified_connection_property:e.z.boolean().optional(),use_scope_descriptions_for_consent:e.z.boolean().optional(),inherit_global_permissions_in_organizations:e.z.boolean().optional()}).optional(),sandbox_version:e.z.string().optional(),legacy_sandbox_version:e.z.string().optional(),sandbox_versions_available:e.z.array(e.z.string()).optional(),change_password:e.z.object({enabled:e.z.boolean().optional(),html:e.z.string().optional()}).optional(),guardian_mfa_page:e.z.object({enabled:e.z.boolean().optional(),html:e.z.string().optional()}).optional(),device_flow:e.z.object({charset:e.z.enum(["base20","digits"]).optional(),mask:e.z.string().max(20).optional()}).optional(),default_token_quota:e.z.object({clients:e.z.object({client_credentials:e.z.record(e.z.any()).optional()}).optional(),organizations:e.z.object({client_credentials:e.z.record(e.z.any()).optional()}).optional()}).optional(),default_audience:e.z.string().optional(),default_organization:e.z.string().optional(),sessions:e.z.object({oidc_logout_prompt_enabled:e.z.boolean().optional()}).optional(),oidc_logout:e.z.object({rp_logout_end_session_endpoint_discovery:e.z.boolean().optional()}).optional(),allow_organization_name_in_authentication_api:e.z.boolean().optional(),customize_mfa_in_postlogin_action:e.z.boolean().optional(),acr_values_supported:e.z.array(e.z.string()).optional(),mtls:e.z.object({enable_endpoint_aliases:e.z.boolean().optional()}).optional(),pushed_authorization_requests_supported:e.z.boolean().optional(),authorization_response_iss_parameter_supported:e.z.boolean().optional()}),pe=e.z.object({created_at:e.z.string().nullable().transform(t=>t??""),updated_at:e.z.string().nullable().transform(t=>t??""),...ce.shape,id:e.z.string()}),Ot=e.z.object({...H.shape,tenant:pe,connections:e.z.array(le)}),_e=e.z.enum(["password_reset","email_verification","otp","authorization_code","oauth2_state","ticket"]),de=e.z.object({code_id:e.z.string().openapi({description:"The code that will be used in for instance an email verification flow"}),login_id:e.z.string().openapi({description:"The id of the login session that the code is connected to"}),connection_id:e.z.string().optional().openapi({description:"The connection that the code is connected to"}),code_type:_e,code_verifier:e.z.string().optional().openapi({description:"The code verifier used in PKCE in outbound flows"}),code_challenge:e.z.string().optional().openapi({description:"The code challenge used in PKCE in outbound flows"}),code_challenge_method:e.z.enum(["plain","S256"]).optional().openapi({description:"The code challenge method used in PKCE in outbound flows"}),redirect_uri:e.z.string().optional().openapi({description:"The redirect URI associated with the code"}),nonce:e.z.string().optional().openapi({description:"The nonce value used for security in OIDC flows"}),state:e.z.string().optional().openapi({description:"The state parameter used for CSRF protection in OAuth flows"}),expires_at:e.z.string(),used_at:e.z.string().optional(),user_id:e.z.string().optional()}),Nt=e.z.object({...de.shape,created_at:e.z.string()}),ze=e.z.object({domain:e.z.string(),custom_domain_id:e.z.string().optional(),type:e.z.enum(["auth0_managed_certs","self_managed_certs"]),verification_method:e.z.enum(["txt"]).optional(),tls_policy:e.z.enum(["recommended"]).optional(),custom_client_ip_header:e.z.enum(["true-client-ip","cf-connecting-ip","x-forwarded-for","x-azure-clientip","null"]).optional(),domain_metadata:e.z.record(e.z.string().max(255)).optional()}),ge=e.z.object({name:e.z.literal("txt"),record:e.z.string(),domain:e.z.string()}),me=e.z.object({...ze.shape,custom_domain_id:e.z.string(),primary:e.z.boolean(),status:e.z.enum(["disabled","pending","pending_verification","ready"]),origin_domain_name:e.z.string().optional(),verification:e.z.object({methods:e.z.array(ge)}).optional(),tls_policy:e.z.string().optional()}),Rt=me.extend({tenant_id:e.z.string()}),C=e.z.object({id:e.z.string(),order:e.z.number().optional(),visible:e.z.boolean().optional().default(true)}),i=C.extend({category:e.z.literal("BLOCK").optional()}),Lt=i.extend({type:e.z.literal("DIVIDER"),config:e.z.object({}).optional()}),Dt=i.extend({type:e.z.literal("HTML"),config:e.z.object({content:e.z.string().optional()}).optional()}),wt=i.extend({type:e.z.literal("IMAGE"),config:e.z.object({src:e.z.string().optional(),alt:e.z.string().optional(),width:e.z.number().optional(),height:e.z.number().optional()}).optional()}),jt=i.extend({type:e.z.literal("JUMP_BUTTON"),config:e.z.object({text:e.z.string().optional(),target_step:e.z.string().optional()})}),kt=i.extend({type:e.z.literal("RESEND_BUTTON"),config:e.z.object({text:e.z.string().optional(),resend_action:e.z.string().optional()})}),Ut=i.extend({type:e.z.literal("NEXT_BUTTON"),config:e.z.object({text:e.z.string().optional()})}),Ft=i.extend({type:e.z.literal("PREVIOUS_BUTTON"),config:e.z.object({text:e.z.string().optional()})}),vt=i.extend({type:e.z.literal("RICH_TEXT"),config:e.z.object({content:e.z.string().optional()}).optional()}),y=C.extend({category:e.z.literal("WIDGET").optional(),label:e.z.string().min(1).optional(),hint:e.z.string().min(1).max(500).optional(),required:e.z.boolean().optional(),sensitive:e.z.boolean().optional()}),xt=y.extend({type:e.z.literal("AUTH0_VERIFIABLE_CREDENTIALS"),config:e.z.object({credential_type:e.z.string().optional()})}),Pt=y.extend({type:e.z.literal("GMAPS_ADDRESS"),config:e.z.object({api_key:e.z.string().optional()})}),Mt=y.extend({type:e.z.literal("RECAPTCHA"),config:e.z.object({site_key:e.z.string().optional()})}),o=C.extend({category:e.z.literal("FIELD").optional(),label:e.z.string().min(1).optional(),hint:e.z.string().min(1).max(500).optional(),required:e.z.boolean().optional(),sensitive:e.z.boolean().optional()}),Ht=o.extend({type:e.z.literal("BOOLEAN"),config:e.z.object({default_value:e.z.boolean().optional()}).optional()}),Gt=o.extend({type:e.z.literal("CARDS"),config:e.z.object({options:e.z.array(e.z.object({value:e.z.string(),label:e.z.string(),description:e.z.string().optional(),image:e.z.string().optional()})).optional(),multi_select:e.z.boolean().optional()}).optional()}),Bt=o.extend({type:e.z.literal("CHOICE"),config:e.z.object({options:e.z.array(e.z.object({value:e.z.string(),label:e.z.string()})).optional(),display:e.z.enum(["radio","checkbox"]).optional()}).optional()}),Kt=o.extend({type:e.z.literal("CUSTOM"),config:e.z.object({component:e.z.string().optional(),props:e.z.record(e.z.any()).optional()})}),Wt=o.extend({type:e.z.literal("DATE"),config:e.z.object({format:e.z.string().optional(),min:e.z.string().optional(),max:e.z.string().optional()}).optional()}),Vt=o.extend({type:e.z.literal("DROPDOWN"),config:e.z.object({options:e.z.array(e.z.object({value:e.z.string(),label:e.z.string()})).optional(),placeholder:e.z.string().optional(),searchable:e.z.boolean().optional()}).optional()}),Xt=o.extend({type:e.z.literal("EMAIL"),config:e.z.object({placeholder:e.z.string().optional()}).optional()}),qt=o.extend({type:e.z.literal("FILE"),config:e.z.object({accept:e.z.string().optional(),max_size:e.z.number().optional(),multiple:e.z.boolean().optional()}).optional()}),Yt=o.extend({type:e.z.literal("LEGAL"),config:e.z.object({text:e.z.string(),html:e.z.boolean().optional()}).optional()}),Qt=o.extend({type:e.z.literal("NUMBER"),config:e.z.object({placeholder:e.z.string().optional(),min:e.z.number().optional(),max:e.z.number().optional(),step:e.z.number().optional()}).optional()}),Jt=o.extend({type:e.z.literal("PASSWORD"),config:e.z.object({placeholder:e.z.string().optional(),min_length:e.z.number().optional(),show_toggle:e.z.boolean().optional(),forgot_password_link:e.z.string().optional()}).optional()}),Zt=o.extend({type:e.z.literal("PAYMENT"),config:e.z.object({provider:e.z.string().optional(),currency:e.z.string().optional()}).optional()}),$t=o.extend({type:e.z.literal("SOCIAL"),config:e.z.object({providers:e.z.array(e.z.string()).optional()}).optional()}),eo=o.extend({type:e.z.literal("TEL"),config:e.z.object({placeholder:e.z.string().optional(),default_country:e.z.string().optional()}).optional()}),to=o.extend({type:e.z.literal("TEXT"),config:e.z.object({placeholder:e.z.string().optional(),multiline:e.z.boolean().optional(),max_length:e.z.number().optional()}).optional()}),oo=o.extend({type:e.z.literal("URL"),config:e.z.object({placeholder:e.z.string().optional()}).optional()}),ue=e.z.discriminatedUnion("type",[Lt,Dt,wt,jt,kt,Ut,Ft,vt]),he=e.z.discriminatedUnion("type",[xt,Pt,Mt]),Se=e.z.discriminatedUnion("type",[Ht,Gt,Bt,Kt,Wt,Vt,Xt,qt,Yt,Qt,Jt,Zt,$t,eo,to,oo]),T=e.z.union([ue,he,Se]),no=e.z.object({id:e.z.string(),type:e.z.literal("submit"),label:e.z.string(),className:e.z.string().optional(),disabled:e.z.boolean().optional().default(false),order:e.z.number().optional(),visible:e.z.boolean().optional().default(true),customizations:e.z.record(e.z.string(),e.z.any()).optional()}),_=e.z.object({x:e.z.number(),y:e.z.number()}),io=e.z.object({id:e.z.string(),type:e.z.literal("FLOW"),coordinates:_,alias:e.z.string().min(1).max(150).optional(),config:e.z.object({flow_id:e.z.string().max(30),next_node:e.z.string().optional()})}),ao=e.z.object({id:e.z.string(),type:e.z.literal("ROUTER"),coordinates:_,alias:e.z.string().min(1).max(150),config:e.z.object({rules:e.z.array(e.z.object({id:e.z.string(),alias:e.z.string().min(1).max(150).optional(),condition:e.z.any(),next_node:e.z.string()})),fallback:e.z.string()})}),ro=e.z.object({id:e.z.string(),type:e.z.literal("STEP"),coordinates:_,alias:e.z.string().min(1).max(150).optional(),config:e.z.object({components:e.z.array(T),next_node:e.z.string().optional()})}),be=e.z.discriminatedUnion("type",[io,ao,ro]),fe=e.z.object({name:e.z.string().openapi({description:"The name of the form"}),messages:e.z.object({errors:e.z.record(e.z.string(),e.z.any()).optional(),custom:e.z.record(e.z.string(),e.z.any()).optional()}).optional(),languages:e.z.object({primary:e.z.string().optional(),default:e.z.string().optional()}).optional(),translations:e.z.record(e.z.string(),e.z.any()).optional(),nodes:e.z.array(be).optional(),start:e.z.object({hidden_fields:e.z.array(e.z.object({key:e.z.string(),value:e.z.string()})).optional(),next_node:e.z.string().optional(),coordinates:_.optional()}).optional(),ending:e.z.object({redirection:e.z.object({delay:e.z.number().optional(),target:e.z.string().optional()}).optional(),after_submit:e.z.object({flow_id:e.z.string().optional()}).optional(),coordinates:_.optional(),resume_flow:e.z.boolean().optional()}).optional(),style:e.z.object({css:e.z.string().optional()}).optional()}).openapi({description:"Schema for flow-based forms (matches Auth0 Forms structure)"}),so=e.z.object({...s.shape,...fe.shape,id:e.z.string()}),Ee=e.z.object({id:e.z.number().optional(),text:e.z.string(),type:e.z.enum(["info","error","success","warning"])}),Ae=e.z.object({id:e.z.string().optional(),text:e.z.string(),href:e.z.string(),linkText:e.z.string().optional()}),lo=e.z.object({action:e.z.string(),method:e.z.enum(["POST","GET"]),title:e.z.string().optional(),description:e.z.string().optional(),components:e.z.array(T),messages:e.z.array(Ee).optional(),links:e.z.array(Ae).optional()});function co(t){return t.category==="BLOCK"}function po(t){return t.category==="WIDGET"}function _o(t){return t.category==="FIELD"}const Ie=e.z.enum(["pre-user-registration","post-user-registration","post-user-login","validate-registration-username","pre-user-deletion","post-user-deletion"]),Ce=e.z.enum(["pre-user-registration","post-user-registration","post-user-login","validate-registration-username","pre-user-deletion","post-user-deletion"]),m={enabled:e.z.boolean().default(false),synchronous:e.z.boolean().default(false),priority:e.z.number().optional(),hook_id:e.z.string().optional()},zo=e.z.object({...m,trigger_id:Ie,url:e.z.string()}),go=e.z.object({...m,trigger_id:Ce,form_id:e.z.string()}),mo=e.z.union([zo,go]),uo=e.z.object({...m,trigger_id:Ie,...s.shape,hook_id:e.z.string(),url:e.z.string()}),ho=e.z.object({...m,trigger_id:Ce,...s.shape,hook_id:e.z.string(),form_id:e.z.string()}),So=e.z.union([uo,ho]),ye=e.z.object({name:e.z.string().optional()}),Te=e.z.object({email:e.z.string().optional()}),Oe=e.z.object({organization_id:e.z.string().max(50),inviter:ye,invitee:Te,invitation_url:e.z.string().url(),client_id:e.z.string(),connection_id:e.z.string().optional(),app_metadata:e.z.record(e.z.any()).default({}).optional(),user_metadata:e.z.record(e.z.any()).default({}).optional(),ttl_sec:e.z.number().int().max(2592e3).default(604800).optional(),roles:e.z.array(e.z.string()).default([]).optional(),send_invitation_email:e.z.boolean().default(true).optional()}),bo=e.z.object({id:e.z.string(),organization_id:e.z.string().max(50),created_at:e.z.string().datetime(),expires_at:e.z.string().datetime(),ticket_id:e.z.string().optional()}).extend(Oe.shape),Ne=e.z.object({alg:e.z.enum(["RS256","RS384","RS512","ES256","ES384","ES512","HS256","HS384","HS512"]),e:e.z.string(),kid:e.z.string(),kty:e.z.enum(["RSA","EC","oct"]),n:e.z.string(),x5t:e.z.string().optional(),x5c:e.z.array(e.z.string()).optional(),use:e.z.enum(["sig","enc"]).optional()}),fo=e.z.object({keys:e.z.array(Ne)}),Eo=e.z.object({issuer:e.z.string(),authorization_endpoint:e.z.string(),token_endpoint:e.z.string(),device_authorization_endpoint:e.z.string(),userinfo_endpoint:e.z.string(),mfa_challenge_endpoint:e.z.string(),jwks_uri:e.z.string(),registration_endpoint:e.z.string(),revocation_endpoint:e.z.string(),scopes_supported:e.z.array(e.z.string()),response_types_supported:e.z.array(e.z.string()),code_challenge_methods_supported:e.z.array(e.z.string()),response_modes_supported:e.z.array(e.z.string()),subject_types_supported:e.z.array(e.z.string()),id_token_signing_alg_values_supported:e.z.array(e.z.string()),token_endpoint_auth_methods_supported:e.z.array(e.z.string()),claims_supported:e.z.array(e.z.string()),request_uri_parameter_supported:e.z.boolean(),request_parameter_supported:e.z.boolean(),token_endpoint_auth_signing_alg_values_supported:e.z.array(e.z.string())}),Re=e.z.object({csrf_token:e.z.string(),auth0Client:e.z.string().optional(),authParams:ae,expires_at:e.z.string(),deleted_at:e.z.string().optional(),ip:e.z.string().optional(),useragent:e.z.string().optional(),session_id:e.z.string().optional(),authorization_url:e.z.string().optional(),login_completed:e.z.boolean().optional().default(false)}).openapi({description:"This represents a login sesion"}),Ao=e.z.object({...Re.shape,id:e.z.string().openapi({description:"This is is used as the state in the universal login"}),created_at:e.z.string(),updated_at:e.z.string()}),Le={ACLS_SUMMARY:"acls_summary",ACTIONS_EXECUTION_FAILED:"actions_execution_failed",API_LIMIT:"api_limit",API_LIMIT_WARNING:"api_limit_warning",APPI:"appi",CIBA_EXCHANGE_FAILED:"ciba_exchange_failed",CIBA_EXCHANGE_SUCCEEDED:"ciba_exchange_succeeded",CIBA_START_FAILED:"ciba_start_failed",CIBA_START_SUCCEEDED:"ciba_start_succeeded",CODE_LINK_SENT:"cls",CODE_SENT:"cs",DEPRECATION_NOTICE:"depnote",FAILED_LOGIN:"f",FAILED_BY_CONNECTOR:"fc",FAILED_CHANGE_EMAIL:"fce",FAILED_BY_CORS:"fco",FAILED_CROSS_ORIGIN_AUTHENTICATION:"fcoa",FAILED_CHANGE_PASSWORD:"fcp",FAILED_POST_CHANGE_PASSWORD_HOOK:"fcph",FAILED_CHANGE_PHONE_NUMBER:"fcpn",FAILED_CHANGE_PASSWORD_REQUEST:"fcpr",FAILED_CONNECTOR_PROVISIONING:"fcpro",FAILED_CHANGE_USERNAME:"fcu",FAILED_DELEGATION:"fd",FAILED_DEVICE_ACTIVATION:"fdeac",FAILED_DEVICE_AUTHORIZATION_REQUEST:"fdeaz",USER_CANCELED_DEVICE_CONFIRMATION:"fdecc",FAILED_USER_DELETION:"fdu",FAILED_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN:"feacft",FAILED_EXCHANGE_ACCESS_TOKEN_FOR_CLIENT_CREDENTIALS:"feccft",FAILED_EXCHANGE_CUSTOM_TOKEN:"fecte",FAILED_EXCHANGE_DEVICE_CODE_FOR_ACCESS_TOKEN:"fede",FAILED_FEDERATED_LOGOUT:"federated_logout_failed",FAILED_EXCHANGE_NATIVE_SOCIAL_LOGIN:"fens",FAILED_EXCHANGE_PASSWORD_OOB_FOR_ACCESS_TOKEN:"feoobft",FAILED_EXCHANGE_PASSWORD_OTP_FOR_ACCESS_TOKEN:"feotpft",FAILED_EXCHANGE_PASSWORD_FOR_ACCESS_TOKEN:"fepft",FAILED_EXCHANGE_PASSWORDLESS_OTP_FOR_ACCESS_TOKEN:"fepotpft",FAILED_EXCHANGE_PASSWORD_MFA_RECOVERY_FOR_ACCESS_TOKEN:"fercft",FAILED_EXCHANGE_ROTATING_REFRESH_TOKEN:"ferrt",FAILED_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN:"fertft",FAILED_HOOK:"fh",FAILED_INVITE_ACCEPT:"fi",FAILED_LOGOUT:"flo",FLOWS_EXECUTION_COMPLETED:"flows_execution_completed",FLOWS_EXECUTION_FAILED:"flows_execution_failed",FAILED_SENDING_NOTIFICATION:"fn",FORMS_SUBMISSION_FAILED:"forms_submission_failed",FORMS_SUBMISSION_SUCCEEDED:"forms_submission_succeeded",FAILED_LOGIN_INCORRECT_PASSWORD:"fp",FAILED_PUSHED_AUTHORIZATION_REQUEST:"fpar",FAILED_POST_USER_REGISTRATION_HOOK:"fpurh",FAILED_SIGNUP:"fs",FAILED_SILENT_AUTH:"fsa",FAILED_LOGIN_INVALID_EMAIL_USERNAME:"fu",FAILED_USERS_IMPORT:"fui",FAILED_VERIFICATION_EMAIL:"fv",FAILED_VERIFICATION_EMAIL_REQUEST:"fvr",EMAIL_VERIFICATION_CONFIRMED:"gd_auth_email_verification",EMAIL_VERIFICATION_FAILED:"gd_auth_fail_email_verification",MFA_AUTH_FAILED:"gd_auth_failed",MFA_AUTH_REJECTED:"gd_auth_rejected",MFA_AUTH_SUCCESS:"gd_auth_succeed",MFA_ENROLLMENT_COMPLETE:"gd_enrollment_complete",TOO_MANY_MFA_FAILURES:"gd_otp_rate_limit_exceed",MFA_RECOVERY_FAILED:"gd_recovery_failed",MFA_RECOVERY_RATE_LIMIT_EXCEED:"gd_recovery_rate_limit_exceed",MFA_RECOVERY_SUCCESS:"gd_recovery_succeed",MFA_EMAIL_SENT:"gd_send_email",EMAIL_VERIFICATION_SENT:"gd_send_email_verification",EMAIL_VERIFICATION_SEND_FAILURE:"gd_send_email_verification_failure",PUSH_NOTIFICATION_SENT:"gd_send_pn",ERROR_SENDING_MFA_PUSH_NOTIFICATION:"gd_send_pn_failure",MFA_SMS_SENT:"gd_send_sms",ERROR_SENDING_MFA_SMS:"gd_send_sms_failure",MFA_VOICE_CALL_SUCCESS:"gd_send_voice",MFA_VOICE_CALL_FAILED:"gd_send_voice_failure",SECOND_FACTOR_STARTED:"gd_start_auth",MFA_ENROLL_STARTED:"gd_start_enroll",MFA_ENROLLMENT_FAILED:"gd_start_enroll_failed",GUARDIAN_TENANT_UPDATE:"gd_tenant_update",UNENROLL_DEVICE_ACCOUNT:"gd_unenroll",UPDATE_DEVICE_ACCOUNT:"gd_update_device_account",WEBAUTHN_CHALLENGE_FAILED:"gd_webauthn_challenge_failed",WEBAUTHN_ENROLLMENT_FAILED:"gd_webauthn_enrollment_failed",FAILED_KMS_API_OPERATION:"kms_key_management_failure",SUCCESS_KMS_API_OPERATION:"kms_key_management_success",KMS_KEY_STATE_CHANGED:"kms_key_state_changed",TOO_MANY_CALLS_TO_DELEGATION:"limit_delegation",BLOCKED_IP_ADDRESS:"limit_mu",BLOCKED_ACCOUNT_IP:"limit_sul",BLOCKED_ACCOUNT_EMAIL:"limit_wc",MFA_REQUIRED:"mfar",MANAGEMENT_API_READ_OPERATION:"mgmt_api_read",FAILED_AUTHENTICATION_METHOD_OPERATION_MY_ACCOUNT:"my_account_authentication_method_failed",SUCCESSFUL_AUTHENTICATION_METHOD_OPERATION_MY_ACCOUNT:"my_account_authentication_method_succeeded",FAILED_OIDC_BACKCHANNEL_LOGOUT:"oidc_backchannel_logout_failed",SUCCESSFUL_OIDC_BACKCHANNEL_LOGOUT:"oidc_backchannel_logout_succeeded",ORGANIZATION_MEMBER_ADDED:"organization_member_added",PASSKEY_CHALLENGE_FAILED:"passkey_challenge_failed",PASSKEY_CHALLENGE_STARTED:"passkey_challenge_started",PRE_LOGIN_ASSESSMENT:"pla",BREACHED_PASSWORD:"pwd_leak",BREACHED_PASSWORD_ON_RESET:"reset_pwd_leak",SUCCESS_RESOURCE_CLEANUP:"resource_cleanup",RICH_CONSENTS_ACCESS_ERROR:"rich_consents_access_error",SUCCESS_LOGIN:"s",SUCCESS_API_OPERATION:"sapi",SUCCESS_CHANGE_EMAIL:"sce",SUCCESS_CROSS_ORIGIN_AUTHENTICATION:"scoa",SUCCESS_CHANGE_PASSWORD:"scp",SUCCESS_CHANGE_PHONE_NUMBER:"scpn",SUCCESS_CHANGE_PASSWORD_REQUEST:"scpr",SUCCESS_CHANGE_USERNAME:"scu",SUCCESS_CREDENTIAL_VALIDATION:"scv",SUCCESS_DELEGATION:"sd",SUCCESS_USER_DELETION:"sdu",SUCCESS_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN:"seacft",SUCCESS_EXCHANGE_ACCESS_TOKEN_FOR_CLIENT_CREDENTIALS:"seccft",SUCCESS_EXCHANGE_CUSTOM_TOKEN:"secte",SUCCESS_EXCHANGE_DEVICE_CODE_FOR_ACCESS_TOKEN:"sede",SUCCESS_EXCHANGE_NATIVE_SOCIAL_LOGIN:"sens",SUCCESS_EXCHANGE_PASSWORD_OOB_FOR_ACCESS_TOKEN:"seoobft",SUCCESS_EXCHANGE_PASSWORD_OTP_FOR_ACCESS_TOKEN:"seotpft",SUCCESS_EXCHANGE_PASSWORD_FOR_ACCESS_TOKEN:"sepft",SUCCESS_EXCHANGE_PASSKEY_OOB_FOR_ACCESS_TOKEN:"sepkoobft",SUCCESS_EXCHANGE_PASSKEY_OTP_FOR_ACCESS_TOKEN:"sepkotpft",SUCCESS_EXCHANGE_PASSKEY_MFA_RECOVERY_FOR_ACCESS_TOKEN:"sepkrcft",SUCCESS_EXCHANGE_PASSWORD_MFA_RECOVERY_FOR_ACCESS_TOKEN:"sercft",SUCCESS_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN:"sertft",SUCCESSFULLY_ACCEPTED_USER_INVITE:"si",BREACHED_PASSWORD_ON_SIGNUP:"signup_pwd_leak",SUCCESS_LOGOUT:"slo",SUCCESS_REVOCATION:"srrt",SUCCESS_SIGNUP:"ss",FAILED_SS_SSO_OPERATION:"ss_sso_failure",INFORMATION_FROM_SS_SSO_OPERATION:"ss_sso_info",SUCCESS_SS_SSO_OPERATION:"ss_sso_success",SUCCESS_SILENT_AUTH:"ssa",SUCCESSFUL_SCIM_OPERATION:"sscim",SUCCESSFULLY_IMPORTED_USERS:"sui",SUCCESS_VERIFICATION_EMAIL:"sv",SUCCESS_VERIFICATION_EMAIL_REQUEST:"svr",MAX_AMOUNT_OF_AUTHENTICATORS:"too_many_records",USER_LOGIN_BLOCK_RELEASED:"ublkdu",FAILED_UNIVERSAL_LOGOUT:"universal_logout_failed",SUCCESSFUL_UNIVERSAL_LOGOUT:"universal_logout_succeeded",WARNING_DURING_LOGIN:"w",WARNING_SENDING_NOTIFICATION:"wn",WARNING_USER_MANAGEMENT:"wum"},Io=e.z.string().refine(t=>Object.values(Le).includes(t),{message:"Invalid log type"}),De=e.z.object({name:e.z.string(),version:e.z.string(),env:e.z.object({node:e.z.string().optional()}).optional()}),we=e.z.object({country_code:e.z.string().length(2),city_name:e.z.string(),latitude:e.z.string(),longitude:e.z.string(),time_zone:e.z.string(),continent_code:e.z.string()}),je=e.z.object({type:Io,date:e.z.string(),description:e.z.string().optional(),ip:e.z.string().optional(),user_agent:e.z.string().optional(),details:e.z.any().optional(),isMobile:e.z.boolean(),user_id:e.z.string().optional(),user_name:e.z.string().optional(),connection:e.z.string().optional(),connection_id:e.z.string().optional(),client_id:e.z.string().optional(),client_name:e.z.string().optional(),audience:e.z.string().optional(),scope:e.z.string().optional(),strategy:e.z.string().optional(),strategy_type:e.z.string().optional(),hostname:e.z.string().optional(),auth0_client:De.optional(),log_id:e.z.string().optional(),location_info:we.optional()}),Co=e.z.object({...je.shape,log_id:e.z.string()}),ke=e.z.object({id:e.z.string().optional(),user_id:e.z.string(),password:e.z.string(),algorithm:e.z.enum(["bcrypt","argon2id"]).default("argon2id"),is_current:e.z.boolean().default(true)}),yo=ke.extend({id:e.z.string(),created_at:e.z.string(),updated_at:e.z.string()}),Ue=e.z.object({initial_user_agent:e.z.string().describe("First user agent of the device from which this user logged in"),initial_ip:e.z.string().describe("First IP address associated with this session"),initial_asn:e.z.string().describe("First autonomous system number associated with this session"),last_user_agent:e.z.string().describe("Last user agent of the device from which this user logged in"),last_ip:e.z.string().describe("Last IP address from which this user logged in"),last_asn:e.z.string().describe("Last autonomous system number from which this user logged in")}),Fe=e.z.object({id:e.z.string(),revoked_at:e.z.string().optional(),used_at:e.z.string().optional(),user_id:e.z.string().describe("The user ID associated with the session"),expires_at:e.z.string().optional(),login_session_id:e.z.string(),idle_expires_at:e.z.string().optional(),device:Ue.describe("Metadata related to the device used in the session"),clients:e.z.array(e.z.string()).describe("List of client details for the session")}),To=e.z.object({created_at:e.z.string(),updated_at:e.z.string(),authenticated_at:e.z.string(),last_interaction_at:e.z.string(),...Fe.shape}),Oo=e.z.object({kid:e.z.string().openapi({description:"The key id of the signing key"}),cert:e.z.string().openapi({description:"The public certificate of the signing key"}),fingerprint:e.z.string().openapi({description:"The cert fingerprint"}),thumbprint:e.z.string().openapi({description:"The cert thumbprint"}),pkcs7:e.z.string().optional().openapi({description:"The private key in pkcs7 format"}),current:e.z.boolean().optional().openapi({description:"True if the key is the current key"}),next:e.z.boolean().optional().openapi({description:"True if the key is the next key"}),previous:e.z.boolean().optional().openapi({description:"True if the key is the previous key"}),current_since:e.z.string().optional().openapi({description:"The date and time when the key became the current key"}),current_until:e.z.string().optional().openapi({description:"The date and time when the current key was rotated"}),revoked:e.z.boolean().optional().openapi({description:"True if the key is revoked"}),revoked_at:e.z.string().optional().openapi({description:"The date and time when the key was revoked"}),connection:e.z.string().optional().openapi({description:"The connection identifier associated with the key"}),type:e.z.enum(["jwt_signing","saml_encryption"]).openapi({description:"The type of the signing key"})});var ve=(t=>(t.RefreshToken="refresh_token",t.AuthorizationCode="authorization_code",t.ClientCredential="client_credentials",t.Passwordless="passwordless",t.Password="password",t.OTP="http://auth0.com/oauth/grant-type/passwordless/otp",t))(ve||{});const No=e.z.object({access_token:e.z.string(),id_token:e.z.string().optional(),scope:e.z.string().optional(),state:e.z.string().optional(),refresh_token:e.z.string().optional(),token_type:e.z.string(),expires_in:e.z.number()});e.z.object({code:e.z.string(),state:e.z.string().optional()});const xe=e.z.object({button_border_radius:e.z.number(),button_border_weight:e.z.number(),buttons_style:e.z.enum(["pill","rounded","sharp"]),input_border_radius:e.z.number(),input_border_weight:e.z.number(),inputs_style:e.z.enum(["pill","rounded","sharp"]),show_widget_shadow:e.z.boolean(),widget_border_weight:e.z.number(),widget_corner_radius:e.z.number()}),Pe=e.z.object({base_focus_color:e.z.string(),base_hover_color:e.z.string(),body_text:e.z.string(),captcha_widget_theme:e.z.enum(["auto","dark","light"]),error:e.z.string(),header:e.z.string(),icons:e.z.string(),input_background:e.z.string(),input_border:e.z.string(),input_filled_text:e.z.string(),input_labels_placeholders:e.z.string(),links_focused_components:e.z.string(),primary_button:e.z.string(),primary_button_label:e.z.string(),secondary_button_border:e.z.string(),secondary_button_label:e.z.string(),success:e.z.string(),widget_background:e.z.string(),widget_border:e.z.string()}),r=e.z.object({bold:e.z.boolean(),size:e.z.number()}),Me=e.z.object({body_text:r,buttons_text:r,font_url:e.z.string(),input_labels:r,links:r,links_style:e.z.enum(["normal","underlined"]),reference_text_size:e.z.number(),subtitle:r,title:r}),He=e.z.object({background_color:e.z.string(),background_image_url:e.z.string(),page_layout:e.z.enum(["center","left","right"])}),Ge=e.z.object({header_text_alignment:e.z.enum(["center","left","right"]),logo_height:e.z.number(),logo_position:e.z.enum(["center","left","none","right"]),logo_url:e.z.string(),social_buttons_layout:e.z.enum(["bottom","top"])}),Be=e.z.object({borders:xe,colors:Pe,displayName:e.z.string(),fonts:Me,page_background:He,widget:Ge}),Ro=Be.extend({themeId:e.z.string()}),Lo=e.z.object({universal_login_experience:e.z.enum(["new","classic"]).default("new"),identifier_first:e.z.boolean().default(true),password_first:e.z.boolean().default(false),webauthn_platform_first_factor:e.z.boolean()}),Do=e.z.object({name:e.z.string(),enabled:e.z.boolean().optional().default(true),default_from_address:e.z.string().optional(),credentials:e.z.union([e.z.object({accessKeyId:e.z.string(),secretAccessKey:e.z.string(),region:e.z.string()}),e.z.object({smtp_host:e.z.array(e.z.string()),smtp_port:e.z.number(),smtp_user:e.z.string(),smtp_pass:e.z.string()}),e.z.object({api_key:e.z.string(),domain:e.z.string().optional()}),e.z.object({connectionString:e.z.string()}),e.z.object({tenantId:e.z.string(),clientId:e.z.string(),clientSecret:e.z.string()})]),settings:e.z.object({}).optional()}),Ke=e.z.object({id:e.z.string(),session_id:e.z.string(),user_id:e.z.string(),client_id:e.z.string(),expires_at:e.z.string().optional(),idle_expires_at:e.z.string().optional(),last_exchanged_at:e.z.string().optional(),device:Ue,resource_servers:e.z.array(e.z.object({audience:e.z.string(),scopes:e.z.string()})),rotating:e.z.boolean()}),wo=e.z.object({created_at:e.z.string(),...Ke.shape}),jo=e.z.object({to:e.z.string(),message:e.z.string()}),ko=e.z.object({name:e.z.string(),options:e.z.object({})}),We=e.z.object({value:e.z.string(),description:e.z.string().optional()}),Ve=e.z.object({token_dialect:e.z.enum(["access_token","access_token_authz"]).optional(),enforce_policies:e.z.boolean().optional(),allow_skipping_userinfo:e.z.boolean().optional(),skip_userinfo:e.z.boolean().optional(),persist_client_authorization:e.z.boolean().optional(),enable_introspection_endpoint:e.z.boolean().optional(),mtls:e.z.object({bound_access_tokens:e.z.boolean().optional()}).optional()}),Xe=e.z.object({id:e.z.string().optional(),name:e.z.string(),identifier:e.z.string(),scopes:e.z.array(We).optional(),signing_alg:e.z.string().optional(),signing_secret:e.z.string().optional(),token_lifetime:e.z.number().optional(),token_lifetime_for_web:e.z.number().optional(),skip_consent_for_verifiable_first_party_clients:e.z.boolean().optional(),allow_offline_access:e.z.boolean().optional(),verificationKey:e.z.string().optional(),options:Ve.optional(),is_system:e.z.boolean().optional()}),qe=e.z.object({...Xe.shape,created_at:e.z.string().optional(),updated_at:e.z.string().optional()}),Uo=e.z.array(qe),Ye=e.z.object({role_id:e.z.string(),resource_server_identifier:e.z.string(),permission_name:e.z.string()}),Qe=e.z.object({...Ye.shape,created_at:e.z.string()}),Fo=e.z.array(Qe),Je=e.z.object({user_id:e.z.string(),resource_server_identifier:e.z.string(),permission_name:e.z.string(),organization_id:e.z.string().optional()}),Ze=e.z.object({...Je.shape,tenant_id:e.z.string(),created_at:e.z.string().optional()}),vo=e.z.array(Ze),$e=e.z.object({user_id:e.z.string(),resource_server_identifier:e.z.string(),resource_server_name:e.z.string(),permission_name:e.z.string(),description:e.z.string().nullable().optional(),created_at:e.z.string().optional(),organization_id:e.z.string().optional()}),xo=e.z.array($e),et=e.z.object({user_id:e.z.string(),role_id:e.z.string(),organization_id:e.z.string().optional()}),tt=e.z.object({...et.shape,tenant_id:e.z.string(),created_at:e.z.string().optional()}),Po=e.z.array(tt),ot=e.z.object({id:e.z.string().optional().openapi({description:"The unique identifier of the role. If not provided, one will be generated."}),name:e.z.string().min(1).max(50).openapi({description:"The name of the role. Cannot include '<' or '>'"}),description:e.z.string().max(255).optional().openapi({description:"The description of the role"}),is_system:e.z.boolean().optional()}),nt=ot.extend({id:e.z.string().openapi({description:"The unique identifier of the role"}),created_at:e.z.string().optional(),updated_at:e.z.string().optional()}),Mo=e.z.array(nt),it=e.z.object({logo_url:e.z.string().optional().openapi({description:"URL of the organization's logo"}),colors:e.z.object({primary:e.z.string().optional().openapi({description:"Primary color in hex format (e.g., #FF0000)"}),page_background:e.z.string().optional().openapi({description:"Page background color in hex format (e.g., #FFFFFF)"})}).optional()}).optional(),at=e.z.object({connection_id:e.z.string().openapi({description:"ID of the connection"}),assign_membership_on_login:e.z.boolean().default(false).openapi({description:"Whether to assign membership to the organization on login"}),show_as_button:e.z.boolean().default(true).openapi({description:"Whether to show this connection as a button in the login screen"}),is_signup_enabled:e.z.boolean().default(true).openapi({description:"Whether signup is enabled for this connection"})}),rt=e.z.object({client_credentials:e.z.object({enforce:e.z.boolean().default(false).openapi({description:"Whether to enforce token quota limits"}),per_day:e.z.number().min(0).default(0).openapi({description:"Maximum tokens per day (0 = unlimited)"}),per_hour:e.z.number().min(0).default(0).openapi({description:"Maximum tokens per hour (0 = unlimited)"})}).optional()}).optional(),st=e.z.object({id:e.z.string().optional(),name:e.z.string().min(1).regex(/^[a-z0-9_-]+$/,{message:"Organization name must be lowercase and can only contain letters, numbers, hyphens, and underscores"}).openapi({description:"The name of the organization. Must be lowercase and can only contain letters, numbers, hyphens, and underscores."}),display_name:e.z.string().optional().openapi({description:"The display name of the organization"}),branding:it,metadata:e.z.record(e.z.any()).default({}).optional().openapi({description:"Custom metadata for the organization"}),enabled_connections:e.z.array(at).default([]).optional().openapi({description:"List of enabled connections for the organization"}),token_quota:rt}),Ho=e.z.object({...st.shape,...s.shape,id:e.z.string(),name:e.z.string().min(1).openapi({description:"The name of the organization"})}),lt=e.z.object({user_id:e.z.string().openapi({description:"ID of the user"}),organization_id:e.z.string().openapi({description:"ID of the organization"})}),Go=e.z.object({...lt.shape,...s.shape,id:e.z.string()}),Bo=e.z.object({idle_session_lifetime:e.z.number().optional(),session_lifetime:e.z.number().optional(),session_cookie:e.z.object({mode:e.z.enum(["persistent","non-persistent"]).optional()}).optional(),enable_client_connections:e.z.boolean().optional(),default_redirection_uri:e.z.string().optional(),enabled_locales:e.z.array(e.z.string()).optional(),default_directory:e.z.string().optional(),error_page:e.z.object({html:e.z.string().optional(),show_log_link:e.z.boolean().optional(),url:e.z.string().optional()}).optional(),flags:e.z.object({allow_legacy_delegation_grant_types:e.z.boolean().optional(),allow_legacy_ro_grant_types:e.z.boolean().optional(),allow_legacy_tokeninfo_endpoint:e.z.boolean().optional(),disable_clickjack_protection_headers:e.z.boolean().optional(),enable_apis_section:e.z.boolean().optional(),enable_client_connections:e.z.boolean().optional(),enable_custom_domain_in_emails:e.z.boolean().optional(),enable_dynamic_client_registration:e.z.boolean().optional(),enable_idtoken_api2:e.z.boolean().optional(),enable_legacy_logs_search_v2:e.z.boolean().optional(),enable_legacy_profile:e.z.boolean().optional(),enable_pipeline2:e.z.boolean().optional(),enable_public_signup_user_exists_error:e.z.boolean().optional(),use_scope_descriptions_for_consent:e.z.boolean().optional(),disable_management_api_sms_obfuscation:e.z.boolean().optional(),enable_adfs_waad_email_verification:e.z.boolean().optional(),revoke_refresh_token_grant:e.z.boolean().optional(),dashboard_log_streams_next:e.z.boolean().optional(),dashboard_insights_view:e.z.boolean().optional(),disable_fields_map_fix:e.z.boolean().optional(),mfa_show_factor_list_on_enrollment:e.z.boolean().optional()}).optional(),friendly_name:e.z.string().optional(),picture_url:e.z.string().optional(),support_email:e.z.string().optional(),support_url:e.z.string().optional(),sandbox_version:e.z.string().optional(),sandbox_versions_available:e.z.array(e.z.string()).optional(),change_password:e.z.object({enabled:e.z.boolean(),html:e.z.string()}).optional(),guardian_mfa_page:e.z.object({enabled:e.z.boolean(),html:e.z.string()}).optional(),default_audience:e.z.string().optional(),default_organization:e.z.string().optional(),sessions:e.z.object({oidc_logout_prompt_enabled:e.z.boolean().optional()}).optional()}),Ko=e.z.object({date:e.z.string().openapi({description:"Date these events occurred in ISO 8601 format",example:"2025-12-19"}),logins:e.z.number().openapi({description:"Number of logins on this date",example:150}),signups:e.z.number().openapi({description:"Number of signups on this date",example:25}),leaked_passwords:e.z.number().openapi({description:"Number of breached-password detections on this date (subscription required)",example:0}),updated_at:e.z.string().openapi({description:"Date and time this stats entry was last updated in ISO 8601 format",example:"2025-12-19T10:30:00.000Z"}),created_at:e.z.string().openapi({description:"Approximate date and time the first event occurred in ISO 8601 format",example:"2025-12-19T00:00:00.000Z"})}),Wo=e.z.number().openapi({description:"Number of active users in the last 30 days",example:1234});function Vo(t){const[a,c]=t.split("|");if(!a||!c)throw new Error(`Invalid user_id: ${t}`);return {connection:a,id:c}}function Xo(t){const{primary:a,secondaries:c,syncMethods:ct=["create","update","remove","delete","set"]}=t,pt={get(d,n){if(typeof n=="symbol")return d[n];const z=d[n];return typeof z!="function"?z:ct.includes(n)?async(...u)=>{const _t=await z.apply(d,u),h=[];for(const p of c){const O=p.adapter[n];if(typeof O!="function")continue;const dt=(async()=>{try{await O.apply(p.adapter,u);}catch(N){try{p.onError?p.onError(N,n,u):console.error(`Passthrough adapter: secondary write failed for ${n}:`,N);}catch(zt){console.error(`Passthrough adapter: onError handler threw for ${n}:`,zt);}}})();p.blocking&&h.push(dt);}return h.length>0&&await Promise.all(h),_t}:z.bind(d)}};return new Proxy(a,pt)}function qo(t){return t}exports.Auth0ActionEnum=mt;exports.Auth0Client=De;exports.AuthorizationResponseMode=A;exports.AuthorizationResponseType=E;exports.CodeChallengeMethod=I;exports.ComponentCategory=f;exports.ComponentType=b;exports.EmailActionEnum=ut;exports.FlowActionTypeEnum=gt;exports.GrantType=ve;exports.LocationInfo=we;exports.LogTypes=Le;exports.NodeType=Q;exports.RedirectTargetEnum=w;exports.actionNodeSchema=$;exports.activeUsersResponseSchema=Wo;exports.auth0FlowInsertSchema=yt;exports.auth0FlowSchema=ie;exports.auth0QuerySchema=St;exports.auth0UpdateUserActionSchema=L;exports.auth0UserResponseSchema=ft;exports.authParamsSchema=ae;exports.baseUserSchema=S;exports.blockComponentSchema=ue;exports.bordersSchema=xe;exports.brandingSchema=Tt;exports.buttonComponentSchema=W;exports.clientGrantInsertSchema=G;exports.clientGrantListSchema=Ct;exports.clientGrantSchema=B;exports.clientInsertSchema=M;exports.clientSchema=H;exports.codeInsertSchema=de;exports.codeSchema=Nt;exports.codeTypeSchema=_e;exports.colorsSchema=Pe;exports.componentMessageSchema=Ee;exports.componentSchema=Y;exports.connectionInsertSchema=se;exports.connectionOptionsSchema=re;exports.connectionSchema=le;exports.coordinatesSchema=l;exports.createPassthroughAdapter=Xo;exports.createWriteOnlyAdapter=qo;exports.customDomainInsertSchema=ze;exports.customDomainSchema=me;exports.customDomainWithTenantIdSchema=Rt;exports.dailyStatsSchema=Ko;exports.emailProviderSchema=Do;exports.emailVerificationRulesSchema=R;exports.emailVerifyActionSchema=D;exports.endingSchema=ne;exports.fieldComponentSchema=Se;exports.flowActionStepSchema=k;exports.flowInsertSchema=U;exports.flowSchema=ht;exports.flowsFieldComponentSchema=X;exports.flowsFlowNodeSchema=Z;exports.flowsStepNodeSchema=J;exports.fontDetailsSchema=r;exports.fontsSchema=Me;exports.formControlSchema=no;exports.formInsertSchema=fe;exports.formNodeComponentDefinition=T;exports.formNodeSchema=be;exports.formSchema=so;exports.genericComponentSchema=q;exports.genericNodeSchema=ee;exports.hookInsertSchema=mo;exports.hookSchema=So;exports.identitySchema=v;exports.inviteInsertSchema=Oe;exports.inviteSchema=bo;exports.inviteeSchema=Te;exports.inviterSchema=ye;exports.isBlockComponent=co;exports.isFieldComponent=_o;exports.isWidgetComponent=po;exports.jwksKeySchema=fo;exports.jwksSchema=Ne;exports.legacyClientSchema=Ot;exports.legalComponentSchema=V;exports.logInsertSchema=je;exports.logSchema=Co;exports.loginSessionInsertSchema=Re;exports.loginSessionSchema=Ao;exports.nodeSchema=te;exports.openIDConfigurationSchema=Eo;exports.organizationBrandingSchema=it;exports.organizationEnabledConnectionSchema=at;exports.organizationInsertSchema=st;exports.organizationSchema=Ho;exports.organizationTokenQuotaSchema=rt;exports.pageBackgroundSchema=He;exports.parseUserId=Vo;exports.passwordInsertSchema=ke;exports.passwordSchema=yo;exports.profileDataSchema=F;exports.promptSettingSchema=Lo;exports.redirectActionSchema=j;exports.refreshTokenInsertSchema=Ke;exports.refreshTokenSchema=wo;exports.resourceServerInsertSchema=Xe;exports.resourceServerListSchema=Uo;exports.resourceServerOptionsSchema=Ve;exports.resourceServerSchema=qe;exports.resourceServerScopeSchema=We;exports.richTextComponentSchema=K;exports.roleInsertSchema=ot;exports.roleListSchema=Mo;exports.rolePermissionInsertSchema=Ye;exports.rolePermissionListSchema=Fo;exports.rolePermissionSchema=Qe;exports.roleSchema=nt;exports.screenLinkSchema=Ae;exports.sessionInsertSchema=Fe;exports.sessionSchema=To;exports.signingKeySchema=Oo;exports.smsProviderSchema=ko;exports.smsSendParamsSchema=jo;exports.startSchema=oe;exports.tenantInsertSchema=ce;exports.tenantSchema=pe;exports.tenantSettingsSchema=Bo;exports.themeInsertSchema=Be;exports.themeSchema=Ro;exports.tokenResponseSchema=No;exports.totalsSchema=bt;exports.uiScreenSchema=lo;exports.userInsertSchema=x;exports.userOrganizationInsertSchema=lt;exports.userOrganizationSchema=Go;exports.userPermissionInsertSchema=Je;exports.userPermissionListSchema=vo;exports.userPermissionSchema=Ze;exports.userPermissionWithDetailsListSchema=xo;exports.userPermissionWithDetailsSchema=$e;exports.userResponseSchema=Et;exports.userRoleInsertSchema=et;exports.userRoleListSchema=Po;exports.userRoleSchema=tt;exports.userSchema=P;exports.verificationMethodsSchema=ge;exports.widgetComponentSchema=he;exports.widgetSchema=Ge;
|
|
8114
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require$$0,s=e.z.object({created_at:e.z.string(),updated_at:e.z.string()}),ut=e.z.enum(["AUTH0","EMAIL","REDIRECT"]),ht=e.z.enum(["CREATE_USER","GET_USER","UPDATE_USER","SEND_REQUEST","SEND_EMAIL"]),St=e.z.enum(["VERIFY_EMAIL"]),D=e.z.object({require_mx_record:e.z.boolean().optional(),block_aliases:e.z.boolean().optional(),block_free_emails:e.z.boolean().optional(),block_disposable_emails:e.z.boolean().optional(),blocklist:e.z.array(e.z.string()).optional(),allowlist:e.z.array(e.z.string()).optional()}),L=e.z.object({id:e.z.string(),alias:e.z.string().max(100).optional(),type:e.z.literal("AUTH0"),action:e.z.literal("UPDATE_USER"),allow_failure:e.z.boolean().optional(),mask_output:e.z.boolean().optional(),params:e.z.object({connection_id:e.z.string().optional(),user_id:e.z.string(),changes:e.z.record(e.z.string(),e.z.any())})}),w=e.z.object({id:e.z.string(),alias:e.z.string().max(100).optional(),type:e.z.literal("EMAIL"),action:e.z.literal("VERIFY_EMAIL"),allow_failure:e.z.boolean().optional(),mask_output:e.z.boolean().optional(),params:e.z.object({email:e.z.string(),rules:D.optional()})}),j=e.z.enum(["change-email","account","custom"]),k=e.z.object({id:e.z.string(),alias:e.z.string().max(100).optional(),type:e.z.literal("REDIRECT"),action:e.z.literal("REDIRECT_USER"),allow_failure:e.z.boolean().optional(),mask_output:e.z.boolean().optional(),params:e.z.object({target:j.openapi({description:"The predefined target to redirect to, or 'custom' for a custom URL"}),custom_url:e.z.string().optional().openapi({description:"Custom URL to redirect to when target is 'custom'"})})}),U=e.z.union([L,w,k]),F=e.z.object({name:e.z.string().min(1).max(150).openapi({description:"The name of the flow"}),actions:e.z.array(U).optional().default([]).openapi({description:"The list of actions to execute in sequence"})}),bt=F.extend({...s.shape,id:e.z.string().openapi({description:"Unique identifier for the flow",example:"af_12tMpdJ3iek7svMyZkSh5M"})}),ft=e.z.object({page:e.z.string().min(0).optional().default("0").transform(t=>parseInt(t,10)).openapi({description:"The page number where 0 is the first page"}),per_page:e.z.string().min(1).optional().default("10").transform(t=>parseInt(t,10)).openapi({description:"The number of items per page"}),include_totals:e.z.string().optional().default("false").transform(t=>t==="true").openapi({description:"If the total number of items should be included in the response"}),sort:e.z.string().regex(/^.+:(-1|1)$/).optional().openapi({description:"A property that should have the format 'string:-1' or 'string:1'"}),q:e.z.string().optional().openapi({description:"A lucene query string used to filter the results"})}),Et=e.z.object({start:e.z.number(),limit:e.z.number(),length:e.z.number(),total:e.z.number().optional()}),v=e.z.object({email:e.z.string().optional(),email_verified:e.z.boolean().optional(),name:e.z.string().optional(),username:e.z.string().optional(),given_name:e.z.string().optional(),phone_number:e.z.string().optional(),phone_verified:e.z.boolean().optional(),family_name:e.z.string().optional()}).catchall(e.z.any()),x=e.z.object({connection:e.z.string(),user_id:e.z.string(),provider:e.z.string(),isSocial:e.z.boolean(),access_token:e.z.string().optional(),access_token_secret:e.z.string().optional(),refresh_token:e.z.string().optional(),profileData:v.optional()}),S=e.z.object({email:e.z.string().optional().transform(t=>t&&t.toLowerCase()),username:e.z.string().optional(),phone_number:e.z.string().optional(),given_name:e.z.string().optional(),family_name:e.z.string().optional(),nickname:e.z.string().optional(),name:e.z.string().optional(),picture:e.z.string().optional(),locale:e.z.string().optional(),linked_to:e.z.string().optional(),profileData:e.z.string().optional(),user_id:e.z.string().optional(),app_metadata:e.z.any().default({}).optional(),user_metadata:e.z.any().default({}).optional()}),P=S.extend({email_verified:e.z.boolean().default(false),verify_email:e.z.boolean().optional(),last_ip:e.z.string().optional(),last_login:e.z.string().optional(),user_id:e.z.string().optional(),provider:e.z.string().optional(),connection:e.z.string(),is_social:e.z.boolean().optional()}),M=e.z.object({...P.shape,...s.shape,user_id:e.z.string(),provider:e.z.string(),is_social:e.z.boolean(),email:e.z.string().optional(),login_count:e.z.number().default(0),identities:e.z.array(x).optional()}),At=M,It=S.extend({login_count:e.z.number(),multifactor:e.z.array(e.z.string()).optional(),last_ip:e.z.string().optional(),last_login:e.z.string().optional(),user_id:e.z.string()}).catchall(e.z.any()),Ct="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let yt=(t=21)=>{let a="",c=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)a+=Ct[c[t]&63];return a};const H=e.z.object({client_id:e.z.string().openapi({description:"ID of this client."}),name:e.z.string().min(1).openapi({description:"Name of this client (min length: 1 character, does not allow < or >)."}),description:e.z.string().max(140).optional().openapi({description:"Free text description of this client (max length: 140 characters)."}),global:e.z.boolean().default(false).openapi({description:"Whether this is your global 'All Applications' client representing legacy tenant settings (true) or a regular client (false)."}),client_secret:e.z.string().default(()=>yt()).optional().openapi({description:"Client secret (which you must not make public)."}),app_type:e.z.enum(["native","spa","regular_web","non_interactive","resource_server","express_configuration","rms","box","cloudbees","concur","dropbox","mscrm","echosign","egnyte","newrelic","office365","salesforce","sentry","sharepoint","slack","springcm","zendesk","zoom","sso_integration","oag"]).default("regular_web").optional().openapi({description:"The type of application this client represents"}),logo_uri:e.z.string().url().optional().openapi({description:"URL of the logo to display for this client. Recommended size is 150x150 pixels."}),is_first_party:e.z.boolean().default(false).openapi({description:"Whether this client a first party client (true) or not (false)."}),oidc_conformant:e.z.boolean().default(true).openapi({description:"Whether this client conforms to strict OIDC specifications (true) or uses legacy features (false)."}),callbacks:e.z.array(e.z.string()).default([]).optional().openapi({description:"Comma-separated list of URLs whitelisted for Auth0 to use as a callback to the client after authentication."}),allowed_origins:e.z.array(e.z.string()).default([]).optional().openapi({description:"Comma-separated list of URLs allowed to make requests from JavaScript to Auth0 API (typically used with CORS). By default, all your callback URLs will be allowed. This field allows you to enter other origins if necessary. You can also use wildcards at the subdomain level (e.g., https://*.contoso.com). Query strings and hash information are not taken into account when validating these URLs."}),web_origins:e.z.array(e.z.string()).default([]).optional().openapi({description:"Comma-separated list of allowed origins for use with Cross-Origin Authentication, Device Flow, and web message response mode."}),client_aliases:e.z.array(e.z.string()).default([]).optional().openapi({description:"List of audiences/realms for SAML protocol. Used by the wsfed addon."}),allowed_clients:e.z.array(e.z.string()).default([]).optional().openapi({description:"List of allow clients and API ids that are allowed to make delegation requests. Empty means all all your clients are allowed."}),connections:e.z.array(e.z.string()).default([]).optional().openapi({description:"List of connection IDs enabled for this client. The order determines the display order on the login page."}),allowed_logout_urls:e.z.array(e.z.string()).default([]).optional().openapi({description:"Comma-separated list of URLs that are valid to redirect to after logout from Auth0. Wildcards are allowed for subdomains."}),session_transfer:e.z.record(e.z.any()).default({}).optional().openapi({description:"Native to Web SSO Configuration"}),oidc_logout:e.z.record(e.z.any()).default({}).optional().openapi({description:"Configuration for OIDC backchannel logout"}),grant_types:e.z.array(e.z.string()).default([]).optional().openapi({description:"List of grant types supported for this application. Can include authorization_code, implicit, refresh_token, client_credentials, password, http://auth0.com/oauth/grant-type/password-realm, http://auth0.com/oauth/grant-type/mfa-oob, http://auth0.com/oauth/grant-type/mfa-otp, http://auth0.com/oauth/grant-type/mfa-recovery-code, urn:openid:params:grant-type:ciba, and urn:ietf:params:oauth:grant-type:device_code."}),jwt_configuration:e.z.record(e.z.any()).default({}).optional().openapi({description:"Configuration related to JWTs for the client."}),signing_keys:e.z.array(e.z.record(e.z.any())).default([]).optional().openapi({description:"Signing certificates associated with this client."}),encryption_key:e.z.record(e.z.any()).default({}).optional().openapi({description:"Encryption used for WsFed responses with this client."}),sso:e.z.boolean().default(false).openapi({description:"Applies only to SSO clients and determines whether Auth0 will handle Single Sign On (true) or whether the Identity Provider will (false)."}),sso_disabled:e.z.boolean().default(true).openapi({description:"Whether Single Sign On is disabled (true) or enabled (true). Defaults to true."}),cross_origin_authentication:e.z.boolean().default(false).openapi({description:"Whether this client can be used to make cross-origin authentication requests (true) or it is not allowed to make such requests (false)."}),cross_origin_loc:e.z.string().url().optional().openapi({description:"URL of the location in your site where the cross origin verification takes place for the cross-origin auth flow when performing Auth in your own domain instead of Auth0 hosted login page."}),custom_login_page_on:e.z.boolean().default(false).openapi({description:"Whether a custom login page is to be used (true) or the default provided login page (false)."}),custom_login_page:e.z.string().optional().openapi({description:"The content (HTML, CSS, JS) of the custom login page."}),custom_login_page_preview:e.z.string().optional().openapi({description:"The content (HTML, CSS, JS) of the custom login page. (Used on Previews)"}),form_template:e.z.string().optional().openapi({description:"HTML form template to be used for WS-Federation."}),addons:e.z.record(e.z.any()).default({}).optional().openapi({description:"Addons enabled for this client and their associated configurations."}),token_endpoint_auth_method:e.z.enum(["none","client_secret_post","client_secret_basic"]).default("client_secret_basic").optional().openapi({description:"Defines the requested authentication method for the token endpoint. Can be none (public client without a client secret), client_secret_post (client uses HTTP POST parameters), or client_secret_basic (client uses HTTP Basic)."}),client_metadata:e.z.record(e.z.string().max(255)).default({}).optional().openapi({description:'Metadata associated with the client, in the form of an object with string values (max 255 chars). Maximum of 10 metadata properties allowed. Field names (max 255 chars) are alphanumeric and may only include the following special characters: :,-+=_*?"/()<>@ [Tab][Space]'}),mobile:e.z.record(e.z.any()).default({}).optional().openapi({description:"Additional configuration for native mobile apps."}),initiate_login_uri:e.z.string().url().optional().openapi({description:"Initiate login uri, must be https"}),native_social_login:e.z.record(e.z.any()).default({}).optional(),refresh_token:e.z.record(e.z.any()).default({}).optional().openapi({description:"Refresh token configuration"}),default_organization:e.z.record(e.z.any()).default({}).optional().openapi({description:"Defines the default Organization ID and flows"}),organization_usage:e.z.enum(["deny","allow","require"]).default("deny").optional().openapi({description:"Defines how to proceed during an authentication transaction with regards an organization. Can be deny (default), allow or require."}),organization_require_behavior:e.z.enum(["no_prompt","pre_login_prompt","post_login_prompt"]).default("no_prompt").optional().openapi({description:"Defines how to proceed during an authentication transaction when client.organization_usage: 'require'. Can be no_prompt (default), pre_login_prompt or post_login_prompt. post_login_prompt requires oidc_conformant: true."}),client_authentication_methods:e.z.record(e.z.any()).default({}).optional().openapi({description:"Defines client authentication methods."}),require_pushed_authorization_requests:e.z.boolean().default(false).openapi({description:"Makes the use of Pushed Authorization Requests mandatory for this client"}),require_proof_of_possession:e.z.boolean().default(false).openapi({description:"Makes the use of Proof-of-Possession mandatory for this client"}),signed_request_object:e.z.record(e.z.any()).default({}).optional().openapi({description:"JWT-secured Authorization Requests (JAR) settings."}),compliance_level:e.z.enum(["none","fapi1_adv_pkj_par","fapi1_adv_mtls_par","fapi2_sp_pkj_mtls","fapi2_sp_mtls_mtls"]).optional().openapi({description:"Defines the compliance level for this client, which may restrict it's capabilities"}),par_request_expiry:e.z.number().optional().openapi({description:"Specifies how long, in seconds, a Pushed Authorization Request URI remains valid"}),token_quota:e.z.record(e.z.any()).default({}).optional()}),G=e.z.object({created_at:e.z.string(),updated_at:e.z.string(),...H.shape}),B=e.z.object({client_id:e.z.string().min(1).openapi({description:"ID of the client."}),audience:e.z.string().min(1).openapi({description:"The audience (API identifier) of this client grant."}),scope:e.z.array(e.z.string()).optional().openapi({description:"Scopes allowed for this client grant."}),organization_usage:e.z.enum(["deny","allow","require"]).optional().openapi({description:"Defines whether organizations can be used with client credentials exchanges for this grant."}),allow_any_organization:e.z.boolean().optional().openapi({description:"If enabled, any organization can be used with this grant. If disabled (default), the grant must be explicitly assigned to the desired organizations."}),is_system:e.z.boolean().optional().openapi({description:"If enabled, this grant is a special grant created by Auth0. It cannot be modified or deleted directly."}),subject_type:e.z.enum(["client","user"]).optional().openapi({description:"The type of application access the client grant allows. Use of this field is subject to the applicable Free Trial terms in Okta's Master Subscription Agreement."}),authorization_details_types:e.z.array(e.z.string()).optional().openapi({description:"Types of authorization_details allowed for this client grant. Use of this field is subject to the applicable Free Trial terms in Okta's Master Subscription Agreement."})}),K=e.z.object({id:e.z.string().openapi({description:"ID of the client grant."}),...B.shape,created_at:e.z.string().optional(),updated_at:e.z.string().optional()}),Tt=e.z.array(K),l=e.z.object({x:e.z.number(),y:e.z.number()});var b=(t=>(t.RICH_TEXT="RICH_TEXT",t.NEXT_BUTTON="NEXT_BUTTON",t.BACK_BUTTON="BACK_BUTTON",t.SUBMIT_BUTTON="SUBMIT_BUTTON",t.DIVIDER="DIVIDER",t.TEXT="TEXT",t.EMAIL="EMAIL",t.PASSWORD="PASSWORD",t.NUMBER="NUMBER",t.PHONE="PHONE",t.DATE="DATE",t.CHECKBOX="CHECKBOX",t.RADIO="RADIO",t.SELECT="SELECT",t.HIDDEN="HIDDEN",t.LEGAL="LEGAL",t))(b||{}),f=(t=>(t.BLOCK="BLOCK",t.FIELD="FIELD",t))(f||{});const g=e.z.object({id:e.z.string(),category:e.z.nativeEnum(f),type:e.z.nativeEnum(b)}),W=g.extend({category:e.z.literal("BLOCK"),type:e.z.literal("RICH_TEXT"),config:e.z.object({content:e.z.string()}).passthrough()}),V=g.extend({category:e.z.literal("BLOCK"),type:e.z.union([e.z.literal("NEXT_BUTTON"),e.z.literal("BACK_BUTTON"),e.z.literal("SUBMIT_BUTTON")]),config:e.z.object({text:e.z.string()}).passthrough()}),X=g.extend({category:e.z.literal("FIELD"),type:e.z.literal("LEGAL"),required:e.z.boolean().optional(),sensitive:e.z.boolean().optional(),config:e.z.object({text:e.z.string()}).passthrough()}),q=g.extend({category:e.z.literal("FIELD"),type:e.z.union([e.z.literal("TEXT"),e.z.literal("EMAIL"),e.z.literal("PASSWORD"),e.z.literal("NUMBER"),e.z.literal("PHONE"),e.z.literal("DATE"),e.z.literal("CHECKBOX"),e.z.literal("RADIO"),e.z.literal("SELECT"),e.z.literal("HIDDEN")]),required:e.z.boolean().optional(),sensitive:e.z.boolean().optional(),config:e.z.object({label:e.z.string().optional(),placeholder:e.z.string().optional()}).passthrough()}),Y=e.z.object({id:e.z.string(),category:e.z.string(),type:e.z.string()}).passthrough(),Q=e.z.union([W,V,X,q,Y]);var J=(t=>(t.STEP="STEP",t.FLOW="FLOW",t.CONDITION="CONDITION",t.ACTION="ACTION",t))(J||{});const Z=e.z.object({id:e.z.string(),type:e.z.literal("STEP"),coordinates:l,alias:e.z.string().optional(),config:e.z.object({components:e.z.array(Q),next_node:e.z.string()}).passthrough()}),$=e.z.object({id:e.z.string(),type:e.z.literal("FLOW"),coordinates:l,alias:e.z.string().optional(),config:e.z.object({flow_id:e.z.string(),next_node:e.z.string()})}),ee=e.z.object({id:e.z.string(),type:e.z.literal("ACTION"),coordinates:l,alias:e.z.string().optional(),config:e.z.object({action_type:e.z.enum(["REDIRECT"]).openapi({description:"The type of action to perform"}),target:e.z.enum(["change-email","account","custom"]).openapi({description:"The predefined target to redirect to"}),custom_url:e.z.string().optional().openapi({description:"Custom URL when target is 'custom'"}),next_node:e.z.string().openapi({description:"The next node to navigate to after action (for non-redirect actions)"})}).passthrough()}),te=e.z.object({id:e.z.string(),type:e.z.string(),coordinates:l}).passthrough(),oe=e.z.union([Z,$,ee,te]),ne=e.z.object({next_node:e.z.string(),coordinates:l}).passthrough(),ie=e.z.object({resume_flow:e.z.boolean().optional(),coordinates:l}).passthrough(),ae=e.z.object({id:e.z.string(),name:e.z.string(),languages:e.z.object({primary:e.z.string()}).passthrough(),nodes:e.z.array(oe),start:ne,ending:ie,created_at:e.z.string(),updated_at:e.z.string(),links:e.z.object({sdkSrc:e.z.string().optional(),sdk_src:e.z.string().optional()}).passthrough()}).passthrough(),Ot=ae.omit({id:true,created_at:true,updated_at:true});var E=(t=>(t.TOKEN="token",t.TOKEN_ID_TOKEN="token id_token",t.CODE="code",t))(E||{}),A=(t=>(t.QUERY="query",t.FRAGMENT="fragment",t.FORM_POST="form_post",t.WEB_MESSAGE="web_message",t.SAML_POST="saml_post",t))(A||{}),I=(t=>(t.S256="S256",t.Plain="plain",t))(I||{});const re=e.z.object({client_id:e.z.string(),act_as:e.z.string().optional(),response_type:e.z.nativeEnum(E).optional(),response_mode:e.z.nativeEnum(A).optional(),redirect_uri:e.z.string().optional(),audience:e.z.string().optional(),organization:e.z.string().optional(),state:e.z.string().optional(),nonce:e.z.string().optional(),scope:e.z.string().optional(),prompt:e.z.string().optional(),code_challenge_method:e.z.nativeEnum(I).optional(),code_challenge:e.z.string().optional(),username:e.z.string().optional(),ui_locales:e.z.string().optional(),vendor_id:e.z.string().optional()}),Nt=e.z.object({colors:e.z.object({primary:e.z.string(),page_background:e.z.object({type:e.z.string().optional(),start:e.z.string().optional(),end:e.z.string().optional(),angle_deg:e.z.number().optional()}).optional()}).optional(),logo_url:e.z.string().optional(),favicon_url:e.z.string().optional(),powered_by_logo_url:e.z.string().optional(),font:e.z.object({url:e.z.string()}).optional()}),se=e.z.object({kid:e.z.string().optional(),team_id:e.z.string().optional(),realms:e.z.string().optional(),authentication_method:e.z.string().optional(),client_id:e.z.string().optional(),client_secret:e.z.string().optional(),app_secret:e.z.string().optional(),scope:e.z.string().optional(),authorization_endpoint:e.z.string().optional(),token_endpoint:e.z.string().optional(),userinfo_endpoint:e.z.string().optional(),jwks_uri:e.z.string().optional(),discovery_url:e.z.string().optional(),issuer:e.z.string().optional(),provider:e.z.string().optional(),from:e.z.string().optional(),twilio_sid:e.z.string().optional(),twilio_token:e.z.string().optional(),icon_url:e.z.string().optional()}),le=e.z.object({id:e.z.string().optional(),name:e.z.string(),display_name:e.z.string().optional(),strategy:e.z.string(),options:se.default({}),enabled_clients:e.z.array(e.z.string()).default([]).optional(),response_type:e.z.custom().optional(),response_mode:e.z.custom().optional(),is_domain_connection:e.z.boolean().optional(),show_as_button:e.z.boolean().optional(),metadata:e.z.record(e.z.any()).optional(),is_system:e.z.boolean().optional()}),ce=e.z.object({id:e.z.string(),created_at:e.z.string().transform(t=>t===null?"":t),updated_at:e.z.string().transform(t=>t===null?"":t)}).extend(le.shape),pe=e.z.object({id:e.z.string().optional(),audience:e.z.string(),friendly_name:e.z.string(),picture_url:e.z.string().optional(),support_email:e.z.string().optional(),support_url:e.z.string().optional(),sender_email:e.z.string().email(),sender_name:e.z.string(),session_lifetime:e.z.number().optional(),idle_session_lifetime:e.z.number().optional(),ephemeral_session_lifetime:e.z.number().optional(),idle_ephemeral_session_lifetime:e.z.number().optional(),session_cookie:e.z.object({mode:e.z.enum(["persistent","non-persistent"]).optional()}).optional(),allowed_logout_urls:e.z.array(e.z.string()).optional(),default_redirection_uri:e.z.string().optional(),enabled_locales:e.z.array(e.z.string()).optional(),default_directory:e.z.string().optional(),error_page:e.z.object({html:e.z.string().optional(),show_log_link:e.z.boolean().optional(),url:e.z.string().optional()}).optional(),flags:e.z.object({allow_changing_enable_sso:e.z.boolean().optional(),allow_legacy_delegation_grant_types:e.z.boolean().optional(),allow_legacy_ro_grant_types:e.z.boolean().optional(),allow_legacy_tokeninfo_endpoint:e.z.boolean().optional(),change_pwd_flow_v1:e.z.boolean().optional(),custom_domains_provisioning:e.z.boolean().optional(),dashboard_insights_view:e.z.boolean().optional(),dashboard_log_streams_next:e.z.boolean().optional(),disable_clickjack_protection_headers:e.z.boolean().optional(),disable_fields_map_fix:e.z.boolean().optional(),disable_impersonation:e.z.boolean().optional(),disable_management_api_sms_obfuscation:e.z.boolean().optional(),enable_adfs_waad_email_verification:e.z.boolean().optional(),enable_apis_section:e.z.boolean().optional(),enable_client_connections:e.z.boolean().optional(),enable_custom_domain_in_emails:e.z.boolean().optional(),enable_dynamic_client_registration:e.z.boolean().optional(),enable_idtoken_api2:e.z.boolean().optional(),enable_legacy_logs_search_v2:e.z.boolean().optional(),enable_legacy_profile:e.z.boolean().optional(),enable_pipeline2:e.z.boolean().optional(),enable_public_signup_user_exists_error:e.z.boolean().optional(),enable_sso:e.z.boolean().optional(),enforce_client_authentication_on_passwordless_start:e.z.boolean().optional(),genai_trial:e.z.boolean().optional(),improved_signup_bot_detection_in_classic:e.z.boolean().optional(),mfa_show_factor_list_on_enrollment:e.z.boolean().optional(),no_disclose_enterprise_connections:e.z.boolean().optional(),remove_alg_from_jwks:e.z.boolean().optional(),revoke_refresh_token_grant:e.z.boolean().optional(),trust_azure_adfs_email_verified_connection_property:e.z.boolean().optional(),use_scope_descriptions_for_consent:e.z.boolean().optional(),inherit_global_permissions_in_organizations:e.z.boolean().optional()}).optional(),sandbox_version:e.z.string().optional(),legacy_sandbox_version:e.z.string().optional(),sandbox_versions_available:e.z.array(e.z.string()).optional(),change_password:e.z.object({enabled:e.z.boolean().optional(),html:e.z.string().optional()}).optional(),guardian_mfa_page:e.z.object({enabled:e.z.boolean().optional(),html:e.z.string().optional()}).optional(),device_flow:e.z.object({charset:e.z.enum(["base20","digits"]).optional(),mask:e.z.string().max(20).optional()}).optional(),default_token_quota:e.z.object({clients:e.z.object({client_credentials:e.z.record(e.z.any()).optional()}).optional(),organizations:e.z.object({client_credentials:e.z.record(e.z.any()).optional()}).optional()}).optional(),default_audience:e.z.string().optional(),default_organization:e.z.string().optional(),sessions:e.z.object({oidc_logout_prompt_enabled:e.z.boolean().optional()}).optional(),oidc_logout:e.z.object({rp_logout_end_session_endpoint_discovery:e.z.boolean().optional()}).optional(),allow_organization_name_in_authentication_api:e.z.boolean().optional(),customize_mfa_in_postlogin_action:e.z.boolean().optional(),acr_values_supported:e.z.array(e.z.string()).optional(),mtls:e.z.object({enable_endpoint_aliases:e.z.boolean().optional()}).optional(),pushed_authorization_requests_supported:e.z.boolean().optional(),authorization_response_iss_parameter_supported:e.z.boolean().optional()}),_e=e.z.object({created_at:e.z.string().nullable().transform(t=>t??""),updated_at:e.z.string().nullable().transform(t=>t??""),...pe.shape,id:e.z.string()}),Rt=e.z.object({...G.shape,tenant:_e,connections:e.z.array(ce)}),de=e.z.enum(["password_reset","email_verification","otp","authorization_code","oauth2_state","ticket"]),ze=e.z.object({code_id:e.z.string().openapi({description:"The code that will be used in for instance an email verification flow"}),login_id:e.z.string().openapi({description:"The id of the login session that the code is connected to"}),connection_id:e.z.string().optional().openapi({description:"The connection that the code is connected to"}),code_type:de,code_verifier:e.z.string().optional().openapi({description:"The code verifier used in PKCE in outbound flows"}),code_challenge:e.z.string().optional().openapi({description:"The code challenge used in PKCE in outbound flows"}),code_challenge_method:e.z.enum(["plain","S256"]).optional().openapi({description:"The code challenge method used in PKCE in outbound flows"}),redirect_uri:e.z.string().optional().openapi({description:"The redirect URI associated with the code"}),nonce:e.z.string().optional().openapi({description:"The nonce value used for security in OIDC flows"}),state:e.z.string().optional().openapi({description:"The state parameter used for CSRF protection in OAuth flows"}),expires_at:e.z.string(),used_at:e.z.string().optional(),user_id:e.z.string().optional()}),Dt=e.z.object({...ze.shape,created_at:e.z.string()}),ge=e.z.object({domain:e.z.string(),custom_domain_id:e.z.string().optional(),type:e.z.enum(["auth0_managed_certs","self_managed_certs"]),verification_method:e.z.enum(["txt"]).optional(),tls_policy:e.z.enum(["recommended"]).optional(),custom_client_ip_header:e.z.enum(["true-client-ip","cf-connecting-ip","x-forwarded-for","x-azure-clientip","null"]).optional(),domain_metadata:e.z.record(e.z.string().max(255)).optional()}),me=e.z.object({name:e.z.literal("txt"),record:e.z.string(),domain:e.z.string()}),ue=e.z.object({...ge.shape,custom_domain_id:e.z.string(),primary:e.z.boolean(),status:e.z.enum(["disabled","pending","pending_verification","ready"]),origin_domain_name:e.z.string().optional(),verification:e.z.object({methods:e.z.array(me)}).optional(),tls_policy:e.z.string().optional()}),Lt=ue.extend({tenant_id:e.z.string()}),C=e.z.object({id:e.z.string(),order:e.z.number().optional(),visible:e.z.boolean().optional().default(true)}),i=C.extend({category:e.z.literal("BLOCK").optional()}),wt=i.extend({type:e.z.literal("DIVIDER"),config:e.z.object({}).optional()}),jt=i.extend({type:e.z.literal("HTML"),config:e.z.object({content:e.z.string().optional()}).optional()}),kt=i.extend({type:e.z.literal("IMAGE"),config:e.z.object({src:e.z.string().optional(),alt:e.z.string().optional(),width:e.z.number().optional(),height:e.z.number().optional()}).optional()}),Ut=i.extend({type:e.z.literal("JUMP_BUTTON"),config:e.z.object({text:e.z.string().optional(),target_step:e.z.string().optional()})}),Ft=i.extend({type:e.z.literal("RESEND_BUTTON"),config:e.z.object({text:e.z.string().optional(),resend_action:e.z.string().optional()})}),vt=i.extend({type:e.z.literal("NEXT_BUTTON"),config:e.z.object({text:e.z.string().optional()})}),xt=i.extend({type:e.z.literal("PREVIOUS_BUTTON"),config:e.z.object({text:e.z.string().optional()})}),Pt=i.extend({type:e.z.literal("RICH_TEXT"),config:e.z.object({content:e.z.string().optional()}).optional()}),y=C.extend({category:e.z.literal("WIDGET").optional(),label:e.z.string().min(1).optional(),hint:e.z.string().min(1).max(500).optional(),required:e.z.boolean().optional(),sensitive:e.z.boolean().optional()}),Mt=y.extend({type:e.z.literal("AUTH0_VERIFIABLE_CREDENTIALS"),config:e.z.object({credential_type:e.z.string().optional()})}),Ht=y.extend({type:e.z.literal("GMAPS_ADDRESS"),config:e.z.object({api_key:e.z.string().optional()})}),Gt=y.extend({type:e.z.literal("RECAPTCHA"),config:e.z.object({site_key:e.z.string().optional()})}),o=C.extend({category:e.z.literal("FIELD").optional(),label:e.z.string().min(1).optional(),hint:e.z.string().min(1).max(500).optional(),required:e.z.boolean().optional(),sensitive:e.z.boolean().optional()}),Bt=o.extend({type:e.z.literal("BOOLEAN"),config:e.z.object({default_value:e.z.boolean().optional()}).optional()}),Kt=o.extend({type:e.z.literal("CARDS"),config:e.z.object({options:e.z.array(e.z.object({value:e.z.string(),label:e.z.string(),description:e.z.string().optional(),image:e.z.string().optional()})).optional(),multi_select:e.z.boolean().optional()}).optional()}),Wt=o.extend({type:e.z.literal("CHOICE"),config:e.z.object({options:e.z.array(e.z.object({value:e.z.string(),label:e.z.string()})).optional(),display:e.z.enum(["radio","checkbox"]).optional()}).optional()}),Vt=o.extend({type:e.z.literal("CUSTOM"),config:e.z.object({component:e.z.string().optional(),props:e.z.record(e.z.any()).optional()})}),Xt=o.extend({type:e.z.literal("DATE"),config:e.z.object({format:e.z.string().optional(),min:e.z.string().optional(),max:e.z.string().optional()}).optional()}),qt=o.extend({type:e.z.literal("DROPDOWN"),config:e.z.object({options:e.z.array(e.z.object({value:e.z.string(),label:e.z.string()})).optional(),placeholder:e.z.string().optional(),searchable:e.z.boolean().optional()}).optional()}),Yt=o.extend({type:e.z.literal("EMAIL"),config:e.z.object({placeholder:e.z.string().optional()}).optional()}),Qt=o.extend({type:e.z.literal("FILE"),config:e.z.object({accept:e.z.string().optional(),max_size:e.z.number().optional(),multiple:e.z.boolean().optional()}).optional()}),Jt=o.extend({type:e.z.literal("LEGAL"),config:e.z.object({text:e.z.string(),html:e.z.boolean().optional()}).optional()}),Zt=o.extend({type:e.z.literal("NUMBER"),config:e.z.object({placeholder:e.z.string().optional(),min:e.z.number().optional(),max:e.z.number().optional(),step:e.z.number().optional()}).optional()}),$t=o.extend({type:e.z.literal("PASSWORD"),config:e.z.object({placeholder:e.z.string().optional(),min_length:e.z.number().optional(),show_toggle:e.z.boolean().optional(),forgot_password_link:e.z.string().optional()}).optional()}),eo=o.extend({type:e.z.literal("PAYMENT"),config:e.z.object({provider:e.z.string().optional(),currency:e.z.string().optional()}).optional()}),to=o.extend({type:e.z.literal("SOCIAL"),config:e.z.object({providers:e.z.array(e.z.string()).optional()}).optional()}),oo=o.extend({type:e.z.literal("TEL"),config:e.z.object({placeholder:e.z.string().optional(),default_country:e.z.string().optional()}).optional()}),no=o.extend({type:e.z.literal("TEXT"),config:e.z.object({placeholder:e.z.string().optional(),multiline:e.z.boolean().optional(),max_length:e.z.number().optional()}).optional()}),io=o.extend({type:e.z.literal("URL"),config:e.z.object({placeholder:e.z.string().optional()}).optional()}),he=e.z.discriminatedUnion("type",[wt,jt,kt,Ut,Ft,vt,xt,Pt]),Se=e.z.discriminatedUnion("type",[Mt,Ht,Gt]),be=e.z.discriminatedUnion("type",[Bt,Kt,Wt,Vt,Xt,qt,Yt,Qt,Jt,Zt,$t,eo,to,oo,no,io]),T=e.z.union([he,Se,be]),ao=e.z.object({id:e.z.string(),type:e.z.literal("submit"),label:e.z.string(),className:e.z.string().optional(),disabled:e.z.boolean().optional().default(false),order:e.z.number().optional(),visible:e.z.boolean().optional().default(true),customizations:e.z.record(e.z.string(),e.z.any()).optional()}),_=e.z.object({x:e.z.number(),y:e.z.number()}),ro=e.z.object({id:e.z.string(),type:e.z.literal("FLOW"),coordinates:_,alias:e.z.string().min(1).max(150).optional(),config:e.z.object({flow_id:e.z.string().max(30),next_node:e.z.string().optional()})}),so=e.z.object({id:e.z.string(),type:e.z.literal("ROUTER"),coordinates:_,alias:e.z.string().min(1).max(150),config:e.z.object({rules:e.z.array(e.z.object({id:e.z.string(),alias:e.z.string().min(1).max(150).optional(),condition:e.z.any(),next_node:e.z.string()})),fallback:e.z.string()})}),lo=e.z.object({id:e.z.string(),type:e.z.literal("STEP"),coordinates:_,alias:e.z.string().min(1).max(150).optional(),config:e.z.object({components:e.z.array(T),next_node:e.z.string().optional()})}),fe=e.z.discriminatedUnion("type",[ro,so,lo]),Ee=e.z.object({name:e.z.string().openapi({description:"The name of the form"}),messages:e.z.object({errors:e.z.record(e.z.string(),e.z.any()).optional(),custom:e.z.record(e.z.string(),e.z.any()).optional()}).optional(),languages:e.z.object({primary:e.z.string().optional(),default:e.z.string().optional()}).optional(),translations:e.z.record(e.z.string(),e.z.any()).optional(),nodes:e.z.array(fe).optional(),start:e.z.object({hidden_fields:e.z.array(e.z.object({key:e.z.string(),value:e.z.string()})).optional(),next_node:e.z.string().optional(),coordinates:_.optional()}).optional(),ending:e.z.object({redirection:e.z.object({delay:e.z.number().optional(),target:e.z.string().optional()}).optional(),after_submit:e.z.object({flow_id:e.z.string().optional()}).optional(),coordinates:_.optional(),resume_flow:e.z.boolean().optional()}).optional(),style:e.z.object({css:e.z.string().optional()}).optional()}).openapi({description:"Schema for flow-based forms (matches Auth0 Forms structure)"}),co=e.z.object({...s.shape,...Ee.shape,id:e.z.string()}),Ae=e.z.object({id:e.z.number().optional(),text:e.z.string(),type:e.z.enum(["info","error","success","warning"])}),Ie=e.z.object({id:e.z.string().optional(),text:e.z.string(),href:e.z.string(),linkText:e.z.string().optional()}),po=e.z.object({action:e.z.string(),method:e.z.enum(["POST","GET"]),title:e.z.string().optional(),description:e.z.string().optional(),components:e.z.array(T),messages:e.z.array(Ae).optional(),links:e.z.array(Ie).optional()});function _o(t){return t.category==="BLOCK"}function zo(t){return t.category==="WIDGET"}function go(t){return t.category==="FIELD"}const Ce=e.z.enum(["pre-user-registration","post-user-registration","post-user-login","validate-registration-username","pre-user-deletion","post-user-deletion"]),ye=e.z.enum(["pre-user-registration","post-user-registration","post-user-login","validate-registration-username","pre-user-deletion","post-user-deletion"]),m={enabled:e.z.boolean().default(false),synchronous:e.z.boolean().default(false),priority:e.z.number().optional(),hook_id:e.z.string().optional()},mo=e.z.object({...m,trigger_id:Ce,url:e.z.string()}),uo=e.z.object({...m,trigger_id:ye,form_id:e.z.string()}),ho=e.z.union([mo,uo]),So=e.z.object({...m,trigger_id:Ce,...s.shape,hook_id:e.z.string(),url:e.z.string()}),bo=e.z.object({...m,trigger_id:ye,...s.shape,hook_id:e.z.string(),form_id:e.z.string()}),fo=e.z.union([So,bo]),Te=e.z.object({name:e.z.string().optional()}),Oe=e.z.object({email:e.z.string().optional()}),Ne=e.z.object({organization_id:e.z.string().max(50),inviter:Te,invitee:Oe,invitation_url:e.z.string().url(),client_id:e.z.string(),connection_id:e.z.string().optional(),app_metadata:e.z.record(e.z.any()).default({}).optional(),user_metadata:e.z.record(e.z.any()).default({}).optional(),ttl_sec:e.z.number().int().max(2592e3).default(604800).optional(),roles:e.z.array(e.z.string()).default([]).optional(),send_invitation_email:e.z.boolean().default(true).optional()}),Eo=e.z.object({id:e.z.string(),organization_id:e.z.string().max(50),created_at:e.z.string().datetime(),expires_at:e.z.string().datetime(),ticket_id:e.z.string().optional()}).extend(Ne.shape),Re=e.z.object({alg:e.z.enum(["RS256","RS384","RS512","ES256","ES384","ES512","HS256","HS384","HS512"]),e:e.z.string(),kid:e.z.string(),kty:e.z.enum(["RSA","EC","oct"]),n:e.z.string(),x5t:e.z.string().optional(),x5c:e.z.array(e.z.string()).optional(),use:e.z.enum(["sig","enc"]).optional()}),Ao=e.z.object({keys:e.z.array(Re)}),Io=e.z.object({issuer:e.z.string(),authorization_endpoint:e.z.string(),token_endpoint:e.z.string(),device_authorization_endpoint:e.z.string(),userinfo_endpoint:e.z.string(),mfa_challenge_endpoint:e.z.string(),jwks_uri:e.z.string(),registration_endpoint:e.z.string(),revocation_endpoint:e.z.string(),scopes_supported:e.z.array(e.z.string()),response_types_supported:e.z.array(e.z.string()),code_challenge_methods_supported:e.z.array(e.z.string()),response_modes_supported:e.z.array(e.z.string()),subject_types_supported:e.z.array(e.z.string()),id_token_signing_alg_values_supported:e.z.array(e.z.string()),token_endpoint_auth_methods_supported:e.z.array(e.z.string()),claims_supported:e.z.array(e.z.string()),request_uri_parameter_supported:e.z.boolean(),request_parameter_supported:e.z.boolean(),token_endpoint_auth_signing_alg_values_supported:e.z.array(e.z.string())});var O=(t=>(t.PENDING="pending",t.AUTHENTICATED="authenticated",t.AWAITING_EMAIL_VERIFICATION="awaiting_email_verification",t.AWAITING_HOOK="awaiting_hook",t.AWAITING_CONTINUATION="awaiting_continuation",t.COMPLETED="completed",t.FAILED="failed",t.EXPIRED="expired",t))(O||{});const De=e.z.nativeEnum(O),Le=e.z.object({csrf_token:e.z.string(),auth0Client:e.z.string().optional(),authParams:re,expires_at:e.z.string(),deleted_at:e.z.string().optional(),ip:e.z.string().optional(),useragent:e.z.string().optional(),session_id:e.z.string().optional(),authorization_url:e.z.string().optional(),state:De.optional().default("pending"),state_data:e.z.string().optional(),failure_reason:e.z.string().optional(),user_id:e.z.string().optional()}).openapi({description:"This represents a login sesion"}),Co=e.z.object({...Le.shape,id:e.z.string().openapi({description:"This is is used as the state in the universal login"}),created_at:e.z.string(),updated_at:e.z.string()}),we={ACLS_SUMMARY:"acls_summary",ACTIONS_EXECUTION_FAILED:"actions_execution_failed",API_LIMIT:"api_limit",API_LIMIT_WARNING:"api_limit_warning",APPI:"appi",CIBA_EXCHANGE_FAILED:"ciba_exchange_failed",CIBA_EXCHANGE_SUCCEEDED:"ciba_exchange_succeeded",CIBA_START_FAILED:"ciba_start_failed",CIBA_START_SUCCEEDED:"ciba_start_succeeded",CODE_LINK_SENT:"cls",CODE_SENT:"cs",DEPRECATION_NOTICE:"depnote",FAILED_LOGIN:"f",FAILED_BY_CONNECTOR:"fc",FAILED_CHANGE_EMAIL:"fce",FAILED_BY_CORS:"fco",FAILED_CROSS_ORIGIN_AUTHENTICATION:"fcoa",FAILED_CHANGE_PASSWORD:"fcp",FAILED_POST_CHANGE_PASSWORD_HOOK:"fcph",FAILED_CHANGE_PHONE_NUMBER:"fcpn",FAILED_CHANGE_PASSWORD_REQUEST:"fcpr",FAILED_CONNECTOR_PROVISIONING:"fcpro",FAILED_CHANGE_USERNAME:"fcu",FAILED_DELEGATION:"fd",FAILED_DEVICE_ACTIVATION:"fdeac",FAILED_DEVICE_AUTHORIZATION_REQUEST:"fdeaz",USER_CANCELED_DEVICE_CONFIRMATION:"fdecc",FAILED_USER_DELETION:"fdu",FAILED_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN:"feacft",FAILED_EXCHANGE_ACCESS_TOKEN_FOR_CLIENT_CREDENTIALS:"feccft",FAILED_EXCHANGE_CUSTOM_TOKEN:"fecte",FAILED_EXCHANGE_DEVICE_CODE_FOR_ACCESS_TOKEN:"fede",FAILED_FEDERATED_LOGOUT:"federated_logout_failed",FAILED_EXCHANGE_NATIVE_SOCIAL_LOGIN:"fens",FAILED_EXCHANGE_PASSWORD_OOB_FOR_ACCESS_TOKEN:"feoobft",FAILED_EXCHANGE_PASSWORD_OTP_FOR_ACCESS_TOKEN:"feotpft",FAILED_EXCHANGE_PASSWORD_FOR_ACCESS_TOKEN:"fepft",FAILED_EXCHANGE_PASSWORDLESS_OTP_FOR_ACCESS_TOKEN:"fepotpft",FAILED_EXCHANGE_PASSWORD_MFA_RECOVERY_FOR_ACCESS_TOKEN:"fercft",FAILED_EXCHANGE_ROTATING_REFRESH_TOKEN:"ferrt",FAILED_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN:"fertft",FAILED_HOOK:"fh",FAILED_INVITE_ACCEPT:"fi",FAILED_LOGOUT:"flo",FLOWS_EXECUTION_COMPLETED:"flows_execution_completed",FLOWS_EXECUTION_FAILED:"flows_execution_failed",FAILED_SENDING_NOTIFICATION:"fn",FORMS_SUBMISSION_FAILED:"forms_submission_failed",FORMS_SUBMISSION_SUCCEEDED:"forms_submission_succeeded",FAILED_LOGIN_INCORRECT_PASSWORD:"fp",FAILED_PUSHED_AUTHORIZATION_REQUEST:"fpar",FAILED_POST_USER_REGISTRATION_HOOK:"fpurh",FAILED_SIGNUP:"fs",FAILED_SILENT_AUTH:"fsa",FAILED_LOGIN_INVALID_EMAIL_USERNAME:"fu",FAILED_USERS_IMPORT:"fui",FAILED_VERIFICATION_EMAIL:"fv",FAILED_VERIFICATION_EMAIL_REQUEST:"fvr",EMAIL_VERIFICATION_CONFIRMED:"gd_auth_email_verification",EMAIL_VERIFICATION_FAILED:"gd_auth_fail_email_verification",MFA_AUTH_FAILED:"gd_auth_failed",MFA_AUTH_REJECTED:"gd_auth_rejected",MFA_AUTH_SUCCESS:"gd_auth_succeed",MFA_ENROLLMENT_COMPLETE:"gd_enrollment_complete",TOO_MANY_MFA_FAILURES:"gd_otp_rate_limit_exceed",MFA_RECOVERY_FAILED:"gd_recovery_failed",MFA_RECOVERY_RATE_LIMIT_EXCEED:"gd_recovery_rate_limit_exceed",MFA_RECOVERY_SUCCESS:"gd_recovery_succeed",MFA_EMAIL_SENT:"gd_send_email",EMAIL_VERIFICATION_SENT:"gd_send_email_verification",EMAIL_VERIFICATION_SEND_FAILURE:"gd_send_email_verification_failure",PUSH_NOTIFICATION_SENT:"gd_send_pn",ERROR_SENDING_MFA_PUSH_NOTIFICATION:"gd_send_pn_failure",MFA_SMS_SENT:"gd_send_sms",ERROR_SENDING_MFA_SMS:"gd_send_sms_failure",MFA_VOICE_CALL_SUCCESS:"gd_send_voice",MFA_VOICE_CALL_FAILED:"gd_send_voice_failure",SECOND_FACTOR_STARTED:"gd_start_auth",MFA_ENROLL_STARTED:"gd_start_enroll",MFA_ENROLLMENT_FAILED:"gd_start_enroll_failed",GUARDIAN_TENANT_UPDATE:"gd_tenant_update",UNENROLL_DEVICE_ACCOUNT:"gd_unenroll",UPDATE_DEVICE_ACCOUNT:"gd_update_device_account",WEBAUTHN_CHALLENGE_FAILED:"gd_webauthn_challenge_failed",WEBAUTHN_ENROLLMENT_FAILED:"gd_webauthn_enrollment_failed",FAILED_KMS_API_OPERATION:"kms_key_management_failure",SUCCESS_KMS_API_OPERATION:"kms_key_management_success",KMS_KEY_STATE_CHANGED:"kms_key_state_changed",TOO_MANY_CALLS_TO_DELEGATION:"limit_delegation",BLOCKED_IP_ADDRESS:"limit_mu",BLOCKED_ACCOUNT_IP:"limit_sul",BLOCKED_ACCOUNT_EMAIL:"limit_wc",MFA_REQUIRED:"mfar",MANAGEMENT_API_READ_OPERATION:"mgmt_api_read",FAILED_AUTHENTICATION_METHOD_OPERATION_MY_ACCOUNT:"my_account_authentication_method_failed",SUCCESSFUL_AUTHENTICATION_METHOD_OPERATION_MY_ACCOUNT:"my_account_authentication_method_succeeded",FAILED_OIDC_BACKCHANNEL_LOGOUT:"oidc_backchannel_logout_failed",SUCCESSFUL_OIDC_BACKCHANNEL_LOGOUT:"oidc_backchannel_logout_succeeded",ORGANIZATION_MEMBER_ADDED:"organization_member_added",PASSKEY_CHALLENGE_FAILED:"passkey_challenge_failed",PASSKEY_CHALLENGE_STARTED:"passkey_challenge_started",PRE_LOGIN_ASSESSMENT:"pla",BREACHED_PASSWORD:"pwd_leak",BREACHED_PASSWORD_ON_RESET:"reset_pwd_leak",SUCCESS_RESOURCE_CLEANUP:"resource_cleanup",RICH_CONSENTS_ACCESS_ERROR:"rich_consents_access_error",SUCCESS_LOGIN:"s",SUCCESS_API_OPERATION:"sapi",SUCCESS_CHANGE_EMAIL:"sce",SUCCESS_CROSS_ORIGIN_AUTHENTICATION:"scoa",SUCCESS_CHANGE_PASSWORD:"scp",SUCCESS_CHANGE_PHONE_NUMBER:"scpn",SUCCESS_CHANGE_PASSWORD_REQUEST:"scpr",SUCCESS_CHANGE_USERNAME:"scu",SUCCESS_CREDENTIAL_VALIDATION:"scv",SUCCESS_DELEGATION:"sd",SUCCESS_USER_DELETION:"sdu",SUCCESS_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN:"seacft",SUCCESS_EXCHANGE_ACCESS_TOKEN_FOR_CLIENT_CREDENTIALS:"seccft",SUCCESS_EXCHANGE_CUSTOM_TOKEN:"secte",SUCCESS_EXCHANGE_DEVICE_CODE_FOR_ACCESS_TOKEN:"sede",SUCCESS_EXCHANGE_NATIVE_SOCIAL_LOGIN:"sens",SUCCESS_EXCHANGE_PASSWORD_OOB_FOR_ACCESS_TOKEN:"seoobft",SUCCESS_EXCHANGE_PASSWORD_OTP_FOR_ACCESS_TOKEN:"seotpft",SUCCESS_EXCHANGE_PASSWORD_FOR_ACCESS_TOKEN:"sepft",SUCCESS_EXCHANGE_PASSKEY_OOB_FOR_ACCESS_TOKEN:"sepkoobft",SUCCESS_EXCHANGE_PASSKEY_OTP_FOR_ACCESS_TOKEN:"sepkotpft",SUCCESS_EXCHANGE_PASSKEY_MFA_RECOVERY_FOR_ACCESS_TOKEN:"sepkrcft",SUCCESS_EXCHANGE_PASSWORD_MFA_RECOVERY_FOR_ACCESS_TOKEN:"sercft",SUCCESS_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN:"sertft",SUCCESSFULLY_ACCEPTED_USER_INVITE:"si",BREACHED_PASSWORD_ON_SIGNUP:"signup_pwd_leak",SUCCESS_LOGOUT:"slo",SUCCESS_REVOCATION:"srrt",SUCCESS_SIGNUP:"ss",FAILED_SS_SSO_OPERATION:"ss_sso_failure",INFORMATION_FROM_SS_SSO_OPERATION:"ss_sso_info",SUCCESS_SS_SSO_OPERATION:"ss_sso_success",SUCCESS_SILENT_AUTH:"ssa",SUCCESSFUL_SCIM_OPERATION:"sscim",SUCCESSFULLY_IMPORTED_USERS:"sui",SUCCESS_VERIFICATION_EMAIL:"sv",SUCCESS_VERIFICATION_EMAIL_REQUEST:"svr",MAX_AMOUNT_OF_AUTHENTICATORS:"too_many_records",USER_LOGIN_BLOCK_RELEASED:"ublkdu",FAILED_UNIVERSAL_LOGOUT:"universal_logout_failed",SUCCESSFUL_UNIVERSAL_LOGOUT:"universal_logout_succeeded",WARNING_DURING_LOGIN:"w",WARNING_SENDING_NOTIFICATION:"wn",WARNING_USER_MANAGEMENT:"wum"},yo=e.z.string().refine(t=>Object.values(we).includes(t),{message:"Invalid log type"}),je=e.z.object({name:e.z.string(),version:e.z.string(),env:e.z.object({node:e.z.string().optional()}).optional()}),ke=e.z.object({country_code:e.z.string().length(2),city_name:e.z.string(),latitude:e.z.string(),longitude:e.z.string(),time_zone:e.z.string(),continent_code:e.z.string()}),Ue=e.z.object({type:yo,date:e.z.string(),description:e.z.string().optional(),ip:e.z.string().optional(),user_agent:e.z.string().optional(),details:e.z.any().optional(),isMobile:e.z.boolean(),user_id:e.z.string().optional(),user_name:e.z.string().optional(),connection:e.z.string().optional(),connection_id:e.z.string().optional(),client_id:e.z.string().optional(),client_name:e.z.string().optional(),audience:e.z.string().optional(),scope:e.z.string().optional(),strategy:e.z.string().optional(),strategy_type:e.z.string().optional(),hostname:e.z.string().optional(),auth0_client:je.optional(),log_id:e.z.string().optional(),location_info:ke.optional()}),To=e.z.object({...Ue.shape,log_id:e.z.string()}),Fe=e.z.object({id:e.z.string().optional(),user_id:e.z.string(),password:e.z.string(),algorithm:e.z.enum(["bcrypt","argon2id"]).default("argon2id"),is_current:e.z.boolean().default(true)}),Oo=Fe.extend({id:e.z.string(),created_at:e.z.string(),updated_at:e.z.string()}),ve=e.z.object({initial_user_agent:e.z.string().describe("First user agent of the device from which this user logged in"),initial_ip:e.z.string().describe("First IP address associated with this session"),initial_asn:e.z.string().describe("First autonomous system number associated with this session"),last_user_agent:e.z.string().describe("Last user agent of the device from which this user logged in"),last_ip:e.z.string().describe("Last IP address from which this user logged in"),last_asn:e.z.string().describe("Last autonomous system number from which this user logged in")}),xe=e.z.object({id:e.z.string(),revoked_at:e.z.string().optional(),used_at:e.z.string().optional(),user_id:e.z.string().describe("The user ID associated with the session"),expires_at:e.z.string().optional(),login_session_id:e.z.string(),idle_expires_at:e.z.string().optional(),device:ve.describe("Metadata related to the device used in the session"),clients:e.z.array(e.z.string()).describe("List of client details for the session")}),No=e.z.object({created_at:e.z.string(),updated_at:e.z.string(),authenticated_at:e.z.string(),last_interaction_at:e.z.string(),...xe.shape}),Ro=e.z.object({kid:e.z.string().openapi({description:"The key id of the signing key"}),cert:e.z.string().openapi({description:"The public certificate of the signing key"}),fingerprint:e.z.string().openapi({description:"The cert fingerprint"}),thumbprint:e.z.string().openapi({description:"The cert thumbprint"}),pkcs7:e.z.string().optional().openapi({description:"The private key in pkcs7 format"}),current:e.z.boolean().optional().openapi({description:"True if the key is the current key"}),next:e.z.boolean().optional().openapi({description:"True if the key is the next key"}),previous:e.z.boolean().optional().openapi({description:"True if the key is the previous key"}),current_since:e.z.string().optional().openapi({description:"The date and time when the key became the current key"}),current_until:e.z.string().optional().openapi({description:"The date and time when the current key was rotated"}),revoked:e.z.boolean().optional().openapi({description:"True if the key is revoked"}),revoked_at:e.z.string().optional().openapi({description:"The date and time when the key was revoked"}),connection:e.z.string().optional().openapi({description:"The connection identifier associated with the key"}),type:e.z.enum(["jwt_signing","saml_encryption"]).openapi({description:"The type of the signing key"})});var Pe=(t=>(t.RefreshToken="refresh_token",t.AuthorizationCode="authorization_code",t.ClientCredential="client_credentials",t.Passwordless="passwordless",t.Password="password",t.OTP="http://auth0.com/oauth/grant-type/passwordless/otp",t))(Pe||{});const Do=e.z.object({access_token:e.z.string(),id_token:e.z.string().optional(),scope:e.z.string().optional(),state:e.z.string().optional(),refresh_token:e.z.string().optional(),token_type:e.z.string(),expires_in:e.z.number()});e.z.object({code:e.z.string(),state:e.z.string().optional()});const Me=e.z.object({button_border_radius:e.z.number(),button_border_weight:e.z.number(),buttons_style:e.z.enum(["pill","rounded","sharp"]),input_border_radius:e.z.number(),input_border_weight:e.z.number(),inputs_style:e.z.enum(["pill","rounded","sharp"]),show_widget_shadow:e.z.boolean(),widget_border_weight:e.z.number(),widget_corner_radius:e.z.number()}),He=e.z.object({base_focus_color:e.z.string(),base_hover_color:e.z.string(),body_text:e.z.string(),captcha_widget_theme:e.z.enum(["auto","dark","light"]),error:e.z.string(),header:e.z.string(),icons:e.z.string(),input_background:e.z.string(),input_border:e.z.string(),input_filled_text:e.z.string(),input_labels_placeholders:e.z.string(),links_focused_components:e.z.string(),primary_button:e.z.string(),primary_button_label:e.z.string(),secondary_button_border:e.z.string(),secondary_button_label:e.z.string(),success:e.z.string(),widget_background:e.z.string(),widget_border:e.z.string()}),r=e.z.object({bold:e.z.boolean(),size:e.z.number()}),Ge=e.z.object({body_text:r,buttons_text:r,font_url:e.z.string(),input_labels:r,links:r,links_style:e.z.enum(["normal","underlined"]),reference_text_size:e.z.number(),subtitle:r,title:r}),Be=e.z.object({background_color:e.z.string(),background_image_url:e.z.string(),page_layout:e.z.enum(["center","left","right"])}),Ke=e.z.object({header_text_alignment:e.z.enum(["center","left","right"]),logo_height:e.z.number(),logo_position:e.z.enum(["center","left","none","right"]),logo_url:e.z.string(),social_buttons_layout:e.z.enum(["bottom","top"])}),We=e.z.object({borders:Me,colors:He,displayName:e.z.string(),fonts:Ge,page_background:Be,widget:Ke}),Lo=We.extend({themeId:e.z.string()}),wo=e.z.object({universal_login_experience:e.z.enum(["new","classic"]).default("new"),identifier_first:e.z.boolean().default(true),password_first:e.z.boolean().default(false),webauthn_platform_first_factor:e.z.boolean()}),jo=e.z.object({name:e.z.string(),enabled:e.z.boolean().optional().default(true),default_from_address:e.z.string().optional(),credentials:e.z.union([e.z.object({accessKeyId:e.z.string(),secretAccessKey:e.z.string(),region:e.z.string()}),e.z.object({smtp_host:e.z.array(e.z.string()),smtp_port:e.z.number(),smtp_user:e.z.string(),smtp_pass:e.z.string()}),e.z.object({api_key:e.z.string(),domain:e.z.string().optional()}),e.z.object({connectionString:e.z.string()}),e.z.object({tenantId:e.z.string(),clientId:e.z.string(),clientSecret:e.z.string()})]),settings:e.z.object({}).optional()}),Ve=e.z.object({id:e.z.string(),session_id:e.z.string(),user_id:e.z.string(),client_id:e.z.string(),expires_at:e.z.string().optional(),idle_expires_at:e.z.string().optional(),last_exchanged_at:e.z.string().optional(),device:ve,resource_servers:e.z.array(e.z.object({audience:e.z.string(),scopes:e.z.string()})),rotating:e.z.boolean()}),ko=e.z.object({created_at:e.z.string(),...Ve.shape}),Uo=e.z.object({to:e.z.string(),message:e.z.string()}),Fo=e.z.object({name:e.z.string(),options:e.z.object({})}),Xe=e.z.object({value:e.z.string(),description:e.z.string().optional()}),qe=e.z.object({token_dialect:e.z.enum(["access_token","access_token_authz"]).optional(),enforce_policies:e.z.boolean().optional(),allow_skipping_userinfo:e.z.boolean().optional(),skip_userinfo:e.z.boolean().optional(),persist_client_authorization:e.z.boolean().optional(),enable_introspection_endpoint:e.z.boolean().optional(),mtls:e.z.object({bound_access_tokens:e.z.boolean().optional()}).optional()}),Ye=e.z.object({id:e.z.string().optional(),name:e.z.string(),identifier:e.z.string(),scopes:e.z.array(Xe).optional(),signing_alg:e.z.string().optional(),signing_secret:e.z.string().optional(),token_lifetime:e.z.number().optional(),token_lifetime_for_web:e.z.number().optional(),skip_consent_for_verifiable_first_party_clients:e.z.boolean().optional(),allow_offline_access:e.z.boolean().optional(),verificationKey:e.z.string().optional(),options:qe.optional(),is_system:e.z.boolean().optional()}),Qe=e.z.object({...Ye.shape,created_at:e.z.string().optional(),updated_at:e.z.string().optional()}),vo=e.z.array(Qe),Je=e.z.object({role_id:e.z.string(),resource_server_identifier:e.z.string(),permission_name:e.z.string()}),Ze=e.z.object({...Je.shape,created_at:e.z.string()}),xo=e.z.array(Ze),$e=e.z.object({user_id:e.z.string(),resource_server_identifier:e.z.string(),permission_name:e.z.string(),organization_id:e.z.string().optional()}),et=e.z.object({...$e.shape,tenant_id:e.z.string(),created_at:e.z.string().optional()}),Po=e.z.array(et),tt=e.z.object({user_id:e.z.string(),resource_server_identifier:e.z.string(),resource_server_name:e.z.string(),permission_name:e.z.string(),description:e.z.string().nullable().optional(),created_at:e.z.string().optional(),organization_id:e.z.string().optional()}),Mo=e.z.array(tt),ot=e.z.object({user_id:e.z.string(),role_id:e.z.string(),organization_id:e.z.string().optional()}),nt=e.z.object({...ot.shape,tenant_id:e.z.string(),created_at:e.z.string().optional()}),Ho=e.z.array(nt),it=e.z.object({id:e.z.string().optional().openapi({description:"The unique identifier of the role. If not provided, one will be generated."}),name:e.z.string().min(1).max(50).openapi({description:"The name of the role. Cannot include '<' or '>'"}),description:e.z.string().max(255).optional().openapi({description:"The description of the role"}),is_system:e.z.boolean().optional()}),at=it.extend({id:e.z.string().openapi({description:"The unique identifier of the role"}),created_at:e.z.string().optional(),updated_at:e.z.string().optional()}),Go=e.z.array(at),rt=e.z.object({logo_url:e.z.string().optional().openapi({description:"URL of the organization's logo"}),colors:e.z.object({primary:e.z.string().optional().openapi({description:"Primary color in hex format (e.g., #FF0000)"}),page_background:e.z.string().optional().openapi({description:"Page background color in hex format (e.g., #FFFFFF)"})}).optional()}).optional(),st=e.z.object({connection_id:e.z.string().openapi({description:"ID of the connection"}),assign_membership_on_login:e.z.boolean().default(false).openapi({description:"Whether to assign membership to the organization on login"}),show_as_button:e.z.boolean().default(true).openapi({description:"Whether to show this connection as a button in the login screen"}),is_signup_enabled:e.z.boolean().default(true).openapi({description:"Whether signup is enabled for this connection"})}),lt=e.z.object({client_credentials:e.z.object({enforce:e.z.boolean().default(false).openapi({description:"Whether to enforce token quota limits"}),per_day:e.z.number().min(0).default(0).openapi({description:"Maximum tokens per day (0 = unlimited)"}),per_hour:e.z.number().min(0).default(0).openapi({description:"Maximum tokens per hour (0 = unlimited)"})}).optional()}).optional(),ct=e.z.object({id:e.z.string().optional(),name:e.z.string().min(1).regex(/^[a-z0-9_-]+$/,{message:"Organization name must be lowercase and can only contain letters, numbers, hyphens, and underscores"}).openapi({description:"The name of the organization. Must be lowercase and can only contain letters, numbers, hyphens, and underscores."}),display_name:e.z.string().optional().openapi({description:"The display name of the organization"}),branding:rt,metadata:e.z.record(e.z.any()).default({}).optional().openapi({description:"Custom metadata for the organization"}),enabled_connections:e.z.array(st).default([]).optional().openapi({description:"List of enabled connections for the organization"}),token_quota:lt}),Bo=e.z.object({...ct.shape,...s.shape,id:e.z.string(),name:e.z.string().min(1).openapi({description:"The name of the organization"})}),pt=e.z.object({user_id:e.z.string().openapi({description:"ID of the user"}),organization_id:e.z.string().openapi({description:"ID of the organization"})}),Ko=e.z.object({...pt.shape,...s.shape,id:e.z.string()}),Wo=e.z.object({idle_session_lifetime:e.z.number().optional(),session_lifetime:e.z.number().optional(),session_cookie:e.z.object({mode:e.z.enum(["persistent","non-persistent"]).optional()}).optional(),enable_client_connections:e.z.boolean().optional(),default_redirection_uri:e.z.string().optional(),enabled_locales:e.z.array(e.z.string()).optional(),default_directory:e.z.string().optional(),error_page:e.z.object({html:e.z.string().optional(),show_log_link:e.z.boolean().optional(),url:e.z.string().optional()}).optional(),flags:e.z.object({allow_legacy_delegation_grant_types:e.z.boolean().optional(),allow_legacy_ro_grant_types:e.z.boolean().optional(),allow_legacy_tokeninfo_endpoint:e.z.boolean().optional(),disable_clickjack_protection_headers:e.z.boolean().optional(),enable_apis_section:e.z.boolean().optional(),enable_client_connections:e.z.boolean().optional(),enable_custom_domain_in_emails:e.z.boolean().optional(),enable_dynamic_client_registration:e.z.boolean().optional(),enable_idtoken_api2:e.z.boolean().optional(),enable_legacy_logs_search_v2:e.z.boolean().optional(),enable_legacy_profile:e.z.boolean().optional(),enable_pipeline2:e.z.boolean().optional(),enable_public_signup_user_exists_error:e.z.boolean().optional(),use_scope_descriptions_for_consent:e.z.boolean().optional(),disable_management_api_sms_obfuscation:e.z.boolean().optional(),enable_adfs_waad_email_verification:e.z.boolean().optional(),revoke_refresh_token_grant:e.z.boolean().optional(),dashboard_log_streams_next:e.z.boolean().optional(),dashboard_insights_view:e.z.boolean().optional(),disable_fields_map_fix:e.z.boolean().optional(),mfa_show_factor_list_on_enrollment:e.z.boolean().optional()}).optional(),friendly_name:e.z.string().optional(),picture_url:e.z.string().optional(),support_email:e.z.string().optional(),support_url:e.z.string().optional(),sandbox_version:e.z.string().optional(),sandbox_versions_available:e.z.array(e.z.string()).optional(),change_password:e.z.object({enabled:e.z.boolean(),html:e.z.string()}).optional(),guardian_mfa_page:e.z.object({enabled:e.z.boolean(),html:e.z.string()}).optional(),default_audience:e.z.string().optional(),default_organization:e.z.string().optional(),sessions:e.z.object({oidc_logout_prompt_enabled:e.z.boolean().optional()}).optional()}),Vo=e.z.object({date:e.z.string().openapi({description:"Date these events occurred in ISO 8601 format",example:"2025-12-19"}),logins:e.z.number().openapi({description:"Number of logins on this date",example:150}),signups:e.z.number().openapi({description:"Number of signups on this date",example:25}),leaked_passwords:e.z.number().openapi({description:"Number of breached-password detections on this date (subscription required)",example:0}),updated_at:e.z.string().openapi({description:"Date and time this stats entry was last updated in ISO 8601 format",example:"2025-12-19T10:30:00.000Z"}),created_at:e.z.string().openapi({description:"Approximate date and time the first event occurred in ISO 8601 format",example:"2025-12-19T00:00:00.000Z"})}),Xo=e.z.number().openapi({description:"Number of active users in the last 30 days",example:1234});function qo(t){const[a,c]=t.split("|");if(!a||!c)throw new Error(`Invalid user_id: ${t}`);return {connection:a,id:c}}function Yo(t){const{primary:a,secondaries:c,syncMethods:_t=["create","update","remove","delete","set"]}=t,dt={get(d,n){if(typeof n=="symbol")return d[n];const z=d[n];return typeof z!="function"?z:_t.includes(n)?async(...u)=>{const zt=await z.apply(d,u),h=[];for(const p of c){const N=p.adapter[n];if(typeof N!="function")continue;const gt=(async()=>{try{await N.apply(p.adapter,u);}catch(R){try{p.onError?p.onError(R,n,u):console.error(`Passthrough adapter: secondary write failed for ${n}:`,R);}catch(mt){console.error(`Passthrough adapter: onError handler threw for ${n}:`,mt);}}})();p.blocking&&h.push(gt);}return h.length>0&&await Promise.all(h),zt}:z.bind(d)}};return new Proxy(a,dt)}function Qo(t){return t}exports.Auth0ActionEnum=ht;exports.Auth0Client=je;exports.AuthorizationResponseMode=A;exports.AuthorizationResponseType=E;exports.CodeChallengeMethod=I;exports.ComponentCategory=f;exports.ComponentType=b;exports.EmailActionEnum=St;exports.FlowActionTypeEnum=ut;exports.GrantType=Pe;exports.LocationInfo=ke;exports.LogTypes=we;exports.LoginSessionState=O;exports.NodeType=J;exports.RedirectTargetEnum=j;exports.actionNodeSchema=ee;exports.activeUsersResponseSchema=Xo;exports.auth0FlowInsertSchema=Ot;exports.auth0FlowSchema=ae;exports.auth0QuerySchema=ft;exports.auth0UpdateUserActionSchema=L;exports.auth0UserResponseSchema=At;exports.authParamsSchema=re;exports.baseUserSchema=S;exports.blockComponentSchema=he;exports.bordersSchema=Me;exports.brandingSchema=Nt;exports.buttonComponentSchema=V;exports.clientGrantInsertSchema=B;exports.clientGrantListSchema=Tt;exports.clientGrantSchema=K;exports.clientInsertSchema=H;exports.clientSchema=G;exports.codeInsertSchema=ze;exports.codeSchema=Dt;exports.codeTypeSchema=de;exports.colorsSchema=He;exports.componentMessageSchema=Ae;exports.componentSchema=Q;exports.connectionInsertSchema=le;exports.connectionOptionsSchema=se;exports.connectionSchema=ce;exports.coordinatesSchema=l;exports.createPassthroughAdapter=Yo;exports.createWriteOnlyAdapter=Qo;exports.customDomainInsertSchema=ge;exports.customDomainSchema=ue;exports.customDomainWithTenantIdSchema=Lt;exports.dailyStatsSchema=Vo;exports.emailProviderSchema=jo;exports.emailVerificationRulesSchema=D;exports.emailVerifyActionSchema=w;exports.endingSchema=ie;exports.fieldComponentSchema=be;exports.flowActionStepSchema=U;exports.flowInsertSchema=F;exports.flowSchema=bt;exports.flowsFieldComponentSchema=q;exports.flowsFlowNodeSchema=$;exports.flowsStepNodeSchema=Z;exports.fontDetailsSchema=r;exports.fontsSchema=Ge;exports.formControlSchema=ao;exports.formInsertSchema=Ee;exports.formNodeComponentDefinition=T;exports.formNodeSchema=fe;exports.formSchema=co;exports.genericComponentSchema=Y;exports.genericNodeSchema=te;exports.hookInsertSchema=ho;exports.hookSchema=fo;exports.identitySchema=x;exports.inviteInsertSchema=Ne;exports.inviteSchema=Eo;exports.inviteeSchema=Oe;exports.inviterSchema=Te;exports.isBlockComponent=_o;exports.isFieldComponent=go;exports.isWidgetComponent=zo;exports.jwksKeySchema=Ao;exports.jwksSchema=Re;exports.legacyClientSchema=Rt;exports.legalComponentSchema=X;exports.logInsertSchema=Ue;exports.logSchema=To;exports.loginSessionInsertSchema=Le;exports.loginSessionSchema=Co;exports.loginSessionStateSchema=De;exports.nodeSchema=oe;exports.openIDConfigurationSchema=Io;exports.organizationBrandingSchema=rt;exports.organizationEnabledConnectionSchema=st;exports.organizationInsertSchema=ct;exports.organizationSchema=Bo;exports.organizationTokenQuotaSchema=lt;exports.pageBackgroundSchema=Be;exports.parseUserId=qo;exports.passwordInsertSchema=Fe;exports.passwordSchema=Oo;exports.profileDataSchema=v;exports.promptSettingSchema=wo;exports.redirectActionSchema=k;exports.refreshTokenInsertSchema=Ve;exports.refreshTokenSchema=ko;exports.resourceServerInsertSchema=Ye;exports.resourceServerListSchema=vo;exports.resourceServerOptionsSchema=qe;exports.resourceServerSchema=Qe;exports.resourceServerScopeSchema=Xe;exports.richTextComponentSchema=W;exports.roleInsertSchema=it;exports.roleListSchema=Go;exports.rolePermissionInsertSchema=Je;exports.rolePermissionListSchema=xo;exports.rolePermissionSchema=Ze;exports.roleSchema=at;exports.screenLinkSchema=Ie;exports.sessionInsertSchema=xe;exports.sessionSchema=No;exports.signingKeySchema=Ro;exports.smsProviderSchema=Fo;exports.smsSendParamsSchema=Uo;exports.startSchema=ne;exports.tenantInsertSchema=pe;exports.tenantSchema=_e;exports.tenantSettingsSchema=Wo;exports.themeInsertSchema=We;exports.themeSchema=Lo;exports.tokenResponseSchema=Do;exports.totalsSchema=Et;exports.uiScreenSchema=po;exports.userInsertSchema=P;exports.userOrganizationInsertSchema=pt;exports.userOrganizationSchema=Ko;exports.userPermissionInsertSchema=$e;exports.userPermissionListSchema=Po;exports.userPermissionSchema=et;exports.userPermissionWithDetailsListSchema=Mo;exports.userPermissionWithDetailsSchema=tt;exports.userResponseSchema=It;exports.userRoleInsertSchema=ot;exports.userRoleListSchema=Ho;exports.userRoleSchema=nt;exports.userSchema=M;exports.verificationMethodsSchema=me;exports.widgetComponentSchema=Se;exports.widgetSchema=Ke;
|
|
8115
8115
|
} (adapterInterfaces));
|
|
8116
8116
|
return adapterInterfaces;
|
|
8117
8117
|
}
|