@descope/web-components-ui 1.0.301 → 1.0.303

Sign up to get free protection for your applications and to get access to all the features.
package/dist/umd/4978.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[4978],{3346:(t,e,s)=>{s.d(e,{s:()=>l});var i=s(2061),n=s(357),r=s(3038),a=s(2666),o=s(8084);const l=({componentName:t,baseSelector:e=""})=>{class s extends HTMLElement{static get componentName(){return t}#t;#e=!0;get baseSelector(){return e}get baseElement(){return this.#t??=this.baseSelector?this.rootElement.querySelector(this.baseSelector):this,this.#t||console.warn("missing base element for component",this.localName),this.#t}get rootElement(){return this.shadowRoot||this}get name(){return this.getAttribute("name")}connectedCallback(){super.connectedCallback?.(),this.rootElement.isConnected&&this.#e&&(this.#e=!1,this.init?.())}}return(0,i.qC)(n.A,a._,o.Q,r.k)(s)}},5279:(t,e,s)=>{s.d(e,{gh:()=>i,k4:()=>n,qM:()=>a,qg:()=>r});const i="descope",n=3,r="host",a="@"},4567:(t,e,s)=>{s.d(e,{Db:()=>d,FX:()=>r,P$:()=>a,Tk:()=>u,iY:()=>h,oP:()=>c,tg:()=>l});var i=s(2061),n=s(5279);const r=(t,e,{excludeAttrs:s=[],includeAttrs:i=[]})=>{const n=Array.from(t.attributes).filter((t=>!s.includes(t.name)&&(!i.length||i.includes(t.name)))).map((t=>t.name));e(n),new MutationObserver((t=>{t.forEach((t=>{"attributes"!==t.type||s.includes(t.attributeName)||i.length&&!i.includes(t.attributeName)||e([t.attributeName])}))})).observe(t,{attributes:!0})},a=(t,e)=>{e({addedNodes:Array.from(t.children),removedNodes:[]}),new MutationObserver((t=>{t.forEach((t=>{"childList"===t.type&&e(t)}))})).observe(t,{childList:!0})},o=(t,e,s={})=>i=>{i.forEach((i=>{const n=s[i]||i,r=t.getAttribute(i);null!==r?e.getAttribute(n)!==r&&e.setAttribute(n,r):e.removeAttribute(n)}))},l=(t,e,s)=>{r(t,o(t,e),s),r(e,o(e,t),s)},h=t=>(0,i.E3)(n.gh,t),u=(...t)=>`--${(0,i.E3)(...t)}`,c=(t,e,s={})=>{r(t,o(t,e,s.mapAttrs),s)},d=(t,e,s=[])=>{if(!s.length)return;const i=s.reduce(((e,s)=>Object.assign(e,{[s]:{get:()=>t[s],set(e){t[s]=e}}})),{});Object.defineProperties(e,i)}},2061:(t,e,s)=>{s.d(e,{E3:()=>n,GL:()=>i,lo:()=>o,mf:()=>a,qC:()=>r});const i=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_.]+/g,"-").toLowerCase(),n=(...t)=>i(t.filter((t=>!!t)).join("-")),r=(...t)=>e=>t.reduceRight(((t,e)=>e(t)),e),a=t=>"function"==typeof t,o=(t,e)=>{if(!Array.isArray(t)||!Array.isArray(e))return!1;if(t.length!==e.length)return!1;const s=t.slice().sort(),i=e.slice().sort();for(let t=0;t<s.length;t++)if(s[t]!==i[t])return!1;return!0}},7878:(t,e,s)=>{function i(t,e={}){const s=new Event(t,e);this[`on${t}`]?.(s),this.dispatchEvent(s)}s.d(e,{C:()=>i})},6557:(t,e,s)=>{s.d(e,{l:()=>n});var i=s(7878);const n=t=>class extends t{#s=i.C.bind(this,"change");init(){super.init?.(),this.prevValue=this.value,this.addEventListener("change",(t=>{t.stopPropagation()})),this.addEventListener("blur",(()=>{this.value!==this.prevValue&&(this.#s(),this.prevValue=this.value)}))}}},357:(t,e,s)=>{s.d(e,{A:()=>i});const i=t=>class extends t{#i(){const e=this.localName;if(!t.componentName)throw Error('component name is not defined on super class, make sure you have a static get for "componentName"');if(e!==t.componentName)throw Error(`component name mismatch, expected "${t.componentName}", current "${e}"`)}init(){super.init?.(),this.#i()}}},3038:(t,e,s)=>{s.d(e,{k:()=>n});var i=s(7878);const n=t=>class extends t{#n=i.C.bind(this,"components-context");updateComponentsContext(t){this.dispatchEvent(new CustomEvent("components-context",{bubbles:!0,composed:!0,detail:t}))}}},370:(t,e,s)=>{s.d(e,{D:()=>o});var i=s(3346),n=s(2061),r=s(4567),a=s(7878);const o=({componentName:t,wrappedEleName:e,slots:s=[],style:o,excludeAttrsSync:l=[],includeAttrsSync:h=[],includeForwardProps:u=[],delegatesFocus:c=!0})=>{class d extends((0,i.s)({componentName:t,baseSelector:e})){#r=a.C.bind(this,"blur");#a=a.C.bind(this,"focus");constructor(){super().attachShadow({mode:"open",delegatesFocus:c}).innerHTML=`\n\t\t\t<style id="create-proxy">${(0,n.mf)(o)?o():o}</style>\n\t\t\t<${e}>\n\t\t\t${s.map((t=>`<slot ${t?`name="${t}" slot="${t}"`:""} ></slot>`)).join("")}\n\t\t\t</${e}>\n\t\t`}init(){super.init?.(),this.baseElement.addEventListener("blur",(t=>{this.#r()})),this.baseElement.addEventListener("focus",(t=>{this.#a()})),(0,r.Db)(this.baseElement,this,u),(0,r.tg)(this.baseElement,this,{excludeAttrs:l,includeAttrs:h})}}return d}},4814:(t,e,s)=>{s.d(e,{SP:()=>o,i3:()=>l,wj:()=>a});var i=s(2061),n=s(4567);class r{constructor(){this.styleMap=new Map}add(t,e,s){this.styleMap.has(t)||this.styleMap.set(t,[]),this.styleMap.set(t,[...this.styleMap.get(t),{property:e,value:s}])}toString(){return Array.from(this.styleMap.entries()).reduce(((t,[e,s])=>`${t}${e} { \n${s.map((({property:t,value:e})=>`${t}: ${e}`)).join(";\n")} \n}\n\n`),"")}}const a=(t,e,s)=>{const a=new r;return Object.keys(s).forEach((r=>{const o=((t,e)=>{const s={selector:"",property:(0,i.GL)(t)};return e&&Object.keys(e).length?Array.isArray(e)?e.map((t=>({...s,...t}))):[{...s,...e}]:[s]})(r,s[r]),l=(0,n.Tk)(t,r);o.forEach((({selector:t,property:s,important:n,fallback:r})=>{a.add(((t="",e="")=>(0,i.mf)(e)?e(t):`${t}${/^[A-Za-z]/.test(e)?` ${e}`:e}`)(e,t),(0,i.mf)(s)?s():s,((t,e)=>`var(${t}${e?`, ${e}`:""})`)(l,r)+(n?"!important":""))}))})),a.toString()},o=(t,e)=>Object.keys(e).reduce(((e,s)=>Object.assign(e,{[s]:(0,n.Tk)(t,s)})),{}),l=(t,e)=>Array(e).fill(`.${t}`).join("")},9129:(t,e,s)=>{s.d(e,{y:()=>l});var i=s(5279),n=s(2061),r=s(4567),a=s(5561),o=s(4814);const l=({mappings:t={},componentNameOverride:e=""})=>s=>{const l=e||s.componentName;return class extends s{static get cssVarList(){return{...s.cssVarList,...(0,o.SP)(l,{...t})}}#o;#l;#h;#u;#c;#d;#m;#p;#g;constructor({getRootElement:e,componentNameSuffix:s="",themeSection:r=i.qg,baseSelector:a}={}){super(),this.#u=s,this.#c=r,this.#m=a??this.baseSelector,this.#g=e,this.#p=Object.keys(t).map((t=>(0,n.E3)("st",s,t)))}get#b(){return a.componentsThemeManager.currentTheme?.[l]||""}#E(){this.#l.innerHTML=this.#b[this.#c]}#v(){this.#l=document.createElement("style"),this.#l.id=`style-mixin-theme__${l}`,this.#d.prepend(this.#l),this.#h=a.componentsThemeManager.onCurrentThemeChange(this.#E.bind(this)),this.#E()}#y(){if(this.#p.length){this.#o=document.createElement("style"),this.#o.id=`style-mixin-overrides__${l}`;const t=(0,o.i3)(l,i.k4);this.#o.innerText=`:host(${t}) {}`,this.#d.append(this.#o)}}#f(t,e){const s=this.#o?.sheet?.cssRules[0].style;if(!s)return;const i=(0,r.Tk)(l,t.replace(new RegExp("^st-"),""));e?s?.setProperty(i,e):(s?.removeProperty(i),this.removeAttribute(t))}#A(t=[]){let e=!1;t.forEach((t=>{this.#p.includes(t)&&(this.#f(t,this.getAttribute(t)),e=!0)})),e&&(this.#o.innerHTML=this.#o?.sheet?.cssRules[0].cssText)}#S(){if(Object.keys(t).length){const e=document.createElement("style");e.id=`style-mixin-mappings__${l}`,e.innerHTML=(0,o.wj)((0,n.E3)(l,this.#u),this.#m,t),this.#d.prepend(e)}}#w(t){(this.#d.classList||this.#d.host.classList).add(t)}async init(){super.init?.(),this.shadowRoot.isConnected&&(this.#d=await(this.#g?.(this))||this.shadowRoot,this.#w(l),this.#S(),this.#v(),this.#y(),(0,r.FX)(this,this.#A.bind(this),{}))}disconnectedCallback(){super.disconnectedCallback?.(),this.#h?.()}}}},5579:(t,e,s)=>{s.d(e,{e:()=>i});const i=t=>class extends t{#C=null;static get observedAttributes(){return[...t.observedAttributes||[],"draggable"]}constructor(){super(),this.#C=document.createElement("style"),this.#C.innerText="* { cursor: inherit!important }"}#M(t){t?this.shadowRoot.appendChild(this.#C):this.#C.remove()}get isDraggable(){return this.hasAttribute("draggable")&&"false"!==this.getAttribute("draggable")}init(){this.addEventListener("mousedown",(t=>{if(this.isDraggable){const e=this.baseElement.getAttribute("tabindex");this.baseElement.setAttribute("tabindex","-1");const s=()=>{e?this.baseElement.setAttribute("tabindex",e):this.baseElement.removeAttribute("tabindex"),t.target.removeEventListener("mouseup",s),t.target.removeEventListener("dragend",s)};t.target.addEventListener("mouseup",s,{once:!0}),t.target.addEventListener("dragend",s,{once:!0})}})),super.init?.()}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),"draggable"===t&&this.#M("true"===s)}}},2666:(t,e,s)=>{s.d(e,{_:()=>i});const i=t=>class extends t{init(){super.init?.(),this.baseElement.addEventListener("mouseover",(t=>{this.setAttribute("hover","true"),t.target.addEventListener("mouseleave",(()=>this.removeAttribute("hover")),{once:!0})}))}}},4978:(t,e,s)=>{s.d(e,{Ae:()=>o.A,DM:()=>r.D,Iw:()=>u.I,QT:()=>d.Q,_A:()=>l._,dj:()=>a.d,e4:()=>n.e,li:()=>c.l,mE:()=>m.m,wX:()=>h.w,yk:()=>i.y});var i=s(9129),n=s(5579),r=s(370),a=s(5584),o=s(357),l=s(2666),h=s(9894),u=s(9772),c=s(6557),d=s(8084),m=s(1534)},1534:(t,e,s)=>{s.d(e,{m:()=>n});var i=s(7878);const n=t=>class extends t{init(){this.#x(),super.init?.()}#x(){["blur","focus","focusin","focusout"].forEach((t=>{this.addEventListener(t,(t=>{t.isTrusted&&t.target===this&&t.stopImmediatePropagation()}))}))}handleFocusEventsDispatching(t){let e;t?.forEach((t=>{t?.addEventListener("focusout",(t=>{t.stopImmediatePropagation(),e=setTimeout((()=>{e=null,i.C.call(this,"blur"),i.C.call(this,"focusout",{bubbles:!0})}))}));const s=t=>{t.stopImmediatePropagation(),clearTimeout(e),e||(i.C.call(this,"focus"),i.C.call(this,"focusin",{bubbles:!0}))};t?.addEventListener("focusin",s),t?.addEventListener("focus",s)}))}handleInputEventDispatching(){let t=this.value;this.addEventListener("input",(e=>{t===this.value?e.stopImmediatePropagation():t=this.value}))}}},9894:(t,e,s)=>{s.d(e,{w:()=>n}),s(5910);const i=["required","pattern"],n=t=>class extends t{static get observedAttributes(){return[...t.observedAttributes||[],...i]}static get formAssociated(){return!0}#T;get internals(){return this.#T}set internals(t){this.#T=t}constructor(){super(),this.#T=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.`}getErrorMessage(t){const{valueMissing:e,patternMismatch:s,typeMismatch:i,stepMismatch:n,tooShort:r,tooLong:a,rangeOverflow:o,rangeUnderflow:l,badInput:h,customError:u}=t;switch(!0){case e:return this.getAttribute("data-errormessage-value-missing")||this.defaultErrorMsgValueMissing;case s||i||n||h:return this.getAttribute("data-errormessage-pattern-mismatch")||this.defaultErrorMsgPatternMismatch;case r:return this.getAttribute("data-errormessage-pattern-mismatch-too-short")||this.defaultErrorMsgTooShort;case a:return this.getAttribute("data-errormessage-pattern-mismatch-too-long")||this.defaultErrorMsgTooLong;case l:return this.defaultErrorMsgRangeUnderflow;case o:return this.defaultErrorMsgRangeOverflow;case u:return this.validationMessage;default:return""}}#L(){const t=this.isReadOnly?{}:this.getValidity();this.#T.setValidity(t,this.getErrorMessage(t),this.validationTarget)}get validationMessage(){return this.#T.validationMessage}getValidity(){console.warn("getValidity","is not implemented")}checkValidity(){return this.#T.validity.valid}reportValidity(){return this.#T.reportValidity()}get validity(){return this.#T.validity}get validationTarget(){return this.inputElement}setCustomValidity(t){t?this.#T.setValidity({customError:!0},t,this.validationTarget):(this.#T.setValidity({}),this.#L())}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.#T.form}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),i.includes(t)&&this.#L()}init(){super.init?.(),this.addEventListener("change",this.#L),this.addEventListener("invalid",(t=>t.stopPropagation())),this.addEventListener("input",this.#L),setTimeout((()=>this.#L()))}}},8084:(t,e,s)=>{s.d(e,{Q:()=>r});var i=s(4567);const n=["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"],r=t=>class extends t{init(){super.init?.(),(0,i.FX)(this,(t=>t.forEach((t=>{const e=this.getAttribute(t);(t=>n.includes(t))(t)?""===e?this.setAttribute(t,"true"):"false"===e&&this.removeAttribute(t):e||console.debug(`attribute "${t}" has no value, should it be added to the boolean attributes list?`)}))),{})}}},9772:(t,e,s)=>{s.d(e,{I:()=>h});var i=s(5279),n=s(2061),r=s(4567),a=s(9129),o=s(4814);const l=t=>async e=>{const s=await t(e);return new Promise((t=>{let e=0;const i=()=>{if(e>20)return console.error("could not get shadow root for element",s),void t(s);e++,s?.shadowRoot?t(s.shadowRoot):setTimeout(i)};i()}))},h=({name:t,selector:e,mappings:s={},forward:{attributes:h=[],include:u=!0}={}})=>c=>{const d=t||(t=>t.replace(/[^\w\s]/gi,""))(e),m=(0,a.y)({mappings:s})(c);return class extends m{static get cssVarList(){return{...m.cssVarList,[d]:(0,o.SP)((0,n.E3)(c.componentName,"_"+d),s)}}#V;constructor(){const t=l((async t=>{const s=t.shadowRoot.querySelector(t.baseSelector);return e?(await l((()=>s))(t)).querySelector(e):s}));super({getRootElement:t,componentNameSuffix:"_"+d,themeSection:i.qM+d,baseSelector:":host"}),this.#V=t(this).then((t=>t.host))}async#k(){const t=await this.#V;t.onmouseenter=t=>{t.target.setAttribute("hover","true")},t.onmouseleave=t=>{t.target.removeAttribute("hover")}}async init(){super.init?.();const t=await this.#V;(0,r.oP)(this,t,{[u?"includeAttrs":"excludeAttrs"]:h}),this.#k()}}}},5584:(t,e,s)=>{s.d(e,{d:()=>c});var i=s(2061),n=s(4567),r=s(7878),a=s(9129),o=s(9894);const l=["invalid","required"],h=t=>{if(!t)return;let e=t;for(let t=0;t<10;t++)if([e]=e.assignedElements(),"slot"!==e.localName)return e},u=({proxyProps:t=[],inputEvent:e="input",triggerValidationEvents:s=[],proxyParentValidation:i=!1})=>a=>class extends((0,o.w)(a)){static get observedAttributes(){return[...a.observedAttributes||[],...l]}#$;#s=r.C.bind(this,"change");constructor(){super(),this.#$=super.inputElement}warnIfInputElementIsMissing(){clearTimeout(this.inputElementTimerId),this.inputElementTimerId=setTimeout((()=>{!this.#$&&console.warn(this.localName,"no input was found")}),0)}get inputElement(){if(this.#$)return this.#$;this.warnIfInputElementIsMissing();const t=this.baseElement.shadowRoot?.querySelector('slot[name="input"]'),e=this.baseElement.shadowRoot?.querySelector('slot[name="textarea"]');return this.#$=h(t)||h(e),this.#$}set inputElement(t){this.#$=t}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(t){!t&&this._shouldSetInvalid(t)&&(this.invalid=t)},s.forEach((t=>{this.baseElement?.addEventListener(t,(()=>{this.inputElement?.setCustomValidity("")}))})),setTimeout((()=>{(Array.isArray(e)?e:[e]).forEach((t=>{this.baseElement?.addEventListener(t,(()=>{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()})),t.forEach((t=>{var e,s;e=this.inputElement,s=t,Object.defineProperty(this,s,{set(t){e[s]=t},get:()=>e[s],configurable:!0})})),this.setSelectionRange=this.inputElement.setSelectionRange?.bind(this.inputElement),(0,n.oP)(this,this.inputElement,{includeAttrs:["inputmode"]})})),i){const t=this.inputElement.internals,e=this;this.inputElement.internals=new Proxy(t,{get:(t,s)=>"function"==typeof t[s]&&"setValidity"===s?(...i)=>{if(3===i.length){const t=i.slice(0,i.length-1);t.push(e.inputElement),e.internals[s](...t)}else e.internals[s](...i);return t[s](...i)}:"function"==typeof t[s]?(...i)=>(e.internals[s](...i),t[s](...i)):t[s]})}}},c=t=>(0,i.qC)(u(t),(0,a.y)({componentNameOverride:(0,n.iY)("input-wrapper")}))}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[4978],{3346:(t,e,s)=>{s.d(e,{s:()=>l});var i=s(2061),n=s(357),r=s(3038),a=s(2666),o=s(8084);const l=({componentName:t,baseSelector:e=""})=>{class s extends HTMLElement{static get componentName(){return t}#t;#e=!0;get baseSelector(){return e}get baseElement(){return this.#t??=this.baseSelector?this.rootElement.querySelector(this.baseSelector):this,this.#t||console.warn("missing base element for component",this.localName),this.#t}get rootElement(){return this.shadowRoot||this}get name(){return this.getAttribute("name")}connectedCallback(){super.connectedCallback?.(),this.rootElement.isConnected&&this.#e&&(this.#e=!1,this.init?.())}}return(0,i.qC)(n.A,a._,o.Q,r.k)(s)}},5279:(t,e,s)=>{s.d(e,{gh:()=>i,k4:()=>n,qM:()=>a,qg:()=>r});const i="descope",n=3,r="host",a="@"},4567:(t,e,s)=>{s.d(e,{Db:()=>d,FX:()=>r,P$:()=>a,Tk:()=>c,iY:()=>h,oP:()=>u,tg:()=>l});var i=s(2061),n=s(5279);const r=(t,e,{excludeAttrs:s=[],includeAttrs:i=[]})=>{const n=Array.from(t.attributes).filter((t=>!s.includes(t.name)&&(!i.length||i.includes(t.name)))).map((t=>t.name));e(n),new MutationObserver((t=>{t.forEach((t=>{"attributes"!==t.type||s.includes(t.attributeName)||i.length&&!i.includes(t.attributeName)||e([t.attributeName])}))})).observe(t,{attributes:!0})},a=(t,e)=>{e({addedNodes:Array.from(t.children),removedNodes:[]}),new MutationObserver((t=>{t.forEach((t=>{"childList"!==t.type&&"characterData"!==t.type||e(t)}))})).observe(t,{childList:!0,characterData:!0,subtree:!0})},o=(t,e,s={})=>i=>{i.forEach((i=>{const n=s[i]||i,r=t.getAttribute(i);null!==r?e.getAttribute(n)!==r&&e.setAttribute(n,r):e.removeAttribute(n)}))},l=(t,e,s)=>{r(t,o(t,e),s),r(e,o(e,t),s)},h=t=>(0,i.E3)(n.gh,t),c=(...t)=>`--${(0,i.E3)(...t)}`,u=(t,e,s={})=>{r(t,o(t,e,s.mapAttrs),s)},d=(t,e,s=[])=>{if(!s.length)return;const i=s.reduce(((e,s)=>Object.assign(e,{[s]:{get:()=>t[s],set(e){t[s]=e}}})),{});Object.defineProperties(e,i)}},2061:(t,e,s)=>{s.d(e,{E3:()=>n,GL:()=>i,lo:()=>o,mf:()=>a,qC:()=>r});const i=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_.]+/g,"-").toLowerCase(),n=(...t)=>i(t.filter((t=>!!t)).join("-")),r=(...t)=>e=>t.reduceRight(((t,e)=>e(t)),e),a=t=>"function"==typeof t,o=(t,e)=>{if(!Array.isArray(t)||!Array.isArray(e))return!1;if(t.length!==e.length)return!1;const s=t.slice().sort(),i=e.slice().sort();for(let t=0;t<s.length;t++)if(s[t]!==i[t])return!1;return!0}},7878:(t,e,s)=>{function i(t,e={}){const s=new Event(t,e);this[`on${t}`]?.(s),this.dispatchEvent(s)}s.d(e,{C:()=>i})},6557:(t,e,s)=>{s.d(e,{l:()=>n});var i=s(7878);const n=t=>class extends t{#s=i.C.bind(this,"change");init(){super.init?.(),this.prevValue=this.value,this.addEventListener("change",(t=>{t.stopPropagation()})),this.addEventListener("blur",(()=>{this.value!==this.prevValue&&(this.#s(),this.prevValue=this.value)}))}}},357:(t,e,s)=>{s.d(e,{A:()=>i});const i=t=>class extends t{#i(){const e=this.localName;if(!t.componentName)throw Error('component name is not defined on super class, make sure you have a static get for "componentName"');if(e!==t.componentName)throw Error(`component name mismatch, expected "${t.componentName}", current "${e}"`)}init(){super.init?.(),this.#i()}}},3038:(t,e,s)=>{s.d(e,{k:()=>n});var i=s(7878);const n=t=>class extends t{#n=i.C.bind(this,"components-context");updateComponentsContext(t){this.dispatchEvent(new CustomEvent("components-context",{bubbles:!0,composed:!0,detail:t}))}}},370:(t,e,s)=>{s.d(e,{D:()=>o});var i=s(3346),n=s(2061),r=s(4567),a=s(7878);const o=({componentName:t,wrappedEleName:e,slots:s=[],style:o,excludeAttrsSync:l=[],includeAttrsSync:h=[],includeForwardProps:c=[],delegatesFocus:u=!0})=>{class d extends((0,i.s)({componentName:t,baseSelector:e})){#r=a.C.bind(this,"blur");#a=a.C.bind(this,"focus");constructor(){super().attachShadow({mode:"open",delegatesFocus:u}).innerHTML=`\n\t\t\t<style id="create-proxy">${(0,n.mf)(o)?o():o}</style>\n\t\t\t<${e}>\n\t\t\t${s.map((t=>`<slot ${t?`name="${t}" slot="${t}"`:""} ></slot>`)).join("")}\n\t\t\t</${e}>\n\t\t`}init(){super.init?.(),this.baseElement.addEventListener("blur",(t=>{this.#r()})),this.baseElement.addEventListener("focus",(t=>{this.#a()})),(0,r.Db)(this.baseElement,this,c),(0,r.tg)(this.baseElement,this,{excludeAttrs:l,includeAttrs:h})}}return d}},4814:(t,e,s)=>{s.d(e,{SP:()=>o,i3:()=>l,wj:()=>a});var i=s(2061),n=s(4567);class r{constructor(){this.styleMap=new Map}add(t,e,s){this.styleMap.has(t)||this.styleMap.set(t,[]),this.styleMap.set(t,[...this.styleMap.get(t),{property:e,value:s}])}toString(){return Array.from(this.styleMap.entries()).reduce(((t,[e,s])=>`${t}${e} { \n${s.map((({property:t,value:e})=>`${t}: ${e}`)).join(";\n")} \n}\n\n`),"")}}const a=(t,e,s)=>{const a=new r;return Object.keys(s).forEach((r=>{const o=((t,e)=>{const s={selector:"",property:(0,i.GL)(t)};return e&&Object.keys(e).length?Array.isArray(e)?e.map((t=>({...s,...t}))):[{...s,...e}]:[s]})(r,s[r]),l=(0,n.Tk)(t,r);o.forEach((({selector:t,property:s,important:n,fallback:r})=>{a.add(((t="",e="")=>(0,i.mf)(e)?e(t):`${t}${/^[A-Za-z]/.test(e)?` ${e}`:e}`)(e,t),(0,i.mf)(s)?s():s,((t,e)=>`var(${t}${e?`, ${e}`:""})`)(l,r)+(n?"!important":""))}))})),a.toString()},o=(t,e)=>Object.keys(e).reduce(((e,s)=>Object.assign(e,{[s]:(0,n.Tk)(t,s)})),{}),l=(t,e)=>Array(e).fill(`.${t}`).join("")},9129:(t,e,s)=>{s.d(e,{y:()=>l});var i=s(5279),n=s(2061),r=s(4567),a=s(5561),o=s(4814);const l=({mappings:t={},componentNameOverride:e=""})=>s=>{const l=e||s.componentName;return class extends s{static get cssVarList(){return{...s.cssVarList,...(0,o.SP)(l,{...t})}}#o;#l;#h;#c;#u;#d;#m;#p;#g;constructor({getRootElement:e,componentNameSuffix:s="",themeSection:r=i.qg,baseSelector:a}={}){super(),this.#c=s,this.#u=r,this.#m=a??this.baseSelector,this.#g=e,this.#p=Object.keys(t).map((t=>(0,n.E3)("st",s,t)))}get#b(){return a.componentsThemeManager.currentTheme?.[l]||""}#E(){this.#l.innerHTML=this.#b[this.#u]}#v(){this.#l=document.createElement("style"),this.#l.id=`style-mixin-theme__${l}`,this.#d.prepend(this.#l),this.#h=a.componentsThemeManager.onCurrentThemeChange(this.#E.bind(this)),this.#E()}#y(){if(this.#p.length){this.#o=document.createElement("style"),this.#o.id=`style-mixin-overrides__${l}`;const t=(0,o.i3)(l,i.k4);this.#o.innerText=`:host(${t}) {}`,this.#d.append(this.#o)}}#f(t,e){const s=this.#o?.sheet?.cssRules[0].style;if(!s)return;const i=(0,r.Tk)(l,t.replace(new RegExp("^st-"),""));e?s?.setProperty(i,e):(s?.removeProperty(i),this.removeAttribute(t))}#A(t=[]){let e=!1;t.forEach((t=>{this.#p.includes(t)&&(this.#f(t,this.getAttribute(t)),e=!0)})),e&&(this.#o.innerHTML=this.#o?.sheet?.cssRules[0].cssText)}#S(){if(Object.keys(t).length){const e=document.createElement("style");e.id=`style-mixin-mappings__${l}`,e.innerHTML=(0,o.wj)((0,n.E3)(l,this.#c),this.#m,t),this.#d.prepend(e)}}#w(t){(this.#d.classList||this.#d.host.classList).add(t)}async init(){super.init?.(),this.shadowRoot.isConnected&&(this.#d=await(this.#g?.(this))||this.shadowRoot,this.#w(l),this.#S(),this.#v(),this.#y(),(0,r.FX)(this,this.#A.bind(this),{}))}disconnectedCallback(){super.disconnectedCallback?.(),this.#h?.()}}}},5579:(t,e,s)=>{s.d(e,{e:()=>i});const i=t=>class extends t{#C=null;static get observedAttributes(){return[...t.observedAttributes||[],"draggable"]}constructor(){super(),this.#C=document.createElement("style"),this.#C.innerText="* { cursor: inherit!important }"}#M(t){t?this.shadowRoot.appendChild(this.#C):this.#C.remove()}get isDraggable(){return this.hasAttribute("draggable")&&"false"!==this.getAttribute("draggable")}init(){this.addEventListener("mousedown",(t=>{if(this.isDraggable){const e=this.baseElement.getAttribute("tabindex");this.baseElement.setAttribute("tabindex","-1");const s=()=>{e?this.baseElement.setAttribute("tabindex",e):this.baseElement.removeAttribute("tabindex"),t.target.removeEventListener("mouseup",s),t.target.removeEventListener("dragend",s)};t.target.addEventListener("mouseup",s,{once:!0}),t.target.addEventListener("dragend",s,{once:!0})}})),super.init?.()}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),"draggable"===t&&this.#M("true"===s)}}},2666:(t,e,s)=>{s.d(e,{_:()=>i});const i=t=>class extends t{init(){super.init?.(),this.baseElement.addEventListener("mouseover",(t=>{this.setAttribute("hover","true"),t.target.addEventListener("mouseleave",(()=>this.removeAttribute("hover")),{once:!0})}))}}},4978:(t,e,s)=>{s.d(e,{Ae:()=>o.A,DM:()=>r.D,Iw:()=>c.I,QT:()=>d.Q,_A:()=>l._,dj:()=>a.d,e4:()=>n.e,li:()=>u.l,mE:()=>m.m,wX:()=>h.w,yk:()=>i.y});var i=s(9129),n=s(5579),r=s(370),a=s(5584),o=s(357),l=s(2666),h=s(9894),c=s(9772),u=s(6557),d=s(8084),m=s(1534)},1534:(t,e,s)=>{s.d(e,{m:()=>n});var i=s(7878);const n=t=>class extends t{init(){this.#x(),super.init?.()}#x(){["blur","focus","focusin","focusout"].forEach((t=>{this.addEventListener(t,(t=>{t.isTrusted&&t.target===this&&t.stopImmediatePropagation()}))}))}handleFocusEventsDispatching(t){let e;t?.forEach((t=>{t?.addEventListener("focusout",(t=>{t.stopImmediatePropagation(),e=setTimeout((()=>{e=null,i.C.call(this,"blur"),i.C.call(this,"focusout",{bubbles:!0})}))}));const s=t=>{t.stopImmediatePropagation(),clearTimeout(e),e||(i.C.call(this,"focus"),i.C.call(this,"focusin",{bubbles:!0}))};t?.addEventListener("focusin",s),t?.addEventListener("focus",s)}))}handleInputEventDispatching(){let t=this.value;this.addEventListener("input",(e=>{t===this.value?e.stopImmediatePropagation():t=this.value}))}}},9894:(t,e,s)=>{s.d(e,{w:()=>n}),s(5910);const i=["required","pattern"],n=t=>class extends t{static get observedAttributes(){return[...t.observedAttributes||[],...i]}static get formAssociated(){return!0}#T;get internals(){return this.#T}set internals(t){this.#T=t}constructor(){super(),this.#T=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.`}getErrorMessage(t){const{valueMissing:e,patternMismatch:s,typeMismatch:i,stepMismatch:n,tooShort:r,tooLong:a,rangeOverflow:o,rangeUnderflow:l,badInput:h,customError:c}=t;switch(!0){case e:return this.getAttribute("data-errormessage-value-missing")||this.defaultErrorMsgValueMissing;case s||i||n||h:return this.getAttribute("data-errormessage-pattern-mismatch")||this.defaultErrorMsgPatternMismatch;case r:return this.getAttribute("data-errormessage-pattern-mismatch-too-short")||this.defaultErrorMsgTooShort;case a:return this.getAttribute("data-errormessage-pattern-mismatch-too-long")||this.defaultErrorMsgTooLong;case l:return this.defaultErrorMsgRangeUnderflow;case o:return this.defaultErrorMsgRangeOverflow;case c:return this.validationMessage;default:return""}}#L(){const t=this.isReadOnly?{}:this.getValidity();this.#T.setValidity(t,this.getErrorMessage(t),this.validationTarget)}get validationMessage(){return this.#T.validationMessage}getValidity(){console.warn("getValidity","is not implemented")}checkValidity(){return this.#T.validity.valid}reportValidity(){return this.#T.reportValidity()}get validity(){return this.#T.validity}get validationTarget(){return this.inputElement}setCustomValidity(t){t?this.#T.setValidity({customError:!0},t,this.validationTarget):(this.#T.setValidity({}),this.#L())}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.#T.form}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),i.includes(t)&&this.#L()}init(){super.init?.(),this.addEventListener("change",this.#L),this.addEventListener("invalid",(t=>t.stopPropagation())),this.addEventListener("input",this.#L),setTimeout((()=>this.#L()))}}},8084:(t,e,s)=>{s.d(e,{Q:()=>r});var i=s(4567);const n=["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"],r=t=>class extends t{init(){super.init?.(),(0,i.FX)(this,(t=>t.forEach((t=>{const e=this.getAttribute(t);(t=>n.includes(t))(t)?""===e?this.setAttribute(t,"true"):"false"===e&&this.removeAttribute(t):e||console.debug(`attribute "${t}" has no value, should it be added to the boolean attributes list?`)}))),{})}}},9772:(t,e,s)=>{s.d(e,{I:()=>h});var i=s(5279),n=s(2061),r=s(4567),a=s(9129),o=s(4814);const l=t=>async e=>{const s=await t(e);return new Promise((t=>{let e=0;const i=()=>{if(e>20)return console.error("could not get shadow root for element",s),void t(s);e++,s?.shadowRoot?t(s.shadowRoot):setTimeout(i)};i()}))},h=({name:t,selector:e,mappings:s={},forward:{attributes:h=[],include:c=!0}={}})=>u=>{const d=t||(t=>t.replace(/[^\w\s]/gi,""))(e),m=(0,a.y)({mappings:s})(u);return class extends m{static get cssVarList(){return{...m.cssVarList,[d]:(0,o.SP)((0,n.E3)(u.componentName,"_"+d),s)}}#V;constructor(){const t=l((async t=>{const s=t.shadowRoot.querySelector(t.baseSelector);return e?(await l((()=>s))(t)).querySelector(e):s}));super({getRootElement:t,componentNameSuffix:"_"+d,themeSection:i.qM+d,baseSelector:":host"}),this.#V=t(this).then((t=>t.host))}async#k(){const t=await this.#V;t.onmouseenter=t=>{t.target.setAttribute("hover","true")},t.onmouseleave=t=>{t.target.removeAttribute("hover")}}async init(){super.init?.();const t=await this.#V;(0,r.oP)(this,t,{[c?"includeAttrs":"excludeAttrs"]:h}),this.#k()}}}},5584:(t,e,s)=>{s.d(e,{d:()=>u});var i=s(2061),n=s(4567),r=s(7878),a=s(9129),o=s(9894);const l=["invalid","required"],h=t=>{if(!t)return;let e=t;for(let t=0;t<10;t++)if([e]=e.assignedElements(),"slot"!==e.localName)return e},c=({proxyProps:t=[],inputEvent:e="input",triggerValidationEvents:s=[],proxyParentValidation:i=!1})=>a=>class extends((0,o.w)(a)){static get observedAttributes(){return[...a.observedAttributes||[],...l]}#$;#s=r.C.bind(this,"change");constructor(){super(),this.#$=super.inputElement}warnIfInputElementIsMissing(){clearTimeout(this.inputElementTimerId),this.inputElementTimerId=setTimeout((()=>{!this.#$&&console.warn(this.localName,"no input was found")}),0)}get inputElement(){if(this.#$)return this.#$;this.warnIfInputElementIsMissing();const t=this.baseElement.shadowRoot?.querySelector('slot[name="input"]'),e=this.baseElement.shadowRoot?.querySelector('slot[name="textarea"]');return this.#$=h(t)||h(e),this.#$}set inputElement(t){this.#$=t}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(t){!t&&this._shouldSetInvalid(t)&&(this.invalid=t)},s.forEach((t=>{this.baseElement?.addEventListener(t,(()=>{this.inputElement?.setCustomValidity("")}))})),setTimeout((()=>{(Array.isArray(e)?e:[e]).forEach((t=>{this.baseElement?.addEventListener(t,(()=>{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()})),t.forEach((t=>{var e,s;e=this.inputElement,s=t,Object.defineProperty(this,s,{set(t){e[s]=t},get:()=>e[s],configurable:!0})})),this.setSelectionRange=this.inputElement.setSelectionRange?.bind(this.inputElement),(0,n.oP)(this,this.inputElement,{includeAttrs:["inputmode"]})})),i){const t=this.inputElement.internals,e=this;this.inputElement.internals=new Proxy(t,{get:(t,s)=>"function"==typeof t[s]&&"setValidity"===s?(...i)=>{if(3===i.length){const t=i.slice(0,i.length-1);t.push(e.inputElement),e.internals[s](...t)}else e.internals[s](...i);return t[s](...i)}:"function"==typeof t[s]?(...i)=>(e.internals[s](...i),t[s](...i)):t[s]})}}},u=t=>(0,i.qC)(c(t),(0,a.y)({componentNameOverride:(0,n.iY)("input-wrapper")}))}}]);