@warp-ds/elements 2.3.0-next.24 → 2.3.0-next.25

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.
Files changed (54) hide show
  1. package/dist/custom-elements.json +218 -8
  2. package/dist/index.d.ts +39 -0
  3. package/dist/packages/attention/index.js +20 -20
  4. package/dist/packages/attention/index.js.map +3 -3
  5. package/dist/packages/button/button.react.stories.d.ts +1 -1
  6. package/dist/packages/button/button.test.js +30 -1
  7. package/dist/packages/button/index.d.ts +2 -0
  8. package/dist/packages/button/index.js +12 -12
  9. package/dist/packages/button/index.js.map +3 -3
  10. package/dist/packages/combobox/combobox.react.stories.d.ts +1 -1
  11. package/dist/packages/combobox/combobox.stories.d.ts +1 -0
  12. package/dist/packages/combobox/combobox.stories.js +29 -3
  13. package/dist/packages/combobox/index.d.ts +7 -1
  14. package/dist/packages/combobox/index.js +19 -19
  15. package/dist/packages/combobox/index.js.map +4 -4
  16. package/dist/packages/datepicker/datepicker.d.ts +1 -0
  17. package/dist/packages/datepicker/datepicker.js +35 -35
  18. package/dist/packages/datepicker/datepicker.js.map +3 -3
  19. package/dist/packages/datepicker/datepicker.react.stories.d.ts +1 -1
  20. package/dist/packages/datepicker/datepicker.test.js +27 -0
  21. package/dist/packages/link/link.react.stories.d.ts +1 -1
  22. package/dist/packages/select/index.d.ts +1 -0
  23. package/dist/packages/select/index.js +15 -15
  24. package/dist/packages/select/index.js.map +3 -3
  25. package/dist/packages/select/select.react.stories.d.ts +1 -1
  26. package/dist/packages/select/select.test.js +30 -0
  27. package/dist/packages/slider/slider-thumb.d.ts +1 -0
  28. package/dist/packages/slider/slider-thumb.js +23 -23
  29. package/dist/packages/slider/slider-thumb.js.map +3 -3
  30. package/dist/packages/slider/slider.d.ts +1 -2
  31. package/dist/packages/slider/slider.js +20 -20
  32. package/dist/packages/slider/slider.js.map +4 -4
  33. package/dist/packages/slider/slider.stories.js +2 -2
  34. package/dist/packages/slider/slider.test.js +28 -0
  35. package/dist/packages/switch/index.d.ts +10 -2
  36. package/dist/packages/switch/index.js +5 -5
  37. package/dist/packages/switch/index.js.map +4 -4
  38. package/dist/packages/switch/switch.react.stories.js +4 -4
  39. package/dist/packages/switch/switch.stories.js +6 -5
  40. package/dist/packages/switch/switch.test.d.ts +1 -0
  41. package/dist/packages/switch/switch.test.js +40 -0
  42. package/dist/packages/textarea/textarea.d.ts +1 -0
  43. package/dist/packages/textarea/textarea.js +14 -14
  44. package/dist/packages/textarea/textarea.js.map +3 -3
  45. package/dist/packages/textarea/textarea.react.stories.d.ts +1 -1
  46. package/dist/packages/textarea/textarea.test.js +19 -0
  47. package/dist/packages/textfield/index.d.ts +3 -0
  48. package/dist/packages/textfield/index.js +8 -8
  49. package/dist/packages/textfield/index.js.map +3 -3
  50. package/dist/packages/textfield/textfield.react.stories.d.ts +1 -1
  51. package/dist/packages/textfield/textfield.stories.d.ts +1 -0
  52. package/dist/packages/textfield/textfield.stories.js +17 -0
  53. package/dist/web-types.json +7 -3
  54. package/package.json +1 -1
@@ -1,5 +1,4 @@
1
1
  import { LitElement, PropertyValues } from 'lit';
2
- declare const WarpSlider_base: import("@open-wc/form-control").Constructor<import("@open-wc/form-control").FormControlInterface> & typeof LitElement;
3
2
  /**
4
3
  * Parent component for sliders (both single and range sliders). Used in combination with a `<w-slider-thumb>`.
5
4
  *
@@ -11,7 +10,7 @@ declare const WarpSlider_base: import("@open-wc/form-control").Constructor<impor
11
10
  * @slot from - Range sliders need to place a `<w-slider-thumb>` in the from and to slots.
12
11
  * @slot to - Range sliders need to place a `<w-slider-thumb>` in the from and to slots.
13
12
  */
