| Server IP : 34.87.99.72 / Your IP : 216.73.217.31 Web Server : Apache/2.4.46 (Unix) OpenSSL/1.1.1n System : Linux zlock-bitnami-lamp-prod-v2-vm 4.19.0-16-cloud-amd64 #1 SMP Debian 4.19.181-1 (2021-03-19) x86_64 User : bitnami ( 1000) PHP Version : 7.4.18 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /opt/bitnami/apache2/htdocs/app/public/js/ |
Upload File : |
(self.webpackChunk=self.webpackChunk||[]).push([[642],{125:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});const i={FLAT_RATE:1,FREE_SHIPPING:2,WEIGHT_BASED:3,DYNAMIC_WEIGHT_BASED:4,BOX_TYPE_BASED:5}},6399:(e,t,r)=>{"use strict";function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,{v:()=>a});var a={methods:{errorHandler_:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=this.errorSeparator_(e,t),i=r.a,a=r.b;return Object.keys(a).length>0&&this.alertErrorMessages_(this.computeErrorMessages_(a)),i},errorSeparator_:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r="Something Is Not Right. Please Try Again Later.",a={},o={};if(null==e)this.defaultNotify_(r);else if(e.status&&e.data){var s=e.status,n=e.data;if(422==s){var c=n.errors||n.message;Object.keys(c).forEach((function(e){if(t.includes(e))if(-1!==e.indexOf(".")){var r=e.split(".");void 0===a[r[0]]?a[r[0]]=i({},r[1],c[e]):a[r[0]][r[1]]=c[e]}else a[e]=c[e];else o[e]=c[e]}))}else r=[400,403].includes(s)?n.message:r,this.defaultNotify_(r)}else console.error(e);return{a,b:o}},defaultNotify_:function(e){return this.$toast.warning(e),null},computeErrorMessages_:function(e){var t=Object.keys(e);if(t.length>0){var r=[];return t.forEach((function(t){r.push(e[t][0])})),r}return[]},alertErrorMessages_:function(e){this.$toast.warning(e.join("<br>"))}}}},7753:(e,t,r)=>{"use strict";r.d(t,{S:()=>o});var i=r(361),a=r.n(i),o={data:function(){return{form_dialog_:!1,form_item_:{},form_action_:null}},methods:{emptyModel_:function(){return{}},archiveModel_:function(e){console.log("archiveModel_ :: remember to overwrite me.",e)},newItem_:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.cloneDeep_(e);this.bindAction_("new",t)},editItem_:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.cloneDeep_(e);this.bindAction_("edit",t)},duplicateItem_:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.cloneDeep_(e);this.form_item_.id=null,this.bindAction_("new",t)},bindAction_:function(e,t){this.form_action_=e,this.form_item_=t,this.form_dialog_=!0},confirmArchive_:function(e){var t=this;this.$swal({title:"Are you sure?",text:"You won't be able to revert this!",type:"warning",showCancelButton:!0}).then((function(r){r.value&&t.archiveModel_(e)}))},cloneDeep_:function(e){return a()(e)}}}},5748:(e,t,r)=>{"use strict";r.d(t,{b:()=>i});var i={data:function(){return{view_item_:{},view_dialog_:!1,model_loading_:!1,settings_:{},totalData_:0,resourceData_:{},resourceDataSet_:[],options_:{},filters_:{},sort_:{},search_:{search:null,searchBy:null},isReady:!1}},watch:{settings_:{handler:function(){this.isReady?this.getResourceData_():this.isReady=!0},deep:!0}},methods:{initialize_:function(){this.getResourceData_()},getAllRefs_:function(e){return Promise.allSettled(e)},row_classes_:function(e){if(e.deleted_at)return"grey--text font-italic opacity-7"},searchData_:function(){""==this.search_.search&&(this.search_.search=null),this.settings_.page=1,this.getResourceData_()},getResourceData_:function(){console.log("getResourceData_ :: remember to overwrite me.")},viewMore_:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.view_item_=this.cloneDeep_(e),this.view_dialog_=!0},setPagination_:function(){var e=this.settings_;return{page:e.page,itemsPerPage:e.itemsPerPage}},getActivityRefs_:function(){return[{value:1,text:"Active Only"},{value:0,text:"Archived Only"},{value:2,text:"All"}]},downloadFile_:function(e,t){var r=document.createElement("a");r.setAttribute("download",t),r.setAttribute("href",e),document.body.appendChild(r),r.click(),document.body.removeChild(r)}}}},8552:(e,t,r)=>{var i=r(852)(r(5639),"DataView");e.exports=i},1989:(e,t,r)=>{var i=r(1789),a=r(401),o=r(7667),s=r(1327),n=r(1866);function c(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}c.prototype.clear=i,c.prototype.delete=a,c.prototype.get=o,c.prototype.has=s,c.prototype.set=n,e.exports=c},9423:(e,t,r)=>{var i=r(7040),a=r(4125),o=r(2117),s=r(7518),n=r(4705);function c(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}c.prototype.clear=i,c.prototype.delete=a,c.prototype.get=o,c.prototype.has=s,c.prototype.set=n,e.exports=c},7071:(e,t,r)=>{var i=r(852)(r(5639),"Map");e.exports=i},3369:(e,t,r)=>{var i=r(4785),a=r(1285),o=r(6e3),s=r(9916),n=r(5265);function c(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}c.prototype.clear=i,c.prototype.delete=a,c.prototype.get=o,c.prototype.has=s,c.prototype.set=n,e.exports=c},3818:(e,t,r)=>{var i=r(852)(r(5639),"Promise");e.exports=i},8525:(e,t,r)=>{var i=r(852)(r(5639),"Set");e.exports=i},6384:(e,t,r)=>{var i=r(9423),a=r(7465),o=r(3779),s=r(7599),n=r(4758),c=r(4309);function l(e){var t=this.__data__=new i(e);this.size=t.size}l.prototype.clear=a,l.prototype.delete=o,l.prototype.get=s,l.prototype.has=n,l.prototype.set=c,e.exports=l},1149:(e,t,r)=>{var i=r(5639).Uint8Array;e.exports=i},577:(e,t,r)=>{var i=r(852)(r(5639),"WeakMap");e.exports=i},7412:e=>{e.exports=function(e,t){for(var r=-1,i=null==e?0:e.length;++r<i&&!1!==t(e[r],r,e););return e}},4963:e=>{e.exports=function(e,t){for(var r=-1,i=null==e?0:e.length,a=0,o=[];++r<i;){var s=e[r];t(s,r,e)&&(o[a++]=s)}return o}},4636:(e,t,r)=>{var i=r(2545),a=r(5694),o=r(1469),s=r(4144),n=r(5776),c=r(6719),l=Object.prototype.hasOwnProperty;e.exports=function(e,t){var r=o(e),_=!r&&a(e),u=!r&&!_&&s(e),d=!r&&!_&&!u&&c(e),p=r||_||u||d,f=p?i(e.length,String):[],h=f.length;for(var v in e)!t&&!l.call(e,v)||p&&("length"==v||u&&("offset"==v||"parent"==v)||d&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||n(v,h))||f.push(v);return f}},2488:e=>{e.exports=function(e,t){for(var r=-1,i=t.length,a=e.length;++r<i;)e[a+r]=t[r];return e}},4865:(e,t,r)=>{var i=r(9465),a=r(7813),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){var s=e[t];o.call(e,t)&&a(s,r)&&(void 0!==r||t in e)||i(e,t,r)}},8470:(e,t,r)=>{var i=r(7813);e.exports=function(e,t){for(var r=e.length;r--;)if(i(e[r][0],t))return r;return-1}},4037:(e,t,r)=>{var i=r(8363),a=r(3674);e.exports=function(e,t){return e&&i(t,a(t),e)}},3886:(e,t,r)=>{var i=r(8363),a=r(1704);e.exports=function(e,t){return e&&i(t,a(t),e)}},9465:(e,t,r)=>{var i=r(8777);e.exports=function(e,t,r){"__proto__"==t&&i?i(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},5990:(e,t,r)=>{var i=r(6384),a=r(7412),o=r(4865),s=r(4037),n=r(3886),c=r(4626),l=r(278),_=r(8805),u=r(1911),d=r(8234),p=r(6904),f=r(4160),h=r(3824),v=r(9148),m=r(8517),b=r(1469),g=r(4144),y=r(6688),x=r(3218),w=r(2928),j=r(3674),A=r(1704),S="[object Arguments]",k="[object Function]",E="[object Object]",D={};D[S]=D["[object Array]"]=D["[object ArrayBuffer]"]=D["[object DataView]"]=D["[object Boolean]"]=D["[object Date]"]=D["[object Float32Array]"]=D["[object Float64Array]"]=D["[object Int8Array]"]=D["[object Int16Array]"]=D["[object Int32Array]"]=D["[object Map]"]=D["[object Number]"]=D[E]=D["[object RegExp]"]=D["[object Set]"]=D["[object String]"]=D["[object Symbol]"]=D["[object Uint8Array]"]=D["[object Uint8ClampedArray]"]=D["[object Uint16Array]"]=D["[object Uint32Array]"]=!0,D["[object Error]"]=D[k]=D["[object WeakMap]"]=!1,e.exports=function e(t,r,O,B,C,$){var z,I=1&r,M=2&r,T=4&r;if(O&&(z=C?O(t,B,C,$):O(t)),void 0!==z)return z;if(!x(t))return t;var P=b(t);if(P){if(z=h(t),!I)return l(t,z)}else{var R=f(t),Z=R==k||"[object GeneratorFunction]"==R;if(g(t))return c(t,I);if(R==E||R==S||Z&&!C){if(z=M||Z?{}:m(t),!I)return M?u(t,n(z,t)):_(t,s(z,t))}else{if(!D[R])return C?t:{};z=v(t,R,I)}}$||($=new i);var L=$.get(t);if(L)return L;$.set(t,z),w(t)?t.forEach((function(i){z.add(e(i,r,O,i,t,$))})):y(t)&&t.forEach((function(i,a){z.set(a,e(i,r,O,a,t,$))}));var F=P?void 0:(T?M?p:d:M?A:j)(t);return a(F||t,(function(i,a){F&&(i=t[a=i]),o(z,a,e(i,r,O,a,t,$))})),z}},3118:(e,t,r)=>{var i=r(3218),a=Object.create,o=function(){function e(){}return function(t){if(!i(t))return{};if(a)return a(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();e.exports=o},8866:(e,t,r)=>{var i=r(2488),a=r(1469);e.exports=function(e,t,r){var o=t(e);return a(e)?o:i(o,r(e))}},9454:(e,t,r)=>{var i=r(4239),a=r(7005);e.exports=function(e){return a(e)&&"[object Arguments]"==i(e)}},5588:(e,t,r)=>{var i=r(4160),a=r(7005);e.exports=function(e){return a(e)&&"[object Map]"==i(e)}},8458:(e,t,r)=>{var i=r(3560),a=r(7724),o=r(3218),s=r(346),n=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,_=c.toString,u=l.hasOwnProperty,d=RegExp("^"+_.call(u).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||a(e))&&(i(e)?d:n).test(s(e))}},9221:(e,t,r)=>{var i=r(4160),a=r(7005);e.exports=function(e){return a(e)&&"[object Set]"==i(e)}},8749:(e,t,r)=>{var i=r(4239),a=r(1780),o=r(7005),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&a(e.length)&&!!s[i(e)]}},280:(e,t,r)=>{var i=r(5726),a=r(6916),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!i(e))return a(e);var t=[];for(var r in Object(e))o.call(e,r)&&"constructor"!=r&&t.push(r);return t}},313:(e,t,r)=>{var i=r(3218),a=r(5726),o=r(3498),s=Object.prototype.hasOwnProperty;e.exports=function(e){if(!i(e))return o(e);var t=a(e),r=[];for(var n in e)("constructor"!=n||!t&&s.call(e,n))&&r.push(n);return r}},2545:e=>{e.exports=function(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}},1717:e=>{e.exports=function(e){return function(t){return e(t)}}},4318:(e,t,r)=>{var i=r(1149);e.exports=function(e){var t=new e.constructor(e.byteLength);return new i(t).set(new i(e)),t}},4626:(e,t,r)=>{e=r.nmd(e);var i=r(5639),a=t&&!t.nodeType&&t,o=a&&e&&!e.nodeType&&e,s=o&&o.exports===a?i.Buffer:void 0,n=s?s.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var r=e.length,i=n?n(r):new e.constructor(r);return e.copy(i),i}},7157:(e,t,r)=>{var i=r(4318);e.exports=function(e,t){var r=t?i(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}},3147:e=>{var t=/\w*$/;e.exports=function(e){var r=new e.constructor(e.source,t.exec(e));return r.lastIndex=e.lastIndex,r}},419:(e,t,r)=>{var i=r(2705),a=i?i.prototype:void 0,o=a?a.valueOf:void 0;e.exports=function(e){return o?Object(o.call(e)):{}}},7133:(e,t,r)=>{var i=r(4318);e.exports=function(e,t){var r=t?i(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}},278:e=>{e.exports=function(e,t){var r=-1,i=e.length;for(t||(t=Array(i));++r<i;)t[r]=e[r];return t}},8363:(e,t,r)=>{var i=r(4865),a=r(9465);e.exports=function(e,t,r,o){var s=!r;r||(r={});for(var n=-1,c=t.length;++n<c;){var l=t[n],_=o?o(r[l],e[l],l,r,e):void 0;void 0===_&&(_=e[l]),s?a(r,l,_):i(r,l,_)}return r}},8805:(e,t,r)=>{var i=r(8363),a=r(9551);e.exports=function(e,t){return i(e,a(e),t)}},1911:(e,t,r)=>{var i=r(8363),a=r(1442);e.exports=function(e,t){return i(e,a(e),t)}},4429:(e,t,r)=>{var i=r(5639)["__core-js_shared__"];e.exports=i},8777:(e,t,r)=>{var i=r(852),a=function(){try{var e=i(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=a},8234:(e,t,r)=>{var i=r(8866),a=r(9551),o=r(3674);e.exports=function(e){return i(e,o,a)}},6904:(e,t,r)=>{var i=r(8866),a=r(1442),o=r(1704);e.exports=function(e){return i(e,o,a)}},5050:(e,t,r)=>{var i=r(7019);e.exports=function(e,t){var r=e.__data__;return i(t)?r["string"==typeof t?"string":"hash"]:r.map}},852:(e,t,r)=>{var i=r(8458),a=r(7801);e.exports=function(e,t){var r=a(e,t);return i(r)?r:void 0}},5924:(e,t,r)=>{var i=r(5569)(Object.getPrototypeOf,Object);e.exports=i},9551:(e,t,r)=>{var i=r(4963),a=r(479),o=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,n=s?function(e){return null==e?[]:(e=Object(e),i(s(e),(function(t){return o.call(e,t)})))}:a;e.exports=n},1442:(e,t,r)=>{var i=r(2488),a=r(5924),o=r(9551),s=r(479),n=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)i(t,o(e)),e=a(e);return t}:s;e.exports=n},4160:(e,t,r)=>{var i=r(8552),a=r(7071),o=r(3818),s=r(8525),n=r(577),c=r(4239),l=r(346),_="[object Map]",u="[object Promise]",d="[object Set]",p="[object WeakMap]",f="[object DataView]",h=l(i),v=l(a),m=l(o),b=l(s),g=l(n),y=c;(i&&y(new i(new ArrayBuffer(1)))!=f||a&&y(new a)!=_||o&&y(o.resolve())!=u||s&&y(new s)!=d||n&&y(new n)!=p)&&(y=function(e){var t=c(e),r="[object Object]"==t?e.constructor:void 0,i=r?l(r):"";if(i)switch(i){case h:return f;case v:return _;case m:return u;case b:return d;case g:return p}return t}),e.exports=y},7801:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},1789:(e,t,r)=>{var i=r(4536);e.exports=function(){this.__data__=i?i(null):{},this.size=0}},401:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},7667:(e,t,r)=>{var i=r(4536),a=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(i){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return a.call(t,e)?t[e]:void 0}},1327:(e,t,r)=>{var i=r(4536),a=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return i?void 0!==t[e]:a.call(t,e)}},1866:(e,t,r)=>{var i=r(4536);e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=i&&void 0===t?"__lodash_hash_undefined__":t,this}},3824:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e){var r=e.length,i=new e.constructor(r);return r&&"string"==typeof e[0]&&t.call(e,"index")&&(i.index=e.index,i.input=e.input),i}},9148:(e,t,r)=>{var i=r(4318),a=r(7157),o=r(3147),s=r(419),n=r(7133);e.exports=function(e,t,r){var c=e.constructor;switch(t){case"[object ArrayBuffer]":return i(e);case"[object Boolean]":case"[object Date]":return new c(+e);case"[object DataView]":return a(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return n(e,r);case"[object Map]":return new c;case"[object Number]":case"[object String]":return new c(e);case"[object RegExp]":return o(e);case"[object Set]":return new c;case"[object Symbol]":return s(e)}}},8517:(e,t,r)=>{var i=r(3118),a=r(5924),o=r(5726);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:i(a(e))}},5776:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,r){var i=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==i||"symbol"!=i&&t.test(e))&&e>-1&&e%1==0&&e<r}},7019:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},7724:(e,t,r)=>{var i,a=r(4429),o=(i=/[^.]+$/.exec(a&&a.keys&&a.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";e.exports=function(e){return!!o&&o in e}},5726:e=>{var t=Object.prototype;e.exports=function(e){var r=e&&e.constructor;return e===("function"==typeof r&&r.prototype||t)}},7040:e=>{e.exports=function(){this.__data__=[],this.size=0}},4125:(e,t,r)=>{var i=r(8470),a=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=i(t,e);return!(r<0)&&(r==t.length-1?t.pop():a.call(t,r,1),--this.size,!0)}},2117:(e,t,r)=>{var i=r(8470);e.exports=function(e){var t=this.__data__,r=i(t,e);return r<0?void 0:t[r][1]}},7518:(e,t,r)=>{var i=r(8470);e.exports=function(e){return i(this.__data__,e)>-1}},4705:(e,t,r)=>{var i=r(8470);e.exports=function(e,t){var r=this.__data__,a=i(r,e);return a<0?(++this.size,r.push([e,t])):r[a][1]=t,this}},4785:(e,t,r)=>{var i=r(1989),a=r(9423),o=r(7071);e.exports=function(){this.size=0,this.__data__={hash:new i,map:new(o||a),string:new i}}},1285:(e,t,r)=>{var i=r(5050);e.exports=function(e){var t=i(this,e).delete(e);return this.size-=t?1:0,t}},6e3:(e,t,r)=>{var i=r(5050);e.exports=function(e){return i(this,e).get(e)}},9916:(e,t,r)=>{var i=r(5050);e.exports=function(e){return i(this,e).has(e)}},5265:(e,t,r)=>{var i=r(5050);e.exports=function(e,t){var r=i(this,e),a=r.size;return r.set(e,t),this.size+=r.size==a?0:1,this}},4536:(e,t,r)=>{var i=r(852)(Object,"create");e.exports=i},6916:(e,t,r)=>{var i=r(5569)(Object.keys,Object);e.exports=i},3498:e=>{e.exports=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}},1167:(e,t,r)=>{e=r.nmd(e);var i=r(1957),a=t&&!t.nodeType&&t,o=a&&e&&!e.nodeType&&e,s=o&&o.exports===a&&i.process,n=function(){try{var e=o&&o.require&&o.require("util").types;return e||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=n},5569:e=>{e.exports=function(e,t){return function(r){return e(t(r))}}},7465:(e,t,r)=>{var i=r(9423);e.exports=function(){this.__data__=new i,this.size=0}},3779:e=>{e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},7599:e=>{e.exports=function(e){return this.__data__.get(e)}},4758:e=>{e.exports=function(e){return this.__data__.has(e)}},4309:(e,t,r)=>{var i=r(9423),a=r(7071),o=r(3369);e.exports=function(e,t){var r=this.__data__;if(r instanceof i){var s=r.__data__;if(!a||s.length<199)return s.push([e,t]),this.size=++r.size,this;r=this.__data__=new o(s)}return r.set(e,t),this.size=r.size,this}},346:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},361:(e,t,r)=>{var i=r(5990);e.exports=function(e){return i(e,5)}},7813:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},5694:(e,t,r)=>{var i=r(9454),a=r(7005),o=Object.prototype,s=o.hasOwnProperty,n=o.propertyIsEnumerable,c=i(function(){return arguments}())?i:function(e){return a(e)&&s.call(e,"callee")&&!n.call(e,"callee")};e.exports=c},1469:e=>{var t=Array.isArray;e.exports=t},8612:(e,t,r)=>{var i=r(3560),a=r(1780);e.exports=function(e){return null!=e&&a(e.length)&&!i(e)}},4144:(e,t,r)=>{e=r.nmd(e);var i=r(5639),a=r(5062),o=t&&!t.nodeType&&t,s=o&&e&&!e.nodeType&&e,n=s&&s.exports===o?i.Buffer:void 0,c=(n?n.isBuffer:void 0)||a;e.exports=c},1780:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},6688:(e,t,r)=>{var i=r(5588),a=r(1717),o=r(1167),s=o&&o.isMap,n=s?a(s):i;e.exports=n},7005:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},2928:(e,t,r)=>{var i=r(9221),a=r(1717),o=r(1167),s=o&&o.isSet,n=s?a(s):i;e.exports=n},6719:(e,t,r)=>{var i=r(8749),a=r(1717),o=r(1167),s=o&&o.isTypedArray,n=s?a(s):i;e.exports=n},3674:(e,t,r)=>{var i=r(4636),a=r(280),o=r(8612);e.exports=function(e){return o(e)?i(e):a(e)}},1704:(e,t,r)=>{var i=r(4636),a=r(313),o=r(8612);e.exports=function(e){return o(e)?i(e,!0):a(e)}},479:e=>{e.exports=function(){return[]}},5062:e=>{e.exports=function(){return!1}},6767:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});const i={props:{items:{type:Array,default:function(){return[]}}},data:function(){return{}},methods:{}};const a=(0,r(1900).Z)(i,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"v-btn-toggle overflow-auto",class:e.$vuetify.theme.dark?"theme--dark":"theme--light"},[e._l(e.items,(function(t,i){return[r("v-btn",{key:i,attrs:{text:"",small:"",disabled:t.disabled||null},on:{click:function(e){return t.action()}}},[r("v-icon",{attrs:{small:""}},[e._v(e._s(t.icon))])],1)]}))],2)}),[],!1,null,null,null).exports},9175:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});const i={props:{items:{type:Array,default:function(){return[]}}}};const a=(0,r(1900).Z)(i,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("v-menu",e._g(e._b({scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[e._t("activator",[r("v-btn",e._g({attrs:{icon:"",small:""}},i),[r("v-icon",{attrs:{small:""}},[e._v("mdi-dots-vertical")])],1)],{on:i})]}}],null,!0)},"v-menu",e.$attrs,!1),e.$listeners),[e._v(" "),r("v-list",{attrs:{dense:""}},e._l(e.items,(function(t,i){return r("v-list-item",{key:i,attrs:{to:t.to||null,disabled:!!t.disabled&&t.disabled},on:{click:t.action}},[r("v-list-item-icon",{staticClass:"mr-2"},[r("v-icon",{class:t.icon_class,attrs:{small:""}},[e._v(e._s(t.icon))])],1),e._v(" "),r("v-list-item-content",[r("v-list-item-title",[r("span",{class:t.title_class},[e._v(e._s(t.title))])])],1)],1)})),1)],1)}),[],!1,null,null,null).exports},9984:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});const i={props:{search:{type:[String,Array],default:""},searchBy:{type:String,default:""},dateSearchBy:{type:Array,default:function(){return[]}},items:{type:Array,default:function(){return[]}},disabled:{type:Boolean,default:!1}},computed:{isDateSearch:function(){for(var e=0;e<this.dateSearchBy.length;e++)if(this.dateSearchBy[e]==this.searchBy__)return!0;return!1}},data:function(){return{search__:null,searchBy__:"",menu2:!1}},watch:{search:{handler:function(e){this.search__=e},immediate:!0},searchBy:{handler:function(e){this.searchBy__=e},immediate:!0}},methods:{emitSearch:function(){this.$emit("search")}}};const a=(0,r(1900).Z)(i,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("v-row",{attrs:{dense:""}},[r("v-col",{attrs:{cols:"12",md:"auto"}},[r("div",{staticClass:"v-btn-toggle fill-width"},[e.isDateSearch?r("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,transition:"scale-transition","offset-y":"","min-width":"auto"},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on,a=t.attrs;return[r("v-text-field",e._g(e._b({staticClass:"__input-dense",attrs:{placeholder:"Search",color:"primary",dense:"","hide-details":"",height:"32",outlined:"",clearable:"","prepend-icon":"mdi-calendar",readonly:""},model:{value:e.search__,callback:function(t){e.search__=t},expression:"search__"}},"v-text-field",a,!1),i))]}}]),model:{value:e.menu2,callback:function(t){e.menu2=t},expression:"menu2"}},[e._v(" "),r("v-date-picker",{attrs:{range:""},on:{input:function(t){e.$emit("update:search",t)}},model:{value:e.search__,callback:function(t){e.search__=t},expression:"search__"}})],1):r("v-text-field",{staticClass:"__input-dense",attrs:{placeholder:"Search",color:"primary",dense:"","hide-details":"",height:"32",outlined:"",clearable:""},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.emitSearch()},input:function(t){e.$emit("update:search",t)}},model:{value:e.search__,callback:function(t){e.search__=t},expression:"search__"}}),e._v(" "),r("v-btn",{staticClass:"px-4",attrs:{small:"",height:"32",disabled:e.disabled},on:{click:function(t){return e.emitSearch()}}},[r("v-icon",[e._v("mdi-magnify")])],1)],1)]),e._v(" "),r("v-col",{attrs:{cols:"8",md:"auto"}},[r("v-select",{staticClass:"__input-dense caption",attrs:{height:"32",label:"Search By",dense:"","hide-details":"",outlined:"",items:e.items},on:{input:function(t){e.$emit("update:searchBy",t),e.$emit("update:search",null)}},model:{value:e.searchBy__,callback:function(t){e.searchBy__=t},expression:"searchBy__"}})],1)],1)}),[],!1,null,null,null).exports},6777:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});const i={props:{value:{type:Boolean,default:!1},title:{type:String,default:"Form"},clearable:{type:Boolean,default:!1}},data:function(){return{value__:!1}},watch:{value:{handler:function(){this.value__=this.value}}},methods:{emitClear:function(){this.$emit("clear")}}};const a=(0,r(1900).Z)(i,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("v-navigation-drawer",{style:e.$vuetify.breakpoint.mdAndUp?"min-width: 350px;":"",attrs:{floating:"",app:"",right:"",temporary:""},on:{input:function(t){return e.$emit("input",e.value__)}},model:{value:e.value__,callback:function(t){e.value__=t},expression:"value__"}},[r("v-row",{staticClass:"ma-0",attrs:{align:"center"}},[r("v-col",{attrs:{cols:"12"}},[e._t("title",[r("v-row",{attrs:{dense:""}},[r("v-col",{staticClass:"title",attrs:{cols:"auto"}},[e._v(e._s(e.title))]),e._v(" "),r("v-spacer"),e._v(" "),e.clearable?r("v-col",{attrs:{cols:"auto"}},[r("v-btn",{attrs:{color:"error",fab:"","x-small":"",depressed:""},on:{click:function(t){return e.emitClear()}}},[r("v-icon",[e._v("mdi-undo-variant")])],1)],1):e._e()],1)])],2),e._v(" "),r("v-divider",{staticClass:"mx-2"}),e._v(" "),r("v-col",{staticClass:"py-4",attrs:{cols:"12"}},[e._t("default")],2),e._v(" "),r("v-col",{staticClass:"pt-0"},[e._t("actions")],2)],1)],1)}),[],!1,null,null,null).exports},4286:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});const i={props:{item:{type:Object,default:function(){return{id:0,name:"ShippingTypeName"}}},menu:{type:Array,default:function(){return[]}}},data:function(){return{}},created:function(){},methods:{}};const a=(0,r(1900).Z)(i,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("v-card",{staticClass:"px-4 py-1 caption"},[r("v-row",{staticClass:"text-center ma-0",attrs:{dense:"",align:"center",justify:"center"}},[e.menu.length>0?r("v-col",{staticClass:"absolute text-right",staticStyle:{top:"0"},attrs:{cols:"12"}},[r("v-menu",{attrs:{bottom:"",left:"","nudge-bottom":"25px"},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on,a=t.attrs;return[r("v-btn",e._g(e._b({attrs:{icon:"",small:""}},"v-btn",a,!1),i),[r("v-icon",{attrs:{small:""}},[e._v("mdi-dots-vertical")])],1)]}}],null,!1,1635035500)},[e._v(" "),r("v-list",{attrs:{dense:""}},[r("v-list-item-group",e._l(e.menu,(function(t,i){return r("v-list-item",{key:i,on:{click:function(r){return t.action(e.item)}}},[r("v-list-item-icon",{staticClass:"mr-2"},[r("v-icon",{class:t.class,attrs:{small:""}},[e._v(e._s(t.icon))])],1),e._v(" "),r("v-list-item-content",[r("v-list-item-title",[r("span",{class:t.class},[e._v(e._s(t.title))])])],1)],1)})),1)],1)],1)],1):e._e(),e._v(" "),r("v-col",{attrs:{cols:"12"}},[e.item.flat_rate?r("div",{staticClass:"text-right grey--text caption"},[e._v(e._s(e.$dayjs(e.item.flat_rate.created_at).format("MMM DD, YYYY")))]):e._e(),e._v(" "),e.item.free_shipping?r("div",{staticClass:"text-right grey--text caption"},[e._v(e._s(e.$dayjs(e.item.free_shipping.created_at).format("MMM DD, YYYY")))]):e._e(),e._v(" "),e.item.weight_based?r("div",{staticClass:"text-right grey--text caption"},[e._v(e._s(e.$dayjs(e.item.weight_based.created_at).format("MMM DD, YYYY")))]):e._e(),e._v(" "),e.item.dynamic_weight_based?r("div",{staticClass:"text-right grey--text caption"},[e._v(e._s(e.$dayjs(e.item.dynamic_weight_based.created_at).format("MMM DD, YYYY")))]):e._e()])],1)],1)}),[],!1,null,null,null).exports},7302:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var i=r(6399),a=r(125);const o={mixins:[i.v],props:{visible:{type:Boolean,required:!0},item:{type:Object,required:!0,default:function(){return{}}},action:{type:String,required:!0},shippingTypeList:{type:Array,required:!0,default:function(){return[]}},geoZoneList:{type:Array,required:!0,default:function(){return[]}},courierList:{type:Array,required:!0,default:function(){return[]}},boxTypeList:{type:Array,required:!0,default:function(){return[]}}},data:function(){return{form:{flat_rate:{},free_shipping:{},weight_based:{},dynamic_weight_based:{},box_type_based:{}},errors:{},submit_loading:!1,FLAT_RATE:a.Z.FLAT_RATE,FREE_SHIPPING:a.Z.FREE_SHIPPING,WEIGHT_BASED:a.Z.WEIGHT_BASED,DYNAMIC_WEIGHT_BASED:a.Z.DYNAMIC_WEIGHT_BASED,BOX_TYPE_BASED:a.Z.BOX_TYPE_BASED}},watch:{"form.shipping_type_id":{handler:function(){this.errors={flat_rate:{},free_shipping:{},weight_based:{},dynamic_weight_based:{},box_type_based:{}}}},item:{handler:function(){this.form=this.item,"new"==this.action&&(this.form.is_enabled=1)},immediate:!0},visible:{handler:function(e){e||(this.errors={flat_rate:{},free_shipping:{},weight_based:{},dynamic_weight_based:{},box_type_based:{}})},immediate:!0}},created:function(){this.errors={flat_rate:{},free_shipping:{},weight_based:{},dynamic_weight_based:{},box_type_based:{}}},methods:{initialize:function(){this.closeDialog(),this.$emit("initialize")},closeDialog:function(){this.$emit("update:visible",!1)},submitForm:function(e){this.saveModel(e)},saveModel:function(e){var t=this;this.submit_loading=!0,this.errors={flat_rate:{},free_shipping:{},weight_based:{},dynamic_weight_based:{},box_type_based:{}};var r={};switch(e.shipping_type_id){case this.FLAT_RATE:r={id:e.id,name:e.name,shipping_type_id:e.shipping_type_id,is_enabled:e.is_enabled,flat_rate:{geo_zone_id:e.flat_rate.geo_zone_id,cost:e.flat_rate.cost,couriers:e.flat_rate.couriers}};break;case this.FREE_SHIPPING:r={id:e.id,name:e.name,shipping_type_id:e.shipping_type_id,is_enabled:e.is_enabled,free_shipping:{geo_zone_id:e.free_shipping.geo_zone_id,subtotal:e.free_shipping.subtotal,couriers:e.free_shipping.couriers}};break;case this.WEIGHT_BASED:r={id:e.id,name:e.name,shipping_type_id:e.shipping_type_id,is_enabled:e.is_enabled,weight_based:{geo_zone_id:e.weight_based.geo_zone_id,first_weight:e.weight_based.first_weight,price_first_weight:e.weight_based.price_first_weight,repeating_weight:e.weight_based.repeating_weight,price_repeating_weight:e.weight_based.price_repeating_weight,additional_fee:e.weight_based.additional_fee,couriers:e.weight_based.couriers}};break;case this.DYNAMIC_WEIGHT_BASED:r={id:e.id,name:e.name,shipping_type_id:e.shipping_type_id,is_enabled:e.is_enabled,dynamic_weight_based:{geo_zone_id:e.dynamic_weight_based.geo_zone_id,couriers:e.dynamic_weight_based.couriers,weights:e.dynamic_weight_based.weights}};break;case this.BOX_TYPE_BASED:r={id:e.id,name:e.name,shipping_type_id:e.shipping_type_id,is_enabled:e.is_enabled,box_type_based:{box_type_id:e.box_type_based.box_type_id,cost:e.box_type_based.cost,couriers:e.box_type_based.couriers}}}("new"==this.action?this.$api.createShippingMethod(r):this.$api.updateShippingMethod(r)).then((function(e){t.$toast.success(e.data.message),t.initialize()})).catch((function(e){t.errors=t.errorHandler_(e,["name","shipping_type_id","flat_rate.geo_zone_id","box_type_based.geo_zone_id","free_shipping.geo_zone_id","weight_based.geo_zone_id","dynamic_weight_based.geo_zone_id","is_enabled","flat_rate.cost","box_type_based.cost","free_shipping.subtotal","weight_based.first_weight","weight_based.price_first_weight","weight_based.repeating_weight","weight_based.price_repeating_weight","weight_based.additional_fee","box_type_based.box_type_id"]),t.submit_loading=!1})).finally((function(){t.submit_loading=!1}))},addDynamicWeight:function(){this.form.dynamic_weight_based.weights.push({id:null,weight:null,price:null})},removeDynamicWeight:function(e){this.form.dynamic_weight_based.weights.splice(e,1)}}};const s=(0,r(1900).Z)(o,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("v-card",{staticClass:"radius-10"},[r("v-card-title",[r("span",{staticClass:"headline"},[e._v(e._s("edit"==e.action?"Edit Shipping Method":"New Shipping Method"))])]),e._v(" "),r("v-divider",{staticClass:"mb-2"}),e._v(" "),r("v-card-text",{staticClass:"py-4"},[r("v-row",{attrs:{dense:""}},[r("v-col",{attrs:{cols:"12",md:"12"}},[r("v-select",{attrs:{items:e.shippingTypeList,label:"Shipping Type",dense:"",readonly:"edit"==e.action,"item-text":"name","item-value":"id","error-messages":e.errors.shipping_type_id},model:{value:e.form.shipping_type_id,callback:function(t){e.$set(e.form,"shipping_type_id",t)},expression:"form.shipping_type_id"}})],1),e._v(" "),r("v-col",{attrs:{cols:"12",md:"12"}},[r("v-text-field",{attrs:{label:"Name",placeholder:"Name",dense:"",outlined:"","error-messages":e.errors.name},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1)],1),e._v(" "),e.form.shipping_type_id==e.FLAT_RATE?r("v-row",{attrs:{dense:""}},[r("v-col",{attrs:{cols:"12",md:"12"}},[r("v-text-field",{attrs:{label:"Cost(RM)",placeholder:"0.00",dense:"",outlined:"","error-messages":e.errors.flat_rate.cost},model:{value:e.form.flat_rate.cost,callback:function(t){e.$set(e.form.flat_rate,"cost",t)},expression:"form.flat_rate.cost"}})],1),e._v(" "),r("v-col",{attrs:{cols:"12",md:"12"}},[r("v-select",{attrs:{label:"Courier",dense:"",items:e.courierList,"item-value":"id","item-text":"name","return-object":"",chips:"",multiple:""},model:{value:e.form.flat_rate.couriers,callback:function(t){e.$set(e.form.flat_rate,"couriers",t)},expression:"form.flat_rate.couriers"}})],1),e._v(" "),r("v-col",{attrs:{cols:"12",md:"12"}},[r("v-autocomplete",{attrs:{label:"Geo Zone",placeholder:"Geo Zone",dense:"",items:e.geoZoneList,"item-value":"id","item-text":"name","error-messages":e.errors.flat_rate.geo_zone_id},model:{value:e.form.flat_rate.geo_zone_id,callback:function(t){e.$set(e.form.flat_rate,"geo_zone_id",t)},expression:"form.flat_rate.geo_zone_id"}})],1)],1):e._e(),e._v(" "),e.form.shipping_type_id==e.BOX_TYPE_BASED?r("v-row",{attrs:{dense:""}},[r("v-col",{attrs:{cols:"12",md:"12"}},[r("v-text-field",{attrs:{label:"Cost(RM)",placeholder:"0.00",dense:"",outlined:"","error-messages":e.errors.box_type_based.cost},model:{value:e.form.box_type_based.cost,callback:function(t){e.$set(e.form.box_type_based,"cost",t)},expression:"form.box_type_based.cost"}})],1),e._v(" "),r("v-col",{attrs:{cols:"12",md:"12"}},[r("v-select",{attrs:{label:"Courier",dense:"",items:e.courierList,"item-value":"id","item-text":"name","return-object":"",chips:"",multiple:""},model:{value:e.form.box_type_based.couriers,callback:function(t){e.$set(e.form.box_type_based,"couriers",t)},expression:"form.box_type_based.couriers"}})],1),e._v(" "),r("v-col",{attrs:{cols:"12",md:"12"}},[r("v-autocomplete",{attrs:{label:"Box Type ID",placeholder:"Box Type ID",dense:"",items:e.boxTypeList,"item-value":"id","item-text":"title","error-messages":e.errors.box_type_based.box_type_id},model:{value:e.form.box_type_based.box_type_id,callback:function(t){e.$set(e.form.box_type_based,"box_type_id",t)},expression:"form.box_type_based.box_type_id"}})],1)],1):e._e(),e._v(" "),e.form.shipping_type_id==e.FREE_SHIPPING?r("v-row",{attrs:{dense:""}},[r("v-col",{attrs:{cols:"12",md:"12"}},[r("v-text-field",{attrs:{label:"Subtotal(RM)",placeholder:"0.00",dense:"",outlined:"","persistent-hint":"",hint:"Sub-Total amount needed before the free shipping module becomes available","error-messages":e.errors.free_shipping.subtotal},model:{value:e.form.free_shipping.subtotal,callback:function(t){e.$set(e.form.free_shipping,"subtotal",t)},expression:"form.free_shipping.subtotal"}})],1),e._v(" "),r("v-col",{attrs:{cols:"12",md:"12"}},[r("v-select",{attrs:{label:"Courier",dense:"",items:e.courierList,"item-value":"id","item-text":"name","return-object":"",chips:"",multiple:""},model:{value:e.form.free_shipping.couriers,callback:function(t){e.$set(e.form.free_shipping,"couriers",t)},expression:"form.free_shipping.couriers"}})],1),e._v(" "),r("v-col",{attrs:{cols:"12",md:"12"}},[r("v-autocomplete",{attrs:{label:"Geo Zone",placeholder:"Geo Zone",dense:"",items:e.geoZoneList,"item-value":"id","item-text":"name","error-messages":e.errors.free_shipping.geo_zone_id},model:{value:e.form.free_shipping.geo_zone_id,callback:function(t){e.$set(e.form.free_shipping,"geo_zone_id",t)},expression:"form.free_shipping.geo_zone_id"}})],1)],1):e._e(),e._v(" "),e.form.shipping_type_id==e.WEIGHT_BASED?r("v-row",{attrs:{dense:""}},[r("v-col",{attrs:{cols:"12",md:"6"}},[r("v-text-field",{attrs:{label:"First Weight(g)",placeholder:"0.00",dense:"",outlined:"","error-messages":e.errors.weight_based.first_weight},model:{value:e.form.weight_based.first_weight,callback:function(t){e.$set(e.form.weight_based,"first_weight",t)},expression:"form.weight_based.first_weight"}})],1),e._v(" "),r("v-col",{attrs:{cols:"12",md:"6"}},[r("v-text-field",{attrs:{label:"Price for First Weight(RM)",placeholder:"0.00",dense:"",outlined:"","error-messages":e.errors.weight_based.price_first_weight},model:{value:e.form.weight_based.price_first_weight,callback:function(t){e.$set(e.form.weight_based,"price_first_weight",t)},expression:"form.weight_based.price_first_weight"}})],1),e._v(" "),r("v-col",{attrs:{cols:"12",md:"6"}},[r("v-text-field",{attrs:{label:"Repeating Next Weight(g)",placeholder:"0.00",dense:"",outlined:"","error-messages":e.errors.weight_based.repeating_weight},model:{value:e.form.weight_based.repeating_weight,callback:function(t){e.$set(e.form.weight_based,"repeating_weight",t)},expression:"form.weight_based.repeating_weight"}})],1),e._v(" "),r("v-col",{attrs:{cols:"12",md:"6"}},[r("v-text-field",{attrs:{label:"Price for Repeating Next Weight(RM)",placeholder:"0.00",dense:"",outlined:"","error-messages":e.errors.weight_based.price_repeating_weight},model:{value:e.form.weight_based.price_repeating_weight,callback:function(t){e.$set(e.form.weight_based,"price_repeating_weight",t)},expression:"form.weight_based.price_repeating_weight"}})],1),e._v(" "),r("v-col",{attrs:{cols:"12",md:"6"}},[r("v-text-field",{attrs:{label:"Additional Fee (%)",placeholder:"0.00",dense:"",outlined:"","error-messages":e.errors.weight_based.additional_fee},model:{value:e.form.weight_based.additional_fee,callback:function(t){e.$set(e.form.weight_based,"additional_fee",t)},expression:"form.weight_based.additional_fee"}})],1),e._v(" "),r("v-col",{attrs:{cols:"12",md:"12"}},[r("v-select",{attrs:{label:"Courier",dense:"",items:e.courierList,"item-value":"id","item-text":"name","return-object":"",chips:"",multiple:""},model:{value:e.form.weight_based.couriers,callback:function(t){e.$set(e.form.weight_based,"couriers",t)},expression:"form.weight_based.couriers"}})],1),e._v(" "),r("v-col",{attrs:{cols:"12",md:"12"}},[r("v-autocomplete",{attrs:{label:"Geo Zone",placeholder:"Geo Zone",dense:"",items:e.geoZoneList,"item-value":"id","item-text":"name","error-messages":e.errors.weight_based.geo_zone_id},model:{value:e.form.weight_based.geo_zone_id,callback:function(t){e.$set(e.form.weight_based,"geo_zone_id",t)},expression:"form.weight_based.geo_zone_id"}})],1)],1):e._e(),e._v(" "),e.form.shipping_type_id==e.DYNAMIC_WEIGHT_BASED?r("v-row",{attrs:{dense:""}},[r("v-col",{attrs:{cols:"12",md:"12"}},[r("v-card",{attrs:{flat:"",dense:""}},[r("v-card-text",{staticClass:"ma-0 pa-0"},e._l(e.form.dynamic_weight_based.weights,(function(t,i){return r("v-row",{key:i,attrs:{dense:""}},[r("v-col",{attrs:{cols:"12",md:"5"}},[r("v-text-field",{attrs:{label:e.$options.filters.ordinal_suffix_of(i+1)+" Weight(g)",placeholder:"0.00",dense:"",outlined:""},model:{value:t.weight,callback:function(r){e.$set(t,"weight",r)},expression:"row.weight"}})],1),e._v(" "),r("v-col",{attrs:{cols:"12",md:"5"}},[r("v-text-field",{attrs:{label:e.$options.filters.ordinal_suffix_of(i+1)+" Price (RM)",placeholder:"0.00",dense:"",outlined:""},model:{value:t.price,callback:function(r){e.$set(t,"price",r)},expression:"row.price"}})],1),e._v(" "),r("v-col",{attrs:{cols:"12",md:"2"}},[r("v-btn",{staticClass:"text-capitalize",attrs:{text:"",color:"error",small:""},on:{click:function(t){return e.removeDynamicWeight(i)}}},[r("v-icon",{attrs:{left:""}},[e._v("mdi-minus")])],1)],1)],1)})),1),e._v(" "),r("v-card-actions",[r("v-btn",{staticClass:"text-capitalize",attrs:{color:"primary",small:""},on:{click:function(t){return e.addDynamicWeight()}}},[r("v-icon",{attrs:{left:""}},[e._v("mdi-plus")]),e._v("Weight\n\t\t\t\t\t\t\t")],1)],1)],1)],1),e._v(" "),r("v-col",{attrs:{cols:"12",md:"12"}},[r("v-select",{attrs:{label:"Courier",dense:"",items:e.courierList,"item-value":"id","item-text":"name","return-object":"",chips:"",multiple:""},model:{value:e.form.dynamic_weight_based.couriers,callback:function(t){e.$set(e.form.dynamic_weight_based,"couriers",t)},expression:"form.dynamic_weight_based.couriers"}})],1),e._v(" "),r("v-col",{attrs:{cols:"12",md:"12"}},[r("v-autocomplete",{attrs:{label:"Geo Zone",placeholder:"Geo Zone",dense:"",items:e.geoZoneList,"item-value":"id","item-text":"name","error-messages":e.errors.dynamic_weight_based.geo_zone_id},model:{value:e.form.dynamic_weight_based.geo_zone_id,callback:function(t){e.$set(e.form.dynamic_weight_based,"geo_zone_id",t)},expression:"form.dynamic_weight_based.geo_zone_id"}})],1)],1):e._e(),e._v(" "),r("v-row",{attrs:{dense:""}},[r("v-col",{attrs:{cols:"12",md:"12"}},[r("v-checkbox",{attrs:{dense:"",label:"Active","error-messages":e.errors.is_enabled,"persistent-hint":"",hint:"If checked, will auto-disable other similar shipping type"},model:{value:e.form.is_enabled,callback:function(t){e.$set(e.form,"is_enabled",t)},expression:"form.is_enabled"}})],1)],1)],1),e._v(" "),r("v-card-actions",[r("v-spacer"),e._v(" "),r("v-btn",{attrs:{color:"blue darken-1",text:"",title:"Cancel"},on:{click:function(t){return e.closeDialog()}}},[e._v("\n\t\t\t\tCancel\n\t\t\t")]),e._v(" "),r("v-btn",{attrs:{color:"blue darken-1",text:"",title:"Save",loading:e.submit_loading},on:{click:function(t){return e.submitForm(e.form)}}},[e._v("\n\t\t\t\tSave\n\t\t\t")])],1)],1)],1)}),[],!1,null,null,null).exports},3642:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>m});var i=r(4286),a=r(7302),o=r(6767),s=r(9175),n=r(9984),c=r(6777),l=r(5748),_=r(7753),u=r(6399),d=r(125);function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?p(Object(r),!0).forEach((function(t){h(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function h(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const v={components:{ShippingMethodCard:i.Z,ShippingMethodForm:a.Z,WActionBtnGroup:o.Z,WDropdownMenu:s.Z,WSearchBar:n.Z,WSideDialog:c.Z},mixins:[l.b,_.S,u.v],data:function(){return{table_headers:[{text:"#",value:"id"},{text:"Name",value:"name"},{text:"Type",value:"shipping_type.name"},{text:"Status",value:"is_enabled"},{text:"Actions",value:"action",class:"text-center"}],show_statistics:!1,view_module:!1,filter_dialog:!1,sort_dialog:!1,view_more_dialog:!1,filter_options:[],sort_options:[],searchBy_options:[{value:"id",text:"ID"},{value:"name",text:"Name"}],shipping_type_list:[],geo_zone_list:[],courier_list:[],box_type_list:[],FLAT_RATE:d.Z.FLAT_RATE,FREE_SHIPPING:d.Z.FREE_SHIPPING,WEIGHT_BASED:d.Z.WEIGHT_BASED,DYNAMIC_WEIGHT_BASED:d.Z.DYNAMIC_WEIGHT_BASED,BOX_TYPE_BASED:d.Z.BOX_TYPE_BASED}},created:function(){var e=this;this.search_.searchBy="name",this.options_.activity=this.getActivityRefs_(),this.getAllRefs_([this.getShippingTypeListRef(),this.getGeoZoneListRef(),this.getCourierListRef(),this.getBoxTypeListRef()]).then((function(){e.setupFilterBar(),e.initFilters(),e.setupSortOptions()})).then((function(){e.initialize_()}))},methods:{initFilters:function(){this.filters_={activity:1}},getResourceData_:function(){var e=this,t=f(f(f(f({},this.setPagination_()),this.search_),this.filters_),this.sort_);this.model_loading_=!0,this.$api.getShippingMethodList(t).then((function(t){var r=t.data.result,i=r.data,a=r.total;e.resourceDataSet_=i,e.totalData_=a})).catch((function(t){e.errorHandler_(t)})).finally((function(){e.model_loading_=!1}))},getShippingTypeListRef:function(){var e=this;this.$api.getShippingTypeList({}).then((function(t){e.shipping_type_list=t.data.result})).catch((function(t){e.errorHandler_(t)}))},getGeoZoneListRef:function(){var e=this;this.$api.getGeoZoneList({}).then((function(t){e.geo_zone_list=t.data.result})).catch((function(t){e.errorHandler_(t)}))},getCourierListRef:function(){var e=this;this.$api.getCourierAll({}).then((function(t){e.courier_list=t.data.result})).catch((function(t){e.errorHandler_(t)}))},getBoxTypeListRef:function(){var e=this;this.$api.getLockerBoxTypeList({itemsPerPage:99,only_bookable:1}).then((function(t){var r=t.data.result.data;e.box_type_list=r})).catch((function(t){e.errorHandler_(t)}))},archiveModel_:function(e){var t=this,r={id:e.id};this.$api.archiveShippingMethod(r).then((function(e){t.initialize_(),t.$toast.success(e.data.message)})).catch((function(e){t.errorHandler_(e)}))},newItem_:function(){var e=this.cloneDeep_({flat_rate:{},free_shipping:{},weight_based:{},dynamic_weight_based:{weights:[]},box_type_based:{}});this.bindAction_("new",e)},setupFilterBar:function(){this.filter_options=[{cols:12,model:"activity",label:"Activity",items:this.options_.activity}]},setupSortOptions:function(){this.sort_options=[{label:"id (ASC)",value:{sortBy:"id",sortDesc:0}},{label:"id (DESC)",value:{sortBy:"id",sortDesc:1}},{label:"Status (DISABLED)",value:{sortBy:"is_enabled",sortDesc:0}},{label:"Status (ENABLED)",value:{sortBy:"is_enabled",sortDesc:1}}],this.sort_=this.sort_options[0].value},menu_items:function(e){var t=this;return[{icon:"mdi-eye",title:"View More",action:function(){t.viewMore_(e)}},{icon:"mdi-content-duplicate",title:"Duplicate",action:function(){t.duplicateItem_(e)}},{icon:"mdi-square-edit-outline",title:"Edit",action:function(){t.editItem2(e)}},{icon:e.deleted_at?"mdi-delete-off":"mdi-delete",title:e.deleted_at?"Activate":"Archive",icon_class:"red--text",title_class:"red--text",action:function(){t.archiveModel_(e)}}]},editItem2:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};switch(e.shipping_type_id){case this.FLAT_RATE:e.free_shipping={},e.weight_based={},e.dynamic_weight_based={},e.box_type_based={};break;case this.FREE_SHIPPING:e.flat_rate={},e.weight_based={},e.dynamic_weight_based={},e.box_type_based={};break;case this.WEIGHT_BASED:e.free_shipping={},e.flat_rate={},e.dynamic_weight_based={},e.box_type_based={};break;case this.DYNAMIC_WEIGHT_BASED:e.free_shipping={},e.flat_rate={},e.weight_based={},e.box_type_based={};break;case this.BOX_TYPE_BASED:e.flat_rate={},e.free_shipping={},e.weight_based={},e.dynamic_weight_based={}}var t=this.cloneDeep_(e);this.bindAction_("edit",t)},action_btn_group_items:function(){var e=this;return[{icon:"mdi-refresh",disabled:this.model_loading_,action:function(){e.searchData_()}},{icon:"mdi-filter-outline",action:function(){e.filter_dialog=!0}},{icon:"mdi-sort",action:function(){e.sort_dialog=!0}}]},toggleStatus:function(e){var t=this,r=null,i=null;e.flat_rate&&(r=e.flat_rate.geo_zone_id),e.free_shipping&&(r=e.free_shipping.geo_zone_id),e.weight_based&&(r=e.weight_based.geo_zone_id),e.dynamic_weight_based&&(r=e.dynamic_weight_based.geo_zone_id),e.box_type_based&&(i=e.box_type_based.box_type_id);var a={id:e.id,shipping_type_id:e.shipping_type_id,is_enabled:e.is_enabled};r&&(a.geo_zone_id=r),i&&(a.box_type_id=i),this.$api.updateStatusShippingMethod(a).then((function(e){t.$toast.success(e.data.message),t.initialize_()}))}}};const m=(0,r(1900).Z)(v,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("v-container",[r("v-row",{attrs:{align:"end"}},[r("v-col",[r("div",{staticClass:"headline font-weight-bold"},[e._v("Shipping Method")]),e._v(" "),r("div",{staticClass:"subtitle-2 grey--text"},[e._v("List of shipping method available in the system")])])],1),e._v(" "),e.show_statistics?r("v-row",{staticClass:"ma-0"},[r("v-col",{attrs:{cols:"12",md:"4"}},[r("v-card",[r("v-icon",{attrs:{size:"150"}},[e._v("mdi-google-analytics")])],1)],1),e._v(" "),r("v-col",{attrs:{cols:"12",md:"4"}},[r("v-card",[r("v-icon",{attrs:{size:"150"}},[e._v("mdi-google-analytics")])],1)],1),e._v(" "),r("v-col",{attrs:{cols:"12",md:"4"}},[r("v-card",[r("v-icon",{attrs:{size:"150"}},[e._v("mdi-google-analytics")])],1)],1)],1):e._e(),e._v(" "),r("v-row",{staticClass:"mt-3",attrs:{dense:"",align:"center"}},[r("w-search-bar",{attrs:{search:e.search_.search,"search-by":e.search_.searchBy,disabled:e.model_loading_,items:e.searchBy_options},on:{"update:search":function(t){return e.$set(e.search_,"search",t)},"update:searchBy":function(t){return e.$set(e.search_,"searchBy",t)},"update:search-by":function(t){return e.$set(e.search_,"searchBy",t)},search:function(t){return e.searchData_()}}})],1),e._v(" "),r("v-row",{staticClass:"mt-3",attrs:{align:"center",justify:"end"}},[r("v-col",{attrs:{cols:"12",md:"auto"}},[r("v-btn",{staticClass:"text-capitalize",attrs:{color:"primary",small:""},on:{click:function(t){return e.newItem_()}}},[r("v-icon",{attrs:{left:""}},[e._v("mdi-plus")]),e._v("New\n\t\t\t")],1)],1),e._v(" "),r("v-spacer"),e._v(" "),r("v-col",{attrs:{cols:"auto"}},[r("w-action-btn-group",{attrs:{items:e.action_btn_group_items()}})],1)],1),e._v(" "),r("v-card",{staticClass:"mt-4",attrs:{color:"transparent",flat:""}},[r("v-data-table",{ref:"dataTable",class:e.view_module?"row-gap":"",attrs:{headers:e.table_headers,items:e.resourceDataSet_,options:e.settings_,"server-items-length":e.totalData_,"footer-props":{"items-per-page-options":[5,10,25,50]},loading:e.model_loading_,"disable-sort":"","hide-default-header":e.view_module,"item-class":e.row_classes_},on:{"update:options":function(t){e.settings_=t}},scopedSlots:e._u([e.view_module?{key:"body",fn:function(t){var i=t.items,a=t.headers;return[r("td",{attrs:{colspan:a.length}},[r("v-row",{staticClass:"ma-0",attrs:{dense:""}},e._l(i,(function(t){return r("v-col",{key:t.id,attrs:{cols:"12",sm:"6",md:"4",lg:"3"}},[r("ShippingMethodCard",{staticClass:"glowable-small",attrs:{item:t,menu:e.menu_items(t)}})],1)})),1)],1)]}}:null,{key:"item.is_enabled",fn:function(t){var i=t.item;return[r("v-switch",{attrs:{inset:"",label:i.is_enabled?"Enabled":"Disabled"},on:{change:function(t){return e.toggleStatus(i)}},model:{value:i.is_enabled,callback:function(t){e.$set(i,"is_enabled",t)},expression:"item.is_enabled"}})]}},{key:"item.action",fn:function(t){var i=t.item;return[r("v-btn",{attrs:{icon:"",small:"",to:"/shipping-method/info/"+i.id}},[r("v-icon",{attrs:{small:""}},[e._v("mdi-eye")])],1),e._v(" "),r("w-dropdown-menu",{attrs:{left:"",bottom:"",items:e.menu_items(i)}})]}}],null,!0)})],1),e._v(" "),r("v-dialog",{attrs:{"max-width":"550px",persistent:""},model:{value:e.form_dialog_,callback:function(t){e.form_dialog_=t},expression:"form_dialog_"}},[r("ShippingMethodForm",{attrs:{item:e.form_item_,action:e.form_action_,visible:e.form_dialog_,"shipping-type-list":e.shipping_type_list,"geo-zone-list":e.geo_zone_list,"courier-list":e.courier_list,"box-type-list":e.box_type_list},on:{"update:visible":function(t){e.form_dialog_=t},initialize:function(t){return e.initialize_()}}})],1),e._v(" "),r("w-side-dialog",{attrs:{title:"Filters",clearable:""},on:{clear:function(t){return e.initFilters()}},scopedSlots:e._u([{key:"default",fn:function(){return[r("v-row",{attrs:{dense:""}},[e._l(e.filter_options,(function(t,i){return[r("v-col",{key:i,attrs:{cols:"12"}},[r("v-select",{staticClass:"caption",attrs:{label:t.label,items:t.items,outlined:"",dense:"","hide-details":""},model:{value:e.filters_[t.model],callback:function(r){e.$set(e.filters_,t.model,r)},expression:"filters_[filter.model]"}})],1)]}))],2)]},proxy:!0},{key:"actions",fn:function(){return[r("div",{staticClass:"text-right"},[r("v-btn",{attrs:{rounded:"",block:"",color:"primary"},on:{click:function(t){return e.searchData_()}}},[e._v("\n\t\t\t\t\tApply\n\t\t\t\t")])],1)]},proxy:!0}]),model:{value:e.filter_dialog,callback:function(t){e.filter_dialog=t},expression:"filter_dialog"}}),e._v(" "),r("w-side-dialog",{attrs:{title:"Sort"},scopedSlots:e._u([{key:"default",fn:function(){return[r("v-radio-group",{staticClass:"mt-0",attrs:{dense:"","hide-details":"",mandatory:""},model:{value:e.sort_,callback:function(t){e.sort_=t},expression:"sort_"}},[e._l(e.sort_options,(function(e,t){return[r("v-radio",{key:t,attrs:{label:e.label,value:e.value}})]}))],2)]},proxy:!0},{key:"actions",fn:function(){return[r("div",{staticClass:"text-right"},[r("v-btn",{attrs:{rounded:"",block:"",color:"primary"},on:{click:function(t){return e.searchData_()}}},[e._v("\n\t\t\t\t\tApply\n\t\t\t\t")])],1)]},proxy:!0}]),model:{value:e.sort_dialog,callback:function(t){e.sort_dialog=t},expression:"sort_dialog"}}),e._v(" "),r("v-navigation-drawer",{style:e.$vuetify.breakpoint.mdAndUp?"min-width: 350px;":"",attrs:{floating:"",app:"",right:"",temporary:""},model:{value:e.view_dialog_,callback:function(t){e.view_dialog_=t},expression:"view_dialog_"}},[r("v-card",{attrs:{height:"100%"}},[r("ShippingMethodCard",{staticClass:"v-card--flat",attrs:{item:e.view_item_}})],1)],1)],1)}),[],!1,null,null,null).exports}}]);