@maggioli-design-system/mds-push-notification 2.0.0 → 2.1.0

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 (42) hide show
  1. package/dist/cjs/mds-push-notification.cjs.entry.js +2 -2
  2. package/dist/collection/common/aria.js +17 -1
  3. package/dist/collection/common/device.js +6 -0
  4. package/dist/collection/common/keyboard-manager.js +2 -2
  5. package/dist/collection/components/mds-push-notification/mds-push-notification.js +2 -2
  6. package/dist/collection/dictionary/file-extensions.js +114 -56
  7. package/dist/collection/dictionary/text.js +60 -1
  8. package/dist/components/mds-push-notification.js +2 -2
  9. package/dist/documentation.json +1 -1
  10. package/dist/esm/mds-push-notification.entry.js +2 -2
  11. package/dist/esm-es5/mds-push-notification.entry.js +1 -1
  12. package/dist/mds-push-notification/mds-push-notification.esm.js +1 -1
  13. package/dist/mds-push-notification/{p-a2522b82.system.entry.js → p-270d3ce4.system.entry.js} +2 -2
  14. package/dist/mds-push-notification/p-9d064301.system.js +1 -1
  15. package/dist/mds-push-notification/p-c60d85de.entry.js +6 -0
  16. package/dist/stats.json +18 -17
  17. package/dist/types/common/aria.d.ts +3 -1
  18. package/dist/types/common/device.d.ts +2 -0
  19. package/dist/types/dictionary/text.d.ts +3 -1
  20. package/dist/types/type/text.d.ts +2 -0
  21. package/documentation.json +9 -4
  22. package/package.json +4 -4
  23. package/src/common/aria.ts +22 -2
  24. package/src/common/device.ts +9 -0
  25. package/src/common/keyboard-manager.ts +2 -2
  26. package/src/components/mds-push-notification/mds-push-notification.tsx +2 -2
  27. package/src/components/mds-push-notification/test/mds-push-notification.spec.tsx +2 -2
  28. package/src/dictionary/file-extensions.ts +115 -56
  29. package/src/dictionary/text.ts +64 -0
  30. package/src/fixtures/icons.json +8 -0
  31. package/src/fixtures/iconsauce.json +5 -0
  32. package/src/meta/file-format/locale.el.json +39 -0
  33. package/src/meta/file-format/locale.en.json +39 -0
  34. package/src/meta/file-format/locale.es.json +39 -0
  35. package/src/meta/file-format/locale.it.json +39 -0
  36. package/src/type/text.ts +59 -0
  37. package/www/build/mds-push-notification.esm.js +1 -1
  38. package/www/build/{p-a2522b82.system.entry.js → p-270d3ce4.system.entry.js} +2 -2
  39. package/www/build/p-9d064301.system.js +1 -1
  40. package/www/build/p-c60d85de.entry.js +6 -0
  41. package/dist/mds-push-notification/p-3484acd7.entry.js +0 -6
  42. package/www/build/p-3484acd7.entry.js +0 -6
@@ -1062,9 +1062,9 @@ const MdsPushNotification = class {
1062
1062
  }
1063
1063
  render() {
1064
1064
  var _a;
1065
- return (index.h(index.Host, { key: '682d4b39768b61439873b6ac308fb69d4c0bd32c' }, ((_a = this.icon) !== null && _a !== void 0 ? _a : this.preview === 'avatar') && index.h("mds-avatar", { key: '2ea4ca72b7b3ce2077612ec1083369e1a638f69b', class: "avatar", icon: this.icon, initials: this.initials, part: "avatar", src: this.src, tone: this.tone, variant: this.variant }), this.src && this.preview !== 'avatar' && index.h("mds-img", { key: 'e128e32c4421aa07640898a2139780cfe21962e1', class: "picture", part: "picture", src: this.src }), index.h("div", { key: 'e38b8e1e6eaa637e6a75f9ea22b3f143cc420b8f', class: "content", part: "content" }, index.h("header", { key: '0673a643d9f5f0c4350df429e8b4a782cca0c6f0' }, index.h("div", { key: 'edfceaf57ce5c6c6597c5864be5e12ac3d64e842', class: "infos" }, this.hasBadge && index.h("div", { key: '984d185fd61df8d68986bbd6a46874c0e60b3070' }, index.h("slot", { key: '91533f3a68cc370c80d7f29206861e3dd2e5144a', name: "badge" })), this.subject && index.h("mds-text", { key: '6b25611c4570c83e7fdef45d47611b064f454aa4', class: "subject", typography: "h6", variant: "title", truncate: "all" }, this.subject)), this.datetime && index.h("mds-text", { key: '7b28326ef4929415fa98f116da9bc41fd4efe3fa', class: "time", typography: "option" }, this.dateFormat === 'timeago'
1065
+ return (index.h(index.Host, { key: '682d4b39768b61439873b6ac308fb69d4c0bd32c' }, ((_a = this.icon) !== null && _a !== void 0 ? _a : this.preview === 'avatar') && index.h("mds-avatar", { key: '2ea4ca72b7b3ce2077612ec1083369e1a638f69b', class: "avatar", icon: this.icon, initials: this.initials, part: "avatar", src: this.src, tone: this.tone, variant: this.variant }), this.src && this.preview !== 'avatar' && index.h("mds-img", { key: 'e128e32c4421aa07640898a2139780cfe21962e1', class: "picture", part: "picture", src: this.src }), index.h("div", { key: 'e38b8e1e6eaa637e6a75f9ea22b3f143cc420b8f', class: "content", part: "content" }, index.h("div", { key: 'fe60e8aea9f4000bf9f31ac1c220bf9c002dcbd3', class: "header" }, index.h("div", { key: '7f9e374181c23bbab5241ba0565d96c6a2bf03e3', class: "infos" }, this.hasBadge && index.h("div", { key: '6387436e7e79d3055e7ff598a5b5b545dd22d19c' }, index.h("slot", { key: '6e9b980cbe8de429bd3efc394006a89c2917fbcd', name: "badge" })), this.subject && index.h("mds-text", { key: '699b5966d694cb9cee8c3614c2d49743f020bb93', class: "subject", typography: "h6", variant: "title", truncate: "all" }, this.subject)), this.datetime && index.h("mds-text", { key: '44a473a607e2f5c3be55313fd0f5722d6635017c', class: "time", typography: "option" }, this.dateFormat === 'timeago'
1066
1066
  ? dayjs(this.datetime).fromNow()
1067
- : dayjs(this.datetime).format(this.dateFormat))), index.h("mds-text", { key: '35fbaa45a75692110b5cb208890eef2c950142bf', class: "message", truncate: "all", typography: "caption", variant: "info" }, this.message), this.hasActions && index.h("div", { key: 'e598977250e3ada7945e941f2df452f99d2e37ee', class: "actions", part: "actions" }, index.h("slot", { key: 'd2310a3fbd53d9cda3b51d92f0f00476c9958537', name: "actions" }))), this.deletable && index.h("mds-button", { key: 'c4910b11b63b52fbfc7b8d3e8aa6a848bd408d54', class: "close-button", title: this.t.get('dismiss'), icon: miBaselineCancel, onClick: this.onClickClose.bind(this) })));
1067
+ : dayjs(this.datetime).format(this.dateFormat))), index.h("mds-text", { key: '06bcc873d47b26418a71a7e2064c6bebe786a6c3', class: "message", truncate: "all", typography: "caption", variant: "info" }, this.message), this.hasActions && index.h("div", { key: 'c5de013ae3f29e2e972576b6c6a012de935a7491', class: "actions", part: "actions" }, index.h("slot", { key: 'bfe621eff62949f8416f695e8c2a85a430674044', name: "actions" }))), this.deletable && index.h("mds-button", { key: '6d2970a2aaf90f5a9ce1be74da0da78b3a1b2016', class: "close-button", title: this.t.get('dismiss'), icon: miBaselineCancel, onClick: this.onClickClose.bind(this) })));
1068
1068
  }
1069
1069
  get host() { return index.getElement(this); }
1070
1070
  };
@@ -18,6 +18,22 @@ const setAttributeIfEmpty = (element, attribute, value) => {
18
18
  element.setAttribute(attribute, value);
19
19
  return value;
20
20
  };
21
+ const removeAttributesIf = (element, attribute, valueCheck = 'true', cleanAttributes) => {
22
+ if (ifAttribute(element, attribute, valueCheck)) {
23
+ const attributesList = Array.isArray(cleanAttributes) ? cleanAttributes : [cleanAttributes];
24
+ attributesList.forEach(attributeToRemove => {
25
+ element.removeAttribute(attributeToRemove);
26
+ });
27
+ return true;
28
+ }
29
+ return false;
30
+ };
31
+ const ifAttribute = (element, attribute, valueCheck = 'true') => {
32
+ if (element.hasAttribute(attribute) && element.getAttribute(attribute) === valueCheck) {
33
+ return true;
34
+ }
35
+ return false;
36
+ };
21
37
  const hashValue = (value) => `${value}-${hash(value)}`;
22
38
  const hashRandomValue = (value) => {
23
39
  const randomValue = randomInt(1000000);
@@ -26,4 +42,4 @@ const hashRandomValue = (value) => {
26
42
  }
27
43
  return hash(randomValue.toString());
28
44
  };
29
- export { unslugName, setAttributeIfEmpty, hashRandomValue, hashValue, };
45
+ export { hashRandomValue, hashValue, removeAttributesIf, setAttributeIfEmpty, ifAttribute, unslugName, };
@@ -0,0 +1,6 @@
1
+ const isMobileDevice = () => {
2
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3
+ const userAgent = navigator.userAgent || navigator.vendor || window.opera;
4
+ return /android|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(userAgent);
5
+ };
6
+ export { isMobileDevice, };
@@ -31,13 +31,13 @@ export class KeyboardManager {
31
31
  };
