@nanoporetech-digital/components 3.10.4 → 3.12.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 (52) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/cjs/nano-grid_3.cjs.entry.js +1 -1
  3. package/dist/cjs/nano-grid_3.cjs.entry.js.map +1 -1
  4. package/dist/cjs/nano-slide.cjs.entry.js +1 -1
  5. package/dist/cjs/nano-slide.cjs.entry.js.map +1 -1
  6. package/dist/cjs/nano-slides.cjs.entry.js +1 -1
  7. package/dist/cjs/nano-slides.cjs.entry.js.map +1 -1
  8. package/dist/cjs/{nano-table-971be627.js → nano-table-7c53c380.js} +2 -2
  9. package/dist/cjs/{nano-table-971be627.js.map → nano-table-7c53c380.js.map} +1 -1
  10. package/dist/cjs/nano-table.cjs.entry.js +1 -1
  11. package/dist/cjs/{table.worker-899171ef.js → table.worker-653666fe.js} +2 -2
  12. package/dist/cjs/table.worker-653666fe.js.map +1 -0
  13. package/dist/collection/components/img/img.css +26 -2
  14. package/dist/collection/components/slides/slide.css +1 -1
  15. package/dist/collection/components/slides/slides.css +6 -4
  16. package/dist/components/img.js +1 -1
  17. package/dist/components/img.js.map +1 -1
  18. package/dist/components/nano-slide.js +1 -1
  19. package/dist/components/nano-slide.js.map +1 -1
  20. package/dist/components/nano-slides.js +1 -1
  21. package/dist/components/nano-slides.js.map +1 -1
  22. package/dist/esm/nano-grid_3.entry.js +1 -1
  23. package/dist/esm/nano-grid_3.entry.js.map +1 -1
  24. package/dist/esm/nano-slide.entry.js +1 -1
  25. package/dist/esm/nano-slide.entry.js.map +1 -1
  26. package/dist/esm/nano-slides.entry.js +1 -1
  27. package/dist/esm/nano-slides.entry.js.map +1 -1
  28. package/dist/esm/{nano-table-cde6996a.js → nano-table-0e141ceb.js} +2 -2
  29. package/dist/esm/{nano-table-cde6996a.js.map → nano-table-0e141ceb.js.map} +1 -1
  30. package/dist/esm/nano-table.entry.js +1 -1
  31. package/dist/esm/{table.worker-8f3446dd.js → table.worker-b93822af.js} +2 -2
  32. package/dist/esm/table.worker-b93822af.js.map +1 -0
  33. package/dist/nano-components/nano-components.esm.js +1 -1
  34. package/dist/nano-components/{p-cedc1f88.js → p-29fbd756.js} +2 -2
  35. package/dist/nano-components/{p-23a40dd5.entry.js.map → p-29fbd756.js.map} +0 -0
  36. package/dist/nano-components/{p-8b4b8a57.js → p-2fc0d478.js} +2 -2
  37. package/dist/nano-components/{p-8b4b8a57.js.map → p-2fc0d478.js.map} +0 -0
  38. package/dist/nano-components/{p-23a40dd5.entry.js → p-5d0de75a.entry.js} +2 -2
  39. package/dist/nano-components/{p-cedc1f88.js.map → p-5d0de75a.entry.js.map} +0 -0
  40. package/dist/nano-components/p-9520a248.entry.js +5 -0
  41. package/dist/nano-components/p-9520a248.entry.js.map +1 -0
  42. package/dist/nano-components/{p-2f7bb24f.entry.js → p-a6416490.entry.js} +3 -3
  43. package/dist/nano-components/{p-2f7bb24f.entry.js.map → p-a6416490.entry.js.map} +1 -1
  44. package/dist/nano-components/{p-41eeef4f.entry.js → p-d32dafd9.entry.js} +2 -2
  45. package/dist/nano-components/{p-41eeef4f.entry.js.map → p-d32dafd9.entry.js.map} +1 -1
  46. package/docs-json.json +1 -1
  47. package/hydrate/index.js +3 -3
  48. package/package.json +2 -2
  49. package/dist/cjs/table.worker-899171ef.js.map +0 -1
  50. package/dist/esm/table.worker-8f3446dd.js.map +0 -1
  51. package/dist/nano-components/p-41be7990.entry.js +0 -5
  52. package/dist/nano-components/p-41be7990.entry.js.map +0 -1
@@ -5,7 +5,7 @@
5
5
 
6
6
  Object.defineProperty(exports, '__esModule', { value: true });
7
7
 
8
- const nanoTable_entry = require('./nano-table-971be627.js');
8
+ const nanoTable_entry = require('./nano-table-7c53c380.js');
9
9
  require('./index-46286eea.js');
10
10
  require('./math-a8123703.js');
11
11
  require('./throttle-f55496c8.js');
@@ -3,7 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- const nanoTable_entry = require('./nano-table-971be627.js');
6
+ const nanoTable_entry = require('./nano-table-7c53c380.js');
7
7
  require('./index-46286eea.js');
8
8
  require('./math-a8123703.js');
9
9
  require('./throttle-f55496c8.js');
@@ -22,4 +22,4 @@ exports.workerMsgId = workerMsgId;
22
22
  exports.workerName = workerName;
23
23
  exports.workerPath = workerPath;
24
24
 
25
- //# sourceMappingURL=table.worker-899171ef.js.map
25
+ //# sourceMappingURL=table.worker-653666fe.js.map
@@ -0,0 +1 @@
1
+ {"file":"table.worker-653666fe.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -31,8 +31,6 @@
31
31
 
32
32
  .img {
33
33
  position: relative;
34
- min-block-size: inherit;
35
- display: block;
36
34
  object-fit: inherit;
37
35
  object-position: inherit;
38
36
  background-color: inherit;
@@ -41,6 +39,21 @@
41
39
  background-origin: inherit;
42
40
  background-attachment: inherit;
43
41
  background-repeat: inherit;
42
+ flex: 1 1 100%;
43
+ display: flex;
44
+ flex-direction: column;
45
+ min-block-size: inherit;
46
+ max-block-size: inherit;
47
+ max-inline-size: inherit;
48
+ min-height: inherit;
49
+ min-width: inherit;
50
+ block-size: inherit;
51
+ inline-size: inherit;
52
+ height: inherit;
53
+ width: inherit;
54
+ max-height: inherit;
55
+ max-width: inherit;
56
+ aspect-ratio: inherit;
44
57
  }
45
58
 
46
59
  .img__loader,
@@ -59,6 +72,7 @@
59
72
  opacity: 0;
60
73
  transition: 0.5s ease opacity, 0.3s ease filter 0.4s;
61
74
  filter: blur(5px);
75
+ flex: 1;
62
76
  }
