maz-ui 3.0.1 → 3.0.3

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 (40) hide show
  1. package/components/MazArrowIcon.js +1 -1
  2. package/components/MazAvatar.js +2 -2
  3. package/components/MazBadge.js +1 -1
  4. package/components/MazBottomSheet.js +2 -2
  5. package/components/MazBtn.js +2 -2
  6. package/components/MazCard.js +2 -2
  7. package/components/MazCarousel.js +2 -2
  8. package/components/MazCheckbox.d.ts +3 -3
  9. package/components/MazCheckbox.js +1 -1
  10. package/components/MazDialog.js +2 -2
  11. package/components/MazDialogPromise.js +2 -2
  12. package/components/MazDrawer.js +2 -2
  13. package/components/MazDropzone.js +1 -1
  14. package/components/MazGallery.js +1 -1
  15. package/components/MazInput.js +2 -2
  16. package/components/MazInputNumber.js +2 -2
  17. package/components/MazInputPrice.js +2 -2
  18. package/components/MazInputTags.js +2 -2
  19. package/components/MazLazyImg.js +1 -1
  20. package/components/MazPhoneNumberInput.js +2 -2
  21. package/components/MazPicker/MazPickerCalendar.d.ts +8 -0
  22. package/components/MazPicker/MazPickerCalendarMonth/MazPickerCalendarGrid.d.ts +8 -0
  23. package/components/MazPicker/MazPickerCalendarMonth/MazPickerCalendarMonth.d.ts +8 -0
  24. package/components/MazPicker/MazPickerContainer.d.ts +8 -0
  25. package/components/MazPicker/MazPickerShortcuts.d.ts +8 -0
  26. package/components/MazPicker/MazPickerTime.d.ts +8 -0
  27. package/components/MazPicker.d.ts +9 -0
  28. package/components/MazPicker.js +2 -2
  29. package/components/MazRadioButtons.js +1 -1
  30. package/components/MazSelect.js +2 -2
  31. package/components/MazSlider.js +2 -2
  32. package/components/MazSpinner.js +1 -1
  33. package/components/MazSwitch.js +1 -1
  34. package/components/MazTabsBar.js +2 -2
  35. package/components/MazTabsContentItem.js +1 -1
  36. package/components/MazTransitionExpand.js +1 -1
  37. package/css/main.css +603 -514
  38. package/modules/index.js +2 -2
  39. package/package.json +31 -28
  40. package/tailwindcss/tailwind.config.js +0 -1
