(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-vendors~4b835b6b"],{"00ef":function(e,t,n){"use strict";var i=n("bf82");n("4c44");t["a"]=i["a"]},"0103":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var i=n("9ab4"),r=n("5b94"),o=n("e076"),s=n("a54d"),a=function(){function e(e){if(this.hash=new o.RawSha256,e){this.outer=new o.RawSha256;var t=c(e),n=new Uint8Array(r.BLOCK_SIZE);n.set(t);for(var i=0;i<r.BLOCK_SIZE;i++)t[i]^=54,n[i]^=92;this.hash.update(t),this.outer.update(n);for(i=0;i<t.byteLength;i++)t[i]=0}}return e.prototype.update=function(e){if(!(0,s.isEmptyData)(e)&&!this.error)try{this.hash.update((0,s.convertToBuffer)(e))}catch(t){this.error=t}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return(0,i.__awaiter)(this,void 0,void 0,(function(){return(0,i.__generator)(this,(function(e){return[2,this.digestSync()]}))}))},e}();function c(e){var t=(0,s.convertToBuffer)(e);if(t.byteLength>r.BLOCK_SIZE){var n=new o.RawSha256;n.update(t),t=n.digest()}var i=new Uint8Array(r.BLOCK_SIZE);return i.set(t),i}t.Sha256=a},"01f4":function(e,t,n){},"034d":function(e,t,n){"use strict";function i(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=!1;function o(){r||(r=!0,e.$nextTick((function(){r=!1,n()})))}var s=!0,a=!1,c=void 0;try{for(var l,u=t[Symbol.iterator]();!(s=(l=u.next()).done);s=!0){var d=l.value;e.$watch(d,o,{immediate:i})}}catch(h){a=!0,c=h}finally{try{!s&&u.return&&u.return()}finally{if(a)throw c}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i},"05c0":function(e,t,n){"use strict";var i=n("2b0e"),r=n("c474"),o=n("463c"),s=n("7ee0"),a=n("9e62"),c=n("7562"),l=n("0831"),u=n("d882"),d=n("f249"),h=n("e277"),p=n("2f79");const f={role:"tooltip"};t["a"]=i["default"].extend({name:"QTooltip",mixins:[r["a"],o["a"],s["a"],a["c"],c["a"]],props:{maxHeight:{type:String,default:null},maxWidth:{type:String,default:null},transitionShow:{default:"jump-down"},transitionHide:{default:"jump-up"},anchor:{type:String,default:"bottom middle",validator:p["d"]},self:{type:String,default:"top middle",validator:p["d"]},offset:{type:Array,default:()=>[14,14],validator:p["c"]},scrollTarget:{default:void 0},delay:{type:Number,default:0},hideDelay:{type:Number,default:0}},computed:{anchorOrigin(){return Object(p["a"])(this.anchor,this.$q.lang.rtl)},selfOrigin(){return Object(p["a"])(this.self,this.$q.lang.rtl)},hideOnRouteChange(){return!0!==this.persistent}},methods:{__show(e){this.__showPortal(),this.__registerTick(()=>{this.observer=new MutationObserver(()=>this.updatePosition()),this.observer.observe(this.__portal.$el,{attributes:!1,childList:!0,characterData:!0,subtree:!0}),this.updatePosition(),this.__configureScrollTarget()}),void 0===this.unwatch&&(this.unwatch=this.$watch(()=>this.$q.screen.width+"|"+this.$q.screen.height+"|"+this.self+"|"+this.anchor+"|"+this.$q.lang.rtl,this.updatePosition)),this.__registerTimeout(()=>{this.__showPortal(!0),this.$emit("show",e)},300)},__hide(e){this.__removeTick(),this.__anchorCleanup(),this.__hidePortal(),this.__registerTimeout(()=>{this.__hidePortal(!0),this.$emit("hide",e)},300)},__anchorCleanup(){void 0!==this.observer&&(this.observer.disconnect(),this.observer=void 0),void 0!==this.unwatch&&(this.unwatch(),this.unwatch=void 0),this.__unconfigureScrollTarget(),Object(u["b"])(this,"tooltipTemp")},updatePosition(){if(void 0===this.anchorEl||void 0===this.__portal)return;const e=this.__portal.$el;8!==e.nodeType?Object(p["b"])({el:e,offset:this.offset,anchorEl:this.anchorEl,anchorOrigin:this.anchorOrigin,selfOrigin:this.selfOrigin,maxHeight:this.maxHeight,maxWidth:this.maxWidth}):setTimeout(this.updatePosition,25)},__delayShow(e){if(!0===this.$q.platform.is.mobile){Object(d["a"])(),document.body.classList.add("non-selectable");const e=this.anchorEl,t=["touchmove","touchcancel","touchend","click"].map(t=>[e,t,"__delayHide","passiveCapture"]);Object(u["a"])(this,"tooltipTemp",t)}this.__registerTimeout(()=>{this.show(e)},this.delay)},__delayHide(e){!0===this.$q.platform.is.mobile&&(Object(u["b"])(this,"tooltipTemp"),Object(d["a"])(),setTimeout(()=>{document.body.classList.remove("non-selectable")},10)),this.__registerTimeout(()=>{this.hide(e)},this.hideDelay)},__configureAnchorEl(){if(!0===this.noParentEvent||void 0===this.anchorEl)return;const e=!0===this.$q.platform.is.mobile?[[this.anchorEl,"touchstart","__delayShow","passive"]]:[[this.anchorEl,"mouseenter","__delayShow","passive"],[this.anchorEl,"mouseleave","__delayHide","passive"]];Object(u["a"])(this,"anchor",e)},__unconfigureScrollTarget(){void 0!==this.__scrollTarget&&(this.__changeScrollEvent(this.__scrollTarget),this.__scrollTarget=void 0)},__configureScrollTarget(){if(void 0!==this.anchorEl||void 0!==this.scrollTarget){this.__scrollTarget=Object(l["d"])(this.anchorEl,this.scrollTarget);const e=!0===this.noParentEvent?this.updatePosition:this.hide;this.__changeScrollEvent(this.__scrollTarget,e)}},__renderPortal(e){return e("transition",{props:{...this.transitionProps}},[!0===this.showing?e("div",{staticClass:"q-tooltip q-tooltip--style q-position-engine no-pointer-events",class:this.contentClass,style:this.contentStyle,attrs:f},Object(h["c"])(this,"default")):null])}},created(){this.__useTick("__registerTick","__removeTick"),this.__useTimeout("__registerTimeout")},mounted(){this.__processModelChange(this.value)}})},"0990":function(e,t,n){},"0a78":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},r=n("7a03"),o=f(r),s=n("2adb"),a=n("ce18"),c=f(a),l=n("5836"),u=f(l),d=n("034d"),h=f(d),p=n("b7d9");function f(e){return e&&e.__esModule?e:{default:e}}var g={zoom:{twoWay:!0,type:Number},pov:{twoWay:!0,type:Object,trackProperties:["pitch","heading"]},position:{twoWay:!0,type:Object,noBind:!0},pano:{twoWay:!0,type:String},motionTracking:{twoWay:!1,type:Boolean},visible:{twoWay:!0,type:Boolean,default:!0},options:{twoWay:!1,type:Object,default:function(){return{}}}},m=["closeclick","status_changed"];t.default={mixins:[c.default],props:(0,p.mappedPropsToVueProps)(g),replace:!1,methods:{resize:function(){this.$panoObject&&google.maps.event.trigger(this.$panoObject,"resize")}},provide:function(){var e=this,t=new Promise((function(t,n){e.$panoPromiseDeferred={resolve:t,reject:n}}));return{$panoPromise:t,$mapPromise:t}},computed:{finalLat:function(){return this.position&&"function"===typeof this.position.lat?this.position.lat():this.position.lat},finalLng:function(){return this.position&&"function"===typeof this.position.lng?this.position.lng():this.position.lng},finalLatLng:function(){return{lat:this.finalLat,lng:this.finalLng}}},watch:{zoom:function(e){this.$panoObject&&this.$panoObject.setZoom(e)}},mounted:function(){var e=this;return this.$gmapApiPromiseLazy().then((function(){var t=e.$refs["vue-street-view-pano"],n=i({},e.options,(0,s.getPropsValues)(e,g));return delete n.options,e.$panoObject=new google.maps.StreetViewPanorama(t,n),(0,s.bindProps)(e,e.$panoObject,g),(0,o.default)(e,e.$panoObject,m),(0,u.default)((function(t,n,i){t(),e.$panoObject.addListener("position_changed",(function(){i()&&e.$emit("position_changed",e.$panoObject.getPosition()),n()})),(0,h.default)(e,["finalLat","finalLng"],(function(){t(),e.$panoObject.setPosition(e.finalLatLng)}))})),e.$panoPromiseDeferred.resolve(e.$panoObject),e.$panoPromise})).catch((function(e){throw e}))}}},"0aa5":function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e._self._c;return t("div",[t("q-card",{staticClass:"bg-primary text-white full-height",staticStyle:{width:"100%"}},[t("q-bar",[t("q-space"),!1!==e.close?t("q-btn",{directives:[{name:"close-popup",rawName:"v-close-popup"}],attrs:{dense:"",flat:"",icon:"close"},on:{click:e.onClose}},[t("q-tooltip",{attrs:{"content-class":"bg-white text-primary"}},[e._v("Close")])],1):e._e()],1),t("div",{staticClass:"row justify-center col-12 col-md-6 bg-primary"},[t("q-card-section",{staticClass:"row col-12 col-sm-10 col-md-7"},[e._t("header")],2),t("q-card-section",{staticClass:"q-pt-none row col-12 col-sm-10 col-md-7"},[t("div",{staticStyle:{width:"100%"}},[e._t("default")],2)])],1)],1)],1)},r=[],o=n("f09f"),s=n("a370"),a=n("2c91"),c=n("d847"),l=n("05c0");const u={QCard:o["a"],QCardSection:s["a"],QSpace:a["a"],QBar:c["a"],QTooltip:l["a"]};var d={props:["title","btn-right","btnRight2","close"],components:{...u},methods:{onClickbtn(){this.$emit("on-confirm")},onClickbtn2(){this.$emit("on-express")},onClose(){this.$emit("on-close")}}},h=d,p=n("2877"),f=Object(p["a"])(h,i,r,!1,null,null,null);t["default"]=f.exports},"0c5e":function(e,t,n){"use strict";n.r(t);var i=n("0c5ed"),r=n.n(i);for(var o in i)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(o);t["default"]=r.a},"0c5ed":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n("2adb"),r=n("108f"),o=s(r);function s(e){return e&&e.__esModule?e:{default:e}}function a(e,t){var n={};for(var i in e)t.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}var c={bounds:{type:Object},defaultPlace:{type:String,default:""},componentRestrictions:{type:Object,default:null},types:{type:Array,default:function(){return[]}},placeholder:{required:!1,type:String},className:{required:!1,type:String},label:{required:!1,type:String,default:null},selectFirstOnEnter:{require:!1,type:Boolean,default:!1}};t.default={mounted:function(){var e=this,t=this.$refs.input;t.value=this.defaultPlace,this.$watch("defaultPlace",(function(){t.value=e.defaultPlace})),this.$gmapApiPromiseLazy().then((function(){var t=(0,i.getPropsValues)(e,c);if(e.selectFirstOnEnter&&(0,o.default)(e.$refs.input),"function"!==typeof google.maps.places.Autocomplete)throw new Error("google.maps.places.Autocomplete is undefined. Did you add 'places' to libraries when loading Google Maps?");e.autoCompleter=new google.maps.places.Autocomplete(e.$refs.input,t);c.placeholder,c.place,c.defaultPlace,c.className,c.label,c.selectFirstOnEnter;var n=a(c,["placeholder","place","defaultPlace","className","label","selectFirstOnEnter"]);(0,i.bindProps)(e,e.autoCompleter,n),e.autoCompleter.addListener("place_changed",(function(){e.$emit("place_changed",e.autoCompleter.getPlace())}))}))},created:function(){console.warn("The PlaceInput class is deprecated! Please consider using the Autocomplete input instead")},props:c}},"0cf4":function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e._self._c;return t("div",{},[e.isFreeGiftCampaign?t("div",{staticClass:"free-gift-campaign q-pa-sm text-center text-red tw-flex tw-gap-2 tw-items-center tw-justify-center"},[t("div",[e._v(e._s(e.$t("🎠You're getting a FREE water gun! (Promotion is available at selected branches only!)"))+" ")]),t("q-btn",{attrs:{size:"sm",flat:"",dense:"",color:"grey",icon:"fas fa-info-circle"},on:{click:function(t){e.availableBranchDialog.show=!0}}})],1):e._e(),t("q-dialog",{model:{value:e.availableBranchDialog.show,callback:function(t){e.$set(e.availableBranchDialog,"show",t)},expression:"availableBranchDialog.show"}},[t("q-card",{staticStyle:{"min-width":"400px"}},[t("q-card-section",[t("div",{staticClass:"text-h6"},[e._v(e._s(e.$t("Stores in this promotion")))])]),t("q-card-section",{staticClass:"q-pt-none"},[t("div",{staticClass:"q-gutter-sm q-px-lg"},e._l(e.branchWithDetails,(function(n,i){return t("li",{key:i},[e._v(" "+e._s("th"===e.$i18n.locale?n.name_th:n.name)+" ")])})),0)]),t("q-card-actions",{attrs:{align:"right"}},[t("q-btn",{directives:[{name:"close-popup",rawName:"v-close-popup"}],attrs:{flat:"",label:"OK",color:"primary"}})],1)],1)],1)],1)},r=[],o=n("d8af"),s=n("24e8"),a=n("f09f"),c=n("a370"),l=n("4b7e"),u=n("9c40"),d={name:"FreeGiftCampaign",props:{subTotal:{type:Number,default:0}},components:{QDialog:s["a"],QCard:a["a"],QCardSection:c["a"],QCardActions:l["a"],QBtn:u["a"]},data(){return{freeGiftMinSpend:3990,branchCodes:["1000","1011","1049","1030","1055","1014","1026","1006","1046","1044","1017","1003"],availableBranchDialog:{show:!1}}},computed:{isCampaignActive(){return!1},isFreeGiftCampaign(){return this.subTotal>=this.freeGiftMinSpend&&this.isCampaignActive},branchWithDetails(){return this.branchCodes.map(e=>{const t=Object(o["c"])(e);return t})}},mounted(){}},h=d,p=n("2877"),f=Object(p["a"])(h,i,r,!1,null,null,null);t["default"]=f.exports},"0e54":function(e,t,n){(function(t,n){e.exports=n()})(0,(function(){"use strict";function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function t(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}function n(e,t){if(e){if("string"===typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function r(e,t){var i;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(i=n(e))||t&&e&&"number"===typeof e.length){i&&(e=i);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return i=e[Symbol.iterator](),i.next.bind(i)}function o(e){var t={exports:{}};return e(t,t.exports),t.exports}var s=o((function(e){function t(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function n(t){e.exports.defaults=t}e.exports={defaults:t(),getDefaults:t,changeDefaults:n}})),a=/[&<>"']/,c=/[&<>"']/g,l=/[<>"']|&(?!#?\w+;)/,u=/[<>"']|&(?!#?\w+;)/g,d={"&":"&","<":"<",">":">",'"':""","'":"'"},h=function(e){return d[e]};function p(e,t){if(t){if(a.test(e))return e.replace(c,h)}else if(l.test(e))return e.replace(u,h);return e}var f=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function g(e){return e.replace(f,(function(e,t){return t=t.toLowerCase(),"colon"===t?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var m=/(^|[^\[])\^/g;function y(e,t){e=e.source||e,t=t||"";var n={replace:function(t,i){return i=i.source||i,i=i.replace(m,"$1"),e=e.replace(t,i),n},getRegex:function(){return new RegExp(e,t)}};return n}var b=/[^\w:]/g,v=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function _(e,t,n){if(e){var i;try{i=decodeURIComponent(g(n)).replace(b,"").toLowerCase()}catch(r){return null}if(0===i.indexOf("javascript:")||0===i.indexOf("vbscript:")||0===i.indexOf("data:"))return null}t&&!v.test(n)&&(n=x(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(r){return null}return n}var w={},k=/^[^:]+:\/*[^/]*$/,S=/^([^:]+:)[\s\S]*$/,C=/^([^:]+:\/*[^/]*)[\s\S]*$/;function x(e,t){w[" "+e]||(k.test(e)?w[" "+e]=e+"/":w[" "+e]=A(e,"/",!0)),e=w[" "+e];var n=-1===e.indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(S,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(C,"$1")+t:e+t}var I={exec:function(){}};function P(e){for(var t,n,i=1;i<arguments.length;i++)for(n in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function O(e,t){var n=e.replace(/\|/g,(function(e,t,n){var i=!1,r=t;while(--r>=0&&"\\"===n[r])i=!i;return i?"|":" |"})),i=n.split(/ \|/),r=0;if(i.length>t)i.splice(t);else while(i.length<t)i.push("");for(;r<i.length;r++)i[r]=i[r].trim().replace(/\\\|/g,"|");return i}function A(e,t,n){var i=e.length;if(0===i)return"";var r=0;while(r<i){var o=e.charAt(i-r-1);if(o!==t||n){if(o===t||!n)break;r++}else r++}return e.substr(0,i-r)}function T(e,t){if(-1===e.indexOf(t[1]))return-1;for(var n=e.length,i=0,r=0;r<n;r++)if("\\"===e[r])r++;else if(e[r]===t[0])i++;else if(e[r]===t[1]&&(i--,i<0))return r;return-1}function E(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function j(e,t){if(t<1)return"";var n="";while(t>1)1&t&&(n+=e),t>>=1,e+=e;return n+e}var $={escape:p,unescape:g,edit:y,cleanUrl:_,resolveUrl:x,noopTest:I,merge:P,splitCells:O,rtrim:A,findClosingBracket:T,checkSanitizeDeprecation:E,repeatString:j},L=s.defaults,M=$.rtrim,N=$.splitCells,q=$.escape,U=$.findClosingBracket;function R(e,t,n){var i=t.href,r=t.title?q(t.title):null,o=e[1].replace(/\\([\[\]])/g,"$1");return"!"!==e[0].charAt(0)?{type:"link",raw:n,href:i,title:r,text:o}:{type:"image",raw:n,href:i,title:r,text:q(o)}}function B(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var i=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);if(null===t)return e;var n=t[0];return n.length>=i.length?e.slice(i.length):e})).join("\n")}var D=function(){function e(e){this.options=e||L}var t=e.prototype;return t.space=function(e){var t=this.rules.block.newline.exec(e);if(t)return t[0].length>1?{type:"space",raw:t[0]}:{raw:"\n"}},t.code=function(e,t){var n=this.rules.block.code.exec(e);if(n){var i=t[t.length-1];if(i&&"paragraph"===i.type)return{raw:n[0],text:n[0].trimRight()};var r=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:M(r,"\n")}}},t.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],i=B(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim():t[2],text:i}}},t.heading=function(e){var t=this.rules.block.heading.exec(e);if(t){var n=t[2].trim();if(/#$/.test(n)){var i=M(n,"#");this.options.pedantic?n=i.trim():i&&!/ $/.test(i)||(n=i.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n}}},t.nptable=function(e){var t=this.rules.block.nptable.exec(e);if(t){var n={type:"table",header:N(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[],raw:t[0]};if(n.header.length===n.align.length){var i,r=n.align.length;for(i=0;i<r;i++)/^ *-+: *$/.test(n.align[i])?n.align[i]="right":/^ *:-+: *$/.test(n.align[i])?n.align[i]="center":/^ *:-+ *$/.test(n.align[i])?n.align[i]="left":n.align[i]=null;for(r=n.cells.length,i=0;i<r;i++)n.cells[i]=N(n.cells[i],n.header.length);return n}}},t.hr=function(e){var t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}},t.blockquote=function(e){var t=this.rules.block.blockquote.exec(e);if(t){var n=t[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:t[0],text:n}}},t.list=function(e){var t=this.rules.block.list.exec(e);if(t){var n,i,r,o,s,a,c,l,u=t[0],d=t[2],h=d.length>1,p={type:"list",raw:u,ordered:h,start:h?+d.slice(0,-1):"",loose:!1,items:[]},f=t[0].match(this.rules.block.item),g=!1,m=f.length;r=this.rules.block.listItemStart.exec(f[0]);for(var y=0;y<m;y++){if(n=f[y],u=n,y!==m-1){if(o=this.rules.block.listItemStart.exec(f[y+1]),this.options.pedantic?o[1].length>r[1].length:o[1].length>r[0].length||o[1].length>3){f.splice(y,2,f[y]+"\n"+f[y+1]),y--,m--;continue}(!this.options.pedantic||this.options.smartLists?o[2][o[2].length-1]!==d[d.length-1]:h===(1===o[2].length))&&(s=f.slice(y+1).join("\n"),p.raw=p.raw.substring(0,p.raw.length-s.length),y=m-1),r=o}i=n.length,n=n.replace(/^ *([*+-]|\d+[.)]) ?/,""),~n.indexOf("\n ")&&(i-=n.length,n=this.options.pedantic?n.replace(/^ {1,4}/gm,""):n.replace(new RegExp("^ {1,"+i+"}","gm"),"")),a=g||/\n\n(?!\s*$)/.test(n),y!==m-1&&(g="\n"===n.charAt(n.length-1),a||(a=g)),a&&(p.loose=!0),this.options.gfm&&(c=/^\[[ xX]\] /.test(n),l=void 0,c&&(l=" "!==n[1],n=n.replace(/^\[[ xX]\] +/,""))),p.items.push({type:"list_item",raw:u,task:c,checked:l,loose:a,text:n})}return p}},t.html=function(e){var t=this.rules.block.html.exec(e);if(t)return{type:this.options.sanitize?"paragraph":"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):q(t[0]):t[0]}},t.def=function(e){var t=this.rules.block.def.exec(e);if(t){t[3]&&(t[3]=t[3].substring(1,t[3].length-1));var n=t[1].toLowerCase().replace(/\s+/g," ");return{tag:n,raw:t[0],href:t[2],title:t[3]}}},t.table=function(e){var t=this.rules.block.table.exec(e);if(t){var n={type:"table",header:N(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=t[0];var i,r=n.align.length;for(i=0;i<r;i++)/^ *-+: *$/.test(n.align[i])?n.align[i]="right":/^ *:-+: *$/.test(n.align[i])?n.align[i]="center":/^ *:-+ *$/.test(n.align[i])?n.align[i]="left":n.align[i]=null;for(r=n.cells.length,i=0;i<r;i++)n.cells[i]=N(n.cells[i].replace(/^ *\| *| *\| *$/g,""),n.header.length);return n}}},t.lheading=function(e){var t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1]}},t.paragraph=function(e){var t=this.rules.block.paragraph.exec(e);if(t)return{type:"paragraph",raw:t[0],text:"\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1]}},t.text=function(e,t){var n=this.rules.block.text.exec(e);if(n){var i=t[t.length-1];return i&&"text"===i.type?{raw:n[0],text:n[0]}:{type:"text",raw:n[0],text:n[0]}}},t.escape=function(e){var t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:q(t[1])}},t.tag=function(e,t,n){var i=this.rules.inline.tag.exec(e);if(i)return!t&&/^<a /i.test(i[0])?t=!0:t&&/^<\/a>/i.test(i[0])&&(t=!1),!n&&/^<(pre|code|kbd|script)(\s|>)/i.test(i[0])?n=!0:n&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(i[0])&&(n=!1),{type:this.options.sanitize?"text":"html",raw:i[0],inLink:t,inRawBlock:n,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):q(i[0]):i[0]}},t.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var n=t[2].trim();if(!this.options.pedantic&&/^</.test(n)){if(!/>$/.test(n))return;var i=M(n.slice(0,-1),"\\");if((n.length-i.length)%2===0)return}else{var r=U(t[2],"()");if(r>-1){var o=0===t[0].indexOf("!")?5:4,s=o+t[1].length+r;t[2]=t[2].substring(0,r),t[0]=t[0].substring(0,s).trim(),t[3]=""}}var a=t[2],c="";if(this.options.pedantic){var l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(a);l&&(a=l[1],c=l[3])}else c=t[3]?t[3].slice(1,-1):"";return a=a.trim(),/^</.test(a)&&(a=this.options.pedantic&&!/>$/.test(n)?a.slice(1):a.slice(1,-1)),R(t,{href:a?a.replace(this.rules.inline._escapes,"$1"):a,title:c?c.replace(this.rules.inline._escapes,"$1"):c},t[0])}},t.reflink=function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var i=(n[2]||n[1]).replace(/\s+/g," ");if(i=t[i.toLowerCase()],!i||!i.href){var r=n[0].charAt(0);return{type:"text",raw:r,text:r}}return R(n,i,n[0])}},t.strong=function(e,t,n){void 0===n&&(n="");var i=this.rules.inline.strong.start.exec(e);if(i&&(!i[1]||i[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var r,o="**"===i[0]?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;o.lastIndex=0;while(null!=(i=o.exec(t)))if(r=this.rules.inline.strong.middle.exec(t.slice(0,i.index+3)),r)return{type:"strong",raw:e.slice(0,r[0].length),text:e.slice(2,r[0].length-2)}}},t.em=function(e,t,n){void 0===n&&(n="");var i=this.rules.inline.em.start.exec(e);if(i&&(!i[1]||i[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var r,o="*"===i[0]?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;o.lastIndex=0;while(null!=(i=o.exec(t)))if(r=this.rules.inline.em.middle.exec(t.slice(0,i.index+2)),r)return{type:"em",raw:e.slice(0,r[0].length),text:e.slice(1,r[0].length-1)}}},t.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),i=/[^ ]/.test(n),r=/^ /.test(n)&&/ $/.test(n);return i&&r&&(n=n.substring(1,n.length-1)),n=q(n,!0),{type:"codespan",raw:t[0],text:n}}},t.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},t.del=function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2]}},t.autolink=function(e,t){var n,i,r=this.rules.inline.autolink.exec(e);if(r)return"@"===r[2]?(n=q(this.options.mangle?t(r[1]):r[1]),i="mailto:"+n):(n=q(r[1]),i=n),{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}},t.url=function(e,t){var n;if(n=this.rules.inline.url.exec(e)){var i,r;if("@"===n[2])i=q(this.options.mangle?t(n[0]):n[0]),r="mailto:"+i;else{var o;do{o=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(o!==n[0]);i=q(n[0]),r="www."===n[1]?"http://"+i:i}return{type:"link",raw:n[0],text:i,href:r,tokens:[{type:"text",raw:i,text:i}]}}},t.inlineText=function(e,t,n){var i,r=this.rules.inline.text.exec(e);if(r)return i=t?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):q(r[0]):r[0]:q(this.options.smartypants?n(r[0]):r[0]),{type:"text",raw:r[0],text:i}},e}(),z=$.noopTest,F=$.edit,W=$.merge,H={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?! {0,3}bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:z,table:z,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};H.def=F(H.def).replace("label",H._label).replace("title",H._title).getRegex(),H.bullet=/(?:[*+-]|\d{1,9}[.)])/,H.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,H.item=F(H.item,"gm").replace(/bull/g,H.bullet).getRegex(),H.listItemStart=F(/^( *)(bull)/).replace("bull",H.bullet).getRegex(),H.list=F(H.list).replace(/bull/g,H.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+H.def.source+")").getRegex(),H._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",H._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,H.html=F(H.html,"i").replace("comment",H._comment).replace("tag",H._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),H.paragraph=F(H._paragraph).replace("hr",H.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.blockquote=F(H.blockquote).replace("paragraph",H.paragraph).getRegex(),H.normal=W({},H),H.gfm=W({},H.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n {0,3}([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n {0,3}\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),H.gfm.nptable=F(H.gfm.nptable).replace("hr",H.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.gfm.table=F(H.gfm.table).replace("hr",H.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.pedantic=W({},H.normal,{html:F("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",H._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:z,paragraph:F(H.normal._paragraph).replace("hr",H.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",H.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var V={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:z,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation_\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation*\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation_\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation*\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:z,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\s*punctuation])/,_punctuation:"!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~"};V.punctuation=F(V.punctuation).replace(/punctuation/g,V._punctuation).getRegex(),V._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",V._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",V._comment=F(H._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),V.em.start=F(V.em.start).replace(/punctuation/g,V._punctuation).getRegex(),V.em.middle=F(V.em.middle).replace(/punctuation/g,V._punctuation).replace(/overlapSkip/g,V._overlapSkip).getRegex(),V.em.endAst=F(V.em.endAst,"g").replace(/punctuation/g,V._punctuation).getRegex(),V.em.endUnd=F(V.em.endUnd,"g").replace(/punctuation/g,V._punctuation).getRegex(),V.strong.start=F(V.strong.start).replace(/punctuation/g,V._punctuation).getRegex(),V.strong.middle=F(V.strong.middle).replace(/punctuation/g,V._punctuation).replace(/overlapSkip/g,V._overlapSkip).getRegex(),V.strong.endAst=F(V.strong.endAst,"g").replace(/punctuation/g,V._punctuation).getRegex(),V.strong.endUnd=F(V.strong.endUnd,"g").replace(/punctuation/g,V._punctuation).getRegex(),V.blockSkip=F(V._blockSkip,"g").getRegex(),V.overlapSkip=F(V._overlapSkip,"g").getRegex(),V._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,V._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,V._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,V.autolink=F(V.autolink).replace("scheme",V._scheme).replace("email",V._email).getRegex(),V._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,V.tag=F(V.tag).replace("comment",V._comment).replace("attribute",V._attribute).getRegex(),V._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,V._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,V._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,V.link=F(V.link).replace("label",V._label).replace("href",V._href).replace("title",V._title).getRegex(),V.reflink=F(V.reflink).replace("label",V._label).getRegex(),V.reflinkSearch=F(V.reflinkSearch,"g").replace("reflink",V.reflink).replace("nolink",V.nolink).getRegex(),V.normal=W({},V),V.pedantic=W({},V.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:F(/^!?\[(label)\]\((.*?)\)/).replace("label",V._label).getRegex(),reflink:F(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",V._label).getRegex()}),V.gfm=W({},V.normal,{escape:F(V.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),V.gfm.url=F(V.gfm.url,"i").replace("email",V.gfm._extended_email).getRegex(),V.breaks=W({},V.gfm,{br:F(V.br).replace("{2,}","*").getRegex(),text:F(V.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var G={block:H,inline:V},K=s.defaults,Y=G.block,Q=G.inline,Z=$.repeatString;function J(e){return e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"â€").replace(/\.{3}/g,"…")}function X(e){var t,n,i="",r=e.length;for(t=0;t<r;t++)n=e.charCodeAt(t),Math.random()>.5&&(n="x"+n.toString(16)),i+="&#"+n+";";return i}var ee=function(){function e(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||K,this.options.tokenizer=this.options.tokenizer||new D,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var t={block:Y.normal,inline:Q.normal};this.options.pedantic?(t.block=Y.pedantic,t.inline=Q.pedantic):this.options.gfm&&(t.block=Y.gfm,this.options.breaks?t.inline=Q.breaks:t.inline=Q.gfm),this.tokenizer.rules=t}e.lex=function(t,n){var i=new e(n);return i.lex(t)},e.lexInline=function(t,n){var i=new e(n);return i.inlineTokens(t)};var n=e.prototype;return n.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(e,this.tokens,!0),this.inline(this.tokens),this.tokens},n.blockTokens=function(e,t,n){var i,r,o,s;void 0===t&&(t=[]),void 0===n&&(n=!0),this.options.pedantic&&(e=e.replace(/^ +$/gm,""));while(e)if(i=this.tokenizer.space(e))e=e.substring(i.raw.length),i.type&&t.push(i);else if(i=this.tokenizer.code(e,t))e=e.substring(i.raw.length),i.type?t.push(i):(s=t[t.length-1],s.raw+="\n"+i.raw,s.text+="\n"+i.text);else if(i=this.tokenizer.fences(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.heading(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.nptable(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.hr(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.blockquote(e))e=e.substring(i.raw.length),i.tokens=this.blockTokens(i.text,[],n),t.push(i);else if(i=this.tokenizer.list(e)){for(e=e.substring(i.raw.length),o=i.items.length,r=0;r<o;r++)i.items[r].tokens=this.blockTokens(i.items[r].text,[],!1);t.push(i)}else if(i=this.tokenizer.html(e))e=e.substring(i.raw.length),t.push(i);else if(n&&(i=this.tokenizer.def(e)))e=e.substring(i.raw.length),this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title});else if(i=this.tokenizer.table(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.lheading(e))e=e.substring(i.raw.length),t.push(i);else if(n&&(i=this.tokenizer.paragraph(e)))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.text(e,t))e=e.substring(i.raw.length),i.type?t.push(i):(s=t[t.length-1],s.raw+="\n"+i.raw,s.text+="\n"+i.text);else if(e){var a="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(a);break}throw new Error(a)}return t},n.inline=function(e){var t,n,i,r,o,s,a=e.length;for(t=0;t<a;t++)switch(s=e[t],s.type){case"paragraph":case"text":case"heading":s.tokens=[],this.inlineTokens(s.text,s.tokens);break;case"table":for(s.tokens={header:[],cells:[]},r=s.header.length,n=0;n<r;n++)s.tokens.header[n]=[],this.inlineTokens(s.header[n],s.tokens.header[n]);for(r=s.cells.length,n=0;n<r;n++)for(o=s.cells[n],s.tokens.cells[n]=[],i=0;i<o.length;i++)s.tokens.cells[n][i]=[],this.inlineTokens(o[i],s.tokens.cells[n][i]);break;case"blockquote":this.inline(s.tokens);break;case"list":for(r=s.items.length,n=0;n<r;n++)this.inline(s.items[n].tokens);break}return e},n.inlineTokens=function(e,t,n,i){var r;void 0===t&&(t=[]),void 0===n&&(n=!1),void 0===i&&(i=!1);var o,s,a,c=e;if(this.tokens.links){var l=Object.keys(this.tokens.links);if(l.length>0)while(null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(c)))l.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,o.index)+"["+Z("a",o[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}while(null!=(o=this.tokenizer.rules.inline.blockSkip.exec(c)))c=c.slice(0,o.index)+"["+Z("a",o[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);while(e)if(s||(a=""),s=!1,r=this.tokenizer.escape(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.tag(e,n,i))e=e.substring(r.raw.length),n=r.inLink,i=r.inRawBlock,t.push(r);else if(r=this.tokenizer.link(e))e=e.substring(r.raw.length),"link"===r.type&&(r.tokens=this.inlineTokens(r.text,[],!0,i)),t.push(r);else if(r=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(r.raw.length),"link"===r.type&&(r.tokens=this.inlineTokens(r.text,[],!0,i)),t.push(r);else if(r=this.tokenizer.strong(e,c,a))e=e.substring(r.raw.length),r.tokens=this.inlineTokens(r.text,[],n,i),t.push(r);else if(r=this.tokenizer.em(e,c,a))e=e.substring(r.raw.length),r.tokens=this.inlineTokens(r.text,[],n,i),t.push(r);else if(r=this.tokenizer.codespan(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.br(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.del(e))e=e.substring(r.raw.length),r.tokens=this.inlineTokens(r.text,[],n,i),t.push(r);else if(r=this.tokenizer.autolink(e,X))e=e.substring(r.raw.length),t.push(r);else if(n||!(r=this.tokenizer.url(e,X))){if(r=this.tokenizer.inlineText(e,i,J))e=e.substring(r.raw.length),a=r.raw.slice(-1),s=!0,t.push(r);else if(e){var u="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(u);break}throw new Error(u)}}else e=e.substring(r.raw.length),t.push(r);return t},t(e,null,[{key:"rules",get:function(){return{block:Y,inline:Q}}}]),e}(),te=s.defaults,ne=$.cleanUrl,ie=$.escape,re=function(){function e(e){this.options=e||te}var t=e.prototype;return t.code=function(e,t,n){var i=(t||"").match(/\S*/)[0];if(this.options.highlight){var r=this.options.highlight(e,i);null!=r&&r!==e&&(n=!0,e=r)}return e=e.replace(/\n$/,"")+"\n",i?'<pre><code class="'+this.options.langPrefix+ie(i,!0)+'">'+(n?e:ie(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:ie(e,!0))+"</code></pre>\n"},t.blockquote=function(e){return"<blockquote>\n"+e+"</blockquote>\n"},t.html=function(e){return e},t.heading=function(e,t,n,i){return this.options.headerIds?"<h"+t+' id="'+this.options.headerPrefix+i.slug(n)+'">'+e+"</h"+t+">\n":"<h"+t+">"+e+"</h"+t+">\n"},t.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},t.list=function(e,t,n){var i=t?"ol":"ul",r=t&&1!==n?' start="'+n+'"':"";return"<"+i+r+">\n"+e+"</"+i+">\n"},t.listitem=function(e){return"<li>"+e+"</li>\n"},t.checkbox=function(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},t.paragraph=function(e){return"<p>"+e+"</p>\n"},t.table=function(e,t){return t&&(t="<tbody>"+t+"</tbody>"),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"},t.tablerow=function(e){return"<tr>\n"+e+"</tr>\n"},t.tablecell=function(e,t){var n=t.header?"th":"td",i=t.align?"<"+n+' align="'+t.align+'">':"<"+n+">";return i+e+"</"+n+">\n"},t.strong=function(e){return"<strong>"+e+"</strong>"},t.em=function(e){return"<em>"+e+"</em>"},t.codespan=function(e){return"<code>"+e+"</code>"},t.br=function(){return this.options.xhtml?"<br/>":"<br>"},t.del=function(e){return"<del>"+e+"</del>"},t.link=function(e,t,n){if(e=ne(this.options.sanitize,this.options.baseUrl,e),null===e)return n;var i='<a href="'+ie(e)+'"';return t&&(i+=' title="'+t+'"'),i+=">"+n+"</a>",i},t.image=function(e,t,n){if(e=ne(this.options.sanitize,this.options.baseUrl,e),null===e)return n;var i='<img src="'+e+'" alt="'+n+'"';return t&&(i+=' title="'+t+'"'),i+=this.options.xhtml?"/>":">",i},t.text=function(e){return e},e}(),oe=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,n){return""+n},t.image=function(e,t,n){return""+n},t.br=function(){return""},e}(),se=function(){function e(){this.seen={}}var t=e.prototype;return t.serialize=function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},t.getNextSafeSlug=function(e,t){var n=e,i=0;if(this.seen.hasOwnProperty(n)){i=this.seen[e];do{i++,n=e+"-"+i}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=i,this.seen[n]=0),n},t.slug=function(e,t){void 0===t&&(t={});var n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)},e}(),ae=s.defaults,ce=$.unescape,le=function(){function e(e){this.options=e||ae,this.options.renderer=this.options.renderer||new re,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new oe,this.slugger=new se}e.parse=function(t,n){var i=new e(n);return i.parse(t)},e.parseInline=function(t,n){var i=new e(n);return i.parseInline(t)};var t=e.prototype;return t.parse=function(e,t){void 0===t&&(t=!0);var n,i,r,o,s,a,c,l,u,d,h,p,f,g,m,y,b,v,_="",w=e.length;for(n=0;n<w;n++)switch(d=e[n],d.type){case"space":continue;case"hr":_+=this.renderer.hr();continue;case"heading":_+=this.renderer.heading(this.parseInline(d.tokens),d.depth,ce(this.parseInline(d.tokens,this.textRenderer)),this.slugger);continue;case"code":_+=this.renderer.code(d.text,d.lang,d.escaped);continue;case"table":for(l="",c="",o=d.header.length,i=0;i<o;i++)c+=this.renderer.tablecell(this.parseInline(d.tokens.header[i]),{header:!0,align:d.align[i]});for(l+=this.renderer.tablerow(c),u="",o=d.cells.length,i=0;i<o;i++){for(a=d.tokens.cells[i],c="",s=a.length,r=0;r<s;r++)c+=this.renderer.tablecell(this.parseInline(a[r]),{header:!1,align:d.align[r]});u+=this.renderer.tablerow(c)}_+=this.renderer.table(l,u);continue;case"blockquote":u=this.parse(d.tokens),_+=this.renderer.blockquote(u);continue;case"list":for(h=d.ordered,p=d.start,f=d.loose,o=d.items.length,u="",i=0;i<o;i++)m=d.items[i],y=m.checked,b=m.task,g="",m.task&&(v=this.renderer.checkbox(y),f?m.tokens.length>0&&"text"===m.tokens[0].type?(m.tokens[0].text=v+" "+m.tokens[0].text,m.tokens[0].tokens&&m.tokens[0].tokens.length>0&&"text"===m.tokens[0].tokens[0].type&&(m.tokens[0].tokens[0].text=v+" "+m.tokens[0].tokens[0].text)):m.tokens.unshift({type:"text",text:v}):g+=v),g+=this.parse(m.tokens,f),u+=this.renderer.listitem(g,b,y);_+=this.renderer.list(u,h,p);continue;case"html":_+=this.renderer.html(d.text);continue;case"paragraph":_+=this.renderer.paragraph(this.parseInline(d.tokens));continue;case"text":u=d.tokens?this.parseInline(d.tokens):d.text;while(n+1<w&&"text"===e[n+1].type)d=e[++n],u+="\n"+(d.tokens?this.parseInline(d.tokens):d.text);_+=t?this.renderer.paragraph(u):u;continue;default:var k='Token with "'+d.type+'" type was not found.';if(this.options.silent)return void console.error(k);throw new Error(k)}return _},t.parseInline=function(e,t){t=t||this.renderer;var n,i,r="",o=e.length;for(n=0;n<o;n++)switch(i=e[n],i.type){case"escape":r+=t.text(i.text);break;case"html":r+=t.html(i.text);break;case"link":r+=t.link(i.href,i.title,this.parseInline(i.tokens,t));break;case"image":r+=t.image(i.href,i.title,i.text);break;case"strong":r+=t.strong(this.parseInline(i.tokens,t));break;case"em":r+=t.em(this.parseInline(i.tokens,t));break;case"codespan":r+=t.codespan(i.text);break;case"br":r+=t.br();break;case"del":r+=t.del(this.parseInline(i.tokens,t));break;case"text":r+=t.text(i.text);break;default:var s='Token with "'+i.type+'" type was not found.';if(this.options.silent)return void console.error(s);throw new Error(s)}return r},e}(),ue=$.merge,de=$.checkSanitizeDeprecation,he=$.escape,pe=s.getDefaults,fe=s.changeDefaults,ge=s.defaults;function me(e,t,n){if("undefined"===typeof e||null===e)throw new Error("marked(): input parameter is undefined or null");if("string"!==typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if("function"===typeof t&&(n=t,t=null),t=ue({},me.defaults,t||{}),de(t),n){var i,r=t.highlight;try{i=ee.lex(e,t)}catch(c){return n(c)}var o=function(e){var o;if(!e)try{o=le.parse(i,t)}catch(c){e=c}return t.highlight=r,e?n(e):n(null,o)};if(!r||r.length<3)return o();if(delete t.highlight,!i.length)return o();var s=0;return me.walkTokens(i,(function(e){"code"===e.type&&(s++,setTimeout((function(){r(e.text,e.lang,(function(t,n){if(t)return o(t);null!=n&&n!==e.text&&(e.text=n,e.escaped=!0),s--,0===s&&o()}))}),0))})),void(0===s&&o())}try{var a=ee.lex(e,t);return t.walkTokens&&me.walkTokens(a,t.walkTokens),le.parse(a,t)}catch(c){if(c.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+he(c.message+"",!0)+"</pre>";throw c}}me.options=me.setOptions=function(e){return ue(me.defaults,e),fe(me.defaults),me},me.getDefaults=pe,me.defaults=ge,me.use=function(e){var t=ue({},e);if(e.renderer&&function(){var n=me.defaults.renderer||new re,i=function(t){var i=n[t];n[t]=function(){for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];var a=e.renderer[t].apply(n,o);return!1===a&&(a=i.apply(n,o)),a}};for(var r in e.renderer)i(r);t.renderer=n}(),e.tokenizer&&function(){var n=me.defaults.tokenizer||new D,i=function(t){var i=n[t];n[t]=function(){for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];var a=e.tokenizer[t].apply(n,o);return!1===a&&(a=i.apply(n,o)),a}};for(var r in e.tokenizer)i(r);t.tokenizer=n}(),e.walkTokens){var n=me.defaults.walkTokens;t.walkTokens=function(t){e.walkTokens(t),n&&n(t)}}me.setOptions(t)},me.walkTokens=function(e,t){for(var n,i=r(e);!(n=i()).done;){var o=n.value;switch(t(o),o.type){case"table":for(var s,a=r(o.tokens.header);!(s=a()).done;){var c=s.value;me.walkTokens(c,t)}for(var l,u=r(o.tokens.cells);!(l=u()).done;)for(var d,h=l.value,p=r(h);!(d=p()).done;){var f=d.value;me.walkTokens(f,t)}break;case"list":me.walkTokens(o.items,t);break;default:o.tokens&&me.walkTokens(o.tokens,t)}}},me.parseInline=function(e,t){if("undefined"===typeof e||null===e)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!==typeof e)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");t=ue({},me.defaults,t||{}),de(t);try{var n=ee.lexInline(e,t);return t.walkTokens&&me.walkTokens(n,t.walkTokens),le.parseInline(n,t)}catch(i){if(i.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+he(i.message+"",!0)+"</pre>";throw i}},me.Parser=le,me.parser=le.parse,me.Renderer=re,me.TextRenderer=oe,me.Lexer=ee,me.lexer=ee.lex,me.Tokenizer=D,me.Slugger=se,me.parse=me;var ye=me;return ye}))},"108f":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.addEventListener?e.addEventListener:e.attachEvent;function n(n,i){if("keydown"===n){var r=i;i=function(t){var n=document.getElementsByClassName("pac-item-selected").length>0;if(13===t.which&&!n){var i=document.createEvent("Event");i.keyCode=40,i.which=40,r.apply(e,[i])}r.apply(e,[t])}}t.apply(e,[n,i])}e.addEventListener=n,e.attachEvent=n}},"1f3a":function(e,t,n){"use strict";(function(e){n.d(t,"c",(function(){return u})),n.d(t,"b",(function(){return h})),n.d(t,"a",(function(){return m}));var i=[{type:"text/plain",ext:"txt"},{type:"text/html",ext:"html"},{type:"text/javascript",ext:"js"},{type:"text/css",ext:"css"},{type:"text/csv",ext:"csv"},{type:"text/yaml",ext:"yml"},{type:"text/yaml",ext:"yaml"},{type:"text/calendar",ext:"ics"},{type:"text/calendar",ext:"ical"},{type:"image/apng",ext:"apng"},{type:"image/bmp",ext:"bmp"},{type:"image/gif",ext:"gif"},{type:"image/x-icon",ext:"ico"},{type:"image/x-icon",ext:"cur"},{type:"image/jpeg",ext:"jpg"},{type:"image/jpeg",ext:"jpeg"},{type:"image/jpeg",ext:"jfif"},{type:"image/jpeg",ext:"pjp"},{type:"image/jpeg",ext:"pjpeg"},{type:"image/png",ext:"png"},{type:"image/svg+xml",ext:"svg"},{type:"image/tiff",ext:"tif"},{type:"image/tiff",ext:"tiff"},{type:"image/webp",ext:"webp"},{type:"application/json",ext:"json"},{type:"application/xml",ext:"xml"},{type:"application/x-sh",ext:"sh"},{type:"application/zip",ext:"zip"},{type:"application/x-rar-compressed",ext:"rar"},{type:"application/x-tar",ext:"tar"},{type:"application/x-bzip",ext:"bz"},{type:"application/x-bzip2",ext:"bz2"},{type:"application/pdf",ext:"pdf"},{type:"application/java-archive",ext:"jar"},{type:"application/msword",ext:"doc"},{type:"application/vnd.ms-excel",ext:"xls"},{type:"application/vnd.ms-excel",ext:"xlsx"},{type:"message/rfc822",ext:"eml"}],r=function(e){return void 0===e&&(e={}),0===Object.keys(e).length},o=function(e,t,n){if(!e||!e.sort)return!1;var i=n&&"desc"===n?-1:1;return e.sort((function(e,n){var r=e[t],o=n[t];return"undefined"===typeof o?"undefined"===typeof r?0:1*i:"undefined"===typeof r||r<o?-1*i:r>o?1*i:0})),!0},s=function(e,t){var n=Object.assign({},e);return t&&("string"===typeof t?delete n[t]:t.forEach((function(e){delete n[e]}))),n},a=function(e,t){void 0===t&&(t="application/octet-stream");var n=e.toLowerCase(),r=i.filter((function(e){return n.endsWith("."+e.ext)}));return r.length>0?r[0].type:t},c=function(e){var t=e.toLowerCase();return!!t.startsWith("text/")||("application/json"===t||"application/xml"===t||"application/sh"===t)},l=function(){for(var e="",t="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",n=32;n>0;n-=1)e+=t[Math.floor(Math.random()*t.length)];return e},u=function(e){if(e.isResolved)return e;var t=!0,n=!1,i=!1,r=e.then((function(e){return i=!0,t=!1,e}),(function(e){throw n=!0,t=!1,e}));return r.isFullfilled=function(){return i},r.isPending=function(){return t},r.isRejected=function(){return n},r},d=function(){if("undefined"===typeof self)return!1;var e=self;return"undefined"!==typeof e.WorkerGlobalScope&&self instanceof e.WorkerGlobalScope},h=function(){var t="undefined"!==typeof window&&"undefined"!==typeof window.document,n="undefined"!==typeof e&&null!=e.versions&&null!=e.versions.node;return{isBrowser:t,isNode:n}},p=function(e,t,n){if(void 0===t&&(t=[]),void 0===n&&(n=[]),!g(e))return e;var i={};for(var r in e)if(e.hasOwnProperty(r)){var o=t.includes(r)?r:r[0].toLowerCase()+r.slice(1);i[o]=n.includes(r)?e[r]:p(e[r],t,n)}return i},f=function(e,t,n){if(void 0===t&&(t=[]),void 0===n&&(n=[]),!g(e))return e;var i={};for(var r in e)if(e.hasOwnProperty(r)){var o=t.includes(r)?r:r[0].toUpperCase()+r.slice(1);i[o]=n.includes(r)?e[r]:f(e[r],t,n)}return i},g=function(e){return e instanceof Object&&!(e instanceof Array)&&!(e instanceof Function)&&!(e instanceof Number)&&!(e instanceof String)&&!(e instanceof Boolean)},m=function(){function e(){}return e.isEmpty=r,e.sortByField=o,e.objectLessAttributes=s,e.filenameToContentType=a,e.isTextFile=c,e.generateRandomString=l,e.makeQuerablePromise=u,e.isWebWorker=d,e.browserOrNode=h,e.transferKeyToLowerCase=p,e.transferKeyToUpperCase=f,e.isStrictObject=g,e}()}).call(this,n("4362"))},"1f3c":function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e._self._c;return t("div",{staticClass:"row justify-center"},[t("h1",{staticStyle:{display:"none"}},[e._v("Privacy policy")]),e.$q.screen.lt.sm?t("TitleBar",{attrs:{"center-slot":"Privacy policy"}}):e._e(),e.$q.screen.gt.xs?t("TileBar",{staticClass:"col-12 col-sm-10 col-md-9",attrs:{optionButton:"Back"},on:{"on-button":function(t){return e.$router.go(-1)}}}):e._e(),t("div",{staticClass:"col-12 col-sm-10 col-md-9 q-px-sm"},[t("div",{staticClass:"col-12 text-title text-left",staticStyle:{padding:"40px 0 20px"}},[e._v(" PRIVACY POLICY ")]),t("Markdown",{staticClass:"privacy-text",attrs:{data:e.md}})],1)],1)},r=[],o=(n("ddb0"),n("e6e0")),s="**SECTION 1 - WHAT DO WE DO WITH YOUR INFORMATION?** \nWhen you purchase something from our store, as part of the buying and selling process, we collect the personal information you give us such as your name, address and email address.\nWhen you browse our store, we also automatically receive your computer’s internet protocol (IP) address in order to provide us with information that helps us learn about your browser and operating system. \nEmail marketing (if applicable): With your permission, we may send you emails about our store, new products and other updates.\n\n**SECTION 2 – CONSENT** \nHow do you get my consent? \nWhen you provide us with personal information to complete a transaction, verify your credit card, place an order, arrange for a delivery or return a purchase, we imply that you consent to our collecting it and using it for that specific reason only.\n\nIf we ask for your personal information for a secondary reason, like marketing, we will either ask you directly for your expressed consent, or provide you with an opportunity to say no.\n\nHow do I withdraw my consent? \nIf after you opt-in, you change your mind, you may withdraw your consent for us to contact you, for the continued collection, use or disclosure of your information, at anytime, by contacting us at online@villamarket.comor mailing us at: Villa Market JP Co Ltd., 595 Sukhumvit Road,North Klong Ton,Vattana, Bangkok 10110 Thailand\n\n**SECTION 3 - DISCLOSURE** \nWe may disclose your personal information if we are required by law to do so or if you violate our Terms of Service.\n\n**SECTION 4 - THIRD-PARTY SERVICES** \nIn general, the third-party providers used by us will only collect, use and disclose your information to the extent necessary to allow them to perform the services they provide to us.\n\nHowever, certain third-party service providers, such as payment gateways and other payment transaction processors, have their own privacy policies in respect to the information we are required to provide to them for your purchase-related transactions.\n\nFor these providers, we recommend that you read their privacy policies so you can understand the manner in which your personal information will be handled by these providers.\n\nIn particular, remember that certain providers may be located in or have facilities that are located in a different jurisdiction than either you or us. So if you elect to proceed with a transaction that involves the services of a third-party service provider, then your information may become subject to the laws of the jurisdiction(s) in which that service provider or its facilities are located.\n\nAs an example, if you are located in Canada and your transaction is processed by a payment gateway located in the United States, then your personal information used in completing that transaction may be subject to disclosure under United States legislation, including the Patriot Act.\n\nOnce you leave our store’s website or are redirected to a third-party website or application, you are no longer governed by this Privacy Policy or our website’s Terms of Service.\n\nLINKS \nWhen you click on links on our store, they may direct you away from our site. We are not responsible for the privacy practices of other sites and encourage you to read their privacy statements.\n\n**SECTION 5 - SECURITY** \nTo protect your personal information, we take reasonable precautions and follow industry best practices to make sure it is not inappropriately lost, misused, accessed, disclosed, altered or destroyed.\n\nIf you provide us with your credit card information, the information is encrypted using secure socket layer technology (SSL) and stored with a AES-256 encryption. Although no method of transmission over the Internet or electronic storage is 100% secure, we follow all PCI-DSS requirements and implement additional generally accepted industry standards.\n\n**SECTION 6 - AGE OF CONSENT** \nBy using this site, you represent that you are at least the age of majority in your state or province of residence, or that you are the age of majority in your state or province of residence and you have given us your consent to allow any of your minor dependents to use this site.\n\n**SECTION 7 - CHANGES TO THIS PRIVACY POLICY** \nWe reserve the right to modify this privacy policy at any time, so please review it frequently. Changes and clarifications will take effect immediately upon their posting on the website. If we make material changes to this policy, we will notify you here that it has been updated, so that you are aware of what information we collect, how we use it, and under what circumstances, if any, we use and/or disclose it.\n\n**SECTION 8 - LOCATION DATA** \nWe will collect your location data in order to facilitate the purchase and delivery of goods.\n\nIf our store is acquired or merged with another company, your information may be transferred to the new owners so that we may continue to sell products to you.\n\nQUESTIONS AND CONTACT INFORMATION\nIf you would like to: access, correct, amend or delete any personal information we have about you, register a complaint, or simply want more information contact our Privacy Compliance Officer at online@villamarket.com or by mail at 595 Sukhumvit Road,North Klong Ton,Vattana, Bangkok 10110 Thailand",a={components:{Markdown:o["a"],TitleBar:()=>n.e("signin~31ecd969").then(n.bind(null,"1e1d")),TileBar:()=>n.e("chunk-vendors~cfbf0a2e").then(n.bind(null,"7112"))},data(){return{md:s}},metaInfo(){return{title:"Privacy Policy | Villa Market - Thailand's Original International Supermarket",meta:[{name:"description",content:"Villa Market Privacy Policy: Security and Consent Information."},{property:"og:title",content:"Privacy Policy | Villa Market - Thailand's Original International Supermarket"},{property:"og:site_name",content:"Villa Market"},{property:"og:type",content:"website"},{name:"robots",content:"index,follow"}]}}},c=a,l=(n("69b8"),n("2877")),u=Object(l["a"])(c,i,r,!1,null,"08791ea7",null);t["default"]=u.exports},"23e2":function(e,t,n){},2415:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2446:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},"2a03":function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e._self._c;return t("div",{staticClass:"row bg-white items-center text-center justify-center",staticStyle:{width:"100%","min-height":"100vh"}},[t("div",{staticClass:"col-12 row items-center text-center justify-center"},[t("div",{staticClass:"col-12"},[t("q-img",{attrs:{basic:"",contain:"",height:e.$q.screen.xs?"100px":"150px",src:n("9e01")(`./${e.status?"success-icon-blue":"fail-icon"}.png`)}})],1),e.status?t("div",{staticClass:"col-12",staticStyle:{"font-size":"45px",color:"#2c2a74"}},[e._v(" "+e._s(e.totalPrice)+" ")]):[t("div",{staticClass:"col-12",staticStyle:{"font-size":"30px",color:"red"}},[e._v(" "+e._s(e.$t("The payment was declined"))+" ")]),e.reason?t("div",{staticClass:"col-12",staticStyle:{"font-size":"20px",color:"red"}},[e._v(" "+e._s(e.$t("Error message from card provider:"))+" "+e._s(e.reason)+" ")]):e._e()],e.status?t("div",{staticClass:"col-12",staticStyle:{"font-size":"17px",color:"#afafaf"}},[e._v(" "+e._s(e.$t("Paid Successfully"))+" ")]):e._e(),t("div",{staticClass:"content__separator col-10"},[t("q-separator")],1),e.id?t("div",{staticClass:"col-12",style:"font-size: 23px;color:"+(e.status?"#2c2a74":"red")},[e._v(" "+e._s(e.$t("thankyou_order_id"))+" #"+e._s(e.id)+" ")]):e._e(),t("div",{staticClass:"col-12",staticStyle:{"font-size":"17px",color:"#afafaf"}},[e._v(" "+e._s(e.date)+" ")]),0==e.orderDetailError?[t("div",{staticClass:"order-detail q-pt-lg col-12 row justify-center items-center"},[t("table",{staticClass:"order-detail__table"},[t("tr",[t("td",{staticClass:"text-bold"},[e._v("Recipient:")]),t("td",[e._v(e._s(e.recipient))])]),t("tr",[t("td",{staticClass:"text-bold"},[e._v("Shipping type:")]),t("td",[e._v(e._s(e.shippingType))])]),t("tr",["PICKUP"===e.shippingType?t("td",{staticClass:"text-bold"},[e._v(" Pick-up address: ")]):t("td",{staticClass:"text-bold"},[e._v("Delivery to:")]),t("td",[e._v(e._s(e.shippingAddress))])]),t("tr",["PICKUP"===e.shippingType?t("td",{staticClass:"text-bold"},[e._v(" Pick-up date: ")]):t("td",{staticClass:"text-bold"},[e._v("Shipping date:")]),t("td",[e._v(e._s(e.shippingDate))])]),t("tr",[t("td",{staticClass:"text-bold"},[e._v("Payment method:")]),t("td",[e._v(e._s(e.paymentMethod))])])])]),t("div",{staticClass:"content__separator col-12 row justify-center items-center"},[t("q-separator",{staticStyle:{width:"83.333%"}})],1)]:e._e(),t("div",{staticClass:"col-12"},[t("q-btn",{staticClass:"no-border-radius",staticStyle:{width:"150px","margin-right":"10px","margin-top":"10px"},attrs:{unelevated:"",color:""+(e.status,"primary"),"text-color":"white","no-caps":""},on:{click:function(t){return e.ActionStatus(e.status)}}},[e._v(e._s(e.status?e.$t("thankyou_order_btn"):e.$t("thankyou_try_again_btn")))]),e.status?e._e():t("q-btn",{staticClass:"no-border-radius",staticStyle:{width:"150px","margin-right":"10px","margin-top":"10px"},attrs:{color:"primary","no-caps":"",outline:""},on:{click:e.onChat}},[e._v(e._s(e.$t("thankyou_chat_with_us_btn")))]),t("q-btn",{staticClass:"no-border-radius",staticStyle:{width:"150px","margin-top":"10px"},attrs:{color:""+(e.status,"primary"),"no-caps":"",outline:""},on:{click:e.onHome}},[e._v(e._s(e.$t("thankyou_home_btn")))])],1)],2),t("q-inner-loading",{attrs:{showing:e.loading,color:"primary"}})],1)},r=[],o=(n("5319"),n("14d9"),n("ddb0"),n("5a0c")),s=n.n(o),a=n("eb85"),c=n("74f7"),l=n("bd6e"),u=n("2f62"),d=n("08fa");const h={QSeparator:a["a"],QInnerLoading:c["a"]};var p={components:{...h},data:function(){return{order:null,totalPrice:0,id:null,reason:null,status:null,interval:null,isSendMessage:!1,messageStack:[],orderLoaded:!1,loading:!0,orderDetailError:null}},computed:{...Object(u["b"])(["IsProductPriceInventoryLoaded"]),date(){return s()().format("DD/MM/YYYY h:mm A")},isLoaded(){return this.orderLoaded},chatConnected(){return this.$store.getters["customerChat/connected"]},recipient(){var e;const t=null===(e=this.order)||void 0===e?void 0:e.shipping;return t?`${t.shippingFirstName} ${t.shippingLastName} (${t.shippingPhone})`:"-"},shippingType(){var e;const t=null===(e=this.order)||void 0===e?void 0:e.shipping;return t?""+t.shippingType:"-"},shippingAddress(){var e;const t=null===(e=this.order)||void 0===e?void 0:e.shipping;return t?`${t.shippingAddress} ${t.shippingDistrict} ${t.shippingProvince} ${t.shippingPostcode}`:"-"},shippingDate(){var e,t;const n=(null===(e=this.order)||void 0===e||null===(e=e.shipping)||void 0===e?void 0:e.scheduleList)||[];if(n.length<=0)return"-";const i=s()(null===(t=n[0])||void 0===t?void 0:t.dateTime),r=i.add(1,"hour");return`${i.format("DD MMM YYYY")}, ${i.format("HH:mm")}-${r.format("HH:mm")} hrs.`},paymentMethod(){var e;const t=null===(e=this.order)||void 0===e?void 0:e.payment;return t?t.paymentMethod:"-"}},beforeRouteEnter(e,t,n){if(e&&e.query&&e.query.orderId)return n(t=>{t.totalPrice=parseFloat(e.query.amount).toFixed(2)||0;let n=e.query.status;t.status="success"===n,t.reason=e.query.reason,t.id=e.query.orderId,t.$router.replace({query:null})});n("/notfound")},beforeRouteUpdate(e,t,n){n()},beforeRouteLeave(e,t,n){n()},async mounted(){this.loadOrder().then(e=>{this.orderDetailError=void 0==e||null==e}).catch(e=>{});const e=this.$store.getters["cache/basketId"];this.interval=setInterval(()=>{this.$gtag&&(this.$gtag.event("purchase",{currency:"THB",transaction_id:s()().toISOString(),value:this.totalPrice,items:[]}),clearInterval(this.interval)),window.fbq&&window.fbq("track","Purchase",{currency:"THB",value:this.totalPrice})},1e3),e&&this.status&&(this.$store.dispatch("cart/ClearBasket",e),this.$store.commit("cache/clear"))},watch:{chatConnected:{immediate:!1,handler:function(e){if(e&&this.messageStack.length>0&&!this.isSendMessage){const e=this.messageStack.pop();this.$EventBus.$emit("send-text-message",e),this.isSendMessage=!0}}},isLoaded:{immediate:!0,handler:function(e){e&&this.pushDataLayer()}}},methods:{ActionStatus(e){e?this.$router.push("/order",()=>{}):this.$router.push("/checkout",()=>{})},onHome(){this.$router.push("/")},async loadOrder(){try{this.order=await this.$store.dispatch("order/GetOrder",{orderId:this.id})}catch(e){this.order=await this.$store.dispatch("order/GetOrderHistory",{orderId:this.id})[0]}finally{this.orderLoaded=!0}return this.order},async pushDataLayer(){if(dataLayer&&this.order){var e;this.status;const i=this.$store.getters["authentication/attributes"],{email:r,phone_number:o}=i;let s,a;r&&(a=this.$CryptoJS.SHA256(r).toString()),o&&(s=this.$CryptoJS.SHA256(o).toString());let c=[];var t;if(null!==(e=this.order)&&void 0!==e&&e.productList)c=await Promise.all(null===(t=this.order)||void 0===t||null===(t=t.productList)||void 0===t?void 0:t.map(async(e,t)=>{try{const n=await this.$store.dispatch("products/LoadProductAttributes",e.cprcode),{hema_brand_en:i,online_category_l1_en:r,online_category_l2_en:o}=n;return Object(l["b"])({...e,hema_brand_en:i,online_category_l1_en:r,online_category_l2_en:o,quantity:e.quantity},t)}catch(n){return Object(l["b"])({...e,quantity:e.quantity},t)}}));if(this.status){try{await Object(d["d"])(this.order,c)}catch(n){}try{const e=this.generatePurchaseStatusEventPayload(this.order,c);dataLayer.push(e)}catch(n){}}}this.loading=!1},async onChat(){this.$gtag&&this.$gtag.event("select_content",{content_type:"Bottom Bar",item_id:"Live chat"}),this.$gtm&&this.$gtm.trackEvent({event:"Open Chat",category:"Bottom Bar",action:"click",label:"Open Chat",value:"Chat",noninteraction:!1}),window.fbq&&window.fbq("trackCustom","Open Chat",{category:"Bottom Bar"});let e=!1;if(e){window.LiveAgent.clearAllUserDetails();const e=this.$store.getters["user/user"];e&&(e.name&&window.LiveAgent.addUserDetail("firstName",e.name),e.email&&window.LiveAgent.addUserDetail("email",e.email),e.phone_number&&window.LiveAgent.addUserDetail("phone",e.phone_number));const t=await this.$store.dispatch("authentication/GetUserInfo");t&&(t.attributes?(t.attributes.name&&window.LiveAgent.addUserDetail("firstName",t.attributes.name),t.attributes.phone_number&&window.LiveAgent.addUserDetail("phone",t.attributes.phone_number),t.attributes.email&&window.LiveAgent.addUserDetail("email",t.attributes.email)):(t.name&&window.LiveAgent.addUserDetail("firstName",t.name),t.email&&window.LiveAgent.addUserDetail("email",t.email))),window.chatButton.onClick()}else if(this.$store.commit("customerChat/setModal",!0),this.$store.commit("customerChat/setMinimize",!1),!this.isSendMessage){const e="Order: ",t={text:e+this.id};this.chatConnected?(this.$EventBus.$emit("send-text-message",t),this.isSendMessage=!0):this.messageStack.push(t)}},generatePurchaseStatusEventPayload(e,t){const{analytics:n,orderId:i,ownerId:r,shipping:o,totalDiscount:s,payment:a}=e,c=null===e||void 0===e?void 0:e.couponCodeList,l=null===e||void 0===e?void 0:e.voucherId,u=a.grandTotal,d={event:"purchase_status",purchase_map_code:n.purchase_map_code,ecommerce:{currency:"thb",value:u,gift_voucher:l?String(l):"None",coupon:c.length>0?String(c):"None",discount:s,items:t,payment_type:a.paymentMethod}};return d}},beforeDestroy(){window.insider_object&&(window.insider_object=void 0)}},f=p,g=(n("6dd5"),n("2877")),m=Object(g["a"])(f,i,r,!1,null,"61f93426",null);t["default"]=m.exports},"2adb":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPropsValues=a,t.bindProps=c;var i=n("034d"),r=o(i);function o(e){return e&&e.__esModule?e:{default:e}}function s(e){return e.charAt(0).toUpperCase()+e.slice(1)}function a(e,t){return Object.keys(t).reduce((function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t}),{})}function c(e,t,n){var i=function(i){var o=n[i],a=o.twoWay,c=o.type,l=o.trackProperties,u=o.noBind;if(u)return"continue";var d="set"+s(i),h="get"+s(i),p=i.toLowerCase()+"_changed",f=e[i];if("undefined"===typeof t[d])throw new Error(d+" is not a method of (the Maps object corresponding to) "+e.$options._componentTag);c===Object&&l?(0,r.default)(e,l.map((function(e){return i+"."+e})),(function(){t[d](e[i])}),void 0!==e[i]):e.$watch(i,(function(){var n=e[i];t[d](n)}),{immediate:"undefined"!==typeof f,deep:c===Object}),a&&(e.$gmapOptions.autobindAllEvents||e.$listeners[p])&&t.addListener(p,(function(){e.$emit(p,t[h]())}))};for(var o in n)i(o)}},"2d52":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},"2e58":function(e,t,n){"use strict";n("0990")},"34e6":function(e,t,n){},"36de":function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),s=[];try{while((void 0===t||t-- >0)&&!(i=o.next()).done)s.push(i.value)}catch(a){r={error:a}}finally{try{i&&!i.done&&(n=o["return"])&&n.call(o)}finally{if(r)throw r.error}}return s},r=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(i(arguments[t]));return e},o={VERBOSE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5},s=function(){function e(e,t){void 0===t&&(t="WARN"),this.name=e,this.level=t}return e.prototype._padding=function(e){return e<10?"0"+e:""+e},e.prototype._ts=function(){var e=new Date;return[this._padding(e.getMinutes()),this._padding(e.getSeconds())].join(":")+"."+e.getMilliseconds()},e.prototype._log=function(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var r=this.level;e.LOG_LEVEL&&(r=e.LOG_LEVEL),"undefined"!==typeof window&&window.LOG_LEVEL&&(r=window.LOG_LEVEL);var s=o[r],a=o[t];if(a>=s){var c=console.log.bind(console);"ERROR"===t&&console.error&&(c=console.error.bind(console)),"WARN"===t&&console.warn&&(c=console.warn.bind(console));var l="["+t+"] "+this._ts()+" "+this.name;if(1===n.length&&"string"===typeof n[0])c(l+" - "+n[0]);else if(1===n.length)c(l,n[0]);else if("string"===typeof n[0]){var u=n.slice(1);1===u.length&&(u=u[0]),c(l+" - "+n[0],u)}else c(l,n)}},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,r(["INFO"],e))},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,r(["INFO"],e))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,r(["WARN"],e))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,r(["ERROR"],e))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,r(["DEBUG"],e))},e.prototype.verbose=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,r(["VERBOSE"],e))},e.LOG_LEVEL=null,e}()},3786:function(e,t,n){"use strict";n("14d9");var i=n("2b0e"),r=n("0016"),o=n("b7fa"),s=n("ff7b"),a=n("f89c"),c=n("2b69"),l=n("d882"),u=n("e277"),d=n("d54d");t["a"]=i["default"].extend({name:"QRadio",mixins:[o["a"],s["a"],a["b"],c["a"]],props:{value:{required:!0},val:{required:!0},label:String,leftLabel:Boolean,checkedIcon:String,uncheckedIcon:String,color:String,keepColor:Boolean,dense:Boolean,disable:Boolean,tabindex:[String,Number]},computed:{isTrue(){return this.value===this.val},classes(){return"q-radio cursor-pointer no-outline row inline no-wrap items-center"+(!0===this.disable?" disabled":"")+(!0===this.isDark?" q-radio--dark":"")+(!0===this.dense?" q-radio--dense":"")+(!0===this.leftLabel?" reverse":"")},innerClass(){const e=void 0===this.color||!0!==this.keepColor&&!0!==this.isTrue?"":" text-"+this.color;return`q-radio__inner--${!0===this.isTrue?"truthy":"falsy"}${e}`},computedIcon(){return!0===this.isTrue?this.checkedIcon:this.uncheckedIcon},computedTabindex(){return!0===this.disable?-1:this.tabindex||0},formAttrs(){const e={type:"radio"};return void 0!==this.name&&Object.assign(e,{name:this.name,value:this.val}),e},formDomProps(){if(void 0!==this.name&&!0===this.isTrue)return{checked:!0}},attrs(){const e={tabindex:this.computedTabindex,role:"radio","aria-label":this.label,"aria-checked":!0===this.isTrue?"true":"false"};return!0===this.disable&&(e["aria-disabled"]="true"),e}},methods:{set(e){void 0!==e&&(Object(l["l"])(e),this.__refocusTarget(e)),!0!==this.disable&&!0!==this.isTrue&&this.$emit("input",this.val,e)}},render(e){const t=void 0!==this.computedIcon?[e("div",{key:"icon",staticClass:"q-radio__icon-container absolute-full flex flex-center no-wrap"},[e(r["a"],{staticClass:"q-radio__icon",props:{name:this.computedIcon}})])]:[e("svg",{key:"svg",staticClass:"q-radio__bg absolute non-selectable",attrs:{focusable:"false",viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M12,22a10,10 0 0 1 -10,-10a10,10 0 0 1 10,-10a10,10 0 0 1 10,10a10,10 0 0 1 -10,10m0,-22a12,12 0 0 0 -12,12a12,12 0 0 0 12,12a12,12 0 0 0 12,-12a12,12 0 0 0 -12,-12"}}),e("path",{staticClass:"q-radio__check",attrs:{d:"M12,6a6,6 0 0 0 -6,6a6,6 0 0 0 6,6a6,6 0 0 0 6,-6a6,6 0 0 0 -6,-6"}})])];!0!==this.disable&&this.__injectFormInput(t,"unshift","q-radio__native q-ma-none q-pa-none");const n=[e("div",{staticClass:"q-radio__inner relative-position",class:this.innerClass,style:this.sizeStyle,attrs:{"aria-hidden":"true"}},t)];void 0!==this.__refocusTargetEl&&n.push(this.__refocusTargetEl);const i=void 0!==this.label?Object(u["a"])([this.label],this,"default"):Object(u["c"])(this,"default");return void 0!==i&&n.push(e("div",{staticClass:"q-radio__label q-anchor--skip"},i)),e("div",{class:this.classes,attrs:this.attrs,on:Object(d["b"])(this,"inpExt",{click:this.set,keydown:e=>{13!==e.keyCode&&32!==e.keyCode||Object(l["l"])(e)},keyup:e=>{13!==e.keyCode&&32!==e.keyCode||this.set(e)}})},n)}})},"3b73":function(e,t,n){"use strict";n("3c65"),n("14d9");var i=n("2b0e"),r=n("66e5"),o=n("4074"),s=n("0170"),a=n("0016"),c=n("e9c1"),l=n("eb85"),u=n("8716"),d=n("463c"),h=n("7ee0"),p=n("b7fa"),f=n("d882"),g=n("e277"),m=n("d54d"),y=n("1732");const b="q:expansion-item:close",v=Object.keys(u["b"]);t["a"]=i["default"].extend({name:"QExpansionItem",mixins:[p["a"],d["a"],h["a"]],props:{...u["b"],icon:String,label:String,labelLines:[Number,String],caption:String,captionLines:[Number,String],dense:Boolean,toggleAriaLabel:String,expandIcon:String,expandedIcon:String,expandIconClass:[Array,String,Object],duration:Number,headerInsetLevel:Number,contentInsetLevel:Number,expandSeparator:Boolean,defaultOpened:Boolean,hideExpandIcon:Boolean,expandIconToggle:Boolean,switchToggleSide:Boolean,denseToggle:Boolean,group:String,popup:Boolean,headerStyle:[Array,String,Object],headerClass:[Array,String,Object]},data(){return{showing:void 0!==this.value?this.value:this.defaultOpened}},watch:{showing(e){!0===e&&void 0!==this.group&&this.$root.$emit(b,this)},group(e,t){void 0!==e&&void 0===t?this.$root.$on(b,this.__eventHandler):void 0===e&&void 0!==t&&this.$root.$off(b,this.__eventHandler)}},computed:{classes(){return"q-expansion-item--"+(!0===this.showing?"expanded":"collapsed")+" q-expansion-item--"+(!0===this.popup?"popup":"standard")},contentStyle(){if(void 0!==this.contentInsetLevel){const e=!0===this.$q.lang.rtl?"Right":"Left";return{["padding"+e]:56*this.contentInsetLevel+"px"}}},hasLink(){return!0!==this.disable&&(void 0!==this.href||void 0!==this.to&&null!==this.to&&""!==this.to)},linkProps(){const e={};return v.forEach(t=>{e[t]=this[t]}),e},isClickable(){return!0===this.hasLink||!0!==this.expandIconToggle},expansionIcon(){return void 0!==this.expandedIcon&&!0===this.showing?this.expandedIcon:this.expandIcon||this.$q.iconSet.expansionItem[!0===this.denseToggle?"denseIcon":"icon"]},activeToggleIcon(){return!0!==this.disable&&(!0===this.hasLink||!0===this.expandIconToggle)},headerSlotScope(){return{expanded:!0===this.showing,detailsId:this.targetUid,toggle:this.toggle,show:this.show,hide:this.hide}},toggleAriaAttrs(){const e=void 0!==this.toggleAriaLabel?this.toggleAriaLabel:this.$q.lang.label[!0===this.showing?"collapse":"expand"](this.label);return{role:"button","aria-expanded":!0===this.showing?"true":"false","aria-controls":this.targetUid,"aria-label":e}}},methods:{__onHeaderClick(e){!0!==this.hasLink&&this.toggle(e),this.$emit("click",e)},__toggleIconKeyboard(e){13===e.keyCode&&this.__toggleIcon(e,!0)},__toggleIcon(e,t){!0!==t&&void 0!==this.$refs.blurTarget&&this.$refs.blurTarget.focus(),this.toggle(e),Object(f["l"])(e)},__eventHandler(e){this!==e&&this.group===e.group&&this.hide()},__getToggleIcon(e){const t={staticClass:"q-focusable relative-position cursor-pointer"+(!0===this.denseToggle&&!0===this.switchToggleSide?" items-end":""),class:this.expandIconClass,props:{side:!0!==this.switchToggleSide,avatar:this.switchToggleSide}},n=[e(a["a"],{staticClass:"q-expansion-item__toggle-icon",class:void 0===this.expandedIcon&&!0===this.showing?"q-expansion-item__toggle-icon--rotated":void 0,props:{name:this.expansionIcon}})];return!0===this.activeToggleIcon&&(Object.assign(t,{attrs:{tabindex:0,...this.toggleAriaAttrs},on:Object(m["b"])(this,"inpExt",{click:this.__toggleIcon,keyup:this.__toggleIconKeyboard})}),n.unshift(e("div",{ref:"blurTarget",staticClass:"q-expansion-item__toggle-focus q-icon q-focus-helper q-focus-helper--rounded",attrs:{tabindex:-1}}))),e(o["a"],t,n)},__getHeader(e){let t;void 0!==this.$scopedSlots.header?t=[].concat(this.$scopedSlots.header(this.headerSlotScope)):(t=[e(o["a"],[e(s["a"],{props:{lines:this.labelLines}},[this.label||""]),this.caption?e(s["a"],{props:{lines:this.captionLines,caption:!0}},[this.caption]):null])],this.icon&&t[!0===this.switchToggleSide?"push":"unshift"](e(o["a"],{props:{side:!0===this.switchToggleSide,avatar:!0!==this.switchToggleSide}},[e(a["a"],{props:{name:this.icon}})]))),!0!==this.disable&&!0!==this.hideExpandIcon&&t[!0===this.switchToggleSide?"unshift":"push"](this.__getToggleIcon(e));const n={ref:"item",style:this.headerStyle,class:this.headerClass,props:{dark:this.isDark,disable:this.disable,dense:this.dense,insetLevel:this.headerInsetLevel}};return!0===this.isClickable&&(n.props.clickable=!0,!0===this.hasLink?Object.assign(n.props,this.linkProps):n.attrs=this.toggleAriaAttrs,n.on={...this.qListeners,click:this.__onHeaderClick}),e(r["a"],n,t)},__getContent(e){const t=[this.__getHeader(e),e(c["a"],{props:{duration:this.duration},on:Object(m["b"])(this,"slide",{show:()=>{this.$emit("after-show")},hide:()=>{this.$emit("after-hide")}})},[e("div",{staticClass:"q-expansion-item__content relative-position",style:this.contentStyle,attrs:{id:this.targetUid},directives:[{name:"show",value:this.showing}]},Object(g["c"])(this,"default"))])];return this.expandSeparator&&t.push(e(l["a"],{staticClass:"q-expansion-item__border q-expansion-item__border--top absolute-top",props:{dark:this.isDark}}),e(l["a"],{staticClass:"q-expansion-item__border q-expansion-item__border--bottom absolute-bottom",props:{dark:this.isDark}})),t}},render(e){return e("div",{staticClass:"q-expansion-item q-item-type",class:this.classes},[e("div",{staticClass:"q-expansion-item__container relative-position"},this.__getContent(e))])},created(){void 0!==this.group&&this.$root.$on(b,this.__eventHandler),this.targetUid="e_"+Object(y["a"])()},beforeDestroy(){void 0!==this.group&&this.$root.$off(b,this.__eventHandler)}})},"42e2":function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("36de"),r=new i["a"]("Parser"),o=function(e){var t,n={};if(e["aws_mobile_analytics_app_id"]){var i={AWSPinpoint:{appId:e["aws_mobile_analytics_app_id"],region:e["aws_mobile_analytics_app_region"]}};n.Analytics=i}return(e["aws_cognito_identity_pool_id"]||e["aws_user_pools_id"])&&(n.Auth={userPoolId:e["aws_user_pools_id"],userPoolWebClientId:e["aws_user_pools_web_client_id"],region:e["aws_cognito_region"],identityPoolId:e["aws_cognito_identity_pool_id"],identityPoolRegion:e["aws_cognito_region"],mandatorySignIn:"enable"===e["aws_mandatory_sign_in"]}),t=e["aws_user_files_s3_bucket"]?{AWSS3:{bucket:e["aws_user_files_s3_bucket"],region:e["aws_user_files_s3_bucket_region"],dangerouslyConnectToHttpEndpointForTesting:e["aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing"]}}:e?e.Storage||e:{},n.Analytics=Object.assign({},n.Analytics,e.Analytics),n.Auth=Object.assign({},n.Auth,e.Auth),n.Storage=Object.assign({},t),r.debug("parse config",e,"to amplifyconfig",n),n},s=function(){function e(){}return e.parseMobilehubConfig=o,e}()},4327:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var i=n("36de"),r=function(){return r=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},r.apply(this,arguments)},o=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),s=[];try{while((void 0===t||t-- >0)&&!(i=o.next()).done)s.push(i.value)}catch(a){r={error:a}}finally{try{i&&!i.done&&(n=o["return"])&&n.call(o)}finally{if(r)throw r.error}}return s},s=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(o(arguments[t]));return e},a=new i["a"]("Hub"),c="undefined"!==typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default";function l(e){return void 0!==e.onHubCapsule}var u=function(){function e(e){this.listeners=[],this.patterns=[],this.protectedChannels=["core","auth","api","analytics","interactions","pubsub","storage","xr"],this.name=e}return e.prototype.remove=function(e,t){if(e instanceof RegExp){var n=this.patterns.find((function(t){var n=t.pattern;return n.source===e.source}));if(!n)return void a.warn("No listeners for "+e);this.patterns=s(this.patterns.filter((function(e){return e!==n})))}else{var i=this.listeners[e];if(!i)return void a.warn("No listeners for "+e);this.listeners[e]=s(i.filter((function(e){var n=e.callback;return n!==t})))}},e.prototype.dispatch=function(e,t,n,i){if(void 0===n&&(n=""),this.protectedChannels.indexOf(e)>-1){var o=i===c;o||a.warn("WARNING: "+e+" is protected and dispatching on it can have unintended consequences")}var s={channel:e,payload:r({},t),source:n,patternInfo:[]};try{this._toListeners(s)}catch(l){a.error(l)}},e.prototype.listen=function(e,t,n){var i,r=this;if(void 0===n&&(n="noname"),l(t))a.warn("WARNING onHubCapsule is Deprecated. Please pass in a callback."),i=t.onHubCapsule.bind(t);else{if("function"!==typeof t)throw new Error("No callback supplied to Hub");i=t}if(e instanceof RegExp)this.patterns.push({pattern:e,callback:i});else{var o=this.listeners[e];o||(o=[],this.listeners[e]=o),o.push({name:n,callback:i})}return function(){r.remove(e,i)}},e.prototype._toListeners=function(e){var t=e.channel,n=e.payload,i=this.listeners[t];if(i&&i.forEach((function(i){a.debug("Dispatching to "+t+" with ",n);try{i.callback(e)}catch(r){a.error(r)}})),this.patterns.length>0){if(!n.message)return void a.warn("Cannot perform pattern matching without a message key");var s=n.message;this.patterns.forEach((function(t){var n=s.match(t.pattern);if(n){var i=o(n),c=i.slice(1),l=r(r({},e),{patternInfo:c});try{t.callback(l)}catch(u){a.error(u)}}}))}},e}(),d=new u("__default__")},"475d":function(e,t,n){"use strict";n.d(t,"a",(function(){return z}));var i=n("36de"),r=n("d8bc"),o=n("1f3a"),s=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),a=function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{c(i.next(e))}catch(t){o(t)}}function a(e){try{c(i["throw"](e))}catch(t){o(t)}}function c(e){e.done?n(e.value):r(e.value).then(s,a)}c((i=i.apply(e,t||[])).next())}))},c=function(e,t){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return c([e,t])}}function c(o){if(n)throw new TypeError("Generator is already executing.");while(s)try{if(n=1,i&&(r=2&o[0]?i["return"]:o[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(r=s.trys,!(r=r.length>0&&r[r.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(a){o=[6,a],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},l=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),s=[];try{while((void 0===t||t-- >0)&&!(i=o.next()).done)s.push(i.value)}catch(a){r={error:a}}finally{try{i&&!i.done&&(n=o["return"])&&n.call(o)}finally{if(r)throw r.error}}return s},u=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(l(arguments[t]));return e},d=new i["a"]("Util"),h=function(e){function t(t){var n=e.call(this,t)||this;return n.nonRetryable=!0,n}return s(t,e),t}(Error),p=function(e){var t="nonRetryable";return e&&e[t]};function f(e,t,n,i){return void 0===i&&(i=1),a(this,void 0,void 0,(function(){var r,o;return c(this,(function(s){switch(s.label){case 0:if("function"!==typeof e)throw Error("functionToRetry must be a function");d.debug(e.name+" attempt #"+i+" with this vars: "+JSON.stringify(t)),s.label=1;case 1:return s.trys.push([1,3,,8]),[4,e.apply(void 0,u(t))];case 2:return[2,s.sent()];case 3:if(r=s.sent(),d.debug("error on "+e.name,r),p(r))throw d.debug(e.name+" non retryable error",r),r;return o=n(i,t,r),d.debug(e.name+" retrying in "+o+" ms"),!1===o?[3,6]:[4,new Promise((function(e){return setTimeout(e,o)}))];case 4:return s.sent(),[4,f(e,t,n,i+1)];case 5:return[2,s.sent()];case 6:throw r;case 7:return[3,8];case 8:return[2]}}))}))}var g=3e5;function m(e){var t=100,n=100;return function(i){var r=Math.pow(2,i)*t+n*Math.random();return!(r>e)&&r}}var y=function(e,t,n){return void 0===n&&(n=g),f(e,t,m(n))},b=function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{c(i.next(e))}catch(t){o(t)}}function a(e){try{c(i["throw"](e))}catch(t){o(t)}}function c(e){e.done?n(e.value):r(e.value).then(s,a)}c((i=i.apply(e,t||[])).next())}))},v=function(e,t){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return c([e,t])}}function c(o){if(n)throw new TypeError("Generator is already executing.");while(s)try{if(n=1,i&&(r=2&o[0]?i["return"]:o[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(r=s.trys,!(r=r.length>0&&r[r.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(a){o=[6,a],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},_=new i["a"]("CognitoCredentials"),w=new Promise((function(e,t){if(!Object(o["b"])().isBrowser)return _.debug("not in the browser, directly resolved"),e();var n=window["gapi"]&&window["gapi"].auth2?window["gapi"].auth2:null;if(n)return _.debug("google api already loaded"),e();setTimeout((function(){return e()}),2e3)})),k=function(){function e(){this.initialized=!1,this.refreshGoogleToken=this.refreshGoogleToken.bind(this),this._refreshGoogleTokenImpl=this._refreshGoogleTokenImpl.bind(this)}return e.prototype.refreshGoogleToken=function(){return b(this,void 0,void 0,(function(){return v(this,(function(e){switch(e.label){case 0:return this.initialized?[3,2]:(_.debug("need to wait for the Google SDK loaded"),[4,w]);case 1:e.sent(),this.initialized=!0,_.debug("finish waiting"),e.label=2;case 2:return[2,this._refreshGoogleTokenImpl()]}}))}))},e.prototype._refreshGoogleTokenImpl=function(){var e=null;return Object(o["b"])().isBrowser&&(e=window["gapi"]&&window["gapi"].auth2?window["gapi"].auth2:null),e?new Promise((function(t,n){e.getAuthInstance().then((function(e){e||(_.debug("google Auth undefined"),n(new h("google Auth undefined")));var i=e.currentUser.get();i.isSignedIn()?(_.debug("refreshing the google access token"),i.reloadAuthResponse().then((function(e){var n=e.id_token,i=e.expires_at;t({token:n,expires_at:i})})).catch((function(e){e&&"network_error"===e.error?n("Network error reloading google auth response"):n(new h("Failed to reload google auth response"))}))):n(new h("User is not signed in with Google"))})).catch((function(e){_.debug("Failed to refresh google token",e),n(new h("Failed to refresh google token"))}))})):(_.debug("no gapi auth2 available"),Promise.reject("no gapi auth2 available"))},e}(),S=function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{c(i.next(e))}catch(t){o(t)}}function a(e){try{c(i["throw"](e))}catch(t){o(t)}}function c(e){e.done?n(e.value):r(e.value).then(s,a)}c((i=i.apply(e,t||[])).next())}))},C=function(e,t){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return c([e,t])}}function c(o){if(n)throw new TypeError("Generator is already executing.");while(s)try{if(n=1,i&&(r=2&o[0]?i["return"]:o[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(r=s.trys,!(r=r.length>0&&r[r.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(a){o=[6,a],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},x=new i["a"]("CognitoCredentials"),I=new Promise((function(e,t){if(!Object(o["b"])().isBrowser)return x.debug("not in the browser, directly resolved"),e();var n=window["FB"];if(n)return x.debug("FB SDK already loaded"),e();setTimeout((function(){return e()}),2e3)})),P=function(){function e(){this.initialized=!1,this.refreshFacebookToken=this.refreshFacebookToken.bind(this),this._refreshFacebookTokenImpl=this._refreshFacebookTokenImpl.bind(this)}return e.prototype.refreshFacebookToken=function(){return S(this,void 0,void 0,(function(){return C(this,(function(e){switch(e.label){case 0:return this.initialized?[3,2]:(x.debug("need to wait for the Facebook SDK loaded"),[4,I]);case 1:e.sent(),this.initialized=!0,x.debug("finish waiting"),e.label=2;case 2:return[2,this._refreshFacebookTokenImpl()]}}))}))},e.prototype._refreshFacebookTokenImpl=function(){var e=null;if(Object(o["b"])().isBrowser&&(e=window["FB"]),!e){var t="no fb sdk available";return x.debug(t),Promise.reject(new h(t))}return new Promise((function(t,n){e.getLoginStatus((function(e){if(e&&e.authResponse){var i=e.authResponse,r=i.accessToken,o=i.expiresIn,s=new Date,a=1e3*o+s.getTime();if(!r){c="the jwtToken is undefined";x.debug(c),n(new h(c))}t({token:r,expires_at:a})}else{var c="no response from facebook when refreshing the jwt token";x.debug(c),n(new h(c))}}),{scope:"public_profile,email"})}))},e}(),O=new k,A=new P,T=n("fab4"),E=n("7d03"),j=n("3492"),$=n("311b"),L=n("8265"),M=n("44e3"),N=function(){return N=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},N.apply(this,arguments)},q=function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{c(i.next(e))}catch(t){o(t)}}function a(e){try{c(i["throw"](e))}catch(t){o(t)}}function c(e){e.done?n(e.value):r(e.value).then(s,a)}c((i=i.apply(e,t||[])).next())}))},U=function(e,t){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return c([e,t])}}function c(o){if(n)throw new TypeError("Generator is already executing.");while(s)try{if(n=1,i&&(r=2&o[0]?i["return"]:o[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(r=s.trys,!(r=r.length>0&&r[r.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(a){o=[6,a],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},R=new i["a"]("Credentials"),B=3e6,D=function(){function e(e){this._gettingCredPromise=null,this._refreshHandlers={},this.Auth=void 0,this.configure(e),this._refreshHandlers["google"]=O.refreshGoogleToken,this._refreshHandlers["facebook"]=A.refreshFacebookToken}return e.prototype.getModuleName=function(){return"Credentials"},e.prototype.getCredSource=function(){return this._credentials_source},e.prototype.configure=function(e){if(!e)return this._config||{};this._config=Object.assign({},this._config,e);var t=this._config.refreshHandlers;return t&&(this._refreshHandlers=N(N({},this._refreshHandlers),t)),this._storage=this._config.storage,this._storage||(this._storage=(new r["a"]).getStorage()),this._storageSync=Promise.resolve(),"function"===typeof this._storage["sync"]&&(this._storageSync=this._storage["sync"]()),this._config},e.prototype.get=function(){return R.debug("getting credentials"),this._pickupCredentials()},e.prototype._pickupCredentials=function(){return R.debug("picking up credentials"),this._gettingCredPromise&&this._gettingCredPromise.isPending()?R.debug("getting old cred promise"):(R.debug("getting new cred promise"),this._gettingCredPromise=Object(o["c"])(this._keepAlive())),this._gettingCredPromise},e.prototype._keepAlive=function(){return q(this,void 0,void 0,(function(){var e,t,n,i,r,o,s,a;return U(this,(function(c){switch(c.label){case 0:if(R.debug("checking if credentials exists and not expired"),e=this._credentials,e&&!this._isExpired(e)&&!this._isPastTTL())return R.debug("credentials not changed and not expired, directly return"),[2,Promise.resolve(e)];if(R.debug("need to get a new credential or refresh the existing one"),t=this.Auth,n=void 0===t?E["a"].Auth:t,!n||"function"!==typeof n.currentUserCredentials)return[2,Promise.reject("No Auth module registered in Amplify")];if(this._isExpired(e)||!this._isPastTTL())return[3,6];R.debug("ttl has passed but token is not yet expired"),c.label=1;case 1:return c.trys.push([1,5,,6]),[4,n.currentUserPoolUser()];case 2:return i=c.sent(),[4,n.currentSession()];case 3:return r=c.sent(),o=r.refreshToken,s=new Promise((function(e,t){i.refreshSession(o,(function(n,i){return n?t(n):e(i)}))})),[4,s];case 4:return c.sent(),[3,6];case 5:return a=c.sent(),R.debug("Error attempting to refreshing the session",a),[3,6];case 6:return[2,n.currentUserCredentials()]}}))}))},e.prototype.refreshFederatedToken=function(e){R.debug("Getting federated credentials");var t=e.provider,n=e.user,i=e.token,r=e.identity_id,o=e.expires_at;o=1970===new Date(o).getFullYear()?1e3*o:o;var s=this;return R.debug("checking if federated jwt token expired"),o>(new Date).getTime()?(R.debug("token not expired"),this._setCredentialsFromFederation({provider:t,token:i,user:n,identity_id:r,expires_at:o})):s._refreshHandlers[t]&&"function"===typeof s._refreshHandlers[t]?(R.debug("getting refreshed jwt token from federation provider"),this._providerRefreshWithRetry({refreshHandler:s._refreshHandlers[t],provider:t,user:n})):(R.debug("no refresh handler for provider:",t),this.clear(),Promise.reject("no refresh handler for provider"))},e.prototype._providerRefreshWithRetry=function(e){var t=this,n=e.refreshHandler,i=e.provider,r=e.user,o=1e4;return y(n,[],o).then((function(e){return R.debug("refresh federated token sucessfully",e),t._setCredentialsFromFederation({provider:i,token:e.token,user:r,identity_id:e.identity_id,expires_at:e.expires_at})})).catch((function(e){var n="string"===typeof e&&0===e.toLowerCase().lastIndexOf("network error",e.length);return n||t.clear(),R.debug("refresh federated token failed",e),Promise.reject("refreshing federation token failed: "+e)}))},e.prototype._isExpired=function(e){if(!e)return R.debug("no credentials for expiration check"),!0;R.debug("are these credentials expired?",e);var t=Date.now(),n=e.expiration;return n.getTime()<=t},e.prototype._isPastTTL=function(){return this._nextCredentialsRefresh<=Date.now()},e.prototype._setCredentialsForGuest=function(){return q(this,void 0,void 0,(function(){var e,t,n,i,r,o,s,a,c,l,u=this;return U(this,(function(d){switch(d.label){case 0:if(R.debug("setting credentials for guest"),e=this._config,t=e.identityPoolId,n=e.region,i=e.mandatorySignIn,i)return[2,Promise.reject("cannot get guest credentials when mandatory signin enabled")];if(!t)return R.debug("No Cognito Identity pool provided for unauthenticated access"),[2,Promise.reject("No Cognito Identity pool provided for unauthenticated access")];if(!n)return R.debug("region is not configured for getting the credentials"),[2,Promise.reject("region is not configured for getting the credentials")];r=void 0,d.label=1;case 1:return d.trys.push([1,3,,4]),[4,this._storageSync];case 2:return d.sent(),r=this._storage.getItem("CognitoIdentityId-"+t),this._identityId=r,[3,4];case 3:return o=d.sent(),R.debug("Failed to get the cached identityId",o),[3,4];case 4:return s=new L["a"]({region:n,customUserAgent:Object(T["a"])()}),a=void 0,r?(c={identityId:r,client:s},a=Object(j["a"])(c)()):(l=function(){return q(u,void 0,void 0,(function(){var e,n,i;return U(this,(function(r){switch(r.label){case 0:return[4,s.send(new M["a"]({IdentityPoolId:t}))];case 1:return e=r.sent().IdentityId,this._identityId=e,n={client:s,identityId:e},i=Object(j["a"])(n),[2,i()]}}))}))},a=l().catch((function(e){return q(u,void 0,void 0,(function(){return U(this,(function(t){throw e}))}))}))),[2,this._loadCredentials(a,"guest",!1,null).then((function(e){return e})).catch((function(e){return q(u,void 0,void 0,(function(){var n,i=this;return U(this,(function(o){return"ResourceNotFoundException"===e.name&&e.message==="Identity '"+r+"' not found."?(R.debug("Failed to load guest credentials"),this._storage.removeItem("CognitoIdentityId-"+t),n=function(){return q(i,void 0,void 0,(function(){var e,n,i;return U(this,(function(r){switch(r.label){case 0:return[4,s.send(new M["a"]({IdentityPoolId:t}))];case 1:return e=r.sent().IdentityId,this._identityId=e,n={client:s,identityId:e},i=Object(j["a"])(n),[2,i()]}}))}))},a=n().catch((function(e){return q(i,void 0,void 0,(function(){return U(this,(function(t){throw e}))}))})),[2,this._loadCredentials(a,"guest",!1,null)]):[2,e]}))}))}))]}}))}))},e.prototype._setCredentialsFromFederation=function(e){var t=e.provider,n=e.token,i=e.identity_id,r={google:"accounts.google.com",facebook:"graph.facebook.com",amazon:"www.amazon.com",developer:"cognito-identity.amazonaws.com"},o=r[t]||t;if(!o)return Promise.reject("You must specify a federated provider");var s={};s[o]=n;var a=this._config,c=a.identityPoolId,l=a.region;if(!c)return R.debug("No Cognito Federated Identity pool provided"),Promise.reject("No Cognito Federated Identity pool provided");if(!l)return R.debug("region is not configured for getting the credentials"),Promise.reject("region is not configured for getting the credentials");var u=new L["a"]({region:l,customUserAgent:Object(T["a"])()}),d=void 0;if(i){var h={identityId:i,logins:s,client:u};d=Object(j["a"])(h)()}else{h={logins:s,identityPoolId:c,client:u};d=Object($["a"])(h)()}return this._loadCredentials(d,"federated",!0,e)},e.prototype._setCredentialsFromSession=function(e){var t=this;R.debug("set credentials from session");var n=e.getIdToken().getJwtToken(),i=this._config,r=i.region,o=i.userPoolId,s=i.identityPoolId;if(!s)return R.debug("No Cognito Federated Identity pool provided"),Promise.reject("No Cognito Federated Identity pool provided");if(!r)return R.debug("region is not configured for getting the credentials"),Promise.reject("region is not configured for getting the credentials");var a="cognito-idp."+r+".amazonaws.com/"+o,c={};c[a]=n;var l=new L["a"]({region:r,customUserAgent:Object(T["a"])()}),u=function(){return q(t,void 0,void 0,(function(){var e,t,n;return U(this,(function(i){switch(i.label){case 0:return[4,l.send(new M["a"]({IdentityPoolId:s,Logins:c}))];case 1:return e=i.sent().IdentityId,this._identityId=e,t={client:l,logins:c,identityId:e},n=Object(j["a"])(t),[2,n()]}}))}))},d=u().catch((function(e){return q(t,void 0,void 0,(function(){return U(this,(function(t){throw e}))}))}));return this._loadCredentials(d,"userPool",!0,null)},e.prototype._loadCredentials=function(e,t,n,i){var r=this,o=this,s=this._config.identityPoolId;return new Promise((function(a,c){e.then((function(e){return q(r,void 0,void 0,(function(){var r,c,l,u,d,h;return U(this,(function(p){switch(p.label){case 0:if(R.debug("Load credentials successfully",e),this._identityId&&!e.identityId&&(e["identityId"]=this._identityId),o._credentials=e,o._credentials.authenticated=n,o._credentials_source=t,o._nextCredentialsRefresh=(new Date).getTime()+B,"federated"===t){r=Object.assign({id:this._credentials.identityId},i.user),c=i.provider,l=i.token,u=i.expires_at,d=i.identity_id;try{this._storage.setItem("aws-amplify-federatedInfo",JSON.stringify({provider:c,token:l,user:r,expires_at:u,identity_id:d}))}catch(f){R.debug("Failed to put federated info into auth storage",f)}}if("guest"!==t)return[3,4];p.label=1;case 1:return p.trys.push([1,3,,4]),[4,this._storageSync];case 2:return p.sent(),this._storage.setItem("CognitoIdentityId-"+s,e.identityId),[3,4];case 3:return h=p.sent(),R.debug("Failed to cache identityId",h),[3,4];case 4:return a(o._credentials),[2]}}))}))})).catch((function(t){if(t)return R.debug("Failed to load credentials",e),R.debug("Error loading credentials",t),void c(t)}))}))},e.prototype.set=function(e,t){return"session"===t?this._setCredentialsFromSession(e):"federation"===t?this._setCredentialsFromFederation(e):"guest"===t?this._setCredentialsForGuest():(R.debug("no source specified for setting credentials"),Promise.reject("invalid source"))},e.prototype.clear=function(){return q(this,void 0,void 0,(function(){return U(this,(function(e){return this._credentials=null,this._credentials_source=null,R.debug("removing aws-amplify-federatedInfo from storage"),this._storage.removeItem("aws-amplify-federatedInfo"),[2]}))}))},e.prototype.shear=function(e){return{accessKeyId:e.accessKeyId,sessionToken:e.sessionToken,secretAccessKey:e.secretAccessKey,identityId:e.identityId,authenticated:e.authenticated}},e}(),z=new D(null);E["a"].register(z)},"4b41":function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e._self._c;return t("div",[t("div",{staticClass:"text-h6 q-pb-md"},[e._v("Choose your prefer branch ?")]),t("q-input",{staticClass:"full-width q-mb-sm",attrs:{color:"white","bg-color":"white",dense:"",rounded:"",outlined:"",placeholder:"Search",clearable:""},scopedSlots:e._u([{key:"prepend",fn:function(){return[t("q-icon",{attrs:{name:"search"}})]},proxy:!0}]),model:{value:e.keyword,callback:function(t){e.keyword=t},expression:"keyword"}}),t("q-list",{staticClass:"bg-white",attrs:{separator:""}},e._l(e.filteredStore,(function(n,i){return t("q-item",{key:i,staticClass:"branch-item",attrs:{name:n.name,clickable:"",active:n.name===e.tab,"active-class":"bg-primary-2"},on:{click:function(t){return e.onChange(n.name)}}},[t("q-item-section",[t("q-item-label",{staticClass:"text-primary"},[e._v(e._s(e.getBranchName(n)))]),t("q-item-label",{class:{"text-primary":n.name===e.tab},attrs:{caption:""}},[e._v(" "+e._s(e.getBranchAddress(n))+" ")])],1)],1)})),1)],1)},r=[],o=(n("14d9"),n("429b")),s=n("7460"),a=n("74f7"),c=n("2b0e"),l=n("594d"),u=c["default"].extend({name:"QSpinnerGears",mixins:[l["a"]],render(e){return e("svg",{staticClass:"q-spinner",class:this.classes,on:{...this.qListeners},attrs:{focusable:"false",width:this.cSize,height:this.cSize,viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",xmlns:"http://www.w3.org/2000/svg"}},[e("g",{attrs:{transform:"translate(-20,-20)"}},[e("path",{attrs:{d:"M79.9,52.6C80,51.8,80,50.9,80,50s0-1.8-0.1-2.6l-5.1-0.4c-0.3-2.4-0.9-4.6-1.8-6.7l4.2-2.9c-0.7-1.6-1.6-3.1-2.6-4.5 L70,35c-1.4-1.9-3.1-3.5-4.9-4.9l2.2-4.6c-1.4-1-2.9-1.9-4.5-2.6L59.8,27c-2.1-0.9-4.4-1.5-6.7-1.8l-0.4-5.1C51.8,20,50.9,20,50,20 s-1.8,0-2.6,0.1l-0.4,5.1c-2.4,0.3-4.6,0.9-6.7,1.8l-2.9-4.1c-1.6,0.7-3.1,1.6-4.5,2.6l2.1,4.6c-1.9,1.4-3.5,3.1-5,4.9l-4.5-2.1 c-1,1.4-1.9,2.9-2.6,4.5l4.1,2.9c-0.9,2.1-1.5,4.4-1.8,6.8l-5,0.4C20,48.2,20,49.1,20,50s0,1.8,0.1,2.6l5,0.4 c0.3,2.4,0.9,4.7,1.8,6.8l-4.1,2.9c0.7,1.6,1.6,3.1,2.6,4.5l4.5-2.1c1.4,1.9,3.1,3.5,5,4.9l-2.1,4.6c1.4,1,2.9,1.9,4.5,2.6l2.9-4.1 c2.1,0.9,4.4,1.5,6.7,1.8l0.4,5.1C48.2,80,49.1,80,50,80s1.8,0,2.6-0.1l0.4-5.1c2.3-0.3,4.6-0.9,6.7-1.8l2.9,4.2 c1.6-0.7,3.1-1.6,4.5-2.6L65,69.9c1.9-1.4,3.5-3,4.9-4.9l4.6,2.2c1-1.4,1.9-2.9,2.6-4.5L73,59.8c0.9-2.1,1.5-4.4,1.8-6.7L79.9,52.6 z M50,65c-8.3,0-15-6.7-15-15c0-8.3,6.7-15,15-15s15,6.7,15,15C65,58.3,58.3,65,50,65z",fill:"currentColor"}},[e("animateTransform",{attrs:{attributeName:"transform",type:"rotate",from:"90 50 50",to:"0 50 50",dur:"1s",repeatCount:"indefinite"}})])]),e("g",{attrs:{transform:"translate(20,20) rotate(15 50 50)"}},[e("path",{attrs:{d:"M79.9,52.6C80,51.8,80,50.9,80,50s0-1.8-0.1-2.6l-5.1-0.4c-0.3-2.4-0.9-4.6-1.8-6.7l4.2-2.9c-0.7-1.6-1.6-3.1-2.6-4.5 L70,35c-1.4-1.9-3.1-3.5-4.9-4.9l2.2-4.6c-1.4-1-2.9-1.9-4.5-2.6L59.8,27c-2.1-0.9-4.4-1.5-6.7-1.8l-0.4-5.1C51.8,20,50.9,20,50,20 s-1.8,0-2.6,0.1l-0.4,5.1c-2.4,0.3-4.6,0.9-6.7,1.8l-2.9-4.1c-1.6,0.7-3.1,1.6-4.5,2.6l2.1,4.6c-1.9,1.4-3.5,3.1-5,4.9l-4.5-2.1 c-1,1.4-1.9,2.9-2.6,4.5l4.1,2.9c-0.9,2.1-1.5,4.4-1.8,6.8l-5,0.4C20,48.2,20,49.1,20,50s0,1.8,0.1,2.6l5,0.4 c0.3,2.4,0.9,4.7,1.8,6.8l-4.1,2.9c0.7,1.6,1.6,3.1,2.6,4.5l4.5-2.1c1.4,1.9,3.1,3.5,5,4.9l-2.1,4.6c1.4,1,2.9,1.9,4.5,2.6l2.9-4.1 c2.1,0.9,4.4,1.5,6.7,1.8l0.4,5.1C48.2,80,49.1,80,50,80s1.8,0,2.6-0.1l0.4-5.1c2.3-0.3,4.6-0.9,6.7-1.8l2.9,4.2 c1.6-0.7,3.1-1.6,4.5-2.6L65,69.9c1.9-1.4,3.5-3,4.9-4.9l4.6,2.2c1-1.4,1.9-2.9,2.6-4.5L73,59.8c0.9-2.1,1.5-4.4,1.8-6.7L79.9,52.6 z M50,65c-8.3,0-15-6.7-15-15c0-8.3,6.7-15,15-15s15,6.7,15,15C65,58.3,58.3,65,50,65z",fill:"currentColor"}},[e("animateTransform",{attrs:{attributeName:"transform",type:"rotate",from:"0 50 50",to:"90 50 50",dur:"1s",repeatCount:"indefinite"}})])])])}}),d=n("27f9"),h=n("66e5"),p=n("4074"),f=n("0170"),g=n("1c1c"),m=n("d8af");const y={QTabs:o["a"],QTab:s["a"],QInnerLoading:a["a"],QSpinnerGears:u,QInput:d["a"],QItem:h["a"],QItemSection:p["a"],QItemLabel:f["a"],QList:g["a"]};var b={name:"ChooseBranchDialog",components:{...y},data(){return{tab:null,store:[],visible:!1,keyword:""}},computed:{filteredStore(){return this.keyword?this.store.filter(e=>this.fullTextSearch(e,this.keyword)):this.store}},mounted(){this.store=Object(m["e"])(),this.sortStore(),this.tab=this.$store.getters["branch/name"]},methods:{getBranchName(e){const t="th"===this.$i18n.locale;return t?e.name_th:e.name},getBranchAddress(e){const t="th"===this.$i18n.locale;let n=[];if(t){n.push(e.address_th);const t=e.address_th.toLocaleLowerCase().includes(e.province_th.toLocaleLowerCase());t||n.push(e.province_th)}else{n.push(e.address);const t=e.address.toLocaleLowerCase().includes(e.subDistrict.toLocaleLowerCase());t||n.push(e.subDistrict);const i=e.address.toLocaleLowerCase().includes(e.district.toLocaleLowerCase());i||n.push(e.district);const r=e.address.toLocaleLowerCase().includes(e.province.toLocaleLowerCase());r||n.push(e.province)}const i=e.address.toLocaleLowerCase().includes(e.postcode.toLocaleLowerCase());return i||n.push(e.postcode),n.filter(e=>e&&"-"!==e.trim()).join(" ")},fullTextSearch(e,t){const n=[e.code,e.name,e.name_th,e.phoneNumber,e.address,e.address_th,e.subDistrict,e.district,e.province,e.province_th,e.postcode],i=String(n);return i.toLocaleLowerCase().includes(t.toLocaleLowerCase())},sortStore(){this.store.sort((e,t)=>e.name.localeCompare(t.name,void 0,{numeric:!0,sensitivity:"base"})),this.store.sort((e,t)=>"1000"===e.code?-1:0)},async onChange(e){this.visible=!0,await this.$store.dispatch("branch/update",{name:e}),this.visible=!1,this.$emit("choosed-branch",e),void 0!=dataLayer&&dataLayer.push({event:"header_navigation",event_action:"click_location-"+e,event_label:"page-"+this.$route.path})}}},v=b,_=(n("ffc0"),n("2877")),w=Object(_["a"])(v,i,r,!1,null,"44872ab6",null);t["default"]=w.exports},"4d00":function(e,t,n){"use strict";n("5898")},5054:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n("b7d9"),r=o(i);function o(e){return e&&e.__esModule?e:{default:e}}var s={options:{type:Object,required:!1,default:function(){return{}}},position:{type:Object,twoWay:!0},zIndex:{type:Number,twoWay:!0}},a=["domready","closeclick","content_changed"];t.default=(0,r.default)({mappedProps:s,events:a,name:"infoWindow",ctr:function(){return google.maps.InfoWindow},props:{opened:{type:Boolean,default:!0}},inject:{$markerPromise:{default:null}},mounted:function(){var e=this.$refs.flyaway;e.parentNode.removeChild(e)},beforeCreate:function(e){var t=this;if(e.content=this.$refs.flyaway,this.$markerPromise)return delete e.position,this.$markerPromise.then((function(e){return t.$markerObject=e,e}))},methods:{_openInfoWindow:function(){this.opened?null!==this.$markerObject?this.$infoWindowObject.open(this.$map,this.$markerObject):this.$infoWindowObject.open(this.$map):this.$infoWindowObject.close()}},afterCreate:function(){var e=this;this._openInfoWindow(),this.$watch("opened",(function(){e._openInfoWindow()}))}})},5122:function(e,t,n){"use strict";n("9131")},"51a8":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},r=n("2adb"),o=n("108f"),s=c(o),a=n("b7d9");function c(e){return e&&e.__esModule?e:{default:e}}var l={bounds:{type:Object},componentRestrictions:{type:Object,noBind:!0},types:{type:Array,default:function(){return[]}}},u={selectFirstOnEnter:{required:!1,type:Boolean,default:!1},options:{type:Object}};t.default={mounted:function(){var e=this;this.$gmapApiPromiseLazy().then((function(){if(e.selectFirstOnEnter&&(0,s.default)(e.$refs.input),"function"!==typeof google.maps.places.Autocomplete)throw new Error("google.maps.places.Autocomplete is undefined. Did you add 'places' to libraries when loading Google Maps?");var t=i({},(0,r.getPropsValues)(e,l),e.options);e.$autocomplete=new google.maps.places.Autocomplete(e.$refs.input,t),(0,r.bindProps)(e,e.$autocomplete,l),e.$watch("componentRestrictions",(function(t){void 0!==t&&e.$autocomplete.setComponentRestrictions(t)})),e.$autocomplete.addListener("place_changed",(function(){e.$emit("place_changed",e.$autocomplete.getPlace())}))}))},props:i({},(0,a.mappedPropsToVueProps)(l),u)}},"54c6":function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e._self._c;return t("div",[e.origin?t("div",{staticClass:"row"},[t("div",{class:e.fieldClass},[e._v("Origin")]),t("div",{class:e.valueClass},[e._v(" "+e._s(e.origin)+" ")])]):e._e(),e.description?t("div",{staticClass:"divider"}):e._e(),e.description?t("div",{class:e.paragraphClass},[t("div",{class:e.fieldClass},[e._v(e._s(e.$t("Description")))]),t("div",{class:e.paragraphValueClass,staticStyle:{"white-space":"pre-line"}},[e._v(" "+e._s(e.description)+" ")])]):e._e(),e.ingredients?t("div",{staticClass:"divider"}):e._e(),e.ingredients?t("div",{class:e.paragraphClass},[t("div",{class:e.fieldClass},[e._v(e._s(e.$t("Ingredients")))]),t("div",{class:e.paragraphValueClass,staticStyle:{"white-space":"pre-line"}},[e._v(" "+e._s(e.ingredients)+" ")])]):e._e(),e.data.nutritionfacts_calories?t("div",{staticClass:"divider"}):e._e(),e.data.nutritionfacts_calories?t("div",{staticClass:"row"},[t("div",{class:e.fieldClass},[e._v(e._s(e.$t("Nutrition facts")))]),t("div",{class:e.valueClass},[t("div",[e._v(" "+e._s(e.data.nutritionfacts_servingsize)+" ")]),t("div",[e._v(" "+e._s(e.data.nutritionfacts_calories)+" ")]),t("div",[e._v(" "+e._s(e.data.nutritionfacts_dailyvalue)+" ")])])]):e._e()])},r=[],o=n("aa7e"),s={name:"Others",props:{data:Object},mixins:[o["a"]],computed:{paragraphClass(){return this.$q.screen.gt.xs?"row":""},paragraphValueClass(){return this.$q.screen.gt.xs?"col-9":"col-6"},fieldClass(){return this.$q.screen.gt.xs?"col-3 title text-primary":"col-6 title text-primary"},valueClass(){return this.$q.screen.gt.xs?"col-9":"col-6 text-right"}},mounted(){}},a=s,c=(n("d355"),n("2877")),l=Object(c["a"])(a,i,r,!1,null,"3b3712b5",null);t["default"]=l.exports},"54f9":function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",[t("div",{ref:"flyaway"},[e._t("default")],2)])},r=[],o=function(e){return e.default||e}(n("5054")),s=o,a=n("2877"),c=Object(a["a"])(s,i,r,!1,null,null,null);t["default"]=c.exports},5836:function(e,t,n){"use strict";function i(e){var t=0;e((function(){t+=1}),(function(){t=Math.max(0,t-1)}),(function(){return 0===t}))}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i},5898:function(e,t,n){},"5b94":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_HASHABLE_LENGTH=t.INIT=t.KEY=t.DIGEST_LENGTH=t.BLOCK_SIZE=void 0,t.BLOCK_SIZE=64,t.DIGEST_LENGTH=32,t.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),t.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],t.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1},"5bdf":function(e,t,n){"use strict";n("ff16")},"5cdd":function(e,t,n){"use strict";n("b7cb")},"5eac":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n("b7d9"),r=o(i);function o(e){return e&&e.__esModule?e:{default:e}}var s={center:{type:Object,twoWay:!0,required:!0},radius:{type:Number,twoWay:!0},draggable:{type:Boolean,default:!1},editable:{type:Boolean,default:!1},options:{type:Object,twoWay:!1}},a=["click","dblclick","drag","dragend","dragstart","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"];t.default=(0,r.default)({mappedProps:s,name:"circle",ctr:function(){return google.maps.Circle},events:a})},"60ac":function(e,t,n){"use strict";var i;n.d(t,"a",(function(){return i})),function(e){e["DEFAULT_MSG"]="Authentication Error",e["EMPTY_USERNAME"]="Username cannot be empty",e["INVALID_USERNAME"]="The username should either be a string or one of the sign in types",e["EMPTY_PASSWORD"]="Password cannot be empty",e["EMPTY_CODE"]="Confirmation code cannot be empty",e["SIGN_UP_ERROR"]="Error creating account",e["NO_MFA"]="No valid MFA method provided",e["INVALID_MFA"]="Invalid MFA type",e["EMPTY_CHALLENGE"]="Challenge response cannot be empty",e["NO_USER_SESSION"]="Failed to get the session because the user is empty"}(i||(i={}))},"617e":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n("9ab4");i.__exportStar(n("ad4f"),t),i.__exportStar(n("2d52"),t),i.__exportStar(n("2415"),t),i.__exportStar(n("2446"),t),i.__exportStar(n("76e4"),t)},"61b8":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(i=(s=a.next()).done);i=!0)if(n.push(s.value),t&&n.length===t)break}catch(c){r=!0,o=c}finally{try{!i&&a["return"]&&a["return"]()}finally{if(r)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=n("b7d9"),o=s(r);function s(e){return e&&e.__esModule?e:{default:e}}var a={draggable:{type:Boolean},editable:{type:Boolean},options:{twoWay:!1,type:Object},path:{type:Array,twoWay:!0}},c=["click","dblclick","drag","dragend","dragstart","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"];t.default=(0,o.default)({mappedProps:a,props:{deepWatch:{type:Boolean,default:!1}},events:c,name:"polyline",ctr:function(){return google.maps.Polyline},afterCreate:function(){var e=this,t=function(){};this.$watch("path",(function(n){if(n){t(),e.$polylineObject.setPath(n);var r=e.$polylineObject.getPath(),o=[],s=function(){e.$emit("path_changed",e.$polylineObject.getPath())};o.push([r,r.addListener("insert_at",s)]),o.push([r,r.addListener("remove_at",s)]),o.push([r,r.addListener("set_at",s)]),t=function(){o.map((function(e){var t=i(e,2),n=(t[0],t[1]);return google.maps.event.removeListener(n)}))}}}),{deep:this.deepWatch,immediate:!0})}})},"61c1":function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.convertToBuffer=void 0;var i=n("5d63"),r="undefined"!==typeof e&&e.from?function(t){return e.from(t,"utf8")}:i.fromUtf8;function o(e){return e instanceof Uint8Array?e:"string"===typeof e?r(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}t.convertToBuffer=o}).call(this,n("b639").Buffer)},"648c":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var i=n("7451"),r=n("6f83"),o=n("9c7a"),s=n("6d5b"),a=n("617e"),c=n("62e8"),l=function(){function e(e){(0,s.supportsWebCrypto)((0,c.locateWindow)())?this.hash=new r.Sha256(e):(0,a.isMsWindow)((0,c.locateWindow)())?this.hash=new i.Sha256(e):this.hash=new o.Sha256(e)}return e.prototype.update=function(e,t){this.hash.update(e,t)},e.prototype.digest=function(){return this.hash.digest()},e}();t.Sha256=l},"69b8":function(e,t,n){"use strict";n("86aa")},"6d5b":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n("9ab4");i.__exportStar(n("9ed1"),t)},"6dd5":function(e,t,n){"use strict";n("fef1")},"6f83":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var i=n("a54d"),r=n("a7bd"),o=n("62e8"),s=function(){function e(e){this.toHash=new Uint8Array(0),void 0!==e&&(this.key=new Promise((function(t,n){(0,o.locateWindow)().crypto.subtle.importKey("raw",(0,i.convertToBuffer)(e),r.SHA_256_HMAC_ALGO,!1,["sign"]).then(t,n)})),this.key.catch((function(){})))}return e.prototype.update=function(e){if(!(0,i.isEmptyData)(e)){var t=(0,i.convertToBuffer)(e),n=new Uint8Array(this.toHash.byteLength+t.byteLength);n.set(this.toHash,0),n.set(t,this.toHash.byteLength),this.toHash=n}},e.prototype.digest=function(){var e=this;return this.key?this.key.then((function(t){return(0,o.locateWindow)().crypto.subtle.sign(r.SHA_256_HMAC_ALGO,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):(0,i.isEmptyData)(this.toHash)?Promise.resolve(r.EMPTY_DATA_SHA_256):Promise.resolve().then((function(){return(0,o.locateWindow)().crypto.subtle.digest(r.SHA_256_HASH,e.toHash)})).then((function(e){return Promise.resolve(new Uint8Array(e))}))},e}();t.Sha256=s},"719e":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n("bdd1"),r=function(){function e(){this.state=Int32Array.from(i.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,n=e.byteLength;if(this.bytesHashed+=n,8*this.bytesHashed>i.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");while(n>0)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===i.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(t.setUint8(this.bufferLength++,128),n%i.BLOCK_SIZE>=i.BLOCK_SIZE-8){for(var r=this.bufferLength;r<i.BLOCK_SIZE;r++)t.setUint8(r,0);this.hashBuffer(),this.bufferLength=0}for(r=this.bufferLength;r<i.BLOCK_SIZE-8;r++)t.setUint8(r,0);t.setUint32(i.BLOCK_SIZE-8,Math.floor(e/4294967296),!0),t.setUint32(i.BLOCK_SIZE-4,e),this.hashBuffer(),this.finished=!0}var o=new Uint8Array(i.DIGEST_LENGTH);for(r=0;r<8;r++)o[4*r]=this.state[r]>>>24&255,o[4*r+1]=this.state[r]>>>16&255,o[4*r+2]=this.state[r]>>>8&255,o[4*r+3]=this.state[r]>>>0&255;return o},e.prototype.hashBuffer=function(){for(var e=this,t=e.buffer,n=e.state,r=n[0],o=n[1],s=n[2],a=n[3],c=n[4],l=n[5],u=n[6],d=n[7],h=0;h<i.BLOCK_SIZE;h++){if(h<16)this.temp[h]=(255&t[4*h])<<24|(255&t[4*h+1])<<16|(255&t[4*h+2])<<8|255&t[4*h+3];else{var p=this.temp[h-2],f=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10;p=this.temp[h-15];var g=(p>>>7|p<<25)^(p>>>18|p<<14)^p>>>3;this.temp[h]=(f+this.temp[h-7]|0)+(g+this.temp[h-16]|0)}var m=(((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))+(c&l^~c&u)|0)+(d+(i.KEY[h]+this.temp[h]|0)|0)|0,y=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&o^r&s^o&s)|0;d=u,u=l,l=c,c=a+m|0,a=s,s=o,o=r,r=m+y|0}n[0]+=r,n[1]+=o,n[2]+=s,n[3]+=a,n[4]+=c,n[5]+=l,n[6]+=u,n[7]+=d},e}();t.RawSha256=r},"72d4":function(e,t,n){"use strict";const i={methods:{async loadMember(){await this.$store.dispatch("member/LoadMemberInfo")},async loadMemberWithPhonenumber(e){await this.$store.dispatch("member/LoadMemberInfoWithPhone",e)}}};t["a"]=i},7451:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var i=n("9103"),r=n("a7bd"),o=n("5d63"),s=n("62e8"),a=function(){function e(e){e?(this.operation=c(e).then((function(e){return(0,s.locateWindow)().msCrypto.subtle.sign(r.SHA_256_HMAC_ALGO,e)})),this.operation.catch((function(){}))):this.operation=Promise.resolve((0,s.locateWindow)().msCrypto.subtle.digest("SHA-256"))}return e.prototype.update=function(e){var t=this;(0,i.isEmptyData)(e)||(this.operation=this.operation.then((function(n){return n.onerror=function(){t.operation=Promise.reject(new Error("Error encountered updating hash"))},n.process(l(e)),n})),this.operation.catch((function(){})))},e.prototype.digest=function(){return this.operation.then((function(e){return new Promise((function(t,n){e.onerror=function(){n(new Error("Error encountered finalizing hash"))},e.oncomplete=function(){e.result&&t(new Uint8Array(e.result)),n(new Error("Error encountered finalizing hash"))},e.finish()}))}))},e}();function c(e){return new Promise((function(t,n){var i=(0,s.locateWindow)().msCrypto.subtle.importKey("raw",l(e),r.SHA_256_HMAC_ALGO,!1,["sign"]);i.oncomplete=function(){i.result&&t(i.result),n(new Error("ImportKey completed without importing key."))},i.onerror=function(){n(new Error("ImportKey failed to import key."))}}))}function l(e){return"string"===typeof e?(0,o.fromUtf8)(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}t.Sha256=a},"755e":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StreetViewPanorama=t.MountableMixin=t.Autocomplete=t.MapElementFactory=t.MapElementMixin=t.PlaceInput=t.Map=t.InfoWindow=t.Rectangle=t.Cluster=t.Circle=t.Polygon=t.Polyline=t.Marker=t.loadGmapApi=void 0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e};t.install=N,t.gmapApi=U;var r=n("f4a0"),o=$(r),s=n("b7b1"),a=n("82e1"),c=$(a),l=n("61b8"),u=$(l),d=n("f656"),h=$(d),p=n("5eac"),f=$(p),g=n("d75b"),m=$(g),y=n("54f9"),b=$(y),v=n("9cb5"),_=$(v),w=n("f895"),k=$(w),S=n("bc7a"),C=$(S),x=n("7bdd"),I=$(x),P=n("a8b4"),O=$(P),A=n("b7d9"),T=$(A),E=n("ce18"),j=$(E);function $(e){return e&&e.__esModule?e:{default:e}}var L=void 0,M=null;function N(e,t){t=i({installComponents:!0,autobindAllEvents:!1},t),M=new e({data:{gmapApi:null}});var n=new e,r=q(t);e.mixin({created:function(){this.$gmapDefaultResizeBus=n,this.$gmapOptions=t,this.$gmapApiPromiseLazy=r}}),e.$gmapDefaultResizeBus=n,e.$gmapApiPromiseLazy=r,t.installComponents&&(e.component("GmapMap",_.default),e.component("GmapMarker",c.default),e.component("GmapInfoWindow",b.default),e.component("GmapPolyline",u.default),e.component("GmapPolygon",h.default),e.component("GmapCircle",f.default),e.component("GmapRectangle",m.default),e.component("GmapAutocomplete",I.default),e.component("GmapPlaceInput",C.default),e.component("GmapStreetViewPanorama",k.default))}function q(e){function t(){return M.gmapApi={},window.google}if(e.load)return(0,o.default)((function(){return"undefined"===typeof window?new Promise((function(){})).then(t):new Promise((function(t,n){try{window["vueGoogleMapsInit"]=t,(0,s.loadGmapApi)(e.load,e.loadCn)}catch(i){n(i)}})).then(t)}));var n=new Promise((function(e){"undefined"!==typeof window&&(window["vueGoogleMapsInit"]=e)})).then(t);return(0,o.default)((function(){return n}))}function U(){return M.gmapApi&&window.google}t.loadGmapApi=s.loadGmapApi,t.Marker=c.default,t.Polyline=u.default,t.Polygon=h.default,t.Circle=f.default,t.Cluster=L,t.Rectangle=m.default,t.InfoWindow=b.default,t.Map=_.default,t.PlaceInput=C.default,t.MapElementMixin=O.default,t.MapElementFactory=T.default,t.Autocomplete=I.default,t.MountableMixin=j.default,t.StreetViewPanorama=k.default},"76e4":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMsWindow=void 0;var i=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function r(e){return"MSInputMethodContext"in e&&"msCrypto"in e}function o(e){if(r(e)&&void 0!==e.msCrypto.subtle){var t=e.msCrypto,n=t.getRandomValues,o=t.subtle;return i.map((function(e){return o[e]})).concat(n).every((function(e){return"function"===typeof e}))}return!1}t.isMsWindow=o},"7a03":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var i=function(n){(e.$gmapOptions.autobindAllEvents||e.$listeners[n])&&t.addListener(n,(function(t){e.$emit(n,t)}))},r=!0,o=!1,s=void 0;try{for(var a,c=n[Symbol.iterator]();!(r=(a=c.next()).done);r=!0){var l=a.value;i(l)}}catch(u){o=!0,s=u}finally{try{!r&&c.return&&c.return()}finally{if(o)throw s}}}},"7bdd":function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("input",e._g(e._b({ref:"input"},"input",e.$attrs,!1),e.$listeners))},r=[],o=function(e){return e.default||e}(n("51a8")),s=o,a=n("2877"),c=Object(a["a"])(s,i,r,!1,null,null,null);t["default"]=c.exports},"7c67":function(e,t,n){},"7c77":function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e._self._c;return t("div",{ref:"content-header",staticClass:"content-header full-width tw-mb-2",style:e.elementStyle},[t("p",{staticClass:"title"},[e._v(e._s(e.content.text))]),e.sectionContent?t("p",{staticClass:"content tw-whitespace-pre-line"},[e._v(" "+e._s(e.sectionContent)+" ")]):e._e()])},r=[],o={name:"ContentHeader",props:{content:Object},mounted(){const{text_color:e,background_color:t}=this.content;this.$refs["content-header"]},computed:{sectionContent(){var e;return null===(e=this.content)||void 0===e?void 0:e.section_content},elementStyle(){const{text_color:e,background_color:t}=this.content;let n="#ffffff",i="#2c2a74";return e&&(n=e),t&&(i=t),{color:n,backgroundColor:i}}},watch:{content:{immediate:!1,handler:function(e){if(e){const{text_color:t,background_color:n}=e,i=this.$refs["content-header"];t&&(i.style.color=t)}},deep:!0}}},s=o,a=(n("dbbb"),n("2877")),c=Object(a["a"])(s,i,r,!1,null,"2012a162",null);t["default"]=c.exports},"7d03":function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var i=n("36de"),r=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),s=[];try{while((void 0===t||t-- >0)&&!(i=o.next()).done)s.push(i.value)}catch(a){r={error:a}}finally{try{i&&!i.done&&(n=o["return"])&&n.call(o)}finally{if(r)throw r.error}}return s},o=new i["a"]("Amplify"),s=function(){function e(){this._components=[],this._config={},this._modules={},this.Auth=null,this.Analytics=null,this.API=null,this.Credentials=null,this.Storage=null,this.I18n=null,this.Cache=null,this.PubSub=null,this.Interactions=null,this.Pushnotification=null,this.UI=null,this.XR=null,this.Predictions=null,this.DataStore=null,this.Logger=i["a"],this.ServiceWorker=null}return e.prototype.register=function(e){o.debug("component registered in amplify",e),this._components.push(e),"function"===typeof e.getModuleName?(this._modules[e.getModuleName()]=e,this[e.getModuleName()]=e):o.debug("no getModuleName method for component",e),e.configure(this._config)},e.prototype.configure=function(e){var t=this;return e?(this._config=Object.assign(this._config,e),o.debug("amplify config",this._config),Object.entries(this._modules).forEach((function(e){var n=r(e,2),i=(n[0],n[1]);Object.keys(i).forEach((function(e){t._modules[e]&&(i[e]=t._modules[e])}))})),this._components.map((function(e){e.configure(t._config)})),this._config):this._config},e.prototype.addPluggable=function(e){e&&e["getCategory"]&&"function"===typeof e["getCategory"]&&this._components.map((function(t){t["addPluggable"]&&"function"===typeof t["addPluggable"]&&t.addPluggable(e)}))},e}(),a=new s},8148:function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e._self._c;return t("div",{staticClass:"row justify-center",staticStyle:{"padding-bottom":"200px"}},[e.$q.screen.lt.sm?t("TitleBar",{attrs:{"center-slot":"Cart"}}):e._e(),e.$q.screen.gt.xs?t("TileBar",{attrs:{optionButton:e.$t("Back")},on:{"on-button":function(t){return e.$router.go(-1)}}}):e._e(),e.OutOfStockList.length>0?t("TileBar",{attrs:{title:e.$t("Out of stock items"),optionButton:e.$t("Remove")},on:{"on-button":e.onRemoveOutOfStock}}):e._e(),t("div",{staticClass:"col-12 col-sm-10 col-md-9 bg-white",staticStyle:{position:"relative"}},[e._l(e.OutOfStockList,(function(e,n){return t("CartItem",{key:e.cprcode,staticClass:"q-mt-sm q-mb-md",staticStyle:{padding:"0px 16px"},attrs:{info:e,index:n,source:"cart",disable:!0}})})),t("q-inner-loading",{attrs:{showing:e.OOSLoading}},[t("q-spinner",{attrs:{size:"50px",color:"primary"}})],1)],2),e.OverStockList.length>0?t("TileBar",{attrs:{title:e.$t("Unavailable items"),optionButton:e.$t("Remove")},on:{"on-button":e.onRemoveOverStock}}):e._e(),t("div",{staticClass:"col-12 col-sm-10 col-md-9 bg-white",staticStyle:{position:"relative"}},[e._l(e.OverStockList,(function(e,n){return t("CartItem",{key:e.cprcode,staticClass:"q-mt-sm q-mb-md",staticStyle:{padding:"0px 16px"},attrs:{info:e,index:n,source:"cart",disable:!0}})})),t("q-inner-loading",{attrs:{showing:e.OSLoading}},[t("q-spinner",{attrs:{size:"50px",color:"primary"}})],1)],2),t("TileBar",{attrs:{title:e.$t("Your cart"),optionButton:e.InStockList.length<=0?e.$t("Add items"):e.$t("Clear cart")},on:{"on-button":function(t){e.InStockList.length<=0?e.onAddItems():e.onClear()}}}),t("div",{staticClass:"col-12 col-sm-10 col-md-9 bg-white",staticStyle:{position:"relative","min-height":"100px"}},[e._l(e.InStockList,(function(e,n){return t("CartItem",{key:e.cprcode,staticClass:"q-mt-sm q-mb-md",staticStyle:{padding:"0px 16px"},attrs:{info:e,index:n,source:"cart"}})})),e.InStockList.length<=0&&e.IsLoaded?t("div",{staticClass:"col-12 row",staticStyle:{padding:"16px"}},[t("span",{staticClass:"col-12"},[e._v(e._s(e.$t("You have no items in your shopping cart.")))])]):e._e(),t("q-inner-loading",{attrs:{showing:e.ISLoading||!e.IsLoaded}},[t("q-spinner",{attrs:{size:"50px",color:"primary"}})],1)],2),t("div",{staticClass:"sticky-bottom col-12 col-sm-10 col-md-9 bg-white"},[t("q-btn",{staticClass:"full-width q-mt-sm",attrs:{"no-caps":"","no-wrap":"",loading:e.priceLoading,color:"primary",label:e.$t("Checkout"),disable:e.error||e.zeroProduct},on:{click:e.onCheckout}}),t("div",{staticClass:"row justify-end"},[t("div",{staticClass:"col-12 col-md-6"},[t("div",{staticClass:"row justify-between"},[t("div",[e._v(e._s(e.$t("Sub total")))]),t("div",{staticClass:"text-primary"},[e._v(" "+e._s(e.$priceFormat(e.subTotal))+" ")])]),t("q-expansion-item",{attrs:{dense:"","dense-toggle":"","hide-expand-icon":"",label:e.$t("Discount"),"content-inset-level":0,"header-style":{padding:0},"default-opened":""},scopedSlots:e._u([{key:"header",fn:function(){return[t("div",{staticClass:"flex justify-between full-width"},[t("div",[e._v(e._s(e.$t("Discount")))]),t("div",{staticClass:"text-red"},[e._v(" "+e._s(0===e.discount?"":"-")+e._s(e.$priceFormat(e.discount))+" ")])])]},proxy:!0}])},[t("div",{staticClass:"discount-detail"},[e.discountDetail.promotionDiscount>0?t("div",{staticClass:"row justify-between"},[t("div",[e._v(e._s(e.$t("Promotional discount")))]),t("div",{staticClass:"text-red"},[e._v(" "+e._s(0===e.discountDetail.promotionDiscount?"":"-")+e._s(e.$priceFormat(e.discountDetail.promotionDiscount))+" ")])]):e._e(),e.discountDetail.shippingDiscount>0?t("div",{staticClass:"row justify-between"},[t("div",[e._v(e._s(e.$t("Shipping discount")))]),t("div",{staticClass:"text-red"},[e._v(" "+e._s(0===e.discountDetail.shippingDiscount?"":"-")+e._s(e.$priceFormat(e.discountDetail.shippingDiscount))+" ")])]):e._e(),e.discountDetail.voucherDiscount>0?t("div",{staticClass:"row justify-between"},[t("div",[e._v(e._s(e.$t("Voucher discount")))]),t("div",{staticClass:"text-red"},[e._v(" "+e._s(0===e.discountDetail.voucherDiscount?"":"-")+e._s(e.$priceFormat(e.discountDetail.voucherDiscount))+" ")])]):e._e()])]),t("div",{staticClass:"row justify-between"},[t("div",[e._v(e._s(e.$t("Total")))]),t("div",{staticClass:"text-primary text-bold"},[e._v(" "+e._s(e.$priceFormat(e.total))+" ")])])],1)]),t("q-separator"),t("div",{staticClass:"row"},[t("q-checkbox",{staticClass:"q-mr-sm",attrs:{color:"primary",dense:""},on:{input:e.onChangeSelectAll},model:{value:e.selectAll,callback:function(t){e.selectAll=t},expression:"selectAll"}}),t("div",{staticClass:"title"},[e._v(e._s(e.$t("Select all")))])],1)],1),t("q-dialog",{attrs:{persistent:""},model:{value:e.dialog,callback:function(t){e.dialog=t},expression:"dialog"}},[t("DialogAlert",{attrs:{message:e.message,"left-btn":e.$t("Cancel"),"right-btn":e.$t("Confirm")},on:{leftClick:e.onCancel,rightClick:e.onClearConfirm}})],1),t("q-dialog",{attrs:{persistent:""},model:{value:e.dialogSuggestProduct,callback:function(t){e.dialogSuggestProduct=t},expression:"dialogSuggestProduct"}},[t("q-card",[t("q-bar",{staticClass:"bg-primary"},[t("q-space"),t("q-btn",{staticClass:"text-white",attrs:{dense:"",flat:"",icon:"close"},on:{click:e.onCloseSuggestProduct}},[t("q-tooltip",{staticClass:"bg-white text-primary"},[e._v(e._s(e.$t("Close")))])],1)],1),t("q-card-section",[t("div",{staticClass:"text-h6 text-primary"},[e._v(" "+e._s(e.$t("Please choose your free product"))+" ")])]),t("q-separator"),e.suggestProduct.length>0?t("q-card-section",{staticClass:"scroll",staticStyle:{"max-height":"50vh"}},e._l(e.suggestProduct,(function(n,i){return t("div",{key:i},[t("div",{staticStyle:{"font-weight":"bold"}},[e._v(" "+e._s(e.$t("Promotion:"))+" "+e._s(n.couponInfo.description)+" ")]),t("SuggestProductGroup",{ref:"SuggestProductGroup",refInFor:!0,attrs:{group:n}})],1)})),0):e._e(),e.suggestProduct.length<=0?t("q-card-section",{staticClass:"scroll",staticStyle:{"max-height":"50vh"}},[t("div",{staticStyle:{"font-weight":"bold"}},[e._v(" "+e._s(e.$t("No suggest product left."))+" ")])]):e._e(),t("q-separator"),t("q-card-actions",{attrs:{align:"right"}},[t("q-btn",{attrs:{"no-wrap":"","no-caps":"",flat:"",label:e.$t("Checkout Now"),loading:e.confirmCheckoutLoading,color:"primary"},on:{click:e.onConfirmCheckout}})],1)],1)],1)],1)},r=[],o=(n("ddb0"),n("14d9"),n("13d5"),n("2f62")),s=n("013f"),a=n("429b"),c=n("7460"),l=n("27f9"),u=n("1c1c"),d=n("66e5"),h=n("4074"),p=n("0170"),f=n("3786"),g=n("eb85"),m=n("cb32"),y=n("8f8e"),b=n("74f7"),v=n("0d59"),_=n("24e8"),w=n("f09f"),k=n("a370"),S=n("4b7e"),C=n("d847"),x=n("05c0"),I=n("2c91"),P=n("2b0e"),O=n("0016"),A=n("e9c1"),T=n("b7fa"),E=n("d882"),j=n("dc8a"),$=n("d54d"),L=n("9e47");const M=["none","strict","leaf","leaf-filtered"];var N=P["default"].extend({name:"QTree",mixins:[T["a"]],props:{nodes:{type:Array,required:!0},nodeKey:{type:String,required:!0},labelKey:{type:String,default:"label"},childrenKey:{type:String,default:"children"},dense:Boolean,color:String,controlColor:String,textColor:String,selectedColor:String,icon:String,tickStrategy:{type:String,default:"none",validator:e=>M.includes(e)},ticked:Array,expanded:Array,selected:{},noSelectionUnset:Boolean,defaultExpandAll:Boolean,accordion:Boolean,filter:String,filterMethod:{type:Function,default(e,t){const n=t.toLowerCase();return e[this.labelKey]&&e[this.labelKey].toLowerCase().indexOf(n)>-1}},duration:Number,noConnectors:Boolean,noTransition:Boolean,noNodesLabel:String,noResultsLabel:String},computed:{classes(){return"q-tree q-tree--"+(!0===this.dense?"dense":"standard")+(!0===this.noConnectors?" q-tree--no-connectors":"")+(!0===this.isDark?" q-tree--dark":"")+(void 0!==this.color?" text-"+this.color:"")},hasSelection(){return void 0!==this.selected},computedIcon(){return this.icon||this.$q.iconSet.tree.icon},computedControlColor(){return this.controlColor||this.color},textColorClass(){if(void 0!==this.textColor)return"text-"+this.textColor},selectedColorClass(){const e=this.selectedColor||this.color;if(e)return"text-"+e},meta(){const e={},t=(n,i)=>{const r=n.tickStrategy||(i?i.tickStrategy:this.tickStrategy),o=n[this.nodeKey],s=n[this.childrenKey]&&n[this.childrenKey].length>0,a=!0!==n.disabled&&!0===this.hasSelection&&!1!==n.selectable,c=!0!==n.disabled&&!1!==n.expandable,l="none"!==r,u="strict"===r,d="leaf-filtered"===r,h="leaf"===r||"leaf-filtered"===r;let p=!0!==n.disabled&&!1!==n.tickable;!0===h&&!0===p&&i&&!0!==i.tickable&&(p=!1);let f=n.lazy;!0===f&&void 0!==this.lazy[o]&&!0===Array.isArray(n[this.childrenKey])&&(f=this.lazy[o]);const g={key:o,parent:i,isParent:s,lazy:f,disabled:n.disabled,link:!0!==n.disabled&&(!0===a||!0===c&&(!0===s||!0===f)),children:[],matchesFilter:!this.filter||this.filterMethod(n,this.filter),selected:o===this.selected&&!0===a,selectable:a,expanded:!0===s&&this.innerExpanded.includes(o),expandable:c,noTick:!0===n.noTick||!0!==u&&f&&"loaded"!==f,tickable:p,tickStrategy:r,hasTicking:l,strictTicking:u,leafFilteredTicking:d,leafTicking:h,ticked:(!0===u||!0!==s)&&this.innerTicked.includes(o)};if(e[o]=g,!0===s&&(g.children=n[this.childrenKey].map(e=>t(e,g)),this.filter&&(!0!==g.matchesFilter?g.matchesFilter=g.children.some(e=>e.matchesFilter):!0!==g.noTick&&!0!==g.disabled&&!0===g.tickable&&!0===d&&!0===g.children.every(e=>!0!==e.matchesFilter||!0===e.noTick||!0!==e.tickable)&&(g.tickable=!1)),!0===g.matchesFilter&&(!0!==g.noTick&&!0!==u&&!0===g.children.every(e=>e.noTick)&&(g.noTick=!0),h))){if(g.ticked=!1,g.indeterminate=g.children.some(e=>!0===e.indeterminate),g.tickable=!0===g.tickable&&g.children.some(e=>e.tickable),!0!==g.indeterminate){const e=g.children.reduce((e,t)=>!0===t.ticked?e+1:e,0);e===g.children.length?g.ticked=!0:e>0&&(g.indeterminate=!0)}!0===g.indeterminate&&(g.indeterminateNextState=g.children.every(e=>!0!==e.tickable||!0!==e.ticked))}return g};return this.nodes.forEach(e=>t(e,null)),e}},data(){return{lazy:{},innerTicked:this.ticked||[],innerExpanded:this.expanded||[]}},watch:{ticked(e){this.innerTicked=e},expanded(e){this.innerExpanded=e}},methods:{getNodeByKey(e){const t=[].reduce,n=(i,r)=>i||!r?i:!0===Array.isArray(r)?t.call(Object(r),n,i):r[this.nodeKey]===e?r:r[this.childrenKey]?n(null,r[this.childrenKey]):void 0;return n(null,this.nodes)},getTickedNodes(){return this.innerTicked.map(e=>this.getNodeByKey(e))},getExpandedNodes(){return this.innerExpanded.map(e=>this.getNodeByKey(e))},isExpanded(e){return!(!e||!this.meta[e])&&this.meta[e].expanded},collapseAll(){void 0!==this.expanded?this.$emit("update:expanded",[]):this.innerExpanded=[]},expandAll(){const e=[],t=n=>{n[this.childrenKey]&&n[this.childrenKey].length>0&&!1!==n.expandable&&!0!==n.disabled&&(e.push(n[this.nodeKey]),n[this.childrenKey].forEach(t))};this.nodes.forEach(t),void 0!==this.expanded?this.$emit("update:expanded",e):this.innerExpanded=e},setExpanded(e,t,n=this.getNodeByKey(e),i=this.meta[e]){if(i.lazy&&"loaded"!==i.lazy){if("loading"===i.lazy)return;this.$set(this.lazy,e,"loading"),!0!==Array.isArray(n[this.childrenKey])&&this.$set(n,this.childrenKey,[]),this.$emit("lazy-load",{node:n,key:e,done:t=>{this.lazy[e]="loaded",this.$set(n,this.childrenKey,!0===Array.isArray(t)?t:[]),this.$nextTick(()=>{const t=this.meta[e];t&&!0===t.isParent&&this.__setExpanded(e,!0)})},fail:()=>{this.$delete(this.lazy,e),0===n[this.childrenKey].length&&this.$delete(n,this.childrenKey)}})}else!0===i.isParent&&!0===i.expandable&&this.__setExpanded(e,t)},__setExpanded(e,t){let n=this.innerExpanded;const i=void 0!==this.expanded;if(!0===i&&(n=n.slice()),t){if(this.accordion&&this.meta[e]){const t=[];this.meta[e].parent?this.meta[e].parent.children.forEach(n=>{n.key!==e&&!0===n.expandable&&t.push(n.key)}):this.nodes.forEach(n=>{const i=n[this.nodeKey];i!==e&&t.push(i)}),t.length>0&&(n=n.filter(e=>!1===t.includes(e)))}n=n.concat([e]).filter((e,t,n)=>n.indexOf(e)===t)}else n=n.filter(t=>t!==e);!0===i?this.$emit("update:expanded",n):this.innerExpanded=n},isTicked(e){return!(!e||!this.meta[e])&&this.meta[e].ticked},setTicked(e,t){let n=this.innerTicked;const i=void 0!==this.ticked;!0===i&&(n=n.slice()),n=t?n.concat(e).filter((e,t,n)=>n.indexOf(e)===t):n.filter(t=>!1===e.includes(t)),!0===i&&this.$emit("update:ticked",n)},__getSlotScope(e,t,n){const i={tree:this,node:e,key:n,color:this.color,dark:this.isDark};return Object(L["a"])(i,"expanded",()=>t.expanded,e=>{e!==t.expanded&&this.setExpanded(n,e)}),Object(L["a"])(i,"ticked",()=>t.ticked,e=>{e!==t.ticked&&this.setTicked([n],e)}),i},__getChildren(e,t){return(this.filter?t.filter(e=>this.meta[e[this.nodeKey]].matchesFilter):t).map(t=>this.__getNode(e,t))},__getNodeMedia(e,t){if(void 0!==t.icon)return e(O["a"],{staticClass:"q-tree__icon q-mr-sm",props:{name:t.icon,color:t.iconColor}});const n=t.img||t.avatar;return n?e("img",{staticClass:`q-tree__${t.img?"img":"avatar"} q-mr-sm`,attrs:{src:n}}):void 0},__getNode(e,t){const n=t[this.nodeKey],i=this.meta[n],r=t.header&&this.$scopedSlots["header-"+t.header]||this.$scopedSlots["default-header"],o=!0===i.isParent?this.__getChildren(e,t[this.childrenKey]):[],s=o.length>0||i.lazy&&"loaded"!==i.lazy;let a=t.body&&this.$scopedSlots["body-"+t.body]||this.$scopedSlots["default-body"];const c=void 0!==r||void 0!==a?this.__getSlotScope(t,i,n):null;return void 0!==a&&(a=e("div",{staticClass:"q-tree__node-body relative-position"},[e("div",{class:this.textColorClass},[a(c)])])),e("div",{key:n,staticClass:"q-tree__node relative-position",class:{"q-tree__node--parent":s,"q-tree__node--child":!s}},[e("div",{staticClass:"q-tree__node-header relative-position row no-wrap items-center",class:{"q-tree__node--link q-hoverable q-focusable":i.link,"q-tree__node--selected":i.selected,"q-tree__node--disabled":i.disabled},attrs:{tabindex:i.link?0:-1},on:{click:e=>{this.__onClick(t,i,e)},keypress:e=>{!0!==Object(j["c"])(e)&&(13===e.keyCode?this.__onClick(t,i,e,!0):32===e.keyCode&&this.__onExpandClick(t,i,e,!0))}}},[e("div",{staticClass:"q-focus-helper",attrs:{tabindex:-1},ref:"blurTarget_"+i.key}),"loading"===i.lazy?e(v["a"],{staticClass:"q-tree__spinner",props:{color:this.computedControlColor}}):!0===s?e(O["a"],{staticClass:"q-tree__arrow",class:{"q-tree__arrow--rotate":i.expanded},props:{name:this.computedIcon},on:{click:e=>{this.__onExpandClick(t,i,e)}}}):null,!0===i.hasTicking&&!0!==i.noTick?e(y["a"],{staticClass:"q-tree__tickbox",props:{value:!0===i.indeterminate?null:i.ticked,color:this.computedControlColor,dark:this.isDark,dense:!0,keepColor:!0,disable:!0!==i.tickable},on:{keydown:E["l"],input:e=>{this.__onTickedClick(i,e)}}}):null,e("div",{staticClass:"q-tree__node-header-content col row no-wrap items-center",class:i.selected?this.selectedColorClass:this.textColorClass},[r?r(c):[this.__getNodeMedia(e,t),e("div",t[this.labelKey])]])]),!0===s?!0===this.noTransition?e("div",{staticClass:"q-tree__node-collapsible",class:this.textColorClass,directives:[{name:"show",value:i.expanded}]},[a,e("div",{staticClass:"q-tree__children",class:{"q-tree__node--disabled":i.disabled}},o)]):e(A["a"],{props:{duration:this.duration},on:Object($["b"])(this,"slide",{show:()=>{this.$emit("after-show")},hide:()=>{this.$emit("after-hide")}})},[e("div",{staticClass:"q-tree__node-collapsible",class:this.textColorClass,directives:[{name:"show",value:i.expanded}]},[a,e("div",{staticClass:"q-tree__children",class:{"q-tree__node--disabled":i.disabled}},o)])]):a])},__blur(e){const t=this.$refs["blurTarget_"+e];void 0!==t&&t.focus()},__onClick(e,t,n,i){!0!==i&&this.__blur(t.key),this.hasSelection&&t.selectable?!1===this.noSelectionUnset?this.$emit("update:selected",t.key!==this.selected?t.key:null):t.key!==this.selected&&this.$emit("update:selected",void 0===t.key?null:t.key):this.__onExpandClick(e,t,n,i),"function"===typeof e.handler&&e.handler(e)},__onExpandClick(e,t,n,i){void 0!==n&&Object(E["l"])(n),!0!==i&&this.__blur(t.key),this.setExpanded(t.key,!t.expanded,e,t)},__onTickedClick(e,t){if(!0===e.indeterminate&&(t=e.indeterminateNextState),e.strictTicking)this.setTicked([e.key],t);else if(e.leafTicking){const n=[],i=e=>{e.isParent?(!0!==t&&!0!==e.noTick&&!0===e.tickable&&n.push(e.key),!0===e.leafTicking&&e.children.forEach(i)):!0===e.noTick||!0!==e.tickable||!0===e.leafFilteredTicking&&!0!==e.matchesFilter||n.push(e.key)};i(e),this.setTicked(n,t)}}},render(e){const t=this.__getChildren(e,this.nodes);return e("div",{class:this.classes},0===t.length?this.filter?this.noResultsLabel||this.$q.lang.tree.noResults:this.noNodesLabel||this.$q.lang.tree.noNodes:t)},created(){!0===this.defaultExpandAll&&this.expandAll()}}),q=n("3b73"),U=n("bb5b"),R=n("256a"),B=n("bd6e");const D={QTabs:a["a"],QTab:c["a"],QInput:l["a"],QList:u["a"],QItem:d["a"],QItemSection:h["a"],QItemLabel:p["a"],QRadio:f["a"],QSeparator:g["a"],QAvatar:m["a"],QCheckbox:y["a"],QInnerLoading:b["a"],QSpinner:v["a"],QDialog:_["a"],QCard:w["a"],QCardSection:k["a"],QCardActions:S["a"],QBar:C["a"],QTooltip:x["a"],QSpace:I["a"],QTree:N,QExpansionItem:q["a"]};var z={name:"CartV2",components:{...D,DialogAlert:U["default"],TitleBar:()=>n.e("signin~31ecd969").then(n.bind(null,"1e1d")),TileBar:()=>n.e("chunk-vendors~cfbf0a2e").then(n.bind(null,"7112")),CartItem:()=>n.e("chunk-vendors~3dbc3e57").then(n.bind(null,"415a")),SuggestProductGroup:()=>n.e("signin~31ecd969").then(n.bind(null,"b8fb"))},mixins:[R["a"]],data(){return{nodes:[{label:"Discount",children:[{label:"Promotional discount",value:0},{label:"Voucher discount",value:0},{label:"Shipping discount",value:0}]}],selectAll:!0,OOSLoading:!1,OSLoading:!1,ISLoading:!1,total:null,discount:null,discountDetail:{promotionDiscount:0,shippingDiscount:0,voucherDiscount:0},subTotal:null,priceLoading:!1,error:!0,dialog:!1,message:null,suggestProduct:[],dialogSuggestProduct:!1,confirmCheckoutLoading:!1,isGASent:!1}},computed:{...Object(o["b"])("cartData",["IsLoaded","InStockList","OutOfStockList","OverStockList","IsSelectedAll","SelectedInStockList"]),zeroProduct(){var e;return 0===(null===(e=this.SelectedInStockList)||void 0===e?void 0:e.length)}},watch:{IsSelectedAll:{handler:function(e){this.selectAll=e}},SelectedInStockList:{immediate:!0,handler:function(){this.IsLoaded&&this.getPriceDetail()}},IsLoaded:{immediate:!0,handler:function(e){if(e&&dataLayer&&!this.isGASent){const e=this.InStockList.map((e,t)=>Object(B["b"])(e,t,"cart"));dataLayer.push({event:"view_cart",ecommerce:{items:e}}),this.isGASent=!0}}}},methods:{async sequenctialAsync(e){const t=Promise.resolve(null);await e.reduce((e,t)=>e.then(()=>this.$store.dispatch("cart/Remove",t)),t)},async onRemoveOutOfStock(){try{this.OOSLoading=!0,await this.sequenctialAsync(this.OutOfStockList)}catch(e){}finally{this.OOSLoading=!1}},async onRemoveOverStock(){try{this.OSLoading=!0,await this.sequenctialAsync(this.OverStockList)}catch(e){}finally{this.OSLoading=!1}},onClear(){this.dialog=!0,this.dialogFrom="onRemove",this.message=this.$t("Do you want to clear your cart ?")},onCancel(){this.dialog=!1},async onClearConfirm(){this.dialog=!1;try{if(this.ISLoading=!0,await this.$store.dispatch("cart/Clear"),dataLayer){const e=this.InStockList.map((e,t)=>Object(B["b"])(e,t,"cart"));dataLayer.push({event:"remove_from_cart",ecommerce:{items:[e]}})}}catch(e){}finally{this.ISLoading=!1}},onAddItems(){this.$router.push("/catalog/New Arrival")},onChangeSelectAll(e){this.$store.commit("cartData/setSelectedAll",e)},async getPriceDetail(){try{this.priceLoading=!0;const e=this.$store.getters["branch/code"];let t;if(t=await this.$store.dispatch("cartData/GetCost",{branchId:e.toString(),productList:this.SelectedInStockList.map(e=>({productName:e.hema_name_en,quantity:e.quantity,cprcode:e.cprcode,remark:e.remark}))}),this.total=t.grandTotal,this.subTotal=t.subTotal,this.discount=t.cartDiscount,t.bogoDiscount&&(this.discount+=t.bogoDiscount,this.discountDetail.promotionDiscount=t.bogoDiscount+t.cartDiscount),t.shippingDiscount&&(this.discountDetail.shippingDiscount=t.shippingDiscount,this.discount+=t.shippingDiscount),t.voucherDiscount&&(this.discountDetail.voucherDiscount=t.voucherDiscount,this.discount+=t.voucherDiscount),t=await this.$store.dispatch("cartData/GetSuggestion",{branchId:e.toString(),productList:this.SelectedInStockList.map(e=>({productName:e.hema_name_en,quantity:e.quantity,cprcode:e.cprcode,remark:e.remark})),shipping:{scheduleList:[],shippingType:"PICKUP"}}),t.suggestedCoupons){let n=await Promise.all(t.suggestedCoupons.map(async t=>{let n=await this.$store.dispatch("catalogs/GetMultiple",{list:t.suggestedProducts.map(e=>({cprcode:e})),branch:e});return n=n.filter(e=>e.stock>0),n=n.filter(e=>{const t=this.InStockList.find(t=>t.cprcode===e.cprcode);return!(t&&t.quantity&&e.stock<t.quantity+1)}),{...t,itemList:n}}));n=n.filter(e=>!!(e.itemList&&e.itemList.length>0)),this.suggestProduct=n}t.calculateCostInput&&(t=await this.$store.dispatch("order/GetCostWithShippingWithCoupon",{branchId:e.toString(),couponCodeList:t.calculateCostInput.couponCodeList,productList:this.SelectedInStockList.map(e=>({productName:e.hema_name_en,quantity:e.quantity,cprcode:e.cprcode,remark:e.remark}))})),this.total=t.grandTotal,this.subTotal=t.subTotal,this.discount=t.cartDiscount,t.bogoDiscount&&(this.discount+=t.bogoDiscount,this.discountDetail.promotionDiscount=t.bogoDiscount+t.cartDiscount),t.shippingDiscount&&(this.discountDetail.shippingDiscount=t.shippingDiscount,this.discount+=t.shippingDiscount),t.voucherDiscount&&(this.discountDetail.voucherDiscount=t.voucherDiscount,this.discount+=t.voucherDiscount),this.error=null}catch(e){this.total="-",this.subTotal="-",this.discount="",this.error=!0}finally{this.priceLoading=!1}},async onCheckout(){this.suggestProduct.length>0?this.dialogSuggestProduct=!0:(dataLayer&&dataLayer.push({event:"cart",event_action:"click_initiate_checkout",event_label:"page-"+this.$route.path}),this.$router.push("/checkout"))},async onConfirmCheckout(){try{this.confirmCheckoutLoading=!0;const e=this.$refs["SuggestProductGroup"],t=e.map(e=>e.getSelectedItem());await Promise.all(t.map(e=>this.AddToCart(e,null,{noNotify:!0}))),this.$router.push("/checkout")}catch(e){}finally{this.confirmCheckoutLoading=!1}},onCloseSuggestProduct(){this.dialogSuggestProduct=!1},$priceFormat(e){return Object(s["a"])(e)}}},F=z,W=(n("5122"),n("2877")),H=Object(W["a"])(F,i,r,!1,null,"75a35a70",null);t["default"]=H.exports},"82bf":function(e,t,n){"use strict";var i=n("7d03"),r=n("d8bc"),o={keyPrefix:"aws-amplify-cache",capacityInBytes:1048576,itemMaxSize:21e4,defaultTTL:2592e5,defaultPriority:5,warningThreshold:.8,storage:(new r["a"]).getStorage()};function s(e){var t=0;t=e.length;for(var n=e.length;n>=0;n-=1){var i=e.charCodeAt(n);i>127&&i<=2047?t+=1:i>2047&&i<=65535&&(t+=2),i>=56320&&i<=57343&&(n-=1)}return t}function a(){var e=new Date;return e.getTime()}function c(e){return Number.isInteger?Number.isInteger(e):l(e)}function l(e){return"number"===typeof e&&isFinite(e)&&Math.floor(e)===e}var u={},d=(function(){function e(){}e.clear=function(){u={}},e.getItem=function(e){return u[e]||null},e.setItem=function(e,t){u[e]=t},e.removeItem=function(e){delete u[e]}}(),n("36de")),h=new d["a"]("StorageCache"),p=function(){function e(e){this.config=Object.assign({},e),this.cacheCurSizeKey=this.config.keyPrefix+"CurSize",this.checkConfig()}return e.prototype.getModuleName=function(){return"Cache"},e.prototype.checkConfig=function(){c(this.config.capacityInBytes)||(h.error("Invalid parameter: capacityInBytes. It should be an Integer. Setting back to default."),this.config.capacityInBytes=o.capacityInBytes),c(this.config.itemMaxSize)||(h.error("Invalid parameter: itemMaxSize. It should be an Integer. Setting back to default."),this.config.itemMaxSize=o.itemMaxSize),c(this.config.defaultTTL)||(h.error("Invalid parameter: defaultTTL. It should be an Integer. Setting back to default."),this.config.defaultTTL=o.defaultTTL),c(this.config.defaultPriority)||(h.error("Invalid parameter: defaultPriority. It should be an Integer. Setting back to default."),this.config.defaultPriority=o.defaultPriority),this.config.itemMaxSize>this.config.capacityInBytes&&(h.error("Invalid parameter: itemMaxSize. It should be smaller than capacityInBytes. Setting back to default."),this.config.itemMaxSize=o.itemMaxSize),(this.config.defaultPriority>5||this.config.defaultPriority<1)&&(h.error("Invalid parameter: defaultPriority. It should be between 1 and 5. Setting back to default."),this.config.defaultPriority=o.defaultPriority),(Number(this.config.warningThreshold)>1||Number(this.config.warningThreshold)<0)&&(h.error("Invalid parameter: warningThreshold. It should be between 0 and 1. Setting back to default."),this.config.warningThreshold=o.warningThreshold);var e=5242880;this.config.capacityInBytes>e&&(h.error("Cache Capacity should be less than 5MB. Setting back to default. Setting back to default."),this.config.capacityInBytes=o.capacityInBytes)},e.prototype.fillCacheItem=function(e,t,n){var i={key:e,data:t,timestamp:a(),visitedTime:a(),priority:n.priority,expires:n.expires,type:typeof t,byteSize:0};return i.byteSize=s(JSON.stringify(i)),i.byteSize=s(JSON.stringify(i)),i},e.prototype.configure=function(e){return e?(e.keyPrefix&&h.warn("Don't try to configure keyPrefix!"),this.config=Object.assign({},this.config,e,e.Cache),this.checkConfig(),this.config):this.config},e}(),f=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),g=new d["a"]("Cache"),m=function(e){function t(t){var n=this,i=t?Object.assign({},o,t):o;return n=e.call(this,i)||this,n.config.storage=i.storage,n.getItem=n.getItem.bind(n),n.setItem=n.setItem.bind(n),n.removeItem=n.removeItem.bind(n),n}return f(t,e),t.prototype._decreaseCurSizeInBytes=function(e){var t=this.getCacheCurSize();this.config.storage.setItem(this.cacheCurSizeKey,(t-e).toString())},t.prototype._increaseCurSizeInBytes=function(e){var t=this.getCacheCurSize();this.config.storage.setItem(this.cacheCurSizeKey,(t+e).toString())},t.prototype._refreshItem=function(e,t){return e.visitedTime=a(),this.config.storage.setItem(t,JSON.stringify(e)),e},t.prototype._isExpired=function(e){var t=this.config.storage.getItem(e),n=JSON.parse(t);return a()>=n.expires},t.prototype._removeItem=function(e,t){var n=t||JSON.parse(this.config.storage.getItem(e)).byteSize;this._decreaseCurSizeInBytes(n),this.config.storage.removeItem(e)},t.prototype._setItem=function(e,t){this._increaseCurSizeInBytes(t.byteSize);try{this.config.storage.setItem(e,JSON.stringify(t))}catch(n){this._decreaseCurSizeInBytes(t.byteSize),g.error("Failed to set item "+n)}},t.prototype._sizeToPop=function(e){var t=this.getCacheCurSize()+e-this.config.capacityInBytes,n=(1-this.config.warningThreshold)*this.config.capacityInBytes;return t>n?t:n},t.prototype._isCacheFull=function(e){return e+this.getCacheCurSize()>this.config.capacityInBytes},t.prototype._findValidKeys=function(){for(var e=[],t=[],n=0;n<this.config.storage.length;n+=1)t.push(this.config.storage.key(n));for(n=0;n<t.length;n+=1){var i=t[n];0===i.indexOf(this.config.keyPrefix)&&i!==this.cacheCurSizeKey&&(this._isExpired(i)?this._removeItem(i):e.push(i))}return e},t.prototype._popOutItems=function(e,t){for(var n=[],i=t,r=0;r<e.length;r+=1){var o=this.config.storage.getItem(e[r]);if(null!=o){var s=JSON.parse(o);n.push(s)}}n.sort((function(e,t){return e.priority>t.priority?-1:e.priority<t.priority?1:e.visitedTime<t.visitedTime?-1:1}));for(r=0;r<n.length;r+=1)if(this._removeItem(n[r].key,n[r].byteSize),i-=n[r].byteSize,i<=0)return},t.prototype.setItem=function(e,t,n){g.log("Set item: key is "+e+", value is "+t+" with options: "+n);var i=this.config.keyPrefix+e;if(i!==this.config.keyPrefix&&i!==this.cacheCurSizeKey)if("undefined"!==typeof t){var r={priority:n&&void 0!==n.priority?n.priority:this.config.defaultPriority,expires:n&&void 0!==n.expires?n.expires:this.config.defaultTTL+a()};if(r.priority<1||r.priority>5)g.warn("Invalid parameter: priority due to out or range. It should be within 1 and 5.");else{var o=this.fillCacheItem(i,t,r);if(o.byteSize>this.config.itemMaxSize)g.warn("Item with key: "+e+" you are trying to put into is too big!");else try{var s=this.config.storage.getItem(i);if(s&&this._removeItem(i,JSON.parse(s).byteSize),this._isCacheFull(o.byteSize)){var c=this._findValidKeys();if(this._isCacheFull(o.byteSize)){var l=this._sizeToPop(o.byteSize);this._popOutItems(c,l)}}this._setItem(i,o)}catch(u){g.warn("setItem failed! "+u)}}}else g.warn("The value of item should not be undefined!");else g.warn("Invalid key: should not be empty or 'CurSize'")},t.prototype.getItem=function(e,t){g.log("Get item: key is "+e+" with options "+t);var n=null,i=this.config.keyPrefix+e;if(i===this.config.keyPrefix||i===this.cacheCurSizeKey)return g.warn("Invalid key: should not be empty or 'CurSize'"),null;try{if(n=this.config.storage.getItem(i),null!=n){if(!this._isExpired(i)){var r=JSON.parse(n);return r=this._refreshItem(r,i),r.data}this._removeItem(i,JSON.parse(n).byteSize),n=null}if(t&&void 0!==t.callback){var o=t.callback();return null!==o&&this.setItem(e,o,t),o}return null}catch(s){return g.warn("getItem failed! "+s),null}},t.prototype.removeItem=function(e){g.log("Remove item: key is "+e);var t=this.config.keyPrefix+e;if(t!==this.config.keyPrefix&&t!==this.cacheCurSizeKey)try{var n=this.config.storage.getItem(t);n&&this._removeItem(t,JSON.parse(n).byteSize)}catch(i){g.warn("removeItem failed! "+i)}},t.prototype.clear=function(){g.log("Clear Cache");for(var e=[],t=0;t<this.config.storage.length;t+=1){var n=this.config.storage.key(t);0===n.indexOf(this.config.keyPrefix)&&e.push(n)}try{for(t=0;t<e.length;t+=1)this.config.storage.removeItem(e[t])}catch(i){g.warn("clear failed! "+i)}},t.prototype.getAllKeys=function(){for(var e=[],t=0;t<this.config.storage.length;t+=1){var n=this.config.storage.key(t);0===n.indexOf(this.config.keyPrefix)&&n!==this.cacheCurSizeKey&&e.push(n.substring(this.config.keyPrefix.length))}return e},t.prototype.getCacheCurSize=function(){var e=this.config.storage.getItem(this.cacheCurSizeKey);return e||(this.config.storage.setItem(this.cacheCurSizeKey,"0"),e="0"),Number(e)},t.prototype.createInstance=function(e){return e.keyPrefix&&e.keyPrefix!==o.keyPrefix||(g.error("invalid keyPrefix, setting keyPrefix with timeStamp"),e.keyPrefix=a.toString()),new t(e)},t}(p),y=new m;t["a"]=y;i["a"].register(y)},"82e1":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n("b7d9"),r=o(i);function o(e){return e&&e.__esModule?e:{default:e}}var s={animation:{twoWay:!0,type:Number},attribution:{type:Object},clickable:{type:Boolean,twoWay:!0,default:!0},cursor:{type:String,twoWay:!0},draggable:{type:Boolean,twoWay:!0,default:!1},icon:{twoWay:!0},label:{},opacity:{type:Number,default:1},options:{type:Object},place:{type:Object},position:{type:Object,twoWay:!0},shape:{type:Object,twoWay:!0},title:{type:String,twoWay:!0},zIndex:{type:Number,twoWay:!0},visible:{twoWay:!0,default:!0}},a=["click","rightclick","dblclick","drag","dragstart","dragend","mouseup","mousedown","mouseover","mouseout"];t.default=(0,r.default)({mappedProps:s,events:a,name:"marker",ctr:function(){return google.maps.Marker},inject:{$clusterPromise:{default:null}},render:function(e){return this.$slots.default&&0!==this.$slots.default.length?1===this.$slots.default.length?this.$slots.default[0]:e("div",this.$slots.default):""},destroyed:function(){this.$markerObject&&(this.$clusterObject?this.$clusterObject.removeMarker(this.$markerObject,!0):this.$markerObject.setMap(null))},beforeCreate:function(e){return this.$clusterPromise&&(e.map=null),this.$clusterPromise},afterCreate:function(e){var t=this;this.$clusterPromise&&this.$clusterPromise.then((function(n){n.addMarker(e),t.$clusterObject=n}))}})},"86aa":function(e,t,n){},"8ded":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n("9ab4"),r=n("bdd1"),o=n("719e"),s=n("c562"),a=function(){function e(e){if(this.hash=new o.RawSha256,e){this.outer=new o.RawSha256;var t=c(e),n=new Uint8Array(r.BLOCK_SIZE);n.set(t);for(var i=0;i<r.BLOCK_SIZE;i++)t[i]^=54,n[i]^=92;this.hash.update(t),this.outer.update(n);for(i=0;i<t.byteLength;i++)t[i]=0}}return e.prototype.update=function(e){if(!l(e)&&!this.error)try{this.hash.update(u(e))}catch(t){this.error=t}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return i.__awaiter(this,void 0,void 0,(function(){return i.__generator(this,(function(e){return[2,this.digestSync()]}))}))},e}();function c(e){var t=u(e);if(t.byteLength>r.BLOCK_SIZE){var n=new o.RawSha256;n.update(t),t=n.digest()}var i=new Uint8Array(r.BLOCK_SIZE);return i.set(t),i}function l(e){return"string"===typeof e?0===e.length:0===e.byteLength}function u(e){return"string"===typeof e?s.fromUtf8(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}t.Sha256=a},9103:function(e,t,n){"use strict";function i(e){return"string"===typeof e?0===e.length:0===e.byteLength}Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=i},9131:function(e,t,n){},"95b6":function(e,t,n){"use strict";n("01f4")},9675:function(e,t,n){"use strict";function i(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}Object.defineProperty(t,"__esModule",{value:!0}),t.numToUint8=void 0,t.numToUint8=i},"9b48":function(e,t,n){"use strict";var i,r;function o(e){var t=["provider"];return e&&!!t.find((function(t){return e.hasOwnProperty(t)}))}function s(e){var t=["customProvider"];return e&&!!t.find((function(t){return e.hasOwnProperty(t)}))}function a(e){var t=["customState"];return e&&!!t.find((function(t){return e.hasOwnProperty(t)}))}function c(e){return void 0!==e.redirectSignIn}function l(e){return!!e.username}n.d(t,"b",(function(){return i})),n.d(t,"e",(function(){return o})),n.d(t,"f",(function(){return s})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return c})),n.d(t,"a",(function(){return r})),n.d(t,"g",(function(){return l})),function(e){e["Cognito"]="COGNITO",e["Google"]="Google",e["Facebook"]="Facebook",e["Amazon"]="LoginWithAmazon",e["Apple"]="SignInWithApple"}(i||(i={})),function(e){e["NoConfig"]="noConfig",e["MissingAuthConfig"]="missingAuthConfig",e["EmptyUsername"]="emptyUsername",e["InvalidUsername"]="invalidUsername",e["EmptyPassword"]="emptyPassword",e["EmptyCode"]="emptyCode",e["SignUpError"]="signUpError",e["NoMFA"]="noMFA",e["InvalidMFA"]="invalidMFA",e["EmptyChallengeResponse"]="emptyChallengeResponse",e["NoUserSession"]="noUserSession",e["Default"]="default"}(r||(r={}))},"9c7a":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n("9ab4");(0,i.__exportStar)(n("0103"),t)},"9cb5":function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"vue-map-container"},[t("div",{ref:"vue-map",staticClass:"vue-map"}),t("div",{staticClass:"vue-map-hidden"},[e._t("default")],2),e._t("visible")],2)},r=[],o=function(e){return e.default||e}(n("d092")),s=o,a=(n("c42c"),n("2877")),c=Object(a["a"])(s,i,r,!1,null,null,null);t["default"]=c.exports},"9df5":function(e,t,n){"use strict";n("e526")},"9ed1":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.supportsZeroByteGCM=t.supportsSubtleCrypto=t.supportsSecureRandom=t.supportsWebCrypto=void 0;var i=n("9ab4"),r=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function o(e){if(s(e)&&"object"===typeof e.crypto.subtle){var t=e.crypto.subtle;return a(t)}return!1}function s(e){if("object"===typeof e&&"object"===typeof e.crypto){var t=e.crypto.getRandomValues;return"function"===typeof t}return!1}function a(e){return e&&r.every((function(t){return"function"===typeof e[t]}))}function c(e){return i.__awaiter(this,void 0,void 0,(function(){var t,n;return i.__generator(this,(function(i){switch(i.label){case 0:if(!a(e))return[2,!1];i.label=1;case 1:return i.trys.push([1,4,,5]),[4,e.generateKey({name:"AES-GCM",length:128},!1,["encrypt"])];case 2:return t=i.sent(),[4,e.encrypt({name:"AES-GCM",iv:new Uint8Array(Array(12)),additionalData:new Uint8Array(Array(16)),tagLength:128},t,new Uint8Array(0))];case 3:return n=i.sent(),[2,16===n.byteLength];case 4:return i.sent(),[2,!1];case 5:return[2]}}))}))}t.supportsWebCrypto=o,t.supportsSecureRandom=s,t.supportsSubtleCrypto=a,t.supportsZeroByteGCM=c},a0e1:function(e,t,n){"use strict";n("f55d")},a54d:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=t.numToUint8=t.isEmptyData=t.convertToBuffer=void 0;var i=n("61c1");Object.defineProperty(t,"convertToBuffer",{enumerable:!0,get:function(){return i.convertToBuffer}});var r=n("cd6f");Object.defineProperty(t,"isEmptyData",{enumerable:!0,get:function(){return r.isEmptyData}});var o=n("9675");Object.defineProperty(t,"numToUint8",{enumerable:!0,get:function(){return o.numToUint8}});var s=n("c221");Object.defineProperty(t,"uint32ArrayFrom",{enumerable:!0,get:function(){return s.uint32ArrayFrom}})},a7bd:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_DATA_SHA_256=t.SHA_256_HMAC_ALGO=t.SHA_256_HASH=void 0,t.SHA_256_HASH={name:"SHA-256"},t.SHA_256_HMAC_ALGO={name:"HMAC",hash:t.SHA_256_HASH},t.EMPTY_DATA_SHA_256=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85])},a8b4:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={inject:{$mapPromise:{default:"abcdef"}},provide:function(){var e=this;return this.$mapPromise.then((function(t){e.$map=t})),{}}}},a9b7:function(e,t,n){"use strict";n.r(t);var i=function(){var e,t=this,n=t._self._c;return n("div",{staticClass:"product-section tw-rounded tw-my-1 tw-p-1 tw-flex tw-gap-2 tw-cursor-pointer"},[n("img",{staticClass:"tw-h-16 tw-flex-none tw-rounded",attrs:{src:t.imageSrc,alt:null===(e=t.product)||void 0===e?void 0:e.name},on:{click:t.onClick}}),n("div",{staticClass:"content tw-flex-auto tw-text-xs tw-my-1"},[n("div",{staticClass:"tw-font-semibold"},[t._v(t._s(t.productName))]),n("div",{staticClass:"tw-text-xs"},[t._v(t._s(t.productBrand))])])])},r=[],o=(n("14d9"),n("707d")),s={name:"ProductSection",props:{content:{type:Object,required:!0}},data(){return{imageSrc:"",imageIndex:0,maxRetry:10,product:null,productName:"",productBrand:""}},mounted(){const{cprcode:e}=this.content;this.getProduct(e),this.initializeImageSrc(e,!1)},methods:{onClick(){const{cprcode:e}=this.content;this.$router.push({name:"SingleProduct",params:{id:e}})},async getProduct(){try{const e=await this.$store.dispatch("products/LoadProductAttributes",this.content.cprcode);this.product=e;const{hema_name_en:t,hema_brand_en:n}=e;this.productName=t,this.productBrand=n}catch(e){}},initializeImageSrc(e,t){this.imageSrc=Object(o["a"])(e,t),this.imageIndex=0},retryImageSrc(e,t){this.imageIndex<=this.maxRetry&&(this.imageSrc=Object(o["a"])(e,t)+"-"+this.imageIndex,this.imageIndex++)}}},a=s,c=n("2877"),l=Object(c["a"])(a,i,r,!1,null,null,null);t["default"]=l.exports},ad4f:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},b4d3:function(e,t,n){"use strict";var i=n("36de"),r=n("4327"),o=n("42e2"),s=n("7d03"),a=new i["a"]("ClientDevice_Browser");function c(){return"undefined"===typeof window?{}:l()}function l(){if("undefined"===typeof window)return a.warn("No window object available to get browser client info"),{};var e=window.navigator;if(!e)return a.warn("No navigator object available to get browser client info"),{};var t=e.platform,n=e.product,i=e.vendor,r=e.userAgent,o=e.language,s=h(r),c=d();return{platform:t,make:n||i,model:s.type,version:s.version,appVersion:[s.type,s.version].join("/"),language:o,timezone:c}}function u(){return"undefined"===typeof window?(a.warn("No window object available to get browser client info"),{width:320,height:320}):{width:window.innerWidth,height:window.innerHeight}}function d(){var e=/\(([A-Za-z\s].*)\)/.exec((new Date).toString());return e&&e[1]||""}function h(e){var t=/.+(Opera[\s[A-Z]*|OPR[\sA-Z]*)\/([0-9\.]+).*/i.exec(e);if(t)return{type:t[1],version:t[2]};var n=/.+(Trident|Edge)\/([0-9\.]+).*/i.exec(e);if(n)return{type:n[1],version:n[2]};var i=/.+(Chrome|Firefox|FxiOS)\/([0-9\.]+).*/i.exec(e);if(i)return{type:i[1],version:i[2]};var r=/.+(Safari)\/([0-9\.]+).*/i.exec(e);if(r)return{type:r[1],version:r[2]};var o=/.+(AppleWebKit)\/([0-9\.]+).*/i.exec(e);if(o)return{type:o[1],version:o[2]};var s=/.*([A-Z]+)\/([0-9\.]+).*/i.exec(e);return s?{type:s[1],version:s[2]}:{type:"",version:""}}var p=function(){function e(){}return e.clientInfo=function(){return c()},e.dimension=function(){return u()},e}(),f=n("bd58"),g=n("1f3a"),m=n("fab4"),y=n("475d"),b=n("19de"),v=n("64cf"),_=n("bb2d"),w=n("82bf"),k=n("11c1"),S=function(){return!0},C=function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{c(i.next(e))}catch(t){o(t)}}function a(e){try{c(i["throw"](e))}catch(t){o(t)}}function c(e){e.done?n(e.value):r(e.value).then(s,a)}c((i=i.apply(e,t||[])).next())}))},x=function(e,t){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return c([e,t])}}function c(o){if(n)throw new TypeError("Generator is already executing.");while(s)try{if(n=1,i&&(r=2&o[0]?i["return"]:o[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(r=s.trys,!(r=r.length>0&&r[r.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(a){o=[6,a],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},I=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),s=[];try{while((void 0===t||t-- >0)&&!(i=o.next()).done)s.push(i.value)}catch(a){r={error:a}}finally{try{i&&!i.done&&(n=o["return"])&&n.call(o)}finally{if(r)throw r.error}}return s},P=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(I(arguments[t]));return e},O=new i["a"]("EventsBuffer"),A=[429,500],T=[202],E=function(){function e(e,t){this._pause=!1,this._flush=!1,O.debug("Instantiating buffer with config:",t),this._buffer=[],this._client=e,this._config=t,this._sendBatch=this._sendBatch.bind(this),this._startLoop()}return e.prototype.push=function(e){var t;if(this._buffer>this._config.bufferSize)return O.debug("Exceeded analytics events buffer size"),e.handlers.reject(new Error("Exceeded the size of analytics events buffer"));var n=e.params.event.eventId,i=(t={},t[n]=e,t);this._buffer.push(i)},e.prototype.pause=function(){this._pause=!0},e.prototype.resume=function(){this._pause=!1},e.prototype.updateClient=function(e){this._client=e},e.prototype.flush=function(){this._flush=!0},e.prototype._startLoop=function(){this._interval&&clearInterval(this._interval);var e=this._config.flushInterval;this._interval=setInterval(this._sendBatch,e)},e.prototype._sendBatch=function(){var e=this._buffer.length;if(this._flush&&!e&&clearInterval(this._interval),!this._pause&&e&&S()){var t=this._config.flushSize,n=Math.min(t,e),i=this._buffer.splice(0,n);this._putEvents(i)}},e.prototype._putEvents=function(e){return C(this,void 0,void 0,(function(){var t,n,i,r,o;return x(this,(function(s){switch(s.label){case 0:t=this._bufferToMap(e),n=this._generateBatchEventParams(t),s.label=1;case 1:return s.trys.push([1,3,,4]),i=new b["a"](n),[4,this._client.send(i)];case 2:return r=s.sent(),this._processPutEventsSuccessResponse(r,t),[3,4];case 3:return o=s.sent(),[2,this._handlePutEventsFailure(o,t)];case 4:return[2]}}))}))},e.prototype._generateBatchEventParams=function(e){var t={ApplicationId:"",EventsRequest:{BatchItem:{}}};return Object.values(e).forEach((function(e){var n=e.params,i=n.event,r=n.timestamp,o=n.config,s=i.name,a=i.attributes,c=i.metrics,l=i.eventId,u=i.session,d=o.appId,h=o.endpointId,p=t.EventsRequest.BatchItem;t.ApplicationId=t.ApplicationId||d,p[h]||(p[h]={Endpoint:{},Events:{}}),p[h].Events[l]={EventType:s,Timestamp:new Date(r).toISOString(),Attributes:a,Metrics:c,Session:u}})),t},e.prototype._handlePutEventsFailure=function(e,t){O.debug("_putEvents Failed: ",e);var n=e.$metadata&&e.$metadata.httpStatusCode;if(A.includes(n)){var i=Object.values(t);this._retry(i)}else;},e.prototype._processPutEventsSuccessResponse=function(e,t){var n=e.EventsResponse.Results,i=[];Object.entries(n).forEach((function(e){var n=I(e,2),r=n[0],o=n[1],s=o.EventsItemResponse;Object.entries(s).forEach((function(e){var n,o,s=I(e,2),a=s[0],c=s[1],l=c.StatusCode,u=c.Message,d=t[a],h={EventsResponse:{Results:(n={},n[r]={EventsItemResponse:(o={},o[a]={StatusCode:l,Message:u},o)},n)}};if(T.includes(l))d.handlers.resolve(h);else{if(!A.includes(l)){var p=d.params.event.name;return O.error("event "+a+" : "+p+" failed with error: "+u),d.handlers.reject(h)}i.push(d)}}))})),i.length&&this._retry(i)},e.prototype._retry=function(e){var t,n=[];e.forEach((function(e){var t,i=e.params,r=i.event,o=r.eventId,s=r.name;if(i.resendLimit-- >0)return O.debug("resending event "+o+" : "+s+" with "+i.resendLimit+" retry attempts remaining"),void n.push((t={},t[o]=e,t));O.debug("no retry attempts remaining for event "+o+" : "+s)})),(t=this._buffer).unshift.apply(t,P(n))},e.prototype._bufferToMap=function(e){return e.reduce((function(e,t){var n=I(Object.entries(t),1),i=I(n[0],2),r=i[0],o=i[1];return e[r]=o,e}),{})},e}(),j=E,$=function(){return $=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},$.apply(this,arguments)},L=function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{c(i.next(e))}catch(t){o(t)}}function a(e){try{c(i["throw"](e))}catch(t){o(t)}}function c(e){e.done?n(e.value):r(e.value).then(s,a)}c((i=i.apply(e,t||[])).next())}))},M=function(e,t){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return c([e,t])}}function c(o){if(n)throw new TypeError("Generator is already executing.");while(s)try{if(n=1,i&&(r=2&o[0]?i["return"]:o[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(r=s.trys,!(r=r.length>0&&r[r.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(a){o=[6,a],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},N=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n},q="undefined"!==typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",U=function(e,t){r["a"].dispatch("analytics",{event:e,data:t},"Analytics",q)},R=new i["a"]("AWSPinpointProvider"),B=[429,500],D=[202],z=403,F="mobiletargeting",W="ExpiredTokenException",H="_update_endpoint",V="_session.start",G="_session.stop",K="undefined"!==typeof navigator&&navigator&&"function"===typeof navigator.sendBeacon,Y=1e3,Q=100,Z=5e3,J=5,X=function(){function e(e){this._endpointGenerating=!0,this._endpointUpdateInProgress=!1,this._buffer=null,this._endpointBuffer=[],this._config=e||{},this._config.bufferSize=this._config.bufferSize||Y,this._config.flushSize=this._config.flushSize||Q,this._config.flushInterval=this._config.flushInterval||Z,this._config.resendLimit=this._config.resendLimit||J,this._clientInfo=p.clientInfo()}return e.prototype.getCategory=function(){return e.category},e.prototype.getProviderName=function(){return e.providerName},e.prototype.configure=function(e){var t=this;R.debug("configure Analytics",e);var n=e||{};if(this._config=Object.assign({},this._config,n),this._endpointGenerating=!!e["autoSessionRecord"],this._config.appId&&!this._config.disabled)if(this._config.endpointId)U("pinpointProvider_configured",null);else{var i=this.getProviderName()+"_"+this._config.appId;this._getEndpointId(i).then((function(e){R.debug("setting endpoint id from the cache",e),t._config.endpointId=e,U("pinpointProvider_configured",null)})).catch((function(e){R.debug("Failed to generate endpointId",e)}))}else this._flushBuffer();return this._config},e.prototype.record=function(e,t){return L(this,void 0,void 0,(function(){var n,i;return M(this,(function(r){switch(r.label){case 0:return R.debug("_public record",e),[4,this._getCredentials()];case 1:return n=r.sent(),n&&this._config.appId&&this._config.region?(this._initClients(n),i=(new Date).getTime(),this._generateSession(e),e.event.eventId=Object(k["v1"])(),Object.assign(e,{timestamp:i,config:this._config}),e.event.immediate?[2,this._send(e,t)]:(this._putToBuffer(e,t),[2])):(R.debug("cannot send events without credentials, applicationId or region"),[2,t.reject(new Error("No credentials, applicationId or region"))])}}))}))},e.prototype._sendEndpointUpdate=function(e){return L(this,void 0,void 0,(function(){var t;return M(this,(function(n){switch(n.label){case 0:return this._endpointUpdateInProgress?(this._endpointBuffer.push(e),[2]):(this._endpointUpdateInProgress=!0,[4,this._updateEndpoint(e)]);case 1:return n.sent(),t=this._endpointBuffer.shift(),this._endpointUpdateInProgress=!1,t&&this._sendEndpointUpdate(t),[2]}}))}))},e.prototype._putToBuffer=function(e,t){e.event.name!==H?this._buffer&&this._buffer.push({params:e,handlers:t}):this._sendEndpointUpdate({params:e,handlers:t})},e.prototype._generateSession=function(e){this._sessionId=this._sessionId||Object(k["v1"])();var t=e.event;switch(t.name){case V:this._sessionStartTimestamp=(new Date).getTime(),this._sessionId=Object(k["v1"])(),t.session={Id:this._sessionId,StartTimestamp:new Date(this._sessionStartTimestamp).toISOString()};break;case G:var n=(new Date).getTime();this._sessionStartTimestamp=this._sessionStartTimestamp||(new Date).getTime(),this._sessionId=this._sessionId||Object(k["v1"])(),t.session={Id:this._sessionId,Duration:n-this._sessionStartTimestamp,StartTimestamp:new Date(this._sessionStartTimestamp).toISOString(),StopTimestamp:new Date(n).toISOString()},this._sessionId=void 0,this._sessionStartTimestamp=void 0;break;default:this._sessionStartTimestamp=this._sessionStartTimestamp||(new Date).getTime(),this._sessionId=this._sessionId||Object(k["v1"])(),t.session={Id:this._sessionId,StartTimestamp:new Date(this._sessionStartTimestamp).toISOString()}}},e.prototype._send=function(e,t){return L(this,void 0,void 0,(function(){var n;return M(this,(function(i){switch(n=e.event,n.name){case H:return[2,this._updateEndpoint({params:e,handlers:t})];case G:return[2,this._pinpointSendStopSession(e,t)];default:return[2,this._pinpointPutEvents(e,t)]}return[2]}))}))},e.prototype._generateBatchItemContext=function(e){var t,n=e.event,i=e.timestamp,r=e.config,o=n.name,s=n.attributes,a=n.metrics,c=n.eventId,l=n.session,u=r.appId,d=r.endpointId,h={},p={ApplicationId:u,EventsRequest:{BatchItem:{}}},f={};return f.Endpoint=h,f.Events=(t={},t[c]={EventType:o,Timestamp:new Date(i).toISOString(),Attributes:s,Metrics:a,Session:l},t),p.EventsRequest.BatchItem[d]=f,p},e.prototype._pinpointPutEvents=function(e,t){return L(this,void 0,void 0,(function(){var n,i,r,o,s,a,c,l,u,d,h;return M(this,(function(p){switch(p.label){case 0:n=e.event.eventId,i=e.config.endpointId,r=this._generateBatchItemContext(e),o=new b["a"](r),p.label=1;case 1:return p.trys.push([1,3,,4]),[4,this.pinpointClient.send(o)];case 2:return s=p.sent(),a=i,c=n,l=s.EventsResponse.Results[a].EventsItemResponse[c],u=l.StatusCode,d=l.Message,D.includes(u)?(R.debug("record event success. ",s),[2,t.resolve(s)]):B.includes(u)?(this._retry(e,t),[3,4]):(R.error("Event "+n+" is not accepted, the error is "+d),[2,t.reject(s)]);case 3:return h=p.sent(),this._eventError(h),[2,t.reject(h)];case 4:return[2]}}))}))},e.prototype._pinpointSendStopSession=function(e,t){if(K){var n=this._generateBatchItemContext(e),i=this._config.region,r=n.ApplicationId,o=n.EventsRequest,s={secret_key:this._config.credentials.secretAccessKey,access_key:this._config.credentials.accessKeyId,session_token:this._config.credentials.sessionToken},a="https://pinpoint."+i+".amazonaws.com/v1/apps/"+r+"/events/legacy",c=JSON.stringify(o),l="POST",u={url:a,body:c,method:l},d={region:i,service:F},h=f["a"].signUrl(u,s,d,null),p=navigator.sendBeacon(h,c);return p?t.resolve("sendBeacon success"):t.reject("sendBeacon failure")}this._pinpointPutEvents(e,t)},e.prototype._retry=function(e,t){var n=e.config.resendLimit;e.resendLimit="number"===typeof e.resendLimit?e.resendLimit:n,e.resendLimit-- >0?(R.debug("resending event "+e.eventName+" with "+e.resendLimit+" retry times left"),this._pinpointPutEvents(e,t)):R.debug("retry times used up for event "+e.eventName)},e.prototype._updateEndpoint=function(e){return L(this,void 0,void 0,(function(){var t,n,i,r,o,s,a,c,l,u,d,h;return M(this,(function(p){switch(p.label){case 0:t=e.params,n=e.handlers,i=t.config,r=t.event,o=i.appId,s=i.endpointId,a=this._endpointRequest(i,g["a"].transferKeyToLowerCase(r,[],["attributes","userAttributes","Attributes","UserAttributes"])),c={ApplicationId:o,EndpointId:s,EndpointRequest:a},p.label=1;case 1:return p.trys.push([1,3,,4]),l=new v["a"](c),[4,this.pinpointClient.send(l)];case 2:return u=p.sent(),R.debug("updateEndpoint success",u),this._endpointGenerating=!1,this._resumeBuffer(),n.resolve(u),[2];case 3:return d=p.sent(),h={err:d,update_params:c,endpointObject:e},[2,this._handleEndpointUpdateFailure(h)];case 4:return[2]}}))}))},e.prototype._handleEndpointUpdateFailure=function(e){return L(this,void 0,void 0,(function(){var t,n,i,r;return M(this,(function(o){switch(t=e.err,n=e.endpointObject,i=t.$metadata&&t.$metadata.httpStatusCode,R.debug("updateEndpoint error",t),i){case z:return[2,this._handleEndpointUpdateForbidden(e)];default:if(B.includes(i))return r=!0,[2,this._retryEndpointUpdate(n,r)];R.error("updateEndpoint failed",t),n.handlers.reject(t)}return[2]}))}))},e.prototype._handleEndpointUpdateForbidden=function(e){var t=e.err,n=e.endpointObject,i=t.code,r=t.retryable;if(i!==W&&!r)return n.handlers.reject(t);this._retryEndpointUpdate(n)},e.prototype._retryEndpointUpdate=function(e,t){void 0===t&&(t=!1),R.debug("_retryEndpointUpdate",e);var n=e.params,i=n.config.resendLimit;if(n.resendLimit="number"===typeof n.resendLimit?n.resendLimit:i,n.resendLimit-- >0)return R.debug("resending endpoint update "+n.event.eventId+" with "+n.resendLimit+" retry attempts remaining"),void(this._endpointBuffer.length?this._endpointBuffer.unshift(e):this._updateEndpoint(e));R.warn("resending endpoint update "+n.event.eventId+" failed after "+n.config.resendLimit+" attempts"),this._endpointGenerating&&R.error("Initial endpoint update failed. ")},e.prototype._initClients=function(e){return L(this,void 0,void 0,(function(){var t,n;return M(this,(function(i){return R.debug("init clients"),this.pinpointClient&&this._config.credentials&&this._config.credentials.sessionToken===e.sessionToken&&this._config.credentials.identityId===e.identityId?(R.debug("no change for aws credentials, directly return from init"),[2]):(t=this._config.credentials?this._config.credentials.identityId:null,this._config.credentials=e,n=this._config.region,R.debug("init clients with credentials",e),this.pinpointClient=new _["a"]({region:n,credentials:e,customUserAgent:Object(m["a"])()}),this.pinpointClient.middlewareStack.addRelativeTo((function(e){return function(t){return delete t.request.headers["amz-sdk-invocation-id"],delete t.request.headers["amz-sdk-request"],e(t)}}),{step:"finalizeRequest",relation:"after",toMiddleware:"retryMiddleware"}),this._bufferExists()&&t===e.identityId?this._updateBufferClient():this._initBuffer(),this._customizePinpointClientReq(),[2])}))}))},e.prototype._bufferExists=function(){return this._buffer&&this._buffer instanceof j},e.prototype._initBuffer=function(){this._bufferExists()&&this._flushBuffer(),this._buffer=new j(this.pinpointClient,this._config),this._endpointGenerating&&this._buffer.pause()},e.prototype._updateBufferClient=function(){this._bufferExists()&&this._buffer.updateClient(this.pinpointClient)},e.prototype._flushBuffer=function(){this._bufferExists()&&(this._buffer.flush(),this._buffer=null)},e.prototype._resumeBuffer=function(){this._bufferExists()&&this._buffer.resume()},e.prototype._customizePinpointClientReq=function(){},e.prototype._getEndpointId=function(e){return L(this,void 0,void 0,(function(){var t;return M(this,(function(n){switch(n.label){case 0:return[4,w["a"].getItem(e)];case 1:return t=n.sent(),R.debug("endpointId from cache",t,"type",typeof t),t||(t=Object(k["v1"])(),w["a"].setItem(e,t)),[2,t]}}))}))},e.prototype._endpointRequest=function(e,t){var n=e.credentials,i=this._clientInfo||{},r=e.clientContext||{},o=e.endpoint||{},s={appVersion:i.appVersion,make:i.make,model:i.model,modelVersion:i.version,platform:i.platform},a=(r.clientId,r.appTitle,r.appVersionName,r.appVersionCode,r.appPackageName,N(r,["clientId","appTitle","appVersionName","appVersionCode","appPackageName"])),c=t.address?"android"===i.platform?"GCM":"APNS":void 0,l=$($($({channelType:c,requestId:Object(k["v1"])(),effectiveDate:(new Date).toISOString()},o),t),{attributes:$($({},o.attributes),t.attributes),demographic:$($($($({},s),a),o.demographic),t.demographic),location:$($({},o.location),t.location),metrics:$($({},o.metrics),t.metrics),user:{userId:t.userId||o.userId||n.identityId,userAttributes:$($({},o.userAttributes),t.userAttributes)}}),u=(l.userId,l.userAttributes,l.name,l.session,l.eventId,l.immediate,N(l,["userId","userAttributes","name","session","eventId","immediate"]));return g["a"].transferKeyToUpperCase(u,[],["metrics","userAttributes","attributes"])},e.prototype._eventError=function(e){R.error("record event failed.",e),R.warn('Please ensure you have updated your Pinpoint IAM Policy with the Action: "mobiletargeting:PutEvents" in order to record events')},e.prototype._getCredentials=function(){return L(this,void 0,void 0,(function(){var e,t;return M(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,y["a"].get()];case 1:return e=n.sent(),e?(R.debug("set credentials for analytics",e),[2,y["a"].shear(e)]):[2,null];case 2:return t=n.sent(),R.debug("ensure credentials error",t),[2,null];case 3:return[2]}}))}))},e.category="Analytics",e.providerName="AWSPinpoint",e}(),ee=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),s=[];try{while((void 0===t||t-- >0)&&!(i=o.next()).done)s.push(i.value)}catch(a){r={error:a}}finally{try{i&&!i.done&&(n=o["return"])&&n.call(o)}finally{if(r)throw r.error}}return s},te=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(ee(arguments[t]));return e},ne=[],ie=function(){function e(e,t){this.context=e,this.methodName=t,this._originalMethod=e[t].bind(e)}return e.add=function(e,t,n){re(e,t).set(n)},e.remove=function(e,t){re(e,t).remove()},e.prototype.set=function(e){var t=this;this.context[this.methodName]=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return e(t._originalMethod.apply(t,te(n)))}},e.prototype.remove=function(){this.context[this.methodName]=this._originalMethod},e}();function re(e,t){var n=ne.filter((function(n){return n.context===e&&n.methodName===t}))[0];return n||(n=new ie(e,t),ne.push(n)),n}var oe=function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{c(i.next(e))}catch(t){o(t)}}function a(e){try{c(i["throw"](e))}catch(t){o(t)}}function c(e){e.done?n(e.value):r(e.value).then(s,a)}c((i=i.apply(e,t||[])).next())}))},se=function(e,t){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return c([e,t])}}function c(o){if(n)throw new TypeError("Generator is already executing.");while(s)try{if(n=1,i&&(r=2&o[0]?i["return"]:o[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(r=s.trys,!(r=r.length>0&&r[r.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(a){o=[6,a],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},ae=new i["a"]("PageViewTracker"),ce="aws-amplify-analytics-prevUrl",le=function(){return g["a"].browserOrNode().isBrowser?window.location.origin+window.location.pathname:""},ue={enable:!1,provider:"AWSPinpoint",getUrl:le},de=function(){function e(e,t){ae.debug("initialize pageview tracker with opts",t),this._config=Object.assign({},ue,t),this._tracker=e,this._hasEnabled=!1,this._trackFunc=this._trackFunc.bind(this),"SPA"===this._config.type?this._pageViewTrackSPA():this._pageViewTrackDefault()}return e.prototype.configure=function(e){return Object.assign(this._config,e),"SPA"===this._config.type&&this._pageViewTrackSPA(),this._config},e.prototype._isSameUrl=function(){var e=sessionStorage.getItem(ce),t=this._config.getUrl();return e===t&&(ae.debug("the url is same"),!0)},e.prototype._pageViewTrackDefault=function(){return oe(this,void 0,void 0,(function(){var e,t,n,i;return se(this,(function(r){switch(r.label){case 0:return g["a"].browserOrNode().isBrowser&&window.addEventListener&&window.sessionStorage?(e=this._config.getUrl(),"function"!==typeof this._config.attributes?[3,2]:[4,this._config.attributes()]):(ae.debug("not in the supported web enviroment"),[2]);case 1:return n=r.sent(),[3,3];case 2:n=this._config.attributes,r.label=3;case 3:return t=n,i=Object.assign({url:e},t),this._config.enable&&!this._isSameUrl()&&(this._tracker({name:this._config.eventName||"pageView",attributes:i},this._config.provider).catch((function(e){ae.debug("Failed to record the page view event",e)})),sessionStorage.setItem(ce,e)),[2]}}))}))},e.prototype._trackFunc=function(){return oe(this,void 0,void 0,(function(){var e,t,n,i;return se(this,(function(r){switch(r.label){case 0:return g["a"].browserOrNode().isBrowser&&window.addEventListener&&history.pushState&&window.sessionStorage?(e=this._config.getUrl(),"function"!==typeof this._config.attributes?[3,2]:[4,this._config.attributes()]):(ae.debug("not in the supported web enviroment"),[2]);case 1:return n=r.sent(),[3,3];case 2:n=this._config.attributes,r.label=3;case 3:return t=n,i=Object.assign({url:e},t),this._isSameUrl()||(this._tracker({name:this._config.eventName||"pageView",attributes:i},this._config.provider).catch((function(e){ae.debug("Failed to record the page view event",e)})),sessionStorage.setItem(ce,e)),[2]}}))}))},e.prototype._pageViewTrackSPA=function(){g["a"].browserOrNode().isBrowser&&window.addEventListener&&history.pushState?this._config.enable&&!this._hasEnabled?(ie.add(history,"pushState",this._trackFunc),ie.add(history,"replaceState",this._trackFunc),window.addEventListener("popstate",this._trackFunc),this._trackFunc(),this._hasEnabled=!0):(ie.remove(history,"pushState"),ie.remove(history,"replaceState"),window.removeEventListener("popstate",this._trackFunc),this._hasEnabled=!1):ae.debug("not in the supported web enviroment")},e}(),he=de,pe=g["a"].browserOrNode().isBrowser&&window["Element"]?window["Element"].prototype:null,fe=pe?pe.matches||pe.matchesSelector||pe.webkitMatchesSelector||pe.mozMatchesSelector||pe.msMatchesSelector||pe.oMatchesSelector:null;function ge(e,t){if(e&&1===e.nodeType&&t){if("string"===typeof t||1===t.nodeType)return e===t||me(e,t);if("length"in t)for(var n=0,i=void 0;i=t[n];n++)if(e===i||me(e,i))return!0}return!1}function me(e,t){if("string"!==typeof t)return!1;if(fe)return fe.call(e,t);for(var n=e.parentNode.querySelectorAll(t),i=0,r=void 0;r=n[i];i++)if(r===e)return!0;return!1}function ye(e){var t=[],n=e;while(n&&n.parentNode&&1===n.parentNode.nodeType)n=n.parentNode,t.push(n);return t}function be(e,t,n){if(void 0===n&&(n=!1),e&&1===e.nodeType&&t)for(var i,r=(n?[e]:[]).concat(ye(e)),o=0;i=r[o];o++)if(ge(i,t))return i}function ve(e,t,n,i,r){void 0===r&&(r={});var o=function(e){var t;if(r["composed"]&&"function"===typeof e["composedPath"])for(var o=e.composedPath(),s=0,a=void 0;a=o[s];s++)1===a.nodeType&&ge(a,n)&&(t=a);else t=be(e.target,n,!0);t&&i.call(t,e,t)};return e.addEventListener(t,o,r["useCapture"]),{destroy:function(){e.removeEventListener(t,o,r["useCapture"])}}}var _e=function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{c(i.next(e))}catch(t){o(t)}}function a(e){try{c(i["throw"](e))}catch(t){o(t)}}function c(e){e.done?n(e.value):r(e.value).then(s,a)}c((i=i.apply(e,t||[])).next())}))},we=function(e,t){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return c([e,t])}}function c(o){if(n)throw new TypeError("Generator is already executing.");while(s)try{if(n=1,i&&(r=2&o[0]?i["return"]:o[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(r=s.trys,!(r=r.length>0&&r[r.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(a){o=[6,a],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},ke=new i["a"]("EventTracker"),Se={enable:!1,events:["click"],selectorPrefix:"data-amplify-analytics-",provider:"AWSPinpoint"},Ce=function(){function e(e,t){g["a"].browserOrNode().isBrowser&&window.addEventListener?(this._config=Object.assign({},Se,t),this._tracker=e,this._delegates={},this._trackFunc=this._trackFunc.bind(this),ke.debug("initialize pageview tracker with opts",this._config),this.configure(this._config)):ke.debug("not in the supported web environment")}return e.prototype.configure=function(e){var t=this;if(Object.assign(this._config,e),this._config.enable){if(this._config.enable&&0===Object.keys(this._delegates).length){var n="["+this._config.selectorPrefix+"on]";this._config.events.forEach((function(e){t._delegates[e]=ve(document,e,n,t._trackFunc,{composed:!0,useCapture:!0})}))}}else Object.keys(this._delegates).forEach((function(e){"function"===typeof t._delegates[e].destroy&&t._delegates[e].destroy()})),this._delegates={};return this._config},e.prototype._trackFunc=function(e,t){return _e(this,void 0,void 0,(function(){var n,i,r,o,s,a,c;return we(this,(function(l){switch(l.label){case 0:return n={},i=t.getAttribute(this._config.selectorPrefix+"on").split(/\s*,\s*/),r=t.getAttribute(this._config.selectorPrefix+"name"),o=t.getAttribute(this._config.selectorPrefix+"attrs"),o&&o.split(/\s*,\s*/).forEach((function(e){var t=e.trim().split(/\s*:\s*/);n[t[0]]=t[1]})),"function"!==typeof this._config.attributes?[3,2]:[4,this._config.attributes()];case 1:return a=l.sent(),[3,3];case 2:a=this._config.attributes,l.label=3;case 3:return s=a,c=Object.assign({type:e.type,target:e.target.localName+" with id "+e.target.id},s,n),ke.debug("events needed to be recorded",i),ke.debug("attributes needed to be attached",n),i.indexOf(e.type)<0?(ke.debug("event "+e.type+" is not selected to be recorded"),[2]):(this._tracker({name:r||"event",attributes:c},this._config.provider).catch((function(t){ke.debug("Failed to record the "+e.type+" event', "+t)})),[2])}}))}))},e}(),xe=Ce,Ie=function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{c(i.next(e))}catch(t){o(t)}}function a(e){try{c(i["throw"](e))}catch(t){o(t)}}function c(e){e.done?n(e.value):r(e.value).then(s,a)}c((i=i.apply(e,t||[])).next())}))},Pe=function(e,t){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return c([e,t])}}function c(o){if(n)throw new TypeError("Generator is already executing.");while(s)try{if(n=1,i&&(r=2&o[0]?i["return"]:o[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(r=s.trys,!(r=r.length>0&&r[r.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(a){o=[6,a],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},Oe=new i["a"]("SessionTracker"),Ae={enable:!1,provider:"AWSPinpoint"},Te=!1,Ee=function(){function e(e,t){this._config=Object.assign({},Ae,t),this._tracker=e,this._hasEnabled=!1,this._trackFunc=this._trackFunc.bind(this),this._trackBeforeUnload=this._trackBeforeUnload.bind(this),this.configure(this._config)}return e.prototype._envCheck=function(){if(!g["a"].browserOrNode().isBrowser)return!1;if(!document||!document.addEventListener)return Oe.debug("not in the supported web environment"),!1;if("undefined"!==typeof document.hidden)this._hidden="hidden",this._visibilityChange="visibilitychange";else if("undefined"!==typeof document["msHidden"])this._hidden="msHidden",this._visibilityChange="msvisibilitychange";else{if("undefined"===typeof document["webkitHidden"])return Oe.debug("not in the supported web environment"),!1;this._hidden="webkitHidden",this._visibilityChange="webkitvisibilitychange"}return!0},e.prototype._trackFunc=function(){return Ie(this,void 0,void 0,(function(){var e,t,n;return Pe(this,(function(i){switch(i.label){case 0:return"function"!==typeof this._config.attributes?[3,2]:[4,this._config.attributes()];case 1:return t=i.sent(),[3,3];case 2:t=this._config.attributes,i.label=3;case 3:return e=t,n=Object.assign({},e),document.visibilityState===this._hidden?this._tracker({name:"_session.stop",attributes:n},this._config.provider).catch((function(e){Oe.debug("record session stop event failed.",e)})):this._tracker({name:"_session.start",attributes:n},this._config.provider).catch((function(e){Oe.debug("record session start event failed.",e)})),[2]}}))}))},e.prototype._trackBeforeUnload=function(e){var t=this,n="function"===typeof this._config.attributes?Promise.resolve(this._config.attributes()):Promise.resolve(this._config.attributes);n.then((function(e){var n=Object.assign({},e);t._tracker({name:"_session.stop",attributes:n,immediate:!0},t._config.provider).catch((function(e){Oe.debug("record session stop event failed.",e)}))}))},e.prototype._sendInitialEvent=function(){return Ie(this,void 0,void 0,(function(){var e,t,n;return Pe(this,(function(i){switch(i.label){case 0:return Te?(Oe.debug("the start session has been sent when the page is loaded"),[2]):(Te=!0,"function"!==typeof this._config.attributes?[3,2]:[4,this._config.attributes()]);case 1:return t=i.sent(),[3,3];case 2:t=this._config.attributes,i.label=3;case 3:return e=t,n=Object.assign({},e),this._tracker({name:"_session.start",attributes:n},this._config.provider).catch((function(e){Oe.debug("record session start event failed.",e)})),[2]}}))}))},e.prototype.configure=function(e){return this._envCheck()?(Object.assign(this._config,e),this._config.enable&&!this._hasEnabled?(this._sendInitialEvent(),document.addEventListener(this._visibilityChange,this._trackFunc,!1),window.addEventListener("beforeunload",this._trackBeforeUnload,!1),this._hasEnabled=!0):!this._config.enable&&this._hasEnabled&&(document.removeEventListener(this._visibilityChange,this._trackFunc,!1),window.removeEventListener("beforeunload",this._trackBeforeUnload,!1),this._hasEnabled=!1),this._config):this._config},e}(),je=Ee,$e=function(){return $e=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},$e.apply(this,arguments)},Le=function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{c(i.next(e))}catch(t){o(t)}}function a(e){try{c(i["throw"](e))}catch(t){o(t)}}function c(e){e.done?n(e.value):r(e.value).then(s,a)}c((i=i.apply(e,t||[])).next())}))},Me=function(e,t){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return c([e,t])}}function c(o){if(n)throw new TypeError("Generator is already executing.");while(s)try{if(n=1,i&&(r=2&o[0]?i["return"]:o[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(r=s.trys,!(r=r.length>0&&r[r.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(a){o=[6,a],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},Ne=new i["a"]("AnalyticsClass"),qe="undefined"!==typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",Ue=function(e,t,n){r["a"].dispatch("analytics",{event:e,data:t,message:n},"Analytics",qe)},Re={pageView:he,event:xe,session:je},Be=null,De=function(){function e(){this._config={},this._pluggables=[],this._disabled=!1,this._trackers={},Be=this,this.record=this.record.bind(this),r["a"].listen("auth",He),r["a"].listen("storage",He),r["a"].listen("analytics",He)}return e.prototype.getModuleName=function(){return"Analytics"},e.prototype.configure=function(e){var t=this;if(!e)return this._config;Ne.debug("configure Analytics",e);var n=o["a"].parseMobilehubConfig(e);return this._config=Object.assign({},this._config,n.Analytics,e),this._config["disabled"]&&(this._disabled=!0),void 0===this._config["autoSessionRecord"]&&(this._config["autoSessionRecord"]=!0),this._pluggables.forEach((function(e){var n="AWSPinpoint"!==e.getProviderName()||t._config["AWSPinpoint"]?t._config[e.getProviderName()]:t._config;e.configure($e({disabled:t._config["disabled"],autoSessionRecord:t._config["autoSessionRecord"]},n))})),0===this._pluggables.length&&this.addPluggable(new X),Ue("configured",null,"The Analytics category has been configured successfully"),Ne.debug("current configuration",this._config),this._config},e.prototype.addPluggable=function(e){if(e&&"Analytics"===e.getCategory()){this._pluggables.push(e);var t="AWSPinpoint"!==e.getProviderName()||this._config["AWSPinpoint"]?this._config[e.getProviderName()]:this._config,n=$e({disabled:this._config["disabled"]},t);return e.configure(n),n}},e.prototype.getPluggable=function(e){for(var t=0;t<this._pluggables.length;t+=1){var n=this._pluggables[t];if(n.getProviderName()===e)return n}return Ne.debug("No plugin found with providerName",e),null},e.prototype.removePluggable=function(e){var t=0;while(t<this._pluggables.length){if(this._pluggables[t].getProviderName()===e)break;t+=1}return t===this._pluggables.length?void Ne.debug("No plugin found with providerName",e):void this._pluggables.splice(t,t+1)},e.prototype.disable=function(){this._disabled=!0},e.prototype.enable=function(){this._disabled=!1},e.prototype.startSession=function(e){return Le(this,void 0,void 0,(function(){var t;return Me(this,(function(n){return t={event:{name:"_session.start"},provider:e},[2,this._sendEvent(t)]}))}))},e.prototype.stopSession=function(e){return Le(this,void 0,void 0,(function(){var t;return Me(this,(function(n){return t={event:{name:"_session.stop"},provider:e},[2,this._sendEvent(t)]}))}))},e.prototype.record=function(e,t,n){return Le(this,void 0,void 0,(function(){var i;return Me(this,(function(r){return i=null,i="string"===typeof e?{event:{name:e,attributes:t,metrics:n},provider:"AWSPinpoint"}:{event:e,provider:t},[2,this._sendEvent(i)]}))}))},e.prototype.updateEndpoint=function(e,t){return Le(this,void 0,void 0,(function(){var n;return Me(this,(function(i){return n=$e($e({},e),{name:"_update_endpoint"}),[2,this.record(n,t)]}))}))},e.prototype._sendEvent=function(e){var t=this;if(this._disabled)return Ne.debug("Analytics has been disabled"),Promise.resolve();var n=e.provider?e.provider:"AWSPinpoint";return new Promise((function(i,r){t._pluggables.forEach((function(t){t.getProviderName()===n&&t.record(e,{resolve:i,reject:r})}))}))},e.prototype.autoTrack=function(e,t){if(Re[e]){"session"===e&&(this._config["autoSessionRecord"]=t["enable"]);var n=this._trackers[e];n?n.configure(t):this._trackers[e]=new Re[e](this.record,t)}else Ne.debug("invalid tracker type")},e}(),ze=!1,Fe=!1,We=!1,He=function(e){var t=e.channel,n=e.payload;switch(Ne.debug("on hub capsule "+t,n),t){case"auth":Ge(n);break;case"storage":Ve(n);break;case"analytics":Ke(n);break;default:break}},Ve=function(e){var t=e.data,n=t.attrs,i=t.metrics;n&&We&&Be.record({name:"Storage",attributes:n,metrics:i}).catch((function(e){Ne.debug("Failed to send the storage event automatically",e)}))},Ge=function(e){var t=e.event;if(t){var n=function(e){return Le(void 0,void 0,void 0,(function(){var t;return Me(this,(function(n){switch(n.label){case 0:if(!Fe||!We)return[3,4];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,Be.record({name:"_userauth."+e})];case 2:return[2,n.sent()];case 3:return t=n.sent(),Ne.debug("Failed to send the "+e+" event automatically",t),[3,4];case 4:return[2]}}))}))};switch(t){case"signIn":return n("sign_in");case"signUp":return n("sign_up");case"signOut":return n("sign_out");case"signIn_failure":return n("auth_fail");case"configured":Fe=!0,Fe&&We&&Ye();break}}},Ke=function(e){var t=e.event;if(t)switch(t){case"pinpointProvider_configured":We=!0,Fe&&We&&Ye();break}},Ye=function(){var e=Be.configure();!ze&&e["autoSessionRecord"]&&(Be.updateEndpoint({immediate:!0}).catch((function(e){Ne.debug("Failed to update the endpoint",e)})),ze=!0),Be.autoTrack("session",{enable:e["autoSessionRecord"]})},Qe=new De;s["a"].register(Qe);t["a"]=Qe},b7b1:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=!1;t.loadGmapApi=function(e,t){if("undefined"!==typeof document){if(r)throw new Error("You already started the loading of google maps");r=!0;var n=document.createElement("SCRIPT");if("object"!==("undefined"===typeof e?"undefined":i(e)))throw new Error("options should be an object");Array.prototype.isPrototypeOf(e.libraries)&&(e.libraries=e.libraries.join(",")),e["callback"]="vueGoogleMapsInit";var o="https://maps.googleapis.com/";"boolean"===typeof t&&!0===t&&(o="https://maps.google.cn/");var s=o+"maps/api/js?"+Object.keys(e).map((function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])})).join("&");n.setAttribute("src",s),n.setAttribute("async",""),n.setAttribute("defer",""),document.head.appendChild(n)}}},b7cb:function(e,t,n){},b7d9:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(i=(s=a.next()).done);i=!0)if(n.push(s.value),t&&n.length===t)break}catch(c){r=!0,o=c}finally{try{!i&&a["return"]&&a["return"]()}finally{if(r)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e};t.default=function(e){var t=e.mappedProps,n=e.name,i=e.ctr,o=e.ctrArgs,c=e.events,u=e.beforeCreate,m=e.afterCreate,y=e.props,b=p(e,["mappedProps","name","ctr","ctrArgs","events","beforeCreate","afterCreate","props"]),v="$"+n+"Promise",_="$"+n+"Object";return f(!(b.props instanceof Array),"`props` should be an object, not Array"),r({},"undefined"!==typeof GENERATE_DOC?{$vgmOptions:e}:{},{mixins:[l.default],props:r({},y,g(t)),render:function(){return""},provide:function(){var e=this,n=this.$mapPromise.then((function(n){e.$map=n;var i=r({},e.options,{map:n},(0,a.getPropsValues)(e,t));if(delete i.options,u){var o=u.bind(e)(i);if(o instanceof Promise)return o.then((function(){return{options:i}}))}return{options:i}})).then((function(n){var r,l=n.options,u=i();return e[_]=o?new((r=Function.prototype.bind).call.apply(r,[u,null].concat(h(o(l,(0,a.getPropsValues)(e,y||{})))))):new u(l),(0,a.bindProps)(e,e[_],t),(0,s.default)(e,e[_],c),m&&m.bind(e)(e[_]),e[_]}));return this[v]=n,d({},v,n)},destroyed:function(){this[_]&&this[_].setMap&&this[_].setMap(null)}},b)},t.mappedPropsToVueProps=g;var o=n("7a03"),s=u(o),a=n("2adb"),c=n("a8b4"),l=u(c);function u(e){return e&&e.__esModule?e:{default:e}}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function p(e,t){var n={};for(var i in e)t.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}function f(e,t){if(!e)throw new Error(t)}function g(e){return Object.entries(e).map((function(e){var t=i(e,2),n=t[0],r=t[1],o={};return"type"in r&&(o.type=r.type),"default"in r&&(o.default=r.default),"required"in r&&(o.required=r.required),[n,o]})).reduce((function(e,t){var n=i(t,2),r=n[0],o=n[1];return e[r]=o,e}),{})}},b8fa:function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e._self._c;return t("div",{staticClass:"row justify-center items-center"},[t("h1",{staticStyle:{display:"none"}},[e._v("Contact")]),e.$q.screen.lt.sm&&e.showHeader?t("TitleBar",{attrs:{"center-slot":"Contact"}}):e._e(),e.$q.screen.gt.xs&&e.showHeader?t("TileBar",{staticClass:"col-12 col-sm-10 col-md-9",attrs:{optionButton:"Back"},on:{"on-button":function(t){return e.$router.go(-1)}}}):e._e(),e._m(0),t("div",{staticClass:"col-12 q-mt-lg",attrs:{id:"wrapper"}},[t("GmapMap",{ref:"mapRef",staticStyle:{height:"520px",width:"100%"},attrs:{center:e.center,zoom:15,options:e.mapOptions}},[t("GmapMarker",{ref:"marker",attrs:{position:e.marker,clickable:!0,animation:e.animation,draggable:!1}})],1),t("div",{staticClass:"branch"},[t("div",{staticStyle:{margin:"20px"}},[t("q-select",{attrs:{"bg-color":"white",borderless:"",options:e.branchs},scopedSlots:e._u([{key:"selected",fn:function(){return[t("div",{staticClass:"list-shop-store"},[t("div",{staticClass:"list-shop-store-name"},[e._v(" "+e._s(e.branchSelected.name)+" ")]),t("div",{staticClass:"list-shop-store-address"},[e._v(" "+e._s(e.branchSelected.address)+", "+e._s(e.branchSelected.subDistrict)+", "+e._s(e.branchSelected.district)+", "+e._s(e.branchSelected.province)+" "+e._s(e.branchSelected.postcode)+" "),t("br"),e._v(" "+e._s(e.branchSelected.phoneNumber)+" ")])])]},proxy:!0},{key:"option",fn:function(n){return[t("q-item",e._g(e._b({},"q-item",n.itemProps,!1),n.itemEvents),[t("q-item-section",[t("div",{staticClass:"list-shop-store-name"},[e._v(" "+e._s(n.opt.name)+" ")]),t("div",{staticClass:"list-shop-store-address"},[e._v(" "+e._s(n.opt.address)+", "+e._s(n.opt.subDistrict)+", "+e._s(n.opt.district)+", "+e._s(n.opt.province)+" "+e._s(n.opt.postcode)+" "),t("br"),e._v(" "+e._s(n.opt.phoneNumber)+" ")])])],1)]}}]),model:{value:e.branchSelected,callback:function(t){e.branchSelected=t},expression:"branchSelected"}})],1)]),t("div",{staticClass:"btn-route"},[t("q-btn",{staticClass:"btn-color",attrs:{"no-caps":""},on:{click:e.onOpenGoogleMap}},[t("i",{staticClass:"fa fa-location-arrow",staticStyle:{"margin-right":"10px"},attrs:{"aria-hidden":"true"}}),t("div",{staticClass:"btn-label"},[e._v("Get Direction")])])],1)],1)],1)},r=[function(){var e=this,t=e._self._c;return t("div",{staticClass:"col-10 row"},[t("div",{staticClass:"col-12 text-title text-center",staticStyle:{padding:"20px 0"}},[e._v(" Contact ")]),t("div",{staticClass:"col-12 justify-center items-center text-center"},[t("div",{staticStyle:{margin:"0 0 10px"}},[t("h2",{staticClass:"header-title"},[e._v("Villa Market Customer Care Team")]),t("p",[e._v(" Call: "),t("a",{attrs:{href:"tel:+6627791000"}},[e._v("02-779-1000")]),e._v(" (9am - 10pm) ")]),t("p",[e._v(" Email: "),t("a",{attrs:{href:"mailto:online@villamarket.com"}},[e._v("online@villamarket.com")])]),t("p",[e._v("Line: @villa.supermarket")]),t("p",{staticStyle:{"justify-content":"center",display:"flex","flex-direction":"column"}},[e._v(" Facebook:"),t("br"),t("a",{staticStyle:{color:"#1979c3",overflow:"hidden"},attrs:{href:"https://www.facebook.com/villamarketofficial"}},[e._v("https://www.facebook.com/villamarketofficial")])])]),t("div",{staticStyle:{margin:"0 0 10px"}},[t("h2",{staticClass:"header-title"},[e._v("Clink! Wine Club")]),t("p",[e._v(" Call: "),t("a",{attrs:{href:"tel:+66610020209"}},[e._v("061-002-0209")]),e._v(" (9am - 6pm) ")])]),t("div",{staticStyle:{margin:"0 0 10px"}},[t("h2",{staticClass:"header-title"},[e._v(" Villa Market JP. Head Office (Corporate Inquiries) ")]),t("p",[e._v("595 Sukhumvit Rd., North Khlong Ton, Vadhana Bangkok , 10110")]),t("p",[e._v(" Call: "),t("a",{attrs:{href:"tel:+6620551000"}},[e._v("02-055-1000")]),e._v(" (Mon - Fri 8.30am - 6pm) ")]),t("p",[e._v(" Ext. 003 - Purchasing Department / Ext. 004 - Human Resources Department ")])]),t("div",{staticStyle:{margin:"0 0 10px"}},[t("h2",{staticClass:"header-title"},[e._v("Become A Supplier to Villa Market")]),t("p",[e._v(" If you're a producer or supplier and would like to see your products available for "),t("br"),e._v("sale in Villa Market, then please send an email to "),t("a",{staticStyle:{color:"#1979c3"},attrs:{href:"mailto:commercial@villamarket.com"}},[e._v("commercial@villamarket.com")])])])])])}],o=(n("ddb0"),n("d8af")),s=n("2b0e"),a=n("755e"),c=n("58a7");s["default"].use(a,{load:{key:c["a"],libraries:"places"}});var l={components:{TitleBar:()=>n.e("signin~31ecd969").then(n.bind(null,"1e1d")),TileBar:()=>n.e("chunk-vendors~cfbf0a2e").then(n.bind(null,"7112"))},data(){return{center:{lat:13.73457,lng:100.5798123},marker:{lat:13.73457,lng:100.5798123},mapOptions:{disableDefaultUI:!0},branchSelected:o["a"][0],branchs:o["a"],animation:1}},metaInfo(){return{title:"Contact us | Villa Market - Thailand's Original International Supermarket",meta:[{name:"description",content:"Contact Villa Market's Customer Care Team. Call: 02-779-1000 (9am - 10pm) or contact us via Facebook: Villa Market "},{property:"og:title",content:"Contact us | Villa Market - Thailand's Original International Supermarket"},{property:"og:site_name",content:"Villa Market"},{property:"og:type",content:"website"},{name:"robots",content:"index,follow"}]}},computed:{showHeader(){var e;const t=null===(e=this.$route.query)||void 0===e?void 0:e.raw;return"true"!==t}},watch:{branchSelected(){this.marker=null;const[e,t]=this.branchSelected.latlng;this.$refs.mapRef.$mapPromise.then(n=>{n.panTo({lat:e,lng:t})}),this.marker={lat:e,lng:t}}},methods:{onOpenGoogleMap(){""!=this.branchSelected.location_url&&window.open(this.branchSelected.location_url,"_blank")}}},u=l,d=(n("fcbe"),n("2877")),h=Object(d["a"])(u,i,r,!1,null,"38f9ff8f",null);t["default"]=h.exports},bb5b:function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e._self._c;return t("div",[t("q-card",[t("q-card-section",{staticClass:"row justify-center items-center"},[t("q-icon",{attrs:{size:"80px",name:"info",color:"primary","text-color":"white"}}),t("span",{staticClass:"col-12 text-center message",staticStyle:{"white-space":"pre-wrap"}},[e._v(e._s(e.message))]),e.submessage?t("br"):e._e(),e.submessage?t("span",{staticClass:"col-12 text-center message text-grey-7",staticStyle:{"white-space":"pre-wrap"}},[e._v(e._s(e.submessage))]):e._e()],1),t("div",{staticClass:"flex justify-center"},[e._t("default")],2),t("q-card-actions",{attrs:{align:"right"}},[e.leftBtn?t("q-btn",{attrs:{"no-caps":"",flat:"",label:e.leftBtn,color:"primary"},on:{click:e.ActionLeftBtn}}):e._e(),e.midBtn?t("q-btn",{attrs:{"no-caps":"",flat:"",label:e.midBtn,color:"primary"},on:{click:e.ActionMidBtn}}):e._e(),e.rightBtn?t("q-btn",{attrs:{"no-caps":"",flat:"",label:e.rightBtn,color:"red"},on:{click:e.ActionRightBtn}}):e._e()],1)],1)],1)},r=[],o=n("f09f"),s=n("0016"),a=n("4b7e"),c=n("a370");const l={QCard:o["a"],QIcon:s["a"],QCardActions:a["a"],QCardSection:c["a"]};var u={props:["message","submessage","left-btn","right-btn","mid-btn"],components:{...l},data(){return{}},methods:{ActionLeftBtn(){this.$emit("leftClick")},ActionMidBtn(){this.$emit("midClick")},ActionRightBtn(){this.$emit("rightClick")}}},d=u,h=(n("9df5"),n("2877")),p=Object(h["a"])(d,i,r,!1,null,"13ceec86",null);t["default"]=p.exports},bc7a:function(e,t,n){"use strict";n.r(t);var i=n("fea1"),r=n("0c5e");for(var o in r)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(o);var s=n("2877"),a=Object(s["a"])(r["default"],i["a"],i["b"],!1,null,null,null);t["default"]=a.exports},bd58:function(e,t,n){"use strict";n.d(t,"a",(function(){return O}));var i=n("36de"),r=n("c717"),o=n("ed9f"),s=n("0b16"),a=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),s=[];try{while((void 0===t||t-- >0)&&!(i=o.next()).done)s.push(i.value)}catch(a){r={error:a}}finally{try{i&&!i.done&&(n=o["return"])&&n.call(o)}finally{if(r)throw r.error}}return s},c=3e5,l={clockOffset:0,getDateWithClockOffset:function(){return l.clockOffset?new Date((new Date).getTime()+l.clockOffset):new Date},getClockOffset:function(){return l.clockOffset},getHeaderStringFromDate:function(e){return void 0===e&&(e=l.getDateWithClockOffset()),e.toISOString().replace(/[:\-]|\.\d{3}/g,"")},getDateFromHeaderString:function(e){var t=a(e.match(/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2}).+/),7),n=t[1],i=t[2],r=t[3],o=t[4],s=t[5],c=t[6];return new Date(Date.UTC(Number(n),Number(i)-1,Number(r),Number(o),Number(s),Number(c)))},isClockSkewed:function(e){return Math.abs(e.getTime()-l.getDateWithClockOffset().getTime())>=c},isClockSkewError:function(e){if(!e.response||!e.response.headers)return!1;var t=e.response.headers;return Boolean("BadRequestException"===t["x-amzn-errortype"]&&(t.date||t.Date))},setClockOffset:function(e){l.clockOffset=e}},u=function(){return u=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},u.apply(this,arguments)},d=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n},h=new i["a"]("Signer"),p="AWS4-HMAC-SHA256",f="iotdevicegateway",g=function(e,t){var n=new r["Sha256"](e);return n.update(t),n.digestSync()},m=function(e){var t=e||"",n=new r["Sha256"];return n.update(t),Object(o["a"])(n.digestSync())},y=function(e){return e.replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))},b=function(e){return e&&0!==e.length?e.split("&").map((function(e){var t=e.split("=");if(1===t.length)return e;var n=y(t[1]);return t[0]+"="+n})).sort((function(e,t){var n=e.split("=")[0],i=t.split("=")[0];return n===i?e<t?-1:1:n<i?-1:1})).join("&"):""},v=function(e){return e&&0!==Object.keys(e).length?Object.keys(e).map((function(t){return{key:t.toLowerCase(),value:e[t]?e[t].trim().replace(/\s+/g," "):""}})).sort((function(e,t){return e.key<t.key?-1:1})).map((function(e){return e.key+":"+e.value})).join("\n")+"\n":""},_=function(e){return Object.keys(e).map((function(e){return e.toLowerCase()})).sort().join(";")},w=function(e){var t=Object(s["parse"])(e.url);return[e.method||"/",encodeURIComponent(t.pathname).replace(/%2F/gi,"/"),b(t.query),v(e.headers),_(e.headers),m(e.data)].join("\n")},k=function(e){var t=Object(s["parse"])(e.url),n=t.host,i=n.match(/([^\.]+)\.(?:([^\.]*)\.)?amazonaws\.com$/),r=(i||[]).slice(1,3);return"es"===r[1]&&(r=r.reverse()),{service:e.service||r[0],region:e.region||r[1]}},S=function(e,t,n){return[e,t,n,"aws4_request"].join("/")},C=function(e,t,n,i){return[e,n,i,m(t)].join("\n")},x=function(e,t,n){h.debug(n);var i="AWS4"+e,r=g(i,t),o=g(r,n.region),s=g(o,n.service),a=g(s,"aws4_request");return a},I=function(e,t){return Object(o["a"])(g(e,t))},P=function(e,t,n,i,r){return[e+" Credential="+t+"/"+n,"SignedHeaders="+i,"Signature="+r].join(", ")},O=function(){function e(){}return e.sign=function(e,t,n){void 0===n&&(n=null),e.headers=e.headers||{};var i=l.getDateWithClockOffset(),r=i.toISOString().replace(/[:\-]|\.\d{3}/g,""),o=r.substr(0,8),a=Object(s["parse"])(e.url);e.headers["host"]=a.host,e.headers["x-amz-date"]=r,t.session_token&&(e.headers["X-Amz-Security-Token"]=t.session_token);var c=w(e);h.debug(c);var u=n||k(e),d=S(o,u.region,u.service),f=C(p,c,r,d),g=x(t.secret_key,o,u),m=I(g,f),y=P(p,t.access_key,d,_(e.headers),m);return e.headers["Authorization"]=y,e},e.signUrl=function(e,t,n,i){var r="object"===typeof e?e.url:e,o="object"===typeof e?e.method:"GET",a="object"===typeof e?e.body:void 0,c=l.getDateWithClockOffset().toISOString().replace(/[:\-]|\.\d{3}/g,""),h=c.substr(0,8),g=Object(s["parse"])(r,!0,!0),m=(g.search,d(g,["search"])),y=m.host,b={host:y},v=n||k({url:Object(s["format"])(m)}),_=v.region,P=v.service,O=S(h,_,P),A=t.session_token&&P!==f,T=u(u(u({"X-Amz-Algorithm":p,"X-Amz-Credential":[t.access_key,O].join("/"),"X-Amz-Date":c.substr(0,16)},A?{"X-Amz-Security-Token":""+t.session_token}:{}),i?{"X-Amz-Expires":""+i}:{}),{"X-Amz-SignedHeaders":Object.keys(b).join(",")}),E=w({method:o,url:Object(s["format"])(u(u({},m),{query:u(u({},m.query),T)})),headers:b,data:a}),j=C(p,E,c,O),$=x(t.secret_key,h,{region:_,service:P}),L=I($,j),M=u({"X-Amz-Signature":L},t.session_token&&{"X-Amz-Security-Token":t.session_token}),N=Object(s["format"])({protocol:m.protocol,slashes:!0,hostname:m.hostname,port:m.port,pathname:m.pathname,query:u(u(u({},m.query),T),M)});return N},e}()},bd91:function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e._self._c;return t("div",{staticClass:"row justify-center bg-white"},[t("h1",{staticStyle:{display:"none"}},[e._v("Terms of service")]),e.$q.screen.lt.sm?t("TitleBar",{attrs:{"center-slot":"Terms of service"}}):e._e(),e.$q.screen.gt.xs?t("TileBar",{staticClass:"col-12 col-sm-10 col-md-9",attrs:{optionButton:"Back"},on:{"on-button":function(t){return e.$router.go(-1)}}}):e._e(),t("div",{staticClass:"col-12 col-sm-10 col-md-9 q-px-sm"},[t("div",{staticClass:"col-12 text-title text-left",staticStyle:{padding:"40px 0 20px"}},[e._v(" TERMS OF SERVICE ")]),t("Markdown",{staticClass:"font-terms",attrs:{data:e.md}})],1)],1)},r=[],o=(n("ddb0"),n("e6e0")),s="**OVERVIEW** \nThis website is operated by Villa Market JP Co Ltd.,. Throughout the site, the terms “weâ€, “us†and “our†refer to Villa Market JP Co Ltd.,. Villa Market JP Co Ltd., offers this website, including all information, tools and services available from this site to you, the user, conditioned upon your acceptance of all terms, conditions, policies and notices stated here.\n\nBy visiting our site and/ or purchasing something from us, you engage in our “Service†and agree to be bound by the following terms and conditions (“Terms of Serviceâ€, “Termsâ€), including those additional terms and conditions and policies referenced herein and/or available by hyperlink. These Terms of Service apply to all users of the site, including without limitation users who are browsers, vendors, customers, merchants, and/ or contributors of content.\n\nPlease read these Terms of Service carefully before accessing or using our website. By accessing or using any part of the site, you agree to be bound by these Terms of Service. If you do not agree to all the terms and conditions of this agreement, then you may not access the website or use any services. If these Terms of Service are considered an offer, acceptance is expressly limited to these Terms of Service.\n\nAny new features or tools which are added to the current store shall also be subject to the Terms of Service. You can review the most current version of the Terms of Service at any time on this page. We reserve the right to update, change or replace any part of these Terms of Service by posting updates and/or changes to our website. Your continued use of or access to our Site, Services and/or Content following the posting of any amended Terms of Use constitutes acceptance of those Terms of Use. It is your responsibility to check this page periodically for changes. Your continued use of or access to the website following the posting of any changes constitutes acceptance of those changes.\n\n**SECTION 1 - ONLINE STORE TERMS** \nBy agreeing to these Terms of Service, you represent that you are at least the age of majority in your state or province of residence, or that you are the age of majority in your state or province of residence and you have given us your consent to allow any of your minor dependents to use this site.\n\nYou may not use our products for any illegal or unauthorized purpose nor may you, in the use of the Service, violate any laws in your jurisdiction (including but not limited to copyright laws).\n\nYou must not transmit any worms or viruses or any code of a destructive nature.\n\nA breach or violation of any of the Terms will result in an immediate termination of your Services.\n\n**SECTION 2 - GENERAL CONDITIONS** \nWe reserve the right to refuse service to anyone for any reason at any time.\n\nYou understand that your content (not including credit card information), may be transferred unencrypted and involve (a) transmissions over various networks; and (b) changes to conform and adapt to technical requirements of connecting networks or devices. Credit card information is always encrypted during transfer over networks.\n\nYou agree not to reproduce, duplicate, copy, sell, resell or exploit any portion of the Service, use of the Service, or access to the Service or any contact on the website through which the service is provided, without express written permission by us.\n\nThe headings used in this agreement are included for convenience only and will not limit or otherwise affect these Terms.\n\nAny alcohol listings on the Site are intended for those who are 20 years or above, and may only be purchased by those who are 20 years and above.\n\nIf the delivery includes alcoholic drinks or any other age-restricted items, you agree to ensure that a person of 20 years of age or older with appropriate identification is present to take delivery of the alcoholic drinks or other items. Villa Market reserves the right not to deliver any age-restricted product to anyone who is, or appears to be under, the age of 20 years old,\n\nFurthermore, you may not purchase alcoholic beverages for anyone who is under the age of twenty (20). We will require you to present valid identification every time you purchase alcohol. If you cannot present valid identification or we can’t contact you at the time of delivery, the merchandise will be returned by us and you will be billed for it. If we are required to reattempt delivery a redelivery fee of ฿90 applies.\n\n**SECTION 3 - ACCURACY, COMPLETENESS AND TIMELINESS OF INFORMATION** \nWe are not responsible if information made available on this site is not accurate, complete or current. The material on this site is provided for general information only and should not be relied upon or used as the sole basis for making decisions without consulting primary, more accurate, more complete or more timely sources of information. Any reliance on the material on this site is at your own risk.\n\nThis site may contain certain historical information. Historical information, necessarily, is not current and is provided for your reference only. We reserve the right to modify the contents of this site at any time, but we have no obligation to update any information on our site. You agree that it is your responsibility to monitor changes to our site.\n\n**SECTION 4 - MODIFICATIONS TO THE SERVICE AND PRICES** \nPrices for our products are subject to change without notice.\n\nWe reserve the right at any time to modify or discontinue the Service (or any part or content thereof) without notice at any time.\n\nWe shall not be liable to you or to any third-party for any modification, price change, suspension or discontinuance of the Service.\n\n**SECTION 5 - PRODUCTS OR SERVICES** \nCertain products or services may be available exclusively online through the website. These products or services may have limited quantities and are subject to return or exchange only according to our Return Policy.\n\nWe have made every effort to display as accurately as possible the colors and images of our products that appear at the store. We cannot guarantee that your computer monitor's display of any color will be accurate.\n\nWe reserve the right, but are not obligated, to limit the sales of our products or Services to any person, geographic region or jurisdiction. We may exercise this right on a case-by-case basis. We reserve the right to limit the quantities of any products or services that we offer. All descriptions of products or product pricing are subject to change at any time without notice, at the sole discretion of us. We reserve the right to discontinue any product at any time. Any offer for any product or service made on this site is void where prohibited.\n\nWe do not warrant that the quality of any products, services, information, or other material purchased or obtained by you will meet your expectations, or that any errors in the Service will be corrected.\n\nWhile each of our delivery service is limited in certain districts and/or some ground in the countries of Thailand, there may be times when certain areas are not covered by our service.\n\n**SECTION 6 - PRODUCT INFORMATION, PRICING & PAYMENT**\n- Villa Market endeavors to provide you with accurate and up-to-date pricing, product and promotional information. However, we do not guarantee that the pricing, images or other product or promotional information provided will be error-free, updated or complete. Villa Market shall not be liable for any errors in the pricing and product or promotional information listed on our Site or through our Services.\n\n- The price to be paid by you shall be based on our prevailing selling price at the time we receive your order, which may or may not be correctly reflected on the Site or through our Services.\n\n- If the actual price of any item ordered by you is higher than that reflected on the Site or through our Services, we will inform you and you will be given an option to confirm or cancel your purchase of such item based on the correct price. By confirming your purchase, you authorize us to charge the additional amounts to you. If you elect to cancel the purchase, we will reverse or refund payment for such item in accordance with our prevailing refund policy at such time. If we are unable to contact you, we will treat your order in respect of the incorrectly priced item as cancelled.\n\n- Where the actual price of any product is dependent on its weight (\"Weighed Item\"), we will provide an estimate of the price based on indicated weight and our current prevailing rates at the time of checkout. The actual weight and related price of the Weighed Item will be made known to you at the time of delivery and:\n\n - In the event of any shortfall in payment, we reserve the right to charge you for the additional amounts; and\n\n - In the event of any overpayment, we will reverse or refund the excess amounts paid for such item in accordance with our prevailing refund policy at the time of delivery.\n\n- All product prices are shown in Thai baht and are inclusive of Goods and Services Tax. Prices of products may change from time to time and any promotional discounts or offers may also be withdrawn at any time without notice.\n\n- Payment for all orders shall be made in Thai baht.\n\n- We accept payment for orders by MasterCard, Visa and JCB.\n\n- By placing your order, you authorize us to transmit information or to obtain information about you from third parties from time to time and this may include verification checks involving your debit or credit card number or credit reports in order to authenticate your identity, to validate your credit card, to obtain an initial credit card authorization, to protect you and us from fraud, and to enable us to arrange delivery of your order to your nominated delivery address.\n\n**SECTION 7 - Returns / Refunds**\n- Our policy lasts 7 days. If 7 days have gone by since your purchase, unfortunately we can’t offer you a refund or exchange.\n\n- To be eligible for a return, your item must be unused and in the same condition that you received it. It must also be in the original packaging.\n\n- Several types of goods are exempt from being returned. Perishable goods such as food, flowers, newspapers or magazines cannot be returned.\n\n- We also do not accept products that are intimate or sanitary goods, hazardous materials, or flammable liquids or gases.\n\n- To complete your returns or refunds, we require an original receipt that you can process at the same stores of your purchasing order only.\n\n**SECTION 8 - Refunds** \nStore Manager is the person who responsible of the refunds item. If you are approved, then your refund will be processed, and a credit will automatically be applied to your credit card or original method of payment. One day for online banking and 7-14 days for credit card (weekend and holiday are excluded)\n\n**SECTION 9 - Late or missing refunds** \nIf you haven’t received a refund yet, first check your bank account again. Then contact your credit card company, it may take some time before your refund is officially posted. Next contact your bank. There is often some processing time before a refund is posted. Please note that only regular priced items may be refunded, unfortunately sale items cannot be refunded. If you’ve done all of this and you still have not received your refund yet, please contact us at online@villamarket.com\n\n**SECTION 10 - PROMOTIONS**\n- Vouchers\n - We reserve the right to limit voucher usages per customer.\n \n - The voucher code is required to be added on the checkout page before submitting your order.\n \n - Vouchers cannot be exchanged for cash.\n \n - Vouchers cannot be used in conjunction with other promotions.\n \n - Villa Market reserves the right to cancel any order which is not consistent with the conditions determined by the company, as well as reserves the right to change the promotion conditions without prior notice. In the case of a dispute, the decision of the \n company is deemed final.\n\n- Buy X get X Promo\n - The promotion is valid until stocks in stores last.\n - We reserve the right to cancel out of stock items without prior notice.\n - The promotion is valid for same day delivery only.\n - The promotion cannot be exchanged into cash.\n - We reserve the right to change the promotion conditions without prior notice. In the case of a dispute, the decision of the company is deemed final.\n\n**SECTION 11 - ACCOUNT INFORMATION**\n- To access certain parts of the Site, Services and/or Content, you will be required to register for an account with Villa Market (\"Account\"). In so doing, you will be required to input your VPlus member number, email (\"Login ID\") and password (\"Password\") or a \ncombination of the above.\n\n- You are solely responsible for safeguarding and maintaining the confidentiality of your Login ID and Password. You agree not to:\n - Share or permit others to use your Account or Password; or\n - Assign or transfer your Account to any other person or entity.\n- You shall be bound by and responsible for all communications and online activity transmitted or conducted through the use of your \nAccount.\n\n- Villa Market shall have no responsibility or liability for any loss, damage, cost, expenses, or liabilities arising as a result of or in connection with the wrongful or fraudulent use of your Account. If you are aware of any actual or suspected unauthorized use(s) of your Account, loss, theft, or unauthorized disclosure of your Password, please notify us immediately at: online@villamarket.com\n- Each household or delivery address may only register one (1) Account. Multiple Account(s) registering the same delivery address may be permitted at our sole discretion.\n- Please provide accurate, complete, and up-to-date information required for your Account. You may at any time change or update your Account information by updating your information under My Account.\n- Where a delivery address is associated with multiple Account(s) without our written authorization, or fraudulent or wrongful use of an Account is detected or suspected, we reserve the right at our sole discretion, without liability, and without prejudice to our other rights and remedies under this Agreement or at law, to immediately:\n - Cancel any orders placed through such Account(s);\n - Cancel or invalidate any credits or discount vouchers, coupons or codes awarded to or used by such Account(s);\n - Prohibit such Account(s) or persons from participating in any promotions, contests or surveys of Villa Market; and/or\n - Merge, suspend and/or terminate such Account(s).\n\n**SECTION 12 - Intellectual Property and Limitations on Use** \nAll rights, title and interest in and to the Services, including all Content pursuant to the Services remains and/or shall be the copyright or intellectual property of either Villa Market JP Co Ltd., or third parties providing the data (as the case may be).\n\nYou may not use the Site, Services, including all Content, for publication, distribution, transmission, retransmission, redistribution, broadcast, reproduction or circulation to anyone else unless with our express written consent.\n\nYou may not modify, copy, distribute, transmit, display, perform, reproduce, publish, license, create derivative works from, transfer, or sell any Content obtained from the Service and/or Site unless with our express written consent.\n\nWe hereby grant you a personal, limited, worldwide, royalty-free, non-assignable, non-transferable, revocable, non-exclusive license (without the right to sub-license) to use the Site, Services and Content for the sole purpose of enabling you to use and enjoy the benefit of the Services in a manner prescribed by these Terms. Such license is subject to these Terms and does not include the distribution of any Content, modifying or otherwise making any derivative uses of the Site, Services and/or the Content (or any part thereof), the use of any scraping, data mining, robots or similar data gathering or extraction methods, downloading (other than page caching) any part of the Site, Services, Content or information contained therein except as expressly permitted on the Services, and any use of the Site, Services or Content other than for their intended purposes.\n\n**SECTION 13 - ACCURACY OF BILLING AND ACCOUNT INFORMATION** \nWe reserve the right to refuse any order you place with us. We may, in our sole discretion, limit or cancel quantities purchased per person, per household or per order. These restrictions may include orders placed by or under the same customer account, the same credit card, and/or orders that use the same billing and/or shipping address. In the event that we make a change to or cancel an order, we may attempt to notify you by contacting the e-mail and/or billing address/phone number provided at the time the order was made. We reserve the right to limit or prohibit orders that, in our sole judgment, appear to be placed by dealers, resellers or distributors.\n\nYou agree to provide current, complete and accurate purchase and account information for all purchases made at our store. You agree to promptly update your account and other information, including your email address and credit card numbers and expiration dates, so that we can complete your transactions and contact you as needed.\n\nFor more detail, please review our Returns Policy.\n\n**SECTION 14 - OPTIONAL TOOLS** \nWe may provide you with access to third-party tools over which we neither monitor nor have any control nor input.\n\nYou acknowledge and agree that we provide access to such tools “as is†and “as available†without any warranties, representations or conditions of any kind and without any endorsement. We shall have no liability whatsoever arising from or relating to your use of optional third-party tools.\n\nAny use by you of optional tools offered through the site is entirely at your own risk and discretion and you should ensure that you are familiar with and approve of the terms on which tools are provided by the relevant third-party provider(s).\n\nWe may also, in the future, offer new services and/or features through the website (including, the release of new tools and resources). Such new features and/or services shall also be subject to these Terms of Service.\n\n**SECTION 15 - THIRD-PARTY LINKS** \nCertain content, products and services available via our Service may include materials from third-parties.\n\nThird-party links on this site may direct you to third-party websites that are not affiliated with us. We are not responsible for examining or evaluating the content or accuracy and we do not warrant and will not have any liability or responsibility for any third-party materials or websites, or for any other materials, products, or services of third-parties.\n\nWe are not liable for any harm or damages related to the purchase or use of goods, services, resources, content, or any other transactions made in connection with any third-party websites. Please review carefully the third-party's policies and practices and make sure you understand them before you engage in any transaction. Complaints, claims, concerns, or questions regarding third-party products should be directed to the third-party.\n\n**SECTION 16 - USER COMMENTS, FEEDBACK AND OTHER SUBMISSIONS** \nIf, at our request, you send certain specific submissions (for example contest entries) or without a request from us you send creative ideas, suggestions, proposals, plans, or other materials, whether online, by email, by postal mail, or otherwise (collectively, 'comments'), you agree that we may, at any time, without restriction, edit, copy, publish, distribute, translate and otherwise use in any medium any comments that you forward to us. We are and shall be under no obligation (1) to maintain any comments in confidence; (2) to pay compensation for any comments; or (3) to respond to any comments.\n\nWe may, but have no obligation to, monitor, edit or remove content that we determine in our sole discretion are unlawful, offensive, threatening, libelous, defamatory, pornographic, obscene or otherwise objectionable or violates any party’s intellectual property or these Terms of Service.\n\nYou agree that your comments will not violate any right of any third-party, including copyright, trademark, privacy, personality or other personal or proprietary right. You further agree that your comments will not contain libelous or otherwise unlawful, abusive or obscene material, or contain any computer virus or other malware that could in any way affect the operation of the Service or any related website. You may not use a false e-mail address, pretend to be someone other than yourself, or otherwise mislead us or third-parties as to the origin of any comments. You are solely responsible for any comments you make and their accuracy. We take no responsibility and assume no liability for any comments posted by you or any third-party.\n\n**SECTION 17 - PERSONAL INFORMATION** \nYour submission of personal information through the store is governed by our Privacy Policy. To view our Privacy Policy.\n\n**SECTION 18 - ERRORS, INACCURACIES AND OMISSIONS** \nOccasionally there may be information on our site or in the Service that contains typographical errors, inaccuracies or omissions that may relate to product descriptions, pricing, promotions, offers, product shipping charges, transit times and availability. We reserve the right to correct any errors, inaccuracies or omissions, and to change or update information or cancel orders if any information in the Service or on any related website is inaccurate at any time without prior notice (including after you have submitted your order).\n\nWe undertake no obligation to update, amend or clarify information in the Service or on any related website, including without limitation, pricing information, except as required by law. No specified update or refresh date applied in the Service or on any related website, should be taken to indicate that all information in the Service or on any related website has been modified or updated.\n\n**SECTION 19 - PROHIBITED USES** \nIn addition to other prohibitions as set forth in the Terms of Service, you are prohibited from using the site or its content: (a) for any unlawful purpose; (b) to solicit others to perform or participate in any unlawful acts; (c) to violate any international, federal, provincial or state regulations, rules, laws, or local ordinances; (d) to infringe upon or violate our intellectual property rights or the intellectual property rights of others; (e) to harass, abuse, insult, harm, defame, slander, disparage, intimidate, or discriminate based on gender, sexual orientation, religion, ethnicity, race, age, national origin, or disability; (f) to submit false or misleading information; (g) to upload or transmit viruses or any other type of malicious code that will or may be used in any way that will affect the functionality or operation of the Service or of any related website, other websites, or the Internet; (h) to collect or track the personal information of others; (i) to spam, phish, pharm, pretext, spider, crawl, or scrape; (j) for any obscene or immoral purpose; or (k) to interfere with or circumvent the security features of the Service or any related website, other websites, or the Internet. We reserve the right to terminate your use of the Service or any related website for violating any of the prohibited uses.\n\n**SECTION 20 - DISCLAIMER OF WARRANTIES; LIMITATION OF LIABILITY** \nWe do not guarantee, represent or warrant that your use of our service will be uninterrupted, timely, secure or error-free.\n\nWe do not warrant that the results that may be obtained from the use of the service will be accurate or reliable.\n\nYou agree that from time to time we may remove the service for indefinite periods of time or cancel the service at any time, without notice to you.\n\nYou expressly agree that your use of, or inability to use, the service is at your sole risk. The service and all products and services delivered to you through the service are (except as expressly stated by us) provided 'as is' and 'as available' for your use, without any representation, warranties or conditions of any kind, either express or implied, including all implied warranties or conditions of merchantability, merchantable quality, fitness for a particular purpose, durability, title, and non-infringement.\n\nIn no case shall Villa Market JP Co Ltd.,, our directors, officers, employees, affiliates, agents, contractors, interns, suppliers, service providers or licensors be liable for any injury, loss, claim, or any direct, indirect, incidental, punitive, special, or consequential damages of any kind, including, without limitation lost profits, lost revenue, lost savings, loss of data, replacement costs, or any similar damages, whether based in contract, tort (including negligence), strict liability or otherwise, arising from your use of any of the service or any products procured using the service, or for any other claim related in any way to your use of the service or any product, including, but not limited to, any errors or omissions in any content, or any loss or damage of any kind incurred as a result of the use of the service or any content (or product) posted, transmitted, or otherwise made available via the service, even if advised of their possibility. Because some states or jurisdictions do not allow the exclusion or the limitation of liability for consequential or incidental damages, in such states or jurisdictions, our liability shall be limited to the maximum extent permitted by law.\n\n**SECTION 21 - INDEMNIFICATION** \nYou agree to indemnify, defend and hold harmless Villa Market JP Co Ltd., and our parent, subsidiaries, affiliates, partners, officers, directors, agents, contractors, licensors, service providers, subcontractors, suppliers, interns and employees, harmless from any claim or demand, including reasonable attorneys’ fees, made by any third-party due to or arising out of your breach of these Terms of Service or the documents they incorporate by reference, or your violation of any law or the rights of a third-party.\n\n**SECTION 22 - SEVERABILITY** \nIn the event that any provision of these Terms of Service is determined to be unlawful, void or unenforceable, such provision shall nonetheless be enforceable to the fullest extent permitted by applicable law, and the unenforceable portion shall be deemed to be severed from these Terms of Service, such determination shall not affect the validity and enforceability of any other remaining provisions.\n\n**SECTION 23 - TERMINATION** \nThe obligations and liabilities of the parties incurred prior to the termination date shall survive the termination of this agreement for all purposes.\n\nThese Terms of Service are effective unless and until terminated by either you or us. You may terminate these Terms of Service at any time by notifying us that you no longer wish to use our Services, or when you cease using our site.\n\nIf in our sole judgment you fail, or we suspect that you have failed, to comply with any term or provision of these Terms of Service, we also may terminate this agreement at any time without notice and you will remain liable for all amounts due up to and including the date of termination; and/or accordingly may deny you access to our Services (or any part thereof).\n\n**SECTION 24 - ENTIRE AGREEMENT**\nThe failure of us to exercise or enforce any right or provision of these Terms of Service shall not constitute a waiver of such right or provision.\n\nThese Terms of Service and any policies or operating rules posted by us on this site or in respect to The Service constitutes the entire agreement and understanding between you and us and govern your use of the Service, superseding any prior or contemporaneous agreements, communications and proposals, whether oral or written, between you and us (including, but not limited to, any prior versions of the Terms of Service).\n\nAny ambiguities in the interpretation of these Terms of Service shall not be construed against the drafting party.\n\n**SECTION 25 - GOVERNING LAW**\nThese Terms of Service and any separate agreements whereby we provide you Services shall be governed by and construed in accordance with the laws of Thailand.\n\n**SECTION 26 - CHANGES TO TERMS OF SERVICE**\nYou can review the most current version of the Terms of Service at any time at this page.\n\nWe reserve the right, at our sole discretion, to update, change or replace any part of these Terms of Service by posting updates and changes to our website. It is your responsibility to check our website periodically for changes. Your continued use of or access to our website or the Service following the posting of any changes to these Terms of Service constitutes acceptance of those changes.\n\n**SECTION 27 - CONTACT INFORMATION**\nQuestions about the Terms of Service should be sent to us at: online@villamarket.com",a={components:{Markdown:o["a"],TitleBar:()=>n.e("signin~31ecd969").then(n.bind(null,"1e1d")),TileBar:()=>n.e("chunk-vendors~cfbf0a2e").then(n.bind(null,"7112"))},data(){return{md:""}},metaInfo(){return{title:"Terms of Service | Villa Market - Thailand's Original International Supermarket",meta:[{name:"description",content:"Villa Market Terms of Service: Returns/Refunds, General Conditions, Pricing & Payment. We aim to provide the best for you."},{property:"og:title",content:"Terms of Service | Villa Market - Thailand's Original International Supermarket"},{property:"og:site_name",content:"Villa Market"},{property:"og:type",content:"website"},{name:"robots",content:"index,follow"}]}},mounted(){this.md=s}},c=a,l=(n("a0e1"),n("2877")),u=Object(l["a"])(c,i,r,!1,null,"64d5d439",null);t["default"]=u.exports},bdd1:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BLOCK_SIZE=64,t.DIGEST_LENGTH=32,t.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),t.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],t.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1},be23:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebCryptoSha256=t.Ie11Sha256=void 0;var i=n("9ab4");(0,i.__exportStar)(n("648c"),t);var r=n("7451");Object.defineProperty(t,"Ie11Sha256",{enumerable:!0,get:function(){return r.Sha256}});var o=n("6f83");Object.defineProperty(t,"WebCryptoSha256",{enumerable:!0,get:function(){return o.Sha256}})},bf82:function(e,t,n){"use strict";n.d(t,"a",(function(){return ee}));var i=n("9b48"),r=n("36de"),o=n("4327"),s=n("475d"),a=n("42e2"),c=n("f4e3"),l=n("1f3a"),u=Object(l["b"])().isBrowser,d=function(){function e(e){void 0===e&&(e={}),this.cookies=new c["a"],this.store=u?window.localStorage:Object.create(null),this.cookies=e.req?new c["a"](e.req.headers.cookie):new c["a"],Object.assign(this.store,this.cookies.getAll())}return Object.defineProperty(e.prototype,"length",{get:function(){return Object.entries(this.store).length},enumerable:!0,configurable:!0}),e.prototype.clear=function(){var e=this;Array.from(new Array(this.length)).map((function(t,n){return e.key(n)})).forEach((function(t){return e.removeItem(t)}))},e.prototype.getItem=function(e){return this.getLocalItem(e)},e.prototype.getLocalItem=function(e){return Object.prototype.hasOwnProperty.call(this.store,e)?this.store[e]:null},e.prototype.getUniversalItem=function(e){return this.cookies.get(e)},e.prototype.key=function(e){return Object.keys(this.store)[e]},e.prototype.removeItem=function(e){this.removeLocalItem(e),this.removeUniversalItem(e)},e.prototype.removeLocalItem=function(e){delete this.store[e]},e.prototype.removeUniversalItem=function(e){this.cookies.remove(e,{path:"/"})},e.prototype.setItem=function(e,t){this.setLocalItem(e,t);var n=e.split(".").pop();switch(n){case"LastAuthUser":case"accessToken":case"idToken":this.setUniversalItem(e,t)}},e.prototype.setLocalItem=function(e,t){this.store[e]=t},e.prototype.setUniversalItem=function(e,t){this.cookies.set(e,t,{path:"/",sameSite:!0,secure:"localhost"!==window.location.hostname})},e}(),h=n("d8bc");function p(e){return e.split("").map((function(e){return e.charCodeAt(0).toString(16).padStart(2,"0")})).join("")}function f(e){return e.match(/.{2}/g).map((function(e){return String.fromCharCode(parseInt(e,16))})).join("")}var g=n("7d03"),m=n("4c44"),y=n("0b16"),b="_self",v=function(e){var t=window.open(e,b);return t?Promise.resolve(t):Promise.reject()},_=function(e){window.sessionStorage.setItem("oauth_state",e)},w=function(){var e=window.sessionStorage.getItem("oauth_state");return window.sessionStorage.removeItem("oauth_state"),e},k=function(e){window.sessionStorage.setItem("ouath_pkce_key",e)},S=function(){var e=window.sessionStorage.getItem("ouath_pkce_key");return window.sessionStorage.removeItem("ouath_pkce_key"),e},C=n("94f8"),x=n.n(C),I=n("1132"),P=n.n(I),O=function(){return O=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},O.apply(this,arguments)},A=function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{c(i.next(e))}catch(t){o(t)}}function a(e){try{c(i["throw"](e))}catch(t){o(t)}}function c(e){e.done?n(e.value):r(e.value).then(s,a)}c((i=i.apply(e,t||[])).next())}))},T=function(e,t){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return c([e,t])}}function c(o){if(n)throw new TypeError("Generator is already executing.");while(s)try{if(n=1,i&&(r=2&o[0]?i["return"]:o[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(r=s.trys,!(r=r.length>0&&r[r.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(a){o=[6,a],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},E=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),s=[];try{while((void 0===t||t-- >0)&&!(i=o.next()).done)s.push(i.value)}catch(a){r={error:a}}finally{try{i&&!i.done&&(n=o["return"])&&n.call(o)}finally{if(r)throw r.error}}return s},j="undefined"!==typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",$=function(e,t,n){o["a"].dispatch("auth",{event:e,data:t,message:n},"Auth",j)},L=new r["a"]("OAuth"),M=function(){function e(e){var t=e.config,n=e.cognitoClientId,i=e.scopes,r=void 0===i?[]:i;if(this._urlOpener=t.urlOpener||v,this._config=t,this._cognitoClientId=n,!this.isValidScopes(r))throw Error("scopes must be a String Array");this._scopes=r}return e.prototype.isValidScopes=function(e){return Array.isArray(e)&&e.every((function(e){return"string"===typeof e}))},e.prototype.oauthSignIn=function(e,t,n,r,o,s){void 0===e&&(e="code"),void 0===o&&(o=i["b"].Cognito);var a=this._generateState(32),c=s?a+"-"+p(s):a;_(c);var l=this._generateRandom(128);k(l);var u=this._generateChallenge(l),d="S256",h=this._scopes.join(" "),f=Object.entries(O(O({redirect_uri:n,response_type:e,client_id:r,identity_provider:o,scope:h,state:c},"code"===e?{code_challenge:u}:{}),"code"===e?{code_challenge_method:d}:{})).map((function(e){var t=E(e,2),n=t[0],i=t[1];return encodeURIComponent(n)+"="+encodeURIComponent(i)})).join("&"),g="https://"+t+"/oauth2/authorize?"+f;L.debug("Redirecting to "+g),this._urlOpener(g,n)},e.prototype._handleCodeFlow=function(e){return A(this,void 0,void 0,(function(){var t,n,r,o,s,a,c,l,u,d,h,p,f,g;return T(this,(function(m){switch(m.label){case 0:return t=(Object(y["parse"])(e).query||"").split("&").map((function(e){return e.split("=")})).reduce((function(e,t){var n,i=E(t,2),r=i[0],o=i[1];return O(O({},e),(n={},n[r]=o,n))}),{code:void 0}).code,n=Object(y["parse"])(e).pathname||"/",r=Object(y["parse"])(this._config.redirectSignIn).pathname||"/",t&&n===r?(o="https://"+this._config.domain+"/oauth2/token",$("codeFlow",{},"Retrieving tokens from "+o),s=Object(i["d"])(this._config)?this._cognitoClientId:this._config.clientID,a=Object(i["d"])(this._config)?this._config.redirectSignIn:this._config.redirectUri,c=S(),l=O({grant_type:"authorization_code",code:t,client_id:s,redirect_uri:a},c?{code_verifier:c}:{}),L.debug("Calling token endpoint: "+o+" with",l),u=Object.entries(l).map((function(e){var t=E(e,2),n=t[0],i=t[1];return encodeURIComponent(n)+"="+encodeURIComponent(i)})).join("&"),[4,fetch(o,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:u})]):[2];case 1:return[4,m.sent().json()];case 2:if(d=m.sent(),h=d.access_token,p=d.refresh_token,f=d.id_token,g=d.error,g)throw new Error(g);return[2,{accessToken:h,refreshToken:p,idToken:f}]}}))}))},e.prototype._handleImplicitFlow=function(e){return A(this,void 0,void 0,(function(){var t,n,i;return T(this,(function(r){return t=(Object(y["parse"])(e).hash||"#").substr(1).split("&").map((function(e){return e.split("=")})).reduce((function(e,t){var n,i=E(t,2),r=i[0],o=i[1];return O(O({},e),(n={},n[r]=o,n))}),{id_token:void 0,access_token:void 0}),n=t.id_token,i=t.access_token,$("implicitFlow",{},"Got tokens from "+e),L.debug("Retrieving implicit tokens from "+e+" with"),[2,{accessToken:i,idToken:n,refreshToken:null}]}))}))},e.prototype.handleAuthResponse=function(e){return A(this,void 0,void 0,(function(){var t,n,i,r,o,s,a;return T(this,(function(c){switch(c.label){case 0:if(c.trys.push([0,5,,6]),t=e?O(O({},(Object(y["parse"])(e).hash||"#").substr(1).split("&").map((function(e){return e.split("=")})).reduce((function(e,t){var n=E(t,2),i=n[0],r=n[1];return e[i]=r,e}),{})),(Object(y["parse"])(e).query||"").split("&").map((function(e){return e.split("=")})).reduce((function(e,t){var n=E(t,2),i=n[0],r=n[1];return e[i]=r,e}),{})):{},n=t.error,i=t.error_description,n)throw new Error(i);return r=this._validateState(t),L.debug("Starting "+this._config.responseType+" flow with "+e),"code"!==this._config.responseType?[3,2]:(o=[{}],[4,this._handleCodeFlow(e)]);case 1:return[2,O.apply(void 0,[O.apply(void 0,o.concat([c.sent()])),{state:r}])];case 2:return s=[{}],[4,this._handleImplicitFlow(e)];case 3:return[2,O.apply(void 0,[O.apply(void 0,s.concat([c.sent()])),{state:r}])];case 4:return[3,6];case 5:throw a=c.sent(),L.error("Error handling auth response.",a),a;case 6:return[2]}}))}))},e.prototype._validateState=function(e){if(e){var t=w(),n=e.state;if(t&&t!==n)throw new Error("Invalid state in OAuth flow");return n}},e.prototype.signOut=function(){return A(this,void 0,void 0,(function(){var e,t,n;return T(this,(function(r){return e="https://"+this._config.domain+"/logout?",t=Object(i["d"])(this._config)?this._cognitoClientId:this._config.oauth.clientID,n=Object(i["d"])(this._config)?this._config.redirectSignOut:this._config.returnTo,e+=Object.entries({client_id:t,logout_uri:encodeURIComponent(n)}).map((function(e){var t=E(e,2),n=t[0],i=t[1];return n+"="+i})).join("&"),$("oAuthSignOut",{oAuth:"signOut"},"Signing out from "+e),L.debug("Signing out from "+e),[2,this._urlOpener(e)]}))}))},e.prototype._generateState=function(e){for(var t="",n=e,i="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";n>0;--n)t+=i[Math.round(Math.random()*(i.length-1))];return t},e.prototype._generateChallenge=function(e){return this._base64URL(x()(e))},e.prototype._base64URL=function(e){return e.toString(P.a).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")},e.prototype._generateRandom=function(e){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",n=new Uint8Array(e);if("undefined"!==typeof window&&window.crypto)window.crypto.getRandomValues(n);else for(var i=0;i<e;i+=1)n[i]=Math.random()*t.length|0;return this._bufferToString(n)},e.prototype._bufferToString=function(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=[],i=0;i<e.byteLength;i+=1){var r=e[i]%t.length;n.push(t[r])}return n.join("")},e}(),N=M,q=function(e){if(l["a"].browserOrNode().isBrowser&&window.location){var t=window.location.href;e({url:t})}else if(!l["a"].browserOrNode().isNode)throw new Error("Not supported")},U=n("60ac"),R=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),B=new r["a"]("AuthError"),D=function(e){function t(n){var i=this,r=F[n],o=r.message,s=r.log;return i=e.call(this,o)||this,i.constructor=t,Object.setPrototypeOf(i,t.prototype),i.name="AuthError",i.log=s||o,B.error(i.log),i}return R(t,e),t}(Error),z=function(e){function t(n){var i=e.call(this,n)||this;return i.constructor=t,Object.setPrototypeOf(i,t.prototype),i.name="NoUserPoolError",i}return R(t,e),t}(D),F={noConfig:{message:U["a"].DEFAULT_MSG,log:"\n Error: Amplify has not been configured correctly.\n This error is typically caused by one of the following scenarios:\n\n 1. Make sure you're passing the awsconfig object to Amplify.configure() in your app's entry point\n See https://aws-amplify.github.io/docs/js/authentication#configure-your-app for more information\n \n 2. There might be multiple conflicting versions of amplify packages in your node_modules.\n\t\t\t\tRefer to our docs site for help upgrading Amplify packages (https://docs.amplify.aws/lib/troubleshooting/upgrading/q/platform/js)\n "},missingAuthConfig:{message:U["a"].DEFAULT_MSG,log:"\n Error: Amplify has not been configured correctly. \n The configuration object is missing required auth properties.\n This error is typically caused by one of the following scenarios:\n\n 1. Did you run `amplify push` after adding auth via `amplify add auth`?\n See https://aws-amplify.github.io/docs/js/authentication#amplify-project-setup for more information\n\n 2. This could also be caused by multiple conflicting versions of amplify packages, see (https://docs.amplify.aws/lib/troubleshooting/upgrading/q/platform/js) for help upgrading Amplify packages.\n "},emptyUsername:{message:U["a"].EMPTY_USERNAME},invalidUsername:{message:U["a"].INVALID_USERNAME},emptyPassword:{message:U["a"].EMPTY_PASSWORD},emptyCode:{message:U["a"].EMPTY_CODE},signUpError:{message:U["a"].SIGN_UP_ERROR,log:"The first parameter should either be non-null string or object"},noMFA:{message:U["a"].NO_MFA},invalidMFA:{message:U["a"].INVALID_MFA},emptyChallengeResponse:{message:U["a"].EMPTY_CHALLENGE},noUserSession:{message:U["a"].NO_USER_SESSION},default:{message:U["a"].DEFAULT_MSG}},W=function(){return W=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},W.apply(this,arguments)},H=function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{c(i.next(e))}catch(t){o(t)}}function a(e){try{c(i["throw"](e))}catch(t){o(t)}}function c(e){e.done?n(e.value):r(e.value).then(s,a)}c((i=i.apply(e,t||[])).next())}))},V=function(e,t){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return c([e,t])}}function c(o){if(n)throw new TypeError("Generator is already executing.");while(s)try{if(n=1,i&&(r=2&o[0]?i["return"]:o[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(r=s.trys,!(r=r.length>0&&r[r.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(a){o=[6,a],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},G=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),s=[];try{while((void 0===t||t-- >0)&&!(i=o.next()).done)s.push(i.value)}catch(a){r={error:a}}finally{try{i&&!i.done&&(n=o["return"])&&n.call(o)}finally{if(r)throw r.error}}return s},K=new r["a"]("AuthClass"),Y="aws.cognito.signin.user.admin",Q=1e4,Z="undefined"!==typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",J=function(e,t,n){o["a"].dispatch("auth",{event:e,data:t,message:n},"Auth",Z)},X=function(){function e(e){var t=this;this.userPool=null,this.user=null,this.oAuthFlowInProgress=!1,this.Credentials=s["a"],this.wrapRefreshSessionCallback=function(e){var t=function(t,n){return n?J("tokenRefresh",void 0,"New token retrieved"):J("tokenRefresh_failure",t,"Failed to retrieve new token"),e(t,n)};return t},this.configure(e),this.currentCredentials=this.currentCredentials.bind(this),this.currentUserCredentials=this.currentUserCredentials.bind(this),o["a"].listen("auth",(function(e){var n=e.payload,i=n.event;switch(i){case"signIn":t._storage.setItem("amplify-signin-with-hostedUI","false");break;case"signOut":t._storage.removeItem("amplify-signin-with-hostedUI");break;case"cognitoHostedUI":t._storage.setItem("amplify-signin-with-hostedUI","true");break}}))}return e.prototype.getModuleName=function(){return"Auth"},e.prototype.configure=function(e){var t=this;if(!e)return this._config||{};K.debug("configure Auth");var n=Object.assign({},this._config,a["a"].parseMobilehubConfig(e).Auth,e);this._config=n;var r=this._config,o=r.userPoolId,s=r.userPoolWebClientId,c=r.cookieStorage,l=r.oauth,u=r.region,p=r.identityPoolId,f=r.mandatorySignIn,g=r.refreshHandlers,y=r.identityPoolRegion,b=r.clientMetadata,v=r.endpoint;if(this._config.storage){if(!this._isValidAuthStorage(this._config.storage))throw K.error("The storage in the Auth config is not valid!"),new Error("Empty storage object");this._storage=this._config.storage}else this._storage=c?new m["i"](c):e.ssr?new d:(new h["a"]).getStorage();if(this._storageSync=Promise.resolve(),"function"===typeof this._storage["sync"]&&(this._storageSync=this._storage["sync"]()),o){var _={UserPoolId:o,ClientId:s,endpoint:v};_.Storage=this._storage,this.userPool=new m["g"](_,this.wrapRefreshSessionCallback)}this.Credentials.configure({mandatorySignIn:f,region:y||u,userPoolId:o,identityPoolId:p,refreshHandlers:g,storage:this._storage});var w=l?Object(i["d"])(this._config.oauth)?l:l.awsCognito:void 0;if(w){var k=Object.assign({cognitoClientId:s,UserPoolId:o,domain:w["domain"],scopes:w["scope"],redirectSignIn:w["redirectSignIn"],redirectSignOut:w["redirectSignOut"],responseType:w["responseType"],Storage:this._storage,urlOpener:w["urlOpener"],clientMetadata:b},w["options"]);this._oAuthHandler=new N({scopes:k.scopes,config:k,cognitoClientId:k.cognitoClientId});var S={};q((function(e){var n=e.url;S[n]||(S[n]=!0,t._handleAuthResponse(n))}))}return J("configured",null,"The Auth category has been configured successfully"),this._config},e.prototype.signUp=function(e){for(var t=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(!this.userPool)return this.rejectNoUserPool();var o,s=null,a=null,c=[],l=null;if(e&&"string"===typeof e){s=e,a=n?n[0]:null;var u=n?n[1]:null,d=n?n[2]:null;u&&c.push(new m["f"]({Name:"email",Value:u})),d&&c.push(new m["f"]({Name:"phone_number",Value:d}))}else{if(!e||"object"!==typeof e)return this.rejectAuthError(i["a"].SignUpError);s=e["username"],a=e["password"],e&&e.clientMetadata?o=e.clientMetadata:this._config.clientMetadata&&(o=this._config.clientMetadata);var h=e["attributes"];h&&Object.keys(h).map((function(e){c.push(new m["f"]({Name:e,Value:h[e]}))}));var p=e["validationData"];p&&(l=[],Object.keys(p).map((function(e){l.push(new m["f"]({Name:e,Value:p[e]}))})))}return s?a?(K.debug("signUp attrs:",c),K.debug("signUp validation data:",l),new Promise((function(e,n){t.userPool.signUp(s,a,c,l,(function(t,i){t?(J("signUp_failure",t,s+" failed to signup"),n(t)):(J("signUp",i,s+" has signed up successfully"),e(i))}),o)}))):this.rejectAuthError(i["a"].EmptyPassword):this.rejectAuthError(i["a"].EmptyUsername)},e.prototype.confirmSignUp=function(e,t,n){if(!this.userPool)return this.rejectNoUserPool();if(!e)return this.rejectAuthError(i["a"].EmptyUsername);if(!t)return this.rejectAuthError(i["a"].EmptyCode);var r,o=this.createCognitoUser(e),s=!n||"boolean"!==typeof n.forceAliasCreation||n.forceAliasCreation;return n&&n.clientMetadata?r=n.clientMetadata:this._config.clientMetadata&&(r=this._config.clientMetadata),new Promise((function(e,n){o.confirmRegistration(t,s,(function(t,i){t?n(t):e(i)}),r)}))},e.prototype.resendSignUp=function(e,t){if(void 0===t&&(t=this._config.clientMetadata),!this.userPool)return this.rejectNoUserPool();if(!e)return this.rejectAuthError(i["a"].EmptyUsername);var n=this.createCognitoUser(e);return new Promise((function(e,i){n.resendConfirmationCode((function(t,n){t?i(t):e(n)}),t)}))},e.prototype.signIn=function(e,t,n){if(void 0===n&&(n=this._config.clientMetadata),!this.userPool)return this.rejectNoUserPool();var r=null,o=null,s={};if("string"===typeof e)r=e,o=t;else{if(!Object(i["g"])(e))return this.rejectAuthError(i["a"].InvalidUsername);"undefined"!==typeof t&&K.warn("The password should be defined under the first parameter object!"),r=e.username,o=e.password,s=e.validationData}if(!r)return this.rejectAuthError(i["a"].EmptyUsername);var a=new m["a"]({Username:r,Password:o,ValidationData:s,ClientMetadata:n});return o?this.signInWithPassword(a):this.signInWithoutPassword(a)},e.prototype.authCallbacks=function(e,t,n){var i=this,r=this;return{onSuccess:function(o){return H(i,void 0,void 0,(function(){var i,s,a,c;return V(this,(function(l){switch(l.label){case 0:K.debug(o),delete e["challengeName"],delete e["challengeParam"],l.label=1;case 1:return l.trys.push([1,4,5,9]),[4,this.Credentials.clear()];case 2:return l.sent(),[4,this.Credentials.set(o,"session")];case 3:return i=l.sent(),K.debug("succeed to get cognito credentials",i),[3,9];case 4:return s=l.sent(),K.debug("cannot get cognito credentials",s),[3,9];case 5:return l.trys.push([5,7,,8]),[4,this.currentUserPoolUser()];case 6:return a=l.sent(),r.user=a,J("signIn",a,"A user "+e.getUsername()+" has been signed in"),t(a),[3,8];case 7:return c=l.sent(),K.error("Failed to get the signed in user",c),n(c),[3,8];case 8:return[7];case 9:return[2]}}))}))},onFailure:function(t){K.debug("signIn failure",t),J("signIn_failure",t,e.getUsername()+" failed to signin"),n(t)},customChallenge:function(n){K.debug("signIn custom challenge answer required"),e["challengeName"]="CUSTOM_CHALLENGE",e["challengeParam"]=n,t(e)},mfaRequired:function(n,i){K.debug("signIn MFA required"),e["challengeName"]=n,e["challengeParam"]=i,t(e)},mfaSetup:function(n,i){K.debug("signIn mfa setup",n),e["challengeName"]=n,e["challengeParam"]=i,t(e)},newPasswordRequired:function(n,i){K.debug("signIn new password"),e["challengeName"]="NEW_PASSWORD_REQUIRED",e["challengeParam"]={userAttributes:n,requiredAttributes:i},t(e)},totpRequired:function(n,i){K.debug("signIn totpRequired"),e["challengeName"]=n,e["challengeParam"]=i,t(e)},selectMFAType:function(n,i){K.debug("signIn selectMFAType",n),e["challengeName"]=n,e["challengeParam"]=i,t(e)}}},e.prototype.signInWithPassword=function(e){var t=this;if(this.pendingSignIn)throw new Error("Pending sign-in attempt already in progress");var n=this.createCognitoUser(e.getUsername());return this.pendingSignIn=new Promise((function(i,r){n.authenticateUser(e,t.authCallbacks(n,(function(e){t.pendingSignIn=null,i(e)}),(function(e){t.pendingSignIn=null,r(e)})))})),this.pendingSignIn},e.prototype.signInWithoutPassword=function(e){var t=this,n=this.createCognitoUser(e.getUsername());return n.setAuthenticationFlowType("CUSTOM_AUTH"),new Promise((function(i,r){n.initiateAuth(e,t.authCallbacks(n,i,r))}))},e.prototype.getMFAOptions=function(e){return new Promise((function(t,n){e.getMFAOptions((function(e,i){if(e)return K.debug("get MFA Options failed",e),void n(e);K.debug("get MFA options success",i),t(i)}))}))},e.prototype.getPreferredMFA=function(e,t){var n=this,i=this;return new Promise((function(r,o){var s=n._config.clientMetadata,a=!!t&&t.bypassCache;e.getUserData((function(e,t){if(e)return K.debug("getting preferred mfa failed",e),void o(e);var n=i._getMfaTypeFromUserData(t);return n?void r(n):void o("invalid MFA Type")}),{bypassCache:a,clientMetadata:s})}))},e.prototype._getMfaTypeFromUserData=function(e){var t=null,n=e.PreferredMfaSetting;if(n)t=n;else{var i=e.UserMFASettingList;if(i)0===i.length?t="NOMFA":K.debug("invalid case for getPreferredMFA",e);else{var r=e.MFAOptions;t=r?"SMS_MFA":"NOMFA"}}return t},e.prototype._getUserData=function(e,t){return new Promise((function(n,i){e.getUserData((function(e,t){return e?(K.debug("getting user data failed",e),void i(e)):void n(t)}),t)}))},e.prototype.setPreferredMFA=function(e,t){return H(this,void 0,void 0,(function(){var n,r,o,s,a,c,l;return V(this,(function(u){switch(u.label){case 0:return n=this._config.clientMetadata,[4,this._getUserData(e,{bypassCache:!0,clientMetadata:n})];case 1:switch(r=u.sent(),o=null,s=null,a=t,a){case"TOTP":return[3,2];case"SMS":return[3,3];case"NOMFA":return[3,4]}return[3,6];case 2:return s={PreferredMfa:!0,Enabled:!0},[3,7];case 3:return o={PreferredMfa:!0,Enabled:!0},[3,7];case 4:return c=r["UserMFASettingList"],[4,this._getMfaTypeFromUserData(r)];case 5:if(l=u.sent(),"NOMFA"===l)return[2,Promise.resolve("No change for mfa type")];if("SMS_MFA"===l)o={PreferredMfa:!1,Enabled:!1};else{if("SOFTWARE_TOKEN_MFA"!==l)return[2,this.rejectAuthError(i["a"].InvalidMFA)];s={PreferredMfa:!1,Enabled:!1}}return c&&0!==c.length&&c.forEach((function(e){"SMS_MFA"===e?o={PreferredMfa:!1,Enabled:!1}:"SOFTWARE_TOKEN_MFA"===e&&(s={PreferredMfa:!1,Enabled:!1})})),[3,7];case 6:return K.debug("no validmfa method provided"),[2,this.rejectAuthError(i["a"].NoMFA)];case 7:return this,[2,new Promise((function(t,i){e.setUserMfaPreference(o,s,(function(r,o){if(r)return K.debug("Set user mfa preference error",r),i(r);K.debug("Set user mfa success",o),K.debug("Caching the latest user data into local"),e.getUserData((function(e,n){return e?(K.debug("getting user data failed",e),i(e)):t(o)}),{bypassCache:!0,clientMetadata:n})}))}))]}}))}))},e.prototype.disableSMS=function(e){return new Promise((function(t,n){e.disableMFA((function(e,i){if(e)return K.debug("disable mfa failed",e),void n(e);K.debug("disable mfa succeed",i),t(i)}))}))},e.prototype.enableSMS=function(e){return new Promise((function(t,n){e.enableMFA((function(e,i){if(e)return K.debug("enable mfa failed",e),void n(e);K.debug("enable mfa succeed",i),t(i)}))}))},e.prototype.setupTOTP=function(e){return new Promise((function(t,n){e.associateSoftwareToken({onFailure:function(e){K.debug("associateSoftwareToken failed",e),n(e)},associateSecretCode:function(e){K.debug("associateSoftwareToken sucess",e),t(e)}})}))},e.prototype.verifyTotpToken=function(e,t){return K.debug("verification totp token",e,t),new Promise((function(n,i){e.verifySoftwareToken(t,"My TOTP device",{onFailure:function(e){K.debug("verifyTotpToken failed",e),i(e)},onSuccess:function(t){J("signIn",e,"A user "+e.getUsername()+" has been signed in"),K.debug("verifyTotpToken success",t),n(t)}})}))},e.prototype.confirmSignIn=function(e,t,n,r){var o=this;if(void 0===r&&(r=this._config.clientMetadata),!t)return this.rejectAuthError(i["a"].EmptyCode);var s=this;return new Promise((function(i,a){e.sendMFACode(t,{onSuccess:function(t){return H(o,void 0,void 0,(function(){var n,r;return V(this,(function(o){switch(o.label){case 0:K.debug(t),o.label=1;case 1:return o.trys.push([1,4,5,6]),[4,this.Credentials.clear()];case 2:return o.sent(),[4,this.Credentials.set(t,"session")];case 3:return n=o.sent(),K.debug("succeed to get cognito credentials",n),[3,6];case 4:return r=o.sent(),K.debug("cannot get cognito credentials",r),[3,6];case 5:return s.user=e,J("signIn",e,"A user "+e.getUsername()+" has been signed in"),i(e),[7];case 6:return[2]}}))}))},onFailure:function(e){K.debug("confirm signIn failure",e),a(e)}},n,r)}))},e.prototype.completeNewPassword=function(e,t,n,r){var o=this;if(void 0===n&&(n={}),void 0===r&&(r=this._config.clientMetadata),!t)return this.rejectAuthError(i["a"].EmptyPassword);var s=this;return new Promise((function(i,a){e.completeNewPasswordChallenge(t,n,{onSuccess:function(t){return H(o,void 0,void 0,(function(){var n,r;return V(this,(function(o){switch(o.label){case 0:K.debug(t),o.label=1;case 1:return o.trys.push([1,4,5,6]),[4,this.Credentials.clear()];case 2:return o.sent(),[4,this.Credentials.set(t,"session")];case 3:return n=o.sent(),K.debug("succeed to get cognito credentials",n),[3,6];case 4:return r=o.sent(),K.debug("cannot get cognito credentials",r),[3,6];case 5:return s.user=e,J("signIn",e,"A user "+e.getUsername()+" has been signed in"),i(e),[7];case 6:return[2]}}))}))},onFailure:function(e){K.debug("completeNewPassword failure",e),J("completeNewPassword_failure",e,o.user+" failed to complete the new password flow"),a(e)},mfaRequired:function(t,n){K.debug("signIn MFA required"),e["challengeName"]=t,e["challengeParam"]=n,i(e)},mfaSetup:function(t,n){K.debug("signIn mfa setup",t),e["challengeName"]=t,e["challengeParam"]=n,i(e)},totpRequired:function(t,n){K.debug("signIn mfa setup",t),e["challengeName"]=t,e["challengeParam"]=n,i(e)}},r)}))},e.prototype.sendCustomChallengeAnswer=function(e,t,n){var r=this;if(void 0===n&&(n=this._config.clientMetadata),!this.userPool)return this.rejectNoUserPool();if(!t)return this.rejectAuthError(i["a"].EmptyChallengeResponse);return new Promise((function(i,o){e.sendCustomChallengeAnswer(t,r.authCallbacks(e,i,o),n)}))},e.prototype.updateUserAttributes=function(e,t,n){void 0===n&&(n=this._config.clientMetadata);var i=[],r=this;return new Promise((function(o,s){r.userSession(e).then((function(r){for(var a in t)if("sub"!==a&&a.indexOf("_verified")<0){var c={Name:a,Value:t[a]};i.push(c)}e.updateAttributes(i,(function(e,t){return e?s(e):o(t)}),n)}))}))},e.prototype.userAttributes=function(e){var t=this;return new Promise((function(n,i){t.userSession(e).then((function(t){e.getUserAttributes((function(e,t){e?i(e):n(t)}))}))}))},e.prototype.verifiedContact=function(e){var t=this;return this.userAttributes(e).then((function(e){var n=t.attributesToObject(e),i={},r={};return n["email"]&&(n["email_verified"]?r["email"]=n["email"]:i["email"]=n["email"]),n["phone_number"]&&(n["phone_number_verified"]?r["phone_number"]=n["phone_number"]:i["phone_number"]=n["phone_number"]),{verified:r,unverified:i}}))},e.prototype.currentUserPoolUser=function(e){var t=this;return this.userPool?new Promise((function(n,i){t._storageSync.then((function(){return H(t,void 0,void 0,(function(){var t,r,s=this;return V(this,(function(a){switch(a.label){case 0:return this.isOAuthInProgress()?(K.debug("OAuth signIn in progress, waiting for resolution..."),[4,new Promise((function(e){var t=setTimeout((function(){K.debug("OAuth signIn in progress timeout"),o["a"].remove("auth",n),e()}),Q);function n(i){var r=i.payload,s=r.event;"cognitoHostedUI"!==s&&"cognitoHostedUI_failure"!==s||(K.debug("OAuth signIn resolved: "+s),clearTimeout(t),o["a"].remove("auth",n),e())}o["a"].listen("auth",n)}))]):[3,2];case 1:a.sent(),a.label=2;case 2:return t=this.userPool.getCurrentUser(),t?(r=this._config.clientMetadata,t.getSession((function(r,o){return H(s,void 0,void 0,(function(){var s,a,c,l,u=this;return V(this,(function(d){switch(d.label){case 0:return r?(K.debug("Failed to get the user session",r),i(r),[2]):(s=!!e&&e.bypassCache,s?[4,this.Credentials.clear()]:[3,2]);case 1:d.sent(),d.label=2;case 2:return a=this._config.clientMetadata,c=o.getAccessToken().decodePayload().scope,l=void 0===c?"":c,l.split(" ").includes(Y)?(t.getUserData((function(e,r){if(e)return K.debug("getting user data failed",e),void("User is disabled."===e.message||"User does not exist."===e.message||"Access Token has been revoked"===e.message?i(e):n(t));for(var o=r.PreferredMfaSetting||"NOMFA",s=[],a=0;a<r.UserAttributes.length;a++){var c={Name:r.UserAttributes[a].Name,Value:r.UserAttributes[a].Value},l=new m["f"](c);s.push(l)}var d=u.attributesToObject(s);return Object.assign(t,{attributes:d,preferredMFA:o}),n(t)}),{bypassCache:s,clientMetadata:a}),[2]):(K.debug("Unable to get the user data because the "+Y+" is not in the scopes of the access token"),[2,n(t)])}}))}))}),{clientMetadata:r}),[2]):(K.debug("Failed to get user from user pool"),i("No current user"),[2])}}))}))})).catch((function(e){return K.debug("Failed to sync cache info into memory",e),i(e)}))})):this.rejectNoUserPool()},e.prototype.isOAuthInProgress=function(){return this.oAuthFlowInProgress},e.prototype.currentAuthenticatedUser=function(e){return H(this,void 0,void 0,(function(){var t,n,i,r,o;return V(this,(function(s){switch(s.label){case 0:K.debug("getting current authenticated user"),t=null,s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this._storageSync];case 2:return s.sent(),[3,4];case 3:throw n=s.sent(),K.debug("Failed to sync cache info into memory",n),n;case 4:try{i=JSON.parse(this._storage.getItem("aws-amplify-federatedInfo")),i&&(t=W(W({},i.user),{token:i.token}))}catch(a){K.debug("cannot load federated user from auth storage")}return t?(this.user=t,K.debug("get current authenticated federated user",this.user),[2,this.user]):[3,5];case 5:K.debug("get current authenticated userpool user"),r=null,s.label=6;case 6:return s.trys.push([6,8,,9]),[4,this.currentUserPoolUser(e)];case 7:return r=s.sent(),[3,9];case 8:return o=s.sent(),"No userPool"===o&&K.error("Cannot get the current user because the user pool is missing. Please make sure the Auth module is configured with a valid Cognito User Pool ID"),K.debug("The user is not authenticated by the error",o),[2,Promise.reject("The user is not authenticated")];case 9:return this.user=r,[2,this.user]}}))}))},e.prototype.currentSession=function(){var e=this;return K.debug("Getting current session"),this.userPool?new Promise((function(t,n){e.currentUserPoolUser().then((function(i){e.userSession(i).then((function(e){t(e)})).catch((function(e){K.debug("Failed to get the current session",e),n(e)}))})).catch((function(e){K.debug("Failed to get the current user",e),n(e)}))})):Promise.reject()},e.prototype.userSession=function(e){if(!e)return K.debug("the user is null"),this.rejectAuthError(i["a"].NoUserSession);var t=this._config.clientMetadata;return new Promise((function(n,i){K.debug("Getting the session from this user:",e),e.getSession((function(t,r){return t?(K.debug("Failed to get the session from user",e),void i(t)):(K.debug("Succeed to get the user session",r),void n(r))}),{clientMetadata:t})}))},e.prototype.currentUserCredentials=function(){return H(this,void 0,void 0,(function(){var e,t,n=this;return V(this,(function(i){switch(i.label){case 0:K.debug("Getting current user credentials"),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this._storageSync];case 2:return i.sent(),[3,4];case 3:throw e=i.sent(),K.debug("Failed to sync cache info into memory",e),e;case 4:t=null;try{t=JSON.parse(this._storage.getItem("aws-amplify-federatedInfo"))}catch(r){K.debug("failed to get or parse item aws-amplify-federatedInfo",r)}return t?[2,this.Credentials.refreshFederatedToken(t)]:[2,this.currentSession().then((function(e){return K.debug("getting session success",e),n.Credentials.set(e,"session")})).catch((function(e){return K.debug("getting session failed",e),n.Credentials.set(null,"guest")}))]}}))}))},e.prototype.currentCredentials=function(){return K.debug("getting current credentials"),this.Credentials.get()},e.prototype.verifyUserAttribute=function(e,t,n){return void 0===n&&(n=this._config.clientMetadata),new Promise((function(i,r){e.getAttributeVerificationCode(t,{onSuccess:function(){return i()},onFailure:function(e){return r(e)}},n)}))},e.prototype.verifyUserAttributeSubmit=function(e,t,n){return n?new Promise((function(i,r){e.verifyAttribute(t,n,{onSuccess:function(e){i(e)},onFailure:function(e){r(e)}})})):this.rejectAuthError(i["a"].EmptyCode)},e.prototype.verifyCurrentUserAttribute=function(e){var t=this;return t.currentUserPoolUser().then((function(n){return t.verifyUserAttribute(n,e)}))},e.prototype.verifyCurrentUserAttributeSubmit=function(e,t){var n=this;return n.currentUserPoolUser().then((function(i){return n.verifyUserAttributeSubmit(i,e,t)}))},e.prototype.cognitoIdentitySignOut=function(e,t){return H(this,void 0,void 0,(function(){var n,i,r=this;return V(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this._storageSync];case 1:return o.sent(),[3,3];case 2:throw n=o.sent(),K.debug("Failed to sync cache info into memory",n),n;case 3:return i=this._oAuthHandler&&"true"===this._storage.getItem("amplify-signin-with-hostedUI"),[2,new Promise((function(n,o){if(e&&e.global){K.debug("user global sign out",t);var s=r._config.clientMetadata;t.getSession((function(e,s){if(e)return K.debug("failed to get the user session",e),o(e);t.globalSignOut({onSuccess:function(e){if(K.debug("global sign out success"),!i)return n();r.oAuthSignOutRedirect(n,o)},onFailure:function(e){return K.debug("global sign out failed",e),o(e)}})}),{clientMetadata:s})}else{if(K.debug("user sign out",t),t.signOut(),!i)return n();r.oAuthSignOutRedirect(n,o)}}))]}}))}))},e.prototype.oAuthSignOutRedirect=function(e,t){var n=l["a"].browserOrNode().isBrowser;n?this.oAuthSignOutRedirectOrReject(t):this.oAuthSignOutAndResolve(e)},e.prototype.oAuthSignOutAndResolve=function(e){this._oAuthHandler.signOut(),e()},e.prototype.oAuthSignOutRedirectOrReject=function(e){this._oAuthHandler.signOut(),setTimeout((function(){return e("Signout timeout fail")}),3e3)},e.prototype.signOut=function(e){return H(this,void 0,void 0,(function(){var t;return V(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.cleanCachedItems()];case 1:return n.sent(),[3,3];case 2:return n.sent(),K.debug("failed to clear cached items"),[3,3];case 3:return this.userPool?(t=this.userPool.getCurrentUser(),t?[4,this.cognitoIdentitySignOut(e,t)]:[3,5]):[3,7];case 4:return n.sent(),[3,6];case 5:K.debug("no current Cognito user"),n.label=6;case 6:return[3,8];case 7:K.debug("no Congito User pool"),n.label=8;case 8:return J("signOut",this.user,"A user has been signed out"),this.user=null,[2]}}))}))},e.prototype.cleanCachedItems=function(){return H(this,void 0,void 0,(function(){return V(this,(function(e){switch(e.label){case 0:return[4,this.Credentials.clear()];case 1:return e.sent(),[2]}}))}))},e.prototype.changePassword=function(e,t,n,i){var r=this;return void 0===i&&(i=this._config.clientMetadata),new Promise((function(o,s){r.userSession(e).then((function(r){e.changePassword(t,n,(function(e,t){return e?(K.debug("change password failure",e),s(e)):o(t)}),i)}))}))},e.prototype.forgotPassword=function(e,t){if(void 0===t&&(t=this._config.clientMetadata),!this.userPool)return this.rejectNoUserPool();if(!e)return this.rejectAuthError(i["a"].EmptyUsername);var n=this.createCognitoUser(e);return new Promise((function(i,r){n.forgotPassword({onSuccess:function(){i()},onFailure:function(t){K.debug("forgot password failure",t),J("forgotPassword_failure",t,e+" forgotPassword failed"),r(t)},inputVerificationCode:function(t){J("forgotPassword",n,e+" has initiated forgot password flow"),i(t)}},t)}))},e.prototype.forgotPasswordSubmit=function(e,t,n,r){if(void 0===r&&(r=this._config.clientMetadata),!this.userPool)return this.rejectNoUserPool();if(!e)return this.rejectAuthError(i["a"].EmptyUsername);if(!t)return this.rejectAuthError(i["a"].EmptyCode);if(!n)return this.rejectAuthError(i["a"].EmptyPassword);var o=this.createCognitoUser(e);return new Promise((function(i,s){o.confirmPassword(t,n,{onSuccess:function(){J("forgotPasswordSubmit",o,e+" forgotPasswordSubmit successful"),i()},onFailure:function(t){J("forgotPasswordSubmit_failure",t,e+" forgotPasswordSubmit failed"),s(t)}},r)}))},e.prototype.currentUserInfo=function(){return H(this,void 0,void 0,(function(){var e,t,n,i,r,o,s,a;return V(this,(function(c){switch(c.label){case 0:return e=this.Credentials.getCredSource(),e&&"aws"!==e&&"userPool"!==e?[3,9]:[4,this.currentUserPoolUser().catch((function(e){return K.debug(e)}))];case 1:if(a=c.sent(),!a)return[2,null];c.label=2;case 2:return c.trys.push([2,8,,9]),[4,this.userAttributes(a)];case 3:t=c.sent(),n=this.attributesToObject(t),i=null,c.label=4;case 4:return c.trys.push([4,6,,7]),[4,this.currentCredentials()];case 5:return i=c.sent(),[3,7];case 6:return r=c.sent(),K.debug("Failed to retrieve credentials while getting current user info",r),[3,7];case 7:return o={id:i?i.identityId:void 0,username:a.getUsername(),attributes:n},[2,o];case 8:return s=c.sent(),K.debug("currentUserInfo error",s),[2,{}];case 9:return"federated"===e?(a=this.user,[2,a||{}]):[2]}}))}))},e.prototype.federatedSignIn=function(e,t,n){return H(this,void 0,void 0,(function(){var r,o,s,a,c,l,u,d,h,p,f;return V(this,(function(g){switch(g.label){case 0:if(!this._config.identityPoolId&&!this._config.userPoolId)throw new Error("Federation requires either a User Pool or Identity Pool in config");if("undefined"===typeof e&&this._config.identityPoolId&&!this._config.userPoolId)throw new Error("Federation with Identity Pools requires tokens passed as arguments");return Object(i["e"])(e)||Object(i["f"])(e)||Object(i["c"])(e)||"undefined"===typeof e?(r=e||{provider:i["b"].Cognito},c=Object(i["e"])(r)?r.provider:r.customProvider,Object(i["e"])(r),o=r.customState,this._config.userPoolId&&(s=Object(i["d"])(this._config.oauth)?this._config.userPoolWebClientId:this._config.oauth.clientID,a=Object(i["d"])(this._config.oauth)?this._config.oauth.redirectSignIn:this._config.oauth.redirectUri,this._oAuthHandler.oauthSignIn(this._config.oauth.responseType,this._config.oauth.domain,a,s,c,o)),[3,4]):[3,1];case 1:c=e;try{l=JSON.stringify(JSON.parse(this._storage.getItem("aws-amplify-federatedInfo")).user),l&&K.warn("There is already a signed in user: "+l+" in your app.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tYou should not call Auth.federatedSignIn method again as it may cause unexpected behavior.")}catch(m){}return u=t.token,d=t.identity_id,h=t.expires_at,[4,this.Credentials.set({provider:c,token:u,identity_id:d,user:n,expires_at:h},"federation")];case 2:return p=g.sent(),[4,this.currentAuthenticatedUser()];case 3:return f=g.sent(),J("signIn",f,"A user "+f.username+" has been signed in"),K.debug("federated sign in credentials",p),[2,p];case 4:return[2]}}))}))},e.prototype._handleAuthResponse=function(e){return H(this,void 0,void 0,(function(){var t,n,i,r,o,s,a,c,u,d,h,p,g,b;return V(this,(function(v){switch(v.label){case 0:if(this.oAuthFlowInProgress)return K.debug("Skipping URL "+e+" current flow in progress"),[2];v.label=1;case 1:if(v.trys.push([1,,8,9]),this.oAuthFlowInProgress=!0,!this._config.userPoolId)throw new Error("OAuth responses require a User Pool defined in config");if(J("parsingCallbackUrl",{url:e},"The callback url is being parsed"),t=e||(l["a"].browserOrNode().isBrowser?window.location.href:""),n=!!(Object(y["parse"])(t).query||"").split("&").map((function(e){return e.split("=")})).find((function(e){var t=G(e,1),n=t[0];return"code"===n||"error"===n})),i=!!(Object(y["parse"])(t).hash||"#").substr(1).split("&").map((function(e){return e.split("=")})).find((function(e){var t=G(e,1),n=t[0];return"access_token"===n||"error"===n})),!n&&!i)return[3,7];this._storage.setItem("amplify-redirected-from-hosted-ui","true"),v.label=2;case 2:return v.trys.push([2,6,,7]),[4,this._oAuthHandler.handleAuthResponse(t)];case 3:return r=v.sent(),o=r.accessToken,s=r.idToken,a=r.refreshToken,c=r.state,u=new m["h"]({IdToken:new m["c"]({IdToken:s}),RefreshToken:new m["d"]({RefreshToken:a}),AccessToken:new m["b"]({AccessToken:o})}),d=void 0,this._config.identityPoolId?[4,this.Credentials.set(u,"session")]:[3,5];case 4:d=v.sent(),K.debug("AWS credentials",d),v.label=5;case 5:return h=/-/.test(c),p=this.createCognitoUser(u.getIdToken().decodePayload()["cognito:username"]),p.setSignInUserSession(u),window&&"undefined"!==typeof window.history&&window.history.replaceState({},null,this._config.oauth.redirectSignIn),J("signIn",p,"A user "+p.getUsername()+" has been signed in"),J("cognitoHostedUI",p,"A user "+p.getUsername()+" has been signed in via Cognito Hosted UI"),h&&(g=c.split("-").splice(1).join("-"),J("customOAuthState",f(g),"State for user "+p.getUsername())),[2,d];case 6:return b=v.sent(),K.debug("Error in cognito hosted auth response",b),J("signIn_failure",b,"The OAuth response flow failed"),J("cognitoHostedUI_failure",b,"A failure occurred when returning to the Cognito Hosted UI"),J("customState_failure",b,"A failure occurred when returning state"),[3,7];case 7:return[3,9];case 8:return this.oAuthFlowInProgress=!1,[7];case 9:return[2]}}))}))},e.prototype.essentialCredentials=function(e){return{accessKeyId:e.accessKeyId,sessionToken:e.sessionToken,secretAccessKey:e.secretAccessKey,identityId:e.identityId,authenticated:e.authenticated}},e.prototype.attributesToObject=function(e){var t=this,n={};return e&&e.map((function(e){"email_verified"===e.Name||"phone_number_verified"===e.Name?n[e.Name]=t.isTruthyString(e.Value)||!0===e.Value:n[e.Name]=e.Value})),n},e.prototype.isTruthyString=function(e){return"function"===typeof e.toLowerCase&&"true"===e.toLowerCase()},e.prototype.createCognitoUser=function(e){var t={Username:e,Pool:this.userPool};t.Storage=this._storage;var n=this._config.authenticationFlowType,i=new m["e"](t);return n&&i.setAuthenticationFlowType(n),i},e.prototype._isValidAuthStorage=function(e){return!!e&&"function"===typeof e.getItem&&"function"===typeof e.setItem&&"function"===typeof e.removeItem&&"function"===typeof e.clear},e.prototype.noUserPoolErrorHandler=function(e){return!e||e.userPoolId&&e.identityPoolId?i["a"].NoConfig:i["a"].MissingAuthConfig},e.prototype.rejectAuthError=function(e){return Promise.reject(new D(e))},e.prototype.rejectNoUserPool=function(){var e=this.noUserPoolErrorHandler(this._config);return Promise.reject(new z(e))},e}(),ee=new X(null);g["a"].register(ee)},c221:function(e,t,n){"use strict";function i(e){if(!Array.from){var t=new Uint32Array(e.length),n=0;while(n<e.length)t[n]=e[n];return t}return Uint32Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=void 0,t.uint32ArrayFrom=i},c42c:function(e,t,n){"use strict";n("fb04")},c562:function(e,t,n){"use strict";n.r(t),n.d(t,"fromUtf8",(function(){return a})),n.d(t,"toUtf8",(function(){return c}));var i=function(e){for(var t=[],n=0,i=e.length;n<i;n++){var r=e.charCodeAt(n);if(r<128)t.push(r);else if(r<2048)t.push(r>>6|192,63&r|128);else if(n+1<e.length&&55296===(64512&r)&&56320===(64512&e.charCodeAt(n+1))){var o=65536+((1023&r)<<10)+(1023&e.charCodeAt(++n));t.push(o>>18|240,o>>12&63|128,o>>6&63|128,63&o|128)}else t.push(r>>12|224,r>>6&63|128,63&r|128)}return Uint8Array.from(t)},r=function(e){for(var t="",n=0,i=e.length;n<i;n++){var r=e[n];if(r<128)t+=String.fromCharCode(r);else if(192<=r&&r<224){var o=e[++n];t+=String.fromCharCode((31&r)<<6|63&o)}else if(240<=r&&r<365){var s=[r,e[++n],e[++n],e[++n]],a="%"+s.map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(a)}else t+=String.fromCharCode((15&r)<<12|(63&e[++n])<<6|63&e[++n])}return t};function o(e){return(new TextEncoder).encode(e)}function s(e){return new TextDecoder("utf-8").decode(e)}var a=function(e){return"function"===typeof TextEncoder?o(e):i(e)},c=function(e){return"function"===typeof TextDecoder?s(e):r(e)}},c717:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n("9ab4");i.__exportStar(n("8ded"),t)},cd6f:function(e,t,n){"use strict";function i(e){return"string"===typeof e?0===e.length:0===e.byteLength}Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=i},ce18:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={props:["resizeBus"],data:function(){return{_actualResizeBus:null}},created:function(){"undefined"===typeof this.resizeBus?this.$data._actualResizeBus=this.$gmapDefaultResizeBus:this.$data._actualResizeBus=this.resizeBus},methods:{_resizeCallback:function(){this.resize()},_delayedResizeCallback:function(){var e=this;this.$nextTick((function(){return e._resizeCallback()}))}},watch:{resizeBus:function(e){this.$data._actualResizeBus=e},"$data._actualResizeBus":function(e,t){t&&t.$off("resize",this._delayedResizeCallback),e&&e.$on("resize",this._delayedResizeCallback)}},destroyed:function(){this.$data._actualResizeBus&&this.$data._actualResizeBus.$off("resize",this._delayedResizeCallback)}}},d092:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},r=n("7a03"),o=f(r),s=n("2adb"),a=n("ce18"),c=f(a),l=n("5836"),u=f(l),d=n("034d"),h=f(d),p=n("b7d9");function f(e){return e&&e.__esModule?e:{default:e}}var g={center:{required:!0,twoWay:!0,type:Object,noBind:!0},zoom:{required:!1,twoWay:!0,type:Number,noBind:!0},heading:{type:Number,twoWay:!0},mapTypeId:{twoWay:!0,type:String},tilt:{twoWay:!0,type:Number},options:{type:Object,default:function(){return{}}}},m=["bounds_changed","click","dblclick","drag","dragend","dragstart","idle","mousemove","mouseout","mouseover","resize","rightclick","tilesloaded"],y=["panBy","panTo","panToBounds","fitBounds"].reduce((function(e,t){return e[t]=function(){this.$mapObject&&this.$mapObject[t].apply(this.$mapObject,arguments)},e}),{}),b={resize:function(){this.$mapObject&&google.maps.event.trigger(this.$mapObject,"resize")},resizePreserveCenter:function(){if(this.$mapObject){var e=this.$mapObject.getCenter();google.maps.event.trigger(this.$mapObject,"resize"),this.$mapObject.setCenter(e)}},_resizeCallback:function(){this.resizePreserveCenter()}};t.default={mixins:[c.default],props:(0,p.mappedPropsToVueProps)(g),provide:function(){var e=this;return this.$mapPromise=new Promise((function(t,n){e.$mapPromiseDeferred={resolve:t,reject:n}})),{$mapPromise:this.$mapPromise}},computed:{finalLat:function(){return this.center&&"function"===typeof this.center.lat?this.center.lat():this.center.lat},finalLng:function(){return this.center&&"function"===typeof this.center.lng?this.center.lng():this.center.lng},finalLatLng:function(){return{lat:this.finalLat,lng:this.finalLng}}},watch:{zoom:function(e){this.$mapObject&&this.$mapObject.setZoom(e)}},mounted:function(){var e=this;return this.$gmapApiPromiseLazy().then((function(){var t=e.$refs["vue-map"],n=i({},e.options,(0,s.getPropsValues)(e,g));return delete n.options,e.$mapObject=new google.maps.Map(t,n),(0,s.bindProps)(e,e.$mapObject,g),(0,o.default)(e,e.$mapObject,m),(0,u.default)((function(t,n,i){e.$mapObject.addListener("center_changed",(function(){i()&&e.$emit("center_changed",e.$mapObject.getCenter()),n()})),(0,h.default)(e,["finalLat","finalLng"],(function(){t(),e.$mapObject.setCenter(e.finalLatLng)}))})),e.$mapObject.addListener("zoom_changed",(function(){e.$emit("zoom_changed",e.$mapObject.getZoom())})),e.$mapObject.addListener("bounds_changed",(function(){e.$emit("bounds_changed",e.$mapObject.getBounds())})),e.$mapPromiseDeferred.resolve(e.$mapObject),e.$mapObject})).catch((function(e){throw e}))},methods:i({},b,y)}},d355:function(e,t,n){"use strict";n("7c67")},d75b:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n("b7d9"),r=o(i);function o(e){return e&&e.__esModule?e:{default:e}}var s={bounds:{type:Object,twoWay:!0},draggable:{type:Boolean,default:!1},editable:{type:Boolean,default:!1},options:{type:Object,twoWay:!1}},a=["click","dblclick","drag","dragend","dragstart","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"];t.default=(0,r.default)({mappedProps:s,name:"rectangle",ctr:function(){return google.maps.Rectangle},events:a})},d847:function(e,t,n){"use strict";var i=n("2b0e"),r=n("b7fa"),o=n("87e8"),s=n("e277");const a={role:"toolbar"};t["a"]=i["default"].extend({name:"QBar",mixins:[o["a"],r["a"]],props:{dense:Boolean},computed:{classes(){return`q-bar--${!0===this.dense?"dense":"standard"} q-bar--`+(!0===this.isDark?"dark":"light")}},render(e){return e("div",{staticClass:"q-bar row no-wrap items-center",class:this.classes,attrs:a,on:{...this.qListeners}},Object(s["c"])(this,"default"))}})},d8bc:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i={},r=function(){function e(){}return e.setItem=function(e,t){return i[e]=t,i[e]},e.getItem=function(e){return Object.prototype.hasOwnProperty.call(i,e)?i[e]:void 0},e.removeItem=function(e){return delete i[e]},e.clear=function(){return i={},i},e}(),o=function(){function e(){try{this.storageWindow=window.localStorage,this.storageWindow.setItem("aws.amplify.test-ls",1),this.storageWindow.removeItem("aws.amplify.test-ls")}catch(e){this.storageWindow=r}}return e.prototype.getStorage=function(){return this.storageWindow},e}()},dbbb:function(e,t,n){"use strict";n("23e2")},e076:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawSha256=void 0;var i=n("5b94"),r=function(){function e(){this.state=Int32Array.from(i.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,n=e.byteLength;if(this.bytesHashed+=n,8*this.bytesHashed>i.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");while(n>0)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===i.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(t.setUint8(this.bufferLength++,128),n%i.BLOCK_SIZE>=i.BLOCK_SIZE-8){for(var r=this.bufferLength;r<i.BLOCK_SIZE;r++)t.setUint8(r,0);this.hashBuffer(),this.bufferLength=0}for(r=this.bufferLength;r<i.BLOCK_SIZE-8;r++)t.setUint8(r,0);t.setUint32(i.BLOCK_SIZE-8,Math.floor(e/4294967296),!0),t.setUint32(i.BLOCK_SIZE-4,e),this.hashBuffer(),this.finished=!0}var o=new Uint8Array(i.DIGEST_LENGTH);for(r=0;r<8;r++)o[4*r]=this.state[r]>>>24&255,o[4*r+1]=this.state[r]>>>16&255,o[4*r+2]=this.state[r]>>>8&255,o[4*r+3]=this.state[r]>>>0&255;return o},e.prototype.hashBuffer=function(){for(var e=this,t=e.buffer,n=e.state,r=n[0],o=n[1],s=n[2],a=n[3],c=n[4],l=n[5],u=n[6],d=n[7],h=0;h<i.BLOCK_SIZE;h++){if(h<16)this.temp[h]=(255&t[4*h])<<24|(255&t[4*h+1])<<16|(255&t[4*h+2])<<8|255&t[4*h+3];else{var p=this.temp[h-2],f=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10;p=this.temp[h-15];var g=(p>>>7|p<<25)^(p>>>18|p<<14)^p>>>3;this.temp[h]=(f+this.temp[h-7]|0)+(g+this.temp[h-16]|0)}var m=(((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))+(c&l^~c&u)|0)+(d+(i.KEY[h]+this.temp[h]|0)|0)|0,y=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&o^r&s^o&s)|0;d=u,u=l,l=c,c=a+m|0,a=s,s=o,o=r,r=m+y|0}n[0]+=r,n[1]+=o,n[2]+=s,n[3]+=a,n[4]+=c,n[5]+=l,n[6]+=u,n[7]+=d},e}();t.RawSha256=r},e2b6:function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e._self._c;return t("div",{staticClass:"row justify-center"},[t("h1",{staticStyle:{display:"none"}},[e._v("Suppliers")]),e.$q.screen.lt.sm&&e.showHeader?t("TitleBar",{attrs:{"center-slot":"Suppliers"}}):e._e(),e.$q.screen.gt.xs&&e.showHeader?t("TileBar",{staticClass:"col-12 col-sm-10 col-md-9",attrs:{optionButton:"Back"},on:{"on-button":function(t){return e.$router.go(-1)}}}):e._e(),t("div",{staticClass:"col-12 col-sm-10 col-md-9 q-px-sm"},[t("Markdown",{staticClass:"suppliers-text",attrs:{data:e.newMd}})],1)],1)},r=[],o=(n("ddb0"),n("5319"),n("e6e0")),s="#### Become A Supplier to Villa Market\n\nIf you are interested in becoming a Villa Market supplier partner, please follow these steps:\n1.\tJoin our Line Supplier community by scanning the QR code below in the Line App (<https://line.me/en/>)\n2.\tRegister as a new supplier (enter supplier code as 0 when asked) \n3.\tAdd your products under the menu option – please ensure you include a good picture of your product(s) and as much as information as you can to enable our buying team to make an informed decision.\n\n\n\n**About Villa Market** \nVilla Market is Thailand’s original international supermarket, serving our customers since 1974, with our original location on Sukhumvit Road, near Soi 33, still operating today.\n\nOur tagline is “World of Foods†as we understand the importance of having the best local and international brands available to satisfy our customers daily needs. We’re always on the lookout for new & innovative products to ensure our product range adapts with the times.\n\n\x3c!--  --\x3e\n\n\nWe currently have 33 stores across Thailand including Bangkok, Phuket, Pattaya, Hua Hin & Udon Thani. All our stores are supplied from our distribution center at Latkrabang multiple times per week. Our distribution center can handle ambient, chilled, fresh & frozen products. We also work with suppliers on a direct-to-store basis where that is more appropriate. \n\n**Why Partner With Us?** \nWe are committed to delivering the best in convenience, value, and quality for our customers. \n\nPartnering with Villa Market means putting our customers at the heart of every decision we make to ensure they continue to have access to new and existing products they love, exciting in-store experiences and friendly, efficient service.\n\n\n\nOur supplier partnerships are important to us, and it is our intention to work in a collaborative and fair manner.\n\nOur supplier partners are also able to access our online supplier portal which provides all the information and tools required to grow your business with Villa Market. These include:\n- Sales reports\n- Inventory reports\n- Product maintenance\n- Price changes\n- Promotion management\n- Image uploads\n- And more.\n\n\n\n**What Are We Looking For In A New Product?** \nWe seek products that meet the following criteria:\n- Satisfy customer needs\n- Are on-trend – eg, health, sustainability, food safety, etc\n- Are unique and not simply copying existing products\n\nWe also expect that our supplier partners will work with us to develop marketing & sales campaigns to give the products the best possible chance for success. \n\n**Some Important Points to Know:** \n- All food items will require FDA registration before we can sell them in our stores\n- All food items must have an expiry date\n- We would prefer it if your item had a barcode printed on the pack in a clear location that is easily scanned by our cashiers. If you don’t have a barcode on your pack that’s ok, we can work with you using barcode stickers. \n\nPlease feel free to email us at <commercial@villamarket.com> with any questions or comments?",a={name:"Suppliers",components:{Markdown:o["a"],TitleBar:()=>n.e("signin~31ecd969").then(n.bind(null,"1e1d")),TileBar:()=>n.e("chunk-vendors~cfbf0a2e").then(n.bind(null,"7112"))},data(){return{md:s,image1:n("c352"),image2:n("c97e"),image3:n("ec9d"),image4:n("63da")}},computed:{newMd(){return this.md.replace("${image1}",this.image1).replace("${image2}",this.image2).replace("${image3}",this.image3).replace("${image4}",this.image4)},showHeader(){var e;const t=null===(e=this.$route.query)||void 0===e?void 0:e.raw;return"true"!==t}},metaInfo(){return{title:"Suppliers | Villa Market - Thailand's Original International Supermarket",meta:[{name:"description",content:"Villa Market suppliers."},{property:"og:title",content:"Suppliers | Villa Market - Thailand's Original International Supermarket"},{property:"og:site_name",content:"Villa Market"},{property:"og:type",content:"website"},{name:"robots",content:"index,follow"}]}}},c=a,l=(n("2e58"),n("2877")),u=Object(l["a"])(c,i,r,!1,null,"65b4dd1c",null);t["default"]=u.exports},e526:function(e,t,n){},e6e0:function(e,t,n){"use strict";var i=function(){var e=this,t=e._self._c;return t("div",[t("div",{domProps:{innerHTML:e._s(e.compiledMarkdown)}})])},r=[],o=n("0e54"),s=n.n(o),a={props:["data"],data(){return{option:{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}},mounted(){},computed:{compiledMarkdown:function(){return s()(this.data,this.option)}}},c=a,l=(n("95b6"),n("2877")),u=Object(l["a"])(c,i,r,!1,null,null,null);t["a"]=u.exports},e90e:function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e._self._c;return t("div",{staticClass:"row justify-center",staticStyle:{"padding-bottom":"120px"}},[e.$q.screen.lt.sm?t("TitleBar",{attrs:{"center-slot":"Profile"}}):e._e(),e.$q.screen.gt.xs?t("TileBar",{attrs:{optionButton:e.$t("Back")},on:{"on-button":function(t){return e.$router.go(-1)}}}):e._e(),t("TileBar",{staticClass:"q-mt-sm",attrs:{title:e.$t("Your Personal Info"),optionButton:e.canEditProfile?e.$t("Save"):e.$t("Edit")},on:{"on-button":function(t){e.canEditProfile?e.onSaveProfile():e.onEditProfile()}}}),t("div",{staticClass:"col-12 col-sm-10 col-md-9 bg-white row",staticStyle:{padding:"6px 16px",position:"relative"}},[t("div",{staticClass:"full-width row"},[t("div",{staticClass:"col-3 text-right q-mt-sm",staticStyle:{display:"flex","align-items":"center","margin-bottom":"20px"}},[e._v(" "+e._s(e.$t("First name"))+" ")]),e.canEditProfile?t("q-input",{staticClass:"col-xs-9 col-sm-4 q-mt-sm",attrs:{outlined:"",dense:"",placeholder:"Enter first name","lazy-rules":"",rules:[e=>e&&e.length>0||"Please enter first name"],autogrow:""},model:{value:e.firstName,callback:function(t){e.firstName=t},expression:"firstName"}}):t("div",{staticClass:"col-xs-9 col-sm-4 q-mt-sm",staticStyle:{"font-weight":"bold"}},[e._v(" "+e._s(e.firstName)+" ")])],1),t("div",{staticClass:"full-width row"},[t("div",{staticClass:"col-3 text-right q-mt-sm",staticStyle:{display:"flex","align-items":"center","margin-bottom":"20px"}},[e._v(" "+e._s(e.$t("Last name"))+" ")]),e.canEditProfile?t("q-input",{staticClass:"col-xs-9 col-sm-4 q-mt-sm",attrs:{outlined:"",dense:"",placeholder:"Enter last name","lazy-rules":"",rules:[e=>e&&e.length>0||"Please enter last name"],autogrow:""},model:{value:e.lastName,callback:function(t){e.lastName=t},expression:"lastName"}}):t("div",{staticClass:"col-xs-9 col-sm-4 q-mt-sm",staticStyle:{"font-weight":"bold"}},[e._v(" "+e._s(0===e.lastName.length?"-":e.lastName)+" ")])],1),t("q-inner-loading",{attrs:{showing:e.userInfoLoading}},[t("q-spinner",{attrs:{size:"50px",color:"primary"}})],1)],1),t("TileBar",{staticClass:"q-mt-sm",attrs:{title:e.$t("Email Address"),optionText:e.email_verified?e.$t("Verified"):void 0,optionButton:e.email_verified?void 0:e.$t("Verify"),optionTextClass:"text-green-5"},on:{"on-button":e.onVerifyEmail}}),t("div",{staticClass:"col-12 col-sm-10 col-md-9 bg-white row",staticStyle:{padding:"6px 16px",position:"relative"}},[t("div",[e._v(" "+e._s(e.email||e.$t("No email"))+" ")])]),t("TileBar",{staticClass:"q-mt-sm",attrs:{title:e.$t("Phone Number"),optionTextClass:"text-green-5",optionText:e.phone_number_verified&&""!==e.phone_number?e.$t("Verified"):void 0}},[!e.phone_number_verified||""===e.phone_number||void 0?t("q-btn",{staticClass:"q-ma-sm",staticStyle:{"font-weight":"bold"},attrs:{"no-caps":"","no-wrap":"",size:"11.5px",color:"primary"},on:{click:e.onVerifyPhoneNumber}},[e._v(" "+e._s(e.$t("Verify to connect Vplus"))+" ")]):e._e()],1),t("div",{staticClass:"col-12 col-sm-10 col-md-9 bg-white row",staticStyle:{padding:"6px 16px",position:"relative"}},[t("div",[e._v(" "+e._s(e.phone_number||e.$t("No phone number"))+" ")])]),t("TileBar",{staticClass:"q-mt-sm",attrs:{title:e.$t("Shipping Address"),optionButton:e.$t("Add")},on:{"on-button":e.onAddAddress}}),t("div",{staticClass:"col-12 col-sm-10 col-md-9 bg-white row",staticStyle:{padding:"6px 16px",position:"relative"}},[e.formatedShippingAddressList.length<=0?t("div",[e._v(" "+e._s(e.$t("You have no saved shipping address."))+" ")]):e._e(),t("q-list",{staticClass:"col-12",attrs:{dense:""}},e._l(e.formatedShippingAddressList,(function(n,i){return t("q-item",{key:i,attrs:{tag:"label"}},[t("q-item-section",{attrs:{avatar:""}},[t("q-radio",{attrs:{val:n.id,color:"primary"},model:{value:e.selectedAddressIndex,callback:function(t){e.selectedAddressIndex=t},expression:"selectedAddressIndex"}})],1),t("q-item-section",[t("q-item-label",[e._v(e._s(n.name))]),t("q-item-label",{attrs:{caption:"",lines:"2"}},[e._v(e._s(n.formatedAddress))])],1),t("q-item-section",{attrs:{avatar:""}},[t("q-btn",{attrs:{flat:"",icon:"fas fa-times"},on:{click:function(t){return e.onRemoveAddress(i)}}})],1)],1)})),1),t("q-inner-loading",{attrs:{showing:e.addressLoading}},[t("q-spinner",{attrs:{size:"50px",color:"primary"}})],1)],1),t("TileBar",{staticClass:"q-mt-sm",attrs:{title:e.$t("Vplus Member")}}),t("div",{staticClass:"col-12 col-sm-10 col-md-9 bg-white row",staticStyle:{padding:"6px 16px",position:"relative"}},[t("div",{staticClass:"full-width row"},[t("div",{staticClass:"col-5 text-right q-mt-sm",staticStyle:{display:"flex","align-items":"center","margin-bottom":"20px"}},[e._v(" "+e._s(e.$t("Vplus Member ID"))+" ")]),e.canEditWallet?t("q-input",{staticClass:"col-xs-7 col-sm-6 q-mt-sm",attrs:{outlined:"",dense:"",placeholder:e.$t("Enter Vplus Member ID"),"lazy-rules":"",rules:[t=>t&&t.length>0||e.$t("Please enter Vplus Member ID")],autogrow:""},model:{value:e.vplusMemberID,callback:function(t){e.vplusMemberID=t},expression:"vplusMemberID"}}):t("div",{staticClass:"col-xs-7 col-sm-6 q-mt-sm",staticStyle:{"font-weight":"bold"}},[e._v(" "+e._s(e.vplusMemberID)+" ")])],1),t("div",{staticClass:"full-width row"},[t("div",{staticClass:"col-5 text-right q-mt-sm",staticStyle:{display:"flex","align-items":"center","margin-bottom":"20px"}},[e._v(" "+e._s(e.$t("Vplus Points"))+" ")]),t("div",{staticClass:"col-xs-7 col-sm-6 q-mt-sm",staticStyle:{"font-weight":"bold"}},[e._v(" "+e._s(e.vplusPoints)+" ")])]),t("q-inner-loading",{attrs:{showing:e.userInfoLoading||e.vplusLoading}},[t("q-spinner",{attrs:{size:"50px",color:"primary"}})],1)],1),t("TileBar",{staticClass:"q-mt-sm",attrs:{title:e.$t("Orders History"),optionButton:e.$t("View")},on:{"on-button":e.onViewOrdersHistory}}),t("TileBar",{staticClass:"q-mt-sm",attrs:{title:e.$t("Buy again"),optionButton:e.$t("View")},on:{"on-button":e.onViewHistoryItems}}),t("TileBar",{staticClass:"q-mt-sm",attrs:{title:e.$t("Favorite Items"),optionButton:e.$t("View")},on:{"on-button":e.onViewFavoriteItems}}),t("div",{staticClass:"sticky-bottom col-12 col-sm-10 col-md-9 bg-white"},[t("div",{staticClass:"col-12 row"},[t("q-btn",{staticClass:"col-6 col-xs-12 q-mt-sm text-white",attrs:{"no-caps":"","no-wrap":"",color:"primary","text-color":"white",label:e.$t("Change Password")},on:{click:e.onChangePassword}}),t("q-btn",{staticClass:"col-6 col-xs-12 q-mt-sm text-white",attrs:{"no-caps":"","no-wrap":"",color:"primary","text-color":"white",label:e.$t("Sign Out")},on:{click:e.onSignOut}})],1)]),t("q-dialog",{attrs:{persistent:""},model:{value:e.dialogChangePassword,callback:function(t){e.dialogChangePassword=t},expression:"dialogChangePassword"}},[t("q-card",[t("q-bar",{staticClass:"bg-primary"},[t("q-space"),t("q-btn",{staticClass:"text-white",attrs:{dense:"",flat:"",icon:"close"},on:{click:e.onCloseDialogChangePassword}})],1),t("q-card-section",[t("div",{staticClass:"text-h6 text-primary"},[e._v("Change password")])]),t("q-separator"),t("q-card-section",[t("q-form",{ref:"form",staticClass:"scroll",staticStyle:{"max-height":"50vh","min-width":"300px"}},[t("q-input",{staticClass:"q-mb-sm",attrs:{filled:"",autocomplete:"new-password",type:"password",label:"Old password"},model:{value:e.form.oldPassword,callback:function(t){e.$set(e.form,"oldPassword",t)},expression:"form.oldPassword"}}),t("q-input",{attrs:{filled:"",autocomplete:"new-password",type:"password",label:"New password","lazy-rules":"",rules:[e.CheckPassword]},model:{value:e.form.password,callback:function(t){e.$set(e.form,"password",t)},expression:"form.password"}}),t("q-input",{attrs:{filled:"",autocomplete:"new-password",type:"password",label:"Confirm password","lazy-rules":"",rules:[e=>e&&e.length>0||"You can't leave this empty.",t=>t&&t===e.form.password||"Password and Confirm password does not match"]},model:{value:e.form.newPassword,callback:function(t){e.$set(e.form,"newPassword",t)},expression:"form.newPassword"}})],1)],1),t("q-separator"),t("q-card-actions",{attrs:{align:"right"}},[t("div",{staticClass:"text-red"},[e._v(e._s(e.changePasswordError))]),t("q-btn",{attrs:{"no-wrap":"","no-caps":"",flat:"",loading:e.changePasswordLoading,label:"Confirm",color:"primary"},on:{click:e.onConfirmChangePassword}})],1)],1)],1),t("q-dialog",{attrs:{persistent:""},model:{value:e.dialogRemoveAddress.show,callback:function(t){e.$set(e.dialogRemoveAddress,"show",t)},expression:"dialogRemoveAddress.show"}},[t("DialogAlert",{attrs:{message:e.dialogRemoveAddress.message,"left-btn":e.$t("Remove"),"right-btn":e.$t("Cancel")},on:{leftClick:e.onConfirmRemoveAddress,rightClick:e.onCancelRemoveAddress}})],1),t("q-dialog",{attrs:{persistent:""},model:{value:e.promptEmail.show,callback:function(t){e.$set(e.promptEmail,"show",t)},expression:"promptEmail.show"}},[t("q-card",{staticStyle:{"min-width":"350px"}},[t("q-card-section",[t("div",{staticClass:"text-h6"},[e._v(e._s(e.$t("Verify your email")))])]),e.promptEmail.verify?t("q-card-section",{staticClass:"q-pt-none"},[t("OtpInput",{ref:"otpInput",staticClass:"justify-center",attrs:{autocomplete:"one-time-code","input-classes":"otp-input",separator:" ","num-inputs":6,"should-auto-focus":!0,"is-input-num":!0},on:{"on-change":e.promptEmailOTPOnChange,"on-complete":e.promptEmailOTPOnComplete}}),t("div",{staticClass:"text-term",staticStyle:{display:"block"}},[e._v(" "+e._s(e.$t("Did not receive the code?"))+" "),t("span",{staticClass:"set-txt-click",on:{click:e.promptEmailOnResentOTP}},[e._v(e._s(e.$t("Resend")))]),e._v(". ")])],1):t("q-card-section",{staticClass:"q-pt-none"},[t("q-input",{ref:"email",attrs:{filled:"",dense:"",label:"Email *","lazy-rules":"",rules:[e.CheckEmail]},model:{value:e.promptEmail.email,callback:function(t){e.$set(e.promptEmail,"email",t)},expression:"promptEmail.email"}})],1),t("q-card-actions",{staticClass:"text-primary",attrs:{align:"right"}},[t("q-btn",{attrs:{flat:"",label:e.$t("Cancel")},on:{click:e.onCancelPromptEmail}}),e.promptEmail.verify?t("q-btn",{attrs:{flat:"",loading:e.promptEmail.confirmLoading,label:e.$t("Confirm")},on:{click:e.onConfirmPromptEmail}}):t("q-btn",{attrs:{flat:"",loading:e.promptEmail.verifyLoading,label:e.$t("Verify")},on:{click:e.onVerifyPromptEmail}})],1)],1)],1),t("q-dialog",{attrs:{persistent:""},model:{value:e.promptPhone.show,callback:function(t){e.$set(e.promptPhone,"show",t)},expression:"promptPhone.show"}},[t("q-card",{staticStyle:{"min-width":"350px"}},[t("q-card-section",[t("div",{staticClass:"text-h6"},[e._v(e._s(e.$t("Verify your phone number")))])]),e.promptPhone.verify?t("q-card-section",{staticClass:"q-pt-none"},[t("OtpInput",{ref:"otpInput",staticClass:"justify-center",attrs:{autocomplete:"one-time-code","input-classes":"otp-input",separator:" ","num-inputs":6,"should-auto-focus":!0,"is-input-num":!0},on:{"on-change":e.promptPhoneOTPOnChange,"on-complete":e.promptPhoneOTPOnComplete}}),t("div",{staticClass:"text-term",staticStyle:{display:"block"}},[e._v(" "+e._s(e.$t("Did not receive the code?"))+" "),t("span",{staticClass:"set-txt-click",on:{click:e.promptPhoneOnResentOTP}},[e._v(e._s(e.$t("Resend")))]),e._v(". ")])],1):t("q-card-section",{staticClass:"q-pt-none"},[t("VuePhoneNumberInput",{ref:"promptPhone",staticStyle:{"margin-bottom":"20px"},attrs:{"default-country-code":"TH","preferred-countries":["TH","US","GB"],error:e.promptPhone.phoneDummyError},on:{update:e.onUpdatePromptPhone},model:{value:e.promptPhone.phoneDummy,callback:function(t){e.$set(e.promptPhone,"phoneDummy",t)},expression:"promptPhone.phoneDummy"}}),t("div",[e._v(" "+e._s(e.promptPhone.message)+" ")])],1),t("q-card-actions",{staticClass:"text-primary",attrs:{align:"right"}},[t("q-btn",{attrs:{flat:"",label:e.$t("Cancel")},on:{click:e.onCancelPromptPhone}}),e.promptPhone.verify?t("q-btn",{attrs:{flat:"",loading:e.promptPhone.confirmLoading,label:e.$t("Confirm")},on:{click:e.onConfirmPromptPhone}}):t("q-btn",{attrs:{flat:"",loading:e.promptPhone.verifyLoading,label:e.$t("Verify")},on:{click:e.onVerifyPromptPhone}})],1)],1)],1),t("q-dialog",{attrs:{persistent:"",maximized:e.isMobile},model:{value:e.addAddressDialog,callback:function(t){e.addAddressDialog=t},expression:"addAddressDialog"}},[t("AddAddressDialog",{on:{close:function(t){e.addAddressDialog=!1}}})],1)],1)},r=[],o=(n("ddb0"),n("5319"),n("14d9"),n("202c")),s=n("2f62"),a=n("2ba5"),c=n("72d4"),l=n("90df"),u=n("7bec"),d=n.n(u),h=(n("4413"),n("cc46")),p=n.n(h),f=n("27f9"),g=n("74f7"),m=n("0d59"),y=n("429b"),b=n("7460"),v=n("1c1c"),_=n("66e5"),w=n("4074"),k=n("0170"),S=n("3786"),C=n("cb32"),x=n("24e8"),I=n("eb85"),P=n("2c91"),O=n("0378"),A=n("f09f"),T=n("a370"),E=n("4b7e"),j=n("d847"),$=n("05c0");const L={QInput:f["a"],QInnerLoading:g["a"],QSpinner:m["a"],QTabs:y["a"],QTab:b["a"],QList:v["a"],QItem:_["a"],QItemSection:w["a"],QItemLabel:k["a"],QRadio:S["a"],QAvatar:C["a"],QDialog:x["a"],QSeparator:I["a"],QSpace:P["a"],QForm:O["a"],QCard:A["a"],QCardSection:T["a"],QCardActions:E["a"],QBar:j["a"],QTooltip:$["a"]};var M={name:"ProfileV2",components:{...L,VuePhoneNumberInput:d.a,OtpInput:p.a,TitleBar:()=>n.e("signin~31ecd969").then(n.bind(null,"1e1d")),TileBar:()=>n.e("chunk-vendors~cfbf0a2e").then(n.bind(null,"7112")),DialogAlert:()=>Promise.resolve().then(n.bind(null,"bb5b")),AddAddressDialog:()=>n.e("chunk-vendors~2a42e354").then(n.bind(null,"7e93"))},mixins:[a["a"],c["a"]],data(){return{firstName:"",lastName:"-",email:"",email_verified:!1,phone_number:"",phone_number_verified:!1,canEditProfile:!1,canEditWallet:!1,userInfoLoading:!0,vplusLoading:!1,addressLoading:!0,selectedAddressIndex:-1,dialogChangePassword:!1,dialogRemoveAddress:{show:!1,message:"",index:null},form:{oldPassword:null,password:null,confirmPassword:null},changePasswordLoading:!1,changePasswordError:void 0,promptEmail:{show:!1,email:void 0,verify:!1,verifyLoading:!1,verificationCode:void 0,confirm:!1,confirmLoading:!1},promptPhone:{show:!1,phone:void 0,phoneDummy:void 0,phoneDummyError:!1,verify:!1,verifyLoading:!1,verificationCode:void 0,confirm:!1,confirmLoading:!1},addAddressDialog:!1}},computed:{...Object(s["b"])("user",["shippingAddressList"]),...Object(s["b"])("member",["vplusMemberID","vplusPoints"]),formatedShippingAddressList(){return this.shippingAddressList?this.shippingAddressList.map(e=>({...e,formatedAddress:`${e.address} ${e.subDistrict} ${e.district} ${e.province} ${e.postcode}`})):[]},isMobile(){return this.$q.screen.width<600}},watch:{selectedAddressIndex:{immediate:!1,handler:function(e){this.$store.dispatch("user/UpdateDefaultShippingAddress",e)}}},mounted(){this.addressLoading=!0,this.userInfoLoading=!0,this.loadUserData(),this.loadMember()},methods:{loadUserData(){this.loadUser().then(()=>{this.selectedAddressIndex=this.$store.getters["user/defaultShippingAddressId"]||-1;const e=this.$store.getters["user/user"];e.firstName?this.firstName=e.firstName:e.name&&(this.firstName=e.name.split(" ")[0]),e.lastName?this.lastName=e.lastName:e.name&&(this.lastName=e.name.split(" ")[1]||"-"),e.email&&(this.email=e.email),e.email_verified&&(this.email_verified=e.email_verified),e.phone_number&&(this.phone_number=e.phone_number),e.phone_number_verified&&(this.phone_number_verified=e.phone_number_verified)}).finally(()=>{this.userInfoLoading=!1,this.addressLoading=!1})},CheckEmail(e){return Object(l["a"])(e)},onEditProfile(){this.canEditProfile=!this.canEditProfile},async onSaveProfile(){this.userInfoLoading=!0,await this.$store.dispatch("user/UpdateUserInfo",{firstName:this.firstName,lastName:this.lastName}),this.userInfoLoading=!1,this.canEditProfile=!this.canEditProfile},onAddAddress(){this.addAddressDialog=!0},onEditWallet(){this.canEditWallet=!this.canEditWallet},onVerifyEmail(){this.promptEmail.show=!this.promptEmail.show,this.promptEmail.email=this.email},onUpdatePromptEmail(e){this.promptEmail.email=e},onCancelPromptEmail(){this.promptEmail.show=!this.promptEmail.show,this.promptEmail.email=void 0,this.promptEmail.confirm=!1,this.promptEmail.verify=!1,this.promptEmail.message=void 0},async promptEmailOnResentOTP(){await this.$store.dispatch("authentication/VerifyEmail")},async onVerifyPromptEmail(){try{this.promptEmail.verifyLoading=!0;const e=this.$refs["email"].validate();if(e){let e;e=await this.$store.dispatch("authentication/UpdateEmail",this.promptEmail.email),this.promptEmail.verify=!0}}catch(e){this.promptEmail.message=e.message}finally{this.promptEmail.verifyLoading=!1}},promptEmailOTPOnChange(){},promptEmailOTPOnComplete(e){this.promptEmail.verificationCode=e},async onConfirmPromptEmail(){try{this.promptEmail.confirmLoading=!0;await this.$store.dispatch("authentication/VerifyEmailSubmit",this.promptEmail.verificationCode);const e=await this.$store.dispatch("authentication/GetAttributes");e&&e.attributes&&e.attributes.email_verified&&await this.$store.dispatch("user/UpdateUserInfo",{email:e.attributes.email,email_verified:e.attributes.email_verified}),await this.loadUserData(),this.promptEmail.show=!this.promptEmail.show,this.promptEmail.verify=!1,this.promptEmail.message=void 0}catch(e){}finally{this.promptEmail.confirmLoading=!1}},onVerifyPhoneNumber(){this.promptPhone.show=!this.promptPhone.show,this.promptPhone.phoneDummy=this.phone_number},onUpdatePromptPhone(e){this.promptPhone.phone=e.formattedNumber,e.isValid&&(this.promptPhone.phoneDummyError=!1)},onCancelPromptPhone(){this.promptPhone.show=!this.promptPhone.show,this.promptPhone.confirm=!1,this.promptPhone.phoneDummyError=!1,this.promptPhone.phoneDummy=void 0,this.promptPhone.verify=!1,this.promptPhone.message=void 0},async promptPhoneOnResentOTP(){await this.$store.dispatch("authentication/VerifyPhoneNumber")},async onVerifyPromptPhone(){try{if(this.promptPhone.verifyLoading=!0,!this.promptPhone.phoneDummyError){let e;e=await this.$store.dispatch("authentication/UpdatePhoneNumber",this.promptPhone.phone),this.promptPhone.verify=!0}}catch(e){this.promptPhone.message=e.message}finally{this.promptPhone.verifyLoading=!1}},promptPhoneOTPOnChange(){},promptPhoneOTPOnComplete(e){this.promptPhone.verificationCode=e},async onConfirmPromptPhone(){try{this.promptPhone.confirmLoading=!0;await this.$store.dispatch("authentication/VerifyPhoneNumberSubmit",this.promptPhone.verificationCode);const e=await this.$store.dispatch("authentication/GetAttributes");e&&e.attributes&&e.attributes.phone_number_verified&&await this.$store.dispatch("user/UpdateUserInfo",{phone_number:e.attributes.phone_number,phone_number_verified:e.attributes.phone_number_verified}),await this.loadUserData(),this.promptPhone.show=!this.promptPhone.show,this.promptPhone.verify=!1,this.promptPhone.message=void 0}catch(e){}finally{this.promptPhone.confirmLoading=!1}},async onSaveWallet(){this.userInfoLoading=!0,this.$store.dispatch("user/UpdateUserInfo",{vplusMobileNumber:this.vplusMobileNumber,vplusMemberID:this.vplusMemberID}),this.userInfoLoading=!1,this.canEditWallet=!this.canEditWallet},onChangePassword(){this.dialogChangePassword=!0},async onConfirmChangePassword(){if(await this.$refs["form"].validate())try{this.changePasswordLoading=!0,await this.$store.dispatch("authentication/ChangePassword",{oldPassword:this.form.oldPassword,newPassword:this.form.password}),this.dialogChangePassword=!1}catch(e){this.changePasswordError=e.message}finally{this.changePasswordLoading=!1}},async onSignOut(){try{await this.$store.dispatch("auth/Invalidate")}catch(e){}await Promise.all([this.$store.dispatch("authentication/SignOut"),this.$store.commit("user/RESET"),this.$store.commit("cache/clear")]),window.location.replace(window.location.origin)},onRemoveAddress(e){this.dialogRemoveAddress={show:!0,message:this.$t("Do you want to remove shipping address ?"),index:e}},onConfirmRemoveAddress(){try{const e=this.dialogRemoveAddress.index,t=this.shippingAddressList[e];this.addressLoading=!0;let n=this.shippingAddressList.filter(e=>e.id!=t.id);void 0===n&&(n=[]),this.$store.dispatch("user/AddAddress",n)}catch(e){}finally{this.addressLoading=!1,this.dialogRemoveAddress={show:!1,message:"",index:null}}},onCancelRemoveAddress(){this.dialogRemoveAddress={show:!1,message:"",index:null}},onCloseDialogChangePassword(){this.dialogChangePassword=!1},CheckPassword(e){return Object(o["a"])(e)},onViewOrdersHistory(){this.$router.push("/order")},onViewHistoryItems(){this.$router.push("/profile/historyitems")},onViewFavoriteItems(){this.$router.push("/profile/favorites")}}},N=M,q=(n("5cdd"),n("4d00"),n("2877")),U=Object(q["a"])(N,i,r,!1,null,"1d3a4f4e",null);t["default"]=U.exports},e9c1:function(e,t,n){"use strict";var i=n("2b0e"),r=n("e277"),o=n("d54d");t["a"]=i["default"].extend({name:"QSlideTransition",props:{appear:Boolean,duration:{type:Number,default:300}},methods:{__begin(e,t,n){void 0!==t&&(e.style.height=t+"px"),e.style.transition=`height ${this.duration}ms cubic-bezier(.25, .8, .50, 1)`,this.animating=!0,this.done=n},__end(e,t){e.style.overflowY=null,e.style.height=null,e.style.transition=null,this.__cleanup(),t!==this.lastEvent&&this.$emit(t)},__cleanup(){this.done&&this.done(),this.done=null,this.animating=!1,clearTimeout(this.timer),clearTimeout(this.timerFallback),void 0!==this.el&&this.el.removeEventListener("transitionend",this.animListener),this.animListener=null}},beforeDestroy(){this.animating&&this.__cleanup()},render(e){return e("transition",{props:{css:!1,appear:this.appear},on:Object(o["b"])(this,"tr",{enter:(e,t)=>{let n=0;this.el=e,!0===this.animating?(this.__cleanup(),n=e.offsetHeight===e.scrollHeight?0:void 0):(this.lastEvent="hide",e.style.overflowY="hidden"),this.__begin(e,n,t),this.timer=setTimeout(()=>{e.style.height=e.scrollHeight+"px",this.animListener=t=>{Object(t)===t&&t.target!==e||this.__end(e,"show")},e.addEventListener("transitionend",this.animListener),this.timerFallback=setTimeout(this.animListener,1.1*this.duration)},100)},leave:(e,t)=>{let n;this.el=e,!0===this.animating?this.__cleanup():(this.lastEvent="show",e.style.overflowY="hidden",n=e.scrollHeight),this.__begin(e,n,t),this.timer=setTimeout(()=>{e.style.height=0,this.animListener=t=>{Object(t)===t&&t.target!==e||this.__end(e,"hide")},e.addEventListener("transitionend",this.animListener),this.timerFallback=setTimeout(this.animListener,1.1*this.duration)},100)}})},Object(r["c"])(this,"default"))}})},f4a0:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=!1,n=void 0;return function(){return t||(t=!0,n=e()),n}}},f55d:function(e,t,n){},f656:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(i=(s=a.next()).done);i=!0)if(n.push(s.value),t&&n.length===t)break}catch(c){r=!0,o=c}finally{try{!i&&a["return"]&&a["return"]()}finally{if(r)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=n("b7d9"),o=s(r);function s(e){return e&&e.__esModule?e:{default:e}}var a={draggable:{type:Boolean},editable:{type:Boolean},options:{type:Object},path:{type:Array,twoWay:!0,noBind:!0},paths:{type:Array,twoWay:!0,noBind:!0}},c=["click","dblclick","drag","dragend","dragstart","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"];t.default=(0,o.default)({props:{deepWatch:{type:Boolean,default:!1}},events:c,mappedProps:a,name:"polygon",ctr:function(){return google.maps.Polygon},beforeCreate:function(e){e.path||delete e.path,e.paths||delete e.paths},afterCreate:function(e){var t=this,n=function(){};this.$watch("paths",(function(r){if(r){n(),e.setPaths(r);for(var o=function(){t.$emit("paths_changed",e.getPaths())},s=[],a=e.getPaths(),c=0;c<a.getLength();c++){var l=a.getAt(c);s.push([l,l.addListener("insert_at",o)]),s.push([l,l.addListener("remove_at",o)]),s.push([l,l.addListener("set_at",o)])}s.push([a,a.addListener("insert_at",o)]),s.push([a,a.addListener("remove_at",o)]),s.push([a,a.addListener("set_at",o)]),n=function(){s.map((function(e){var t=i(e,2),n=(t[0],t[1]);return google.maps.event.removeListener(n)}))}}}),{deep:this.deepWatch,immediate:!0}),this.$watch("path",(function(r){if(r){n(),e.setPaths(r);var o=e.getPath(),s=[],a=function(){t.$emit("path_changed",e.getPath())};s.push([o,o.addListener("insert_at",a)]),s.push([o,o.addListener("remove_at",a)]),s.push([o,o.addListener("set_at",a)]),n=function(){s.map((function(e){var t=i(e,2),n=(t[0],t[1]);return google.maps.event.removeListener(n)}))}}}),{deep:this.deepWatch,immediate:!0})}})},f735:function(e,t,n){},f895:function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"vue-street-view-pano-container"},[t("div",{ref:"vue-street-view-pano",staticClass:"vue-street-view-pano"}),e._t("default")],2)},r=[],o=function(e){return e.default||e}(n("0a78")),s=o,a=(n("5bdf"),n("2877")),c=Object(a["a"])(s,i,r,!1,null,null,null);t["default"]=c.exports},fab4:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i="3.8.23",r="aws-amplify/"+i,o={userAgent:r+" js",product:"",navigator:null,isReactNative:!1};if("undefined"!==typeof navigator&&navigator.product)switch(o.product=navigator.product||"",o.navigator=navigator||null,navigator.product){case"ReactNative":o.userAgent=r+" react-native",o.isReactNative=!0;break;default:o.userAgent=r+" js",o.isReactNative=!1;break}var s=function(){return o.userAgent}},fb04:function(e,t,n){},fcbe:function(e,t,n){"use strict";n("34e6")},fea1:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return r}));var i=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("label",[t("span",{domProps:{textContent:e._s(e.label)}}),t("input",{ref:"input",class:e.className,attrs:{type:"text",placeholder:e.placeholder}})])},r=[]},fef1:function(e,t,n){},ff16:function(e,t,n){},ffc0:function(e,t,n){"use strict";n("f735")}}]);