@warp-ds/elements 2.10.0-next.7 → 2.10.0-next.9

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 (73) hide show
  1. package/dist/api.js +1 -1
  2. package/dist/api.js.map +1 -1
  3. package/dist/custom-elements.json +10 -4
  4. package/dist/docs/icon/api.md +8 -2
  5. package/dist/docs/icon/icon.md +8 -2
  6. package/dist/packages/affix/affix.js +4 -4
  7. package/dist/packages/affix/affix.js.map +3 -3
  8. package/dist/packages/alert/alert.js +3 -3
  9. package/dist/packages/alert/alert.js.map +3 -3
  10. package/dist/packages/attention/attention.js +13 -13
  11. package/dist/packages/attention/attention.js.map +3 -3
  12. package/dist/packages/box/box.js +1 -1
  13. package/dist/packages/box/box.js.map +1 -1
  14. package/dist/packages/breadcrumbs/breadcrumbs.js +4 -4
  15. package/dist/packages/breadcrumbs/breadcrumbs.js.map +2 -2
  16. package/dist/packages/button/button.js +6 -6
  17. package/dist/packages/button/button.js.map +2 -2
  18. package/dist/packages/card/card.js +3 -3
  19. package/dist/packages/card/card.js.map +2 -2
  20. package/dist/packages/checkbox/checkbox.js +3 -3
  21. package/dist/packages/checkbox/checkbox.js.map +2 -2
  22. package/dist/packages/checkbox-group/checkbox-group.js +5 -5
  23. package/dist/packages/checkbox-group/checkbox-group.js.map +2 -2
  24. package/dist/packages/combobox/combobox.js +14 -14
  25. package/dist/packages/combobox/combobox.js.map +2 -2
  26. package/dist/packages/datepicker/datepicker.js +49 -49
  27. package/dist/packages/datepicker/datepicker.js.map +3 -3
  28. package/dist/packages/expandable/expandable.js +11 -11
  29. package/dist/packages/expandable/expandable.js.map +3 -3
  30. package/dist/packages/icon/icon.d.ts +3 -1
  31. package/dist/packages/icon/icon.js +2 -2
  32. package/dist/packages/icon/icon.js.map +3 -3
  33. package/dist/packages/modal/modal.js +2 -2
  34. package/dist/packages/modal/modal.js.map +2 -2
  35. package/dist/packages/modal-header/modal-header.js +9 -9
  36. package/dist/packages/modal-header/modal-header.js.map +3 -3
  37. package/dist/packages/page-indicator/page-indicator.js +5 -5
  38. package/dist/packages/page-indicator/page-indicator.js.map +2 -2
  39. package/dist/packages/pagination/pagination.js +4 -4
  40. package/dist/packages/pagination/pagination.js.map +3 -3
  41. package/dist/packages/pill/pill.js +3 -3
  42. package/dist/packages/pill/pill.js.map +3 -3
  43. package/dist/packages/radio/radio.js +3 -3
  44. package/dist/packages/radio/radio.js.map +2 -2
  45. package/dist/packages/radio-group/radio-group.js +11 -11
  46. package/dist/packages/radio-group/radio-group.js.map +2 -2
  47. package/dist/packages/select/select.js +7 -7
  48. package/dist/packages/select/select.js.map +3 -3
  49. package/dist/packages/slider/slider.js +5 -5
  50. package/dist/packages/slider/slider.js.map +2 -2
  51. package/dist/packages/slider-thumb/slider-thumb.js +20 -20
  52. package/dist/packages/slider-thumb/slider-thumb.js.map +2 -2
  53. package/dist/packages/step/step.js +8 -8
  54. package/dist/packages/step/step.js.map +3 -3
  55. package/dist/packages/switch/switch.js +1 -1
  56. package/dist/packages/switch/switch.js.map +1 -1
  57. package/dist/packages/tab/tab.js +10 -10
  58. package/dist/packages/tab/tab.js.map +2 -2
  59. package/dist/packages/tab-panel/tab-panel.js +3 -3
  60. package/dist/packages/tab-panel/tab-panel.js.map +2 -2
  61. package/dist/packages/tabs/tabs.js +1 -1
  62. package/dist/packages/tabs/tabs.js.map +2 -2
  63. package/dist/packages/textarea/textarea.js +4 -4
  64. package/dist/packages/textarea/textarea.js.map +2 -2
  65. package/dist/packages/textfield/textfield.js +1 -1
  66. package/dist/packages/textfield/textfield.js.map +1 -1
  67. package/dist/packages/toast/toast.js +6 -6
  68. package/dist/packages/toast/toast.js.map +3 -3
  69. package/dist/packages/toast-container/toast-container.js +2 -2
  70. package/dist/packages/toast-container/toast-container.js.map +2 -2
  71. package/dist/web-types.json +3 -3
  72. package/eik/index.js +2456 -35
  73. package/package.json +8 -2
package/dist/api.js CHANGED
@@ -1,2 +1,2 @@
1
- var e=typeof window!="undefined";function r(){return customElements.get("w-toast-container")}function p(t,o){if(!e)return;let n=r().init(),s={id:Date.now().toString(36)+Math.random().toString(36).slice(2,5),text:t,duration:5e3,type:"success",...o};return n.set(s),s}function u(t){return e?r().init().del(t):void 0}function c(t,o){if(!e)return;let n=r().init();return n.set({...n.get(t),...o}),n.get(t)}export{u as removeToast,p as toast,c as updateToast};
1
+ var e=typeof window<"u";function r(){return customElements.get("w-toast-container")}function p(t,o){if(!e)return;let n=r().init(),s={id:Date.now().toString(36)+Math.random().toString(36).slice(2,5),text:t,duration:5e3,type:"success",...o};return n.set(s),s}function u(t){return e?r().init().del(t):void 0}function c(t,o){if(!e)return;let n=r().init();return n.set({...n.get(t),...o}),n.get(t)}export{u as removeToast,p as toast,c as updateToast};
2
2
  //# sourceMappingURL=api.js.map
