404 Not Found


nginx/1.18.0 (Ubuntu)
=0?(w=0,T=4*-y*l):(g-2)%4==0?(w=l+4*y*l,T=l):(g-3)%4==0&&(w=-l,T=3*l+4*l*y),o&&(w=-w),c||(x=w,w=0),b<=1&&-1'),m.append(x)),0===T.length&&(T=S('
'),m.append(T)),x.length&&(x[0].style.opacity=Math.max(-b,0)),T.length&&(T[0].style.opacity=Math.max(b,0)))}i.css({"-webkit-transform-origin":"50% 50% -"+l/2+"px","-moz-transform-origin":"50% 50% -"+l/2+"px","-ms-transform-origin":"50% 50% -"+l/2+"px","transform-origin":"50% 50% -"+l/2+"px"}),u.shadow&&(c?e.transform("translate3d(0px, "+(s/2+u.shadowOffset)+"px, "+-s/2+"px) rotateX(90deg) rotateZ(0deg) scale("+u.shadowScale+")"):(p=Math.abs(h)-90*Math.floor(Math.abs(h)/90),n=1.5-(Math.sin(2*p*Math.PI/360)/2+Math.cos(2*p*Math.PI/360)/2),s=u.shadowScale,p=u.shadowScale/n,n=u.shadowOffset,e.transform("scale3d("+s+", 1, "+p+") translate3d(0px, "+(a/2+n)+"px, "+-a/2/p+"px) rotateX(-90deg)"))),i.transform("translate3d(0px,0,"+(V.isSafari||V.isUiWebView?-l/2:0)+"px) rotateX("+(t.isHorizontal()?0:h)+"deg) rotateY("+(t.isHorizontal()?-h:0)+"deg)")},setTransition:function(e){var t=this.$el;this.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),this.params.cubeEffect.shadow&&!this.isHorizontal()&&t.find(".swiper-cube-shadow").transition(e)}},U={setTranslate:function(){for(var e=this.slides,t=this.rtlTranslate,n=0;n'),s.append(i)),0===r.length&&(r=S('
'),s.append(r)),i.length&&(i[0].style.opacity=Math.max(-a,0)),r.length&&(r[0].style.opacity=Math.max(a,0))),s.transform("translate3d("+u+"px, "+c+"px, 0px) rotateX("+l+"deg) rotateY("+o+"deg)")}},setTransition:function(e){var n,i=this,t=i.slides,r=i.activeIndex,s=i.$wrapperEl;t.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),i.params.virtualTranslate&&0!==e&&(n=!1,t.eq(r).transitionEnd(function(){if(!n&&i&&!i.destroyed){n=!0,i.animating=!1;for(var e=["webkitTransitionEnd","transitionend"],t=0;t'),p.append(v)),0===g.length&&(g=S('
'),p.append(g)),v.length&&(v[0].style.opacity=0')}}),Object.keys(Y).forEach(function(e){t.a11y[e]=Y[e].bind(t)})},on:{init:function(){this.params.a11y.enabled&&(this.a11y.init(),this.a11y.updateNavigation())},toEdge:function(){this.params.a11y.enabled&&this.a11y.updateNavigation()},fromEdge:function(){this.params.a11y.enabled&&this.a11y.updateNavigation()},paginationUpdate:function(){this.params.a11y.enabled&&this.a11y.updatePagination()},destroy:function(){this.params.a11y.enabled&&this.a11y.destroy()}}},{name:"history",params:{history:{enabled:!1,replaceState:!1,key:"slides"}},create:function(){W.extend(this,{history:{init:$.init.bind(this),setHistory:$.setHistory.bind(this),setHistoryPopState:$.setHistoryPopState.bind(this),scrollToSlide:$.scrollToSlide.bind(this),destroy:$.destroy.bind(this)}})},on:{init:function(){this.params.history.enabled&&this.history.init()},destroy:function(){this.params.history.enabled&&this.history.destroy()},transitionEnd:function(){this.history.initialized&&this.history.setHistory(this.params.history.key,this.activeIndex)}}},{name:"hash-navigation",params:{hashNavigation:{enabled:!1,replaceState:!1,watchState:!1}},create:function(){W.extend(this,{hashNavigation:{initialized:!1,init:R.init.bind(this),destroy:R.destroy.bind(this),setHash:R.setHash.bind(this),onHashCange:R.onHashCange.bind(this)}})},on:{init:function(){this.params.hashNavigation.enabled&&this.hashNavigation.init()},destroy:function(){this.params.hashNavigation.enabled&&this.hashNavigation.destroy()},transitionEnd:function(){this.hashNavigation.initialized&&this.hashNavigation.setHash()}}},{name:"autoplay",params:{autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!0,stopOnLastSlide:!1,reverseDirection:!1}},create:function(){var t=this;W.extend(t,{autoplay:{running:!1,paused:!1,run:j.run.bind(t),start:j.start.bind(t),stop:j.stop.bind(t),pause:j.pause.bind(t),onTransitionEnd:function(e){t&&!t.destroyed&&t.$wrapperEl&&e.target===this&&(t.$wrapperEl[0].removeEventListener("transitionend",t.autoplay.onTransitionEnd),t.$wrapperEl[0].removeEventListener("webkitTransitionEnd",t.autoplay.onTransitionEnd),t.autoplay.paused=!1,t.autoplay.running?t.autoplay.run():t.autoplay.stop())}}})},on:{init:function(){this.params.autoplay.enabled&&this.autoplay.start()},beforeTransitionStart:function(e,t){this.autoplay.running&&(t||!this.params.autoplay.disableOnInteraction?this.autoplay.pause(e):this.autoplay.stop())},sliderFirstMove:function(){this.autoplay.running&&(this.params.autoplay.disableOnInteraction?this.autoplay.stop():this.autoplay.pause())},destroy:function(){this.autoplay.running&&this.autoplay.stop()}}},{name:"effect-fade",params:{fadeEffect:{crossFade:!1}},create:function(){W.extend(this,{fadeEffect:{setTranslate:G.setTranslate.bind(this),setTransition:G.setTransition.bind(this)}})},on:{beforeInit:function(){var e;"fade"===this.params.effect&&(this.classNames.push(this.params.containerModifierClass+"fade"),W.extend(this.params,e={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!0}),W.extend(this.originalParams,e))},setTranslate:function(){"fade"===this.params.effect&&this.fadeEffect.setTranslate()},setTransition:function(e){"fade"===this.params.effect&&this.fadeEffect.setTransition(e)}}},{name:"effect-cube",params:{cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}},create:function(){W.extend(this,{cubeEffect:{setTranslate:X.setTranslate.bind(this),setTransition:X.setTransition.bind(this)}})},on:{beforeInit:function(){var e;"cube"===this.params.effect&&(this.classNames.push(this.params.containerModifierClass+"cube"),this.classNames.push(this.params.containerModifierClass+"3d"),W.extend(this.params,e={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0}),W.extend(this.originalParams,e))},setTranslate:function(){"cube"===this.params.effect&&this.cubeEffect.setTranslate()},setTransition:function(e){"cube"===this.params.effect&&this.cubeEffect.setTransition(e)}}},{name:"effect-flip",params:{flipEffect:{slideShadows:!0,limitRotation:!0}},create:function(){W.extend(this,{flipEffect:{setTranslate:U.setTranslate.bind(this),setTransition:U.setTransition.bind(this)}})},on:{beforeInit:function(){var e;"flip"===this.params.effect&&(this.classNames.push(this.params.containerModifierClass+"flip"),this.classNames.push(this.params.containerModifierClass+"3d"),W.extend(this.params,e={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!0}),W.extend(this.originalParams,e))},setTranslate:function(){"flip"===this.params.effect&&this.flipEffect.setTranslate()},setTransition:function(e){"flip"===this.params.effect&&this.flipEffect.setTransition(e)}}},{name:"effect-coverflow",params:{coverflowEffect:{rotate:50,stretch:0,depth:100,modifier:1,slideShadows:!0}},create:function(){W.extend(this,{coverflowEffect:{setTranslate:K.setTranslate.bind(this),setTransition:K.setTransition.bind(this)}})},on:{beforeInit:function(){"coverflow"===this.params.effect&&(this.classNames.push(this.params.containerModifierClass+"coverflow"),this.classNames.push(this.params.containerModifierClass+"3d"),this.params.watchSlidesProgress=!0,this.originalParams.watchSlidesProgress=!0)},setTranslate:function(){"coverflow"===this.params.effect&&this.coverflowEffect.setTranslate()},setTransition:function(e){"coverflow"===this.params.effect&&this.coverflowEffect.setTransition(e)}}},{name:"thumbs",params:{thumbs:{swiper:null,slideThumbActiveClass:"swiper-slide-thumb-active",thumbsContainerClass:"swiper-container-thumbs"}},create:function(){W.extend(this,{thumbs:{swiper:null,init:Z.init.bind(this),update:Z.update.bind(this),onThumbClick:Z.onThumbClick.bind(this)}})},on:{beforeInit:function(){var e=this.params.thumbs;e&&e.swiper&&(this.thumbs.init(),this.thumbs.update(!0))},slideChange:function(){this.thumbs.swiper&&this.thumbs.update()},update:function(){this.thumbs.swiper&&this.thumbs.update()},resize:function(){this.thumbs.swiper&&this.thumbs.update()},observerUpdate:function(){this.thumbs.swiper&&this.thumbs.update()},setTransition:function(e){var t=this.thumbs.swiper;t&&t.setTransition(e)},beforeDestroy:function(){var e=this.thumbs.swiper;e&&this.thumbs.swiperCreated&&e&&e.destroy()}}}];return void 0===k.use&&(k.use=k.Class.use,k.installModule=k.Class.installModule),k.use(h),k});;(function(){'use strict';function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;} function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,[],_getPrototypeOf(t).constructor):o.apply(t,e));} function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");} function _construct(t,e,r){if(_isNativeReflectConstruct())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,e);var p=new(t.bind.apply(t,o))();return r&&_setPrototypeOf(p,r.prototype),p;} function _createClass(e,r,t){return Object.defineProperty(e,"prototype",{writable:false}),e;} function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);} function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:true,configurable:true}}),Object.defineProperty(t,"prototype",{writable:false}),e&&_setPrototypeOf(t,e);} function _isNativeFunction(t){try{return-1!==Function.toString.call(t).indexOf("[native code]");}catch(n){return"function"==typeof t;}} function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){} return(_isNativeReflectConstruct=function(){return!!t;})();} function _possibleConstructorReturn(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);} function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);} function _wrapNativeSuper(t){var r="function"==typeof Map?new Map():void 0;return _wrapNativeSuper=function(t){if(null===t||!_isNativeFunction(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(t))return r.get(t);r.set(t,Wrapper);} function Wrapper(){return _construct(t,arguments,_getPrototypeOf(this).constructor);} return Wrapper.prototype=Object.create(t.prototype,{constructor:{value:Wrapper,enumerable:false,writable:true,configurable:true}}),_setPrototypeOf(Wrapper,t);},_wrapNativeSuper(t);} var PageLoad=function(_HTMLElement){function PageLoad(){var _this;_classCallCheck(this,PageLoad);_this=_callSuper(this,PageLoad);if(themeConfig.global.page_load_open){var _themeConfig$global$p,_themeConfig$global$p2;var imgUrl=((_themeConfig$global$p=themeConfig.global.page_load_image)===null||_themeConfig$global$p===void 0?void 0:_themeConfig$global$p.src)||'';var imgAlt=((_themeConfig$global$p2=themeConfig.global.page_load_image)===null||_themeConfig$global$p2===void 0?void 0:_themeConfig$global$p2.alt)!=''?themeConfig.global.page_load_image.alt:'Loading Icon';var shadow=_this.attachShadow({mode:'open'});shadow.innerHTML="\n \n
\n
\n ".concat(imgUrl!=''?"\"").concat(imgAlt,"\""):'',"\n
\n
\n
\n \n ");document.addEventListener('DOMContentLoaded',function(){setTimeout(function(){_this.remove();},1000);});}else{_this.remove();} return _this;} _inherits(PageLoad,_HTMLElement);return _createClass(PageLoad);}(_wrapNativeSuper(HTMLElement));customElements.define('page-load',PageLoad);})();(function(){var Liquid=window.liquidjs.Liquid;window.engine=new Liquid({extname:".html",cache:true,globals:{theme_config:window.themeConfig||{},storeConfig:window.storeConfig||{},}});window.engine.registerFilter("current_countrys",(item,key)=>{if(!item){return`${oemcart_imgcdn}/statics/country/flag/default.png`;}else{const file=oemcart_countrys[item].country_code_2.toLowerCase();return`${oemcart_imgcdn}/statics/country/flag/${file}.png`;}});window.engine.registerFilter("money",(item,key,key2,key3)=>{return formatMoney(parseFloat(item||0),key||window.oemcart_currency,key2||"",key3||"");});window.engine.registerFilter("roundMoney",(item,key,key2,key3)=>{let money=formatMoney(parseFloat(item||0),key||window.oemcart_currency,key2||"",key3||"");let moneyArr=money.split('.');if(moneyArr[1]=='00'){return moneyArr[0];} return money;});window.engine.registerFilter("public_asset_abs_dir_url",(item,key)=>{if(!item){return oemcart_imgcdn+"/uploads/0/theme/default/assets/empty.png";} return oemcart_imgcdn+"/uploads/0/theme/default/assets/"+item;});function replaceDomain(inputString,newDomain){const domainRegex=/(https?:\/\/)?([^:/\s]+)(:\d+)?/;const result=inputString.replace(domainRegex,function(match,protocol,domain,port){if(domain&&protocol){const protocolToUse=protocol||'http://';const portToUse=port||'';return protocolToUse+newDomain+portToUse;}else{return match;}});return result;} window.engine.registerFilter("public_front_asset_url",(item,key)=>{return item;});window.engine.registerFilter("parseUrlParams",(item,key)=>{const queryIndex=item.indexOf("?");if(queryIndex===-1)return{};const queryString=item.slice(queryIndex+1);const params=queryString.split('&');const paramsObj={};params.forEach(param=>{const[key,value]=param.split('=');paramsObj[key]=decodeURIComponent(value);});return paramsObj;});window.engine.registerFilter("public_asset_abs_dir_url",(item,key)=>{if(!item){return oemcart_imgcdn+"/uploads/0/theme/default/assets/empty.png";} return oemcart_imgcdn+"/uploads/0/theme/default/assets/"+item;});window.engine.registerFilter("lazy_img_url",(item,key)=>{if(item){switch(key){case"banner":return oemcart_imgcdn+"/uploads/0/theme/default/assets/banner_loading.png";default:return oemcart_imgcdn+"/uploads/0/theme/default/assets/empty_loading.png";}}else{switch(key){case"banner":return oemcart_imgcdn+"/uploads/0/theme/default/assets/banner@2x.png";default:return oemcart_imgcdn+"/uploads/0/theme/default/assets/empty.png";}}});function Moi(params){this.pageStorage={};this.event={};this.ProductPictureShake=true;this.ProductShake=true;this.globalpopupLayer;} Moi.prototype.isEvent=function(name){if(!this.event[name]||!this.event[name].fun.length>0){return false} return true} Moi.prototype.addEvent=function(name,fun,isDefault){const self=this;if(!this.event[name]){this.event[name]={isExecute:true,default:false,defaultFunction:null,params:{},preventDefault(event){self.event[name].default=false;},stopPropagation(){self.event[name].isExecute=false;},results:[],fun:[]};} if(isDefault&&fun){this.event[name].default=true;this.event[name].defaultFunction=fun;return;} this.event[name].fun.push(fun);};Moi.prototype.onEvent=function(name,params){const event=this.event[name];if(!event||event===undefined){return params?{params:params}:false;} event.results=[];event.params=params;let eventLength=0;if(event.fun&&event.fun.length>0){while(event.isExecute){try{var retData=event.fun[eventLength].call(this,event);}catch(error){console.log(error)} if(typeof(retData)!=="undefined"){event.results.push(retData);} eventLength++;if(eventLength>=event.fun.length){event.isExecute=false;}}} if(event.default){event.defaultFunction.call(this,event);} event.isExecute=true;return event;};Moi.prototype.removeEvent=function(name){};Moi.prototype.removeEventListener=function(name,fun){if(this.event[name]){const index=this.event[name].fun.findIndex(itemFun=>itemFun==fun);if(index!=-1){this.event[name].fun.splice(index,1)}}} Moi.prototype.removeAllEvent=function(name){this.event[name]=undefined;};Moi.prototype.form=function(id,rule){const copyRule=rule;const formNodes=$(id);const items=formNodes.find(`.mo-form-item`);const callbackFu={getInputValue:function(inputs,index){const values=[];if(inputs.length){for(let i=0;i${message}`);} if(!itemNode.hasClass(activeClas)){console.log("二次错误");errorNode.html(message);return itemNode.addClass(activeClas);}},verifyRule(rules,value,index){let returnStr=true;for(let i=0;iel.value).toString();const index=allValues[key].length&&allValues[key][0].index;if(copyRule[key]&&!callbackFu.verifyRule(copyRule[key],value,index)){status=false;}} return status;},verify:function(name){const allValues=callbackFu.allValue();const keys=Object.keys(allValues);const key=name;const value=allValues[key].map((el)=>el.value).toString();if(copyRule[key]&&!callbackFu.verifyRule(copyRule[key],value,keys.indexOf(name))){return false;} return true;}};return callbackFu;};Moi.prototype.paramsValueString=function(obj){var keys=Object.keys(obj);keys.forEach((key)=>{obj[key]=obj[key].map((el)=>el.value).toString();});return obj;};Moi.prototype.nodeShowLoading=function(dom,str){var selfDom=$(dom);var className="mo-loading-warp";var old=selfDom.html();var style="";if(str){className=className+" "+str;} selfDom.addClass(className);if(str){style=`style="border-color:${str}; border-bottom-color: transparent;"`;} selfDom.html(`
`);return{close:function(){selfDom.removeClass(className);selfDom.html(old);}};};Moi.prototype.setCookie=function(name,value,time,path,domain){var strsec=getsec(time);var exp=new Date();exp.setTime(exp.getTime()+strsec*1);document.cookie=name+"="+encodeURIComponent(value)+";expires="+exp.toGMTString()+";path="+(path||"/")+";domain="+(domain||"")+";SameSite=None; Secure";};function getsec(str){var str1=str.substring(1,str.length)*1;var str2=str.substring(0,1);if(str2=="s"){return str1*1000;}else if(str2=="h"){return str1*60*60*1000;}else if(str2=="d"){return str1*24*60*60*1000;}} Moi.prototype.delCookie=function(name,path,domain){var date=new Date();date.setTime(date.getTime()+(-1*24*60*60*1000));document.cookie=name+"=a; expires="+date.toGMTString()+";path="+(path||"/")+";domain="+(domain||"");};Moi.prototype.getCookie=function(name){var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)");if((arr=document.cookie.match(reg)))return decodeURIComponent(arr[2]);else return null;};Moi.prototype.getUrlParam=function(name){var reg=new RegExp("(^|&)"+name+"=([^&]*)(&|$)");var r=window.location.search.substr(1).match(reg);if(r!=null){r[2]=r[2].replace("+"," ");return decodeURIComponent(r[2]);} return"";};Moi.prototype.changeURLArg=function(url,arg,arg_val){var pattern=arg+"=([^&]*)";var replaceText=arg+"="+encodeURIComponent(arg_val);if(url.match(pattern)){var tmp="/("+arg+"=)([^&]*)/gi";tmp=url.replace(eval(tmp),replaceText);return tmp;}else{if(url.match("[?]")){return url+"&"+replaceText;}else{return url+"?"+replaceText;}}};Moi.prototype.setUrlParams=function(url,params){let newURL=url;const paramsKey=Object.keys(params);paramsKey.forEach((key)=>{newURL=this.changeURLArg(newURL,key,params[key]);});return newURL;};Moi.prototype.addURLParam=function(url,key,value){var replaceText=key+"="+value;if(url.match("[?]")){return url+"&"+replaceText;}else{return url+"?"+replaceText;}};Moi.prototype.removeParam=function(key,sourceURL){var rtn=sourceURL.split("?")[0],param,params_arr=[],queryString=sourceURL.indexOf("?")!==-1?sourceURL.split("?")[1]:"";if(queryString!==""){params_arr=queryString.split("&");for(var i=params_arr.length-1;i>=0;i-=1){param=params_arr[i].split("=")[0];if(param===key){params_arr.splice(i,1);}} if(params_arr.length){rtn=rtn+"?"+params_arr.join("&");} return rtn} return rtn;};Moi.prototype.isMobile=function(){if(/(iPhone|iPad|iPod|iOS|Android)/i.test(navigator.userAgent)){return true;} if(document.body.clientWidth<750){return true;} return false;};Moi.prototype.alert=function(options){const template=`
${options.title}
${lang.general.yes}
`;const temp=$(template);const okNodes=temp.find(".mo-handle-ok")[0];function close(){okNodes.removeEventListener("ok",ok,false);temp.remove();} function ok(){options.ok&&options.ok();close();} okNodes.addEventListener("click",ok,false);$("body").append(temp);};Moi.prototype.alertInfo=function({content="",timer=2000,type="info",placement="center",onClose}){const alertTypesMap={info:"",success:'',warn:'',danger:''};const ANIMATION_TIMER=1000,MODAL_ID=`mo-alert-info-model_${Date.now()}`;const html=`
${alertTypesMap[type]} ${content}
`;$(".mo-alert-info-model").remove();$(document.body).append(html);setTimeout(()=>{const $alertBody=$(`#${MODAL_ID} .mo-alert-info-body`);if(placement==="center"){$alertBody.addClass("mo-alert-info_close-center-animation");}else{$alertBody.addClass("mo-alert-info_close-top-animation");} setTimeout(()=>{$(`#${MODAL_ID}`).remove();onClose&&onClose();},ANIMATION_TIMER-80);},timer+ANIMATION_TIMER);};Moi.prototype.message=function(options){const defaultOption={type:"success",content:"content",onClose:null,link:"",timer:2000,...options};let icon="";switch(defaultOption.type){case"success":icon=``;break;case"error":icon=` `;break;case"info":icon=` `;break;} const template=`
${icon} ${defaultOption.content}
`;const temp=$(template);$("body").append(temp);const modelBody=temp.find(".mo-modal-body");modelBody.addClass("animated bounceIn");setTimeout(()=>{modelBody.addClass("animated bounceOut");setTimeout(function(){temp.remove();if(defaultOption.link){window.location.href=defaultOption.link;return;} defaultOption.onClose&&defaultOption.onClose.call(this,{});},500);},defaultOption.timer);};Moi.prototype.confirm=function(options){const defaultOption={title:"content",okText:lang.general.yes,cancelText:lang.general.no,...options};const template=`
${defaultOption.title}
${defaultOption.okText}
${defaultOption.cancelText}
`;const temp=$(template);const closeNodes=temp.find(".mo-handle-close")[0];const okNodes=temp.find(".mo-handle-ok")[0];function close(){closeNodes.removeEventListener("click",close,false);okNodes.removeEventListener("ok",ok,false);temp.find(".mo-confirm-body").addClass("animated bounceOut");setTimeout(function(){temp.remove();},500);} function ok(){options.ok&&options.ok();close();} closeNodes.addEventListener("click",close,false);okNodes.addEventListener("click",ok,false);$("body").append(temp);temp.find(".mo-confirm-body").addClass("animated bounceIn");};Moi.prototype.windowPositionNode=function(id){$("html,body").animate({scrollTop:$(id).offset().top},200);};Moi.prototype.tooltip=function(options){const defaultOption={placement:"left",el:"",timer:1000,space:0,content:"",elClass:'',isDefaultRemove:true,...options};const cssOption={opacity:1,transform:"scale(1)",visibility:"visible"};const template=`
`;const temp=$(template);const node=$(defaultOption.el);const top=node.offset().top;const width=node.width();const height=node.height();const left=node.offset().left;$("body").append(temp);const tipWidth=temp.innerWidth();const tipHeight=temp.innerHeight();switch(defaultOption.placement){case"left":temp.css({...cssOption,left:left-tipWidth-defaultOption.space,top:top-Math.floor(height/2)});break;case"right":temp.css({...cssOption,left:left+width+defaultOption.space,top:top-Math.floor(height/2)});break;case"top":temp.css({...cssOption,left:left,top:top-tipHeight-defaultOption.space});break;case"bottom":temp.css({...cssOption,left:left,top:top+height+defaultOption.space});break;case"top-center":temp.css({...cssOption,left:left-tipWidth/2,top:top-tipHeight-defaultOption.space})} if(defaultOption.isDefaultRemove){setTimeout(function(){temp.css({opacity:0,transform:"scale(0)"});setTimeout(function(){temp.remove();},500);},defaultOption.timer);}};Moi.prototype.ajax=function(option){const slef=this;option.url=`/homeapi${option.url}`;const copyOption=Object.assign({},option);copyOption['success']=function(res){if(res.code==200000){alert(res.msg) return}else{option.success&&option.success(res)}} $.ajax({headers:{"Content-Type":"application/json;charset=UTF-8"},dataType:"json",...copyOption});};Moi.prototype.post=function(url,data,option){this.ajax({url:url,type:"post",data:JSON.stringify(data),...option});};Moi.prototype.get=function(url,data,option){this.ajax({url:url,type:"get",data:data,...option});};Moi.prototype.del=function(url,data,option){this.ajax({url:url,type:"delete",data:JSON.stringify(data),...option});};Moi.prototype.ecBuyNow=async function(eventData,shouldSendMessage=true,event=null){const self=this;let product_cart_param='';window['ec_action_from']=eventData.ec_action_from;if(eventData.ec_action_from=="product_detail"){var paypalecRet=self.onEvent("paypalec_multiple_callback",{payId:eventData.ec_block_id,code:0});var params=self.getPageStorage('product_params'+eventData.ec_block_id);if(!paypalecRet.params.code){self.onEvent("paypalec_callback",{payId:eventData.ec_block_id}) var ret=self.onEvent("payVerified",{property:[],product:params,code:200});if(ret.params.code!==200){if(shouldSendMessage&&event){event.source.postMessage({type:'shop_buynowResult',ret:{code:1,msg:'Please complete the required fields'