authhero 4.31.0 → 4.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/u/js/client.js +1 -1
- package/dist/assets/u/widget/authhero-widget.esm.js +1 -1
- package/dist/assets/u/widget/index.esm.js +1 -1
- package/dist/assets/u/widget/p-1107d60e.entry.js +1 -0
- package/dist/assets/u/widget/p-5hZ8Vbm9.js +2 -0
- package/dist/assets/u/widget/p-b2d3d319.entry.js +1 -0
- package/dist/authhero.cjs +69 -67
- package/dist/authhero.d.ts +36 -54
- package/dist/authhero.mjs +16751 -15926
- package/dist/client.js +1 -1
- package/dist/stats.html +1 -1
- package/package.json +4 -4
- package/dist/assets/u/widget/p-130714cc.entry.js +0 -1
- package/dist/assets/u/widget/p-2c7cceee.entry.js +0 -1
- package/dist/assets/u/widget/p-ARKBiJrR.js +0 -2
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"type": "git",
|
|
12
12
|
"url": "https://github.com/markusahlstrand/authhero"
|
|
13
13
|
},
|
|
14
|
-
"version": "4.
|
|
14
|
+
"version": "4.32.0",
|
|
15
15
|
"files": [
|
|
16
16
|
"dist"
|
|
17
17
|
],
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
"vite": "^7.2.0",
|
|
58
58
|
"vite-plugin-dts": "^4.5.4",
|
|
59
59
|
"vitest": "^4.0.7",
|
|
60
|
-
"@authhero/kysely-adapter": "10.
|
|
61
|
-
"@authhero/widget": "0.
|
|
60
|
+
"@authhero/kysely-adapter": "10.94.0",
|
|
61
|
+
"@authhero/widget": "0.13.0"
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
64
|
"@peculiar/x509": "^1.14.0",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"sanitize-html": "^2.17.0",
|
|
74
74
|
"ulid": "^2.3.0",
|
|
75
75
|
"xstate": "^5.25.0",
|
|
76
|
-
"@authhero/adapter-interfaces": "0.
|
|
76
|
+
"@authhero/adapter-interfaces": "0.131.0",
|
|
77
77
|
"@authhero/saml": "0.3.0"
|
|
78
78
|
},
|
|
79
79
|
"peerDependencies": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,h as r}from"./p-ARKBiJrR.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"})};sanitizeForCssToken(t){return t.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}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:n}=t.config??{};return e?r("img",{class:"image",part:"image",src:e,alt:i??"",width:o,height:n,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","data-primary-action-button":!0,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:n}=t.config??{},a=!!(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:n,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,"data-input-name":t.id,value:this.value??"",placeholder:" ",required:t.required,disabled:this.disabled,maxLength:n,onInput:this.handleInput}),this.renderFloatingLabel(t.label,e,t.required,a)),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,"data-input-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),n=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,"data-input-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),n&&r("div",{class:"field-link",part:"field-link"},r("a",{href:n,class:"link",part:"link"},"Forgot password?")))}renderNumberField(t){const e=`input-${t.id}`,i=this.getErrors(),{placeholder:o,min:n,max:a,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:n,max:a,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:n}=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:n,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:n}=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},n&&r("option",{value:"",disabled:!0,selected:!this.value},n),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??{},n="checkbox"===o,a=n?"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:a,part:a,name:t.id,value:e.value,checked:this.value===e.value,required:t.required&&!n,disabled:this.disabled,onChange:this.handleInput}),r("span",null,e.label))))),this.renderErrors(),0===e.length&&this.renderHint(t.hint))}renderSocialField(t){const e=t.config?.providers??[],i=t.config?.provider_details,o=new Map(i?.map((t=>[t.name,t]))??[]),n=t=>{const e=o.get(t),i=this.sanitizeForCssToken(t);return e?.icon_url?r("img",{class:"social-icon",part:`social-icon social-icon-${i}`,src:e.icon_url,alt:e.display_name||t}):null};return r("div",{class:"social-buttons",part:"social-buttons"},e.map((t=>{const e=this.sanitizeForCssToken(t),i=(t=>{const e=o.get(t);return e?.strategy??t})(t),a=n(t);return r("button",{type:"button",class:`btn btn-secondary btn-social btn-social-${e}${a?"":" no-icon"}`,part:`button button-secondary button-social button-social-${e}`,"data-connection-name":t,"data-strategy":i,disabled:this.disabled,onClick:e=>this.handleButtonClick(e,"SOCIAL",t),key:t},a,r("span",{class:"btn-social-content",part:`button-social-content button-social-content-${e}`},r("span",{part:`button-social-text button-social-text-${e}`},(t=>{const e=o.get(t);return e?.display_name?e.display_name:t.split("-").map((t=>t.charAt(0).toUpperCase()+t.slice(1))).join(" ")})(t)),r("span",{class:"btn-social-subtitle",part:`button-social-subtitle button-social-subtitle-${e}`})))})))}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:12px}.btn-primary:not(:disabled):hover{filter:brightness(0.85)}.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}.social-buttons{display:flex;flex-direction:column;gap:12px}.btn-social{display:flex;align-items:center;justify-content:center;gap:12px}.btn-social-content{display:flex;flex-direction:column;align-items:center;text-align:center}.btn-social-subtitle{font-size:12px;font-style:italic;opacity:0.8;margin-top:2px}.btn-social-subtitle:empty{display:none}.social-icon{width:20px;height:20px;flex-shrink:0}@media (max-width: 480px){.social-buttons:has(.btn-social:nth-child(3)){flex-direction:row;flex-wrap:nowrap;justify-content:stretch;gap:8px}.social-buttons:has(.btn-social:nth-child(3)) .btn-social{width:auto;min-width:0;padding:12px;flex:1 1 0}.social-buttons:has(.btn-social:nth-child(3)) .btn-social span{display:none}.social-buttons:has(.btn-social:nth-child(3)) .social-icon{width:24px;height:24px}}.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 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,g as i,h as s}from"./p-ARKBiJrR.js";function r(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 o(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 a(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 s=r(i.buttons_style,i.button_border_radius);s&&(e["--ah-btn-radius"]=s),void 0!==i.button_border_weight&&(e["--ah-btn-border-width"]=`${i.button_border_weight}px`);const o=r(i.inputs_style,i.input_border_radius);o&&(e["--ah-input-radius"]=o),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,s=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*s);e["--ah-font-size-title"]=`${t}px`}if(i.subtitle?.size){const t=Math.round(i.subtitle.size/100*s);e["--ah-font-size-subtitle"]=`${t}px`}if(i.body_text?.size){const t=Math.round(i.body_text.size/100*s);e["--ah-font-size-body"]=`${t}px`}if(i.input_labels?.size){const t=Math.round(i.input_labels.size/100*s);e["--ah-font-size-label"]=`${t}px`}if(i.buttons_text?.size){const t=Math.round(i.buttons_text.size/100*s);e["--ah-font-size-btn"]=`${t}px`}if(i.links?.size){const t=Math.round(i.links.size/100*s);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={br:[],em:[],i:[],strong:[],b:[],u:[],span:["class"],a:["href","class"]};function h(t){if(!t)return"";if(!t.includes("<"))return t;let e=t;e=e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'");for(const[t,i]of Object.entries(n)){if("br"===t){e=e.replace(/<br\s*\/?>/gi,"<br>");continue}const s=new RegExp(`<${t}((?:\\s+[a-z-]+(?:="[^&]*"|='[^&]*')?)*)\\s*>`,"gi");e=e.replace(s,((e,s)=>{const r=[];if(s){const t=s.replace(/"/g,'"').replace(/'/g,"'").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),e=/([a-z-]+)=["']([^"']*)["']/gi;let o;for(;null!==(o=e.exec(t));){const[,t,e]=o;t&&i.includes(t.toLowerCase())&&("href"===t.toLowerCase()?c(e||"")&&r.push(`${t}="${l(e||"")}"`):r.push(`${t}="${l(e||"")}"`))}}"a"===t&&(r.push('target="_blank"'),r.push('rel="noopener noreferrer"'));const o=r.length?" "+r.join(" "):"";return`<${t}${o}>`}));const r=new RegExp(`</${t}>`,"gi");e=e.replace(r,`</${t}>`)}return e}function c(t){if(!t)return!1;if(t.startsWith("/")||t.startsWith("#")||t.startsWith("?"))return!0;try{const e=new URL(t,"https://example.com");return"http:"===e.protocol||"https:"===e.protocol}catch{return!1}}function l(t){return t.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}const d=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;baseUrl;state;screenId;watchScreenId(){this.updateDataScreenAttribute()}authParams;statePersistence="memory";storageKey="authhero_widget";branding;theme;loading=!1;autoSubmit=!1;autoNavigate;_screen;_authParams;_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),this.updateDataScreenAttribute())}updateDataScreenAttribute(){this.screenId?this.el.setAttribute("data-screen",this.screenId):this.el.removeAttribute("data-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()}watchAuthParams(t){if("string"==typeof t)try{this._authParams=JSON.parse(t)}catch{console.error("Failed to parse authParams JSON")}else this._authParams=t}applyThemeStyles(){const t=(e=this._theme,{...o(this._branding),...a(e)});var e;!function(t,e){Object.entries(e).forEach((([e,i])=>{t.style.setProperty(e,i)}))}(this.el,t)}get shouldAutoNavigate(){return this.autoNavigate??this.autoSubmit}buildUrl(t){return this.baseUrl?new URL(t,this.baseUrl).toString():t}loadPersistedState(){if("url"===this.statePersistence){const t=new URL(window.location.href).searchParams.get("state");t&&!this.state&&(this.state=t)}else if("session"===this.statePersistence)try{const t=sessionStorage.getItem(`${this.storageKey}_state`);t&&!this.state&&(this.state=t);const e=sessionStorage.getItem(`${this.storageKey}_screenId`);e&&!this.screenId&&(this.screenId=e)}catch{}}persistState(){if("url"===this.statePersistence){const t=new URL(window.location.href);this.state&&t.searchParams.set("state",this.state),this.screenId&&t.searchParams.set("screen",this.screenId),window.history.replaceState({},"",t.toString())}else if("session"===this.statePersistence)try{this.state&&sessionStorage.setItem(`${this.storageKey}_state`,this.state),this.screenId&&sessionStorage.setItem(`${this.storageKey}_screenId`,this.screenId)}catch{}}async componentWillLoad(){this.watchScreen(this.screen),this.watchBranding(this.branding),this.watchTheme(this.theme),this.watchAuthParams(this.authParams),this.loadPersistedState(),this.apiUrl&&!this._screen&&await this.fetchScreen(this.screenId)}async fetchScreen(t,e){if(!this.apiUrl)return;const i=t||this.screenId;let s=this.apiUrl;i&&s.includes("{screenId}")&&(s=s.replace("{screenId}",encodeURIComponent(i)));const r=new URL(s,this.baseUrl||window.location.origin);this.state&&r.searchParams.set("state",this.state),e&&r.searchParams.set("nodeId",e),this.loading=!0;try{const t=await fetch(this.buildUrl(r.pathname+r.search),{credentials:"include",headers:{Accept:"application/json"}});if(t.ok){const e=await t.json();e.screen?(this._screen=e.screen,e.branding&&(this._branding=e.branding,this.applyThemeStyles()),e.state&&(this.state=e.state),e.screenId&&(this.screenId=e.screenId)):this._screen=e,this._screen&&(i&&i!==this.screenId&&(this.screenId=i),this.screenChange.emit(this._screen),this.updateDataScreenAttribute(),this.persistState())}else{const e=await t.json().catch((()=>({message:"Failed to load screen"})));this.flowError.emit({message:e.message||"Failed to load screen"})}}catch(t){console.error("Failed to fetch screen:",t),this.flowError.emit({message:t instanceof Error?t.message:"Failed to fetch screen"})}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.buildUrl(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}),this.shouldAutoNavigate&&(window.location.href=e.redirect)):e.screen?(this._screen=e.screen,this.formData={},this.screenChange.emit(e.screen),this.updateDataScreenAttribute(),e.screenId&&(this.screenId=e.screenId),this.persistState(),e.navigateUrl&&this.shouldAutoNavigate&&window.history.pushState({screen:e.screenId,state:this.state},"",e.navigateUrl),e.branding&&(this._branding=e.branding,this.applyThemeStyles()),e.state&&(this.state=e.state,this.persistState())):e.complete&&this.flowComplete.emit({}),!t.ok&&e.screen&&(this._screen=e.screen,this.screenChange.emit(e.screen),this.updateDataScreenAttribute())}}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),"SOCIAL"===t.type&&t.value&&this.shouldAutoNavigate?this.handleSocialLogin(t.value):"RESEND_BUTTON"===t.type&&this.shouldAutoNavigate&&this.handleResend()):this.handleSubmit({preventDefault:()=>{}})};handleSocialLogin(t){const e=this._authParams||{},i={connection:t};this.state?i.state=this.state:e.state&&(i.state=e.state),e.client_id&&(i.client_id=e.client_id),e.redirect_uri&&(i.redirect_uri=e.redirect_uri),e.scope&&(i.scope=e.scope),e.audience&&(i.audience=e.audience),e.nonce&&(i.nonce=e.nonce),e.response_type&&(i.response_type=e.response_type);const s=this.buildUrl("/authorize?"+new URLSearchParams(i).toString());this.navigate.emit({url:s}),window.location.href=s}async handleResend(){if(this._screen?.action)try{const t=this._screen.action+(this._screen.action.includes("?")?"&":"?")+"action=resend";await fetch(this.buildUrl(t),{method:"POST",credentials:"include"})}catch(t){console.error("Resend failed:",t)}}handleLinkClick=(t,e)=>{this.linkClick.emit({id:e.id,href:e.href,text:e.text}),this.shouldAutoNavigate||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 s("div",{class:"widget-container"},s("div",{class:"loading-spinner"}));if(!this._screen)return s("div",{class:"widget-container"},s("div",{class:"error-message"},"No screen configuration provided"));const t=this.getScreenErrors(),e=this.getScreenSuccesses(),i=this.getOrderedComponents(),r=i.filter((t=>this.isSocialComponent(t))),o=i.filter((t=>!this.isSocialComponent(t)&&!this.isDividerComponent(t))),a=i.some((t=>this.isDividerComponent(t))),n=t=>{const e=t.config;return["social-buttons","button","button-secondary","button-social","button-social-content","button-social-text","button-social-subtitle","social-icon",...(e?.providers??[]).flatMap((t=>{const e=t.replace(/[^a-zA-Z0-9-]/g,"-");return[`button-social-${e}`,`button-social-content-${e}`,`button-social-text-${e}`,`button-social-subtitle-${e}`,`social-icon-${e}`]}))].join(", ")},c=this._theme?.widget?.logo_url||this._branding?.logo_url;return s("div",{class:"widget-container",part:"container","data-authstack-container":!0},s("header",{class:"widget-header",part:"header"},c&&s("div",{class:"logo-wrapper",part:"logo-wrapper"},s("img",{class:"logo",part:"logo",src:c,alt:"Logo"})),this._screen.title&&s("h1",{class:"title",part:"title",innerHTML:h(this._screen.title)}),this._screen.description&&s("p",{class:"description",part:"description",innerHTML:h(this._screen.description)})),s("div",{class:"widget-body",part:"body"},t.map((t=>s("div",{class:"message message-error",part:"message message-error",key:t.id??t.text},t.text))),e.map((t=>s("div",{class:"message message-success",part:"message message-success",key:t.id??t.text},t.text))),s("form",{onSubmit:this.handleSubmit,part:"form"},s("div",{class:"form-content"},r.length>0&&s("div",{class:"social-section",part:"social-section"},r.map((t=>s("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,exportparts:n(t)})))),r.length>0&&o.length>0&&a&&s("div",{class:"divider",part:"divider"},s("span",{class:"divider-text"},"Or")),s("div",{class:"fields-section",part:"fields-section"},o.map((t=>s("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&&s("div",{class:"links",part:"links"},this._screen.links.map((t=>s("span",{class:"link-wrapper",part:"link-wrapper",key:t.id??t.href},t.linkText?s("span",null,t.text," ",s("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)):s("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{screenId:[{watchScreenId:0}],screen:[{watchScreen:0}],branding:[{watchBranding:0}],theme:[{watchTheme:0}],authParams:[{watchAuthParams:0}]}}};d.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 48px 24px)}.widget-body{padding:var(--ah-body-padding, 0 48px 40px)}.logo-wrapper{display:var(--ah-logo-display, flex);justify-content:var(--ah-logo-align, center);margin-bottom:8px}.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 8px);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 0 8px);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}@media (max-width: 480px){:host{display:block;width:100%;min-height:100vh;background-color:var(--ah-color-bg, #ffffff)}.widget-container{box-shadow:none;border-radius:0;max-width:none;width:100%;margin:0}.widget-header{padding:24px 16px 16px}.widget-body{padding:0 16px 24px}}";export{d as authhero_widget}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var t,e=(t=>(t.Undefined="undefined",t.Null="null",t.String="string",t.Number="number",t.SpecialNumber="number",t.Boolean="boolean",t.BigInt="bigint",t))(e||{}),n=(t=>(t.Array="array",t.Date="date",t.Map="map",t.Object="object",t.RegularExpression="regexp",t.Set="set",t.Channel="channel",t.Symbol="symbol",t))(n||{}),o="type",l="value",s="serialized:",i=(t,e)=>{var n;Object.entries(null!=(n=e.o.t)?n:{}).map((([n,[o]])=>{if(31&o||32&o){const o=t[n],l=function(t,e){for(;t;){const n=Object.getOwnPropertyDescriptor(t,e);if(null==n?void 0:n.get)return n;t=Object.getPrototypeOf(t)}}(Object.getPrototypeOf(t),n)||Object.getOwnPropertyDescriptor(t,n);l&&Object.defineProperty(t,n,{get(){return l.get.call(this)},set(t){l.set.call(this,t)},configurable:!0,enumerable:!0}),t[n]=e.l.has(n)?e.l.get(n):o}}))},r=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},c=(t,e)=>{e&&(t.__stencil__getHostRef=()=>e,e.i=t,512&e.o.u&&i(t,e))},u=(t,e)=>e in t,a=(t,e)=>(0,console.error)(t,e),f=new Map,d=new Map,p="s-id",h="sty-id",$="c-id",m="undefined"!=typeof window?window:{},v={u:0,p:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},y=t=>Promise.resolve(t),b=(()=>{try{return!!m.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),g=!!b&&(()=>!!m.document&&Object.getOwnPropertyDescriptor(m.document.adoptedStyleSheets,"length").writable)(),w=!1,j=[],S=[],O=(t,e)=>n=>{t.push(n),w||(w=!0,e&&4&v.u?E(x):v.raf(x))},k=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){a(t)}t.length=0},x=()=>{k(j),k(S),(w=j.length>0)&&v.raf(x)},E=t=>y().then(t),M=O(S,!0);function C(){const e=this.attachShadow({mode:"open"});void 0===t&&(t=null),t&&(g?e.adoptedStyleSheets.push(t):e.adoptedStyleSheets=[...e.adoptedStyleSheets,t])}var N=(t,e,n,o)=>{if(t["s-ol"]&&t["s-ol"].isConnected)return;const l=document.createTextNode("");if(l["s-nr"]=t,!e["s-cr"]||!e["s-cr"].parentNode)return;const s=e["s-cr"].parentNode,i=I(s,"appendChild");if(void 0!==o){l["s-oo"]=o;const t=I(s,"childNodes"),e=[l];t.forEach((t=>{t["s-nr"]&&e.push(t)})),e.sort(((t,e)=>!t["s-oo"]||t["s-oo"]<(e["s-oo"]||0)?-1:!e["s-oo"]||e["s-oo"]<t["s-oo"]?1:0)),e.forEach((t=>i.call(s,t)))}else i.call(s,l);t["s-ol"]=l,t["s-sh"]=e["s-hn"]};function I(t,e){if("__"+e in t){const n=t["__"+e];return"function"!=typeof n?n:n.bind(t)}return"function"!=typeof t[e]?t[e]:t[e].bind(t)}function L(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}var R=new WeakMap,D=(t,e,n)=>{let o=d.get(t);b&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,d.set(t,o)},A=(t,e)=>{var n,o,l;const s=P(e),i=d.get(s);if(!m.document)return s;if(t=11===t.nodeType?t:m.document,i)if("string"==typeof i){let l,r=R.get(t=t.head||t);r||R.set(t,r=new Set);const c=t.querySelector(`[${h}="${s}"]`);if(c)c.textContent=i;else if(!r.has(s)){l=m.document.createElement("style"),l.textContent=i;const c=null!=(n=v.h)?n:L(m.document);if(null!=c&&l.setAttribute("nonce",c),!(1&e.u))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(l,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(b){const e=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(i),g?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=i+e.textContent:t.prepend(l)}else t.append(l);1&e.u&&t.insertBefore(l,null),4&e.u&&(l.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),r&&r.add(s)}}else{let e=R.get(t);if(e||R.set(t,e=new Set),!e.has(s)){const n=null!=(l=t.defaultView)?l:t.ownerDocument.defaultView;let o;if(i.constructor===n.CSSStyleSheet)o=i;else{o=new n.CSSStyleSheet;for(let t=0;t<i.cssRules.length;t++)o.insertRule(i.cssRules[t].cssText,t)}if(g?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],e.add(s),"host"in t){const e=t.querySelector(`[${h}="${s}"]`);e&&M((()=>e.remove()))}}}return s},P=t=>"sc-"+t.$,U=t=>t.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g,"$1{"),V=t=>"object"==(t=typeof t)||"function"===t,_=(t,e,...n)=>{let o=null,l=null,s=!1,i=!1;const r=[],c=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?c(o):null!=o&&"boolean"!=typeof o&&((s="function"!=typeof t&&!V(o))&&(o+=""),s&&i?r[r.length-1].m+=o:r.push(s?T(null,o):o),i=s)};if(c(n),e){e.key&&(l=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}const u=T(t,null);return u.v=e,r.length>0&&(u.j=r),u.S=l,u},T=(t,e)=>({u:0,O:t,m:null!=e?e:null,k:null,j:null,v:null,S:null}),W={},z=(t,e,n,o,l,s,i,r=[])=>{let c,u,a,f;if(1===s.nodeType){if(c=s.getAttribute($),c&&(u=c.split("."),u[0]===i||"0"===u[0])){a=F({u:0,M:u[0],C:u[1],N:u[2],I:u[3],O:s.tagName.toLowerCase(),k:s,v:{class:s.className||""}}),e.push(a),s.removeAttribute($),t.j||(t.j=[]);const l=a.k.getAttribute("s-sn");"string"==typeof l&&("slot-fb"===a.O&&H(l,u[2],a,s,t,e,n,o,r),a.k["s-sn"]=l,a.k.removeAttribute("s-sn")),void 0!==a.I&&(t.j[a.I]=a),t=a,o&&"0"===a.N&&(o[a.I]=a.k)}if(s.shadowRoot)for(f=s.shadowRoot.childNodes.length-1;f>=0;f--)z(t,e,n,o,l,s.shadowRoot.childNodes[f],i,r);const d=s.__childNodes||s.childNodes;for(f=d.length-1;f>=0;f--)z(t,e,n,o,l,d[f],i,r)}else if(8===s.nodeType)u=s.nodeValue.split("."),(u[1]===i||"0"===u[1])&&(c=u[0],a=F({M:u[1],C:u[2],N:u[3],I:u[4]||"0",k:s,v:null,j:null,S:null,L:null,O:null,m:null}),"t"===c?(a.k=G(s,3),a.k&&3===a.k.nodeType&&(a.m=a.k.textContent,e.push(a),s.remove(),i===a.M&&(t.j||(t.j=[]),t.j[a.I]=a),o&&"0"===a.N&&(o[a.I]=a.k))):"c"===c?(a.k=G(s,8),a.k&&8===a.k.nodeType&&(e.push(a),s.remove())):a.M===i&&("s"===c?H(s["s-sn"]=u[5]||"",u[2],a,s,t,e,n,o,r):"r"===c&&o&&s.remove()));else if(t&&"style"===t.O){const e=T(null,s.textContent);e.k=s,e.I="0",t.j=[e]}return t},B=(t,e)=>{if(1===t.nodeType){const n=t[p]||t.getAttribute(p);n&&e.set(n,t);let o=0;if(t.shadowRoot)for(;o<t.shadowRoot.childNodes.length;o++)B(t.shadowRoot.childNodes[o],e);const l=t.__childNodes||t.childNodes;for(o=0;o<l.length;o++)B(l[o],e)}else if(8===t.nodeType){const n=t.nodeValue.split(".");"o"===n[0]&&(e.set(n[1]+"."+n[2],t),t.nodeValue="",t["s-en"]=n[3])}},F=t=>({u:0,M:null,C:null,N:null,I:"0",k:null,v:null,j:null,S:null,L:null,O:null,m:null,...t});function H(t,e,n,o,l,s,i,r,c){o["s-sr"]=!0,n.L=t||null,n.O="slot";const u=(null==l?void 0:l.k)?l.k["s-id"]||l.k.getAttribute("s-id"):"";if(r&&m.document){const s=n.k=m.document.createElement(n.O);n.L&&n.k.setAttribute("name",t),l.k.shadowRoot&&u&&u!==n.M?I(l.k,"insertBefore")(s,I(l.k,"children")[0]):I(I(o,"parentNode"),"insertBefore")(s,o),Y(c,e,t,o,n.M),o.remove(),"0"===n.N&&(r[n.I]=n.k)}else{const s=n.k,i=u&&u!==n.M&&l.k.shadowRoot;Y(c,e,t,o,i?u:n.M),function(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const e=e=>function(t){const n=[],o=this["s-sn"];(null==t?void 0:t.flatten)&&console.error("\n Flattening is not supported for Stencil non-shadow slots.\n You can use `.childNodes` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n ");const l=this["s-cr"].parentElement;return(l.__childNodes?l.childNodes:(t=>{const e=[];for(let n=0;n<t.length;n++){const o=t[n]["s-nr"]||void 0;o&&o.isConnected&&e.push(o)}return e})(l.childNodes)).forEach((t=>{o===(t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0)(t)&&n.push(t)})),e?n.filter((t=>1===t.nodeType)):n}.bind(t);t.assignedElements=e(!0),t.assignedNodes=e(!1)}(o),i&&l.k.insertBefore(s,l.k.children[0])}s.push(n),i.push(n),l.j||(l.j=[]),l.j[n.I]=n}var q,Y=(t,e,n,o,l)=>{var s,i;let r=o.nextSibling;if(t[e]=t[e]||[],r&&!(null==(s=r.nodeValue)?void 0:s.startsWith("s.")))do{!r||(r.getAttribute&&r.getAttribute("slot")||r["s-sn"])!==n&&(""!==n||r["s-sn"]||r.getAttribute&&r.getAttribute("slot")||8!==r.nodeType&&3!==r.nodeType)||(r["s-sn"]=n,t[e].push({slot:o,node:r,hostId:l})),r=null==r?void 0:r.nextSibling}while(r&&!(null==(i=r.nodeValue)?void 0:i.startsWith("s.")))},G=(t,e)=>{let n=t;do{n=n.nextSibling}while(n&&(n.nodeType!==e||!n.nodeValue));return n},J=class t{static fromLocalValue(e){const n=e[o],s=l in e?e[l]:void 0;switch(n){case"string":case"boolean":return s;case"bigint":return BigInt(s);case"undefined":return;case"null":return null;case"number":return"NaN"===s?NaN:"-0"===s?-0:"Infinity"===s?1/0:"-Infinity"===s?-1/0:s;case"array":return s.map((e=>t.fromLocalValue(e)));case"date":return new Date(s);case"map":const e=new Map;for(const[n,o]of s){const l="object"==typeof n&&null!==n?t.fromLocalValue(n):n,s=t.fromLocalValue(o);e.set(l,s)}return e;case"object":const o={};for(const[e,n]of s)o[e]=t.fromLocalValue(n);return o;case"regexp":const{pattern:l,flags:i}=s;return RegExp(l,i);case"set":const r=new Set;for(const e of s)r.add(t.fromLocalValue(e));return r;case"symbol":return Symbol(s);default:throw Error("Unsupported type: "+n)}}static fromLocalValueArray(e){return e.map((e=>t.fromLocalValue(e)))}static isLocalValueObject(t){if("object"!=typeof t||null===t)return!1;if(!t.hasOwnProperty(o))return!1;const s=t[o];return!!Object.values({...e,...n}).includes(s)&&("null"===s||"undefined"===s||t.hasOwnProperty(l))}},K=(t,e)=>"string"==typeof t&&t.startsWith(s)?t=function(t){return"string"==typeof t&&t.startsWith(s)?J.fromLocalValue(JSON.parse(atob(t.slice(11)))):t}(t):null==t||V(t)?t:4&e?"false"!==t&&(""===t||!!t):1&e?t+"":t,Q=t=>{var e;return null==(e=r(t))?void 0:e.$hostElement$},X=(t,e)=>{const n=Q(t);return{emit:t=>Z(n,e,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},Z=(t,e,n)=>{const o=v.ce(e,n);return t.dispatchEvent(o),o},tt=(t,e,n,o,l,s,i)=>{if(n===o)return;let r=u(t,e),c=e.toLowerCase();if("class"===e){const e=t.classList,l=nt(n);let s=nt(o);if((t["s-si"]||t["s-sc"])&&i){const n=t["s-sc"]||t["s-si"];s.push(n),l.forEach((t=>{t.startsWith(n)&&s.push(t)})),s=[...new Set(s)].filter((t=>t)),e.add(...s)}else e.remove(...l.filter((t=>t&&!s.includes(t)))),e.add(...s.filter((t=>t&&!l.includes(t))))}else if("key"===e);else if(r||"o"!==e[0]||"n"!==e[1]){if("a"===e[0]&&e.startsWith("attr:")){const n=e.slice(5);return void(null==o||!1===o?!1===o&&""!==t.getAttribute(n)||t.removeAttribute(n):t.setAttribute(n,!0===o?"":o))}if("p"===e[0]&&e.startsWith("prop:")){const n=e.slice(5);try{t[n]=o}catch(t){}return}{const i=V(o);if((r||i&&null!==o)&&!l)try{if(t.tagName.includes("-"))t[e]!==o&&(t[e]=o);else{const l=null==o?"":o;"list"===e?r=!1:null!=n&&t[e]===l||("function"==typeof t.__lookupSetter__(e)?t[e]=l:t.setAttribute(e,l))}}catch(t){}null==o||!1===o?!1===o&&""!==t.getAttribute(e)||t.removeAttribute(e):(!r||4&s||l)&&!i&&1===t.nodeType&&t.setAttribute(e,o=!0===o?"":o)}}else if(e="-"===e[2]?e.slice(3):u(m,c)?c.slice(2):c[2]+e.slice(3),n||o){const l=e.endsWith(ot);e=e.replace(lt,""),n&&v.rel(t,e,n,l),o&&v.ael(t,e,o,l)}},et=/\s/,nt=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(et):[]),ot="Capture",lt=RegExp(ot+"$"),st=(t,e,n,o)=>{const l=11===e.k.nodeType&&e.k.host?e.k.host:e.k,s=t&&t.v||{},i=e.v||{};for(const t of it(Object.keys(s)))t in i||tt(l,t,s[t],void 0,n,e.u,o);for(const t of it(Object.keys(i)))tt(l,t,s[t],i[t],n,e.u,o)};function it(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var rt=!1,ct=(t,e,n)=>{const o=e.j[n];let l,s,i=0;if(null!=o.m)l=o.k=m.document.createTextNode(o.m);else{if(rt||(rt="svg"===o.O),!m.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(l=o.k=m.document.createElementNS(rt?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",o.O),rt&&"foreignObject"===o.O&&(rt=!1),st(null,o,rt),o.j){const e="template"===o.O?l.content:l;for(i=0;i<o.j.length;++i)s=ct(t,o,i),s&&e.appendChild(s)}"svg"===o.O?rt=!1:"foreignObject"===l.tagName&&(rt=!0)}return l["s-hn"]=q,l},ut=(t,e,n,o,l,s)=>{let i,r=t;for(r.shadowRoot&&r.tagName===q&&(r=r.shadowRoot),"template"===n.O&&(r=r.content);l<=s;++l)o[l]&&(i=ct(null,n,l),i&&(o[l].k=i,pt(r,i,e)))},at=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.k;t&&t.remove()}}},ft=(t,e,n=!1)=>t.O===e.O&&(n?(n&&!t.S&&e.S&&(t.S=e.S),!0):t.S===e.S),dt=(t,e,n=!1)=>{const o=e.k=t.k,l=t.j,s=e.j,i=e.O,r=e.m;null==r?(st(t,e,rt="svg"===i||"foreignObject"!==i&&rt,n),null!==l&&null!==s?((t,e,n,o,l=!1)=>{let s,i,r=0,c=0,u=0,a=0,f=e.length-1,d=e[0],p=e[f],h=o.length-1,$=o[0],m=o[h];const v="template"===n.O?t.content:t;for(;r<=f&&c<=h;)if(null==d)d=e[++r];else if(null==p)p=e[--f];else if(null==$)$=o[++c];else if(null==m)m=o[--h];else if(ft(d,$,l))dt(d,$,l),d=e[++r],$=o[++c];else if(ft(p,m,l))dt(p,m,l),p=e[--f],m=o[--h];else if(ft(d,m,l))dt(d,m,l),pt(v,d.k,p.k.nextSibling),d=e[++r],m=o[--h];else if(ft(p,$,l))dt(p,$,l),pt(v,p.k,d.k),p=e[--f],$=o[++c];else{for(u=-1,a=r;a<=f;++a)if(e[a]&&null!==e[a].S&&e[a].S===$.S){u=a;break}u>=0?(i=e[u],i.O!==$.O?s=ct(e&&e[c],n,u):(dt(i,$,l),e[u]=void 0,s=i.k),$=o[++c]):(s=ct(e&&e[c],n,c),$=o[++c]),s&&pt(d.k.parentNode,s,d.k)}r>f?ut(t,null==o[h+1]?null:o[h+1].k,n,o,c,h):c>h&&at(e,r,f)})(o,l,e,s,n):null!==s?(null!==t.m&&(o.textContent=""),ut(o,null,e,s,0,s.length-1)):n||null===l?n&&null!==l&&null===s&&(e.j=l):at(l,0,l.length-1),rt&&"svg"===i&&(rt=!1)):t.m!==r&&(o.data=r)},pt=(t,e,n)=>t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n),ht=(t,e)=>{if(e&&!t.R&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.R=()=>{e["s-p"].splice(n-1,1),o()})))}},$t=(t,e)=>{if(t.u|=16,4&t.u)return void(t.u|=512);ht(t,t.D);const n=()=>mt(t,e);if(!e)return M(n);queueMicrotask((()=>{n()}))},mt=(t,e)=>{const n=t.$hostElement$,o=t.i;if(!o)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return e?(t.A.length&&t.A.forEach((t=>t(n))),l=St(o,"componentWillLoad",void 0,n)):l=St(o,"componentWillUpdate",void 0,n),l=vt(l,(()=>St(o,"componentWillRender",void 0,n))),vt(l,(()=>bt(t,o,e)))},vt=(t,e)=>yt(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),yt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,bt=async(t,e,n)=>{var o;const l=t.$hostElement$,s=l["s-rc"];n&&(t=>{const e=t.o,n=t.$hostElement$,o=e.u,l=A(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);gt(t,e,l,n),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>wt(t);0===e.length?n():(Promise.all(e).then(n),t.u|=4,e.length=0)}},gt=(t,e,n,o)=>{try{e=e.render(),t.u&=-17,t.u|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.P||T(null,null),s=(t=>t&&t.O===W)(e)?e:_(null,null,e);if(q=o.tagName,n&&s.v)for(const t of Object.keys(s.v))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(s.v[t]=o[t]);s.O=null,s.u|=4,t.P=s,s.k=l.k=o.shadowRoot||o,dt(l,s,n)})(t,e,o)}catch(e){a(e,t.$hostElement$)}return null},wt=t=>{const e=t.$hostElement$,n=t.i,o=t.D;St(n,"componentDidRender",void 0,e),64&t.u?St(n,"componentDidUpdate",void 0,e):(t.u|=64,Ot(e),St(n,"componentDidLoad",void 0,e),t.U(e),o||jt()),t.R&&(t.R(),t.R=void 0),512&t.u&&E((()=>$t(t,!1))),t.u&=-517},jt=()=>{var t;E((()=>Z(m,"appload",{detail:{namespace:"authhero-widget"}}))),(null==(t=v.V)?void 0:t.size)&&v.V.clear()},St=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){a(t,o)}},Ot=t=>t.classList.add("hydrated"),kt=(t,e,n,o)=>{const l=r(t);if(!l)return;if(!l)throw Error(`Couldn't find host element for "${o.$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const s=l.$hostElement$,i=l.l.get(e),c=l.u,u=l.i;if(n=K(n,o.t[e][0]),!(8&c&&void 0!==i||n===i||Number.isNaN(i)&&Number.isNaN(n))){if(l.l.set(e,n),o._){const t=o._[e];t&&t.map((t=>{try{const[[o,s]]=Object.entries(t);(128&c||1&s)&&(u?u[o](n,i,e):l.A.push((()=>{l.i[o](n,i,e)})))}catch(t){a(t,s)}}))}if(2==(18&c)){if(u.componentShouldUpdate&&!1===u.componentShouldUpdate(n,i,e))return;$t(l,!1)}}},xt=(t,e,n)=>{var o,l;const s=t.prototype;{t.watchers&&!e._&&(e._=t.watchers),t.deserializers&&!e.T&&(e.T=t.deserializers),t.serializers&&!e.W&&(e.W=t.serializers);const i=Object.entries(null!=(o=e.t)?o:{});if(i.map((([t,[o]])=>{if(31&o||2&n&&32&o){const{get:l,set:i}=Object.getOwnPropertyDescriptor(s,t)||{};l&&(e.t[t][0]|=2048),i&&(e.t[t][0]|=4096),(1&n||!l)&&Object.defineProperty(s,t,{get(){{if(!(2048&e.t[t][0]))return((t,e)=>r(this).l.get(e))(0,t);const n=r(this),o=n?n.i:s;if(!o)return;return o[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(s,t,{set(l){const s=r(this);if(s){if(i)return void 0===(32&o?this[t]:s.$hostElement$[t])&&s.l.get(t)&&(l=s.l.get(t)),i.call(this,K(l,o)),void kt(this,t,l=32&o?this[t]:s.$hostElement$[t],e);{if(!(1&n&&4096&e.t[t][0]))return kt(this,t,l,e),void(1&n&&!s.i&&s.A.push((()=>{4096&e.t[t][0]&&s.i[t]!==s.l.get(t)&&(s.i[t]=l)})));const i=()=>{const n=s.i[t];!s.l.get(t)&&n&&s.l.set(t,n),s.i[t]=K(l,o),kt(this,t,s.i[t],e)};s.i?i():s.A.push((()=>{i()}))}}}})}})),1&n){const n=new Map;s.attributeChangedCallback=function(t,o,l){v.jmp((()=>{var c;const u=n.get(t),a=r(this);if(this.hasOwnProperty(u)&&(l=this[u],delete this[u]),s.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==l)return;if(null==u){const n=null==a?void 0:a.u;if(a&&n&&!(8&n)&&l!==o){const s=a.i,i=null==(c=e._)?void 0:c[t];null==i||i.forEach((e=>{const[[i,r]]=Object.entries(e);null!=s[i]&&(128&n||1&r)&&s[i].call(s,l,o,t)}))}return}const f=i.find((([t])=>t===u));f&&4&f[1][0]&&(l=null!==l&&"false"!==l);const d=Object.getOwnPropertyDescriptor(s,u);l==this[u]||d.get&&!d.set||(this[u]=l)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(l=e._)?l:{}),...i.filter((([t,e])=>31&e[0])).map((([t,e])=>{const o=e[1]||t;return n.set(o,t),o}))]))}}return t},Et=(t,e)=>{St(t,"connectedCallback",void 0,e)},Mt=t=>{if(!(1&v.u)){const e=r(t);if(!e)return;const n=e.o,o=()=>{};if(1&e.u)(null==e?void 0:e.i)?Et(e.i,t):(null==e?void 0:e.B)&&e.B.then((()=>Et(e.i,t)));else{let o;if(e.u|=1,o=t.getAttribute(p),o){if(1&n.u){const e=A(t.shadowRoot,n);t.classList.remove(e+"-h",e+"-s")}((t,e,n,o)=>{var l,s,i,c;const u=t.shadowRoot,a=[],f=[],d=u?[]:null,h=T(e,null);h.k=t,!m.document||v.V&&v.V.size||B(m.document.body,v.V=new Map),t[p]=n,t.removeAttribute(p),o.P=z(h,a,[],d,t,t,n,f);let $=0;const y=a.length;let b;for(;$<y;$++){b=a[$];const n=b.M+"."+b.C,o=v.V.get(n),s=b.k;if(u){if((null==(l=b.O)?void 0:(""+l).includes("-"))&&"slot-fb"!==b.O&&!b.k.shadowRoot){const t=r(b.k);if(t){const e=P(t.o),n=m.document.querySelector(`style[sty-id="${e}"]`);n&&d.unshift(n.cloneNode(!0))}}}else s["s-hn"]=e.toUpperCase(),"slot"===b.O&&(s["s-cr"]=t["s-cr"]);"slot"===b.O&&(b.L=b.k["s-sn"]||b.k.name||null,b.j?(b.u|=2,b.k.childNodes.length||b.j.forEach((t=>{b.k.appendChild(t.k)}))):b.u|=1),o&&o.isConnected&&(o.parentElement.shadowRoot&&""===o["s-en"]&&o.parentNode.insertBefore(s,o.nextSibling),o.parentNode.removeChild(o),u||(s["s-oo"]=parseInt(b.C))),o&&!o["s-id"]&&v.V.delete(n)}const g=[],w=f.length;let j,S,O,k,x=0,E=0;for(;x<w;x++)if(j=f[x],j&&j.length)for(O=j.length,S=0;S<O;S++){if(k=j[S],g[k.hostId]||(g[k.hostId]=v.V.get(k.hostId)),!g[k.hostId])continue;const t=g[k.hostId];t.shadowRoot&&k.node.parentElement!==t&&t.insertBefore(k.node,null==(i=null==(s=j[S-1])?void 0:s.node)?void 0:i.nextSibling),t.shadowRoot&&u||(k.slot["s-cr"]||(k.slot["s-cr"]=t["s-cr"],k.slot["s-cr"]=!k.slot["s-cr"]&&t.shadowRoot?t:(t.__childNodes||t.childNodes)[0]),N(k.node,k.slot,0,k.node["s-oo"]||E),(null==(c=k.node.parentElement)?void 0:c.shadowRoot)&&k.node.getAttribute&&k.node.getAttribute("slot")&&k.node.removeAttribute("slot")),E=(k.node["s-oo"]||E)+1}if(u&&!u.childNodes.length){let e=0;const n=d.length;if(n){for(;e<n;e++){const t=d[e];t&&u.appendChild(t)}Array.from(t.childNodes).forEach((t=>{"string"!=typeof t["s-en"]&&"string"!=typeof t["s-sn"]&&(1===t.nodeType&&t.slot&&t.hidden?t.removeAttribute("hidden"):8!==t.nodeType||t.nodeValue||t.parentNode.removeChild(t))}))}}o.$hostElement$=t})(t,n.$,o,e)}{let n=t;for(;n=n.parentNode||n.host;)if(1===n.nodeType&&n.hasAttribute("s-id")&&n["s-p"]||n["s-p"]){ht(e,e.D=n);break}}n.t&&Object.entries(n.t).map((([e,[n]])=>{if(31&n&&e in t&&t[e]!==Object.prototype[e]){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let o;if(!(32&e.u)){if(e.u|=32,n.F){const l=((t,e)=>{const n=t.$.replace(/-/g,"_"),o=t.F;if(!o)return;const l=f.get(o);return l?l[n]:import(`./${o}.entry.js`).then((t=>(f.set(o,t),t[n])),(t=>{a(t,e.$hostElement$)}))
|
|
2
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,e);if(l&&"then"in l){const t=()=>{};o=await l,t()}else o=l;if(!o)throw Error(`Constructor for "${n.$}#${e.H}" was not found`);o.isProxied||(n._=o.watchers,n.W=o.serializers,n.T=o.deserializers,xt(o,n,2),o.isProxied=!0);const s=()=>{};e.u|=8;try{new o(e)}catch(e){a(e,t)}e.u&=-9,e.u|=128,s(),Et(e.i,t)}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.u|=128));if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const e=P(n);if(!d.has(e)){const o=()=>{};D(e,t,!!(1&n.u)),o()}}}const l=e.D,s=()=>$t(e,!0);l&&l["s-rc"]?l["s-rc"].push(s):s()})(t,e,n)}o()}},Ct=(t,e)=>{St(t,"disconnectedCallback",void 0,e||t)},Nt=(t,e={})=>{var n;if(!m.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const o=[],l=e.exclude||[],s=m.customElements,i=m.document.head,c=i.querySelector("meta[charset]"),u=m.document.createElement("style"),a=[];let f,d=!0;if(Object.assign(v,e),v.p=new URL(e.resourcesUrl||"./",m.document.baseURI).href,v.u|=2,(()=>{if(!m.document)return;const t=m.document.querySelectorAll(`[${h}]`);let e=0;for(;e<t.length;e++)D(t[e].getAttribute(h),U(t[e].innerHTML),!0)})(),t.map((t=>{t[1].map((e=>{var n,i,c;const u={u:e[0],$:e[1],t:e[2],q:e[3]};u.t=e[2],u._=null!=(n=e[4])?n:{},u.W=null!=(i=e[5])?i:{},u.T=null!=(c=e[6])?c:{};const p=u.$,h=class extends HTMLElement{"s-p";"s-rc";hasRegisteredEventListeners=!1;constructor(t){if(super(t),((t,e)=>{const n={u:0,$hostElement$:t,o:e,l:new Map,Y:new Map};n.B=new Promise((t=>n.U=t)),t["s-p"]=[],t["s-rc"]=[],n.A=[];const o=n;t.__stencil__getHostRef=()=>o})(t=this,u),1&u.u)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${u.$}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else C.call(t,u)}connectedCallback(){r(this)&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),f&&(clearTimeout(f),f=null),d?a.push(this):v.jmp((()=>Mt(this))))}disconnectedCallback(){v.jmp((()=>(async t=>{if(!(1&v.u)){const e=r(t);(null==e?void 0:e.i)?Ct(e.i,t):(null==e?void 0:e.B)&&e.B.then((()=>Ct(e.i,t)))}R.has(t)&&R.delete(t),t.shadowRoot&&R.has(t.shadowRoot)&&R.delete(t.shadowRoot)})(this))),v.raf((()=>{var t;const e=r(this);if(!e)return;const n=a.findIndex((t=>t===this));n>-1&&a.splice(n,1),(null==(t=null==e?void 0:e.P)?void 0:t.k)instanceof Node&&!e.P.k.isConnected&&delete e.P.k}))}componentOnReady(){var t;return null==(t=r(this))?void 0:t.B}};u.F=t[0],l.includes(p)||s.get(p)||(o.push(p),s.define(p,xt(h,u,1)))}))})),o.length>0&&(u.textContent+=o.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",u.innerHTML.length)){u.setAttribute("data-styles","");const t=null!=(n=v.h)?n:L(m.document);null!=t&&u.setAttribute("nonce",t),i.insertBefore(u,c?c.nextSibling:i.firstChild)}d=!1,a.length?a.map((t=>t.connectedCallback())):v.jmp((()=>f=setTimeout(jt,30)))},It=t=>v.h=t;export{Nt as b,X as c,Q as g,_ as h,y as p,c as r,It as s}
|