@@ -1,3 +1,3 @@
1
1
  import{defineComponent as e,openBlock as t,createElementBlock as r,normalizeClass as n,pushScopeId as o,popScopeId as a,createElementVNode as i,computed as s,withDirectives as c,Fragment as u,renderList as l,unref as d,mergeProps as p,createVNode as f,createCommentVNode as h,renderSlot as m}from"vue";function v(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var y,g={exports:{}};(y=g).exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},y.exports.__esModule=!0,y.exports.default=y.exports;var b=v(g.exports),x={exports:{}};!function(e){function t(r){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(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(x);var w=v(x.exports),k={exports:{}};!function(e){function t(e,t,r,n,o,a,i){try{var s=e[a](i),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}e.exports=function(e){return function(){var r=this,n=arguments;return new Promise((function(o,a){var i=e.apply(r,n);function s(e){t(i,o,a,s,c,"next",e)}function c(e){t(i,o,a,s,c,"throw",e)}s(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports}(k);var A=v(k.exports),O={exports:{}};!function(e){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports}(O);var I=v(O.exports),L={exports:{}};!function(e){function t(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}e.exports=function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports}(L);var E=v(L.exports),z={exports:{}};!function(e){var t=x.exports.default;function r(){
2
2
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
3
- e.exports=r=function(){return n},e.exports.__esModule=!0,e.exports.default=e.exports;var n={},o=Object.prototype,a=o.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},s=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),i=new L(n||[]);return a._invoke=function(e,t,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return z()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var s=A(i,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=p(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(e,r,i),a}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}n.wrap=d;var f={};function h(){}function m(){}function v(){}var y={};l(y,s,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(E([])));b&&b!==o&&a.call(b,s)&&(y=b);var x=v.prototype=h.prototype=Object.create(y);function w(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,r){function n(o,i,s,c){var u=p(e[o],e,i);if("throw"!==u.type){var l=u.arg,d=l.value;return d&&"object"==t(d)&&a.call(d,"__await")?r.resolve(d.__await).then((function(e){n("next",e,s,c)}),(function(e){n("throw",e,s,c)})):r.resolve(d).then((function(e){l.value=e,s(l)}),(function(e){return n("throw",e,s,c)}))}c(u.arg)}var o;this._invoke=function(e,t){function a(){return new r((function(r,o){n(e,t,r,o)}))}return o=o?o.then(a,a):a()}}function A(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,A(e,t),"throw"===t.method))return f;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=p(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,f;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function O(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 I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function E(e){if(e){var t=e[s];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(a.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return n.next=n}}return{next:z}}function z(){return{value:void 0,done:!0}}return m.prototype=v,l(x,"constructor",v),l(v,"constructor",m),m.displayName=l(v,u,"GeneratorFunction"),n.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},n.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,u,"GeneratorFunction")),e.prototype=Object.create(x),e},n.awrap=function(e){return{__await:e}},w(k.prototype),l(k.prototype,c,(function(){return this})),n.AsyncIterator=k,n.async=function(e,t,r,o,a){void 0===a&&(a=Promise);var i=new k(d(e,t,r,o),a);return n.isGeneratorFunction(t)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(x),l(x,u,"Generator"),l(x,s,(function(){return this})),l(x,"toString",(function(){return"[object Generator]"})),n.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},n.values=E,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(I),!e)for(var t in this)"t"===t.charAt(0)&&a.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},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 t=this;function r(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=a.call(o,"catchLoc"),c=a.call(o,"finallyLoc");if(s&&c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(i)},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),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),I(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:E(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},n}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}(z);var P=z.exports(),C=P;try{regeneratorRuntime=P}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=P:Function("r","regeneratorRuntime = r")(P)}function j(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return _(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},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 a,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw a}}}}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function S(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function M(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?S(Object(r),!0).forEach((function(t){b(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):S(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function B(e){var t,r,n,o=2;for("undefined"!=typeof Symbol&&(r=Symbol.asyncIterator,n=Symbol.iterator);o--;){if(r&&null!=(t=e[r]))return t.call(e);if(n&&null!=(t=e[n]))return new T(t.call(e));r="@@asyncIterator",n="@@iterator"}throw new TypeError("Object is not async iterable")}function T(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return T=function(e){this.s=e,this.n=e.next},T.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var r=this.s.return;return void 0===r?Promise.resolve({value:e,done:!0}):t(r.apply(this.s,arguments))},throw:function(e){var r=this.s.return;return void 0===r?Promise.reject(e):t(r.apply(this.s,arguments))}},new T(e)}var H,N={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}},G=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};I(this,e),b(this,"observers",[]),b(this,"defaultOptions",N),b(this,"hasImgLoaded",!1),this.options=this.buildOptions(t),this.onImgLoadedCallback=this.imageIsLoaded.bind(this),this.onImgErrorCallback=this.imageHasError.bind(this)}var t,r,n,o,a,i,s,c;return E(e,[{key:"loadErrorPhoto",value:(c=A(C.mark((function e(){return C.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)}))),function(){return c.apply(this,arguments)})},{key:"buildOptions",value:function(e){return M(M(M({},this.defaultOptions),e),{},{observerOptions:M(M({},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,r;this.addClass(e,this.options.loadingClass),null===(t=(r=this.options).onLoading)||void 0===t||t.call(r,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,r;this.hasImgLoaded=!0,this.removeClass(e,this.options.loadingClass),this.addClass(e,this.options.loadedClass),null===(t=(r=this.options).onLoaded)||void 0===t||t.call(r,e)}},{key:"imageHasError",value:function(e,t){var r,n;console.warn("[maz-ui][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 r=this.getImgElement(e).getAttribute("data-src");if(r)return r;var n="object"===w(t.value)?t.value.src:t.value;return n||console.warn("[maz-ui][MazLazyImg] src url is not defined"),n}},{key:"setPictureSourceUrls",value:(s=A(C.mark((function e(t){var r,n,o,a,i,s,c,u;return C.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!((r=t.querySelectorAll("source")).length>0)){e.next=33;break}n=!1,o=!1,e.prev=4,i=B(r);case 6:return e.next=8,i.next();case 8:if(!(n=!(s=e.sent).done)){e.next=15;break}c=s.value,(u=c.getAttribute("data-srcset"))?c.srcset=u:console.warn('[maz-ui][MazLazyImg] the "[data-srcset]" attribute is not provided on "<source />"');case 12:n=!1,e.next=6;break;case 15:e.next=21;break;case 17:e.prev=17,e.t0=e.catch(4),o=!0,a=e.t0;case 21:if(e.prev=21,e.prev=22,!n||null==i.return){e.next=26;break}return e.next=26,i.return();case 26:if(e.prev=26,!o){e.next=29;break}throw a;case 29:return e.finish(26);case 30:return e.finish(21);case 31:e.next=35;break;case 33:console.warn('[maz-ui][MazLazyImg] No "<source />" elements provided into the "<picture />" element'),this.imageHasError(t);case 35:case"end":return e.stop()}}),e,this,[[4,17,21,31],[22,,26,30]])}))),function(e){return s.apply(this,arguments)})},{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:(i=A(C.mark((function e(t){var r,n,o,a,i,s,c;return C.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.options.noUseErrorPhoto){e.next=2;break}return e.abrupt("return");case 2:if(!this.options.errorPhoto){e.next=6;break}e.t0=this.options.errorPhoto,e.next=9;break;case 6:return e.next=8,this.loadErrorPhoto();case 8:e.t0=e.sent;case 9:if(r=e.t0,!((n=t.querySelectorAll("source")).length>0)){e.next=42;break}o=!1,a=!1,e.prev=14,s=B(n);case 16:return e.next=18,s.next();case 18:if(!(o=!(c=e.sent).done)){e.next=24;break}c.value.srcset=r;case 21:o=!1,e.next=16;break;case 24:e.next=30;break;case 26:e.prev=26,e.t1=e.catch(14),a=!0,i=e.t1;case 30:if(e.prev=30,e.prev=31,!o||null==s.return){e.next=35;break}return e.next=35,s.return();case 35:if(e.prev=35,!a){e.next=38;break}throw i;case 38:return e.finish(35);case 39:return e.finish(30);case 40:e.next=43;break;case 42:this.setImgSrc(t,r);case 43:case"end":return e.stop()}}),e,this,[[14,26,30,40],[31,,35,39]])}))),function(e){return i.apply(this,arguments)})},{key:"addEventListenerToImg",value:function(e){var t=this,r=this.getImgElement(e);r.addEventListener("load",(function(){return t.onImgLoadedCallback(e)}),{once:!0}),r.addEventListener("error",(function(r){return t.onImgErrorCallback(e,r)}),{once:!0})}},{key:"loadImage",value:(a=A(C.mark((function e(t,r){var n;return C.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.imageIsLoading(t),!this.isPictureElement(t)){e.next=7;break}return this.addEventListenerToImg(t),e.next=5,this.setPictureSourceUrls(t);case 5:e.next=11;break;case 7:if(n=this.getImageUrl(t,r)){e.next=10;break}return e.abrupt("return",this.imageHasError(t));case 10:this.hasBgImgMode(r)?(t.style.backgroundImage="url('".concat(n,"')"),this.imageIsLoaded(t)):(this.addEventListenerToImg(t),this.setImgSrc(t,n));case 11:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"setImgSrc",value:function(e,t){this.getImgElement(e).src=t}},{key:"handleIntersectionObserver",value:function(e,t,r,n){this.observers.push(n);var o,a=j(r);try{for(a.s();!(o=a.n()).done;){var i=o.value;if(i.isIntersecting){var s,c;if(null===(s=(c=this.options).onIntersecting)||void 0===s||s.call(c,i.target),this.options.observerOnce&&n.unobserve(e),this.options.loadOnce&&this.hasImgLoaded)return;this.loadImage(e,t)}}}catch(e){a.e(e)}finally{a.f()}}},{key:"createObserver",value:function(e,t){var r=this,n=this.options.observerOptions;new IntersectionObserver((function(n,o){r.handleIntersectionObserver(e,t,n,o)}),n).observe(e)}},{key:"imageHandler",value:(o=A(C.mark((function e(t,r,n){var o,a,i,s,c;return C.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("update"!==n){e.next=29;break}o=!1,a=!1,e.prev=3,s=B(this.observers);case 5:return e.next=7,s.next();case 7:if(!(o=!(c=e.sent).done)){e.next=13;break}c.value.unobserve(t);case 10:o=!1,e.next=5;break;case 13:e.next=19;break;case 15:e.prev=15,e.t0=e.catch(3),a=!0,i=e.t0;case 19:if(e.prev=19,e.prev=20,!o||null==s.return){e.next=24;break}return e.next=24,s.return();case 24:if(e.prev=24,!a){e.next=27;break}throw i;case 27:return e.finish(24);case 28:return e.finish(19);case 29:window.IntersectionObserver?this.createObserver(t,r):this.loadImage(t,r);case 30:case"end":return e.stop()}}),e,this,[[3,15,19,29],[20,,24,28]])}))),function(e,t,r){return o.apply(this,arguments)})},{key:"bindUpdateHandler",value:(n=A(C.mark((function e(t,r,n){return C.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.options.noPhoto){e.next=2;break}return e.abrupt("return",this.imageHasNoPhoto(t));case 2:return e.next=4,this.imageHandler(t,r,n);case 4:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return n.apply(this,arguments)})},{key:"add",value:(r=A(C.mark((function e(t,r){var n=this;return C.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.hasBgImgMode(r)||!this.isPictureElement(t)){e.next=2;break}throw new Error('[MazLazyImg] You can\'t use the "bg-image" mode with "<picture />" element');case 2:return setTimeout((function(){return n.setBaseClass(t)}),0),t.getAttribute("src")||this.setImgSrc(t,"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"),e.next=6,this.bindUpdateHandler(t,r,"bind");case 6:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"update",value:(t=A(C.mark((function e(t,r){return C.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.value===r.oldValue){e.next=5;break}return this.hasImgLoaded=!1,this.removeAllStateClasses(t),e.next=5,this.bindUpdateHandler(t,r,"update");case 5:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})},{key:"remove",value:function(e,t){this.hasImgLoaded=!1,this.hasBgImgMode(t)&&(e.style.backgroundImage=""),this.removeAllStateClasses(e);var r,n=j(this.observers);try{for(n.s();!(r=n.n()).done;){r.value.unobserve(e)}}catch(e){n.e(e)}finally{n.f()}this.observers=[]}}]),e}(),U={created:function(e,t){var r="object"===w(t.value)?t.value:{};(H=new G(r)).add(e,t)},updated:function(e,t){H.update(e,t)},unmounted:function(e,t){H.remove(e,t)}},D=["width","height"],F=[function(e){return o("data-v-67dbd337"),e=e(),a(),e}((function(){return i("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"},null,-1)}))],R=e({__name:"MazSpinner",props:{size:{type:String,default:"2em"},color:{type:String,default:"primary",validator:function(e){return["info","white","success","warning","danger","primary","black","secondary","transparent"].includes(e)}}},setup:function(e){return function(o,a){return t(),r("svg",{width:e.size,height:e.size,version:"1.1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 50 50","xml:space":"preserve",class:n(["m-spinner","m-spinner--".concat(e.color)]),style:{"enable-background":"new 0 0 50 50"}},F,10,D)}}});function $(e,t){void 0===t&&(t={});var r=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===r&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}$("/* purgecss start ignore */\n\n.m-spinner[data-v-67dbd337] {\n -webkit-animation: maz-spin 1s linear infinite;\n animation: maz-spin 1s linear infinite;\n fill: currentColor;\n color: var(--maz-color-white);\n margin: 0px !important;\n}\n\n.m-spinner--primary[data-v-67dbd337] {\n color: var(--maz-color-primary);\n}\n\n.m-spinner--secondary[data-v-67dbd337] {\n color: var(--maz-color-secondary);\n}\n\n.m-spinner--info[data-v-67dbd337] {\n color: var(--maz-color-info);\n}\n\n.m-spinner--warning[data-v-67dbd337] {\n color: var(--maz-color-warning);\n}\n\n.m-spinner--danger[data-v-67dbd337] {\n color: var(--maz-color-danger);\n}\n\n.m-spinner--success[data-v-67dbd337] {\n color: var(--maz-color-success);\n}\n\n.m-spinner--black[data-v-67dbd337] {\n color: var(--maz-color-black);\n}\n\n.m-spinner--white[data-v-67dbd337] {\n color: var(--maz-color-white);\n}\n\n.m-spinner--transparent[data-v-67dbd337] {\n color: var(--maz-color-white);\n}\n\n/* purgecss end ignore */\n"),R.__scopeId="data-v-67dbd337";var q=["data-srcset","media"],Y={key:0,class:"m-lazy-img-component-loader"},Q=e({__name:"MazLazyImg",props:{image:{type:[String,Object],default:void 0},noPhoto:{type:Boolean,default:!1},noLoader:{type:Boolean,default:!1},noObserverOnce:{type:Boolean,default:!1},loadOnce:{type:Boolean,default:!1},imageHeightFull:{type:Boolean,default:!1},observerOptions:{type:Object,default:null}},emits:["intersecting","loading","loaded","error"],setup:function(e){var o=e,a=s((function(){var e;return"string"==typeof o.image?[{srcset:o.image}]:null===(e=o.image)||void 0===e?void 0:e.sources}));return function(o,s){return c((t(),r("picture",{class:n(["m-lazy-img-component",{"-use-loader":!e.noLoader,"--height-full":e.imageHeightFull}])},[(t(!0),r(u,null,l(d(a),(function(e,n){var o=e.srcset,a=e.media;return t(),r("source",{key:n,"data-srcset":o,media:a},null,8,q)})),128)),i("img",p(o.$attrs,{src:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"}),null,16),e.noLoader?h("",!0):(t(),r("div",Y,[f(R,{color:"black",size:"2em"})])),m(o.$slots,"default")],2)),[[d(U),{noPhoto:e.noPhoto,observerOnce:!e.noObserverOnce,loadOnce:e.loadOnce,onIntersecting:function(e){return o.$emit("intersecting",e)},onLoading:function(e){return o.$emit("loading",e)},onLoaded:function(e){return o.$emit("loaded",e)},onError:function(e){return o.$emit("error",e)},observerOptions:e.observerOptions}]])}}});$("/* purgecss start ignore */\n\n.m-lazy-img-component[data-v-305df525] {\n position: relative;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n background-color: var(--maz-color-bg-lighter);\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n.m-lazy-img-component-loader[data-v-305df525] {\n position: absolute;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n display: none;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n.m-lazy-img-component:not(.m-lazy-error, .m-lazy-no-photo) img[data-v-305df525] {\n height: 100%;\n width: 100%;\n}\n\n.m-lazy-img-component.--height-full img[data-v-305df525] {\n max-height: 100% !important;\n width: -webkit-min-content !important;\n width: -moz-min-content !important;\n width: min-content !important;\n max-width: -webkit-min-content !important;\n max-width: -moz-min-content !important;\n max-width: min-content !important;\n}\n\n.m-lazy-img-component:not(.m-lazy-loaded, .m-lazy-no-photo) .m-lazy-img-component-loader[data-v-305df525] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n\n/* purgecss end ignore */\n"),Q.__scopeId="data-v-305df525";export{Q as default};
3
+ e.exports=r=function(){return n},e.exports.__esModule=!0,e.exports.default=e.exports;var n={},o=Object.prototype,a=o.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},s=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),i=new L(n||[]);return a._invoke=function(e,t,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return z()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var s=A(i,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=p(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(e,r,i),a}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}n.wrap=d;var f={};function h(){}function m(){}function v(){}var y={};l(y,s,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(E([])));b&&b!==o&&a.call(b,s)&&(y=b);var x=v.prototype=h.prototype=Object.create(y);function w(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,r){function n(o,i,s,c){var u=p(e[o],e,i);if("throw"!==u.type){var l=u.arg,d=l.value;return d&&"object"==t(d)&&a.call(d,"__await")?r.resolve(d.__await).then((function(e){n("next",e,s,c)}),(function(e){n("throw",e,s,c)})):r.resolve(d).then((function(e){l.value=e,s(l)}),(function(e){return n("throw",e,s,c)}))}c(u.arg)}var o;this._invoke=function(e,t){function a(){return new r((function(r,o){n(e,t,r,o)}))}return o=o?o.then(a,a):a()}}function A(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,A(e,t),"throw"===t.method))return f;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=p(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,f;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function O(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 I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function E(e){if(e){var t=e[s];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(a.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return n.next=n}}return{next:z}}function z(){return{value:void 0,done:!0}}return m.prototype=v,l(x,"constructor",v),l(v,"constructor",m),m.displayName=l(v,u,"GeneratorFunction"),n.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},n.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,u,"GeneratorFunction")),e.prototype=Object.create(x),e},n.awrap=function(e){return{__await:e}},w(k.prototype),l(k.prototype,c,(function(){return this})),n.AsyncIterator=k,n.async=function(e,t,r,o,a){void 0===a&&(a=Promise);var i=new k(d(e,t,r,o),a);return n.isGeneratorFunction(t)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(x),l(x,u,"Generator"),l(x,s,(function(){return this})),l(x,"toString",(function(){return"[object Generator]"})),n.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},n.values=E,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(I),!e)for(var t in this)"t"===t.charAt(0)&&a.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},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 t=this;function r(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=a.call(o,"catchLoc"),c=a.call(o,"finallyLoc");if(s&&c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(i)},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),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),I(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:E(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},n}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}(z);var P=z.exports(),C=P;try{regeneratorRuntime=P}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=P:Function("r","regeneratorRuntime = r")(P)}function j(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return _(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},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 a,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw a}}}}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function S(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function M(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?S(Object(r),!0).forEach((function(t){b(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):S(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function B(e){var t,r,n,o=2;for("undefined"!=typeof Symbol&&(r=Symbol.asyncIterator,n=Symbol.iterator);o--;){if(r&&null!=(t=e[r]))return t.call(e);if(n&&null!=(t=e[n]))return new T(t.call(e));r="@@asyncIterator",n="@@iterator"}throw new TypeError("Object is not async iterable")}function T(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return T=function(e){this.s=e,this.n=e.next},T.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var r=this.s.return;return void 0===r?Promise.resolve({value:e,done:!0}):t(r.apply(this.s,arguments))},throw:function(e){var r=this.s.return;return void 0===r?Promise.reject(e):t(r.apply(this.s,arguments))}},new T(e)}var H,N={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}},G=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};I(this,e),b(this,"observers",[]),b(this,"defaultOptions",N),b(this,"hasImgLoaded",!1),this.options=this.buildOptions(t),this.onImgLoadedCallback=this.imageIsLoaded.bind(this),this.onImgErrorCallback=this.imageHasError.bind(this)}var t,r,n,o,a,i,s,c;return E(e,[{key:"loadErrorPhoto",value:(c=A(C.mark((function e(){return C.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)}))),function(){return c.apply(this,arguments)})},{key:"buildOptions",value:function(e){return M(M(M({},this.defaultOptions),e),{},{observerOptions:M(M({},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,r;this.addClass(e,this.options.loadingClass),null===(t=(r=this.options).onLoading)||void 0===t||t.call(r,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,r;this.hasImgLoaded=!0,this.removeClass(e,this.options.loadingClass),this.addClass(e,this.options.loadedClass),null===(t=(r=this.options).onLoaded)||void 0===t||t.call(r,e)}},{key:"imageHasError",value:function(e,t){var r,n;console.warn("[maz-ui][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 r=this.getImgElement(e).getAttribute("data-src");if(r)return r;var n="object"===w(t.value)?t.value.src:t.value;return n||console.warn("[maz-ui][MazLazyImg] src url is not defined"),n}},{key:"setPictureSourceUrls",value:(s=A(C.mark((function e(t){var r,n,o,a,i,s,c,u;return C.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!((r=t.querySelectorAll("source")).length>0)){e.next=33;break}n=!1,o=!1,e.prev=4,i=B(r);case 6:return e.next=8,i.next();case 8:if(!(n=!(s=e.sent).done)){e.next=15;break}c=s.value,(u=c.getAttribute("data-srcset"))?c.srcset=u:console.warn('[maz-ui][MazLazyImg] the "[data-srcset]" attribute is not provided on "<source />"');case 12:n=!1,e.next=6;break;case 15:e.next=21;break;case 17:e.prev=17,e.t0=e.catch(4),o=!0,a=e.t0;case 21:if(e.prev=21,e.prev=22,!n||null==i.return){e.next=26;break}return e.next=26,i.return();case 26:if(e.prev=26,!o){e.next=29;break}throw a;case 29:return e.finish(26);case 30:return e.finish(21);case 31:e.next=35;break;case 33:console.warn('[maz-ui][MazLazyImg] No "<source />" elements provided into the "<picture />" element'),this.imageHasError(t);case 35:case"end":return e.stop()}}),e,this,[[4,17,21,31],[22,,26,30]])}))),function(e){return s.apply(this,arguments)})},{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:(i=A(C.mark((function e(t){var r,n,o,a,i,s,c;return C.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.options.noUseErrorPhoto){e.next=2;break}return e.abrupt("return");case 2:if(!this.options.errorPhoto){e.next=6;break}e.t0=this.options.errorPhoto,e.next=9;break;case 6:return e.next=8,this.loadErrorPhoto();case 8:e.t0=e.sent;case 9:if(r=e.t0,!((n=t.querySelectorAll("source")).length>0)){e.next=42;break}o=!1,a=!1,e.prev=14,s=B(n);case 16:return e.next=18,s.next();case 18:if(!(o=!(c=e.sent).done)){e.next=24;break}c.value.srcset=r;case 21:o=!1,e.next=16;break;case 24:e.next=30;break;case 26:e.prev=26,e.t1=e.catch(14),a=!0,i=e.t1;case 30:if(e.prev=30,e.prev=31,!o||null==s.return){e.next=35;break}return e.next=35,s.return();case 35:if(e.prev=35,!a){e.next=38;break}throw i;case 38:return e.finish(35);case 39:return e.finish(30);case 40:e.next=43;break;case 42:this.setImgSrc(t,r);case 43:case"end":return e.stop()}}),e,this,[[14,26,30,40],[31,,35,39]])}))),function(e){return i.apply(this,arguments)})},{key:"addEventListenerToImg",value:function(e){var t=this,r=this.getImgElement(e);r.addEventListener("load",(function(){return t.onImgLoadedCallback(e)}),{once:!0}),r.addEventListener("error",(function(r){return t.onImgErrorCallback(e,r)}),{once:!0})}},{key:"loadImage",value:(a=A(C.mark((function e(t,r){var n;return C.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.imageIsLoading(t),!this.isPictureElement(t)){e.next=7;break}return this.addEventListenerToImg(t),e.next=5,this.setPictureSourceUrls(t);case 5:e.next=11;break;case 7:if(n=this.getImageUrl(t,r)){e.next=10;break}return e.abrupt("return",this.imageHasError(t));case 10:this.hasBgImgMode(r)?(t.style.backgroundImage="url('".concat(n,"')"),this.imageIsLoaded(t)):(this.addEventListenerToImg(t),this.setImgSrc(t,n));case 11:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"setImgSrc",value:function(e,t){this.getImgElement(e).src=t}},{key:"handleIntersectionObserver",value:function(e,t,r,n){this.observers.push(n);var o,a=j(r);try{for(a.s();!(o=a.n()).done;){var i=o.value;if(i.isIntersecting){var s,c;if(null===(s=(c=this.options).onIntersecting)||void 0===s||s.call(c,i.target),this.options.observerOnce&&n.unobserve(e),this.options.loadOnce&&this.hasImgLoaded)return;this.loadImage(e,t)}}}catch(e){a.e(e)}finally{a.f()}}},{key:"createObserver",value:function(e,t){var r=this,n=this.options.observerOptions;new IntersectionObserver((function(n,o){r.handleIntersectionObserver(e,t,n,o)}),n).observe(e)}},{key:"imageHandler",value:(o=A(C.mark((function e(t,r,n){var o,a,i,s,c;return C.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("update"!==n){e.next=29;break}o=!1,a=!1,e.prev=3,s=B(this.observers);case 5:return e.next=7,s.next();case 7:if(!(o=!(c=e.sent).done)){e.next=13;break}c.value.unobserve(t);case 10:o=!1,e.next=5;break;case 13:e.next=19;break;case 15:e.prev=15,e.t0=e.catch(3),a=!0,i=e.t0;case 19:if(e.prev=19,e.prev=20,!o||null==s.return){e.next=24;break}return e.next=24,s.return();case 24:if(e.prev=24,!a){e.next=27;break}throw i;case 27:return e.finish(24);case 28:return e.finish(19);case 29:window.IntersectionObserver?this.createObserver(t,r):this.loadImage(t,r);case 30:case"end":return e.stop()}}),e,this,[[3,15,19,29],[20,,24,28]])}))),function(e,t,r){return o.apply(this,arguments)})},{key:"bindUpdateHandler",value:(n=A(C.mark((function e(t,r,n){return C.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.options.noPhoto){e.next=2;break}return e.abrupt("return",this.imageHasNoPhoto(t));case 2:return e.next=4,this.imageHandler(t,r,n);case 4:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return n.apply(this,arguments)})},{key:"add",value:(r=A(C.mark((function e(t,r){var n=this;return C.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.hasBgImgMode(r)||!this.isPictureElement(t)){e.next=2;break}throw new Error('[MazLazyImg] You can\'t use the "bg-image" mode with "<picture />" element');case 2:return setTimeout((function(){return n.setBaseClass(t)}),0),t.getAttribute("src")||this.setImgSrc(t,"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"),e.next=6,this.bindUpdateHandler(t,r,"bind");case 6:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"update",value:(t=A(C.mark((function e(t,r){return C.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.value===r.oldValue){e.next=5;break}return this.hasImgLoaded=!1,this.removeAllStateClasses(t),e.next=5,this.bindUpdateHandler(t,r,"update");case 5:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})},{key:"remove",value:function(e,t){this.hasImgLoaded=!1,this.hasBgImgMode(t)&&(e.style.backgroundImage=""),this.removeAllStateClasses(e);var r,n=j(this.observers);try{for(n.s();!(r=n.n()).done;){r.value.unobserve(e)}}catch(e){n.e(e)}finally{n.f()}this.observers=[]}}]),e}(),U={created:function(e,t){var r="object"===w(t.value)?t.value:{};(H=new G(r)).add(e,t)},updated:function(e,t){H.update(e,t)},unmounted:function(e,t){H.remove(e,t)}},D=["width","height"],F=[function(e){return o("data-v-67dbd337"),e=e(),a(),e}((function(){return i("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"},null,-1)}))],R=e({__name:"MazSpinner",props:{size:{type:String,default:"2em"},color:{type:String,default:"primary",validator:function(e){return["info","white","success","warning","danger","primary","black","secondary","transparent"].includes(e)}}},setup:function(e){return function(o,a){return t(),r("svg",{width:e.size,height:e.size,version:"1.1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 50 50","xml:space":"preserve",class:n(["m-spinner","m-spinner--".concat(e.color)]),style:{"enable-background":"new 0 0 50 50"}},F,10,D)}}});function $(e,t){void 0===t&&(t={});var r=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===r&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}$("\n@-webkit-keyframes maz-spin {\n to {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg)\n }\n}\n@keyframes maz-spin {\n to {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg)\n }\n}\n.m-spinner[data-v-67dbd337] {\n -webkit-animation: maz-spin 1s linear infinite;\n animation: maz-spin 1s linear infinite;\n fill: currentColor;\n color: var(--maz-color-white);\n margin: 0px !important\n}\n.m-spinner--primary[data-v-67dbd337] {\n color: var(--maz-color-primary)\n}\n.m-spinner--secondary[data-v-67dbd337] {\n color: var(--maz-color-secondary)\n}\n.m-spinner--info[data-v-67dbd337] {\n color: var(--maz-color-info)\n}\n.m-spinner--warning[data-v-67dbd337] {\n color: var(--maz-color-warning)\n}\n.m-spinner--danger[data-v-67dbd337] {\n color: var(--maz-color-danger)\n}\n.m-spinner--success[data-v-67dbd337] {\n color: var(--maz-color-success)\n}\n.m-spinner--black[data-v-67dbd337] {\n color: var(--maz-color-black)\n}\n.m-spinner--white[data-v-67dbd337] {\n color: var(--maz-color-white)\n}\n.m-spinner--transparent[data-v-67dbd337] {\n color: var(--maz-color-white)\n}\n"),R.__scopeId="data-v-67dbd337";var q=["data-srcset","media"],Y={key:0,class:"m-lazy-img-component-loader"},Q=e({__name:"MazLazyImg",props:{image:{type:[String,Object],default:void 0},noPhoto:{type:Boolean,default:!1},noLoader:{type:Boolean,default:!1},noObserverOnce:{type:Boolean,default:!1},loadOnce:{type:Boolean,default:!1},imageHeightFull:{type:Boolean,default:!1},observerOptions:{type:Object,default:null}},emits:["intersecting","loading","loaded","error"],setup:function(e){var o=e,a=s((function(){var e;return"string"==typeof o.image?[{srcset:o.image}]:null===(e=o.image)||void 0===e?void 0:e.sources}));return function(o,s){return c((t(),r("picture",{class:n(["m-lazy-img-component",{"-use-loader":!e.noLoader,"--height-full":e.imageHeightFull}])},[(t(!0),r(u,null,l(d(a),(function(e,n){var o=e.srcset,a=e.media;return t(),r("source",{key:n,"data-srcset":o,media:a},null,8,q)})),128)),i("img",p(o.$attrs,{src:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"}),null,16),e.noLoader?h("",!0):(t(),r("div",Y,[f(R,{color:"black",size:"2em"})])),m(o.$slots,"default")],2)),[[d(U),{noPhoto:e.noPhoto,observerOnce:!e.noObserverOnce,loadOnce:e.loadOnce,onIntersecting:function(e){return o.$emit("intersecting",e)},onLoading:function(e){return o.$emit("loading",e)},onLoaded:function(e){return o.$emit("loaded",e)},onError:function(e){return o.$emit("error",e)},observerOptions:e.observerOptions}]])}}});$("\n.m-lazy-img-component[data-v-305df525] {\n position: relative;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n background-color: var(--maz-color-bg-lighter);\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center\n}\n.m-lazy-img-component-loader[data-v-305df525] {\n position: absolute;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n display: none;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center\n}\n.m-lazy-img-component:not(.m-lazy-error, .m-lazy-no-photo) img[data-v-305df525] {\n height: 100%;\n width: 100%\n}\n.m-lazy-img-component.--height-full img[data-v-305df525] {\n max-height: 100% !important;\n width: -webkit-min-content !important;\n width: -moz-min-content !important;\n width: min-content !important;\n max-width: -webkit-min-content !important;\n max-width: -moz-min-content !important;\n max-width: min-content !important\n}\n.m-lazy-img-component:not(.m-lazy-loaded, .m-lazy-no-photo) .m-lazy-img-component-loader[data-v-305df525] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex\n}\n"),Q.__scopeId="data-v-305df525";export{Q as default};