@warp-ds/elements 2.3.0-next.27 → 2.3.0-next.29

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.
@@ -50,6 +50,7 @@ declare class WarpSliderThumb extends WarpSliderThumb_base {
50
50
  * @internal
51
51
  */
52
52
  anchorPositioningStyleElement: HTMLStyleElement | null;
53
+ updateFieldAfterValidation(): Promise<void>;
53
54
  connectedCallback(): Promise<void>;
54
55
  get boundaryValue(): string;
55
56
  /** Value to display in the textfield (shows boundary when focused on empty value) */
@@ -1,5 +1,5 @@
1
- var Ue=Object.create;var ae=Object.defineProperty;var me=Object.getOwnPropertyDescriptor;var Xe=Object.getOwnPropertyNames;var He=Object.getPrototypeOf,qe=Object.prototype.hasOwnProperty;var ve=t=>{throw TypeError(t)};var fe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Ze=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Xe(e))!qe.call(t,a)&&a!==r&&ae(t,a,{get:()=>e[a],enumerable:!(o=me(e,a))||o.enumerable});return t};var Be=(t,e,r)=>(r=t!=null?Ue(He(t)):{},Ze(e||!t||!t.__esModule?ae(r,"default",{value:t,enumerable:!0}):r,t));var m=(t,e,r,o)=>{for(var a=o>1?void 0:o?me(e,r):e,n=t.length-1,s;n>=0;n--)(s=t[n])&&(a=(o?s(e,r,a):s(a))||a);return o&&a&&ae(e,r,a),a};var ie=(t,e,r)=>e.has(t)||ve("Cannot "+r);var we=(t,e,r)=>(ie(t,e,"read from private field"),r?r.call(t):e.get(t)),se=(t,e,r)=>e.has(t)?ve("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),xe=(t,e,r,o)=>(ie(t,e,"write to private field"),o?o.call(t,r):e.set(t,r),r),g=(t,e,r)=>(ie(t,e,"access private method"),r);var Ee=fe(D=>{"use strict";Object.defineProperty(D,"__esModule",{value:!0});D.errorMessages=D.ErrorType=void 0;var A;(function(t){t.MalformedUnicode="MALFORMED_UNICODE",t.MalformedHexadecimal="MALFORMED_HEXADECIMAL",t.CodePointLimit="CODE_POINT_LIMIT",t.OctalDeprecation="OCTAL_DEPRECATION",t.EndOfString="END_OF_STRING"})(A=D.ErrorType||(D.ErrorType={}));D.errorMessages=new Map([[A.MalformedUnicode,"malformed Unicode character escape sequence"],[A.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[A.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[A.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[A.EndOfString,"malformed escape sequence at end of string"]])});var Fe=fe($=>{"use strict";Object.defineProperty($,"__esModule",{value:!0});$.unraw=$.errorMessages=$.ErrorType=void 0;var y=Ee();Object.defineProperty($,"ErrorType",{enumerable:!0,get:function(){return y.ErrorType}});Object.defineProperty($,"errorMessages",{enumerable:!0,get:function(){return y.errorMessages}});function Je(t){return!t.match(/[^a-f0-9]/i)?parseInt(t,16):NaN}function B(t,e,r){let o=Je(t);if(Number.isNaN(o)||r!==void 0&&r!==t.length)throw new SyntaxError(y.errorMessages.get(e));return o}function We(t){let e=B(t,y.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(e)}function Me(t,e){let r=B(t,y.ErrorType.MalformedUnicode,4);if(e!==void 0){let o=B(e,y.ErrorType.MalformedUnicode,4);return String.fromCharCode(r,o)}return String.fromCharCode(r)}function Qe(t){return t.charAt(0)==="{"&&t.charAt(t.length-1)==="}"}function er(t){if(!Qe(t))throw new SyntaxError(y.errorMessages.get(y.ErrorType.MalformedUnicode));let e=t.slice(1,-1),r=B(e,y.ErrorType.MalformedUnicode);try{return String.fromCodePoint(r)}catch(o){throw o instanceof RangeError?new SyntaxError(y.errorMessages.get(y.ErrorType.CodePointLimit)):o}}function rr(t,e=!1){if(e)throw new SyntaxError(y.errorMessages.get(y.ErrorType.OctalDeprecation));let r=parseInt(t,8);return String.fromCharCode(r)}var tr=new Map([["b","\b"],["f","\f"],["n",`
2
- `],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function or(t){return tr.get(t)||t}var ar=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function Ve(t,e=!1){return t.replace(ar,function(r,o,a,n,s,i,d,p,w){if(o!==void 0)return"\\";if(a!==void 0)return We(a);if(n!==void 0)return er(n);if(s!==void 0)return Me(s,i);if(d!==void 0)return Me(d);if(p==="0")return"\0";if(p!==void 0)return rr(p,!e);if(w!==void 0)return or(w);throw new SyntaxError(y.errorMessages.get(y.ErrorType.EndOfString))})}$.unraw=Ve;$.default=Ve});var u=function(t,e,r,o){if(r==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?o:r==="a"?o.call(t):o?o.value:e.get(t)},f=function(t,e,r,o,a){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!a:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?a.call(t,r):a?a.value=r:e.set(t,r),r};function ke(t){var e,r,o,a,n,s,i,d,p,w,z,V,k,M,_,C,L,Y,re;class Ye extends t{constructor(...l){var h,v,x;super(...l),e.add(this),this.internals=this.attachInternals(),r.set(this,!1),o.set(this,!1),a.set(this,!1),n.set(this,void 0),s.set(this,void 0),i.set(this,!0),p.set(this,""),w.set(this,()=>{f(this,a,!0,"f"),f(this,r,!0,"f"),u(this,e,"m",C).call(this)}),z.set(this,()=>{f(this,r,!1,"f"),u(this,e,"m",L).call(this,this.shouldFormValueUpdate()?u(this,p,"f"):""),!this.validity.valid&&u(this,a,"f")&&f(this,o,!0,"f");let F=u(this,e,"m",C).call(this);this.validationMessageCallback&&this.validationMessageCallback(F?this.internals.validationMessage:"")}),V.set(this,()=>{var F;u(this,i,"f")&&this.validationTarget&&(this.internals.setValidity(this.validity,this.validationMessage,this.validationTarget),f(this,i,!1,"f")),f(this,a,!0,"f"),f(this,o,!0,"f"),u(this,e,"m",C).call(this),(F=this===null||this===void 0?void 0:this.validationMessageCallback)===null||F===void 0||F.call(this,this.showError?this.internals.validationMessage:"")}),k.set(this,void 0),M.set(this,!1),_.set(this,Promise.resolve()),(h=this.addEventListener)===null||h===void 0||h.call(this,"focus",u(this,w,"f")),(v=this.addEventListener)===null||v===void 0||v.call(this,"blur",u(this,z,"f")),(x=this.addEventListener)===null||x===void 0||x.call(this,"invalid",u(this,V,"f")),this.setValue(null)}static get formAssociated(){return!0}static get validators(){return this.formControlValidators||[]}static get observedAttributes(){let l=this.validators.map(x=>x.attribute).flat(),h=super.observedAttributes||[];return[...new Set([...h,...l])]}static getValidator(l){return this.validators.find(h=>h.attribute===l)||null}static getValidators(l){return this.validators.filter(h=>{var v;if(h.attribute===l||!((v=h.attribute)===null||v===void 0)&&v.includes(l))return!0})}get form(){return this.internals.form}get showError(){return u(this,e,"m",C).call(this)}checkValidity(){return this.internals.checkValidity()}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}attributeChangedCallback(l,h,v){var x;(x=super.attributeChangedCallback)===null||x===void 0||x.call(this,l,h,v);let X=this.constructor.getValidators(l);X!=null&&X.length&&this.validationTarget&&this.setValue(u(this,p,"f"))}setValue(l){var h;f(this,o,!1,"f"),(h=this.validationMessageCallback)===null||h===void 0||h.call(this,""),f(this,p,l,"f");let x=this.shouldFormValueUpdate()?l:null;this.internals.setFormValue(x),u(this,e,"m",L).call(this,x),this.valueChangedCallback&&this.valueChangedCallback(x),u(this,e,"m",C).call(this)}shouldFormValueUpdate(){return!0}get validationComplete(){return new Promise(l=>l(u(this,_,"f")))}formResetCallback(){var l,h;f(this,a,!1,"f"),f(this,o,!1,"f"),u(this,e,"m",C).call(this),(l=this.resetFormControl)===null||l===void 0||l.call(this),(h=this.validationMessageCallback)===null||h===void 0||h.call(this,u(this,e,"m",C).call(this)?this.validationMessage:"")}}return r=new WeakMap,o=new WeakMap,a=new WeakMap,n=new WeakMap,s=new WeakMap,i=new WeakMap,p=new WeakMap,w=new WeakMap,z=new WeakMap,V=new WeakMap,k=new WeakMap,M=new WeakMap,_=new WeakMap,e=new WeakSet,d=function(){let l=this.getRootNode(),h=`${this.localName}[name="${this.getAttribute("name")}"]`;return l.querySelectorAll(h)},C=function(){if(this.hasAttribute("disabled"))return!1;let l=u(this,o,"f")||u(this,a,"f")&&!this.validity.valid&&!u(this,r,"f");return l&&this.internals.states?this.internals.states.add("--show-error"):this.internals.states&&this.internals.states.delete("--show-error"),l},L=function(l){let h=this.constructor,v={},x=h.validators,F=[],X=x.some(E=>E.isValid instanceof Promise);u(this,M,"f")||(f(this,_,new Promise(E=>{f(this,k,E,"f")}),"f"),f(this,M,!0,"f")),u(this,n,"f")&&(u(this,n,"f").abort(),f(this,s,u(this,n,"f"),"f"));let H=new AbortController;f(this,n,H,"f");let q,ge=!1;x.length&&(x.forEach(E=>{let te=E.key||"customError",T=E.isValid(this,l,H.signal);T instanceof Promise?(F.push(T),T.then(oe=>{oe!=null&&(v[te]=!oe,q=u(this,e,"m",re).call(this,E,l),u(this,e,"m",Y).call(this,v,q))})):(v[te]=!T,this.validity[te]!==!T&&(ge=!0),!T&&!q&&(q=u(this,e,"m",re).call(this,E,l)))}),Promise.allSettled(F).then(()=>{var E;H!=null&&H.signal.aborted||(f(this,M,!1,"f"),(E=u(this,k,"f"))===null||E===void 0||E.call(this))}),(ge||!X)&&u(this,e,"m",Y).call(this,v,q))},Y=function(l,h){if(this.validationTarget)this.internals.setValidity(l,h,this.validationTarget),f(this,i,!1,"f");else{if(this.internals.setValidity(l,h),this.internals.validity.valid)return;f(this,i,!0,"f")}},re=function(l,h){if(this.validityCallback){let v=this.validityCallback(l.key||"customError");if(v)return v}return l.message instanceof Function?l.message(this,h):l.message},Ye}import{html as I,LitElement as De,nothing as O}from"lit";import{property as S,query as Re,state as P}from"lit/decorators.js";import{ifDefined as W}from"lit/directives/if-defined.js";import{css as ye}from"lit";var _e=ye`
1
+ var Ue=Object.create;var ie=Object.defineProperty;var me=Object.getOwnPropertyDescriptor;var He=Object.getOwnPropertyNames;var Xe=Object.getPrototypeOf,qe=Object.prototype.hasOwnProperty;var ve=t=>{throw TypeError(t)};var fe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Ze=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of He(e))!qe.call(t,a)&&a!==r&&ie(t,a,{get:()=>e[a],enumerable:!(o=me(e,a))||o.enumerable});return t};var Be=(t,e,r)=>(r=t!=null?Ue(Xe(t)):{},Ze(e||!t||!t.__esModule?ie(r,"default",{value:t,enumerable:!0}):r,t));var m=(t,e,r,o)=>{for(var a=o>1?void 0:o?me(e,r):e,n=t.length-1,s;n>=0;n--)(s=t[n])&&(a=(o?s(e,r,a):s(a))||a);return o&&a&&ie(e,r,a),a};var se=(t,e,r)=>e.has(t)||ve("Cannot "+r);var we=(t,e,r)=>(se(t,e,"read from private field"),r?r.call(t):e.get(t)),ne=(t,e,r)=>e.has(t)?ve("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),xe=(t,e,r,o)=>(se(t,e,"write to private field"),o?o.call(t,r):e.set(t,r),r),p=(t,e,r)=>(se(t,e,"access private method"),r);var Ee=fe(L=>{"use strict";Object.defineProperty(L,"__esModule",{value:!0});L.errorMessages=L.ErrorType=void 0;var A;(function(t){t.MalformedUnicode="MALFORMED_UNICODE",t.MalformedHexadecimal="MALFORMED_HEXADECIMAL",t.CodePointLimit="CODE_POINT_LIMIT",t.OctalDeprecation="OCTAL_DEPRECATION",t.EndOfString="END_OF_STRING"})(A=L.ErrorType||(L.ErrorType={}));L.errorMessages=new Map([[A.MalformedUnicode,"malformed Unicode character escape sequence"],[A.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[A.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[A.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[A.EndOfString,"malformed escape sequence at end of string"]])});var Ve=fe($=>{"use strict";Object.defineProperty($,"__esModule",{value:!0});$.unraw=$.errorMessages=$.ErrorType=void 0;var _=Ee();Object.defineProperty($,"ErrorType",{enumerable:!0,get:function(){return _.ErrorType}});Object.defineProperty($,"errorMessages",{enumerable:!0,get:function(){return _.errorMessages}});function We(t){return!t.match(/[^a-f0-9]/i)?parseInt(t,16):NaN}function B(t,e,r){let o=We(t);if(Number.isNaN(o)||r!==void 0&&r!==t.length)throw new SyntaxError(_.errorMessages.get(e));return o}function Je(t){let e=B(t,_.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(e)}function Me(t,e){let r=B(t,_.ErrorType.MalformedUnicode,4);if(e!==void 0){let o=B(e,_.ErrorType.MalformedUnicode,4);return String.fromCharCode(r,o)}return String.fromCharCode(r)}function Qe(t){return t.charAt(0)==="{"&&t.charAt(t.length-1)==="}"}function er(t){if(!Qe(t))throw new SyntaxError(_.errorMessages.get(_.ErrorType.MalformedUnicode));let e=t.slice(1,-1),r=B(e,_.ErrorType.MalformedUnicode);try{return String.fromCodePoint(r)}catch(o){throw o instanceof RangeError?new SyntaxError(_.errorMessages.get(_.ErrorType.CodePointLimit)):o}}function rr(t,e=!1){if(e)throw new SyntaxError(_.errorMessages.get(_.ErrorType.OctalDeprecation));let r=parseInt(t,8);return String.fromCharCode(r)}var tr=new Map([["b","\b"],["f","\f"],["n",`
2
+ `],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function or(t){return tr.get(t)||t}var ar=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function Fe(t,e=!1){return t.replace(ar,function(r,o,a,n,s,i,d,g,k){if(o!==void 0)return"\\";if(a!==void 0)return Je(a);if(n!==void 0)return er(n);if(s!==void 0)return Me(s,i);if(d!==void 0)return Me(d);if(g==="0")return"\0";if(g!==void 0)return rr(g,!e);if(k!==void 0)return or(k);throw new SyntaxError(_.errorMessages.get(_.ErrorType.EndOfString))})}$.unraw=Fe;$.default=Fe});var u=function(t,e,r,o){if(r==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?o:r==="a"?o.call(t):o?o.value:e.get(t)},w=function(t,e,r,o,a){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!a:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?a.call(t,r):a?a.value=r:e.set(t,r),r};function ke(t){var e,r,o,a,n,s,i,d,g,k,z,F,y,E,M,v,T,Y,te;class Ye extends t{constructor(...l){var h,f,x;super(...l),e.add(this),this.internals=this.attachInternals(),r.set(this,!1),o.set(this,!1),a.set(this,!1),n.set(this,void 0),s.set(this,void 0),i.set(this,!0),g.set(this,""),k.set(this,()=>{w(this,a,!0,"f"),w(this,r,!0,"f"),u(this,e,"m",v).call(this)}),z.set(this,()=>{w(this,r,!1,"f"),u(this,e,"m",T).call(this,this.shouldFormValueUpdate()?u(this,g,"f"):""),!this.validity.valid&&u(this,a,"f")&&w(this,o,!0,"f");let V=u(this,e,"m",v).call(this);this.validationMessageCallback&&this.validationMessageCallback(V?this.internals.validationMessage:"")}),F.set(this,()=>{var V;u(this,i,"f")&&this.validationTarget&&(this.internals.setValidity(this.validity,this.validationMessage,this.validationTarget),w(this,i,!1,"f")),w(this,a,!0,"f"),w(this,o,!0,"f"),u(this,e,"m",v).call(this),(V=this===null||this===void 0?void 0:this.validationMessageCallback)===null||V===void 0||V.call(this,this.showError?this.internals.validationMessage:"")}),y.set(this,void 0),E.set(this,!1),M.set(this,Promise.resolve()),(h=this.addEventListener)===null||h===void 0||h.call(this,"focus",u(this,k,"f")),(f=this.addEventListener)===null||f===void 0||f.call(this,"blur",u(this,z,"f")),(x=this.addEventListener)===null||x===void 0||x.call(this,"invalid",u(this,F,"f")),this.setValue(null)}static get formAssociated(){return!0}static get validators(){return this.formControlValidators||[]}static get observedAttributes(){let l=this.validators.map(x=>x.attribute).flat(),h=super.observedAttributes||[];return[...new Set([...h,...l])]}static getValidator(l){return this.validators.find(h=>h.attribute===l)||null}static getValidators(l){return this.validators.filter(h=>{var f;if(h.attribute===l||!((f=h.attribute)===null||f===void 0)&&f.includes(l))return!0})}get form(){return this.internals.form}get showError(){return u(this,e,"m",v).call(this)}checkValidity(){return this.internals.checkValidity()}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}attributeChangedCallback(l,h,f){var x;(x=super.attributeChangedCallback)===null||x===void 0||x.call(this,l,h,f);let H=this.constructor.getValidators(l);H!=null&&H.length&&this.validationTarget&&this.setValue(u(this,g,"f"))}setValue(l){var h;w(this,o,!1,"f"),(h=this.validationMessageCallback)===null||h===void 0||h.call(this,""),w(this,g,l,"f");let x=this.shouldFormValueUpdate()?l:null;this.internals.setFormValue(x),u(this,e,"m",T).call(this,x),this.valueChangedCallback&&this.valueChangedCallback(x),u(this,e,"m",v).call(this)}shouldFormValueUpdate(){return!0}get validationComplete(){return new Promise(l=>l(u(this,M,"f")))}formResetCallback(){var l,h;w(this,a,!1,"f"),w(this,o,!1,"f"),u(this,e,"m",v).call(this),(l=this.resetFormControl)===null||l===void 0||l.call(this),(h=this.validationMessageCallback)===null||h===void 0||h.call(this,u(this,e,"m",v).call(this)?this.validationMessage:"")}}return r=new WeakMap,o=new WeakMap,a=new WeakMap,n=new WeakMap,s=new WeakMap,i=new WeakMap,g=new WeakMap,k=new WeakMap,z=new WeakMap,F=new WeakMap,y=new WeakMap,E=new WeakMap,M=new WeakMap,e=new WeakSet,d=function(){let l=this.getRootNode(),h=`${this.localName}[name="${this.getAttribute("name")}"]`;return l.querySelectorAll(h)},v=function(){if(this.hasAttribute("disabled"))return!1;let l=u(this,o,"f")||u(this,a,"f")&&!this.validity.valid&&!u(this,r,"f");return l&&this.internals.states?this.internals.states.add("--show-error"):this.internals.states&&this.internals.states.delete("--show-error"),l},T=function(l){let h=this.constructor,f={},x=h.validators,V=[],H=x.some(C=>C.isValid instanceof Promise);u(this,E,"f")||(w(this,M,new Promise(C=>{w(this,y,C,"f")}),"f"),w(this,E,!0,"f")),u(this,n,"f")&&(u(this,n,"f").abort(),w(this,s,u(this,n,"f"),"f"));let X=new AbortController;w(this,n,X,"f");let q,ge=!1;x.length&&(x.forEach(C=>{let oe=C.key||"customError",R=C.isValid(this,l,X.signal);R instanceof Promise?(V.push(R),R.then(ae=>{ae!=null&&(f[oe]=!ae,q=u(this,e,"m",te).call(this,C,l),u(this,e,"m",Y).call(this,f,q))})):(f[oe]=!R,this.validity[oe]!==!R&&(ge=!0),!R&&!q&&(q=u(this,e,"m",te).call(this,C,l)))}),Promise.allSettled(V).then(()=>{var C;X!=null&&X.signal.aborted||(w(this,E,!1,"f"),(C=u(this,y,"f"))===null||C===void 0||C.call(this))}),(ge||!H)&&u(this,e,"m",Y).call(this,f,q))},Y=function(l,h){if(this.validationTarget)this.internals.setValidity(l,h,this.validationTarget),w(this,i,!1,"f");else{if(this.internals.setValidity(l,h),this.internals.validity.valid)return;w(this,i,!0,"f")}},te=function(l,h){if(this.validityCallback){let f=this.validityCallback(l.key||"customError");if(f)return f}return l.message instanceof Function?l.message(this,h):l.message},Ye}import{html as I,LitElement as Le,nothing as O}from"lit";import{property as P,query as De,state as S}from"lit/decorators.js";import{ifDefined as J}from"lit/directives/if-defined.js";import{css as ye}from"lit";var _e=ye`
3
3
  *,
4
4
  :before,
5
5
  :after {
@@ -2610,7 +2610,7 @@ var Ue=Object.create;var ae=Object.defineProperty;var me=Object.getOwnPropertyDe
2610
2610
  :host([name="to"]) .w-slider-thumb__range::-moz-range-thumb {
2611
2611
  transform: translateX(calc(var(--w-slider-thumb-size) - 1px));
2612
2612
  }
2613
- `;import{css as Ke}from"lit";var ze=Ke`*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.hidden{display:none}.absolute{position:absolute}.relative{position:relative}.static{position:static}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}`;var Pe=Be(Fe(),1);var N=t=>typeof t=="string",ir=t=>typeof t=="function",$e=new Map,Ne="en";function ce(t){return[...Array.isArray(t)?t:[t],Ne]}function he(t,e,r){let o=ce(t);r||(r="default");let a;if(typeof r=="string")switch(a={day:"numeric",month:"short",year:"numeric"},r){case"full":a.weekday="long";case"long":a.month="long";break;case"short":a.month="numeric";break}else a=r;return G(()=>K("date",o,r),()=>new Intl.DateTimeFormat(o,a)).format(N(e)?new Date(e):e)}function sr(t,e,r){let o;if(r||(r="default"),typeof r=="string")switch(o={second:"numeric",minute:"numeric",hour:"numeric"},r){case"full":case"long":o.timeZoneName="short";break;case"short":delete o.second}else o=r;return he(t,e,o)}function ne(t,e,r){let o=ce(t);return G(()=>K("number",o,r),()=>new Intl.NumberFormat(o,r)).format(e)}function Oe(t,e,r,{offset:o=0,...a}){var i,d;let n=ce(t),s=e?G(()=>K("plural-ordinal",n),()=>new Intl.PluralRules(n,{type:"ordinal"})):G(()=>K("plural-cardinal",n),()=>new Intl.PluralRules(n,{type:"cardinal"}));return(d=(i=a[r])!=null?i:a[s.select(r-o)])!=null?d:a.other}function G(t,e){let r=t(),o=$e.get(r);return o||(o=e(),$e.set(r,o)),o}function K(t,e,r){let o=e.join("-");return`${t}-${o}-${JSON.stringify(r)}`}var Se=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,Le="%__lingui_octothorpe__%",nr=(t,e,r={})=>{let o=e||t,a=s=>typeof s=="object"?s:r[s],n=(s,i)=>{let d=Object.keys(r).length?a("number"):void 0,p=ne(o,s,d);return i.replace(new RegExp(Le,"g"),p)};return{plural:(s,i)=>{let{offset:d=0}=i,p=Oe(o,!1,s,i);return n(s-d,p)},selectordinal:(s,i)=>{let{offset:d=0}=i,p=Oe(o,!0,s,i);return n(s-d,p)},select:lr,number:(s,i)=>ne(o,s,a(i)||{style:i}),date:(s,i)=>he(o,s,a(i)||i),time:(s,i)=>sr(o,s,a(i)||i)}},lr=(t,e)=>{var r;return(r=e[t])!=null?r:e.other};function dr(t,e,r){return(o={},a)=>{let n=nr(e,r,a),s=(d,p=!1)=>Array.isArray(d)?d.reduce((w,z)=>{if(z==="#"&&p)return w+Le;if(N(z))return w+z;let[V,k,M]=z,_={};k==="plural"||k==="selectordinal"||k==="select"?Object.entries(M).forEach(([L,Y])=>{_[L]=s(Y,k==="plural"||k==="selectordinal")}):_=M;let C;if(k){let L=n[k];C=L(o[V],_)}else C=o[V];return C==null?w:w+C},""):d,i=s(t);return N(i)&&Se.test(i)?(0,Pe.unraw)(i):N(i)?i:i?String(i):""}}var cr=Object.defineProperty,hr=(t,e,r)=>e in t?cr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ur=(t,e,r)=>(hr(t,typeof e!="symbol"?e+"":e,r),r),le=class{constructor(){ur(this,"_events",{})}on(e,r){var a;var o;return(a=(o=this._events)[e])!=null||(o[e]=[]),this._events[e].push(r),()=>this.removeListener(e,r)}removeListener(e,r){let o=this._getListeners(e);if(!o)return;let a=o.indexOf(r);~a&&o.splice(a,1)}emit(e,...r){let o=this._getListeners(e);o&&o.map(a=>a.apply(this,r))}_getListeners(e){let r=this._events[e];return Array.isArray(r)?r:!1}},br=Object.defineProperty,pr=(t,e,r)=>e in t?br(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,R=(t,e,r)=>(pr(t,typeof e!="symbol"?e+"":e,r),r),de=class extends le{constructor(e){var r;super(),R(this,"_locale",""),R(this,"_locales"),R(this,"_localeData",{}),R(this,"_messages",{}),R(this,"_missing"),R(this,"_messageCompiler"),R(this,"t",this._.bind(this)),e.missing!=null&&(this._missing=e.missing),e.messages!=null&&this.load(e.messages),e.localeData!=null&&this.loadLocaleData(e.localeData),(typeof e.locale=="string"||e.locales)&&this.activate((r=e.locale)!=null?r:Ne,e.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){var e;return(e=this._messages[this._locale])!=null?e:{}}get localeData(){var e;return(e=this._localeData[this._locale])!=null?e:{}}_loadLocaleData(e,r){let o=this._localeData[e];o?Object.assign(o,r):this._localeData[e]=r}setMessagesCompiler(e){return this._messageCompiler=e,this}loadLocaleData(e,r){typeof e=="string"?this._loadLocaleData(e,r):Object.keys(e).forEach(o=>this._loadLocaleData(o,e[o])),this.emit("change")}_load(e,r){let o=this._messages[e];o?Object.assign(o,r):this._messages[e]=r}load(e,r){typeof e=="string"&&typeof r=="object"?this._load(e,r):Object.entries(e).forEach(([o,a])=>this._load(o,a)),this.emit("change")}loadAndActivate({locale:e,locales:r,messages:o}){this._locale=e,this._locales=r||void 0,this._messages[this._locale]=o,this.emit("change")}activate(e,r){this._locale=e,this._locales=r,this.emit("change")}_(e,r,o){if(!this.locale)throw new Error("Lingui: Attempted to call a translation function without setting a locale.\nMake sure to call `i18n.activate(locale)` before using Lingui functions.\nThis issue may also occur due to a race condition in your initialization logic.");let a=o==null?void 0:o.message;e||(e=""),N(e)||(r=e.values||r,a=e.message,e=e.id);let n=this.messages[e],s=n===void 0,i=this._missing;if(i&&s)return ir(i)?i(this._locale,e):i;s&&this.emit("missing",{id:e,locale:this._locale});let d=n||a||e;return N(d)&&(this._messageCompiler?d=this._messageCompiler(d):console.warn(`Uncompiled message detected! Message:
2613
+ `;import{css as Ke}from"lit";var ze=Ke`*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.hidden{display:none}.absolute{position:absolute}.relative{position:relative}.static{position:static}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}`;var Se=Be(Ve(),1);var N=t=>typeof t=="string",ir=t=>typeof t=="function",$e=new Map,Ne="en";function he(t){return[...Array.isArray(t)?t:[t],Ne]}function ue(t,e,r){let o=he(t);r||(r="default");let a;if(typeof r=="string")switch(a={day:"numeric",month:"short",year:"numeric"},r){case"full":a.weekday="long";case"long":a.month="long";break;case"short":a.month="numeric";break}else a=r;return G(()=>K("date",o,r),()=>new Intl.DateTimeFormat(o,a)).format(N(e)?new Date(e):e)}function sr(t,e,r){let o;if(r||(r="default"),typeof r=="string")switch(o={second:"numeric",minute:"numeric",hour:"numeric"},r){case"full":case"long":o.timeZoneName="short";break;case"short":delete o.second}else o=r;return ue(t,e,o)}function le(t,e,r){let o=he(t);return G(()=>K("number",o,r),()=>new Intl.NumberFormat(o,r)).format(e)}function Oe(t,e,r,{offset:o=0,...a}){var i,d;let n=he(t),s=e?G(()=>K("plural-ordinal",n),()=>new Intl.PluralRules(n,{type:"ordinal"})):G(()=>K("plural-cardinal",n),()=>new Intl.PluralRules(n,{type:"cardinal"}));return(d=(i=a[r])!=null?i:a[s.select(r-o)])!=null?d:a.other}function G(t,e){let r=t(),o=$e.get(r);return o||(o=e(),$e.set(r,o)),o}function K(t,e,r){let o=e.join("-");return`${t}-${o}-${JSON.stringify(r)}`}var Pe=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,Te="%__lingui_octothorpe__%",nr=(t,e,r={})=>{let o=e||t,a=s=>typeof s=="object"?s:r[s],n=(s,i)=>{let d=Object.keys(r).length?a("number"):void 0,g=le(o,s,d);return i.replace(new RegExp(Te,"g"),g)};return{plural:(s,i)=>{let{offset:d=0}=i,g=Oe(o,!1,s,i);return n(s-d,g)},selectordinal:(s,i)=>{let{offset:d=0}=i,g=Oe(o,!0,s,i);return n(s-d,g)},select:lr,number:(s,i)=>le(o,s,a(i)||{style:i}),date:(s,i)=>ue(o,s,a(i)||i),time:(s,i)=>sr(o,s,a(i)||i)}},lr=(t,e)=>{var r;return(r=e[t])!=null?r:e.other};function dr(t,e,r){return(o={},a)=>{let n=nr(e,r,a),s=(d,g=!1)=>Array.isArray(d)?d.reduce((k,z)=>{if(z==="#"&&g)return k+Te;if(N(z))return k+z;let[F,y,E]=z,M={};y==="plural"||y==="selectordinal"||y==="select"?Object.entries(E).forEach(([T,Y])=>{M[T]=s(Y,y==="plural"||y==="selectordinal")}):M=E;let v;if(y){let T=n[y];v=T(o[F],M)}else v=o[F];return v==null?k:k+v},""):d,i=s(t);return N(i)&&Pe.test(i)?(0,Se.unraw)(i):N(i)?i:i?String(i):""}}var cr=Object.defineProperty,hr=(t,e,r)=>e in t?cr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ur=(t,e,r)=>(hr(t,typeof e!="symbol"?e+"":e,r),r),de=class{constructor(){ur(this,"_events",{})}on(e,r){var a;var o;return(a=(o=this._events)[e])!=null||(o[e]=[]),this._events[e].push(r),()=>this.removeListener(e,r)}removeListener(e,r){let o=this._getListeners(e);if(!o)return;let a=o.indexOf(r);~a&&o.splice(a,1)}emit(e,...r){let o=this._getListeners(e);o&&o.map(a=>a.apply(this,r))}_getListeners(e){let r=this._events[e];return Array.isArray(r)?r:!1}},br=Object.defineProperty,pr=(t,e,r)=>e in t?br(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,D=(t,e,r)=>(pr(t,typeof e!="symbol"?e+"":e,r),r),ce=class extends de{constructor(e){var r;super(),D(this,"_locale",""),D(this,"_locales"),D(this,"_localeData",{}),D(this,"_messages",{}),D(this,"_missing"),D(this,"_messageCompiler"),D(this,"t",this._.bind(this)),e.missing!=null&&(this._missing=e.missing),e.messages!=null&&this.load(e.messages),e.localeData!=null&&this.loadLocaleData(e.localeData),(typeof e.locale=="string"||e.locales)&&this.activate((r=e.locale)!=null?r:Ne,e.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){var e;return(e=this._messages[this._locale])!=null?e:{}}get localeData(){var e;return(e=this._localeData[this._locale])!=null?e:{}}_loadLocaleData(e,r){let o=this._localeData[e];o?Object.assign(o,r):this._localeData[e]=r}setMessagesCompiler(e){return this._messageCompiler=e,this}loadLocaleData(e,r){typeof e=="string"?this._loadLocaleData(e,r):Object.keys(e).forEach(o=>this._loadLocaleData(o,e[o])),this.emit("change")}_load(e,r){let o=this._messages[e];o?Object.assign(o,r):this._messages[e]=r}load(e,r){typeof e=="string"&&typeof r=="object"?this._load(e,r):Object.entries(e).forEach(([o,a])=>this._load(o,a)),this.emit("change")}loadAndActivate({locale:e,locales:r,messages:o}){this._locale=e,this._locales=r||void 0,this._messages[this._locale]=o,this.emit("change")}activate(e,r){this._locale=e,this._locales=r,this.emit("change")}_(e,r,o){if(!this.locale)throw new Error("Lingui: Attempted to call a translation function without setting a locale.\nMake sure to call `i18n.activate(locale)` before using Lingui functions.\nThis issue may also occur due to a race condition in your initialization logic.");let a=o==null?void 0:o.message;e||(e=""),N(e)||(r=e.values||r,a=e.message,e=e.id);let n=this.messages[e],s=n===void 0,i=this._missing;if(i&&s)return ir(i)?i(this._locale,e):i;s&&this.emit("missing",{id:e,locale:this._locale});let d=n||a||e;return N(d)&&(this._messageCompiler?d=this._messageCompiler(d):console.warn(`Uncompiled message detected! Message:
2614
2614
 
