webpackJsonp([4],{656:function(e,t,o){var i=o(325)(o(821),o(822),!1,null,null,null);e.exports=i.exports},673:function(e,t,o){"use strict";var i=o(680),n=o(331),a=Object.prototype.toString;function s(e){return"[object Array]"===a.call(e)}function r(e){return null!==e&&"object"==typeof e}function l(e){return"[object Function]"===a.call(e)}function c(e,t){if(null!==e&&void 0!==e)if("object"==typeof e||s(e)||(e=[e]),s(e))for(var o=0,i=e.length;o0?t+"d ":"")+(o>0?o+"h ":"")+(i>0?i+"m ":"")}},computed:{momentTimeFormat:function(){var e=this;return"G \\h i \\m\\i\\n"===this.$root.settings.wordpress.timeFormat?"HH:mm":this.$root.settings.wordpress.timeFormat.replace(this.formatEx,function(t){return e.formatPHPtoMomentMap[t]})},momentDateFormat:function(){var e=this;return this.$root.settings.wordpress.dateFormat.replace(this.formatEx,function(t){return e.formatPHPtoMomentMap[t]})},vCalendarFormats:function(){return{input:[this.momentDateFormat,"YYYY-MM-DD","YYYY/MM/DD"]}},timePickerFormat:function(){return"HH:mm"}}}},675:function(e,t,o){"use strict";t.a={data:function(){return{colors:["1788FB","4BBEC6","FBC22D","FA3C52","D696B8","689BCA","26CC2B","FD7E35","E38587","774DFB","31CDF3","6AB76C","FD5FA1","A697C5"],usedColors:[]}},methods:{inlineSVG:function(){var e=o(685);e.init({svgSelector:"img.svg",initClass:"js-inlinesvg"})},imageFromText:function(e){var t=this.getNameInitials(e),o=Math.floor(Math.random()*this.colors.length),i=this.colors[o];return this.usedColors.push(this.colors[o]),this.colors.splice(o,1),0===this.colors.length&&(this.colors=this.usedColors,this.usedColors=[]),location.protocol+"//via.placeholder.com/120/"+i+"/fff?text="+t},pictureLoad:function(e,t){if(null!==e){var o=!0===t?e.firstName+" "+e.lastName:e.name;if(void 0!==o)return e.pictureThumbPath=e.pictureThumbPath||this.imageFromText(o),e.pictureThumbPath}},imageLoadError:function(e,t){var o=!0===t?e.firstName+" "+e.lastName:e.name;void 0!==o&&(e.pictureThumbPath=this.imageFromText(o))},getNameInitials:function(e){return e.split(" ").map(function(e){return e.charAt(0)}).join("").toUpperCase().substring(0,3).replace(/[^\w\s]/g,"")}}}},676:function(e,t,o){"use strict";t.a={methods:{notify:function(e,t,o){var i=this;setTimeout(function(){i.$notify({title:e,message:t,type:o,offset:50})},700)}}}},677:function(e,t,o){"use strict";(function(t){var i=o(673),n=o(697),a={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!i.isUndefined(e)&&i.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var r,l={adapter:("undefined"!=typeof XMLHttpRequest?r=o(681):void 0!==t&&(r=o(681)),r),transformRequest:[function(e,t){return n(t,"Content-Type"),i.isFormData(e)||i.isArrayBuffer(e)||i.isBuffer(e)||i.isStream(e)||i.isFile(e)||i.isBlob(e)?e:i.isArrayBufferView(e)?e.buffer:i.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):i.isObject(e)?(s(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};l.headers={common:{Accept:"application/json, text/plain, */*"}},i.forEach(["delete","get","head"],function(e){l.headers[e]={}}),i.forEach(["post","put","patch"],function(e){l.headers[e]=i.merge(a)}),e.exports=l}).call(t,o(136))},678:function(e,t,o){"use strict";t.a={data:function(){return{currencies:[{symbol:"$",name:"US Dollar",symbol_native:"$",code:"USD",iso:"us"},{symbol:"€",name:"Euro",symbol_native:"€",code:"EUR",iso:"eu"},{symbol:"£",name:"British Pound Sterling",symbol_native:"£",code:"GBP",iso:"gb"},{symbol:"CA$",name:"Canadian Dollar",symbol_native:"$",code:"CAD",iso:"ca"},{symbol:"CHF",name:"Swiss Franc",symbol_native:"CHF",code:"CHF",iso:"ch"},{symbol:"RUB",name:"Russian Ruble",symbol_native:"руб.",code:"RUB",iso:"ru"},{symbol:"¥",name:"Japanese Yen",symbol_native:"¥",code:"JPY",iso:"jp"},{symbol:"Af",name:"Afghan Afghani",symbol_native:"؋",code:"AFN",iso:"af"},{symbol:"ALL",name:"Albanian Lek",symbol_native:"Lek",code:"ALL",iso:"al"},{symbol:"DA",name:"Algerian Dinar",symbol_native:"د.ج.‏",code:"DZD",iso:"dz"},{symbol:"AR$",name:"Argentine Peso",symbol_native:"$",code:"ARS",iso:"ar"},{symbol:"AMD",name:"Armenian Dram",symbol_native:"դր.",code:"AMD",iso:"am"},{symbol:"AU$",name:"Australian Dollar",symbol_native:"$",code:"AUD",iso:"au"},{symbol:"man.",name:"Azerbaijani Manat",symbol_native:"ман.",code:"AZN",iso:"az"},{symbol:"BD",name:"Bahraini Dinar",symbol_native:"د.ب.‏",code:"BHD",iso:"bh"},{symbol:"Tk",name:"Bangladeshi Taka",symbol_native:"৳",code:"BDT",iso:"bd"},{symbol:"BYR",name:"Belarusian Ruble",symbol_native:"BYR",code:"BYR",iso:"by"},{symbol:"BZ$",name:"Belize Dollar",symbol_native:"$",code:"BZD",iso:"bz"},{symbol:"Bs",name:"Bolivian Boliviano",symbol_native:"Bs",code:"BOB",iso:"bo"},{symbol:"KM",name:"Bosnia-Herzegovina Convertible Mark",symbol_native:"KM",code:"BAM",iso:"ba"},{symbol:"BWP",name:"Botswanan Pula",symbol_native:"P",code:"BWP",iso:"bw"},{symbol:"R$",name:"Brazilian Real",symbol_native:"R$",code:"BRL",iso:"br"},{symbol:"BN$",name:"Brunei Dollar",symbol_native:"$",code:"BND",iso:"bn"},{symbol:"BGN",name:"Bulgarian Lev",symbol_native:"лв.",code:"BGN",iso:"bg"},{symbol:"FBu",name:"Burundian Franc",symbol_native:"FBu",code:"BIF",iso:"bi"},{symbol:"CFA",name:"CFA Franc BCEAO",symbol_native:"CFA",code:"XOF",iso:"auto"},{symbol:"FCFA",name:"CFA Franc BEAC",symbol_native:"FCFA",code:"XAF",iso:"auto"},{symbol:"KHR",name:"Cambodian Riel",symbol_native:"៛",code:"KHR",iso:"kh"},{symbol:"CV$",name:"Cape Verdean Escudo",symbol_native:"CV$",code:"CVE",iso:"cv"},{symbol:"CL$",name:"Chilean Peso",symbol_native:"$",code:"CLP",iso:"cl"},{symbol:"CN¥",name:"Chinese Yuan",symbol_native:"CN¥",code:"CNY",iso:"cn"},{symbol:"CO$",name:"Colombian Peso",symbol_native:"$",code:"COP",iso:"co"},{symbol:"CF",name:"Comorian Franc",symbol_native:"FC",code:"KMF",iso:"km"},{symbol:"CDF",name:"Congolese Franc",symbol_native:"FrCD",code:"CDF",iso:"cd"},{symbol:"₡",name:"Costa Rican Colón",symbol_native:"₡",code:"CRC",iso:"cr"},{symbol:"kn",name:"Croatian Kuna",symbol_native:"kn",code:"HRK",iso:"hr"},{symbol:"Kč",name:"Czech Republic Koruna",symbol_native:"Kč",code:"CZK",iso:"cz"},{symbol:"Dkr",name:"Danish Krone",symbol_native:"kr",code:"DKK",iso:"dk"},{symbol:"Fdj",name:"Djiboutian Franc",symbol_native:"Fdj",code:"DJF",iso:"dj"},{symbol:"RD$",name:"Dominican Peso",symbol_native:"RD$",code:"DOP",iso:"do"},{symbol:"EGP",name:"Egyptian Pound",symbol_native:"ج.م.‏",code:"EGP",iso:"eg"},{symbol:"Nfk",name:"Eritrean Nakfa",symbol_native:"Nfk",code:"ERN",iso:"er"},{symbol:"Ekr",name:"Estonian Kroon",symbol_native:"kr",code:"EEK",iso:"ee"},{symbol:"Br",name:"Ethiopian Birr",symbol_native:"Br",code:"ETB",iso:"et"},{symbol:"GEL",name:"Georgian Lari",symbol_native:"GEL",code:"GEL",iso:"ge"},{symbol:"GH₵",name:"Ghanaian Cedi",symbol_native:"GH₵",code:"GHS",iso:"gh"},{symbol:"GTQ",name:"Guatemalan Quetzal",symbol_native:"Q",code:"GTQ",iso:"gt"},{symbol:"FG",name:"Guinean Franc",symbol_native:"FG",code:"GNF",iso:"gn"},{symbol:"HNL",name:"Honduran Lempira",symbol_native:"L",code:"HNL",iso:"hn"},{symbol:"HK$",name:"Hong Kong Dollar",symbol_native:"$",code:"HKD",iso:"hk"},{symbol:"Ft",name:"Hungarian Forint",symbol_native:"Ft",code:"HUF",iso:"hu"},{symbol:"Ikr",name:"Icelandic Króna",symbol_native:"kr",code:"ISK",iso:"is"},{symbol:"Rs",name:"Indian Rupee",symbol_native:"টকা",code:"INR",iso:"in"},{symbol:"Rp",name:"Indonesian Rupiah",symbol_native:"Rp",code:"IDR",iso:"id"},{symbol:"IRR",name:"Iranian Rial",symbol_native:"﷼",code:"IRR",iso:"ir"},{symbol:"IQD",name:"Iraqi Dinar",symbol_native:"د.ع.‏",code:"IQD",iso:"iq"},{symbol:"₪",name:"Israeli New Sheqel",symbol_native:"₪",code:"ILS",iso:"il"},{symbol:"J$",name:"Jamaican Dollar",symbol_native:"$",code:"JMD",iso:"jm"},{symbol:"JD",name:"Jordanian Dinar",symbol_native:"د.أ.‏",code:"JOD",iso:"jo"},{symbol:"KZT",name:"Kazakhstani Tenge",symbol_native:"тңг.",code:"KZT",iso:"kz"},{symbol:"Ksh",name:"Kenyan Shilling",symbol_native:"Ksh",code:"KES",iso:"ke"},{symbol:"KD",name:"Kuwaiti Dinar",symbol_native:"د.ك.‏",code:"KWD",iso:"kw"},{symbol:"Ls",name:"Latvian Lats",symbol_native:"Ls",code:"LVL",iso:"lv"},{symbol:"LB£",name:"Lebanese Pound",symbol_native:"ل.ل.‏",code:"LBP",iso:"lb"},{symbol:"LD",name:"Libyan Dinar",symbol_native:"د.ل.‏",code:"LYD",iso:"ly"},{symbol:"Lt",name:"Lithuanian Litas",symbol_native:"Lt",code:"LTL",iso:"lt"},{symbol:"MOP$",name:"Macanese Pataca",symbol_native:"MOP$",code:"MOP",iso:"mo"},{symbol:"MKD",name:"Macedonian Denar",symbol_native:"MKD",code:"MKD",iso:"mk"},{symbol:"MGA",name:"Malagasy Ariary",symbol_native:"MGA",code:"MGA",iso:"mg"},{symbol:"RM",name:"Malaysian Ringgit",symbol_native:"RM",code:"MYR",iso:"my"},{symbol:"MURs",name:"Mauritian Rupee",symbol_native:"MURs",code:"MUR",iso:"mu"},{symbol:"MX$",name:"Mexican Peso",symbol_native:"$",code:"MXN",iso:"mx"},{symbol:"MDL",name:"Moldovan Leu",symbol_native:"MDL",code:"MDL",iso:"md"},{symbol:"MAD",name:"Moroccan Dirham",symbol_native:"د.م.‏",code:"MAD",iso:"ma"},{symbol:"MTn",name:"Mozambican Metical",symbol_native:"MTn",code:"MZN",iso:"mz"},{symbol:"MMK",name:"Myanma Kyat",symbol_native:"K",code:"MMK",iso:"mm"},{symbol:"N$",name:"Namibian Dollar",symbol_native:"N$",code:"NAD",iso:"na"},{symbol:"NPRs",name:"Nepalese Rupee",symbol_native:"नेरू",code:"NPR",iso:"np"},{symbol:"NT$",name:"New Taiwan Dollar",symbol_native:"NT$",code:"TWD",iso:"tw"},{symbol:"NZ$",name:"New Zealand Dollar",symbol_native:"$",code:"NZD",iso:"nz"},{symbol:"C$",name:"Nicaraguan Córdoba",symbol_native:"C$",code:"NIO",iso:"ni"},{symbol:"₦",name:"Nigerian Naira",symbol_native:"₦",code:"NGN",iso:"ng"},{symbol:"kr",name:"Norwegian Krone",symbol_native:"kr",code:"NOK",iso:"no"},{symbol:"OMR",name:"Omani Rial",symbol_native:"ر.ع.‏",code:"OMR",iso:"om"},{symbol:"PKRs",name:"Pakistani Rupee",symbol_native:"₨",code:"PKR",iso:"pk"},{symbol:"B/.",name:"Panamanian Balboa",symbol_native:"B/.",code:"PAB",iso:"pa"},{symbol:"₲",name:"Paraguayan Guarani",symbol_native:"₲",code:"PYG",iso:"py"},{symbol:"S/.",name:"Peruvian Nuevo Sol",symbol_native:"S/.",code:"PEN",iso:"pe"},{symbol:"₱",name:"Philippine Peso",symbol_native:"₱",code:"PHP",iso:"ph"},{symbol:"zł",name:"Polish Zloty",symbol_native:"zł",code:"PLN",iso:"pl"},{symbol:"QR",name:"Qatari Rial",symbol_native:"ر.ق.‏",code:"QAR",iso:"qa"},{symbol:"RON",name:"Romanian Leu",symbol_native:"RON",code:"RON",iso:"ro"},{symbol:"RWF",name:"Rwandan Franc",symbol_native:"FR",code:"RWF",iso:"rw"},{symbol:"SR",name:"Saudi Riyal",symbol_native:"ر.س.‏",code:"SAR",iso:"sa"},{symbol:"din.",name:"Serbian Dinar",symbol_native:"дин.",code:"RSD",iso:"rs"},{symbol:"S$",name:"Singapore Dollar",symbol_native:"$",code:"SGD",iso:"sg"},{symbol:"Ssh",name:"Somali Shilling",symbol_native:"Ssh",code:"SOS",iso:"so"},{symbol:"R",name:"South African Rand",symbol_native:"R",code:"ZAR",iso:"za"},{symbol:"₩",name:"South Korean Won",symbol_native:"₩",code:"KRW",iso:"kr"},{symbol:"SLRs",name:"Sri Lankan Rupee",symbol_native:"SL Re",code:"LKR",iso:"lk"},{symbol:"SDG",name:"Sudanese Pound",symbol_native:"SDG",code:"SDG",iso:"sd"},{symbol:"kr",name:"Swedish Krona",symbol_native:"kr",code:"SEK",iso:"se"},{symbol:"SY£",name:"Syrian Pound",symbol_native:"ل.س.‏",code:"SYP",iso:"sy"},{symbol:"TSh",name:"Tanzanian Shilling",symbol_native:"TSh",code:"TZS",iso:"tz"},{symbol:"฿",name:"Thai Baht",symbol_native:"฿",code:"THB",iso:"th"},{symbol:"T$",name:"Tongan Paʻanga",symbol_native:"T$",code:"TOP",iso:"to"},{symbol:"TT$",name:"Trinidad and Tobago Dollar",symbol_native:"$",code:"TTD",iso:"tt"},{symbol:"DT",name:"Tunisian Dinar",symbol_native:"د.ت.‏",code:"TND",iso:"tn"},{symbol:"TL",name:"Turkish Lira",symbol_native:"TL",code:"TRY",iso:"tr"},{symbol:"USh",name:"Ugandan Shilling",symbol_native:"USh",code:"UGX",iso:"ug"},{symbol:"₴",name:"Ukrainian Hryvnia",symbol_native:"₴",code:"UAH",iso:"ua"},{symbol:"AED",name:"United Arab Emirates Dirham",symbol_native:"د.إ.‏",code:"AED",iso:"ae"},{symbol:"$U",name:"Uruguayan Peso",symbol_native:"$",code:"UYU",iso:"uy"},{symbol:"UZS",name:"Uzbekistan Som",symbol_native:"UZS",code:"UZS",iso:"uz"},{symbol:"Bs.S.",name:"Venezuelan Bolívar",symbol_native:"Bs.S.",code:"VES",iso:"ve"},{symbol:"₫",name:"Vietnamese Dong",symbol_native:"₫",code:"VND",iso:"vn"},{symbol:"YR",name:"Yemeni Rial",symbol_native:"ر.ي.‏",code:"YER",iso:"ye"},{symbol:"ZK",name:"Zambian Kwacha",symbol_native:"ZK",code:"ZMK",iso:"zm"}],thousandSeparatorMap:{1:",",2:".",3:" ",4:" "},decimalSeparatorMap:{1:".",2:",",3:".",4:","}}},methods:{getCurrencySymbol:function(){var e=this;return this.currencies.find(function(t){return t.code===e.$root.settings.payments.currency}).symbol},getPriceThousandSeparator:function(){return this.thousandSeparatorMap[this.$root.settings.payments.priceSeparator]},getPriceDecimalSeparator:function(){return this.decimalSeparatorMap[this.$root.settings.payments.priceSeparator]},getPriceNumberOfDecimalPlaces:function(){return this.$root.settings.payments.priceNumberOfDecimals},getPricePrefix:function(){return"after"===this.$root.settings.payments.priceSymbolPosition||"afterWithSpace"===this.$root.settings.payments.priceSymbolPosition?"":"before"===this.$root.settings.payments.priceSymbolPosition?this.getCurrencySymbol():this.getCurrencySymbol()+" "},getPriceSuffix:function(){return"before"===this.$root.settings.payments.priceSymbolPosition||"beforeWithSpace"===this.$root.settings.payments.priceSymbolPosition?"":"after"===this.$root.settings.payments.priceSymbolPosition?this.getCurrencySymbol():" "+this.getCurrencySymbol()},getFormattedPrice:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=this.getPriceNumberOfDecimalPlaces(),i=this.getPriceThousandSeparator(),n=this.getPriceDecimalSeparator(),a=this.getPricePrefix(),s=this.getPriceSuffix(),r=parseInt(e=Math.abs(+e||0).toFixed(o))+"",l=r.length>3?r.length%3:0;return(t?a:"")+(l?r.substr(0,l)+i:"")+r.substr(l).replace(/(\d{3})(?=\d)/g,"$1"+i)+(o?n+Math.abs(e-r).toFixed(o).slice(2):"")+(t?s:"")}},computed:{moneyComponentData:function(){return{decimal:this.getPriceDecimalSeparator(),thousands:this.getPriceThousandSeparator(),prefix:this.getPricePrefix(),suffix:this.getPriceSuffix(),precision:this.getPriceNumberOfDecimalPlaces(),masked:!1}}}}},679:function(e,t,o){"use strict";var i=function(){function e(e,t){for(var o=0;o2&&void 0!==arguments[2]?arguments[2]:{};return t=t.toLowerCase(),this.hasFiles(n)&&(n=(0,s.default)(n),"post"!==t&&(n.append("_method",t.toUpperCase()),t="post")),this.progress=0,this.errors.clear(),this.isPending=!0,new Promise(function(a,s){e.defaults.axios[t](o,n,i.config()).then(function(e){a(e.data)}).catch(function(e){i.handleError(e),s(e)}).then(function(){return i.isPending=!1})})}},{key:"hasFiles",value:function(e){for(var t in e)if(this.fileIsPresent(e[t]))return!0;return!1}},{key:"fileIsPresent",value:function(e){return e instanceof File||e instanceof Array&&e.some(function(e){return e instanceof File})}},{key:"save",value:function(e,t){var o="post";return t.hasOwnProperty("id")&&(o="patch",e=this.urlToPatchResource(e,t)),this[o](e,t)}},{key:"urlToPatchResource",value:function(e,t){return e.replace(/\/+$/,"")+"/"+t.id}},{key:"config",value:function(){var e=this;return{onUploadProgress:function(t){e.progress=Math.round(100*t.loaded/t.total)}}}},{key:"handleError",value:function(e){if(e.response&&422===e.response.status){var t=e.response.data.hasOwnProperty("errors")?e.response.data.errors:e.response.data;this.errors.set(t)}}}]),e}();l.defaults={axios:n.default},e.exports=l},680:function(e,t,o){"use strict";e.exports=function(e,t){return function(){for(var o=new Array(arguments.length),i=0;io;o++){n(arguments[o])}return e},s=function(e){var o=document.querySelectorAll(t.svgSelector),i=function(e,t){return function(){return--e<1?t.apply(this,arguments):void 0}}(o.length,e);Array.prototype.forEach.call(o,function(e,o){var n=e.src||e.getAttribute("data-src"),a=e.attributes,s=new XMLHttpRequest;s.open("GET",n,!0),s.onload=function(){if(s.status>=200&&s.status<400){var o=(new DOMParser).parseFromString(s.responseText,"text/xml").getElementsByTagName("svg")[0];if(o.removeAttribute("xmlns:a"),o.removeAttribute("width"),o.removeAttribute("height"),o.removeAttribute("x"),o.removeAttribute("y"),o.removeAttribute("enable-background"),o.removeAttribute("xmlns:xlink"),o.removeAttribute("xml:space"),o.removeAttribute("version"),Array.prototype.slice.call(a).forEach(function(e){"src"!==e.name&&"alt"!==e.name&&o.setAttribute(e.name,e.value)}),o.classList?o.classList.add("inlined-svg"):o.className+=" inlined-svg",o.setAttribute("role","img"),a.longdesc){var n=document.createElementNS("http://www.w3.org/2000/svg","desc"),r=document.createTextNode(a.longdesc.value);n.appendChild(r),o.insertBefore(n,o.firstChild)}if(a.alt){o.setAttribute("aria-labelledby","title");var l=document.createElementNS("http://www.w3.org/2000/svg","title"),c=document.createTextNode(a.alt.value);l.appendChild(c),o.insertBefore(l,o.firstChild)}e.parentNode.replaceChild(o,e),i(t.svgSelector)}else console.error("There was an error retrieving the source of the SVG.")},s.onerror=function(){console.error("There was an error connecting to the origin server.")},s.send()})};return o.init=function(e,o){i&&(t=a(n,e||{}),s(o||function(){}),document.documentElement.className+=" "+t.initClass)},o}(s),void 0===(a="function"==typeof i?i.apply(t,n):i)||(e.exports=a)}).call(t,o(39))},686:function(e,t,o){"use strict";t.a={data:function(){return{}},methods:{scrollView:function(e){jQuery(window).width()<=600&&document.getElementById(e).scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"})},getUrlQueryParams:function(e){var t=[],o={};return(e.indexOf("#")?e.substring(0,e.indexOf("#")).split("?")[1]:e.split("?")[1]).split("&").forEach(function(e){t=e.split("="),o[t[0]]=decodeURIComponent(t[1]).replace(/\+/g," ")}),o},removeURLParameter:function(e,t){var o=e.split("?");if(o.length>=2){for(var i=encodeURIComponent(t)+"=",n=o[1].split(/[&;]/g),a=n.length;a-- >0;)-1!==n[a].lastIndexOf(i,0)&&n.splice(a,1);return e=o[0]+(n.length>0?"?"+n.join("&"):"")}return e},capitalizeFirstLetter:function(e){return e.charAt(0).toUpperCase()+e.slice(1)}}}},687:function(e,t,o){var i,n;i={expires:"1d",path:"; path=/"},n={install:function(e){e.prototype.$cookies=this,e.cookies=this},config:function(e,t){e&&(i.expires=e),t&&(i.path="; path="+t)},get:function(e){var t=decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null;if(t&&"{"===t.substring(0,1)&&"}"===t.substring(t.length-1,t.length))try{t=JSON.parse(t)}catch(e){return t}return t},set:function(e,t,o,n,a,s){if(!e)throw new Error("cookie name is not find in first argument");if(/^(?:expires|max\-age|path|domain|secure)$/i.test(e))throw new Error("cookie key name illegality ,Cannot be set to ['expires','max-age','path','domain','secure']\t","current key name: "+e);t&&t.constructor===Object&&(t=JSON.stringify(t));var r="";if((o=void 0===o?i.expires:o)&&0!=o)switch(o.constructor){case Number:r=o===1/0||-1===o?"; expires=Fri, 31 Dec 9999 23:59:59 GMT":"; max-age="+o;break;case String:if(/^(?:\d{1,}(y|m|d|h|min|s))$/i.test(o)){var l=o.replace(/^(\d{1,})(?:y|m|d|h|min|s)$/i,"$1");switch(o.replace(/^(?:\d{1,})(y|m|d|h|min|s)$/i,"$1").toLowerCase()){case"m":r="; max-age="+2592e3*+l;break;case"d":r="; max-age="+86400*+l;break;case"h":r="; max-age="+3600*+l;break;case"min":r="; max-age="+60*+l;break;case"s":r="; max-age="+l;break;case"y":r="; max-age="+31104e3*+l;break;default:new Error("unknown exception of 'set operation'")}}else r="; expires="+o;break;case Date:r="; expires="+o.toUTCString()}return document.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)+r+(a?"; domain="+a:"")+(n?"; path="+n:i.path)+(s?"; secure":""),this},remove:function(e,t,o){return!(!e||!this.isKey(e))&&(document.cookie=encodeURIComponent(e)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT"+(o?"; domain="+o:"")+(t?"; path="+t:i.path),this)},isKey:function(e){return new RegExp("(?:^|;\\s*)"+encodeURIComponent(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(document.cookie)},keys:function(){if(!document.cookie)return[];for(var e=document.cookie.replace(/((?:^|\s*;)[^\=]+)(?=;|$)|^\s*|\s*(?:\=[^;]*)?(?:\1|$)/g,"").split(/\s*(?:\=[^;]*)?;\s*/),t=0;t1&&void 0!==arguments[1]?arguments[1]:84600,o=[],i=this.getTimeSlotLength();i<=t;i+=this.getTimeSlotLength())o.push(i);return e&&-1===o.indexOf(e)&&(o.push(e),o.sort(function(e,t){return e-t})),o},getTimeSelectOptionsWithLimits:function(e,t){return{start:"00:00",end:"24:00",step:this.secondsToTimeSelectStep(this.getTimeSlotLength()),minTime:e,maxTime:t}},getStringTimeInSeconds:function(e){return n()(e,"HH:mm").diff(n()().startOf("day"),"seconds")}}}},689:function(e,t,o){var i=o(325)(o(716),o(717),!1,null,null,null);e.exports=i.exports},690:function(e,t,o){var i=o(325)(o(691),o(692),!1,null,null,null);e.exports=i.exports},691:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(674);t.default={mixins:[i.a],props:["appointmentsApproved","appointmentsPending","employeesTotal","customersTotal","locationsTotal","servicesTotal","categoriesTotal","financeTotal","addNewCouponBtnDisplay","addNewCustomFieldBtnDisplay","locations","categories","params","fetched"],data:function(){return{}},methods:{showDialogCustomer:function(){this.$emit("newCustomerBtnClicked",null)},showDialogAppointment:function(){this.$emit("newAppointmentBtnClicked",null)},showDialogEvent:function(){this.$emit("newEventBtnClicked",null)},showDialogEmployee:function(){this.$emit("newEmployeeBtnClicked")},showDialogLocation:function(){this.$emit("newLocationBtnClicked")},showDialogService:function(){this.$emit("newServiceBtnClicked")},showDialogCoupon:function(){this.$emit("newCouponBtnClicked")},showDialogCustomFields:function(){this.$emit("newCustomFieldBtnClicked")},selectAllInCategory:function(e){this.$emit("selectAllInCategory",e)},changeFilter:function(){this.$emit("changeFilter")}},components:{}}},692:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"am-page-header am-section"},[o("el-row",{attrs:{type:"wpamelia-calendar"===e.$router.currentRoute.name?"":"flex",align:"middle"}},[o("el-col",{attrs:{span:"wpamelia-calendar"===e.$router.currentRoute.name?6:18}},[o("div",{staticClass:"am-logo"},[o("img",{staticClass:"logo-big",attrs:{width:"92",src:e.$root.getUrl+"public/img/amelia-logo-horizontal.svg"}}),e._v(" "),o("img",{staticClass:"logo-small",attrs:{width:"28",src:e.$root.getUrl+"public/img/amelia-logo-symbol.svg"}})]),e._v(" "),o("h1",{staticClass:"am-page-title"},[e._v("\n "+e._s(e.$router.currentRoute.meta.title)+"\n\n "),e._v(" "),e.appointmentsApproved>=0?o("span",{staticClass:"am-appointments-number approved"},[e._v("\n "+e._s(e.appointmentsApproved)+"\n ")]):e._e(),e._v(" "),e.appointmentsPending>=0?o("span",{staticClass:"am-appointments-number pending"},[e._v("\n "+e._s(e.appointmentsPending)+"\n ")]):e._e(),e._v(" "),e.employeesTotal>=0&&!0===e.$root.settings.capabilities.canReadOthers?o("span",[o("span",{staticClass:"total-number"},[e._v(e._s(e.employeesTotal))]),e._v(" "+e._s(e.$root.labels.total)+"\n ")]):e._e(),e._v(" "),e.customersTotal>=0?o("span",[o("span",{staticClass:"total-number"},[e._v(e._s(e.customersTotal))]),e._v(" "+e._s(e.$root.labels.total)+"\n ")]):e._e(),e._v(" "),e.locationsTotal>=0?o("span",[o("span",{staticClass:"total-number"},[e._v(e._s(e.locationsTotal))]),e._v(" "+e._s(e.$root.labels.total)+"\n ")]):e._e(),e._v(" "),e.servicesTotal>=0?o("span",[o("span",{staticClass:"total-number"},[e._v(e._s(e.servicesTotal))]),e._v(" "+e._s(e.$root.labels.total)+"\n ")]):e._e(),e._v(" "),e.financeTotal>=0?o("span",[o("span",{staticClass:"total-number"},[e._v(e._s(e.financeTotal))]),e._v(" "+e._s(e.$root.labels.total)+"\n ")]):e._e()])]),e._v(" "),o("el-col",{staticClass:"align-right v-calendar-column",attrs:{span:"wpamelia-calendar"===e.$router.currentRoute.name?18:6}},["wpamelia-appointments"===e.$router.currentRoute.name&&(!0===e.$root.settings.capabilities.canWriteOthers||"provider"===this.$root.settings.role&&this.$root.settings.roles.allowWriteAppointments)?o("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:e.showDialogAppointment}},[o("i",{staticClass:"el-icon-plus"}),e._v(" "),o("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.new_appointment))])]):e._e(),e._v(" "),"wpamelia-events"===e.$router.currentRoute.name&&(!0===e.$root.settings.capabilities.canWriteOthers||"provider"===this.$root.settings.role&&this.$root.settings.roles.allowWriteEvents)?o("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:e.showDialogEvent}},[o("i",{staticClass:"el-icon-plus"}),e._v(" "),o("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.new_event))])]):e._e(),e._v(" "),e.$root.isLite||"wpamelia-employees"!==e.$router.currentRoute.name||!0!==e.$root.settings.capabilities.canWrite||!0!==e.$root.settings.capabilities.canWriteOthers?e._e():o("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:e.showDialogEmployee}},[o("i",{staticClass:"el-icon-plus"}),e._v(" "),o("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.add_employee))])]),e._v(" "),"wpamelia-customers"===e.$router.currentRoute.name&&!0===e.$root.settings.capabilities.canWrite?o("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:e.showDialogCustomer}},[o("i",{staticClass:"el-icon-plus"}),e._v(" "),o("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.add_customer))])]):e._e(),e._v(" "),o("el-popover",e._b({ref:"addLocationPop",attrs:{disabled:!e.$root.isLite}},"el-popover",e.$root.popLiteProps,!1),[o("PopLite")],1),e._v(" "),o("div",{directives:[{name:"popover",rawName:"v-popover:addLocationPop",arg:"addLocationPop"}]},["wpamelia-locations"===e.$router.currentRoute.name&&!0===e.$root.settings.capabilities.canWrite?o("el-button",{class:{"am-dialog-create":!0,"am-lite-disabled":e.$root.isLite},attrs:{type:"primary",disabled:e.$root.isLite},on:{click:e.showDialogLocation}},[o("i",{staticClass:"el-icon-plus"}),e._v(" "),o("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.add_location))])]):e._e()],1),e._v(" "),"wpamelia-services"===e.$router.currentRoute.name&&e.categoriesTotal>0&&!0===e.$root.settings.capabilities.canWrite?o("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:e.showDialogService}},[o("i",{staticClass:"el-icon-plus"}),e._v(" "),o("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.add_service))])]):e._e(),e._v(" "),o("transition",{attrs:{name:"fade"}},[o("div",{directives:[{name:"popover",rawName:"v-popover:addCouponPop",arg:"addCouponPop"}]},[o("el-popover",e._b({ref:"addCouponPop",attrs:{disabled:!e.$root.isLite}},"el-popover",e.$root.popLiteProps,!1),[o("PopLite")],1),e._v(" "),"wpamelia-finance"===e.$router.currentRoute.name&&e.addNewCouponBtnDisplay&&!0===e.$root.settings.capabilities.canWrite?o("el-button",{class:{"am-dialog-create":!0,"am-lite-disabled":e.$root.isLite},attrs:{type:"primary"},on:{click:e.showDialogCoupon}},[o("i",{staticClass:"el-icon-plus"}),e._v(" "),o("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.new_coupon))])]):e._e()],1)]),e._v(" "),o("transition",{attrs:{name:"fade"}},["wpamelia-customize"===e.$router.currentRoute.name&&e.addNewCustomFieldBtnDisplay&&!0===e.$root.settings.capabilities.canWrite?o("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:e.showDialogCustomFields}},[o("i",{staticClass:"el-icon-plus"}),e._v(" "),o("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.add_custom_field))])]):e._e()],1),e._v(" "),"wpamelia-dashboard"===e.$router.currentRoute.name?o("div",{staticClass:"v-calendar-column"},[o("div",{staticClass:"el-form-item__content"},[o("v-date-picker",{attrs:{mode:"range","popover-visibility":"focus","popover-direction":"bottom","popover-align":"right","tint-color":"#1A84EE","show-day-popover":!1,"input-props":{class:"el-input__inner"},"is-expanded":!1,"is-required":!0,"input-class":"el-input__inner",formats:e.vCalendarFormats,"is-double-paned":!0},on:{input:e.changeFilter},model:{value:e.params.dates,callback:function(t){e.$set(e.params,"dates",t)},expression:"params.dates"}})],1)]):e._e(),e._v(" "),"wpamelia-calendar"===e.$router.currentRoute.name?o("div",{staticClass:"am-calendar-header-filters"},[o("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0}},[o("el-popover",e._b({ref:"filterEmployeePop",attrs:{disabled:!e.$root.isLite}},"el-popover",e.$root.popLiteProps,!1),[o("PopLite")],1),e._v(" "),o("el-form-item",{attrs:{label:e.$root.labels.services+":"}},[o("el-select",{directives:[{name:"popover",rawName:"v-popover:filterEmployeePop",arg:"filterEmployeePop"}],attrs:{multiple:"",filterable:"",placeholder:e.$root.labels.all_services,"collapse-tags":"",loading:!e.fetched,disabled:e.$root.isLite},on:{change:e.changeFilter},model:{value:e.params.services,callback:function(t){e.$set(e.params,"services",t)},expression:"params.services"}},e._l(e.categories,function(t){return o("div",{key:t.id},[o("div",{staticClass:"am-drop-parent",on:{click:function(o){return e.selectAllInCategory(t.id)}}},[o("span",[e._v(e._s(t.name))])]),e._v(" "),e._l(t.serviceList,function(e){return o("el-option",{key:e.id,staticClass:"am-drop-child",attrs:{label:e.name,value:e.id}})})],2)}),0)],1),e._v(" "),o("el-form-item",{directives:[{name:"show",rawName:"v-show",value:e.locations.length,expression:"locations.length"}],attrs:{label:e.$root.labels.locations+":"}},[o("el-select",{attrs:{placeholder:e.$root.labels.all_locations,clearable:"",multiple:"","collapse-tags":"",loading:!e.fetched},on:{change:e.changeFilter},model:{value:e.params.locations,callback:function(t){e.$set(e.params,"locations",t)},expression:"params.locations"}},e._l(e.locations,function(e){return o("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1)],1),e._v(" "),"wpamelia-calendar"===e.$router.currentRoute.name&&("admin"===e.$root.settings.role||"manager"===e.$root.settings.role||"provider"===e.$root.settings.role&&e.$root.settings.roles.allowWriteAppointments)?o("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:e.showDialogAppointment}},[o("i",{staticClass:"el-icon-plus"}),e._v(" "),o("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.new_appointment))])]):e._e()],1):e._e()],1)],1)],1)},staticRenderFns:[]}},693:function(e,t,o){"use strict";t.a={data:function(){return{}},methods:{setEntitiesFilter:function(){var e=this,t={categories:{services:[],employees:[],locations:[]},locations:{services:[],employees:[],categories:[]},services:{categories:[],employees:[],locations:[]},employees:{categories:[],services:[],locations:[]}};for(var o in t)this.options.entitiesChoices[o]={selection:"",dependents:t[o]};var i=function(e,t,o){e[t]||(e[t]=[]),-1===e[t].indexOf(o)&&e[t].push(o)};this.options.entities.employees.forEach(function(t){t.serviceList.forEach(function(o){e.options.entities.services.forEach(function(n){n.id===o.id&&(i(e.options.entitiesChoices.categories.dependents.employees,n.categoryId,t.id),i(e.options.entitiesChoices.categories.dependents.locations,n.categoryId,t.locationId),i(e.options.entitiesChoices.categories.dependents.services,n.categoryId,n.id),i(e.options.entitiesChoices.employees.dependents.categories,t.id,n.categoryId),i(e.options.entitiesChoices.services.dependents.categories,n.id,n.categoryId),i(e.options.entitiesChoices.locations.dependents.categories,t.locationId,n.categoryId))}),i(e.options.entitiesChoices.employees.dependents.services,t.id,o.id),i(e.options.entitiesChoices.services.dependents.employees,o.id,t.id),i(e.options.entitiesChoices.services.dependents.locations,o.id,t.locationId),i(e.options.entitiesChoices.locations.dependents.services,t.locationId,o.id)}),i(e.options.entitiesChoices.employees.dependents.locations,t.id,t.locationId),i(e.options.entitiesChoices.locations.dependents.employees,t.locationId,t.id)})},resetEntitiesFilter:function(){var e=this;["employees","services","locations","categories"].forEach(function(t){e.options.entities[t].forEach(function(e){e.disabled=!1})})},getLocationById:function(e){return this.options.entities.locations.find(function(t){return t.id===e})||null},getCustomerById:function(e){return this.options.entities.customers.find(function(t){return t.id===e})||null},getProviderById:function(e){return this.options.entities.employees.find(function(t){return t.id===e})||null},getServiceById:function(e){return this.options.entities.services.find(function(t){return t.id===e})||null},getServiceProviders:function(e){return this.options.entities.employees.filter(function(t){return-1!==t.serviceList.map(function(e){return e.id}).indexOf(e)})},getServicesFromCategories:function(){var e=[];return this.options.entities.categories.map(function(e){return e.serviceList}).forEach(function(t){e=e.concat(t)}),e},getCategoryServices:function(e){return this.options.entities.categories.find(function(t){return t.id===e}).serviceList},getCustomerInfo:function(e){return e.info?JSON.parse(e.info):this.getCustomerById(e.customerId)}},computed:{visibleLocations:function(){return this.options.entities.locations.filter(function(e){return"visible"===e.status})},visibleEmployees:function(){return this.options.entities.employees.filter(function(e){return"visible"===e.status})},visibleCustomers:function(){return this.options.entities.customers.filter(function(e){return"visible"===e.status})},visibleServices:function(){return this.options.entities.services.filter(function(e){return"visible"===e.status})}}}},694:function(e,t,o){e.exports=o(695)},695:function(e,t,o){"use strict";var i=o(673),n=o(680),a=o(696),s=o(677);function r(e){var t=new a(e),o=n(a.prototype.request,t);return i.extend(o,a.prototype,t),i.extend(o,t),o}var l=r(s);l.Axios=a,l.create=function(e){return r(i.merge(s,e))},l.Cancel=o(684),l.CancelToken=o(710),l.isCancel=o(683),l.all=function(e){return Promise.all(e)},l.spread=o(711),e.exports=l,e.exports.default=l},696:function(e,t,o){"use strict";var i=o(677),n=o(673),a=o(705),s=o(706),r=o(708),l=o(709);function c(e){this.defaults=e,this.interceptors={request:new a,response:new a}}c.prototype.request=function(e){"string"==typeof e&&(e=n.merge({url:arguments[0]},arguments[1])),(e=n.merge(i,this.defaults,{method:"get"},e)).method=e.method.toLowerCase(),e.baseURL&&!r(e.url)&&(e.url=l(e.baseURL,e.url));var t=[s,void 0],o=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)o=o.then(t.shift(),t.shift());return o},n.forEach(["delete","get","head","options"],function(e){c.prototype[e]=function(t,o){return this.request(n.merge(o||{},{method:e,url:t}))}}),n.forEach(["post","put","patch"],function(e){c.prototype[e]=function(t,o,i){return this.request(n.merge(i||{},{method:e,url:t,data:o}))}}),e.exports=c},697:function(e,t,o){"use strict";var i=o(673);e.exports=function(e,t){i.forEach(e,function(o,i){i!==t&&i.toUpperCase()===t.toUpperCase()&&(e[t]=o,delete e[i])})}},698:function(e,t,o){"use strict";var i=o(682);e.exports=function(e,t,o){var n=o.config.validateStatus;o.status&&n&&!n(o.status)?t(i("Request failed with status code "+o.status,o.config,null,o.request,o)):e(o)}},699:function(e,t,o){"use strict";e.exports=function(e,t,o,i,n){return e.config=t,o&&(e.code=o),e.request=i,e.response=n,e}},700:function(e,t,o){"use strict";var i=o(673);function n(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,o){if(!t)return e;var a;if(o)a=o(t);else if(i.isURLSearchParams(t))a=t.toString();else{var s=[];i.forEach(t,function(e,t){null!==e&&void 0!==e&&(i.isArray(e)&&(t+="[]"),i.isArray(e)||(e=[e]),i.forEach(e,function(e){i.isDate(e)?e=e.toISOString():i.isObject(e)&&(e=JSON.stringify(e)),s.push(n(t)+"="+n(e))}))}),a=s.join("&")}return a&&(e+=(-1===e.indexOf("?")?"?":"&")+a),e}},701:function(e,t,o){"use strict";var i=o(673);e.exports=function(e){var t,o,n,a={};return e?(i.forEach(e.split("\n"),function(e){n=e.indexOf(":"),t=i.trim(e.substr(0,n)).toLowerCase(),o=i.trim(e.substr(n+1)),t&&(a[t]=a[t]?a[t]+", "+o:o)}),a):a}},702:function(e,t,o){"use strict";var i=o(673);e.exports=i.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");function n(e){var i=e;return t&&(o.setAttribute("href",i),i=o.href),o.setAttribute("href",i),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:"/"===o.pathname.charAt(0)?o.pathname:"/"+o.pathname}}return e=n(window.location.href),function(t){var o=i.isString(t)?n(t):t;return o.protocol===e.protocol&&o.host===e.host}}():function(){return!0}},703:function(e,t,o){"use strict";var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function n(){this.message="String contains an invalid character"}n.prototype=new Error,n.prototype.code=5,n.prototype.name="InvalidCharacterError",e.exports=function(e){for(var t,o,a=String(e),s="",r=0,l=i;a.charAt(0|r)||(l="=",r%1);s+=l.charAt(63&t>>8-r%1*8)){if((o=a.charCodeAt(r+=.75))>255)throw new n;t=t<<8|o}return s}},704:function(e,t,o){"use strict";var i=o(673);e.exports=i.isStandardBrowserEnv()?{write:function(e,t,o,n,a,s){var r=[];r.push(e+"="+encodeURIComponent(t)),i.isNumber(o)&&r.push("expires="+new Date(o).toGMTString()),i.isString(n)&&r.push("path="+n),i.isString(a)&&r.push("domain="+a),!0===s&&r.push("secure"),document.cookie=r.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},705:function(e,t,o){"use strict";var i=o(673);function n(){this.handlers=[]}n.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},n.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},n.prototype.forEach=function(e){i.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=n},706:function(e,t,o){"use strict";var i=o(673),n=o(707),a=o(683),s=o(677);function r(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return r(e),e.headers=e.headers||{},e.data=n(e.data,e.headers,e.transformRequest),e.headers=i.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),i.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||s.adapter)(e).then(function(t){return r(e),t.data=n(t.data,t.headers,e.transformResponse),t},function(t){return a(t)||(r(e),t&&t.response&&(t.response.data=n(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},707:function(e,t,o){"use strict";var i=o(673);e.exports=function(e,t,o){return i.forEach(o,function(o){e=o(e,t)}),e}},708:function(e,t,o){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},709:function(e,t,o){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},710:function(e,t,o){"use strict";var i=o(684);function n(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var o=this;e(function(e){o.reason||(o.reason=new i(e),t(o.reason))})}n.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},n.source=function(){var e;return{token:new n(function(t){e=t}),cancel:e}},e.exports=n},711:function(e,t,o){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},712:function(e,t,o){"use strict";var i,n=function(){function e(e,t){for(var o=0;o0}}]),e}()},713:function(e,t,o){"use strict";function i(e){return void 0===e}function n(e){return Array.isArray(e)}function a(e){return e&&"number"==typeof e.size&&"string"==typeof e.type&&"function"==typeof e.slice}e.exports=function e(t,o,s,r){if(o instanceof FormData&&(r=s,s=o,o=null),(o=o||{}).indices=!i(o.indices)&&o.indices,o.nulls=!!i(o.nulls)||o.nulls,s=s||new FormData,i(t))return s;if(function(e){return null===e}(t))o.nulls&&s.append(r,"");else if(n(t))if(t.length)t.forEach(function(t,i){var n=r+"["+(o.indices?i:"")+"]";e(t,o,s,n)});else{var l=r+"[]";s.append(l,"")}else!function(e){return e instanceof Date}(t)?!function(e){return e===Object(e)}(t)||function(e){return a(e)&&("object"==typeof e.lastModifiedDate||"number"==typeof e.lastModified)&&"string"==typeof e.name}(t)||a(t)?s.append(r,t):Object.keys(t).forEach(function(i){var a=t[i];if(n(a))for(;i.length>2&&i.lastIndexOf("[]")===i.length-2;)i=i.substring(0,i.length-2);e(a,o,s,r?r+"["+i+"]":i)}):s.append(r,t.toISOString());return s}},714:function(e,t,o){var i=o(325)(o(718),o(719),!1,null,null,null);e.exports=i.exports},715:function(e,t,o){"use strict";t.a={data:function(){return{countries:[{id:1,iso:"af",nicename:"Afghanistan",phonecode:93,format:"070 123 4567"},{id:2,iso:"al",nicename:"Albania",phonecode:355,format:"066 123 4567"},{id:3,iso:"dz",nicename:"Algeria",phonecode:213,format:"0551 23 45 67"},{id:4,iso:"as",nicename:"American Samoa",phonecode:1,format:"(684) 733 1234"},{id:5,iso:"ad",nicename:"Andorra",phonecode:376,format:"312 345"},{id:6,iso:"ao",nicename:"Angola",phonecode:244,format:"923 123 456"},{id:7,iso:"ai",nicename:"Anguilla",phonecode:1,format:"(264) 235 1234"},{id:8,iso:"ag",nicename:"Antigua and Barbuda",phonecode:1,format:"(268) 464 1234"},{id:9,iso:"ar",nicename:"Argentina",phonecode:54,format:"9 (11) 1234 567"},{id:10,iso:"am",nicename:"Armenia",phonecode:374,format:"077 123 456"},{id:11,iso:"aw",nicename:"Aruba",phonecode:297,format:"560 1234"},{id:12,iso:"au",nicename:"Australia",phonecode:61,format:"0412 345 678"},{id:13,iso:"at",nicename:"Austria",phonecode:43,format:"0664 123456"},{id:14,iso:"az",nicename:"Azerbaijan",phonecode:994,format:"040 123 45 67"},{id:15,iso:"bs",nicename:"Bahamas",phonecode:1,format:"(242) 359 1234"},{id:16,iso:"bh",nicename:"Bahrain",phonecode:973,format:"3600 1234"},{id:17,iso:"bd",nicename:"Bangladesh",phonecode:880,format:"018 1234 5678"},{id:18,iso:"bb",nicename:"Barbados",phonecode:1,format:"(246) 250 1234"},{id:19,iso:"by",nicename:"Belarus",phonecode:375,format:"029 491 1911"},{id:20,iso:"be",nicename:"Belgium",phonecode:32,format:"0470 123 456"},{id:21,iso:"bz",nicename:"Belize",phonecode:501,format:"622 1234"},{id:22,iso:"bj",nicename:"Benin",phonecode:229,format:"90 123 456"},{id:23,iso:"bm",nicename:"Bermuda",phonecode:1,format:"(441) 370 1234"},{id:24,iso:"bt",nicename:"Bhutan",phonecode:975,format:"17 123 456"},{id:25,iso:"bo",nicename:"Bolivia",phonecode:591,format:"7 123 4567"},{id:26,iso:"ba",nicename:"Bosnia and Herzegovina",phonecode:387,format:"061 123 456"},{id:27,iso:"bw",nicename:"Botswana",phonecode:267,format:"71 123 456"},{id:28,iso:"br",nicename:"Brazil",phonecode:55,format:"(11) 9 1234 5678"},{id:29,iso:"vg",nicename:"British Virgin Islands",phonecode:1,format:"(284) 300 1234"},{id:30,iso:"bn",nicename:"Brunei",phonecode:673,format:"712 3456"},{id:31,iso:"bg",nicename:"Bulgaria",phonecode:359,format:"087 123 4567"},{id:32,iso:"bf",nicename:"Burkina Faso",phonecode:226,format:"70 12 34 56"},{id:33,iso:"bi",nicename:"Burundi",phonecode:257,format:"79 56 12 34"},{id:34,iso:"kh",nicename:"Cambodia",phonecode:855,format:"091 234 567"},{id:35,iso:"cm",nicename:"Cameroon",phonecode:237,format:"6 71 23 45 67"},{id:36,iso:"ca",nicename:"Canada",phonecode:1,format:"(204) 123 4567"},{id:37,iso:"cv",nicename:"Cape Verde",phonecode:238,format:"991 12 34"},{id:38,iso:"ky",nicename:"Cayman Islands",phonecode:1,format:"(345) 323 1234"},{id:39,iso:"cf",nicename:"Central African Republic",phonecode:236,format:"70 01 23 45"},{id:40,iso:"td",nicename:"Chad",phonecode:235,format:"63 01 23 45"},{id:41,iso:"cl",nicename:"Chile",phonecode:56,format:"09 6123 4567"},{id:42,iso:"cn",nicename:"China",phonecode:86,format:"131 2345 6789"},{id:43,iso:"co",nicename:"Colombia",phonecode:57,format:"321 1234567"},{id:44,iso:"km",nicename:"Comoros",phonecode:269,format:"321 23 45"},{id:45,iso:"cd",nicename:"Congo (DRC)",phonecode:243,format:"0991 234 567"},{id:46,iso:"cg",nicename:"Congo (Republic)",phonecode:242,format:"06 123 4567"},{id:47,iso:"ck",nicename:"Cook Islands",phonecode:682,format:"71 234"},{id:48,iso:"cr",nicename:"Costa Rica",phonecode:506,format:"8312 3456"},{id:49,iso:"ci",nicename:"Cote D'Ivoire",phonecode:225,format:"01 23 45 67"},{id:50,iso:"hr",nicename:"Croatia",phonecode:385,format:"091 234 5678"},{id:51,iso:"cu",nicename:"Cuba",phonecode:53,format:"05 1234567"},{id:57,iso:"cy",nicename:"Cyprus",phonecode:357,format:"96 123456"},{id:58,iso:"cz",nicename:"Czech Republic",phonecode:420,format:"601 123 456"},{id:59,iso:"dk",nicename:"Denmark",phonecode:45,format:"20 12 34 56"},{id:60,iso:"dj",nicename:"Djibouti",phonecode:253,format:"77 83 10 01"},{id:61,iso:"dm",nicename:"Dominica",phonecode:1,format:"(767) 225 1234"},{id:62,iso:"do",nicename:"Dominican Republic",phonecode:1,format:"(809) 234 5678"},{id:63,iso:"ec",nicename:"Ecuador",phonecode:593,format:"099 123 4567"},{id:64,iso:"eg",nicename:"Egypt",phonecode:20,format:"0100 123 4567"},{id:65,iso:"sv",nicename:"El Salvador",phonecode:503,format:"7012 3456"},{id:66,iso:"gq",nicename:"Equatorial Guinea",phonecode:240,format:"222 123 456"},{id:67,iso:"er",nicename:"Eritrea",phonecode:291,format:"07 123 456"},{id:68,iso:"ee",nicename:"Estonia",phonecode:372,format:"5123 4567"},{id:69,iso:"et",nicename:"Ethiopia",phonecode:251,format:"091 123 4567"},{id:70,iso:"fk",nicename:"Falkland Islands (Malvinas)",phonecode:500,format:"51234"},{id:71,iso:"fo",nicename:"Faroe Islands",phonecode:298,format:"211234"},{id:72,iso:"fj",nicename:"Fiji",phonecode:679,format:"701 2345"},{id:73,iso:"fi",nicename:"Finland",phonecode:358,format:"041 2345678"},{id:74,iso:"fr",nicename:"France",phonecode:33,format:"06 12 34 56 78"},{id:75,iso:"gf",nicename:"French Guiana",phonecode:594,format:"0694 20 12 34"},{id:76,iso:"pf",nicename:"French Polynesia",phonecode:689,format:"87 12 34 56"},{id:77,iso:"ga",nicename:"Gabon",phonecode:241,format:"06 03 12 34"},{id:78,iso:"gm",nicename:"Gambia",phonecode:220,format:"301 2345"},{id:79,iso:"ge",nicename:"Georgia",phonecode:995,format:"555 12 34 56"},{id:80,iso:"de",nicename:"Germany",phonecode:49,format:"01512 3456789"},{id:81,iso:"gh",nicename:"Ghana",phonecode:233,format:"023 123 4567"},{id:82,iso:"gi",nicename:"Gibraltar",phonecode:350,format:"57123456"},{id:83,iso:"gr",nicename:"Greece",phonecode:30,format:"691 234 5678"},{id:84,iso:"gl",nicename:"Greenland",phonecode:299,format:"22 12 34"},{id:87,iso:"gu",nicename:"Guam",phonecode:1,format:"(671) 300 1234"},{id:88,iso:"gt",nicename:"Guatemala",phonecode:502,format:"5123 4567"},{id:89,iso:"gg",nicename:"Guernsey",phonecode:44,format:"07781 123456"},{id:90,iso:"gn",nicename:"Guinea",phonecode:224,format:"601 12 34 56"},{id:91,iso:"gw",nicename:"Guinea-Bissau",phonecode:245,format:"955 012 345"},{id:92,iso:"gy",nicename:"Guyana",phonecode:592,format:"609 1234"},{id:93,iso:"ht",nicename:"Haiti",phonecode:509,format:"34 10 1234"},{id:94,iso:"hn",nicename:"Honduras",phonecode:504,format:"9123 4567"},{id:95,iso:"hk",nicename:"Hong Kong",phonecode:852,format:"5123 4567"},{id:96,iso:"hu",nicename:"Hungary",phonecode:36,format:"(20) 123 4567"},{id:97,iso:"is",nicename:"Iceland",phonecode:354,format:"611 1234"},{id:98,iso:"in",nicename:"India",phonecode:91,format:"099876 54321"},{id:99,iso:"id",nicename:"Indonesia",phonecode:62,format:"0812 345 678"},{id:100,iso:"ir",nicename:"Iran",phonecode:98,format:"0912 345 6789"},{id:101,iso:"iq",nicename:"Iraq",phonecode:964,format:"0791 234 5678"},{id:102,iso:"ie",nicename:"Ireland",phonecode:353,format:"085 012 3456"},{id:103,iso:"im",nicename:"Isle of Man",phonecode:44,format:"07924 123456"},{id:104,iso:"il",nicename:"Israel",phonecode:972,format:"050 123 4567"},{id:105,iso:"it",nicename:"Italy",phonecode:39,format:"312 345 6789"},{id:106,iso:"jm",nicename:"Jamaica",phonecode:1,format:"(876) 210 1234"},{id:107,iso:"jp",nicename:"Japan",phonecode:81,format:"090 1234 5678"},{id:108,iso:"je",nicename:"Jersey",phonecode:44,format:"07797 123456"},{id:109,iso:"jo",nicename:"Jordan",phonecode:962,format:"07 9012 3456"},{id:110,iso:"kz",nicename:"Kazakhstan",phonecode:7,format:"(771) 123 4567"},{id:111,iso:"ke",nicename:"Kenya",phonecode:254,format:"0712 123456"},{id:112,iso:"ki",nicename:"Kiribati",phonecode:686,format:"72012345"},{id:113,iso:"kw",nicename:"Kuwait",phonecode:965,format:"500 12345"},{id:114,iso:"kg",nicename:"Kyrgyzstan",phonecode:996,format:"0700 123 456"},{id:115,iso:"la",nicename:"Laos",phonecode:856,format:"020 23 123 456"},{id:116,iso:"lv",nicename:"Latvia",phonecode:371,format:"21 234 567"},{id:117,iso:"lb",nicename:"Lebanon",phonecode:961,format:"71 123 456"},{id:118,iso:"ls",nicename:"Lesotho",phonecode:266,format:"5012 3456"},{id:119,iso:"lr",nicename:"Liberia",phonecode:231,format:"077 012 3456"},{id:120,iso:"ly",nicename:"Libya",phonecode:218,format:"091 2345678"},{id:121,iso:"li",nicename:"Liechtenstein",phonecode:423,format:"660 234 567"},{id:122,iso:"lt",nicename:"Lithuania",phonecode:370,format:"612 345 67"},{id:123,iso:"lu",nicename:"Luxembourg",phonecode:352,format:"628 123 456"},{id:124,iso:"mo",nicename:"Macao",phonecode:853,format:"6612 3456"},{id:125,iso:"mk",nicename:"Macedonia (FYROM)",phonecode:389,format:"072 345 678"},{id:126,iso:"mg",nicename:"Madagascar",phonecode:261,format:"032 12 345 67"},{id:127,iso:"mw",nicename:"Malawi",phonecode:265,format:"0991 23 45 67"},{id:128,iso:"my",nicename:"Malaysia",phonecode:60,format:"012 345 6789"},{id:129,iso:"mv",nicename:"Maldives",phonecode:960,format:"771 2345"},{id:130,iso:"ml",nicename:"Mali",phonecode:223,format:"65 01 23 45"},{id:131,iso:"mt",nicename:"Malta",phonecode:356,format:"9696 1234"},{id:132,iso:"mh",nicename:"Marshall Islands",phonecode:692,format:"235 1234"},{id:133,iso:"mq",nicename:"Martinique",phonecode:596,format:"0696 20 12 34"},{id:134,iso:"mr",nicename:"Mauritania",phonecode:222,format:"22 12 34 56"},{id:135,iso:"mu",nicename:"Mauritius",phonecode:230,format:"5251 2345"},{id:136,iso:"yt",nicename:"Mayotte",phonecode:269,format:"0639 12 34 56"},{id:137,iso:"mx",nicename:"Mexico",phonecode:52,format:"044 222 123 4567"},{id:138,iso:"fm",nicename:"Micronesia",phonecode:691,format:"350 1234"},{id:139,iso:"md",nicename:"Moldova",phonecode:373,format:"0621 12 345"},{id:140,iso:"mc",nicename:"Monaco",phonecode:377,format:"06 12 34 56 78"},{id:141,iso:"mn",nicename:"Mongolia",phonecode:976,format:"8812 3456"},{id:142,iso:"me",nicename:"Montenegro",phonecode:382,format:"067 622 901"},{id:143,iso:"ms",nicename:"Montserrat",phonecode:1,format:"(664) 492 3456"},{id:144,iso:"ma",nicename:"Morocco",phonecode:212,format:"0650 123456"},{id:145,iso:"mz",nicename:"Mozambique",phonecode:258,format:"82 123 4567"},{id:146,iso:"mm",nicename:"Myanmar",phonecode:95,format:"09 212 3456"},{id:147,iso:"na",nicename:"Namibia",phonecode:264,format:"081 123 4567"},{id:149,iso:"np",nicename:"Nepal",phonecode:977,format:"984 1234567"},{id:150,iso:"nl",nicename:"Netherlands",phonecode:31,format:"06 12345678"},{id:151,iso:"nc",nicename:"New Caledonia",phonecode:687,format:"75 12 34"},{id:152,iso:"nz",nicename:"New Zealand",phonecode:64,format:"021 123 4567"},{id:153,iso:"ni",nicename:"Nicaragua",phonecode:505,format:"8123 4567"},{id:154,iso:"ne",nicename:"Niger",phonecode:227,format:"93 12 34 56"},{id:155,iso:"ng",nicename:"Nigeria",phonecode:234,format:"0802 123 4567"},{id:156,iso:"nu",nicename:"Niue",phonecode:683,format:"1234"},{id:157,iso:"nf",nicename:"Norfolk Island",phonecode:672,format:"3 81234"},{id:160,iso:"no",nicename:"Norway",phonecode:47,format:"406 12 345"},{id:161,iso:"om",nicename:"Oman",phonecode:968,format:"9212 3456"},{id:162,iso:"pk",nicename:"Pakistan",phonecode:92,format:"0301 2345678"},{id:163,iso:"pw",nicename:"Palau",phonecode:680,format:"620 1234"},{id:164,iso:"ps",nicename:"Palestine",phonecode:970,format:"0599 123 456"},{id:165,iso:"pa",nicename:"Panama",phonecode:507,format:"6001 2345"},{id:166,iso:"pg",nicename:"Papua New Guinea",phonecode:675,format:"681 2345"},{id:167,iso:"py",nicename:"Paraguay",phonecode:595,format:"0961 456789"},{id:168,iso:"pe",nicename:"Peru",phonecode:51,format:"912 345 678"},{id:169,iso:"ph",nicename:"Philippines",phonecode:63,format:"0905 123 4567"},{id:170,iso:"pl",nicename:"Poland",phonecode:48,format:"512 345 678"},{id:171,iso:"pt",nicename:"Portugal",phonecode:351,format:"912 345 678"},{id:172,iso:"pr",nicename:"Puerto Rico",phonecode:1,format:"(787) 234 5678"},{id:173,iso:"qa",nicename:"Qatar",phonecode:974,format:"3312 3456"},{id:175,iso:"ro",nicename:"Romania",phonecode:40,format:"0712 345 678"},{id:176,iso:"ru",nicename:"Russia",phonecode:7,format:"(912) 123 4567",priority:1},{id:177,iso:"rw",nicename:"Rwanda",phonecode:250,format:"0720 123 456"},{id:180,iso:"kn",nicename:"Saint Kitts and Nevis",phonecode:1,format:"(869) 765 2917"},{id:181,iso:"lc",nicename:"Saint Lucia",phonecode:1,format:"(758) 284 5678"},{id:184,iso:"vc",nicename:"Saint Vincent and the Grenadines",phonecode:1,format:"(784) 430 1234"},{id:185,iso:"ws",nicename:"Samoa",phonecode:684,format:"601234"},{id:186,iso:"sm",nicename:"San Marino",phonecode:378,format:"66 66 12 12"},{id:187,iso:"st",nicename:"Sao Tome and Principe",phonecode:239,format:"981 2345"},{id:188,iso:"sa",nicename:"Saudi Arabia",phonecode:966,format:"051 234 5678"},{id:189,iso:"sn",nicename:"Senegal",phonecode:221,format:"70 123 45 67"},{id:190,iso:"rs",nicename:"Serbia",phonecode:381,format:"060 1234567"},{id:191,iso:"sc",nicename:"Seychelles",phonecode:248,format:"2 510 123"},{id:192,iso:"sl",nicename:"Sierra Leone",phonecode:232,format:"(025) 123456"},{id:193,iso:"sg",nicename:"Singapore",phonecode:65,format:"8123 4567"},{id:195,iso:"sk",nicename:"Slovakia",phonecode:421,format:"0912 123 456"},{id:196,iso:"si",nicename:"Slovenia",phonecode:386,format:"031 234 567"},{id:197,iso:"sb",nicename:"Solomon Islands",phonecode:677,format:"74 21234"},{id:198,iso:"so",nicename:"Somalia",phonecode:252,format:"7 1123456"},{id:199,iso:"za",nicename:"South Africa",phonecode:27,format:"071 123 4567"},{id:200,iso:"kr",nicename:"South Korea",phonecode:82,format:"010 1234 567"},{id:201,iso:"ss",nicename:"South Sudan",phonecode:211,format:"0977 123 456"},{id:202,iso:"es",nicename:"Spain",phonecode:34,format:"612 34 56 78"},{id:203,iso:"lk",nicename:"Sri Lanka",phonecode:94,format:"071 234 5678"},{id:204,iso:"sd",nicename:"Sudan",phonecode:249,format:"091 123 1234"},{id:205,iso:"sr",nicename:"Suriname",phonecode:597,format:"741 2345"},{id:207,iso:"sz",nicename:"Swaziland",phonecode:268,format:"7612 3456"},{id:208,iso:"se",nicename:"Sweden",phonecode:46,format:"070 123 45 67"},{id:209,iso:"ch",nicename:"Switzerland",phonecode:41,format:"078 123 45 67"},{id:210,iso:"sy",nicename:"Syria",phonecode:963,format:"0944 567 890"},{id:211,iso:"tw",nicename:"Taiwan",phonecode:886,format:"0912 345 678"},{id:212,iso:"tj",nicename:"Tajikistan",phonecode:992,format:"917 123 456"},{id:214,iso:"th",nicename:"Thailand",phonecode:66,format:"081 234 5678"},{id:215,iso:"tl",nicename:"Timor-Leste",phonecode:670,format:"7721 2345"},{id:216,iso:"tg",nicename:"Togo",phonecode:228,format:"90 11 23 45"},{id:218,iso:"to",nicename:"Tonga",phonecode:676,format:"771 5123"},{id:219,iso:"tt",nicename:"Trinidad and Tobago",phonecode:1,format:"(868) 291 1234"},{id:220,iso:"tn",nicename:"Tunisia",phonecode:216,format:"20 123 456"},{id:221,iso:"tr",nicename:"Turkey",phonecode:90,format:"0501 234 56 78"},{id:222,iso:"tm",nicename:"Turkmenistan",phonecode:7370,format:"8 66 123456"},{id:223,iso:"tc",nicename:"Turks and Caicos Islands",phonecode:1,format:"(649) 231 1234"},{id:224,iso:"tv",nicename:"Tuvalu",phonecode:688,format:"901234"},{id:225,iso:"ug",nicename:"Uganda",phonecode:256,format:"0712 345678"},{id:226,iso:"ua",nicename:"Ukraine",phonecode:380,format:"039 123 4567"},{id:227,iso:"ae",nicename:"United Arab Emirates",phonecode:971,format:"050 123 4567"},{id:228,iso:"gb",nicename:"United Kingdom",phonecode:44,format:"07400 123456",priority:1},{id:229,iso:"us",nicename:"United States",phonecode:1,format:"(201) 555 0123",priority:1},{id:230,iso:"uy",nicename:"Uruguay",phonecode:598,format:"094 231 234"},{id:231,iso:"uz",nicename:"Uzbekistan",phonecode:998,format:"8 91 234 56 78"},{id:232,iso:"vu",nicename:"Vanuatu",phonecode:678,format:"591 2345"},{id:234,iso:"ve",nicename:"Venezuela",phonecode:58,format:"0412 1234567"},{id:235,iso:"vn",nicename:"Vietnam",phonecode:84,format:"091 234 56 78"},{id:236,iso:"vi",nicename:"Virgin Islands, U.S.",phonecode:1,format:"(340) 642 1234"},{id:237,iso:"ye",nicename:"Yemen",phonecode:967,format:"0712 345 678"},{id:238,iso:"zm",nicename:"Zambia",phonecode:260,format:"095 5123456"},{id:239,iso:"zw",nicename:"Zimbabwe",phonecode:263,format:"071 123 4567"},{id:240,iso:"ax",nicename:"Åland Islands",phonecode:358,format:"041 2345678"}]}}}},716:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(679),n=o.n(i),a=o(676),s=o(674);t.default={mixins:[a.a,s.a],props:{formName:"",urlName:null,isNew:null,entity:null,getParsedEntity:null,haveSaveConfirmation:null,hasApplyGloballyVisibility:!1,hasApplyGloballyDeletion:!1,hasIcons:!0,status:null,buttonType:{status:"primary",remove:"danger"},action:{haveAdd:!1,haveEdit:!1,haveStatus:!1,haveRemove:!1,haveRemoveEffect:!1,ignoreDeleteEffect:!1,haveDuplicate:!1},message:{success:{save:null,remove:null,show:null,hide:null},confirm:{remove:null,show:null,hide:null,duplicate:null,save:null}},buttonText:null},data:function(){return{form:new n.a,allowedDelete:!0,showDeleteConfirmation:!1,showVisibilityConfirmation:!1,showDuplicateConfirmation:!1,showSaveConfirmation:!1,deleteEffectMessage:null,dialogLoading:!1}},methods:{getButtonType:function(e){switch(e){case"status":return this.hasIcons?null:this.buttonType.status;case"remove":return this.hasIcons?null:this.buttonType.remove;case"duplicate":return null}},closeDialog:function(){this.$parent.$emit("closeDialog")},onSubmit:function(e){var t=this,o=this.$root;this.$parent.$refs[this.formName].validate(function(i,n){if(!i)return"appointment"===t.formName&&t.handleAppointmentDialogTabChange(n),t.$emit("validationFailCallback"),!1;t.dialogLoading=!0,t.isNew?t.addEntity(e):t.editEntity(e),t.$root=o})},onSuccess:function(e,t,o){var i=this;this.$parent.$emit("saveCallback",o),setTimeout(function(){i.dialogLoading=!1,i.$parent.$emit("closeDialog")},300),this.notify(e,t,"success")},onError:function(e,t){this.dialogLoading=!1,this.$emit("errorCallback",t)},addEntity:function(e){var t=this;this.form.post(this.$root.getAjaxUrl+"/"+this.urlName,this.getParsedEntity(e)).then(function(e){t.onSuccess(t.$root.labels.success,t.message.success.save,e.data)}).catch(function(e){e.response&&t.onError("",e.response.data)})},editEntity:function(e){var t=this;this.form.post(this.$root.getAjaxUrl+"/"+this.urlName+"/"+this.entity.id,this.getParsedEntity(e)).then(function(e){t.onSuccess(t.$root.labels.success,t.message.success.save,e.data)}).catch(function(e){e.response&&t.onError("",e.response.data)})},deleteEntity:function(e){var t=this;this.dialogLoading=!0,this.form.post(this.$root.getAjaxUrl+"/"+this.urlName+"/delete/"+this.entity.id,{status:this.status.on,applyGlobally:e}).then(function(e){t.onSuccess(t.$root.labels.success,t.message.success.remove,e.data)}).catch(function(e){e.response&&t.onError("",e.response.data.message)})},showEntity:function(e){var t=this;this.dialogLoading=!0,this.form.post(this.$root.getAjaxUrl+"/"+this.urlName+"/status/"+this.entity.id,{status:this.status.on,applyGlobally:e}).then(function(e){t.onSuccess(t.$root.labels.success,t.message.success.show,null)}).catch(function(e){e.response&&t.onError("",e.response.data.message)})},hideEntity:function(e){var t=this;this.dialogLoading=!0,this.form.post(this.$root.getAjaxUrl+"/"+this.urlName+"/status/"+this.entity.id,{status:this.status.off,applyGlobally:e}).then(function(){t.onSuccess(t.$root.labels.success,t.message.success.hide,null)}).catch(function(e){e.response&&t.onError("",e.response.data.message)})},duplicateEntity:function(){this.dialogLoading=!0,this.$parent.$emit("closeDialog",!0),this.$parent.$emit("duplicateCallback",this.entity)},handleSaveConfirmation:function(){this.showSaveConfirmation=!this.showSaveConfirmation,this.showVisibilityConfirmation=!1,this.showDeleteConfirmation=!1,this.showDuplicateConfirmation=!1},handleDuplicateConfirmation:function(){this.showDuplicateConfirmation=!this.showDuplicateConfirmation,this.showSaveConfirmation=!1,this.showDeleteConfirmation=!1,this.showVisibilityConfirmation=!1},handleVisibilityConfirmation:function(){this.showVisibilityConfirmation=!this.showVisibilityConfirmation,this.showSaveConfirmation=!1,this.showDeleteConfirmation=!1,this.showDuplicateConfirmation=!1},handleDeleteConfirmation:function(){var e=this;this.showVisibilityConfirmation=!1,this.showDuplicateConfirmation=!1,this.showSaveConfirmation=!1,this.action.haveRemoveEffect?!1===this.showDeleteConfirmation&&this.$http.get(this.$root.getAjaxUrl+"/"+this.urlName+"/effect/"+this.entity.id).then(function(t){e.allowedDelete=t.data.data.valid||e.ignoreDeleteEffect,e.deleteEffectMessage=t.data.data.message,e.showDeleteConfirmation=!e.showDeleteConfirmation}).catch(function(t){e.showDeleteConfirmation=!e.showDeleteConfirmation,e.deleteEffectMessage=""}):this.showDeleteConfirmation=!this.showDeleteConfirmation},handleSaveClick:function(){this.haveSaveConfirmation&&this.haveSaveConfirmation()?this.handleSaveConfirmation():this.onSubmit(!1)},getConfirmSaveButtonText:function(){return null!==this.buttonText&&this.buttonText.confirm&&this.buttonText.confirm.save?{yes:this.buttonText.confirm.save.yes,no:this.buttonText.confirm.save.no}:{yes:this.$root.labels.yes,no:this.$root.labels.no}},getConfirmDeleteButtonText:function(){return null!==this.buttonText&&this.buttonText.confirm&&this.buttonText.confirm.remove?{yes:this.buttonText.confirm.remove.yes,no:this.buttonText.confirm.remove.no}:{yes:this.$root.labels.yes,no:this.$root.labels.no}},getConfirmStatusButtonText:function(){return null!==this.buttonText&&this.buttonText.confirm&&this.buttonText.confirm.status?{yes:this.buttonText.confirm.status.yes,no:this.buttonText.confirm.status.no}:{yes:this.$root.labels.yes,no:this.$root.labels.no}},getActionStatusButtonText:function(){return null!==this.buttonText&&this.buttonText.action?this.buttonText.action.status:""},getActionRemoveButtonText:function(){return null!==this.buttonText&&this.buttonText.action?this.buttonText.action.remove:""},handleAppointmentDialogTabChange:function(e){for(var t=Object.keys(e),o=0,i=0;i1&&void 0!==arguments[1]?arguments[1]:p.a;"number"==typeof e&&(e=e.toFixed(s(t.precision)));var o=e.indexOf("-")>=0?"-":"",i=l(r(a(e),t.precision)).split("."),n=i[0],c=i[1];return n=function(e,t){return e.replace(/(\d)(?=(?:\d{3})+\b)/gm,"$1"+t)}(n,t.thousands),t.prefix+o+function(e,t,o){return t?e+o+t:e}(n,c,t.decimal)+t.suffix}function n(e,t){var o=e.indexOf("-")>=0?-1:1,i=r(a(e),t);return parseFloat(i)*o}function a(e){return l(e).replace(/\D+/g,"")||"0"}function s(e){return function(e,t,o){return Math.max(e,Math.min(t,o))}(0,e,20)}function r(e,t){var o=Math.pow(10,t);return(parseFloat(e)/o).toFixed(s(t))}function l(e){return e?e.toString():""}function c(e,t){var o=function(){e.setSelectionRange(t,t)};e===document.activeElement&&(o(),setTimeout(o,1))}function m(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!0),t}var p=o(0);o.d(t,"a",function(){return i}),o.d(t,"d",function(){return n}),o.d(t,"b",function(){return c}),o.d(t,"c",function(){return m})},function(e,t,o){"use strict";function i(e,t){t&&Object.keys(t).map(function(e){r.a[e]=t[e]}),e.directive("money",s.a),e.component("money",a.a)}Object.defineProperty(t,"__esModule",{value:!0});var n=o(6),a=o.n(n),s=o(1),r=o(0);o.d(t,"Money",function(){return a.a}),o.d(t,"VMoney",function(){return s.a}),o.d(t,"options",function(){return r.a}),o.d(t,"VERSION",function(){return l});var l="0.8.1";t.default=i,"undefined"!=typeof window&&window.Vue&&window.Vue.use(i)},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(1),n=o(0),a=o(2);t.default={name:"Money",props:{value:{required:!0,type:[Number,String],default:0},masked:{type:Boolean,default:!1},precision:{type:Number,default:function(){return n.a.precision}},decimal:{type:String,default:function(){return n.a.decimal}},thousands:{type:String,default:function(){return n.a.thousands}},prefix:{type:String,default:function(){return n.a.prefix}},suffix:{type:String,default:function(){return n.a.suffix}}},directives:{money:i.a},data:function(){return{formattedValue:""}},watch:{value:{immediate:!0,handler:function(e,t){var i=o.i(a.a)(e,this.$props);i!==this.formattedValue&&(this.formattedValue=i)}}},methods:{change:function(e){this.$emit("input",this.masked?e.target.value:o.i(a.d)(e.target.value,this.precision))}}}},function(e,t,o){"use strict";t.a=function(e,t){return e=e||{},t=t||{},Object.keys(e).concat(Object.keys(t)).reduce(function(o,i){return o[i]=void 0===t[i]?e[i]:t[i],o},{})}},function(e,t,o){var i=o(7)(o(4),o(8),null,null);e.exports=i.exports},function(e,t){e.exports=function(e,t,o,i){var n,a=e=e||{},s=typeof e.default;"object"!==s&&"function"!==s||(n=e,a=e.default);var r="function"==typeof a?a.options:a;if(t&&(r.render=t.render,r.staticRenderFns=t.staticRenderFns),o&&(r._scopeId=o),i){var l=r.computed||(r.computed={});Object.keys(i).forEach(function(e){var t=i[e];l[e]=function(){return t}})}return{esModule:n,exports:a,options:r}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement;return(e._self._c||t)("input",{directives:[{name:"money",rawName:"v-money",value:{precision:e.precision,decimal:e.decimal,thousands:e.thousands,prefix:e.prefix,suffix:e.suffix},expression:"{precision, decimal, thousands, prefix, suffix}"}],staticClass:"v-money",attrs:{type:"tel"},domProps:{value:e.formattedValue},on:{change:e.change}})},staticRenderFns:[]}},function(e,t,o){e.exports=o(3)}])},e.exports=i()},722:function(e,t,o){"use strict";t.a={data:function(){return{}},methods:{filterResponseData:function(e){e.data.data.employees=e.data.data.employees.slice(0,1),e.data.data.employees.length&&(e.data.data.employees[0].locationId=null,e.data.data.employees[0].serviceList.forEach(function(e){e.maxCapacity=1,e.minCapacity=1,e.timeAfter="",e.timeBefore=""}))},setInitialEmployee:function(e){var t=this;e.length||this.$http.get(this.$root.getAjaxUrl+"/users/current").then(function(e){var o=null;(o=e.data.data.user?{email:e.data.data.user.email,firstName:e.data.data.user.firstName,lastName:e.data.data.user.lastName,phone:e.data.data.user.phone||""}:{firstName:"firstname",lastName:"lastname",email:"example@example.com"}).type="provider",o.weekDayList=t.getSettingsSchedule(),t.form.post(t.$root.getAjaxUrl+"/users/providers",o).then(function(e){t.options.employees=[e.data.user]}).catch()}).catch()}}}},723:function(e,t,o){"use strict";t.a={data:function(){return{}},methods:{getPaymentData:function(e,t,o){var i=this,n={};if(n.paymentId=e,t){n.bookableType="appointment",n.bookings=t.bookings,n.bookingStart=t.bookingStart,n.bookableName=this.getServiceById(t.serviceId).name;var a=this.getProviderById(t.providerId);a.fullName=a.firstName+" "+a.lastName,n.providers=[a],t.bookings.forEach(function(t){t.payments.forEach(function(o){o.id===e&&(n.customer=i.getCustomerById(t.customerId))})})}return o&&(n.bookableType="event",n.bookings=o.bookings,n.bookingStart=o.periods[0].periodStart,n.bookableName=o.name,n.providers=o.providers,o.bookings.forEach(function(t){t.payments.forEach(function(o){o.id===e&&(n.customer=i.getCustomerById(t.customerId))})})),n},getPaymentGatewayNiceName:function(e){return"onSite"===e.gateway?this.$root.labels.on_site:"wc"===e.gateway?e.gatewayTitle:e.gateway?e.gateway.charAt(0).toUpperCase()+e.gateway.slice(1):void 0}}}},732:function(e,t,o){"use strict";t.a={data:function(){return{}},methods:{getAppointmentPrice:function(e,t){var o=0,i=this,n=this.getServiceById(e);return t.forEach(function(e){e.payments.forEach(function(){["approved","pending"].includes(e.status)&&(o+=i.getBookingPrice(e,!1,null))}),0===e.payments.length&&(o+=i.getBookingPrice(e,!0,n.price))}),this.getFormattedPrice(o>=0?o:0)},getBookingPrice:function(e,t,o){var i=0;e.extras.forEach(function(t){void 0!==t.selected&&!0!==t.selected||(i+=t.price*t.quantity*e.persons)});var n=(t?o:e.price*e.persons)+i;return n-(n/100*(e.coupon?e.coupon.discount:0)+(e.coupon?e.coupon.deduction:0))}},watch:{}}},733:function(e,t,o){"use strict";t.a={data:function(){return{dialogCustomer:!1}},methods:{getInitCustomerObject:function(){return{id:0,firstName:"",lastName:"",externalId:"",phone:"",email:"",gender:"",birthday:null,note:"",status:"visible",type:"customer",countPendingAppointments:0}}}}},734:function(e,t,o){var i=o(325)(o(735),o(736),!1,null,null,null);e.exports=i.exports},735:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(689),n=o.n(i),a=o(714),s=o.n(a),r=o(675),l=o(674),c=o(676),m=o(686);t.default={mixins:[r.a,l.a,c.a,m.a],props:{customer:null},data:function(){return{dialogLoading:!0,errors:{email:""},formOptions:{wpUsers:[],genders:[{value:"female",label:"Female"},{value:"male",label:"Male"}]},rules:{firstName:[{required:!0,message:this.$root.labels.enter_first_name_warning,trigger:"submit"}],lastName:[{required:!0,message:this.$root.labels.enter_last_name_warning,trigger:"submit"}],email:[{required:this.$root.settings.general.requiredEmailField,message:this.$root.labels.enter_email_warning,trigger:"submit"},{type:"email",message:this.$root.labels.enter_valid_email_warning,trigger:"submit"}]}}},created:function(){0!==this.customer.id?(this.customer.birthday=this.$moment(this.customer.birthday).toDate(),this.getWPUsers(this.customer.externalId),this.customer.gender&&(this.customer.gender=this.capitalizeFirstLetter(this.customer.gender))):this.getWPUsers(0)},mounted:function(){this.inlineSVG()},methods:{errorCallback:function(e){var t=this;t.errors.email="",setTimeout(function(){t.errors.email=e.message},200)},getParsedEntity:function(){var e=JSON.parse(JSON.stringify(this.customer));return e.birthday&&(e.birthday=this.getDatabaseFormattedDate(this.$moment(e.birthday).format("YYYY-MM-DD"))),e},closeDialog:function(){this.$emit("closeDialog")},getWPUsers:function(){this.customer.externalId=null,this.dialogLoading=!1},phoneFormatted:function(e){this.clearValidation(),this.customer.phone=e},clearValidation:function(){void 0!==this.$refs.customer&&this.$refs.customer.clearValidate()},selectCreateNewWPUser:function(){this.customer.externalId=0,this.$refs.wpUser.blur()}},components:{PhoneInput:s.a,DialogActions:n.a}}},736:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[o("div",{directives:[{name:"show",rawName:"v-show",value:e.dialogLoading,expression:"dialogLoading"}],staticClass:"am-dialog-loader"},[o("div",{staticClass:"am-dialog-loader-content"},[o("img",{attrs:{src:e.$root.getUrl+"public/img/spinner.svg"}}),e._v(" "),o("p",[e._v(e._s(e.$root.labels.loader_message))])])]),e._v(" "),e.dialogLoading?e._e():o("div",{staticClass:"am-dialog-scrollable",class:{"am-edit":0!==e.customer.id}},[o("div",{staticClass:"am-dialog-header"},[o("el-row",[o("el-col",{attrs:{span:18}},[0!==e.customer.id?o("h2",[e._v(e._s(e.$root.labels.edit_customer))]):o("h2",[e._v(e._s(e.$root.labels.new_customer))])]),e._v(" "),o("el-col",{staticClass:"align-right",attrs:{span:6}},[o("span"),e._v(" "),o("el-button",{staticClass:"am-dialog-close",attrs:{size:"small",icon:"el-icon-close"},on:{click:e.closeDialog}})],1)],1)],1),e._v(" "),o("el-form",{ref:"customer",attrs:{model:e.customer,rules:e.rules,"label-position":"top"},on:{submit:function(t){return t.preventDefault(),e.onSubmit(t)}}},[o("el-form-item",{attrs:{label:e.$root.labels.first_name+":",prop:"firstName"}},[o("el-input",{attrs:{"auto-complete":"off"},on:{input:function(t){return e.clearValidation()}},model:{value:e.customer.firstName,callback:function(t){e.$set(e.customer,"firstName",t)},expression:"customer.firstName"}})],1),e._v(" "),o("el-form-item",{attrs:{label:e.$root.labels.last_name+":",prop:"lastName"}},[o("el-input",{attrs:{"auto-complete":"off"},on:{input:function(t){return e.clearValidation()}},model:{value:e.customer.lastName,callback:function(t){e.$set(e.customer,"lastName",t)},expression:"customer.lastName"}})],1),e._v(" "),o("el-form-item",{attrs:{label:e.$root.labels.email+":",prop:"email",error:e.errors.email}},[o("el-input",{attrs:{"auto-complete":"off",placeholder:e.$root.labels.email_placeholder},on:{input:function(t){return e.clearValidation()}},model:{value:e.customer.email,callback:function(t){e.$set(e.customer,"email",t)},expression:"customer.email"}})],1),e._v(" "),o("el-form-item",{attrs:{label:"placeholder"}},[o("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.wp_user)+":\n "),o("el-tooltip",{attrs:{placement:"top"}},[o("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.wp_user_customer_tooltip)},slot:"content"}),e._v(" "),o("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),o("el-popover",e._b({ref:"externalIdPop",attrs:{disabled:!e.$root.isLite}},"el-popover",e.$root.popLiteProps,!1),[o("PopLite")],1),e._v(" "),o("el-select",{directives:[{name:"popover",rawName:"v-popover:externalIdPop",arg:"externalIdPop"}],ref:"wpUser",attrs:{filterable:"",clearable:"",placeholder:e.$root.labels.select_wp_user,disabled:e.$root.isLite},on:{change:function(t){return e.clearValidation()}},model:{value:e.customer.externalId,callback:function(t){e.$set(e.customer,"externalId",t)},expression:"customer.externalId"}},[o("div",{staticClass:"am-drop"},[e.$root.settings.general.requiredEmailField||e.customer&&e.customer.email?o("div",{staticClass:"am-drop-create-item",on:{click:e.selectCreateNewWPUser}},[e._v("\n "+e._s(e.$root.labels.create_new)+"\n ")]):e._e(),e._v(" "),e._l(e.formOptions.wpUsers,function(e){return o("el-option",{key:e.value,class:{hidden:0===e.value},attrs:{label:e.label,value:e.value}})})],2)])],1),e._v(" "),o("el-form-item",{attrs:{label:e.$root.labels.phone+":"}},[o("phone-input",{attrs:{savedPhone:e.customer.phone},on:{phoneFormatted:e.phoneFormatted}})],1),e._v(" "),o("el-form-item",{attrs:{label:e.$root.labels.gender+":"}},[o("el-select",{attrs:{placeholder:"",clearable:""},on:{change:function(t){return e.clearValidation()}},model:{value:e.customer.gender,callback:function(t){e.$set(e.customer,"gender",t)},expression:"customer.gender"}},e._l(e.formOptions.genders,function(e){return o("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1)],1),e._v(" "),o("el-form-item",{attrs:{label:e.$root.labels.date_of_birth+":"}},[o("v-date-picker",{attrs:{mode:"single","popover-visibility":"focus","popover-direction":"top","tint-color":"#1A84EE","show-day-popover":!1,"input-props":{class:"el-input__inner"},"is-expanded":!1,"input-class":"el-input__inner",placeholder:e.$root.labels.select_date_of_birth,"available-dates":{end:this.$moment().toDate().setDate(this.$moment().toDate().getDate()-1)},formats:e.vCalendarFormats},on:{input:function(t){return e.clearValidation()}},model:{value:e.customer.birthday,callback:function(t){e.$set(e.customer,"birthday",t)},expression:"customer.birthday"}})],1),e._v(" "),o("div",{staticClass:"am-divider"}),e._v(" "),o("el-form-item",{attrs:{label:e.$root.labels.note_internal+":"}},[o("el-input",{attrs:{type:"textarea",autosize:{minRows:4,maxRows:6},placeholder:""},on:{input:function(t){return e.clearValidation()}},model:{value:e.customer.note,callback:function(t){e.$set(e.customer,"note",t)},expression:"customer.note"}})],1)],1)],1),e._v(" "),e.dialogLoading?e._e():o("dialog-actions",{attrs:{formName:"customer",urlName:"users/customers",isNew:0===e.customer.id,entity:e.customer,getParsedEntity:e.getParsedEntity,hasIcons:!0,status:{on:"visible",off:"hidden"},buttonText:{confirm:{status:{yes:"visible"===e.customer.status?e.$root.labels.visibility_hide:e.$root.labels.visibility_show,no:e.$root.labels.no}}},action:{haveAdd:!0,haveEdit:!0,haveStatus:!1,haveRemove:!0===e.$root.settings.capabilities.canDelete,haveRemoveEffect:!0,haveDuplicate:!1},message:{success:{save:e.$root.labels.customer_saved,remove:e.$root.labels.customer_deleted,show:"",hide:""},confirm:{remove:e.$root.labels.confirm_delete_customer,show:"",hide:"",duplicate:""}}},on:{errorCallback:e.errorCallback}})],1)},staticRenderFns:[]}},737:function(e,t,o){var i=o(325)(o(738),o(739),!1,null,null,null);e.exports=i.exports},738:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(675),n=o(674);t.default={mixins:[i.a,n.a],props:{data:null,action:null},data:function(){return{delimiter:",",delimiters:[{label:this.$root.labels.csv_delimiter_comma,value:","},{label:this.$root.labels.csv_delimiter_semicolon,value:";"}]}},updated:function(){},mounted:function(){},methods:{changeFields:function(){},closeDialog:function(){this.$emit("closeDialogExport")},getAction:function(){}},components:{}}},739:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[o("div",{staticClass:"am-dialog-scrollable"},[o("div",{staticClass:"am-dialog-header"},[o("el-row",[o("el-col",{attrs:{span:14}},[o("h2",[e._v(e._s(e.$root.labels.export))])]),e._v(" "),o("el-col",{staticClass:"align-right",attrs:{span:10}},[o("el-button",{staticClass:"am-dialog-close",attrs:{size:"small",icon:"el-icon-close"},on:{click:e.closeDialog}})],1)],1)],1),e._v(" "),o("BlockLite"),e._v(" "),o("el-form",{class:{"am-lite-container-disabled":e.$root.isLite},attrs:{"label-position":"top"}},[o("el-form-item",{attrs:{label:e.$root.labels.csv_delimiter+":"}},[o("el-select",{attrs:{placeholder:e.$root.labels.csv_delimiter},on:{change:e.changeFields},model:{value:e.delimiter,callback:function(t){e.delimiter=t},expression:"delimiter"}},e._l(e.delimiters,function(e){return o("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1)],1),e._v(" "),e._l(e.data.fields,function(t){return[o("el-checkbox",{attrs:{checked:"",label:t.label,border:""},on:{change:e.changeFields},model:{value:t.checked,callback:function(o){e.$set(t,"checked",o)},expression:"field.checked"}})]})],2)],1),e._v(" "),o("div",{staticClass:"am-dialog-footer",class:{"am-lite-container-disabled":e.$root.isLite}},[o("div",{staticClass:"am-dialog-footer-actions"},[o("el-row",[o("el-col",{staticClass:"align-right",attrs:{sm:24}},[o("el-button",{attrs:{type:""},on:{click:e.closeDialog}},[e._v("\n "+e._s(e.$root.labels.cancel)+"\n ")]),e._v(" "),o("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary","native-type":"submit"},on:{click:e.closeDialog}},[e._v("\n "+e._s(e.$root.labels.export)+"\n ")])],1)],1)],1)])])},staticRenderFns:[]}},740:function(e,t,o){var i=o(325)(o(741),o(742),!1,null,null,null);e.exports=i.exports},741:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(679),n=o.n(i),a=o(721),s=(o.n(a),o(674)),r=o(675),l=o(676),c=o(678);t.default={mixins:[r.a,s.a,l.a,c.a],props:{modalData:null,bookingFetched:!1},data:function(){return{booking:{},dialogLoading:!0,finance:{bookablePriceTotal:0,extrasPriceTotal:0,discountTotal:0,subTotal:0,due:0},form:new n.a,payment:{},paymentStatuses:[{value:"pending",label:this.$root.labels.pending},{value:"paid",label:this.$root.labels.paid}],showDeleteConfirmation:!1,showUpdatePaymentAmount:!1}},created:function(){this.bookingFetched&&(this.setFinance(),this.dialogLoading=!1)},updated:function(){this.$nextTick(function(){var e=this;setTimeout(function(){e.inlineSVG()},5)})},methods:{instantiateDialog:function(){null!==this.modalData.bookings&&(this.setFinance(),this.dialogLoading=!1)},setFinance:function(){var e=this;e.modalData.bookings.forEach(function(t){t.payments.forEach(function(o){o.id===e.modalData.paymentId&&(e.payment=o,e.booking=t,e.finance.extrasPriceTotal=0,t.extras.forEach(function(o){e.finance.extrasPriceTotal+=o.price*o.quantity*t.persons}),e.finance.bookablePriceTotal=t.price*t.persons,e.finance.subTotal=e.finance.bookablePriceTotal+e.finance.extrasPriceTotal,e.finance.discountTotal=e.finance.subTotal/100*(t.coupon?t.coupon.discount:0)+(t.coupon?t.coupon.deduction:0),e.finance.total=e.finance.subTotal-e.finance.discountTotal,e.finance.total=e.finance.total>=0?e.finance.total:0,e.finance.due=e.finance.total-e.payment.amount>=0?e.finance.total-e.payment.amount:0)})})},closeDialog:function(){this.$emit("closeDialogPayment")},getPaymentStatus:function(e){var t="";return this.paymentStatuses.forEach(function(o){o.value===e&&(t=o.label)}),t},deletePayment:function(){var e=this;this.dialogLoading=!0,this.$http.post(this.$root.getAjaxUrl+"/payments/delete/"+this.payment.id).then(function(t){e.dialogLoading=!1,t.data&&(e.$emit("updatePaymentCallback",e.payment.id),e.showDeleteConfirmation=!e.showDeleteConfirmation,e.notify(e.$root.labels.success,e.$root.labels.payment_deleted,"success"))}).catch(function(t){e.dialogLoading=!1,e.errorMessage=t.message})},updatePayment:function(){var e=this;this.dialogLoading=!0,this.form.post(this.$root.getAjaxUrl+"/payments/"+this.payment.id,this.payment).then(function(){e.showUpdatePaymentAmount=!e.showUpdatePaymentAmount,e.setFinance(),e.notify(e.$root.labels.success,e.$root.labels.payment_saved,"success"),e.$emit("updatePaymentCallback"),e.dialogLoading=!1}).catch(function(t){e.dialogLoading=!1,e.errorMessage=t.message})},getPaymentGatewayNiceName:function(){return"onSite"===this.payment.gateway?this.$root.labels.on_site:"wc"===this.payment.gateway?this.payment.gatewayTitle:this.payment.gateway?this.payment.gateway.charAt(0).toUpperCase()+this.payment.gateway.slice(1):void 0}},watch:{bookingFetched:function(){!0===this.bookingFetched&&this.instantiateDialog()}},components:{Money:a.Money}}},742:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[o("div",{directives:[{name:"show",rawName:"v-show",value:e.dialogLoading,expression:"dialogLoading"}],staticClass:"am-dialog-loader"},[o("div",{staticClass:"am-dialog-loader-content"},[o("img",{attrs:{src:e.$root.getUrl+"public/img/spinner.svg"}}),e._v(" "),o("p",[e._v(e._s(e.$root.labels.loader_message))])])]),e._v(" "),e.dialogLoading?e._e():o("div",{staticClass:"am-dialog-scrollable"},[o("div",{staticClass:"am-dialog-header"},[o("el-row",[o("el-col",{attrs:{span:18}},[o("h2",[e._v(e._s(e.$root.labels.payment_details))])]),e._v(" "),o("el-col",{staticClass:"align-right",attrs:{span:6}},[o("el-button",{staticClass:"am-dialog-close",attrs:{size:"small",icon:"el-icon-close"},on:{click:e.closeDialog}})],1)],1)],1),e._v(" "),o("div",{staticClass:"am-payment-details"},[o("el-row",{staticClass:"am-payment-details-row"},[o("h4",[e._v(e._s(e.$root.labels.customer))]),e._v(" "),o("el-col",{attrs:{span:24}},[o("h3",[e._v(e._s(e.modalData.customer?e.modalData.customer.firstName+" "+e.modalData.customer.lastName:""))]),e._v(" "),o("p",[e._v(e._s(e.modalData.customer?e.modalData.customer.email:""))])])],1),e._v(" "),o("el-row",{staticClass:"am-payment-details-row"},[o("h4",[e._v(e._s(e.$root.labels.payment))]),e._v(" "),o("el-col",{attrs:{span:12}},[o("p",[e._v(e._s(e.$root.labels.date))]),e._v(" "),o("p",[e._v(e._s(e.$root.labels.payment_method))]),e._v(" "),o("p",[e._v(e._s(e.$root.labels.status))])]),e._v(" "),o("el-col",{attrs:{span:12}},[o("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFrontedFormattedDate(e.payment.dateTime)))]),e._v(" "),o("p",{staticClass:"am-semi-strong"},[o("img",{staticClass:"svg",attrs:{width:"14px",src:e.$root.getUrl+"public/img/payments/"+e.payment.gateway+".svg"}}),e._v("\n "+e._s(e.getPaymentGatewayNiceName())+"\n ")]),e._v(" "),o("p",{staticClass:"am-semi-strong"},[o("i",{class:{"el-icon-circle-check":"paid"===e.payment.status,"el-icon-refresh":"paid"!==e.payment.status}}),e._v(" "),o("span",[e._v(e._s(e.getPaymentStatus(e.payment.status)))])])])],1),e._v(" "),o("el-row",{staticClass:"am-payment-details-row"},[o("h4",[e._v(e._s(e.$root.labels[e.modalData.bookableType+"_info"]))]),e._v(" "),o("el-col",{attrs:{span:12}},[o("p",[e._v(e._s(e.$root.labels[e.modalData.bookableType]))]),e._v(" "),o("p",[e._v(e._s(e.$root.labels.date))]),e._v(" "),e.modalData.providers.length&&"appointment"===e.modalData.bookableType?o("p",[e._v(e._s(e.$root.labels.employee))]):e._e()]),e._v(" "),o("el-col",{attrs:{span:12}},[o("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.modalData.bookableName))]),e._v(" "),o("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFrontedFormattedDateTime(e.modalData.bookingStart)))]),e._v(" "),e.modalData.providers.length&&"appointment"===e.modalData.bookableType?o("p",{staticClass:"am-semi-strong"},[o("img",{staticClass:"am-employee-photo",attrs:{src:e.pictureLoad(e.modalData.providers[0],!0)},on:{error:function(t){return e.imageLoadError(e.modalData.providers[0].id,!0)}}}),e._v("\n "+e._s(e.modalData.providers.length?e.modalData.providers[0].fullName:"")+"\n ")]):e._e()])],1),e._v(" "),o("el-row",{staticClass:"am-payment-details-row am-payment-summary"},[o("el-col",{attrs:{span:12}},[o("p",[e._v(e._s(e.$root.labels[("appointment"===e.modalData.bookableType?"service":"event")+"_price"]))]),e._v(" "),o("p",[e._v(e._s(e.$root.labels.extras))]),e._v(" "),o("p",[e._v(e._s(e.$root.labels.subtotal))]),e._v(" "),o("p",[e._v(e._s(e.$root.labels.discount_amount))]),e._v(" "),o("p",[e._v(e._s(e.$root.labels.paid))]),e._v(" "),o("p",[e._v(e._s(e.$root.labels.due))]),e._v(" "),o("p",{staticClass:"am-payment-total"},[e._v(e._s(e.$root.labels.total))])]),e._v(" "),o("el-col",{attrs:{span:12}},[o("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFormattedPrice(e.finance.bookablePriceTotal)))]),e._v(" "),o("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFormattedPrice(e.finance.extrasPriceTotal)))]),e._v(" "),o("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFormattedPrice(e.finance.subTotal)))]),e._v(" "),o("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFormattedPrice(e.finance.discountTotal)))]),e._v(" "),o("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFormattedPrice(e.payment.amount)))]),e._v(" "),o("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFormattedPrice(e.finance.due)))]),e._v(" "),o("p",{staticClass:"am-semi-strong am-payment-total"},[e._v(e._s(e.getFormattedPrice(e.finance.total)))])])],1)],1)]),e._v(" "),!0!==e.$root.settings.capabilities.canWriteOthers||e.dialogLoading?e._e():o("div",{staticClass:"am-dialog-footer"},[o("div",{staticClass:"am-dialog-footer-actions"},[o("transition",{attrs:{name:"slide-vertical"}},[o("div",{directives:[{name:"show",rawName:"v-show",value:e.showDeleteConfirmation,expression:"showDeleteConfirmation"}],staticClass:"am-dialog-confirmation"},[o("h3",[e._v(e._s(e.$root.labels.confirm_delete_payment))]),e._v(" "),o("div",{staticClass:"align-left"},[o("el-button",{attrs:{size:"small"},on:{click:function(t){e.showDeleteConfirmation=!e.showDeleteConfirmation,e.showDeleteConfirmation=!1}}},[e._v("\n "+e._s(e.$root.labels.cancel)+"\n ")]),e._v(" "),o("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.deletePayment()}}},[e._v("\n "+e._s(e.$root.labels.delete)+"\n ")])],1)])]),e._v(" "),o("transition",{attrs:{name:"slide-vertical"}},[o("div",{directives:[{name:"show",rawName:"v-show",value:e.showUpdatePaymentAmount,expression:"showUpdatePaymentAmount"}],staticClass:"am-dialog-confirmation"},[o("el-form",{attrs:{"label-position":"top"}},[o("h3",[e._v(e._s(e.$root.labels.enter_new_payment_amount))]),e._v(" "),o("el-row",{staticClass:"am-no-padding",attrs:{gutter:24}},[o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:e.$root.labels.payment+":"}},[o("money",e._b({staticClass:"el-input__inner",model:{value:e.payment.amount,callback:function(t){e.$set(e.payment,"amount",t)},expression:"payment.amount"}},"money",e.moneyComponentData,!1))],1)],1),e._v(" "),o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:e.$root.labels.status+":"}},[o("el-select",{model:{value:e.payment.status,callback:function(t){e.$set(e.payment,"status",t)},expression:"payment.status"}},e._l(e.paymentStatuses,function(t){return o("el-option",{key:t.value,staticClass:"am-appointment-status-option",attrs:{label:t.label,value:t.value}},[o("span",{staticClass:"am-appointment-status-symbol",class:t.value}),e._v(" "),o("span",[e._v(e._s(t.label))])])}),1)],1)],1)],1),e._v(" "),o("div",{staticClass:"align-left"},[o("el-button",{attrs:{size:"small"},on:{click:function(t){e.showUpdatePaymentAmount=!e.showUpdatePaymentAmount}}},[e._v("\n "+e._s(e.$root.labels.close)+"\n ")])],1)],1)],1)]),e._v(" "),o("el-row",[o("el-col",{staticClass:"align-left",attrs:{sm:6}},[!0===e.$root.settings.capabilities.canDelete?o("el-button",{staticClass:"am-button-icon",on:{click:function(t){e.showDeleteConfirmation=!e.showDeleteConfirmation,e.showUpdatePaymentAmount=!1}}},[o("img",{staticClass:"svg",attrs:{alt:e.$root.labels.delete,src:e.$root.getUrl+"public/img/delete.svg"}})]):e._e(),e._v(" "),o("el-button",{staticClass:"am-button-icon",on:{click:function(t){e.showUpdatePaymentAmount=!e.showUpdatePaymentAmount,e.showDeleteConfirmation=!1}}},[o("img",{staticClass:"svg",attrs:{alt:e.$root.labels.edit,src:e.$root.getUrl+"public/img/edit.svg"}})])],1),e._v(" "),o("el-col",{staticClass:"align-right",attrs:{sm:18}},[o("el-button",{attrs:{type:""},on:{click:e.closeDialog}},[e._v("\n "+e._s(e.$root.labels.cancel)+"\n ")]),e._v(" "),o("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:function(t){return e.updatePayment()}}},[e._v("\n "+e._s(e.$root.labels.save)+"\n ")])],1)],1)],1)])])},staticRenderFns:[]}},744:function(e,t,o){"use strict";t.a={data:function(){return{appointment:null,bookings:[],duplicateEvent:!1,exportAction:"",exportParams:{fields:[{label:this.$root.labels.customers,value:"customers",checked:!0},{label:this.$root.labels.employee,value:"employee",checked:!0},{label:this.$root.labels.service,value:"service",checked:!0},{label:this.$root.labels.start_time,value:"startTime",checked:!0},{label:this.$root.labels.end_time,value:"endTime",checked:!0},{label:this.$root.labels.note,value:"note",checked:!0},{label:this.$root.labels.status,value:"status",checked:!0}]},savedAppointment:null,statuses:[{value:"approved",label:this.$root.labels.approved},{value:"pending",label:this.$root.labels.pending},{value:"canceled",label:this.$root.labels.canceled},{value:"rejected",label:this.$root.labels.rejected}],options:{fetched:!1,entities:{categories:[],customers:[],customFields:[],employees:[],locations:[],services:[]},entitiesChoices:{}}}},methods:{getInitAppointmentObject:function(){return{id:0,bookings:[],categoryId:"",serviceId:"",providerId:"",locationId:"",selectedDate:null,selectedPeriod:"",status:this.$root.settings.general.defaultAppointmentStatus,internalNotes:"",notifyParticipants:this.$root.settings.notifications.notifyCustomers,dateTimeSlots:[],calendarTimeSlots:[],extrasTotalPrice:0,serviceTotalPrice:0,discountTotalPrice:0,providerServiceMinCapacity:0,providerServiceMaxCapacity:0,extrasCount:0,extrasSelectedCount:0}},showDialogNewAppointment:function(){this.resetEntitiesFilter(),this.setBookings(0),this.savedAppointment=null,this.appointment=this.getInitAppointmentObject(),1===this.options.entities.employees.length&&this.$root.isLite&&(this.appointment.providerId=this.options.entities.employees[0].id),this.dialogAppointment=!0},showDialogEditAppointment:function(e){this.dialogAppointment=!0,this.resetEntitiesFilter(),this.getAppointment(e)},closeDialogAppointment:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.duplicateEvent=e,this.dialogAppointment=!1},setBookings:function(e){var t=[],o=this;this.options.entities.customers.forEach(function(i){if("visible"===i.status){var n=0,a=[],s=[],r=null,l=0,c=1,m=JSON.stringify({firstName:i.firstName,lastName:i.lastName,email:i.email,phone:i.phone});o.appointment&&e&&o.appointment.bookings.forEach(function(e){e.customerId===i.id&&(n=e.id,a=e.extras,s=e.payments,l=e.price,c=e.persons,r=e.coupon,m=e.info)}),t.push({id:n,customer:i,status:o.$root.settings.general.defaultAppointmentStatus,persons:c,total:0,extras:a,payments:s,price:l,coupon:r,added:!1,info:m,customFields:{}})}}),this.bookings=t},getAppointment:function(e){var t=this;this.$http.get(this.$root.getAjaxUrl+"/appointments/"+e).then(function(o){var i=t;t.savedAppointment=JSON.parse(JSON.stringify(o.data.data.appointment)),t.appointment=Object.assign(t.getInitAppointmentObject(),o.data.data.appointment),t.appointment.notifyParticipants=!!t.appointment.notifyParticipants,t.appointment.bookings.forEach(function(e){var t=null;i.options.entities.services.forEach(function(e){e.id===i.appointment.serviceId&&(t=JSON.parse(JSON.stringify(e.extras))).forEach(function(e){e.quantity=1,e.selected=!1})}),e.customer=null,e.added=!1,i.options.entities.customers.forEach(function(t){if(t.id===e.customerId){e.customer=t;var o=i.getCustomerInfo(e);0!==e.id&&o&&(e.info=JSON.stringify({firstName:o.firstName,lastName:o.lastName,email:o.email,phone:o.phone})),e.added=!0}}),e.extras.forEach(function(e){t.forEach(function(t){t.extraId===e.extraId&&(t.id=e.id,t.selected=!0,t.quantity=e.quantity?e.quantity:1,t.price=e.price)})}),t.forEach(function(e){e.selected||(e.id=0)}),e.extras=t,e.customFields=JSON.parse(e.customFields)}),t.setBookings(e)}).catch(function(e){console.log(e.message)})},sortBookings:function(e){e.sort(function(e,t){return(e.customer.firstName+" "+e.customer.lastName).localeCompare(t.customer.firstName+" "+t.customer.lastName)})},duplicateAppointmentCallback:function(e){var t=this;this.appointment=e,this.appointment.id=0,this.appointment.selectedDate=null,this.appointment.selectedPeriod="",this.appointment.dateTimeSlots=[],this.appointment.calendarTimeSlots=[],setTimeout(function(){t.dialogAppointment=!0},300)},getCustomersFromGroup:function(e){var t="",o=this;return e.bookings.forEach(function(e){if(o.options.entities.customers.length){var i=o.getCustomerById(e.customerId);t+=''+i.firstName+" "+i.lastName+"
"}}),t},saveCustomerCallback:function(e){this.options.entities.customers.push(e.user);var t={id:0,customer:e.user,status:this.$root.settings.general.defaultAppointmentStatus,persons:1,total:0,extras:this.appointment.serviceId?this.getServiceById(this.appointment.serviceId).extras:[],payments:[],coupon:null,info:JSON.stringify({firstName:e.user.firstName,lastName:e.user.lastName,email:e.user.email,phone:e.user.phone}),customFields:[],added:!0};this.bookings.push(t),this.sortBookings(this.bookings),null!==this.appointment&&(this.appointment.bookings.push(t),this.sortBookings(this.appointment.bookings)),this.setBookingCustomFields()},updateAppointmentStatus:function(e,t,o){var i=this;this.updateStatusDisabled=!0,this.form.post(this.$root.getAjaxUrl+"/appointments/status/"+e.id,{status:t}).then(function(n){o&&i.setTotalStatusCounts(e,t,n.data.status),i.notify(e.status===n.data.status?i.$root.labels.success:i.$root.labels.error,n.data.message,e.status===n.data.status?"success":"error"),e.status=n.data.status,i.updateStatusDisabled=!1}).catch(function(e){i.errorMessage=e.message,i.updateStatusDisabled=!1})},getAppointmentPaymentMethods:function(e){var t=[];return e.forEach(function(e){var o=e.payments.length?e.payments[0].gateway:null;-1===t.indexOf(o)&&t.push(o)}),t},updatePaymentCallback:function(e){this.appointment.bookings.forEach(function(t){t.payments.forEach(function(o,i){o.id===e&&t.payments.splice(i,1)})}),this.dialogPayment=!1}},watch:{dialogAppointment:function(){!1===this.dialogAppointment&&!1===this.duplicateEvent&&(this.appointment=null)}}}},745:function(e,t,o){var i=o(325)(o(746),o(754),!1,null,null,null);e.exports=i.exports},746:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(747),n=o(689),a=o.n(n),s=o(675),r=o(674),l=o(676),c=o(693),m=o(732),p=o(678),u=o(748),d=o.n(u),h=o(751),f=o.n(h),v=o(720),g=o(1),b=o.n(g);t.default={mixins:[c.a,s.a,r.a,l.a,p.a,v.a,m.a],props:{appointment:null,bookings:null,options:null,entitiesChoices:null},data:function(){var e=this,t=function(t,o,i){o||(e.newAppointmentTabs="schedule"),i()};return{availableDates:[],categorySpinnerActive:!1,dialogLoading:!0,disabledWeekdays:null,employeeSpinnerActive:!1,executeUpdate:!0,filter:null,locationSpinnerActive:!1,mounted:!1,newAppointmentTabs:"schedule",serviceSpinnerActive:!1,statusMessage:"",loadingTimeSlots:!1,payment:{amount:0,gateway:"onSite"},rulesInit:{bookings:[{required:!0,message:this.$root.labels.select_customer_warning,trigger:"submit",type:"array"},{validator:function(t,o,i){e.appointment.serviceId&&e.appointment.providerId&&e.getApprovedPersonsCount()>e.appointment.providerServiceMaxCapacity?(e.newAppointmentTabs="schedule",i(new Error(e.$root.labels.select_max_customer_count_warning+" "+e.appointment.providerServiceMaxCapacity))):i()},trigger:"submit"}],serviceId:[{required:!0,message:this.$root.labels.select_service_warning,trigger:"submit",type:"number"}],providerId:[{required:!0,message:this.$root.labels.select_employee_warning,trigger:"submit",type:"number"}],selectedDate:[{validator:t,trigger:"submit"},{required:!0,message:this.$root.labels.select_date_warning,trigger:"submit",type:"date"}],"selectedPeriod.time":[{validator:t,trigger:"submit"},{required:!0,message:this.$root.labels.select_time_warning,trigger:"submit"}]},rules:{},statuses:[{id:1,value:"approved",label:this.$root.labels.approved},{id:0,value:"pending",label:this.$root.labels.pending},{id:2,value:"canceled",label:this.$root.labels.canceled},{id:3,value:"rejected",label:this.$root.labels.rejected}]}},mounted:function(){this.rules=this.rulesInit,this.instantiateDialog()},updated:function(){this.instantiateDialog()},methods:{updateByCustomer:function(){var e=this;this.dialogLoading=!0;var t=this.getStringFromDate(this.appointment.selectedDate)+" "+this.appointment.selectedPeriod.time;this.$http.post(this.$root.getAjaxUrl+"/appointments/time/"+this.appointment.id,{bookingStart:t}).then(function(t){e.$emit("saveCallback",t),setTimeout(function(){e.dialogLoading=!1,e.$emit("closeDialog")},300),e.notify(e.$root.labels.success,e.$root.labels.appointment_rescheduled,"success")}).catch(function(t){if(t.response){e.dialogLoading=!1;var o=e;setTimeout(function(){"timeSlotUnavailable"in t.response.data.data&&!0===t.response.data.data.timeSlotUnavailable&&o.notify(o.$root.labels.error,o.$root.labels.time_slot_unavailable,"error")},200)}})},editPayment:function(e){this.$emit("editPayment",e)},instantiateDialog:function(){(null!==this.appointment||null!==this.appointment&&0===this.appointment.id)&&!0===this.executeUpdate&&(this.filter=new i.a(this.entitiesChoices,this.options.entities),0!==this.appointment.id?(this.setCategory(),this.setLocation(),this.handleCustomerChange(),this.filter=new i.a(this.entitiesChoices,this.options.entities),this.filter.process("employees",this.appointment.providerId,["locations","categories","services"]),this.filter.process("locations",this.appointment.locationId,["categories","employees","services"]),this.filter.process("services",this.appointment.serviceId,["locations","employees","categories"]),this.filter.process("categories",this.appointment.categoryId,["locations","employees","services"]),this.getTimeSlots(function(e){var t=this,o=t.appointment.bookingStart.split(" "),i=o[0],n=o[1].slice(0,-3);if(i in e){if(!(n in e[i])){var a=Object.keys(e[i]);a.push(n);var s={};a.sort().forEach(function(o){s[o]=o===n?[t.appointment.providerId]:e[i][o]}),e[i]=s}}else e[i]={},e[i][n]=[this.appointment.providerId];this.appointment.selectedDate=b()(i).toDate(),this.appointment.selectedPeriod={time:n,employee:t.appointment.providerId},this.updateCalendar(e)}.bind(this))):0===this.appointment.id&&""!==this.appointment.serviceId&&(this.setCategory(),this.setLocation(),this.getTimeSlots(this.updateCalendar)),this.mounted=!0,this.executeUpdate=!1,null!==this.appointment&&0===this.appointment.id&&(this.dialogLoading=!1))},setCategory:function(){var e=this;this.appointment.categoryId=this.options.entities.services.filter(function(t){return t.id===e.appointment.serviceId})[0].categoryId},setLocation:function(){var e=this;this.appointment.locationId=this.options.entities.employees.filter(function(t){return e.appointment.providerId===t.id})[0].locationId},closeDialog:function(){this.$emit("closeDialog")},getParsedEntity:function(){var e=[];return this.appointment.bookings.forEach(function(t){var o=[];t.extras.forEach(function(e){e.selected&&o.push({id:e.id,customerBookingId:t.id,extraId:e.extraId,quantity:e.quantity,price:e.price})}),e.push({id:t.id,customerId:t.customer.id,status:t.status,persons:t.persons,extras:o,customFields:JSON.stringify(t.customFields),coupon:t.coupon})}),{serviceId:this.appointment.serviceId,providerId:this.appointment.providerId,bookings:e,bookingStart:this.getStringFromDate(this.appointment.selectedDate)+" "+this.appointment.selectedPeriod.time,notifyParticipants:this.appointment.notifyParticipants?1:0,internalNotes:this.appointment.internalNotes,id:this.appointment.id,payment:this.payment}},showDialogNewCustomer:function(){this.$emit("showDialogNewCustomer")},handleCustomerChange:function(){this.setSelectedExtrasCount(),this.setServiceExtrasForCustomers(!1),this.setPrice(),this.setServiceCapacityForProvider(),this.setBookingCustomFields(),this.addCustomFieldsValidationRules(),this.$emit("sortBookings",this.appointment.bookings)},handleCustomerRemove:function(e){this.clearValidation(),this.appointment.bookings.splice(e,1),this.setPrice()},setServiceExtrasForCustomers:function(e){var t=this,o=null;t.appointment.serviceId&&(t.options.entities.services.forEach(function(e){e.id===t.appointment.serviceId&&(o=e.extras,t.appointment.extrasCount=o.length)}),t.appointment.bookings.forEach(function(t){(e||!t.id&&!t.added)&&(t.extras=JSON.parse(JSON.stringify(o)),t.extras.forEach(function(e){e.selected=!1,e.id=0,e.customerBookingId=0})),t.added=!0}),this.setSelectedExtrasCount())},handleSelected:function(){for(var e=this,t=document.querySelectorAll(".am-appointment-status-option.selected"),o=0;o0&&this.getTimeSlots(this.updateCalendar)},getStringFromDate:function(e){return e.getFullYear()+"-"+"0".concat(e.getMonth()+1).slice(-2)+"-"+"0".concat(e.getDate()).slice(-2)},updateCalendar:function(e){var t=this;this.appointment.calendarTimeSlots=e;var o=[];Object.keys(this.appointment.calendarTimeSlots).forEach(function(e){o.push(t.getDate(e))}),this.availableDates=o,this.disabledWeekdays={weekdays:[]},this.disabledWeekdays=0===this.availableDates.length?{weekdays:[1,2,3,4,5,6,7]}:null,this.dateChange()},getTimeSlots:function(e){var t=this,o=this.appointment,i=[];o.serviceId&&(this.loadingTimeSlots=!0,this.appointment.bookings.forEach(function(e){e.extras.forEach(function(e){e.selected&&i.push({id:e.extraId,quantity:e.quantity})})}),this.$http.get(this.$root.getAjaxUrl+"/slots",{params:{serviceId:o.serviceId,providerIds:o.providerId?[o.providerId]:[],extras:JSON.stringify(i),excludeAppointmentId:o.id,group:0}}).then(function(o){e(o.data.data.slots),t.dialogLoading=!1,t.loadingTimeSlots=!1}).catch(function(e){console.log(e.message),t.loadingTimeSlots=!1}))},dateChange:function(){this.clearValidation();var e=this,t=[],o=null,i=!1;this.appointment.selectedDate&&this.appointment.calendarTimeSlots&&(o=this.appointment.calendarTimeSlots[this.getStringFromDate(this.appointment.selectedDate)])?(Object.keys(o).forEach(function(n){e.appointment.selectedPeriod&&e.appointment.selectedPeriod.hasOwnProperty("time")&&e.appointment.selectedPeriod.time===n&&(i=!0),t.push({time:n,employees:o[n]})}),i||(this.appointment.selectedPeriod="")):(this.appointment.selectedDate=null,this.appointment.selectedPeriod=""),this.appointment.dateTimeSlots=t},setSelectedExtrasCount:function(){var e=0;this.appointment.bookings.forEach(function(t){t.extras.forEach(function(t){t.selected&&e++})}),this.appointment.extrasSelectedCount=e},clearValidation:function(){void 0!==this.$refs.appointment&&this.$refs.appointment.clearValidate()},errorCallback:function(e){var t=this;setTimeout(function(){"timeSlotUnavailable"in e.data&&!0===e.data.timeSlotUnavailable&&(t.notify(t.$root.labels.error,t.$root.labels.time_slot_unavailable,"error"),t.getTimeSlots(t.updateCalendar))},200)},addCustomFieldsValidationRules:function(){if(this.appointment.serviceId&&this.appointment.bookings.length>0){this.rules=this.rulesInit;for(var e=0;e0&&this.appointment.bookings.length>0&&this.appointment.serviceId&&e.includes(this.appointment.serviceId)},validationBookingsFailCallback:function(){this.newAppointmentTabs="customFields"}},computed:{locationsFiltered:function(){var e=this;return this.options.entities.locations.filter(function(t){return"visible"===t.status||e.appointment.id&&e.appointment.providerId&&"hidden"===t.status&&e.getProviderById(e.appointment.providerId).locationId===t.id})},employeesFiltered:function(){var e=this,t=this.options.entities.employees;return t=t.filter(function(t){return t.serviceList.filter(function(e){return"visible"===e.status}).length>0||t.id===e.appointment.providerId}),this.locationsFiltered.length>0&&(t=t.filter(function(t){return null!==t.locationId&&"visible"===e.getLocationById(t.locationId).status||t.id===e.appointment.providerId})),t.filter(function(t){return"visible"===t.status||t.id===e.appointment.providerId})},servicesFiltered:function(){var e=this,t=[];return this.options.entities.employees.filter(function(e){return"visible"===e.status}).map(function(e){return e.serviceList}).map(function(e){return e.map(function(e){return e.id})}).forEach(function(e){t=t.concat(e)}),this.options.entities.services.filter(function(o){return"visible"===o.status&&-1!==t.indexOf(o.id)||e.appointment.serviceId===o.id})},categoriesFiltered:function(){var e=this;return this.options.entities.categories.filter(function(t){return t.serviceList.filter(function(t){return"visible"===t.status&&-1!==e.servicesFiltered.map(function(e){return e.id}).indexOf(t.id)||e.appointment.serviceId===t.id}).length>0})},selectedCustomersMessage:function(){return""!==this.statusMessage?this.$root.labels.selected_customers+" "+this.statusMessage+":":this.$root.labels.selected_customers+":"},customersMaxLimit:function(){return this.appointment.serviceId&&this.appointment.providerId?this.getProviderService().maxCapacity:this.appointment.serviceId&&this.appointment.providerId?this.getServiceById(this.appointment.serviceId).maxCapacity:0}},watch:{},components:{DialogAppointmentPayment:d.a,DialogAppointmentCustomFields:f.a,DialogActions:a.a}}},747:function(e,t,o){"use strict";var i=function(){function e(e,t){for(var o=0;o-1}):n.concat(e)}),n}},{key:"filterOptions",value:function(e,t,o){e.forEach(function(e){e.disabled=-1===t.indexOf(e.id)&&""!==o})}}]),e}();t.a=n},748:function(e,t,o){var i=o(325)(o(749),o(750),!1,null,null,null);e.exports=i.exports},749:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(674),n=o(678),a=o(723);t.default={mixins:[i.a,n.a,a.a],props:{appointment:{default:function(){},type:Object}},data:function(){return{paymentStatuses:[{value:"paid",label:this.$root.labels.paid},{value:"pending",label:this.$root.labels.pending}]}},methods:{showDialogEditPayment:function(e){this.$emit("editPayment",{paymentId:e,appointment:this.appointment})},getPaymentStatus:function(e){var t="";return this.paymentStatuses.forEach(function(o){o.value===e&&(t=o.label)}),t},getBookingSubtotal:function(e){var t=e.serviceTotalPrice+e.extrasTotalPrice-e.discountTotalPrice;return t>=0?t:0}}}},750:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"am-dialog-table"},[e.appointment.bookings.length>0?o("div",e._l(e.appointment.bookings,function(t){return o("div",{staticClass:"am-customer-extras"},e._l(t.payments,function(i){return o("div",[o("el-row",{staticClass:"am-customer-extras-data"},[o("el-col",[o("h3",[e._v(e._s(t.customer.firstName)+" "+e._s(t.customer.lastName))]),e._v(" "),o("span",[e._v(e._s(t.customer.email))])])],1),e._v(" "),o("el-row",{staticClass:"am-customer-extras-payment",attrs:{gutter:10}},[o("el-col",{attrs:{span:12}},[o("span",{staticClass:"am-strong"},[e._v(e._s(e.$root.labels.payment))])]),e._v(" "),o("el-col",{attrs:{span:12}},[o("span",{staticClass:"am-link",on:{click:function(t){return e.showDialogEditPayment(i.id)}}},[e._v("\n "+e._s(e.$root.labels.view_payment_details)+"\n ")])]),e._v(" "),o("el-col",{attrs:{span:12}},[o("span",[e._v(e._s(e.$root.labels.date)+":")])]),e._v(" "),o("el-col",{attrs:{span:12}},[o("span",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFrontedFormattedDate(i.dateTime)))])]),e._v(" "),o("el-col",{attrs:{span:12}},[o("span",[e._v(e._s(e.$root.labels.payment_method)+":")])]),e._v(" "),o("el-col",{attrs:{span:12}},[o("span",{staticClass:"am-semi-strong"},[o("img",{staticClass:"svg",attrs:{width:"14px",src:e.$root.getUrl+"public/img/payments/"+i.gateway+".svg"}}),e._v(" "+e._s(e.getPaymentGatewayNiceName(i))+"\n ")])]),e._v(" "),o("el-col",{attrs:{span:12}},[o("span",[e._v(e._s(e.$root.labels.status)+":")])]),e._v(" "),o("el-col",{attrs:{span:12}},[o("span",{staticClass:"am-semi-strong"},[o("i",{class:{"el-icon-circle-check":"paid"===i.status,"el-icon-refresh":"paid"!==i.status}}),e._v(" "+e._s(e.getPaymentStatus(i.status)))])])],1),e._v(" "),o("el-row",{staticClass:"subtotal",attrs:{gutter:10}},[o("el-col",{staticClass:"align-right",attrs:{span:14}},[e._v("\n "+e._s(e.$root.labels.service_price)+":\n ")]),e._v(" "),o("el-col",{staticClass:"align-right",attrs:{span:10}},[e._v("\n "+e._s(e.getFormattedPrice(t.serviceTotalPrice))+"\n ")]),e._v(" "),o("el-col",{staticClass:"align-right",attrs:{span:14}},[e._v("\n "+e._s(e.$root.labels.extras)+":\n ")]),e._v(" "),o("el-col",{staticClass:"align-right",attrs:{span:10}},[e._v("\n "+e._s(e.getFormattedPrice(t.extrasTotalPrice))+"\n ")]),e._v(" "),o("el-col",{staticClass:"align-right",attrs:{span:14}},[e._v("\n "+e._s(e.$root.labels.discount_amount)+":\n ")]),e._v(" "),o("el-col",{staticClass:"align-right",attrs:{span:10}},[e._v("\n "+e._s(e.getFormattedPrice(t.discountTotalPrice))+"\n ")]),e._v(" "),o("el-col",{staticClass:"align-right",attrs:{span:14}},[o("span",{staticClass:"am-strong"},[e._v(e._s(e.$root.labels.subtotal)+":")])]),e._v(" "),o("el-col",{staticClass:"align-right",attrs:{span:10}},[o("span",{staticClass:"am-strong"},[e._v(e._s(e.getFormattedPrice(e.getBookingSubtotal(t))))])])],1)],1)}),0)}),0):o("div",[o("p",{attrs:{align:"center"}},[e._v(e._s(e.$root.labels.no_selected_customers))])])])},staticRenderFns:[]}},751:function(e,t,o){var i=o(325)(o(752),o(753),!1,null,null,null);e.exports=i.exports},752:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(720);t.default={mixins:[i.a],props:{appointment:{default:function(){},type:Object},customFields:{default:function(){return[]}}},data:function(){return{hasPayments:!1,paymentStatuses:[{value:"paid",label:this.$root.labels.paid},{value:"pending",label:this.$root.labels.pending}]}},methods:{isCustomFieldVisible:function(e){return-1!==e.services.map(function(e){return e.id}).indexOf(this.appointment.serviceId)},clearValidation:function(){this.$emit("clearValidation")}}}},753:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"am-dialog-table"},e._l(e.appointment.bookings,function(t,i){return o("div",{staticClass:"am-customer-extras"},[o("el-row",{staticClass:"am-customer-extras-data"},[o("el-col",[o("h3",[e._v(e._s(t.customer.firstName)+" "+e._s(t.customer.lastName))]),e._v(" "),o("span",[e._v(e._s(t.customer.email))])])],1),e._v(" "),o("div",{staticClass:"am-custom-fields"},e._l(e.customFields,function(t){return e.isCustomFieldVisible(t)&&"content"!==t.type?o("el-form-item",{key:t.id,attrs:{label:t.label+":",prop:!0===t.required&&"content"!==t.type?"bookings."+i+".customFields."+t.id+".value":null}},["text"===t.type?o("el-input",{attrs:{placeholder:""},on:{input:function(t){return e.clearValidation()}},model:{value:e.appointment.bookings[i].customFields[t.id].value,callback:function(o){e.$set(e.appointment.bookings[i].customFields[t.id],"value",o)},expression:"appointment.bookings[key].customFields[customField.id].value"}}):"text-area"===t.type?o("el-input",{staticClass:"am-front-texarea",attrs:{placeholder:"",type:"textarea",rows:3},on:{input:function(t){return e.clearValidation()}},model:{value:e.appointment.bookings[i].customFields[t.id].value,callback:function(o){e.$set(e.appointment.bookings[i].customFields[t.id],"value",o)},expression:"appointment.bookings[key].customFields[customField.id].value"}}):"select"===t.type?o("el-select",{attrs:{placeholder:"",clearable:""},on:{change:function(t){return e.clearValidation()}},model:{value:e.appointment.bookings[i].customFields[t.id].value,callback:function(o){e.$set(e.appointment.bookings[i].customFields[t.id],"value",o)},expression:"appointment.bookings[key].customFields[customField.id].value"}},e._l(e.getCustomFieldOptions(t.options),function(e,t){return o("el-option",{key:t,attrs:{value:e,label:e}})}),1):"checkbox"===t.type?o("el-checkbox-group",{on:{change:function(t){return e.clearValidation()}},model:{value:e.appointment.bookings[i].customFields[t.id].value,callback:function(o){e.$set(e.appointment.bookings[i].customFields[t.id],"value",o)},expression:"appointment.bookings[key].customFields[customField.id].value"}},e._l(e.getCustomFieldOptions(t.options),function(e,t){return o("el-checkbox",{key:t,attrs:{label:e}})}),1):o("el-radio-group",{model:{value:e.appointment.bookings[i].customFields[t.id].value,callback:function(o){e.$set(e.appointment.bookings[i].customFields[t.id],"value",o)},expression:"appointment.bookings[key].customFields[customField.id].value"}},e._l(e.getCustomFieldOptions(t.options),function(t,i){return o("el-radio",{key:i,attrs:{label:t},on:{change:function(t){return e.clearValidation()}}})}),1)],1):e._e()}),1)],1)}),0)},staticRenderFns:[]}},754:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[o("div",{directives:[{name:"show",rawName:"v-show",value:e.dialogLoading,expression:"dialogLoading"}],staticClass:"am-dialog-loader"},[o("div",{staticClass:"am-dialog-loader-content"},[o("img",{attrs:{src:e.$root.getUrl+"public/img/spinner.svg"}}),e._v(" "),o("p",[e._v(e._s(e.$root.labels.loader_message))])])]),e._v(" "),e.appointment&&!e.dialogLoading?o("div",{staticClass:"am-dialog-scrollable",class:{"am-edit":0!==e.appointment.id}},[o("div",{staticClass:"am-dialog-header"},[o("el-row",[o("el-col",{attrs:{span:18}},[0!==e.appointment.id?o("h2",[e._v(e._s(e.$root.labels.edit_appointment))]):o("h2",[e._v(e._s(e.$root.labels.new_appointment))])]),e._v(" "),o("el-col",{staticClass:"align-right",attrs:{span:6}},[o("el-button",{staticClass:"am-dialog-close",attrs:{size:"small",icon:"el-icon-close"},on:{click:e.closeDialog}})],1)],1)],1),e._v(" "),e.mounted?o("el-form",{ref:"appointment",attrs:{model:e.appointment,rules:e.rules,"label-position":"top"}},[o("el-tabs",{model:{value:e.newAppointmentTabs,callback:function(t){e.newAppointmentTabs=t},expression:"newAppointmentTabs"}},[o("el-tab-pane",{attrs:{label:e.$root.labels.schedule,name:"schedule"}},["customer"!==this.$root.settings.role?o("el-form-item",{attrs:{label:e.$root.labels.customers_singular_plural+":",prop:"bookings"}},[o("el-select",{staticClass:"no-tags",attrs:{"value-key":"customer.id",multiple:"","multiple-limit":e.customersMaxLimit,placeholder:e.$root.labels.select_customers,"collapse-tags":"",filterable:""},on:{change:e.handleCustomerChange},model:{value:e.appointment.bookings,callback:function(t){e.$set(e.appointment,"bookings",t)},expression:"appointment.bookings"}},[o("div",{staticClass:"am-drop"},[o("div",{staticClass:"am-drop-create-item",on:{click:e.showDialogNewCustomer}},[e._v("\n "+e._s(e.$root.labels.create_new)+"\n ")]),e._v(" "),e._l(e.bookings,function(t){return o("el-option",{key:t.customer.id,staticClass:"am-has-option-meta",attrs:{label:null!==(e.user=e.getCustomerInfo(t))?e.user.firstName+" "+e.user.lastName:"",value:t}},[o("span",{staticClass:"am-drop-item-name"},[e._v(e._s(t.customer.firstName)+" "+e._s(t.customer.lastName))]),e._v(" "),o("span",{staticClass:"am-drop-item-meta"},[e._v(e._s(t.customer.email))])])})],2)])],1):e._e(),e._v(" "),o("transition",{attrs:{name:"fade"}},[e.appointment.bookings.length>0&&"customer"!==this.$root.settings.role?o("div",{staticClass:"am-selected-dropdown-items"},[o("el-form-item",{attrs:{label:e.selectedCustomersMessage}}),e._v(" "),e._l(e.appointment.bookings,function(t,i){return o("div",{key:i,staticClass:"am-selected-dropdown-item"},[o("el-row",{attrs:{align:"middle",gutter:4,justify:"left"}},[o("el-col",{attrs:{sm:14}},[o("h3",[e._v(e._s(null!==(e.user=e.getCustomerInfo(t))?e.user.firstName+" "+e.user.lastName:""))]),e._v(" "),o("span",[e._v(e._s(t.customer.email))])]),e._v(" "),o("el-col",{staticClass:"am-align-right",attrs:{sm:9}},[o("div",{staticClass:"am-appointment-status small"},[o("span",{staticClass:"am-appointment-status-symbol",class:t.status}),e._v(" "),o("el-select",{on:{change:e.handleBookingChange},model:{value:t.status,callback:function(o){e.$set(t,"status",o)},expression:"booking.status"}},e._l(e.statuses,function(e){return o("el-option",{key:e.value,attrs:{value:e.value}},[o("span",{staticClass:"am-appointment-status-symbol",class:e.value})])}),1)],1),e._v(" "),o("div",{staticClass:"am-appointment-persons small"},[o("img",{staticClass:"svg",attrs:{slot:"prefix",width:"16px",src:e.$root.getUrl+"public/img/group.svg"},slot:"prefix"}),e._v(" "),o("el-select",{staticClass:"small-status",attrs:{"no-data-text":e.$root.labels.choose_a_group_service},on:{change:e.handleBookingChange},model:{value:t.persons,callback:function(o){e.$set(t,"persons",o)},expression:"booking.persons"}},e._l(e.appointment.providerServiceMaxCapacity,function(e){return o("el-option",{key:e,attrs:{value:e}})}),1),e._v(" "),o("el-tooltip",{attrs:{placement:"top"}},[o("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.customers_tooltip)},slot:"content"}),e._v(" "),o("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1)]),e._v(" "),o("i",{staticClass:"el-icon-close remove",on:{click:function(t){return e.handleCustomerRemove(i)}}})],1)],1)}),e._v(" "),e.appointment.bookings.length>1?o("div",{staticClass:"group-status-change"},[o("el-row",{attrs:{gutter:4}},[o("el-col",{attrs:{sm:14}},[o("h3",[e._v(e._s(e.$root.labels.change_group_status))])]),e._v(" "),o("el-col",{attrs:{sm:10}},[o("el-form-item",[o("div",{staticClass:"am-appointment-status"},[o("span",{staticClass:"am-appointment-status-symbol",class:e.appointment.status}),e._v(" "),o("el-select",{on:{change:e.handleGroupStatusChange,"visible-change":e.handleSelected},model:{value:e.appointment.status,callback:function(t){e.$set(e.appointment,"status",t)},expression:"appointment.status"}},e._l(e.statuses,function(t){return o("el-option",{key:t.value,staticClass:"am-appointment-status-option",attrs:{label:t.label,value:t.value}},[o("span",{staticClass:"am-appointment-status-symbol",class:t.value},[e._v(e._s(t.label))])])}),1)],1)])],1)],1)],1):e._e()],2):e._e()]),e._v(" "),o("el-form-item",{class:{active:e.categorySpinnerActive},attrs:{label:e.$root.labels.service_category+":"}},[o("el-select",{attrs:{filterable:"",clearable:"",placeholder:e.$root.labels.select_service_category,disabled:"customer"===e.$root.settings.role},on:{change:e.handleCategoryChange},model:{value:e.appointment.categoryId,callback:function(t){e.$set(e.appointment,"categoryId",t)},expression:"appointment.categoryId"}},e._l(e.categoriesFiltered,function(e){return o("el-option",{key:e.id,attrs:{disabled:e.disabled,label:e.name,value:e.id}})}),1),e._v(" "),o("img",{staticClass:"svg is-spinner",attrs:{src:e.$root.getUrl+"public/img/oval-spinner.svg"}})],1),e._v(" "),o("el-form-item",{class:{active:e.serviceSpinnerActive},attrs:{label:e.$root.labels.service+":",prop:"serviceId"}},[o("el-select",{attrs:{filterable:"",clearable:"",placeholder:e.$root.labels.select_service+":",disabled:"customer"===e.$root.settings.role},on:{change:e.handleServiceChange},model:{value:e.appointment.serviceId,callback:function(t){e.$set(e.appointment,"serviceId",t)},expression:"appointment.serviceId"}},e._l(e.servicesFiltered,function(e){return o("el-option",{key:e.id,attrs:{disabled:e.disabled,label:e.name,value:e.id}})}),1),e._v(" "),o("img",{staticClass:"svg is-spinner",attrs:{src:e.$root.getUrl+"public/img/oval-spinner.svg"}})],1),e._v(" "),e.locationsFiltered.length?o("el-form-item",{class:{active:e.locationSpinnerActive},attrs:{label:e.$root.labels.location+":",disabled:"customer"===e.$root.settings.role}},[o("el-select",{attrs:{filterable:"",clearable:"",placeholder:e.$root.labels.select_location},on:{change:e.handleLocationChange},model:{value:e.appointment.locationId,callback:function(t){e.$set(e.appointment,"locationId",t)},expression:"appointment.locationId"}},e._l(e.locationsFiltered,function(e){return o("el-option",{key:e.id,attrs:{disabled:e.disabled,label:e.name,value:e.id}})}),1),e._v(" "),o("img",{staticClass:"svg is-spinner",attrs:{src:e.$root.getUrl+"public/img/oval-spinner.svg"}})],1):e._e(),e._v(" "),e.$root.isLite?e._e():o("el-form-item",{class:{active:e.employeeSpinnerActive},attrs:{label:e.$root.labels.employee+":",prop:"providerId"}},[o("el-select",{attrs:{filterable:"",clearable:"",placeholder:e.$root.labels.select_employee,disabled:"customer"===e.$root.settings.role},on:{change:e.handleEmployeeChange},model:{value:e.appointment.providerId,callback:function(t){e.$set(e.appointment,"providerId",t)},expression:"appointment.providerId"}},e._l(e.employeesFiltered,function(e){return o("el-option",{key:e.id,attrs:{disabled:e.disabled,label:e.firstName+" "+e.lastName,value:e.id}})}),1),e._v(" "),o("img",{staticClass:"svg is-spinner",attrs:{src:e.$root.getUrl+"public/img/oval-spinner.svg"}})],1),e._v(" "),o("el-row",{attrs:{gutter:20}},[o("el-col",{staticClass:"v-calendar-column",attrs:{span:12}},[o("el-form-item",{class:{active:e.loadingTimeSlots},attrs:{label:e.$root.labels.date+":",prop:"selectedDate"}},[o("v-date-picker",{directives:[{name:"show",rawName:"v-show",value:!e.loadingTimeSlots,expression:"!loadingTimeSlots"}],attrs:{mode:"single","popover-visibility":"focus","popover-direction":"top","tint-color":"#1A84EE","show-day-popover":!1,"input-props":{class:"el-input__inner"},"available-dates":e.availableDates,"is-expanded":!1,"is-required":!0,"disabled-dates":e.disabledWeekdays,disabled:!1,formats:e.vCalendarFormats},on:{input:e.dateChange},model:{value:e.appointment.selectedDate,callback:function(t){e.$set(e.appointment,"selectedDate",t)},expression:"appointment.selectedDate"}}),e._v(" "),o("el-input",{directives:[{name:"show",rawName:"v-show",value:e.loadingTimeSlots,expression:"loadingTimeSlots"}],attrs:{placeholder:e.appointment.selectedDate?e.getFrontedFormattedDate(e.appointment.selectedDate):this.momentDateFormat,disabled:!0}}),e._v(" "),o("img",{staticClass:"svg is-spinner is-spinner-right",attrs:{src:e.$root.getUrl+"public/img/oval-spinner.svg"}})],1)],1),e._v(" "),o("el-col",{attrs:{span:12}},[o("el-form-item",{class:{active:e.loadingTimeSlots},attrs:{label:e.$root.labels.time+":",prop:"selectedPeriod.time"}},[o("el-select",{attrs:{"value-key":"time",filterable:"",placeholder:e.$root.labels.select_time,disabled:e.loadingTimeSlots},on:{change:function(t){return e.clearValidation()}},model:{value:e.appointment.selectedPeriod,callback:function(t){e.$set(e.appointment,"selectedPeriod",t)},expression:"appointment.selectedPeriod"}},e._l(e.appointment.dateTimeSlots,function(t){return o("el-option",{key:t.time,attrs:{label:e.getFrontedFormattedTime(t.time+":00"),value:t}})}),1),e._v(" "),o("img",{staticClass:"svg is-spinner",attrs:{src:e.$root.getUrl+"public/img/oval-spinner.svg"}})],1)],1)],1),e._v(" "),"customer"!==this.$root.settings.role?o("el-form-item",[o("el-checkbox",{on:{change:function(t){return e.clearValidation()}},model:{value:e.appointment.notifyParticipants,callback:function(t){e.$set(e.appointment,"notifyParticipants",t)},expression:"appointment.notifyParticipants"}},[e._v("\n "+e._s(e.$root.labels.notify_customers)+"\n "),o("el-tooltip",{attrs:{placement:"top"}},[o("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.notify_customers_tooltip)},slot:"content"}),e._v(" "),o("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1)],1):e._e(),e._v(" "),"customer"!==this.$root.settings.role?o("div",{staticClass:"am-divider"}):e._e(),e._v(" "),"customer"!==this.$root.settings.role?o("el-form-item",{attrs:{label:e.$root.labels.note_internal+":"}},[o("el-input",{attrs:{type:"textarea",autosize:{minRows:4,maxRows:6},placeholder:""},on:{input:function(t){return e.clearValidation()}},model:{value:e.appointment.internalNotes,callback:function(t){e.$set(e.appointment,"internalNotes",t)},expression:"appointment.internalNotes"}})],1):e._e()],1),e._v(" "),"customer"!==this.$root.settings.role?o("el-tab-pane",{attrs:{name:"extras"}},[o("span",{attrs:{slot:"label"},slot:"label"},[e._v(e._s(e.$root.labels.extras)+"\n "),e.appointment.serviceId&&e.appointment.bookings.length>0&&e.appointment.extrasSelectedCount>0?o("el-badge",{staticClass:"mark",attrs:{value:e.appointment.extrasSelectedCount}}):e._e()],1),e._v(" "),o("div",{staticClass:"am-dialog-table"},[e.appointment.providerId&&e.appointment.serviceId&&e.appointment.extrasCount>0&&e.appointment.bookings.length>0?o("div",[e._l(e.appointment.bookings,function(t,i){return["approved","pending"].includes(t.status)?o("div",{key:i,staticClass:"am-customer-extras"},[o("el-row",{staticClass:"am-customer-extras-data"},[o("el-col",[o("h3",[e._v(e._s(t.customer.firstName)+" "+e._s(t.customer.lastName))]),e._v(" "),o("span",[e._v(e._s(t.customer.email))])])],1),e._v(" "),e._l(t.extras,function(t){return o("el-row",{key:t.extraId,attrs:{gutter:10}},[o("el-col",{attrs:{span:2}},[o("el-checkbox",{on:{change:function(o){return e.handleExtrasSelectionChange(t)}},model:{value:t.selected,callback:function(o){e.$set(t,"selected",o)},expression:"item.selected"}})],1),e._v(" "),o("el-col",{attrs:{span:10}},[o("span",[e._v(e._s(t.name))])]),e._v(" "),o("el-col",{attrs:{span:7}},[o("el-input-number",{attrs:{type:"number",value:t.quantity,disabled:!t.selected,min:1,max:t.maxQuantity,size:"small"},on:{change:function(o){return e.handleExtrasSelectionChange(t)}},model:{value:t.quantity,callback:function(o){e.$set(t,"quantity",o)},expression:"item.quantity"}})],1),e._v(" "),o("el-col",{staticClass:"align-right",attrs:{span:5}},[e._v(e._s(e.getFormattedPrice(t.price)))])],1)}),e._v(" "),o("el-row",{staticClass:"subtotal",attrs:{gutter:10}},[o("el-col",{staticClass:"align-right",attrs:{span:14}},[e._v("\n "+e._s(e.$root.labels.subtotal)+":\n ")]),e._v(" "),o("el-col",{staticClass:"align-right",attrs:{span:10}},[e._v("\n "+e._s(e.getFormattedPrice(t.extrasTotalPrice))+"\n ")])],1)],2):e._e()}),e._v(" "),o("div",{staticClass:"total"},[o("el-row",{attrs:{gutter:10}},[o("el-col",{staticClass:"align-right",attrs:{span:14}},[e._v(e._s(e.$root.labels.service_price)+":")]),e._v(" "),o("el-col",{staticClass:"align-right ",attrs:{span:10}},[e._v(e._s(e.getFormattedPrice(e.appointment.serviceTotalPrice))+"\n ")])],1),e._v(" "),o("el-row",{attrs:{gutter:10}},[o("el-col",{staticClass:"align-right",attrs:{span:14}},[e._v(e._s(e.$root.labels.extras)+":")]),e._v(" "),o("el-col",{staticClass:"align-right ",attrs:{span:10}},[e._v(e._s(e.getFormattedPrice(e.appointment.extrasTotalPrice))+"\n ")])],1),e._v(" "),o("el-row",{staticClass:"am-strong",attrs:{gutter:10}},[o("el-col",{staticClass:"align-right",attrs:{span:14}},[e._v(e._s(e.$root.labels.total)+":")]),e._v(" "),o("el-col",{staticClass:"align-right ",attrs:{span:10}},[e._v(e._s(e.getAppointmentPrice(e.appointment.serviceId,e.appointment.bookings))+"\n ")])],1)],1)],2):e.appointment.serviceId&&e.appointment.providerId&&e.appointment.serviceId&&0===e.appointment.extrasCount?o("div",[o("p",{attrs:{align:"center"}},[e._v(e._s(e.$root.labels.service_no_extras))])]):o("div",[o("p",{attrs:{align:"center"}},[e._v(e._s(e.$root.labels.no_selected_extras_requirements))])])])]):e._e(),e._v(" "),0!==e.appointment.id&&"customer"!==this.$root.settings.role?o("el-tab-pane",{attrs:{label:e.$root.labels.payment,name:"payment"}},[o("dialog-appointment-payment",{attrs:{appointment:e.appointment},on:{editPayment:e.editPayment}})],1):e._e(),e._v(" "),e.showCustomFieldsTab()&&"customer"!==this.$root.settings.role?o("el-tab-pane",{attrs:{label:e.$root.labels.custom_fields,name:"customFields"}},[o("dialog-appointment-custom-fields",{attrs:{appointment:e.appointment,customFields:this.options.entities.customFields},on:{clearValidation:e.clearValidation}})],1):e._e()],1)],1):e._e()],1):e._e(),e._v(" "),e.appointment&&!e.dialogLoading&&"customer"!==this.$root.settings.role?o("dialog-actions",{attrs:{formName:"appointment",urlName:"appointments",isNew:0===e.appointment.id,entity:e.appointment,getParsedEntity:e.getParsedEntity,hasIcons:!0,status:{on:"visible",off:"hidden"},action:{haveAdd:!0,haveEdit:!0,haveStatus:!1,haveRemove:!0===e.$root.settings.capabilities.canDelete,haveRemoveEffect:!1,haveDuplicate:!0},message:{success:{save:e.$root.labels.appointment_saved,remove:e.$root.labels.appointment_deleted,show:"",hide:""},confirm:{remove:e.$root.labels.confirm_delete_appointment,show:"",hide:"",duplicate:e.$root.labels.confirm_duplicate_appointment}}},on:{errorCallback:e.errorCallback,validationBookingsFailCallback:e.validationBookingsFailCallback}}):e._e(),e._v(" "),o("div",["customer"===this.$root.settings.role?o("div",{staticClass:"am-dialog-footer"},[o("div",{staticClass:"am-dialog-footer-actions"},[o("el-row",[o("el-col",{staticClass:"align-right",attrs:{sm:24}},[o("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:e.updateByCustomer}},[e._v("\n "+e._s(e.$root.labels.save)+"\n ")])],1)],1)],1)]):e._e(),e._v(" "),o("div",{directives:[{name:"show",rawName:"v-show",value:e.dialogLoading,expression:"dialogLoading"}],staticClass:"am-dialog-loader"},[o("div",{staticClass:"am-dialog-loader-content"},[o("img",{attrs:{src:e.$root.getUrl+"public/img/spinner.svg"}}),e._v(" "),o("p",[e._v(e._s(e.$root.labels.loader_message))])])])])],1)},staticRenderFns:[]}},758:function(e,t,o){var i=o(325)(o(759),o(760),!1,null,null,null);e.exports=i.exports},759:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(693);t.default={mixins:[i.a],props:["app","options"],data:function(){return{}},methods:{getCustomFieldLabel:function(e,t){var o=this.options.entities.customFields.find(function(e){return e.id===parseInt(t)});return void 0!==o?o.label.trim():e.label.trim()},getCustomFieldValue:function(e){return Array.isArray(e)?e.join("; "):e},showCustomField:function(e){return Array.isArray(e)?e.length>0:!!e}}}},760:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[o("div",{staticClass:"am-appointment-details"},[o("el-row",[e._l(e.app.bookings,function(t,i){return o("el-row",{key:i,class:{"has-divider":e.app.bookings.length>1&&(e.app.bookings.length!==i+1||e.app.internalNotes)}},[e.app.bookings.length>1?o("h3",[e._v("\n "+e._s(null!==(e.user=e.getCustomerById(t.customerId))?e.user.firstName+" "+e.user.lastName:"")+"\n ")]):e._e(),e._v(" "),"customer"!==e.$root.settings.role?o("div",{staticClass:"am-appointment-collapsed-field"},[o("el-col",{attrs:{sm:5}},[o("p",{staticClass:"am-data"},[e._v(e._s(e.$root.labels.customer_email)+":")])]),e._v(" "),o("el-col",{attrs:{sm:7}},[o("p",{staticClass:"am-value"},[e._v("\n "+e._s(null!==(e.user=e.getCustomerById(e.app.bookings[i].customerId))?e.user.email:"")+"\n ")])])],1):e._e(),e._v(" "),e.getCustomerInfo(e.app.bookings[i])&&e.getCustomerInfo(e.app.bookings[i]).phone&&"customer"!==e.$root.settings.role?o("div",{staticClass:"am-appointment-collapsed-field"},[o("el-col",{attrs:{sm:5}},[o("p",{staticClass:"am-data"},[e._v(e._s(e.$root.labels.customer_phone)+":")])]),e._v(" "),o("el-col",{attrs:{sm:7}},[o("p",{staticClass:"am-value"},[e._v("\n "+e._s(e.getCustomerInfo(e.app.bookings[i]).phone)+"\n ")])])],1):e._e(),e._v(" "),e._l(JSON.parse(e.app.bookings[i].customFields),function(t,i){return t&&e.showCustomField(t.value)?o("div",{staticClass:"am-appointment-collapsed-field"},[o("el-col",{attrs:{sm:5}},[o("p",{staticClass:"am-data"},[e._v(e._s(e.getCustomFieldLabel(t,i))+":")])]),e._v(" "),o("el-col",{attrs:{sm:7}},[o("p",{staticClass:"am-value"},[e._v("\n "+e._s(t?e.getCustomFieldValue(t.value):"")+"\n ")])])],1):e._e()})],2)}),e._v(" "),e.app.internalNotes&&"customer"!==e.$root.settings.role?o("el-row",[o("el-col",{attrs:{sm:12}},[o("el-row",[o("el-col",{attrs:{sm:10}},[o("p",{staticClass:"am-data"},[e._v(e._s(e.$root.labels.note)+":")])]),e._v(" "),o("el-col",{attrs:{sm:14}},[o("p",{staticClass:"am-value"},[e._v(e._s(e.app.internalNotes))])])],1)],1)],1):e._e()],2)],1)])},staticRenderFns:[]}},821:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(758),n=o.n(i),a=o(722),s=o(744),r=o(732),l=o(733),c=o(674),m=o(745),p=o.n(m),u=o(734),d=o.n(u),h=o(737),f=o.n(h),v=o(740),g=o.n(v),b=o(688),y=o(693),_=o(679),C=o.n(_),k=o(686),$=o(675),w=o(1),x=o.n(w),D=o(676),S=o(690),P=o.n(S),F=o(723),A=o(678),T=o(720);t.default={mixins:[a.a,T.a,F.a,y.a,s.a,$.a,c.a,b.a,D.a,l.a,A.a,k.a,r.a],data:function(){return{updateStatusDisabled:!1,allAppointmentsChecked:!1,allDateAppointmentsChecked:{},appointment:null,appointmentsDay:[],appointmentStatusCount:{approved:0,pending:0},customer:null,deleteAppointmentGroupLoading:!1,dialogAppointment:!1,dialogPayment:!1,dialogExport:!1,fetched:!1,fetchedFiltered:!1,filterFields:!0,form:new C.a,params:{dates:this.getDatePickerInitRange(),providers:[],search:"",status:"",services:[],customerId:""},selectedPaymentModalData:{paymentId:null,bookingStart:null,bookings:null,service:null,providers:null,customer:null},showDeleteConfirmation:!1,timer:null,toaster:!1,updateBookingStatusId:0,updateBookingStatusLoading:!1,count:{success:0,error:0}}},created:function(){var e=this.getUrlQueryParams(window.location.href);this.params.dates="dateFrom"in e&&"dateTo"in e?{start:x()(e.dateFrom).toDate(),end:x()(e.dateTo).toDate()}:this.getDatePickerInitRange(),e.status&&(this.params.status=e.status),e.bookingId&&(this.params.bookingId=e.bookingId),this.getAppointmentOptions(!0)},mounted:function(){},updated:function(){this.fetched&&this.inlineSVG()},methods:{saveAppointmentCallback:function(){this.getAppointmentOptions(!0)},editPayment:function(e){this.selectedPaymentModalData=this.getPaymentData(e.paymentId,this.savedAppointment,null),this.dialogPayment=!0},deleteAppointmentGroup:function(){this.deleteAppointmentGroupLoading=!0;var e=this,t=[];Object.keys(this.appointmentsDay).forEach(function(o){e.appointmentsDay[o].appointments.forEach(function(e){e.checked&&t.push(e.id)})}),Object.keys(this.appointmentsDay).forEach(function(o){e.appointmentsDay[o].appointments.forEach(function(o){o.checked&&e.form.post(e.$root.getAjaxUrl+"/appointments/delete/"+o.id).then(function(){e.deleteAppointmentGroupCallback(t,!0)}).catch(function(){e.deleteAppointmentGroupCallback(t,!1)})})})},deleteAppointmentGroupCallback:function(e,t){if(e.pop(),t?this.count.success++:this.count.error++,0===e.length){this.count.success&&this.notify(this.$root.labels.success,this.count.success+" "+(this.count.success>1?this.$root.labels.appointments_deleted:this.$root.labels.appointment_deleted),"success"),this.count.error&&this.notify(this.$root.labels.error,this.count.error+" "+(this.count.error>1?this.$root.labels.appointments_not_deleted:this.$root.labels.appointment_not_deleted),"error"),this.count.success=0,this.count.error=0;var o=this;this.getAppointmentOptions(!0),Object.keys(this.appointmentsDay).forEach(function(e){o.allDateAppointmentsChecked[e]=!1}),this.allAppointmentsChecked=!1,this.toaster=!1,this.deleteAppointmentGroupLoading=!1}},updateBookingStatus:function(e,t){var o=this;this.updateBookingStatusLoading=!0,this.updateBookingStatusId=e.bookings[0].id,this.form.post(this.$root.getAjaxUrl+"/bookings/cancel/"+e.bookings[0].id).then(function(i){o.updateBookingStatusLoading=!1,o.updateBookingStatusId=0,o.setTotalStatusCounts(e,t,i.data.status),o.notify(o.$root.labels.success,i.data.message,"success"),e.status=i.data.status}).catch(function(e){409===e.response.status&&o.notify(o.$root.labels.error,e.response.data.message,"error"),o.updateBookingStatusLoading=!0,o.updateBookingStatusId=0,o.errorMessage=e.message})},setTotalStatusCounts:function(e,t,o){var i=0,n=this;if(Object.keys(this.appointmentsDay).forEach(function(e){n.appointmentsDay[e].appointments.forEach(function(e){i++})}),e.bookings.forEach(function(e){e.status=o}),t===o)switch(t){case"approved":this.appointmentStatusCount.approved0&&this.appointmentStatusCount.pending--;break;case"pending":this.appointmentStatusCount.pending0&&this.appointmentStatusCount.approved--}},getAppointmentOptions:function(e){var t=this;this.options.fetched=!1,this.$http.get(this.$root.getAjaxUrl+"/entities",{params:{types:["categories","employees","customers"]}}).then(function(o){t.filterResponseData(o),t.options.entities=o.data.data,t.options.entities.services=t.getServicesFromCategories(),t.options.entities.services.forEach(function(e){e.extras.forEach(function(e){e.extraId=e.id})}),t.setBookings(0),t.setEntitiesFilter(),t.fetched=!0,t.options.fetched=!0,e&&t.getAppointments()}).catch(function(e){console.log(e.message),t.fetched=!0,t.options.fetched=!0})},getAppointmentOptionsIfMissingCustomers:function(){var e=this.options.entities.customers.map(function(e){return e.id}),t=!1;for(var o in this.appointmentsDay)this.appointmentsDay[o].appointments.forEach(function(o){o.bookings.forEach(function(o){-1===e.indexOf(o.customerId)&&(t=!0)})});t&&this.getAppointmentOptions(!1)},getAppointments:function(){var e=this;this.fetchedFiltered=!1;var t=JSON.parse(JSON.stringify(this.params)),o=[];t.dates&&(t.dates.start&&o.push(x()(t.dates.start).format("YYYY-MM-DD")),t.dates.end&&o.push(x()(t.dates.end).format("YYYY-MM-DD")),t.dates=o),Object.keys(t).forEach(function(e){return!t[e]&&0!==t[e]&&delete t[e]}),this.$http.get(this.$root.getAjaxUrl+"/appointments",{params:t}).then(function(t){e.appointmentStatusCount.approved=0,e.appointmentStatusCount.pending=0;var o=e;"customer"===e.$root.settings.role?Object.keys(t.data.data.appointments).forEach(function(e){t.data.data.appointments[e].appointments.forEach(function(e){"approved"===e.bookings[0].status&&o.appointmentStatusCount.approved++,"pending"===e.bookings[0].status&&o.appointmentStatusCount.pending++})}):Object.keys(t.data.data.appointments).forEach(function(e){t.data.data.appointments[e].appointments.forEach(function(e){"approved"===e.status&&o.appointmentStatusCount.approved++,"pending"===e.status&&o.appointmentStatusCount.pending++,e.checked=!1}),o.allDateAppointmentsChecked[e]=!1}),e.appointmentsDay=t.data.data.appointments,e.getAppointmentOptionsIfMissingCustomers(),e.fetched=!0,e.fetchedFiltered=!0}).catch(function(t){console.log(t.message),e.fetched=!0,e.fetchedFiltered=!0})},changeRange:function(){this.setDatePickerSelectedDaysCount(this.params.dates.start,this.params.dates.end),this.changeFilter()},changeFilter:function(){this.getAppointments()},handleResize:function(){this.filterFields=window.innerWidth>=992},handleDateFormat:function(e){return e===x()().format("YYYY-MM-DD")?this.$root.labels.today:e===x()().add(1,"days").format("YYYY-MM-DD")?this.$root.labels.tomorrow:this.getFrontedFormattedDate(e)},handleCheckAllAppointments:function(){var e=this;Object.keys(this.appointmentsDay).forEach(function(t){e.appointmentsDay[t].appointments.forEach(function(o){o.checked=e.allAppointmentsChecked,e.allDateAppointmentsChecked[t]=e.allAppointmentsChecked})}),this.toaster=e.allAppointmentsChecked},handleCheckedDateAppointments:function(e){var t=this,o=0,i=0;Object.keys(this.appointmentsDay).forEach(function(n){t.appointmentsDay[n].appointments.forEach(function(a){n===e&&(a.checked=t.allDateAppointmentsChecked[e],o++),i++})}),this.allAppointmentsChecked=o===i,this.toaster=o>0},handleCheckedAppointment:function(){var e=this,t=0,o=0;Object.keys(this.appointmentsDay).forEach(function(i){var n=0;e.appointmentsDay[i].appointments.forEach(function(e){e.checked&&(n++,t++),o++}),e.allDateAppointmentsChecked[i]=n===e.appointmentsDay[i].appointments.length}),this.allAppointmentsChecked=t===o,this.toaster=t>0},selectAllInCategory:function(e){},getBookingStatus:function(e,t){return"customer"===this.$root.settings.role&&"pending"!==e?t:e},showDialogNewCustomer:function(){this.customer=this.getInitCustomerObject(),this.dialogCustomer=!0},canWriteAppointments:function(){return!0===this.$root.settings.capabilities.canWriteOthers||"provider"===this.$root.settings.role&&this.$root.settings.roles.allowWriteAppointments}},computed:{visibleEmployees:function(){return this.options.entities.employees.filter(function(e){return"hidden"===e.status||"visible"===e.status})},filterApplied:function(){return!!(this.params.search||this.params.services.length||this.params.providers.length||this.params.customerId||this.params.dates.start||this.params.dates.end||this.params.status)}},watch:{"params.search":function(){void 0!==this.params.search&&(this.fetchedFiltered=!1,clearTimeout(this.timer),this.timer=setTimeout(this.changeFilter,500))}},components:{PageHeader:P.a,DialogAppointment:p.a,DialogCustomer:d.a,DialogPayment:g.a,DialogExport:f.a,AppointmentListCollapsed:n.a}}},822:function(e,t){e.exports={render:function(){var e=this,t=this,o=t.$createElement,i=t._self._c||o;return i("div",{staticClass:"am-wrap"},[i("div",{staticClass:"am-body",attrs:{id:"am-appointments"}},[i("page-header",{attrs:{appointmentsApproved:t.appointmentStatusCount.approved,appointmentsPending:t.appointmentStatusCount.pending},on:{newAppointmentBtnClicked:t.showDialogNewAppointment}}),t._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:!t.fetched||!t.options.fetched,expression:"!fetched || !options.fetched"}],staticClass:"am-spinner am-section"},[i("img",{attrs:{src:t.$root.getUrl+"public/img/spinner.svg"}})]),t._v(" "),t.fetched&&0===t.appointmentsDay.length&&!t.filterApplied&&t.fetchedFiltered&&t.options.fetched?i("div",{staticClass:"am-empty-state am-section"},[i("img",{attrs:{src:t.$root.getUrl+"public/img/emptystate.svg"}}),t._v(" "),i("h2",[t._v(t._s(t.$root.labels.no_appointments_yet))]),t._v(" "),i("p",[t._v(t._s(t.$root.labels.click_add_appointments))])]):t._e(),t._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:t.fetched&&t.options.fetched&&(0!==t.appointmentsDay.length||0===t.appointmentsDay.length&&t.filterApplied||!t.fetchedFiltered),expression:"fetched && options.fetched && (appointmentsDay.length !== 0 || (appointmentsDay.length === 0 && filterApplied) || !fetchedFiltered)"}]},[i("div",{staticClass:"am-appointments-filter am-section"},[i("el-form",{staticClass:"demo-form-inline",attrs:{model:t.params,action:t.exportAction,method:"POST"}},[i("el-row",{attrs:{gutter:16}},[i("el-col",{attrs:{md:24}},[i("el-popover",t._b({ref:"filterSearchPop",attrs:{disabled:!t.$root.isLite}},"el-popover",t.$root.popLiteProps,!1),[i("PopLite")],1),t._v(" "),i("div",{staticClass:"am-search"},[i("el-form-item",[i("el-input",{directives:[{name:"popover",rawName:"v-popover:filterSearchPop",arg:"filterSearchPop"}],staticClass:"calc-width",attrs:{placeholder:t.$root.labels.appointments_search_placeholder,disabled:t.$root.isLite},model:{value:t.params.search,callback:function(e){t.$set(t.params,"search",e)},expression:"params.search"}}),t._v(" "),i("el-button",{staticClass:"button-filter-toggle am-button-icon",attrs:{title:"Toggle Filters",disabled:t.$root.isLite},on:{click:function(e){t.filterFields=!t.filterFields}}},[i("img",{staticClass:"svg",attrs:{alt:"Toggle Filters",src:t.$root.getUrl+"public/img/filter.svg"}})]),t._v(" "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.export_tooltip_appointments)},slot:"content"}),t._v(" "),i("el-button",{staticClass:"button-export am-button-icon",on:{click:function(e){t.dialogExport=!0}}},[i("img",{staticClass:"svg",attrs:{alt:t.$root.labels.export,src:t.$root.getUrl+"public/img/export.svg"}})])],1)],1)],1)],1)],1),t._v(" "),i("transition",{attrs:{name:"fade"}},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.filterFields,expression:"filterFields"}],staticClass:"am-filter-fields"},[i("el-row",{attrs:{gutter:16}},[i("el-col",{staticClass:"v-calendar-column",attrs:{sm:24,md:24,lg:5}},[i("el-form-item",{attrs:{prop:"dates"}},[i("v-date-picker",{attrs:{"is-double-paned":!1,mode:"range","popover-visibility":"focus","popover-direction":"bottom","tint-color":"#1A84EE","show-day-popover":!1,"input-props":{class:"el-input__inner"},"is-expanded":!1,"is-required":!0,"input-class":"el-input__inner",formats:t.vCalendarFormats},on:{input:t.changeRange},model:{value:t.params.dates,callback:function(e){t.$set(t.params,"dates",e)},expression:"params.dates"}})],1)],1),t._v(" "),t.$root.isLite?t._e():i("el-col",{attrs:{sm:6,md:6,lg:5}},[i("el-form-item",[i("el-popover",t._b({ref:"filterEmployeesPop",attrs:{disabled:!t.$root.isLite}},"el-popover",t.$root.popLiteProps,!1),[i("PopLite")],1),t._v(" "),i("el-select",{directives:[{name:"popover",rawName:"v-popover:filterEmployeesPop",arg:"filterEmployeesPop"}],attrs:{disabled:t.$root.isLite,filterable:"",clearable:"",placeholder:t.$root.labels.employees,multiple:"","collapse-tags":""},on:{change:t.changeFilter},model:{value:t.params.providers,callback:function(e){t.$set(t.params,"providers",e)},expression:"params.providers"}},t._l(t.visibleEmployees,function(e){return i("el-option",{key:e.id,attrs:{label:e.firstName+" "+e.lastName,value:e.id}})}),1)],1)],1),t._v(" "),i("el-col",{attrs:{sm:6,md:6,lg:t.$root.isLite?7:5}},[i("el-form-item",[i("el-popover",t._b({ref:"filterCustomersPop",attrs:{disabled:!t.$root.isLite}},"el-popover",t.$root.popLiteProps,!1),[i("PopLite")],1),t._v(" "),i("el-select",{directives:[{name:"popover",rawName:"v-popover:filterCustomersPop",arg:"filterCustomersPop"}],attrs:{disabled:t.$root.isLite,filterable:"",clearable:"",placeholder:t.$root.labels.customer},on:{change:t.changeFilter},model:{value:t.params.customerId,callback:function(e){t.$set(t.params,"customerId",e)},expression:"params.customerId"}},t._l(t.visibleCustomers,function(e){return i("el-option",{key:e.id,attrs:{label:e.firstName+" "+e.lastName,value:e.id}})}),1)],1)],1),t._v(" "),i("el-col",{attrs:{sm:6,md:6,lg:t.$root.isLite?7:5}},[i("el-form-item",[i("el-popover",t._b({ref:"filterServicesPop",attrs:{disabled:!t.$root.isLite}},"el-popover",t.$root.popLiteProps,!1),[i("PopLite")],1),t._v(" "),i("el-select",{directives:[{name:"popover",rawName:"v-popover:filterServicesPop",arg:"filterServicesPop"}],attrs:{disabled:t.$root.isLite,multiple:"",filterable:"",placeholder:t.$root.labels.services,"collapse-tags":""},on:{change:t.changeFilter},model:{value:t.params.services,callback:function(e){t.$set(t.params,"services",e)},expression:"params.services"}},t._l(t.options.entities.categories,function(e){return i("div",{key:e.id},[i("div",{staticClass:"am-drop-parent",on:{click:function(o){return t.selectAllInCategory(e.id)}}},[i("span",[t._v(t._s(e.name))])]),t._v(" "),t._l(e.serviceList,function(e){return i("el-option",{key:e.id,staticClass:"am-drop-child",attrs:{label:e.name,value:e.id}})})],2)}),0)],1)],1),t._v(" "),i("el-col",{attrs:{sm:6,md:6,lg:t.$root.isLite?5:4}},[i("el-form-item",[i("el-popover",t._b({ref:"filterStatusPop",attrs:{disabled:!t.$root.isLite}},"el-popover",t.$root.popLiteProps,!1),[i("PopLite")],1),t._v(" "),i("el-select",{directives:[{name:"popover",rawName:"v-popover:filterStatusPop",arg:"filterStatusPop"}],attrs:{disabled:t.$root.isLite,filterable:"",clearable:"",placeholder:t.$root.labels.status},on:{change:t.changeFilter},model:{value:t.params.status,callback:function(e){t.$set(t.params,"status",e)},expression:"params.status"}},t._l(t.statuses,function(e){return i("el-option",{key:e.value,staticClass:"am-appointment-status-option",attrs:{label:e.label,value:e.value}},[i("span",{staticClass:"am-appointment-status-symbol",class:e.value}),t._v(" "),i("span",[t._v(t._s(e.label))])])}),1)],1)],1)],1)],1)]),t._v(" "),i("transition",{attrs:{name:"slide"}},[t.dialogExport?i("el-dialog",{staticClass:"am-side-dialog am-dialog-export",attrs:{visible:t.dialogExport,"show-close":!1},on:{"update:visible":function(e){t.dialogExport=e}}},[i("dialog-export",{attrs:{data:Object.assign(t.params,t.exportParams),action:t.$root.getAjaxUrl+"/report/appointments"},on:{updateAction:function(t){e.exportAction=t},closeDialogExport:function(e){t.dialogExport=!1}}})],1):t._e()],1)],1)],1),t._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:t.fetched&&0===t.appointmentsDay.length&&t.filterApplied&&t.fetchedFiltered&&t.options.fetched,expression:"fetched && appointmentsDay.length === 0 && filterApplied && fetchedFiltered && options.fetched"}],staticClass:"am-empty-state am-section"},[i("img",{attrs:{src:t.$root.getUrl+"public/img/emptystate.svg"}}),t._v(" "),i("h2",[t._v(t._s(t.$root.labels.no_results))])]),t._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:!t.fetchedFiltered,expression:"!fetchedFiltered"}],staticClass:"am-spinner am-section"},[i("img",{attrs:{src:t.$root.getUrl+"public/img/spinner.svg"}})]),t._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:t.fetchedFiltered&&t.options.fetched&&0!==t.appointmentsDay.length,expression:"fetchedFiltered && options.fetched && appointmentsDay.length !== 0"}],staticClass:"am-appointments am-section"},[i("div",{staticClass:"am-appointments-list-head"},[i("el-row",[i("el-col",{attrs:{lg:15}},[i("el-row",{staticClass:"am-appointments-flex-row-middle-align",attrs:{gutter:10}},[i("el-col",{attrs:{lg:3,md:3}},[i("p",[!0===t.$root.settings.capabilities.canDelete?i("el-checkbox",{on:{change:t.handleCheckAllAppointments},model:{value:t.allAppointmentsChecked,callback:function(e){t.allAppointmentsChecked=e},expression:"allAppointmentsChecked"}}):t._e()],1)]),t._v(" "),i("el-col",{attrs:{lg:6,md:6}},[i("p",[t._v(t._s(t.$root.labels.customer)+":")])]),t._v(" "),i("el-col",{attrs:{lg:6,md:6}},[i("p",[t._v(t._s(t.$root.labels.assigned_to)+":")])]),t._v(" "),i("el-col",{attrs:{lg:9,md:9}},[i("p",[t._v(t._s(t.$root.labels.service)+":")])])],1)],1),t._v(" "),i("el-col",{attrs:{lg:9}},[i("el-row",{staticClass:"am-appointments-flex-row-middle-align",attrs:{gutter:10}},[i("el-col",{attrs:{lg:0,md:3}}),t._v(" "),i("el-col",{attrs:{lg:5,md:6}},[i("p",[t._v(t._s(t.$root.labels.duration)+":")])]),t._v(" "),i("el-col",{attrs:{lg:7,sm:6}},[i("p",[t._v(t._s(t.$root.labels.payment)+":")])]),t._v(" "),i("el-col",{attrs:{lg:12,md:6}},[i("p",[t._v(t._s(t.$root.labels.status)+":")])])],1)],1)],1)],1),t._v(" "),t._l(t.appointmentsDay,function(e,o){return!t.$root.isLite||e.appointments.filter(function(e){return e.providerId===t.options.entities.employees[0].id}).length?i("div",[i("div",{staticClass:"am-appointments-list-day-title"},[i("el-row",[i("el-col",{attrs:{span:24}},[i("h2",[!0===t.$root.settings.capabilities.canDelete?i("el-checkbox",{attrs:{label:e.date},on:{change:function(e){return t.handleCheckedDateAppointments(o)}},model:{value:t.allDateAppointmentsChecked[o],callback:function(e){t.$set(t.allDateAppointmentsChecked,o,e)},expression:"allDateAppointmentsChecked[appDateKey]"}}):t._e(),t._v("\n "+t._s(t.handleDateFormat(e.date))+"\n ")],1)])],1)],1),t._v(" "),i("div",{staticClass:"am-appointments-list"},[i("el-collapse",t._l(e.appointments,function(e){return(t.appointmentProvider=t.getProviderById(e.providerId))?i("el-collapse-item",{key:e.id,staticClass:"am-appointment",attrs:{name:e.id}},[i("template",{slot:"title"},[i("div",{staticClass:"am-appointment-data"},[i("el-row",[i("el-col",{attrs:{lg:15}},[i("el-row",{staticClass:"am-appointments-flex-row-middle-align",attrs:{gutter:10}},[i("el-col",{attrs:{lg:3,sm:3}},[i("span",{staticClass:"am-appointment-checkbox",on:{click:function(e){e.stopPropagation()}}},[!0===t.$root.settings.capabilities.canDelete?i("el-checkbox",{attrs:{value:e.id,label:e.id},on:{change:function(o){return t.handleCheckedAppointment(e)}},model:{value:e.checked,callback:function(o){t.$set(e,"checked",o)},expression:"app.checked"}}):t._e()],1),t._v(" "),i("span",{staticClass:"am-appointment-time",class:t.getBookingStatus(e.status,e.bookings[0].status)},[t._v("\n "+t._s(t.getFrontedFormattedTime(t.getTime(e.bookingStart)))+"\n ")])]),t._v(" "),i("el-col",{attrs:{lg:6,sm:6}},[i("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.customer)+":")]),t._v(" "),[i("el-tooltip",{staticClass:"item",attrs:{effect:"dark",placement:"top",disabled:1===e.bookings.length,"popper-class":"am-align-left"}},[e.bookings.length>1?i("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.getCustomersFromGroup(e))},slot:"content"}):t._e(),t._v(" "),i("h3",{class:{grouped:e.bookings.length>1}},[i("img",{directives:[{name:"show",rawName:"v-show",value:e.bookings.length>1,expression:"app.bookings.length > 1"}],attrs:{width:"16px",src:t.$root.getUrl+"public/img/group.svg"}}),t._v(" "),t._l(e.bookings,function(o,n){return i("span",[t._v("\n "+t._s(null!==(t.user=t.getCustomerInfo(o))?t.user.firstName+" "+t.user.lastName:"")),e.bookings.length>1&&n+1!==e.bookings.length?i("span",[t._v(",")]):t._e()])})],2)]),t._v(" "),t._l(e.bookings,function(o){return 1===e.bookings.length?i("span",[t._v(t._s(null!==(t.user=t.getCustomerById(o.customerId))?t.user.email:""))]):t._e()}),t._v(" "),e.bookings.length>1?i("span",[t._v(t._s(t.$root.labels.multiple_emails))]):t._e()]],2),t._v(" "),i("el-col",{attrs:{lg:6,sm:6}},[i("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.assigned)+":")]),t._v(" "),i("div",{staticClass:"am-assigned"},[t.options.fetched&&t.fetchedFiltered?i("img",{attrs:{src:t.pictureLoad(t.appointmentProvider,!0)},on:{error:function(e){return t.imageLoadError(t.appointmentProvider,!0)}}}):t._e(),t._v(" "),i("h4",[t._v("\n "+t._s(null!==(t.user=t.appointmentProvider)?t.user.firstName+" "+t.user.lastName:"")+"\n ")])])]),t._v(" "),i("el-col",{attrs:{lg:9,sm:9}},[i("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.service)+":")]),t._v(" "),i("h4",[t._v("\n "+t._s(null!==(t.service=t.getServiceById(e.serviceId))?t.service.name:"")+"\n ")])])],1)],1),t._v(" "),i("el-col",{attrs:{lg:9}},[i("el-row",{staticClass:"am-appointments-flex-row-middle-align",attrs:{gutter:10}},[i("el-col",{attrs:{lg:0,sm:3}}),t._v(" "),i("el-col",{attrs:{lg:5,sm:6,xs:12}},[i("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.duration)+":")]),t._v(" "),i("h4",[t._v(t._s(t.momentDurationToNiceDurationWithUnit(t.convertDateTimeRangeDifferenceToMomentDuration(e.bookingStart,e.bookingEnd))))])]),t._v(" "),i("el-col",{staticClass:"am-appointment-payment",attrs:{lg:7,sm:6,xs:13}},[i("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.payment)+":")]),t._v(" "),i("div",{staticClass:"am-appointment-payment-wrap"},[t._l(t.getAppointmentPaymentMethods(e.bookings),function(e){return i("img",{attrs:{src:t.$root.getUrl+"public/img/payments/"+e+".svg"}})}),t._v(" "),i("h4",[t._v("\n "+t._s(t.getAppointmentPrice(e.serviceId,e.bookings))+"\n ")])],2)]),t._v(" "),"customer"!==t.$root.settings.role?i("el-col",{attrs:{lg:7,sm:6,xs:16}},[i("div",{staticClass:"am-appointment-status",on:{click:function(e){e.stopPropagation()}}},[i("span",{staticClass:"am-appointment-status-symbol",class:e.status}),t._v(" "),i("el-select",{attrs:{placeholder:t.$root.labels.status,disabled:t.updateStatusDisabled||!t.canWriteAppointments()},on:{change:function(o){return t.updateAppointmentStatus(e,e.status,!0)}},model:{value:e.status,callback:function(o){t.$set(e,"status",o)},expression:"app.status"}},t._l(t.statuses,function(e){return i("el-option",{key:e.value,staticClass:"am-appointment-status-option",attrs:{label:e.label,value:e.value}},[i("span",{staticClass:"am-appointment-status-symbol",class:e.value},[t._v(t._s(e.label))])])}),1)],1)]):t._e(),t._v(" "),t.canWriteAppointments()?i("el-col",{attrs:{lg:5,sm:3,xs:8}},[i("div",{staticClass:"am-edit-btn",on:{click:function(e){e.stopPropagation()}}},[i("el-button",{on:{click:function(o){return t.showDialogEditAppointment(e.id)}}},[t._v("\n "+t._s(t.$root.labels.edit)+"\n ")])],1)]):t._e(),t._v(" "),"customer"===t.$root.settings.role?i("el-col",{attrs:{lg:12,sm:6}},[i("span",{class:"am-customer-status "+e.bookings[0].status},[t._v(t._s(t.statuses.find(function(t){return t.value===e.bookings[0].status}).label))]),t._v(" "),i("span",{staticClass:"am-cancel-btn",on:{click:function(e){e.stopPropagation()}}},[i("el-tooltip",{attrs:{effect:"dark",content:t.$root.labels.cancel_appointment,placement:"top"}},[!e.past&&"canceled"!==e.bookings[0].status&&"rejected"!==e.bookings[0].status&&e.cancelable?i("el-button",{attrs:{type:"danger",size:"mini",loading:t.updateBookingStatusLoading&&e.bookings[0].id===t.updateBookingStatusId},on:{click:function(o){return t.updateBookingStatus(e,"canceled")}}},[t._v("\n "+t._s(t.$root.labels.cancel)+"\n ")]):t._e()],1)],1)]):t._e()],1)],1)],1)],1)]),t._v(" "),"customer"!==t.$root.settings.role?i("appointment-list-collapsed",{attrs:{app:e,options:t.options}}):t._e()],2):t._e()}),1)],1)]):t._e()})],2),t._v(" "),i("transition",{attrs:{name:"slide-vertical"}},[t.toaster?i("div",{staticClass:"am-bottom-popover"},[i("transition",{attrs:{name:"fade"}},[i("el-button",{directives:[{name:"show",rawName:"v-show",value:!t.showDeleteConfirmation,expression:"!showDeleteConfirmation"}],staticClass:"am-button-icon",on:{click:function(e){t.showDeleteConfirmation=!t.showDeleteConfirmation}}},[i("img",{staticClass:"svg",attrs:{alt:t.$root.labels.delete,src:t.$root.getUrl+"public/img/delete.svg"}})])],1),t._v(" "),i("transition",{attrs:{name:"slide-vertical"}},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.showDeleteConfirmation,expression:"showDeleteConfirmation"}],staticClass:"am-bottom-popover-confirmation"},[i("el-row",{attrs:{type:"flex",justify:"start",align:"middle"}},[i("h3",[t._v(t._s(t.$root.labels.confirm_delete_appointment))]),t._v(" "),i("div",{staticClass:"align-left"},[i("el-button",{attrs:{size:"small"},on:{click:function(e){t.showDeleteConfirmation=!t.showDeleteConfirmation}}},[t._v("\n "+t._s(t.$root.labels.cancel)+"\n ")]),t._v(" "),i("el-button",{attrs:{size:"small",type:"primary",loading:t.deleteAppointmentGroupLoading},on:{click:t.deleteAppointmentGroup}},[t._v("\n "+t._s(t.$root.labels.delete)+"\n ")])],1)])],1)])],1):t._e()])],1),t._v(" "),t.canWriteAppointments()?i("div",{staticClass:"am-button-new",attrs:{id:"am-button-new"}},[i("el-button",{attrs:{id:"am-plus-symbol",type:"primary",icon:"el-icon-plus"},on:{click:t.showDialogNewAppointment}})],1):t._e(),t._v(" "),i("transition",{attrs:{name:"slide"}},[t.dialogAppointment?i("el-dialog",{staticClass:"am-side-dialog",attrs:{visible:t.dialogAppointment,"show-close":!1},on:{"update:visible":function(e){t.dialogAppointment=e}}},[i("dialog-appointment",{attrs:{appointment:t.appointment,bookings:t.bookings,entitiesChoices:t.options.entitiesChoices,options:t.options},on:{sortBookings:t.sortBookings,saveCallback:t.saveAppointmentCallback,duplicateCallback:t.duplicateAppointmentCallback,closeDialog:t.closeDialogAppointment,showDialogNewCustomer:function(e){return t.showDialogNewCustomer()},editPayment:t.editPayment}})],1):t._e()],1),t._v(" "),i("transition",{attrs:{name:"slide"}},[t.dialogCustomer?i("el-dialog",{staticClass:"am-side-dialog",attrs:{visible:t.dialogCustomer,"show-close":!1},on:{"update:visible":function(e){t.dialogCustomer=e}}},[i("dialog-customer",{attrs:{customer:t.customer},on:{closeDialog:function(e){t.dialogCustomer=!1},saveCallback:t.saveCustomerCallback}})],1):t._e()],1),t._v(" "),i("transition",{attrs:{name:"slide"}},[t.dialogPayment?i("el-dialog",{staticClass:"am-side-dialog am-dialog-coupon",attrs:{visible:t.dialogPayment,"show-close":!1},on:{"update:visible":function(e){t.dialogPayment=e}}},[i("dialog-payment",{attrs:{modalData:t.selectedPaymentModalData,bookingFetched:!0},on:{closeDialogPayment:function(e){t.dialogPayment=!1},updatePaymentCallback:t.updatePaymentCallback}})],1):t._e()],1),t._v(" "),i("DialogLite"),t._v(" "),i("el-col",{attrs:{md:6}},[i("a",{staticClass:"am-help-button",attrs:{href:"https://wpamelia.com/appointments/",target:"_blank"}},[i("i",{staticClass:"el-icon-question"}),t._v(" "+t._s(t.$root.labels.need_help)+"?\n ")])])],1)])},staticRenderFns:[]}}});