(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7747fdd3"],{"3ba2":function(t,e,n){"use strict";var r=function(){var t=this,e=t._self._c;return e("router-link",{attrs:{to:t.to},nativeOn:{click:function(e){return t.routeToAnchor.apply(null,arguments)}}},[t._t("default")],2)},o=[],i=(n("c5f6"),n("2b0e")),a=n("8c4f"),c=n("f13c"),l=n.n(c);i["default"].use(a["a"]),i["default"].use(l.a);var s={name:"vue-anchor-router-link",props:{to:Object,scrollOptions:{type:[Object,Number],default:1}},data:function(){return{previousRoute:this.$route}},methods:{routeToAnchor:function(){this.$route.fullPath===this.previousRoute.fullPath&&this.$scrollTo(this.to.hash,this.scrollOptions)}},watch:{$route:function(t,e){this.previousRoute=t}}},u=s,f=n("2877"),d=Object(f["a"])(u,r,o,!1,null,null,null),p=d.exports;e["a"]=p},4127:function(t,e,n){"use strict";var r=n("d233"),o=n("b313"),i={brackets:function(t){return t+"[]"},indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},a=Date.prototype.toISOString,c={delimiter:"&",encode:!0,encoder:r.encode,encodeValuesOnly:!1,serializeDate:function(t){return a.call(t)},skipNulls:!1,strictNullHandling:!1},l=function t(e,n,o,i,a,l,s,u,f,d,p,v){var y=e;if("function"===typeof s)y=s(n,y);else if(y instanceof Date)y=d(y);else if(null===y){if(i)return l&&!v?l(n,c.encoder):n;y=""}if("string"===typeof y||"number"===typeof y||"boolean"===typeof y||r.isBuffer(y)){if(l){var m=v?n:l(n,c.encoder);return[p(m)+"="+p(l(y,c.encoder))]}return[p(n)+"="+p(String(y))]}var g,h=[];if("undefined"===typeof y)return h;if(Array.isArray(s))g=s;else{var b=Object.keys(y);g=u?b.sort(u):b}for(var w=0;w<g.length;++w){var O=g[w];a&&null===y[O]||(h=Array.isArray(y)?h.concat(t(y[O],o(n,O),o,i,a,l,s,u,f,d,p,v)):h.concat(t(y[O],n+(f?"."+O:"["+O+"]"),o,i,a,l,s,u,f,d,p,v)))}return h};t.exports=function(t,e){var n=t,a=e?r.assign({},e):{};if(null!==a.encoder&&void 0!==a.encoder&&"function"!==typeof a.encoder)throw new TypeError("Encoder has to be a function.");var s="undefined"===typeof a.delimiter?c.delimiter:a.delimiter,u="boolean"===typeof a.strictNullHandling?a.strictNullHandling:c.strictNullHandling,f="boolean"===typeof a.skipNulls?a.skipNulls:c.skipNulls,d="boolean"===typeof a.encode?a.encode:c.encode,p="function"===typeof a.encoder?a.encoder:c.encoder,v="function"===typeof a.sort?a.sort:null,y="undefined"!==typeof a.allowDots&&a.allowDots,m="function"===typeof a.serializeDate?a.serializeDate:c.serializeDate,g="boolean"===typeof a.encodeValuesOnly?a.encodeValuesOnly:c.encodeValuesOnly;if("undefined"===typeof a.format)a.format=o["default"];else if(!Object.prototype.hasOwnProperty.call(o.formatters,a.format))throw new TypeError("Unknown format option provided.");var h,b,w=o.formatters[a.format];"function"===typeof a.filter?(b=a.filter,n=b("",n)):Array.isArray(a.filter)&&(b=a.filter,h=b);var O,j=[];if("object"!==typeof n||null===n)return"";O=a.arrayFormat in i?a.arrayFormat:"indices"in a?a.indices?"indices":"repeat":"indices";var _=i[O];h||(h=Object.keys(n)),v&&h.sort(v);for(var x=0;x<h.length;++x){var S=h[x];f&&null===n[S]||(j=j.concat(l(n[S],S,_,u,f,d?p:null,b,v,y,m,w,g)))}var A=j.join(s),k=!0===a.addQueryPrefix?"?":"";return A.length>0?k+A:""}},4328:function(t,e,n){"use strict";var r=n("4127"),o=n("9e6a"),i=n("b313");t.exports={formats:i,parse:o,stringify:r}},"5e44":function(t,e,n){"use strict";var r=function(){var t=this,e=t._self._c;return e("v-toolbar",{attrs:{flat:"",color:t.color?t.color:"white"}},[e("v-breadcrumbs",{attrs:{divider:"/",items:t.breadcrumbs},scopedSlots:t._u([{key:"item",fn:function(n){return[n.item.to?[e("vue-anchor-router-link",{attrs:{to:n.item.to}},[t._v(t._s(n.item.text))])]:[t._v("\n        "+t._s(n.item.text)+"\n      ")]]}}])}),e("v-spacer"),t._t("default")],2)},o=[],i=n("3ba2"),a={props:["breadcrumbs","color"],computed:{},components:{VueAnchorRouterLink:i["a"]}},c=a,l=n("2877"),s=Object(l["a"])(c,r,o,!1,null,null,null);e["a"]=s.exports},"9e6a":function(t,e,n){"use strict";var r=n("d233"),o=Object.prototype.hasOwnProperty,i={allowDots:!1,allowPrototypes:!1,arrayLimit:20,decoder:r.decode,delimiter:"&",depth:5,parameterLimit:1e3,plainObjects:!1,strictNullHandling:!1},a=function(t,e){for(var n={},r=e.ignoreQueryPrefix?t.replace(/^\?/,""):t,a=e.parameterLimit===1/0?void 0:e.parameterLimit,c=r.split(e.delimiter,a),l=0;l<c.length;++l){var s,u,f=c[l],d=f.indexOf("]="),p=-1===d?f.indexOf("="):d+1;-1===p?(s=e.decoder(f,i.decoder),u=e.strictNullHandling?null:""):(s=e.decoder(f.slice(0,p),i.decoder),u=e.decoder(f.slice(p+1),i.decoder)),o.call(n,s)?n[s]=[].concat(n[s]).concat(u):n[s]=u}return n},c=function(t,e,n){for(var r=e,o=t.length-1;o>=0;--o){var i,a=t[o];if("[]"===a)i=[],i=i.concat(r);else{i=n.plainObjects?Object.create(null):{};var c="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,l=parseInt(c,10);!isNaN(l)&&a!==c&&String(l)===c&&l>=0&&n.parseArrays&&l<=n.arrayLimit?(i=[],i[l]=r):i[c]=r}r=i}return r},l=function(t,e,n){if(t){var r=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,i=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=i.exec(r),s=l?r.slice(0,l.index):r,u=[];if(s){if(!n.plainObjects&&o.call(Object.prototype,s)&&!n.allowPrototypes)return;u.push(s)}var f=0;while(null!==(l=a.exec(r))&&f<n.depth){if(f+=1,!n.plainObjects&&o.call(Object.prototype,l[1].slice(1,-1))&&!n.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+r.slice(l.index)+"]"),c(u,e,n)}};t.exports=function(t,e){var n=e?r.assign({},e):{};if(null!==n.decoder&&void 0!==n.decoder&&"function"!==typeof n.decoder)throw new TypeError("Decoder has to be a function.");if(n.ignoreQueryPrefix=!0===n.ignoreQueryPrefix,n.delimiter="string"===typeof n.delimiter||r.isRegExp(n.delimiter)?n.delimiter:i.delimiter,n.depth="number"===typeof n.depth?n.depth:i.depth,n.arrayLimit="number"===typeof n.arrayLimit?n.arrayLimit:i.arrayLimit,n.parseArrays=!1!==n.parseArrays,n.decoder="function"===typeof n.decoder?n.decoder:i.decoder,n.allowDots="boolean"===typeof n.allowDots?n.allowDots:i.allowDots,n.plainObjects="boolean"===typeof n.plainObjects?n.plainObjects:i.plainObjects,n.allowPrototypes="boolean"===typeof n.allowPrototypes?n.allowPrototypes:i.allowPrototypes,n.parameterLimit="number"===typeof n.parameterLimit?n.parameterLimit:i.parameterLimit,n.strictNullHandling="boolean"===typeof n.strictNullHandling?n.strictNullHandling:i.strictNullHandling,""===t||null===t||"undefined"===typeof t)return n.plainObjects?Object.create(null):{};for(var o="string"===typeof t?a(t,n):t,c=n.plainObjects?Object.create(null):{},s=Object.keys(o),u=0;u<s.length;++u){var f=s[u],d=l(f,o[f],n);c=r.merge(c,d,n)}return r.compact(c)}},a2e3:function(t,e,n){"use strict";n.r(e);n("386d");var r=function(){var t=this,e=t._self._c;return e("div",[e("breadcrumbs",{staticClass:"mb-3",attrs:{breadcrumbs:t.breadcrumbs}},[t.allowedTo("add")?e("v-btn",{attrs:{color:"primary",depressed:"",to:{name:"admin.financial-ar.collection.credit-note.view",params:{creditNoteId:"new",pagination:t.pagination}}}},[t._v(t._s(t.$t("message.new")))]):t._e()],1),e("v-container",{attrs:{fluid:"","grid-list-xl":"","py-0":""}},[e("v-layout",{attrs:{row:"",wrap:""}},[e("app-card",{attrs:{fullBlock:!0,colClasses:"xl12 lg12 md12 sm12 xs12"}},[e("v-card-title",[e("v-text-field",{staticStyle:{"background-color":"white"},attrs:{placeholder:t.$t("message.search"),"single-line":"","hide-details":"","append-icon":"search"},on:{change:function(e){t.filter.search=e,t.search(e)}}}),e("v-spacer"),e("v-spacer"),e("v-select",{staticClass:"mx-3",attrs:{label:t.$t("message.status"),placeholder:" ",items:[{id:"0",label:"ALL"},{id:"1",label:"SHOW DRAFT ONLY"},{id:"2",label:"ALL EXCL. DRAFT"}],clearable:"","hide-details":"","return-object":"","item-value":"id","item-text":"label"},on:{change:function(e){t.filter.status=e,t.search(e)}},model:{value:t.filter.status,callback:function(e){t.$set(t.filter,"status",e)},expression:"filter.status"}})],1)],1)],1)],1),e("v-data-table",{attrs:{headers:t.headers,items:t.records,"total-items":t.totalRecords,"rows-per-page-items":[15,30,50],pagination:t.pagination,loading:t.fetching},on:{"update:pagination":function(e){t.pagination=e}},scopedSlots:t._u([{key:"headers",fn:function(n){return[e("tr",[t._l(n.headers,(function(n){return e("th",{key:n.text,class:["column",t.pagination.descending?"desc":"asc",n.value===t.pagination.sortBy?"active":"",n.value?"sortable":"","text-xs-"+(n.align?n.align:"left")],on:{click:function(e){return t.changeSort(!!n.value,n.value)}}},[n.value?e("v-icon",{attrs:{small:""}},[t._v("arrow_upward")]):t._e(),t._v("\n            "+t._s(n.text)+"\n          ")],1)})),e("th",{staticStyle:{width:"1%"}})],2)]}},{key:"items",fn:function(n){return[e("tr",[e("td",{staticClass:"py-3",staticStyle:{"vertical-align":"top"}},[e("router-link",{attrs:{to:{name:"admin.financial-ar.collection.credit-note.view",params:{creditNoteId:n.item.id,pagination:t.pagination}}}},["0"==n.item.is_draft?e("div",[t._v(t._s(n.item.document_no))]):t._e(),"1"==n.item.is_draft&&"0"!=n.item.draft_id?e("div",[t._v("Bulk Draft")]):t._e(),"1"==n.item.is_draft&&"0"==n.item.draft_id?e("div",[t._v("Draft")]):t._e()])],1),e("td",{staticClass:"py-3",staticStyle:{"vertical-align":"top"}},[t._v("\n            "+t._s(t.getDateFromISO(n.item.document_date))+"\n          ")]),e("td",{staticClass:"py-3",staticStyle:{"vertical-align":"top"}},[t._v("\n            "+t._s(t.getValue(n.item,"unit.unit_number"))+"\n            "+t._s(t.getValue(n.item.account,"main_name.name"))+"\n          ")]),e("td",{staticClass:"py-3",staticStyle:{"vertical-align":"top","text-align":"right"}},[t._v("\n            "+t._s(t.formatNumber(n.item.received_amount).format("0,0.00"))+"\n          ")]),e("td",{staticClass:"py-3",staticStyle:{"vertical-align":"top","text-align":"right"}},[t._v("\n            "+t._s(t.formatNumber(n.item.open_credit).format("0,0.00"))+"\n          ")]),e("td",{staticClass:"pa-0 py-1",staticStyle:{"vertical-align":"top"}},[e("v-btn",{attrs:{flat:"",icon:"",to:{name:"admin.financial-ar.collection.credit-note.view",params:{creditNoteId:n.item.id}}}},[e("v-icon",[t._v("edit")])],1)],1)])]}}])})],1)},o=[],i=(n("8e6e"),n("ac6a"),n("456d"),n("ade3")),a=n("365c"),c=n("2f62"),l=n("4da1"),s=n("323e"),u=n.n(s),f=n("5e44");function d(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function p(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?d(Object(n),!0).forEach((function(e){Object(i["a"])(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var v=n("4328"),y={created:function(){Object(l["j"])(this.$route,"params.pagination")&&(this.pagination=this.$route.params.pagination),this.fetching=!0},components:{Breadcrumbs:f["a"]},computed:p({},Object(c["b"])(["adminScope"])),watch:{pagination:function(){this.fetching=!0},$route:function(){this.fetching=!0},fetching:function(t){1==t&&this.getTablesData()}},methods:{getValue:function(t,e){return Object(l["j"])(t,e)},getDateTimeFromISO:function(t){return Object(l["g"])(t)},getDateFromISO:function(t){return Object(l["e"])(t)},formatNumber:function(t,e){return Object(l["c"])(t,e)},allowedTo:function(t){switch(t){case"add":return!this.$can.not("add","acl.admin.financial-ar.collections.credit-note")}return!1},changeSort:function(t,e){t&&(this.pagination.sortBy===e?this.pagination.descending=!this.pagination.descending:(this.pagination.sortBy=e,this.pagination.descending=!1),this.fetching=!0)},getTablesData:function(){var t=this,e=this.pagination,n=e.sortBy,r=e.descending,o=e.page,i=e.rowsPerPage;1==this.fetching&&(u.a.start(),a["a"].get("admin/financial/ar/collection/credit-note",{params:{page:o,rows_per_page:i,sort_by:n,descending:r,project_id:this.adminScope.projectId,company_id:this.adminScope.companyId,filter:this.filter},paramsSerializer:function(t){return v.stringify(t,{indices:!1})}}).then((function(e){t.records=Object(l["j"])(e,"data.data"),t.totalRecords=Object(l["j"])(e,"data.meta.total")})).catch((function(t){})).then((function(){t.fetching=!1,u.a.done()})))},search:function(t){this.fetching=!0}},data:function(){return{fetching:!1,records:[],totalRecords:0,filter:{},pagination:{sortBy:"date",descending:!0},headers:[{text:this.$t("message.creditNoteNo"),align:"left",value:"document_no"},{text:this.$t("message.date"),align:"left",value:"date"},{text:this.$t("message.unitNo"),align:"left",value:"unit_number"},{text:this.$t("message.amount"),align:"right"},{text:this.$t("message.openCredit"),align:"right"}],breadcrumbs:[{text:this.$t("message.creditNotes"),disabled:!1}]}}},m=y,g=n("2877"),h=Object(g["a"])(m,r,o,!1,null,null,null);e["default"]=h.exports},b313:function(t,e,n){"use strict";var r=String.prototype.replace,o=/%20/g;t.exports={default:"RFC3986",formatters:{RFC1738:function(t){return r.call(t,o,"+")},RFC3986:function(t){return t}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},d233:function(t,e,n){"use strict";var r=Object.prototype.hasOwnProperty,o=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),i=function(t){var e;while(t.length){var n=t.pop();if(e=n.obj[n.prop],Array.isArray(e)){for(var r=[],o=0;o<e.length;++o)"undefined"!==typeof e[o]&&r.push(e[o]);n.obj[n.prop]=r}}return e},a=function(t,e){for(var n=e&&e.plainObjects?Object.create(null):{},r=0;r<t.length;++r)"undefined"!==typeof t[r]&&(n[r]=t[r]);return n},c=function t(e,n,o){if(!n)return e;if("object"!==typeof n){if(Array.isArray(e))e.push(n);else{if("object"!==typeof e)return[e,n];(o.plainObjects||o.allowPrototypes||!r.call(Object.prototype,n))&&(e[n]=!0)}return e}if("object"!==typeof e)return[e].concat(n);var i=e;return Array.isArray(e)&&!Array.isArray(n)&&(i=a(e,o)),Array.isArray(e)&&Array.isArray(n)?(n.forEach((function(n,i){r.call(e,i)?e[i]&&"object"===typeof e[i]?e[i]=t(e[i],n,o):e.push(n):e[i]=n})),e):Object.keys(n).reduce((function(e,i){var a=n[i];return r.call(e,i)?e[i]=t(e[i],a,o):e[i]=a,e}),i)},l=function(t,e){return Object.keys(e).reduce((function(t,n){return t[n]=e[n],t}),t)},s=function(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(e){return t}},u=function(t){if(0===t.length)return t;for(var e="string"===typeof t?t:String(t),n="",r=0;r<e.length;++r){var i=e.charCodeAt(r);45===i||46===i||95===i||126===i||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122?n+=e.charAt(r):i<128?n+=o[i]:i<2048?n+=o[192|i>>6]+o[128|63&i]:i<55296||i>=57344?n+=o[224|i>>12]+o[128|i>>6&63]+o[128|63&i]:(r+=1,i=65536+((1023&i)<<10|1023&e.charCodeAt(r)),n+=o[240|i>>18]+o[128|i>>12&63]+o[128|i>>6&63]+o[128|63&i])}return n},f=function(t){for(var e=[{obj:{o:t},prop:"o"}],n=[],r=0;r<e.length;++r)for(var o=e[r],a=o.obj[o.prop],c=Object.keys(a),l=0;l<c.length;++l){var s=c[l],u=a[s];"object"===typeof u&&null!==u&&-1===n.indexOf(u)&&(e.push({obj:a,prop:s}),n.push(u))}return i(e)},d=function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},p=function(t){return null!==t&&"undefined"!==typeof t&&!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))};t.exports={arrayToObject:a,assign:l,compact:f,decode:s,encode:u,isBuffer:p,isRegExp:d,merge:c}},f13c:function(t,e,n){(function(e,n){t.exports=n()})(0,(function(){"use strict";var t=4,e=.001,n=1e-7,r=10,o=11,i=1/(o-1),a="function"===typeof Float32Array;function c(t,e){return 1-3*e+3*t}function l(t,e){return 3*e-6*t}function s(t){return 3*t}function u(t,e,n){return((c(e,n)*t+l(e,n))*t+s(e))*t}function f(t,e,n){return 3*c(e,n)*t*t+2*l(e,n)*t+s(e)}function d(t,e,o,i,a){var c,l,s=0;do{l=e+(o-e)/2,c=u(l,i,a)-t,c>0?o=l:e=l}while(Math.abs(c)>n&&++s<r);return l}function p(e,n,r,o){for(var i=0;i<t;++i){var a=f(n,r,o);if(0===a)return n;var c=u(n,r,o)-e;n-=c/a}return n}var v=function(t,n,r,c){if(!(0<=t&&t<=1&&0<=r&&r<=1))throw new Error("bezier x values must be in [0, 1] range");var l=a?new Float32Array(o):new Array(o);if(t!==n||r!==c)for(var s=0;s<o;++s)l[s]=u(s*i,t,r);function v(n){for(var a=0,c=1,s=o-1;c!==s&&l[c]<=n;++c)a+=i;--c;var u=(n-l[c])/(l[c+1]-l[c]),v=a+u*i,y=f(v,t,r);return y>=e?p(n,v,t,r):0===y?v:d(n,a,a+i,t,r)}return function(e){return t===n&&r===c?e:0===e?0:1===e?1:u(v(e),n,c)}},y={ease:[.25,.1,.25,1],linear:[0,0,1,1],"ease-in":[.42,0,1,1],"ease-out":[0,0,.58,1],"ease-in-out":[.42,0,.58,1]},m=!1;try{var g=Object.defineProperty({},"passive",{get:function(){m=!0}});window.addEventListener("test",null,g)}catch(T){}var h={$:function(t){return"string"!==typeof t?t:document.querySelector(t)},on:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{passive:!1};e instanceof Array||(e=[e]);for(var o=0;o<e.length;o++)t.addEventListener(e[o],n,!!m&&r)},off:function(t,e,n){e instanceof Array||(e=[e]);for(var r=0;r<e.length;r++)t.removeEventListener(e[r],n)},cumulativeOffset:function(t){var e=0,n=0;do{e+=t.offsetTop||0,n+=t.offsetLeft||0,t=t.offsetParent}while(t);return{top:e,left:n}}},b="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},w=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},O=["mousedown","wheel","DOMMouseScroll","mousewheel","keyup","touchmove"],j={container:"body",duration:500,easing:"ease",offset:0,force:!0,cancelable:!0,onStart:!1,onDone:!1,onCancel:!1,x:!1,y:!0};function _(t){j=w({},j,t)}var x=function(){var t=void 0,e=void 0,n=void 0,r=void 0,o=void 0,i=void 0,a=void 0,c=void 0,l=void 0,s=void 0,u=void 0,f=void 0,d=void 0,p=void 0,m=void 0,g=void 0,w=void 0,_=void 0,x=void 0,S=void 0,A=function(t){a&&(S=t,x=!0)},k=void 0,D=void 0,P=void 0,L=void 0;function N(t){var e=t.scrollTop;return"body"===t.tagName.toLowerCase()&&(e=e||document.documentElement.scrollTop),e}function C(t){var e=t.scrollLeft;return"body"===t.tagName.toLowerCase()&&(e=e||document.documentElement.scrollLeft),e}function T(t){if(x)return $();D||(D=t),P=t-D,L=Math.min(P/n,1),L=k(L),R(e,m+_*L,d+w*L),P<n?window.requestAnimationFrame(T):$()}function $(){x||R(e,g,p),D=!1,h.off(e,O,A),x&&s&&s(S,t),!x&&l&&l(t)}function R(t,e,n){f&&(t.scrollTop=e),u&&(t.scrollLeft=n),"body"===t.tagName.toLowerCase()&&(f&&(document.documentElement.scrollTop=e),u&&(document.documentElement.scrollLeft=n))}function E(D,P){var L=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("object"===("undefined"===typeof P?"undefined":b(P))?L=P:"number"===typeof P&&(L.duration=P),t=h.$(D),!t)return console.warn("[vue-scrollto warn]: Trying to scroll to an element that is not on the page: "+D);e=h.$(L.container||j.container),n=L.duration||j.duration,r=L.easing||j.easing,o=L.offset||j.offset,i=L.hasOwnProperty("force")?!1!==L.force:j.force,a=L.hasOwnProperty("cancelable")?!1!==L.cancelable:j.cancelable,c=L.onStart||j.onStart,l=L.onDone||j.onDone,s=L.onCancel||j.onCancel,u=void 0===L.x?j.x:L.x,f=void 0===L.y?j.y:L.y;var $=h.cumulativeOffset(e),R=h.cumulativeOffset(t);if("function"===typeof o&&(o=o()),m=N(e),g=R.top-$.top+o,d=C(e),p=R.left-$.left+o,x=!1,_=g-m,w=p-d,!i){var E=m,F=E+e.offsetHeight,H=g,B=H+t.offsetHeight;if(H>=E&&B<=F)return}return"string"===typeof r&&(r=y[r]||y["ease"]),k=v.apply(v,r),_||w?(c&&c(t),h.on(e,O,A,{passive:!0}),window.requestAnimationFrame(T),function(){S=null,x=!0}):void 0}return E},S=x(),A=[];function k(t){for(var e=0;e<A.length;++e)if(A[e].el===t)return A.splice(e,1),!0;return!1}function D(t){for(var e=0;e<A.length;++e)if(A[e].el===t)return A[e]}function P(t){var e=D(t);return e||(A.push(e={el:t,binding:{}}),e)}function L(t){t.preventDefault();var e=P(this).binding;if("string"===typeof e.value)return S(e.value);S(e.value.el||e.value.element,e.value)}var N={bind:function(t,e){P(t).binding=e,h.on(t,"click",L)},unbind:function(t){k(t),h.off(t,"click",L)},update:function(t,e){P(t).binding=e},scrollTo:S,bindings:A},C=function(t,e){e&&_(e),t.directive("scroll-to",N),t.prototype.$scrollTo=N.scrollTo};return"undefined"!==typeof window&&window.Vue&&(window.VueScrollTo=N,window.VueScrollTo.setDefaults=_,window.Vue.use(C)),N.install=C,N}))}}]);