63
77
  .img__image.loaded,
64
78
  .img__bg.loaded {
@@ -78,7 +92,17 @@
78
92
  object-fit: inherit;
79
93
  object-position: inherit;
80
94
  max-inline-size: 100%;
95
+ min-block-size: inherit;
96
+ max-block-size: inherit;
97
+ min-height: inherit;
98
+ min-width: inherit;
81
99
  block-size: auto;
100
+ inline-size: inherit;
101
+ height: inherit;
102
+ width: inherit;
103
+ max-height: inherit;
104
+ max-width: inherit;
105
+ aspect-ratio: inherit;
82
106
  }
83
107
  .img__image.hide {
84
108
  visibility: hidden;
@@ -13,7 +13,6 @@
13
13
  :host {
14
14
  display: flex;
15
15
  position: relative;
16
- flex-shrink: 0;
17
16
  align-items: center;
18
17
  justify-content: center;
19
18
  inline-size: 100%;
@@ -24,6 +23,7 @@
24
23
  overflow: hidden;
25
24
  transition: opacity 0.2s;
26
25
  opacity: 0;
26
+ flex-direction: column;
27
27
  }
28
28
 
29
29
  :host([ready]) {
@@ -44,17 +44,18 @@
44
44
  }
45
45
 
46
46
  .slideshow {
47
- block-size: 100%;
47
+ min-height: inherit;
48
+ min-block-size: inherit;
48
49
  position: relative;
49
50
  }
50
51
 
51
52
  .flickity-container {
52
- block-size: 0;
53
53
  opacity: 0;
54
54
  transition: opacity 0.2s;
55
55
  }
56
56
  .flickity-container.slides-ready {
57
- block-size: 100%;
57
+ min-height: inherit;
58
+ min-block-size: inherit;
58
59
  }
59
60
 
60
61
  [hidden] {
@@ -88,7 +89,8 @@ https://flickity.metafizzy.co
88
89
  .flickity-viewport {
89
90
  overflow: hidden;
90
91
  position: relative;
91
- block-size: 100% !important;
92
+ min-height: inherit;
93
+ min-block-size: inherit;
92
94
  }
93
95
 
94
96
  .flickity-slider {
@@ -5,7 +5,7 @@ import { proxyCustomElement, HTMLElement, createEvent, h, Build } from '@stencil
5
5
  import { d as defineCustomElement$2 } from './resize-observe.js';
6
6
  import { d as defineCustomElement$1 } from './skeleton.js';
7
7
 
8
- const imgCss = ":host{box-sizing:border-box}*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}:host{--padding:0;display:inline-block;object-fit:cover;object-position:center;background-size:cover;background-position:center}:host *{border-radius:inherit}:host([background]:not([background=false])){display:block}.img{position:relative;min-block-size:inherit;display:block;object-fit:inherit;object-position:inherit;background-color:inherit;background-position:inherit;background-size:inherit;background-origin:inherit;background-attachment:inherit;background-repeat:inherit}.img__loader,.img__observer{position:absolute;inset:0;block-size:100%;inline-size:100%;z-index:-1}.img__image,.img__bg{border-radius:inherit;display:block;opacity:0;transition:0.5s ease opacity, 0.3s ease filter 0.4s;filter:blur(5px)}.img__image.loaded,.img__bg.loaded{opacity:1;filter:blur(0.1px)}@media not all and (min-resolution: 0.001dpcm){@supports (-webkit-appearance: none){.img__image.loaded,.img__bg.loaded{filter:blur(0)}}}.img__image{object-fit:inherit;object-position:inherit;max-inline-size:100%;block-size:auto}.img__image.hide{visibility:hidden}.img__image.hide.no-height{block-size:1px;position:absolute;z-index:-1}.img__bg{background-color:inherit;background-position:inherit;background-size:inherit;background-origin:inherit;background-attachment:inherit;background-repeat:inherit;overflow:auto;padding:var(--padding)}.img__bg.no-height{position:absolute;inset:0}";
8
+ const imgCss = ":host{box-sizing:border-box}*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}:host{--padding:0;display:inline-block;object-fit:cover;object-position:center;background-size:cover;background-position:center}:host *{border-radius:inherit}:host([background]:not([background=false])){display:block}.img{position:relative;object-fit:inherit;object-position:inherit;background-color:inherit;background-position:inherit;background-size:inherit;background-origin:inherit;background-attachment:inherit;background-repeat:inherit;flex:1 1 100%;display:flex;flex-direction:column;min-block-size:inherit;max-block-size:inherit;max-inline-size:inherit;min-height:inherit;min-width:inherit;block-size:inherit;inline-size:inherit;height:inherit;width:inherit;max-height:inherit;max-width:inherit;aspect-ratio:inherit}.img__loader,.img__observer{position:absolute;inset:0;block-size:100%;inline-size:100%;z-index:-1}.img__image,.img__bg{border-radius:inherit;display:block;opacity:0;transition:0.5s ease opacity, 0.3s ease filter 0.4s;filter:blur(5px);flex:1}.img__image.loaded,.img__bg.loaded{opacity:1;filter:blur(0.1px)}@media not all and (min-resolution: 0.001dpcm){@supports (-webkit-appearance: none){.img__image.loaded,.img__bg.loaded{filter:blur(0)}}}.img__image{object-fit:inherit;object-position:inherit;max-inline-size:100%;min-block-size:inherit;max-block-size:inherit;min-height:inherit;min-width:inherit;block-size:auto;inline-size:inherit;height:inherit;width:inherit;max-height:inherit;max-width:inherit;aspect-ratio:inherit}.img__image.hide{visibility:hidden}.img__image.hide.no-height{block-size:1px;position:absolute;z-index:-1}.img__bg{background-color:inherit;background-position:inherit;background-size:inherit;background-origin:inherit;background-attachment:inherit;background-repeat:inherit;overflow:auto;padding:var(--padding)}.img__bg.no-height{position:absolute;inset:0}";
9
9
 
10
10
  const Img = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
11
11
  constructor() {
@@ -1 +1 @@
1
- {"file":"img.js","mappings":";;;;;;;AAAA,MAAM,MAAM,GAAG,07CAA07C;;MCuB57C,GAAG;;;;;;;;IAEN,YAAO,GAAwD,EAAE,CAAC;IAiGlE,WAAM,GAAG;MACf,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC;MAC3B,UAAU,CAAC,OAAO,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;KAC/C,CAAC;IAEM,YAAO,GAAG;MAChB,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;KAC1B,CAAC;IAEM,aAAQ,GAAG,CAAC,CAA2C;MAC7D,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,MAAM,CAAC;QAC5C,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,MAAM,GAAG,MAAM,CAAC;OAClC,CAAC,CAAC;;MAGH,MAAM,OAAO,GAAG,EAAE,CAAC;MACnB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;SACtB,IAAI,EAAE;SACN,OAAO,CAAC,CAAC,EAAE;QACV,IAAI,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,MAAM;UAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC;OACjE,CAAC,CAAC;MAEL,I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,WAAK,KAAK,EAAC,KAAK,IACd,qBAAe,KAAK,EAAC,aAAa,GAAiB,EAClD,CAAC,CAAC,IAAI,CAAC,UAAU,KAChB,WACE,KAAK,EAAE;QACL,MAAM,EAAE,IAAI,CAAC,SAAS;QACtB,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,IAAI,CAAC,UAAU,KAAK,OAAO;OACzC,EACD,KAAK,EAAE,OAAO,IAEd,eAAQ,CACJ,CACP,EACD,WACE,KAAK,EAAE;QACL,UAAU,EAAE,IAAI;QAChB,MAAM,EAAE,IAAI,CAAC,SAAS;QACtB,IAAI,EAAE,IAAI,CAAC,UAAU;QACrB,WAAW,EAAE,IAAI,CAAC,UAAU,KAAK,SAAS;OAC3C,EACD,QAAQ,EAAC,OAAO,EAChB,GAAG,EAAE,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,OAAO,EAC7C,OAAO,EAAE,KAAK,CAAC,QAAQ,IAAI,IAAI,CAAC,IAAI,GAAG,MAAM,GAAG,SAAS,EACzD,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,OAAO,EAAE,IAAI,CAAC,SAAS,GACvB,EACF,2BACE,KAAK,EAAC,eAAe,EACrB,uBAAuB,EAAE,IAAI,CAAC,QAAQ,EACtC,MAAM,EAAE,IAAI,CAAC,SAAS,GACtB,CACE,EACN;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/img/img.scss?tag=nano-img&encapsulation=shadow","./src/components/img/img.tsx"],"sourcesContent":[":host {\n /**\n * @prop --padding: padding around any content. Only relevent on `<nano-img background>`\n */\n --padding: 0;\n\n display: inline-block;\n object-fit: cover;\n object-position: center;\n background-size: cover;\n background-position: center;\n\n * {\n border-radius: inherit;\n }\n}\n\n:host([background]:not([background='false'])) {\n display: block;\n}\n\n.img {\n position: relative;\n min-block-size: inherit;\n // block-size: 100%;\n display: block;\n object-fit: inherit;\n object-position: inherit;\n background-color: inherit;\n background-position: inherit;\n background-size: inherit;\n background-origin: inherit;\n background-attachment: inherit;\n background-repeat: inherit;\n}\n\n.img__loader,\n.img__observer {\n position: absolute;\n inset: 0;\n block-size: 100%;\n inline-size: 100%;\n z-index: -1;\n}\n\n.img__image,\n.img__bg {\n border-radius: inherit;\n display: block;\n opacity: 0;\n transition: 0.5s ease opacity, 0.3s ease filter 0.4s;\n filter: blur(5px);\n\n &.loaded {\n opacity: 1;\n filter: blur(0.1px);\n\n @media not all and (min-resolution: 0.001dpcm) {\n @supports (-webkit-appearance: none) {\n filter: blur(0);\n }\n }\n }\n}\n\n.img__image {\n object-fit: inherit;\n object-position: inherit;\n max-inline-size: 100%;\n block-size: auto;\n\n &.hide {\n visibility: hidden;\n\n &.no-height {\n block-size: 1px;\n position: absolute;\n z-index: -1;\n }\n }\n}\n\n.img__bg {\n background-color: inherit;\n background-position: inherit;\n background-size: inherit;\n background-origin: inherit;\n background-attachment: inherit;\n background-repeat: inherit;\n overflow: auto;\n padding: var(--padding);\n\n &.no-height {\n position: absolute;\n inset: 0;\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n State,\n Prop,\n Watch,\n h,\n ComponentInterface,\n Build,\n} from '@stencil/core';\nimport type { ResizeStateChangeEventDetail } from '../../interface';\n\n/**\n * Img with benefits. Lazy loading. Simple `srcSet` solution for both `<img>` and `background-image` varieties.\n * @slot - Main slot. Only relevant with `<nano-img background>`\n */\n@Component({\n tag: 'nano-img',\n styleUrl: 'img.scss',\n shadow: true,\n})\nexport class Img implements ComponentInterface {\n private io?: IntersectionObserver;\n private _srcSet: { [key: string]: { src: string; active: boolean } } = {};\n\n @Element() host!: HTMLNanoImgElement;\n\n @State() loadSrc?: string;\n @State() loadError?: () => void;\n @State() hasLoaded: boolean = false;\n @State() imgStates: string = null;\n @State() _src: string;\n @Watch('_src')\n _srcChanged() {\n this.hasLoaded = false;\n this.addIO();\n }\n\n /** This attribute defines the alternative text describing the image.\n * Users will see this text displayed if the image URL is wrong, or if the image is not yet downloaded. */\n @Prop() alt?: string;\n\n /** The image URL. This attribute is mandatory for the `<img>` element. */\n @Prop() src!: string;\n @Watch('src')\n srcChanged() {\n this._src = this.src;\n }\n\n /** Optional list string providing media sizes with corresponding image srcs.\n * i.e. show img-x at 300px wide. Format `srcSet=\"200w src/imgSmall.jpg, 500h src/imgMed.png\"` */\n @Prop() srcSet?: string;\n @Watch('srcSet')\n srcSetChanged() {\n if (!this.srcSet) return;\n\n delete this._srcSet;\n this._srcSet = {};\n\n this.imgStates = this.srcSet\n .split(',')\n .map((bpSrc) => {\n const [bp, src] = bpSrc.split(' ').filter((bp) => bp.length);\n this._srcSet[bp] = { src: src, active: false };\n return bp;\n })\n .join(', ');\n }\n\n /** Render image lazily, when it comes into the browser viewport **/\n @Prop() lazy: boolean = true;\n @Watch('lazy')\n lazyChanged() {\n if (!this.lazy) this.load();\n }\n\n /** Render the image as a background image **/\n @Prop() background?: boolean;\n\n /** When the image is rendered as a background, and there is no preset dimensions of the component,\n * you can set how the component height will be set. Via image size or via the content **/\n @Prop() autoHeight: 'content' | 'image' = 'content';\n\n /** Emitted when the img src has been set */\n @Event() nanoImgWillLoad!: EventEmitter<void>;\n\n /** Emitted when the image has finished loading */\n @Event() nanoImgDidLoad!: EventEmitter<void>;\n\n /** Emitted when the img fails to load */\n @Event() nanoImgError!: EventEmitter<void>;\n\n private addIO() {\n if (!this._src || this.hasLoaded) return;\n if (!this.lazy) {\n this.load();\n return;\n }\n if (\n typeof (window as any) !== 'undefined' &&\n 'IntersectionObserver' in window\n ) {\n this.removeIO();\n this.io = new IntersectionObserver((data) => {\n if (data[0].isIntersecting) {\n this.load();\n this.removeIO();\n }\n });\n\n this.io.observe(this.host);\n } else setTimeout(() => this.load(), 200);\n }\n\n private load() {\n this.loadError = this.onError;\n this.loadSrc = this._src;\n this.nanoImgWillLoad.emit();\n }\n\n private onLoad = () => {\n this.nanoImgDidLoad.emit();\n setTimeout(() => (this.hasLoaded = true), 50);\n };\n\n private onError = () => {\n this.nanoImgError.emit();\n };\n\n private onResize = (e: { detail: ResizeStateChangeEventDetail }) => {\n Object.entries(e.detail).forEach(([bp, active]) => {\n this._srcSet[bp].active = active;\n });\n\n // sort and find the highest sized matching image.\n const srcOpts = [];\n Object.keys(this._srcSet)\n .sort()\n .forEach((bp) => {\n if (this._srcSet[bp].active) srcOpts.push(this._srcSet[bp].src);\n });\n\n if (srcOpts.length) this._src = srcOpts.slice(-1)[0];\n // no matching image? Set back to default\n else this._src = this.src;\n };\n\n private removeIO() {\n if (this.io) {\n this.io.disconnect();\n this.io = undefined;\n }\n }\n\n connectedCallback() {\n this.srcChanged();\n this.srcSetChanged();\n this.lazyChanged();\n }\n\n componentDidLoad() {\n this.addIO();\n }\n\n disconnectedCallback() {\n this.removeIO();\n }\n\n render() {\n const bgStyle = !!this.loadSrc\n ? { 'background-image': `url(${this.loadSrc})` }\n : {};\n\n return (\n <div class=\"img\">\n <nano-skeleton class=\"img__loader\"></nano-skeleton>\n {!!this.background && (\n <div\n class={{\n loaded: this.hasLoaded,\n img__bg: true,\n 'no-height': this.autoHeight === 'image',\n }}\n style={bgStyle}\n >\n <slot />\n </div>\n )}\n <img\n class={{\n img__image: true,\n loaded: this.hasLoaded,\n hide: this.background,\n 'no-height': this.autoHeight === 'content',\n }}\n decoding=\"async\"\n src={Build.isServer ? this.src : this.loadSrc}\n loading={Build.isServer && this.lazy ? 'lazy' : undefined}\n alt={this.alt}\n onLoad={this.onLoad}\n onError={this.loadError}\n />\n <nano-resize-observe\n class=\"img__observer\"\n onNanoResizeStateChange={this.onResize}\n states={this.imgStates}\n />\n </div>\n );\n }\n}\n"],"version":3}
1
+ {"file":"img.js","mappings":";;;;;;;AAAA,MAAM,MAAM,GAAG,o3DAAo3D;;MCuBt3D,GAAG;;;;;;;;IAEN,YAAO,GAAwD,EAAE,CAAC;IAiGlE,WAAM,GAAG;MACf,IAA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,OAAO,EAChB,GAAG,EAAE,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,OAAO,EAC7C,OAAO,EAAE,KAAK,CAAC,QAAQ,IAAI,IAAI,CAAC,IAAI,GAAG,MAAM,GAAG,SAAS,EACzD,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,OAAO,EAAE,IAAI,CAAC,SAAS,GACvB,EACF,2BACE,KAAK,EAAC,eAAe,EACrB,uBAAuB,EAAE,IAAI,CAAC,QAAQ,EACtC,MAAM,EAAE,IAAI,CAAC,SAAS,GACtB,CACE,EACN;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/img/img.scss?tag=nano-img&encapsulation=shadow","./src/components/img/img.tsx"],"sourcesContent":[":host {\n /**\n * @prop --padding: padding around any content. Only relevent on `<nano-img background>`\n */\n --padding: 0;\n\n display: inline-block;\n object-fit: cover;\n object-position: center;\n background-size: cover;\n background-position: center;\n\n * {\n border-radius: inherit;\n }\n}\n\n:host([background]:not([background='false'])) {\n display: block;\n}\n\n.img {\n position: relative;\n object-fit: inherit;\n object-position: inherit;\n background-color: inherit;\n background-position: inherit;\n background-size: inherit;\n background-origin: inherit;\n background-attachment: inherit;\n background-repeat: inherit;\n flex: 1 1 100%;\n display: flex;\n flex-direction: column;\n min-block-size: inherit;\n max-block-size: inherit;\n max-inline-size: inherit;\n min-height: inherit;\n min-width: inherit;\n block-size: inherit;\n inline-size: inherit;\n height: inherit;\n width: inherit;\n max-height: inherit;\n max-width: inherit;\n aspect-ratio: inherit;\n}\n\n.img__loader,\n.img__observer {\n position: absolute;\n inset: 0;\n block-size: 100%;\n inline-size: 100%;\n z-index: -1;\n}\n\n.img__image,\n.img__bg {\n border-radius: inherit;\n display: block;\n opacity: 0;\n transition: 0.5s ease opacity, 0.3s ease filter 0.4s;\n filter: blur(5px);\n flex: 1;\n\n &.loaded {\n opacity: 1;\n filter: blur(0.1px);\n\n @media not all and (min-resolution: 0.001dpcm) {\n @supports (-webkit-appearance: none) {\n filter: blur(0);\n }\n }\n }\n}\n\n.img__image {\n object-fit: inherit;\n object-position: inherit;\n max-inline-size: 100%;\n min-block-size: inherit;\n max-block-size: inherit;\n min-height: inherit;\n min-width: inherit;\n block-size: auto;\n inline-size: inherit;\n height: inherit;\n width: inherit;\n max-height: inherit;\n max-width: inherit;\n aspect-ratio: inherit;\n\n &.hide {\n visibility: hidden;\n\n &.no-height {\n block-size: 1px;\n position: absolute;\n z-index: -1;\n }\n }\n}\n\n.img__bg {\n background-color: inherit;\n background-position: inherit;\n background-size: inherit;\n background-origin: inherit;\n background-attachment: inherit;\n background-repeat: inherit;\n overflow: auto;\n padding: var(--padding);\n\n &.no-height {\n position: absolute;\n inset: 0;\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n State,\n Prop,\n Watch,\n h,\n ComponentInterface,\n Build,\n} from '@stencil/core';\nimport type { ResizeStateChangeEventDetail } from '../../interface';\n\n/**\n * Img with benefits. Lazy loading. Simple `srcSet` solution for both `<img>` and `background-image` varieties.\n * @slot - Main slot. Only relevant with `<nano-img background>`\n */\n@Component({\n tag: 'nano-img',\n styleUrl: 'img.scss',\n shadow: true,\n})\nexport class Img implements ComponentInterface {\n private io?: IntersectionObserver;\n private _srcSet: { [key: string]: { src: string; active: boolean } } = {};\n\n @Element() host!: HTMLNanoImgElement;\n\n @State() loadSrc?: string;\n @State() loadError?: () => void;\n @State() hasLoaded: boolean = false;\n @State() imgStates: string = null;\n @State() _src: string;\n @Watch('_src')\n _srcChanged() {\n this.hasLoaded = false;\n this.addIO();\n }\n\n /** This attribute defines the alternative text describing the image.\n * Users will see this text displayed if the image URL is wrong, or if the image is not yet downloaded. */\n @Prop() alt?: string;\n\n /** The image URL. This attribute is mandatory for the `<img>` element. */\n @Prop() src!: string;\n @Watch('src')\n srcChanged() {\n this._src = this.src;\n }\n\n /** Optional list string providing media sizes with corresponding image srcs.\n * i.e. show img-x at 300px wide. Format `srcSet=\"200w src/imgSmall.jpg, 500h src/imgMed.png\"` */\n @Prop() srcSet?: string;\n @Watch('srcSet')\n srcSetChanged() {\n if (!this.srcSet) return;\n\n delete this._srcSet;\n this._srcSet = {};\n\n this.imgStates = this.srcSet\n .split(',')\n .map((bpSrc) => {\n const [bp, src] = bpSrc.split(' ').filter((bp) => bp.length);\n this._srcSet[bp] = { src: src, active: false };\n return bp;\n })\n .join(', ');\n }\n\n /** Render image lazily, when it comes into the browser viewport **/\n @Prop() lazy: boolean = true;\n @Watch('lazy')\n lazyChanged() {\n if (!this.lazy) this.load();\n }\n\n /** Render the image as a background image **/\n @Prop() background?: boolean;\n\n /** When the image is rendered as a background, and there is no preset dimensions of the component,\n * you can set how the component height will be set. Via image size or via the content **/\n @Prop() autoHeight: 'content' | 'image' = 'content';\n\n /** Emitted when the img src has been set */\n @Event() nanoImgWillLoad!: EventEmitter<void>;\n\n /** Emitted when the image has finished loading */\n @Event() nanoImgDidLoad!: EventEmitter<void>;\n\n /** Emitted when the img fails to load */\n @Event() nanoImgError!: EventEmitter<void>;\n\n private addIO() {\n if (!this._src || this.hasLoaded) return;\n if (!this.lazy) {\n this.load();\n return;\n }\n if (\n typeof (window as any) !== 'undefined' &&\n 'IntersectionObserver' in window\n ) {\n this.removeIO();\n this.io = new IntersectionObserver((data) => {\n if (data[0].isIntersecting) {\n this.load();\n this.removeIO();\n }\n });\n\n this.io.observe(this.host);\n } else setTimeout(() => this.load(), 200);\n }\n\n private load() {\n this.loadError = this.onError;\n this.loadSrc = this._src;\n this.nanoImgWillLoad.emit();\n }\n\n private onLoad = () => {\n this.nanoImgDidLoad.emit();\n setTimeout(() => (this.hasLoaded = true), 50);\n };\n\n private onError = () => {\n this.nanoImgError.emit();\n };\n\n private onResize = (e: { detail: ResizeStateChangeEventDetail }) => {\n Object.entries(e.detail).forEach(([bp, active]) => {\n this._srcSet[bp].active = active;\n });\n\n // sort and find the highest sized matching image.\n const srcOpts = [];\n Object.keys(this._srcSet)\n .sort()\n .forEach((bp) => {\n if (this._srcSet[bp].active) srcOpts.push(this._srcSet[bp].src);\n });\n\n if (srcOpts.length) this._src = srcOpts.slice(-1)[0];\n // no matching image? Set back to default\n else this._src = this.src;\n };\n\n private removeIO() {\n if (this.io) {\n this.io.disconnect();\n this.io = undefined;\n }\n }\n\n connectedCallback() {\n this.srcChanged();\n this.srcSetChanged();\n this.lazyChanged();\n }\n\n componentDidLoad() {\n this.addIO();\n }\n\n disconnectedCallback() {\n this.removeIO();\n }\n\n render() {\n const bgStyle = !!this.loadSrc\n ? { 'background-image': `url(${this.loadSrc})` }\n : {};\n\n return (\n <div class=\"img\">\n <nano-skeleton class=\"img__loader\"></nano-skeleton>\n {!!this.background && (\n <div\n class={{\n loaded: this.hasLoaded,\n img__bg: true,\n 'no-height': this.autoHeight === 'image',\n }}\n style={bgStyle}\n >\n <slot />\n </div>\n )}\n <img\n class={{\n img__image: true,\n loaded: this.hasLoaded,\n hide: this.background,\n 'no-height': this.autoHeight === 'content',\n }}\n decoding=\"async\"\n src={Build.isServer ? this.src : this.loadSrc}\n loading={Build.isServer && this.lazy ? 'lazy' : undefined}\n alt={this.alt}\n onLoad={this.onLoad}\n onError={this.loadError}\n />\n <nano-resize-observe\n class=\"img__observer\"\n onNanoResizeStateChange={this.onResize}\n states={this.imgStates}\n />\n </div>\n );\n }\n}\n"],"version":3}
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
5
5
 
6
- const slideCss = ":host{box-sizing:border-box}*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}:host{display:flex;position:relative;flex-shrink:0;align-items:center;justify-content:center;inline-size:100%;min-block-size:100%;font-size:18px;text-align:center;box-sizing:border-box;overflow:hidden;transition:opacity 0.2s;opacity:0}:host([ready]){opacity:1}";
6
+ const slideCss = ":host{box-sizing:border-box}*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}:host{display:flex;position:relative;align-items:center;justify-content:center;inline-size:100%;min-block-size:100%;font-size:18px;text-align:center;box-sizing:border-box;overflow:hidden;transition:opacity 0.2s;opacity:0;flex-direction:column}:host([ready]){opacity:1}";
7
7
 
8
8
  const Slide = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
9
9
  constructor() {
@@ -1 +1 @@
1
- {"file":"nano-slide.js","mappings":";;;;;AAAA,MAAM,QAAQ,GAAG,8WAA8W;;MCgBlX,KAAK;;;;;;iBAUgD,IAAI;;EAGpE,WAAW,CAAC,QAAwB,EAAE,QAAyB;IAC7D,IACE,OAAO,QAAQ,KAAK,WAAW;MAC/B,QAAQ,KAAK,KAAK;MAClB,QAAQ,KAAK,IAAI,EACjB;MACA,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC;KAC5B;GACF;EAED,gBAAgB;;IAEd,IAAI,OAAO,IAAI,CAAC,KAAK,KAAK,SAAS;MAAE,OAAO;IAC5C,UAAU,CAAC;MACT,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC;MAC3B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;KACnB,CAAC,CAAC;GACJ;EAED,MAAM;IACJ,QACE,EAAC,IAAI,QACH,eAAQ,CACH,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/slides/slide.scss?tag=nano-slide&encapsulation=shadow","./src/components/slides/slide.tsx"],"sourcesContent":["// Slide\n// --------------------------------------------------\n\n:host {\n // Center slide text vertically\n display: flex;\n position: relative;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n inline-size: 100%;\n min-block-size: 100%;\n font-size: 18px;\n text-align: center;\n box-sizing: border-box;\n overflow: hidden;\n transition: opacity 0.2s;\n opacity: 0;\n}\n\n:host([ready]) {\n opacity: 1;\n}\n","import {\n Component,\n ComponentInterface,\n Host,\n h,\n Event,\n EventEmitter,\n Prop,\n Watch,\n} from '@stencil/core';\n\n@Component({\n tag: 'nano-slide',\n styleUrl: 'slide.scss',\n shadow: true,\n})\nexport class Slide implements ComponentInterface {\n /**\n * Fired when the slide has loaded.\n */\n @Event() nanoSlideReady!: EventEmitter<void>;\n\n /**\n * Used to to inform the parent slides components of readiness.\n * This will automatically be set to true when the slide has loaded but can be set and updated manually.\n */\n @Prop({ mutable: true, reflect: true }) ready: boolean | null = null;\n\n @Watch('ready')\n readyChange(newReady: boolean | null, oldReady?: boolean | null) {\n if (\n typeof oldReady !== 'undefined' &&\n oldReady === false &&\n newReady === true\n ) {\n this.nanoSlideReady.emit();\n }\n }\n\n componentDidLoad() {\n // ready state is being loaded manually\n if (typeof this.ready === 'boolean') return;\n setTimeout(() => {\n this.nanoSlideReady.emit();\n this.ready = true;\n });\n }\n\n render() {\n return (\n <Host>\n <slot />\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"nano-slide.js","mappings":";;;;;AAAA,MAAM,QAAQ,GAAG,sXAAsX;;MCgB1X,KAAK;;;;;;iBAUgD,IAAI;;EAGpE,WAAW,CAAC,QAAwB,EAAE,QAAyB;IAC7D,IACE,OAAO,QAAQ,KAAK,WAAW;MAC/B,QAAQ,KAAK,KAAK;MAClB,QAAQ,KAAK,IAAI,EACjB;MACA,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC;KAC5B;GACF;EAED,gBAAgB;;IAEd,IAAI,OAAO,IAAI,CAAC,KAAK,KAAK,SAAS;MAAE,OAAO;IAC5C,UAAU,CAAC;MACT,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC;MAC3B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;KACnB,CAAC,CAAC;GACJ;EAED,MAAM;IACJ,QACE,EAAC,IAAI,QACH,eAAQ,CACH,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/slides/slide.scss?tag=nano-slide&encapsulation=shadow","./src/components/slides/slide.tsx"],"sourcesContent":["// Slide\n// --------------------------------------------------\n\n:host {\n // Center slide text vertically\n display: flex;\n position: relative;\n align-items: center;\n justify-content: center;\n inline-size: 100%;\n min-block-size: 100%;\n font-size: 18px;\n text-align: center;\n box-sizing: border-box;\n overflow: hidden;\n transition: opacity 0.2s;\n opacity: 0;\n flex-direction: column;\n}\n\n:host([ready]) {\n opacity: 1;\n}\n","import {\n Component,\n ComponentInterface,\n Host,\n h,\n Event,\n EventEmitter,\n Prop,\n Watch,\n} from '@stencil/core';\n\n@Component({\n tag: 'nano-slide',\n styleUrl: 'slide.scss',\n shadow: true,\n})\nexport class Slide implements ComponentInterface {\n /**\n * Fired when the slide has loaded.\n */\n @Event() nanoSlideReady!: EventEmitter<void>;\n\n /**\n * Used to to inform the parent slides components of readiness.\n * This will automatically be set to true when the slide has loaded but can be set and updated manually.\n */\n @Prop({ mutable: true, reflect: true }) ready: boolean | null = null;\n\n @Watch('ready')\n readyChange(newReady: boolean | null, oldReady?: boolean | null) {\n if (\n typeof oldReady !== 'undefined' &&\n oldReady === false &&\n newReady === true\n ) {\n this.nanoSlideReady.emit();\n }\n }\n\n componentDidLoad() {\n // ready state is being loaded manually\n if (typeof this.ready === 'boolean') return;\n setTimeout(() => {\n this.nanoSlideReady.emit();\n this.ready = true;\n });\n }\n\n render() {\n return (\n <Host>\n <slot />\n </Host>\n );\n }\n}\n"],"version":3}
@@ -3820,7 +3820,7 @@ proto.shiftWrapCells = function () {
3820
3820
 
3821
3821
  const flickity = Flickity;
3822
3822
 
3823
- const slidesCss = ":host{box-sizing:border-box}*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}:host{--dot-color:#ccc;--dot-color-active:var(--nano-color-primary, #007495);--navbtns-icon-color:var(--dot-color-active);--navbtns-bg-color:white;--navbtns-icon-color-disabled:var(--dot-color-active);--navbtns-bg-color-disabled:white;--fsbtn-icon-color:var(--dot-color-active);--fsbtn-bg-color:white;display:block;-webkit-user-select:none;user-select:none;overflow:hidden;transition:opacity 0.2s;opacity:0}:host([ready]){opacity:1}.slideshow{block-size:100%;position:relative}.flickity-container{block-size:0;opacity:0;transition:opacity 0.2s}.flickity-container.slides-ready{block-size:100%}[hidden]{display:none !important}.ui-extras{pointer-events:none;position:absolute;block-size:100%;inline-size:100%;inset-block-start:0;inset-inline-start:0}.ui-extras *{pointer-events:all}/*! Flickity v2.2.1\nhttps://flickity.metafizzy.co\n---------------------------------------------- */.flickity-enabled{position:relative;opacity:1}.flickity-enabled:focus{outline:none}.flickity-viewport{overflow:hidden;position:relative;block-size:100% !important}.flickity-slider{position:absolute;inline-size:100%;block-size:100%}.flickity-enabled.is-draggable{-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none}.flickity-enabled.is-draggable .flickity-viewport{cursor:move;cursor:grab;cursor:grab}.flickity-enabled.is-draggable .flickity-viewport.is-pointer-down{cursor:grabbing}.flickity-button{position:absolute;background:var(--navbtns-bg-color);border:none;color:#333;opacity:0.75}.flickity-button:hover{opacity:1;cursor:pointer}.flickity-button:focus{outline:none;box-shadow:0 0 0 5px #19f}.flickity-button:active{opacity:0.6}.flickity-button:disabled{opacity:0.3;cursor:auto;pointer-events:none;background:var(--navbtns-bg-color-disabled)}.flickity-button-icon{fill:var(--navbtns-icon-color)}.flickity-button:disabled .flickity-button-icon{fill:var(--navbtns-icon-color-disabled)}.flickity-prev-next-button{inset-block-start:50%;inline-size:44px;block-size:44px;border-radius:50%;transform:translateY(-50%)}.flickity-prev-next-button.previous{inset-inline-start:10px}.flickity-prev-next-button.next{inset-inline-end:10px}.flickity-rtl .flickity-prev-next-button.previous{inset-inline:auto 10px}.flickity-rtl .flickity-prev-next-button.next{inset-inline:10px auto}.flickity-prev-next-button .flickity-button-icon{position:absolute;inset-inline-start:20%;inset-block-start:20%;inline-size:60%;block-size:60%}.flickity-page-dots{position:absolute;inline-size:100%;inset-block-end:10px;padding:0;margin:0;list-style:none;text-align:center;line-height:1;z-index:4}.flickity-rtl .flickity-page-dots{direction:rtl}.flickity-page-dots .dot{display:inline-block;inline-size:10px;block-size:10px;margin-block:0;margin-inline:8px;border-radius:50%;cursor:pointer;background:var(--dot-color)}.flickity-page-dots .dot.is-selected{opacity:1;background:var(--dot-color-active)}.flickity-enabled.is-fullscreen{position:fixed;inset-inline-start:0;inset-block-start:0;inline-size:100%;block-size:100%;background:rgba(0, 0, 0, 0.9);-webkit-padding-after:35px;padding-block-end:35px;z-index:100}.flickity-enabled.is-fullscreen .flickity-page-dots{inset-block-end:45px}html.is-flickity-fullscreen{overflow:hidden}.flickity-fullscreen-button{display:block;inset-inline-end:10px;inset-block-start:10px;inline-size:24px;block-size:24px;border-radius:4px;background:var(--fsbtn-bg-color);fill:var(--fsbtn-icon-color)}.flickity-rtl .flickity-fullscreen-button{inset-inline:10px auto}.flickity-fullscreen-button-exit{display:none}.flickity-enabled.is-fullscreen .flickity-fullscreen-button-exit{display:block}.flickity-enabled.is-fullscreen .flickity-fullscreen-button-view{display:none}.flickity-fullscreen-button .flickity-button-icon{position:absolute;inline-size:16px;block-size:16px;inset-inline-start:4px;inset-block-start:4px}.flickity-enabled.is-fade .flickity-slider>*{pointer-events:none;z-index:0}.flickity-enabled.is-fade .flickity-slider ::slotted(.is-selected){pointer-events:auto;z-index:1}";
3823
+ const slidesCss = ":host{box-sizing:border-box}*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}:host{--dot-color:#ccc;--dot-color-active:var(--nano-color-primary, #007495);--navbtns-icon-color:var(--dot-color-active);--navbtns-bg-color:white;--navbtns-icon-color-disabled:var(--dot-color-active);--navbtns-bg-color-disabled:white;--fsbtn-icon-color:var(--dot-color-active);--fsbtn-bg-color:white;display:block;-webkit-user-select:none;user-select:none;overflow:hidden;transition:opacity 0.2s;opacity:0}:host([ready]){opacity:1}.slideshow{min-height:inherit;min-block-size:inherit;position:relative}.flickity-container{opacity:0;transition:opacity 0.2s}.flickity-container.slides-ready{min-height:inherit;min-block-size:inherit}[hidden]{display:none !important}.ui-extras{pointer-events:none;position:absolute;block-size:100%;inline-size:100%;inset-block-start:0;inset-inline-start:0}.ui-extras *{pointer-events:all}/*! Flickity v2.2.1\nhttps://flickity.metafizzy.co\n---------------------------------------------- */.flickity-enabled{position:relative;opacity:1}.flickity-enabled:focus{outline:none}.flickity-viewport{overflow:hidden;position:relative;min-height:inherit;min-block-size:inherit}.flickity-slider{position:absolute;inline-size:100%;block-size:100%}.flickity-enabled.is-draggable{-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none}.flickity-enabled.is-draggable .flickity-viewport{cursor:move;cursor:grab;cursor:grab}.flickity-enabled.is-draggable .flickity-viewport.is-pointer-down{cursor:grabbing}.flickity-button{position:absolute;background:var(--navbtns-bg-color);border:none;color:#333;opacity:0.75}.flickity-button:hover{opacity:1;cursor:pointer}.flickity-button:focus{outline:none;box-shadow:0 0 0 5px #19f}.flickity-button:active{opacity:0.6}.flickity-button:disabled{opacity:0.3;cursor:auto;pointer-events:none;background:var(--navbtns-bg-color-disabled)}.flickity-button-icon{fill:var(--navbtns-icon-color)}.flickity-button:disabled .flickity-button-icon{fill:var(--navbtns-icon-color-disabled)}.flickity-prev-next-button{inset-block-start:50%;inline-size:44px;block-size:44px;border-radius:50%;transform:translateY(-50%)}.flickity-prev-next-button.previous{inset-inline-start:10px}.flickity-prev-next-button.next{inset-inline-end:10px}.flickity-rtl .flickity-prev-next-button.previous{inset-inline:auto 10px}.flickity-rtl .flickity-prev-next-button.next{inset-inline:10px auto}.flickity-prev-next-button .flickity-button-icon{position:absolute;inset-inline-start:20%;inset-block-start:20%;inline-size:60%;block-size:60%}.flickity-page-dots{position:absolute;inline-size:100%;inset-block-end:10px;padding:0;margin:0;list-style:none;text-align:center;line-height:1;z-index:4}.flickity-rtl .flickity-page-dots{direction:rtl}.flickity-page-dots .dot{display:inline-block;inline-size:10px;block-size:10px;margin-block:0;margin-inline:8px;border-radius:50%;cursor:pointer;background:var(--dot-color)}.flickity-page-dots .dot.is-selected{opacity:1;background:var(--dot-color-active)}.flickity-enabled.is-fullscreen{position:fixed;inset-inline-start:0;inset-block-start:0;inline-size:100%;block-size:100%;background:rgba(0, 0, 0, 0.9);-webkit-padding-after:35px;padding-block-end:35px;z-index:100}.flickity-enabled.is-fullscreen .flickity-page-dots{inset-block-end:45px}html.is-flickity-fullscreen{overflow:hidden}.flickity-fullscreen-button{display:block;inset-inline-end:10px;inset-block-start:10px;inline-size:24px;block-size:24px;border-radius:4px;background:var(--fsbtn-bg-color);fill:var(--fsbtn-icon-color)}.flickity-rtl .flickity-fullscreen-button{inset-inline:10px auto}.flickity-fullscreen-button-exit{display:none}.flickity-enabled.is-fullscreen .flickity-fullscreen-button-exit{display:block}.flickity-enabled.is-fullscreen .flickity-fullscreen-button-view{display:none}.flickity-fullscreen-button .flickity-button-icon{position:absolute;inline-size:16px;block-size:16px;inset-inline-start:4px;inset-block-start:4px}.flickity-enabled.is-fade .flickity-slider>*{pointer-events:none;z-index:0}.flickity-enabled.is-fade .flickity-slider ::slotted(.is-selected){pointer-events:auto;z-index:1}";
3824
3824
 
3825
3825
  const Slides = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$1 {
3826
3826
  constructor() {