@warp-ds/elements 2.8.0-next.3 → 2.8.0-next.5

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 (30) hide show
  1. package/dist/custom-elements.json +63 -9
  2. package/dist/index.d.ts +26 -0
  3. package/dist/packages/combobox/combobox.a11y.test.d.ts +2 -0
  4. package/dist/packages/combobox/combobox.a11y.test.js +53 -0
  5. package/dist/packages/combobox/combobox.js +10 -8
  6. package/dist/packages/combobox/combobox.js.map +3 -3
  7. package/dist/packages/combobox/combobox.react.stories.d.ts +1 -1
  8. package/dist/packages/combobox/combobox.test.js +22 -0
  9. package/dist/packages/combobox/locales/da/messages.mjs +1 -1
  10. package/dist/packages/combobox/locales/en/messages.mjs +1 -1
  11. package/dist/packages/combobox/locales/fi/messages.mjs +1 -1
  12. package/dist/packages/combobox/locales/nb/messages.mjs +1 -1
  13. package/dist/packages/combobox/locales/sv/messages.mjs +1 -1
  14. package/dist/packages/tab/tab.d.ts +9 -1
  15. package/dist/packages/tab/tab.js +10 -13
  16. package/dist/packages/tab/tab.js.map +3 -3
  17. package/dist/packages/tab-panel/tab-panel.d.ts +0 -2
  18. package/dist/packages/tab-panel/tab-panel.js +1 -1
  19. package/dist/packages/tab-panel/tab-panel.js.map +2 -2
  20. package/dist/packages/tabs/tabs.a11y.test.d.ts +3 -0
  21. package/dist/packages/tabs/tabs.a11y.test.js +179 -0
  22. package/dist/packages/tabs/tabs.d.ts +1 -0
  23. package/dist/packages/tabs/tabs.js +6 -6
  24. package/dist/packages/tabs/tabs.js.map +4 -4
  25. package/dist/packages/tabs/tabs.stories.js +1 -1
  26. package/dist/packages/tabs/tabs.test.d.ts +3 -0
  27. package/dist/packages/tabs/tabs.test.js +77 -0
  28. package/dist/packages/textfield/textfield.react.stories.d.ts +1 -1
  29. package/dist/web-types.json +10 -6
  30. package/package.json +1 -1
@@ -2557,6 +2557,12 @@
2557
2557
  "type": {
2558
2558
  "text": "string"
2559
2559
  }
2560
+ },
2561
+ {
2562
+ "name": "isOpen",
2563
+ "type": {
2564
+ "text": "boolean"
2565
+ }
2560
2566
  }
2561
2567
  ],
2562
2568
  "description": "Get ARIA text for screen readers"
@@ -7206,6 +7212,16 @@
7206
7212
  "description": "Individual tab component used within w-tabs container.\n\n[See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/tabs--docs)",
7207
7213
  "name": "WarpTab",
7208
7214
  "members": [
7215
+ {
7216
+ "kind": "field",
7217
+ "name": "id",
7218
+ "type": {
7219
+ "text": "string"
7220
+ },
7221
+ "default": "''",
7222
+ "attribute": "id",
7223
+ "reflects": true
7224
+ },
7209
7225
  {
7210
7226
  "kind": "field",
7211
7227
  "name": "for",
@@ -7216,13 +7232,31 @@
7216
7232
  "attribute": "for",
7217
7233
  "reflects": true
7218
7234
  },
7235
+ {
7236
+ "kind": "field",
7237
+ "name": "ariaSelected",
7238
+ "type": {
7239
+ "text": "'true' | 'false'"
7240
+ },
7241
+ "attribute": "aria-selected",
7242
+ "reflects": true
7243
+ },
7244
+ {
7245
+ "kind": "field",
7246
+ "name": "tabIndex",
7247
+ "type": {
7248
+ "text": "number"
7249
+ },
7250
+ "attribute": "tabindex",
7251
+ "reflects": true
7252
+ },
7219
7253
  {
7220
7254
  "kind": "field",
7221
7255
  "name": "active",
7222
7256
  "type": {
7223
7257
  "text": "boolean"
7224
7258
  },
7225
- "default": "false",
7259
+ "deprecated": "Use `aria-selected=\"true\"` instead",
7226
7260
  "attribute": "active",
7227
7261
  "reflects": true
7228
7262
  },
@@ -7250,6 +7284,14 @@
7250
7284
  }
7251
7285
  ],
7252
7286
  "attributes": [
7287
+ {
7288
+ "name": "id",
7289
+ "type": {
7290
+ "text": "string"
7291
+ },
7292
+ "default": "''",
7293
+ "fieldName": "id"
7294
+ },
7253
7295
  {
7254
7296
  "name": "for",
7255
7297
  "type": {
@@ -7258,12 +7300,26 @@
7258
7300
  "default": "''",
7259
7301
  "fieldName": "for"
7260
7302
  },
7303
+ {
7304
+ "name": "aria-selected",
7305
+ "type": {
7306
+ "text": "'true' | 'false'"
7307
+ },
7308
+ "fieldName": "ariaSelected"
7309
+ },
7310
+ {
7311
+ "name": "tabindex",
7312
+ "type": {
7313
+ "text": "number"
7314
+ },
7315
+ "fieldName": "tabIndex"
7316
+ },
7261
7317
  {
7262
7318
  "name": "active",
7263
7319
  "type": {
7264
7320
  "text": "boolean"
7265
7321
  },
7266
- "default": "false",
7322
+ "deprecated": "Use `aria-selected=\"true\"` instead",
7267
7323
  "fieldName": "active"
7268
7324
  },
7269
7325
  {
@@ -7322,11 +7378,6 @@
7322
7378
  "default": "true",
7323
7379
  "attribute": "hidden",
7324
7380
  "reflects": true
7325
- },
7326
- {
7327
- "kind": "method",
7328
- "name": "_syncA11yAttributes",
7329
- "privacy": "private"
7330
7381
  }
7331
7382
  ],
7332
7383
  "attributes": [
@@ -7383,7 +7434,6 @@
7383
7434
  "type": {
7384
7435
  "text": "string"
7385
7436
  },
7386
- "default": "''",
7387
7437
  "attribute": "active",
7388
7438
  "reflects": true
7389
7439
  },
@@ -7403,6 +7453,11 @@
7403
7453
  },
7404
7454
  "privacy": "private"
7405
7455
  },
7456
+ {
7457
+ "kind": "field",
7458
+ "name": "_uniqueId",
7459
+ "privacy": "private"
7460
+ },
7406
7461
  {
7407
7462
  "kind": "field",
7408
7463
  "name": "_activeTabFor",
@@ -7497,7 +7552,6 @@
7497
7552
  "type": {
7498
7553
  "text": "string"
7499
7554
  },
7500
- "default": "''",
7501
7555
  "fieldName": "active"
7502
7556
  }
7503
7557
  ],
package/dist/index.d.ts CHANGED
@@ -1628,18 +1628,38 @@ export type WarpSwitchSolidJsProps = {
1628
1628
  };
1629
1629
 
1630
1630
  export type WarpTabProps = {
1631
+ /** */
1632
+ id?: WarpTab["id"];
1631
1633
  /** */
1632
1634
  for?: WarpTab["for"];
1633
1635
  /** */
1636
+ "aria-selected"?: WarpTab["ariaSelected"];
1637
+ /** */
1638
+ ariaSelected?: WarpTab["ariaSelected"];
1639
+ /** */
1640
+ tabindex?: WarpTab["tabIndex"];
1641
+ /** */
1642
+ tabIndex?: WarpTab["tabIndex"];
1643
+ /** @deprecated Use `aria-selected="true"` instead */
1634
1644
  active?: WarpTab["active"];
1635
1645
  /** */
1636
1646
  over?: WarpTab["over"];
1637
1647
  };
1638
1648
 
