/* uglified */
"use strict";process.env.NODE_ENV=process.env.NODE_ENV||"development",exports.printer=require("./plug/chn-escpos"),exports.config=require("./config/config"),exports.sync=require("./sync/sync"),exports.api={auth:require("./controller/auth/"),setting:require("./controller/setting/"),product:require("./controller/product/"),business:require("./controller/business/"),trade:require("./controller/order/"),damaged:require("./controller/damaged/"),refund:require("./controller/refund"),update:require("./controller/update"),operation:require("./controller/operation/"),db:require("./utils/db")};const utils=require("./utils/functions");try{let e=localStorage.getItem("macSn");if(!e){const r=require("child_process").execSync;let t;switch(process.platform){case"win32":t="getmac";break;case"darwin":t="ifconfig en0 | grep 'ether' | awk '{print $2}'"}let s=r(t,{encoding:"ascii"});e=(s=s.replace(/:/gi,"-").toUpperCase()).match(/[A-F0-9]{2}(-[A-F0-9]{2}){5}/)[0]}exports.api.macs=e}catch(e){let r=utils.getUUID();localStorage.setItem("macSn",r),exports.api.macs=r,console.warn("未能获取设备mac地址，自动生成了一个设备标识："+r),console.error(e)}exports.broadcaster={_events:{},publish:function(e,r){if(this._events[e])for(var t=0;t<this._events[e].length;t++)this._events[e][t](r)},subscribe:function(e,r){this._events[e]||(this._events[e]=[]),this._events[e].push(r)},clear:function(e){this._events[e]&&delete this._events[e]}},this.timeId=setInterval(()=>{if(nw&&nw.process.mainModule.exports.vue){clearInterval(this.timeId),nw.process.mainModule.exports.vue.$appConfig=exports.config;try{nw.process.mainModule.exports.api.db.run(`DELETE from SYS_SYNC_RECORD where STATUS = 1  AND MODIFY_TIME < '${new Date(new Date-2592e6).format("yyyy-MM-dd hh:mm:ss")}'`),nw.process.mainModule.exports.api.db.run(`DELETE from O_FAV_ACTIVITY_GOODS where ACTIVITY_ID in (select ID from O_FAV_ACTIVITY where END_TIME  < '${new Date(new Date).format("yyyy-MM-dd hh:mm:ss")}')`),nw.process.mainModule.exports.api.db.run(`DELETE from O_FAV_ACTIVITY where END_TIME  < '${new Date(new Date).format("yyyy-MM-dd hh:mm:ss")}'`)}catch(e){console.warn("本地的过期数据删除失败"),console.error(e)}}},300);