14
- declare class WarpSlider extends WarpSlider_base {
13
+ declare class WarpSlider extends LitElement {
15
14
  #private;
16
15
  static shadowRootOptions: {
17
16
  delegatesFocus: boolean;
@@ -1,13 +1,13 @@
1
- var Re=Object.create;var K=Object.defineProperty;var le=Object.getOwnPropertyDescriptor;var Ye=Object.getOwnPropertyNames;var $e=Object.getPrototypeOf,qe=Object.prototype.hasOwnProperty;var de=o=>{throw TypeError(o)};var ce=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports);var Ue=(o,e,r,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Ye(e))!qe.call(o,a)&&a!==r&&K(o,a,{get:()=>e[a],enumerable:!(t=le(e,a))||t.enumerable});return o};var Xe=(o,e,r)=>(r=o!=null?Re($e(o)):{},Ue(e||!o||!o.__esModule?K(r,"default",{value:o,enumerable:!0}):r,o));var f=(o,e,r,t)=>{for(var a=t>1?void 0:t?le(e,r):e,i=o.length-1,n;i>=0;i--)(n=o[i])&&(a=(t?n(e,r,a):n(a))||a);return t&&a&&K(e,r,a),a};var He=(o,e,r)=>e.has(o)||de("Cannot "+r);var he=(o,e,r)=>e.has(o)?de("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,r);var k=(o,e,r)=>(He(o,e,"access private method"),r);var be=ce(L=>{"use strict";Object.defineProperty(L,"__esModule",{value:!0});L.errorMessages=L.ErrorType=void 0;var I;(function(o){o.MalformedUnicode="MALFORMED_UNICODE",o.MalformedHexadecimal="MALFORMED_HEXADECIMAL",o.CodePointLimit="CODE_POINT_LIMIT",o.OctalDeprecation="OCTAL_DEPRECATION",o.EndOfString="END_OF_STRING"})(I=L.ErrorType||(L.ErrorType={}));L.errorMessages=new Map([[I.MalformedUnicode,"malformed Unicode character escape sequence"],[I.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[I.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[I.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[I.EndOfString,"malformed escape sequence at end of string"]])});var me=ce(E=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0});E.unraw=E.errorMessages=E.ErrorType=void 0;var w=be();Object.defineProperty(E,"ErrorType",{enumerable:!0,get:function(){return w.ErrorType}});Object.defineProperty(E,"errorMessages",{enumerable:!0,get:function(){return w.errorMessages}});function Ze(o){return!o.match(/[^a-f0-9]/i)?parseInt(o,16):NaN}function X(o,e,r){let t=Ze(o);if(Number.isNaN(t)||r!==void 0&&r!==o.length)throw new SyntaxError(w.errorMessages.get(e));return t}function Be(o){let e=X(o,w.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(e)}function ge(o,e){let r=X(o,w.ErrorType.MalformedUnicode,4);if(e!==void 0){let t=X(e,w.ErrorType.MalformedUnicode,4);return String.fromCharCode(r,t)}return String.fromCharCode(r)}function Ge(o){return o.charAt(0)==="{"&&o.charAt(o.length-1)==="}"}function Je(o){if(!Ge(o))throw new SyntaxError(w.errorMessages.get(w.ErrorType.MalformedUnicode));let e=o.slice(1,-1),r=X(e,w.ErrorType.MalformedUnicode);try{return String.fromCodePoint(r)}catch(t){throw t instanceof RangeError?new SyntaxError(w.errorMessages.get(w.ErrorType.CodePointLimit)):t}}function We(o,e=!1){if(e)throw new SyntaxError(w.errorMessages.get(w.ErrorType.OctalDeprecation));let r=parseInt(o,8);return String.fromCharCode(r)}var Ke=new Map([["b","\b"],["f","\f"],["n",`
2
- `],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function Qe(o){return Ke.get(o)||o}var er=/\\(?:(\\)|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 pe(o,e=!1){return o.replace(er,function(r,t,a,i,n,s,h,m,C){if(t!==void 0)return"\\";if(a!==void 0)return Be(a);if(i!==void 0)return Je(i);if(n!==void 0)return ge(n,s);if(h!==void 0)return ge(h);if(m==="0")return"\0";if(m!==void 0)return We(m,!e);if(C!==void 0)return Qe(C);throw new SyntaxError(w.errorMessages.get(w.ErrorType.EndOfString))})}E.unraw=pe;E.default=pe});var c=function(o,e,r,t){if(r==="a"&&!t)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?o!==e||!t:!e.has(o))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?t:r==="a"?t.call(o):t?t.value:e.get(o)},p=function(o,e,r,t,a){if(t==="m")throw new TypeError("Private method is not writable");if(t==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?o!==e||!a:!e.has(o))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t==="a"?a.call(o,r):a?a.value=r:e.set(o,r),r};function ue(o){var e,r,t,a,i,n,s,h,m,C,F,N,_,T,S,x,V,D,G;class De extends o{constructor(...l){var d,g,v;super(...l),e.add(this),this.internals=this.attachInternals(),r.set(this,!1),t.set(this,!1),a.set(this,!1),i.set(this,void 0),n.set(this,void 0),s.set(this,!0),m.set(this,""),C.set(this,()=>{p(this,a,!0,"f"),p(this,r,!0,"f"),c(this,e,"m",x).call(this)}),F.set(this,()=>{p(this,r,!1,"f"),c(this,e,"m",V).call(this,this.shouldFormValueUpdate()?c(this,m,"f"):""),!this.validity.valid&&c(this,a,"f")&&p(this,t,!0,"f");let z=c(this,e,"m",x).call(this);this.validationMessageCallback&&this.validationMessageCallback(z?this.internals.validationMessage:"")}),N.set(this,()=>{var z;c(this,s,"f")&&this.validationTarget&&(this.internals.setValidity(this.validity,this.validationMessage,this.validationTarget),p(this,s,!1,"f")),p(this,a,!0,"f"),p(this,t,!0,"f"),c(this,e,"m",x).call(this),(z=this===null||this===void 0?void 0:this.validationMessageCallback)===null||z===void 0||z.call(this,this.showError?this.internals.validationMessage:"")}),_.set(this,void 0),T.set(this,!1),S.set(this,Promise.resolve()),(d=this.addEventListener)===null||d===void 0||d.call(this,"focus",c(this,C,"f")),(g=this.addEventListener)===null||g===void 0||g.call(this,"blur",c(this,F,"f")),(v=this.addEventListener)===null||v===void 0||v.call(this,"invalid",c(this,N,"f")),this.setValue(null)}static get formAssociated(){return!0}static get validators(){return this.formControlValidators||[]}static get observedAttributes(){let l=this.validators.map(v=>v.attribute).flat(),d=super.observedAttributes||[];return[...new Set([...d,...l])]}static getValidator(l){return this.validators.find(d=>d.attribute===l)||null}static getValidators(l){return this.validators.filter(d=>{var g;if(d.attribute===l||!((g=d.attribute)===null||g===void 0)&&g.includes(l))return!0})}get form(){return this.internals.form}get showError(){return c(this,e,"m",x).call(this)}checkValidity(){return this.internals.checkValidity()}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}attributeChangedCallback(l,d,g){var v;(v=super.attributeChangedCallback)===null||v===void 0||v.call(this,l,d,g);let Y=this.constructor.getValidators(l);Y!=null&&Y.length&&this.validationTarget&&this.setValue(c(this,m,"f"))}setValue(l){var d;p(this,t,!1,"f"),(d=this.validationMessageCallback)===null||d===void 0||d.call(this,""),p(this,m,l,"f");let v=this.shouldFormValueUpdate()?l:null;this.internals.setFormValue(v),c(this,e,"m",V).call(this,v),this.valueChangedCallback&&this.valueChangedCallback(v),c(this,e,"m",x).call(this)}shouldFormValueUpdate(){return!0}get validationComplete(){return new Promise(l=>l(c(this,S,"f")))}formResetCallback(){var l,d;p(this,a,!1,"f"),p(this,t,!1,"f"),c(this,e,"m",x).call(this),(l=this.resetFormControl)===null||l===void 0||l.call(this),(d=this.validationMessageCallback)===null||d===void 0||d.call(this,c(this,e,"m",x).call(this)?this.validationMessage:"")}}return r=new WeakMap,t=new WeakMap,a=new WeakMap,i=new WeakMap,n=new WeakMap,s=new WeakMap,m=new WeakMap,C=new WeakMap,F=new WeakMap,N=new WeakMap,_=new WeakMap,T=new WeakMap,S=new WeakMap,e=new WeakSet,h=function(){let l=this.getRootNode(),d=`${this.localName}[name="${this.getAttribute("name")}"]`;return l.querySelectorAll(d)},x=function(){if(this.hasAttribute("disabled"))return!1;let l=c(this,t,"f")||c(this,a,"f")&&!this.validity.valid&&!c(this,r,"f");return l&&this.internals.states?this.internals.states.add("--show-error"):this.internals.states&&this.internals.states.delete("--show-error"),l},V=function(l){let d=this.constructor,g={},v=d.validators,z=[],Y=v.some(M=>M.isValid instanceof Promise);c(this,T,"f")||(p(this,S,new Promise(M=>{p(this,_,M,"f")}),"f"),p(this,T,!0,"f")),c(this,i,"f")&&(c(this,i,"f").abort(),p(this,n,c(this,i,"f"),"f"));let $=new AbortController;p(this,i,$,"f");let q,ne=!1;v.length&&(v.forEach(M=>{let J=M.key||"customError",A=M.isValid(this,l,$.signal);A instanceof Promise?(z.push(A),A.then(W=>{W!=null&&(g[J]=!W,q=c(this,e,"m",G).call(this,M,l),c(this,e,"m",D).call(this,g,q))})):(g[J]=!A,this.validity[J]!==!A&&(ne=!0),!A&&!q&&(q=c(this,e,"m",G).call(this,M,l)))}),Promise.allSettled(z).then(()=>{var M;$!=null&&$.signal.aborted||(p(this,T,!1,"f"),(M=c(this,_,"f"))===null||M===void 0||M.call(this))}),(ne||!Y)&&c(this,e,"m",D).call(this,g,q))},D=function(l,d){if(this.validationTarget)this.internals.setValidity(l,d,this.validationTarget),p(this,s,!1,"f");else{if(this.internals.setValidity(l,d),this.internals.validity.valid)return;p(this,s,!0,"f")}},G=function(l,d){if(this.validityCallback){let g=this.validityCallback(l.key||"customError");if(g)return g}return l.message instanceof Function?l.message(this,d):l.message},De}import{html as U,LitElement as Pe,nothing as B}from"lit";import{property as y,state as Ne}from"lit/decorators.js";var we=Xe(me(),1);var O=o=>typeof o=="string",rr=o=>typeof o=="function",ve=new Map,xe="en";function oe(o){return[...Array.isArray(o)?o:[o],xe]}function te(o,e,r){let t=oe(o);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 H(()=>Z("date",t,r),()=>new Intl.DateTimeFormat(t,a)).format(O(e)?new Date(e):e)}function or(o,e,r){let t;if(r||(r="default"),typeof r=="string")switch(t={second:"numeric",minute:"numeric",hour:"numeric"},r){case"full":case"long":t.timeZoneName="short";break;case"short":delete t.second}else t=r;return te(o,e,t)}function Q(o,e,r){let t=oe(o);return H(()=>Z("number",t,r),()=>new Intl.NumberFormat(t,r)).format(e)}function fe(o,e,r,{offset:t=0,...a}){var s,h;let i=oe(o),n=e?H(()=>Z("plural-ordinal",i),()=>new Intl.PluralRules(i,{type:"ordinal"})):H(()=>Z("plural-cardinal",i),()=>new Intl.PluralRules(i,{type:"cardinal"}));return(h=(s=a[r])!=null?s:a[n.select(r-t)])!=null?h:a.other}function H(o,e){let r=o(),t=ve.get(r);return t||(t=e(),ve.set(r,t)),t}function Z(o,e,r){let t=e.join("-");return`${o}-${t}-${JSON.stringify(r)}`}var ke=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,ye="%__lingui_octothorpe__%",tr=(o,e,r={})=>{let t=e||o,a=n=>typeof n=="object"?n:r[n],i=(n,s)=>{let h=Object.keys(r).length?a("number"):void 0,m=Q(t,n,h);return s.replace(new RegExp(ye,"g"),m)};return{plural:(n,s)=>{let{offset:h=0}=s,m=fe(t,!1,n,s);return i(n-h,m)},selectordinal:(n,s)=>{let{offset:h=0}=s,m=fe(t,!0,n,s);return i(n-h,m)},select:ar,number:(n,s)=>Q(t,n,a(s)||{style:s}),date:(n,s)=>te(t,n,a(s)||s),time:(n,s)=>or(t,n,a(s)||s)}},ar=(o,e)=>{var r;return(r=e[o])!=null?r:e.other};function ir(o,e,r){return(t={},a)=>{let i=tr(e,r,a),n=(h,m=!1)=>Array.isArray(h)?h.reduce((C,F)=>{if(F==="#"&&m)return C+ye;if(O(F))return C+F;let[N,_,T]=F,S={};_==="plural"||_==="selectordinal"||_==="select"?Object.entries(T).forEach(([V,D])=>{S[V]=n(D,_==="plural"||_==="selectordinal")}):S=T;let x;if(_){let V=i[_];x=V(t[N],S)}else x=t[N];return x==null?C:C+x},""):h,s=n(o);return O(s)&&ke.test(s)?(0,we.unraw)(s):O(s)?s:s?String(s):""}}var sr=Object.defineProperty,nr=(o,e,r)=>e in o?sr(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,lr=(o,e,r)=>(nr(o,typeof e!="symbol"?e+"":e,r),r),ee=class{constructor(){lr(this,"_events",{})}on(e,r){var a;var t;return(a=(t=this._events)[e])!=null||(t[e]=[]),this._events[e].push(r),()=>this.removeListener(e,r)}removeListener(e,r){let t=this._getListeners(e);if(!t)return;let a=t.indexOf(r);~a&&t.splice(a,1)}emit(e,...r){let t=this._getListeners(e);t&&t.map(a=>a.apply(this,r))}_getListeners(e){let r=this._events[e];return Array.isArray(r)?r:!1}},dr=Object.defineProperty,cr=(o,e,r)=>e in o?dr(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,P=(o,e,r)=>(cr(o,typeof e!="symbol"?e+"":e,r),r),re=class extends ee{constructor(e){var r;super(),P(this,"_locale",""),P(this,"_locales"),P(this,"_localeData",{}),P(this,"_messages",{}),P(this,"_missing"),P(this,"_messageCompiler"),P(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:xe,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 t=this._localeData[e];t?Object.assign(t,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(t=>this._loadLocaleData(t,e[t])),this.emit("change")}_load(e,r){let t=this._messages[e];t?Object.assign(t,r):this._messages[e]=r}load(e,r){typeof e=="string"&&typeof r=="object"?this._load(e,r):Object.entries(e).forEach(([t,a])=>this._load(t,a)),this.emit("change")}loadAndActivate({locale:e,locales:r,messages:t}){this._locale=e,this._locales=r||void 0,this._messages[this._locale]=t,this.emit("change")}activate(e,r){this._locale=e,this._locales=r,this.emit("change")}_(e,r,t){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=t==null?void 0:t.message;e||(e=""),O(e)||(r=e.values||r,a=e.message,e=e.id);let i=this.messages[e],n=i===void 0,s=this._missing;if(s&&n)return rr(s)?s(this._locale,e):s;n&&this.emit("missing",{id:e,locale:this._locale});let h=i||a||e;return O(h)&&(this._messageCompiler?h=this._messageCompiler(h):console.warn(`Uncompiled message detected! Message:
1
+ var ke=Object.create;var I=Object.defineProperty;var X=Object.getOwnPropertyDescriptor;var ye=Object.getOwnPropertyNames;var _e=Object.getPrototypeOf,ze=Object.prototype.hasOwnProperty;var U=o=>{throw TypeError(o)};var H=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports);var Me=(o,e,r,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of ye(e))!ze.call(o,a)&&a!==r&&I(o,a,{get:()=>e[a],enumerable:!(t=X(e,a))||t.enumerable});return o};var Ee=(o,e,r)=>(r=o!=null?ke(_e(o)):{},Me(e||!o||!o.__esModule?I(r,"default",{value:o,enumerable:!0}):r,o));var b=(o,e,r,t)=>{for(var a=t>1?void 0:t?X(e,r):e,i=o.length-1,n;i>=0;i--)(n=o[i])&&(a=(t?n(e,r,a):n(a))||a);return t&&a&&I(e,r,a),a};var Ce=(o,e,r)=>e.has(o)||U("Cannot "+r);var Z=(o,e,r)=>e.has(o)?U("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,r);var p=(o,e,r)=>(Ce(o,e,"access private method"),r);var B=H(x=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0});x.errorMessages=x.ErrorType=void 0;var y;(function(o){o.MalformedUnicode="MALFORMED_UNICODE",o.MalformedHexadecimal="MALFORMED_HEXADECIMAL",o.CodePointLimit="CODE_POINT_LIMIT",o.OctalDeprecation="OCTAL_DEPRECATION",o.EndOfString="END_OF_STRING"})(y=x.ErrorType||(x.ErrorType={}));x.errorMessages=new Map([[y.MalformedUnicode,"malformed Unicode character escape sequence"],[y.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[y.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[y.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[y.EndOfString,"malformed escape sequence at end of string"]])});var K=H(m=>{"use strict";Object.defineProperty(m,"__esModule",{value:!0});m.unraw=m.errorMessages=m.ErrorType=void 0;var g=B();Object.defineProperty(m,"ErrorType",{enumerable:!0,get:function(){return g.ErrorType}});Object.defineProperty(m,"errorMessages",{enumerable:!0,get:function(){return g.errorMessages}});function Oe(o){return!o.match(/[^a-f0-9]/i)?parseInt(o,16):NaN}function C(o,e,r){let t=Oe(o);if(Number.isNaN(t)||r!==void 0&&r!==o.length)throw new SyntaxError(g.errorMessages.get(e));return t}function Te(o){let e=C(o,g.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(e)}function J(o,e){let r=C(o,g.ErrorType.MalformedUnicode,4);if(e!==void 0){let t=C(e,g.ErrorType.MalformedUnicode,4);return String.fromCharCode(r,t)}return String.fromCharCode(r)}function Se(o){return o.charAt(0)==="{"&&o.charAt(o.length-1)==="}"}function Le(o){if(!Se(o))throw new SyntaxError(g.errorMessages.get(g.ErrorType.MalformedUnicode));let e=o.slice(1,-1),r=C(e,g.ErrorType.MalformedUnicode);try{return String.fromCodePoint(r)}catch(t){throw t instanceof RangeError?new SyntaxError(g.errorMessages.get(g.ErrorType.CodePointLimit)):t}}function Ne(o,e=!1){if(e)throw new SyntaxError(g.errorMessages.get(g.ErrorType.OctalDeprecation));let r=parseInt(o,8);return String.fromCharCode(r)}var Ie=new Map([["b","\b"],["f","\f"],["n",`
2
+ `],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function De(o){return Ie.get(o)||o}var je=/\\(?:(\\)|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 G(o,e=!1){return o.replace(je,function(r,t,a,i,n,s,l,h,f){if(t!==void 0)return"\\";if(a!==void 0)return Te(a);if(i!==void 0)return Le(i);if(n!==void 0)return J(n,s);if(l!==void 0)return J(l);if(h==="0")return"\0";if(h!==void 0)return Ne(h,!e);if(f!==void 0)return De(f);throw new SyntaxError(g.errorMessages.get(g.ErrorType.EndOfString))})}m.unraw=G;m.default=G});import{html as z,LitElement as he,nothing as S}from"lit";import{property as u,state as me}from"lit/decorators.js";var ee=Ee(K(),1);var v=o=>typeof o=="string",Pe=o=>typeof o=="function",Q=new Map,re="en";function Y(o){return[...Array.isArray(o)?o:[o],re]}function A(o,e,r){let t=Y(o);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 O(()=>T("date",t,r),()=>new Intl.DateTimeFormat(t,a)).format(v(e)?new Date(e):e)}function Ye(o,e,r){let t;if(r||(r="default"),typeof r=="string")switch(t={second:"numeric",minute:"numeric",hour:"numeric"},r){case"full":case"long":t.timeZoneName="short";break;case"short":delete t.second}else t=r;return A(o,e,t)}function D(o,e,r){let t=Y(o);return O(()=>T("number",t,r),()=>new Intl.NumberFormat(t,r)).format(e)}function W(o,e,r,{offset:t=0,...a}){var s,l;let i=Y(o),n=e?O(()=>T("plural-ordinal",i),()=>new Intl.PluralRules(i,{type:"ordinal"})):O(()=>T("plural-cardinal",i),()=>new Intl.PluralRules(i,{type:"cardinal"}));return(l=(s=a[r])!=null?s:a[n.select(r-t)])!=null?l:a.other}function O(o,e){let r=o(),t=Q.get(r);return t||(t=e(),Q.set(r,t)),t}function T(o,e,r){let t=e.join("-");return`${o}-${t}-${JSON.stringify(r)}`}var oe=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,te="%__lingui_octothorpe__%",Ae=(o,e,r={})=>{let t=e||o,a=n=>typeof n=="object"?n:r[n],i=(n,s)=>{let l=Object.keys(r).length?a("number"):void 0,h=D(t,n,l);return s.replace(new RegExp(te,"g"),h)};return{plural:(n,s)=>{let{offset:l=0}=s,h=W(t,!1,n,s);return i(n-l,h)},selectordinal:(n,s)=>{let{offset:l=0}=s,h=W(t,!0,n,s);return i(n-l,h)},select:Re,number:(n,s)=>D(t,n,a(s)||{style:s}),date:(n,s)=>A(t,n,a(s)||s),time:(n,s)=>Ye(t,n,a(s)||s)}},Re=(o,e)=>{var r;return(r=e[o])!=null?r:e.other};function $e(o,e,r){return(t={},a)=>{let i=Ae(e,r,a),n=(l,h=!1)=>Array.isArray(l)?l.reduce((f,M)=>{if(M==="#"&&h)return f+te;if(v(M))return f+M;let[q,w,V]=M,L={};w==="plural"||w==="selectordinal"||w==="select"?Object.entries(V).forEach(([N,xe])=>{L[N]=n(xe,w==="plural"||w==="selectordinal")}):L=V;let E;if(w){let N=i[w];E=N(t[q],L)}else E=t[q];return E==null?f:f+E},""):l,s=n(o);return v(s)&&oe.test(s)?(0,ee.unraw)(s):v(s)?s:s?String(s):""}}var Fe=Object.defineProperty,qe=(o,e,r)=>e in o?Fe(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,Ve=(o,e,r)=>(qe(o,typeof e!="symbol"?e+"":e,r),r),j=class{constructor(){Ve(this,"_events",{})}on(e,r){var a;var t;return(a=(t=this._events)[e])!=null||(t[e]=[]),this._events[e].push(r),()=>this.removeListener(e,r)}removeListener(e,r){let t=this._getListeners(e);if(!t)return;let a=t.indexOf(r);~a&&t.splice(a,1)}emit(e,...r){let t=this._getListeners(e);t&&t.map(a=>a.apply(this,r))}_getListeners(e){let r=this._events[e];return Array.isArray(r)?r:!1}},Xe=Object.defineProperty,Ue=(o,e,r)=>e in o?Xe(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,k=(o,e,r)=>(Ue(o,typeof e!="symbol"?e+"":e,r),r),P=class extends j{constructor(e){var r;super(),k(this,"_locale",""),k(this,"_locales"),k(this,"_localeData",{}),k(this,"_messages",{}),k(this,"_missing"),k(this,"_messageCompiler"),k(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:re,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 t=this._localeData[e];t?Object.assign(t,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(t=>this._loadLocaleData(t,e[t])),this.emit("change")}_load(e,r){let t=this._messages[e];t?Object.assign(t,r):this._messages[e]=r}load(e,r){typeof e=="string"&&typeof r=="object"?this._load(e,r):Object.entries(e).forEach(([t,a])=>this._load(t,a)),this.emit("change")}loadAndActivate({locale:e,locales:r,messages:t}){this._locale=e,this._locales=r||void 0,this._messages[this._locale]=t,this.emit("change")}activate(e,r){this._locale=e,this._locales=r,this.emit("change")}_(e,r,t){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=t==null?void 0:t.message;e||(e=""),v(e)||(r=e.values||r,a=e.message,e=e.id);let i=this.messages[e],n=i===void 0,s=this._missing;if(s&&n)return Pe(s)?s(this._locale,e):s;n&&this.emit("missing",{id:e,locale:this._locale});let l=i||a||e;return v(l)&&(this._messageCompiler?l=this._messageCompiler(l):console.warn(`Uncompiled message detected! Message:
3
3
 
4
- > ${h}
4
+ > ${l}
5
5
 
6
6
  That means you use raw catalog or your catalog doesn't have a translation for the message and fallback was used.
7
7
  ICU features such as interpolation and plurals will not work properly for that message.
8
8
 
9
9
  Please compile your catalog first.
10
- `)),O(h)&&ke.test(h)?JSON.parse(`"${h}"`):O(h)?h:ir(h,this._locale,this._locales)(r,t==null?void 0:t.formats)}date(e,r){return te(this._locales||this._locale,e,r)}number(e,r){return Q(this._locales||this._locale,e,r)}};function hr(o={}){return new re(o)}var ae=hr();var ur=["en","nb","fi","da","sv"],Me="en",_e=o=>ur.find(e=>o===e||o.toLowerCase().includes(e))||Me;function br(){if(typeof window=="undefined"){let o=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return _e(o)}try{let o=document.documentElement.lang;return _e(o)}catch(o){return console.warn("could not detect locale, falling back to source locale",o),Me}}var gr=(o,e,r,t,a,i)=>o==="nb"?r:o==="fi"?t:o==="da"?a:o==="sv"?i:e,Ce=(o,e,r,t,a)=>{let i=br(),n=gr(i,o,e,r,t,a);ae.load(i,n),ae.activate(i)};var ze=JSON.parse('{"slider.error.overlap":["Maksimumv\xE6rdien m\xE5 ikke v\xE6re mindre end minimumv\xE6rdien"],"slider.error.required":["Dette felt er p\xE5kr\xE6vet"],"slider.error.out_of_bounds":["V\xE6rdien skal v\xE6re mellem ",["min"]," og ",["max"]]}');var Ee=JSON.parse('{"slider.error.overlap":["The maximum value cannot be less than the minimum"],"slider.error.required":["This field is required"],"slider.error.out_of_bounds":["Value must be between ",["min"]," and ",["max"]]}');var Fe=JSON.parse('{"slider.error.overlap":["Maksimiarvo ei voi olla pienempi kuin minimiarvo"],"slider.error.required":["T\xE4m\xE4 kentt\xE4 on pakollinen"],"slider.error.out_of_bounds":["Arvon on oltava v\xE4lill\xE4 ",["min"]," - ",["max"]]}');var Te=JSON.parse('{"slider.error.overlap":["Maksimumsverdien kan ikke v\xE6re mindre enn minimumsverdien"],"slider.error.required":["Dette feltet er p\xE5krevd"],"slider.error.out_of_bounds":["Verdien m\xE5 v\xE6re mellom ",["min"]," og ",["max"]]}');var Se=JSON.parse('{"slider.error.overlap":["Maxv\xE4rdet kan inte vara mindre \xE4n minimiv\xE4rdet"],"slider.error.required":["Detta f\xE4lt \xE4r obligatoriskt"],"slider.error.out_of_bounds":["V\xE4rdet m\xE5ste vara mellan ",["min"]," och ",["max"]]}');import{css as Oe}from"lit";var Ve=Oe`
10
+ `)),v(l)&&oe.test(l)?JSON.parse(`"${l}"`):v(l)?l:$e(l,this._locale,this._locales)(r,t==null?void 0:t.formats)}date(e,r){return A(this._locales||this._locale,e,r)}number(e,r){return D(this._locales||this._locale,e,r)}};function He(o={}){return new P(o)}var R=He();var Ze=["en","nb","fi","da","sv"],ie="en",ae=o=>Ze.find(e=>o===e||o.toLowerCase().includes(e))||ie;function Be(){if(typeof window=="undefined"){let o=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return ae(o)}try{let o=document.documentElement.lang;return ae(o)}catch(o){return console.warn("could not detect locale, falling back to source locale",o),ie}}var Je=(o,e,r,t,a,i)=>o==="nb"?r:o==="fi"?t:o==="da"?a:o==="sv"?i:e,ne=(o,e,r,t,a)=>{let i=Be(),n=Je(i,o,e,r,t,a);R.load(i,n),R.activate(i)};var se=JSON.parse('{"slider.error.overlap":["Maksimumv\xE6rdien m\xE5 ikke v\xE6re mindre end minimumv\xE6rdien"],"slider.error.required":["Dette felt er p\xE5kr\xE6vet"],"slider.error.out_of_bounds":["V\xE6rdien skal v\xE6re mellem ",["min"]," og ",["max"]]}');var le=JSON.parse('{"slider.error.overlap":["The maximum value cannot be less than the minimum"],"slider.error.required":["This field is required"],"slider.error.out_of_bounds":["Value must be between ",["min"]," and ",["max"]]}');var de=JSON.parse('{"slider.error.overlap":["Maksimiarvo ei voi olla pienempi kuin minimiarvo"],"slider.error.required":["T\xE4m\xE4 kentt\xE4 on pakollinen"],"slider.error.out_of_bounds":["Arvon on oltava v\xE4lill\xE4 ",["min"]," - ",["max"]]}');var ce=JSON.parse('{"slider.error.overlap":["Maksimumsverdien kan ikke v\xE6re mindre enn minimumsverdien"],"slider.error.required":["Dette feltet er p\xE5krevd"],"slider.error.out_of_bounds":["Verdien m\xE5 v\xE6re mellom ",["min"]," og ",["max"]]}');var be=JSON.parse('{"slider.error.overlap":["Maxv\xE4rdet kan inte vara mindre \xE4n minimiv\xE4rdet"],"slider.error.required":["Detta f\xE4lt \xE4r obligatoriskt"],"slider.error.out_of_bounds":["V\xE4rdet m\xE5ste vara mellan ",["min"]," och ",["max"]]}');import{css as ge}from"lit";var pe=ge`
11
11
  *,
12
12
  :before,
13
13
  :after {
@@ -280,7 +280,7 @@ Please compile your catalog first.
280
280
  svg {
281
281
  pointer-events: none;
282
282
  }
283
- `,Or=Oe`*, :before, :after {
283
+ `,cr=ge`*, :before, :after {
284
284
  --w-rotate: 0;
285
285
  --w-rotate-x: 0;
286
286
  --w-rotate-y: 0;
@@ -2446,7 +2446,7 @@ Please compile your catalog first.
2446
2446
  display: none
2447
2447
  }
2448
2448
  }
2449
- `;import{css as pr}from"lit";var Le=pr`
2449
+ `;import{css as Ge}from"lit";var ue=Ge`
2450
2450
  .w-slider {
2451
2451
  position: relative;
2452
2452
  border: none;
@@ -2625,41 +2625,41 @@ Please compile your catalog first.
2625
2625
  bottom: 0;
2626
2626
  grid-area: slider;
2627
2627
  }
2628
- `;var b,j,Ae,Ie,je,ie,se,u=class extends ue(Pe){constructor(){super();he(this,b);this.disabled=!1;this.allowValuesOutsideRange=!1;this.error="";this.helpText="";this.invalid=!1;this.required=!1;this.suffix="";this._invalidMessage="";this._hasInternalError=!1;Ce(Ee,Te,Fe,ze,Se)}get edgeMin(){return this.allowValuesOutsideRange?(Number(this.min)-1).toString():this.min}get edgeMax(){return this.allowValuesOutsideRange?(Number(this.max)+1).toString():this.max}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.step&&this.style.setProperty("--step",String(this.step)),this.style.setProperty("--min",this.edgeMin),this.style.setProperty("--max",this.max),this.markers&&this.style.setProperty("--markers",String(this.markers)),k(this,b,j).call(this)}updated(r){(r.has("disabled")||r.has("invalid")||r.has("required")||r.has("min")||r.has("step")||r.has("max")||r.has("suffix")||r.has("formatter")||r.has("_invalidMessage")||r.has("_hasInternalError"))&&k(this,b,j).call(this)}get componentHasError(){return this.invalid||this._hasInternalError}get errorText(){return this.componentHasError?this.error||this._invalidMessage:""}render(){return U`
2628
+ `;var c,_,ve,fe,we,$,F,d=class extends he{constructor(){super();Z(this,c);this.disabled=!1;this.allowValuesOutsideRange=!1;this.error="";this.helpText="";this.invalid=!1;this.required=!1;this.suffix="";this._invalidMessage="";this._hasInternalError=!1;ne(le,ce,de,se,be)}get edgeMin(){return this.allowValuesOutsideRange?(Number(this.min)-1).toString():this.min}get edgeMax(){return this.allowValuesOutsideRange?(Number(this.max)+1).toString():this.max}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.step&&this.style.setProperty("--step",String(this.step)),this.style.setProperty("--min",this.edgeMin),this.style.setProperty("--max",this.max),this.markers&&this.style.setProperty("--markers",String(this.markers)),p(this,c,_).call(this)}updated(r){(r.has("disabled")||r.has("invalid")||r.has("required")||r.has("min")||r.has("step")||r.has("max")||r.has("suffix")||r.has("formatter")||r.has("_invalidMessage")||r.has("_hasInternalError"))&&p(this,c,_).call(this)}get componentHasError(){return this.invalid||this._hasInternalError}get errorText(){return this.componentHasError?this.error||this._invalidMessage:""}render(){return z`
2629
2629
  <fieldset
2630
2630
  id="fieldset"
2631
2631
  class="w-slider"
2632
- @input="${k(this,b,Ae)}"
2633
- @slidervalidity="${k(this,b,je)}"
2634
- aria-invalid="${this.errorText?"true":B}"
2632
+ @input="${p(this,c,ve)}"
2633
+ @slidervalidity="${p(this,c,we)}"
2634
+ aria-invalid="${this.errorText?"true":S}"
2635
2635
  >
2636
- ${this.label?U`<legend class="w-slider__label">
2636
+ ${this.label?z`<legend class="w-slider__label">
2637
2637
  <slot id="label" name="label">${this.label}</slot>
2638
- </legend>`:B}
2638
+ </legend>`:S}
2639
2639
  <slot class="w-slider__description" name="description"></slot>
2640
- ${this.markers?U`<div class="w-slider__markers"></div>`:B}
2640
+ ${this.markers?z`<div class="w-slider__markers"></div>`:S}
2641
2641
  <div class="w-slider__range">
2642
2642
  <div class="w-slider__active-range"></div>
2643
2643
  </div>
2644
2644
  <slot
2645
2645
  class="w-slider__slider"
2646
- @slotchange=${k(this,b,j)}
2646
+ @slotchange=${p(this,c,_)}
2647
2647
  ></slot>
2648
2648
  <slot
2649
2649
  class="w-slider__slider"
2650
2650
  name="from"
2651
- @slotchange=${k(this,b,j)}
2651
+ @slotchange=${p(this,c,_)}
2652
2652
  ></slot>
2653
2653
  <slot
2654
2654
  class="w-slider__slider"
2655
2655
  name="to"
2656
- @slotchange=${k(this,b,j)}
2656
+ @slotchange=${p(this,c,_)}
2657
2657
  ></slot>
2658
- ${this.errorText?U`<p class="w-slider__error" aria-describes="fieldset">
2658
+ ${this.errorText?z`<p class="w-slider__error" aria-describes="fieldset">
2659
2659
  ${this.errorText}
2660
- </p>`:this.helpText?U`<p class="w-slider__help-text" aria-describes="fieldset">
2660
+ </p>`:this.helpText?z`<p class="w-slider__help-text" aria-describes="fieldset">
2661
2661
  ${this.helpText}
2662
- </p>`:B}
2662
+ </p>`:S}
2663
2663
  </fieldset>
2664
- `}};b=new WeakSet,j=function(){let r=this.querySelectorAll("w-slider-thumb"),t=!1;for(let i of r.values())i.min=this.edgeMin,i.max=this.edgeMax,i.step=this.step,i.suffix=this.suffix,i.required=this.required,i.formatter=this.formatter,i.allowValuesOutsideRange=this.allowValuesOutsideRange,i.ariaLabel||(i.slot||(i.ariaLabel=this.label),i.slot==="from"&&(i.ariaLabel=`${this.label} min`),i.slot==="to"&&(i.ariaLabel=`${this.label} max`)),(i.slot==="from"||i.slot==="to")&&(t=!0),i.disabled=this.disabled,i.invalid=this.invalid||this._hasInternalError,k(this,b,se).call(this,i);let a=this.shadowRoot.querySelector("fieldset");t?(a.style.setProperty("--active-range-inline-start-padding","var(--w-slider-thumb-size)"),a.style.setProperty("--active-range-inline-end-padding","var(--w-slider-thumb-size)")):a.style.setProperty("--active-range-border-radius","4px")},Ae=function(r){let t=r.target;k(this,b,se).call(this,t),t.slot&&k(this,b,Ie).call(this)},Ie=function(){let r,t,a=this.querySelectorAll("w-slider-thumb");for(let i of a.values())i.slot==="from"&&(r=i),i.slot==="to"&&(t=i);!r||!t||!r.invalid&&t.invalid},je=function(r){r.stopPropagation(),this._hasInternalError=!!r.detail.invalid,this._invalidMessage=r.detail.invalid},ie=function(r,t){return(t.value===void 0||t.value===null)&&(t.value=this.allowValuesOutsideRange?"":r),t.value===""?r:t.value},se=function(r){let t=r.slot;t||this.style.setProperty("--from","0"),t==="from"&&this.style.setProperty("--from",k(this,b,ie).call(this,this.edgeMin,r)),(!t||t==="to")&&this.style.setProperty("--to",k(this,b,ie).call(this,this.edgeMax,r))},u.shadowRootOptions={...Pe.shadowRootOptions,delegatesFocus:!0},u.styles=[Ve,Le],f([y({reflect:!0})],u.prototype,"label",2),f([y({type:Boolean,reflect:!0})],u.prototype,"disabled",2),f([y({type:Boolean,attribute:"allow-values-outside-range"})],u.prototype,"allowValuesOutsideRange",2),f([y({type:String,reflect:!0})],u.prototype,"error",2),f([y({type:String,reflect:!0,attribute:"help-text"})],u.prototype,"helpText",2),f([y({type:Boolean,reflect:!0})],u.prototype,"invalid",2),f([y({type:Boolean,reflect:!0})],u.prototype,"required",2),f([y({reflect:!0})],u.prototype,"min",2),f([y({reflect:!0})],u.prototype,"max",2),f([y({type:Number,reflect:!0})],u.prototype,"markers",2),f([y({type:Number,reflect:!0})],u.prototype,"step",2),f([y({reflect:!0})],u.prototype,"suffix",2),f([y({attribute:!1})],u.prototype,"formatter",2),f([Ne()],u.prototype,"_invalidMessage",2),f([Ne()],u.prototype,"_hasInternalError",2);customElements.get("w-slider")||customElements.define("w-slider",u);export{u as WarpSlider};
2664
+ `}};c=new WeakSet,_=function(){let r=this.querySelectorAll("w-slider-thumb"),t=!1;for(let i of r.values())i.min=this.edgeMin,i.max=this.edgeMax,i.step=this.step,i.suffix=this.suffix,i.required=this.required,i.formatter=this.formatter,i.allowValuesOutsideRange=this.allowValuesOutsideRange,i.ariaLabel||(i.slot||(i.ariaLabel=this.label),i.slot==="from"&&(i.ariaLabel=`${this.label} min`),i.slot==="to"&&(i.ariaLabel=`${this.label} max`)),(i.slot==="from"||i.slot==="to")&&(t=!0),i.disabled=this.disabled,i.invalid=this.invalid||this._hasInternalError,p(this,c,F).call(this,i);let a=this.shadowRoot.querySelector("fieldset");t?(a.style.setProperty("--active-range-inline-start-padding","var(--w-slider-thumb-size)"),a.style.setProperty("--active-range-inline-end-padding","var(--w-slider-thumb-size)")):a.style.setProperty("--active-range-border-radius","4px")},ve=function(r){let t=r.target;p(this,c,F).call(this,t),t.slot&&p(this,c,fe).call(this)},fe=function(){let r,t,a=this.querySelectorAll("w-slider-thumb");for(let i of a.values())i.slot==="from"&&(r=i),i.slot==="to"&&(t=i);!r||!t||!r.invalid&&t.invalid},we=function(r){r.stopPropagation(),this._hasInternalError=!!r.detail.invalid,this._invalidMessage=r.detail.invalid},$=function(r,t){return(t.value===void 0||t.value===null)&&(t.value=this.allowValuesOutsideRange?"":r),t.value===""?r:t.value},F=function(r){let t=r.slot;t||this.style.setProperty("--from","0"),t==="from"&&this.style.setProperty("--from",p(this,c,$).call(this,this.edgeMin,r)),(!t||t==="to")&&this.style.setProperty("--to",p(this,c,$).call(this,this.edgeMax,r))},d.shadowRootOptions={...he.shadowRootOptions,delegatesFocus:!0},d.styles=[pe,ue],b([u({reflect:!0})],d.prototype,"label",2),b([u({type:Boolean,reflect:!0})],d.prototype,"disabled",2),b([u({type:Boolean,attribute:"allow-values-outside-range"})],d.prototype,"allowValuesOutsideRange",2),b([u({type:String,reflect:!0})],d.prototype,"error",2),b([u({type:String,reflect:!0,attribute:"help-text"})],d.prototype,"helpText",2),b([u({type:Boolean,reflect:!0})],d.prototype,"invalid",2),b([u({type:Boolean,reflect:!0})],d.prototype,"required",2),b([u({reflect:!0})],d.prototype,"min",2),b([u({reflect:!0})],d.prototype,"max",2),b([u({type:Number,reflect:!0})],d.prototype,"markers",2),b([u({type:Number,reflect:!0})],d.prototype,"step",2),b([u({reflect:!0})],d.prototype,"suffix",2),b([u({attribute:!1})],d.prototype,"formatter",2),b([me()],d.prototype,"_invalidMessage",2),b([me()],d.prototype,"_hasInternalError",2);customElements.get("w-slider")||customElements.define("w-slider",d);export{d as WarpSlider};
2665
2665
  //# sourceMappingURL=slider.js.map