package/dist/api.js.map CHANGED
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../packages/utils/window-exists.js", "../packages/toast/api.ts"],
4
4
  "sourcesContent": ["export const windowExists = typeof window !== 'undefined';\n", "import { WarpToastContainer } from '../toast-container/toast-container.js';\nimport { windowExists } from '../utils/window-exists.js';\nimport type { ToastInternal, ToastOptions } from './types';\n\nfunction getToastContainer() {\n const container = customElements.get('w-toast-container');\n return container as typeof WarpToastContainer;\n}\n\n/**\n * Creates a new toast\n */\nexport function toast(message: string, options?: ToastOptions) {\n if (!windowExists) return;\n\n const toast = getToastContainer().init() as WarpToastContainer;\n\n const data: ToastOptions = {\n id: Date.now().toString(36) + Math.random().toString(36).slice(2, 5),\n text: message,\n duration: 5000,\n type: 'success',\n ...options,\n };\n\n toast.set(data);\n return data;\n}\n\n/**\n * Remove an existing toast\n */\nexport function removeToast(id: string | number): Promise<boolean> | undefined {\n if (!windowExists) return;\n\n const toast = getToastContainer().init() as WarpToastContainer;\n return toast.del(id);\n}\n\n/**\n * Update an existing toast\n */\nexport function updateToast(id: string | number, options?: ToastOptions): ToastInternal | undefined {\n if (!windowExists) return;\n\n const toast = getToastContainer().init() as WarpToastContainer;\n toast.set({ ...toast.get(id), ...options });\n return toast.get(id);\n}\n"],
5
- "mappings": "AAAO,IAAMA,EAAe,OAAO,QAAW,YCI9C,SAASC,GAAoB,CAE3B,OADkB,eAAe,IAAI,mBAAmB,CAE1D,CAKO,SAASC,EAAMC,EAAiBC,EAAwB,CAC7D,GAAI,CAACC,EAAc,OAEnB,IAAMH,EAAQD,EAAkB,EAAE,KAAK,EAEjCK,EAAqB,CACzB,GAAI,KAAK,IAAI,EAAE,SAAS,EAAE,EAAI,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,MAAM,EAAG,CAAC,EACnE,KAAMH,EACN,SAAU,IACV,KAAM,UACN,GAAGC,CACL,EAEA,OAAAF,EAAM,IAAII,CAAI,EACPA,CACT,CAKO,SAASC,EAAYC,EAAmD,CAC7E,OAAKH,EAESJ,EAAkB,EAAE,KAAK,EAC1B,IAAIO,CAAE,EAHA,MAIrB,CAKO,SAASC,EAAYD,EAAqBJ,EAAmD,CAClG,GAAI,CAACC,EAAc,OAEnB,IAAMH,EAAQD,EAAkB,EAAE,KAAK,EACvC,OAAAC,EAAM,IAAI,CAAE,GAAGA,EAAM,IAAIM,CAAE,EAAG,GAAGJ,CAAQ,CAAC,EACnCF,EAAM,IAAIM,CAAE,CACrB",
5
+ "mappings": "AAAO,IAAMA,EAAe,OAAO,OAAW,ICI9C,SAASC,GAAoB,CAE3B,OADkB,eAAe,IAAI,mBAAmB,CAE1D,CAKO,SAASC,EAAMC,EAAiBC,EAAwB,CAC7D,GAAI,CAACC,EAAc,OAEnB,IAAMH,EAAQD,EAAkB,EAAE,KAAK,EAEjCK,EAAqB,CACzB,GAAI,KAAK,IAAI,EAAE,SAAS,EAAE,EAAI,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,MAAM,EAAG,CAAC,EACnE,KAAMH,EACN,SAAU,IACV,KAAM,UACN,GAAGC,CACL,EAEA,OAAAF,EAAM,IAAII,CAAI,EACPA,CACT,CAKO,SAASC,EAAYC,EAAmD,CAC7E,OAAKH,EAESJ,EAAkB,EAAE,KAAK,EAC1B,IAAIO,CAAE,EAHA,MAIrB,CAKO,SAASC,EAAYD,EAAqBJ,EAAmD,CAClG,GAAI,CAACC,EAAc,OAEnB,IAAMH,EAAQD,EAAkB,EAAE,KAAK,EACvC,OAAAC,EAAM,IAAI,CAAE,GAAGA,EAAM,IAAIM,CAAE,EAAG,GAAGJ,CAAQ,CAAC,EACnCF,EAAM,IAAIM,CAAE,CACrB",
6
6
  "names": ["windowExists", "getToastContainer", "toast", "message", "options", "windowExists", "data", "removeToast", "id", "updateToast"]
7
7
  }
@@ -25,12 +25,15 @@
25
25
  "kind": "field",
26
26
  "name": "size",
27
27
  "type": {
28
- "text": "'small' | 'medium' | 'large' | string"
28
+ "text": "'small' | 'medium' | 'large' | PixelValue"
29
29
  },
30
30
  "description": "Size: small, medium, large or pixel value (e.g. \"32px\").",
31
31
  "default": "\"medium\"",
32
32
  "attribute": "size",
33
- "reflects": true
33
+ "reflects": true,
34
+ "parsedType": {
35
+ "text": "'small' | 'medium' | 'large' | `${number}px`"
36
+ }
34
37
  },
