@descope/flow-components 3.10.1 → 3.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/fm/222.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";(self.webpackChunk_descope_flow_components_3_10_1_1779090636141=self.webpackChunk_descope_flow_components_3_10_1_1779090636141||[]).push([[222],{5222(e,t,o){o.d(t,{$y:()=>Fp,A8:()=>xc,Ag:()=>Ka,C1:()=>Pc,C9:()=>xi,Cz:()=>sc,Er:()=>_h,G6:()=>Ox,HO:()=>Zo,HT:()=>ei,J1:()=>Ni,Jr:()=>Wo,Lg:()=>jp,MN:()=>ds,Mz:()=>Ta,NF:()=>_s,O7:()=>bm,Od:()=>yp,QW:()=>ec,Qb:()=>Tm,SE:()=>si,SQ:()=>Ei,T1:()=>Zx,TV:()=>qp,Ul:()=>sa,VN:()=>Md,VX:()=>Mn,_w:()=>Vt,a5:()=>jx,bL:()=>cn,bU:()=>wg,br:()=>B,dX:()=>eu,dq:()=>tb,du:()=>qu,e7:()=>At,eA:()=>Ac,eo:()=>pl,ew:()=>ht,fp:()=>fl,gZ:()=>ap,h5:()=>Rm,jH:()=>En,k0:()=>fn,l1:()=>ii,md:()=>In,ml:()=>Oe,mq:()=>Jc,o9:()=>kn,o_:()=>Lt,pp:()=>Hc,px:()=>zp,q:()=>Kb,q4:()=>Mo,qn:()=>Mi,rG:()=>wp,sK:()=>ko,tD:()=>Jd,tS:()=>tp,td:()=>Du,tl:()=>Jn,ul:()=>ja,v_:()=>xn,w8:()=>Zr,wt:()=>fa,xO:()=>vs,xp:()=>hp,xs:()=>kr,yW:()=>Hm,yi:()=>cb,yj:()=>Zg,zQ:()=>Wx,zZ:()=>_b});var i=o(7949),r=o(72),n=o.n(r),s=o(8089),a=o.n(s),l=o(465),d=o.n(l),c=(o(8231),o(4873),o(865),o(4598),o(7519)),p=(o(496),o(7726),o(4155),o(9504),o(1399),o(5877),o(3798),o(8619),o(1394)),h=o(3667),u=(o(8319),o(3826)),g=o(8677),m=o(127),b=(o(9849),o(4899),o(3977),o(9435),o(7822),o(5595),o(6601),o(9792)),y=o(1206),f=o(8733),v=o(268);const x="descope",C=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_.]+/g,"-").toLowerCase(),w=(...e)=>C(e.filter(e=>!!e).join("-")),I=(...e)=>t=>e.reduceRight((e,t)=>t(e),t),S=e=>"function"==typeof e,M=(e,t,{excludeAttrs:o=[],includeAttrs:i=[]})=>{const r=Array.from(e.attributes).filter(e=>!o.includes(e.name)&&(!i.length||i.includes(e.name))).map(e=>e.name);t(r);const n=new MutationObserver(e=>{e.forEach(e=>{"attributes"!==e.type||o.includes(e.attributeName)||i.length&&!i.includes(e.attributeName)||t([e.attributeName])})});return n.observe(e,{attributes:!0}),{disconnect:()=>n.disconnect()}},A=(e,t)=>{t({addedNodes:Array.from(e.children),removedNodes:[]}),new MutationObserver(e=>{e.forEach(e=>{"childList"!==e.type&&"characterData"!==e.type||t(e)})}).observe(e,{childList:!0,characterData:!0,subtree:!0})},E=(e,t,o={})=>i=>{i.forEach(i=>{const r=o[i]||i,n=e.getAttribute(i);t&&(null!==n?t.getAttribute(r)!==n&&t.setAttribute(r,n):t.removeAttribute(r))})},T=(e,t,o)=>{M(e,E(e,t),o),M(t,E(t,e),o)},k=e=>w(x,e),z=(...e)=>`--${w(...e)}`,L=(e,t,o={})=>M(e,E(e,t,o.mapAttrs),o),V=(e,t,{prepend:o=!1}={})=>{let i;try{i=new CSSStyleSheet}catch{return D(e,t,{prepend:o})}const r=t?.shadowRoot||t;if(e&&i.replaceSync(e),r){const e=[...r.adoptedStyleSheets||[]];e[o?"unshift":"push"](i),r.adoptedStyleSheets=e}return e&&!i.cssRules[0]?.style&&console.warn(`No style rules were created, make sure the CSS is valid:\n "${e}"`),i};class N{constructor(e,t,{prepend:o=!1}={}){this.styleEle=document.createElement("style"),this.styleEle.textContent=e,this.styleEle.setAttribute("nonce",window.DESCOPE_NONCE),this.ref=t?.shadowRoot||t,this.ref&&(o?this.ref.prepend(this.styleEle):this.ref.append(this.styleEle))}replaceSync(e){this.styleEle.textContent=e}get cssRules(){return this.styleEle.sheet?.cssRules}}const D=(e,t,{prepend:o=!1}={})=>new N(e,t,{prepend:o}),P=(e,t=2)=>e.trim().split(" ").splice(0,t).map(e=>e[0]?.toUpperCase()).join(""),B=new class{static mountOnPropName="DescopeThemeManager";#e={};#t="light";#o=new Set;#i(){this.#o.forEach(e=>e?.())}get currentThemeName(){return this.#t}set currentThemeName(e){this.#t=e,this.#i()}get currentTheme(){return this.#e[this.currentThemeName]}onCurrentThemeChange(e){return this.#o.add(e),()=>{this.#o.delete(e)}}set themes(e){this.#e=e,this.#i()}get hasThemes(){return!!Object.keys(this.#e).length}},F=.25,R=.1,W=(e,t)=>e.darken(t).hex(),O=e=>{const t=e.isDark();return e.mix(d()(t?"white":"black"),1).saturate(1).hex()},j=(e,t)=>e.lightness()<.5?e.lightness(100*t).hex():e.lighten(t).hex(),$=e=>e.luminosity()>.99,_=(e,t)=>(e=>e.luminosity()<.01)(e)?j(e,F):W(e,.4),H=(e,t)=>$(e)?W(e,F):j(e,.4),q=(e,t)=>$(e)?W(e,R):j(e,.8),Y=(e,t)=>{const o=new(d())(e.main||e);return{main:o.hex(),dark:e.dark||_(o),light:e.light||H(o),highlight:e.highlight||q(o),contrast:e.contrast||O(o)}},U=e=>`\n :host {\n padding: calc(var(${e.inputOutlineWidth}) + var(${e.inputOutlineOffset}))\n }\n`,G=e=>`\n ${e} > label,\n ${e}::part(label),\n ${e}::part(required-indicator) {\n cursor: pointer;\n }\n`,Z=(e,t="input")=>`\n ${e}[disabled] > ${t}:placeholder-shown,\n\t${e}[readonly] > ${t}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,Q=e=>`\n ${e}::part(input-field)::after {\n opacity: 0;\n }\n`,J=e=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${e} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,K=e=>z(x,...e),X=(e,t,o)=>{const i=Array.isArray(t)?t:t.match(/([^[.\]])+/g);return i.reduce((e,t,r)=>(void 0===e[t]&&(e[t]={}),r===i.length-1&&(e[t]=o),e[t]),e),e},ee=(e,t,o)=>Object.entries(e).reduce((e,[i,r])=>r?.constructor!==Object?a()(e,o(t.concat(i),r)):a()(e,ee(r,[...t,i],o)),{}),te=(e,t)=>ee(e,[],e=>X({},e,`var(${K(e)})`)),oe=(...e)=>e.reduceRight((e,t)=>t.startsWith("--")?`var(${t}${e?`, ${e}`:e})`:`${t}${e?`, ${e}`:e}`,""),ie=(e,t)=>{const o=ee(e,[],(e,o)=>{const i=[...e],r=i.splice(-1),n=z(t,r),s={[r]:n},a={[r]:oe(n)};return{theme:X({},[...i,n],o),useVars:a,vars:s}});return[o.theme,o.useVars,o.vars]},re=e=>`${e}__override`,ne=(e,t,o=!1)=>{const i=`var(${e}${t?`, ${t}`:""})`;return o?`var(${re(e)}, ${i})`:i};let se=class{constructor(){this.styleMap=new Map}add(e,t,o){this.styleMap.has(e)||this.styleMap.set(e,[]),this.styleMap.set(e,[...this.styleMap.get(e),{property:t,value:o}])}toString(){return Array.from(this.styleMap.entries()).reduce((e,[t,o])=>{const i=o.map(({property:e,value:t})=>`${e}: ${t}`).join(";\n");return`${e}${t} { \n${i} \n}\n\n`},"")}};const ae=(e,t="fallback")=>w(e,t),le=(e,t,{fallback:o})=>{if(!o)return{};const i=ae(t,o.suffix),r=((...e)=>e.filter(Boolean).map((e,t)=>{return 0===t?e:(o=e).charAt(0).toUpperCase()+o.slice(1);var o}).join(""))(e,o.suffix||"fallback");return{[r]:i,...le(r,i,o)}},de=(e,t)=>Object.keys(t).reduce((o,i)=>{const r=z(e,i);return Object.assign(o,{[i]:r},{[i+"Override"]:re(r)},le(i,r,t[i]))},{}),ce=({mappings:e={},componentNameOverride:t=""})=>o=>{const i=t||o.componentName;return class t extends o{static get cssVarList(){return{...o.cssVarList,...de(i,{...e})}}#r;#n;#s;#a;#l;#d;#c;#p;#h;constructor({getRootElement:e,componentNameSuffix:o="",themeSection:i="host",baseSelector:r}={}){super(),this.#a=o,this.#l=i,this.#c=r??this.baseSelector,this.#h=e,this.#p=Object.keys(t.cssVarList).map(e=>w("st",o,e))}get#u(){return B.currentTheme?.[i]||""}#g(){this.#n.replaceSync(this.#u[this.#l]),this.currentThemeName=B.currentThemeName,this.onThemeChange?.(B.currentThemeName)}#m(){this.#n=V("",this.#d,{prepend:!0}),this.#s=B.onCurrentThemeChange(this.#g.bind(this)),this.#g()}#b(){if(this.#p.length){let e=`.${i}`.repeat(5);const t=this.getAttribute("id");t&&(e+=`#${CSS.escape(t)}`),this.#r=V(`:host(${e}) {}`,this.#d)}}#y(e,t){const o=this.#r.cssRules[0].style;if(!o)return;const r=z(i,e.replace(new RegExp("^st-"),""));t?o?.setProperty(r,t):(o?.removeProperty(r),this.removeAttribute(e))}#f(e=[]){e.forEach(e=>{this.#p.includes(e)&&this.#y(e,this.getAttribute(e))})}#v(){if(Object.keys(e).length){const t=((e,t,o)=>{const i=new se,r=(e,t)=>{if(!e)return"";if("string"==typeof e)return e;const o=ae(t,e?.suffix);return ne(o,r(e.fallback,o))};return Object.keys(o).forEach(n=>{const s=((e,t)=>{const o={selector:"",property:C(e)};return t&&Object.keys(t).length?Array.isArray(t)?t.map(e=>({...o,...e})):[{...o,...t}]:[o]})(n,o[n]),a=z(e,n);s.forEach(({selector:e,property:o,important:n,fallback:s})=>{const l=r(s,a);i.add(((e="",t="")=>S(t)?t(e):`${e}${/^[A-Za-z]/.test(t)?` ${t}`:t}`)(t,e),S(o)?o():o,ne(a,l,!0)+(n?"!important":""))})}),i.toString()})(w(i,this.#a),this.#c,e);V(t,this.#d,{prepend:!0})}}#x(e){(this.#d?.classList||this.#d?.host?.classList||this.classList).add(e)}async init(){super.init?.(),!this.shadowRoot?.isConnected&&this.shadowRoot||(this.#d=await(this.#h?.(this))||this.shadowRoot,this.#x(i),this.#v(),this.#m(),this.#b(),M(this,this.#f.bind(this),{}))}disconnectedCallback(){super.disconnectedCallback?.(),this.#s?.()}}},pe=e=>class extends e{constructor(){super(),V(':host([draggable="true"]) * { cursor: inherit!important }',this)}get isDraggable(){return this.hasAttribute("draggable")&&"false"!==this.getAttribute("draggable")}init(){this.addEventListener("mousedown",e=>{if(this.isDraggable){const t=this.baseElement.getAttribute("tabindex");this.baseElement.setAttribute("tabindex","-1");const o=()=>{t?this.baseElement.setAttribute("tabindex",t):this.baseElement.removeAttribute("tabindex"),e.target.removeEventListener("mouseup",o),e.target.removeEventListener("dragend",o)};e.target.addEventListener("mouseup",o,{once:!0}),e.target.addEventListener("dragend",o,{once:!0})}}),super.init?.()}},he=e=>class extends e{#C(){const t=this.localName;if(!e.componentName)throw Error('component name is not defined on super class, make sure you have a static get for "componentName"');if(t!==e.componentName)throw Error(`component name mismatch, expected "${e.componentName}", current "${t}"`)}init(){super.init?.(),this.#C()}},ue=e=>class extends e{updateComponentsContext(e){this.dispatchEvent(new CustomEvent("components-context",{bubbles:!0,composed:!0,detail:e}))}},ge=e=>class extends e{init(){super.init?.(),(this.baseElement||this).addEventListener("mouseover",e=>{this.setAttribute("hover","true"),e.target.addEventListener("mouseleave",()=>this.removeAttribute("hover"),{once:!0})})}},me=["readonly","focused","invalid","has-label","required","disabled","checked","has-helper","has-value","step-buttons-visible","hover","has-error-message","focus-ring","opened","active","password-visible","opening","closing","has-no-options","loading","allow-custom-value","collapsed","hide-country","hide-subdivision","hide-city"],be=e=>class extends e{init(){super.init?.(),M(this,e=>e.forEach(e=>{const t=this.getAttribute(e);(e=>me.includes(e))(e)?""===t?this.setAttribute(e,"true"):"false"===t&&this.removeAttribute(e):t||console.debug(`attribute "${e}" has no value, should it be added to the boolean attributes list?`)}),{})}},ye=({componentName:e,baseSelector:t=""})=>{class o extends HTMLElement{static get componentName(){return e}#w;#I=!0;get baseSelector(){return t}get baseElement(){return this.#w??=this.baseSelector?this.rootElement.querySelector(this.baseSelector):this,this.#w||console.warn("missing base element for component",this.localName),this.#w}get rootElement(){return this.shadowRoot||this}get name(){return this.getAttribute("name")}connectedCallback(){super.connectedCallback?.(),this.rootElement.isConnected&&this.#I&&(this.#I=!1,this.init?.())}}return I(he,ge,be,ue)(o)};function fe(e,t={}){const o=new Event(e,t);this[`on${e}`]?.(o),this.dispatchEvent(o)}const ve=e=>class extends e{#S=fe.bind(this,"change");init(){super.init?.(),this.prevValue=this.value,this.addEventListener("change",e=>{e.stopPropagation()}),this.addEventListener("blur",()=>{this.value!==this.prevValue&&(this.#S(),this.prevValue=this.value)})}},xe=e=>class extends e{init(){this.#M(),super.init?.()}#M(){["blur","focus","focusin","focusout"].forEach(e=>{this.addEventListener(e,e=>{e.isTrusted&&e.target===this&&e.stopImmediatePropagation()})})}handleFocusEventsDispatching(e){let t;e?.forEach(e=>{e?.addEventListener("focusout",e=>{e.stopImmediatePropagation(),t=setTimeout(()=>{t=null,fe.call(this,"blur"),fe.call(this,"focusout",{bubbles:!0})})});const o=e=>{e.stopImmediatePropagation(),clearTimeout(t),t||(fe.call(this,"focus"),fe.call(this,"focusin",{bubbles:!0}))};e?.addEventListener("focusin",o),e?.addEventListener("focus",o)})}handleInputEventDispatching(){let e=this.value;this.addEventListener("input",t=>{this!==t.target&&(t.stopImmediatePropagation(),e!==this.value&&(e=this.value,fe.call(this,"input",{bubbles:!0,composed:!0})))})}},Ce=["required","pattern"],we=Symbol("validationTarget"),Ie=e=>class extends e{#A=we;static get observedAttributes(){return[...e.observedAttributes||[],...Ce]}static get formAssociated(){return!0}#E;get internals(){return this.#E}set internals(e){this.#E=e}constructor(){super(),this.#E=this.attachInternals()}get defaultErrorMsgValueMissing(){return"Please fill out this field."}get defaultErrorMsgPatternMismatch(){return"Please match the requested format."}get defaultErrorMsgTooShort(){return`Minimum length is ${this.getAttribute("minlength")}.`}get defaultErrorMsgTooLong(){return`Maximum length is ${this.getAttribute("maxlength")}. `}get defaultErrorMsgRangeUnderflow(){return`At least ${this.getAttribute("min-items-selection")} items are required.`}get defaultErrorMsgRangeOverflow(){return`At most ${this.getAttribute("max-items-selection")} items are allowed.`}get defaultErrorMsgTypeMismatch(){return"Please match the requested type."}getCustomErrorMessage(e,t){return this.hasAttribute(e)?this.getAttribute(e)||" ":t}getErrorMessage(e){const{valueMissing:t,patternMismatch:o,typeMismatch:i,stepMismatch:r,tooShort:n,tooLong:s,rangeOverflow:a,rangeUnderflow:l,badInput:d,customError:c}=e;switch(!0){case t:return this.getCustomErrorMessage("data-errormessage-value-missing",this.defaultErrorMsgValueMissing);case o||r||d:return this.getCustomErrorMessage("data-errormessage-pattern-mismatch",this.defaultErrorMsgPatternMismatch);case i:return this.getCustomErrorMessage("data-errormessage-type-mismatch",this.defaultErrorMsgTypeMismatch);case n:return this.getCustomErrorMessage("data-errormessage-pattern-mismatch-too-short",this.defaultErrorMsgTooShort);case s:return this.getCustomErrorMessage("data-errormessage-pattern-mismatch-too-long",this.defaultErrorMsgTooLong);case l:return this.getCustomErrorMessage("data-errormessage-pattern-range-underflow",this.defaultErrorMsgRangeUnderflow);case a:return this.getCustomErrorMessage("data-errormessage-pattern-range-overflow",this.defaultErrorMsgRangeOverflow);case c:return this.validationMessage;default:return""}}#T(){const e=this.isReadOnly?{}:this.getValidity();this.#E.setValidity(e,this.getErrorMessage(e),this.validationTarget)}get validationMessage(){return this.#E.validationMessage}getValidity(){console.warn("getValidity","is not implemented")}checkValidity(){return this.#E.validity.valid}reportValidity(){return this.#E.reportValidity()}get validity(){return this.#E.validity}get validationTarget(){return this.#A===we?this.inputElement:this.#A}set validationTarget(e){this.#A=e}setCustomValidity(e){e?this.#E.setValidity({customError:!0},e,this.validationTarget):(this.#E.setValidity({}),this.#T())}get isRequired(){return this.hasAttribute("required")&&"false"!==this.getAttribute("required")}get isReadOnly(){return this.hasAttribute("readonly")&&"false"!==this.getAttribute("readonly")}get isDisabled(){return this.hasAttribute("disabled")&&"false"!==this.getAttribute("disabled")}get pattern(){return this.getAttribute("pattern")}get form(){return this.#E.form}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),Ce.includes(e)&&this.#T()}init(){super.init?.(),this.addEventListener("change",this.#T),this.addEventListener("invalid",e=>e.stopPropagation()),this.addEventListener("input",this.#T),setTimeout(()=>this.#T())}},Se=(...e)=>I(Ie,ve,be,xe)(ye(...e)),Me="FETCH_RESULTS_ERROR",Ae=()=>class{constructor(e){this.getAttribute=e,this.isValid=this.#k()}checkConnectorValidity(){this.isValid=this.#k()}#k(){return!this.getRequiredParams().filter(e=>{const t=this.getAttribute(e);return!t||!this.validateParam(e,t)}).length}validateParam(e,t){return t.trim().length>0}getRequiredParams(){return console.error("Connector must implement getRequiredParams"),[]}async fetch(e){return this.isValid?this._fetchResults(e):(console.error(`[${this.constructor.name}] Cannot fetch results: connector is not properly configured`),{results:[],error:"CONNECTOR_INVALID"})}_fetchResults(e){return console.error("Connector must implement fetchResults"),{results:[],error:void 0}}},Ee=({componentName:e,wrappedEleName:t,slots:o=[],style:i,excludeAttrsSync:r=[],includeAttrsSync:n=[],includeForwardProps:s=[],delegatesFocus:a=!0})=>{class l extends(ye({componentName:e,baseSelector:t})){#z=fe.bind(this,"blur");#L=fe.bind(this,"focus");constructor(){super().attachShadow({mode:"open",delegatesFocus:a}).innerHTML=`\n\t\t\t<${t}>\n\t\t\t${o.map(e=>`<slot ${e?`name="${e}" slot="${e}"`:""}></slot>`).join("")}\n\t\t\t</${t}>\n\t\t`,V((S(i)?i():i)||"",this)}init(){super.init?.(),this.baseElement.addEventListener("blur",e=>{this.#z()}),this.baseElement.addEventListener("focus",e=>{this.#L()}),((e,t,o=[])=>{if(!o.length)return;const i=o.reduce((t,o)=>Object.assign(t,{[o]:{get:()=>e[o],set(t){e[o]=t}}}),{});Object.defineProperties(t,i)})(this.baseElement,this,s),T(this.baseElement,this,{excludeAttrs:r,includeAttrs:n})}}return l},Te=["invalid","required"],ke=e=>{if(!e)return;let t=e;for(let e=0;e<10;e++)if([t]=t.assignedElements(),"slot"!==t?.localName)return t},ze=({proxyProps:e=[],useProxyTargets:t=!1,inputEvent:o="input",triggerValidationEvents:i=[],proxyParentValidation:r=!1})=>n=>class extends(Ie(n)){static get observedAttributes(){return[...n.observedAttributes||[],...Te]}#V;#S=fe.bind(this,"change");constructor(){super(),this.#V=super.inputElement}warnIfInputElementIsMissing(){clearTimeout(this.inputElementTimerId),this.inputElementTimerId=setTimeout(()=>{!this.#V&&console.warn(this.localName,"no input was found")},0)}get inputElement(){if(this.#V)return this.#V;this.warnIfInputElementIsMissing();const e=this.baseElement.shadowRoot?.querySelector('slot[name="input"]'),t=this.baseElement.shadowRoot?.querySelector('slot[name="textarea"]');return this.#V=ke(e)||ke(t),this.#V}set inputElement(e){this.#V=e}getValidity(){return this.inputElement?.validity||{}}#N(){this.setAttribute("error-message",this.validationMessage)}reportValidity=()=>{this.inputElement.setCustomValidity(""),this.setCustomValidity(""),this.checkValidity()||(this.setAttribute("invalid","true"),this.#N(),this.focus())};defaultReportValidity(){return super.reportValidity()}init(){if(super.init?.(),this.baseElement._setInvalid=function(e){!e&&this._shouldSetInvalid(e)&&(this.invalid=e)},this.baseElement.addEventListener("input",e=>{e.composed||this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))}),i.forEach(e=>{this.baseElement?.addEventListener(e,()=>{this.inputElement?.setCustomValidity("")})}),setTimeout(()=>{(Array.isArray(o)?o:[o]).forEach(e=>{this.baseElement?.addEventListener(e,()=>{this.baseElement.checkValidity()?this.removeAttribute("invalid"):this.#N()})}),this.baseElement.addEventListener("change",()=>{this.#S()}),this.addEventListener("invalid",()=>{this.checkValidity()||this.setAttribute("invalid","true"),this.#N()}),e.forEach(e=>{const o=this.querySelector('input[slot="external-input"]')||null,i=t?[this.baseElement,o].filter(Boolean):[];((e,t,o)=>{const i=Array.isArray(t)?t:[t];Object.defineProperty(e,o,{set(e){i.forEach(t=>{t[o]=e})},get:()=>t[0][o],configurable:!0})})(this,[this.inputElement,...i],e)}),this.setSelectionRange=this.inputElement.setSelectionRange?.bind(this.inputElement),L(this,this.inputElement,{includeAttrs:["inputmode"]})}),r){const e=this.inputElement.internals,t=this;this.inputElement.internals=new Proxy(e,{get:(e,o)=>"function"==typeof e[o]&&"setValidity"===o?(...i)=>{if(3===i.length){const e=i.slice(0,i.length-1);e.push(t.inputElement),t.internals[o](...e)}else t.internals[o](...i);return e[o](...i)}:"function"==typeof e[o]?(...i)=>(t.internals[o](...i),e[o](...i)):e[o]})}}},Le=e=>I(ze(e),ce({componentNameOverride:k("input-wrapper")})),Ve=e=>async t=>{const o=await e(t);return new Promise(e=>{let t=0;const i=()=>{if(t>20)return console.error("could not get shadow root for element",o),void e(o);t++,o?.shadowRoot?e(o.shadowRoot):setTimeout(i)};i()})},Ne=({name:e,selector:t,mappings:o={},forward:{attributes:i=[],include:r=!0}={}})=>n=>{const s=e||(e=>e.replace(/[^\w\s]/gi,""))(t),a=ce({mappings:o})(n);return class extends a{static get cssVarList(){return{...a.cssVarList,[s]:de(s?w(n.componentName,"_"+s):n.componentName,o)}}#D;constructor(){const e=Ve(async e=>{const o=(e.shadowRoot||e).querySelector(e.baseSelector);return t&&e.shadowRoot?(await Ve(()=>o)(e)).querySelector(t):o});super({getRootElement:e,componentNameSuffix:s&&"_"+s,themeSection:s?"_"+s:void 0,baseSelector:""}),this.#P=()=>e(this).then(e=>e?.host||e)}#P;async#B(){const e=await this.#D;e.onmouseenter=e=>{e.target.setAttribute("hover","true")},e.onmouseleave=e=>{e.target.removeAttribute("hover")}}async init(){super.init?.(),this.#D=this.#P();const e=await this.#D;L(this,e,{[r?"includeAttrs":"excludeAttrs"]:i}),this.#B()}}},De=()=>!0,Pe=e=>`<pre>${JSON.stringify(e,null,4)}</pre>`,Be=({itemRenderer:e=Pe,validateSchema:t=De,slotName:o,rerenderAttrsList:i=[],targetSelector:r,sortFn:n=e=>e})=>s=>class extends s{#F=[];#R;#W(e){if(!t)return!0;const o=t(e);return!0===o||(console.error("Data schema validation failed",o||""),!1)}#O(){const e=o?`*[slot="${o}"]`:":not([slot])";this.#R&&this.#R.querySelectorAll(e).forEach(e=>e.remove())}#j(){this.#O(),(n?this.data.sort(n):this.data).forEach((t,o)=>{const i="string"==typeof(r=e(t,o,this))?(e=>{const t=document.createElement("template");return t.innerHTML=e,t})(r).content:r instanceof HTMLTemplateElement?r.content:(console.error("Invalid template",r),null);var r;this.#R&&this.#R.appendChild(i?.cloneNode(!0))})}set data(e){this.#W(e)&&(this.#F=e,this.#j())}get data(){return this.#F}init(){super.init?.(),this.#R=r?this.shadowRoot.querySelector(r):this.baseElement,M(this,e=>{e.includes("data")?this.#$():this.#j()},{includeAttrs:[...i,"data"]})}#$(){const e=this.getAttribute("data");if(e)try{this.data=JSON.parse(e)}catch(t){console.warn("Invalid JSON data",e)}}},Fe=["blockquote","list","image","table","code","hr","backticks","fence","reference","heading","lheading","html_block"],Re=k("enriched-text");class We extends(ye({componentName:Re,baseSelector:":host > div"})){#_;#H;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="content"></div>\n ',V("\n :host {\n line-height: 1em;\n word-break: break-word;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n *, *:last-child {\n margin: 0;\n }\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n p {\n margin-bottom: 1em;\n }\n a {\n cursor: pointer;\n }\n blockquote {\n padding: 0 2em;\n }\n u {\n text-decoration: underline\n }\n s {\n color: currentColor;\n }\n ",this),this.#q(),A(this,this.#Y.bind(this)),this.contentNode?.addEventListener("click",e=>{e.target instanceof HTMLAnchorElement&&e.stopPropagation()})}static get observedAttributes(){return["readonly","link-target-blank"]}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),o!==t&&("readonly"===e&&this.onReadOnlyChange("true"===o),"link-target-blank"===e&&this.#q())}customUnderlineRenderer(){this.processor.renderer.rules.em_open=(e,t,o,i,r)=>("_"===e[t].markup&&(e[t].tag="u"),this.#H(e,t,o,i,r)),this.processor.renderer.rules.em_close=(e,t,o,i,r)=>("_"===e[t].markup&&(e[t].tag="u"),this.#H(e,t,o,i,r))}#U(){this.linkTargetBlank?this.processor.renderer.rules.link_open=(e,t,o,i,r)=>(e[t].attrSet("target","_blank"),this.#_(e,t,o,i,r)):this.processor.renderer.rules.link_open=this.#_}#G(){this.processor&&this.processor.disable(Fe)}#Z(){this.#G()}#Q(){this.#_=this.processor.renderer.rules.link_open||((e,t,o,i,r)=>r.renderToken(e,t,o)),this.#H=this.processor.renderer.rules.em_open||((e,t,o,i,r)=>r.renderToken(e,t,o))}#q(){this.processor=new i.A("commonmark",{html:!0}),this.#Q(),this.#Z(),this.#U(),this.customUnderlineRenderer()}get linkTargetBlank(){return"true"===this.getAttribute("link-target-blank")}get contentNode(){return this.shadowRoot.querySelector(".content")}#Y(){if(!this.processor)return;let e=(e=>{const t=document.createElement("textarea");return t.innerHTML=e,t.value})(this.innerHTML);!e?.trim()&&this.isConnected?this.setAttribute("empty","true"):this.removeAttribute("empty");try{const t=this.processor.parse(e,{references:void 0});e=this.processor.renderer.render(t,{html:!0,breaks:!0})}catch(e){console.warn("Not parsing invalid markdown token")}this.contentNode.innerHTML=e,this.contentNode.firstChild?.setAttribute("part","content")}onReadOnlyChange(e){e?this.contentNode.setAttribute("inert",e):this.contentNode.removeAttribute("inert")}}const Oe=I(ce({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDisplay:{selector:()=>":host",property:"display",fallback:"inline-block"},hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},fontFamily:{},fontWeight:{},fontWeightBold:[{selector:()=>":host strong",property:"font-weight"},{selector:()=>":host b",property:"font-weight"}],textColor:{property:"color"},textLineHeight:{property:"line-height"},textAlign:{},linkColor:{selector:"a",property:"color"},linkTextDecoration:{selector:"a",property:"text-decoration"},linkHoverTextDecoration:{selector:"a:hover",property:"text-decoration"},minHeight:{},minWidth:{}}}),ce({componentNameOverride:k("link")}),ce({componentNameOverride:k("text")}),pe,he)(We),je=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_.]+/g,"-").toLowerCase(),$e=(...e)=>je(e.filter(e=>!!e).join("-")),_e=(...e)=>t=>e.reduceRight((e,t)=>t(e),t),He=e=>"function"==typeof e,qe="descope",Ye="host",Ue=(e,t,{excludeAttrs:o=[],includeAttrs:i=[]})=>{const r=Array.from(e.attributes).filter(e=>!o.includes(e.name)&&(!i.length||i.includes(e.name))).map(e=>e.name);t(r),new MutationObserver(e=>{e.forEach(e=>{"attributes"!==e.type||o.includes(e.attributeName)||i.length&&!i.includes(e.attributeName)||t([e.attributeName])})}).observe(e,{attributes:!0})},Ge=(e,t)=>{t({addedNodes:Array.from(e.children),removedNodes:[]}),new MutationObserver(e=>{e.forEach(e=>{"childList"!==e.type&&"characterData"!==e.type||t(e)})}).observe(e,{childList:!0,characterData:!0,subtree:!0})},Ze=(e,t,o={})=>i=>{i.forEach(i=>{const r=o[i]||i,n=e.getAttribute(i);t&&(null!==n?t.getAttribute(r)!==n&&t.setAttribute(r,n):t.removeAttribute(r))})},Qe=(e,t,o)=>{Ue(e,Ze(e,t),o),Ue(t,Ze(t,e),o)},Je=e=>$e(qe,e),Ke=(...e)=>`--${$e(...e)}`,Xe=(e,t,o={})=>{Ue(e,Ze(e,t,o.mapAttrs),o)},et=(e,t,o=[])=>{if(!o.length)return;const i=o.reduce((t,o)=>Object.assign(t,{[o]:{get:()=>e[o],set(t){e[o]=t}}}),{});Object.defineProperties(t,i)},tt=.4,ot=.25,it=.1,rt=(e,t)=>e.darken(t).hex(),nt=e=>{const t=e.isDark();return e.mix(d()(t?"white":"black"),1).saturate(1).hex()},st=(e,t)=>e.lightness()<.5?e.lightness(100*t).hex():e.lighten(t).hex(),at=e=>e.luminosity()<.01,lt=e=>e.luminosity()>.99,dt=(e,t)=>"dark"===t?lt(e)?rt(e,ot):st(e,tt):at(e)?st(e,ot):rt(e,tt),ct=(e,t)=>"dark"===t?at(e)?st(e,ot):rt(e,tt):lt(e)?rt(e,ot):st(e,tt),pt=(e,t)=>"dark"===t?at(e)?st(e,it):rt(e,.8):lt(e)?rt(e,it):st(e,.8),ht=(e,t)=>{const o=new(d())(e.main||e);return{main:o.hex(),dark:e.dark||dt(o,t),light:e.light||ct(o,t),highlight:e.highlight||pt(o,t),contrast:e.contrast||nt(o)}},ut=e=>`\n :host {\n padding: calc(var(${e.inputOutlineWidth}) + var(${e.inputOutlineOffset}))\n }\n`,gt=e=>`\n ${e} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,mt=e=>`\n ${e}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,bt=e=>`\n ${e} > label,\n ${e}::part(label),\n ${e}::part(required-indicator) {\n cursor: pointer;\n }\n`,yt=(e,t="input")=>`\n ${e}[disabled] > ${t}:placeholder-shown,\n\t${e}[readonly] > ${t}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,ft=e=>`\n ${e}::part(input-field)::after {\n background: none;\n }\n`,vt=(e,t)=>`\n ${gt(e)}\n ${bt(e)}\n ${yt(e)}\n ${mt(e)}\n ${((e,t)=>`\n ${e} input:-webkit-autofill,\n ${e} input:-webkit-autofill::first-line,\n ${e} input:-webkit-autofill:hover,\n ${e} input:-webkit-autofill:active,\n ${e} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${t.inputValueTextColor});\n box-shadow: 0 0 0 var(${t.inputHeight}) var(${t.inputBackgroundColor}) inset;\n }\n`)(e,t)}\n ${ft(e)}\n ${(e=>`\n ${e}::before {\n\t\theight: unset;\n\t}\n`)(e)}\n ${(e=>`\n ${e} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(e)}\n ${(e=>`\n ${e}::part(input-field)::after {\n border: none;\n }\n`)(e)}\n`,xt=e=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${e} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,Ct=e=>Ke(qe,...e),wt=(e,t,o)=>{const i=Array.isArray(t)?t:t.match(/([^[.\]])+/g);return i.reduce((e,t,r)=>(void 0===e[t]&&(e[t]={}),r===i.length-1&&(e[t]=o),e[t]),e),e},It=(e,t,o)=>Object.entries(e).reduce((e,[i,r])=>r?.constructor!==Object?a()(e,o(t.concat(i),r)):a()(e,It(r,[...t,i],o)),{}),St=e=>{switch(!0){case Array.isArray(e):return e.map(e=>e.includes(" ")?`"${e}"`:e).join(", ");case(e=>{try{return new URL(e),!0}catch(e){return!1}})(e):return`url(${e})`;default:return e}},Mt=(e,t)=>It(e,[],e=>wt({},e,`var(${Ct(e)})`)),At=(e,t="")=>{const o=Object.entries((e=>It(e,[],(e,t)=>({[Ct(e)]:St(t)})))(e)).reduce((e,t)=>`${e}${t.join(":")};\n`,"");return t?`*[data-theme="${t}"] {${o}}`:o},Et="@container",Tt="$breakpoints",kt=e=>e.startsWith("$breakpoints."),zt=e=>Object.entries(e).reduce((e,[t,o])=>(e=>e.startsWith(Et))(t)?`${e}${t} {\n${zt(o)}}\n\n`:`${e}${t} { \n${Object.entries(o).map(([e,t])=>`${e}: ${t}`).join(";\n")} \n}\n\n`,""),Lt=e=>{const t=(e=>It(e,[],(t,o)=>{const[i,...r]=t;if(r[0]===Tt)return{};const n=r.pop(),s=Je(i);"undefined"===n&&console.warn(s,`theme value: "${o}" is mapped to an invalid property`);const a=Ye,l=e[i]?.[Tt]||{},d=r.filter(kt),c=d.find(e=>!l[e.slice(13)]);if(c)return console.warn(s,`theme references undefined breakpoint "${c}"`),{};const p=d.map(e=>kt(e)?`${Et} ${l[e.slice(13)]}`:e);r.splice(0,r.length,...r.filter(e=>!kt(e)));const h=r.reduce((e,t,o)=>{const[i,n]=function(e){const t=e.match(/^(&+)?(.*)$/);return[t[1]||"",t[2]||""]}(t),s=Math.min(i.length+1,3);if(n.startsWith("_"))return e+`[${je(n.replace(/^_/,""))}="true"]`.repeat(s);const a=r[o+1];return"string"!=typeof a||a.startsWith("_")||a.startsWith("&")?(console.error("theme generator",`your theme structure is invalid, attribute "${t}" is followed by "${a}" which is not allowed`),e):e+`[${je(n)}="${r.splice(o+1,1).join("")}"]`.repeat(s)},""),u=":host"+(h?`(${h})`:""),g=p.reduceRight((e,t)=>({[t]:e}),{[u]:{[n]:St(o)}});return{[s]:{[a]:g}}}))(e);return Object.keys(t).reduce((e,o)=>{const i=t[o];return Object.assign(e,{[o]:Object.keys(i).reduce((e,t)=>Object.assign(e,{[t]:zt(i[t])}),{})})},{})},Vt=({globals:e,components:t},o)=>({globals:At(e,o),components:Lt(t)}),Nt=(...e)=>e.reduceRight((e,t)=>t.startsWith("--")?`var(${t}${e?`, ${e}`:e})`:`${t}${e?`, ${e}`:e}`,""),Dt=(e,t)=>{const o=It(e,[],(e,o)=>{const i=[...e],r=i.splice(-1),n=Ke(t,r),s={[r]:n},a={[r]:Nt(n)};return{theme:wt({},[...i,n],o),useVars:a,vars:s}});return[o.theme,o.useVars,o.vars]},Pt=e=>`${e}__override`,Bt=(e,t,o=!1)=>{const i=`var(${e}${t?`, ${t}`:""})`;return o?`var(${Pt(e)}, ${i})`:i};class Ft{constructor(){this.styleMap=new Map}add(e,t,o){this.styleMap.has(e)||this.styleMap.set(e,[]),this.styleMap.set(e,[...this.styleMap.get(e),{property:t,value:o}])}toString(){return Array.from(this.styleMap.entries()).reduce((e,[t,o])=>{const i=o.map(({property:e,value:t})=>`${e}: ${t}`).join(";\n");return`${e}${t} { \n${i} \n}\n\n`},"")}}const Rt=(e,t="fallback")=>$e(e,t),Wt=(e,t,{fallback:o})=>{if(!o)return{};const i=Rt(t,o.suffix),r=((...e)=>e.filter(Boolean).map((e,t)=>{return 0===t?e:(o=e).charAt(0).toUpperCase()+o.slice(1);var o}).join(""))(e,o.suffix||"fallback");return{[r]:i,...Wt(r,i,o)}},Ot=(e,t)=>Object.keys(t).reduce((o,i)=>{const r=Ke(e,i);return Object.assign(o,{[i]:r},{[`${i}Override`]:Pt(r)},Wt(i,r,t[i]))},{}),jt=({mappings:e={},componentNameOverride:t=""})=>o=>{const i=t||o.componentName;return class t extends o{static get cssVarList(){return{...o.cssVarList,...Ot(i,{...e})}}#r;#n;#s;#a;#l;#d;#c;#p;#h;constructor({getRootElement:e,componentNameSuffix:o="",themeSection:i=Ye,baseSelector:r}={}){super(),this.#a=o,this.#l=i,this.#c=r??this.baseSelector,this.#h=e,this.#p=Object.keys(t.cssVarList).map(e=>$e("st",o,e))}get#u(){return B.currentTheme?.[i]||""}#g(){this.#n.replaceSync(this.#u[this.#l])}#m(){this.#n=V("",this.#d,{prepend:!0}),this.#s=B.onCurrentThemeChange(this.#g.bind(this)),this.#g()}#b(){if(this.#p.length){let e=`.${i}`.repeat(5);const t=this.getAttribute("id");t&&(e+=`#${CSS.escape(t)}`),this.#r=V(`:host(${e}) {}`,this.#d)}}#y(e,t){const{style:o}=this.#r.cssRules[0];if(!o)return;const r=Ke(i,e.replace(new RegExp("^st-"),""));t?o?.setProperty(r,t):(o?.removeProperty(r),this.removeAttribute(e))}#f(e=[]){e.forEach(e=>{this.#p.includes(e)&&this.#y(e,this.getAttribute(e))})}#v(){if(Object.keys(e).length){const t=((e,t,o)=>{const i=new Ft,r=(e,t)=>{if(!e)return"";if("string"==typeof e)return e;const o=Rt(t,e?.suffix);return Bt(o,r(e.fallback,o))};return Object.keys(o).forEach(n=>{const s=((e,t)=>{const o={selector:"",property:je(e)};return t&&Object.keys(t).length?Array.isArray(t)?t.map(e=>({...o,...e})):[{...o,...t}]:[o]})(n,o[n]),a=Ke(e,n);s.forEach(({selector:e,property:o,important:n,fallback:s})=>{const l=r(s,a);i.add(((e="",t="")=>He(t)?t(e):`${e}${/^[A-Za-z]/.test(t)?` ${t}`:t}`)(t,e),He(o)?o():o,Bt(a,l,!0)+(n?"!important":""))})}),i.toString()})($e(i,this.#a),this.#c,e);V(t,this.#d,{prepend:!0})}}#x(e){(this.#d.classList||this.#d.host.classList).add(e)}async init(){super.init?.(),this.shadowRoot?.isConnected&&(this.#d=await(this.#h?.(this))||this.shadowRoot,this.#x(i),this.#v(),this.#m(),this.#b(),Ue(this,this.#f.bind(this),{}))}disconnectedCallback(){super.disconnectedCallback?.(),this.#s?.()}}},$t=e=>class extends e{constructor(){super(),V(':host([draggable="true"]) * { cursor: inherit!important }',this)}get isDraggable(){return this.hasAttribute("draggable")&&"false"!==this.getAttribute("draggable")}init(){this.addEventListener("mousedown",e=>{if(this.isDraggable){const t=this.baseElement.getAttribute("tabindex");this.baseElement.setAttribute("tabindex","-1");const o=()=>{t?this.baseElement.setAttribute("tabindex",t):this.baseElement.removeAttribute("tabindex"),e.target.removeEventListener("mouseup",o),e.target.removeEventListener("dragend",o)};e.target.addEventListener("mouseup",o,{once:!0}),e.target.addEventListener("dragend",o,{once:!0})}}),super.init?.()}},_t=e=>class extends e{#C(){const t=this.localName;if(!e.componentName)throw Error('component name is not defined on super class, make sure you have a static get for "componentName"');if(t!==e.componentName)throw Error(`component name mismatch, expected "${e.componentName}", current "${t}"`)}init(){super.init?.(),this.#C()}},Ht=e=>class extends e{updateComponentsContext(e){this.dispatchEvent(new CustomEvent("components-context",{bubbles:!0,composed:!0,detail:e}))}},qt=e=>class extends e{init(){super.init?.(),(this.baseElement||this).addEventListener("mouseover",e=>{this.setAttribute("hover","true"),e.target.addEventListener("mouseleave",()=>this.removeAttribute("hover"),{once:!0})})}},Yt=["readonly","focused","invalid","has-label","required","disabled","checked","has-helper","has-value","step-buttons-visible","hover","has-error-message","focus-ring","opened","active","password-visible","opening","closing","has-no-options","loading","allow-custom-value","loading"],Ut=e=>class extends e{init(){super.init?.(),Ue(this,e=>e.forEach(e=>{const t=this.getAttribute(e);(e=>Yt.includes(e))(e)?""===t?this.setAttribute(e,"true"):"false"===t&&this.removeAttribute(e):t||console.debug(`attribute "${e}" has no value, should it be added to the boolean attributes list?`)}),{})}},Gt=({componentName:e,baseSelector:t=""})=>{class o extends HTMLElement{static get componentName(){return e}#w;#I=!0;get baseSelector(){return t}get baseElement(){return this.#w??=this.baseSelector?this.rootElement.querySelector(this.baseSelector):this,this.#w||console.warn("missing base element for component",this.localName),this.#w}get rootElement(){return this.shadowRoot||this}get name(){return this.getAttribute("name")}connectedCallback(){super.connectedCallback?.(),this.rootElement.isConnected&&this.#I&&(this.#I=!1,this.init?.())}}return _e(_t,qt,Ut,Ht)(o)};function Zt(e,t={}){const o=new Event(e,t);this[`on${e}`]?.(o),this.dispatchEvent(o)}const Qt=({componentName:e,wrappedEleName:t,slots:o=[],style:i,excludeAttrsSync:r=[],includeAttrsSync:n=[],includeForwardProps:s=[],delegatesFocus:a=!0})=>{class l extends(Gt({componentName:e,baseSelector:t})){#z=Zt.bind(this,"blur");#L=Zt.bind(this,"focus");constructor(){super().attachShadow({mode:"open",delegatesFocus:a}).innerHTML=`\n\t\t\t<${t}>\n\t\t\t${o.map(e=>`<slot ${e?`name="${e}" slot="${e}"`:""}></slot>`).join("")}\n\t\t\t</${t}>\n\t\t`,V((He(i)?i():i)||"",this)}init(){super.init?.(),this.baseElement.addEventListener("blur",e=>{this.#z()}),this.baseElement.addEventListener("focus",e=>{this.#L()}),et(this.baseElement,this,s),Qe(this.baseElement,this,{excludeAttrs:r,includeAttrs:n})}}return l},Jt=["required","pattern"],Kt=Symbol("validationTarget"),Xt=e=>class extends e{#A=Kt;static get observedAttributes(){return[...e.observedAttributes||[],...Jt]}static get formAssociated(){return!0}#E;get internals(){return this.#E}set internals(e){this.#E=e}constructor(){super(),this.#E=this.attachInternals()}get defaultErrorMsgValueMissing(){return"Please fill out this field."}get defaultErrorMsgPatternMismatch(){return"Please match the requested format."}get defaultErrorMsgTooShort(){return`Minimum length is ${this.getAttribute("minlength")}.`}get defaultErrorMsgTooLong(){return`Maximum length is ${this.getAttribute("maxlength")}. `}get defaultErrorMsgRangeUnderflow(){return`At least ${this.getAttribute("min-items-selection")} items are required.`}get defaultErrorMsgRangeOverflow(){return`At most ${this.getAttribute("max-items-selection")} items are allowed.`}get defaultErrorMsgTypeMismatch(){return"Please match the requested type."}getCustomErrorMessage(e,t){return this.hasAttribute(e)?this.getAttribute(e)||" ":t}getErrorMessage(e){const{valueMissing:t,patternMismatch:o,typeMismatch:i,stepMismatch:r,tooShort:n,tooLong:s,rangeOverflow:a,rangeUnderflow:l,badInput:d,customError:c}=e;switch(!0){case t:return this.getCustomErrorMessage("data-errormessage-value-missing",this.defaultErrorMsgValueMissing);case o||r||d:return this.getCustomErrorMessage("data-errormessage-pattern-mismatch",this.defaultErrorMsgPatternMismatch);case i:return this.getCustomErrorMessage("data-errormessage-type-mismatch",this.defaultErrorMsgTypeMismatch);case n:return this.getCustomErrorMessage("data-errormessage-pattern-mismatch-too-short",this.defaultErrorMsgTooShort);case s:return this.getCustomErrorMessage("data-errormessage-pattern-mismatch-too-long",this.defaultErrorMsgTooLong);case l:return this.getCustomErrorMessage("data-errormessage-pattern-range-underflow",this.defaultErrorMsgRangeUnderflow);case a:return this.getCustomErrorMessage("data-errormessage-pattern-range-overflow",this.defaultErrorMsgRangeOverflow);case c:return this.validationMessage;default:return""}}#T(){const e=this.isReadOnly?{}:this.getValidity();this.#E.setValidity(e,this.getErrorMessage(e),this.validationTarget)}get validationMessage(){return this.#E.validationMessage}getValidity(){console.warn("getValidity","is not implemented")}checkValidity(){return this.#E.validity.valid}reportValidity(){return this.#E.reportValidity()}get validity(){return this.#E.validity}get validationTarget(){return this.#A===Kt?this.inputElement:this.#A}set validationTarget(e){this.#A=e}setCustomValidity(e){e?this.#E.setValidity({customError:!0},e,this.validationTarget):(this.#E.setValidity({}),this.#T())}get isRequired(){return this.hasAttribute("required")&&"false"!==this.getAttribute("required")}get isReadOnly(){return this.hasAttribute("readonly")&&"false"!==this.getAttribute("readonly")}get isDisabled(){return this.hasAttribute("disabled")&&"false"!==this.getAttribute("disabled")}get pattern(){return this.getAttribute("pattern")}get form(){return this.#E.form}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),Jt.includes(e)&&this.#T()}init(){super.init?.(),this.addEventListener("change",this.#T),this.addEventListener("invalid",e=>e.stopPropagation()),this.addEventListener("input",this.#T),setTimeout(()=>this.#T())}},eo=["invalid","required"],to=e=>{if(!e)return;let t=e;for(let e=0;e<10;e++)if([t]=t.assignedElements(),"slot"!==t?.localName)return t},oo=({proxyProps:e=[],useProxyTargets:t=!1,inputEvent:o="input",triggerValidationEvents:i=[],proxyParentValidation:r=!1})=>n=>class extends(Xt(n)){static get observedAttributes(){return[...n.observedAttributes||[],...eo]}#V;#S=Zt.bind(this,"change");constructor(){super(),this.#V=super.inputElement}warnIfInputElementIsMissing(){clearTimeout(this.inputElementTimerId),this.inputElementTimerId=setTimeout(()=>{!this.#V&&console.warn(this.localName,"no input was found")},0)}get inputElement(){if(this.#V)return this.#V;this.warnIfInputElementIsMissing();const e=this.baseElement.shadowRoot?.querySelector('slot[name="input"]'),t=this.baseElement.shadowRoot?.querySelector('slot[name="textarea"]');return this.#V=to(e)||to(t),this.#V}set inputElement(e){this.#V=e}getValidity(){return this.inputElement?.validity||{}}#N(){this.setAttribute("error-message",this.validationMessage)}reportValidity=()=>{this.inputElement.setCustomValidity(""),this.setCustomValidity(""),this.checkValidity()||(this.setAttribute("invalid","true"),this.#N(),this.focus())};defaultReportValidity(){return super.reportValidity()}init(){if(super.init?.(),this.baseElement._setInvalid=function(e){!e&&this._shouldSetInvalid(e)&&(this.invalid=e)},this.baseElement.addEventListener("input",e=>{e.composed||this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))}),i.forEach(e=>{this.baseElement?.addEventListener(e,()=>{this.inputElement?.setCustomValidity("")})}),setTimeout(()=>{(Array.isArray(o)?o:[o]).forEach(e=>{this.baseElement?.addEventListener(e,()=>{this.baseElement.checkValidity()?this.removeAttribute("invalid"):this.#N()})}),this.baseElement.addEventListener("change",()=>{this.#S()}),this.addEventListener("invalid",()=>{this.checkValidity()||this.setAttribute("invalid","true"),this.#N()}),e.forEach(e=>{const o=this.querySelector('input[slot="external-input"]')||null,i=t?[this.baseElement,o].filter(Boolean):[];((e,t,o)=>{const i=Array.isArray(t)?t:[t];Object.defineProperty(e,o,{set(e){i.forEach(t=>{t[o]=e})},get:()=>t[0][o],configurable:!0})})(this,[this.inputElement,...i],e)}),this.setSelectionRange=this.inputElement?.setSelectionRange?.bind(this.inputElement),Xe(this,this.inputElement,{includeAttrs:["inputmode"]})}),r){const e=this.inputElement.internals,t=this;this.inputElement.internals=new Proxy(e,{get:(e,o)=>"function"==typeof e[o]&&"setValidity"===o?(...i)=>{if(3===i.length){const e=i.slice(0,i.length-1);e.push(t.inputElement),t.internals[o](...e)}else t.internals[o](...i);return e[o](...i)}:"function"==typeof e[o]?(...i)=>(t.internals[o](...i),e[o](...i)):e[o]})}}},io=e=>_e(oo(e),jt({componentNameOverride:Je("input-wrapper")})),ro=({name:e,selector:t,mappings:o={},forward:{attributes:i=[],include:r=!0}={}})=>t=>{const n=e,s=jt({mappings:o})(t);return class extends s{static get cssVarList(){return{...s.cssVarList,[n]:Ot($e(t.componentName,"_"+n),o)}}#D;constructor(){const e=(t=async e=>(e.shadowRoot||e).querySelector(e.baseSelector),async e=>{const o=await t(e);return new Promise(e=>{let t=0;const i=()=>{if(t>20)return console.error("could not get shadow root for element",o),void e(o);t++,o?.shadowRoot?e(o.shadowRoot):setTimeout(i)};i()})});var t;super({getRootElement:e,componentNameSuffix:"_"+n,themeSection:"_"+n,baseSelector:""}),this.#P=()=>e(this).then(e=>e?.host||e)}#P;async#B(){const e=await this.#D;e.onmouseenter=e=>{e.target.setAttribute("hover","true")},e.onmouseleave=e=>{e.target.removeAttribute("hover")}}async init(){super.init?.(),this.#D=this.#P();const e=await this.#D;Xe(this,e,{[r?"includeAttrs":"excludeAttrs"]:i}),this.#B()}}},no=e=>class extends e{#S=Zt.bind(this,"change");init(){super.init?.(),this.prevValue=this.value,this.addEventListener("change",e=>{e.stopPropagation()}),this.addEventListener("blur",()=>{this.value!==this.prevValue&&(this.#S(),this.prevValue=this.value)})}},so=e=>class extends e{init(){this.#M(),super.init?.()}#M(){["blur","focus","focusin","focusout"].forEach(e=>{this.addEventListener(e,e=>{e.isTrusted&&e.target===this&&e.stopImmediatePropagation()})})}handleFocusEventsDispatching(e){let t;e?.forEach(e=>{e?.addEventListener("focusout",e=>{e.stopImmediatePropagation(),t=setTimeout(()=>{t=null,Zt.call(this,"blur"),Zt.call(this,"focusout",{bubbles:!0})})});const o=e=>{e.stopImmediatePropagation(),clearTimeout(t),t||(Zt.call(this,"focus"),Zt.call(this,"focusin",{bubbles:!0}))};e?.addEventListener("focusin",o),e?.addEventListener("focus",o)})}handleInputEventDispatching(){let e=this.value;this.addEventListener("input",t=>{this!==t.target&&(t.stopImmediatePropagation(),e!==this.value&&(e=this.value,Zt.call(this,"input",{bubbles:!0,composed:!0})))})}},ao=({inputType:e,inputName:t,autocompleteType:o,includeAttrs:i=[],noBlurDispatch:r=!1})=>n=>class extends n{#J=[];get isExternalInput(){return"true"===this.getAttribute("external-input")}createExternalInput(){if(!this.isExternalInput||this.isReadOnly||this.isDisabled)return null;const o=this.baseElement.querySelector("input");if(!o)return null;o.setAttribute("tabindex","-1");const r=(()=>{const e=document.createElement("slot");return e.setAttribute("name","external-input"),e.setAttribute("slot","suffix"),e})();return this.baseElement.appendChild(r),this.externalInput=((e,t,o,i)=>{const r=document.createElement("input");return r.setAttribute("slot","external-input"),r.setAttribute("type",t),r.setAttribute("name",i),r.setAttribute("data-hidden-input","true"),r.setAttribute("autocomplete",o),r})(0,e,this.getAutocompleteType(),t),setTimeout(()=>{var e,t,i;e=o,t=this.externalInput,i=this.getAttribute("label-type"),setTimeout(()=>{const o=getComputedStyle(e),r=o.getPropertyValue("height"),n=o.getPropertyValue("padding-left"),s=o.getPropertyValue("padding-right"),a=o.getPropertyValue("font-size"),l=o.getPropertyValue("font-family"),d=o.getPropertyValue("letter-spacing"),c=o.getPropertyValue("caret-color"),p=((e,t)=>{const o=e.value;e.value="_";const i=t.getPropertyValue("color");return"_"===e.value&&(e.value=o),i})(e,o);if([["all","unset"],["position","absolute"],["background-color","transparent"],["height",r],["left",n],["right",s],["font-size",a],["font-family",l],["letter-spacing",d],["caret-color",c],["color",p]].forEach(([e,o])=>t.style.setProperty(e,o,"important")),"floating"===i){const e=o.getPropertyValue("margin-bottom");t.style.setProperty("margin-bottom",e,"important")}const h=o.getPropertyValue("width");t.style.setProperty("width",`calc(${h} - ${n} - ${s}`,"important")},0)}),this.forwardInputValue(o,this.externalInput),Qe(o,this.externalInput,{includeAttrs:i}),this.baseElement.querySelector("input").addEventListener("focusout",e=>e.stopImmediatePropagation(),!0),this.handleFocusEvents(),this.handleBlurEvents(),this.handlelInputEvents(this.externalInput),this.appendChild(this.externalInput),this.externalInput}clearBlurTimers(){this.#J.forEach(e=>clearTimeout(e)),this.#J.length=0}dispatchBlur(){return setTimeout(()=>{this.dispatchEvent(new Event("blur",{bubbles:!0,composed:!0})),this.removeAttribute("focused")})}handleFocusEvents(){this.baseElement.addEventListener("focus",()=>{this.externalInput.focus(),this.clearBlurTimers()}),this.externalInput.addEventListener("focus",()=>{this.clearBlurTimers(),setTimeout(()=>this.baseElement.setAttribute("focused","true"))})}handleBlurEvents(){this.baseElement.addEventListener("blur",e=>{e.stopImmediatePropagation(),r||this.#J.push(this.dispatchBlur())},!0),this.externalInput.addEventListener("blur",e=>{e.stopImmediatePropagation(),this.#J.push(this.dispatchBlur())},!0)}handlelInputEvents(e){e.addEventListener("input",e=>{this.value=e.target.value}),e.addEventListener("input",e=>{e.target.value?this.setAttribute("has-value","true"):this.removeAttribute("has-value")})}getAutocompleteType(){return this.getAttribute("autocomplete")||o}forwardInputValue(e,t){const o=Object.getOwnPropertyDescriptor(this.inputElement.constructor.prototype,"value");Object.defineProperty(e,"value",{...o,set(e){o.set.call(this,e),t.value=e},configurable:!0})}},lo=e=>class extends e{init(){super.init?.(),this.baseElement._hasValidConstraints&&(this.baseElement._hasValidConstraints=()=>!0)}},co=(...e)=>_e(Xt,no,Ut,so)(Gt(...e)),po=Je("boolean-field-internal"),ho=["disabled","invalid","readonly"],uo=co({componentName:po,baseSelector:"div"}),go=e=>class extends e{init(){super.init?.();const e=document.createElement("template");e.innerHTML=`\n\t\t\t\t<${po}\n\t\t\t\t\ttabindex="-1"\n\t\t\t\t\tslot="input"\n\t\t\t\t></${po}>\n\t\t\t`,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(po),this.checkbox=this.inputElement.querySelector("vaadin-checkbox"),Xe(this,this.inputElement,{includeAttrs:["required","full-width","size","label","invalid","disabled","readonly"]}),et(this.inputElement,this,["checked"]),Qe(this,this.inputElement,{includeAttrs:["checked"]})}};var mo=e=>`\n:host {\n\tdisplay: inline-flex;\n}\n\n\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n\n\n.wrapper {\n\tdisplay: flex;\n\tbox-sizing: border-box;\n}\nvaadin-text-field {\n\tposition: relative;\n\tpadding: 0;\n\tdisplay: inline-flex;\n\talign-items: flex-start;\n}\nvaadin-text-field::before {\n content: unset;\n}\nvaadin-text-field::part(label) {\n position: absolute;\n top: 0;\n}\nvaadin-text-field::part(input-field) {\n\tpadding: 0;\n\tbackground: none;\n\tmin-height: 0;\n}\nvaadin-text-field::part(input-field)::after {\n background: none;\n}\nvaadin-text-field[focus-ring]::part(input-field) {\n\tbox-shadow: none;\n}\n\nvaadin-checkbox [slot="label"] {\n align-self: flex-start;\n padding: 0;\n}\n[required] vaadin-checkbox [slot="label"]:not(:empty) {\n\tpadding-inline-end: 1em;\n}\ndescope-boolean-field-internal {\n -webkit-mask-image: none;\n min-height: initial;\n}\n\ndescope-enriched-text[empty] {\n\t${Oe.cssVarList.hostDisplay}: none;\n}\n\ndescope-enriched-text {\n\t${Oe.cssVarList.hostDirection}: var(${e.hostDirection});\n}\n\n`;const bo=Je("checkbox"),{host:yo,component:fo,checkboxElement:vo,checkboxSurface:xo,checkboxLabel:Co,requiredIndicator:wo,helperText:Io,errorMessage:So}={host:{selector:()=>":host"},requiredIndicator:{selector:'[required] vaadin-checkbox [slot="label"]:not(:empty)::part(content)::after'},component:{selector:"vaadin-checkbox"},checkboxElement:{selector:"vaadin-checkbox::part(checkbox)"},checkboxSurface:{selector:"vaadin-checkbox::part(checkbox)::after"},checkboxLabel:{selector:'vaadin-checkbox [slot="label"]:not(:empty)'},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},Mo=_e(jt({mappings:{hostWidth:{...yo,property:"width"},hostDirection:{...yo,property:"direction"},fontSize:[yo,vo,Co],fontFamily:[Co,Io,So],labelTextColor:{...Co,property:"color"},labelSpacing:{...Co,property:"padding-inline-start"},labelLineHeight:{...Co,property:"line-height"},labelFontWeight:{...Co,property:"font-weight"},labelRequiredIndicator:{...wo,property:"content"},errorMessageTextColor:{...So,property:"color"},errorMessageIcon:{...So,property:"background-image"},errorMessageIconSize:{...So,property:"background-size"},errorMessageIconPadding:{...So,property:"padding-inline-start"},errorMessageIconRepeat:{...So,property:"background-repeat"},errorMessageIconPosition:{...So,property:"background-position"},errorMessageFontSize:{...So,property:"font-size"},inputValueTextColor:{...xo,property:"color"},inputBackgroundColor:{...vo,property:"background-color"},inputBorderRadius:{...vo,property:"border-radius"},inputBorderWidth:{...vo,property:"border-width"},inputBorderOffset:{...vo,property:"border-offset"},inputBorderColor:{...vo,property:"border-color"},inputBorderStyle:{...vo,property:"border-style"},inputOutlineWidth:{...vo,property:"outline-width"},inputOutlineOffset:{...vo,property:"outline-offset"},inputOutlineColor:{...vo,property:"outline-color"},inputOutlineStyle:{...vo,property:"outline-style"},inputAlign:{...vo,property:"align-self"},inputContainerPadding:{...fo,property:"padding"},inputContainerBackgroundColor:{...fo,property:"background-color"},inputContainerBorderRadius:{...fo,property:"border-radius"},inputContainerBorderWidth:{...fo,property:"border-width"},inputContainerBorderColor:{...fo,property:"border-color"},inputContainerBorderStyle:{...fo,property:"border-style"},inputContainerOutlineWidth:{...fo,property:"outline-width"},inputContainerOutlineOffset:{...fo,property:"outline-offset"},inputContainerOutlineColor:{...fo,property:"outline-color"},inputContainerOutlineStyle:{...fo,property:"outline-style"},inputSize:[{...vo,property:"width"},{...vo,property:"height"},{...xo,property:"font-size"},{...fo,property:"font-size"}]}}),$t,io({proxyProps:["value","selectionStart"]}),_t,go)(Qt({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t${mo(Mo.cssVarList)}\n ${ut(Mo.cssVarList)}\n\n :host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n }\n\n :host ::part(error-message) {\n direction: ltr;\n }\n\n vaadin-text-field {\n width: 100%;\n }\n\n descope-boolean-field-internal {\n\t\t\t\tpadding: 2px;\n\t\t\t\twidth: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n\n :host([full-width]) vaadin-checkbox {\n flex-grow: 1;\n }\n\n vaadin-checkbox::part(checkbox) {\n margin: 0;\n }\n\n vaadin-checkbox::part(checkbox)::after {\n top: 0;\n left: 0;\n -webkit-text-fill-color: initial;\n }\n\n vaadin-checkbox label {\n -webkit-text-fill-color: initial;\n }\n\n vaadin-text-field::part(input-field)::after {\n content: none;\n }\n `,excludeAttrsSync:["label","tabindex","style"],componentName:bo})),Ao=k("text");class Eo extends(ye({componentName:Ao,baseSelector:":host > slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <slot part="text-wrapper"></slot>\n ',V("\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n ",this)}get hideWhenEmpty(){return"true"===this.getAttribute("hide-when-empty")}init(){super.init(),A(this,()=>{const e=!!this.childNodes.length;this.style.display=!e&&this.hideWhenEmpty?"none":""})}}const{host:To}={host:{selector:()=>":host"}},ko=I(ce({mappings:{hostWidth:{...To,property:"width"},hostDirection:{...To,property:"direction"},fontSize:{},textColor:[{property:"color"}],textLineHeight:{property:"line-height"},textLetterSpacing:{property:"letter-spacing"},textShadow:{},textAlign:{},textTransform:{},fontFamily:{},fontStyle:{},fontWeight:{},borderWidth:{},borderStyle:{},borderColor:{}}}),pe,he)(Eo),zo=k("link"),Lo=["href","readonly"];class Vo extends(ye({componentName:zo,baseSelector:":host a"})){static get observedAttributes(){return Lo.concat(super.observedAttributes||[])}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n\t\t<div>\n\t\t\t<descope-text part="wrapper">\n\t\t\t\t<a>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</a>\n\t\t\t</descope-text>\n\t\t</div>\n\t\t',V('\n :host {\n\t\t\tdisplay: inline-block;\n line-height: 1em;\n\t\t}\n\t\t:host a {\n\t\t\tdisplay: inline;\n\t\t}\n\n :host([ellipsis="true"]) descope-text {\n display: inline-flex;\n }\n :host([ellipsis="true"]) descope-text::part(text-wrapper) {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n ',this),this.anchor=this.shadowRoot.querySelector("a"),L(this,this.anchor,{includeAttrs:["href","target","tooltip"],mapAttrs:{tooltip:"title"}}),L(this,this.shadowRoot.querySelector("descope-text"),{includeAttrs:["mode","variant"]}),this.anchor.addEventListener("click",e=>{this.readOnly&&e.preventDefault()})}get readOnly(){return"true"===this.getAttribute("readonly")}}const No={host:{selector:()=>":host"},link:{selector:()=>":host a"},anchor:{},wrapper:{selector:()=>":host > div"},text:{selector:()=>ko.componentName}},{anchor:Do,text:Po,host:Bo,wrapper:Fo,link:Ro}=No,Wo=I(ce({mappings:{hostWidth:{...Bo,property:"width"},hostDirection:{...Po,property:"direction"},textAlign:Fo,textDecoration:{...Ro,property:"text-decoration",fallback:"none"},textColor:[{...Do,property:"color"},{...Po,property:ko.cssVarList.textColor}],cursor:Do}}),pe,he)(Vo);customElements.define(Ao,ko),customElements.define(zo,Wo),customElements.define(Re,Oe),customElements.define(po,class extends uo{static get observedAttributes(){return["readonly","label"]}constructor(){super(),this.innerHTML='\n\t\t\t<div class="wrapper">\n\t\t\t\t<vaadin-checkbox>\n\t\t\t\t\t<descope-enriched-text link-target-blank="true" class="label-content" slot="label"></descope-enriched-text>\n\t\t\t\t</vaadin-checkbox>\n\t\t\t</div>\n\t\t',this.wrapperEle=this.querySelector("div"),this.checkbox=this.querySelector("vaadin-checkbox"),this.labelContent=this.querySelector(".label-content")}get value(){return this.checkbox?.checked}set value(e){this.checkbox.checked=e}get checked(){return this.value}set checked(e){this.value=e}init(){this.addEventListener("focus",e=>{e.isTrusted&&this.checkbox.focus()}),super.init?.(),Xe(this,this.checkbox,{includeAttrs:ho}),Qe(this,this.checkbox,{includeAttrs:["checked"]}),this.labelContent.addEventListener("click",e=>{this.hasAttribute("disabled")||this.hasAttribute("readonly")||this.checkbox.click()}),this.handleFocusEventsDispatching([this.checkbox])}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),"readonly"===e&&this.onReadOnlyChange(null!==o),"label"===e&&this.onLabelChange()}onLabelChange(){const e=this.getAttribute("label");this.labelContent.textContent=e||""}onReadOnlyChange(e){this.baseElement.setAttribute("inert",e)}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:{}}}),customElements.define(bo,Mo);const Oo=Je("switch-toggle"),{host:jo,component:$o,checkboxElement:_o,checkboxSurface:Ho,checkboxLabel:qo,requiredIndicator:Yo,helperText:Uo,errorMessage:Go}={host:{selector:()=>":host"},requiredIndicator:{selector:'[required] vaadin-checkbox [slot="label"]:not(:empty)::part(content)::after'},component:{selector:"vaadin-checkbox"},checkboxElement:{selector:"vaadin-checkbox::part(checkbox)"},checkboxSurface:{selector:"vaadin-checkbox::part(checkbox)::after"},checkboxLabel:{selector:'vaadin-checkbox [slot="label"]:not(:empty)'},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},Zo=_e(jt({mappings:{hostWidth:{...jo,property:"width"},hostDirection:{...jo,property:"direction"},fontSize:[$o,qo,qo],fontFamily:[qo,Uo,Go],labelTextColor:[{...qo,property:"color"},{...qo,property:"-webkit-text-fill-color"}],labelSpacing:{...qo,property:"padding-inline-start"},labelLineHeight:{...qo,property:"line-height"},labelFontWeight:{...qo,property:"font-weight"},labelRequiredIndicator:{...Yo,property:"content"},errorMessageTextColor:{...Go,property:"color"},errorMessageIcon:{...Go,property:"background-image"},errorMessageIconSize:{...Go,property:"background-size"},errorMessageIconPadding:{...Go,property:"padding-inline-start"},errorMessageIconRepeat:{...Go,property:"background-repeat"},errorMessageIconPosition:{...Go,property:"background-position"},errorMessageFontSize:{...Go,property:"font-size"},trackBorderWidth:{..._o,property:"border-width"},trackBorderStyle:{..._o,property:"border-style"},trackBorderColor:{..._o,property:"border-color"},trackBackgroundColor:{..._o,property:"background-color"},trackBorderRadius:{..._o,property:"border-radius"},trackWidth:[{..._o,property:"width"}],trackHeight:[{...Ho,property:"font-size"},{..._o,property:"height"}],knobSize:[{...Ho,property:"width"},{...Ho,property:"height"}],knobTextColor:{...Ho,property:"color"},knobRadius:{...Ho,property:"border-radius"},knobTransitionDuration:{...Ho,property:"transition"},knobColor:{...Ho,property:"background-color"},knobTopOffset:{...Ho,property:"top"},knobLeftOffset:{...Ho,property:"left"},inputOutlineWidth:{..._o,property:"outline-width"},inputOutlineOffset:{..._o,property:"outline-offset"},inputOutlineColor:{..._o,property:"outline-color"},inputOutlineStyle:{..._o,property:"outline-style"}}}),$t,io({proxyProps:["value","selectionStart"]}),_t,go)(Qt({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t${mo(Zo.cssVarList)}\n\t\t\t${ut(Zo.cssVarList)}\n\n :host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n }\n\n :host ::part(error-message) {\n direction: ltr;\n }\n\n vaadin-text-field {\n width: 100%;\n }\n\n vaadin-text-field::part(input-field)::after {\n content: none;\n }\n\n descope-boolean-field-internal {\n\t\t\t\tpadding: 0;\n width: 100%;\n }\n\n vaadin-text-field::part(input-field) {\n cursor: pointer;\n }\n\n vaadin-checkbox {\n cursor: pointer;\n }\n\n vaadin-checkbox [slot="label"]:not(:empty) {\n cursor: pointer;\n\t\t\t}\n\n vaadin-checkbox::part(checkbox) {\n margin: 0;\n\t\t\t}\n\n vaadin-checkbox::part(checkbox)::before {\n content: '';\n\t\t\t}\n\n vaadin-checkbox[active]::part(checkbox) {\n\t\t\t\ttransform: none;\n\t\t\t}\n\n vaadin-checkbox::part(checkbox)::after {\n\t\t\t\tposition: absolute;\n\t\t\t\topacity: 1;\n\t\t\t\tcontent: '';\n\t\t\t}\n\t\t`,excludeAttrsSync:["label","tabindex","style"],componentName:Oo}));customElements.define(Oo,Zo);const Qo=Je("loader-linear");class Jo extends(Gt({componentName:Qo,baseSelector:":host > div"})){static get componentName(){return Qo}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<div></div>\n\t",V("\n @keyframes tilt {\n\t\t\t\t0% { transform: translateX(0); }\n\t\t\t\t50% { transform: translateX(400%); }\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tposition: relative;\n\t\t\t\tdisplay: flex;\n\t\t\t}\n\t\t\tdiv::after {\n\t\t\t\tcontent: '';\n\t\t\t\tanimation-name: tilt;\n\t\t\t\tposition: absolute;\n\t\t\t\tleft: 0;\n\t\t\t}\n\t\t\t:host > div {\n\t\t\t\twidth: 100%;\n\t\t\t}\n ",this)}}const{after:Ko,host:Xo}={after:{selector:"::after"},host:{selector:()=>":host"}},ei=_e(jt({mappings:{hostDisplay:{},hostWidth:{...Xo,property:"width"},barHeight:[{property:"height"},{...Ko,property:"height"}],barBorderRadius:[{property:"border-radius"},{...Ko,property:"border-radius"}],verticalPadding:[{...Xo,property:"padding-top"},{...Xo,property:"padding-bottom"}],barBackgroundColor:{property:"background-color"},barColor:{...Ko,property:"background-color"},barWidth:{...Ko,property:"width"},animationDuration:[{},Ko],animationTimingFunction:[{},Ko],animationIterationCount:[{},Ko]}}),$t,_t)(Jo);customElements.define(Qo,ei);const ti=Je("loader-radial");class oi extends(Gt({componentName:ti,baseSelector:":host > div"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<div></div>\n\t",V("\n @keyframes spin {\n\t\t\t\t0% { transform: rotate(0deg); }\n\t\t\t\t100% { transform: rotate(360deg); }\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tposition: relative;\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n\t\t\t:host > div {\n\t\t\t\tanimation-name: spin;\n\t\t\t}\n ",this)}}const ii=_e(jt({mappings:{hostDisplay:{property:"display"},spinnerSize:[{property:"width"},{property:"height"}],spinnerBorderWidth:{property:"border-width"},spinnerBorderStyle:{property:"border-style"},spinnerBorderRadius:{property:"border-radius"},spinnerQuadrant1Color:{property:"border-top-color"},spinnerQuadrant2Color:{property:"border-bottom-color"},spinnerQuadrant3Color:{property:"border-right-color"},spinnerQuadrant4Color:{property:"border-left-color"},animationDuration:{},animationTimingFunction:{},animationIterationCount:{}}}),$t,_t)(oi);customElements.define(ti,ii);const ri=Je("container");class ni extends(Gt({componentName:ri,baseSelector:"slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<slot></slot>\n\t",V("\n\t\t\t:host > slot {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: auto;\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t}\n ",this)}}const si=_e(jt({mappings:{hostHeight:{selector:()=>":host",property:"height"},hostWidth:{selector:()=>":host",property:"width"},hostDirection:{selector:()=>":host",property:"direction"},itemsGrow:{selector:()=>"::slotted(*)",property:"flex-grow",fallback:"0"},verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],horizontalPadding:[{property:"padding-left"},{property:"padding-right"}],flexDirection:{},justifyContent:{},alignItems:{},gap:{},flexWrap:{},backgroundColor:{},backgroundImage:{},backgroundPositionX:{},backgroundPositionY:{},backgroundSize:{},backgroundRepeat:{},color:{},borderRadius:{},borderColor:{},borderStyle:{},borderWidth:{},boxShadow:{}}}),$t,_t)(ni);customElements.define(ri,si);const ai=k("combo-box"),{host:li,inputField:di,inputElement:ci,placeholder:pi,toggle:hi,clearButton:ui,label:gi,requiredIndicator:mi,helperText:bi,errorMessage:yi,loader:fi,overlayContent:vi}={host:{selector:()=>":host"},inputField:{selector:"::part(input-field)"},inputElement:{selector:"input"},placeholder:{selector:"> input:placeholder-shown"},toggle:{selector:"::part(toggle-button)"},clearButton:{selector:"::part(clear-button)"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},loader:{selector:"vaadin-combo-box-overlay::part(loader)"},overlayContent:{selector:"vaadin-combo-box-overlay::part(content)"}},xi=I(ce({mappings:{hostWidth:{...li,property:"width"},hostDirection:{...li,property:"direction"},fontSize:[{},li],fontFamily:[gi,pi,di,bi,yi],labelFontSize:{...gi,property:"font-size"},labelFontWeight:{...gi,property:"font-weight"},inputValueFontWeight:{...di,property:"font-weight"},inputPlaceholderFontWeight:{...pi,property:"font-weight"},helperTextFontWeight:{...bi,property:"font-weight"},errorMessageFontWeight:{...yi,property:"font-weight"},labelTextColor:[{...gi,property:"color"},{...gi,property:"-webkit-text-fill-color"},{...mi,property:"color"}],errorMessageTextColor:{...yi,property:"color"},errorMessageIcon:{...yi,property:"background-image"},errorMessageIconSize:{...yi,property:"background-size"},errorMessageIconPadding:{...yi,property:"padding-inline-start"},errorMessageIconRepeat:{...yi,property:"background-repeat"},errorMessageIconPosition:{...yi,property:"background-position"},errorMessageFontSize:{...yi,property:"font-size"},inputHeight:{...di,property:"height"},inputBackgroundColor:{...di,property:"background-color"},inputBorderColor:{...di,property:"border-color"},inputBorderWidth:{...di,property:"border-width"},inputBorderStyle:{...di,property:"border-style"},inputBorderRadius:{...di,property:"border-radius"},labelRequiredIndicator:{...mi,property:"content"},inputValueTextColor:{...di,property:"color"},inputPlaceholderTextColor:{...pi,property:"color"},inputDropdownButtonCursor:[{...hi,property:"cursor"},{...ui,property:"cursor"}],inputDropdownButtonColor:[{...hi,property:"color"},{...ui,property:"color"}],inputDropdownButtonSize:[{...hi,property:"font-size"},{...ui,property:"font-size"}],inputDropdownButtonOffset:[{...hi,property:"margin-right"},{...hi,property:"margin-left"}],inputOutlineColor:{...di,property:"outline-color"},inputOutlineWidth:{...di,property:"outline-width"},inputOutlineStyle:{...di,property:"outline-style"},inputOutlineOffset:{...di,property:"outline-offset"},inputHorizontalPadding:[{...ci,property:"padding-left"},{...ci,property:"padding-right"}],labelPosition:{...gi,property:"position"},labelTopPosition:{...gi,property:"top"},labelHorizontalPosition:[{...gi,property:"left"},{...gi,property:"right"}],inputTransformY:{...gi,property:"transform"},inputTransition:{...gi,property:"transition"},marginInlineStart:{...gi,property:"margin-inline-start"},placeholderOpacity:{...pi,property:"opacity"},inputVerticalAlignment:{...di,property:"align-items"},valueInputHeight:{...ci,property:"height"},valueInputMarginBottom:{...ci,property:"margin-bottom"},overlayBackground:{property:()=>xi.cssVarList.overlay.backgroundColor},overlayTextColor:{property:()=>xi.cssVarList.overlay.textColor},overlayBorder:{property:()=>xi.cssVarList.overlay.border},overlayFontSize:{property:()=>xi.cssVarList.overlay.fontSize},overlayFontFamily:{property:()=>xi.cssVarList.overlay.fontFamily},overlayCursor:{property:()=>xi.cssVarList.overlay.cursor},overlayItemBoxShadow:{property:()=>xi.cssVarList.overlay.itemBoxShadow},overlayItemPaddingInlineStart:{property:()=>xi.cssVarList.overlay.itemPaddingInlineStart},overlayItemPaddingInlineEnd:{property:()=>xi.cssVarList.overlay.itemPaddingInlineEnd},overlayCheckmarkDisplay:{property:()=>xi.cssVarList.overlay.checkmarkDisplay},overlaySelectedItemBackground:{property:()=>xi.cssVarList.overlay.selectedItemBackground},overlaySelectedItemHoverBackground:{property:()=>xi.cssVarList.overlay.selectedItemHoverBackground},overlaySelectedItemFocusBackground:{property:()=>xi.cssVarList.overlay.selectedItemFocusBackground},overlayItemHoverBackground:{property:()=>xi.cssVarList.overlay.itemHoverBackground},overlayItemFocusBackground:{property:()=>xi.cssVarList.overlay.itemFocusBackground}}}),pe,Ne({name:"overlay",selector:"",mappings:{backgroundColor:[{selector:"vaadin-combo-box-scroller"},{selector:"vaadin-combo-box-overlay::part(overlay)"}],minHeight:{selector:"vaadin-combo-box-overlay"},margin:{selector:"vaadin-combo-box-overlay"},cursor:{selector:"vaadin-combo-box-item"},fontFamily:{selector:"vaadin-combo-box-item"},textColor:{selector:"vaadin-combo-box-item",property:"color"},fontSize:{selector:"vaadin-combo-box-item"},itemBoxShadow:{selector:"vaadin-combo-box-item",property:"box-shadow"},itemPaddingInlineStart:{selector:"vaadin-combo-box-item",property:"padding-inline-start"},itemPaddingInlineEnd:{selector:"vaadin-combo-box-item",property:"padding-inline-end"},checkmarkDisplay:{selector:"vaadin-combo-box-item::part(checkmark)",property:"display"},selectedItemBackground:{selector:"vaadin-combo-box-item[selected]",property:"background-color"},selectedItemHoverBackground:{selector:"vaadin-combo-box-item[selected]:hover:not([disabled])",property:"background-color"},selectedItemFocusBackground:{selector:"vaadin-combo-box-item[selected][focused]:not([disabled])",property:"background-color"},itemHoverBackground:{selector:"vaadin-combo-box-item:hover:not([selected]):not([disabled])",property:"background-color"},itemFocusBackground:{selector:"vaadin-combo-box-item[focused]:not([selected]):not([disabled])",property:"background-color"},loaderTop:{...fi,property:"top"},loaderLeft:{...fi,property:"left"},loaderRight:{...fi,property:"right"},loaderMargin:{...fi,property:"margin"},loaderWidth:{...fi,property:"width"},loaderHeight:{...fi,property:"height"},loaderBorder:{...fi,property:"border"},loaderBorderColor:{...fi,property:"border-color"},loaderBorderRadius:{...fi,property:"border-radius"},contentHeight:{...vi,property:"height"},contentOpacity:{...vi,property:"opacity"},scrollerMinHeight:{selector:"vaadin-combo-box-scroller",property:"min-height"}},forward:{include:!1,attributes:["size"]}}),Le({proxyProps:["selectionStart"],inputEvent:"value-changed"}),e=>class extends e{init(){super.init?.(),this.baseElement._hasValidConstraints&&(this.baseElement._hasValidConstraints=()=>!0)}},he,e=>class extends e{static get observedAttributes(){return["label-type","require-match"]}#K=({displayName:e,value:t,label:o})=>`<span data-name="${o}" data-id="${t}">${e||o}</span>`;#F;get defaultValue(){return this.getAttribute("default-value")}get renderItem(){return this.#K}set renderItem(e){this.#K=e,this.renderItems()}set renderer(e){this.baseElement.renderer=e}get loading(){return"true"===this.getAttribute("loading")}set loading(e){e?this.setAttribute("loading","true"):this.removeAttribute("loading")}get data(){if(this.#F)return this.#F;const e=this.getAttribute("data");if(e)try{const t=JSON.parse(e);if(this.isValidDataType(t))return t}catch(e){console.error('could not parse data string from attribute "data" -',e.message)}return[]}set data(e){this.isValidDataType(e)&&(this.#F=e,this.renderItems())}get requireMatch(){return"true"===this.getAttribute("require-match")&&!this.allowCustomValue}isValidDataType(e){const t=Array.isArray(e);return t||console.error("data must be an array, received:",e),t}getItemsTemplate(){return this.data?.reduce?.((e,t)=>e+(this.renderItem?.(t||{})||""),"")}renderItems(){if(this.#F||this.getAttribute("data")){const e=this.getItemsTemplate();this.innerHTML=e}}get hasDynamicData(){return"true"===this.getAttribute("has-dynamic-data")}get shouldSelectItemOnItemsChange(){return!this.hasDynamicData||this.allowCustomValue}handleSelectedItem(){const{selectedItem:e}=this.baseElement,t=e?.["data-id"];e&&Array.from(this.children).includes(e)||(t&&this.shouldSelectItemOnItemsChange&&(this.value=t),this.value||this.setDefaultValue())}customValueTransformFn(e){return e}setComboBoxDescriptor(){const e=Object.getOwnPropertyDescriptor(this.inputElement.constructor.prototype,"value"),t=this;Object.defineProperties(this.inputElement,{value:{...e,set(o){if(!t.baseElement.items?.length&&!t.allowCustomValue)return;const i=t.customValueTransformFn(o)||"";i!==this.value&&e.set.call(this,i)}}})}#X(){const e=Array.from(this.children);e.forEach(e=>{Object.defineProperty(e,"data-name",{value:e.getAttribute("data-name"),configurable:!0,writable:!0}),Object.defineProperty(e,"data-id",{value:e.getAttribute("data-id"),configurable:!0,writable:!0})}),this.baseElement.items=e,setTimeout(()=>{this.handleSelectedItem()},0)}#ee(){const e=this.baseElement.shadowRoot.querySelector("vaadin-combo-box-overlay");e._attachOverlay=()=>{e.bringToFront()},e._detachOverlay=()=>{},e._enterModalState=()=>{}}#te(){this.baseElement.renderer=(e,t,o)=>{e.innerHTML=o.item.outerHTML}}#oe(){this.hasDynamicData&&(this.baseElement._dataProviderFilterChanged=()=>{})}isValueMatch(){const e=this.baseElement.querySelector("input").value;return!e||this.baseElement.items.some(t=>t.dataset.name===e||t.dataset.id===e)}init(){super.init?.(),this.getValidity=function(){return this.requireMatch&&!this.isValueMatch()?{patternMismatch:!0}:!this.value&&this.isRequired?{valueMissing:!0}:{}},this.#te(),this.#oe(),setTimeout(()=>{this.setComboBoxDescriptor(),this.#ee()}),M(this,this.renderItems.bind(this),{includeAttrs:["data"]}),A(this,this.#X.bind(this)),this.setDefaultValue(),this.baseElement.addEventListener("value-changed",()=>{this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))}),this.baseElement.addEventListener("filter-changed",e=>{this.dispatchEvent(new CustomEvent("filter-changed",{bubbles:!0,composed:!0,detail:e.detail}))})}onLabelClick(){this.isReadOnly||this.isDisabled||(this.focus(),this.autoOpenDisabled||this.setAttribute("opened","true"))}handleRequireMatchChange(e){this.baseElement.allowCustomValue=e||this.allowCustomValue}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),t!==o&&("label-type"===e?"floating"===o?this.addEventListener("click",this.onLabelClick):this.removeEventListener("click",this.onLabelClick):"require-match"===e&&this.handleRequireMatchChange("true"===o))}setDefaultValue(){this.defaultValue&&(this.value=this.defaultValue)}#ie(e){return this.baseElement.items?.find(t=>t["data-id"]===e)}#re(e,t){e===this.value&&t!==this.baseElement.selectedItem&&this.baseElement.addEventListener("selected-item-changed",e=>{e.stopImmediatePropagation()},{once:!0,capture:!0})}set value(e){const t=this.#ie(e);this.#re(e,t),e&&t?this.baseElement.selectedItem=t:!t&&this.allowCustomValue?this.baseElement.value=e:this.baseElement.selectedItem=void 0}get value(){return(this.baseElement.selectedItem?.["data-id"]||this.allowCustomValue)&&this.baseElement.__data.value||""}get allowCustomValue(){return"true"===this.getAttribute("allow-custom-value")}get autoOpenDisabled(){return"true"===this.getAttribute("auto-open-disabled")}})(Ee({slots:["","prefix"],wrappedEleName:"vaadin-combo-box",style:()=>`\n\t\t:host {\n\t\t\tdisplay: inline-flex;\n\t\t\tbox-sizing: border-box;\n\t\t\t-webkit-mask-image: none;\n\t\t}\n\t\t${U(xi.cssVarList)}\n\t\t${Q("vaadin-combo-box")}\n\t\t${Z("vaadin-combo-box")}\n\t\t${G("vaadin-combo-box")}\n\n\t\tvaadin-combo-box {\n\t\t\tpadding: 0;\n\t\t\twidth: 100%;\n\t\t}\n\t\tvaadin-combo-box::before {\n\t\t\theight: initial;\n\t\t}\n\t\tvaadin-combo-box [slot="input"] {\n\t\t\t-webkit-mask-image: none;\n\t\t\tmin-height: 0;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\n\t\tvaadin-combo-box::part(input-field) {\n\t\t\tpadding: 0;\n\t\t\tbox-shadow: none;\n\t\t}\n\n vaadin-combo-box::part(toggle-button),\n vaadin-combo-box::part(clear-button) {\n align-self: center;\n }\n\n vaadin-combo-box[hide-toggle-button="true"]::part(toggle-button) {\n display: none;\n }\n\n vaadin-combo-box[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-combo-box[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n\n ${J("vaadin-combo-box")}\n \n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n \n\t\t`,excludeAttrsSync:["tabindex","size","data","loading","style"],componentName:ai,includeForwardProps:["items","renderer","selectedItem"]}));customElements.define(ai,xi);const Ci=e=>{const t=c.A.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},ADD_TAGS:["image"],FORBID_TAGS:["defs"]});return(new DOMParser).parseFromString(t,"image/svg+xml").querySelector("svg")},wi=k("image"),Ii=["src","src-dark"];class Si extends(ye({componentName:wi,baseSelector:"slot"})){static get observedAttributes(){return Ii}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<slot></slot>\n\t",V("\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n :host > slot {\n width: 100%;\n height: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\n ::slotted(*) {\n width: 100%;\n\t\t\t}\n\n .hidden {\n display: none;\n }\n ",this)}init(){super.init?.(),this.toggleVisibility(this.getSrc)}onThemeChange(){this.renderImage()}toggleVisibility(e){e?this.classList.remove("hidden"):this.classList.add("hidden")}get altText(){return this.getAttribute("alt")||""}get legacySrc(){return this.getAttribute("src")}get themeSrc(){return this.getAttribute(`src-${this.currentThemeName}`)}get getSrc(){return this.themeSrc||this.legacySrc}updateFillColor(e){[e,...e.querySelectorAll("*[fill]")].forEach(e=>{e.setAttribute("fill",`var(${Mi.cssVarList.fill}, ${e.getAttribute("fill")||"''"})`)})}renderImage(){this.toggleVisibility(this.getSrc),(async(e,t)=>{try{let o;if((e=>e.startsWith("data:image/svg+xml;base64,"))(e)){const t=atob(e.slice(26));o=Ci(t)}else if("svg"===(e=>{const t=e.match(/\.([0-9a-z]+)(?:[\\?#]|$)/i);return t?t[1]:null})(e)){const t=await fetch(e),i=await t.text();o=Ci(i)}else o=((e,t)=>{const o=document.createElement("img");return o.setAttribute("src",e),o.setAttribute("alt",t),o})(e,t);return o.style.setProperty("max-width","100%"),o.style.setProperty("max-height","100%"),o}catch{return null}})(this.getSrc,this.altText).then(e=>{this.innerHTML="",e&&(this.updateFillColor(e),this.appendChild(e))})}shouldRender(e){const t=this.getAttribute(e);return this.getSrc===t}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),t!==o&&this.shouldRender(e)&&this.renderImage()}}const Mi=I(ce({mappings:{fill:{},height:{selector:()=>":host"},width:{selector:()=>":host"}}}),pe,he)(Si),Ai=k("icon"),Ei=I(ce({mappings:{fill:[{},{property:Mi.cssVarList.fill}]}}),pe,he)(Ee({slots:[],wrappedEleName:"descope-image",style:()=>"\n :host {\n display: inline-flex;\n max-height: 100%;\n }\n ",excludeAttrsSync:["tabindex","class","style"],componentName:Ai})),Ti=k("button"),{host:ki,label:zi,slottedIcon:Li}={host:{selector:()=>":host"},label:{selector:"::part(label)"},slottedIcon:{selector:()=>"::slotted(descope-icon)"}};let Vi;const Ni=I((({triggers:e=[]}={})=>t=>class extends t{static get observedAttributes(){return[...t.observedAttributes||[],...e.map(({attr:e})=>e)]}get#ne(){return e.some(({attr:e,value:t})=>this.getAttribute(e)===t)}#se=()=>{this.toggleAttribute("stretch",this.#ne)};attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),t!==o&&this.#se()}init(){super.init?.(),this.#se()}})({triggers:[{attr:"full-width",value:"true"}]}),ce({mappings:{hostWidth:{property:"width"},hostHeight:{property:"height"},hostDirection:{...ki,property:"direction"},fontSize:{},fontFamily:{},fontWeight:{},cursor:{},backgroundColor:{},outlineOffset:{},outlineColor:{},outlineStyle:{},outlineWidth:{},borderRadius:{},borderColor:{},borderStyle:{},borderWidth:{},verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],horizontalPadding:[{property:"padding-right",fallback:"0.875em"},{property:"padding-left",fallback:"0.875em"}],labelTextColor:{property:"color"},iconColor:{selector:()=>"::slotted(*)",property:Ei.cssVarList.fill},labelTextDecoration:{...zi,property:"text-decoration"},labelSpacing:{...zi,property:"gap"},textAlign:{...zi,property:"justify-content",fallback:"center"},iconSize:[{...Li,property:"width"},{...Li,property:"height"}]}}),e=>class extends e{get isLoading(){return"true"===this.getAttribute("loading")}click(){this.isLoading||super.click()}},pe,he)(Ee({slots:["","prefix","label","suffix"],wrappedEleName:"vaadin-button",style:()=>`\n\t\t\t\n\t:host {\n\t\tdisplay: inline-block;\n\t\tbox-sizing: border-box;\n\t}\n\tvaadin-button::before,\n\tvaadin-button::after {\n\t\topacity: 0;\n\t}\n\tvaadin-button {\n\t\tmargin: 0;\n\t\tmin-width: 0;\n\t\twidth: 100%;\n\t\theight: auto;\n\t\tbox-shadow: none;\n\t}\n\tvaadin-button::part(label) {\n\t\tpadding: 0;\n width: 100%;\n\t}\n\tvaadin-button::part(prefix) {\n\t\tmargin-left: 0;\n\t\tmargin-right: 0;\n\t}\n\n\t\t\t\n\tvaadin-button::part(prefix),\n\tvaadin-button::part(label) {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n\n\t\t\t${Vi}\n\t\t\tvaadin-button::part(label) { pointer-events: none; }\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${Ni.cssVarList.outlineWidth}) + var(${Ni.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width="true"]) {\n width: var(${Ni.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${Ni.cssVarList.hostHeight}) - var(${Ni.cssVarList.outlineWidth}) - var(${Ni.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square="true"]:not([full-width="true"]) {\n\t\t\t\twidth: calc(var(${Ni.cssVarList.hostWidth}) - var(${Ni.cssVarList.outlineWidth}) - var(${Ni.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,excludeAttrsSync:["tabindex","class","style"],componentName:Ti})),{color:Di,fontSize:Pi}=Ni.cssVarList;Vi=`\n\t@keyframes spin {\n\t\t0% { -webkit-transform: rotate(0deg); }\n\t\t100% { -webkit-transform: rotate(360deg); }\n\t}\n\t:host([loading="true"]) ::before {\n\t\tanimation: spin 2s linear infinite;\n\t\tposition: absolute;\n\t\tcontent: '';\n\t\tz-index: 1;\n\t\tbox-sizing: border-box;\n\t\tborder-radius: 50%;\n\t\tborder-bottom-color: transparent;\n\t\tborder-left-color: transparent;\n\t\tborder-style: solid;\n\t\tcolor: var(${Di});\n\t\ttop: calc(50% - (var(${Pi}) / 2));\n\t\tleft: calc(50% - (var(${Pi}) / 2));\n\t\tborder-width: calc(var(${Pi}) / 10);\n\t\twidth: var(${Pi});\n\t\theight: var(${Pi});\n\t}\n\t:host([disabled="true"]),\n\t:host([loading="true"]) {\n\t\tpointer-events: none;\n\t}\n\t:host([loading="true"]) ::part(prefix),\n\t:host([loading="true"]) ::part(label) {\n\t\tvisibility: hidden;\n\t}\n`,customElements.define(Ti,Ni);const Bi=["MM/DD/YYYY","DD/MM/YYYY","YYYY/MM/DD"],Fi=Bi[0],Ri="YYYY-MM-DD",Wi="/",Oi=["January","February","March","April","May","June","July","August","September","October","November","December"],ji=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],$i={id:"month",min:1,max:12,placeholder:"MM"},_i={id:"day",min:1,max:31,placeholder:"DD"},Hi={id:"year",min:0,max:9999,placeholder:"YYYY"},qi=1900,Yi=2099,Ui=(e,t)=>{if("number"==typeof e)return new Date(e);if("string"==typeof e){const t=new Date(e.replace(/-/g,"/"));return new Date(t)}return new Date},Gi={MM:"(0?[1-9]|1[0-2])",DD:"(0?[1-9]|[12][0-9]|3[01])",YYYY:"([0-9]{4})"},Zi=e=>{const t=(e=>`^${e.split(Wi).map(e=>Gi[e]).join("\\D")}$`)(e),o=(e=>{const t=e.split(Wi);return e=>{const o={};return t.forEach((t,i)=>{o[t]=e[i+1]}),[o.YYYY,o.MM,o.DD]}})(e),i=new RegExp(t);return{pattern:t,validate:e=>i.test(e),getDate:e=>((e,t,o)=>{const i=t.exec(e);if(!i)return null;const[r,n,s]=o(i);return Ui([r,n,s].join(Wi))})(e,i,o)}},Qi=Object.fromEntries(Bi.map(e=>[e,Zi(e)])),Ji=e=>!Number.isNaN(Number(e)),Ki=e=>{const t=Ui(e);return[t.getFullYear(),t.getMonth()+1,t.getDate()]},Xi=(e,t)=>{const[o,i,r]=Ki(e),n={DD:String(r).padStart(2,"0"),MM:String(i).padStart(2,"0"),YYYY:String(o)};return t.replace(/DD|MM|YYYY/g,e=>n[e])},er=()=>Ui().getTime(),tr=e=>Ui(e).getFullYear().toString(),or=e=>(Ui(e).getMonth()+1).toString(),ir=(e,t)=>"number"==typeof e?e:t?Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()):e.getTime(),rr=(e,t)=>Array.isArray(e)&&e.length===t&&e.filter(Boolean).length===t,nr=({label:e,dataId:t,dataName:o})=>`\n\t<div class="combo-box-item"\n\t\tdata-id="${t}"\n\t\tdata-name="${o}"\n\t>\n\t\t\t${e}\n\t</div>\n`,sr=(e=Oi)=>e.map((e,t)=>nr({label:e,dataId:t+1,dataName:e})).join(""),ar=(e,t)=>{const[o,i]=Ki(t),[r,n]=Ki(e);return r===o&&n===i},lr=(e,t,o)=>(e.addEventListener("input",t),e.addEventListener("focusout",o),e),dr=Je("calendar"),cr=["initial-value","initial-year","initial-month","years-range","calendar-months","calendar-weekdays","calendar-label-today","st-host-direction","disabled","full-width"],pr=["calendar-label-submit","calendar-label-cancel"],hr=co({componentName:dr,baseSelector:"div"}),{calendar:ur,day:gr,dayEntry:mr,currentDay:br,selectedDay:yr,disabledDay:fr,weekday:vr,topNav:xr,topNavSelectors:Cr,bottomNav:wr,navPrev:Ir,navNext:Sr,navPrevRTL:Mr,navNextRTL:Ar,yearInput:Er,monthInput:Tr}={calendar:{selector:()=>".calendar"},topNav:{selector:()=>".nav.top-nav"},topNavSelectors:{selector:()=>".nav.top-nav .selectors > span"},bottomNav:{selector:()=>".nav.bottom-nav"},day:{selector:()=>".day"},dayEntry:{selector:()=>".day-entry"},currentDay:{selector:()=>".day-entry[data-current-day] .day"},selectedDay:{selector:()=>".day-entry[data-selected] .day"},disabledDay:{selector:()=>'.day-entry[data-disabled="true"] .day'},weekday:{selector:()=>".weekday"},navPrev:{selector:()=>".nav-prev"},navNext:{selector:()=>".nav-next"},navPrevRTL:{selector:()=>':host([st-host-direction="rtl"]) .nav-prev'},navNextRTL:{selector:()=>':host([st-host-direction="rtl"]) .nav-next'},yearInput:{selector:()=>".year-input"},monthInput:{selector:()=>".month-input"}},kr=_e(jt({componentNameOverride:Je("input-wrapper")}),jt({mappings:{fontSize:{},fontFamily:{},hostWidth:[{selector:()=>":host",property:"width"},{selector:"table",property:"width"}],hostDirection:{property:"direction"},topNavVerticalPadding:[{...xr,property:"padding-top"},{...xr,property:"padding-bottom"}],topNavHorizointalPadding:[{...xr,property:"padding-right"},{...xr,property:"padding-left"}],topNavAlignment:{...xr,property:"justify-content"},topNavGap:{...xr,property:"gap"},topNavSelectorsGap:{...Cr,property:"gap"},bottomNavVerticalPadding:[{...wr,property:"padding-top"},{...wr,property:"padding-bottom"}],bottomNavHorizontalPadding:[{...wr,property:"padding-right"},{...wr,property:"padding-left"}],bottomNavAlignment:{...wr,property:"justify-content"},bottomNavGap:{...wr,property:"gap"},navMarginBottom:{...xr,property:"margin-bottom"},calendarPadding:[{...ur,property:"padding-bottom"},{...ur,property:"padding-right"},{...ur,property:"padding-left"}],navBorderBottomWidth:{...xr,property:"border-bottom-width"},navBorderBottomColor:{...xr,property:"border-bottom-color"},navBorderBottomStyle:{...xr,property:"border-bottom-style"},weekdayFontSize:{...vr,property:"font-size"},weekdayFontWeight:{...vr,property:"font-weight"},currentDayBorderColor:{...br,property:"border-color"},currentDayBorderWidth:{...br,property:"border-width"},currentDayBorderStyle:{...br,property:"border-style"},dayHeight:{...mr,property:"height"},daySize:[{...gr,property:"height"},{...gr,property:"width"}],dayPadding:{...gr,property:"padding"},dayRadius:{...gr,property:"border-radius"},dayTextAlign:{...gr,property:"text-align"},dayBlockAlign:{...gr,property:"margin"},dayTextColor:{...gr,property:"color"},dayFontWeight:{...gr,property:"font-weight"},dayBackgroundColor:{...gr,property:"background-color"},dayCursor:{...gr,property:"cursor"},dayFontSize:{...gr,property:"font-size"},dayBackgroundColorHover:{selector:()=>".day:hover",property:"background-color"},daySelectedTextdColor:{...yr,property:"color"},daySelectedBackgroundColor:{...yr,property:"background-color"},dayDisabledTextdColor:{...fr,property:"color"},yearInputWidth:{...Er,property:"width"},monthInputWidth:{...Tr,property:"width"},navButtonSize:[{...Ir,property:"width"},{...Ir,property:"height"},{...Sr,property:"width"},{...Sr,property:"height"}],navButtonCursor:[{...Ir,property:"cursor"},{...Sr,property:"cursor"}],navButtonRotation:[{...Mr,property:"transform"},{...Ar,property:"transform"}],navButtonOpacity:[{...Ir,property:"opacity"},{...Sr,property:"opacity"}]}}),$t,_t)(class extends hr{static get observedAttributes(){return[].concat(hr.observedAttributes||[],cr,pr)}preview;epoch;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div>\n <nav class="nav top-nav">\n <div class="nav-prev">\n </div>\n <div class="selectors"></div>\n <div class="nav-next">\n </div>\n </nav>\n <div class="calendar"></div>\n <nav class="nav bottom-nav">\n <descope-button class="cancel-button" variant="link" mode="primary">Cancel</descope-button>\n <descope-button class="submit-button" variant="link" mode="primary" disabled="true">Done</descope-button>\n </nav>\n </div>\n ',V(`\n :host {\n display: inline-block;\n box-sizing: border-box;\n max-width: 100%;\n user-select: none;\n -webkit-user-select: none;\n }\n\n :host ::slotted {\n padding: 0;\n }\n\n [data-toggle-calendar] {\n cursor: pointer;\n display: flex;\n align-self: center;\n z-index: 1;\n }\n\n [data-disabled="true"] {\n pointer-events: none;\n }\n\n .calendar .day {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .nav {\n display: flex;\n align-items: center;\n box-sizing: border-box;\n }\n\n .selectors,\n .selectors span {\n display: flex;\n justify-content: center;\n }\n\n descope-button {\n padding: 0;\n ${Ni.cssVarList.horizontalPadding}: 0;\n ${Ni.cssVarList.verticalPadding}: 0;\n ${Ni.cssVarList.outlineWidth}: 0;\n }\n\n .combo-box-item {\n display:flex;\n flex-direction: column;\n }\n\n \n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n \n `,this)}set value(e){if(!e)return;const t=Ui(e).getTime();Ji(t)&&t!==this.epoch&&(this.epoch=t,this.renderCalendar())}get value(){return this.epoch?Xi(this.epoch,Ri):""}get isSelectedView(){return ar(this.preview,this.epoch)}get isTodayView(){return ar(er(),this.preview)}get monthNames(){return(e=>{const t=e?.split(",");return rr(t,12)?t:Oi})(this.getAttribute("calendar-months"))}get weekdayNames(){return(e=>{const t=e?.split?.(",");return rr(t,7)?t:ji})(this.getAttribute("calendar-weekdays"))}get hasYearValue(){return!!this.yearInput.value}get hasMonthValue(){return!!this.monthInput.value}get yearsRange(){const e=this.getAttribute("years-range")?.split("-");if(2===e?.length){const[t,o]=e.map(Number);if(t<=o)return[t,o]}const t=Ui().getFullYear();return[t,t+100]}init(){super.init?.(),this.initCalendar(),this.renderCalendar()}initCalendar(){this.calendar=this.shadowRoot.querySelector(".calendar"),this.navPrevEle=this.shadowRoot.querySelector(".nav-prev"),this.navNextEle=this.shadowRoot.querySelector(".nav-next"),this.submitButton=this.shadowRoot.querySelector(".submit-button"),this.cancelButton=this.shadowRoot.querySelector(".cancel-button"),this.initInputs(),this.initNav(),this.addEventListener("day-changed",()=>this.submitButton.removeAttribute("disabled")),this.submitButton.shadowRoot.querySelector("vaadin-button").setAttribute("disabled","true")}initInputs(){const e=(()=>{const e=document.createElement("span");return e.innerHTML=`\n <descope-combo-box\n label-type="static"\n bordered="true"\n item-label-path="data-name"\n item-value-path="data-id"\n class="month-input"\n >\n ${sr()}\n </descope-combo-box>\n <descope-combo-box\n allow-custom-value="true"\n label-type="static"\n bordered="true"\n item-label-path="data-name"\n item-value-path="data-id"\n class="year-input"\n no-empty-value="true"\n >\n </descope-combo-box>\n `,e})(this.monthNames,this.yearsRange);this.shadowRoot.querySelector(".selectors").appendChild(e),this.monthInput=lr(this.shadowRoot.querySelector(".month-input"),this.onMonthChange.bind(this),this.onMonthInputBlur.bind(this)),this.yearInput=lr(this.shadowRoot.querySelector(".year-input"),this.onYearChange.bind(this),this.onYearInputBlur.bind(this)),[this.monthInput,this.yearInput].forEach(e=>Xe(this,e,{includeAttrs:["disabled","size","st-host-direction"]}))}initNav(){this.navPrevEle.addEventListener("click",this.navPrevMonth.bind(this)),this.navNextEle.addEventListener("click",this.navNextMonth.bind(this)),this.cancelButton.addEventListener("click",this.onCancel.bind(this)),this.submitButton.addEventListener("click",this.onSubmit.bind(this)),[this.navPrevEle,this.navNextEle].forEach(e=>Xe(this,e,{includeAttrs:["size"]})),this.shadowRoot.querySelector(".nav-next").innerHTML='\n<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9.27283 6.78069C8.87912 6.34164 8.91587 5.66655 9.35492 5.27283C9.79397 4.87912 10.4691 4.91587 10.8628 5.35492C10.8628 5.35492 16.0022 10.9543 16.366 11.36C16.7298 11.7657 16.7298 12.2392 16.366 12.6448L10.8628 18.6451C10.4691 19.0841 9.79397 19.1209 9.35492 18.7272C8.91587 18.3334 8.87912 17.6584 9.27283 17.2193L14.1368 12L9.27283 6.78069Z" fill="#808080"/>\n</svg>',this.shadowRoot.querySelector(".nav-prev").innerHTML='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M14.7272 17.2193C15.1209 17.6584 15.0841 18.3334 14.6451 18.7272C14.206 19.1209 13.5309 19.0841 13.1372 18.6451C13.1372 18.6451 7.99776 13.0457 7.63399 12.64C7.27023 12.2343 7.27023 11.7608 7.63399 11.3552L13.1372 5.35492C13.5309 4.91587 14.206 4.87912 14.6451 5.27283C15.0841 5.66655 15.1209 6.34164 14.7272 6.78069L9.86322 12L14.7272 17.2193Z" fill="#808080"/>\n</svg>'}onSubmit(){this.isDisabled||this.value&&this.dispatchEvent(new CustomEvent("date-submit",{detail:Ui(this.preview)}))}onCancel(){this.isDisabled||(this.dispatchEvent(new CustomEvent("cancel")),this.dispatchEvent(new CustomEvent("date-cancel")),this.clearSelectedDay())}clearSelectedDay(){this.getSelectedDayEle()?.removeAttribute("data-selected"),this.submitButton.setAttribute("disabled","true"),this.epoch=""}updateInputs(){if(this.yearInput&&this.monthInput){const e=this.preview||er(),t=tr(e),o=or(e);this.monthInput.value=o,setTimeout(()=>{this.yearInput.baseElement.value=t})}}renderCalendar(){const e=Ui(this.preview||er()).getTime(),[t,o]=Ki(e);this.calendar&&(this.calendar.innerHTML=((e,t,o)=>{const i=((e,t)=>new Date(e,t,0).getDate())(e,t),r=new Date(e,t-1,1).getDay();let n="<table>";n+=`<thead><tr>${o.reduce((e,t)=>`${e}<th><span class="weekday">${t}</span></th>`,"")}</tr></thead>`,n+="<tbody>",n+="<tr>";for(let e=0;e<r;e++)n+="<td></td>";let s=r;for(let e=1;e<=i;e++)7===s&&(s=0,n+="</tr><tr>"),n+=`\n <td\n data-date-day="${e}"\n class="day-entry">\n <span class="day" data-date-day=${e}>\n ${e}\n </span>\n </td>\n `,s++;for(;s<7;)n+="<td></td>",s++;return n+="</tr></tbody></table>",n})(t,o,this.weekdayNames.map(e=>e.substring(0,3)))),Array.from(this.calendar?.querySelectorAll(".day-entry .day")||[]).forEach(e=>e.addEventListener("click",this.onDayChange.bind(this))),this.updateInputs(),this.setSelectedDay(),this.setCurrentDay()}onDayChange(e){if(this.isDisabled)return;const t=Ui(this.preview);t.setDate(Number(e.target.getAttribute("data-date-day"))),this.value=Xi(t.getTime(),Ri),this.dispatchEvent(new CustomEvent("day-changed",{detail:t}))}onYearChange(e){if(!e.target.value)return;const t=Ui(this.preview);t.setFullYear(Number(e.target.value.trim())),this.preview=t.getTime(),this.renderCalendar(),this.dispatchEvent(new CustomEvent("year-changed",{detail:t}))}onMonthChange(e){if(!e.target.value)return;const t=Ui(this.preview);t.setMonth(Number(e.target.value)-1),this.preview=t.getTime(),this.renderCalendar(),this.dispatchEvent(new CustomEvent("month-changed",{detail:t}))}onYearInputBlur(e){this.yearInput.baseElement.value=e.target.value||tr(this.preview)}onMonthInputBlur(e){this.monthInput.baseElement.value=e.target.value||or(this.preview)}getSelectedDayEle(){const e=Ui(this.epoch).getDate();return this.calendar?.querySelector(`[data-date-day="${e}"]`)}getCurrentDayEle(){return this.calendar?.querySelector(`[data-date-day="${Ui().getDate()}"]`)}clearSelectedDays(){const e=this.calendar?.querySelectorAll("[data-selected]");e&&e.forEach(e=>e.removeAttribute("data-selected"))}setSelectedDay(){this.clearSelectedDays(),this.value&&this.isSelectedView&&this.getSelectedDayEle().setAttribute("data-selected","true")}setCurrentDay(){if(this.isTodayView){const e=this.getCurrentDayEle(),t=this.getAttribute("calendar-label-today")||"Today";e?.setAttribute("data-current-day","true"),e?.setAttribute("title",t)}}navPrevMonth(){if(this.isDisabled)return;const e=(e=>{const t=Ui(e),o=t.getMonth();if(0===o){const e=t.getFullYear();t.setFullYear(e-1),t.setMonth(11)}else t.setMonth(o-1);return t})(this.preview);this.preview=e.getTime(),this.renderCalendar()}navNextMonth(){if(this.isDisabled)return;const e=(e=>{const t=Ui(e),o=t.getMonth();if(11===o){const e=t.getFullYear();t.setFullYear(e+1),t.setMonth(0)}else t.setMonth(o+1);return t})(this.preview);this.preview=e.getTime(),this.renderCalendar()}clearValue(){this.epoch="",this.value="",this.removeAttribute("preview"),this.submitButton.setAttribute("disabled","true")}onInitialValueChange(e){if(this.value)return;const t=Ui(e).getTime();Ji(t)?(this.epoch=t,this.preview=t):this.clearValue()}onYearsRangeChange(){setTimeout(()=>{this.yearInput&&(this.yearInput.innerHTML=(e=>{const[t,o]=e,i=[];for(let e=t;e<=o;e++)i.push(e);return i})(this.yearsRange).map(e=>nr({label:e,dataId:e,dataName:e})).join(""))})}onMonthNamesChange(){setTimeout(()=>{this.monthInput&&(this.monthInput.innerHTML=sr(this.monthNames))})}onSubmitLabelChange(e){this.submitButton&&(this.submitButton.textContent=e||"Done")}onCancelLabelChange(e){this.cancelButton&&(this.cancelButton.textContent=e||"Cancel")}onInitialMonthChange(e){const t=tr(this.preview);this.preview=Ui(`${t}/${e}/1`).getTime()}onInitialYearChange(e){const t=or(this.preview);this.preview=Ui(`${e}/${t}/1`).getTime()}attributeChangedCallback(e,t,o){super.attributeChangedCallback(e,t,o),t!==o&&(pr.includes(e)?("calendar-label-submit"===e&&this.onSubmitLabelChange(o),"calendar-label-cancel"===e&&this.onCancelLabelChange(o)):(o&&"initial-value"===e&&this.onInitialValueChange(o),o&&"initial-month"===e&&this.onInitialMonthChange(o),o&&"initial-year"===e&&this.onInitialYearChange(o),"years-range"===e&&this.onYearsRangeChange(Number(o)),"calendar-months"===e&&this.onMonthNamesChange(),"calendar-label-today"===e&&this.setCurrentDay(o),"disabled"===e&&setTimeout(()=>{this.cancelButton?.setAttribute("disabled","true"===o)}),this.renderCalendar()))}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:{}}});customElements.define(dr,kr);const{host:zr,label:Lr,placeholder:Vr,requiredIndicator:Nr,inputField:Dr,input:Pr,inputMask:Br,helperText:Fr,errorMessage:Rr,disabledPlaceholder:Wr,inputDisabled:Or,inputIcon:jr,externalInput:$r,externalInputDisabled:_r,externalPlaceholder:Hr,externalDisabledPlaceholder:qr}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},placeholder:[{selector:"> input:placeholder-shown"},{selector:()=>":host::slotted(input:placeholder-shown)"}],disabledPlaceholder:{selector:"> input:disabled::placeholder"},inputField:{selector:"::part(input-field)"},input:{selector:"input"},inputMask:{selector:"::part(input-field)::before"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},inputIcon:{selector:"vaadin-icon"},externalInput:{selector:()=>"::slotted(input)"},externalInputDisabled:{selector:()=>"::slotted(input:disabled)"},externalPlaceholder:{selector:()=>"::slotted(input:placeholder-shown)"},externalDisabledPlaceholder:{selector:()=>"::slotted(input:disabled::placeholder)"}};var Yr={fontSize:[{},zr],fontFamily:[Lr,Dr,Fr,Rr],labelFontSize:{...Lr,property:"font-size"},labelFontWeight:{...Lr,property:"font-weight"},inputValueFontWeight:[{...Pr,property:"font-weight"},{...$r,property:"font-weight"}],inputPlaceholderFontWeight:[{selector:()=>":host input:placeholder-shown",property:"font-weight"},{...Hr,property:"font-weight"}],helperTextFontWeight:{...Fr,property:"font-weight"},errorMessageFontWeight:{...Rr,property:"font-weight"},labelTextColor:[{...Lr,property:"color"},{...Nr,property:"color"},{...Lr,property:"-webkit-text-fill-color"},{...Nr,property:"-webkit-text-fill-color"}],hostWidth:{...zr,property:"width"},hostMinWidth:{...zr,property:"min-width"},hostDirection:{...zr,property:"direction"},inputDirection:{...Pr,property:"direction"},inputBackgroundColor:[{...Dr,property:"background-color"},{...Br,property:"background-color"}],errorMessageTextColor:{...Rr,property:"color"},errorMessageIcon:{...Rr,property:"background-image"},errorMessageIconSize:{...Rr,property:"background-size"},errorMessageIconPadding:{...Rr,property:"padding-inline-start"},errorMessageIconRepeat:{...Rr,property:"background-repeat"},errorMessageIconPosition:{...Rr,property:"background-position"},errorMessageFontSize:{...Rr,property:"font-size"},helperTextColor:{...Fr,property:"-webkit-text-fill-color"},inputValueTextColor:[{...Dr,property:"color"},{...Or,property:"-webkit-text-fill-color"},{..._r,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...Pr,property:"caret-color"},{...$r,property:"caret-color"}],labelRequiredIndicator:{...Nr,property:"content"},inputBorderColor:{...Dr,property:"border-color"},inputBorderWidth:{...Dr,property:"border-width"},inputBorderStyle:{...Dr,property:"border-style"},inputBorderRadius:{...Dr,property:"border-radius"},inputHeight:{...Dr,property:"height"},inputHorizontalPadding:[{...Pr,property:"padding-left"},{...Pr,property:"padding-right"},{...$r,property:"padding-left"},{...$r,property:"padding-right"}],inputOutlineColor:{...Dr,property:"outline-color"},inputOutlineStyle:{...Dr,property:"outline-style"},inputOutlineWidth:{...Dr,property:"outline-width"},inputOutlineOffset:{...Dr,property:"outline-offset"},textAlign:{},inputTextAlign:[{...Pr,property:"text-align"},{...$r,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...Hr,property:"color"},{...Vr,property:"color"},{...Wr,property:"-webkit-text-fill-color"},{...qr,property:"-webkit-text-fill-color"}],labelPosition:{...Lr,property:"position"},labelTopPosition:{...Lr,property:"top"},labelHorizontalPosition:[{...Lr,property:"left"},{...Lr,property:"right"}],inputTransformY:{...Lr,property:"transform"},inputTransition:{...Lr,property:"transition"},marginInlineStart:{...Lr,property:"margin-inline-start"},placeholderOpacity:[{selector:"> input:placeholder-shown",property:"opacity"},{...Hr,property:"opacity"}],inputVerticalAlignment:[{...Dr,property:"align-items"},{...$r,property:"align-items"}],valueInputHeight:[{...Pr,property:"height"},{...$r,property:"height"}],valueInputMarginBottom:[{...Pr,property:"margin-bottom"},{...$r,property:"margin-bottom"}],inputIconOffset:[{...jr,property:"margin-right"},{...jr,property:"margin-left"}],inputIconSize:{...jr,property:"font-size"},inputIconColor:{...jr,property:"color"},inputTextSecurity:[{...Pr,property:"-webkit-text-security"},{...Pr,property:"text-security"},{...$r,property:"-webkit-text-security"},{...$r,property:"text-security"}]};const Ur=Je("text-field"),Gr=["type","label-type","copy-to-clipboard"],Zr=_e(jt({mappings:Yr}),$t,io({proxyProps:["value","selectionStart"],useProxyTargets:!0}),_t,e=>class extends e{static get observedAttributes(){return Gr.concat(e.observedAttributes||[])}icon;init(){super.init?.()}renderCopyToClipboard(e){if(!e)return void this.icon?.remove();const t={icon:"vaadin:copy-o",title:"Copy",style:"cursor: pointer"},o={icon:"vaadin:check-circle-o",title:"Copied",style:"cursor: initial"};this.icon=Object.assign(document.createElement("vaadin-icon"),{slot:"suffix",...t}),this.baseElement.appendChild(this.icon),this.icon.addEventListener("click",()=>{navigator.clipboard.writeText(this.value),Object.assign(this.icon,o),setTimeout(()=>{Object.assign(this.icon,t)},5e3)})}onLabelClick(){this.focus()}attributeChangedCallback(e,t,o){super.attributeChangeCallback?.(e,t,o),"type"===e&&this.baseElement._setType(o),t!==o&&("label-type"===e?"floating"===o?this.addEventListener("click",this.onLabelClick):this.removeEventListener("click",this.onLabelClick):"copy-to-clipboard"===e&&this.renderCopyToClipboard("true"===o))}})(Qt({slots:["prefix","suffix"],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${Zr.cssVarList.inputOutlineWidth}) + var(${Zr.cssVarList.inputOutlineOffset}));\n box-sizing: border-box;\n\t\t\t}\n :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {\n opacity: 1;\n }\n\n vaadin-text-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-text-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n ${xt("vaadin-text-field")}\n\t\t\t${ut(Zr.cssVarList)}\n\t\t\t${vt("vaadin-text-field",Zr.cssVarList)}\n \n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n \n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,excludeAttrsSync:["tabindex","style"],componentName:Ur}));customElements.define(Ur,Zr);class Qr{#F=Object.freeze([]);constructor({id:e,min:t,max:o,placeholder:i},r){this.id=e,this.min=t,this.max=o,this.placeholder=i,this.onChange=r}get data(){return this.#F}set data(e){this.#F=Object.freeze(e),this.onChange?.()}get#ae(){return this.data.length?this.numberValue:0}get numberValue(){return Number(this.stringValue)}get stringValue(){return(this.data.join("")||this.placeholder).padStart(this.length,"0")}get isFull(){return 10*this.numberValue>this.max||this.data.length===this.length}get isEmpty(){return this.stringValue===this.placeholder}get length(){return this.max.toString().length}set(e){this.data=e.toString().split("")}add(e){let{data:t}=this;return t=[...t,e],Number(t.join(""))>this.max?t=[e]:this.length<t.length&&(t=t.slice(1,t.length)),this.data=t,e}del(){this.data.filter(e=>"0"!==e).filter(Boolean).length?this.data=this.data.slice(0,this.data.length-1):this.data=[]}clear(){this.data=[]}inc(e){this.replaceValue(this.#ae<this.max?Math.max(this.#ae+(e||1),this.min):this.min)}dec(e){this.replaceValue(this.#ae>this.min?Math.min(this.#ae-(e||1),this.max):this.max)}isInRange(e){return e>=this.min&&e<=this.max}replaceValue(e){this.isInRange(e)&&(this.data=e.toString().padStart(this.length,0).split(""))}setMin(e){this.min=Number(e)}setMax(e){this.max=Number(e)}}const Jr=Je("date-field"),Kr=co({componentName:Jr,baseSelector:"vaadin-popover"}),Xr=["format","opened","initial-value","readonly","disable-calendar","utc-time"],en=["years-range","calendar-months","calendar-weekdays"],tn=[...Xr,...en],on=Zr.cssVarList,{host:rn,input:nn,inputEleRTL:sn,toggleButton:an,overlay:ln,backdrop:dn}={host:{selector:()=>":host"},input:{selector:()=>"descope-text-field"},inputEleRTL:{selector:()=>':host([st-host-direction="rtl"]) descope-text-field'},toggleButton:{selector:()=>".toggle-calendar"},overlay:{selector:"vaadin-popover-overlay::part(overlay)"},backdrop:{selector:"vaadin-popover-overlay::part(backdrop)"}},cn=_e(jt({componentNameOverride:Je("input-wrapper")}),jt({mappings:{iconMargin:{...an,property:"margin-inline-end"},hostWidth:{...rn,property:"width"},hostDirection:{...rn,property:"direction"},textAlign:{...nn,property:"text-align"},rtlInputDirection:{...sn,property:on.inputDirection},rtlInputAlignment:{...sn,property:on.inputTextAlign},overlayGap:{property:()=>cn.cssVarList.overlayGap},overlayBackgroundColor:{property:()=>cn.cssVarList.overlayBackgroundColor},overlayPadding:{property:()=>cn.cssVarList.overlayPadding},overlayBoxShadow:{property:()=>cn.overlayBoxShadow},overlayOutlineWidth:{property:()=>cn.cssVarList.overlayOutlineWidth},overlayOutlineColor:{property:()=>cn.cssVarList.overlayOutlineColor},overlayOutlineStyle:{property:()=>cn.cssVarList.overlayOutlineStyle},errorMessageIcon:{selector:Zr.componentName,property:Zr.cssVarList.errorMessageIcon},errorMessageIconSize:{selector:Zr.componentName,property:Zr.cssVarList.errorMessageIconSize},errorMessageIconPadding:{selector:Zr.componentName,property:Zr.cssVarList.errorMessageIconPadding},errorMessageIconRepeat:{selector:Zr.componentName,property:Zr.cssVarList.errorMessageIconRepeat},errorMessageIconPosition:{selector:Zr.componentName,property:Zr.cssVarList.errorMessageIconPosition},errorMessageFontSize:{selector:Zr.componentName,property:Zr.cssVarList.errorMessageFontSize},labelFontWeight:{selector:Zr.componentName,property:Zr.cssVarList.labelFontWeight},inputValueFontWeight:{selector:Zr.componentName,property:Zr.cssVarList.inputValueFontWeight},inputPlaceholderFontWeight:{selector:Zr.componentName,property:Zr.cssVarList.inputPlaceholderFontWeight},helperTextFontWeight:{selector:Zr.componentName,property:Zr.cssVarList.helperTextFontWeight},errorMessageFontWeight:{selector:Zr.componentName,property:Zr.cssVarList.errorMessageFontWeight}}}),ro({name:"overlay",selector:"",mappings:{marginTop:{...ln,property:"margin-top"},backgroundColor:{...ln},backdropBackgroundColor:{...dn,property:"background-color"},backdropPointerEvents:{...dn,property:"pointer-events"},padding:{...ln},boxShadow:{...ln},outlineWidth:{...ln},outlineColor:{...ln},outlineStyle:{...ln}}}),$t,_t)(class extends Kr{epoch="";format=Fi;selectedCounterIdx=0;updateCountersDisplay(){this.inputElement.value=this.countersValue}updateValue(){if(this.isCountersOutOfRange)this.resetEpoch();else{const e=Qi[this.format].getDate(this.inputElement.value);this.updateEpoch(ir(e,this.isUtcTime))}}onDateCounterChange=()=>{this.updateCountersDisplay(),this.updateValue(),this.#le()};updateEpoch(e){this.epoch=ir(e,this.isUtcTime)}dateCounters=[new Qr($i,this.onDateCounterChange.bind(this)),new Qr(_i,this.onDateCounterChange.bind(this)),new Qr(Hi,this.onDateCounterChange.bind(this))];static get observedAttributes(){return[].concat(Kr.observedAttributes||[],tn)}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div>\n <descope-text-field inputmode="numeric">\n <span slot="suffix" class="toggle-calendar">\n \n<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M9 5H15V4.50468C15 4.21404 15.226 4 15.5047 4H16.4953C16.786 4 17 4.22595 17 4.50468V5H18.7568C19.3028 5 19.75 5.44725 19.75 5.99896V7.00104C19.75 7.55734 19.3053 8 18.7568 8H5.24317C4.69717 8 4.25 7.55275 4.25 7.00104V5.99896C4.25 5.44266 4.69466 5 5.24317 5H7V4.50468C7 4.21404 7.22596 4 7.50468 4H8.49532C8.78596 4 9 4.22595 9 4.50468V5ZM5.50468 9H6.49532C6.78596 9 7 9.22596 7 9.50468V10.4953C7 10.786 6.77404 11 6.49532 11H5.50468C5.21404 11 5 10.774 5 10.4953V9.50468C5 9.21404 5.22595 9 5.50468 9ZM8.50468 9H9.49532C9.78596 9 10 9.22596 10 9.50468V10.4953C10 10.786 9.77404 11 9.49532 11H8.50468C8.21404 11 8 10.774 8 10.4953V9.50468C8 9.21404 8.22596 9 8.50468 9ZM11.5047 9H12.4953C12.786 9 13 9.22596 13 9.50468V10.4953C13 10.786 12.774 11 12.4953 11H11.5047C11.214 11 11 10.774 11 10.4953V9.50468C11 9.21404 11.226 9 11.5047 9ZM5.50468 12H6.49532C6.78596 12 7 12.226 7 12.5047V13.4953C7 13.786 6.77404 14 6.49532 14H5.50468C5.21404 14 5 13.774 5 13.4953V12.5047C5 12.214 5.22595 12 5.50468 12ZM8.50468 12H9.49532C9.78596 12 10 12.226 10 12.5047V13.4953C10 13.786 9.77404 14 9.49532 14H8.50468C8.21404 14 8 13.774 8 13.4953V12.5047C8 12.214 8.22596 12 8.50468 12ZM11.5047 12H12.4953C12.786 12 13 12.226 13 12.5047V13.4953C13 13.786 12.774 14 12.4953 14H11.5047C11.214 14 11 13.774 11 13.4953V12.5047C11 12.214 11.226 12 11.5047 12ZM5.50468 15H6.49532C6.78596 15 7 15.226 7 15.5047V16.4953C7 16.786 6.77404 17 6.49532 17H5.50468C5.21404 17 5 16.774 5 16.4953V15.5047C5 15.214 5.22595 15 5.50468 15ZM8.50468 15H9.49532C9.78596 15 10 15.226 10 15.5047V16.4953C10 16.786 9.77404 17 9.49532 17H8.50468C8.21404 17 8 16.774 8 16.4953V15.5047C8 15.214 8.22596 15 8.50468 15ZM11.5047 15H12.4953C12.786 15 13 15.226 13 15.5047V16.4953C13 16.786 12.774 17 12.4953 17H11.5047C11.214 17 11 16.774 11 16.4953V15.5047C11 15.214 11.226 15 11.5047 15ZM14.5047 9H15.4953C15.786 9 16 9.22596 16 9.50468V10.4953C16 10.786 15.774 11 15.4953 11H14.5047C14.214 11 14 10.774 14 10.4953V9.50468C14 9.21404 14.226 9 14.5047 9ZM14.5047 12H15.4953C15.786 12 16 12.226 16 12.5047V13.4953C16 13.786 15.774 14 15.4953 14H14.5047C14.214 14 14 13.774 14 13.4953V12.5047C14 12.214 14.226 12 14.5047 12ZM14.5047 15H15.4953C15.786 15 16 15.226 16 15.5047V16.4953C16 16.786 15.774 17 15.4953 17H14.5047C14.214 17 14 16.774 14 16.4953V15.5047C14 15.214 14.226 15 14.5047 15ZM17.5047 15H18.4953C18.786 15 19 15.226 19 15.5047V16.4953C19 16.786 18.774 17 18.4953 17H17.5047C17.214 17 17 16.774 17 16.4953V15.5047C17 15.214 17.226 15 17.5047 15ZM5.50468 18H6.49532C6.78596 18 7 18.226 7 18.5047V19.4953C7 19.786 6.77404 20 6.49532 20H5.50468C5.21404 20 5 19.774 5 19.4953V18.5047C5 18.214 5.22595 18 5.50468 18ZM8.50468 18H9.49532C9.78596 18 10 18.226 10 18.5047V19.4953C10 19.786 9.77404 20 9.49532 20H8.50468C8.21404 20 8 19.774 8 19.4953V18.5047C8 18.214 8.22596 18 8.50468 18ZM11.5047 18H12.4953C12.786 18 13 18.226 13 18.5047V19.4953C13 19.786 12.774 20 12.4953 20H11.5047C11.214 20 11 19.774 11 19.4953V18.5047C11 18.214 11.226 18 11.5047 18ZM14.5047 18H15.4953C15.786 18 16 18.226 16 18.5047V19.4953C16 19.786 15.774 20 15.4953 20H14.5047C14.214 20 14 19.774 14 19.4953V18.5047C14 18.214 14.226 18 14.5047 18ZM17.5047 18H18.4953C18.786 18 19 18.226 19 18.5047V19.4953C19 19.786 18.774 20 18.4953 20H17.5047C17.214 20 17 19.774 17 19.4953V18.5047C17 18.214 17.226 18 17.5047 18ZM17.5047 12H18.4953C18.786 12 19 12.226 19 12.5047V13.4953C19 13.786 18.774 14 18.4953 14H17.5047C17.214 14 17 13.774 17 13.4953V12.5047C17 12.214 17.226 12 17.5047 12ZM17.5047 9H18.4953C18.786 9 19 9.22596 19 9.50468V10.4953C19 10.786 18.774 11 18.4953 11H17.5047C17.214 11 17 10.774 17 10.4953V9.50468C17 9.21404 17.226 9 17.5047 9Z" fill="#808080"/>\n</svg>\n\n </span>\n </descope-text-field>\n <vaadin-popover></vaadin-popover>\n </div>\n ',V('\n :host {\n display: inline-block;\n box-sizing: border-box;\n user-select: none;\n max-width: 100%;\n }\n\n :host ::slotted {\n padding: 0;\n }\n\n .toggle-calendar {\n cursor: pointer;\n display: flex;\n align-self: center;\n z-index: 1;\n height: 100%;\n align-items: center;\n }\n\n :host([readonly="true"]) .toggle-calendar {\n pointer-events: none;\n }\n\n .hidden {\n display: none;\n }\n ',this),this.inputElement=this.shadowRoot.querySelector("descope-text-field"),this.popoverToggleButton=this.inputElement.querySelector(".toggle-calendar")}get validationTarget(){return this.inputElement}get opened(){return"true"===this.getAttribute("opened")}get displayValueEpoch(){const e=Qi[this.format].getDate(this.inputElement.value);return Ji(e?.getTime())?e.getTime():null}get sortedCounters(){return this.format.split(Wi).map(e=>this.dateCounters.find(t=>t.placeholder===e))}get activeCounter(){return this.sortedCounters[this.selectedCounterIdx]}get countersValue(){return this.sortedCounters.map(e=>e.stringValue).join(Wi)}get overlay(){return this.baseElement.shadowRoot?.querySelector("vaadin-popover-overlay")}get backdrop(){return this.overlay.shadowRoot?.querySelector("#backdrop")}get calendar(){return this.overlay?.querySelector("descope-calendar")}get isRTL(){const e=getComputedStyle(this.baseElement).getPropertyValue("direction");return e?"rtl"===e:"rtl"===this.getAttribute("st-host-direction")}get value(){return this.isInvalidDate()?"":this.epoch}set value(e){const t=parseInt(e,10);Number.isNaN(t)?(this.resetEpoch(),this.resetDateCounters(),this.clearInputEle()):(this.updateEpoch(t),this.updateDateCounters(new Date(t)))}resetEpoch(){this.epoch=""}get isCountersEmpty(){return this.dateCounters.every(e=>e.isEmpty)}get isCountersOutOfRange(){return this.dateCounters.some(e=>!e.isInRange(e.numberValue))}get disableCalendar(){return"true"===this.getAttribute("disable-calendar")}get isUtcTime(){return"true"===this.getAttribute("utc-time")}get isSelectAll(){const e=this.inputElement.baseElement.inputElement;return e.value.length===e.selectionStart+e.selectionEnd}reportValidity(){this.inputElement.reportValidity()}#le(){this.inputElement.baseElement.dispatchEvent(new Event("input",{bubbles:!0}))}updateInputDisplay(){this.inputElement.value=Xi(Ui(this.countersValue).getTime(),this.format)}init(){super.init?.(),this.updateFormatPattern(),this.initPopover(),this.onDateCounterChange(),this.initInputElement(),setTimeout(()=>{this.#ee()},0)}initInputElement(){this.inputElement.getValidity=this.getValidity.bind(this),this.inputElement.baseElement.checkValidity=this.checkValidity.bind(this),this.popoverToggleButton.addEventListener("click",this.onPopoverToggle.bind(this)),this.inputElement.addEventListener("focus",this.onFocus.bind(this)),this.inputElement.addEventListener("blur",this.onBlur.bind(this)),this.inputElement.addEventListener("click",this.handleMouseCaretPositionChange.bind(this)),this.inputElement.addEventListener("keydown",this.handleKeyboard.bind(this)),this.inputElement.addEventListener("beforeinput",this.handleInput.bind(this)),this.inputElement.addEventListener("pointerdown",this.onPointerDown.bind(this)),this.inputElement.addEventListener("paste",this.onPaste.bind(this)),Xe(this,this.inputElement,{includeAttrs:["label","label-type","placeholder","disabled","readonly","bordered","required","full-width","st-host-direction","pattern","bordered","data-errormessage-value-missing","data-errormessage-pattern-mismatch","data-errormessage-range-underflow","data-errormessage-range-overflow","st-error-message-icon","st-error-message-icon-size","st-error-message-icon-padding"]})}handleInput(e){var t;e.preventDefault(),this.handleSelectAll(),e.data&&(t=e.data,String(t||"").trim()&&!Number.isNaN(Number(t)))?(this.parseDigits(e.data),this.updateCountersDisplay()):e.inputType&&this.handleNavKeys(e)}initPopover(){this.baseElement.trigger=["click"],this.baseElement.withBackdrop=!0,this.baseElement.renderer=this.#de.bind(this),this.baseElement.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation()})}handleSelectAll(){this.isSelectAll&&this.selectFirstCounter()}#ce;#de(e){e.firstChild||(this.overlay.positionTarget=this.shadowRoot.querySelector(".toggle-calendar"),e.appendChild(this.#pe()),(e=>{const t=new CSSStyleSheet;t.insertRule(":host{display:block!important;}"),e?.shadowRoot?.adoptedStyleSheets?.push(t)})(this.baseElement),this.backdrop.addEventListener("click",this.closePopover.bind(this))),e.style.setProperty("visibility","hidden"),setTimeout(()=>{this.#he(e),e.style.setProperty("visibility","visible"),this.updateCalendarView(e)},100)}#he(){const e=this.shadowRoot.querySelector("vaadin-popover").shadowRoot;this.#ce?.replaceSync("vaadin-popover-overlay::part(overlay) { transform: none; }");const t=document.body.getBoundingClientRect(),o=this.getBoundingClientRect(),i=this.calendar.getBoundingClientRect(),r=this.isRTL?"right":"left",n=o[r]-i[r],s=i.left,a=t.width-i.right;let l;l=n>0?Math.min(n,a):-1*Math.min(Math.abs(n),s);const d=`\n vaadin-popover-overlay::part(overlay) {\n transform: translateX(${l}px);\n }\n `;this.#ce?this.#ce.replaceSync(d):this.#ce=V(d,e)}#pe(){const e=document.createElement("span");e.innerHTML="<descope-calendar></descope-calendar>";const t=e.querySelector("descope-calendar");return t.addEventListener("date-submit",this.onCalendarSubmit.bind(this)),t.addEventListener("cancel",this.closePopover.bind(this)),e}#ee(){this.overlay._attachOverlay=()=>this.overlay.bringToFront(),this.overlay._detachOverlay=()=>{},this.overlay._enterModalState=()=>{}}onPopoverToggle(){this.opened?this.closePopover():this.openPopover()}openPopover(){this.disableCalendar||this.setAttribute("opened","true")}closePopover(){this.removeAttribute("opened"),this.inputElement.focus()}getCounterById(e){return this.dateCounters.find(t=>t.id===e)}onCalendarSubmit(){if(!this.isReadOnly){if(!this.calendar.value)return;const e=Ui(this.calendar.value);this.value=ir(e,this.isUtcTime),this.getCounterById("year").replaceValue(e.getFullYear()),this.getCounterById("month").replaceValue(e.getMonth()+1),this.getCounterById("day").replaceValue(e.getDate()),this.#le()}this.closePopover()}updateCalendarView(){const e=Ji(Ui(this.inputElement.value||"").getTime())&&Qi[this.format].validate(this.inputElement.value);this.displayValueEpoch||e?this.calendar.setAttribute("initial-value",Xi(this.displayValueEpoch||this.epoch,Ri)):(this.calendar.clearValue(),this.calendar.setAttribute("preview",Xi(er(),Ri))),Xe(this,this.calendar,{includeAttrs:["st-host-direction","readonly","initial-month","initial-year","years-range","calendar-label-submit","calendar-label-cancel","calendar-months","calendar-weekdays","calendar-weekdays-short"]})}onPointerDown(e){setTimeout(()=>this.handleMouseCaretPositionChange(e),150)}onFocus(){this.isReadOnly||setTimeout(()=>this.resetDisplay())}resetDisplay(){this.inputElement.value||(this.inputElement.value=this.format),this.selectFirstCounter(),this.inputElement.setSelectionRange(0,this.sortedCounters[0].length)}onBlur(){this.opened||this.inputElement.value===this.format&&this.clearInputEle()}clearInputEle(){this.inputElement.value=""}onFormatUpdate(e){Object.keys(Qi).includes(e)&&(this.format=e,this.updateFormatPattern())}updateFormatPattern(){const e=this.getAttribute("format")||this.format||Fi;this.setAttribute("type","date"),this.setAttribute("pattern",Qi[e].pattern)}parseDigits(e){this.activeCounter.add(e),this.activeCounter.isFull&&this.selectNextCounter(),this.setInputSelectionRange()}getCounterIdx(e){const[t,o]=this.sortedCounters.map(e=>e.length);return[e<=t,e>=t&&e<=t+o+1,e>=t+o+2].indexOf(!0)}setSelectedCounterByCaretPosition(e){this.selectedCounterIdx=this.getCounterIdx(e.target?.selectionStart||this.inputElement.selectionStart)}selectFirstCounter(){this.selectedCounterIdx=0}selectNextCounter(){this.selectedCounterIdx<this.dateCounters.length&&(this.selectedCounterIdx=Math.min(this.selectedCounterIdx+1,2))}selectPrevCounter(){this.selectedCounterIdx>0&&(this.selectedCounterIdx=Math.min(this.selectedCounterIdx-1,1))}setInputSelectionRange(){this.selectedCounterIdx<0||setTimeout(()=>{const e=this.sortedCounters.slice(0,this.selectedCounterIdx).reduce((e,t)=>e+t.length,this.selectedCounterIdx);this.inputElement.setSelectionRange(e,e+this.sortedCounters[this.selectedCounterIdx].length)})}resetDateCounters(){this.dateCounters.forEach(e=>e.clear())}updateDateCounters(e){this.dateCounters.forEach(t=>{switch(t.id){case $i.id:t.set(this.isUtcTime?e.getUTCMonth()+1:e.getMonth()+1);break;case Hi.id:t.set(this.isUtcTime?e.getUTCFullYear():e.getFullYear());break;case _i.id:t.set(this.isUtcTime?e.getUTCDate():e.getDate())}})}handleKeyboard(e){e.metaKey||e.ctrlKey?"x"===e.key.toLowerCase()&&this.onCut(e):(this.handleSelectAll(),"ArrowUp"===e.key?this.activeCounter.inc():"ArrowDown"===e.key?this.activeCounter.dec():"ArrowRight"===e.key?this.selectNextCounter():"ArrowLeft"===e.key&&this.selectPrevCounter(),this.setInputSelectionRange())}handleNavKeys(e){this.isReadOnly||(this.opened&&this.closePopover(),this.activeCounter&&("deleteContentBackward"===e.inputType&&this.handleBackspace(),this.setInputSelectionRange()))}handleBackspace(){if(this.isSelectAll)return void this.resetToInitialState();const e=this.activeCounter;e.isEmpty?(this.selectPrevCounter(),this.setInputSelectionRange()):e.set(""),setTimeout(()=>{this.updateCountersDisplay(),this.setInputSelectionRange()})}handleMouseCaretPositionChange(e){this.opened||(e.preventDefault(),this.setSelectedCounterByCaretPosition(e),this.setInputSelectionRange())}onInitialValueChange(e){this.value||setTimeout(()=>{Number.isNaN(parseInt(e,10))||(this.value=Number(e))})}togglePopoverAccess(e){e?this.popoverToggleButton.classList.remove("hidden"):this.popoverToggleButton.classList.add("hidden")}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),t!==o&&("disable-calendar"===e&&this.togglePopoverAccess("true"!==o),Xr.includes(e)?(o&&"format"===e&&this.onFormatUpdate(o),"initial-value"===e&&this.onInitialValueChange(o)):en.includes(e)&&(o?this.calendar?.setAttribute(e,o):this.calendar?.removeAttribute(e)))}isInvalidDate(){const e=this.getCounterById("year"),t=e.numberValue>Yi||e.numberValue<qi,o=Object.entries(this.getDateVals()).some(([e,t])=>{const o=this.getCounterById(e);return!t||o.numberValue!==t});return t||o}getValidity(){return this.isRequired&&this.isCountersEmpty?{valueMissing:!0}:this.isCountersOutOfRange||this.isInvalidDate()?{patternMismatch:!0}:{}}getDateVals(){const e={day:"",month:"",year:""};if(Number.isNaN(this.epoch))return e;try{const t=new Date(this.epoch);this.isUtcTime?(e.month=t.getUTCMonth()+1,e.day=t.getUTCDate(),e.year=t.getUTCFullYear()):(e.month=t.getMonth()+1,e.day=t.getDate(),e.year=t.getFullYear())}catch(e){}return e}resetToInitialState(){this.resetDateCounters(),this.selectFirstCounter(),this.resetDisplay()}onCut(e){e.preventDefault(),this.isSelectAll?(this.#ue(this.countersValue),this.resetToInitialState()):(this.#ue(this.activeCounter.stringValue),this.activeCounter.set("")),this.setInputSelectionRange()}#ue(e){try{navigator.clipboard.writeText(e)}catch(e){console.error("Failed to copy date value:",e)}}onPaste(e){e.preventDefault();const t=(e.clipboardData||window.clipboardData).getData("Text"),o=((e,t)=>{const o=e.trim?.();return o?Qi[t].getDate(o):null})(t,this.format);if(o)this.value=ir(o,this.isUtcTime),this.onDateCounterChange(),setTimeout(()=>this.inputElement.setSelectionRange(0,this.inputElement.value.length));else{const e=Number(t);e&&this.activeCounter.min<=e&&this.activeCounter.max>=e&&(this.activeCounter.set(String(e)),setTimeout(()=>this.setInputSelectionRange()))}}});customElements.define(Jr,cn);const pn=Je("divider");class hn extends(Gt({componentName:pn,baseSelector:":host > div"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t\t<div>\n\t\t\t\t<descope-text>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</descope-text>\n\t\t\t</div>\n\t\t",V("\n \t:host {\n\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t}\n\t\t\t\t:host > div {\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\theight: 100%;\n\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\t\t\t\t:host > div::before,\n\t\t\t\t:host > div::after {\n\t\t\t\t\tcontent: '';\n\t\t\t\t\tflex-grow: 1;\n\t\t\t\t}\n\t\t\t\tdescope-text {\n\t\t\t\t\tflex-grow: 0;\n\t\t\t\t\tflex-shrink: 0;\n\t\t\t\t}\n\t\t\t\t:host(:empty) descope-text {\n\t\t\t\t\tdisplay: none;\n\t\t\t\t}\n\t\t\t\t:host([vertical=\"true\"]) div {\n\t\t\t\t\twidth: fit-content;\n\t\t\t\t}\n ",this),this.textComponent=this.shadowRoot.querySelector("descope-text"),Xe(this,this.textComponent,{includeAttrs:["mode","variant","italic"]})}}const un=ko.cssVarList,{host:gn,before:mn,after:bn,text:yn}={host:{selector:()=>":host"},before:{selector:"::before"},after:{selector:"::after"},text:{selector:"descope-text"}},fn=_e(jt({mappings:{hostWidth:{...gn,property:"width"},hostPadding:{...gn,property:"padding"},hostDirection:{...yn,property:"direction"},minHeight:{},alignItems:{},alignSelf:{},flexDirection:{},textAlign:{...yn,property:un.textAlign},labelTextWidth:{...yn,property:"width"},labelTextMaxWidth:{...yn,property:"max-width"},labelTextVerticalSpacing:[{...yn,property:"padding-top"},{...yn,property:"padding-bottom"}],labelTextHorizontalSpacing:[{...yn,property:"padding-right"},{...yn,property:"padding-left"}],stripeColor:[{...mn,property:"background-color"},{...bn,property:"background-color"}],stripeHorizontalThickness:[{...mn,property:"height"},{...bn,property:"height"}],stripeVerticalThickness:[{...mn,property:"width"},{...bn,property:"width"}],stripeColorOpacity:[{...mn,property:"opacity"},{...bn,property:"opacity"}]}}),$t,_t)(hn);customElements.define(pn,fn);const vn=Je("email-field"),xn=_e(jt({mappings:Yr}),$t,ao({inputType:"email",inputName:"email",autocompleteType:"username",includeAttrs:["disabled","readonly","pattern"]}),io({proxyProps:["value","selectionStart"],useProxyTargets:!0}),_t,e=>class extends e{init(){super.init?.(),this.baseElement.setAttribute("pattern","^[\\w\\.\\%\\+\\-']+@[\\w\\.\\-]+\\.[A-Za-z]{2,}$"),this.getAttribute("autocomplete")||this.setAttribute("autocomplete","username"),this.createExternalInput()}})(Qt({slots:["","suffix"],wrappedEleName:"vaadin-email-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${xn.cssVarList.inputOutlineWidth}) + var(${xn.cssVarList.inputOutlineOffset}));\n box-sizing: border-box;\n\t\t\t}\n ${xt("vaadin-email-field")}\n\t\t\t${ut(xn.cssVarList)}\n\t\t\t${vt("vaadin-email-field",xn.cssVarList)}\n \n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n \n\n vaadin-email-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-email-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n\n :host ::slotted(*) {\n -webkit-mask-image: none;\n }\n\n vaadin-email-field[external-input="true"] > input:not(:placeholder-shown) {\n opacity: 0;\n }\n\t\t`,excludeAttrsSync:["tabindex","style"],componentName:vn}));customElements.define(vn,xn);const Cn=({componentName:e,varName:t,fallbackVarName:o})=>{let i;class r extends(Gt({componentName:e,baseSelector:":host > div"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t\t<div></div>\n\t\t\t",V(`\n\t\t\t\t:host {\n\t\t\t\t\tdisplay: inline-flex;\n\t\t\t\t}\n\t\t\t\t:host([draggable="true"]) > div {\n\t\t\t\t\tpointer-events: none\n\t\t\t\t}\n\t\t\t\t:host > div {\n\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\tmax-width: 100%;\n\t\t\t\t\tmax-height: 100%;\n\t\t\t\t\tobject-fit: contain;\n\t\t\t\t\tmargin: auto;\n\t\t\t\t\t${i}\n\t\t\t\t}\n `,this)}}const n=_e(jt({mappings:{height:{selector:()=>":host > div"},width:{selector:()=>":host > div"},[t]:{property:"content"},[o]:{property:"content"}}}),$t,_t)(r);return i=`content: var(${n.cssVarList[t]}, var(${n.cssVarList[o]}));`,n},wn=Je("logo"),In=Cn({componentName:wn,varName:"url",fallbackVarName:"fallbackUrl"});customElements.define(wn,In);const Sn=Je("totp-image"),Mn=Cn({componentName:Sn,varName:"url",fallbackVarName:"fallbackUrl"});customElements.define(Sn,Mn);const An=Je("notp-image"),En=Cn({componentName:An,varName:"url",fallbackVarName:"fallbackUrl"});customElements.define(An,En);const Tn=Je("number-field"),kn=_e(jt({mappings:Yr}),$t,io({proxyProps:["value","selectionStart"]}),_t)(Qt({slots:["","prefix","suffix"],wrappedEleName:"vaadin-number-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${kn.cssVarList.inputOutlineWidth}) + var(${kn.cssVarList.inputOutlineOffset}));\n\t\t\t}\n ${xt("vaadin-number-field")}\n\t\t\t${ut(kn.cssVarList)}\n\t\t\t${vt("vaadin-number-field",kn.cssVarList)}\n \n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n \n\n vaadin-number-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-number-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n\t\t`,excludeAttrsSync:["tabindex","style"],componentName:Tn}));customElements.define(Tn,kn);const zn="--descope-input-mask-content",Ln="--descope-input-mask-display",Vn="--descope-input-mask-fallback",Nn=e=>{e?.focus(),e?.setSelectionRange?.(1,1)},Dn=e=>e.replace(/\D/g,"")||"",Pn=(e,t)=>{t?(e.style.setProperty(zn,`"${t}"`),e.style.setProperty(Ln,"flex")):(e.style.removeProperty(zn),e.style.removeProperty(Ln))},Bn=Je("passcode-internal"),Fn=["digits","loading"],Rn=["disabled","bordered","size","invalid","readonly","aria-labelledby"],Wn=co({componentName:Bn,baseSelector:"div"}),On=Je("passcode"),jn=["digits"],{host:$n,digitField:_n,label:Hn,requiredIndicator:qn,internalWrapper:Yn,focusedDigitField:Un,errorMessage:Gn}={host:{selector:()=>":host"},focusedDigitField:{selector:()=>`${Zr.componentName}[focused="true"]`},digitField:{selector:()=>Zr.componentName},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},internalWrapper:{selector:"descope-passcode-internal .wrapper"},errorMessage:{selector:"::part(error-message)"}},Zn=Zr.cssVarList,Qn=ii.cssVarList,Jn=_e(jt({mappings:{fontSize:[{..._n,property:Zn.fontSize},$n],hostWidth:{property:"width"},hostDirection:{...$n,property:"direction"},fontFamily:[$n,{...Hn}],labelFontWeight:{...Hn,property:"font-weight"},errorMessageFontWeight:{...Gn,property:"font-weight"},digitValueFontWeight:{selector:Zr.componentName,property:Zn.inputValueFontWeight},labelTextColor:[{...Hn,property:"color"},{...Hn,property:"-webkit-text-fill-color"},{...qn,property:"color"},{...qn,property:"-webkit-text-fill-color"}],labelRequiredIndicator:{...qn,property:"content"},errorMessageTextColor:{...Gn,property:"color"},errorMessageIcon:{...Gn,property:"background-image"},errorMessageIconSize:{...Gn,property:"background-size"},errorMessageIconPadding:{...Gn,property:"padding-inline-start"},errorMessageIconRepeat:{...Gn,property:"background-repeat"},errorMessageIconPosition:{...Gn,property:"background-position"},errorMessageFontSize:{...Gn,property:"font-size"},digitValueTextColor:{selector:Zr.componentName,property:Zn.inputValueTextColor},digitSize:[{..._n,property:"height"},{..._n,property:"width"}],digitPadding:{..._n,property:Zn.inputHorizontalPadding},digitTextAlign:{..._n,property:Zn.inputTextAlign},digitCaretTextColor:{..._n,property:Zn.inputCaretTextColor},digitSpacing:{...Yn,property:"gap"},digitOutlineColor:{..._n,property:Zn.inputOutlineColor},digitOutlineWidth:{..._n,property:Zn.inputOutlineWidth},focusedDigitFieldOutlineColor:{...Un,property:Zn.inputOutlineColor},overlayOpacity:{...Yn,property:"opacity"},spinnerSize:{selector:ii.componentName,property:Qn.spinnerSize}}}),$t,lo,io({proxyProps:["value","selectionStart"]}),_t,e=>class extends e{static get observedAttributes(){return jn.concat(e.observedAttributes||[])}get digits(){return Number.parseInt(this.getAttribute("digits"),10)||6}init(){super.init?.(),V("\n .wrapper {\n display: flex;\n width: 100%;\n justify-content: space-between;\n direction: ltr;\n position: relative;\n }\n\n descope-text-field {\n direction: ltr;\n }\n\n .loader-container {\n display: none;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n ",this);const e=document.createElement("template");e.innerHTML=`\n <${Bn}\n bordered="true"\n name="code"\n tabindex="-1"\n slot="input"\n role="textbox"\n ><slot></slot></${Bn}>\n `,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(Bn),Xe(this,this.inputElement,{includeAttrs:["digits","size","loading","disabled"]})}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),"digits"===e&&(this.style["--passcode-digits-count"]=o)}})(Qt({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tmin-width: calc(var(--passcode-digits-count) * 2em);\n\t\t\t}\n\t\t\t\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n\n\t\t\t:host::after {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\t\t\t:host::part(input-field)::after {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\n :host([loading="true"]) descope-passcode-internal .loader-container {\n display: block;\n }\n\n\t\t\tdescope-passcode-internal {\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tmin-height: initial;\n\t\t\t}\n\n\t\t\tdescope-passcode-internal .wrapper {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tmin-height: initial;\n\t\t\t\theight: 100%;\n\t\t\t\tjustify-content: space-between;\n\t\t\t}\n\n\t\t\tdescope-passcode-internal descope-text-field {\n\t\t\t\tmin-width: 2em;\n\t\t\t\tmax-width: var(${Zn.inputHeight});\n\t\t\t}\n\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tbackground-color: transparent;\n\t\t\t\tpadding: 0;\n\t\t\t\toverflow: hidden;\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t}\n\n /* safari */\n\t\t\tvaadin-text-field::part(input-field)::after {\n opacity: 0;\n }\n\n\t\t\tvaadin-text-field {\n\t\t\t\tmargin: 0;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\tvaadin-text-field::before {\n\t\t\t\theight: 0;\n\t\t\t}\n\n\t\t\tvaadin-text-field[readonly] > input:placeholder-shown {\n\t\t\t\topacity: 1;\n\t\t\t}\n\n\t\t\tvaadin-text-field[readonly]::part(input-field)::after {\n\t\t\t\tborder: 0 solid;\n\t\t\t}\n\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\n ${xt("vaadin-text-field")}\n\t\t\t${bt("vaadin-text-field")}\n \t`,excludeAttrsSync:["tabindex","style"],componentName:On}));customElements.define(Bn,class extends Wn{static get observedAttributes(){return Fn.concat(Wn.observedAttributes||[])}constructor(){super(),this.innerHTML='\n\t\t<div class="wrapper"></div>\n\t\t<div class="loader-container">\n <descope-loader-radial size="xs" mode="primary"></descope-loader-radial>\n </div>\n\t\t',this.wrapperEle=this.querySelector(".wrapper"),this.loaderContainer=this.querySelector(".loader-container")}renderInputs(){const e=[...Array(this.digits).keys()].map(e=>`\n\t\t<descope-text-field\n\t\t\tdata-id=${e}\n\t\t\ttype="tel"\n\t\t\tautocomplete="one-time-code"\n\t\t\tinputMode="numeric"\n\t\t></descope-text-field>\n\t`);this.wrapperEle.innerHTML=e.join(""),this.inputs=Array.from(this.querySelectorAll("descope-text-field")),this.initInputs()}handleLoadingState(e){e?this.setAttribute("inert","true"):this.removeAttribute("inert")}get digits(){return Number.parseInt(this.getAttribute("digits"),10)||6}get value(){return this.inputs?.map(({value:e})=>e).join("")||""}set value(e){e!==this.value&&this.parseInputValue(this.inputs[0],Dn(e))}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:this.pattern&&!new RegExp(this.pattern).test(this.value)?{patternMismatch:!0}:{}}init(){this.addEventListener("focus",e=>{e.isTrusted&&this.inputs[0].focus()}),super.init?.(),this.renderInputs()}getInputIdx(e){return Number.parseInt(e.getAttribute("data-id"),10)}getNextInput(e){const t=this.getInputIdx(e),o=Math.min(t+1,this.inputs.length-1);return this.inputs[o]}getPrevInput(e){const t=this.getInputIdx(e),o=Math.max(t-1,0);return this.inputs[o]}fillDigits(e,t){for(let o=0;o<e.length;o+=1){t.value=e[o]??"";const i=this.getNextInput(t);if(i===t)break;t=i}Nn(t)}parseInputValue(e,t=""){const o=t.split("");o.length?this.fillDigits(o,e):e.value=""}initInputs(){this.inputs.forEach(e=>{V(`\n vaadin-text-field::part(input-field)::before {\n ${Vn}: '';\n content: var(${zn}, var(${Vn}));\n position: absolute;\n width: 100%;\n height: 100%;\n display: var(${Ln}, none);\n align-items: center;\n justify-content: center;\n }`,e);const t=n()(t=>{this.parseInputValue(e,t),Pn(e)},0,{trailing:!0});e.addEventListener("input",o=>{e.value=Dn(e.value),e.value&&Pn(e,e.value[0]),setTimeout(()=>{"deleteContentBackward"===o?.inputType&&Nn(this.getPrevInput(e))}),t(e.value)}),e.onkeydown=({key:t})=>{"Backspace"===t?e.value?e.setSelectionRange(1,1):setTimeout(()=>Nn(this.getPrevInput(e)),0):1===t.length&&(e.value="")},Xe(this,e,{includeAttrs:Rn}),e.shadowRoot.querySelector("input").setAttribute("aria-label","passcode digit")}),this.handleFocusEventsDispatching(this.inputs),this.handleInputEventDispatching()}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),t!==o&&Fn.includes(e)&&("digits"===e&&this.renderInputs(),"loading"===e&&this.handleLoadingState("true"===o))}get pattern(){return`^$|^\\d{${this.digits},}$`}}),customElements.define(On,Jn);const Kn=Je("password"),{host:Xn,inputField:es,inputElement:ts,inputElementPlaceholder:os,revealButtonContainer:is,revealButtonIcon:rs,label:ns,requiredIndicator:ss,errorMessage:as,helperText:ls}={host:{selector:()=>":host"},inputField:{selector:"::part(input-field)"},inputElement:{selector:"> input"},inputElementPlaceholder:{selector:()=>":host input:placeholder-shown"},revealButtonContainer:{selector:"::part(reveal-button)"},revealButtonIcon:{selector:"::part(reveal-button)::before"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},ds=_e(jt({mappings:{hostWidth:{...Xn,property:"width"},hostMinWidth:{...Xn,property:"min-width"},hostDirection:{...Xn,property:"direction"},fontSize:[{},Xn],fontFamily:[ns,es,as,ls],inputHeight:{...es,property:"height"},inputHorizontalPadding:[{...ts,property:"padding-left"},{...ts,property:"padding-right"}],inputBackgroundColor:{...es,property:"background-color"},inputBorderStyle:{...es,property:"border-style"},inputBorderWidth:{...es,property:"border-width"},inputBorderColor:{...es,property:"border-color"},inputBorderRadius:{...es,property:"border-radius"},inputOutlineColor:{...es,property:"outline-color"},inputOutlineStyle:{...es,property:"outline-style"},inputOutlineOffset:{...es,property:"outline-offset"},inputOutlineWidth:{...es,property:"outline-width"},labelFontSize:{...ns,property:"font-size"},labelFontWeight:{...ns,property:"font-weight"},inputValueFontWeight:[{...ts,property:"font-weight"},{selector:()=>":host ::slotted(input)",property:"font-weight"}],inputPlaceholderFontWeight:[{...os,property:"font-weight"},{selector:()=>":host ::slotted(input:placeholder-shown)",property:"font-weight"}],helperTextFontWeight:{...ls,property:"font-weight"},errorMessageFontWeight:{...as,property:"font-weight"},labelTextColor:[{...ns,property:"color"},{...ns,property:"-webkit-text-fill-color"},{...ss,property:"color"},{...ss,property:"-webkit-text-fill-color"}],labelRequiredIndicator:{...ss,property:"content"},errorMessageTextColor:{...as,property:"color"},errorMessageIcon:{...as,property:"background-image"},errorMessageIconSize:{...as,property:"background-size"},errorMessageIconPadding:{...as,property:"padding-inline-start"},errorMessageIconRepeat:{...as,property:"background-repeat"},errorMessageIconPosition:{...as,property:"background-position"},errorMessageFontSize:{...as,property:"font-size"},inputPlaceholderTextColor:[{...os,property:"color"},{selector:()=>":host ::slotted(input:placeholder-shown)",property:"color"}],inputValueTextColor:[{...ts,property:"color"},{selector:()=>":host ::slotted(input)",property:"color"}],revealButtonOffset:[{...is,property:"margin-right"},{...is,property:"margin-left"}],revealButtonSize:{...is,property:"font-size"},revealButtonColor:{...rs,property:"color"},labelPosition:{...ns,property:"position"},labelTopPosition:{...ns,property:"top"},labelHorizontalPosition:[{...ns,property:"left"},{...ns,property:"right"}],inputTransformY:{...ns,property:"transform"},inputTransition:{...ns,property:"transition"},marginInlineStart:{...ns,property:"margin-inline-start"},placeholderOpacity:[{selector:"> input:placeholder-shown",property:"opacity"},{...ts,property:"opacity"}],inputVerticalAlignment:{...es,property:"align-items"},valueInputHeight:{...ts,property:"height"}}}),$t,ao({inputType:"password",inputName:"password",includeAttrs:["disabled","readonly","pattern","type","autocomplete"],noBlurDispatch:!0}),io({proxyProps:["value","selectionStart"],useProxyTargets:!0}),_t,e=>class extends e{get isReadOnly(){return this.hasAttribute("readonly")&&"false"!==this.getAttribute("readonly")}init(){super.init?.();const e=this.querySelector("input");e?.addEventListener("mousedown",t=>{if(this.isDraggable&&this.isReadOnly){e.setAttribute("inert","true");const o=t.target,i=o.getAttribute("type");o.setAttribute("type","text"),setTimeout(()=>{o.focus()});const r=t=>{o.setAttribute("type",i),e.removeAttribute("inert"),this.removeEventListener("mouseup",r),this.removeEventListener("dragend",r)};this.addEventListener("dragend",r,{once:!0}),this.addEventListener("mouseup",r,{once:!0})}})}},e=>class extends e{static get observedAttributes(){return["manual-visibility-toggle"]}get manualToggleVisibility(){return"true"===this.getAttribute("manual-visibility-toggle")}init(){super.init?.(),this.handleCaretOnVisibilityChange(),this.origSetPasswordVisible=this.baseElement._setPasswordVisible,this.origSetFocused=this.baseElement._setFocused,this.baseElement._setFocused=this.setFocus.bind(this),this.initExternalInput()}initExternalInput(){const e=this.createExternalInput();e&&this.handlePasswordVisibility(e)}get caretPosition(){return this.value?.length||0}handleCaretOnVisibilityChange(){const e=this.baseElement._togglePasswordVisibility.bind(this.baseElement);this.baseElement._togglePasswordVisibility=()=>{setTimeout(()=>(e(),this.inputElement.setSelectionRange(this.caretPosition,this.caretPosition),!1))}}setFocus(e){this.manualToggleVisibility&&(this.baseElement._setPasswordVisible=()=>{}),this.origSetFocused.call(this.baseElement,e),this.baseElement._setPasswordVisible=this.origSetPasswordVisible.bind(this.baseElement)}resetPasswordVisibilityToggle(){this.baseElement._setPasswordVisible=this.origSetPasswordVisible,this.baseElement._setFocused=this.origSetFocus}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o)}handlePasswordVisibility(e){const t=this.baseElement.__boundRevealButtonMouseDown;this.baseElement.querySelector("vaadin-password-field-button").removeEventListener("mousedown",t),this.baseElement._passwordVisibleChanged=()=>{},this.baseElement._togglePasswordVisibility=()=>{"password"===e.getAttribute("type")?this.showPasswordVisibility(e):this.hidePasswordVisibility(e)}}showPasswordVisibility(e){e.setAttribute("type","text"),this.setAttribute("password-visible","true")}hidePasswordVisibility(e){e.setAttribute("type","password"),this.setAttribute("password-visible","false")}})(Qt({slots:["","suffix"],wrappedEleName:"vaadin-password-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tmin-width: 10em;\n box-sizing: border-box;\n position: relative;\n\t\t\t}\n\t\t\t${ut(ds.cssVarList)}\n\t\t\t${bt("vaadin-password-field")}\n ${xt("vaadin-password-field")}\n\n\t\t\tvaadin-password-field {\n\t\t\t\twidth: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tpadding: 0;\n\t\t\t}\n\t\t\tvaadin-password-field > input {\n -webkit-mask-image: none;\n\t\t\t\tbox-sizing: border-box;\n opacity: 1;\n\t\t\t}\n\t\t\tvaadin-password-field::part(input-field) {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tpadding: 0;\n\t\t\t}\n\t\t\tvaadin-password-field[focus-ring]::part(input-field) {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n :host ::slotted(input) {\n\t\t\t\tmin-height: 0;\n }\n :host([readonly]) ::slotted(input:placeholder-shown) {\n\t\t\t\topacity: 0;\n\t\t\t}\n\t\t\tvaadin-password-field::before {\n\t\t\t\theight: initial;\n\t\t\t}\n\t\t\tvaadin-password-field::part(input-field)::after {\n\t\t\t\topacity: 0;\n\t\t\t}\n\t\t\tvaadin-password-field-button {\n\t\t\t\tcursor: pointer;\n\t\t\t}\n\t\t\t:host([readonly]) vaadin-password-field-button {\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\t\t\tvaadin-password-field-button[focus-ring] {\n\t\t\t\tbox-shadow: 0 0 0 2px var(${ds.cssVarList.inputOutlineColor});\n\t\t\t}\n\n \n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n \n\n ::part(reveal-button) {\n align-self: center;\n }\n\n vaadin-password-field[external-input="true"] > input:not(:placeholder-shown) {\n opacity: 0;\n }\n\t\t`,excludeAttrsSync:["tabindex","style"],componentName:Kn}));customElements.define(Kn,ds);const cs=Je("text-area"),{host:ps,label:hs,placeholder:us,inputField:gs,textArea:ms,requiredIndicator:bs,helperText:ys,errorMessage:fs}={host:{selector:()=>":host"},label:{selector:"::part(label)"},placeholder:{selector:"textarea:placeholder-shown"},inputField:{selector:"::part(input-field)"},textArea:{selector:"> textarea"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},vs=_e(jt({mappings:{hostWidth:{...ps,property:"width"},hostMinWidth:{...ps,property:"min-width"},hostDirection:{...ps,property:"direction"},fontSize:[ps,ms],fontFamily:[hs,gs,ys,fs],labelFontSize:{...hs,property:"font-size"},labelFontWeight:{...hs,property:"font-weight"},inputValueFontWeight:{...ms,property:"font-weight"},inputPlaceholderFontWeight:{...us,property:"font-weight"},helperTextFontWeight:{...ys,property:"font-weight"},errorMessageFontWeight:{...fs,property:"font-weight"},labelTextColor:[{...hs,property:"color"},{...hs,property:"-webkit-text-fill-color"},{...bs,property:"color"}],labelRequiredIndicator:{...bs,property:"content"},errorMessageTextColor:{...fs,property:"color"},errorMessageIcon:{...fs,property:"background-image"},errorMessageIconSize:{...fs,property:"background-size"},errorMessageIconPadding:{...fs,property:"padding-inline-start"},errorMessageIconRepeat:{...fs,property:"background-repeat"},errorMessageIconPosition:{...fs,property:"background-position"},errorMessageFontSize:{...fs,property:"font-size"},inputBackgroundColor:{...gs,property:"background-color"},inputValueTextColor:{...ms,property:"color"},inputPlaceholderTextColor:{...us,property:"color"},inputBorderWidth:{...gs,property:"border-width"},inputBorderStyle:{...gs,property:"border-style"},inputBorderColor:{...gs,property:"border-color"},inputBorderRadius:{...gs,property:"border-radius"},inputOutlineStyle:{...gs,property:"outline-Style"},inputOutlineColor:{...gs,property:"outline-color"},inputOutlineOffset:{...gs,property:"outline-offset"},inputOutlineWidth:{...gs,property:"outline-width"},inputResizeType:{...ms,property:"resize"},inputMinHeight:{...ms,property:"min-height"},inputTextAlign:{...ms,property:"text-align"}}}),$t,io({proxyProps:["value","selectionStart"]}),_t)(Qt({slots:[],wrappedEleName:"vaadin-text-area",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n box-sizing: border-box;\n\t\t\t}\n\t\t\ttextarea {\n\t\t\t\theight: 100%;\n\t\t\t}\n ${xt("vaadin-text-area")}\n\t\t\t${ut(vs.cssVarList)}\n\t\t\t${gt("vaadin-text-area")}\n\t\t\t${mt("vaadin-text-area")}\n\t\t\t${yt("vaadin-text-area","textarea")}\n\t\t\t${bt("vaadin-text-area")}\n\t\t`,excludeAttrsSync:["tabindex","style"],componentName:cs}));customElements.define(cs,vs);var xs=[{name:"United States",dialCode:"+1",code:"US"},...[{name:"Afghanistan",dialCode:"+93",code:"AF"},{name:"Aland Islands",dialCode:"+358",code:"AX"},{name:"Albania",dialCode:"+355",code:"AL"},{name:"Algeria",dialCode:"+213",code:"DZ"},{name:"AmericanSamoa",dialCode:"+1684",code:"AS"},{name:"Andorra",dialCode:"+376",code:"AD"},{name:"Angola",dialCode:"+244",code:"AO"},{name:"Anguilla",dialCode:"+1264",code:"AI"},{name:"Antarctica",dialCode:"+672",code:"AQ"},{name:"Antigua and Barbuda",dialCode:"+1268",code:"AG"},{name:"Argentina",dialCode:"+54",code:"AR"},{name:"Armenia",dialCode:"+374",code:"AM"},{name:"Aruba",dialCode:"+297",code:"AW"},{name:"Australia",dialCode:"+61",code:"AU"},{name:"Austria",dialCode:"+43",code:"AT"},{name:"Azerbaijan",dialCode:"+994",code:"AZ"},{name:"Bahamas",dialCode:"+1242",code:"BS"},{name:"Bahrain",dialCode:"+973",code:"BH"},{name:"Bangladesh",dialCode:"+880",code:"BD"},{name:"Barbados",dialCode:"+1246",code:"BB"},{name:"Belarus",dialCode:"+375",code:"BY"},{name:"Belgium",dialCode:"+32",code:"BE"},{name:"Belize",dialCode:"+501",code:"BZ"},{name:"Benin",dialCode:"+229",code:"BJ"},{name:"Bermuda",dialCode:"+1441",code:"BM"},{name:"Bhutan",dialCode:"+975",code:"BT"},{name:"Bolivia, Plurinational State of",dialCode:"+591",code:"BO"},{name:"Bosnia and Herzegovina",dialCode:"+387",code:"BA"},{name:"Botswana",dialCode:"+267",code:"BW"},{name:"Brazil",dialCode:"+55",code:"BR"},{name:"British Indian Ocean Territory",dialCode:"+246",code:"IO"},{name:"Brunei Darussalam",dialCode:"+673",code:"BN"},{name:"Bulgaria",dialCode:"+359",code:"BG"},{name:"Burkina Faso",dialCode:"+226",code:"BF"},{name:"Burundi",dialCode:"+257",code:"BI"},{name:"Cambodia",dialCode:"+855",code:"KH"},{name:"Cameroon",dialCode:"+237",code:"CM"},{name:"Canada",dialCode:"+1",code:"CA"},{name:"Cape Verde",dialCode:"+238",code:"CV"},{name:"Cayman Islands",dialCode:"+345",code:"KY"},{name:"Central African Republic",dialCode:"+236",code:"CF"},{name:"Chad",dialCode:"+235",code:"TD"},{name:"Chile",dialCode:"+56",code:"CL"},{name:"China",dialCode:"+86",code:"CN"},{name:"Christmas Island",dialCode:"+61",code:"CX"},{name:"Cocos (Keeling) Islands",dialCode:"+61",code:"CC"},{name:"Colombia",dialCode:"+57",code:"CO"},{name:"Comoros",dialCode:"+269",code:"KM"},{name:"Congo",dialCode:"+242",code:"CG"},{name:"Congo, The Democratic Republic of the Congo",dialCode:"+243",code:"CD"},{name:"Cook Islands",dialCode:"+682",code:"CK"},{name:"Costa Rica",dialCode:"+506",code:"CR"},{name:"Cote d'Ivoire",dialCode:"+225",code:"CI"},{name:"Croatia",dialCode:"+385",code:"HR"},{name:"Cuba",dialCode:"+53",code:"CU"},{name:"Cyprus",dialCode:"+357",code:"CY"},{name:"Czech Republic",dialCode:"+420",code:"CZ"},{name:"Denmark",dialCode:"+45",code:"DK"},{name:"Djibouti",dialCode:"+253",code:"DJ"},{name:"Dominica",dialCode:"+1767",code:"DM"},{name:"Dominican Republic",dialCode:"+1849",code:"DO"},{name:"Ecuador",dialCode:"+593",code:"EC"},{name:"Egypt",dialCode:"+20",code:"EG"},{name:"El Salvador",dialCode:"+503",code:"SV"},{name:"Equatorial Guinea",dialCode:"+240",code:"GQ"},{name:"Eritrea",dialCode:"+291",code:"ER"},{name:"Estonia",dialCode:"+372",code:"EE"},{name:"Ethiopia",dialCode:"+251",code:"ET"},{name:"Falkland Islands (Malvinas)",dialCode:"+500",code:"FK"},{name:"Faroe Islands",dialCode:"+298",code:"FO"},{name:"Fiji",dialCode:"+679",code:"FJ"},{name:"Finland",dialCode:"+358",code:"FI"},{name:"France",dialCode:"+33",code:"FR"},{name:"French Guiana",dialCode:"+594",code:"GF"},{name:"French Polynesia",dialCode:"+689",code:"PF"},{name:"Gabon",dialCode:"+241",code:"GA"},{name:"Gambia",dialCode:"+220",code:"GM"},{name:"Georgia",dialCode:"+995",code:"GE"},{name:"Germany",dialCode:"+49",code:"DE"},{name:"Ghana",dialCode:"+233",code:"GH"},{name:"Gibraltar",dialCode:"+350",code:"GI"},{name:"Greece",dialCode:"+30",code:"GR"},{name:"Greenland",dialCode:"+299",code:"GL"},{name:"Grenada",dialCode:"+1473",code:"GD"},{name:"Guadeloupe",dialCode:"+590",code:"GP"},{name:"Guam",dialCode:"+1671",code:"GU"},{name:"Guatemala",dialCode:"+502",code:"GT"},{name:"Guernsey",dialCode:"+44",code:"GG"},{name:"Guinea",dialCode:"+224",code:"GN"},{name:"Guinea-Bissau",dialCode:"+245",code:"GW"},{name:"Guyana",dialCode:"+592",code:"GY"},{name:"Haiti",dialCode:"+509",code:"HT"},{name:"Holy See (Vatican City State)",dialCode:"+379",code:"VA"},{name:"Honduras",dialCode:"+504",code:"HN"},{name:"Hong Kong",dialCode:"+852",code:"HK"},{name:"Hungary",dialCode:"+36",code:"HU"},{name:"Iceland",dialCode:"+354",code:"IS"},{name:"India",dialCode:"+91",code:"IN"},{name:"Indonesia",dialCode:"+62",code:"ID"},{name:"Iran, Islamic Republic of Persian Gulf",dialCode:"+98",code:"IR"},{name:"Iraq",dialCode:"+964",code:"IQ"},{name:"Ireland",dialCode:"+353",code:"IE"},{name:"Isle of Man",dialCode:"+44",code:"IM"},{name:"Israel",dialCode:"+972",code:"IL"},{name:"Italy",dialCode:"+39",code:"IT"},{name:"Jamaica",dialCode:"+1876",code:"JM"},{name:"Japan",dialCode:"+81",code:"JP"},{name:"Jersey",dialCode:"+44",code:"JE"},{name:"Jordan",dialCode:"+962",code:"JO"},{name:"Kazakhstan",dialCode:"+77",code:"KZ"},{name:"Kenya",dialCode:"+254",code:"KE"},{name:"Kiribati",dialCode:"+686",code:"KI"},{name:"Korea, Democratic People's Republic of Korea",dialCode:"+850",code:"KP"},{name:"Korea, Republic of South Korea",dialCode:"+82",code:"KR"},{name:"Kuwait",dialCode:"+965",code:"KW"},{name:"Kyrgyzstan",dialCode:"+996",code:"KG"},{name:"Laos",dialCode:"+856",code:"LA"},{name:"Latvia",dialCode:"+371",code:"LV"},{name:"Lebanon",dialCode:"+961",code:"LB"},{name:"Lesotho",dialCode:"+266",code:"LS"},{name:"Liberia",dialCode:"+231",code:"LR"},{name:"Libyan Arab Jamahiriya",dialCode:"+218",code:"LY"},{name:"Liechtenstein",dialCode:"+423",code:"LI"},{name:"Lithuania",dialCode:"+370",code:"LT"},{name:"Luxembourg",dialCode:"+352",code:"LU"},{name:"Macao",dialCode:"+853",code:"MO"},{name:"Macedonia",dialCode:"+389",code:"MK"},{name:"Madagascar",dialCode:"+261",code:"MG"},{name:"Malawi",dialCode:"+265",code:"MW"},{name:"Malaysia",dialCode:"+60",code:"MY"},{name:"Maldives",dialCode:"+960",code:"MV"},{name:"Mali",dialCode:"+223",code:"ML"},{name:"Malta",dialCode:"+356",code:"MT"},{name:"Marshall Islands",dialCode:"+692",code:"MH"},{name:"Martinique",dialCode:"+596",code:"MQ"},{name:"Mauritania",dialCode:"+222",code:"MR"},{name:"Mauritius",dialCode:"+230",code:"MU"},{name:"Mayotte",dialCode:"+262",code:"YT"},{name:"Mexico",dialCode:"+52",code:"MX"},{name:"Micronesia, Federated States of Micronesia",dialCode:"+691",code:"FM"},{name:"Moldova",dialCode:"+373",code:"MD"},{name:"Monaco",dialCode:"+377",code:"MC"},{name:"Mongolia",dialCode:"+976",code:"MN"},{name:"Montenegro",dialCode:"+382",code:"ME"},{name:"Montserrat",dialCode:"+1664",code:"MS"},{name:"Morocco",dialCode:"+212",code:"MA"},{name:"Mozambique",dialCode:"+258",code:"MZ"},{name:"Myanmar",dialCode:"+95",code:"MM"},{name:"Namibia",dialCode:"+264",code:"NA"},{name:"Nauru",dialCode:"+674",code:"NR"},{name:"Nepal",dialCode:"+977",code:"NP"},{name:"Netherlands",dialCode:"+31",code:"NL"},{name:"Netherlands Antilles",dialCode:"+599",code:"AN"},{name:"New Caledonia",dialCode:"+687",code:"NC"},{name:"New Zealand",dialCode:"+64",code:"NZ"},{name:"Nicaragua",dialCode:"+505",code:"NI"},{name:"Niger",dialCode:"+227",code:"NE"},{name:"Nigeria",dialCode:"+234",code:"NG"},{name:"Niue",dialCode:"+683",code:"NU"},{name:"Norfolk Island",dialCode:"+672",code:"NF"},{name:"Northern Mariana Islands",dialCode:"+1670",code:"MP"},{name:"Norway",dialCode:"+47",code:"NO"},{name:"Oman",dialCode:"+968",code:"OM"},{name:"Pakistan",dialCode:"+92",code:"PK"},{name:"Palau",dialCode:"+680",code:"PW"},{name:"Palestinian Territory, Occupied",dialCode:"+970",code:"PS"},{name:"Panama",dialCode:"+507",code:"PA"},{name:"Papua New Guinea",dialCode:"+675",code:"PG"},{name:"Paraguay",dialCode:"+595",code:"PY"},{name:"Peru",dialCode:"+51",code:"PE"},{name:"Philippines",dialCode:"+63",code:"PH"},{name:"Pitcairn",dialCode:"+872",code:"PN"},{name:"Poland",dialCode:"+48",code:"PL"},{name:"Portugal",dialCode:"+351",code:"PT"},{name:"Qatar",dialCode:"+974",code:"QA"},{name:"Romania",dialCode:"+40",code:"RO"},{name:"Russia",dialCode:"+7",code:"RU"},{name:"Rwanda",dialCode:"+250",code:"RW"},{name:"Reunion",dialCode:"+262",code:"RE"},{name:"Saint Barthelemy",dialCode:"+590",code:"BL"},{name:"Saint Helena, Ascension and Tristan Da Cunha",dialCode:"+290",code:"SH"},{name:"Saint Kitts and Nevis",dialCode:"+1869",code:"KN"},{name:"Saint Lucia",dialCode:"+1758",code:"LC"},{name:"Saint Martin",dialCode:"+590",code:"MF"},{name:"Saint Pierre and Miquelon",dialCode:"+508",code:"PM"},{name:"Saint Vincent and the Grenadines",dialCode:"+1784",code:"VC"},{name:"Samoa",dialCode:"+685",code:"WS"},{name:"San Marino",dialCode:"+378",code:"SM"},{name:"Sao Tome and Principe",dialCode:"+239",code:"ST"},{name:"Saudi Arabia",dialCode:"+966",code:"SA"},{name:"Senegal",dialCode:"+221",code:"SN"},{name:"Serbia",dialCode:"+381",code:"RS"},{name:"Seychelles",dialCode:"+248",code:"SC"},{name:"Sierra Leone",dialCode:"+232",code:"SL"},{name:"Singapore",dialCode:"+65",code:"SG"},{name:"Slovakia",dialCode:"+421",code:"SK"},{name:"Slovenia",dialCode:"+386",code:"SI"},{name:"Solomon Islands",dialCode:"+677",code:"SB"},{name:"Somalia",dialCode:"+252",code:"SO"},{name:"South Africa",dialCode:"+27",code:"ZA"},{name:"South Sudan",dialCode:"+211",code:"SS"},{name:"South Georgia and the South Sandwich Islands",dialCode:"+500",code:"GS"},{name:"Spain",dialCode:"+34",code:"ES"},{name:"Sri Lanka",dialCode:"+94",code:"LK"},{name:"Sudan",dialCode:"+249",code:"SD"},{name:"Suriname",dialCode:"+597",code:"SR"},{name:"Svalbard and Jan Mayen",dialCode:"+47",code:"SJ"},{name:"Swaziland",dialCode:"+268",code:"SZ"},{name:"Sweden",dialCode:"+46",code:"SE"},{name:"Switzerland",dialCode:"+41",code:"CH"},{name:"Syrian Arab Republic",dialCode:"+963",code:"SY"},{name:"Taiwan",dialCode:"+886",code:"TW"},{name:"Tajikistan",dialCode:"+992",code:"TJ"},{name:"Tanzania, United Republic of Tanzania",dialCode:"+255",code:"TZ"},{name:"Thailand",dialCode:"+66",code:"TH"},{name:"Timor-Leste",dialCode:"+670",code:"TL"},{name:"Togo",dialCode:"+228",code:"TG"},{name:"Tokelau",dialCode:"+690",code:"TK"},{name:"Tonga",dialCode:"+676",code:"TO"},{name:"Trinidad and Tobago",dialCode:"+1868",code:"TT"},{name:"Tunisia",dialCode:"+216",code:"TN"},{name:"Turkey",dialCode:"+90",code:"TR"},{name:"Turkmenistan",dialCode:"+993",code:"TM"},{name:"Turks and Caicos Islands",dialCode:"+1649",code:"TC"},{name:"Tuvalu",dialCode:"+688",code:"TV"},{name:"Uganda",dialCode:"+256",code:"UG"},{name:"Ukraine",dialCode:"+380",code:"UA"},{name:"United Arab Emirates",dialCode:"+971",code:"AE"},{name:"United Kingdom",dialCode:"+44",code:"GB"},{name:"Uruguay",dialCode:"+598",code:"UY"},{name:"Uzbekistan",dialCode:"+998",code:"UZ"},{name:"Vanuatu",dialCode:"+678",code:"VU"},{name:"Venezuela, Bolivarian Republic of Venezuela",dialCode:"+58",code:"VE"},{name:"Vietnam",dialCode:"+84",code:"VN"},{name:"Virgin Islands, British",dialCode:"+1284",code:"VG"},{name:"Virgin Islands, U.S.",dialCode:"+1340",code:"VI"},{name:"Wallis and Futuna",dialCode:"+681",code:"WF"},{name:"Yemen",dialCode:"+967",code:"YE"},{name:"Zambia",dialCode:"+260",code:"ZM"},{name:"Zimbabwe",dialCode:"+263",code:"ZW"}].sort((e,t)=>e.name<t.name?-1:1)];const Cs=({code:e,dialCode:t,name:o})=>`\n\t<div\n\t\tdata-id="${t}"\n\t\tdata-name="${e} ${t} ${o}"\n\t\tdata-country-code="${e}"\n\t>\n\t\t<div>\n\t\t\t<span>\n\t\t\t\t<img src="${(e=>`https://static.descope.com/npm/svg-country-flags@1.2.10/svg/${e.toLowerCase()}.svg`)(e)}" width="20"/>\n\t\t\t</span>\n\t\t\t<span>${o}</span>\n\t\t</div>\n\t\t<div>\n\t\t\t<span>${e}</span>\n\t\t\t<span>${t}</span>\n\t\t</div>\n\t</div>\n`,ws=Je("phone-field-internal"),Is=["disabled","size","bordered","readonly"],Ss=["country-input-placeholder","default-code","restrict-countries"],Ms=["phone-input-placeholder","maxlength","autocomplete","name","phone-input-type"],As=["label-type","country-input-label","label"],Es={"country-input-label":"label","country-input-placeholder":"placeholder","phone-input-placeholder":"placeholder","phone-input-type":"type"},Ts=[].concat(Is,Ss,Ms,As),ks=co({componentName:ws,baseSelector:"div"});customElements.define(ws,class extends ks{static get observedAttributes(){return[].concat(ks.observedAttributes||[],Ts)}#ge;constructor(){super(),this.innerHTML=`\n <div class="wrapper">\n <descope-combo-box\n item-label-path="data-name"\n item-value-path="data-id"\n >\n ${xs.map(e=>Cs(e)).join("")}\n </descope-combo-box>\n <div class="separator"></div>\n <descope-text-field type="tel"></descope-text-field>\n </div>\n `,this.comboBox=this.querySelector("descope-combo-box"),this.textField=this.querySelector("descope-text-field"),this.inputs=[this.comboBox,this.textField],Xe(this,this.comboBox,{includeAttrs:["label-type"]}),Xe(this,this.textField,{includeAttrs:["label-type","required","phone-input-type"],mapAttrs:{"phone-input-type":"type"}}),this.comboBox.customValueTransformFn=e=>{const[,t]=e?.split?.(" ")||[];return t}}get countryCodeInputData(){return this.comboBox.items}get countryCodeValue(){return this.comboBox.shadowRoot.querySelector("input").value}get phoneNumberInputEle(){return this.textField.shadowRoot.querySelector("input")}get allowAlphanumericInput(){return"true"===this.getAttribute("allow-alphanumeric-input")}get defaultCode(){return this.getAttribute("default-code")}get selectionStart(){return this.textField.selectionStart}get minLength(){return parseInt(this.getAttribute("minlength"),10)||0}get selectedCountryCode(){return this.comboBox?.selectedItem?.getAttribute("data-country-code")}get restrictCountries(){const e=this.getAttribute("restrict-countries");return e?.split(",").filter(Boolean)||[]}get isFormatValue(){return"true"===this.getAttribute("format-value")}get isStrictValidation(){return"true"===this.getAttribute("strict-validation")}get value(){return this.comboBox.value&&this.textField.value?this.allowAlphanumericInput?`${this.comboBox.value}-${this.textField.value}`:`${this.comboBox.value}-${this.textField.value.replace(/\D+/g,"")}`:""}#me(){this.comboBox.selectedItem=void 0,this.textField.value=""}set value(e){if(!e||!/\d/.test(e))return void this.#me();e.startsWith("+")||(e=`+${e}`);let t="",o="";if(e.includes("-")){const i=e.indexOf("-");t=e.slice(0,i),o=e.slice(i+1).replace(/\D+/g,"")}else{const i=(0,p.l)(e);i?.countryCallingCode&&(t=`+${i.countryCallingCode}`,o=e.slice(t.length).replace(/\D+/g,""))}if(!/\d/.test(t))return void this.#me();const i=xs.filter(e=>e.dialCode===t).map(e=>e.code),r=this.selectedCountryCode;if(!i.includes(r)){const e=this.comboBox.items?.find(e=>i.includes(e.getAttribute("data-country-code")));e&&(this.comboBox.selectedItem=e)}this.isFormatValue?this.textField.value=this.#be(o):this.textField.value=o}init(){this.addEventListener("focus",e=>{e.isTrusted&&this.inputs[1].focus()}),super.init?.(),this.#ye()}getValidity(){const e=this.comboBox.value,t=this.textField.value,o=!e||!t,i=t&&t.length>=this.minLength;if(this.isRequired&&o)return{valueMissing:!0};if(this.value){if(!i)return{tooShort:!0};if(this.isStrictValidation&&!this.#fe())return{patternMismatch:!0}}return{}}setSelectionRange(...e){this.textField.setSelectionRange(...e)}attributeChangedCallback(e,t,o){if(super.attributeChangedCallback(e,t,o),t!==o){if("default-code"===e&&o&&!this.selectedCountryCode)this.#ve(o);else if(Ts.includes(e)){const t=Es[e]||e;Is.includes(e)?o?this.inputs.forEach(e=>e.setAttribute(t,o)):this.inputs.forEach(e=>e.removeAttribute(t)):Ss.includes(e)?this.comboBox.setAttribute(t,o):Ms.includes(e)&&this.textField.setAttribute(t,o)}As.includes(e)&&this.#xe(e,o),"restrict-countries"===e&&this.#Ce(this.restrictCountries)}}#ye(){this.textField.addEventListener("input",e=>{if(!this.allowAlphanumericInput){const t=/^\d$/,o=e.target.value.split("").filter(e=>t.test(e)).join("");e.target.value=o}}),this.handleFocusEventsDispatching(this.inputs),this.handleInputEventDispatching()}#be(e=""){return this.#ge&&this.#ge.country===this.selectedCountryCode||(this.#ge=new h.Q(this.selectedCountryCode)),this.#ge.reset(),this.#ge.input(e)||e}#fe(){const e=(0,p.l)(this.value);return!!(e&&e.isValid?.()&&e.country&&this.#we(e.country))}#we(e){return!this.restrictCountries.length||this.restrictCountries.includes(e)}#Ie(e){return this.comboBox.items?.find(t=>t.getAttribute("data-country-code")===e)}#Ce(e){const t=e.length?xs.filter(t=>e.includes(t.code)):xs;this.querySelector("descope-combo-box").innerHTML=t.map(e=>Cs(e)).join("")}#ve(e){if(!this.comboBox.value){const t=this.#Ie(e);t&&setTimeout(()=>{this.comboBox.selectedItem=t})}}#xe(e,t){const o=Es[e]||e;"label-type"===e?this.#Se(t):"floating"===this.getAttribute("label-type")&&("country-input-label"===e?this.comboBox.setAttribute(o,t):"label"===e&&this.textField.setAttribute(o,t))}#Se(e){"floating"===e?(this.comboBox.setAttribute("label",this.getAttribute("country-input-label")||""),this.comboBox.setAttribute("placeholder",this.getAttribute("country-input-placeholder")||""),this.textField.setAttribute("label",this.getAttribute("label")||""),this.textField.setAttribute("placeholder",this.getAttribute("phone-input-placeholder")||"")):this.inputs.forEach(e=>e.removeAttribute("label"))}});const zs=Zr.cssVarList,Ls=xi.cssVarList,Vs=Je("phone-field"),{host:Ns,label:Ds,requiredIndicator:Ps,inputField:Bs,internalAfter:Fs,countryCodeInput:Rs,phoneInput:Ws,separator:Os,errorMessage:js,helperText:$s}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},inputField:{selector:"::part(input-field)"},internalAfter:{selector:"descope-phone-field-internal::after"},phoneInput:{selector:()=>"descope-text-field"},countryCodeInput:{selector:()=>"descope-combo-box"},separator:{selector:"descope-phone-field-internal .separator"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},_s=_e(jt({mappings:{fontSize:[Ns,Bs,{selector:Zr.componentName,property:Zr.cssVarList.fontSize},{selector:xi.componentName,property:xi.cssVarList.fontSize}],fontFamily:[Ds,js,$s,{...Rs,property:xi.cssVarList.overlay.fontFamily}],hostWidth:[{...Ns,property:"width"},{...Ws,property:"width"},{...Rs,property:"--vaadin-combo-box-overlay-width"}],hostDirection:{...Ns,property:"direction"},inputBorderStyle:[{...Fs,property:"border-style"},{...Os,property:"border-left-style"}],inputBorderWidth:[{...Fs,property:"border-width"},{...Os,property:"border-left-width"}],inputBorderColor:[{...Fs,property:"border-color"},{...Os,property:"border-left-color"}],inputBorderRadius:[{...Bs,property:"border-radius"},{...Fs,property:"border-radius"}],countryCodeInputWidth:{...Rs,property:Ls.hostWidth},countryCodeDropdownWidth:{...Rs,property:"--vaadin-combo-box-overlay-width"},phoneInputWidth:{...Ws,property:"width"},horizontalPadding:[{...Ws,property:"padding-left"},{...Ws,property:"padding-right"},{...Rs,property:"padding-left"},{...Rs,property:"padding-right"}],labelFontSize:{...Ds,property:"font-size"},labelFontWeight:{...Ds,property:"font-weight"},inputValueFontWeight:[{...Ws,property:zs.inputValueFontWeight},{...Rs,property:Ls.inputValueFontWeight}],inputPlaceholderFontWeight:{...Ws,property:zs.inputPlaceholderFontWeight},helperTextFontWeight:{...$s,property:"font-weight"},errorMessageFontWeight:{...js,property:"font-weight"},labelTextColor:[{...Ds,property:"color"},{...Ds,property:"-webkit-text-fill-color"},{...Ps,property:"color"}],labelRequiredIndicator:{...Ps,property:"content"},errorMessageTextColor:{...js,property:"color"},errorMessageIcon:{...js,property:"background-image"},errorMessageIconSize:{...js,property:"background-size"},errorMessageIconPadding:{...js,property:"padding-inline-start"},errorMessageIconRepeat:{...js,property:"background-repeat"},errorMessageIconPosition:{...js,property:"background-position"},errorMessageFontSize:{...js,property:"font-size"},inputValueTextColor:[{...Ws,property:zs.inputValueTextColor},{...Rs,property:Ls.inputValueTextColor}],inputPlaceholderTextColor:{...Ws,property:zs.inputPlaceholderColor},overlayItemBackgroundColor:{selector:"descope-combo-box",property:Ls.overlayItemBackgroundColor},inputOutlineStyle:{...Bs,property:"outline-style"},inputOutlineColor:{...Bs,property:"outline-color"},inputOutlineWidth:{...Bs,property:"outline-width"},inputOutlineOffset:{...Bs,property:"outline-offset"},valueInputHeight:[{...Rs,property:Ls.valueInputHeight}],valueInputMarginBottom:[{...Ws,property:zs.valueInputMarginBottom}],marginInlineStart:[{...Ws,property:zs.marginInlineStart},{...Rs,property:Ls.marginInlineStart}]}}),$t,lo,io({proxyProps:["value","selectionStart"]}),e=>class extends e{static get CountryCodes(){return xs}init(){super.init?.();const e=document.createElement("template");e.innerHTML=`\n\t\t\t\t<${ws}\n\t\t\t\t\ttabindex="-1"\n\t\t\t\t\tslot="input"\n\t\t\t\t></${ws}>\n \t\t`,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(ws),Xe(this.shadowRoot.host,this.inputElement,{includeAttrs:["size","bordered","minlength","maxlength","default-code","country-input-placeholder","phone-input-placeholder","disabled","restrict-countries","country-input-label","readonly","label","label-type","allow-alphanumeric-input","format-value","strict-validation","phone-input-type"]})}get countryCodeItems(){return this.inputElement?.countryCodeValue}get phoneNumberInputEle(){return this.inputElement?.phoneNumberInputEle}get countryCodeInputData(){return this.inputElement?.countryCodeInputData}get countryCodes(){return Array.from(this.inputElement.countryCodeInputData).map(e=>e.getAttribute("data-country-code"))}})(Qt({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tmin-width: 15em;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}\n\t\t\t${ut(_s.cssVarList)}\n\t\t\t${bt("vaadin-text-field")}\n\t\t\t${ft("vaadin-text-field")}\n\t\t\t\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n\n\n\t\t\tdiv {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n\t\t\tvaadin-text-field {\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tpadding: 0;\n\t\t\t}\n\t\t\tvaadin-text-field[focus-ring]::part(input-field) {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\t\t\tvaadin-text-field::before {\n\t\t\t\theight: 0;\n\t\t\t}\n\t\t\tvaadin-text-field::part(label) {\n margin-left: 0;\n margin-right: 0;\n }\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tpadding: 0;\n\t\t\t\tbackground: transparent;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\t\t\tdescope-phone-field-internal {\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n direction: ltr;\n position: relative;\n\t\t\t}\n descope-phone-field-internal::after {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n box-sizing: border-box;\n outline-offset: calc(var(${_s.cssVarList.inputBorderWidth}) * -1);\n pointer-events: none;\n }\n\t\t\tdescope-phone-field-internal > div {\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t}\n\t\t\tdescope-phone-field-internal .separator {\n\t\t\t\tflex: 0;\n\t\t\t\tborder: none;\n\t\t\t}\n\n\t\t\tdescope-combo-box {\n\t\t\t\tflex-shrink: 0;\n min-width: 5.75em;\n\t\t\t\t${Ls.inputOutlineWidth}: 0;\n\t\t\t\t${Ls.inputOutlineOffset}: 0;\n\t\t\t\t${Ls.inputBorderWidth}: 0;\n\t\t\t\t${Ls.inputBorderRadius}: 0;\n\t\t\t}\n\t\t\tdescope-text-field {\n\t\t\t\tflex-grow: 1;\n\t\t\t\t${zs.inputOutlineWidth}: 0;\n\t\t\t\t${zs.inputOutlineOffset}: 0;\n\t\t\t\t${zs.inputBorderWidth}: 0;\n\t\t\t\t${zs.inputBorderRadius}: 0;\n }\n\n :host([label-type="floating"]) vaadin-text-field::part(label) {\n display: none;\n }\n descope-text-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n descope-text-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n\n\t\t\tvaadin-text-field::part(input-field)::after {\n\t\t\t\tborder: none;\n\t\t\t}\n ${xt("vaadin-text-field")}\n\t\t`,excludeAttrsSync:["tabindex","style"],componentName:Vs}));customElements.define(Vs,_s);const Hs=Je("phone-field-internal-input-box"),qs=["disabled","size","readonly","phone-input-placeholder","name","maxlength","autocomplete","label-type","phone-input-type"],Ys={"phone-input-placeholder":"placeholder","phone-input-type":"type"},Us=co({componentName:Hs,baseSelector:"div"});customElements.define(Hs,class extends Us{static get observedAttributes(){return[].concat(Us.observedAttributes||[],qs)}#ge;constructor(){super(),this.innerHTML='\n <div>\n <descope-text-field tabindex="1" type="tel" bordered="false"></descope-text-field>\n </div>\n ',this.textField=this.querySelector("descope-text-field")}get phoneNumberInputEle(){return this.textField.shadowRoot.querySelector("input")}get defaultDialCode(){return e=this.getAttribute("default-code"),xs.find(t=>t.code===e)?.dialCode;var e}get defaultCode(){return this.getAttribute("default-code")}get allowAlphanumericInput(){return"true"===this.getAttribute("allow-alphanumeric-input")}get minLength(){return parseInt(this.getAttribute("minlength"),10)||0}get maxLength(){return parseInt(this.getAttribute("maxlength"),10)||50}get restrictCountries(){return this.getAttribute("restrict-countries")?.split(",").filter(Boolean)||[]}get isFormatValue(){return"true"===this.getAttribute("format-value")}get isStrictValidation(){return"true"===this.getAttribute("strict-validation")}get value(){if(!this.textField.value)return"";if(!this.isStrictValidation)return this.#Me();const e=this.#Ae();return e?.country&&e?.countryCallingCode&&e?.nationalNumber?`+${[e?.countryCallingCode,e?.nationalNumber].join("-")}`:this.textField.value}set value(e){this.textField.value=e}init(){this.addEventListener("focus",e=>{e.isTrusted&&this.textField.focus()}),super.init?.(),this.textField.addEventListener("input",this.#Ee.bind(this)),this.handleFocusEventsDispatching([this.textField]),L(this.textField,this,{includeAttrs:["has-value"]}),L(this,this.textField,{includeAttrs:["phone-input-type"],mapAttrs:{"phone-input-type":"type"}})}getValidity(){const e=/^\+?\d{1,4}-?(?:\d-?){1,15}$/,t=this.#Te(this.textField.value||"");if(this.isRequired&&!this.textField.value)return{valueMissing:!0};if(this.textField.value){if(t.length<this.minLength)return{tooShort:!0};if(this.isStrictValidation&&this.textField.value&&!this.#fe()||!this.isStrictValidation&&this.textField.value&&!e.test(this.value))return{patternMismatch:!0}}return{}}setSelectionRange(...e){this.textField.setSelectionRange(...e)}attributeChangedCallback(e,t,o){if(super.attributeChangedCallback(e,t,o),t!==o&&qs.includes(e)){const t=Ys[e]||e;this.textField.setAttribute(t,o)}}#Ee(e){let t=this.#ke(e.target.value);this.isFormatValue&&this.#ze(t)&&(t=this.#Le(t)),e.target.value=t}#Me(){if(!this.defaultDialCode)return this.textField.value;const e=this.#Ve(this.textField.value),t=this.#Te(e);return[this.defaultDialCode,t].join("-")}#Ae(){return this.defaultDialCode?(0,p.l)([this.defaultDialCode,this.#Te(this.textField.value)].filter(Boolean).join("")):(0,p.l)(this.textField.value)}#Te(e){return e.replace(/\D/g,"")}#Ve(e){if("+"===this.textField.value?.[0]){const t=new RegExp(`^\\${this.defaultDialCode}`);return e.replace(t,"")}return e}#fe(){const e=(0,p.l)(this.value);return!(!e||!e.isValid?.()||!e.country||!this.#we(e.country)||this.defaultCode&&this.defaultCode!==e.country)}#we(e){return!this.restrictCountries.length||this.restrictCountries.includes(e)}#ke(e){if(e=e.replace(/^-+/,"").replace(/(?!^)\+/g,"").replace("--","-").replace("+-","+"),!this.allowAlphanumericInput){const t=/^[+\d-\(\)]+$/;e=e.split("").filter(e=>t.test(e)).join("")}return e}#Le(e=""){const t=this.defaultCode||this.#Ne(e);return t?(this.#ge&&this.#ge.country===t||(this.#ge=new h.Q(t)),this.#ge.reset(),this.#ge.input(e)||e):e}#Ne(e){const t=(0,p.l)(e);return t?.country||""}#ze(e){return!!(e=>{const t=e.match(/\(/g),o=e.match(/\)/g);return t?.length===o?.length})(e)}});const Gs=Zr.cssVarList,Zs=Je("phone-input-box-field"),{host:Qs,label:Js,inputElement:Ks,requiredIndicator:Xs,inputField:ea,internalComponent:ta,internalComponentAfter:oa,phoneInput:ia,errorMessage:ra,helperText:na}={host:{selector:()=>":host"},label:{selector:"::part(label)"},inputElement:{selector:"input"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},inputField:{selector:()=>"vaadin-text-field::part(input-field)"},internalComponent:{selector:"descope-phone-field-internal-input-box"},internalComponentAfter:{selector:"descope-phone-field-internal-input-box::after"},phoneInput:{selector:()=>"descope-text-field"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},sa=_e(jt({mappings:{fontSize:[Qs,ea,{selector:Zr.componentName,property:Zr.cssVarList.fontSize}],fontFamily:[Js,ra,na],hostWidth:{...Qs,property:"width"},hostMinWidth:{...Qs,property:"min-width"},hostDirection:{...Qs,property:"direction"},inputHorizontalPadding:[{...ia,property:"padding-left"},{...ia,property:"padding-right"}],labelFontSize:{...Js,property:"font-size"},labelFontWeight:{...Js,property:"font-weight"},inputValueFontWeight:{...ia,property:Gs.inputValueFontWeight},inputPlaceholderFontWeight:{...ia,property:Gs.inputPlaceholderFontWeight},helperTextFontWeight:{...na,property:"font-weight"},errorMessageFontWeight:{...ra,property:"font-weight"},labelTextColor:[{...Js,property:"color"},{...Js,property:"-webkit-text-fill-color"},{...Xs,property:"color"}],labelRequiredIndicator:{...Xs,property:"content"},errorMessageTextColor:{...ra,property:"color"},errorMessageIcon:{...ra,property:"background-image"},errorMessageIconSize:{...ra,property:"background-size"},errorMessageIconPadding:{...ra,property:"padding-inline-start"},errorMessageIconRepeat:{...ra,property:"background-repeat"},errorMessageIconPosition:{...ra,property:"background-position"},errorMessageFontSize:{...ra,property:"font-size"},inputValueTextColor:{...ia,property:Gs.inputValueTextColor},inputPlaceholderTextColor:{...ia,property:Gs.inputPlaceholderColor},inputBorderStyle:{...oa,property:"border-style"},inputBorderWidth:{...oa,property:"border-width"},inputBorderColor:{...oa,property:"border-color"},inputBorderRadius:[{...ta,property:"border-radius"},{...oa,property:"border-radius"}],inputOutlineStyle:{...ta,property:"outline-style"},inputOutlineColor:{...ta,property:"outline-color"},inputOutlineWidth:{...ta,property:"outline-width"},inputOutlineOffset:{...ta,property:"outline-offset"},labelPosition:{...Js,property:"position"},labelTopPosition:{...Js,property:"top"},labelHorizontalPosition:[{...Js,property:"left"},{...Js,property:"right"}],inputTransformY:{...Js,property:"transform"},inputTransition:{...Js,property:"transition"},marginInlineStart:{...Js,property:"margin-inline-start"},valueInputHeight:{...Ks,property:"height"},valueInputMarginBottom:{selector:Zr.componentName,property:Gs.valueInputMarginBottom}}}),$t,lo,io({proxyProps:["value","selectionStart"]}),e=>class extends e{static get CountryCodes(){return xs}init(){super.init?.();const e=document.createElement("template");e.innerHTML=`\n\t\t\t\t<${Hs}\n\t\t\t\t\ttabindex="-1"\n\t\t\t\t\tslot="input"\n\t\t\t\t></${Hs}>\n `,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(Hs),T(this,this.inputElement,{includeAttrs:["has-value"]}),Xe(this.shadowRoot.host,this.inputElement,{includeAttrs:["size","minlength","maxlength","default-code","disabled","phone-input-placeholder","label","label-type","allow-alphanumeric-input","restrict-countries","format-value","strict-validation","data-errormessage-type-mismatch","phone-input-type"]})}get phoneNumberInputEle(){return this.inputElement?.phoneNumberInputEle}})(Qt({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n :host {\n display: inline-flex;\n max-width: 100%;\n box-sizing: border-box;\n }\n ${ut(sa.cssVarList)}\n ${bt("vaadin-text-field")}\n ${ft("vaadin-text-field")}\n \n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n\n\n vaadin-text-field {\n width: 100%;\n box-sizing: border-box;\n padding: 0;\n }\n vaadin-text-field[focus-ring]::part(input-field) {\n box-shadow: none;\n }\n vaadin-text-field::before {\n height: 0;\n }\n vaadin-text-field::part(input-field) {\n padding: 0;\n background: transparent;\n -webkit-mask-image: none;\n }\n descope-phone-field-internal-input-box {\n -webkit-mask-image: none;\n padding: 0;\n width: 100%;\n }\n descope-phone-field-internal-input-box > div {\n width: 100%;\n }\n descope-phone-field-internal-input-box descope-text-field {\n ${Gs.inputOutlineWidth}: 0;\n ${Gs.inputOutlineOffset}: 0;\n }\n descope-phone-field-internal-input-box::after {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n box-sizing: border-box;\n pointer-events: none;\n }\n descope-text-field {\n flex-grow: 1;\n width: 100%;\n direction: ltr;\n }\n vaadin-text-field[readonly] > input:placeholder-shown {\n opacity: 1;\n }\n vaadin-text-field::part(input-field)::after {\n border: none;\n }\n\n vaadin-text-field[label-type="floating"]:not([focused])[readonly] input:placeholder-shown {\n opacity: 0;\n }\n vaadin-text-field[label-type="floating"]:not([focused])[disabled] input:placeholder-shown {\n opacity: 0;\n }\n\n ${xt("vaadin-text-field")}\n \n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n \n\t\t`,excludeAttrsSync:["tabindex","style"],componentName:Zs}));customElements.define(Zs,sa);const aa=Je("new-password-internal"),la=(e,t)=>e.replace(/{{(\w+)+}}/g,(e,o)=>t?.[o]||e),da=Je("policy-validation"),ca=["data","active-policies","overrides","data-password-policy-value-minlength","data-password-policy-value-passwordstrength","data-password-policy-actual-passwordstrength","data-password-policy-value-disallowedchars","data-password-policy-value-email"],pa=["label","value",...ca];class ha extends(Gt({componentName:da,baseSelector:":host > div"})){#De;#Pe=[];#Be;static get observedAttributes(){return pa}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div>\n <div class="label"></div>\n <ul></ul>\n </div>\n\t\t',V("\n :host > div {\n width: 100%;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n }\n .label {\n max-width: 100%;\n text-wrap: wrap;\n overflow-wrap: break-word;\n }\n .hide-label .label {\n display: none;\n }\n ul {\n display: flex;\n flex-direction: column;\n padding: 0;\n margin: 0;\n }\n ul, li {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n li::before {\n display: inline-block;\n width: 1em;\n text-align: center;\n }\n ",this),this.panel=this.shadowRoot.querySelector(":host > div"),this.label=this.shadowRoot.querySelector(".label"),this.list=this.shadowRoot.querySelector("ul")}attributeChangedCallback(e,t,o){if(super.attributeChangedCallback?.(e,t,o),t!==o){if("label"===e&&this.updateLabel(o),ca.includes(e)){if("data"===e)try{this.availablePolicies=JSON.parse(o)}catch{console.error("Failed to set available policies")}if("active-policies"===e&&(this.#Pe=(o||"").split(",")),"data-password-policy-value-minlength"===e){const e=Number(o);!Number.isNaN(e)&&e>0&&(this.#Be={...this.#Be,minlength:{value:`${e}`}})}if("data-password-policy-value-passwordstrength"===e){const e=parseInt(o);!Number.isNaN(e)&&e>=0&&(this.#Be={...this.#Be,passwordstrength:{...this.#Be?.passwordstrength,expected:e}})}if("data-password-policy-actual-passwordstrength"===e){const e=Number(o);!Number.isNaN(e)&&e>=0&&(this.#Be={...this.#Be,passwordstrength:{...this.#Be?.passwordstrength,actual:e}})}if("data-password-policy-value-disallowedchars"===e)if(o)this.#Be={...this.#Be,disallowedchars:{...this.#Be?.disallowedchars,value:o}};else if(this.#Be?.disallowedchars){const{disallowedchars:e,...t}=this.#Be;this.#Be=t}if("data-password-policy-value-email"===e)if(o)this.#Be={...this.#Be,disallowemail:{...this.#Be?.disallowemail,expected:o}};else if(this.#Be?.disallowemail){const{disallowemail:e,...t}=this.#Be;this.#Be=t}}this.renderItems(this.#De,this.#Pe,this.#Be)}}get availablePolicies(){return this.#De||[]}set availablePolicies(e){this.#De=e}get value(){return this.getAttribute("value")||""}getStrengthScore(){return this.value.length}compareValues(e,t,o){switch(e.toUpperCase()){case"GTE":return o>=t;case"GT":return o>t;case"LTE":return o<=t;case"LT":return o<t;case"EQ":return o===t;case"NEQ":return o!==t;default:throw new Error(`Invalid comparison type: ${e}`)}}validate(){let e=this.#De;return this.#Be&&(e=this.#De.map(e=>{const t=this.#Be[e.id];return t?{...e,data:t}:e})),this.#Pe.reduce((t,o)=>{const i=e.find(e=>e.id===o);if(!i)return t;const{pattern:r,message:n,data:s,compare:a}=i,l="string"==typeof a?a.toUpperCase():a;if(!r&&!a||!n)return t;const d={message:la(n,s),id:o};if(r){const e=new RegExp(la(r,s));d.valid=e.test(this.value)}else if("STR_NEQ_CI"===l){const e=(s?.expected??"").toLowerCase(),t=(this.value??"").toLowerCase();if(e&&t){const o=e.indexOf("@"),i=o>0?e.slice(0,o):e;d.valid=t!==e&&t!==i}else d.valid=!0}else a&&(d.valid=this.compareValues(l,s?.expected??-1,s?.actual??-1));return t.push(d),t},[])}get isValid(){return!this.validate().some(({valid:e})=>!1===e)}buildValidationItem({valid:e,message:t}){const o=this.value?e:"none",i=document.createElement("li");i.className="item",i.dataset.valid=o;const r=document.createElement("span");return r.className="message",r.textContent=t??"",i.appendChild(r),i}renderItems(e,t){e&&t.length&&this.list.replaceChildren(...this.validate().map(this.buildValidationItem.bind(this)))}updateLabel(e){e?(this.label.textContent=e,this.classList.remove("hide-label")):(this.classList.add("hide-label"),this.label.textContent="")}}const{host:ua,item:ga,symbolDefault:ma,symbolSuccess:ba,symbolError:ya}={host:{selector:()=>":host > div"},item:{selector:()=>".item"},symbolDefault:{selector:()=>'.item[data-valid="none"]::before'},symbolSuccess:{selector:()=>'.item[data-valid="true"]::before'},symbolError:{selector:()=>'.item[data-valid="false"]::before'}},fa=_e(jt({componentNameOverride:Je("input-wrapper")}),jt({mappings:{hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},fontFamily:{},padding:{},borderWidth:{...ua,property:"border-width"},borderStyle:{...ua,property:"border-style"},borderColor:{...ua,property:"border-color"},borderRadius:{...ua,property:"border-radius"},backgroundColor:{...ua,property:"background-color"},textColor:{property:"color"},labelMargin:{...ua,property:"gap"},itemsSpacing:{...ga,property:"line-height"},itemSymbolSuccessColor:{...ba,property:"color"},itemSymbolErrorColor:{...ya,property:"color"},itemSymbolDefault:{...ma,property:"content"},itemSymbolSuccess:{...ba,property:"content"},itemSymbolError:{...ya,property:"content"}}}),$t,_t)(ha),va=Je("new-password"),xa=fa.cssVarList,{host:Ca,label:wa,internalInputsWrapper:Ia,errorMessage:Sa,helperText:Ma,passwordInput:Aa,policyPreview:Ea}={host:{selector:()=>":host"},label:{selector:"::part(label)"},internalInputsWrapper:{selector:"descope-new-password-internal .wrapper"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},passwordInput:{selector:"descope-password"},policyPreview:{selector:"descope-policy-validation"}},Ta=_e(jt({mappings:{fontSize:[Ca,{},{selector:ds.componentName,property:ds.cssVarList.fontSize}],fontFamily:[wa,Sa,Ma],labelFontSize:{...wa,property:"font-size"},labelFontWeight:{...wa,property:"font-weight"},inputValueFontWeight:{...Aa,property:ds.cssVarList.inputValueFontWeight},inputPlaceholderFontWeight:{...Aa,property:ds.cssVarList.inputPlaceholderFontWeight},helperTextFontWeight:{...Ma,property:"font-weight"},errorMessageFontWeight:{...Sa,property:"font-weight"},labelTextColor:{...wa,property:"color"},errorMessageTextColor:{...Sa,property:"color"},errorMessageIcon:{...Sa,property:"background-image"},errorMessageIconSize:{...Sa,property:"background-size"},errorMessageIconPadding:{...Sa,property:"padding-inline-start"},errorMessageIconRepeat:{...Sa,property:"background-repeat"},errorMessageIconPosition:{...Sa,property:"background-position"},errorMessageFontSize:{...Sa,property:"font-size"},hostWidth:{...Ca,property:"width"},hostMinWidth:{...Ca,property:"min-width"},hostDirection:[{...Ca,property:"direction"},{...Aa,property:ds.cssVarList.hostDirection}],inputsRequiredIndicator:{...Ca,property:"content"},spaceBetweenInputs:{...Ia,property:"gap"},policyPreviewBackgroundColor:{...Ea,property:xa.backgroundColor},policyPreviewPadding:{...Ea,property:xa.padding},valueInputHeight:{...Aa,property:ds.cssVarList.valueInputHeight},valueInputMarginBottom:{...Aa,property:ds.cssVarList.valueInputMarginBottom}}}),$t,io({proxyProps:["value","selectionStart"]}),e=>class extends e{init(){super.init?.();const e=document.createElement("template"),t=this.getAttribute("external-input");e.innerHTML=`\n\t\t\t<${aa}\n\t\t\t\tname="new-password"\n\t\t\t\ttabindex="-1"\n\t\t\t\tslot="input"\n external-input="${t}"\n\t\t\t>\n </${aa}>\n\t\t\t`,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(aa),"true"===this.getAttribute("external-input")&&this.initExternalInput(),Xe(this,this.inputElement,{includeAttrs:["password-label","password-placeholder","confirm-label","confirm-placeholder","full-width","size","bordered","label","has-confirm","invalid","readonly","disabled","draggable","has-validation","policy-label","active-policies","available-policies","data-password-policy-value-minlength","data-password-policy-value-passwordstrength","data-password-policy-value-disallowedchars","data-password-policy-value-email","label-type","manual-visibility-toggle"]})}createSlottedExternalInput(e,t){const o=e.querySelector("input"),i=document.createElement("slot"),r=o.getAttribute("slot");i.setAttribute("name",t),i.setAttribute("slot",r),e.appendChild(i),o.setAttribute("slot",t),o.setAttribute("name",this.getAttribute("name")),o.setAttribute("data-hidden-input","true"),this.appendChild(o)}initExternalInput(){this.passwordInput=this.inputElement.querySelector('[data-id="password"]'),this.confirmInput=this.inputElement.querySelector('[data-id="confirm"]'),this.createSlottedExternalInput(this.passwordInput,"external-password-input"),this.createSlottedExternalInput(this.confirmInput,"external-confirm-input")}})(Qt({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t:host {\n\t\t\tdisplay: inline-block;\n\t\t\tmax-width: 100%;\n\t\t\tbox-sizing: border-box;\n\t\t}\n :host ::part(error-message) {\n direction: ltr;\n }\n\t\t${ut(ds.cssVarList)}\n\t\tvaadin-text-field {\n\t\t\tpadding: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t}\n\t\tvaadin-text-field::part(input-field) {\n\t\t\tmin-height: 0;\n\t\t\tbackground: transparent;\n\t\t\tbox-shadow: none;\n\t\t\tpadding: 0;\n\t\t}\n\t\tvaadin-text-field::part(input-field)::after {\n\t\t\tbackground: transparent;\n\t\t\topacity: 0;\n\t\t}\n\t\tdescope-new-password-internal {\n\t\t\t-webkit-mask-image: none;\n\t\t\tmin-height: 0;\n\t\t\twidth: 100%;\n\t\t\tpadding: 0;\n\t\t}\n\t\tdescope-new-password-internal > .wrapper {\n -webkit-mask-image: none;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t}\n\t\tdescope-password {\n\t\t\tdisplay: block;\n\t\t\twidth: 100%;\n\t\t}\n\t\tdescope-new-password-internal vaadin-password-field::before {\n\t\t\theight: initial;\n\t\t}\n descope-policy-validation {\n margin-top: 8px;\n display: flex;\n }\n .hidden {\n display: none;\n }\n\t\t`,excludeAttrsSync:["tabindex","style"],componentName:va}));customElements.define(da,fa);const ka=/^password-/,za=/^confirm-/,La=(e,t)=>e.replace(t,""),Va=["password-label","password-placeholder"],Na=["confirm-label","confirm-placeholder"],Da=["has-validation","policy-label","available-policies","active-policies","data-password-policy-value-minlength","data-password-policy-value-passwordstrength","data-password-policy-value-disallowedchars","data-password-policy-value-email","manual-visibility-toggle"],Pa=["has-confirm","disabled","bordered","size","full-width","maxlength","invalid","readonly","draggable","autocomplete","label-type","manual-visibility-toggle"],Ba=[].concat(Pa,Va,Na,Da),Fa=co({componentName:aa,baseSelector:"div"});customElements.define(aa,class extends Fa{static get observedAttributes(){return[].concat(Fa.observedAttributes||[],Ba)}constructor(){super(),this.innerHTML='\n\t\t\t<div class="wrapper"></div>\n\t\t',this.wrapperEle=this.querySelector(".wrapper")}get value(){return this.passwordInput?.value||""}set value(e){e!==this.value&&(this.passwordInput.value=e)}get hasConfirm(){return"true"===this.getAttribute("has-confirm")}onHasConfirmChange(e){this.confirmInput.classList.toggle("hidden",!e)}onHasValidationChange(e){this.policyPanel.classList.toggle("hidden",!e)}get hasValidation(){return"true"===this.getAttribute("has-validation")}getValidity(){if(this.isRequired&&!this.value)return{valueMissing:!0};if(this.value&&!this.policyPanel.isValid)return{typeMismatch:!0};if(this.hasConfirm&&this.confirmInput&&this.value!==this.confirmInput.value)return{patternMismatch:!0};const e=this.getAttribute("minlength"),t=parseInt(e,10)||0;return this.value.length>=t?{}:{tooShort:!0}}init(){this.addEventListener("focus",e=>{e.isTrusted&&this.passwordInput.focus()}),super.init?.(),this.renderInputs(this.hasConfirm,this.hasValidation)}renderInputs(){const e="true"===this.getAttribute("external-input"),t=`\n <div class="password-input-container">\n <descope-password\n autocomplete="new-password"\n manual-visibility-toggle="true"\n data-id="password"\n external-input="${e}"\n ></descope-password>\n <descope-policy-validation></descope-policy-validation>\n </div>\n <descope-password\n autocomplete="new-password"\n manual-visibility-toggle="true"\n external-input="${e}"\n data-id="confirm"\n ></descope-password>\n `;this.wrapperEle.innerHTML=t,this.passwordInput=this.querySelector('[data-id="password"]'),this.confirmInput=this.querySelector('[data-id="confirm"]'),this.policyPanel=this.querySelector("descope-policy-validation"),this.passwordStrength=this.querySelector("descope-password-strength"),this.inputs=[this.passwordInput,this.confirmInput],this.initInputs(),this.passwordInput.addEventListener("input",e=>{this.passwordStrength?.addEventListener("score-changed",({detail:e})=>{this.policyPanel.setAttribute("data-password-policy-actual-passwordstrength",e)},{once:!0}),this.passwordStrength?.setAttribute("value",e.target.value),this.policyPanel.setAttribute("value",e.target.value)}),Xe(this,this.policyPanel,{includeAttrs:Da,mapAttrs:{"policy-label":"label","available-policies":"data"}})}handleIndicatorStyle(){this.inputs.forEach(e=>{V(`\n\t\t\t\t:host ::part(required-indicator)::after {\n\t\t\t\t\tcontent: var(${Ta.cssVarList.inputsRequiredIndicator});\n width: 1em;\n text-align: center;\n\t\t\t\t}\n :host ::part(required-indicator) {\n display: inline-flex;\n }\n\t\t\t\t`,e)})}get isInvalid(){return this.hasAttribute("invalid")&&"false"!==this.getAttribute("invalid")}handleInputsInvalidAttribute(){this.inputs.forEach(e=>{e&&Ue(e,t=>{if(t.includes("invalid")){const t=e.getAttribute("invalid"),o=this.getAttribute("invalid");this.isInvalid&&o!==t&&e.setAttribute("invalid","true")}},{})})}initInputs(){this.handleIndicatorStyle(),this.handleInputsInvalidAttribute(),this.handleFocusEventsDispatching(this.inputs)}async togglePasswordStrength(){this.activePolicies.includes("passwordstrength")?this.passwordStrength||(await Promise.resolve().then(function(){return qx}),this.passwordStrength=document.createElement("descope-password-strength"),this.passwordStrength.setAttribute("options","Very weak,Weak,Average,Strong,Very strong"),this.passwordStrength.setAttribute("value",this.passwordInput.value||""),this.passwordStrength.setAttribute("st-host-direction",this.getAttribute("st-host-direction")),this.passwordStrength.setAttribute("full-width","true"),this.querySelector(".password-input-container").insertBefore(this.passwordStrength,this.policyPanel)):this.passwordStrength&&(this.passwordStrength.remove(),this.passwordStrength=null)}get activePolicies(){return(this.getAttribute("active-policies")||"").split(",")}toggleBooleanAttribute(e,t,o){null===o?e?.removeAttribute(t):e?.setAttribute(t,o)}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),t!==o&&("has-validation"===e?this.onHasValidationChange("true"===o):"has-confirm"===e?this.onHasConfirmChange("true"===o):Pa.includes(e)?this.inputs.forEach(t=>this.toggleBooleanAttribute(t,e,o)):Va.includes(e)?this.toggleBooleanAttribute(this.passwordInput,La(e,ka),o):Na.includes(e)&&this.toggleBooleanAttribute(this.confirmInput,La(e,za),o),"active-policies"===e&&this.togglePasswordStrength())}}),customElements.define(va,Ta);const Ra=Je("recaptcha"),Wa=["enabled","site-key","action","enterprise","variant"],Oa=Gt({componentName:Ra,baseSelector:":host > div"}),ja=_e($t)(class extends Oa{static get observedAttributes(){return Wa.concat(Oa.observedAttributes||[])}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),t!==o&&("enabled"===e&&this.#Fe("true"===o),"variant"===e&&this.updatePreview())}renderRecaptcha(e){this.children.length?this.updatePreview():this.toggleRecaptchaEles(e)}displayRecaptcha(){this.isWidget?this.displayWidget():this.displayDeprecated()}displayWidget(){this.mockRecaptchaEle.style.display="none",this.recaptchaWidgetEle.style.display="",this.depercatedRecaptchaEle.style.display="none"}hideRecaptcha(){this.recaptchaWidgetEle.style.display="none",this.depercatedRecaptchaEle.style.display="none",this.mockRecaptchaEle.style.display=""}displayDeprecated(){this.mockRecaptchaEle.style.display="none",this.recaptchaWidgetEle.style.display="none",this.depercatedRecaptchaEle.style.display=""}toggleRecaptchaEles(e){e?this.displayRecaptcha():this.hideRecaptcha()}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="badge">\n <span id="recaptcha"></span>\n <span id="recaptcha-widget"></span>\n <input id="recaptcha-widget-input" type="hidden" name="recaptcha-widget" required />\n <img src="https://imgs.descope.com/connectors/templates/recaptcha/recaptcha-big.png" alt="recaptcha"/>\n </div>\n <slot></slot>\n\t',V('\n :host {\n display: inline-flex;\n }\n :host > div:not(.hidden) {\n display: flex;\n }\n :host #recaptcha .grecaptcha-badge {\n box-shadow: none !important;\n }\n :host #recaptcha .grecaptcha-logo {\n height: 100%;\n }\n :host #recaptcha {\n\t\t\t\twidth: 100%;\n height: 100%;\n\t\t\t}\n :host #recaptcha-widget {\n width: 100%;\n height: 100%;\n }\n :host #recaptcha-widget-input {\n display: none;\n }\n :host img {\n width: 256px;\n }\n :host([full-width="true"]) {\n width: 100%;\n }\n .hidden {\n display: none;\n }\n ',this),this.depercatedRecaptchaEle=this.baseElement.querySelector("#recaptcha"),this.recaptchaWidgetEle=this.baseElement.querySelector("#recaptcha-widget"),this.recaptchaWidgetInputEle=this.baseElement.querySelector("#recaptcha-widget-input"),this.mockRecaptchaEle=this.baseElement.querySelector("img"),this.badge=this.shadowRoot.querySelector(".badge")}init(){super.init?.(),Ge(this,this.updatePreview.bind(this))}updatePreview(){this.children.length?(this.depercatedRecaptchaEle.style.display="none",this.recaptchaWidgetEle.style.display="none",this.mockRecaptchaEle.style.display="none",this.badge.classList.add("hidden")):(this.toggleRecaptchaEles(this.enabled),this.badge.classList.remove("hidden"))}getValidity(){return this.isWidget?this.recaptchaWidgetInputEle.value?{}:{valueMissing:!0}:{}}checkValidity(){return!this.isWidget||!!this.recaptchaWidgetInputEle.value}get enterprise(){return"true"===this.getAttribute("enterprise")}get siteKey(){return this.getAttribute("site-key")}get action(){return this.getAttribute("action")||"load"}get enabled(){return"true"===this.getAttribute("enabled")}get variant(){return this.getAttribute("variant")||"text"}get isWidget(){return"widget"===this.variant}get scriptURL(){const e=new URL("https://www.google.com/recaptcha/");return e.pathname+=(this.enterprise?"enterprise":"api")+".js",e.searchParams.append("onload","onRecaptchaLoadCallback"),e.searchParams.append("render","explicit"),e.toString()}#Fe(e){this.renderRecaptcha(e),this.isWidget||e&&(this.#Re(),document.getElementById("recaptcha-script")?window.onRecaptchaLoadCallback():this.#We())}#We(){const e=document.createElement("script");e.src=this.scriptURL,e.async=!0,e.id="recaptcha-script",e.defer=!0,document.body.appendChild(e)}get grecaptchaInstance(){return this.enterprise?window.grecaptcha?.enterprise:window.grecaptcha}#Oe(e,t,o){this.isConnected&&e.ready(()=>{const i=t.querySelector('textarea[name^="g-recaptcha-response"]')?.cloneNode();if(i&&(i.style.display="none",document.body.appendChild(i)),!this.siteKey)return;const r=e?.execute(o,{action:this.action});r.then((r,n)=>{n?console.warn("could not execute recaptcha",n):(this.updateComponentsContext({risktoken:r,riskaction:this.action}),this.isConnected&&setTimeout(()=>{this.#Oe(e,t,o)},11e4)),i.remove()})})}#Re(){window.onRecaptchaLoadCallback=()=>{const e=this.depercatedRecaptchaEle;if(e.hasChildNodes())return;const{grecaptchaInstance:t}=this;t&&setTimeout(()=>{const o=t.render(e,{sitekey:this.siteKey,badge:"inline",size:"invisible"});this.#Oe(t,e,o)},0)}}});customElements.define(Ra,ja);const $a=Je("upload-file"),_a=["title","description","button-label","accept","readonly","button-mode","button-variant","required","size","icon"],Ha=co({componentName:$a,baseSelector:":host > div"}),qa=Ni.cssVarList,{host:Ya,wrapper:Ua,icon:Ga,title:Za,description:Qa,requiredIndicator:Ja}={host:{selector:()=>":host"},wrapper:{selector:()=>":host > div"},icon:{selector:()=>"::slotted(*)"},title:{selector:()=>".title"},description:{selector:()=>".description"},requiredIndicator:{selector:()=>".title::after"}},Ka=_e(jt({componentNameOverride:Je("input-wrapper")}),jt({mappings:{fontSize:{},fontFamily:{},borderColor:{},borderWidth:{},borderStyle:{},borderRadius:{},hostHeight:{...Ya,property:"height"},hostWidth:{...Ya,property:"width"},hostPadding:{property:"padding"},hostDirection:[{...Ya,property:"direction"},{selector:()=>Ni.componentName,property:qa.hostDirection}],gap:{...Ua},lineHeight:{...Ua,property:"line-height"},titleFontSize:{...Za,property:"font-size"},titleFontWeight:{...Za,property:"font-weight"},descriptionFontSize:{...Qa,property:"font-size"},labelTextColor:[{...Za,property:"color"},{...Qa,property:"color"}],iconSize:{...Ga,property:"width"},requiredIndicator:{...Ja,property:"content"}}}),$t,_t)(class extends Ha{static get observedAttributes(){return _a.concat(Ha.observedAttributes||[])}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n\t\t\t<div>\n <slot name="icon"></slot>\n\t\t\t\t<div class="title">\n\t\t\t\t\t<span class="title-text"></span>\n\t\t\t\t</div>\n\t\t\t\t<div class="description"></div>\n\t\t\t\t<div class="button-wrapper">\n\t\t\t\t\t<input type="file" tabindex="-1" aria-labelledby="button"/>\n\t\t\t\t\t<descope-button id="button"></descope-button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t',V("\n :host {\n\t\t\t\tdisplay: flex;\n\t\t\t}\n\t\t\t:host > div {\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t\ttext-align: center;\n\t\t\t\tflex-direction: column;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\t\t\t.button-wrapper {\n\t\t\t\tposition: relative;\n\t\t\t\twidth: fit-content;\n\t\t\t}\n\t\t\tinput {\n\t\t\t\tposition: absolute;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\topacity: 0;\n\t\t\t}\n ",this),this.wrapperEle=this.shadowRoot.querySelector(".wrapper"),this.inputElement=this.shadowRoot.querySelector("input"),this.button.onclick=()=>this.inputElement.click(),this.inputElement.onchange=async e=>{const t=e.target.files;var o;t.length&&(this.value=await(o=t[0],new Promise(e=>{const t=new FileReader;t.onload=t=>e(t.target.result),t.readAsDataURL(o)})),this.updateDescription((e=>e.name.replace(/^.*\\/,""))(t[0])))},this.oninvalid=()=>{this.setAttribute("invalid","true")}}getValidity(){return this.isRequired&&!this.input.value?{valueMissing:!0}:(this.removeAttribute("invalid"),{})}initInputs(){this.rootElement.querySelector("descope-button").onclick=()=>this.inputElement.click()}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),t!==o&&("title"===e?this.updateTitle(o):"description"===e?this.updateDescription(o):"button-label"===e?this.updateButtonLabel(o):"button-mode"===e?this.updateButtonMode(o):"button-variant"===e?this.updateButtonVariant(o):"size"===e?this.updateButtonSize(o):"accept"===e?this.updateInputAccept(o):"readonly"===e&&this.updateReadOnly(o))}get button(){return this.shadowRoot.querySelector("descope-button")}get input(){return this.shadowRoot.querySelector("input")}get title(){return this.shadowRoot.querySelector(".title-text")}get description(){return this.shadowRoot.querySelector(".description")}get icon(){return this.shadowRoot.querySelector(".icon")}updateTitle(e){this.title.textContent=e}updateDescription(e){this.description.textContent=e}updateButtonLabel(e){this.button.textContent=e}updateButtonSize(e){this.button.setAttribute("size",e)}updateButtonMode(e){this.button.setAttribute("mode",e)}updateButtonVariant(e){this.button.setAttribute("variant",e)}updateInputAccept(e){this.input.setAttribute("accept",e)}updateReadOnly(e){"true"===e?this.input.setAttribute("disabled","true"):this.input.removeAttribute("disabled")}});customElements.define($a,Ka);const Xa=e=>{class t extends(co({componentName:e,baseSelector:"slot"})){constructor(){super(),this.innerHTML='\n <slot part="wrapper"></slot>\n '}dispatchChange=Zt.bind(this,"change");get items(){return this.querySelector("slot").assignedElements()}get isReadonly(){return"true"===this.getAttribute("readonly")}get size(){return this.getAttribute("size")||"md"}get value(){console.warn("get value","is not implemented")}set value(e){console.warn("set value","is not implemented")}onSizeChange(){this.items.forEach(e=>{e.setAttribute("size",this.size)})}onReadOnlyChange(){this.querySelector("slot").toggleAttribute("inert",this.isReadonly)}getValidity(){console.warn("getValidity","is not implemented")}onObservedAttributeChange(e){e.forEach(e=>{switch(e){case"size":this.onSizeChange();break;case"readonly":this.onReadOnlyChange()}})}init(){this.addEventListener("focus",e=>{e.isTrusted&&this.items[0]?.focus()}),super.init?.(),Ue(this,this.onObservedAttributeChange.bind(this),{includeAttrs:["size","readonly"]})}}return t},el=Je("button-selection-group-internal");class tl extends(Xa(el)){getSelectedNode(){return this.items.find(e=>e.hasAttribute("selected"))}get allowDeselect(){return"true"===this.getAttribute("allow-deselect")}removeSelected(){this.getSelectedNode()?.removeAttribute("selected")}onClick(e){e.target!==e.currentTarget&&(e.target===this.getSelectedNode()&&this.allowDeselect?this.removeSelected():this.setSelected(e.target),this.dispatchChange())}setSelected(e){e!==this.getSelectedNode()&&(this.removeSelected(),e?.setAttribute("selected","true"))}get defaultValue(){return this.getAttribute("default-value")}setDefaultValue(){setTimeout(()=>{this.defaultValue&&(this.value=this.defaultValue,this.setCustomValidity())})}get value(){return this.getSelectedNode()?.value||""}set value(e){const t=this.items.find(t=>t.value===e);this.setSelected(t)}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:{}}init(){super.init(),this.setDefaultValue(),this.querySelector("slot").addEventListener("click",this.onClick.bind(this))}}const ol=e=>class extends e{#K=({value:e,label:t})=>`<descope-button-selection-group-item value="${e}">${t}</descope-button-selection-group-item>`;#F;get renderItem(){return this.#K}set renderItem(e){this.#K=e,this.renderItems()}get size(){return this.inputElement?.size}get data(){if(this.#F)return this.#F;const e=this.getAttribute("data");if(e)try{const t=JSON.parse(e);if(this.isValidDataType(t))return t}catch(e){console.error('could not parse data string from attribute "data" - ',e.message)}return[]}set data(e){this.isValidDataType(e)&&(this.#F=e,this.renderItems())}isValidDataType(e){const t=Array.isArray(e);return t||console.error("data must be an array, received:",e),t}getItemsTemplate(){return this.data?.reduce?.((e,t)=>e+(this.renderItem?.(t||{})||""),"")}renderItems(){const e=this.getItemsTemplate();e&&(this.innerHTML=e)}init(){super.init?.(),this.renderItems(),Ue(this,this.renderItems.bind(this),{includeAttrs:["data"]}),Ge(this,({addedNodes:e})=>{e.forEach(e=>{e.setAttribute("size",this.size)})})}},{host:il,label:rl,requiredIndicator:nl,internalWrapper:sl,errorMessage:al}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},internalWrapper:{selector:()=>':host [part="internal-component"] slot'},errorMessage:{selector:"::part(error-message)"}},ll={hostWidth:{...il,property:"width"},hostDirection:{...il,property:"direction"},fontFamily:il,labelTextColor:[{...rl,property:"color"},{...nl,property:"color"}],labelRequiredIndicator:{...nl,property:"content"},errorMessageTextColor:{...al,property:"color"},errorMessageIcon:{...al,property:"background-image"},errorMessageIconSize:{...al,property:"background-size"},errorMessageIconPadding:{...al,property:"padding-inline-start"},errorMessageIconRepeat:{...al,property:"background-repeat"},errorMessageIconPosition:{...al,property:"background-position"},errorMessageFontSize:{...al,property:"font-size"},itemsSpacing:{...sl,property:"gap"}},dl=`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n\t\t\t}\n\t\t\t\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n\n\t\t\t:host::after {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\t\t\t:host::part(input-field)::after {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\n [part="internal-component"] {\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n display: inline-block;\n\t\t\t\tmin-height: initial;\n\t\t\t}\n\n [part="internal-component"] slot {\n box-sizing: border-box;\n width: 100%;\n display: flex;\n flex-wrap: wrap;\n\t\t\t}\n\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tbackground-color: transparent;\n\t\t\t\tpadding: 0;\n\t\t\t\toverflow: hidden;\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t}\n\n\t\t\tvaadin-text-field {\n\t\t\t\tmargin: 0;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%\n\t\t\t}\n\n\t\t\tvaadin-text-field::before {\n\t\t\t\theight: 0;\n\t\t\t}\n\n\t\t\tvaadin-text-field[readonly] > input:placeholder-shown {\n\t\t\t\topacity: 1;\n\t\t\t}\n\n\t\t\tvaadin-text-field[readonly]::part(input-field)::after {\n\t\t\t\tborder: 0 solid;\n\t\t\t}\n\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\n ${xt("vaadin-text-field")}\n\t\t\t${bt("vaadin-text-field")}\n `,cl=Je("button-selection-group"),pl=_e(jt({mappings:{...ll}}),$t,io({proxyProps:["value","selectionStart"]}),_t,ol,e=>class extends e{init(){super.init?.();const e=document.createElement("template");e.innerHTML=`\n <${el}\n \tname="button-selection-group"\n \tslot="input"\n tabindex="-1"\n part="internal-component"\n >\n <slot></slot>\n </${el}>\n `,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(el),Xe(this,this.inputElement,{includeAttrs:["size","default-value","allow-deselect"]})}})(Qt({slots:[],wrappedEleName:"vaadin-text-field",style:()=>dl,excludeAttrsSync:["tabindex","style"],componentName:cl}));customElements.define(el,tl);const hl=Je("button-selection-group-item");class ul extends(Gt({componentName:hl,baseSelector:":host > descope-button"})){get size(){return this.getAttribute("size")||"md"}get variant(){return this.getAttribute("variant")||"contained"}get value(){return this.getAttribute("value")||""}set value(e){this.setAttribute("value",e)}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML=`\n <descope-button variant="${this.variant}" size="${this.size}" mode="primary">\n <slot></slot>\n </descope-button>\n\t`,V("\n descope-button {\n max-width: 100%;\n }\n\t\t\tdescope-button > slot {\n\t\t\t\twidth: 100%;\n\t\t\t\toverflow: hidden;\n text-overflow: ellipsis;\n display: inline-block;\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n max-width: 100%\n\t\t\t}\n ",this),Xe(this,this.baseElement,{includeAttrs:["size","variant"]}),Xe(this.baseElement,this,{includeAttrs:["focused","active"]})}handleFocus(){this.shadowRoot.querySelector("descope-button")?.focus()}focus(){this.handleFocus()}init(){super.init(),this.addEventListener("focus",e=>{e.isTrusted&&this.handleFocus()})}}const gl=_e(jt({mappings:{hostDirection:{selector:()=>Ni.componentName,property:Ni.cssVarList.hostDirection},backgroundColor:{selector:()=>Ni.componentName,property:Ni.cssVarList.backgroundColor},labelTextColor:{selector:()=>Ni.componentName,property:Ni.cssVarList.labelTextColor},borderColor:{selector:()=>Ni.componentName,property:Ni.cssVarList.borderColor},borderWidth:{selector:()=>Ni.componentName,property:Ni.cssVarList.borderWidth},borderStyle:{selector:()=>Ni.componentName,property:Ni.cssVarList.borderStyle},borderRadius:{selector:()=>Ni.componentName,property:Ni.cssVarList.borderRadius},outlineColor:{selector:()=>Ni.componentName,property:Ni.cssVarList.outlineColor}}}),$t,_t)(ul);customElements.define(hl,gl),customElements.define(cl,pl);const ml=Je("button-multi-selection-group-internal");class bl extends(Xa(ml)){#je(){return this.items.filter(e=>e.hasAttribute("selected"))}onClick(e){e.target!==e.currentTarget&&(this.#je().includes(e.target)?e.target.removeAttribute("selected"):e.target.setAttribute("selected","true"),this.dispatchChange())}get value(){return this.#je().map(e=>e.value)}set value(e){this.items.forEach(t=>{e.includes(t.value)?t.setAttribute("selected","true"):t.removeAttribute("selected")})}get minItemsSelection(){return parseInt(this.getAttribute("min-items-selection"),10)||0}get maxItemsSelection(){return parseInt(this.getAttribute("max-items-selection"),10)||0}#$e(e){const t=Array.isArray(e);return t||console.error("default-values must be an array, received:",e),t}get defaultValues(){const e=this.getAttribute("default-values");if(e)try{const t=JSON.parse(e);if(this.#$e(t))return t}catch(e){console.error('could not parse data string from attribute "default-values" -',e.message)}return[]}setDefaultValues(){setTimeout(()=>{this.defaultValues&&(this.value=this.defaultValues,this.setCustomValidity())})}getValidity(){return this.isRequired&&!this.value.length?{valueMissing:!0}:this.isRequired&&this.minItemsSelection&&this.value.length<this.minItemsSelection?{rangeUnderflow:!0}:this.maxItemsSelection&&this.value.length>this.maxItemsSelection?{rangeOverflow:!0}:{}}init(){super.init(),this.setDefaultValues(),this.querySelector("slot").addEventListener("click",this.onClick.bind(this))}}const yl=Je("button-multi-selection-group"),fl=_e(jt({mappings:{...ll}}),$t,io({proxyProps:["value","selectionStart"]}),_t,ol,e=>class extends e{init(){super.init?.();const e=document.createElement("template");e.innerHTML=`\n <${ml}\n \tname="button-selection-group"\n \tslot="input"\n tabindex="-1"\n part="internal-component"\n >\n <slot></slot>\n </${ml}>\n `,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(ml),Xe(this,this.inputElement,{includeAttrs:["size","default-values","min-items-selection","max-items-selection"]})}})(Qt({slots:[],wrappedEleName:"vaadin-text-field",style:()=>dl,excludeAttrsSync:["tabindex","style"],componentName:yl}));customElements.define(ml,bl),customElements.define(yl,fl);class vl extends u.v{get sortable(){return"true"===this.getAttribute("sortable")}_defaultRenderer(e,t,o){const i=o.item[this.path]||"",r=Array.isArray(i)?i.join(", "):i;this.__setTextContent(e,r),e.title=r}_defaultHeaderRenderer(e,t){this.sortable?super._defaultHeaderRenderer(e,t):this.__setTextContent(e,this.__getHeader(this.header,this.path))}}const xl=Je("grid-text-column");customElements.define(xl,vl);const Cl=Je("grid-custom-column");customElements.define(Cl,class extends vl{_defaultRenderer(e,t,o){const i=o.item[this.path]||"",r=Array.from(this.children).find(e=>{const t=e.getAttribute("data-pattern");return!t||new RegExp(t).test(i)});if(!r)return void this.__setTextContent(e,o.item[this.path]||"");const n=r.cloneNode(!0);n.textContent=i||"",e.innerHTML="",e.append(n)}});const wl=()=>{const e=document.createElement("descope-checkbox");return e.setAttribute("bordered","true"),e.setAttribute("size","xs"),e},Il=e=>!!e.items?.length&&e.selectedItems.length===e.items.length;class Sl extends g.${_onHeaderRendererOrBindingChanged(){}_headerRenderer(e){const t=e.parentNode;let o=e.querySelector("descope-checkbox");o||(o=wl(),o.addEventListener("input",()=>{const e=Il(t);t.selectedItems=e?[]:t.items}),e.appendChild(o)),o.setAttribute("checked",Il(t))}_defaultRenderer(e,t,o){const i=e.parentNode;let r=e.querySelector("descope-checkbox");r||(r=wl(),e.appendChild(r)),r.onchange=()=>{r.checked?i.selectItem(o.item):i.deselectItem(o.item)},r.setAttribute("checked",o.selected)}}const Ml=Je("grid-selection-column");customElements.define(Ml,Sl);class Al extends u.v{get sortable(){return"true"===this.getAttribute("sortable")}_defaultRenderer(e,t,o){const i=t._gridValue,r=i.detailsOpenedItems?.indexOf(o.item)??-1,n=-1!==r,s=document.createElement("vaadin-icon");s.icon=n?"vaadin:angle-up":"vaadin:angle-down",s.classList.add("toggle-details-button",n?"opened":"closed"),e.innerHTML="",e.append(s),s.onclick=()=>{i.detailsOpenedItems=n?i.detailsOpenedItems.toSpliced(r,1):[...i.detailsOpenedItems,o.item]}}_defaultHeaderRenderer(e,t){this.sortable?super._defaultHeaderRenderer(e,t):this.__setTextContent(e,this.__getHeader(this.header,this.path))}}const El=Je("grid-item-details-column");customElements.define(El,Al),customElements.define(wi,Mi),customElements.define(Ai,Ei);const Tl=e=>{const t=document.createElement("textarea");return t.innerHTML=e,t.value},kl=Je("code-snippet");let zl=class extends(Gt({componentName:kl,baseSelector:":host > .wrapper"})){static get observedAttributes(){return["lang","inline","copy-button"]}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="wrapper">\n <code class="hljs"></code>\n </div>\n ',V("\n :host {\n display: inline-block;\n width: 100%;\n }\n .wrapper {\n display: grid;\n width: 100%;\n }\n code {\n grid-area: 1 / 1;\n display: block;\n width: 100%;\n min-height: 1em;\n overflow-x: auto;\n }\n pre {\n margin: 0;\n }\n .copy-btn {\n grid-area: 1 / 1;\n place-self: start end;\n margin: 8px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n border-style: solid;\n cursor: pointer;\n opacity: 0;\n transition: opacity 150ms ease, background 150ms ease;\n }\n .wrapper:hover .copy-btn,\n .copy-btn:focus-visible {\n opacity: 1;\n }\n .copy-btn descope-icon {\n width: 16px;\n height: 16px;\n pointer-events: none;\n flex-shrink: 0;\n }\n .copy-btn .check-icon {\n display: none;\n }\n .copy-btn.copied .check-icon {\n display: block;\n }\n .copy-btn.copied descope-icon:not(.check-icon) {\n display: none;\n }\n ",this)}init(){super.init?.(),this.lang=this.getAttribute("lang"),this.isInline="true"===this.getAttribute("inline"),"true"===this.getAttribute("copy-button")&&this.#_e(),Ge(this,this.#He.bind(this))}get contentNode(){return this.shadowRoot.querySelector("code")}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),t!==o&&("inline"===e&&(this.isInline=o),"lang"===e&&(this.lang=o),"copy-button"===e&&("true"===o?this.#_e():this.#qe()),this.#He())}#_e(){if(this.shadowRoot.querySelector(".copy-btn"))return;const e=document.createElement("button");e.className="copy-btn",e.type="button",e.setAttribute("aria-label","Copy code");const t=document.createElement("descope-icon");t.setAttribute("src","data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPgogIDxyZWN0IHg9IjkiIHk9IjkiIHdpZHRoPSIxMyIgaGVpZ2h0PSIxMyIgcng9IjIiIHJ5PSIyIj48L3JlY3Q+CiAgPHBhdGggZD0iTTUgMTVINGEyIDIgMCAwIDEtMi0yVjRhMiAyIDAgMCAxIDItMmg5YTIgMiAwIDAgMSAyIDJ2MSI+PC9wYXRoPgo8L3N2Zz4K");const o=document.createElement("descope-icon");o.setAttribute("src","data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iY2hlY2staWNvbiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJjdXJyZW50Q29sb3IiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj4KICA8cG9seWxpbmUgcG9pbnRzPSIyMCA2IDkgMTcgNCAxMiI+PC9wb2x5bGluZT4KPC9zdmc+Cg=="),o.classList.add("check-icon"),e.appendChild(t),e.appendChild(o),e.addEventListener("click",()=>this.#Ye()),this.shadowRoot.querySelector(".wrapper").appendChild(e)}#qe(){this.shadowRoot.querySelector(".copy-btn")?.remove()}#Ye(){const e=this.shadowRoot.querySelector(".copy-btn");navigator.clipboard.writeText(Tl(this.textContent)).then(()=>{e.classList.add("copied"),setTimeout(()=>e.classList.remove("copied"),2e3)}).catch(()=>{})}#He(){const e=Tl(this.textContent),t=this.lang;if(!t)return void(this.contentNode.textContent=e);const{value:o}=m.A.highlight(e,{language:t});this.contentNode.innerHTML=(e=>this.isInline?e:`<pre>${e}</pre>`)(o)}};const Ll={selector:()=>".copy-btn"},{root:Vl,docTag:Nl,keyword:Dl,metaKeyword:Pl,templateTag:Bl,templateVariable:Fl,type:Rl,variableLanguage:Wl,title:Ol,titleClass:jl,titleClassInherited:$l,titleFunction:_l,attr:Hl,attribute:ql,literal:Yl,meta:Ul,number:Gl,operator:Zl,variable:Ql,selectorAttr:Jl,selectorClass:Kl,selectorId:Xl,regexp:ed,string:td,metaString:od,builtIn:id,symbol:rd,comment:nd,code:sd,formula:ad,name:ld,quote:dd,selectorTag:cd,selectorPseudo:pd,subst:hd,section:ud,bullet:gd,emphasis:md,strong:bd,addition:yd,deletion:fd,charEscape:vd,link:xd,params:Cd,property:wd,punctuation:Id,tag:Sd}={root:{selector:()=>".hljs"},docTag:{selector:()=>".hljs-doctag"},keyword:{selector:()=>".hljs-keyword"},metaKeyword:{selector:()=>".hljs-meta .hljs-keyword"},templateTag:{selector:()=>".hljs-template-tag"},templateVariable:{selector:()=>".hljs-template-variable"},type:{selector:()=>".hljs-type"},variableLanguage:{selector:()=>".hljs-variable.language"},title:{selector:()=>".hljs-title"},titleClass:{selector:()=>".hljs-title.class_"},titleClassInherited:{selector:()=>".hljs-title.class_.inherited__"},titleFunction:{selector:()=>".hljs-title.function_"},attr:{selector:()=>".hljs-attr"},attribute:{selector:()=>".hljs-attribute"},literal:{selector:()=>".hljs-literal"},meta:{selector:()=>".hljs-meta"},number:{selector:()=>".hljs-number"},operator:{selector:()=>".hljs-operator"},variable:{selector:()=>".hljs-variable"},selectorAttr:{selector:()=>".hljs-selector-attr"},selectorClass:{selector:()=>".hljs-selector-class"},selectorId:{selector:()=>".hljs-selector-id"},regexp:{selector:()=>".hljs-regexp"},string:{selector:()=>".hljs-string"},metaString:{selector:()=>".hljs-meta .hljs-string"},builtIn:{selector:()=>".hljs-built_in"},symbol:{selector:()=>".hljs-symbol"},comment:{selector:()=>".hljs-comment"},code:{selector:()=>".hljs-code"},formula:{selector:()=>".hljs-formula"},name:{selector:()=>".hljs-name"},quote:{selector:()=>".hljs-quote"},selectorTag:{selector:()=>".hljs-selector-tag"},selectorPseudo:{selector:()=>".hljs-selector-pseudo"},subst:{selector:()=>".hljs-subst"},section:{selector:()=>".hljs-section"},bullet:{selector:()=>".hljs-bullet"},emphasis:{selector:()=>".hljs-emphasis"},strong:{selector:()=>".hljs-strong"},addition:{selector:()=>".hljs-addition"},deletion:{selector:()=>".hljs-deletion"},charEscape:{selector:()=>".hljs-char.escape"},link:{selector:()=>".hljs-link"},params:{selector:()=>".hljs-params"},property:{selector:()=>".hljs-property"},punctuation:{selector:()=>".hljs-punctuation"},tag:{selector:()=>".hljs-tag"}},Md=_e(jt({mappings:{rootBgColor:{...Vl,property:"background-color"},rootTextColor:{...Vl,property:"color"},docTagTextColor:{...Nl,property:"color"},keywordTextColor:{...Dl,property:"color"},metaKeywordTextColor:{...Pl,property:"color"},templateTagTextColor:{...Bl,property:"color"},templateVariableTextColor:{...Fl,property:"color"},typeTextColor:{...Rl,property:"color"},variableLanguageTextColor:{...Wl,property:"color"},titleTextColor:{...Ol,property:"color"},titleClassTextColor:{...jl,property:"color"},titleClassInheritedTextColor:{...$l,property:"color"},titleFunctionTextColor:{..._l,property:"color"},attrTextColor:{...Hl,property:"color"},attributeTextColor:{...ql,property:"color"},literalTextColor:{...Yl,property:"color"},metaTextColor:{...Ul,property:"color"},numberTextColor:{...Gl,property:"color"},operatorTextColor:{...Zl,property:"color"},variableTextColor:{...Ql,property:"color"},selectorAttrTextColor:{...Jl,property:"color"},selectorClassTextColor:{...Kl,property:"color"},selectorIdTextColor:{...Xl,property:"color"},regexpTextColor:{...ed,property:"color"},stringTextColor:{...td,property:"color"},metaStringTextColor:{...od,property:"color"},builtInTextColor:{...id,property:"color"},symbolTextColor:{...rd,property:"color"},commentTextColor:{...nd,property:"color"},codeTextColor:{...sd,property:"color"},formulaTextColor:{...ad,property:"color"},nameTextColor:{...ld,property:"color"},quoteTextColor:{...dd,property:"color"},selectorTagTextColor:{...cd,property:"color"},selectorPseudoTextColor:{...pd,property:"color"},substTextColor:{...hd,property:"color"},sectionTextColor:{...ud,property:"color"},bulletTextColor:{...gd,property:"color"},emphasisTextColor:{...md,property:"color"},strongTextColor:{...bd,property:"color"},additionTextColor:{...yd,property:"color"},additionBgColor:{...yd,property:"background-color"},deletionTextColor:{...fd,property:"color"},deletionBgColor:{...fd,property:"background-color"},charEscapeTextColor:{...vd,property:"color"},linkTextColor:{...xd,property:"color"},paramsTextColor:{...Cd,property:"color"},propertyTextColor:{...wd,property:"color"},punctuationTextColor:{...Id,property:"color"},tagTextColor:{...Sd,property:"color"},copyButtonSize:[{...Ll,property:"width"},{...Ll,property:"height"}],copyButtonBorderRadius:{...Ll,property:"border-radius"},copyButtonBorderWidth:{...Ll,property:"border-width"},copyButtonBorderColor:{...Ll,property:"border-color"},copyButtonBgColor:{...Ll,property:"background-color"},copyButtonHoverBgColor:{selector:()=>".copy-btn:hover",property:"background-color"},copyButtonColor:{...Ll,property:"color"}}}),$t,_t)(zl);customElements.define(kl,Md);const Ad=e=>{const t=Array.isArray(e);return t||console.error("data must be an array, received:",e),t},Ed=e=>{const t=document.createElement("div");return t.textContent=e,t.innerHTML},Td=e=>(e=>e?.constructor===Object)(e)?"object":Array.isArray(e)?"array":/^\s*<[\s\S]*>/.test(e)?"xml":"text",kd=(e,t)=>`<descope-code-snippet copy-button="true" lang="${t}" class="row-details__value code">${Ed(e)}</descope-code-snippet>`,zd=e=>`<div class="row-details__value text" title="${e}">${Ed(e)}</div>`,Ld=e=>kd(JSON.stringify(e,null,2),"json"),Vd=e=>{const t=Td(e);return"object"===t?Ld(e):"xml"===t?(e=>kd(e,"xml"))(e):"array"===t?e.some(e=>"object"===Td(e))?Ld(e):zd(e.join(",\n")):zd(e)},Nd=Je("grid"),{host:Dd,headerRow:Pd,headerRowCell:Bd,contentRow:Fd,firstRow:Rd,sortIndicators:Wd,activeSortIndicator:Od,selectedRow:jd,rowSeparator:$d,resizeHandle:_d,toggleDetailsPanelButton:Hd,toggleDetailsPanelButtonOpened:qd,toggleDetailsPanelButtonClosed:Yd,detailsPanel:Ud,detailsPanelLabels:Gd,selectedRowCell:Zd,detailsPanelContent:Qd}={host:{selector:()=>"vaadin-grid"},headerRow:{selector:()=>"::part(header-cell)"},headerRowCell:{selector:()=>"vaadin-grid::part(header-cell)"},contentRow:{selector:()=>"::part(cell)"},firstRow:{selector:()=>"::part(first-header-row-cell)"},selectedRow:{selector:()=>"::part(selected-row)"},selectedRowCell:{selector:()=>"::part(selected-row-cell)"},sortIndicators:{selector:()=>"vaadin-grid-sorter::part(indicators)"},activeSortIndicator:{selector:()=>"vaadin-grid-sorter[direction]"},rowSeparator:{selector:()=>"vaadin-grid::part(body-cell)"},resizeHandle:{selector:()=>"::part(resize-handle)"},toggleDetailsPanelButton:{selector:()=>"vaadin-grid vaadin-icon.toggle-details-button"},toggleDetailsPanelButtonOpened:{selector:()=>"vaadin-grid vaadin-icon.toggle-details-button.opened"},toggleDetailsPanelButtonClosed:{selector:()=>"vaadin-grid vaadin-icon.toggle-details-button.closed"},detailsPanel:{selector:()=>"vaadin-grid::part(details-cell)"},detailsPanelLabels:{selector:()=>"vaadin-grid .row-details__label"},detailsPanelContent:{selector:()=>"vaadin-grid .row-details"}},Jd=_e(jt({componentNameOverride:Je("input-wrapper")}),jt({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostHeight:{selector:()=>":host",property:"height"},hostMinHeight:{selector:()=>":host",property:"min-height"},fontFamily:[{...Pd},{...Fd}],fontSize:[{...Pd},{...Fd}],fontWeight:{...Fd},valueTextColor:{...Fd,property:"color"},backgroundColor:[{...Dd,property:"background-color"},{...Fd,property:"background-color"}],sortIndicatorsColor:{...Wd,property:"color"},activeSortIndicator:{...Od,property:"color"},borderColor:{...Dd,property:"border-color"},borderWidth:{...Dd,property:"border-width"},borderStyle:{...Dd,property:"border-style"},borderRadius:{...Dd,property:"border-radius"},selectedBackgroundColor:[{...jd,property:"background-color"},{...Zd,property:"background-color"}],headerRowTextColor:{...Bd,property:"color"},separatorColor:[{...Rd,property:"border-bottom-color"},{...$d,property:"border-top-color"}],resizeHandleColor:{..._d,property:"background-color"},hostDirection:{...Dd,property:"direction",fallback:"ltr"},toggleDetailsPanelButtonSize:[{...Hd,property:"width"},{...Hd,property:"height"}],toggleDetailsPanelButtonOpenedColor:{...qd,property:"color"},toggleDetailsPanelButtonClosedColor:{...Yd,property:"color"},toggleDetailsPanelButtonCursor:{...Hd,property:"cursor"},detailsPanelBackgroundColor:{...Ud,property:"background-color"},detailsPanelBorderTopColor:{...Ud,property:"border-top-color"},detailsPanelLabelsColor:{...Gd,property:"color"},detailsPanelLabelsFontSize:{...Gd,property:"font-size"},detailsPanelItemsGap:{...Qd,property:"grid-gap"},detailsPanelPadding:{...Qd,property:"padding"}}}),$t,_t,e=>class extends e{#Ue;init(){super.init?.(),this.handleColumns(),this.forwardSelectedItemsChange(),this.baseElement._mapSorters=()=>{};const e=this.baseElement._updateDetailsCellHeight;this.baseElement._updateDetailsCellHeight=t=>{t&&e.call(this.baseElement,t)},this.baseElement.rowDetailsRenderer=this.#Ge.bind(this),this.baseElement.addEventListener("wheel",e=>{e.target.closest("descope-code-snippet")&&e.stopPropagation()},!0)}#Ge=async(e,t,o)=>{e.addEventListener("mousedown",e=>e.stopImmediatePropagation(),!0);const i=this.getRowDetailsTemplate(o.item);e.innerHTML="",e.append(i.content.cloneNode(!0))};getRowDetailsTemplate(e){const t=this.#Ue.reduce((e,{path:t,header:o})=>t&&o?{...e,[t]:o}:e,{}),o=this.rowDetailsRenderer?.(e,t)??((e,t)=>`\n <div class="row-details">\n ${Object.entries(e).map(([e,o])=>{const i=t[e]||e.replace(/([A-Z])/g," $1").trim().split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");return(e=>{const t=Td(e);return"object"===t||"xml"===t||"array"===t&&e.some(e=>"object"===Td(e))})(o)?`<details class="row-details__item">\n <summary class="row-details__label">${i}</summary>\n ${Vd(o)}\n </details>`:`<div class="row-details__item">\n <div class="row-details__label">${i}</div>\n ${Vd(o)}\n </div>`}).join("\n")}\n</div>\n `)(e,t);switch(!0){case o instanceof HTMLTemplateElement:return o;case"string"==typeof o:return Object.assign(document.createElement("template"),{innerHTML:o});default:throw new Error("rowDetailsRenderer should return a string or a template")}}forwardSelectedItemsChange(){this.baseElement.addEventListener("selected-items-changed",e=>{this.dispatchEvent(new CustomEvent("selected-items-changed",{bubbles:!0,composed:!0,detail:e.detail}))})}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),"columns"===e&&this.setColumnsDataFromAttr()}handleColumns(){this.columnsAttr?this.setColumnsDataFromAttr():this.children.length&&this.setColumnsFromChildren()}setColumnsFromChildren(){this.#Ue=Array.from(this.children).map(e=>({path:e.getAttribute("path"),header:e.getAttribute("header"),type:e.localName.match("^descope-grid-(\\w+)-column$")?.[1]||"text",attrs:["frozen","resizable","auto-width","status"].reduce((t,o)=>{const i=e.getAttribute(o);return i&&(t[o]=i),t},{})}))}get columnsAttr(){return this.getAttribute("columns")}setColumnsDataFromAttr(){try{const e=JSON.parse(this.columnsAttr);Ad(e)&&(this.columns=e)}catch(e){console.error('could not parse data string from attribute "columns" -',e.message)}}#Ze=({path:e,header:t,type:o,attrs:i})=>{const r=`descope-grid-${o}-column`;return`<${r} header="${t}" path="${e}" ${Object.entries(i).map(([e,t])=>`${e}="${t}"`).join(" ")}></${r}>`};get renderColumn(){return this.#Ze}set renderColumn(e){this.#Ze=e,this.renderColumns()}getColumnsTemplate(){return this.#Ue?.reduce?.((e,t)=>e+(this.renderColumn?.(t||{})||""),"")}reassignRowDetailsRenderer(){this.baseElement.rowDetailsRenderer=null,setTimeout(()=>{this.baseElement.rowDetailsRenderer=this.#Ge.bind(this)},0)}renderColumns(){const e=this.getColumnsTemplate();e&&(this.reassignRowDetailsRenderer(),this.innerHTML=e)}get grid(){return this.shadowRoot.querySelector("vaadin-grid")}get data(){return this.grid.items}set data(e){if(Ad(e)&&this.grid.items!==e&&(this.grid.items=e,this.grid.selectedItems)){const e=new Set(this.grid.items.map(e=>e[this.uniqueColumnId]??e)),t=this.grid.selectedItems.filter(t=>e.has(t[this.uniqueColumnId]??t));this.grid.selectedItems.length!==t.length&&(this.grid.selectedItems=t)}}get columns(){return this.#Ue}set columns(e){this.#Ue=e,this.renderColumns()}get paths(){return this.columns.map(e=>e.path)}get uniqueColumnId(){return this.getAttribute("unique-column-id")}})(Qt({delegatesFocus:!1,slots:[""],wrappedEleName:"vaadin-grid",style:()=>`\n /*css*/\n vaadin-grid {\n overflow: hidden;\n height: 100%;\n min-height: 300px;\n }\n vaadin-grid-cell-content {\n display: flex;\n }\n vaadin-grid::part(selected-row-cell) {\n background-image: none;\n box-shadow: none;\n background-color: inherit;\n }\n vaadin-grid::part(details-cell) {\n border-top-style: dashed;\n border-top-width: 1px;\n }\n vaadin-grid .row-details {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(max(200px, calc(100%/4 - var(${Jd.cssVarList.detailsPanelItemsGap}))), 1fr));\n width: 100%;\n }\n vaadin-grid .row-details__item:has(.row-details__value.code) {\n grid-column: 1 / -1;\n order: 2;\n }\n vaadin-grid details.row-details__item {\n padding: 0;\n }\n vaadin-grid details.row-details__item > summary.row-details__label {\n cursor: pointer;\n list-style: revert;\n display: revert;\n }\n vaadin-grid .row-details__value.text {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: pre;\n }\n vaadin-grid .row-details__value.code {\n margin-top: 5px;\n overflow-x: auto;\n font-size: 0.85em;\n }\n vaadin-grid vaadin-icon.toggle-details-button {\n margin: auto;\n }\n /*!css*/\n\t\t`,excludeAttrsSync:["columns","tabindex","style"],componentName:Nd}));customElements.define(Nd,Jd);const Kd=Je("modal"),Xd=["opened"],ec=_e(jt({mappings:{overlayBackdropColor:{property:()=>ec.cssVarList.overlay.backdropColor},overlayBackgroundColor:{property:()=>ec.cssVarList.overlay.backgroundColor},overlayShadow:{property:()=>ec.cssVarList.overlay.shadow},overlayWidth:{property:()=>ec.cssVarList.overlay.width},overlayBorderWidth:{property:()=>ec.cssVarList.overlay.borderWidth},overlayBorderStyle:{property:()=>ec.cssVarList.overlay.borderStyle},overlayBorderColor:{property:()=>ec.cssVarList.overlay.borderColor},overlayBorderRadius:{property:()=>ec.cssVarList.overlay.borderRadius}}}),ro({name:"overlay",selector:"",mappings:{hostDisplay:{selector:()=>":host(.descope-modal)",property:"display",important:!0},backgroundColor:[{selector:()=>"::part(content)",property:"background-color"},{selector:()=>"::part(overlay)",property:"background-color"}],backdropColor:{selector:()=>"::part(backdrop)",property:"background-color"},borderStyle:{selector:()=>"::part(content)",property:"border-style"},borderWidth:{selector:()=>"::part(content)",property:"border-width"},borderColor:{selector:()=>"::part(content)",property:"border-color"},borderRadius:{selector:()=>"::part(content)",property:"border-radius "},width:{selector:()=>"::part(overlay)",property:"width"},shadow:{selector:()=>"::part(overlay)",property:"box-shadow"}},forward:{include:!1,attributes:["opened","style"]}}),$t,_t,e=>class extends e{static get observedAttributes(){return[].concat(e.observedAttributes||[],Xd)}get opened(){return"true"===this.getAttribute("opened")}handleOpened(){this.opened?this.style.display="":this.style.display="none"}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),"opened"===e&&this.handleOpened()}init(){super.init?.(),this.style.display="none",setTimeout(()=>{this.baseElement.shadowRoot.querySelector("vaadin-dialog-overlay").appendChild(document.createElement("slot")),this.#ee(),Xe(this,this.baseElement,{includeAttrs:["opened"]}),this.handleOpened()})}#ee(){const e=this.baseElement.shadowRoot.querySelector("vaadin-dialog-overlay");e._attachOverlay=()=>{e.bringToFront(),V("\n :host {\n display: flex!important;\n }\n ",this.baseElement)},e._detachOverlay=()=>{this.baseElement.style.display="none"},e._enterModalState=()=>{},e.close=()=>!1}})(Qt({slots:[""],wrappedEleName:"vaadin-dialog",style:()=>"\n vaaadin-dialog {\n display: flex!important;\n }\n ",excludeAttrsSync:["tabindex","opened","style"],componentName:Kd}));customElements.define(Kd,ec);const tc=window.customElements.get("vaadin-notification-container");if(!tc)throw new Error("could not get vaadin-notification-container class");customElements.define(Je("notification-container"),class extends tc{});const oc=Je("notification-card"),ic={content:()=>"vaadin-notification-card::part(content)",overlay:()=>"vaadin-notification-card::part(overlay)"},rc=_e(jt({mappings:{hostMinWidth:{selector:ic.content,property:"min-width"},fontFamily:{},fontSize:{},backgroundColor:{selector:ic.content},textColor:{property:"color"},boxShadow:{},borderWidth:{selector:ic.content,property:"border-width"},borderColor:{selector:ic.content,property:"border-color"},borderStyle:{selector:ic.content,property:"border-style"},borderRadius:[{selector:ic.content,property:"border-radius"},{selector:ic.overlay,property:"border-radius"}],verticalPadding:[{selector:ic.content,property:"padding-top"},{selector:ic.content,property:"padding-bottom"}],horizontalPadding:[{selector:ic.content,property:"padding-right"},{selector:ic.content,property:"padding-left"}]}}),e=>class extends e{close(){this.baseElement.addEventListener("animationend",()=>{this.remove(),this.dispatchEvent(new Event("card-closed"))}),this.setAttribute("opened","false")}constructor(){super(),this.baseElement.innerHTML='\n <div part="root">\n <div part="content">\n <slot></slot>\n </div>\n <div part="close">\n <slot name="close"></slot>\n </div>\n </div>\n ',this.closeEle=this.shadowRoot.querySelector('[part="close"]')}init(){super.init?.(),this.closeEle.onclick=()=>{this.close()}}})(Qt({slots:[],wrappedEleName:"vaadin-notification-card",style:()=>'\n vaadin-notification-card {\n box-shadow: none;\n }\n ::part(overlay) {\n box-shadow: none;\n background: none;\n }\n\n [part="close"] {\n cursor: pointer;\n display: flex;\n }\n\n [part="content"] {\n display: flex;\n align-items: center;\n flex-grow: 1;\n }\n\n [part="root"] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n }\n ',excludeAttrsSync:["tabindex","style"],componentName:oc}));customElements.define(oc,rc);const nc=Je("notification"),sc=_e($t,_t,qt,e=>class t extends e{#Qe;constructor(){super();const e=this;Object.defineProperty(this.baseElement,"_container",{get:()=>(t._container||(t._container=document.createElement("descope-notification-container"),t._container.style.position="absolute",document.body.appendChild(t._container)),t._container.isConnected||setTimeout(()=>e.parentNode.appendChild(t._container)),t._container)}),Object.defineProperty(this.baseElement,"_card",{get:()=>e.#Qe}),this.baseElement._removeNotificationCard=this.close.bind(this)}close(){this.#Qe.close()}init(){super.init?.(),this.createCard(),Xe(this,this.#Qe),Qe(this.#Qe,this,{includeAttrs:["opened"]}),this.baseElement.renderer=e=>{Array.from(this.childNodes).forEach(t=>e.appendChild(t))}}get isContainerEmpty(){return!t._container.children.length}removeContainer(){t._container.remove()}removeNotification(){this.remove(),this.isContainerEmpty&&this.removeContainer()}createCard(){this.#Qe=document.createElement("descope-notification-card"),this.#Qe.addEventListener("card-closed",this.removeNotification.bind(this))}})(Qt({wrappedEleName:"vaadin-notification",excludeAttrsSync:["tabindex","style"],componentName:nc}));customElements.define(nc,sc);const ac=Je("mappings-field-internal"),lc=co({componentName:ac,baseSelector:"div"}),dc=Je("mappings-field"),{host:cc,helperText:pc,errorMessage:hc,mappingItem:uc,labels:gc,labelsText:mc,valueLabel:bc,attrLabel:yc,separator:fc,labelsContainer:vc}={host:{selector:()=>":host"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},mappingItem:{selector:"descope-mapping-item::part(wrapper)"},labels:{selector:'descope-mappings-field-internal [part="labels"] descope-text'},labelsText:{selector:'descope-mappings-field-internal [part="labels"] descope-text::part(text-wrapper)'},valueLabel:{selector:'descope-mappings-field-internal [part="labels"] [part="value-label"]'},attrLabel:{selector:'descope-mappings-field-internal [part="labels"] [part="attr-label"]'},separator:{selector:"descope-mapping-item::part(separator)"},labelsContainer:{selector:'descope-mappings-field-internal [part="labels"]'}},xc=_e(jt({mappings:{hostWidth:{...cc,property:"width"},hostDirection:{...cc,property:"direction"},fontSize:[{},cc,{...fc,property:"margin-top"}],fontFamily:[pc,hc,gc],separatorFontSize:{...fc,property:"font-size"},labelsFontSize:{...mc,property:"font-size"},labelsLineHeight:[{...mc,property:"line-height"},{...gc,property:"line-height"}],labelTextColor:[{...gc,property:ko.cssVarList.textColor},{...fc,property:"color"}],itemMarginBottom:{...uc,property:"margin-bottom"},valueLabelMinWidth:{...bc,property:"min-width"},attrLabelMinWidth:{...yc,property:"min-width"},labelsMarginBottom:{...vc,property:"margin-bottom"},separatorWidth:{},removeButtonWidth:{}}}),$t,io({proxyProps:["value","selectionStart"],inputEvent:"input",proxyParentValidation:!0}),_t,e=>class extends e{get defaultValues(){const e=this.getAttribute("default-values");if(e)try{return JSON.parse(e)}catch(e){console.error('could not parse data string from attribute "default-values" -',e.message)}return[]}setDefaultValues(){const e=this.defaultValues;Object.keys(e).length>0&&(this.inputElement.value=e)}init(){super.init?.();const e=document.createElement("template");e.innerHTML=`\n <${ac}\n tabindex="-1"\n ></${ac}>\n `,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(ac),Xe(this,this.inputElement,{includeAttrs:["size","full-width","label-value","label-attr","button-label","separator","options","default-values","invalid","readonly","disabled","st-error-message-icon","st-error-message-icon-size","st-error-message-icon-padding"]}),Qe(this,this.inputElement,{includeAttrs:["invalid"]}),this.setDefaultValues()}})(Qt({slots:[],wrappedEleName:"vaadin-custom-field",style:()=>`\n :host {\n display: inline-flex;\n max-width: 100%;\n direction: ltr;\n }\n vaadin-custom-field {\n line-height: unset;\n width: 100%;\n }\n\n descope-mappings-field-internal [part="labels"] {\n display: none;\n grid-template-columns: 1fr var(${xc.cssVarList.separatorWidth}) 1fr var(${xc.cssVarList.removeButtonWidth});\n }\n\n descope-mappings-field-internal [part="labels"] [part="value-label"],\n descope-mappings-field-internal [part="labels"] [part="attr-label"] {\n ${ko.cssVarList.fontWeight}: 500;\n }\n\n descope-mappings-field-internal [part="labels"] [part="value-label"] {\n grid-column: 1 / span 1;\n }\n\n descope-mappings-field-internal [part="labels"] [part="attr-label"] {\n grid-column: 3 / span 1;\n }\n\n descope-mapping-item::part(wrapper) {\n display: grid;\n grid-template-columns: 1fr var(${xc.cssVarList.separatorWidth}) 1fr var(${xc.cssVarList.removeButtonWidth});\n }\n `,excludeAttrsSync:["tabindex","label-value","label-attr","button-label","options","error-message","style"],componentName:dc}));customElements.define(ac,class extends lc{#Je;static get observedAttributes(){return[].concat(lc.observedAttributes||[],["label-value","label-attr","button-label","invalid","readonly","disabled","st-error-message-icon","st-error-message-icon-size","st-error-message-icon-padding"])}isValidDataType(e){try{return e.every(e=>"object"==typeof e&&!Array.isArray(e)&&1===Object.getOwnPropertyNames(e).length&&"string"==typeof e[Object.keys(e)[0]]&&""!==e[Object.keys(e)[0]].trim())}catch(e){return!1}}get labelValue(){return this.getAttribute("label-value")||"Value"}get labelAttr(){return this.getAttribute("label-attr")||"Attribute"}get buttonLabel(){return this.getAttribute("button-label")||"Add mapping"}get options(){return this.getAttribute("options")||[]}addNewMappingItem(e){const t=document.createElement("descope-mapping-item");return t.setAttribute("bordered","true"),this.mappingsContainerEle.appendChild(t),Xe(this,t,{includeAttrs:["size","full-width","separator","options","disabled","st-error-message-icon","st-error-message-icon-size","st-error-message-icon-padding"]}),setTimeout(()=>{this.setCustomValidity(""),t.addEventListener("mapping-item-removed",()=>{t===this.#Je&&(this.resetInvalidIndication(),this.#Je=void 0),t.remove(),this.setCustomValidity("")}),this.dispatchEvent(new CustomEvent("mapping-item-added",{bubbles:!0,composed:!0})),e&&t.focus()},0),t}get items(){return Array.from(this.mappingsContainerEle.querySelectorAll("descope-mapping-item"))}get value(){return this.items.reduce((e,t)=>t.value?[...e,t.value]:e,[])}set value(e){if(!this.isValidDataType(e))return void console.error("received invalid value to set - should be an array of objects with one key-value pair");const t=this.items;if(t.length>e.length)for(let o=e.length;o<t.length;o++)this.mappingsContainerEle.removeChild(t[o]);e.forEach((e,o)=>{const i=t[o];if(i)i.value=e;else{const t=this.addNewMappingItem(!1);setTimeout(()=>{t.value=e},0)}})}constructor(){super(),this.innerHTML='\n <div class="labels-container" part="labels"></div>\n <div class="mappings-container"></div>\n <div class="button-container"></div>\n ',this.labelsEle=this.querySelector(".labels-container"),this.mappingsContainerEle=this.querySelector(".mappings-container"),this.buttonContainer=this.querySelector(".button-container")}initLabels(){this.labelsEle.innerHTML=`\n <descope-text variant="body2" part="value-label">${this.labelValue}</descope-text>\n <descope-text variant="body2" part="attr-label">${this.labelAttr}</descope-text>\n `}initAddButton(){this.buttonContainer.innerHTML=`\n <descope-button variant="link" mode="primary" disabled="${this.isDisabled}">\n <vaadin-icon icon="vaadin:plus"></vaadin-icon>\n ${this.buttonLabel}\n </descope-button>\n `;const e=this.querySelector("descope-button");e.onclick=()=>{this.addNewMappingItem(!0)},Xe(this,e,{includeAttrs:["disabled"]})}#Ke(){this.labelsEle.style.display=this.items.length?"grid":"none"}init(){this.addEventListener("focus",e=>{e.isTrusted&&(this.#Je||this.items[0]||this.querySelector("descope-button")).focus()}),super.init?.(),this.initLabels(),this.initAddButton(),this.addEventListener("input",()=>{this.mappingsContainerEle.contains(this.#Je)&&this.#Je?.checkValidity()&&(this.resetInvalidIndication(),this.#Je.removeAttribute("invalid"),this.#Je=void 0)}),Ge(this.mappingsContainerEle,this.#Ke.bind(this))}resetInvalidIndication(){this.removeAttribute("invalid")}getValidity(){const e=this.items.find(e=>!e.checkValidity());return e?e.validity:{}}#Xe(e){e&&(this.#Je=this.items.find(e=>!e.checkValidity()),this.#Je?.reportValidity(),this.#Je?.setAttribute("invalid","true"))}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),"label-value"!==e&&"label-attr"!==e||this.initLabels(),"button-label"===e&&this.initAddButton(),"invalid"===e&&this.#Xe("true"===o),"readonly"===e&&this.toggleAttribute("inert","true"===o)}});const Cc=Je("mapping-item"),wc=["size","bordered","readonly","full-width","disabled","st-error-message-icon","st-error-message-icon-size","st-error-message-icon-padding"],Ic=co({componentName:Cc,baseSelector:"div"});customElements.define(Cc,class extends Ic{static get observedAttributes(){return[].concat(Ic.observedAttributes||[],wc,["separator","options","invalid","disabled"])}get separator(){return this.getAttribute("separator")||"map to"}get value(){const e=this.attributeInput.value,t=this.valueInput.value;return e&&t?{[e]:t}:null}set value(e){if(1!==Object.entries(e).length)return void console.error("descope-mapping item expected expects only one key-value pair in the value but received: ",e);const[t,o]=Object.entries(e)[0];this.valueInput.value=o,this.attributeInput.value=t,this.dispatchEvent(new InputEvent("input",{bubbles:!0,composed:!0}))}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML=`\n <div class="wrapper" part="wrapper">\n <descope-text-field required="true"></descope-text-field>\n <div class="separator" part="separator">${this.separator}</div>\n <descope-combo-box\n item-label-path="data-name"\n item-value-path="data-id"\n required="true"\n >\n </descope-combo-box>\n <descope-button variant="link" mode="primary">\n <vaadin-icon icon="vaadin:minus"></vaadin-icon>\n </descope-button>\n </div>\n\t`,V("\n .wrapper {\n display: flex;\n }\n .separator {\n text-align: center;\n flex-shrink: 0;\n }\n ",this),this.valueInput=this.shadowRoot.querySelector("descope-text-field"),this.attributeInput=this.shadowRoot.querySelector("descope-combo-box"),this.inputs=[this.valueInput,this.attributeInput],this.removeButton=this.shadowRoot.querySelector("descope-button"),Xe(this,this.valueInput,{includeAttrs:wc}),Xe(this,this.attributeInput,{includeAttrs:[...wc,"options"],mapAttrs:{options:"data"}}),Xe(this,this.removeButton,{includeAttrs:["disabled"]})}initRemoveButton(){this.removeButton.addEventListener("click",()=>this.dispatchEvent(new CustomEvent("mapping-item-removed",{bubbles:!0,composed:!0})))}init(){super.init?.(),this.initRemoveButton()}getValidity(){const e=this.attributeInput.value,t=this.valueInput.value;return e&&t?{}:{badInput:!0}}reportValidity(){this.inputs.forEach(e=>e.reportValidity())}focus(){(this.checkValidity()||!this.valueInput.checkValidity()?this.valueInput:this.attributeInput).focus()}handleSeparatorChange(){this.shadowRoot.querySelector(".separator").textContent=this.separator}#et(e){"true"===e&&(this.valueInput.value||(this.valueInput.setAttribute("invalid","true"),this.valueInput.setAttribute("error-message",this.defaultErrorMsgValueMissing)),this.attributeInput.value||(this.attributeInput.setAttribute("invalid","true"),this.attributeInput.setAttribute("error-message",this.defaultErrorMsgValueMissing)))}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),"separator"===e&&this.handleSeparatorChange(),"invalid"===e&&this.#et(o)}}),customElements.define(dc,xc);const Sc=k("badge");class Mc extends(ye({componentName:Sc,baseSelector:":host > div"})){static get observedAttributes(){return["data-attachment-size","shrink-to-indicator-threshold"]}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<div>\n <slot></slot>\n\t\t</div>\n\t\t",V("\n :host {\n display: inline-flex;\n }\n :host > div {\n position: relative;\n width: 100%;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n ",this)}get shrinkToIndicatorThreshold(){return this.getAttribute("shrink-to-indicator-threshold")||65}#tt(e){this.toggleAttribute("shrink-to-indicator",parseFloat(e)<this.shrinkToIndicatorThreshold)}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),"data-attachment-size"===e&&t!==o&&this.#tt(o)}}const Ac=I(ce({mappings:{hostWidth:[{selector:()=>":host",property:"width"}],hostHeight:[{selector:()=>":host",property:"height"}],hostDirection:{property:"direction"},fontFamily:{},fontSize:{},fontWeight:{},textTransform:{},verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],horizontalPadding:[{property:"padding-left"},{property:"padding-right"}],borderWidth:{},borderStyle:{},borderColor:{},borderRadius:{},backgroundColor:{},textColor:{property:"color"},textAlign:{},boxShadow:{},textIndent:{}}}),pe,he)(Mc),Ec=Je("user-attribute");class Tc extends(Gt({componentName:Ec,baseSelector:":host > .root"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="root">\n <descope-text st-text-align="auto" data-id="label-text" variant="body1" mode="secondary" class="label"></descope-text>\n <div class="content-wrapper">\n <descope-text st-text-align="auto" data-id="value-text" variant="body1" mode="primary" class="value"></descope-text>\n <div class="btn-wrapper">\n <descope-badge mode="default" bordered="true" size="xs"></descope-badge>\n <descope-button size="sm" data-id="delete-btn" variant="link" mode="primary">\n <slot name="delete-icon"></slot>\n </descope-button>\n <descope-button size="sm" data-id="edit-btn" variant="link" mode="primary">\n <slot name="edit-icon"></slot>\n </descope-button>\n </div>\n </div>\n </div>\n\t\t',V(`\n :host {\n\t\t\t\t\tdisplay: inline-flex;\n container-type: inline-size;\n\t\t\t\t}\n\n .root {\n display: flex;\n width: 100%;\n height: 100%;\n align-items: center;\n }\n\n ::slotted(*) {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n @container (max-width: 529px) {\n .root {\n flex-wrap: wrap;\n }\n }\n\n .btn-wrapper {\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-grow: 0;\n flex-shrink: 0;\n }\n\n slot[name="edit-icon"],\n slot[name="delete-icon"] {\n display: inline-flex;\n flex-shrink: 0;\n align-items: center;\n }\n\n .content-wrapper {\n display: flex;\n flex-grow: 1;\n align-items: center;\n }\n\n descope-text::part(text-wrapper) {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n width: initial;\n }\n\n descope-text {\n display: inline-flex;\n max-width: 100%;\n min-width: 0;\n }\n\n .label {\n flex-grow: 1;\n width: 100%;\n }\n\n .value {\n flex-grow: 1;\n }\n\n descope-badge {\n margin-inline-end: 10px;\n }\n\n .hidden {\n visibility: hidden;\n width: 0;\n }\n\n descope-text[data-id="label-text"].required:after {\n content: '*';\n color: var(${ko.cssVarList.textColor});\n }\n\n :host([readonly="true"]) descope-button {\n visibility: hidden;\n width: 0;\n }\n `,this),this.deleteButton=this.shadowRoot.querySelector('descope-button[data-id="delete-btn"]'),this.editButton=this.shadowRoot.querySelector('descope-button[data-id="edit-btn"]'),this.badge=this.shadowRoot.querySelector("descope-badge"),this.labelText=this.shadowRoot.querySelector('descope-text[data-id="label-text"]'),this.valueText=this.shadowRoot.querySelector('descope-text[data-id="value-text"]')}onLabelChange(){this.labelText.innerText=this.label,this.labelText.setAttribute("title",this.label)}onValueOrPlaceholderChange(){const e=this.value||this.placeholder,t=this.value?"primary":"secondary";this.valueText.innerText=e,this.valueText.setAttribute("title",e),this.valueText.setAttribute("mode",t)}onBadgeLabelChange(){this.badgeLabel?(this.badge.innerText=this.badgeLabel,this.badge.style.display=""):this.badge.style.display="none"}onBadgeTooltipTextChange(){this.badge.setAttribute("title",this.badgeTooltipText||this.badgeLabel)}updateButtonLabel(e,t){let o=e.querySelector("span.btn-label");t?(o||(o=document.createElement("span"),o.classList.add("btn-label"),e.appendChild(o)),o.innerText=t):o?.remove()}onIsRequiredChange(){this.labelText.classList.toggle("required",this.isRequired)}get label(){return this.getAttribute("label")||""}get value(){return this.getAttribute("value")||""}get placeholder(){return this.getAttribute("placeholder")||""}get isRequired(){return"true"===this.getAttribute("required")}get badgeLabel(){return this.getAttribute("badge-label")||""}get badgeTooltipText(){return this.getAttribute("badge-tooltip-text")||""}get editButtonLabel(){return this.getAttribute("edit-button-label")||""}get deleteButtonLabel(){return this.getAttribute("delete-button-label")||""}get isDeleteHidden(){return"true"===this.getAttribute("hide-delete")}init(){this.onLabelChange(),this.onValueOrPlaceholderChange(),this.onIsRequiredChange(),this.onBadgeLabelChange(),this.onBadgeTooltipTextChange(),this.updateButtonLabel(this.editButton,this.editButtonLabel),this.updateButtonLabel(this.deleteButton,this.deleteButtonLabel),this.handleDeleteButtonVisibility(),this.deleteButton.addEventListener("click",()=>this.dispatchEvent(new CustomEvent("delete-clicked",{bubbles:!0,composed:!0}))),this.editButton.addEventListener("click",()=>this.dispatchEvent(new CustomEvent("edit-clicked",{bubbles:!0,composed:!0}))),this.setDefaultChildren()}#ot(e,t){const o=document.createElement("descope-icon");o.setAttribute("src",e),o.setAttribute("src-dark",e),o.setAttribute("slot",t),this.appendChild(o)}setDefaultChildren(){this.children.length||(this.#ot("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxNCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cGF0aCBkPSJNMSAxNkMxIDE3LjEgMS45IDE4IDMgMThIMTFDMTIuMSAxOCAxMyAxNy4xIDEzIDE2VjRIMVYxNlpNMyA2SDExVjE2SDNWNlpNMTAuNSAxTDkuNSAwSDQuNUwzLjUgMUgwVjNIMTRWMUgxMC41WiIgZmlsbD0iY3VycmVudGNvbG9yIi8+Cjwvc3ZnPg==","delete-icon"),this.#ot("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxNSAxNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cGF0aCBkPSJNMTAuMDAwMiAwLjk5MjE0OUMxMC4wMDAyIDEuMDE2MTUgMTAuMDAwMiAxLjAxNjE1IDEwLjAwMDIgMS4wMTYxNUw4LjIyNDE5IDMuMDA4MTVIMi45OTIxOUMyLjQ2NDE5IDMuMDA4MTUgMi4wMDgxOSAzLjQ0MDE1IDIuMDA4MTkgMy45OTIxNVYxMi4wMDgyQzIuMDA4MTkgMTIuNTM2MiAyLjQ0MDE5IDEyLjk5MjIgMi45OTIxOSAxMi45OTIySDUuNTM2MTlDNS44NDgxOSAxMy4wNDAyIDYuMTYwMTkgMTMuMDQwMiA2LjQ3MjE5IDEyLjk5MjJIMTEuMDA4MkMxMS41MzYyIDEyLjk5MjIgMTEuOTkyMiAxMi41NjAyIDExLjk5MjIgMTIuMDA4MlY3Ljc4NDE2TDEzLjkzNjIgNS42MjQxNUwxNC4wMDgyIDUuNjcyMTVWMTEuOTg0MkMxNC4wMDgyIDEzLjY2NDIgMTIuNjY0MiAxNS4wMDgyIDExLjAwODIgMTUuMDA4MkgzLjAxNjE5QzEuMzM2MTkgMTUuMDA4MiAtMC4wMDc4MTI1IDEzLjY2NDIgLTAuMDA3ODEyNSAxMS45ODQyVjMuOTkyMTVDLTAuMDA3ODEyNSAyLjMzNjE1IDEuMzM2MTkgMC45OTIxNDkgMy4wMTYxOSAwLjk5MjE0OUgxMC4wMDAyWk0xMS4yNzIyIDIuNjI0MTVMMTIuNjE2MiA0LjExMjE1TDcuNzIwMTkgOS42ODAxNkM3LjUwNDE5IDkuOTIwMTYgNi44MzIxOSAxMC4yMzIyIDUuNjgwMTkgMTAuNjE2MkM1LjY1NjE5IDEwLjY0MDIgNS42MDgxOSAxMC42NDAyIDUuNTYwMTkgMTAuNjE2MkM1LjQ2NDE5IDEwLjU5MjIgNS4zOTIxOSAxMC40NzIyIDUuNDQwMTkgMTAuMzc2MkM1Ljc1MjE5IDkuMjQ4MTYgNi4wNDAxOSA4LjU1MjE2IDYuMjU2MTkgOC4zMTIxNkwxMS4yNzIyIDIuNjI0MTVaTTExLjkyMDIgMS44NTYxNUwxMy4yODgyIDAuMzIwMTQ5QzEzLjY0ODIgLTAuMDg3ODUxNiAxNC4yNzIyIC0wLjExMTg1MiAxNC42ODAyIDAuMjcyMTQ5QzE1LjA4ODIgMC42MzIxNDkgMTUuMTEyMiAxLjI4MDE1IDE0Ljc1MjIgMS42ODgxNUwxMy4yNjQyIDMuMzY4MTVMMTEuOTIwMiAxLjg1NjE1WiIgZmlsbD0iY3VycmVudGNvbG9yIi8+Cjwvc3ZnPgo=","edit-icon"))}static get observedAttributes(){return["label","value","placeholder","required","badge-label","badge-tooltip-text","edit-button-label","delete-button-label","hide-delete"].concat(super.observedAttributes)}handleDeleteButtonVisibility(){this.deleteButton.classList.toggle("hidden",this.isRequired||!this.value||this.isDeleteHidden)}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),t!==o&&("label"===e?this.onLabelChange():"value"===e||"placeholder"===e?this.onValueOrPlaceholderChange():"required"===e?this.onIsRequiredChange():"badge-label"===e?this.onBadgeLabelChange():"badge-tooltip-text"===e?this.onBadgeTooltipTextChange():"edit-button-label"===e?this.updateButtonLabel(this.editButton,this.editButtonLabel):"delete-button-label"===e&&this.updateButtonLabel(this.deleteButton,this.deleteButtonLabel),"value"!==e&&"required"!==e&&"hide-delete"!==e||this.handleDeleteButtonVisibility())}}const{host:kc,textFields:zc,buttons:Lc,badge:Vc,labelText:Nc,contentWrapper:Dc}={host:{selector:()=>":host"},textFields:{selector:"descope-text"},labelText:{selector:'descope-text[data-id="label-text"]'},buttons:{selector:"descope-button"},badge:{selector:"descope-badge"},contentWrapper:{selector:" .content-wrapper"}},Pc=_e(jt({mappings:{hostWidth:{...kc,property:"width"},hostMinWidth:{...kc,property:"min-width"},hostMaxWidth:{...kc,property:"max-width"},hostDirection:[{...kc,property:"direction"},{...zc,property:ko.cssVarList.hostDirection},{...Lc,property:Ni.cssVarList.hostDirection},{...Vc,property:Ac.cssVarList.hostDirection}],labelMinWidth:{...Nc,property:"min-width"},contentMinWidth:{...Dc,property:"min-width"},badgeMaxWidth:{...Vc,property:"max-width"},itemsGap:[{property:"gap"},{...Dc,property:"gap"}],iconColor:[{selector:()=>"::slotted(*)",property:Ei.cssVarList.fill}]}}),$t,_t)(Tc);customElements.define(Sc,Ac),customElements.define(Ec,Pc);const Bc=Je("user-auth-method");class Fc extends(Gt({componentName:Bc,baseSelector:":host > .root"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="root">\n <div class="text-wrapper">\n <slot name="method-icon"></slot>\n <descope-text st-text-align="auto" data-id="label-text" variant="body1" mode="primary"></descope-text>\n </div>\n\n <div class="btn-wrapper">\n <descope-button class="btn unfulfilled hidden" size="sm" variant="link" mode="primary">\n <slot name="button-icon"></slot>\n </descope-button>\n <descope-button class="btn fulfilled hidden" size="sm" variant="link" mode="primary">\n <slot name="fulfilled-button-icon"></slot>\n </descope-button>\n <div class="status-indicator hidden">\n <vaadin-icon src=data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTggMEMzLjYgMCAwIDMuNiAwIDhDMCAxMi40IDMuNiAxNiA4IDE2QzEyLjQgMTYgMTYgMTIuNCAxNiA4QzE2IDMuNiAxMi40IDAgOCAwWk03LjEgMTEuN0wyLjkgNy42TDQuMyA2LjJMNyA4LjlMMTIgNEwxMy40IDUuNEw3LjEgMTEuN1oiIGZpbGw9IiM0Q0FGNTAiLz4KPC9zdmc+Cg==></vaadin-icon>\n </div>\n <descope-button class="hidden-btn" size="sm" variant="link" mode="primary"></descope-button>\n </div>\n </div>\n\t\t',V('\n :host {\n\t\t\t\t\tdisplay: inline-flex;\n\t\t\t\t}\n\n vaadin-icon {\n color: currentcolor;\n }\n\n .root {\n display: flex;\n width: 100%;\n height: 100%;\n align-items: center;\n }\n\n .btn-wrapper {\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-grow: 0;\n }\n\n .text-wrapper {\n display: flex;\n align-items: center;\n flex-grow: 1;\n min-width: 0;\n }\n\n descope-text::part(text-wrapper) {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n width: initial;\n }\n\n descope-text {\n display: inline-flex;\n min-width: 0;\n }\n\n .status-indicator {\n width: 1em;\n height: 1em;\n display: flex;\n align-items: center;\n padding-inline-end: 1em;\n }\n\n .hidden {\n display: none;\n }\n\n .hidden-btn {\n width: 0;\n overflow: hidden;\n opacity: 0;\n pointer-events: none;\n }\n\n slot[name="method-icon"]:not(:empty) {\n display: inline-flex;\n align-items: center;\n }\n ',this),this.unfulfilledButton=this.shadowRoot.querySelector(".btn.unfulfilled"),this.fulfilledButton=this.shadowRoot.querySelector(".btn.fulfilled"),this.statusIndicator=this.shadowRoot.querySelector(".status-indicator"),this.labelText=this.shadowRoot.querySelector('descope-text[data-id="label-text"]')}onLabelChange(){this.labelText.innerText=this.label,this.labelText.setAttribute("title",this.label)}updateButtonLabel(e,t){let o=e.querySelector("span");t?(o||(o=document.createElement("span"),e.appendChild(o)),o.innerText=t):o&&e.removeChild(o)}onFulfilledChange(){this.isFulfilled?(this.unfulfilledButton.classList.add("hidden"),this.handleFulfilled()):(this.fulfilledButton.classList.add("hidden"),this.handleUnfulfilled())}handleFulfilled(){this.fulfilledButton.classList.toggle("hidden",!this.isFulfilledEditable),this.statusIndicator.classList.toggle("hidden",this.isFulfilledEditable)}handleUnfulfilled(){this.unfulfilledButton.classList.toggle("hidden",!this.isUnfulfilledEditable),this.statusIndicator.classList.toggle("hidden",this.isUnfulfilledEditable)}get label(){return this.getAttribute("label")||""}get unfulfilledButtonLabel(){return this.getAttribute("button-label")||""}get fulfilledButtonLabel(){return this.getAttribute("fulfilled-button-label")||""}get isFulfilled(){return"true"===this.getAttribute("fulfilled")}get isFulfilledEditable(){return"true"===this.getAttribute("fulfilled-editable")}get isUnfulfilledEditable(){return"false"!==this.getAttribute("unfulfilled-editable")}init(){this.onLabelChange(),this.updateButtonLabel(this.fulfilledButton,this.fulfilledButtonLabel),this.updateButtonLabel(this.unfulfilledButton,this.unfulfilledButtonLabel),this.onFulfilledChange(),this.unfulfilledButton.addEventListener("click",()=>this.dispatchEvent(new CustomEvent("button-clicked",{bubbles:!0,composed:!0}))),this.fulfilledButton.addEventListener("click",()=>{this.dispatchEvent(new CustomEvent("fulfilled-button-clicked",{bubbles:!0,composed:!0}))})}static get observedAttributes(){return["label","fulfilled","button-label","fulfilled-button-label","fulfilled-editable","unfulfilled-editable"].concat(super.observedAttributes)}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),t!==o&&("label"===e?this.onLabelChange():"fulfilled"===e?this.onFulfilledChange():"button-label"===e?this.updateButtonLabel(this.unfulfilledButton,this.unfulfilledButtonLabel):"fulfilled-button-label"===e?this.updateButtonLabel(this.fulfilledButton,this.fulfilledButtonLabel):"fulfilled-editable"===e&&this.isFulfilled?this.handleFulfilled():"unfulfilled-editable"!==e||this.isFulfilled||this.handleUnfulfilled())}}const{host:Rc,textField:Wc,buttons:Oc,badge:jc,textWrapper:$c,methodIconSlot:_c}={host:{selector:()=>":host"},textField:{selector:"descope-text"},buttons:{selector:"descope-button"},badge:{selector:"descope-badge"},textWrapper:{selector:" .text-wrapper"},methodIconSlot:{selector:'slot[name="method-icon"]:not(:empty)'}},Hc=_e(jt({mappings:{hostWidth:{...Rc,property:"width"},hostMinWidth:{...Rc,property:"min-width"},hostMaxWidth:{...Rc,property:"max-width"},hostDirection:[{...Rc,property:"direction"},{...Wc,property:ko.cssVarList.hostDirection},{...Oc,property:Ni.cssVarList.hostDirection},{...jc,property:Ac.cssVarList.hostDirection}],itemsGap:[{property:"gap"},{...$c,property:"gap"}],iconSize:[{..._c,property:"width"},{..._c,property:"height"}],iconColor:[{selector:()=>"::slotted(*)",property:Ei.cssVarList.fill}]}}),$t,_t)(Fc);customElements.define(Bc,Hc);const qc=Je("saml-group-mappings-internal"),Yc=co({componentName:qc,baseSelector:""}),Uc=Je("saml-group-mappings"),{host:Gc,groupInput:Zc,errorMessage:Qc}={host:{selector:()=>":host"},groupInput:{selector:"descope-text-field"},errorMessage:{selector:"::part(error-message)"}},Jc=_e(jt({mappings:{hostWidth:{...Gc,property:"width"},hostDirection:{...Gc,property:"direction"},groupNameInputMarginBottom:{...Zc,property:"margin-bottom"},errorMessageIcon:{...Qc,property:"background-image"},errorMessageIconSize:{...Qc,property:"background-size"},errorMessageIconPadding:{...Qc,property:"padding-inline-start"},errorMessageIconRepeat:{...Qc,property:"background-repeat"},errorMessageIconPosition:{...Qc,property:"background-position"},errorMessageFontSize:{...Qc,property:"font-size"}}}),$t,io({proxyProps:["value","selectionStart"],inputEvent:"input",triggerValidationEvents:["mapping-item-added","mapping-item-removed"],proxyParentValidation:!0}),_t,e=>class extends e{init(){super.init?.();const e=document.createElement("template");e.innerHTML=`\n <${qc}\n tabindex="-1"\n ></${qc}>\n `,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(qc),Xe(this,this.inputElement,{includeAttrs:["size","full-width","label-group","label-value","label-attr","button-label","separator","options","readonly","disabled"]}),Qe(this,this.inputElement,{includeAttrs:["invalid"]})}})(Qt({slots:[],wrappedEleName:"vaadin-custom-field",style:()=>"\n :host {\n display: inline-flex;\n max-width: 100%;\n direction: ltr;\n }\n\n vaadin-custom-field {\n line-height: unset;\n width: 100%;\n }\n\n descope-text-field {\n width: auto;\n }\n\n descope-mappings-field {\n display: block;\n }\n ",excludeAttrsSync:["tabindex","label-group","label-value","label-attr","button-label","separator","options","error-message","style"],componentName:Uc}));customElements.define(qc,class extends Yc{static get observedAttributes(){return["invalid"].concat(Yc.observedAttributes||[])}constructor(){super(),this.innerHTML='\n <descope-text-field variant="body2" bordered="true"></descope-text-field>\n <descope-mappings-field></descope-mappings-field>\n ',this.groupInputElement=this.querySelector("descope-text-field"),this.mappingsElement=this.querySelector("descope-mappings-field")}resetInvalidIndication(){this.removeAttribute("invalid")}handleMappingsInvalidChange(e){e.includes("invalid")&&(this.mappingsElement.hasAttribute("invalid")||this.resetInvalidIndication())}initFocusHandler(){this.addEventListener("focus",e=>{e.isTrusted&&(this.mappingsElement.checkValidity()?this.groupInputElement:this.mappingsElement).focus()})}init(){this.initFocusHandler(),super.init?.(),Xe(this,this.groupInputElement,{mapAttrs:{"label-group":"label"},includeAttrs:["size","label-group","readonly","disabled"]}),Xe(this,this.mappingsElement,{includeAttrs:["size","full-width","label-value","label-attr","button-label","separator","options","readonly","disabled","data-errormessage-pattern-mismatch"]}),Ue(this.mappingsElement,this.handleMappingsInvalidChange.bind(this),{includeAttrs:["invalid"]})}get value(){return{group:this.groupInputElement.value,mappings:this.mappingsElement.value}}set value(e){e?.group&&"string"==typeof e.group&&(this.groupInputElement.value=e.group),Array.isArray(e?.mappings)&&(this.mappingsElement.value=e.mappings)}getValidity(){return this.groupInputElement.checkValidity()?this.mappingsElement.checkValidity()?{}:this.mappingsElement.validity:this.groupInputElement.validity}#it(e){if(e){if(!this.groupInputElement.checkValidity())return void this.groupInputElement.setAttribute("invalid","true");this.mappingsElement.checkValidity()||this.mappingsElement.setAttribute("invalid","true")}}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),"invalid"===e&&this.#it("true"===o)}}),customElements.define(Uc,Jc);const Kc=Je("radio-button"),Xc=_e(jt({mappings:{cursor:[{},{selector:"label"}],fontSize:[{selector:"label"},{}],labelTextColor:{selector:"label",property:"color"},fontFamily:{selector:"label"},radioSize:[{selector:"::part(radio)",property:"height"},{selector:"::part(radio)",property:"width"}],radioBackgroundColor:{selector:"::part(radio)",property:"background-color"},radioMargin:{selector:"::part(radio)",property:"margin"},radioCheckedSize:{selector:"::part(radio)::after",property:"border-width"},radioCheckedColor:{selector:"::part(radio)::after",property:"border-color"},radioBorderColor:{selector:"::part(radio)",property:"border-color",fallback:"none"},radioBorderWidth:{selector:"::part(radio)",property:"border-width",fallback:0},radioBorderStyle:{selector:"::part(radio)",property:"border-style",fallback:"solid"}}}),io({proxyProps:["setSelectionRange"]}),_t,e=>class extends e{constructor(){super(),this.baseElement.checkValidity=()=>{}}init(){this.baseElement.addEventListener("checked-changed",e=>{this.dispatchEvent(new CustomEvent("checked-changed",{detail:e.detail},{bubbles:!0,composed:!0}))}),super.init?.(),Ge(this,this.renderLabel.bind(this))}renderLabel(){this.baseElement.setAttribute("label",this.textContent)}get value(){return this.getAttribute("value")}})(Qt({slots:[""],wrappedEleName:"vaadin-radio-button",excludeAttrsSync:["tabindex","data","style"],includeForwardProps:["checked","name","disabled"],componentName:Kc})),ep=Je("radio-group"),tp=_e(jt({mappings:{...Yr,buttonsSpacing:{selector:"::part(group-field)",property:"justify-content"},buttonsRowGap:{selector:"::part(group-field)",property:"row-gap"},buttonsColumnGap:{selector:"::part(group-field)",property:"column-gap"},itemsLabelColor:{selector:()=>`::slotted(${Xc.componentName})`,property:Xc.cssVarList.labelTextColor}}}),$t,io({proxyProps:["setSelectionRange"]}),_t,e=>class extends e{#K=({value:e,label:t})=>`<descope-radio-button value="${e}">${t}</descope-radio-button>`;#F;constructor(){super(),Object.defineProperty(this.baseElement,"children",{get:()=>this.querySelectorAll(Kc)}),this.baseElement.__filterRadioButtons=e=>e.filter(e=>e.localName===Kc),this.baseElement.setCustomValidity=()=>{}}get items(){return this.shadowRoot.querySelector("slot").assignedElements()}get size(){return this.getAttribute("size")}get data(){if(this.#F)return this.#F;const e=this.getAttribute("data");if(e)try{const t=JSON.parse(e);if(this.isValidDataType(t))return t}catch(e){console.error('could not parse data string from attribute "data" - ',e.message)}return[]}set data(e){this.isValidDataType(e)&&(this.#F=e,this.renderItems())}get defaultValue(){return this.getAttribute("default-value")}isValidDataType(e){const t=Array.isArray(e);return t||console.error("data must be an array, received:",e),t}getItemsTemplate(){return this.data?.reduce?.((e,t)=>e+(this.#K?.(t||{})||""),"")}renderItems(){const e=this.getItemsTemplate();e&&(this.innerHTML=e)}init(){super.init?.(),this.inputElement=this.baseElement,this.renderItems(),Ue(this,this.renderItems.bind(this),{includeAttrs:["data"]}),Object.defineProperty(this.baseElement,"validity",{get:()=>({valueMissing:!this.baseElement.checkValidity()})}),Xe(this,this.baseElement,{includeAttrs:["layout"],mapAttrs:{layout:"theme"}}),setTimeout(()=>{this.defaultValue&&(this.value=this.defaultValue)}),Ge(this,({addedNodes:e})=>{e.forEach(e=>{e.setAttribute("size",this.size)})}),Ue(this,()=>{this.items.forEach(e=>{e.setAttribute("size",this.size)})},{includeAttrs:["size"]})}})(Qt({slots:["","prefix"],wrappedEleName:"vaadin-radio-group",style:()=>`\n :host {\n display: inline-block;\n max-width: 100%;\n box-sizing: border-box;\n }\n\n vaadin-radio-group {\n padding: 0;\n width: 100%;\n }\n\n ${xt("vaadin-radio-group")}\n `,excludeAttrsSync:["tabindex","size","data","direction","style"],componentName:ep,includeForwardProps:["value"]}));customElements.define(ep,tp),customElements.define(Kc,Xc);const op=()=>!0,ip=e=>`<pre>${JSON.stringify(e,null,4)}</pre>`,rp=Je("scopes-list"),np=["checkbox","switch"];class sp extends(Gt({componentName:rp,baseSelector:"div"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n <div></div>\n\t\t",V("\n :host {\n display: inline-flex;\n }\n\n div {\n display: flex;\n flex-direction: column;\n }\n ",this)}get isReadOnly(){return"true"===this.getAttribute("readonly")}get size(){return this.getAttribute("size")||"sm"}#rt(){return Array.from(this.shadowRoot.querySelector("div").children)}reportValidity(){this.checkValidity()}checkValidity(){return this.data.every(e=>!e.required||this.value.includes(e.id))}get value(){return this.#rt().filter(e=>e.checked).map(e=>e.getAttribute("data-id"))}set value(e=[]){this.#rt().forEach(t=>{t.checked=e.includes(t.getAttribute("data-id"))})}get variant(){const e=this.getAttribute("variant");return np.includes(e)?e:np[0]}}const ap=_e(jt({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDirection:[{selector:()=>":host",property:"direction"},{selector:()=>Mo.componentName,property:Mo.cssVarList.hostDirection},{selector:()=>Zo.componentName,property:Zo.cssVarList.hostDirection}],gap:{selector:()=>"div",property:"gap"},requiredInputBorderColor:[{selector:`${Mo.componentName}[required="true"]`,property:Mo.cssVarList.inputBorderColor},{selector:`${Zo.componentName}[required="true"]`,property:Zo.cssVarList.inputBorderColor}],requiredInputValueTextColor:[{selector:`${Mo.componentName}[required="true"]`,property:Mo.cssVarList.inputValueTextColor},{selector:`${Zo.componentName}[required="true"]`,property:Zo.cssVarList.knobColor}]}}),(({itemRenderer:e=ip,validateSchema:t=op,slotName:o,rerenderAttrsList:i=[]})=>r=>class extends r{#F=[];#W(e){if(!t)return!0;const o=t(e);return!0===o||(console.error("Data schema validation failed",o||""),!1)}#O(){const e=o?`*[slot="${o}"]`:":not([slot])";this.baseElement.querySelectorAll(e).forEach(e=>e.remove())}#j(){this.#O(),this.data.forEach((t,o)=>{const i="string"==typeof(r=e(t,o,this))?(e=>{const t=document.createElement("template");return t.innerHTML=e,t})(r).content:r instanceof HTMLTemplateElement?r.content:(console.error("Invalid template",r),null);var r;this.baseElement.appendChild(i?.cloneNode(!0))})}set data(e){this.#W(e)&&(this.#F=e,this.#j())}get data(){return this.#F}init(){super.init?.(),Ue(this,e=>{e.includes("data")?this.#$():this.#j()},{includeAttrs:[...i,"data"]})}#$(){const e=this.getAttribute("data");if(e)try{this.data=JSON.parse(e)}catch(t){console.warn("Invalid JSON data",e)}}})({itemRenderer:({id:e,desc:t,required:o=!1},i,r)=>{const n="checkbox"===r.variant?Mo:Zo;return`\n <${n.componentName}\n bordered="true"\n size=${r.size}\n label="${t}"\n data-id="${e}"\n readonly="${o||r.isReadOnly}"\n required="${o}"\n checked="true"\n ></${n.componentName}>\n`},rerenderAttrsList:["size","variant"]}),$t,_t)(sp),lp=k("list-item"),dp=I(ce({mappings:{verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],horizontalPadding:[{property:"padding-left"},{property:"padding-right"}],backgroundColor:{},borderColor:{},borderStyle:{},borderWidth:{},borderRadius:{},outline:{},cursor:{},gap:{},maxWidth:{selector:()=>":host"},alignItems:{},flexDirection:{},transition:{}}}),pe,he,e=>class extends e{constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n <slot></slot>\n ",V("\n slot {\n width: 100%;\n display: flex;\n overflow: hidden;\n box-sizing: border-box;\n }\n :host {\n display: block;\n }\n ",this)}},e=>class extends e{init(){super.init?.(),this.baseElement.addEventListener("mousedown",e=>{e.preventDefault(),this.setAttribute("active","true"),window.addEventListener("mouseup",()=>this.removeAttribute("active"),{once:!0})})}})(ye({componentName:lp,baseSelector:"slot"}));customElements.define(lp,dp);const cp=k("list");class pp extends(ye({componentName:cp,baseSelector:".wrapper"})){static get observedAttributes(){return["variant","readonly"]}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="wrapper">\n <slot></slot>\n <slot name="empty-state">\n No item...\n </slot>\n </div>\n\t',V('\n .wrapper {\n overflow: auto;\n display: grid;\n max-height: 100%;\n width: 100%;\n }\n\n :host {\n display: inline-flex;\n width: 100%;\n }\n slot[name="empty-state"] {\n justify-content: center;\n align-items: center;\n display: flex;\n flex-grow: 1;\n }\n\n :host slot[name="empty-state"] {\n display: none;\n }\n :host([empty]) slot[name="empty-state"] {\n display: flex;\n }\n ::slotted(:not([slot])) {\n width: 100%;\n }\n ',this)}get items(){return this.shadowRoot.querySelector("slot").assignedElements()}#nt(){0===this.items.length?this.setAttribute("empty","true"):this.removeAttribute("empty")}get variant(){return this.getAttribute("variant")||"list"}#st(){this.items.forEach(e=>{let t=e;t.localName!==dp.componentName&&(t=e.querySelector(dp.componentName));const o="tiles"===this.variant?"tile":"row";t?.setAttribute("variant",o)})}init(){super.init?.(),A(this,()=>{this.#nt(),this.#st(),this.#at()})}get isReadOnly(){return"true"===this.getAttribute("readonly")}#at(){this.items.forEach(e=>{this.isReadOnly?e.setAttribute("inert",""):e.removeAttribute("inert")})}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),o!==t&&("variant"===e?this.#st():"readonly"===e&&this.#at())}}const hp=I(ce({mappings:{hostWidth:{selector:()=>":host",property:"width"},maxHeight:{selector:()=>":host"},minHeight:{},verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],horizontalPadding:[{property:"padding-left"},{property:"padding-right"}],hostDirection:{selector:()=>":host",property:"direction"},fontFamily:{},gap:{},backgroundColor:{},borderRadius:{},borderColor:{},borderStyle:{},borderWidth:{},boxShadow:{},gridTemplateColumns:{},maxItemsWidth:{selector:()=>"::slotted(:not([slot]))",property:"max-width"},minItemsWidth:{selector:()=>"::slotted(:not([slot]))",property:"min-width"},maxRowItems:{property:"max-row-items"},itemsHorizontalAlign:{selector:()=>"::slotted(*)",property:"justify-self"},emptyStateTextColor:{selector:()=>'slot[name="empty-state"]',property:"color"},emptyStateTextFontFamily:{selector:()=>'slot[name="empty-state"]',property:"font-family"}}}),pe,he)(pp);customElements.define(cp,hp),customElements.define(rp,ap);const up=Je("third-party-app-logo");class gp extends(Gt({componentName:up,baseSelector:".wrapper"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n\t\t\t<div class="wrapper">\n <div class="third-party-app-logo-wrapper">\n <div class="third-party-app-logo"></div>\n </div>\n <div class="arrows">\n <descope-icon src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjkiIGhlaWdodD0iMjgiIHZpZXdCb3g9IjAgMCAyOSAyOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTkuMTQ0OTIgMTUuNjQ1TDcuNDk5OTIgMTRMMi44MzMyNSAxOC42NjY3TDcuNDk5OTIgMjMuMzMzM0w5LjE0NDkyIDIxLjY4ODNMNy4zMDE1OSAxOS44MzMzSDI0Ljk5OTlWMTcuNUg3LjMwMTU5TDkuMTQ0OTIgMTUuNjQ1WiIgZmlsbD0iIzYzNkM3NCIvPgo8cGF0aCBkPSJNMTkuODU1IDEyLjM1NTNMMjEuNSAxNC4wMDAzTDI2LjE2NjcgOS4zMzM2NkwyMS41IDQuNjY2OTlMMTkuODU1IDYuMzExOTlMMjEuNjk4MyA4LjE2Njk5SDRWMTAuNTAwM0gyMS42OTgzTDE5Ljg1NSAxMi4zNTUzWiIgZmlsbD0iIzYzNkM3NCIvPgo8L3N2Zz4K"></descope-icon>\n </div>\n <div class="company-logo-wrapper">\n <descope-logo st-height="100%"></descope-logo>\n </div>\n </div>\n\t\t\t',V('\n :host {\n\t\t\t\t\tdisplay: inline-flex;\n\t\t\t\t}\n\t\t\t\t:host([draggable="true"]) > div {\n\t\t\t\t\tpointer-events: none\n\t\t\t\t}\n\n .wrapper {\n display: flex;\n justify-content: center;\n align-items: center;\n min-width: max-content;\n }\n\n\t\t\t\t.third-party-app-logo {\n flex-shrink: 0;\n\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\tmax-width: 100%;\n\t\t\t\t\tmax-height: 100%;\n\t\t\t\t\tobject-fit: contain;\n\t\t\t\t}\n\n .company-logo-wrapper, .third-party-app-logo-wrapper {\n flex-shrink: 0;\n display: inline-flex;\n }\n\n .company-logo-wrapper {\n justify-content: flex-end;\n }\n\n .third-party-app-logo-wrapper {\n justify-content: flex-start;\n }\n\n .arrows {\n flex-shrink: 0;\n display: flex;\n }\n ',this)}}const mp=">.company-logo-wrapper",bp=">.third-party-app-logo-wrapper",yp=_e(jt({mappings:{logoMaxHeight:[{selector:mp,property:"height"},{selector:bp,property:"height"}],logoMaxWidth:[{selector:mp,property:"max-width"},{selector:bp,property:"max-width"}],thirdPartyAppLogo:{selector:()=>".third-party-app-logo",property:"content",fallback:{}},companyLogoFallback:{selector:In.componentName,property:In.cssVarList.fallbackUrl},gap:{},arrowsColor:{selector:Ei.componentName,property:Ei.cssVarList.fill}}}),$t,_t)(gp);customElements.define(up,yp);const fp=Je("security-questions-setup"),vp=["full-width","readonly","size","label-type","question-label","question-placeholder","question-data-errormessage-value-missing","answer-label","answer-placeholder","answer-data-errormessage-value-missing","st-error-message-icon","st-error-message-icon-size","st-error-message-icon-padding"],xp=["count","questions"];class Cp extends(Gt({componentName:fp,baseSelector:"div"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n <div></div>\n\t\t",V("\n :host {\n display: inline-flex;\n }\n\n div {\n display: flex;\n flex-direction: column;\n }\n ",this)}get count(){return Number(this.getAttribute("count"))||0}#lt(){const e=Array.from({length:this.count}).map((e,t)=>`\n <div class="question-wrapper">\n <descope-combo-box\n data-id="${t}"\n item-label-path="data-name"\n item-value-path="data-id"\n bordered="true"\n required="true"\n clear-button-visible="true"\n ></descope-combo-box>\n\n <descope-text-field\n data-id="${t}"\n required="true"\n bordered="true"\n minlength="2"\n ></descope-text-field>\n </div>\n `);this.baseElement.innerHTML=e.join("<spacer></spacer><descope-divider></descope-divider><spacer></spacer>"),this.comboBoxes.forEach(e=>{e.addEventListener("change",e=>{this.updateRemainingCombosData(e.target),this.getAttachedTextField(e.target).value=""}),e.data=this.data}),this.#dt(vp)}getAttachedTextField(e){const t=`descope-text-field[data-id="${e.getAttribute("data-id")}"]`;return this.baseElement.querySelector(t)}filterData(e){const t=this.data.filter(t=>t.value===e||!this.selectedQuestionIds.includes(t.value));return t}reportValidity(){return this.inputs.reverse().forEach(e=>e.reportValidity()),this.checkValidity()}checkValidity(){return[...this.comboBoxes,...this.textFields].every(e=>e.checkValidity())}updateRemainingCombosData(e){this.comboBoxes.filter(t=>t!==e).forEach(e=>{e.data=this.filterData(e.value)})}get questions(){try{return JSON.parse(this.getAttribute("questions"))||[]}catch(e){return console.error(fp,"Error parsing questions attribute",e),[]}}get data(){return this.questions.map(({id:e,text:t})=>({value:e,label:t}))}get comboBoxes(){return Array.from(this.baseElement.querySelectorAll("descope-combo-box"))}get textFields(){return Array.from(this.baseElement.querySelectorAll("descope-text-field"))}get inputs(){return Array.from(this.baseElement.querySelectorAll("descope-combo-box, descope-text-field"))}get selectedQuestionIds(){return this.comboBoxes.map(e=>e.value)}get value(){return this.comboBoxes.map(e=>({id:e.value,answer:this.getAttachedTextField(e).value}))}set value(e=[]){e.forEach((e,t)=>{const o=this.comboBoxes[t],i=this.getAttachedTextField(o);o.value=e.id,i.value=e.answer})}#ct(e,t,o){null===o?e.removeAttribute(t):e.setAttribute(t,o)}#dt(e){const t={question:this.comboBoxes,answer:this.textFields};e.forEach(e=>{const[o,...i]=e.split("-"),r=t[o]||this.inputs,n=t[o]?i.join("-"):e;r.forEach(t=>{this.#ct(t,n,this.getAttribute(e))})})}init(){super.init?.(),Ue(this,()=>{this.#lt()},{includeAttrs:xp}),Ue(this,this.#dt.bind(this),{includeAttrs:vp})}}const wp=_e(jt({mappings:{hostWidth:[{selector:()=>":host",property:"width"},{property:"width"}],hostDirection:[{selector:()=>":host",property:"direction"},{selector:()=>xi.componentName,property:xi.cssVarList.hostDirection},{selector:()=>Zr.componentName,property:Zr.cssVarList.hostDirection}],gap:{selector:()=>"div",property:"gap"}}}),$t,_t)(Cp);customElements.define(fp,wp);const Ip=Je("security-questions-verify"),Sp=["full-width","readonly","size","answer-placeholder","answer-data-errormessage-value-missing","st-error-message-icon","st-error-message-icon-size","st-error-message-icon-padding"],Mp=["question-mode"],Ap={"answer-placeholder":"placeholder","answer-data-errormessage-value-missing":"data-errormessage-value-missing","question-mode":"mode"},Ep=[...Sp,...Mp],Tp=["questions"];class kp extends(Gt({componentName:Ip,baseSelector:"div"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n <div></div>\n\t\t",V("\n :host {\n display: inline-flex;\n }\n\n div {\n display: flex;\n flex-direction: column;\n }\n ",this)}#lt(){const e=this.questions.map(({id:e,text:t})=>`\n <div class="question-wrapper">\n <descope-text\n data-id="${e}"\n >${t}</descope-text>\n\n <descope-text-field\n data-id="${e}"\n required="true"\n bordered="true"\n ></descope-text-field>\n </div>\n `);this.baseElement.innerHTML=e.join("<spacer></spacer><descope-divider></descope-divider><spacer></spacer>"),this.#dt(Ep),this.texts.forEach(e=>{const t=this.textFields.find(t=>t.getAttribute("data-id")===e.getAttribute("data-id"));t&&(e.onclick=t.focus.bind(t))})}reportValidity(){return this.textFields.reverse().forEach(e=>e.reportValidity()),this.checkValidity()}checkValidity(){return this.textFields.every(e=>e.checkValidity())}get questions(){try{return JSON.parse(this.getAttribute("questions"))||[]}catch(e){return console.error(Ip,"Error parsing questions attribute",e),[]}}get texts(){return Array.from(this.baseElement.querySelectorAll("descope-text"))}get textFields(){return Array.from(this.baseElement.querySelectorAll("descope-text-field"))}get elements(){return Array.from(this.baseElement.querySelectorAll("descope-text, descope-text-field"))}get value(){return this.textFields.map(e=>({id:e.getAttribute("data-id"),answer:e.value}))}set value(e=[]){e.forEach(({id:e,answer:t})=>{const o=this.textFields.find(t=>t.getAttribute("data-id")===e);o&&(o.value=t)})}#ct(e,t,o){null===o?e.removeAttribute(t):e.setAttribute(t,o)}#pt(e){switch(!0){case Sp.includes(e):return this.textFields;case Mp.includes(e):return this.texts;default:return[]}}#dt(e){e.forEach(e=>{this.#pt(e).forEach(t=>{this.#ct(t,Ap[e]||e,this.getAttribute(e))})})}init(){super.init?.(),Ue(this,()=>{this.#lt()},{includeAttrs:Tp}),Ue(this,this.#dt.bind(this),{includeAttrs:Ep})}}const zp=_e(jt({componentNameOverride:Je("input-wrapper")}),jt({mappings:{hostWidth:[{selector:()=>":host",property:"width"},{property:"width"}],hostDirection:[{selector:()=>":host",property:"direction"},{selector:()=>ko.componentName,property:ko.cssVarList.hostDirection},{selector:()=>Zr.componentName,property:Zr.cssVarList.hostDirection}],gap:{selector:()=>"div",property:"gap"},questionTextAlign:{selector:()=>ko.componentName,property:ko.cssVarList.textAlign},questionFontSize:{selector:()=>ko.componentName,property:ko.cssVarList.fontSize},questionFontFamily:{selector:()=>ko.componentName,property:ko.cssVarList.fontFamily},questionCursor:{selector:()=>ko.componentName,property:"cursor"},errorMessageIcon:{selector:()=>ko.componentName,property:ko.cssVarList.errorMessageIcon},errorMessageIconSize:{selector:()=>ko.componentName,property:ko.cssVarList.errorMessageSize},errorMessageIconPadding:{selector:()=>ko.componentName,property:ko.cssVarList.errorMessagePadding},errorMessageIconRepeat:{selector:()=>ko.componentName,property:ko.cssVarList.errorMessageRepeat},errorMessageIconPosition:{selector:()=>ko.componentName,property:ko.cssVarList.errorMessagePosition},errorMessageFontSize:{selector:()=>ko.componentName,property:ko.cssVarList.errorMessageFontSize}}}),$t,_t)(kp);customElements.define(Ip,zp);const Lp=/[^\d\s+\-()]/,Vp=Je("hybrid-field"),Np={shared:["label","bordered","full-width","label-type","size","disabled","readonly","required","st-host-direction","st-error-message-icon","st-error-message-icon-size","st-error-message-icon-padding"],email:["placeholder","data-errormessage-value-missing-email","data-errormessage-pattern-mismatch-email","external-input"],phone:{countryCode:["phone-input-label","country-input-label","country-input-placeholder","restrict-countries","default-code","phone-minlength","phone-format-value","phone-strict-validation","phone-input-type","data-errormessage-value-missing-phone"],inputBox:["restrict-countries","default-code","phone-minlength","phone-format-value","phone-strict-validation","phone-input-type","data-errormessage-value-missing-phone"]}},Dp={email:{"data-errormessage-value-missing-email":"data-errormessage-value-missing","data-errormessage-pattern-mismatch-email":"data-errormessage-pattern-mismatch"},phone:{"phone-input-label":"label","phone-minlength":"minlength","phone-format-value":"format-value","phone-strict-validation":"strict-validation","data-errormessage-value-missing-phone":"data-errormessage-value-missing"}},Pp="descope-phone-field",Bp=Gt({componentName:Vp,baseSelector:"div"}),Fp=_e(jt({componentNameOverride:Je("input-wrapper")}),jt({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDirection:[{selector:()=>"descope-email-field",property:"direction"},{selector:()=>"descope-phone-field",property:"direction"},{selector:()=>"descope-phone-input-box-field",property:"direction"}],errorMessageIcon:[{selector:()=>_s.componentName,property:_s.cssVarList.errorMessageIcon},{selector:()=>sa.componentName,property:sa.cssVarList.errorMessageIcon}],errorMessageIconSize:[{selector:()=>_s.componentName,property:_s.cssVarList.errorMessageIconSize},{selector:()=>sa.componentName,property:sa.cssVarList.errorMessageIconSize}],errorMessageIconPadding:[{selector:()=>_s.componentName,property:_s.cssVarList.errorMessageIconPadding},{selector:()=>sa.componentName,property:sa.cssVarList.errorMessageIconPadding}],errorMessageIconRepeat:[{selector:()=>_s.componentName,property:_s.cssVarList.errorMessageIconRepeat},{selector:()=>sa.componentName,property:sa.cssVarList.errorMessageIconRepeat}],errorMessageIconPosition:[{selector:()=>_s.componentName,property:_s.cssVarList.errorMessageIconPosition},{selector:()=>sa.componentName,property:sa.cssVarList.errorMessageIconPosition}],errorMessageFontSize:[{selector:()=>_s.componentName,property:_s.cssVarList.errorMessageFontSize},{selector:()=>sa.componentName,property:sa.cssVarList.errorMessageFontSize}],labelFontWeight:[{selector:()=>_s.componentName,property:_s.cssVarList.labelFontWeight},{selector:()=>sa.componentName,property:sa.cssVarList.labelFontWeight}],inputValueFontWeight:[{selector:()=>_s.componentName,property:_s.cssVarList.inputValueFontWeight},{selector:()=>sa.componentName,property:sa.cssVarList.inputValueFontWeight}],inputPlaceholderFontWeight:[{selector:()=>_s.componentName,property:_s.cssVarList.inputPlaceholderFontWeight},{selector:()=>sa.componentName,property:sa.cssVarList.inputPlaceholderFontWeight}],helperTextFontWeight:[{selector:()=>_s.componentName,property:_s.cssVarList.helperTextFontWeight},{selector:()=>sa.componentName,property:sa.cssVarList.helperTextFontWeight}],errorMessageFontWeight:[{selector:()=>_s.componentName,property:_s.cssVarList.errorMessageFontWeight},{selector:()=>sa.componentName,property:sa.cssVarList.errorMessageFontWeight}]}}),$t,_t)(class extends Bp{#ht=!1;#ut;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML=`\n <div class="wrapper">\n <descope-email-field external-input="${this.isExternalInput}"></descope-email-field>\n <descope-phone-field allow-alphanumeric-input="true" phone-input-type="text"></descope-phone-field>\n <descope-phone-input-box-field allow-alphanumeric-input="true" phone-input-type="text"></descope-phone-input-box-field>\n </div>\n\t\t`,V("\n :host {\n display: inline-flex;\n box-sizing: border-box;\n padding: 0;\n gap: 0;\n }\n .wrapper {\n display: grid;\n width: 100%;\n }\n descope-email-field,\n descope-phone-field,\n descope-phone-input-box-field {\n grid-area: 1/1;\n width: 100%;\n height: 100%;\n }\n .hidden {\n visibility: hidden;\n }\n ",this)}get isExternalInput(){return"true"===this.getAttribute("external-input")}get emailInputEle(){return this.isExternalInput?this.emailInput.externalInput:this.emailInput.inputElement}get phoneVariant(){return"inputBox"===this.getAttribute("phone-variant")?this.phoneInputBoxInput:this.phoneCountryCodeInput}get defaultCode(){const e=this.phoneCountryCodeInput.countryCodes?.[0]||"";return this.getAttribute("default-code")||e}get activeInputEle(){return this.activeInput===this.emailInput?this.emailInputEle:this.phoneVariant.phoneNumberInputEle}get value(){return this.activeInput?.value||""}set value(e){this.handleActiveInput(e),setTimeout(()=>{this.activeInput.value=e})}async init(){super.init?.(),this.initInputs(),this.updateAttrs(),this.toggleInputVisibility(),await this.waitForInputs(),this.initInputEles(),this.overrideEmailInputType(),this.overrideEmailSetAttribute()}waitForInputs(){return new Promise(e=>{const t=setInterval(()=>{this.emailInputEle&&(clearInterval(t),e())})})}initInputs(){this.emailInput=this.shadowRoot.querySelector("descope-email-field"),this.phoneCountryCodeInput=this.shadowRoot.querySelector(Pp),this.phoneInputBoxInput=this.shadowRoot.querySelector("descope-phone-input-box-field"),this.inputs=[this.emailInput,this.phoneCountryCodeInput,this.phoneInputBoxInput],this.activeInput=this.emailInput}initInputEles(){[this.emailInputEle,this.phoneCountryCodeInput.phoneNumberInputEle,this.phoneInputBoxInput.phoneNumberInputEle].forEach(e=>{e.addEventListener("input",this.onValueChange.bind(this))})}overrideEmailInputType(){this.emailInputEle.addEventListener("focus",()=>{this.emailInputEle.setAttribute("type","text")}),this.emailInputEle.addEventListener("blur",()=>{setTimeout(()=>{this.emailInputEle.setAttribute("type","email")})})}overrideEmailSetAttribute(){const e=this.emailInput.setAttribute.bind(this.emailInputEle);this.emailInputEle.setAttribute=(t,o)=>("type"!==t||"email"!==o||!this.emailInput.hasAttribute("focused"))&&e(t,o)}updateAttrs(){Xe(this,this.emailInput,{includeAttrs:Np.email,mapAttrs:Dp.email}),Xe(this,this.phoneCountryCodeInput,{includeAttrs:Np.phone.countryCode,mapAttrs:Dp.phone}),Xe(this,this.phoneInputBoxInput,{includeAttrs:Np.phone.inputBox,mapAttrs:Dp.phone}),this.inputs.forEach(e=>Xe(this,e,{includeAttrs:Np.shared})),setTimeout(()=>this.phoneCountryCodeInput.setAttribute("default-code",this.defaultCode))}onValueChange(){this.#ut=this.activeInputEle.selectionStart,this.handleActiveInput(this.activeInputEle.value||this.activeInput.value)}handleActiveInput(e){const t=(e=>!!e&&!Lp.test(e))(e)?this.phoneVariant:this.emailInput;this.activeInput!==t&&this.setActiveInput(t)}setActiveInput(e){const t=this.activeInputEle.value||this.activeInput.value;this.activeInput=e,this.setActiveInputValue(t),this.#ht&&this.activeInput.reportValidity(),this.setActiveInputSelectionStart(),this.toggleInputVisibility()}setActiveInputSelectionStart(){setTimeout(()=>{this.activeInputEle.focus(),this.activeInputEle.setSelectionRange?.(this.#ut,this.#ut)})}#gt(){const e=this.getAttribute("default-code"),t=e&&_s.CountryCodes.find(t=>t.code===e);return t?.dialCode||_s.CountryCodes[0]?.dialCode||""}setActiveInputValue(e){const t=(e=>e.replace(/\+\d+-/,""))(e);if(this.activeInput.localName===Pp){const e=this.phoneCountryCodeInput.countryCodeItems||this.#gt();this.activeInput.value=`${e}-${t}`}else this.activeInput.value=t}toggleInputVisibility(){this.inputs.forEach(e=>{e!==this.activeInput?e.classList.add("hidden"):e.classList.remove("hidden")})}reportValidity(){this.#ht=!0;const e=this.activeInputEle,t=e.type;return e.setAttribute("type","text"),setTimeout(()=>{e.setSelectionRange?.(e.value.length,e.value.length),e.setAttribute("type",t)}),this.activeInput.reportValidity()}checkValidity(){return this.activeInput.checkValidity()}});customElements.define(Vp,Fp);const Rp=Je("alert");class Wp extends(Gt({componentName:Rp,baseSelector:":host > div"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div>\n <div class="icon"></div>\n <div class="content">\n <descope-enriched-text>\n <slot></slot>\n </descope-enriched-text>\n </div>\n </div>\n ',V('\n :host {\n display: inline-flex;\n }\n :host > div {\n display: flex;\n width: 100%;\n }\n :host([empty="true"]) {\n display: none;\n }\n .icon {\n flex-shrink: 0;\n }\n .content {\n display: flex;\n flex-wrap: wrap;\n white-space: normal;\n overflow-wrap: break-word;\n }\n ',this)}init(){super.init?.(),this.slotEle=this.shadowRoot.querySelector("slot"),this.textComp=this.shadowRoot.querySelector("descope-enriched-text"),this.slotEle.addEventListener("slotchange",this.handleSlotChange.bind(this)),T(this.textComp,this,{includeAttrs:["empty"]}),A(this,this.handleChildrenChange.bind(this)),Xe(this,this.textComp,{includeAttrs:["variant","full-width","link-target-blank"]})}handleChildrenChange(){this.textComp.textContent=this.textContent}handleSlotChange(){const e=this.slotEle.assignedNodes({flatten:!0});e.length&&(this.textComp.textContent=e[0]?.textContent||"")}}const{icon:Op}={icon:{selector:()=>".icon"}},jp=_e(jt({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDirection:{selector:()=>":host",property:"direction"},textColor:{selector:Oe.componentName,property:Oe.cssVarList.textColor},backgroundColor:{},borderColor:{},borderWidth:{},borderStyle:{},borderRadius:{},fontSize:[{},{selector:Oe.componentName,property:Oe.cssVarList.fontSize}],gap:{},horizontalPadding:[{property:"padding-top"},{property:"padding-bottom"}],verticalPadding:[{property:"padding-right"},{property:"padding-left"}],alignItems:{},justifyContent:[{},{selector:Oe.componentName,property:Oe.cssVarList.textAlign}],icon:[{...Op,property:"content"},{...Op,property:"display",fallback:"none"}],iconSize:[{...Op,property:"width"},{...Op,property:"height"}]}}),jt({componentNameOverride:Je("enriched-text")}),jt({componentNameOverride:Je("text")}),$t,_t)(Wp);customElements.define(Rp,jp);const $p=Je("hcaptcha"),_p=["enabled","site-key"],Hp=co({componentName:$p,baseSelector:":host > div"}),qp=_e(jt({mappings:{hostWidth:[{selector:()=>":host",property:"width"}],hostDirection:{property:"direction"},verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],horizontalPadding:[{property:"padding-left"},{property:"padding-right"}],maxHeight:[{selector:">img",property:"height"},{selector:">#hcaptcha",property:"height"}],maxWidth:[{selector:">img",property:"max-width"},{selector:">hcaptcha",property:"max-width"}]}}),$t,_t)(class extends Hp{static get observedAttributes(){return _p.concat(Hp.observedAttributes||[])}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),t!==o&&"enabled"===e&&this.toggleCaptchaEles("true"===o)}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="badge">\n <span id="hcaptcha"></span>\n <input id="hcaptcha-input" type="hidden" name="hcaptcha" required />\n <img src="https://imgs.descope.com/connectors/templates/hcaptcha/hcaptcha-big.png" alt="hcaptcha"/>\n </div>\n <slot></slot>\n\t',V("\n :host {\n display: inline-flex;\n }\n :host > div:not(.hidden) {\n display: flex;\n }\n :host #hcaptcha-input {\n display: none;\n }\n :host #hcaptcha .hcaptcha-logo {\n height: 100%;\n }\n :host #hcaptcha {\n\t\t\t\twidth: 100%;\n height: 100%;\n\t\t\t}\n :host img {\n max-width: 100%;\n max-height: 100%;\n object-fit: contain;\n }\n .hidden {\n display: none;\n }\n ",this),this.captchaEle=this.shadowRoot.querySelector("#hcaptcha"),this.mockCaptchaEle=this.shadowRoot.querySelector("img"),this.badge=this.shadowRoot.querySelector(".badge"),this.inputElement=this.shadowRoot.querySelector("input")}init(){super.init?.(),A(this,this.updatePreview.bind(this)),this.inputElement.getValidity=null,this.inputElement.checkValidity=null}toggleCaptchaEles(e){e?(this.captchaEle.style.display="",this.mockCaptchaEle.style.display="none"):(this.captchaEle.style.display="none",this.mockCaptchaEle.style.display="")}updatePreview(){this.toggleCaptchaEles(this.enabled)}getValidity(){return this.inputElement.value?{}:{valueMissing:!0}}checkValidity(){return!!this.inputElement.value}get siteKey(){return this.getAttribute("site-key")}get enabled(){return"true"===this.getAttribute("enabled")}});customElements.define($p,qp);const Yp=(th={surface:{main:"#ffffff",dark:"#636c74",light:"#cfd3d7",highlight:"#f4f5f6",contrast:"#181a1c"},primary:{main:"#006af5",dark:"#004094",light:"#71aeff",highlight:"#f0f6ff",contrast:"#ffffff"},secondary:{main:"#802ed6",dark:"#6410bc",light:"#be89f5",highlight:"#ede7f6",contrast:"#ffffff"},success:{main:"#008000",dark:"#005700",light:"#8bc38b",highlight:"#f5faf5",contrast:"#ffffff"},error:{main:"#e21d12",dark:"#b3170f",light:"#f4807a",highlight:"#fef1f1",contrast:"#ffffff"},warning:{main:"#c45512",dark:"#a24309",light:"#ff985a",highlight:"#fdf0e5",contrast:"#ffffff"}},Object.keys(th).reduce((e,t)=>{const o=th[t];return Object.assign(e,{[t]:ht(o)})},{})),Up={font1:{family:["Roboto","ui-sans-serif","system-ui","-apple-system","BlinkMacSystemFont","Segoe UI","Helvetica Neue","Arial","Noto Sans","sans-serif","Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"],label:"Roboto",url:"https://fonts.googleapis.com/css?family=Roboto:100,200,300,400,500,600,700,800,900"},font2:{family:["ui-sans-serif","system-ui","-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Helvetica Neue","Arial","Noto Sans","sans-serif","Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"],label:"Sans Serif"}},Gp=Mt({fonts:Up}).fonts,Zp={colors:Yp,typography:{h1:{font:Gp.font1.family,weight:"900",size:"48px"},h2:{font:Gp.font1.family,weight:"800",size:"38px"},h3:{font:Gp.font1.family,weight:"600",size:"28px"},subtitle1:{font:Gp.font2.family,weight:"500",size:"22px"},subtitle2:{font:Gp.font2.family,weight:"400",size:"20px"},body1:{font:Gp.font1.family,weight:"400",size:"16px"},body2:{font:Gp.font1.family,weight:"400",size:"14px"}},spacing:{xs:"2px",sm:"4px",md:"8px",lg:"16px",xl:"32px"},border:{xs:"1px",sm:"2px",md:"3px",lg:"4px",xl:"5px"},radius:{xs:"5px",sm:"10px",md:"15px",lg:"20px",xl:"25px","2xl":"30px","3xl":"35px"},shadow:{wide:{sm:"0 2px 3px -0.5px",md:"0 4px 6px -1px",lg:"0 10px 15px -3px",xl:"0 20px 25px -5px","2xl":"0 25px 50px -12px"},narrow:{sm:"0 1px 2px -1px",md:"0 2px 4px -2px",lg:"0 4px 6px -4px",xl:"0 8px 10px -6px","2xl":"0 16px 16px -8px"}},fonts:Up,direction:"ltr"},Qp=(e=>It(e,[],e=>wt({},e,Ct(e))))(Zp),Jp=(e=>Object.keys(e).reduce((t,o)=>{const i=e[o];return Object.assign(t,{[o]:Y(i)})},{}))({surface:{main:"#ffffff",dark:"#636c74",light:"#cfd3d7",highlight:"#f4f5f6",contrast:"#181a1c"},primary:{main:"#006af5",dark:"#004094",light:"#71aeff",highlight:"#f0f6ff",contrast:"#ffffff"},secondary:{main:"#802ed6",dark:"#6410bc",light:"#be89f5",highlight:"#ede7f6",contrast:"#ffffff"},success:{main:"#008000",dark:"#005700",light:"#8bc38b",highlight:"#f5faf5",contrast:"#ffffff"},error:{main:"#e21d12",dark:"#b3170f",light:"#f4807a",highlight:"#fef1f1",contrast:"#ffffff"},warning:{main:"#c45512",dark:"#a24309",light:"#ff985a",highlight:"#fdf0e5",contrast:"#ffffff"}}),Kp={font1:{family:["Roboto","ui-sans-serif","system-ui","-apple-system","BlinkMacSystemFont","Segoe UI","Helvetica Neue","Arial","Noto Sans","sans-serif","Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"],label:"Roboto",url:"https://fonts.googleapis.com/css?family=Roboto:100,200,300,400,500,600,700,800,900"},font2:{family:["ui-sans-serif","system-ui","-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Helvetica Neue","Arial","Noto Sans","sans-serif","Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"],label:"Sans Serif"}},Xp=te({fonts:Kp}).fonts,eh={colors:Jp,typography:{h1:{font:Xp.font1.family,weight:"900",size:"48px"},h2:{font:Xp.font1.family,weight:"800",size:"38px"},h3:{font:Xp.font1.family,weight:"600",size:"28px"},subtitle1:{font:Xp.font2.family,weight:"500",size:"22px"},subtitle2:{font:Xp.font2.family,weight:"400",size:"20px"},body1:{font:Xp.font1.family,weight:"400",size:"16px"},body2:{font:Xp.font1.family,weight:"400",size:"14px"}},spacing:{xs:"2px",sm:"4px",md:"8px",lg:"16px",xl:"32px"},border:{xs:"1px",sm:"2px",md:"3px",lg:"4px",xl:"5px"},radius:{xs:"5px",sm:"10px",md:"15px",lg:"20px",xl:"25px","2xl":"30px","3xl":"35px"},shadow:{wide:{sm:"0 2px 3px -0.5px",md:"0 4px 6px -1px",lg:"0 10px 15px -3px",xl:"0 20px 25px -5px","2xl":"0 25px 50px -12px"},narrow:{sm:"0 1px 2px -1px",md:"0 2px 4px -2px",lg:"0 4px 6px -4px",xl:"0 8px 10px -6px","2xl":"0 16px 16px -8px"}},fonts:Kp,direction:"ltr"};var th;(e=>{ee(e,[],e=>X({},e,K(e)))})(eh);const oh=te(eh),ih=Ni.cssVarList,rh={primary:oh.colors.primary,secondary:oh.colors.secondary,success:oh.colors.success,error:oh.colors.error,surface:oh.colors.surface},[nh,sh,ah]=ie({mode:rh},Ti),lh={...nh,[ih.fontFamily]:oh.fonts.font1.family,[ih.fontWeight]:"400",[ih.cursor]:"pointer",[ih.hostHeight]:"3em",[ih.hostWidth]:"auto",[ih.hostDirection]:oh.direction,[ih.borderRadius]:oh.radius.sm,[ih.borderWidth]:oh.border.xs,[ih.borderStyle]:"solid",[ih.borderColor]:"transparent",[ih.labelSpacing]:"0.25em",[ih.textAlign]:"center",textAlign:{right:{[ih.textAlign]:"right"},left:{[ih.textAlign]:"left"},center:{[ih.textAlign]:"center"}},[ih.verticalPadding]:"1em",[ih.horizontalPadding]:"0.875em",[ih.outlineWidth]:eh.border.sm,[ih.outlineOffset]:"0px",[ih.outlineStyle]:"solid",[ih.outlineColor]:"transparent",[ih.iconSize]:"1.5em",size:{xs:{[ih.fontSize]:"12px"},sm:{[ih.fontSize]:"14px"},md:{[ih.fontSize]:"16px"},lg:{[ih.fontSize]:"18px"}},_square:{[ih.hostHeight]:"3em",[ih.hostWidth]:"3em",[ih.verticalPadding]:"0"},_fullWidth:{[ih.hostWidth]:"100%"},_loading:{[ih.cursor]:"wait",[ih.labelTextColor]:sh.main},_disabled:{[ah.main]:oh.colors.surface.light,[ah.dark]:oh.colors.surface.dark,[ah.light]:oh.colors.surface.light,[ah.contrast]:oh.colors.surface.main,[ih.iconColor]:oh.colors.surface.main},variant:{contained:{[ih.labelTextColor]:sh.contrast,[ih.backgroundColor]:sh.main,_hover:{[ih.backgroundColor]:sh.dark,_loading:{[ih.backgroundColor]:sh.main}},_active:{[ih.backgroundColor]:sh.main}},outline:{[ih.labelTextColor]:sh.main,[ih.borderColor]:sh.main,_hover:{[ih.labelTextColor]:sh.dark,[ih.borderColor]:sh.dark},_active:{[ih.labelTextColor]:sh.main,[ih.borderColor]:sh.main}},link:{[ih.labelTextColor]:sh.main,[ih.horizontalPadding]:"0.125em",_hover:{[ih.labelTextColor]:sh.dark,[ih.labelTextDecoration]:"underline"},_active:{[ih.labelTextColor]:sh.main}}},_focused:{[ih.outlineColor]:sh.light}},dh={...ih,...ah};var ch=Object.freeze({__proto__:null,default:lh,vars:dh});const ph=te(eh),hh=ko.cssVarList,uh={[hh.hostDirection]:ph.direction,[hh.textLineHeight]:"1.35em",[hh.textAlign]:"start",[hh.textColor]:ph.colors.surface.dark,variant:{h1:{[hh.fontSize]:ph.typography.h1.size,[hh.fontWeight]:ph.typography.h1.weight,[hh.fontFamily]:ph.typography.h1.font},h2:{[hh.fontSize]:ph.typography.h2.size,[hh.fontWeight]:ph.typography.h2.weight,[hh.fontFamily]:ph.typography.h2.font},h3:{[hh.fontSize]:ph.typography.h3.size,[hh.fontWeight]:ph.typography.h3.weight,[hh.fontFamily]:ph.typography.h3.font},subtitle1:{[hh.fontSize]:ph.typography.subtitle1.size,[hh.fontWeight]:ph.typography.subtitle1.weight,[hh.fontFamily]:ph.typography.subtitle1.font},subtitle2:{[hh.fontSize]:ph.typography.subtitle2.size,[hh.fontWeight]:ph.typography.subtitle2.weight,[hh.fontFamily]:ph.typography.subtitle2.font},body1:{[hh.fontSize]:ph.typography.body1.size,[hh.fontWeight]:ph.typography.body1.weight,[hh.fontFamily]:ph.typography.body1.font},body2:{[hh.fontSize]:ph.typography.body2.size,[hh.fontWeight]:ph.typography.body2.weight,[hh.fontFamily]:ph.typography.body2.font}},mode:{primary:{[hh.textColor]:ph.colors.surface.contrast},secondary:{[hh.textColor]:ph.colors.surface.dark},error:{[hh.textColor]:ph.colors.error.main},"error-dark":{[hh.textColor]:ph.colors.error.dark},success:{[hh.textColor]:ph.colors.success.main},"success-dark":{[hh.textColor]:ph.colors.success.dark},warning:{[hh.textColor]:ph.colors.warning.main},"warning-dark":{[hh.textColor]:ph.colors.warning.dark}},textAlign:{right:{[hh.textAlign]:"right"},left:{[hh.textAlign]:"left"},center:{[hh.textAlign]:"center"}},_fullWidth:{[hh.hostWidth]:"100%"},_italic:{[hh.fontStyle]:"italic"},_uppercase:{[hh.textTransform]:"uppercase"},_lowercase:{[hh.textTransform]:"lowercase"}};var gh=Object.freeze({__proto__:null,default:uh,vars:hh});const mh=te(eh),bh=Wo.cssVarList,yh={[bh.hostDirection]:mh.direction,[bh.cursor]:"pointer",[bh.textColor]:mh.colors.primary.main,textAlign:{right:{[bh.textAlign]:"right"},left:{[bh.textAlign]:"left"},center:{[bh.textAlign]:"center"}},_fullWidth:{[bh.hostWidth]:"100%"},_hover:{[bh.textDecoration]:"underline"},mode:{secondary:{[bh.textColor]:mh.colors.secondary.main}}};var fh=Object.freeze({__proto__:null,default:yh,vars:bh});const vh=te(eh),xh=Oe.cssVarList,Ch={[xh.hostDirection]:vh.direction,[xh.hostWidth]:oe(hh.hostWidth),[xh.textLineHeight]:oe(hh.textLineHeight),[xh.textColor]:oe(hh.textColor),[xh.textAlign]:oe(hh.textAlign),[xh.fontSize]:oe(hh.fontSize),[xh.fontWeight]:oe(hh.fontWeight),[xh.fontFamily]:oe(hh.fontFamily),[xh.linkColor]:oe(bh.textColor),[xh.linkTextDecoration]:"none",[xh.linkHoverTextDecoration]:"underline",[xh.fontWeightBold]:"900",[xh.minWidth]:"0.25em",[xh.minHeight]:"1.35em",[xh.hostDisplay]:"inline-block",_empty:{_hideWhenEmpty:{[xh.hostDisplay]:"none"}}};var wh=Object.freeze({__proto__:null,default:Ch,vars:xh});const Ih=k("input-wrapper"),Sh=te(eh),[Mh,Ah]=ie({labelTextColor:Sh.colors.surface.dark,labelFontSize:"14px",labelFontWeight:"500",inputValueFontWeight:"400",inputPlaceholderFontWeight:"400",helperTextFontWeight:"400",errorMessageFontWeight:"400",valueTextColor:Sh.colors.surface.contrast,placeholderTextColor:Sh.colors.surface.dark,requiredIndicator:"'*'",helperTextColor:Sh.colors.surface.dark,errorMessageTextColor:Sh.colors.error.main,successMessageTextColor:Sh.colors.success.main,borderWidth:Sh.border.xs,borderRadius:Sh.radius.xs,borderColor:"transparent",outlineWidth:Sh.border.sm,outlineStyle:"solid",outlineColor:"transparent",outlineOffset:"0px",minWidth:"10em",toggleButtonSize:"1.5em",inputIconSize:"1em",inputHeight:"3em",horizontalPadding:"0.5em",verticalPadding:"0.5em",textAlign:"start",backgroundColor:Sh.colors.surface.main,fontFamily:Sh.fonts.font1.family,direction:Sh.direction,overlayOpacity:"0.3",errorMessageIcon:"",errorMessageIconSize:"0",errorMessageIconPadding:"0",errorMessageIconPosition:"0 0.4em",errorMessageFontSize:"0.8125rem",errorMessageIconRepeat:"no-repeat",size:{xs:{fontSize:"12px",chipFontSize:"10px"},sm:{fontSize:"14px",chipFontSize:"12px"},md:{fontSize:"16px",chipFontSize:"14px"},lg:{fontSize:"18px",chipFontSize:"16px"}},labelType:{static:{valueInputHeight:"3em",valueInputMarginBottom:"auto"},floating:{labelPosition:"absolute",labelTopPosition:"0",labelHorizontalPosition:"0.9em",labelFontSize:"1em",placeholderOpacity:0,inputHeight:"3.5em",inputVerticalAlignment:"flex-end",inputTransformY:"translateY(1.55em)",inputTransition:"all 75ms ease-in-out",marginInlineStart:"0",valueInputHeight:"1.5702em",valueInputMarginBottom:"0.5em",_focused:{labelFontSize:"0.75em",inputTransformY:"translateY(1.05em)",labelFontWeight:"400",placeholderOpacity:1},_readOnly:{placeholderOpacity:0},_hasValue:{inputTransformY:"translateY(1.05em)",labelFontSize:"0.75em",labelFontWeight:"400"}}},_fullWidth:{width:"100%"},_focused:{outlineColor:Sh.colors.surface.light,_invalid:{outlineColor:Sh.colors.error.main}},_bordered:{outlineWidth:Sh.border.xs,borderColor:Sh.colors.surface.light,borderStyle:"solid",_invalid:{borderColor:Sh.colors.error.main}},_disabled:{labelTextColor:Sh.colors.surface.light,borderColor:Sh.colors.surface.light,valueTextColor:Sh.colors.surface.light,placeholderTextColor:Sh.colors.surface.light,helperTextColor:Sh.colors.surface.light,backgroundColor:Sh.colors.surface.main}},Ih),Eh=te(eh),Th=xi.cssVarList,kh={[Th.hostWidth]:Ah.width,[Th.hostDirection]:Ah.direction,[Th.fontSize]:Ah.fontSize,[Th.fontFamily]:Ah.fontFamily,[Th.labelFontSize]:Ah.labelFontSize,[Th.labelFontWeight]:Ah.labelFontWeight,[Th.inputValueFontWeight]:Ah.inputValueFontWeight,[Th.inputPlaceholderFontWeight]:Ah.inputPlaceholderFontWeight,[Th.helperTextFontWeight]:Ah.helperTextFontWeight,[Th.errorMessageFontWeight]:Ah.errorMessageFontWeight,[Th.labelTextColor]:Ah.labelTextColor,[Th.errorMessageTextColor]:Ah.errorMessageTextColor,[Th.inputBorderColor]:Ah.borderColor,[Th.inputBorderWidth]:Ah.borderWidth,[Th.inputBorderStyle]:Ah.borderStyle,[Th.inputBorderRadius]:Ah.borderRadius,[Th.inputOutlineColor]:Ah.outlineColor,[Th.inputOutlineOffset]:Ah.outlineOffset,[Th.inputOutlineWidth]:Ah.outlineWidth,[Th.inputOutlineStyle]:Ah.outlineStyle,[Th.labelRequiredIndicator]:Ah.requiredIndicator,[Th.inputValueTextColor]:Ah.valueTextColor,[Th.inputPlaceholderTextColor]:Ah.placeholderTextColor,[Th.inputBackgroundColor]:Ah.backgroundColor,[Th.inputHorizontalPadding]:Ah.horizontalPadding,[Th.inputHeight]:Ah.inputHeight,[Th.inputDropdownButtonColor]:Eh.colors.surface.dark,[Th.inputDropdownButtonCursor]:"pointer",[Th.inputDropdownButtonSize]:Ah.toggleButtonSize,[Th.inputDropdownButtonOffset]:Eh.spacing.xs,[Th.overlayItemPaddingInlineStart]:Eh.spacing.xs,[Th.overlayItemPaddingInlineEnd]:Eh.spacing.lg,[Th.labelPosition]:Ah.labelPosition,[Th.labelTopPosition]:Ah.labelTopPosition,[Th.labelHorizontalPosition]:Ah.labelHorizontalPosition,[Th.inputTransformY]:Ah.inputTransformY,[Th.inputTransition]:Ah.inputTransition,[Th.marginInlineStart]:Ah.marginInlineStart,[Th.placeholderOpacity]:Ah.placeholderOpacity,[Th.inputVerticalAlignment]:Ah.inputVerticalAlignment,[Th.valueInputHeight]:Ah.valueInputHeight,[Th.valueInputMarginBottom]:Ah.valueInputMarginBottom,[Th.errorMessageIcon]:Ah.errorMessageIcon,[Th.errorMessageIconSize]:Ah.errorMessageIconSize,[Th.errorMessageIconPadding]:Ah.errorMessageIconPadding,[Th.errorMessageIconRepeat]:Ah.errorMessageIconRepeat,[Th.errorMessageIconPosition]:Ah.errorMessageIconPosition,[Th.errorMessageFontSize]:Ah.errorMessageFontSize,_readonly:{[Th.inputDropdownButtonCursor]:"default"},[Th.overlayFontSize]:Ah.fontSize,[Th.overlayFontFamily]:Ah.fontFamily,[Th.overlayCursor]:"pointer",[Th.overlayItemBoxShadow]:"none",[Th.overlayBackground]:Ah.backgroundColor,[Th.overlayTextColor]:Ah.valueTextColor,[Th.overlayCheckmarkDisplay]:"initial",[Th.overlaySelectedItemBackground]:"initial",[Th.overlaySelectedItemHoverBackground]:Eh.colors.primary.highlight,[Th.overlaySelectedItemFocusBackground]:Eh.colors.primary.highlight,[Th.overlayItemHoverBackground]:Eh.colors.primary.highlight,[Th.overlayItemFocusBackground]:Eh.colors.primary.highlight,[Th.overlay.minHeight]:"400px",[Th.overlay.margin]:"0",[Th.overlay.contentHeight]:"100%",[Th.overlay.contentOpacity]:"1",[Th.overlay.scrollerMinHeight]:"1px",_loading:{[Th.overlay.loaderTop]:"50%",[Th.overlay.loaderLeft]:"50%",[Th.overlay.loaderRight]:"auto",[Th.overlay.loaderMargin]:"-15px 0 0 -15px",[Th.overlay.loaderWidth]:"30px",[Th.overlay.loaderHeight]:"30px",[Th.overlay.loaderBorder]:"2px solid transparent",[Th.overlay.loaderBorderColor]:`${Eh.colors.primary.highlight} ${Eh.colors.primary.highlight} ${Eh.colors.primary.main} ${Eh.colors.primary.main}`,[Th.overlay.loaderBorderRadius]:"50%",[Th.overlay.contentHeight]:"100px",[Th.overlay.scrollerMinHeight]:"100px",[Th.overlay.contentOpacity]:"0"}};var zh=Object.freeze({__proto__:null,comboBox:kh,default:kh,vars:Th});const Lh=te(eh),[Vh,Nh]=ie({shadowColor:"#00000020"},Sc),{shadowColor:Dh}=Nh,Ph=Ac.cssVarList,Bh={...Vh,[Ph.hostWidth]:"fit-content",[Ph.hostDirection]:Lh.direction,[Ph.textAlign]:"center",[Ph.fontFamily]:Lh.fonts.font1.family,[Ph.fontWeight]:"400",[Ph.verticalPadding]:"0.25em",[Ph.horizontalPadding]:"0.5em",[Ph.borderWidth]:Lh.border.xs,[Ph.borderRadius]:Lh.radius.xs,[Ph.borderColor]:"transparent",[Ph.borderStyle]:"solid",_fullWidth:{[Ph.hostWidth]:"100%"},size:{xs:{[Ph.fontSize]:"12px"},sm:{[Ph.fontSize]:"14px"},md:{[Ph.fontSize]:"16px"},lg:{[Ph.fontSize]:"18px"}},variant:{contained:{[Ph.backgroundColor]:Lh.colors.surface.main}},_shrinkToIndicator:{[Ph.hostWidth]:"13px",[Ph.hostHeight]:"13px",[Ph.borderRadius]:"50%",[Ph.fontSize]:"0",[Ph.textIndent]:"-9999px"},mode:{default:{[Ph.textColor]:Lh.colors.surface.dark,_bordered:{[Ph.borderColor]:Lh.colors.surface.light}},primary:{[Ph.textColor]:Lh.colors.primary.main,_bordered:{[Ph.borderColor]:Lh.colors.primary.light}},secondary:{[Ph.textColor]:Lh.colors.secondary.main,_bordered:{[Ph.borderColor]:Lh.colors.secondary.light}},error:{[Ph.textColor]:Lh.colors.error.main,_bordered:{[Ph.borderColor]:Lh.colors.error.light}},success:{[Ph.textColor]:Lh.colors.success.main,_bordered:{[Ph.borderColor]:Lh.colors.success.light}}},shadow:{sm:{[Ph.boxShadow]:`${Lh.shadow.wide.sm} ${Dh}, ${Lh.shadow.narrow.sm} ${Dh}`},md:{[Ph.boxShadow]:`${Lh.shadow.wide.md} ${Dh}, ${Lh.shadow.narrow.md} ${Dh}`},lg:{[Ph.boxShadow]:`${Lh.shadow.wide.lg} ${Dh}, ${Lh.shadow.narrow.lg} ${Dh}`},xl:{[Ph.boxShadow]:`${Lh.shadow.wide.xl} ${Dh}, ${Lh.shadow.narrow.xl} ${Dh}`}}};var Fh=Object.freeze({__proto__:null,default:Bh,vars:Ph});const Rh=k("avatar");class Wh extends(ye({componentName:Rh,baseSelector:":host > .wrapper"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="wrapper">\n <vaadin-avatar></vaadin-avatar>\n <div class="editableBadge">\n <vaadin-icon icon="vaadin:pencil"></vaadin-icon>\n </div>\n </div>\n\t\t',V("\n :host {\n\t\t\t\t\tdisplay: inline-flex;\n\t\t\t\t}\n\n .editableBadge {\n border: 1px solid;\n border-radius: 100%;\n height: fit-content;\n width: 25%;\n height: 25%;\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 5%;\n box-sizing: border-box;\n position: absolute;\n bottom: 0;\n inset-inline-end: 0;\n }\n\n vaadin-icon {\n color: currentcolor;\n }\n\n vaadin-avatar {\n width: 100%;\n height: 100%;\n margin: 0;\n border: none\n }\n\n .wrapper {\n display: inline-flex;\n position: relative;\n width: 100%;\n height: 100%;\n }\n ",this),this.avatarComponent=this.shadowRoot.querySelector("vaadin-avatar"),L(this,this.avatarComponent,{includeAttrs:["display-name","img","abbr"],mapAttrs:{"display-name":"name"}});const e=this.shadowRoot.querySelector(".editableBadge");M(this,()=>{e.style.display=this.isEditable?"":"none"},{includeAttrs:["editable"]})}get isEditable(){return"true"===this.getAttribute("editable")}}const{host:Oh,editableBadge:jh,avatar:$h}={host:{selector:()=>":host"},editableBadge:{selector:"> .editableBadge"},avatar:{selector:"vaadin-avatar"}},_h=I(ce({mappings:{hostWidth:[{...Oh,property:"width"},{...Oh,property:"min-width"}],hostHeight:{...Oh,property:"height"},cursor:[$h,Oh],hostDirection:{...Oh,property:"direction"},avatarTextColor:{...$h,property:"color"},avatarBackgroundColor:{...$h,property:"background-color"},editableIconColor:{...jh,property:"color"},editableBorderColor:{...jh,property:"border-color"},editableBackgroundColor:{...jh,property:"background-color"}}}),pe,he)(Wh),Hh=te(eh),qh=_h.cssVarList,Yh={[qh.hostDirection]:Hh.direction,[qh.editableIconColor]:Hh.colors.surface.dark,[qh.editableBorderColor]:Hh.colors.surface.dark,[qh.editableBackgroundColor]:Hh.colors.surface.main,[qh.avatarTextColor]:Hh.colors.surface.main,[qh.avatarBackgroundColor]:Hh.colors.surface.dark,_editable:{[qh.cursor]:"pointer"},size:{xs:{[qh.hostWidth]:"30px",[qh.hostHeight]:"30px"},sm:{[qh.hostWidth]:"40px",[qh.hostHeight]:"40px"},md:{[qh.hostWidth]:"60px",[qh.hostHeight]:"60px"},lg:{[qh.hostWidth]:"98px",[qh.hostHeight]:"98px"},xl:{[qh.hostWidth]:"120px",[qh.hostHeight]:"120px"},"2xl":{[qh.hostWidth]:"140px",[qh.hostHeight]:"140px"}}},Uh={...qh};var Gh=Object.freeze({__proto__:null,default:Yh,vars:Uh});const Zh=Ei.cssVarList;var Qh=Object.freeze({__proto__:null,default:{},vars:Zh});const Jh=Mi.cssVarList;var Kh=Object.freeze({__proto__:null,default:{},vars:Jh});const Xh=k("apps-list"),eu=I(ce({mappings:{maxHeight:{selector:()=>":host"},minHeight:{selector:()=>":host"},hostDirection:{selector:()=>":host",property:"direction"},gap:{selector:hp.componentName,property:hp.cssVarList.gap},maxRowItems:{selector:hp.componentName,property:hp.cssVarList.maxRowItems},itemsFontWeight:{selector:ko.componentName,property:ko.cssVarList.fontWeightOverride},itemsFontSize:{selector:ko.componentName,property:ko.cssVarList.fontSizeOverride},itemsTextAlign:{selector:ko.componentName,property:ko.cssVarList.textAlign},itemBackgroundColor:{selector:dp.componentName,property:dp.cssVarList.backgroundColor},itemHoverBackgroundColor:{selector:`${dp.componentName}:hover`,property:dp.cssVarList.backgroundColor},backgroundColor:{selector:hp.componentName,property:hp.cssVarList.backgroundColorOverride},itemBorderStyle:{selector:dp.componentName,property:dp.cssVarList.borderStyleOverride},itemBorderColor:{selector:dp.componentName,property:dp.cssVarList.borderColorOverride},itemBorderWidth:{selector:dp.componentName,property:dp.cssVarList.borderWidthOverride},itemVerticalPadding:{selector:dp.componentName,property:dp.cssVarList.verticalPaddingOverride},itemHorizontalPadding:{selector:dp.componentName,property:dp.cssVarList.horizontalPaddingOverride},itemAlignment:[{selector:()=>".avatar-wrapper",property:"text-align"},{selector:ko.componentName,property:ko.cssVarList.textAlign}]}}),Be({itemRenderer:({name:e,icon:t,url:o},i,r)=>`\n <a ${o?`href="${o}" title="${o}"`:""} ${r.openInSameWindow?"":'target="_blank"'}>\n <descope-list-item>\n <div class="avatar-wrapper">\n <descope-avatar\n ${t?`img="${t}"`:""}\n ${e?`display-name="${e}" abbr=${P(e)}`:""}\n size="${r.logoSize||r.size}"\n ></descope-avatar>\n </div>\n <descope-text\n variant="${r.itemTextVariant}"\n mode="primary"\n >${e}</descope-text>\n </descope-list-item>\n </a>\n`,rerenderAttrsList:["size","item-text-variant","logo-size","open-in-same-window"]}),pe,he,e=>class extends e{get size(){return this.getAttribute("size")||"sm"}get itemTextVariant(){return this.getAttribute("item-text-variant")||"body1"}get logoSize(){return this.getAttribute("logo-size")}get openInSameWindow(){return"true"===this.getAttribute("open-in-same-window")}})(Ee({slots:["empty-state"],wrappedEleName:"descope-list",excludeAttrsSync:["tabindex","class","empty","style"],componentName:Xh,style:()=>`\n :host {\n width: 100%;\n display: inline-flex;\n }\n\n descope-text::part(text-wrapper) {\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n }\n\n descope-list-item[variant="tile"] .avatar-wrapper {\n width: 100%;\n }\n\n .avatar-wrapper {\n line-height: 0;\n }\n\n a {\n text-decoration: none;\n }\n\n descope-text {\n ${ko.cssVarList.hostDirection}: var(${eu.cssVarList.hostDirection});\n max-width: 100%;\n width: 100%;\n }\n `})),tu=eu.cssVarList,ou=te(eh),iu="400px",ru={[tu.itemsTextAlign]:"start",[tu.hostDirection]:ou.direction,[tu.maxHeight]:iu,[tu.itemHoverBackgroundColor]:ou.colors.surface.highlight,_empty:{[tu.minHeight]:iu},size:{xs:{[tu.itemsFontSize]:"14px",[tu.itemsFontWeight]:"normal"},sm:{[tu.itemsFontSize]:"14px",[tu.itemsFontWeight]:"normal"},md:{[tu.itemsFontSize]:"16px",[tu.itemsFontWeight]:"normal"},lg:{[tu.itemsFontSize]:"20px",[tu.itemsFontWeight]:"normal"}},itemPadding:{xs:{[tu.itemVerticalPadding]:ou.spacing.xs,[tu.itemHorizontalPadding]:ou.spacing.xs},sm:{[tu.itemVerticalPadding]:ou.spacing.sm,[tu.itemHorizontalPadding]:ou.spacing.sm},md:{[tu.itemVerticalPadding]:ou.spacing.md,[tu.itemHorizontalPadding]:ou.spacing.md},lg:{[tu.itemVerticalPadding]:ou.spacing.lg,[tu.itemHorizontalPadding]:ou.spacing.lg},xl:{[tu.itemVerticalPadding]:ou.spacing.xl,[tu.itemHorizontalPadding]:ou.spacing.xl}}};var nu=Object.freeze({__proto__:null,default:ru,vars:tu});const su=te(eh),au=hp.cssVarList,[lu,du,cu]=ie({shadowColor:"#00000020"},cp),{shadowColor:pu}=du,hu={...lu,[au.hostWidth]:"100%",[au.backgroundColor]:su.colors.surface.main,[au.fontFamily]:su.fonts.font1.family,[au.borderColor]:su.colors.surface.light,[au.borderStyle]:"solid",[au.borderWidth]:su.border.xs,[au.borderRadius]:su.radius.sm,[au.gap]:su.spacing.md,[au.verticalPadding]:su.spacing.lg,[au.horizontalPadding]:su.spacing.lg,[au.boxShadow]:`${su.shadow.wide.sm} ${pu}, ${su.shadow.narrow.sm} ${pu}`,[au.maxHeight]:"100%",[au.hostDirection]:su.direction,[au.minItemsWidth]:"150px",[au.maxRowItems]:"1000",_empty:{[au.minHeight]:"150px",[au.emptyStateTextColor]:su.colors.surface.dark,[au.emptyStateTextFontFamily]:su.fonts.font1.family},variant:{tiles:{[au.gridTemplateColumns]:`repeat(auto-fit, minmax(\n max(\n min(${oe(au.minItemsWidth)}, 100%),\n calc((100% - (${oe(au.maxRowItems)} - 1) * ${oe(au.gap)}) / ${oe(au.maxRowItems)})),\n 1fr))`,[au.maxItemsWidth]:"200px",[au.itemsHorizontalAlign]:"center"}},gap:{xs:{[au.gap]:su.spacing.xs},sm:{[au.gap]:su.spacing.sm},md:{[au.gap]:su.spacing.md},lg:{[au.gap]:su.spacing.lg},xl:{[au.gap]:su.spacing.xl}}},uu={...au,...cu};var gu=Object.freeze({__proto__:null,default:hu,vars:uu});const mu=te(eh),bu=dp.cssVarList,yu={[bu.backgroundColor]:mu.colors.surface.main,[bu.verticalPadding]:mu.spacing.lg,[bu.horizontalPadding]:mu.spacing.lg,[bu.gap]:mu.spacing.md,[bu.borderStyle]:"solid",[bu.borderWidth]:mu.border.xs,[bu.borderColor]:mu.colors.surface.main,[bu.borderRadius]:mu.radius.sm,[bu.cursor]:"pointer",[bu.alignItems]:"center",[bu.flexDirection]:"row",[bu.transition]:"border-color 0.2s, background-color 0.2s",variant:{tile:{[bu.alignItems]:"flex-start",[bu.flexDirection]:"column",[bu.borderColor]:mu.colors.surface.light}},_hover:{[bu.backgroundColor]:mu.colors.surface.highlight},_active:{[bu.backgroundColor]:mu.colors.surface.main,[bu.borderColor]:mu.colors.primary.light,[bu.outline]:`1px solid ${mu.colors.primary.light}`}};var fu=Object.freeze({__proto__:null,default:yu,vars:bu});const vu=k("multi-select-combo-box"),{host:xu,inputField:Cu,inputElement:wu,placeholder:Iu,toggle:Su,clearButton:Mu,label:Au,requiredIndicator:Eu,helperText:Tu,errorMessage:ku,chip:zu,chipLabel:Lu,overflowChipFirstBorder:Vu,overflowChipSecondBorder:Nu}={host:{selector:()=>":host"},inputField:{selector:"::part(input-field)"},inputElement:{selector:"input"},placeholder:{selector:"> input:placeholder-shown"},toggle:{selector:"::part(toggle-button)"},clearButton:{selector:"::part(clear-button)"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},chip:{selector:"vaadin-multi-select-combo-box-chip"},chipLabel:{selector:"vaadin-multi-select-combo-box-chip::part(label)"},overflowChipFirstBorder:{selector:"vaadin-multi-select-combo-box-chip[slot='overflow']::before"},overflowChipSecondBorder:{selector:"vaadin-multi-select-combo-box-chip[slot='overflow']::after"}},Du=I(ce({mappings:{hostWidth:{...xu,property:"width"},hostDirection:{...xu,property:"direction"},fontSize:[{},xu],chipFontSize:{...Lu,property:"font-size"},fontFamily:[Au,Iu,Cu,Tu,ku,Lu],labelFontSize:{...Au,property:"font-size"},labelFontWeight:{...Au,property:"font-weight"},inputValueFontWeight:{...Cu,property:"font-weight"},inputPlaceholderFontWeight:{...Iu,property:"font-weight"},helperTextFontWeight:{...Tu,property:"font-weight"},errorMessageFontWeight:{...ku,property:"font-weight"},labelTextColor:[{...Au,property:"color"},{...Eu,property:"color"}],errorMessageTextColor:{...ku,property:"color"},errorMessageIcon:{...ku,property:"background-image"},errorMessageIconSize:{...ku,property:"background-size"},errorMessageIconPadding:{...ku,property:"padding-inline-start"},errorMessageIconRepeat:{...ku,property:"background-repeat"},errorMessageIconPosition:{...ku,property:"background-position"},errorMessageFontSize:{...ku,property:"font-size"},inputHeight:{...Cu,property:"min-height"},inputBackgroundColor:{...Cu,property:"background-color"},inputBorderColor:{...Cu,property:"border-color"},inputBorderWidth:{...Cu,property:"border-width"},inputBorderStyle:{...Cu,property:"border-style"},inputBorderRadius:{...Cu,property:"border-radius"},labelRequiredIndicator:{...Eu,property:"content"},inputValueTextColor:{...Cu,property:"color"},inputPlaceholderTextColor:{...Iu,property:"color"},inputDropdownButtonCursor:[{...Su,property:"cursor"},{...Mu,property:"cursor"}],inputDropdownButtonColor:[{...Su,property:"color"},{...Mu,property:"color"}],inputDropdownButtonSize:[{...Su,property:"font-size"},{...Mu,property:"font-size"}],inputDropdownButtonOffset:[{...Su,property:"margin-right"},{...Su,property:"margin-left"}],inputOutlineColor:{...Cu,property:"outline-color"},inputOutlineWidth:{...Cu,property:"outline-width"},inputOutlineStyle:{...Cu,property:"outline-style"},inputOutlineOffset:{...Cu,property:"outline-offset"},inputHorizontalPadding:[{...wu,property:"padding-left"},{...wu,property:"padding-right"},{...Cu,property:"padding-inline-start"}],inputVerticalPadding:[{...Cu,property:"padding-top"},{...Cu,property:"padding-bottom"}],chipTextColor:{...Lu,property:"color"},chipBackgroundColor:[{...zu,property:"background-color"},{...Vu,property:"border-color"},{...Nu,property:"border-color"}],labelPosition:{...Au,property:"position"},labelTopPosition:{...Au,property:"top"},labelLeftPosition:{...Au,property:"left"},labelHorizontalPosition:[{...Au,property:"left"},{...Au,property:"right"}],inputTransformY:{...Au,property:"transform"},inputTransition:{...Au,property:"transition"},marginInlineStart:{...Au,property:"margin-inline-start"},placeholderOpacity:{...Iu,property:"opacity"},inputVerticalAlignment:{...Cu,property:"align-items"},overlayBackground:{property:()=>Du.cssVarList.overlay.backgroundColor},overlayTextColor:{property:()=>Du.cssVarList.overlay.textColor},overlayBorder:{property:()=>Du.cssVarList.overlay.border},overlayFontSize:{property:()=>Du.cssVarList.overlay.fontSize},overlayFontFamily:{property:()=>Du.cssVarList.overlay.fontFamily},overlayCursor:{property:()=>Du.cssVarList.overlay.cursor},overlayItemBoxShadow:{property:()=>Du.cssVarList.overlay.itemBoxShadow},overlayItemPaddingInlineStart:{property:()=>Du.cssVarList.overlay.itemPaddingInlineStart},overlayItemPaddingInlineEnd:{property:()=>Du.cssVarList.overlay.itemPaddingInlineEnd}}}),pe,Ne({name:"overlay",selector:"vaadin-multi-select-combo-box-internal",mappings:{backgroundColor:{selector:"vaadin-multi-select-combo-box-scroller"},minHeight:{selector:"vaadin-multi-select-combo-box-overlay"},margin:{selector:"vaadin-multi-select-combo-box-overlay"},cursor:{selector:"vaadin-multi-select-combo-box-item"},fontFamily:{selector:"vaadin-multi-select-combo-box-item"},textColor:{selector:"vaadin-multi-select-combo-box-item",property:"color"},fontSize:{selector:"vaadin-multi-select-combo-box-item"},itemBoxShadow:{selector:"vaadin-multi-select-combo-box-item",property:"box-shadow"},itemPaddingInlineStart:{selector:"vaadin-multi-select-combo-box-item",property:"padding-inline-start"},itemPaddingInlineEnd:{selector:"vaadin-multi-select-combo-box-item",property:"padding-inline-end"}},forward:{include:!1,attributes:["size"]}}),Le({proxyProps:["selectionStart"],inputEvent:"selected-items-changed"}),ve,he,e=>class extends e{static get observedAttributes(){return["readonly"]}#K=({displayName:e,value:t,label:o})=>{const i=document.createElement("span");return i.setAttribute("data-name",o),i.setAttribute("data-id",t),i.textContent=e||o,i.outerHTML};#F;#mt=[];get defaultValues(){const e=this.getAttribute("default-values");if(e)try{const t=JSON.parse(e);if(this.isValidDataType(t))return t}catch(e){console.error('could not parse data string from attribute "default-values" -',e.message)}return[]}get renderItem(){return this.#K}set renderItem(e){this.#K=e,this.renderItems()}get data(){if(this.#F)return this.#F;const e=this.getAttribute("data");if(e)try{const t=JSON.parse(e);if(this.isValidDataType(t))return t}catch(e){console.error('could not parse data string from attribute "data" -',e.message)}return[]}set data(e){this.isValidDataType(e)&&(this.#F=e,this.renderItems())}get allowCustomValues(){return"true"===this.getAttribute("allow-custom-value")}get minItemsSelection(){return parseInt(this.getAttribute("min-items-selection"),10)||0}get maxItemsSelection(){return parseInt(this.getAttribute("max-items-selection"),10)||0}isValidDataType(e){const t=Array.isArray(e);return t||console.error("data and default-values must be an array, received:",e),t}getItemsTemplate(){return this.data?.reduce?.((e,t)=>e+(this.renderItem?.(t||{})||""),"")}renderItems(){const e=this.getItemsTemplate();e&&(this.innerHTML=e)}updateSelectedItems(){const e=this.baseElement.selectedItems?.map(e=>e.getAttribute("data-id"))||[];e.length>0&&(this.value=e),0===this.value.length&&this.setDefaultValues()}customValueTransformFn(e){return e}setComboBoxDescriptor(){const e=Object.getOwnPropertyDescriptor(this.inputElement.constructor.prototype,"value"),t=this;Object.defineProperties(this.inputElement,{value:{...e,set(o){const i=t.customValueTransformFn(o)||"";i!==this.value&&e.set.call(this,i)}}})}#bt(e){return Array.from(new Map(e.map(e=>[e.getAttribute("data-id"),e])).values())}#X(){const e=Array.from(this.children),t=this.#bt(e);e.length?(this.removeAttribute("has-no-options"),t.forEach(e=>{Object.defineProperty(e,"data-name",{value:e.getAttribute("data-name"),configurable:!0,writable:!0}),Object.defineProperty(e,"data-id",{value:e.getAttribute("data-id"),configurable:!0,writable:!0})}),this.baseElement.items=t,setTimeout(()=>{this.updateSelectedItems()},0)):(this.baseElement.items=[],this.setAttribute("has-no-options","")),this.baseElement.renderer=(e,t,o)=>{e.innerHTML=o.item.outerHTML}}#ee(){const e=this.baseElement.shadowRoot.querySelector("vaadin-multi-select-combo-box-internal").shadowRoot.querySelector("vaadin-multi-select-combo-box-overlay");e._attachOverlay=()=>{e.bringToFront()},e._detachOverlay=()=>{},e._enterModalState=()=>{}}#yt(){this.allowCustomValues&&this.baseElement.addEventListener("custom-value-set",e=>{const t=this.#K({label:e.detail,displayName:e.detail,value:e.detail});this.innerHTML+=t,this.baseElement._lastFilter="",setTimeout(()=>{this.value=[...this.value,e.detail]},0)})}setGetValidity(){this.getValidity=function(){if(this.pattern){const e=new RegExp(this.pattern);if(this.value.some(t=>!e.test(t)))return{patternMismatch:!0}}return this.isRequired&&!this.value.length?{valueMissing:!0}:this.isRequired&&this.minItemsSelection&&this.value.length<this.minItemsSelection?{rangeUnderflow:!0}:this.maxItemsSelection&&this.value.length>this.maxItemsSelection?{rangeOverflow:!0}:{}};const e=this;this.baseElement.checkValidity=()=>e.validity.valid}init(){super.init?.(),this.setGetValidity(),this.#yt(),this.renderItems(),M(this,this.renderItems.bind(this),{includeAttrs:["data"]}),A(this,this.#X.bind(this)),L(this,this.baseElement,{includeAttrs:["placeholder"]}),setTimeout(()=>{this.setComboBoxDescriptor(),this.#ee()}),this.setDefaultValues(),this.baseElement.addEventListener("selected-items-changed",()=>{this.#ft(),this.dispatchEvent(new CustomEvent("input",{bubbles:!0}))})}setDefaultValues(){this.defaultValues.length>0&&(this.value=this.defaultValues)}#ft(){this.#mt=this.baseElement.selectedItems?.map(e=>e.getAttribute("data-id"))||[]}set value(e){if(e&&e.length>0){const t=this.baseElement.items?.filter(t=>e.includes(t["data-id"]));if(this.allowCustomValues){const o=t?.map(e=>e.getAttribute("data-id"))||[],i=e.filter(e=>!o.includes(e));if(i.length){const t=i.reduce((e,t)=>e+this.#K({label:t,displayName:t,value:t}),"");return this.innerHTML+=t,void setTimeout(()=>{this.value=e},0)}}const o=t?.map(e=>e.getAttribute("data-id"))||[];((e,t)=>{if(!Array.isArray(e)||!Array.isArray(t))return!1;if(e.length!==t.length)return!1;const o=e.slice().sort(),i=t.slice().sort();for(let e=0;e<o.length;e++)if(o[e]!==i[e])return!1;return!0})(this.#mt,o)||(this.baseElement.selectedItems=t)}else this.baseElement.selectedItems=[]}get value(){return this.#mt}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),"readonly"===e&&this.onReadOnlyChange(null!==o&&"true"===o)}onReadOnlyChange(e){e?this.baseElement?.shadowRoot?.querySelector("vaadin-multi-select-combo-box-internal")?.setAttribute("inert",e):this.baseElement?.shadowRoot?.querySelector("vaadin-multi-select-combo-box-internal")?.removeAttribute("inert")}})(Ee({slots:["","prefix"],wrappedEleName:"vaadin-multi-select-combo-box",style:()=>`\n\t\t:host {\n\t\t\tdisplay: inline-flex;\n\t\t\tbox-sizing: border-box;\n\t\t\t-webkit-mask-image: none;\n\t\t}\n\t\t${U(Du.cssVarList)}\n\t\t${Q("vaadin-multi-select-combo-box")}\n\t\t${Z("vaadin-multi-select-combo-box")}\n\t\t${G("vaadin-multi-select-combo-box")}\n\n\t\tvaadin-multi-select-combo-box {\n\t\t\tpadding: 0;\n\t\t\twidth: 100%;\n\t\t}\n\t\tvaadin-multi-select-combo-box::before {\n\t\t\theight: initial;\n\t\t}\n\t\tvaadin-multi-select-combo-box [slot="input"] {\n\t\t\t-webkit-mask-image: none;\n\t\t\tmin-height: 0;\n align-self: center;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\tvaadin-multi-select-combo-box[readonly] [slot="input"] {\n flex-grow: 1;\n flex-basis: 4em;\n\t\t}\n\n\t\t::part(input-field) {\n padding: 0;\n\t\t\tbox-shadow: none;\n\t\t}\n ${J("vaadin-multi-select-combo-box")}\n :host([has-label]) vaadin-multi-select-combo-box-chip::part(label) {\n display: block;\n }\n\n vaadin-multi-select-combo-box vaadin-multi-select-combo-box-chip[slot='overflow']::before,\n vaadin-multi-select-combo-box vaadin-multi-select-combo-box-chip[slot='overflow']::after {\n left: -4px;\n right: -4px;\n border-left-width: 0;\n border-inline-start-style: solid;\n border-inline-start-width: 2px;\n }\n vaadin-multi-select-combo-box vaadin-multi-select-combo-box-chip[slot='overflow']::after {\n left: -8px;\n right: -8px;\n }\n\n :host([has-no-options][allow-custom-value='true']) ::part(toggle-button) {\n display: none;\n }\n\n \n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n \n\n vaadin-multi-select-combo-box::part(toggle-button),\n vaadin-multi-select-combo-box::part(clear-button) {\n align-self: center;\n }\n\n vaadin-multi-select-combo-box[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-multi-select-combo-box[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n\n\t\t`,excludeAttrsSync:["tabindex","size","data","placeholder","style"],componentName:vu,includeForwardProps:["items","renderer","selectedItems"]})),Pu=k("multi-line-mappings"),Bu=ye({componentName:Pu}),Fu=e=>null==e?"":String("object"==typeof e?e.value??e.id??e.label??"":e),Ru=e=>[...new Set(e.map(Fu).filter(Boolean))],Wu=e=>{const t=Fu(e);return"object"==typeof e&&null!==e?{...e,value:t,label:String(e.label??e.displayName??t)}:{value:t,label:t}},Ou=e=>{if(!Array.isArray(e))return[];const t=new Set;return e.map(Wu).filter(e=>!(!e.value||t.has(e.value)||(t.add(e.value),0)))},ju=(e=[],t=[])=>e.length===t.length&&e.every((e,o)=>e===t[o]),$u={selector:()=>":host"},_u={selector:".row"},Hu={selector:".add-action"},qu=I(ce({mappings:{hostWidth:{...$u,property:"width"},hostDirection:[{...$u,property:"direction"},{selector:Du.componentName,property:Du.cssVarList.hostDirection},{selector:Ni.componentName,property:Ni.cssVarList.hostDirection}],rowsGap:{selector:".rows",property:"gap"},rowGap:{..._u,property:"gap"},rowAlignItems:{..._u,property:"align-items"},rowWrap:{..._u,property:"flex-wrap"},addActionJustifyContent:{...Hu,property:"justify-content"},addActionMarginTop:{...Hu,property:"margin-top"}}}),pe)(class extends Bu{static get observedAttributes(){return["data","max-rows","size","disabled","readonly","first-value-key","second-value-key","first-label","second-label","first-placeholder","second-placeholder","full-width","merge-rows"]}#vt=[{firstValues:[],secondValues:[]}];#xt=null;#Ct=[];#wt={};constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="wrapper">\n <div class="rows"></div>\n <div class="add-action">\n <descope-button\n class="add-button"\n variant="link"\n mode="primary"\n >\n <slot name="add-button-content">Add line</slot>\n </descope-button>\n </div>\n </div>\n ',V("\n :host {\n display: inline-flex;\n box-sizing: border-box;\n max-width: 100%;\n }\n\n .wrapper {\n display: flex;\n flex-direction: column;\n width: 100%;\n }\n\n .rows {\n display: flex;\n flex-direction: column;\n width: 100%;\n }\n\n .rows > .row {\n display: flex;\n width: 100%;\n min-width: 0;\n box-sizing: border-box;\n align-items: flex-end;\n }\n\n .row descope-multi-select-combo-box {\n flex: 1 1 0;\n box-sizing: border-box;\n }\n\n .row .remove-button {\n flex: 0 0 auto;\n align-self: flex-end;\n }\n\n .row:only-child .remove-button {\n display: none;\n pointer-events: none;\n }\n\n .add-action {\n display: flex;\n }\n ",this),this.rowsElement=this.shadowRoot.querySelector(".rows"),this.addButtonElement=this.shadowRoot.querySelector(".add-button")}get size(){return this.getAttribute("size")||"md"}get firstValueKey(){return this.getAttribute("first-value-key")||"firstValues"}get secondValueKey(){return this.getAttribute("second-value-key")||"secondValues"}get firstLabel(){return this.getAttribute("first-label")||""}get secondLabel(){return this.getAttribute("second-label")||""}get firstPlaceholder(){return this.getAttribute("first-placeholder")||""}get secondPlaceholder(){return this.getAttribute("second-placeholder")||""}get disabled(){return"true"===this.getAttribute("disabled")}get readonly(){return"true"===this.getAttribute("readonly")}get mergeRows(){return"true"===this.getAttribute("merge-rows")}get maxRows(){const e=Number(this.getAttribute("max-rows"));return Number.isFinite(e)&&e>0?e:void 0}get data(){return this.#wt}get value(){return this.#vt.filter(e=>e.firstValues.length>0||e.secondValues.length>0).flatMap(e=>(e.firstValues.length?e.firstValues:[""]).map(t=>({[this.firstValueKey]:t,[this.secondValueKey]:[...e.secondValues]})))}set value(e){this.#xt=e,this.#vt=this.#It(e),this.#St(),this.#Mt()}#At(e){const t=((e,t,o="unknown")=>{if("string"!=typeof e||!e?.trim())return t;try{return JSON.parse(e)}catch(e){return console.error(`[descope-multi-line-mappings] Failed to parse JSON from "${o}"`,e),t}})(e,{},"data attribute"),o=t&&"object"==typeof t&&!Array.isArray(t)?t:{};this.#Ct=Object.entries(o).map(([e,t])=>{const o=String(e),i=null!=t&&"object"==typeof t&&!Array.isArray(t),r=i?t.options??[]:t;return{value:o,label:i&&null!=t.label?String(t.label):o,options:Ou(r)}}),this.#wt=Object.fromEntries(this.#Ct.map(({value:e,options:t})=>[e,t]))}init(){super.init?.(),this.#Et(),this.addButtonElement.addEventListener("click",()=>this.#Tt()),this.#Mt()}attributeChangedCallback(e,t,o){if(super.attributeChangedCallback?.(e,t,o),t!==o){if("data"===e)return this.#At(o),this.#St(),void this.#Mt();if("size"===e)return[...this.#kt(),...this.#zt()].forEach(e=>e.setAttribute("size",this.size)),this.#Et(),void this.#Lt();if(["disabled","readonly"].includes(e))return this.#kt().forEach(e=>{e[this.disabled?"setAttribute":"removeAttribute"]("disabled","true"),e[this.readonly?"setAttribute":"removeAttribute"]("readonly","true")}),this.#zt().forEach(e=>e[this.disabled||this.readonly?"setAttribute":"removeAttribute"]("disabled","true")),void this.#Lt();if(["first-label","second-label"].includes(e)){const t="first-label"===e?"first":"second";return void Array.from(this.rowsElement.children).forEach(e=>{const i=e.querySelector(`.${t}-combo`);o?i?.setAttribute("label",o):i?.removeAttribute("label")})}if(["first-placeholder","second-placeholder"].includes(e)){const t="first-placeholder"===e?"first":"second";return void Array.from(this.rowsElement.children).forEach(e=>{const i=e.querySelector(`.${t}-combo`);o?i?.setAttribute("placeholder",o):i?.removeAttribute("placeholder")})}"max-rows"===e&&this.#Lt(),"merge-rows"===e&&null!==this.#xt&&(this.#vt=this.#It(this.#xt),this.#St(),this.#Mt())}}#kt(){return Array.from(this.rowsElement.querySelectorAll("descope-multi-select-combo-box"))}#zt(){return Array.from(this.rowsElement.querySelectorAll(".remove-button"))}#Tt(){if(this.disabled||this.readonly||this.#Vt())return;const e={firstValues:[],secondValues:[]};this.#vt=[...this.#vt,e],this.rowsElement.append(this.#Nt(e)),this.#Lt()}#It(e){if(!Array.isArray(e)||!e.length)return[{firstValues:[],secondValues:[]}];let t=e.map(e=>{const t=e?.[this.firstValueKey];return{firstValues:null!=t&&""!==String(t)?[String(t)]:[],secondValues:Ru(e?.[this.secondValueKey]??[])}});if(this.mergeRows){const e=new Map;for(const o of t){const t=[...o.secondValues].sort().join("\0");e.has(t)?e.get(t).firstValues.push(...o.firstValues):e.set(t,{firstValues:[...o.firstValues],secondValues:o.secondValues})}t=[...e.values()]}return t}#St(){const e=new Set(this.#Ct.map(e=>e.value));this.#vt=this.#vt.map(t=>{const o=t.firstValues.filter(t=>e.has(t)),i=this.#Dt(o),r=new Set(i.map(e=>e.value));return{firstValues:o,secondValues:t.secondValues.filter(e=>r.has(e))}})}#Dt(e){const t=e.length?e.map(e=>this.#wt[e]||[]).filter(e=>e.length):Object.values(this.#wt).filter(e=>e.length);if(!t.length||e.length&&t.length!==e.length)return[];if(1===t.length)return t[0];const[o,...i]=t,r=new Set(o.map(e=>e.value));for(const e of i){const t=new Set(e.map(e=>e.value));for(const e of r)t.has(e)||r.delete(e)}return o.filter(e=>r.has(e.value))}#Pt({getRowIndex:e,type:t,label:o,placeholder:i,options:r,selectedValues:n}){const s=document.createElement("descope-multi-select-combo-box");return s.className=`combo ${t}-combo`,s.setAttribute("size",this.size),s.setAttribute("bordered","true"),s.setAttribute("item-label-path","data-name"),s.setAttribute("item-value-path","data-id"),o&&s.setAttribute("label",o),i&&s.setAttribute("placeholder",i),this.disabled&&s.setAttribute("disabled","true"),this.readonly&&s.setAttribute("readonly","true"),s.data=r,this.#Bt(s,n),s.addEventListener("input",()=>{if(s.__descopeSyncingSelection)return;const o=e();-1!==o&&this.#Ft({rowIndex:o,type:t,selectedValues:Ru(s.value||[])})}),s}#Bt(e,t){e.__descopeSyncingSelection=!0,Promise.resolve().then(()=>{const o=new Set(t||[]);e.selectedItems=(e.items||[]).filter(e=>o.has(e["data-id"]||e.getAttribute?.("data-id"))),e.__descopeSyncingSelection=!1})}#Rt(e){const t=document.createElement("descope-button");return t.className="remove-button",t.setAttribute("variant","link"),t.setAttribute("mode","primary"),t.setAttribute("size",this.size),t.setAttribute("aria-label","Remove row"),t.innerHTML='<vaadin-icon icon="vaadin:minus"></vaadin-icon>',(this.disabled||this.readonly)&&t.setAttribute("disabled","true"),t.addEventListener("click",()=>{const t=e();-1!==t&&this.#Wt(t)}),t}#Mt(){this.rowsElement.innerHTML="",this.#vt.forEach(e=>{this.rowsElement.append(this.#Nt(e))}),this.#Lt()}#Nt(e){const t=document.createElement("div");t.className="row";const o=()=>Array.from(this.rowsElement.children).indexOf(t),i=this.#Pt({getRowIndex:o,type:"first",label:this.firstLabel,placeholder:this.firstPlaceholder,options:this.#Ct.map(({value:e,label:t})=>({value:e,label:t})),selectedValues:e.firstValues}),r=this.#Dt(e.firstValues),n=this.#Pt({getRowIndex:o,type:"second",label:this.secondLabel,placeholder:this.secondPlaceholder,options:r,selectedValues:e.secondValues});return t.append(i,n,this.#Rt(o)),t}#Ot(e){const t=this.#vt[e];if(!t)return;const o=this.rowsElement.children[e],i=o?.querySelector(".second-combo");if(!i)return void this.#Mt();const r=this.#Dt(t.firstValues);i.data=r,this.#Bt(i,t.secondValues)}#Et(){this.addButtonElement.setAttribute("size",this.size)}#Lt(){this.disabled||this.readonly||this.#Vt()?this.addButtonElement.setAttribute("disabled","true"):this.addButtonElement.removeAttribute("disabled")}#Vt(){return Number.isFinite(this.maxRows)&&this.#vt.length>=this.maxRows}#jt(e){this.rowsElement.children[e]?.remove()}#Ft({rowIndex:e,type:t,selectedValues:o}){if(this.disabled||this.readonly)return;const i=this.#vt[e];if(i){if("first"===t){const t=this.#Dt(o),r=new Set(t.map(e=>e.value)),n=i.secondValues.filter(e=>r.has(e));if(ju(i.firstValues,o)&&ju(i.secondValues,n))return;return this.#vt[e]={firstValues:o,secondValues:n},this.#Ot(e),void this.#$t()}ju(i.secondValues,o)||(this.#vt[e]={...i,secondValues:o},this.#$t())}}#Wt(e){if(this.disabled||this.readonly||this.#vt.length<=1)return;const t=this.#vt[e];this.#vt=this.#vt.filter((t,o)=>o!==e),this.#jt(e),this.#Lt(),(t.firstValues.length>0||t.secondValues.length>0)&&this.#$t()}#$t(){this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))}}),Yu=qu.cssVarList,Uu={[Yu.hostDirection]:Ah.direction,[Yu.rowsGap]:eh.spacing.sm,[Yu.rowGap]:eh.spacing.sm,[Yu.rowAlignItems]:"flex-end",[Yu.rowWrap]:"nowrap",[Yu.addActionJustifyContent]:"flex-start",[Yu.addActionMarginTop]:eh.spacing.xs,_fullWidth:{[Yu.hostWidth]:"100%"}};var Gu=Object.freeze({__proto__:null,default:Uu,vars:Yu});const Zu=te(eh),Qu=Du.cssVarList,Ju={[Qu.hostWidth]:Ah.width,[Qu.hostDirection]:Ah.direction,[Qu.fontSize]:Ah.fontSize,[Qu.fontFamily]:Ah.fontFamily,[Qu.labelFontSize]:Ah.labelFontSize,[Qu.labelFontWeight]:Ah.labelFontWeight,[Qu.inputValueFontWeight]:Ah.inputValueFontWeight,[Qu.inputPlaceholderFontWeight]:Ah.inputPlaceholderFontWeight,[Qu.helperTextFontWeight]:Ah.helperTextFontWeight,[Qu.errorMessageFontWeight]:Ah.errorMessageFontWeight,[Qu.labelTextColor]:Ah.labelTextColor,[Qu.errorMessageTextColor]:Ah.errorMessageTextColor,[Qu.inputBorderColor]:Ah.borderColor,[Qu.inputBorderWidth]:Ah.borderWidth,[Qu.inputBorderStyle]:Ah.borderStyle,[Qu.inputBorderRadius]:Ah.borderRadius,[Qu.inputOutlineColor]:Ah.outlineColor,[Qu.inputOutlineOffset]:Ah.outlineOffset,[Qu.inputOutlineWidth]:Ah.outlineWidth,[Qu.inputOutlineStyle]:Ah.outlineStyle,[Qu.labelRequiredIndicator]:Ah.requiredIndicator,[Qu.inputValueTextColor]:Ah.valueTextColor,[Qu.inputPlaceholderTextColor]:Ah.placeholderTextColor,[Qu.inputBackgroundColor]:Ah.backgroundColor,[Qu.inputHorizontalPadding]:Ah.horizontalPadding,[Qu.inputVerticalPadding]:Ah.verticalPadding,[Qu.inputHeight]:Ah.inputHeight,[Qu.inputDropdownButtonColor]:Zu.colors.surface.dark,[Qu.inputDropdownButtonCursor]:"pointer",[Qu.inputDropdownButtonSize]:Ah.toggleButtonSize,[Qu.inputDropdownButtonOffset]:Zu.spacing.xs,[Qu.overlayItemPaddingInlineStart]:Zu.spacing.xs,[Qu.overlayItemPaddingInlineEnd]:Zu.spacing.lg,[Qu.chipFontSize]:Ah.chipFontSize,[Qu.chipTextColor]:Zu.colors.surface.contrast,[Qu.chipBackgroundColor]:Zu.colors.surface.light,[Qu.labelPosition]:Ah.labelPosition,[Qu.labelTopPosition]:Ah.labelTopPosition,[Qu.labelLeftPosition]:Ah.labelLeftPosition,[Qu.labelHorizontalPosition]:Ah.labelHorizontalPosition,[Qu.inputTransformY]:Ah.inputTransformY,[Qu.inputTransition]:Ah.inputTransition,[Qu.marginInlineStart]:Ah.marginInlineStart,[Qu.placeholderOpacity]:Ah.placeholderOpacity,[Qu.inputVerticalAlignment]:Ah.inputVerticalAlignment,[Qu.errorMessageIcon]:Ah.errorMessageIcon,[Qu.errorMessageIconSize]:Ah.errorMessageIconSize,[Qu.errorMessageIconPadding]:Ah.errorMessageIconPadding,[Qu.errorMessageIconRepeat]:Ah.errorMessageIconRepeat,[Qu.errorMessageIconPosition]:Ah.errorMessageIconPosition,[Qu.errorMessageFontSize]:Ah.errorMessageFontSize,labelType:{floating:{[Qu.inputHorizontalPadding]:"0.25em",_hasValue:{[Qu.inputHorizontalPadding]:"0.45em"}}},_readonly:{[Qu.inputDropdownButtonCursor]:"default"},[Qu.overlayFontSize]:Ah.fontSize,[Qu.overlayFontFamily]:Ah.fontFamily,[Qu.overlayCursor]:"pointer",[Qu.overlayItemBoxShadow]:"none",[Qu.overlayBackground]:Ah.backgroundColor,[Qu.overlayTextColor]:Ah.valueTextColor,[Qu.overlay.minHeight]:"400px",[Qu.overlay.margin]:"0"};var Ku=Object.freeze({__proto__:null,default:Ju,multiSelectComboBox:Ju,vars:Qu});const Xu=k("autocomplete-field-internal"),eg=Se({componentName:Xu,baseSelector:""}),tg=[],og="DESCOPE_INVALID_OPTION",ig=k("autocomplete-field"),{host:rg}={host:{selector:()=>":host"}},ng=I(ce({componentNameOverride:k("input-wrapper")}),ce({mappings:{hostWidth:{...rg,property:"width"},hostDirection:{...rg,property:"direction"},fontSize:{...rg},checkmarkDisplay:{selector:xi.componentName,property:xi.cssVarList.overlayCheckmarkDisplay},itemPaddingInlineStart:{selector:xi.componentName,property:xi.cssVarList.overlayItemPaddingInlineStart},itemPaddingInlineEnd:{selector:xi.componentName,property:xi.cssVarList.overlayItemPaddingInlineEnd},selectedItemBackground:{selector:xi.componentName,property:xi.cssVarList.overlaySelectedItemBackground},selectedItemHoverBackground:{selector:xi.componentName,property:xi.cssVarList.overlaySelectedItemHoverBackground},selectedItemFocusBackground:{selector:xi.componentName,property:xi.cssVarList.overlaySelectedItemFocusBackground},itemHoverBackground:{selector:xi.componentName,property:xi.cssVarList.overlayItemHoverBackground}}}),pe,Le({proxyProps:["value","selectionStart"],inputEvent:"input",proxyParentValidation:!0}),he,e=>class extends e{get defaultValue(){return this.getAttribute("default-value")}setDefaultValue(){this.defaultValue&&setTimeout(()=>{this.inputElement.value=this.defaultValue})}init(){super.init?.();const e=document.createElement("template");e.innerHTML=`\n <${Xu}\n tabindex="-1"\n ></${Xu}>\n `,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(Xu),L(this,this.inputElement,{includeAttrs:["size","bordered","label","required","label-type","placeholder","full-width","allow-custom-value","min-search-length","no-results-message","error-fetching-results-message","data-errormessage-value-missing","invalid","error-message","readonly","disabled","st-host-direction","st-error-message-icon","st-error-message-icon-size","st-error-message-icon-padding"]}),T(this,this.inputElement,{includeAttrs:["invalid"]}),this.inputElement.fetchResults=this.fetchResults,this.setDefaultValue()}set fetchResults(e){this.inputElement.fetchResults=e}})(Ee({slots:[],wrappedEleName:"vaadin-custom-field",style:()=>"\n :host {\n display: inline-flex;\n max-width: 100%;\n direction: ltr;\n }\n vaadin-custom-field {\n line-height: unset;\n width: 100%;\n }\n\n descope-autocomplete-field-internal {\n display: inline-block;\n box-sizing: border-box;\n user-select: none;\n width: 100%;\n max-width: 100%;\n }\n\n descope-autocomplete-field-internal ::slotted {\n padding: 0;\n }\n ",excludeAttrsSync:["tabindex","error-message","label","style"],componentName:ig})),sg=ng.cssVarList,ag=te(eh),lg={[sg.hostWidth]:Ah.width,[sg.hostDirection]:Ah.direction,[sg.fontSize]:Ah.fontSize,[sg.checkmarkDisplay]:"none",[sg.itemPaddingInlineStart]:ag.spacing.lg,[sg.itemPaddingInlineEnd]:ag.spacing.lg,[sg.selectedItemBackground]:ag.colors.primary.light,[sg.selectedItemHoverBackground]:ag.colors.primary.light,[sg.selectedItemFocusBackground]:ag.colors.primary.light,[sg.itemHoverBackground]:ag.colors.primary.highlight,_fullWidth:{[sg.hostWidth]:"100%"}};var dg=Object.freeze({__proto__:null,default:lg,vars:sg});class cg extends(Ae()){#_t=null;#Ht=null;constructor(e){super(e),this.#Ht=this.#qt()}getRequiredParams(){return["public-api-key"]}getOptionalParams(){return[{key:"includedPrimaryTypes",attribute:"address-types"},{key:"language",attribute:"address-language"},{key:"region",attribute:"address-region"}]}async#qt(){const e=this.getAttribute("public-api-key");if(!this.#_t&&e)try{(e=>{var t,o,i,r,n,s,a,l,d,c,p,h,u;window.google?.maps||(t={key:e},n="The Google Maps JavaScript API",s="google",a="importLibrary",l="__ib__",d=document,c=window,p=(c=c[s]||(c[s]={})).maps||(c.maps={}),h=new Set,u=new URLSearchParams,p[a]?console.warn(n+" only loads once. Ignoring:",t):p[a]=(e,...c)=>h.add(e)&&(o||(o=new Promise(async(e,a)=>{for(r in await(i=d.createElement("script")),u.set("libraries",[...h]+""),t)u.set(r.replace(/[A-Z]/g,e=>"_"+e[0].toLowerCase()),t[r]);u.set("callback",s+".maps."+l),i.src=`https://maps.${s}apis.com/maps/api/js?`+u,p[l]=e,i.onerror=()=>o=a(Error(n+" could not load.")),i.nonce=d.querySelector("script[nonce]")?.nonce||"",d.head.append(i)}))).then(()=>p[a](e,...c)))})(e);const{AutocompleteSuggestion:t}=await google.maps.importLibrary("places");this.#_t=t}catch(e){throw console.error("Failed to initialize Google Maps Autocomplete service:",e),e}}async _fetchResults(e){if(!e?.trim())return{results:[]};try{await this.#Ht;const t={input:e};this.getOptionalParams().forEach(({attribute:e,key:o,defaultValue:i})=>{const r=this.getAttribute(e)||i;r&&(t[o]="includedPrimaryTypes"===o?r.split(",").map(e=>e.trim()).filter(Boolean):r)});const{suggestions:o}=await this.#_t.fetchAutocompleteSuggestions(t);return this.#Yt(o)}catch(e){return console.error("Google Maps Places Autocomplete failed:",e),{results:[],error:Me}}}#Yt(e){return e?.length?{results:e.map(e=>{const t=e.placePrediction;return{id:t.placeId,label:t.text.text,value:t.text.text}})}:{results:[]}}}class pg extends(Ae()){getRequiredParams(){return["public-api-key"]}getOptionalParams(){return[{key:"layers",attribute:"address-types"},{key:"limit",attribute:"address-limit"},{key:"lang",attribute:"address-language"},{key:"countryCode",attribute:"address-region"}]}async _fetchResults(e){if(!e?.trim())return{results:[]};const t=this.getAttribute("public-api-key"),o=new URLSearchParams({query:e.trim()});this.getOptionalParams().forEach(({attribute:e,key:t,defaultValue:i})=>{const r=this.getAttribute(e)||i;r&&("layers"===t||"countryCode"===t?o.append(t,r.split(",").map(e=>e.trim()).filter(Boolean).join(",")):o.append(t,r))});try{const e=await fetch(`https://api.radar.io/v1/search/autocomplete?${o.toString()}`,{headers:{Authorization:t}});if(!e.ok)throw new Error(`Radar API returned ${e.status}`);const i=await e.json();return this.#Yt(i)}catch(e){return console.error("Radar Places Autocomplete failed:",e),{results:[],error:Me}}}#Yt(e){return e?.addresses?.length?{results:e.addresses.map(e=>({label:e.formattedAddress,value:e.formattedAddress}))}:{results:[]}}}const hg=k("address-field-internal"),ug="google-maps-places",gg="radar",mg={[ug]:cg,[gg]:pg},bg=Se({componentName:hg,baseSelector:""}),yg=["public-api-key"],fg=[...yg],vg=I((({connectorClasses:e})=>t=>class extends t{#Ut=e;static get observedAttributes(){return[...t.observedAttributes||[],"connector-template"]}get connectorClasses(){return this.#Ut}set connectorClasses(e){this.#Ut=e}get connectorTemplate(){return this.getAttribute("connector-template")}initializeConnector(){const e=this.connectorTemplate;if(!this.connectorClasses[e])return;const t=this.connectorClasses[e];this.connector=new t(this.getAttribute.bind(this))}async fetchConnectorResults(e){if(!this.connector)return console.error(`No connector initialized for the field with template: ${this.connectorTemplate}`),{results:[]};const{results:t,error:o}=await this.connector.fetch(e);return o?{results:[],error:o}:{results:t.map(({label:e,value:t})=>({label:e,value:t}))}}init(){super.init?.(),this.initializeConnector()}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),t!==o&&"connector-template"===e&&this.initializeConnector()}})({connectorClasses:mg}))(class extends bg{static get observedAttributes(){return[].concat(bg.observedAttributes||[],fg)}get errorMsgValueMissing(){return this.getAttribute("data-errormessage-value-missing")||this.defaultErrorMsgValueMissing}constructor(){super(),this.innerHTML="\n <div>\n <descope-autocomplete-field></descope-autocomplete-field>\n </div>\n ",this.autocompleteField=this.querySelector("descope-autocomplete-field")}get value(){return this.autocompleteField.value}set value(e){this.autocompleteField.value=e}focus(){this.autocompleteField.focus()}init(){this.addEventListener("focus",e=>{e.isTrusted&&this.autocompleteField.focus()}),super.init?.(),this.initAutocomplete()}initAutocomplete(){L(this,this.autocompleteField,{includeAttrs:["size","bordered","label","label-type","placeholder","disabled","readonly","required","full-width","helper-text","error-message","default-value","data-errormessage-value-missing","st-host-direction","allow-custom-value","min-search-length","st-error-message-icon","st-error-message-icon-size","st-error-message-icon-padding"]}),T(this,this.autocompleteField,{includeAttrs:["invalid"]}),this.autocompleteField.fetchResults=this.fetchConnectorResults.bind(this)}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),t!==o&&yg.includes(e)&&this.initializeConnector()}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:{valid:!0}}}),xg=k("address-field"),{host:Cg}={host:{selector:()=>":host"}},wg=I(ce({componentNameOverride:k("input-wrapper")}),ce({mappings:{hostWidth:{...Cg,property:"width"},hostDirection:{...Cg,property:"direction"}}}),pe,Le({proxyProps:["value","selectionStart"],inputEvent:"input",proxyParentValidation:!0}),he,e=>class extends e{get defaultValue(){return this.getAttribute("default-value")}setDefaultValue(){this.defaultValue&&setTimeout(()=>{this.inputElement.value=this.defaultValue})}set connectorClasses(e){this.inputElement.connectorClasses=e}get connectorClasses(){return this.inputElement.connectorClasses}init(){super.init?.();const e=document.createElement("template");e.innerHTML=`\n <${hg}\n tabindex="-1"\n ></${hg}>\n `,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(hg),L(this,this.inputElement,{includeAttrs:["size","bordered","label","required","label-type","placeholder","full-width","allow-custom-value","min-search-length","no-results-message","error-fetching-results-message","data-errormessage-value-missing","invalid","error-message","readonly","disabled","st-host-direction","st-error-message-icon","st-error-message-icon-size","st-error-message-icon-padding","connector-template","public-api-key","address-types","address-language","address-region","address-limit"]}),T(this,this.inputElement,{includeAttrs:["invalid"]}),this.setDefaultValue()}})(Ee({slots:[],wrappedEleName:"vaadin-custom-field",style:()=>`\n :host {\n display: inline-flex;\n max-width: 100%;\n direction: ltr;\n }\n vaadin-custom-field {\n line-height: unset;\n width: 100%;\n }\n\n ${hg} {\n display: inline-block;\n box-sizing: border-box;\n user-select: none;\n width: 100%;\n max-width: 100%;\n }\n\n ${hg} ::slotted {\n padding: 0;\n }\n`,excludeAttrsSync:["tabindex","error-message","label","style"],componentName:xg})),Ig=wg.cssVarList,Sg={[Ig.hostWidth]:Ah.width,[Ig.hostDirection]:Ah.direction,_fullWidth:{[Ig.hostWidth]:"100%"}};var Mg=Object.freeze({__proto__:null,default:Sg,vars:Ig});const Ag=(e,t=2)=>String(e).padStart(t,"0"),Eg=k("timer"),Tg=["seconds","hide-icon","paused"],kg=ye({componentName:Eg,baseSelector:":host > .wrapper"}),{host:zg,icon:Lg,timer:Vg}={host:{selector:()=>":host"},icon:{selector:()=>".icon"},timer:{selector:()=>".timer"}},Ng=I(ce({mappings:{fontSize:{},iconSize:[{...Lg,property:"width"},{...Lg,property:"height"}],fontFamily:{},minHeight:{},fontWeight:{...Vg},lineHeight:{...Vg},textColor:{...Vg,property:"color"},gap:{},textAlign:{property:"justify-content"},hostWidth:{...zg,property:"width"},hostDirection:{...zg,property:"direction"},iconColor:{...Lg,property:Ei.cssVarList.fill}}}),pe,he)(class extends kg{#Gt=0;#Zt;static get observedAttributes(){return Tg.concat(kg.observedAttributes||[])}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="wrapper">\n <descope-icon src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMWVtIiBoZWlnaHQ9IjFlbSIgdmlld0JveD0iMCAwIDEwNCAxMDQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik01MC4zMzM0IDAuMzMzMjUyQzIyLjgzMzQgMC4zMzMyNTIgMC4zMzMzNzQgMjIuODMzMyAwLjMzMzM3NCA1MC4zMzMzQzAuMzMzMzc0IDc3LjgzMzMgMjIuODMzNCAxMDAuMzMzIDUwLjMzMzQgMTAwLjMzM0M3Ny44MzM0IDEwMC4zMzMgMTAwLjMzMyA3Ny44MzMzIDEwMC4zMzMgNTAuMzMzM0MxMDAuMzMzIDIyLjgzMzMgNzcuODMzNCAwLjMzMzI1MiA1MC4zMzM0IDAuMzMzMjUyWk01MC4zMzM0IDg3LjgzMzNDMjkuNzA4NCA4Ny44MzMzIDEyLjgzMzQgNzAuOTU4MyAxMi44MzM0IDUwLjMzMzNDMTIuODMzNCAyOS43MDgzIDI5LjcwODQgMTIuODMzMyA1MC4zMzM0IDEyLjgzMzNDNzAuOTU4NCAxMi44MzMzIDg3LjgzMzQgMjkuNzA4MyA4Ny44MzM0IDUwLjMzMzNDODcuODMzNCA3MC45NTgzIDcwLjk1ODQgODcuODMzMyA1MC4zMzM0IDg3LjgzMzNaIiBmaWxsPSIjMTgxQTFDIi8+CjxwYXRoIGQ9Ik01MC4zMzI4IDE5LjA4MzNINDQuMDgyOFY1Ni41ODMySDc1LjMzMjhWNTAuMzMzMkg1MC4zMzI4VjE5LjA4MzNaIiBmaWxsPSIjMTgxQTFDIi8+Cjwvc3ZnPgo=" class="icon"></descope-icon>\n <div class="timer"></div>\n </div>\n\t\t',V("\n :host {\n display: inline-flex;\n user-select: none;\n -webkit-user-select: none;\n }\n .wrapper {\n display: flex;\n align-items: center;\n flex-direction: row;\n width: 100%;\n }\n .hidden {\n display: none;\n }\n ",this),this.icon=this.shadowRoot.querySelector(".icon"),this.timer=this.shadowRoot.querySelector(".timer")}get seconds(){const e=this.getAttribute("seconds"),t=1e3*parseInt(e||0,10);return Math.max(0,t)}get isPaused(){return"true"===this.getAttribute("paused")}init(){super.init?.(),this.#Gt=this.seconds}startInterval(){this.#Gt?this.#Zt=setInterval(()=>{this.#Qt(),this.#Gt||this.stop(),this.#Jt(this.#Gt)},1e3):this.stop()}stopInterval(){clearInterval(this.#Zt)}#Qt(){this.#Gt=this.#Gt-1e3}reset(){this.#Gt=this.seconds,this.#Jt(this.#Gt),this.isPaused||(this.dispatchEvent(new CustomEvent("timer-started",{bubbles:!0})),this.startInterval())}stop(){this.stopInterval(),this.#Gt=0,this.#Jt(this.#Gt),this.dispatchEvent(new CustomEvent("timer-ended",{bubbles:!0}))}pause(){this.setAttribute("paused","true"),this.stopInterval()}resume(){this.removeAttribute("paused"),this.startInterval()}#Jt(e){this.timer.textContent=((e=0)=>{const t=Math.floor(e/1e3),o=Math.floor(t/3600),i=Math.floor(t%3600/60),r=t%60;return[...o?[Ag(o)]:[],Ag(i),Ag(r)].join(":")})(e)}#Kt(e){this.icon.classList.toggle("hidden",e)}#Xt(e){setTimeout(()=>{e?this.pause():this.#Zt||this.resume()})}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),o!==t&&("seconds"===e&&this.reset(),"hide-icon"===e&&this.#Kt("true"===o),"paused"===e&&this.#Xt("true"===o))}}),Dg=te(eh),Pg=Ng.cssVarList,Bg={[Pg.hostDirection]:Dg.direction,[Pg.gap]:"0.25em",[Pg.fontFamily]:Dg.fonts.font1.family,[Pg.minHeight]:"1.5em",[Pg.lineHeight]:"1em",[Pg.fontWeight]:Dg.fonts.font1.fontWeight,[Pg.textColor]:Dg.colors.surface.contrast,[Pg.iconColor]:Dg.colors.surface.contrast,[Pg.iconSize]:"1em",size:{xs:{[Pg.fontSize]:"12px"},sm:{[Pg.fontSize]:"14px"},md:{[Pg.fontSize]:"16px"},lg:{[Pg.fontSize]:"18px"}},textAlign:{right:{[Pg.textAlign]:"right"},left:{[Pg.textAlign]:"left"},center:{[Pg.textAlign]:"center"}},_fullWidth:{[Pg.hostWidth]:"100%"}};var Fg=Object.freeze({__proto__:null,default:Bg,vars:Pg});const Rg=k("timer-button"),Wg=["button-variant","button-mode","size","text-align","full-width"],Og={"button-variant":"variant","button-mode":"mode"},jg=["timer-seconds","timer-hide-icon","timer-paused","size","text-align","full-width"],$g={"timer-seconds":"seconds","timer-hide-icon":"hide-icon","timer-paused":"paused"},_g=ye({componentName:Rg,baseSelector:":host > div"}),{host:Hg,nestedTimer:qg,nestedButton:Yg,timerInsideNotReversed:Ug,timerInsideReversed:Gg}={host:{selector:()=>":host"},nestedTimer:{selector:()=>':host([timer-inside="true"]) .timer'},nestedButton:{selector:()=>':host([timer-inside="true"]) .button'},timerInsideNotReversed:{selector:()=>':host([timer-inside="true"]:not([timer-position="end"])) .timer'},timerInsideReversed:{selector:()=>':host([timer-inside="true"][timer-position="end"]) .timer'}},Zg=I(ce({mappings:{gap:{},flexDirection:{},hostWidth:{...Hg,property:"width"},hostDirection:{...Hg,property:"direction"},timerTextColor:{...qg,property:Ng.cssVarList.textColor},timerIconColor:{...qg,property:Ng.cssVarList.iconColor},timerHostWidth:{...qg,property:Ng.cssVarList.hostWidth},buttonLabelSpacing:{...Yg,property:Ni.cssVarList.labelSpacing},timerInsideGapEnd:{...Ug,property:"margin-inline-end"},timerInsideGapStart:{...Gg,property:"margin-inline-start"}}}),pe,he)(class extends _g{constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="wrapper">\n <descope-timer class="timer"></descope-timer>\n <descope-button class="button" disabled="true">\n <slot></slot>\n </descope-button>\n </div>\n\t\t',V('\n :host {\n display: inline-flex;\n }\n .wrapper {\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n }\n /* allow timer to grow along the main axis in the wrapper flex container */\n :host(:not([timer-inside="true"])) .timer {\n flex: 1;\n }\n :host([timer-inside="true"]) .timer {\n flex: 0 0 auto;\n }\n ',this),this.wrapper=this.shadowRoot.querySelector(".wrapper"),this.timer=this.shadowRoot.querySelector(".timer"),this.button=this.shadowRoot.querySelector(".button"),this.forwardingSlot=this.shadowRoot.querySelector(".button slot"),this.timer.addEventListener("timer-started",()=>this.onTimerStarted()),this.timer.addEventListener("timer-ended",()=>this.onTimerEnded()),this.syncTimerPlacement(),this.button.addEventListener("click",this.onClick.bind(this))}static get observedAttributes(){return[...super.observedAttributes||[],"timer-inside","timer-position"]}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),"timer-inside"!==e&&"timer-position"!==e||this.syncTimerPlacement()}get#eo(){return"true"===this.getAttribute("timer-inside")}get#to(){return"end"===this.getAttribute("timer-position")}syncTimerPlacement(){this.#eo?this.#oo(this.#to):this.#io()}#oo(e){e?this.timer.previousSibling!==this.forwardingSlot&&this.button.appendChild(this.timer):this.timer.nextSibling!==this.forwardingSlot&&this.button.insertBefore(this.timer,this.forwardingSlot)}#io(){this.timer.parentElement!==this.wrapper&&this.wrapper.insertBefore(this.timer,this.button)}set onclick(e){this.button.onclick=e}init(){super.init?.(),L(this,this.button,{includeAttrs:Wg,mapAttrs:Og}),L(this,this.timer,{includeAttrs:jg,mapAttrs:$g}),this.button.shadowRoot.querySelector("vaadin-button").setAttribute("disabled","true")}onTimerStarted(){this.toggleButtonDisable(!0)}onTimerEnded(){this.toggleButtonDisable(!1)}onClick(){this.timer.reset()}toggleButtonDisable(e){setTimeout(()=>{e?this.button.setAttribute("disabled","true"):this.button.removeAttribute("disabled")})}}),Qg=te(eh),Jg=Zg.cssVarList,Kg={[Jg.gap]:Qg.spacing.sm,[Jg.flexDirection]:"column",_horizontal:{[Jg.flexDirection]:"row",timerPosition:{end:{[Jg.flexDirection]:"row-reverse"}}},timerPosition:{end:{[Jg.flexDirection]:"column-reverse"}},_fullWidth:{[Jg.hostWidth]:"100%"},_timerInside:{[Jg.timerTextColor]:"currentColor",[Jg.timerIconColor]:"currentColor",[Jg.timerHostWidth]:"auto",[Jg.buttonLabelSpacing]:"0",[Jg.timerInsideGapEnd]:`var(${Jg.gap})`,timerPosition:{end:{[Jg.timerInsideGapStart]:`var(${Jg.gap})`}}}};var Xg=Object.freeze({__proto__:null,default:Kg,vars:Jg});const em=k("password-strength");class tm extends(ye({componentName:em,baseSelector:":host > .wrapper"})){static get observedAttributes(){return["options","value"]}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="wrapper">\n <div class="bars-container"></div>\n <div class="text-container">\n </div>\n </div>\n\t\t',V("\n :host {\n\t\t\t\t\tdisplay: inline-flex;\n\t\t\t\t}\n\n .wrapper {\n display: inline-flex;\n position: relative;\n flex-direction: column;\n width: 100%;\n height: 100%;\n align-items: flex-start;\n }\n\n .bar {\n flex-grow: 1;\n }\n\n .bars-container {\n display: flex;\n flex-grow: 1;\n width: 100%;\n }\n ",this),this.barsContainer=this.shadowRoot.querySelector(".bars-container"),this.textContainer=this.shadowRoot.querySelector(".text-container")}get options(){return this.getAttribute("options")?.split(",")||[]}getCalcScoreFn=()=>Promise.resolve().then(function(){return Jx}).then(e=>e.default);#ro=-1;async calcScore(){const e=this.getAttribute("value")||"";return e?(await this.getCalcScoreFn())(e).score:-1}renderBars(){this.barsContainer.innerHTML="",this.bars=this.options.map((e,t)=>{const o=document.createElement("div");return o.classList.add("bar"),o.classList.toggle("filled",t<=this.#ro),this.barsContainer.appendChild(o),o})}init(){super.init?.(),this.getCalcScoreFn()}async onValueChange(){const e=await this.calcScore();e!==this.#ro&&(this.#ro=e,this.dispatchEvent(new CustomEvent("score-changed",{bubbles:!0,composed:!0,detail:this.#ro})),this.bars?.forEach((e,t)=>{e.classList.toggle("filled",t<=this.#ro)}),this.textContainer.innerHTML=this.options[this.#ro]||"",-1===this.#ro?this.removeAttribute("score"):this.setAttribute("score",this.#ro))}attributeChangedCallback(e,t,o){if(t!==o)return"options"===e?this.renderBars():"value"===e?this.onValueChange():void 0}}const{host:om,bar:im,filledBar:rm,barsContainer:nm,text:sm}={host:{selector:()=>":host"},bar:{selector:" .bar"},barsContainer:{selector:" .bars-container"},filledBar:{selector:" .bar.filled"},text:{selector:" .text-container"}},am=I(ce({componentNameOverride:k("input-wrapper")}),ce({mappings:{hostWidth:[{...om,property:"width"},{...om,property:"min-width"}],hostDirection:{...om,property:"direction"},hostMinWidth:{...om,property:"min-width"},barHeight:{...im,property:"height"},barBorderRadius:{...im,property:"border-radius"},emptyBarColor:{...im,property:"background-color"},filledBarColor:{...rm,property:"background-color"},textColor:{...sm,property:"color"},spacing:{property:"gap"},barSpacing:{...nm,property:"gap"},fontSize:{},fontWeight:{},fontFamily:{},barTransition:{...im,property:"transition"}}}),pe,he)(tm),lm=te(eh),dm=am.cssVarList,cm={[dm.hostDirection]:lm.direction,[dm.barHeight]:"4px",[dm.barTransition]:"background-color 0.3s",[dm.barBorderRadius]:lm.radius.sm,[dm.hostMinWidth]:Ah.minWidth,[dm.barSpacing]:lm.spacing.sm,[dm.emptyBarColor]:lm.colors.surface.light,[dm.fontFamily]:Ah.fontFamily,[dm.fontSize]:Ah.labelFontSize,[dm.fontWeight]:Ah.labelFontWeight,[dm.spacing]:lm.spacing.sm,_fullWidth:{[dm.hostWidth]:"100%"},score:{0:{[dm.filledBarColor]:lm.colors.error.light,[dm.textColor]:lm.colors.error.light},1:{[dm.filledBarColor]:lm.colors.error.main,[dm.textColor]:lm.colors.error.main},2:{[dm.filledBarColor]:lm.colors.error.dark,[dm.textColor]:lm.colors.error.dark},3:{[dm.filledBarColor]:lm.colors.success.dark,[dm.textColor]:lm.colors.success.dark},4:{[dm.filledBarColor]:lm.colors.success.main,[dm.textColor]:lm.colors.success.main}}},pm={...dm};var hm=Object.freeze({__proto__:null,default:cm,vars:pm});const um=k("collapsible-container");class gm extends(ye({componentName:um,baseSelector:"slot"})){static get observedAttributes(){return["collapsed","collapsible","text"]}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="wrapper">\n <descope-text st-host-direction="ltr">\n <div class="header">\n <div class="icon">\n <descope-icon st-fill="currentcolor" src=data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iYmxhY2siIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0xNy4yMTkzIDkuMjcyODNDMTcuNjU4NCA4Ljg3OTEyIDE4LjMzMzQgOC45MTU4NyAxOC43MjcyIDkuMzU0OTJDMTkuMTIwOSA5Ljc5Mzk3IDE5LjA4NDEgMTAuNDY5MSAxOC42NDUxIDEwLjg2MjhDMTguNjQ1MSAxMC44NjI4IDEzLjA0NTcgMTYuMDAyMiAxMi42NCAxNi4zNjZDMTIuMjM0MyAxNi43Mjk4IDExLjc2MDggMTYuNzI5OCAxMS4zNTUyIDE2LjM2Nkw1LjM1NDkyIDEwLjg2MjhDNC45MTU4NyAxMC40NjkxIDQuODc5MTIgOS43OTM5NyA1LjI3MjgzIDkuMzU0OTJDNS42NjY1NSA4LjkxNTg3IDYuMzQxNjQgOC44NzkxMiA2Ljc4MDY5IDkuMjcyODNMMTIgMTQuMTM2OEwxNy4yMTkzIDkuMjcyODNaIi8+Cjwvc3ZnPgo=></descope-icon>\n </div>\n <span></span>\n </div>\n </descope-text>\n <div class="content">\n <slot></slot>\n </div>\n </div>\n\t',V(`\n div.content {\n transition-property: max-height;\n overflow: auto;\n height: auto;\n\t\t\t}\n\t\t\tslot {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\twidth: 100%;\n\t\t\t\tdisplay: flex;\n\t\t\t}\n slot:focus-visible {\n outline: none;\n }\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n .header {\n user-select: none;\n display: flex;\n align-items: baseline;\n }\n .icon {\n flex-shrink: 0;\n height: var(${ko.cssVarList.textLineHeight});\n min-height: 24px;\n display: flex;\n align-items: center;\n }\n descope-icon {\n transition-property: transform;\n }\n .rotate {\n transform: rotate(-180deg);\n }\n descope-text {\n width: 100%;\n display: flex;\n }\n span {\n align-self: center;\n word-break: break-word;\n }\n span:empty {\n display: none;\n }\n .wrapper {\n overflow: hidden;\n display: inline-flex;\n width: 100%;\n flex-direction: column;\n }\n `,this),this.header=this.shadowRoot.querySelector(".header"),this.content=this.shadowRoot.querySelector("div.content"),this.icon=this.header.querySelector("descope-icon"),this.headerText=this.header.querySelector("span"),this.textComponent=this.shadowRoot.querySelector("descope-text")}get isCollapsible(){return"true"===this.getAttribute("collapsible")}calcContentHeight(){return this.content.offsetHeight||this.content.scrollHeight}get isCollapsed(){return"true"===this.getAttribute("collapsed")}toggle(){this.setAttribute("collapsed",this.isCollapsed?"false":"true")}collapse(e=!1){const t=()=>{this.content.style.maxHeight="0px"};if(this.icon.classList.add("rotate"),!e)return t();this.content.style.maxHeight=this.calcContentHeight()+"px",setTimeout(t)}expand(e=!1){const t=()=>{this.content.style.maxHeight=""};if(this.icon.classList.remove("rotate"),!e)return t();this.content.addEventListener("transitionend",t,{once:!0}),this.content.style.maxHeight=this.calcContentHeight()+"px"}#no=!1;init(){super.init?.(),this.#no=!0,this.header.addEventListener("click",()=>{this.isCollapsible&&this.toggle()}),L(this,this.textComponent,{includeAttrs:["text-align","text-variant","text-mode"],mapAttrs:{"text-mode":"mode","text-variant":"variant"}})}updateHeaderText(){const e=this.getAttribute("text")||"";this.headerText.innerText=e}attributeChangedCallback(e,t,o){"text"!==e?this.isCollapsed&&this.isCollapsible?this.collapse(this.#no):this.expand(this.#no):this.updateHeaderText()}}const mm={host:()=>":host",icon:()=>"descope-icon",iconWrapper:()=>".icon",header:()=>".header",text:()=>"span",wrapper:()=>".wrapper",content:()=>"div.content"},bm=I(ce({mappings:{hostWidth:{selector:mm.host,property:"width"},hostDirection:{selector:mm.host,property:"direction"},verticalPadding:[{selector:mm.wrapper,property:"padding-top"},{selector:mm.wrapper,property:"padding-bottom"}],horizontalPadding:[{selector:mm.wrapper,property:"padding-left"},{selector:mm.wrapper,property:"padding-right"}],flexDirection:{},justifyContent:{},alignItems:{},gap:[{},{property:"margin-top"}],backgroundColor:{selector:mm.wrapper},backgroundImage:{selector:mm.wrapper},backgroundPositionX:{selector:mm.wrapper},backgroundPositionY:{selector:mm.wrapper},backgroundSize:{selector:mm.wrapper},backgroundRepeat:{selector:mm.wrapper},borderRadius:{selector:mm.wrapper},borderColor:{selector:mm.wrapper},borderStyle:{selector:mm.wrapper},borderWidth:{selector:mm.wrapper},boxShadow:{selector:mm.wrapper},headerIconOrder:{selector:mm.iconWrapper,property:"order"},headerCursor:{selector:mm.header,property:"cursor"},headerGap:{selector:mm.header,property:"gap"},textGrow:{selector:mm.text,property:"flex-grow"},textDirection:{selector:mm.text,property:"direction"},iconAnimationDuration:{selector:mm.icon,property:"transition-duration"},contentAnimationDuration:{selector:mm.content,property:"transition-duration"}}}),pe,he)(gm),ym=te(eh),fm=bm.cssVarList,[vm,xm,Cm]=ie({shadowColor:"#00000020"},um),{shadowColor:wm}=xm,Im={...vm,[fm.hostWidth]:"100%",[fm.boxShadow]:"none",[fm.backgroundColor]:ym.colors.surface.main,[fm.backgroundImage]:"",[fm.backgroundPositionX]:"center",[fm.backgroundPositionY]:"center",[fm.backgroundSize]:"cover",[fm.backgroundRepeat]:"no-repeat",[fm.borderRadius]:"0px",[fm.hostDirection]:ym.direction,[fm.flexDirection]:"column",[fm.alignItems]:"flex-start",[fm.justifyContent]:"flex-start",[fm.headerGap]:ym.spacing.md,[fm.iconAnimationDuration]:"0.1s",[fm.contentAnimationDuration]:"0.1s",[fm.borderWidth]:"0px",[fm.textGrow]:"0",verticalPadding:{sm:{[fm.verticalPadding]:"5px"},md:{[fm.verticalPadding]:"10px"},lg:{[fm.verticalPadding]:"20px"}},horizontalPadding:{sm:{[fm.horizontalPadding]:"5px"},md:{[fm.horizontalPadding]:"10px"},lg:{[fm.horizontalPadding]:"20px"}},spaceBetween:{sm:{[fm.gap]:"10px"},md:{[fm.gap]:"20px"},lg:{[fm.gap]:"30px"}},shadow:{sm:{[fm.boxShadow]:`${ym.shadow.wide.sm} ${wm}, ${ym.shadow.narrow.sm} ${wm}`},md:{[fm.boxShadow]:`${ym.shadow.wide.md} ${wm}, ${ym.shadow.narrow.md} ${wm}`},lg:{[fm.boxShadow]:`${ym.shadow.wide.lg} ${wm}, ${ym.shadow.narrow.lg} ${wm}`},xl:{[fm.boxShadow]:`${ym.shadow.wide.xl} ${wm}, ${ym.shadow.narrow.xl} ${wm}`},"2xl":{[Cm.shadowColor]:"#00000050",[fm.boxShadow]:`${ym.shadow.wide["2xl"]} ${wm}`}},borderRadius:{sm:{[fm.borderRadius]:ym.radius.sm},md:{[fm.borderRadius]:ym.radius.md},lg:{[fm.borderRadius]:ym.radius.lg},xl:{[fm.borderRadius]:ym.radius.xl},"2xl":{[fm.borderRadius]:ym.radius["2xl"]},"3xl":{[fm.borderRadius]:ym.radius["3xl"]}},iconPosition:{left:{[fm.headerIconOrder]:"0"},right:{[fm.headerIconOrder]:"1"}},_fillTitle:{[fm.textGrow]:"1"},_border:{[fm.borderColor]:ym.colors.surface.light,[fm.borderWidth]:ym.border.xs,[fm.borderStyle]:"solid"},_collapsible:{[fm.headerCursor]:"pointer"}},Sm={...fm,...Cm};var Mm=Object.freeze({__proto__:null,default:Im,vars:Sm});const Am=k("recovery-codes");class Em extends(ye({componentName:Am,baseSelector:":host > div"})){static get observedAttributes(){return["readonly"]}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="wrapper">\n <div class="list"></div>\n <descope-text class="icon-wrapper">\n <vaadin-icon class="icon" icon="vaadin:copy-o" title="Copy"></vaadin-icon>\n </descope-text>\n </div>\n ',this.list=this.shadowRoot.querySelector(".list"),this.icon=this.shadowRoot.querySelector(".icon"),this.iconWrapper=this.shadowRoot.querySelector(".icon-wrapper"),V("\n :host {\n display: inline-block;\n position: relative;\n }\n .wrapper {\n display: flex;\n justify-content: space-between;\n }\n .list {\n display: flex;\n flex-grow: 1;\n flex-direction: column;\n }\n descope-text span {\n display: inline-flex;\n align-items: center;\n width: fit-content;\n }\n descope-text span::before {\n content: '\\02022';\n transform: translateY(-0.06em);\n }\n .icon-wrapper {\n align-self: flex-start;\n }\n .icon {\n cursor: pointer;\n }\n .icon.copied {\n cursor: initial;\n }\n .icon.readonly {\n pointer-events: none;\n }\n ",this)}get variant(){return this.getAttribute("variant")}get mode(){return this.getAttribute("mode")}init(){super.init(),this.icon.addEventListener("click",this.onCopy.bind(this)),L(this,this.iconWrapper,{includeAttrs:["variant","mode"]})}onCopy(){navigator.clipboard.writeText(String(this.data.map(e=>e.value).join("\n"))),this.icon.setAttribute("icon","vaadin:check-circle-o"),this.icon.setAttribute("title","Copied"),this.icon.classList.add("copied"),setTimeout(()=>{this.icon.setAttribute("icon","vaadin:copy-o"),this.icon.setAttribute("title","Copy"),this.icon.classList.remove("copied")},5e3)}onReadOnly(e){this.icon.classList.toggle("readonly",e)}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),o!==t&&"readonly"===e&&this.onReadOnly("true"===o)}}const Tm=I(ce({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostMinWidth:{selector:()=>":host",property:"min-width"},hostDirection:[{selector:()=>":host",property:"direction"},{selector:()=>ko.componentName,property:ko.cssVarList.hostDirection}],textAlign:{selector:()=>".list",property:"align-items"},iconColor:{selector:()=>"vaadin-icon",property:"color"},iconSize:{selector:()=>"vaadin-icon",property:"font-size"},iconGap:{selector:()=>".wrapper",property:"gap"},bulletGap:{selector:()=>"descope-text span",property:"gap"}}}),Be({itemRenderer:({value:e},t,o)=>`\n <descope-text variant="${o.variant}" mode="${o.mode}">\n <span>${e}</span>\n </descope-text>\n `,rerenderAttrsList:["variant","mode"],targetSelector:".list"}),pe,he)(Em),km=te(eh),zm=Tm.cssVarList,Lm=ko.cssVarList,Vm={[zm.hostMinWidth]:"190px",[zm.hostDirection]:km.direction,[zm.iconColor]:oe(Lm.textColor),[zm.iconSize]:oe(Lm.fontSize),[zm.iconGap]:"8px",[zm.bulletGap]:"0.35em",textAlign:{right:{[zm.textAlign]:"flex-end"},left:{[zm.textAlign]:"flex-start"},center:{[zm.textAlign]:"center"}},_fullWidth:{[zm.hostWidth]:"100%"}};var Nm=Object.freeze({__proto__:null,default:Vm,vars:zm});const Dm=k("outbound-apps"),Pm=({name:e,description:t,logo:o,appId:i,isConnected:r},n,s)=>{const a=r?"disconnect":"connect";return`\n <descope-list-item>\n <descope-avatar\n ${o?`img="${o}"`:""}\n ${e?`display-name="${e}" abbr=${P(e)}`:""}\n size=${s.size}\n ${o?'st-avatar-background-color="none"':""}\n class="app-logo"\n ></descope-avatar>\n\n <div class="content">\n <descope-text\n class="app-title"\n variant="subtitle1"\n mode="primary"\n >${e}</descope-text>\n ${t?`\n <descope-text\n class="app-description"\n variant="body2"\n mode="primary"\n >${t}</descope-text>\n `:""}\n </div>\n <div class="controls">\n <descope-button variant="link" mode="primary" size=${s.size} data-action="${a}" data-outbound-app-id="${i}" data-id="${a}">\n ${r?s.disconnectButtonLabel:s.connectButtonLabel}\n </descope-button>\n </div>\n </descope-list-item>\n`},Bm=ye({componentName:Dm,baseSelector:"descope-list"}),{host:Fm}={host:{selector:()=>":host"}},Rm=I(ce({mappings:{hostWidth:{...Fm,property:"width"},minHeight:{selector:()=>":host"},hostDirection:[{...Fm,property:"direction"},{selector:"descope-list",property:"direction"},{selector:"descope-list-item",property:"direction"}],iconColor:{selector:()=>" descope-icon",property:Ei.cssVarList.fill},errorIconColor:{selector:()=>" descope-icon.error-icon",property:Ei.cssVarList.fill},fontSize:{selector:ko.componentName,property:ko.cssVarList.fontSize},appLogoGap:{selector:()=>" .app-logo",property:"margin-inline-end"},contentGap:{selector:()=>" .content",property:"gap"},itemsTextAlign:{selector:ko.componentName,property:ko.cssVarList.textAlign},itemCursor:{selector:dp.componentName,property:dp.cssVarList.cursor},itemOutline:{selector:dp.componentName,property:dp.cssVarList.outline},itemBorderColor:{selector:dp.componentName,property:dp.cssVarList.borderColor},itemBackgroundColor:{selector:dp.componentName,property:dp.cssVarList.backgroundColor},listBorderWidth:{selector:()=>hp.componentName,property:hp.cssVarList.borderWidth},listBoxShadow:{selector:()=>hp.componentName,property:hp.cssVarList.boxShadow},listPadding:[{selector:()=>hp.componentName,property:hp.cssVarList.verticalPadding},{selector:()=>hp.componentName,property:hp.cssVarList.horizontalPadding}]}}),pe,Be({itemRenderer:Pm,rerenderAttrsList:["size","connect-button-label","disconnect-button-label"]}),he)(class extends Bm{constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <descope-list>\n <slot name="empty-state" slot="empty-state"></slot>\n </descope-list>\n ',this.appsList=this.shadowRoot.querySelector("descope-list"),V("\n :host {\n width: 100%;\n }\n .controls {\n display: flex;\n min-width: 8em;\n justify-content: end;\n }\n .content {\n flex-grow: 1;\n display: flex;\n flex-direction: column;\n }\n .app-title,\n .app-description {\n display: flex;\n direction: inherit;\n }\n descope-list {\n display: block;\n }\n ",this)}init(){super.init?.(),this.appsList.itemRenderer=Pm,this.appsList.addEventListener("click",this.onAppsListClick.bind(this))}get readonly(){return"true"===this.getAttribute("readonly")}onAppsListClick(e){if(!this.readonly){const t=e.srcElement.getAttribute("data-outbound-app-id"),o=e.srcElement.getAttribute("data-action");t&&o&&this.dispatchEvent(new CustomEvent(`${o}-clicked`,{bubbles:!0,detail:{id:t,action:o}}))}}get size(){return this.getAttribute("size")||"sm"}get connectButtonLabel(){return this.getAttribute("connect-button-label")||"Connect"}get disconnectButtonLabel(){return this.getAttribute("disconnect-button-label")||"Disconnect"}}),Wm=Rm.cssVarList,Om={[Wm.iconColor]:eh.colors.primary.main,[Wm.errorIconColor]:eh.colors.error.main,[Wm.appLogoGap]:eh.spacing.md,[Wm.contentGap]:eh.spacing.xs,[Wm.itemCursor]:"default",[Wm.itemOutline]:"none",[Wm.itemBorderColor]:"transparent",[Wm.listPadding]:"0",[Wm.listBorderWidth]:"0",[Wm.listBoxShadow]:"none",size:{xs:{[Wm.fontSize]:"0.6em"},sm:{[Wm.fontSize]:"0.8em"},md:{[Wm.fontSize]:"1em"},lg:{[Wm.fontSize]:"1.5em"}}};var jm=Object.freeze({__proto__:null,default:Om,vars:Wm});const $m=k("outbound-app-button");class _m extends(ye({componentName:$m,baseSelector:":host > descope-button"})){static get observedAttributes(){return["label","icon-src","icon-fill-current-color"]}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <descope-button>\n <descope-icon class="icon"></descope-icon>\n <span class="label"></span>\n </descope-button>\n ',V("\n :host {\n display: inline-block;\n }\n .hidden {\n display: none;\n }\n ",this),this.button=this.shadowRoot.querySelector("descope-button"),this.icon=this.shadowRoot.querySelector(".icon"),this.label=this.shadowRoot.querySelector(".label")}init(){super.init?.(),L(this,this.button,{excludeAttrs:["style","class","label","icon-src","icon-fill-current-color"]})}updateLabel(e=""){this.label.textContent=e,this.label.classList.toggle("hidden",!e)}updateIcon(e=""){this.icon.setAttribute("src",e),this.icon.classList.toggle("hidden",!e)}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),t!==o&&("label"===e?this.updateLabel(o):"icon-src"===e&&this.updateIcon(o))}}const Hm=I(ce({mappings:{hostWidth:{selector:()=>":host",property:"width"},iconFillCurrentColor:{selector:()=>"descope-icon",property:Ni.cssVarList.iconColor}}}),pe,he)(_m),qm=Hm.cssVarList,Ym={[qm.iconFillCurrentColor]:"inherit",_iconFillCurrentColor:{[qm.iconFillCurrentColor]:"currentColor"},_fullWidth:{[qm.hostWidth]:"100%"}},Um=qm;var Gm=Object.freeze({__proto__:null,default:Ym,vars:Um});const Zm=e=>{const t=parseInt(e,10);return Number.isNaN(t)?0:t},Qm={desktop:{light:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIwIDE4QzIxLjEgMTggMjEuOTkgMTcuMSAyMS45OSAxNkwyMiA2QzIyIDQuOSAyMS4xIDQgMjAgNEg0QzIuOSA0IDIgNC45IDIgNlYxNkMyIDE3LjEgMi45IDE4IDQgMThIMFYyMEgyNFYxOEgyMFpNNCA2SDIwVjE2SDRWNloiIGZpbGw9IiM2MzZDNzQiLz4KPC9zdmc+Cg==",dark:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjUiIHZpZXdCb3g9IjAgMCAyNCAyNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIwIDE4LjVDMjEuMSAxOC41IDIxLjk5IDE3LjYgMjEuOTkgMTYuNUwyMiA2LjVDMjIgNS40IDIxLjEgNC41IDIwIDQuNUg0QzIuOSA0LjUgMiA1LjQgMiA2LjVWMTYuNUMyIDE3LjYgMi45IDE4LjUgNCAxOC41SDBWMjAuNUgyNFYxOC41SDIwWk00IDYuNUgyMFYxNi41SDRWNi41WiIgZmlsbD0iI0Y0RjVGNiIvPgo8L3N2Zz4K"},mobile:{light:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE2IDFIOEM2LjM0IDEgNSAyLjM0IDUgNFYyMEM1IDIxLjY2IDYuMzQgMjMgOCAyM0gxNkMxNy42NiAyMyAxOSAyMS42NiAxOSAyMFY0QzE5IDIuMzQgMTcuNjYgMSAxNiAxWk0xNyAxOEg3VjRIMTdWMThaTTE0IDIxSDEwVjIwSDE0VjIxWiIgZmlsbD0iIzYzNkM3NCIvPgo8L3N2Zz4K",dark:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjUiIHZpZXdCb3g9IjAgMCAyNCAyNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE2IDEuNUg4QzYuMzQgMS41IDUgMi44NCA1IDQuNVYyMC41QzUgMjIuMTYgNi4zNCAyMy41IDggMjMuNUgxNkMxNy42NiAyMy41IDE5IDIyLjE2IDE5IDIwLjVWNC41QzE5IDIuODQgMTcuNjYgMS41IDE2IDEuNVpNMTcgMTguNUg3VjQuNUgxN1YxOC41Wk0xNCAyMS41SDEwVjIwLjVIMTRWMjEuNVoiIGZpbGw9IiNGNEY1RjYiLz4KPC9zdmc+Cg=="},tablet:{light:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjUiIHZpZXdCb3g9IjAgMCAyNCAyNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzUyNTJfNzY4KSI+CjxwYXRoIGQ9Ik0xOC41IDAuNUg0LjVDMy4xMiAwLjUgMiAxLjYyIDIgM1YyMkMyIDIzLjM4IDMuMTIgMjQuNSA0LjUgMjQuNUgxOC41QzE5Ljg4IDI0LjUgMjEgMjMuMzggMjEgMjJWM0MyMSAxLjYyIDE5Ljg4IDAuNSAxOC41IDAuNVpNMTEuNSAyMy41QzEwLjY3IDIzLjUgMTAgMjIuODMgMTAgMjJDMTAgMjEuMTcgMTAuNjcgMjAuNSAxMS41IDIwLjVDMTIuMzMgMjAuNSAxMyAyMS4xNyAxMyAyMkMxMyAyMi44MyAxMi4zMyAyMy41IDExLjUgMjMuNVpNMTkgMTkuNUg0VjMuNUgxOVYxOS41WiIgZmlsbD0iIzYzNkM3NCIvPgo8L2c+CjxkZWZzPgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzUyNTJfNzY4Ij4KPHJlY3Qgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiBmaWxsPSJ3aGl0ZSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMCAwLjUpIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==",dark:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjUiIHZpZXdCb3g9IjAgMCAyNCAyNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzUzMDNfODYzKSI+CjxwYXRoIGQ9Ik0xOC41IDAuNUg0LjVDMy4xMiAwLjUgMiAxLjYyIDIgM1YyMkMyIDIzLjM4IDMuMTIgMjQuNSA0LjUgMjQuNUgxOC41QzE5Ljg4IDI0LjUgMjEgMjMuMzggMjEgMjJWM0MyMSAxLjYyIDE5Ljg4IDAuNSAxOC41IDAuNVpNMTEuNSAyMy41QzEwLjY3IDIzLjUgMTAgMjIuODMgMTAgMjJDMTAgMjEuMTcgMTAuNjcgMjAuNSAxMS41IDIwLjVDMTIuMzMgMjAuNSAxMyAyMS4xNyAxMyAyMkMxMyAyMi44MyAxMi4zMyAyMy41IDExLjUgMjMuNVpNMTkgMTkuNUg0VjMuNUgxOVYxOS41WiIgZmlsbD0iI0Y0RjVGNiIvPgo8L2c+CjxkZWZzPgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzUzMDNfODYzIj4KPHJlY3Qgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiBmaWxsPSJ3aGl0ZSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMCAwLjUpIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg=="},unknown:{light:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjUiIHZpZXdCb3g9IjAgMCAyNCAyNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTQgNi41SDIyVjQuNUg0QzIuOSA0LjUgMiA1LjQgMiA2LjVWMTcuNUgwVjIwLjVIMTRWMTcuNUg0VjYuNVpNMjMgOC41SDE3QzE2LjQ1IDguNSAxNiA4Ljk1IDE2IDkuNVYxOS41QzE2IDIwLjA1IDE2LjQ1IDIwLjUgMTcgMjAuNUgyM0MyMy41NSAyMC41IDI0IDIwLjA1IDI0IDE5LjVWOS41QzI0IDguOTUgMjMuNTUgOC41IDIzIDguNVpNMjIgMTcuNUgxOFYxMC41SDIyVjE3LjVaIiBmaWxsPSIjNjM2Qzc0Ii8+Cjwvc3ZnPgo=",dark:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTQgNkgyMlY0SDRDMi45IDQgMiA0LjkgMiA2VjE3SDBWMjBIMTRWMTdINFY2Wk0yMyA4SDE3QzE2LjQ1IDggMTYgOC40NSAxNiA5VjE5QzE2IDE5LjU1IDE2LjQ1IDIwIDE3IDIwSDIzQzIzLjU1IDIwIDI0IDE5LjU1IDI0IDE5VjlDMjQgOC40NSAyMy41NSA4IDIzIDhaTTIyIDE3SDE4VjEwSDIyVjE3WiIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg=="}},Jm=k("trusted-devices"),Km=({id:e,name:t,lastLoginDate:o,deviceType:i,isCurrent:r},n,s)=>{const a=r?'class="current-device"':"",{iconSrc:l,iconSrcDark:d}=(e=>{const t=Qm[e]||Qm.unknown;return{iconSrc:t.light,iconSrcDark:t.dark}})(i),c=s.lastLoginLabel?`${s.lastLoginLabel} `:"",p=((e,t)=>{if(Number.isNaN(parseInt(e,10)))return"";const o=new Date(e),i=o.getFullYear(),r=String(o.getMonth()+1).padStart(2,"0"),n=String(o.getDate()).padStart(2,"0"),s=o.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit"}),a={"DD-MM-YYYY":`${n}/${r}/${i}`,"YYYY-MM-DD":`${i}/${r}/${n}`,"MM-DD-YYYY":`${r}/${n}/${i}`};return`${a[t]||a["MM/DD/YYYY"]} ${s}`})(o,s.format),h=r?`<descope-badge\n bordered="true"\n size="xs"\n mode="primary"\n st-host-direction="${s.direction}"\n >\n ${s.currentDeviceLabel}\n </descope-badge>`:"",u=s.hideActions||r?"":`<descope-link\n class="remove-device"\n variant="body1"\n mode="primary"\n data-action="remove-device"\n data-device-id="${e}"\n st-host-direction="${s.direction}"\n ellipsis="true"\n >\n ${s.removeDeviceLabel}\n </descope-link>`,g=document.createElement("template");return g.innerHTML=`\n <descope-list-item ${a}>\n <div class="content">\n <div class="main">\n <span class="device">\n <descope-icon\n class="device-icon"\n src="${l}"\n src-dark="${d}">\n </descope-icon>\n <descope-text\n class="device-name"\n variant="body1"\n mode="primary">\n </descope-text>\n </span>\n <span class="panel">\n ${h}\n ${u}\n </span>\n </div>\n <div class="meta">\n <descope-text\n variant="body2"\n mode="primary"\n >\n ${c}\n </descope-text>\n <descope-text\n class="login-date"\n variant="body2"\n mode="primary"\n >\n ${p}\n </descope-text>\n </div>\n </div>\n </descope-list-item>\n `,g.content.querySelector(".device-name").textContent=t,g},Xm=ye({componentName:Jm,baseSelector:hp.componentName}),{host:eb}={host:{selector:()=>":host"}},tb=I(ce({mappings:{hostWidth:{...eb,property:"width"},hostMinWidth:{...eb,property:"min-width"},hostDirection:[{...eb,property:"direction"},{selector:()=>"descope-list-item",property:"direction"},{selector:()=>"descope-text",property:"direction"}],listItemsGap:{property:hp.cssVarList.gap},listBackgroundColor:{selector:()=>hp.componentName,property:hp.cssVarList.backgroundColor},listBorderRadius:{selector:()=>hp.componentName,property:hp.cssVarList.borderRadius},listBorderWidth:{selector:()=>hp.componentName,property:hp.cssVarList.borderWidth},listBoxShadow:{selector:()=>hp.componentName,property:hp.cssVarList.boxShadow},listPadding:[{selector:()=>hp.componentName,property:hp.cssVarList.verticalPadding},{selector:()=>hp.componentName,property:hp.cssVarList.horizontalPadding}],itemVerticalPadding:{selector:dp.componentName,property:dp.cssVarList.verticalPadding},itemHorizontalPadding:{selector:dp.componentName,property:dp.cssVarList.horizontalPadding},itemCursor:{selector:dp.componentName,property:dp.cssVarList.cursor},itemOutline:{selector:dp.componentName,property:dp.cssVarList.outline},itemBorderColor:{selector:dp.componentName,property:dp.cssVarList.borderColor},itemBorderRadius:{selector:dp.componentName,property:dp.cssVarList.borderRadius},itemBackgroundColor:{selector:dp.componentName,property:dp.cssVarList.backgroundColor},itemContentGap:{selector:()=>".content",property:"gap"},badgeBorderColor:{selector:Ac.componentName,property:Ac.cssVarList.borderColor},badgeTextColor:{selector:Ac.componentName,property:Ac.cssVarList.textColor},badgeBackgroundColor:{selector:Ac.componentName,property:Ac.cssVarList.backgroundColor},badgeBorderRadius:{selector:Ac.componentName,property:Ac.cssVarList.borderRadius},devicePanelGap:{selector:()=>".main",property:"gap"},deviceIconGap:{selector:()=>".device",property:"gap"},deviceIconSize:[{selector:()=>".device-icon",property:"width"},{selector:()=>".device-icon",property:"height"}],lastLoginLabelGap:{selector:" .meta",property:"gap"}}}),pe,Be({itemRenderer:Km,sortFn:(e,t)=>Zm(t.lastLoginDate)-Zm(e.lastLoginDate),rerenderAttrsList:["remove-device-label","current-device-label","last-login-label","format","hide-actions"]}),he)(class extends Xm{constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <descope-list>\n <slot name="empty-state" slot="empty-state"></slot>\n </descope-list>\n ',this.appsList=this.shadowRoot.querySelector("descope-list"),V("\n :host {\n display: inline-block;\n }\n\n .descope-list-item {\n min-width: 0;\n }\n\n .current-device {\n order: -1;\n }\n\n .content {\n display: flex;\n flex-direction: column;\n width: 100%;\n }\n\n .main {\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n\n .panel {\n display: flex;\n flex-shrink: 0;\n max-width: 75%;\n overflow: hidden;\n }\n\n .device {\n display: flex;\n min-width: 0;\n }\n\n .device-icon {\n flex-shrink: 0;\n }\n\n .meta {\n display: flex;\n }\n\n .login-date {\n min-width: fit-content;\n }\n\n descope-badge {\n min-width: 0;\n }\n\n descope-text {\n display: flex;\n align-items: center; \n min-width: 0;\n }\n descope-text::part(text-wrapper) {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n\n descope-link {\n overflow: hidden;\n }\n descope-link.remove-device::part(wrapper) {\n display: flex;\n width: 100%;\n }\n descope-link.remove-device {\n width: 100%;\n }\n ",this)}init(){super.init?.(),this.appsList.itemRenderer=Km,this.appsList.addEventListener("click",this.onRemoveClick.bind(this))}onRemoveClick(e){if(this.readOnly)return;const t=e.target.closest("[data-device-id]"),o=t?.getAttribute("data-device-id");o&&this.dispatchEvent(new CustomEvent("remove-device-clicked",{bubbles:!0,detail:{id:o,action:"remove-device"}}))}get readOnly(){return"true"===this.getAttribute("readonly")}get hideActions(){return"true"===this.getAttribute("hide-actions")}get format(){return this.getAttribute("format")?.toUpperCase()||"MM-DD-YYYY"}get removeDeviceLabel(){return this.getAttribute("remove-device-label")||"Sign out"}get currentDeviceLabel(){return this.getAttribute("current-device-label")||"Current device"}get lastLoginLabel(){return this.getAttribute("last-login-label")||"Last login:"}get direction(){return this.getAttribute("st-host-direction")}}),ob=tb.cssVarList,ib={[ob.hostWidth]:"auto",[ob.hostWidth]:"300px",[ob.hostMinWidth]:"300px",[ob.listBackgroundColor]:"transparent",[ob.listBorderRadius]:"0",[ob.listBorderWidth]:"0",[ob.listPadding]:"0",[ob.listBoxShadow]:"none",[ob.listItemsGap]:eh.spacing.lg,[ob.itemBorderColor]:eh.colors.surface.light,[ob.itemVerticalPadding]:eh.spacing.lg,[ob.itemHorizontalPadding]:eh.spacing.lg,[ob.itemBorderRadius]:eh.radius.xs,[ob.itemOutline]:"transparent",[ob.itemBackgroundColor]:"transparent",[ob.itemCursor]:"default",[ob.itemContentGap]:eh.spacing.sm,[ob.badgeBorderColor]:eh.colors.surface.light,[ob.badgeTextColor]:eh.colors.surface.dark,[ob.badgeBorderRadius]:eh.radius.xs,[ob.badgeBackgroundColor]:eh.colors.surface.main,[ob.devicePanelGap]:eh.spacing.md,[ob.deviceIconGap]:eh.spacing.md,[ob.deviceIconSize]:"24px",[ob.lastLoginLabelGap]:eh.spacing.xs,_fullWidth:{[ob.hostWidth]:"100%"}};var rb=Object.freeze({__proto__:null,default:ib,vars:ob});const nb=k("tooltip"),sb=["text","position","hide-delay","hover-delay","opened"];class ab extends(ye({componentName:nb,baseSelector:"vaadin-tooltip"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <descope-anchored>\n <slot></slot>\n <vaadin-tooltip slot="anchored"></vaadin-tooltip>\n </descope-anchored>\n ',this.defaultSlot=this.shadowRoot.querySelector("slot:not([name])"),this.tooltip=this.shadowRoot.querySelector("vaadin-tooltip"),this.anchored=this.shadowRoot.querySelector("descope-anchored")}#so(){const e=this.anchored?.classList?.contains("hidden");this.classList.toggle("hidden",e)}static get observedAttributes(){return sb.concat(super.observedAttributes||[])}get isOpened(){return"true"===this.getAttribute("opened")}get overlay(){return this.tooltip?._overlayElement}get overlayContentNode(){return this.overlay?.shadowRoot.querySelector('[part="content"]')}get tooltipText(){return this.getAttribute("text")?.trim()||""}get isStaticDisplay(){return"true"===this.getAttribute("static-display")}get srLabel(){return this.tooltip?.querySelector('[slot="sr-label"]')}#ao(){this.isStaticDisplay?(this.#lo(),this.setAttribute("inert","true")):this.removeAttribute("inert")}#lo(){this.overlay&&(this.overlay.style.display="block",this.overlay.style.position="static")}init(){super.init?.(),V('\n :host {\n display: inline-block;\n }\n vaadin-tooltip {\n display: block;\n position: absolute;\n width: 0;\n height: 0;\n overflow: hidden;\n }\n /* Stack anchor above the anchored element so the tooltip flows below it inline. */\n :host([static-display="true"]) descope-anchored::part(root) {\n flex-direction: column;\n }\n :host([static-display="true"]) descope-anchored::part(anchored) {\n position: static;\n inset: unset;\n }\n :host([static-display="true"]) vaadin-tooltip {\n position: static;\n width: auto;\n height: auto;\n overflow: visible;\n }\n :host([static-display="true"]) vaadin-tooltip [slot="sr-label"] {\n display: none;\n }\n',this),this.defaultSlot.addEventListener("slotchange",()=>this.#do()),this.#do(),this.#so(),setTimeout(()=>this.#co())}#do(){const e=this.defaultSlot?.assignedElements()?.[0];e&&(this.tooltip.target=e)}#co(){this.#po(),this.#ho(),L(this,this.tooltip,{includeAttrs:["position","opened"]}),this.#uo()}#go(){this.overlayContentNode.innerHTML=""}#mo(){const e=document.createElement("descope-enriched-text");return e.setAttribute("link-target-blank","true"),e.textContent=this.tooltipText,e}#po(){this.overlayContentNode&&setTimeout(()=>{this.#go(),this.textComponent=this.#mo(),this.overlayContentNode.appendChild(this.textComponent),this.srLabel&&!this.tooltipText&&this.srLabel.setAttribute("aria-hidden","true"),L(this,this.textComponent,{includeAttrs:["readonly"]})})}#ho(){if(!this.overlay)return;const e=this.overlay._attachOverlay?.bind(this.overlay);this.overlay._detachOverlay=()=>{},this.overlay._attachOverlay=()=>{e?.(),setTimeout(()=>{this.tooltip.shadowRoot.appendChild(this.overlay),this.overlay._updatePosition?.()})},this.isOpened&&setTimeout(()=>{this.tooltip.shadowRoot.appendChild(this.overlay),this.#ao(),this.overlay._updatePosition?.()})}#uo(){this.tooltip?.toggleAttribute("manual",this.isOpened)}#bo(e){if(!this.textComponent)return;const t=(e??"").trim();this.textComponent.textContent=t,this.srLabel&&(t?this.srLabel.removeAttribute("aria-hidden"):this.srLabel.setAttribute("aria-hidden","true"))}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),t!==o&&("text"===e&&this.#bo(o),"opened"===e&&this.#uo())}}const{overlay:lb,content:db}={overlay:{selector:()=>"vaadin-tooltip-overlay::part(overlay)"},content:{selector:()=>"vaadin-tooltip-overlay::part(content)"}},cb=I(he,Ne({selector:"",mappings:{fontFamily:{...db,property:Oe.cssVarList.fontFamilyOverride},fontSize:{...db,property:Oe.cssVarList.fontSizeOverride},fontWeight:{...db,property:Oe.cssVarList.fontWeightOverride},textColor:{...db,property:Oe.cssVarList.textColorOverride},hostDirection:{...db,property:Oe.cssVarList.hostDirectionOverride},backgroundColor:[{...lb},{...db}],borderColor:{...lb},borderStyle:{...lb},borderWidth:{...lb},borderRadius:{...lb},boxShadow:{...lb},horizontalPadding:[{...db,property:"padding-left"},{...db,property:"padding-right"}],verticalPadding:[{...db,property:"padding-top"},{...db,property:"padding-bottom"}]},forward:{attributes:["style"],include:!1}}))(ab),pb=te(eh),hb=cb.cssVarList,[ub,gb,mb]=ie({shadowColor:"#00000020"},nb),{shadowColor:bb}=gb,yb=`${pb.shadow.wide.sm} ${bb}, ${pb.shadow.narrow.sm} ${bb}`,fb={...ub,[hb.fontFamily]:pb.fonts.font1.family,[hb.fontSize]:eh.typography.body2.size,[hb.fontWeight]:eh.typography.body2.weight,[hb.textColor]:pb.colors.surface.contrast,[hb.hostDirection]:pb.direction,[hb.backgroundColor]:pb.colors.surface.main,[hb.borderColor]:pb.colors.surface.light,[hb.borderStyle]:"solid",[hb.borderWidth]:pb.border.xs,[hb.borderRadius]:pb.radius.xs,[hb.horizontalPadding]:pb.spacing.md,[hb.verticalPadding]:pb.spacing.sm,[hb.boxShadow]:yb,shadow:{sm:{[hb.boxShadow]:yb},md:{[hb.boxShadow]:`${pb.shadow.wide.md} ${bb}, ${pb.shadow.narrow.md} ${bb}`},lg:{[hb.boxShadow]:`${pb.shadow.wide.lg} ${bb}, ${pb.shadow.narrow.lg} ${bb}`},xl:{[hb.boxShadow]:`${pb.shadow.wide.xl} ${bb}, ${pb.shadow.narrow.xl} ${bb}`},"2xl":{[mb.shadowColor]:"#00000050",[hb.boxShadow]:`${pb.shadow.wide["2xl"]} ${bb}`}}};var vb=Object.freeze({__proto__:null,default:fb,vars:hb});const xb=async e=>{const t=await fetch(e);if(!t.ok)throw new Error(`[dataService] ${t.status} ${e}`);const o=await t.json();return o.data??o},Cb=async e=>xb(`${e}/countries.json`),wb=async(e,t)=>{try{return(await xb(`${t}/countries/${e}/subdivisions.json`)).map(({code:e,...t})=>({...t,state_code:e}))}catch{return[]}},Ib=async(e,t,o)=>xb(`${o}/countries/${e}/subdivisions/${t}/cities.json`),Sb=async e=>{const t=new URL("../labels.json",`${e}/`).href;return xb(t)},Mb=async(e,t)=>xb(`${t}/countries/${e}/cities.json`),Ab=k("country-subdivision-city-field-internal"),Eb=Symbol("selecting"),Tb=({name:e,translations:t={}},o)=>o&&(t[o]||t[o.split("-")[0]])||e,kb=e=>e?String(e).replace(/[&<>"']/g,e=>`&#${e.charCodeAt(0)};`):"",zb=({name:e,iso2:t,iso3:o,translations:i,lang:r})=>{const n=Tb({name:e,translations:i},r),s=[n,t,o];n!==e&&s.push(e);const a=kb(t),l=kb(s.join(" ")),d=kb(n);return`<div data-id="${a}" data-name="${l}" data-label="${d}">${d}</div>`},Lb=({name:e,state_code:t,translations:o,lang:i})=>{const r=Tb({name:e,translations:o},i),n=[r,t];r!==e&&n.push(e);const s=kb(t),a=kb(n.join(" ")),l=kb(r);return`<div data-id="${s}" data-name="${a}" data-label="${l}">${l}</div>`},Vb=({name:e,translations:t,lang:o})=>{const i=Tb({name:e,translations:t},o),r=[i];i!==e&&r.push(e);const n=kb(e),s=kb(r.join(" ")),a=kb(i);return`<div data-id="${n}" data-name="${s}" data-label="${a}">${a}</div>`},Nb=e=>`<descope-combo-box id="${e}" item-label-path="data-name" item-value-path="data-id" allow-custom-value="false"></descope-combo-box>`,Db=Se({componentName:Ab,baseSelector:""}),Pb=["disabled","readonly","size","bordered"],Bb=["hide-country","hide-subdivision","hide-city"],Fb=[...Pb,"label-type","country-label","subdivision-label","city-label",...Bb,"default-country","allowed-countries","pinned-countries","country-placeholder","subdivision-placeholder","city-placeholder","required","invalid","data-source-base-url","lang"],Rb=I()(class extends Db{static get observedAttributes(){return[].concat(Db.observedAttributes||[],Fb)}#yo;#fo;#vo;#xo=!1;#Co=!1;#wo=new Map;#Io=null;#So=null;#Mo=null;#Ao=null;#Eo=null;constructor(){super(),this.innerHTML=`\n <div class="wrapper">\n ${Nb("country-combo")}\n ${Nb("subdivision-combo")}\n ${Nb("city-combo")}\n </div>\n `,this.#yo=this.querySelector("#country-combo"),this.#fo=this.querySelector("#subdivision-combo"),this.#vo=this.querySelector("#city-combo"),this.#To(),this.#ko()}get#zo(){return"true"===this.getAttribute("hide-country")}get#Lo(){return"true"===this.getAttribute("hide-subdivision")}get#Vo(){return"true"===this.getAttribute("hide-city")}get#No(){return!this.#Do}get#Do(){return this.getAttribute("data-source-base-url")||void 0}get#Po(){const e=this.getAttribute("lang")||void 0;if(e)try{const[t]=Intl.getCanonicalLocales(e);return t}catch{return}}get#Bo(){return this.getAttribute("default-country")?.toUpperCase()||void 0}get#Fo(){return this.getAttribute("subdivision-label")||void 0}get#Ro(){return this.getAttribute("subdivision-placeholder")||void 0}get#Wo(){return(this.getAttribute("allowed-countries")||"").split(",").map(e=>e.trim().toUpperCase()).filter(Boolean)}get#Oo(){return(this.getAttribute("pinned-countries")||"").split(",").map(e=>e.trim().toUpperCase()).filter(Boolean)}get#jo(){return[this.#yo,this.#fo,this.#vo]}get value(){return{country:this.#zo?this.#Bo:this.#yo.value||void 0,subdivision:!this.#Lo&&this.#xo&&this.#fo.value||void 0,city:!this.#Vo&&this.#Co&&this.#vo.value||void 0}}set value(e){if(!e)return;let t;try{t="string"==typeof e?JSON.parse(e):e}catch{return}this.#Eo={...t},this.#Do&&this.#$o()}init(){this.addEventListener("focus",e=>{if(e.isTrusted){const e=this.#jo.find(e=>!e.classList.contains(`${Ab}-hidden`)&&!e.checkValidity());(e||this.#_o())?.focus()}}),super.init?.(),this.#Ho(),this.#qo(),this.#Yo(),this.#Uo()}#Uo(){this.#yo.renderItem=zb,this.#fo.renderItem=Lb,this.#vo.renderItem=Vb}attributeChangedCallback(e,t,o){if(super.attributeChangedCallback?.(e,t,o),t!==o)if("required"===e)this.#Go();else if(Bb.includes(e)||"data-source-base-url"===e)this.#Ho(),"data-source-base-url"===e&&this.#Yo();else if("default-country"===e){const e=o?.toUpperCase();if(e&&e!==o)return void this.setAttribute("default-country",e);e&&this.#wo.size?this.#Zo(e):e&&this.#zo&&this.#Qo()}else"lang"===e?this.#Jo():"invalid"===e?"true"===o&&this.#Ko():"allowed-countries"===e||"pinned-countries"===e?this.#zo||(this.#Io?this.#Xo(this.#Io):this.#Qo()):"country-label"===e?this.#ei(this.#yo,"label",o):"subdivision-label"===e?this.#ei(this.#fo,"label",o):"city-label"===e&&this.#ei(this.#vo,"label",o)}getValidity(){if(!this.isRequired)return{};const e=!this.#zo&&!this.#yo.value,t=!this.#Lo&&(this.#No||this.#xo)&&!this.#fo.value,o=!this.#Vo&&(this.#No||this.#Co)&&!this.#vo.value;return e||t||o?{valueMissing:!0}:{}}#Ko(){for(const e of[...this.#jo].reverse())e.classList.contains(`${Ab}-hidden`)||e.checkValidity()||e.reportValidity()}#To(){[this.#yo,this.#fo,this.#vo].forEach(e=>{e.customValueTransformFn=t=>{const o=e.baseElement?.items?.find(e=>e["data-name"]===t);return o?.getAttribute("data-label")??t}})}#ko(){this.#jo.forEach(e=>{L(this,e,{includeAttrs:[...Pb,"label-type"]})}),L(this,this.#yo,{includeAttrs:["default-country"],mapAttrs:{"default-country":"default-value"}}),[[this.#yo,"country-placeholder"],[this.#fo,"subdivision-placeholder"],[this.#vo,"city-placeholder"]].forEach(([e,t])=>{L(this,e,{includeAttrs:[t],mapAttrs:{[t]:"placeholder"}})})}#qo(){this.#yo.addEventListener("input",()=>this.#ti()),this.#fo.addEventListener("input",()=>this.#oi()),this.#vo.addEventListener("input",()=>this.#ii()),this.handleFocusEventsDispatching(this.#jo)}#Yo(){this.#Do&&(this.#Eo?this.#$o():this.#zo&&!this.#Bo||this.#Qo())}async#$o(){const{country:e,subdivision:t,city:o}=this.#Eo,i=!!t&&!this.#Lo,r=!!o&&!this.#Vo,n=this.#Io??Cb(this.#Do),s=this.#Ao??Sb(this.#Do),a=i&&e?wb(e,this.#Do):null,l=r&&e?i&&t?Ib(e,t,this.#Do):Mb(e,this.#Do):null,[d,c,p,h]=(await Promise.allSettled([n,s,a,l])).map(e=>"fulfilled"===e.status?e.value:null);if(!this.#Eo)return;c&&(this.#Ao=c);const u=[];d&&(this.#Io||(this.#Io=d,this.#Xo(d)),e&&!this.#zo&&u.push([this.#yo,e]));const g=e?this.#wo.get(e):null;g?.subdivisionType&&this.#ri(g.subdivisionType),p&&(this.#So=p,this.#xo=p.length>0,p.length>0&&(this.#fo.data=p.map(e=>({...e,lang:this.#Po})),t&&u.push([this.#fo,t]))),h&&(this.#Co=h.length>0,h.length>0&&(this.#Mo=h,this.#vo.data=h.map(e=>({...e,lang:this.#Po})),o&&u.push([this.#vo,o]))),this.#Ho(),this.#Eo=Eb,setTimeout(()=>{if(this.#Eo===Eb){for(const[e,t]of u){const o=e.items?.find(e=>e["data-id"]===t);o&&(e.selectedItem=o)}this.#Eo=null}})}#ti(){this.#Eo!==Eb&&(this.#Eo=null,this.#ni(),this.#si(),this.#Zo(this.#yo.value),this.#ii())}#oi(){if(this.#Eo===Eb)return;this.#Eo=null;const e=this.#fo.value;if(this.#si(),!this.#Vo&&e){const t=this.#yo.value;t&&this.#ai(t,e)}this.#ii()}#Zo(e){if(!e)return;const t=this.#wo.get(e);if(!t)return;const{hasSubdivisions:o,subdivisionType:i}=t;!this.#Lo&&o?(this.#ri(i),this.#li(e)):this.#Vo||this.#ai(e)}#ri(e){const t=this.#di(e);this.#Fo||this.#ei(this.#fo,"label",t||null),this.#Ro||this.#ei(this.#fo,"placeholder",t||null)}#di(e){const t=this.#Ao?.subdivisionTypes,o=t?.[e]??t?._fallback;if(!o)return e;const i=this.#Po;return i&&(o[i]||o[i.split("-")[0]])||o.en||e}async#ci(){try{this.#Ao=await Sb(this.#Do)}catch{}}async#Qo(){if(this.#Do){this.#yo.setAttribute("loading","true");try{const[e]=await Promise.all([Cb(this.#Do),this.#ci()]);this.#Io=e,this.#Xo(e),!this.#Eo&&this.#Bo&&this.#Zo(this.#Bo)}catch(e){console.error(`[${Ab}] Failed to load countries`,e)}finally{this.#yo.removeAttribute("loading")}}}async#li(e){this.#pi(this.#fo,!0),this.#fo.setAttribute("loading","true");try{const t=await wb(e,this.#Do);this.#So=t,this.#xo=t.length>0,this.#Ho(),t.length>0?this.#fo.data=t.map(e=>({...e,lang:this.#Po})):this.#Vo||this.#ai(e)}catch(t){console.error(`[${Ab}] Failed to load subdivisions for ${e}`,t),this.#xo=!1,this.#hi()}finally{this.#fo.removeAttribute("loading")}}async#ai(e,t){this.#vo.setAttribute("loading","true");try{const o=await(t?Ib(e,t,this.#Do):Mb(e,this.#Do));this.#Co=o.length>0,this.#Ho(),o.length>0&&(this.#Mo=o,this.#vo.data=o.map(e=>({...e,lang:this.#Po})))}catch(o){console.error(`[${Ab}] Failed to load cities for ${e}${t?`/${t}`:""}`,o)}finally{this.#vo.removeAttribute("loading")}}#Jo(){if(this.#Io){const e=this.#yo.value;this.#Xo(this.#Io),e&&this.#ui(this.#yo,e)}if(this.#So&&this.#xo){const e=this.#fo.value;this.#fo.data=this.#So.map(e=>({...e,lang:this.#Po})),e&&this.#ui(this.#fo,e)}if(this.#Mo&&this.#Co){const e=this.#vo.value;this.#vo.data=this.#Mo.map(e=>({...e,lang:this.#Po})),e&&this.#ui(this.#vo,e)}const e=this.#yo.value;if(e){const t=this.#wo.get(e);t?.subdivisionType&&this.#ri(t.subdivisionType)}}#Xo(e){const t=this.#gi(e);this.#yo.data=t.map(e=>({...e,lang:this.#Po})),this.#wo=new Map(e.map(e=>[e.iso2,e]))}#gi(e){const t=this.#Wo,o=this.#Oo;let i=t.length?e.filter(e=>t.includes(e.iso2)):[...e];return i.sort((e,t)=>Tb(e,this.#Po).localeCompare(Tb(t,this.#Po),this.#Po)),o.length?[...o.map(e=>i.find(t=>t.iso2===e)).filter(Boolean),...i.filter(e=>!o.includes(e.iso2))]:i}#hi(){this.#pi(this.#yo,!this.#zo),this.#pi(this.#fo,!this.#Lo&&(this.#No||this.#xo)),this.#pi(this.#vo,!this.#Vo&&(this.#No||this.#Co))}#pi(e,t){e?.classList.toggle(`${Ab}-hidden`,!t)}#Go(){const e=this.hasAttribute("required")?"true":null;this.#ei(this.#yo,"required",this.#zo?null:e),this.#ei(this.#fo,"required",this.#Lo||!this.#No&&!this.#xo?null:e),this.#ei(this.#vo,"required",this.#Vo||!this.#No&&!this.#Co?null:e)}#Ho(){this.#hi(),this.#Go(),this.setCustomValidity("")}#ni(){this.#fo.value="",this.#fo.data=[],this.#xo=!1,this.#Fo||this.#fo.removeAttribute("label"),this.#Ro||this.#fo.removeAttribute("placeholder"),this.#Ho()}#si(){this.#vo.value="",this.#vo.data=[],this.#Mo=null,this.#Co=!1,this.#Ho()}#ii(){this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))}#ei(e,t,o){o?e.setAttribute(t,o):e.removeAttribute(t)}#_o(){return this.#jo.find(e=>!e.classList.contains(`${Ab}-hidden`))}#ui(e,t){setTimeout(()=>{const o=e.items?.find(e=>e["data-id"]===t);o&&(e.selectedItem=o)})}}),Wb=k("country-subdivision-city-field"),Ob={selector:()=>":host"},jb={selector:`${Ab} > .wrapper`},$b={selector:`${Ab} > .wrapper > descope-combo-box`},_b=I(ce({componentNameOverride:k("input-wrapper")}),ce({mappings:{hostWidth:{...Ob,property:"width"},hostDirection:[{...Ob,property:"direction"},{...$b,property:xi.cssVarList.hostDirection}],flexDirection:{...jb,property:"flex-direction"},flexGap:{...jb,property:"gap"},itemAlignment:{...jb,property:"align-items"},itemMinWidth:{...$b,property:"min-width"},itemFlexGrow:{...$b,property:"flex-grow"},itemWidth:{...$b,property:xi.cssVarList.hostWidth}}}),pe,Le({proxyProps:["value"],inputEvent:"input",proxyParentValidation:!0}),he,e=>class extends e{init(){super.init?.();const e=document.createElement("template");e.innerHTML=`\n <${Ab}\n tabindex="-1"\n ></${Ab}>\n `,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(Ab),L(this,this.inputElement,{includeAttrs:["size","bordered","required","label-type","disabled","readonly","hide-country","hide-subdivision","hide-city","default-country","allowed-countries","pinned-countries","country-label","subdivision-label","city-label","country-placeholder","subdivision-placeholder","city-placeholder","data-source-base-url","lang","invalid"]}),T(this,this.inputElement,{includeAttrs:["invalid"]})}})(Ee({slots:[],wrappedEleName:"vaadin-custom-field",style:()=>`\n :host {\n display: inline-flex;\n max-width: 100%;\n }\n vaadin-custom-field {\n line-height: unset;\n width: 100%;\n }\n\n ${Ab} {\n display: inline-block;\n box-sizing: border-box;\n user-select: none;\n width: 100%;\n max-width: 100%;\n }\n\n ${Ab} > .wrapper {\n display: flex;\n width: 100%;\n flex-wrap: wrap;\n }\n\n .${Ab}-hidden {\n display: none;\n }\n\n`,excludeAttrsSync:["tabindex","style","error-message"],componentName:Wb})),Hb=_b.cssVarList,qb={[Hb.hostWidth]:Ah.width,[Hb.hostDirection]:Ah.direction,[Hb.flexDirection]:"column",[Hb.flexGap]:"0.5em",[Hb.itemAlignment]:"stretch",[Hb.itemFlexGrow]:"0",[Hb.itemWidth]:"auto",_fullWidth:{[Hb.hostWidth]:"100%"},_horizontal:{[Hb.flexDirection]:"row",[Hb.itemFlexGrow]:"1"}};var Yb=Object.freeze({__proto__:null,default:qb,vars:Hb});const Ub=k("attachment"),Gb=["top-end","top-start","top-center","bottom-start","bottom-end","bottom-center"],Zb=Gb[0];class Qb extends(ye({componentName:Ub,baseSelector:"descope-anchored"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <descope-anchored>\n <slot></slot>\n <div slot="anchored" class="attachment-container">\n <slot name="attachment"></slot>\n </div>\n </descope-anchored>\n ',this.defaultSlot=this.shadowRoot.querySelector("slot:not([name])"),this.attachmentSlot=this.shadowRoot.querySelector('slot[name="attachment"]'),this.anchored=this.shadowRoot.querySelector("descope-anchored")}get#mi(){return this.attachmentSlot?.assignedElements()[0]}static get observedAttributes(){return[...super.observedAttributes||[],"position"]}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),"position"===e&&t!==o&&this.#bi()}init(){super.init?.(),this.#so(),V("\n :host {\n display: inline-block;\n }\n :host(.hidden) {\n display: none;\n }\n .attachment-container {\n position: absolute;\n z-index: 1;\n pointer-events: none;\n width: 100%;\n display: flex;\n align-items: center;\n container-type: inline-size;\n }\n",this),this.#bi();const e=this.shadowRoot.querySelector(".attachment-container");M(e,()=>this.#yi(),{includeAttrs:["st-host-direction"]}),this.attachmentSlot.addEventListener("slotchange",()=>this.#yi()),this.defaultSlot.addEventListener("slotchange",()=>{this.#fi(),window.requestAnimationFrame(()=>this.#vi())}),window.requestAnimationFrame(()=>this.#fi())}#so(){const e=this.anchored?.classList?.contains("hidden");this.classList.toggle("hidden",e)}#vi(){const e=this.defaultSlot?.assignedElements()?.[0],t=e?.getBoundingClientRect();if(t){const e=t.width;this.#mi?.setAttribute("data-attachment-size",Number(e))}}#fi(){const e=this.defaultSlot?.assignedElements()?.length>0;this.classList.toggle("hidden",!e)}#yi(){const e=this.shadowRoot.querySelector(".attachment-container")?.getAttribute("st-host-direction");e&&this.#mi?.setAttribute("st-host-direction",e)}get offsetX(){return this.getAttribute("offset-x")||"0px"}get offsetY(){return this.getAttribute("offset-y")||"0px"}#bi(){const e=this.getAttribute("position");Gb.includes(e)||this.setAttribute("position",Zb)}}const Jb={selector:()=>".attachment-container"},Kb=I(ce({mappings:{transform:{...Jb},justifyContent:{...Jb},maxWidth:{...Jb},top:{...Jb},bottom:{...Jb},left:{...Jb},right:{...Jb},offsetX:{},offsetY:{}}}),pe,he)(Qb),Xb=Kb.cssVarList,ey=`calc(8px + var(${Xb.offsetX}))`,ty={[Xb.maxWidth]:"calc(100% - 2 * 8px)",position:{"top-start":{[Xb.transform]:"translateY(-50%)",[Xb.justifyContent]:"start",[Xb.left]:ey,[Xb.top]:oe(Xb.offsetY)},"top-center":{[Xb.transform]:"translate(-50%, -50%)",[Xb.justifyContent]:"center",[Xb.top]:oe(Xb.offsetY),[Xb.left]:"50%"},"top-end":{[Xb.transform]:"translateY(-50%)",[Xb.justifyContent]:"end",[Xb.right]:ey,[Xb.top]:oe(Xb.offsetY)},"bottom-start":{[Xb.transform]:"translateY(50%)",[Xb.justifyContent]:"start",[Xb.left]:ey,[Xb.bottom]:oe(Xb.offsetY)},"bottom-center":{[Xb.bottom]:oe(Xb.offsetY),[Xb.transform]:"translate(-50%, 50%)",[Xb.justifyContent]:"center",[Xb.left]:"50%"},"bottom-end":{[Xb.transform]:"translateY(50%)",[Xb.justifyContent]:"end",[Xb.right]:ey,[Xb.bottom]:oe(Xb.offsetY)}}};var oy=Object.freeze({__proto__:null,default:ty});const iy=Je("input-wrapper"),ry=Mt(Zp),[ny,sy,ay]=Dt({labelTextColor:ry.colors.surface.dark,labelFontSize:"14px",labelFontWeight:"500",inputValueFontWeight:"400",inputPlaceholderFontWeight:"400",helperTextFontWeight:"400",errorMessageFontWeight:"400",valueTextColor:ry.colors.surface.contrast,placeholderTextColor:ry.colors.surface.dark,requiredIndicator:"'*'",helperTextColor:ry.colors.surface.dark,errorMessageTextColor:ry.colors.error.main,successMessageTextColor:ry.colors.success.main,borderWidth:ry.border.xs,borderRadius:ry.radius.xs,borderColor:"transparent",outlineWidth:ry.border.sm,outlineStyle:"solid",outlineColor:"transparent",outlineOffset:"0px",minWidth:"10em",toggleButtonSize:"1.5em",inputIconSize:"1em",inputHeight:"3em",horizontalPadding:"0.5em",verticalPadding:"0.5em",textAlign:"start",backgroundColor:ry.colors.surface.main,fontFamily:ry.fonts.font1.family,direction:ry.direction,overlayOpacity:"0.3",errorMessageIcon:"",errorMessageIconSize:"0",errorMessageIconPadding:"0",errorMessageIconPosition:"0 0.4em",errorMessageFontSize:"0.8125rem",errorMessageIconRepeat:"no-repeat",size:{xs:{fontSize:"12px",chipFontSize:"10px"},sm:{fontSize:"14px",chipFontSize:"12px"},md:{fontSize:"16px",chipFontSize:"14px"},lg:{fontSize:"18px",chipFontSize:"16px"}},labelType:{static:{valueInputHeight:"3em",valueInputMarginBottom:"auto"},floating:{labelPosition:"absolute",labelTopPosition:"0",labelHorizontalPosition:"0.9em",labelFontSize:"1em",placeholderOpacity:0,inputHeight:"3.5em",inputVerticalAlignment:"flex-end",inputTransformY:"translateY(1.55em)",inputTransition:"all 75ms ease-in-out",marginInlineStart:"0",valueInputHeight:"1.5702em",valueInputMarginBottom:"0.5em",_focused:{labelFontSize:"0.75em",inputTransformY:"translateY(1.05em)",labelFontWeight:"400",placeholderOpacity:1},_readOnly:{placeholderOpacity:0},_hasValue:{inputTransformY:"translateY(1.05em)",labelFontSize:"0.75em",labelFontWeight:"400"}}},_fullWidth:{width:"100%"},_bordered:{outlineWidth:ry.border.xs,borderColor:ry.colors.surface.light,borderStyle:"solid",_invalid:{borderColor:ry.colors.error.main}},_focused:{outlineColor:ry.colors.surface.light,_invalid:{outlineColor:ry.colors.error.main}},_disabled:{labelTextColor:ry.colors.surface.light,borderColor:ry.colors.surface.light,valueTextColor:ry.colors.surface.light,placeholderTextColor:ry.colors.surface.light,helperTextColor:ry.colors.surface.light,backgroundColor:ry.colors.surface.main},_obfuscated:{inputTextSecurity:"disc"}},iy);var ly=Object.freeze({__proto__:null,default:ny,refs:sy,vars:ay});const dy=Mt(Zp),cy=Zr.cssVarList,py={[cy.hostWidth]:sy.width,[cy.hostMinWidth]:sy.minWidth,[cy.hostDirection]:sy.direction,[cy.fontSize]:sy.fontSize,[cy.fontFamily]:sy.fontFamily,[cy.labelFontSize]:sy.labelFontSize,[cy.labelFontWeight]:sy.labelFontWeight,[cy.inputValueFontWeight]:sy.inputValueFontWeight,[cy.inputPlaceholderFontWeight]:sy.inputPlaceholderFontWeight,[cy.helperTextFontWeight]:sy.helperTextFontWeight,[cy.errorMessageFontWeight]:sy.errorMessageFontWeight,[cy.labelTextColor]:sy.labelTextColor,[cy.labelRequiredIndicator]:sy.requiredIndicator,[cy.errorMessageTextColor]:sy.errorMessageTextColor,[cy.inputValueTextColor]:sy.valueTextColor,[cy.inputPlaceholderColor]:sy.placeholderTextColor,[cy.inputBorderWidth]:sy.borderWidth,[cy.inputBorderStyle]:sy.borderStyle,[cy.inputBorderColor]:sy.borderColor,[cy.inputBorderRadius]:sy.borderRadius,[cy.inputOutlineWidth]:sy.outlineWidth,[cy.inputOutlineStyle]:sy.outlineStyle,[cy.inputOutlineColor]:sy.outlineColor,[cy.inputOutlineOffset]:sy.outlineOffset,[cy.inputBackgroundColor]:sy.backgroundColor,[cy.inputHeight]:sy.inputHeight,[cy.inputHorizontalPadding]:sy.horizontalPadding,[cy.helperTextColor]:sy.helperTextColor,[cy.textAlign]:sy.textAlign,textAlign:{right:{[cy.inputTextAlign]:"right"},left:{[cy.inputTextAlign]:"left"},center:{[cy.inputTextAlign]:"center"}},[cy.labelPosition]:sy.labelPosition,[cy.labelTopPosition]:sy.labelTopPosition,[cy.labelHorizontalPosition]:sy.labelHorizontalPosition,[cy.inputTransformY]:sy.inputTransformY,[cy.inputTransition]:sy.inputTransition,[cy.marginInlineStart]:sy.marginInlineStart,[cy.placeholderOpacity]:sy.placeholderOpacity,[cy.inputVerticalAlignment]:sy.inputVerticalAlignment,[cy.valueInputHeight]:sy.valueInputHeight,[cy.valueInputMarginBottom]:sy.valueInputMarginBottom,[cy.inputIconOffset]:dy.spacing.md,[cy.inputIconSize]:sy.inputIconSize,[cy.inputIconColor]:sy.placeholderTextColor,[cy.errorMessageIcon]:sy.errorMessageIcon,[cy.errorMessageIconSize]:sy.errorMessageIconSize,[cy.errorMessageIconPadding]:sy.errorMessageIconPadding,[cy.errorMessageIconRepeat]:sy.errorMessageIconRepeat,[cy.errorMessageIconPosition]:sy.errorMessageIconPosition,[cy.errorMessageFontSize]:sy.errorMessageFontSize,[cy.inputTextSecurity]:sy.inputTextSecurity};var hy=Object.freeze({__proto__:null,default:py,textField:py,vars:cy});const uy=Mt(Zp),gy=ds.cssVarList,my={[gy.hostWidth]:sy.width,[gy.hostMinWidth]:sy.minWidth,[gy.hostDirection]:sy.direction,[gy.fontSize]:sy.fontSize,[gy.fontFamily]:sy.fontFamily,[gy.labelFontSize]:sy.labelFontSize,[gy.labelFontWeight]:sy.labelFontWeight,[gy.inputValueFontWeight]:sy.inputValueFontWeight,[gy.inputPlaceholderFontWeight]:sy.inputPlaceholderFontWeight,[gy.helperTextFontWeight]:sy.helperTextFontWeight,[gy.errorMessageFontWeight]:sy.errorMessageFontWeight,[gy.labelTextColor]:sy.labelTextColor,[gy.errorMessageTextColor]:sy.errorMessageTextColor,[gy.inputHorizontalPadding]:sy.horizontalPadding,[gy.inputHeight]:sy.inputHeight,[gy.inputBackgroundColor]:sy.backgroundColor,[gy.labelRequiredIndicator]:sy.requiredIndicator,[gy.inputValueTextColor]:sy.valueTextColor,[gy.inputPlaceholderTextColor]:sy.placeholderTextColor,[gy.inputBorderWidth]:sy.borderWidth,[gy.inputBorderStyle]:sy.borderStyle,[gy.inputBorderColor]:sy.borderColor,[gy.inputBorderRadius]:sy.borderRadius,[gy.inputOutlineWidth]:sy.outlineWidth,[gy.inputOutlineStyle]:sy.outlineStyle,[gy.inputOutlineColor]:sy.outlineColor,[gy.inputOutlineOffset]:sy.outlineOffset,[gy.revealButtonOffset]:uy.spacing.md,[gy.revealButtonSize]:sy.toggleButtonSize,[gy.revealButtonColor]:sy.placeholderTextColor,[gy.labelPosition]:sy.labelPosition,[gy.labelTopPosition]:sy.labelTopPosition,[gy.labelHorizontalPosition]:sy.labelHorizontalPosition,[gy.inputTransformY]:sy.inputTransformY,[gy.inputTransition]:sy.inputTransition,[gy.marginInlineStart]:sy.marginInlineStart,[gy.placeholderOpacity]:sy.placeholderOpacity,[gy.inputVerticalAlignment]:sy.inputVerticalAlignment,[gy.valueInputHeight]:sy.valueInputHeight,[gy.errorMessageIcon]:sy.errorMessageIcon,[gy.errorMessageIconSize]:sy.errorMessageIconSize,[gy.errorMessageIconPadding]:sy.errorMessageIconPadding,[gy.errorMessageIconRepeat]:sy.errorMessageIconRepeat,[gy.errorMessageIconPosition]:sy.errorMessageIconPosition,[gy.errorMessageFontSize]:sy.errorMessageFontSize};var by=Object.freeze({__proto__:null,default:my,vars:gy});const yy=kn.cssVarList,fy={[yy.hostWidth]:sy.width,[yy.hostMinWidth]:sy.minWidth,[yy.hostDirection]:sy.direction,[yy.fontSize]:sy.fontSize,[yy.fontFamily]:sy.fontFamily,[yy.labelFontSize]:sy.labelFontSize,[yy.labelFontWeight]:sy.labelFontWeight,[yy.inputValueFontWeight]:sy.inputValueFontWeight,[yy.inputPlaceholderFontWeight]:sy.inputPlaceholderFontWeight,[yy.helperTextFontWeight]:sy.helperTextFontWeight,[yy.errorMessageFontWeight]:sy.errorMessageFontWeight,[yy.labelTextColor]:sy.labelTextColor,[yy.errorMessageTextColor]:sy.errorMessageTextColor,[yy.inputValueTextColor]:sy.valueTextColor,[yy.inputPlaceholderColor]:sy.placeholderTextColor,[yy.inputBorderWidth]:sy.borderWidth,[yy.inputBorderStyle]:sy.borderStyle,[yy.inputBorderColor]:sy.borderColor,[yy.inputBorderRadius]:sy.borderRadius,[yy.inputOutlineWidth]:sy.outlineWidth,[yy.inputOutlineStyle]:sy.outlineStyle,[yy.inputOutlineColor]:sy.outlineColor,[yy.inputOutlineOffset]:sy.outlineOffset,[yy.inputBackgroundColor]:sy.backgroundColor,[yy.labelRequiredIndicator]:sy.requiredIndicator,[yy.inputHorizontalPadding]:sy.horizontalPadding,[yy.inputHeight]:sy.inputHeight,[yy.labelPosition]:sy.labelPosition,[yy.labelTopPosition]:sy.labelTopPosition,[yy.labelHorizontalPosition]:sy.labelHorizontalPosition,[yy.inputTransformY]:sy.inputTransformY,[yy.inputTransition]:sy.inputTransition,[yy.marginInlineStart]:sy.marginInlineStart,[yy.placeholderOpacity]:sy.placeholderOpacity,[yy.inputVerticalAlignment]:sy.inputVerticalAlignment,[yy.valueInputHeight]:sy.valueInputHeight,[yy.valueInputMarginBottom]:sy.valueInputMarginBottom,[yy.errorMessageIcon]:sy.errorMessageIcon,[yy.errorMessageIconSize]:sy.errorMessageIconSize,[yy.errorMessageIconPadding]:sy.errorMessageIconPadding,[yy.errorMessageIconRepeat]:sy.errorMessageIconRepeat,[yy.errorMessageIconPosition]:sy.errorMessageIconPosition,[yy.errorMessageFontSize]:sy.errorMessageFontSize};var vy=Object.freeze({__proto__:null,default:fy,vars:yy});const xy=xn.cssVarList,Cy={[xy.hostWidth]:sy.width,[xy.hostMinWidth]:sy.minWidth,[xy.hostDirection]:sy.direction,[xy.fontSize]:sy.fontSize,[xy.fontFamily]:sy.fontFamily,[xy.labelFontSize]:sy.labelFontSize,[xy.labelFontWeight]:sy.labelFontWeight,[xy.inputValueFontWeight]:sy.inputValueFontWeight,[xy.inputPlaceholderFontWeight]:sy.inputPlaceholderFontWeight,[xy.helperTextFontWeight]:sy.helperTextFontWeight,[xy.errorMessageFontWeight]:sy.errorMessageFontWeight,[xy.labelTextColor]:sy.labelTextColor,[xy.errorMessageTextColor]:sy.errorMessageTextColor,[xy.inputValueTextColor]:sy.valueTextColor,[xy.labelRequiredIndicator]:sy.requiredIndicator,[xy.inputPlaceholderColor]:sy.placeholderTextColor,[xy.inputBorderWidth]:sy.borderWidth,[xy.inputBorderStyle]:sy.borderStyle,[xy.inputBorderColor]:sy.borderColor,[xy.inputBorderRadius]:sy.borderRadius,[xy.inputOutlineWidth]:sy.outlineWidth,[xy.inputOutlineStyle]:sy.outlineStyle,[xy.inputOutlineColor]:sy.outlineColor,[xy.inputOutlineOffset]:sy.outlineOffset,[xy.inputBackgroundColor]:sy.backgroundColor,[xy.inputHorizontalPadding]:sy.horizontalPadding,[xy.inputHeight]:sy.inputHeight,[xy.labelPosition]:sy.labelPosition,[xy.labelTopPosition]:sy.labelTopPosition,[xy.labelHorizontalPosition]:sy.labelHorizontalPosition,[xy.inputTransformY]:sy.inputTransformY,[xy.inputTransition]:sy.inputTransition,[xy.marginInlineStart]:sy.marginInlineStart,[xy.placeholderOpacity]:sy.placeholderOpacity,[xy.inputVerticalAlignment]:sy.inputVerticalAlignment,[xy.valueInputHeight]:sy.valueInputHeight,[xy.valueInputMarginBottom]:sy.valueInputMarginBottom,[xy.errorMessageIcon]:sy.errorMessageIcon,[xy.errorMessageIconSize]:sy.errorMessageIconSize,[xy.errorMessageIconPadding]:sy.errorMessageIconPadding,[xy.errorMessageIconRepeat]:sy.errorMessageIconRepeat,[xy.errorMessageIconPosition]:sy.errorMessageIconPosition,[xy.errorMessageFontSize]:sy.errorMessageFontSize};var wy=Object.freeze({__proto__:null,default:Cy,vars:xy});const Iy=vs.cssVarList,Sy={[Iy.hostWidth]:sy.width,[Iy.hostMinWidth]:sy.minWidth,[Iy.hostDirection]:sy.direction,[Iy.fontSize]:sy.fontSize,[Iy.fontFamily]:sy.fontFamily,[Iy.labelFontSize]:sy.labelFontSize,[Iy.labelFontWeight]:sy.labelFontWeight,[Iy.inputValueFontWeight]:sy.inputValueFontWeight,[Iy.inputPlaceholderFontWeight]:sy.inputPlaceholderFontWeight,[Iy.helperTextFontWeight]:sy.helperTextFontWeight,[Iy.errorMessageFontWeight]:sy.errorMessageFontWeight,[Iy.labelTextColor]:sy.labelTextColor,[Iy.labelRequiredIndicator]:sy.requiredIndicator,[Iy.errorMessageTextColor]:sy.errorMessageTextColor,[Iy.inputBackgroundColor]:sy.backgroundColor,[Iy.inputValueTextColor]:sy.valueTextColor,[Iy.inputPlaceholderTextColor]:sy.placeholderTextColor,[Iy.inputBorderRadius]:sy.borderRadius,[Iy.inputBorderWidth]:sy.borderWidth,[Iy.inputBorderStyle]:sy.borderStyle,[Iy.inputBorderColor]:sy.borderColor,[Iy.inputOutlineWidth]:sy.outlineWidth,[Iy.inputOutlineStyle]:sy.outlineStyle,[Iy.inputOutlineColor]:sy.outlineColor,[Iy.inputOutlineOffset]:sy.outlineOffset,[Iy.inputResizeType]:"vertical",[Iy.inputMinHeight]:"5em",[Iy.errorMessageIcon]:sy.errorMessageIcon,[Iy.errorMessageIconSize]:sy.errorMessageIconSize,[Iy.errorMessageIconPadding]:sy.errorMessageIconPadding,[Iy.errorMessageIconRepeat]:sy.errorMessageIconRepeat,[Iy.errorMessageIconPosition]:sy.errorMessageIconPosition,[Iy.errorMessageFontSize]:sy.errorMessageFontSize,textAlign:{right:{[Iy.inputTextAlign]:"right"},left:{[Iy.inputTextAlign]:"left"},center:{[Iy.inputTextAlign]:"center"}},_readonly:{[Iy.inputResizeType]:"none"}};var My=Object.freeze({__proto__:null,default:Sy,vars:Iy});const Ay=Mo.cssVarList,Ey="1.35em",Ty={[Ay.hostWidth]:sy.width,[Ay.hostDirection]:sy.direction,[Ay.fontSize]:sy.fontSize,[Ay.fontFamily]:sy.fontFamily,[Ay.labelTextColor]:sy.labelTextColor,[Ay.labelRequiredIndicator]:sy.requiredIndicator,[Ay.labelFontWeight]:"400",[Ay.labelLineHeight]:Ey,[Ay.labelSpacing]:"1em",[Ay.errorMessageTextColor]:sy.errorMessageTextColor,[Ay.inputOutlineWidth]:sy.outlineWidth,[Ay.inputOutlineOffset]:sy.outlineOffset,[Ay.inputOutlineColor]:sy.outlineColor,[Ay.inputOutlineStyle]:sy.outlineStyle,[Ay.inputBorderRadius]:sy.borderRadius,[Ay.inputBorderColor]:sy.borderColor,[Ay.inputBorderWidth]:sy.borderWidth,[Ay.inputBorderStyle]:sy.borderStyle,[Ay.inputBackgroundColor]:sy.backgroundColor,[Ay.inputSize]:Ey,[Ay.inputValueTextColor]:sy.valueTextColor,[Ay.errorMessageIcon]:sy.errorMessageIcon,[Ay.errorMessageIconSize]:sy.errorMessageIconSize,[Ay.errorMessageIconPadding]:sy.errorMessageIconPadding,[Ay.errorMessageIconRepeat]:sy.errorMessageIconRepeat,[Ay.errorMessageIconPosition]:sy.errorMessageIconPosition,[Ay.errorMessageFontSize]:sy.errorMessageFontSize};var ky=Object.freeze({__proto__:null,default:Ty,vars:Ay});const zy="2px",Ly=Mt(Zp),Vy=Zo.cssVarList,Ny={[Vy.hostWidth]:sy.width,[Vy.hostDirection]:sy.direction,[Vy.fontSize]:sy.fontSize,[Vy.fontFamily]:sy.fontFamily,[Vy.inputOutlineWidth]:sy.outlineWidth,[Vy.inputOutlineOffset]:sy.outlineOffset,[Vy.inputOutlineColor]:sy.outlineColor,[Vy.inputOutlineStyle]:sy.outlineStyle,[Vy.trackBorderStyle]:sy.borderStyle,[Vy.trackBorderWidth]:sy.borderWidth,[Vy.trackBorderColor]:sy.borderColor,[Vy.trackBackgroundColor]:sy.backgroundColor,[Vy.trackBorderRadius]:Ly.radius.md,[Vy.trackWidth]:"2.5em",[Vy.trackHeight]:"1.25em",[Vy.knobSize]:`calc(1em - ${zy})`,[Vy.knobRadius]:"50%",[Vy.knobTopOffset]:"1px",[Vy.knobLeftOffset]:zy,[Vy.knobColor]:sy.labelTextColor,[Vy.knobTransitionDuration]:"0.3s",[Vy.labelTextColor]:sy.labelTextColor,[Vy.labelFontWeight]:"400",[Vy.labelLineHeight]:"1.35em",[Vy.labelSpacing]:"1em",[Vy.labelRequiredIndicator]:sy.requiredIndicator,[Vy.errorMessageTextColor]:sy.errorMessageTextColor,[Vy.errorMessageIcon]:sy.errorMessageIcon,[Vy.errorMessageIconSize]:sy.errorMessageIconSize,[Vy.errorMessageIconPadding]:sy.errorMessageIconPadding,[Vy.errorMessageIconRepeat]:sy.errorMessageIconRepeat,[Vy.errorMessageIconPosition]:sy.errorMessageIconPosition,[Vy.errorMessageFontSize]:sy.errorMessageFontSize,_checked:{[Vy.trackBorderColor]:sy.borderColor,[Vy.knobLeftOffset]:`calc(100% - var(${Vy.knobSize}) - ${zy})`,[Vy.knobColor]:sy.valueTextColor,[Vy.knobTextColor]:sy.valueTextColor},_disabled:{[Vy.knobColor]:Ly.colors.surface.light,[Vy.trackBorderColor]:Ly.colors.surface.light,[Vy.trackBackgroundColor]:Ly.colors.surface.main,[Vy.labelTextColor]:sy.labelTextColor,_checked:{[Vy.knobColor]:Ly.colors.surface.light,[Vy.trackBackgroundColor]:Ly.colors.surface.main}},_invalid:{[Vy.trackBorderColor]:Ly.colors.error.main,[Vy.knobColor]:Ly.colors.error.main}};var Dy=Object.freeze({__proto__:null,default:Ny,vars:Vy});const Py=Mt(Zp),By=si.cssVarList,[Fy,Ry,Wy]=Dt({verticalAlignment:{start:{verticalAlignment:"start"},center:{verticalAlignment:"safe center"},end:{verticalAlignment:"end"}},horizontalAlignment:{start:{horizontalAlignment:"start"},center:{horizontalAlignment:"safe center"},end:{horizontalAlignment:"end"}},shadowColor:"#00000020"},ri),{shadowColor:Oy}=Ry,jy={...Fy,[By.itemsGrow]:"0",[By.hostWidth]:"100%",[By.hostHeight]:"auto",[By.boxShadow]:"none",[By.backgroundColor]:Py.colors.surface.main,[By.backgroundImage]:"",[By.backgroundPositionX]:"center",[By.backgroundPositionY]:"center",[By.backgroundSize]:"cover",[By.backgroundRepeat]:"no-repeat",[By.color]:Py.colors.surface.contrast,[By.borderRadius]:"0px",[By.hostDirection]:Py.direction,[By.borderStyle]:"none",[By.borderWidth]:"unset",[By.borderColor]:"unset",verticalPadding:{sm:{[By.verticalPadding]:"5px"},md:{[By.verticalPadding]:"10px"},lg:{[By.verticalPadding]:"20px"}},horizontalPadding:{sm:{[By.horizontalPadding]:"5px"},md:{[By.horizontalPadding]:"10px"},lg:{[By.horizontalPadding]:"20px"}},direction:{row:{[By.flexDirection]:"row",[By.alignItems]:Ry.verticalAlignment,[By.justifyContent]:Ry.horizontalAlignment,[By.flexWrap]:"wrap",horizontalAlignment:{spaceBetween:{[Wy.horizontalAlignment]:"space-between"}}},column:{[By.flexDirection]:"column",[By.alignItems]:Ry.horizontalAlignment,[By.justifyContent]:Ry.verticalAlignment,verticalAlignment:{spaceBetween:{[Wy.verticalAlignment]:"space-between"}}}},spaceBetween:{sm:{[By.gap]:"10px"},md:{[By.gap]:"20px"},lg:{[By.gap]:"30px"}},shadow:{sm:{[By.boxShadow]:`${Py.shadow.wide.sm} ${Oy}, ${Py.shadow.narrow.sm} ${Oy}`},md:{[By.boxShadow]:`${Py.shadow.wide.md} ${Oy}, ${Py.shadow.narrow.md} ${Oy}`},lg:{[By.boxShadow]:`${Py.shadow.wide.lg} ${Oy}, ${Py.shadow.narrow.lg} ${Oy}`},xl:{[By.boxShadow]:`${Py.shadow.wide.xl} ${Oy}, ${Py.shadow.narrow.xl} ${Oy}`},"2xl":{[Wy.shadowColor]:"#00000050",[By.boxShadow]:`${Py.shadow.wide["2xl"]} ${Oy}`}},"&borderRadius":{sm:{[By.borderRadius]:Py.radius.sm},md:{[By.borderRadius]:Py.radius.md},lg:{[By.borderRadius]:Py.radius.lg},xl:{[By.borderRadius]:Py.radius.xl},"2xl":{[By.borderRadius]:Py.radius["2xl"]},"3xl":{[By.borderRadius]:Py.radius["3xl"]}}},$y={...By,...Wy};var _y=Object.freeze({__proto__:null,default:jy,vars:$y});const Hy=In.cssVarList,qy={[Hy.fallbackUrl]:"url(https://imgs.descope.com/components/no-logo-placeholder.svg)"};var Yy=Object.freeze({__proto__:null,default:qy,vars:Hy});const Uy=Mn.cssVarList,Gy={[Uy.fallbackUrl]:"url(https://imgs.descope.com/components/totp-placeholder.svg)"};var Zy=Object.freeze({__proto__:null,default:Gy,vars:Uy});const Qy=En.cssVarList,Jy={[Qy.fallbackUrl]:"url(https://imgs.descope.com/components/notp-placeholder.svg)"};var Ky=Object.freeze({__proto__:null,default:Jy,vars:Qy});const Xy=Mt(Zp),ef=fn.cssVarList,[tf,of,rf]=Dt({thickness:"2px",spacing:"10px"},pn),nf={...tf,[ef.hostDirection]:Xy.direction,[ef.alignItems]:"center",[ef.flexDirection]:"row",[ef.alignSelf]:"stretch",[ef.hostWidth]:"100%",[ef.stripeColor]:Xy.colors.surface.light,[ef.stripeColorOpacity]:"0.5",[ef.stripeHorizontalThickness]:of.thickness,[ef.labelTextWidth]:"fit-content",[ef.labelTextMaxWidth]:"calc(100% - 100px)",[ef.labelTextHorizontalSpacing]:of.spacing,[ef.textAlign]:"center",_vertical:{[ef.minHeight]:"200px",[ef.flexDirection]:"column",[ef.hostWidth]:"fit-content",[ef.hostPadding]:`0 calc(${of.thickness} * 3)`,[ef.stripeVerticalThickness]:of.thickness,[ef.labelTextWidth]:"fit-content",[ef.labelTextMaxWidth]:"100%",[ef.labelTextVerticalSpacing]:of.spacing}},sf={...ef,...rf};var af=Object.freeze({__proto__:null,default:nf,vars:sf});const lf=Jn.cssVarList,df={[lf.hostDirection]:sy.direction,[lf.fontFamily]:sy.fontFamily,[lf.fontSize]:sy.fontSize,[lf.labelTextColor]:sy.labelTextColor,[lf.labelRequiredIndicator]:sy.requiredIndicator,[lf.labelFontWeight]:sy.labelFontWeight,[lf.errorMessageTextColor]:sy.errorMessageTextColor,[lf.errorMessageFontWeight]:sy.errorMessageFontWeight,[lf.digitValueTextColor]:sy.valueTextColor,[lf.digitValueFontWeight]:sy.inputValueFontWeight,[lf.digitPadding]:"0",[lf.digitTextAlign]:"center",[lf.digitSpacing]:"4px",[lf.hostWidth]:sy.width,[lf.digitOutlineColor]:"transparent",[lf.digitOutlineWidth]:sy.outlineWidth,[lf.focusedDigitFieldOutlineColor]:sy.outlineColor,[lf.digitSize]:sy.inputHeight,[lf.errorMessageIcon]:sy.errorMessageIcon,[lf.errorMessageIconSize]:sy.errorMessageIconSize,[lf.errorMessageIconPadding]:sy.errorMessageIconPadding,[lf.errorMessageIconRepeat]:sy.errorMessageIconRepeat,[lf.errorMessageIconPosition]:sy.errorMessageIconPosition,[lf.errorMessageFontSize]:sy.errorMessageFontSize,size:{xs:{[lf.spinnerSize]:"15px"},sm:{[lf.spinnerSize]:"20px"},md:{[lf.spinnerSize]:"20px"},lg:{[lf.spinnerSize]:"20px"}},_hideCursor:{[lf.digitCaretTextColor]:"transparent"},_loading:{[lf.overlayOpacity]:sy.overlayOpacity}};var cf=Object.freeze({__proto__:null,default:df,vars:lf});const pf=Mt(Zp),hf=ei.cssVarList,uf={[hf.hostDisplay]:"inline-block",[hf.hostWidth]:"100%",[hf.barColor]:pf.colors.surface.contrast,[hf.barWidth]:"20%",[hf.barBackgroundColor]:pf.colors.surface.light,[hf.barBorderRadius]:"4px",[hf.animationDuration]:"2s",[hf.animationTimingFunction]:"linear",[hf.animationIterationCount]:"infinite",[hf.verticalPadding]:"0.25em",size:{xs:{[hf.barHeight]:"2px"},sm:{[hf.barHeight]:"4px"},md:{[hf.barHeight]:"6px"},lg:{[hf.barHeight]:"8px"}},mode:{primary:{[hf.barColor]:pf.colors.primary.main},secondary:{[hf.barColor]:pf.colors.secondary.main}},_hidden:{[hf.hostDisplay]:"none"}};var gf=Object.freeze({__proto__:null,default:uf,vars:hf});const mf=Mt(Zp),bf=ii.cssVarList,[yf,ff,vf]=Dt({spinnerColor:mf.colors.surface.contrast,mode:{primary:{spinnerColor:mf.colors.primary.main},secondary:{spinnerColor:mf.colors.secondary.main}}},ti),xf={...yf,[bf.animationDuration]:"2s",[bf.animationTimingFunction]:"linear",[bf.animationIterationCount]:"infinite",[bf.spinnerBorderStyle]:"solid",[bf.spinnerBorderWidth]:"0.2em",[bf.spinnerBorderRadius]:"50%",[bf.spinnerQuadrant1Color]:ff.spinnerColor,[bf.spinnerQuadrant2Color]:"transparent",[bf.spinnerQuadrant3Color]:ff.spinnerColor,[bf.spinnerQuadrant4Color]:"transparent",size:{xs:{[bf.spinnerSize]:"20px"},sm:{[bf.spinnerSize]:"30px"},md:{[bf.spinnerSize]:"40px"},lg:{[bf.spinnerSize]:"60px"},xl:{[bf.spinnerSize]:"80px"}},_hidden:{[bf.hostDisplay]:"none"}},Cf={...bf,...vf};var wf=Object.freeze({__proto__:null,default:xf,vars:Cf});const If=_s.cssVarList,Sf={[If.hostWidth]:sy.width,[If.hostDirection]:sy.direction,[If.fontSize]:sy.fontSize,[If.fontFamily]:sy.fontFamily,[If.labelFontSize]:sy.labelFontSize,[If.labelFontWeight]:sy.labelFontWeight,[If.inputValueFontWeight]:sy.inputValueFontWeight,[If.inputPlaceholderFontWeight]:sy.inputPlaceholderFontWeight,[If.helperTextFontWeight]:sy.helperTextFontWeight,[If.errorMessageFontWeight]:sy.errorMessageFontWeight,[If.labelTextColor]:sy.labelTextColor,[If.labelRequiredIndicator]:sy.requiredIndicator,[If.errorMessageTextColor]:sy.errorMessageTextColor,[If.inputValueTextColor]:sy.valueTextColor,[If.inputPlaceholderTextColor]:sy.placeholderTextColor,[If.inputBorderStyle]:sy.borderStyle,[If.inputBorderWidth]:sy.borderWidth,[If.inputBorderColor]:sy.borderColor,[If.inputBorderRadius]:sy.borderRadius,[If.inputOutlineStyle]:sy.outlineStyle,[If.inputOutlineWidth]:sy.outlineWidth,[If.inputOutlineColor]:sy.outlineColor,[If.inputOutlineOffset]:sy.outlineOffset,[If.phoneInputWidth]:sy.minWidth,[If.countryCodeInputWidth]:"5em",[If.countryCodeDropdownWidth]:"20em",[If.marginInlineStart]:"-0.25em",[If.valueInputHeight]:sy.valueInputHeight,[If.valueInputMarginBottom]:sy.valueInputMarginBottom,[If.errorMessageIcon]:sy.errorMessageIcon,[If.errorMessageIconSize]:sy.errorMessageIconSize,[If.errorMessageIconPadding]:sy.errorMessageIconPadding,[If.errorMessageIconRepeat]:sy.errorMessageIconRepeat,[If.errorMessageIconPosition]:sy.errorMessageIconPosition,[If.errorMessageFontSize]:sy.errorMessageFontSize};var Mf=Object.freeze({__proto__:null,default:Sf,vars:If});const Af=sa.cssVarList,Ef={[Af.hostWidth]:"16em",[Af.hostMinWidth]:sy.minWidth,[Af.hostDirection]:sy.direction,[Af.fontSize]:sy.fontSize,[Af.fontFamily]:sy.fontFamily,[Af.labelFontSize]:sy.labelFontSize,[Af.labelFontWeight]:sy.labelFontWeight,[Af.inputValueFontWeight]:sy.inputValueFontWeight,[Af.inputPlaceholderFontWeight]:sy.inputPlaceholderFontWeight,[Af.helperTextFontWeight]:sy.helperTextFontWeight,[Af.errorMessageFontWeight]:sy.errorMessageFontWeight,[Af.labelTextColor]:sy.labelTextColor,[Af.labelRequiredIndicator]:sy.requiredIndicator,[Af.errorMessageTextColor]:sy.errorMessageTextColor,[Af.inputValueTextColor]:sy.valueTextColor,[Af.inputPlaceholderTextColor]:sy.placeholderTextColor,[Af.inputBorderStyle]:sy.borderStyle,[Af.inputBorderWidth]:sy.borderWidth,[Af.inputBorderColor]:sy.borderColor,[Af.inputBorderRadius]:sy.borderRadius,[Af.inputOutlineStyle]:sy.outlineStyle,[Af.inputOutlineWidth]:sy.outlineWidth,[Af.inputOutlineColor]:sy.outlineColor,[Af.inputOutlineOffset]:sy.outlineOffset,[Af.labelPosition]:sy.labelPosition,[Af.labelTopPosition]:sy.labelTopPosition,[Af.labelHorizontalPosition]:sy.labelHorizontalPosition,[Af.inputTransformY]:sy.inputTransformY,[Af.inputTransition]:sy.inputTransition,[Af.marginInlineStart]:sy.marginInlineStart,[Af.valueInputHeight]:sy.valueInputHeight,[Af.valueInputMarginBottom]:sy.valueInputMarginBottom,[Af.inputHorizontalPadding]:"0",[Af.errorMessageIcon]:sy.errorMessageIcon,[Af.errorMessageIconSize]:sy.errorMessageIconSize,[Af.errorMessageIconPadding]:sy.errorMessageIconPadding,[Af.errorMessageIconRepeat]:sy.errorMessageIconRepeat,[Af.errorMessageIconPosition]:sy.errorMessageIconPosition,[Af.errorMessageFontSize]:sy.errorMessageFontSize,_fullWidth:{[Af.hostWidth]:sy.width}};var Tf=Object.freeze({__proto__:null,default:Ef,vars:Af});const kf=Mt(Zp),zf=Ta.cssVarList,Lf={[zf.hostWidth]:sy.width,[zf.hostMinWidth]:sy.minWidth,[zf.hostDirection]:sy.direction,[zf.fontSize]:sy.fontSize,[zf.fontFamily]:sy.fontFamily,[zf.labelFontSize]:sy.labelFontSize,[zf.labelFontWeight]:sy.labelFontWeight,[zf.inputValueFontWeight]:sy.inputValueFontWeight,[zf.inputPlaceholderFontWeight]:sy.inputPlaceholderFontWeight,[zf.helperTextFontWeight]:sy.helperTextFontWeight,[zf.errorMessageFontWeight]:sy.errorMessageFontWeight,[zf.labelTextColor]:sy.labelTextColor,[zf.spaceBetweenInputs]:"1em",[zf.errorMessageTextColor]:sy.errorMessageTextColor,[zf.policyPreviewBackgroundColor]:"none",[zf.policyPreviewPadding]:kf.spacing.lg,[zf.valueInputHeight]:sy.valueInputHeight,[zf.errorMessageIcon]:sy.errorMessageIcon,[zf.errorMessageIconSize]:sy.errorMessageIconSize,[zf.errorMessageIconPadding]:sy.errorMessageIconPadding,[zf.errorMessageIconRepeat]:sy.errorMessageIconRepeat,[zf.errorMessageIconPosition]:sy.errorMessageIconPosition,[zf.errorMessageFontSize]:sy.errorMessageFontSize,_required:{[zf.inputsRequiredIndicator]:sy.requiredIndicator}};var Vf=Object.freeze({__proto__:null,default:Lf,vars:zf});const Nf=Ka.cssVarList,Df={[Nf.hostDirection]:sy.direction,[Nf.labelTextColor]:sy.labelTextColor,[Nf.fontFamily]:sy.fontFamily,[Nf.iconSize]:"2em",[Nf.hostPadding]:"0.75em",[Nf.gap]:"0.5em",[Nf.fontSize]:"16px",[Nf.titleFontWeight]:"500",[Nf.lineHeight]:"1em",[Nf.borderWidth]:sy.borderWidth,[Nf.borderColor]:sy.borderColor,[Nf.borderRadius]:sy.borderRadius,[Nf.borderStyle]:"dashed",_required:{[Nf.requiredIndicator]:sy.requiredIndicator},size:{xs:{[Nf.hostHeight]:"196px",[Nf.hostWidth]:"200px",[Nf.titleFontSize]:"0.875em",[Nf.descriptionFontSize]:"0.875em",[Nf.lineHeight]:"1.25em"},sm:{[Nf.hostHeight]:"216px",[Nf.hostWidth]:"230px",[Nf.titleFontSize]:"1em",[Nf.descriptionFontSize]:"0.875em",[Nf.lineHeight]:"1.25em"},md:{[Nf.hostHeight]:"256px",[Nf.hostWidth]:"312px",[Nf.titleFontSize]:"1.125em",[Nf.descriptionFontSize]:"1em",[Nf.lineHeight]:"1.5em"},lg:{[Nf.hostHeight]:"280px",[Nf.hostWidth]:"336px",[Nf.titleFontSize]:"1.125em",[Nf.descriptionFontSize]:"1.125em",[Nf.lineHeight]:"1.75em"}},_fullWidth:{[Nf.hostWidth]:sy.width}};var Pf=Object.freeze({__proto__:null,default:Df,vars:Nf});const Bf=Mt(Zp),Ff=gl.cssVarList,Rf={[Ff.hostDirection]:"inherit",[Ff.backgroundColor]:Bf.colors.surface.main,[Ff.labelTextColor]:Bf.colors.surface.contrast,[Ff.borderColor]:Bf.colors.surface.light,[Ff.borderStyle]:"solid",[Ff.borderRadius]:Bf.radius.sm,[Ff.outlineColor]:"transparent",[Ff.borderWidth]:Bf.border.xs,_hover:{[Ff.backgroundColor]:Bf.colors.surface.highlight},_focused:{[Ff.outlineColor]:Bf.colors.surface.light},_selected:{[Ff.borderColor]:Bf.colors.surface.contrast,[Ff.backgroundColor]:Bf.colors.surface.contrast,[Ff.labelTextColor]:Bf.colors.surface.main}};var Wf=Object.freeze({__proto__:null,default:Rf,vars:Ff});const Of=Mt(Zp),jf=e=>({[e.hostDirection]:sy.direction,[e.fontFamily]:sy.fontFamily,[e.labelTextColor]:sy.labelTextColor,[e.labelRequiredIndicator]:sy.requiredIndicator,[e.itemsSpacing]:Of.spacing.sm,[e.hostWidth]:sy.width,[e.errorMessageTextColor]:sy.errorMessageTextColor,[e.errorMessageIcon]:sy.errorMessageIcon,[e.errorMessageIconSize]:sy.errorMessageIconSize,[e.errorMessageIconPadding]:sy.errorMessageIconPadding,[e.errorMessageIconRepeat]:sy.errorMessageIconRepeat,[e.errorMessageIconPosition]:sy.errorMessageIconPosition,[e.errorMessageFontSize]:sy.errorMessageFontSize}),$f=pl.cssVarList,_f={...jf($f)};var Hf=Object.freeze({__proto__:null,default:_f,vars:$f});const qf=fl.cssVarList,Yf={...jf(qf)};var Uf=Object.freeze({__proto__:null,default:Yf,vars:qf});const Gf=Mt(Zp),Zf=ec.cssVarList,Qf={[Zf.overlayBackgroundColor]:Gf.colors.surface.main,[Zf.overlayShadow]:Gf.shadow.wide["2xl"],[Zf.overlayWidth]:"540px",[Zf.overlayBackdropColor]:"hsla(214, 53%, 23%, 0.16)"},Jf={...Zf};var Kf=Object.freeze({__proto__:null,default:Qf,vars:Jf});const Xf=Mt(Zp),ev=Jd.cssVarList,tv={[ev.hostWidth]:"100%",[ev.hostHeight]:"100%",[ev.hostMinHeight]:"400px",[ev.fontWeight]:"400",[ev.backgroundColor]:Xf.colors.surface.main,[ev.fontSize]:sy.fontSize,[ev.fontFamily]:sy.fontFamily,[ev.sortIndicatorsColor]:Xf.colors.surface.light,[ev.activeSortIndicator]:Xf.colors.surface.dark,[ev.resizeHandleColor]:Xf.colors.surface.light,[ev.borderWidth]:sy.borderWidth,[ev.borderStyle]:sy.borderStyle,[ev.borderRadius]:sy.borderRadius,[ev.borderColor]:"transparent",[ev.headerRowTextColor]:Xf.colors.surface.dark,[ev.separatorColor]:Xf.colors.surface.light,[ev.valueTextColor]:Xf.colors.surface.contrast,[ev.selectedBackgroundColor]:Xf.colors.surface.highlight,[ev.hostDirection]:Xf.direction,[ev.toggleDetailsPanelButtonSize]:"1em",[ev.toggleDetailsPanelButtonOpenedColor]:Xf.colors.surface.contrast,[ev.toggleDetailsPanelButtonClosedColor]:Xf.colors.surface.light,[ev.toggleDetailsPanelButtonCursor]:"pointer",[ev.detailsPanelBackgroundColor]:Xf.colors.surface.highlight,[ev.detailsPanelBorderTopColor]:Xf.colors.surface.light,[ev.detailsPanelLabelsColor]:Xf.colors.surface.dark,[ev.detailsPanelLabelsFontSize]:"0.8em",[ev.detailsPanelItemsGap]:"2em",[ev.detailsPanelPadding]:"12px 0",_bordered:{[ev.borderColor]:sy.borderColor}};var ov=Object.freeze({__proto__:null,default:tv,grid:tv,vars:ev});const iv=Mt(Zp),rv=rc.cssVarList,nv="#00000020",sv={[rv.hostMinWidth]:"415px",[rv.fontFamily]:iv.fonts.font1.family,[rv.fontSize]:iv.typography.body1.size,[rv.backgroundColor]:iv.colors.surface.main,[rv.textColor]:iv.colors.surface.contrast,[rv.boxShadow]:`${iv.shadow.wide.xl} ${nv}, ${iv.shadow.narrow.xl} ${nv}`,[rv.verticalPadding]:"0.625em",[rv.horizontalPadding]:"1.5em",[rv.borderRadius]:iv.radius.xs,_bordered:{[rv.borderWidth]:iv.border.sm,[rv.borderStyle]:"solid",[rv.borderColor]:"transparent"},size:{xs:{[rv.fontSize]:"12px"},sm:{[rv.fontSize]:"14px"},md:{[rv.fontSize]:"16px"},lg:{[rv.fontSize]:"18px"}},mode:{primary:{[rv.backgroundColor]:iv.colors.primary.main,[rv.textColor]:iv.colors.primary.contrast,[rv.borderColor]:iv.colors.primary.light},success:{[rv.backgroundColor]:iv.colors.success.main,[rv.textColor]:iv.colors.success.contrast,[rv.borderColor]:iv.colors.success.light},error:{[rv.backgroundColor]:iv.colors.error.main,[rv.textColor]:iv.colors.error.contrast,[rv.borderColor]:iv.colors.error.light}}};var av=Object.freeze({__proto__:null,default:sv,vars:rv});const lv=Mt(Zp),dv=xc.cssVarList,cv={[dv.hostWidth]:sy.width,[dv.hostDirection]:sy.direction,[dv.fontSize]:sy.fontSize,[dv.fontFamily]:sy.fontFamily,[dv.separatorFontSize]:"14px",[dv.labelsFontSize]:"14px",[dv.labelsLineHeight]:"1",[dv.labelsMarginBottom]:"6px",[dv.labelTextColor]:sy.labelTextColor,[dv.itemMarginBottom]:"1em",[dv.valueLabelMinWidth]:sy.minWidth,[dv.attrLabelMinWidth]:`calc(12em + 2 * ${lv.border.xs})`,[dv.separatorWidth]:"70px",[dv.removeButtonWidth]:"60px"};var pv=Object.freeze({__proto__:null,default:cv,mappingsField:cv,vars:dv});const hv=Mt(Zp),uv=Pc.cssVarList,gv={[uv.labelMinWidth]:"150px",[uv.hostDirection]:hv.direction,[uv.contentMinWidth]:`calc(100% - ${Nt(uv.labelMinWidth)} - ${Nt(uv.itemsGap)})`,[uv.badgeMaxWidth]:"85px",[uv.itemsGap]:"4px",[uv.hostMinWidth]:"310px",[uv.hostWidth]:"530px",[uv.hostMaxWidth]:"100%",[uv.iconColor]:"currentcolor",_fullWidth:{[uv.hostWidth]:"100%"}};var mv=Object.freeze({__proto__:null,default:gv,vars:uv});const bv=Mt(Zp),yv=Hc.cssVarList,fv={[yv.hostDirection]:bv.direction,[yv.itemsGap]:"16px",[yv.hostMinWidth]:"310px",[yv.hostWidth]:"530px",[yv.hostMaxWidth]:"100%",[yv.iconSize]:"24px",[yv.iconColor]:"currentcolor",_fullWidth:{[yv.hostWidth]:"100%"}};var vv=Object.freeze({__proto__:null,default:fv,vars:yv});const xv=Jc.cssVarList,Cv={[xv.hostWidth]:sy.width,[xv.hostDirection]:sy.direction,[xv.groupNameInputMarginBottom]:"1em",[xv.errorMessageIcon]:sy.errorMessageIcon,[xv.errorMessageIconSize]:sy.errorMessageIconSize,[xv.errorMessageIconPadding]:sy.errorMessageIconPadding,[xv.errorMessageIconRepeat]:sy.errorMessageIconRepeat,[xv.errorMessageIconPosition]:sy.errorMessageIconPosition,[xv.errorMessageFontSize]:sy.errorMessageFontSize};var wv=Object.freeze({__proto__:null,default:Cv,samlGroupMappings:Cv,vars:xv});const Iv=Mt(Zp),Sv=fa.cssVarList,Mv={[Sv.fontFamily]:sy.fontFamily,[Sv.fontSize]:sy.labelFontSize,[Sv.textColor]:sy.labelTextColor,[Sv.borderWidth]:sy.borderWidth,[Sv.borderStyle]:sy.borderStyle,[Sv.borderColor]:sy.borderColor,[Sv.borderRadius]:Iv.radius.sm,[Sv.backgroundColor]:"none",[Sv.padding]:"0px",[Sv.labelMargin]:Iv.spacing.sm,[Sv.itemsSpacing]:Iv.spacing.lg,[Sv.itemSymbolDefault]:"'\\2022'",[Sv.itemSymbolSuccess]:"'\\2713'",[Sv.itemSymbolError]:"'\\2A09'",[Sv.itemSymbolSuccessColor]:Iv.colors.success.main,[Sv.itemSymbolErrorColor]:Iv.colors.error.main};var Av=Object.freeze({__proto__:null,default:Mv,vars:Sv});const Ev=Mt(Zp),Tv=Md.cssVarList,kv="#d73a49",zv="#6f42c1",Lv="#005cc5",Vv="#e36209",Nv="#6a737d",Dv="#22863a",Pv="#24292e",Bv="#f0fff4",Fv="#032f62",Rv="#ff7b72",Wv="#d2a8ff",Ov="#79c0ff",jv="#ffa657",$v="#8b949e",_v="#7ee787",Hv="#c9d1d9",qv="#f0fff4",Yv="#a5d6ff",Uv={[Tv.copyButtonSize]:"32px",[Tv.copyButtonBorderRadius]:Ev.radius.xs,[Tv.copyButtonBorderWidth]:Ev.border.xs,[Tv.copyButtonBorderColor]:Ev.colors.surface.light,[Tv.copyButtonBgColor]:Ev.colors.surface.highlight,[Tv.copyButtonHoverBgColor]:Ev.colors.surface.light,[Tv.copyButtonColor]:Ev.colors.surface.contrast,[Tv.rootBgColor]:Ev.colors.surface.main,[Tv.rootTextColor]:Ev.colors.surface.contrast,[Tv.docTagTextColor]:kv,[Tv.keywordTextColor]:kv,[Tv.metaKeywordTextColor]:kv,[Tv.templateTagTextColor]:kv,[Tv.templateVariableTextColor]:kv,[Tv.typeTextColor]:kv,[Tv.variableLanguageTextColor]:kv,[Tv.titleTextColor]:zv,[Tv.titleClassTextColor]:zv,[Tv.titleClassInheritedTextColor]:zv,[Tv.titleFunctionTextColor]:zv,[Tv.attrTextColor]:Lv,[Tv.attributeTextColor]:Lv,[Tv.literalTextColor]:Lv,[Tv.metaTextColor]:Lv,[Tv.numberTextColor]:Lv,[Tv.operatorTextColor]:Lv,[Tv.variableTextColor]:Lv,[Tv.selectorAttrTextColor]:Lv,[Tv.selectorClassTextColor]:Lv,[Tv.selectorIdTextColor]:Lv,[Tv.regexpTextColor]:Fv,[Tv.stringTextColor]:Fv,[Tv.metaStringTextColor]:Fv,[Tv.builtInTextColor]:Vv,[Tv.symbolTextColor]:Vv,[Tv.commentTextColor]:Nv,[Tv.codeTextColor]:Nv,[Tv.formulaTextColor]:Nv,[Tv.nameTextColor]:Dv,[Tv.quoteTextColor]:Dv,[Tv.selectorTagTextColor]:Dv,[Tv.selectorPseudoTextColor]:Dv,[Tv.substTextColor]:Pv,[Tv.sectionTextColor]:Lv,[Tv.bulletTextColor]:"#735c0f",[Tv.emphasisTextColor]:Pv,[Tv.strongTextColor]:Pv,[Tv.additionTextColor]:Dv,[Tv.additionBgColor]:Bv,[Tv.deletionTextColor]:kv,[Tv.deletionBgColor]:Bv},Gv={codeSnippet:{[Tv.rootBgColor]:Ev.colors.surface.main,[Tv.rootTextColor]:Ev.colors.surface.contrast,[Tv.docTagTextColor]:Rv,[Tv.keywordTextColor]:Rv,[Tv.metaKeywordTextColor]:Rv,[Tv.templateTagTextColor]:Rv,[Tv.templateVariableTextColor]:Rv,[Tv.typeTextColor]:Rv,[Tv.variableLanguageTextColor]:Rv,[Tv.titleTextColor]:Wv,[Tv.titleClassTextColor]:Wv,[Tv.titleClassInheritedTextColor]:Wv,[Tv.titleFunctionTextColor]:Wv,[Tv.attrTextColor]:Ov,[Tv.attributeTextColor]:Ov,[Tv.literalTextColor]:Ov,[Tv.metaTextColor]:Ov,[Tv.numberTextColor]:Ov,[Tv.operatorTextColor]:Ov,[Tv.variableTextColor]:Ov,[Tv.selectorAttrTextColor]:Ov,[Tv.selectorClassTextColor]:Ov,[Tv.selectorIdTextColor]:Ov,[Tv.regexpTextColor]:Yv,[Tv.stringTextColor]:Yv,[Tv.metaStringTextColor]:Yv,[Tv.builtInTextColor]:jv,[Tv.symbolTextColor]:jv,[Tv.commentTextColor]:$v,[Tv.codeTextColor]:$v,[Tv.formulaTextColor]:$v,[Tv.nameTextColor]:_v,[Tv.quoteTextColor]:_v,[Tv.selectorTagTextColor]:_v,[Tv.selectorPseudoTextColor]:_v,[Tv.substTextColor]:Hv,[Tv.sectionTextColor]:Ov,[Tv.bulletTextColor]:"#735c0f",[Tv.emphasisTextColor]:Hv,[Tv.strongTextColor]:Hv,[Tv.additionTextColor]:_v,[Tv.additionBgColor]:qv,[Tv.deletionTextColor]:Rv,[Tv.deletionBgColor]:qv}};var Zv=Object.freeze({__proto__:null,codeSnippetDarkThemeOverrides:Gv,default:Uv,vars:Tv});const Qv=tp.cssVarList,Jv=Mt(Zp),Kv={[Qv.buttonsRowGap]:"9px",[Qv.hostWidth]:sy.width,[Qv.hostDirection]:sy.direction,[Qv.fontSize]:sy.fontSize,[Qv.fontFamily]:sy.fontFamily,[Qv.labelTextColor]:sy.labelTextColor,[Qv.labelRequiredIndicator]:sy.requiredIndicator,[Qv.errorMessageTextColor]:sy.errorMessageTextColor,[Qv.errorMessageIcon]:sy.errorMessageIcon,[Qv.errorMessageIconSize]:sy.errorMessageIconSize,[Qv.errorMessageIconPadding]:sy.errorMessageIconPadding,[Qv.errorMessageIconRepeat]:sy.errorMessageIconRepeat,[Qv.errorMessageIconPosition]:sy.errorMessageIconPosition,[Qv.errorMessageFontSize]:sy.errorMessageFontSize,[Qv.helperTextColor]:sy.helperTextColor,[Qv.itemsLabelColor]:Jv.colors.surface.contrast,textAlign:{right:{[Qv.inputTextAlign]:"right"},left:{[Qv.inputTextAlign]:"left"},center:{[Qv.inputTextAlign]:"center"}},_fullWidth:{[Qv.buttonsSpacing]:"space-between"},_disabled:{[Qv.itemsLabelColor]:Jv.colors.surface.light}};var Xv=Object.freeze({__proto__:null,default:Kv,radioGroup:Kv,vars:Qv});const ex=Xc.cssVarList,tx=Mt(Zp),ox={[ex.fontFamily]:sy.fontFamily,[ex.radioSize]:"calc(1em + 6px)",[ex.radioMargin]:"auto 4px",[ex.radioCheckedSize]:`calc(var(${ex.radioSize})/5)`,[ex.radioCheckedColor]:tx.colors.surface.light,[ex.radioBackgroundColor]:tx.colors.surface.light,[ex.radioBorderColor]:"none",[ex.radioBorderWidth]:0,_checked:{[ex.radioBackgroundColor]:tx.colors.surface.contrast},_hover:{cursor:"pointer"},size:{xs:{[ex.fontSize]:"12px"},sm:{[ex.fontSize]:"14px"},md:{[ex.fontSize]:"16px"},lg:{[ex.fontSize]:"18px"}}};var ix=Object.freeze({__proto__:null,default:ox,radioButton:ox,vars:ex});const rx=Mt(Zp),nx=kr.cssVarList,sx={[nx.fontFamily]:sy.fontFamily,[nx.fontSize]:sy.fontSize,[nx.hostDirection]:sy.direction,[nx.calendarPadding]:"1em",[nx.topNavVerticalPadding]:"1em",[nx.topNavAlignment]:"space-between",[nx.topNavGap]:"0",[nx.topNavSelectorsGap]:"0.5em",[nx.bottomNavVerticalPadding]:"0.75em",[nx.bottomNavHorizontalPadding]:"1.5em",[nx.bottomNavAlignment]:"space-between",[nx.bottomNavGap]:"0.5em",[nx.navMarginBottom]:"0.75em",[nx.navBorderBottomWidth]:"1px",[nx.navBorderBottomColor]:rx.colors.surface.highlight,[nx.navBorderBottomStyle]:"solid",[nx.yearInputWidth]:"6em",[nx.monthInputWidth]:"8em",[nx.navButtonSize]:"24px",[nx.navButtonCursor]:"pointer",[nx.weekdayFontSize]:"0.875em",[nx.weekdayFontWeight]:"500",[nx.dayHeight]:"3.125em",[nx.daySize]:"2.125em",[nx.dayFontSize]:"1em",[nx.dayRadius]:"50%",[nx.dayTextAlign]:"center",[nx.dayPadding]:"0",[nx.dayTextColor]:rx.colors.surface.contrast,[nx.dayFontWeight]:"500",[nx.dayBackgroundColor]:"transparent",[nx.dayCursor]:"pointer",[nx.dayBackgroundColorHover]:rx.colors.primary.highlight,[nx.daySelectedBackgroundColor]:rx.colors.primary.main,[nx.daySelectedTextdColor]:rx.colors.primary.contrast,[nx.dayDisabledTextdColor]:rx.colors.surface.light,[nx.currentDayBorderColor]:rx.colors.surface.light,[nx.currentDayBorderWidth]:"1px",[nx.currentDayBorderStyle]:"solid",size:{xs:{[nx.fontSize]:"12px"},sm:{[nx.fontSize]:"14px"},md:{[nx.fontSize]:"16px"},lg:{[nx.fontSize]:"18px"}},[nx.navButtonRotation]:"rotate(180deg)",_disabled:{[nx.navButtonOpacity]:"0.5",[nx.dayBackgroundColorHover]:"none",[nx.navButtonCursor]:"default",[nx.dayCursor]:"default"},_fullWidth:{[nx.hostWidth]:"100%",[nx.dayBlockAlign]:"0 auto"}};var ax=Object.freeze({__proto__:null,default:sx,vars:nx});const lx=Mt(Zp),dx="#00000020",{shadow:cx}=lx,px=cn.cssVarList,hx={[px.hostWidth]:sy.width,[px.hostDirection]:sy.direction,[px.iconMargin]:"0.375em",[px.overlay.marginTop]:`calc(${sy.outlineWidth} + 1px)`,[px.overlay.backgroundColor]:sy.backgroundColor,[px.overlay.backdropBackgroundColor]:"transparent",[px.overlay.backdropPointerEvents]:"all",[px.overlay.boxShadow]:`${cx.wide.xl} ${dx}, ${cx.narrow.xl} ${dx}`,[px.overlay.outlineWidth]:"0",[px.overlay.outlineColor]:"transparent",[px.overlay.outlineStyle]:"none",[px.overlay.padding]:"0",[px.rtlInputDirection]:"ltr",[px.rtlInputAlignment]:"right",[px.errorMessageIcon]:sy.errorMessageIcon,[px.errorMessageIconSize]:sy.errorMessageIconSize,[px.errorMessageIconPadding]:sy.errorMessageIconPadding,[px.errorMessageIconRepeat]:sy.errorMessageIconRepeat,[px.errorMessageIconPosition]:sy.errorMessageIconPosition,[px.errorMessageFontSize]:sy.errorMessageFontSize,[px.labelFontWeight]:sy.labelFontWeight,[px.inputValueFontWeight]:sy.inputValueFontWeight,[px.inputPlaceholderFontWeight]:sy.inputPlaceholderFontWeight,[px.helperTextFontWeight]:sy.helperTextFontWeight,[px.errorMessageFontWeight]:sy.errorMessageFontWeight};var ux=Object.freeze({__proto__:null,default:hx,vars:px});const gx=ap.cssVarList,mx={[gx.requiredInputBorderColor]:ny._disabled[ay.borderColor],[gx.requiredInputValueTextColor]:ny._disabled[ay.valueTextColor],[gx.hostWidth]:"280px",_fullWidth:{[gx.hostWidth]:"100%"}};var bx=Object.freeze({__proto__:null,default:mx,vars:gx});const yx=Mt(Zp),fx=yp.cssVarList,vx={[fx.gap]:yx.spacing.lg,[fx.arrowsColor]:yx.colors.surface.dark,[fx.thirdPartyAppLogoFallback]:"url(https://imgs.descope.com/components/third-party-app-logo-placeholder.svg)",[fx.companyLogoFallback]:"url(https://imgs.descope.com/components/project-logo-placeholder.svg)",size:{xs:{[fx.logoMaxHeight]:"30px",[fx.logoMaxWidth]:"120px"},sm:{[fx.logoMaxHeight]:"40px",[fx.logoMaxWidth]:"160px"},md:{[fx.logoMaxHeight]:"48px",[fx.logoMaxWidth]:"200px"},lg:{[fx.logoMaxHeight]:"60px",[fx.logoMaxWidth]:"240px"}}};var xx=Object.freeze({__proto__:null,default:vx,vars:fx});const Cx=wp.cssVarList,wx={[Cx.hostWidth]:"fit-content",_fullWidth:{[Cx.hostWidth]:"100%"}};var Ix=Object.freeze({__proto__:null,default:wx,vars:Cx});const Sx=zp.cssVarList,Mx={[Sx.hostWidth]:"min-content",[Sx.questionCursor]:"pointer",_fullWidth:{[Sx.hostWidth]:"100%"},[Sx.questionFontSize]:sy.fontSize,[Sx.questionFontFamily]:sy.fontFamily};var Ax=Object.freeze({__proto__:null,default:Mx,vars:Sx});const Ex=Fp.cssVarList,Tx={[Ex.hostDirection]:sy.direction,[Ex.labelFontWeight]:sy.labelFontWeight,[Ex.inputValueFontWeight]:sy.inputValueFontWeight,[Ex.inputPlaceholderFontWeight]:sy.inputPlaceholderFontWeight,[Ex.helperTextFontWeight]:sy.helperTextFontWeight,[Ex.errorMessageFontWeight]:sy.errorMessageFontWeight,[Ex.errorMessageIcon]:sy.errorMessageIcon,[Ex.errorMessageIconSize]:sy.errorMessageIconSize,[Ex.errorMessageIconPadding]:sy.errorMessageIconPadding,[Ex.errorMessageIconRepeat]:sy.errorMessageIconRepeat,[Ex.errorMessageIconPosition]:sy.errorMessageIconPosition,[Ex.errorMessageFontSize]:sy.errorMessageFontSize,_fullWidth:{[Ex.hostWidth]:"100%"}};var kx=Object.freeze({__proto__:null,default:Tx,vars:Ex});const zx=Mt(Zp),Lx=jp.cssVarList,Vx={[Lx.hostDirection]:zx.direction,[Lx.backgroundColor]:"transparent",[Lx.iconSize]:"1.35em",[Lx.alignItems]:"center",[Lx.borderRadius]:zx.radius.md,[Lx.horizontalPadding]:"0",[Lx.verticalPadding]:"0",[Lx.gap]:"0.5em",[Lx.fontSize]:Nt(hh.fontSize),mode:{error:{[Lx.textColor]:zx.colors.error.main,_bordered:{[Lx.borderColor]:zx.colors.error.main}},success:{[Lx.textColor]:zx.colors.success.main,_bordered:{[Lx.borderColor]:zx.colors.success.main}}},spacing:{xs:{[Lx.horizontalPadding]:zx.spacing.xs,[Lx.verticalPadding]:zx.spacing.xs},sm:{[Lx.horizontalPadding]:zx.spacing.sm,[Lx.verticalPadding]:zx.spacing.sm},md:{[Lx.horizontalPadding]:zx.spacing.md,[Lx.verticalPadding]:zx.spacing.md},lg:{[Lx.horizontalPadding]:zx.spacing.lg,[Lx.verticalPadding]:zx.spacing.lg},xl:{[Lx.horizontalPadding]:zx.spacing.xl,[Lx.verticalPadding]:zx.spacing.xl}},textAlign:{left:{[Lx.justifyContent]:"left"},center:{[Lx.justifyContent]:"center"},right:{[Lx.justifyContent]:"right"}},_bordered:{[Lx.borderWidth]:zx.border.xs,[Lx.borderColor]:"transparent",[Lx.borderStyle]:"solid",[Lx.borderWidth]:zx.border.xs,[Lx.borderRadius]:zx.radius.sm},_fullWidth:{[Lx.hostWidth]:"100%"}};var Nx=Object.freeze({__proto__:null,default:Vx,vars:Lx});const Dx=qp.cssVarList,Px={enabled:{false:{[Dx.maxHeight]:"70px"}}},Bx={button:ch,textField:hy,password:by,numberField:vy,emailField:wy,textArea:My,checkbox:ky,switchToggle:Dy,container:_y,logo:Yy,totpImage:Zy,notpImage:Ky,text:gh,enrichedText:wh,link:fh,divider:af,passcode:cf,loaderRadial:wf,loaderLinear:gf,comboBox:zh,phoneField:Mf,phoneInputBoxField:Tf,newPassword:Vf,inputWrapper:ly,uploadFile:Pf,buttonSelectionGroupItem:Wf,buttonSelectionGroup:Hf,buttonMultiSelectionGroup:Uf,modal:Kf,grid:ov,notificationCard:av,multiSelectComboBox:Ku,badge:Fh,avatar:Gh,mappingsField:pv,userAttribute:mv,userAuthMethod:vv,samlGroupMappings:wv,policyValidation:Av,image:Kh,icon:Qh,codeSnippet:Zv,radioGroup:Xv,radioButton:ix,calendar:ax,dateField:ux,list:gu,listItem:fu,multiLineMappings:Gu,appsList:nu,scopesList:bx,thirdPartyAppLogo:xx,securityQuestionsSetup:Ix,securityQuestionsVerify:Ax,hybridField:kx,alert:Nx,autocompleteField:dg,addressField:Mg,countrySubdivisionCityField:Yb,timer:Fg,timerButton:Xg,passwordStrength:hm,collapsibleContainer:Mm,recoveryCodes:Nm,hcaptcha:Object.freeze({__proto__:null,default:Px,vars:Dx}),outboundApps:jm,outboundAppButton:Gm,trustedDevices:rb,tooltip:vb,attachment:oy},Fx=Object.keys(Bx).reduce((e,t)=>({...e,[t]:Bx[t].default}),{}),Rx=Object.keys(Bx).reduce((e,t)=>({...e,[t]:Bx[t].vars}),{}),Wx={globals:Zp,components:Fx},Ox={globals:Qp,components:Rx},jx=a()({},Wx,{globals:{colors:{surface:{main:"#181a1c",dark:"#bec4ca",light:"#555f68",highlight:"#22262a",contrast:"#f5f6f7"},primary:{main:"#1f80ff",dark:"#71aeff",light:"#004094",highlight:"#00214d",contrast:"#000000"},secondary:{main:"#a665eb",dark:"#b9a0f3",light:"#683ae6",highlight:"#361299",contrast:"#000000"},success:{main:"#27963c",dark:"#8bc3a2",light:"#004d0f",highlight:"#001f00",contrast:"#000000"},error:{main:"#f85249",dark:"#fa7c75",light:"#c51107",highlight:"#4a0603",contrast:"#000000"},warning:{main:"#EF7A33",dark:"#FF985A",light:"#FF6304",highlight:"#C45512",contrast:"#000000"}}},components:{...Gv}});customElements.define(Xu,class extends eg{static get observedAttributes(){return[].concat(eg.observedAttributes||[],tg)}get allowCustomValue(){return"true"===this.getAttribute("allow-custom-value")}get minSearchLength(){return this.getAttribute("min-search-length")||3}get noResultsFoundMessage(){return this.getAttribute("no-results-message")||"No results found"}get errorFetchingResultsMessage(){return this.getAttribute("error-fetching-results-message")||"An error occurred fetching results"}constructor(){super(),this.innerHTML='\n <div class="autocomplete-field">\n <descope-combo-box clear-button-visible="true" auto-open-disabled="true" has-dynamic-data="true" item-label-path="data-name" item-value-path="data-id" hide-toggle-button="true"></descope-combo-box>\n </div>\n ',this.comboBox=this.querySelector("descope-combo-box")}get value(){return this.comboBox.value}set value(e){this.allowCustomValue?this.comboBox.value=e:(this.comboBox.data=[{label:e,value:e}],setTimeout(()=>{this.comboBox.value=e}))}get defaultValue(){return this.getAttribute("default-value")}async#xi(e){const{results:t,error:o}=await this.fetchResults(e);return o?{error:o}:{results:t}}#Ci(e,t,o,i){return`<span data-name="${o}" data-id="${t}" ${i?'disabled="true"':""}>${e||o}</span>`}#wi(){this.comboBox.renderer=(e,t,o)=>{"true"===o.item.getAttribute("disabled")?e.setAttribute("disabled","true"):e.removeAttribute("disabled"),e.innerHTML=o.item.outerHTML},this.comboBox.renderItem=({displayName:e,value:t,label:o,disabled:i})=>this.#Ci(e,t,o,i)}focus(){this.comboBox.focus()}init(){this.addEventListener("focus",e=>{e.isTrusted&&this.comboBox.focus()}),super.init?.(),this.#Ii(),T(this,this.comboBox,{includeAttrs:["invalid"]})}#Ii(){this.debouncedSearch=(e=>{let t=0;const o=new Set,i=new Set,r=n()((r,n)=>{e(...r).then(e=>{n===t&&(o.forEach(t=>t(e)),o.clear())}).catch(e=>{i.forEach(t=>t(e)),i.clear()})},250);return(...e)=>(t++,new Promise((n,s)=>{o.add(n),i.add(s),r(e,t)}))})(async e=>{try{const{results:t,error:o}=await this.#xi(e);return{results:t,error:o,value:e}}catch(t){return{error:t,value:e}}}),L(this,this.comboBox,{includeAttrs:["size","bordered","label","label-type","placeholder","disabled","readonly","required","full-width","helper-text","invalid","error-message","data-errormessage-value-missing","st-host-direction","allow-custom-value","st-error-message-icon","st-error-message-icon-size","st-error-message-icon-padding"]}),this.comboBox.addEventListener("filter-changed",this.onSearch.bind(this)),this.#wi()}#Si(){return[{label:this.noResultsFoundMessage,value:og,disabled:!0}]}#Mi(){return[{label:this.errorFetchingResultsMessage,value:og,disabled:!0}]}async onSearch(e){const t=e.detail.value;if(!t||t.length<this.minSearchLength)return;this.comboBox.loading=!0,this.comboBox.setAttribute("opened","true");const o=await this.debouncedSearch(t);o&&o.value===t&&(this.comboBox.loading=!1,o.error?this.comboBox.data=this.#Mi():0===o.results?.length?this.comboBox.data=this.#Si():this.comboBox.data=o.results||[])}fetchResults(e){return console.warn("fetchResults","needs to be implemented"),{results:[],error:void 0}}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:{valid:!0}}}),customElements.define(ig,ng),customElements.define(hg,vg),customElements.define(xg,wg);const $x=k("anchored");class _x extends(ye({componentName:$x,baseSelector:".anchored-root"})){#Ai=null;#Ei=null;#Ti=null;get#ki(){return this.defaultSlot.assignedElements({flatten:!0})[0]}get#zi(){return this.shadowRoot.querySelector('slot[name="anchored"]')?.assignedElements()[0]}get#Li(){return this.getRootNode().host}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="anchored-root" part="root">\n <slot></slot>\n <div class="anchored-host" part="anchored">\n <slot name="anchored"></slot>\n </div>\n </div>\n ',this.defaultSlot=this.shadowRoot.querySelector("slot:not([name])")}init(){super.init?.(),V("\n :host {\n display: inline-flex;\n position: relative;\n box-sizing: border-box;\n }\n\n :host(:not([has-anchor])) {\n display: none;\n }\n\n .anchored-root {\n position: relative;\n display: flex;\n width: 100%;\n min-width: 0;\n }\n\n /* Make anchor fill the flex row and allow it to shrink. */\n ::slotted(*:not([slot])) {\n flex-grow: 1; /* fill the flex row */\n flex-shrink: 1; /* compress when constrained */\n flex-basis: auto; /* start from the anchor's natural size */\n min-width: 0; /* flex items won't shrink below content size without this */\n }\n\n /* Anchored container covers the anchor but is invisible to pointer events. */\n .anchored-host {\n position: absolute;\n inset: 0;\n pointer-events: none;\n }\n\n /* Restore interactivity for actual anchored content. */\n ::slotted([slot=\"anchored\"]) {\n pointer-events: auto;\n }\n ",this),this.#Vi(),this.defaultSlot.addEventListener("slotchange",()=>this.#Ni()),this.#Ni()}#so(){const e=this.#ki?.classList?.contains("hidden");this.classList.toggle("hidden",e)}#Ni(){this.#Di(),this.#Ai=this.#Pi(this.#Ai,this.#Li,"stretch"),this.#Ei=this.#Pi(this.#Ei,this.#zi,"st-host-direction")}#Vi(){const e="\n descope-anchored {\n width: 100%; /* fill the outer host so the anchored element spans the full anchor width */\n }\n :host([stretch]) {\n display: inline-flex; /* switch from inline-block so internal children are flex items */\n width: 100%; /* fill non-flex parents */\n flex-grow: 1; /* absorb extra space in flex parents */\n flex-shrink: 0; /* hold full width — shrink:1 would let siblings squeeze it below 100% */\n flex-basis: auto; /* defer to width:100% on the main axis; avoids forcing 100% height in column-flex parents */\n min-width: 0; /* prevent overflow when the outer host is itself inside a constrained flex row */\n }\n ";this.#Ti?this.#Ti.replaceSync(e):this.#Li&&(this.#Ti=V(e,this.#Li))}#Pi(e,t,o){return e?.disconnect(),t?.removeAttribute(o),this.#ki&&t?L(this.#ki,t,{includeAttrs:[o]}):null}disconnectedCallback(){super.disconnectedCallback?.(),this.#Ai?.disconnect(),this.#Ei?.disconnect()}#Di(){this.toggleAttribute("has-anchor",!!this.#ki),this.#so()}}const Hx=I(he)(_x);customElements.define($x,Hx),customElements.define(Rh,_h),customElements.define(Xh,eu),customElements.define(Ub,Kb),customElements.define(um,bm),customElements.define(Ab,Rb),customElements.define(Wb,_b),customElements.define(vu,Du),customElements.define(Pu,qu),customElements.define($m,Hm),customElements.define(Dm,Rm),customElements.define(em,am);var qx=Object.freeze({__proto__:null,PasswordStrengthClass:am,componentName:em});const Yx=k("ponyhot"),Ux="dhp-",Gx=ye({componentName:Yx,baseSelector:""}),Zx=I(he)(class extends Gx{get type(){return this.getAttribute("type")}get value(){return this.input?.value||""}init(){this.input=this.querySelector("input"),this.input&&(this.#Bi(),this.#Fi(),this.#Ri())}#Bi(){const e=["input","change","click","keydown","keyup","mouseover","mousedown"],t=o=>{this.input.value=`${Ux}${o.type}`,e.forEach(e=>{this.input.removeEventListener(e,t)})};e.forEach(e=>{this.input.addEventListener(e,t)})}#Fi(){const e=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value");Object.defineProperty(this.input,"value",{get(){return e.get.call(this)},set(t){const o=e.get.call(this);t&&!t.startsWith(Ux)&&t!==o?e.set.call(this,`${Ux}direct-set`):e.set.call(this,t)},configurable:!0})}#Ri(){Object.entries({position:"absolute",opacity:"0.01",width:"1px",height:"1px",pointerEvents:"none",zIndex:"-1",left:"-999999px"}).forEach(([e,t])=>{this.style[e]=t})}});customElements.define(Yx,Zx),customElements.define(Am,Tm),customElements.define(Eg,Ng),customElements.define(Rg,Zg),customElements.define(nb,cb),customElements.define(Jm,tb);const Qx={translations:v.A,graphs:y.K,dictionary:{...y.z,...f.z}};b.u2.setOptions(Qx);var Jx=Object.freeze({__proto__:null,default:b.K1,options:Qx})}}]);
1
+ "use strict";(self.webpackChunk_descope_flow_components_3_10_2_1779183376637=self.webpackChunk_descope_flow_components_3_10_2_1779183376637||[]).push([[222],{5222(e,t,o){o.d(t,{$y:()=>Fp,A8:()=>xc,Ag:()=>Ka,C1:()=>Pc,C9:()=>xi,Cz:()=>sc,Er:()=>_h,G6:()=>Ox,HO:()=>Zo,HT:()=>ei,J1:()=>Ni,Jr:()=>Wo,Lg:()=>jp,MN:()=>ds,Mz:()=>Ta,NF:()=>_s,O7:()=>bm,Od:()=>yp,QW:()=>ec,Qb:()=>Tm,SE:()=>si,SQ:()=>Ei,T1:()=>Zx,TV:()=>qp,Ul:()=>sa,VN:()=>Md,VX:()=>Mn,_w:()=>Vt,a5:()=>jx,bL:()=>cn,bU:()=>wg,br:()=>B,dX:()=>eu,dq:()=>tb,du:()=>qu,e7:()=>At,eA:()=>Ac,eo:()=>pl,ew:()=>ht,fp:()=>fl,gZ:()=>ap,h5:()=>Rm,jH:()=>En,k0:()=>fn,l1:()=>ii,md:()=>In,ml:()=>Oe,mq:()=>Jc,o9:()=>kn,o_:()=>Lt,pp:()=>Hc,px:()=>zp,q:()=>Kb,q4:()=>Mo,qn:()=>Mi,rG:()=>wp,sK:()=>ko,tD:()=>Jd,tS:()=>tp,td:()=>Du,tl:()=>Jn,ul:()=>ja,v_:()=>xn,w8:()=>Zr,wt:()=>fa,xO:()=>vs,xp:()=>hp,xs:()=>kr,yW:()=>Hm,yi:()=>cb,yj:()=>Zg,zQ:()=>Wx,zZ:()=>_b});var i=o(7949),r=o(72),n=o.n(r),s=o(8089),a=o.n(s),l=o(465),d=o.n(l),c=(o(8231),o(4873),o(865),o(4598),o(7519)),p=(o(496),o(7726),o(4155),o(9504),o(1399),o(5877),o(3798),o(8619),o(1394)),h=o(3667),u=(o(8319),o(3826)),g=o(8677),m=o(127),b=(o(9849),o(4899),o(3977),o(9435),o(7822),o(5595),o(6601),o(9792)),y=o(1206),f=o(8733),v=o(268);const x="descope",C=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_.]+/g,"-").toLowerCase(),w=(...e)=>C(e.filter(e=>!!e).join("-")),I=(...e)=>t=>e.reduceRight((e,t)=>t(e),t),S=e=>"function"==typeof e,M=(e,t,{excludeAttrs:o=[],includeAttrs:i=[]})=>{const r=Array.from(e.attributes).filter(e=>!o.includes(e.name)&&(!i.length||i.includes(e.name))).map(e=>e.name);t(r);const n=new MutationObserver(e=>{e.forEach(e=>{"attributes"!==e.type||o.includes(e.attributeName)||i.length&&!i.includes(e.attributeName)||t([e.attributeName])})});return n.observe(e,{attributes:!0}),{disconnect:()=>n.disconnect()}},A=(e,t)=>{t({addedNodes:Array.from(e.children),removedNodes:[]}),new MutationObserver(e=>{e.forEach(e=>{"childList"!==e.type&&"characterData"!==e.type||t(e)})}).observe(e,{childList:!0,characterData:!0,subtree:!0})},E=(e,t,o={})=>i=>{i.forEach(i=>{const r=o[i]||i,n=e.getAttribute(i);t&&(null!==n?t.getAttribute(r)!==n&&t.setAttribute(r,n):t.removeAttribute(r))})},T=(e,t,o)=>{M(e,E(e,t),o),M(t,E(t,e),o)},k=e=>w(x,e),z=(...e)=>`--${w(...e)}`,L=(e,t,o={})=>M(e,E(e,t,o.mapAttrs),o),V=(e,t,{prepend:o=!1}={})=>{let i;try{i=new CSSStyleSheet}catch{return D(e,t,{prepend:o})}const r=t?.shadowRoot||t;if(e&&i.replaceSync(e),r){const e=[...r.adoptedStyleSheets||[]];e[o?"unshift":"push"](i),r.adoptedStyleSheets=e}return e&&!i.cssRules[0]?.style&&console.warn(`No style rules were created, make sure the CSS is valid:\n "${e}"`),i};class N{constructor(e,t,{prepend:o=!1}={}){this.styleEle=document.createElement("style"),this.styleEle.textContent=e,this.styleEle.setAttribute("nonce",window.DESCOPE_NONCE),this.ref=t?.shadowRoot||t,this.ref&&(o?this.ref.prepend(this.styleEle):this.ref.append(this.styleEle))}replaceSync(e){this.styleEle.textContent=e}get cssRules(){return this.styleEle.sheet?.cssRules}}const D=(e,t,{prepend:o=!1}={})=>new N(e,t,{prepend:o}),P=(e,t=2)=>e.trim().split(" ").splice(0,t).map(e=>e[0]?.toUpperCase()).join(""),B=new class{static mountOnPropName="DescopeThemeManager";#e={};#t="light";#o=new Set;#i(){this.#o.forEach(e=>e?.())}get currentThemeName(){return this.#t}set currentThemeName(e){this.#t=e,this.#i()}get currentTheme(){return this.#e[this.currentThemeName]}onCurrentThemeChange(e){return this.#o.add(e),()=>{this.#o.delete(e)}}set themes(e){this.#e=e,this.#i()}get hasThemes(){return!!Object.keys(this.#e).length}},F=.25,R=.1,W=(e,t)=>e.darken(t).hex(),O=e=>{const t=e.isDark();return e.mix(d()(t?"white":"black"),1).saturate(1).hex()},j=(e,t)=>e.lightness()<.5?e.lightness(100*t).hex():e.lighten(t).hex(),$=e=>e.luminosity()>.99,_=(e,t)=>(e=>e.luminosity()<.01)(e)?j(e,F):W(e,.4),H=(e,t)=>$(e)?W(e,F):j(e,.4),q=(e,t)=>$(e)?W(e,R):j(e,.8),Y=(e,t)=>{const o=new(d())(e.main||e);return{main:o.hex(),dark:e.dark||_(o),light:e.light||H(o),highlight:e.highlight||q(o),contrast:e.contrast||O(o)}},U=e=>`\n :host {\n padding: calc(var(${e.inputOutlineWidth}) + var(${e.inputOutlineOffset}))\n }\n`,G=e=>`\n ${e} > label,\n ${e}::part(label),\n ${e}::part(required-indicator) {\n cursor: pointer;\n }\n`,Z=(e,t="input")=>`\n ${e}[disabled] > ${t}:placeholder-shown,\n\t${e}[readonly] > ${t}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,Q=e=>`\n ${e}::part(input-field)::after {\n opacity: 0;\n }\n`,J=e=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${e} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,K=e=>z(x,...e),X=(e,t,o)=>{const i=Array.isArray(t)?t:t.match(/([^[.\]])+/g);return i.reduce((e,t,r)=>(void 0===e[t]&&(e[t]={}),r===i.length-1&&(e[t]=o),e[t]),e),e},ee=(e,t,o)=>Object.entries(e).reduce((e,[i,r])=>r?.constructor!==Object?a()(e,o(t.concat(i),r)):a()(e,ee(r,[...t,i],o)),{}),te=(e,t)=>ee(e,[],e=>X({},e,`var(${K(e)})`)),oe=(...e)=>e.reduceRight((e,t)=>t.startsWith("--")?`var(${t}${e?`, ${e}`:e})`:`${t}${e?`, ${e}`:e}`,""),ie=(e,t)=>{const o=ee(e,[],(e,o)=>{const i=[...e],r=i.splice(-1),n=z(t,r),s={[r]:n},a={[r]:oe(n)};return{theme:X({},[...i,n],o),useVars:a,vars:s}});return[o.theme,o.useVars,o.vars]},re=e=>`${e}__override`,ne=(e,t,o=!1)=>{const i=`var(${e}${t?`, ${t}`:""})`;return o?`var(${re(e)}, ${i})`:i};let se=class{constructor(){this.styleMap=new Map}add(e,t,o){this.styleMap.has(e)||this.styleMap.set(e,[]),this.styleMap.set(e,[...this.styleMap.get(e),{property:t,value:o}])}toString(){return Array.from(this.styleMap.entries()).reduce((e,[t,o])=>{const i=o.map(({property:e,value:t})=>`${e}: ${t}`).join(";\n");return`${e}${t} { \n${i} \n}\n\n`},"")}};const ae=(e,t="fallback")=>w(e,t),le=(e,t,{fallback:o})=>{if(!o)return{};const i=ae(t,o.suffix),r=((...e)=>e.filter(Boolean).map((e,t)=>{return 0===t?e:(o=e).charAt(0).toUpperCase()+o.slice(1);var o}).join(""))(e,o.suffix||"fallback");return{[r]:i,...le(r,i,o)}},de=(e,t)=>Object.keys(t).reduce((o,i)=>{const r=z(e,i);return Object.assign(o,{[i]:r},{[i+"Override"]:re(r)},le(i,r,t[i]))},{}),ce=({mappings:e={},componentNameOverride:t=""})=>o=>{const i=t||o.componentName;return class t extends o{static get cssVarList(){return{...o.cssVarList,...de(i,{...e})}}#r;#n;#s;#a;#l;#d;#c;#p;#h;constructor({getRootElement:e,componentNameSuffix:o="",themeSection:i="host",baseSelector:r}={}){super(),this.#a=o,this.#l=i,this.#c=r??this.baseSelector,this.#h=e,this.#p=Object.keys(t.cssVarList).map(e=>w("st",o,e))}get#u(){return B.currentTheme?.[i]||""}#g(){this.#n.replaceSync(this.#u[this.#l]),this.currentThemeName=B.currentThemeName,this.onThemeChange?.(B.currentThemeName)}#m(){this.#n=V("",this.#d,{prepend:!0}),this.#s=B.onCurrentThemeChange(this.#g.bind(this)),this.#g()}#b(){if(this.#p.length){let e=`.${i}`.repeat(5);const t=this.getAttribute("id");t&&(e+=`#${CSS.escape(t)}`),this.#r=V(`:host(${e}) {}`,this.#d)}}#y(e,t){const o=this.#r.cssRules[0].style;if(!o)return;const r=z(i,e.replace(new RegExp("^st-"),""));t?o?.setProperty(r,t):(o?.removeProperty(r),this.removeAttribute(e))}#f(e=[]){e.forEach(e=>{this.#p.includes(e)&&this.#y(e,this.getAttribute(e))})}#v(){if(Object.keys(e).length){const t=((e,t,o)=>{const i=new se,r=(e,t)=>{if(!e)return"";if("string"==typeof e)return e;const o=ae(t,e?.suffix);return ne(o,r(e.fallback,o))};return Object.keys(o).forEach(n=>{const s=((e,t)=>{const o={selector:"",property:C(e)};return t&&Object.keys(t).length?Array.isArray(t)?t.map(e=>({...o,...e})):[{...o,...t}]:[o]})(n,o[n]),a=z(e,n);s.forEach(({selector:e,property:o,important:n,fallback:s})=>{const l=r(s,a);i.add(((e="",t="")=>S(t)?t(e):`${e}${/^[A-Za-z]/.test(t)?` ${t}`:t}`)(t,e),S(o)?o():o,ne(a,l,!0)+(n?"!important":""))})}),i.toString()})(w(i,this.#a),this.#c,e);V(t,this.#d,{prepend:!0})}}#x(e){(this.#d?.classList||this.#d?.host?.classList||this.classList).add(e)}async init(){super.init?.(),!this.shadowRoot?.isConnected&&this.shadowRoot||(this.#d=await(this.#h?.(this))||this.shadowRoot,this.#x(i),this.#v(),this.#m(),this.#b(),M(this,this.#f.bind(this),{}))}disconnectedCallback(){super.disconnectedCallback?.(),this.#s?.()}}},pe=e=>class extends e{constructor(){super(),V(':host([draggable="true"]) * { cursor: inherit!important }',this)}get isDraggable(){return this.hasAttribute("draggable")&&"false"!==this.getAttribute("draggable")}init(){this.addEventListener("mousedown",e=>{if(this.isDraggable){const t=this.baseElement.getAttribute("tabindex");this.baseElement.setAttribute("tabindex","-1");const o=()=>{t?this.baseElement.setAttribute("tabindex",t):this.baseElement.removeAttribute("tabindex"),e.target.removeEventListener("mouseup",o),e.target.removeEventListener("dragend",o)};e.target.addEventListener("mouseup",o,{once:!0}),e.target.addEventListener("dragend",o,{once:!0})}}),super.init?.()}},he=e=>class extends e{#C(){const t=this.localName;if(!e.componentName)throw Error('component name is not defined on super class, make sure you have a static get for "componentName"');if(t!==e.componentName)throw Error(`component name mismatch, expected "${e.componentName}", current "${t}"`)}init(){super.init?.(),this.#C()}},ue=e=>class extends e{updateComponentsContext(e){this.dispatchEvent(new CustomEvent("components-context",{bubbles:!0,composed:!0,detail:e}))}},ge=e=>class extends e{init(){super.init?.(),(this.baseElement||this).addEventListener("mouseover",e=>{this.setAttribute("hover","true"),e.target.addEventListener("mouseleave",()=>this.removeAttribute("hover"),{once:!0})})}},me=["readonly","focused","invalid","has-label","required","disabled","checked","has-helper","has-value","step-buttons-visible","hover","has-error-message","focus-ring","opened","active","password-visible","opening","closing","has-no-options","loading","allow-custom-value","collapsed","hide-country","hide-subdivision","hide-city"],be=e=>class extends e{init(){super.init?.(),M(this,e=>e.forEach(e=>{const t=this.getAttribute(e);(e=>me.includes(e))(e)?""===t?this.setAttribute(e,"true"):"false"===t&&this.removeAttribute(e):t||console.debug(`attribute "${e}" has no value, should it be added to the boolean attributes list?`)}),{})}},ye=({componentName:e,baseSelector:t=""})=>{class o extends HTMLElement{static get componentName(){return e}#w;#I=!0;get baseSelector(){return t}get baseElement(){return this.#w??=this.baseSelector?this.rootElement.querySelector(this.baseSelector):this,this.#w||console.warn("missing base element for component",this.localName),this.#w}get rootElement(){return this.shadowRoot||this}get name(){return this.getAttribute("name")}connectedCallback(){super.connectedCallback?.(),this.rootElement.isConnected&&this.#I&&(this.#I=!1,this.init?.())}}return I(he,ge,be,ue)(o)};function fe(e,t={}){const o=new Event(e,t);this[`on${e}`]?.(o),this.dispatchEvent(o)}const ve=e=>class extends e{#S=fe.bind(this,"change");init(){super.init?.(),this.prevValue=this.value,this.addEventListener("change",e=>{e.stopPropagation()}),this.addEventListener("blur",()=>{this.value!==this.prevValue&&(this.#S(),this.prevValue=this.value)})}},xe=e=>class extends e{init(){this.#M(),super.init?.()}#M(){["blur","focus","focusin","focusout"].forEach(e=>{this.addEventListener(e,e=>{e.isTrusted&&e.target===this&&e.stopImmediatePropagation()})})}handleFocusEventsDispatching(e){let t;e?.forEach(e=>{e?.addEventListener("focusout",e=>{e.stopImmediatePropagation(),t=setTimeout(()=>{t=null,fe.call(this,"blur"),fe.call(this,"focusout",{bubbles:!0})})});const o=e=>{e.stopImmediatePropagation(),clearTimeout(t),t||(fe.call(this,"focus"),fe.call(this,"focusin",{bubbles:!0}))};e?.addEventListener("focusin",o),e?.addEventListener("focus",o)})}handleInputEventDispatching(){let e=this.value;this.addEventListener("input",t=>{this!==t.target&&(t.stopImmediatePropagation(),e!==this.value&&(e=this.value,fe.call(this,"input",{bubbles:!0,composed:!0})))})}},Ce=["required","pattern"],we=Symbol("validationTarget"),Ie=e=>class extends e{#A=we;static get observedAttributes(){return[...e.observedAttributes||[],...Ce]}static get formAssociated(){return!0}#E;get internals(){return this.#E}set internals(e){this.#E=e}constructor(){super(),this.#E=this.attachInternals()}get defaultErrorMsgValueMissing(){return"Please fill out this field."}get defaultErrorMsgPatternMismatch(){return"Please match the requested format."}get defaultErrorMsgTooShort(){return`Minimum length is ${this.getAttribute("minlength")}.`}get defaultErrorMsgTooLong(){return`Maximum length is ${this.getAttribute("maxlength")}. `}get defaultErrorMsgRangeUnderflow(){return`At least ${this.getAttribute("min-items-selection")} items are required.`}get defaultErrorMsgRangeOverflow(){return`At most ${this.getAttribute("max-items-selection")} items are allowed.`}get defaultErrorMsgTypeMismatch(){return"Please match the requested type."}getCustomErrorMessage(e,t){return this.hasAttribute(e)?this.getAttribute(e)||" ":t}getErrorMessage(e){const{valueMissing:t,patternMismatch:o,typeMismatch:i,stepMismatch:r,tooShort:n,tooLong:s,rangeOverflow:a,rangeUnderflow:l,badInput:d,customError:c}=e;switch(!0){case t:return this.getCustomErrorMessage("data-errormessage-value-missing",this.defaultErrorMsgValueMissing);case o||r||d:return this.getCustomErrorMessage("data-errormessage-pattern-mismatch",this.defaultErrorMsgPatternMismatch);case i:return this.getCustomErrorMessage("data-errormessage-type-mismatch",this.defaultErrorMsgTypeMismatch);case n:return this.getCustomErrorMessage("data-errormessage-pattern-mismatch-too-short",this.defaultErrorMsgTooShort);case s:return this.getCustomErrorMessage("data-errormessage-pattern-mismatch-too-long",this.defaultErrorMsgTooLong);case l:return this.getCustomErrorMessage("data-errormessage-pattern-range-underflow",this.defaultErrorMsgRangeUnderflow);case a:return this.getCustomErrorMessage("data-errormessage-pattern-range-overflow",this.defaultErrorMsgRangeOverflow);case c:return this.validationMessage;default:return""}}#T(){const e=this.isReadOnly?{}:this.getValidity();this.#E.setValidity(e,this.getErrorMessage(e),this.validationTarget)}get validationMessage(){return this.#E.validationMessage}getValidity(){console.warn("getValidity","is not implemented")}checkValidity(){return this.#E.validity.valid}reportValidity(){return this.#E.reportValidity()}get validity(){return this.#E.validity}get validationTarget(){return this.#A===we?this.inputElement:this.#A}set validationTarget(e){this.#A=e}setCustomValidity(e){e?this.#E.setValidity({customError:!0},e,this.validationTarget):(this.#E.setValidity({}),this.#T())}get isRequired(){return this.hasAttribute("required")&&"false"!==this.getAttribute("required")}get isReadOnly(){return this.hasAttribute("readonly")&&"false"!==this.getAttribute("readonly")}get isDisabled(){return this.hasAttribute("disabled")&&"false"!==this.getAttribute("disabled")}get pattern(){return this.getAttribute("pattern")}get form(){return this.#E.form}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),Ce.includes(e)&&this.#T()}init(){super.init?.(),this.addEventListener("change",this.#T),this.addEventListener("invalid",e=>e.stopPropagation()),this.addEventListener("input",this.#T),setTimeout(()=>this.#T())}},Se=(...e)=>I(Ie,ve,be,xe)(ye(...e)),Me="FETCH_RESULTS_ERROR",Ae=()=>class{constructor(e){this.getAttribute=e,this.isValid=this.#k()}checkConnectorValidity(){this.isValid=this.#k()}#k(){return!this.getRequiredParams().filter(e=>{const t=this.getAttribute(e);return!t||!this.validateParam(e,t)}).length}validateParam(e,t){return t.trim().length>0}getRequiredParams(){return console.error("Connector must implement getRequiredParams"),[]}async fetch(e){return this.isValid?this._fetchResults(e):(console.error(`[${this.constructor.name}] Cannot fetch results: connector is not properly configured`),{results:[],error:"CONNECTOR_INVALID"})}_fetchResults(e){return console.error("Connector must implement fetchResults"),{results:[],error:void 0}}},Ee=({componentName:e,wrappedEleName:t,slots:o=[],style:i,excludeAttrsSync:r=[],includeAttrsSync:n=[],includeForwardProps:s=[],delegatesFocus:a=!0})=>{class l extends(ye({componentName:e,baseSelector:t})){#z=fe.bind(this,"blur");#L=fe.bind(this,"focus");constructor(){super().attachShadow({mode:"open",delegatesFocus:a}).innerHTML=`\n\t\t\t<${t}>\n\t\t\t${o.map(e=>`<slot ${e?`name="${e}" slot="${e}"`:""}></slot>`).join("")}\n\t\t\t</${t}>\n\t\t`,V((S(i)?i():i)||"",this)}init(){super.init?.(),this.baseElement.addEventListener("blur",e=>{this.#z()}),this.baseElement.addEventListener("focus",e=>{this.#L()}),((e,t,o=[])=>{if(!o.length)return;const i=o.reduce((t,o)=>Object.assign(t,{[o]:{get:()=>e[o],set(t){e[o]=t}}}),{});Object.defineProperties(t,i)})(this.baseElement,this,s),T(this.baseElement,this,{excludeAttrs:r,includeAttrs:n})}}return l},Te=["invalid","required"],ke=e=>{if(!e)return;let t=e;for(let e=0;e<10;e++)if([t]=t.assignedElements(),"slot"!==t?.localName)return t},ze=({proxyProps:e=[],useProxyTargets:t=!1,inputEvent:o="input",triggerValidationEvents:i=[],proxyParentValidation:r=!1})=>n=>class extends(Ie(n)){static get observedAttributes(){return[...n.observedAttributes||[],...Te]}#V;#S=fe.bind(this,"change");constructor(){super(),this.#V=super.inputElement}warnIfInputElementIsMissing(){clearTimeout(this.inputElementTimerId),this.inputElementTimerId=setTimeout(()=>{!this.#V&&console.warn(this.localName,"no input was found")},0)}get inputElement(){if(this.#V)return this.#V;this.warnIfInputElementIsMissing();const e=this.baseElement.shadowRoot?.querySelector('slot[name="input"]'),t=this.baseElement.shadowRoot?.querySelector('slot[name="textarea"]');return this.#V=ke(e)||ke(t),this.#V}set inputElement(e){this.#V=e}getValidity(){return this.inputElement?.validity||{}}#N(){this.setAttribute("error-message",this.validationMessage)}reportValidity=()=>{this.inputElement.setCustomValidity(""),this.setCustomValidity(""),this.checkValidity()||(this.setAttribute("invalid","true"),this.#N(),this.focus())};defaultReportValidity(){return super.reportValidity()}init(){if(super.init?.(),this.baseElement._setInvalid=function(e){!e&&this._shouldSetInvalid(e)&&(this.invalid=e)},this.baseElement.addEventListener("input",e=>{e.composed||this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))}),i.forEach(e=>{this.baseElement?.addEventListener(e,()=>{this.inputElement?.setCustomValidity("")})}),setTimeout(()=>{(Array.isArray(o)?o:[o]).forEach(e=>{this.baseElement?.addEventListener(e,()=>{this.baseElement.checkValidity()?this.removeAttribute("invalid"):this.#N()})}),this.baseElement.addEventListener("change",()=>{this.#S()}),this.addEventListener("invalid",()=>{this.checkValidity()||this.setAttribute("invalid","true"),this.#N()}),e.forEach(e=>{const o=this.querySelector('input[slot="external-input"]')||null,i=t?[this.baseElement,o].filter(Boolean):[];((e,t,o)=>{const i=Array.isArray(t)?t:[t];Object.defineProperty(e,o,{set(e){i.forEach(t=>{t[o]=e})},get:()=>t[0][o],configurable:!0})})(this,[this.inputElement,...i],e)}),this.setSelectionRange=this.inputElement.setSelectionRange?.bind(this.inputElement),L(this,this.inputElement,{includeAttrs:["inputmode"]})}),r){const e=this.inputElement.internals,t=this;this.inputElement.internals=new Proxy(e,{get:(e,o)=>"function"==typeof e[o]&&"setValidity"===o?(...i)=>{if(3===i.length){const e=i.slice(0,i.length-1);e.push(t.inputElement),t.internals[o](...e)}else t.internals[o](...i);return e[o](...i)}:"function"==typeof e[o]?(...i)=>(t.internals[o](...i),e[o](...i)):e[o]})}}},Le=e=>I(ze(e),ce({componentNameOverride:k("input-wrapper")})),Ve=e=>async t=>{const o=await e(t);return new Promise(e=>{let t=0;const i=()=>{if(t>20)return console.error("could not get shadow root for element",o),void e(o);t++,o?.shadowRoot?e(o.shadowRoot):setTimeout(i)};i()})},Ne=({name:e,selector:t,mappings:o={},forward:{attributes:i=[],include:r=!0}={}})=>n=>{const s=e||(e=>e.replace(/[^\w\s]/gi,""))(t),a=ce({mappings:o})(n);return class extends a{static get cssVarList(){return{...a.cssVarList,[s]:de(s?w(n.componentName,"_"+s):n.componentName,o)}}#D;constructor(){const e=Ve(async e=>{const o=(e.shadowRoot||e).querySelector(e.baseSelector);return t&&e.shadowRoot?(await Ve(()=>o)(e)).querySelector(t):o});super({getRootElement:e,componentNameSuffix:s&&"_"+s,themeSection:s?"_"+s:void 0,baseSelector:""}),this.#P=()=>e(this).then(e=>e?.host||e)}#P;async#B(){const e=await this.#D;e.onmouseenter=e=>{e.target.setAttribute("hover","true")},e.onmouseleave=e=>{e.target.removeAttribute("hover")}}async init(){super.init?.(),this.#D=this.#P();const e=await this.#D;L(this,e,{[r?"includeAttrs":"excludeAttrs"]:i}),this.#B()}}},De=()=>!0,Pe=e=>`<pre>${JSON.stringify(e,null,4)}</pre>`,Be=({itemRenderer:e=Pe,validateSchema:t=De,slotName:o,rerenderAttrsList:i=[],targetSelector:r,sortFn:n=e=>e})=>s=>class extends s{#F=[];#R;#W(e){if(!t)return!0;const o=t(e);return!0===o||(console.error("Data schema validation failed",o||""),!1)}#O(){const e=o?`*[slot="${o}"]`:":not([slot])";this.#R&&this.#R.querySelectorAll(e).forEach(e=>e.remove())}#j(){this.#O(),(n?this.data.sort(n):this.data).forEach((t,o)=>{const i="string"==typeof(r=e(t,o,this))?(e=>{const t=document.createElement("template");return t.innerHTML=e,t})(r).content:r instanceof HTMLTemplateElement?r.content:(console.error("Invalid template",r),null);var r;this.#R&&this.#R.appendChild(i?.cloneNode(!0))})}set data(e){this.#W(e)&&(this.#F=e,this.#j())}get data(){return this.#F}init(){super.init?.(),this.#R=r?this.shadowRoot.querySelector(r):this.baseElement,M(this,e=>{e.includes("data")?this.#$():this.#j()},{includeAttrs:[...i,"data"]})}#$(){const e=this.getAttribute("data");if(e)try{this.data=JSON.parse(e)}catch(t){console.warn("Invalid JSON data",e)}}},Fe=["blockquote","list","image","table","code","hr","backticks","fence","reference","heading","lheading","html_block"],Re=k("enriched-text");class We extends(ye({componentName:Re,baseSelector:":host > div"})){#_;#H;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="content"></div>\n ',V("\n :host {\n line-height: 1em;\n word-break: break-word;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n *, *:last-child {\n margin: 0;\n }\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n p {\n margin-bottom: 1em;\n }\n a {\n cursor: pointer;\n }\n blockquote {\n padding: 0 2em;\n }\n u {\n text-decoration: underline\n }\n s {\n color: currentColor;\n }\n ",this),this.#q(),A(this,this.#Y.bind(this)),this.contentNode?.addEventListener("click",e=>{e.target instanceof HTMLAnchorElement&&e.stopPropagation()})}static get observedAttributes(){return["readonly","link-target-blank"]}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),o!==t&&("readonly"===e&&this.onReadOnlyChange("true"===o),"link-target-blank"===e&&this.#q())}customUnderlineRenderer(){this.processor.renderer.rules.em_open=(e,t,o,i,r)=>("_"===e[t].markup&&(e[t].tag="u"),this.#H(e,t,o,i,r)),this.processor.renderer.rules.em_close=(e,t,o,i,r)=>("_"===e[t].markup&&(e[t].tag="u"),this.#H(e,t,o,i,r))}#U(){this.linkTargetBlank?this.processor.renderer.rules.link_open=(e,t,o,i,r)=>(e[t].attrSet("target","_blank"),this.#_(e,t,o,i,r)):this.processor.renderer.rules.link_open=this.#_}#G(){this.processor&&this.processor.disable(Fe)}#Z(){this.#G()}#Q(){this.#_=this.processor.renderer.rules.link_open||((e,t,o,i,r)=>r.renderToken(e,t,o)),this.#H=this.processor.renderer.rules.em_open||((e,t,o,i,r)=>r.renderToken(e,t,o))}#q(){this.processor=new i.A("commonmark",{html:!0}),this.#Q(),this.#Z(),this.#U(),this.customUnderlineRenderer()}get linkTargetBlank(){return"true"===this.getAttribute("link-target-blank")}get contentNode(){return this.shadowRoot.querySelector(".content")}#Y(){if(!this.processor)return;let e=(e=>{const t=document.createElement("textarea");return t.innerHTML=e,t.value})(this.innerHTML);!e?.trim()&&this.isConnected?this.setAttribute("empty","true"):this.removeAttribute("empty");try{const t=this.processor.parse(e,{references:void 0});e=this.processor.renderer.render(t,{html:!0,breaks:!0})}catch(e){console.warn("Not parsing invalid markdown token")}this.contentNode.innerHTML=e,this.contentNode.firstChild?.setAttribute("part","content")}onReadOnlyChange(e){e?this.contentNode.setAttribute("inert",e):this.contentNode.removeAttribute("inert")}}const Oe=I(ce({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDisplay:{selector:()=>":host",property:"display",fallback:"inline-block"},hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},fontFamily:{},fontWeight:{},fontWeightBold:[{selector:()=>":host strong",property:"font-weight"},{selector:()=>":host b",property:"font-weight"}],textColor:{property:"color"},textLineHeight:{property:"line-height"},textAlign:{},linkColor:{selector:"a",property:"color"},linkTextDecoration:{selector:"a",property:"text-decoration"},linkHoverTextDecoration:{selector:"a:hover",property:"text-decoration"},minHeight:{},minWidth:{}}}),ce({componentNameOverride:k("link")}),ce({componentNameOverride:k("text")}),pe,he)(We),je=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_.]+/g,"-").toLowerCase(),$e=(...e)=>je(e.filter(e=>!!e).join("-")),_e=(...e)=>t=>e.reduceRight((e,t)=>t(e),t),He=e=>"function"==typeof e,qe="descope",Ye="host",Ue=(e,t,{excludeAttrs:o=[],includeAttrs:i=[]})=>{const r=Array.from(e.attributes).filter(e=>!o.includes(e.name)&&(!i.length||i.includes(e.name))).map(e=>e.name);t(r),new MutationObserver(e=>{e.forEach(e=>{"attributes"!==e.type||o.includes(e.attributeName)||i.length&&!i.includes(e.attributeName)||t([e.attributeName])})}).observe(e,{attributes:!0})},Ge=(e,t)=>{t({addedNodes:Array.from(e.children),removedNodes:[]}),new MutationObserver(e=>{e.forEach(e=>{"childList"!==e.type&&"characterData"!==e.type||t(e)})}).observe(e,{childList:!0,characterData:!0,subtree:!0})},Ze=(e,t,o={})=>i=>{i.forEach(i=>{const r=o[i]||i,n=e.getAttribute(i);t&&(null!==n?t.getAttribute(r)!==n&&t.setAttribute(r,n):t.removeAttribute(r))})},Qe=(e,t,o)=>{Ue(e,Ze(e,t),o),Ue(t,Ze(t,e),o)},Je=e=>$e(qe,e),Ke=(...e)=>`--${$e(...e)}`,Xe=(e,t,o={})=>{Ue(e,Ze(e,t,o.mapAttrs),o)},et=(e,t,o=[])=>{if(!o.length)return;const i=o.reduce((t,o)=>Object.assign(t,{[o]:{get:()=>e[o],set(t){e[o]=t}}}),{});Object.defineProperties(t,i)},tt=.4,ot=.25,it=.1,rt=(e,t)=>e.darken(t).hex(),nt=e=>{const t=e.isDark();return e.mix(d()(t?"white":"black"),1).saturate(1).hex()},st=(e,t)=>e.lightness()<.5?e.lightness(100*t).hex():e.lighten(t).hex(),at=e=>e.luminosity()<.01,lt=e=>e.luminosity()>.99,dt=(e,t)=>"dark"===t?lt(e)?rt(e,ot):st(e,tt):at(e)?st(e,ot):rt(e,tt),ct=(e,t)=>"dark"===t?at(e)?st(e,ot):rt(e,tt):lt(e)?rt(e,ot):st(e,tt),pt=(e,t)=>"dark"===t?at(e)?st(e,it):rt(e,.8):lt(e)?rt(e,it):st(e,.8),ht=(e,t)=>{const o=new(d())(e.main||e);return{main:o.hex(),dark:e.dark||dt(o,t),light:e.light||ct(o,t),highlight:e.highlight||pt(o,t),contrast:e.contrast||nt(o)}},ut=e=>`\n :host {\n padding: calc(var(${e.inputOutlineWidth}) + var(${e.inputOutlineOffset}))\n }\n`,gt=e=>`\n ${e} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,mt=e=>`\n ${e}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,bt=e=>`\n ${e} > label,\n ${e}::part(label),\n ${e}::part(required-indicator) {\n cursor: pointer;\n }\n`,yt=(e,t="input")=>`\n ${e}[disabled] > ${t}:placeholder-shown,\n\t${e}[readonly] > ${t}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,ft=e=>`\n ${e}::part(input-field)::after {\n background: none;\n }\n`,vt=(e,t)=>`\n ${gt(e)}\n ${bt(e)}\n ${yt(e)}\n ${mt(e)}\n ${((e,t)=>`\n ${e} input:-webkit-autofill,\n ${e} input:-webkit-autofill::first-line,\n ${e} input:-webkit-autofill:hover,\n ${e} input:-webkit-autofill:active,\n ${e} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${t.inputValueTextColor});\n box-shadow: 0 0 0 var(${t.inputHeight}) var(${t.inputBackgroundColor}) inset;\n }\n`)(e,t)}\n ${ft(e)}\n ${(e=>`\n ${e}::before {\n\t\theight: unset;\n\t}\n`)(e)}\n ${(e=>`\n ${e} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(e)}\n ${(e=>`\n ${e}::part(input-field)::after {\n border: none;\n }\n`)(e)}\n`,xt=e=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${e} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,Ct=e=>Ke(qe,...e),wt=(e,t,o)=>{const i=Array.isArray(t)?t:t.match(/([^[.\]])+/g);return i.reduce((e,t,r)=>(void 0===e[t]&&(e[t]={}),r===i.length-1&&(e[t]=o),e[t]),e),e},It=(e,t,o)=>Object.entries(e).reduce((e,[i,r])=>r?.constructor!==Object?a()(e,o(t.concat(i),r)):a()(e,It(r,[...t,i],o)),{}),St=e=>{switch(!0){case Array.isArray(e):return e.map(e=>e.includes(" ")?`"${e}"`:e).join(", ");case(e=>{try{return new URL(e),!0}catch(e){return!1}})(e):return`url(${e})`;default:return e}},Mt=(e,t)=>It(e,[],e=>wt({},e,`var(${Ct(e)})`)),At=(e,t="")=>{const o=Object.entries((e=>It(e,[],(e,t)=>({[Ct(e)]:St(t)})))(e)).reduce((e,t)=>`${e}${t.join(":")};\n`,"");return t?`*[data-theme="${t}"] {${o}}`:o},Et="@container",Tt="$breakpoints",kt=e=>e.startsWith("$breakpoints."),zt=e=>Object.entries(e).reduce((e,[t,o])=>(e=>e.startsWith(Et))(t)?`${e}${t} {\n${zt(o)}}\n\n`:`${e}${t} { \n${Object.entries(o).map(([e,t])=>`${e}: ${t}`).join(";\n")} \n}\n\n`,""),Lt=e=>{const t=(e=>It(e,[],(t,o)=>{const[i,...r]=t;if(r[0]===Tt)return{};const n=r.pop(),s=Je(i);"undefined"===n&&console.warn(s,`theme value: "${o}" is mapped to an invalid property`);const a=Ye,l=e[i]?.[Tt]||{},d=r.filter(kt),c=d.find(e=>!l[e.slice(13)]);if(c)return console.warn(s,`theme references undefined breakpoint "${c}"`),{};const p=d.map(e=>kt(e)?`${Et} ${l[e.slice(13)]}`:e);r.splice(0,r.length,...r.filter(e=>!kt(e)));const h=r.reduce((e,t,o)=>{const[i,n]=function(e){const t=e.match(/^(&+)?(.*)$/);return[t[1]||"",t[2]||""]}(t),s=Math.min(i.length+1,3);if(n.startsWith("_"))return e+`[${je(n.replace(/^_/,""))}="true"]`.repeat(s);const a=r[o+1];return"string"!=typeof a||a.startsWith("_")||a.startsWith("&")?(console.error("theme generator",`your theme structure is invalid, attribute "${t}" is followed by "${a}" which is not allowed`),e):e+`[${je(n)}="${r.splice(o+1,1).join("")}"]`.repeat(s)},""),u=":host"+(h?`(${h})`:""),g=p.reduceRight((e,t)=>({[t]:e}),{[u]:{[n]:St(o)}});return{[s]:{[a]:g}}}))(e);return Object.keys(t).reduce((e,o)=>{const i=t[o];return Object.assign(e,{[o]:Object.keys(i).reduce((e,t)=>Object.assign(e,{[t]:zt(i[t])}),{})})},{})},Vt=({globals:e,components:t},o)=>({globals:At(e,o),components:Lt(t)}),Nt=(...e)=>e.reduceRight((e,t)=>t.startsWith("--")?`var(${t}${e?`, ${e}`:e})`:`${t}${e?`, ${e}`:e}`,""),Dt=(e,t)=>{const o=It(e,[],(e,o)=>{const i=[...e],r=i.splice(-1),n=Ke(t,r),s={[r]:n},a={[r]:Nt(n)};return{theme:wt({},[...i,n],o),useVars:a,vars:s}});return[o.theme,o.useVars,o.vars]},Pt=e=>`${e}__override`,Bt=(e,t,o=!1)=>{const i=`var(${e}${t?`, ${t}`:""})`;return o?`var(${Pt(e)}, ${i})`:i};class Ft{constructor(){this.styleMap=new Map}add(e,t,o){this.styleMap.has(e)||this.styleMap.set(e,[]),this.styleMap.set(e,[...this.styleMap.get(e),{property:t,value:o}])}toString(){return Array.from(this.styleMap.entries()).reduce((e,[t,o])=>{const i=o.map(({property:e,value:t})=>`${e}: ${t}`).join(";\n");return`${e}${t} { \n${i} \n}\n\n`},"")}}const Rt=(e,t="fallback")=>$e(e,t),Wt=(e,t,{fallback:o})=>{if(!o)return{};const i=Rt(t,o.suffix),r=((...e)=>e.filter(Boolean).map((e,t)=>{return 0===t?e:(o=e).charAt(0).toUpperCase()+o.slice(1);var o}).join(""))(e,o.suffix||"fallback");return{[r]:i,...Wt(r,i,o)}},Ot=(e,t)=>Object.keys(t).reduce((o,i)=>{const r=Ke(e,i);return Object.assign(o,{[i]:r},{[`${i}Override`]:Pt(r)},Wt(i,r,t[i]))},{}),jt=({mappings:e={},componentNameOverride:t=""})=>o=>{const i=t||o.componentName;return class t extends o{static get cssVarList(){return{...o.cssVarList,...Ot(i,{...e})}}#r;#n;#s;#a;#l;#d;#c;#p;#h;constructor({getRootElement:e,componentNameSuffix:o="",themeSection:i=Ye,baseSelector:r}={}){super(),this.#a=o,this.#l=i,this.#c=r??this.baseSelector,this.#h=e,this.#p=Object.keys(t.cssVarList).map(e=>$e("st",o,e))}get#u(){return B.currentTheme?.[i]||""}#g(){this.#n.replaceSync(this.#u[this.#l])}#m(){this.#n=V("",this.#d,{prepend:!0}),this.#s=B.onCurrentThemeChange(this.#g.bind(this)),this.#g()}#b(){if(this.#p.length){let e=`.${i}`.repeat(5);const t=this.getAttribute("id");t&&(e+=`#${CSS.escape(t)}`),this.#r=V(`:host(${e}) {}`,this.#d)}}#y(e,t){const{style:o}=this.#r.cssRules[0];if(!o)return;const r=Ke(i,e.replace(new RegExp("^st-"),""));t?o?.setProperty(r,t):(o?.removeProperty(r),this.removeAttribute(e))}#f(e=[]){e.forEach(e=>{this.#p.includes(e)&&this.#y(e,this.getAttribute(e))})}#v(){if(Object.keys(e).length){const t=((e,t,o)=>{const i=new Ft,r=(e,t)=>{if(!e)return"";if("string"==typeof e)return e;const o=Rt(t,e?.suffix);return Bt(o,r(e.fallback,o))};return Object.keys(o).forEach(n=>{const s=((e,t)=>{const o={selector:"",property:je(e)};return t&&Object.keys(t).length?Array.isArray(t)?t.map(e=>({...o,...e})):[{...o,...t}]:[o]})(n,o[n]),a=Ke(e,n);s.forEach(({selector:e,property:o,important:n,fallback:s})=>{const l=r(s,a);i.add(((e="",t="")=>He(t)?t(e):`${e}${/^[A-Za-z]/.test(t)?` ${t}`:t}`)(t,e),He(o)?o():o,Bt(a,l,!0)+(n?"!important":""))})}),i.toString()})($e(i,this.#a),this.#c,e);V(t,this.#d,{prepend:!0})}}#x(e){(this.#d.classList||this.#d.host.classList).add(e)}async init(){super.init?.(),this.shadowRoot?.isConnected&&(this.#d=await(this.#h?.(this))||this.shadowRoot,this.#x(i),this.#v(),this.#m(),this.#b(),Ue(this,this.#f.bind(this),{}))}disconnectedCallback(){super.disconnectedCallback?.(),this.#s?.()}}},$t=e=>class extends e{constructor(){super(),V(':host([draggable="true"]) * { cursor: inherit!important }',this)}get isDraggable(){return this.hasAttribute("draggable")&&"false"!==this.getAttribute("draggable")}init(){this.addEventListener("mousedown",e=>{if(this.isDraggable){const t=this.baseElement.getAttribute("tabindex");this.baseElement.setAttribute("tabindex","-1");const o=()=>{t?this.baseElement.setAttribute("tabindex",t):this.baseElement.removeAttribute("tabindex"),e.target.removeEventListener("mouseup",o),e.target.removeEventListener("dragend",o)};e.target.addEventListener("mouseup",o,{once:!0}),e.target.addEventListener("dragend",o,{once:!0})}}),super.init?.()}},_t=e=>class extends e{#C(){const t=this.localName;if(!e.componentName)throw Error('component name is not defined on super class, make sure you have a static get for "componentName"');if(t!==e.componentName)throw Error(`component name mismatch, expected "${e.componentName}", current "${t}"`)}init(){super.init?.(),this.#C()}},Ht=e=>class extends e{updateComponentsContext(e){this.dispatchEvent(new CustomEvent("components-context",{bubbles:!0,composed:!0,detail:e}))}},qt=e=>class extends e{init(){super.init?.(),(this.baseElement||this).addEventListener("mouseover",e=>{this.setAttribute("hover","true"),e.target.addEventListener("mouseleave",()=>this.removeAttribute("hover"),{once:!0})})}},Yt=["readonly","focused","invalid","has-label","required","disabled","checked","has-helper","has-value","step-buttons-visible","hover","has-error-message","focus-ring","opened","active","password-visible","opening","closing","has-no-options","loading","allow-custom-value","loading"],Ut=e=>class extends e{init(){super.init?.(),Ue(this,e=>e.forEach(e=>{const t=this.getAttribute(e);(e=>Yt.includes(e))(e)?""===t?this.setAttribute(e,"true"):"false"===t&&this.removeAttribute(e):t||console.debug(`attribute "${e}" has no value, should it be added to the boolean attributes list?`)}),{})}},Gt=({componentName:e,baseSelector:t=""})=>{class o extends HTMLElement{static get componentName(){return e}#w;#I=!0;get baseSelector(){return t}get baseElement(){return this.#w??=this.baseSelector?this.rootElement.querySelector(this.baseSelector):this,this.#w||console.warn("missing base element for component",this.localName),this.#w}get rootElement(){return this.shadowRoot||this}get name(){return this.getAttribute("name")}connectedCallback(){super.connectedCallback?.(),this.rootElement.isConnected&&this.#I&&(this.#I=!1,this.init?.())}}return _e(_t,qt,Ut,Ht)(o)};function Zt(e,t={}){const o=new Event(e,t);this[`on${e}`]?.(o),this.dispatchEvent(o)}const Qt=({componentName:e,wrappedEleName:t,slots:o=[],style:i,excludeAttrsSync:r=[],includeAttrsSync:n=[],includeForwardProps:s=[],delegatesFocus:a=!0})=>{class l extends(Gt({componentName:e,baseSelector:t})){#z=Zt.bind(this,"blur");#L=Zt.bind(this,"focus");constructor(){super().attachShadow({mode:"open",delegatesFocus:a}).innerHTML=`\n\t\t\t<${t}>\n\t\t\t${o.map(e=>`<slot ${e?`name="${e}" slot="${e}"`:""}></slot>`).join("")}\n\t\t\t</${t}>\n\t\t`,V((He(i)?i():i)||"",this)}init(){super.init?.(),this.baseElement.addEventListener("blur",e=>{this.#z()}),this.baseElement.addEventListener("focus",e=>{this.#L()}),et(this.baseElement,this,s),Qe(this.baseElement,this,{excludeAttrs:r,includeAttrs:n})}}return l},Jt=["required","pattern"],Kt=Symbol("validationTarget"),Xt=e=>class extends e{#A=Kt;static get observedAttributes(){return[...e.observedAttributes||[],...Jt]}static get formAssociated(){return!0}#E;get internals(){return this.#E}set internals(e){this.#E=e}constructor(){super(),this.#E=this.attachInternals()}get defaultErrorMsgValueMissing(){return"Please fill out this field."}get defaultErrorMsgPatternMismatch(){return"Please match the requested format."}get defaultErrorMsgTooShort(){return`Minimum length is ${this.getAttribute("minlength")}.`}get defaultErrorMsgTooLong(){return`Maximum length is ${this.getAttribute("maxlength")}. `}get defaultErrorMsgRangeUnderflow(){return`At least ${this.getAttribute("min-items-selection")} items are required.`}get defaultErrorMsgRangeOverflow(){return`At most ${this.getAttribute("max-items-selection")} items are allowed.`}get defaultErrorMsgTypeMismatch(){return"Please match the requested type."}getCustomErrorMessage(e,t){return this.hasAttribute(e)?this.getAttribute(e)||" ":t}getErrorMessage(e){const{valueMissing:t,patternMismatch:o,typeMismatch:i,stepMismatch:r,tooShort:n,tooLong:s,rangeOverflow:a,rangeUnderflow:l,badInput:d,customError:c}=e;switch(!0){case t:return this.getCustomErrorMessage("data-errormessage-value-missing",this.defaultErrorMsgValueMissing);case o||r||d:return this.getCustomErrorMessage("data-errormessage-pattern-mismatch",this.defaultErrorMsgPatternMismatch);case i:return this.getCustomErrorMessage("data-errormessage-type-mismatch",this.defaultErrorMsgTypeMismatch);case n:return this.getCustomErrorMessage("data-errormessage-pattern-mismatch-too-short",this.defaultErrorMsgTooShort);case s:return this.getCustomErrorMessage("data-errormessage-pattern-mismatch-too-long",this.defaultErrorMsgTooLong);case l:return this.getCustomErrorMessage("data-errormessage-pattern-range-underflow",this.defaultErrorMsgRangeUnderflow);case a:return this.getCustomErrorMessage("data-errormessage-pattern-range-overflow",this.defaultErrorMsgRangeOverflow);case c:return this.validationMessage;default:return""}}#T(){const e=this.isReadOnly?{}:this.getValidity();this.#E.setValidity(e,this.getErrorMessage(e),this.validationTarget)}get validationMessage(){return this.#E.validationMessage}getValidity(){console.warn("getValidity","is not implemented")}checkValidity(){return this.#E.validity.valid}reportValidity(){return this.#E.reportValidity()}get validity(){return this.#E.validity}get validationTarget(){return this.#A===Kt?this.inputElement:this.#A}set validationTarget(e){this.#A=e}setCustomValidity(e){e?this.#E.setValidity({customError:!0},e,this.validationTarget):(this.#E.setValidity({}),this.#T())}get isRequired(){return this.hasAttribute("required")&&"false"!==this.getAttribute("required")}get isReadOnly(){return this.hasAttribute("readonly")&&"false"!==this.getAttribute("readonly")}get isDisabled(){return this.hasAttribute("disabled")&&"false"!==this.getAttribute("disabled")}get pattern(){return this.getAttribute("pattern")}get form(){return this.#E.form}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),Jt.includes(e)&&this.#T()}init(){super.init?.(),this.addEventListener("change",this.#T),this.addEventListener("invalid",e=>e.stopPropagation()),this.addEventListener("input",this.#T),setTimeout(()=>this.#T())}},eo=["invalid","required"],to=e=>{if(!e)return;let t=e;for(let e=0;e<10;e++)if([t]=t.assignedElements(),"slot"!==t?.localName)return t},oo=({proxyProps:e=[],useProxyTargets:t=!1,inputEvent:o="input",triggerValidationEvents:i=[],proxyParentValidation:r=!1})=>n=>class extends(Xt(n)){static get observedAttributes(){return[...n.observedAttributes||[],...eo]}#V;#S=Zt.bind(this,"change");constructor(){super(),this.#V=super.inputElement}warnIfInputElementIsMissing(){clearTimeout(this.inputElementTimerId),this.inputElementTimerId=setTimeout(()=>{!this.#V&&console.warn(this.localName,"no input was found")},0)}get inputElement(){if(this.#V)return this.#V;this.warnIfInputElementIsMissing();const e=this.baseElement.shadowRoot?.querySelector('slot[name="input"]'),t=this.baseElement.shadowRoot?.querySelector('slot[name="textarea"]');return this.#V=to(e)||to(t),this.#V}set inputElement(e){this.#V=e}getValidity(){return this.inputElement?.validity||{}}#N(){this.setAttribute("error-message",this.validationMessage)}reportValidity=()=>{this.inputElement.setCustomValidity(""),this.setCustomValidity(""),this.checkValidity()||(this.setAttribute("invalid","true"),this.#N(),this.focus())};defaultReportValidity(){return super.reportValidity()}init(){if(super.init?.(),this.baseElement._setInvalid=function(e){!e&&this._shouldSetInvalid(e)&&(this.invalid=e)},this.baseElement.addEventListener("input",e=>{e.composed||this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))}),i.forEach(e=>{this.baseElement?.addEventListener(e,()=>{this.inputElement?.setCustomValidity("")})}),setTimeout(()=>{(Array.isArray(o)?o:[o]).forEach(e=>{this.baseElement?.addEventListener(e,()=>{this.baseElement.checkValidity()?this.removeAttribute("invalid"):this.#N()})}),this.baseElement.addEventListener("change",()=>{this.#S()}),this.addEventListener("invalid",()=>{this.checkValidity()||this.setAttribute("invalid","true"),this.#N()}),e.forEach(e=>{const o=this.querySelector('input[slot="external-input"]')||null,i=t?[this.baseElement,o].filter(Boolean):[];((e,t,o)=>{const i=Array.isArray(t)?t:[t];Object.defineProperty(e,o,{set(e){i.forEach(t=>{t[o]=e})},get:()=>t[0][o],configurable:!0})})(this,[this.inputElement,...i],e)}),this.setSelectionRange=this.inputElement?.setSelectionRange?.bind(this.inputElement),Xe(this,this.inputElement,{includeAttrs:["inputmode"]})}),r){const e=this.inputElement.internals,t=this;this.inputElement.internals=new Proxy(e,{get:(e,o)=>"function"==typeof e[o]&&"setValidity"===o?(...i)=>{if(3===i.length){const e=i.slice(0,i.length-1);e.push(t.inputElement),t.internals[o](...e)}else t.internals[o](...i);return e[o](...i)}:"function"==typeof e[o]?(...i)=>(t.internals[o](...i),e[o](...i)):e[o]})}}},io=e=>_e(oo(e),jt({componentNameOverride:Je("input-wrapper")})),ro=({name:e,selector:t,mappings:o={},forward:{attributes:i=[],include:r=!0}={}})=>t=>{const n=e,s=jt({mappings:o})(t);return class extends s{static get cssVarList(){return{...s.cssVarList,[n]:Ot($e(t.componentName,"_"+n),o)}}#D;constructor(){const e=(t=async e=>(e.shadowRoot||e).querySelector(e.baseSelector),async e=>{const o=await t(e);return new Promise(e=>{let t=0;const i=()=>{if(t>20)return console.error("could not get shadow root for element",o),void e(o);t++,o?.shadowRoot?e(o.shadowRoot):setTimeout(i)};i()})});var t;super({getRootElement:e,componentNameSuffix:"_"+n,themeSection:"_"+n,baseSelector:""}),this.#P=()=>e(this).then(e=>e?.host||e)}#P;async#B(){const e=await this.#D;e.onmouseenter=e=>{e.target.setAttribute("hover","true")},e.onmouseleave=e=>{e.target.removeAttribute("hover")}}async init(){super.init?.(),this.#D=this.#P();const e=await this.#D;Xe(this,e,{[r?"includeAttrs":"excludeAttrs"]:i}),this.#B()}}},no=e=>class extends e{#S=Zt.bind(this,"change");init(){super.init?.(),this.prevValue=this.value,this.addEventListener("change",e=>{e.stopPropagation()}),this.addEventListener("blur",()=>{this.value!==this.prevValue&&(this.#S(),this.prevValue=this.value)})}},so=e=>class extends e{init(){this.#M(),super.init?.()}#M(){["blur","focus","focusin","focusout"].forEach(e=>{this.addEventListener(e,e=>{e.isTrusted&&e.target===this&&e.stopImmediatePropagation()})})}handleFocusEventsDispatching(e){let t;e?.forEach(e=>{e?.addEventListener("focusout",e=>{e.stopImmediatePropagation(),t=setTimeout(()=>{t=null,Zt.call(this,"blur"),Zt.call(this,"focusout",{bubbles:!0})})});const o=e=>{e.stopImmediatePropagation(),clearTimeout(t),t||(Zt.call(this,"focus"),Zt.call(this,"focusin",{bubbles:!0}))};e?.addEventListener("focusin",o),e?.addEventListener("focus",o)})}handleInputEventDispatching(){let e=this.value;this.addEventListener("input",t=>{this!==t.target&&(t.stopImmediatePropagation(),e!==this.value&&(e=this.value,Zt.call(this,"input",{bubbles:!0,composed:!0})))})}},ao=({inputType:e,inputName:t,autocompleteType:o,includeAttrs:i=[],noBlurDispatch:r=!1})=>n=>class extends n{#J=[];get isExternalInput(){return"true"===this.getAttribute("external-input")}createExternalInput(){if(!this.isExternalInput||this.isReadOnly||this.isDisabled)return null;const o=this.baseElement.querySelector("input");if(!o)return null;o.setAttribute("tabindex","-1");const r=(()=>{const e=document.createElement("slot");return e.setAttribute("name","external-input"),e.setAttribute("slot","suffix"),e})();return this.baseElement.appendChild(r),this.externalInput=((e,t,o,i)=>{const r=document.createElement("input");return r.setAttribute("slot","external-input"),r.setAttribute("type",t),r.setAttribute("name",i),r.setAttribute("data-hidden-input","true"),r.setAttribute("autocomplete",o),r})(0,e,this.getAutocompleteType(),t),setTimeout(()=>{var e,t,i;e=o,t=this.externalInput,i=this.getAttribute("label-type"),setTimeout(()=>{const o=getComputedStyle(e),r=o.getPropertyValue("height"),n=o.getPropertyValue("padding-left"),s=o.getPropertyValue("padding-right"),a=o.getPropertyValue("font-size"),l=o.getPropertyValue("font-family"),d=o.getPropertyValue("letter-spacing"),c=o.getPropertyValue("caret-color"),p=((e,t)=>{const o=e.value;e.value="_";const i=t.getPropertyValue("color");return"_"===e.value&&(e.value=o),i})(e,o);if([["all","unset"],["position","absolute"],["background-color","transparent"],["height",r],["left",n],["right",s],["font-size",a],["font-family",l],["letter-spacing",d],["caret-color",c],["color",p]].forEach(([e,o])=>t.style.setProperty(e,o,"important")),"floating"===i){const e=o.getPropertyValue("margin-bottom");t.style.setProperty("margin-bottom",e,"important")}const h=o.getPropertyValue("width");t.style.setProperty("width",`calc(${h} - ${n} - ${s}`,"important")},0)}),this.forwardInputValue(o,this.externalInput),Qe(o,this.externalInput,{includeAttrs:i}),this.baseElement.querySelector("input").addEventListener("focusout",e=>e.stopImmediatePropagation(),!0),this.handleFocusEvents(),this.handleBlurEvents(),this.handlelInputEvents(this.externalInput),this.appendChild(this.externalInput),this.externalInput}clearBlurTimers(){this.#J.forEach(e=>clearTimeout(e)),this.#J.length=0}dispatchBlur(){return setTimeout(()=>{this.dispatchEvent(new Event("blur",{bubbles:!0,composed:!0})),this.removeAttribute("focused")})}handleFocusEvents(){this.baseElement.addEventListener("focus",()=>{this.externalInput.focus(),this.clearBlurTimers()}),this.externalInput.addEventListener("focus",()=>{this.clearBlurTimers(),setTimeout(()=>this.baseElement.setAttribute("focused","true"))})}handleBlurEvents(){this.baseElement.addEventListener("blur",e=>{e.stopImmediatePropagation(),r||this.#J.push(this.dispatchBlur())},!0),this.externalInput.addEventListener("blur",e=>{e.stopImmediatePropagation(),this.#J.push(this.dispatchBlur())},!0)}handlelInputEvents(e){e.addEventListener("input",e=>{this.value=e.target.value}),e.addEventListener("input",e=>{e.target.value?this.setAttribute("has-value","true"):this.removeAttribute("has-value")})}getAutocompleteType(){return this.getAttribute("autocomplete")||o}forwardInputValue(e,t){const o=Object.getOwnPropertyDescriptor(this.inputElement.constructor.prototype,"value");Object.defineProperty(e,"value",{...o,set(e){o.set.call(this,e),t.value=e},configurable:!0})}},lo=e=>class extends e{init(){super.init?.(),this.baseElement._hasValidConstraints&&(this.baseElement._hasValidConstraints=()=>!0)}},co=(...e)=>_e(Xt,no,Ut,so)(Gt(...e)),po=Je("boolean-field-internal"),ho=["disabled","invalid","readonly"],uo=co({componentName:po,baseSelector:"div"}),go=e=>class extends e{init(){super.init?.();const e=document.createElement("template");e.innerHTML=`\n\t\t\t\t<${po}\n\t\t\t\t\ttabindex="-1"\n\t\t\t\t\tslot="input"\n\t\t\t\t></${po}>\n\t\t\t`,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(po),this.checkbox=this.inputElement.querySelector("vaadin-checkbox"),Xe(this,this.inputElement,{includeAttrs:["required","full-width","size","label","invalid","disabled","readonly"]}),et(this.inputElement,this,["checked"]),Qe(this,this.inputElement,{includeAttrs:["checked"]})}};var mo=e=>`\n:host {\n\tdisplay: inline-flex;\n}\n\n\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n\n\n.wrapper {\n\tdisplay: flex;\n\tbox-sizing: border-box;\n}\nvaadin-text-field {\n\tposition: relative;\n\tpadding: 0;\n\tdisplay: inline-flex;\n\talign-items: flex-start;\n}\nvaadin-text-field::before {\n content: unset;\n}\nvaadin-text-field::part(label) {\n position: absolute;\n top: 0;\n}\nvaadin-text-field::part(input-field) {\n\tpadding: 0;\n\tbackground: none;\n\tmin-height: 0;\n}\nvaadin-text-field::part(input-field)::after {\n background: none;\n}\nvaadin-text-field[focus-ring]::part(input-field) {\n\tbox-shadow: none;\n}\n\nvaadin-checkbox [slot="label"] {\n align-self: flex-start;\n padding: 0;\n}\n[required] vaadin-checkbox [slot="label"]:not(:empty) {\n\tpadding-inline-end: 1em;\n}\ndescope-boolean-field-internal {\n -webkit-mask-image: none;\n min-height: initial;\n}\n\ndescope-enriched-text[empty] {\n\t${Oe.cssVarList.hostDisplay}: none;\n}\n\ndescope-enriched-text {\n\t${Oe.cssVarList.hostDirection}: var(${e.hostDirection});\n}\n\n`;const bo=Je("checkbox"),{host:yo,component:fo,checkboxElement:vo,checkboxSurface:xo,checkboxLabel:Co,requiredIndicator:wo,helperText:Io,errorMessage:So}={host:{selector:()=>":host"},requiredIndicator:{selector:'[required] vaadin-checkbox [slot="label"]:not(:empty)::part(content)::after'},component:{selector:"vaadin-checkbox"},checkboxElement:{selector:"vaadin-checkbox::part(checkbox)"},checkboxSurface:{selector:"vaadin-checkbox::part(checkbox)::after"},checkboxLabel:{selector:'vaadin-checkbox [slot="label"]:not(:empty)'},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},Mo=_e(jt({mappings:{hostWidth:{...yo,property:"width"},hostDirection:{...yo,property:"direction"},fontSize:[yo,vo,Co],fontFamily:[Co,Io,So],labelTextColor:{...Co,property:"color"},labelSpacing:{...Co,property:"padding-inline-start"},labelLineHeight:{...Co,property:"line-height"},labelFontWeight:{...Co,property:"font-weight"},labelRequiredIndicator:{...wo,property:"content"},errorMessageTextColor:{...So,property:"color"},errorMessageIcon:{...So,property:"background-image"},errorMessageIconSize:{...So,property:"background-size"},errorMessageIconPadding:{...So,property:"padding-inline-start"},errorMessageIconRepeat:{...So,property:"background-repeat"},errorMessageIconPosition:{...So,property:"background-position"},errorMessageFontSize:{...So,property:"font-size"},inputValueTextColor:{...xo,property:"color"},inputBackgroundColor:{...vo,property:"background-color"},inputBorderRadius:{...vo,property:"border-radius"},inputBorderWidth:{...vo,property:"border-width"},inputBorderOffset:{...vo,property:"border-offset"},inputBorderColor:{...vo,property:"border-color"},inputBorderStyle:{...vo,property:"border-style"},inputOutlineWidth:{...vo,property:"outline-width"},inputOutlineOffset:{...vo,property:"outline-offset"},inputOutlineColor:{...vo,property:"outline-color"},inputOutlineStyle:{...vo,property:"outline-style"},inputAlign:{...vo,property:"align-self"},inputContainerPadding:{...fo,property:"padding"},inputContainerBackgroundColor:{...fo,property:"background-color"},inputContainerBorderRadius:{...fo,property:"border-radius"},inputContainerBorderWidth:{...fo,property:"border-width"},inputContainerBorderColor:{...fo,property:"border-color"},inputContainerBorderStyle:{...fo,property:"border-style"},inputContainerOutlineWidth:{...fo,property:"outline-width"},inputContainerOutlineOffset:{...fo,property:"outline-offset"},inputContainerOutlineColor:{...fo,property:"outline-color"},inputContainerOutlineStyle:{...fo,property:"outline-style"},inputSize:[{...vo,property:"width"},{...vo,property:"height"},{...xo,property:"font-size"},{...fo,property:"font-size"}]}}),$t,io({proxyProps:["value","selectionStart"]}),_t,go)(Qt({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t${mo(Mo.cssVarList)}\n ${ut(Mo.cssVarList)}\n\n :host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n }\n\n :host ::part(error-message) {\n direction: ltr;\n }\n\n vaadin-text-field {\n width: 100%;\n }\n\n descope-boolean-field-internal {\n\t\t\t\tpadding: 2px;\n\t\t\t\twidth: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n\n :host([full-width]) vaadin-checkbox {\n flex-grow: 1;\n }\n\n vaadin-checkbox::part(checkbox) {\n margin: 0;\n }\n\n vaadin-checkbox::part(checkbox)::after {\n top: 0;\n left: 0;\n -webkit-text-fill-color: initial;\n }\n\n vaadin-checkbox label {\n -webkit-text-fill-color: initial;\n }\n\n vaadin-text-field::part(input-field)::after {\n content: none;\n }\n `,excludeAttrsSync:["label","tabindex","style"],componentName:bo})),Ao=k("text");class Eo extends(ye({componentName:Ao,baseSelector:":host > slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <slot part="text-wrapper"></slot>\n ',V("\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n ",this)}get hideWhenEmpty(){return"true"===this.getAttribute("hide-when-empty")}init(){super.init(),A(this,()=>{const e=!!this.childNodes.length;this.style.display=!e&&this.hideWhenEmpty?"none":""})}}const{host:To}={host:{selector:()=>":host"}},ko=I(ce({mappings:{hostWidth:{...To,property:"width"},hostDirection:{...To,property:"direction"},fontSize:{},textColor:[{property:"color"}],textLineHeight:{property:"line-height"},textLetterSpacing:{property:"letter-spacing"},textShadow:{},textAlign:{},textTransform:{},fontFamily:{},fontStyle:{},fontWeight:{},borderWidth:{},borderStyle:{},borderColor:{}}}),pe,he)(Eo),zo=k("link"),Lo=["href","readonly"];class Vo extends(ye({componentName:zo,baseSelector:":host a"})){static get observedAttributes(){return Lo.concat(super.observedAttributes||[])}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n\t\t<div>\n\t\t\t<descope-text part="wrapper">\n\t\t\t\t<a>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</a>\n\t\t\t</descope-text>\n\t\t</div>\n\t\t',V('\n :host {\n\t\t\tdisplay: inline-block;\n line-height: 1em;\n\t\t}\n\t\t:host a {\n\t\t\tdisplay: inline;\n\t\t}\n\n :host([ellipsis="true"]) descope-text {\n display: inline-flex;\n }\n :host([ellipsis="true"]) descope-text::part(text-wrapper) {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n ',this),this.anchor=this.shadowRoot.querySelector("a"),L(this,this.anchor,{includeAttrs:["href","target","tooltip"],mapAttrs:{tooltip:"title"}}),L(this,this.shadowRoot.querySelector("descope-text"),{includeAttrs:["mode","variant"]}),this.anchor.addEventListener("click",e=>{this.readOnly&&e.preventDefault()})}get readOnly(){return"true"===this.getAttribute("readonly")}}const No={host:{selector:()=>":host"},link:{selector:()=>":host a"},anchor:{},wrapper:{selector:()=>":host > div"},text:{selector:()=>ko.componentName}},{anchor:Do,text:Po,host:Bo,wrapper:Fo,link:Ro}=No,Wo=I(ce({mappings:{hostWidth:{...Bo,property:"width"},hostDirection:{...Po,property:"direction"},textAlign:Fo,textDecoration:{...Ro,property:"text-decoration",fallback:"none"},textColor:[{...Do,property:"color"},{...Po,property:ko.cssVarList.textColor}],cursor:Do}}),pe,he)(Vo);customElements.define(Ao,ko),customElements.define(zo,Wo),customElements.define(Re,Oe),customElements.define(po,class extends uo{static get observedAttributes(){return["readonly","label"]}constructor(){super(),this.innerHTML='\n\t\t\t<div class="wrapper">\n\t\t\t\t<vaadin-checkbox>\n\t\t\t\t\t<descope-enriched-text link-target-blank="true" class="label-content" slot="label"></descope-enriched-text>\n\t\t\t\t</vaadin-checkbox>\n\t\t\t</div>\n\t\t',this.wrapperEle=this.querySelector("div"),this.checkbox=this.querySelector("vaadin-checkbox"),this.labelContent=this.querySelector(".label-content")}get value(){return this.checkbox?.checked}set value(e){this.checkbox.checked=e}get checked(){return this.value}set checked(e){this.value=e}init(){this.addEventListener("focus",e=>{e.isTrusted&&this.checkbox.focus()}),super.init?.(),Xe(this,this.checkbox,{includeAttrs:ho}),Qe(this,this.checkbox,{includeAttrs:["checked"]}),this.labelContent.addEventListener("click",e=>{this.hasAttribute("disabled")||this.hasAttribute("readonly")||this.checkbox.click()}),this.handleFocusEventsDispatching([this.checkbox])}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),"readonly"===e&&this.onReadOnlyChange(null!==o),"label"===e&&this.onLabelChange()}onLabelChange(){const e=this.getAttribute("label");this.labelContent.textContent=e||""}onReadOnlyChange(e){this.baseElement.setAttribute("inert",e)}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:{}}}),customElements.define(bo,Mo);const Oo=Je("switch-toggle"),{host:jo,component:$o,checkboxElement:_o,checkboxSurface:Ho,checkboxLabel:qo,requiredIndicator:Yo,helperText:Uo,errorMessage:Go}={host:{selector:()=>":host"},requiredIndicator:{selector:'[required] vaadin-checkbox [slot="label"]:not(:empty)::part(content)::after'},component:{selector:"vaadin-checkbox"},checkboxElement:{selector:"vaadin-checkbox::part(checkbox)"},checkboxSurface:{selector:"vaadin-checkbox::part(checkbox)::after"},checkboxLabel:{selector:'vaadin-checkbox [slot="label"]:not(:empty)'},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},Zo=_e(jt({mappings:{hostWidth:{...jo,property:"width"},hostDirection:{...jo,property:"direction"},fontSize:[$o,qo,qo],fontFamily:[qo,Uo,Go],labelTextColor:[{...qo,property:"color"},{...qo,property:"-webkit-text-fill-color"}],labelSpacing:{...qo,property:"padding-inline-start"},labelLineHeight:{...qo,property:"line-height"},labelFontWeight:{...qo,property:"font-weight"},labelRequiredIndicator:{...Yo,property:"content"},errorMessageTextColor:{...Go,property:"color"},errorMessageIcon:{...Go,property:"background-image"},errorMessageIconSize:{...Go,property:"background-size"},errorMessageIconPadding:{...Go,property:"padding-inline-start"},errorMessageIconRepeat:{...Go,property:"background-repeat"},errorMessageIconPosition:{...Go,property:"background-position"},errorMessageFontSize:{...Go,property:"font-size"},trackBorderWidth:{..._o,property:"border-width"},trackBorderStyle:{..._o,property:"border-style"},trackBorderColor:{..._o,property:"border-color"},trackBackgroundColor:{..._o,property:"background-color"},trackBorderRadius:{..._o,property:"border-radius"},trackWidth:[{..._o,property:"width"}],trackHeight:[{...Ho,property:"font-size"},{..._o,property:"height"}],knobSize:[{...Ho,property:"width"},{...Ho,property:"height"}],knobTextColor:{...Ho,property:"color"},knobRadius:{...Ho,property:"border-radius"},knobTransitionDuration:{...Ho,property:"transition"},knobColor:{...Ho,property:"background-color"},knobTopOffset:{...Ho,property:"top"},knobLeftOffset:{...Ho,property:"left"},inputOutlineWidth:{..._o,property:"outline-width"},inputOutlineOffset:{..._o,property:"outline-offset"},inputOutlineColor:{..._o,property:"outline-color"},inputOutlineStyle:{..._o,property:"outline-style"}}}),$t,io({proxyProps:["value","selectionStart"]}),_t,go)(Qt({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t${mo(Zo.cssVarList)}\n\t\t\t${ut(Zo.cssVarList)}\n\n :host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n }\n\n :host ::part(error-message) {\n direction: ltr;\n }\n\n vaadin-text-field {\n width: 100%;\n }\n\n vaadin-text-field::part(input-field)::after {\n content: none;\n }\n\n descope-boolean-field-internal {\n\t\t\t\tpadding: 0;\n width: 100%;\n }\n\n vaadin-text-field::part(input-field) {\n cursor: pointer;\n }\n\n vaadin-checkbox {\n cursor: pointer;\n }\n\n vaadin-checkbox [slot="label"]:not(:empty) {\n cursor: pointer;\n\t\t\t}\n\n vaadin-checkbox::part(checkbox) {\n margin: 0;\n\t\t\t}\n\n vaadin-checkbox::part(checkbox)::before {\n content: '';\n\t\t\t}\n\n vaadin-checkbox[active]::part(checkbox) {\n\t\t\t\ttransform: none;\n\t\t\t}\n\n vaadin-checkbox::part(checkbox)::after {\n\t\t\t\tposition: absolute;\n\t\t\t\topacity: 1;\n\t\t\t\tcontent: '';\n\t\t\t}\n\t\t`,excludeAttrsSync:["label","tabindex","style"],componentName:Oo}));customElements.define(Oo,Zo);const Qo=Je("loader-linear");class Jo extends(Gt({componentName:Qo,baseSelector:":host > div"})){static get componentName(){return Qo}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<div></div>\n\t",V("\n @keyframes tilt {\n\t\t\t\t0% { transform: translateX(0); }\n\t\t\t\t50% { transform: translateX(400%); }\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tposition: relative;\n\t\t\t\tdisplay: flex;\n\t\t\t}\n\t\t\tdiv::after {\n\t\t\t\tcontent: '';\n\t\t\t\tanimation-name: tilt;\n\t\t\t\tposition: absolute;\n\t\t\t\tleft: 0;\n\t\t\t}\n\t\t\t:host > div {\n\t\t\t\twidth: 100%;\n\t\t\t}\n ",this)}}const{after:Ko,host:Xo}={after:{selector:"::after"},host:{selector:()=>":host"}},ei=_e(jt({mappings:{hostDisplay:{},hostWidth:{...Xo,property:"width"},barHeight:[{property:"height"},{...Ko,property:"height"}],barBorderRadius:[{property:"border-radius"},{...Ko,property:"border-radius"}],verticalPadding:[{...Xo,property:"padding-top"},{...Xo,property:"padding-bottom"}],barBackgroundColor:{property:"background-color"},barColor:{...Ko,property:"background-color"},barWidth:{...Ko,property:"width"},animationDuration:[{},Ko],animationTimingFunction:[{},Ko],animationIterationCount:[{},Ko]}}),$t,_t)(Jo);customElements.define(Qo,ei);const ti=Je("loader-radial");class oi extends(Gt({componentName:ti,baseSelector:":host > div"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<div></div>\n\t",V("\n @keyframes spin {\n\t\t\t\t0% { transform: rotate(0deg); }\n\t\t\t\t100% { transform: rotate(360deg); }\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tposition: relative;\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n\t\t\t:host > div {\n\t\t\t\tanimation-name: spin;\n\t\t\t}\n ",this)}}const ii=_e(jt({mappings:{hostDisplay:{property:"display"},spinnerSize:[{property:"width"},{property:"height"}],spinnerBorderWidth:{property:"border-width"},spinnerBorderStyle:{property:"border-style"},spinnerBorderRadius:{property:"border-radius"},spinnerQuadrant1Color:{property:"border-top-color"},spinnerQuadrant2Color:{property:"border-bottom-color"},spinnerQuadrant3Color:{property:"border-right-color"},spinnerQuadrant4Color:{property:"border-left-color"},animationDuration:{},animationTimingFunction:{},animationIterationCount:{}}}),$t,_t)(oi);customElements.define(ti,ii);const ri=Je("container");class ni extends(Gt({componentName:ri,baseSelector:"slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<slot></slot>\n\t",V("\n\t\t\t:host > slot {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: auto;\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t}\n ",this)}}const si=_e(jt({mappings:{hostHeight:{selector:()=>":host",property:"height"},hostWidth:{selector:()=>":host",property:"width"},hostDirection:{selector:()=>":host",property:"direction"},itemsGrow:{selector:()=>"::slotted(*)",property:"flex-grow",fallback:"0"},verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],horizontalPadding:[{property:"padding-left"},{property:"padding-right"}],flexDirection:{},justifyContent:{},alignItems:{},gap:{},flexWrap:{},backgroundColor:{},backgroundImage:{},backgroundPositionX:{},backgroundPositionY:{},backgroundSize:{},backgroundRepeat:{},color:{},borderRadius:{},borderColor:{},borderStyle:{},borderWidth:{},boxShadow:{}}}),$t,_t)(ni);customElements.define(ri,si);const ai=k("combo-box"),{host:li,inputField:di,inputElement:ci,placeholder:pi,toggle:hi,clearButton:ui,label:gi,requiredIndicator:mi,helperText:bi,errorMessage:yi,loader:fi,overlayContent:vi}={host:{selector:()=>":host"},inputField:{selector:"::part(input-field)"},inputElement:{selector:"input"},placeholder:{selector:"> input:placeholder-shown"},toggle:{selector:"::part(toggle-button)"},clearButton:{selector:"::part(clear-button)"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},loader:{selector:"vaadin-combo-box-overlay::part(loader)"},overlayContent:{selector:"vaadin-combo-box-overlay::part(content)"}},xi=I(ce({mappings:{hostWidth:{...li,property:"width"},hostDirection:{...li,property:"direction"},fontSize:[{},li],fontFamily:[gi,pi,di,bi,yi],labelFontSize:{...gi,property:"font-size"},labelFontWeight:{...gi,property:"font-weight"},inputValueFontWeight:{...di,property:"font-weight"},inputPlaceholderFontWeight:{...pi,property:"font-weight"},helperTextFontWeight:{...bi,property:"font-weight"},errorMessageFontWeight:{...yi,property:"font-weight"},labelTextColor:[{...gi,property:"color"},{...gi,property:"-webkit-text-fill-color"},{...mi,property:"color"}],errorMessageTextColor:{...yi,property:"color"},errorMessageIcon:{...yi,property:"background-image"},errorMessageIconSize:{...yi,property:"background-size"},errorMessageIconPadding:{...yi,property:"padding-inline-start"},errorMessageIconRepeat:{...yi,property:"background-repeat"},errorMessageIconPosition:{...yi,property:"background-position"},errorMessageFontSize:{...yi,property:"font-size"},inputHeight:{...di,property:"height"},inputBackgroundColor:{...di,property:"background-color"},inputBorderColor:{...di,property:"border-color"},inputBorderWidth:{...di,property:"border-width"},inputBorderStyle:{...di,property:"border-style"},inputBorderRadius:{...di,property:"border-radius"},labelRequiredIndicator:{...mi,property:"content"},inputValueTextColor:{...di,property:"color"},inputPlaceholderTextColor:{...pi,property:"color"},inputDropdownButtonCursor:[{...hi,property:"cursor"},{...ui,property:"cursor"}],inputDropdownButtonColor:[{...hi,property:"color"},{...ui,property:"color"}],inputDropdownButtonSize:[{...hi,property:"font-size"},{...ui,property:"font-size"}],inputDropdownButtonOffset:[{...hi,property:"margin-right"},{...hi,property:"margin-left"}],inputOutlineColor:{...di,property:"outline-color"},inputOutlineWidth:{...di,property:"outline-width"},inputOutlineStyle:{...di,property:"outline-style"},inputOutlineOffset:{...di,property:"outline-offset"},inputHorizontalPadding:[{...ci,property:"padding-left"},{...ci,property:"padding-right"}],labelPosition:{...gi,property:"position"},labelTopPosition:{...gi,property:"top"},labelHorizontalPosition:[{...gi,property:"left"},{...gi,property:"right"}],inputTransformY:{...gi,property:"transform"},inputTransition:{...gi,property:"transition"},marginInlineStart:{...gi,property:"margin-inline-start"},placeholderOpacity:{...pi,property:"opacity"},inputVerticalAlignment:{...di,property:"align-items"},valueInputHeight:{...ci,property:"height"},valueInputMarginBottom:{...ci,property:"margin-bottom"},overlayBackground:{property:()=>xi.cssVarList.overlay.backgroundColor},overlayTextColor:{property:()=>xi.cssVarList.overlay.textColor},overlayBorder:{property:()=>xi.cssVarList.overlay.border},overlayFontSize:{property:()=>xi.cssVarList.overlay.fontSize},overlayFontFamily:{property:()=>xi.cssVarList.overlay.fontFamily},overlayCursor:{property:()=>xi.cssVarList.overlay.cursor},overlayItemBoxShadow:{property:()=>xi.cssVarList.overlay.itemBoxShadow},overlayItemPaddingInlineStart:{property:()=>xi.cssVarList.overlay.itemPaddingInlineStart},overlayItemPaddingInlineEnd:{property:()=>xi.cssVarList.overlay.itemPaddingInlineEnd},overlayCheckmarkDisplay:{property:()=>xi.cssVarList.overlay.checkmarkDisplay},overlaySelectedItemBackground:{property:()=>xi.cssVarList.overlay.selectedItemBackground},overlaySelectedItemHoverBackground:{property:()=>xi.cssVarList.overlay.selectedItemHoverBackground},overlaySelectedItemFocusBackground:{property:()=>xi.cssVarList.overlay.selectedItemFocusBackground},overlayItemHoverBackground:{property:()=>xi.cssVarList.overlay.itemHoverBackground},overlayItemFocusBackground:{property:()=>xi.cssVarList.overlay.itemFocusBackground}}}),pe,Ne({name:"overlay",selector:"",mappings:{backgroundColor:[{selector:"vaadin-combo-box-scroller"},{selector:"vaadin-combo-box-overlay::part(overlay)"}],minHeight:{selector:"vaadin-combo-box-overlay"},margin:{selector:"vaadin-combo-box-overlay"},cursor:{selector:"vaadin-combo-box-item"},fontFamily:{selector:"vaadin-combo-box-item"},textColor:{selector:"vaadin-combo-box-item",property:"color"},fontSize:{selector:"vaadin-combo-box-item"},itemBoxShadow:{selector:"vaadin-combo-box-item",property:"box-shadow"},itemPaddingInlineStart:{selector:"vaadin-combo-box-item",property:"padding-inline-start"},itemPaddingInlineEnd:{selector:"vaadin-combo-box-item",property:"padding-inline-end"},checkmarkDisplay:{selector:"vaadin-combo-box-item::part(checkmark)",property:"display"},selectedItemBackground:{selector:"vaadin-combo-box-item[selected]",property:"background-color"},selectedItemHoverBackground:{selector:"vaadin-combo-box-item[selected]:hover:not([disabled])",property:"background-color"},selectedItemFocusBackground:{selector:"vaadin-combo-box-item[selected][focused]:not([disabled])",property:"background-color"},itemHoverBackground:{selector:"vaadin-combo-box-item:hover:not([selected]):not([disabled])",property:"background-color"},itemFocusBackground:{selector:"vaadin-combo-box-item[focused]:not([selected]):not([disabled])",property:"background-color"},loaderTop:{...fi,property:"top"},loaderLeft:{...fi,property:"left"},loaderRight:{...fi,property:"right"},loaderMargin:{...fi,property:"margin"},loaderWidth:{...fi,property:"width"},loaderHeight:{...fi,property:"height"},loaderBorder:{...fi,property:"border"},loaderBorderColor:{...fi,property:"border-color"},loaderBorderRadius:{...fi,property:"border-radius"},contentHeight:{...vi,property:"height"},contentOpacity:{...vi,property:"opacity"},scrollerMinHeight:{selector:"vaadin-combo-box-scroller",property:"min-height"}},forward:{include:!1,attributes:["size"]}}),Le({proxyProps:["selectionStart"],inputEvent:"value-changed"}),e=>class extends e{init(){super.init?.(),this.baseElement._hasValidConstraints&&(this.baseElement._hasValidConstraints=()=>!0)}},he,e=>class extends e{static get observedAttributes(){return["label-type","require-match"]}#K=({displayName:e,value:t,label:o})=>`<span data-name="${o}" data-id="${t}">${e||o}</span>`;#F;get defaultValue(){return this.getAttribute("default-value")}get renderItem(){return this.#K}set renderItem(e){this.#K=e,this.renderItems()}set renderer(e){this.baseElement.renderer=e}get loading(){return"true"===this.getAttribute("loading")}set loading(e){e?this.setAttribute("loading","true"):this.removeAttribute("loading")}get data(){if(this.#F)return this.#F;const e=this.getAttribute("data");if(e)try{const t=JSON.parse(e);if(this.isValidDataType(t))return t}catch(e){console.error('could not parse data string from attribute "data" -',e.message)}return[]}set data(e){this.isValidDataType(e)&&(this.#F=e,this.renderItems())}get requireMatch(){return"true"===this.getAttribute("require-match")&&!this.allowCustomValue}isValidDataType(e){const t=Array.isArray(e);return t||console.error("data must be an array, received:",e),t}getItemsTemplate(){return this.data?.reduce?.((e,t)=>e+(this.renderItem?.(t||{})||""),"")}renderItems(){if(this.#F||this.getAttribute("data")){const e=this.getItemsTemplate();this.innerHTML=e}}get hasDynamicData(){return"true"===this.getAttribute("has-dynamic-data")}get shouldSelectItemOnItemsChange(){return!this.hasDynamicData||this.allowCustomValue}handleSelectedItem(){const{selectedItem:e}=this.baseElement,t=e?.["data-id"];e&&Array.from(this.children).includes(e)||(t&&this.shouldSelectItemOnItemsChange&&(this.value=t),this.value||this.setDefaultValue())}customValueTransformFn(e){return e}setComboBoxDescriptor(){const e=Object.getOwnPropertyDescriptor(this.inputElement.constructor.prototype,"value"),t=this;Object.defineProperties(this.inputElement,{value:{...e,set(o){if(!t.baseElement.items?.length&&!t.allowCustomValue)return;const i=t.customValueTransformFn(o)||"";i!==this.value&&e.set.call(this,i)}}})}#X(){const e=Array.from(this.children);e.forEach(e=>{Object.defineProperty(e,"data-name",{value:e.getAttribute("data-name"),configurable:!0,writable:!0}),Object.defineProperty(e,"data-id",{value:e.getAttribute("data-id"),configurable:!0,writable:!0})}),this.baseElement.items=e,setTimeout(()=>{this.handleSelectedItem()},0)}#ee(){const e=this.baseElement.shadowRoot.querySelector("vaadin-combo-box-overlay");e._attachOverlay=()=>{e.bringToFront()},e._detachOverlay=()=>{},e._enterModalState=()=>{}}#te(){this.baseElement.renderer=(e,t,o)=>{e.innerHTML=o.item.outerHTML}}#oe(){this.hasDynamicData&&(this.baseElement._dataProviderFilterChanged=()=>{})}isValueMatch(){const e=this.baseElement.querySelector("input").value;return!e||this.baseElement.items.some(t=>t.dataset.name===e||t.dataset.id===e)}init(){super.init?.(),this.getValidity=function(){return this.requireMatch&&!this.isValueMatch()?{patternMismatch:!0}:!this.value&&this.isRequired?{valueMissing:!0}:{}},this.#te(),this.#oe(),setTimeout(()=>{this.setComboBoxDescriptor(),this.#ee()}),M(this,this.renderItems.bind(this),{includeAttrs:["data"]}),A(this,this.#X.bind(this)),this.setDefaultValue(),this.baseElement.addEventListener("value-changed",()=>{this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))}),this.baseElement.addEventListener("filter-changed",e=>{this.dispatchEvent(new CustomEvent("filter-changed",{bubbles:!0,composed:!0,detail:e.detail}))})}onLabelClick(){this.isReadOnly||this.isDisabled||(this.focus(),this.autoOpenDisabled||this.setAttribute("opened","true"))}handleRequireMatchChange(e){this.baseElement.allowCustomValue=e||this.allowCustomValue}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),t!==o&&("label-type"===e?"floating"===o?this.addEventListener("click",this.onLabelClick):this.removeEventListener("click",this.onLabelClick):"require-match"===e&&this.handleRequireMatchChange("true"===o))}setDefaultValue(){this.defaultValue&&(this.value=this.defaultValue)}#ie(e){return this.baseElement.items?.find(t=>t["data-id"]===e)}#re(e,t){e===this.value&&t!==this.baseElement.selectedItem&&this.baseElement.addEventListener("selected-item-changed",e=>{e.stopImmediatePropagation()},{once:!0,capture:!0})}set value(e){const t=this.#ie(e);this.#re(e,t),e&&t?this.baseElement.selectedItem=t:!t&&this.allowCustomValue?this.baseElement.value=e:this.baseElement.selectedItem=void 0}get value(){return(this.baseElement.selectedItem?.["data-id"]||this.allowCustomValue)&&this.baseElement.__data.value||""}get allowCustomValue(){return"true"===this.getAttribute("allow-custom-value")}get autoOpenDisabled(){return"true"===this.getAttribute("auto-open-disabled")}})(Ee({slots:["","prefix"],wrappedEleName:"vaadin-combo-box",style:()=>`\n\t\t:host {\n\t\t\tdisplay: inline-flex;\n\t\t\tbox-sizing: border-box;\n\t\t\t-webkit-mask-image: none;\n\t\t}\n\t\t${U(xi.cssVarList)}\n\t\t${Q("vaadin-combo-box")}\n\t\t${Z("vaadin-combo-box")}\n\t\t${G("vaadin-combo-box")}\n\n\t\tvaadin-combo-box {\n\t\t\tpadding: 0;\n\t\t\twidth: 100%;\n\t\t}\n\t\tvaadin-combo-box::before {\n\t\t\theight: initial;\n\t\t}\n\t\tvaadin-combo-box [slot="input"] {\n\t\t\t-webkit-mask-image: none;\n\t\t\tmin-height: 0;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\n\t\tvaadin-combo-box::part(input-field) {\n\t\t\tpadding: 0;\n\t\t\tbox-shadow: none;\n\t\t}\n\n vaadin-combo-box::part(toggle-button),\n vaadin-combo-box::part(clear-button) {\n align-self: center;\n }\n\n vaadin-combo-box[hide-toggle-button="true"]::part(toggle-button) {\n display: none;\n }\n\n vaadin-combo-box[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-combo-box[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n\n ${J("vaadin-combo-box")}\n \n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n \n\t\t`,excludeAttrsSync:["tabindex","size","data","loading","style"],componentName:ai,includeForwardProps:["items","renderer","selectedItem"]}));customElements.define(ai,xi);const Ci=e=>{const t=c.A.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},ADD_TAGS:["image"],FORBID_TAGS:["defs"]});return(new DOMParser).parseFromString(t,"image/svg+xml").querySelector("svg")},wi=k("image"),Ii=["src","src-dark"];class Si extends(ye({componentName:wi,baseSelector:"slot"})){static get observedAttributes(){return Ii}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<slot></slot>\n\t",V("\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n :host > slot {\n width: 100%;\n height: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\n ::slotted(*) {\n width: 100%;\n\t\t\t}\n\n .hidden {\n display: none;\n }\n ",this)}init(){super.init?.(),this.toggleVisibility(this.getSrc)}onThemeChange(){this.renderImage()}toggleVisibility(e){e?this.classList.remove("hidden"):this.classList.add("hidden")}get altText(){return this.getAttribute("alt")||""}get legacySrc(){return this.getAttribute("src")}get themeSrc(){return this.getAttribute(`src-${this.currentThemeName}`)}get getSrc(){return this.themeSrc||this.legacySrc}updateFillColor(e){[e,...e.querySelectorAll("*[fill]")].forEach(e=>{e.setAttribute("fill",`var(${Mi.cssVarList.fill}, ${e.getAttribute("fill")||"''"})`)})}renderImage(){this.toggleVisibility(this.getSrc),(async(e,t)=>{try{let o;if((e=>e.startsWith("data:image/svg+xml;base64,"))(e)){const t=atob(e.slice(26));o=Ci(t)}else if("svg"===(e=>{const t=e.match(/\.([0-9a-z]+)(?:[\\?#]|$)/i);return t?t[1]:null})(e)){const t=await fetch(e),i=await t.text();o=Ci(i)}else o=((e,t)=>{const o=document.createElement("img");return o.setAttribute("src",e),o.setAttribute("alt",t),o})(e,t);return o.style.setProperty("max-width","100%"),o.style.setProperty("max-height","100%"),o}catch{return null}})(this.getSrc,this.altText).then(e=>{this.innerHTML="",e&&(this.updateFillColor(e),this.appendChild(e))})}shouldRender(e){const t=this.getAttribute(e);return this.getSrc===t}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),t!==o&&this.shouldRender(e)&&this.renderImage()}}const Mi=I(ce({mappings:{fill:{},height:{selector:()=>":host"},width:{selector:()=>":host"}}}),pe,he)(Si),Ai=k("icon"),Ei=I(ce({mappings:{fill:[{},{property:Mi.cssVarList.fill}]}}),pe,he)(Ee({slots:[],wrappedEleName:"descope-image",style:()=>"\n :host {\n display: inline-flex;\n max-height: 100%;\n }\n ",excludeAttrsSync:["tabindex","class","style"],componentName:Ai})),Ti=k("button"),{host:ki,label:zi,slottedIcon:Li}={host:{selector:()=>":host"},label:{selector:"::part(label)"},slottedIcon:{selector:()=>"::slotted(descope-icon)"}};let Vi;const Ni=I((({triggers:e=[]}={})=>t=>class extends t{static get observedAttributes(){return[...t.observedAttributes||[],...e.map(({attr:e})=>e)]}get#ne(){return e.some(({attr:e,value:t})=>this.getAttribute(e)===t)}#se=()=>{this.toggleAttribute("stretch",this.#ne)};attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),t!==o&&this.#se()}init(){super.init?.(),this.#se()}})({triggers:[{attr:"full-width",value:"true"}]}),ce({mappings:{hostWidth:{property:"width"},hostHeight:{property:"height"},hostDirection:{...ki,property:"direction"},fontSize:{},fontFamily:{},fontWeight:{},cursor:{},backgroundColor:{},outlineOffset:{},outlineColor:{},outlineStyle:{},outlineWidth:{},borderRadius:{},borderColor:{},borderStyle:{},borderWidth:{},verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],horizontalPadding:[{property:"padding-right",fallback:"0.875em"},{property:"padding-left",fallback:"0.875em"}],labelTextColor:{property:"color"},iconColor:{selector:()=>"::slotted(*)",property:Ei.cssVarList.fill},labelTextDecoration:{...zi,property:"text-decoration"},labelSpacing:{...zi,property:"gap"},textAlign:{...zi,property:"justify-content",fallback:"center"},iconSize:[{...Li,property:"width"},{...Li,property:"height"}]}}),e=>class extends e{get isLoading(){return"true"===this.getAttribute("loading")}click(){this.isLoading||super.click()}},pe,he)(Ee({slots:["","prefix","label","suffix"],wrappedEleName:"vaadin-button",style:()=>`\n\t\t\t\n\t:host {\n\t\tdisplay: inline-block;\n\t\tbox-sizing: border-box;\n\t}\n\tvaadin-button::before,\n\tvaadin-button::after {\n\t\topacity: 0;\n\t}\n\tvaadin-button {\n\t\tmargin: 0;\n\t\tmin-width: 0;\n\t\twidth: 100%;\n\t\theight: auto;\n\t\tbox-shadow: none;\n\t}\n\tvaadin-button::part(label) {\n\t\tpadding: 0;\n width: 100%;\n\t}\n\tvaadin-button::part(prefix) {\n\t\tmargin-left: 0;\n\t\tmargin-right: 0;\n\t}\n\n\t\t\t\n\tvaadin-button::part(prefix),\n\tvaadin-button::part(label) {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n\n\t\t\t${Vi}\n\t\t\tvaadin-button::part(label) { pointer-events: none; }\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${Ni.cssVarList.outlineWidth}) + var(${Ni.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width="true"]) {\n width: var(${Ni.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${Ni.cssVarList.hostHeight}) - var(${Ni.cssVarList.outlineWidth}) - var(${Ni.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square="true"]:not([full-width="true"]) {\n\t\t\t\twidth: calc(var(${Ni.cssVarList.hostWidth}) - var(${Ni.cssVarList.outlineWidth}) - var(${Ni.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,excludeAttrsSync:["tabindex","class","style"],componentName:Ti})),{color:Di,fontSize:Pi}=Ni.cssVarList;Vi=`\n\t@keyframes spin {\n\t\t0% { -webkit-transform: rotate(0deg); }\n\t\t100% { -webkit-transform: rotate(360deg); }\n\t}\n\t:host([loading="true"]) ::before {\n\t\tanimation: spin 2s linear infinite;\n\t\tposition: absolute;\n\t\tcontent: '';\n\t\tz-index: 1;\n\t\tbox-sizing: border-box;\n\t\tborder-radius: 50%;\n\t\tborder-bottom-color: transparent;\n\t\tborder-left-color: transparent;\n\t\tborder-style: solid;\n\t\tcolor: var(${Di});\n\t\ttop: calc(50% - (var(${Pi}) / 2));\n\t\tleft: calc(50% - (var(${Pi}) / 2));\n\t\tborder-width: calc(var(${Pi}) / 10);\n\t\twidth: var(${Pi});\n\t\theight: var(${Pi});\n\t}\n\t:host([disabled="true"]),\n\t:host([loading="true"]) {\n\t\tpointer-events: none;\n\t}\n\t:host([loading="true"]) ::part(prefix),\n\t:host([loading="true"]) ::part(label) {\n\t\tvisibility: hidden;\n\t}\n`,customElements.define(Ti,Ni);const Bi=["MM/DD/YYYY","DD/MM/YYYY","YYYY/MM/DD"],Fi=Bi[0],Ri="YYYY-MM-DD",Wi="/",Oi=["January","February","March","April","May","June","July","August","September","October","November","December"],ji=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],$i={id:"month",min:1,max:12,placeholder:"MM"},_i={id:"day",min:1,max:31,placeholder:"DD"},Hi={id:"year",min:0,max:9999,placeholder:"YYYY"},qi=1900,Yi=2099,Ui=(e,t)=>{if("number"==typeof e)return new Date(e);if("string"==typeof e){const t=new Date(e.replace(/-/g,"/"));return new Date(t)}return new Date},Gi={MM:"(0?[1-9]|1[0-2])",DD:"(0?[1-9]|[12][0-9]|3[01])",YYYY:"([0-9]{4})"},Zi=e=>{const t=(e=>`^${e.split(Wi).map(e=>Gi[e]).join("\\D")}$`)(e),o=(e=>{const t=e.split(Wi);return e=>{const o={};return t.forEach((t,i)=>{o[t]=e[i+1]}),[o.YYYY,o.MM,o.DD]}})(e),i=new RegExp(t);return{pattern:t,validate:e=>i.test(e),getDate:e=>((e,t,o)=>{const i=t.exec(e);if(!i)return null;const[r,n,s]=o(i);return Ui([r,n,s].join(Wi))})(e,i,o)}},Qi=Object.fromEntries(Bi.map(e=>[e,Zi(e)])),Ji=e=>!Number.isNaN(Number(e)),Ki=e=>{const t=Ui(e);return[t.getFullYear(),t.getMonth()+1,t.getDate()]},Xi=(e,t)=>{const[o,i,r]=Ki(e),n={DD:String(r).padStart(2,"0"),MM:String(i).padStart(2,"0"),YYYY:String(o)};return t.replace(/DD|MM|YYYY/g,e=>n[e])},er=()=>Ui().getTime(),tr=e=>Ui(e).getFullYear().toString(),or=e=>(Ui(e).getMonth()+1).toString(),ir=(e,t)=>"number"==typeof e?e:t?Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()):e.getTime(),rr=(e,t)=>Array.isArray(e)&&e.length===t&&e.filter(Boolean).length===t,nr=({label:e,dataId:t,dataName:o})=>`\n\t<div class="combo-box-item"\n\t\tdata-id="${t}"\n\t\tdata-name="${o}"\n\t>\n\t\t\t${e}\n\t</div>\n`,sr=(e=Oi)=>e.map((e,t)=>nr({label:e,dataId:t+1,dataName:e})).join(""),ar=(e,t)=>{const[o,i]=Ki(t),[r,n]=Ki(e);return r===o&&n===i},lr=(e,t,o)=>(e.addEventListener("input",t),e.addEventListener("focusout",o),e),dr=Je("calendar"),cr=["initial-value","initial-year","initial-month","years-range","calendar-months","calendar-weekdays","calendar-label-today","st-host-direction","disabled","full-width"],pr=["calendar-label-submit","calendar-label-cancel"],hr=co({componentName:dr,baseSelector:"div"}),{calendar:ur,day:gr,dayEntry:mr,currentDay:br,selectedDay:yr,disabledDay:fr,weekday:vr,topNav:xr,topNavSelectors:Cr,bottomNav:wr,navPrev:Ir,navNext:Sr,navPrevRTL:Mr,navNextRTL:Ar,yearInput:Er,monthInput:Tr}={calendar:{selector:()=>".calendar"},topNav:{selector:()=>".nav.top-nav"},topNavSelectors:{selector:()=>".nav.top-nav .selectors > span"},bottomNav:{selector:()=>".nav.bottom-nav"},day:{selector:()=>".day"},dayEntry:{selector:()=>".day-entry"},currentDay:{selector:()=>".day-entry[data-current-day] .day"},selectedDay:{selector:()=>".day-entry[data-selected] .day"},disabledDay:{selector:()=>'.day-entry[data-disabled="true"] .day'},weekday:{selector:()=>".weekday"},navPrev:{selector:()=>".nav-prev"},navNext:{selector:()=>".nav-next"},navPrevRTL:{selector:()=>':host([st-host-direction="rtl"]) .nav-prev'},navNextRTL:{selector:()=>':host([st-host-direction="rtl"]) .nav-next'},yearInput:{selector:()=>".year-input"},monthInput:{selector:()=>".month-input"}},kr=_e(jt({componentNameOverride:Je("input-wrapper")}),jt({mappings:{fontSize:{},fontFamily:{},hostWidth:[{selector:()=>":host",property:"width"},{selector:"table",property:"width"}],hostDirection:{property:"direction"},topNavVerticalPadding:[{...xr,property:"padding-top"},{...xr,property:"padding-bottom"}],topNavHorizointalPadding:[{...xr,property:"padding-right"},{...xr,property:"padding-left"}],topNavAlignment:{...xr,property:"justify-content"},topNavGap:{...xr,property:"gap"},topNavSelectorsGap:{...Cr,property:"gap"},bottomNavVerticalPadding:[{...wr,property:"padding-top"},{...wr,property:"padding-bottom"}],bottomNavHorizontalPadding:[{...wr,property:"padding-right"},{...wr,property:"padding-left"}],bottomNavAlignment:{...wr,property:"justify-content"},bottomNavGap:{...wr,property:"gap"},navMarginBottom:{...xr,property:"margin-bottom"},calendarPadding:[{...ur,property:"padding-bottom"},{...ur,property:"padding-right"},{...ur,property:"padding-left"}],navBorderBottomWidth:{...xr,property:"border-bottom-width"},navBorderBottomColor:{...xr,property:"border-bottom-color"},navBorderBottomStyle:{...xr,property:"border-bottom-style"},weekdayFontSize:{...vr,property:"font-size"},weekdayFontWeight:{...vr,property:"font-weight"},currentDayBorderColor:{...br,property:"border-color"},currentDayBorderWidth:{...br,property:"border-width"},currentDayBorderStyle:{...br,property:"border-style"},dayHeight:{...mr,property:"height"},daySize:[{...gr,property:"height"},{...gr,property:"width"}],dayPadding:{...gr,property:"padding"},dayRadius:{...gr,property:"border-radius"},dayTextAlign:{...gr,property:"text-align"},dayBlockAlign:{...gr,property:"margin"},dayTextColor:{...gr,property:"color"},dayFontWeight:{...gr,property:"font-weight"},dayBackgroundColor:{...gr,property:"background-color"},dayCursor:{...gr,property:"cursor"},dayFontSize:{...gr,property:"font-size"},dayBackgroundColorHover:{selector:()=>".day:hover",property:"background-color"},daySelectedTextdColor:{...yr,property:"color"},daySelectedBackgroundColor:{...yr,property:"background-color"},dayDisabledTextdColor:{...fr,property:"color"},yearInputWidth:{...Er,property:"width"},monthInputWidth:{...Tr,property:"width"},navButtonSize:[{...Ir,property:"width"},{...Ir,property:"height"},{...Sr,property:"width"},{...Sr,property:"height"}],navButtonCursor:[{...Ir,property:"cursor"},{...Sr,property:"cursor"}],navButtonRotation:[{...Mr,property:"transform"},{...Ar,property:"transform"}],navButtonOpacity:[{...Ir,property:"opacity"},{...Sr,property:"opacity"}]}}),$t,_t)(class extends hr{static get observedAttributes(){return[].concat(hr.observedAttributes||[],cr,pr)}preview;epoch;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div>\n <nav class="nav top-nav">\n <div class="nav-prev">\n </div>\n <div class="selectors"></div>\n <div class="nav-next">\n </div>\n </nav>\n <div class="calendar"></div>\n <nav class="nav bottom-nav">\n <descope-button class="cancel-button" variant="link" mode="primary">Cancel</descope-button>\n <descope-button class="submit-button" variant="link" mode="primary" disabled="true">Done</descope-button>\n </nav>\n </div>\n ',V(`\n :host {\n display: inline-block;\n box-sizing: border-box;\n max-width: 100%;\n user-select: none;\n -webkit-user-select: none;\n }\n\n :host ::slotted {\n padding: 0;\n }\n\n [data-toggle-calendar] {\n cursor: pointer;\n display: flex;\n align-self: center;\n z-index: 1;\n }\n\n [data-disabled="true"] {\n pointer-events: none;\n }\n\n .calendar .day {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .nav {\n display: flex;\n align-items: center;\n box-sizing: border-box;\n }\n\n .selectors,\n .selectors span {\n display: flex;\n justify-content: center;\n }\n\n descope-button {\n padding: 0;\n ${Ni.cssVarList.horizontalPadding}: 0;\n ${Ni.cssVarList.verticalPadding}: 0;\n ${Ni.cssVarList.outlineWidth}: 0;\n }\n\n .combo-box-item {\n display:flex;\n flex-direction: column;\n }\n\n \n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n \n `,this)}set value(e){if(!e)return;const t=Ui(e).getTime();Ji(t)&&t!==this.epoch&&(this.epoch=t,this.renderCalendar())}get value(){return this.epoch?Xi(this.epoch,Ri):""}get isSelectedView(){return ar(this.preview,this.epoch)}get isTodayView(){return ar(er(),this.preview)}get monthNames(){return(e=>{const t=e?.split(",");return rr(t,12)?t:Oi})(this.getAttribute("calendar-months"))}get weekdayNames(){return(e=>{const t=e?.split?.(",");return rr(t,7)?t:ji})(this.getAttribute("calendar-weekdays"))}get hasYearValue(){return!!this.yearInput.value}get hasMonthValue(){return!!this.monthInput.value}get yearsRange(){const e=this.getAttribute("years-range")?.split("-");if(2===e?.length){const[t,o]=e.map(Number);if(t<=o)return[t,o]}const t=Ui().getFullYear();return[t,t+100]}init(){super.init?.(),this.initCalendar(),this.renderCalendar()}initCalendar(){this.calendar=this.shadowRoot.querySelector(".calendar"),this.navPrevEle=this.shadowRoot.querySelector(".nav-prev"),this.navNextEle=this.shadowRoot.querySelector(".nav-next"),this.submitButton=this.shadowRoot.querySelector(".submit-button"),this.cancelButton=this.shadowRoot.querySelector(".cancel-button"),this.initInputs(),this.initNav(),this.addEventListener("day-changed",()=>this.submitButton.removeAttribute("disabled")),this.submitButton.shadowRoot.querySelector("vaadin-button").setAttribute("disabled","true")}initInputs(){const e=(()=>{const e=document.createElement("span");return e.innerHTML=`\n <descope-combo-box\n label-type="static"\n bordered="true"\n item-label-path="data-name"\n item-value-path="data-id"\n class="month-input"\n >\n ${sr()}\n </descope-combo-box>\n <descope-combo-box\n allow-custom-value="true"\n label-type="static"\n bordered="true"\n item-label-path="data-name"\n item-value-path="data-id"\n class="year-input"\n no-empty-value="true"\n >\n </descope-combo-box>\n `,e})(this.monthNames,this.yearsRange);this.shadowRoot.querySelector(".selectors").appendChild(e),this.monthInput=lr(this.shadowRoot.querySelector(".month-input"),this.onMonthChange.bind(this),this.onMonthInputBlur.bind(this)),this.yearInput=lr(this.shadowRoot.querySelector(".year-input"),this.onYearChange.bind(this),this.onYearInputBlur.bind(this)),[this.monthInput,this.yearInput].forEach(e=>Xe(this,e,{includeAttrs:["disabled","size","st-host-direction"]}))}initNav(){this.navPrevEle.addEventListener("click",this.navPrevMonth.bind(this)),this.navNextEle.addEventListener("click",this.navNextMonth.bind(this)),this.cancelButton.addEventListener("click",this.onCancel.bind(this)),this.submitButton.addEventListener("click",this.onSubmit.bind(this)),[this.navPrevEle,this.navNextEle].forEach(e=>Xe(this,e,{includeAttrs:["size"]})),this.shadowRoot.querySelector(".nav-next").innerHTML='\n<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9.27283 6.78069C8.87912 6.34164 8.91587 5.66655 9.35492 5.27283C9.79397 4.87912 10.4691 4.91587 10.8628 5.35492C10.8628 5.35492 16.0022 10.9543 16.366 11.36C16.7298 11.7657 16.7298 12.2392 16.366 12.6448L10.8628 18.6451C10.4691 19.0841 9.79397 19.1209 9.35492 18.7272C8.91587 18.3334 8.87912 17.6584 9.27283 17.2193L14.1368 12L9.27283 6.78069Z" fill="#808080"/>\n</svg>',this.shadowRoot.querySelector(".nav-prev").innerHTML='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M14.7272 17.2193C15.1209 17.6584 15.0841 18.3334 14.6451 18.7272C14.206 19.1209 13.5309 19.0841 13.1372 18.6451C13.1372 18.6451 7.99776 13.0457 7.63399 12.64C7.27023 12.2343 7.27023 11.7608 7.63399 11.3552L13.1372 5.35492C13.5309 4.91587 14.206 4.87912 14.6451 5.27283C15.0841 5.66655 15.1209 6.34164 14.7272 6.78069L9.86322 12L14.7272 17.2193Z" fill="#808080"/>\n</svg>'}onSubmit(){this.isDisabled||this.value&&this.dispatchEvent(new CustomEvent("date-submit",{detail:Ui(this.preview)}))}onCancel(){this.isDisabled||(this.dispatchEvent(new CustomEvent("cancel")),this.dispatchEvent(new CustomEvent("date-cancel")),this.clearSelectedDay())}clearSelectedDay(){this.getSelectedDayEle()?.removeAttribute("data-selected"),this.submitButton.setAttribute("disabled","true"),this.epoch=""}updateInputs(){if(this.yearInput&&this.monthInput){const e=this.preview||er(),t=tr(e),o=or(e);this.monthInput.value=o,setTimeout(()=>{this.yearInput.baseElement.value=t})}}renderCalendar(){const e=Ui(this.preview||er()).getTime(),[t,o]=Ki(e);this.calendar&&(this.calendar.innerHTML=((e,t,o)=>{const i=((e,t)=>new Date(e,t,0).getDate())(e,t),r=new Date(e,t-1,1).getDay();let n="<table>";n+=`<thead><tr>${o.reduce((e,t)=>`${e}<th><span class="weekday">${t}</span></th>`,"")}</tr></thead>`,n+="<tbody>",n+="<tr>";for(let e=0;e<r;e++)n+="<td></td>";let s=r;for(let e=1;e<=i;e++)7===s&&(s=0,n+="</tr><tr>"),n+=`\n <td\n data-date-day="${e}"\n class="day-entry">\n <span class="day" data-date-day=${e}>\n ${e}\n </span>\n </td>\n `,s++;for(;s<7;)n+="<td></td>",s++;return n+="</tr></tbody></table>",n})(t,o,this.weekdayNames.map(e=>e.substring(0,3)))),Array.from(this.calendar?.querySelectorAll(".day-entry .day")||[]).forEach(e=>e.addEventListener("click",this.onDayChange.bind(this))),this.updateInputs(),this.setSelectedDay(),this.setCurrentDay()}onDayChange(e){if(this.isDisabled)return;const t=Ui(this.preview);t.setDate(Number(e.target.getAttribute("data-date-day"))),this.value=Xi(t.getTime(),Ri),this.dispatchEvent(new CustomEvent("day-changed",{detail:t}))}onYearChange(e){if(!e.target.value)return;const t=Ui(this.preview);t.setFullYear(Number(e.target.value.trim())),this.preview=t.getTime(),this.renderCalendar(),this.dispatchEvent(new CustomEvent("year-changed",{detail:t}))}onMonthChange(e){if(!e.target.value)return;const t=Ui(this.preview);t.setMonth(Number(e.target.value)-1),this.preview=t.getTime(),this.renderCalendar(),this.dispatchEvent(new CustomEvent("month-changed",{detail:t}))}onYearInputBlur(e){this.yearInput.baseElement.value=e.target.value||tr(this.preview)}onMonthInputBlur(e){this.monthInput.baseElement.value=e.target.value||or(this.preview)}getSelectedDayEle(){const e=Ui(this.epoch).getDate();return this.calendar?.querySelector(`[data-date-day="${e}"]`)}getCurrentDayEle(){return this.calendar?.querySelector(`[data-date-day="${Ui().getDate()}"]`)}clearSelectedDays(){const e=this.calendar?.querySelectorAll("[data-selected]");e&&e.forEach(e=>e.removeAttribute("data-selected"))}setSelectedDay(){this.clearSelectedDays(),this.value&&this.isSelectedView&&this.getSelectedDayEle().setAttribute("data-selected","true")}setCurrentDay(){if(this.isTodayView){const e=this.getCurrentDayEle(),t=this.getAttribute("calendar-label-today")||"Today";e?.setAttribute("data-current-day","true"),e?.setAttribute("title",t)}}navPrevMonth(){if(this.isDisabled)return;const e=(e=>{const t=Ui(e),o=t.getMonth();if(0===o){const e=t.getFullYear();t.setFullYear(e-1),t.setMonth(11)}else t.setMonth(o-1);return t})(this.preview);this.preview=e.getTime(),this.renderCalendar()}navNextMonth(){if(this.isDisabled)return;const e=(e=>{const t=Ui(e),o=t.getMonth();if(11===o){const e=t.getFullYear();t.setFullYear(e+1),t.setMonth(0)}else t.setMonth(o+1);return t})(this.preview);this.preview=e.getTime(),this.renderCalendar()}clearValue(){this.epoch="",this.value="",this.removeAttribute("preview"),this.submitButton.setAttribute("disabled","true")}onInitialValueChange(e){if(this.value)return;const t=Ui(e).getTime();Ji(t)?(this.epoch=t,this.preview=t):this.clearValue()}onYearsRangeChange(){setTimeout(()=>{this.yearInput&&(this.yearInput.innerHTML=(e=>{const[t,o]=e,i=[];for(let e=t;e<=o;e++)i.push(e);return i})(this.yearsRange).map(e=>nr({label:e,dataId:e,dataName:e})).join(""))})}onMonthNamesChange(){setTimeout(()=>{this.monthInput&&(this.monthInput.innerHTML=sr(this.monthNames))})}onSubmitLabelChange(e){this.submitButton&&(this.submitButton.textContent=e||"Done")}onCancelLabelChange(e){this.cancelButton&&(this.cancelButton.textContent=e||"Cancel")}onInitialMonthChange(e){const t=tr(this.preview);this.preview=Ui(`${t}/${e}/1`).getTime()}onInitialYearChange(e){const t=or(this.preview);this.preview=Ui(`${e}/${t}/1`).getTime()}attributeChangedCallback(e,t,o){super.attributeChangedCallback(e,t,o),t!==o&&(pr.includes(e)?("calendar-label-submit"===e&&this.onSubmitLabelChange(o),"calendar-label-cancel"===e&&this.onCancelLabelChange(o)):(o&&"initial-value"===e&&this.onInitialValueChange(o),o&&"initial-month"===e&&this.onInitialMonthChange(o),o&&"initial-year"===e&&this.onInitialYearChange(o),"years-range"===e&&this.onYearsRangeChange(Number(o)),"calendar-months"===e&&this.onMonthNamesChange(),"calendar-label-today"===e&&this.setCurrentDay(o),"disabled"===e&&setTimeout(()=>{this.cancelButton?.setAttribute("disabled","true"===o)}),this.renderCalendar()))}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:{}}});customElements.define(dr,kr);const{host:zr,label:Lr,placeholder:Vr,requiredIndicator:Nr,inputField:Dr,input:Pr,inputMask:Br,helperText:Fr,errorMessage:Rr,disabledPlaceholder:Wr,inputDisabled:Or,inputIcon:jr,externalInput:$r,externalInputDisabled:_r,externalPlaceholder:Hr,externalDisabledPlaceholder:qr}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},placeholder:[{selector:"> input:placeholder-shown"},{selector:()=>":host::slotted(input:placeholder-shown)"}],disabledPlaceholder:{selector:"> input:disabled::placeholder"},inputField:{selector:"::part(input-field)"},input:{selector:"input"},inputMask:{selector:"::part(input-field)::before"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},inputIcon:{selector:"vaadin-icon"},externalInput:{selector:()=>"::slotted(input)"},externalInputDisabled:{selector:()=>"::slotted(input:disabled)"},externalPlaceholder:{selector:()=>"::slotted(input:placeholder-shown)"},externalDisabledPlaceholder:{selector:()=>"::slotted(input:disabled::placeholder)"}};var Yr={fontSize:[{},zr],fontFamily:[Lr,Dr,Fr,Rr],labelFontSize:{...Lr,property:"font-size"},labelFontWeight:{...Lr,property:"font-weight"},inputValueFontWeight:[{...Pr,property:"font-weight"},{...$r,property:"font-weight"}],inputPlaceholderFontWeight:[{selector:()=>":host input:placeholder-shown",property:"font-weight"},{...Hr,property:"font-weight"}],helperTextFontWeight:{...Fr,property:"font-weight"},errorMessageFontWeight:{...Rr,property:"font-weight"},labelTextColor:[{...Lr,property:"color"},{...Nr,property:"color"},{...Lr,property:"-webkit-text-fill-color"},{...Nr,property:"-webkit-text-fill-color"}],hostWidth:{...zr,property:"width"},hostMinWidth:{...zr,property:"min-width"},hostDirection:{...zr,property:"direction"},inputDirection:{...Pr,property:"direction"},inputBackgroundColor:[{...Dr,property:"background-color"},{...Br,property:"background-color"}],errorMessageTextColor:{...Rr,property:"color"},errorMessageIcon:{...Rr,property:"background-image"},errorMessageIconSize:{...Rr,property:"background-size"},errorMessageIconPadding:{...Rr,property:"padding-inline-start"},errorMessageIconRepeat:{...Rr,property:"background-repeat"},errorMessageIconPosition:{...Rr,property:"background-position"},errorMessageFontSize:{...Rr,property:"font-size"},helperTextColor:{...Fr,property:"-webkit-text-fill-color"},inputValueTextColor:[{...Dr,property:"color"},{...Or,property:"-webkit-text-fill-color"},{..._r,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...Pr,property:"caret-color"},{...$r,property:"caret-color"}],labelRequiredIndicator:{...Nr,property:"content"},inputBorderColor:{...Dr,property:"border-color"},inputBorderWidth:{...Dr,property:"border-width"},inputBorderStyle:{...Dr,property:"border-style"},inputBorderRadius:{...Dr,property:"border-radius"},inputHeight:{...Dr,property:"height"},inputHorizontalPadding:[{...Pr,property:"padding-left"},{...Pr,property:"padding-right"},{...$r,property:"padding-left"},{...$r,property:"padding-right"}],inputOutlineColor:{...Dr,property:"outline-color"},inputOutlineStyle:{...Dr,property:"outline-style"},inputOutlineWidth:{...Dr,property:"outline-width"},inputOutlineOffset:{...Dr,property:"outline-offset"},textAlign:{},inputTextAlign:[{...Pr,property:"text-align"},{...$r,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...Hr,property:"color"},{...Vr,property:"color"},{...Wr,property:"-webkit-text-fill-color"},{...qr,property:"-webkit-text-fill-color"}],labelPosition:{...Lr,property:"position"},labelTopPosition:{...Lr,property:"top"},labelHorizontalPosition:[{...Lr,property:"left"},{...Lr,property:"right"}],inputTransformY:{...Lr,property:"transform"},inputTransition:{...Lr,property:"transition"},marginInlineStart:{...Lr,property:"margin-inline-start"},placeholderOpacity:[{selector:"> input:placeholder-shown",property:"opacity"},{...Hr,property:"opacity"}],inputVerticalAlignment:[{...Dr,property:"align-items"},{...$r,property:"align-items"}],valueInputHeight:[{...Pr,property:"height"},{...$r,property:"height"}],valueInputMarginBottom:[{...Pr,property:"margin-bottom"},{...$r,property:"margin-bottom"}],inputIconOffset:[{...jr,property:"margin-right"},{...jr,property:"margin-left"}],inputIconSize:{...jr,property:"font-size"},inputIconColor:{...jr,property:"color"},inputTextSecurity:[{...Pr,property:"-webkit-text-security"},{...Pr,property:"text-security"},{...$r,property:"-webkit-text-security"},{...$r,property:"text-security"}]};const Ur=Je("text-field"),Gr=["type","label-type","copy-to-clipboard"],Zr=_e(jt({mappings:Yr}),$t,io({proxyProps:["value","selectionStart"],useProxyTargets:!0}),_t,e=>class extends e{static get observedAttributes(){return Gr.concat(e.observedAttributes||[])}icon;init(){super.init?.()}renderCopyToClipboard(e){if(!e)return void this.icon?.remove();const t={icon:"vaadin:copy-o",title:"Copy",style:"cursor: pointer"},o={icon:"vaadin:check-circle-o",title:"Copied",style:"cursor: initial"};this.icon=Object.assign(document.createElement("vaadin-icon"),{slot:"suffix",...t}),this.baseElement.appendChild(this.icon),this.icon.addEventListener("click",()=>{navigator.clipboard.writeText(this.value),Object.assign(this.icon,o),setTimeout(()=>{Object.assign(this.icon,t)},5e3)})}onLabelClick(){this.focus()}attributeChangedCallback(e,t,o){super.attributeChangeCallback?.(e,t,o),"type"===e&&this.baseElement._setType(o),t!==o&&("label-type"===e?"floating"===o?this.addEventListener("click",this.onLabelClick):this.removeEventListener("click",this.onLabelClick):"copy-to-clipboard"===e&&this.renderCopyToClipboard("true"===o))}})(Qt({slots:["prefix","suffix"],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${Zr.cssVarList.inputOutlineWidth}) + var(${Zr.cssVarList.inputOutlineOffset}));\n box-sizing: border-box;\n\t\t\t}\n :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {\n opacity: 1;\n }\n\n vaadin-text-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-text-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n ${xt("vaadin-text-field")}\n\t\t\t${ut(Zr.cssVarList)}\n\t\t\t${vt("vaadin-text-field",Zr.cssVarList)}\n \n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n \n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,excludeAttrsSync:["tabindex","style"],componentName:Ur}));customElements.define(Ur,Zr);class Qr{#F=Object.freeze([]);constructor({id:e,min:t,max:o,placeholder:i},r){this.id=e,this.min=t,this.max=o,this.placeholder=i,this.onChange=r}get data(){return this.#F}set data(e){this.#F=Object.freeze(e),this.onChange?.()}get#ae(){return this.data.length?this.numberValue:0}get numberValue(){return Number(this.stringValue)}get stringValue(){return(this.data.join("")||this.placeholder).padStart(this.length,"0")}get isFull(){return 10*this.numberValue>this.max||this.data.length===this.length}get isEmpty(){return this.stringValue===this.placeholder}get length(){return this.max.toString().length}set(e){this.data=e.toString().split("")}add(e){let{data:t}=this;return t=[...t,e],Number(t.join(""))>this.max?t=[e]:this.length<t.length&&(t=t.slice(1,t.length)),this.data=t,e}del(){this.data.filter(e=>"0"!==e).filter(Boolean).length?this.data=this.data.slice(0,this.data.length-1):this.data=[]}clear(){this.data=[]}inc(e){this.replaceValue(this.#ae<this.max?Math.max(this.#ae+(e||1),this.min):this.min)}dec(e){this.replaceValue(this.#ae>this.min?Math.min(this.#ae-(e||1),this.max):this.max)}isInRange(e){return e>=this.min&&e<=this.max}replaceValue(e){this.isInRange(e)&&(this.data=e.toString().padStart(this.length,0).split(""))}setMin(e){this.min=Number(e)}setMax(e){this.max=Number(e)}}const Jr=Je("date-field"),Kr=co({componentName:Jr,baseSelector:"vaadin-popover"}),Xr=["format","opened","initial-value","readonly","disable-calendar","utc-time"],en=["years-range","calendar-months","calendar-weekdays"],tn=[...Xr,...en],on=Zr.cssVarList,{host:rn,input:nn,inputEleRTL:sn,toggleButton:an,overlay:ln,backdrop:dn}={host:{selector:()=>":host"},input:{selector:()=>"descope-text-field"},inputEleRTL:{selector:()=>':host([st-host-direction="rtl"]) descope-text-field'},toggleButton:{selector:()=>".toggle-calendar"},overlay:{selector:"vaadin-popover-overlay::part(overlay)"},backdrop:{selector:"vaadin-popover-overlay::part(backdrop)"}},cn=_e(jt({componentNameOverride:Je("input-wrapper")}),jt({mappings:{iconMargin:{...an,property:"margin-inline-end"},hostWidth:{...rn,property:"width"},hostDirection:{...rn,property:"direction"},textAlign:{...nn,property:"text-align"},rtlInputDirection:{...sn,property:on.inputDirection},rtlInputAlignment:{...sn,property:on.inputTextAlign},overlayGap:{property:()=>cn.cssVarList.overlayGap},overlayBackgroundColor:{property:()=>cn.cssVarList.overlayBackgroundColor},overlayPadding:{property:()=>cn.cssVarList.overlayPadding},overlayBoxShadow:{property:()=>cn.overlayBoxShadow},overlayOutlineWidth:{property:()=>cn.cssVarList.overlayOutlineWidth},overlayOutlineColor:{property:()=>cn.cssVarList.overlayOutlineColor},overlayOutlineStyle:{property:()=>cn.cssVarList.overlayOutlineStyle},errorMessageIcon:{selector:Zr.componentName,property:Zr.cssVarList.errorMessageIcon},errorMessageIconSize:{selector:Zr.componentName,property:Zr.cssVarList.errorMessageIconSize},errorMessageIconPadding:{selector:Zr.componentName,property:Zr.cssVarList.errorMessageIconPadding},errorMessageIconRepeat:{selector:Zr.componentName,property:Zr.cssVarList.errorMessageIconRepeat},errorMessageIconPosition:{selector:Zr.componentName,property:Zr.cssVarList.errorMessageIconPosition},errorMessageFontSize:{selector:Zr.componentName,property:Zr.cssVarList.errorMessageFontSize},labelFontWeight:{selector:Zr.componentName,property:Zr.cssVarList.labelFontWeight},inputValueFontWeight:{selector:Zr.componentName,property:Zr.cssVarList.inputValueFontWeight},inputPlaceholderFontWeight:{selector:Zr.componentName,property:Zr.cssVarList.inputPlaceholderFontWeight},helperTextFontWeight:{selector:Zr.componentName,property:Zr.cssVarList.helperTextFontWeight},errorMessageFontWeight:{selector:Zr.componentName,property:Zr.cssVarList.errorMessageFontWeight}}}),ro({name:"overlay",selector:"",mappings:{marginTop:{...ln,property:"margin-top"},backgroundColor:{...ln},backdropBackgroundColor:{...dn,property:"background-color"},backdropPointerEvents:{...dn,property:"pointer-events"},padding:{...ln},boxShadow:{...ln},outlineWidth:{...ln},outlineColor:{...ln},outlineStyle:{...ln}}}),$t,_t)(class extends Kr{epoch="";format=Fi;selectedCounterIdx=0;updateCountersDisplay(){this.inputElement.value=this.countersValue}updateValue(){if(this.isCountersOutOfRange)this.resetEpoch();else{const e=Qi[this.format].getDate(this.inputElement.value);this.updateEpoch(ir(e,this.isUtcTime))}}onDateCounterChange=()=>{this.updateCountersDisplay(),this.updateValue(),this.#le()};updateEpoch(e){this.epoch=ir(e,this.isUtcTime)}dateCounters=[new Qr($i,this.onDateCounterChange.bind(this)),new Qr(_i,this.onDateCounterChange.bind(this)),new Qr(Hi,this.onDateCounterChange.bind(this))];static get observedAttributes(){return[].concat(Kr.observedAttributes||[],tn)}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div>\n <descope-text-field inputmode="numeric">\n <span slot="suffix" class="toggle-calendar">\n \n<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M9 5H15V4.50468C15 4.21404 15.226 4 15.5047 4H16.4953C16.786 4 17 4.22595 17 4.50468V5H18.7568C19.3028 5 19.75 5.44725 19.75 5.99896V7.00104C19.75 7.55734 19.3053 8 18.7568 8H5.24317C4.69717 8 4.25 7.55275 4.25 7.00104V5.99896C4.25 5.44266 4.69466 5 5.24317 5H7V4.50468C7 4.21404 7.22596 4 7.50468 4H8.49532C8.78596 4 9 4.22595 9 4.50468V5ZM5.50468 9H6.49532C6.78596 9 7 9.22596 7 9.50468V10.4953C7 10.786 6.77404 11 6.49532 11H5.50468C5.21404 11 5 10.774 5 10.4953V9.50468C5 9.21404 5.22595 9 5.50468 9ZM8.50468 9H9.49532C9.78596 9 10 9.22596 10 9.50468V10.4953C10 10.786 9.77404 11 9.49532 11H8.50468C8.21404 11 8 10.774 8 10.4953V9.50468C8 9.21404 8.22596 9 8.50468 9ZM11.5047 9H12.4953C12.786 9 13 9.22596 13 9.50468V10.4953C13 10.786 12.774 11 12.4953 11H11.5047C11.214 11 11 10.774 11 10.4953V9.50468C11 9.21404 11.226 9 11.5047 9ZM5.50468 12H6.49532C6.78596 12 7 12.226 7 12.5047V13.4953C7 13.786 6.77404 14 6.49532 14H5.50468C5.21404 14 5 13.774 5 13.4953V12.5047C5 12.214 5.22595 12 5.50468 12ZM8.50468 12H9.49532C9.78596 12 10 12.226 10 12.5047V13.4953C10 13.786 9.77404 14 9.49532 14H8.50468C8.21404 14 8 13.774 8 13.4953V12.5047C8 12.214 8.22596 12 8.50468 12ZM11.5047 12H12.4953C12.786 12 13 12.226 13 12.5047V13.4953C13 13.786 12.774 14 12.4953 14H11.5047C11.214 14 11 13.774 11 13.4953V12.5047C11 12.214 11.226 12 11.5047 12ZM5.50468 15H6.49532C6.78596 15 7 15.226 7 15.5047V16.4953C7 16.786 6.77404 17 6.49532 17H5.50468C5.21404 17 5 16.774 5 16.4953V15.5047C5 15.214 5.22595 15 5.50468 15ZM8.50468 15H9.49532C9.78596 15 10 15.226 10 15.5047V16.4953C10 16.786 9.77404 17 9.49532 17H8.50468C8.21404 17 8 16.774 8 16.4953V15.5047C8 15.214 8.22596 15 8.50468 15ZM11.5047 15H12.4953C12.786 15 13 15.226 13 15.5047V16.4953C13 16.786 12.774 17 12.4953 17H11.5047C11.214 17 11 16.774 11 16.4953V15.5047C11 15.214 11.226 15 11.5047 15ZM14.5047 9H15.4953C15.786 9 16 9.22596 16 9.50468V10.4953C16 10.786 15.774 11 15.4953 11H14.5047C14.214 11 14 10.774 14 10.4953V9.50468C14 9.21404 14.226 9 14.5047 9ZM14.5047 12H15.4953C15.786 12 16 12.226 16 12.5047V13.4953C16 13.786 15.774 14 15.4953 14H14.5047C14.214 14 14 13.774 14 13.4953V12.5047C14 12.214 14.226 12 14.5047 12ZM14.5047 15H15.4953C15.786 15 16 15.226 16 15.5047V16.4953C16 16.786 15.774 17 15.4953 17H14.5047C14.214 17 14 16.774 14 16.4953V15.5047C14 15.214 14.226 15 14.5047 15ZM17.5047 15H18.4953C18.786 15 19 15.226 19 15.5047V16.4953C19 16.786 18.774 17 18.4953 17H17.5047C17.214 17 17 16.774 17 16.4953V15.5047C17 15.214 17.226 15 17.5047 15ZM5.50468 18H6.49532C6.78596 18 7 18.226 7 18.5047V19.4953C7 19.786 6.77404 20 6.49532 20H5.50468C5.21404 20 5 19.774 5 19.4953V18.5047C5 18.214 5.22595 18 5.50468 18ZM8.50468 18H9.49532C9.78596 18 10 18.226 10 18.5047V19.4953C10 19.786 9.77404 20 9.49532 20H8.50468C8.21404 20 8 19.774 8 19.4953V18.5047C8 18.214 8.22596 18 8.50468 18ZM11.5047 18H12.4953C12.786 18 13 18.226 13 18.5047V19.4953C13 19.786 12.774 20 12.4953 20H11.5047C11.214 20 11 19.774 11 19.4953V18.5047C11 18.214 11.226 18 11.5047 18ZM14.5047 18H15.4953C15.786 18 16 18.226 16 18.5047V19.4953C16 19.786 15.774 20 15.4953 20H14.5047C14.214 20 14 19.774 14 19.4953V18.5047C14 18.214 14.226 18 14.5047 18ZM17.5047 18H18.4953C18.786 18 19 18.226 19 18.5047V19.4953C19 19.786 18.774 20 18.4953 20H17.5047C17.214 20 17 19.774 17 19.4953V18.5047C17 18.214 17.226 18 17.5047 18ZM17.5047 12H18.4953C18.786 12 19 12.226 19 12.5047V13.4953C19 13.786 18.774 14 18.4953 14H17.5047C17.214 14 17 13.774 17 13.4953V12.5047C17 12.214 17.226 12 17.5047 12ZM17.5047 9H18.4953C18.786 9 19 9.22596 19 9.50468V10.4953C19 10.786 18.774 11 18.4953 11H17.5047C17.214 11 17 10.774 17 10.4953V9.50468C17 9.21404 17.226 9 17.5047 9Z" fill="#808080"/>\n</svg>\n\n </span>\n </descope-text-field>\n <vaadin-popover></vaadin-popover>\n </div>\n ',V('\n :host {\n display: inline-block;\n box-sizing: border-box;\n user-select: none;\n max-width: 100%;\n }\n\n :host ::slotted {\n padding: 0;\n }\n\n .toggle-calendar {\n cursor: pointer;\n display: flex;\n align-self: center;\n z-index: 1;\n height: 100%;\n align-items: center;\n }\n\n :host([readonly="true"]) .toggle-calendar {\n pointer-events: none;\n }\n\n .hidden {\n display: none;\n }\n ',this),this.inputElement=this.shadowRoot.querySelector("descope-text-field"),this.popoverToggleButton=this.inputElement.querySelector(".toggle-calendar")}get validationTarget(){return this.inputElement}get opened(){return"true"===this.getAttribute("opened")}get displayValueEpoch(){const e=Qi[this.format].getDate(this.inputElement.value);return Ji(e?.getTime())?e.getTime():null}get sortedCounters(){return this.format.split(Wi).map(e=>this.dateCounters.find(t=>t.placeholder===e))}get activeCounter(){return this.sortedCounters[this.selectedCounterIdx]}get countersValue(){return this.sortedCounters.map(e=>e.stringValue).join(Wi)}get overlay(){return this.baseElement.shadowRoot?.querySelector("vaadin-popover-overlay")}get backdrop(){return this.overlay.shadowRoot?.querySelector("#backdrop")}get calendar(){return this.overlay?.querySelector("descope-calendar")}get isRTL(){const e=getComputedStyle(this.baseElement).getPropertyValue("direction");return e?"rtl"===e:"rtl"===this.getAttribute("st-host-direction")}get value(){return this.isInvalidDate()?"":this.epoch}set value(e){const t=parseInt(e,10);Number.isNaN(t)?(this.resetEpoch(),this.resetDateCounters(),this.clearInputEle()):(this.updateEpoch(t),this.updateDateCounters(new Date(t)))}resetEpoch(){this.epoch=""}get isCountersEmpty(){return this.dateCounters.every(e=>e.isEmpty)}get isCountersOutOfRange(){return this.dateCounters.some(e=>!e.isInRange(e.numberValue))}get disableCalendar(){return"true"===this.getAttribute("disable-calendar")}get isUtcTime(){return"true"===this.getAttribute("utc-time")}get isSelectAll(){const e=this.inputElement.baseElement.inputElement;return e.value.length===e.selectionStart+e.selectionEnd}reportValidity(){this.inputElement.reportValidity()}#le(){this.inputElement.baseElement.dispatchEvent(new Event("input",{bubbles:!0}))}updateInputDisplay(){this.inputElement.value=Xi(Ui(this.countersValue).getTime(),this.format)}init(){super.init?.(),this.updateFormatPattern(),this.initPopover(),this.onDateCounterChange(),this.initInputElement(),setTimeout(()=>{this.#ee()},0)}initInputElement(){this.inputElement.getValidity=this.getValidity.bind(this),this.inputElement.baseElement.checkValidity=this.checkValidity.bind(this),this.popoverToggleButton.addEventListener("click",this.onPopoverToggle.bind(this)),this.inputElement.addEventListener("focus",this.onFocus.bind(this)),this.inputElement.addEventListener("blur",this.onBlur.bind(this)),this.inputElement.addEventListener("click",this.handleMouseCaretPositionChange.bind(this)),this.inputElement.addEventListener("keydown",this.handleKeyboard.bind(this)),this.inputElement.addEventListener("beforeinput",this.handleInput.bind(this)),this.inputElement.addEventListener("pointerdown",this.onPointerDown.bind(this)),this.inputElement.addEventListener("paste",this.onPaste.bind(this)),Xe(this,this.inputElement,{includeAttrs:["label","label-type","placeholder","disabled","readonly","bordered","required","full-width","st-host-direction","pattern","bordered","data-errormessage-value-missing","data-errormessage-pattern-mismatch","data-errormessage-range-underflow","data-errormessage-range-overflow","st-error-message-icon","st-error-message-icon-size","st-error-message-icon-padding"]})}handleInput(e){var t;e.preventDefault(),this.handleSelectAll(),e.data&&(t=e.data,String(t||"").trim()&&!Number.isNaN(Number(t)))?(this.parseDigits(e.data),this.updateCountersDisplay()):e.inputType&&this.handleNavKeys(e)}initPopover(){this.baseElement.trigger=["click"],this.baseElement.withBackdrop=!0,this.baseElement.renderer=this.#de.bind(this),this.baseElement.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation()})}handleSelectAll(){this.isSelectAll&&this.selectFirstCounter()}#ce;#de(e){e.firstChild||(this.overlay.positionTarget=this.shadowRoot.querySelector(".toggle-calendar"),e.appendChild(this.#pe()),(e=>{const t=new CSSStyleSheet;t.insertRule(":host{display:block!important;}"),e?.shadowRoot?.adoptedStyleSheets?.push(t)})(this.baseElement),this.backdrop.addEventListener("click",this.closePopover.bind(this))),e.style.setProperty("visibility","hidden"),setTimeout(()=>{this.#he(e),e.style.setProperty("visibility","visible"),this.updateCalendarView(e)},100)}#he(){const e=this.shadowRoot.querySelector("vaadin-popover").shadowRoot;this.#ce?.replaceSync("vaadin-popover-overlay::part(overlay) { transform: none; }");const t=document.body.getBoundingClientRect(),o=this.getBoundingClientRect(),i=this.calendar.getBoundingClientRect(),r=this.isRTL?"right":"left",n=o[r]-i[r],s=i.left,a=t.width-i.right;let l;l=n>0?Math.min(n,a):-1*Math.min(Math.abs(n),s);const d=`\n vaadin-popover-overlay::part(overlay) {\n transform: translateX(${l}px);\n }\n `;this.#ce?this.#ce.replaceSync(d):this.#ce=V(d,e)}#pe(){const e=document.createElement("span");e.innerHTML="<descope-calendar></descope-calendar>";const t=e.querySelector("descope-calendar");return t.addEventListener("date-submit",this.onCalendarSubmit.bind(this)),t.addEventListener("cancel",this.closePopover.bind(this)),e}#ee(){this.overlay._attachOverlay=()=>this.overlay.bringToFront(),this.overlay._detachOverlay=()=>{},this.overlay._enterModalState=()=>{}}onPopoverToggle(){this.opened?this.closePopover():this.openPopover()}openPopover(){this.disableCalendar||this.setAttribute("opened","true")}closePopover(){this.removeAttribute("opened"),this.inputElement.focus()}getCounterById(e){return this.dateCounters.find(t=>t.id===e)}onCalendarSubmit(){if(!this.isReadOnly){if(!this.calendar.value)return;const e=Ui(this.calendar.value);this.value=ir(e,this.isUtcTime),this.getCounterById("year").replaceValue(e.getFullYear()),this.getCounterById("month").replaceValue(e.getMonth()+1),this.getCounterById("day").replaceValue(e.getDate()),this.#le()}this.closePopover()}updateCalendarView(){const e=Ji(Ui(this.inputElement.value||"").getTime())&&Qi[this.format].validate(this.inputElement.value);this.displayValueEpoch||e?this.calendar.setAttribute("initial-value",Xi(this.displayValueEpoch||this.epoch,Ri)):(this.calendar.clearValue(),this.calendar.setAttribute("preview",Xi(er(),Ri))),Xe(this,this.calendar,{includeAttrs:["st-host-direction","readonly","initial-month","initial-year","years-range","calendar-label-submit","calendar-label-cancel","calendar-months","calendar-weekdays","calendar-weekdays-short"]})}onPointerDown(e){setTimeout(()=>this.handleMouseCaretPositionChange(e),150)}onFocus(){this.isReadOnly||setTimeout(()=>this.resetDisplay())}resetDisplay(){this.inputElement.value||(this.inputElement.value=this.format),this.selectFirstCounter(),this.inputElement.setSelectionRange(0,this.sortedCounters[0].length)}onBlur(){this.opened||this.inputElement.value===this.format&&this.clearInputEle()}clearInputEle(){this.inputElement.value=""}onFormatUpdate(e){Object.keys(Qi).includes(e)&&(this.format=e,this.updateFormatPattern())}updateFormatPattern(){const e=this.getAttribute("format")||this.format||Fi;this.setAttribute("type","date"),this.setAttribute("pattern",Qi[e].pattern)}parseDigits(e){this.activeCounter.add(e),this.activeCounter.isFull&&this.selectNextCounter(),this.setInputSelectionRange()}getCounterIdx(e){const[t,o]=this.sortedCounters.map(e=>e.length);return[e<=t,e>=t&&e<=t+o+1,e>=t+o+2].indexOf(!0)}setSelectedCounterByCaretPosition(e){this.selectedCounterIdx=this.getCounterIdx(e.target?.selectionStart||this.inputElement.selectionStart)}selectFirstCounter(){this.selectedCounterIdx=0}selectNextCounter(){this.selectedCounterIdx<this.dateCounters.length&&(this.selectedCounterIdx=Math.min(this.selectedCounterIdx+1,2))}selectPrevCounter(){this.selectedCounterIdx>0&&(this.selectedCounterIdx=Math.min(this.selectedCounterIdx-1,1))}setInputSelectionRange(){this.selectedCounterIdx<0||setTimeout(()=>{const e=this.sortedCounters.slice(0,this.selectedCounterIdx).reduce((e,t)=>e+t.length,this.selectedCounterIdx);this.inputElement.setSelectionRange(e,e+this.sortedCounters[this.selectedCounterIdx].length)})}resetDateCounters(){this.dateCounters.forEach(e=>e.clear())}updateDateCounters(e){this.dateCounters.forEach(t=>{switch(t.id){case $i.id:t.set(this.isUtcTime?e.getUTCMonth()+1:e.getMonth()+1);break;case Hi.id:t.set(this.isUtcTime?e.getUTCFullYear():e.getFullYear());break;case _i.id:t.set(this.isUtcTime?e.getUTCDate():e.getDate())}})}handleKeyboard(e){e.metaKey||e.ctrlKey?"x"===e.key.toLowerCase()&&this.onCut(e):(this.handleSelectAll(),"ArrowUp"===e.key?this.activeCounter.inc():"ArrowDown"===e.key?this.activeCounter.dec():"ArrowRight"===e.key?this.selectNextCounter():"ArrowLeft"===e.key&&this.selectPrevCounter(),this.setInputSelectionRange())}handleNavKeys(e){this.isReadOnly||(this.opened&&this.closePopover(),this.activeCounter&&("deleteContentBackward"===e.inputType&&this.handleBackspace(),this.setInputSelectionRange()))}handleBackspace(){if(this.isSelectAll)return void this.resetToInitialState();const e=this.activeCounter;e.isEmpty?(this.selectPrevCounter(),this.setInputSelectionRange()):e.set(""),setTimeout(()=>{this.updateCountersDisplay(),this.setInputSelectionRange()})}handleMouseCaretPositionChange(e){this.opened||(e.preventDefault(),this.setSelectedCounterByCaretPosition(e),this.setInputSelectionRange())}onInitialValueChange(e){this.value||setTimeout(()=>{Number.isNaN(parseInt(e,10))||(this.value=Number(e))})}togglePopoverAccess(e){e?this.popoverToggleButton.classList.remove("hidden"):this.popoverToggleButton.classList.add("hidden")}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),t!==o&&("disable-calendar"===e&&this.togglePopoverAccess("true"!==o),Xr.includes(e)?(o&&"format"===e&&this.onFormatUpdate(o),"initial-value"===e&&this.onInitialValueChange(o)):en.includes(e)&&(o?this.calendar?.setAttribute(e,o):this.calendar?.removeAttribute(e)))}isInvalidDate(){const e=this.getCounterById("year"),t=e.numberValue>Yi||e.numberValue<qi,o=Object.entries(this.getDateVals()).some(([e,t])=>{const o=this.getCounterById(e);return!t||o.numberValue!==t});return t||o}getValidity(){return this.isRequired&&this.isCountersEmpty?{valueMissing:!0}:this.isCountersOutOfRange||this.isInvalidDate()?{patternMismatch:!0}:{}}getDateVals(){const e={day:"",month:"",year:""};if(Number.isNaN(this.epoch))return e;try{const t=new Date(this.epoch);this.isUtcTime?(e.month=t.getUTCMonth()+1,e.day=t.getUTCDate(),e.year=t.getUTCFullYear()):(e.month=t.getMonth()+1,e.day=t.getDate(),e.year=t.getFullYear())}catch(e){}return e}resetToInitialState(){this.resetDateCounters(),this.selectFirstCounter(),this.resetDisplay()}onCut(e){e.preventDefault(),this.isSelectAll?(this.#ue(this.countersValue),this.resetToInitialState()):(this.#ue(this.activeCounter.stringValue),this.activeCounter.set("")),this.setInputSelectionRange()}#ue(e){try{navigator.clipboard.writeText(e)}catch(e){console.error("Failed to copy date value:",e)}}onPaste(e){e.preventDefault();const t=(e.clipboardData||window.clipboardData).getData("Text"),o=((e,t)=>{const o=e.trim?.();return o?Qi[t].getDate(o):null})(t,this.format);if(o)this.value=ir(o,this.isUtcTime),this.onDateCounterChange(),setTimeout(()=>this.inputElement.setSelectionRange(0,this.inputElement.value.length));else{const e=Number(t);e&&this.activeCounter.min<=e&&this.activeCounter.max>=e&&(this.activeCounter.set(String(e)),setTimeout(()=>this.setInputSelectionRange()))}}});customElements.define(Jr,cn);const pn=Je("divider");class hn extends(Gt({componentName:pn,baseSelector:":host > div"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t\t<div>\n\t\t\t\t<descope-text>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</descope-text>\n\t\t\t</div>\n\t\t",V("\n \t:host {\n\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t}\n\t\t\t\t:host > div {\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\theight: 100%;\n\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\t\t\t\t:host > div::before,\n\t\t\t\t:host > div::after {\n\t\t\t\t\tcontent: '';\n\t\t\t\t\tflex-grow: 1;\n\t\t\t\t}\n\t\t\t\tdescope-text {\n\t\t\t\t\tflex-grow: 0;\n\t\t\t\t\tflex-shrink: 0;\n\t\t\t\t}\n\t\t\t\t:host(:empty) descope-text {\n\t\t\t\t\tdisplay: none;\n\t\t\t\t}\n\t\t\t\t:host([vertical=\"true\"]) div {\n\t\t\t\t\twidth: fit-content;\n\t\t\t\t}\n ",this),this.textComponent=this.shadowRoot.querySelector("descope-text"),Xe(this,this.textComponent,{includeAttrs:["mode","variant","italic"]})}}const un=ko.cssVarList,{host:gn,before:mn,after:bn,text:yn}={host:{selector:()=>":host"},before:{selector:"::before"},after:{selector:"::after"},text:{selector:"descope-text"}},fn=_e(jt({mappings:{hostWidth:{...gn,property:"width"},hostPadding:{...gn,property:"padding"},hostDirection:{...yn,property:"direction"},minHeight:{},alignItems:{},alignSelf:{},flexDirection:{},textAlign:{...yn,property:un.textAlign},labelTextWidth:{...yn,property:"width"},labelTextMaxWidth:{...yn,property:"max-width"},labelTextVerticalSpacing:[{...yn,property:"padding-top"},{...yn,property:"padding-bottom"}],labelTextHorizontalSpacing:[{...yn,property:"padding-right"},{...yn,property:"padding-left"}],stripeColor:[{...mn,property:"background-color"},{...bn,property:"background-color"}],stripeHorizontalThickness:[{...mn,property:"height"},{...bn,property:"height"}],stripeVerticalThickness:[{...mn,property:"width"},{...bn,property:"width"}],stripeColorOpacity:[{...mn,property:"opacity"},{...bn,property:"opacity"}]}}),$t,_t)(hn);customElements.define(pn,fn);const vn=Je("email-field"),xn=_e(jt({mappings:Yr}),$t,ao({inputType:"email",inputName:"email",autocompleteType:"username",includeAttrs:["disabled","readonly","pattern"]}),io({proxyProps:["value","selectionStart"],useProxyTargets:!0}),_t,e=>class extends e{init(){super.init?.(),this.baseElement.setAttribute("pattern","^[\\w\\.\\%\\+\\-']+@[\\w\\.\\-]+\\.[A-Za-z]{2,}$"),this.getAttribute("autocomplete")||this.setAttribute("autocomplete","username"),this.createExternalInput()}})(Qt({slots:["","suffix"],wrappedEleName:"vaadin-email-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${xn.cssVarList.inputOutlineWidth}) + var(${xn.cssVarList.inputOutlineOffset}));\n box-sizing: border-box;\n\t\t\t}\n ${xt("vaadin-email-field")}\n\t\t\t${ut(xn.cssVarList)}\n\t\t\t${vt("vaadin-email-field",xn.cssVarList)}\n \n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n \n\n vaadin-email-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-email-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n\n :host ::slotted(*) {\n -webkit-mask-image: none;\n }\n\n vaadin-email-field[external-input="true"] > input:not(:placeholder-shown) {\n opacity: 0;\n }\n\t\t`,excludeAttrsSync:["tabindex","style"],componentName:vn}));customElements.define(vn,xn);const Cn=({componentName:e,varName:t,fallbackVarName:o})=>{let i;class r extends(Gt({componentName:e,baseSelector:":host > div"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t\t<div></div>\n\t\t\t",V(`\n\t\t\t\t:host {\n\t\t\t\t\tdisplay: inline-flex;\n\t\t\t\t}\n\t\t\t\t:host([draggable="true"]) > div {\n\t\t\t\t\tpointer-events: none\n\t\t\t\t}\n\t\t\t\t:host > div {\n\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\tmax-width: 100%;\n\t\t\t\t\tmax-height: 100%;\n\t\t\t\t\tobject-fit: contain;\n\t\t\t\t\tmargin: auto;\n\t\t\t\t\t${i}\n\t\t\t\t}\n `,this)}}const n=_e(jt({mappings:{height:{selector:()=>":host > div"},width:{selector:()=>":host > div"},[t]:{property:"content"},[o]:{property:"content"}}}),$t,_t)(r);return i=`content: var(${n.cssVarList[t]}, var(${n.cssVarList[o]}));`,n},wn=Je("logo"),In=Cn({componentName:wn,varName:"url",fallbackVarName:"fallbackUrl"});customElements.define(wn,In);const Sn=Je("totp-image"),Mn=Cn({componentName:Sn,varName:"url",fallbackVarName:"fallbackUrl"});customElements.define(Sn,Mn);const An=Je("notp-image"),En=Cn({componentName:An,varName:"url",fallbackVarName:"fallbackUrl"});customElements.define(An,En);const Tn=Je("number-field"),kn=_e(jt({mappings:Yr}),$t,io({proxyProps:["value","selectionStart"]}),_t)(Qt({slots:["","prefix","suffix"],wrappedEleName:"vaadin-number-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${kn.cssVarList.inputOutlineWidth}) + var(${kn.cssVarList.inputOutlineOffset}));\n\t\t\t}\n ${xt("vaadin-number-field")}\n\t\t\t${ut(kn.cssVarList)}\n\t\t\t${vt("vaadin-number-field",kn.cssVarList)}\n \n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n \n\n vaadin-number-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-number-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n\t\t`,excludeAttrsSync:["tabindex","style"],componentName:Tn}));customElements.define(Tn,kn);const zn="--descope-input-mask-content",Ln="--descope-input-mask-display",Vn="--descope-input-mask-fallback",Nn=e=>{e?.focus(),e?.setSelectionRange?.(1,1)},Dn=e=>e.replace(/\D/g,"")||"",Pn=(e,t)=>{t?(e.style.setProperty(zn,`"${t}"`),e.style.setProperty(Ln,"flex")):(e.style.removeProperty(zn),e.style.removeProperty(Ln))},Bn=Je("passcode-internal"),Fn=["digits","loading"],Rn=["disabled","bordered","size","invalid","readonly","aria-labelledby"],Wn=co({componentName:Bn,baseSelector:"div"}),On=Je("passcode"),jn=["digits"],{host:$n,digitField:_n,label:Hn,requiredIndicator:qn,internalWrapper:Yn,focusedDigitField:Un,errorMessage:Gn}={host:{selector:()=>":host"},focusedDigitField:{selector:()=>`${Zr.componentName}[focused="true"]`},digitField:{selector:()=>Zr.componentName},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},internalWrapper:{selector:"descope-passcode-internal .wrapper"},errorMessage:{selector:"::part(error-message)"}},Zn=Zr.cssVarList,Qn=ii.cssVarList,Jn=_e(jt({mappings:{fontSize:[{..._n,property:Zn.fontSize},$n],hostWidth:{property:"width"},hostDirection:{...$n,property:"direction"},fontFamily:[$n,{...Hn}],labelFontWeight:{...Hn,property:"font-weight"},errorMessageFontWeight:{...Gn,property:"font-weight"},digitValueFontWeight:{selector:Zr.componentName,property:Zn.inputValueFontWeight},labelTextColor:[{...Hn,property:"color"},{...Hn,property:"-webkit-text-fill-color"},{...qn,property:"color"},{...qn,property:"-webkit-text-fill-color"}],labelRequiredIndicator:{...qn,property:"content"},errorMessageTextColor:{...Gn,property:"color"},errorMessageIcon:{...Gn,property:"background-image"},errorMessageIconSize:{...Gn,property:"background-size"},errorMessageIconPadding:{...Gn,property:"padding-inline-start"},errorMessageIconRepeat:{...Gn,property:"background-repeat"},errorMessageIconPosition:{...Gn,property:"background-position"},errorMessageFontSize:{...Gn,property:"font-size"},digitValueTextColor:{selector:Zr.componentName,property:Zn.inputValueTextColor},digitSize:[{..._n,property:"height"},{..._n,property:"width"}],digitPadding:{..._n,property:Zn.inputHorizontalPadding},digitTextAlign:{..._n,property:Zn.inputTextAlign},digitCaretTextColor:{..._n,property:Zn.inputCaretTextColor},digitSpacing:{...Yn,property:"gap"},digitOutlineColor:{..._n,property:Zn.inputOutlineColor},digitOutlineWidth:{..._n,property:Zn.inputOutlineWidth},focusedDigitFieldOutlineColor:{...Un,property:Zn.inputOutlineColor},overlayOpacity:{...Yn,property:"opacity"},spinnerSize:{selector:ii.componentName,property:Qn.spinnerSize}}}),$t,lo,io({proxyProps:["value","selectionStart"]}),_t,e=>class extends e{static get observedAttributes(){return jn.concat(e.observedAttributes||[])}get digits(){return Number.parseInt(this.getAttribute("digits"),10)||6}init(){super.init?.(),V("\n .wrapper {\n display: flex;\n width: 100%;\n justify-content: space-between;\n direction: ltr;\n position: relative;\n }\n\n descope-text-field {\n direction: ltr;\n }\n\n .loader-container {\n display: none;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n ",this);const e=document.createElement("template");e.innerHTML=`\n <${Bn}\n bordered="true"\n name="code"\n tabindex="-1"\n slot="input"\n role="textbox"\n ><slot></slot></${Bn}>\n `,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(Bn),Xe(this,this.inputElement,{includeAttrs:["digits","size","loading","disabled"]})}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),"digits"===e&&(this.style["--passcode-digits-count"]=o)}})(Qt({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tmin-width: calc(var(--passcode-digits-count) * 2em);\n\t\t\t}\n\t\t\t\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n\n\t\t\t:host::after {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\t\t\t:host::part(input-field)::after {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\n :host([loading="true"]) descope-passcode-internal .loader-container {\n display: block;\n }\n\n\t\t\tdescope-passcode-internal {\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tmin-height: initial;\n\t\t\t}\n\n\t\t\tdescope-passcode-internal .wrapper {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tmin-height: initial;\n\t\t\t\theight: 100%;\n\t\t\t\tjustify-content: space-between;\n\t\t\t}\n\n\t\t\tdescope-passcode-internal descope-text-field {\n\t\t\t\tmin-width: 2em;\n\t\t\t\tmax-width: var(${Zn.inputHeight});\n\t\t\t}\n\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tbackground-color: transparent;\n\t\t\t\tpadding: 0;\n\t\t\t\toverflow: hidden;\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t}\n\n /* safari */\n\t\t\tvaadin-text-field::part(input-field)::after {\n opacity: 0;\n }\n\n\t\t\tvaadin-text-field {\n\t\t\t\tmargin: 0;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\tvaadin-text-field::before {\n\t\t\t\theight: 0;\n\t\t\t}\n\n\t\t\tvaadin-text-field[readonly] > input:placeholder-shown {\n\t\t\t\topacity: 1;\n\t\t\t}\n\n\t\t\tvaadin-text-field[readonly]::part(input-field)::after {\n\t\t\t\tborder: 0 solid;\n\t\t\t}\n\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\n ${xt("vaadin-text-field")}\n\t\t\t${bt("vaadin-text-field")}\n \t`,excludeAttrsSync:["tabindex","style"],componentName:On}));customElements.define(Bn,class extends Wn{static get observedAttributes(){return Fn.concat(Wn.observedAttributes||[])}constructor(){super(),this.innerHTML='\n\t\t<div class="wrapper"></div>\n\t\t<div class="loader-container">\n <descope-loader-radial size="xs" mode="primary"></descope-loader-radial>\n </div>\n\t\t',this.wrapperEle=this.querySelector(".wrapper"),this.loaderContainer=this.querySelector(".loader-container")}renderInputs(){const e=[...Array(this.digits).keys()].map(e=>`\n\t\t<descope-text-field\n\t\t\tdata-id=${e}\n\t\t\ttype="tel"\n\t\t\tautocomplete="one-time-code"\n\t\t\tinputMode="numeric"\n\t\t></descope-text-field>\n\t`);this.wrapperEle.innerHTML=e.join(""),this.inputs=Array.from(this.querySelectorAll("descope-text-field")),this.initInputs()}handleLoadingState(e){e?this.setAttribute("inert","true"):this.removeAttribute("inert")}get digits(){return Number.parseInt(this.getAttribute("digits"),10)||6}get value(){return this.inputs?.map(({value:e})=>e).join("")||""}set value(e){e!==this.value&&this.parseInputValue(this.inputs[0],Dn(e))}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:this.pattern&&!new RegExp(this.pattern).test(this.value)?{patternMismatch:!0}:{}}init(){this.addEventListener("focus",e=>{e.isTrusted&&this.inputs[0].focus()}),super.init?.(),this.renderInputs()}getInputIdx(e){return Number.parseInt(e.getAttribute("data-id"),10)}getNextInput(e){const t=this.getInputIdx(e),o=Math.min(t+1,this.inputs.length-1);return this.inputs[o]}getPrevInput(e){const t=this.getInputIdx(e),o=Math.max(t-1,0);return this.inputs[o]}fillDigits(e,t){for(let o=0;o<e.length;o+=1){t.value=e[o]??"";const i=this.getNextInput(t);if(i===t)break;t=i}Nn(t)}parseInputValue(e,t=""){const o=t.split("");o.length?this.fillDigits(o,e):e.value=""}initInputs(){this.inputs.forEach(e=>{V(`\n vaadin-text-field::part(input-field)::before {\n ${Vn}: '';\n content: var(${zn}, var(${Vn}));\n position: absolute;\n width: 100%;\n height: 100%;\n display: var(${Ln}, none);\n align-items: center;\n justify-content: center;\n }`,e);const t=n()(t=>{this.parseInputValue(e,t),Pn(e)},0,{trailing:!0});e.addEventListener("input",o=>{e.value=Dn(e.value),e.value&&Pn(e,e.value[0]),setTimeout(()=>{"deleteContentBackward"===o?.inputType&&Nn(this.getPrevInput(e))}),t(e.value)}),e.onkeydown=({key:t})=>{"Backspace"===t?e.value?e.setSelectionRange(1,1):setTimeout(()=>Nn(this.getPrevInput(e)),0):1===t.length&&(e.value="")},Xe(this,e,{includeAttrs:Rn}),e.shadowRoot.querySelector("input").setAttribute("aria-label","passcode digit")}),this.handleFocusEventsDispatching(this.inputs),this.handleInputEventDispatching()}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),t!==o&&Fn.includes(e)&&("digits"===e&&this.renderInputs(),"loading"===e&&this.handleLoadingState("true"===o))}get pattern(){return`^$|^\\d{${this.digits},}$`}}),customElements.define(On,Jn);const Kn=Je("password"),{host:Xn,inputField:es,inputElement:ts,inputElementPlaceholder:os,revealButtonContainer:is,revealButtonIcon:rs,label:ns,requiredIndicator:ss,errorMessage:as,helperText:ls}={host:{selector:()=>":host"},inputField:{selector:"::part(input-field)"},inputElement:{selector:"> input"},inputElementPlaceholder:{selector:()=>":host input:placeholder-shown"},revealButtonContainer:{selector:"::part(reveal-button)"},revealButtonIcon:{selector:"::part(reveal-button)::before"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},ds=_e(jt({mappings:{hostWidth:{...Xn,property:"width"},hostMinWidth:{...Xn,property:"min-width"},hostDirection:{...Xn,property:"direction"},fontSize:[{},Xn],fontFamily:[ns,es,as,ls],inputHeight:{...es,property:"height"},inputHorizontalPadding:[{...ts,property:"padding-left"},{...ts,property:"padding-right"}],inputBackgroundColor:{...es,property:"background-color"},inputBorderStyle:{...es,property:"border-style"},inputBorderWidth:{...es,property:"border-width"},inputBorderColor:{...es,property:"border-color"},inputBorderRadius:{...es,property:"border-radius"},inputOutlineColor:{...es,property:"outline-color"},inputOutlineStyle:{...es,property:"outline-style"},inputOutlineOffset:{...es,property:"outline-offset"},inputOutlineWidth:{...es,property:"outline-width"},labelFontSize:{...ns,property:"font-size"},labelFontWeight:{...ns,property:"font-weight"},inputValueFontWeight:[{...ts,property:"font-weight"},{selector:()=>":host ::slotted(input)",property:"font-weight"}],inputPlaceholderFontWeight:[{...os,property:"font-weight"},{selector:()=>":host ::slotted(input:placeholder-shown)",property:"font-weight"}],helperTextFontWeight:{...ls,property:"font-weight"},errorMessageFontWeight:{...as,property:"font-weight"},labelTextColor:[{...ns,property:"color"},{...ns,property:"-webkit-text-fill-color"},{...ss,property:"color"},{...ss,property:"-webkit-text-fill-color"}],labelRequiredIndicator:{...ss,property:"content"},errorMessageTextColor:{...as,property:"color"},errorMessageIcon:{...as,property:"background-image"},errorMessageIconSize:{...as,property:"background-size"},errorMessageIconPadding:{...as,property:"padding-inline-start"},errorMessageIconRepeat:{...as,property:"background-repeat"},errorMessageIconPosition:{...as,property:"background-position"},errorMessageFontSize:{...as,property:"font-size"},inputPlaceholderTextColor:[{...os,property:"color"},{selector:()=>":host ::slotted(input:placeholder-shown)",property:"color"}],inputValueTextColor:[{...ts,property:"color"},{selector:()=>":host ::slotted(input)",property:"color"}],revealButtonOffset:[{...is,property:"margin-right"},{...is,property:"margin-left"}],revealButtonSize:{...is,property:"font-size"},revealButtonColor:{...rs,property:"color"},labelPosition:{...ns,property:"position"},labelTopPosition:{...ns,property:"top"},labelHorizontalPosition:[{...ns,property:"left"},{...ns,property:"right"}],inputTransformY:{...ns,property:"transform"},inputTransition:{...ns,property:"transition"},marginInlineStart:{...ns,property:"margin-inline-start"},placeholderOpacity:[{selector:"> input:placeholder-shown",property:"opacity"},{...ts,property:"opacity"}],inputVerticalAlignment:{...es,property:"align-items"},valueInputHeight:{...ts,property:"height"}}}),$t,ao({inputType:"password",inputName:"password",includeAttrs:["disabled","readonly","pattern","type","autocomplete"],noBlurDispatch:!0}),io({proxyProps:["value","selectionStart"],useProxyTargets:!0}),_t,e=>class extends e{get isReadOnly(){return this.hasAttribute("readonly")&&"false"!==this.getAttribute("readonly")}init(){super.init?.();const e=this.querySelector("input");e?.addEventListener("mousedown",t=>{if(this.isDraggable&&this.isReadOnly){e.setAttribute("inert","true");const o=t.target,i=o.getAttribute("type");o.setAttribute("type","text"),setTimeout(()=>{o.focus()});const r=t=>{o.setAttribute("type",i),e.removeAttribute("inert"),this.removeEventListener("mouseup",r),this.removeEventListener("dragend",r)};this.addEventListener("dragend",r,{once:!0}),this.addEventListener("mouseup",r,{once:!0})}})}},e=>class extends e{static get observedAttributes(){return["manual-visibility-toggle"]}get manualToggleVisibility(){return"true"===this.getAttribute("manual-visibility-toggle")}init(){super.init?.(),this.handleCaretOnVisibilityChange(),this.origSetPasswordVisible=this.baseElement._setPasswordVisible,this.origSetFocused=this.baseElement._setFocused,this.baseElement._setFocused=this.setFocus.bind(this),this.initExternalInput()}initExternalInput(){const e=this.createExternalInput();e&&this.handlePasswordVisibility(e)}get caretPosition(){return this.value?.length||0}handleCaretOnVisibilityChange(){const e=this.baseElement._togglePasswordVisibility.bind(this.baseElement);this.baseElement._togglePasswordVisibility=()=>{setTimeout(()=>(e(),this.inputElement.setSelectionRange(this.caretPosition,this.caretPosition),!1))}}setFocus(e){this.manualToggleVisibility&&(this.baseElement._setPasswordVisible=()=>{}),this.origSetFocused.call(this.baseElement,e),this.baseElement._setPasswordVisible=this.origSetPasswordVisible.bind(this.baseElement)}resetPasswordVisibilityToggle(){this.baseElement._setPasswordVisible=this.origSetPasswordVisible,this.baseElement._setFocused=this.origSetFocus}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o)}handlePasswordVisibility(e){const t=this.baseElement.__boundRevealButtonMouseDown;this.baseElement.querySelector("vaadin-password-field-button").removeEventListener("mousedown",t),this.baseElement._passwordVisibleChanged=()=>{},this.baseElement._togglePasswordVisibility=()=>{"password"===e.getAttribute("type")?this.showPasswordVisibility(e):this.hidePasswordVisibility(e)}}showPasswordVisibility(e){e.setAttribute("type","text"),this.setAttribute("password-visible","true")}hidePasswordVisibility(e){e.setAttribute("type","password"),this.setAttribute("password-visible","false")}})(Qt({slots:["","suffix"],wrappedEleName:"vaadin-password-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tmin-width: 10em;\n box-sizing: border-box;\n position: relative;\n\t\t\t}\n\t\t\t${ut(ds.cssVarList)}\n\t\t\t${bt("vaadin-password-field")}\n ${xt("vaadin-password-field")}\n\n\t\t\tvaadin-password-field {\n\t\t\t\twidth: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tpadding: 0;\n\t\t\t}\n\t\t\tvaadin-password-field > input {\n -webkit-mask-image: none;\n\t\t\t\tbox-sizing: border-box;\n opacity: 1;\n\t\t\t}\n\t\t\tvaadin-password-field::part(input-field) {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tpadding: 0;\n\t\t\t}\n\t\t\tvaadin-password-field[focus-ring]::part(input-field) {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n :host ::slotted(input) {\n\t\t\t\tmin-height: 0;\n }\n :host([readonly]) ::slotted(input:placeholder-shown) {\n\t\t\t\topacity: 0;\n\t\t\t}\n\t\t\tvaadin-password-field::before {\n\t\t\t\theight: initial;\n\t\t\t}\n\t\t\tvaadin-password-field::part(input-field)::after {\n\t\t\t\topacity: 0;\n\t\t\t}\n\t\t\tvaadin-password-field-button {\n\t\t\t\tcursor: pointer;\n\t\t\t}\n\t\t\t:host([readonly]) vaadin-password-field-button {\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\t\t\tvaadin-password-field-button[focus-ring] {\n\t\t\t\tbox-shadow: 0 0 0 2px var(${ds.cssVarList.inputOutlineColor});\n\t\t\t}\n\n \n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n \n\n ::part(reveal-button) {\n align-self: center;\n }\n\n vaadin-password-field[external-input="true"] > input:not(:placeholder-shown) {\n opacity: 0;\n }\n\t\t`,excludeAttrsSync:["tabindex","style"],componentName:Kn}));customElements.define(Kn,ds);const cs=Je("text-area"),{host:ps,label:hs,placeholder:us,inputField:gs,textArea:ms,requiredIndicator:bs,helperText:ys,errorMessage:fs}={host:{selector:()=>":host"},label:{selector:"::part(label)"},placeholder:{selector:"textarea:placeholder-shown"},inputField:{selector:"::part(input-field)"},textArea:{selector:"> textarea"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},vs=_e(jt({mappings:{hostWidth:{...ps,property:"width"},hostMinWidth:{...ps,property:"min-width"},hostDirection:{...ps,property:"direction"},fontSize:[ps,ms],fontFamily:[hs,gs,ys,fs],labelFontSize:{...hs,property:"font-size"},labelFontWeight:{...hs,property:"font-weight"},inputValueFontWeight:{...ms,property:"font-weight"},inputPlaceholderFontWeight:{...us,property:"font-weight"},helperTextFontWeight:{...ys,property:"font-weight"},errorMessageFontWeight:{...fs,property:"font-weight"},labelTextColor:[{...hs,property:"color"},{...hs,property:"-webkit-text-fill-color"},{...bs,property:"color"}],labelRequiredIndicator:{...bs,property:"content"},errorMessageTextColor:{...fs,property:"color"},errorMessageIcon:{...fs,property:"background-image"},errorMessageIconSize:{...fs,property:"background-size"},errorMessageIconPadding:{...fs,property:"padding-inline-start"},errorMessageIconRepeat:{...fs,property:"background-repeat"},errorMessageIconPosition:{...fs,property:"background-position"},errorMessageFontSize:{...fs,property:"font-size"},inputBackgroundColor:{...gs,property:"background-color"},inputValueTextColor:{...ms,property:"color"},inputPlaceholderTextColor:{...us,property:"color"},inputBorderWidth:{...gs,property:"border-width"},inputBorderStyle:{...gs,property:"border-style"},inputBorderColor:{...gs,property:"border-color"},inputBorderRadius:{...gs,property:"border-radius"},inputOutlineStyle:{...gs,property:"outline-Style"},inputOutlineColor:{...gs,property:"outline-color"},inputOutlineOffset:{...gs,property:"outline-offset"},inputOutlineWidth:{...gs,property:"outline-width"},inputResizeType:{...ms,property:"resize"},inputMinHeight:{...ms,property:"min-height"},inputTextAlign:{...ms,property:"text-align"}}}),$t,io({proxyProps:["value","selectionStart"]}),_t)(Qt({slots:[],wrappedEleName:"vaadin-text-area",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n box-sizing: border-box;\n\t\t\t}\n\t\t\ttextarea {\n\t\t\t\theight: 100%;\n\t\t\t}\n ${xt("vaadin-text-area")}\n\t\t\t${ut(vs.cssVarList)}\n\t\t\t${gt("vaadin-text-area")}\n\t\t\t${mt("vaadin-text-area")}\n\t\t\t${yt("vaadin-text-area","textarea")}\n\t\t\t${bt("vaadin-text-area")}\n\t\t`,excludeAttrsSync:["tabindex","style"],componentName:cs}));customElements.define(cs,vs);var xs=[{name:"United States",dialCode:"+1",code:"US"},...[{name:"Afghanistan",dialCode:"+93",code:"AF"},{name:"Aland Islands",dialCode:"+358",code:"AX"},{name:"Albania",dialCode:"+355",code:"AL"},{name:"Algeria",dialCode:"+213",code:"DZ"},{name:"AmericanSamoa",dialCode:"+1684",code:"AS"},{name:"Andorra",dialCode:"+376",code:"AD"},{name:"Angola",dialCode:"+244",code:"AO"},{name:"Anguilla",dialCode:"+1264",code:"AI"},{name:"Antarctica",dialCode:"+672",code:"AQ"},{name:"Antigua and Barbuda",dialCode:"+1268",code:"AG"},{name:"Argentina",dialCode:"+54",code:"AR"},{name:"Armenia",dialCode:"+374",code:"AM"},{name:"Aruba",dialCode:"+297",code:"AW"},{name:"Australia",dialCode:"+61",code:"AU"},{name:"Austria",dialCode:"+43",code:"AT"},{name:"Azerbaijan",dialCode:"+994",code:"AZ"},{name:"Bahamas",dialCode:"+1242",code:"BS"},{name:"Bahrain",dialCode:"+973",code:"BH"},{name:"Bangladesh",dialCode:"+880",code:"BD"},{name:"Barbados",dialCode:"+1246",code:"BB"},{name:"Belarus",dialCode:"+375",code:"BY"},{name:"Belgium",dialCode:"+32",code:"BE"},{name:"Belize",dialCode:"+501",code:"BZ"},{name:"Benin",dialCode:"+229",code:"BJ"},{name:"Bermuda",dialCode:"+1441",code:"BM"},{name:"Bhutan",dialCode:"+975",code:"BT"},{name:"Bolivia, Plurinational State of",dialCode:"+591",code:"BO"},{name:"Bosnia and Herzegovina",dialCode:"+387",code:"BA"},{name:"Botswana",dialCode:"+267",code:"BW"},{name:"Brazil",dialCode:"+55",code:"BR"},{name:"British Indian Ocean Territory",dialCode:"+246",code:"IO"},{name:"Brunei Darussalam",dialCode:"+673",code:"BN"},{name:"Bulgaria",dialCode:"+359",code:"BG"},{name:"Burkina Faso",dialCode:"+226",code:"BF"},{name:"Burundi",dialCode:"+257",code:"BI"},{name:"Cambodia",dialCode:"+855",code:"KH"},{name:"Cameroon",dialCode:"+237",code:"CM"},{name:"Canada",dialCode:"+1",code:"CA"},{name:"Cape Verde",dialCode:"+238",code:"CV"},{name:"Cayman Islands",dialCode:"+345",code:"KY"},{name:"Central African Republic",dialCode:"+236",code:"CF"},{name:"Chad",dialCode:"+235",code:"TD"},{name:"Chile",dialCode:"+56",code:"CL"},{name:"China",dialCode:"+86",code:"CN"},{name:"Christmas Island",dialCode:"+61",code:"CX"},{name:"Cocos (Keeling) Islands",dialCode:"+61",code:"CC"},{name:"Colombia",dialCode:"+57",code:"CO"},{name:"Comoros",dialCode:"+269",code:"KM"},{name:"Congo",dialCode:"+242",code:"CG"},{name:"Congo, The Democratic Republic of the Congo",dialCode:"+243",code:"CD"},{name:"Cook Islands",dialCode:"+682",code:"CK"},{name:"Costa Rica",dialCode:"+506",code:"CR"},{name:"Cote d'Ivoire",dialCode:"+225",code:"CI"},{name:"Croatia",dialCode:"+385",code:"HR"},{name:"Cuba",dialCode:"+53",code:"CU"},{name:"Cyprus",dialCode:"+357",code:"CY"},{name:"Czech Republic",dialCode:"+420",code:"CZ"},{name:"Denmark",dialCode:"+45",code:"DK"},{name:"Djibouti",dialCode:"+253",code:"DJ"},{name:"Dominica",dialCode:"+1767",code:"DM"},{name:"Dominican Republic",dialCode:"+1849",code:"DO"},{name:"Ecuador",dialCode:"+593",code:"EC"},{name:"Egypt",dialCode:"+20",code:"EG"},{name:"El Salvador",dialCode:"+503",code:"SV"},{name:"Equatorial Guinea",dialCode:"+240",code:"GQ"},{name:"Eritrea",dialCode:"+291",code:"ER"},{name:"Estonia",dialCode:"+372",code:"EE"},{name:"Ethiopia",dialCode:"+251",code:"ET"},{name:"Falkland Islands (Malvinas)",dialCode:"+500",code:"FK"},{name:"Faroe Islands",dialCode:"+298",code:"FO"},{name:"Fiji",dialCode:"+679",code:"FJ"},{name:"Finland",dialCode:"+358",code:"FI"},{name:"France",dialCode:"+33",code:"FR"},{name:"French Guiana",dialCode:"+594",code:"GF"},{name:"French Polynesia",dialCode:"+689",code:"PF"},{name:"Gabon",dialCode:"+241",code:"GA"},{name:"Gambia",dialCode:"+220",code:"GM"},{name:"Georgia",dialCode:"+995",code:"GE"},{name:"Germany",dialCode:"+49",code:"DE"},{name:"Ghana",dialCode:"+233",code:"GH"},{name:"Gibraltar",dialCode:"+350",code:"GI"},{name:"Greece",dialCode:"+30",code:"GR"},{name:"Greenland",dialCode:"+299",code:"GL"},{name:"Grenada",dialCode:"+1473",code:"GD"},{name:"Guadeloupe",dialCode:"+590",code:"GP"},{name:"Guam",dialCode:"+1671",code:"GU"},{name:"Guatemala",dialCode:"+502",code:"GT"},{name:"Guernsey",dialCode:"+44",code:"GG"},{name:"Guinea",dialCode:"+224",code:"GN"},{name:"Guinea-Bissau",dialCode:"+245",code:"GW"},{name:"Guyana",dialCode:"+592",code:"GY"},{name:"Haiti",dialCode:"+509",code:"HT"},{name:"Holy See (Vatican City State)",dialCode:"+379",code:"VA"},{name:"Honduras",dialCode:"+504",code:"HN"},{name:"Hong Kong",dialCode:"+852",code:"HK"},{name:"Hungary",dialCode:"+36",code:"HU"},{name:"Iceland",dialCode:"+354",code:"IS"},{name:"India",dialCode:"+91",code:"IN"},{name:"Indonesia",dialCode:"+62",code:"ID"},{name:"Iran, Islamic Republic of Persian Gulf",dialCode:"+98",code:"IR"},{name:"Iraq",dialCode:"+964",code:"IQ"},{name:"Ireland",dialCode:"+353",code:"IE"},{name:"Isle of Man",dialCode:"+44",code:"IM"},{name:"Israel",dialCode:"+972",code:"IL"},{name:"Italy",dialCode:"+39",code:"IT"},{name:"Jamaica",dialCode:"+1876",code:"JM"},{name:"Japan",dialCode:"+81",code:"JP"},{name:"Jersey",dialCode:"+44",code:"JE"},{name:"Jordan",dialCode:"+962",code:"JO"},{name:"Kazakhstan",dialCode:"+77",code:"KZ"},{name:"Kenya",dialCode:"+254",code:"KE"},{name:"Kiribati",dialCode:"+686",code:"KI"},{name:"Korea, Democratic People's Republic of Korea",dialCode:"+850",code:"KP"},{name:"Korea, Republic of South Korea",dialCode:"+82",code:"KR"},{name:"Kuwait",dialCode:"+965",code:"KW"},{name:"Kyrgyzstan",dialCode:"+996",code:"KG"},{name:"Laos",dialCode:"+856",code:"LA"},{name:"Latvia",dialCode:"+371",code:"LV"},{name:"Lebanon",dialCode:"+961",code:"LB"},{name:"Lesotho",dialCode:"+266",code:"LS"},{name:"Liberia",dialCode:"+231",code:"LR"},{name:"Libyan Arab Jamahiriya",dialCode:"+218",code:"LY"},{name:"Liechtenstein",dialCode:"+423",code:"LI"},{name:"Lithuania",dialCode:"+370",code:"LT"},{name:"Luxembourg",dialCode:"+352",code:"LU"},{name:"Macao",dialCode:"+853",code:"MO"},{name:"Macedonia",dialCode:"+389",code:"MK"},{name:"Madagascar",dialCode:"+261",code:"MG"},{name:"Malawi",dialCode:"+265",code:"MW"},{name:"Malaysia",dialCode:"+60",code:"MY"},{name:"Maldives",dialCode:"+960",code:"MV"},{name:"Mali",dialCode:"+223",code:"ML"},{name:"Malta",dialCode:"+356",code:"MT"},{name:"Marshall Islands",dialCode:"+692",code:"MH"},{name:"Martinique",dialCode:"+596",code:"MQ"},{name:"Mauritania",dialCode:"+222",code:"MR"},{name:"Mauritius",dialCode:"+230",code:"MU"},{name:"Mayotte",dialCode:"+262",code:"YT"},{name:"Mexico",dialCode:"+52",code:"MX"},{name:"Micronesia, Federated States of Micronesia",dialCode:"+691",code:"FM"},{name:"Moldova",dialCode:"+373",code:"MD"},{name:"Monaco",dialCode:"+377",code:"MC"},{name:"Mongolia",dialCode:"+976",code:"MN"},{name:"Montenegro",dialCode:"+382",code:"ME"},{name:"Montserrat",dialCode:"+1664",code:"MS"},{name:"Morocco",dialCode:"+212",code:"MA"},{name:"Mozambique",dialCode:"+258",code:"MZ"},{name:"Myanmar",dialCode:"+95",code:"MM"},{name:"Namibia",dialCode:"+264",code:"NA"},{name:"Nauru",dialCode:"+674",code:"NR"},{name:"Nepal",dialCode:"+977",code:"NP"},{name:"Netherlands",dialCode:"+31",code:"NL"},{name:"Netherlands Antilles",dialCode:"+599",code:"AN"},{name:"New Caledonia",dialCode:"+687",code:"NC"},{name:"New Zealand",dialCode:"+64",code:"NZ"},{name:"Nicaragua",dialCode:"+505",code:"NI"},{name:"Niger",dialCode:"+227",code:"NE"},{name:"Nigeria",dialCode:"+234",code:"NG"},{name:"Niue",dialCode:"+683",code:"NU"},{name:"Norfolk Island",dialCode:"+672",code:"NF"},{name:"Northern Mariana Islands",dialCode:"+1670",code:"MP"},{name:"Norway",dialCode:"+47",code:"NO"},{name:"Oman",dialCode:"+968",code:"OM"},{name:"Pakistan",dialCode:"+92",code:"PK"},{name:"Palau",dialCode:"+680",code:"PW"},{name:"Palestinian Territory, Occupied",dialCode:"+970",code:"PS"},{name:"Panama",dialCode:"+507",code:"PA"},{name:"Papua New Guinea",dialCode:"+675",code:"PG"},{name:"Paraguay",dialCode:"+595",code:"PY"},{name:"Peru",dialCode:"+51",code:"PE"},{name:"Philippines",dialCode:"+63",code:"PH"},{name:"Pitcairn",dialCode:"+872",code:"PN"},{name:"Poland",dialCode:"+48",code:"PL"},{name:"Portugal",dialCode:"+351",code:"PT"},{name:"Qatar",dialCode:"+974",code:"QA"},{name:"Romania",dialCode:"+40",code:"RO"},{name:"Russia",dialCode:"+7",code:"RU"},{name:"Rwanda",dialCode:"+250",code:"RW"},{name:"Reunion",dialCode:"+262",code:"RE"},{name:"Saint Barthelemy",dialCode:"+590",code:"BL"},{name:"Saint Helena, Ascension and Tristan Da Cunha",dialCode:"+290",code:"SH"},{name:"Saint Kitts and Nevis",dialCode:"+1869",code:"KN"},{name:"Saint Lucia",dialCode:"+1758",code:"LC"},{name:"Saint Martin",dialCode:"+590",code:"MF"},{name:"Saint Pierre and Miquelon",dialCode:"+508",code:"PM"},{name:"Saint Vincent and the Grenadines",dialCode:"+1784",code:"VC"},{name:"Samoa",dialCode:"+685",code:"WS"},{name:"San Marino",dialCode:"+378",code:"SM"},{name:"Sao Tome and Principe",dialCode:"+239",code:"ST"},{name:"Saudi Arabia",dialCode:"+966",code:"SA"},{name:"Senegal",dialCode:"+221",code:"SN"},{name:"Serbia",dialCode:"+381",code:"RS"},{name:"Seychelles",dialCode:"+248",code:"SC"},{name:"Sierra Leone",dialCode:"+232",code:"SL"},{name:"Singapore",dialCode:"+65",code:"SG"},{name:"Slovakia",dialCode:"+421",code:"SK"},{name:"Slovenia",dialCode:"+386",code:"SI"},{name:"Solomon Islands",dialCode:"+677",code:"SB"},{name:"Somalia",dialCode:"+252",code:"SO"},{name:"South Africa",dialCode:"+27",code:"ZA"},{name:"South Sudan",dialCode:"+211",code:"SS"},{name:"South Georgia and the South Sandwich Islands",dialCode:"+500",code:"GS"},{name:"Spain",dialCode:"+34",code:"ES"},{name:"Sri Lanka",dialCode:"+94",code:"LK"},{name:"Sudan",dialCode:"+249",code:"SD"},{name:"Suriname",dialCode:"+597",code:"SR"},{name:"Svalbard and Jan Mayen",dialCode:"+47",code:"SJ"},{name:"Swaziland",dialCode:"+268",code:"SZ"},{name:"Sweden",dialCode:"+46",code:"SE"},{name:"Switzerland",dialCode:"+41",code:"CH"},{name:"Syrian Arab Republic",dialCode:"+963",code:"SY"},{name:"Taiwan",dialCode:"+886",code:"TW"},{name:"Tajikistan",dialCode:"+992",code:"TJ"},{name:"Tanzania, United Republic of Tanzania",dialCode:"+255",code:"TZ"},{name:"Thailand",dialCode:"+66",code:"TH"},{name:"Timor-Leste",dialCode:"+670",code:"TL"},{name:"Togo",dialCode:"+228",code:"TG"},{name:"Tokelau",dialCode:"+690",code:"TK"},{name:"Tonga",dialCode:"+676",code:"TO"},{name:"Trinidad and Tobago",dialCode:"+1868",code:"TT"},{name:"Tunisia",dialCode:"+216",code:"TN"},{name:"Turkey",dialCode:"+90",code:"TR"},{name:"Turkmenistan",dialCode:"+993",code:"TM"},{name:"Turks and Caicos Islands",dialCode:"+1649",code:"TC"},{name:"Tuvalu",dialCode:"+688",code:"TV"},{name:"Uganda",dialCode:"+256",code:"UG"},{name:"Ukraine",dialCode:"+380",code:"UA"},{name:"United Arab Emirates",dialCode:"+971",code:"AE"},{name:"United Kingdom",dialCode:"+44",code:"GB"},{name:"Uruguay",dialCode:"+598",code:"UY"},{name:"Uzbekistan",dialCode:"+998",code:"UZ"},{name:"Vanuatu",dialCode:"+678",code:"VU"},{name:"Venezuela, Bolivarian Republic of Venezuela",dialCode:"+58",code:"VE"},{name:"Vietnam",dialCode:"+84",code:"VN"},{name:"Virgin Islands, British",dialCode:"+1284",code:"VG"},{name:"Virgin Islands, U.S.",dialCode:"+1340",code:"VI"},{name:"Wallis and Futuna",dialCode:"+681",code:"WF"},{name:"Yemen",dialCode:"+967",code:"YE"},{name:"Zambia",dialCode:"+260",code:"ZM"},{name:"Zimbabwe",dialCode:"+263",code:"ZW"}].sort((e,t)=>e.name<t.name?-1:1)];const Cs=({code:e,dialCode:t,name:o})=>`\n\t<div\n\t\tdata-id="${t}"\n\t\tdata-name="${e} ${t} ${o}"\n\t\tdata-country-code="${e}"\n\t>\n\t\t<div>\n\t\t\t<span>\n\t\t\t\t<img src="${(e=>`https://static.descope.com/npm/svg-country-flags@1.2.10/svg/${e.toLowerCase()}.svg`)(e)}" width="20"/>\n\t\t\t</span>\n\t\t\t<span>${o}</span>\n\t\t</div>\n\t\t<div>\n\t\t\t<span>${e}</span>\n\t\t\t<span>${t}</span>\n\t\t</div>\n\t</div>\n`,ws=Je("phone-field-internal"),Is=["disabled","size","bordered","readonly"],Ss=["country-input-placeholder","default-code","restrict-countries"],Ms=["phone-input-placeholder","maxlength","autocomplete","name","phone-input-type"],As=["label-type","country-input-label","label"],Es={"country-input-label":"label","country-input-placeholder":"placeholder","phone-input-placeholder":"placeholder","phone-input-type":"type"},Ts=[].concat(Is,Ss,Ms,As),ks=co({componentName:ws,baseSelector:"div"});customElements.define(ws,class extends ks{static get observedAttributes(){return[].concat(ks.observedAttributes||[],Ts)}#ge;constructor(){super(),this.innerHTML=`\n <div class="wrapper">\n <descope-combo-box\n item-label-path="data-name"\n item-value-path="data-id"\n >\n ${xs.map(e=>Cs(e)).join("")}\n </descope-combo-box>\n <div class="separator"></div>\n <descope-text-field type="tel"></descope-text-field>\n </div>\n `,this.comboBox=this.querySelector("descope-combo-box"),this.textField=this.querySelector("descope-text-field"),this.inputs=[this.comboBox,this.textField],Xe(this,this.comboBox,{includeAttrs:["label-type"]}),Xe(this,this.textField,{includeAttrs:["label-type","required","phone-input-type"],mapAttrs:{"phone-input-type":"type"}}),this.comboBox.customValueTransformFn=e=>{const[,t]=e?.split?.(" ")||[];return t}}get countryCodeInputData(){return this.comboBox.items}get countryCodeValue(){return this.comboBox.shadowRoot.querySelector("input").value}get phoneNumberInputEle(){return this.textField.shadowRoot.querySelector("input")}get allowAlphanumericInput(){return"true"===this.getAttribute("allow-alphanumeric-input")}get defaultCode(){return this.getAttribute("default-code")}get selectionStart(){return this.textField.selectionStart}get minLength(){return parseInt(this.getAttribute("minlength"),10)||0}get selectedCountryCode(){return this.comboBox?.selectedItem?.getAttribute("data-country-code")}get restrictCountries(){const e=this.getAttribute("restrict-countries");return e?.split(",").filter(Boolean)||[]}get isFormatValue(){return"true"===this.getAttribute("format-value")}get isStrictValidation(){return"true"===this.getAttribute("strict-validation")}get value(){return this.comboBox.value&&this.textField.value?this.allowAlphanumericInput?`${this.comboBox.value}-${this.textField.value}`:`${this.comboBox.value}-${this.textField.value.replace(/\D+/g,"")}`:""}#me(){this.comboBox.selectedItem=void 0,this.textField.value=""}set value(e){if(!e||!/\d/.test(e))return void this.#me();e.startsWith("+")||(e=`+${e}`);let t="",o="";if(e.includes("-")){const i=e.indexOf("-");t=e.slice(0,i),o=e.slice(i+1).replace(/\D+/g,"")}else{const i=(0,p.l)(e);i?.countryCallingCode&&(t=`+${i.countryCallingCode}`,o=e.slice(t.length).replace(/\D+/g,""))}if(!/\d/.test(t))return void this.#me();const i=xs.filter(e=>e.dialCode===t).map(e=>e.code),r=this.selectedCountryCode;if(!i.includes(r)){const e=this.comboBox.items?.find(e=>i.includes(e.getAttribute("data-country-code")));e&&(this.comboBox.selectedItem=e)}this.isFormatValue?this.textField.value=this.#be(o):this.textField.value=o}init(){this.addEventListener("focus",e=>{e.isTrusted&&this.inputs[1].focus()}),super.init?.(),this.#ye()}getValidity(){const e=this.comboBox.value,t=this.textField.value,o=!e||!t,i=t&&t.length>=this.minLength;if(this.isRequired&&o)return{valueMissing:!0};if(this.value){if(!i)return{tooShort:!0};if(this.isStrictValidation&&!this.#fe())return{patternMismatch:!0}}return{}}setSelectionRange(...e){this.textField.setSelectionRange(...e)}attributeChangedCallback(e,t,o){if(super.attributeChangedCallback(e,t,o),t!==o){if("default-code"===e&&o&&!this.selectedCountryCode)this.#ve(o);else if(Ts.includes(e)){const t=Es[e]||e;Is.includes(e)?o?this.inputs.forEach(e=>e.setAttribute(t,o)):this.inputs.forEach(e=>e.removeAttribute(t)):Ss.includes(e)?this.comboBox.setAttribute(t,o):Ms.includes(e)&&this.textField.setAttribute(t,o)}As.includes(e)&&this.#xe(e,o),"restrict-countries"===e&&this.#Ce(this.restrictCountries)}}#ye(){this.textField.addEventListener("input",e=>{if(!this.allowAlphanumericInput){const t=/^\d$/,o=e.target.value.split("").filter(e=>t.test(e)).join("");e.target.value=o}}),this.handleFocusEventsDispatching(this.inputs),this.handleInputEventDispatching()}#be(e=""){return this.#ge&&this.#ge.country===this.selectedCountryCode||(this.#ge=new h.Q(this.selectedCountryCode)),this.#ge.reset(),this.#ge.input(e)||e}#fe(){const e=(0,p.l)(this.value);return!!(e&&e.isValid?.()&&e.country&&this.#we(e.country))}#we(e){return!this.restrictCountries.length||this.restrictCountries.includes(e)}#Ie(e){return this.comboBox.items?.find(t=>t.getAttribute("data-country-code")===e)}#Ce(e){const t=e.length?xs.filter(t=>e.includes(t.code)):xs;this.querySelector("descope-combo-box").innerHTML=t.map(e=>Cs(e)).join("")}#ve(e){if(!this.comboBox.value){const t=this.#Ie(e);t&&setTimeout(()=>{this.comboBox.selectedItem=t})}}#xe(e,t){const o=Es[e]||e;"label-type"===e?this.#Se(t):"floating"===this.getAttribute("label-type")&&("country-input-label"===e?this.comboBox.setAttribute(o,t):"label"===e&&this.textField.setAttribute(o,t))}#Se(e){"floating"===e?(this.comboBox.setAttribute("label",this.getAttribute("country-input-label")||""),this.comboBox.setAttribute("placeholder",this.getAttribute("country-input-placeholder")||""),this.textField.setAttribute("label",this.getAttribute("label")||""),this.textField.setAttribute("placeholder",this.getAttribute("phone-input-placeholder")||"")):this.inputs.forEach(e=>e.removeAttribute("label"))}});const zs=Zr.cssVarList,Ls=xi.cssVarList,Vs=Je("phone-field"),{host:Ns,label:Ds,requiredIndicator:Ps,inputField:Bs,internalAfter:Fs,countryCodeInput:Rs,phoneInput:Ws,separator:Os,errorMessage:js,helperText:$s}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},inputField:{selector:"::part(input-field)"},internalAfter:{selector:"descope-phone-field-internal::after"},phoneInput:{selector:()=>"descope-text-field"},countryCodeInput:{selector:()=>"descope-combo-box"},separator:{selector:"descope-phone-field-internal .separator"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},_s=_e(jt({mappings:{fontSize:[Ns,Bs,{selector:Zr.componentName,property:Zr.cssVarList.fontSize},{selector:xi.componentName,property:xi.cssVarList.fontSize}],fontFamily:[Ds,js,$s,{...Rs,property:xi.cssVarList.overlay.fontFamily}],hostWidth:[{...Ns,property:"width"},{...Ws,property:"width"},{...Rs,property:"--vaadin-combo-box-overlay-width"}],hostDirection:{...Ns,property:"direction"},inputBorderStyle:[{...Fs,property:"border-style"},{...Os,property:"border-left-style"}],inputBorderWidth:[{...Fs,property:"border-width"},{...Os,property:"border-left-width"}],inputBorderColor:[{...Fs,property:"border-color"},{...Os,property:"border-left-color"}],inputBorderRadius:[{...Bs,property:"border-radius"},{...Fs,property:"border-radius"}],countryCodeInputWidth:{...Rs,property:Ls.hostWidth},countryCodeDropdownWidth:{...Rs,property:"--vaadin-combo-box-overlay-width"},phoneInputWidth:{...Ws,property:"width"},horizontalPadding:[{...Ws,property:"padding-left"},{...Ws,property:"padding-right"},{...Rs,property:"padding-left"},{...Rs,property:"padding-right"}],labelFontSize:{...Ds,property:"font-size"},labelFontWeight:{...Ds,property:"font-weight"},inputValueFontWeight:[{...Ws,property:zs.inputValueFontWeight},{...Rs,property:Ls.inputValueFontWeight}],inputPlaceholderFontWeight:{...Ws,property:zs.inputPlaceholderFontWeight},helperTextFontWeight:{...$s,property:"font-weight"},errorMessageFontWeight:{...js,property:"font-weight"},labelTextColor:[{...Ds,property:"color"},{...Ds,property:"-webkit-text-fill-color"},{...Ps,property:"color"}],labelRequiredIndicator:{...Ps,property:"content"},errorMessageTextColor:{...js,property:"color"},errorMessageIcon:{...js,property:"background-image"},errorMessageIconSize:{...js,property:"background-size"},errorMessageIconPadding:{...js,property:"padding-inline-start"},errorMessageIconRepeat:{...js,property:"background-repeat"},errorMessageIconPosition:{...js,property:"background-position"},errorMessageFontSize:{...js,property:"font-size"},inputValueTextColor:[{...Ws,property:zs.inputValueTextColor},{...Rs,property:Ls.inputValueTextColor}],inputPlaceholderTextColor:{...Ws,property:zs.inputPlaceholderColor},overlayItemBackgroundColor:{selector:"descope-combo-box",property:Ls.overlayItemBackgroundColor},inputOutlineStyle:{...Bs,property:"outline-style"},inputOutlineColor:{...Bs,property:"outline-color"},inputOutlineWidth:{...Bs,property:"outline-width"},inputOutlineOffset:{...Bs,property:"outline-offset"},valueInputHeight:[{...Rs,property:Ls.valueInputHeight}],valueInputMarginBottom:[{...Ws,property:zs.valueInputMarginBottom}],marginInlineStart:[{...Ws,property:zs.marginInlineStart},{...Rs,property:Ls.marginInlineStart}]}}),$t,lo,io({proxyProps:["value","selectionStart"]}),e=>class extends e{static get CountryCodes(){return xs}init(){super.init?.();const e=document.createElement("template");e.innerHTML=`\n\t\t\t\t<${ws}\n\t\t\t\t\ttabindex="-1"\n\t\t\t\t\tslot="input"\n\t\t\t\t></${ws}>\n \t\t`,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(ws),Xe(this.shadowRoot.host,this.inputElement,{includeAttrs:["size","bordered","minlength","maxlength","default-code","country-input-placeholder","phone-input-placeholder","disabled","restrict-countries","country-input-label","readonly","label","label-type","allow-alphanumeric-input","format-value","strict-validation","phone-input-type"]})}get countryCodeItems(){return this.inputElement?.countryCodeValue}get phoneNumberInputEle(){return this.inputElement?.phoneNumberInputEle}get countryCodeInputData(){return this.inputElement?.countryCodeInputData}get countryCodes(){return Array.from(this.inputElement.countryCodeInputData).map(e=>e.getAttribute("data-country-code"))}})(Qt({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tmin-width: 15em;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}\n\t\t\t${ut(_s.cssVarList)}\n\t\t\t${bt("vaadin-text-field")}\n\t\t\t${ft("vaadin-text-field")}\n\t\t\t\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n\n\n\t\t\tdiv {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n\t\t\tvaadin-text-field {\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tpadding: 0;\n\t\t\t}\n\t\t\tvaadin-text-field[focus-ring]::part(input-field) {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\t\t\tvaadin-text-field::before {\n\t\t\t\theight: 0;\n\t\t\t}\n\t\t\tvaadin-text-field::part(label) {\n margin-left: 0;\n margin-right: 0;\n }\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tpadding: 0;\n\t\t\t\tbackground: transparent;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\t\t\tdescope-phone-field-internal {\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n direction: ltr;\n position: relative;\n\t\t\t}\n descope-phone-field-internal::after {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n box-sizing: border-box;\n outline-offset: calc(var(${_s.cssVarList.inputBorderWidth}) * -1);\n pointer-events: none;\n }\n\t\t\tdescope-phone-field-internal > div {\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t}\n\t\t\tdescope-phone-field-internal .separator {\n\t\t\t\tflex: 0;\n\t\t\t\tborder: none;\n\t\t\t}\n\n\t\t\tdescope-combo-box {\n\t\t\t\tflex-shrink: 0;\n min-width: 5.75em;\n\t\t\t\t${Ls.inputOutlineWidth}: 0;\n\t\t\t\t${Ls.inputOutlineOffset}: 0;\n\t\t\t\t${Ls.inputBorderWidth}: 0;\n\t\t\t\t${Ls.inputBorderRadius}: 0;\n\t\t\t}\n\t\t\tdescope-text-field {\n\t\t\t\tflex-grow: 1;\n\t\t\t\t${zs.inputOutlineWidth}: 0;\n\t\t\t\t${zs.inputOutlineOffset}: 0;\n\t\t\t\t${zs.inputBorderWidth}: 0;\n\t\t\t\t${zs.inputBorderRadius}: 0;\n }\n\n :host([label-type="floating"]) vaadin-text-field::part(label) {\n display: none;\n }\n descope-text-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n descope-text-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n\n\t\t\tvaadin-text-field::part(input-field)::after {\n\t\t\t\tborder: none;\n\t\t\t}\n ${xt("vaadin-text-field")}\n\t\t`,excludeAttrsSync:["tabindex","style"],componentName:Vs}));customElements.define(Vs,_s);const Hs=Je("phone-field-internal-input-box"),qs=["disabled","size","readonly","phone-input-placeholder","name","maxlength","autocomplete","label-type","phone-input-type"],Ys={"phone-input-placeholder":"placeholder","phone-input-type":"type"},Us=co({componentName:Hs,baseSelector:"div"});customElements.define(Hs,class extends Us{static get observedAttributes(){return[].concat(Us.observedAttributes||[],qs)}#ge;constructor(){super(),this.innerHTML='\n <div>\n <descope-text-field tabindex="1" type="tel" bordered="false"></descope-text-field>\n </div>\n ',this.textField=this.querySelector("descope-text-field")}get phoneNumberInputEle(){return this.textField.shadowRoot.querySelector("input")}get defaultDialCode(){return e=this.getAttribute("default-code"),xs.find(t=>t.code===e)?.dialCode;var e}get defaultCode(){return this.getAttribute("default-code")}get allowAlphanumericInput(){return"true"===this.getAttribute("allow-alphanumeric-input")}get minLength(){return parseInt(this.getAttribute("minlength"),10)||0}get maxLength(){return parseInt(this.getAttribute("maxlength"),10)||50}get restrictCountries(){return this.getAttribute("restrict-countries")?.split(",").filter(Boolean)||[]}get isFormatValue(){return"true"===this.getAttribute("format-value")}get isStrictValidation(){return"true"===this.getAttribute("strict-validation")}get value(){if(!this.textField.value)return"";if(!this.isStrictValidation)return this.#Me();const e=this.#Ae();return e?.country&&e?.countryCallingCode&&e?.nationalNumber?`+${[e?.countryCallingCode,e?.nationalNumber].join("-")}`:this.textField.value}set value(e){this.textField.value=e}init(){this.addEventListener("focus",e=>{e.isTrusted&&this.textField.focus()}),super.init?.(),this.textField.addEventListener("input",this.#Ee.bind(this)),this.handleFocusEventsDispatching([this.textField]),L(this.textField,this,{includeAttrs:["has-value"]}),L(this,this.textField,{includeAttrs:["phone-input-type"],mapAttrs:{"phone-input-type":"type"}})}getValidity(){const e=/^\+?\d{1,4}-?(?:\d-?){1,15}$/,t=this.#Te(this.textField.value||"");if(this.isRequired&&!this.textField.value)return{valueMissing:!0};if(this.textField.value){if(t.length<this.minLength)return{tooShort:!0};if(this.isStrictValidation&&this.textField.value&&!this.#fe()||!this.isStrictValidation&&this.textField.value&&!e.test(this.value))return{patternMismatch:!0}}return{}}setSelectionRange(...e){this.textField.setSelectionRange(...e)}attributeChangedCallback(e,t,o){if(super.attributeChangedCallback(e,t,o),t!==o&&qs.includes(e)){const t=Ys[e]||e;this.textField.setAttribute(t,o)}}#Ee(e){let t=this.#ke(e.target.value);this.isFormatValue&&this.#ze(t)&&(t=this.#Le(t)),e.target.value=t}#Me(){if(!this.defaultDialCode)return this.textField.value;const e=this.#Ve(this.textField.value),t=this.#Te(e);return[this.defaultDialCode,t].join("-")}#Ae(){return this.defaultDialCode?(0,p.l)([this.defaultDialCode,this.#Te(this.textField.value)].filter(Boolean).join("")):(0,p.l)(this.textField.value)}#Te(e){return e.replace(/\D/g,"")}#Ve(e){if("+"===this.textField.value?.[0]){const t=new RegExp(`^\\${this.defaultDialCode}`);return e.replace(t,"")}return e}#fe(){const e=(0,p.l)(this.value);return!(!e||!e.isValid?.()||!e.country||!this.#we(e.country)||this.defaultCode&&this.defaultCode!==e.country)}#we(e){return!this.restrictCountries.length||this.restrictCountries.includes(e)}#ke(e){if(e=e.replace(/^-+/,"").replace(/(?!^)\+/g,"").replace("--","-").replace("+-","+"),!this.allowAlphanumericInput){const t=/^[+\d-\(\)]+$/;e=e.split("").filter(e=>t.test(e)).join("")}return e}#Le(e=""){const t=this.defaultCode||this.#Ne(e);return t?(this.#ge&&this.#ge.country===t||(this.#ge=new h.Q(t)),this.#ge.reset(),this.#ge.input(e)||e):e}#Ne(e){const t=(0,p.l)(e);return t?.country||""}#ze(e){return!!(e=>{const t=e.match(/\(/g),o=e.match(/\)/g);return t?.length===o?.length})(e)}});const Gs=Zr.cssVarList,Zs=Je("phone-input-box-field"),{host:Qs,label:Js,inputElement:Ks,requiredIndicator:Xs,inputField:ea,internalComponent:ta,internalComponentAfter:oa,phoneInput:ia,errorMessage:ra,helperText:na}={host:{selector:()=>":host"},label:{selector:"::part(label)"},inputElement:{selector:"input"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},inputField:{selector:()=>"vaadin-text-field::part(input-field)"},internalComponent:{selector:"descope-phone-field-internal-input-box"},internalComponentAfter:{selector:"descope-phone-field-internal-input-box::after"},phoneInput:{selector:()=>"descope-text-field"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},sa=_e(jt({mappings:{fontSize:[Qs,ea,{selector:Zr.componentName,property:Zr.cssVarList.fontSize}],fontFamily:[Js,ra,na],hostWidth:{...Qs,property:"width"},hostMinWidth:{...Qs,property:"min-width"},hostDirection:{...Qs,property:"direction"},inputHorizontalPadding:[{...ia,property:"padding-left"},{...ia,property:"padding-right"}],labelFontSize:{...Js,property:"font-size"},labelFontWeight:{...Js,property:"font-weight"},inputValueFontWeight:{...ia,property:Gs.inputValueFontWeight},inputPlaceholderFontWeight:{...ia,property:Gs.inputPlaceholderFontWeight},helperTextFontWeight:{...na,property:"font-weight"},errorMessageFontWeight:{...ra,property:"font-weight"},labelTextColor:[{...Js,property:"color"},{...Js,property:"-webkit-text-fill-color"},{...Xs,property:"color"}],labelRequiredIndicator:{...Xs,property:"content"},errorMessageTextColor:{...ra,property:"color"},errorMessageIcon:{...ra,property:"background-image"},errorMessageIconSize:{...ra,property:"background-size"},errorMessageIconPadding:{...ra,property:"padding-inline-start"},errorMessageIconRepeat:{...ra,property:"background-repeat"},errorMessageIconPosition:{...ra,property:"background-position"},errorMessageFontSize:{...ra,property:"font-size"},inputValueTextColor:{...ia,property:Gs.inputValueTextColor},inputPlaceholderTextColor:{...ia,property:Gs.inputPlaceholderColor},inputBorderStyle:{...oa,property:"border-style"},inputBorderWidth:{...oa,property:"border-width"},inputBorderColor:{...oa,property:"border-color"},inputBorderRadius:[{...ta,property:"border-radius"},{...oa,property:"border-radius"}],inputOutlineStyle:{...ta,property:"outline-style"},inputOutlineColor:{...ta,property:"outline-color"},inputOutlineWidth:{...ta,property:"outline-width"},inputOutlineOffset:{...ta,property:"outline-offset"},labelPosition:{...Js,property:"position"},labelTopPosition:{...Js,property:"top"},labelHorizontalPosition:[{...Js,property:"left"},{...Js,property:"right"}],inputTransformY:{...Js,property:"transform"},inputTransition:{...Js,property:"transition"},marginInlineStart:{...Js,property:"margin-inline-start"},valueInputHeight:{...Ks,property:"height"},valueInputMarginBottom:{selector:Zr.componentName,property:Gs.valueInputMarginBottom}}}),$t,lo,io({proxyProps:["value","selectionStart"]}),e=>class extends e{static get CountryCodes(){return xs}init(){super.init?.();const e=document.createElement("template");e.innerHTML=`\n\t\t\t\t<${Hs}\n\t\t\t\t\ttabindex="-1"\n\t\t\t\t\tslot="input"\n\t\t\t\t></${Hs}>\n `,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(Hs),T(this,this.inputElement,{includeAttrs:["has-value"]}),Xe(this.shadowRoot.host,this.inputElement,{includeAttrs:["size","minlength","maxlength","default-code","disabled","phone-input-placeholder","label","label-type","allow-alphanumeric-input","restrict-countries","format-value","strict-validation","data-errormessage-type-mismatch","phone-input-type"]})}get phoneNumberInputEle(){return this.inputElement?.phoneNumberInputEle}})(Qt({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n :host {\n display: inline-flex;\n max-width: 100%;\n box-sizing: border-box;\n }\n ${ut(sa.cssVarList)}\n ${bt("vaadin-text-field")}\n ${ft("vaadin-text-field")}\n \n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n\n\n vaadin-text-field {\n width: 100%;\n box-sizing: border-box;\n padding: 0;\n }\n vaadin-text-field[focus-ring]::part(input-field) {\n box-shadow: none;\n }\n vaadin-text-field::before {\n height: 0;\n }\n vaadin-text-field::part(input-field) {\n padding: 0;\n background: transparent;\n -webkit-mask-image: none;\n }\n descope-phone-field-internal-input-box {\n -webkit-mask-image: none;\n padding: 0;\n width: 100%;\n }\n descope-phone-field-internal-input-box > div {\n width: 100%;\n }\n descope-phone-field-internal-input-box descope-text-field {\n ${Gs.inputOutlineWidth}: 0;\n ${Gs.inputOutlineOffset}: 0;\n }\n descope-phone-field-internal-input-box::after {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n box-sizing: border-box;\n pointer-events: none;\n }\n descope-text-field {\n flex-grow: 1;\n width: 100%;\n direction: ltr;\n }\n vaadin-text-field[readonly] > input:placeholder-shown {\n opacity: 1;\n }\n vaadin-text-field::part(input-field)::after {\n border: none;\n }\n\n vaadin-text-field[label-type="floating"]:not([focused])[readonly] input:placeholder-shown {\n opacity: 0;\n }\n vaadin-text-field[label-type="floating"]:not([focused])[disabled] input:placeholder-shown {\n opacity: 0;\n }\n\n ${xt("vaadin-text-field")}\n \n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n \n\t\t`,excludeAttrsSync:["tabindex","style"],componentName:Zs}));customElements.define(Zs,sa);const aa=Je("new-password-internal"),la=(e,t)=>e.replace(/{{(\w+)+}}/g,(e,o)=>t?.[o]||e),da=Je("policy-validation"),ca=["data","active-policies","overrides","data-password-policy-value-minlength","data-password-policy-value-passwordstrength","data-password-policy-actual-passwordstrength","data-password-policy-value-disallowedchars","data-password-policy-value-email"],pa=["label","value",...ca];class ha extends(Gt({componentName:da,baseSelector:":host > div"})){#De;#Pe=[];#Be;static get observedAttributes(){return pa}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div>\n <div class="label"></div>\n <ul></ul>\n </div>\n\t\t',V("\n :host > div {\n width: 100%;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n }\n .label {\n max-width: 100%;\n text-wrap: wrap;\n overflow-wrap: break-word;\n }\n .hide-label .label {\n display: none;\n }\n ul {\n display: flex;\n flex-direction: column;\n padding: 0;\n margin: 0;\n }\n ul, li {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n li::before {\n display: inline-block;\n width: 1em;\n text-align: center;\n }\n ",this),this.panel=this.shadowRoot.querySelector(":host > div"),this.label=this.shadowRoot.querySelector(".label"),this.list=this.shadowRoot.querySelector("ul")}attributeChangedCallback(e,t,o){if(super.attributeChangedCallback?.(e,t,o),t!==o){if("label"===e&&this.updateLabel(o),ca.includes(e)){if("data"===e)try{this.availablePolicies=JSON.parse(o)}catch{console.error("Failed to set available policies")}if("active-policies"===e&&(this.#Pe=(o||"").split(",")),"data-password-policy-value-minlength"===e){const e=Number(o);!Number.isNaN(e)&&e>0&&(this.#Be={...this.#Be,minlength:{value:`${e}`}})}if("data-password-policy-value-passwordstrength"===e){const e=parseInt(o);!Number.isNaN(e)&&e>=0&&(this.#Be={...this.#Be,passwordstrength:{...this.#Be?.passwordstrength,expected:e}})}if("data-password-policy-actual-passwordstrength"===e){const e=Number(o);!Number.isNaN(e)&&e>=0&&(this.#Be={...this.#Be,passwordstrength:{...this.#Be?.passwordstrength,actual:e}})}if("data-password-policy-value-disallowedchars"===e)if(o)this.#Be={...this.#Be,disallowedchars:{...this.#Be?.disallowedchars,value:o}};else if(this.#Be?.disallowedchars){const{disallowedchars:e,...t}=this.#Be;this.#Be=t}if("data-password-policy-value-email"===e)if(o)this.#Be={...this.#Be,disallowemail:{...this.#Be?.disallowemail,expected:o}};else if(this.#Be?.disallowemail){const{disallowemail:e,...t}=this.#Be;this.#Be=t}}this.renderItems(this.#De,this.#Pe,this.#Be)}}get availablePolicies(){return this.#De||[]}set availablePolicies(e){this.#De=e}get value(){return this.getAttribute("value")||""}getStrengthScore(){return this.value.length}compareValues(e,t,o){switch(e.toUpperCase()){case"GTE":return o>=t;case"GT":return o>t;case"LTE":return o<=t;case"LT":return o<t;case"EQ":return o===t;case"NEQ":return o!==t;default:throw new Error(`Invalid comparison type: ${e}`)}}validate(){let e=this.#De;return this.#Be&&(e=this.#De.map(e=>{const t=this.#Be[e.id];return t?{...e,data:t}:e})),this.#Pe.reduce((t,o)=>{const i=e.find(e=>e.id===o);if(!i)return t;const{pattern:r,message:n,data:s,compare:a}=i,l="string"==typeof a?a.toUpperCase():a;if(!r&&!a||!n)return t;const d={message:la(n,s),id:o};if(r){const e=new RegExp(la(r,s));d.valid=e.test(this.value)}else if("STR_NEQ_CI"===l){const e=(s?.expected??"").toLowerCase(),t=(this.value??"").toLowerCase();if(e&&t){const o=e.indexOf("@"),i=o>0?e.slice(0,o):e;d.valid=t!==e&&t!==i}else d.valid=!0}else a&&(d.valid=this.compareValues(l,s?.expected??-1,s?.actual??-1));return t.push(d),t},[])}get isValid(){return!this.validate().some(({valid:e})=>!1===e)}buildValidationItem({valid:e,message:t}){const o=this.value?e:"none",i=document.createElement("li");i.className="item",i.dataset.valid=o;const r=document.createElement("span");return r.className="message",r.textContent=t??"",i.appendChild(r),i}renderItems(e,t){e&&t.length&&this.list.replaceChildren(...this.validate().map(this.buildValidationItem.bind(this)))}updateLabel(e){e?(this.label.textContent=e,this.classList.remove("hide-label")):(this.classList.add("hide-label"),this.label.textContent="")}}const{host:ua,item:ga,symbolDefault:ma,symbolSuccess:ba,symbolError:ya}={host:{selector:()=>":host > div"},item:{selector:()=>".item"},symbolDefault:{selector:()=>'.item[data-valid="none"]::before'},symbolSuccess:{selector:()=>'.item[data-valid="true"]::before'},symbolError:{selector:()=>'.item[data-valid="false"]::before'}},fa=_e(jt({componentNameOverride:Je("input-wrapper")}),jt({mappings:{hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},fontFamily:{},padding:{},borderWidth:{...ua,property:"border-width"},borderStyle:{...ua,property:"border-style"},borderColor:{...ua,property:"border-color"},borderRadius:{...ua,property:"border-radius"},backgroundColor:{...ua,property:"background-color"},textColor:{property:"color"},labelMargin:{...ua,property:"gap"},itemsSpacing:{...ga,property:"line-height"},itemSymbolSuccessColor:{...ba,property:"color"},itemSymbolErrorColor:{...ya,property:"color"},itemSymbolDefault:{...ma,property:"content"},itemSymbolSuccess:{...ba,property:"content"},itemSymbolError:{...ya,property:"content"}}}),$t,_t)(ha),va=Je("new-password"),xa=fa.cssVarList,{host:Ca,label:wa,internalInputsWrapper:Ia,errorMessage:Sa,helperText:Ma,passwordInput:Aa,policyPreview:Ea}={host:{selector:()=>":host"},label:{selector:"::part(label)"},internalInputsWrapper:{selector:"descope-new-password-internal .wrapper"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},passwordInput:{selector:"descope-password"},policyPreview:{selector:"descope-policy-validation"}},Ta=_e(jt({mappings:{fontSize:[Ca,{},{selector:ds.componentName,property:ds.cssVarList.fontSize}],fontFamily:[wa,Sa,Ma],labelFontSize:{...wa,property:"font-size"},labelFontWeight:{...wa,property:"font-weight"},inputValueFontWeight:{...Aa,property:ds.cssVarList.inputValueFontWeight},inputPlaceholderFontWeight:{...Aa,property:ds.cssVarList.inputPlaceholderFontWeight},helperTextFontWeight:{...Ma,property:"font-weight"},errorMessageFontWeight:{...Sa,property:"font-weight"},labelTextColor:{...wa,property:"color"},errorMessageTextColor:{...Sa,property:"color"},errorMessageIcon:{...Sa,property:"background-image"},errorMessageIconSize:{...Sa,property:"background-size"},errorMessageIconPadding:{...Sa,property:"padding-inline-start"},errorMessageIconRepeat:{...Sa,property:"background-repeat"},errorMessageIconPosition:{...Sa,property:"background-position"},errorMessageFontSize:{...Sa,property:"font-size"},hostWidth:{...Ca,property:"width"},hostMinWidth:{...Ca,property:"min-width"},hostDirection:[{...Ca,property:"direction"},{...Aa,property:ds.cssVarList.hostDirection}],inputsRequiredIndicator:{...Ca,property:"content"},spaceBetweenInputs:{...Ia,property:"gap"},policyPreviewBackgroundColor:{...Ea,property:xa.backgroundColor},policyPreviewPadding:{...Ea,property:xa.padding},valueInputHeight:{...Aa,property:ds.cssVarList.valueInputHeight},valueInputMarginBottom:{...Aa,property:ds.cssVarList.valueInputMarginBottom}}}),$t,io({proxyProps:["value","selectionStart"]}),e=>class extends e{init(){super.init?.();const e=document.createElement("template"),t=this.getAttribute("external-input");e.innerHTML=`\n\t\t\t<${aa}\n\t\t\t\tname="new-password"\n\t\t\t\ttabindex="-1"\n\t\t\t\tslot="input"\n external-input="${t}"\n\t\t\t>\n </${aa}>\n\t\t\t`,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(aa),"true"===this.getAttribute("external-input")&&this.initExternalInput(),Xe(this,this.inputElement,{includeAttrs:["password-label","password-placeholder","confirm-label","confirm-placeholder","full-width","size","bordered","label","has-confirm","invalid","readonly","disabled","draggable","has-validation","policy-label","active-policies","available-policies","data-password-policy-value-minlength","data-password-policy-value-passwordstrength","data-password-policy-value-disallowedchars","data-password-policy-value-email","label-type","manual-visibility-toggle"]})}createSlottedExternalInput(e,t){const o=e.querySelector("input"),i=document.createElement("slot"),r=o.getAttribute("slot");i.setAttribute("name",t),i.setAttribute("slot",r),e.appendChild(i),o.setAttribute("slot",t),o.setAttribute("name",this.getAttribute("name")),o.setAttribute("data-hidden-input","true"),this.appendChild(o)}initExternalInput(){this.passwordInput=this.inputElement.querySelector('[data-id="password"]'),this.confirmInput=this.inputElement.querySelector('[data-id="confirm"]'),this.createSlottedExternalInput(this.passwordInput,"external-password-input"),this.createSlottedExternalInput(this.confirmInput,"external-confirm-input")}})(Qt({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t:host {\n\t\t\tdisplay: inline-block;\n\t\t\tmax-width: 100%;\n\t\t\tbox-sizing: border-box;\n\t\t}\n :host ::part(error-message) {\n direction: ltr;\n }\n\t\t${ut(ds.cssVarList)}\n\t\tvaadin-text-field {\n\t\t\tpadding: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t}\n\t\tvaadin-text-field::part(input-field) {\n\t\t\tmin-height: 0;\n\t\t\tbackground: transparent;\n\t\t\tbox-shadow: none;\n\t\t\tpadding: 0;\n\t\t}\n\t\tvaadin-text-field::part(input-field)::after {\n\t\t\tbackground: transparent;\n\t\t\topacity: 0;\n\t\t}\n\t\tdescope-new-password-internal {\n\t\t\t-webkit-mask-image: none;\n\t\t\tmin-height: 0;\n\t\t\twidth: 100%;\n\t\t\tpadding: 0;\n\t\t}\n\t\tdescope-new-password-internal > .wrapper {\n -webkit-mask-image: none;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t}\n\t\tdescope-password {\n\t\t\tdisplay: block;\n\t\t\twidth: 100%;\n\t\t}\n\t\tdescope-new-password-internal vaadin-password-field::before {\n\t\t\theight: initial;\n\t\t}\n descope-policy-validation {\n margin-top: 8px;\n display: flex;\n }\n .hidden {\n display: none;\n }\n\t\t`,excludeAttrsSync:["tabindex","style"],componentName:va}));customElements.define(da,fa);const ka=/^password-/,za=/^confirm-/,La=(e,t)=>e.replace(t,""),Va=["password-label","password-placeholder"],Na=["confirm-label","confirm-placeholder"],Da=["has-validation","policy-label","available-policies","active-policies","data-password-policy-value-minlength","data-password-policy-value-passwordstrength","data-password-policy-value-disallowedchars","data-password-policy-value-email","manual-visibility-toggle"],Pa=["has-confirm","disabled","bordered","size","full-width","maxlength","invalid","readonly","draggable","autocomplete","label-type","manual-visibility-toggle"],Ba=[].concat(Pa,Va,Na,Da),Fa=co({componentName:aa,baseSelector:"div"});customElements.define(aa,class extends Fa{static get observedAttributes(){return[].concat(Fa.observedAttributes||[],Ba)}constructor(){super(),this.innerHTML='\n\t\t\t<div class="wrapper"></div>\n\t\t',this.wrapperEle=this.querySelector(".wrapper")}get value(){return this.passwordInput?.value||""}set value(e){e!==this.value&&(this.passwordInput.value=e)}get hasConfirm(){return"true"===this.getAttribute("has-confirm")}onHasConfirmChange(e){this.confirmInput.classList.toggle("hidden",!e)}onHasValidationChange(e){this.policyPanel.classList.toggle("hidden",!e)}get hasValidation(){return"true"===this.getAttribute("has-validation")}getValidity(){if(this.isRequired&&!this.value)return{valueMissing:!0};if(this.value&&!this.policyPanel.isValid)return{typeMismatch:!0};if(this.hasConfirm&&this.confirmInput&&this.value!==this.confirmInput.value)return{patternMismatch:!0};const e=this.getAttribute("minlength"),t=parseInt(e,10)||0;return this.value.length>=t?{}:{tooShort:!0}}init(){this.addEventListener("focus",e=>{e.isTrusted&&this.passwordInput.focus()}),super.init?.(),this.renderInputs(this.hasConfirm,this.hasValidation)}renderInputs(){const e="true"===this.getAttribute("external-input"),t=`\n <div class="password-input-container">\n <descope-password\n autocomplete="new-password"\n manual-visibility-toggle="true"\n data-id="password"\n external-input="${e}"\n ></descope-password>\n <descope-policy-validation></descope-policy-validation>\n </div>\n <descope-password\n autocomplete="new-password"\n manual-visibility-toggle="true"\n external-input="${e}"\n data-id="confirm"\n ></descope-password>\n `;this.wrapperEle.innerHTML=t,this.passwordInput=this.querySelector('[data-id="password"]'),this.confirmInput=this.querySelector('[data-id="confirm"]'),this.policyPanel=this.querySelector("descope-policy-validation"),this.passwordStrength=this.querySelector("descope-password-strength"),this.inputs=[this.passwordInput,this.confirmInput],this.initInputs(),this.passwordInput.addEventListener("input",e=>{this.passwordStrength?.addEventListener("score-changed",({detail:e})=>{this.policyPanel.setAttribute("data-password-policy-actual-passwordstrength",e)},{once:!0}),this.passwordStrength?.setAttribute("value",e.target.value),this.policyPanel.setAttribute("value",e.target.value)}),Xe(this,this.policyPanel,{includeAttrs:Da,mapAttrs:{"policy-label":"label","available-policies":"data"}})}handleIndicatorStyle(){this.inputs.forEach(e=>{V(`\n\t\t\t\t:host ::part(required-indicator)::after {\n\t\t\t\t\tcontent: var(${Ta.cssVarList.inputsRequiredIndicator});\n width: 1em;\n text-align: center;\n\t\t\t\t}\n :host ::part(required-indicator) {\n display: inline-flex;\n }\n\t\t\t\t`,e)})}get isInvalid(){return this.hasAttribute("invalid")&&"false"!==this.getAttribute("invalid")}handleInputsInvalidAttribute(){this.inputs.forEach(e=>{e&&Ue(e,t=>{if(t.includes("invalid")){const t=e.getAttribute("invalid"),o=this.getAttribute("invalid");this.isInvalid&&o!==t&&e.setAttribute("invalid","true")}},{})})}initInputs(){this.handleIndicatorStyle(),this.handleInputsInvalidAttribute(),this.handleFocusEventsDispatching(this.inputs)}async togglePasswordStrength(){this.activePolicies.includes("passwordstrength")?this.passwordStrength||(await Promise.resolve().then(function(){return qx}),this.passwordStrength=document.createElement("descope-password-strength"),this.passwordStrength.setAttribute("options","Very weak,Weak,Average,Strong,Very strong"),this.passwordStrength.setAttribute("value",this.passwordInput.value||""),this.passwordStrength.setAttribute("st-host-direction",this.getAttribute("st-host-direction")),this.passwordStrength.setAttribute("full-width","true"),this.querySelector(".password-input-container").insertBefore(this.passwordStrength,this.policyPanel)):this.passwordStrength&&(this.passwordStrength.remove(),this.passwordStrength=null)}get activePolicies(){return(this.getAttribute("active-policies")||"").split(",")}toggleBooleanAttribute(e,t,o){null===o?e?.removeAttribute(t):e?.setAttribute(t,o)}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),t!==o&&("has-validation"===e?this.onHasValidationChange("true"===o):"has-confirm"===e?this.onHasConfirmChange("true"===o):Pa.includes(e)?this.inputs.forEach(t=>this.toggleBooleanAttribute(t,e,o)):Va.includes(e)?this.toggleBooleanAttribute(this.passwordInput,La(e,ka),o):Na.includes(e)&&this.toggleBooleanAttribute(this.confirmInput,La(e,za),o),"active-policies"===e&&this.togglePasswordStrength())}}),customElements.define(va,Ta);const Ra=Je("recaptcha"),Wa=["enabled","site-key","action","enterprise","variant"],Oa=Gt({componentName:Ra,baseSelector:":host > div"}),ja=_e($t)(class extends Oa{static get observedAttributes(){return Wa.concat(Oa.observedAttributes||[])}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),t!==o&&("enabled"===e&&this.#Fe("true"===o),"variant"===e&&this.updatePreview())}renderRecaptcha(e){this.children.length?this.updatePreview():this.toggleRecaptchaEles(e)}displayRecaptcha(){this.isWidget?this.displayWidget():this.displayDeprecated()}displayWidget(){this.mockRecaptchaEle.style.display="none",this.recaptchaWidgetEle.style.display="",this.depercatedRecaptchaEle.style.display="none"}hideRecaptcha(){this.recaptchaWidgetEle.style.display="none",this.depercatedRecaptchaEle.style.display="none",this.mockRecaptchaEle.style.display=""}displayDeprecated(){this.mockRecaptchaEle.style.display="none",this.recaptchaWidgetEle.style.display="none",this.depercatedRecaptchaEle.style.display=""}toggleRecaptchaEles(e){e?this.displayRecaptcha():this.hideRecaptcha()}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="badge">\n <span id="recaptcha"></span>\n <span id="recaptcha-widget"></span>\n <input id="recaptcha-widget-input" type="hidden" name="recaptcha-widget" required />\n <img src="https://imgs.descope.com/connectors/templates/recaptcha/recaptcha-big.png" alt="recaptcha"/>\n </div>\n <slot></slot>\n\t',V('\n :host {\n display: inline-flex;\n }\n :host > div:not(.hidden) {\n display: flex;\n }\n :host #recaptcha .grecaptcha-badge {\n box-shadow: none !important;\n }\n :host #recaptcha .grecaptcha-logo {\n height: 100%;\n }\n :host #recaptcha {\n\t\t\t\twidth: 100%;\n height: 100%;\n\t\t\t}\n :host #recaptcha-widget {\n width: 100%;\n height: 100%;\n }\n :host #recaptcha-widget-input {\n display: none;\n }\n :host img {\n width: 256px;\n }\n :host([full-width="true"]) {\n width: 100%;\n }\n .hidden {\n display: none;\n }\n ',this),this.depercatedRecaptchaEle=this.baseElement.querySelector("#recaptcha"),this.recaptchaWidgetEle=this.baseElement.querySelector("#recaptcha-widget"),this.recaptchaWidgetInputEle=this.baseElement.querySelector("#recaptcha-widget-input"),this.mockRecaptchaEle=this.baseElement.querySelector("img"),this.badge=this.shadowRoot.querySelector(".badge")}init(){super.init?.(),Ge(this,this.updatePreview.bind(this))}updatePreview(){this.children.length?(this.depercatedRecaptchaEle.style.display="none",this.recaptchaWidgetEle.style.display="none",this.mockRecaptchaEle.style.display="none",this.badge.classList.add("hidden")):(this.toggleRecaptchaEles(this.enabled),this.badge.classList.remove("hidden"))}getValidity(){return this.isWidget?this.recaptchaWidgetInputEle.value?{}:{valueMissing:!0}:{}}checkValidity(){return!this.isWidget||!!this.recaptchaWidgetInputEle.value}get enterprise(){return"true"===this.getAttribute("enterprise")}get siteKey(){return this.getAttribute("site-key")}get action(){return this.getAttribute("action")||"load"}get enabled(){return"true"===this.getAttribute("enabled")}get variant(){return this.getAttribute("variant")||"text"}get isWidget(){return"widget"===this.variant}get scriptURL(){const e=new URL("https://www.google.com/recaptcha/");return e.pathname+=(this.enterprise?"enterprise":"api")+".js",e.searchParams.append("onload","onRecaptchaLoadCallback"),e.searchParams.append("render","explicit"),e.toString()}#Fe(e){this.renderRecaptcha(e),this.isWidget||e&&(this.#Re(),document.getElementById("recaptcha-script")?window.onRecaptchaLoadCallback():this.#We())}#We(){const e=document.createElement("script");e.src=this.scriptURL,e.async=!0,e.id="recaptcha-script",e.defer=!0,document.body.appendChild(e)}get grecaptchaInstance(){return this.enterprise?window.grecaptcha?.enterprise:window.grecaptcha}#Oe(e,t,o){this.isConnected&&e.ready(()=>{const i=t.querySelector('textarea[name^="g-recaptcha-response"]')?.cloneNode();if(i&&(i.style.display="none",document.body.appendChild(i)),!this.siteKey)return;const r=e?.execute(o,{action:this.action});r.then((r,n)=>{n?console.warn("could not execute recaptcha",n):(this.updateComponentsContext({risktoken:r,riskaction:this.action}),this.isConnected&&setTimeout(()=>{this.#Oe(e,t,o)},11e4)),i.remove()})})}#Re(){window.onRecaptchaLoadCallback=()=>{const e=this.depercatedRecaptchaEle;if(e.hasChildNodes())return;const{grecaptchaInstance:t}=this;t&&setTimeout(()=>{const o=t.render(e,{sitekey:this.siteKey,badge:"inline",size:"invisible"});this.#Oe(t,e,o)},0)}}});customElements.define(Ra,ja);const $a=Je("upload-file"),_a=["title","description","button-label","accept","readonly","button-mode","button-variant","required","size","icon"],Ha=co({componentName:$a,baseSelector:":host > div"}),qa=Ni.cssVarList,{host:Ya,wrapper:Ua,icon:Ga,title:Za,description:Qa,requiredIndicator:Ja}={host:{selector:()=>":host"},wrapper:{selector:()=>":host > div"},icon:{selector:()=>"::slotted(*)"},title:{selector:()=>".title"},description:{selector:()=>".description"},requiredIndicator:{selector:()=>".title::after"}},Ka=_e(jt({componentNameOverride:Je("input-wrapper")}),jt({mappings:{fontSize:{},fontFamily:{},borderColor:{},borderWidth:{},borderStyle:{},borderRadius:{},hostHeight:{...Ya,property:"height"},hostWidth:{...Ya,property:"width"},hostPadding:{property:"padding"},hostDirection:[{...Ya,property:"direction"},{selector:()=>Ni.componentName,property:qa.hostDirection}],gap:{...Ua},lineHeight:{...Ua,property:"line-height"},titleFontSize:{...Za,property:"font-size"},titleFontWeight:{...Za,property:"font-weight"},descriptionFontSize:{...Qa,property:"font-size"},labelTextColor:[{...Za,property:"color"},{...Qa,property:"color"}],iconSize:{...Ga,property:"width"},requiredIndicator:{...Ja,property:"content"}}}),$t,_t)(class extends Ha{static get observedAttributes(){return _a.concat(Ha.observedAttributes||[])}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n\t\t\t<div>\n <slot name="icon"></slot>\n\t\t\t\t<div class="title">\n\t\t\t\t\t<span class="title-text"></span>\n\t\t\t\t</div>\n\t\t\t\t<div class="description"></div>\n\t\t\t\t<div class="button-wrapper">\n\t\t\t\t\t<input type="file" tabindex="-1" aria-labelledby="button"/>\n\t\t\t\t\t<descope-button id="button"></descope-button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t',V("\n :host {\n\t\t\t\tdisplay: flex;\n\t\t\t}\n\t\t\t:host > div {\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t\ttext-align: center;\n\t\t\t\tflex-direction: column;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\t\t\t.button-wrapper {\n\t\t\t\tposition: relative;\n\t\t\t\twidth: fit-content;\n\t\t\t}\n\t\t\tinput {\n\t\t\t\tposition: absolute;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\topacity: 0;\n\t\t\t}\n ",this),this.wrapperEle=this.shadowRoot.querySelector(".wrapper"),this.inputElement=this.shadowRoot.querySelector("input"),this.button.onclick=()=>this.inputElement.click(),this.inputElement.onchange=async e=>{const t=e.target.files;var o;t.length&&(this.value=await(o=t[0],new Promise(e=>{const t=new FileReader;t.onload=t=>e(t.target.result),t.readAsDataURL(o)})),this.updateDescription((e=>e.name.replace(/^.*\\/,""))(t[0])))},this.oninvalid=()=>{this.setAttribute("invalid","true")}}getValidity(){return this.isRequired&&!this.input.value?{valueMissing:!0}:(this.removeAttribute("invalid"),{})}initInputs(){this.rootElement.querySelector("descope-button").onclick=()=>this.inputElement.click()}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),t!==o&&("title"===e?this.updateTitle(o):"description"===e?this.updateDescription(o):"button-label"===e?this.updateButtonLabel(o):"button-mode"===e?this.updateButtonMode(o):"button-variant"===e?this.updateButtonVariant(o):"size"===e?this.updateButtonSize(o):"accept"===e?this.updateInputAccept(o):"readonly"===e&&this.updateReadOnly(o))}get button(){return this.shadowRoot.querySelector("descope-button")}get input(){return this.shadowRoot.querySelector("input")}get title(){return this.shadowRoot.querySelector(".title-text")}get description(){return this.shadowRoot.querySelector(".description")}get icon(){return this.shadowRoot.querySelector(".icon")}updateTitle(e){this.title.textContent=e}updateDescription(e){this.description.textContent=e}updateButtonLabel(e){this.button.textContent=e}updateButtonSize(e){this.button.setAttribute("size",e)}updateButtonMode(e){this.button.setAttribute("mode",e)}updateButtonVariant(e){this.button.setAttribute("variant",e)}updateInputAccept(e){this.input.setAttribute("accept",e)}updateReadOnly(e){"true"===e?this.input.setAttribute("disabled","true"):this.input.removeAttribute("disabled")}});customElements.define($a,Ka);const Xa=e=>{class t extends(co({componentName:e,baseSelector:"slot"})){constructor(){super(),this.innerHTML='\n <slot part="wrapper"></slot>\n '}dispatchChange=Zt.bind(this,"change");get items(){return this.querySelector("slot").assignedElements()}get isReadonly(){return"true"===this.getAttribute("readonly")}get size(){return this.getAttribute("size")||"md"}get value(){console.warn("get value","is not implemented")}set value(e){console.warn("set value","is not implemented")}onSizeChange(){this.items.forEach(e=>{e.setAttribute("size",this.size)})}onReadOnlyChange(){this.querySelector("slot").toggleAttribute("inert",this.isReadonly)}getValidity(){console.warn("getValidity","is not implemented")}onObservedAttributeChange(e){e.forEach(e=>{switch(e){case"size":this.onSizeChange();break;case"readonly":this.onReadOnlyChange()}})}init(){this.addEventListener("focus",e=>{e.isTrusted&&this.items[0]?.focus()}),super.init?.(),Ue(this,this.onObservedAttributeChange.bind(this),{includeAttrs:["size","readonly"]})}}return t},el=Je("button-selection-group-internal");class tl extends(Xa(el)){getSelectedNode(){return this.items.find(e=>e.hasAttribute("selected"))}get allowDeselect(){return"true"===this.getAttribute("allow-deselect")}removeSelected(){this.getSelectedNode()?.removeAttribute("selected")}onClick(e){e.target!==e.currentTarget&&(e.target===this.getSelectedNode()&&this.allowDeselect?this.removeSelected():this.setSelected(e.target),this.dispatchChange())}setSelected(e){e!==this.getSelectedNode()&&(this.removeSelected(),e?.setAttribute("selected","true"))}get defaultValue(){return this.getAttribute("default-value")}setDefaultValue(){setTimeout(()=>{this.defaultValue&&(this.value=this.defaultValue,this.setCustomValidity())})}get value(){return this.getSelectedNode()?.value||""}set value(e){const t=this.items.find(t=>t.value===e);this.setSelected(t)}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:{}}init(){super.init(),this.setDefaultValue(),this.querySelector("slot").addEventListener("click",this.onClick.bind(this))}}const ol=e=>class extends e{#K=({value:e,label:t})=>`<descope-button-selection-group-item value="${e}">${t}</descope-button-selection-group-item>`;#F;get renderItem(){return this.#K}set renderItem(e){this.#K=e,this.renderItems()}get size(){return this.inputElement?.size}get data(){if(this.#F)return this.#F;const e=this.getAttribute("data");if(e)try{const t=JSON.parse(e);if(this.isValidDataType(t))return t}catch(e){console.error('could not parse data string from attribute "data" - ',e.message)}return[]}set data(e){this.isValidDataType(e)&&(this.#F=e,this.renderItems())}isValidDataType(e){const t=Array.isArray(e);return t||console.error("data must be an array, received:",e),t}getItemsTemplate(){return this.data?.reduce?.((e,t)=>e+(this.renderItem?.(t||{})||""),"")}renderItems(){const e=this.getItemsTemplate();e&&(this.innerHTML=e)}init(){super.init?.(),this.renderItems(),Ue(this,this.renderItems.bind(this),{includeAttrs:["data"]}),Ge(this,({addedNodes:e})=>{e.forEach(e=>{e.setAttribute("size",this.size)})})}},{host:il,label:rl,requiredIndicator:nl,internalWrapper:sl,errorMessage:al}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},internalWrapper:{selector:()=>':host [part="internal-component"] slot'},errorMessage:{selector:"::part(error-message)"}},ll={hostWidth:{...il,property:"width"},hostDirection:{...il,property:"direction"},fontFamily:il,labelTextColor:[{...rl,property:"color"},{...nl,property:"color"}],labelRequiredIndicator:{...nl,property:"content"},errorMessageTextColor:{...al,property:"color"},errorMessageIcon:{...al,property:"background-image"},errorMessageIconSize:{...al,property:"background-size"},errorMessageIconPadding:{...al,property:"padding-inline-start"},errorMessageIconRepeat:{...al,property:"background-repeat"},errorMessageIconPosition:{...al,property:"background-position"},errorMessageFontSize:{...al,property:"font-size"},itemsSpacing:{...sl,property:"gap"}},dl=`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n\t\t\t}\n\t\t\t\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n\n\t\t\t:host::after {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\t\t\t:host::part(input-field)::after {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\n [part="internal-component"] {\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n display: inline-block;\n\t\t\t\tmin-height: initial;\n\t\t\t}\n\n [part="internal-component"] slot {\n box-sizing: border-box;\n width: 100%;\n display: flex;\n flex-wrap: wrap;\n\t\t\t}\n\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tbackground-color: transparent;\n\t\t\t\tpadding: 0;\n\t\t\t\toverflow: hidden;\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t}\n\n\t\t\tvaadin-text-field {\n\t\t\t\tmargin: 0;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%\n\t\t\t}\n\n\t\t\tvaadin-text-field::before {\n\t\t\t\theight: 0;\n\t\t\t}\n\n\t\t\tvaadin-text-field[readonly] > input:placeholder-shown {\n\t\t\t\topacity: 1;\n\t\t\t}\n\n\t\t\tvaadin-text-field[readonly]::part(input-field)::after {\n\t\t\t\tborder: 0 solid;\n\t\t\t}\n\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\n ${xt("vaadin-text-field")}\n\t\t\t${bt("vaadin-text-field")}\n `,cl=Je("button-selection-group"),pl=_e(jt({mappings:{...ll}}),$t,io({proxyProps:["value","selectionStart"]}),_t,ol,e=>class extends e{init(){super.init?.();const e=document.createElement("template");e.innerHTML=`\n <${el}\n \tname="button-selection-group"\n \tslot="input"\n tabindex="-1"\n part="internal-component"\n >\n <slot></slot>\n </${el}>\n `,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(el),Xe(this,this.inputElement,{includeAttrs:["size","default-value","allow-deselect"]})}})(Qt({slots:[],wrappedEleName:"vaadin-text-field",style:()=>dl,excludeAttrsSync:["tabindex","style"],componentName:cl}));customElements.define(el,tl);const hl=Je("button-selection-group-item");class ul extends(Gt({componentName:hl,baseSelector:":host > descope-button"})){get size(){return this.getAttribute("size")||"md"}get variant(){return this.getAttribute("variant")||"contained"}get value(){return this.getAttribute("value")||""}set value(e){this.setAttribute("value",e)}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML=`\n <descope-button variant="${this.variant}" size="${this.size}" mode="primary">\n <slot></slot>\n </descope-button>\n\t`,V("\n descope-button {\n max-width: 100%;\n }\n\t\t\tdescope-button > slot {\n\t\t\t\twidth: 100%;\n\t\t\t\toverflow: hidden;\n text-overflow: ellipsis;\n display: inline-block;\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n max-width: 100%\n\t\t\t}\n ",this),Xe(this,this.baseElement,{includeAttrs:["size","variant"]}),Xe(this.baseElement,this,{includeAttrs:["focused","active"]})}handleFocus(){this.shadowRoot.querySelector("descope-button")?.focus()}focus(){this.handleFocus()}init(){super.init(),this.addEventListener("focus",e=>{e.isTrusted&&this.handleFocus()})}}const gl=_e(jt({mappings:{hostDirection:{selector:()=>Ni.componentName,property:Ni.cssVarList.hostDirection},backgroundColor:{selector:()=>Ni.componentName,property:Ni.cssVarList.backgroundColor},labelTextColor:{selector:()=>Ni.componentName,property:Ni.cssVarList.labelTextColor},borderColor:{selector:()=>Ni.componentName,property:Ni.cssVarList.borderColor},borderWidth:{selector:()=>Ni.componentName,property:Ni.cssVarList.borderWidth},borderStyle:{selector:()=>Ni.componentName,property:Ni.cssVarList.borderStyle},borderRadius:{selector:()=>Ni.componentName,property:Ni.cssVarList.borderRadius},outlineColor:{selector:()=>Ni.componentName,property:Ni.cssVarList.outlineColor}}}),$t,_t)(ul);customElements.define(hl,gl),customElements.define(cl,pl);const ml=Je("button-multi-selection-group-internal");class bl extends(Xa(ml)){#je(){return this.items.filter(e=>e.hasAttribute("selected"))}onClick(e){e.target!==e.currentTarget&&(this.#je().includes(e.target)?e.target.removeAttribute("selected"):e.target.setAttribute("selected","true"),this.dispatchChange())}get value(){return this.#je().map(e=>e.value)}set value(e){this.items.forEach(t=>{e.includes(t.value)?t.setAttribute("selected","true"):t.removeAttribute("selected")})}get minItemsSelection(){return parseInt(this.getAttribute("min-items-selection"),10)||0}get maxItemsSelection(){return parseInt(this.getAttribute("max-items-selection"),10)||0}#$e(e){const t=Array.isArray(e);return t||console.error("default-values must be an array, received:",e),t}get defaultValues(){const e=this.getAttribute("default-values");if(e)try{const t=JSON.parse(e);if(this.#$e(t))return t}catch(e){console.error('could not parse data string from attribute "default-values" -',e.message)}return[]}setDefaultValues(){setTimeout(()=>{this.defaultValues&&(this.value=this.defaultValues,this.setCustomValidity())})}getValidity(){return this.isRequired&&!this.value.length?{valueMissing:!0}:this.isRequired&&this.minItemsSelection&&this.value.length<this.minItemsSelection?{rangeUnderflow:!0}:this.maxItemsSelection&&this.value.length>this.maxItemsSelection?{rangeOverflow:!0}:{}}init(){super.init(),this.setDefaultValues(),this.querySelector("slot").addEventListener("click",this.onClick.bind(this))}}const yl=Je("button-multi-selection-group"),fl=_e(jt({mappings:{...ll}}),$t,io({proxyProps:["value","selectionStart"]}),_t,ol,e=>class extends e{init(){super.init?.();const e=document.createElement("template");e.innerHTML=`\n <${ml}\n \tname="button-selection-group"\n \tslot="input"\n tabindex="-1"\n part="internal-component"\n >\n <slot></slot>\n </${ml}>\n `,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(ml),Xe(this,this.inputElement,{includeAttrs:["size","default-values","min-items-selection","max-items-selection"]})}})(Qt({slots:[],wrappedEleName:"vaadin-text-field",style:()=>dl,excludeAttrsSync:["tabindex","style"],componentName:yl}));customElements.define(ml,bl),customElements.define(yl,fl);class vl extends u.v{get sortable(){return"true"===this.getAttribute("sortable")}_defaultRenderer(e,t,o){const i=o.item[this.path]||"",r=Array.isArray(i)?i.join(", "):i;this.__setTextContent(e,r),e.title=r}_defaultHeaderRenderer(e,t){this.sortable?super._defaultHeaderRenderer(e,t):this.__setTextContent(e,this.__getHeader(this.header,this.path))}}const xl=Je("grid-text-column");customElements.define(xl,vl);const Cl=Je("grid-custom-column");customElements.define(Cl,class extends vl{_defaultRenderer(e,t,o){const i=o.item[this.path]||"",r=Array.from(this.children).find(e=>{const t=e.getAttribute("data-pattern");return!t||new RegExp(t).test(i)});if(!r)return void this.__setTextContent(e,o.item[this.path]||"");const n=r.cloneNode(!0);n.textContent=i||"",e.innerHTML="",e.append(n)}});const wl=()=>{const e=document.createElement("descope-checkbox");return e.setAttribute("bordered","true"),e.setAttribute("size","xs"),e},Il=e=>!!e.items?.length&&e.selectedItems.length===e.items.length;class Sl extends g.${_onHeaderRendererOrBindingChanged(){}_headerRenderer(e){const t=e.parentNode;let o=e.querySelector("descope-checkbox");o||(o=wl(),o.addEventListener("input",()=>{const e=Il(t);t.selectedItems=e?[]:t.items}),e.appendChild(o)),o.setAttribute("checked",Il(t))}_defaultRenderer(e,t,o){const i=e.parentNode;let r=e.querySelector("descope-checkbox");r||(r=wl(),e.appendChild(r)),r.onchange=()=>{r.checked?i.selectItem(o.item):i.deselectItem(o.item)},r.setAttribute("checked",o.selected)}}const Ml=Je("grid-selection-column");customElements.define(Ml,Sl);class Al extends u.v{get sortable(){return"true"===this.getAttribute("sortable")}_defaultRenderer(e,t,o){const i=t._gridValue,r=i.detailsOpenedItems?.indexOf(o.item)??-1,n=-1!==r,s=document.createElement("vaadin-icon");s.icon=n?"vaadin:angle-up":"vaadin:angle-down",s.classList.add("toggle-details-button",n?"opened":"closed"),e.innerHTML="",e.append(s),s.onclick=()=>{i.detailsOpenedItems=n?i.detailsOpenedItems.toSpliced(r,1):[...i.detailsOpenedItems,o.item]}}_defaultHeaderRenderer(e,t){this.sortable?super._defaultHeaderRenderer(e,t):this.__setTextContent(e,this.__getHeader(this.header,this.path))}}const El=Je("grid-item-details-column");customElements.define(El,Al),customElements.define(wi,Mi),customElements.define(Ai,Ei);const Tl=e=>{const t=document.createElement("textarea");return t.innerHTML=e,t.value},kl=Je("code-snippet");let zl=class extends(Gt({componentName:kl,baseSelector:":host > .wrapper"})){static get observedAttributes(){return["lang","inline","copy-button"]}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="wrapper">\n <code class="hljs"></code>\n </div>\n ',V("\n :host {\n display: inline-block;\n width: 100%;\n }\n .wrapper {\n display: grid;\n width: 100%;\n }\n code {\n grid-area: 1 / 1;\n display: block;\n width: 100%;\n min-height: 1em;\n overflow-x: auto;\n }\n pre {\n margin: 0;\n }\n .copy-btn {\n grid-area: 1 / 1;\n place-self: start end;\n margin: 8px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n border-style: solid;\n cursor: pointer;\n opacity: 0;\n transition: opacity 150ms ease, background 150ms ease;\n }\n .wrapper:hover .copy-btn,\n .copy-btn:focus-visible {\n opacity: 1;\n }\n .copy-btn descope-icon {\n width: 16px;\n height: 16px;\n pointer-events: none;\n flex-shrink: 0;\n }\n .copy-btn .check-icon {\n display: none;\n }\n .copy-btn.copied .check-icon {\n display: block;\n }\n .copy-btn.copied descope-icon:not(.check-icon) {\n display: none;\n }\n ",this)}init(){super.init?.(),this.lang=this.getAttribute("lang"),this.isInline="true"===this.getAttribute("inline"),"true"===this.getAttribute("copy-button")&&this.#_e(),Ge(this,this.#He.bind(this))}get contentNode(){return this.shadowRoot.querySelector("code")}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),t!==o&&("inline"===e&&(this.isInline=o),"lang"===e&&(this.lang=o),"copy-button"===e&&("true"===o?this.#_e():this.#qe()),this.#He())}#_e(){if(this.shadowRoot.querySelector(".copy-btn"))return;const e=document.createElement("button");e.className="copy-btn",e.type="button",e.setAttribute("aria-label","Copy code");const t=document.createElement("descope-icon");t.setAttribute("src","data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPgogIDxyZWN0IHg9IjkiIHk9IjkiIHdpZHRoPSIxMyIgaGVpZ2h0PSIxMyIgcng9IjIiIHJ5PSIyIj48L3JlY3Q+CiAgPHBhdGggZD0iTTUgMTVINGEyIDIgMCAwIDEtMi0yVjRhMiAyIDAgMCAxIDItMmg5YTIgMiAwIDAgMSAyIDJ2MSI+PC9wYXRoPgo8L3N2Zz4K");const o=document.createElement("descope-icon");o.setAttribute("src","data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iY2hlY2staWNvbiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJjdXJyZW50Q29sb3IiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj4KICA8cG9seWxpbmUgcG9pbnRzPSIyMCA2IDkgMTcgNCAxMiI+PC9wb2x5bGluZT4KPC9zdmc+Cg=="),o.classList.add("check-icon"),e.appendChild(t),e.appendChild(o),e.addEventListener("click",()=>this.#Ye()),this.shadowRoot.querySelector(".wrapper").appendChild(e)}#qe(){this.shadowRoot.querySelector(".copy-btn")?.remove()}#Ye(){const e=this.shadowRoot.querySelector(".copy-btn");navigator.clipboard.writeText(Tl(this.textContent)).then(()=>{e.classList.add("copied"),setTimeout(()=>e.classList.remove("copied"),2e3)}).catch(()=>{})}#He(){const e=Tl(this.textContent),t=this.lang;if(!t)return void(this.contentNode.textContent=e);const{value:o}=m.A.highlight(e,{language:t});this.contentNode.innerHTML=(e=>this.isInline?e:`<pre>${e}</pre>`)(o)}};const Ll={selector:()=>".copy-btn"},{root:Vl,docTag:Nl,keyword:Dl,metaKeyword:Pl,templateTag:Bl,templateVariable:Fl,type:Rl,variableLanguage:Wl,title:Ol,titleClass:jl,titleClassInherited:$l,titleFunction:_l,attr:Hl,attribute:ql,literal:Yl,meta:Ul,number:Gl,operator:Zl,variable:Ql,selectorAttr:Jl,selectorClass:Kl,selectorId:Xl,regexp:ed,string:td,metaString:od,builtIn:id,symbol:rd,comment:nd,code:sd,formula:ad,name:ld,quote:dd,selectorTag:cd,selectorPseudo:pd,subst:hd,section:ud,bullet:gd,emphasis:md,strong:bd,addition:yd,deletion:fd,charEscape:vd,link:xd,params:Cd,property:wd,punctuation:Id,tag:Sd}={root:{selector:()=>".hljs"},docTag:{selector:()=>".hljs-doctag"},keyword:{selector:()=>".hljs-keyword"},metaKeyword:{selector:()=>".hljs-meta .hljs-keyword"},templateTag:{selector:()=>".hljs-template-tag"},templateVariable:{selector:()=>".hljs-template-variable"},type:{selector:()=>".hljs-type"},variableLanguage:{selector:()=>".hljs-variable.language"},title:{selector:()=>".hljs-title"},titleClass:{selector:()=>".hljs-title.class_"},titleClassInherited:{selector:()=>".hljs-title.class_.inherited__"},titleFunction:{selector:()=>".hljs-title.function_"},attr:{selector:()=>".hljs-attr"},attribute:{selector:()=>".hljs-attribute"},literal:{selector:()=>".hljs-literal"},meta:{selector:()=>".hljs-meta"},number:{selector:()=>".hljs-number"},operator:{selector:()=>".hljs-operator"},variable:{selector:()=>".hljs-variable"},selectorAttr:{selector:()=>".hljs-selector-attr"},selectorClass:{selector:()=>".hljs-selector-class"},selectorId:{selector:()=>".hljs-selector-id"},regexp:{selector:()=>".hljs-regexp"},string:{selector:()=>".hljs-string"},metaString:{selector:()=>".hljs-meta .hljs-string"},builtIn:{selector:()=>".hljs-built_in"},symbol:{selector:()=>".hljs-symbol"},comment:{selector:()=>".hljs-comment"},code:{selector:()=>".hljs-code"},formula:{selector:()=>".hljs-formula"},name:{selector:()=>".hljs-name"},quote:{selector:()=>".hljs-quote"},selectorTag:{selector:()=>".hljs-selector-tag"},selectorPseudo:{selector:()=>".hljs-selector-pseudo"},subst:{selector:()=>".hljs-subst"},section:{selector:()=>".hljs-section"},bullet:{selector:()=>".hljs-bullet"},emphasis:{selector:()=>".hljs-emphasis"},strong:{selector:()=>".hljs-strong"},addition:{selector:()=>".hljs-addition"},deletion:{selector:()=>".hljs-deletion"},charEscape:{selector:()=>".hljs-char.escape"},link:{selector:()=>".hljs-link"},params:{selector:()=>".hljs-params"},property:{selector:()=>".hljs-property"},punctuation:{selector:()=>".hljs-punctuation"},tag:{selector:()=>".hljs-tag"}},Md=_e(jt({mappings:{rootBgColor:{...Vl,property:"background-color"},rootTextColor:{...Vl,property:"color"},docTagTextColor:{...Nl,property:"color"},keywordTextColor:{...Dl,property:"color"},metaKeywordTextColor:{...Pl,property:"color"},templateTagTextColor:{...Bl,property:"color"},templateVariableTextColor:{...Fl,property:"color"},typeTextColor:{...Rl,property:"color"},variableLanguageTextColor:{...Wl,property:"color"},titleTextColor:{...Ol,property:"color"},titleClassTextColor:{...jl,property:"color"},titleClassInheritedTextColor:{...$l,property:"color"},titleFunctionTextColor:{..._l,property:"color"},attrTextColor:{...Hl,property:"color"},attributeTextColor:{...ql,property:"color"},literalTextColor:{...Yl,property:"color"},metaTextColor:{...Ul,property:"color"},numberTextColor:{...Gl,property:"color"},operatorTextColor:{...Zl,property:"color"},variableTextColor:{...Ql,property:"color"},selectorAttrTextColor:{...Jl,property:"color"},selectorClassTextColor:{...Kl,property:"color"},selectorIdTextColor:{...Xl,property:"color"},regexpTextColor:{...ed,property:"color"},stringTextColor:{...td,property:"color"},metaStringTextColor:{...od,property:"color"},builtInTextColor:{...id,property:"color"},symbolTextColor:{...rd,property:"color"},commentTextColor:{...nd,property:"color"},codeTextColor:{...sd,property:"color"},formulaTextColor:{...ad,property:"color"},nameTextColor:{...ld,property:"color"},quoteTextColor:{...dd,property:"color"},selectorTagTextColor:{...cd,property:"color"},selectorPseudoTextColor:{...pd,property:"color"},substTextColor:{...hd,property:"color"},sectionTextColor:{...ud,property:"color"},bulletTextColor:{...gd,property:"color"},emphasisTextColor:{...md,property:"color"},strongTextColor:{...bd,property:"color"},additionTextColor:{...yd,property:"color"},additionBgColor:{...yd,property:"background-color"},deletionTextColor:{...fd,property:"color"},deletionBgColor:{...fd,property:"background-color"},charEscapeTextColor:{...vd,property:"color"},linkTextColor:{...xd,property:"color"},paramsTextColor:{...Cd,property:"color"},propertyTextColor:{...wd,property:"color"},punctuationTextColor:{...Id,property:"color"},tagTextColor:{...Sd,property:"color"},copyButtonSize:[{...Ll,property:"width"},{...Ll,property:"height"}],copyButtonBorderRadius:{...Ll,property:"border-radius"},copyButtonBorderWidth:{...Ll,property:"border-width"},copyButtonBorderColor:{...Ll,property:"border-color"},copyButtonBgColor:{...Ll,property:"background-color"},copyButtonHoverBgColor:{selector:()=>".copy-btn:hover",property:"background-color"},copyButtonColor:{...Ll,property:"color"}}}),$t,_t)(zl);customElements.define(kl,Md);const Ad=e=>{const t=Array.isArray(e);return t||console.error("data must be an array, received:",e),t},Ed=e=>{const t=document.createElement("div");return t.textContent=e,t.innerHTML},Td=e=>(e=>e?.constructor===Object)(e)?"object":Array.isArray(e)?"array":/^\s*<[\s\S]*>/.test(e)?"xml":"text",kd=(e,t)=>`<descope-code-snippet copy-button="true" lang="${t}" class="row-details__value code">${Ed(e)}</descope-code-snippet>`,zd=e=>`<div class="row-details__value text" title="${e}">${Ed(e)}</div>`,Ld=e=>kd(JSON.stringify(e,null,2),"json"),Vd=e=>{const t=Td(e);return"object"===t?Ld(e):"xml"===t?(e=>kd(e,"xml"))(e):"array"===t?e.some(e=>"object"===Td(e))?Ld(e):zd(e.join(",\n")):zd(e)},Nd=Je("grid"),{host:Dd,headerRow:Pd,headerRowCell:Bd,contentRow:Fd,firstRow:Rd,sortIndicators:Wd,activeSortIndicator:Od,selectedRow:jd,rowSeparator:$d,resizeHandle:_d,toggleDetailsPanelButton:Hd,toggleDetailsPanelButtonOpened:qd,toggleDetailsPanelButtonClosed:Yd,detailsPanel:Ud,detailsPanelLabels:Gd,selectedRowCell:Zd,detailsPanelContent:Qd}={host:{selector:()=>"vaadin-grid"},headerRow:{selector:()=>"::part(header-cell)"},headerRowCell:{selector:()=>"vaadin-grid::part(header-cell)"},contentRow:{selector:()=>"::part(cell)"},firstRow:{selector:()=>"::part(first-header-row-cell)"},selectedRow:{selector:()=>"::part(selected-row)"},selectedRowCell:{selector:()=>"::part(selected-row-cell)"},sortIndicators:{selector:()=>"vaadin-grid-sorter::part(indicators)"},activeSortIndicator:{selector:()=>"vaadin-grid-sorter[direction]"},rowSeparator:{selector:()=>"vaadin-grid::part(body-cell)"},resizeHandle:{selector:()=>"::part(resize-handle)"},toggleDetailsPanelButton:{selector:()=>"vaadin-grid vaadin-icon.toggle-details-button"},toggleDetailsPanelButtonOpened:{selector:()=>"vaadin-grid vaadin-icon.toggle-details-button.opened"},toggleDetailsPanelButtonClosed:{selector:()=>"vaadin-grid vaadin-icon.toggle-details-button.closed"},detailsPanel:{selector:()=>"vaadin-grid::part(details-cell)"},detailsPanelLabels:{selector:()=>"vaadin-grid .row-details__label"},detailsPanelContent:{selector:()=>"vaadin-grid .row-details"}},Jd=_e(jt({componentNameOverride:Je("input-wrapper")}),jt({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostHeight:{selector:()=>":host",property:"height"},hostMinHeight:{selector:()=>":host",property:"min-height"},fontFamily:[{...Pd},{...Fd}],fontSize:[{...Pd},{...Fd}],fontWeight:{...Fd},valueTextColor:{...Fd,property:"color"},backgroundColor:[{...Dd,property:"background-color"},{...Fd,property:"background-color"}],sortIndicatorsColor:{...Wd,property:"color"},activeSortIndicator:{...Od,property:"color"},borderColor:{...Dd,property:"border-color"},borderWidth:{...Dd,property:"border-width"},borderStyle:{...Dd,property:"border-style"},borderRadius:{...Dd,property:"border-radius"},selectedBackgroundColor:[{...jd,property:"background-color"},{...Zd,property:"background-color"}],headerRowTextColor:{...Bd,property:"color"},separatorColor:[{...Rd,property:"border-bottom-color"},{...$d,property:"border-top-color"}],resizeHandleColor:{..._d,property:"background-color"},hostDirection:{...Dd,property:"direction",fallback:"ltr"},toggleDetailsPanelButtonSize:[{...Hd,property:"width"},{...Hd,property:"height"}],toggleDetailsPanelButtonOpenedColor:{...qd,property:"color"},toggleDetailsPanelButtonClosedColor:{...Yd,property:"color"},toggleDetailsPanelButtonCursor:{...Hd,property:"cursor"},detailsPanelBackgroundColor:{...Ud,property:"background-color"},detailsPanelBorderTopColor:{...Ud,property:"border-top-color"},detailsPanelLabelsColor:{...Gd,property:"color"},detailsPanelLabelsFontSize:{...Gd,property:"font-size"},detailsPanelItemsGap:{...Qd,property:"grid-gap"},detailsPanelPadding:{...Qd,property:"padding"}}}),$t,_t,e=>class extends e{#Ue;init(){super.init?.(),this.handleColumns(),this.forwardSelectedItemsChange(),this.baseElement._mapSorters=()=>{};const e=this.baseElement._updateDetailsCellHeight;this.baseElement._updateDetailsCellHeight=t=>{t&&e.call(this.baseElement,t)},this.baseElement.rowDetailsRenderer=this.#Ge.bind(this),this.baseElement.addEventListener("wheel",e=>{e.target.closest("descope-code-snippet")&&e.stopPropagation()},!0)}#Ge=async(e,t,o)=>{e.addEventListener("mousedown",e=>e.stopImmediatePropagation(),!0);const i=this.getRowDetailsTemplate(o.item);e.innerHTML="",e.append(i.content.cloneNode(!0))};getRowDetailsTemplate(e){const t=this.#Ue.reduce((e,{path:t,header:o})=>t&&o?{...e,[t]:o}:e,{}),o=this.rowDetailsRenderer?.(e,t)??((e,t)=>`\n <div class="row-details">\n ${Object.entries(e).map(([e,o])=>{const i=t[e]||e.replace(/([A-Z])/g," $1").trim().split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");return(e=>{const t=Td(e);return"object"===t||"xml"===t||"array"===t&&e.some(e=>"object"===Td(e))})(o)?`<details class="row-details__item">\n <summary class="row-details__label">${i}</summary>\n ${Vd(o)}\n </details>`:`<div class="row-details__item">\n <div class="row-details__label">${i}</div>\n ${Vd(o)}\n </div>`}).join("\n")}\n</div>\n `)(e,t);switch(!0){case o instanceof HTMLTemplateElement:return o;case"string"==typeof o:return Object.assign(document.createElement("template"),{innerHTML:o});default:throw new Error("rowDetailsRenderer should return a string or a template")}}forwardSelectedItemsChange(){this.baseElement.addEventListener("selected-items-changed",e=>{this.dispatchEvent(new CustomEvent("selected-items-changed",{bubbles:!0,composed:!0,detail:e.detail}))})}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),"columns"===e&&this.setColumnsDataFromAttr()}handleColumns(){this.columnsAttr?this.setColumnsDataFromAttr():this.children.length&&this.setColumnsFromChildren()}setColumnsFromChildren(){this.#Ue=Array.from(this.children).map(e=>({path:e.getAttribute("path"),header:e.getAttribute("header"),type:e.localName.match("^descope-grid-(\\w+)-column$")?.[1]||"text",attrs:["frozen","resizable","auto-width","status"].reduce((t,o)=>{const i=e.getAttribute(o);return i&&(t[o]=i),t},{})}))}get columnsAttr(){return this.getAttribute("columns")}setColumnsDataFromAttr(){try{const e=JSON.parse(this.columnsAttr);Ad(e)&&(this.columns=e)}catch(e){console.error('could not parse data string from attribute "columns" -',e.message)}}#Ze=({path:e,header:t,type:o,attrs:i})=>{const r=`descope-grid-${o}-column`;return`<${r} header="${t}" path="${e}" ${Object.entries(i).map(([e,t])=>`${e}="${t}"`).join(" ")}></${r}>`};get renderColumn(){return this.#Ze}set renderColumn(e){this.#Ze=e,this.renderColumns()}getColumnsTemplate(){return this.#Ue?.reduce?.((e,t)=>e+(this.renderColumn?.(t||{})||""),"")}reassignRowDetailsRenderer(){this.baseElement.rowDetailsRenderer=null,setTimeout(()=>{this.baseElement.rowDetailsRenderer=this.#Ge.bind(this)},0)}renderColumns(){const e=this.getColumnsTemplate();e&&(this.reassignRowDetailsRenderer(),this.innerHTML=e)}get grid(){return this.shadowRoot.querySelector("vaadin-grid")}get data(){return this.grid.items}set data(e){if(Ad(e)&&this.grid.items!==e&&(this.grid.items=e,this.grid.selectedItems)){const e=new Set(this.grid.items.map(e=>e[this.uniqueColumnId]??e)),t=this.grid.selectedItems.filter(t=>e.has(t[this.uniqueColumnId]??t));this.grid.selectedItems.length!==t.length&&(this.grid.selectedItems=t)}}get columns(){return this.#Ue}set columns(e){this.#Ue=e,this.renderColumns()}get paths(){return this.columns.map(e=>e.path)}get uniqueColumnId(){return this.getAttribute("unique-column-id")}})(Qt({delegatesFocus:!1,slots:[""],wrappedEleName:"vaadin-grid",style:()=>`\n /*css*/\n vaadin-grid {\n overflow: hidden;\n height: 100%;\n min-height: 300px;\n }\n vaadin-grid-cell-content {\n display: flex;\n }\n vaadin-grid::part(selected-row-cell) {\n background-image: none;\n box-shadow: none;\n background-color: inherit;\n }\n vaadin-grid::part(details-cell) {\n border-top-style: dashed;\n border-top-width: 1px;\n }\n vaadin-grid .row-details {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(max(200px, calc(100%/4 - var(${Jd.cssVarList.detailsPanelItemsGap}))), 1fr));\n width: 100%;\n }\n vaadin-grid .row-details__item:has(.row-details__value.code) {\n grid-column: 1 / -1;\n order: 2;\n }\n vaadin-grid details.row-details__item {\n padding: 0;\n }\n vaadin-grid details.row-details__item > summary.row-details__label {\n cursor: pointer;\n list-style: revert;\n display: revert;\n }\n vaadin-grid .row-details__value.text {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: pre;\n }\n vaadin-grid .row-details__value.code {\n margin-top: 5px;\n overflow-x: auto;\n font-size: 0.85em;\n }\n vaadin-grid vaadin-icon.toggle-details-button {\n margin: auto;\n }\n /*!css*/\n\t\t`,excludeAttrsSync:["columns","tabindex","style"],componentName:Nd}));customElements.define(Nd,Jd);const Kd=Je("modal"),Xd=["opened"],ec=_e(jt({mappings:{overlayBackdropColor:{property:()=>ec.cssVarList.overlay.backdropColor},overlayBackgroundColor:{property:()=>ec.cssVarList.overlay.backgroundColor},overlayShadow:{property:()=>ec.cssVarList.overlay.shadow},overlayWidth:{property:()=>ec.cssVarList.overlay.width},overlayBorderWidth:{property:()=>ec.cssVarList.overlay.borderWidth},overlayBorderStyle:{property:()=>ec.cssVarList.overlay.borderStyle},overlayBorderColor:{property:()=>ec.cssVarList.overlay.borderColor},overlayBorderRadius:{property:()=>ec.cssVarList.overlay.borderRadius}}}),ro({name:"overlay",selector:"",mappings:{hostDisplay:{selector:()=>":host(.descope-modal)",property:"display",important:!0},backgroundColor:[{selector:()=>"::part(content)",property:"background-color"},{selector:()=>"::part(overlay)",property:"background-color"}],backdropColor:{selector:()=>"::part(backdrop)",property:"background-color"},borderStyle:{selector:()=>"::part(content)",property:"border-style"},borderWidth:{selector:()=>"::part(content)",property:"border-width"},borderColor:{selector:()=>"::part(content)",property:"border-color"},borderRadius:{selector:()=>"::part(content)",property:"border-radius "},width:{selector:()=>"::part(overlay)",property:"width"},shadow:{selector:()=>"::part(overlay)",property:"box-shadow"}},forward:{include:!1,attributes:["opened","style"]}}),$t,_t,e=>class extends e{static get observedAttributes(){return[].concat(e.observedAttributes||[],Xd)}get opened(){return"true"===this.getAttribute("opened")}handleOpened(){this.opened?this.style.display="":this.style.display="none"}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),"opened"===e&&this.handleOpened()}init(){super.init?.(),this.style.display="none",setTimeout(()=>{this.baseElement.shadowRoot.querySelector("vaadin-dialog-overlay").appendChild(document.createElement("slot")),this.#ee(),Xe(this,this.baseElement,{includeAttrs:["opened"]}),this.handleOpened()})}#ee(){const e=this.baseElement.shadowRoot.querySelector("vaadin-dialog-overlay");e._attachOverlay=()=>{e.bringToFront(),V("\n :host {\n display: flex!important;\n }\n ",this.baseElement)},e._detachOverlay=()=>{this.baseElement.style.display="none"},e._enterModalState=()=>{},e.close=()=>!1}})(Qt({slots:[""],wrappedEleName:"vaadin-dialog",style:()=>"\n vaaadin-dialog {\n display: flex!important;\n }\n ",excludeAttrsSync:["tabindex","opened","style"],componentName:Kd}));customElements.define(Kd,ec);const tc=window.customElements.get("vaadin-notification-container");if(!tc)throw new Error("could not get vaadin-notification-container class");customElements.define(Je("notification-container"),class extends tc{});const oc=Je("notification-card"),ic={content:()=>"vaadin-notification-card::part(content)",overlay:()=>"vaadin-notification-card::part(overlay)"},rc=_e(jt({mappings:{hostMinWidth:{selector:ic.content,property:"min-width"},fontFamily:{},fontSize:{},backgroundColor:{selector:ic.content},textColor:{property:"color"},boxShadow:{},borderWidth:{selector:ic.content,property:"border-width"},borderColor:{selector:ic.content,property:"border-color"},borderStyle:{selector:ic.content,property:"border-style"},borderRadius:[{selector:ic.content,property:"border-radius"},{selector:ic.overlay,property:"border-radius"}],verticalPadding:[{selector:ic.content,property:"padding-top"},{selector:ic.content,property:"padding-bottom"}],horizontalPadding:[{selector:ic.content,property:"padding-right"},{selector:ic.content,property:"padding-left"}]}}),e=>class extends e{close(){this.baseElement.addEventListener("animationend",()=>{this.remove(),this.dispatchEvent(new Event("card-closed"))}),this.setAttribute("opened","false")}constructor(){super(),this.baseElement.innerHTML='\n <div part="root">\n <div part="content">\n <slot></slot>\n </div>\n <div part="close">\n <slot name="close"></slot>\n </div>\n </div>\n ',this.closeEle=this.shadowRoot.querySelector('[part="close"]')}init(){super.init?.(),this.closeEle.onclick=()=>{this.close()}}})(Qt({slots:[],wrappedEleName:"vaadin-notification-card",style:()=>'\n vaadin-notification-card {\n box-shadow: none;\n }\n ::part(overlay) {\n box-shadow: none;\n background: none;\n }\n\n [part="close"] {\n cursor: pointer;\n display: flex;\n }\n\n [part="content"] {\n display: flex;\n align-items: center;\n flex-grow: 1;\n }\n\n [part="root"] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n }\n ',excludeAttrsSync:["tabindex","style"],componentName:oc}));customElements.define(oc,rc);const nc=Je("notification"),sc=_e($t,_t,qt,e=>class t extends e{#Qe;constructor(){super();const e=this;Object.defineProperty(this.baseElement,"_container",{get:()=>(t._container||(t._container=document.createElement("descope-notification-container"),t._container.style.position="absolute",document.body.appendChild(t._container)),t._container.isConnected||setTimeout(()=>e.parentNode.appendChild(t._container)),t._container)}),Object.defineProperty(this.baseElement,"_card",{get:()=>e.#Qe}),this.baseElement._removeNotificationCard=this.close.bind(this)}close(){this.#Qe.close()}init(){super.init?.(),this.createCard(),Xe(this,this.#Qe),Qe(this.#Qe,this,{includeAttrs:["opened"]}),this.baseElement.renderer=e=>{Array.from(this.childNodes).forEach(t=>e.appendChild(t))}}get isContainerEmpty(){return!t._container.children.length}removeContainer(){t._container.remove()}removeNotification(){this.remove(),this.isContainerEmpty&&this.removeContainer()}createCard(){this.#Qe=document.createElement("descope-notification-card"),this.#Qe.addEventListener("card-closed",this.removeNotification.bind(this))}})(Qt({wrappedEleName:"vaadin-notification",excludeAttrsSync:["tabindex","style"],componentName:nc}));customElements.define(nc,sc);const ac=Je("mappings-field-internal"),lc=co({componentName:ac,baseSelector:"div"}),dc=Je("mappings-field"),{host:cc,helperText:pc,errorMessage:hc,mappingItem:uc,labels:gc,labelsText:mc,valueLabel:bc,attrLabel:yc,separator:fc,labelsContainer:vc}={host:{selector:()=>":host"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},mappingItem:{selector:"descope-mapping-item::part(wrapper)"},labels:{selector:'descope-mappings-field-internal [part="labels"] descope-text'},labelsText:{selector:'descope-mappings-field-internal [part="labels"] descope-text::part(text-wrapper)'},valueLabel:{selector:'descope-mappings-field-internal [part="labels"] [part="value-label"]'},attrLabel:{selector:'descope-mappings-field-internal [part="labels"] [part="attr-label"]'},separator:{selector:"descope-mapping-item::part(separator)"},labelsContainer:{selector:'descope-mappings-field-internal [part="labels"]'}},xc=_e(jt({mappings:{hostWidth:{...cc,property:"width"},hostDirection:{...cc,property:"direction"},fontSize:[{},cc,{...fc,property:"margin-top"}],fontFamily:[pc,hc,gc],separatorFontSize:{...fc,property:"font-size"},labelsFontSize:{...mc,property:"font-size"},labelsLineHeight:[{...mc,property:"line-height"},{...gc,property:"line-height"}],labelTextColor:[{...gc,property:ko.cssVarList.textColor},{...fc,property:"color"}],itemMarginBottom:{...uc,property:"margin-bottom"},valueLabelMinWidth:{...bc,property:"min-width"},attrLabelMinWidth:{...yc,property:"min-width"},labelsMarginBottom:{...vc,property:"margin-bottom"},separatorWidth:{},removeButtonWidth:{}}}),$t,io({proxyProps:["value","selectionStart"],inputEvent:"input",proxyParentValidation:!0}),_t,e=>class extends e{get defaultValues(){const e=this.getAttribute("default-values");if(e)try{return JSON.parse(e)}catch(e){console.error('could not parse data string from attribute "default-values" -',e.message)}return[]}setDefaultValues(){const e=this.defaultValues;Object.keys(e).length>0&&(this.inputElement.value=e)}init(){super.init?.();const e=document.createElement("template");e.innerHTML=`\n <${ac}\n tabindex="-1"\n ></${ac}>\n `,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(ac),Xe(this,this.inputElement,{includeAttrs:["size","full-width","label-value","label-attr","button-label","separator","options","default-values","invalid","readonly","disabled","st-error-message-icon","st-error-message-icon-size","st-error-message-icon-padding"]}),Qe(this,this.inputElement,{includeAttrs:["invalid"]}),this.setDefaultValues()}})(Qt({slots:[],wrappedEleName:"vaadin-custom-field",style:()=>`\n :host {\n display: inline-flex;\n max-width: 100%;\n direction: ltr;\n }\n vaadin-custom-field {\n line-height: unset;\n width: 100%;\n }\n\n descope-mappings-field-internal [part="labels"] {\n display: none;\n grid-template-columns: 1fr var(${xc.cssVarList.separatorWidth}) 1fr var(${xc.cssVarList.removeButtonWidth});\n }\n\n descope-mappings-field-internal [part="labels"] [part="value-label"],\n descope-mappings-field-internal [part="labels"] [part="attr-label"] {\n ${ko.cssVarList.fontWeight}: 500;\n }\n\n descope-mappings-field-internal [part="labels"] [part="value-label"] {\n grid-column: 1 / span 1;\n }\n\n descope-mappings-field-internal [part="labels"] [part="attr-label"] {\n grid-column: 3 / span 1;\n }\n\n descope-mapping-item::part(wrapper) {\n display: grid;\n grid-template-columns: 1fr var(${xc.cssVarList.separatorWidth}) 1fr var(${xc.cssVarList.removeButtonWidth});\n }\n `,excludeAttrsSync:["tabindex","label-value","label-attr","button-label","options","error-message","style"],componentName:dc}));customElements.define(ac,class extends lc{#Je;static get observedAttributes(){return[].concat(lc.observedAttributes||[],["label-value","label-attr","button-label","invalid","readonly","disabled","st-error-message-icon","st-error-message-icon-size","st-error-message-icon-padding"])}isValidDataType(e){try{return e.every(e=>"object"==typeof e&&!Array.isArray(e)&&1===Object.getOwnPropertyNames(e).length&&"string"==typeof e[Object.keys(e)[0]]&&""!==e[Object.keys(e)[0]].trim())}catch(e){return!1}}get labelValue(){return this.getAttribute("label-value")||"Value"}get labelAttr(){return this.getAttribute("label-attr")||"Attribute"}get buttonLabel(){return this.getAttribute("button-label")||"Add mapping"}get options(){return this.getAttribute("options")||[]}addNewMappingItem(e){const t=document.createElement("descope-mapping-item");return t.setAttribute("bordered","true"),this.mappingsContainerEle.appendChild(t),Xe(this,t,{includeAttrs:["size","full-width","separator","options","disabled","st-error-message-icon","st-error-message-icon-size","st-error-message-icon-padding"]}),setTimeout(()=>{this.setCustomValidity(""),t.addEventListener("mapping-item-removed",()=>{t===this.#Je&&(this.resetInvalidIndication(),this.#Je=void 0),t.remove(),this.setCustomValidity("")}),this.dispatchEvent(new CustomEvent("mapping-item-added",{bubbles:!0,composed:!0})),e&&t.focus()},0),t}get items(){return Array.from(this.mappingsContainerEle.querySelectorAll("descope-mapping-item"))}get value(){return this.items.reduce((e,t)=>t.value?[...e,t.value]:e,[])}set value(e){if(!this.isValidDataType(e))return void console.error("received invalid value to set - should be an array of objects with one key-value pair");const t=this.items;if(t.length>e.length)for(let o=e.length;o<t.length;o++)this.mappingsContainerEle.removeChild(t[o]);e.forEach((e,o)=>{const i=t[o];if(i)i.value=e;else{const t=this.addNewMappingItem(!1);setTimeout(()=>{t.value=e},0)}})}constructor(){super(),this.innerHTML='\n <div class="labels-container" part="labels"></div>\n <div class="mappings-container"></div>\n <div class="button-container"></div>\n ',this.labelsEle=this.querySelector(".labels-container"),this.mappingsContainerEle=this.querySelector(".mappings-container"),this.buttonContainer=this.querySelector(".button-container")}initLabels(){this.labelsEle.innerHTML=`\n <descope-text variant="body2" part="value-label">${this.labelValue}</descope-text>\n <descope-text variant="body2" part="attr-label">${this.labelAttr}</descope-text>\n `}initAddButton(){this.buttonContainer.innerHTML=`\n <descope-button variant="link" mode="primary" disabled="${this.isDisabled}">\n <vaadin-icon icon="vaadin:plus"></vaadin-icon>\n ${this.buttonLabel}\n </descope-button>\n `;const e=this.querySelector("descope-button");e.onclick=()=>{this.addNewMappingItem(!0)},Xe(this,e,{includeAttrs:["disabled"]})}#Ke(){this.labelsEle.style.display=this.items.length?"grid":"none"}init(){this.addEventListener("focus",e=>{e.isTrusted&&(this.#Je||this.items[0]||this.querySelector("descope-button")).focus()}),super.init?.(),this.initLabels(),this.initAddButton(),this.addEventListener("input",()=>{this.mappingsContainerEle.contains(this.#Je)&&this.#Je?.checkValidity()&&(this.resetInvalidIndication(),this.#Je.removeAttribute("invalid"),this.#Je=void 0)}),Ge(this.mappingsContainerEle,this.#Ke.bind(this))}resetInvalidIndication(){this.removeAttribute("invalid")}getValidity(){const e=this.items.find(e=>!e.checkValidity());return e?e.validity:{}}#Xe(e){e&&(this.#Je=this.items.find(e=>!e.checkValidity()),this.#Je?.reportValidity(),this.#Je?.setAttribute("invalid","true"))}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),"label-value"!==e&&"label-attr"!==e||this.initLabels(),"button-label"===e&&this.initAddButton(),"invalid"===e&&this.#Xe("true"===o),"readonly"===e&&this.toggleAttribute("inert","true"===o)}});const Cc=Je("mapping-item"),wc=["size","bordered","readonly","full-width","disabled","st-error-message-icon","st-error-message-icon-size","st-error-message-icon-padding"],Ic=co({componentName:Cc,baseSelector:"div"});customElements.define(Cc,class extends Ic{static get observedAttributes(){return[].concat(Ic.observedAttributes||[],wc,["separator","options","invalid","disabled"])}get separator(){return this.getAttribute("separator")||"map to"}get value(){const e=this.attributeInput.value,t=this.valueInput.value;return e&&t?{[e]:t}:null}set value(e){if(1!==Object.entries(e).length)return void console.error("descope-mapping item expected expects only one key-value pair in the value but received: ",e);const[t,o]=Object.entries(e)[0];this.valueInput.value=o,this.attributeInput.value=t,this.dispatchEvent(new InputEvent("input",{bubbles:!0,composed:!0}))}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML=`\n <div class="wrapper" part="wrapper">\n <descope-text-field required="true"></descope-text-field>\n <div class="separator" part="separator">${this.separator}</div>\n <descope-combo-box\n item-label-path="data-name"\n item-value-path="data-id"\n required="true"\n >\n </descope-combo-box>\n <descope-button variant="link" mode="primary">\n <vaadin-icon icon="vaadin:minus"></vaadin-icon>\n </descope-button>\n </div>\n\t`,V("\n .wrapper {\n display: flex;\n }\n .separator {\n text-align: center;\n flex-shrink: 0;\n }\n ",this),this.valueInput=this.shadowRoot.querySelector("descope-text-field"),this.attributeInput=this.shadowRoot.querySelector("descope-combo-box"),this.inputs=[this.valueInput,this.attributeInput],this.removeButton=this.shadowRoot.querySelector("descope-button"),Xe(this,this.valueInput,{includeAttrs:wc}),Xe(this,this.attributeInput,{includeAttrs:[...wc,"options"],mapAttrs:{options:"data"}}),Xe(this,this.removeButton,{includeAttrs:["disabled"]})}initRemoveButton(){this.removeButton.addEventListener("click",()=>this.dispatchEvent(new CustomEvent("mapping-item-removed",{bubbles:!0,composed:!0})))}init(){super.init?.(),this.initRemoveButton()}getValidity(){const e=this.attributeInput.value,t=this.valueInput.value;return e&&t?{}:{badInput:!0}}reportValidity(){this.inputs.forEach(e=>e.reportValidity())}focus(){(this.checkValidity()||!this.valueInput.checkValidity()?this.valueInput:this.attributeInput).focus()}handleSeparatorChange(){this.shadowRoot.querySelector(".separator").textContent=this.separator}#et(e){"true"===e&&(this.valueInput.value||(this.valueInput.setAttribute("invalid","true"),this.valueInput.setAttribute("error-message",this.defaultErrorMsgValueMissing)),this.attributeInput.value||(this.attributeInput.setAttribute("invalid","true"),this.attributeInput.setAttribute("error-message",this.defaultErrorMsgValueMissing)))}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),"separator"===e&&this.handleSeparatorChange(),"invalid"===e&&this.#et(o)}}),customElements.define(dc,xc);const Sc=k("badge");class Mc extends(ye({componentName:Sc,baseSelector:":host > div"})){static get observedAttributes(){return["data-attachment-size","shrink-to-indicator-threshold"]}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<div>\n <slot></slot>\n\t\t</div>\n\t\t",V("\n :host {\n display: inline-flex;\n }\n :host > div {\n position: relative;\n width: 100%;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n ",this)}get shrinkToIndicatorThreshold(){return this.getAttribute("shrink-to-indicator-threshold")||65}#tt(e){this.toggleAttribute("shrink-to-indicator",parseFloat(e)<this.shrinkToIndicatorThreshold)}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),"data-attachment-size"===e&&t!==o&&this.#tt(o)}}const Ac=I(ce({mappings:{hostWidth:[{selector:()=>":host",property:"width"}],hostHeight:[{selector:()=>":host",property:"height"}],hostDirection:{property:"direction"},fontFamily:{},fontSize:{},fontWeight:{},textTransform:{},verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],horizontalPadding:[{property:"padding-left"},{property:"padding-right"}],borderWidth:{},borderStyle:{},borderColor:{},borderRadius:{},backgroundColor:{},textColor:{property:"color"},textAlign:{},boxShadow:{},textIndent:{}}}),pe,he)(Mc),Ec=Je("user-attribute");class Tc extends(Gt({componentName:Ec,baseSelector:":host > .root"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="root">\n <descope-text st-text-align="auto" data-id="label-text" variant="body1" mode="secondary" class="label"></descope-text>\n <div class="content-wrapper">\n <descope-text st-text-align="auto" data-id="value-text" variant="body1" mode="primary" class="value"></descope-text>\n <div class="btn-wrapper">\n <descope-badge mode="default" bordered="true" size="xs"></descope-badge>\n <descope-button size="sm" data-id="delete-btn" variant="link" mode="primary">\n <slot name="delete-icon"></slot>\n </descope-button>\n <descope-button size="sm" data-id="edit-btn" variant="link" mode="primary">\n <slot name="edit-icon"></slot>\n </descope-button>\n </div>\n </div>\n </div>\n\t\t',V(`\n :host {\n\t\t\t\t\tdisplay: inline-flex;\n container-type: inline-size;\n\t\t\t\t}\n\n .root {\n display: flex;\n width: 100%;\n height: 100%;\n align-items: center;\n }\n\n ::slotted(*) {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n @container (max-width: 529px) {\n .root {\n flex-wrap: wrap;\n }\n }\n\n .btn-wrapper {\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-grow: 0;\n flex-shrink: 0;\n }\n\n slot[name="edit-icon"],\n slot[name="delete-icon"] {\n display: inline-flex;\n flex-shrink: 0;\n align-items: center;\n }\n\n .content-wrapper {\n display: flex;\n flex-grow: 1;\n align-items: center;\n }\n\n descope-text::part(text-wrapper) {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n width: initial;\n }\n\n descope-text {\n display: inline-flex;\n max-width: 100%;\n min-width: 0;\n }\n\n .label {\n flex-grow: 1;\n width: 100%;\n }\n\n .value {\n flex-grow: 1;\n }\n\n descope-badge {\n margin-inline-end: 10px;\n }\n\n .hidden {\n visibility: hidden;\n width: 0;\n }\n\n descope-text[data-id="label-text"].required:after {\n content: '*';\n color: var(${ko.cssVarList.textColor});\n }\n\n :host([readonly="true"]) descope-button {\n visibility: hidden;\n width: 0;\n }\n `,this),this.deleteButton=this.shadowRoot.querySelector('descope-button[data-id="delete-btn"]'),this.editButton=this.shadowRoot.querySelector('descope-button[data-id="edit-btn"]'),this.badge=this.shadowRoot.querySelector("descope-badge"),this.labelText=this.shadowRoot.querySelector('descope-text[data-id="label-text"]'),this.valueText=this.shadowRoot.querySelector('descope-text[data-id="value-text"]')}onLabelChange(){this.labelText.innerText=this.label,this.labelText.setAttribute("title",this.label)}onValueOrPlaceholderChange(){const e=this.value||this.placeholder,t=this.value?"primary":"secondary";this.valueText.innerText=e,this.valueText.setAttribute("title",e),this.valueText.setAttribute("mode",t)}onBadgeLabelChange(){this.badgeLabel?(this.badge.innerText=this.badgeLabel,this.badge.style.display=""):this.badge.style.display="none"}onBadgeTooltipTextChange(){this.badge.setAttribute("title",this.badgeTooltipText||this.badgeLabel)}updateButtonLabel(e,t){let o=e.querySelector("span.btn-label");t?(o||(o=document.createElement("span"),o.classList.add("btn-label"),e.appendChild(o)),o.innerText=t):o?.remove()}onIsRequiredChange(){this.labelText.classList.toggle("required",this.isRequired)}get label(){return this.getAttribute("label")||""}get value(){return this.getAttribute("value")||""}get placeholder(){return this.getAttribute("placeholder")||""}get isRequired(){return"true"===this.getAttribute("required")}get badgeLabel(){return this.getAttribute("badge-label")||""}get badgeTooltipText(){return this.getAttribute("badge-tooltip-text")||""}get editButtonLabel(){return this.getAttribute("edit-button-label")||""}get deleteButtonLabel(){return this.getAttribute("delete-button-label")||""}get isDeleteHidden(){return"true"===this.getAttribute("hide-delete")}init(){this.onLabelChange(),this.onValueOrPlaceholderChange(),this.onIsRequiredChange(),this.onBadgeLabelChange(),this.onBadgeTooltipTextChange(),this.updateButtonLabel(this.editButton,this.editButtonLabel),this.updateButtonLabel(this.deleteButton,this.deleteButtonLabel),this.handleDeleteButtonVisibility(),this.deleteButton.addEventListener("click",()=>this.dispatchEvent(new CustomEvent("delete-clicked",{bubbles:!0,composed:!0}))),this.editButton.addEventListener("click",()=>this.dispatchEvent(new CustomEvent("edit-clicked",{bubbles:!0,composed:!0}))),this.setDefaultChildren()}#ot(e,t){const o=document.createElement("descope-icon");o.setAttribute("src",e),o.setAttribute("src-dark",e),o.setAttribute("slot",t),this.appendChild(o)}setDefaultChildren(){this.children.length||(this.#ot("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxNCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cGF0aCBkPSJNMSAxNkMxIDE3LjEgMS45IDE4IDMgMThIMTFDMTIuMSAxOCAxMyAxNy4xIDEzIDE2VjRIMVYxNlpNMyA2SDExVjE2SDNWNlpNMTAuNSAxTDkuNSAwSDQuNUwzLjUgMUgwVjNIMTRWMUgxMC41WiIgZmlsbD0iY3VycmVudGNvbG9yIi8+Cjwvc3ZnPg==","delete-icon"),this.#ot("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxNSAxNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cGF0aCBkPSJNMTAuMDAwMiAwLjk5MjE0OUMxMC4wMDAyIDEuMDE2MTUgMTAuMDAwMiAxLjAxNjE1IDEwLjAwMDIgMS4wMTYxNUw4LjIyNDE5IDMuMDA4MTVIMi45OTIxOUMyLjQ2NDE5IDMuMDA4MTUgMi4wMDgxOSAzLjQ0MDE1IDIuMDA4MTkgMy45OTIxNVYxMi4wMDgyQzIuMDA4MTkgMTIuNTM2MiAyLjQ0MDE5IDEyLjk5MjIgMi45OTIxOSAxMi45OTIySDUuNTM2MTlDNS44NDgxOSAxMy4wNDAyIDYuMTYwMTkgMTMuMDQwMiA2LjQ3MjE5IDEyLjk5MjJIMTEuMDA4MkMxMS41MzYyIDEyLjk5MjIgMTEuOTkyMiAxMi41NjAyIDExLjk5MjIgMTIuMDA4MlY3Ljc4NDE2TDEzLjkzNjIgNS42MjQxNUwxNC4wMDgyIDUuNjcyMTVWMTEuOTg0MkMxNC4wMDgyIDEzLjY2NDIgMTIuNjY0MiAxNS4wMDgyIDExLjAwODIgMTUuMDA4MkgzLjAxNjE5QzEuMzM2MTkgMTUuMDA4MiAtMC4wMDc4MTI1IDEzLjY2NDIgLTAuMDA3ODEyNSAxMS45ODQyVjMuOTkyMTVDLTAuMDA3ODEyNSAyLjMzNjE1IDEuMzM2MTkgMC45OTIxNDkgMy4wMTYxOSAwLjk5MjE0OUgxMC4wMDAyWk0xMS4yNzIyIDIuNjI0MTVMMTIuNjE2MiA0LjExMjE1TDcuNzIwMTkgOS42ODAxNkM3LjUwNDE5IDkuOTIwMTYgNi44MzIxOSAxMC4yMzIyIDUuNjgwMTkgMTAuNjE2MkM1LjY1NjE5IDEwLjY0MDIgNS42MDgxOSAxMC42NDAyIDUuNTYwMTkgMTAuNjE2MkM1LjQ2NDE5IDEwLjU5MjIgNS4zOTIxOSAxMC40NzIyIDUuNDQwMTkgMTAuMzc2MkM1Ljc1MjE5IDkuMjQ4MTYgNi4wNDAxOSA4LjU1MjE2IDYuMjU2MTkgOC4zMTIxNkwxMS4yNzIyIDIuNjI0MTVaTTExLjkyMDIgMS44NTYxNUwxMy4yODgyIDAuMzIwMTQ5QzEzLjY0ODIgLTAuMDg3ODUxNiAxNC4yNzIyIC0wLjExMTg1MiAxNC42ODAyIDAuMjcyMTQ5QzE1LjA4ODIgMC42MzIxNDkgMTUuMTEyMiAxLjI4MDE1IDE0Ljc1MjIgMS42ODgxNUwxMy4yNjQyIDMuMzY4MTVMMTEuOTIwMiAxLjg1NjE1WiIgZmlsbD0iY3VycmVudGNvbG9yIi8+Cjwvc3ZnPgo=","edit-icon"))}static get observedAttributes(){return["label","value","placeholder","required","badge-label","badge-tooltip-text","edit-button-label","delete-button-label","hide-delete"].concat(super.observedAttributes)}handleDeleteButtonVisibility(){this.deleteButton.classList.toggle("hidden",this.isRequired||!this.value||this.isDeleteHidden)}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),t!==o&&("label"===e?this.onLabelChange():"value"===e||"placeholder"===e?this.onValueOrPlaceholderChange():"required"===e?this.onIsRequiredChange():"badge-label"===e?this.onBadgeLabelChange():"badge-tooltip-text"===e?this.onBadgeTooltipTextChange():"edit-button-label"===e?this.updateButtonLabel(this.editButton,this.editButtonLabel):"delete-button-label"===e&&this.updateButtonLabel(this.deleteButton,this.deleteButtonLabel),"value"!==e&&"required"!==e&&"hide-delete"!==e||this.handleDeleteButtonVisibility())}}const{host:kc,textFields:zc,buttons:Lc,badge:Vc,labelText:Nc,contentWrapper:Dc}={host:{selector:()=>":host"},textFields:{selector:"descope-text"},labelText:{selector:'descope-text[data-id="label-text"]'},buttons:{selector:"descope-button"},badge:{selector:"descope-badge"},contentWrapper:{selector:" .content-wrapper"}},Pc=_e(jt({mappings:{hostWidth:{...kc,property:"width"},hostMinWidth:{...kc,property:"min-width"},hostMaxWidth:{...kc,property:"max-width"},hostDirection:[{...kc,property:"direction"},{...zc,property:ko.cssVarList.hostDirection},{...Lc,property:Ni.cssVarList.hostDirection},{...Vc,property:Ac.cssVarList.hostDirection}],labelMinWidth:{...Nc,property:"min-width"},contentMinWidth:{...Dc,property:"min-width"},badgeMaxWidth:{...Vc,property:"max-width"},itemsGap:[{property:"gap"},{...Dc,property:"gap"}],iconColor:[{selector:()=>"::slotted(*)",property:Ei.cssVarList.fill}]}}),$t,_t)(Tc);customElements.define(Sc,Ac),customElements.define(Ec,Pc);const Bc=Je("user-auth-method");class Fc extends(Gt({componentName:Bc,baseSelector:":host > .root"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="root">\n <div class="text-wrapper">\n <slot name="method-icon"></slot>\n <descope-text st-text-align="auto" data-id="label-text" variant="body1" mode="primary"></descope-text>\n </div>\n\n <div class="btn-wrapper">\n <descope-button class="btn unfulfilled hidden" size="sm" variant="link" mode="primary">\n <slot name="button-icon"></slot>\n </descope-button>\n <descope-button class="btn fulfilled hidden" size="sm" variant="link" mode="primary">\n <slot name="fulfilled-button-icon"></slot>\n </descope-button>\n <div class="status-indicator hidden">\n <vaadin-icon src=data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTggMEMzLjYgMCAwIDMuNiAwIDhDMCAxMi40IDMuNiAxNiA4IDE2QzEyLjQgMTYgMTYgMTIuNCAxNiA4QzE2IDMuNiAxMi40IDAgOCAwWk03LjEgMTEuN0wyLjkgNy42TDQuMyA2LjJMNyA4LjlMMTIgNEwxMy40IDUuNEw3LjEgMTEuN1oiIGZpbGw9IiM0Q0FGNTAiLz4KPC9zdmc+Cg==></vaadin-icon>\n </div>\n <descope-button class="hidden-btn" size="sm" variant="link" mode="primary"></descope-button>\n </div>\n </div>\n\t\t',V('\n :host {\n\t\t\t\t\tdisplay: inline-flex;\n\t\t\t\t}\n\n vaadin-icon {\n color: currentcolor;\n }\n\n .root {\n display: flex;\n width: 100%;\n height: 100%;\n align-items: center;\n }\n\n .btn-wrapper {\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-grow: 0;\n }\n\n .text-wrapper {\n display: flex;\n align-items: center;\n flex-grow: 1;\n min-width: 0;\n }\n\n descope-text::part(text-wrapper) {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n width: initial;\n }\n\n descope-text {\n display: inline-flex;\n min-width: 0;\n }\n\n .status-indicator {\n width: 1em;\n height: 1em;\n display: flex;\n align-items: center;\n padding-inline-end: 1em;\n }\n\n .hidden {\n display: none;\n }\n\n .hidden-btn {\n width: 0;\n overflow: hidden;\n opacity: 0;\n pointer-events: none;\n }\n\n slot[name="method-icon"]:not(:empty) {\n display: inline-flex;\n align-items: center;\n }\n ',this),this.unfulfilledButton=this.shadowRoot.querySelector(".btn.unfulfilled"),this.fulfilledButton=this.shadowRoot.querySelector(".btn.fulfilled"),this.statusIndicator=this.shadowRoot.querySelector(".status-indicator"),this.labelText=this.shadowRoot.querySelector('descope-text[data-id="label-text"]')}onLabelChange(){this.labelText.innerText=this.label,this.labelText.setAttribute("title",this.label)}updateButtonLabel(e,t){let o=e.querySelector("span");t?(o||(o=document.createElement("span"),e.appendChild(o)),o.innerText=t):o&&e.removeChild(o)}onFulfilledChange(){this.isFulfilled?(this.unfulfilledButton.classList.add("hidden"),this.handleFulfilled()):(this.fulfilledButton.classList.add("hidden"),this.handleUnfulfilled())}handleFulfilled(){this.fulfilledButton.classList.toggle("hidden",!this.isFulfilledEditable),this.statusIndicator.classList.toggle("hidden",this.isFulfilledEditable)}handleUnfulfilled(){this.unfulfilledButton.classList.toggle("hidden",!this.isUnfulfilledEditable),this.statusIndicator.classList.toggle("hidden",this.isUnfulfilledEditable)}get label(){return this.getAttribute("label")||""}get unfulfilledButtonLabel(){return this.getAttribute("button-label")||""}get fulfilledButtonLabel(){return this.getAttribute("fulfilled-button-label")||""}get isFulfilled(){return"true"===this.getAttribute("fulfilled")}get isFulfilledEditable(){return"true"===this.getAttribute("fulfilled-editable")}get isUnfulfilledEditable(){return"false"!==this.getAttribute("unfulfilled-editable")}init(){this.onLabelChange(),this.updateButtonLabel(this.fulfilledButton,this.fulfilledButtonLabel),this.updateButtonLabel(this.unfulfilledButton,this.unfulfilledButtonLabel),this.onFulfilledChange(),this.unfulfilledButton.addEventListener("click",()=>this.dispatchEvent(new CustomEvent("button-clicked",{bubbles:!0,composed:!0}))),this.fulfilledButton.addEventListener("click",()=>{this.dispatchEvent(new CustomEvent("fulfilled-button-clicked",{bubbles:!0,composed:!0}))})}static get observedAttributes(){return["label","fulfilled","button-label","fulfilled-button-label","fulfilled-editable","unfulfilled-editable"].concat(super.observedAttributes)}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),t!==o&&("label"===e?this.onLabelChange():"fulfilled"===e?this.onFulfilledChange():"button-label"===e?this.updateButtonLabel(this.unfulfilledButton,this.unfulfilledButtonLabel):"fulfilled-button-label"===e?this.updateButtonLabel(this.fulfilledButton,this.fulfilledButtonLabel):"fulfilled-editable"===e&&this.isFulfilled?this.handleFulfilled():"unfulfilled-editable"!==e||this.isFulfilled||this.handleUnfulfilled())}}const{host:Rc,textField:Wc,buttons:Oc,badge:jc,textWrapper:$c,methodIconSlot:_c}={host:{selector:()=>":host"},textField:{selector:"descope-text"},buttons:{selector:"descope-button"},badge:{selector:"descope-badge"},textWrapper:{selector:" .text-wrapper"},methodIconSlot:{selector:'slot[name="method-icon"]:not(:empty)'}},Hc=_e(jt({mappings:{hostWidth:{...Rc,property:"width"},hostMinWidth:{...Rc,property:"min-width"},hostMaxWidth:{...Rc,property:"max-width"},hostDirection:[{...Rc,property:"direction"},{...Wc,property:ko.cssVarList.hostDirection},{...Oc,property:Ni.cssVarList.hostDirection},{...jc,property:Ac.cssVarList.hostDirection}],itemsGap:[{property:"gap"},{...$c,property:"gap"}],iconSize:[{..._c,property:"width"},{..._c,property:"height"}],iconColor:[{selector:()=>"::slotted(*)",property:Ei.cssVarList.fill}]}}),$t,_t)(Fc);customElements.define(Bc,Hc);const qc=Je("saml-group-mappings-internal"),Yc=co({componentName:qc,baseSelector:""}),Uc=Je("saml-group-mappings"),{host:Gc,groupInput:Zc,errorMessage:Qc}={host:{selector:()=>":host"},groupInput:{selector:"descope-text-field"},errorMessage:{selector:"::part(error-message)"}},Jc=_e(jt({mappings:{hostWidth:{...Gc,property:"width"},hostDirection:{...Gc,property:"direction"},groupNameInputMarginBottom:{...Zc,property:"margin-bottom"},errorMessageIcon:{...Qc,property:"background-image"},errorMessageIconSize:{...Qc,property:"background-size"},errorMessageIconPadding:{...Qc,property:"padding-inline-start"},errorMessageIconRepeat:{...Qc,property:"background-repeat"},errorMessageIconPosition:{...Qc,property:"background-position"},errorMessageFontSize:{...Qc,property:"font-size"}}}),$t,io({proxyProps:["value","selectionStart"],inputEvent:"input",triggerValidationEvents:["mapping-item-added","mapping-item-removed"],proxyParentValidation:!0}),_t,e=>class extends e{init(){super.init?.();const e=document.createElement("template");e.innerHTML=`\n <${qc}\n tabindex="-1"\n ></${qc}>\n `,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(qc),Xe(this,this.inputElement,{includeAttrs:["size","full-width","label-group","label-value","label-attr","button-label","separator","options","readonly","disabled"]}),Qe(this,this.inputElement,{includeAttrs:["invalid"]})}})(Qt({slots:[],wrappedEleName:"vaadin-custom-field",style:()=>"\n :host {\n display: inline-flex;\n max-width: 100%;\n direction: ltr;\n }\n\n vaadin-custom-field {\n line-height: unset;\n width: 100%;\n }\n\n descope-text-field {\n width: auto;\n }\n\n descope-mappings-field {\n display: block;\n }\n ",excludeAttrsSync:["tabindex","label-group","label-value","label-attr","button-label","separator","options","error-message","style"],componentName:Uc}));customElements.define(qc,class extends Yc{static get observedAttributes(){return["invalid"].concat(Yc.observedAttributes||[])}constructor(){super(),this.innerHTML='\n <descope-text-field variant="body2" bordered="true"></descope-text-field>\n <descope-mappings-field></descope-mappings-field>\n ',this.groupInputElement=this.querySelector("descope-text-field"),this.mappingsElement=this.querySelector("descope-mappings-field")}resetInvalidIndication(){this.removeAttribute("invalid")}handleMappingsInvalidChange(e){e.includes("invalid")&&(this.mappingsElement.hasAttribute("invalid")||this.resetInvalidIndication())}initFocusHandler(){this.addEventListener("focus",e=>{e.isTrusted&&(this.mappingsElement.checkValidity()?this.groupInputElement:this.mappingsElement).focus()})}init(){this.initFocusHandler(),super.init?.(),Xe(this,this.groupInputElement,{mapAttrs:{"label-group":"label"},includeAttrs:["size","label-group","readonly","disabled"]}),Xe(this,this.mappingsElement,{includeAttrs:["size","full-width","label-value","label-attr","button-label","separator","options","readonly","disabled","data-errormessage-pattern-mismatch"]}),Ue(this.mappingsElement,this.handleMappingsInvalidChange.bind(this),{includeAttrs:["invalid"]})}get value(){return{group:this.groupInputElement.value,mappings:this.mappingsElement.value}}set value(e){e?.group&&"string"==typeof e.group&&(this.groupInputElement.value=e.group),Array.isArray(e?.mappings)&&(this.mappingsElement.value=e.mappings)}getValidity(){return this.groupInputElement.checkValidity()?this.mappingsElement.checkValidity()?{}:this.mappingsElement.validity:this.groupInputElement.validity}#it(e){if(e){if(!this.groupInputElement.checkValidity())return void this.groupInputElement.setAttribute("invalid","true");this.mappingsElement.checkValidity()||this.mappingsElement.setAttribute("invalid","true")}}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),"invalid"===e&&this.#it("true"===o)}}),customElements.define(Uc,Jc);const Kc=Je("radio-button"),Xc=_e(jt({mappings:{cursor:[{},{selector:"label"}],fontSize:[{selector:"label"},{}],labelTextColor:{selector:"label",property:"color"},fontFamily:{selector:"label"},radioSize:[{selector:"::part(radio)",property:"height"},{selector:"::part(radio)",property:"width"}],radioBackgroundColor:{selector:"::part(radio)",property:"background-color"},radioMargin:{selector:"::part(radio)",property:"margin"},radioCheckedSize:{selector:"::part(radio)::after",property:"border-width"},radioCheckedColor:{selector:"::part(radio)::after",property:"border-color"},radioBorderColor:{selector:"::part(radio)",property:"border-color",fallback:"none"},radioBorderWidth:{selector:"::part(radio)",property:"border-width",fallback:0},radioBorderStyle:{selector:"::part(radio)",property:"border-style",fallback:"solid"}}}),io({proxyProps:["setSelectionRange"]}),_t,e=>class extends e{constructor(){super(),this.baseElement.checkValidity=()=>{}}init(){this.baseElement.addEventListener("checked-changed",e=>{this.dispatchEvent(new CustomEvent("checked-changed",{detail:e.detail},{bubbles:!0,composed:!0}))}),super.init?.(),Ge(this,this.renderLabel.bind(this))}renderLabel(){this.baseElement.setAttribute("label",this.textContent)}get value(){return this.getAttribute("value")}})(Qt({slots:[""],wrappedEleName:"vaadin-radio-button",excludeAttrsSync:["tabindex","data","style"],includeForwardProps:["checked","name","disabled"],componentName:Kc})),ep=Je("radio-group"),tp=_e(jt({mappings:{...Yr,buttonsSpacing:{selector:"::part(group-field)",property:"justify-content"},buttonsRowGap:{selector:"::part(group-field)",property:"row-gap"},buttonsColumnGap:{selector:"::part(group-field)",property:"column-gap"},itemsLabelColor:{selector:()=>`::slotted(${Xc.componentName})`,property:Xc.cssVarList.labelTextColor}}}),$t,io({proxyProps:["setSelectionRange"]}),_t,e=>class extends e{#K=({value:e,label:t})=>`<descope-radio-button value="${e}">${t}</descope-radio-button>`;#F;constructor(){super(),Object.defineProperty(this.baseElement,"children",{get:()=>this.querySelectorAll(Kc)}),this.baseElement.__filterRadioButtons=e=>e.filter(e=>e.localName===Kc),this.baseElement.setCustomValidity=()=>{}}get items(){return this.shadowRoot.querySelector("slot").assignedElements()}get size(){return this.getAttribute("size")}get data(){if(this.#F)return this.#F;const e=this.getAttribute("data");if(e)try{const t=JSON.parse(e);if(this.isValidDataType(t))return t}catch(e){console.error('could not parse data string from attribute "data" - ',e.message)}return[]}set data(e){this.isValidDataType(e)&&(this.#F=e,this.renderItems())}get defaultValue(){return this.getAttribute("default-value")}isValidDataType(e){const t=Array.isArray(e);return t||console.error("data must be an array, received:",e),t}getItemsTemplate(){return this.data?.reduce?.((e,t)=>e+(this.#K?.(t||{})||""),"")}renderItems(){const e=this.getItemsTemplate();e&&(this.innerHTML=e)}init(){super.init?.(),this.inputElement=this.baseElement,this.renderItems(),Ue(this,this.renderItems.bind(this),{includeAttrs:["data"]}),Object.defineProperty(this.baseElement,"validity",{get:()=>({valueMissing:!this.baseElement.checkValidity()})}),Xe(this,this.baseElement,{includeAttrs:["layout"],mapAttrs:{layout:"theme"}}),setTimeout(()=>{this.defaultValue&&(this.value=this.defaultValue)}),Ge(this,({addedNodes:e})=>{e.forEach(e=>{e.setAttribute("size",this.size)})}),Ue(this,()=>{this.items.forEach(e=>{e.setAttribute("size",this.size)})},{includeAttrs:["size"]})}})(Qt({slots:["","prefix"],wrappedEleName:"vaadin-radio-group",style:()=>`\n :host {\n display: inline-block;\n max-width: 100%;\n box-sizing: border-box;\n }\n\n vaadin-radio-group {\n padding: 0;\n width: 100%;\n }\n\n ${xt("vaadin-radio-group")}\n `,excludeAttrsSync:["tabindex","size","data","direction","style"],componentName:ep,includeForwardProps:["value"]}));customElements.define(ep,tp),customElements.define(Kc,Xc);const op=()=>!0,ip=e=>`<pre>${JSON.stringify(e,null,4)}</pre>`,rp=Je("scopes-list"),np=["checkbox","switch"];class sp extends(Gt({componentName:rp,baseSelector:"div"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n <div></div>\n\t\t",V("\n :host {\n display: inline-flex;\n }\n\n div {\n display: flex;\n flex-direction: column;\n }\n ",this)}get isReadOnly(){return"true"===this.getAttribute("readonly")}get size(){return this.getAttribute("size")||"sm"}#rt(){return Array.from(this.shadowRoot.querySelector("div").children)}reportValidity(){this.checkValidity()}checkValidity(){return this.data.every(e=>!e.required||this.value.includes(e.id))}get value(){return this.#rt().filter(e=>e.checked).map(e=>e.getAttribute("data-id"))}set value(e=[]){this.#rt().forEach(t=>{t.checked=e.includes(t.getAttribute("data-id"))})}get variant(){const e=this.getAttribute("variant");return np.includes(e)?e:np[0]}}const ap=_e(jt({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDirection:[{selector:()=>":host",property:"direction"},{selector:()=>Mo.componentName,property:Mo.cssVarList.hostDirection},{selector:()=>Zo.componentName,property:Zo.cssVarList.hostDirection}],gap:{selector:()=>"div",property:"gap"},requiredInputBorderColor:[{selector:`${Mo.componentName}[required="true"]`,property:Mo.cssVarList.inputBorderColor},{selector:`${Zo.componentName}[required="true"]`,property:Zo.cssVarList.inputBorderColor}],requiredInputValueTextColor:[{selector:`${Mo.componentName}[required="true"]`,property:Mo.cssVarList.inputValueTextColor},{selector:`${Zo.componentName}[required="true"]`,property:Zo.cssVarList.knobColor}]}}),(({itemRenderer:e=ip,validateSchema:t=op,slotName:o,rerenderAttrsList:i=[]})=>r=>class extends r{#F=[];#W(e){if(!t)return!0;const o=t(e);return!0===o||(console.error("Data schema validation failed",o||""),!1)}#O(){const e=o?`*[slot="${o}"]`:":not([slot])";this.baseElement.querySelectorAll(e).forEach(e=>e.remove())}#j(){this.#O(),this.data.forEach((t,o)=>{const i="string"==typeof(r=e(t,o,this))?(e=>{const t=document.createElement("template");return t.innerHTML=e,t})(r).content:r instanceof HTMLTemplateElement?r.content:(console.error("Invalid template",r),null);var r;this.baseElement.appendChild(i?.cloneNode(!0))})}set data(e){this.#W(e)&&(this.#F=e,this.#j())}get data(){return this.#F}init(){super.init?.(),Ue(this,e=>{e.includes("data")?this.#$():this.#j()},{includeAttrs:[...i,"data"]})}#$(){const e=this.getAttribute("data");if(e)try{this.data=JSON.parse(e)}catch(t){console.warn("Invalid JSON data",e)}}})({itemRenderer:({id:e,desc:t,required:o=!1},i,r)=>{const n="checkbox"===r.variant?Mo:Zo;return`\n <${n.componentName}\n bordered="true"\n size=${r.size}\n label="${t}"\n data-id="${e}"\n readonly="${o||r.isReadOnly}"\n required="${o}"\n checked="true"\n ></${n.componentName}>\n`},rerenderAttrsList:["size","variant"]}),$t,_t)(sp),lp=k("list-item"),dp=I(ce({mappings:{verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],horizontalPadding:[{property:"padding-left"},{property:"padding-right"}],backgroundColor:{},borderColor:{},borderStyle:{},borderWidth:{},borderRadius:{},outline:{},cursor:{},gap:{},maxWidth:{selector:()=>":host"},alignItems:{},flexDirection:{},transition:{}}}),pe,he,e=>class extends e{constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n <slot></slot>\n ",V("\n slot {\n width: 100%;\n display: flex;\n overflow: hidden;\n box-sizing: border-box;\n }\n :host {\n display: block;\n }\n ",this)}},e=>class extends e{init(){super.init?.(),this.baseElement.addEventListener("mousedown",e=>{e.preventDefault(),this.setAttribute("active","true"),window.addEventListener("mouseup",()=>this.removeAttribute("active"),{once:!0})})}})(ye({componentName:lp,baseSelector:"slot"}));customElements.define(lp,dp);const cp=k("list");class pp extends(ye({componentName:cp,baseSelector:".wrapper"})){static get observedAttributes(){return["variant","readonly"]}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="wrapper">\n <slot></slot>\n <slot name="empty-state">\n No item...\n </slot>\n </div>\n\t',V('\n .wrapper {\n overflow: auto;\n display: grid;\n max-height: 100%;\n width: 100%;\n }\n\n :host {\n display: inline-flex;\n width: 100%;\n }\n slot[name="empty-state"] {\n justify-content: center;\n align-items: center;\n display: flex;\n flex-grow: 1;\n }\n\n :host slot[name="empty-state"] {\n display: none;\n }\n :host([empty]) slot[name="empty-state"] {\n display: flex;\n }\n ::slotted(:not([slot])) {\n width: 100%;\n }\n ',this)}get items(){return this.shadowRoot.querySelector("slot").assignedElements()}#nt(){0===this.items.length?this.setAttribute("empty","true"):this.removeAttribute("empty")}get variant(){return this.getAttribute("variant")||"list"}#st(){this.items.forEach(e=>{let t=e;t.localName!==dp.componentName&&(t=e.querySelector(dp.componentName));const o="tiles"===this.variant?"tile":"row";t?.setAttribute("variant",o)})}init(){super.init?.(),A(this,()=>{this.#nt(),this.#st(),this.#at()})}get isReadOnly(){return"true"===this.getAttribute("readonly")}#at(){this.items.forEach(e=>{this.isReadOnly?e.setAttribute("inert",""):e.removeAttribute("inert")})}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),o!==t&&("variant"===e?this.#st():"readonly"===e&&this.#at())}}const hp=I(ce({mappings:{hostWidth:{selector:()=>":host",property:"width"},maxHeight:{selector:()=>":host"},minHeight:{},verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],horizontalPadding:[{property:"padding-left"},{property:"padding-right"}],hostDirection:{selector:()=>":host",property:"direction"},fontFamily:{},gap:{},backgroundColor:{},borderRadius:{},borderColor:{},borderStyle:{},borderWidth:{},boxShadow:{},gridTemplateColumns:{},maxItemsWidth:{selector:()=>"::slotted(:not([slot]))",property:"max-width"},minItemsWidth:{selector:()=>"::slotted(:not([slot]))",property:"min-width"},maxRowItems:{property:"max-row-items"},itemsHorizontalAlign:{selector:()=>"::slotted(*)",property:"justify-self"},emptyStateTextColor:{selector:()=>'slot[name="empty-state"]',property:"color"},emptyStateTextFontFamily:{selector:()=>'slot[name="empty-state"]',property:"font-family"}}}),pe,he)(pp);customElements.define(cp,hp),customElements.define(rp,ap);const up=Je("third-party-app-logo");class gp extends(Gt({componentName:up,baseSelector:".wrapper"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n\t\t\t<div class="wrapper">\n <div class="third-party-app-logo-wrapper">\n <div class="third-party-app-logo"></div>\n </div>\n <div class="arrows">\n <descope-icon src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjkiIGhlaWdodD0iMjgiIHZpZXdCb3g9IjAgMCAyOSAyOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTkuMTQ0OTIgMTUuNjQ1TDcuNDk5OTIgMTRMMi44MzMyNSAxOC42NjY3TDcuNDk5OTIgMjMuMzMzM0w5LjE0NDkyIDIxLjY4ODNMNy4zMDE1OSAxOS44MzMzSDI0Ljk5OTlWMTcuNUg3LjMwMTU5TDkuMTQ0OTIgMTUuNjQ1WiIgZmlsbD0iIzYzNkM3NCIvPgo8cGF0aCBkPSJNMTkuODU1IDEyLjM1NTNMMjEuNSAxNC4wMDAzTDI2LjE2NjcgOS4zMzM2NkwyMS41IDQuNjY2OTlMMTkuODU1IDYuMzExOTlMMjEuNjk4MyA4LjE2Njk5SDRWMTAuNTAwM0gyMS42OTgzTDE5Ljg1NSAxMi4zNTUzWiIgZmlsbD0iIzYzNkM3NCIvPgo8L3N2Zz4K"></descope-icon>\n </div>\n <div class="company-logo-wrapper">\n <descope-logo st-height="100%"></descope-logo>\n </div>\n </div>\n\t\t\t',V('\n :host {\n\t\t\t\t\tdisplay: inline-flex;\n\t\t\t\t}\n\t\t\t\t:host([draggable="true"]) > div {\n\t\t\t\t\tpointer-events: none\n\t\t\t\t}\n\n .wrapper {\n display: flex;\n justify-content: center;\n align-items: center;\n min-width: max-content;\n }\n\n\t\t\t\t.third-party-app-logo {\n flex-shrink: 0;\n\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\tmax-width: 100%;\n\t\t\t\t\tmax-height: 100%;\n\t\t\t\t\tobject-fit: contain;\n\t\t\t\t}\n\n .company-logo-wrapper, .third-party-app-logo-wrapper {\n flex-shrink: 0;\n display: inline-flex;\n }\n\n .company-logo-wrapper {\n justify-content: flex-end;\n }\n\n .third-party-app-logo-wrapper {\n justify-content: flex-start;\n }\n\n .arrows {\n flex-shrink: 0;\n display: flex;\n }\n ',this)}}const mp=">.company-logo-wrapper",bp=">.third-party-app-logo-wrapper",yp=_e(jt({mappings:{logoMaxHeight:[{selector:mp,property:"height"},{selector:bp,property:"height"}],logoMaxWidth:[{selector:mp,property:"max-width"},{selector:bp,property:"max-width"}],thirdPartyAppLogo:{selector:()=>".third-party-app-logo",property:"content",fallback:{}},companyLogoFallback:{selector:In.componentName,property:In.cssVarList.fallbackUrl},gap:{},arrowsColor:{selector:Ei.componentName,property:Ei.cssVarList.fill}}}),$t,_t)(gp);customElements.define(up,yp);const fp=Je("security-questions-setup"),vp=["full-width","readonly","size","label-type","question-label","question-placeholder","question-data-errormessage-value-missing","answer-label","answer-placeholder","answer-data-errormessage-value-missing","st-error-message-icon","st-error-message-icon-size","st-error-message-icon-padding"],xp=["count","questions"];class Cp extends(Gt({componentName:fp,baseSelector:"div"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n <div></div>\n\t\t",V("\n :host {\n display: inline-flex;\n }\n\n div {\n display: flex;\n flex-direction: column;\n }\n ",this)}get count(){return Number(this.getAttribute("count"))||0}#lt(){const e=Array.from({length:this.count}).map((e,t)=>`\n <div class="question-wrapper">\n <descope-combo-box\n data-id="${t}"\n item-label-path="data-name"\n item-value-path="data-id"\n bordered="true"\n required="true"\n clear-button-visible="true"\n ></descope-combo-box>\n\n <descope-text-field\n data-id="${t}"\n required="true"\n bordered="true"\n minlength="2"\n ></descope-text-field>\n </div>\n `);this.baseElement.innerHTML=e.join("<spacer></spacer><descope-divider></descope-divider><spacer></spacer>"),this.comboBoxes.forEach(e=>{e.addEventListener("change",e=>{this.updateRemainingCombosData(e.target),this.getAttachedTextField(e.target).value=""}),e.data=this.data}),this.#dt(vp)}getAttachedTextField(e){const t=`descope-text-field[data-id="${e.getAttribute("data-id")}"]`;return this.baseElement.querySelector(t)}filterData(e){const t=this.data.filter(t=>t.value===e||!this.selectedQuestionIds.includes(t.value));return t}reportValidity(){return this.inputs.reverse().forEach(e=>e.reportValidity()),this.checkValidity()}checkValidity(){return[...this.comboBoxes,...this.textFields].every(e=>e.checkValidity())}updateRemainingCombosData(e){this.comboBoxes.filter(t=>t!==e).forEach(e=>{e.data=this.filterData(e.value)})}get questions(){try{return JSON.parse(this.getAttribute("questions"))||[]}catch(e){return console.error(fp,"Error parsing questions attribute",e),[]}}get data(){return this.questions.map(({id:e,text:t})=>({value:e,label:t}))}get comboBoxes(){return Array.from(this.baseElement.querySelectorAll("descope-combo-box"))}get textFields(){return Array.from(this.baseElement.querySelectorAll("descope-text-field"))}get inputs(){return Array.from(this.baseElement.querySelectorAll("descope-combo-box, descope-text-field"))}get selectedQuestionIds(){return this.comboBoxes.map(e=>e.value)}get value(){return this.comboBoxes.map(e=>({id:e.value,answer:this.getAttachedTextField(e).value}))}set value(e=[]){e.forEach((e,t)=>{const o=this.comboBoxes[t],i=this.getAttachedTextField(o);o.value=e.id,i.value=e.answer})}#ct(e,t,o){null===o?e.removeAttribute(t):e.setAttribute(t,o)}#dt(e){const t={question:this.comboBoxes,answer:this.textFields};e.forEach(e=>{const[o,...i]=e.split("-"),r=t[o]||this.inputs,n=t[o]?i.join("-"):e;r.forEach(t=>{this.#ct(t,n,this.getAttribute(e))})})}init(){super.init?.(),Ue(this,()=>{this.#lt()},{includeAttrs:xp}),Ue(this,this.#dt.bind(this),{includeAttrs:vp})}}const wp=_e(jt({mappings:{hostWidth:[{selector:()=>":host",property:"width"},{property:"width"}],hostDirection:[{selector:()=>":host",property:"direction"},{selector:()=>xi.componentName,property:xi.cssVarList.hostDirection},{selector:()=>Zr.componentName,property:Zr.cssVarList.hostDirection}],gap:{selector:()=>"div",property:"gap"}}}),$t,_t)(Cp);customElements.define(fp,wp);const Ip=Je("security-questions-verify"),Sp=["full-width","readonly","size","answer-placeholder","answer-data-errormessage-value-missing","st-error-message-icon","st-error-message-icon-size","st-error-message-icon-padding"],Mp=["question-mode"],Ap={"answer-placeholder":"placeholder","answer-data-errormessage-value-missing":"data-errormessage-value-missing","question-mode":"mode"},Ep=[...Sp,...Mp],Tp=["questions"];class kp extends(Gt({componentName:Ip,baseSelector:"div"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n <div></div>\n\t\t",V("\n :host {\n display: inline-flex;\n }\n\n div {\n display: flex;\n flex-direction: column;\n }\n ",this)}#lt(){const e=this.questions.map(({id:e,text:t})=>`\n <div class="question-wrapper">\n <descope-text\n data-id="${e}"\n >${t}</descope-text>\n\n <descope-text-field\n data-id="${e}"\n required="true"\n bordered="true"\n ></descope-text-field>\n </div>\n `);this.baseElement.innerHTML=e.join("<spacer></spacer><descope-divider></descope-divider><spacer></spacer>"),this.#dt(Ep),this.texts.forEach(e=>{const t=this.textFields.find(t=>t.getAttribute("data-id")===e.getAttribute("data-id"));t&&(e.onclick=t.focus.bind(t))})}reportValidity(){return this.textFields.reverse().forEach(e=>e.reportValidity()),this.checkValidity()}checkValidity(){return this.textFields.every(e=>e.checkValidity())}get questions(){try{return JSON.parse(this.getAttribute("questions"))||[]}catch(e){return console.error(Ip,"Error parsing questions attribute",e),[]}}get texts(){return Array.from(this.baseElement.querySelectorAll("descope-text"))}get textFields(){return Array.from(this.baseElement.querySelectorAll("descope-text-field"))}get elements(){return Array.from(this.baseElement.querySelectorAll("descope-text, descope-text-field"))}get value(){return this.textFields.map(e=>({id:e.getAttribute("data-id"),answer:e.value}))}set value(e=[]){e.forEach(({id:e,answer:t})=>{const o=this.textFields.find(t=>t.getAttribute("data-id")===e);o&&(o.value=t)})}#ct(e,t,o){null===o?e.removeAttribute(t):e.setAttribute(t,o)}#pt(e){switch(!0){case Sp.includes(e):return this.textFields;case Mp.includes(e):return this.texts;default:return[]}}#dt(e){e.forEach(e=>{this.#pt(e).forEach(t=>{this.#ct(t,Ap[e]||e,this.getAttribute(e))})})}init(){super.init?.(),Ue(this,()=>{this.#lt()},{includeAttrs:Tp}),Ue(this,this.#dt.bind(this),{includeAttrs:Ep})}}const zp=_e(jt({componentNameOverride:Je("input-wrapper")}),jt({mappings:{hostWidth:[{selector:()=>":host",property:"width"},{property:"width"}],hostDirection:[{selector:()=>":host",property:"direction"},{selector:()=>ko.componentName,property:ko.cssVarList.hostDirection},{selector:()=>Zr.componentName,property:Zr.cssVarList.hostDirection}],gap:{selector:()=>"div",property:"gap"},questionTextAlign:{selector:()=>ko.componentName,property:ko.cssVarList.textAlign},questionFontSize:{selector:()=>ko.componentName,property:ko.cssVarList.fontSize},questionFontFamily:{selector:()=>ko.componentName,property:ko.cssVarList.fontFamily},questionCursor:{selector:()=>ko.componentName,property:"cursor"},errorMessageIcon:{selector:()=>ko.componentName,property:ko.cssVarList.errorMessageIcon},errorMessageIconSize:{selector:()=>ko.componentName,property:ko.cssVarList.errorMessageSize},errorMessageIconPadding:{selector:()=>ko.componentName,property:ko.cssVarList.errorMessagePadding},errorMessageIconRepeat:{selector:()=>ko.componentName,property:ko.cssVarList.errorMessageRepeat},errorMessageIconPosition:{selector:()=>ko.componentName,property:ko.cssVarList.errorMessagePosition},errorMessageFontSize:{selector:()=>ko.componentName,property:ko.cssVarList.errorMessageFontSize}}}),$t,_t)(kp);customElements.define(Ip,zp);const Lp=/[^\d\s+\-()]/,Vp=Je("hybrid-field"),Np={shared:["label","bordered","full-width","label-type","size","disabled","readonly","required","st-host-direction","st-error-message-icon","st-error-message-icon-size","st-error-message-icon-padding"],email:["placeholder","data-errormessage-value-missing-email","data-errormessage-pattern-mismatch-email","external-input"],phone:{countryCode:["phone-input-label","country-input-label","country-input-placeholder","restrict-countries","default-code","phone-minlength","phone-format-value","phone-strict-validation","phone-input-type","data-errormessage-value-missing-phone"],inputBox:["restrict-countries","default-code","phone-minlength","phone-format-value","phone-strict-validation","phone-input-type","data-errormessage-value-missing-phone"]}},Dp={email:{"data-errormessage-value-missing-email":"data-errormessage-value-missing","data-errormessage-pattern-mismatch-email":"data-errormessage-pattern-mismatch"},phone:{"phone-input-label":"label","phone-minlength":"minlength","phone-format-value":"format-value","phone-strict-validation":"strict-validation","data-errormessage-value-missing-phone":"data-errormessage-value-missing"}},Pp="descope-phone-field",Bp=Gt({componentName:Vp,baseSelector:"div"}),Fp=_e(jt({componentNameOverride:Je("input-wrapper")}),jt({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDirection:[{selector:()=>"descope-email-field",property:"direction"},{selector:()=>"descope-phone-field",property:"direction"},{selector:()=>"descope-phone-input-box-field",property:"direction"}],errorMessageIcon:[{selector:()=>_s.componentName,property:_s.cssVarList.errorMessageIcon},{selector:()=>sa.componentName,property:sa.cssVarList.errorMessageIcon}],errorMessageIconSize:[{selector:()=>_s.componentName,property:_s.cssVarList.errorMessageIconSize},{selector:()=>sa.componentName,property:sa.cssVarList.errorMessageIconSize}],errorMessageIconPadding:[{selector:()=>_s.componentName,property:_s.cssVarList.errorMessageIconPadding},{selector:()=>sa.componentName,property:sa.cssVarList.errorMessageIconPadding}],errorMessageIconRepeat:[{selector:()=>_s.componentName,property:_s.cssVarList.errorMessageIconRepeat},{selector:()=>sa.componentName,property:sa.cssVarList.errorMessageIconRepeat}],errorMessageIconPosition:[{selector:()=>_s.componentName,property:_s.cssVarList.errorMessageIconPosition},{selector:()=>sa.componentName,property:sa.cssVarList.errorMessageIconPosition}],errorMessageFontSize:[{selector:()=>_s.componentName,property:_s.cssVarList.errorMessageFontSize},{selector:()=>sa.componentName,property:sa.cssVarList.errorMessageFontSize}],labelFontWeight:[{selector:()=>_s.componentName,property:_s.cssVarList.labelFontWeight},{selector:()=>sa.componentName,property:sa.cssVarList.labelFontWeight}],inputValueFontWeight:[{selector:()=>_s.componentName,property:_s.cssVarList.inputValueFontWeight},{selector:()=>sa.componentName,property:sa.cssVarList.inputValueFontWeight}],inputPlaceholderFontWeight:[{selector:()=>_s.componentName,property:_s.cssVarList.inputPlaceholderFontWeight},{selector:()=>sa.componentName,property:sa.cssVarList.inputPlaceholderFontWeight}],helperTextFontWeight:[{selector:()=>_s.componentName,property:_s.cssVarList.helperTextFontWeight},{selector:()=>sa.componentName,property:sa.cssVarList.helperTextFontWeight}],errorMessageFontWeight:[{selector:()=>_s.componentName,property:_s.cssVarList.errorMessageFontWeight},{selector:()=>sa.componentName,property:sa.cssVarList.errorMessageFontWeight}]}}),$t,_t)(class extends Bp{#ht=!1;#ut;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML=`\n <div class="wrapper">\n <descope-email-field external-input="${this.isExternalInput}"></descope-email-field>\n <descope-phone-field allow-alphanumeric-input="true" phone-input-type="text"></descope-phone-field>\n <descope-phone-input-box-field allow-alphanumeric-input="true" phone-input-type="text"></descope-phone-input-box-field>\n </div>\n\t\t`,V("\n :host {\n display: inline-flex;\n box-sizing: border-box;\n padding: 0;\n gap: 0;\n }\n .wrapper {\n display: grid;\n width: 100%;\n }\n descope-email-field,\n descope-phone-field,\n descope-phone-input-box-field {\n grid-area: 1/1;\n width: 100%;\n height: 100%;\n }\n .hidden {\n visibility: hidden;\n }\n ",this)}get isExternalInput(){return"true"===this.getAttribute("external-input")}get emailInputEle(){return this.isExternalInput?this.emailInput.externalInput:this.emailInput.inputElement}get phoneVariant(){return"inputBox"===this.getAttribute("phone-variant")?this.phoneInputBoxInput:this.phoneCountryCodeInput}get defaultCode(){const e=this.phoneCountryCodeInput.countryCodes?.[0]||"";return this.getAttribute("default-code")||e}get activeInputEle(){return this.activeInput===this.emailInput?this.emailInputEle:this.phoneVariant.phoneNumberInputEle}get value(){return this.activeInput?.value||""}set value(e){this.handleActiveInput(e),setTimeout(()=>{this.activeInput.value=e})}async init(){super.init?.(),this.initInputs(),this.updateAttrs(),this.toggleInputVisibility(),await this.waitForInputs(),this.initInputEles(),this.overrideEmailInputType(),this.overrideEmailSetAttribute()}waitForInputs(){return new Promise(e=>{const t=setInterval(()=>{this.emailInputEle&&(clearInterval(t),e())})})}initInputs(){this.emailInput=this.shadowRoot.querySelector("descope-email-field"),this.phoneCountryCodeInput=this.shadowRoot.querySelector(Pp),this.phoneInputBoxInput=this.shadowRoot.querySelector("descope-phone-input-box-field"),this.inputs=[this.emailInput,this.phoneCountryCodeInput,this.phoneInputBoxInput],this.activeInput=this.emailInput}initInputEles(){[this.emailInputEle,this.phoneCountryCodeInput.phoneNumberInputEle,this.phoneInputBoxInput.phoneNumberInputEle].forEach(e=>{e.addEventListener("input",this.onValueChange.bind(this))})}overrideEmailInputType(){this.emailInputEle.addEventListener("focus",()=>{this.emailInputEle.setAttribute("type","text")}),this.emailInputEle.addEventListener("blur",()=>{setTimeout(()=>{this.emailInputEle.setAttribute("type","email")})})}overrideEmailSetAttribute(){const e=this.emailInput.setAttribute.bind(this.emailInputEle);this.emailInputEle.setAttribute=(t,o)=>("type"!==t||"email"!==o||!this.emailInput.hasAttribute("focused"))&&e(t,o)}updateAttrs(){Xe(this,this.emailInput,{includeAttrs:Np.email,mapAttrs:Dp.email}),Xe(this,this.phoneCountryCodeInput,{includeAttrs:Np.phone.countryCode,mapAttrs:Dp.phone}),Xe(this,this.phoneInputBoxInput,{includeAttrs:Np.phone.inputBox,mapAttrs:Dp.phone}),this.inputs.forEach(e=>Xe(this,e,{includeAttrs:Np.shared})),setTimeout(()=>this.phoneCountryCodeInput.setAttribute("default-code",this.defaultCode))}onValueChange(){this.#ut=this.activeInputEle.selectionStart,this.handleActiveInput(this.activeInputEle.value||this.activeInput.value)}handleActiveInput(e){const t=(e=>!!e&&!Lp.test(e))(e)?this.phoneVariant:this.emailInput;this.activeInput!==t&&this.setActiveInput(t)}setActiveInput(e){const t=this.activeInputEle.value||this.activeInput.value;this.activeInput=e,this.setActiveInputValue(t),this.#ht&&this.activeInput.reportValidity(),this.setActiveInputSelectionStart(),this.toggleInputVisibility()}setActiveInputSelectionStart(){setTimeout(()=>{this.activeInputEle.focus(),this.activeInputEle.setSelectionRange?.(this.#ut,this.#ut)})}#gt(){const e=this.getAttribute("default-code"),t=e&&_s.CountryCodes.find(t=>t.code===e);return t?.dialCode||_s.CountryCodes[0]?.dialCode||""}setActiveInputValue(e){const t=(e=>e.replace(/\+\d+-/,""))(e);if(this.activeInput.localName===Pp){const e=this.phoneCountryCodeInput.countryCodeItems||this.#gt();this.activeInput.value=`${e}-${t}`}else this.activeInput.value=t}toggleInputVisibility(){this.inputs.forEach(e=>{e!==this.activeInput?e.classList.add("hidden"):e.classList.remove("hidden")})}reportValidity(){this.#ht=!0;const e=this.activeInputEle,t=e.type;return e.setAttribute("type","text"),setTimeout(()=>{e.setSelectionRange?.(e.value.length,e.value.length),e.setAttribute("type",t)}),this.activeInput.reportValidity()}checkValidity(){return this.activeInput.checkValidity()}});customElements.define(Vp,Fp);const Rp=Je("alert");class Wp extends(Gt({componentName:Rp,baseSelector:":host > div"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div>\n <div class="icon"></div>\n <div class="content">\n <descope-enriched-text>\n <slot></slot>\n </descope-enriched-text>\n </div>\n </div>\n ',V('\n :host {\n display: inline-flex;\n }\n :host > div {\n display: flex;\n width: 100%;\n }\n :host([empty="true"]) {\n display: none;\n }\n .icon {\n flex-shrink: 0;\n }\n .content {\n display: flex;\n flex-wrap: wrap;\n white-space: normal;\n overflow-wrap: break-word;\n }\n ',this)}init(){super.init?.(),this.slotEle=this.shadowRoot.querySelector("slot"),this.textComp=this.shadowRoot.querySelector("descope-enriched-text"),this.slotEle.addEventListener("slotchange",this.handleSlotChange.bind(this)),T(this.textComp,this,{includeAttrs:["empty"]}),A(this,this.handleChildrenChange.bind(this)),Xe(this,this.textComp,{includeAttrs:["variant","full-width","link-target-blank"]})}handleChildrenChange(){this.textComp.textContent=this.textContent}handleSlotChange(){const e=this.slotEle.assignedNodes({flatten:!0});e.length&&(this.textComp.textContent=e[0]?.textContent||"")}}const{icon:Op}={icon:{selector:()=>".icon"}},jp=_e(jt({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDirection:{selector:()=>":host",property:"direction"},textColor:{selector:Oe.componentName,property:Oe.cssVarList.textColor},backgroundColor:{},borderColor:{},borderWidth:{},borderStyle:{},borderRadius:{},fontSize:[{},{selector:Oe.componentName,property:Oe.cssVarList.fontSize}],gap:{},horizontalPadding:[{property:"padding-top"},{property:"padding-bottom"}],verticalPadding:[{property:"padding-right"},{property:"padding-left"}],alignItems:{},justifyContent:[{},{selector:Oe.componentName,property:Oe.cssVarList.textAlign}],icon:[{...Op,property:"content"},{...Op,property:"display",fallback:"none"}],iconSize:[{...Op,property:"width"},{...Op,property:"height"}]}}),jt({componentNameOverride:Je("enriched-text")}),jt({componentNameOverride:Je("text")}),$t,_t)(Wp);customElements.define(Rp,jp);const $p=Je("hcaptcha"),_p=["enabled","site-key"],Hp=co({componentName:$p,baseSelector:":host > div"}),qp=_e(jt({mappings:{hostWidth:[{selector:()=>":host",property:"width"}],hostDirection:{property:"direction"},verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],horizontalPadding:[{property:"padding-left"},{property:"padding-right"}],maxHeight:[{selector:">img",property:"height"},{selector:">#hcaptcha",property:"height"}],maxWidth:[{selector:">img",property:"max-width"},{selector:">hcaptcha",property:"max-width"}]}}),$t,_t)(class extends Hp{static get observedAttributes(){return _p.concat(Hp.observedAttributes||[])}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),t!==o&&"enabled"===e&&this.toggleCaptchaEles("true"===o)}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="badge">\n <span id="hcaptcha"></span>\n <input id="hcaptcha-input" type="hidden" name="hcaptcha" required />\n <img src="https://imgs.descope.com/connectors/templates/hcaptcha/hcaptcha-big.png" alt="hcaptcha"/>\n </div>\n <slot></slot>\n\t',V("\n :host {\n display: inline-flex;\n }\n :host > div:not(.hidden) {\n display: flex;\n }\n :host #hcaptcha-input {\n display: none;\n }\n :host #hcaptcha .hcaptcha-logo {\n height: 100%;\n }\n :host #hcaptcha {\n\t\t\t\twidth: 100%;\n height: 100%;\n\t\t\t}\n :host img {\n max-width: 100%;\n max-height: 100%;\n object-fit: contain;\n }\n .hidden {\n display: none;\n }\n ",this),this.captchaEle=this.shadowRoot.querySelector("#hcaptcha"),this.mockCaptchaEle=this.shadowRoot.querySelector("img"),this.badge=this.shadowRoot.querySelector(".badge"),this.inputElement=this.shadowRoot.querySelector("input")}init(){super.init?.(),A(this,this.updatePreview.bind(this)),this.inputElement.getValidity=null,this.inputElement.checkValidity=null}toggleCaptchaEles(e){e?(this.captchaEle.style.display="",this.mockCaptchaEle.style.display="none"):(this.captchaEle.style.display="none",this.mockCaptchaEle.style.display="")}updatePreview(){this.toggleCaptchaEles(this.enabled)}getValidity(){return this.inputElement.value?{}:{valueMissing:!0}}checkValidity(){return!!this.inputElement.value}get siteKey(){return this.getAttribute("site-key")}get enabled(){return"true"===this.getAttribute("enabled")}});customElements.define($p,qp);const Yp=(th={surface:{main:"#ffffff",dark:"#636c74",light:"#cfd3d7",highlight:"#f4f5f6",contrast:"#181a1c"},primary:{main:"#006af5",dark:"#004094",light:"#71aeff",highlight:"#f0f6ff",contrast:"#ffffff"},secondary:{main:"#802ed6",dark:"#6410bc",light:"#be89f5",highlight:"#ede7f6",contrast:"#ffffff"},success:{main:"#008000",dark:"#005700",light:"#8bc38b",highlight:"#f5faf5",contrast:"#ffffff"},error:{main:"#e21d12",dark:"#b3170f",light:"#f4807a",highlight:"#fef1f1",contrast:"#ffffff"},warning:{main:"#c45512",dark:"#a24309",light:"#ff985a",highlight:"#fdf0e5",contrast:"#ffffff"}},Object.keys(th).reduce((e,t)=>{const o=th[t];return Object.assign(e,{[t]:ht(o)})},{})),Up={font1:{family:["Roboto","ui-sans-serif","system-ui","-apple-system","BlinkMacSystemFont","Segoe UI","Helvetica Neue","Arial","Noto Sans","sans-serif","Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"],label:"Roboto",url:"https://fonts.googleapis.com/css?family=Roboto:100,200,300,400,500,600,700,800,900"},font2:{family:["ui-sans-serif","system-ui","-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Helvetica Neue","Arial","Noto Sans","sans-serif","Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"],label:"Sans Serif"}},Gp=Mt({fonts:Up}).fonts,Zp={colors:Yp,typography:{h1:{font:Gp.font1.family,weight:"900",size:"48px"},h2:{font:Gp.font1.family,weight:"800",size:"38px"},h3:{font:Gp.font1.family,weight:"600",size:"28px"},subtitle1:{font:Gp.font2.family,weight:"500",size:"22px"},subtitle2:{font:Gp.font2.family,weight:"400",size:"20px"},body1:{font:Gp.font1.family,weight:"400",size:"16px"},body2:{font:Gp.font1.family,weight:"400",size:"14px"}},spacing:{xs:"2px",sm:"4px",md:"8px",lg:"16px",xl:"32px"},border:{xs:"1px",sm:"2px",md:"3px",lg:"4px",xl:"5px"},radius:{xs:"5px",sm:"10px",md:"15px",lg:"20px",xl:"25px","2xl":"30px","3xl":"35px"},shadow:{wide:{sm:"0 2px 3px -0.5px",md:"0 4px 6px -1px",lg:"0 10px 15px -3px",xl:"0 20px 25px -5px","2xl":"0 25px 50px -12px"},narrow:{sm:"0 1px 2px -1px",md:"0 2px 4px -2px",lg:"0 4px 6px -4px",xl:"0 8px 10px -6px","2xl":"0 16px 16px -8px"}},fonts:Up,direction:"ltr"},Qp=(e=>It(e,[],e=>wt({},e,Ct(e))))(Zp),Jp=(e=>Object.keys(e).reduce((t,o)=>{const i=e[o];return Object.assign(t,{[o]:Y(i)})},{}))({surface:{main:"#ffffff",dark:"#636c74",light:"#cfd3d7",highlight:"#f4f5f6",contrast:"#181a1c"},primary:{main:"#006af5",dark:"#004094",light:"#71aeff",highlight:"#f0f6ff",contrast:"#ffffff"},secondary:{main:"#802ed6",dark:"#6410bc",light:"#be89f5",highlight:"#ede7f6",contrast:"#ffffff"},success:{main:"#008000",dark:"#005700",light:"#8bc38b",highlight:"#f5faf5",contrast:"#ffffff"},error:{main:"#e21d12",dark:"#b3170f",light:"#f4807a",highlight:"#fef1f1",contrast:"#ffffff"},warning:{main:"#c45512",dark:"#a24309",light:"#ff985a",highlight:"#fdf0e5",contrast:"#ffffff"}}),Kp={font1:{family:["Roboto","ui-sans-serif","system-ui","-apple-system","BlinkMacSystemFont","Segoe UI","Helvetica Neue","Arial","Noto Sans","sans-serif","Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"],label:"Roboto",url:"https://fonts.googleapis.com/css?family=Roboto:100,200,300,400,500,600,700,800,900"},font2:{family:["ui-sans-serif","system-ui","-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Helvetica Neue","Arial","Noto Sans","sans-serif","Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"],label:"Sans Serif"}},Xp=te({fonts:Kp}).fonts,eh={colors:Jp,typography:{h1:{font:Xp.font1.family,weight:"900",size:"48px"},h2:{font:Xp.font1.family,weight:"800",size:"38px"},h3:{font:Xp.font1.family,weight:"600",size:"28px"},subtitle1:{font:Xp.font2.family,weight:"500",size:"22px"},subtitle2:{font:Xp.font2.family,weight:"400",size:"20px"},body1:{font:Xp.font1.family,weight:"400",size:"16px"},body2:{font:Xp.font1.family,weight:"400",size:"14px"}},spacing:{xs:"2px",sm:"4px",md:"8px",lg:"16px",xl:"32px"},border:{xs:"1px",sm:"2px",md:"3px",lg:"4px",xl:"5px"},radius:{xs:"5px",sm:"10px",md:"15px",lg:"20px",xl:"25px","2xl":"30px","3xl":"35px"},shadow:{wide:{sm:"0 2px 3px -0.5px",md:"0 4px 6px -1px",lg:"0 10px 15px -3px",xl:"0 20px 25px -5px","2xl":"0 25px 50px -12px"},narrow:{sm:"0 1px 2px -1px",md:"0 2px 4px -2px",lg:"0 4px 6px -4px",xl:"0 8px 10px -6px","2xl":"0 16px 16px -8px"}},fonts:Kp,direction:"ltr"};var th;(e=>{ee(e,[],e=>X({},e,K(e)))})(eh);const oh=te(eh),ih=Ni.cssVarList,rh={primary:oh.colors.primary,secondary:oh.colors.secondary,success:oh.colors.success,error:oh.colors.error,surface:oh.colors.surface},[nh,sh,ah]=ie({mode:rh},Ti),lh={...nh,[ih.fontFamily]:oh.fonts.font1.family,[ih.fontWeight]:"400",[ih.cursor]:"pointer",[ih.hostHeight]:"3em",[ih.hostWidth]:"auto",[ih.hostDirection]:oh.direction,[ih.borderRadius]:oh.radius.sm,[ih.borderWidth]:oh.border.xs,[ih.borderStyle]:"solid",[ih.borderColor]:"transparent",[ih.labelSpacing]:"0.25em",[ih.textAlign]:"center",textAlign:{right:{[ih.textAlign]:"right"},left:{[ih.textAlign]:"left"},center:{[ih.textAlign]:"center"}},[ih.verticalPadding]:"1em",[ih.horizontalPadding]:"0.875em",[ih.outlineWidth]:eh.border.sm,[ih.outlineOffset]:"0px",[ih.outlineStyle]:"solid",[ih.outlineColor]:"transparent",[ih.iconSize]:"1.5em",size:{xs:{[ih.fontSize]:"12px"},sm:{[ih.fontSize]:"14px"},md:{[ih.fontSize]:"16px"},lg:{[ih.fontSize]:"18px"}},_square:{[ih.hostHeight]:"3em",[ih.hostWidth]:"3em",[ih.verticalPadding]:"0"},_fullWidth:{[ih.hostWidth]:"100%"},_loading:{[ih.cursor]:"wait",[ih.labelTextColor]:sh.main},_disabled:{[ah.main]:oh.colors.surface.light,[ah.dark]:oh.colors.surface.dark,[ah.light]:oh.colors.surface.light,[ah.contrast]:oh.colors.surface.main,[ih.iconColor]:oh.colors.surface.main},variant:{contained:{[ih.labelTextColor]:sh.contrast,[ih.backgroundColor]:sh.main,_hover:{[ih.backgroundColor]:sh.dark,_loading:{[ih.backgroundColor]:sh.main}},_active:{[ih.backgroundColor]:sh.main}},outline:{[ih.labelTextColor]:sh.main,[ih.borderColor]:sh.main,_hover:{[ih.labelTextColor]:sh.dark,[ih.borderColor]:sh.dark},_active:{[ih.labelTextColor]:sh.main,[ih.borderColor]:sh.main}},link:{[ih.labelTextColor]:sh.main,[ih.horizontalPadding]:"0.125em",_hover:{[ih.labelTextColor]:sh.dark,[ih.labelTextDecoration]:"underline"},_active:{[ih.labelTextColor]:sh.main}}},_focused:{[ih.outlineColor]:sh.light}},dh={...ih,...ah};var ch=Object.freeze({__proto__:null,default:lh,vars:dh});const ph=te(eh),hh=ko.cssVarList,uh={[hh.hostDirection]:ph.direction,[hh.textLineHeight]:"1.35em",[hh.textAlign]:"start",[hh.textColor]:ph.colors.surface.dark,variant:{h1:{[hh.fontSize]:ph.typography.h1.size,[hh.fontWeight]:ph.typography.h1.weight,[hh.fontFamily]:ph.typography.h1.font},h2:{[hh.fontSize]:ph.typography.h2.size,[hh.fontWeight]:ph.typography.h2.weight,[hh.fontFamily]:ph.typography.h2.font},h3:{[hh.fontSize]:ph.typography.h3.size,[hh.fontWeight]:ph.typography.h3.weight,[hh.fontFamily]:ph.typography.h3.font},subtitle1:{[hh.fontSize]:ph.typography.subtitle1.size,[hh.fontWeight]:ph.typography.subtitle1.weight,[hh.fontFamily]:ph.typography.subtitle1.font},subtitle2:{[hh.fontSize]:ph.typography.subtitle2.size,[hh.fontWeight]:ph.typography.subtitle2.weight,[hh.fontFamily]:ph.typography.subtitle2.font},body1:{[hh.fontSize]:ph.typography.body1.size,[hh.fontWeight]:ph.typography.body1.weight,[hh.fontFamily]:ph.typography.body1.font},body2:{[hh.fontSize]:ph.typography.body2.size,[hh.fontWeight]:ph.typography.body2.weight,[hh.fontFamily]:ph.typography.body2.font}},mode:{primary:{[hh.textColor]:ph.colors.surface.contrast},secondary:{[hh.textColor]:ph.colors.surface.dark},error:{[hh.textColor]:ph.colors.error.main},"error-dark":{[hh.textColor]:ph.colors.error.dark},success:{[hh.textColor]:ph.colors.success.main},"success-dark":{[hh.textColor]:ph.colors.success.dark},warning:{[hh.textColor]:ph.colors.warning.main},"warning-dark":{[hh.textColor]:ph.colors.warning.dark}},textAlign:{right:{[hh.textAlign]:"right"},left:{[hh.textAlign]:"left"},center:{[hh.textAlign]:"center"}},_fullWidth:{[hh.hostWidth]:"100%"},_italic:{[hh.fontStyle]:"italic"},_uppercase:{[hh.textTransform]:"uppercase"},_lowercase:{[hh.textTransform]:"lowercase"}};var gh=Object.freeze({__proto__:null,default:uh,vars:hh});const mh=te(eh),bh=Wo.cssVarList,yh={[bh.hostDirection]:mh.direction,[bh.cursor]:"pointer",[bh.textColor]:mh.colors.primary.main,textAlign:{right:{[bh.textAlign]:"right"},left:{[bh.textAlign]:"left"},center:{[bh.textAlign]:"center"}},_fullWidth:{[bh.hostWidth]:"100%"},_hover:{[bh.textDecoration]:"underline"},mode:{secondary:{[bh.textColor]:mh.colors.secondary.main}}};var fh=Object.freeze({__proto__:null,default:yh,vars:bh});const vh=te(eh),xh=Oe.cssVarList,Ch={[xh.hostDirection]:vh.direction,[xh.hostWidth]:oe(hh.hostWidth),[xh.textLineHeight]:oe(hh.textLineHeight),[xh.textColor]:oe(hh.textColor),[xh.textAlign]:oe(hh.textAlign),[xh.fontSize]:oe(hh.fontSize),[xh.fontWeight]:oe(hh.fontWeight),[xh.fontFamily]:oe(hh.fontFamily),[xh.linkColor]:oe(bh.textColor),[xh.linkTextDecoration]:"none",[xh.linkHoverTextDecoration]:"underline",[xh.fontWeightBold]:"900",[xh.minWidth]:"0.25em",[xh.minHeight]:"1.35em",[xh.hostDisplay]:"inline-block",_empty:{_hideWhenEmpty:{[xh.hostDisplay]:"none"}}};var wh=Object.freeze({__proto__:null,default:Ch,vars:xh});const Ih=k("input-wrapper"),Sh=te(eh),[Mh,Ah]=ie({labelTextColor:Sh.colors.surface.dark,labelFontSize:"14px",labelFontWeight:"500",inputValueFontWeight:"400",inputPlaceholderFontWeight:"400",helperTextFontWeight:"400",errorMessageFontWeight:"400",valueTextColor:Sh.colors.surface.contrast,placeholderTextColor:Sh.colors.surface.dark,requiredIndicator:"'*'",helperTextColor:Sh.colors.surface.dark,errorMessageTextColor:Sh.colors.error.main,successMessageTextColor:Sh.colors.success.main,borderWidth:Sh.border.xs,borderRadius:Sh.radius.xs,borderColor:"transparent",outlineWidth:Sh.border.sm,outlineStyle:"solid",outlineColor:"transparent",outlineOffset:"0px",minWidth:"10em",toggleButtonSize:"1.5em",inputIconSize:"1em",inputHeight:"3em",horizontalPadding:"0.5em",verticalPadding:"0.5em",textAlign:"start",backgroundColor:Sh.colors.surface.main,fontFamily:Sh.fonts.font1.family,direction:Sh.direction,overlayOpacity:"0.3",errorMessageIcon:"",errorMessageIconSize:"0",errorMessageIconPadding:"0",errorMessageIconPosition:"0 0.4em",errorMessageFontSize:"0.8125rem",errorMessageIconRepeat:"no-repeat",size:{xs:{fontSize:"12px",chipFontSize:"10px"},sm:{fontSize:"14px",chipFontSize:"12px"},md:{fontSize:"16px",chipFontSize:"14px"},lg:{fontSize:"18px",chipFontSize:"16px"}},labelType:{static:{valueInputHeight:"3em",valueInputMarginBottom:"auto"},floating:{labelPosition:"absolute",labelTopPosition:"0",labelHorizontalPosition:"0.9em",labelFontSize:"1em",placeholderOpacity:0,inputHeight:"3.5em",inputVerticalAlignment:"flex-end",inputTransformY:"translateY(1.55em)",inputTransition:"all 75ms ease-in-out",marginInlineStart:"0",valueInputHeight:"1.5702em",valueInputMarginBottom:"0.5em",_focused:{labelFontSize:"0.75em",inputTransformY:"translateY(1.05em)",labelFontWeight:"400",placeholderOpacity:1},_readOnly:{placeholderOpacity:0},_hasValue:{inputTransformY:"translateY(1.05em)",labelFontSize:"0.75em",labelFontWeight:"400"}}},_fullWidth:{width:"100%"},_focused:{outlineColor:Sh.colors.surface.light,_invalid:{outlineColor:Sh.colors.error.main}},_bordered:{outlineWidth:Sh.border.xs,borderColor:Sh.colors.surface.light,borderStyle:"solid",_invalid:{borderColor:Sh.colors.error.main}},_disabled:{labelTextColor:Sh.colors.surface.light,borderColor:Sh.colors.surface.light,valueTextColor:Sh.colors.surface.light,placeholderTextColor:Sh.colors.surface.light,helperTextColor:Sh.colors.surface.light,backgroundColor:Sh.colors.surface.main}},Ih),Eh=te(eh),Th=xi.cssVarList,kh={[Th.hostWidth]:Ah.width,[Th.hostDirection]:Ah.direction,[Th.fontSize]:Ah.fontSize,[Th.fontFamily]:Ah.fontFamily,[Th.labelFontSize]:Ah.labelFontSize,[Th.labelFontWeight]:Ah.labelFontWeight,[Th.inputValueFontWeight]:Ah.inputValueFontWeight,[Th.inputPlaceholderFontWeight]:Ah.inputPlaceholderFontWeight,[Th.helperTextFontWeight]:Ah.helperTextFontWeight,[Th.errorMessageFontWeight]:Ah.errorMessageFontWeight,[Th.labelTextColor]:Ah.labelTextColor,[Th.errorMessageTextColor]:Ah.errorMessageTextColor,[Th.inputBorderColor]:Ah.borderColor,[Th.inputBorderWidth]:Ah.borderWidth,[Th.inputBorderStyle]:Ah.borderStyle,[Th.inputBorderRadius]:Ah.borderRadius,[Th.inputOutlineColor]:Ah.outlineColor,[Th.inputOutlineOffset]:Ah.outlineOffset,[Th.inputOutlineWidth]:Ah.outlineWidth,[Th.inputOutlineStyle]:Ah.outlineStyle,[Th.labelRequiredIndicator]:Ah.requiredIndicator,[Th.inputValueTextColor]:Ah.valueTextColor,[Th.inputPlaceholderTextColor]:Ah.placeholderTextColor,[Th.inputBackgroundColor]:Ah.backgroundColor,[Th.inputHorizontalPadding]:Ah.horizontalPadding,[Th.inputHeight]:Ah.inputHeight,[Th.inputDropdownButtonColor]:Eh.colors.surface.dark,[Th.inputDropdownButtonCursor]:"pointer",[Th.inputDropdownButtonSize]:Ah.toggleButtonSize,[Th.inputDropdownButtonOffset]:Eh.spacing.xs,[Th.overlayItemPaddingInlineStart]:Eh.spacing.xs,[Th.overlayItemPaddingInlineEnd]:Eh.spacing.lg,[Th.labelPosition]:Ah.labelPosition,[Th.labelTopPosition]:Ah.labelTopPosition,[Th.labelHorizontalPosition]:Ah.labelHorizontalPosition,[Th.inputTransformY]:Ah.inputTransformY,[Th.inputTransition]:Ah.inputTransition,[Th.marginInlineStart]:Ah.marginInlineStart,[Th.placeholderOpacity]:Ah.placeholderOpacity,[Th.inputVerticalAlignment]:Ah.inputVerticalAlignment,[Th.valueInputHeight]:Ah.valueInputHeight,[Th.valueInputMarginBottom]:Ah.valueInputMarginBottom,[Th.errorMessageIcon]:Ah.errorMessageIcon,[Th.errorMessageIconSize]:Ah.errorMessageIconSize,[Th.errorMessageIconPadding]:Ah.errorMessageIconPadding,[Th.errorMessageIconRepeat]:Ah.errorMessageIconRepeat,[Th.errorMessageIconPosition]:Ah.errorMessageIconPosition,[Th.errorMessageFontSize]:Ah.errorMessageFontSize,_readonly:{[Th.inputDropdownButtonCursor]:"default"},[Th.overlayFontSize]:Ah.fontSize,[Th.overlayFontFamily]:Ah.fontFamily,[Th.overlayCursor]:"pointer",[Th.overlayItemBoxShadow]:"none",[Th.overlayBackground]:Ah.backgroundColor,[Th.overlayTextColor]:Ah.valueTextColor,[Th.overlayCheckmarkDisplay]:"initial",[Th.overlaySelectedItemBackground]:"initial",[Th.overlaySelectedItemHoverBackground]:Eh.colors.primary.highlight,[Th.overlaySelectedItemFocusBackground]:Eh.colors.primary.highlight,[Th.overlayItemHoverBackground]:Eh.colors.primary.highlight,[Th.overlayItemFocusBackground]:Eh.colors.primary.highlight,[Th.overlay.minHeight]:"400px",[Th.overlay.margin]:"0",[Th.overlay.contentHeight]:"100%",[Th.overlay.contentOpacity]:"1",[Th.overlay.scrollerMinHeight]:"1px",_loading:{[Th.overlay.loaderTop]:"50%",[Th.overlay.loaderLeft]:"50%",[Th.overlay.loaderRight]:"auto",[Th.overlay.loaderMargin]:"-15px 0 0 -15px",[Th.overlay.loaderWidth]:"30px",[Th.overlay.loaderHeight]:"30px",[Th.overlay.loaderBorder]:"2px solid transparent",[Th.overlay.loaderBorderColor]:`${Eh.colors.primary.highlight} ${Eh.colors.primary.highlight} ${Eh.colors.primary.main} ${Eh.colors.primary.main}`,[Th.overlay.loaderBorderRadius]:"50%",[Th.overlay.contentHeight]:"100px",[Th.overlay.scrollerMinHeight]:"100px",[Th.overlay.contentOpacity]:"0"}};var zh=Object.freeze({__proto__:null,comboBox:kh,default:kh,vars:Th});const Lh=te(eh),[Vh,Nh]=ie({shadowColor:"#00000020"},Sc),{shadowColor:Dh}=Nh,Ph=Ac.cssVarList,Bh={...Vh,[Ph.hostWidth]:"fit-content",[Ph.hostDirection]:Lh.direction,[Ph.textAlign]:"center",[Ph.fontFamily]:Lh.fonts.font1.family,[Ph.fontWeight]:"400",[Ph.verticalPadding]:"0.25em",[Ph.horizontalPadding]:"0.5em",[Ph.borderWidth]:Lh.border.xs,[Ph.borderRadius]:Lh.radius.xs,[Ph.borderColor]:"transparent",[Ph.borderStyle]:"solid",_fullWidth:{[Ph.hostWidth]:"100%"},size:{xs:{[Ph.fontSize]:"12px"},sm:{[Ph.fontSize]:"14px"},md:{[Ph.fontSize]:"16px"},lg:{[Ph.fontSize]:"18px"}},variant:{contained:{[Ph.backgroundColor]:Lh.colors.surface.main}},_shrinkToIndicator:{[Ph.hostWidth]:"13px",[Ph.hostHeight]:"13px",[Ph.borderRadius]:"50%",[Ph.fontSize]:"0",[Ph.textIndent]:"-9999px"},mode:{default:{[Ph.textColor]:Lh.colors.surface.dark,_bordered:{[Ph.borderColor]:Lh.colors.surface.light}},primary:{[Ph.textColor]:Lh.colors.primary.main,_bordered:{[Ph.borderColor]:Lh.colors.primary.light}},secondary:{[Ph.textColor]:Lh.colors.secondary.main,_bordered:{[Ph.borderColor]:Lh.colors.secondary.light}},error:{[Ph.textColor]:Lh.colors.error.main,_bordered:{[Ph.borderColor]:Lh.colors.error.light}},success:{[Ph.textColor]:Lh.colors.success.main,_bordered:{[Ph.borderColor]:Lh.colors.success.light}}},shadow:{sm:{[Ph.boxShadow]:`${Lh.shadow.wide.sm} ${Dh}, ${Lh.shadow.narrow.sm} ${Dh}`},md:{[Ph.boxShadow]:`${Lh.shadow.wide.md} ${Dh}, ${Lh.shadow.narrow.md} ${Dh}`},lg:{[Ph.boxShadow]:`${Lh.shadow.wide.lg} ${Dh}, ${Lh.shadow.narrow.lg} ${Dh}`},xl:{[Ph.boxShadow]:`${Lh.shadow.wide.xl} ${Dh}, ${Lh.shadow.narrow.xl} ${Dh}`}}};var Fh=Object.freeze({__proto__:null,default:Bh,vars:Ph});const Rh=k("avatar");class Wh extends(ye({componentName:Rh,baseSelector:":host > .wrapper"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="wrapper">\n <vaadin-avatar></vaadin-avatar>\n <div class="editableBadge">\n <vaadin-icon icon="vaadin:pencil"></vaadin-icon>\n </div>\n </div>\n\t\t',V("\n :host {\n\t\t\t\t\tdisplay: inline-flex;\n\t\t\t\t}\n\n .editableBadge {\n border: 1px solid;\n border-radius: 100%;\n height: fit-content;\n width: 25%;\n height: 25%;\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 5%;\n box-sizing: border-box;\n position: absolute;\n bottom: 0;\n inset-inline-end: 0;\n }\n\n vaadin-icon {\n color: currentcolor;\n }\n\n vaadin-avatar {\n width: 100%;\n height: 100%;\n margin: 0;\n border: none\n }\n\n .wrapper {\n display: inline-flex;\n position: relative;\n width: 100%;\n height: 100%;\n }\n ",this),this.avatarComponent=this.shadowRoot.querySelector("vaadin-avatar"),L(this,this.avatarComponent,{includeAttrs:["display-name","img","abbr"],mapAttrs:{"display-name":"name"}});const e=this.shadowRoot.querySelector(".editableBadge");M(this,()=>{e.style.display=this.isEditable?"":"none"},{includeAttrs:["editable"]})}get isEditable(){return"true"===this.getAttribute("editable")}}const{host:Oh,editableBadge:jh,avatar:$h}={host:{selector:()=>":host"},editableBadge:{selector:"> .editableBadge"},avatar:{selector:"vaadin-avatar"}},_h=I(ce({mappings:{hostWidth:[{...Oh,property:"width"},{...Oh,property:"min-width"}],hostHeight:{...Oh,property:"height"},cursor:[$h,Oh],hostDirection:{...Oh,property:"direction"},avatarTextColor:{...$h,property:"color"},avatarBackgroundColor:{...$h,property:"background-color"},editableIconColor:{...jh,property:"color"},editableBorderColor:{...jh,property:"border-color"},editableBackgroundColor:{...jh,property:"background-color"}}}),pe,he)(Wh),Hh=te(eh),qh=_h.cssVarList,Yh={[qh.hostDirection]:Hh.direction,[qh.editableIconColor]:Hh.colors.surface.dark,[qh.editableBorderColor]:Hh.colors.surface.dark,[qh.editableBackgroundColor]:Hh.colors.surface.main,[qh.avatarTextColor]:Hh.colors.surface.main,[qh.avatarBackgroundColor]:Hh.colors.surface.dark,_editable:{[qh.cursor]:"pointer"},size:{xs:{[qh.hostWidth]:"30px",[qh.hostHeight]:"30px"},sm:{[qh.hostWidth]:"40px",[qh.hostHeight]:"40px"},md:{[qh.hostWidth]:"60px",[qh.hostHeight]:"60px"},lg:{[qh.hostWidth]:"98px",[qh.hostHeight]:"98px"},xl:{[qh.hostWidth]:"120px",[qh.hostHeight]:"120px"},"2xl":{[qh.hostWidth]:"140px",[qh.hostHeight]:"140px"}}},Uh={...qh};var Gh=Object.freeze({__proto__:null,default:Yh,vars:Uh});const Zh=Ei.cssVarList;var Qh=Object.freeze({__proto__:null,default:{},vars:Zh});const Jh=Mi.cssVarList;var Kh=Object.freeze({__proto__:null,default:{},vars:Jh});const Xh=k("apps-list"),eu=I(ce({mappings:{maxHeight:{selector:()=>":host"},minHeight:{selector:()=>":host"},hostDirection:{selector:()=>":host",property:"direction"},gap:{selector:hp.componentName,property:hp.cssVarList.gap},maxRowItems:{selector:hp.componentName,property:hp.cssVarList.maxRowItems},itemsFontWeight:{selector:ko.componentName,property:ko.cssVarList.fontWeightOverride},itemsFontSize:{selector:ko.componentName,property:ko.cssVarList.fontSizeOverride},itemsTextAlign:{selector:ko.componentName,property:ko.cssVarList.textAlign},itemBackgroundColor:{selector:dp.componentName,property:dp.cssVarList.backgroundColor},itemHoverBackgroundColor:{selector:`${dp.componentName}:hover`,property:dp.cssVarList.backgroundColor},backgroundColor:{selector:hp.componentName,property:hp.cssVarList.backgroundColorOverride},itemBorderStyle:{selector:dp.componentName,property:dp.cssVarList.borderStyleOverride},itemBorderColor:{selector:dp.componentName,property:dp.cssVarList.borderColorOverride},itemBorderWidth:{selector:dp.componentName,property:dp.cssVarList.borderWidthOverride},itemVerticalPadding:{selector:dp.componentName,property:dp.cssVarList.verticalPaddingOverride},itemHorizontalPadding:{selector:dp.componentName,property:dp.cssVarList.horizontalPaddingOverride},itemAlignment:[{selector:()=>".avatar-wrapper",property:"text-align"},{selector:ko.componentName,property:ko.cssVarList.textAlign}]}}),Be({itemRenderer:({name:e,icon:t,url:o},i,r)=>`\n <a ${o?`href="${o}" title="${o}"`:""} ${r.openInSameWindow?"":'target="_blank"'}>\n <descope-list-item>\n <div class="avatar-wrapper">\n <descope-avatar\n ${t?`img="${t}"`:""}\n ${e?`display-name="${e}" abbr=${P(e)}`:""}\n size="${r.logoSize||r.size}"\n ></descope-avatar>\n </div>\n <descope-text\n variant="${r.itemTextVariant}"\n mode="primary"\n >${e}</descope-text>\n </descope-list-item>\n </a>\n`,rerenderAttrsList:["size","item-text-variant","logo-size","open-in-same-window"]}),pe,he,e=>class extends e{get size(){return this.getAttribute("size")||"sm"}get itemTextVariant(){return this.getAttribute("item-text-variant")||"body1"}get logoSize(){return this.getAttribute("logo-size")}get openInSameWindow(){return"true"===this.getAttribute("open-in-same-window")}})(Ee({slots:["empty-state"],wrappedEleName:"descope-list",excludeAttrsSync:["tabindex","class","empty","style"],componentName:Xh,style:()=>`\n :host {\n width: 100%;\n display: inline-flex;\n }\n\n descope-text::part(text-wrapper) {\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n }\n\n descope-list-item[variant="tile"] .avatar-wrapper {\n width: 100%;\n }\n\n .avatar-wrapper {\n line-height: 0;\n }\n\n a {\n text-decoration: none;\n }\n\n descope-text {\n ${ko.cssVarList.hostDirection}: var(${eu.cssVarList.hostDirection});\n max-width: 100%;\n width: 100%;\n }\n `})),tu=eu.cssVarList,ou=te(eh),iu="400px",ru={[tu.itemsTextAlign]:"start",[tu.hostDirection]:ou.direction,[tu.maxHeight]:iu,[tu.itemHoverBackgroundColor]:ou.colors.surface.highlight,_empty:{[tu.minHeight]:iu},size:{xs:{[tu.itemsFontSize]:"14px",[tu.itemsFontWeight]:"normal"},sm:{[tu.itemsFontSize]:"14px",[tu.itemsFontWeight]:"normal"},md:{[tu.itemsFontSize]:"16px",[tu.itemsFontWeight]:"normal"},lg:{[tu.itemsFontSize]:"20px",[tu.itemsFontWeight]:"normal"}},itemPadding:{xs:{[tu.itemVerticalPadding]:ou.spacing.xs,[tu.itemHorizontalPadding]:ou.spacing.xs},sm:{[tu.itemVerticalPadding]:ou.spacing.sm,[tu.itemHorizontalPadding]:ou.spacing.sm},md:{[tu.itemVerticalPadding]:ou.spacing.md,[tu.itemHorizontalPadding]:ou.spacing.md},lg:{[tu.itemVerticalPadding]:ou.spacing.lg,[tu.itemHorizontalPadding]:ou.spacing.lg},xl:{[tu.itemVerticalPadding]:ou.spacing.xl,[tu.itemHorizontalPadding]:ou.spacing.xl}}};var nu=Object.freeze({__proto__:null,default:ru,vars:tu});const su=te(eh),au=hp.cssVarList,[lu,du,cu]=ie({shadowColor:"#00000020"},cp),{shadowColor:pu}=du,hu={...lu,[au.hostWidth]:"100%",[au.backgroundColor]:su.colors.surface.main,[au.fontFamily]:su.fonts.font1.family,[au.borderColor]:su.colors.surface.light,[au.borderStyle]:"solid",[au.borderWidth]:su.border.xs,[au.borderRadius]:su.radius.sm,[au.gap]:su.spacing.md,[au.verticalPadding]:su.spacing.lg,[au.horizontalPadding]:su.spacing.lg,[au.boxShadow]:`${su.shadow.wide.sm} ${pu}, ${su.shadow.narrow.sm} ${pu}`,[au.maxHeight]:"100%",[au.hostDirection]:su.direction,[au.minItemsWidth]:"150px",[au.maxRowItems]:"1000",_empty:{[au.minHeight]:"150px",[au.emptyStateTextColor]:su.colors.surface.dark,[au.emptyStateTextFontFamily]:su.fonts.font1.family},variant:{tiles:{[au.gridTemplateColumns]:`repeat(auto-fit, minmax(\n max(\n min(${oe(au.minItemsWidth)}, 100%),\n calc((100% - (${oe(au.maxRowItems)} - 1) * ${oe(au.gap)}) / ${oe(au.maxRowItems)})),\n 1fr))`,[au.maxItemsWidth]:"200px",[au.itemsHorizontalAlign]:"center"}},gap:{xs:{[au.gap]:su.spacing.xs},sm:{[au.gap]:su.spacing.sm},md:{[au.gap]:su.spacing.md},lg:{[au.gap]:su.spacing.lg},xl:{[au.gap]:su.spacing.xl}}},uu={...au,...cu};var gu=Object.freeze({__proto__:null,default:hu,vars:uu});const mu=te(eh),bu=dp.cssVarList,yu={[bu.backgroundColor]:mu.colors.surface.main,[bu.verticalPadding]:mu.spacing.lg,[bu.horizontalPadding]:mu.spacing.lg,[bu.gap]:mu.spacing.md,[bu.borderStyle]:"solid",[bu.borderWidth]:mu.border.xs,[bu.borderColor]:mu.colors.surface.main,[bu.borderRadius]:mu.radius.sm,[bu.cursor]:"pointer",[bu.alignItems]:"center",[bu.flexDirection]:"row",[bu.transition]:"border-color 0.2s, background-color 0.2s",variant:{tile:{[bu.alignItems]:"flex-start",[bu.flexDirection]:"column",[bu.borderColor]:mu.colors.surface.light}},_hover:{[bu.backgroundColor]:mu.colors.surface.highlight},_active:{[bu.backgroundColor]:mu.colors.surface.main,[bu.borderColor]:mu.colors.primary.light,[bu.outline]:`1px solid ${mu.colors.primary.light}`}};var fu=Object.freeze({__proto__:null,default:yu,vars:bu});const vu=k("multi-select-combo-box"),{host:xu,inputField:Cu,inputElement:wu,placeholder:Iu,toggle:Su,clearButton:Mu,label:Au,requiredIndicator:Eu,helperText:Tu,errorMessage:ku,chip:zu,chipLabel:Lu,overflowChipFirstBorder:Vu,overflowChipSecondBorder:Nu}={host:{selector:()=>":host"},inputField:{selector:"::part(input-field)"},inputElement:{selector:"input"},placeholder:{selector:"> input:placeholder-shown"},toggle:{selector:"::part(toggle-button)"},clearButton:{selector:"::part(clear-button)"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},chip:{selector:"vaadin-multi-select-combo-box-chip"},chipLabel:{selector:"vaadin-multi-select-combo-box-chip::part(label)"},overflowChipFirstBorder:{selector:"vaadin-multi-select-combo-box-chip[slot='overflow']::before"},overflowChipSecondBorder:{selector:"vaadin-multi-select-combo-box-chip[slot='overflow']::after"}},Du=I(ce({mappings:{hostWidth:{...xu,property:"width"},hostDirection:{...xu,property:"direction"},fontSize:[{},xu],chipFontSize:{...Lu,property:"font-size"},fontFamily:[Au,Iu,Cu,Tu,ku,Lu],labelFontSize:{...Au,property:"font-size"},labelFontWeight:{...Au,property:"font-weight"},inputValueFontWeight:{...Cu,property:"font-weight"},inputPlaceholderFontWeight:{...Iu,property:"font-weight"},helperTextFontWeight:{...Tu,property:"font-weight"},errorMessageFontWeight:{...ku,property:"font-weight"},labelTextColor:[{...Au,property:"color"},{...Eu,property:"color"}],errorMessageTextColor:{...ku,property:"color"},errorMessageIcon:{...ku,property:"background-image"},errorMessageIconSize:{...ku,property:"background-size"},errorMessageIconPadding:{...ku,property:"padding-inline-start"},errorMessageIconRepeat:{...ku,property:"background-repeat"},errorMessageIconPosition:{...ku,property:"background-position"},errorMessageFontSize:{...ku,property:"font-size"},inputHeight:{...Cu,property:"min-height"},inputBackgroundColor:{...Cu,property:"background-color"},inputBorderColor:{...Cu,property:"border-color"},inputBorderWidth:{...Cu,property:"border-width"},inputBorderStyle:{...Cu,property:"border-style"},inputBorderRadius:{...Cu,property:"border-radius"},labelRequiredIndicator:{...Eu,property:"content"},inputValueTextColor:{...Cu,property:"color"},inputPlaceholderTextColor:{...Iu,property:"color"},inputDropdownButtonCursor:[{...Su,property:"cursor"},{...Mu,property:"cursor"}],inputDropdownButtonColor:[{...Su,property:"color"},{...Mu,property:"color"}],inputDropdownButtonSize:[{...Su,property:"font-size"},{...Mu,property:"font-size"}],inputDropdownButtonOffset:[{...Su,property:"margin-right"},{...Su,property:"margin-left"}],inputOutlineColor:{...Cu,property:"outline-color"},inputOutlineWidth:{...Cu,property:"outline-width"},inputOutlineStyle:{...Cu,property:"outline-style"},inputOutlineOffset:{...Cu,property:"outline-offset"},inputHorizontalPadding:[{...wu,property:"padding-left"},{...wu,property:"padding-right"},{...Cu,property:"padding-inline-start"}],inputVerticalPadding:[{...Cu,property:"padding-top"},{...Cu,property:"padding-bottom"}],chipTextColor:{...Lu,property:"color"},chipBackgroundColor:[{...zu,property:"background-color"},{...Vu,property:"border-color"},{...Nu,property:"border-color"}],labelPosition:{...Au,property:"position"},labelTopPosition:{...Au,property:"top"},labelLeftPosition:{...Au,property:"left"},labelHorizontalPosition:[{...Au,property:"left"},{...Au,property:"right"}],inputTransformY:{...Au,property:"transform"},inputTransition:{...Au,property:"transition"},marginInlineStart:{...Au,property:"margin-inline-start"},placeholderOpacity:{...Iu,property:"opacity"},inputVerticalAlignment:{...Cu,property:"align-items"},overlayBackground:{property:()=>Du.cssVarList.overlay.backgroundColor},overlayTextColor:{property:()=>Du.cssVarList.overlay.textColor},overlayBorder:{property:()=>Du.cssVarList.overlay.border},overlayFontSize:{property:()=>Du.cssVarList.overlay.fontSize},overlayFontFamily:{property:()=>Du.cssVarList.overlay.fontFamily},overlayCursor:{property:()=>Du.cssVarList.overlay.cursor},overlayItemBoxShadow:{property:()=>Du.cssVarList.overlay.itemBoxShadow},overlayItemPaddingInlineStart:{property:()=>Du.cssVarList.overlay.itemPaddingInlineStart},overlayItemPaddingInlineEnd:{property:()=>Du.cssVarList.overlay.itemPaddingInlineEnd}}}),pe,Ne({name:"overlay",selector:"vaadin-multi-select-combo-box-internal",mappings:{backgroundColor:{selector:"vaadin-multi-select-combo-box-scroller"},minHeight:{selector:"vaadin-multi-select-combo-box-overlay"},margin:{selector:"vaadin-multi-select-combo-box-overlay"},cursor:{selector:"vaadin-multi-select-combo-box-item"},fontFamily:{selector:"vaadin-multi-select-combo-box-item"},textColor:{selector:"vaadin-multi-select-combo-box-item",property:"color"},fontSize:{selector:"vaadin-multi-select-combo-box-item"},itemBoxShadow:{selector:"vaadin-multi-select-combo-box-item",property:"box-shadow"},itemPaddingInlineStart:{selector:"vaadin-multi-select-combo-box-item",property:"padding-inline-start"},itemPaddingInlineEnd:{selector:"vaadin-multi-select-combo-box-item",property:"padding-inline-end"}},forward:{include:!1,attributes:["size"]}}),Le({proxyProps:["selectionStart"],inputEvent:"selected-items-changed"}),ve,he,e=>class extends e{static get observedAttributes(){return["readonly"]}#K=({displayName:e,value:t,label:o})=>{const i=document.createElement("span");return i.setAttribute("data-name",o),i.setAttribute("data-id",t),i.textContent=e||o,i.outerHTML};#F;#mt=[];get defaultValues(){const e=this.getAttribute("default-values");if(e)try{const t=JSON.parse(e);if(this.isValidDataType(t))return t}catch(e){console.error('could not parse data string from attribute "default-values" -',e.message)}return[]}get renderItem(){return this.#K}set renderItem(e){this.#K=e,this.renderItems()}get data(){if(this.#F)return this.#F;const e=this.getAttribute("data");if(e)try{const t=JSON.parse(e);if(this.isValidDataType(t))return t}catch(e){console.error('could not parse data string from attribute "data" -',e.message)}return[]}set data(e){this.isValidDataType(e)&&(this.#F=e,this.renderItems())}get allowCustomValues(){return"true"===this.getAttribute("allow-custom-value")}get minItemsSelection(){return parseInt(this.getAttribute("min-items-selection"),10)||0}get maxItemsSelection(){return parseInt(this.getAttribute("max-items-selection"),10)||0}isValidDataType(e){const t=Array.isArray(e);return t||console.error("data and default-values must be an array, received:",e),t}getItemsTemplate(){return this.data?.reduce?.((e,t)=>e+(this.renderItem?.(t||{})||""),"")}renderItems(){const e=this.getItemsTemplate();e&&(this.innerHTML=e)}updateSelectedItems(){const e=this.baseElement.selectedItems?.map(e=>e.getAttribute("data-id"))||[];e.length>0&&(this.value=e),0===this.value.length&&this.setDefaultValues()}customValueTransformFn(e){return e}setComboBoxDescriptor(){const e=Object.getOwnPropertyDescriptor(this.inputElement.constructor.prototype,"value"),t=this;Object.defineProperties(this.inputElement,{value:{...e,set(o){const i=t.customValueTransformFn(o)||"";i!==this.value&&e.set.call(this,i)}}})}#bt(e){return Array.from(new Map(e.map(e=>[e.getAttribute("data-id"),e])).values())}#X(){const e=Array.from(this.children),t=this.#bt(e);e.length?(this.removeAttribute("has-no-options"),t.forEach(e=>{Object.defineProperty(e,"data-name",{value:e.getAttribute("data-name"),configurable:!0,writable:!0}),Object.defineProperty(e,"data-id",{value:e.getAttribute("data-id"),configurable:!0,writable:!0})}),this.baseElement.items=t,setTimeout(()=>{this.updateSelectedItems()},0)):(this.baseElement.items=[],this.setAttribute("has-no-options","")),this.baseElement.renderer=(e,t,o)=>{e.innerHTML=o.item.outerHTML}}#ee(){const e=this.baseElement.shadowRoot.querySelector("vaadin-multi-select-combo-box-internal").shadowRoot.querySelector("vaadin-multi-select-combo-box-overlay");e._attachOverlay=()=>{e.bringToFront()},e._detachOverlay=()=>{},e._enterModalState=()=>{}}#yt(){this.allowCustomValues&&this.baseElement.addEventListener("custom-value-set",e=>{const t=this.#K({label:e.detail,displayName:e.detail,value:e.detail});this.innerHTML+=t,this.baseElement._lastFilter="",setTimeout(()=>{this.value=[...this.value,e.detail]},0)})}setGetValidity(){this.getValidity=function(){if(this.pattern){const e=new RegExp(this.pattern);if(this.value.some(t=>!e.test(t)))return{patternMismatch:!0}}return this.isRequired&&!this.value.length?{valueMissing:!0}:this.isRequired&&this.minItemsSelection&&this.value.length<this.minItemsSelection?{rangeUnderflow:!0}:this.maxItemsSelection&&this.value.length>this.maxItemsSelection?{rangeOverflow:!0}:{}};const e=this;this.baseElement.checkValidity=()=>e.validity.valid}init(){super.init?.(),this.setGetValidity(),this.#yt(),this.renderItems(),M(this,this.renderItems.bind(this),{includeAttrs:["data"]}),A(this,this.#X.bind(this)),L(this,this.baseElement,{includeAttrs:["placeholder"]}),setTimeout(()=>{this.setComboBoxDescriptor(),this.#ee()}),this.setDefaultValues(),this.baseElement.addEventListener("selected-items-changed",()=>{this.#ft(),this.dispatchEvent(new CustomEvent("input",{bubbles:!0}))})}setDefaultValues(){this.defaultValues.length>0&&(this.value=this.defaultValues)}#ft(){this.#mt=this.baseElement.selectedItems?.map(e=>e.getAttribute("data-id"))||[]}set value(e){if(e&&e.length>0){const t=this.baseElement.items?.filter(t=>e.includes(t["data-id"]));if(this.allowCustomValues){const o=t?.map(e=>e.getAttribute("data-id"))||[],i=e.filter(e=>!o.includes(e));if(i.length){const t=i.reduce((e,t)=>e+this.#K({label:t,displayName:t,value:t}),"");return this.innerHTML+=t,void setTimeout(()=>{this.value=e},0)}}const o=t?.map(e=>e.getAttribute("data-id"))||[];((e,t)=>{if(!Array.isArray(e)||!Array.isArray(t))return!1;if(e.length!==t.length)return!1;const o=e.slice().sort(),i=t.slice().sort();for(let e=0;e<o.length;e++)if(o[e]!==i[e])return!1;return!0})(this.#mt,o)||(this.baseElement.selectedItems=t)}else this.baseElement.selectedItems=[]}get value(){return this.#mt}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),"readonly"===e&&this.onReadOnlyChange(null!==o&&"true"===o)}onReadOnlyChange(e){e?this.baseElement?.shadowRoot?.querySelector("vaadin-multi-select-combo-box-internal")?.setAttribute("inert",e):this.baseElement?.shadowRoot?.querySelector("vaadin-multi-select-combo-box-internal")?.removeAttribute("inert")}})(Ee({slots:["","prefix"],wrappedEleName:"vaadin-multi-select-combo-box",style:()=>`\n\t\t:host {\n\t\t\tdisplay: inline-flex;\n\t\t\tbox-sizing: border-box;\n\t\t\t-webkit-mask-image: none;\n\t\t}\n\t\t${U(Du.cssVarList)}\n\t\t${Q("vaadin-multi-select-combo-box")}\n\t\t${Z("vaadin-multi-select-combo-box")}\n\t\t${G("vaadin-multi-select-combo-box")}\n\n\t\tvaadin-multi-select-combo-box {\n\t\t\tpadding: 0;\n\t\t\twidth: 100%;\n\t\t}\n\t\tvaadin-multi-select-combo-box::before {\n\t\t\theight: initial;\n\t\t}\n\t\tvaadin-multi-select-combo-box [slot="input"] {\n\t\t\t-webkit-mask-image: none;\n\t\t\tmin-height: 0;\n align-self: center;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\tvaadin-multi-select-combo-box[readonly] [slot="input"] {\n flex-grow: 1;\n flex-basis: 4em;\n\t\t}\n\n\t\t::part(input-field) {\n padding: 0;\n\t\t\tbox-shadow: none;\n\t\t}\n ${J("vaadin-multi-select-combo-box")}\n :host([has-label]) vaadin-multi-select-combo-box-chip::part(label) {\n display: block;\n }\n\n vaadin-multi-select-combo-box vaadin-multi-select-combo-box-chip[slot='overflow']::before,\n vaadin-multi-select-combo-box vaadin-multi-select-combo-box-chip[slot='overflow']::after {\n left: -4px;\n right: -4px;\n border-left-width: 0;\n border-inline-start-style: solid;\n border-inline-start-width: 2px;\n }\n vaadin-multi-select-combo-box vaadin-multi-select-combo-box-chip[slot='overflow']::after {\n left: -8px;\n right: -8px;\n }\n\n :host([has-no-options][allow-custom-value='true']) ::part(toggle-button) {\n display: none;\n }\n\n \n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n \n\n vaadin-multi-select-combo-box::part(toggle-button),\n vaadin-multi-select-combo-box::part(clear-button) {\n align-self: center;\n }\n\n vaadin-multi-select-combo-box[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-multi-select-combo-box[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n\n\t\t`,excludeAttrsSync:["tabindex","size","data","placeholder","style"],componentName:vu,includeForwardProps:["items","renderer","selectedItems"]})),Pu=k("multi-line-mappings"),Bu=ye({componentName:Pu}),Fu=e=>null==e?"":String("object"==typeof e?e.value??e.id??e.label??"":e),Ru=e=>[...new Set(e.map(Fu).filter(Boolean))],Wu=e=>{const t=Fu(e);return"object"==typeof e&&null!==e?{...e,value:t,label:String(e.label??e.displayName??t)}:{value:t,label:t}},Ou=e=>{if(!Array.isArray(e))return[];const t=new Set;return e.map(Wu).filter(e=>!(!e.value||t.has(e.value)||(t.add(e.value),0)))},ju=(e=[],t=[])=>e.length===t.length&&e.every((e,o)=>e===t[o]),$u={selector:()=>":host"},_u={selector:".row"},Hu={selector:".add-action"},qu=I(ce({mappings:{hostWidth:{...$u,property:"width"},hostDirection:[{...$u,property:"direction"},{selector:Du.componentName,property:Du.cssVarList.hostDirection},{selector:Ni.componentName,property:Ni.cssVarList.hostDirection}],rowsGap:{selector:".rows",property:"gap"},rowGap:{..._u,property:"gap"},rowAlignItems:{..._u,property:"align-items"},rowWrap:{..._u,property:"flex-wrap"},addActionJustifyContent:{...Hu,property:"justify-content"},addActionMarginTop:{...Hu,property:"margin-top"}}}),pe)(class extends Bu{static get observedAttributes(){return["data","max-rows","size","disabled","readonly","first-value-key","second-value-key","first-label","second-label","first-placeholder","second-placeholder","full-width","merge-rows"]}#vt=[{firstValues:[],secondValues:[]}];#xt=null;#Ct=[];#wt={};constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="wrapper">\n <div class="rows"></div>\n <div class="add-action">\n <descope-button\n class="add-button"\n variant="link"\n mode="primary"\n >\n <slot name="add-button-content">Add line</slot>\n </descope-button>\n </div>\n </div>\n ',V("\n :host {\n display: inline-flex;\n box-sizing: border-box;\n max-width: 100%;\n }\n\n .wrapper {\n display: flex;\n flex-direction: column;\n width: 100%;\n }\n\n .rows {\n display: flex;\n flex-direction: column;\n width: 100%;\n }\n\n .rows > .row {\n display: flex;\n width: 100%;\n min-width: 0;\n box-sizing: border-box;\n align-items: flex-end;\n }\n\n .row descope-multi-select-combo-box {\n flex: 1 1 0;\n box-sizing: border-box;\n }\n\n .row .remove-button {\n flex: 0 0 auto;\n align-self: flex-end;\n }\n\n .row:only-child .remove-button {\n display: none;\n pointer-events: none;\n }\n\n .add-action {\n display: flex;\n }\n ",this),this.rowsElement=this.shadowRoot.querySelector(".rows"),this.addButtonElement=this.shadowRoot.querySelector(".add-button")}get size(){return this.getAttribute("size")||"md"}get firstValueKey(){return this.getAttribute("first-value-key")||"firstValues"}get secondValueKey(){return this.getAttribute("second-value-key")||"secondValues"}get firstLabel(){return this.getAttribute("first-label")||""}get secondLabel(){return this.getAttribute("second-label")||""}get firstPlaceholder(){return this.getAttribute("first-placeholder")||""}get secondPlaceholder(){return this.getAttribute("second-placeholder")||""}get disabled(){return"true"===this.getAttribute("disabled")}get readonly(){return"true"===this.getAttribute("readonly")}get mergeRows(){return"true"===this.getAttribute("merge-rows")}get maxRows(){const e=Number(this.getAttribute("max-rows"));return Number.isFinite(e)&&e>0?e:void 0}get data(){return this.#wt}get value(){return this.#vt.filter(e=>e.firstValues.length>0||e.secondValues.length>0).flatMap(e=>(e.firstValues.length?e.firstValues:[""]).map(t=>({[this.firstValueKey]:t,[this.secondValueKey]:[...e.secondValues]})))}set value(e){this.#xt=e,this.#vt=this.#It(e),this.#St(),this.#Mt()}#At(e){const t=((e,t,o="unknown")=>{if("string"!=typeof e||!e?.trim())return t;try{return JSON.parse(e)}catch(e){return console.error(`[descope-multi-line-mappings] Failed to parse JSON from "${o}"`,e),t}})(e,{},"data attribute"),o=t&&"object"==typeof t&&!Array.isArray(t)?t:{};this.#Ct=Object.entries(o).map(([e,t])=>{const o=String(e),i=null!=t&&"object"==typeof t&&!Array.isArray(t),r=i?t.options??[]:t;return{value:o,label:i&&null!=t.label?String(t.label):o,options:Ou(r)}}),this.#wt=Object.fromEntries(this.#Ct.map(({value:e,options:t})=>[e,t]))}init(){super.init?.(),this.#Et(),this.addButtonElement.addEventListener("click",()=>this.#Tt()),this.#Mt()}attributeChangedCallback(e,t,o){if(super.attributeChangedCallback?.(e,t,o),t!==o){if("data"===e)return this.#At(o),this.#St(),void this.#Mt();if("size"===e)return[...this.#kt(),...this.#zt()].forEach(e=>e.setAttribute("size",this.size)),this.#Et(),void this.#Lt();if(["disabled","readonly"].includes(e))return this.#kt().forEach(e=>{e[this.disabled?"setAttribute":"removeAttribute"]("disabled","true"),e[this.readonly?"setAttribute":"removeAttribute"]("readonly","true")}),this.#zt().forEach(e=>e[this.disabled||this.readonly?"setAttribute":"removeAttribute"]("disabled","true")),void this.#Lt();if(["first-label","second-label"].includes(e)){const t="first-label"===e?"first":"second";return void Array.from(this.rowsElement.children).forEach(e=>{const i=e.querySelector(`.${t}-combo`);o?i?.setAttribute("label",o):i?.removeAttribute("label")})}if(["first-placeholder","second-placeholder"].includes(e)){const t="first-placeholder"===e?"first":"second";return void Array.from(this.rowsElement.children).forEach(e=>{const i=e.querySelector(`.${t}-combo`);o?i?.setAttribute("placeholder",o):i?.removeAttribute("placeholder")})}"max-rows"===e&&this.#Lt(),"merge-rows"===e&&null!==this.#xt&&(this.#vt=this.#It(this.#xt),this.#St(),this.#Mt())}}#kt(){return Array.from(this.rowsElement.querySelectorAll("descope-multi-select-combo-box"))}#zt(){return Array.from(this.rowsElement.querySelectorAll(".remove-button"))}#Tt(){if(this.disabled||this.readonly||this.#Vt())return;const e={firstValues:[],secondValues:[]};this.#vt=[...this.#vt,e],this.rowsElement.append(this.#Nt(e)),this.#Lt()}#It(e){if(!Array.isArray(e)||!e.length)return[{firstValues:[],secondValues:[]}];let t=e.map(e=>{const t=e?.[this.firstValueKey];return{firstValues:null!=t&&""!==String(t)?[String(t)]:[],secondValues:Ru(e?.[this.secondValueKey]??[])}});if(this.mergeRows){const e=new Map;for(const o of t){const t=[...o.secondValues].sort().join("\0");e.has(t)?e.get(t).firstValues.push(...o.firstValues):e.set(t,{firstValues:[...o.firstValues],secondValues:o.secondValues})}t=[...e.values()]}return t}#St(){const e=new Set(this.#Ct.map(e=>e.value));this.#vt=this.#vt.map(t=>{const o=t.firstValues.filter(t=>e.has(t)),i=this.#Dt(o),r=new Set(i.map(e=>e.value));return{firstValues:o,secondValues:t.secondValues.filter(e=>r.has(e))}})}#Dt(e){const t=e.length?e.map(e=>this.#wt[e]||[]).filter(e=>e.length):Object.values(this.#wt).filter(e=>e.length);if(!t.length||e.length&&t.length!==e.length)return[];if(1===t.length)return t[0];const[o,...i]=t,r=new Set(o.map(e=>e.value));for(const e of i){const t=new Set(e.map(e=>e.value));for(const e of r)t.has(e)||r.delete(e)}return o.filter(e=>r.has(e.value))}#Pt({getRowIndex:e,type:t,label:o,placeholder:i,options:r,selectedValues:n}){const s=document.createElement("descope-multi-select-combo-box");return s.className=`combo ${t}-combo`,s.setAttribute("size",this.size),s.setAttribute("bordered","true"),s.setAttribute("item-label-path","data-name"),s.setAttribute("item-value-path","data-id"),o&&s.setAttribute("label",o),i&&s.setAttribute("placeholder",i),this.disabled&&s.setAttribute("disabled","true"),this.readonly&&s.setAttribute("readonly","true"),s.data=r,this.#Bt(s,n),s.addEventListener("input",()=>{if(s.__descopeSyncingSelection)return;const o=e();-1!==o&&this.#Ft({rowIndex:o,type:t,selectedValues:Ru(s.value||[])})}),s}#Bt(e,t){e.__descopeSyncingSelection=!0,Promise.resolve().then(()=>{const o=new Set(t||[]);e.selectedItems=(e.items||[]).filter(e=>o.has(e["data-id"]||e.getAttribute?.("data-id"))),e.__descopeSyncingSelection=!1})}#Rt(e){const t=document.createElement("descope-button");return t.className="remove-button",t.setAttribute("variant","link"),t.setAttribute("mode","primary"),t.setAttribute("size",this.size),t.setAttribute("aria-label","Remove row"),t.innerHTML='<vaadin-icon icon="vaadin:minus"></vaadin-icon>',(this.disabled||this.readonly)&&t.setAttribute("disabled","true"),t.addEventListener("click",()=>{const t=e();-1!==t&&this.#Wt(t)}),t}#Mt(){this.rowsElement.innerHTML="",this.#vt.forEach(e=>{this.rowsElement.append(this.#Nt(e))}),this.#Lt()}#Nt(e){const t=document.createElement("div");t.className="row";const o=()=>Array.from(this.rowsElement.children).indexOf(t),i=this.#Pt({getRowIndex:o,type:"first",label:this.firstLabel,placeholder:this.firstPlaceholder,options:this.#Ct.map(({value:e,label:t})=>({value:e,label:t})),selectedValues:e.firstValues}),r=this.#Dt(e.firstValues),n=this.#Pt({getRowIndex:o,type:"second",label:this.secondLabel,placeholder:this.secondPlaceholder,options:r,selectedValues:e.secondValues});return t.append(i,n,this.#Rt(o)),t}#Ot(e){const t=this.#vt[e];if(!t)return;const o=this.rowsElement.children[e],i=o?.querySelector(".second-combo");if(!i)return void this.#Mt();const r=this.#Dt(t.firstValues);i.data=r,this.#Bt(i,t.secondValues)}#Et(){this.addButtonElement.setAttribute("size",this.size)}#Lt(){this.disabled||this.readonly||this.#Vt()?this.addButtonElement.setAttribute("disabled","true"):this.addButtonElement.removeAttribute("disabled")}#Vt(){return Number.isFinite(this.maxRows)&&this.#vt.length>=this.maxRows}#jt(e){this.rowsElement.children[e]?.remove()}#Ft({rowIndex:e,type:t,selectedValues:o}){if(this.disabled||this.readonly)return;const i=this.#vt[e];if(i){if("first"===t){const t=this.#Dt(o),r=new Set(t.map(e=>e.value)),n=i.secondValues.filter(e=>r.has(e));if(ju(i.firstValues,o)&&ju(i.secondValues,n))return;return this.#vt[e]={firstValues:o,secondValues:n},this.#Ot(e),void this.#$t()}ju(i.secondValues,o)||(this.#vt[e]={...i,secondValues:o},this.#$t())}}#Wt(e){if(this.disabled||this.readonly||this.#vt.length<=1)return;const t=this.#vt[e];this.#vt=this.#vt.filter((t,o)=>o!==e),this.#jt(e),this.#Lt(),(t.firstValues.length>0||t.secondValues.length>0)&&this.#$t()}#$t(){this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))}}),Yu=qu.cssVarList,Uu={[Yu.hostDirection]:Ah.direction,[Yu.rowsGap]:eh.spacing.sm,[Yu.rowGap]:eh.spacing.sm,[Yu.rowAlignItems]:"flex-end",[Yu.rowWrap]:"nowrap",[Yu.addActionJustifyContent]:"flex-start",[Yu.addActionMarginTop]:eh.spacing.xs,_fullWidth:{[Yu.hostWidth]:"100%"}};var Gu=Object.freeze({__proto__:null,default:Uu,vars:Yu});const Zu=te(eh),Qu=Du.cssVarList,Ju={[Qu.hostWidth]:Ah.width,[Qu.hostDirection]:Ah.direction,[Qu.fontSize]:Ah.fontSize,[Qu.fontFamily]:Ah.fontFamily,[Qu.labelFontSize]:Ah.labelFontSize,[Qu.labelFontWeight]:Ah.labelFontWeight,[Qu.inputValueFontWeight]:Ah.inputValueFontWeight,[Qu.inputPlaceholderFontWeight]:Ah.inputPlaceholderFontWeight,[Qu.helperTextFontWeight]:Ah.helperTextFontWeight,[Qu.errorMessageFontWeight]:Ah.errorMessageFontWeight,[Qu.labelTextColor]:Ah.labelTextColor,[Qu.errorMessageTextColor]:Ah.errorMessageTextColor,[Qu.inputBorderColor]:Ah.borderColor,[Qu.inputBorderWidth]:Ah.borderWidth,[Qu.inputBorderStyle]:Ah.borderStyle,[Qu.inputBorderRadius]:Ah.borderRadius,[Qu.inputOutlineColor]:Ah.outlineColor,[Qu.inputOutlineOffset]:Ah.outlineOffset,[Qu.inputOutlineWidth]:Ah.outlineWidth,[Qu.inputOutlineStyle]:Ah.outlineStyle,[Qu.labelRequiredIndicator]:Ah.requiredIndicator,[Qu.inputValueTextColor]:Ah.valueTextColor,[Qu.inputPlaceholderTextColor]:Ah.placeholderTextColor,[Qu.inputBackgroundColor]:Ah.backgroundColor,[Qu.inputHorizontalPadding]:Ah.horizontalPadding,[Qu.inputVerticalPadding]:Ah.verticalPadding,[Qu.inputHeight]:Ah.inputHeight,[Qu.inputDropdownButtonColor]:Zu.colors.surface.dark,[Qu.inputDropdownButtonCursor]:"pointer",[Qu.inputDropdownButtonSize]:Ah.toggleButtonSize,[Qu.inputDropdownButtonOffset]:Zu.spacing.xs,[Qu.overlayItemPaddingInlineStart]:Zu.spacing.xs,[Qu.overlayItemPaddingInlineEnd]:Zu.spacing.lg,[Qu.chipFontSize]:Ah.chipFontSize,[Qu.chipTextColor]:Zu.colors.surface.contrast,[Qu.chipBackgroundColor]:Zu.colors.surface.light,[Qu.labelPosition]:Ah.labelPosition,[Qu.labelTopPosition]:Ah.labelTopPosition,[Qu.labelLeftPosition]:Ah.labelLeftPosition,[Qu.labelHorizontalPosition]:Ah.labelHorizontalPosition,[Qu.inputTransformY]:Ah.inputTransformY,[Qu.inputTransition]:Ah.inputTransition,[Qu.marginInlineStart]:Ah.marginInlineStart,[Qu.placeholderOpacity]:Ah.placeholderOpacity,[Qu.inputVerticalAlignment]:Ah.inputVerticalAlignment,[Qu.errorMessageIcon]:Ah.errorMessageIcon,[Qu.errorMessageIconSize]:Ah.errorMessageIconSize,[Qu.errorMessageIconPadding]:Ah.errorMessageIconPadding,[Qu.errorMessageIconRepeat]:Ah.errorMessageIconRepeat,[Qu.errorMessageIconPosition]:Ah.errorMessageIconPosition,[Qu.errorMessageFontSize]:Ah.errorMessageFontSize,labelType:{floating:{[Qu.inputHorizontalPadding]:"0.25em",_hasValue:{[Qu.inputHorizontalPadding]:"0.45em"}}},_readonly:{[Qu.inputDropdownButtonCursor]:"default"},[Qu.overlayFontSize]:Ah.fontSize,[Qu.overlayFontFamily]:Ah.fontFamily,[Qu.overlayCursor]:"pointer",[Qu.overlayItemBoxShadow]:"none",[Qu.overlayBackground]:Ah.backgroundColor,[Qu.overlayTextColor]:Ah.valueTextColor,[Qu.overlay.minHeight]:"400px",[Qu.overlay.margin]:"0"};var Ku=Object.freeze({__proto__:null,default:Ju,multiSelectComboBox:Ju,vars:Qu});const Xu=k("autocomplete-field-internal"),eg=Se({componentName:Xu,baseSelector:""}),tg=[],og="DESCOPE_INVALID_OPTION",ig=k("autocomplete-field"),{host:rg}={host:{selector:()=>":host"}},ng=I(ce({componentNameOverride:k("input-wrapper")}),ce({mappings:{hostWidth:{...rg,property:"width"},hostDirection:{...rg,property:"direction"},fontSize:{...rg},checkmarkDisplay:{selector:xi.componentName,property:xi.cssVarList.overlayCheckmarkDisplay},itemPaddingInlineStart:{selector:xi.componentName,property:xi.cssVarList.overlayItemPaddingInlineStart},itemPaddingInlineEnd:{selector:xi.componentName,property:xi.cssVarList.overlayItemPaddingInlineEnd},selectedItemBackground:{selector:xi.componentName,property:xi.cssVarList.overlaySelectedItemBackground},selectedItemHoverBackground:{selector:xi.componentName,property:xi.cssVarList.overlaySelectedItemHoverBackground},selectedItemFocusBackground:{selector:xi.componentName,property:xi.cssVarList.overlaySelectedItemFocusBackground},itemHoverBackground:{selector:xi.componentName,property:xi.cssVarList.overlayItemHoverBackground}}}),pe,Le({proxyProps:["value","selectionStart"],inputEvent:"input",proxyParentValidation:!0}),he,e=>class extends e{get defaultValue(){return this.getAttribute("default-value")}setDefaultValue(){this.defaultValue&&setTimeout(()=>{this.inputElement.value=this.defaultValue})}init(){super.init?.();const e=document.createElement("template");e.innerHTML=`\n <${Xu}\n tabindex="-1"\n ></${Xu}>\n `,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(Xu),L(this,this.inputElement,{includeAttrs:["size","bordered","label","required","label-type","placeholder","full-width","allow-custom-value","min-search-length","no-results-message","error-fetching-results-message","data-errormessage-value-missing","invalid","error-message","readonly","disabled","st-host-direction","st-error-message-icon","st-error-message-icon-size","st-error-message-icon-padding"]}),T(this,this.inputElement,{includeAttrs:["invalid"]}),this.inputElement.fetchResults=this.fetchResults,this.setDefaultValue()}set fetchResults(e){this.inputElement.fetchResults=e}})(Ee({slots:[],wrappedEleName:"vaadin-custom-field",style:()=>"\n :host {\n display: inline-flex;\n max-width: 100%;\n direction: ltr;\n }\n vaadin-custom-field {\n line-height: unset;\n width: 100%;\n }\n\n descope-autocomplete-field-internal {\n display: inline-block;\n box-sizing: border-box;\n user-select: none;\n width: 100%;\n max-width: 100%;\n }\n\n descope-autocomplete-field-internal ::slotted {\n padding: 0;\n }\n ",excludeAttrsSync:["tabindex","error-message","label","style"],componentName:ig})),sg=ng.cssVarList,ag=te(eh),lg={[sg.hostWidth]:Ah.width,[sg.hostDirection]:Ah.direction,[sg.fontSize]:Ah.fontSize,[sg.checkmarkDisplay]:"none",[sg.itemPaddingInlineStart]:ag.spacing.lg,[sg.itemPaddingInlineEnd]:ag.spacing.lg,[sg.selectedItemBackground]:ag.colors.primary.light,[sg.selectedItemHoverBackground]:ag.colors.primary.light,[sg.selectedItemFocusBackground]:ag.colors.primary.light,[sg.itemHoverBackground]:ag.colors.primary.highlight,_fullWidth:{[sg.hostWidth]:"100%"}};var dg=Object.freeze({__proto__:null,default:lg,vars:sg});class cg extends(Ae()){#_t=null;#Ht=null;constructor(e){super(e),this.#Ht=this.#qt()}getRequiredParams(){return["public-api-key"]}getOptionalParams(){return[{key:"includedPrimaryTypes",attribute:"address-types"},{key:"language",attribute:"address-language"},{key:"region",attribute:"address-region"}]}async#qt(){const e=this.getAttribute("public-api-key");if(!this.#_t&&e)try{(e=>{var t,o,i,r,n,s,a,l,d,c,p,h,u;window.google?.maps||(t={key:e},n="The Google Maps JavaScript API",s="google",a="importLibrary",l="__ib__",d=document,c=window,p=(c=c[s]||(c[s]={})).maps||(c.maps={}),h=new Set,u=new URLSearchParams,p[a]?console.warn(n+" only loads once. Ignoring:",t):p[a]=(e,...c)=>h.add(e)&&(o||(o=new Promise(async(e,a)=>{for(r in await(i=d.createElement("script")),u.set("libraries",[...h]+""),t)u.set(r.replace(/[A-Z]/g,e=>"_"+e[0].toLowerCase()),t[r]);u.set("callback",s+".maps."+l),i.src=`https://maps.${s}apis.com/maps/api/js?`+u,p[l]=e,i.onerror=()=>o=a(Error(n+" could not load.")),i.nonce=d.querySelector("script[nonce]")?.nonce||"",d.head.append(i)}))).then(()=>p[a](e,...c)))})(e);const{AutocompleteSuggestion:t}=await google.maps.importLibrary("places");this.#_t=t}catch(e){throw console.error("Failed to initialize Google Maps Autocomplete service:",e),e}}async _fetchResults(e){if(!e?.trim())return{results:[]};try{await this.#Ht;const t={input:e};this.getOptionalParams().forEach(({attribute:e,key:o,defaultValue:i})=>{const r=this.getAttribute(e)||i;r&&(t[o]="includedPrimaryTypes"===o?r.split(",").map(e=>e.trim()).filter(Boolean):r)});const{suggestions:o}=await this.#_t.fetchAutocompleteSuggestions(t);return this.#Yt(o)}catch(e){return console.error("Google Maps Places Autocomplete failed:",e),{results:[],error:Me}}}#Yt(e){return e?.length?{results:e.map(e=>{const t=e.placePrediction;return{id:t.placeId,label:t.text.text,value:t.text.text}})}:{results:[]}}}class pg extends(Ae()){getRequiredParams(){return["public-api-key"]}getOptionalParams(){return[{key:"layers",attribute:"address-types"},{key:"limit",attribute:"address-limit"},{key:"lang",attribute:"address-language"},{key:"countryCode",attribute:"address-region"}]}async _fetchResults(e){if(!e?.trim())return{results:[]};const t=this.getAttribute("public-api-key"),o=new URLSearchParams({query:e.trim()});this.getOptionalParams().forEach(({attribute:e,key:t,defaultValue:i})=>{const r=this.getAttribute(e)||i;r&&("layers"===t||"countryCode"===t?o.append(t,r.split(",").map(e=>e.trim()).filter(Boolean).join(",")):o.append(t,r))});try{const e=await fetch(`https://api.radar.io/v1/search/autocomplete?${o.toString()}`,{headers:{Authorization:t}});if(!e.ok)throw new Error(`Radar API returned ${e.status}`);const i=await e.json();return this.#Yt(i)}catch(e){return console.error("Radar Places Autocomplete failed:",e),{results:[],error:Me}}}#Yt(e){return e?.addresses?.length?{results:e.addresses.map(e=>({label:e.formattedAddress,value:e.formattedAddress}))}:{results:[]}}}const hg=k("address-field-internal"),ug="google-maps-places",gg="radar",mg={[ug]:cg,[gg]:pg},bg=Se({componentName:hg,baseSelector:""}),yg=["public-api-key"],fg=[...yg],vg=I((({connectorClasses:e})=>t=>class extends t{#Ut=e;static get observedAttributes(){return[...t.observedAttributes||[],"connector-template"]}get connectorClasses(){return this.#Ut}set connectorClasses(e){this.#Ut=e}get connectorTemplate(){return this.getAttribute("connector-template")}initializeConnector(){const e=this.connectorTemplate;if(!this.connectorClasses[e])return;const t=this.connectorClasses[e];this.connector=new t(this.getAttribute.bind(this))}async fetchConnectorResults(e){if(!this.connector)return console.error(`No connector initialized for the field with template: ${this.connectorTemplate}`),{results:[]};const{results:t,error:o}=await this.connector.fetch(e);return o?{results:[],error:o}:{results:t.map(({label:e,value:t})=>({label:e,value:t}))}}init(){super.init?.(),this.initializeConnector()}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),t!==o&&"connector-template"===e&&this.initializeConnector()}})({connectorClasses:mg}))(class extends bg{static get observedAttributes(){return[].concat(bg.observedAttributes||[],fg)}get errorMsgValueMissing(){return this.getAttribute("data-errormessage-value-missing")||this.defaultErrorMsgValueMissing}constructor(){super(),this.innerHTML="\n <div>\n <descope-autocomplete-field></descope-autocomplete-field>\n </div>\n ",this.autocompleteField=this.querySelector("descope-autocomplete-field")}get value(){return this.autocompleteField.value}set value(e){this.autocompleteField.value=e}focus(){this.autocompleteField.focus()}init(){this.addEventListener("focus",e=>{e.isTrusted&&this.autocompleteField.focus()}),super.init?.(),this.initAutocomplete()}initAutocomplete(){L(this,this.autocompleteField,{includeAttrs:["size","bordered","label","label-type","placeholder","disabled","readonly","required","full-width","helper-text","error-message","default-value","data-errormessage-value-missing","st-host-direction","allow-custom-value","min-search-length","st-error-message-icon","st-error-message-icon-size","st-error-message-icon-padding"]}),T(this,this.autocompleteField,{includeAttrs:["invalid"]}),this.autocompleteField.fetchResults=this.fetchConnectorResults.bind(this)}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),t!==o&&yg.includes(e)&&this.initializeConnector()}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:{valid:!0}}}),xg=k("address-field"),{host:Cg}={host:{selector:()=>":host"}},wg=I(ce({componentNameOverride:k("input-wrapper")}),ce({mappings:{hostWidth:{...Cg,property:"width"},hostDirection:{...Cg,property:"direction"}}}),pe,Le({proxyProps:["value","selectionStart"],inputEvent:"input",proxyParentValidation:!0}),he,e=>class extends e{get defaultValue(){return this.getAttribute("default-value")}setDefaultValue(){this.defaultValue&&setTimeout(()=>{this.inputElement.value=this.defaultValue})}set connectorClasses(e){this.inputElement.connectorClasses=e}get connectorClasses(){return this.inputElement.connectorClasses}init(){super.init?.();const e=document.createElement("template");e.innerHTML=`\n <${hg}\n tabindex="-1"\n ></${hg}>\n `,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(hg),L(this,this.inputElement,{includeAttrs:["size","bordered","label","required","label-type","placeholder","full-width","allow-custom-value","min-search-length","no-results-message","error-fetching-results-message","data-errormessage-value-missing","invalid","error-message","readonly","disabled","st-host-direction","st-error-message-icon","st-error-message-icon-size","st-error-message-icon-padding","connector-template","public-api-key","address-types","address-language","address-region","address-limit"]}),T(this,this.inputElement,{includeAttrs:["invalid"]}),this.setDefaultValue()}})(Ee({slots:[],wrappedEleName:"vaadin-custom-field",style:()=>`\n :host {\n display: inline-flex;\n max-width: 100%;\n direction: ltr;\n }\n vaadin-custom-field {\n line-height: unset;\n width: 100%;\n }\n\n ${hg} {\n display: inline-block;\n box-sizing: border-box;\n user-select: none;\n width: 100%;\n max-width: 100%;\n }\n\n ${hg} ::slotted {\n padding: 0;\n }\n`,excludeAttrsSync:["tabindex","error-message","label","style"],componentName:xg})),Ig=wg.cssVarList,Sg={[Ig.hostWidth]:Ah.width,[Ig.hostDirection]:Ah.direction,_fullWidth:{[Ig.hostWidth]:"100%"}};var Mg=Object.freeze({__proto__:null,default:Sg,vars:Ig});const Ag=(e,t=2)=>String(e).padStart(t,"0"),Eg=k("timer"),Tg=["seconds","hide-icon","paused"],kg=ye({componentName:Eg,baseSelector:":host > .wrapper"}),{host:zg,icon:Lg,timer:Vg}={host:{selector:()=>":host"},icon:{selector:()=>".icon"},timer:{selector:()=>".timer"}},Ng=I(ce({mappings:{fontSize:{},iconSize:[{...Lg,property:"width"},{...Lg,property:"height"}],fontFamily:{},minHeight:{},fontWeight:{...Vg},lineHeight:{...Vg},textColor:{...Vg,property:"color"},gap:{},textAlign:{property:"justify-content"},hostWidth:{...zg,property:"width"},hostDirection:{...zg,property:"direction"},iconColor:{...Lg,property:Ei.cssVarList.fill}}}),pe,he)(class extends kg{#Gt=0;#Zt;static get observedAttributes(){return Tg.concat(kg.observedAttributes||[])}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="wrapper">\n <descope-icon src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMWVtIiBoZWlnaHQ9IjFlbSIgdmlld0JveD0iMCAwIDEwNCAxMDQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik01MC4zMzM0IDAuMzMzMjUyQzIyLjgzMzQgMC4zMzMyNTIgMC4zMzMzNzQgMjIuODMzMyAwLjMzMzM3NCA1MC4zMzMzQzAuMzMzMzc0IDc3LjgzMzMgMjIuODMzNCAxMDAuMzMzIDUwLjMzMzQgMTAwLjMzM0M3Ny44MzM0IDEwMC4zMzMgMTAwLjMzMyA3Ny44MzMzIDEwMC4zMzMgNTAuMzMzM0MxMDAuMzMzIDIyLjgzMzMgNzcuODMzNCAwLjMzMzI1MiA1MC4zMzM0IDAuMzMzMjUyWk01MC4zMzM0IDg3LjgzMzNDMjkuNzA4NCA4Ny44MzMzIDEyLjgzMzQgNzAuOTU4MyAxMi44MzM0IDUwLjMzMzNDMTIuODMzNCAyOS43MDgzIDI5LjcwODQgMTIuODMzMyA1MC4zMzM0IDEyLjgzMzNDNzAuOTU4NCAxMi44MzMzIDg3LjgzMzQgMjkuNzA4MyA4Ny44MzM0IDUwLjMzMzNDODcuODMzNCA3MC45NTgzIDcwLjk1ODQgODcuODMzMyA1MC4zMzM0IDg3LjgzMzNaIiBmaWxsPSIjMTgxQTFDIi8+CjxwYXRoIGQ9Ik01MC4zMzI4IDE5LjA4MzNINDQuMDgyOFY1Ni41ODMySDc1LjMzMjhWNTAuMzMzMkg1MC4zMzI4VjE5LjA4MzNaIiBmaWxsPSIjMTgxQTFDIi8+Cjwvc3ZnPgo=" class="icon"></descope-icon>\n <div class="timer"></div>\n </div>\n\t\t',V("\n :host {\n display: inline-flex;\n user-select: none;\n -webkit-user-select: none;\n }\n .wrapper {\n display: flex;\n align-items: center;\n flex-direction: row;\n width: 100%;\n }\n .hidden {\n display: none;\n }\n ",this),this.icon=this.shadowRoot.querySelector(".icon"),this.timer=this.shadowRoot.querySelector(".timer")}get seconds(){const e=this.getAttribute("seconds"),t=1e3*parseInt(e||0,10);return Math.max(0,t)}get isPaused(){return"true"===this.getAttribute("paused")}init(){super.init?.(),this.#Gt=this.seconds}startInterval(){this.#Gt?this.#Zt=setInterval(()=>{this.#Qt(),this.#Gt||this.stop(),this.#Jt(this.#Gt)},1e3):this.stop()}stopInterval(){clearInterval(this.#Zt)}#Qt(){this.#Gt=this.#Gt-1e3}reset(){this.#Gt=this.seconds,this.#Jt(this.#Gt),this.isPaused||(this.dispatchEvent(new CustomEvent("timer-started",{bubbles:!0})),this.startInterval())}stop(){this.stopInterval(),this.#Gt=0,this.#Jt(this.#Gt),this.dispatchEvent(new CustomEvent("timer-ended",{bubbles:!0}))}pause(){this.setAttribute("paused","true"),this.stopInterval()}resume(){this.removeAttribute("paused"),this.startInterval()}#Jt(e){this.timer.textContent=((e=0)=>{const t=Math.floor(e/1e3),o=Math.floor(t/3600),i=Math.floor(t%3600/60),r=t%60;return[...o?[Ag(o)]:[],Ag(i),Ag(r)].join(":")})(e)}#Kt(e){this.icon.classList.toggle("hidden",e)}#Xt(e){setTimeout(()=>{e?this.pause():this.#Zt||this.resume()})}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),o!==t&&("seconds"===e&&this.reset(),"hide-icon"===e&&this.#Kt("true"===o),"paused"===e&&this.#Xt("true"===o))}}),Dg=te(eh),Pg=Ng.cssVarList,Bg={[Pg.hostDirection]:Dg.direction,[Pg.gap]:"0.25em",[Pg.fontFamily]:Dg.fonts.font1.family,[Pg.minHeight]:"1.5em",[Pg.lineHeight]:"1em",[Pg.fontWeight]:Dg.fonts.font1.fontWeight,[Pg.textColor]:Dg.colors.surface.contrast,[Pg.iconColor]:Dg.colors.surface.contrast,[Pg.iconSize]:"1em",size:{xs:{[Pg.fontSize]:"12px"},sm:{[Pg.fontSize]:"14px"},md:{[Pg.fontSize]:"16px"},lg:{[Pg.fontSize]:"18px"}},textAlign:{right:{[Pg.textAlign]:"right"},left:{[Pg.textAlign]:"left"},center:{[Pg.textAlign]:"center"}},_fullWidth:{[Pg.hostWidth]:"100%"}};var Fg=Object.freeze({__proto__:null,default:Bg,vars:Pg});const Rg=k("timer-button"),Wg=["button-variant","button-mode","size","text-align","full-width"],Og={"button-variant":"variant","button-mode":"mode"},jg=["timer-seconds","timer-hide-icon","timer-paused","size","text-align","full-width"],$g={"timer-seconds":"seconds","timer-hide-icon":"hide-icon","timer-paused":"paused"},_g=ye({componentName:Rg,baseSelector:":host > div"}),{host:Hg,nestedTimer:qg,nestedButton:Yg,timerInsideNotReversed:Ug,timerInsideReversed:Gg}={host:{selector:()=>":host"},nestedTimer:{selector:()=>':host([timer-inside="true"]) .timer'},nestedButton:{selector:()=>':host([timer-inside="true"]) .button'},timerInsideNotReversed:{selector:()=>':host([timer-inside="true"]:not([timer-position="end"])) .timer'},timerInsideReversed:{selector:()=>':host([timer-inside="true"][timer-position="end"]) .timer'}},Zg=I(ce({mappings:{gap:{},flexDirection:{},hostWidth:{...Hg,property:"width"},hostDirection:{...Hg,property:"direction"},timerTextColor:{...qg,property:Ng.cssVarList.textColor},timerIconColor:{...qg,property:Ng.cssVarList.iconColor},timerHostWidth:{...qg,property:Ng.cssVarList.hostWidth},buttonLabelSpacing:{...Yg,property:Ni.cssVarList.labelSpacing},timerInsideGapEnd:{...Ug,property:"margin-inline-end"},timerInsideGapStart:{...Gg,property:"margin-inline-start"}}}),pe,he)(class extends _g{constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="wrapper">\n <descope-timer class="timer"></descope-timer>\n <descope-button class="button" disabled="true">\n <slot></slot>\n </descope-button>\n </div>\n\t\t',V('\n :host {\n display: inline-flex;\n }\n .wrapper {\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n }\n /* allow timer to grow along the main axis in the wrapper flex container */\n :host(:not([timer-inside="true"])) .timer {\n flex: 1;\n }\n :host([timer-inside="true"]) .timer {\n flex: 0 0 auto;\n }\n ',this),this.wrapper=this.shadowRoot.querySelector(".wrapper"),this.timer=this.shadowRoot.querySelector(".timer"),this.button=this.shadowRoot.querySelector(".button"),this.forwardingSlot=this.shadowRoot.querySelector(".button slot"),this.timer.addEventListener("timer-started",()=>this.onTimerStarted()),this.timer.addEventListener("timer-ended",()=>this.onTimerEnded()),this.syncTimerPlacement(),this.button.addEventListener("click",this.onClick.bind(this))}static get observedAttributes(){return[...super.observedAttributes||[],"timer-inside","timer-position"]}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),"timer-inside"!==e&&"timer-position"!==e||this.syncTimerPlacement()}get#eo(){return"true"===this.getAttribute("timer-inside")}get#to(){return"end"===this.getAttribute("timer-position")}syncTimerPlacement(){this.#eo?this.#oo(this.#to):this.#io()}#oo(e){e?this.timer.previousSibling!==this.forwardingSlot&&this.button.appendChild(this.timer):this.timer.nextSibling!==this.forwardingSlot&&this.button.insertBefore(this.timer,this.forwardingSlot)}#io(){this.timer.parentElement!==this.wrapper&&this.wrapper.insertBefore(this.timer,this.button)}set onclick(e){this.button.onclick=e}init(){super.init?.(),L(this,this.button,{includeAttrs:Wg,mapAttrs:Og}),L(this,this.timer,{includeAttrs:jg,mapAttrs:$g}),this.button.shadowRoot.querySelector("vaadin-button").setAttribute("disabled","true")}onTimerStarted(){this.toggleButtonDisable(!0)}onTimerEnded(){this.toggleButtonDisable(!1)}onClick(){this.timer.reset()}toggleButtonDisable(e){setTimeout(()=>{e?this.button.setAttribute("disabled","true"):this.button.removeAttribute("disabled")})}}),Qg=te(eh),Jg=Zg.cssVarList,Kg={[Jg.gap]:Qg.spacing.sm,[Jg.flexDirection]:"column",_horizontal:{[Jg.flexDirection]:"row",timerPosition:{end:{[Jg.flexDirection]:"row-reverse"}}},timerPosition:{end:{[Jg.flexDirection]:"column-reverse"}},_fullWidth:{[Jg.hostWidth]:"100%"},_timerInside:{[Jg.timerTextColor]:"currentColor",[Jg.timerIconColor]:"currentColor",[Jg.timerHostWidth]:"auto",[Jg.buttonLabelSpacing]:"0",[Jg.timerInsideGapEnd]:`var(${Jg.gap})`,timerPosition:{end:{[Jg.timerInsideGapStart]:`var(${Jg.gap})`}}}};var Xg=Object.freeze({__proto__:null,default:Kg,vars:Jg});const em=k("password-strength");class tm extends(ye({componentName:em,baseSelector:":host > .wrapper"})){static get observedAttributes(){return["options","value"]}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="wrapper">\n <div class="bars-container"></div>\n <div class="text-container">\n </div>\n </div>\n\t\t',V("\n :host {\n\t\t\t\t\tdisplay: inline-flex;\n\t\t\t\t}\n\n .wrapper {\n display: inline-flex;\n position: relative;\n flex-direction: column;\n width: 100%;\n height: 100%;\n align-items: flex-start;\n }\n\n .bar {\n flex-grow: 1;\n }\n\n .bars-container {\n display: flex;\n flex-grow: 1;\n width: 100%;\n }\n ",this),this.barsContainer=this.shadowRoot.querySelector(".bars-container"),this.textContainer=this.shadowRoot.querySelector(".text-container")}get options(){return this.getAttribute("options")?.split(",")||[]}getCalcScoreFn=()=>Promise.resolve().then(function(){return Jx}).then(e=>e.default);#ro=-1;async calcScore(){const e=this.getAttribute("value")||"";return e?(await this.getCalcScoreFn())(e).score:-1}renderBars(){this.barsContainer.innerHTML="",this.bars=this.options.map((e,t)=>{const o=document.createElement("div");return o.classList.add("bar"),o.classList.toggle("filled",t<=this.#ro),this.barsContainer.appendChild(o),o})}init(){super.init?.(),this.getCalcScoreFn()}async onValueChange(){const e=await this.calcScore();e!==this.#ro&&(this.#ro=e,this.dispatchEvent(new CustomEvent("score-changed",{bubbles:!0,composed:!0,detail:this.#ro})),this.bars?.forEach((e,t)=>{e.classList.toggle("filled",t<=this.#ro)}),this.textContainer.innerHTML=this.options[this.#ro]||"",-1===this.#ro?this.removeAttribute("score"):this.setAttribute("score",this.#ro))}attributeChangedCallback(e,t,o){if(t!==o)return"options"===e?this.renderBars():"value"===e?this.onValueChange():void 0}}const{host:om,bar:im,filledBar:rm,barsContainer:nm,text:sm}={host:{selector:()=>":host"},bar:{selector:" .bar"},barsContainer:{selector:" .bars-container"},filledBar:{selector:" .bar.filled"},text:{selector:" .text-container"}},am=I(ce({componentNameOverride:k("input-wrapper")}),ce({mappings:{hostWidth:[{...om,property:"width"},{...om,property:"min-width"}],hostDirection:{...om,property:"direction"},hostMinWidth:{...om,property:"min-width"},barHeight:{...im,property:"height"},barBorderRadius:{...im,property:"border-radius"},emptyBarColor:{...im,property:"background-color"},filledBarColor:{...rm,property:"background-color"},textColor:{...sm,property:"color"},spacing:{property:"gap"},barSpacing:{...nm,property:"gap"},fontSize:{},fontWeight:{},fontFamily:{},barTransition:{...im,property:"transition"}}}),pe,he)(tm),lm=te(eh),dm=am.cssVarList,cm={[dm.hostDirection]:lm.direction,[dm.barHeight]:"4px",[dm.barTransition]:"background-color 0.3s",[dm.barBorderRadius]:lm.radius.sm,[dm.hostMinWidth]:Ah.minWidth,[dm.barSpacing]:lm.spacing.sm,[dm.emptyBarColor]:lm.colors.surface.light,[dm.fontFamily]:Ah.fontFamily,[dm.fontSize]:Ah.labelFontSize,[dm.fontWeight]:Ah.labelFontWeight,[dm.spacing]:lm.spacing.sm,_fullWidth:{[dm.hostWidth]:"100%"},score:{0:{[dm.filledBarColor]:lm.colors.error.light,[dm.textColor]:lm.colors.error.light},1:{[dm.filledBarColor]:lm.colors.error.main,[dm.textColor]:lm.colors.error.main},2:{[dm.filledBarColor]:lm.colors.error.dark,[dm.textColor]:lm.colors.error.dark},3:{[dm.filledBarColor]:lm.colors.success.dark,[dm.textColor]:lm.colors.success.dark},4:{[dm.filledBarColor]:lm.colors.success.main,[dm.textColor]:lm.colors.success.main}}},pm={...dm};var hm=Object.freeze({__proto__:null,default:cm,vars:pm});const um=k("collapsible-container");class gm extends(ye({componentName:um,baseSelector:"slot"})){static get observedAttributes(){return["collapsed","collapsible","text"]}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="wrapper">\n <descope-text st-host-direction="ltr">\n <div class="header">\n <div class="icon">\n <descope-icon st-fill="currentcolor" src=data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iYmxhY2siIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0xNy4yMTkzIDkuMjcyODNDMTcuNjU4NCA4Ljg3OTEyIDE4LjMzMzQgOC45MTU4NyAxOC43MjcyIDkuMzU0OTJDMTkuMTIwOSA5Ljc5Mzk3IDE5LjA4NDEgMTAuNDY5MSAxOC42NDUxIDEwLjg2MjhDMTguNjQ1MSAxMC44NjI4IDEzLjA0NTcgMTYuMDAyMiAxMi42NCAxNi4zNjZDMTIuMjM0MyAxNi43Mjk4IDExLjc2MDggMTYuNzI5OCAxMS4zNTUyIDE2LjM2Nkw1LjM1NDkyIDEwLjg2MjhDNC45MTU4NyAxMC40NjkxIDQuODc5MTIgOS43OTM5NyA1LjI3MjgzIDkuMzU0OTJDNS42NjY1NSA4LjkxNTg3IDYuMzQxNjQgOC44NzkxMiA2Ljc4MDY5IDkuMjcyODNMMTIgMTQuMTM2OEwxNy4yMTkzIDkuMjcyODNaIi8+Cjwvc3ZnPgo=></descope-icon>\n </div>\n <span></span>\n </div>\n </descope-text>\n <div class="content">\n <slot></slot>\n </div>\n </div>\n\t',V(`\n div.content {\n transition-property: max-height;\n overflow: auto;\n height: auto;\n\t\t\t}\n\t\t\tslot {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\twidth: 100%;\n\t\t\t\tdisplay: flex;\n\t\t\t}\n slot:focus-visible {\n outline: none;\n }\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n .header {\n user-select: none;\n display: flex;\n align-items: baseline;\n }\n .icon {\n flex-shrink: 0;\n height: var(${ko.cssVarList.textLineHeight});\n min-height: 24px;\n display: flex;\n align-items: center;\n }\n descope-icon {\n transition-property: transform;\n }\n .rotate {\n transform: rotate(-180deg);\n }\n descope-text {\n width: 100%;\n display: flex;\n }\n span {\n align-self: center;\n word-break: break-word;\n }\n span:empty {\n display: none;\n }\n .wrapper {\n overflow: hidden;\n display: inline-flex;\n width: 100%;\n flex-direction: column;\n }\n `,this),this.header=this.shadowRoot.querySelector(".header"),this.content=this.shadowRoot.querySelector("div.content"),this.icon=this.header.querySelector("descope-icon"),this.headerText=this.header.querySelector("span"),this.textComponent=this.shadowRoot.querySelector("descope-text")}get isCollapsible(){return"true"===this.getAttribute("collapsible")}calcContentHeight(){return this.content.offsetHeight||this.content.scrollHeight}get isCollapsed(){return"true"===this.getAttribute("collapsed")}toggle(){this.setAttribute("collapsed",this.isCollapsed?"false":"true")}collapse(e=!1){const t=()=>{this.content.style.maxHeight="0px"};if(this.icon.classList.add("rotate"),!e)return t();this.content.style.maxHeight=this.calcContentHeight()+"px",setTimeout(t)}expand(e=!1){const t=()=>{this.content.style.maxHeight=""};if(this.icon.classList.remove("rotate"),!e)return t();this.content.addEventListener("transitionend",t,{once:!0}),this.content.style.maxHeight=this.calcContentHeight()+"px"}#no=!1;init(){super.init?.(),this.#no=!0,this.header.addEventListener("click",()=>{this.isCollapsible&&this.toggle()}),L(this,this.textComponent,{includeAttrs:["text-align","text-variant","text-mode"],mapAttrs:{"text-mode":"mode","text-variant":"variant"}})}updateHeaderText(){const e=this.getAttribute("text")||"";this.headerText.innerText=e}attributeChangedCallback(e,t,o){"text"!==e?this.isCollapsed&&this.isCollapsible?this.collapse(this.#no):this.expand(this.#no):this.updateHeaderText()}}const mm={host:()=>":host",icon:()=>"descope-icon",iconWrapper:()=>".icon",header:()=>".header",text:()=>"span",wrapper:()=>".wrapper",content:()=>"div.content"},bm=I(ce({mappings:{hostWidth:{selector:mm.host,property:"width"},hostDirection:{selector:mm.host,property:"direction"},verticalPadding:[{selector:mm.wrapper,property:"padding-top"},{selector:mm.wrapper,property:"padding-bottom"}],horizontalPadding:[{selector:mm.wrapper,property:"padding-left"},{selector:mm.wrapper,property:"padding-right"}],flexDirection:{},justifyContent:{},alignItems:{},gap:[{},{property:"margin-top"}],backgroundColor:{selector:mm.wrapper},backgroundImage:{selector:mm.wrapper},backgroundPositionX:{selector:mm.wrapper},backgroundPositionY:{selector:mm.wrapper},backgroundSize:{selector:mm.wrapper},backgroundRepeat:{selector:mm.wrapper},borderRadius:{selector:mm.wrapper},borderColor:{selector:mm.wrapper},borderStyle:{selector:mm.wrapper},borderWidth:{selector:mm.wrapper},boxShadow:{selector:mm.wrapper},headerIconOrder:{selector:mm.iconWrapper,property:"order"},headerCursor:{selector:mm.header,property:"cursor"},headerGap:{selector:mm.header,property:"gap"},textGrow:{selector:mm.text,property:"flex-grow"},textDirection:{selector:mm.text,property:"direction"},iconAnimationDuration:{selector:mm.icon,property:"transition-duration"},contentAnimationDuration:{selector:mm.content,property:"transition-duration"}}}),pe,he)(gm),ym=te(eh),fm=bm.cssVarList,[vm,xm,Cm]=ie({shadowColor:"#00000020"},um),{shadowColor:wm}=xm,Im={...vm,[fm.hostWidth]:"100%",[fm.boxShadow]:"none",[fm.backgroundColor]:ym.colors.surface.main,[fm.backgroundImage]:"",[fm.backgroundPositionX]:"center",[fm.backgroundPositionY]:"center",[fm.backgroundSize]:"cover",[fm.backgroundRepeat]:"no-repeat",[fm.borderRadius]:"0px",[fm.hostDirection]:ym.direction,[fm.flexDirection]:"column",[fm.alignItems]:"flex-start",[fm.justifyContent]:"flex-start",[fm.headerGap]:ym.spacing.md,[fm.iconAnimationDuration]:"0.1s",[fm.contentAnimationDuration]:"0.1s",[fm.borderWidth]:"0px",[fm.textGrow]:"0",verticalPadding:{sm:{[fm.verticalPadding]:"5px"},md:{[fm.verticalPadding]:"10px"},lg:{[fm.verticalPadding]:"20px"}},horizontalPadding:{sm:{[fm.horizontalPadding]:"5px"},md:{[fm.horizontalPadding]:"10px"},lg:{[fm.horizontalPadding]:"20px"}},spaceBetween:{sm:{[fm.gap]:"10px"},md:{[fm.gap]:"20px"},lg:{[fm.gap]:"30px"}},shadow:{sm:{[fm.boxShadow]:`${ym.shadow.wide.sm} ${wm}, ${ym.shadow.narrow.sm} ${wm}`},md:{[fm.boxShadow]:`${ym.shadow.wide.md} ${wm}, ${ym.shadow.narrow.md} ${wm}`},lg:{[fm.boxShadow]:`${ym.shadow.wide.lg} ${wm}, ${ym.shadow.narrow.lg} ${wm}`},xl:{[fm.boxShadow]:`${ym.shadow.wide.xl} ${wm}, ${ym.shadow.narrow.xl} ${wm}`},"2xl":{[Cm.shadowColor]:"#00000050",[fm.boxShadow]:`${ym.shadow.wide["2xl"]} ${wm}`}},borderRadius:{sm:{[fm.borderRadius]:ym.radius.sm},md:{[fm.borderRadius]:ym.radius.md},lg:{[fm.borderRadius]:ym.radius.lg},xl:{[fm.borderRadius]:ym.radius.xl},"2xl":{[fm.borderRadius]:ym.radius["2xl"]},"3xl":{[fm.borderRadius]:ym.radius["3xl"]}},iconPosition:{left:{[fm.headerIconOrder]:"0"},right:{[fm.headerIconOrder]:"1"}},_fillTitle:{[fm.textGrow]:"1"},_border:{[fm.borderColor]:ym.colors.surface.light,[fm.borderWidth]:ym.border.xs,[fm.borderStyle]:"solid"},_collapsible:{[fm.headerCursor]:"pointer"}},Sm={...fm,...Cm};var Mm=Object.freeze({__proto__:null,default:Im,vars:Sm});const Am=k("recovery-codes");class Em extends(ye({componentName:Am,baseSelector:":host > div"})){static get observedAttributes(){return["readonly"]}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="wrapper">\n <div class="list"></div>\n <descope-text class="icon-wrapper">\n <vaadin-icon class="icon" icon="vaadin:copy-o" title="Copy"></vaadin-icon>\n </descope-text>\n </div>\n ',this.list=this.shadowRoot.querySelector(".list"),this.icon=this.shadowRoot.querySelector(".icon"),this.iconWrapper=this.shadowRoot.querySelector(".icon-wrapper"),V("\n :host {\n display: inline-block;\n position: relative;\n }\n .wrapper {\n display: flex;\n justify-content: space-between;\n }\n .list {\n display: flex;\n flex-grow: 1;\n flex-direction: column;\n }\n descope-text span {\n display: inline-flex;\n align-items: center;\n width: fit-content;\n }\n descope-text span::before {\n content: '\\02022';\n transform: translateY(-0.06em);\n }\n .icon-wrapper {\n align-self: flex-start;\n }\n .icon {\n cursor: pointer;\n }\n .icon.copied {\n cursor: initial;\n }\n .icon.readonly {\n pointer-events: none;\n }\n ",this)}get variant(){return this.getAttribute("variant")}get mode(){return this.getAttribute("mode")}init(){super.init(),this.icon.addEventListener("click",this.onCopy.bind(this)),L(this,this.iconWrapper,{includeAttrs:["variant","mode"]})}onCopy(){navigator.clipboard.writeText(String(this.data.map(e=>e.value).join("\n"))),this.icon.setAttribute("icon","vaadin:check-circle-o"),this.icon.setAttribute("title","Copied"),this.icon.classList.add("copied"),setTimeout(()=>{this.icon.setAttribute("icon","vaadin:copy-o"),this.icon.setAttribute("title","Copy"),this.icon.classList.remove("copied")},5e3)}onReadOnly(e){this.icon.classList.toggle("readonly",e)}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),o!==t&&"readonly"===e&&this.onReadOnly("true"===o)}}const Tm=I(ce({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostMinWidth:{selector:()=>":host",property:"min-width"},hostDirection:[{selector:()=>":host",property:"direction"},{selector:()=>ko.componentName,property:ko.cssVarList.hostDirection}],textAlign:{selector:()=>".list",property:"align-items"},iconColor:{selector:()=>"vaadin-icon",property:"color"},iconSize:{selector:()=>"vaadin-icon",property:"font-size"},iconGap:{selector:()=>".wrapper",property:"gap"},bulletGap:{selector:()=>"descope-text span",property:"gap"}}}),Be({itemRenderer:({value:e},t,o)=>`\n <descope-text variant="${o.variant}" mode="${o.mode}">\n <span>${e}</span>\n </descope-text>\n `,rerenderAttrsList:["variant","mode"],targetSelector:".list"}),pe,he)(Em),km=te(eh),zm=Tm.cssVarList,Lm=ko.cssVarList,Vm={[zm.hostMinWidth]:"190px",[zm.hostDirection]:km.direction,[zm.iconColor]:oe(Lm.textColor),[zm.iconSize]:oe(Lm.fontSize),[zm.iconGap]:"8px",[zm.bulletGap]:"0.35em",textAlign:{right:{[zm.textAlign]:"flex-end"},left:{[zm.textAlign]:"flex-start"},center:{[zm.textAlign]:"center"}},_fullWidth:{[zm.hostWidth]:"100%"}};var Nm=Object.freeze({__proto__:null,default:Vm,vars:zm});const Dm=k("outbound-apps"),Pm=({name:e,description:t,logo:o,appId:i,isConnected:r},n,s)=>{const a=r?"disconnect":"connect";return`\n <descope-list-item>\n <descope-avatar\n ${o?`img="${o}"`:""}\n ${e?`display-name="${e}" abbr=${P(e)}`:""}\n size=${s.size}\n ${o?'st-avatar-background-color="none"':""}\n class="app-logo"\n ></descope-avatar>\n\n <div class="content">\n <descope-text\n class="app-title"\n variant="subtitle1"\n mode="primary"\n >${e}</descope-text>\n ${t?`\n <descope-text\n class="app-description"\n variant="body2"\n mode="primary"\n >${t}</descope-text>\n `:""}\n </div>\n <div class="controls">\n <descope-button variant="link" mode="primary" size=${s.size} data-action="${a}" data-outbound-app-id="${i}" data-id="${a}">\n ${r?s.disconnectButtonLabel:s.connectButtonLabel}\n </descope-button>\n </div>\n </descope-list-item>\n`},Bm=ye({componentName:Dm,baseSelector:"descope-list"}),{host:Fm}={host:{selector:()=>":host"}},Rm=I(ce({mappings:{hostWidth:{...Fm,property:"width"},minHeight:{selector:()=>":host"},hostDirection:[{...Fm,property:"direction"},{selector:"descope-list",property:"direction"},{selector:"descope-list-item",property:"direction"}],iconColor:{selector:()=>" descope-icon",property:Ei.cssVarList.fill},errorIconColor:{selector:()=>" descope-icon.error-icon",property:Ei.cssVarList.fill},fontSize:{selector:ko.componentName,property:ko.cssVarList.fontSize},appLogoGap:{selector:()=>" .app-logo",property:"margin-inline-end"},contentGap:{selector:()=>" .content",property:"gap"},itemsTextAlign:{selector:ko.componentName,property:ko.cssVarList.textAlign},itemCursor:{selector:dp.componentName,property:dp.cssVarList.cursor},itemOutline:{selector:dp.componentName,property:dp.cssVarList.outline},itemBorderColor:{selector:dp.componentName,property:dp.cssVarList.borderColor},itemBackgroundColor:{selector:dp.componentName,property:dp.cssVarList.backgroundColor},listBorderWidth:{selector:()=>hp.componentName,property:hp.cssVarList.borderWidth},listBoxShadow:{selector:()=>hp.componentName,property:hp.cssVarList.boxShadow},listPadding:[{selector:()=>hp.componentName,property:hp.cssVarList.verticalPadding},{selector:()=>hp.componentName,property:hp.cssVarList.horizontalPadding}]}}),pe,Be({itemRenderer:Pm,rerenderAttrsList:["size","connect-button-label","disconnect-button-label"]}),he)(class extends Bm{constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <descope-list>\n <slot name="empty-state" slot="empty-state"></slot>\n </descope-list>\n ',this.appsList=this.shadowRoot.querySelector("descope-list"),V("\n :host {\n width: 100%;\n }\n .controls {\n display: flex;\n min-width: 8em;\n justify-content: end;\n }\n .content {\n flex-grow: 1;\n display: flex;\n flex-direction: column;\n }\n .app-title,\n .app-description {\n display: flex;\n direction: inherit;\n }\n descope-list {\n display: block;\n }\n ",this)}init(){super.init?.(),this.appsList.itemRenderer=Pm,this.appsList.addEventListener("click",this.onAppsListClick.bind(this))}get readonly(){return"true"===this.getAttribute("readonly")}onAppsListClick(e){if(!this.readonly){const t=e.srcElement.getAttribute("data-outbound-app-id"),o=e.srcElement.getAttribute("data-action");t&&o&&this.dispatchEvent(new CustomEvent(`${o}-clicked`,{bubbles:!0,detail:{id:t,action:o}}))}}get size(){return this.getAttribute("size")||"sm"}get connectButtonLabel(){return this.getAttribute("connect-button-label")||"Connect"}get disconnectButtonLabel(){return this.getAttribute("disconnect-button-label")||"Disconnect"}}),Wm=Rm.cssVarList,Om={[Wm.iconColor]:eh.colors.primary.main,[Wm.errorIconColor]:eh.colors.error.main,[Wm.appLogoGap]:eh.spacing.md,[Wm.contentGap]:eh.spacing.xs,[Wm.itemCursor]:"default",[Wm.itemOutline]:"none",[Wm.itemBorderColor]:"transparent",[Wm.listPadding]:"0",[Wm.listBorderWidth]:"0",[Wm.listBoxShadow]:"none",size:{xs:{[Wm.fontSize]:"0.6em"},sm:{[Wm.fontSize]:"0.8em"},md:{[Wm.fontSize]:"1em"},lg:{[Wm.fontSize]:"1.5em"}}};var jm=Object.freeze({__proto__:null,default:Om,vars:Wm});const $m=k("outbound-app-button");class _m extends(ye({componentName:$m,baseSelector:":host > descope-button"})){static get observedAttributes(){return["label","icon-src","icon-fill-current-color"]}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <descope-button>\n <descope-icon class="icon"></descope-icon>\n <span class="label"></span>\n </descope-button>\n ',V("\n :host {\n display: inline-block;\n }\n .hidden {\n display: none;\n }\n ",this),this.button=this.shadowRoot.querySelector("descope-button"),this.icon=this.shadowRoot.querySelector(".icon"),this.label=this.shadowRoot.querySelector(".label")}init(){super.init?.(),L(this,this.button,{excludeAttrs:["style","class","label","icon-src","icon-fill-current-color"]})}updateLabel(e=""){this.label.textContent=e,this.label.classList.toggle("hidden",!e)}updateIcon(e=""){this.icon.setAttribute("src",e),this.icon.classList.toggle("hidden",!e)}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),t!==o&&("label"===e?this.updateLabel(o):"icon-src"===e&&this.updateIcon(o))}}const Hm=I(ce({mappings:{hostWidth:{selector:()=>":host",property:"width"},iconFillCurrentColor:{selector:()=>"descope-icon",property:Ni.cssVarList.iconColor}}}),pe,he)(_m),qm=Hm.cssVarList,Ym={[qm.iconFillCurrentColor]:"inherit",_iconFillCurrentColor:{[qm.iconFillCurrentColor]:"currentColor"},_fullWidth:{[qm.hostWidth]:"100%"}},Um=qm;var Gm=Object.freeze({__proto__:null,default:Ym,vars:Um});const Zm=e=>{const t=parseInt(e,10);return Number.isNaN(t)?0:t},Qm={desktop:{light:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIwIDE4QzIxLjEgMTggMjEuOTkgMTcuMSAyMS45OSAxNkwyMiA2QzIyIDQuOSAyMS4xIDQgMjAgNEg0QzIuOSA0IDIgNC45IDIgNlYxNkMyIDE3LjEgMi45IDE4IDQgMThIMFYyMEgyNFYxOEgyMFpNNCA2SDIwVjE2SDRWNloiIGZpbGw9IiM2MzZDNzQiLz4KPC9zdmc+Cg==",dark:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjUiIHZpZXdCb3g9IjAgMCAyNCAyNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIwIDE4LjVDMjEuMSAxOC41IDIxLjk5IDE3LjYgMjEuOTkgMTYuNUwyMiA2LjVDMjIgNS40IDIxLjEgNC41IDIwIDQuNUg0QzIuOSA0LjUgMiA1LjQgMiA2LjVWMTYuNUMyIDE3LjYgMi45IDE4LjUgNCAxOC41SDBWMjAuNUgyNFYxOC41SDIwWk00IDYuNUgyMFYxNi41SDRWNi41WiIgZmlsbD0iI0Y0RjVGNiIvPgo8L3N2Zz4K"},mobile:{light:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE2IDFIOEM2LjM0IDEgNSAyLjM0IDUgNFYyMEM1IDIxLjY2IDYuMzQgMjMgOCAyM0gxNkMxNy42NiAyMyAxOSAyMS42NiAxOSAyMFY0QzE5IDIuMzQgMTcuNjYgMSAxNiAxWk0xNyAxOEg3VjRIMTdWMThaTTE0IDIxSDEwVjIwSDE0VjIxWiIgZmlsbD0iIzYzNkM3NCIvPgo8L3N2Zz4K",dark:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjUiIHZpZXdCb3g9IjAgMCAyNCAyNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE2IDEuNUg4QzYuMzQgMS41IDUgMi44NCA1IDQuNVYyMC41QzUgMjIuMTYgNi4zNCAyMy41IDggMjMuNUgxNkMxNy42NiAyMy41IDE5IDIyLjE2IDE5IDIwLjVWNC41QzE5IDIuODQgMTcuNjYgMS41IDE2IDEuNVpNMTcgMTguNUg3VjQuNUgxN1YxOC41Wk0xNCAyMS41SDEwVjIwLjVIMTRWMjEuNVoiIGZpbGw9IiNGNEY1RjYiLz4KPC9zdmc+Cg=="},tablet:{light:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjUiIHZpZXdCb3g9IjAgMCAyNCAyNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzUyNTJfNzY4KSI+CjxwYXRoIGQ9Ik0xOC41IDAuNUg0LjVDMy4xMiAwLjUgMiAxLjYyIDIgM1YyMkMyIDIzLjM4IDMuMTIgMjQuNSA0LjUgMjQuNUgxOC41QzE5Ljg4IDI0LjUgMjEgMjMuMzggMjEgMjJWM0MyMSAxLjYyIDE5Ljg4IDAuNSAxOC41IDAuNVpNMTEuNSAyMy41QzEwLjY3IDIzLjUgMTAgMjIuODMgMTAgMjJDMTAgMjEuMTcgMTAuNjcgMjAuNSAxMS41IDIwLjVDMTIuMzMgMjAuNSAxMyAyMS4xNyAxMyAyMkMxMyAyMi44MyAxMi4zMyAyMy41IDExLjUgMjMuNVpNMTkgMTkuNUg0VjMuNUgxOVYxOS41WiIgZmlsbD0iIzYzNkM3NCIvPgo8L2c+CjxkZWZzPgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzUyNTJfNzY4Ij4KPHJlY3Qgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiBmaWxsPSJ3aGl0ZSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMCAwLjUpIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==",dark:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjUiIHZpZXdCb3g9IjAgMCAyNCAyNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzUzMDNfODYzKSI+CjxwYXRoIGQ9Ik0xOC41IDAuNUg0LjVDMy4xMiAwLjUgMiAxLjYyIDIgM1YyMkMyIDIzLjM4IDMuMTIgMjQuNSA0LjUgMjQuNUgxOC41QzE5Ljg4IDI0LjUgMjEgMjMuMzggMjEgMjJWM0MyMSAxLjYyIDE5Ljg4IDAuNSAxOC41IDAuNVpNMTEuNSAyMy41QzEwLjY3IDIzLjUgMTAgMjIuODMgMTAgMjJDMTAgMjEuMTcgMTAuNjcgMjAuNSAxMS41IDIwLjVDMTIuMzMgMjAuNSAxMyAyMS4xNyAxMyAyMkMxMyAyMi44MyAxMi4zMyAyMy41IDExLjUgMjMuNVpNMTkgMTkuNUg0VjMuNUgxOVYxOS41WiIgZmlsbD0iI0Y0RjVGNiIvPgo8L2c+CjxkZWZzPgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzUzMDNfODYzIj4KPHJlY3Qgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiBmaWxsPSJ3aGl0ZSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMCAwLjUpIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg=="},unknown:{light:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjUiIHZpZXdCb3g9IjAgMCAyNCAyNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTQgNi41SDIyVjQuNUg0QzIuOSA0LjUgMiA1LjQgMiA2LjVWMTcuNUgwVjIwLjVIMTRWMTcuNUg0VjYuNVpNMjMgOC41SDE3QzE2LjQ1IDguNSAxNiA4Ljk1IDE2IDkuNVYxOS41QzE2IDIwLjA1IDE2LjQ1IDIwLjUgMTcgMjAuNUgyM0MyMy41NSAyMC41IDI0IDIwLjA1IDI0IDE5LjVWOS41QzI0IDguOTUgMjMuNTUgOC41IDIzIDguNVpNMjIgMTcuNUgxOFYxMC41SDIyVjE3LjVaIiBmaWxsPSIjNjM2Qzc0Ii8+Cjwvc3ZnPgo=",dark:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTQgNkgyMlY0SDRDMi45IDQgMiA0LjkgMiA2VjE3SDBWMjBIMTRWMTdINFY2Wk0yMyA4SDE3QzE2LjQ1IDggMTYgOC40NSAxNiA5VjE5QzE2IDE5LjU1IDE2LjQ1IDIwIDE3IDIwSDIzQzIzLjU1IDIwIDI0IDE5LjU1IDI0IDE5VjlDMjQgOC40NSAyMy41NSA4IDIzIDhaTTIyIDE3SDE4VjEwSDIyVjE3WiIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg=="}},Jm=k("trusted-devices"),Km=({id:e,name:t,lastLoginDate:o,deviceType:i,isCurrent:r},n,s)=>{const a=r?'class="current-device"':"",{iconSrc:l,iconSrcDark:d}=(e=>{const t=Qm[e]||Qm.unknown;return{iconSrc:t.light,iconSrcDark:t.dark}})(i),c=s.lastLoginLabel?`${s.lastLoginLabel} `:"",p=((e,t)=>{if(Number.isNaN(parseInt(e,10)))return"";const o=new Date(e),i=o.getFullYear(),r=String(o.getMonth()+1).padStart(2,"0"),n=String(o.getDate()).padStart(2,"0"),s=o.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit"}),a={"DD-MM-YYYY":`${n}/${r}/${i}`,"YYYY-MM-DD":`${i}/${r}/${n}`,"MM-DD-YYYY":`${r}/${n}/${i}`};return`${a[t]||a["MM/DD/YYYY"]} ${s}`})(o,s.format),h=r?`<descope-badge\n bordered="true"\n size="xs"\n mode="primary"\n st-host-direction="${s.direction}"\n >\n ${s.currentDeviceLabel}\n </descope-badge>`:"",u=s.hideActions||r?"":`<descope-link\n class="remove-device"\n variant="body1"\n mode="primary"\n data-action="remove-device"\n data-device-id="${e}"\n st-host-direction="${s.direction}"\n ellipsis="true"\n >\n ${s.removeDeviceLabel}\n </descope-link>`,g=document.createElement("template");return g.innerHTML=`\n <descope-list-item ${a}>\n <div class="content">\n <div class="main">\n <span class="device">\n <descope-icon\n class="device-icon"\n src="${l}"\n src-dark="${d}">\n </descope-icon>\n <descope-text\n class="device-name"\n variant="body1"\n mode="primary">\n </descope-text>\n </span>\n <span class="panel">\n ${h}\n ${u}\n </span>\n </div>\n <div class="meta">\n <descope-text\n variant="body2"\n mode="primary"\n >\n ${c}\n </descope-text>\n <descope-text\n class="login-date"\n variant="body2"\n mode="primary"\n >\n ${p}\n </descope-text>\n </div>\n </div>\n </descope-list-item>\n `,g.content.querySelector(".device-name").textContent=t,g},Xm=ye({componentName:Jm,baseSelector:hp.componentName}),{host:eb}={host:{selector:()=>":host"}},tb=I(ce({mappings:{hostWidth:{...eb,property:"width"},hostMinWidth:{...eb,property:"min-width"},hostDirection:[{...eb,property:"direction"},{selector:()=>"descope-list-item",property:"direction"},{selector:()=>"descope-text",property:"direction"}],listItemsGap:{property:hp.cssVarList.gap},listBackgroundColor:{selector:()=>hp.componentName,property:hp.cssVarList.backgroundColor},listBorderRadius:{selector:()=>hp.componentName,property:hp.cssVarList.borderRadius},listBorderWidth:{selector:()=>hp.componentName,property:hp.cssVarList.borderWidth},listBoxShadow:{selector:()=>hp.componentName,property:hp.cssVarList.boxShadow},listPadding:[{selector:()=>hp.componentName,property:hp.cssVarList.verticalPadding},{selector:()=>hp.componentName,property:hp.cssVarList.horizontalPadding}],itemVerticalPadding:{selector:dp.componentName,property:dp.cssVarList.verticalPadding},itemHorizontalPadding:{selector:dp.componentName,property:dp.cssVarList.horizontalPadding},itemCursor:{selector:dp.componentName,property:dp.cssVarList.cursor},itemOutline:{selector:dp.componentName,property:dp.cssVarList.outline},itemBorderColor:{selector:dp.componentName,property:dp.cssVarList.borderColor},itemBorderRadius:{selector:dp.componentName,property:dp.cssVarList.borderRadius},itemBackgroundColor:{selector:dp.componentName,property:dp.cssVarList.backgroundColor},itemContentGap:{selector:()=>".content",property:"gap"},badgeBorderColor:{selector:Ac.componentName,property:Ac.cssVarList.borderColor},badgeTextColor:{selector:Ac.componentName,property:Ac.cssVarList.textColor},badgeBackgroundColor:{selector:Ac.componentName,property:Ac.cssVarList.backgroundColor},badgeBorderRadius:{selector:Ac.componentName,property:Ac.cssVarList.borderRadius},devicePanelGap:{selector:()=>".main",property:"gap"},deviceIconGap:{selector:()=>".device",property:"gap"},deviceIconSize:[{selector:()=>".device-icon",property:"width"},{selector:()=>".device-icon",property:"height"}],lastLoginLabelGap:{selector:" .meta",property:"gap"}}}),pe,Be({itemRenderer:Km,sortFn:(e,t)=>Zm(t.lastLoginDate)-Zm(e.lastLoginDate),rerenderAttrsList:["remove-device-label","current-device-label","last-login-label","format","hide-actions"]}),he)(class extends Xm{constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <descope-list>\n <slot name="empty-state" slot="empty-state"></slot>\n </descope-list>\n ',this.appsList=this.shadowRoot.querySelector("descope-list"),V("\n :host {\n display: inline-block;\n }\n\n .descope-list-item {\n min-width: 0;\n }\n\n .current-device {\n order: -1;\n }\n\n .content {\n display: flex;\n flex-direction: column;\n width: 100%;\n }\n\n .main {\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n\n .panel {\n display: flex;\n flex-shrink: 0;\n max-width: 75%;\n overflow: hidden;\n }\n\n .device {\n display: flex;\n min-width: 0;\n }\n\n .device-icon {\n flex-shrink: 0;\n }\n\n .meta {\n display: flex;\n }\n\n .login-date {\n min-width: fit-content;\n }\n\n descope-badge {\n min-width: 0;\n }\n\n descope-text {\n display: flex;\n align-items: center; \n min-width: 0;\n }\n descope-text::part(text-wrapper) {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n\n descope-link {\n overflow: hidden;\n }\n descope-link.remove-device::part(wrapper) {\n display: flex;\n width: 100%;\n }\n descope-link.remove-device {\n width: 100%;\n }\n ",this)}init(){super.init?.(),this.appsList.itemRenderer=Km,this.appsList.addEventListener("click",this.onRemoveClick.bind(this))}onRemoveClick(e){if(this.readOnly)return;const t=e.target.closest("[data-device-id]"),o=t?.getAttribute("data-device-id");o&&this.dispatchEvent(new CustomEvent("remove-device-clicked",{bubbles:!0,detail:{id:o,action:"remove-device"}}))}get readOnly(){return"true"===this.getAttribute("readonly")}get hideActions(){return"true"===this.getAttribute("hide-actions")}get format(){return this.getAttribute("format")?.toUpperCase()||"MM-DD-YYYY"}get removeDeviceLabel(){return this.getAttribute("remove-device-label")||"Sign out"}get currentDeviceLabel(){return this.getAttribute("current-device-label")||"Current device"}get lastLoginLabel(){return this.getAttribute("last-login-label")||"Last login:"}get direction(){return this.getAttribute("st-host-direction")}}),ob=tb.cssVarList,ib={[ob.hostWidth]:"auto",[ob.hostWidth]:"300px",[ob.hostMinWidth]:"300px",[ob.listBackgroundColor]:"transparent",[ob.listBorderRadius]:"0",[ob.listBorderWidth]:"0",[ob.listPadding]:"0",[ob.listBoxShadow]:"none",[ob.listItemsGap]:eh.spacing.lg,[ob.itemBorderColor]:eh.colors.surface.light,[ob.itemVerticalPadding]:eh.spacing.lg,[ob.itemHorizontalPadding]:eh.spacing.lg,[ob.itemBorderRadius]:eh.radius.xs,[ob.itemOutline]:"transparent",[ob.itemBackgroundColor]:"transparent",[ob.itemCursor]:"default",[ob.itemContentGap]:eh.spacing.sm,[ob.badgeBorderColor]:eh.colors.surface.light,[ob.badgeTextColor]:eh.colors.surface.dark,[ob.badgeBorderRadius]:eh.radius.xs,[ob.badgeBackgroundColor]:eh.colors.surface.main,[ob.devicePanelGap]:eh.spacing.md,[ob.deviceIconGap]:eh.spacing.md,[ob.deviceIconSize]:"24px",[ob.lastLoginLabelGap]:eh.spacing.xs,_fullWidth:{[ob.hostWidth]:"100%"}};var rb=Object.freeze({__proto__:null,default:ib,vars:ob});const nb=k("tooltip"),sb=["text","position","hide-delay","hover-delay","opened"];class ab extends(ye({componentName:nb,baseSelector:"vaadin-tooltip"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <descope-anchored>\n <slot></slot>\n <vaadin-tooltip slot="anchored"></vaadin-tooltip>\n </descope-anchored>\n ',this.defaultSlot=this.shadowRoot.querySelector("slot:not([name])"),this.tooltip=this.shadowRoot.querySelector("vaadin-tooltip"),this.anchored=this.shadowRoot.querySelector("descope-anchored")}#so(){const e=this.anchored?.classList?.contains("hidden");this.classList.toggle("hidden",e)}static get observedAttributes(){return sb.concat(super.observedAttributes||[])}get isOpened(){return"true"===this.getAttribute("opened")}get overlay(){return this.tooltip?._overlayElement}get overlayContentNode(){return this.overlay?.shadowRoot.querySelector('[part="content"]')}get tooltipText(){return this.getAttribute("text")?.trim()||""}get isStaticDisplay(){return"true"===this.getAttribute("static-display")}get srLabel(){return this.tooltip?.querySelector('[slot="sr-label"]')}#ao(){this.isStaticDisplay?(this.#lo(),this.setAttribute("inert","true")):this.removeAttribute("inert")}#lo(){this.overlay&&(this.overlay.style.display="block",this.overlay.style.position="static")}init(){super.init?.(),V('\n :host {\n display: inline-block;\n }\n vaadin-tooltip {\n display: block;\n position: absolute;\n width: 0;\n height: 0;\n overflow: hidden;\n }\n /* Stack anchor above the anchored element so the tooltip flows below it inline. */\n :host([static-display="true"]) descope-anchored::part(root) {\n flex-direction: column;\n }\n :host([static-display="true"]) descope-anchored::part(anchored) {\n position: static;\n inset: unset;\n }\n :host([static-display="true"]) vaadin-tooltip {\n position: static;\n width: auto;\n height: auto;\n overflow: visible;\n }\n :host([static-display="true"]) vaadin-tooltip [slot="sr-label"] {\n display: none;\n }\n',this),this.defaultSlot.addEventListener("slotchange",()=>this.#do()),this.#do(),this.#so(),setTimeout(()=>this.#co())}#do(){const e=this.defaultSlot?.assignedElements()?.[0];e&&(this.tooltip.target=e)}#co(){this.#po(),this.#ho(),L(this,this.tooltip,{includeAttrs:["position","opened"]}),this.#uo()}#go(){this.overlayContentNode.innerHTML=""}#mo(){const e=document.createElement("descope-enriched-text");return e.setAttribute("link-target-blank","true"),e.textContent=this.tooltipText,e}#po(){this.overlayContentNode&&setTimeout(()=>{this.#go(),this.textComponent=this.#mo(),this.overlayContentNode.appendChild(this.textComponent),this.srLabel&&!this.tooltipText&&this.srLabel.setAttribute("aria-hidden","true"),L(this,this.textComponent,{includeAttrs:["readonly"]})})}#ho(){if(!this.overlay)return;const e=this.overlay._attachOverlay?.bind(this.overlay);this.overlay._detachOverlay=()=>{},this.overlay._attachOverlay=()=>{e?.(),setTimeout(()=>{this.tooltip.shadowRoot.appendChild(this.overlay),this.overlay._updatePosition?.()})},this.isOpened&&setTimeout(()=>{this.tooltip.shadowRoot.appendChild(this.overlay),this.#ao(),this.overlay._updatePosition?.()})}#uo(){this.tooltip?.toggleAttribute("manual",this.isOpened)}#bo(e){if(!this.textComponent)return;const t=(e??"").trim();this.textComponent.textContent=t,this.srLabel&&(t?this.srLabel.removeAttribute("aria-hidden"):this.srLabel.setAttribute("aria-hidden","true"))}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),t!==o&&("text"===e&&this.#bo(o),"opened"===e&&this.#uo())}}const{overlay:lb,content:db}={overlay:{selector:()=>"vaadin-tooltip-overlay::part(overlay)"},content:{selector:()=>"vaadin-tooltip-overlay::part(content)"}},cb=I(he,Ne({selector:"",mappings:{fontFamily:{...db,property:Oe.cssVarList.fontFamilyOverride},fontSize:{...db,property:Oe.cssVarList.fontSizeOverride},fontWeight:{...db,property:Oe.cssVarList.fontWeightOverride},textColor:{...db,property:Oe.cssVarList.textColorOverride},hostDirection:{...db,property:Oe.cssVarList.hostDirectionOverride},backgroundColor:[{...lb},{...db}],borderColor:{...lb},borderStyle:{...lb},borderWidth:{...lb},borderRadius:{...lb},boxShadow:{...lb},horizontalPadding:[{...db,property:"padding-left"},{...db,property:"padding-right"}],verticalPadding:[{...db,property:"padding-top"},{...db,property:"padding-bottom"}]},forward:{attributes:["style"],include:!1}}))(ab),pb=te(eh),hb=cb.cssVarList,[ub,gb,mb]=ie({shadowColor:"#00000020"},nb),{shadowColor:bb}=gb,yb=`${pb.shadow.wide.sm} ${bb}, ${pb.shadow.narrow.sm} ${bb}`,fb={...ub,[hb.fontFamily]:pb.fonts.font1.family,[hb.fontSize]:eh.typography.body2.size,[hb.fontWeight]:eh.typography.body2.weight,[hb.textColor]:pb.colors.surface.contrast,[hb.hostDirection]:pb.direction,[hb.backgroundColor]:pb.colors.surface.main,[hb.borderColor]:pb.colors.surface.light,[hb.borderStyle]:"solid",[hb.borderWidth]:pb.border.xs,[hb.borderRadius]:pb.radius.xs,[hb.horizontalPadding]:pb.spacing.md,[hb.verticalPadding]:pb.spacing.sm,[hb.boxShadow]:yb,shadow:{sm:{[hb.boxShadow]:yb},md:{[hb.boxShadow]:`${pb.shadow.wide.md} ${bb}, ${pb.shadow.narrow.md} ${bb}`},lg:{[hb.boxShadow]:`${pb.shadow.wide.lg} ${bb}, ${pb.shadow.narrow.lg} ${bb}`},xl:{[hb.boxShadow]:`${pb.shadow.wide.xl} ${bb}, ${pb.shadow.narrow.xl} ${bb}`},"2xl":{[mb.shadowColor]:"#00000050",[hb.boxShadow]:`${pb.shadow.wide["2xl"]} ${bb}`}}};var vb=Object.freeze({__proto__:null,default:fb,vars:hb});const xb=async e=>{const t=await fetch(e);if(!t.ok)throw new Error(`[dataService] ${t.status} ${e}`);const o=await t.json();return o.data??o},Cb=async e=>xb(`${e}/countries.json`),wb=async(e,t)=>{try{return(await xb(`${t}/countries/${e}/subdivisions.json`)).map(({code:e,...t})=>({...t,state_code:e}))}catch{return[]}},Ib=async(e,t,o)=>xb(`${o}/countries/${e}/subdivisions/${t}/cities.json`),Sb=async e=>{const t=new URL("../labels.json",`${e}/`).href;return xb(t)},Mb=async(e,t)=>xb(`${t}/countries/${e}/cities.json`),Ab=k("country-subdivision-city-field-internal"),Eb=Symbol("selecting"),Tb=({name:e,translations:t={}},o)=>o&&(t[o]||t[o.split("-")[0]])||e,kb=e=>e?String(e).replace(/[&<>"']/g,e=>`&#${e.charCodeAt(0)};`):"",zb=({name:e,iso2:t,iso3:o,translations:i,lang:r})=>{const n=Tb({name:e,translations:i},r),s=[n,t,o];n!==e&&s.push(e);const a=kb(t),l=kb(s.join(" ")),d=kb(n);return`<div data-id="${a}" data-name="${l}" data-label="${d}">${d}</div>`},Lb=({name:e,state_code:t,translations:o,lang:i})=>{const r=Tb({name:e,translations:o},i),n=[r,t];r!==e&&n.push(e);const s=kb(t),a=kb(n.join(" ")),l=kb(r);return`<div data-id="${s}" data-name="${a}" data-label="${l}">${l}</div>`},Vb=({name:e,translations:t,lang:o})=>{const i=Tb({name:e,translations:t},o),r=[i];i!==e&&r.push(e);const n=kb(e),s=kb(r.join(" ")),a=kb(i);return`<div data-id="${n}" data-name="${s}" data-label="${a}">${a}</div>`},Nb=e=>`<descope-combo-box id="${e}" item-label-path="data-name" item-value-path="data-id" allow-custom-value="false"></descope-combo-box>`,Db=Se({componentName:Ab,baseSelector:""}),Pb=["disabled","readonly","size","bordered"],Bb=["hide-country","hide-subdivision","hide-city"],Fb=[...Pb,"label-type","country-label","subdivision-label","city-label",...Bb,"default-country","allowed-countries","pinned-countries","country-placeholder","subdivision-placeholder","city-placeholder","required","invalid","data-source-base-url","lang"],Rb=I()(class extends Db{static get observedAttributes(){return[].concat(Db.observedAttributes||[],Fb)}#yo;#fo;#vo;#xo=!1;#Co=!1;#wo=new Map;#Io=null;#So=null;#Mo=null;#Ao=null;#Eo=null;constructor(){super(),this.innerHTML=`\n <div class="wrapper">\n ${Nb("country-combo")}\n ${Nb("subdivision-combo")}\n ${Nb("city-combo")}\n </div>\n `,this.#yo=this.querySelector("#country-combo"),this.#fo=this.querySelector("#subdivision-combo"),this.#vo=this.querySelector("#city-combo"),this.#To(),this.#ko()}get#zo(){return"true"===this.getAttribute("hide-country")}get#Lo(){return"true"===this.getAttribute("hide-subdivision")}get#Vo(){return"true"===this.getAttribute("hide-city")}get#No(){return!this.#Do}get#Do(){return this.getAttribute("data-source-base-url")||void 0}get#Po(){const e=this.getAttribute("lang")||void 0;if(e)try{const[t]=Intl.getCanonicalLocales(e);return t}catch{return}}get#Bo(){return this.getAttribute("default-country")?.toUpperCase()||void 0}get#Fo(){return this.getAttribute("subdivision-label")||void 0}get#Ro(){return this.getAttribute("subdivision-placeholder")||void 0}get#Wo(){return(this.getAttribute("allowed-countries")||"").split(",").map(e=>e.trim().toUpperCase()).filter(Boolean)}get#Oo(){return(this.getAttribute("pinned-countries")||"").split(",").map(e=>e.trim().toUpperCase()).filter(Boolean)}get#jo(){return[this.#yo,this.#fo,this.#vo]}get value(){return{country:this.#zo?this.#Bo:this.#yo.value||void 0,subdivision:!this.#Lo&&this.#xo&&this.#fo.value||void 0,city:!this.#Vo&&this.#Co&&this.#vo.value||void 0}}set value(e){if(!e)return;let t;try{t="string"==typeof e?JSON.parse(e):e}catch{return}this.#Eo={...t},this.#Do&&this.#$o()}init(){this.addEventListener("focus",e=>{if(e.isTrusted){const e=this.#jo.find(e=>!e.classList.contains(`${Ab}-hidden`)&&!e.checkValidity());(e||this.#_o())?.focus()}}),super.init?.(),this.#Ho(),this.#qo(),this.#Yo(),this.#Uo()}#Uo(){this.#yo.renderItem=zb,this.#fo.renderItem=Lb,this.#vo.renderItem=Vb}attributeChangedCallback(e,t,o){if(super.attributeChangedCallback?.(e,t,o),t!==o)if("required"===e)this.#Go();else if(Bb.includes(e)||"data-source-base-url"===e)this.#Ho(),"data-source-base-url"===e&&this.#Yo();else if("default-country"===e){const e=o?.toUpperCase();if(e&&e!==o)return void this.setAttribute("default-country",e);e&&this.#wo.size?this.#Zo(e):e&&this.#zo&&this.#Qo()}else"lang"===e?this.#Jo():"invalid"===e?"true"===o&&this.#Ko():"allowed-countries"===e||"pinned-countries"===e?this.#zo||(this.#Io?this.#Xo(this.#Io):this.#Qo()):"country-label"===e?this.#ei(this.#yo,"label",o):"subdivision-label"===e?this.#ei(this.#fo,"label",o):"city-label"===e&&this.#ei(this.#vo,"label",o)}getValidity(){if(!this.isRequired)return{};const e=!this.#zo&&!this.#yo.value,t=!this.#Lo&&(this.#No||this.#xo)&&!this.#fo.value,o=!this.#Vo&&(this.#No||this.#Co)&&!this.#vo.value;return e||t||o?{valueMissing:!0}:{}}#Ko(){for(const e of[...this.#jo].reverse())e.classList.contains(`${Ab}-hidden`)||e.checkValidity()||e.reportValidity()}#To(){[this.#yo,this.#fo,this.#vo].forEach(e=>{e.customValueTransformFn=t=>{const o=e.baseElement?.items?.find(e=>e["data-name"]===t);return o?.getAttribute("data-label")??t}})}#ko(){this.#jo.forEach(e=>{L(this,e,{includeAttrs:[...Pb,"label-type"]})}),L(this,this.#yo,{includeAttrs:["default-country"],mapAttrs:{"default-country":"default-value"}}),[[this.#yo,"country-placeholder"],[this.#fo,"subdivision-placeholder"],[this.#vo,"city-placeholder"]].forEach(([e,t])=>{L(this,e,{includeAttrs:[t],mapAttrs:{[t]:"placeholder"}})})}#qo(){this.#yo.addEventListener("input",()=>this.#ti()),this.#fo.addEventListener("input",()=>this.#oi()),this.#vo.addEventListener("input",()=>this.#ii()),this.handleFocusEventsDispatching(this.#jo)}#Yo(){this.#Do&&(this.#Eo?this.#$o():this.#zo&&!this.#Bo||this.#Qo())}async#$o(){const{country:e,subdivision:t,city:o}=this.#Eo,i=!!t&&!this.#Lo,r=!!o&&!this.#Vo,n=this.#Io??Cb(this.#Do),s=this.#Ao??Sb(this.#Do),a=i&&e?wb(e,this.#Do):null,l=r&&e?i&&t?Ib(e,t,this.#Do):Mb(e,this.#Do):null,[d,c,p,h]=(await Promise.allSettled([n,s,a,l])).map(e=>"fulfilled"===e.status?e.value:null);if(!this.#Eo)return;c&&(this.#Ao=c);const u=[];d&&(this.#Io||(this.#Io=d,this.#Xo(d)),e&&!this.#zo&&u.push([this.#yo,e]));const g=e?this.#wo.get(e):null;g?.subdivisionType&&this.#ri(g.subdivisionType),p&&(this.#So=p,this.#xo=p.length>0,p.length>0&&(this.#fo.data=p.map(e=>({...e,lang:this.#Po})),t&&u.push([this.#fo,t]))),h&&(this.#Co=h.length>0,h.length>0&&(this.#Mo=h,this.#vo.data=h.map(e=>({...e,lang:this.#Po})),o&&u.push([this.#vo,o]))),this.#Ho(),this.#Eo=Eb,setTimeout(()=>{if(this.#Eo===Eb){for(const[e,t]of u){const o=e.items?.find(e=>e["data-id"]===t);o&&(e.selectedItem=o)}this.#Eo=null}})}#ti(){this.#Eo!==Eb&&(this.#Eo=null,this.#ni(),this.#si(),this.#Zo(this.#yo.value),this.#ii())}#oi(){if(this.#Eo===Eb)return;this.#Eo=null;const e=this.#fo.value;if(this.#si(),!this.#Vo&&e){const t=this.#yo.value;t&&this.#ai(t,e)}this.#ii()}#Zo(e){if(!e)return;const t=this.#wo.get(e);if(!t)return;const{hasSubdivisions:o,subdivisionType:i}=t;!this.#Lo&&o?(this.#ri(i),this.#li(e)):this.#Vo||this.#ai(e)}#ri(e){const t=this.#di(e);this.#Fo||this.#ei(this.#fo,"label",t||null),this.#Ro||this.#ei(this.#fo,"placeholder",t||null)}#di(e){const t=this.#Ao?.subdivisionTypes,o=t?.[e]??t?._fallback;if(!o)return e;const i=this.#Po;return i&&(o[i]||o[i.split("-")[0]])||o.en||e}async#ci(){try{this.#Ao=await Sb(this.#Do)}catch{}}async#Qo(){if(this.#Do){this.#yo.setAttribute("loading","true");try{const[e]=await Promise.all([Cb(this.#Do),this.#ci()]);this.#Io=e,this.#Xo(e),!this.#Eo&&this.#Bo&&this.#Zo(this.#Bo)}catch(e){console.error(`[${Ab}] Failed to load countries`,e)}finally{this.#yo.removeAttribute("loading")}}}async#li(e){this.#pi(this.#fo,!0),this.#fo.setAttribute("loading","true");try{const t=await wb(e,this.#Do);this.#So=t,this.#xo=t.length>0,this.#Ho(),t.length>0?this.#fo.data=t.map(e=>({...e,lang:this.#Po})):this.#Vo||this.#ai(e)}catch(t){console.error(`[${Ab}] Failed to load subdivisions for ${e}`,t),this.#xo=!1,this.#hi()}finally{this.#fo.removeAttribute("loading")}}async#ai(e,t){this.#vo.setAttribute("loading","true");try{const o=await(t?Ib(e,t,this.#Do):Mb(e,this.#Do));this.#Co=o.length>0,this.#Ho(),o.length>0&&(this.#Mo=o,this.#vo.data=o.map(e=>({...e,lang:this.#Po})))}catch(o){console.error(`[${Ab}] Failed to load cities for ${e}${t?`/${t}`:""}`,o)}finally{this.#vo.removeAttribute("loading")}}#Jo(){if(this.#Io){const e=this.#yo.value;this.#Xo(this.#Io),e&&this.#ui(this.#yo,e)}if(this.#So&&this.#xo){const e=this.#fo.value;this.#fo.data=this.#So.map(e=>({...e,lang:this.#Po})),e&&this.#ui(this.#fo,e)}if(this.#Mo&&this.#Co){const e=this.#vo.value;this.#vo.data=this.#Mo.map(e=>({...e,lang:this.#Po})),e&&this.#ui(this.#vo,e)}const e=this.#yo.value;if(e){const t=this.#wo.get(e);t?.subdivisionType&&this.#ri(t.subdivisionType)}}#Xo(e){const t=this.#gi(e);this.#yo.data=t.map(e=>({...e,lang:this.#Po})),this.#wo=new Map(e.map(e=>[e.iso2,e]))}#gi(e){const t=this.#Wo,o=this.#Oo;let i=t.length?e.filter(e=>t.includes(e.iso2)):[...e];return i.sort((e,t)=>Tb(e,this.#Po).localeCompare(Tb(t,this.#Po),this.#Po)),o.length?[...o.map(e=>i.find(t=>t.iso2===e)).filter(Boolean),...i.filter(e=>!o.includes(e.iso2))]:i}#hi(){this.#pi(this.#yo,!this.#zo),this.#pi(this.#fo,!this.#Lo&&(this.#No||this.#xo)),this.#pi(this.#vo,!this.#Vo&&(this.#No||this.#Co))}#pi(e,t){e?.classList.toggle(`${Ab}-hidden`,!t)}#Go(){const e=this.hasAttribute("required")?"true":null;this.#ei(this.#yo,"required",this.#zo?null:e),this.#ei(this.#fo,"required",this.#Lo||!this.#No&&!this.#xo?null:e),this.#ei(this.#vo,"required",this.#Vo||!this.#No&&!this.#Co?null:e)}#Ho(){this.#hi(),this.#Go(),this.setCustomValidity("")}#ni(){this.#fo.value="",this.#fo.data=[],this.#xo=!1,this.#Fo||this.#fo.removeAttribute("label"),this.#Ro||this.#fo.removeAttribute("placeholder"),this.#Ho()}#si(){this.#vo.value="",this.#vo.data=[],this.#Mo=null,this.#Co=!1,this.#Ho()}#ii(){this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))}#ei(e,t,o){o?e.setAttribute(t,o):e.removeAttribute(t)}#_o(){return this.#jo.find(e=>!e.classList.contains(`${Ab}-hidden`))}#ui(e,t){setTimeout(()=>{const o=e.items?.find(e=>e["data-id"]===t);o&&(e.selectedItem=o)})}}),Wb=k("country-subdivision-city-field"),Ob={selector:()=>":host"},jb={selector:`${Ab} > .wrapper`},$b={selector:`${Ab} > .wrapper > descope-combo-box`},_b=I(ce({componentNameOverride:k("input-wrapper")}),ce({mappings:{hostWidth:{...Ob,property:"width"},hostDirection:[{...Ob,property:"direction"},{...$b,property:xi.cssVarList.hostDirection}],flexDirection:{...jb,property:"flex-direction"},flexGap:{...jb,property:"gap"},itemAlignment:{...jb,property:"align-items"},itemMinWidth:{...$b,property:"min-width"},itemFlexGrow:{...$b,property:"flex-grow"},itemWidth:{...$b,property:xi.cssVarList.hostWidth}}}),pe,Le({proxyProps:["value"],inputEvent:"input",proxyParentValidation:!0}),he,e=>class extends e{init(){super.init?.();const e=document.createElement("template");e.innerHTML=`\n <${Ab}\n tabindex="-1"\n ></${Ab}>\n `,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(Ab),L(this,this.inputElement,{includeAttrs:["size","bordered","required","label-type","disabled","readonly","hide-country","hide-subdivision","hide-city","default-country","allowed-countries","pinned-countries","country-label","subdivision-label","city-label","country-placeholder","subdivision-placeholder","city-placeholder","data-source-base-url","lang","invalid"]}),T(this,this.inputElement,{includeAttrs:["invalid"]})}})(Ee({slots:[],wrappedEleName:"vaadin-custom-field",style:()=>`\n :host {\n display: inline-flex;\n max-width: 100%;\n }\n vaadin-custom-field {\n line-height: unset;\n width: 100%;\n }\n\n ${Ab} {\n display: inline-block;\n box-sizing: border-box;\n user-select: none;\n width: 100%;\n max-width: 100%;\n }\n\n ${Ab} > .wrapper {\n display: flex;\n width: 100%;\n flex-wrap: wrap;\n }\n\n .${Ab}-hidden {\n display: none;\n }\n\n`,excludeAttrsSync:["tabindex","style","error-message"],componentName:Wb})),Hb=_b.cssVarList,qb={[Hb.hostWidth]:Ah.width,[Hb.hostDirection]:Ah.direction,[Hb.flexDirection]:"column",[Hb.flexGap]:"0.5em",[Hb.itemAlignment]:"stretch",[Hb.itemFlexGrow]:"0",[Hb.itemWidth]:"auto",_fullWidth:{[Hb.hostWidth]:"100%"},_horizontal:{[Hb.flexDirection]:"row",[Hb.itemFlexGrow]:"1"}};var Yb=Object.freeze({__proto__:null,default:qb,vars:Hb});const Ub=k("attachment"),Gb=["top-end","top-start","top-center","bottom-start","bottom-end","bottom-center"],Zb=Gb[0];class Qb extends(ye({componentName:Ub,baseSelector:"descope-anchored"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <descope-anchored>\n <slot></slot>\n <div slot="anchored" class="attachment-container">\n <slot name="attachment"></slot>\n </div>\n </descope-anchored>\n ',this.defaultSlot=this.shadowRoot.querySelector("slot:not([name])"),this.attachmentSlot=this.shadowRoot.querySelector('slot[name="attachment"]'),this.anchored=this.shadowRoot.querySelector("descope-anchored")}get#mi(){return this.attachmentSlot?.assignedElements()[0]}static get observedAttributes(){return[...super.observedAttributes||[],"position"]}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),"position"===e&&t!==o&&this.#bi()}init(){super.init?.(),this.#so(),V("\n :host {\n display: inline-block;\n }\n :host(.hidden) {\n display: none;\n }\n .attachment-container {\n position: absolute;\n z-index: 1;\n pointer-events: none;\n width: 100%;\n display: flex;\n align-items: center;\n container-type: inline-size;\n }\n",this),this.#bi();const e=this.shadowRoot.querySelector(".attachment-container");M(e,()=>this.#yi(),{includeAttrs:["st-host-direction"]}),this.attachmentSlot.addEventListener("slotchange",()=>this.#yi()),this.defaultSlot.addEventListener("slotchange",()=>{this.#fi(),window.requestAnimationFrame(()=>this.#vi())}),window.requestAnimationFrame(()=>this.#fi())}#so(){const e=this.anchored?.classList?.contains("hidden");this.classList.toggle("hidden",e)}#vi(){const e=this.defaultSlot?.assignedElements()?.[0],t=e?.getBoundingClientRect();if(t){const e=t.width;this.#mi?.setAttribute("data-attachment-size",Number(e))}}#fi(){const e=this.defaultSlot?.assignedElements()?.length>0;this.classList.toggle("hidden",!e)}#yi(){const e=this.shadowRoot.querySelector(".attachment-container")?.getAttribute("st-host-direction");e&&this.#mi?.setAttribute("st-host-direction",e)}get offsetX(){return this.getAttribute("offset-x")||"0px"}get offsetY(){return this.getAttribute("offset-y")||"0px"}#bi(){const e=this.getAttribute("position");Gb.includes(e)||this.setAttribute("position",Zb)}}const Jb={selector:()=>".attachment-container"},Kb=I(ce({mappings:{transform:{...Jb},justifyContent:{...Jb},maxWidth:{...Jb},top:{...Jb},bottom:{...Jb},left:{...Jb},right:{...Jb},offsetX:{},offsetY:{}}}),pe,he)(Qb),Xb=Kb.cssVarList,ey=`calc(8px + var(${Xb.offsetX}))`,ty={[Xb.maxWidth]:"calc(100% - 2 * 8px)",position:{"top-start":{[Xb.transform]:"translateY(-50%)",[Xb.justifyContent]:"start",[Xb.left]:ey,[Xb.top]:oe(Xb.offsetY)},"top-center":{[Xb.transform]:"translate(-50%, -50%)",[Xb.justifyContent]:"center",[Xb.top]:oe(Xb.offsetY),[Xb.left]:"50%"},"top-end":{[Xb.transform]:"translateY(-50%)",[Xb.justifyContent]:"end",[Xb.right]:ey,[Xb.top]:oe(Xb.offsetY)},"bottom-start":{[Xb.transform]:"translateY(50%)",[Xb.justifyContent]:"start",[Xb.left]:ey,[Xb.bottom]:oe(Xb.offsetY)},"bottom-center":{[Xb.bottom]:oe(Xb.offsetY),[Xb.transform]:"translate(-50%, 50%)",[Xb.justifyContent]:"center",[Xb.left]:"50%"},"bottom-end":{[Xb.transform]:"translateY(50%)",[Xb.justifyContent]:"end",[Xb.right]:ey,[Xb.bottom]:oe(Xb.offsetY)}}};var oy=Object.freeze({__proto__:null,default:ty});const iy=Je("input-wrapper"),ry=Mt(Zp),[ny,sy,ay]=Dt({labelTextColor:ry.colors.surface.dark,labelFontSize:"14px",labelFontWeight:"500",inputValueFontWeight:"400",inputPlaceholderFontWeight:"400",helperTextFontWeight:"400",errorMessageFontWeight:"400",valueTextColor:ry.colors.surface.contrast,placeholderTextColor:ry.colors.surface.dark,requiredIndicator:"'*'",helperTextColor:ry.colors.surface.dark,errorMessageTextColor:ry.colors.error.main,successMessageTextColor:ry.colors.success.main,borderWidth:ry.border.xs,borderRadius:ry.radius.xs,borderColor:"transparent",outlineWidth:ry.border.sm,outlineStyle:"solid",outlineColor:"transparent",outlineOffset:"0px",minWidth:"10em",toggleButtonSize:"1.5em",inputIconSize:"1em",inputHeight:"3em",horizontalPadding:"0.5em",verticalPadding:"0.5em",textAlign:"start",backgroundColor:ry.colors.surface.main,fontFamily:ry.fonts.font1.family,direction:ry.direction,overlayOpacity:"0.3",errorMessageIcon:"",errorMessageIconSize:"0",errorMessageIconPadding:"0",errorMessageIconPosition:"0 0.4em",errorMessageFontSize:"0.8125rem",errorMessageIconRepeat:"no-repeat",size:{xs:{fontSize:"12px",chipFontSize:"10px"},sm:{fontSize:"14px",chipFontSize:"12px"},md:{fontSize:"16px",chipFontSize:"14px"},lg:{fontSize:"18px",chipFontSize:"16px"}},labelType:{static:{valueInputHeight:"3em",valueInputMarginBottom:"auto"},floating:{labelPosition:"absolute",labelTopPosition:"0",labelHorizontalPosition:"0.9em",labelFontSize:"1em",placeholderOpacity:0,inputHeight:"3.5em",inputVerticalAlignment:"flex-end",inputTransformY:"translateY(1.55em)",inputTransition:"all 75ms ease-in-out",marginInlineStart:"0",valueInputHeight:"1.5702em",valueInputMarginBottom:"0.5em",_focused:{labelFontSize:"0.75em",inputTransformY:"translateY(1.05em)",labelFontWeight:"400",placeholderOpacity:1},_readOnly:{placeholderOpacity:0},_hasValue:{inputTransformY:"translateY(1.05em)",labelFontSize:"0.75em",labelFontWeight:"400"}}},_fullWidth:{width:"100%"},_bordered:{outlineWidth:ry.border.xs,borderColor:ry.colors.surface.light,borderStyle:"solid",_invalid:{borderColor:ry.colors.error.main}},_focused:{outlineColor:ry.colors.surface.light,_invalid:{outlineColor:ry.colors.error.main}},_disabled:{labelTextColor:ry.colors.surface.light,borderColor:ry.colors.surface.light,valueTextColor:ry.colors.surface.light,placeholderTextColor:ry.colors.surface.light,helperTextColor:ry.colors.surface.light,backgroundColor:ry.colors.surface.main},_obfuscated:{inputTextSecurity:"disc"}},iy);var ly=Object.freeze({__proto__:null,default:ny,refs:sy,vars:ay});const dy=Mt(Zp),cy=Zr.cssVarList,py={[cy.hostWidth]:sy.width,[cy.hostMinWidth]:sy.minWidth,[cy.hostDirection]:sy.direction,[cy.fontSize]:sy.fontSize,[cy.fontFamily]:sy.fontFamily,[cy.labelFontSize]:sy.labelFontSize,[cy.labelFontWeight]:sy.labelFontWeight,[cy.inputValueFontWeight]:sy.inputValueFontWeight,[cy.inputPlaceholderFontWeight]:sy.inputPlaceholderFontWeight,[cy.helperTextFontWeight]:sy.helperTextFontWeight,[cy.errorMessageFontWeight]:sy.errorMessageFontWeight,[cy.labelTextColor]:sy.labelTextColor,[cy.labelRequiredIndicator]:sy.requiredIndicator,[cy.errorMessageTextColor]:sy.errorMessageTextColor,[cy.inputValueTextColor]:sy.valueTextColor,[cy.inputPlaceholderColor]:sy.placeholderTextColor,[cy.inputBorderWidth]:sy.borderWidth,[cy.inputBorderStyle]:sy.borderStyle,[cy.inputBorderColor]:sy.borderColor,[cy.inputBorderRadius]:sy.borderRadius,[cy.inputOutlineWidth]:sy.outlineWidth,[cy.inputOutlineStyle]:sy.outlineStyle,[cy.inputOutlineColor]:sy.outlineColor,[cy.inputOutlineOffset]:sy.outlineOffset,[cy.inputBackgroundColor]:sy.backgroundColor,[cy.inputHeight]:sy.inputHeight,[cy.inputHorizontalPadding]:sy.horizontalPadding,[cy.helperTextColor]:sy.helperTextColor,[cy.textAlign]:sy.textAlign,textAlign:{right:{[cy.inputTextAlign]:"right"},left:{[cy.inputTextAlign]:"left"},center:{[cy.inputTextAlign]:"center"}},[cy.labelPosition]:sy.labelPosition,[cy.labelTopPosition]:sy.labelTopPosition,[cy.labelHorizontalPosition]:sy.labelHorizontalPosition,[cy.inputTransformY]:sy.inputTransformY,[cy.inputTransition]:sy.inputTransition,[cy.marginInlineStart]:sy.marginInlineStart,[cy.placeholderOpacity]:sy.placeholderOpacity,[cy.inputVerticalAlignment]:sy.inputVerticalAlignment,[cy.valueInputHeight]:sy.valueInputHeight,[cy.valueInputMarginBottom]:sy.valueInputMarginBottom,[cy.inputIconOffset]:dy.spacing.md,[cy.inputIconSize]:sy.inputIconSize,[cy.inputIconColor]:sy.placeholderTextColor,[cy.errorMessageIcon]:sy.errorMessageIcon,[cy.errorMessageIconSize]:sy.errorMessageIconSize,[cy.errorMessageIconPadding]:sy.errorMessageIconPadding,[cy.errorMessageIconRepeat]:sy.errorMessageIconRepeat,[cy.errorMessageIconPosition]:sy.errorMessageIconPosition,[cy.errorMessageFontSize]:sy.errorMessageFontSize,[cy.inputTextSecurity]:sy.inputTextSecurity};var hy=Object.freeze({__proto__:null,default:py,textField:py,vars:cy});const uy=Mt(Zp),gy=ds.cssVarList,my={[gy.hostWidth]:sy.width,[gy.hostMinWidth]:sy.minWidth,[gy.hostDirection]:sy.direction,[gy.fontSize]:sy.fontSize,[gy.fontFamily]:sy.fontFamily,[gy.labelFontSize]:sy.labelFontSize,[gy.labelFontWeight]:sy.labelFontWeight,[gy.inputValueFontWeight]:sy.inputValueFontWeight,[gy.inputPlaceholderFontWeight]:sy.inputPlaceholderFontWeight,[gy.helperTextFontWeight]:sy.helperTextFontWeight,[gy.errorMessageFontWeight]:sy.errorMessageFontWeight,[gy.labelTextColor]:sy.labelTextColor,[gy.errorMessageTextColor]:sy.errorMessageTextColor,[gy.inputHorizontalPadding]:sy.horizontalPadding,[gy.inputHeight]:sy.inputHeight,[gy.inputBackgroundColor]:sy.backgroundColor,[gy.labelRequiredIndicator]:sy.requiredIndicator,[gy.inputValueTextColor]:sy.valueTextColor,[gy.inputPlaceholderTextColor]:sy.placeholderTextColor,[gy.inputBorderWidth]:sy.borderWidth,[gy.inputBorderStyle]:sy.borderStyle,[gy.inputBorderColor]:sy.borderColor,[gy.inputBorderRadius]:sy.borderRadius,[gy.inputOutlineWidth]:sy.outlineWidth,[gy.inputOutlineStyle]:sy.outlineStyle,[gy.inputOutlineColor]:sy.outlineColor,[gy.inputOutlineOffset]:sy.outlineOffset,[gy.revealButtonOffset]:uy.spacing.md,[gy.revealButtonSize]:sy.toggleButtonSize,[gy.revealButtonColor]:sy.placeholderTextColor,[gy.labelPosition]:sy.labelPosition,[gy.labelTopPosition]:sy.labelTopPosition,[gy.labelHorizontalPosition]:sy.labelHorizontalPosition,[gy.inputTransformY]:sy.inputTransformY,[gy.inputTransition]:sy.inputTransition,[gy.marginInlineStart]:sy.marginInlineStart,[gy.placeholderOpacity]:sy.placeholderOpacity,[gy.inputVerticalAlignment]:sy.inputVerticalAlignment,[gy.valueInputHeight]:sy.valueInputHeight,[gy.errorMessageIcon]:sy.errorMessageIcon,[gy.errorMessageIconSize]:sy.errorMessageIconSize,[gy.errorMessageIconPadding]:sy.errorMessageIconPadding,[gy.errorMessageIconRepeat]:sy.errorMessageIconRepeat,[gy.errorMessageIconPosition]:sy.errorMessageIconPosition,[gy.errorMessageFontSize]:sy.errorMessageFontSize};var by=Object.freeze({__proto__:null,default:my,vars:gy});const yy=kn.cssVarList,fy={[yy.hostWidth]:sy.width,[yy.hostMinWidth]:sy.minWidth,[yy.hostDirection]:sy.direction,[yy.fontSize]:sy.fontSize,[yy.fontFamily]:sy.fontFamily,[yy.labelFontSize]:sy.labelFontSize,[yy.labelFontWeight]:sy.labelFontWeight,[yy.inputValueFontWeight]:sy.inputValueFontWeight,[yy.inputPlaceholderFontWeight]:sy.inputPlaceholderFontWeight,[yy.helperTextFontWeight]:sy.helperTextFontWeight,[yy.errorMessageFontWeight]:sy.errorMessageFontWeight,[yy.labelTextColor]:sy.labelTextColor,[yy.errorMessageTextColor]:sy.errorMessageTextColor,[yy.inputValueTextColor]:sy.valueTextColor,[yy.inputPlaceholderColor]:sy.placeholderTextColor,[yy.inputBorderWidth]:sy.borderWidth,[yy.inputBorderStyle]:sy.borderStyle,[yy.inputBorderColor]:sy.borderColor,[yy.inputBorderRadius]:sy.borderRadius,[yy.inputOutlineWidth]:sy.outlineWidth,[yy.inputOutlineStyle]:sy.outlineStyle,[yy.inputOutlineColor]:sy.outlineColor,[yy.inputOutlineOffset]:sy.outlineOffset,[yy.inputBackgroundColor]:sy.backgroundColor,[yy.labelRequiredIndicator]:sy.requiredIndicator,[yy.inputHorizontalPadding]:sy.horizontalPadding,[yy.inputHeight]:sy.inputHeight,[yy.labelPosition]:sy.labelPosition,[yy.labelTopPosition]:sy.labelTopPosition,[yy.labelHorizontalPosition]:sy.labelHorizontalPosition,[yy.inputTransformY]:sy.inputTransformY,[yy.inputTransition]:sy.inputTransition,[yy.marginInlineStart]:sy.marginInlineStart,[yy.placeholderOpacity]:sy.placeholderOpacity,[yy.inputVerticalAlignment]:sy.inputVerticalAlignment,[yy.valueInputHeight]:sy.valueInputHeight,[yy.valueInputMarginBottom]:sy.valueInputMarginBottom,[yy.errorMessageIcon]:sy.errorMessageIcon,[yy.errorMessageIconSize]:sy.errorMessageIconSize,[yy.errorMessageIconPadding]:sy.errorMessageIconPadding,[yy.errorMessageIconRepeat]:sy.errorMessageIconRepeat,[yy.errorMessageIconPosition]:sy.errorMessageIconPosition,[yy.errorMessageFontSize]:sy.errorMessageFontSize};var vy=Object.freeze({__proto__:null,default:fy,vars:yy});const xy=xn.cssVarList,Cy={[xy.hostWidth]:sy.width,[xy.hostMinWidth]:sy.minWidth,[xy.hostDirection]:sy.direction,[xy.fontSize]:sy.fontSize,[xy.fontFamily]:sy.fontFamily,[xy.labelFontSize]:sy.labelFontSize,[xy.labelFontWeight]:sy.labelFontWeight,[xy.inputValueFontWeight]:sy.inputValueFontWeight,[xy.inputPlaceholderFontWeight]:sy.inputPlaceholderFontWeight,[xy.helperTextFontWeight]:sy.helperTextFontWeight,[xy.errorMessageFontWeight]:sy.errorMessageFontWeight,[xy.labelTextColor]:sy.labelTextColor,[xy.errorMessageTextColor]:sy.errorMessageTextColor,[xy.inputValueTextColor]:sy.valueTextColor,[xy.labelRequiredIndicator]:sy.requiredIndicator,[xy.inputPlaceholderColor]:sy.placeholderTextColor,[xy.inputBorderWidth]:sy.borderWidth,[xy.inputBorderStyle]:sy.borderStyle,[xy.inputBorderColor]:sy.borderColor,[xy.inputBorderRadius]:sy.borderRadius,[xy.inputOutlineWidth]:sy.outlineWidth,[xy.inputOutlineStyle]:sy.outlineStyle,[xy.inputOutlineColor]:sy.outlineColor,[xy.inputOutlineOffset]:sy.outlineOffset,[xy.inputBackgroundColor]:sy.backgroundColor,[xy.inputHorizontalPadding]:sy.horizontalPadding,[xy.inputHeight]:sy.inputHeight,[xy.labelPosition]:sy.labelPosition,[xy.labelTopPosition]:sy.labelTopPosition,[xy.labelHorizontalPosition]:sy.labelHorizontalPosition,[xy.inputTransformY]:sy.inputTransformY,[xy.inputTransition]:sy.inputTransition,[xy.marginInlineStart]:sy.marginInlineStart,[xy.placeholderOpacity]:sy.placeholderOpacity,[xy.inputVerticalAlignment]:sy.inputVerticalAlignment,[xy.valueInputHeight]:sy.valueInputHeight,[xy.valueInputMarginBottom]:sy.valueInputMarginBottom,[xy.errorMessageIcon]:sy.errorMessageIcon,[xy.errorMessageIconSize]:sy.errorMessageIconSize,[xy.errorMessageIconPadding]:sy.errorMessageIconPadding,[xy.errorMessageIconRepeat]:sy.errorMessageIconRepeat,[xy.errorMessageIconPosition]:sy.errorMessageIconPosition,[xy.errorMessageFontSize]:sy.errorMessageFontSize};var wy=Object.freeze({__proto__:null,default:Cy,vars:xy});const Iy=vs.cssVarList,Sy={[Iy.hostWidth]:sy.width,[Iy.hostMinWidth]:sy.minWidth,[Iy.hostDirection]:sy.direction,[Iy.fontSize]:sy.fontSize,[Iy.fontFamily]:sy.fontFamily,[Iy.labelFontSize]:sy.labelFontSize,[Iy.labelFontWeight]:sy.labelFontWeight,[Iy.inputValueFontWeight]:sy.inputValueFontWeight,[Iy.inputPlaceholderFontWeight]:sy.inputPlaceholderFontWeight,[Iy.helperTextFontWeight]:sy.helperTextFontWeight,[Iy.errorMessageFontWeight]:sy.errorMessageFontWeight,[Iy.labelTextColor]:sy.labelTextColor,[Iy.labelRequiredIndicator]:sy.requiredIndicator,[Iy.errorMessageTextColor]:sy.errorMessageTextColor,[Iy.inputBackgroundColor]:sy.backgroundColor,[Iy.inputValueTextColor]:sy.valueTextColor,[Iy.inputPlaceholderTextColor]:sy.placeholderTextColor,[Iy.inputBorderRadius]:sy.borderRadius,[Iy.inputBorderWidth]:sy.borderWidth,[Iy.inputBorderStyle]:sy.borderStyle,[Iy.inputBorderColor]:sy.borderColor,[Iy.inputOutlineWidth]:sy.outlineWidth,[Iy.inputOutlineStyle]:sy.outlineStyle,[Iy.inputOutlineColor]:sy.outlineColor,[Iy.inputOutlineOffset]:sy.outlineOffset,[Iy.inputResizeType]:"vertical",[Iy.inputMinHeight]:"5em",[Iy.errorMessageIcon]:sy.errorMessageIcon,[Iy.errorMessageIconSize]:sy.errorMessageIconSize,[Iy.errorMessageIconPadding]:sy.errorMessageIconPadding,[Iy.errorMessageIconRepeat]:sy.errorMessageIconRepeat,[Iy.errorMessageIconPosition]:sy.errorMessageIconPosition,[Iy.errorMessageFontSize]:sy.errorMessageFontSize,textAlign:{right:{[Iy.inputTextAlign]:"right"},left:{[Iy.inputTextAlign]:"left"},center:{[Iy.inputTextAlign]:"center"}},_readonly:{[Iy.inputResizeType]:"none"}};var My=Object.freeze({__proto__:null,default:Sy,vars:Iy});const Ay=Mo.cssVarList,Ey="1.35em",Ty={[Ay.hostWidth]:sy.width,[Ay.hostDirection]:sy.direction,[Ay.fontSize]:sy.fontSize,[Ay.fontFamily]:sy.fontFamily,[Ay.labelTextColor]:sy.labelTextColor,[Ay.labelRequiredIndicator]:sy.requiredIndicator,[Ay.labelFontWeight]:"400",[Ay.labelLineHeight]:Ey,[Ay.labelSpacing]:"1em",[Ay.errorMessageTextColor]:sy.errorMessageTextColor,[Ay.inputOutlineWidth]:sy.outlineWidth,[Ay.inputOutlineOffset]:sy.outlineOffset,[Ay.inputOutlineColor]:sy.outlineColor,[Ay.inputOutlineStyle]:sy.outlineStyle,[Ay.inputBorderRadius]:sy.borderRadius,[Ay.inputBorderColor]:sy.borderColor,[Ay.inputBorderWidth]:sy.borderWidth,[Ay.inputBorderStyle]:sy.borderStyle,[Ay.inputBackgroundColor]:sy.backgroundColor,[Ay.inputSize]:Ey,[Ay.inputValueTextColor]:sy.valueTextColor,[Ay.errorMessageIcon]:sy.errorMessageIcon,[Ay.errorMessageIconSize]:sy.errorMessageIconSize,[Ay.errorMessageIconPadding]:sy.errorMessageIconPadding,[Ay.errorMessageIconRepeat]:sy.errorMessageIconRepeat,[Ay.errorMessageIconPosition]:sy.errorMessageIconPosition,[Ay.errorMessageFontSize]:sy.errorMessageFontSize};var ky=Object.freeze({__proto__:null,default:Ty,vars:Ay});const zy="2px",Ly=Mt(Zp),Vy=Zo.cssVarList,Ny={[Vy.hostWidth]:sy.width,[Vy.hostDirection]:sy.direction,[Vy.fontSize]:sy.fontSize,[Vy.fontFamily]:sy.fontFamily,[Vy.inputOutlineWidth]:sy.outlineWidth,[Vy.inputOutlineOffset]:sy.outlineOffset,[Vy.inputOutlineColor]:sy.outlineColor,[Vy.inputOutlineStyle]:sy.outlineStyle,[Vy.trackBorderStyle]:sy.borderStyle,[Vy.trackBorderWidth]:sy.borderWidth,[Vy.trackBorderColor]:sy.borderColor,[Vy.trackBackgroundColor]:sy.backgroundColor,[Vy.trackBorderRadius]:Ly.radius.md,[Vy.trackWidth]:"2.5em",[Vy.trackHeight]:"1.25em",[Vy.knobSize]:`calc(1em - ${zy})`,[Vy.knobRadius]:"50%",[Vy.knobTopOffset]:"1px",[Vy.knobLeftOffset]:zy,[Vy.knobColor]:sy.labelTextColor,[Vy.knobTransitionDuration]:"0.3s",[Vy.labelTextColor]:sy.labelTextColor,[Vy.labelFontWeight]:"400",[Vy.labelLineHeight]:"1.35em",[Vy.labelSpacing]:"1em",[Vy.labelRequiredIndicator]:sy.requiredIndicator,[Vy.errorMessageTextColor]:sy.errorMessageTextColor,[Vy.errorMessageIcon]:sy.errorMessageIcon,[Vy.errorMessageIconSize]:sy.errorMessageIconSize,[Vy.errorMessageIconPadding]:sy.errorMessageIconPadding,[Vy.errorMessageIconRepeat]:sy.errorMessageIconRepeat,[Vy.errorMessageIconPosition]:sy.errorMessageIconPosition,[Vy.errorMessageFontSize]:sy.errorMessageFontSize,_checked:{[Vy.trackBorderColor]:sy.borderColor,[Vy.knobLeftOffset]:`calc(100% - var(${Vy.knobSize}) - ${zy})`,[Vy.knobColor]:sy.valueTextColor,[Vy.knobTextColor]:sy.valueTextColor},_disabled:{[Vy.knobColor]:Ly.colors.surface.light,[Vy.trackBorderColor]:Ly.colors.surface.light,[Vy.trackBackgroundColor]:Ly.colors.surface.main,[Vy.labelTextColor]:sy.labelTextColor,_checked:{[Vy.knobColor]:Ly.colors.surface.light,[Vy.trackBackgroundColor]:Ly.colors.surface.main}},_invalid:{[Vy.trackBorderColor]:Ly.colors.error.main,[Vy.knobColor]:Ly.colors.error.main}};var Dy=Object.freeze({__proto__:null,default:Ny,vars:Vy});const Py=Mt(Zp),By=si.cssVarList,[Fy,Ry,Wy]=Dt({verticalAlignment:{start:{verticalAlignment:"start"},center:{verticalAlignment:"safe center"},end:{verticalAlignment:"end"}},horizontalAlignment:{start:{horizontalAlignment:"start"},center:{horizontalAlignment:"safe center"},end:{horizontalAlignment:"end"}},shadowColor:"#00000020"},ri),{shadowColor:Oy}=Ry,jy={...Fy,[By.itemsGrow]:"0",[By.hostWidth]:"100%",[By.hostHeight]:"auto",[By.boxShadow]:"none",[By.backgroundColor]:Py.colors.surface.main,[By.backgroundImage]:"",[By.backgroundPositionX]:"center",[By.backgroundPositionY]:"center",[By.backgroundSize]:"cover",[By.backgroundRepeat]:"no-repeat",[By.color]:Py.colors.surface.contrast,[By.borderRadius]:"0px",[By.hostDirection]:Py.direction,[By.borderStyle]:"none",[By.borderWidth]:"unset",[By.borderColor]:"unset",verticalPadding:{sm:{[By.verticalPadding]:"5px"},md:{[By.verticalPadding]:"10px"},lg:{[By.verticalPadding]:"20px"}},horizontalPadding:{sm:{[By.horizontalPadding]:"5px"},md:{[By.horizontalPadding]:"10px"},lg:{[By.horizontalPadding]:"20px"}},direction:{row:{[By.flexDirection]:"row",[By.alignItems]:Ry.verticalAlignment,[By.justifyContent]:Ry.horizontalAlignment,[By.flexWrap]:"wrap",horizontalAlignment:{spaceBetween:{[Wy.horizontalAlignment]:"space-between"}}},column:{[By.flexDirection]:"column",[By.alignItems]:Ry.horizontalAlignment,[By.justifyContent]:Ry.verticalAlignment,verticalAlignment:{spaceBetween:{[Wy.verticalAlignment]:"space-between"}}}},spaceBetween:{sm:{[By.gap]:"10px"},md:{[By.gap]:"20px"},lg:{[By.gap]:"30px"}},shadow:{sm:{[By.boxShadow]:`${Py.shadow.wide.sm} ${Oy}, ${Py.shadow.narrow.sm} ${Oy}`},md:{[By.boxShadow]:`${Py.shadow.wide.md} ${Oy}, ${Py.shadow.narrow.md} ${Oy}`},lg:{[By.boxShadow]:`${Py.shadow.wide.lg} ${Oy}, ${Py.shadow.narrow.lg} ${Oy}`},xl:{[By.boxShadow]:`${Py.shadow.wide.xl} ${Oy}, ${Py.shadow.narrow.xl} ${Oy}`},"2xl":{[Wy.shadowColor]:"#00000050",[By.boxShadow]:`${Py.shadow.wide["2xl"]} ${Oy}`}},"&borderRadius":{sm:{[By.borderRadius]:Py.radius.sm},md:{[By.borderRadius]:Py.radius.md},lg:{[By.borderRadius]:Py.radius.lg},xl:{[By.borderRadius]:Py.radius.xl},"2xl":{[By.borderRadius]:Py.radius["2xl"]},"3xl":{[By.borderRadius]:Py.radius["3xl"]}}},$y={...By,...Wy};var _y=Object.freeze({__proto__:null,default:jy,vars:$y});const Hy=In.cssVarList,qy={[Hy.fallbackUrl]:"url(https://imgs.descope.com/components/no-logo-placeholder.svg)"};var Yy=Object.freeze({__proto__:null,default:qy,vars:Hy});const Uy=Mn.cssVarList,Gy={[Uy.fallbackUrl]:"url(https://imgs.descope.com/components/totp-placeholder.svg)"};var Zy=Object.freeze({__proto__:null,default:Gy,vars:Uy});const Qy=En.cssVarList,Jy={[Qy.fallbackUrl]:"url(https://imgs.descope.com/components/notp-placeholder.svg)"};var Ky=Object.freeze({__proto__:null,default:Jy,vars:Qy});const Xy=Mt(Zp),ef=fn.cssVarList,[tf,of,rf]=Dt({thickness:"2px",spacing:"10px"},pn),nf={...tf,[ef.hostDirection]:Xy.direction,[ef.alignItems]:"center",[ef.flexDirection]:"row",[ef.alignSelf]:"stretch",[ef.hostWidth]:"100%",[ef.stripeColor]:Xy.colors.surface.light,[ef.stripeColorOpacity]:"0.5",[ef.stripeHorizontalThickness]:of.thickness,[ef.labelTextWidth]:"fit-content",[ef.labelTextMaxWidth]:"calc(100% - 100px)",[ef.labelTextHorizontalSpacing]:of.spacing,[ef.textAlign]:"center",_vertical:{[ef.minHeight]:"200px",[ef.flexDirection]:"column",[ef.hostWidth]:"fit-content",[ef.hostPadding]:`0 calc(${of.thickness} * 3)`,[ef.stripeVerticalThickness]:of.thickness,[ef.labelTextWidth]:"fit-content",[ef.labelTextMaxWidth]:"100%",[ef.labelTextVerticalSpacing]:of.spacing}},sf={...ef,...rf};var af=Object.freeze({__proto__:null,default:nf,vars:sf});const lf=Jn.cssVarList,df={[lf.hostDirection]:sy.direction,[lf.fontFamily]:sy.fontFamily,[lf.fontSize]:sy.fontSize,[lf.labelTextColor]:sy.labelTextColor,[lf.labelRequiredIndicator]:sy.requiredIndicator,[lf.labelFontWeight]:sy.labelFontWeight,[lf.errorMessageTextColor]:sy.errorMessageTextColor,[lf.errorMessageFontWeight]:sy.errorMessageFontWeight,[lf.digitValueTextColor]:sy.valueTextColor,[lf.digitValueFontWeight]:sy.inputValueFontWeight,[lf.digitPadding]:"0",[lf.digitTextAlign]:"center",[lf.digitSpacing]:"4px",[lf.hostWidth]:sy.width,[lf.digitOutlineColor]:"transparent",[lf.digitOutlineWidth]:sy.outlineWidth,[lf.focusedDigitFieldOutlineColor]:sy.outlineColor,[lf.digitSize]:sy.inputHeight,[lf.errorMessageIcon]:sy.errorMessageIcon,[lf.errorMessageIconSize]:sy.errorMessageIconSize,[lf.errorMessageIconPadding]:sy.errorMessageIconPadding,[lf.errorMessageIconRepeat]:sy.errorMessageIconRepeat,[lf.errorMessageIconPosition]:sy.errorMessageIconPosition,[lf.errorMessageFontSize]:sy.errorMessageFontSize,size:{xs:{[lf.spinnerSize]:"15px"},sm:{[lf.spinnerSize]:"20px"},md:{[lf.spinnerSize]:"20px"},lg:{[lf.spinnerSize]:"20px"}},_hideCursor:{[lf.digitCaretTextColor]:"transparent"},_loading:{[lf.overlayOpacity]:sy.overlayOpacity}};var cf=Object.freeze({__proto__:null,default:df,vars:lf});const pf=Mt(Zp),hf=ei.cssVarList,uf={[hf.hostDisplay]:"inline-block",[hf.hostWidth]:"100%",[hf.barColor]:pf.colors.surface.contrast,[hf.barWidth]:"20%",[hf.barBackgroundColor]:pf.colors.surface.light,[hf.barBorderRadius]:"4px",[hf.animationDuration]:"2s",[hf.animationTimingFunction]:"linear",[hf.animationIterationCount]:"infinite",[hf.verticalPadding]:"0.25em",size:{xs:{[hf.barHeight]:"2px"},sm:{[hf.barHeight]:"4px"},md:{[hf.barHeight]:"6px"},lg:{[hf.barHeight]:"8px"}},mode:{primary:{[hf.barColor]:pf.colors.primary.main},secondary:{[hf.barColor]:pf.colors.secondary.main}},_hidden:{[hf.hostDisplay]:"none"}};var gf=Object.freeze({__proto__:null,default:uf,vars:hf});const mf=Mt(Zp),bf=ii.cssVarList,[yf,ff,vf]=Dt({spinnerColor:mf.colors.surface.contrast,mode:{primary:{spinnerColor:mf.colors.primary.main},secondary:{spinnerColor:mf.colors.secondary.main}}},ti),xf={...yf,[bf.animationDuration]:"2s",[bf.animationTimingFunction]:"linear",[bf.animationIterationCount]:"infinite",[bf.spinnerBorderStyle]:"solid",[bf.spinnerBorderWidth]:"0.2em",[bf.spinnerBorderRadius]:"50%",[bf.spinnerQuadrant1Color]:ff.spinnerColor,[bf.spinnerQuadrant2Color]:"transparent",[bf.spinnerQuadrant3Color]:ff.spinnerColor,[bf.spinnerQuadrant4Color]:"transparent",size:{xs:{[bf.spinnerSize]:"20px"},sm:{[bf.spinnerSize]:"30px"},md:{[bf.spinnerSize]:"40px"},lg:{[bf.spinnerSize]:"60px"},xl:{[bf.spinnerSize]:"80px"}},_hidden:{[bf.hostDisplay]:"none"}},Cf={...bf,...vf};var wf=Object.freeze({__proto__:null,default:xf,vars:Cf});const If=_s.cssVarList,Sf={[If.hostWidth]:sy.width,[If.hostDirection]:sy.direction,[If.fontSize]:sy.fontSize,[If.fontFamily]:sy.fontFamily,[If.labelFontSize]:sy.labelFontSize,[If.labelFontWeight]:sy.labelFontWeight,[If.inputValueFontWeight]:sy.inputValueFontWeight,[If.inputPlaceholderFontWeight]:sy.inputPlaceholderFontWeight,[If.helperTextFontWeight]:sy.helperTextFontWeight,[If.errorMessageFontWeight]:sy.errorMessageFontWeight,[If.labelTextColor]:sy.labelTextColor,[If.labelRequiredIndicator]:sy.requiredIndicator,[If.errorMessageTextColor]:sy.errorMessageTextColor,[If.inputValueTextColor]:sy.valueTextColor,[If.inputPlaceholderTextColor]:sy.placeholderTextColor,[If.inputBorderStyle]:sy.borderStyle,[If.inputBorderWidth]:sy.borderWidth,[If.inputBorderColor]:sy.borderColor,[If.inputBorderRadius]:sy.borderRadius,[If.inputOutlineStyle]:sy.outlineStyle,[If.inputOutlineWidth]:sy.outlineWidth,[If.inputOutlineColor]:sy.outlineColor,[If.inputOutlineOffset]:sy.outlineOffset,[If.phoneInputWidth]:sy.minWidth,[If.countryCodeInputWidth]:"5em",[If.countryCodeDropdownWidth]:"20em",[If.marginInlineStart]:"-0.25em",[If.valueInputHeight]:sy.valueInputHeight,[If.valueInputMarginBottom]:sy.valueInputMarginBottom,[If.errorMessageIcon]:sy.errorMessageIcon,[If.errorMessageIconSize]:sy.errorMessageIconSize,[If.errorMessageIconPadding]:sy.errorMessageIconPadding,[If.errorMessageIconRepeat]:sy.errorMessageIconRepeat,[If.errorMessageIconPosition]:sy.errorMessageIconPosition,[If.errorMessageFontSize]:sy.errorMessageFontSize};var Mf=Object.freeze({__proto__:null,default:Sf,vars:If});const Af=sa.cssVarList,Ef={[Af.hostWidth]:"16em",[Af.hostMinWidth]:sy.minWidth,[Af.hostDirection]:sy.direction,[Af.fontSize]:sy.fontSize,[Af.fontFamily]:sy.fontFamily,[Af.labelFontSize]:sy.labelFontSize,[Af.labelFontWeight]:sy.labelFontWeight,[Af.inputValueFontWeight]:sy.inputValueFontWeight,[Af.inputPlaceholderFontWeight]:sy.inputPlaceholderFontWeight,[Af.helperTextFontWeight]:sy.helperTextFontWeight,[Af.errorMessageFontWeight]:sy.errorMessageFontWeight,[Af.labelTextColor]:sy.labelTextColor,[Af.labelRequiredIndicator]:sy.requiredIndicator,[Af.errorMessageTextColor]:sy.errorMessageTextColor,[Af.inputValueTextColor]:sy.valueTextColor,[Af.inputPlaceholderTextColor]:sy.placeholderTextColor,[Af.inputBorderStyle]:sy.borderStyle,[Af.inputBorderWidth]:sy.borderWidth,[Af.inputBorderColor]:sy.borderColor,[Af.inputBorderRadius]:sy.borderRadius,[Af.inputOutlineStyle]:sy.outlineStyle,[Af.inputOutlineWidth]:sy.outlineWidth,[Af.inputOutlineColor]:sy.outlineColor,[Af.inputOutlineOffset]:sy.outlineOffset,[Af.labelPosition]:sy.labelPosition,[Af.labelTopPosition]:sy.labelTopPosition,[Af.labelHorizontalPosition]:sy.labelHorizontalPosition,[Af.inputTransformY]:sy.inputTransformY,[Af.inputTransition]:sy.inputTransition,[Af.marginInlineStart]:sy.marginInlineStart,[Af.valueInputHeight]:sy.valueInputHeight,[Af.valueInputMarginBottom]:sy.valueInputMarginBottom,[Af.inputHorizontalPadding]:"0",[Af.errorMessageIcon]:sy.errorMessageIcon,[Af.errorMessageIconSize]:sy.errorMessageIconSize,[Af.errorMessageIconPadding]:sy.errorMessageIconPadding,[Af.errorMessageIconRepeat]:sy.errorMessageIconRepeat,[Af.errorMessageIconPosition]:sy.errorMessageIconPosition,[Af.errorMessageFontSize]:sy.errorMessageFontSize,_fullWidth:{[Af.hostWidth]:sy.width}};var Tf=Object.freeze({__proto__:null,default:Ef,vars:Af});const kf=Mt(Zp),zf=Ta.cssVarList,Lf={[zf.hostWidth]:sy.width,[zf.hostMinWidth]:sy.minWidth,[zf.hostDirection]:sy.direction,[zf.fontSize]:sy.fontSize,[zf.fontFamily]:sy.fontFamily,[zf.labelFontSize]:sy.labelFontSize,[zf.labelFontWeight]:sy.labelFontWeight,[zf.inputValueFontWeight]:sy.inputValueFontWeight,[zf.inputPlaceholderFontWeight]:sy.inputPlaceholderFontWeight,[zf.helperTextFontWeight]:sy.helperTextFontWeight,[zf.errorMessageFontWeight]:sy.errorMessageFontWeight,[zf.labelTextColor]:sy.labelTextColor,[zf.spaceBetweenInputs]:"1em",[zf.errorMessageTextColor]:sy.errorMessageTextColor,[zf.policyPreviewBackgroundColor]:"none",[zf.policyPreviewPadding]:kf.spacing.lg,[zf.valueInputHeight]:sy.valueInputHeight,[zf.errorMessageIcon]:sy.errorMessageIcon,[zf.errorMessageIconSize]:sy.errorMessageIconSize,[zf.errorMessageIconPadding]:sy.errorMessageIconPadding,[zf.errorMessageIconRepeat]:sy.errorMessageIconRepeat,[zf.errorMessageIconPosition]:sy.errorMessageIconPosition,[zf.errorMessageFontSize]:sy.errorMessageFontSize,_required:{[zf.inputsRequiredIndicator]:sy.requiredIndicator}};var Vf=Object.freeze({__proto__:null,default:Lf,vars:zf});const Nf=Ka.cssVarList,Df={[Nf.hostDirection]:sy.direction,[Nf.labelTextColor]:sy.labelTextColor,[Nf.fontFamily]:sy.fontFamily,[Nf.iconSize]:"2em",[Nf.hostPadding]:"0.75em",[Nf.gap]:"0.5em",[Nf.fontSize]:"16px",[Nf.titleFontWeight]:"500",[Nf.lineHeight]:"1em",[Nf.borderWidth]:sy.borderWidth,[Nf.borderColor]:sy.borderColor,[Nf.borderRadius]:sy.borderRadius,[Nf.borderStyle]:"dashed",_required:{[Nf.requiredIndicator]:sy.requiredIndicator},size:{xs:{[Nf.hostHeight]:"196px",[Nf.hostWidth]:"200px",[Nf.titleFontSize]:"0.875em",[Nf.descriptionFontSize]:"0.875em",[Nf.lineHeight]:"1.25em"},sm:{[Nf.hostHeight]:"216px",[Nf.hostWidth]:"230px",[Nf.titleFontSize]:"1em",[Nf.descriptionFontSize]:"0.875em",[Nf.lineHeight]:"1.25em"},md:{[Nf.hostHeight]:"256px",[Nf.hostWidth]:"312px",[Nf.titleFontSize]:"1.125em",[Nf.descriptionFontSize]:"1em",[Nf.lineHeight]:"1.5em"},lg:{[Nf.hostHeight]:"280px",[Nf.hostWidth]:"336px",[Nf.titleFontSize]:"1.125em",[Nf.descriptionFontSize]:"1.125em",[Nf.lineHeight]:"1.75em"}},_fullWidth:{[Nf.hostWidth]:sy.width}};var Pf=Object.freeze({__proto__:null,default:Df,vars:Nf});const Bf=Mt(Zp),Ff=gl.cssVarList,Rf={[Ff.hostDirection]:"inherit",[Ff.backgroundColor]:Bf.colors.surface.main,[Ff.labelTextColor]:Bf.colors.surface.contrast,[Ff.borderColor]:Bf.colors.surface.light,[Ff.borderStyle]:"solid",[Ff.borderRadius]:Bf.radius.sm,[Ff.outlineColor]:"transparent",[Ff.borderWidth]:Bf.border.xs,_hover:{[Ff.backgroundColor]:Bf.colors.surface.highlight},_focused:{[Ff.outlineColor]:Bf.colors.surface.light},_selected:{[Ff.borderColor]:Bf.colors.surface.contrast,[Ff.backgroundColor]:Bf.colors.surface.contrast,[Ff.labelTextColor]:Bf.colors.surface.main}};var Wf=Object.freeze({__proto__:null,default:Rf,vars:Ff});const Of=Mt(Zp),jf=e=>({[e.hostDirection]:sy.direction,[e.fontFamily]:sy.fontFamily,[e.labelTextColor]:sy.labelTextColor,[e.labelRequiredIndicator]:sy.requiredIndicator,[e.itemsSpacing]:Of.spacing.sm,[e.hostWidth]:sy.width,[e.errorMessageTextColor]:sy.errorMessageTextColor,[e.errorMessageIcon]:sy.errorMessageIcon,[e.errorMessageIconSize]:sy.errorMessageIconSize,[e.errorMessageIconPadding]:sy.errorMessageIconPadding,[e.errorMessageIconRepeat]:sy.errorMessageIconRepeat,[e.errorMessageIconPosition]:sy.errorMessageIconPosition,[e.errorMessageFontSize]:sy.errorMessageFontSize}),$f=pl.cssVarList,_f={...jf($f)};var Hf=Object.freeze({__proto__:null,default:_f,vars:$f});const qf=fl.cssVarList,Yf={...jf(qf)};var Uf=Object.freeze({__proto__:null,default:Yf,vars:qf});const Gf=Mt(Zp),Zf=ec.cssVarList,Qf={[Zf.overlayBackgroundColor]:Gf.colors.surface.main,[Zf.overlayShadow]:Gf.shadow.wide["2xl"],[Zf.overlayWidth]:"540px",[Zf.overlayBackdropColor]:"hsla(214, 53%, 23%, 0.16)"},Jf={...Zf};var Kf=Object.freeze({__proto__:null,default:Qf,vars:Jf});const Xf=Mt(Zp),ev=Jd.cssVarList,tv={[ev.hostWidth]:"100%",[ev.hostHeight]:"100%",[ev.hostMinHeight]:"400px",[ev.fontWeight]:"400",[ev.backgroundColor]:Xf.colors.surface.main,[ev.fontSize]:sy.fontSize,[ev.fontFamily]:sy.fontFamily,[ev.sortIndicatorsColor]:Xf.colors.surface.light,[ev.activeSortIndicator]:Xf.colors.surface.dark,[ev.resizeHandleColor]:Xf.colors.surface.light,[ev.borderWidth]:sy.borderWidth,[ev.borderStyle]:sy.borderStyle,[ev.borderRadius]:sy.borderRadius,[ev.borderColor]:"transparent",[ev.headerRowTextColor]:Xf.colors.surface.dark,[ev.separatorColor]:Xf.colors.surface.light,[ev.valueTextColor]:Xf.colors.surface.contrast,[ev.selectedBackgroundColor]:Xf.colors.surface.highlight,[ev.hostDirection]:Xf.direction,[ev.toggleDetailsPanelButtonSize]:"1em",[ev.toggleDetailsPanelButtonOpenedColor]:Xf.colors.surface.contrast,[ev.toggleDetailsPanelButtonClosedColor]:Xf.colors.surface.light,[ev.toggleDetailsPanelButtonCursor]:"pointer",[ev.detailsPanelBackgroundColor]:Xf.colors.surface.highlight,[ev.detailsPanelBorderTopColor]:Xf.colors.surface.light,[ev.detailsPanelLabelsColor]:Xf.colors.surface.dark,[ev.detailsPanelLabelsFontSize]:"0.8em",[ev.detailsPanelItemsGap]:"2em",[ev.detailsPanelPadding]:"12px 0",_bordered:{[ev.borderColor]:sy.borderColor}};var ov=Object.freeze({__proto__:null,default:tv,grid:tv,vars:ev});const iv=Mt(Zp),rv=rc.cssVarList,nv="#00000020",sv={[rv.hostMinWidth]:"415px",[rv.fontFamily]:iv.fonts.font1.family,[rv.fontSize]:iv.typography.body1.size,[rv.backgroundColor]:iv.colors.surface.main,[rv.textColor]:iv.colors.surface.contrast,[rv.boxShadow]:`${iv.shadow.wide.xl} ${nv}, ${iv.shadow.narrow.xl} ${nv}`,[rv.verticalPadding]:"0.625em",[rv.horizontalPadding]:"1.5em",[rv.borderRadius]:iv.radius.xs,_bordered:{[rv.borderWidth]:iv.border.sm,[rv.borderStyle]:"solid",[rv.borderColor]:"transparent"},size:{xs:{[rv.fontSize]:"12px"},sm:{[rv.fontSize]:"14px"},md:{[rv.fontSize]:"16px"},lg:{[rv.fontSize]:"18px"}},mode:{primary:{[rv.backgroundColor]:iv.colors.primary.main,[rv.textColor]:iv.colors.primary.contrast,[rv.borderColor]:iv.colors.primary.light},success:{[rv.backgroundColor]:iv.colors.success.main,[rv.textColor]:iv.colors.success.contrast,[rv.borderColor]:iv.colors.success.light},error:{[rv.backgroundColor]:iv.colors.error.main,[rv.textColor]:iv.colors.error.contrast,[rv.borderColor]:iv.colors.error.light}}};var av=Object.freeze({__proto__:null,default:sv,vars:rv});const lv=Mt(Zp),dv=xc.cssVarList,cv={[dv.hostWidth]:sy.width,[dv.hostDirection]:sy.direction,[dv.fontSize]:sy.fontSize,[dv.fontFamily]:sy.fontFamily,[dv.separatorFontSize]:"14px",[dv.labelsFontSize]:"14px",[dv.labelsLineHeight]:"1",[dv.labelsMarginBottom]:"6px",[dv.labelTextColor]:sy.labelTextColor,[dv.itemMarginBottom]:"1em",[dv.valueLabelMinWidth]:sy.minWidth,[dv.attrLabelMinWidth]:`calc(12em + 2 * ${lv.border.xs})`,[dv.separatorWidth]:"70px",[dv.removeButtonWidth]:"60px"};var pv=Object.freeze({__proto__:null,default:cv,mappingsField:cv,vars:dv});const hv=Mt(Zp),uv=Pc.cssVarList,gv={[uv.labelMinWidth]:"150px",[uv.hostDirection]:hv.direction,[uv.contentMinWidth]:`calc(100% - ${Nt(uv.labelMinWidth)} - ${Nt(uv.itemsGap)})`,[uv.badgeMaxWidth]:"85px",[uv.itemsGap]:"4px",[uv.hostMinWidth]:"310px",[uv.hostWidth]:"530px",[uv.hostMaxWidth]:"100%",[uv.iconColor]:"currentcolor",_fullWidth:{[uv.hostWidth]:"100%"}};var mv=Object.freeze({__proto__:null,default:gv,vars:uv});const bv=Mt(Zp),yv=Hc.cssVarList,fv={[yv.hostDirection]:bv.direction,[yv.itemsGap]:"16px",[yv.hostMinWidth]:"310px",[yv.hostWidth]:"530px",[yv.hostMaxWidth]:"100%",[yv.iconSize]:"24px",[yv.iconColor]:"currentcolor",_fullWidth:{[yv.hostWidth]:"100%"}};var vv=Object.freeze({__proto__:null,default:fv,vars:yv});const xv=Jc.cssVarList,Cv={[xv.hostWidth]:sy.width,[xv.hostDirection]:sy.direction,[xv.groupNameInputMarginBottom]:"1em",[xv.errorMessageIcon]:sy.errorMessageIcon,[xv.errorMessageIconSize]:sy.errorMessageIconSize,[xv.errorMessageIconPadding]:sy.errorMessageIconPadding,[xv.errorMessageIconRepeat]:sy.errorMessageIconRepeat,[xv.errorMessageIconPosition]:sy.errorMessageIconPosition,[xv.errorMessageFontSize]:sy.errorMessageFontSize};var wv=Object.freeze({__proto__:null,default:Cv,samlGroupMappings:Cv,vars:xv});const Iv=Mt(Zp),Sv=fa.cssVarList,Mv={[Sv.fontFamily]:sy.fontFamily,[Sv.fontSize]:sy.labelFontSize,[Sv.textColor]:sy.labelTextColor,[Sv.borderWidth]:sy.borderWidth,[Sv.borderStyle]:sy.borderStyle,[Sv.borderColor]:sy.borderColor,[Sv.borderRadius]:Iv.radius.sm,[Sv.backgroundColor]:"none",[Sv.padding]:"0px",[Sv.labelMargin]:Iv.spacing.sm,[Sv.itemsSpacing]:Iv.spacing.lg,[Sv.itemSymbolDefault]:"'\\2022'",[Sv.itemSymbolSuccess]:"'\\2713'",[Sv.itemSymbolError]:"'\\2A09'",[Sv.itemSymbolSuccessColor]:Iv.colors.success.main,[Sv.itemSymbolErrorColor]:Iv.colors.error.main};var Av=Object.freeze({__proto__:null,default:Mv,vars:Sv});const Ev=Mt(Zp),Tv=Md.cssVarList,kv="#d73a49",zv="#6f42c1",Lv="#005cc5",Vv="#e36209",Nv="#6a737d",Dv="#22863a",Pv="#24292e",Bv="#f0fff4",Fv="#032f62",Rv="#ff7b72",Wv="#d2a8ff",Ov="#79c0ff",jv="#ffa657",$v="#8b949e",_v="#7ee787",Hv="#c9d1d9",qv="#f0fff4",Yv="#a5d6ff",Uv={[Tv.copyButtonSize]:"32px",[Tv.copyButtonBorderRadius]:Ev.radius.xs,[Tv.copyButtonBorderWidth]:Ev.border.xs,[Tv.copyButtonBorderColor]:Ev.colors.surface.light,[Tv.copyButtonBgColor]:Ev.colors.surface.highlight,[Tv.copyButtonHoverBgColor]:Ev.colors.surface.light,[Tv.copyButtonColor]:Ev.colors.surface.contrast,[Tv.rootBgColor]:Ev.colors.surface.main,[Tv.rootTextColor]:Ev.colors.surface.contrast,[Tv.docTagTextColor]:kv,[Tv.keywordTextColor]:kv,[Tv.metaKeywordTextColor]:kv,[Tv.templateTagTextColor]:kv,[Tv.templateVariableTextColor]:kv,[Tv.typeTextColor]:kv,[Tv.variableLanguageTextColor]:kv,[Tv.titleTextColor]:zv,[Tv.titleClassTextColor]:zv,[Tv.titleClassInheritedTextColor]:zv,[Tv.titleFunctionTextColor]:zv,[Tv.attrTextColor]:Lv,[Tv.attributeTextColor]:Lv,[Tv.literalTextColor]:Lv,[Tv.metaTextColor]:Lv,[Tv.numberTextColor]:Lv,[Tv.operatorTextColor]:Lv,[Tv.variableTextColor]:Lv,[Tv.selectorAttrTextColor]:Lv,[Tv.selectorClassTextColor]:Lv,[Tv.selectorIdTextColor]:Lv,[Tv.regexpTextColor]:Fv,[Tv.stringTextColor]:Fv,[Tv.metaStringTextColor]:Fv,[Tv.builtInTextColor]:Vv,[Tv.symbolTextColor]:Vv,[Tv.commentTextColor]:Nv,[Tv.codeTextColor]:Nv,[Tv.formulaTextColor]:Nv,[Tv.nameTextColor]:Dv,[Tv.quoteTextColor]:Dv,[Tv.selectorTagTextColor]:Dv,[Tv.selectorPseudoTextColor]:Dv,[Tv.substTextColor]:Pv,[Tv.sectionTextColor]:Lv,[Tv.bulletTextColor]:"#735c0f",[Tv.emphasisTextColor]:Pv,[Tv.strongTextColor]:Pv,[Tv.additionTextColor]:Dv,[Tv.additionBgColor]:Bv,[Tv.deletionTextColor]:kv,[Tv.deletionBgColor]:Bv},Gv={codeSnippet:{[Tv.rootBgColor]:Ev.colors.surface.main,[Tv.rootTextColor]:Ev.colors.surface.contrast,[Tv.docTagTextColor]:Rv,[Tv.keywordTextColor]:Rv,[Tv.metaKeywordTextColor]:Rv,[Tv.templateTagTextColor]:Rv,[Tv.templateVariableTextColor]:Rv,[Tv.typeTextColor]:Rv,[Tv.variableLanguageTextColor]:Rv,[Tv.titleTextColor]:Wv,[Tv.titleClassTextColor]:Wv,[Tv.titleClassInheritedTextColor]:Wv,[Tv.titleFunctionTextColor]:Wv,[Tv.attrTextColor]:Ov,[Tv.attributeTextColor]:Ov,[Tv.literalTextColor]:Ov,[Tv.metaTextColor]:Ov,[Tv.numberTextColor]:Ov,[Tv.operatorTextColor]:Ov,[Tv.variableTextColor]:Ov,[Tv.selectorAttrTextColor]:Ov,[Tv.selectorClassTextColor]:Ov,[Tv.selectorIdTextColor]:Ov,[Tv.regexpTextColor]:Yv,[Tv.stringTextColor]:Yv,[Tv.metaStringTextColor]:Yv,[Tv.builtInTextColor]:jv,[Tv.symbolTextColor]:jv,[Tv.commentTextColor]:$v,[Tv.codeTextColor]:$v,[Tv.formulaTextColor]:$v,[Tv.nameTextColor]:_v,[Tv.quoteTextColor]:_v,[Tv.selectorTagTextColor]:_v,[Tv.selectorPseudoTextColor]:_v,[Tv.substTextColor]:Hv,[Tv.sectionTextColor]:Ov,[Tv.bulletTextColor]:"#735c0f",[Tv.emphasisTextColor]:Hv,[Tv.strongTextColor]:Hv,[Tv.additionTextColor]:_v,[Tv.additionBgColor]:qv,[Tv.deletionTextColor]:Rv,[Tv.deletionBgColor]:qv}};var Zv=Object.freeze({__proto__:null,codeSnippetDarkThemeOverrides:Gv,default:Uv,vars:Tv});const Qv=tp.cssVarList,Jv=Mt(Zp),Kv={[Qv.buttonsRowGap]:"9px",[Qv.hostWidth]:sy.width,[Qv.hostDirection]:sy.direction,[Qv.fontSize]:sy.fontSize,[Qv.fontFamily]:sy.fontFamily,[Qv.labelTextColor]:sy.labelTextColor,[Qv.labelRequiredIndicator]:sy.requiredIndicator,[Qv.errorMessageTextColor]:sy.errorMessageTextColor,[Qv.errorMessageIcon]:sy.errorMessageIcon,[Qv.errorMessageIconSize]:sy.errorMessageIconSize,[Qv.errorMessageIconPadding]:sy.errorMessageIconPadding,[Qv.errorMessageIconRepeat]:sy.errorMessageIconRepeat,[Qv.errorMessageIconPosition]:sy.errorMessageIconPosition,[Qv.errorMessageFontSize]:sy.errorMessageFontSize,[Qv.helperTextColor]:sy.helperTextColor,[Qv.itemsLabelColor]:Jv.colors.surface.contrast,textAlign:{right:{[Qv.inputTextAlign]:"right"},left:{[Qv.inputTextAlign]:"left"},center:{[Qv.inputTextAlign]:"center"}},_fullWidth:{[Qv.buttonsSpacing]:"space-between"},_disabled:{[Qv.itemsLabelColor]:Jv.colors.surface.light}};var Xv=Object.freeze({__proto__:null,default:Kv,radioGroup:Kv,vars:Qv});const ex=Xc.cssVarList,tx=Mt(Zp),ox={[ex.fontFamily]:sy.fontFamily,[ex.radioSize]:"calc(1em + 6px)",[ex.radioMargin]:"auto 4px",[ex.radioCheckedSize]:`calc(var(${ex.radioSize})/5)`,[ex.radioCheckedColor]:tx.colors.surface.light,[ex.radioBackgroundColor]:tx.colors.surface.light,[ex.radioBorderColor]:"none",[ex.radioBorderWidth]:0,_checked:{[ex.radioBackgroundColor]:tx.colors.surface.contrast},_hover:{cursor:"pointer"},size:{xs:{[ex.fontSize]:"12px"},sm:{[ex.fontSize]:"14px"},md:{[ex.fontSize]:"16px"},lg:{[ex.fontSize]:"18px"}}};var ix=Object.freeze({__proto__:null,default:ox,radioButton:ox,vars:ex});const rx=Mt(Zp),nx=kr.cssVarList,sx={[nx.fontFamily]:sy.fontFamily,[nx.fontSize]:sy.fontSize,[nx.hostDirection]:sy.direction,[nx.calendarPadding]:"1em",[nx.topNavVerticalPadding]:"1em",[nx.topNavAlignment]:"space-between",[nx.topNavGap]:"0",[nx.topNavSelectorsGap]:"0.5em",[nx.bottomNavVerticalPadding]:"0.75em",[nx.bottomNavHorizontalPadding]:"1.5em",[nx.bottomNavAlignment]:"space-between",[nx.bottomNavGap]:"0.5em",[nx.navMarginBottom]:"0.75em",[nx.navBorderBottomWidth]:"1px",[nx.navBorderBottomColor]:rx.colors.surface.highlight,[nx.navBorderBottomStyle]:"solid",[nx.yearInputWidth]:"6em",[nx.monthInputWidth]:"8em",[nx.navButtonSize]:"24px",[nx.navButtonCursor]:"pointer",[nx.weekdayFontSize]:"0.875em",[nx.weekdayFontWeight]:"500",[nx.dayHeight]:"3.125em",[nx.daySize]:"2.125em",[nx.dayFontSize]:"1em",[nx.dayRadius]:"50%",[nx.dayTextAlign]:"center",[nx.dayPadding]:"0",[nx.dayTextColor]:rx.colors.surface.contrast,[nx.dayFontWeight]:"500",[nx.dayBackgroundColor]:"transparent",[nx.dayCursor]:"pointer",[nx.dayBackgroundColorHover]:rx.colors.primary.highlight,[nx.daySelectedBackgroundColor]:rx.colors.primary.main,[nx.daySelectedTextdColor]:rx.colors.primary.contrast,[nx.dayDisabledTextdColor]:rx.colors.surface.light,[nx.currentDayBorderColor]:rx.colors.surface.light,[nx.currentDayBorderWidth]:"1px",[nx.currentDayBorderStyle]:"solid",size:{xs:{[nx.fontSize]:"12px"},sm:{[nx.fontSize]:"14px"},md:{[nx.fontSize]:"16px"},lg:{[nx.fontSize]:"18px"}},[nx.navButtonRotation]:"rotate(180deg)",_disabled:{[nx.navButtonOpacity]:"0.5",[nx.dayBackgroundColorHover]:"none",[nx.navButtonCursor]:"default",[nx.dayCursor]:"default"},_fullWidth:{[nx.hostWidth]:"100%",[nx.dayBlockAlign]:"0 auto"}};var ax=Object.freeze({__proto__:null,default:sx,vars:nx});const lx=Mt(Zp),dx="#00000020",{shadow:cx}=lx,px=cn.cssVarList,hx={[px.hostWidth]:sy.width,[px.hostDirection]:sy.direction,[px.iconMargin]:"0.375em",[px.overlay.marginTop]:`calc(${sy.outlineWidth} + 1px)`,[px.overlay.backgroundColor]:sy.backgroundColor,[px.overlay.backdropBackgroundColor]:"transparent",[px.overlay.backdropPointerEvents]:"all",[px.overlay.boxShadow]:`${cx.wide.xl} ${dx}, ${cx.narrow.xl} ${dx}`,[px.overlay.outlineWidth]:"0",[px.overlay.outlineColor]:"transparent",[px.overlay.outlineStyle]:"none",[px.overlay.padding]:"0",[px.rtlInputDirection]:"ltr",[px.rtlInputAlignment]:"right",[px.errorMessageIcon]:sy.errorMessageIcon,[px.errorMessageIconSize]:sy.errorMessageIconSize,[px.errorMessageIconPadding]:sy.errorMessageIconPadding,[px.errorMessageIconRepeat]:sy.errorMessageIconRepeat,[px.errorMessageIconPosition]:sy.errorMessageIconPosition,[px.errorMessageFontSize]:sy.errorMessageFontSize,[px.labelFontWeight]:sy.labelFontWeight,[px.inputValueFontWeight]:sy.inputValueFontWeight,[px.inputPlaceholderFontWeight]:sy.inputPlaceholderFontWeight,[px.helperTextFontWeight]:sy.helperTextFontWeight,[px.errorMessageFontWeight]:sy.errorMessageFontWeight};var ux=Object.freeze({__proto__:null,default:hx,vars:px});const gx=ap.cssVarList,mx={[gx.requiredInputBorderColor]:ny._disabled[ay.borderColor],[gx.requiredInputValueTextColor]:ny._disabled[ay.valueTextColor],[gx.hostWidth]:"280px",_fullWidth:{[gx.hostWidth]:"100%"}};var bx=Object.freeze({__proto__:null,default:mx,vars:gx});const yx=Mt(Zp),fx=yp.cssVarList,vx={[fx.gap]:yx.spacing.lg,[fx.arrowsColor]:yx.colors.surface.dark,[fx.thirdPartyAppLogoFallback]:"url(https://imgs.descope.com/components/third-party-app-logo-placeholder.svg)",[fx.companyLogoFallback]:"url(https://imgs.descope.com/components/project-logo-placeholder.svg)",size:{xs:{[fx.logoMaxHeight]:"30px",[fx.logoMaxWidth]:"120px"},sm:{[fx.logoMaxHeight]:"40px",[fx.logoMaxWidth]:"160px"},md:{[fx.logoMaxHeight]:"48px",[fx.logoMaxWidth]:"200px"},lg:{[fx.logoMaxHeight]:"60px",[fx.logoMaxWidth]:"240px"}}};var xx=Object.freeze({__proto__:null,default:vx,vars:fx});const Cx=wp.cssVarList,wx={[Cx.hostWidth]:"fit-content",_fullWidth:{[Cx.hostWidth]:"100%"}};var Ix=Object.freeze({__proto__:null,default:wx,vars:Cx});const Sx=zp.cssVarList,Mx={[Sx.hostWidth]:"min-content",[Sx.questionCursor]:"pointer",_fullWidth:{[Sx.hostWidth]:"100%"},[Sx.questionFontSize]:sy.fontSize,[Sx.questionFontFamily]:sy.fontFamily};var Ax=Object.freeze({__proto__:null,default:Mx,vars:Sx});const Ex=Fp.cssVarList,Tx={[Ex.hostDirection]:sy.direction,[Ex.labelFontWeight]:sy.labelFontWeight,[Ex.inputValueFontWeight]:sy.inputValueFontWeight,[Ex.inputPlaceholderFontWeight]:sy.inputPlaceholderFontWeight,[Ex.helperTextFontWeight]:sy.helperTextFontWeight,[Ex.errorMessageFontWeight]:sy.errorMessageFontWeight,[Ex.errorMessageIcon]:sy.errorMessageIcon,[Ex.errorMessageIconSize]:sy.errorMessageIconSize,[Ex.errorMessageIconPadding]:sy.errorMessageIconPadding,[Ex.errorMessageIconRepeat]:sy.errorMessageIconRepeat,[Ex.errorMessageIconPosition]:sy.errorMessageIconPosition,[Ex.errorMessageFontSize]:sy.errorMessageFontSize,_fullWidth:{[Ex.hostWidth]:"100%"}};var kx=Object.freeze({__proto__:null,default:Tx,vars:Ex});const zx=Mt(Zp),Lx=jp.cssVarList,Vx={[Lx.hostDirection]:zx.direction,[Lx.backgroundColor]:"transparent",[Lx.iconSize]:"1.35em",[Lx.alignItems]:"center",[Lx.borderRadius]:zx.radius.md,[Lx.horizontalPadding]:"0",[Lx.verticalPadding]:"0",[Lx.gap]:"0.5em",[Lx.fontSize]:Nt(hh.fontSize),mode:{error:{[Lx.textColor]:zx.colors.error.main,_bordered:{[Lx.borderColor]:zx.colors.error.main}},success:{[Lx.textColor]:zx.colors.success.main,_bordered:{[Lx.borderColor]:zx.colors.success.main}}},spacing:{xs:{[Lx.horizontalPadding]:zx.spacing.xs,[Lx.verticalPadding]:zx.spacing.xs},sm:{[Lx.horizontalPadding]:zx.spacing.sm,[Lx.verticalPadding]:zx.spacing.sm},md:{[Lx.horizontalPadding]:zx.spacing.md,[Lx.verticalPadding]:zx.spacing.md},lg:{[Lx.horizontalPadding]:zx.spacing.lg,[Lx.verticalPadding]:zx.spacing.lg},xl:{[Lx.horizontalPadding]:zx.spacing.xl,[Lx.verticalPadding]:zx.spacing.xl}},textAlign:{left:{[Lx.justifyContent]:"left"},center:{[Lx.justifyContent]:"center"},right:{[Lx.justifyContent]:"right"}},_bordered:{[Lx.borderWidth]:zx.border.xs,[Lx.borderColor]:"transparent",[Lx.borderStyle]:"solid",[Lx.borderWidth]:zx.border.xs,[Lx.borderRadius]:zx.radius.sm},_fullWidth:{[Lx.hostWidth]:"100%"}};var Nx=Object.freeze({__proto__:null,default:Vx,vars:Lx});const Dx=qp.cssVarList,Px={enabled:{false:{[Dx.maxHeight]:"70px"}}},Bx={button:ch,textField:hy,password:by,numberField:vy,emailField:wy,textArea:My,checkbox:ky,switchToggle:Dy,container:_y,logo:Yy,totpImage:Zy,notpImage:Ky,text:gh,enrichedText:wh,link:fh,divider:af,passcode:cf,loaderRadial:wf,loaderLinear:gf,comboBox:zh,phoneField:Mf,phoneInputBoxField:Tf,newPassword:Vf,inputWrapper:ly,uploadFile:Pf,buttonSelectionGroupItem:Wf,buttonSelectionGroup:Hf,buttonMultiSelectionGroup:Uf,modal:Kf,grid:ov,notificationCard:av,multiSelectComboBox:Ku,badge:Fh,avatar:Gh,mappingsField:pv,userAttribute:mv,userAuthMethod:vv,samlGroupMappings:wv,policyValidation:Av,image:Kh,icon:Qh,codeSnippet:Zv,radioGroup:Xv,radioButton:ix,calendar:ax,dateField:ux,list:gu,listItem:fu,multiLineMappings:Gu,appsList:nu,scopesList:bx,thirdPartyAppLogo:xx,securityQuestionsSetup:Ix,securityQuestionsVerify:Ax,hybridField:kx,alert:Nx,autocompleteField:dg,addressField:Mg,countrySubdivisionCityField:Yb,timer:Fg,timerButton:Xg,passwordStrength:hm,collapsibleContainer:Mm,recoveryCodes:Nm,hcaptcha:Object.freeze({__proto__:null,default:Px,vars:Dx}),outboundApps:jm,outboundAppButton:Gm,trustedDevices:rb,tooltip:vb,attachment:oy},Fx=Object.keys(Bx).reduce((e,t)=>({...e,[t]:Bx[t].default}),{}),Rx=Object.keys(Bx).reduce((e,t)=>({...e,[t]:Bx[t].vars}),{}),Wx={globals:Zp,components:Fx},Ox={globals:Qp,components:Rx},jx=a()({},Wx,{globals:{colors:{surface:{main:"#181a1c",dark:"#bec4ca",light:"#555f68",highlight:"#22262a",contrast:"#f5f6f7"},primary:{main:"#1f80ff",dark:"#71aeff",light:"#004094",highlight:"#00214d",contrast:"#000000"},secondary:{main:"#a665eb",dark:"#b9a0f3",light:"#683ae6",highlight:"#361299",contrast:"#000000"},success:{main:"#27963c",dark:"#8bc3a2",light:"#004d0f",highlight:"#001f00",contrast:"#000000"},error:{main:"#f85249",dark:"#fa7c75",light:"#c51107",highlight:"#4a0603",contrast:"#000000"},warning:{main:"#EF7A33",dark:"#FF985A",light:"#FF6304",highlight:"#C45512",contrast:"#000000"}}},components:{...Gv}});customElements.define(Xu,class extends eg{static get observedAttributes(){return[].concat(eg.observedAttributes||[],tg)}get allowCustomValue(){return"true"===this.getAttribute("allow-custom-value")}get minSearchLength(){return this.getAttribute("min-search-length")||3}get noResultsFoundMessage(){return this.getAttribute("no-results-message")||"No results found"}get errorFetchingResultsMessage(){return this.getAttribute("error-fetching-results-message")||"An error occurred fetching results"}constructor(){super(),this.innerHTML='\n <div class="autocomplete-field">\n <descope-combo-box clear-button-visible="true" auto-open-disabled="true" has-dynamic-data="true" item-label-path="data-name" item-value-path="data-id" hide-toggle-button="true"></descope-combo-box>\n </div>\n ',this.comboBox=this.querySelector("descope-combo-box")}get value(){return this.comboBox.value}set value(e){this.allowCustomValue?this.comboBox.value=e:(this.comboBox.data=[{label:e,value:e}],setTimeout(()=>{this.comboBox.value=e}))}get defaultValue(){return this.getAttribute("default-value")}async#xi(e){const{results:t,error:o}=await this.fetchResults(e);return o?{error:o}:{results:t}}#Ci(e,t,o,i){return`<span data-name="${o}" data-id="${t}" ${i?'disabled="true"':""}>${e||o}</span>`}#wi(){this.comboBox.renderer=(e,t,o)=>{"true"===o.item.getAttribute("disabled")?e.setAttribute("disabled","true"):e.removeAttribute("disabled"),e.innerHTML=o.item.outerHTML},this.comboBox.renderItem=({displayName:e,value:t,label:o,disabled:i})=>this.#Ci(e,t,o,i)}focus(){this.comboBox.focus()}init(){this.addEventListener("focus",e=>{e.isTrusted&&this.comboBox.focus()}),super.init?.(),this.#Ii(),T(this,this.comboBox,{includeAttrs:["invalid"]})}#Ii(){this.debouncedSearch=(e=>{let t=0;const o=new Set,i=new Set,r=n()((r,n)=>{e(...r).then(e=>{n===t&&(o.forEach(t=>t(e)),o.clear())}).catch(e=>{i.forEach(t=>t(e)),i.clear()})},250);return(...e)=>(t++,new Promise((n,s)=>{o.add(n),i.add(s),r(e,t)}))})(async e=>{try{const{results:t,error:o}=await this.#xi(e);return{results:t,error:o,value:e}}catch(t){return{error:t,value:e}}}),L(this,this.comboBox,{includeAttrs:["size","bordered","label","label-type","placeholder","disabled","readonly","required","full-width","helper-text","invalid","error-message","data-errormessage-value-missing","st-host-direction","allow-custom-value","st-error-message-icon","st-error-message-icon-size","st-error-message-icon-padding"]}),this.comboBox.addEventListener("filter-changed",this.onSearch.bind(this)),this.#wi()}#Si(){return[{label:this.noResultsFoundMessage,value:og,disabled:!0}]}#Mi(){return[{label:this.errorFetchingResultsMessage,value:og,disabled:!0}]}async onSearch(e){const t=e.detail.value;if(!t||t.length<this.minSearchLength)return;this.comboBox.loading=!0,this.comboBox.setAttribute("opened","true");const o=await this.debouncedSearch(t);o&&o.value===t&&(this.comboBox.loading=!1,o.error?this.comboBox.data=this.#Mi():0===o.results?.length?this.comboBox.data=this.#Si():this.comboBox.data=o.results||[])}fetchResults(e){return console.warn("fetchResults","needs to be implemented"),{results:[],error:void 0}}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:{valid:!0}}}),customElements.define(ig,ng),customElements.define(hg,vg),customElements.define(xg,wg);const $x=k("anchored");class _x extends(ye({componentName:$x,baseSelector:".anchored-root"})){#Ai=null;#Ei=null;#Ti=null;get#ki(){return this.defaultSlot.assignedElements({flatten:!0})[0]}get#zi(){return this.shadowRoot.querySelector('slot[name="anchored"]')?.assignedElements()[0]}get#Li(){return this.getRootNode().host}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="anchored-root" part="root">\n <slot></slot>\n <div class="anchored-host" part="anchored">\n <slot name="anchored"></slot>\n </div>\n </div>\n ',this.defaultSlot=this.shadowRoot.querySelector("slot:not([name])")}init(){super.init?.(),V("\n :host {\n display: inline-flex;\n position: relative;\n box-sizing: border-box;\n }\n\n :host(:not([has-anchor])) {\n display: none;\n }\n\n .anchored-root {\n position: relative;\n display: flex;\n width: 100%;\n min-width: 0;\n }\n\n /* Make anchor fill the flex row and allow it to shrink. */\n ::slotted(*:not([slot])) {\n flex-grow: 1; /* fill the flex row */\n flex-shrink: 1; /* compress when constrained */\n flex-basis: auto; /* start from the anchor's natural size */\n min-width: 0; /* flex items won't shrink below content size without this */\n }\n\n /* Anchored container covers the anchor but is invisible to pointer events. */\n .anchored-host {\n position: absolute;\n inset: 0;\n pointer-events: none;\n }\n\n /* Restore interactivity for actual anchored content. */\n ::slotted([slot=\"anchored\"]) {\n pointer-events: auto;\n }\n ",this),this.#Vi(),this.defaultSlot.addEventListener("slotchange",()=>this.#Ni()),this.#Ni()}#so(){const e=this.#ki?.classList?.contains("hidden");this.classList.toggle("hidden",e)}#Ni(){this.#Di(),this.#Ai=this.#Pi(this.#Ai,this.#Li,"stretch"),this.#Ei=this.#Pi(this.#Ei,this.#zi,"st-host-direction")}#Vi(){const e="\n descope-anchored {\n width: 100%; /* fill the outer host so the anchored element spans the full anchor width */\n }\n :host([stretch]) {\n display: inline-flex; /* switch from inline-block so internal children are flex items */\n width: 100%; /* fill non-flex parents */\n flex-grow: 1; /* absorb extra space in flex parents */\n flex-shrink: 0; /* hold full width — shrink:1 would let siblings squeeze it below 100% */\n flex-basis: auto; /* defer to width:100% on the main axis; avoids forcing 100% height in column-flex parents */\n min-width: 0; /* prevent overflow when the outer host is itself inside a constrained flex row */\n }\n ";this.#Ti?this.#Ti.replaceSync(e):this.#Li&&(this.#Ti=V(e,this.#Li))}#Pi(e,t,o){return e?.disconnect(),t?.removeAttribute(o),this.#ki&&t?L(this.#ki,t,{includeAttrs:[o]}):null}disconnectedCallback(){super.disconnectedCallback?.(),this.#Ai?.disconnect(),this.#Ei?.disconnect()}#Di(){this.toggleAttribute("has-anchor",!!this.#ki),this.#so()}}const Hx=I(he)(_x);customElements.define($x,Hx),customElements.define(Rh,_h),customElements.define(Xh,eu),customElements.define(Ub,Kb),customElements.define(um,bm),customElements.define(Ab,Rb),customElements.define(Wb,_b),customElements.define(vu,Du),customElements.define(Pu,qu),customElements.define($m,Hm),customElements.define(Dm,Rm),customElements.define(em,am);var qx=Object.freeze({__proto__:null,PasswordStrengthClass:am,componentName:em});const Yx=k("ponyhot"),Ux="dhp-",Gx=ye({componentName:Yx,baseSelector:""}),Zx=I(he)(class extends Gx{get type(){return this.getAttribute("type")}get value(){return this.input?.value||""}init(){this.input=this.querySelector("input"),this.input&&(this.#Bi(),this.#Fi(),this.#Ri())}#Bi(){const e=["input","change","click","keydown","keyup","mouseover","mousedown"],t=o=>{this.input.value=`${Ux}${o.type}`,e.forEach(e=>{this.input.removeEventListener(e,t)})};e.forEach(e=>{this.input.addEventListener(e,t)})}#Fi(){const e=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value");Object.defineProperty(this.input,"value",{get(){return e.get.call(this)},set(t){const o=e.get.call(this);t&&!t.startsWith(Ux)&&t!==o?e.set.call(this,`${Ux}direct-set`):e.set.call(this,t)},configurable:!0})}#Ri(){Object.entries({position:"absolute",opacity:"0.01",width:"1px",height:"1px",pointerEvents:"none",zIndex:"-1",left:"-999999px"}).forEach(([e,t])=>{this.style[e]=t})}});customElements.define(Yx,Zx),customElements.define(Am,Tm),customElements.define(Eg,Ng),customElements.define(Rg,Zg),customElements.define(nb,cb),customElements.define(Jm,tb);const Qx={translations:v.A,graphs:y.K,dictionary:{...y.z,...f.z}};b.u2.setOptions(Qx);var Jx=Object.freeze({__proto__:null,default:b.K1,options:Qx})}}]);
2
2
  //# sourceMappingURL=222.js.map