1639
1649
  export type WarpTabSolidJsProps = {
1650
+ /** */
1651
+ "prop:id"?: WarpTab["id"];
1640
1652
  /** */
1641
1653
  "prop:for"?: WarpTab["for"];
1642
1654
  /** */
1655
+ "attr:aria-selected"?: WarpTab["ariaSelected"];
1656
+ /** */
1657
+ "prop:ariaSelected"?: WarpTab["ariaSelected"];
1658
+ /** */
1659
+ "attr:tabindex"?: WarpTab["tabIndex"];
1660
+ /** */
1661
+ "prop:tabIndex"?: WarpTab["tabIndex"];
1662
+ /** @deprecated Use `aria-selected="true"` instead */
1643
1663
  "prop:active"?: WarpTab["active"];
1644
1664
  /** */
1645
1665
  "prop:over"?: WarpTab["over"];
@@ -2645,7 +2665,10 @@ export type CustomElements = {
2645
2665
  *
2646
2666
  * Component attributes and properties that can be applied to the element or by using JavaScript.
2647
2667
  *
2668
+ * - `id`: undefined
2648
2669
  * - `for`: undefined
2670
+ * - `aria-selected`/`ariaSelected`: undefined
2671
+ * - `tabindex`/`tabIndex`: undefined
2649
2672
  * - `active`: undefined
2650
2673
  * - `over`: undefined
2651
2674
  */
@@ -3696,7 +3719,10 @@ export type CustomElementsSolidJs = {
3696
3719
  *
3697
3720
  * Component attributes and properties that can be applied to the element or by using JavaScript.
3698
3721
  *
3722
+ * - `id`: undefined
3699
3723
  * - `for`: undefined
3724
+ * - `aria-selected`/`ariaSelected`: undefined
3725
+ * - `tabindex`/`tabIndex`: undefined
3700
3726
  * - `active`: undefined
3701
3727
  * - `over`: undefined
3702
3728
  */
@@ -0,0 +1,2 @@
1
+ import '../textfield/textfield.js';
2
+ import './combobox.js';
@@ -0,0 +1,53 @@
1
+ import { html } from 'lit';
2
+ import { describe, expect, test } from 'vitest';
3
+ import { render } from 'vitest-browser-lit';
4
+ import '../textfield/textfield.js';
5
+ import './combobox.js';
6
+ describe('w-combobox accessibility (WCAG 2.2)', () => {
7
+ describe('axe-core automated checks', () => {
8
+ const sampleOptions = [
9
+ { value: 'apple', label: 'Apple' },
10
+ { value: 'banana', label: 'Banana' },
11
+ { value: 'orange', label: 'Orange' },
12
+ ];
13
+ test('default state has no violations', async () => {
14
+ const page = render(html `<w-combobox label="Select a fruit" .options="${sampleOptions}"></w-combobox>`);
15
+ await expect(page).toHaveNoAxeViolations();
16
+ });
17
+ test('with help text has no violations', async () => {
18
+ const page = render(html `
19
+ <w-combobox
20
+ label="Select a fruit"
21
+ help-text="Start typing to filter options"
22
+ .options="${sampleOptions}"></w-combobox>
23
+ `);
24
+ await expect(page).toHaveNoAxeViolations();
25
+ });
26
+ test('invalid state has no violations', async () => {
27
+ const page = render(html `
28
+ <w-combobox
29
+ label="Select a fruit"
30
+ invalid
31
+ help-text="Please select a valid option"
32
+ .options="${sampleOptions}"></w-combobox>
33
+ `);
34
+ await expect(page).toHaveNoAxeViolations();
35
+ });
36
+ test('disabled state has no violations', async () => {
37
+ const page = render(html `<w-combobox label="Select a fruit" disabled .options="${sampleOptions}"></w-combobox>`);
38
+ await expect(page).toHaveNoAxeViolations();
39
+ });
40
+ test('required state has no violations', async () => {
41
+ const page = render(html `<w-combobox label="Select a fruit" required .options="${sampleOptions}"></w-combobox>`);
42
+ await expect(page).toHaveNoAxeViolations();
43
+ });
44
+ test('optional state has no violations', async () => {
45
+ const page = render(html `<w-combobox label="Select a fruit" optional .options="${sampleOptions}"></w-combobox>`);
46
+ await expect(page).toHaveNoAxeViolations();
47
+ });
48
+ test('open on focus state has no violations', async () => {
49
+ const page = render(html `<w-combobox label="Select a fruit" open-on-focus .options="${sampleOptions}"></w-combobox>`);
50
+ await expect(page).toHaveNoAxeViolations();
51
+ });
52
+ });
53
+ });
@@ -1,5 +1,5 @@
1
- var je=Object.create;var Q=Object.defineProperty;var le=Object.getOwnPropertyDescriptor;var Ue=Object.getOwnPropertyNames;var Ye=Object.getPrototypeOf,Be=Object.prototype.hasOwnProperty;var ce=o=>{throw TypeError(o)};var de=(o,r)=>()=>(r||o((r={exports:{}}).exports,r),r.exports);var qe=(o,r,e,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of Ue(r))!Be.call(o,a)&&a!==e&&Q(o,a,{get:()=>r[a],enumerable:!(t=le(r,a))||t.enumerable});return o};var He=(o,r,e)=>(e=o!=null?je(Ye(o)):{},qe(r||!o||!o.__esModule?Q(e,"default",{value:o,enumerable:!0}):e,o));var p=(o,r,e,t)=>{for(var a=t>1?void 0:t?le(r,e):r,i=o.length-1,s;i>=0;i--)(s=o[i])&&(a=(t?s(r,e,a):s(a))||a);return t&&a&&Q(r,e,a),a};var ue=(o,r,e)=>r.has(o)||ce("Cannot "+e);var he=(o,r,e)=>(ue(o,r,"read from private field"),e?e.call(o):r.get(o)),pe=(o,r,e)=>r.has(o)?ce("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(o):r.set(o,e),be=(o,r,e,t)=>(ue(o,r,"write to private field"),t?t.call(o,e):r.set(o,e),e);var ge=de(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.errorMessages=V.ErrorType=void 0;var D;(function(o){o.MalformedUnicode="MALFORMED_UNICODE",o.MalformedHexadecimal="MALFORMED_HEXADECIMAL",o.CodePointLimit="CODE_POINT_LIMIT",o.OctalDeprecation="OCTAL_DEPRECATION",o.EndOfString="END_OF_STRING"})(D=V.ErrorType||(V.ErrorType={}));V.errorMessages=new Map([[D.MalformedUnicode,"malformed Unicode character escape sequence"],[D.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[D.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[D.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[D.EndOfString,"malformed escape sequence at end of string"]])});var fe=de(M=>{"use strict";Object.defineProperty(M,"__esModule",{value:!0});M.unraw=M.errorMessages=M.ErrorType=void 0;var f=ge();Object.defineProperty(M,"ErrorType",{enumerable:!0,get:function(){return f.ErrorType}});Object.defineProperty(M,"errorMessages",{enumerable:!0,get:function(){return f.errorMessages}});function Xe(o){return!o.match(/[^a-f0-9]/i)?parseInt(o,16):NaN}function H(o,r,e){let t=Xe(o);if(Number.isNaN(t)||e!==void 0&&e!==o.length)throw new SyntaxError(f.errorMessages.get(r));return t}function Ze(o){let r=H(o,f.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(r)}function ve(o,r){let e=H(o,f.ErrorType.MalformedUnicode,4);if(r!==void 0){let t=H(r,f.ErrorType.MalformedUnicode,4);return String.fromCharCode(e,t)}return String.fromCharCode(e)}function Ke(o){return o.charAt(0)==="{"&&o.charAt(o.length-1)==="}"}function Ge(o){if(!Ke(o))throw new SyntaxError(f.errorMessages.get(f.ErrorType.MalformedUnicode));let r=o.slice(1,-1),e=H(r,f.ErrorType.MalformedUnicode);try{return String.fromCodePoint(e)}catch(t){throw t instanceof RangeError?new SyntaxError(f.errorMessages.get(f.ErrorType.CodePointLimit)):t}}function Je(o,r=!1){if(r)throw new SyntaxError(f.errorMessages.get(f.ErrorType.OctalDeprecation));let e=parseInt(o,8);return String.fromCharCode(e)}var We=new Map([["b","\b"],["f","\f"],["n",`
2
- `],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function Qe(o){return We.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 me(o,r=!1){return o.replace(er,function(e,t,a,i,s,n,c,v,O){if(t!==void 0)return"\\";if(a!==void 0)return Ze(a);if(i!==void 0)return Ge(i);if(s!==void 0)return ve(s,n);if(c!==void 0)return ve(c);if(v==="0")return"\0";if(v!==void 0)return Je(v,!r);if(O!==void 0)return Qe(O);throw new SyntaxError(f.errorMessages.get(f.ErrorType.EndOfString))})}M.unraw=me;M.default=me});var Y=function(){for(var o=[],r=arguments.length;r--;)o[r]=arguments[r];return o.reduce(function(e,t){return e.concat(typeof t=="string"?t:Array.isArray(t)?Y.apply(void 0,t):typeof t=="object"&&t?Object.keys(t).map(function(a){return t[a]?a:""}):"")},[]).join(" ")};var ke=He(fe(),1);var S=o=>typeof o=="string",rr=o=>typeof o=="function",we=new Map,ye="en";function oe(o){return[...Array.isArray(o)?o:[o],ye]}function ae(o,r,e){let t=oe(o);e||(e="default");let a;if(typeof e=="string")switch(a={day:"numeric",month:"short",year:"numeric"},e){case"full":a.weekday="long";case"long":a.month="long";break;case"short":a.month="numeric";break}else a=e;return X(()=>Z("date",t,e),()=>new Intl.DateTimeFormat(t,a)).format(S(r)?new Date(r):r)}function tr(o,r,e){let t;if(e||(e="default"),typeof e=="string")switch(t={second:"numeric",minute:"numeric",hour:"numeric"},e){case"full":case"long":t.timeZoneName="short";break;case"short":delete t.second}else t=e;return ae(o,r,t)}function ee(o,r,e){let t=oe(o);return X(()=>Z("number",t,e),()=>new Intl.NumberFormat(t,e)).format(r)}function xe(o,r,e,{offset:t=0,...a}){var n,c;let i=oe(o),s=r?X(()=>Z("plural-ordinal",i),()=>new Intl.PluralRules(i,{type:"ordinal"})):X(()=>Z("plural-cardinal",i),()=>new Intl.PluralRules(i,{type:"cardinal"}));return(c=(n=a[e])!=null?n:a[s.select(e-t)])!=null?c:a.other}function X(o,r){let e=o(),t=we.get(e);return t||(t=r(),we.set(e,t)),t}function Z(o,r,e){let t=r.join("-");return`${o}-${t}-${JSON.stringify(e)}`}var _e=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,Oe="%__lingui_octothorpe__%",or=(o,r,e={})=>{let t=r||o,a=s=>typeof s=="object"?s:e[s],i=(s,n)=>{let c=Object.keys(e).length?a("number"):void 0,v=ee(t,s,c);return n.replace(new RegExp(Oe,"g"),v)};return{plural:(s,n)=>{let{offset:c=0}=n,v=xe(t,!1,s,n);return i(s-c,v)},selectordinal:(s,n)=>{let{offset:c=0}=n,v=xe(t,!0,s,n);return i(s-c,v)},select:ar,number:(s,n)=>ee(t,s,a(n)||{style:n}),date:(s,n)=>ae(t,s,a(n)||n),time:(s,n)=>tr(t,s,a(n)||n)}},ar=(o,r)=>{var e;return(e=r[o])!=null?e:r.other};function ir(o,r,e){return(t={},a)=>{let i=or(r,e,a),s=(c,v=!1)=>Array.isArray(c)?c.reduce((O,E)=>{if(E==="#"&&v)return O+Oe;if(S(E))return O+E;let[T,k,z]=E,F={};k==="plural"||k==="selectordinal"||k==="select"?Object.entries(z).forEach(([L,N])=>{F[L]=s(N,k==="plural"||k==="selectordinal")}):F=z;let x;if(k){let L=i[k];x=L(t[T],F)}else x=t[T];return x==null?O:O+x},""):c,n=s(o);return S(n)&&_e.test(n)?(0,ke.unraw)(n):S(n)?n:n?String(n):""}}var nr=Object.defineProperty,sr=(o,r,e)=>r in o?nr(o,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[r]=e,lr=(o,r,e)=>(sr(o,typeof r!="symbol"?r+"":r,e),e),re=class{constructor(){lr(this,"_events",{})}on(r,e){var a;var t;return(a=(t=this._events)[r])!=null||(t[r]=[]),this._events[r].push(e),()=>this.removeListener(r,e)}removeListener(r,e){let t=this._getListeners(r);if(!t)return;let a=t.indexOf(e);~a&&t.splice(a,1)}emit(r,...e){let t=this._getListeners(r);t&&t.map(a=>a.apply(this,e))}_getListeners(r){let e=this._events[r];return Array.isArray(e)?e:!1}},cr=Object.defineProperty,dr=(o,r,e)=>r in o?cr(o,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[r]=e,I=(o,r,e)=>(dr(o,typeof r!="symbol"?r+"":r,e),e),te=class extends re{constructor(r){var e;super(),I(this,"_locale",""),I(this,"_locales"),I(this,"_localeData",{}),I(this,"_messages",{}),I(this,"_missing"),I(this,"_messageCompiler"),I(this,"t",this._.bind(this)),r.missing!=null&&(this._missing=r.missing),r.messages!=null&&this.load(r.messages),r.localeData!=null&&this.loadLocaleData(r.localeData),(typeof r.locale=="string"||r.locales)&&this.activate((e=r.locale)!=null?e:ye,r.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){var r;return(r=this._messages[this._locale])!=null?r:{}}get localeData(){var r;return(r=this._localeData[this._locale])!=null?r:{}}_loadLocaleData(r,e){let t=this._localeData[r];t?Object.assign(t,e):this._localeData[r]=e}setMessagesCompiler(r){return this._messageCompiler=r,this}loadLocaleData(r,e){typeof r=="string"?this._loadLocaleData(r,e):Object.keys(r).forEach(t=>this._loadLocaleData(t,r[t])),this.emit("change")}_load(r,e){let t=this._messages[r];t?Object.assign(t,e):this._messages[r]=e}load(r,e){typeof r=="string"&&typeof e=="object"?this._load(r,e):Object.entries(r).forEach(([t,a])=>this._load(t,a)),this.emit("change")}loadAndActivate({locale:r,locales:e,messages:t}){this._locale=r,this._locales=e||void 0,this._messages[this._locale]=t,this.emit("change")}activate(r,e){this._locale=r,this._locales=e,this.emit("change")}_(r,e,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;r||(r=""),S(r)||(e=r.values||e,a=r.message,r=r.id);let i=this.messages[r],s=i===void 0,n=this._missing;if(n&&s)return rr(n)?n(this._locale,r):n;s&&this.emit("missing",{id:r,locale:this._locale});let c=i||a||r;return S(c)&&(this._messageCompiler?c=this._messageCompiler(c):console.warn(`Uncompiled message detected! Message:
1
+ var je=Object.create;var Q=Object.defineProperty;var le=Object.getOwnPropertyDescriptor;var Ue=Object.getOwnPropertyNames;var Ye=Object.getPrototypeOf,Be=Object.prototype.hasOwnProperty;var ce=o=>{throw TypeError(o)};var de=(o,r)=>()=>(r||o((r={exports:{}}).exports,r),r.exports);var qe=(o,r,e,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of Ue(r))!Be.call(o,a)&&a!==e&&Q(o,a,{get:()=>r[a],enumerable:!(t=le(r,a))||t.enumerable});return o};var He=(o,r,e)=>(e=o!=null?je(Ye(o)):{},qe(r||!o||!o.__esModule?Q(e,"default",{value:o,enumerable:!0}):e,o));var p=(o,r,e,t)=>{for(var a=t>1?void 0:t?le(r,e):r,i=o.length-1,s;i>=0;i--)(s=o[i])&&(a=(t?s(r,e,a):s(a))||a);return t&&a&&Q(r,e,a),a};var ue=(o,r,e)=>r.has(o)||ce("Cannot "+e);var he=(o,r,e)=>(ue(o,r,"read from private field"),e?e.call(o):r.get(o)),pe=(o,r,e)=>r.has(o)?ce("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(o):r.set(o,e),ge=(o,r,e,t)=>(ue(o,r,"write to private field"),t?t.call(o,e):r.set(o,e),e);var be=de(L=>{"use strict";Object.defineProperty(L,"__esModule",{value:!0});L.errorMessages=L.ErrorType=void 0;var D;(function(o){o.MalformedUnicode="MALFORMED_UNICODE",o.MalformedHexadecimal="MALFORMED_HEXADECIMAL",o.CodePointLimit="CODE_POINT_LIMIT",o.OctalDeprecation="OCTAL_DEPRECATION",o.EndOfString="END_OF_STRING"})(D=L.ErrorType||(L.ErrorType={}));L.errorMessages=new Map([[D.MalformedUnicode,"malformed Unicode character escape sequence"],[D.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[D.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[D.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[D.EndOfString,"malformed escape sequence at end of string"]])});var fe=de(M=>{"use strict";Object.defineProperty(M,"__esModule",{value:!0});M.unraw=M.errorMessages=M.ErrorType=void 0;var f=be();Object.defineProperty(M,"ErrorType",{enumerable:!0,get:function(){return f.ErrorType}});Object.defineProperty(M,"errorMessages",{enumerable:!0,get:function(){return f.errorMessages}});function Xe(o){return!o.match(/[^a-f0-9]/i)?parseInt(o,16):NaN}function H(o,r,e){let t=Xe(o);if(Number.isNaN(t)||e!==void 0&&e!==o.length)throw new SyntaxError(f.errorMessages.get(r));return t}function Ze(o){let r=H(o,f.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(r)}function ve(o,r){let e=H(o,f.ErrorType.MalformedUnicode,4);if(r!==void 0){let t=H(r,f.ErrorType.MalformedUnicode,4);return String.fromCharCode(e,t)}return String.fromCharCode(e)}function Ke(o){return o.charAt(0)==="{"&&o.charAt(o.length-1)==="}"}function Ge(o){if(!Ke(o))throw new SyntaxError(f.errorMessages.get(f.ErrorType.MalformedUnicode));let r=o.slice(1,-1),e=H(r,f.ErrorType.MalformedUnicode);try{return String.fromCodePoint(e)}catch(t){throw t instanceof RangeError?new SyntaxError(f.errorMessages.get(f.ErrorType.CodePointLimit)):t}}function Je(o,r=!1){if(r)throw new SyntaxError(f.errorMessages.get(f.ErrorType.OctalDeprecation));let e=parseInt(o,8);return String.fromCharCode(e)}var We=new Map([["b","\b"],["f","\f"],["n",`
2
+ `],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function Qe(o){return We.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 me(o,r=!1){return o.replace(er,function(e,t,a,i,s,n,c,v,O){if(t!==void 0)return"\\";if(a!==void 0)return Ze(a);if(i!==void 0)return Ge(i);if(s!==void 0)return ve(s,n);if(c!==void 0)return ve(c);if(v==="0")return"\0";if(v!==void 0)return Je(v,!r);if(O!==void 0)return Qe(O);throw new SyntaxError(f.errorMessages.get(f.ErrorType.EndOfString))})}M.unraw=me;M.default=me});var Y=function(){for(var o=[],r=arguments.length;r--;)o[r]=arguments[r];return o.reduce(function(e,t){return e.concat(typeof t=="string"?t:Array.isArray(t)?Y.apply(void 0,t):typeof t=="object"&&t?Object.keys(t).map(function(a){return t[a]?a:""}):"")},[]).join(" ")};var ke=He(fe(),1);var F=o=>typeof o=="string",rr=o=>typeof o=="function",we=new Map,ye="en";function oe(o){return[...Array.isArray(o)?o:[o],ye]}function ae(o,r,e){let t=oe(o);e||(e="default");let a;if(typeof e=="string")switch(a={day:"numeric",month:"short",year:"numeric"},e){case"full":a.weekday="long";case"long":a.month="long";break;case"short":a.month="numeric";break}else a=e;return X(()=>Z("date",t,e),()=>new Intl.DateTimeFormat(t,a)).format(F(r)?new Date(r):r)}function tr(o,r,e){let t;if(e||(e="default"),typeof e=="string")switch(t={second:"numeric",minute:"numeric",hour:"numeric"},e){case"full":case"long":t.timeZoneName="short";break;case"short":delete t.second}else t=e;return ae(o,r,t)}function ee(o,r,e){let t=oe(o);return X(()=>Z("number",t,e),()=>new Intl.NumberFormat(t,e)).format(r)}function xe(o,r,e,{offset:t=0,...a}){var n,c;let i=oe(o),s=r?X(()=>Z("plural-ordinal",i),()=>new Intl.PluralRules(i,{type:"ordinal"})):X(()=>Z("plural-cardinal",i),()=>new Intl.PluralRules(i,{type:"cardinal"}));return(c=(n=a[e])!=null?n:a[s.select(e-t)])!=null?c:a.other}function X(o,r){let e=o(),t=we.get(e);return t||(t=r(),we.set(e,t)),t}function Z(o,r,e){let t=r.join("-");return`${o}-${t}-${JSON.stringify(e)}`}var _e=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,Oe="%__lingui_octothorpe__%",or=(o,r,e={})=>{let t=r||o,a=s=>typeof s=="object"?s:e[s],i=(s,n)=>{let c=Object.keys(e).length?a("number"):void 0,v=ee(t,s,c);return n.replace(new RegExp(Oe,"g"),v)};return{plural:(s,n)=>{let{offset:c=0}=n,v=xe(t,!1,s,n);return i(s-c,v)},selectordinal:(s,n)=>{let{offset:c=0}=n,v=xe(t,!0,s,n);return i(s-c,v)},select:ar,number:(s,n)=>ee(t,s,a(n)||{style:n}),date:(s,n)=>ae(t,s,a(n)||n),time:(s,n)=>tr(t,s,a(n)||n)}},ar=(o,r)=>{var e;return(e=r[o])!=null?e:r.other};function ir(o,r,e){return(t={},a)=>{let i=or(r,e,a),s=(c,v=!1)=>Array.isArray(c)?c.reduce((O,E)=>{if(E==="#"&&v)return O+Oe;if(F(E))return O+E;let[T,k,z]=E,S={};k==="plural"||k==="selectordinal"||k==="select"?Object.entries(z).forEach(([I,N])=>{S[I]=s(N,k==="plural"||k==="selectordinal")}):S=z;let x;if(k){let I=i[k];x=I(t[T],S)}else x=t[T];return x==null?O:O+x},""):c,n=s(o);return F(n)&&_e.test(n)?(0,ke.unraw)(n):F(n)?n:n?String(n):""}}var nr=Object.defineProperty,sr=(o,r,e)=>r in o?nr(o,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[r]=e,lr=(o,r,e)=>(sr(o,typeof r!="symbol"?r+"":r,e),e),re=class{constructor(){lr(this,"_events",{})}on(r,e){var a;var t;return(a=(t=this._events)[r])!=null||(t[r]=[]),this._events[r].push(e),()=>this.removeListener(r,e)}removeListener(r,e){let t=this._getListeners(r);if(!t)return;let a=t.indexOf(e);~a&&t.splice(a,1)}emit(r,...e){let t=this._getListeners(r);t&&t.map(a=>a.apply(this,e))}_getListeners(r){let e=this._events[r];return Array.isArray(e)?e:!1}},cr=Object.defineProperty,dr=(o,r,e)=>r in o?cr(o,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[r]=e,V=(o,r,e)=>(dr(o,typeof r!="symbol"?r+"":r,e),e),te=class extends re{constructor(r){var e;super(),V(this,"_locale",""),V(this,"_locales"),V(this,"_localeData",{}),V(this,"_messages",{}),V(this,"_missing"),V(this,"_messageCompiler"),V(this,"t",this._.bind(this)),r.missing!=null&&(this._missing=r.missing),r.messages!=null&&this.load(r.messages),r.localeData!=null&&this.loadLocaleData(r.localeData),(typeof r.locale=="string"||r.locales)&&this.activate((e=r.locale)!=null?e:ye,r.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){var r;return(r=this._messages[this._locale])!=null?r:{}}get localeData(){var r;return(r=this._localeData[this._locale])!=null?r:{}}_loadLocaleData(r,e){let t=this._localeData[r];t?Object.assign(t,e):this._localeData[r]=e}setMessagesCompiler(r){return this._messageCompiler=r,this}loadLocaleData(r,e){typeof r=="string"?this._loadLocaleData(r,e):Object.keys(r).forEach(t=>this._loadLocaleData(t,r[t])),this.emit("change")}_load(r,e){let t=this._messages[r];t?Object.assign(t,e):this._messages[r]=e}load(r,e){typeof r=="string"&&typeof e=="object"?this._load(r,e):Object.entries(r).forEach(([t,a])=>this._load(t,a)),this.emit("change")}loadAndActivate({locale:r,locales:e,messages:t}){this._locale=r,this._locales=e||void 0,this._messages[this._locale]=t,this.emit("change")}activate(r,e){this._locale=r,this._locales=e,this.emit("change")}_(r,e,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;r||(r=""),F(r)||(e=r.values||e,a=r.message,r=r.id);let i=this.messages[r],s=i===void 0,n=this._missing;if(n&&s)return rr(n)?n(this._locale,r):n;s&&this.emit("missing",{id:r,locale:this._locale});let c=i||a||r;return F(c)&&(this._messageCompiler?c=this._messageCompiler(c):console.warn(`Uncompiled message detected! Message:
3
3
 
4
4
  > ${c}
5
5
 
@@ -7,7 +7,7 @@ That means you use raw catalog or your catalog doesn't have a translation for th
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
- `)),S(c)&&_e.test(c)?JSON.parse(`"${c}"`):S(c)?c:ir(c,this._locale,this._locales)(e,t==null?void 0:t.formats)}date(r,e){return ae(this._locales||this._locale,r,e)}number(r,e){return ee(this._locales||this._locale,r,e)}};function ur(o={}){return new te(o)}var _=ur();var u=function(o,r,e,t){if(e==="a"&&!t)throw new TypeError("Private accessor was defined without a getter");if(typeof r=="function"?o!==r||!t:!r.has(o))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?t:e==="a"?t.call(o):t?t.value:r.get(o)},g=function(o,r,e,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 r=="function"?o!==r||!a:!r.has(o))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t==="a"?a.call(o,e):a?a.value=e:r.set(o,e),e};function Ce(o){var r,e,t,a,i,s,n,c,v,O,E,T,k,z,F,x,L,N,G;class Pe extends o{constructor(...l){var d,b,m;super(...l),r.add(this),this.internals=this.attachInternals(),e.set(this,!1),t.set(this,!1),a.set(this,!1),i.set(this,void 0),s.set(this,void 0),n.set(this,!0),v.set(this,""),O.set(this,()=>{g(this,a,!0,"f"),g(this,e,!0,"f"),u(this,r,"m",x).call(this)}),E.set(this,()=>{g(this,e,!1,"f"),u(this,r,"m",L).call(this,this.shouldFormValueUpdate()?u(this,v,"f"):""),!this.validity.valid&&u(this,a,"f")&&g(this,t,!0,"f");let C=u(this,r,"m",x).call(this);this.validationMessageCallback&&this.validationMessageCallback(C?this.internals.validationMessage:"")}),T.set(this,()=>{var C;u(this,n,"f")&&this.validationTarget&&(this.internals.setValidity(this.validity,this.validationMessage,this.validationTarget),g(this,n,!1,"f")),g(this,a,!0,"f"),g(this,t,!0,"f"),u(this,r,"m",x).call(this),(C=this===null||this===void 0?void 0:this.validationMessageCallback)===null||C===void 0||C.call(this,this.showError?this.internals.validationMessage:"")}),k.set(this,void 0),z.set(this,!1),F.set(this,Promise.resolve()),(d=this.addEventListener)===null||d===void 0||d.call(this,"focus",u(this,O,"f")),(b=this.addEventListener)===null||b===void 0||b.call(this,"blur",u(this,E,"f")),(m=this.addEventListener)===null||m===void 0||m.call(this,"invalid",u(this,T,"f")),this.setValue(null)}static get formAssociated(){return!0}static get validators(){return this.formControlValidators||[]}static get observedAttributes(){let l=this.validators.map(m=>m.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 b;if(d.attribute===l||!((b=d.attribute)===null||b===void 0)&&b.includes(l))return!0})}get form(){return this.internals.form}get showError(){return u(this,r,"m",x).call(this)}checkValidity(){return this.internals.checkValidity()}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}attributeChangedCallback(l,d,b){var m;(m=super.attributeChangedCallback)===null||m===void 0||m.call(this,l,d,b);let P=this.constructor.getValidators(l);P!=null&&P.length&&this.validationTarget&&this.setValue(u(this,v,"f"))}setValue(l){var d;g(this,t,!1,"f"),(d=this.validationMessageCallback)===null||d===void 0||d.call(this,""),g(this,v,l,"f");let m=this.shouldFormValueUpdate()?l:null;this.internals.setFormValue(m),u(this,r,"m",L).call(this,m),this.valueChangedCallback&&this.valueChangedCallback(m),u(this,r,"m",x).call(this)}shouldFormValueUpdate(){return!0}get validationComplete(){return new Promise(l=>l(u(this,F,"f")))}formResetCallback(){var l,d;g(this,a,!1,"f"),g(this,t,!1,"f"),u(this,r,"m",x).call(this),(l=this.resetFormControl)===null||l===void 0||l.call(this),(d=this.validationMessageCallback)===null||d===void 0||d.call(this,u(this,r,"m",x).call(this)?this.validationMessage:"")}}return e=new WeakMap,t=new WeakMap,a=new WeakMap,i=new WeakMap,s=new WeakMap,n=new WeakMap,v=new WeakMap,O=new WeakMap,E=new WeakMap,T=new WeakMap,k=new WeakMap,z=new WeakMap,F=new WeakMap,r=new WeakSet,c=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=u(this,t,"f")||u(this,a,"f")&&!this.validity.valid&&!u(this,e,"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 d=this.constructor,b={},m=d.validators,C=[],P=m.some(y=>y.isValid instanceof Promise);u(this,z,"f")||(g(this,F,new Promise(y=>{g(this,k,y,"f")}),"f"),g(this,z,!0,"f")),u(this,i,"f")&&(u(this,i,"f").abort(),g(this,s,u(this,i,"f"),"f"));let j=new AbortController;g(this,i,j,"f");let U,se=!1;m.length&&(m.forEach(y=>{let J=y.key||"customError",$=y.isValid(this,l,j.signal);$ instanceof Promise?(C.push($),$.then(W=>{W!=null&&(b[J]=!W,U=u(this,r,"m",G).call(this,y,l),u(this,r,"m",N).call(this,b,U))})):(b[J]=!$,this.validity[J]!==!$&&(se=!0),!$&&!U&&(U=u(this,r,"m",G).call(this,y,l)))}),Promise.allSettled(C).then(()=>{var y;j!=null&&j.signal.aborted||(g(this,z,!1,"f"),(y=u(this,k,"f"))===null||y===void 0||y.call(this))}),(se||!P)&&u(this,r,"m",N).call(this,b,U))},N=function(l,d){if(this.validationTarget)this.internals.setValidity(l,d,this.validationTarget),g(this,n,!1,"f");else{if(this.internals.setValidity(l,d),this.internals.validity.valid)return;g(this,n,!0,"f")}},G=function(l,d){if(this.validityCallback){let b=this.validityCallback(l.key||"customError");if(b)return b}return l.message instanceof Function?l.message(this,d):l.message},Pe}import{html as ne,LitElement as fr}from"lit";import{property as w,state as B}from"lit/decorators.js";import{repeat as wr}from"lit/directives/repeat.js";var hr=["en","nb","fi","da","sv"],ie="en",K=o=>hr.find(r=>o===r||o.toLowerCase().includes(r))||ie;function ze(){if(typeof window=="undefined"){let o=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return K(o)}try{let o=Ee(document);if(o)return K(o);let r=vr();if(r)return K(r);let e=Ee(Ae());return e?K(e):ie}catch(o){return console.warn("could not detect locale, falling back to source locale",o),ie}}var Fe=(o,r,e,t,a)=>{_.load("en",o),_.load("nb",r),_.load("fi",e),_.load("da",t),_.load("sv",a);let i=ze();_.activate(i),Se(),br()},pr="warp-i18n-change";function Se(){typeof window!="undefined"&&window.dispatchEvent(new Event(pr))}var Me=!1;function br(){if(Me||typeof window=="undefined"||!(document!=null&&document.documentElement))return;Me=!0;let o=()=>{let a=ze();_.locale!==a&&(_.activate(a),Se())},r=new MutationObserver(a=>{for(let i of a)if(i.type==="attributes"&&i.attributeName==="lang"){o();break}});r.observe(document.documentElement,{attributes:!0,attributeFilter:["lang"]});let e=Ae();e&&e.documentElement&&e!==document&&r.observe(e.documentElement,{attributes:!0,attributeFilter:["lang"]});let t=gr();t&&r.observe(t,{attributes:!0,attributeFilter:["lang"]})}function Ae(){var o,r;try{return(r=(o=window.parent)==null?void 0:o.document)!=null?r:null}catch(e){return null}}function Ee(o){var r,e;try{return(e=(r=o==null?void 0:o.documentElement)==null?void 0:r.lang)!=null?e:""}catch(t){return""}}function gr(){var o;try{return(o=window.frameElement)!=null?o:null}catch(r){return null}}function vr(){var o,r,e;try{return(e=(r=(o=window.frameElement)==null?void 0:o.getAttribute)==null?void 0:r.call(o,"lang"))!=null?e:""}catch(t){return""}}import{css as Le}from"lit";var Ve=Le`
10
+ `)),F(c)&&_e.test(c)?JSON.parse(`"${c}"`):F(c)?c:ir(c,this._locale,this._locales)(e,t==null?void 0:t.formats)}date(r,e){return ae(this._locales||this._locale,r,e)}number(r,e){return ee(this._locales||this._locale,r,e)}};function ur(o={}){return new te(o)}var _=ur();var u=function(o,r,e,t){if(e==="a"&&!t)throw new TypeError("Private accessor was defined without a getter");if(typeof r=="function"?o!==r||!t:!r.has(o))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?t:e==="a"?t.call(o):t?t.value:r.get(o)},b=function(o,r,e,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 r=="function"?o!==r||!a:!r.has(o))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t==="a"?a.call(o,e):a?a.value=e:r.set(o,e),e};function Ce(o){var r,e,t,a,i,s,n,c,v,O,E,T,k,z,S,x,I,N,G;class Re extends o{constructor(...l){var d,g,m;super(...l),r.add(this),this.internals=this.attachInternals(),e.set(this,!1),t.set(this,!1),a.set(this,!1),i.set(this,void 0),s.set(this,void 0),n.set(this,!0),v.set(this,""),O.set(this,()=>{b(this,a,!0,"f"),b(this,e,!0,"f"),u(this,r,"m",x).call(this)}),E.set(this,()=>{b(this,e,!1,"f"),u(this,r,"m",I).call(this,this.shouldFormValueUpdate()?u(this,v,"f"):""),!this.validity.valid&&u(this,a,"f")&&b(this,t,!0,"f");let C=u(this,r,"m",x).call(this);this.validationMessageCallback&&this.validationMessageCallback(C?this.internals.validationMessage:"")}),T.set(this,()=>{var C;u(this,n,"f")&&this.validationTarget&&(this.internals.setValidity(this.validity,this.validationMessage,this.validationTarget),b(this,n,!1,"f")),b(this,a,!0,"f"),b(this,t,!0,"f"),u(this,r,"m",x).call(this),(C=this===null||this===void 0?void 0:this.validationMessageCallback)===null||C===void 0||C.call(this,this.showError?this.internals.validationMessage:"")}),k.set(this,void 0),z.set(this,!1),S.set(this,Promise.resolve()),(d=this.addEventListener)===null||d===void 0||d.call(this,"focus",u(this,O,"f")),(g=this.addEventListener)===null||g===void 0||g.call(this,"blur",u(this,E,"f")),(m=this.addEventListener)===null||m===void 0||m.call(this,"invalid",u(this,T,"f")),this.setValue(null)}static get formAssociated(){return!0}static get validators(){return this.formControlValidators||[]}static get observedAttributes(){let l=this.validators.map(m=>m.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 u(this,r,"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 m;(m=super.attributeChangedCallback)===null||m===void 0||m.call(this,l,d,g);let R=this.constructor.getValidators(l);R!=null&&R.length&&this.validationTarget&&this.setValue(u(this,v,"f"))}setValue(l){var d;b(this,t,!1,"f"),(d=this.validationMessageCallback)===null||d===void 0||d.call(this,""),b(this,v,l,"f");let m=this.shouldFormValueUpdate()?l:null;this.internals.setFormValue(m),u(this,r,"m",I).call(this,m),this.valueChangedCallback&&this.valueChangedCallback(m),u(this,r,"m",x).call(this)}shouldFormValueUpdate(){return!0}get validationComplete(){return new Promise(l=>l(u(this,S,"f")))}formResetCallback(){var l,d;b(this,a,!1,"f"),b(this,t,!1,"f"),u(this,r,"m",x).call(this),(l=this.resetFormControl)===null||l===void 0||l.call(this),(d=this.validationMessageCallback)===null||d===void 0||d.call(this,u(this,r,"m",x).call(this)?this.validationMessage:"")}}return e=new WeakMap,t=new WeakMap,a=new WeakMap,i=new WeakMap,s=new WeakMap,n=new WeakMap,v=new WeakMap,O=new WeakMap,E=new WeakMap,T=new WeakMap,k=new WeakMap,z=new WeakMap,S=new WeakMap,r=new WeakSet,c=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=u(this,t,"f")||u(this,a,"f")&&!this.validity.valid&&!u(this,e,"f");return l&&this.internals.states?this.internals.states.add("--show-error"):this.internals.states&&this.internals.states.delete("--show-error"),l},I=function(l){let d=this.constructor,g={},m=d.validators,C=[],R=m.some(y=>y.isValid instanceof Promise);u(this,z,"f")||(b(this,S,new Promise(y=>{b(this,k,y,"f")}),"f"),b(this,z,!0,"f")),u(this,i,"f")&&(u(this,i,"f").abort(),b(this,s,u(this,i,"f"),"f"));let j=new AbortController;b(this,i,j,"f");let U,se=!1;m.length&&(m.forEach(y=>{let J=y.key||"customError",$=y.isValid(this,l,j.signal);$ instanceof Promise?(C.push($),$.then(W=>{W!=null&&(g[J]=!W,U=u(this,r,"m",G).call(this,y,l),u(this,r,"m",N).call(this,g,U))})):(g[J]=!$,this.validity[J]!==!$&&(se=!0),!$&&!U&&(U=u(this,r,"m",G).call(this,y,l)))}),Promise.allSettled(C).then(()=>{var y;j!=null&&j.signal.aborted||(b(this,z,!1,"f"),(y=u(this,k,"f"))===null||y===void 0||y.call(this))}),(se||!R)&&u(this,r,"m",N).call(this,g,U))},N=function(l,d){if(this.validationTarget)this.internals.setValidity(l,d,this.validationTarget),b(this,n,!1,"f");else{if(this.internals.setValidity(l,d),this.internals.validity.valid)return;b(this,n,!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},Re}import{html as ne,LitElement as fr}from"lit";import{property as w,state as B}from"lit/decorators.js";import{repeat as wr}from"lit/directives/repeat.js";var hr=["en","nb","fi","da","sv"],ie="en",K=o=>hr.find(r=>o===r||o.toLowerCase().includes(r))||ie;function ze(){if(typeof window=="undefined"){let o=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return K(o)}try{let o=Ee(document);if(o)return K(o);let r=vr();if(r)return K(r);let e=Ee(Ae());return e?K(e):ie}catch(o){return console.warn("could not detect locale, falling back to source locale",o),ie}}var Se=(o,r,e,t,a)=>{_.load("en",o),_.load("nb",r),_.load("fi",e),_.load("da",t),_.load("sv",a);let i=ze();_.activate(i),Fe(),gr()},pr="warp-i18n-change";function Fe(){typeof window!="undefined"&&window.dispatchEvent(new Event(pr))}var Me=!1;function gr(){if(Me||typeof window=="undefined"||!(document!=null&&document.documentElement))return;Me=!0;let o=()=>{let a=ze();_.locale!==a&&(_.activate(a),Fe())},r=new MutationObserver(a=>{for(let i of a)if(i.type==="attributes"&&i.attributeName==="lang"){o();break}});r.observe(document.documentElement,{attributes:!0,attributeFilter:["lang"]});let e=Ae();e&&e.documentElement&&e!==document&&r.observe(e.documentElement,{attributes:!0,attributeFilter:["lang"]});let t=br();t&&r.observe(t,{attributes:!0,attributeFilter:["lang"]})}function Ae(){var o,r;try{return(r=(o=window.parent)==null?void 0:o.document)!=null?r:null}catch(e){return null}}function Ee(o){var r,e;try{return(e=(r=o==null?void 0:o.documentElement)==null?void 0:r.lang)!=null?e:""}catch(t){return""}}function br(){var o;try{return(o=window.frameElement)!=null?o:null}catch(r){return null}}function vr(){var o,r,e;try{return(e=(r=(o=window.frameElement)==null?void 0:o.getAttribute)==null?void 0:r.call(o,"lang"))!=null?e:""}catch(t){return""}}import{css as Ie}from"lit";var Le=Ie`
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
- `,Ar=Le`*, :before, :after {
283
+ `,Ar=Ie`*, :before, :after {
284
284
  --w-rotate: 0;
285
285
  --w-rotate-x: 0;
286
286
  --w-rotate-y: 0;
@@ -2446,8 +2446,8 @@ Please compile your catalog first.
2446
2446
  display: none
2447
2447
  }
2448
2448
  }
2449
- `;var Ie=JSON.parse('{"combobox.aria.pluralResults":[["numResults","plural",{"one":["#"," resultat"],"other":["#"," resultater"]}]],"combobox.aria.noResults":["Ingen resultater"]}');var Te=JSON.parse('{"combobox.aria.pluralResults":[["numResults","plural",{"one":["#"," result"],"other":["#"," results"]}]],"combobox.aria.noResults":["No results"]}');var $e=JSON.parse('{"combobox.aria.pluralResults":[["numResults","plural",{"one":["#"," tulos"],"other":["#"," tulosta"]}]],"combobox.aria.noResults":["Ei tuloksia"]}');var De=JSON.parse('{"combobox.aria.pluralResults":[["numResults","plural",{"one":["#"," resultat"],"other":["#"," resultater"]}]],"combobox.aria.noResults":["Ingen resultater"]}');var Ne=JSON.parse('{"combobox.aria.pluralResults":[["numResults","plural",{"one":["#"," resultat"],"other":["#"," resultat"]}]],"combobox.aria.noResults":["Inga resultat"]}');import{css as mr}from"lit";var Re=mr`*,: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}.rounded-8{border-radius:8px}.block{display:block}.overflow-hidden{overflow:hidden}.list-none{list-style-type:none}.left-0{left:0}.right-0{right:0}.absolute{position:absolute}.relative{position:relative}.static{position:static}.s-bg{background-color:var(--w-s-color-background)}.s-bg-selected{background-color:var(--w-s-color-background-selected)}.hover\\:s-bg-hover:hover{background-color:var(--w-s-color-background-hover)}.hover\\:s-bg-selected-hover:hover{background-color:var(--w-s-color-background-selected-hover)}.shadow-m{box-shadow:var(--w-shadow-m)}.m-0{margin:0}.p-0{padding:0}.p-8{padding:.8rem}.pb-4{padding-bottom:.4rem}.cursor-pointer{cursor:pointer}.font-bold{font-weight:700}.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}.select-none{-webkit-user-select:none;user-select:none};
2450
- .z-0{z-index:0;}.z-20{z-index:20;}`;var A={wrapper:"relative z-0",base:"absolute z-20 left-0 right-0 s-bg pb-4 rounded-8 overflow-hidden shadow-m",listbox:"m-0 p-0 select-none list-none",option:"block cursor-pointer p-8",optionUnselected:"hover:s-bg-hover",optionSelected:"s-bg-selected hover:s-bg-selected-hover",textMatch:"font-bold",a11y:"sr-only"},q,h=class extends Ce(fr){constructor(){super();this.options=[];this.value="";this.openOnFocus=!1;this.selectOnBlur=!0;this.matchTextSegments=!1;this.disableStaticFiltering=!1;this.invalid=!1;this.disabled=!1;this.required=!1;this.optional=!1;this.autocomplete="off";this._isOpen=!1;this._navigationOption=null;this._currentOptions=[];this._optionIdCounter=0;this._displayValue="";pe(this,q,null);Fe(Te,De,$e,Ie,Ne)}firstUpdated(e){be(this,q,this.value)}updated(e){e.has("value")&&this.setValue(this.value)}resetFormControl(){this.value=he(this,q)}get _listboxId(){return`${this._id}-listbox`}get _id(){return"combobox"}get _helpId(){return this.helpText?`${this._id}__hint`:void 0}get _navigationLabelOrDisplayValue(){return this._navigationOption?this._navigationOption.label||this._navigationOption.value:this._displayValue}get _navigationValueOrInputValue(){var e;return((e=this._navigationOption)==null?void 0:e.value)||this.value}_createOptionsWithIdAndMatch(e,t){return e.map((a,i)=>({...a,id:`${this._id}-option-${this._optionIdCounter+i}`,key:a.key||a.value,currentInputValue:t}))}_getAriaText(e,t){if(!e||!t)return"";let a=e.filter(n=>(n.label||n.value).toLowerCase().includes(t.toLowerCase())),i=_._({id:"combobox.aria.pluralResults",message:"{numResults, plural, one {# result} other {# results}}",comment:"Aria text for combobox when one or more results",values:{numResults:a.length}}),s=_._({id:"combobox.aria.noResults",message:"No results",comment:"Aria text for combobox when no results"});return a.length?i:s}_getOptionClasses(e){var t;return Y(A.option,((t=this._navigationOption)==null?void 0:t.id)===(e==null?void 0:e.id)?A.optionSelected:A.optionUnselected)}_handleKeyDown(e){let t=["ArrowDown","ArrowUp","PageUp","PageDown","Home","End"].includes(e.key),a=["ArrowDown","ArrowLeft","ArrowUp","ArrowRight"];if(t&&!this._isOpen){this._isOpen=!0;return}if(t&&this._isOpen){this._findAndSetActiveOption(e);return}if(!(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey))switch(e.key){case"Enter":this._navigationOption&&(e.preventDefault(),this._handleSelect(this._navigationOption),requestAnimationFrame(()=>{var n,c;let i=(n=this.shadowRoot)==null?void 0:n.querySelector("w-textfield"),s=(c=i==null?void 0:i.shadowRoot)==null?void 0:c.querySelector("input");s&&(s.value=this._displayValue)})),this._isOpen=!1;break;case"Tab":case"Delete":this._isOpen=!1;break;case"Escape":this._isOpen?this._isOpen=!1:this._handleChange(""),this._navigationOption=null;break;case"Backspace":this._handleChange(this._navigationLabelOrDisplayValue),this._navigationOption=null,this._isOpen=!0;break;default:if(a.includes(e.key))break;this._isOpen=!0,this._navigationOption?(this._handleChange(this._navigationOption.value),this._navigationOption=null):this._handleChange(this.value);break}}_findAndSetActiveOption(e){e.preventDefault();let t=this._currentOptions.findIndex(s=>{var n;return s.id===((n=this._navigationOption)==null?void 0:n.id)}),a=t+1,i=t-1;switch(e.key){case"ArrowDown":this._navigationOption=a>this._currentOptions.length-1?null:this._currentOptions[a];break;case"ArrowUp":this._navigationOption=i===-2?this._currentOptions[this._currentOptions.length-1]:i<0?null:this._currentOptions[i];break;case"PageUp":this._navigationOption=t-10<0?this._currentOptions[0]:this._currentOptions[t-10];break;case"PageDown":this._navigationOption=t+10>this._currentOptions.length-1?this._currentOptions[this._currentOptions.length-1]:this._currentOptions[t+10];break;case"Home":this._navigationOption=this._currentOptions[0];break;case"End":this._navigationOption=this._currentOptions[this._currentOptions.length-1];break}}_handleSelect(e){this.value=e.value,this._displayValue=e.label||e.value,this.setValue(this.value);let t=new CustomEvent("select",{detail:{value:e.value},bubbles:!0,composed:!0});this.dispatchEvent(t),this._isOpen=!1,this._navigationOption=null,this.disableStaticFiltering&&(this._currentOptions=[])}_handleChange(e){if(e===void 0)return;this.value=e,this._displayValue=e;let t=new CustomEvent("change",{detail:{value:e},bubbles:!0,composed:!0});this.dispatchEvent(t)}_handleFocus(){if(!this.openOnFocus)return;let e=new CustomEvent("focus",{bubbles:!0,composed:!0});this.dispatchEvent(e),this._isOpen=!0}_handleBlur(e){var i,s;let t=e.relatedTarget;if(t&&((i=this.shadowRoot)!=null&&i.contains(t)))return;if(this._isOpen=!1,this.selectOnBlur&&(this._navigationOption||!this._navigationOption&&this._currentOptions.findIndex(n=>n.value===this.value)!==-1)){let n=((s=this._navigationOption)==null?void 0:s.value)||this.value;this.value=n;let c=new CustomEvent("select",{detail:{value:n},bubbles:!0,composed:!0});this.dispatchEvent(c)}this._navigationOption=null;let a=new CustomEvent("blur",{detail:{value:this._navigationValueOrInputValue},bubbles:!0,composed:!0});this.dispatchEvent(a)}_handleOptionClick(e,t){this._handleSelect(t),requestAnimationFrame(()=>{var s,n;let a=(s=this.shadowRoot)==null?void 0:s.querySelector("w-textfield"),i=(n=a==null?void 0:a.shadowRoot)==null?void 0:n.querySelector("input");i&&(i.value=t.label||t.value)})}_handleContainerBlur(e){(!e.currentTarget||!e.currentTarget.contains(e.relatedTarget))&&(this._isOpen=!1)}_renderTextMatch(e,t){if(!this.matchTextSegments)return e;let a=e.toLowerCase().indexOf(t.currentInputValue.toLowerCase());if(a!==-1){let i=a+t.currentInputValue.length;return ne`${e.substring(0,a)}<span class="${A.textMatch}">${e.substring(a,i)}</span
2449
+ `;var Ve=JSON.parse('{"combobox.aria.pluralResults":[["numResults","plural",{"one":["#"," resultat"],"other":["#"," resultater"]}]],"combobox.aria.noResults":["Ingen resultater"],"combobox.aria.pluralSuggestions":[["numSuggestions","plural",{"one":["#"," forslag"],"other":["#"," forslag"]}]],"combobox.aria.noSuggestions":["Ingen forslag"]}');var Te=JSON.parse('{"combobox.aria.pluralResults":[["numResults","plural",{"one":["#"," result"],"other":["#"," results"]}]],"combobox.aria.noResults":["No results"],"combobox.aria.pluralSuggestions":[["numSuggestions","plural",{"one":["#"," suggestion"],"other":["#"," suggestions"]}]],"combobox.aria.noSuggestions":["No suggestions"]}');var $e=JSON.parse('{"combobox.aria.pluralResults":[["numResults","plural",{"one":["#"," tulos"],"other":["#"," tulosta"]}]],"combobox.aria.noResults":["Ei tuloksia"],"combobox.aria.pluralSuggestions":[["numSuggestions","plural",{"one":["#"," ehdotus"],"other":["#"," ehdotusta"]}]],"combobox.aria.noSuggestions":["Ei ehdotuksia"]}');var De=JSON.parse('{"combobox.aria.pluralResults":[["numResults","plural",{"one":["#"," resultat"],"other":["#"," resultater"]}]],"combobox.aria.noResults":["Ingen resultater"],"combobox.aria.pluralSuggestions":[["numSuggestions","plural",{"one":["#"," forslag"],"other":["#"," forslag"]}]],"combobox.aria.noSuggestions":["Ingen forslag"]}');var Ne=JSON.parse('{"combobox.aria.pluralResults":[["numResults","plural",{"one":["#"," resultat"],"other":["#"," resultat"]}]],"combobox.aria.noResults":["Inga resultat"],"combobox.aria.pluralSuggestions":[["numSuggestions","plural",{"one":["#"," f\xF6rslag"],"other":["#"," f\xF6rslag"]}]],"combobox.aria.noSuggestions":["Inga f\xF6rslag"]}');import{css as mr}from"lit";var Pe=mr`*,: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}.rounded-8{border-radius:8px}.block{display:block}.overflow-hidden{overflow:hidden}.list-none{list-style-type:none}.left-0{left:0}.right-0{right:0}.absolute{position:absolute}.relative{position:relative}.static{position:static}.s-bg{background-color:var(--w-s-color-background)}.s-bg-selected{background-color:var(--w-s-color-background-selected)}.hover\\:s-bg-hover:hover{background-color:var(--w-s-color-background-hover)}.hover\\:s-bg-selected-hover:hover{background-color:var(--w-s-color-background-selected-hover)}.shadow-m{box-shadow:var(--w-shadow-m)}.m-0{margin:0}.p-0{padding:0}.p-8{padding:.8rem}.pb-4{padding-bottom:.4rem}.cursor-pointer{cursor:pointer}.font-bold{font-weight:700}.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}.select-none{-webkit-user-select:none;user-select:none};
2450
+ .z-0{z-index:0;}.z-20{z-index:20;}`;var A={wrapper:"relative z-0",base:"absolute z-20 left-0 right-0 s-bg pb-4 rounded-8 overflow-hidden shadow-m",listbox:"m-0 p-0 select-none list-none",option:"block cursor-pointer p-8",optionUnselected:"hover:s-bg-hover",optionSelected:"s-bg-selected hover:s-bg-selected-hover",textMatch:"font-bold",a11y:"sr-only"},q,h=class extends Ce(fr){constructor(){super();this.options=[];this.value="";this.openOnFocus=!1;this.selectOnBlur=!0;this.matchTextSegments=!1;this.disableStaticFiltering=!1;this.invalid=!1;this.disabled=!1;this.required=!1;this.optional=!1;this.autocomplete="off";this._isOpen=!1;this._navigationOption=null;this._currentOptions=[];this._optionIdCounter=0;this._displayValue="";pe(this,q,null);Se(Te,De,$e,Ve,Ne)}firstUpdated(e){ge(this,q,this.value)}updated(e){e.has("value")&&this.setValue(this.value)}resetFormControl(){this.value=he(this,q)}get _listboxId(){return`${this._id}-listbox`}get _id(){return"combobox"}get _helpId(){return this.helpText?`${this._id}__hint`:void 0}get _navigationLabelOrDisplayValue(){return this._navigationOption?this._navigationOption.label||this._navigationOption.value:this._displayValue}get _navigationValueOrInputValue(){var e;return((e=this._navigationOption)==null?void 0:e.value)||this.value}_createOptionsWithIdAndMatch(e,t){return e.map((a,i)=>({...a,id:`${this._id}-option-${this._optionIdCounter+i}`,key:a.key||a.value,currentInputValue:t}))}_getAriaText(e,t,a){if(!e||!a)return"";let i=e.filter(c=>(c.label||c.value).toLowerCase().includes(t.toLowerCase())),s=_._({id:"combobox.aria.pluralSuggestions",message:"{numSuggestions, plural, one {# suggestion} other {# suggestions}}",comment:"Aria text for combobox when there are one or more suggestions",values:{numSuggestions:i.length}}),n=_._({id:"combobox.aria.noSuggestions",message:"No suggestions",comment:"Aria text for combobox when no suggestions"});return i.length?s:n}_getOptionClasses(e){var t;return Y(A.option,((t=this._navigationOption)==null?void 0:t.id)===(e==null?void 0:e.id)?A.optionSelected:A.optionUnselected)}_handleKeyDown(e){let t=["ArrowDown","ArrowUp","PageUp","PageDown","Home","End"].includes(e.key),a=["ArrowDown","ArrowLeft","ArrowUp","ArrowRight"];if(t&&!this._isOpen){this._isOpen=!0;return}if(t&&this._isOpen){this._findAndSetActiveOption(e);return}if(!(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey))switch(e.key){case"Enter":this._navigationOption&&(e.preventDefault(),this._handleSelect(this._navigationOption),requestAnimationFrame(()=>{var n,c;let i=(n=this.shadowRoot)==null?void 0:n.querySelector("w-textfield"),s=(c=i==null?void 0:i.shadowRoot)==null?void 0:c.querySelector("input");s&&(s.value=this._displayValue)})),this._isOpen=!1;break;case"Tab":case"Delete":this._isOpen=!1;break;case"Escape":this._isOpen?this._isOpen=!1:this._handleChange(""),this._navigationOption=null;break;case"Backspace":this._handleChange(this._navigationLabelOrDisplayValue),this._navigationOption=null,this._isOpen=!0;break;default:if(a.includes(e.key))break;this._isOpen=!0,this._navigationOption?(this._handleChange(this._navigationOption.value),this._navigationOption=null):this._handleChange(this.value);break}}_findAndSetActiveOption(e){e.preventDefault();let t=this._currentOptions.findIndex(s=>{var n;return s.id===((n=this._navigationOption)==null?void 0:n.id)}),a=t+1,i=t-1;switch(e.key){case"ArrowDown":this._navigationOption=a>this._currentOptions.length-1?null:this._currentOptions[a];break;case"ArrowUp":this._navigationOption=i===-2?this._currentOptions[this._currentOptions.length-1]:i<0?null:this._currentOptions[i];break;case"PageUp":this._navigationOption=t-10<0?this._currentOptions[0]:this._currentOptions[t-10];break;case"PageDown":this._navigationOption=t+10>this._currentOptions.length-1?this._currentOptions[this._currentOptions.length-1]:this._currentOptions[t+10];break;case"Home":this._navigationOption=this._currentOptions[0];break;case"End":this._navigationOption=this._currentOptions[this._currentOptions.length-1];break}}_handleSelect(e){this.value=e.value,this._displayValue=e.label||e.value,this.setValue(this.value);let t=new CustomEvent("select",{detail:{value:e.value},bubbles:!0,composed:!0});this.dispatchEvent(t),this._isOpen=!1,this._navigationOption=null,this.disableStaticFiltering&&(this._currentOptions=[])}_handleChange(e){if(e===void 0)return;this.value=e,this._displayValue=e;let t=new CustomEvent("change",{detail:{value:e},bubbles:!0,composed:!0});this.dispatchEvent(t)}_handleFocus(){if(!this.openOnFocus)return;let e=new CustomEvent("focus",{bubbles:!0,composed:!0});this.dispatchEvent(e),this._isOpen=!0}_handleBlur(e){var i,s;let t=e.relatedTarget;if(t&&((i=this.shadowRoot)!=null&&i.contains(t)))return;if(this._isOpen=!1,this.selectOnBlur&&(this._navigationOption||!this._navigationOption&&this._currentOptions.findIndex(n=>n.value===this.value)!==-1)){let n=((s=this._navigationOption)==null?void 0:s.value)||this.value;this.value=n;let c=new CustomEvent("select",{detail:{value:n},bubbles:!0,composed:!0});this.dispatchEvent(c)}this._navigationOption=null;let a=new CustomEvent("blur",{detail:{value:this._navigationValueOrInputValue},bubbles:!0,composed:!0});this.dispatchEvent(a)}_handleOptionClick(e,t){this._handleSelect(t),requestAnimationFrame(()=>{var s,n;let a=(s=this.shadowRoot)==null?void 0:s.querySelector("w-textfield"),i=(n=a==null?void 0:a.shadowRoot)==null?void 0:n.querySelector("input");i&&(i.value=t.label||t.value)})}_handleContainerBlur(e){(!e.currentTarget||!e.currentTarget.contains(e.relatedTarget))&&(this._isOpen=!1)}_renderTextMatch(e,t){if(!this.matchTextSegments)return e;let a=e.toLowerCase().indexOf(t.currentInputValue.toLowerCase());if(a!==-1){let i=a+t.currentInputValue.length;return ne`${e.substring(0,a)}<span class="${A.textMatch}">${e.substring(a,i)}</span
2451
2451
  >${e.substring(i)}`}return e}willUpdate(e){if(e.has("value")||e.has("options")){let t=this.options.find(i=>i.value===this.value),a=t?t.label||t.value:this.value;this._displayValue!==a&&this._displayValue!==this.value&&(this._displayValue=a),!this._displayValue&&this.value&&(this._displayValue=a)}(e.has("options")||e.has("value")||e.has("disableStaticFiltering")||e.has("_displayValue"))&&(this._optionIdCounter+=this.options.length,this._currentOptions=this._createOptionsWithIdAndMatch(this.options,this._displayValue).filter(t=>this.disableStaticFiltering?!0:(t.label||t.value).toLowerCase().includes(this._displayValue.toLowerCase()))),this.disableStaticFiltering&&this._currentOptions.length&&this._currentOptions.length===1&&!this._currentOptions.some(t=>t.value===this.value)&&!this._isOpen&&(this._isOpen=!0)}render(){var e;return ne`
