(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6ea0d002"],{"0c74":function(t,n,e){"use strict";e("e5da")},"0c81":function(t,n,e){"use strict";e.d(n,"b",(function(){return r})),e.d(n,"f",(function(){return i})),e.d(n,"e",(function(){return o})),e.d(n,"d",(function(){return u})),e.d(n,"c",(function(){return a})),e.d(n,"g",(function(){return c})),e.d(n,"a",(function(){return f}));var r=function(t){return"".concat(t," har blivit tillagt!")},i=function(t){return"".concat(t," sparades!")},o="Något gick fel!",u="Din åtgärd har blivit raderad!",a="Är du säker?",c="Ja",f="Avbryt"},"0f81":function(t,n,e){"use strict";var r=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{staticClass:"app-toggle"},[e("div",{staticClass:"app-toggle__item",class:{active:t.value},on:{click:function(n){return t.$emit("input",!0)}}},[t._v(t._s(t.leftValue))]),e("div",{staticClass:"app-toggle__item",class:{active:!t.value},on:{click:function(n){return t.$emit("input",!1)}}},[t._v(t._s(t.rightValue))])])},i=[],o={props:{leftValue:String,rightValue:String,value:Boolean}},u=o,a=(e("0c74"),e("2877")),c=Object(a["a"])(u,r,i,!1,null,"74694c6c",null);n["a"]=c.exports},"129f":function(t,n){t.exports=Object.is||function(t,n){return t===n?0!==t||1/t===1/n:t!=t&&n!=n}},"2ef0":function(t,n,e){(function(t,r){var i; /** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */(function(){var o,u="4.17.21",a=200,c="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",f="Expected a function",l="Invalid `variable` option passed into `_.template`",s="__lodash_hash_undefined__",p=500,h="__lodash_placeholder__",v=1,d=2,g=4,_=1,m=2,y=1,b=2,w=4,x=8,O=16,j=32,k=64,E=128,A=256,C=512,R=30,S="...",D=800,I=16,L=1,U=2,P=3,T=1/0,W=9007199254740991,z=17976931348623157e292,B=NaN,M=4294967295,$=M-1,N=M>>>1,F=[["ary",E],["bind",y],["bindKey",b],["curry",x],["curryRight",O],["flip",C],["partial",j],["partialRight",k],["rearg",A]],V="[object Arguments]",q="[object Array]",H="[object AsyncFunction]",Y="[object Boolean]",X="[object Date]",K="[object DOMException]",Z="[object Error]",G="[object Function]",J="[object GeneratorFunction]",Q="[object Map]",tt="[object Number]",nt="[object Null]",et="[object Object]",rt="[object Promise]",it="[object Proxy]",ot="[object RegExp]",ut="[object Set]",at="[object String]",ct="[object Symbol]",ft="[object Undefined]",lt="[object WeakMap]",st="[object WeakSet]",pt="[object ArrayBuffer]",ht="[object DataView]",vt="[object Float32Array]",dt="[object Float64Array]",gt="[object Int8Array]",_t="[object Int16Array]",mt="[object Int32Array]",yt="[object Uint8Array]",bt="[object Uint8ClampedArray]",wt="[object Uint16Array]",xt="[object Uint32Array]",Ot=/\b__p \+= '';/g,jt=/\b(__p \+=) '' \+/g,kt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Et=/&(?:amp|lt|gt|quot|#39);/g,At=/[&<>"']/g,Ct=RegExp(Et.source),Rt=RegExp(At.source),St=/<%-([\s\S]+?)%>/g,Dt=/<%([\s\S]+?)%>/g,It=/<%=([\s\S]+?)%>/g,Lt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ut=/^\w*$/,Pt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Tt=/[\\^$.*+?()[\]{}|]/g,Wt=RegExp(Tt.source),zt=/^\s+/,Bt=/\s/,Mt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,$t=/\{\n\/\* \[wrapped with (.+)\] \*/,Nt=/,? & /,Ft=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Vt=/[()=,{}\[\]\/\s]/,qt=/\\(\\)?/g,Ht=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Yt=/\w*$/,Xt=/^[-+]0x[0-9a-f]+$/i,Kt=/^0b[01]+$/i,Zt=/^\[object .+?Constructor\]$/,Gt=/^0o[0-7]+$/i,Jt=/^(?:0|[1-9]\d*)$/,Qt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,tn=/($^)/,nn=/['\n\r\u2028\u2029\\]/g,en="\\ud800-\\udfff",rn="\\u0300-\\u036f",on="\\ufe20-\\ufe2f",un="\\u20d0-\\u20ff",an=rn+on+un,cn="\\u2700-\\u27bf",fn="a-z\\xdf-\\xf6\\xf8-\\xff",ln="\\xac\\xb1\\xd7\\xf7",sn="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",pn="\\u2000-\\u206f",hn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",vn="A-Z\\xc0-\\xd6\\xd8-\\xde",dn="\\ufe0e\\ufe0f",gn=ln+sn+pn+hn,_n="['’]",mn="["+en+"]",yn="["+gn+"]",bn="["+an+"]",wn="\\d+",xn="["+cn+"]",On="["+fn+"]",jn="[^"+en+gn+wn+cn+fn+vn+"]",kn="\\ud83c[\\udffb-\\udfff]",En="(?:"+bn+"|"+kn+")",An="[^"+en+"]",Cn="(?:\\ud83c[\\udde6-\\uddff]){2}",Rn="[\\ud800-\\udbff][\\udc00-\\udfff]",Sn="["+vn+"]",Dn="\\u200d",In="(?:"+On+"|"+jn+")",Ln="(?:"+Sn+"|"+jn+")",Un="(?:"+_n+"(?:d|ll|m|re|s|t|ve))?",Pn="(?:"+_n+"(?:D|LL|M|RE|S|T|VE))?",Tn=En+"?",Wn="["+dn+"]?",zn="(?:"+Dn+"(?:"+[An,Cn,Rn].join("|")+")"+Wn+Tn+")*",Bn="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Mn="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",$n=Wn+Tn+zn,Nn="(?:"+[xn,Cn,Rn].join("|")+")"+$n,Fn="(?:"+[An+bn+"?",bn,Cn,Rn,mn].join("|")+")",Vn=RegExp(_n,"g"),qn=RegExp(bn,"g"),Hn=RegExp(kn+"(?="+kn+")|"+Fn+$n,"g"),Yn=RegExp([Sn+"?"+On+"+"+Un+"(?="+[yn,Sn,"$"].join("|")+")",Ln+"+"+Pn+"(?="+[yn,Sn+In,"$"].join("|")+")",Sn+"?"+In+"+"+Un,Sn+"+"+Pn,Mn,Bn,wn,Nn].join("|"),"g"),Xn=RegExp("["+Dn+en+an+dn+"]"),Kn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Zn=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Gn=-1,Jn={};Jn[vt]=Jn[dt]=Jn[gt]=Jn[_t]=Jn[mt]=Jn[yt]=Jn[bt]=Jn[wt]=Jn[xt]=!0,Jn[V]=Jn[q]=Jn[pt]=Jn[Y]=Jn[ht]=Jn[X]=Jn[Z]=Jn[G]=Jn[Q]=Jn[tt]=Jn[et]=Jn[ot]=Jn[ut]=Jn[at]=Jn[lt]=!1;var Qn={};Qn[V]=Qn[q]=Qn[pt]=Qn[ht]=Qn[Y]=Qn[X]=Qn[vt]=Qn[dt]=Qn[gt]=Qn[_t]=Qn[mt]=Qn[Q]=Qn[tt]=Qn[et]=Qn[ot]=Qn[ut]=Qn[at]=Qn[ct]=Qn[yt]=Qn[bt]=Qn[wt]=Qn[xt]=!0,Qn[Z]=Qn[G]=Qn[lt]=!1;var te={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},ne={"&":"&","<":"<",">":">",'"':""","'":"'"},ee={"&":"&","<":"<",">":">",""":'"',"'":"'"},re={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ie=parseFloat,oe=parseInt,ue="object"==typeof t&&t&&t.Object===Object&&t,ae="object"==typeof self&&self&&self.Object===Object&&self,ce=ue||ae||Function("return this")(),fe=n&&!n.nodeType&&n,le=fe&&"object"==typeof r&&r&&!r.nodeType&&r,se=le&&le.exports===fe,pe=se&&ue.process,he=function(){try{var t=le&&le.require&&le.require("util").types;return t||pe&&pe.binding&&pe.binding("util")}catch(n){}}(),ve=he&&he.isArrayBuffer,de=he&&he.isDate,ge=he&&he.isMap,_e=he&&he.isRegExp,me=he&&he.isSet,ye=he&&he.isTypedArray;function be(t,n,e){switch(e.length){case 0:return t.call(n);case 1:return t.call(n,e[0]);case 2:return t.call(n,e[0],e[1]);case 3:return t.call(n,e[0],e[1],e[2])}return t.apply(n,e)}function we(t,n,e,r){var i=-1,o=null==t?0:t.length;while(++i-1}function Ae(t,n,e){var r=-1,i=null==t?0:t.length;while(++r-1);return e}function tr(t,n){var e=t.length;while(e--&&ze(n,t[e],0)>-1);return e}function nr(t,n){var e=t.length,r=0;while(e--)t[e]===n&&++r;return r}var er=Fe(te),rr=Fe(ne);function ir(t){return"\\"+re[t]}function or(t,n){return null==t?o:t[n]}function ur(t){return Xn.test(t)}function ar(t){return Kn.test(t)}function cr(t){var n,e=[];while(!(n=t.next()).done)e.push(n.value);return e}function fr(t){var n=-1,e=Array(t.size);return t.forEach((function(t,r){e[++n]=[r,t]})),e}function lr(t,n){return function(e){return t(n(e))}}function sr(t,n){var e=-1,r=t.length,i=0,o=[];while(++e-1}function Nr(t,n){var e=this.__data__,r=li(e,t);return r<0?(++this.size,e.push([t,n])):e[r][1]=n,this}function Fr(t){var n=-1,e=null==t?0:t.length;this.clear();while(++n=n?t:n)),t}function _i(t,n,e,r,i,u){var a,c=n&v,f=n&d,l=n&g;if(e&&(a=i?e(t,r,i,u):e(t)),a!==o)return a;if(!kl(t))return t;var s=fl(t);if(s){if(a=na(t),!c)return iu(t,a)}else{var p=Gu(t),h=p==G||p==J;if(vl(t))return Xo(t,c);if(p==et||p==V||h&&!i){if(a=f||h?{}:ea(t),!c)return f?au(t,hi(a,t)):uu(t,pi(a,t))}else{if(!Qn[p])return i?t:{};a=ra(t,p,c)}}u||(u=new Jr);var _=u.get(t);if(_)return _;u.set(t,a),zl(t)?t.forEach((function(r){a.add(_i(r,n,e,r,t,u))})):Al(t)&&t.forEach((function(r,i){a.set(i,_i(r,n,e,i,t,u))}));var m=l?f?Mu:Bu:f?js:Os,y=s?o:m(t);return xe(y||t,(function(r,i){y&&(i=r,r=t[i]),fi(a,i,_i(r,n,e,i,t,u))})),a}function mi(t){var n=Os(t);return function(e){return yi(e,t,n)}}function yi(t,n,e){var r=e.length;if(null==t)return!r;t=en(t);while(r--){var i=e[r],u=n[i],a=t[i];if(a===o&&!(i in t)||!u(a))return!1}return!0}function bi(t,n,e){if("function"!=typeof t)throw new un(f);return ka((function(){t.apply(o,e)}),n)}function wi(t,n,e,r){var i=-1,o=Ee,u=!0,c=t.length,f=[],l=n.length;if(!c)return f;e&&(n=Ce(n,Ze(e))),r?(o=Ae,u=!1):n.length>=a&&(o=Je,u=!1,n=new Kr(n));t:while(++ii?0:i+e),r=r===o||r>i?i:Kl(r),r<0&&(r+=i),r=e>r?0:Zl(r);while(e0&&e(a)?n>1?Ci(a,n-1,e,r,i):Re(i,a):r||(i[i.length]=a)}return i}var Ri=su(),Si=su(!0);function Di(t,n){return t&&Ri(t,n,Os)}function Ii(t,n){return t&&Si(t,n,Os)}function Li(t,n){return ke(n,(function(n){return xl(t[n])}))}function Ui(t,n){n=Vo(n,t);var e=0,r=n.length;while(null!=t&&en}function zi(t,n){return null!=t&&pn.call(t,n)}function Bi(t,n){return null!=t&&n in en(t)}function Mi(t,n,e){return t>=Nn(n,e)&&t<$n(n,e)}function $i(t,n,r){var i=r?Ae:Ee,u=t[0].length,a=t.length,c=a,f=e(a),l=1/0,s=[];while(c--){var p=t[c];c&&n&&(p=Ce(p,Ze(n))),l=Nn(p.length,l),f[c]=!r&&(n||u>=120&&p.length>=120)?new Kr(c&&p):o}p=t[0];var h=-1,v=f[0];t:while(++h-1)a!==t&&En.call(a,c,1),En.call(t,c,1)}return t}function _o(t,n){var e=t?n.length:0,r=e-1;while(e--){var i=n[e];if(e==r||i!==o){var o=i;ua(i)?En.call(t,i,1):To(t,i)}}return t}function mo(t,n){return t+Pn(Yn()*(n-t+1))}function yo(t,n,r,i){var o=-1,u=$n(Un((n-t)/(r||1)),0),a=e(u);while(u--)a[i?u:++o]=t,t+=r;return a}function bo(t,n){var e="";if(!t||n<1||n>W)return e;do{n%2&&(e+=t),n=Pn(n/2),n&&(t+=t)}while(n);return e}function wo(t,n){return Ea(ba(t,n,Dp),t+"")}function xo(t){return oi(Ns(t))}function Oo(t,n){var e=Ns(t);return Ra(e,gi(n,0,e.length))}function jo(t,n,e,r){if(!kl(t))return t;n=Vo(n,t);var i=-1,u=n.length,a=u-1,c=t;while(null!=c&&++io?0:o+n),r=r>o?o:r,r<0&&(r+=o),o=n>r?0:r-n>>>0,n>>>=0;var u=e(o);while(++i>>1,u=t[o];null!==u&&!Ml(u)&&(e?u<=n:u=a){var l=n?null:Ru(t);if(l)return pr(l);u=!1,i=Je,f=new Kr}else f=n?[]:c;t:while(++r=r?t:Co(t,n,e)}var Yo=Dn||function(t){return ce.clearTimeout(t)};function Xo(t,n){if(n)return t.slice();var e=t.length,r=xn?xn(e):new t.constructor(e);return t.copy(r),r}function Ko(t){var n=new t.constructor(t.byteLength);return new wn(n).set(new wn(t)),n}function Zo(t,n){var e=n?Ko(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}function Go(t){var n=new t.constructor(t.source,Yt.exec(t));return n.lastIndex=t.lastIndex,n}function Jo(t){return vr?en(vr.call(t)):{}}function Qo(t,n){var e=n?Ko(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}function tu(t,n){if(t!==n){var e=t!==o,r=null===t,i=t===t,u=Ml(t),a=n!==o,c=null===n,f=n===n,l=Ml(n);if(!c&&!l&&!u&&t>n||u&&a&&f&&!c&&!l||r&&a&&f||!e&&f||!i)return 1;if(!r&&!u&&!l&&t=a)return c;var f=e[r];return c*("desc"==f?-1:1)}}return t.index-n.index}function eu(t,n,r,i){var o=-1,u=t.length,a=r.length,c=-1,f=n.length,l=$n(u-a,0),s=e(f+l),p=!i;while(++c1?e[i-1]:o,a=i>2?e[2]:o;u=t.length>3&&"function"==typeof u?(i--,u):o,a&&aa(e[0],e[1],a)&&(u=i<3?o:u,i=1),n=en(n);while(++r-1?i[u?n[a]:a]:o}}function mu(t){return zu((function(n){var e=n.length,r=e,i=Er.prototype.thru;t&&n.reverse();while(r--){var u=n[r];if("function"!=typeof u)throw new un(f);if(i&&!a&&"wrapper"==Nu(u))var a=new Er([],!0)}r=a?r:e;while(++r1&&y.reverse(),p&&lc))return!1;var l=u.get(t),s=u.get(n);if(l&&s)return l==n&&s==t;var p=-1,h=!0,v=e&m?new Kr:o;u.set(t,n),u.set(n,t);while(++p1?"& ":"")+n[r],n=n.join(e>2?", ":" "),t.replace(Mt,"{\n/* [wrapped with "+n+"] */\n")}function oa(t){return fl(t)||cl(t)||!!(An&&t&&t[An])}function ua(t,n){var e=typeof t;return n=null==n?W:n,!!n&&("number"==e||"symbol"!=e&&Jt.test(t))&&t>-1&&t%1==0&&t0){if(++n>=D)return arguments[0]}else n=0;return t.apply(o,arguments)}}function Ra(t,n){var e=-1,r=t.length,i=r-1;n=n===o?r:n;while(++e1?t[n-1]:o;return e="function"==typeof e?(t.pop(),e):o,Tc(t,e)}));function qc(t){var n=wr(t);return n.__chain__=!0,n}function Hc(t,n){return n(t),t}function Yc(t,n){return n(t)}var Xc=zu((function(t){var n=t.length,e=n?t[0]:0,r=this.__wrapped__,i=function(n){return di(n,t)};return!(n>1||this.__actions__.length)&&r instanceof Ar&&ua(e)?(r=r.slice(e,+e+(n?1:0)),r.__actions__.push({func:Yc,args:[i],thisArg:o}),new Er(r,this.__chain__).thru((function(t){return n&&!t.length&&t.push(o),t}))):this.thru(i)}));function Kc(){return qc(this)}function Zc(){return new Er(this.value(),this.__chain__)}function Gc(){this.__values__===o&&(this.__values__=Yl(this.value()));var t=this.__index__>=this.__values__.length,n=t?o:this.__values__[this.__index__++];return{done:t,value:n}}function Jc(){return this}function Qc(t){var n,e=this;while(e instanceof kr){var r=Ua(e);r.__index__=0,r.__values__=o,n?i.__wrapped__=r:n=r;var i=r;e=e.__wrapped__}return i.__wrapped__=t,n}function tf(){var t=this.__wrapped__;if(t instanceof Ar){var n=t;return this.__actions__.length&&(n=new Ar(this)),n=n.reverse(),n.__actions__.push({func:Yc,args:[vc],thisArg:o}),new Er(n,this.__chain__)}return this.thru(vc)}function nf(){return Bo(this.__wrapped__,this.__actions__)}var ef=cu((function(t,n,e){pn.call(t,e)?++t[e]:vi(t,e,1)}));function rf(t,n,e){var r=fl(t)?je:ji;return e&&aa(t,n,e)&&(n=o),r(t,Vu(n,3))}function of(t,n){var e=fl(t)?ke:Ai;return e(t,Vu(n,3))}var uf=_u(Ha),af=_u(Ya);function cf(t,n){return Ci(_f(t,n),1)}function ff(t,n){return Ci(_f(t,n),T)}function lf(t,n,e){return e=e===o?1:Kl(e),Ci(_f(t,n),e)}function sf(t,n){var e=fl(t)?xe:xi;return e(t,Vu(n,3))}function pf(t,n){var e=fl(t)?Oe:Oi;return e(t,Vu(n,3))}var hf=cu((function(t,n,e){pn.call(t,e)?t[e].push(n):vi(t,e,[n])}));function vf(t,n,e,r){t=sl(t)?t:Ns(t),e=e&&!r?Kl(e):0;var i=t.length;return e<0&&(e=$n(i+e,0)),Bl(t)?e<=i&&t.indexOf(n,e)>-1:!!i&&ze(t,n,e)>-1}var df=wo((function(t,n,r){var i=-1,o="function"==typeof n,u=sl(t)?e(t.length):[];return xi(t,(function(t){u[++i]=o?be(n,t,r):Fi(t,n,r)})),u})),gf=cu((function(t,n,e){vi(t,e,n)}));function _f(t,n){var e=fl(t)?Ce:oo;return e(t,Vu(n,3))}function mf(t,n,e,r){return null==t?[]:(fl(n)||(n=null==n?[]:[n]),e=r?o:e,fl(e)||(e=null==e?[]:[e]),so(t,n,e))}var yf=cu((function(t,n,e){t[e?0:1].push(n)}),(function(){return[[],[]]}));function bf(t,n,e){var r=fl(t)?Se:Ve,i=arguments.length<3;return r(t,Vu(n,4),e,i,xi)}function wf(t,n,e){var r=fl(t)?De:Ve,i=arguments.length<3;return r(t,Vu(n,4),e,i,Oi)}function xf(t,n){var e=fl(t)?ke:Ai;return e(t,Nf(Vu(n,3)))}function Of(t){var n=fl(t)?oi:xo;return n(t)}function jf(t,n,e){n=(e?aa(t,n,e):n===o)?1:Kl(n);var r=fl(t)?ui:Oo;return r(t,n)}function kf(t){var n=fl(t)?ai:Ao;return n(t)}function Ef(t){if(null==t)return 0;if(sl(t))return Bl(t)?gr(t):t.length;var n=Gu(t);return n==Q||n==ut?t.size:eo(t).length}function Af(t,n,e){var r=fl(t)?Ie:Ro;return e&&aa(t,n,e)&&(n=o),r(t,Vu(n,3))}var Cf=wo((function(t,n){if(null==t)return[];var e=n.length;return e>1&&aa(t,n[0],n[1])?n=[]:e>2&&aa(n[0],n[1],n[2])&&(n=[n[0]]),so(t,Ci(n,1),[])})),Rf=In||function(){return ce.Date.now()};function Sf(t,n){if("function"!=typeof n)throw new un(f);return t=Kl(t),function(){if(--t<1)return n.apply(this,arguments)}}function Df(t,n,e){return n=e?o:n,n=t&&null==n?t.length:n,Du(t,E,o,o,o,o,n)}function If(t,n){var e;if("function"!=typeof n)throw new un(f);return t=Kl(t),function(){return--t>0&&(e=n.apply(this,arguments)),t<=1&&(n=o),e}}var Lf=wo((function(t,n,e){var r=y;if(e.length){var i=sr(e,Fu(Lf));r|=j}return Du(t,r,n,e,i)})),Uf=wo((function(t,n,e){var r=y|b;if(e.length){var i=sr(e,Fu(Uf));r|=j}return Du(n,r,t,e,i)}));function Pf(t,n,e){n=e?o:n;var r=Du(t,x,o,o,o,o,o,n);return r.placeholder=Pf.placeholder,r}function Tf(t,n,e){n=e?o:n;var r=Du(t,O,o,o,o,o,o,n);return r.placeholder=Tf.placeholder,r}function Wf(t,n,e){var r,i,u,a,c,l,s=0,p=!1,h=!1,v=!0;if("function"!=typeof t)throw new un(f);function d(n){var e=r,u=i;return r=i=o,s=n,a=t.apply(u,e),a}function g(t){return s=t,c=ka(y,n),p?d(t):a}function _(t){var e=t-l,r=t-s,i=n-e;return h?Nn(i,u-r):i}function m(t){var e=t-l,r=t-s;return l===o||e>=n||e<0||h&&r>=u}function y(){var t=Rf();if(m(t))return b(t);c=ka(y,_(t))}function b(t){return c=o,v&&r?d(t):(r=i=o,a)}function w(){c!==o&&Yo(c),s=0,r=l=i=c=o}function x(){return c===o?a:b(Rf())}function O(){var t=Rf(),e=m(t);if(r=arguments,i=this,l=t,e){if(c===o)return g(l);if(h)return Yo(c),c=ka(y,n),d(l)}return c===o&&(c=ka(y,n)),a}return n=Gl(n)||0,kl(e)&&(p=!!e.leading,h="maxWait"in e,u=h?$n(Gl(e.maxWait)||0,n):u,v="trailing"in e?!!e.trailing:v),O.cancel=w,O.flush=x,O}var zf=wo((function(t,n){return bi(t,1,n)})),Bf=wo((function(t,n,e){return bi(t,Gl(n)||0,e)}));function Mf(t){return Du(t,C)}function $f(t,n){if("function"!=typeof t||null!=n&&"function"!=typeof n)throw new un(f);var e=function(){var r=arguments,i=n?n.apply(this,r):r[0],o=e.cache;if(o.has(i))return o.get(i);var u=t.apply(this,r);return e.cache=o.set(i,u)||o,u};return e.cache=new($f.Cache||Fr),e}function Nf(t){if("function"!=typeof t)throw new un(f);return function(){var n=arguments;switch(n.length){case 0:return!t.call(this);case 1:return!t.call(this,n[0]);case 2:return!t.call(this,n[0],n[1]);case 3:return!t.call(this,n[0],n[1],n[2])}return!t.apply(this,n)}}function Ff(t){return If(2,t)}$f.Cache=Fr;var Vf=qo((function(t,n){n=1==n.length&&fl(n[0])?Ce(n[0],Ze(Vu())):Ce(Ci(n,1),Ze(Vu()));var e=n.length;return wo((function(r){var i=-1,o=Nn(r.length,e);while(++i=n})),cl=Vi(function(){return arguments}())?Vi:function(t){return El(t)&&pn.call(t,"callee")&&!kn.call(t,"callee")},fl=e.isArray,ll=ve?Ze(ve):qi;function sl(t){return null!=t&&jl(t.length)&&!xl(t)}function pl(t){return El(t)&&sl(t)}function hl(t){return!0===t||!1===t||El(t)&&Ti(t)==Y}var vl=Wn||Kp,dl=de?Ze(de):Hi;function gl(t){return El(t)&&1===t.nodeType&&!Pl(t)}function _l(t){if(null==t)return!0;if(sl(t)&&(fl(t)||"string"==typeof t||"function"==typeof t.splice||vl(t)||$l(t)||cl(t)))return!t.length;var n=Gu(t);if(n==Q||n==ut)return!t.size;if(ha(t))return!eo(t).length;for(var e in t)if(pn.call(t,e))return!1;return!0}function ml(t,n){return Yi(t,n)}function yl(t,n,e){e="function"==typeof e?e:o;var r=e?e(t,n):o;return r===o?Yi(t,n,o,e):!!r}function bl(t){if(!El(t))return!1;var n=Ti(t);return n==Z||n==K||"string"==typeof t.message&&"string"==typeof t.name&&!Pl(t)}function wl(t){return"number"==typeof t&&zn(t)}function xl(t){if(!kl(t))return!1;var n=Ti(t);return n==G||n==J||n==H||n==it}function Ol(t){return"number"==typeof t&&t==Kl(t)}function jl(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=W}function kl(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}function El(t){return null!=t&&"object"==typeof t}var Al=ge?Ze(ge):Ki;function Cl(t,n){return t===n||Zi(t,n,Hu(n))}function Rl(t,n,e){return e="function"==typeof e?e:o,Zi(t,n,Hu(n),e)}function Sl(t){return Ul(t)&&t!=+t}function Dl(t){if(pa(t))throw new i(c);return Gi(t)}function Il(t){return null===t}function Ll(t){return null==t}function Ul(t){return"number"==typeof t||El(t)&&Ti(t)==tt}function Pl(t){if(!El(t)||Ti(t)!=et)return!1;var n=On(t);if(null===n)return!0;var e=pn.call(n,"constructor")&&n.constructor;return"function"==typeof e&&e instanceof e&&sn.call(e)==gn}var Tl=_e?Ze(_e):Ji;function Wl(t){return Ol(t)&&t>=-W&&t<=W}var zl=me?Ze(me):Qi;function Bl(t){return"string"==typeof t||!fl(t)&&El(t)&&Ti(t)==at}function Ml(t){return"symbol"==typeof t||El(t)&&Ti(t)==ct}var $l=ye?Ze(ye):to;function Nl(t){return t===o}function Fl(t){return El(t)&&Gu(t)==lt}function Vl(t){return El(t)&&Ti(t)==st}var ql=Eu(io),Hl=Eu((function(t,n){return t<=n}));function Yl(t){if(!t)return[];if(sl(t))return Bl(t)?_r(t):iu(t);if(Cn&&t[Cn])return cr(t[Cn]());var n=Gu(t),e=n==Q?fr:n==ut?pr:Ns;return e(t)}function Xl(t){if(!t)return 0===t?t:0;if(t=Gl(t),t===T||t===-T){var n=t<0?-1:1;return n*z}return t===t?t:0}function Kl(t){var n=Xl(t),e=n%1;return n===n?e?n-e:n:0}function Zl(t){return t?gi(Kl(t),0,M):0}function Gl(t){if("number"==typeof t)return t;if(Ml(t))return B;if(kl(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=kl(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=Ke(t);var e=Kt.test(t);return e||Gt.test(t)?oe(t.slice(2),e?2:8):Xt.test(t)?B:+t}function Jl(t){return ou(t,js(t))}function Ql(t){return t?gi(Kl(t),-W,W):0===t?t:0}function ts(t){return null==t?"":Uo(t)}var ns=fu((function(t,n){if(ha(n)||sl(n))ou(n,Os(n),t);else for(var e in n)pn.call(n,e)&&fi(t,e,n[e])})),es=fu((function(t,n){ou(n,js(n),t)})),rs=fu((function(t,n,e,r){ou(n,js(n),t,r)})),is=fu((function(t,n,e,r){ou(n,Os(n),t,r)})),os=zu(di);function us(t,n){var e=Or(t);return null==n?e:pi(e,n)}var as=wo((function(t,n){t=en(t);var e=-1,r=n.length,i=r>2?n[2]:o;i&&aa(n[0],n[1],i)&&(r=1);while(++e1),n})),ou(t,Mu(t),e),r&&(e=_i(e,v|d|g,Uu));var i=n.length;while(i--)To(e,n[i]);return e}));function Ss(t,n){return Is(t,Nf(Vu(n)))}var Ds=zu((function(t,n){return null==t?{}:po(t,n)}));function Is(t,n){if(null==t)return{};var e=Ce(Mu(t),(function(t){return[t]}));return n=Vu(n),ho(t,e,(function(t,e){return n(t,e[0])}))}function Ls(t,n,e){n=Vo(n,t);var r=-1,i=n.length;i||(i=1,t=o);while(++rn){var r=t;t=n,n=r}if(e||t%1||n%1){var i=Yn();return Nn(t+i*(n-t+ie("1e-"+((i+"").length-1))),n)}return mo(t,n)}var Ys=vu((function(t,n,e){return n=n.toLowerCase(),t+(e?Xs(n):n)}));function Xs(t){return wp(ts(t).toLowerCase())}function Ks(t){return t=ts(t),t&&t.replace(Qt,er).replace(qn,"")}function Zs(t,n,e){t=ts(t),n=Uo(n);var r=t.length;e=e===o?r:gi(Kl(e),0,r);var i=e;return e-=n.length,e>=0&&t.slice(e,i)==n}function Gs(t){return t=ts(t),t&&Rt.test(t)?t.replace(At,rr):t}function Js(t){return t=ts(t),t&&Wt.test(t)?t.replace(Tt,"\\$&"):t}var Qs=vu((function(t,n,e){return t+(e?"-":"")+n.toLowerCase()})),tp=vu((function(t,n,e){return t+(e?" ":"")+n.toLowerCase()})),np=hu("toLowerCase");function ep(t,n,e){t=ts(t),n=Kl(n);var r=n?gr(t):0;if(!n||r>=n)return t;var i=(n-r)/2;return Ou(Pn(i),e)+t+Ou(Un(i),e)}function rp(t,n,e){t=ts(t),n=Kl(n);var r=n?gr(t):0;return n&&r>>0,e?(t=ts(t),t&&("string"==typeof n||null!=n&&!Tl(n))&&(n=Uo(n),!n&&ur(t))?Ho(_r(t),0,e):t.split(n,e)):[]}var lp=vu((function(t,n,e){return t+(e?" ":"")+wp(n)}));function sp(t,n,e){return t=ts(t),e=null==e?0:gi(Kl(e),0,t.length),n=Uo(n),t.slice(e,e+n.length)==n}function pp(t,n,e){var r=wr.templateSettings;e&&aa(t,n,e)&&(n=o),t=ts(t),n=rs({},n,r,Iu);var u,a,c=rs({},n.imports,r.imports,Iu),f=Os(c),s=Ge(c,f),p=0,h=n.interpolate||tn,v="__p += '",d=rn((n.escape||tn).source+"|"+h.source+"|"+(h===It?Ht:tn).source+"|"+(n.evaluate||tn).source+"|$","g"),g="//# sourceURL="+(pn.call(n,"sourceURL")?(n.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Gn+"]")+"\n";t.replace(d,(function(n,e,r,i,o,c){return r||(r=i),v+=t.slice(p,c).replace(nn,ir),e&&(u=!0,v+="' +\n__e("+e+") +\n'"),o&&(a=!0,v+="';\n"+o+";\n__p += '"),r&&(v+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),p=c+n.length,n})),v+="';\n";var _=pn.call(n,"variable")&&n.variable;if(_){if(Vt.test(_))throw new i(l)}else v="with (obj) {\n"+v+"\n}\n";v=(a?v.replace(Ot,""):v).replace(jt,"$1").replace(kt,"$1;"),v="function("+(_||"obj")+") {\n"+(_?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(u?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+v+"return __p\n}";var m=Op((function(){return Bt(f,g+"return "+v).apply(o,s)}));if(m.source=v,bl(m))throw m;return m}function hp(t){return ts(t).toLowerCase()}function vp(t){return ts(t).toUpperCase()}function dp(t,n,e){if(t=ts(t),t&&(e||n===o))return Ke(t);if(!t||!(n=Uo(n)))return t;var r=_r(t),i=_r(n),u=Qe(r,i),a=tr(r,i)+1;return Ho(r,u,a).join("")}function gp(t,n,e){if(t=ts(t),t&&(e||n===o))return t.slice(0,mr(t)+1);if(!t||!(n=Uo(n)))return t;var r=_r(t),i=tr(r,_r(n))+1;return Ho(r,0,i).join("")}function _p(t,n,e){if(t=ts(t),t&&(e||n===o))return t.replace(zt,"");if(!t||!(n=Uo(n)))return t;var r=_r(t),i=Qe(r,_r(n));return Ho(r,i).join("")}function mp(t,n){var e=R,r=S;if(kl(n)){var i="separator"in n?n.separator:i;e="length"in n?Kl(n.length):e,r="omission"in n?Uo(n.omission):r}t=ts(t);var u=t.length;if(ur(t)){var a=_r(t);u=a.length}if(e>=u)return t;var c=e-gr(r);if(c<1)return r;var f=a?Ho(a,0,c).join(""):t.slice(0,c);if(i===o)return f+r;if(a&&(c+=f.length-c),Tl(i)){if(t.slice(c).search(i)){var l,s=f;i.global||(i=rn(i.source,ts(Yt.exec(i))+"g")),i.lastIndex=0;while(l=i.exec(s))var p=l.index;f=f.slice(0,p===o?c:p)}}else if(t.indexOf(Uo(i),c)!=c){var h=f.lastIndexOf(i);h>-1&&(f=f.slice(0,h))}return f+r}function yp(t){return t=ts(t),t&&Ct.test(t)?t.replace(Et,yr):t}var bp=vu((function(t,n,e){return t+(e?" ":"")+n.toUpperCase()})),wp=hu("toUpperCase");function xp(t,n,e){return t=ts(t),n=e?o:n,n===o?ar(t)?xr(t):Pe(t):t.match(n)||[]}var Op=wo((function(t,n){try{return be(t,o,n)}catch(e){return bl(e)?e:new i(e)}})),jp=zu((function(t,n){return xe(n,(function(n){n=Da(n),vi(t,n,Lf(t[n],t))})),t}));function kp(t){var n=null==t?0:t.length,e=Vu();return t=n?Ce(t,(function(t){if("function"!=typeof t[1])throw new un(f);return[e(t[0]),t[1]]})):[],wo((function(e){var r=-1;while(++rW)return[];var e=M,r=Nn(t,M);n=Vu(n),t-=M;var i=Ye(r,n);while(++e0||n<0)?new Ar(e):(t<0?e=e.takeRight(-t):t&&(e=e.drop(t)),n!==o&&(n=Kl(n),e=n<0?e.dropRight(-n):e.take(n-t)),e)},Ar.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Ar.prototype.toArray=function(){return this.take(M)},Di(Ar.prototype,(function(t,n){var e=/^(?:filter|find|map|reject)|While$/.test(n),r=/^(?:head|last)$/.test(n),i=wr[r?"take"+("last"==n?"Right":""):n],u=r||/^find/.test(n);i&&(wr.prototype[n]=function(){var n=this.__wrapped__,a=r?[1]:arguments,c=n instanceof Ar,f=a[0],l=c||fl(n),s=function(t){var n=i.apply(wr,Re([t],a));return r&&p?n[0]:n};l&&e&&"function"==typeof f&&1!=f.length&&(c=l=!1);var p=this.__chain__,h=!!this.__actions__.length,v=u&&!p,d=c&&!h;if(!u&&l){n=d?n:new Ar(this);var g=t.apply(n,a);return g.__actions__.push({func:Yc,args:[s],thisArg:o}),new Er(g,p)}return v&&d?t.apply(this,a):(g=this.thru(s),v?r?g.value()[0]:g.value():g)})})),xe(["pop","push","shift","sort","splice","unshift"],(function(t){var n=an[t],e=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);wr.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return n.apply(fl(i)?i:[],t)}return this[e]((function(e){return n.apply(fl(e)?e:[],t)}))}})),Di(Ar.prototype,(function(t,n){var e=wr[n];if(e){var r=e.name+"";pn.call(fe,r)||(fe[r]=[]),fe[r].push({name:n,func:e})}})),fe[yu(o,b).name]=[{name:"wrapper",func:o}],Ar.prototype.clone=Cr,Ar.prototype.reverse=Rr,Ar.prototype.value=Sr,wr.prototype.at=Xc,wr.prototype.chain=Kc,wr.prototype.commit=Zc,wr.prototype.next=Gc,wr.prototype.plant=Qc,wr.prototype.reverse=tf,wr.prototype.toJSON=wr.prototype.valueOf=wr.prototype.value=nf,wr.prototype.first=wr.prototype.head,Cn&&(wr.prototype[Cn]=Jc),wr},jr=Or();ce._=jr,i=function(){return jr}.call(n,e,n,r),i===o||(r.exports=i)}).call(this)}).call(this,e("c8ba"),e("62e4")(t))},"2f87":function(t,n,e){},"3a25":function(t,n,e){"use strict";e("b10a")},"4c7a":function(t,n,e){"use strict";e.r(n);var r=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("section",{staticClass:"users"},[t.showModal?e("app-modal",{on:{close:function(n){t.showModal=!1,t.editUser=null}}},[e("add-user",{attrs:{"edit-user":t.editUser,"is-company-admin":t.isCompanyAdmin,companies:t.companies},on:{userChanged:t.onUserChanged}})],1):t._e(),e("h1",{staticClass:"section-header"},[t._v("Användare")]),e("div",{staticClass:"row justify-content-between mt-4"},[e("div",{staticClass:"row col-md-8"},[e("input-field",{staticClass:"col-md-3",attrs:{placeholder:"Sök ..."},on:{input:t.searchUsers},model:{value:t.search,callback:function(n){t.search=n},expression:"search"}}),t.isCompanyAdmin?t._e():e("v-select",{staticClass:"col-md-4 mt-2",attrs:{reduce:function(t){return t._id},options:t.companies,label:"name",placeholder:"Företag"},on:{input:t.searchUsers},model:{value:t.company,callback:function(n){t.company=n},expression:"company"}})],1),e("app-button",{staticClass:"btn--secondary mr-3",on:{click:function(n){t.showModal=!0}}},[t._v("Lägg till användare")])],1),e("div",{staticClass:"box box--outline mt-3"},[e("app-table",{attrs:{head:t.head}},t._l(t.users,(function(n,r){return e("tr",{key:r},[e("td",{staticClass:"link-cell",on:{click:function(e){return t.editRow(n)}}},[t._v(t._s(n.firstname+" "+n.lastname))]),e("td",[t._v(t._s(n.company.name))]),e("td",[t._v(t._s(n.username))]),e("td",[t._v(t._s(n.phone))])])})),0)],1),e("div",{staticClass:"d-flex justify-content-end mt-5"},[e("app-pagination",{attrs:{"current-page":t.currentPage,"total-pages":t.totalPages},on:{pageChanged:t.onPageChanged}})],1)],1)},i=[],o=e("1da1"),u=e("5530"),a=(e("96cf"),e("ac1f"),e("841c"),e("7db0"),e("b0c0"),e("aca0")),c=e("bc3a"),f=e.n(c),l={getUsers:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i={limit:t,skip:n?n-1:null,search:e,company:r};return f.a.get("/users",{params:i})},addUser:function(t){return f.a.post("/users",Object(u["a"])({},t))},editUser:function(t){return f.a.put("/users",Object(u["a"])({},t))},deleteUser:function(t){return f.a.delete("/users/".concat(t))}},s=e("0905"),p=e("5c40"),h=e("1954"),v=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{staticClass:"add-user"},[e("validation-observer",{ref:"userForm",scopedSlots:t._u([{key:"default",fn:function(n){var r=n.validated;return[e("h1",{staticClass:"section-header"},[t._v("Användarinformation")]),e("div",{staticClass:"row mt-4"},[e("validation-provider",{staticClass:"col-md-6",attrs:{rules:"required"},scopedSlots:t._u([{key:"default",fn:function(n){var i=n.invalid;return[e("input-field",{class:{error:i&&r},attrs:{label:"Förnamn*"},model:{value:t.form.firstname,callback:function(n){t.$set(t.form,"firstname",n)},expression:"form.firstname"}})]}}],null,!0)}),e("validation-provider",{staticClass:"col-md-6",attrs:{rules:"required"},scopedSlots:t._u([{key:"default",fn:function(n){var i=n.invalid;return[e("input-field",{class:{error:i&&r},attrs:{label:"Efternamn*"},model:{value:t.form.lastname,callback:function(n){t.$set(t.form,"lastname",n)},expression:"form.lastname"}})]}}],null,!0)}),e("validation-provider",{staticClass:"col-12 mt-4 mb-2",attrs:{rules:"required|email"},scopedSlots:t._u([{key:"default",fn:function(n){var i=n.invalid;return[e("input-field",{class:{error:i&&r},attrs:{disabled:!!t.editUser,label:"E-post*"},model:{value:t.form.email,callback:function(n){t.$set(t.form,"email",n)},expression:"form.email"}})]}}],null,!0)}),e("validation-provider",{staticClass:"col-8 mt-4"},[e("input-field",{attrs:{label:"Telefonnummer"},model:{value:t.form.phone,callback:function(n){t.$set(t.form,"phone",n)},expression:"form.phone"}})],1),e("div",{staticClass:"col-4 mt-4"},[e("input-field",{attrs:{label:"Körkortstyp"},model:{value:t.form.driverLicense,callback:function(n){t.$set(t.form,"driverLicense",n)},expression:"form.driverLicense"}})],1)],1),e("h1",{staticClass:"section-header mt-5"},[t._v("Roller & Fordonstyp")]),e("div",{staticClass:"box box--outline user-note mt-2"},[t._v(" Om administratören ska ha möjlighet att vara förare för ett eller flera fordon behöver du välja både Administratör och Användare under Roll. ")]),e("div",{staticClass:"row mt-4"},[t.isCompanyAdmin?t._e():e("validation-provider",{staticClass:"col-md-6 select-item",attrs:{rules:"required"},scopedSlots:t._u([{key:"default",fn:function(n){var i=n.invalid;return[e("label",[t._v("Företag*")]),e("v-select",{staticClass:"mt-2",class:{error:i&&r},attrs:{options:t.companies,reduce:function(t){return t._id},label:"name"},model:{value:t.form.company,callback:function(n){t.$set(t.form,"company",n)},expression:"form.company"}})]}}],null,!0)}),e("validation-provider",{staticClass:"col-md-6 select-item",attrs:{rules:"required"},scopedSlots:t._u([{key:"default",fn:function(n){var i=n.invalid;return[e("label",[t._v("Roll*")]),e("v-select",{staticClass:"mt-2",class:{error:i&&r},attrs:{disabled:!!t.editUser,roles:"",multiple:"",label:"translation",reduce:function(t){return t.key},options:t.roles},on:{input:t.roleLimiter},model:{value:t.form.roles,callback:function(n){t.$set(t.form,"roles",n)},expression:"form.roles"}})]}}],null,!0)})],1),t.showVehicles?e("h1",{staticClass:"section-header mt-4"},[t._v("Fordon")]):t._e(),t.showVehicles?e("div",{staticClass:"row mt-4 align-items-start"},[e("div",{staticClass:"col-md-6 select-item"},[e("label",[t._v("Fordon")]),e("v-select",{staticClass:"mt-2",attrs:{options:t.vehiclesForSelectedCompany,multiple:"",label:"licencePlate","append-to-body":"","calculate-position":t.withPopper},scopedSlots:t._u([{key:"no-options",fn:function(){return[t._v("Inga tillgängliga val.")]},proxy:!0}],null,!0),model:{value:t.form.vehicles,callback:function(n){t.$set(t.form,"vehicles",n)},expression:"form.vehicles"}})],1),t.form.vehicles.length>0?e("div",{staticClass:"col-md-6"},[e("div",{staticClass:"mb-3",staticStyle:{"font-weight":"600"}},[t._v("Välj fordonstyp")]),t._l(t.form.vehicles,(function(n,r){return e("div",{key:r},[e("div",{staticClass:"vehicle-title"},[t._v(t._s(n.licencePlate))]),e("div",{staticClass:"mt-1 mb-3"},[e("app-toggle",{attrs:{value:"private"===n.category,"left-value":"Förmånsbil","right-value":"Företagsbil"},on:{input:function(e){return t.changeVehicleCategory(n,e)}}})],1)])}))],2):t._e()]):t._e()]}}])}),t.form.vehicles.length>0?e("div",{staticClass:"box box--outline user-note mt-3"},[e("h2",[t._v("Vilken fordonstyp ska jag välja?")]),e("h3",{staticClass:"mb-1"},[t._v("Företagsbil")]),t._v(" Denna typ av fordon registrerar alla resor som "),e("b",[t._v("tjänsteresor")]),t._v(", både föraren och företagets administratörer kan se och exportera samtliga tjänsteresor. Endast föraren kan se och exportera eventuella privatresor. "),e("h3",{staticClass:"mb-1"},[t._v("Förmånsbil")]),t._v(" Denna typ av fordon registrerar alla resor som "),e("b",[t._v("privatresor")]),t._v(", både föraren och företagets administratörer kan se och exportera samtliga tjänsteresor. Endast föraren kan se och exportera sina privatresor. "),e("br"),e("br"),t._v(" Föraren kan alltid välja mellan tjänsteresa och privatresa i mobilappen eller vid inloggat läge på datorn. ")]):t._e(),e("div",{staticClass:"d-flex justify-content-end mt-5"},[t.editUser?e("app-button",{staticClass:"btn--red mr-2",on:{click:t.deleteUser}},[t._v("Radera")]):t._e(),e("app-button",{staticClass:"btn--secondary",attrs:{loading:t.loading},on:{click:t.addUser}},[t.editUser?[t._v("Spara")]:[t._v("Lägg till")]],2)],1)],1)},d=[],g=(e("159b"),e("4de4"),e("caad"),e("2532"),e("d81d"),e("bb26")),_=e("1fc2"),m=e("2ef0");function y(t){var n=t.getBoundingClientRect();return{width:n.width,height:n.height,top:n.top,right:n.right,bottom:n.bottom,left:n.left,x:n.left,y:n.top}}function b(t){if(null==t)return window;if("[object Window]"!==t.toString()){var n=t.ownerDocument;return n&&n.defaultView||window}return t}function w(t){var n=b(t),e=n.pageXOffset,r=n.pageYOffset;return{scrollLeft:e,scrollTop:r}}function x(t){var n=b(t).Element;return t instanceof n||t instanceof Element}function O(t){var n=b(t).HTMLElement;return t instanceof n||t instanceof HTMLElement}function j(t){if("undefined"===typeof ShadowRoot)return!1;var n=b(t).ShadowRoot;return t instanceof n||t instanceof ShadowRoot}function k(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function E(t){return t!==b(t)&&O(t)?k(t):w(t)}function A(t){return t?(t.nodeName||"").toLowerCase():null}function C(t){return((x(t)?t.ownerDocument:t.document)||window.document).documentElement}function R(t){return y(C(t)).left+w(t).scrollLeft}function S(t){return b(t).getComputedStyle(t)}function D(t){var n=S(t),e=n.overflow,r=n.overflowX,i=n.overflowY;return/auto|scroll|overlay|hidden/.test(e+i+r)}function I(t,n,e){void 0===e&&(e=!1);var r=C(n),i=y(t),o=O(n),u={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(o||!o&&!e)&&(("body"!==A(n)||D(r))&&(u=E(n)),O(n)?(a=y(n),a.x+=n.clientLeft,a.y+=n.clientTop):r&&(a.x=R(r))),{x:i.left+u.scrollLeft-a.x,y:i.top+u.scrollTop-a.y,width:i.width,height:i.height}}function L(t){var n=y(t),e=t.offsetWidth,r=t.offsetHeight;return Math.abs(n.width-e)<=1&&(e=n.width),Math.abs(n.height-r)<=1&&(r=n.height),{x:t.offsetLeft,y:t.offsetTop,width:e,height:r}}function U(t){return"html"===A(t)?t:t.assignedSlot||t.parentNode||(j(t)?t.host:null)||C(t)}function P(t){return["html","body","#document"].indexOf(A(t))>=0?t.ownerDocument.body:O(t)&&D(t)?t:P(U(t))}function T(t,n){var e;void 0===n&&(n=[]);var r=P(t),i=r===(null==(e=t.ownerDocument)?void 0:e.body),o=b(r),u=i?[o].concat(o.visualViewport||[],D(r)?r:[]):r,a=n.concat(u);return i?a:a.concat(T(U(u)))}function W(t){return["table","td","th"].indexOf(A(t))>=0}function z(t){return O(t)&&"fixed"!==S(t).position?t.offsetParent:null}function B(t){var n=-1!==navigator.userAgent.toLowerCase().indexOf("firefox"),e=-1!==navigator.userAgent.indexOf("Trident");if(e&&O(t)){var r=S(t);if("fixed"===r.position)return null}var i=U(t);while(O(i)&&["html","body"].indexOf(A(i))<0){var o=S(i);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||n&&"filter"===o.willChange||n&&o.filter&&"none"!==o.filter)return i;i=i.parentNode}return null}function M(t){var n=b(t),e=z(t);while(e&&W(e)&&"static"===S(e).position)e=z(e);return e&&("html"===A(e)||"body"===A(e)&&"static"===S(e).position)?n:e||B(t)||n}var $="top",N="bottom",F="right",V="left",q="auto",H=[$,N,F,V],Y="start",X="end",K="clippingParents",Z="viewport",G="popper",J="reference",Q=H.reduce((function(t,n){return t.concat([n+"-"+Y,n+"-"+X])}),[]),tt=[].concat(H,[q]).reduce((function(t,n){return t.concat([n,n+"-"+Y,n+"-"+X])}),[]),nt="beforeRead",et="read",rt="afterRead",it="beforeMain",ot="main",ut="afterMain",at="beforeWrite",ct="write",ft="afterWrite",lt=[nt,et,rt,it,ot,ut,at,ct,ft];function st(t){var n=new Map,e=new Set,r=[];function i(t){e.add(t.name);var o=[].concat(t.requires||[],t.requiresIfExists||[]);o.forEach((function(t){if(!e.has(t)){var r=n.get(t);r&&i(r)}})),r.push(t)}return t.forEach((function(t){n.set(t.name,t)})),t.forEach((function(t){e.has(t.name)||i(t)})),r}function pt(t){var n=st(t);return lt.reduce((function(t,e){return t.concat(n.filter((function(t){return t.phase===e})))}),[])}function ht(t){var n;return function(){return n||(n=new Promise((function(e){Promise.resolve().then((function(){n=void 0,e(t())}))}))),n}}function vt(t){var n=t.reduce((function(t,n){var e=t[n.name];return t[n.name]=e?Object.assign({},e,n,{options:Object.assign({},e.options,n.options),data:Object.assign({},e.data,n.data)}):n,t}),{});return Object.keys(n).map((function(t){return n[t]}))}var dt={placement:"bottom",modifiers:[],strategy:"absolute"};function gt(){for(var t=arguments.length,n=new Array(t),e=0;e=0?"x":"y"}function jt(t){var n,e=t.reference,r=t.element,i=t.placement,o=i?wt(i):null,u=i?xt(i):null,a=e.x+e.width/2-r.width/2,c=e.y+e.height/2-r.height/2;switch(o){case $:n={x:a,y:e.y-r.height};break;case N:n={x:a,y:e.y+e.height};break;case F:n={x:e.x+e.width,y:c};break;case V:n={x:e.x-r.width,y:c};break;default:n={x:e.x,y:e.y}}var f=o?Ot(o):null;if(null!=f){var l="y"===f?"height":"width";switch(u){case Y:n[f]=n[f]-(e[l]/2-r[l]/2);break;case X:n[f]=n[f]+(e[l]/2-r[l]/2);break;default:}}return n}function kt(t){var n=t.state,e=t.name;n.modifiersData[e]=jt({reference:n.rects.reference,element:n.rects.popper,strategy:"absolute",placement:n.placement})}var Et={name:"popperOffsets",enabled:!0,phase:"read",fn:kt,data:{}},At=Math.max,Ct=Math.min,Rt=Math.round,St={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Dt(t){var n=t.x,e=t.y,r=window,i=r.devicePixelRatio||1;return{x:Rt(Rt(n*i)/i)||0,y:Rt(Rt(e*i)/i)||0}}function It(t){var n,e=t.popper,r=t.popperRect,i=t.placement,o=t.offsets,u=t.position,a=t.gpuAcceleration,c=t.adaptive,f=t.roundOffsets,l=!0===f?Dt(o):"function"===typeof f?f(o):o,s=l.x,p=void 0===s?0:s,h=l.y,v=void 0===h?0:h,d=o.hasOwnProperty("x"),g=o.hasOwnProperty("y"),_=V,m=$,y=window;if(c){var w=M(e),x="clientHeight",O="clientWidth";w===b(e)&&(w=C(e),"static"!==S(w).position&&(x="scrollHeight",O="scrollWidth")),w=w,i===$&&(m=N,v-=w[x]-r.height,v*=a?1:-1),i===V&&(_=F,p-=w[O]-r.width,p*=a?1:-1)}var j,k=Object.assign({position:u},c&&St);return a?Object.assign({},k,(j={},j[m]=g?"0":"",j[_]=d?"0":"",j.transform=(y.devicePixelRatio||1)<2?"translate("+p+"px, "+v+"px)":"translate3d("+p+"px, "+v+"px, 0)",j)):Object.assign({},k,(n={},n[m]=g?v+"px":"",n[_]=d?p+"px":"",n.transform="",n))}function Lt(t){var n=t.state,e=t.options,r=e.gpuAcceleration,i=void 0===r||r,o=e.adaptive,u=void 0===o||o,a=e.roundOffsets,c=void 0===a||a,f={placement:wt(n.placement),popper:n.elements.popper,popperRect:n.rects.popper,gpuAcceleration:i};null!=n.modifiersData.popperOffsets&&(n.styles.popper=Object.assign({},n.styles.popper,It(Object.assign({},f,{offsets:n.modifiersData.popperOffsets,position:n.options.strategy,adaptive:u,roundOffsets:c})))),null!=n.modifiersData.arrow&&(n.styles.arrow=Object.assign({},n.styles.arrow,It(Object.assign({},f,{offsets:n.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-placement":n.placement})}var Ut={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Lt,data:{}};function Pt(t){var n=t.state;Object.keys(n.elements).forEach((function(t){var e=n.styles[t]||{},r=n.attributes[t]||{},i=n.elements[t];O(i)&&A(i)&&(Object.assign(i.style,e),Object.keys(r).forEach((function(t){var n=r[t];!1===n?i.removeAttribute(t):i.setAttribute(t,!0===n?"":n)})))}))}function Tt(t){var n=t.state,e={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(n.elements.popper.style,e.popper),n.styles=e,n.elements.arrow&&Object.assign(n.elements.arrow.style,e.arrow),function(){Object.keys(n.elements).forEach((function(t){var r=n.elements[t],i=n.attributes[t]||{},o=Object.keys(n.styles.hasOwnProperty(t)?n.styles[t]:e[t]),u=o.reduce((function(t,n){return t[n]="",t}),{});O(r)&&A(r)&&(Object.assign(r.style,u),Object.keys(i).forEach((function(t){r.removeAttribute(t)})))}))}}var Wt={name:"applyStyles",enabled:!0,phase:"write",fn:Pt,effect:Tt,requires:["computeStyles"]};function zt(t,n,e){var r=wt(t),i=[V,$].indexOf(r)>=0?-1:1,o="function"===typeof e?e(Object.assign({},n,{placement:t})):e,u=o[0],a=o[1];return u=u||0,a=(a||0)*i,[V,F].indexOf(r)>=0?{x:a,y:u}:{x:u,y:a}}function Bt(t){var n=t.state,e=t.options,r=t.name,i=e.offset,o=void 0===i?[0,0]:i,u=tt.reduce((function(t,e){return t[e]=zt(e,n.rects,o),t}),{}),a=u[n.placement],c=a.x,f=a.y;null!=n.modifiersData.popperOffsets&&(n.modifiersData.popperOffsets.x+=c,n.modifiersData.popperOffsets.y+=f),n.modifiersData[r]=u}var Mt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Bt},$t={left:"right",right:"left",bottom:"top",top:"bottom"};function Nt(t){return t.replace(/left|right|bottom|top/g,(function(t){return $t[t]}))}var Ft={start:"end",end:"start"};function Vt(t){return t.replace(/start|end/g,(function(t){return Ft[t]}))}function qt(t){var n=b(t),e=C(t),r=n.visualViewport,i=e.clientWidth,o=e.clientHeight,u=0,a=0;return r&&(i=r.width,o=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(u=r.offsetLeft,a=r.offsetTop)),{width:i,height:o,x:u+R(t),y:a}}function Ht(t){var n,e=C(t),r=w(t),i=null==(n=t.ownerDocument)?void 0:n.body,o=At(e.scrollWidth,e.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),u=At(e.scrollHeight,e.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+R(t),c=-r.scrollTop;return"rtl"===S(i||e).direction&&(a+=At(e.clientWidth,i?i.clientWidth:0)-o),{width:o,height:u,x:a,y:c}}function Yt(t,n){var e=n.getRootNode&&n.getRootNode();if(t.contains(n))return!0;if(e&&j(e)){var r=n;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Xt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Kt(t){var n=y(t);return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function Zt(t,n){return n===Z?Xt(qt(t)):O(n)?Kt(n):Xt(Ht(C(t)))}function Gt(t){var n=T(U(t)),e=["absolute","fixed"].indexOf(S(t).position)>=0,r=e&&O(t)?M(t):t;return x(r)?n.filter((function(t){return x(t)&&Yt(t,r)&&"body"!==A(t)})):[]}function Jt(t,n,e){var r="clippingParents"===n?Gt(t):[].concat(n),i=[].concat(r,[e]),o=i[0],u=i.reduce((function(n,e){var r=Zt(t,e);return n.top=At(r.top,n.top),n.right=Ct(r.right,n.right),n.bottom=Ct(r.bottom,n.bottom),n.left=At(r.left,n.left),n}),Zt(t,o));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}function Qt(){return{top:0,right:0,bottom:0,left:0}}function tn(t){return Object.assign({},Qt(),t)}function nn(t,n){return n.reduce((function(n,e){return n[e]=t,n}),{})}function en(t,n){void 0===n&&(n={});var e=n,r=e.placement,i=void 0===r?t.placement:r,o=e.boundary,u=void 0===o?K:o,a=e.rootBoundary,c=void 0===a?Z:a,f=e.elementContext,l=void 0===f?G:f,s=e.altBoundary,p=void 0!==s&&s,h=e.padding,v=void 0===h?0:h,d=tn("number"!==typeof v?v:nn(v,H)),g=l===G?J:G,_=t.elements.reference,m=t.rects.popper,b=t.elements[p?g:l],w=Jt(x(b)?b:b.contextElement||C(t.elements.popper),u,c),O=y(_),j=jt({reference:O,element:m,strategy:"absolute",placement:i}),k=Xt(Object.assign({},m,j)),E=l===G?k:O,A={top:w.top-E.top+d.top,bottom:E.bottom-w.bottom+d.bottom,left:w.left-E.left+d.left,right:E.right-w.right+d.right},R=t.modifiersData.offset;if(l===G&&R){var S=R[i];Object.keys(A).forEach((function(t){var n=[F,N].indexOf(t)>=0?1:-1,e=[$,N].indexOf(t)>=0?"y":"x";A[t]+=S[e]*n}))}return A}function rn(t,n){void 0===n&&(n={});var e=n,r=e.placement,i=e.boundary,o=e.rootBoundary,u=e.padding,a=e.flipVariations,c=e.allowedAutoPlacements,f=void 0===c?tt:c,l=xt(r),s=l?a?Q:Q.filter((function(t){return xt(t)===l})):H,p=s.filter((function(t){return f.indexOf(t)>=0}));0===p.length&&(p=s);var h=p.reduce((function(n,e){return n[e]=en(t,{placement:e,boundary:i,rootBoundary:o,padding:u})[wt(e)],n}),{});return Object.keys(h).sort((function(t,n){return h[t]-h[n]}))}function on(t){if(wt(t)===q)return[];var n=Nt(t);return[Vt(t),n,Vt(n)]}function un(t){var n=t.state,e=t.options,r=t.name;if(!n.modifiersData[r]._skip){for(var i=e.mainAxis,o=void 0===i||i,u=e.altAxis,a=void 0===u||u,c=e.fallbackPlacements,f=e.padding,l=e.boundary,s=e.rootBoundary,p=e.altBoundary,h=e.flipVariations,v=void 0===h||h,d=e.allowedAutoPlacements,g=n.options.placement,_=wt(g),m=_===g,y=c||(m||!v?[Nt(g)]:on(g)),b=[g].concat(y).reduce((function(t,e){return t.concat(wt(e)===q?rn(n,{placement:e,boundary:l,rootBoundary:s,padding:f,flipVariations:v,allowedAutoPlacements:d}):e)}),[]),w=n.rects.reference,x=n.rects.popper,O=new Map,j=!0,k=b[0],E=0;E=0,D=S?"width":"height",I=en(n,{placement:A,boundary:l,rootBoundary:s,altBoundary:p,padding:f}),L=S?R?F:V:R?N:$;w[D]>x[D]&&(L=Nt(L));var U=Nt(L),P=[];if(o&&P.push(I[C]<=0),a&&P.push(I[L]<=0,I[U]<=0),P.every((function(t){return t}))){k=A,j=!1;break}O.set(A,P)}if(j)for(var T=v?3:1,W=function(t){var n=b.find((function(n){var e=O.get(n);if(e)return e.slice(0,t).every((function(t){return t}))}));if(n)return k=n,"break"},z=T;z>0;z--){var B=W(z);if("break"===B)break}n.placement!==k&&(n.modifiersData[r]._skip=!0,n.placement=k,n.reset=!0)}}var an={name:"flip",enabled:!0,phase:"main",fn:un,requiresIfExists:["offset"],data:{_skip:!1}};function cn(t){return"x"===t?"y":"x"}function fn(t,n,e){return At(t,Ct(n,e))}function ln(t){var n=t.state,e=t.options,r=t.name,i=e.mainAxis,o=void 0===i||i,u=e.altAxis,a=void 0!==u&&u,c=e.boundary,f=e.rootBoundary,l=e.altBoundary,s=e.padding,p=e.tether,h=void 0===p||p,v=e.tetherOffset,d=void 0===v?0:v,g=en(n,{boundary:c,rootBoundary:f,padding:s,altBoundary:l}),_=wt(n.placement),m=xt(n.placement),y=!m,b=Ot(_),w=cn(b),x=n.modifiersData.popperOffsets,O=n.rects.reference,j=n.rects.popper,k="function"===typeof d?d(Object.assign({},n.rects,{placement:n.placement})):d,E={x:0,y:0};if(x){if(o||a){var A="y"===b?$:V,C="y"===b?N:F,R="y"===b?"height":"width",S=x[b],D=x[b]+g[A],I=x[b]-g[C],U=h?-j[R]/2:0,P=m===Y?O[R]:j[R],T=m===Y?-j[R]:-O[R],W=n.elements.arrow,z=h&&W?L(W):{width:0,height:0},B=n.modifiersData["arrow#persistent"]?n.modifiersData["arrow#persistent"].padding:Qt(),q=B[A],H=B[C],X=fn(0,O[R],z[R]),K=y?O[R]/2-U-X-q-k:P-X-q-k,Z=y?-O[R]/2+U+X+H+k:T+X+H+k,G=n.elements.arrow&&M(n.elements.arrow),J=G?"y"===b?G.clientTop||0:G.clientLeft||0:0,Q=n.modifiersData.offset?n.modifiersData.offset[n.placement][b]:0,tt=x[b]+K-Q-J,nt=x[b]+Z-Q;if(o){var et=fn(h?Ct(D,tt):D,S,h?At(I,nt):I);x[b]=et,E[b]=et-S}if(a){var rt="x"===b?$:V,it="x"===b?N:F,ot=x[w],ut=ot+g[rt],at=ot-g[it],ct=fn(h?Ct(ut,tt):ut,ot,h?At(at,nt):at);x[w]=ct,E[w]=ct-ot}}n.modifiersData[r]=E}}var sn={name:"preventOverflow",enabled:!0,phase:"main",fn:ln,requiresIfExists:["offset"]},pn=function(t,n){return t="function"===typeof t?t(Object.assign({},n.rects,{placement:n.placement})):t,tn("number"!==typeof t?t:nn(t,H))};function hn(t){var n,e=t.state,r=t.name,i=t.options,o=e.elements.arrow,u=e.modifiersData.popperOffsets,a=wt(e.placement),c=Ot(a),f=[V,F].indexOf(a)>=0,l=f?"height":"width";if(o&&u){var s=pn(i.padding,e),p=L(o),h="y"===c?$:V,v="y"===c?N:F,d=e.rects.reference[l]+e.rects.reference[c]-u[c]-e.rects.popper[l],g=u[c]-e.rects.reference[c],_=M(o),m=_?"y"===c?_.clientHeight||0:_.clientWidth||0:0,y=d/2-g/2,b=s[h],w=m-p[l]-s[v],x=m/2-p[l]/2+y,O=fn(b,x,w),j=c;e.modifiersData[r]=(n={},n[j]=O,n.centerOffset=O-x,n)}}function vn(t){var n=t.state,e=t.options,r=e.element,i=void 0===r?"[data-popper-arrow]":r;null!=i&&("string"!==typeof i||(i=n.elements.popper.querySelector(i),i))&&Yt(n.elements.popper,i)&&(n.elements.arrow=i)}var dn={name:"arrow",enabled:!0,phase:"main",fn:hn,effect:vn,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function gn(t,n,e){return void 0===e&&(e={x:0,y:0}),{top:t.top-n.height-e.y,right:t.right-n.width+e.x,bottom:t.bottom-n.height+e.y,left:t.left-n.width-e.x}}function _n(t){return[$,F,N,V].some((function(n){return t[n]>=0}))}function mn(t){var n=t.state,e=t.name,r=n.rects.reference,i=n.rects.popper,o=n.modifiersData.preventOverflow,u=en(n,{elementContext:"reference"}),a=en(n,{altBoundary:!0}),c=gn(u,r),f=gn(a,i,o),l=_n(c),s=_n(f);n.modifiersData[e]={referenceClippingOffsets:c,popperEscapeOffsets:f,isReferenceHidden:l,hasPopperEscaped:s},n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":s})}var yn={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:mn},bn=[bt,Et,Ut,Wt,Mt,an,sn,dn,yn],wn=_t({defaultModifiers:bn}),xn={methods:{withPopper:function(t,n,e){var r=e.width;t.style.width=r;var i=wn(n.$refs.toggle,t,{placement:"bottom",modifiers:[{name:"offset",options:{offset:[0,-1]}},{name:"toggleClass",enabled:!0,phase:"write",fn:function(t){var e=t.state;n.$el.classList.toggle("drop-up","top"===e.placement)}}]});return function(){return i.destroy()}}}},On=e("0f81"),jn=e("0c81"),kn=e("7c69"),En={props:["companies","isCompanyAdmin","editUser"],components:{AppToggle:On["a"],AppButton:p["a"]},mixins:[xn],data:function(){return{form:{firstname:"",lastname:"",email:"",driverLicense:"",phone:"",company:null,roles:null,vehicles:[]},vehicles:[],vehicleCategories:[],loading:!1}},computed:{roles:function(){var t=[],n=this.$store.getters.getUserRoles;n.forEach((function(n){t.push(_["a"][n])}));var e=m["intersection"].apply(void 0,t);return _["b"].filter((function(t){return e.includes(t.key)}))},showVehicles:function(){var t;return null===(t=this.form.roles)||void 0===t?void 0:t.includes(_["c"].SIMPLE_USER)},vehiclesForSelectedCompany:function(){var t=this;return this.vehicles.filter((function(n){return n.company._id===t.form.company}))},user:function(){return this.$store.state.user}},methods:{addUser:function(){var t=this;return Object(o["a"])(regeneratorRuntime.mark((function n(){var e,r,i;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(!t.loading){n.next=2;break}return n.abrupt("return");case 2:return n.prev=2,n.next=5,t.$refs.userForm.validate();case 5:if(e=n.sent,e){n.next=8;break}return n.abrupt("return");case 8:if(t.loading=!0,r=t.form.vehicles.map((function(t){return{licencePlate:t.licencePlate,category:t.category}})),!t.editUser){n.next=16;break}return n.next=13,l.editUser(Object(u["a"])(Object(u["a"])({},t.form),{},{vehicles:r}));case 13:t.$notify.success(Object(jn["f"])("Användaren")),n.next=19;break;case 16:return n.next=18,l.addUser(Object(u["a"])(Object(u["a"])({},t.form),{},{vehicles:r}));case 18:t.$notify.success(Object(jn["b"])("Användaren"));case 19:t.$emit("userChanged"),n.next=26;break;case 22:n.prev=22,n.t0=n["catch"](2),i=Object(kn["a"])(n.t0),t.$notify.error(i);case 26:return n.prev=26,t.loading=!1,n.finish(26);case 29:case"end":return n.stop()}}),n,null,[[2,22,26,29]])})))()},changeVehicleCategory:function(t,n){t.category=n?"private":"business"},deleteUser:function(){var t=this;return Object(o["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,t.$confirm("",jn["c"],{confirmButtonText:jn["g"],cancelButtonText:jn["a"],type:"warning"});case 3:n.next=8;break;case 5:return n.prev=5,n.t0=n["catch"](0),n.abrupt("return");case 8:return n.prev=8,n.next=11,l.deleteUser(t.form.email);case 11:t.$notify.success("Användaren togs bort!"),t.$emit("userChanged"),n.next=18;break;case 15:n.prev=15,n.t1=n["catch"](8),t.$notify.error(jn["e"]);case 18:case"end":return n.stop()}}),n,null,[[0,5],[8,15]])})))()},roleLimiter:function(t){t.length>2&&(this.$notify.warning("Det går inte att lägga till mer än två roller på samma användare!"),t.pop())}},created:function(){var t=this;return Object(o["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:t.isCompanyAdmin&&(t.form.company=t.user.company),t.editUser&&(Object.assign(t.form,t.editUser),t.editUser.company&&(t.form.company=t.editUser.company._id)),g["a"].getVehicles({bindStatus:"unbound",boxBindStatus:"bound"}).then((function(n){var e=n.vehicles;t.vehicles=e.map((function(t){return Object(u["a"])(Object(u["a"])({},t),{},{category:"business"})}))}));case 3:case"end":return n.stop()}}),n)})))()}},An=En,Cn=(e("723f"),e("2877")),Rn=Object(Cn["a"])(An,v,d,!1,null,"48e8fa65",null),Sn=Rn.exports,Dn=e("a947"),In=e("2f62"),Ln=e("5627"),Un=e("bce3"),Pn={components:{AppPagination:Un["a"],AddUser:Sn,AppModal:h["a"],AppButton:p["a"],AppIcon:s["a"],AppTable:a["a"]},data:function(){return{head:[{name:"Användare"},{name:"Företag"},{name:"E-post"},{name:"Telefonnummer"}],editUser:null,users:[],showModal:!1,companies:[],currentPage:1,totalPages:0,search:null,company:null}},computed:Object(u["a"])({},Object(In["b"])(["isCompanyAdmin"])),methods:{getUsers:function(){var t=this;return Object(o["a"])(regeneratorRuntime.mark((function n(){var e,r,i;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,l.getUsers(10,t.currentPage,t.search,t.company);case 3:e=n.sent,r=e.users,i=e.totalCount,t.users=r,t.totalPages=Object(Ln["a"])(i),n.next=12;break;case 10:n.prev=10,n.t0=n["catch"](0);case 12:case"end":return n.stop()}}),n,null,[[0,10]])})))()},onUserChanged:function(){var t=this;return Object(o["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return t.showModal=!1,t.editUser=null,n.next=4,t.getUsers();case 4:case"end":return n.stop()}}),n)})))()},editRow:function(t){this.editUser=t,this.showModal=!0},getCompanies:function(){var t=this;return Object(o["a"])(regeneratorRuntime.mark((function n(){var e,r;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,Dn["a"].getCompanies();case 3:e=n.sent,r=e.companies,t.companies=r,n.next=11;break;case 8:n.prev=8,n.t0=n["catch"](0),t.$notify.error("Något gick fel!");case 11:case"end":return n.stop()}}),n,null,[[0,8]])})))()},searchUsers:function(){this.currentPage=1,this.getUsers()},getCompanyName:function(t){var n=this.companies.find((function(n){return n._id===t}));return n?n.name:"-"},onPageChanged:function(t){this.currentPage=t,this.getUsers()}},created:function(){var t=this;return Object(o["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(t.isCompanyAdmin){n.next=3;break}return n.next=3,t.getCompanies();case 3:return n.next=5,t.getUsers();case 5:case"end":return n.stop()}}),n)})))()}},Tn=Pn,Wn=(e("3a25"),Object(Cn["a"])(Tn,r,i,!1,null,null,null));n["default"]=Wn.exports},5530:function(t,n,e){"use strict";e.d(n,"a",(function(){return o}));e("b64b"),e("a4d3"),e("4de4"),e("e439"),e("159b"),e("dbb4");var r=e("ade3");function i(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function o(t){for(var n=1;n1?arguments[1]:void 0)}}),o(u)},"841c":function(t,n,e){"use strict";var r=e("d784"),i=e("825a"),o=e("1d80"),u=e("129f"),a=e("14c3");r("search",1,(function(t,n,e){return[function(n){var e=o(this),r=void 0==n?void 0:n[t];return void 0!==r?r.call(n,e):new RegExp(n)[t](String(e))},function(t){var r=e(n,t,this);if(r.done)return r.value;var o=i(t),c=String(this),f=o.lastIndex;u(f,0)||(o.lastIndex=0);var l=a(o,c);return u(o.lastIndex,f)||(o.lastIndex=f),null===l?-1:l.index}]}))},a947:function(t,n,e){"use strict";var r=e("5530"),i=e("bc3a"),o=e.n(i);n["a"]={getCompanies:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r={limit:n,skip:t?t-1:null,search:e};return o.a.get("/companies",{params:r})},addCompany:function(t){return o.a.post("/companies",Object(r["a"])({},t))},updateCompany:function(t){return o.a.put("/companies",Object(r["a"])({},t))},deleteCompany:function(t){return o.a.delete("/companies/".concat(t))}}},b0c0:function(t,n,e){var r=e("83ab"),i=e("9bf2").f,o=Function.prototype,u=o.toString,a=/^\s*function ([^ (]*)/,c="name";r&&!(c in o)&&i(o,c,{configurable:!0,get:function(){try{return u.call(this).match(a)[1]}catch(t){return""}}})},b10a:function(t,n,e){},b8f6:function(t,n,e){"use strict";e("7d50")},bb26:function(t,n,e){"use strict";var r=e("5530"),i=(e("ac1f"),e("841c"),e("bc3a")),o=e.n(i);n["a"]={getVehicles:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.bindStatus,e=void 0===n?null:n,r=t.limit,i=void 0===r?null:r,u=t.page,a=void 0===u?null:u,c=t.search,f=void 0===c?null:c,l=t.company,s=void 0===l?null:l,p=t.boxBindStatus,h=void 0===p?null:p,v=t.includeDeleted,d=void 0===v?null:v;return a=a?a-1:null,o.a.get("/vehicles",{params:{bindStatus:e,limit:i,skip:a,search:f,company:s,boxBindStatus:h,includeDeleted:d}})},addVehicle:function(t){return o.a.post("/vehicles",Object(r["a"])({},t))},updateVehicle:function(t){return o.a.put("/vehicles",t)},deleteVehicle:function(t){return o.a.delete("/vehicles/".concat(t))},getMakers:function(){return o.a.get("/vehiclecodebook/make")},getModelsForMake:function(t){return o.a.get("/vehiclecodebook/make/".concat(t,"/model"))},getCurrentLocation:function(t){return o.a.get("vehicles/".concat(t,"/current-location"))}}},bb2f:function(t,n,e){var r=e("d039");t.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},bce3:function(t,n,e){"use strict";var r=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",[e("paginate",{attrs:{"page-count":t.totalPages,"prev-text":t.arrow,"next-text":t.arrow,"prev-class":"prev","next-class":"next",value:t.currentPage,"click-handler":t.onPageChanged,"container-class":"vue-pagination"}})],1)},i=[],o={props:["totalPages","currentPage"],computed:{arrow:function(){return'\n \n \n \n '}},methods:{onPageChanged:function(t){this.$emit("pageChanged",t)}}},u=o,a=(e("b8f6"),e("2877")),c=Object(a["a"])(u,r,i,!1,null,null,null);n["a"]=c.exports},d81d:function(t,n,e){"use strict";var r=e("23e7"),i=e("b727").map,o=e("1dde"),u=o("map");r({target:"Array",proto:!0,forced:!u},{map:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},dca8:function(t,n,e){var r=e("23e7"),i=e("bb2f"),o=e("d039"),u=e("861d"),a=e("f183").onFreeze,c=Object.freeze,f=o((function(){c(1)}));r({target:"Object",stat:!0,forced:f,sham:!i},{freeze:function(t){return c&&u(t)?c(a(t)):t}})},e5da:function(t,n,e){},f183:function(t,n,e){var r=e("d012"),i=e("861d"),o=e("5135"),u=e("9bf2").f,a=e("90e3"),c=e("bb2f"),f=a("meta"),l=0,s=Object.isExtensible||function(){return!0},p=function(t){u(t,f,{value:{objectID:"O"+ ++l,weakData:{}}})},h=function(t,n){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,f)){if(!s(t))return"F";if(!n)return"E";p(t)}return t[f].objectID},v=function(t,n){if(!o(t,f)){if(!s(t))return!0;if(!n)return!1;p(t)}return t[f].weakData},d=function(t){return c&&g.REQUIRED&&s(t)&&!o(t,f)&&p(t),t},g=t.exports={REQUIRED:!1,fastKey:h,getWeakData:v,onFreeze:d};r[f]=!0}}]); //# sourceMappingURL=chunk-6ea0d002.14a6424b.js.map