1(()=>{"use strict";const t={data:function(){return{userLatLng:{lat:null,lng:null}}},created:function(){this.getLocalStorageLatLng(),this.getLocation()},methods:{getLocalStorageLatLng:function(){var t=JSON.parse(localStorage.getItem("userLatLng"))||{lat:null,lng:null};this.userLatLng=t},getLocation:function(){"geolocation"in navigator?navigator.geolocation.getCurrentPosition(this.changePosition,(function(t){console.warn("ERROR(".concat(t.code,"): ").concat(t.message))}),{enableHighAccuracy:!0,timeout:5e3,maximumAge:0}):alert("æ¨çç覽å¨ä¸æ¯æ´å®ä½åè½ï¼è«æ´æç覽å¨")},changePosition:function(t){this.userLatLng={lat:t.coords.latitude,lng:t.coords.longitude};var o=JSON.parse(localStorage.getItem("userLatLng"))||{lat:null,lng:null};o.lat==this.userLatLng.lat&&o.lng==this.userLatLng.lng||(localStorage.setItem("userLatLng",JSON.stringify(this.userLatLng)),this.reloadData())}}};function o(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,o){if(!t)return;if("string"==typeof t)return e(t,o);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return e(t,o)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function e(t,o){(null==o||o>t.length)&&(o=t.length);for(var e=0,r=new Array(o);e<o;e++)r[e]=t[e];return r}try{new Vue({el:"#store_index",data:function(){return{stores:[],eventStores:[],storeCategories:[],groups:[],isActive:!1,storePerPageCustom:[[0,1],[768,2],[1024,3],[1440,4],[1920,5]],eventStorePerPageCustom:[[0,1],[768,2],[1024,3],[1440,4],[1920,5]],groupPerPageCustom:[[0,1],[768,2],[1024,3],[1440,4],[1920,5]],scrollPerPage:!0,autoplay:!0,autoplayHoverPause:!0,paginationEnabled:!0,navigationEnabled:!0,autoplayTimeout:3e3,loop:!0,user_id:"",categoryId:"",address:"å°åè»ç«",keyword:"",weekformat:{1:"ä¸",2:"äº",3:"ä¸",4:"å",5:"äº",6:"å
",7:"æ¥"},speed:50,storeSpinner:!0,products:[],productCategories:[],productPerPage:8,productCurrentPage:1,productTotalPage:null,productCategory:null,productKeyword:null,productSortBy:null,productViewSort:null,productPriceSort:null,productTotal:null}},mixins:[t],watch:{userLatLng:function(t,o){null!=o.lat&&null!=o.lng&&(t.lat==o.lat&&t.lng==o.lng||this.getStores())},productCurrentPage:_.debounce((function(){this.getProducts()}),400),productCategory:function(t){window.location.href="/products?keyword=".concat(this.productKeyword,"&category=").concat(t)}},methods:{getStores:function(){var t=this;axios.post("/api/discount/stores",{lat:this.userLatLng.lat,lng:this.userLatLng.lng,user_id:this.user_id}).then((function(o){var e=o.data;t.stores=e.data,t.storeSpinner=!1})).catch((function(t){console.log(t)}))},getStoreCategory:function(){var t=this;axios.post("/api/store/category").then((function(o){var e=o.data;t.storeCategories=e.data})).catch((function(t){console.log(t)}))},getEventStores:function(){var t=this;axios.get("/api/carousel/event/stores").then((function(o){var e=o.data;t.eventStores=e.stores})).catch((function(t){console.log(t)}))},getGroups:function(){var t=this;axios.post("/api/groups",{page:1,prepare:20}).then((function(e){var r;(r=t.groups).push.apply(r,o(Object.values(e.data.data.data)))})).catch((function(t){console.log("query error:"+t)}))},selectCategory:function(t){t==this.categoryId?this.categoryId="":this.categoryId=t,this.getStores()},searchCategory:function(t){window.location.href="/stores?category_factors=".concat(t)},toggle:function(t){this.isActive=t.id},getAddress:function(){var t=this;axios.post("/api/get/address",{lat:this.userLatLng.lat,lng:this.userLatLng.lng}).then((function(o){var e=o.data;e.success&&(t.address=e.address)})).catch((function(t){console.log(t)}))},gotoStore:function(){window.location.href="/stores?keyword=".concat(this.keyword)},favorite:function(t,o){self=this,axios.post("/store-favorite/add",{storeID:t}).then((function(t){var e=t.data,r=e.result,n=e.message;if(-20!==r){toastr.success(n);var a=self.stores[o];a.is_favorited=!self.stores[o].is_favorited,Vue.set(self.stores,o,a)}else toastr.error(n)})).catch((function(t){console.log(t),toastr.warning("è«å
ç»å
¥")}))},numberWithCommas:function(t){if(null==t)return"";var o="number"==typeof t||"bigint"==typeof t?t:Number(t);return Number.isFinite(o)?new Intl.NumberFormat("zh-Hant-TW",{useGrouping:!0,maximumFractionDigits:20}
1).format(o):String(t)},reloadData:function(){this.getStores()},mobileCheck:function(){var t,o,e,r,n,a,i=(null===(t=(o=window).matchMedia)||void 0===t||null===(e=t.call(o,"(max-width: 768px)"))||void 0===e?void 0:e.matches)||window.innerWidth<768,s=null===(r=(n=window).matchMedia)||void 0===r||null===(a=r.call(n,"(pointer: coarse)"))||void 0===a?void 0:a.matches,c="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0;(i||s||c)&&(this.paginationEnabled=!1)},getProducts:function(){var t=this;axios.post("/api/products",{perPage:this.productPerPage,page:this.productCurrentPage,category:this.productCategory,keyword:this.productKeyword,sortBy:this.productSortBy,viewSort:this.productViewSort,priceSort:this.productPriceSort,sales_targets:["to_c"]}).then((function(o){var e=o.data;t.productTotalPage=e.products.last_page,t.products=e.products.data,t.productTotal=e.products.total})).catch((function(t){console.log(t)}))},getProductCategories:function(){var t=this;axios.get("/api/product/categories").then((function(o){var e=o.data;t.productCategories=e.productCategories})).catch((function(t){console.log(t)}))},searchProduct:function(){window.location.href="/products?keyword=".concat(this.productKeyword,"&category=").concat(this.productCategory)},changePage:function(t){this.productCurrentPage=t},prePage:function(){this.productCurrentPage-=1},nextPage:function(){this.productCurrentPage+=1},productSort:_.debounce((function(t){this.productSortBy=t,"views"==t&&(this.productViewSort="desc"==this.productViewSort?"asc":"desc"),"price"==t&&(this.productPriceSort="desc"==this.productPriceSort?"asc":"desc"),this.getProducts()}),400),initProductSort:function(){this.productSortBy=null,this.productViewSort=null,this.productPriceSort=null,this.getProducts()},add:function(t){axios.post("/cart/add",{course_hash:t}).then((function(o){var e=o.data;e.result>0?(toastr.success(e.message),window.cart.get()):(toastr.error(e.message),window.location.href="/product/redirect/".concat(t))}))}},mounted:function(){0==this.stores.length&&this.getStores()},created:function(){this.mobileCheck(),this.getEventStores(),this.getStoreCategory(),this.getGroups(),this.user_id=document.querySelector("meta[name='user_id']")?document.querySelector("meta[name='user_id']").getAttribute("content"):"",this.getProducts(),this.getProductCategories()}})}catch(t){console.log(t)}$((function(){$("#ScrolTopBtn a").click((function(){$("html,body").animate({scrollTop:0})})),$(window).scroll((function(){$(this).scrollTop()>0?$("#ScrolTopBtn").fadeIn():$("#ScrolTopBtn").fadeOut()})),$(".bottom-banner-close").click((function(){$(".bottom-banner").hide()}))}))})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.