maz-ui 2.3.12 → 3.0.0-beta.13
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.
- package/css/main.css +1454 -0
- package/lib/cjs/index.js +1 -0
- package/lib/cjs/index.js.map +1 -0
- package/lib/cjs/no_photo-4ae7c0fa.js +1 -0
- package/lib/cjs/no_photo-4ae7c0fa.js.map +1 -0
- package/lib/index.js +16 -1
- package/lib/index.js.map +1 -0
- package/lib/no_photo-a72545e4.js +2 -0
- package/lib/no_photo-a72545e4.js.map +1 -0
- package/package.json +103 -84
- package/types/components/MazArrowIcon.vue.d.ts +37 -0
- package/types/components/MazAvatar.vue.d.ts +110 -0
- package/types/components/MazBackDrop.vue.d.ts +90 -0
- package/types/components/MazBottomSheet.vue.d.ts +31 -0
- package/types/components/MazBtn.vue.d.ts +120 -0
- package/types/components/MazCard.vue.d.ts +149 -0
- package/types/components/MazCheckbox.vue.d.ts +40 -0
- package/types/components/MazDialog.vue.d.ts +15 -0
- package/types/components/MazDropzone/index.vue.d.ts +91 -0
- package/types/components/MazGallery.vue.d.ts +117 -0
- package/types/components/MazIcon.vue.d.ts +63 -0
- package/types/components/MazInput.vue.d.ts +206 -0
- package/types/components/MazInputPrice.vue.d.ts +47 -0
- package/types/components/MazLazyImg.vue.d.ts +69 -0
- package/types/components/MazPhoneNumberInput/constantes/locales.d.ts +11 -0
- package/types/components/MazPhoneNumberInput/index.vue.d.ts +195 -0
- package/types/components/MazPhoneNumberInput/types.d.ts +19 -0
- package/types/components/MazPhoneNumberInput/utils/countries-name-list-by-iso-code.d.ts +3 -0
- package/types/components/MazPhoneNumberInput/utils/index.d.ts +15 -0
- package/types/components/MazSelect.vue.d.ts +110 -0
- package/types/components/MazSpinner.vue.d.ts +25 -0
- package/types/components/MazTransitionExpand.vue.d.ts +4 -0
- package/types/components/index.d.ts +18 -0
- package/types/components/types.d.ts +50 -0
- package/types/components_tmp/MazCalendar/types.d.ts +16 -0
- package/types/components_tmp/MazChart/includes.d.ts +11 -0
- package/types/components_tmp/MazMap/map-module/create-html-marker.d.ts +18 -0
- package/types/components_tmp/MazMap/map-module/map.d.ts +43 -0
- package/types/components_tmp/MazMap/map-module/script-loader.d.ts +17 -0
- package/types/components_tmp/MazPromiseDialog/use-maz-promise-dialog.d.ts +28 -0
- package/types/components_tmp/MazSlider/utils.d.ts +15 -0
- package/types/components_tmp/MazTabs/maz-tabs.composable.d.ts +3 -0
- package/types/components_tmp/toaster/index.d.ts +3 -0
- package/types/components_tmp/toaster/positions.d.ts +8 -0
- package/types/components_tmp/toaster/timer.d.ts +11 -0
- package/types/components_tmp/toaster/use-toast.d.ts +21 -0
- package/types/directives/click-outside.directive.d.ts +10 -0
- package/types/directives/closable.directive.d.ts +5 -0
- package/types/directives/index.d.ts +4 -0
- package/types/directives/v-lazy-img/index.d.ts +9 -0
- package/types/directives/v-lazy-img/lazy-img-handler.d.ts +38 -0
- package/types/directives/v-lazy-img/lazy-img.directive.d.ts +3 -0
- package/types/directives/v-lazy-img/types.d.ts +51 -0
- package/types/directives/zoom-img.directive.d.ts +5 -0
- package/types/filters/capitalize.d.ts +1 -0
- package/types/filters/currency.d.ts +5 -0
- package/types/filters/date.d.ts +1 -0
- package/types/filters/index.d.ts +5 -0
- package/types/filters/number.d.ts +1 -0
- package/types/filters/telephone.d.ts +1 -0
- package/types/index.d.ts +9 -0
- package/types/index.esm.d.ts +10 -0
- package/types/utils/debounce.d.ts +7 -0
- package/types/utils/index.d.ts +1 -0
- package/types/utils/injectStrict.d.ts +1 -0
- package/LICENSE +0 -21
- package/README.md +0 -66
- package/bin/index.js +0 -63
- package/bin/lib/_constantes/default-colors.js +0 -69
- package/bin/lib/index.d.ts +0 -2
- package/bin/lib/index.js +0 -145
- package/bin/lib/methods/generate-root-css.js +0 -49
- package/bin/lib/methods/get-theme-settings.js +0 -58
- package/bin/lib/methods/set-css-vars.js +0 -11
- package/lib/css/base.css +0 -1
- package/lib/css/index.css +0 -1
- package/lib/css/maz-avatar.css +0 -1
- package/lib/css/maz-bottom-sheet.css +0 -1
- package/lib/css/maz-btn-group.css +0 -1
- package/lib/css/maz-btn.css +0 -0
- package/lib/css/maz-card.css +0 -1
- package/lib/css/maz-carousel.css +0 -1
- package/lib/css/maz-checkbox.css +0 -1
- package/lib/css/maz-collapse.css +0 -1
- package/lib/css/maz-dialog.css +0 -1
- package/lib/css/maz-draggable-list.css +0 -1
- package/lib/css/maz-dropdown.css +0 -1
- package/lib/css/maz-dropzone.css +0 -1
- package/lib/css/maz-flex.css +0 -0
- package/lib/css/maz-gallery.css +0 -0
- package/lib/css/maz-img.css +0 -1
- package/lib/css/maz-input-tags.css +0 -1
- package/lib/css/maz-input.css +0 -0
- package/lib/css/maz-list-item.css +0 -1
- package/lib/css/maz-list.css +0 -1
- package/lib/css/maz-loader.css +0 -0
- package/lib/css/maz-pagination.css +0 -1
- package/lib/css/maz-phone-number-input.css +0 -1
- package/lib/css/maz-picker.css +0 -1
- package/lib/css/maz-plotly.css +0 -0
- package/lib/css/maz-progress-bar.css +0 -1
- package/lib/css/maz-radio.css +0 -1
- package/lib/css/maz-read-more.css +0 -1
- package/lib/css/maz-responsive-menu.css +0 -1
- package/lib/css/maz-search.css +0 -1
- package/lib/css/maz-select.css +0 -0
- package/lib/css/maz-sidebar.css +0 -1
- package/lib/css/maz-slider.css +0 -1
- package/lib/css/maz-spinner.css +0 -0
- package/lib/css/maz-stepper.css +0 -1
- package/lib/css/maz-switch.css +0 -1
- package/lib/css/maz-tabs-bar.css +0 -1
- package/lib/css/maz-tabs-content-item.css +0 -1
- package/lib/css/maz-tabs-content.css +0 -1
- package/lib/css/maz-transition-expand.css +0 -0
- package/lib/index.d.ts +0 -1
- package/lib/maz-avatar.d.ts +0 -3
- package/lib/maz-avatar.js +0 -430
- package/lib/maz-bottom-sheet.d.ts +0 -3
- package/lib/maz-bottom-sheet.js +0 -1045
- package/lib/maz-btn-group.d.ts +0 -3
- package/lib/maz-btn-group.js +0 -907
- package/lib/maz-btn.d.ts +0 -3
- package/lib/maz-btn.js +0 -764
- package/lib/maz-card.d.ts +0 -3
- package/lib/maz-card.js +0 -572
- package/lib/maz-carousel.d.ts +0 -3
- package/lib/maz-carousel.js +0 -569
- package/lib/maz-checkbox.d.ts +0 -3
- package/lib/maz-checkbox.js +0 -359
- package/lib/maz-collapse.d.ts +0 -3
- package/lib/maz-collapse.js +0 -1238
- package/lib/maz-dialog.d.ts +0 -3
- package/lib/maz-dialog.js +0 -1315
- package/lib/maz-draggable-list.d.ts +0 -3
- package/lib/maz-draggable-list.js +0 -439
- package/lib/maz-dropdown.d.ts +0 -3
- package/lib/maz-dropdown.js +0 -438
- package/lib/maz-dropzone.d.ts +0 -3
- package/lib/maz-dropzone.js +0 -664
- package/lib/maz-flex.d.ts +0 -3
- package/lib/maz-flex.js +0 -427
- package/lib/maz-gallery.d.ts +0 -3
- package/lib/maz-gallery.js +0 -672
- package/lib/maz-img.d.ts +0 -3
- package/lib/maz-img.js +0 -612
- package/lib/maz-input-tags.d.ts +0 -3
- package/lib/maz-input-tags.js +0 -1207
- package/lib/maz-input.d.ts +0 -3
- package/lib/maz-input.js +0 -1076
- package/lib/maz-list-item.d.ts +0 -3
- package/lib/maz-list-item.js +0 -304
- package/lib/maz-list.d.ts +0 -3
- package/lib/maz-list.js +0 -331
- package/lib/maz-loader.d.ts +0 -3
- package/lib/maz-loader.js +0 -304
- package/lib/maz-pagination.d.ts +0 -3
- package/lib/maz-pagination.js +0 -1414
- package/lib/maz-phone-number-input.d.ts +0 -3
- package/lib/maz-phone-number-input.js +0 -3782
- package/lib/maz-picker.d.ts +0 -3
- package/lib/maz-picker.js +0 -6474
- package/lib/maz-plotly.d.ts +0 -3
- package/lib/maz-plotly.js +0 -500
- package/lib/maz-progress-bar.d.ts +0 -3
- package/lib/maz-progress-bar.js +0 -398
- package/lib/maz-radio.d.ts +0 -3
- package/lib/maz-radio.js +0 -358
- package/lib/maz-read-more.d.ts +0 -3
- package/lib/maz-read-more.js +0 -344
- package/lib/maz-responsive-menu.d.ts +0 -3
- package/lib/maz-responsive-menu.js +0 -438
- package/lib/maz-search.d.ts +0 -3
- package/lib/maz-search.js +0 -1590
- package/lib/maz-select.d.ts +0 -3
- package/lib/maz-select.js +0 -2740
- package/lib/maz-sidebar.d.ts +0 -3
- package/lib/maz-sidebar.js +0 -815
- package/lib/maz-slider.d.ts +0 -3
- package/lib/maz-slider.js +0 -1014
- package/lib/maz-spinner.d.ts +0 -3
- package/lib/maz-spinner.js +0 -328
- package/lib/maz-stepper.d.ts +0 -3
- package/lib/maz-stepper.js +0 -1011
- package/lib/maz-switch.d.ts +0 -3
- package/lib/maz-switch.js +0 -375
- package/lib/maz-tabs-bar.d.ts +0 -3
- package/lib/maz-tabs-bar.js +0 -428
- package/lib/maz-tabs-content-item.d.ts +0 -3
- package/lib/maz-tabs-content-item.js +0 -376
- package/lib/maz-tabs-content.d.ts +0 -3
- package/lib/maz-tabs-content.js +0 -367
- package/lib/maz-transition-expand.d.ts +0 -3
- package/lib/maz-transition-expand.js +0 -328
- package/lib/maz-ui.common.d.ts +0 -1
- package/lib/maz-ui.common.js +0 -17208
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../node_modules/style-inject/dist/style-inject.es.js","../node_modules/@babel/runtime/helpers/esm/typeof.js","../node_modules/@babel/runtime/helpers/esm/classCallCheck.js","../node_modules/@babel/runtime/helpers/esm/createClass.js","../node_modules/regenerator-runtime/runtime.js","../node_modules/@babel/runtime/regenerator/index.js","../node_modules/tslib/tslib.es6.js","../package/directives/v-lazy-img/lazy-img-handler.ts","../package/directives/v-lazy-img/lazy-img.directive.ts","../package/components/MazLazyImg.vue","../package/components/MazIcon.vue","../package/utils/injectStrict.ts","../package/components/MazAvatar.vue","../package/components/MazBackDrop.vue","../package/components/MazBackDrop.vue?vue&type=template&id=2059c62c&lang.js","../package/components/MazBtn.vue","../package/components/MazBottomSheet.vue","../package/components/MazDialog.vue","../package/components/MazDialog.vue?vue&type=template&id=4d78e420&lang.js","../package/components/MazDropzone/index.vue","../node_modules/@babel/runtime/helpers/esm/defineProperty.js","../package/components/MazDropzone/index.vue?vue&type=template&id=76ae1994&lang.js","../package/directives/zoom-img.directive.ts","../package/components/MazGallery.vue","../package/directives/v-lazy-img/index.ts","../package/components/MazGallery.vue?vue&type=template&id=4a456c4a&lang.js","../package/components/MazTransitionExpand.vue","../package/components/MazCard.vue","../package/components/MazCard.vue?vue&type=template&id=51e40f8a&lang.js","../package/components/MazInput.vue","../package/utils/debounce.ts","../package/components/MazInput.vue?vue&type=template&id=f53be394&lang.js","../package/filters/currency.ts","../package/components/MazInputPrice.vue","../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","../node_modules/@babel/runtime/helpers/esm/iterableToArray.js","../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","../node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","../package/components/MazPhoneNumberInput/utils/countries-name-list-by-iso-code.ts","../package/components/MazPhoneNumberInput/utils/index.ts","../package/components/MazPhoneNumberInput/constantes/locales.ts","../package/components/MazSelect.vue","../package/components/MazPhoneNumberInput/index.vue"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = GeneratorFunctionPrototype;\n define(Gp, \"constructor\", GeneratorFunctionPrototype);\n define(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction);\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n });\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n define(Gp, iteratorSymbol, function() {\n return this;\n });\n\n define(Gp, \"toString\", function() {\n return \"[object Generator]\";\n });\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, in modern engines\n // we can explicitly access globalThis. In older engines we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","module.exports = require(\"regenerator-runtime\");\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from) {\r\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\r\n to[j] = from[i];\r\n return to;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","import { ClassOptions, LazyImgBinding, GlobalOptions } from './types'\nexport * from './types'\n\nconst EMPTY_PHOTO =\n 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'\n\nexport const DEFAULT_OPTIONS: ClassOptions = {\n baseClass: 'm-lazy-img',\n loadedClass: 'm-lazy-loaded',\n loadingClass: 'm-lazy-loading',\n errorClass: 'm-lazy-error',\n noPhotoClass: 'm-lazy-no-photo',\n noPhoto: false,\n observerOnce: true,\n loadOnce: false,\n noUseErrorPhoto: false,\n observerOptions: {\n threshold: 0.1,\n },\n}\n\nexport class LazyImg {\n private observers: IntersectionObserver[] = []\n private readonly defaultOptions: ClassOptions = DEFAULT_OPTIONS\n private options: ClassOptions\n private onImgLoadedCallback: (el: HTMLElement) => void\n private onImgErrorCallback: (el: HTMLElement, err: ErrorEvent) => void\n private hasImgLoaded = false\n\n constructor(opts: GlobalOptions = {}) {\n this.options = this.buildOptions(opts)\n this.onImgLoadedCallback = this.imageIsLoaded.bind(this)\n this.onImgErrorCallback = this.imageHasError.bind(this)\n }\n\n private async loadErrorPhoto() {\n return (await import('./assets/no_photo.svg')).default\n }\n\n private buildOptions(opts: GlobalOptions): ClassOptions {\n return {\n ...this.defaultOptions,\n ...opts,\n observerOptions: {\n ...this.defaultOptions.observerOptions,\n ...opts.observerOptions,\n },\n }\n }\n\n private removeClass(el: HTMLElement, className: string) {\n el.classList.remove(className)\n }\n\n private addClass(el: HTMLElement, className: string) {\n el.classList.add(className)\n }\n\n private removeAllStateClasses(el: HTMLElement) {\n this.removeClass(el, this.options.loadedClass)\n this.removeClass(el, this.options.loadingClass)\n this.removeClass(el, this.options.errorClass)\n this.removeClass(el, this.options.noPhotoClass)\n }\n\n private setBaseClass(el: HTMLElement) {\n this.addClass(el, this.options.baseClass)\n }\n\n private imageIsLoading(el: HTMLElement) {\n this.addClass(el, this.options.loadingClass)\n this.options.onLoading?.(el)\n }\n\n private imageHasNoPhoto(el: HTMLElement) {\n this.removeClass(el, this.options.loadingClass)\n this.addClass(el, this.options.noPhotoClass)\n\n this.setDefaultPhoto(el)\n }\n\n private imageIsLoaded(el: HTMLElement): void {\n this.hasImgLoaded = true\n this.removeClass(el, this.options.loadingClass)\n this.addClass(el, this.options.loadedClass)\n this.options.onLoaded?.(el)\n }\n\n private imageHasError(el: HTMLElement, event?: ErrorEvent): void {\n console.warn(`[MazLazyImg] Error while loading image`, event)\n this.removeClass(el, this.options.loadingClass)\n this.addClass(el, this.options.errorClass)\n\n this.options.onError?.(el)\n\n this.setDefaultPhoto(el)\n }\n\n private getImageUrl(\n el: HTMLElement,\n binding: LazyImgBinding,\n ): string | null | undefined {\n const dataSrc = this.getImgElement(el).getAttribute('data-src')\n if (dataSrc) return dataSrc\n\n const bindingSrc =\n typeof binding.value === 'object' ? binding.value.src : binding.value\n\n if (!bindingSrc) console.warn(`[MazLazyImg] src url is not defined`)\n\n return bindingSrc\n }\n\n private async setPictureSourceUrls(el: HTMLElement): Promise<void> {\n const sourceElements = el.querySelectorAll('source')\n\n if (sourceElements.length > 0) {\n for await (const source of sourceElements) {\n const srcSet = source.getAttribute('data-srcset')\n if (!srcSet)\n console.warn(\n '[MazLazyImg] the \"[data-srcset]\" attribute is not provided on \"<source />\"',\n )\n else source.srcset = srcSet\n }\n } else {\n console.warn(\n '[MazLazyImg] No \"<source />\" elements provided into the \"<picture />\" element',\n )\n this.imageHasError(el)\n }\n }\n\n private hasBgImgMode(binding: LazyImgBinding): boolean {\n return binding.arg === 'bg-image'\n }\n\n private isPictureElement(el: HTMLElement): boolean {\n return el instanceof HTMLPictureElement\n }\n\n private getImgElement(el: HTMLElement): HTMLImageElement {\n const isPictureElement = this.isPictureElement(el)\n return (isPictureElement ? el.querySelector('img') : el) as HTMLImageElement\n }\n\n private async setDefaultPhoto(el: HTMLElement) {\n if (this.options.noUseErrorPhoto) return\n const errorPhoto = this.options.errorPhoto\n ? this.options.errorPhoto\n : await this.loadErrorPhoto()\n const sourceElements = el.querySelectorAll('source')\n if (sourceElements.length > 0) {\n for await (const source of sourceElements) {\n source.srcset = errorPhoto\n }\n } else {\n this.setImgSrc(el, errorPhoto)\n }\n }\n\n private addEventListenerToImg(el: HTMLElement) {\n const imgElement = this.getImgElement(el)\n imgElement.addEventListener('load', () => this.onImgLoadedCallback(el), {\n once: true,\n })\n imgElement.addEventListener(\n 'error',\n (err) => this.onImgErrorCallback(el, err),\n { once: true },\n )\n }\n\n private async loadImage(\n el: HTMLElement,\n binding: LazyImgBinding,\n ): Promise<void> {\n this.imageIsLoading(el)\n\n if (this.isPictureElement(el)) {\n this.addEventListenerToImg(el)\n\n await this.setPictureSourceUrls(el)\n } else {\n const imageUrl = this.getImageUrl(el, binding)\n\n if (!imageUrl) return this.imageHasError(el)\n\n if (this.hasBgImgMode(binding)) {\n el.style.backgroundImage = `url('${imageUrl}')`\n this.imageIsLoaded(el)\n } else {\n this.addEventListenerToImg(el)\n\n this.setImgSrc(el, imageUrl)\n }\n }\n }\n\n public setImgSrc(el: HTMLElement, src: string) {\n const imgElement = this.getImgElement(el)\n imgElement.src = src\n }\n\n private handleIntersectionObserver(\n el: HTMLElement,\n binding: LazyImgBinding,\n entries: IntersectionObserverEntry[],\n observer: IntersectionObserver,\n ) {\n this.observers.push(observer)\n for (const entry of entries) {\n if (entry.isIntersecting) {\n this.options.onIntersecting?.(entry.target)\n\n if (this.options.observerOnce) {\n observer.unobserve(el)\n }\n\n if (this.options.loadOnce && this.hasImgLoaded) return\n this.loadImage(el, binding)\n }\n }\n }\n\n private createObserver(el: HTMLElement, binding: LazyImgBinding) {\n const observerCallback = (\n entries: IntersectionObserverEntry[],\n intersectionObserver: IntersectionObserver,\n ) => {\n this.handleIntersectionObserver(\n el,\n binding,\n entries,\n intersectionObserver,\n )\n }\n const observerOptions: ClassOptions['observerOptions'] =\n this.options.observerOptions\n\n const observer = new IntersectionObserver(observerCallback, observerOptions)\n\n observer.observe(el)\n }\n\n private async imageHandler(\n el: HTMLElement,\n binding: LazyImgBinding,\n type: 'bind' | 'update',\n ): Promise<void> {\n if (type === 'update') {\n // Clean all previous observers\n for await (const observer of this.observers) observer.unobserve(el)\n }\n\n if (window.IntersectionObserver) {\n this.createObserver(el, binding)\n } else {\n this.loadImage(el, binding)\n }\n }\n\n private async bindUpdateHandler(\n el: HTMLElement,\n binding: LazyImgBinding,\n type: 'bind' | 'update',\n ): Promise<void> {\n if (this.options.noPhoto) return this.imageHasNoPhoto(el)\n\n await this.imageHandler(el, binding, type)\n }\n\n public async add(el: HTMLElement, binding: LazyImgBinding): Promise<void> {\n if (this.hasBgImgMode(binding) && this.isPictureElement(el)) {\n throw new Error(\n `[MazLazyImg] You can't use the \"bg-image\" mode with \"<picture />\" element`,\n )\n }\n\n setTimeout(() => this.setBaseClass(el), 0)\n\n if (!el.getAttribute('src')) this.setImgSrc(el, EMPTY_PHOTO)\n\n await this.bindUpdateHandler(el, binding, 'bind')\n }\n\n public async update(el: HTMLElement, binding: LazyImgBinding): Promise<void> {\n if (binding.value !== binding.oldValue) {\n this.hasImgLoaded = false\n this.removeAllStateClasses(el)\n\n await this.bindUpdateHandler(el, binding, 'update')\n }\n }\n\n public remove(el: HTMLElement, binding: LazyImgBinding) {\n this.hasImgLoaded = false\n if (this.hasBgImgMode(binding)) el.style.backgroundImage = ''\n\n this.removeAllStateClasses(el)\n\n for (const observer of this.observers) observer.unobserve(el)\n this.observers = []\n }\n}\n","import { Directive } from 'vue'\nimport { LazyImg, LazyImgBinding } from './lazy-img-handler'\n\nlet instance: LazyImg\n\nconst vLazyImg: Directive = {\n created(el: HTMLElement, binding: LazyImgBinding) {\n const options = typeof binding.value === 'object' ? binding.value : {}\n instance = new LazyImg(options)\n instance.add(el, binding)\n },\n updated(el: HTMLElement, binding: LazyImgBinding): void {\n instance.update(el, binding)\n },\n unmounted(el: HTMLElement, binding: LazyImgBinding): void {\n instance.remove(el, binding)\n },\n}\n\nexport { vLazyImg }\n","<template>\n <picture\n v-lazy-img=\"{\n noPhoto: noPhoto,\n observerOnce: !noObserverOnce,\n loadOnce: loadOnce,\n onIntersecting: (el: HTMLElement) => $emit('intersecting', el),\n onLoading: (el: HTMLElement) => $emit('loading', el),\n onLoaded: (el: HTMLElement) => $emit('loaded', el),\n onError: (el: HTMLElement) => $emit('error', el),\n observerOptions: observerOptions,\n }\"\n class=\"m-lazy-img-component\"\n :class=\"{ '-use-loader': !noLoader, '--height-full': imageHeightFull }\"\n >\n <source\n v-for=\"({ srcset, media }, sourceIndex) in sources\"\n :key=\"sourceIndex\"\n :data-srcset=\"srcset\"\n :media=\"media\"\n />\n <img\n v-bind=\"$attrs\"\n src=\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\"\n />\n <div v-if=\"!noLoader\" class=\"m-lazy-img-component-loader\">\n <MazSpinner color=\"black\" size=\"2em\" />\n </div>\n <slot />\n </picture>\n</template>\n\n<script lang=\"ts\" setup>\n import { Prop, computed } from 'vue'\n import { GlobalOptions } from '../directives/v-lazy-img'\n import { vLazyImg } from './../directives/v-lazy-img/lazy-img.directive'\n\n import MazSpinner from './MazSpinner.vue'\n import { Image } from './types'\n\n const props = defineProps({\n image: { type: [String, Object], default: undefined } as Prop<Image>,\n noPhoto: { type: Boolean, default: false },\n noLoader: { type: Boolean, default: false },\n noObserverOnce: { type: Boolean, default: false },\n loadOnce: { type: Boolean, default: false },\n imageHeightFull: { type: Boolean, default: false },\n observerOptions: { type: Object, default: null } as Prop<\n GlobalOptions['observerOptions']\n >,\n })\n\n defineEmits(['intersecting', 'loading', 'loaded', 'error'])\n\n const sources = computed(() =>\n typeof props.image === 'string'\n ? [{ srcset: props.image }]\n : props.image?.sources,\n )\n</script>\n\n<style lang=\"postcss\" scoped>\n /* stylelint-disable no-descending-specificity */\n .m-lazy-img-component {\n @apply maz-relative maz-inline-flex maz-bg-color-light maz-flex-center;\n\n &-loader {\n @apply maz-absolute maz-inset-0 maz-hidden maz-flex-center;\n }\n\n &:not(.m-lazy-error):not(.m-lazy-no-photo) img {\n @apply maz-h-full maz-w-full;\n }\n\n &.--height-full img {\n @apply maz-max-h-full maz-w-min maz-max-w-min !important;\n }\n\n &:not(.m-lazy-loaded):not(.m-lazy-no-photo) {\n & .m-lazy-img-component-loader {\n @apply maz-flex;\n }\n }\n }\n</style>\n","<template>\n <!-- eslint-disable vue/no-v-html -->\n <svg\n v-if=\"svgElSource\"\n ref=\"svgElem\"\n width=\"1em\"\n height=\"1em\"\n v-bind=\"{\n ...getSvgAttrs(svgElSource),\n ...filterAttrs($attrs),\n }\"\n :style=\"`font-size: ${size}`\"\n v-html=\"getSvgContent(svgElSource)\"\n ></svg>\n <!-- eslint-enable vue/no-v-html -->\n</template>\n\n<!-- // inheritAttrs: false -->\n<script lang=\"ts\" setup>\n import { nextTick, onMounted, PropType, ref, watch, computed } from 'vue'\n import { injectStrict } from '../utils/injectStrict'\n\n const cache: Record<string, Promise<SVGElement>> = {}\n const svgElSource = ref<SVGElement>()\n const svgElem = ref<SVGElement>()\n\n const mazIconPath = injectStrict<string>('mazIconPath')\n\n const props = defineProps({\n src: { type: String, default: undefined },\n path: { type: String, default: undefined },\n name: { type: String, default: undefined },\n size: { type: String, default: '1.5rem' },\n title: { type: String, default: undefined },\n transformSource: {\n type: Function as PropType<(param: SVGElement) => typeof param>,\n default: (svg: SVGElement) => svg,\n },\n keepDuringLoading: { type: Boolean, default: true },\n })\n\n const emits = defineEmits(['loaded', 'unloaded', 'error'])\n\n const iconPath = computed(() => props.path ?? mazIconPath)\n const fullSrc = computed(\n () => props.src ?? `${iconPath.value}/${props.name}.svg`,\n )\n\n onMounted(() => {\n if (!props.name && !props.src) {\n throw new Error('[MazIcon] you should provide \"name\" or \"src\" as prop')\n }\n getSource(fullSrc.value)\n })\n\n const setTitle = (svg: SVGElement, title: string) => {\n const titleTags = svg.getElementsByTagName('title')\n if (titleTags.length) {\n // overwrite existing title\n titleTags[0].textContent = title\n } else {\n // create a title element if one doesn't already exist\n const titleEl = document.createElementNS(\n 'http://www.w3.org/2000/svg',\n 'title',\n )\n titleEl.textContent = title\n svg.appendChild(titleEl)\n }\n }\n\n const filterAttrs = (attrs: Record<string, unknown>) => {\n return Object.keys(attrs).reduce((result, key) => {\n if (\n attrs[key] !== false &&\n attrs[key] !== null &&\n attrs[key] !== undefined\n ) {\n result[key] = attrs[key]\n }\n return result\n }, {})\n }\n\n const getSvgAttrs = (svgEl: SVGElement) => {\n // copy attrs\n const svgAttrs = {}\n const attrs = svgEl.attributes\n if (!attrs) {\n return svgAttrs\n }\n for (let i = attrs.length - 1; i >= 0; i--) {\n svgAttrs[attrs[i].name] = attrs[i].value\n }\n return svgAttrs\n }\n\n const getSvgContent = (svgEl: SVGElement) => {\n let svgElNode = svgEl.cloneNode(true)\n svgElNode = props.transformSource(svgEl)\n\n if (props.title) {\n setTitle(svgElNode as SVGElement, props.title)\n }\n\n // copy inner html\n return svgEl.innerHTML\n }\n\n const getSource = async (src: string) => {\n // fill cache by src with promise\n if (!cache[src]) {\n // download\n cache[src] = download(src)\n }\n\n // inline svg when cached promise resolves\n try {\n const svg = await cache[src]\n svgElSource.value = svg\n // wait to render\n await nextTick()\n emits('loaded', svgElem.value)\n } catch (err) {\n if (svgElSource.value) {\n svgElSource.value = undefined\n emits('unloaded')\n }\n // remove cached rejected promise so next image can try load again\n delete cache[src]\n emits('error', err)\n }\n }\n\n const download = (url: string): Promise<SVGElement> => {\n return new Promise((resolve, reject) => {\n const request = new XMLHttpRequest()\n request.open('GET', url, true)\n\n request.onload = () => {\n if (request.status >= 200 && request.status < 400) {\n try {\n // Setup a parser to convert the response to text/xml in order for it to be manipulated and changed\n const parser = new DOMParser()\n const result = parser.parseFromString(\n request.responseText,\n 'text/xml',\n )\n const svgEl = result.getElementsByTagName('svg')[0]\n if (svgEl) {\n // svgEl = this.transformSource(svgEl);\n resolve(svgEl)\n } else {\n reject(new Error('Loaded file is not valid SVG\"'))\n }\n } catch (e) {\n reject(e)\n }\n } else {\n reject(new Error('Error loading SVG'))\n }\n }\n\n request.onerror = reject\n request.send()\n })\n }\n\n watch(\n () => props.src,\n () => getSource(fullSrc.value),\n )\n</script>\n","import { inject } from 'vue'\n\nexport function injectStrict<T>(key: string, fallback?: T) {\n const resolved = inject(key, fallback)\n\n if (!resolved) {\n return undefined\n }\n\n return resolved\n}\n","<template>\n <Component\n :is=\"componentType\"\n :style=\"{ fontSize: size }\"\n class=\"m-avatar\"\n :class=\"[\n {\n '--has-link': isLink,\n },\n ]\"\n v-bind=\"$attrs\"\n :href=\"href\"\n :to=\"to\"\n :target=\"isLink ? target : undefined\"\n >\n <div\n class=\"m-avatar__wrapper\"\n :tabindex=\"clickable ? 0 : -1\"\n :class=\"{\n '--has-shadow': !noElevation,\n '--bordered': bordered,\n '--clickable': clickable,\n '--square': square,\n '--has-initial': !src && caption,\n }\"\n @keydown.enter=\"clickable ? $emit('click', $event) : undefined\"\n >\n <MazLazyImg\n v-if=\"src\"\n class=\"m-avatar__picture\"\n :image=\"src\"\n :alt=\"alt\"\n image-height-full\n :no-loader=\"noLoader\"\n @click=\"clickable ? $emit('click', $event) : null\"\n />\n <slot v-if=\"caption\" name=\"round-text\">\n <span class=\"m-avatar__initial\"> {{ caption?.charAt(0) }} </span>\n </slot>\n\n <button\n v-if=\"clickable\"\n type=\"button\"\n tabindex=\"-1\"\n class=\"m-avatar__button maz-flex maz-flex-center\"\n @click=\"$emit('click', $event)\"\n >\n <slot name=\"icon\">\n <MazIcon name=\"pencil\" class=\"m-avatar__button__icon\" />\n </slot>\n </button>\n </div>\n <slot name=\"caption\">\n <p v-if=\"showCaption && caption\" class=\"m-avatar__caption\">\n {{ caption }}\n </p>\n </slot>\n </Component>\n</template>\n\n<script lang=\"ts\" setup>\n import { PropType, computed } from 'vue'\n import MazLazyImg from './MazLazyImg.vue'\n import MazIcon from './MazIcon.vue'\n\n const props = defineProps({\n // url or path of the image\n src: {\n type: String as PropType<undefined | null | string>,\n default: undefined,\n },\n caption: {\n type: String as PropType<undefined | null | string>,\n default: undefined,\n },\n // url or path to link another page\n href: { type: String, default: undefined },\n // route config\n to: { type: Object, default: undefined },\n // alt text of image\n alt: { type: String, default: 'avatar image' },\n // target attribute of link (if url is provide)\n target: { type: String, default: '_self' },\n // size of avatar\n size: { type: String, default: undefined },\n // add border around the avatar\n bordered: { type: Boolean, default: false },\n // add an edit layer & emit `edit` event on click\n clickable: { type: Boolean, default: false },\n // Make the avatar square\n square: { type: Boolean, default: false },\n // Remove the shadow behind the avatar\n noElevation: { type: Boolean, default: false },\n showCaption: { type: Boolean, default: false },\n imageHeightFull: { type: Boolean, default: false },\n noLoader: { type: Boolean, default: false },\n })\n\n const componentType = computed(() =>\n props.to ? 'RouterLink' : props.href ? 'a' : 'div',\n )\n const isLink = computed(() => !!props.to || !!props.href)\n\n defineEmits(['click'])\n</script>\n\n<style lang=\"postcss\" scoped>\n .m-avatar {\n @apply maz-inline-flex maz-flex-col maz-flex-center;\n @apply maz-no-underline !important;\n\n &__caption {\n @apply maz-mt-2 maz-w-full maz-truncate maz-text-center maz-text-base maz-font-medium maz-capitalize maz-text-black;\n }\n\n &__initial {\n @apply maz-text-2xl maz-capitalize maz-text-white;\n }\n\n &__wrapper {\n @apply maz-relative maz-flex maz-h-12 maz-w-12 maz-flex-none maz-justify-center maz-overflow-hidden\n maz-rounded-full maz-bg-gray-50;\n\n &.--clickable {\n & .m-avatar__button {\n @apply maz-outline-none maz-absolute maz-inset-0 maz-w-full maz-scale-0 maz-cursor-pointer maz-rounded-full maz-border-none\n maz-bg-transparent maz-opacity-0;\n\n transition: all 200ms ease-in-out;\n transition-property: transform, filter;\n\n &__icon {\n @apply maz-h-6 maz-w-6 maz-text-white;\n }\n }\n\n &:hover,\n &:focus {\n & .m-avatar__picture {\n filter: blur(1.5px);\n }\n\n & .m-avatar__button {\n @apply maz-scale-105 maz-opacity-100;\n\n background-color: var(--maz-color-danger-alpha);\n }\n }\n }\n\n &.--bordered {\n @apply maz-border-2 maz-border-white;\n }\n\n &.--square {\n @apply maz-rounded-lg;\n }\n\n &.--has-shadow {\n @apply maz-shadow;\n }\n\n &.--has-initial {\n @apply maz-items-center maz-bg-primary;\n\n &.--clickable {\n & .m-avatar__button {\n @apply maz-bg-danger;\n }\n }\n }\n }\n\n &.--has-link {\n @apply maz-cursor-pointer;\n }\n }\n</style>\n","<template>\n <Teleport to=\"body\" :selector=\"selector\">\n <Transition\n appear\n :name=\"transition\"\n @after-enter=\"onBackdropAnimationEnter\"\n @after-leave=\"onBackdropAnimationLeave\"\n >\n <div\n v-if=\"present\"\n :class=\"[\n 'm-backdrop',\n { '--backdrop-present': present },\n backdropClass,\n ]\"\n tabindex=\"-1\"\n role=\"dialog\"\n >\n <div\n class=\"m-backdrop-overlay\"\n :class=\"{ '--disabled': persistent }\"\n tabindex=\"-1\"\n @click.self=\"onBackdropClicked\"\n />\n <div\n class=\"m-backdrop-content\"\n :class=\"modalClass\"\n v-bind=\"$attrs\"\n role=\"document\"\n tabindex=\"0\"\n >\n <slot :close=\"() => close()\"></slot>\n </div>\n </div>\n </Transition>\n </Teleport>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, ref, PropType, watch } from 'vue'\n\n const MODAL_OPENED_CLASS = '--backdrop-present'\n\n const addClassToDocument = () =>\n document.documentElement.classList.add(MODAL_OPENED_CLASS)\n const removeClassFromDocument = () =>\n document.documentElement.classList.remove(MODAL_OPENED_CLASS)\n\n export default defineComponent({\n inheritAttrs: false,\n\n props: {\n modelValue: { type: Boolean, default: true },\n selector: { type: String, default: '#modals-container' },\n beforeClose: {\n type: Function as PropType<() => boolean>,\n default: undefined,\n },\n persistent: { type: Boolean, default: false },\n backdropClass: { type: [Array, String, Object], default: () => [] },\n transition: { type: String, default: 'backdrop-anim' },\n escKey: { type: Boolean, default: true },\n zOffset: { type: Number, default: 20 },\n defaultZIndex: { type: Number, default: 1050 },\n modalClass: { type: String, default: undefined },\n },\n\n emits: ['open', 'close', 'update:model-value'],\n\n setup(props, { emit }) {\n const present = ref(props.modelValue)\n\n const $toggleBackdrop = (show: boolean) => (present.value = show)\n\n const openModal = () => $toggleBackdrop(true)\n const close = () => $toggleBackdrop(false)\n\n const toggleModal = (show: boolean, ...rest: unknown[]) => {\n const guard: (...args: unknown[]) => boolean = props.beforeClose\n ? props.beforeClose\n : () => true\n\n if (show) {\n openModal()\n } else if (!props.beforeClose || guard(...rest) === false) {\n close()\n }\n }\n\n const onBackdropAnimationEnter = () => {\n emit('open')\n }\n\n const onBackdropAnimationLeave = () => {\n emit('update:model-value', false)\n emit('close')\n }\n\n const onBackdropClicked = () => {\n if (!props.persistent) toggleModal(false)\n }\n\n const onKeyPress = (event: KeyboardEvent) => {\n if (props.escKey && event.code === 'Escape') {\n if (!props.persistent) toggleModal(false)\n }\n }\n\n watch(\n () => props.modelValue,\n (value) => {\n present.value = value\n if (value) {\n addClassToDocument()\n window.addEventListener('keyup', onKeyPress, false)\n } else {\n window.removeEventListener('keyup', onKeyPress)\n removeClassFromDocument()\n }\n },\n { immediate: true },\n )\n\n return {\n present,\n openModal,\n close,\n onBackdropClicked,\n onBackdropAnimationEnter,\n onBackdropAnimationLeave,\n toggleModal,\n }\n },\n })\n</script>\n\n<style lang=\"postcss\">\n /* stylelint-disable no-descending-specificity */\n html.--backdrop-present {\n overflow-y: hidden;\n height: 100vh;\n }\n\n .m-backdrop.bottom-sheet-anim-enter-active,\n .m-backdrop.bottom-sheet-anim-leave-active {\n transition: opacity ease-in-out 250ms;\n\n & .m-backdrop-content {\n transition: transform ease-in-out 250ms;\n transform: translateY(0);\n }\n }\n\n .m-backdrop.bottom-sheet-anim-enter-from,\n .m-backdrop.bottom-sheet-anim-leave-to {\n opacity: 0;\n\n & .m-backdrop-content {\n transform: translateY(100%);\n }\n }\n\n .m-backdrop.modal-anim-enter-active,\n .m-backdrop.modal-anim-leave-active {\n transition: opacity ease-in-out 250ms;\n\n & .m-backdrop-content {\n transition: transform ease-in-out 250ms;\n transform: translateY(0);\n }\n }\n\n .m-backdrop.modal-anim-enter-from,\n .m-backdrop.modal-anim-leave-to {\n opacity: 0;\n\n & .m-backdrop-content {\n transform: translateY(-25px);\n }\n }\n\n .m-backdrop.backdrop-anim-enter-active,\n .m-backdrop.backdrop-anim-leave-active {\n transition: opacity ease-in-out 250ms;\n }\n\n .m-backdrop.backdrop-anim-enter-from,\n .m-backdrop.backdrop-anim-leave-to {\n opacity: 0;\n }\n\n .m-backdrop {\n @apply maz-fixed maz-inset-0 maz-flex maz-opacity-100 maz-flex-center;\n\n backdrop-filter: blur(3px);\n z-index: 1050;\n\n &-overlay {\n touch-action: none;\n\n @apply maz-absolute maz-inset-0 maz-bg-black maz-opacity-40;\n\n &:not(.--disabled) {\n @apply maz-cursor-pointer;\n }\n }\n\n &-content {\n @apply focus:maz-outline-none maz-relative maz-z-1;\n }\n\n &.--bottom-sheet {\n & .m-backdrop-content {\n @apply maz-absolute maz-bottom-0 maz-left-0 maz-right-0;\n }\n }\n\n &.--fullscreen {\n @apply maz-items-start mob-l:maz-items-center;\n\n &.--center-top {\n @apply maz-items-start mob-l:maz-pt-28;\n }\n\n & .m-backdrop-content {\n @apply maz-relative maz-w-full mob-l:maz-w-auto;\n }\n }\n }\n</style>\n","<template>\n <Teleport to=\"body\" :selector=\"selector\">\n <Transition\n appear\n :name=\"transition\"\n @after-enter=\"onBackdropAnimationEnter\"\n @after-leave=\"onBackdropAnimationLeave\"\n >\n <div\n v-if=\"present\"\n :class=\"[\n 'm-backdrop',\n { '--backdrop-present': present },\n backdropClass,\n ]\"\n tabindex=\"-1\"\n role=\"dialog\"\n >\n <div\n class=\"m-backdrop-overlay\"\n :class=\"{ '--disabled': persistent }\"\n tabindex=\"-1\"\n @click.self=\"onBackdropClicked\"\n />\n <div\n class=\"m-backdrop-content\"\n :class=\"modalClass\"\n v-bind=\"$attrs\"\n role=\"document\"\n tabindex=\"0\"\n >\n <slot :close=\"() => close()\"></slot>\n </div>\n </div>\n </Transition>\n </Teleport>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, ref, PropType, watch } from 'vue'\n\n const MODAL_OPENED_CLASS = '--backdrop-present'\n\n const addClassToDocument = () =>\n document.documentElement.classList.add(MODAL_OPENED_CLASS)\n const removeClassFromDocument = () =>\n document.documentElement.classList.remove(MODAL_OPENED_CLASS)\n\n export default defineComponent({\n inheritAttrs: false,\n\n props: {\n modelValue: { type: Boolean, default: true },\n selector: { type: String, default: '#modals-container' },\n beforeClose: {\n type: Function as PropType<() => boolean>,\n default: undefined,\n },\n persistent: { type: Boolean, default: false },\n backdropClass: { type: [Array, String, Object], default: () => [] },\n transition: { type: String, default: 'backdrop-anim' },\n escKey: { type: Boolean, default: true },\n zOffset: { type: Number, default: 20 },\n defaultZIndex: { type: Number, default: 1050 },\n modalClass: { type: String, default: undefined },\n },\n\n emits: ['open', 'close', 'update:model-value'],\n\n setup(props, { emit }) {\n const present = ref(props.modelValue)\n\n const $toggleBackdrop = (show: boolean) => (present.value = show)\n\n const openModal = () => $toggleBackdrop(true)\n const close = () => $toggleBackdrop(false)\n\n const toggleModal = (show: boolean, ...rest: unknown[]) => {\n const guard: (...args: unknown[]) => boolean = props.beforeClose\n ? props.beforeClose\n : () => true\n\n if (show) {\n openModal()\n } else if (!props.beforeClose || guard(...rest) === false) {\n close()\n }\n }\n\n const onBackdropAnimationEnter = () => {\n emit('open')\n }\n\n const onBackdropAnimationLeave = () => {\n emit('update:model-value', false)\n emit('close')\n }\n\n const onBackdropClicked = () => {\n if (!props.persistent) toggleModal(false)\n }\n\n const onKeyPress = (event: KeyboardEvent) => {\n if (props.escKey && event.code === 'Escape') {\n if (!props.persistent) toggleModal(false)\n }\n }\n\n watch(\n () => props.modelValue,\n (value) => {\n present.value = value\n if (value) {\n addClassToDocument()\n window.addEventListener('keyup', onKeyPress, false)\n } else {\n window.removeEventListener('keyup', onKeyPress)\n removeClassFromDocument()\n }\n },\n { immediate: true },\n )\n\n return {\n present,\n openModal,\n close,\n onBackdropClicked,\n onBackdropAnimationEnter,\n onBackdropAnimationLeave,\n toggleModal,\n }\n },\n })\n</script>\n\n<style lang=\"postcss\">\n /* stylelint-disable no-descending-specificity */\n html.--backdrop-present {\n overflow-y: hidden;\n height: 100vh;\n }\n\n .m-backdrop.bottom-sheet-anim-enter-active,\n .m-backdrop.bottom-sheet-anim-leave-active {\n transition: opacity ease-in-out 250ms;\n\n & .m-backdrop-content {\n transition: transform ease-in-out 250ms;\n transform: translateY(0);\n }\n }\n\n .m-backdrop.bottom-sheet-anim-enter-from,\n .m-backdrop.bottom-sheet-anim-leave-to {\n opacity: 0;\n\n & .m-backdrop-content {\n transform: translateY(100%);\n }\n }\n\n .m-backdrop.modal-anim-enter-active,\n .m-backdrop.modal-anim-leave-active {\n transition: opacity ease-in-out 250ms;\n\n & .m-backdrop-content {\n transition: transform ease-in-out 250ms;\n transform: translateY(0);\n }\n }\n\n .m-backdrop.modal-anim-enter-from,\n .m-backdrop.modal-anim-leave-to {\n opacity: 0;\n\n & .m-backdrop-content {\n transform: translateY(-25px);\n }\n }\n\n .m-backdrop.backdrop-anim-enter-active,\n .m-backdrop.backdrop-anim-leave-active {\n transition: opacity ease-in-out 250ms;\n }\n\n .m-backdrop.backdrop-anim-enter-from,\n .m-backdrop.backdrop-anim-leave-to {\n opacity: 0;\n }\n\n .m-backdrop {\n @apply maz-fixed maz-inset-0 maz-flex maz-opacity-100 maz-flex-center;\n\n backdrop-filter: blur(3px);\n z-index: 1050;\n\n &-overlay {\n touch-action: none;\n\n @apply maz-absolute maz-inset-0 maz-bg-black maz-opacity-40;\n\n &:not(.--disabled) {\n @apply maz-cursor-pointer;\n }\n }\n\n &-content {\n @apply focus:maz-outline-none maz-relative maz-z-1;\n }\n\n &.--bottom-sheet {\n & .m-backdrop-content {\n @apply maz-absolute maz-bottom-0 maz-left-0 maz-right-0;\n }\n }\n\n &.--fullscreen {\n @apply maz-items-start mob-l:maz-items-center;\n\n &.--center-top {\n @apply maz-items-start mob-l:maz-pt-28;\n }\n\n & .m-backdrop-content {\n @apply maz-relative maz-w-full mob-l:maz-w-auto;\n }\n }\n }\n</style>\n","<template>\n <Component\n v-bind=\"$attrs\"\n :is=\"component\"\n :disabled=\"isDisabled\"\n class=\"m-btn\"\n :class=\"[\n `--${size}`,\n btnColorClass,\n cursorClass,\n variantClass,\n {\n '--block': block,\n '--no-underline': noUnderline,\n '--no-leading': noLeading,\n '--fab': fab,\n '--loading': loading,\n '--disabled': isDisabled,\n '--icon': hasIcon,\n '--rounded': rounded,\n },\n ]\"\n :type=\"btnType\"\n >\n <div v-if=\"hasLeftIcon\" class=\"m-btn__icon-left\">\n <slot name=\"left-icon\">\n <MazIcon v-if=\"leftIcon\" :name=\"leftIcon\" />\n </slot>\n </div>\n <span>\n <slot></slot>\n </span>\n <div v-if=\"hasRightIcon\" class=\"m-btn__icon-right\">\n <slot name=\"right-icon\">\n <MazIcon v-if=\"rightIcon\" :name=\"rightIcon\" />\n </slot>\n </div>\n <div\n v-if=\"hasLoader\"\n class=\"m-btn__loading-wrapper\"\n :class=\"loaderBgColorClass\"\n >\n <MazSpinner size=\"2em\" :color=\"loaderColor\" />\n </div>\n </Component>\n</template>\n\n<script lang=\"ts\" setup>\n import { computed, PropType, useAttrs, useSlots } from 'vue'\n import MazSpinner from './MazSpinner.vue'\n import MazIcon from './MazIcon.vue'\n\n import { Color, Size } from './types'\n\n const { href, to } = useAttrs()\n const slots = useSlots()\n\n const props = defineProps({\n variant: {\n type: String,\n default: 'button',\n validator: (value: string) => {\n return ['button', 'link'].includes(value)\n },\n },\n size: {\n type: String as PropType<Size>,\n default: 'md',\n validator: (value: string) => {\n return ['mini', 'xs', 'sm', 'md', 'lg', 'xl'].includes(value)\n },\n },\n color: {\n type: String as PropType<Color>,\n default: 'primary',\n validator: (value: Color) => {\n return [\n 'primary',\n 'secondary',\n 'info',\n 'success',\n 'warning',\n 'danger',\n 'white',\n 'black',\n 'transparent',\n ].includes(value)\n },\n },\n type: {\n type: String,\n default: 'button',\n validator: (value: string) => {\n return ['button', 'submit'].includes(value)\n },\n },\n rounded: { type: Boolean, default: false },\n outline: { type: Boolean, default: false },\n pastel: { type: Boolean, default: false },\n block: { type: Boolean, default: false },\n noUnderline: { type: Boolean, default: false },\n noLeading: { type: Boolean, default: false },\n loading: { type: Boolean, default: false },\n disabled: { type: Boolean, default: false },\n fab: { type: Boolean, default: false },\n leftIcon: { type: String, default: undefined },\n rightIcon: { type: String, default: undefined },\n })\n\n const component = computed(() => {\n if (href) return 'a'\n else if (to) return 'router-link'\n return 'button'\n })\n\n const btnColorClass = computed(() =>\n props.pastel\n ? `--${props.color}-pastel`\n : props.outline || props.loading\n ? `--${props.color}-outline`\n : `--${props.color}`,\n )\n const isDisabled = computed(\n () => (props.loading || props.disabled) && component.value === 'button',\n )\n const cursorClass = computed(() =>\n isDisabled.value ? '--cursor-default' : '--cursor-pointer',\n )\n const variantClass = computed(() => `--is-${props.variant}`)\n const loaderBgColorClass = computed(() => `--${props.color}`)\n const loaderColor = computed(() =>\n ['white'].includes(props.color) ? 'black' : 'white',\n )\n const hasLoader = computed(() => props.loading && props.variant === 'button')\n const hasLeftIcon = computed(() => !!slots['left-icon'] || props.leftIcon)\n const hasRightIcon = computed(() => !!slots['right-icon'] || props.rightIcon)\n const hasIcon = computed(() => hasLeftIcon.value || hasRightIcon.value)\n const btnType = computed(() =>\n component.value === 'button' ? props.type : undefined,\n )\n</script>\n\n<style lang=\"postcss\" scoped>\n .m-btn {\n @apply maz-border maz-border-solid maz-border-transparent maz-text-center maz-text-base;\n\n & span {\n @apply maz-leading-none;\n }\n\n &__icon-left {\n @apply maz-mr-2 maz--ml-1 maz-leading-none;\n }\n\n &__icon-right {\n @apply maz-ml-2 maz--mr-1 maz-leading-none;\n }\n\n &.--cursor-pointer {\n @apply maz-cursor-pointer;\n }\n\n &.--cursor-default {\n @apply maz-cursor-default;\n }\n\n &.--is-link {\n @apply maz-outline-none maz-inline-flex maz-items-center maz-bg-transparent maz-text-normal-text maz-transition maz-duration-200 maz-ease-in-out;\n\n &:not(.--no-leading) {\n @apply maz-leading-9;\n }\n\n &:not(:disabled):hover,\n &:not(:disabled):focus {\n &:not(.--no-underline) {\n @apply maz-underline;\n }\n }\n\n &.--secondary {\n @apply maz-text-secondary;\n }\n\n &.--info {\n @apply maz-text-info;\n }\n\n &.--warning {\n @apply maz-text-warning-600;\n }\n\n &.--danger {\n @apply maz-text-danger-600;\n }\n\n &.--success {\n @apply maz-text-success-600;\n }\n\n &.--white {\n @apply maz-text-white;\n }\n\n &.--black {\n @apply maz-text-black;\n }\n }\n\n &.--is-button {\n @apply maz-relative maz-inline-flex maz-items-center maz-justify-center maz-overflow-hidden\n maz-rounded-lg maz-border-transparent maz-bg-transparent maz-font-base maz-font-medium maz-no-underline\n maz-transition maz-duration-300 maz-ease-in-out;\n\n &.--rounded {\n @apply maz-rounded-full;\n }\n\n &.--xl {\n @apply maz-px-8 maz-text-xl;\n\n padding-top: 1.325rem;\n padding-bottom: 1.325rem;\n }\n\n &.--lg {\n @apply maz-px-6 maz-text-lg;\n\n padding-top: 1rem;\n padding-bottom: 1rem;\n }\n\n &.--md {\n @apply maz-px-4 maz-text-base;\n\n padding-top: 0.88rem;\n padding-bottom: 0.88rem;\n }\n\n &.--sm {\n @apply maz-px-3 maz-text-sm;\n\n padding-top: 0.625rem;\n padding-bottom: 0.625rem;\n }\n\n &.--xs {\n @apply maz-px-2 maz-text-sm;\n\n padding-top: 0.3rem;\n padding-bottom: 0.3rem;\n }\n\n &.--mini {\n @apply maz-px-1 maz-text-xs;\n\n padding-top: 0.2rem;\n padding-bottom: 0.2rem;\n }\n\n &.--icon {\n @apply maz-py-2;\n }\n\n transition: background 300ms ease-in-out 0ms, color 300ms ease-in-out 0ms;\n\n /* Not disabled */\n\n &:not(.--disabled) {\n &:hover,\n &:focus {\n @apply maz-bg-gray-200;\n }\n }\n\n /* Fab */\n\n &.--fab {\n @apply maz-flex maz-h-12 maz-w-12 maz-items-center maz-justify-center maz-rounded-full\n maz-px-0 maz-py-0 maz-drop-shadow-md;\n }\n\n &.--block {\n @apply maz-w-full;\n }\n\n &.--primary {\n @apply maz-bg-primary maz-text-primary-contrast;\n\n &:not(:disabled):hover,\n &:not(:disabled):focus {\n @apply maz-bg-primary-600;\n }\n }\n\n &.--secondary {\n @apply maz-bg-secondary maz-text-secondary-contrast;\n\n &:not(:disabled):hover,\n &:not(:disabled):focus {\n @apply maz-bg-secondary-600;\n }\n }\n\n &.--info {\n @apply maz-bg-info maz-text-info-contrast;\n\n &:not(:disabled):hover,\n &:not(:disabled):focus {\n @apply maz-bg-info-600;\n }\n }\n\n &.--success {\n @apply maz-bg-success maz-text-success-contrast;\n\n &:not(:disabled):hover,\n &:not(:disabled):focus {\n @apply maz-bg-success-600;\n }\n }\n\n &.--warning {\n @apply maz-bg-warning maz-text-warning-contrast;\n\n &:not(:disabled):hover,\n &:not(:disabled):focus {\n @apply maz-bg-warning-600;\n }\n }\n\n &.--danger {\n @apply maz-bg-danger maz-text-white;\n\n &:not(:disabled):hover,\n &:not(:disabled):focus {\n @apply maz-bg-danger-600;\n }\n }\n\n &.--white {\n @apply maz-bg-white maz-text-white-contrast;\n\n &:not(:disabled):hover,\n &:not(:disabled):focus {\n @apply maz-bg-gray-300;\n }\n }\n\n &.--black {\n @apply maz-bg-black maz-text-black-contrast;\n\n &:not(:disabled):hover,\n &:not(:disabled):focus {\n @apply maz-bg-gray-800;\n }\n }\n\n &.--transparent {\n @apply maz-bg-transparent maz-text-normal-text;\n\n &:not(:disabled):hover,\n &:not(:disabled):focus {\n @apply maz-bg-color-light;\n }\n }\n\n &.--primary-outline {\n @apply maz-border-primary maz-text-primary;\n\n &:not(:disabled):hover,\n &:not(:disabled):focus {\n @apply maz-bg-primary maz-text-primary-contrast;\n }\n }\n\n &.--secondary-outline {\n @apply maz-border-secondary maz-text-secondary;\n\n &:not(:disabled):hover,\n &:not(:disabled):focus {\n @apply maz-bg-secondary maz-text-white;\n }\n }\n\n &.--info-outline {\n @apply maz-border-info maz-text-info;\n\n &:not(:disabled):hover,\n &:not(:disabled):focus {\n @apply maz-bg-info maz-text-white;\n }\n }\n\n &.--success-outline {\n @apply maz-border-success maz-text-success;\n\n &:not(:disabled):hover,\n &:not(:disabled):focus {\n @apply maz-bg-success maz-text-white;\n }\n }\n\n &.--danger-outline {\n @apply maz-border-danger maz-text-danger;\n\n &:not(:disabled):hover,\n &:not(:disabled):focus {\n @apply maz-bg-danger maz-text-white;\n }\n }\n\n &.--warning-outline {\n @apply maz-border-warning maz-text-warning;\n\n &:not(:disabled):hover,\n &:not(:disabled):focus {\n @apply maz-bg-warning maz-text-white;\n }\n }\n\n &.--white-outline {\n @apply maz-border-white maz-text-white;\n\n &:not(:disabled):hover,\n &:not(:disabled):focus {\n @apply maz-bg-white maz-text-white;\n }\n }\n\n &.--black-outline {\n @apply maz-border-black maz-text-black;\n\n &:not(:disabled):hover,\n &:not(:disabled):focus {\n @apply maz-bg-black maz-text-black;\n }\n }\n\n &.--primary-pastel {\n @apply maz-bg-primary-50 maz-text-primary;\n\n &:not(:disabled):hover,\n &:not(:disabled):focus {\n @apply maz-bg-primary maz-text-primary-contrast;\n }\n }\n\n &.--secondary-pastel {\n @apply maz-bg-secondary-50 maz-text-secondary;\n\n &:not(:disabled):hover,\n &:not(:disabled):focus {\n @apply maz-bg-secondary maz-text-secondary-contrast;\n }\n }\n\n &.--info-pastel {\n @apply maz-bg-info-50 maz-text-info;\n\n &:not(:disabled):hover,\n &:not(:disabled):focus {\n @apply maz-bg-info maz-text-info-contrast;\n }\n }\n\n &.--success-pastel {\n @apply maz-bg-success-50 maz-text-success;\n\n &:not(:disabled):hover,\n &:not(:disabled):focus {\n @apply maz-bg-success maz-text-success-contrast;\n }\n }\n\n &.--danger-pastel {\n @apply maz-bg-danger-50 maz-text-danger;\n\n &:not(:disabled):hover,\n &:not(:disabled):focus {\n @apply maz-bg-danger maz-text-danger-contrast;\n }\n }\n\n &.--warning-pastel {\n @apply maz-bg-warning-50 maz-text-warning;\n\n &:not(:disabled):hover,\n &:not(:disabled):focus {\n @apply maz-bg-warning maz-text-warning-contrast;\n }\n }\n\n &.--white-pastel {\n @apply maz-bg-gray-100 maz-text-white;\n\n &:not(:disabled):hover,\n &:not(:disabled):focus {\n @apply maz-bg-white maz-text-white-contrast;\n }\n }\n\n &.--black-pastel {\n @apply maz-bg-gray-200 maz-text-black;\n\n &:not(:disabled):hover,\n &:not(:disabled):focus {\n @apply maz-bg-black maz-text-black-contrast;\n }\n }\n\n /* Disabled */\n &.--disabled {\n @apply maz-cursor-not-allowed maz-bg-gray-100 maz-text-gray-400;\n }\n\n /* Loader */\n .m-btn__loading-wrapper {\n @apply maz-absolute maz-inset-0 maz-flex maz-items-center maz-justify-center;\n\n &.--primary {\n @apply maz-bg-primary;\n }\n\n &.--secondary {\n @apply maz-bg-secondary;\n }\n\n &.--info {\n @apply maz-bg-info;\n }\n\n &.--warning {\n @apply maz-bg-warning;\n }\n\n &.--success {\n @apply maz-bg-success;\n }\n\n &.--danger {\n @apply maz-bg-danger;\n }\n\n &.--white {\n @apply maz-bg-white;\n }\n\n &.--black {\n @apply maz-bg-black;\n }\n }\n }\n }\n</style>\n","<template>\n <MazBackDrop\n v-bind=\"$attrs\"\n transition=\"bottom-sheet-anim\"\n backdrop-class=\"--bottom-sheet\"\n @update:model-value=\"(value: boolean) => { persistent ? undefined : closeDialog(value) }\"\n >\n <template #default=\"{ close }\">\n <div\n class=\"m-bottom-sheet__container maz-relative maz-bg-color maz-elevation\"\n :class=\"{\n 'maz-py-6': !noPadding,\n }\"\n >\n <!-- Slot content -->\n <slot>\n <!-- `<h1>Default content</h1>` -->\n <div class=\"maz-direction-column maz-flex maz-flex-center\">\n <h1>Default content</h1>\n </div>\n </slot>\n\n <MazBtn\n v-if=\"!noClose\"\n size=\"mini\"\n class=\"m-bottom-sheet__close\"\n color=\"transparent\"\n @click=\"close\"\n >\n <MazIcon name=\"x\" />\n </MazBtn>\n </div>\n </template>\n </MazBackDrop>\n</template>\n\n<script lang=\"ts\" setup>\n import MazBtn from './MazBtn.vue'\n import MazBackDrop from './MazBackDrop.vue'\n import MazIcon from './MazIcon.vue'\n\n defineProps({\n persistent: { type: Boolean, default: false },\n noClose: { type: Boolean, default: false },\n noPadding: { type: Boolean, default: false },\n })\n\n const emits = defineEmits(['update:model-value'])\n\n const closeDialog = (value: boolean) => {\n emits('update:model-value', value)\n }\n</script>\n\n<style lang=\"postcss\" scoped>\n .m-bottom-sheet {\n &__container {\n padding-left: 3rem;\n padding-right: 3rem;\n box-shadow: 0 -5px 20px rgb(0 0 0 / 20%);\n }\n\n &__close {\n @apply maz-absolute !important;\n\n @apply maz-top-4 maz-right-4;\n }\n }\n</style>\n","<template>\n <MazBackDrop\n v-bind=\"$attrs\"\n transition=\"modal-anim\"\n @update:model-value=\"$emit('update:model-value', $event)\"\n >\n <template #default=\"{ close }\">\n <div class=\"m-dialog-layout\">\n <div\n class=\"m-dialog-layout-header\"\n :class=\"{ '--has-title': $slots['title'] || title }\"\n >\n <h2\n v-if=\"$slots['title'] || title\"\n class=\"maz-text-xl maz-font-semibold\"\n >\n <slot name=\"title\">{{ title }}</slot>\n </h2>\n <MazBtn\n color=\"transparent\"\n size=\"mini\"\n class=\"m-dialog-layout-closebtn\"\n @click=\"close\"\n >\n <MazIcon name=\"x\" class=\"maz-cursor-pointer\" />\n </MazBtn>\n </div>\n <div class=\"m-dialog-layout-content\">\n <slot />\n </div>\n <div v-if=\"$slots['footer']\" class=\"m-dialog-layout-footer\">\n <slot name=\"footer\"></slot>\n </div>\n </div>\n </template>\n </MazBackDrop>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent } from 'vue'\n import MazBtn from './MazBtn.vue'\n import MazBackDrop from './MazBackDrop.vue'\n import MazIcon from './MazIcon.vue'\n\n export default defineComponent({\n components: { MazBtn, MazBackDrop, MazIcon },\n inheritAttrs: false,\n props: {\n title: { type: String, default: undefined },\n },\n emits: ['update:model-value'],\n })\n</script>\n\n<style lang=\"postcss\" scoped>\n .m-dialog-layout {\n @apply maz-rounded-lg maz-bg-color;\n\n width: 500px;\n max-width: 95vw;\n\n &-header {\n @apply maz-flex maz-items-center maz-justify-end maz-pt-2 maz-pl-6 maz-pr-2;\n\n &.--has-title {\n @apply maz-justify-between;\n }\n }\n\n &-footer {\n @apply maz-flex maz-items-center maz-justify-end maz-px-6 maz-pb-4;\n }\n\n &-content {\n @apply maz-p-6;\n\n &-icon {\n flex: 0 0 auto;\n }\n }\n\n &-closebtn {\n @apply maz-p-2 !important;\n }\n }\n</style>\n","<template>\n <MazBackDrop\n v-bind=\"$attrs\"\n transition=\"modal-anim\"\n @update:model-value=\"$emit('update:model-value', $event)\"\n >\n <template #default=\"{ close }\">\n <div class=\"m-dialog-layout\">\n <div\n class=\"m-dialog-layout-header\"\n :class=\"{ '--has-title': $slots['title'] || title }\"\n >\n <h2\n v-if=\"$slots['title'] || title\"\n class=\"maz-text-xl maz-font-semibold\"\n >\n <slot name=\"title\">{{ title }}</slot>\n </h2>\n <MazBtn\n color=\"transparent\"\n size=\"mini\"\n class=\"m-dialog-layout-closebtn\"\n @click=\"close\"\n >\n <MazIcon name=\"x\" class=\"maz-cursor-pointer\" />\n </MazBtn>\n </div>\n <div class=\"m-dialog-layout-content\">\n <slot />\n </div>\n <div v-if=\"$slots['footer']\" class=\"m-dialog-layout-footer\">\n <slot name=\"footer\"></slot>\n </div>\n </div>\n </template>\n </MazBackDrop>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent } from 'vue'\n import MazBtn from './MazBtn.vue'\n import MazBackDrop from './MazBackDrop.vue'\n import MazIcon from './MazIcon.vue'\n\n export default defineComponent({\n components: { MazBtn, MazBackDrop, MazIcon },\n inheritAttrs: false,\n props: {\n title: { type: String, default: undefined },\n },\n emits: ['update:model-value'],\n })\n</script>\n\n<style lang=\"postcss\" scoped>\n .m-dialog-layout {\n @apply maz-rounded-lg maz-bg-color;\n\n width: 500px;\n max-width: 95vw;\n\n &-header {\n @apply maz-flex maz-items-center maz-justify-end maz-pt-2 maz-pl-6 maz-pr-2;\n\n &.--has-title {\n @apply maz-justify-between;\n }\n }\n\n &-footer {\n @apply maz-flex maz-items-center maz-justify-end maz-px-6 maz-pb-4;\n }\n\n &-content {\n @apply maz-p-6;\n\n &-icon {\n flex: 0 0 auto;\n }\n }\n\n &-closebtn {\n @apply maz-p-2 !important;\n }\n }\n</style>\n","<template>\n <button\n ref=\"ButtonElement\"\n type=\"button\"\n name=\"maz-dropzone\"\n class=\"maz-dropzone\"\n :style=\"[dropzoneStyle]\"\n >\n <template v-if=\"dropzoneReady\">\n <slot :options=\"dropzoneOptions\">\n <div class=\"dz-message\">\n <slot name=\"icon\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n height=\"2em\"\n width=\"2em\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"maz-dropzone__main-icon maz-text-normal-text\"\n aria-hidden=\"true\"\n >\n <path d=\"M0 0h24v24H0V0z\" fill=\"none\" />\n <path\n d=\"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95C8.08 7.14 9.94 6 12 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11c1.56.1 2.78 1.41 2.78 2.96 0 1.65-1.35 3-3 3zM8 13h2.55v3h2.9v-3H16l-4-4z\"\n />\n </svg>\n </slot>\n <p class=\"maz-my-2 maz-text-normal-text\">\n {{ dropzoneOptions?.dictDefaultMessage }}\n </p>\n <p class=\"maz-my-0 maz-text-muted\">\n {{ dropzoneOptions?.dictFilesDescriptions }}\n </p>\n </div>\n </slot>\n </template>\n <MazSpinner v-else />\n </button>\n</template>\n\n<script lang=\"ts\">\n import {\n computed,\n defineComponent,\n onBeforeUnmount,\n onMounted,\n PropType,\n ref,\n } from 'vue'\n import { DropzoneOptions, DropzoneFile } from 'dropzone'\n import MazSpinner from './../MazSpinner.vue'\n import {\n MazDropzoneInstance,\n MazDropzoneFile,\n MazDropzoneOptions,\n IMazDropzone,\n } from '../types'\n import DropzoneJs from 'dropzone'\n\n const previewTemplate = `<div class=\"dz-preview dz-file-preview maz-flex-1\">\n <div class=\"dz-image\">\n <div data-dz-thumbnail-bg></div>\n </div>\n <div class=\"dz-details\">\n <div class=\"dz-filename\"><span data-dz-name></span></div>\n <div class=\"dz-size\"><span data-dz-size></span></div>\n </div>\n <div class=\"dz-progress\">\n <span class=\"dz-upload\" data-dz-uploadprogress></span>\n </div>\n <div class=\"dz-success-mark\">\n <svg class=\"material-icons\" xmlns=\"http://www.w3.org/2000/svg\" height=\"6rem\" viewBox=\"0 0 24 24\" width=\"6rem\" fill=\"currentColor\"><path d=\"M0 0h24v24H0V0z\" fill=\"none\"/><path d=\"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z\"/></svg>\n </div>\n <div class=\"dz-error-mark\">\n <svg class=\"material-icons\" xmlns=\"http://www.w3.org/2000/svg\" height=\"6rem\" viewBox=\"0 0 24 24\" width=\"6rem\" fill=\"currentColor\"><path d=\"M11 15h2v2h-2v-2zm0-8h2v6h-2V7zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z\"/></svg>\n </div>\n</div>`\n\n export default defineComponent({\n name: 'MazDropzone',\n components: { MazSpinner },\n props: {\n options: { type: Object as PropType<MazDropzoneOptions>, required: true },\n height: {\n type: [Number, String] as PropType<number | string>,\n default: '245px',\n },\n width: {\n type: [Number, String] as PropType<number | string>,\n default: '100%',\n },\n noDestroyOnUnmount: { type: Boolean, default: false },\n },\n emits: [\n 'thumbnail',\n 'error',\n 'drop',\n 'dragstart',\n 'dragend',\n 'dragenter',\n 'dragover',\n 'dragleave',\n 'paste',\n 'addedfile',\n 'addedfiles',\n 'removedfile',\n 'success',\n 'processing',\n 'processingmultiple',\n 'uploadprogress',\n 'totaluploadprogress',\n 'sending',\n 'sendingmultiple',\n 'canceled',\n 'canceledmultiple',\n 'complete',\n 'completemultiple',\n 'maxfilesexceeded',\n 'maxfilesreached',\n 'queuecomplete',\n 'reset',\n ],\n setup(props, { emit }) {\n const ButtonElement = ref<HTMLButtonElement>()\n const dropzoneReady = ref(false)\n let dropzone: IMazDropzone\n const dropzoneOptions = ref<MazDropzoneOptions>()\n\n const dropzoneStyle = computed(() => ({\n width: Number.isInteger(props.width) ? `${props.width}px` : props.width,\n height: Number.isInteger(props.height)\n ? `${props.height}px`\n : props.height,\n }))\n\n const thumbnail: DropzoneOptions['thumbnail'] = (\n file: MazDropzoneFile,\n dataUrl,\n ) => {\n emit('thumbnail', { file, dataUrl })\n let thumbnailElement: HTMLImageElement\n file.previewElement.classList.remove('dz-file-preview')\n const ref = file.previewElement.querySelectorAll(\n '[data-dz-thumbnail-bg]',\n )\n ref.forEach((r: Element) => {\n thumbnailElement = r as HTMLImageElement\n thumbnailElement.alt = file.name\n thumbnailElement.style.backgroundImage = `url('${dataUrl}')`\n })\n\n if (file.status === 'success') dropzone.emit('complete', file)\n }\n\n const error: DropzoneOptions['error'] = (file, message, xhr) => {\n emit('error', { file, message, xhr })\n if (dropzone.options.autoRemoveOnError) {\n setTimeout(() => dropzone.removeFile(file), 3000)\n }\n }\n\n const errorMultiple: DropzoneOptions['errormultiple'] = (\n files,\n message,\n xhr,\n ) => {\n emit('error', { files, message, xhr })\n if (dropzone.options.autoRemoveOnError)\n setTimeout(() => {\n files.forEach((file) => dropzone.removeFile(file))\n }, 3000)\n }\n\n onMounted(() => {\n const defaultOptions: MazDropzoneOptions = {\n parallelUploads: props.options.maxFiles,\n previewTemplate,\n addRemoveLinks: true,\n }\n\n if (ButtonElement.value) {\n dropzone = new DropzoneJs(ButtonElement.value, {\n ...defaultOptions,\n ...props.options,\n })\n\n if (dropzone) {\n dropzoneOptions.value = dropzone.options as MazDropzoneOptions\n\n dropzoneReady.value = true\n\n /**\n * Dropzone Events\n */\n\n dropzone.on('thumbnail', thumbnail)\n dropzone.on('error', error)\n dropzone.on('errormultiple', errorMultiple)\n dropzone.on('drop', (e: DragEvent) => emit('drop', e))\n dropzone.on('dragstart', (e: DragEvent) => emit('dragstart', e))\n dropzone.on('dragend', (e: DragEvent) => emit('dragend', e))\n dropzone.on('dragenter', (e: DragEvent) => emit('dragenter', e))\n dropzone.on('dragover', (e: DragEvent) => emit('dragover', e))\n dropzone.on('dragleave', (e: DragEvent) => emit('dragleave', e))\n dropzone.on('paste', (e: DragEvent) => emit('paste', e))\n dropzone.on('addedfile', (file: DropzoneFile) =>\n emit('addedfile', file),\n )\n dropzone.on('addedfiles', (files: DropzoneFile[]) =>\n emit('addedfiles', files),\n )\n dropzone.on('removedfile', (file: DropzoneFile) =>\n emit('removedfile', file),\n )\n dropzone.on(\n 'success',\n (\n file: DropzoneFile,\n response: Record<string, unknown> | string,\n ) => emit('success', { file, response }),\n )\n dropzone.on(\n 'successmultiple',\n (files: DropzoneFile[], responseText: string) =>\n emit('success', { files, responseText }),\n )\n dropzone.on('processing', (file: DropzoneFile) =>\n emit('processing', file),\n )\n dropzone.on('processingmultiple', (files: DropzoneFile[]) =>\n emit('processingmultiple', files),\n )\n dropzone.on(\n 'uploadprogress',\n (file: DropzoneFile, progress: number, bytesSent: number) =>\n emit('uploadprogress', { file, progress, bytesSent }),\n )\n dropzone.on(\n 'totaluploadprogress',\n (\n totalProgress: number,\n totalBytes: number,\n totalBytesSent: number,\n ) =>\n emit('totaluploadprogress', {\n totalProgress,\n totalBytes,\n totalBytesSent,\n }),\n )\n dropzone.on(\n 'sending',\n (file: DropzoneFile, xhr: XMLHttpRequest, formData: FormData) =>\n emit('sending', { file, xhr, formData }),\n )\n dropzone.on(\n 'sendingmultiple',\n (\n files: DropzoneFile[],\n xhr: XMLHttpRequest,\n formData: FormData,\n ) => emit('sendingmultiple', { files, xhr, formData }),\n )\n dropzone.on('canceled', (file: DropzoneFile) =>\n emit('canceled', file),\n )\n dropzone.on('canceledmultiple', (files: DropzoneFile[]) =>\n emit('canceledmultiple', files),\n )\n dropzone.on('complete', (file: DropzoneFile) =>\n emit('complete', file),\n )\n dropzone.on('completemultiple', (files: DropzoneFile[]) =>\n emit('completemultiple', files),\n )\n dropzone.on('maxfilesexceeded', (file: DropzoneFile) =>\n emit('maxfilesexceeded', file),\n )\n dropzone.on('maxfilesreached', (files: DropzoneFile[]) =>\n emit('maxfilesreached', files),\n )\n dropzone.on('queuecomplete', () => {\n if (getAcceptedFiles().every((file) => file.manuallyAdded)) return\n emit('queuecomplete')\n })\n dropzone.on('reset', () => emit('reset'))\n }\n }\n })\n\n const setOption = (option: string, value: any): MazDropzoneOptions => {\n dropzone.options = {\n ...dropzone.options,\n [option]: value,\n }\n return dropzone.options\n }\n const manuallyAddFile: MazDropzoneInstance['manuallyAddFile'] = (\n file,\n fileUrl,\n ) => {\n dropzone.emit('addedfile', file)\n dropzone.emit('thumbnail', file, fileUrl)\n dropzone.files.push(file)\n }\n const removeAllFiles: MazDropzoneInstance['removeAllFiles'] = (\n shouldRemoveAllFiles,\n ) => dropzone.removeAllFiles(shouldRemoveAllFiles)\n const processQueue: MazDropzoneInstance['processQueue'] = () =>\n dropzone.processQueue()\n const destroy: MazDropzoneInstance['destroy'] = () => dropzone.destroy()\n const disable: MazDropzoneInstance['disable'] = () => dropzone.disable()\n const enable: MazDropzoneInstance['enable'] = () => dropzone.enable()\n const accept: MazDropzoneInstance['accept'] = (file, done) =>\n dropzone.accept(file, done)\n const addFile: MazDropzoneInstance['addFile'] = (file) =>\n dropzone.addFile(file)\n const resizeImage: MazDropzoneInstance['resizeImage'] = (\n file,\n width,\n height,\n resizeMethod,\n callback,\n ) => dropzone.resizeImage(file, width, height, resizeMethod, callback)\n const cancelUpload: MazDropzoneInstance['cancelUpload'] = (file) =>\n dropzone.cancelUpload(file)\n const getAcceptedFiles: MazDropzoneInstance['getAcceptedFiles'] = () =>\n dropzone.getAcceptedFiles() as MazDropzoneFile[]\n const getRejectedFiles: MazDropzoneInstance['getRejectedFiles'] = () =>\n dropzone.getRejectedFiles() as MazDropzoneFile[]\n const getFilesWithStatus: MazDropzoneInstance['getFilesWithStatus'] =\n () => dropzone.getFilesWithStatus(status)\n const getQueuedFiles: MazDropzoneInstance['getQueuedFiles'] = () =>\n dropzone.getQueuedFiles()\n const getUploadingFiles: MazDropzoneInstance['getUploadingFiles'] = () =>\n dropzone.getUploadingFiles()\n const getAddedFiles: MazDropzoneInstance['getAddedFiles'] = () =>\n dropzone.getAddedFiles()\n const getActiveFiles: MazDropzoneInstance['getActiveFiles'] = () =>\n dropzone.getActiveFiles()\n\n onBeforeUnmount(() => {\n if (!props.noDestroyOnUnmount) dropzone.destroy()\n })\n\n return {\n ButtonElement,\n dropzoneReady,\n dropzoneOptions,\n dropzoneStyle,\n setOption,\n manuallyAddFile,\n removeAllFiles,\n processQueue,\n destroy,\n disable,\n enable,\n accept,\n addFile,\n resizeImage,\n cancelUpload,\n getAcceptedFiles,\n getRejectedFiles,\n getFilesWithStatus,\n getQueuedFiles,\n getUploadingFiles,\n getAddedFiles,\n getActiveFiles,\n }\n },\n })\n</script>\n\n<style lang=\"postcss\">\n @keyframes passing-through {\n 0% {\n opacity: 0;\n transform: translateY(40px);\n }\n\n 30%,\n 70% {\n opacity: 1;\n transform: translateY(0);\n }\n\n 100% {\n opacity: 0;\n transform: translateY(-40px);\n }\n }\n @keyframes slide-in {\n 0% {\n opacity: 0;\n transform: translateY(40px);\n }\n\n 30% {\n opacity: 1;\n transform: translateY(0);\n }\n }\n @keyframes pulse {\n 0% {\n transform: scale(1);\n }\n\n 10% {\n transform: scale(1.1);\n }\n\n 20% {\n transform: scale(1);\n }\n }\n\n .maz-dropzone {\n @apply maz-outline-none maz-m-0 maz-inline-flex maz-items-center maz-justify-center maz-overflow-auto maz-rounded-lg maz-border maz-border-dashed maz-border-color-light\n maz-bg-color maz-p-4 maz-text-center\n maz-transition-all maz-duration-200 maz-ease-out;\n\n min-height: 245px;\n\n &:not(.dz-clickable) {\n @apply maz-bg-color-light;\n }\n\n &.dz-clickable,\n &.dz-clickable.dz-message,\n &.dz-clickable.dz-message * {\n @apply maz-cursor-pointer;\n }\n\n & .dz-message {\n @apply maz-flex maz-flex-col maz-items-center maz-justify-center maz-text-center;\n }\n\n &.dz-clickable {\n &:hover,\n &:focus {\n @apply maz-border-color-lighter maz-bg-color-light;\n\n & .maz-dropzone__main-icon {\n @apply maz-text-primary maz-transition-all maz-duration-200 maz-ease-out;\n }\n }\n }\n\n &.dz-started .dz-message {\n @apply maz-hidden;\n }\n\n &.dz-drag-hover {\n @apply maz-border-solid;\n\n & .dz-message {\n @apply maz-opacity-50;\n }\n }\n\n & .dz-message .dz-button {\n @apply maz-cursor-pointer maz-border-none maz-bg-transparent maz-p-0;\n }\n\n & .dz-details {\n @apply maz-absolute maz-inset-0 maz-z-20 maz-flex maz-flex-col maz-items-center\n maz-justify-center maz-rounded-lg maz-py-8 maz-px-4 maz-text-center maz-leading-10 maz-text-white maz-opacity-0;\n\n background-color: var(--maz-color-primary-alpha);\n transition: opacity 0.2s linear;\n\n & .dz-size {\n & span {\n @apply maz-text-base maz-text-white;\n }\n }\n\n & .dz-filename {\n width: 100%;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n\n span {\n color: white;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n }\n }\n }\n\n & .dz-image {\n overflow: hidden;\n position: relative;\n display: block;\n z-index: 10;\n width: 100%;\n height: 100%;\n margin: 0 auto;\n\n @apply maz-rounded-lg maz-border-color-lighter;\n\n & img {\n display: block;\n }\n\n & > div[data-dz-thumbnail-bg] {\n width: inherit;\n height: inherit;\n background-size: cover;\n background-repeat: no-repeat;\n background-position: center;\n }\n }\n\n & .dz-preview {\n position: relative;\n display: inline-block;\n vertical-align: top;\n margin: 0;\n min-height: auto;\n height: 100%;\n background: transparent;\n max-width: 200px;\n overflow: hidden;\n\n &:not(:last-child) {\n margin-right: 0.5rem;\n }\n\n &.dz-file-preview {\n & .dz-image {\n border-radius: 20px;\n background: #999;\n background: linear-gradient(to bottom, #eee, #ddd);\n }\n\n & .dz-details {\n opacity: 1;\n }\n }\n\n &.dz-image-preview {\n background-color: transparent;\n\n & .dz-details {\n transition: opacity 0.2s linear;\n }\n }\n\n & .dz-remove {\n text-align: center;\n display: block;\n cursor: pointer;\n position: absolute;\n z-index: 30;\n color: white;\n top: inherit;\n left: 5px;\n right: 5px;\n bottom: 5px;\n padding: 10px 5px;\n border: 2px white solid;\n text-decoration: none;\n text-transform: uppercase;\n font-size: 0.8rem;\n opacity: 0;\n transition: all 300ms ease-in-out;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n\n @apply maz-rounded-lg;\n\n &:hover {\n @apply maz-bg-white maz-text-primary;\n }\n }\n\n &:hover {\n z-index: 1000;\n\n & .dz-details,\n & .dz-remove {\n opacity: 1;\n }\n\n & .dz-image img {\n transform: scale(1.05, 1.05);\n filter: blur(8px);\n }\n }\n\n & .dz-error-message {\n pointer-events: none;\n z-index: 1000;\n position: absolute;\n display: block;\n display: none;\n opacity: 0;\n transition: opacity 0.3s ease;\n border-radius: 8px;\n top: 130px;\n background: #be2626;\n background: linear-gradient(to bottom, #be2626, #a92222);\n padding: 0.5em 1.2em;\n color: white;\n margin-left: auto;\n margin-right: auto;\n left: 0;\n width: 100%;\n text-align: center;\n }\n\n & .dz-success-mark,\n & .dz-error-mark {\n pointer-events: none;\n opacity: 0;\n z-index: 500;\n position: absolute;\n display: block;\n margin-left: auto;\n margin-top: auto;\n width: 100%;\n top: 30%;\n left: 0;\n\n @apply maz-flex maz-flex-col maz-items-center maz-justify-center;\n\n & .material-icons {\n background-color: var(--maz-color-success-alpha);\n border-radius: 50%;\n color: white;\n font-size: 70px;\n }\n }\n\n & .dz-error-mark {\n & .material-icons {\n background-color: var(--maz-color-danger-alpha);\n }\n }\n\n &.dz-success .dz-success-mark {\n animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);\n }\n\n &.dz-error {\n & .dz-error-message {\n display: block;\n }\n\n & .dz-error-mark {\n opacity: 1;\n animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);\n }\n\n & .dz-details {\n background-color: var(--maz-color-danger-alpha);\n }\n\n &:hover .dz-error-message {\n opacity: 1;\n pointer-events: auto;\n }\n\n & .dz-remove:hover {\n @apply maz-text-danger;\n }\n }\n\n & .dz-progress {\n opacity: 1;\n z-index: 1000;\n pointer-events: none;\n position: absolute;\n height: 1rem;\n top: 50%;\n margin-top: -0.5rem;\n transform: scale(1);\n overflow: visible;\n width: 50%;\n left: 25%;\n\n @apply maz-rounded-full maz-bg-gray-100;\n\n & .dz-upload {\n position: absolute;\n transition: width 300ms ease-in-out;\n\n @apply maz-absolute maz-inset-0 maz-w-0 maz-rounded-full maz-bg-success;\n }\n\n & .progress-title {\n display: inline-block;\n position: relative;\n top: -30px;\n }\n }\n\n &.dz-processing .dz-progress {\n opacity: 1;\n transition: all 0.2s linear;\n }\n\n &.dz-complete .dz-progress {\n opacity: 0;\n transition: opacity 0.4s ease-in;\n }\n\n &:not(.dz-processing) .dz-progress {\n animation: pulse 6s ease infinite;\n }\n }\n }\n</style>\n","export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}","<template>\n <button\n ref=\"ButtonElement\"\n type=\"button\"\n name=\"maz-dropzone\"\n class=\"maz-dropzone\"\n :style=\"[dropzoneStyle]\"\n >\n <template v-if=\"dropzoneReady\">\n <slot :options=\"dropzoneOptions\">\n <div class=\"dz-message\">\n <slot name=\"icon\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n height=\"2em\"\n width=\"2em\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"maz-dropzone__main-icon maz-text-normal-text\"\n aria-hidden=\"true\"\n >\n <path d=\"M0 0h24v24H0V0z\" fill=\"none\" />\n <path\n d=\"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95C8.08 7.14 9.94 6 12 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11c1.56.1 2.78 1.41 2.78 2.96 0 1.65-1.35 3-3 3zM8 13h2.55v3h2.9v-3H16l-4-4z\"\n />\n </svg>\n </slot>\n <p class=\"maz-my-2 maz-text-normal-text\">\n {{ dropzoneOptions?.dictDefaultMessage }}\n </p>\n <p class=\"maz-my-0 maz-text-muted\">\n {{ dropzoneOptions?.dictFilesDescriptions }}\n </p>\n </div>\n </slot>\n </template>\n <MazSpinner v-else />\n </button>\n</template>\n\n<script lang=\"ts\">\n import {\n computed,\n defineComponent,\n onBeforeUnmount,\n onMounted,\n PropType,\n ref,\n } from 'vue'\n import { DropzoneOptions, DropzoneFile } from 'dropzone'\n import MazSpinner from './../MazSpinner.vue'\n import {\n MazDropzoneInstance,\n MazDropzoneFile,\n MazDropzoneOptions,\n IMazDropzone,\n } from '../types'\n import DropzoneJs from 'dropzone'\n\n const previewTemplate = `<div class=\"dz-preview dz-file-preview maz-flex-1\">\n <div class=\"dz-image\">\n <div data-dz-thumbnail-bg></div>\n </div>\n <div class=\"dz-details\">\n <div class=\"dz-filename\"><span data-dz-name></span></div>\n <div class=\"dz-size\"><span data-dz-size></span></div>\n </div>\n <div class=\"dz-progress\">\n <span class=\"dz-upload\" data-dz-uploadprogress></span>\n </div>\n <div class=\"dz-success-mark\">\n <svg class=\"material-icons\" xmlns=\"http://www.w3.org/2000/svg\" height=\"6rem\" viewBox=\"0 0 24 24\" width=\"6rem\" fill=\"currentColor\"><path d=\"M0 0h24v24H0V0z\" fill=\"none\"/><path d=\"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z\"/></svg>\n </div>\n <div class=\"dz-error-mark\">\n <svg class=\"material-icons\" xmlns=\"http://www.w3.org/2000/svg\" height=\"6rem\" viewBox=\"0 0 24 24\" width=\"6rem\" fill=\"currentColor\"><path d=\"M11 15h2v2h-2v-2zm0-8h2v6h-2V7zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z\"/></svg>\n </div>\n</div>`\n\n export default defineComponent({\n name: 'MazDropzone',\n components: { MazSpinner },\n props: {\n options: { type: Object as PropType<MazDropzoneOptions>, required: true },\n height: {\n type: [Number, String] as PropType<number | string>,\n default: '245px',\n },\n width: {\n type: [Number, String] as PropType<number | string>,\n default: '100%',\n },\n noDestroyOnUnmount: { type: Boolean, default: false },\n },\n emits: [\n 'thumbnail',\n 'error',\n 'drop',\n 'dragstart',\n 'dragend',\n 'dragenter',\n 'dragover',\n 'dragleave',\n 'paste',\n 'addedfile',\n 'addedfiles',\n 'removedfile',\n 'success',\n 'processing',\n 'processingmultiple',\n 'uploadprogress',\n 'totaluploadprogress',\n 'sending',\n 'sendingmultiple',\n 'canceled',\n 'canceledmultiple',\n 'complete',\n 'completemultiple',\n 'maxfilesexceeded',\n 'maxfilesreached',\n 'queuecomplete',\n 'reset',\n ],\n setup(props, { emit }) {\n const ButtonElement = ref<HTMLButtonElement>()\n const dropzoneReady = ref(false)\n let dropzone: IMazDropzone\n const dropzoneOptions = ref<MazDropzoneOptions>()\n\n const dropzoneStyle = computed(() => ({\n width: Number.isInteger(props.width) ? `${props.width}px` : props.width,\n height: Number.isInteger(props.height)\n ? `${props.height}px`\n : props.height,\n }))\n\n const thumbnail: DropzoneOptions['thumbnail'] = (\n file: MazDropzoneFile,\n dataUrl,\n ) => {\n emit('thumbnail', { file, dataUrl })\n let thumbnailElement: HTMLImageElement\n file.previewElement.classList.remove('dz-file-preview')\n const ref = file.previewElement.querySelectorAll(\n '[data-dz-thumbnail-bg]',\n )\n ref.forEach((r: Element) => {\n thumbnailElement = r as HTMLImageElement\n thumbnailElement.alt = file.name\n thumbnailElement.style.backgroundImage = `url('${dataUrl}')`\n })\n\n if (file.status === 'success') dropzone.emit('complete', file)\n }\n\n const error: DropzoneOptions['error'] = (file, message, xhr) => {\n emit('error', { file, message, xhr })\n if (dropzone.options.autoRemoveOnError) {\n setTimeout(() => dropzone.removeFile(file), 3000)\n }\n }\n\n const errorMultiple: DropzoneOptions['errormultiple'] = (\n files,\n message,\n xhr,\n ) => {\n emit('error', { files, message, xhr })\n if (dropzone.options.autoRemoveOnError)\n setTimeout(() => {\n files.forEach((file) => dropzone.removeFile(file))\n }, 3000)\n }\n\n onMounted(() => {\n const defaultOptions: MazDropzoneOptions = {\n parallelUploads: props.options.maxFiles,\n previewTemplate,\n addRemoveLinks: true,\n }\n\n if (ButtonElement.value) {\n dropzone = new DropzoneJs(ButtonElement.value, {\n ...defaultOptions,\n ...props.options,\n })\n\n if (dropzone) {\n dropzoneOptions.value = dropzone.options as MazDropzoneOptions\n\n dropzoneReady.value = true\n\n /**\n * Dropzone Events\n */\n\n dropzone.on('thumbnail', thumbnail)\n dropzone.on('error', error)\n dropzone.on('errormultiple', errorMultiple)\n dropzone.on('drop', (e: DragEvent) => emit('drop', e))\n dropzone.on('dragstart', (e: DragEvent) => emit('dragstart', e))\n dropzone.on('dragend', (e: DragEvent) => emit('dragend', e))\n dropzone.on('dragenter', (e: DragEvent) => emit('dragenter', e))\n dropzone.on('dragover', (e: DragEvent) => emit('dragover', e))\n dropzone.on('dragleave', (e: DragEvent) => emit('dragleave', e))\n dropzone.on('paste', (e: DragEvent) => emit('paste', e))\n dropzone.on('addedfile', (file: DropzoneFile) =>\n emit('addedfile', file),\n )\n dropzone.on('addedfiles', (files: DropzoneFile[]) =>\n emit('addedfiles', files),\n )\n dropzone.on('removedfile', (file: DropzoneFile) =>\n emit('removedfile', file),\n )\n dropzone.on(\n 'success',\n (\n file: DropzoneFile,\n response: Record<string, unknown> | string,\n ) => emit('success', { file, response }),\n )\n dropzone.on(\n 'successmultiple',\n (files: DropzoneFile[], responseText: string) =>\n emit('success', { files, responseText }),\n )\n dropzone.on('processing', (file: DropzoneFile) =>\n emit('processing', file),\n )\n dropzone.on('processingmultiple', (files: DropzoneFile[]) =>\n emit('processingmultiple', files),\n )\n dropzone.on(\n 'uploadprogress',\n (file: DropzoneFile, progress: number, bytesSent: number) =>\n emit('uploadprogress', { file, progress, bytesSent }),\n )\n dropzone.on(\n 'totaluploadprogress',\n (\n totalProgress: number,\n totalBytes: number,\n totalBytesSent: number,\n ) =>\n emit('totaluploadprogress', {\n totalProgress,\n totalBytes,\n totalBytesSent,\n }),\n )\n dropzone.on(\n 'sending',\n (file: DropzoneFile, xhr: XMLHttpRequest, formData: FormData) =>\n emit('sending', { file, xhr, formData }),\n )\n dropzone.on(\n 'sendingmultiple',\n (\n files: DropzoneFile[],\n xhr: XMLHttpRequest,\n formData: FormData,\n ) => emit('sendingmultiple', { files, xhr, formData }),\n )\n dropzone.on('canceled', (file: DropzoneFile) =>\n emit('canceled', file),\n )\n dropzone.on('canceledmultiple', (files: DropzoneFile[]) =>\n emit('canceledmultiple', files),\n )\n dropzone.on('complete', (file: DropzoneFile) =>\n emit('complete', file),\n )\n dropzone.on('completemultiple', (files: DropzoneFile[]) =>\n emit('completemultiple', files),\n )\n dropzone.on('maxfilesexceeded', (file: DropzoneFile) =>\n emit('maxfilesexceeded', file),\n )\n dropzone.on('maxfilesreached', (files: DropzoneFile[]) =>\n emit('maxfilesreached', files),\n )\n dropzone.on('queuecomplete', () => {\n if (getAcceptedFiles().every((file) => file.manuallyAdded)) return\n emit('queuecomplete')\n })\n dropzone.on('reset', () => emit('reset'))\n }\n }\n })\n\n const setOption = (option: string, value: any): MazDropzoneOptions => {\n dropzone.options = {\n ...dropzone.options,\n [option]: value,\n }\n return dropzone.options\n }\n const manuallyAddFile: MazDropzoneInstance['manuallyAddFile'] = (\n file,\n fileUrl,\n ) => {\n dropzone.emit('addedfile', file)\n dropzone.emit('thumbnail', file, fileUrl)\n dropzone.files.push(file)\n }\n const removeAllFiles: MazDropzoneInstance['removeAllFiles'] = (\n shouldRemoveAllFiles,\n ) => dropzone.removeAllFiles(shouldRemoveAllFiles)\n const processQueue: MazDropzoneInstance['processQueue'] = () =>\n dropzone.processQueue()\n const destroy: MazDropzoneInstance['destroy'] = () => dropzone.destroy()\n const disable: MazDropzoneInstance['disable'] = () => dropzone.disable()\n const enable: MazDropzoneInstance['enable'] = () => dropzone.enable()\n const accept: MazDropzoneInstance['accept'] = (file, done) =>\n dropzone.accept(file, done)\n const addFile: MazDropzoneInstance['addFile'] = (file) =>\n dropzone.addFile(file)\n const resizeImage: MazDropzoneInstance['resizeImage'] = (\n file,\n width,\n height,\n resizeMethod,\n callback,\n ) => dropzone.resizeImage(file, width, height, resizeMethod, callback)\n const cancelUpload: MazDropzoneInstance['cancelUpload'] = (file) =>\n dropzone.cancelUpload(file)\n const getAcceptedFiles: MazDropzoneInstance['getAcceptedFiles'] = () =>\n dropzone.getAcceptedFiles() as MazDropzoneFile[]\n const getRejectedFiles: MazDropzoneInstance['getRejectedFiles'] = () =>\n dropzone.getRejectedFiles() as MazDropzoneFile[]\n const getFilesWithStatus: MazDropzoneInstance['getFilesWithStatus'] =\n () => dropzone.getFilesWithStatus(status)\n const getQueuedFiles: MazDropzoneInstance['getQueuedFiles'] = () =>\n dropzone.getQueuedFiles()\n const getUploadingFiles: MazDropzoneInstance['getUploadingFiles'] = () =>\n dropzone.getUploadingFiles()\n const getAddedFiles: MazDropzoneInstance['getAddedFiles'] = () =>\n dropzone.getAddedFiles()\n const getActiveFiles: MazDropzoneInstance['getActiveFiles'] = () =>\n dropzone.getActiveFiles()\n\n onBeforeUnmount(() => {\n if (!props.noDestroyOnUnmount) dropzone.destroy()\n })\n\n return {\n ButtonElement,\n dropzoneReady,\n dropzoneOptions,\n dropzoneStyle,\n setOption,\n manuallyAddFile,\n removeAllFiles,\n processQueue,\n destroy,\n disable,\n enable,\n accept,\n addFile,\n resizeImage,\n cancelUpload,\n getAcceptedFiles,\n getRejectedFiles,\n getFilesWithStatus,\n getQueuedFiles,\n getUploadingFiles,\n getAddedFiles,\n getActiveFiles,\n }\n },\n })\n</script>\n\n<style lang=\"postcss\">\n @keyframes passing-through {\n 0% {\n opacity: 0;\n transform: translateY(40px);\n }\n\n 30%,\n 70% {\n opacity: 1;\n transform: translateY(0);\n }\n\n 100% {\n opacity: 0;\n transform: translateY(-40px);\n }\n }\n @keyframes slide-in {\n 0% {\n opacity: 0;\n transform: translateY(40px);\n }\n\n 30% {\n opacity: 1;\n transform: translateY(0);\n }\n }\n @keyframes pulse {\n 0% {\n transform: scale(1);\n }\n\n 10% {\n transform: scale(1.1);\n }\n\n 20% {\n transform: scale(1);\n }\n }\n\n .maz-dropzone {\n @apply maz-outline-none maz-m-0 maz-inline-flex maz-items-center maz-justify-center maz-overflow-auto maz-rounded-lg maz-border maz-border-dashed maz-border-color-light\n maz-bg-color maz-p-4 maz-text-center\n maz-transition-all maz-duration-200 maz-ease-out;\n\n min-height: 245px;\n\n &:not(.dz-clickable) {\n @apply maz-bg-color-light;\n }\n\n &.dz-clickable,\n &.dz-clickable.dz-message,\n &.dz-clickable.dz-message * {\n @apply maz-cursor-pointer;\n }\n\n & .dz-message {\n @apply maz-flex maz-flex-col maz-items-center maz-justify-center maz-text-center;\n }\n\n &.dz-clickable {\n &:hover,\n &:focus {\n @apply maz-border-color-lighter maz-bg-color-light;\n\n & .maz-dropzone__main-icon {\n @apply maz-text-primary maz-transition-all maz-duration-200 maz-ease-out;\n }\n }\n }\n\n &.dz-started .dz-message {\n @apply maz-hidden;\n }\n\n &.dz-drag-hover {\n @apply maz-border-solid;\n\n & .dz-message {\n @apply maz-opacity-50;\n }\n }\n\n & .dz-message .dz-button {\n @apply maz-cursor-pointer maz-border-none maz-bg-transparent maz-p-0;\n }\n\n & .dz-details {\n @apply maz-absolute maz-inset-0 maz-z-20 maz-flex maz-flex-col maz-items-center\n maz-justify-center maz-rounded-lg maz-py-8 maz-px-4 maz-text-center maz-leading-10 maz-text-white maz-opacity-0;\n\n background-color: var(--maz-color-primary-alpha);\n transition: opacity 0.2s linear;\n\n & .dz-size {\n & span {\n @apply maz-text-base maz-text-white;\n }\n }\n\n & .dz-filename {\n width: 100%;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n\n span {\n color: white;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n }\n }\n }\n\n & .dz-image {\n overflow: hidden;\n position: relative;\n display: block;\n z-index: 10;\n width: 100%;\n height: 100%;\n margin: 0 auto;\n\n @apply maz-rounded-lg maz-border-color-lighter;\n\n & img {\n display: block;\n }\n\n & > div[data-dz-thumbnail-bg] {\n width: inherit;\n height: inherit;\n background-size: cover;\n background-repeat: no-repeat;\n background-position: center;\n }\n }\n\n & .dz-preview {\n position: relative;\n display: inline-block;\n vertical-align: top;\n margin: 0;\n min-height: auto;\n height: 100%;\n background: transparent;\n max-width: 200px;\n overflow: hidden;\n\n &:not(:last-child) {\n margin-right: 0.5rem;\n }\n\n &.dz-file-preview {\n & .dz-image {\n border-radius: 20px;\n background: #999;\n background: linear-gradient(to bottom, #eee, #ddd);\n }\n\n & .dz-details {\n opacity: 1;\n }\n }\n\n &.dz-image-preview {\n background-color: transparent;\n\n & .dz-details {\n transition: opacity 0.2s linear;\n }\n }\n\n & .dz-remove {\n text-align: center;\n display: block;\n cursor: pointer;\n position: absolute;\n z-index: 30;\n color: white;\n top: inherit;\n left: 5px;\n right: 5px;\n bottom: 5px;\n padding: 10px 5px;\n border: 2px white solid;\n text-decoration: none;\n text-transform: uppercase;\n font-size: 0.8rem;\n opacity: 0;\n transition: all 300ms ease-in-out;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n\n @apply maz-rounded-lg;\n\n &:hover {\n @apply maz-bg-white maz-text-primary;\n }\n }\n\n &:hover {\n z-index: 1000;\n\n & .dz-details,\n & .dz-remove {\n opacity: 1;\n }\n\n & .dz-image img {\n transform: scale(1.05, 1.05);\n filter: blur(8px);\n }\n }\n\n & .dz-error-message {\n pointer-events: none;\n z-index: 1000;\n position: absolute;\n display: block;\n display: none;\n opacity: 0;\n transition: opacity 0.3s ease;\n border-radius: 8px;\n top: 130px;\n background: #be2626;\n background: linear-gradient(to bottom, #be2626, #a92222);\n padding: 0.5em 1.2em;\n color: white;\n margin-left: auto;\n margin-right: auto;\n left: 0;\n width: 100%;\n text-align: center;\n }\n\n & .dz-success-mark,\n & .dz-error-mark {\n pointer-events: none;\n opacity: 0;\n z-index: 500;\n position: absolute;\n display: block;\n margin-left: auto;\n margin-top: auto;\n width: 100%;\n top: 30%;\n left: 0;\n\n @apply maz-flex maz-flex-col maz-items-center maz-justify-center;\n\n & .material-icons {\n background-color: var(--maz-color-success-alpha);\n border-radius: 50%;\n color: white;\n font-size: 70px;\n }\n }\n\n & .dz-error-mark {\n & .material-icons {\n background-color: var(--maz-color-danger-alpha);\n }\n }\n\n &.dz-success .dz-success-mark {\n animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);\n }\n\n &.dz-error {\n & .dz-error-message {\n display: block;\n }\n\n & .dz-error-mark {\n opacity: 1;\n animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);\n }\n\n & .dz-details {\n background-color: var(--maz-color-danger-alpha);\n }\n\n &:hover .dz-error-message {\n opacity: 1;\n pointer-events: auto;\n }\n\n & .dz-remove:hover {\n @apply maz-text-danger;\n }\n }\n\n & .dz-progress {\n opacity: 1;\n z-index: 1000;\n pointer-events: none;\n position: absolute;\n height: 1rem;\n top: 50%;\n margin-top: -0.5rem;\n transform: scale(1);\n overflow: visible;\n width: 50%;\n left: 25%;\n\n @apply maz-rounded-full maz-bg-gray-100;\n\n & .dz-upload {\n position: absolute;\n transition: width 300ms ease-in-out;\n\n @apply maz-absolute maz-inset-0 maz-w-0 maz-rounded-full maz-bg-success;\n }\n\n & .progress-title {\n display: inline-block;\n position: relative;\n top: -30px;\n }\n }\n\n &.dz-processing .dz-progress {\n opacity: 1;\n transition: all 0.2s linear;\n }\n\n &.dz-complete .dz-progress {\n opacity: 0;\n transition: opacity 0.4s ease-in;\n }\n\n &:not(.dz-processing) .dz-progress {\n animation: pulse 6s ease infinite;\n }\n }\n }\n</style>\n","import { App, Directive, Plugin } from 'vue'\n\nconst style = `\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}`\n\ntype DefaultZoomImgOptions = {\n alt: string\n disabled?: boolean\n scale?: boolean\n blur?: boolean\n}\n\ntype ZoomImgOptions = {\n src: string\n alt: string\n disabled?: boolean\n scale?: boolean\n blur?: boolean\n}\ninterface BindingData {\n value: string | ZoomImgOptions\n}\n\nconst svgs = {\n close:\n '<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>',\n 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>',\n previous:\n '<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>',\n spinner:\n '<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>',\n} as { [key: string]: string }\n\nclass VueZoomImg {\n private options: ZoomImgOptions\n private loader: HTMLDivElement\n private wrapper: HTMLDivElement\n private img: HTMLImageElement\n private keydownHandler: (e: KeyboardEvent) => void\n private onImgLoadedCallback: EventListener\n private buttonsAdded: boolean\n private defaultOptions: DefaultZoomImgOptions = {\n scale: true,\n blur: true,\n disabled: false,\n alt: 'vue zoom img',\n }\n\n constructor(binding: BindingData) {\n if (!binding.value) {\n throw new Error(\n '[MazUI](img-preview) Image path must be defined. Ex: `v-zoom-img=\"<PATH_TO_IMAGE>\"`',\n )\n }\n\n if (typeof binding.value === 'object' && !binding.value.src) {\n throw new Error('[MazUI](img-preview) src of image must be provided')\n }\n\n this.buttonsAdded = false\n\n this.options = this.buildOptions(binding)\n this.keydownHandler = this.keydownLister.bind(this)\n\n this.loader = this.getLoader()\n\n this.wrapper = document.createElement('div')\n this.wrapper.classList.add('maz-zoom-img__wrapper')\n this.wrapper.prepend(this.loader)\n\n this.img = document.createElement('img')\n this.onImgLoadedCallback = this.onImgLoaded.bind(this)\n this.imgEventHandler(true)\n }\n\n private buildOptions(binding: BindingData): ZoomImgOptions {\n return {\n ...this.defaultOptions,\n ...(typeof binding.value === 'object'\n ? binding.value\n : { src: binding.value }),\n }\n }\n\n get allInstances(): HTMLElement[] {\n return Array.from(document.querySelectorAll('.maz-zoom-img-instance'))\n }\n\n public create(el: HTMLElement): void {\n /**\n * If is disabled\n */\n if (this.options.disabled) return\n\n /**\n * Set instance style\n */\n el.style.cursor = 'pointer'\n /**\n * Set class & data attribute to use it with previous & next functions\n */\n setTimeout(() => el.classList.add('maz-zoom-img-instance'))\n el.setAttribute('data-src', this.options.src)\n el.setAttribute('data-alt', this.options.alt)\n /**\n * Add event listeners\n */\n el.style.transition = 'all 300ms ease-in-out'\n el.addEventListener('mouseenter', () => this.mouseEnter(el))\n el.addEventListener('mouseleave', () => this.mouseLeave(el))\n el.addEventListener('click', () => this.renderPreview(el, this.options))\n }\n\n public update(binding: BindingData): void {\n this.options = this.buildOptions(binding)\n }\n\n public remove(el: HTMLElement): void {\n /**\n * Remove all\n */\n this.imgEventHandler(false)\n el.removeEventListener('click', () => this.renderPreview(el))\n el.removeEventListener('mouseenter', () => this.mouseEnter(el))\n el.removeEventListener('mouseleave', () => this.mouseLeave(el))\n el.classList.remove('maz-zoom-img-instance')\n el.removeAttribute('data-src')\n el.removeAttribute('data-alt')\n el.style.cursor = ''\n }\n\n private renderPreview(el: HTMLElement, options?: ZoomImgOptions): void {\n el.classList.add('maz-is-open')\n this.addStyle(style)\n\n const container: HTMLDivElement = document.createElement('div')\n container.classList.add('maz-zoom-img')\n container.setAttribute('id', 'MazImgPreviewFullsize')\n container.addEventListener('click', (e): void => {\n if (container.isEqualNode(e.target as Node)) {\n this.closePreview()\n }\n })\n\n if (typeof options === 'object') {\n this.img.setAttribute('src', options.src)\n this.img.setAttribute('alt', options.alt)\n this.img.id = 'MazImgElement'\n }\n\n this.wrapper.append(this.img)\n\n container.append(this.wrapper)\n\n document.body.appendChild(container)\n this.keyboardEventHandler(true)\n\n setTimeout(() => {\n if (container) container.classList.add('maz-animate')\n }, 100)\n }\n\n private onImgLoaded(): void {\n this.wrapper.style.width = `${this.img.width}px`\n this.wrapper.style.minWidth = `200px`\n this.loader.hidden = true\n\n const closeButton: HTMLButtonElement = this.getButton()\n const buttons: HTMLButtonElement[] = []\n\n const hasMultipleInstance = this.allInstances.length > 1\n\n if (!this.buttonsAdded) {\n this.buttonsAdded = true\n if (hasMultipleInstance) {\n const previousButton = this.getButton('previous')\n const nextButton = this.getButton('next')\n buttons.push(previousButton, nextButton)\n }\n\n this.wrapper.append(closeButton)\n if (hasMultipleInstance) {\n this.wrapper.prepend(buttons[0])\n this.wrapper.append(buttons[1])\n }\n }\n }\n\n private getLoader(): HTMLDivElement {\n const loader = document.createElement('div')\n loader.classList.add('maz-zoom-img__loader')\n loader.innerHTML = svgs.spinner\n return loader\n }\n\n private mouseLeave(el: HTMLElement): void {\n if (this.options.scale) el.style.transform = ''\n if (this.options.blur) el.style.filter = ''\n el.style.zIndex = ''\n }\n\n private mouseEnter(el: HTMLElement): void {\n el.style.zIndex = '1'\n if (this.options.scale) el.style.transform = 'scale(1.1)'\n if (this.options.blur) el.style.filter = 'blur(2px)'\n }\n\n private keydownLister(e: KeyboardEvent): void {\n e.preventDefault()\n if (e.key === 'Escape' || e.key === ' ') {\n this.closePreview()\n }\n\n if (e.key === 'ArrowLeft' || e.key === 'ArrowRight') {\n this.nextPreviousImage(e.key === 'ArrowRight')\n }\n }\n\n private getButton(iconName = 'close'): HTMLButtonElement {\n const button = document.createElement('button')\n button.innerHTML = svgs[iconName]\n button.onclick = (): void => {\n iconName === 'close'\n ? this.closePreview()\n : this.allInstances\n ? this.nextPreviousImage(iconName === 'next')\n : null\n }\n button.classList.add('maz-zoom-btn')\n button.classList.add(`maz-zoom-btn--${iconName}`)\n return button\n }\n\n private closePreview(): void {\n const container: HTMLElement | null = document.querySelector(\n '#MazImgPreviewFullsize',\n )\n const style: HTMLElement | null = document.querySelector('#MazPreviewStyle')\n const instance: HTMLElement | null = document.querySelector(\n '.maz-zoom-img-instance.maz-is-open',\n )\n\n if (instance) instance.classList.remove('maz-is-open')\n\n if (container) container.classList.remove('maz-animate')\n\n this.keyboardEventHandler(false)\n\n setTimeout(() => {\n if (container) container.remove()\n if (style) style.remove()\n }, 300)\n }\n\n private nextPreviousImage(isNext: boolean): void {\n const selectNextInstance = isNext\n const currentInstance: HTMLElement | null = document.querySelector(\n '.maz-zoom-img-instance.maz-is-open',\n )\n\n const currentInstanceIndex = this.allInstances.findIndex(\n (i) => i === currentInstance,\n )\n const newInstanceIndex = selectNextInstance\n ? currentInstanceIndex + 1\n : currentInstanceIndex - 1\n\n const getNewInstanceIndex = (): number => {\n return newInstanceIndex < 0\n ? this.allInstances.length - 1\n : newInstanceIndex >= this.allInstances.length\n ? 0\n : newInstanceIndex\n }\n\n const nextInstance = this.allInstances[getNewInstanceIndex()]\n\n if (nextInstance && currentInstance) {\n currentInstance.classList.remove('maz-is-open')\n nextInstance.classList.add('maz-is-open')\n\n const src: string | null = nextInstance.getAttribute('data-src')\n const alt: string | null = nextInstance.getAttribute('data-alt')\n\n this.wrapper.style.width = ''\n this.loader.hidden = false\n\n if (src) this.img.setAttribute('src', src)\n if (alt) this.img.setAttribute('alt', alt)\n }\n }\n private addStyle(styleString: string): void {\n const style = document.createElement('style')\n style.id = 'MazPreviewStyle'\n style.textContent = styleString\n document.head.append(style)\n }\n\n private keyboardEventHandler(add: boolean): void {\n if (add) return document.addEventListener('keydown', this.keydownHandler)\n document.removeEventListener('keydown', this.keydownHandler)\n }\n\n private imgEventHandler(add: boolean): void {\n if (add) return this.img.addEventListener('load', this.onImgLoadedCallback)\n this.img.removeEventListener('load', this.onImgLoadedCallback)\n }\n}\n\nlet instance: VueZoomImg\n\nconst directive: Directive = {\n created(el: HTMLElement, binding: BindingData): void {\n instance = new VueZoomImg(binding)\n instance.create(el)\n },\n updated(el: HTMLElement, binding: BindingData): void {\n instance.update(binding)\n },\n unmounted(el: HTMLElement): void {\n instance.remove(el)\n },\n}\n\nexport { directive }\n\nconst plugin: Plugin = {\n install(app: App) {\n app.directive('zoom-img', directive)\n },\n}\n\nexport default plugin\n","<template>\n <div\n v-if=\"images.length || hasEmptyLayer\"\n class=\"m-gallery maz-flex\"\n :style=\"[sizeStyle]\"\n :class=\"{ 'maz-rounded-xl': !noRadius }\"\n >\n <section class=\"m-gallery__wrapper maz-flex maz-flex-1\">\n <figure\n v-for=\"(image, i) in imagesShown\"\n :key=\"i\"\n class=\"m-gallery__item !maz-my-0 maz-flex maz-flex-center\"\n :class=\"[`m-gallery__item--${i + 1}`]\"\n >\n <img\n v-zoom-img=\"{\n src: image.slug,\n alt: image.alt,\n disabled: noZoom || shouldHaveRemainingLayer(i),\n blur: blur,\n scale: scale,\n }\"\n v-lazy-img:bg-image=\"{ src: image.slug, disabled: !lazy }\"\n class=\"m-gallery__item__image maz-flex-1\"\n src=\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\"\n :alt=\"image.alt\"\n />\n <div\n v-if=\"shouldHaveRemainingLayer(i)\"\n v-zoom-img=\"{\n src: image.slug,\n alt: image.alt,\n disabled: noZoom,\n blur: blur,\n scale: scale,\n }\"\n class=\"m-gallery__remaining-layer maz-flex maz-bg-overlay maz-flex-center\"\n >\n <span class=\"maz-text-2xl maz-text-white\"\n >+{{ numberImagesRemaining }}</span\n >\n </div>\n </figure>\n <div\n v-if=\"hasEmptyLayer && !images.length\"\n class=\"maz-flex maz-w-full maz-bg-gray-100 maz-flex-center\"\n :class=\"{ 'maz-rounded-xl': !noRadius }\"\n :style=\"[sizeStyle]\"\n >\n // TODO: icon\n <i class=\"material-icons maz-text-muted\">no_photography</i>\n </div>\n </section>\n <div\n v-for=\"(image, i) in imagesHidden\"\n :key=\"i\"\n v-zoom-img=\"{ src: image.slug, disabled: noZoom }\"\n class=\"m-gallery__hidden\"\n />\n </div>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, computed, PropType, onBeforeMount } from 'vue'\n import { directive as zoomImg } from './../directives/zoom-img.directive'\n import { directive as lazyImg } from './../directives/v-lazy-img'\n import { MazGalleryImage } from './types'\n\n export default defineComponent({\n directives: {\n 'zoom-img': zoomImg,\n 'lazy-img': lazyImg,\n },\n props: {\n // Array of string or object: `['https://via.placeholder.com/500', 'https://via.placeholder.com/600']` or `[{ slug: 'https://via.placeholder.com/500', alt: 'image descripton' }, { slug: 'https://via.placeholder.com/600', alt: 'image descripton' }]`\n images: { type: Array as PropType<MazGalleryImage[]>, default: Array },\n // Images count shown (max: 5)\n imagesShownCount: { type: Number, default: 5 },\n // Remove transparent layer with the remain count (ex: +2)\n noRemaining: { type: Boolean, default: false },\n // Height of gallery\n height: { type: [Number, String], default: 150 },\n // Remove default height\n noHeight: { type: Boolean, default: false },\n // Width of gallery\n width: { type: [Number, String], default: '100%' },\n // Remove default width\n noWidth: { type: Boolean, default: false },\n // Add the default border radius to gallery\n noRadius: { type: Boolean, default: false },\n // Add feature to show the carousel images on click\n noZoom: { type: Boolean, default: false },\n // Layer with photography icon when no images is provided\n hasEmptyLayer: { type: Boolean, default: true },\n // Lazy load image - if false, images are directly loaded\n lazy: { type: Boolean, default: true },\n // Blur animation effect on image hover\n blur: { type: Boolean, default: true },\n // Scale animation effect on image hover\n scale: { type: Boolean, default: true },\n },\n setup(props) {\n onBeforeMount(() => {\n if (props.imagesShownCount > 5)\n console.warn(\n '[MazUI](m-gallery) The maximum of \"images-shown-count\" is 5',\n )\n })\n\n const sizeStyle = computed(() => {\n const { height, width, noWidth, noHeight } = props\n return {\n ...(!noWidth\n ? {\n flex: `0 0 ${typeof width === 'number' ? `${width}px` : width}`,\n width: typeof width === 'number' ? `${width}px` : width,\n }\n : {}),\n ...(!noHeight\n ? {\n height:\n typeof height === 'number' ? `${height}px` : `${height}`,\n minHeight:\n typeof height === 'number' ? `${height}px` : `${height}`,\n }\n : {}),\n }\n })\n\n const imagesCount = computed(() => {\n const { imagesShownCount } = props\n return imagesShownCount <= 5 ? imagesShownCount : 5\n })\n\n const numberImagesRemaining = computed(() => {\n const { images } = props\n return (\n images.length -\n (images.length < imagesCount.value\n ? images.length\n : imagesCount.value)\n )\n })\n const imagesNormalized = computed(() => {\n const { images } = props\n return images.map((i) =>\n typeof i === 'object' ? i : { slug: i, alt: undefined },\n )\n })\n const imagesShown = computed(() => {\n return imagesNormalized.value.slice(0, imagesCount.value)\n })\n const imagesHidden = computed(() => {\n return imagesNormalized.value.slice(\n imagesCount.value,\n props.images.length,\n )\n })\n\n const shouldHaveRemainingLayer = (i: number) => {\n return (\n numberImagesRemaining.value &&\n i + 1 === imagesShown.value.length &&\n !props.noRemaining\n )\n }\n\n return {\n sizeStyle,\n imagesCount,\n shouldHaveRemainingLayer,\n imagesShown,\n numberImagesRemaining,\n imagesHidden,\n }\n },\n })\n</script>\n\n<style lang=\"postcss\" scoped>\n .m-gallery {\n @apply maz-relative maz-overflow-hidden;\n\n &__hidden {\n @apply maz-hidden;\n }\n\n &__item {\n @apply maz-absolute maz-top-0 maz-m-0 maz-h-1/2 maz-w-full maz-overflow-hidden maz-border-l-2 maz-border-transparent maz-p-0;\n\n &--1 {\n left: 0;\n height: 100%;\n\n &:not(:last-child) {\n width: 50%;\n }\n }\n\n &--2 {\n left: 50%;\n width: 50%;\n height: 50%;\n\n &:last-child {\n height: 100%;\n }\n\n &:nth-last-child(4) {\n width: 25%;\n }\n }\n\n &--3 {\n top: 50%;\n left: 50%;\n width: 25%;\n\n &:last-child {\n width: 50%;\n }\n\n &:nth-last-child(3) {\n top: 0;\n left: 75%;\n }\n }\n\n &--4 {\n @apply maz-border-t-2 maz-border-transparent;\n\n top: 50%;\n left: 50%;\n width: 25%;\n\n &:last-child {\n left: 75%;\n width: 25%;\n }\n }\n\n &--5 {\n @apply maz-border-t-2 maz-border-transparent;\n\n top: 50%;\n left: 75%;\n width: 25%;\n }\n\n &:first-child {\n border-left: 0;\n }\n\n &--3:last-child,\n &--3:nth-last-child(2),\n &--4:last-child,\n &--5 {\n @apply maz-border-t-2 maz-border-transparent;\n }\n\n &__image {\n /* display: block; */\n height: 100%;\n max-width: 100%;\n width: 100%;\n background-position: center center;\n background-size: cover;\n background-repeat: no-repeat;\n background-color: rgb(0 0 0 / 5%);\n }\n }\n\n &__remaining-layer {\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n\n a span {\n color: white;\n font-size: 2rem;\n }\n }\n }\n</style>\n","import { Directive, App } from 'vue'\nimport { LazyImg, DEFAULT_OPTIONS } from './lazy-img-handler'\nimport { vLazyImg } from './lazy-img.directive'\nimport { GlobalOptions } from './types'\nexport * from './types'\n\nconst DIRECTIVE_NAME = 'lazy-img'\n\nconst directive: Directive = vLazyImg\n\nconst plugin = {\n install(app: App, opts: GlobalOptions = {}) {\n const options: GlobalOptions = {\n ...DEFAULT_OPTIONS,\n ...opts,\n observerOptions: {\n ...DEFAULT_OPTIONS.observerOptions,\n ...opts.observerOptions,\n },\n }\n\n const instance = new LazyImg(options)\n\n app.directive(DIRECTIVE_NAME, {\n created: instance.add.bind(instance),\n updated: instance.update.bind(instance),\n unmounted: instance.remove.bind(instance),\n })\n },\n}\n\nexport { directive }\n\nexport default plugin\n","<template>\n <div\n v-if=\"images.length || hasEmptyLayer\"\n class=\"m-gallery maz-flex\"\n :style=\"[sizeStyle]\"\n :class=\"{ 'maz-rounded-xl': !noRadius }\"\n >\n <section class=\"m-gallery__wrapper maz-flex maz-flex-1\">\n <figure\n v-for=\"(image, i) in imagesShown\"\n :key=\"i\"\n class=\"m-gallery__item !maz-my-0 maz-flex maz-flex-center\"\n :class=\"[`m-gallery__item--${i + 1}`]\"\n >\n <img\n v-zoom-img=\"{\n src: image.slug,\n alt: image.alt,\n disabled: noZoom || shouldHaveRemainingLayer(i),\n blur: blur,\n scale: scale,\n }\"\n v-lazy-img:bg-image=\"{ src: image.slug, disabled: !lazy }\"\n class=\"m-gallery__item__image maz-flex-1\"\n src=\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\"\n :alt=\"image.alt\"\n />\n <div\n v-if=\"shouldHaveRemainingLayer(i)\"\n v-zoom-img=\"{\n src: image.slug,\n alt: image.alt,\n disabled: noZoom,\n blur: blur,\n scale: scale,\n }\"\n class=\"m-gallery__remaining-layer maz-flex maz-bg-overlay maz-flex-center\"\n >\n <span class=\"maz-text-2xl maz-text-white\"\n >+{{ numberImagesRemaining }}</span\n >\n </div>\n </figure>\n <div\n v-if=\"hasEmptyLayer && !images.length\"\n class=\"maz-flex maz-w-full maz-bg-gray-100 maz-flex-center\"\n :class=\"{ 'maz-rounded-xl': !noRadius }\"\n :style=\"[sizeStyle]\"\n >\n // TODO: icon\n <i class=\"material-icons maz-text-muted\">no_photography</i>\n </div>\n </section>\n <div\n v-for=\"(image, i) in imagesHidden\"\n :key=\"i\"\n v-zoom-img=\"{ src: image.slug, disabled: noZoom }\"\n class=\"m-gallery__hidden\"\n />\n </div>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, computed, PropType, onBeforeMount } from 'vue'\n import { directive as zoomImg } from './../directives/zoom-img.directive'\n import { directive as lazyImg } from './../directives/v-lazy-img'\n import { MazGalleryImage } from './types'\n\n export default defineComponent({\n directives: {\n 'zoom-img': zoomImg,\n 'lazy-img': lazyImg,\n },\n props: {\n // Array of string or object: `['https://via.placeholder.com/500', 'https://via.placeholder.com/600']` or `[{ slug: 'https://via.placeholder.com/500', alt: 'image descripton' }, { slug: 'https://via.placeholder.com/600', alt: 'image descripton' }]`\n images: { type: Array as PropType<MazGalleryImage[]>, default: Array },\n // Images count shown (max: 5)\n imagesShownCount: { type: Number, default: 5 },\n // Remove transparent layer with the remain count (ex: +2)\n noRemaining: { type: Boolean, default: false },\n // Height of gallery\n height: { type: [Number, String], default: 150 },\n // Remove default height\n noHeight: { type: Boolean, default: false },\n // Width of gallery\n width: { type: [Number, String], default: '100%' },\n // Remove default width\n noWidth: { type: Boolean, default: false },\n // Add the default border radius to gallery\n noRadius: { type: Boolean, default: false },\n // Add feature to show the carousel images on click\n noZoom: { type: Boolean, default: false },\n // Layer with photography icon when no images is provided\n hasEmptyLayer: { type: Boolean, default: true },\n // Lazy load image - if false, images are directly loaded\n lazy: { type: Boolean, default: true },\n // Blur animation effect on image hover\n blur: { type: Boolean, default: true },\n // Scale animation effect on image hover\n scale: { type: Boolean, default: true },\n },\n setup(props) {\n onBeforeMount(() => {\n if (props.imagesShownCount > 5)\n console.warn(\n '[MazUI](m-gallery) The maximum of \"images-shown-count\" is 5',\n )\n })\n\n const sizeStyle = computed(() => {\n const { height, width, noWidth, noHeight } = props\n return {\n ...(!noWidth\n ? {\n flex: `0 0 ${typeof width === 'number' ? `${width}px` : width}`,\n width: typeof width === 'number' ? `${width}px` : width,\n }\n : {}),\n ...(!noHeight\n ? {\n height:\n typeof height === 'number' ? `${height}px` : `${height}`,\n minHeight:\n typeof height === 'number' ? `${height}px` : `${height}`,\n }\n : {}),\n }\n })\n\n const imagesCount = computed(() => {\n const { imagesShownCount } = props\n return imagesShownCount <= 5 ? imagesShownCount : 5\n })\n\n const numberImagesRemaining = computed(() => {\n const { images } = props\n return (\n images.length -\n (images.length < imagesCount.value\n ? images.length\n : imagesCount.value)\n )\n })\n const imagesNormalized = computed(() => {\n const { images } = props\n return images.map((i) =>\n typeof i === 'object' ? i : { slug: i, alt: undefined },\n )\n })\n const imagesShown = computed(() => {\n return imagesNormalized.value.slice(0, imagesCount.value)\n })\n const imagesHidden = computed(() => {\n return imagesNormalized.value.slice(\n imagesCount.value,\n props.images.length,\n )\n })\n\n const shouldHaveRemainingLayer = (i: number) => {\n return (\n numberImagesRemaining.value &&\n i + 1 === imagesShown.value.length &&\n !props.noRemaining\n )\n }\n\n return {\n sizeStyle,\n imagesCount,\n shouldHaveRemainingLayer,\n imagesShown,\n numberImagesRemaining,\n imagesHidden,\n }\n },\n })\n</script>\n\n<style lang=\"postcss\" scoped>\n .m-gallery {\n @apply maz-relative maz-overflow-hidden;\n\n &__hidden {\n @apply maz-hidden;\n }\n\n &__item {\n @apply maz-absolute maz-top-0 maz-m-0 maz-h-1/2 maz-w-full maz-overflow-hidden maz-border-l-2 maz-border-transparent maz-p-0;\n\n &--1 {\n left: 0;\n height: 100%;\n\n &:not(:last-child) {\n width: 50%;\n }\n }\n\n &--2 {\n left: 50%;\n width: 50%;\n height: 50%;\n\n &:last-child {\n height: 100%;\n }\n\n &:nth-last-child(4) {\n width: 25%;\n }\n }\n\n &--3 {\n top: 50%;\n left: 50%;\n width: 25%;\n\n &:last-child {\n width: 50%;\n }\n\n &:nth-last-child(3) {\n top: 0;\n left: 75%;\n }\n }\n\n &--4 {\n @apply maz-border-t-2 maz-border-transparent;\n\n top: 50%;\n left: 50%;\n width: 25%;\n\n &:last-child {\n left: 75%;\n width: 25%;\n }\n }\n\n &--5 {\n @apply maz-border-t-2 maz-border-transparent;\n\n top: 50%;\n left: 75%;\n width: 25%;\n }\n\n &:first-child {\n border-left: 0;\n }\n\n &--3:last-child,\n &--3:nth-last-child(2),\n &--4:last-child,\n &--5 {\n @apply maz-border-t-2 maz-border-transparent;\n }\n\n &__image {\n /* display: block; */\n height: 100%;\n max-width: 100%;\n width: 100%;\n background-position: center center;\n background-size: cover;\n background-repeat: no-repeat;\n background-color: rgb(0 0 0 / 5%);\n }\n }\n\n &__remaining-layer {\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n\n a span {\n color: white;\n font-size: 2rem;\n }\n }\n }\n</style>\n","<template>\n <Transition\n class=\"m-transition-expand\"\n name=\"maz-expand\"\n tag=\"div\"\n @enter=\"(el) => enter(el as HTMLElement)\"\n @after-enter=\"(el) => afterEnter(el as HTMLElement)\"\n @leave=\"(el) => leave(el as HTMLElement)\"\n >\n <slot />\n </Transition>\n</template>\n\n<script lang=\"ts\" setup>\n import { nextTick } from 'vue'\n\n const enter = (element: HTMLElement) => {\n const width = getComputedStyle(element).width\n\n element.style.width = width\n element.style.position = 'absolute'\n element.style.visibility = 'hidden'\n element.style.height = 'auto'\n element.style.top = 'bottom'\n\n const height = getComputedStyle(element).height\n\n element.style.width = ''\n element.style.position = ''\n element.style.visibility = ''\n element.style.height = '0px'\n\n // Force repaint to make sure the\n // animation is triggered correctly.\n /* eslint-disable */\n getComputedStyle(element).height\n /* eslint-enable */\n\n // Trigger the animation.\n // We use `setTimeout` because we need\n // to make sure the browser has finished\n // painting after setting the `height`\n // to `0` in the line above.\n nextTick(() => {\n element.style.height = height\n })\n }\n const afterEnter = (element: HTMLElement) => {\n element.style.height = 'auto'\n }\n const leave = (element: HTMLElement) => {\n const height = getComputedStyle(element).height\n element.style.height = height\n\n // Force repaint to make sure the\n // animation is triggered correctly.\n /* eslint-disable */\n getComputedStyle(element).height\n /* eslint-enable */\n nextTick(() => {\n element.style.height = '0px'\n })\n }\n</script>\n\n<style lang=\"postcss\" scoped>\n .m-transition-expand,\n .m-transition-expand * {\n will-change: height;\n transform: translateZ(0);\n backface-visibility: hidden;\n perspective: 1000px;\n }\n</style>\n","<template>\n <div\n class=\"m-card\"\n :class=\"[\n {\n 'm-card--linked': href,\n 'm-card--no-scale': !scale,\n 'maz-shadow-md': elevation,\n 'maz-overflow-hidden': overflowHidden,\n 'maz-rounded-xl': radius,\n 'maz-border-2 maz-border-solid maz-border-gray-100': bordered,\n },\n ]\"\n >\n <Component\n :is=\"collapsable ? 'button' : 'div'\"\n v-if=\"$slots['header'] || collapsable\"\n class=\"m-card__header maz-rounded-t-xl maz-border-b-2\"\n :class=\"[\n isOpen ? 'maz-border-gray-100' : 'maz-border-transparent',\n { '--is-collapsable': collapsable },\n ]\"\n tabindex=\"-1\"\n @click.stop=\"collapsable ? (isOpen = !isOpen) : undefined\"\n >\n <slot name=\"header\" />\n\n <MazBtn\n v-if=\"collapsable\"\n color=\"white\"\n class=\"maz-text-sm\"\n @click.stop=\"isOpen = !isOpen\"\n >\n <MazIcon\n name=\"chevron-down\"\n :class=\"{ '--is-open': isOpen }\"\n class=\"m-card__collapse-icon maz-h-6\"\n />\n </MazBtn>\n </Component>\n <Component\n :is=\"href ? 'a' : 'div'\"\n class=\"m-card__wrapper\"\n :class=\"[`m-card__wrapper--${orientation}`, { 'm-card__link': href }]\"\n :href=\"href\"\n :target=\"href ? hrefTarget : null\"\n >\n <div v-if=\"images\" class=\"m-card__gallery__wrapper\">\n <MazGallery\n :radius=\"radius\"\n :width=\"galleryWidthComputed\"\n :height=\"galleryHeight\"\n :images-shown-count=\"imagesShowCount\"\n :images=\"images\"\n :zoom=\"zoom\"\n :no-width=\"isColumnVariant\"\n :no-height=\"!isColumnVariant && haveSomeContent\"\n :no-remaining=\"noRemaining\"\n class=\"m-card__gallery maz-flex-1\"\n />\n </div>\n <div class=\"maz-min-w-0 maz-flex-1\">\n <Component :is=\"collapsable ? 'MazTransitionExpand' : 'div'\">\n <div\n v-show=\"isOpen\"\n :class=\"[wrapperClass, { 'maz-p-4': !noPadding && !collapsable }]\"\n class=\"m-card__content__wrapper\"\n >\n <slot>\n <div v-if=\"$slots['title']\" class=\"m-card__title\">\n <slot name=\"title\" />\n </div>\n <div v-if=\"$slots['subtitle']\" class=\"m-card__subtitle\">\n <slot name=\"subtitle\" />\n </div>\n <div v-if=\"$slots['content']\" class=\"m-card__content\">\n <slot name=\"content\" />\n </div>\n </slot>\n </div>\n </Component>\n </div>\n </Component>\n <div\n v-if=\"$slots['footer']\"\n class=\"m-card__footer maz-overflow-x-auto maz-p-3\"\n :class=\"[\n {\n 'maz-border-t-2 maz-border-color-lighter':\n isColumnVariant && haveSomeContent,\n },\n footerAlignClass,\n ]\"\n >\n <slot name=\"footer\" />\n </div>\n <div v-if=\"$slots['actions']\" class=\"m-card__actions maz-flex maz-p-2\">\n <!-- Slot above the gallery -->\n <slot name=\"actions\" />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import {\n defineComponent,\n computed,\n useSlots,\n PropType,\n ref,\n watch,\n } from 'vue'\n import MazGallery from './MazGallery.vue'\n import MazBtn from './MazBtn.vue'\n import MazTransitionExpand from './MazTransitionExpand.vue'\n import MazIcon from './MazIcon.vue'\n import { MazGalleryImage } from './types'\n\n export default defineComponent({\n components: {\n MazTransitionExpand,\n MazGallery,\n MazBtn,\n MazIcon,\n },\n props: {\n // Images displayed\n images: {\n type: Array as PropType<MazGalleryImage[]>,\n default: undefined,\n },\n // Card variant: Must be `column | row | row-reverse | column-reverse`\n orientation: {\n type: String,\n default: 'column',\n validator: (value: string) => {\n return ['column', 'row', 'row-reverse', 'column-reverse'].includes(\n value,\n )\n },\n },\n // Make card a link (footer area excluded)\n href: { type: String, default: undefined },\n // Target option of link: Muse be one of `_blank | _self | _parent | _top | framename`\n hrefTarget: { type: String, default: '_self' },\n // Footer text alignment: `right | left`\n footerAlign: { type: String, default: 'right' },\n // Gallery image width\n galleryWidth: { type: [String, Number], default: 200 },\n // Gallery image height\n galleryHeight: { type: [String, Number], default: 150 },\n // Enable \"zoom\" image on click (can't be used when the card has a link)\n zoom: { type: Boolean, default: false },\n // Set elevation to card (box-shadow)\n elevation: { type: Boolean, default: true },\n // Set radius to card (box-shadow)\n radius: { type: Boolean, default: true },\n // Set border to card\n bordered: { type: Boolean, default: false },\n // Number of images shown in the gallery\n imagesShowCount: { type: Number, default: 3 },\n // Remove transparent layer with the remain count (ex: +2)\n noRemaining: { type: Boolean, default: true },\n // scale animation on hover (only linked cards)\n scale: { type: Boolean, default: true },\n wrapperClass: { type: String, default: undefined },\n noPadding: { type: Boolean, default: false },\n overflowHidden: { type: Boolean, default: false },\n collapsable: { type: Boolean, default: false },\n collapseOpen: { type: Boolean, default: false },\n },\n setup(props) {\n const slots = useSlots()\n\n const isOpen = ref(props.collapsable ? props.collapseOpen : true)\n\n watch(\n () => props.collapseOpen,\n (value) => {\n if (props.collapsable) isOpen.value = value\n },\n )\n\n const isColumnVariant = computed(() =>\n ['column', 'column-reverse'].includes(props.orientation),\n )\n\n const haveSomeContent = computed(() => {\n const supportedSlots = ['default', 'title', 'subtitle', 'content']\n const response = Object.keys(slots).some((val) =>\n supportedSlots.includes(val),\n )\n return response\n })\n\n const galleryWidthComputed = computed(() =>\n haveSomeContent.value ? props.galleryWidth : '100%',\n )\n\n const footerAlignClass = computed(() =>\n props.footerAlign === 'right' ? 'maz-text-right' : 'maz-text-left',\n )\n\n return {\n isOpen,\n isColumnVariant,\n haveSomeContent,\n galleryWidthComputed,\n footerAlignClass,\n }\n },\n })\n</script>\n\n<style lang=\"postcss\" scoped>\n .m-card {\n @apply maz-relative maz-inline-flex maz-max-h-full maz-flex-col maz-bg-color;\n\n &__header {\n @apply maz-flex maz-items-center maz-justify-between maz-py-3 maz-px-4 maz-transition-colors maz-delay-200;\n\n &.--is-collapsable {\n @apply hover:maz-bg-gray-100;\n }\n }\n\n &__collapse-icon {\n @apply maz-rotate-0 maz-transition-transform maz-delay-200;\n\n &.--is-open {\n @apply maz-rotate-180;\n }\n }\n\n &__wrapper {\n @apply maz-flex maz-flex-1;\n\n &--row {\n @apply maz-flex-row;\n }\n\n &--row-reverse {\n @apply maz-flex-row-reverse;\n }\n\n &--column {\n @apply maz-flex-col;\n }\n\n &--column-reverse {\n @apply maz-flex-col-reverse;\n }\n }\n\n &__content {\n @apply maz-pt-2;\n }\n\n &--linked {\n transition: all 300ms ease-in-out;\n transform: scale(1);\n\n &:hover:not(.m-card--no-scale) {\n @apply maz-z-1;\n\n transform: scale(1.02);\n }\n\n & .m-card__wrapper {\n @apply maz-cursor-pointer maz-no-underline;\n\n &:hover {\n @apply maz-no-underline;\n }\n }\n }\n\n &__content__wrapper {\n @apply maz-relative maz-max-w-full;\n }\n\n &__title,\n &__title > * {\n font-size: 1.2em;\n\n @apply maz-text-normal-text;\n }\n\n &__subtitle,\n &__subtitle > * {\n font-size: 1.1em;\n\n @apply maz-text-muted;\n }\n\n &__gallery__wrapper {\n @apply maz-relative maz-flex maz-overflow-hidden;\n }\n\n &__actions {\n @apply maz-absolute maz-top-0 maz-left-0 maz-z-2;\n\n & > *:not(:last-child) {\n @apply maz-mr-2;\n }\n }\n }\n\n html.dark {\n & .m-card {\n @apply maz-bg-color-light;\n }\n }\n</style>\n","<template>\n <div\n class=\"m-card\"\n :class=\"[\n {\n 'm-card--linked': href,\n 'm-card--no-scale': !scale,\n 'maz-shadow-md': elevation,\n 'maz-overflow-hidden': overflowHidden,\n 'maz-rounded-xl': radius,\n 'maz-border-2 maz-border-solid maz-border-gray-100': bordered,\n },\n ]\"\n >\n <Component\n :is=\"collapsable ? 'button' : 'div'\"\n v-if=\"$slots['header'] || collapsable\"\n class=\"m-card__header maz-rounded-t-xl maz-border-b-2\"\n :class=\"[\n isOpen ? 'maz-border-gray-100' : 'maz-border-transparent',\n { '--is-collapsable': collapsable },\n ]\"\n tabindex=\"-1\"\n @click.stop=\"collapsable ? (isOpen = !isOpen) : undefined\"\n >\n <slot name=\"header\" />\n\n <MazBtn\n v-if=\"collapsable\"\n color=\"white\"\n class=\"maz-text-sm\"\n @click.stop=\"isOpen = !isOpen\"\n >\n <MazIcon\n name=\"chevron-down\"\n :class=\"{ '--is-open': isOpen }\"\n class=\"m-card__collapse-icon maz-h-6\"\n />\n </MazBtn>\n </Component>\n <Component\n :is=\"href ? 'a' : 'div'\"\n class=\"m-card__wrapper\"\n :class=\"[`m-card__wrapper--${orientation}`, { 'm-card__link': href }]\"\n :href=\"href\"\n :target=\"href ? hrefTarget : null\"\n >\n <div v-if=\"images\" class=\"m-card__gallery__wrapper\">\n <MazGallery\n :radius=\"radius\"\n :width=\"galleryWidthComputed\"\n :height=\"galleryHeight\"\n :images-shown-count=\"imagesShowCount\"\n :images=\"images\"\n :zoom=\"zoom\"\n :no-width=\"isColumnVariant\"\n :no-height=\"!isColumnVariant && haveSomeContent\"\n :no-remaining=\"noRemaining\"\n class=\"m-card__gallery maz-flex-1\"\n />\n </div>\n <div class=\"maz-min-w-0 maz-flex-1\">\n <Component :is=\"collapsable ? 'MazTransitionExpand' : 'div'\">\n <div\n v-show=\"isOpen\"\n :class=\"[wrapperClass, { 'maz-p-4': !noPadding && !collapsable }]\"\n class=\"m-card__content__wrapper\"\n >\n <slot>\n <div v-if=\"$slots['title']\" class=\"m-card__title\">\n <slot name=\"title\" />\n </div>\n <div v-if=\"$slots['subtitle']\" class=\"m-card__subtitle\">\n <slot name=\"subtitle\" />\n </div>\n <div v-if=\"$slots['content']\" class=\"m-card__content\">\n <slot name=\"content\" />\n </div>\n </slot>\n </div>\n </Component>\n </div>\n </Component>\n <div\n v-if=\"$slots['footer']\"\n class=\"m-card__footer maz-overflow-x-auto maz-p-3\"\n :class=\"[\n {\n 'maz-border-t-2 maz-border-color-lighter':\n isColumnVariant && haveSomeContent,\n },\n footerAlignClass,\n ]\"\n >\n <slot name=\"footer\" />\n </div>\n <div v-if=\"$slots['actions']\" class=\"m-card__actions maz-flex maz-p-2\">\n <!-- Slot above the gallery -->\n <slot name=\"actions\" />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import {\n defineComponent,\n computed,\n useSlots,\n PropType,\n ref,\n watch,\n } from 'vue'\n import MazGallery from './MazGallery.vue'\n import MazBtn from './MazBtn.vue'\n import MazTransitionExpand from './MazTransitionExpand.vue'\n import MazIcon from './MazIcon.vue'\n import { MazGalleryImage } from './types'\n\n export default defineComponent({\n components: {\n MazTransitionExpand,\n MazGallery,\n MazBtn,\n MazIcon,\n },\n props: {\n // Images displayed\n images: {\n type: Array as PropType<MazGalleryImage[]>,\n default: undefined,\n },\n // Card variant: Must be `column | row | row-reverse | column-reverse`\n orientation: {\n type: String,\n default: 'column',\n validator: (value: string) => {\n return ['column', 'row', 'row-reverse', 'column-reverse'].includes(\n value,\n )\n },\n },\n // Make card a link (footer area excluded)\n href: { type: String, default: undefined },\n // Target option of link: Muse be one of `_blank | _self | _parent | _top | framename`\n hrefTarget: { type: String, default: '_self' },\n // Footer text alignment: `right | left`\n footerAlign: { type: String, default: 'right' },\n // Gallery image width\n galleryWidth: { type: [String, Number], default: 200 },\n // Gallery image height\n galleryHeight: { type: [String, Number], default: 150 },\n // Enable \"zoom\" image on click (can't be used when the card has a link)\n zoom: { type: Boolean, default: false },\n // Set elevation to card (box-shadow)\n elevation: { type: Boolean, default: true },\n // Set radius to card (box-shadow)\n radius: { type: Boolean, default: true },\n // Set border to card\n bordered: { type: Boolean, default: false },\n // Number of images shown in the gallery\n imagesShowCount: { type: Number, default: 3 },\n // Remove transparent layer with the remain count (ex: +2)\n noRemaining: { type: Boolean, default: true },\n // scale animation on hover (only linked cards)\n scale: { type: Boolean, default: true },\n wrapperClass: { type: String, default: undefined },\n noPadding: { type: Boolean, default: false },\n overflowHidden: { type: Boolean, default: false },\n collapsable: { type: Boolean, default: false },\n collapseOpen: { type: Boolean, default: false },\n },\n setup(props) {\n const slots = useSlots()\n\n const isOpen = ref(props.collapsable ? props.collapseOpen : true)\n\n watch(\n () => props.collapseOpen,\n (value) => {\n if (props.collapsable) isOpen.value = value\n },\n )\n\n const isColumnVariant = computed(() =>\n ['column', 'column-reverse'].includes(props.orientation),\n )\n\n const haveSomeContent = computed(() => {\n const supportedSlots = ['default', 'title', 'subtitle', 'content']\n const response = Object.keys(slots).some((val) =>\n supportedSlots.includes(val),\n )\n return response\n })\n\n const galleryWidthComputed = computed(() =>\n haveSomeContent.value ? props.galleryWidth : '100%',\n )\n\n const footerAlignClass = computed(() =>\n props.footerAlign === 'right' ? 'maz-text-right' : 'maz-text-left',\n )\n\n return {\n isOpen,\n isColumnVariant,\n haveSomeContent,\n galleryWidthComputed,\n footerAlignClass,\n }\n },\n })\n</script>\n\n<style lang=\"postcss\" scoped>\n .m-card {\n @apply maz-relative maz-inline-flex maz-max-h-full maz-flex-col maz-bg-color;\n\n &__header {\n @apply maz-flex maz-items-center maz-justify-between maz-py-3 maz-px-4 maz-transition-colors maz-delay-200;\n\n &.--is-collapsable {\n @apply hover:maz-bg-gray-100;\n }\n }\n\n &__collapse-icon {\n @apply maz-rotate-0 maz-transition-transform maz-delay-200;\n\n &.--is-open {\n @apply maz-rotate-180;\n }\n }\n\n &__wrapper {\n @apply maz-flex maz-flex-1;\n\n &--row {\n @apply maz-flex-row;\n }\n\n &--row-reverse {\n @apply maz-flex-row-reverse;\n }\n\n &--column {\n @apply maz-flex-col;\n }\n\n &--column-reverse {\n @apply maz-flex-col-reverse;\n }\n }\n\n &__content {\n @apply maz-pt-2;\n }\n\n &--linked {\n transition: all 300ms ease-in-out;\n transform: scale(1);\n\n &:hover:not(.m-card--no-scale) {\n @apply maz-z-1;\n\n transform: scale(1.02);\n }\n\n & .m-card__wrapper {\n @apply maz-cursor-pointer maz-no-underline;\n\n &:hover {\n @apply maz-no-underline;\n }\n }\n }\n\n &__content__wrapper {\n @apply maz-relative maz-max-w-full;\n }\n\n &__title,\n &__title > * {\n font-size: 1.2em;\n\n @apply maz-text-normal-text;\n }\n\n &__subtitle,\n &__subtitle > * {\n font-size: 1.1em;\n\n @apply maz-text-muted;\n }\n\n &__gallery__wrapper {\n @apply maz-relative maz-flex maz-overflow-hidden;\n }\n\n &__actions {\n @apply maz-absolute maz-top-0 maz-left-0 maz-z-2;\n\n & > *:not(:last-child) {\n @apply maz-mr-2;\n }\n }\n }\n\n html.dark {\n & .m-card {\n @apply maz-bg-color-light;\n }\n }\n</style>\n","<template>\n <div\n class=\"m-input\"\n :class=\"[\n {\n '--is-focused': isFocused,\n '--should-up': shouldUp,\n '--has-label': hasLabel,\n '--is-disabled': disabled,\n '--is-readonly': readonly,\n '--has-z-2': error || warning || success,\n '--has-state': error || warning || success,\n },\n $attrs.class,\n `--${color}`,\n `--${size}`,\n ]\"\n >\n <div\n class=\"m-input-wrapper maz-border\"\n :class=\"[inputClasses, borderStyle, { 'maz-rounded-lg': !noRadius }]\"\n >\n <div v-if=\"hasLeftPart()\" class=\"m-input-wrapper-left\">\n <slot v-if=\"$slots['left-icon'] || leftIcon\" name=\"left-icon\">\n <MazIcon :name=\"leftIcon\" class=\"maz-text-gray-400\" />\n </slot>\n </div>\n\n <div class=\"m-input-wrapper-input\">\n <input\n :id=\"id\"\n ref=\"input\"\n :value=\"modelValue\"\n :type=\"inputType\"\n :name=\"name\"\n v-bind=\"$attrs\"\n :placeholder=\"computedPlaceholder\"\n :aria-label=\"label || placeholder\"\n :disabled=\"disabled\"\n :readonly=\"readonly\"\n :required=\"required\"\n class=\"m-input-input\"\n v-on=\"{\n input: (event) => emitValue(event.target.value),\n blur,\n focus,\n }\"\n />\n\n <label\n v-if=\"label || hint\"\n ref=\"label\"\n :for=\"id\"\n class=\"m-input-label\"\n :class=\"[\n {\n 'maz-text-danger-600': error,\n 'maz-text-success-600': success,\n 'maz-text-warning-600': warning,\n },\n ]\"\n >\n {{ hint || label }}\n <sup v-if=\"required\">*</sup>\n </label>\n </div>\n\n <div v-if=\"hasRightPart()\" class=\"m-input-wrapper-right\">\n <slot v-if=\"$slots['right-icon'] || rightIcon\" name=\"right-icon\">\n <MazIcon :name=\"rightIcon\" class=\"maz-text-gray-400\" />\n </slot>\n\n <MazBtn\n v-if=\"isPasswordType\"\n color=\"transparent\"\n tabindex=\"-1\"\n size=\"mini\"\n @click.stop=\"hasPasswordVisible = !hasPasswordVisible\"\n >\n <MazIcon\n v-if=\"hasPasswordVisible\"\n name=\"eye-off\"\n class=\"maz-text-gray-400\"\n />\n <MazIcon v-else name=\"eye\" class=\"maz-text-gray-400\" />\n </MazBtn>\n\n <slot v-if=\"$slots['valid-button'] || validButton\" name=\"valid-button\">\n <MazBtn\n color=\"transparent\"\n :disabled=\"disabled\"\n tabindex=\"-1\"\n :loading=\"validButtonLoading\"\n class=\"m-input-valid-button\"\n size=\"mini\"\n type=\"submit\"\n >\n <MazIcon class=\"maz-text-normal-text\" name=\"check\" />\n </MazBtn>\n </slot>\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, onMounted, ref, PropType } from 'vue'\n import { debounce } from './../utils/debounce'\n import MazBtn from './MazBtn.vue'\n import MazIcon from './MazIcon.vue'\n import { Color, Size } from './types'\n\n export default defineComponent({\n components: { MazBtn, MazIcon },\n inheritAttrs: false,\n props: {\n modelValue: {\n type: [String, Number] as PropType<\n string | number | null | undefined | boolean\n >,\n default: undefined,\n },\n placeholder: { type: String, default: undefined },\n color: {\n type: String as PropType<Color>,\n default: 'primary',\n validator: (value: string) => {\n return [\n 'primary',\n 'secondary',\n 'warning',\n 'danger',\n 'info',\n 'success',\n 'white',\n 'black',\n ].includes(value)\n },\n },\n label: { type: String, default: undefined },\n name: { type: String, default: 'input' },\n type: {\n type: String,\n default: 'text',\n validator: (value: string) => {\n return [\n 'text',\n 'date',\n 'number',\n 'tel',\n 'search',\n 'url',\n 'password',\n 'month',\n 'time',\n 'week',\n 'email',\n ].includes(value)\n },\n },\n required: { type: Boolean, default: false },\n disabled: { type: Boolean, default: false },\n readonly: { type: Boolean, default: false },\n id: { type: String, default: 'MazInput' },\n error: { type: Boolean, default: false },\n success: { type: Boolean, default: false },\n warning: { type: Boolean, default: false },\n hint: { type: String, default: undefined },\n inputClasses: { type: String, default: undefined },\n noBorder: { type: Boolean, default: false },\n noRadius: { type: Boolean, default: false },\n size: {\n type: String as PropType<Size>,\n default: 'md',\n validator: (value: string) => {\n return ['mini', 'xs', 'sm', 'md', 'lg', 'xl'].includes(value)\n },\n },\n debounce: { type: Boolean, default: false },\n debounceDelay: { type: Number, default: 500 },\n validButton: { type: Boolean, default: false },\n validButtonLoading: { type: Boolean, default: false },\n autoFocus: { type: Boolean, default: false },\n leftIcon: { type: String, default: undefined },\n rightIcon: { type: String, default: undefined },\n },\n emits: ['focus', 'blur', 'update:model-value'],\n setup(props, { emit, slots }) {\n const hasPasswordVisible = ref(false)\n const isFocused = ref(false)\n const input = ref<HTMLElement | undefined>()\n\n onMounted(() => {\n if (props.autoFocus) {\n input.value?.focus()\n }\n })\n\n const isPasswordType = computed(() => props.type === 'password')\n\n const inputType = computed(() =>\n hasPasswordVisible.value ? 'text' : props.type,\n )\n\n const borderStyle = computed(() => {\n if (props.noBorder) return undefined\n if (props.error) return 'maz-border-danger'\n if (props.success) return 'maz-border-success'\n if (props.warning) return 'maz-border-warning'\n if (isFocused.value) {\n if (props.color === 'black') return 'maz-border-black'\n if (props.color === 'danger') return 'maz-border-danger'\n if (props.color === 'info') return 'maz-border-info'\n if (props.color === 'primary') return 'maz-border-primary'\n if (props.color === 'secondary') return 'maz-border-secondary'\n if (props.color === 'success') return 'maz-border-success'\n if (props.color === 'warning') return 'maz-border-warning'\n if (props.color === 'white') return 'maz-border-white'\n }\n return 'maz-border-gray-200'\n })\n\n const computedPlaceholder = computed(() => {\n const { required, placeholder } = props\n if (!placeholder) return undefined\n return required ? `${placeholder} *` : placeholder\n })\n\n const hasValue = computed(\n () => props.modelValue !== undefined && props.modelValue !== '',\n )\n\n const shouldUp = computed(() => {\n return (\n (!!props.label || !!props.hint) &&\n (isFocused.value ||\n !!hasValue.value ||\n !!props.placeholder ||\n ['date', 'month', 'week'].includes(props.type))\n )\n })\n\n const hasLabel = computed(() => !!props.label || !!props.hint)\n\n const hasRightPart = (): boolean => {\n return (\n !!slots['right-icon'] ||\n isPasswordType.value ||\n !!slots['valid-button'] ||\n props.validButton ||\n !!props.rightIcon\n )\n }\n\n const hasLeftPart = (): boolean => {\n return !!slots['left-icon'] || !!props.leftIcon\n }\n\n const focus = (event: Event) => {\n emit('focus', event)\n isFocused.value = true\n }\n\n const blur = (event: Event) => {\n emit('blur', event)\n isFocused.value = false\n }\n\n const debounceEmitValue = debounce((value: string | number) => {\n emit('update:model-value', value[0])\n }, props.debounceDelay)\n\n const emitValue = (value: string | number) => {\n if (props.debounce) return debounceEmitValue(value)\n\n emit('update:model-value', value)\n }\n\n return {\n shouldUp,\n hasLabel,\n computedPlaceholder,\n isPasswordType,\n inputType,\n input,\n isFocused,\n hasPasswordVisible,\n borderStyle,\n focus,\n blur,\n emitValue,\n hasRightPart,\n hasLeftPart,\n }\n },\n })\n</script>\n\n<style lang=\"postcss\" scoped>\n /* stylelint-disable no-descending-specificity */\n .m-input {\n @apply maz-flex maz-flex-col;\n\n &.--xl {\n @apply maz-h-16;\n\n & .m-input-input,\n & .m-input-label {\n @apply maz-text-xl;\n }\n }\n\n &.--lg {\n @apply maz-h-14;\n\n & .m-input-input,\n & .m-input-label {\n @apply maz-text-lg;\n }\n }\n\n &.--md {\n @apply maz-h-12;\n\n & .m-input-input,\n & .m-input-label {\n @apply maz-text-base;\n }\n }\n\n &.--sm {\n @apply maz-h-10;\n\n & .m-input-input,\n & .m-input-label {\n @apply maz-text-sm;\n }\n }\n\n &.--xs {\n @apply maz-h-8;\n\n & .m-input-input,\n & .m-input-label {\n @apply maz-text-xs;\n }\n }\n\n &.--mini {\n @apply maz-h-6;\n\n & .m-input-input,\n & .m-input-label {\n @apply maz-text-xs;\n }\n }\n\n &-wrapper {\n @apply maz-relative maz-z-1 maz-flex maz-flex-1 maz-overflow-hidden maz-border-solid maz-bg-color maz-transition-colors maz-duration-300;\n\n &-input {\n @apply maz-relative maz-flex maz-flex-1 maz-items-center;\n }\n\n &-right,\n &-left {\n @apply maz-relative maz-z-1 maz-flex maz-space-x-1 maz-py-1 maz-flex-center;\n }\n\n &-right {\n @apply maz-px-1;\n }\n\n &-left {\n @apply maz-left-1;\n }\n }\n\n &-input {\n @apply maz-outline-none maz-m-0 maz-block maz-w-full maz-appearance-none maz-border-none maz-bg-transparent maz-shadow-none;\n\n @apply maz-h-auto maz-py-0 maz-px-4 maz-text-normal-text;\n }\n\n &-label {\n @apply maz-pointer-events-none maz-absolute maz-block maz-w-max maz-origin-top-left maz-truncate;\n\n @apply maz-left-4 maz-leading-6;\n\n transition: transform 200ms cubic-bezier(0, 0, 0.2, 1) 0ms;\n }\n\n &:not(.--has-state) {\n @apply maz-text-gray-500;\n }\n\n &.--has-z-2 {\n & .m-input-wrapper {\n @apply maz-z-2;\n }\n }\n\n &.--should-up {\n & .m-input-label {\n transform: scale(0.8) translateY(-0.65rem);\n }\n }\n\n &.--is-disabled {\n & .m-input-wrapper {\n @apply maz-bg-color maz-text-muted;\n }\n\n & .m-input-input {\n @apply maz-cursor-not-allowed maz-text-muted;\n }\n\n & .m-input-label {\n @apply maz-text-muted;\n }\n }\n\n &.--is-focused {\n & .m-input-wrapper {\n @apply maz-z-3;\n }\n }\n\n &.--has-label {\n .m-input-input {\n @apply maz-px-4 maz-pt-4;\n }\n }\n }\n\n html.dark {\n & .m-input:not(.--is-disabled) {\n & .m-input-wrapper {\n @apply maz-bg-color-light;\n }\n }\n\n & .m-input:not(.--is-focused):not(.--has-state) {\n & .m-input-wrapper {\n @apply maz-border-color-lighter;\n }\n }\n }\n</style>\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n\ntype ArgumentTypes<F extends (...args: any[]) => void> = F extends (\n ...args: infer A\n) => any\n ? A\n : never\n\ntype MethodTypes = {\n cancel: () => void\n flush: () => void\n}\n\nexport function debounce<T extends (...args: any[]) => void>(\n fn: T,\n wait = 0,\n callFirst = false,\n): ((...args: ArgumentTypes<T>) => void) & MethodTypes {\n let timeout: ReturnType<typeof setTimeout> | undefined = undefined\n let debouncedFn: VoidFunction | undefined = undefined\n\n const clear = function () {\n if (timeout) {\n clearTimeout(timeout)\n\n debouncedFn = undefined\n timeout = undefined\n }\n }\n\n const flush = function () {\n const call = debouncedFn\n clear()\n\n if (call) {\n call()\n }\n }\n\n const debounceWrapper = function (...args: any) {\n if (!wait) {\n return fn.apply(this, [args])\n }\n\n /* eslint-disable @typescript-eslint/no-this-alias */\n const context = this\n const callNow = callFirst && !timeout\n clear()\n\n debouncedFn = function () {\n fn.apply(context, [args])\n }\n\n timeout = setTimeout(function () {\n timeout = undefined\n\n if (!callNow) {\n const call = debouncedFn\n debouncedFn = undefined\n\n if (typeof call !== 'undefined') return call()\n }\n }, wait)\n\n if (callNow) {\n return debouncedFn()\n }\n }\n\n debounceWrapper.cancel = clear\n debounceWrapper.flush = flush\n\n return debounceWrapper\n}\n","<template>\n <div\n class=\"m-input\"\n :class=\"[\n {\n '--is-focused': isFocused,\n '--should-up': shouldUp,\n '--has-label': hasLabel,\n '--is-disabled': disabled,\n '--is-readonly': readonly,\n '--has-z-2': error || warning || success,\n '--has-state': error || warning || success,\n },\n $attrs.class,\n `--${color}`,\n `--${size}`,\n ]\"\n >\n <div\n class=\"m-input-wrapper maz-border\"\n :class=\"[inputClasses, borderStyle, { 'maz-rounded-lg': !noRadius }]\"\n >\n <div v-if=\"hasLeftPart()\" class=\"m-input-wrapper-left\">\n <slot v-if=\"$slots['left-icon'] || leftIcon\" name=\"left-icon\">\n <MazIcon :name=\"leftIcon\" class=\"maz-text-gray-400\" />\n </slot>\n </div>\n\n <div class=\"m-input-wrapper-input\">\n <input\n :id=\"id\"\n ref=\"input\"\n :value=\"modelValue\"\n :type=\"inputType\"\n :name=\"name\"\n v-bind=\"$attrs\"\n :placeholder=\"computedPlaceholder\"\n :aria-label=\"label || placeholder\"\n :disabled=\"disabled\"\n :readonly=\"readonly\"\n :required=\"required\"\n class=\"m-input-input\"\n v-on=\"{\n input: (event) => emitValue(event.target.value),\n blur,\n focus,\n }\"\n />\n\n <label\n v-if=\"label || hint\"\n ref=\"label\"\n :for=\"id\"\n class=\"m-input-label\"\n :class=\"[\n {\n 'maz-text-danger-600': error,\n 'maz-text-success-600': success,\n 'maz-text-warning-600': warning,\n },\n ]\"\n >\n {{ hint || label }}\n <sup v-if=\"required\">*</sup>\n </label>\n </div>\n\n <div v-if=\"hasRightPart()\" class=\"m-input-wrapper-right\">\n <slot v-if=\"$slots['right-icon'] || rightIcon\" name=\"right-icon\">\n <MazIcon :name=\"rightIcon\" class=\"maz-text-gray-400\" />\n </slot>\n\n <MazBtn\n v-if=\"isPasswordType\"\n color=\"transparent\"\n tabindex=\"-1\"\n size=\"mini\"\n @click.stop=\"hasPasswordVisible = !hasPasswordVisible\"\n >\n <MazIcon\n v-if=\"hasPasswordVisible\"\n name=\"eye-off\"\n class=\"maz-text-gray-400\"\n />\n <MazIcon v-else name=\"eye\" class=\"maz-text-gray-400\" />\n </MazBtn>\n\n <slot v-if=\"$slots['valid-button'] || validButton\" name=\"valid-button\">\n <MazBtn\n color=\"transparent\"\n :disabled=\"disabled\"\n tabindex=\"-1\"\n :loading=\"validButtonLoading\"\n class=\"m-input-valid-button\"\n size=\"mini\"\n type=\"submit\"\n >\n <MazIcon class=\"maz-text-normal-text\" name=\"check\" />\n </MazBtn>\n </slot>\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, onMounted, ref, PropType } from 'vue'\n import { debounce } from './../utils/debounce'\n import MazBtn from './MazBtn.vue'\n import MazIcon from './MazIcon.vue'\n import { Color, Size } from './types'\n\n export default defineComponent({\n components: { MazBtn, MazIcon },\n inheritAttrs: false,\n props: {\n modelValue: {\n type: [String, Number] as PropType<\n string | number | null | undefined | boolean\n >,\n default: undefined,\n },\n placeholder: { type: String, default: undefined },\n color: {\n type: String as PropType<Color>,\n default: 'primary',\n validator: (value: string) => {\n return [\n 'primary',\n 'secondary',\n 'warning',\n 'danger',\n 'info',\n 'success',\n 'white',\n 'black',\n ].includes(value)\n },\n },\n label: { type: String, default: undefined },\n name: { type: String, default: 'input' },\n type: {\n type: String,\n default: 'text',\n validator: (value: string) => {\n return [\n 'text',\n 'date',\n 'number',\n 'tel',\n 'search',\n 'url',\n 'password',\n 'month',\n 'time',\n 'week',\n 'email',\n ].includes(value)\n },\n },\n required: { type: Boolean, default: false },\n disabled: { type: Boolean, default: false },\n readonly: { type: Boolean, default: false },\n id: { type: String, default: 'MazInput' },\n error: { type: Boolean, default: false },\n success: { type: Boolean, default: false },\n warning: { type: Boolean, default: false },\n hint: { type: String, default: undefined },\n inputClasses: { type: String, default: undefined },\n noBorder: { type: Boolean, default: false },\n noRadius: { type: Boolean, default: false },\n size: {\n type: String as PropType<Size>,\n default: 'md',\n validator: (value: string) => {\n return ['mini', 'xs', 'sm', 'md', 'lg', 'xl'].includes(value)\n },\n },\n debounce: { type: Boolean, default: false },\n debounceDelay: { type: Number, default: 500 },\n validButton: { type: Boolean, default: false },\n validButtonLoading: { type: Boolean, default: false },\n autoFocus: { type: Boolean, default: false },\n leftIcon: { type: String, default: undefined },\n rightIcon: { type: String, default: undefined },\n },\n emits: ['focus', 'blur', 'update:model-value'],\n setup(props, { emit, slots }) {\n const hasPasswordVisible = ref(false)\n const isFocused = ref(false)\n const input = ref<HTMLElement | undefined>()\n\n onMounted(() => {\n if (props.autoFocus) {\n input.value?.focus()\n }\n })\n\n const isPasswordType = computed(() => props.type === 'password')\n\n const inputType = computed(() =>\n hasPasswordVisible.value ? 'text' : props.type,\n )\n\n const borderStyle = computed(() => {\n if (props.noBorder) return undefined\n if (props.error) return 'maz-border-danger'\n if (props.success) return 'maz-border-success'\n if (props.warning) return 'maz-border-warning'\n if (isFocused.value) {\n if (props.color === 'black') return 'maz-border-black'\n if (props.color === 'danger') return 'maz-border-danger'\n if (props.color === 'info') return 'maz-border-info'\n if (props.color === 'primary') return 'maz-border-primary'\n if (props.color === 'secondary') return 'maz-border-secondary'\n if (props.color === 'success') return 'maz-border-success'\n if (props.color === 'warning') return 'maz-border-warning'\n if (props.color === 'white') return 'maz-border-white'\n }\n return 'maz-border-gray-200'\n })\n\n const computedPlaceholder = computed(() => {\n const { required, placeholder } = props\n if (!placeholder) return undefined\n return required ? `${placeholder} *` : placeholder\n })\n\n const hasValue = computed(\n () => props.modelValue !== undefined && props.modelValue !== '',\n )\n\n const shouldUp = computed(() => {\n return (\n (!!props.label || !!props.hint) &&\n (isFocused.value ||\n !!hasValue.value ||\n !!props.placeholder ||\n ['date', 'month', 'week'].includes(props.type))\n )\n })\n\n const hasLabel = computed(() => !!props.label || !!props.hint)\n\n const hasRightPart = (): boolean => {\n return (\n !!slots['right-icon'] ||\n isPasswordType.value ||\n !!slots['valid-button'] ||\n props.validButton ||\n !!props.rightIcon\n )\n }\n\n const hasLeftPart = (): boolean => {\n return !!slots['left-icon'] || !!props.leftIcon\n }\n\n const focus = (event: Event) => {\n emit('focus', event)\n isFocused.value = true\n }\n\n const blur = (event: Event) => {\n emit('blur', event)\n isFocused.value = false\n }\n\n const debounceEmitValue = debounce((value: string | number) => {\n emit('update:model-value', value[0])\n }, props.debounceDelay)\n\n const emitValue = (value: string | number) => {\n if (props.debounce) return debounceEmitValue(value)\n\n emit('update:model-value', value)\n }\n\n return {\n shouldUp,\n hasLabel,\n computedPlaceholder,\n isPasswordType,\n inputType,\n input,\n isFocused,\n hasPasswordVisible,\n borderStyle,\n focus,\n blur,\n emitValue,\n hasRightPart,\n hasLeftPart,\n }\n },\n })\n</script>\n\n<style lang=\"postcss\" scoped>\n /* stylelint-disable no-descending-specificity */\n .m-input {\n @apply maz-flex maz-flex-col;\n\n &.--xl {\n @apply maz-h-16;\n\n & .m-input-input,\n & .m-input-label {\n @apply maz-text-xl;\n }\n }\n\n &.--lg {\n @apply maz-h-14;\n\n & .m-input-input,\n & .m-input-label {\n @apply maz-text-lg;\n }\n }\n\n &.--md {\n @apply maz-h-12;\n\n & .m-input-input,\n & .m-input-label {\n @apply maz-text-base;\n }\n }\n\n &.--sm {\n @apply maz-h-10;\n\n & .m-input-input,\n & .m-input-label {\n @apply maz-text-sm;\n }\n }\n\n &.--xs {\n @apply maz-h-8;\n\n & .m-input-input,\n & .m-input-label {\n @apply maz-text-xs;\n }\n }\n\n &.--mini {\n @apply maz-h-6;\n\n & .m-input-input,\n & .m-input-label {\n @apply maz-text-xs;\n }\n }\n\n &-wrapper {\n @apply maz-relative maz-z-1 maz-flex maz-flex-1 maz-overflow-hidden maz-border-solid maz-bg-color maz-transition-colors maz-duration-300;\n\n &-input {\n @apply maz-relative maz-flex maz-flex-1 maz-items-center;\n }\n\n &-right,\n &-left {\n @apply maz-relative maz-z-1 maz-flex maz-space-x-1 maz-py-1 maz-flex-center;\n }\n\n &-right {\n @apply maz-px-1;\n }\n\n &-left {\n @apply maz-left-1;\n }\n }\n\n &-input {\n @apply maz-outline-none maz-m-0 maz-block maz-w-full maz-appearance-none maz-border-none maz-bg-transparent maz-shadow-none;\n\n @apply maz-h-auto maz-py-0 maz-px-4 maz-text-normal-text;\n }\n\n &-label {\n @apply maz-pointer-events-none maz-absolute maz-block maz-w-max maz-origin-top-left maz-truncate;\n\n @apply maz-left-4 maz-leading-6;\n\n transition: transform 200ms cubic-bezier(0, 0, 0.2, 1) 0ms;\n }\n\n &:not(.--has-state) {\n @apply maz-text-gray-500;\n }\n\n &.--has-z-2 {\n & .m-input-wrapper {\n @apply maz-z-2;\n }\n }\n\n &.--should-up {\n & .m-input-label {\n transform: scale(0.8) translateY(-0.65rem);\n }\n }\n\n &.--is-disabled {\n & .m-input-wrapper {\n @apply maz-bg-color maz-text-muted;\n }\n\n & .m-input-input {\n @apply maz-cursor-not-allowed maz-text-muted;\n }\n\n & .m-input-label {\n @apply maz-text-muted;\n }\n }\n\n &.--is-focused {\n & .m-input-wrapper {\n @apply maz-z-3;\n }\n }\n\n &.--has-label {\n .m-input-input {\n @apply maz-px-4 maz-pt-4;\n }\n }\n }\n\n html.dark {\n & .m-input:not(.--is-disabled) {\n & .m-input-wrapper {\n @apply maz-bg-color-light;\n }\n }\n\n & .m-input:not(.--is-focused):not(.--has-state) {\n & .m-input-wrapper {\n @apply maz-border-color-lighter;\n }\n }\n }\n</style>\n","interface FilterCurrencyOptions extends Intl.NumberFormatOptions {\n round?: boolean\n}\n\nconst DEFAULT_OPTIONS: FilterCurrencyOptions = {\n style: 'currency',\n minimumFractionDigits: 2,\n round: false,\n}\n\nconst getFormattedCurrency = (\n number: number | string,\n locale: string,\n options: FilterCurrencyOptions,\n) => {\n let numberToFormat = Number(number)\n\n if (options.round) {\n numberToFormat = Math.floor(numberToFormat)\n options.minimumFractionDigits = 0\n }\n\n return new Intl.NumberFormat(locale, options).format(numberToFormat)\n}\n\nconst validRequiredAttributes = (\n number: number | string,\n locale: string,\n options: FilterCurrencyOptions,\n) => {\n if (typeof number === 'undefined')\n throw new TypeError('[FilterCurrency] The `number` attribute is required.')\n if (typeof locale === 'undefined')\n throw new TypeError('[FilterCurrency] The `locale` attribute is required.')\n if (typeof locale !== 'string')\n throw new TypeError(\n '[FilterCurrency] The `locale` attribute must be a string.',\n )\n if (typeof options.currency === 'undefined')\n throw new TypeError(\n '[FilterCurrency] The `options.currency` attribute is required.',\n )\n}\n\nexport const currency = (\n number: number | string,\n locale: string,\n options: FilterCurrencyOptions,\n): string => {\n const options_: FilterCurrencyOptions = {\n ...DEFAULT_OPTIONS,\n ...options,\n }\n\n validRequiredAttributes(number, locale, options_)\n\n try {\n return getFormattedCurrency(number, locale, options_)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n } catch (error: any) {\n throw new Error(`[FilterCurrency] ${error}`)\n }\n}\n","<template>\n <MazInput\n v-model=\"displayPrice\"\n class=\"maz-input-price\"\n v-bind=\"$attrs\"\n left-icon=\"cash\"\n @focus=\"isActive = true\"\n @blur=\"isActive = false\"\n />\n</template>\n\n<script lang=\"ts\" setup>\n import { computed, nextTick, onBeforeMount, ref } from 'vue'\n import { currency } from '../filters'\n import MazInput from './MazInput.vue'\n\n const props = defineProps({\n modelValue: { type: [Number, String], default: undefined },\n currency: { type: String, default: 'EUR' },\n locale: { type: String, default: 'fr-FR' },\n min: { type: Number, default: 0 },\n max: { type: Number, default: Infinity },\n })\n\n const emits = defineEmits(['update:model-value', 'formatted'])\n\n const isActive = ref(false)\n const valueString = computed<string>(() => {\n return typeof props.modelValue === 'number'\n ? getAdjustedPrice(props.modelValue).toString()\n : getAdjustedPrice(props.modelValue).toString()\n })\n const valueNumber = computed<number>(() => {\n const value =\n typeof props.modelValue === 'string'\n ? Number(props.modelValue)\n : props.modelValue\n\n return getAdjustedPrice(value)\n })\n\n const priceFormatted = computed(() =>\n currency(valueNumber.value, props.locale, { currency: props.currency }),\n )\n\n const getAdjustedPrice = (value?: string | number) => {\n let newValue =\n typeof value === 'string'\n ? parseFloat(\n // eslint-disable-next-line no-useless-escape\n value.replace(',', '.').replace(/[^\\d\\.]/g, ''),\n )\n : value\n if (!newValue || isNaN(newValue)) newValue = 0\n if (newValue < props.min) newValue = props.min\n if (newValue > props.max) newValue = props.max\n\n return newValue\n }\n\n const displayPrice = computed({\n get: () => {\n if (isActive.value) return valueString.value\n if (props.modelValue) return priceFormatted.value\n return undefined\n },\n set: (value) => {\n if (!value) {\n emitValues(undefined)\n } else {\n const adjustedPrice = getAdjustedPrice(value)\n emitValues(adjustedPrice)\n }\n },\n })\n\n const emitValues = async (newValue?: number) => {\n const adjustedPrice = newValue ? getAdjustedPrice(newValue) : undefined\n emits('update:model-value', adjustedPrice)\n\n await nextTick()\n emits('formatted', priceFormatted.value)\n }\n\n onBeforeMount(() => {\n emitValues(getAdjustedPrice(props.modelValue))\n })\n</script>\n","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","export const countriesNameListByIsoCode: { [key: string]: string } = {\n AC: 'Ascension Island',\n AF: 'Afghanistan',\n AL: 'Albania',\n DZ: 'Algeria',\n AS: 'American Samoa',\n AD: 'Andorra',\n AO: 'Angola',\n AI: 'Anguilla',\n AQ: 'Antarctica',\n AG: 'Antigua and Barbuda',\n AR: 'Argentina',\n AM: 'Armenia',\n AW: 'Aruba',\n AU: 'Australia',\n AT: 'Austria',\n AZ: 'Azerbaijan',\n BS: 'Bahamas (the)',\n BH: 'Bahrain',\n BD: 'Bangladesh',\n BB: 'Barbados',\n BY: 'Belarus',\n BE: 'Belgium',\n BZ: 'Belize',\n BJ: 'Benin',\n BM: 'Bermuda',\n BT: 'Bhutan',\n BO: 'Bolivia (Plurinational State of)',\n BQ: 'Bonaire, Sint Eustatius and Saba',\n BA: 'Bosnia and Herzegovina',\n BW: 'Botswana',\n BV: 'Bouvet Island',\n BR: 'Brazil',\n IO: 'British Indian Ocean Territory (the)',\n BN: 'Brunei Darussalam',\n BG: 'Bulgaria',\n BF: 'Burkina Faso',\n BI: 'Burundi',\n CV: 'Cabo Verde',\n KH: 'Cambodia',\n CM: 'Cameroon',\n CA: 'Canada',\n KY: 'Cayman Islands (the)',\n CF: 'Central African Republic (the)',\n TD: 'Chad',\n CL: 'Chile',\n CN: 'China',\n CX: 'Christmas Island',\n CC: 'Cocos (Keeling) Islands (the)',\n CO: 'Colombia',\n KM: 'Comoros (the)',\n CD: 'Congo (the Democratic Republic of the)',\n CG: 'Congo (the)',\n CK: 'Cook Islands (the)',\n CR: 'Costa Rica',\n HR: 'Croatia',\n CU: 'Cuba',\n CW: 'Curaçao',\n CY: 'Cyprus',\n CZ: 'Czechia',\n CI: \"Côte d'Ivoire\",\n DK: 'Denmark',\n DJ: 'Djibouti',\n DM: 'Dominica',\n DO: 'Dominican Republic (the)',\n EC: 'Ecuador',\n EG: 'Egypt',\n SV: 'El Salvador',\n GQ: 'Equatorial Guinea',\n ER: 'Eritrea',\n EE: 'Estonia',\n SZ: 'Eswatini',\n ET: 'Ethiopia',\n FK: 'Falkland Islands (the) [Malvinas]',\n FO: 'Faroe Islands (the)',\n FJ: 'Fiji',\n FI: 'Finland',\n FR: 'France',\n GF: 'French Guiana',\n PF: 'French Polynesia',\n TF: 'French Southern Territories (the)',\n GA: 'Gabon',\n GM: 'Gambia (the)',\n GE: 'Georgia',\n DE: 'Germany',\n GH: 'Ghana',\n GI: 'Gibraltar',\n GR: 'Greece',\n GL: 'Greenland',\n GD: 'Grenada',\n GP: 'Guadeloupe',\n GU: 'Guam',\n GT: 'Guatemala',\n GG: 'Guernsey',\n GN: 'Guinea',\n GW: 'Guinea-Bissau',\n GY: 'Guyana',\n HT: 'Haiti',\n HM: 'Heard Island and McDonald Islands',\n VA: 'Holy See (the)',\n HN: 'Honduras',\n HK: 'Hong Kong',\n HU: 'Hungary',\n IS: 'Iceland',\n IN: 'India',\n ID: 'Indonesia',\n IR: 'Iran (Islamic Republic of)',\n IQ: 'Iraq',\n IE: 'Ireland',\n IM: 'Isle of Man',\n IL: 'Israel',\n IT: 'Italy',\n JM: 'Jamaica',\n JP: 'Japan',\n JE: 'Jersey',\n JO: 'Jordan',\n KZ: 'Kazakhstan',\n KE: 'Kenya',\n KI: 'Kiribati',\n KP: \"Korea (the Democratic People's Republic of)\",\n KR: 'Korea (the Republic of)',\n KW: 'Kuwait',\n KG: 'Kyrgyzstan',\n LA: \"Lao People's Democratic Republic (the)\",\n LV: 'Latvia',\n LB: 'Lebanon',\n LS: 'Lesotho',\n LR: 'Liberia',\n LY: 'Libya',\n LI: 'Liechtenstein',\n LT: 'Lithuania',\n LU: 'Luxembourg',\n MO: 'Macao',\n MG: 'Madagascar',\n MW: 'Malawi',\n MY: 'Malaysia',\n MV: 'Maldives',\n ML: 'Mali',\n MT: 'Malta',\n MH: 'Marshall Islands (the)',\n MQ: 'Martinique',\n MR: 'Mauritania',\n MU: 'Mauritius',\n YT: 'Mayotte',\n MX: 'Mexico',\n FM: 'Micronesia (Federated States of)',\n MD: 'Moldova (the Republic of)',\n MC: 'Monaco',\n MN: 'Mongolia',\n ME: 'Montenegro',\n MS: 'Montserrat',\n MA: 'Morocco',\n MZ: 'Mozambique',\n MM: 'Myanmar',\n NA: 'Namibia',\n NR: 'Nauru',\n NP: 'Nepal',\n NL: 'Netherlands (the)',\n NC: 'New Caledonia',\n NZ: 'New Zealand',\n NI: 'Nicaragua',\n NE: 'Niger (the)',\n NG: 'Nigeria',\n NU: 'Niue',\n NF: 'Norfolk Island',\n MP: 'Northern Mariana Islands (the)',\n NO: 'Norway',\n OM: 'Oman',\n PK: 'Pakistan',\n PW: 'Palau',\n PS: 'Palestine, State of',\n PA: 'Panama',\n PG: 'Papua New Guinea',\n PY: 'Paraguay',\n PE: 'Peru',\n PH: 'Philippines (the)',\n PN: 'Pitcairn',\n PL: 'Poland',\n PT: 'Portugal',\n PR: 'Puerto Rico',\n QA: 'Qatar',\n MK: 'Republic of North Macedonia',\n RO: 'Romania',\n RU: 'Russian Federation (the)',\n RW: 'Rwanda',\n RE: 'Réunion',\n BL: 'Saint Barthélemy',\n SH: 'Saint Helena, Ascension and Tristan da Cunha',\n KN: 'Saint Kitts and Nevis',\n LC: 'Saint Lucia',\n MF: 'Saint Martin (French part)',\n PM: 'Saint Pierre and Miquelon',\n VC: 'Saint Vincent and the Grenadines',\n WS: 'Samoa',\n SM: 'San Marino',\n ST: 'Sao Tome and Principe',\n SA: 'Saudi Arabia',\n SN: 'Senegal',\n RS: 'Serbia',\n SC: 'Seychelles',\n SL: 'Sierra Leone',\n SG: 'Singapore',\n SX: 'Sint Maarten (Dutch part)',\n SK: 'Slovakia',\n SI: 'Slovenia',\n SB: 'Solomon Islands',\n SO: 'Somalia',\n ZA: 'South Africa',\n GS: 'South Georgia and the South Sandwich Islands',\n SS: 'South Sudan',\n ES: 'Spain',\n LK: 'Sri Lanka',\n SD: 'Sudan (the)',\n SR: 'Suriname',\n SJ: 'Svalbard and Jan Mayen',\n SE: 'Sweden',\n CH: 'Switzerland',\n SY: 'Syrian Arab Republic',\n TA: 'Tajikistan',\n TW: 'Taiwan',\n TJ: 'Tajikistan',\n TZ: 'Tanzania, United Republic of',\n TH: 'Thailand',\n TL: 'Timor-Leste',\n TG: 'Togo',\n TK: 'Tokelau',\n TO: 'Tonga',\n TT: 'Trinidad and Tobago',\n TN: 'Tunisia',\n TR: 'Turkey',\n TM: 'Turkmenistan',\n TC: 'Turks and Caicos Islands (the)',\n TV: 'Tuvalu',\n UG: 'Uganda',\n UA: 'Ukraine',\n AE: 'United Arab Emirates (the)',\n GB: 'United Kingdom of Great Britain and Northern Ireland (the)',\n UM: 'United States Minor Outlying Islands (the)',\n US: 'United States of America (the)',\n UY: 'Uruguay',\n UZ: 'Uzbekistan',\n VU: 'Vanuatu',\n VE: 'Venezuela (Bolivarian Republic of)',\n VN: 'Viet Nam',\n VG: 'Virgin Islands (British)',\n VI: 'Virgin Islands (U.S.)',\n WF: 'Wallis and Futuna',\n EH: 'Western Sahara',\n YE: 'Yemen',\n XK: 'Kosovo',\n ZM: 'Zambia',\n ZW: 'Zimbabwe',\n AX: 'Åland Islands',\n}\n","import {\n parsePhoneNumberFromString,\n AsYouType,\n CountryCode,\n getCountries,\n getCountryCallingCode,\n getExampleNumber,\n isSupportedCountry,\n Examples,\n} from 'libphonenumber-js'\nimport { countriesNameListByIsoCode } from './countries-name-list-by-iso-code'\nimport { Country, Result } from '../types'\n\nexport function getCountryName(code: CountryCode | string): string | undefined {\n return countriesNameListByIsoCode[code]\n}\n\nconst PHONE_CHAR_REGEX = /^[-.() \\d]+$/\nconst NON_ALPHA_REGEX = /^[^a-z]+$/i\n\nlet examples: Examples\n\nexport async function loadPhoneNumberExamplesFile() {\n examples = (await import('libphonenumber-js/examples.mobile.json')).default\n return examples\n}\n\nexport function getExamplePhoneNumber(countryCode: CountryCode) {\n return getExampleNumber(countryCode, examples)\n}\n\nexport function sanitizePhoneNumber(input?: string) {\n if (!input) {\n return undefined\n }\n\n const hasNonAlpha = NON_ALPHA_REGEX.test(input)\n const hasPhoneChar = PHONE_CHAR_REGEX.test(input)\n\n if (!hasNonAlpha && !hasPhoneChar) {\n return input.replace(/[^0-9.]/g, '')\n }\n\n return input\n}\n\nexport function getCountriesList(): Country[] | undefined {\n const countriesList: Country[] = []\n const isoList = getCountries()\n\n for (const iso2 of isoList) {\n const name = getCountryName(iso2)\n\n if (name) {\n try {\n const dialCode = getCountryCallingCode(iso2)\n countriesList.push({\n iso2,\n dialCode,\n name,\n })\n } catch (err) {\n // eslint-disable-next-line no-console\n console.error(`[MazPhoneNumberInput] (getCountryCallingCode) ${err}`)\n }\n }\n }\n\n return countriesList\n}\n\nexport function browserLocale() {\n try {\n if (typeof window === 'undefined') {\n return undefined\n }\n\n const browserLocale = window.navigator.language\n\n if (!browserLocale) {\n return undefined\n }\n\n let locale = browserLocale.substr(3, 4).toUpperCase()\n\n if (locale === '') {\n locale = browserLocale.substr(0, 2).toUpperCase()\n }\n\n if (locale === 'EN') {\n locale = 'US'\n }\n if (locale === 'JA') {\n locale = 'JP'\n }\n\n return locale\n } catch (err) {\n throw new Error(`[MazPhoneNumberInput] (browserLocale) ${err}`)\n }\n}\n\nexport function isCountryAvailable(locale: string) {\n try {\n return isSupportedCountry(locale)\n } catch (err) {\n throw new Error(\n `[MazPhoneNumberInput] (isCountryAvailable) The country ${locale} is not available - ${err}`,\n )\n }\n}\n\nexport const getResultsFromPhoneNumber = (\n countryCode?: CountryCode,\n phoneNumber?: string,\n): Result => {\n try {\n if (!phoneNumber) {\n return {\n isValid: false,\n countryCode,\n }\n }\n const parsing = parsePhoneNumberFromString(phoneNumber, countryCode)\n\n return {\n isValid: parsing?.isValid() ?? false,\n countryCode: parsing?.country,\n countryCallingCode: parsing?.countryCallingCode,\n nationalNumber: parsing?.nationalNumber,\n type: parsing?.getType(),\n formatInternational: parsing?.formatInternational(),\n formatNational: parsing?.formatNational(),\n uri: parsing?.getURI(),\n e164: parsing?.format('E.164'),\n }\n } catch (err) {\n throw new Error(`[MazPhoneNumberInput] (getResultsFromPhoneNumber) ${err}`)\n }\n}\n\nexport function getAsYouTypeFormat(\n countryCode: CountryCode,\n phoneNumber?: string,\n) {\n try {\n if (!phoneNumber) {\n return undefined\n }\n\n return countryCode\n ? new AsYouType(countryCode).input(phoneNumber)\n : phoneNumber\n } catch (err) {\n throw new Error(`[MazPhoneNumberInput] (getAsYouTypeFormat) ${err}`)\n }\n}\n\nexport async function fetchCountryCode() {\n try {\n const response = await fetch('https://ip2c.gorg/s')\n const responseText = await response.text()\n const result = (responseText || '').toString()\n\n if (!result || result[0] !== '1') {\n return undefined\n }\n\n return result.substr(2, 2)\n } catch (err) {\n throw new Error(`[MazPhoneNumberInput] (fetchCountryCode) ${err}`)\n }\n}\n\ntype Truthy<T> = T extends false | '' | 0 | null | undefined ? never : T\nexport function truthyFilter<T>(value: T): value is Truthy<T> {\n return !!value\n}\n","export default {\n countrySelector: {\n placeholder: 'Country code',\n error: 'Choose country',\n },\n phoneInput: {\n placeholder: 'Phone number',\n example: 'Example:',\n },\n}\n","<template>\n <div\n ref=\"mazSelect\"\n class=\"m-select\"\n :class=\"{ '--is-open': hasListOpen, '--disabled': disabled }\"\n @blur.capture=\"closeList\"\n @keydown.esc=\"closeList\"\n >\n <MazInput\n ref=\"mazInput\"\n class=\"m-select-input\"\n v-bind=\"$attrs\"\n :color=\"color\"\n :model-value=\"mazInputValue\"\n readonly\n :size=\"size\"\n :disabled=\"disabled\"\n @focus=\"openList\"\n @click=\"openList\"\n @keydown=\"keyboardHandler($event)\"\n >\n <template #right-icon>\n <button\n tabindex=\"-1\"\n class=\"maz-custom maz-flex maz-h-full maz-bg-transparent maz-flex-center\"\n @click=\"openList\"\n >\n <MazIcon\n name=\"chevron-down\"\n class=\"m-select-chevron maz-h-5 maz-w-5 maz-text-normal-text\"\n />\n </button>\n </template>\n </MazInput>\n <Transition :name=\"listTransition\">\n <div\n v-if=\"hasListOpen || open\"\n ref=\"optionsList\"\n class=\"m-select-list\"\n :style=\"{\n maxHeight: `${maxListHeight}px`,\n maxWidth: `${maxListWidth}px`,\n }\"\n >\n <button\n v-for=\"(option, i) in options\"\n :key=\"i\"\n tabindex=\"-1\"\n type=\"button\"\n class=\"m-select-list-item maz-custom\"\n :class=\"[\n {\n '--is-keyboard-selected': tmpModelValueIndex === i,\n '--is-selected':\n selectedOption?.[optionValueKey] === option[optionValueKey],\n },\n `--${color}`,\n ]\"\n :style=\"{ height: `${itemHeight}px` }\"\n @click.prevent.stop=\"updateValue(option)\"\n >\n <slot\n :option=\"option\"\n :is-selected=\"\n selectedOption?.[optionValueKey] === option[optionValueKey]\n \"\n >\n {{ option[optionLabelKey] }}\n </slot>\n </button>\n </div>\n </Transition>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n // TODO: listPosition\n import { ref, PropType, computed, onBeforeMount, nextTick } from 'vue'\n import MazInput from './MazInput.vue'\n import MazIcon from './MazIcon.vue'\n import { Color, ModelValueSimple, Position, Size } from './types'\n\n export type MazSelectOptions = Record<string, ModelValueSimple>\n\n const props = defineProps({\n modelValue: {\n type: [Number, String, Boolean] as PropType<ModelValueSimple>,\n default: undefined,\n },\n options: { type: Array as PropType<MazSelectOptions[]>, required: true },\n optionValueKey: { type: String, default: 'value' },\n optionLabelKey: { type: String, default: 'label' },\n optionInputValueKey: { type: String, default: 'label' },\n listPosition: {\n type: String as PropType<Position>,\n default: 'bottom left',\n validator: (value: Position) => {\n return [\n 'top',\n 'top right',\n 'top left',\n 'bottom',\n 'bottom right',\n 'bottom left',\n ].includes(value)\n },\n },\n disabled: { type: Boolean, default: false },\n open: { type: Boolean, default: false },\n color: {\n type: String as PropType<Color>,\n default: 'primary',\n validator: (value: string) => {\n return [\n 'primary',\n 'secondary',\n 'warning',\n 'danger',\n 'info',\n 'success',\n 'white',\n 'black',\n 'transparent',\n ].includes(value)\n },\n },\n itemHeight: { type: Number, default: 40 },\n maxListHeight: { type: Number, default: 240 },\n maxListWidth: { type: Number, default: undefined },\n size: {\n type: String as PropType<Size>,\n default: 'md',\n validator: (value: string) => {\n return ['mini', 'xs', 'sm', 'md', 'lg', 'xl'].includes(value)\n },\n },\n })\n const emits = defineEmits(['close', 'open', 'update:model-value', 'blur'])\n\n const hasListOpen = ref(false)\n const tmpModelValueIndex = ref<number>()\n\n onBeforeMount(() => {\n if (selectedOption.value)\n tmpModelValueIndex.value = props.options.findIndex(\n (option) =>\n option[props.optionValueKey] ===\n selectedOption.value?.[props.optionLabelKey],\n )\n })\n\n const mazSelect = ref<HTMLDivElement>()\n const mazInput = ref<typeof MazInput>()\n const optionsList = ref<HTMLDivElement>()\n\n const selectedOption = computed(() =>\n props.options.find(\n (option) => props.modelValue === option[props.optionValueKey],\n ),\n )\n\n const mazInputValue = computed(\n () => selectedOption.value?.[props.optionInputValueKey],\n )\n\n const listTransition = computed(() =>\n props.listPosition.includes('bottom') ? 'maz-slide' : 'maz-slideinvert',\n )\n\n const closeList = async (event?: FocusEvent | KeyboardEvent) => {\n if (\n event &&\n (('relatedTarget' in event &&\n mazSelect.value?.contains(event.relatedTarget as Node)) ||\n event.type === 'keydown')\n ) {\n return event.preventDefault()\n }\n\n await nextTick()\n hasListOpen.value = false\n emits('close', event)\n }\n\n const openList = (event?: Event) => {\n event?.preventDefault()\n if (props.disabled) return\n hasListOpen.value = true\n scrollToSelected()\n emits('open', event)\n }\n\n const keyboardHandler = (event: KeyboardEvent) => {\n const code = event.code\n\n const currentIndex = tmpModelValueIndex.value\n\n if (code === 'ArrowUp' || code === 'ArrowDown') {\n event.preventDefault()\n if (!hasListOpen.value) openList(event)\n\n const optionsLength = props.options.length\n\n if (typeof currentIndex !== 'number') {\n return (tmpModelValueIndex.value =\n code === 'ArrowDown' ? 0 : optionsLength - 1)\n } else {\n if (currentIndex === optionsLength - 1 && code === 'ArrowDown') {\n tmpModelValueIndex.value = 0\n } else if (currentIndex === 0 && code === 'ArrowUp') {\n tmpModelValueIndex.value = optionsLength - 1\n } else {\n tmpModelValueIndex.value =\n code === 'ArrowDown' ? currentIndex + 1 : currentIndex - 1\n }\n updateValue(props.options[tmpModelValueIndex.value], false)\n }\n scrollToSelected()\n } else if (code === 'Enter' && hasListOpen.value) {\n event.preventDefault()\n if (typeof currentIndex === 'number') {\n const newValue = props.options[currentIndex]\n if (newValue.value !== props.modelValue) updateValue(newValue)\n else {\n closeList()\n }\n }\n } else if (hasListOpen.value) {\n searching(event)\n }\n }\n\n const searchQuery = ref<string>('')\n\n const searching = ({ key, code }: KeyboardEvent) => {\n let queryTimer: ReturnType<typeof setTimeout> | undefined = undefined\n\n clearTimeout(queryTimer)\n queryTimer = setTimeout(() => {\n searchQuery.value = ''\n }, 2000)\n\n if (code === 'Backspace') {\n searchQuery.value = searchQuery.value.substring(\n 0,\n searchQuery.value.length - 1,\n )\n } else if (key.match(/^[a-z0-9]+$/i) && key.length === 1) {\n searchQuery.value += key.toLowerCase()\n\n const resultIndex = props.options.findIndex((option) => {\n if (typeof option[props.optionLabelKey] === 'string') {\n const label = option[props.optionLabelKey] as string\n\n return label.toLowerCase().startsWith(searchQuery.value)\n }\n })\n\n tmpModelValueIndex.value = resultIndex\n scrollToSelected()\n }\n }\n\n const scrollToSelected = async (itemIndex = tmpModelValueIndex.value) => {\n if (itemIndex) {\n await nextTick()\n optionsList.value?.scrollTo({\n top: itemIndex * props.itemHeight - props.itemHeight,\n })\n }\n }\n\n const updateValue = (\n selectedOption: MazSelectOptions,\n mustCloseList = true,\n ) => {\n tmpModelValueIndex.value = props.options.findIndex(\n (option) =>\n selectedOption[props.optionValueKey] === option[props.optionValueKey],\n )\n if (mustCloseList) closeList()\n return emits('update:model-value', selectedOption[props.optionValueKey])\n }\n</script>\n\n<style lang=\"postcss\" scoped>\n .m-select {\n @apply maz-relative;\n\n &:not(.--disabled) {\n @apply maz-cursor-pointer;\n\n &:deep(input) {\n @apply maz-cursor-pointer;\n }\n }\n\n &-chevron {\n @apply maz-transition-all maz-duration-300 maz-ease-out;\n }\n\n &.--is-open {\n & .m-select-chevron {\n transform: rotate(180deg);\n }\n }\n\n &-list {\n @apply maz-absolute maz-z-100 maz-overflow-auto maz-rounded-lg maz-bg-color maz-text-normal-text maz-drop-shadow maz-elevation;\n\n min-width: 3.5rem;\n\n &-item {\n @apply maz-flex maz-w-full maz-items-center maz-bg-transparent maz-px-4 maz-text-left hover:maz-bg-color-light;\n\n &.--is-keyboard-selected {\n @apply maz-bg-color-light maz-font-medium;\n }\n\n &.--is-selected {\n @apply maz-font-semibold;\n\n &.--primary {\n @apply maz-bg-primary maz-text-primary-contrast;\n }\n\n &.--secondary {\n @apply maz-bg-secondary maz-text-secondary-contrast;\n }\n\n &.--info {\n @apply maz-bg-info maz-text-info-contrast;\n }\n\n &.--success {\n @apply maz-bg-success maz-text-success-contrast;\n }\n\n &.--warning {\n @apply maz-bg-warning maz-text-warning-contrast;\n }\n\n &.--danger {\n @apply maz-bg-danger maz-text-danger-contrast;\n }\n\n &.--black {\n @apply maz-bg-black maz-text-black-contrast;\n }\n\n &.--white {\n @apply maz-bg-white maz-text-white-contrast;\n }\n\n &.--transparent {\n @apply maz-bg-color;\n }\n }\n }\n }\n\n & button.maz-custom {\n @apply maz-cursor-pointer maz-appearance-none maz-border-none;\n }\n }\n</style>\n","<template>\n <div\n :id=\"id\"\n class=\"m-phone-number-input maz-relative maz-flex\"\n :class=\"{\n '--no-flags': noFlags,\n }\"\n >\n <button\n v-if=\"countryCode && !noFlags && !noCountrySelector\"\n class=\"m-phone-number-input__country-flag\"\n tabindex=\"-1\"\n type=\"button\"\n @click=\"focusCountrySelector\"\n >\n <div class=\"maz-flag\" :class=\"`maz-flag-${countryCode.toLowerCase()}`\" />\n </button>\n\n <MazSelect\n v-if=\"!noCountrySelector && countryOptions\"\n ref=\"CountrySelector\"\n class=\"m-phone-number-input__select\"\n :class=\"{\n '--no-country-code': !countryCode,\n }\"\n :model-value=\"countryCode\"\n option-value-key=\"iso2\"\n option-label-key=\"name\"\n option-input-value-key=\"dialCode\"\n :max-list-width=\"250\"\n :disabled=\"disabled\"\n :color=\"color\"\n :size=\"size\"\n :list-position=\"listPosition\"\n :options=\"countryOptions\"\n :error=\"error || (!!formattedNumber && !countryCode)\"\n :hint=\"\n !!formattedNumber && !countryCode ? t.countrySelector.error : undefined\n \"\n :label=\"t.countrySelector.placeholder\"\n @update:model-value=\"setCountryCode($event as CountryCode, true)\"\n @focus=\"inputFocused = false\"\n >\n <template #default=\"{ option, isSelected }\">\n <div\n class=\"m-phone-number-input__select__item maz-flex maz-items-center maz-truncate\"\n :class=\"{\n 'm-phone-number-input__select__item--selected': isSelected,\n }\"\n >\n <span\n v-if=\"!noFlags && typeof option.iso2 === 'string'\"\n class=\"maz-flag maz-mr-2\"\n :class=\"[`maz-flag-${option.iso2.toLowerCase()}`]\"\n />\n <span\n v-if=\"showCodeOnList\"\n class=\"maz-w-10 maz-flex-none\"\n :class=\"{ 'maz-text-muted': !isSelected }\"\n >\n {{ option.dialCode }}\n </span>\n <span class=\"maz-flex-1 maz-truncate\">\n {{ option.name }}\n </span>\n </div>\n </template>\n </MazSelect>\n\n <MazInput\n :id=\"id\"\n ref=\"PhoneNumberInput\"\n :model-value=\"formattedNumber\"\n :label=\"inputPlaceholder\"\n :disabled=\"disabled\"\n :color=\"color\"\n :error=\"error || (!!formattedNumber && !results.isValid)\"\n v-bind=\"$attrs\"\n :size=\"size\"\n icon-name=\"phone\"\n type=\"tel\"\n clearable\n class=\"m-phone-number-input__input maz-flex-1\"\n :class=\"{\n '--border-radius': !noCountrySelector,\n '--error': error || !results.isValid,\n '--focused': inputFocused,\n }\"\n @focus=\"inputFocused = true\"\n @blur=\"inputFocused = true\"\n @update:model-value=\"buildResults($event)\"\n @keydown=\"lastKeyPressed = $event.key\"\n />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n // TODO: listPosition\n // import { getCountryCallingCode } from 'libphonenumber-js'\n import type { CountryCode } from 'libphonenumber-js'\n\n import {\n fetchCountryCode,\n browserLocale,\n getResultsFromPhoneNumber,\n getAsYouTypeFormat,\n isCountryAvailable,\n getCountriesList,\n getExamplePhoneNumber,\n sanitizePhoneNumber,\n loadPhoneNumberExamplesFile,\n truthyFilter,\n } from './utils'\n import locales from './constantes/locales'\n\n import { Result, Translations } from './types'\n\n import {\n ComponentPublicInstance,\n computed,\n nextTick,\n onBeforeMount,\n onMounted,\n PropType,\n ref,\n watch,\n } from 'vue'\n\n import MazInput from './../MazInput.vue'\n import MazSelect from './../MazSelect.vue'\n import { Color, Position, Size } from '../types'\n\n const emits = defineEmits(['update', 'update:model-value', 'country-code'])\n\n const props = defineProps({\n modelValue: {\n type: String,\n validator: (prop: string) => {\n return typeof prop === 'string' || prop === undefined\n },\n default: undefined,\n },\n id: { type: String, default: undefined },\n placeholder: { type: String, default: undefined },\n defaultPhoneNumber: { type: String, default: undefined },\n defaultCountryCode: {\n type: String as PropType<CountryCode>,\n default: undefined,\n validator: (code: CountryCode) => {\n return isCountryAvailable(code)\n },\n },\n preferredCountries: {\n type: Array as PropType<CountryCode[]>,\n default: undefined,\n },\n ignoredCountries: {\n type: Array as PropType<CountryCode[]>,\n default: undefined,\n },\n onlyCountries: {\n type: Array as PropType<CountryCode[]>,\n default: undefined,\n },\n translations: {\n type: Object as PropType<Translations>,\n default: undefined,\n },\n listPosition: {\n type: String as PropType<Position>,\n default: 'bottom left',\n validator: (value: Position) => {\n return [\n 'top',\n 'top right',\n 'top left',\n 'bottom',\n 'bottom right',\n 'bottom left',\n ].includes(value)\n },\n },\n color: {\n type: String as PropType<Color>,\n default: 'primary',\n validator: (value: string) => {\n return [\n 'primary',\n 'secondary',\n 'warning',\n 'danger',\n 'info',\n 'success',\n 'white',\n 'black',\n ].includes(value)\n },\n },\n size: {\n type: String as PropType<Size>,\n default: 'md',\n validator: (value: string) => {\n return ['mini', 'xs', 'sm', 'md', 'lg', 'xl'].includes(value)\n },\n },\n noFlags: { type: Boolean, default: false },\n disabled: { type: Boolean, default: false },\n noExample: { type: Boolean, default: false },\n noSearch: { type: Boolean, default: false },\n noUseBrowserLocale: { type: Boolean, default: false },\n fetchCountry: { type: Boolean, default: false },\n noCountrySelector: { type: Boolean, default: false },\n showCodeOnList: { type: Boolean, default: false },\n error: { type: Boolean, default: false },\n })\n\n const results = ref<Partial<Result>>({})\n const countryCode = ref<CountryCode>()\n const formattedNumber = ref<string>()\n const examplesFileLoaded = ref(false)\n const inputFocused = ref(false)\n const lastKeyPressed = ref<KeyboardEvent['key']>()\n const CountrySelector = ref<ComponentPublicInstance>()\n const PhoneNumberInput = ref<ComponentPublicInstance>()\n\n onBeforeMount(async () => {\n countryCode.value = props.defaultCountryCode\n formattedNumber.value = props.defaultPhoneNumber\n\n try {\n if (!props.noExample && !examplesFileLoaded.value) {\n await loadPhoneNumberExamplesFile()\n examplesFileLoaded.value = true\n }\n } catch (err) {\n throw new Error(\n '[MazPhoneNumberInput] while loading phone number examples file',\n )\n }\n })\n\n onMounted(async () => {\n try {\n if (!props.defaultPhoneNumber && props.modelValue) {\n buildResults(props.modelValue)\n }\n\n if (props.defaultCountryCode && props.fetchCountry) {\n throw new Error(\n \"[MazPhoneNumberInput] Do not use 'fetch-country' and 'default-country-code' options in the same time\",\n )\n }\n if (props.defaultCountryCode && props.noUseBrowserLocale) {\n throw new Error(\n \"[MazPhoneNumberInput] If you use a 'default-country-code', do not use 'no-use-browser-locale' options\",\n )\n }\n\n if (!props.defaultCountryCode) {\n const locale = props.fetchCountry\n ? await fetchCountryCode()\n : props.noUseBrowserLocale\n ? undefined\n : browserLocale()\n\n if (locale) {\n setCountryCode(locale as CountryCode)\n }\n }\n } catch (err) {\n throw new Error(`[MazPhoneNumberInput] (mounted) ${err}`)\n }\n })\n\n const countries = computed(() => getCountriesList())\n\n const t = computed(() => ({\n ...locales,\n ...props.translations,\n }))\n\n // const callingCode = computed(() => {\n // try {\n // const getDialCode = (code: CountryCode) => {\n // const result = countriesSorted.value?.find(\n // (country) => country?.iso2 === code,\n // )\n // return result ? result.dialCode : undefined\n // }\n\n // return countryCode.value\n // ? `+${\n // getDialCode(countryCode.value) ||\n // getCountryCallingCode(countryCode.value)\n // }`\n // : undefined\n // } catch (err) {\n // throw new Error(`[MazPhoneNumberInput] (callingCode) ${err}`)\n // }\n // })\n\n const isValid = computed(() => {\n return results.value?.isValid\n })\n\n const countriesList = computed(() => {\n return countries.value?.filter(\n (item) => !props.ignoredCountries?.includes(item.iso2),\n )\n })\n\n const countriesFiltered = computed(() => {\n const countries = props.onlyCountries || props.preferredCountries\n return countries?.map((country) =>\n countriesList.value?.find((item) => item.iso2.includes(country)),\n )\n })\n\n const otherCountries = computed(() => {\n return countriesList.value?.filter(\n (item) => !props.preferredCountries?.includes(item.iso2),\n )\n })\n\n const countriesSorted = computed(() => {\n return props.preferredCountries\n ? [\n ...(countriesFiltered.value ? countriesFiltered.value : []),\n ...(otherCountries.value ? otherCountries.value : []),\n ]\n : props.onlyCountries\n ? countriesFiltered.value\n : countriesList.value\n })\n\n const countryOptions = computed(() => {\n return countriesSorted.value\n ?.map((country) => {\n return country\n ? {\n ...country,\n dialCode: `+${country.dialCode}`,\n }\n : undefined\n })\n .filter(truthyFilter)\n })\n\n const inputPlaceholder = computed(() => {\n if (props.placeholder) {\n return props.placeholder\n }\n\n const defaultPlaceholder = t.value.phoneInput.placeholder\n\n if (props.noExample || !examplesFileLoaded.value) {\n return defaultPlaceholder\n } else {\n const example = getPhoneNumberExample()\n return isValid.value || !example\n ? defaultPlaceholder\n : `${t.value.phoneInput.example} ${example}`\n }\n })\n\n watch(\n () => props.defaultPhoneNumber,\n (phoneNumber, oldPhoneNumber) => {\n if (phoneNumber === oldPhoneNumber) {\n return\n }\n buildResults(phoneNumber)\n },\n )\n\n watch(\n () => props.defaultCountryCode,\n (countryCode, oldCountryCode) => {\n if (!countryCode || countryCode === oldCountryCode) {\n return\n }\n buildResults(countryCode)\n },\n )\n\n const getPhoneNumberExample = () => {\n try {\n const phoneNumber = countryCode.value\n ? getExamplePhoneNumber(countryCode.value)\n : undefined\n return phoneNumber ? phoneNumber.formatNational() : undefined\n } catch (err) {\n throw new Error(`[MazPhoneNumberInput] (getPhoneNumberExample) ${err}`)\n }\n }\n\n const autoUpdateCountryCodeFromPhoneNumber = () => {\n if (\n results.value &&\n results.value.countryCode &&\n countryCode.value !== results.value.countryCode\n ) {\n setCountryCode(results.value.countryCode)\n }\n }\n\n const sanitizeNumber = (phoneNumber?: string) => {\n phoneNumber = sanitizePhoneNumber(phoneNumber)\n\n const backSpacePressed = lastKeyPressed.value === 'Backspace'\n\n const lastCharacOfPhoneNumber = phoneNumber\n ? phoneNumber.trim().substr(-1)\n : false\n const lastCharIsParanthese = lastCharacOfPhoneNumber === ')'\n\n if (backSpacePressed && lastCharIsParanthese) {\n phoneNumber = phoneNumber?.trim().slice(0, -2)\n }\n\n return phoneNumber\n }\n\n const buildResults = (\n phoneNumber?: string,\n noAutoUpdateCountryCode?: boolean,\n ) => {\n try {\n formattedNumber.value = sanitizeNumber(phoneNumber)\n\n results.value = getResultsFromPhoneNumber(\n countryCode.value,\n formattedNumber.value,\n )\n if (countryCode.value) {\n const isFullNumber = formattedNumber.value?.includes('+')\n\n formattedNumber.value =\n results.value.formatNational && isFullNumber\n ? results.value.formatNational\n : getAsYouTypeFormat(countryCode.value, formattedNumber.value)\n }\n\n if (!noAutoUpdateCountryCode) {\n autoUpdateCountryCodeFromPhoneNumber()\n }\n\n // sent when the user tape\n // @arg Object with all parsed values\n emits('update', results.value)\n\n const { isValid, e164 } = results.value\n\n const valueToEmit = isValid ? e164 : formattedNumber.value\n if (!valueToEmit && valueToEmit === props.modelValue) {\n return\n }\n\n // sent when the user tape\n // @arg Phone number value formatted in e164 format (international format)\n emits('update:model-value', valueToEmit)\n } catch (err) {\n throw new Error(`[MazPhoneNumberInput] (buildResults) ${err}`)\n }\n }\n\n const setCountryCode = (\n selectedCountryCode: CountryCode,\n autoFocusInput = false,\n ) => {\n try {\n const countryAvailable = isCountryAvailable(selectedCountryCode)\n\n if (autoFocusInput) {\n focusPhoneNumberInput()\n if (formattedNumber.value && formattedNumber.value.includes('+')) {\n formattedNumber.value = undefined\n }\n }\n\n if (countryAvailable) {\n countryCode.value = selectedCountryCode\n emits('country-code', selectedCountryCode)\n buildResults(formattedNumber.value, true)\n }\n } catch (err) {\n throw new Error(`[MazPhoneNumberInput] (setCountryCode) ${err}`)\n }\n }\n\n const focusCountrySelector = async () => {\n try {\n await nextTick()\n CountrySelector.value?.$el.querySelector('input')?.focus()\n } catch (err) {\n throw new Error(`[MazPhoneNumberInput] (focusCountrySelector) ${err}`)\n }\n }\n\n const focusPhoneNumberInput = async () => {\n try {\n await nextTick()\n PhoneNumberInput.value?.$el.querySelector('input')?.focus()\n } catch (err) {\n throw new Error(`[MazPhoneNumberInput] (focusPhoneNumberInput) ${err}`)\n }\n }\n</script>\n\n<style lang=\"postcss\" scoped>\n @import './css/flags.css';\n\n .m-phone-number-input {\n &__country-flag {\n position: absolute;\n bottom: 10px;\n left: 18px;\n z-index: 4;\n outline: none;\n border: none;\n padding: 0;\n margin: 0;\n cursor: pointer;\n }\n\n &__input.--border-radius:deep(.m-input-wrapper) {\n @apply maz-rounded-l-none;\n\n margin-left: -2px;\n }\n\n &__select {\n @apply maz-w-44;\n\n &__item {\n @apply maz-px-1 maz-py-1 maz-text-sm;\n }\n\n &:not(.--no-country-code) {\n &:deep(.m-input-wrapper) {\n @apply maz-rounded-r-none;\n }\n }\n }\n\n &:not(.--no-flags) {\n & .m-phone-number-input__select:deep(.m-input-wrapper) input {\n @apply maz-pl-11 !important;\n }\n }\n\n &__input {\n &.--error,\n &.--focused {\n @apply maz-z-1;\n }\n }\n }\n</style>\n"],"names":["styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","_typeof","obj","Symbol","iterator","constructor","prototype","_classCallCheck","instance","Constructor","TypeError","_defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","Object","defineProperty","key","_createClass","protoProps","staticProps","runtime","exports","undefined","Op","hasOwn","hasOwnProperty","$Symbol","iteratorSymbol","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","value","err","wrap","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","create","context","Context","_invoke","state","GenStateSuspendedStart","method","arg","GenStateExecuting","Error","GenStateCompleted","doneResult","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","done","GenStateSuspendedYield","makeInvokeMethod","fn","call","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","this","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","forEach","AsyncIterator","PromiseImpl","invoke","resolve","reject","result","__await","then","unwrapped","error","previousPromise","callInvokeWithMethodAndArg","info","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","displayName","isGeneratorFunction","genFun","ctor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","iter","keys","object","reverse","pop","skipTempReset","prev","charAt","slice","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","catch","thrown","delegateYield","module","regeneratorRuntime","accidentalStrictMode","globalThis","Function","regenerator","require$$0","__awaiter","thisArg","_arguments","P","fulfilled","step","e","rejected","apply","__values","o","s","m","__asyncValues","verb","n","v","d","settle","DEFAULT_OPTIONS","baseClass","loadedClass","loadingClass","errorClass","noPhotoClass","noPhoto","observerOnce","loadOnce","noUseErrorPhoto","observerOptions","threshold","LazyImg","opts","options","buildOptions","onImgLoadedCallback","imageIsLoaded","bind","onImgErrorCallback","imageHasError","import","default","defaultOptions","el","className","classList","remove","add","removeClass","addClass","onLoading","setDefaultPhoto","hasImgLoaded","onLoaded","event","console","warn","onError","binding","dataSrc","getImgElement","getAttribute","bindingSrc","src","sourceElements","querySelectorAll","sourceElements_1","source","srcSet","srcset","HTMLPictureElement","isPictureElement","querySelector","errorPhoto","loadErrorPhoto","sourceElements_2","setImgSrc","imgElement","addEventListener","_this","once","imageIsLoading","addEventListenerToImg","setPictureSourceUrls","imageUrl","getImageUrl","hasBgImgMode","backgroundImage","entries","observer","observers","isIntersecting","onIntersecting","unobserve","loadImage","IntersectionObserver","intersectionObserver","_this2","handleIntersectionObserver","observe","_b","window","createObserver","imageHasNoPhoto","imageHandler","setTimeout","_this3","setBaseClass","bindUpdateHandler","oldValue","removeAllStateClasses","vLazyImg","created","updated","update","unmounted","sources","computed","image","cache","svgElSource","svgElem","mazIconPath","fallback","resolved","inject","injectStrict","iconPath","path","fullSrc","onMounted","getSource","getSvgContent","svgEl","svgElNode","cloneNode","transformSource","title","svg","titleTags","textContent","titleEl","createElementNS","setTitle","innerHTML","download","nextTick","emits","url","request","XMLHttpRequest","open","onload","status","DOMParser","parseFromString","responseText","onerror","send","watch","svgAttrs","attrs","attributes","reduce","componentType","to","href","isLink","defineComponent","inheritAttrs","modelValue","Boolean","selector","String","beforeClose","persistent","backdropClass","Array","transition","escKey","zOffset","Number","defaultZIndex","modalClass","setup","emit","present","$toggleBackdrop","show","openModal","close","toggleModal","guard","rest","onKeyPress","code","documentElement","removeEventListener","immediate","onBackdropClicked","onBackdropAnimationEnter","onBackdropAnimationLeave","_createBlock","_ctx","_createVNode","appear","onAfterEnter","onAfterLeave","_createElementBlock","class","tabindex","role","_createElementVNode","onClick","_mergeProps","_renderSlot","useAttrs","slots","useSlots","component","btnColorClass","pastel","color","outline","loading","isDisabled","disabled","cursorClass","variantClass","variant","loaderBgColorClass","loaderColor","includes","hasLoader","hasLeftIcon","leftIcon","hasRightIcon","rightIcon","hasIcon","btnType","components","MazBtn","MazBackDrop","MazIcon","$event","_hoisted_1","_hoisted_2","size","_hoisted_3","_hoisted_4","MazSpinner","required","height","width","noDestroyOnUnmount","dropzone","ButtonElement","dropzoneReady","dropzoneOptions","dropzoneStyle","isInteger","thumbnail","file","dataUrl","thumbnailElement","previewElement","r","alt","message","xhr","autoRemoveOnError","removeFile","errorMultiple","files","parallelUploads","maxFiles","previewTemplate","addRemoveLinks","DropzoneJs","on","response","progress","bytesSent","totalProgress","totalBytes","totalBytesSent","formData","getAcceptedFiles","every","manuallyAdded","onBeforeUnmount","destroy","setOption","option","manuallyAddFile","fileUrl","removeAllFiles","shouldRemoveAllFiles","processQueue","disable","enable","accept","addFile","resizeImage","resizeMethod","callback","cancelUpload","getRejectedFiles","getFilesWithStatus","getQueuedFiles","getUploadingFiles","getAddedFiles","getActiveFiles","xmlns","viewBox","fill","_ctx$dropzoneOptions","dictDefaultMessage","_ctx$dropzoneOptions2","dictFilesDescriptions","svgs","previous","spinner","VueZoomImg","scale","blur","buttonsAdded","keydownHandler","keydownLister","loader","getLoader","wrapper","prepend","img","onImgLoaded","imgEventHandler","from","cursor","setAttribute","mouseEnter","mouseLeave","renderPreview","removeAttribute","addStyle","container","isEqualNode","closePreview","id","append","body","keyboardEventHandler","minWidth","hidden","closeButton","getButton","buttons","hasMultipleInstance","allInstances","previousButton","nextButton","transform","filter","zIndex","preventDefault","nextPreviousImage","iconName","button","onclick","_this4","isNext","selectNextInstance","currentInstance","currentInstanceIndex","findIndex","newInstanceIndex","nextInstance","_this5","styleString","directives","images","imagesShownCount","noRemaining","noHeight","noWidth","noRadius","noZoom","hasEmptyLayer","lazy","onBeforeMount","sizeStyle","flex","minHeight","imagesCount","numberImagesRemaining","imagesNormalized","map","slug","imagesShown","imagesHidden","shouldHaveRemainingLayer","element","getComputedStyle","position","visibility","top","MazTransitionExpand","MazGallery","orientation","validator","hrefTarget","footerAlign","galleryWidth","galleryHeight","zoom","elevation","radius","bordered","imagesShowCount","wrapperClass","noPadding","overflowHidden","collapsable","collapseOpen","isOpen","isColumnVariant","haveSomeContent","supportedSlots","some","val","galleryWidthComputed","footerAlignClass","_hoisted_5","_hoisted_6","placeholder","label","readonly","success","warning","hint","inputClasses","noBorder","debounce","debounceDelay","validButton","validButtonLoading","autoFocus","hasPasswordVisible","isFocused","input","focus","isPasswordType","inputType","borderStyle","computedPlaceholder","hasValue","shouldUp","hasLabel","debounceEmitValue","wait","callFirst","timeout","debouncedFn","clear","clearTimeout","flush","debounceWrapper","args","callNow","cancel","emitValue","hasRightPart","hasLeftPart","_toHandlers","for","minimumFractionDigits","round","currency","number","locale","options_","validRequiredAttributes","numberToFormat","Math","floor","Intl","NumberFormat","format","getFormattedCurrency","isActive","valueString","getAdjustedPrice","toString","valueNumber","priceFormatted","newValue","parseFloat","replace","min","max","displayPrice","get","set","adjustedPrice","emitValues","_arrayLikeToArray","arr","len","arr2","_toConsumableArray","isArray","arrayLikeToArray","arrayWithoutHoles","iterableToArray","minLen","test","unsupportedIterableToArray","nonIterableSpread","countriesNameListByIsoCode","AC","AF","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","IO","BN","BG","BF","BI","CV","KH","CM","CA","KY","CF","TD","CL","CN","CX","CC","CO","KM","CD","CG","CK","CR","HR","CU","CW","CY","CZ","CI","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","SZ","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","JM","JP","JE","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","MK","RO","RU","RW","RE","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SX","SK","SI","SB","SO","ZA","GS","SS","ES","LK","SD","SR","SJ","SE","CH","SY","TA","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","UM","US","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","XK","ZM","ZW","AX","examples","PHONE_CHAR_REGEX","NON_ALPHA_REGEX","loadPhoneNumberExamplesFile","browserLocale","navigator","language","substr","toUpperCase","isCountryAvailable","isSupportedCountry","fetchCountryCode","fetch","text","truthyFilter","countrySelector","phoneInput","example","hasListOpen","tmpModelValueIndex","selectedOption","optionValueKey","optionLabelKey","mazSelect","mazInput","optionsList","find","mazInputValue","optionInputValueKey","listTransition","listPosition","closeList","contains","relatedTarget","openList","scrollToSelected","searchQuery","searching","queryTimer","substring","match","toLowerCase","resultIndex","startsWith","itemIndex","scrollTo","itemHeight","updateValue","mustCloseList","currentIndex","optionsLength","results","countryCode","formattedNumber","examplesFileLoaded","inputFocused","lastKeyPressed","CountrySelector","PhoneNumberInput","defaultCountryCode","defaultPhoneNumber","noExample","buildResults","fetchCountry","noUseBrowserLocale","setCountryCode","countries","countriesList","getCountries","iso2","dialCode","getCountryCallingCode","getCountriesList","t","locales","translations","isValid","item","ignoredCountries","countriesFiltered","onlyCountries","preferredCountries","country","otherCountries","countriesSorted","countryOptions","inputPlaceholder","defaultPlaceholder","getPhoneNumberExample","phoneNumber","oldPhoneNumber","oldCountryCode","getExampleNumber","getExamplePhoneNumber","formatNational","sanitizeNumber","hasNonAlpha","hasPhoneChar","sanitizePhoneNumber","backSpacePressed","lastCharacOfPhoneNumber","trim","noAutoUpdateCountryCode","parsing","parsePhoneNumberFromString","countryCallingCode","nationalNumber","getType","formatInternational","uri","getURI","e164","getResultsFromPhoneNumber","isFullNumber","AsYouType","getAsYouTypeFormat","valueToEmit","selectedCountryCode","autoFocusInput","countryAvailable","focusPhoneNumberInput","focusCountrySelector","$el"],"mappings":"wgDAAA,SAASA,EAAYC,EAAKC,QACX,IAARA,IAAiBA,EAAM,IAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAKF,GAA2B,oBAAbG,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAAMM,WACRN,EAAMM,WAAWC,QAAUb,EAE3BM,EAAMK,YAAYR,SAASW,eAAed,KCvB/B,SAASe,EAAQC,GAG9B,OAAOD,EAAU,mBAAqBE,QAAU,iBAAmBA,OAAOC,SAAW,SAAUF,GAC7F,cAAcA,GACZ,SAAUA,GACZ,OAAOA,GAAO,mBAAqBC,QAAUD,EAAIG,cAAgBF,QAAUD,IAAQC,OAAOG,UAAY,gBAAkBJ,GACvHD,EAAQC,GCPE,SAASK,EAAgBC,EAAUC,GAChD,KAAMD,aAAoBC,GACxB,MAAM,IAAIC,UAAU,qCCFxB,SAASC,GAAkBC,EAAQC,GACjC,IAAK,IAAIC,EAAI,EAAGA,EAAID,EAAME,OAAQD,IAAK,CACrC,IAAIE,EAAaH,EAAMC,GACvBE,EAAWC,WAAaD,EAAWC,aAAc,EACjDD,EAAWE,cAAe,EACtB,UAAWF,IAAYA,EAAWG,UAAW,GACjDC,OAAOC,eAAeT,EAAQI,EAAWM,IAAKN,IAInC,SAASO,GAAad,EAAae,EAAYC,GAM5D,OALID,GAAYb,GAAkBF,EAAYH,UAAWkB,GACrDC,GAAad,GAAkBF,EAAagB,GAChDL,OAAOC,eAAeZ,EAAa,YAAa,CAC9CU,UAAU,IAELV,4xBCTT,IAAIi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