maz-ui 3.0.0-beta.18 → 3.0.0-beta.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/components/MazAvatar.d.ts +2 -2
  2. package/components/MazAvatar.js +2 -2
  3. package/components/MazAvatar.js.map +1 -1
  4. package/components/MazBottomSheet.js +2 -2
  5. package/components/MazBottomSheet.js.map +1 -1
  6. package/components/MazBtn.d.ts +1 -1
  7. package/components/MazBtn.js +2 -2
  8. package/components/MazBtn.js.map +1 -1
  9. package/components/MazCard.d.ts +4 -8
  10. package/components/MazCard.js +2 -2
  11. package/components/MazCard.js.map +1 -1
  12. package/components/MazCheckbox.d.ts +2 -2
  13. package/components/MazCheckbox.js +1 -1
  14. package/components/MazDialog.d.ts +3 -1
  15. package/components/MazDialog.js +2 -2
  16. package/components/MazDialog.js.map +1 -1
  17. package/components/MazDropzone.js +2 -2
  18. package/components/MazGallery.d.ts +1 -1
  19. package/components/MazGallery.js +2 -2
  20. package/components/MazGallery.js.map +1 -1
  21. package/components/MazIcon.js +1 -1
  22. package/components/MazIcon.js.map +1 -1
  23. package/components/MazInput.d.ts +4 -1
  24. package/components/MazInput.js +2 -2
  25. package/components/MazInput.js.map +1 -1
  26. package/components/MazInputPrice.js +2 -2
  27. package/components/MazInputPrice.js.map +1 -1
  28. package/components/MazLazyImg.d.ts +1 -1
  29. package/components/MazLazyImg.js +2 -2
  30. package/components/MazLazyImg.js.map +1 -1
  31. package/components/MazPhoneNumberInput.d.ts +1 -1
  32. package/components/MazPhoneNumberInput.js +2 -2
  33. package/components/MazPhoneNumberInput.js.map +1 -1
  34. package/components/MazSelect.d.ts +1 -1
  35. package/components/MazSelect.js +2 -2
  36. package/components/MazSelect.js.map +1 -1
  37. package/components/MazSpinner.d.ts +2 -2
  38. package/components/MazSpinner.js +1 -1
  39. package/components/MazTabsBar.d.ts +42 -0
  40. package/components/MazTabsBar.js +16 -0
  41. package/components/MazTabsBar.js.map +1 -0
  42. package/components/MazTabsContent.d.ts +15 -0
  43. package/components/MazTabsContent.js +2 -0
  44. package/components/MazTabsContent.js.map +1 -0
  45. package/components/MazTabsContentItem.d.ts +13 -0
  46. package/components/MazTabsContentItem.js +16 -0
  47. package/components/MazTabsContentItem.js.map +1 -0
  48. package/components/index.d.ts +25 -19
  49. package/components/index.js +9 -0
  50. package/css/main.css +77 -51
  51. package/maz-ui.d.ts +49 -12
  52. package/modules/index.js +2 -2
  53. package/modules/index.js.map +1 -1
  54. package/package.json +4 -4
@@ -17,6 +17,9 @@ import { default as MazLazyImg } from './MazLazyImg.js'
17
17
  import { default as MazPhoneNumberInput } from './MazPhoneNumberInput.js'
18
18
  import { default as MazSelect } from './MazSelect.js'
19
19
  import { default as MazSpinner } from './MazSpinner.js'
20
+ import { default as MazTabsBar } from './MazTabsBar.js'
21
+ import { default as MazTabsContent } from './MazTabsContent.js'
22
+ import { default as MazTabsContentItem } from './MazTabsContentItem.js'
20
23
  import { default as MazTransitionExpand } from './MazTransitionExpand.js'
21
24
 
22
25
  export {
@@ -37,6 +40,9 @@ export {
37
40
  MazPhoneNumberInput,
38
41
  MazSelect,
39
42
  MazSpinner,
43
+ MazTabsBar,
44
+ MazTabsContent,
45
+ MazTabsContentItem,
40
46
  MazTransitionExpand
41
47
  }
42
48
 
@@ -58,5 +64,8 @@ export default {
58
64
  MazPhoneNumberInput,
59
65
  MazSelect,
60
66
  MazSpinner,
67
+ MazTabsBar,
68
+ MazTabsContent,
69
+ MazTabsContentItem,
61
70
  MazTransitionExpand
62
71
  }
package/css/main.css CHANGED
@@ -1,3 +1,8 @@
1
+ html {
2
+ font-family: var(--maz-font-family);
3
+ line-height: 1.5;
4
+ }
5
+
1
6
  *,
2
7
  ::before,
3
8
  ::after {
@@ -6,6 +11,22 @@
6
11
  border-color: #e5e7eb;
7
12
  }
8
13
 
14
+ button {
15
+ background-color: transparent;
16
+ color: var(--maz-color-normal-text);
17
+ }
18
+
19
+ button,
20
+ input,
21
+ optgroup,
22
+ select,
23
+ textarea {
24
+ font-family: inherit;
25
+ font-size: 100%;
26
+ line-height: 1.15;
27
+ margin: 0;
28
+ }
29
+
9
30
  /* Color palette generate with https://noeldelgado.github.io/shadowlord/#002b6f and 17,5% parameter */
10
31
 
11
32
  :root {
@@ -343,50 +364,34 @@ html.dark {
343
364
  */
344
365
 
345
366
  .maz-tab-transition-enter-from {
346
- -webkit-transform: translate(100%, 0);
347
- transform: translate(100%, 0);
348
- }
367
+ -webkit-transform: translate(100%, 0);
368
+ transform: translate(100%, 0);
369
+ }
349
370
 
350
371
  .maz-tab-transition-leave,
351
- .maz-tab-transition-leave-active {
352
- position: absolute !important;
353
- top: 0;
354
- }
372
+ .maz-tab-transition-leave-active {
373
+ position: absolute !important;
374
+ top: 0;
375
+ }
355
376
 
356
377
  .maz-tab-transition-leave-to {
357
- position: absolute !important;
358
- -webkit-transform: translate(-100%, 0);
359
- transform: translate(-100%, 0);
360
- }
378
+ position: absolute !important;
379
+ -webkit-transform: translate(-100%, 0);
380
+ transform: translate(-100%, 0);
381
+ }
361
382
 
362
383
  .maz-tab-reverse-transition-enter-from {
363
- -webkit-transform: translate(-100%, 0);
364
- transform: translate(-100%, 0);
365
- }
366
-
367
- .maz-tab-reverse-transition-enter-from-leave,
368
- .maz-tab-reverse-transition-enter-from-leave-to {
369
- top: 0;
370
- position: absolute !important;
371
- -webkit-transform: translate(100%, 0);
372
- transform: translate(100%, 0);
373
- }
374
-
375
- .maz-bottom-sheet-enter-active .maz-bottom-sheet-animation,
376
- .maz-bottom-sheet-leave .maz-bottom-sheet-animation {
377
- opacity: 1;
378
- -webkit-transition: all 300ms;
379
- transition: all 300ms;
380
- -webkit-transform: translateY(0);
381
- transform: translateY(0);
382
- }
384
+ -webkit-transform: translate(-100%, 0);
385
+ transform: translate(-100%, 0);
386
+ }
383
387
 
384
- .maz-bottom-sheet-enter .maz-bottom-sheet-animation,
385
- .maz-bottom-sheet-leave-to .maz-bottom-sheet-animatio {
386
- opacity: 1;
387
- -webkit-transform: translateY(100%);
388
- transform: translateY(100%);
389
- }
388
+ .maz-tab-reverse-transition-leave,
389
+ .maz-tab-reverse-transition-leave-to {
390
+ top: 0;
391
+ position: absolute !important;
392
+ -webkit-transform: translate(100%, 0);
393
+ transform: translate(100%, 0);
394
+ }
390
395
 
