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

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.
@@ -1 +1 @@
1
- {"version":3,"file":"MazPhoneNumberInput.js","sources":["../node_modules/@babel/runtime/helpers/arrayLikeToArray.js","../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js","../node_modules/@babel/runtime/helpers/iterableToArray.js","../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","../node_modules/@babel/runtime/helpers/nonIterableSpread.js","../node_modules/@babel/runtime/helpers/toConsumableArray.js","../node_modules/regenerator-runtime/runtime.js","../node_modules/@babel/runtime/regenerator/index.js","../package/components/MazPhoneNumberInput/utils/countries-name-list-by-iso-code.ts","../package/components/MazPhoneNumberInput/utils/index.ts","../package/components/MazPhoneNumberInput/constantes/locales.ts","../node_modules/style-inject/dist/style-inject.es.js","../package/components/MazIcon.vue","../package/utils/injectStrict.ts","../package/components/MazBtn.vue","../package/icons/eye-off.svg","../package/icons/eye.svg","../package/components/MazInput.vue","../package/utils/debounce.ts","../package/components/MazInput.vue?vue&type=template&id=5e01a752&lang.js","../package/icons/chevron-down.svg","../package/components/MazSelect.vue","../package/components/MazPhoneNumberInput.vue"],"sourcesContent":["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}\n\nmodule.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\n\nmodule.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\n\nfunction _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}\n\nmodule.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","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}\n\nmodule.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayWithoutHoles = require(\"./arrayWithoutHoles.js\");\n\nvar iterableToArray = require(\"./iterableToArray.js\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\n\nvar nonIterableSpread = require(\"./nonIterableSpread.js\");\n\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}\n\nmodule.exports = _toConsumableArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/**\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","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","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","<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\n ? props.src\n : iconPath.value\n ? `${iconPath.value}/${props.name}.svg`\n : `/${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 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\">\n export type { Color, Size } from './types'\n</script>\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","export default \"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke%3D%22currentColor%22%20aria-hidden%3D%22true%22%3E%20%20%3Cpath%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%222%22%20d%3D%22M13.875%2018.825A10.05%2010.05%200%200112%2019c-4.478%200-8.268-2.943-9.543-7a9.97%209.97%200%20011.563-3.029m5.858.908a3%203%200%20114.243%204.243M9.878%209.878l4.242%204.242M9.88%209.88l-3.29-3.29m7.532%207.532l3.29%203.29M3%203l3.59%203.59m0%200A9.953%209.953%200%200112%205c4.478%200%208.268%202.943%209.543%207a10.025%2010.025%200%2001-4.132%205.411m0%200L21%2021%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke%3D%22currentColor%22%20aria-hidden%3D%22true%22%3E%20%20%3Cpath%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%222%22%20d%3D%22M15%2012a3%203%200%2011-6%200%203%203%200%20016%200z%22%2F%3E%20%20%3Cpath%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%222%22%20d%3D%22M2.458%2012C3.732%207.943%207.523%205%2012%205c4.478%200%208.268%202.943%209.542%207-1.274%204.057-5.064%207-9.542%207-4.477%200-8.268-2.943-9.542-7z%22%2F%3E%3C%2Fsvg%3E\"","<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 :src=\"EyeOffIcon\"\n class=\"maz-text-gray-400\"\n />\n <MazIcon v-else :src=\"EyeIcon\" 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\" :src=\"CheckIcon\" />\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 export type { Color, Size } from './types'\n import EyeOffIcon from './../icons/eye-off.svg'\n import EyeIcon from './../icons/eye.svg'\n import CheckIcon from './../icons/eye.svg'\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 EyeOffIcon,\n EyeIcon,\n CheckIcon,\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 :src=\"EyeOffIcon\"\n class=\"maz-text-gray-400\"\n />\n <MazIcon v-else :src=\"EyeIcon\" 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\" :src=\"CheckIcon\" />\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 export type { Color, Size } from './types'\n import EyeOffIcon from './../icons/eye-off.svg'\n import EyeIcon from './../icons/eye.svg'\n import CheckIcon from './../icons/eye.svg'\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 EyeOffIcon,\n EyeIcon,\n CheckIcon,\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","export default \"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke%3D%22currentColor%22%20aria-hidden%3D%22true%22%3E%20%20%3Cpath%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%222%22%20d%3D%22M19%209l-7%207-7-7%22%2F%3E%3C%2Fsvg%3E\"","<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 :src=\"ChevronDownIcon\"\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\">\n export type MazSelectOptions = Record<string, ModelValueSimple>\n export type { Color, Size, ModelValueSimple, Position } from './types'\n</script>\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 import ChevronDownIcon from './../icons/chevron-down.svg'\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 maz-text-normal-text 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\">\n export type { Color, Size, Position } from './types'\n</script>\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 './MazPhoneNumberInput/utils'\n import locales from './MazPhoneNumberInput/constantes/locales'\n\n import { Result, Translations } from './MazPhoneNumberInput/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 './MazPhoneNumberInput/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":["arr","len","length","i","arr2","Array","module","exports","arrayLikeToArray","require$$0","isArray","iter","Symbol","iterator","from","o","minLen","n","Object","prototype","toString","call","slice","constructor","name","test","TypeError","arrayWithoutHoles","iterableToArray","require$$1","unsupportedIterableToArray","require$$2","nonIterableSpread","require$$3","runtime","undefined","Op","hasOwn","hasOwnProperty","$Symbol","iteratorSymbol","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","obj","key","value","defineProperty","enumerable","configurable","writable","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","type","done","GenStateSuspendedYield","makeInvokeMethod","fn","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","mark","setPrototypeOf","__proto__","awrap","async","Promise","keys","object","reverse","pop","skipTempReset","prev","charAt","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","catch","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","globalThis","Function","regenerator","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","import","default","browserLocale","window","navigator","language","locale","substr","toUpperCase","isCountryAvailable","isSupportedCountry","fetchCountryCode","fetch","response","text","responseText","truthyFilter","countrySelector","placeholder","phoneInput","example","styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","cache","svgElSource","svgElem","mazIconPath","fallback","resolved","inject","injectStrict","iconPath","computed","props","path","fullSrc","src","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","e","onerror","send","watch","svgAttrs","attrs","attributes","reduce","useAttrs","href","to","slots","useSlots","component","btnColorClass","pastel","color","outline","loading","isDisabled","disabled","cursorClass","variantClass","variant","loaderBgColorClass","loaderColor","includes","hasLoader","hasLeftIcon","leftIcon","hasRightIcon","rightIcon","hasIcon","btnType","defineComponent","components","MazBtn","MazIcon","inheritAttrs","modelValue","String","Number","validator","label","required","Boolean","readonly","id","success","warning","hint","inputClasses","noBorder","noRadius","size","debounce","debounceDelay","validButton","validButtonLoading","autoFocus","setup","emit","hasPasswordVisible","isFocused","input","focus","isPasswordType","inputType","borderStyle","computedPlaceholder","hasValue","shouldUp","hasLabel","debounceEmitValue","wait","callFirst","timeout","debouncedFn","clear","clearTimeout","flush","debounceWrapper","args","apply","callNow","setTimeout","cancel","event","blur","emitValue","hasRightPart","hasLeftPart","EyeOffIcon","EyeIcon","CheckIcon","class","_createElementBlock","_createElementVNode","_ctx","_hoisted_1","_renderSlot","_createVNode","_hoisted_2","_mergeProps","_toHandlers","for","_hoisted_6","_createBlock","tabindex","onClick","hasListOpen","tmpModelValueIndex","onBeforeMount","selectedOption","options","findIndex","option","optionValueKey","optionLabelKey","mazSelect","mazInput","optionsList","find","mazInputValue","optionInputValueKey","listTransition","listPosition","closeList","contains","relatedTarget","preventDefault","openList","scrollToSelected","searchQuery","searching","code","queryTimer","substring","match","toLowerCase","resultIndex","startsWith","itemIndex","scrollTo","top","itemHeight","updateValue","mustCloseList","currentIndex","optionsLength","newValue","results","countryCode","formattedNumber","examplesFileLoaded","inputFocused","lastKeyPressed","CountrySelector","PhoneNumberInput","defaultCountryCode","defaultPhoneNumber","noExample","buildResults","fetchCountry","noUseBrowserLocale","setCountryCode","countries","countriesList","getCountries","iso2","dialCode","getCountryCallingCode","console","getCountriesList","t","locales","translations","isValid","filter","item","ignoredCountries","countriesFiltered","onlyCountries","preferredCountries","map","country","otherCountries","countriesSorted","countryOptions","inputPlaceholder","defaultPlaceholder","getPhoneNumberExample","phoneNumber","oldPhoneNumber","oldCountryCode","getExampleNumber","getExamplePhoneNumber","formatNational","sanitizeNumber","hasNonAlpha","hasPhoneChar","replace","sanitizePhoneNumber","backSpacePressed","lastCharacOfPhoneNumber","trim","noAutoUpdateCountryCode","parsing","parsePhoneNumberFromString","countryCallingCode","nationalNumber","getType","formatInternational","uri","getURI","e164","format","getResultsFromPhoneNumber","isFullNumber","AsYouType","getAsYouTypeFormat","valueToEmit","selectedCountryCode","autoFocusInput","countryAvailable","focusPhoneNumberInput","focusCountrySelector","$el","querySelector"],"mappings":"o6BAAA,SAA2BA,EAAKC,IACnB,MAAPA,GAAeA,EAAMD,EAAIE,UAAQD,EAAMD,EAAIE,QAE/C,IAAK,IAAIC,EAAI,EAAGC,EAAO,IAAIC,MAAMJ,GAAME,EAAIF,EAAKE,IAC9CC,EAAKD,GAAKH,EAAIG,GAGhB,OAAOC,GAG2BE,sBAA4B,EAAMA,EAAOC,QAAiB,QAAID,EAAOC,oBCVzG,IAAIC,EAAmBC,UAMvBH,UAJA,SAA4BN,GAC1B,GAAIK,MAAMK,QAAQV,GAAM,OAAOQ,EAAiBR,IAGbM,sBAA4B,EAAMA,EAAOC,QAAiB,QAAID,EAAOC,4CCF1GD,UAJA,SAA0BK,GACxB,GAAsB,oBAAXC,QAAmD,MAAzBD,EAAKC,OAAOC,WAA2C,MAAtBF,EAAK,cAAuB,OAAON,MAAMS,KAAKH,IAGnFL,sBAA4B,EAAMA,EAAOC,QAAiB,QAAID,EAAOC,4CCJxG,IAAIC,EAAmBC,UAWvBH,UATA,SAAqCS,EAAGC,GACtC,GAAKD,EAAL,CACA,GAAiB,iBAANA,EAAgB,OAAOP,EAAiBO,EAAGC,GACtD,IAAIC,EAAIC,OAAOC,UAAUC,SAASC,KAAKN,GAAGO,MAAM,GAAI,GAEpD,MADU,WAANL,GAAkBF,EAAEQ,cAAaN,EAAIF,EAAEQ,YAAYC,MAC7C,QAANP,GAAqB,QAANA,EAAoBZ,MAAMS,KAAKC,GACxC,cAANE,GAAqB,2CAA2CQ,KAAKR,GAAWT,EAAiBO,EAAGC,QAAxG,IAG4CV,sBAA4B,EAAMA,EAAOC,QAAiB,QAAID,E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,SACD,IAAIkB,qDAA8ClB,MAItDqmB,EAAiB,SACrByD,OACAC,kEAGQC,EAAmBnS,GAAmBiS,GAExCC,IACFE,KACIxE,EAAgB9lB,OAAS8lB,EAAgB9lB,MAAM+d,SAAS,OAC1D+H,EAAgB9lB,WAAQb,IAIxBkrB,IACFxE,EAAY7lB,MAAQmqB,EACpBvO,EAAM,eAAgBuO,GACtB5D,EAAaT,EAAgB9lB,OAAO,IAEtC,MAAOK,SACD,IAAIkB,uDAAgDlB,MAIxDkqB,EAAuB,yJAEnB5O,+BACNuK,EAAgBlmB,4BAAOwqB,IAAIC,cAAc,yBAAUnK,6DAE7C,IAAI/e,6HAIR+oB,GAAwB,yJAEpB3O,+BACNwK,EAAiBnmB,4BAAOwqB,IAAIC,cAAc,yBAAUnK,6DAE9C,IAAI/e"}
1
+ {"version":3,"file":"MazPhoneNumberInput.js","sources":["../node_modules/@babel/runtime/helpers/arrayLikeToArray.js","../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js","../node_modules/@babel/runtime/helpers/iterableToArray.js","../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","../node_modules/@babel/runtime/helpers/nonIterableSpread.js","../node_modules/@babel/runtime/helpers/toConsumableArray.js","../node_modules/regenerator-runtime/runtime.js","../node_modules/@babel/runtime/regenerator/index.js","../package/components/MazPhoneNumberInput/utils/countries-name-list-by-iso-code.ts","../package/components/MazPhoneNumberInput/utils/index.ts","../package/components/MazPhoneNumberInput/constantes/locales.ts","../node_modules/style-inject/dist/style-inject.es.js","../package/components/MazIcon.vue","../package/utils/injectStrict.ts","../package/components/MazBtn.vue","../package/icons/eye-off.svg","../package/icons/eye.svg","../package/components/MazInput.vue","../package/utils/debounce.ts","../package/components/MazInput.vue?vue&type=template&id=5e01a752&lang.js","../package/icons/chevron-down.svg","../package/components/MazSelect.vue","../package/components/MazPhoneNumberInput.vue"],"sourcesContent":["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}\n\nmodule.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\n\nmodule.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\n\nfunction _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}\n\nmodule.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","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}\n\nmodule.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayWithoutHoles = require(\"./arrayWithoutHoles.js\");\n\nvar iterableToArray = require(\"./iterableToArray.js\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\n\nvar nonIterableSpread = require(\"./nonIterableSpread.js\");\n\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}\n\nmodule.exports = _toConsumableArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/**\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","import { CountryCode } from 'libphonenumber-js'\n\nexport const countriesNameListByIsoCode: Record<CountryCode, 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 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 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 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 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 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 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 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(\n code: CountryCode | string,\n customCountriesNameListByIsoCode?: Record<CountryCode, string>,\n): string | undefined {\n return {\n ...countriesNameListByIsoCode,\n ...customCountriesNameListByIsoCode,\n }[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(\n customCountriesNameListByIsoCode?: Record<CountryCode, string>,\n): Country[] | undefined {\n const countriesList: Country[] = []\n const isoList = getCountries()\n\n for (const iso2 of isoList) {\n const name = getCountryName(iso2, customCountriesNameListByIsoCode)\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","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","<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\n ? props.src\n : iconPath.value\n ? `${iconPath.value}/${props.name}.svg`\n : `/${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 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\">\n export type { Color, Size } from './types'\n</script>\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","export default \"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke%3D%22currentColor%22%20aria-hidden%3D%22true%22%3E%20%20%3Cpath%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%222%22%20d%3D%22M13.875%2018.825A10.05%2010.05%200%200112%2019c-4.478%200-8.268-2.943-9.543-7a9.97%209.97%200%20011.563-3.029m5.858.908a3%203%200%20114.243%204.243M9.878%209.878l4.242%204.242M9.88%209.88l-3.29-3.29m7.532%207.532l3.29%203.29M3%203l3.59%203.59m0%200A9.953%209.953%200%200112%205c4.478%200%208.268%202.943%209.543%207a10.025%2010.025%200%2001-4.132%205.411m0%200L21%2021%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke%3D%22currentColor%22%20aria-hidden%3D%22true%22%3E%20%20%3Cpath%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%222%22%20d%3D%22M15%2012a3%203%200%2011-6%200%203%203%200%20016%200z%22%2F%3E%20%20%3Cpath%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%222%22%20d%3D%22M2.458%2012C3.732%207.943%207.523%205%2012%205c4.478%200%208.268%202.943%209.542%207-1.274%204.057-5.064%207-9.542%207-4.477%200-8.268-2.943-9.542-7z%22%2F%3E%3C%2Fsvg%3E\"","<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 :src=\"EyeOffIcon\"\n class=\"maz-text-gray-400\"\n />\n <MazIcon v-else :src=\"EyeIcon\" 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\" :src=\"CheckIcon\" />\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 export type { Color, Size } from './types'\n import EyeOffIcon from './../icons/eye-off.svg'\n import EyeIcon from './../icons/eye.svg'\n import CheckIcon from './../icons/eye.svg'\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 EyeOffIcon,\n EyeIcon,\n CheckIcon,\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 :src=\"EyeOffIcon\"\n class=\"maz-text-gray-400\"\n />\n <MazIcon v-else :src=\"EyeIcon\" 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\" :src=\"CheckIcon\" />\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 export type { Color, Size } from './types'\n import EyeOffIcon from './../icons/eye-off.svg'\n import EyeIcon from './../icons/eye.svg'\n import CheckIcon from './../icons/eye.svg'\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 EyeOffIcon,\n EyeIcon,\n CheckIcon,\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","export default \"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke%3D%22currentColor%22%20aria-hidden%3D%22true%22%3E%20%20%3Cpath%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%222%22%20d%3D%22M19%209l-7%207-7-7%22%2F%3E%3C%2Fsvg%3E\"","<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 :src=\"ChevronDownIcon\"\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\">\n export type MazSelectOptions = Record<string, ModelValueSimple>\n export type { Color, Size, ModelValueSimple, Position } from './types'\n</script>\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 import ChevronDownIcon from './../icons/chevron-down.svg'\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 maz-text-normal-text 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\">\n export type { Color, Size, Position } from './types'\n</script>\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 './MazPhoneNumberInput/utils'\n import locales from './MazPhoneNumberInput/constantes/locales'\n\n import { Result, Translations } from './MazPhoneNumberInput/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 customCountriesList: {\n type: Object as PropType<Record<CountryCode, string>>,\n default: undefined,\n },\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(props.customCountriesList))\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 './MazPhoneNumberInput/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":["arr","len","length","i","arr2","Array","module","exports","arrayLikeToArray","require$$0","isArray","iter","Symbol","iterator","from","o","minLen","n","Object","prototype","toString","call","slice","constructor","name","test","TypeError","arrayWithoutHoles","iterableToArray","require$$1","unsupportedIterableToArray","require$$2","nonIterableSpread","require$$3","runtime","undefined","Op","hasOwn","hasOwnProperty","$Symbol","iteratorSymbol","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","obj","key","value","defineProperty","enumerable","configurable","writable","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","type","done","GenStateSuspendedYield","makeInvokeMethod","fn","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","mark","setPrototypeOf","__proto__","awrap","async","Promise","keys","object","reverse","pop","skipTempReset","prev","charAt","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","catch","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","globalThis","Function","regenerator","countriesNameListByIsoCode","AC","AF","AL","DZ","AS","AD","AO","AI","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","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","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","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","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","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","US","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","XK","ZM","ZW","AX","getCountryName","code","customCountriesNameListByIsoCode","examples","PHONE_CHAR_REGEX","NON_ALPHA_REGEX","loadPhoneNumberExamplesFile","import","default","browserLocale","window","navigator","language","locale","substr","toUpperCase","isCountryAvailable","isSupportedCountry","fetchCountryCode","fetch","response","text","responseText","truthyFilter","countrySelector","placeholder","phoneInput","example","styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","cache","svgElSource","svgElem","mazIconPath","fallback","resolved","inject","injectStrict","iconPath","computed","props","path","fullSrc","src","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","e","onerror","send","watch","svgAttrs","attrs","attributes","reduce","useAttrs","href","to","slots","useSlots","component","btnColorClass","pastel","color","outline","loading","isDisabled","disabled","cursorClass","variantClass","variant","loaderBgColorClass","loaderColor","includes","hasLoader","hasLeftIcon","leftIcon","hasRightIcon","rightIcon","hasIcon","btnType","defineComponent","components","MazBtn","MazIcon","inheritAttrs","modelValue","String","Number","validator","label","required","Boolean","readonly","id","success","warning","hint","inputClasses","noBorder","noRadius","size","debounce","debounceDelay","validButton","validButtonLoading","autoFocus","setup","emit","hasPasswordVisible","isFocused","input","focus","isPasswordType","inputType","borderStyle","computedPlaceholder","hasValue","shouldUp","hasLabel","debounceEmitValue","wait","callFirst","timeout","debouncedFn","clear","clearTimeout","flush","debounceWrapper","args","apply","callNow","setTimeout","cancel","event","blur","emitValue","hasRightPart","hasLeftPart","EyeOffIcon","EyeIcon","CheckIcon","class","_createElementBlock","_createElementVNode","_ctx","_hoisted_1","_renderSlot","_createVNode","_hoisted_2","_mergeProps","_toHandlers","for","_hoisted_6","_createBlock","tabindex","onClick","hasListOpen","tmpModelValueIndex","onBeforeMount","selectedOption","options","findIndex","option","optionValueKey","optionLabelKey","mazSelect","mazInput","optionsList","find","mazInputValue","optionInputValueKey","listTransition","listPosition","closeList","contains","relatedTarget","preventDefault","openList","scrollToSelected","searchQuery","searching","queryTimer","substring","match","toLowerCase","resultIndex","startsWith","itemIndex","scrollTo","top","itemHeight","updateValue","mustCloseList","currentIndex","optionsLength","newValue","results","countryCode","formattedNumber","examplesFileLoaded","inputFocused","lastKeyPressed","CountrySelector","PhoneNumberInput","defaultCountryCode","defaultPhoneNumber","noExample","buildResults","fetchCountry","noUseBrowserLocale","setCountryCode","countries","countriesList","getCountries","iso2","dialCode","getCountryCallingCode","console","getCountriesList","customCountriesList","t","locales","translations","isValid","filter","item","ignoredCountries","countriesFiltered","onlyCountries","preferredCountries","map","country","otherCountries","countriesSorted","countryOptions","inputPlaceholder","defaultPlaceholder","getPhoneNumberExample","phoneNumber","oldPhoneNumber","oldCountryCode","getExampleNumber","getExamplePhoneNumber","formatNational","sanitizeNumber","hasNonAlpha","hasPhoneChar","replace","sanitizePhoneNumber","backSpacePressed","lastCharacOfPhoneNumber","trim","noAutoUpdateCountryCode","parsing","parsePhoneNumberFromString","countryCallingCode","nationalNumber","getType","formatInternational","uri","getURI","e164","format","getResultsFromPhoneNumber","isFullNumber","AsYouType","getAsYouTypeFormat","valueToEmit","selectedCountryCode","autoFocusInput","countryAvailable","focusPhoneNumberInput","focusCountrySelector","$el","querySelector"],"mappings":"o6BAAA,SAA2BA,EAAKC,IACnB,MAAPA,GAAeA,EAAMD,EAAIE,UAAQD,EAAMD,EAAIE,QAE/C,IAAK,IAAIC,EAAI,EAAGC,EAAO,IAAIC,MAAMJ,GAAME,EAAIF,EAAKE,IAC9CC,EAAKD,GAAKH,EAAIG,GAGhB,OAAOC,GAG2BE,sBAA4B,EAAMA,EAAOC,QAAiB,QAAID,EAAOC,oBCVzG,IAAIC,EAAmBC,UAMvBH,UAJA,SAA4BN,GAC1B,GAAIK,MAAMK,QAAQV,GAAM,OAAOQ,EAAiBR,IAGbM,sBAA4B,EAAMA,EAAOC,QAAiB,QAAID,EAAOC,4CCF1GD,UAJA,SAA0BK,GACxB,GAAsB,oBAAXC,QAAmD,MAAzBD,EAAKC,OAAOC,WAA2C,MAAtBF,EAAK,cAAuB,OAAON,MAAMS,KAAKH,IAGnFL,sB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