@authhero/widget 0.8.1 → 0.8.3

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.
@@ -0,0 +1 @@
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:",r=(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}}))},i=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},c=(t,e)=>e in t,u=(t,e)=>(0,console.error)(t,e),f=new Map,a="s-id",d="sty-id",$="c-id",p="undefined"!=typeof window?window:{},h=p.HTMLElement||class{},b={i:0,u:"",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)},m=(()=>{try{return!!p.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),y=!!m&&(()=>!!p.document&&Object.getOwnPropertyDescriptor(p.document.adoptedStyleSheets,"length").writable)(),v=!1,g=[],w=[],j=(t,e)=>n=>{t.push(n),v||(v=!0,e&&4&b.i?x(S):b.raf(S))},O=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){u(t)}t.length=0},S=()=>{O(g),O(w),(v=g.length>0)&&b.raf(S)},x=t=>Promise.resolve(undefined).then(t),k=j(w,!0),I=t=>{const e=new URL(t,b.u);return e.origin!==p.location.origin?e.href:e.pathname},M=t=>b.u=t;function E(){const e=this.attachShadow({mode:"open"});void 0===t&&(t=null),t&&(y?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,r=_(s,"appendChild");if(void 0!==o){l["s-oo"]=o;const t=_(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=>r.call(s,t)))}else r.call(s,l);t["s-ol"]=l,t["s-sh"]=e["s-hn"]};function _(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)}var C=new WeakMap,A=(t,e,n)=>{let o=f.get(t);m&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,f.set(t,o)},L=(t,e)=>{var n,o,l;const s=D(e),r=f.get(s);if(!p.document)return s;if(t=11===t.nodeType?t:p.document,r)if("string"==typeof r){let l,i=C.get(t=t.head||t);i||C.set(t,i=new Set);const c=t.querySelector(`[${d}="${s}"]`);if(c)c.textContent=r;else if(!i.has(s)){l=p.document.createElement("style"),l.textContent=r;const c=null!=(n=b.$)?n:function(){var t,e,n;return null!=(n=null==(e=null==(t=p.document.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:e.getAttribute("content"))?n:void 0}();if(null!=c&&l.setAttribute("nonce",c),!(1&e.i))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(m){const e=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(r),y?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=r+e.textContent:t.prepend(l)}else t.append(l);1&e.i&&t.insertBefore(l,null),4&e.i&&(l.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),i&&i.add(s)}}else{let e=C.get(t);if(e||C.set(t,e=new Set),!e.has(s)){const n=null!=(l=t.defaultView)?l:t.ownerDocument.defaultView;let o;if(r.constructor===n.CSSStyleSheet)o=r;else{o=new n.CSSStyleSheet;for(let t=0;t<r.cssRules.length;t++)o.insertRule(r.cssRules[t].cssText,t)}if(y?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],e.add(s),"host"in t){const e=t.querySelector(`[${d}="${s}"]`);e&&k((()=>e.remove()))}}}return s},D=t=>"sc-"+t.p,R=t=>"object"==(t=typeof t)||"function"===t,U=(t,e,...n)=>{let o=null,l=null,s=!1,r=!1;const i=[],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&&!R(o))&&(o=String(o)),s&&r?i[i.length-1].h+=o:i.push(s?V(null,o):o),r=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=V(t,null);return u.m=e,i.length>0&&(u.v=i),u.j=l,u},V=(t,e)=>({i:0,O:t,h:null!=e?e:null,S:null,v:null,m:null,j:null}),P={},W=(t,e,n,o,l,s,r,i=[])=>{let c,u,f,a;if(1===s.nodeType){if(c=s.getAttribute($),c&&(u=c.split("."),u[0]===r||"0"===u[0])){f=F({i:0,k:u[0],I:u[1],M:u[2],N:u[3],O:s.tagName.toLowerCase(),S:s,m:{class:s.className||""}}),e.push(f),s.removeAttribute($),t.v||(t.v=[]);const l=f.S.getAttribute("s-sn");"string"==typeof l&&("slot-fb"===f.O&&H(l,u[2],f,s,t,e,n,o,i),f.S["s-sn"]=l,f.S.removeAttribute("s-sn")),void 0!==f.N&&(t.v[f.N]=f),t=f,o&&"0"===f.M&&(o[f.N]=f.S)}if(s.shadowRoot)for(a=s.shadowRoot.childNodes.length-1;a>=0;a--)W(t,e,n,o,l,s.shadowRoot.childNodes[a],r,i);const d=s.__childNodes||s.childNodes;for(a=d.length-1;a>=0;a--)W(t,e,n,o,l,d[a],r,i)}else if(8===s.nodeType)u=s.nodeValue.split("."),(u[1]===r||"0"===u[1])&&(c=u[0],f=F({k:u[1],I:u[2],M:u[3],N:u[4]||"0",S:s,m:null,v:null,j:null,_:null,O:null,h:null}),"t"===c?(f.S=Y(s,3),f.S&&3===f.S.nodeType&&(f.h=f.S.textContent,e.push(f),s.remove(),r===f.k&&(t.v||(t.v=[]),t.v[f.N]=f),o&&"0"===f.M&&(o[f.N]=f.S))):"c"===c?(f.S=Y(s,8),f.S&&8===f.S.nodeType&&(e.push(f),s.remove())):f.k===r&&("s"===c?H(s["s-sn"]=u[5]||"",u[2],f,s,t,e,n,o,i):"r"===c&&o&&s.remove()));else if(t&&"style"===t.O){const e=V(null,s.textContent);e.S=s,e.N="0",t.v=[e]}return t},B=(t,e)=>{if(1===t.nodeType){const n=t[a]||t.getAttribute(a);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=>({i:0,k:null,I:null,M:null,N:"0",S:null,m:null,v:null,j:null,_:null,O:null,h:null,...t});function H(t,e,n,o,l,s,r,i,c){o["s-sr"]=!0,n._=t||null,n.O="slot";const u=(null==l?void 0:l.S)?l.S["s-id"]||l.S.getAttribute("s-id"):"";if(i&&p.document){const s=n.S=p.document.createElement(n.O);n._&&n.S.setAttribute("name",t),l.S.shadowRoot&&u&&u!==n.k?_(l.S,"insertBefore")(s,_(l.S,"children")[0]):_(_(o,"parentNode"),"insertBefore")(s,o),z(c,e,t,o,n.k),o.remove(),"0"===n.M&&(i[n.N]=n.S)}else{const s=n.S,r=u&&u!==n.k&&l.S.shadowRoot;z(c,e,t,o,r?u:n.k),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),r&&l.S.insertBefore(s,l.S.children[0])}s.push(n),r.push(n),l.v||(l.v=[]),l.v[n.N]=n}var q,z=(t,e,n,o,l)=>{var s,r;let i=o.nextSibling;if(t[e]=t[e]||[],i&&!(null==(s=i.nodeValue)?void 0:s.startsWith("s.")))do{!i||(i.getAttribute&&i.getAttribute("slot")||i["s-sn"])!==n&&(""!==n||i["s-sn"]||i.getAttribute&&i.getAttribute("slot")||8!==i.nodeType&&3!==i.nodeType)||(i["s-sn"]=n,t[e].push({slot:o,node:i,hostId:l})),i=null==i?void 0:i.nextSibling}while(i&&!(null==(r=i.nodeValue)?void 0:r.startsWith("s.")))},Y=(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:r}=s;return new RegExp(l,r);case"set":const i=new Set;for(const e of s)i.add(t.fromLocalValue(e));return i;case"symbol":return Symbol(s);default:throw new 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))}},G=(t,e)=>{return"string"==typeof t&&t.startsWith(s)?t="string"==typeof(n=t)&&n.startsWith(s)?J.fromLocalValue(JSON.parse(atob(n.slice(11)))):n:null==t||R(t)?t:4&e?"false"!==t&&(""===t||!!t):1&e?String(t):t;var n},K=(t,e)=>{const n=t;return{emit:t=>Q(n,e,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},Q=(t,e,n)=>{const o=b.ce(e,n);return t.dispatchEvent(o),o},T=(t,e,n,o,l,s,r)=>{if(n===o)return;let i=c(t,e),u=e.toLowerCase();if("class"===e){const e=t.classList,l=Z(n);let s=Z(o);if((t["s-si"]||t["s-sc"])&&r){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(t.__lookupSetter__(e)||"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 r=R(o);if((i||r&&null!==o)&&!l)try{if(t.tagName.includes("-"))t[e]!==o&&(t[e]=o);else{const l=null==o?"":o;"list"===e?i=!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):(!i||4&s||l)&&!r&&1===t.nodeType&&t.setAttribute(e,o=!0===o?"":o)}}else if(e="-"===e[2]?e.slice(3):c(p,u)?u.slice(2):u[2]+e.slice(3),n||o){const l=e.endsWith(tt);e=e.replace(et,""),n&&b.rel(t,e,n,l),o&&b.ael(t,e,o,l)}},X=/\s/,Z=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(X):[]),tt="Capture",et=new RegExp(tt+"$"),nt=(t,e,n,o)=>{const l=11===e.S.nodeType&&e.S.host?e.S.host:e.S,s=t&&t.m||{},r=e.m||{};for(const t of ot(Object.keys(s)))t in r||T(l,t,s[t],void 0,n,e.i,o);for(const t of ot(Object.keys(r)))T(l,t,s[t],r[t],n,e.i,o)};function ot(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var lt=!1,st=(t,e,n)=>{const o=e.v[n];let l,s,r=0;if(null!=o.h)l=o.S=p.document.createTextNode(o.h);else{if(lt||(lt="svg"===o.O),!p.document)throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(l=o.S=p.document.createElementNS(lt?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",o.O),lt&&"foreignObject"===o.O&&(lt=!1),nt(null,o,lt),o.v){const e="template"===o.O?l.content:l;for(r=0;r<o.v.length;++r)s=st(t,o,r),s&&e.appendChild(s)}"svg"===o.O?lt=!1:"foreignObject"===l.tagName&&(lt=!0)}return l["s-hn"]=q,l},rt=(t,e,n,o,l,s)=>{let r,i=t;for(i.shadowRoot&&i.tagName===q&&(i=i.shadowRoot),"template"===n.O&&(i=i.content);l<=s;++l)o[l]&&(r=st(null,n,l),r&&(o[l].S=r,ft(i,r,e)))},it=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.S;t&&t.remove()}}},ct=(t,e,n=!1)=>t.O===e.O&&(n?(n&&!t.j&&e.j&&(t.j=e.j),!0):t.j===e.j),ut=(t,e,n=!1)=>{const o=e.S=t.S,l=t.v,s=e.v,r=e.O,i=e.h;null==i?(nt(t,e,lt="svg"===r||"foreignObject"!==r&&lt,n),null!==l&&null!==s?((t,e,n,o,l=!1)=>{let s,r,i=0,c=0,u=0,f=0,a=e.length-1,d=e[0],$=e[a],p=o.length-1,h=o[0],b=o[p];const m="template"===n.O?t.content:t;for(;i<=a&&c<=p;)if(null==d)d=e[++i];else if(null==$)$=e[--a];else if(null==h)h=o[++c];else if(null==b)b=o[--p];else if(ct(d,h,l))ut(d,h,l),d=e[++i],h=o[++c];else if(ct($,b,l))ut($,b,l),$=e[--a],b=o[--p];else if(ct(d,b,l))ut(d,b,l),ft(m,d.S,$.S.nextSibling),d=e[++i],b=o[--p];else if(ct($,h,l))ut($,h,l),ft(m,$.S,d.S),$=e[--a],h=o[++c];else{for(u=-1,f=i;f<=a;++f)if(e[f]&&null!==e[f].j&&e[f].j===h.j){u=f;break}u>=0?(r=e[u],r.O!==h.O?s=st(e&&e[c],n,u):(ut(r,h,l),e[u]=void 0,s=r.S),h=o[++c]):(s=st(e&&e[c],n,c),h=o[++c]),s&&ft(d.S.parentNode,s,d.S)}i>a?rt(t,null==o[p+1]?null:o[p+1].S,n,o,c,p):c>p&&it(e,i,a)})(o,l,e,s,n):null!==s?(null!==t.h&&(o.textContent=""),rt(o,null,e,s,0,s.length-1)):n||null===l?n&&null!==l&&null===s&&(e.v=l):it(l,0,l.length-1),lt&&"svg"===r&&(lt=!1)):t.h!==i&&(o.data=i)},ft=(t,e,n)=>t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n),at=(t,e,n=!1)=>{const o=t.$hostElement$,l=t.C||V(null,null);var s;const r=(s=e)&&s.O===P?e:U(null,null,e);if(q=o.tagName,n&&r.m)for(const t of Object.keys(r.m))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(r.m[t]=o[t]);r.O=null,r.i|=4,t.C=r,r.S=l.S=o.shadowRoot||o,ut(l,r,n)},dt=(t,e)=>{if(e&&!t.A&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.A=()=>{e["s-p"].splice(n-1,1),o()})))}},$t=(t,e)=>{if(t.i|=16,4&t.i)return void(t.i|=512);dt(t,t.L);const n=()=>pt(t,e);if(!e)return k(n);queueMicrotask((()=>{n()}))},pt=(t,e)=>{const n=t.$hostElement$,o=n;if(!o)throw new 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 l=wt(o,e?"componentWillLoad":"componentWillUpdate",void 0,n),l=ht(l,(()=>wt(o,"componentWillRender",void 0,n))),ht(l,(()=>mt(t,o,e)))},ht=(t,e)=>bt(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),bt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,mt=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.i,l=L(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);yt(t,e,l,n),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>vt(t);0===e.length?n():(Promise.all(e).then(n),t.i|=4,e.length=0)}},yt=(t,e,n,o)=>{try{e=e.render(),t.i&=-17,t.i|=2,at(t,e,o)}catch(e){u(e,t.$hostElement$)}return null},vt=t=>{const e=t.$hostElement$,n=e,o=t.L;wt(n,"componentDidRender",void 0,e),64&t.i?wt(n,"componentDidUpdate",void 0,e):(t.i|=64,jt(e),wt(n,"componentDidLoad",void 0,e),t.D(e),o||gt()),t.A&&(t.A(),t.A=void 0),512&t.i&&x((()=>$t(t,!1))),t.i&=-517},gt=()=>{var t;x((()=>Q(p,"appload",{detail:{namespace:"authhero-widget"}}))),(null==(t=b.R)?void 0:t.size)&&b.R.clear()},wt=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){u(t,o)}},jt=t=>t.classList.add("hydrated"),Ot=(t,e,n,o)=>{const l=i(t);if(!l)return;const s=t,r=l.l.get(e),c=l.i,f=s;n=G(n,o.t[e][0]);const a=Number.isNaN(r)&&Number.isNaN(n);if(n!==r&&!a){if(l.l.set(e,n),o.U){const t=o.U[e];t&&t.map((t=>{try{const[[o,s]]=Object.entries(t);(128&c||1&s)&&(f?f[o](n,r,e):l.V.push((()=>{l.P[o](n,r,e)})))}catch(t){u(t,s)}}))}if(2==(18&c)){if(f.componentShouldUpdate&&!1===f.componentShouldUpdate(n,r,e))return;$t(l,!1)}}},St=(t,e)=>{var n,o;const l=t.prototype;{t.watchers&&!e.U&&(e.U=t.watchers),t.deserializers&&!e.W&&(e.W=t.deserializers),t.serializers&&!e.B&&(e.B=t.serializers);const s=Object.entries(null!=(n=e.t)?n:{});s.map((([t,[n]])=>{if(31&n||32&n){const{get:o,set:s}=Object.getOwnPropertyDescriptor(l,t)||{};o&&(e.t[t][0]|=2048),s&&(e.t[t][0]|=4096),Object.defineProperty(l,t,{get(){return o?o.apply(this):(e=t,i(this).l.get(e));var e},configurable:!0,enumerable:!0}),Object.defineProperty(l,t,{set(o){const l=i(this);if(l){if(s)return void 0===(32&n?this[t]:l.$hostElement$[t])&&l.l.get(t)&&(o=l.l.get(t)),s.apply(this,[G(o,n)]),void Ot(this,t,o=32&n?this[t]:l.$hostElement$[t],e);Ot(this,t,o,e)}}})}}));{const n=new Map;l.attributeChangedCallback=function(t,o,r){b.jmp((()=>{var c;const u=n.get(t),f=i(this);if(this.hasOwnProperty(u),l.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==r)return;if(null==u){const n=null==f?void 0:f.i;if(f&&n&&!(8&n)&&r!==o){const l=this,s=null==(c=e.U)?void 0:c[t];null==s||s.forEach((e=>{const[[s,i]]=Object.entries(e);null!=l[s]&&(128&n||1&i)&&l[s].call(l,r,o,t)}))}return}const a=s.find((([t])=>t===u));a&&4&a[1][0]&&(r=null!==r&&"false"!==r);const d=Object.getOwnPropertyDescriptor(l,u);r==this[u]||d.get&&!d.set||(this[u]=r)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(o=e.U)?o:{}),...s.filter((([t,e])=>31&e[0])).map((([t,e])=>{const o=e[1]||t;return n.set(o,t),o}))]))}}return t},xt=(t,e)=>{const n={i:e[0],p:e[1]};n.t=e[2],n.U=t.U,n.W=t.W,n.B=t.B,(()=>{if(!p.document)return;const t=p.document.querySelectorAll(`[${d}]`);let e=0;for(;e<t.length;e++)A(t[e].getAttribute(d),t[e].innerHTML.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g,"$1{"),!0)})();const o=t.prototype.connectedCallback,l=t.prototype.disconnectedCallback;return Object.assign(t.prototype,{__hasHostListenerAttached:!1,__registerHost(){((t,e)=>{const n={i:0,$hostElement$:t,o:e,l:new Map,F:new Map};n.H=new Promise((t=>n.D=t)),t["s-p"]=[],t["s-rc"]=[];const o=n;t.__stencil__getHostRef=()=>o,512&e.i&&r(t,n)})(this,n)},connectedCallback(){if(!this.__hasHostListenerAttached){if(!i(this))return;this.__hasHostListenerAttached=!0}(t=>{if(!(1&b.i)){const e=i(t);if(!e)return;const n=e.o,o=()=>{};if(1&e.i)(null==e?void 0:e.P)||(null==e?void 0:e.H)&&e.H.then((()=>{}));else{let o;if(e.i|=1,o=t.getAttribute(a),o){if(1&n.i){const e=L(t.shadowRoot,n);t.classList.remove(e+"-h",e+"-s")}((t,e,n,o)=>{var l,s,r,c;const u=t.shadowRoot,f=[],d=[],$=u?[]:null,h=V(e,null);h.S=t,!p.document||b.R&&b.R.size||B(p.document.body,b.R=new Map),t[a]=n,t.removeAttribute(a),o.C=W(h,f,[],$,t,t,n,d);let m=0;const y=f.length;let v;for(;m<y;m++){v=f[m];const n=v.k+"."+v.I,o=b.R.get(n),s=v.S;if(u){if((null==(l=v.O)?void 0:l.toString().includes("-"))&&"slot-fb"!==v.O&&!v.S.shadowRoot){const t=i(v.S);if(t){const e=D(t.o),n=p.document.querySelector(`style[sty-id="${e}"]`);n&&$.unshift(n.cloneNode(!0))}}}else s["s-hn"]=e.toUpperCase(),"slot"===v.O&&(s["s-cr"]=t["s-cr"]);"slot"===v.O&&(v._=v.S["s-sn"]||v.S.name||null,v.v?(v.i|=2,v.S.childNodes.length||v.v.forEach((t=>{v.S.appendChild(t.S)}))):v.i|=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(v.I))),o&&!o["s-id"]&&b.R.delete(n)}const g=[],w=d.length;let j,O,S,x,k=0,I=0;for(;k<w;k++)if(j=d[k],j&&j.length)for(S=j.length,O=0;O<S;O++){if(x=j[O],g[x.hostId]||(g[x.hostId]=b.R.get(x.hostId)),!g[x.hostId])continue;const t=g[x.hostId];t.shadowRoot&&x.node.parentElement!==t&&t.insertBefore(x.node,null==(r=null==(s=j[O-1])?void 0:s.node)?void 0:r.nextSibling),t.shadowRoot&&u||(x.slot["s-cr"]||(x.slot["s-cr"]=t["s-cr"],x.slot["s-cr"]=!x.slot["s-cr"]&&t.shadowRoot?t:(t.__childNodes||t.childNodes)[0]),N(x.node,x.slot,0,x.node["s-oo"]||I),(null==(c=x.node.parentElement)?void 0:c.shadowRoot)&&x.node.getAttribute&&x.node.getAttribute("slot")&&x.node.removeAttribute("slot")),I=(x.node["s-oo"]||I)+1}if(u&&!u.childNodes.length){let e=0;const n=$.length;if(n){for(;e<n;e++){const t=$[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.p,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"]){dt(e,e.L=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.i)&&(e.i|=32,o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.i|=128)),o&&o.style)){let t;"string"==typeof o.style&&(t=o.style);const e=D(n);if(!f.has(e)){const o=()=>{};A(e,t,!!(1&n.i)),o()}}const l=e.L,s=()=>$t(e,!0);l&&l["s-rc"]?l["s-rc"].push(s):s()})(t,e,n)}o()}})(this),o&&o.call(this)},disconnectedCallback(){(async t=>{1&b.i||i(t),C.has(t)&&C.delete(t),t.shadowRoot&&C.has(t.shadowRoot)&&C.delete(t.shadowRoot)})(this),l&&l.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw new Error(`Unable to re-use existing shadow root for ${n.p}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else E.call(this,n)}}),t.is=n.p,St(t,n)},kt=t=>b.$=t,It=t=>Object.assign(b,t);function Mt(t,e){at({$hostElement$:e},t)}function Et(t){return t}export{h as H,kt as a,It as b,K as c,I as g,U as h,xt as p,Mt as r,M as s,Et as t}
@@ -1 +1 @@
1
- import{t,p as e,H as r,c as i,h as o}from"./p-7EkYyes4.js";const a=e(class extends r{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.fieldChange=i(this,"fieldChange"),this.buttonClick=i(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,r,i){return t?o("label",{class:{"input-label":!0,floating:!!i},part:"label",htmlFor:e},t,r&&o("span",{class:"required"},"*")):null}renderLabel(t,e,r){return t?o("label",{class:"input-label",part:"label",htmlFor:e},t,r&&o("span",{class:"required"},"*")):null}renderPasswordToggle(){return this.passwordVisible?o("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"},o("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"}),o("line",{x1:"1",y1:"1",x2:"23",y2:"23"})):o("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"},o("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),o("circle",{cx:"12",cy:"12",r:"3"}))}renderErrors(){return this.getErrors().map((t=>o("span",{class:"error-text",part:"error-text",key:t.id??t.text},t.text)))}renderHint(t){return t?o("span",{class:"helper-text",part:"helper-text"},t):null}renderDivider(){return o("hr",{class:"divider",part:"divider"})}renderHtml(t){return o("div",{class:"html-content",part:"html-content",innerHTML:t.config?.content??""})}renderImage(t){const{src:e,alt:r,width:i,height:a}=t.config??{};return e?o("img",{class:"image",part:"image",src:e,alt:r??"",width:i,height:a,loading:"lazy"}):null}renderRichText(t){return o("div",{class:"rich-text",part:"rich-text",innerHTML:t.config?.content??""})}renderNextButton(t){return o("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 o("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 o("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 o("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}`,r=this.getErrors(),{multiline:i,max_length:a}=t.config??{},n=!!(this.value&&this.value.length>0);return i?o("div",{class:"input-wrapper",part:"input-wrapper"},this.renderLabel(t.label,e,t.required),o("textarea",{id:e,class:{"input-field":!0,"has-error":r.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===r.length&&this.renderHint(t.hint)):o("div",{class:"input-wrapper",part:"input-wrapper"},o("div",{class:"input-container"},o("input",{id:e,class:{"input-field":!0,"has-error":r.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===r.length&&this.renderHint(t.hint))}renderEmailField(t){const e=`input-${t.id}`,r=this.getErrors(),i=!!(this.value&&this.value.length>0);return o("div",{class:"input-wrapper",part:"input-wrapper"},o("div",{class:"input-container"},o("input",{id:e,class:{"input-field":!0,"has-error":r.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,i)),this.renderErrors(),0===r.length&&this.renderHint(t.hint))}renderPasswordField(t){const e=`input-${t.id}`,r=this.getErrors(),i=!!(this.value&&this.value.length>0),a=t.config?.forgot_password_link;return o("div",{class:"input-wrapper",part:"input-wrapper"},o("div",{class:"input-container password-container"},o("input",{id:e,class:{"input-field":!0,"has-error":r.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,i),o("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===r.length&&this.renderHint(t.hint),a&&o("div",{class:"field-link",part:"field-link"},o("a",{href:a,class:"link",part:"link"},"Forgot password?")))}renderNumberField(t){const e=`input-${t.id}`,r=this.getErrors(),{placeholder:i,min:a,max:n,step:s}=t.config??{};return o("div",{class:"input-wrapper",part:"input-wrapper"},this.renderLabel(t.label,e,t.required),o("input",{id:e,class:{"input-field":!0,"has-error":r.length>0},part:"input",type:"number",name:t.id,value:this.value??"",placeholder:i,required:t.required,disabled:this.disabled,min:a,max:n,step:s,onInput:this.handleInput}),this.renderErrors(),0===r.length&&this.renderHint(t.hint))}renderTelField(t){const e=`input-${t.id}`,r=this.getErrors();return o("div",{class:"input-wrapper",part:"input-wrapper"},this.renderLabel(t.label,e,t.required),o("input",{id:e,class:{"input-field":!0,"has-error":r.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===r.length&&this.renderHint(t.hint))}renderUrlField(t){const e=`input-${t.id}`,r=this.getErrors();return o("div",{class:"input-wrapper",part:"input-wrapper"},this.renderLabel(t.label,e,t.required),o("input",{id:e,class:{"input-field":!0,"has-error":r.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===r.length&&this.renderHint(t.hint))}renderDateField(t){const e=`input-${t.id}`,r=this.getErrors(),{min:i,max:a}=t.config??{};return o("div",{class:"input-wrapper",part:"input-wrapper"},this.renderLabel(t.label,e,t.required),o("input",{id:e,class:{"input-field":!0,"has-error":r.length>0},part:"input",type:"date",name:t.id,value:this.value??"",required:t.required,disabled:this.disabled,min:i,max:a,onInput:this.handleInput}),this.renderErrors(),0===r.length&&this.renderHint(t.hint))}renderBooleanField(t){return o("label",{class:"checkbox-wrapper",part:"checkbox-wrapper"},o("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}),o("span",{class:"checkbox-label",part:"checkbox-label"},t.label))}renderLegalField(t){const e=t.config?.text??t.label??"",r=!0===t.config?.html;return o("label",{class:"checkbox-wrapper",part:"checkbox-wrapper"},o("input",{type:"checkbox",part:"checkbox",name:t.id,checked:"true"===this.value,required:t.required,disabled:this.disabled,onChange:this.handleCheckbox}),r?o("span",{class:"checkbox-label",part:"checkbox-label",innerHTML:e}):o("span",{class:"checkbox-label",part:"checkbox-label"},e))}renderDropdownField(t){const e=`input-${t.id}`,r=this.getErrors(),{options:i,placeholder:a}=t.config??{};return o("div",{class:"input-wrapper",part:"input-wrapper"},this.renderLabel(t.label,e,t.required),o("select",{id:e,class:{"input-field":!0,"has-error":r.length>0},part:"input select",name:t.id,required:t.required,disabled:this.disabled,onChange:this.handleInput},a&&o("option",{value:"",disabled:!0,selected:!this.value},a),i?.map((t=>o("option",{value:t.value,selected:this.value===t.value,key:t.value},t.label)))),this.renderErrors(),0===r.length&&this.renderHint(t.hint))}renderChoiceField(t){const e=this.getErrors(),{options:r,display:i}=t.config??{},a="checkbox"===i,n=a?"checkbox":"radio";return o("div",{class:"choice-wrapper",part:"choice-wrapper"},t.label&&o("span",{class:"choice-label",part:"choice-label"},t.label,t.required&&o("span",{class:"required"},"*")),o("div",{class:"choice-options",part:"choice-options"},r?.map((e=>o("label",{class:"choice-option",part:"choice-option",key:e.value},o("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}),o("span",null,e.label))))),this.renderErrors(),0===e.length&&this.renderHint(t.hint))}renderSocialField(t){return o("div",{class:"social-buttons",part:"social-buttons"},(t.config?.providers??[]).map((t=>o("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?o("svg",{class:"social-icon",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},o("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"}),o("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"}),o("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"}),o("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?o("svg",{class:"social-icon",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},o("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?o("svg",{class:"social-icon",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},o("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?o("svg",{class:"social-icon",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},o("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?o("svg",{class:"social-icon",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},o("path",{d:"M0 0h11.377v11.372H0V0z",fill:"#f25022"}),o("path",{d:"M12.623 0H24v11.372H12.623V0z",fill:"#7fba00"}),o("path",{d:"M0 12.623h11.377V24H0v-11.377z",fill:"#00a4ef"}),o("path",{d:"M12.623 12.623H24V24H12.623v-11.377z",fill:"#ffb900"})):"linkedin"===e?o("svg",{class:"social-icon",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},o("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),o("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}}static get style(){return':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}.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}'}},[513,"authhero-node",{component:[16],value:[1],disabled:[4],passwordVisible:[32]}]);function n(){"undefined"!=typeof customElements&&["authhero-node"].forEach((e=>{"authhero-node"===e&&(customElements.get(t(e))||customElements.define(t(e),a))}))}n();export{a as A,n as d}
1
+ import{t,p as e,H as r,c as i,h as o}from"./p-BbVVe_wV.js";const a=e(class extends r{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.fieldChange=i(this,"fieldChange"),this.buttonClick=i(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,r,i){return t?o("label",{class:{"input-label":!0,floating:!!i},part:"label",htmlFor:e},t,r&&o("span",{class:"required"},"*")):null}renderLabel(t,e,r){return t?o("label",{class:"input-label",part:"label",htmlFor:e},t,r&&o("span",{class:"required"},"*")):null}renderPasswordToggle(){return this.passwordVisible?o("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"},o("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"}),o("line",{x1:"1",y1:"1",x2:"23",y2:"23"})):o("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"},o("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),o("circle",{cx:"12",cy:"12",r:"3"}))}renderErrors(){return this.getErrors().map((t=>o("span",{class:"error-text",part:"error-text",key:t.id??t.text},t.text)))}renderHint(t){return t?o("span",{class:"helper-text",part:"helper-text"},t):null}renderDivider(){return o("hr",{class:"divider",part:"divider"})}renderHtml(t){return o("div",{class:"html-content",part:"html-content",innerHTML:t.config?.content??""})}renderImage(t){const{src:e,alt:r,width:i,height:a}=t.config??{};return e?o("img",{class:"image",part:"image",src:e,alt:r??"",width:i,height:a,loading:"lazy"}):null}renderRichText(t){return o("div",{class:"rich-text",part:"rich-text",innerHTML:t.config?.content??""})}renderNextButton(t){return o("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 o("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 o("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 o("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}`,r=this.getErrors(),{multiline:i,max_length:a}=t.config??{},n=!!(this.value&&this.value.length>0);return i?o("div",{class:"input-wrapper",part:"input-wrapper"},this.renderLabel(t.label,e,t.required),o("textarea",{id:e,class:{"input-field":!0,"has-error":r.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===r.length&&this.renderHint(t.hint)):o("div",{class:"input-wrapper",part:"input-wrapper"},o("div",{class:"input-container"},o("input",{id:e,class:{"input-field":!0,"has-error":r.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===r.length&&this.renderHint(t.hint))}renderEmailField(t){const e=`input-${t.id}`,r=this.getErrors(),i=!!(this.value&&this.value.length>0);return o("div",{class:"input-wrapper",part:"input-wrapper"},o("div",{class:"input-container"},o("input",{id:e,class:{"input-field":!0,"has-error":r.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,i)),this.renderErrors(),0===r.length&&this.renderHint(t.hint))}renderPasswordField(t){const e=`input-${t.id}`,r=this.getErrors(),i=!!(this.value&&this.value.length>0),a=t.config?.forgot_password_link;return o("div",{class:"input-wrapper",part:"input-wrapper"},o("div",{class:"input-container password-container"},o("input",{id:e,class:{"input-field":!0,"has-error":r.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,i),o("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===r.length&&this.renderHint(t.hint),a&&o("div",{class:"field-link",part:"field-link"},o("a",{href:a,class:"link",part:"link"},"Forgot password?")))}renderNumberField(t){const e=`input-${t.id}`,r=this.getErrors(),{placeholder:i,min:a,max:n,step:s}=t.config??{};return o("div",{class:"input-wrapper",part:"input-wrapper"},this.renderLabel(t.label,e,t.required),o("input",{id:e,class:{"input-field":!0,"has-error":r.length>0},part:"input",type:"number",name:t.id,value:this.value??"",placeholder:i,required:t.required,disabled:this.disabled,min:a,max:n,step:s,onInput:this.handleInput}),this.renderErrors(),0===r.length&&this.renderHint(t.hint))}renderTelField(t){const e=`input-${t.id}`,r=this.getErrors();return o("div",{class:"input-wrapper",part:"input-wrapper"},this.renderLabel(t.label,e,t.required),o("input",{id:e,class:{"input-field":!0,"has-error":r.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===r.length&&this.renderHint(t.hint))}renderUrlField(t){const e=`input-${t.id}`,r=this.getErrors();return o("div",{class:"input-wrapper",part:"input-wrapper"},this.renderLabel(t.label,e,t.required),o("input",{id:e,class:{"input-field":!0,"has-error":r.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===r.length&&this.renderHint(t.hint))}renderDateField(t){const e=`input-${t.id}`,r=this.getErrors(),{min:i,max:a}=t.config??{};return o("div",{class:"input-wrapper",part:"input-wrapper"},this.renderLabel(t.label,e,t.required),o("input",{id:e,class:{"input-field":!0,"has-error":r.length>0},part:"input",type:"date",name:t.id,value:this.value??"",required:t.required,disabled:this.disabled,min:i,max:a,onInput:this.handleInput}),this.renderErrors(),0===r.length&&this.renderHint(t.hint))}renderBooleanField(t){return o("label",{class:"checkbox-wrapper",part:"checkbox-wrapper"},o("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}),o("span",{class:"checkbox-label",part:"checkbox-label"},t.label))}renderLegalField(t){const e=t.config?.text??t.label??"",r=!0===t.config?.html;return o("label",{class:"checkbox-wrapper",part:"checkbox-wrapper"},o("input",{type:"checkbox",part:"checkbox",name:t.id,checked:"true"===this.value,required:t.required,disabled:this.disabled,onChange:this.handleCheckbox}),r?o("span",{class:"checkbox-label",part:"checkbox-label",innerHTML:e}):o("span",{class:"checkbox-label",part:"checkbox-label"},e))}renderDropdownField(t){const e=`input-${t.id}`,r=this.getErrors(),{options:i,placeholder:a}=t.config??{};return o("div",{class:"input-wrapper",part:"input-wrapper"},this.renderLabel(t.label,e,t.required),o("select",{id:e,class:{"input-field":!0,"has-error":r.length>0},part:"input select",name:t.id,required:t.required,disabled:this.disabled,onChange:this.handleInput},a&&o("option",{value:"",disabled:!0,selected:!this.value},a),i?.map((t=>o("option",{value:t.value,selected:this.value===t.value,key:t.value},t.label)))),this.renderErrors(),0===r.length&&this.renderHint(t.hint))}renderChoiceField(t){const e=this.getErrors(),{options:r,display:i}=t.config??{},a="checkbox"===i,n=a?"checkbox":"radio";return o("div",{class:"choice-wrapper",part:"choice-wrapper"},t.label&&o("span",{class:"choice-label",part:"choice-label"},t.label,t.required&&o("span",{class:"required"},"*")),o("div",{class:"choice-options",part:"choice-options"},r?.map((e=>o("label",{class:"choice-option",part:"choice-option",key:e.value},o("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}),o("span",null,e.label))))),this.renderErrors(),0===e.length&&this.renderHint(t.hint))}renderSocialField(t){return o("div",{class:"social-buttons",part:"social-buttons"},(t.config?.providers??[]).map((t=>o("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?o("svg",{class:"social-icon",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},o("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"}),o("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"}),o("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"}),o("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?o("svg",{class:"social-icon",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},o("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?o("svg",{class:"social-icon",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},o("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?o("svg",{class:"social-icon",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},o("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?o("svg",{class:"social-icon",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},o("path",{d:"M0 0h11.377v11.372H0V0z",fill:"#f25022"}),o("path",{d:"M12.623 0H24v11.372H12.623V0z",fill:"#7fba00"}),o("path",{d:"M0 12.623h11.377V24H0v-11.377z",fill:"#00a4ef"}),o("path",{d:"M12.623 12.623H24V24H12.623v-11.377z",fill:"#ffb900"})):"linkedin"===e?o("svg",{class:"social-icon",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},o("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),o("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}}static get style(){return':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}.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}'}},[513,"authhero-node",{component:[16],value:[1],disabled:[4],passwordVisible:[32]}]);function n(){"undefined"!=typeof customElements&&["authhero-node"].forEach((e=>{"authhero-node"===e&&(customElements.get(t(e))||customElements.define(t(e),a))}))}n();export{a as A,n as d}
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, c as createEvent, h } from './index-BzFenraS.js';
1
+ import { r as registerInstance, c as createEvent, h } from './index-ARKBiJrR.js';
2
2
 
3
3
  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: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}.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}`;
4
4
 
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, c as createEvent, g as getElement, h } from './index-BzFenraS.js';
1
+ import { r as registerInstance, c as createEvent, g as getElement, h } from './index-ARKBiJrR.js';
2
2
 
3
3
  /**
4
4
  * AuthHero Widget - Branding Utilities
@@ -1,9 +1,9 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-BzFenraS.js';
2
- export { s as setNonce } from './index-BzFenraS.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-ARKBiJrR.js';
2
+ export { s as setNonce } from './index-ARKBiJrR.js';
3
3
  import { g as globalScripts } from './app-globals-DQuL1Twl.js';
4
4
 
5
5
  /*
6
- Stencil Client Patch Browser v4.41.3 | MIT Licensed | https://stenciljs.com
6
+ Stencil Client Patch Browser v4.42.0 | MIT Licensed | https://stenciljs.com
7
7
  */
8
8
 
9
9
  var patchBrowser = () => {
@@ -2,7 +2,7 @@ const NAMESPACE = 'authhero-widget';
2
2
  const BUILD = /* authhero-widget */ { hotModuleReplacement: false, hydratedSelectorName: "hydrated", lazyLoad: true, propChangeCallback: true, state: true, updatable: true};
3
3
 
4
4
  /*
5
- Stencil Client Platform v4.41.3 | MIT Licensed | https://stenciljs.com
5
+ Stencil Client Platform v4.42.0 | MIT Licensed | https://stenciljs.com
6
6
  */
7
7
 
8
8
 
@@ -430,6 +430,12 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
430
430
  styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, stylesheet];
431
431
  }
432
432
  appliedStyles.add(scopeId2);
433
+ if ("host" in styleContainerNode) {
434
+ const ssrStyleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`);
435
+ if (ssrStyleElm) {
436
+ writeTask(() => ssrStyleElm.remove());
437
+ }
438
+ }
433
439
  }
434
440
  }
435
441
  }
@@ -1110,6 +1116,23 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
1110
1116
  plt.ael(elm, memberName, newValue, capture);
1111
1117
  }
1112
1118
  }
1119
+ } else if (memberName[0] === "a" && memberName.startsWith("attr:")) {
1120
+ const attrName = memberName.slice(5);
1121
+ if (newValue == null || newValue === false) {
1122
+ if (newValue !== false || elm.getAttribute(attrName) === "") {
1123
+ elm.removeAttribute(attrName);
1124
+ }
1125
+ } else {
1126
+ elm.setAttribute(attrName, newValue === true ? "" : newValue);
1127
+ }
1128
+ return;
1129
+ } else if (memberName[0] === "p" && memberName.startsWith("prop:")) {
1130
+ const propName = memberName.slice(5);
1131
+ try {
1132
+ elm[propName] = newValue;
1133
+ } catch (e) {
1134
+ }
1135
+ return;
1113
1136
  } else {
1114
1137
  const isComplex = isComplexType(newValue);
1115
1138
  if ((isProp || isComplex && newValue !== null) && !isSvg) {
@@ -1118,7 +1141,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
1118
1141
  const n = newValue == null ? "" : newValue;
1119
1142
  if (memberName === "list") {
1120
1143
  isProp = false;
1121
- } else if (oldValue == null || elm[memberName] != n) {
1144
+ } else if (oldValue == null || elm[memberName] !== n) {
1122
1145
  if (typeof elm.__lookupSetter__(memberName) === "function") {
1123
1146
  elm[memberName] = n;
1124
1147
  } else {
@@ -1,5 +1,5 @@
1
- import { b as bootstrapLazy } from './index-BzFenraS.js';
2
- export { s as setNonce } from './index-BzFenraS.js';
1
+ import { b as bootstrapLazy } from './index-ARKBiJrR.js';
2
+ export { s as setNonce } from './index-ARKBiJrR.js';
3
3
  import { g as globalScripts } from './app-globals-DQuL1Twl.js';
4
4
 
5
5
  const defineCustomElements = async (win, options) => {
@@ -261,17 +261,38 @@ declare namespace LocalJSX {
261
261
  */
262
262
  "theme"?: WidgetTheme | string;
263
263
  }
264
+
265
+ interface AuthheroNodeAttributes {
266
+ "value": string;
267
+ "disabled": boolean;
268
+ }
269
+ interface AuthheroWidgetAttributes {
270
+ "screen": UiScreen | string;
271
+ "apiUrl": string;
272
+ "baseUrl": string;
273
+ "state": string;
274
+ "screenId": string;
275
+ "authParams": AuthParams | string;
276
+ "statePersistence": StatePersistence;
277
+ "storageKey": string;
278
+ "branding": WidgetBranding | string;
279
+ "theme": WidgetTheme | string;
280
+ "loading": boolean;
281
+ "autoSubmit": boolean;
282
+ "autoNavigate": boolean;
283
+ }
284
+
264
285
  interface IntrinsicElements {
265
- "authhero-node": AuthheroNode;
266
- "authhero-widget": AuthheroWidget;
286
+ "authhero-node": Omit<AuthheroNode, keyof AuthheroNodeAttributes> & { [K in keyof AuthheroNode & keyof AuthheroNodeAttributes]?: AuthheroNode[K] } & { [K in keyof AuthheroNode & keyof AuthheroNodeAttributes as `attr:${K}`]?: AuthheroNodeAttributes[K] } & { [K in keyof AuthheroNode & keyof AuthheroNodeAttributes as `prop:${K}`]?: AuthheroNode[K] };
287
+ "authhero-widget": Omit<AuthheroWidget, keyof AuthheroWidgetAttributes> & { [K in keyof AuthheroWidget & keyof AuthheroWidgetAttributes]?: AuthheroWidget[K] } & { [K in keyof AuthheroWidget & keyof AuthheroWidgetAttributes as `attr:${K}`]?: AuthheroWidgetAttributes[K] } & { [K in keyof AuthheroWidget & keyof AuthheroWidgetAttributes as `prop:${K}`]?: AuthheroWidget[K] };
267
288
  }
268
289
  }
269
290
  export { LocalJSX as JSX };
270
291
  declare module "@stencil/core" {
271
292
  export namespace JSX {
272
293
  interface IntrinsicElements {
273
- "authhero-node": LocalJSX.AuthheroNode & JSXBase.HTMLAttributes<HTMLAuthheroNodeElement>;
274
- "authhero-widget": LocalJSX.AuthheroWidget & JSXBase.HTMLAttributes<HTMLAuthheroWidgetElement>;
294
+ "authhero-node": LocalJSX.IntrinsicElements["authhero-node"] & JSXBase.HTMLAttributes<HTMLAuthheroNodeElement>;
295
+ "authhero-widget": LocalJSX.IntrinsicElements["authhero-widget"] & JSXBase.HTMLAttributes<HTMLAuthheroWidgetElement>;
275
296
  }
276
297
  }
277
298
  }
@@ -125,8 +125,27 @@ export interface EventOptions {
125
125
  */
126
126
  composed?: boolean;
127
127
  }
128
+ export interface AttachInternalsOptions {
129
+ /**
130
+ * Initial custom states to set on the ElementInternals.states CustomStateSet.
131
+ * Each key is the state name and the value is the initial boolean state.
132
+ *
133
+ * These states can be targeted with the CSS `:state()` pseudo-class.
134
+ *
135
+ * @example
136
+ * ```tsx
137
+ * @AttachInternals({ states: { open: true, active: false } })
138
+ * internals: ElementInternals;
139
+ * ```
140
+ *
141
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/CustomStateSet
142
+ */
143
+ states?: {
144
+ [stateName: string]: boolean;
145
+ };
146
+ }
128
147
  export interface AttachInternalsDecorator {
129
- (): PropertyDecorator;
148
+ (opts?: AttachInternalsOptions): PropertyDecorator;
130
149
  }
131
150
  export interface ListenDecorator {
132
151
  (eventName: string, opts?: ListenOptions): CustomMethodDecorator<any>;
@@ -1419,6 +1438,8 @@ export declare namespace JSXBase {
1419
1438
  results?: number;
1420
1439
  security?: string;
1421
1440
  unselectable?: boolean;
1441
+ [key: `attr:${string}`]: string;
1442
+ [key: `prop:${string}`]: any;
1422
1443
  }
1423
1444
  interface SVGAttributes<T = SVGElement> extends DOMAttributes<T> {
1424
1445
  class?: string | {
@@ -1680,6 +1701,8 @@ export declare namespace JSXBase {
1680
1701
  yChannelSelector?: string;
1681
1702
  z?: number | string;
1682
1703
  zoomAndPan?: string;
1704
+ [key: `attr:${string}`]: string;
1705
+ [key: `prop:${string}`]: any;
1683
1706
  }
1684
1707
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent) */
1685
1708
  interface ToggleEvent extends Event {
package/hydrate/index.js CHANGED
@@ -135,7 +135,7 @@ const NAMESPACE = 'authhero-widget';
135
135
  const BUILD = /* authhero-widget */ { hotModuleReplacement: false, hydratedSelectorName: "hydrated", slotRelocation: true, state: true, updatable: true};
136
136
 
137
137
  /*
138
- Stencil Hydrate Platform v4.41.3 | MIT Licensed | https://stenciljs.com
138
+ Stencil Hydrate Platform v4.42.0 | MIT Licensed | https://stenciljs.com
139
139
  */
140
140
  var __create = Object.create;
141
141
  var __defProp = Object.defineProperty;
@@ -1813,6 +1813,23 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
1813
1813
  plt.ael(elm, memberName, newValue, capture);
1814
1814
  }
1815
1815
  }
1816
+ } else if (memberName[0] === "a" && memberName.startsWith("attr:")) {
1817
+ const attrName = memberName.slice(5);
1818
+ if (newValue == null || newValue === false) {
1819
+ if (newValue !== false || elm.getAttribute(attrName) === "") {
1820
+ elm.removeAttribute(attrName);
1821
+ }
1822
+ } else {
1823
+ elm.setAttribute(attrName, newValue === true ? "" : newValue);
1824
+ }
1825
+ return;
1826
+ } else if (memberName[0] === "p" && memberName.startsWith("prop:")) {
1827
+ const propName = memberName.slice(5);
1828
+ try {
1829
+ elm[propName] = newValue;
1830
+ } catch (e) {
1831
+ }
1832
+ return;
1816
1833
  } else {
1817
1834
  const isComplex = isComplexType(newValue);
1818
1835
  if ((isProp || isComplex && newValue !== null) && !isSvg) {
@@ -1821,7 +1838,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
1821
1838
  const n = newValue == null ? "" : newValue;
1822
1839
  if (memberName === "list") {
1823
1840
  isProp = false;
1824
- } else if (oldValue == null || elm[memberName] != n) {
1841
+ } else if (oldValue == null || elm[memberName] !== n) {
1825
1842
  if (typeof elm.__lookupSetter__(memberName) === "function") {
1826
1843
  elm[memberName] = n;
1827
1844
  } else {
@@ -6351,7 +6368,7 @@ var NAMESPACE = (
6351
6368
  );
6352
6369
 
6353
6370
  /*
6354
- Stencil Hydrate Runner v4.41.3 | MIT Licensed | https://stenciljs.com
6371
+ Stencil Hydrate Runner v4.42.0 | MIT Licensed | https://stenciljs.com
6355
6372
  */
6356
6373
  var __create = Object.create;
6357
6374
  var __defProp = Object.defineProperty;
package/hydrate/index.mjs CHANGED
@@ -133,7 +133,7 @@ const NAMESPACE = 'authhero-widget';
133
133
  const BUILD = /* authhero-widget */ { hotModuleReplacement: false, hydratedSelectorName: "hydrated", slotRelocation: true, state: true, updatable: true};
134
134
 
135
135
  /*
136
- Stencil Hydrate Platform v4.41.3 | MIT Licensed | https://stenciljs.com
136
+ Stencil Hydrate Platform v4.42.0 | MIT Licensed | https://stenciljs.com
137
137
  */
138
138
  var __create = Object.create;
139
139
  var __defProp = Object.defineProperty;
@@ -1811,6 +1811,23 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
1811
1811
  plt.ael(elm, memberName, newValue, capture);
1812
1812
  }
1813
1813
  }
1814
+ } else if (memberName[0] === "a" && memberName.startsWith("attr:")) {
1815
+ const attrName = memberName.slice(5);
1816
+ if (newValue == null || newValue === false) {
1817
+ if (newValue !== false || elm.getAttribute(attrName) === "") {
1818
+ elm.removeAttribute(attrName);
1819
+ }
1820
+ } else {
1821
+ elm.setAttribute(attrName, newValue === true ? "" : newValue);
1822
+ }
1823
+ return;
1824
+ } else if (memberName[0] === "p" && memberName.startsWith("prop:")) {
1825
+ const propName = memberName.slice(5);
1826
+ try {
1827
+ elm[propName] = newValue;
1828
+ } catch (e) {
1829
+ }
1830
+ return;
1814
1831
  } else {
1815
1832
  const isComplex = isComplexType(newValue);
1816
1833
  if ((isProp || isComplex && newValue !== null) && !isSvg) {
@@ -1819,7 +1836,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
1819
1836
  const n = newValue == null ? "" : newValue;
1820
1837
  if (memberName === "list") {
1821
1838
  isProp = false;
1822
- } else if (oldValue == null || elm[memberName] != n) {
1839
+ } else if (oldValue == null || elm[memberName] !== n) {
1823
1840
  if (typeof elm.__lookupSetter__(memberName) === "function") {
1824
1841
  elm[memberName] = n;
1825
1842
  } else {
@@ -6349,7 +6366,7 @@ var NAMESPACE = (
6349
6366
  );
6350
6367
 
6351
6368
  /*
6352
- Stencil Hydrate Runner v4.41.3 | MIT Licensed | https://stenciljs.com
6369
+ Stencil Hydrate Runner v4.42.0 | MIT Licensed | https://stenciljs.com
6353
6370
  */
6354
6371
  var __create = Object.create;
6355
6372
  var __defProp = Object.defineProperty;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@authhero/widget",
3
- "version": "0.8.1",
3
+ "version": "0.8.3",
4
4
  "description": "Server-Driven UI widget for AuthHero authentication flows",
5
5
  "repository": {
6
6
  "type": "git",
@@ -33,7 +33,7 @@
33
33
  }
34
34
  },
35
35
  "dependencies": {
36
- "@authhero/adapter-interfaces": "0.124.0"
36
+ "@authhero/adapter-interfaces": "0.126.0"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@hono/node-server": "^1.14.1",
@@ -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)}g?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],e.add(s)}}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]){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}