391
396
  *, ::before, ::after {
392
397
  --tw-border-opacity: 1;
@@ -480,6 +485,11 @@ html.dark {
480
485
  margin: 0px;
481
486
  }
482
487
 
488
+ .maz-mx-1 {
489
+ margin-left: 0.25rem;
490
+ margin-right: 0.25rem;
491
+ }
492
+
483
493
  .maz-mx-auto {
484
494
  margin-left: auto;
485
495
  margin-right: auto;
@@ -490,6 +500,11 @@ html.dark {
490
500
  margin-bottom: 0px;
491
501
  }
492
502
 
503
+ .maz-my-1 {
504
+ margin-top: 0.25rem;
505
+ margin-bottom: 0.25rem;
506
+ }
507
+
493
508
  .maz-my-2 {
494
509
  margin-top: 0.5rem;
495
510
  margin-bottom: 0.5rem;
@@ -503,6 +518,10 @@ html.dark {
503
518
  margin-top: 1rem;
504
519
  }
505
520
 
521
+ .maz-mr-1 {
522
+ margin-right: 0.25rem;
523
+ }
524
+
506
525
  .maz-mr-2 {
507
526
  margin-right: 0.5rem;
508
527
  }
@@ -591,10 +610,6 @@ html.dark {
591
610
  width: 1.25rem;
592
611
  }
593
612
 
594
- .maz-w-6 {
595
- width: 1.5rem;
596
- }
597
-
598
613
  .maz-w-9 {
599
614
  width: 2.25rem;
600
615
  }
@@ -607,6 +622,10 @@ html.dark {
607
622
  width: 3rem;
608
623
  }
609
624
 
625
+ .maz-w-3\/5 {
626
+ width: 60%;
627
+ }
628
+
610
629
  .maz-w-full {
611
630
  width: 100%;
612
631
  }
@@ -659,16 +678,6 @@ html.dark {
659
678
  --tw-rotate: 0deg;
660
679
  }
661
680
 
662
- .maz-scale-0 {
663
- --tw-scale-x: 0;
664
- --tw-scale-y: 0;
665
- }
666
-
667
- .maz-scale-105 {
668
- --tw-scale-x: 1.05;
669
- --tw-scale-y: 1.05;
670
- }
671
-
672
681
  @-webkit-keyframes maz-spin {
673
682
  to {
674
683
  -webkit-transform: rotate(360deg);
@@ -1019,6 +1028,10 @@ html.dark {
1019
1028
  background-color: var(--maz-color-bg-light);
1020
1029
  }
1021
1030
 
1031
+ .maz-bg-color-lighter {
1032
+ background-color: var(--maz-color-bg-lighter);
1033
+ }
1034
+
1022
1035
  .maz-bg-primary-50 {
1023
1036
  background-color: var(--maz-color-primary-50);
1024
1037
  }
@@ -1095,6 +1108,10 @@ html.dark {
1095
1108
  fill: currentColor;
1096
1109
  }
1097
1110
 
1111
+ .maz-p-0 {
1112
+ padding: 0px;
1113
+ }
1114
+
1098
1115
  .maz-p-2 {
1099
1116
  padding: 0.5rem;
1100
1117
  }
@@ -1152,6 +1169,11 @@ html.dark {
1152
1169
  padding-bottom: 0.25rem;
1153
1170
  }
1154
1171
 
1172
+ .maz-py-2 {
1173
+ padding-top: 0.5rem;
1174
+ padding-bottom: 0.5rem;
1175
+ }
1176
+
1155
1177
  .maz-py-3 {
1156
1178
  padding-top: 0.75rem;
1157
1179
  padding-bottom: 0.75rem;
@@ -1258,6 +1280,10 @@ html.dark {
1258
1280
  color: var(--maz-color-normal-text);
1259
1281
  }
1260
1282
 
1283
+ .maz-text-color {
1284
+ color: var(--maz-color-bg);
1285
+ }
1286
+
1261
1287
  .maz-text-primary {
1262
1288
  color: var(--maz-color-primary);
1263
1289
  }
package/maz-ui.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import * as vue from 'vue';
2
1
  import { Directive, Plugin } from 'vue';
3
2
 
4
3
  declare type ArgumentTypes<F extends (...args: any[]) => void> = F extends (...args: infer A) => any ? A : never;
@@ -9,25 +8,61 @@ declare type MethodTypes = {
9
8
  declare function debounce<T extends (...args: any[]) => void>(fn: T, wait?: number, callFirst?: boolean): ((...args: ArgumentTypes<T>) => void) & MethodTypes;
10
9
 
11
10
  declare const directive$2: Directive;
12
- declare const mixin: {
13
- directives: {
14
- ClickAway: vue.ObjectDirective<any, any>;
15
- };
16
- };
17
-
18
11
  declare const plugin$3: Plugin;
19
12
 
20
13
  declare const directive$1: Directive;
21
14
  declare const plugin$2: Plugin;
22
15
 
16
+ interface vZoomImgOptions {
17
+ disabled?: boolean;
18
+ scale?: boolean;
19
+ blur?: boolean;
20
+ }
21
+ interface vZoomImgBindingOptions extends vZoomImgOptions {
22
+ src: string;
23
+ alt?: string;
24
+ }
25
+ declare type vZoomImgBinding = string | vZoomImgBindingOptions;
23
26
  declare const directive: Directive;
24
- declare const plugin$1: Plugin;
27
+ declare const plugin$1: {
28
+ install(app: any): void;
29
+ };
25
30
 
26
31
  declare const vLazyImg: Directive;
27
32
 
28
- declare const plugin: Plugin;
33
+ interface vLazyImgOptions {
34
+ baseClass?: string;
35
+ loadingClass?: string;
36
+ loadedClass?: string;
37
+ errorClass?: string;
38
+ noPhotoClass?: string;
39
+ noPhoto?: boolean;
40
+ noUseErrorPhoto?: boolean;
41
+ observerOnce?: boolean;
42
+ loadOnce?: boolean;
43
+ observerOptions?: {
44
+ root?: HTMLElement | null;
45
+ threshold?: number;
46
+ rootMargin?: string;
47
+ };
48
+ errorPhoto?: string;
49
+ onLoading?: (el: Element) => unknown;
50
+ onLoaded?: (el: Element) => unknown;
51
+ onError?: (el: Element) => unknown;
52
+ onIntersecting?: (el: Element) => unknown;
53
+ }
54
+ interface vLazyImgBindingOptions extends vLazyImgOptions {
55
+ src?: string;
56
+ }
57
+ declare type vLazyImgBinding = string | vLazyImgBindingOptions;
58
+
59
+ declare const plugin: {
60
+ install(app: any, opts?: vLazyImgOptions): void;
61
+ };
29
62
 
30
- declare const installDirectives: Plugin;
63
+ declare const installDirectives: {
64
+ install(app: any): void;
65
+ };
31
66
 
32
67
  interface FilterCurrencyOptions extends Intl.NumberFormatOptions {
33
68
  round?: boolean;
@@ -47,6 +82,8 @@ declare const filters: {
47
82
  number: (number: string | number, locale: string, options: Intl.NumberFormatOptions) => string;
48
83
  };
49
84
  declare type Filters = typeof filters;
50
- declare const installFilters: Plugin;
85
+ declare const installFilters: {
86
+ install(app: any): void;
87
+ };
51
88
 
52
- export { Filters, capitalize, currency, date, debounce, installDirectives, installFilters, number, directive$2 as vClickOutside, plugin$3 as vClickOutsideInstall, mixin as vClickOutsideMixin, directive$1 as vClosable, plugin$2 as vClosableInstall, vLazyImg, plugin as vLazyImgInstall, directive as vZoomImg, plugin$1 as vZoomImgInstall };
89
+ export { Filters, capitalize, currency, date, debounce, installDirectives, installFilters, number, directive$2 as vClickOutside, plugin$3 as vClickOutsideInstall, directive$1 as vClosable, plugin$2 as vClosableInstall, vLazyImg, vLazyImgBinding, plugin as vLazyImgInstall, vLazyImgOptions, directive as vZoomImg, vZoomImgBinding, plugin$1 as vZoomImgInstall, vZoomImgOptions };
package/modules/index.js CHANGED
@@ -1,4 +1,4 @@
1
- function e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=void 0,o=void 0,i=function(){r&&(clearTimeout(r),o=void 0,r=void 0)},a=function(){var e=o;i(),e&&e()},s=function(){for(var a=arguments.length,s=new Array(a),u=0;u<a;u++)s[u]=arguments[u];if(!t)return e.apply(this,[s]);var c=this,l=n&&!r;return i(),o=function(){e.apply(c,[s])},r=setTimeout((function(){if(r=void 0,!l){var e=o;if(o=void 0,void 0!==e)return e()}}),t),l?o():void 0};return s.cancel=i,s.flush=a,s}var t="__vue_click_away__",n=function(){return null!==document.ontouchstart?"click":"touchstart"},r=function(e,r){o(e);var i=r.instance,a=r.value,s=!1;setTimeout((function(){s=!0}),0),e[t]=function(t){if((!e||!e.contains(t.target))&&a&&s&&"function"==typeof a)return a.call(i,t)};var u=n();document.addEventListener(u,e[t],!1)},o=function(e){var r=n();document.removeEventListener(r,e[t],!1),delete e[t]},i={mounted:r,updated:function(e,t){t.value!==t.oldValue&&r(e,t)},unmounted:o},a={directives:{ClickAway:i}},s={install:function(e){e.directive("click-outside",i)}};function u(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var l=function(e,t,n,r){e.stopPropagation();var o=n.value,i=o.handler,a=o.exclude,s=!1;if(a&&a.length>0){var c,l=u(a);try{for(l.s();!(c=l.n()).done;){var d=c.value;if(!s)s=r.context.$refs[d].contains(e.target)}}catch(e){l.e(e)}finally{l.f()}}t.contains(e.target)||s||r.context[i]()},d={mounted:function(e,t,n){document.addEventListener("click",(function(r){return l(r,e,t,n)})),document.addEventListener("touchstart",(function(r){return l(r,e,t,n)}))},unmounted:function(e,t,n){document.removeEventListener("click",(function(r){return l(r,e,t,n)})),document.removeEventListener("touchstart",(function(r){return l(r,e,t,n)}))}},h={install:function(e){e.directive("closable",d)}};function m(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var f={exports:{}};!function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(f);var v,p=m(f.exports),g={exports:{}};(v=g).exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},v.exports.__esModule=!0,v.exports.default=v.exports;var y=m(g.exports),b={exports:{}};!function(e){function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports}(b);var w,x=m(b.exports),z={close:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>',next:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg>',previous:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/></svg>',spinner:'<svg width="40px" height="40px" version="1.1" xmlns="http://www.w3.org/2000/svg" fill="currentColor" x="0px" y="0px" viewBox="0 0 50 50" xml:space="preserve" class="maz-zoom-img__loader__svg" data-v-6d1cb50c=""><path d="M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z"></path></svg>'},k=function(){function e(t){if(y(this,e),this.defaultOptions={scale:!0,blur:!0,disabled:!1,alt:"vue zoom img"},!t.value)throw new Error('[MazUI](img-preview) Image path must be defined. Ex: `v-zoom-img="<PATH_TO_IMAGE>"`');if("object"===p(t.value)&&!t.value.src)throw new Error("[MazUI](img-preview) src of image must be provided");this.buttonsAdded=!1,this.options=this.buildOptions(t),this.keydownHandler=this.keydownLister.bind(this),this.loader=this.getLoader(),this.wrapper=document.createElement("div"),this.wrapper.classList.add("maz-zoom-img__wrapper"),this.wrapper.prepend(this.loader),this.img=document.createElement("img"),this.onImgLoadedCallback=this.onImgLoaded.bind(this),this.imgEventHandler(!0)}return x(e,[{key:"buildOptions",value:function(e){return Object.assign(Object.assign({},this.defaultOptions),"object"===p(e.value)?e.value:{src:e.value})}},{key:"allInstances",get:function(){return Array.from(document.querySelectorAll(".maz-zoom-img-instance"))}},{key:"create",value:function(e){var t=this;this.options.disabled||(e.style.cursor="pointer",setTimeout((function(){return e.classList.add("maz-zoom-img-instance")})),e.setAttribute("data-src",this.options.src),e.setAttribute("data-alt",this.options.alt),e.style.transition="all 300ms ease-in-out",e.addEventListener("mouseenter",(function(){return t.mouseEnter(e)})),e.addEventListener("mouseleave",(function(){return t.mouseLeave(e)})),e.addEventListener("click",(function(){return t.renderPreview(e,t.options)})))}},{key:"update",value:function(e){this.options=this.buildOptions(e)}},{key:"remove",value:function(e){var t=this;this.imgEventHandler(!1),e.removeEventListener("click",(function(){return t.renderPreview(e)})),e.removeEventListener("mouseenter",(function(){return t.mouseEnter(e)})),e.removeEventListener("mouseleave",(function(){return t.mouseLeave(e)})),e.classList.remove("maz-zoom-img-instance"),e.removeAttribute("data-src"),e.removeAttribute("data-alt"),e.style.cursor=""}},{key:"renderPreview",value:function(e,t){var n=this;e.classList.add("maz-is-open"),this.addStyle("\n.maz-zoom-img {\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n padding: 2.5rem;\n z-index: 1050;\n background-color: rgba(86, 87, 117, .7);\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n}\n\n.maz-zoom-img,\n.maz-zoom-img * {\n box-sizing: border-box;\n}\n\n.maz-zoom-img .maz-zoom-img__wrapper {\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n min-width: 0;\n min-height: 0;\n max-width: 100%;\n max-height: 100%;\n transition: all 300ms ease-in-out;\n opacity: 0;\n transform: scale(0.5);\n}\n\n.maz-zoom-img.maz-animate .maz-zoom-img__wrapper {\n opacity: 1;\n transform: scale(1);\n}\n\n.maz-zoom-img.maz-animate .maz-zoom-img__loader {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: rgba(86, 87, 117, .7);\n border-radius: 1rem;\n z-index: 2;\n min-width: 60px;\n min-height: 60px;\n}\n.maz-zoom-img.maz-animate .maz-zoom-img__loader[hidden] {\n display: none;\n}\n\n@-webkit-keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n}\n\n@keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n}\n\n.maz-zoom-img.maz-animate .maz-zoom-img__loader__svg {\n animation: spin .6s linear infinite;\n}\n\n.maz-zoom-img img {\n max-width: 100%;\n max-height: 100%;\n min-width: 0;\n border-radius: 1rem;\n}\n\n.maz-zoom-img .maz-zoom-btn {\n margin: 0 auto;\n border: none;\n background-color: rgba(17, 17, 17, 0.5);\n box-shadow: 0 0 0.5rem 0 rgba(0, 0, 0, 0.2);\n height: 2.2rem;\n min-height: 2.2rem;\n width: 2.2rem;\n min-width: 2.2rem;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 2.2rem;\n cursor: pointer;\n flex: 0 0 auto;\n outline: none;\n}\n\n.maz-zoom-img .maz-zoom-btn svg {\n fill: white;\n}\n\n.maz-zoom-img .maz-zoom-btn.maz-zoom-btn--close {\n position: absolute;\n top: 0.5rem;\n right: 0.5rem;\n z-index: 1;\n}\n\n.maz-zoom-img .maz-zoom-btn.maz-zoom-btn--previous {\n position: absolute;\n left: 0.5rem;\n z-index: 1;\n}\n\n.maz-zoom-img .maz-zoom-btn.maz-zoom-btn--next {\n position: absolute;\n right: 0.5rem;\n z-index: 1;\n}\n\n.maz-zoom-img .maz-zoom-btn:hover {\n background-color: black;\n}");var r=document.createElement("div");r.classList.add("maz-zoom-img"),r.setAttribute("id","MazImgPreviewFullsize"),r.addEventListener("click",(function(e){r.isEqualNode(e.target)&&n.closePreview()})),"object"===p(t)&&(this.img.setAttribute("src",t.src),this.img.setAttribute("alt",t.alt),this.img.id="MazImgElement"),this.wrapper.append(this.img),r.append(this.wrapper),document.body.appendChild(r),this.keyboardEventHandler(!0),setTimeout((function(){r&&r.classList.add("maz-animate")}),100)}},{key:"onImgLoaded",value:function(){this.wrapper.style.width="".concat(this.img.width,"px"),this.wrapper.style.minWidth="200px",this.loader.hidden=!0;var e=this.getButton(),t=[],n=this.allInstances.length>1;if(!this.buttonsAdded){if(this.buttonsAdded=!0,n){var r=this.getButton("previous"),o=this.getButton("next");t.push(r,o)}this.wrapper.append(e),n&&(this.wrapper.prepend(t[0]),this.wrapper.append(t[1]))}}},{key:"getLoader",value:function(){var e=document.createElement("div");return e.classList.add("maz-zoom-img__loader"),e.innerHTML=z.spinner,e}},{key:"mouseLeave",value:function(e){this.options.scale&&(e.style.transform=""),this.options.blur&&(e.style.filter=""),e.style.zIndex=""}},{key:"mouseEnter",value:function(e){e.style.zIndex="1",this.options.scale&&(e.style.transform="scale(1.1)"),this.options.blur&&(e.style.filter="blur(2px)")}},{key:"keydownLister",value:function(e){e.preventDefault(),"Escape"!==e.key&&" "!==e.key||this.closePreview(),"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||this.nextPreviousImage("ArrowRight"===e.key)}},{key:"getButton",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"close",n=document.createElement("button");return n.innerHTML=z[t],n.onclick=function(){"close"===t?e.closePreview():e.allInstances&&e.nextPreviousImage("next"===t)},n.classList.add("maz-zoom-btn"),n.classList.add("maz-zoom-btn--".concat(t)),n}},{key:"closePreview",value:function(){var e=document.querySelector("#MazImgPreviewFullsize"),t=document.querySelector("#MazPreviewStyle"),n=document.querySelector(".maz-zoom-img-instance.maz-is-open");n&&n.classList.remove("maz-is-open"),e&&e.classList.remove("maz-animate"),this.keyboardEventHandler(!1),setTimeout((function(){e&&e.remove(),t&&t.remove()}),300)}},{key:"nextPreviousImage",value:function(e){var t=this,n=e,r=document.querySelector(".maz-zoom-img-instance.maz-is-open"),o=this.allInstances.findIndex((function(e){return e===r})),i=n?o+1:o-1,a=this.allInstances[i<0?t.allInstances.length-1:i>=t.allInstances.length?0:i];if(a&&r){r.classList.remove("maz-is-open"),a.classList.add("maz-is-open");var s=a.getAttribute("data-src"),u=a.getAttribute("data-alt");this.wrapper.style.width="",this.loader.hidden=!1,s&&this.img.setAttribute("src",s),u&&this.img.setAttribute("alt",u)}}},{key:"addStyle",value:function(e){var t=document.createElement("style");t.id="MazPreviewStyle",t.textContent=e,document.head.append(t)}},{key:"keyboardEventHandler",value:function(e){if(e)return document.addEventListener("keydown",this.keydownHandler);document.removeEventListener("keydown",this.keydownHandler)}},{key:"imgEventHandler",value:function(e){if(e)return this.img.addEventListener("load",this.onImgLoadedCallback);this.img.removeEventListener("load",this.onImgLoadedCallback)}}]),e}(),E={created:function(e,t){(w=new k(t)).create(e)},updated:function(e,t){w.update(t)},unmounted:function(e){w.remove(e)}},L={install:function(e){e.directive("zoom-img",E)}},I={exports:{}};!function(e){var t=function(e){var t,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),a=new O(r||[]);return i._invoke=function(e,t,n){var r=d;return function(o,i){if(r===m)throw new Error("Generator is already running");if(r===f){if("throw"===o)throw i;return _()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=L(a,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===d)throw r=f,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=m;var u=l(e,t,n);if("normal"===u.type){if(r=n.done?f:h,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=f,n.method="throw",n.arg=u.arg)}}}(e,n,a),i}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var d="suspendedStart",h="suspendedYield",m="executing",f="completed",v={};function p(){}function g(){}function y(){}var b={};u(b,i,(function(){return this}));var w=Object.getPrototypeOf,x=w&&w(w(C([])));x&&x!==n&&r.call(x,i)&&(b=x);var z=y.prototype=p.prototype=Object.create(b);function k(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function n(o,i,a,s){var u=l(e[o],e,i);if("throw"!==u.type){var c=u.arg,d=c.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(d).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}var o;this._invoke=function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}}function L(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,L(e,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=l(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var i=o.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function I(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function C(e){if(e){var n=e[i];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}return{next:_}}function _(){return{value:t,done:!0}}return g.prototype=y,u(z,"constructor",y),u(y,"constructor",g),g.displayName=u(y,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,u(e,s,"GeneratorFunction")),e.prototype=Object.create(z),e},e.awrap=function(e){return{__await:e}},k(E.prototype),u(E.prototype,a,(function(){return this})),e.AsyncIterator=E,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new E(c(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},k(z),u(z,s,"Generator"),u(z,i,(function(){return this})),u(z,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=C,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return s.type="throw",s.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:C(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}}(I);var A=I.exports;
1
+ function e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=void 0,o=void 0,i=function(){r&&(clearTimeout(r),o=void 0,r=void 0)},a=function(){var e=o;i(),e&&e()},s=function(){for(var a=arguments.length,s=new Array(a),u=0;u<a;u++)s[u]=arguments[u];if(!t)return e.apply(this,[s]);var c=this,l=n&&!r;return i(),o=function(){e.apply(c,[s])},r=setTimeout((function(){if(r=void 0,!l){var e=o;if(o=void 0,void 0!==e)return e()}}),t),l?o():void 0};return s.cancel=i,s.flush=a,s}var t="__vue_click_away__",n=function(){return null!==document.ontouchstart?"click":"touchstart"},r=function(e,r){o(e);var i=r.instance,a=r.value,s=!1;setTimeout((function(){s=!0}),0),e[t]=function(t){if((!e||!e.contains(t.target))&&a&&s&&"function"==typeof a)return a.call(i,t)};var u=n();document.addEventListener(u,e[t],!1)},o=function(e){var r=n();document.removeEventListener(r,e[t],!1),delete e[t]},i={mounted:r,updated:function(e,t){t.value!==t.oldValue&&r(e,t)},unmounted:o},a={install:function(e){e.directive("click-outside",i)}};function s(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var c=function(e,t,n,r){e.stopPropagation();var o=n.value,i=o.handler,a=o.exclude,u=!1;if(a&&a.length>0){var c,l=s(a);try{for(l.s();!(c=l.n()).done;){var d=c.value;if(!u)u=r.context.$refs[d].contains(e.target)}}catch(e){l.e(e)}finally{l.f()}}t.contains(e.target)||u||r.context[i]()},l=function(){return null!==document.ontouchstart?"click":"touchstart"},d={mounted:function(e,t,n){var r=l();document.addEventListener(r,(function(r){return c(r,e,t,n)}))},unmounted:function(e,t,n){var r=l();document.removeEventListener(r,(function(r){return c(r,e,t,n)}))}},h={install:function(e){e.directive("closable",d)}};function m(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var f={exports:{}};!function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(f);var v,p=m(f.exports),g={exports:{}};(v=g).exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},v.exports.__esModule=!0,v.exports.default=v.exports;var y=m(g.exports),b={exports:{}};!function(e){function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports}(b);var w,x=m(b.exports),z={close:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>',next:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg>',previous:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/></svg>',spinner:'<svg width="40px" height="40px" version="1.1" xmlns="http://www.w3.org/2000/svg" fill="currentColor" x="0px" y="0px" viewBox="0 0 50 50" xml:space="preserve" class="maz-zoom-img__loader__svg" data-v-6d1cb50c=""><path d="M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z"></path></svg>'},k=function(){function e(t){if(y(this,e),this.defaultOptions={scale:!0,blur:!0,disabled:!1},!t.value)throw new Error('[MazUI](img-preview) Image path must be defined. Ex: `v-zoom-img="<PATH_TO_IMAGE>"`');if("object"===p(t.value)&&!t.value.src)throw new Error("[MazUI](img-preview) src of image must be provided");this.buttonsAdded=!1,this.options=this.buildOptions(t),this.keydownHandler=this.keydownLister.bind(this),this.loader=this.getLoader(),this.wrapper=document.createElement("div"),this.wrapper.classList.add("maz-zoom-img__wrapper"),this.wrapper.prepend(this.loader),this.img=document.createElement("img"),this.onImgLoadedCallback=this.onImgLoaded.bind(this),this.imgEventHandler(!0)}return x(e,[{key:"buildOptions",value:function(e){return Object.assign(Object.assign({},this.defaultOptions),"object"===p(e.value)?e.value:{src:e.value})}},{key:"allInstances",get:function(){return Array.from(document.querySelectorAll(".maz-zoom-img-instance"))}},{key:"create",value:function(e){var t=this;this.options.disabled||(e.style.cursor="pointer",setTimeout((function(){return e.classList.add("maz-zoom-img-instance")})),e.setAttribute("data-src",this.options.src),this.options.alt&&e.setAttribute("data-alt",this.options.alt),e.style.transition="all 300ms ease-in-out",e.addEventListener("mouseenter",(function(){return t.mouseEnter(e)})),e.addEventListener("mouseleave",(function(){return t.mouseLeave(e)})),e.addEventListener("click",(function(){return t.renderPreview(e,t.options)})))}},{key:"update",value:function(e){this.options=this.buildOptions(e)}},{key:"remove",value:function(e){var t=this;this.imgEventHandler(!1),e.removeEventListener("click",(function(){return t.renderPreview(e)})),e.removeEventListener("mouseenter",(function(){return t.mouseEnter(e)})),e.removeEventListener("mouseleave",(function(){return t.mouseLeave(e)})),e.classList.remove("maz-zoom-img-instance"),e.removeAttribute("data-src"),e.removeAttribute("data-alt"),e.style.cursor=""}},{key:"renderPreview",value:function(e,t){var n=this;e.classList.add("maz-is-open"),this.addStyle("\n.maz-zoom-img {\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n padding: 2.5rem;\n z-index: 1050;\n background-color: rgba(86, 87, 117, .7);\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n}\n\n.maz-zoom-img,\n.maz-zoom-img * {\n box-sizing: border-box;\n}\n\n.maz-zoom-img .maz-zoom-img__wrapper {\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n min-width: 0;\n min-height: 0;\n max-width: 100%;\n max-height: 100%;\n transition: all 300ms ease-in-out;\n opacity: 0;\n transform: scale(0.5);\n}\n\n.maz-zoom-img.maz-animate .maz-zoom-img__wrapper {\n opacity: 1;\n transform: scale(1);\n}\n\n.maz-zoom-img.maz-animate .maz-zoom-img__loader {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: rgba(86, 87, 117, .7);\n border-radius: 1rem;\n z-index: 2;\n min-width: 60px;\n min-height: 60px;\n}\n.maz-zoom-img.maz-animate .maz-zoom-img__loader[hidden] {\n display: none;\n}\n\n@-webkit-keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n}\n\n@keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n}\n\n.maz-zoom-img.maz-animate .maz-zoom-img__loader__svg {\n animation: spin .6s linear infinite;\n}\n\n.maz-zoom-img img {\n max-width: 100%;\n max-height: 100%;\n min-width: 0;\n border-radius: 1rem;\n}\n\n.maz-zoom-img .maz-zoom-btn {\n margin: 0 auto;\n border: none;\n background-color: rgba(17, 17, 17, 0.5);\n box-shadow: 0 0 0.5rem 0 rgba(0, 0, 0, 0.2);\n height: 2.2rem;\n min-height: 2.2rem;\n width: 2.2rem;\n min-width: 2.2rem;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 2.2rem;\n cursor: pointer;\n flex: 0 0 auto;\n outline: none;\n}\n\n.maz-zoom-img .maz-zoom-btn svg {\n fill: white;\n}\n\n.maz-zoom-img .maz-zoom-btn.maz-zoom-btn--close {\n position: absolute;\n top: 0.5rem;\n right: 0.5rem;\n z-index: 1;\n}\n\n.maz-zoom-img .maz-zoom-btn.maz-zoom-btn--previous {\n position: absolute;\n left: 0.5rem;\n z-index: 1;\n}\n\n.maz-zoom-img .maz-zoom-btn.maz-zoom-btn--next {\n position: absolute;\n right: 0.5rem;\n z-index: 1;\n}\n\n.maz-zoom-img .maz-zoom-btn:hover {\n background-color: black;\n}");var r=document.createElement("div");r.classList.add("maz-zoom-img"),r.setAttribute("id","MazImgPreviewFullsize"),r.addEventListener("click",(function(e){r.isEqualNode(e.target)&&n.closePreview()})),"object"===p(t)&&(this.img.setAttribute("src",t.src),t.alt&&this.img.setAttribute("alt",t.alt),this.img.id="MazImgElement"),this.wrapper.append(this.img),r.append(this.wrapper),document.body.appendChild(r),this.keyboardEventHandler(!0),setTimeout((function(){r&&r.classList.add("maz-animate")}),100)}},{key:"onImgLoaded",value:function(){this.wrapper.style.width="".concat(this.img.width,"px"),this.wrapper.style.minWidth="200px",this.loader.hidden=!0;var e=this.getButton(),t=[],n=this.allInstances.length>1;if(!this.buttonsAdded){if(this.buttonsAdded=!0,n){var r=this.getButton("previous"),o=this.getButton("next");t.push(r,o)}this.wrapper.append(e),n&&(this.wrapper.prepend(t[0]),this.wrapper.append(t[1]))}}},{key:"getLoader",value:function(){var e=document.createElement("div");return e.classList.add("maz-zoom-img__loader"),e.innerHTML=z.spinner,e}},{key:"mouseLeave",value:function(e){this.options.scale&&(e.style.transform=""),this.options.blur&&(e.style.filter=""),e.style.zIndex=""}},{key:"mouseEnter",value:function(e){e.style.zIndex="1",this.options.scale&&(e.style.transform="scale(1.1)"),this.options.blur&&(e.style.filter="blur(2px)")}},{key:"keydownLister",value:function(e){e.preventDefault(),"Escape"!==e.key&&" "!==e.key||this.closePreview(),"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||this.nextPreviousImage("ArrowRight"===e.key)}},{key:"getButton",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"close",n=document.createElement("button");return n.innerHTML=z[t],n.onclick=function(){"close"===t?e.closePreview():e.allInstances&&e.nextPreviousImage("next"===t)},n.classList.add("maz-zoom-btn"),n.classList.add("maz-zoom-btn--".concat(t)),n}},{key:"closePreview",value:function(){var e=document.querySelector("#MazImgPreviewFullsize"),t=document.querySelector("#MazPreviewStyle"),n=document.querySelector(".maz-zoom-img-instance.maz-is-open");n&&n.classList.remove("maz-is-open"),e&&e.classList.remove("maz-animate"),this.keyboardEventHandler(!1),setTimeout((function(){e&&e.remove(),t&&t.remove()}),300)}},{key:"nextPreviousImage",value:function(e){var t=this,n=e,r=document.querySelector(".maz-zoom-img-instance.maz-is-open"),o=this.allInstances.findIndex((function(e){return e===r})),i=n?o+1:o-1,a=this.allInstances[i<0?t.allInstances.length-1:i>=t.allInstances.length?0:i];if(a&&r){r.classList.remove("maz-is-open"),a.classList.add("maz-is-open");var s=a.getAttribute("data-src"),u=a.getAttribute("data-alt");this.wrapper.style.width="",this.loader.hidden=!1,s&&this.img.setAttribute("src",s),u&&this.img.setAttribute("alt",u)}}},{key:"addStyle",value:function(e){var t=document.createElement("style");t.id="MazPreviewStyle",t.textContent=e,document.head.append(t)}},{key:"keyboardEventHandler",value:function(e){if(e)return document.addEventListener("keydown",this.keydownHandler);document.removeEventListener("keydown",this.keydownHandler)}},{key:"imgEventHandler",value:function(e){if(e)return this.img.addEventListener("load",this.onImgLoadedCallback);this.img.removeEventListener("load",this.onImgLoadedCallback)}}]),e}(),E={created:function(e,t){(w=new k(t)).create(e)},updated:function(e,t){w.update(t)},unmounted:function(e){w.remove(e)}},L={install:function(e){e.directive("zoom-img",E)}},I={exports:{}};!function(e){var t=function(e){var t,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),a=new O(r||[]);return i._invoke=function(e,t,n){var r=d;return function(o,i){if(r===m)throw new Error("Generator is already running");if(r===f){if("throw"===o)throw i;return _()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=L(a,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===d)throw r=f,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=m;var u=l(e,t,n);if("normal"===u.type){if(r=n.done?f:h,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=f,n.method="throw",n.arg=u.arg)}}}(e,n,a),i}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var d="suspendedStart",h="suspendedYield",m="executing",f="completed",v={};function p(){}function g(){}function y(){}var b={};u(b,i,(function(){return this}));var w=Object.getPrototypeOf,x=w&&w(w(C([])));x&&x!==n&&r.call(x,i)&&(b=x);var z=y.prototype=p.prototype=Object.create(b);function k(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function n(o,i,a,s){var u=l(e[o],e,i);if("throw"!==u.type){var c=u.arg,d=c.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(d).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}var o;this._invoke=function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}}function L(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,L(e,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=l(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var i=o.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function I(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function C(e){if(e){var n=e[i];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}return{next:_}}function _(){return{value:t,done:!0}}return g.prototype=y,u(z,"constructor",y),u(y,"constructor",g),g.displayName=u(y,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,u(e,s,"GeneratorFunction")),e.prototype=Object.create(z),e},e.awrap=function(e){return{__await:e}},k(E.prototype),u(E.prototype,a,(function(){return this})),e.AsyncIterator=E,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new E(c(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},k(z),u(z,s,"Generator"),u(z,i,(function(){return this})),u(z,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=C,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return s.type="throw",s.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:C(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}}(I);var A=I.exports;
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation.
4
4
 
@@ -12,5 +12,5 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
12
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
13
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
14
  PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */function O(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function C(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=C(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function P(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return S(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var j,T={baseClass:"m-lazy-img",loadedClass:"m-lazy-loaded",loadingClass:"m-lazy-loading",errorClass:"m-lazy-error",noPhotoClass:"m-lazy-no-photo",noPhoto:!1,observerOnce:!0,loadOnce:!1,noUseErrorPhoto:!1,observerOptions:{threshold:.1}},M=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};y(this,e),this.observers=[],this.defaultOptions=T,this.hasImgLoaded=!1,this.options=this.buildOptions(t),this.onImgLoadedCallback=this.imageIsLoaded.bind(this),this.onImgErrorCallback=this.imageHasError.bind(this)}return x(e,[{key:"loadErrorPhoto",value:function(){return O(this,void 0,void 0,A.mark((function e(){return A.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("./no_photo-a72545e4.js");case 2:return e.abrupt("return",e.sent.default);case 3:case"end":return e.stop()}}),e)})))}},{key:"buildOptions",value:function(e){return Object.assign(Object.assign(Object.assign({},this.defaultOptions),e),{observerOptions:Object.assign(Object.assign({},this.defaultOptions.observerOptions),e.observerOptions)})}},{key:"removeClass",value:function(e,t){e.classList.remove(t)}},{key:"addClass",value:function(e,t){e.classList.add(t)}},{key:"removeAllStateClasses",value:function(e){this.removeClass(e,this.options.loadedClass),this.removeClass(e,this.options.loadingClass),this.removeClass(e,this.options.errorClass),this.removeClass(e,this.options.noPhotoClass)}},{key:"setBaseClass",value:function(e){this.addClass(e,this.options.baseClass)}},{key:"imageIsLoading",value:function(e){var t,n;this.addClass(e,this.options.loadingClass),null===(n=(t=this.options).onLoading)||void 0===n||n.call(t,e)}},{key:"imageHasNoPhoto",value:function(e){this.removeClass(e,this.options.loadingClass),this.addClass(e,this.options.noPhotoClass),this.setDefaultPhoto(e)}},{key:"imageIsLoaded",value:function(e){var t,n;this.hasImgLoaded=!0,this.removeClass(e,this.options.loadingClass),this.addClass(e,this.options.loadedClass),null===(n=(t=this.options).onLoaded)||void 0===n||n.call(t,e)}},{key:"imageHasError",value:function(e,t){var n,r;console.warn("[MazLazyImg] Error while loading image",t),this.removeClass(e,this.options.loadingClass),this.addClass(e,this.options.errorClass),null===(r=(n=this.options).onError)||void 0===r||r.call(n,e),this.setDefaultPhoto(e)}},{key:"getImageUrl",value:function(e,t){var n=this.getImgElement(e).getAttribute("data-src");if(n)return n;var r="object"===p(t.value)?t.value.src:t.value;return r||console.warn("[MazLazyImg] src url is not defined"),r}},{key:"setPictureSourceUrls",value:function(e){var t,n;return O(this,void 0,void 0,A.mark((function r(){var o,i,a,s,u;return A.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!((o=e.querySelectorAll("source")).length>0)){r.next=30;break}r.prev=2,i=_(o);case 4:return r.next=6,i.next();case 6:if((a=r.sent).done){r.next=13;break}s=a.value,(u=s.getAttribute("data-srcset"))?s.srcset=u:console.warn('[MazLazyImg] the "[data-srcset]" attribute is not provided on "<source />"');case 11:r.next=4;break;case 13:r.next=18;break;case 15:r.prev=15,r.t0=r.catch(2),t={error:r.t0};case 18:if(r.prev=18,r.prev=19,!a||a.done||!(n=i.return)){r.next=23;break}return r.next=23,n.call(i);case 23:if(r.prev=23,!t){r.next=26;break}throw t.error;case 26:return r.finish(23);case 27:return r.finish(18);case 28:r.next=32;break;case 30:console.warn('[MazLazyImg] No "<source />" elements provided into the "<picture />" element'),this.imageHasError(e);case 32:case"end":return r.stop()}}),r,this,[[2,15,18,28],[19,,23,27]])})))}},{key:"hasBgImgMode",value:function(e){return"bg-image"===e.arg}},{key:"isPictureElement",value:function(e){return e instanceof HTMLPictureElement}},{key:"getImgElement",value:function(e){return this.isPictureElement(e)?e.querySelector("img"):e}},{key:"setDefaultPhoto",value:function(e){var t,n;return O(this,void 0,void 0,A.mark((function r(){var o,i,a,s;return A.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!this.options.noUseErrorPhoto){r.next=2;break}return r.abrupt("return");case 2:if(!this.options.errorPhoto){r.next=6;break}r.t0=this.options.errorPhoto,r.next=9;break;case 6:return r.next=8,this.loadErrorPhoto();case 8:r.t0=r.sent;case 9:if(o=r.t0,!((i=e.querySelectorAll("source")).length>0)){r.next=39;break}r.prev=12,a=_(i);case 14:return r.next=16,a.next();case 16:if((s=r.sent).done){r.next=22;break}s.value.srcset=o;case 20:r.next=14;break;case 22:r.next=27;break;case 24:r.prev=24,r.t1=r.catch(12),t={error:r.t1};case 27:if(r.prev=27,r.prev=28,!s||s.done||!(n=a.return)){r.next=32;break}return r.next=32,n.call(a);case 32:if(r.prev=32,!t){r.next=35;break}throw t.error;case 35:return r.finish(32);case 36:return r.finish(27);case 37:r.next=40;break;case 39:this.setImgSrc(e,o);case 40:case"end":return r.stop()}}),r,this,[[12,24,27,37],[28,,32,36]])})))}},{key:"addEventListenerToImg",value:function(e){var t=this,n=this.getImgElement(e);n.addEventListener("load",(function(){return t.onImgLoadedCallback(e)}),{once:!0}),n.addEventListener("error",(function(n){return t.onImgErrorCallback(e,n)}),{once:!0})}},{key:"loadImage",value:function(e,t){return O(this,void 0,void 0,A.mark((function n(){var r;return A.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(this.imageIsLoading(e),!this.isPictureElement(e)){n.next=7;break}return this.addEventListenerToImg(e),n.next=5,this.setPictureSourceUrls(e);case 5:n.next=11;break;case 7:if(r=this.getImageUrl(e,t)){n.next=10;break}return n.abrupt("return",this.imageHasError(e));case 10:this.hasBgImgMode(t)?(e.style.backgroundImage="url('".concat(r,"')"),this.imageIsLoaded(e)):(this.addEventListenerToImg(e),this.setImgSrc(e,r));case 11:case"end":return n.stop()}}),n,this)})))}},{key:"setImgSrc",value:function(e,t){this.getImgElement(e).src=t}},{key:"handleIntersectionObserver",value:function(e,t,n,r){var o,i;this.observers.push(r);var a,s=P(n);try{for(s.s();!(a=s.n()).done;){var u=a.value;if(u.isIntersecting){if(null===(i=(o=this.options).onIntersecting)||void 0===i||i.call(o,u.target),this.options.observerOnce&&r.unobserve(e),this.options.loadOnce&&this.hasImgLoaded)return;this.loadImage(e,t)}}}catch(e){s.e(e)}finally{s.f()}}},{key:"createObserver",value:function(e,t){var n=this,r=this.options.observerOptions;new IntersectionObserver((function(r,o){n.handleIntersectionObserver(e,t,r,o)}),r).observe(e)}},{key:"imageHandler",value:function(e,t,n){var r,o;return O(this,void 0,void 0,A.mark((function i(){var a,s;return A.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if("update"!==n){i.next=26;break}i.prev=1,a=_(this.observers);case 3:return i.next=5,a.next();case 5:if((s=i.sent).done){i.next=11;break}s.value.unobserve(e);case 9:i.next=3;break;case 11:i.next=16;break;case 13:i.prev=13,i.t0=i.catch(1),r={error:i.t0};case 16:if(i.prev=16,i.prev=17,!s||s.done||!(o=a.return)){i.next=21;break}return i.next=21,o.call(a);case 21:if(i.prev=21,!r){i.next=24;break}throw r.error;case 24:return i.finish(21);case 25:return i.finish(16);case 26:window.IntersectionObserver?this.createObserver(e,t):this.loadImage(e,t);case 27:case"end":return i.stop()}}),i,this,[[1,13,16,26],[17,,21,25]])})))}},{key:"bindUpdateHandler",value:function(e,t,n){return O(this,void 0,void 0,A.mark((function r(){return A.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!this.options.noPhoto){r.next=2;break}return r.abrupt("return",this.imageHasNoPhoto(e));case 2:return r.next=4,this.imageHandler(e,t,n);case 4:case"end":return r.stop()}}),r,this)})))}},{key:"add",value:function(e,t){return O(this,void 0,void 0,A.mark((function n(){var r=this;return A.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!this.hasBgImgMode(t)||!this.isPictureElement(e)){n.next=2;break}throw new Error('[MazLazyImg] You can\'t use the "bg-image" mode with "<picture />" element');case 2:return setTimeout((function(){return r.setBaseClass(e)}),0),e.getAttribute("src")||this.setImgSrc(e,"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"),n.next=6,this.bindUpdateHandler(e,t,"bind");case 6:case"end":return n.stop()}}),n,this)})))}},{key:"update",value:function(e,t){return O(this,void 0,void 0,A.mark((function n(){return A.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(t.value===t.oldValue){n.next=5;break}return this.hasImgLoaded=!1,this.removeAllStateClasses(e),n.next=5,this.bindUpdateHandler(e,t,"update");case 5:case"end":return n.stop()}}),n,this)})))}},{key:"remove",value:function(e,t){this.hasImgLoaded=!1,this.hasBgImgMode(t)&&(e.style.backgroundImage=""),this.removeAllStateClasses(e);var n,r=P(this.observers);try{for(r.s();!(n=r.n()).done;){n.value.unobserve(e)}}catch(e){r.e(e)}finally{r.f()}this.observers=[]}}]),e}(),H={created:function(e,t){var n="object"===p(t.value)?t.value:{};(j=new M(n)).add(e,t)},updated:function(e,t){j.update(e,t)},unmounted:function(e,t){j.remove(e,t)}},F={install:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object.assign(Object.assign(Object.assign({},T),t),{observerOptions:Object.assign(Object.assign({},T.observerOptions),t.observerOptions)}),r=new M(n);e.directive("lazy-img",{created:r.add.bind(r),updated:r.update.bind(r),unmounted:r.remove.bind(r)})}},N=[{name:"click-outside",directive:i},{name:"closable",directive:d},{name:"zoom-img",directive:E},{name:"lazy-img",directive:H}],B={install:function(e){N.forEach((function(t){var n=t.name,r=t.directive;e.directive(n,r)}))}},q=function(e){return e?(e=e.toString()).charAt(0).toUpperCase()+e.slice(1):""},U={style:"currency",minimumFractionDigits:2,round:!1},D=function(e,t,n){var r=Object.assign(Object.assign({},U),n);!function(e,t,n){if(void 0===e)throw new TypeError("[FilterCurrency] The `number` attribute is required.");if(void 0===t)throw new TypeError("[FilterCurrency] The `locale` attribute is required.");if("string"!=typeof t)throw new TypeError("[FilterCurrency] The `locale` attribute must be a string.");if(void 0===n.currency)throw new TypeError("[FilterCurrency] The `options.currency` attribute is required.")}(e,t,r);try{return function(e,t,n){var r=Number(e);return n.round&&(r=Math.floor(r),n.minimumFractionDigits=0),new Intl.NumberFormat(t,n).format(r)}(e,t,r)}catch(e){throw new Error("[FilterCurrency] ".concat(e))}},G={month:"short",day:"numeric",year:"numeric"},R=function(e,t,n){if(void 0===t)throw new TypeError("[FilterDate] The `locale` attribute is required.");if("string"!=typeof t)throw new TypeError("[FilterDate] The `locale` attribute must be a string.");var r=Object.assign(Object.assign({},G),n);try{return new Intl.DateTimeFormat(t,r).format(new Date(e))}catch(e){throw new Error("[FilterDate] ".concat(e))}},Y=function(e,t,n){if(void 0===e)throw new TypeError("[FilterNumber] The `number` attribute is required.");if(void 0===t)throw new TypeError("[FilterNumber] The `locale` attribute is required.");if("string"!=typeof t)throw new TypeError("[FilterNumber] The `locale` attribute must be a string.");try{return new Intl.NumberFormat(t,n).format(Number(e))}catch(e){throw new Error("[FilterNumber] ".concat(e))}},$={capitalize:q,currency:D,date:R,number:Y},V={install:function(e){e.provide("filters",$)}};export{q as capitalize,D as currency,R as date,e as debounce,B as installDirectives,V as installFilters,Y as number,i as vClickOutside,s as vClickOutsideInstall,a as vClickOutsideMixin,d as vClosable,h as vClosableInstall,H as vLazyImg,F as vLazyImgInstall,E as vZoomImg,L as vZoomImgInstall};