2615
2615
  > ${d}
2616
2616
 
@@ -2618,7 +2618,7 @@ That means you use raw catalog or your catalog doesn't have a translation for th
2618
2618
  ICU features such as interpolation and plurals will not work properly for that message.
2619
2619
 
2620
2620
  Please compile your catalog first.
2621
- `)),N(d)&&Se.test(d)?JSON.parse(`"${d}"`):N(d)?d:dr(d,this._locale,this._locales)(r,o==null?void 0:o.formats)}date(e,r){return he(this._locales||this._locale,e,r)}number(e,r){return ne(this._locales||this._locale,e,r)}};function gr(t={}){return new de(t)}var J=gr();var Te={};var Z,c,Q,ee,ue,j,be,pe,Ae,Ie,je,b=class extends ke(De){constructor(){super(...arguments);se(this,c);this.invalid=!1;this.allowValuesOutsideRange=!1;this.suffix="";this._showTooltip=!1;this._inputHasFocus=!1;se(this,Z,null);this.anchorPositioningStyleElement=null}resetFormControl(){this.value=we(this,Z)}async connectedCallback(){if(super.connectedCallback(),xe(this,Z,this.value),this.setValue(this.value),"anchorName"in document.documentElement.style)await this.updateComplete;else{let r=Te.url.substring(0,Te.url.lastIndexOf("/"));try{let[{default:o}]=await Promise.all([import(`${r}/oddbird-css-anchor-positioning.js`),this.updateComplete]);this.anchorPositioningStyleElement||(this.anchorPositioningStyleElement=document.createElement("style"),this.shadowRoot.prepend(this.anchorPositioningStyleElement)),this.anchorPositioningStyleElement.textContent=`
2621
+ `)),N(d)&&Pe.test(d)?JSON.parse(`"${d}"`):N(d)?d:dr(d,this._locale,this._locales)(r,o==null?void 0:o.formats)}date(e,r){return ue(this._locales||this._locale,e,r)}number(e,r){return le(this._locales||this._locale,e,r)}};function gr(t={}){return new ce(t)}var W=gr();var Re={};var Z,c,Q,ee,be,j,re,pe,Ae,Ie,je,b=class extends ke(Le){constructor(){super(...arguments);ne(this,c);this.invalid=!1;this.allowValuesOutsideRange=!1;this.suffix="";this._showTooltip=!1;this._inputHasFocus=!1;ne(this,Z,null);this.anchorPositioningStyleElement=null}resetFormControl(){this.value=we(this,Z)}async updateFieldAfterValidation(){let r=this.shadowRoot.querySelector("w-textfield");await p(this,c,re).call(this,r.value,!0)}async connectedCallback(){if(super.connectedCallback(),xe(this,Z,this.value),this.setValue(this.value),"anchorName"in document.documentElement.style)await this.updateComplete;else{let r=Re.url.substring(0,Re.url.lastIndexOf("/"));try{let[{default:o}]=await Promise.all([import(`${r}/oddbird-css-anchor-positioning.js`),this.updateComplete]);this.anchorPositioningStyleElement||(this.anchorPositioningStyleElement=document.createElement("style"),this.shadowRoot.prepend(this.anchorPositioningStyleElement)),this.anchorPositioningStyleElement.textContent=`
2622
2622
  /*
2623
2623
  * The polyfill can only anchor to ::before and ::after pseudo elements, not the pseudo element slider thumb.
2624
2624
  * We work around that by recreating a transparent version of the active range
@@ -2667,7 +2667,7 @@ Please compile your catalog first.
2667
2667
  left: anchor(--polyfilled-thumb left);
2668
2668
  margin-left: 38px;
2669
2669
  }
2670
- `,await o({roots:[this.shadowRoot],elements:[this.anchorPositioningStyleElement]})}catch(o){console.error(new Error("Error registering the CSS anchor positioning polyfill. The UI will look broken.",{cause:o}))}}g(this,c,ue).call(this)}get boundaryValue(){return this.slot==="from"?this.min:this.max}get textFieldDisplayValue(){var r;return this._inputHasFocus?this.value!==""?this.value:(r=this.range)!=null&&r.value?Math.min(Math.max(Number(this.range.value),Number(this.min)+1),Number(this.max)-1).toString():"":this.value}get tooltipDisplayValue(){var r,o;return this.formatter?this.formatter(this.value,this.slot):this.value===""?(o=(r=this.range)==null?void 0:r.value)!=null?o:this.boundaryValue:this.value||0}updated(r){r.has("value")&&(this.setValue(this.value),g(this,c,ue).call(this))}render(){return I`
2670
+ `,await o({roots:[this.shadowRoot],elements:[this.anchorPositioningStyleElement]})}catch(o){console.error(new Error("Error registering the CSS anchor positioning polyfill. The UI will look broken.",{cause:o}))}}p(this,c,be).call(this)}get boundaryValue(){return this.slot==="from"?this.min:this.max}get textFieldDisplayValue(){var r;return this._inputHasFocus?this.value!==""?this.value:(r=this.range)!=null&&r.value?Math.min(Math.max(Number(this.range.value),Number(this.min)+1),Number(this.max)-1).toString():"":this.value}get tooltipDisplayValue(){var r,o;return this.formatter?this.formatter(this.value,this.slot):this.value===""?(o=(r=this.range)==null?void 0:r.value)!=null?o:this.boundaryValue:this.value||0}updated(r){r.has("value")&&(this.setValue(this.value),p(this,c,be).call(this))}render(){return I`
2671
2671
  <div class="w-slider-thumb">
2672
2672
  <label for="range">${this.label}</label>
2673
2673
  ${"anchorName"in document.documentElement.style?O:I`<div class="polyfill-range">
@@ -2676,23 +2676,23 @@ Please compile your catalog first.
2676
2676
  <input
2677
2677
  id="range"
2678
2678
  aria-label="${this.ariaLabel}"
2679
- aria-describedby="${W(this.ariaDescription?"aria-description":void 0)}"
2679
+ aria-describedby="${J(this.ariaDescription?"aria-description":void 0)}"
2680
2680
  class="w-slider-thumb__range"
2681
2681
  type="range"
2682
2682
  .value="${this.value}"
2683
2683
  aria-valuetext="${this.tooltipDisplayValue}"
2684
2684
  min="${this.min}"
2685
2685
  max="${this.max}"
2686
- step="${W(!this.allowValuesOutsideRange&&this.step?this.step:void 0)}"
2686
+ step="${J(!this.allowValuesOutsideRange&&this.step?this.step:void 0)}"
2687
2687
  ?disabled="${this.disabled}"
2688
- @mousedown="${g(this,c,Q)}"
2689
- @mouseup="${g(this,c,ee)}"
2690
- @touchstart="${g(this,c,Q)}"
2691
- @touchend="${g(this,c,ee)}"
2692
- @focus="${g(this,c,Q)}"
2693
- @blur="${g(this,c,ee)}"
2694
- @input="${g(this,c,pe)}"
2695
- @keydown="${this.allowValuesOutsideRange?g(this,c,Ae):O}"
2688
+ @mousedown="${p(this,c,Q)}"
2689
+ @mouseup="${p(this,c,ee)}"
2690
+ @touchstart="${p(this,c,Q)}"
2691
+ @touchend="${p(this,c,ee)}"
2692
+ @focus="${p(this,c,Q)}"
2693
+ @blur="${p(this,c,ee)}"
2694
+ @input="${p(this,c,pe)}"
2695
+ @keydown="${this.allowValuesOutsideRange?p(this,c,Ae):O}"
2696
2696
  />
2697
2697
 
2698
2698
  ${this.slot==="from"?I`<span class="w-slider-thumb__from-marker"
@@ -2706,18 +2706,18 @@ Please compile your catalog first.
2706
2706
 
2707
2707
  <w-textfield
2708
2708
  aria-label="${this.ariaLabel}"
2709
- aria-description="${W(this.ariaDescription)}"
2709
+ aria-description="${J(this.ariaDescription)}"
2710
2710
  class="w-slider-thumb__textfield"
2711
2711
  type="number"
2712
2712
  .formatter=${this.formatter?r=>this.formatter(r,this.slot):O}
2713
2713
  .value="${this.textFieldDisplayValue}"
2714
2714
  min="${this.allowValuesOutsideRange?O:this.min}"
2715
2715
  max="${this.allowValuesOutsideRange?O:this.max}"
2716
- step="${W(this.step)}"
2716
+ step="${J(this.step)}"
2717
2717
  ?invalid="${!!this.invalid}"
2718
- @input="${g(this,c,pe)}"
2719
- @focus="${g(this,c,Ie)}"
2720
- @blur="${g(this,c,je)}"
2718
+ @input="${p(this,c,pe)}"
2719
+ @focus="${p(this,c,Ie)}"
2720
+ @blur="${p(this,c,je)}"
2721
2721
  >
2722
2722
  ${this.suffix?I`<w-affix slot="suffix" label="${this.suffix}"></w-affix>`:O}
2723
2723
  </w-textfield>
@@ -2744,5 +2744,5 @@ Please compile your catalog first.
2744
2744
  >${this.ariaDescription}</span
2745
2745
  >
2746
2746
  </div>
2747
- `}};Z=new WeakMap,c=new WeakSet,Q=function(){this._showTooltip=!0,this.shadowRoot.querySelector("w-attention").handleDone()},ee=function(){this._showTooltip=!1},ue=function(){this.range&&(this.value===""?this.range.value=this.boundaryValue:this.value&&(this.range.value=this.value))},j=function(r){this.dispatchEvent(new CustomEvent("slidervalidity",{bubbles:!0,detail:{invalid:r,slot:this.slot}}))},be=async function(r,o){let a=Number.parseInt(r);if(this.allowValuesOutsideRange&&!o&&this.step&&!(this.slot==="to"&&a>=Number(this.max)-1||this.slot==="from"&&a<=Number(this.min)+1)){let w=1/this.step;a=Math.round(a*w)/w,r=a.toString()}let n=Number.parseInt(this.max),s=Number.parseInt(this.min);if(!this.allowValuesOutsideRange&&(a>n||a<s))return g(this,c,j).call(this,J.t({id:"slider.error.out_of_bounds",message:"Value must be between {min} and {max}",values:{min:`${this.min} ${this.suffix}`.trim(),max:`${this.max} ${this.suffix}`.trim()}})),{shouldCancel:!0};if(r==="")return this.required&&g(this,c,j).call(this,J.t({id:"slider.error.required",message:"This field is required"})),{shouldCancel:!0};this.value=r;let i=r===this.max||r===this.min,d=!1;if(this.slot){let p=getComputedStyle(this),w=p.getPropertyValue("--to"),z=p.getPropertyValue("--from"),V=Number.parseInt(w),k=Number.parseInt(z),M=J.t({id:"slider.error.overlap",message:"The maximum value cannot be less than the minimum"});if(this.slot==="from"){let _=this.allowValuesOutsideRange&&V>n?V:Math.min(V,this.allowValuesOutsideRange?n-1:n);a>_&&(d=!0,this.allowValuesOutsideRange&&i?this.value=String(_):this.value=w,o&&(g(this,c,j).call(this,M),await this.updateComplete,this.textfield.value=r))}else{let _=this.allowValuesOutsideRange&&k<s?k:Math.max(Number.parseInt(z),this.allowValuesOutsideRange?s+1:s);a<_&&(d=!0,this.allowValuesOutsideRange&&i?this.value=String(_):this.value=z,o&&(g(this,c,j).call(this,M),await this.updateComplete,this.textfield.value=r))}}return d?{shouldCancel:!0}:(g(this,c,j).call(this,""),this.range.value=Math.min(Math.max(Number(r),Number(this.min)),Number(this.max)).toString(),this.value=this.allowValuesOutsideRange&&!o&&i?"":r,this.shadowRoot.querySelector("w-attention").handleDone(),{shouldCancel:!1})},pe=async function(r){let o=r.currentTarget.tagName==="W-TEXTFIELD";if(r instanceof CustomEvent)return;let a=r.currentTarget.value;return(await g(this,c,be).call(this,a,o)).shouldCancel?(r.preventDefault(),!1):!0},Ae=async function(r){if(r.key!=="ArrowLeft"&&r.key!=="ArrowRight")return;let o=Number(this.range.value),a=this.step||1,n;r.key==="ArrowLeft"?n=o-a:n=o+a,n=Math.min(Math.max(n,Number(this.min)),Number(this.max)),(await g(this,c,be).call(this,n.toString(),!1)).shouldCancel&&r.preventDefault()},Ie=function(r){r instanceof CustomEvent&&r.type==="focus"&&(this._inputHasFocus=!0)},je=function(r){r instanceof CustomEvent&&r.type==="blur"&&(this._inputHasFocus=!1)},b.shadowRootOptions={...De.shadowRootOptions,delegatesFocus:!0},b.styles=[_e,ze,Ce],m([S({attribute:"aria-label",reflect:!0})],b.prototype,"ariaLabel",2),m([S({attribute:"aria-description",reflect:!0})],b.prototype,"ariaDescription",2),m([S({reflect:!0})],b.prototype,"label",2),m([S({reflect:!0})],b.prototype,"name",2),m([S({reflect:!0})],b.prototype,"value",2),m([S({type:Boolean,reflect:!0})],b.prototype,"disabled",2),m([S({type:Boolean,reflect:!0})],b.prototype,"invalid",2),m([S({attribute:!1,reflect:!1})],b.prototype,"allowValuesOutsideRange",2),m([P()],b.prototype,"markers",2),m([P()],b.prototype,"required",2),m([P()],b.prototype,"step",2),m([P()],b.prototype,"min",2),m([P()],b.prototype,"max",2),m([P()],b.prototype,"suffix",2),m([P()],b.prototype,"formatter",2),m([Re('input[type="range"]')],b.prototype,"range",2),m([Re("w-textfield")],b.prototype,"textfield",2),m([P()],b.prototype,"_showTooltip",2),m([P()],b.prototype,"_inputHasFocus",2);customElements.get("w-slider-thumb")||customElements.define("w-slider-thumb",b);export{b as WarpSliderThumb};
2747
+ `}};Z=new WeakMap,c=new WeakSet,Q=function(){this._showTooltip=!0,this.shadowRoot.querySelector("w-attention").handleDone()},ee=function(){this._showTooltip=!1},be=function(){this.range&&(this.value===""?this.range.value=this.boundaryValue:this.value&&(this.range.value=this.value))},j=function(r){this.dispatchEvent(new CustomEvent("slidervalidity",{bubbles:!0,detail:{invalid:r,slot:this.slot}}))},re=async function(r,o){let a=Number.parseInt(r);if(this.allowValuesOutsideRange&&!o&&this.step&&!(this.slot==="to"&&a>=Number(this.max)-1||this.slot==="from"&&a<=Number(this.min)+1)){let k=1/this.step;a=Math.round(a*k)/k,r=a.toString()}let n=Number.parseInt(this.max),s=Number.parseInt(this.min);if(!this.allowValuesOutsideRange&&(a>n||a<s))return p(this,c,j).call(this,W.t({id:"slider.error.out_of_bounds",message:"Value must be between {min} and {max}",values:{min:`${this.min} ${this.suffix}`.trim(),max:`${this.max} ${this.suffix}`.trim()}})),{shouldCancel:!0};if(r==="")return this.required&&p(this,c,j).call(this,W.t({id:"slider.error.required",message:"This field is required"})),{shouldCancel:!0};this.value=r;let i=r===this.max||r===this.min,d=!1;if(this.slot){let g=this.parentElement.querySelector('w-slider-thumb[slot="to"]'),k=this.parentElement.querySelector('w-slider-thumb[slot="from"]'),z=g.textfield.value||this.max,F=k.textfield.value||this.min,y=Number.parseInt(z),E=Number.parseInt(F),M=W.t({id:"slider.error.overlap",message:"The maximum value cannot be less than the minimum"});if(this.slot==="from"){let v=this.allowValuesOutsideRange&&y>n?y:Math.min(y,this.allowValuesOutsideRange?n-1:n);a>v&&(d=!0,this.allowValuesOutsideRange&&i?this.value=String(v):this.value=z,o&&(p(this,c,j).call(this,M),await this.updateComplete,this.textfield.value=r))}else{let v=this.allowValuesOutsideRange&&E<s?E:Math.max(Number.parseInt(F),this.allowValuesOutsideRange?s+1:s);a<v&&(d=!0,this.allowValuesOutsideRange&&i?this.value=String(v):this.value=F,o&&(p(this,c,j).call(this,M),await this.updateComplete,this.textfield.value=r))}}return d?{shouldCancel:!0}:(p(this,c,j).call(this,""),this.range.value=Math.min(Math.max(Number(r),Number(this.min)),Number(this.max)).toString(),this.value=this.allowValuesOutsideRange&&!o&&i?"":r,this.shadowRoot.querySelector("w-attention").handleDone(),{shouldCancel:!1})},pe=async function(r){let o=r.currentTarget.tagName==="W-TEXTFIELD";if(r instanceof CustomEvent)return;let a=r.currentTarget.value;return(await p(this,c,re).call(this,a,o)).shouldCancel?(r.preventDefault(),!1):!0},Ae=async function(r){if(r.key!=="ArrowLeft"&&r.key!=="ArrowRight")return;let o=Number(this.range.value),a=this.step||1,n;r.key==="ArrowLeft"?n=o-a:n=o+a,n=Math.min(Math.max(n,Number(this.min)),Number(this.max)),(await p(this,c,re).call(this,n.toString(),!1)).shouldCancel&&r.preventDefault()},Ie=function(r){r instanceof CustomEvent&&r.type==="focus"&&(this._inputHasFocus=!0)},je=function(r){r instanceof CustomEvent&&r.type==="blur"&&(this._inputHasFocus=!1)},b.shadowRootOptions={...Le.shadowRootOptions,delegatesFocus:!0},b.styles=[_e,ze,Ce],m([P({attribute:"aria-label",reflect:!0})],b.prototype,"ariaLabel",2),m([P({attribute:"aria-description",reflect:!0})],b.prototype,"ariaDescription",2),m([P({reflect:!0})],b.prototype,"label",2),m([P({reflect:!0})],b.prototype,"name",2),m([P({reflect:!0})],b.prototype,"value",2),m([P({type:Boolean,reflect:!0})],b.prototype,"disabled",2),m([P({type:Boolean,reflect:!0})],b.prototype,"invalid",2),m([P({attribute:!1,reflect:!1})],b.prototype,"allowValuesOutsideRange",2),m([S()],b.prototype,"markers",2),m([S()],b.prototype,"required",2),m([S()],b.prototype,"step",2),m([S()],b.prototype,"min",2),m([S()],b.prototype,"max",2),m([S()],b.prototype,"suffix",2),m([S()],b.prototype,"formatter",2),m([De('input[type="range"]')],b.prototype,"range",2),m([De("w-textfield")],b.prototype,"textfield",2),m([S()],b.prototype,"_showTooltip",2),m([S()],b.prototype,"_inputHasFocus",2);customElements.get("w-slider-thumb")||customElements.define("w-slider-thumb",b);export{b as WarpSliderThumb};
2748
2748
  //# sourceMappingURL=slider-thumb.js.map