32
32
  this.attachEscapeBehavior = (callback) => {
33
33
  this.escapeCallback = callback;
34
- if (window !== undefined) {
34
+ if (typeof window !== 'undefined') {
35
35
  window.addEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
36
36
  }
37
37
  };
38
38
  this.detachEscapeBehavior = () => {
39
39
  this.escapeCallback = () => { return; };
40
- if (window !== undefined) {
40
+ if (typeof window !== 'undefined') {
41
41
  window.removeEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
42
42
  }
43
43
  };
@@ -72,9 +72,9 @@ export class MdsPushNotification {
72
72
  }
73
73
  render() {
74
74
  var _a;
75
- return (h(Host, { key: '682d4b39768b61439873b6ac308fb69d4c0bd32c' }, ((_a = this.icon) !== null && _a !== void 0 ? _a : this.preview === 'avatar') && h("mds-avatar", { key: '2ea4ca72b7b3ce2077612ec1083369e1a638f69b', class: "avatar", icon: this.icon, initials: this.initials, part: "avatar", src: this.src, tone: this.tone, variant: this.variant }), this.src && this.preview !== 'avatar' && h("mds-img", { key: 'e128e32c4421aa07640898a2139780cfe21962e1', class: "picture", part: "picture", src: this.src }), h("div", { key: 'e38b8e1e6eaa637e6a75f9ea22b3f143cc420b8f', class: "content", part: "content" }, h("header", { key: '0673a643d9f5f0c4350df429e8b4a782cca0c6f0' }, h("div", { key: 'edfceaf57ce5c6c6597c5864be5e12ac3d64e842', class: "infos" }, this.hasBadge && h("div", { key: '984d185fd61df8d68986bbd6a46874c0e60b3070' }, h("slot", { key: '91533f3a68cc370c80d7f29206861e3dd2e5144a', name: "badge" })), this.subject && h("mds-text", { key: '6b25611c4570c83e7fdef45d47611b064f454aa4', class: "subject", typography: "h6", variant: "title", truncate: "all" }, this.subject)), this.datetime && h("mds-text", { key: '7b28326ef4929415fa98f116da9bc41fd4efe3fa', class: "time", typography: "option" }, this.dateFormat === 'timeago'
75
+ return (h(Host, { key: '682d4b39768b61439873b6ac308fb69d4c0bd32c' }, ((_a = this.icon) !== null && _a !== void 0 ? _a : this.preview === 'avatar') && h("mds-avatar", { key: '2ea4ca72b7b3ce2077612ec1083369e1a638f69b', class: "avatar", icon: this.icon, initials: this.initials, part: "avatar", src: this.src, tone: this.tone, variant: this.variant }), this.src && this.preview !== 'avatar' && h("mds-img", { key: 'e128e32c4421aa07640898a2139780cfe21962e1', class: "picture", part: "picture", src: this.src }), h("div", { key: 'e38b8e1e6eaa637e6a75f9ea22b3f143cc420b8f', class: "content", part: "content" }, h("div", { key: 'fe60e8aea9f4000bf9f31ac1c220bf9c002dcbd3', class: "header" }, h("div", { key: '7f9e374181c23bbab5241ba0565d96c6a2bf03e3', class: "infos" }, this.hasBadge && h("div", { key: '6387436e7e79d3055e7ff598a5b5b545dd22d19c' }, h("slot", { key: '6e9b980cbe8de429bd3efc394006a89c2917fbcd', name: "badge" })), this.subject && h("mds-text", { key: '699b5966d694cb9cee8c3614c2d49743f020bb93', class: "subject", typography: "h6", variant: "title", truncate: "all" }, this.subject)), this.datetime && h("mds-text", { key: '44a473a607e2f5c3be55313fd0f5722d6635017c', class: "time", typography: "option" }, this.dateFormat === 'timeago'
76
76
  ? dayjs(this.datetime).fromNow()
77
- : dayjs(this.datetime).format(this.dateFormat))), h("mds-text", { key: '35fbaa45a75692110b5cb208890eef2c950142bf', class: "message", truncate: "all", typography: "caption", variant: "info" }, this.message), this.hasActions && h("div", { key: 'e598977250e3ada7945e941f2df452f99d2e37ee', class: "actions", part: "actions" }, h("slot", { key: 'd2310a3fbd53d9cda3b51d92f0f00476c9958537', name: "actions" }))), this.deletable && h("mds-button", { key: 'c4910b11b63b52fbfc7b8d3e8aa6a848bd408d54', class: "close-button", title: this.t.get('dismiss'), icon: miBaselineCancel, onClick: this.onClickClose.bind(this) })));
77
+ : dayjs(this.datetime).format(this.dateFormat))), h("mds-text", { key: '06bcc873d47b26418a71a7e2064c6bebe786a6c3', class: "message", truncate: "all", typography: "caption", variant: "info" }, this.message), this.hasActions && h("div", { key: 'c5de013ae3f29e2e972576b6c6a012de935a7491', class: "actions", part: "actions" }, h("slot", { key: 'bfe621eff62949f8416f695e8c2a85a430674044', name: "actions" }))), this.deletable && h("mds-button", { key: '6d2970a2aaf90f5a9ce1be74da0da78b3a1b2016', class: "close-button", title: this.t.get('dismiss'), icon: miBaselineCancel, onClick: this.onClickClose.bind(this) })));
78
78
  }
79
79
  static get is() { return "mds-push-notification"; }
80
80
  static get encapsulation() { return "shadow"; }
@@ -1,61 +1,119 @@
1
1
  const fileExtensionsDictionary = {
2
- '7z': { format: 'archive', description: 'Archivio compresso' },
3
- ace: { format: 'archive', description: 'Archivio compresso' },
4
- ai: { format: 'vector', description: 'Vettoriale Adobe Illustrator' },
5
- dart: { format: 'code', description: 'Dart' },
6
- db: { format: 'data', description: 'File di database' },
7
- default: { format: 'attachment', description: 'Formato sconosciuto' },
8
- dmg: { format: 'executable', description: 'Apple Disk Image' },
9
- doc: { format: 'text', description: 'Documento Microsoft Word' },
10
- docm: { format: 'text', description: 'Documento Microsoft Word' },
11
- docx: { format: 'text', description: 'Documento Microsoft Word Compresso' },
12
- eml: { format: 'email', description: 'E-mail di posta elettronica' },
13
- eps: { format: 'vector', description: 'Vettoriale Corel Draw' },
14
- exe: { format: 'executable', description: 'File eseguibile Windows' },
15
- flac: { format: 'audio', description: 'Audio non compresso' },
16
- gif: { format: 'image', description: 'Immagine compressa', preview: true },
17
- htm: { format: 'markup', description: 'Pagina web' },
18
- heic: { format: 'image', description: 'High Efficiency Image File Format' },
19
- html: { format: 'markup', description: 'Pagina web' },
20
- jpe: { format: 'image', description: 'Immagine compressa', preview: true },
21
- jpeg: { format: 'image', description: 'Immagine compressa', preview: true },
22
- jpg: { format: 'image', description: 'Immagine compressa', preview: true },
23
- js: { format: 'code', description: 'JavaScript' },
24
- json: { format: 'data', description: 'JavaScript Object Notation' },
25
- jsx: { format: 'code', description: 'JavaScript' },
26
- m2v: { format: 'video', description: 'Filmato SD' },
27
- mp2: { format: 'audio', description: 'Audio compresso' },
28
- mp3: { format: 'audio', description: 'Audio compresso' },
29
- mp4: { format: 'video', description: 'Filmato HD' },
30
- mp4v: { format: 'video', description: 'Filmato HD' },
31
- mpeg: { format: 'video', description: 'Filmato SD' },
32
- mpg4: { format: 'video', description: 'Filmato SD' },
33
- mpg: { format: 'video', description: 'Filmato SD' },
34
- mpga: { format: 'audio', description: 'Audio compresso' },
35
- odp: { format: 'slide', description: 'Slide di presentazione LibreOffice' },
36
- ods: { format: 'spreadsheet', description: 'Foglio di calcolo LibreOffice' },
37
- odt: { format: 'text', description: 'File di testo LibreOffice' },
38
- pdf: { format: 'document', description: 'Documento Adobe' },
39
- php: { format: 'code', description: 'Hypertext Preprocessor' },
40
- png: { format: 'image', description: 'Immagine Portable Network Graphics', preview: true },
41
- ppt: { format: 'slide', description: 'Slide di presentazione PowerPoint' },
42
- rar: { format: 'archive', description: 'Archivio compresso' },
43
- rtf: { format: 'text', description: 'Documento di testo Rich Text Format' },
44
- sass: { format: 'code', description: 'Syntactically Awesome StyleSheets' },
45
- shtml: { format: 'markup', description: 'Pagina web' },
46
- svg: { format: 'vector', description: 'Scalable Vector Graphics', preview: true },
47
- tar: { format: 'archive', description: 'Archivio non compresso' },
48
- tiff: { format: 'image', description: 'Tag Image File Format' },
49
- ts: { format: 'code', description: 'TypeScript' },
50
- tsx: { format: 'code', description: 'TypeScript Extended Syntax' },
51
- txt: { format: 'text', description: 'Documento di testo non formattato' },
52
- wav: { format: 'audio', description: 'Audio non compresso' },
53
- webp: { format: 'image', description: 'Immagine Web Picture', preview: true },
54
- xar: { format: 'archive', description: 'Archivio compresso' },
55
- xls: { format: 'spreadsheet', description: 'Foglio di calcolo Office' },
56
- xlsx: { format: 'spreadsheet', description: 'Foglio di calcolo Office' },
57
- zip: { format: 'archive', description: 'Archivio compresso' },
2
+ '7z': { format: 'archive', description: 'compressedArchive' },
3
+ ace: { format: 'archive', description: 'compressedArchive' },
4
+ ai: { format: 'vector', description: 'fileAI' },
5
+ dart: { format: 'code', description: 'dart' },
6
+ db: { format: 'data', description: 'fileDB' },
7
+ default: { format: 'attachment', description: 'unknown' },
8
+ dmg: { format: 'executable', description: 'appleDiskImage' },
9
+ doc: { format: 'text', description: 'documentMS' },
10
+ docm: { format: 'text', description: 'documentMS' },
11
+ docx: { format: 'text', description: 'compressedDocumentMS' },
12
+ eml: { format: 'email', description: 'email' },
13
+ eps: { format: 'vector', description: 'fileEPS' },
14
+ exe: { format: 'executable', description: 'fileEXE' },
15
+ flac: { format: 'audio', description: 'uncompressedAudio' },
16
+ gif: { format: 'image', description: 'compressedImage', preview: true },
17
+ htm: { format: 'markup', description: 'documentWeb' },
18
+ heic: { format: 'image', description: 'imageHEFF' },
19
+ html: { format: 'markup', description: 'documentWeb' },
20
+ jpe: { format: 'image', description: 'compressedImage', preview: true },
21
+ jpeg: { format: 'image', description: 'compressedImage', preview: true },
22
+ jpg: { format: 'image', description: 'compressedImage', preview: true },
23
+ js: { format: 'code', description: 'fileJS' },
24
+ json: { format: 'data', description: 'fileJSON' },
25
+ jsx: { format: 'code', description: 'fileJS' },
26
+ m2v: { format: 'video', description: 'videoSD' },
27
+ mp2: { format: 'audio', description: 'compressedAudio' },
28
+ mp3: { format: 'audio', description: 'compressedAudio' },
29
+ mp4: { format: 'video', description: 'videoHD' },
30
+ mp4v: { format: 'video', description: 'videoHD' },
31
+ mpeg: { format: 'video', description: 'videoSD' },
32
+ mpg4: { format: 'video', description: 'videoSD' },
33
+ mpg: { format: 'video', description: 'videoSD' },
34
+ mpga: { format: 'audio', description: 'compressedAudio' },
35
+ odp: { format: 'slide', description: 'slideLO' },
36
+ ods: { format: 'spreadsheet', description: 'spreadsheetLO' },
37
+ odt: { format: 'text', description: 'documentLO' },
38
+ pdf: { format: 'document', description: 'documentAdobe' },
39
+ php: { format: 'code', description: 'filePHP' },
40
+ png: { format: 'image', description: 'imagePNG', preview: true },
41
+ ppt: { format: 'slide', description: 'slidePowerPoint' },
42
+ rar: { format: 'archive', description: 'compressedArchive' },
43
+ rtf: { format: 'text', description: 'documentRTF' },
44
+ sass: { format: 'code', description: 'fileSASS' },
45
+ shtml: { format: 'markup', description: 'documentWeb' },
46
+ svg: { format: 'vector', description: 'imageSVG', preview: true },
47
+ tar: { format: 'archive', description: 'uncompressedArchive' },
48
+ tiff: { format: 'image', description: 'imageTIFF' },
49
+ ts: { format: 'code', description: 'fileTS' },
50
+ tsx: { format: 'code', description: 'fileTSX' },
51
+ txt: { format: 'text', description: 'documentTXT' },
52
+ wav: { format: 'audio', description: 'uncompressedAudio' },
53
+ webp: { format: 'image', description: 'imageWEBP', preview: true },
54
+ xar: { format: 'archive', description: 'compressedArchive' },
55
+ xls: { format: 'spreadsheet', description: 'spreadsheetMS' },
56
+ xlsx: { format: 'spreadsheet', description: 'spreadsheetMS' },
57
+ zip: { format: 'archive', description: 'compressedArchive' },
58
58
  };
59
+ // const fileExtensionsDictionary: FileExtenstion = {
60
+ // '7z': { format: 'archive', description: 'Archivio compresso' },
61
+ // ace: { format: 'archive', description: 'Archivio compresso' },
62
+ // ai: { format: 'vector', description: 'Vettoriale Adobe Illustrator' },
63
+ // dart: { format: 'code', description: 'Dart' },
64
+ // db: { format: 'data', description: 'File di database' },
65
+ // default: { format: 'attachment', description: 'Formato sconosciuto' },
66
+ // dmg: { format: 'executable', description: 'Apple Disk Image' },
67
+ // doc: { format: 'text', description: 'Documento Microsoft Word' },
68
+ // docm: { format: 'text', description: 'Documento Microsoft Word' },
69
+ // docx: { format: 'text', description: 'Documento Microsoft Word Compresso' },
70
+ // eml: { format: 'email', description: 'E-mail di posta elettronica' },
71
+ // eps: { format: 'vector', description: 'Vettoriale Corel Draw' },
72
+ // exe: { format: 'executable', description: 'File eseguibile Windows' },
73
+ // flac: { format: 'audio', description: 'Audio non compresso' },
74
+ // gif: { format: 'image', description: 'Immagine compressa', preview: true },
75
+ // htm: { format: 'markup', description: 'Pagina web' },
76
+ // heic: { format: 'image', description: 'High Efficiency Image File Format' },
77
+ // html: { format: 'markup', description: 'Pagina web' },
78
+ // jpe: { format: 'image', description: 'Immagine compressa', preview: true },
79
+ // jpeg: { format: 'image', description: 'Immagine compressa', preview: true },
80
+ // jpg: { format: 'image', description: 'Immagine compressa', preview: true },
81
+ // js: { format: 'code', description: 'JavaScript' },
82
+ // json: { format: 'data', description: 'JavaScript Object Notation' },
83
+ // jsx: { format: 'code', description: 'JavaScript' },
84
+ // m2v: { format: 'video', description: 'Filmato SD' },
85
+ // mp2: { format: 'audio', description: 'Audio compresso' },
86
+ // mp3: { format: 'audio', description: 'Audio compresso' },
87
+ // mp4: { format: 'video', description: 'Filmato HD' },
88
+ // mp4v: { format: 'video', description: 'Filmato HD' },
89
+ // mpeg: { format: 'video', description: 'Filmato SD' },
90
+ // mpg4: { format: 'video', description: 'Filmato SD' },
91
+ // mpg: { format: 'video', description: 'Filmato SD' },
92
+ // mpga: { format: 'audio', description: 'Audio compresso' },
93
+ // odp: { format: 'slide', description: 'Slide di presentazione LibreOffice' },
94
+ // ods: { format: 'spreadsheet', description: 'Foglio di calcolo LibreOffice' },
95
+ // odt: { format: 'text', description: 'File di testo LibreOffice' },
96
+ // pdf: { format: 'document', description: 'Documento Adobe' },
97
+ // php: { format: 'code', description: 'Hypertext Preprocessor' },
98
+ // png: { format: 'image', description: 'Immagine Portable Network Graphics', preview: true },
99
+ // ppt: { format: 'slide', description: 'Slide di presentazione PowerPoint' },
100
+ // rar: { format: 'archive', description: 'Archivio compresso' },
101
+ // rtf: { format: 'text', description: 'Documento di testo Rich Text Format' },
102
+ // sass: { format: 'code', description: 'Syntactically Awesome StyleSheets' },
103
+ // shtml: { format: 'markup', description: 'Pagina web' },
104
+ // svg: { format: 'vector', description: 'Scalable Vector Graphics', preview: true },
105
+ // tar: { format: 'archive', description: 'Archivio non compresso' },
106
+ // tiff: { format: 'image', description: 'Tag Image File Format' },
107
+ // ts: { format: 'code', description: 'TypeScript' },
108
+ // tsx: { format: 'code', description: 'TypeScript Extended Syntax' },
109
+ // txt: { format: 'text', description: 'Documento di testo non formattato' },
110
+ // wav: { format: 'audio', description: 'Audio non compresso' },
111
+ // webp: { format: 'image', description: 'Immagine Web Picture', preview: true },
112
+ // xar: { format: 'archive', description: 'Archivio compresso' },
113
+ // xls: { format: 'spreadsheet', description: 'Foglio di calcolo Office' },
114
+ // xlsx: { format: 'spreadsheet', description: 'Foglio di calcolo Office' },
115
+ // zip: { format: 'archive', description: 'Archivio compresso' },
116
+ // }
59
117
  const genericMimeToExt = new Map([
60
118
  ['image', ['.png', '.jpg', '.jpeg', '.tiff', '.webp', '.jpe', '.gif', '.heic']],
61
119
  ['audio', ['.mp2', '.mp3', '.mpga', '.wav', '.flac']],
@@ -1,6 +1,65 @@
1
+ const typographyTagDictionary = [
2
+ 'abbr',
3
+ 'address',
4
+ 'article',
5
+ 'b',
6
+ 'bdo',
7
+ 'blockquote',
8
+ 'cite',
9
+ 'code',
10
+ 'dd',
11
+ 'del',
12
+ 'details',
13
+ 'dfn',
14
+ 'div',
15
+ 'dl',
16
+ 'dt',
17
+ 'em',
18
+ 'figcaption',
19
+ 'h1',
20
+ 'h2',
21
+ 'h3',
22
+ 'h4',
23
+ 'h5',
24
+ 'h6',
25
+ 'i',
26
+ 'ins',
27
+ 'kbd',
28
+ 'label',
29
+ 'legend',
30
+ 'li',
31
+ 'mark',
32
+ 'ol',
33
+ 'p',
34
+ 'pre',
35
+ 'q',
36
+ 'rb',
37
+ 'rt',
38
+ 'ruby',
39
+ 's',
40
+ 'samp',
41
+ 'small',
42
+ 'span',
43
+ 'strong',
44
+ 'sub',
45
+ 'summary',
46
+ 'sup',
47
+ 'time',
48
+ 'u',
49
+ 'ul',
50
+ 'var',
51
+ ];
52
+ const typographyHeadingTagDictionary = [
53
+ 'h1',
54
+ 'h2',
55
+ 'h3',
56
+ 'h4',
57
+ 'h5',
58
+ 'h6',
59
+ ];
1
60
  const truncateDictionary = [
2
61
  'all',
3
62
  'none',
4
63
  'word',
5
64
  ];
6
- export { truncateDictionary, };
65
+ export { truncateDictionary, typographyHeadingTagDictionary, typographyTagDictionary, };
@@ -1060,9 +1060,9 @@ const MdsPushNotification$1 = /*@__PURE__*/ proxyCustomElement(class MdsPushNoti
1060
1060
  }
1061
1061
  render() {
1062
1062
  var _a;
1063
- return (h$4(Host, { key: '682d4b39768b61439873b6ac308fb69d4c0bd32c' }, ((_a = this.icon) !== null && _a !== void 0 ? _a : this.preview === 'avatar') && h$4("mds-avatar", { key: '2ea4ca72b7b3ce2077612ec1083369e1a638f69b', class: "avatar", icon: this.icon, initials: this.initials, part: "avatar", src: this.src, tone: this.tone, variant: this.variant }), this.src && this.preview !== 'avatar' && h$4("mds-img", { key: 'e128e32c4421aa07640898a2139780cfe21962e1', class: "picture", part: "picture", src: this.src }), h$4("div", { key: 'e38b8e1e6eaa637e6a75f9ea22b3f143cc420b8f', class: "content", part: "content" }, h$4("header", { key: '0673a643d9f5f0c4350df429e8b4a782cca0c6f0' }, h$4("div", { key: 'edfceaf57ce5c6c6597c5864be5e12ac3d64e842', class: "infos" }, this.hasBadge && h$4("div", { key: '984d185fd61df8d68986bbd6a46874c0e60b3070' }, h$4("slot", { key: '91533f3a68cc370c80d7f29206861e3dd2e5144a', name: "badge" })), this.subject && h$4("mds-text", { key: '6b25611c4570c83e7fdef45d47611b064f454aa4', class: "subject", typography: "h6", variant: "title", truncate: "all" }, this.subject)), this.datetime && h$4("mds-text", { key: '7b28326ef4929415fa98f116da9bc41fd4efe3fa', class: "time", typography: "option" }, this.dateFormat === 'timeago'
1063
+ return (h$4(Host, { key: '682d4b39768b61439873b6ac308fb69d4c0bd32c' }, ((_a = this.icon) !== null && _a !== void 0 ? _a : this.preview === 'avatar') && h$4("mds-avatar", { key: '2ea4ca72b7b3ce2077612ec1083369e1a638f69b', class: "avatar", icon: this.icon, initials: this.initials, part: "avatar", src: this.src, tone: this.tone, variant: this.variant }), this.src && this.preview !== 'avatar' && h$4("mds-img", { key: 'e128e32c4421aa07640898a2139780cfe21962e1', class: "picture", part: "picture", src: this.src }), h$4("div", { key: 'e38b8e1e6eaa637e6a75f9ea22b3f143cc420b8f', class: "content", part: "content" }, h$4("div", { key: 'fe60e8aea9f4000bf9f31ac1c220bf9c002dcbd3', class: "header" }, h$4("div", { key: '7f9e374181c23bbab5241ba0565d96c6a2bf03e3', class: "infos" }, this.hasBadge && h$4("div", { key: '6387436e7e79d3055e7ff598a5b5b545dd22d19c' }, h$4("slot", { key: '6e9b980cbe8de429bd3efc394006a89c2917fbcd', name: "badge" })), this.subject && h$4("mds-text", { key: '699b5966d694cb9cee8c3614c2d49743f020bb93', class: "subject", typography: "h6", variant: "title", truncate: "all" }, this.subject)), this.datetime && h$4("mds-text", { key: '44a473a607e2f5c3be55313fd0f5722d6635017c', class: "time", typography: "option" }, this.dateFormat === 'timeago'
1064
1064
  ? dayjs(this.datetime).fromNow()
1065
- : dayjs(this.datetime).format(this.dateFormat))), h$4("mds-text", { key: '35fbaa45a75692110b5cb208890eef2c950142bf', class: "message", truncate: "all", typography: "caption", variant: "info" }, this.message), this.hasActions && h$4("div", { key: 'e598977250e3ada7945e941f2df452f99d2e37ee', class: "actions", part: "actions" }, h$4("slot", { key: 'd2310a3fbd53d9cda3b51d92f0f00476c9958537', name: "actions" }))), this.deletable && h$4("mds-button", { key: 'c4910b11b63b52fbfc7b8d3e8aa6a848bd408d54', class: "close-button", title: this.t.get('dismiss'), icon: miBaselineCancel, onClick: this.onClickClose.bind(this) })));
1065
+ : dayjs(this.datetime).format(this.dateFormat))), h$4("mds-text", { key: '06bcc873d47b26418a71a7e2064c6bebe786a6c3', class: "message", truncate: "all", typography: "caption", variant: "info" }, this.message), this.hasActions && h$4("div", { key: 'c5de013ae3f29e2e972576b6c6a012de935a7491', class: "actions", part: "actions" }, h$4("slot", { key: 'bfe621eff62949f8416f695e8c2a85a430674044', name: "actions" }))), this.deletable && h$4("mds-button", { key: '6d2970a2aaf90f5a9ce1be74da0da78b3a1b2016', class: "close-button", title: this.t.get('dismiss'), icon: miBaselineCancel, onClick: this.onClickClose.bind(this) })));
1066
1066
  }
1067
1067
  get host() { return this; }
1068
1068
  static get style() { return MdsPushNotificationStyle0; }
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2024-11-25T18:56:26",
2
+ "timestamp": "2024-12-04T16:32:06",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.22.2",
@@ -1058,9 +1058,9 @@ const MdsPushNotification = class {
1058
1058
  }
1059
1059
  render() {
1060
1060
  var _a;
1061
- return (h$4(Host, { key: '682d4b39768b61439873b6ac308fb69d4c0bd32c' }, ((_a = this.icon) !== null && _a !== void 0 ? _a : this.preview === 'avatar') && h$4("mds-avatar", { key: '2ea4ca72b7b3ce2077612ec1083369e1a638f69b', class: "avatar", icon: this.icon, initials: this.initials, part: "avatar", src: this.src, tone: this.tone, variant: this.variant }), this.src && this.preview !== 'avatar' && h$4("mds-img", { key: 'e128e32c4421aa07640898a2139780cfe21962e1', class: "picture", part: "picture", src: this.src }), h$4("div", { key: 'e38b8e1e6eaa637e6a75f9ea22b3f143cc420b8f', class: "content", part: "content" }, h$4("header", { key: '0673a643d9f5f0c4350df429e8b4a782cca0c6f0' }, h$4("div", { key: 'edfceaf57ce5c6c6597c5864be5e12ac3d64e842', class: "infos" }, this.hasBadge && h$4("div", { key: '984d185fd61df8d68986bbd6a46874c0e60b3070' }, h$4("slot", { key: '91533f3a68cc370c80d7f29206861e3dd2e5144a', name: "badge" })), this.subject && h$4("mds-text", { key: '6b25611c4570c83e7fdef45d47611b064f454aa4', class: "subject", typography: "h6", variant: "title", truncate: "all" }, this.subject)), this.datetime && h$4("mds-text", { key: '7b28326ef4929415fa98f116da9bc41fd4efe3fa', class: "time", typography: "option" }, this.dateFormat === 'timeago'
1061
+ return (h$4(Host, { key: '682d4b39768b61439873b6ac308fb69d4c0bd32c' }, ((_a = this.icon) !== null && _a !== void 0 ? _a : this.preview === 'avatar') && h$4("mds-avatar", { key: '2ea4ca72b7b3ce2077612ec1083369e1a638f69b', class: "avatar", icon: this.icon, initials: this.initials, part: "avatar", src: this.src, tone: this.tone, variant: this.variant }), this.src && this.preview !== 'avatar' && h$4("mds-img", { key: 'e128e32c4421aa07640898a2139780cfe21962e1', class: "picture", part: "picture", src: this.src }), h$4("div", { key: 'e38b8e1e6eaa637e6a75f9ea22b3f143cc420b8f', class: "content", part: "content" }, h$4("div", { key: 'fe60e8aea9f4000bf9f31ac1c220bf9c002dcbd3', class: "header" }, h$4("div", { key: '7f9e374181c23bbab5241ba0565d96c6a2bf03e3', class: "infos" }, this.hasBadge && h$4("div", { key: '6387436e7e79d3055e7ff598a5b5b545dd22d19c' }, h$4("slot", { key: '6e9b980cbe8de429bd3efc394006a89c2917fbcd', name: "badge" })), this.subject && h$4("mds-text", { key: '699b5966d694cb9cee8c3614c2d49743f020bb93', class: "subject", typography: "h6", variant: "title", truncate: "all" }, this.subject)), this.datetime && h$4("mds-text", { key: '44a473a607e2f5c3be55313fd0f5722d6635017c', class: "time", typography: "option" }, this.dateFormat === 'timeago'
1062
1062
  ? dayjs(this.datetime).fromNow()
1063
- : dayjs(this.datetime).format(this.dateFormat))), h$4("mds-text", { key: '35fbaa45a75692110b5cb208890eef2c950142bf', class: "message", truncate: "all", typography: "caption", variant: "info" }, this.message), this.hasActions && h$4("div", { key: 'e598977250e3ada7945e941f2df452f99d2e37ee', class: "actions", part: "actions" }, h$4("slot", { key: 'd2310a3fbd53d9cda3b51d92f0f00476c9958537', name: "actions" }))), this.deletable && h$4("mds-button", { key: 'c4910b11b63b52fbfc7b8d3e8aa6a848bd408d54', class: "close-button", title: this.t.get('dismiss'), icon: miBaselineCancel, onClick: this.onClickClose.bind(this) })));
1063
+ : dayjs(this.datetime).format(this.dateFormat))), h$4("mds-text", { key: '06bcc873d47b26418a71a7e2064c6bebe786a6c3', class: "message", truncate: "all", typography: "caption", variant: "info" }, this.message), this.hasActions && h$4("div", { key: 'c5de013ae3f29e2e972576b6c6a012de935a7491', class: "actions", part: "actions" }, h$4("slot", { key: 'bfe621eff62949f8416f695e8c2a85a430674044', name: "actions" }))), this.deletable && h$4("mds-button", { key: '6d2970a2aaf90f5a9ce1be74da0da78b3a1b2016', class: "close-button", title: this.t.get('dismiss'), icon: miBaselineCancel, onClick: this.onClickClose.bind(this) })));
1064
1064
  }
1065
1065
  get host() { return getElement(this); }
1066
1066
  };
@@ -3,4 +3,4 @@ var __awaiter=this&&this.__awaiter||function(n,t,i,r){function a(n){return n ins
3
3
  * mustache.js - Logic-less {{mustache}} templates with JavaScript
4
4
  * http://github.com/janl/mustache.js
5
5
  */
6
- var n=Object.prototype.toString;var t=Array.isArray||function t(i){return n.call(i)==="[object Array]"};function i(n){return typeof n==="function"}function r(n){return t(n)?"array":typeof n}function a(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function o(n,t){return n!=null&&typeof n==="object"&&t in n}function e(n,t){return n!=null&&typeof n!=="object"&&n.hasOwnProperty&&n.hasOwnProperty(t)}var s=RegExp.prototype.test;function c(n,t){return s.call(n,t)}var u=/\S/;function h(n){return!c(u,n)}var l={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};function f(n){return String(n).replace(/[&<>"'`=\/]/g,(function n(t){return l[t]}))}var d=/\s*/;var v=/\s+/;var m=/\s*=/;var b=/\s*\}/;var p=/#|\^|\/|>|\{|&|=|!/;function g(n,i){if(!n)return[];var r=false;var o=[];var e=[];var s=[];var c=false;var u=false;var l="";var f=0;function g(){if(c&&!u){while(s.length)delete e[s.pop()]}else{s=[]}c=false;u=false}var $,x,S;function _(n){if(typeof n==="string")n=n.split(v,2);if(!t(n)||n.length!==2)throw new Error("Invalid tags: "+n);$=new RegExp(a(n[0])+"\\s*");x=new RegExp("\\s*"+a(n[1]));S=new RegExp("\\s*"+a("}"+n[1]))}_(i||M.tags);var j=new k(n);var D,q,E,T,C,L;while(!j.eos()){D=j.pos;E=j.scanUntil($);if(E){for(var I=0,N=E.length;I<N;++I){T=E.charAt(I);if(h(T)){s.push(e.length);l+=T}else{u=true;r=true;l+=" "}e.push(["text",T,D,D+1]);D+=1;if(T==="\n"){g();l="";f=0;r=false}}}if(!j.scan($))break;c=true;q=j.scan(p)||"name";j.scan(d);if(q==="="){E=j.scanUntil(m);j.scan(m);j.scanUntil(x)}else if(q==="{"){E=j.scanUntil(S);j.scan(b);j.scanUntil(x);q="&"}else{E=j.scanUntil(x)}if(!j.scan(x))throw new Error("Unclosed tag at "+j.pos);if(q==">"){C=[q,E,D,j.pos,l,f,r]}else{C=[q,E,D,j.pos]}f++;e.push(C);if(q==="#"||q==="^"){o.push(C)}else if(q==="/"){L=o.pop();if(!L)throw new Error('Unopened section "'+E+'" at '+D);if(L[1]!==E)throw new Error('Unclosed section "'+L[1]+'" at '+D)}else if(q==="name"||q==="{"||q==="&"){u=true}else if(q==="="){_(E)}}g();L=o.pop();if(L)throw new Error('Unclosed section "'+L[1]+'" at '+j.pos);return w(y(e))}function y(n){var t=[];var i,r;for(var a=0,o=n.length;a<o;++a){i=n[a];if(i){if(i[0]==="text"&&r&&r[0]==="text"){r[1]+=i[1];r[3]=i[3]}else{t.push(i);r=i}}}return t}function w(n){var t=[];var i=t;var r=[];var a,o;for(var e=0,s=n.length;e<s;++e){a=n[e];switch(a[0]){case"#":case"^":i.push(a);r.push(a);i=a[4]=[];break;case"/":o=r.pop();o[5]=a[2];i=r.length>0?r[r.length-1][4]:t;break;default:i.push(a)}}return t}function k(n){this.string=n;this.tail=n;this.pos=0}k.prototype.eos=function n(){return this.tail===""};k.prototype.scan=function n(t){var i=this.tail.match(t);if(!i||i.index!==0)return"";var r=i[0];this.tail=this.tail.substring(r.length);this.pos+=r.length;return r};k.prototype.scanUntil=function n(t){var i=this.tail.search(t),r;switch(i){case-1:r=this.tail;this.tail="";break;case 0:r="";break;default:r=this.tail.substring(0,i);this.tail=this.tail.substring(i)}this.pos+=r.length;return r};function $(n,t){this.view=n;this.cache={".":this.view};this.parent=t}$.prototype.push=function n(t){return new $(t,this)};$.prototype.lookup=function n(t){var r=this.cache;var a;if(r.hasOwnProperty(t)){a=r[t]}else{var s=this,c,u,h,l=false;while(s){if(t.indexOf(".")>0){c=s.view;u=t.split(".");h=0;while(c!=null&&h<u.length){if(h===u.length-1)l=o(c,u[h])||e(c,u[h]);c=c[u[h++]]}}else{c=s.view[t];l=o(s.view,t)}if(l){a=c;break}s=s.parent}r[t]=a}if(i(a))a=a.call(this.view);return a};function x(){this.templateCache={_cache:{},set:function n(t,i){this._cache[t]=i},get:function n(t){return this._cache[t]},clear:function n(){this._cache={}}}}x.prototype.clearCache=function n(){if(typeof this.templateCache!=="undefined"){this.templateCache.clear()}};x.prototype.parse=function n(t,i){var r=this.templateCache;var a=t+":"+(i||M.tags).join(":");var o=typeof r!=="undefined";var e=o?r.get(a):undefined;if(e==undefined){e=g(t,i);o&&r.set(a,e)}return e};x.prototype.render=function n(t,i,r,a){var o=this.getConfigTags(a);var e=this.parse(t,o);var s=i instanceof $?i:new $(i,undefined);return this.renderTokens(e,s,r,t,a)};x.prototype.renderTokens=function n(t,i,r,a,o){var e="";var s,c,u;for(var h=0,l=t.length;h<l;++h){u=undefined;s=t[h];c=s[0];if(c==="#")u=this.renderSection(s,i,r,a,o);else if(c==="^")u=this.renderInverted(s,i,r,a,o);else if(c===">")u=this.renderPartial(s,i,r,o);else if(c==="&")u=this.unescapedValue(s,i);else if(c==="name")u=this.escapedValue(s,i,o);else if(c==="text")u=this.rawValue(s);if(u!==undefined)e+=u}return e};x.prototype.renderSection=function n(r,a,o,e,s){var c=this;var u="";var h=a.lookup(r[1]);function l(n){return c.render(n,a,o,s)}if(!h)return;if(t(h)){for(var f=0,d=h.length;f<d;++f){u+=this.renderTokens(r[4],a.push(h[f]),o,e,s)}}else if(typeof h==="object"||typeof h==="string"||typeof h==="number"){u+=this.renderTokens(r[4],a.push(h),o,e,s)}else if(i(h)){if(typeof e!=="string")throw new Error("Cannot use higher-order sections without the original template");h=h.call(a.view,e.slice(r[3],r[5]),l);if(h!=null)u+=h}else{u+=this.renderTokens(r[4],a,o,e,s)}return u};x.prototype.renderInverted=function n(i,r,a,o,e){var s=r.lookup(i[1]);if(!s||t(s)&&s.length===0)return this.renderTokens(i[4],r,a,o,e)};x.prototype.indentPartial=function n(t,i,r){var a=i.replace(/[^ \t]/g,"");var o=t.split("\n");for(var e=0;e<o.length;e++){if(o[e].length&&(e>0||!r)){o[e]=a+o[e]}}return o.join("\n")};x.prototype.renderPartial=function n(t,r,a,o){if(!a)return;var e=this.getConfigTags(o);var s=i(a)?a(t[1]):a[t[1]];if(s!=null){var c=t[6];var u=t[5];var h=t[4];var l=s;if(u==0&&h){l=this.indentPartial(s,h,c)}var f=this.parse(l,e);return this.renderTokens(f,r,a,l,o)}};x.prototype.unescapedValue=function n(t,i){var r=i.lookup(t[1]);if(r!=null)return r};x.prototype.escapedValue=function n(t,i,r){var a=this.getConfigEscape(r)||M.escape;var o=i.lookup(t[1]);if(o!=null)return typeof o==="number"&&a===M.escape?String(o):a(o)};x.prototype.rawValue=function n(t){return t[1]};x.prototype.getConfigTags=function n(i){if(t(i)){return i}else if(i&&typeof i==="object"){return i.tags}else{return undefined}};x.prototype.getConfigEscape=function n(i){if(i&&typeof i==="object"&&!t(i)){return i.escape}else{return undefined}};var M={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:undefined,escape:undefined,parse:undefined,render:undefined,Scanner:undefined,Context:undefined,Writer:undefined,set templateCache(n){S.templateCache=n},get templateCache(){return S.templateCache}};var S=new x;M.clearCache=function n(){return S.clearCache()};M.parse=function n(t,i){return S.parse(t,i)};M.render=function n(t,i,a,o){if(typeof t!=="string"){throw new TypeError('Invalid template! Template should be a "string" '+'but "'+r(t)+'" was given as the first '+"argument for mustache#render(template, view, partials)")}return S.render(t,i,a,o)};M.escape=f;M.Scanner=k;M.Context=$;M.Writer=x;return M}))})(mustache);var Locale=function(){function n(n){var t=this;this.rollbackLanguage="en";this.set=function(n){t.config=n};this.lang=function(n){t.element=n;t.closestElement=t.element.closest("[lang]");if(t.closestElement){if(t.closestElement.lang){t.language=t.closestElement.lang;return t.language}}t.language=t.rollbackLanguage;return t.language};this.update=function(n){var i=n!==null&&n!==void 0?n:t.element.shadowRoot;i&&i.querySelectorAll("*").forEach((function(n){if(n.tagName.toLowerCase().startsWith("mds-")){if(n&&"updateLang"in n){n.updateLang()}}}))};this.pluralize=function(n,i){var r=t.config[t.language]?t.config[t.language][n]:t.config[t.rollbackLanguage][n];var a=[];if(Array.isArray(r)){a.push(r[0]);a.push(r[1])}else{a.push(r);a.push(r)}var o=a[0];var e=o;var s=Object.keys(i);if(s.length>0){var c=s[0];if(typeof i[c]==="number"){if(i[c]!==1){e=a[1]}}}return mustache.exports.render(e,i)};this.get=function(n,i){if(i){return t.pluralize(n,i)}return t.config[t.language]?t.config[t.language][n]:t.config[t.rollbackLanguage][n]};if(n){this.set(n)}}return n}();var ISO8601RegexString="^\\d{4}(-\\d{2})?(-\\d{2})?(T\\d{2}(:\\d{2})?(:\\d{2})?(\\.\\d{3})?)?([+-]\\d{2}:\\d{2}|Z)?$";var isISO8601Date=function(n){var t=new RegExp(ISO8601RegexString);return t.test(n)};var sanitizeISO8601Date=function(n){if(isISO8601Date(n)){return n}return new Date(n).toISOString()};var mdsPushNotificationCss='@tailwind components;\n@tailwind utilities;\n\n:host {\n\n --mds-push-notification-duration: 200ms;\n --mds-push-notification-icon-background-color: transparent;\n --mds-push-notification-icon-color: rgb(var(--tone-neutral-04));\n --mds-push-notification-message-line-clamp: 2;\n --mds-push-notification-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);\n --mds-push-notification-subject-line-clamp: 1;\n --mds-push-notification-timing-function: cubic-bezier(1, 0, 0, 1);\n min-width: 18rem;\n max-width: 20rem;\n gap: 1rem;\n border-radius: 0.5rem;\n padding: 1rem;\n padding-right: 2rem;\n\n -ms-flex-align: start;\n\n align-items: flex-start;\n background-color: rgb(var(--tone-neutral));\n -webkit-box-shadow: var(--mds-push-notification-shadow);\n box-shadow: var(--mds-push-notification-shadow);\n color: rgb(var(--tone-neutral-02));\n display: -ms-flexbox;\n display: flex;\n pointer-events: auto;\n position: relative;\n -webkit-transition-duration: var(--mds-push-notification-duration);\n transition-duration: var(--mds-push-notification-duration);\n -webkit-transition-property: background-color, color, margin, -webkit-box-shadow, -webkit-transform;\n transition-property: background-color, color, margin, -webkit-box-shadow, -webkit-transform;\n transition-property: background-color, box-shadow, color, margin, transform;\n transition-property: background-color, box-shadow, color, margin, transform, -webkit-box-shadow, -webkit-transform;\n -webkit-transition-timing-function: var(--mds-push-notification-timing-function);\n transition-timing-function: var(--mds-push-notification-timing-function);\n}\n\n:host([deletable="false"]){\n\n padding-right: 1rem;\n}\n\n.content {\n display: grid;\n -ms-flex-positive: 1;\n flex-grow: 1;\n}\n\n.actions{\n\n gap: 0.5rem;\n\n padding-top: 0.5rem;\n\n display: -ms-flexbox;\n\n display: flex;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n min-width: 1px;\n}\n\n.avatar,\n.picture {\n -ms-flex-negative: 0;\n flex-shrink: 0;\n}\n\n.picture{\n\n max-width: 3rem;\n\n border-radius: 0.25rem;\n\n -webkit-box-shadow: 0 0 1px 1px rgb(0 0 0 / 0.06), 0 1px 2px 0 rgb(0 0 0 / 0.05);\n\n box-shadow: 0 0 1px 1px rgb(0 0 0 / 0.06), 0 1px 2px 0 rgb(0 0 0 / 0.05);\n width: 100%;\n}\n\n.close-button{\n\n padding: 0.375rem;\n\n -webkit-transition-property: opacity;\n\n transition-property: opacity;\n\n -webkit-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n\n -webkit-transition-duration: 150ms;\n\n transition-duration: 150ms;\n\n background-color: transparent;\n fill: rgb(var(--tone-neutral-06));\n opacity: 0;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n:host(:hover) .close-button {\n opacity: 1;\n}\n\n.close-button:focus-visible,\n.close-button:hover {\n fill: rgb(var(--tone-neutral-03));\n opacity: 1;\n}\n\nheader{\n\n gap: 0.25rem;\n\n -ms-flex-align: baseline;\n\n align-items: baseline;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-pack: justify;\n justify-content: space-between;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.infos {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n\n.time{\n\n margin-right: 0.25rem;\n\n -ms-flex-negative: 0;\n\n flex-shrink: 0;\n white-space: nowrap;\n}\n\n.subject {\n\n --mds-text-line-clamp: var(--mds-push-notification-subject-line-clamp);\n\n line-height: 1.25rem;\n text-overflow: ellipsis;\n}\n\n.message {\n\n --mds-text-line-clamp: var(--mds-push-notification-message-line-clamp);\n\n line-height: 1.25rem;\n text-overflow: ellipsis;\n}\n\n.avatar{\n\n height: 2.25rem;\n\n width: 2.25rem;\n\n background-color: var(--mds-push-notification-icon-background-color);\n border-radius: 1000px;\n fill: var(--mds-push-notification-icon-color);\n}\n\n.avatar::part(svg){\n\n width: 1.5rem;\n}\n\n:host([src]) .avatar {\n background-color: transparent;\n}\n\n:host([icon]) .avatar::part(wrapper){\n\n padding: 0.375rem;\n}\n\n@tailwind utilities;\n\n:host( [variant="primary"][tone="strong"] ) {\n\n --mds-push-notification-icon-background-color: rgb(var(--variant-primary-05));\n --mds-push-notification-icon-color: rgb(var(--variant-primary-10));\n}\n\n:host( [variant="primary"] ),\n:host( [variant="primary"][tone="weak"] ) {\n\n --mds-push-notification-icon-background-color: rgb(var(--variant-primary-09));\n --mds-push-notification-icon-color: rgb(var(--variant-primary-05));\n}\n\n:host( [variant="primary"][tone="quiet"] ) {\n\n --mds-push-notification-icon-background-color: transparent;\n --mds-push-notification-icon-color: rgb(var(--variant-primary-05));\n}\n\n@tailwind utilities;\n\n:host( [variant="orange"][tone="strong"] ) {\n \n --mds-push-notification-icon-background-color: rgb(var(--label-orange-05));\n --mds-push-notification-icon-color: rgb(var(--label-orange-10));\n}\n\n:host( [variant="orange"] ),\n:host( [variant="orange"][tone="weak"] ) {\n\n --mds-push-notification-icon-background-color: rgb(var(--label-orange-09));\n --mds-push-notification-icon-color: rgb(var(--label-orange-05));\n}\n\n:host( [variant="orange"][tone="quiet"] ) {\n\n --mds-push-notification-icon-background-color: transparent;\n --mds-push-notification-icon-color: rgb(var(--label-orange-05));\n}\n\n:host( [variant="amaranth"][tone="strong"] ) {\n \n --mds-push-notification-icon-background-color: rgb(var(--label-amaranth-05));\n --mds-push-notification-icon-color: rgb(var(--label-amaranth-10));\n}\n\n:host( [variant="amaranth"] ),\n:host( [variant="amaranth"][tone="weak"] ) {\n\n --mds-push-notification-icon-background-color: rgb(var(--label-amaranth-09));\n --mds-push-notification-icon-color: rgb(var(--label-amaranth-05));\n}\n\n:host( [variant="amaranth"][tone="quiet"] ) {\n\n --mds-push-notification-icon-background-color: transparent;\n --mds-push-notification-icon-color: rgb(var(--label-amaranth-05));\n}\n\n:host( [variant="orchid"][tone="strong"] ) {\n \n --mds-push-notification-icon-background-color: rgb(var(--label-orchid-05));\n --mds-push-notification-icon-color: rgb(var(--label-orchid-10));\n}\n\n:host( [variant="orchid"] ),\n:host( [variant="orchid"][tone="weak"] ) {\n\n --mds-push-notification-icon-background-color: rgb(var(--label-orchid-09));\n --mds-push-notification-icon-color: rgb(var(--label-orchid-05));\n}\n\n:host( [variant="orchid"][tone="quiet"] ) {\n\n --mds-push-notification-icon-background-color: transparent;\n --mds-push-notification-icon-color: rgb(var(--label-orchid-05));\n}\n\n:host( [variant="violet"][tone="strong"] ) {\n \n --mds-push-notification-icon-background-color: rgb(var(--label-violet-05));\n --mds-push-notification-icon-color: rgb(var(--label-violet-10));\n}\n\n:host( [variant="violet"] ),\n:host( [variant="violet"][tone="weak"] ) {\n\n --mds-push-notification-icon-background-color: rgb(var(--label-violet-09));\n --mds-push-notification-icon-color: rgb(var(--label-violet-05));\n}\n\n:host( [variant="violet"][tone="quiet"] ) {\n\n --mds-push-notification-icon-background-color: transparent;\n --mds-push-notification-icon-color: rgb(var(--label-violet-05));\n}\n\n:host( [variant="blue"][tone="strong"] ) {\n \n --mds-push-notification-icon-background-color: rgb(var(--label-blue-05));\n --mds-push-notification-icon-color: rgb(var(--label-blue-10));\n}\n\n:host( [variant="blue"] ),\n:host( [variant="blue"][tone="weak"] ) {\n\n --mds-push-notification-icon-background-color: rgb(var(--label-blue-09));\n --mds-push-notification-icon-color: rgb(var(--label-blue-05));\n}\n\n:host( [variant="blue"][tone="quiet"] ) {\n\n --mds-push-notification-icon-background-color: transparent;\n --mds-push-notification-icon-color: rgb(var(--label-blue-05));\n}\n\n:host( [variant="sky"][tone="strong"] ) {\n \n --mds-push-notification-icon-background-color: rgb(var(--label-sky-05));\n --mds-push-notification-icon-color: rgb(var(--label-sky-10));\n}\n\n:host( [variant="sky"] ),\n:host( [variant="sky"][tone="weak"] ) {\n\n --mds-push-notification-icon-background-color: rgb(var(--label-sky-09));\n --mds-push-notification-icon-color: rgb(var(--label-sky-05));\n}\n\n:host( [variant="sky"][tone="quiet"] ) {\n\n --mds-push-notification-icon-background-color: transparent;\n --mds-push-notification-icon-color: rgb(var(--label-sky-05));\n}\n\n:host( [variant="aqua"][tone="strong"] ) {\n \n --mds-push-notification-icon-background-color: rgb(var(--label-aqua-05));\n --mds-push-notification-icon-color: rgb(var(--label-aqua-10));\n}\n\n:host( [variant="aqua"] ),\n:host( [variant="aqua"][tone="weak"] ) {\n\n --mds-push-notification-icon-background-color: rgb(var(--label-aqua-09));\n --mds-push-notification-icon-color: rgb(var(--label-aqua-05));\n}\n\n:host( [variant="aqua"][tone="quiet"] ) {\n\n --mds-push-notification-icon-background-color: transparent;\n --mds-push-notification-icon-color: rgb(var(--label-aqua-05));\n}\n\n:host( [variant="green"][tone="strong"] ) {\n \n --mds-push-notification-icon-background-color: rgb(var(--label-green-05));\n --mds-push-notification-icon-color: rgb(var(--label-green-10));\n}\n\n:host( [variant="green"] ),\n:host( [variant="green"][tone="weak"] ) {\n\n --mds-push-notification-icon-background-color: rgb(var(--label-green-09));\n --mds-push-notification-icon-color: rgb(var(--label-green-05));\n}\n\n:host( [variant="green"][tone="quiet"] ) {\n\n --mds-push-notification-icon-background-color: transparent;\n --mds-push-notification-icon-color: rgb(var(--label-green-05));\n}\n\n:host( [variant="lime"][tone="strong"] ) {\n \n --mds-push-notification-icon-background-color: rgb(var(--label-lime-05));\n --mds-push-notification-icon-color: rgb(var(--label-lime-10));\n}\n\n:host( [variant="lime"] ),\n:host( [variant="lime"][tone="weak"] ) {\n\n --mds-push-notification-icon-background-color: rgb(var(--label-lime-09));\n --mds-push-notification-icon-color: rgb(var(--label-lime-05));\n}\n\n:host( [variant="lime"][tone="quiet"] ) {\n\n --mds-push-notification-icon-background-color: transparent;\n --mds-push-notification-icon-color: rgb(var(--label-lime-05));\n}\n\n:host( [variant="yellow"][tone="strong"] ) {\n \n --mds-push-notification-icon-background-color: rgb(var(--label-yellow-05));\n --mds-push-notification-icon-color: rgb(var(--label-yellow-10));\n}\n\n:host( [variant="yellow"] ),\n:host( [variant="yellow"][tone="weak"] ) {\n\n --mds-push-notification-icon-background-color: rgb(var(--label-yellow-09));\n --mds-push-notification-icon-color: rgb(var(--label-yellow-05));\n}\n\n:host( [variant="yellow"][tone="quiet"] ) {\n\n --mds-push-notification-icon-background-color: transparent;\n --mds-push-notification-icon-color: rgb(var(--label-yellow-05));\n}\n\n@tailwind utilities;\n\n:host( [variant="error"][tone="strong"] ) {\n\n --mds-push-notification-icon-background-color: rgb(var(--status-error-05));\n --mds-push-notification-icon-color: rgb(var(--status-error-10));\n}\n\n:host( [variant="error"] ),\n:host( [variant="error"][tone="weak"] ) {\n\n --mds-push-notification-icon-background-color: rgb(var(--status-error-09));\n --mds-push-notification-icon-color: rgb(var(--status-error-05));\n}\n\n:host( [variant="error"][tone="quiet"] ) {\n\n --mds-push-notification-icon-background-color: transparent;\n --mds-push-notification-icon-color: rgb(var(--status-error-05));\n}\n\n:host( [variant="warning"][tone="strong"] ) {\n \n --mds-push-notification-icon-background-color: rgb(var(--status-warning-05));\n --mds-push-notification-icon-color: rgb(var(--status-warning-10));\n}\n\n:host( [variant="warning"] ),\n:host( [variant="warning"][tone="weak"] ) {\n\n --mds-push-notification-icon-background-color: rgb(var(--status-warning-09));\n --mds-push-notification-icon-color: rgb(var(--status-warning-05));\n}\n\n:host( [variant="warning"][tone="quiet"] ) {\n\n --mds-push-notification-icon-background-color: transparent;\n --mds-push-notification-icon-color: rgb(var(--status-warning-05));\n}\n\n:host( [variant="success"][tone="strong"] ) {\n \n --mds-push-notification-icon-background-color: rgb(var(--status-success-05));\n --mds-push-notification-icon-color: rgb(var(--status-success-10));\n}\n\n:host( [variant="success"] ),\n:host( [variant="success"][tone="weak"] ) {\n\n --mds-push-notification-icon-background-color: rgb(var(--status-success-09));\n --mds-push-notification-icon-color: rgb(var(--status-success-05));\n}\n\n:host( [variant="success"][tone="quiet"] ) {\n\n --mds-push-notification-icon-background-color: transparent;\n --mds-push-notification-icon-color: rgb(var(--status-success-05));\n}\n\n:host( [variant="info"][tone="strong"] ) {\n \n --mds-push-notification-icon-background-color: rgb(var(--status-info-05));\n --mds-push-notification-icon-color: rgb(var(--status-info-10));\n}\n\n:host( [variant="info"] ),\n:host( [variant="info"][tone="weak"] ) {\n\n --mds-push-notification-icon-background-color: rgb(var(--status-info-09));\n --mds-push-notification-icon-color: rgb(var(--status-info-05));\n}\n\n:host( [variant="info"][tone="quiet"] ) {\n\n --mds-push-notification-icon-background-color: transparent;\n --mds-push-notification-icon-color: rgb(var(--status-info-05));\n}\n\n@tailwind utilities;\n\n@container style(--magma-pref-animation: reduce) {\n :host,\n .close-button {\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n }\n}\n\n@container style(--magma-pref-animation: system) {\n\n @media (prefers-reduced-motion) {\n :host,\n .close-button {\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n }\n }\n}\n\n@tailwind utilities;\n\n@container style(--magma-pref-theme: dark) {\n :host {\n\n --mds-push-notification-shadow: 0 0 0 1px rgb(var(--tone-neutral-01) / 0.3) inset;\n }\n}\n\n@container style(--magma-pref-theme: system) {\n\n @media (prefers-color-scheme: dark) {\n :host {\n\n --mds-push-notification-shadow: 0 0 0 1px rgb(var(--tone-neutral-01) / 0.3) inset;\n }\n }\n}\n\n@container style(--magma-pref-contrast: more) {\n :host {\n\n --mds-push-notification-shadow: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.6) inset;\n\n color: rgb(var(--tone-neutral-01));\n }\n}\n\n@container style(--magma-pref-contrast: system) {\n\n @media (prefers-contrast: more) {\n :host {\n\n --mds-push-notification-shadow: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.6) inset;\n\n color: rgb(var(--tone-neutral-01));\n }\n }\n}\n\n';var MdsPushNotificationStyle0=mdsPushNotificationCss;dayjs.extend(relativeTime);var MdsPushNotification=function(){function n(n){var t=this;registerInstance(this,n);this.closedEvent=createEvent(this,"mdsPushNotificationClose",7);this.t=new Locale({el:localeEl,en:localeEn,es:localeEs,it:localeIt});this.onClickClose=function(n){n.stopPropagation();t.closedEvent.emit()};this.language=undefined;this.datetime=undefined;this.dateFormat="timeago";this.deletable=true;this.icon=undefined;this.initials=undefined;this.message="Nessun messaggio disponibile";this.preview="image";this.src=undefined;this.subject=undefined;this.tone="weak";this.variant=undefined}n.prototype.updateLang=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){this.language=this.t.lang(this.host);return[2]}))}))};n.prototype.componentWillLoad=function(){var n;this.hasActions=this.host.querySelector('[slot="actions"]')!==null;this.hasBadge=this.host.querySelector('[slot="badge"]')!==null;if(this.datetime){this.datetime=sanitizeISO8601Date((n=this.datetime)===null||n===void 0?void 0:n.toString())}this.t.lang(this.host);var t={future:this.t.get("future"),past:this.t.get("past"),s:this.t.get("s"),m:this.t.get("m"),mm:this.t.get("mm"),h:this.t.get("h"),hh:this.t.get("hh"),d:this.t.get("d"),dd:this.t.get("dd"),M:this.t.get("M"),MM:this.t.get("MM"),y:this.t.get("y"),yy:this.t.get("yy")};dayjs.locale("custom-locale",{relativeTime:t})};n.prototype.render=function(){var n;return h$4(Host,{key:"682d4b39768b61439873b6ac308fb69d4c0bd32c"},((n=this.icon)!==null&&n!==void 0?n:this.preview==="avatar")&&h$4("mds-avatar",{key:"2ea4ca72b7b3ce2077612ec1083369e1a638f69b",class:"avatar",icon:this.icon,initials:this.initials,part:"avatar",src:this.src,tone:this.tone,variant:this.variant}),this.src&&this.preview!=="avatar"&&h$4("mds-img",{key:"e128e32c4421aa07640898a2139780cfe21962e1",class:"picture",part:"picture",src:this.src}),h$4("div",{key:"e38b8e1e6eaa637e6a75f9ea22b3f143cc420b8f",class:"content",part:"content"},h$4("header",{key:"0673a643d9f5f0c4350df429e8b4a782cca0c6f0"},h$4("div",{key:"edfceaf57ce5c6c6597c5864be5e12ac3d64e842",class:"infos"},this.hasBadge&&h$4("div",{key:"984d185fd61df8d68986bbd6a46874c0e60b3070"},h$4("slot",{key:"91533f3a68cc370c80d7f29206861e3dd2e5144a",name:"badge"})),this.subject&&h$4("mds-text",{key:"6b25611c4570c83e7fdef45d47611b064f454aa4",class:"subject",typography:"h6",variant:"title",truncate:"all"},this.subject)),this.datetime&&h$4("mds-text",{key:"7b28326ef4929415fa98f116da9bc41fd4efe3fa",class:"time",typography:"option"},this.dateFormat==="timeago"?dayjs(this.datetime).fromNow():dayjs(this.datetime).format(this.dateFormat))),h$4("mds-text",{key:"35fbaa45a75692110b5cb208890eef2c950142bf",class:"message",truncate:"all",typography:"caption",variant:"info"},this.message),this.hasActions&&h$4("div",{key:"e598977250e3ada7945e941f2df452f99d2e37ee",class:"actions",part:"actions"},h$4("slot",{key:"d2310a3fbd53d9cda3b51d92f0f00476c9958537",name:"actions"}))),this.deletable&&h$4("mds-button",{key:"c4910b11b63b52fbfc7b8d3e8aa6a848bd408d54",class:"close-button",title:this.t.get("dismiss"),icon:miBaselineCancel,onClick:this.onClickClose.bind(this)}))};Object.defineProperty(n.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});return n}();MdsPushNotification.style=MdsPushNotificationStyle0;export{MdsPushNotification as mds_push_notification};
6
+ var n=Object.prototype.toString;var t=Array.isArray||function t(i){return n.call(i)==="[object Array]"};function i(n){return typeof n==="function"}function r(n){return t(n)?"array":typeof n}function a(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function o(n,t){return n!=null&&typeof n==="object"&&t in n}function e(n,t){return n!=null&&typeof n!=="object"&&n.hasOwnProperty&&n.hasOwnProperty(t)}var s=RegExp.prototype.test;function c(n,t){return s.call(n,t)}var u=/\S/;function h(n){return!c(u,n)}var l={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};function f(n){return String(n).replace(/[&<>"'`=\/]/g,(function n(t){return l[t]}))}var d=/\s*/;var v=/\s+/;var m=/\s*=/;var b=/\s*\}/;var p=/#|\^|\/|>|\{|&|=|!/;function g(n,i){if(!n)return[];var r=false;var o=[];var e=[];var s=[];var c=false;var u=false;var l="";var f=0;function g(){if(c&&!u){while(s.length)delete e[s.pop()]}else{s=[]}c=false;u=false}var $,x,S;function _(n){if(typeof n==="string")n=n.split(v,2);if(!t(n)||n.length!==2)throw new Error("Invalid tags: "+n);$=new RegExp(a(n[0])+"\\s*");x=new RegExp("\\s*"+a(n[1]));S=new RegExp("\\s*"+a("}"+n[1]))}_(i||M.tags);var j=new k(n);var D,q,E,T,C,L;while(!j.eos()){D=j.pos;E=j.scanUntil($);if(E){for(var I=0,N=E.length;I<N;++I){T=E.charAt(I);if(h(T)){s.push(e.length);l+=T}else{u=true;r=true;l+=" "}e.push(["text",T,D,D+1]);D+=1;if(T==="\n"){g();l="";f=0;r=false}}}if(!j.scan($))break;c=true;q=j.scan(p)||"name";j.scan(d);if(q==="="){E=j.scanUntil(m);j.scan(m);j.scanUntil(x)}else if(q==="{"){E=j.scanUntil(S);j.scan(b);j.scanUntil(x);q="&"}else{E=j.scanUntil(x)}if(!j.scan(x))throw new Error("Unclosed tag at "+j.pos);if(q==">"){C=[q,E,D,j.pos,l,f,r]}else{C=[q,E,D,j.pos]}f++;e.push(C);if(q==="#"||q==="^"){o.push(C)}else if(q==="/"){L=o.pop();if(!L)throw new Error('Unopened section "'+E+'" at '+D);if(L[1]!==E)throw new Error('Unclosed section "'+L[1]+'" at '+D)}else if(q==="name"||q==="{"||q==="&"){u=true}else if(q==="="){_(E)}}g();L=o.pop();if(L)throw new Error('Unclosed section "'+L[1]+'" at '+j.pos);return w(y(e))}function y(n){var t=[];var i,r;for(var a=0,o=n.length;a<o;++a){i=n[a];if(i){if(i[0]==="text"&&r&&r[0]==="text"){r[1]+=i[1];r[3]=i[3]}else{t.push(i);r=i}}}return t}function w(n){var t=[];var i=t;var r=[];var a,o;for(var e=0,s=n.length;e<s;++e){a=n[e];switch(a[0]){case"#":case"^":i.push(a);r.push(a);i=a[4]=[];break;case"/":o=r.pop();o[5]=a[2];i=r.length>0?r[r.length-1][4]:t;break;default:i.push(a)}}return t}function k(n){this.string=n;this.tail=n;this.pos=0}k.prototype.eos=function n(){return this.tail===""};k.prototype.scan=function n(t){var i=this.tail.match(t);if(!i||i.index!==0)return"";var r=i[0];this.tail=this.tail.substring(r.length);this.pos+=r.length;return r};k.prototype.scanUntil=function n(t){var i=this.tail.search(t),r;switch(i){case-1:r=this.tail;this.tail="";break;case 0:r="";break;default:r=this.tail.substring(0,i);this.tail=this.tail.substring(i)}this.pos+=r.length;return r};function $(n,t){this.view=n;this.cache={".":this.view};this.parent=t}$.prototype.push=function n(t){return new $(t,this)};$.prototype.lookup=function n(t){var r=this.cache;var a;if(r.hasOwnProperty(t)){a=r[t]}else{var s=this,c,u,h,l=false;while(s){if(t.indexOf(".")>0){c=s.view;u=t.split(".");h=0;while(c!=null&&h<u.length){if(h===u.length-1)l=o(c,u[h])||e(c,u[h]);c=c[u[h++]]}}else{c=s.view[t];l=o(s.view,t)}if(l){a=c;break}s=s.parent}r[t]=a}if(i(a))a=a.call(this.view);return a};function x(){this.templateCache={_cache:{},set:function n(t,i){this._cache[t]=i},get:function n(t){return this._cache[t]},clear:function n(){this._cache={}}}}x.prototype.clearCache=function n(){if(typeof this.templateCache!=="undefined"){this.templateCache.clear()}};x.prototype.parse=function n(t,i){var r=this.templateCache;var a=t+":"+(i||M.tags).join(":");var o=typeof r!=="undefined";var e=o?r.get(a):undefined;if(e==undefined){e=g(t,i);o&&r.set(a,e)}return e};x.prototype.render=function n(t,i,r,a){var o=this.getConfigTags(a);var e=this.parse(t,o);var s=i instanceof $?i:new $(i,undefined);return this.renderTokens(e,s,r,t,a)};x.prototype.renderTokens=function n(t,i,r,a,o){var e="";var s,c,u;for(var h=0,l=t.length;h<l;++h){u=undefined;s=t[h];c=s[0];if(c==="#")u=this.renderSection(s,i,r,a,o);else if(c==="^")u=this.renderInverted(s,i,r,a,o);else if(c===">")u=this.renderPartial(s,i,r,o);else if(c==="&")u=this.unescapedValue(s,i);else if(c==="name")u=this.escapedValue(s,i,o);else if(c==="text")u=this.rawValue(s);if(u!==undefined)e+=u}return e};x.prototype.renderSection=function n(r,a,o,e,s){var c=this;var u="";var h=a.lookup(r[1]);function l(n){return c.render(n,a,o,s)}if(!h)return;if(t(h)){for(var f=0,d=h.length;f<d;++f){u+=this.renderTokens(r[4],a.push(h[f]),o,e,s)}}else if(typeof h==="object"||typeof h==="string"||typeof h==="number"){u+=this.renderTokens(r[4],a.push(h),o,e,s)}else if(i(h)){if(typeof e!=="string")throw new Error("Cannot use higher-order sections without the original template");h=h.call(a.view,e.slice(r[3],r[5]),l);if(h!=null)u+=h}else{u+=this.renderTokens(r[4],a,o,e,s)}return u};x.prototype.renderInverted=function n(i,r,a,o,e){var s=r.lookup(i[1]);if(!s||t(s)&&s.length===0)return this.renderTokens(i[4],r,a,o,e)};x.prototype.indentPartial=function n(t,i,r){var a=i.replace(/[^ \t]/g,"");var o=t.split("\n");for(var e=0;e<o.length;e++){if(o[e].length&&(e>0||!r)){o[e]=a+o[e]}}return o.join("\n")};x.prototype.renderPartial=function n(t,r,a,o){if(!a)return;var e=this.getConfigTags(o);var s=i(a)?a(t[1]):a[t[1]];if(s!=null){var c=t[6];var u=t[5];var h=t[4];var l=s;if(u==0&&h){l=this.indentPartial(s,h,c)}var f=this.parse(l,e);return this.renderTokens(f,r,a,l,o)}};x.prototype.unescapedValue=function n(t,i){var r=i.lookup(t[1]);if(r!=null)return r};x.prototype.escapedValue=function n(t,i,r){var a=this.getConfigEscape(r)||M.escape;var o=i.lookup(t[1]);if(o!=null)return typeof o==="number"&&a===M.escape?String(o):a(o)};x.prototype.rawValue=function n(t){return t[1]};x.prototype.getConfigTags=function n(i){if(t(i)){return i}else if(i&&typeof i==="object"){return i.tags}else{return undefined}};x.prototype.getConfigEscape=function n(i){if(i&&typeof i==="object"&&!t(i)){return i.escape}else{return undefined}};var M={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:undefined,escape:undefined,parse:undefined,render:undefined,Scanner:undefined,Context:undefined,Writer:undefined,set templateCache(n){S.templateCache=n},get templateCache(){return S.templateCache}};var S=new x;M.clearCache=function n(){return S.clearCache()};M.parse=function n(t,i){return S.parse(t,i)};M.render=function n(t,i,a,o){if(typeof t!=="string"){throw new TypeError('Invalid template! Template should be a "string" '+'but "'+r(t)+'" was given as the first '+"argument for mustache#render(template, view, partials)")}return S.render(t,i,a,o)};M.escape=f;M.Scanner=k;M.Context=$;M.Writer=x;return M}))})(mustache);var Locale=function(){function n(n){var t=this;this.rollbackLanguage="en";this.set=function(n){t.config=n};this.lang=function(n){t.element=n;t.closestElement=t.element.closest("[lang]");if(t.closestElement){if(t.closestElement.lang){t.language=t.closestElement.lang;return t.language}}t.language=t.rollbackLanguage;return t.language};this.update=function(n){var i=n!==null&&n!==void 0?n:t.element.shadowRoot;i&&i.querySelectorAll("*").forEach((function(n){if(n.tagName.toLowerCase().startsWith("mds-")){if(n&&"updateLang"in n){n.updateLang()}}}))};this.pluralize=function(n,i){var r=t.config[t.language]?t.config[t.language][n]:t.config[t.rollbackLanguage][n];var a=[];if(Array.isArray(r)){a.push(r[0]);a.push(r[1])}else{a.push(r);a.push(r)}var o=a[0];var e=o;var s=Object.keys(i);if(s.length>0){var c=s[0];if(typeof i[c]==="number"){if(i[c]!==1){e=a[1]}}}return mustache.exports.render(e,i)};this.get=function(n,i){if(i){return t.pluralize(n,i)}return t.config[t.language]?t.config[t.language][n]:t.config[t.rollbackLanguage][n]};if(n){this.set(n)}}return n}();var ISO8601RegexString="^\\d{4}(-\\d{2})?(-\\d{2})?(T\\d{2}(:\\d{2})?(:\\d{2})?(\\.\\d{3})?)?([+-]\\d{2}:\\d{2}|Z)?$";var isISO8601Date=function(n){var t=new RegExp(ISO8601RegexString);return t.test(n)};var sanitizeISO8601Date=function(n){if(isISO8601Date(n)){return n}return new Date(n).toISOString()};var mdsPushNotificationCss='@tailwind components;\n@tailwind utilities;\n\n:host {\n\n --mds-push-notification-duration: 200ms;\n --mds-push-notification-icon-background-color: transparent;\n --mds-push-notification-icon-color: rgb(var(--tone-neutral-04));\n --mds-push-notification-message-line-clamp: 2;\n --mds-push-notification-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);\n --mds-push-notification-subject-line-clamp: 1;\n --mds-push-notification-timing-function: cubic-bezier(1, 0, 0, 1);\n min-width: 18rem;\n max-width: 20rem;\n gap: 1rem;\n border-radius: 0.5rem;\n padding: 1rem;\n padding-right: 2rem;\n\n -ms-flex-align: start;\n\n align-items: flex-start;\n background-color: rgb(var(--tone-neutral));\n -webkit-box-shadow: var(--mds-push-notification-shadow);\n box-shadow: var(--mds-push-notification-shadow);\n color: rgb(var(--tone-neutral-02));\n display: -ms-flexbox;\n display: flex;\n pointer-events: auto;\n position: relative;\n -webkit-transition-duration: var(--mds-push-notification-duration);\n transition-duration: var(--mds-push-notification-duration);\n -webkit-transition-property: background-color, color, margin, -webkit-box-shadow, -webkit-transform;\n transition-property: background-color, color, margin, -webkit-box-shadow, -webkit-transform;\n transition-property: background-color, box-shadow, color, margin, transform;\n transition-property: background-color, box-shadow, color, margin, transform, -webkit-box-shadow, -webkit-transform;\n -webkit-transition-timing-function: var(--mds-push-notification-timing-function);\n transition-timing-function: var(--mds-push-notification-timing-function);\n}\n\n:host([deletable="false"]){\n\n padding-right: 1rem;\n}\n\n.content {\n display: grid;\n -ms-flex-positive: 1;\n flex-grow: 1;\n}\n\n.actions{\n\n gap: 0.5rem;\n\n padding-top: 0.5rem;\n\n display: -ms-flexbox;\n\n display: flex;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n min-width: 1px;\n}\n\n.avatar,\n.picture {\n -ms-flex-negative: 0;\n flex-shrink: 0;\n}\n\n.picture{\n\n max-width: 3rem;\n\n border-radius: 0.25rem;\n\n -webkit-box-shadow: 0 0 1px 1px rgb(0 0 0 / 0.06), 0 1px 2px 0 rgb(0 0 0 / 0.05);\n\n box-shadow: 0 0 1px 1px rgb(0 0 0 / 0.06), 0 1px 2px 0 rgb(0 0 0 / 0.05);\n width: 100%;\n}\n\n.close-button{\n\n padding: 0.375rem;\n\n -webkit-transition-property: opacity;\n\n transition-property: opacity;\n\n -webkit-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n\n -webkit-transition-duration: 150ms;\n\n transition-duration: 150ms;\n\n background-color: transparent;\n fill: rgb(var(--tone-neutral-06));\n opacity: 0;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n:host(:hover) .close-button {\n opacity: 1;\n}\n\n.close-button:focus-visible,\n.close-button:hover {\n fill: rgb(var(--tone-neutral-03));\n opacity: 1;\n}\n\nheader{\n\n gap: 0.25rem;\n\n -ms-flex-align: baseline;\n\n align-items: baseline;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-pack: justify;\n justify-content: space-between;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.infos {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n\n.time{\n\n margin-right: 0.25rem;\n\n -ms-flex-negative: 0;\n\n flex-shrink: 0;\n white-space: nowrap;\n}\n\n.subject {\n\n --mds-text-line-clamp: var(--mds-push-notification-subject-line-clamp);\n\n line-height: 1.25rem;\n text-overflow: ellipsis;\n}\n\n.message {\n\n --mds-text-line-clamp: var(--mds-push-notification-message-line-clamp);\n\n line-height: 1.25rem;\n text-overflow: ellipsis;\n}\n\n.avatar{\n\n height: 2.25rem;\n\n width: 2.25rem;\n\n background-color: var(--mds-push-notification-icon-background-color);\n border-radius: 1000px;\n fill: var(--mds-push-notification-icon-color);\n}\n\n.avatar::part(svg){\n\n width: 1.5rem;\n}\n\n:host([src]) .avatar {\n background-color: transparent;\n}\n\n:host([icon]) .avatar::part(wrapper){\n\n padding: 0.375rem;\n}\n\n@tailwind utilities;\n\n:host( [variant="primary"][tone="strong"] ) {\n\n --mds-push-notification-icon-background-color: rgb(var(--variant-primary-05));\n --mds-push-notification-icon-color: rgb(var(--variant-primary-10));\n}\n\n:host( [variant="primary"] ),\n:host( [variant="primary"][tone="weak"] ) {\n\n --mds-push-notification-icon-background-color: rgb(var(--variant-primary-09));\n --mds-push-notification-icon-color: rgb(var(--variant-primary-05));\n}\n\n:host( [variant="primary"][tone="quiet"] ) {\n\n --mds-push-notification-icon-background-color: transparent;\n --mds-push-notification-icon-color: rgb(var(--variant-primary-05));\n}\n\n@tailwind utilities;\n\n:host( [variant="orange"][tone="strong"] ) {\n \n --mds-push-notification-icon-background-color: rgb(var(--label-orange-05));\n --mds-push-notification-icon-color: rgb(var(--label-orange-10));\n}\n\n:host( [variant="orange"] ),\n:host( [variant="orange"][tone="weak"] ) {\n\n --mds-push-notification-icon-background-color: rgb(var(--label-orange-09));\n --mds-push-notification-icon-color: rgb(var(--label-orange-05));\n}\n\n:host( [variant="orange"][tone="quiet"] ) {\n\n --mds-push-notification-icon-background-color: transparent;\n --mds-push-notification-icon-color: rgb(var(--label-orange-05));\n}\n\n:host( [variant="amaranth"][tone="strong"] ) {\n \n --mds-push-notification-icon-background-color: rgb(var(--label-amaranth-05));\n --mds-push-notification-icon-color: rgb(var(--label-amaranth-10));\n}\n\n:host( [variant="amaranth"] ),\n:host( [variant="amaranth"][tone="weak"] ) {\n\n --mds-push-notification-icon-background-color: rgb(var(--label-amaranth-09));\n --mds-push-notification-icon-color: rgb(var(--label-amaranth-05));\n}\n\n:host( [variant="amaranth"][tone="quiet"] ) {\n\n --mds-push-notification-icon-background-color: transparent;\n --mds-push-notification-icon-color: rgb(var(--label-amaranth-05));\n}\n\n:host( [variant="orchid"][tone="strong"] ) {\n \n --mds-push-notification-icon-background-color: rgb(var(--label-orchid-05));\n --mds-push-notification-icon-color: rgb(var(--label-orchid-10));\n}\n\n:host( [variant="orchid"] ),\n:host( [variant="orchid"][tone="weak"] ) {\n\n --mds-push-notification-icon-background-color: rgb(var(--label-orchid-09));\n --mds-push-notification-icon-color: rgb(var(--label-orchid-05));\n}\n\n:host( [variant="orchid"][tone="quiet"] ) {\n\n --mds-push-notification-icon-background-color: transparent;\n --mds-push-notification-icon-color: rgb(var(--label-orchid-05));\n}\n\n:host( [variant="violet"][tone="strong"] ) {\n \n --mds-push-notification-icon-background-color: rgb(var(--label-violet-05));\n --mds-push-notification-icon-color: rgb(var(--label-violet-10));\n}\n\n:host( [variant="violet"] ),\n:host( [variant="violet"][tone="weak"] ) {\n\n --mds-push-notification-icon-background-color: rgb(var(--label-violet-09));\n --mds-push-notification-icon-color: rgb(var(--label-violet-05));\n}\n\n:host( [variant="violet"][tone="quiet"] ) {\n\n --mds-push-notification-icon-background-color: transparent;\n --mds-push-notification-icon-color: rgb(var(--label-violet-05));\n}\n\n:host( [variant="blue"][tone="strong"] ) {\n \n --mds-push-notification-icon-background-color: rgb(var(--label-blue-05));\n --mds-push-notification-icon-color: rgb(var(--label-blue-10));\n}\n\n:host( [variant="blue"] ),\n:host( [variant="blue"][tone="weak"] ) {\n\n --mds-push-notification-icon-background-color: rgb(var(--label-blue-09));\n --mds-push-notification-icon-color: rgb(var(--label-blue-05));\n}\n\n:host( [variant="blue"][tone="quiet"] ) {\n\n --mds-push-notification-icon-background-color: transparent;\n --mds-push-notification-icon-color: rgb(var(--label-blue-05));\n}\n\n:host( [variant="sky"][tone="strong"] ) {\n \n --mds-push-notification-icon-background-color: rgb(var(--label-sky-05));\n --mds-push-notification-icon-color: rgb(var(--label-sky-10));\n}\n\n:host( [variant="sky"] ),\n:host( [variant="sky"][tone="weak"] ) {\n\n --mds-push-notification-icon-background-color: rgb(var(--label-sky-09));\n --mds-push-notification-icon-color: rgb(var(--label-sky-05));\n}\n\n:host( [variant="sky"][tone="quiet"] ) {\n\n --mds-push-notification-icon-background-color: transparent;\n --mds-push-notification-icon-color: rgb(var(--label-sky-05));\n}\n\n:host( [variant="aqua"][tone="strong"] ) {\n \n --mds-push-notification-icon-background-color: rgb(var(--label-aqua-05));\n --mds-push-notification-icon-color: rgb(var(--label-aqua-10));\n}\n\n:host( [variant="aqua"] ),\n:host( [variant="aqua"][tone="weak"] ) {\n\n --mds-push-notification-icon-background-color: rgb(var(--label-aqua-09));\n --mds-push-notification-icon-color: rgb(var(--label-aqua-05));\n}\n\n:host( [variant="aqua"][tone="quiet"] ) {\n\n --mds-push-notification-icon-background-color: transparent;\n --mds-push-notification-icon-color: rgb(var(--label-aqua-05));\n}\n\n:host( [variant="green"][tone="strong"] ) {\n \n --mds-push-notification-icon-background-color: rgb(var(--label-green-05));\n --mds-push-notification-icon-color: rgb(var(--label-green-10));\n}\n\n:host( [variant="green"] ),\n:host( [variant="green"][tone="weak"] ) {\n\n --mds-push-notification-icon-background-color: rgb(var(--label-green-09));\n --mds-push-notification-icon-color: rgb(var(--label-green-05));\n}\n\n:host( [variant="green"][tone="quiet"] ) {\n\n --mds-push-notification-icon-background-color: transparent;\n --mds-push-notification-icon-color: rgb(var(--label-green-05));\n}\n\n:host( [variant="lime"][tone="strong"] ) {\n \n --mds-push-notification-icon-background-color: rgb(var(--label-lime-05));\n --mds-push-notification-icon-color: rgb(var(--label-lime-10));\n}\n\n:host( [variant="lime"] ),\n:host( [variant="lime"][tone="weak"] ) {\n\n --mds-push-notification-icon-background-color: rgb(var(--label-lime-09));\n --mds-push-notification-icon-color: rgb(var(--label-lime-05));\n}\n\n:host( [variant="lime"][tone="quiet"] ) {\n\n --mds-push-notification-icon-background-color: transparent;\n --mds-push-notification-icon-color: rgb(var(--label-lime-05));\n}\n\n:host( [variant="yellow"][tone="strong"] ) {\n \n --mds-push-notification-icon-background-color: rgb(var(--label-yellow-05));\n --mds-push-notification-icon-color: rgb(var(--label-yellow-10));\n}\n\n:host( [variant="yellow"] ),\n:host( [variant="yellow"][tone="weak"] ) {\n\n --mds-push-notification-icon-background-color: rgb(var(--label-yellow-09));\n --mds-push-notification-icon-color: rgb(var(--label-yellow-05));\n}\n\n:host( [variant="yellow"][tone="quiet"] ) {\n\n --mds-push-notification-icon-background-color: transparent;\n --mds-push-notification-icon-color: rgb(var(--label-yellow-05));\n}\n\n@tailwind utilities;\n\n:host( [variant="error"][tone="strong"] ) {\n\n --mds-push-notification-icon-background-color: rgb(var(--status-error-05));\n --mds-push-notification-icon-color: rgb(var(--status-error-10));\n}\n\n:host( [variant="error"] ),\n:host( [variant="error"][tone="weak"] ) {\n\n --mds-push-notification-icon-background-color: rgb(var(--status-error-09));\n --mds-push-notification-icon-color: rgb(var(--status-error-05));\n}\n\n:host( [variant="error"][tone="quiet"] ) {\n\n --mds-push-notification-icon-background-color: transparent;\n --mds-push-notification-icon-color: rgb(var(--status-error-05));\n}\n\n:host( [variant="warning"][tone="strong"] ) {\n \n --mds-push-notification-icon-background-color: rgb(var(--status-warning-05));\n --mds-push-notification-icon-color: rgb(var(--status-warning-10));\n}\n\n:host( [variant="warning"] ),\n:host( [variant="warning"][tone="weak"] ) {\n\n --mds-push-notification-icon-background-color: rgb(var(--status-warning-09));\n --mds-push-notification-icon-color: rgb(var(--status-warning-05));\n}\n\n:host( [variant="warning"][tone="quiet"] ) {\n\n --mds-push-notification-icon-background-color: transparent;\n --mds-push-notification-icon-color: rgb(var(--status-warning-05));\n}\n\n:host( [variant="success"][tone="strong"] ) {\n \n --mds-push-notification-icon-background-color: rgb(var(--status-success-05));\n --mds-push-notification-icon-color: rgb(var(--status-success-10));\n}\n\n:host( [variant="success"] ),\n:host( [variant="success"][tone="weak"] ) {\n\n --mds-push-notification-icon-background-color: rgb(var(--status-success-09));\n --mds-push-notification-icon-color: rgb(var(--status-success-05));\n}\n\n:host( [variant="success"][tone="quiet"] ) {\n\n --mds-push-notification-icon-background-color: transparent;\n --mds-push-notification-icon-color: rgb(var(--status-success-05));\n}\n\n:host( [variant="info"][tone="strong"] ) {\n \n --mds-push-notification-icon-background-color: rgb(var(--status-info-05));\n --mds-push-notification-icon-color: rgb(var(--status-info-10));\n}\n\n:host( [variant="info"] ),\n:host( [variant="info"][tone="weak"] ) {\n\n --mds-push-notification-icon-background-color: rgb(var(--status-info-09));\n --mds-push-notification-icon-color: rgb(var(--status-info-05));\n}\n\n:host( [variant="info"][tone="quiet"] ) {\n\n --mds-push-notification-icon-background-color: transparent;\n --mds-push-notification-icon-color: rgb(var(--status-info-05));\n}\n\n@tailwind utilities;\n\n@container style(--magma-pref-animation: reduce) {\n :host,\n .close-button {\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n }\n}\n\n@container style(--magma-pref-animation: system) {\n\n @media (prefers-reduced-motion) {\n :host,\n .close-button {\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n }\n }\n}\n\n@tailwind utilities;\n\n@container style(--magma-pref-theme: dark) {\n :host {\n\n --mds-push-notification-shadow: 0 0 0 1px rgb(var(--tone-neutral-01) / 0.3) inset;\n }\n}\n\n@container style(--magma-pref-theme: system) {\n\n @media (prefers-color-scheme: dark) {\n :host {\n\n --mds-push-notification-shadow: 0 0 0 1px rgb(var(--tone-neutral-01) / 0.3) inset;\n }\n }\n}\n\n@container style(--magma-pref-contrast: more) {\n :host {\n\n --mds-push-notification-shadow: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.6) inset;\n\n color: rgb(var(--tone-neutral-01));\n }\n}\n\n@container style(--magma-pref-contrast: system) {\n\n @media (prefers-contrast: more) {\n :host {\n\n --mds-push-notification-shadow: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.6) inset;\n\n color: rgb(var(--tone-neutral-01));\n }\n }\n}\n\n';var MdsPushNotificationStyle0=mdsPushNotificationCss;dayjs.extend(relativeTime);var MdsPushNotification=function(){function n(n){var t=this;registerInstance(this,n);this.closedEvent=createEvent(this,"mdsPushNotificationClose",7);this.t=new Locale({el:localeEl,en:localeEn,es:localeEs,it:localeIt});this.onClickClose=function(n){n.stopPropagation();t.closedEvent.emit()};this.language=undefined;this.datetime=undefined;this.dateFormat="timeago";this.deletable=true;this.icon=undefined;this.initials=undefined;this.message="Nessun messaggio disponibile";this.preview="image";this.src=undefined;this.subject=undefined;this.tone="weak";this.variant=undefined}n.prototype.updateLang=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){this.language=this.t.lang(this.host);return[2]}))}))};n.prototype.componentWillLoad=function(){var n;this.hasActions=this.host.querySelector('[slot="actions"]')!==null;this.hasBadge=this.host.querySelector('[slot="badge"]')!==null;if(this.datetime){this.datetime=sanitizeISO8601Date((n=this.datetime)===null||n===void 0?void 0:n.toString())}this.t.lang(this.host);var t={future:this.t.get("future"),past:this.t.get("past"),s:this.t.get("s"),m:this.t.get("m"),mm:this.t.get("mm"),h:this.t.get("h"),hh:this.t.get("hh"),d:this.t.get("d"),dd:this.t.get("dd"),M:this.t.get("M"),MM:this.t.get("MM"),y:this.t.get("y"),yy:this.t.get("yy")};dayjs.locale("custom-locale",{relativeTime:t})};n.prototype.render=function(){var n;return h$4(Host,{key:"682d4b39768b61439873b6ac308fb69d4c0bd32c"},((n=this.icon)!==null&&n!==void 0?n:this.preview==="avatar")&&h$4("mds-avatar",{key:"2ea4ca72b7b3ce2077612ec1083369e1a638f69b",class:"avatar",icon:this.icon,initials:this.initials,part:"avatar",src:this.src,tone:this.tone,variant:this.variant}),this.src&&this.preview!=="avatar"&&h$4("mds-img",{key:"e128e32c4421aa07640898a2139780cfe21962e1",class:"picture",part:"picture",src:this.src}),h$4("div",{key:"e38b8e1e6eaa637e6a75f9ea22b3f143cc420b8f",class:"content",part:"content"},h$4("div",{key:"fe60e8aea9f4000bf9f31ac1c220bf9c002dcbd3",class:"header"},h$4("div",{key:"7f9e374181c23bbab5241ba0565d96c6a2bf03e3",class:"infos"},this.hasBadge&&h$4("div",{key:"6387436e7e79d3055e7ff598a5b5b545dd22d19c"},h$4("slot",{key:"6e9b980cbe8de429bd3efc394006a89c2917fbcd",name:"badge"})),this.subject&&h$4("mds-text",{key:"699b5966d694cb9cee8c3614c2d49743f020bb93",class:"subject",typography:"h6",variant:"title",truncate:"all"},this.subject)),this.datetime&&h$4("mds-text",{key:"44a473a607e2f5c3be55313fd0f5722d6635017c",class:"time",typography:"option"},this.dateFormat==="timeago"?dayjs(this.datetime).fromNow():dayjs(this.datetime).format(this.dateFormat))),h$4("mds-text",{key:"06bcc873d47b26418a71a7e2064c6bebe786a6c3",class:"message",truncate:"all",typography:"caption",variant:"info"},this.message),this.hasActions&&h$4("div",{key:"c5de013ae3f29e2e972576b6c6a012de935a7491",class:"actions",part:"actions"},h$4("slot",{key:"bfe621eff62949f8416f695e8c2a85a430674044",name:"actions"}))),this.deletable&&h$4("mds-button",{key:"6d2970a2aaf90f5a9ce1be74da0da78b3a1b2016",class:"close-button",title:this.t.get("dismiss"),icon:miBaselineCancel,onClick:this.onClickClose.bind(this)}))};Object.defineProperty(n.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});return n}();MdsPushNotification.style=MdsPushNotificationStyle0;export{MdsPushNotification as mds_push_notification};
@@ -1 +1 @@
1
- import{p as a,b as t}from"./p-7857bd4f.js";export{s as setNonce}from"./p-7857bd4f.js";import{g as e}from"./p-e1255160.js";(()=>{const t=import.meta.url,e={};return""!==t&&(e.resourcesUrl=new URL(".",t).href),a(e)})().then((async a=>(await e(),t([["p-3484acd7",[[1,"mds-push-notification",{datetime:[1040],dateFormat:[513,"date-format"],deletable:[516],icon:[513],initials:[1537],message:[513],preview:[513],src:[513],subject:[513],tone:[513],variant:[513],language:[32],updateLang:[64]}]]]],a))));
1
+ import{p as a,b as e}from"./p-7857bd4f.js";export{s as setNonce}from"./p-7857bd4f.js";import{g as t}from"./p-e1255160.js";(()=>{const e=import.meta.url,t={};return""!==e&&(t.resourcesUrl=new URL(".",e).href),a(t)})().then((async a=>(await t(),e([["p-c60d85de",[[1,"mds-push-notification",{datetime:[1040],dateFormat:[513,"date-format"],deletable:[516],icon:[513],initials:[1537],message:[513],preview:[513],src:[513],subject:[513],tone:[513],variant:[513],language:[32],updateLang:[64]}]]]],a))));