15
+ ***************************************************************************** */function O(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function C(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=C(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function P(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return j(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return j(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var S,T={baseClass:"m-lazy-img",loadedClass:"m-lazy-loaded",loadingClass:"m-lazy-loading",errorClass:"m-lazy-error",noPhotoClass:"m-lazy-no-photo",noPhoto:!1,observerOnce:!0,loadOnce:!1,noUseErrorPhoto:!1,observerOptions:{threshold:.1}},M=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};y(this,e),this.observers=[],this.defaultOptions=T,this.hasImgLoaded=!1,this.options=this.buildOptions(t),this.onImgLoadedCallback=this.imageIsLoaded.bind(this),this.onImgErrorCallback=this.imageHasError.bind(this)}return x(e,[{key:"loadErrorPhoto",value:function(){return O(this,void 0,void 0,A.mark((function e(){return A.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("./no_photo-a72545e4.js");case 2:return e.abrupt("return",e.sent.default);case 3:case"end":return e.stop()}}),e)})))}},{key:"buildOptions",value:function(e){return Object.assign(Object.assign(Object.assign({},this.defaultOptions),e),{observerOptions:Object.assign(Object.assign({},this.defaultOptions.observerOptions),e.observerOptions)})}},{key:"removeClass",value:function(e,t){e.classList.remove(t)}},{key:"addClass",value:function(e,t){e.classList.add(t)}},{key:"removeAllStateClasses",value:function(e){this.removeClass(e,this.options.loadedClass),this.removeClass(e,this.options.loadingClass),this.removeClass(e,this.options.errorClass),this.removeClass(e,this.options.noPhotoClass)}},{key:"setBaseClass",value:function(e){this.addClass(e,this.options.baseClass)}},{key:"imageIsLoading",value:function(e){var t,n;this.addClass(e,this.options.loadingClass),null===(n=(t=this.options).onLoading)||void 0===n||n.call(t,e)}},{key:"imageHasNoPhoto",value:function(e){this.removeClass(e,this.options.loadingClass),this.addClass(e,this.options.noPhotoClass),this.setDefaultPhoto(e)}},{key:"imageIsLoaded",value:function(e){var t,n;this.hasImgLoaded=!0,this.removeClass(e,this.options.loadingClass),this.addClass(e,this.options.loadedClass),null===(n=(t=this.options).onLoaded)||void 0===n||n.call(t,e)}},{key:"imageHasError",value:function(e,t){var n,r;console.warn("[MazLazyImg] Error while loading image",t),this.removeClass(e,this.options.loadingClass),this.addClass(e,this.options.errorClass),null===(r=(n=this.options).onError)||void 0===r||r.call(n,e),this.setDefaultPhoto(e)}},{key:"getImageUrl",value:function(e,t){var n=this.getImgElement(e).getAttribute("data-src");if(n)return n;var r="object"===p(t.value)?t.value.src:t.value;return r||console.warn("[MazLazyImg] src url is not defined"),r}},{key:"setPictureSourceUrls",value:function(e){var t,n;return O(this,void 0,void 0,A.mark((function r(){var o,i,a,s,u;return A.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!((o=e.querySelectorAll("source")).length>0)){r.next=30;break}r.prev=2,i=_(o);case 4:return r.next=6,i.next();case 6:if((a=r.sent).done){r.next=13;break}s=a.value,(u=s.getAttribute("data-srcset"))?s.srcset=u:console.warn('[MazLazyImg] the "[data-srcset]" attribute is not provided on "<source />"');case 11:r.next=4;break;case 13:r.next=18;break;case 15:r.prev=15,r.t0=r.catch(2),t={error:r.t0};case 18:if(r.prev=18,r.prev=19,!a||a.done||!(n=i.return)){r.next=23;break}return r.next=23,n.call(i);case 23:if(r.prev=23,!t){r.next=26;break}throw t.error;case 26:return r.finish(23);case 27:return r.finish(18);case 28:r.next=32;break;case 30:console.warn('[MazLazyImg] No "<source />" elements provided into the "<picture />" element'),this.imageHasError(e);case 32:case"end":return r.stop()}}),r,this,[[2,15,18,28],[19,,23,27]])})))}},{key:"hasBgImgMode",value:function(e){return"bg-image"===e.arg}},{key:"isPictureElement",value:function(e){return e instanceof HTMLPictureElement}},{key:"getImgElement",value:function(e){return this.isPictureElement(e)?e.querySelector("img"):e}},{key:"setDefaultPhoto",value:function(e){var t,n;return O(this,void 0,void 0,A.mark((function r(){var o,i,a,s;return A.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!this.options.noUseErrorPhoto){r.next=2;break}return r.abrupt("return");case 2:if(!this.options.errorPhoto){r.next=6;break}r.t0=this.options.errorPhoto,r.next=9;break;case 6:return r.next=8,this.loadErrorPhoto();case 8:r.t0=r.sent;case 9:if(o=r.t0,!((i=e.querySelectorAll("source")).length>0)){r.next=39;break}r.prev=12,a=_(i);case 14:return r.next=16,a.next();case 16:if((s=r.sent).done){r.next=22;break}s.value.srcset=o;case 20:r.next=14;break;case 22:r.next=27;break;case 24:r.prev=24,r.t1=r.catch(12),t={error:r.t1};case 27:if(r.prev=27,r.prev=28,!s||s.done||!(n=a.return)){r.next=32;break}return r.next=32,n.call(a);case 32:if(r.prev=32,!t){r.next=35;break}throw t.error;case 35:return r.finish(32);case 36:return r.finish(27);case 37:r.next=40;break;case 39:this.setImgSrc(e,o);case 40:case"end":return r.stop()}}),r,this,[[12,24,27,37],[28,,32,36]])})))}},{key:"addEventListenerToImg",value:function(e){var t=this,n=this.getImgElement(e);n.addEventListener("load",(function(){return t.onImgLoadedCallback(e)}),{once:!0}),n.addEventListener("error",(function(n){return t.onImgErrorCallback(e,n)}),{once:!0})}},{key:"loadImage",value:function(e,t){return O(this,void 0,void 0,A.mark((function n(){var r;return A.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(this.imageIsLoading(e),!this.isPictureElement(e)){n.next=7;break}return this.addEventListenerToImg(e),n.next=5,this.setPictureSourceUrls(e);case 5:n.next=11;break;case 7:if(r=this.getImageUrl(e,t)){n.next=10;break}return n.abrupt("return",this.imageHasError(e));case 10:this.hasBgImgMode(t)?(e.style.backgroundImage="url('".concat(r,"')"),this.imageIsLoaded(e)):(this.addEventListenerToImg(e),this.setImgSrc(e,r));case 11:case"end":return n.stop()}}),n,this)})))}},{key:"setImgSrc",value:function(e,t){this.getImgElement(e).src=t}},{key:"handleIntersectionObserver",value:function(e,t,n,r){var o,i;this.observers.push(r);var a,s=P(n);try{for(s.s();!(a=s.n()).done;){var u=a.value;if(u.isIntersecting){if(null===(i=(o=this.options).onIntersecting)||void 0===i||i.call(o,u.target),this.options.observerOnce&&r.unobserve(e),this.options.loadOnce&&this.hasImgLoaded)return;this.loadImage(e,t)}}}catch(e){s.e(e)}finally{s.f()}}},{key:"createObserver",value:function(e,t){var n=this,r=this.options.observerOptions;new IntersectionObserver((function(r,o){n.handleIntersectionObserver(e,t,r,o)}),r).observe(e)}},{key:"imageHandler",value:function(e,t,n){var r,o;return O(this,void 0,void 0,A.mark((function i(){var a,s;return A.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if("update"!==n){i.next=26;break}i.prev=1,a=_(this.observers);case 3:return i.next=5,a.next();case 5:if((s=i.sent).done){i.next=11;break}s.value.unobserve(e);case 9:i.next=3;break;case 11:i.next=16;break;case 13:i.prev=13,i.t0=i.catch(1),r={error:i.t0};case 16:if(i.prev=16,i.prev=17,!s||s.done||!(o=a.return)){i.next=21;break}return i.next=21,o.call(a);case 21:if(i.prev=21,!r){i.next=24;break}throw r.error;case 24:return i.finish(21);case 25:return i.finish(16);case 26:window.IntersectionObserver?this.createObserver(e,t):this.loadImage(e,t);case 27:case"end":return i.stop()}}),i,this,[[1,13,16,26],[17,,21,25]])})))}},{key:"bindUpdateHandler",value:function(e,t,n){return O(this,void 0,void 0,A.mark((function r(){return A.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!this.options.noPhoto){r.next=2;break}return r.abrupt("return",this.imageHasNoPhoto(e));case 2:return r.next=4,this.imageHandler(e,t,n);case 4:case"end":return r.stop()}}),r,this)})))}},{key:"add",value:function(e,t){return O(this,void 0,void 0,A.mark((function n(){var r=this;return A.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!this.hasBgImgMode(t)||!this.isPictureElement(e)){n.next=2;break}throw new Error('[MazLazyImg] You can\'t use the "bg-image" mode with "<picture />" element');case 2:return setTimeout((function(){return r.setBaseClass(e)}),0),e.getAttribute("src")||this.setImgSrc(e,"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"),n.next=6,this.bindUpdateHandler(e,t,"bind");case 6:case"end":return n.stop()}}),n,this)})))}},{key:"update",value:function(e,t){return O(this,void 0,void 0,A.mark((function n(){return A.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(t.value===t.oldValue){n.next=5;break}return this.hasImgLoaded=!1,this.removeAllStateClasses(e),n.next=5,this.bindUpdateHandler(e,t,"update");case 5:case"end":return n.stop()}}),n,this)})))}},{key:"remove",value:function(e,t){this.hasImgLoaded=!1,this.hasBgImgMode(t)&&(e.style.backgroundImage=""),this.removeAllStateClasses(e);var n,r=P(this.observers);try{for(r.s();!(n=r.n()).done;){n.value.unobserve(e)}}catch(e){r.e(e)}finally{r.f()}this.observers=[]}}]),e}(),H={created:function(e,t){var n="object"===p(t.value)?t.value:{};(S=new M(n)).add(e,t)},updated:function(e,t){S.update(e,t)},unmounted:function(e,t){S.remove(e,t)}},F={install:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object.assign(Object.assign(Object.assign({},T),t),{observerOptions:Object.assign(Object.assign({},T.observerOptions),t.observerOptions)}),r=new M(n);e.directive("lazy-img",{created:r.add.bind(r),updated:r.update.bind(r),unmounted:r.remove.bind(r)})}},N=[{name:"click-outside",directive:i},{name:"closable",directive:d},{name:"zoom-img",directive:E},{name:"lazy-img",directive:H}],B={install:function(e){N.forEach((function(t){var n=t.name,r=t.directive;e.directive(n,r)}))}},q=function(e){return e?(e=e.toString()).charAt(0).toUpperCase()+e.slice(1):""},U={style:"currency",minimumFractionDigits:2,round:!1},D=function(e,t,n){var r=Object.assign(Object.assign({},U),n);!function(e,t,n){if(void 0===e)throw new TypeError("[FilterCurrency] The `number` attribute is required.");if(void 0===t)throw new TypeError("[FilterCurrency] The `locale` attribute is required.");if("string"!=typeof t)throw new TypeError("[FilterCurrency] The `locale` attribute must be a string.");if(void 0===n.currency)throw new TypeError("[FilterCurrency] The `options.currency` attribute is required.")}(e,t,r);try{return function(e,t,n){var r=Number(e);return n.round&&(r=Math.floor(r),n.minimumFractionDigits=0),new Intl.NumberFormat(t,n).format(r)}(e,t,r)}catch(e){throw new Error("[FilterCurrency] ".concat(e))}},G={month:"short",day:"numeric",year:"numeric"},R=function(e,t,n){if(void 0===t)throw new TypeError("[FilterDate] The `locale` attribute is required.");if("string"!=typeof t)throw new TypeError("[FilterDate] The `locale` attribute must be a string.");var r=Object.assign(Object.assign({},G),n);try{return new Intl.DateTimeFormat(t,r).format(new Date(e))}catch(e){throw new Error("[FilterDate] ".concat(e))}},Y={minimumFractionDigits:2},$=function(e,t,n){if(n=Object.assign(Object.assign({},Y),n),void 0===e)throw new TypeError("[FilterNumber] The `number` attribute is required.");if(void 0===t)throw new TypeError("[FilterNumber] The `locale` attribute is required.");if("string"!=typeof t)throw new TypeError("[FilterNumber] The `locale` attribute must be a string.");try{return new Intl.NumberFormat(t,n).format(Number(e))}catch(e){throw new Error("[FilterNumber] ".concat(e))}},V={capitalize:q,currency:D,date:R,number:$},Z={install:function(e){e.provide("filters",V)}};export{q as capitalize,D as currency,R as date,e as debounce,B as installDirectives,Z as installFilters,$ as number,i as vClickOutside,a as vClickOutsideInstall,d as vClosable,h as vClosableInstall,H as vLazyImg,F as vLazyImgInstall,E as vZoomImg,L as vZoomImgInstall};
16
16
  //# sourceMappingURL=index.js.map