2452
2452
  <div class=${Y(A.wrapper)} @blur=${this._handleContainerBlur}>
2453
2453
  <w-textfield
@@ -2472,7 +2472,9 @@ Please compile your catalog first.
2472
2472
  @blur=${this._handleBlur}
2473
2473
  @keydown=${this._handleKeyDown}></w-textfield>
2474
2474
 
2475
- <span class="${A.a11y}" role="status"> ${this._getAriaText(this._currentOptions,this._displayValue)} </span>
2475
+ <span class="${A.a11y}" role="status">
2476
+ ${this._getAriaText(this._currentOptions,this._displayValue,this._isOpen)}
2477
+ </span>
2476
2478
 
2477
2479
  <div ?hidden=${!this._isOpen||!this._currentOptions.length} class=${Y(A.base)}>
2478
2480
  <ul id=${this._listboxId} role="listbox" class="${A.listbox}">
@@ -2490,5 +2492,5 @@ Please compile your catalog first.
2490
2492
  </ul>
2491
2493
  </div>
2492
2494
  </div>
2493
- `}};q=new WeakMap,h.styles=[Ve,Re],p([w({type:Array})],h.prototype,"options",2),p([w({type:String,reflect:!0})],h.prototype,"label",2),p([w({type:String,reflect:!0})],h.prototype,"placeholder",2),p([w({type:String,reflect:!0})],h.prototype,"value",2),p([w({type:Boolean,attribute:"open-on-focus"})],h.prototype,"openOnFocus",2),p([w({type:Boolean,attribute:"select-on-blur"})],h.prototype,"selectOnBlur",2),p([w({type:Boolean,attribute:"match-text-segments"})],h.prototype,"matchTextSegments",2),p([w({type:Boolean,attribute:"disable-static-filtering"})],h.prototype,"disableStaticFiltering",2),p([w({type:Boolean,reflect:!0})],h.prototype,"invalid",2),p([w({type:String,attribute:"help-text",reflect:!0})],h.prototype,"helpText",2),p([w({type:Boolean,reflect:!0})],h.prototype,"disabled",2),p([w({type:Boolean,reflect:!0})],h.prototype,"required",2),p([w({type:Boolean,reflect:!0})],h.prototype,"optional",2),p([w({type:String,reflect:!0})],h.prototype,"name",2),p([w({type:String,reflect:!0})],h.prototype,"autocomplete",2),p([B()],h.prototype,"_isOpen",2),p([B()],h.prototype,"_navigationOption",2),p([B()],h.prototype,"_currentOptions",2),p([B()],h.prototype,"_optionIdCounter",2),p([B()],h.prototype,"_displayValue",2);customElements.get("w-combobox")||customElements.define("w-combobox",h);export{h as WarpCombobox};
2495
+ `}};q=new WeakMap,h.styles=[Le,Pe],p([w({type:Array})],h.prototype,"options",2),p([w({type:String,reflect:!0})],h.prototype,"label",2),p([w({type:String,reflect:!0})],h.prototype,"placeholder",2),p([w({type:String,reflect:!0})],h.prototype,"value",2),p([w({type:Boolean,attribute:"open-on-focus"})],h.prototype,"openOnFocus",2),p([w({type:Boolean,attribute:"select-on-blur"})],h.prototype,"selectOnBlur",2),p([w({type:Boolean,attribute:"match-text-segments"})],h.prototype,"matchTextSegments",2),p([w({type:Boolean,attribute:"disable-static-filtering"})],h.prototype,"disableStaticFiltering",2),p([w({type:Boolean,reflect:!0})],h.prototype,"invalid",2),p([w({type:String,attribute:"help-text",reflect:!0})],h.prototype,"helpText",2),p([w({type:Boolean,reflect:!0})],h.prototype,"disabled",2),p([w({type:Boolean,reflect:!0})],h.prototype,"required",2),p([w({type:Boolean,reflect:!0})],h.prototype,"optional",2),p([w({type:String,reflect:!0})],h.prototype,"name",2),p([w({type:String,reflect:!0})],h.prototype,"autocomplete",2),p([B()],h.prototype,"_isOpen",2),p([B()],h.prototype,"_navigationOption",2),p([B()],h.prototype,"_currentOptions",2),p([B()],h.prototype,"_optionIdCounter",2),p([B()],h.prototype,"_displayValue",2);customElements.get("w-combobox")||customElements.define("w-combobox",h);export{h as WarpCombobox};
2494
2496
  //# sourceMappingURL=combobox.js.map