35
38
  {
36
39
  "kind": "field",
@@ -95,11 +98,14 @@
95
98
  {
96
99
  "name": "size",
97
100
  "type": {
98
- "text": "'small' | 'medium' | 'large' | string"
101
+ "text": "'small' | 'medium' | 'large' | PixelValue"
99
102
  },
100
103
  "description": "Size: small, medium, large or pixel value (e.g. \"32px\").",
101
104
  "default": "\"medium\"",
102
- "fieldName": "size"
105
+ "fieldName": "size",
106
+ "parsedType": {
107
+ "text": "'small' | 'medium' | 'large' | `${number}px`"
108
+ }
103
109
  },
104
110
  {
105
111
  "name": "locale",
@@ -8,7 +8,7 @@ Unless otherwise noted all properties are HTML attributes (as opposed to JavaScr
8
8
  |-|-|-|-|
9
9
  | locale | `string` | `-` | Locale used for `<title>` text. |
10
10
  | name | `string` | `-` | Icon filename (without .svg) |
11
- | size | `'small' \| 'medium' \| 'large' \| string` | `"medium"` | Size: small, medium, large or pixel value (e.g. "32px"). |
11
+ | size | [`'small' \| 'medium' \| 'large' \| PixelValue`](#small-medium-large-pixelvalue) | `"medium"` | Size: small, medium, large or pixel value (e.g. "32px"). |
12
12
 
13
13
  ### Property Details
14
14
 
@@ -32,6 +32,12 @@ Icon filename (without .svg)
32
32
 
33
33
  Size: small, medium, large or pixel value (e.g. "32px").
34
34
 
35
- - Type: `'small' | 'medium' | 'large' | string`
35
+ - Type: [`'small' | 'medium' | 'large' | PixelValue`](#small-medium-large-pixelvalue)
36
36
  - Default: `"medium"`
37
37
 
38
+ ### Types
39
+
40
+ #### 'small' | 'medium' | 'large' | PixelValue
41
+
42
+ `'small' | 'medium' | 'large' | `${number}px``
43
+
@@ -80,7 +80,7 @@ Unless otherwise noted all properties are HTML attributes (as opposed to JavaScr
80
80
  |-|-|-|-|
81
81
  | locale | `string` | `-` | Locale used for `<title>` text. |
82
82
  | name | `string` | `-` | Icon filename (without .svg) |
83
- | size | `'small' \| 'medium' \| 'large' \| string` | `"medium"` | Size: small, medium, large or pixel value (e.g. "32px"). |
83
+ | size | [`'small' \| 'medium' \| 'large' \| PixelValue`](#small-medium-large-pixelvalue) | `"medium"` | Size: small, medium, large or pixel value (e.g. "32px"). |
84
84
 
85
85
  ### Property Details
86
86
 
@@ -104,6 +104,12 @@ Icon filename (without .svg)
104
104
 
105
105
  Size: small, medium, large or pixel value (e.g. "32px").
106
106
 
107
- - Type: `'small' | 'medium' | 'large' | string`
107
+ - Type: [`'small' | 'medium' | 'large' | PixelValue`](#small-medium-large-pixelvalue)
108
108
  - Default: `"medium"`
109
109
 
110
+ ### Types
111
+
112
+ #### 'small' | 'medium' | 'large' | PixelValue
113
+
114
+ `'small' | 'medium' | 'large' | `${number}px``
115
+
@@ -1,4 +1,4 @@
1
- var ve=Object.defineProperty;var fe=Object.getOwnPropertyDescriptor;var w=(o,e,r,t)=>{for(var a=t>1?void 0:t?fe(e,r):e,d=o.length-1,s;d>=0;d--)(s=o[d])&&(a=(t?s(e,r,a):s(a))||a);return t&&a&&ve(e,r,a),a};var B=function(){for(var o=[],e=arguments.length;e--;)o[e]=arguments[e];return o.reduce(function(r,t){return r.concat(typeof t=="string"?t:Array.isArray(t)?B.apply(void 0,t):typeof t=="object"&&t?Object.keys(t).map(function(a){return t[a]?a:""}):"")},[]).join(" ")};var F=o=>typeof o=="string",we=o=>typeof o=="function",oe=new Map,ie="en";function H(o){return[...Array.isArray(o)?o:[o],ie]}function K(o,e,r){let t=H(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(()=>N("date",t,r),()=>new Intl.DateTimeFormat(t,a)).format(F(e)?new Date(e):e)}function xe(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 K(o,e,t)}function G(o,e,r){let t=H(o);return O(()=>N("number",t,r),()=>new Intl.NumberFormat(t,r)).format(e)}function ae(o,e,r,{offset:t=0,...a}){var i,b;let d=H(o),s=e?O(()=>N("plural-ordinal",d),()=>new Intl.PluralRules(d,{type:"ordinal"})):O(()=>N("plural-cardinal",d),()=>new Intl.PluralRules(d,{type:"cardinal"}));return(b=(i=a[r])!=null?i:a[s.select(r-t)])!=null?b:a.other}function O(o,e){let r=o(),t=oe.get(r);return t||(t=e(),oe.set(r,t)),t}function N(o,e,r){let t=e.join("-");return`${o}-${t}-${JSON.stringify(r)}`}var ne=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,se=o=>o.replace(/\\u([a-fA-F0-9]{4})|\\x([a-fA-F0-9]{2})/g,(e,r,t)=>{if(r){let a=parseInt(r,16);return String.fromCharCode(a)}else{let a=parseInt(t,16);return String.fromCharCode(a)}}),le="%__lingui_octothorpe__%",ke=(o,e,r={})=>{let t=e||o,a=s=>typeof s=="object"?s:r[s],d=(s,i)=>{let b=Object.keys(r).length?a("number"):void 0,g=G(t,s,b);return i.replace(new RegExp(le,"g"),g)};return{plural:(s,i)=>{let{offset:b=0}=i,g=ae(t,!1,s,i);return d(s-b,g)},selectordinal:(s,i)=>{let{offset:b=0}=i,g=ae(t,!0,s,i);return d(s-b,g)},select:ye,number:(s,i)=>G(t,s,a(i)||{style:i}),date:(s,i)=>K(t,s,a(i)||i),time:(s,i)=>xe(t,s,a(i)||i)}},ye=(o,e)=>{var r;return(r=e[o])!=null?r:e.other};function _e(o,e,r){return(t={},a)=>{let d=ke(e,r,a),s=(b,g=!1)=>Array.isArray(b)?b.reduce((y,_)=>{if(_==="#"&&g)return y+le;if(F(_))return y+_;let[P,v,z]=_,C={};v==="plural"||v==="selectordinal"||v==="select"?Object.entries(z).forEach(([M,T])=>{C[M]=s(T,v==="plural"||v==="selectordinal")}):C=z;let m;if(v){let M=d[v];m=M(t[P],C)}else m=t[P];return m==null?y:y+m},""):b,i=s(o);return F(i)&&ne.test(i)?se(i):F(i)?i:i?String(i):""}}var ze=Object.defineProperty,Ce=(o,e,r)=>e in o?ze(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,Fe=(o,e,r)=>(Ce(o,typeof e!="symbol"?e+"":e,r),r),U=class{constructor(){Fe(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}},Ee=Object.defineProperty,Me=(o,e,r)=>e in o?Ee(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,L=(o,e,r)=>(Me(o,typeof e!="symbol"?e+"":e,r),r),q=class extends U{constructor(e){var r;super(),L(this,"_locale",""),L(this,"_locales"),L(this,"_localeData",{}),L(this,"_messages",{}),L(this,"_missing"),L(this,"_messageCompiler"),L(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:ie,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=""),F(e)||(r=e.values||r,a=e.message,e=e.id);let d=this.messages[e],s=d===void 0,i=this._missing;if(i&&s)return we(i)?i(this._locale,e):i;s&&this.emit("missing",{id:e,locale:this._locale});let b=d||a||e;return F(b)&&(this._messageCompiler?b=this._messageCompiler(b):console.warn(`Uncompiled message detected! Message:
1
+ var ve=Object.defineProperty;var fe=Object.getOwnPropertyDescriptor;var w=(t,e,r,o)=>{for(var a=o>1?void 0:o?fe(e,r):e,d=t.length-1,s;d>=0;d--)(s=t[d])&&(a=(o?s(e,r,a):s(a))||a);return o&&a&&ve(e,r,a),a};var B=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return t.reduce(function(r,o){return r.concat(typeof o=="string"?o:Array.isArray(o)?B.apply(void 0,o):typeof o=="object"&&o?Object.keys(o).map(function(a){return o[a]?a:""}):"")},[]).join(" ")};var F=t=>typeof t=="string",we=t=>typeof t=="function",te=new Map,ie="en";function H(t){return[...Array.isArray(t)?t:[t],ie]}function K(t,e,r){let o=H(t);r||(r="default");let a;if(typeof r=="string")switch(a={day:"numeric",month:"short",year:"numeric"},r){case"full":a.weekday="long";case"long":a.month="long";break;case"short":a.month="numeric";break}else a=r;return O(()=>N("date",o,r),()=>new Intl.DateTimeFormat(o,a)).format(F(e)?new Date(e):e)}function xe(t,e,r){let o;if(r||(r="default"),typeof r=="string")switch(o={second:"numeric",minute:"numeric",hour:"numeric"},r){case"full":case"long":o.timeZoneName="short";break;case"short":delete o.second}else o=r;return K(t,e,o)}function G(t,e,r){let o=H(t);return O(()=>N("number",o,r),()=>new Intl.NumberFormat(o,r)).format(e)}function ae(t,e,r,{offset:o=0,...a}){let d=H(t),s=e?O(()=>N("plural-ordinal",d),()=>new Intl.PluralRules(d,{type:"ordinal"})):O(()=>N("plural-cardinal",d),()=>new Intl.PluralRules(d,{type:"cardinal"}));return a[r]??a[s.select(r-o)]??a.other}function O(t,e){let r=t(),o=te.get(r);return o||(o=e(),te.set(r,o)),o}function N(t,e,r){let o=e.join("-");return`${t}-${o}-${JSON.stringify(r)}`}var ne=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,se=t=>t.replace(/\\u([a-fA-F0-9]{4})|\\x([a-fA-F0-9]{2})/g,(e,r,o)=>{if(r){let a=parseInt(r,16);return String.fromCharCode(a)}else{let a=parseInt(o,16);return String.fromCharCode(a)}}),le="%__lingui_octothorpe__%",ke=(t,e,r={})=>{let o=e||t,a=s=>typeof s=="object"?s:r[s],d=(s,n)=>{let b=Object.keys(r).length?a("number"):void 0,g=G(o,s,b);return n.replace(new RegExp(le,"g"),g)};return{plural:(s,n)=>{let{offset:b=0}=n,g=ae(o,!1,s,n);return d(s-b,g)},selectordinal:(s,n)=>{let{offset:b=0}=n,g=ae(o,!0,s,n);return d(s-b,g)},select:ye,number:(s,n)=>G(o,s,a(n)||{style:n}),date:(s,n)=>K(o,s,a(n)||n),time:(s,n)=>xe(o,s,a(n)||n)}},ye=(t,e)=>e[t]??e.other;function _e(t,e,r){return(o={},a)=>{let d=ke(e,r,a),s=(b,g=!1)=>Array.isArray(b)?b.reduce((y,_)=>{if(_==="#"&&g)return y+le;if(F(_))return y+_;let[P,v,z]=_,C={};v==="plural"||v==="selectordinal"||v==="select"?Object.entries(z).forEach(([M,V])=>{C[M]=s(V,v==="plural"||v==="selectordinal")}):C=z;let m;if(v){let M=d[v];m=M(o[P],C)}else m=o[P];return m==null?y:y+m},""):b,n=s(t);return F(n)&&ne.test(n)?se(n):F(n)?n:n?String(n):""}}var ze=Object.defineProperty,Ce=(t,e,r)=>e in t?ze(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Fe=(t,e,r)=>(Ce(t,typeof e!="symbol"?e+"":e,r),r),U=class{constructor(){Fe(this,"_events",{})}on(e,r){var o;return(o=this._events)[e]??(o[e]=[]),this._events[e].push(r),()=>this.removeListener(e,r)}removeListener(e,r){let o=this._getListeners(e);if(!o)return;let a=o.indexOf(r);~a&&o.splice(a,1)}emit(e,...r){let o=this._getListeners(e);o&&o.map(a=>a.apply(this,r))}_getListeners(e){let r=this._events[e];return Array.isArray(r)?r:!1}},Ee=Object.defineProperty,Me=(t,e,r)=>e in t?Ee(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,L=(t,e,r)=>(Me(t,typeof e!="symbol"?e+"":e,r),r),q=class extends U{constructor(e){super(),L(this,"_locale",""),L(this,"_locales"),L(this,"_localeData",{}),L(this,"_messages",{}),L(this,"_missing"),L(this,"_messageCompiler"),L(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(e.locale??ie,e.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){return this._messages[this._locale]??{}}get localeData(){return this._localeData[this._locale]??{}}_loadLocaleData(e,r){let o=this._localeData[e];o?Object.assign(o,r):this._localeData[e]=r}setMessagesCompiler(e){return this._messageCompiler=e,this}loadLocaleData(e,r){typeof e=="string"?this._loadLocaleData(e,r):Object.keys(e).forEach(o=>this._loadLocaleData(o,e[o])),this.emit("change")}_load(e,r){let o=this._messages[e];o?Object.assign(o,r):this._messages[e]=r}load(e,r){typeof e=="string"&&typeof r=="object"?this._load(e,r):Object.entries(e).forEach(([o,a])=>this._load(o,a)),this.emit("change")}loadAndActivate({locale:e,locales:r,messages:o}){this._locale=e,this._locales=r||void 0,this._messages[this._locale]=o,this.emit("change")}activate(e,r){this._locale=e,this._locales=r,this.emit("change")}_(e,r,o){if(!this.locale)throw new Error("Lingui: Attempted to call a translation function without setting a locale.\nMake sure to call `i18n.activate(locale)` before using Lingui functions.\nThis issue may also occur due to a race condition in your initialization logic.");let a=o?.message;e||(e=""),F(e)||(r=e.values||r,a=e.message,e=e.id);let d=this.messages[e],s=d===void 0,n=this._missing;if(n&&s)return we(n)?n(this._locale,e):n;s&&this.emit("missing",{id:e,locale:this._locale});let b=d||a||e;return F(b)&&(this._messageCompiler?b=this._messageCompiler(b):console.warn(`Uncompiled message detected! Message:
2
2
 
3
3
  > ${b}
4
4
 
@@ -6,7 +6,7 @@ That means you use raw catalog or your catalog doesn't have a translation for th
6
6
  ICU features such as interpolation and plurals will not work properly for that message.
7
7
 
8
8
  Please compile your catalog first.
9
- `)),F(b)&&ne.test(b)?se(b):F(b)?b:_e(b,this._locale,this._locales)(r,t==null?void 0:t.formats)}date(e,r){return K(this._locales||this._locale,e,r)}number(e,r){return G(this._locales||this._locale,e,r)}};function Le(o={}){return new q(o)}var J=Le();import{html as Y,LitElement as Ie}from"lit";import{property as A}from"lit/decorators.js";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)},h=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 ce(o){var e,r,t,a,d,s,i,b,g,y,_,P,v,z,C,m,M,T,X;class me extends o{constructor(...n){var l,u,p;super(...n),e.add(this),this.internals=this.attachInternals(),r.set(this,!1),t.set(this,!1),a.set(this,!1),d.set(this,void 0),s.set(this,void 0),i.set(this,!0),g.set(this,""),y.set(this,()=>{h(this,a,!0,"f"),h(this,r,!0,"f"),c(this,e,"m",m).call(this)}),_.set(this,()=>{h(this,r,!1,"f"),c(this,e,"m",M).call(this,this.shouldFormValueUpdate()?c(this,g,"f"):""),!this.validity.valid&&c(this,a,"f")&&h(this,t,!0,"f");let x=c(this,e,"m",m).call(this);this.validationMessageCallback&&this.validationMessageCallback(x?this.internals.validationMessage:"")}),P.set(this,()=>{var x;c(this,i,"f")&&this.validationTarget&&(this.internals.setValidity(this.validity,this.validationMessage,this.validationTarget),h(this,i,!1,"f")),h(this,a,!0,"f"),h(this,t,!0,"f"),c(this,e,"m",m).call(this),(x=this===null||this===void 0?void 0:this.validationMessageCallback)===null||x===void 0||x.call(this,this.showError?this.internals.validationMessage:"")}),v.set(this,void 0),z.set(this,!1),C.set(this,Promise.resolve()),(l=this.addEventListener)===null||l===void 0||l.call(this,"focus",c(this,y,"f")),(u=this.addEventListener)===null||u===void 0||u.call(this,"blur",c(this,_,"f")),(p=this.addEventListener)===null||p===void 0||p.call(this,"invalid",c(this,P,"f")),this.setValue(null)}static get formAssociated(){return!0}static get validators(){return this.formControlValidators||[]}static get observedAttributes(){let n=this.validators.map(p=>p.attribute).flat(),l=super.observedAttributes||[];return[...new Set([...l,...n])]}static getValidator(n){return this.validators.find(l=>l.attribute===n)||null}static getValidators(n){return this.validators.filter(l=>{var u;if(l.attribute===n||!((u=l.attribute)===null||u===void 0)&&u.includes(n))return!0})}get form(){return this.internals.form}get showError(){return c(this,e,"m",m).call(this)}checkValidity(){return this.internals.checkValidity()}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}attributeChangedCallback(n,l,u){var p;(p=super.attributeChangedCallback)===null||p===void 0||p.call(this,n,l,u);let j=this.constructor.getValidators(n);j!=null&&j.length&&this.validationTarget&&this.setValue(c(this,g,"f"))}setValue(n){var l;h(this,t,!1,"f"),(l=this.validationMessageCallback)===null||l===void 0||l.call(this,""),h(this,g,n,"f");let p=this.shouldFormValueUpdate()?n:null;this.internals.setFormValue(p),c(this,e,"m",M).call(this,p),this.valueChangedCallback&&this.valueChangedCallback(p),c(this,e,"m",m).call(this)}shouldFormValueUpdate(){return!0}get validationComplete(){return new Promise(n=>n(c(this,C,"f")))}formResetCallback(){var n,l;h(this,a,!1,"f"),h(this,t,!1,"f"),c(this,e,"m",m).call(this),(n=this.resetFormControl)===null||n===void 0||n.call(this),(l=this.validationMessageCallback)===null||l===void 0||l.call(this,c(this,e,"m",m).call(this)?this.validationMessage:"")}}return r=new WeakMap,t=new WeakMap,a=new WeakMap,d=new WeakMap,s=new WeakMap,i=new WeakMap,g=new WeakMap,y=new WeakMap,_=new WeakMap,P=new WeakMap,v=new WeakMap,z=new WeakMap,C=new WeakMap,e=new WeakSet,b=function(){let n=this.getRootNode(),l=`${this.localName}[name="${this.getAttribute("name")}"]`;return n.querySelectorAll(l)},m=function(){if(this.hasAttribute("disabled"))return!1;let n=c(this,t,"f")||c(this,a,"f")&&!this.validity.valid&&!c(this,r,"f");return n&&this.internals.states?this.internals.states.add("--show-error"):this.internals.states&&this.internals.states.delete("--show-error"),n},M=function(n){let l=this.constructor,u={},p=l.validators,x=[],j=p.some(f=>f.isValid instanceof Promise);c(this,z,"f")||(h(this,C,new Promise(f=>{h(this,v,f,"f")}),"f"),h(this,z,!0,"f")),c(this,d,"f")&&(c(this,d,"f").abort(),h(this,s,c(this,d,"f"),"f"));let $=new AbortController;h(this,d,$,"f");let D,te=!1;p.length&&(p.forEach(f=>{let W=f.key||"customError",S=f.isValid(this,n,$.signal);S instanceof Promise?(x.push(S),S.then(Z=>{Z!=null&&(u[W]=!Z,D=c(this,e,"m",X).call(this,f,n),c(this,e,"m",T).call(this,u,D))})):(u[W]=!S,this.validity[W]!==!S&&(te=!0),!S&&!D&&(D=c(this,e,"m",X).call(this,f,n)))}),Promise.allSettled(x).then(()=>{var f;$!=null&&$.signal.aborted||(h(this,z,!1,"f"),(f=c(this,v,"f"))===null||f===void 0||f.call(this))}),(te||!j)&&c(this,e,"m",T).call(this,u,D))},T=function(n,l){if(this.validationTarget)this.internals.setValidity(n,l,this.validationTarget),h(this,i,!1,"f");else{if(this.internals.setValidity(n,l),this.internals.validity.valid)return;h(this,i,!0,"f")}},X=function(n,l){if(this.validityCallback){let u=this.validityCallback(n.key||"customError");if(u)return u}return n.message instanceof Function?n.message(this,l):n.message},me}import{css as de}from"lit";var be=de`
9
+ `)),F(b)&&ne.test(b)?se(b):F(b)?b:_e(b,this._locale,this._locales)(r,o?.formats)}date(e,r){return K(this._locales||this._locale,e,r)}number(e,r){return G(this._locales||this._locale,e,r)}};function Le(t={}){return new q(t)}var J=Le();import{html as Y,LitElement as Ie}from"lit";import{property as A}from"lit/decorators.js";var c=function(t,e,r,o){if(r==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?o:r==="a"?o.call(t):o?o.value:e.get(t)},h=function(t,e,r,o,a){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!a:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?a.call(t,r):a?a.value=r:e.set(t,r),r};function ce(t){var e,r,o,a,d,s,n,b,g,y,_,P,v,z,C,m,M,V,X;class me extends t{constructor(...i){var l,u,p;super(...i),e.add(this),this.internals=this.attachInternals(),r.set(this,!1),o.set(this,!1),a.set(this,!1),d.set(this,void 0),s.set(this,void 0),n.set(this,!0),g.set(this,""),y.set(this,()=>{h(this,a,!0,"f"),h(this,r,!0,"f"),c(this,e,"m",m).call(this)}),_.set(this,()=>{h(this,r,!1,"f"),c(this,e,"m",M).call(this,this.shouldFormValueUpdate()?c(this,g,"f"):""),!this.validity.valid&&c(this,a,"f")&&h(this,o,!0,"f");let x=c(this,e,"m",m).call(this);this.validationMessageCallback&&this.validationMessageCallback(x?this.internals.validationMessage:"")}),P.set(this,()=>{var x;c(this,n,"f")&&this.validationTarget&&(this.internals.setValidity(this.validity,this.validationMessage,this.validationTarget),h(this,n,!1,"f")),h(this,a,!0,"f"),h(this,o,!0,"f"),c(this,e,"m",m).call(this),(x=this===null||this===void 0?void 0:this.validationMessageCallback)===null||x===void 0||x.call(this,this.showError?this.internals.validationMessage:"")}),v.set(this,void 0),z.set(this,!1),C.set(this,Promise.resolve()),(l=this.addEventListener)===null||l===void 0||l.call(this,"focus",c(this,y,"f")),(u=this.addEventListener)===null||u===void 0||u.call(this,"blur",c(this,_,"f")),(p=this.addEventListener)===null||p===void 0||p.call(this,"invalid",c(this,P,"f")),this.setValue(null)}static get formAssociated(){return!0}static get validators(){return this.formControlValidators||[]}static get observedAttributes(){let i=this.validators.map(p=>p.attribute).flat(),l=super.observedAttributes||[];return[...new Set([...l,...i])]}static getValidator(i){return this.validators.find(l=>l.attribute===i)||null}static getValidators(i){return this.validators.filter(l=>{var u;if(l.attribute===i||!((u=l.attribute)===null||u===void 0)&&u.includes(i))return!0})}get form(){return this.internals.form}get showError(){return c(this,e,"m",m).call(this)}checkValidity(){return this.internals.checkValidity()}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}attributeChangedCallback(i,l,u){var p;(p=super.attributeChangedCallback)===null||p===void 0||p.call(this,i,l,u);let $=this.constructor.getValidators(i);$?.length&&this.validationTarget&&this.setValue(c(this,g,"f"))}setValue(i){var l;h(this,o,!1,"f"),(l=this.validationMessageCallback)===null||l===void 0||l.call(this,""),h(this,g,i,"f");let p=this.shouldFormValueUpdate()?i:null;this.internals.setFormValue(p),c(this,e,"m",M).call(this,p),this.valueChangedCallback&&this.valueChangedCallback(p),c(this,e,"m",m).call(this)}shouldFormValueUpdate(){return!0}get validationComplete(){return new Promise(i=>i(c(this,C,"f")))}formResetCallback(){var i,l;h(this,a,!1,"f"),h(this,o,!1,"f"),c(this,e,"m",m).call(this),(i=this.resetFormControl)===null||i===void 0||i.call(this),(l=this.validationMessageCallback)===null||l===void 0||l.call(this,c(this,e,"m",m).call(this)?this.validationMessage:"")}}return r=new WeakMap,o=new WeakMap,a=new WeakMap,d=new WeakMap,s=new WeakMap,n=new WeakMap,g=new WeakMap,y=new WeakMap,_=new WeakMap,P=new WeakMap,v=new WeakMap,z=new WeakMap,C=new WeakMap,e=new WeakSet,b=function(){let i=this.getRootNode(),l=`${this.localName}[name="${this.getAttribute("name")}"]`;return i.querySelectorAll(l)},m=function(){if(this.hasAttribute("disabled"))return!1;let i=c(this,o,"f")||c(this,a,"f")&&!this.validity.valid&&!c(this,r,"f");return i&&this.internals.states?this.internals.states.add("--show-error"):this.internals.states&&this.internals.states.delete("--show-error"),i},M=function(i){let l=this.constructor,u={},p=l.validators,x=[],$=p.some(f=>f.isValid instanceof Promise);c(this,z,"f")||(h(this,C,new Promise(f=>{h(this,v,f,"f")}),"f"),h(this,z,!0,"f")),c(this,d,"f")&&(c(this,d,"f").abort(),h(this,s,c(this,d,"f"),"f"));let j=new AbortController;h(this,d,j,"f");let D,oe=!1;p.length&&(p.forEach(f=>{let W=f.key||"customError",S=f.isValid(this,i,j.signal);S instanceof Promise?(x.push(S),S.then(Z=>{Z!=null&&(u[W]=!Z,D=c(this,e,"m",X).call(this,f,i),c(this,e,"m",V).call(this,u,D))})):(u[W]=!S,this.validity[W]!==!S&&(oe=!0),!S&&!D&&(D=c(this,e,"m",X).call(this,f,i)))}),Promise.allSettled(x).then(()=>{var f;j?.signal.aborted||(h(this,z,!1,"f"),(f=c(this,v,"f"))===null||f===void 0||f.call(this))}),(oe||!$)&&c(this,e,"m",V).call(this,u,D))},V=function(i,l){if(this.validationTarget)this.internals.setValidity(i,l,this.validationTarget),h(this,n,!1,"f");else{if(this.internals.setValidity(i,l),this.internals.validity.valid)return;h(this,n,!0,"f")}},X=function(i,l){if(this.validityCallback){let u=this.validityCallback(i.key||"customError");if(u)return u}return i.message instanceof Function?i.message(this,l):i.message},me}import{css as de}from"lit";var be=de`
10
10
  *,
11
11
  :before,
12
12
  :after {
@@ -2445,7 +2445,7 @@ Please compile your catalog first.
2445
2445
  display: none
2446
2446
  }
2447
2447
  }
2448
- `;import{css as Pe}from"lit";var ue=Pe`*,: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}.focus\\:\\[--w-outline-offset\\:-2px\\]:focus{--w-outline-offset:-2px}.bg-transparent{background-color:#0000}.rounded-4{border-radius:4px}.block{display:block}.flex{display:flex}.focusable:focus{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:not(:focus-visible){outline:none}.items-center{align-items:center}.bottom-0{bottom:0}.left-0{left:0}.right-0{right:0}.top-0{top:0}.justify-center{justify-content:center}.absolute{position:absolute}.relative{position:relative}.static{position:static}.s-text{color:var(--w-s-color-text)}.w-40{width:4rem}.w-max{width:max-content}.pb-0{padding-bottom:0}.pl-12{padding-left:1.2rem}.pr-12{padding-right:1.2rem}.cursor-default{cursor:default}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-smoothing:grayscale}.font-bold{font-weight:700}.text-xs{font-size:var(--w-font-size-xs);line-height:var(--w-line-height-xs)}`;import{html as Te,LitElement as Ve}from"lit";import{property as Q,state as je}from"lit/decorators.js";import{classMap as $e}from"lit/directives/class-map.js";import{css as Se}from"lit";var he=Se`
2448
+ `;import{css as Pe}from"lit";var ue=Pe`*,: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}.focus\\:\\[--w-outline-offset\\:-2px\\]:focus{--w-outline-offset:-2px}.bg-transparent{background-color:#0000}.rounded-4{border-radius:4px}.block{display:block}.flex{display:flex}.focusable:focus{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:not(:focus-visible){outline:none}.items-center{align-items:center}.bottom-0{bottom:0}.left-0{left:0}.right-0{right:0}.top-0{top:0}.justify-center{justify-content:center}.absolute{position:absolute}.relative{position:relative}.static{position:static}.s-text{color:var(--w-s-color-text)}.w-40{width:4rem}.w-max{width:max-content}.pb-0{padding-bottom:0}.pl-12{padding-left:1.2rem}.pr-12{padding-right:1.2rem}.cursor-default{cursor:default}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-smoothing:grayscale}.font-bold{font-weight:700}.text-xs{font-size:var(--w-font-size-xs);line-height:var(--w-line-height-xs)}`;import{html as Ve,LitElement as Te}from"lit";import{property as Q,state as $e}from"lit/decorators.js";import{classMap as je}from"lit/directives/class-map.js";import{css as Se}from"lit";var he=Se`
2449
2449
  :host {
2450
2450
  display: inline-block;
2451
2451
  }
@@ -2470,7 +2470,7 @@ Please compile your catalog first.
2470
2470
  --w-icon-size: 32px;
2471
2471
  }
2472
2472
 
2473
- `;var ee=new Map,De='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>';function Ye(o,e={}){var t;let r=(t=e.responseParser)!=null?t:(a=>a.text());return ee.has(o)||ee.set(o,fetch(o).then(r)),ee.get(o)}var E=class extends Ve{constructor(){super(...arguments);this.locale=document.documentElement.lang||"en";this.svg=null}async fetchIcon(r){let t=`https://assets.finn.no/pkg/eikons/v1/${this.locale}/${r}.svg`;try{let a=await Ye(t);return new DOMParser().parseFromString(a,"text/html").body.querySelector("svg")}catch(a){return null}}firstUpdated(){this.loadIcon()}updated(r){(r.has("name")||r.has("locale"))&&this.loadIcon()}async loadIcon(){if(!this.name){this.svg=null;return}let r=await this.fetchIcon(this.name);r||(r=new DOMParser().parseFromString(De,"text/html").body.firstElementChild),this.svg=r}render(){let r=this.size||"medium",t=this.name||"",a={"w-icon":!0,"w-icon--s":r==="small","w-icon--m":r==="medium","w-icon--l":r==="large"},d=typeof r=="string"&&r.endsWith("px")?`--w-icon-size: ${r};`:"";return Te`<div class="${$e(a)}" style="${d}" part="w-${t.toLowerCase()}">${this.svg}</div>`}};E.styles=[he],w([Q({type:String,reflect:!0})],E.prototype,"name",2),w([Q({type:String,reflect:!0})],E.prototype,"size",2),w([Q({type:String,reflect:!0,useDefault:!0})],E.prototype,"locale",2),w([je()],E.prototype,"svg",2);customElements.get("w-icon")||customElements.define("w-icon",E);var Ae=["en","nb","fi","da","sv"],re="en",I=o=>Ae.find(e=>o===e||o.toLowerCase().includes(e))||re;function R(){if(typeof window=="undefined"){let o=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return I(o)}try{let o=pe(document);if(o)return I(o);let e=Ne();if(e)return I(e);let r=pe(Oe());return r?I(r):re}catch(o){return console.warn("could not detect locale, falling back to source locale",o),re}}function Oe(){var o,e;try{return(e=(o=window.parent)==null?void 0:o.document)!=null?e:null}catch(r){return null}}function pe(o){var e,r;try{return(r=(e=o==null?void 0:o.documentElement)==null?void 0:e.lang)!=null?r:""}catch(t){return""}}function Ne(){var o,e,r;try{return(r=(e=(o=window.frameElement)==null?void 0:o.getAttribute)==null?void 0:e.call(o,"lang"))!=null?r:""}catch(t){return""}}var ge="absolute top-0 bottom-0 flex justify-center items-center focusable rounded-4 focus:[--w-outline-offset:-2px] bg-transparent ",Re={wrapper:ge+"right-0",wrapperWithLabel:"w-max pr-12",wrapperWithIcon:"w-40",label:"antialiased block relative cursor-default pb-0 font-bold text-xs s-text"},Xe={wrapper:ge+"left-0",wrapperWithLabel:"w-max pl-12",wrapperWithIcon:"w-40",label:"antialiased block relative cursor-default pb-0 font-bold text-xs s-text"},k=class extends ce(Ie){constructor(){super(...arguments);this.ariaLabel=null;this.clear=!1;this.search=!1;this.label="";this.icon=null}get _classBase(){return this.slot==="suffix"?Re:Xe}get _classes(){return B([this._classBase.wrapper,this.label?this._classBase.wrapperWithLabel:this._classBase.wrapperWithIcon])}resetContainingTextField(r){let t=this.closest("w-textfield");t&&t.resetFormControl(),r.stopPropagation()}submitContainingForm(r){let t=this.internals.form;t&&t.submit(),r.stopPropagation()}get _searchButton(){let r=this.ariaLabel||J._({id:"affix.aria.search",message:"Search",comment:"Aria label for the search button in affix"});return Y`
2473
+ `;var ee=new Map,De='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>';function Ye(t,e={}){let r=e.responseParser??(o=>o.text());return ee.has(t)||ee.set(t,fetch(t).then(r)),ee.get(t)}var E=class extends Te{constructor(){super(...arguments);this.locale=document.documentElement.lang||"en";this.svg=null}async fetchIcon(r){let o=`https://assets.finn.no/pkg/eikons/v1/${this.locale}/${r}.svg`;try{let a=await Ye(o);return new DOMParser().parseFromString(a,"text/html").body.querySelector("svg")}catch{return null}}firstUpdated(){this.loadIcon()}updated(r){(r.has("name")||r.has("locale"))&&this.loadIcon()}async loadIcon(){if(!this.name){this.svg=null;return}let r=await this.fetchIcon(this.name);r||(r=new DOMParser().parseFromString(De,"text/html").body.firstElementChild),this.svg=r}render(){let r=this.size||"medium",o=this.name||"",a={"w-icon":!0,"w-icon--s":r==="small","w-icon--m":r==="medium","w-icon--l":r==="large"},d=typeof r=="string"&&r.endsWith("px")?`--w-icon-size: ${r};`:"";return Ve`<div class="${je(a)}" style="${d}" part="w-${o.toLowerCase()}">${this.svg}</div>`}};E.styles=[he],w([Q({type:String,reflect:!0})],E.prototype,"name",2),w([Q({type:String,reflect:!0})],E.prototype,"size",2),w([Q({type:String,reflect:!0,useDefault:!0})],E.prototype,"locale",2),w([$e()],E.prototype,"svg",2);customElements.get("w-icon")||customElements.define("w-icon",E);var Ae=["en","nb","fi","da","sv"],re="en",I=t=>Ae.find(e=>t===e||t.toLowerCase().includes(e))||re;function R(){if(typeof window>"u"){let t=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return I(t)}try{let t=pe(document);if(t)return I(t);let e=Ne();if(e)return I(e);let r=pe(Oe());return r?I(r):re}catch(t){return console.warn("could not detect locale, falling back to source locale",t),re}}function Oe(){try{return window.parent?.document??null}catch{return null}}function pe(t){try{return t?.documentElement?.lang??""}catch{return""}}function Ne(){try{return window.frameElement?.getAttribute?.("lang")??""}catch{return""}}var ge="absolute top-0 bottom-0 flex justify-center items-center focusable rounded-4 focus:[--w-outline-offset:-2px] bg-transparent ",Re={wrapper:ge+"right-0",wrapperWithLabel:"w-max pr-12",wrapperWithIcon:"w-40",label:"antialiased block relative cursor-default pb-0 font-bold text-xs s-text"},Xe={wrapper:ge+"left-0",wrapperWithLabel:"w-max pl-12",wrapperWithIcon:"w-40",label:"antialiased block relative cursor-default pb-0 font-bold text-xs s-text"},k=class extends ce(Ie){constructor(){super(...arguments);this.ariaLabel=null;this.clear=!1;this.search=!1;this.label="";this.icon=null}get _classBase(){return this.slot==="suffix"?Re:Xe}get _classes(){return B([this._classBase.wrapper,this.label?this._classBase.wrapperWithLabel:this._classBase.wrapperWithIcon])}resetContainingTextField(r){let o=this.closest("w-textfield");o&&o.resetFormControl(),r.stopPropagation()}submitContainingForm(r){let o=this.internals.form;o&&o.submit(),r.stopPropagation()}get _searchButton(){let r=this.ariaLabel||J._({id:"affix.aria.search",message:"Search",comment:"Aria label for the search button in affix"});return Y`
2474
2474
  <button aria-label="${r}" class="${this._classes}" type="submit" @click="${this.submitContainingForm.bind(this)}">
2475
2475
  <w-icon name="Search" size="small" locale="${R()}" class="flex"></w-icon>
2476
2476
  </button>