初始化git
This commit is contained in:
parent
6981db6303
commit
95561f1cf2
20
.hbuilderx/launch.json
Normal file
20
.hbuilderx/launch.json
Normal file
@ -0,0 +1,20 @@
|
||||
{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
|
||||
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
|
||||
"version": "0.0",
|
||||
"configurations": [{
|
||||
"app-plus" :
|
||||
{
|
||||
"launchtype" : "local"
|
||||
},
|
||||
"default" :
|
||||
{
|
||||
"launchtype" : "local"
|
||||
},
|
||||
"mp-weixin" :
|
||||
{
|
||||
"launchtype" : "local"
|
||||
},
|
||||
"type" : "uniCloud"
|
||||
}
|
||||
]
|
||||
}
|
||||
5
.idea/.gitignore
generated
vendored
Normal file
5
.idea/.gitignore
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
# 默认忽略的文件
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# 基于编辑器的 HTTP 客户端请求
|
||||
/httpRequests/
|
||||
8
.idea/modules.xml
generated
Normal file
8
.idea/modules.xml
generated
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/wanmeiyizhan.iml" filepath="$PROJECT_DIR$/.idea/wanmeiyizhan.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
12
.idea/wanmeiyizhan.iml
generated
Normal file
12
.idea/wanmeiyizhan.iml
generated
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
252
App.vue
Normal file
252
App.vue
Normal file
@ -0,0 +1,252 @@
|
||||
<script>
|
||||
import { mapMutations, mapGetters } from "vuex";
|
||||
|
||||
let appReadyResolve;
|
||||
const appReady = new Promise((resolve) => {
|
||||
appReadyResolve = resolve;
|
||||
});
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
globalData: {},
|
||||
user: {},
|
||||
serverPart: {},
|
||||
openType: "",
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters({
|
||||
sessionUser: "user",
|
||||
}),
|
||||
},
|
||||
methods: {
|
||||
...mapMutations({ setArea: "setHomeServer" }),
|
||||
getLocalServer() {
|
||||
// 根据定位获取周边服务区
|
||||
let _this = this;
|
||||
uni.choosePoi({
|
||||
// type: 'wgs84',
|
||||
success: function (res) {
|
||||
console.log(res);
|
||||
let latitude = res.latitude;
|
||||
let longitude = res.longitude;
|
||||
_this.$api
|
||||
.getCoop({
|
||||
action_type: "getServerPartByLocation",
|
||||
action_data: latitude,
|
||||
action_record: longitude,
|
||||
distance: 150,
|
||||
type: 1000,
|
||||
})
|
||||
.then(function (data) {
|
||||
if (data.ResultCode === "100") {
|
||||
let _data = data.Data.List;
|
||||
|
||||
_this.setArea(_data[0]);
|
||||
}
|
||||
});
|
||||
},
|
||||
fail(res) {
|
||||
_this.openSetting = true;
|
||||
},
|
||||
});
|
||||
},
|
||||
login() {
|
||||
let _this = this;
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.login({
|
||||
success(res) {
|
||||
console.log("uni.login", res);
|
||||
_this.$api
|
||||
.getCoop({
|
||||
action_type: "WeChatLogin",
|
||||
code: res.code,
|
||||
})
|
||||
.then(async (data) => {
|
||||
console.log("datalogin", data);
|
||||
_this.$store.commit("setUser", data.Data);
|
||||
_this.user = data.Data;
|
||||
if (data.ResultCode === "100") {
|
||||
try {
|
||||
await _this.getMember(data.Data); // 确保 getMember 完成
|
||||
resolve(data);
|
||||
} catch (memberErr) {
|
||||
reject(memberErr);
|
||||
}
|
||||
} else {
|
||||
// uni.showModal({
|
||||
// title: "温馨提示",
|
||||
// content: "请您授权登录后再操作。",
|
||||
// success(res) {
|
||||
// if (res.confirm) {
|
||||
// uni.redirectTo({ url: "/pages/register/index" });
|
||||
// }
|
||||
// },
|
||||
// });
|
||||
// reject(new Error("用户未授权"));
|
||||
}
|
||||
});
|
||||
},
|
||||
fail(err) {
|
||||
reject(err);
|
||||
},
|
||||
});
|
||||
});
|
||||
},
|
||||
getMember(user) {
|
||||
let _this = this;
|
||||
if (!user.WechatUserId) {
|
||||
return Promise.resolve(); // 如果条件不满足,直接返回一个已完成的 Promise
|
||||
}
|
||||
return _this.$api
|
||||
.getCoop({
|
||||
action_type: "GetMembershipInfo",
|
||||
WechatUserId: user.WechatUserId,
|
||||
})
|
||||
.then(function (data) {
|
||||
if (data.ResultCode === "100") {
|
||||
let _data = data;
|
||||
console.log("_data", _data);
|
||||
_this.user.MEMBERSHIP_ID = _data.Data.MEMBERSHIP_ID || "";
|
||||
_this.user.MEMBERSHIP_NAME = _data.Data.MEMBERSHIP_NAME || "";
|
||||
_this.user.MEMBERSHIP_LEVEL_TEXT =
|
||||
_data.Data.MEMBERSHIP_LEVEL_TEXT || "";
|
||||
_this.user.COUPON_COUNT = _data.Data.COUPON_COUNT || "";
|
||||
_this.user.PENDORDER_COUNT = _data.Data.PENDORDER_COUNT || "";
|
||||
_this.user.RESERVATION_COUNT = _data.Data.RESERVATION_COUNT || "";
|
||||
_this.user.ACCOUNT_BALANCE = _data.Data.ACCOUNT_BALANCE || "";
|
||||
_this.user.ISPLUS = _data.Data.ISPLUS || "";
|
||||
_this.user.INDUSTRY_MEMBERSHIP_ID =
|
||||
_data.Data.INDUSTRY_MEMBERSHIP_ID || "";
|
||||
_this.user.MEMBERSHIP_TYPE = _data.Data.MEMBERSHIP_TYPE || "";
|
||||
_this.user.MEMBERSHIP_LEVEL = _data.Data.MEMBERSHIP_LEVEL || "";
|
||||
_this.user.InviteCode = _data.Data.InviteCode || "";
|
||||
_this.user.MEMBERSHIP_POINT = _data.Data.MEMBERSHIP_POINT || "";
|
||||
_this.user.MEMBERSHIP_MOBILEPHONE =
|
||||
_data.Data.MEMBERSHIP_MOBILEPHONE || "";
|
||||
// _this.setUser(user);
|
||||
_this.$store.commit("setUser", user);
|
||||
} else {
|
||||
// _this.setUser({});
|
||||
_this.$store.commit("setUser", user);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error("获取会员信息失败", err);
|
||||
throw err; // 确保错误向上传递
|
||||
});
|
||||
},
|
||||
appLogin() {
|
||||
let _this = this;
|
||||
// 拿到缓存里面的user
|
||||
let sessionUser = this.sessionUser;
|
||||
console.log("sessionUser", sessionUser);
|
||||
if (sessionUser.MEMBERSHIP_ID) {
|
||||
this.$api
|
||||
.getCoop({
|
||||
action_type: "GetMembershipInfo",
|
||||
WechatUserId: sessionUser.MEMBERSHIP_ID || sessionUser.MemberShipID,
|
||||
MembershipId: sessionUser.MEMBERSHIP_ID || sessionUser.MemberShipID,
|
||||
Membership_Id:
|
||||
sessionUser.MEMBERSHIP_ID || sessionUser.MemberShipID,
|
||||
})
|
||||
.then(function (result) {
|
||||
_this.$store.commit("setUser", result.Data);
|
||||
uni.setStorageSync("userInfo", result.Data);
|
||||
});
|
||||
} else {
|
||||
// uni.showModal({
|
||||
// title: "温馨提示",
|
||||
// content: "请您登录后再操作。",
|
||||
// success(res) {
|
||||
// if (res.confirm) {
|
||||
// uni.redirectTo({ url: "/pages/login/index" });
|
||||
// }
|
||||
// },
|
||||
// });
|
||||
}
|
||||
},
|
||||
},
|
||||
globalData: {
|
||||
initReady: null, // 用于页面等待初始化完成
|
||||
},
|
||||
onLaunch() {
|
||||
let type = uni.getSystemInfoSync();
|
||||
console.log("uni.getSystemInfoSync()", uni.getSystemInfoSync());
|
||||
console.log("uni.getSystemInfoSync().platform", type);
|
||||
|
||||
// 拿到这是第几次 进入到小程序 或者 app (用于权限的询问)
|
||||
let times = uni.getStorageSync("howTimes");
|
||||
console.log("times", times);
|
||||
if (times) {
|
||||
// 如果有值了 就说明是2
|
||||
uni.setStorageSync("howTimes", 2);
|
||||
} else {
|
||||
// 没有值 说明是第一次进来 给它存一个 1
|
||||
uni.setStorageSync("howTimes", 1);
|
||||
}
|
||||
|
||||
if (type.platform === "android" && type.uniPlatform === "app") {
|
||||
let res = plus.navigator.getUserAgent();
|
||||
plus.navigator.setUserAgent(res + "wanmeiyizhan_APP");
|
||||
console.log("安卓");
|
||||
// 安卓
|
||||
uni.setStorageSync("loginType", "android");
|
||||
this.appLogin();
|
||||
// 等方法执行完再执行首页的
|
||||
// this.globalData.initReady = this.appLogin().then(() => {
|
||||
// // console.log("App 初始化完成");
|
||||
// });
|
||||
} else if (type.platform === "ios" && type.uniPlatform === "app") {
|
||||
console.log("ios");
|
||||
// 苹果
|
||||
uni.setStorageSync("loginType", "ios");
|
||||
this.appLogin();
|
||||
} else if (type.uniPlatform === "mp-weixin") {
|
||||
console.log("小程序");
|
||||
// 如果是小程序进来的话 开发版 体验版 正式版 判断一下
|
||||
// 且存个min 统一一下
|
||||
uni.setStorageSync("loginType", "min");
|
||||
|
||||
// this.clearShopcart() // 清除上次留下来的购物车缓存
|
||||
this.setArea({});
|
||||
let _this = this;
|
||||
uni.getSystemInfo({
|
||||
success: (res) => {
|
||||
uni.setStorageSync("systemInfo", res);
|
||||
let ww = res.windowWidth;
|
||||
let hh = res.windowHeight;
|
||||
_this.globalData.ww = ww;
|
||||
_this.globalData.hh = hh;
|
||||
},
|
||||
});
|
||||
this.globalData.initReady = this.login().then(() => {
|
||||
// console.log("App 初始化完成");
|
||||
});
|
||||
// _this.login(); // 获取用户数据
|
||||
|
||||
const updateManager = uni.getUpdateManager();
|
||||
updateManager.onCheckForUpdate((res) => {
|
||||
// 请求完新版本信息的回调
|
||||
console.log("hasUpdate", res.hasUpdate);
|
||||
if (res.hasUpdate) {
|
||||
uni.showModal({
|
||||
title: "更新提示",
|
||||
content: "新版本已经准备好,是否重启应用?",
|
||||
success(res) {
|
||||
// if (res.confirm) { // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
|
||||
updateManager.applyUpdate();
|
||||
// }
|
||||
},
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
onHide() {},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/*每个页面公共css */
|
||||
</style>
|
||||
403
common/JsBarcode.all.js
Normal file
403
common/JsBarcode.all.js
Normal file
@ -0,0 +1,403 @@
|
||||
var CHAR_TILDE = 126;
|
||||
var CODE_FNC1 = 102;
|
||||
|
||||
var SET_STARTA = 103;
|
||||
var SET_STARTB = 104;
|
||||
var SET_STARTC = 105;
|
||||
var SET_SHIFT = 98;
|
||||
var SET_CODEA = 101;
|
||||
var SET_CODEB = 100;
|
||||
var SET_STOP = 106;
|
||||
|
||||
|
||||
var REPLACE_CODES = {
|
||||
CHAR_TILDE: CODE_FNC1 //~ corresponds to FNC1 in GS1-128 standard
|
||||
}
|
||||
|
||||
var CODESET = {
|
||||
ANY: 1,
|
||||
AB: 2,
|
||||
A: 3,
|
||||
B: 4,
|
||||
C: 5
|
||||
};
|
||||
|
||||
function getBytes(str) {
|
||||
var bytes = [];
|
||||
for (var i = 0; i < str.length; i++) {
|
||||
bytes.push(str.charCodeAt(i));
|
||||
}
|
||||
return bytes;
|
||||
}
|
||||
|
||||
exports.code128 = function (ctx, text, width, height, rolate) {
|
||||
|
||||
width = parseInt(width);
|
||||
|
||||
height = parseInt(height);
|
||||
|
||||
var codes = stringToCode128(text);
|
||||
|
||||
var g = new Graphics(ctx, width, height);
|
||||
|
||||
var barWeight = g.area.width / ((codes.length - 3) * 11 + 35);
|
||||
|
||||
var x = g.area.left;
|
||||
var y = g.area.top;
|
||||
for (var i = 0; i < codes.length; i++) {
|
||||
var c = codes[i];
|
||||
//two bars at a time: 1 black and 1 white
|
||||
for (var bar = 0; bar < 8; bar += 2) {
|
||||
var barW = PATTERNS[c][bar] * barWeight;
|
||||
// var barH = height - y - this.border;
|
||||
var barH = height - y;
|
||||
var spcW = PATTERNS[c][bar + 1] * barWeight;
|
||||
|
||||
//no need to draw if 0 width
|
||||
if (barW > 0) {
|
||||
g.fillFgRect(x, y, barW, barH);
|
||||
}
|
||||
|
||||
x += barW + spcW;
|
||||
}
|
||||
}
|
||||
if(rolate){
|
||||
ctx.rotate(rolate * Math.PI / 180)
|
||||
}
|
||||
ctx.draw();
|
||||
}
|
||||
|
||||
|
||||
function stringToCode128(text) {
|
||||
|
||||
var barc = {
|
||||
currcs: CODESET.C
|
||||
};
|
||||
|
||||
var bytes = getBytes(text);
|
||||
//decide starting codeset
|
||||
var index = bytes[0] == CHAR_TILDE ? 1 : 0;
|
||||
|
||||
var csa1 = bytes.length > 0 ? codeSetAllowedFor(bytes[index++]) : CODESET.AB;
|
||||
var csa2 = bytes.length > 0 ? codeSetAllowedFor(bytes[index++]) : CODESET.AB;
|
||||
barc.currcs = getBestStartSet(csa1, csa2);
|
||||
barc.currcs = perhapsCodeC(bytes, barc.currcs);
|
||||
|
||||
//if no codeset changes this will end up with bytes.length+3
|
||||
//start, checksum and stop
|
||||
var codes = new Array();
|
||||
|
||||
switch (barc.currcs) {
|
||||
case CODESET.A:
|
||||
codes.push(SET_STARTA);
|
||||
break;
|
||||
case CODESET.B:
|
||||
codes.push(SET_STARTB);
|
||||
break;
|
||||
default:
|
||||
codes.push(SET_STARTC);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
for (var i = 0; i < bytes.length; i++) {
|
||||
var b1 = bytes[i]; //get the first of a pair
|
||||
//should we translate/replace
|
||||
if (b1 in REPLACE_CODES) {
|
||||
codes.push(REPLACE_CODES[b1]);
|
||||
i++ //jump to next
|
||||
b1 = bytes[i];
|
||||
}
|
||||
|
||||
//get the next in the pair if possible
|
||||
var b2 = bytes.length > (i + 1) ? bytes[i + 1] : -1;
|
||||
|
||||
codes = codes.concat(codesForChar(b1, b2, barc.currcs));
|
||||
//code C takes 2 chars each time
|
||||
if (barc.currcs == CODESET.C) i++;
|
||||
}
|
||||
|
||||
//calculate checksum according to Code 128 standards
|
||||
var checksum = codes[0];
|
||||
for (var weight = 1; weight < codes.length; weight++) {
|
||||
checksum += (weight * codes[weight]);
|
||||
}
|
||||
codes.push(checksum % 103);
|
||||
|
||||
codes.push(SET_STOP);
|
||||
|
||||
//encoding should now be complete
|
||||
return codes;
|
||||
|
||||
function getBestStartSet(csa1, csa2) {
|
||||
//tries to figure out the best codeset
|
||||
//to start with to get the most compact code
|
||||
var vote = 0;
|
||||
vote += csa1 == CODESET.A ? 1 : 0;
|
||||
vote += csa1 == CODESET.B ? -1 : 0;
|
||||
vote += csa2 == CODESET.A ? 1 : 0;
|
||||
vote += csa2 == CODESET.B ? -1 : 0;
|
||||
//tie goes to B due to my own predudices
|
||||
return vote > 0 ? CODESET.A : CODESET.B;
|
||||
}
|
||||
|
||||
function perhapsCodeC(bytes, codeset) {
|
||||
for (var i = 0; i < bytes.length; i++) {
|
||||
var b = bytes[i]
|
||||
if ((b < 48 || b > 57) && b != CHAR_TILDE)
|
||||
return codeset;
|
||||
}
|
||||
return CODESET.C;
|
||||
}
|
||||
|
||||
//chr1 is current byte
|
||||
//chr2 is the next byte to process. looks ahead.
|
||||
function codesForChar(chr1, chr2, currcs) {
|
||||
var result = [];
|
||||
var shifter = -1;
|
||||
|
||||
if (charCompatible(chr1, currcs)) {
|
||||
if (currcs == CODESET.C) {
|
||||
if (chr2 == -1) {
|
||||
shifter = SET_CODEB;
|
||||
currcs = CODESET.B;
|
||||
}
|
||||
else if ((chr2 != -1) && !charCompatible(chr2, currcs)) {
|
||||
//need to check ahead as well
|
||||
if (charCompatible(chr2, CODESET.A)) {
|
||||
shifter = SET_CODEA;
|
||||
currcs = CODESET.A;
|
||||
}
|
||||
else {
|
||||
shifter = SET_CODEB;
|
||||
currcs = CODESET.B;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
//if there is a next char AND that next char is also not compatible
|
||||
if ((chr2 != -1) && !charCompatible(chr2, currcs)) {
|
||||
//need to switch code sets
|
||||
switch (currcs) {
|
||||
case CODESET.A:
|
||||
shifter = SET_CODEB;
|
||||
currcs = CODESET.B;
|
||||
break;
|
||||
case CODESET.B:
|
||||
shifter = SET_CODEA;
|
||||
currcs = CODESET.A;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
//no need to shift code sets, a temporary SHIFT will suffice
|
||||
shifter = SET_SHIFT;
|
||||
}
|
||||
}
|
||||
|
||||
//ok some type of shift is nessecary
|
||||
if (shifter != -1) {
|
||||
result.push(shifter);
|
||||
result.push(codeValue(chr1));
|
||||
}
|
||||
else {
|
||||
if (currcs == CODESET.C) {
|
||||
//include next as well
|
||||
result.push(codeValue(chr1, chr2));
|
||||
}
|
||||
else {
|
||||
result.push(codeValue(chr1));
|
||||
}
|
||||
}
|
||||
barc.currcs = currcs;
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
//reduce the ascii code to fit into the Code128 char table
|
||||
function codeValue(chr1, chr2) {
|
||||
if (typeof chr2 == "undefined") {
|
||||
return chr1 >= 32 ? chr1 - 32 : chr1 + 64;
|
||||
}
|
||||
else {
|
||||
return parseInt(String.fromCharCode(chr1) + String.fromCharCode(chr2));
|
||||
}
|
||||
}
|
||||
|
||||
function charCompatible(chr, codeset) {
|
||||
var csa = codeSetAllowedFor(chr);
|
||||
if (csa == CODESET.ANY) return true;
|
||||
//if we need to change from current
|
||||
if (csa == CODESET.AB) return true;
|
||||
if (csa == CODESET.A && codeset == CODESET.A) return true;
|
||||
if (csa == CODESET.B && codeset == CODESET.B) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
function codeSetAllowedFor(chr) {
|
||||
if (chr >= 48 && chr <= 57) {
|
||||
//0-9
|
||||
return CODESET.ANY;
|
||||
}
|
||||
else if (chr >= 32 && chr <= 95) {
|
||||
//0-9 A-Z
|
||||
return CODESET.AB;
|
||||
}
|
||||
else {
|
||||
//if non printable
|
||||
return chr < 32 ? CODESET.A : CODESET.B;
|
||||
}
|
||||
}
|
||||
|
||||
var Graphics = function(ctx, width, height) {
|
||||
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
this.quiet = Math.round(this.width / 40);
|
||||
|
||||
this.border_size = 0;
|
||||
this.padding_width = 0;
|
||||
|
||||
this.area = {
|
||||
width : width - this.padding_width * 2 - this.quiet * 2,
|
||||
height: height - this.border_size * 2,
|
||||
top : this.border_size - 4,
|
||||
left : this.padding_width + this.quiet
|
||||
};
|
||||
|
||||
this.ctx = ctx;
|
||||
this.fg = "#000000";
|
||||
this.bg = "#ffffff";
|
||||
|
||||
// fill background
|
||||
this.fillBgRect(0,0, width, height);
|
||||
|
||||
// fill center to create border
|
||||
this.fillBgRect(0, this.border_size, width, height - this.border_size * 2);
|
||||
}
|
||||
|
||||
//use native color
|
||||
Graphics.prototype._fillRect = function(x, y, width, height, color) {
|
||||
this.ctx.setFillStyle(color)
|
||||
this.ctx.fillRect(x, y, width, height)
|
||||
}
|
||||
|
||||
Graphics.prototype.fillFgRect = function(x,y, width, height) {
|
||||
this._fillRect(x, y, width, height, this.fg);
|
||||
}
|
||||
|
||||
Graphics.prototype.fillBgRect = function(x,y, width, height) {
|
||||
this._fillRect(x, y, width, height, this.bg);
|
||||
}
|
||||
|
||||
var PATTERNS = [
|
||||
[2, 1, 2, 2, 2, 2, 0, 0], // 0
|
||||
[2, 2, 2, 1, 2, 2, 0, 0], // 1
|
||||
[2, 2, 2, 2, 2, 1, 0, 0], // 2
|
||||
[1, 2, 1, 2, 2, 3, 0, 0], // 3
|
||||
[1, 2, 1, 3, 2, 2, 0, 0], // 4
|
||||
[1, 3, 1, 2, 2, 2, 0, 0], // 5
|
||||
[1, 2, 2, 2, 1, 3, 0, 0], // 6
|
||||
[1, 2, 2, 3, 1, 2, 0, 0], // 7
|
||||
[1, 3, 2, 2, 1, 2, 0, 0], // 8
|
||||
[2, 2, 1, 2, 1, 3, 0, 0], // 9
|
||||
[2, 2, 1, 3, 1, 2, 0, 0], // 10
|
||||
[2, 3, 1, 2, 1, 2, 0, 0], // 11
|
||||
[1, 1, 2, 2, 3, 2, 0, 0], // 12
|
||||
[1, 2, 2, 1, 3, 2, 0, 0], // 13
|
||||
[1, 2, 2, 2, 3, 1, 0, 0], // 14
|
||||
[1, 1, 3, 2, 2, 2, 0, 0], // 15
|
||||
[1, 2, 3, 1, 2, 2, 0, 0], // 16
|
||||
[1, 2, 3, 2, 2, 1, 0, 0], // 17
|
||||
[2, 2, 3, 2, 1, 1, 0, 0], // 18
|
||||
[2, 2, 1, 1, 3, 2, 0, 0], // 19
|
||||
[2, 2, 1, 2, 3, 1, 0, 0], // 20
|
||||
[2, 1, 3, 2, 1, 2, 0, 0], // 21
|
||||
[2, 2, 3, 1, 1, 2, 0, 0], // 22
|
||||
[3, 1, 2, 1, 3, 1, 0, 0], // 23
|
||||
[3, 1, 1, 2, 2, 2, 0, 0], // 24
|
||||
[3, 2, 1, 1, 2, 2, 0, 0], // 25
|
||||
[3, 2, 1, 2, 2, 1, 0, 0], // 26
|
||||
[3, 1, 2, 2, 1, 2, 0, 0], // 27
|
||||
[3, 2, 2, 1, 1, 2, 0, 0], // 28
|
||||
[3, 2, 2, 2, 1, 1, 0, 0], // 29
|
||||
[2, 1, 2, 1, 2, 3, 0, 0], // 30
|
||||
[2, 1, 2, 3, 2, 1, 0, 0], // 31
|
||||
[2, 3, 2, 1, 2, 1, 0, 0], // 32
|
||||
[1, 1, 1, 3, 2, 3, 0, 0], // 33
|
||||
[1, 3, 1, 1, 2, 3, 0, 0], // 34
|
||||
[1, 3, 1, 3, 2, 1, 0, 0], // 35
|
||||
[1, 1, 2, 3, 1, 3, 0, 0], // 36
|
||||
[1, 3, 2, 1, 1, 3, 0, 0], // 37
|
||||
[1, 3, 2, 3, 1, 1, 0, 0], // 38
|
||||
[2, 1, 1, 3, 1, 3, 0, 0], // 39
|
||||
[2, 3, 1, 1, 1, 3, 0, 0], // 40
|
||||
[2, 3, 1, 3, 1, 1, 0, 0], // 41
|
||||
[1, 1, 2, 1, 3, 3, 0, 0], // 42
|
||||
[1, 1, 2, 3, 3, 1, 0, 0], // 43
|
||||
[1, 3, 2, 1, 3, 1, 0, 0], // 44
|
||||
[1, 1, 3, 1, 2, 3, 0, 0], // 45
|
||||
[1, 1, 3, 3, 2, 1, 0, 0], // 46
|
||||
[1, 3, 3, 1, 2, 1, 0, 0], // 47
|
||||
[3, 1, 3, 1, 2, 1, 0, 0], // 48
|
||||
[2, 1, 1, 3, 3, 1, 0, 0], // 49
|
||||
[2, 3, 1, 1, 3, 1, 0, 0], // 50
|
||||
[2, 1, 3, 1, 1, 3, 0, 0], // 51
|
||||
[2, 1, 3, 3, 1, 1, 0, 0], // 52
|
||||
[2, 1, 3, 1, 3, 1, 0, 0], // 53
|
||||
[3, 1, 1, 1, 2, 3, 0, 0], // 54
|
||||
[3, 1, 1, 3, 2, 1, 0, 0], // 55
|
||||
[3, 3, 1, 1, 2, 1, 0, 0], // 56
|
||||
[3, 1, 2, 1, 1, 3, 0, 0], // 57
|
||||
[3, 1, 2, 3, 1, 1, 0, 0], // 58
|
||||
[3, 3, 2, 1, 1, 1, 0, 0], // 59
|
||||
[3, 1, 4, 1, 1, 1, 0, 0], // 60
|
||||
[2, 2, 1, 4, 1, 1, 0, 0], // 61
|
||||
[4, 3, 1, 1, 1, 1, 0, 0], // 62
|
||||
[1, 1, 1, 2, 2, 4, 0, 0], // 63
|
||||
[1, 1, 1, 4, 2, 2, 0, 0], // 64
|
||||
[1, 2, 1, 1, 2, 4, 0, 0], // 65
|
||||
[1, 2, 1, 4, 2, 1, 0, 0], // 66
|
||||
[1, 4, 1, 1, 2, 2, 0, 0], // 67
|
||||
[1, 4, 1, 2, 2, 1, 0, 0], // 68
|
||||
[1, 1, 2, 2, 1, 4, 0, 0], // 69
|
||||
[1, 1, 2, 4, 1, 2, 0, 0], // 70
|
||||
[1, 2, 2, 1, 1, 4, 0, 0], // 71
|
||||
[1, 2, 2, 4, 1, 1, 0, 0], // 72
|
||||
[1, 4, 2, 1, 1, 2, 0, 0], // 73
|
||||
[1, 4, 2, 2, 1, 1, 0, 0], // 74
|
||||
[2, 4, 1, 2, 1, 1, 0, 0], // 75
|
||||
[2, 2, 1, 1, 1, 4, 0, 0], // 76
|
||||
[4, 1, 3, 1, 1, 1, 0, 0], // 77
|
||||
[2, 4, 1, 1, 1, 2, 0, 0], // 78
|
||||
[1, 3, 4, 1, 1, 1, 0, 0], // 79
|
||||
[1, 1, 1, 2, 4, 2, 0, 0], // 80
|
||||
[1, 2, 1, 1, 4, 2, 0, 0], // 81
|
||||
[1, 2, 1, 2, 4, 1, 0, 0], // 82
|
||||
[1, 1, 4, 2, 1, 2, 0, 0], // 83
|
||||
[1, 2, 4, 1, 1, 2, 0, 0], // 84
|
||||
[1, 2, 4, 2, 1, 1, 0, 0], // 85
|
||||
[4, 1, 1, 2, 1, 2, 0, 0], // 86
|
||||
[4, 2, 1, 1, 1, 2, 0, 0], // 87
|
||||
[4, 2, 1, 2, 1, 1, 0, 0], // 88
|
||||
[2, 1, 2, 1, 4, 1, 0, 0], // 89
|
||||
[2, 1, 4, 1, 2, 1, 0, 0], // 90
|
||||
[4, 1, 2, 1, 2, 1, 0, 0], // 91
|
||||
[1, 1, 1, 1, 4, 3, 0, 0], // 92
|
||||
[1, 1, 1, 3, 4, 1, 0, 0], // 93
|
||||
[1, 3, 1, 1, 4, 1, 0, 0], // 94
|
||||
[1, 1, 4, 1, 1, 3, 0, 0], // 95
|
||||
[1, 1, 4, 3, 1, 1, 0, 0], // 96
|
||||
[4, 1, 1, 1, 1, 3, 0, 0], // 97
|
||||
[4, 1, 1, 3, 1, 1, 0, 0], // 98
|
||||
[1, 1, 3, 1, 4, 1, 0, 0], // 99
|
||||
[1, 1, 4, 1, 3, 1, 0, 0], // 100
|
||||
[3, 1, 1, 1, 4, 1, 0, 0], // 101
|
||||
[4, 1, 1, 1, 3, 1, 0, 0], // 102
|
||||
[2, 1, 1, 4, 1, 2, 0, 0], // 103
|
||||
[2, 1, 1, 2, 1, 4, 0, 0], // 104
|
||||
[2, 1, 1, 2, 3, 2, 0, 0], // 105
|
||||
[2, 3, 3, 1, 1, 1, 2, 0] // 106
|
||||
]
|
||||
4146
common/area.js
Normal file
4146
common/area.js
Normal file
File diff suppressed because it is too large
Load Diff
118
common/coupon.json
Normal file
118
common/coupon.json
Normal file
@ -0,0 +1,118 @@
|
||||
[
|
||||
{
|
||||
"id":1,
|
||||
"nowprice":"36.00",
|
||||
"name":"脆皮条",
|
||||
"originprice":"38.00",
|
||||
"desc":"可兑换一个脆皮条",
|
||||
"endtime":"2019-05-30 16:00:00",
|
||||
"detail":"进门店可用",
|
||||
"useArea":"全国哈根达斯",
|
||||
"imgpath":"https://eshangtech.com/ShopICO/kq4.png"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"nowprice": "28.00",
|
||||
"name": "原味鸡蛋仔+丝袜奶茶",
|
||||
"originprice": "30.00",
|
||||
"desc": "可兑换一份原味鸡蛋仔+丝袜奶茶",
|
||||
"endtime": "2019-05-30 16:00:00",
|
||||
"detail": "进门店可用",
|
||||
"useArea": "全国",
|
||||
"imgpath": "https://eshangtech.com/ShopICO/kq1.png"
|
||||
},
|
||||
{
|
||||
"id":0,
|
||||
"nowprice":"30.00",
|
||||
"name":"星冰乐中杯",
|
||||
"originprice":"34.00",
|
||||
"desc":"可兑换一杯中杯星冰乐",
|
||||
"endtime":"2019-05-30 16:00:00",
|
||||
"detail":"进门店可用",
|
||||
"useArea":"全国",
|
||||
"imgpath":"https://eshangtech.com/ShopICO/kq2.png"
|
||||
},
|
||||
|
||||
{
|
||||
"id":4,
|
||||
"nowprice":"45.00",
|
||||
"name":"肯德基50元代金券",
|
||||
"originprice":"50.00",
|
||||
"desc":"50元代金券",
|
||||
"endtime":"2019-05-30 16:00:00",
|
||||
"detail":"进门店可用",
|
||||
"useArea":"萧山服务区肯德基专用",
|
||||
"imgpath":"https://eshangtech.com/ShopICO/kq3.png"
|
||||
},
|
||||
{
|
||||
"id":3,
|
||||
"nowprice":"30.00",
|
||||
"name":"福气大肉粽套餐",
|
||||
"originprice":"40.00",
|
||||
"desc":"可兑换一份福气大肉粽套餐",
|
||||
"endtime":"2019-05-30 16:00:00",
|
||||
"detail":"进门店可用",
|
||||
"useArea":"萧山服务区门店",
|
||||
"imgpath":"https://eshangtech.com/ShopICO/kq5.png"
|
||||
},
|
||||
{
|
||||
"name": "哈根达斯专享优惠券",
|
||||
"price": 3,
|
||||
"nowprice":"52.00",
|
||||
"originprice":"55.00",
|
||||
"sellcout": 22,
|
||||
"type": 1,
|
||||
"mPrice": 55,
|
||||
"date": "2019-05-29",
|
||||
"desc": "满55可用",
|
||||
"useArea": "限哈根达斯(萧山服务区西区)门店可用",
|
||||
"detail": "限在线支付使用",
|
||||
"id": "867",
|
||||
"imgSrc": "https://eshangtech.com/ShopICO/hgds.png"
|
||||
},
|
||||
{
|
||||
"name": "兰芳园专享优惠券",
|
||||
"price": 10,
|
||||
"nowprice":"90.00",
|
||||
"originprice":"100.00",
|
||||
"sellcout": 3,
|
||||
"mPrice": 100,
|
||||
"type": 1,
|
||||
"date": "2019-05-29",
|
||||
"desc": "满100可用",
|
||||
"useArea": "限哈根达斯(萧山服务区西区)门店可用",
|
||||
"detail": "限在线支付使用",
|
||||
"id": "867",
|
||||
"imgSrc": "https://eshangtech.com/ShopICO/lfy.png"
|
||||
},
|
||||
{
|
||||
"name": "肯德基专享优惠券",
|
||||
"price": 5,
|
||||
"nowprice":"35.00",
|
||||
"originprice":"40.00",
|
||||
"sellcout": 23,
|
||||
"type": 1,
|
||||
"mPrice": 40,
|
||||
"date": "2019-05-29",
|
||||
"desc": "满40可用",
|
||||
"useArea": "限哈根达斯(萧山服务区西区)门店可用",
|
||||
"detail": "限在线支付使用",
|
||||
"id": "867",
|
||||
"imgSrc": "https://eshangtech.com/ShopICO/kdj.png"
|
||||
},
|
||||
{
|
||||
"name": "星巴克专享优惠券",
|
||||
"price": 2,
|
||||
"nowprice":"23.00",
|
||||
"originprice":"25.00",
|
||||
"sellcout": 27,
|
||||
"type": 0,
|
||||
"mPrice": 25,
|
||||
"date": "2019-05-28",
|
||||
"desc": "满25可用",
|
||||
"useArea": "限哈根达斯(萧山服务区东区)门店可用",
|
||||
"detail": "限在线支付使用",
|
||||
"id": "862",
|
||||
"imgSrc": "https://eshangtech.com/ShopICO/xbk.png"
|
||||
}
|
||||
]
|
||||
11454
common/newArea.js
Normal file
11454
common/newArea.js
Normal file
File diff suppressed because it is too large
Load Diff
812
common/qarcode.js
Normal file
812
common/qarcode.js
Normal file
@ -0,0 +1,812 @@
|
||||
var QR = (function () {
|
||||
|
||||
// alignment pattern
|
||||
var adelta = [
|
||||
0, 11, 15, 19, 23, 27, 31,
|
||||
16, 18, 20, 22, 24, 26, 28, 20, 22, 24, 24, 26, 28, 28, 22, 24, 24,
|
||||
26, 26, 28, 28, 24, 24, 26, 26, 26, 28, 28, 24, 26, 26, 26, 28, 28
|
||||
];
|
||||
|
||||
// version block
|
||||
var vpat = [
|
||||
0xc94, 0x5bc, 0xa99, 0x4d3, 0xbf6, 0x762, 0x847, 0x60d,
|
||||
0x928, 0xb78, 0x45d, 0xa17, 0x532, 0x9a6, 0x683, 0x8c9,
|
||||
0x7ec, 0xec4, 0x1e1, 0xfab, 0x08e, 0xc1a, 0x33f, 0xd75,
|
||||
0x250, 0x9d5, 0x6f0, 0x8ba, 0x79f, 0xb0b, 0x42e, 0xa64,
|
||||
0x541, 0xc69
|
||||
];
|
||||
|
||||
// final format bits with mask: level << 3 | mask
|
||||
var fmtword = [
|
||||
0x77c4, 0x72f3, 0x7daa, 0x789d, 0x662f, 0x6318, 0x6c41, 0x6976, //L
|
||||
0x5412, 0x5125, 0x5e7c, 0x5b4b, 0x45f9, 0x40ce, 0x4f97, 0x4aa0, //M
|
||||
0x355f, 0x3068, 0x3f31, 0x3a06, 0x24b4, 0x2183, 0x2eda, 0x2bed, //Q
|
||||
0x1689, 0x13be, 0x1ce7, 0x19d0, 0x0762, 0x0255, 0x0d0c, 0x083b //H
|
||||
];
|
||||
|
||||
// 4 per version: number of blocks 1,2; data width; ecc width
|
||||
var eccblocks = [
|
||||
1, 0, 19, 7, 1, 0, 16, 10, 1, 0, 13, 13, 1, 0, 9, 17,
|
||||
1, 0, 34, 10, 1, 0, 28, 16, 1, 0, 22, 22, 1, 0, 16, 28,
|
||||
1, 0, 55, 15, 1, 0, 44, 26, 2, 0, 17, 18, 2, 0, 13, 22,
|
||||
1, 0, 80, 20, 2, 0, 32, 18, 2, 0, 24, 26, 4, 0, 9, 16,
|
||||
1, 0, 108, 26, 2, 0, 43, 24, 2, 2, 15, 18, 2, 2, 11, 22,
|
||||
2, 0, 68, 18, 4, 0, 27, 16, 4, 0, 19, 24, 4, 0, 15, 28,
|
||||
2, 0, 78, 20, 4, 0, 31, 18, 2, 4, 14, 18, 4, 1, 13, 26,
|
||||
2, 0, 97, 24, 2, 2, 38, 22, 4, 2, 18, 22, 4, 2, 14, 26,
|
||||
2, 0, 116, 30, 3, 2, 36, 22, 4, 4, 16, 20, 4, 4, 12, 24,
|
||||
2, 2, 68, 18, 4, 1, 43, 26, 6, 2, 19, 24, 6, 2, 15, 28,
|
||||
4, 0, 81, 20, 1, 4, 50, 30, 4, 4, 22, 28, 3, 8, 12, 24,
|
||||
2, 2, 92, 24, 6, 2, 36, 22, 4, 6, 20, 26, 7, 4, 14, 28,
|
||||
4, 0, 107, 26, 8, 1, 37, 22, 8, 4, 20, 24, 12, 4, 11, 22,
|
||||
3, 1, 115, 30, 4, 5, 40, 24, 11, 5, 16, 20, 11, 5, 12, 24,
|
||||
5, 1, 87, 22, 5, 5, 41, 24, 5, 7, 24, 30, 11, 7, 12, 24,
|
||||
5, 1, 98, 24, 7, 3, 45, 28, 15, 2, 19, 24, 3, 13, 15, 30,
|
||||
1, 5, 107, 28, 10, 1, 46, 28, 1, 15, 22, 28, 2, 17, 14, 28,
|
||||
5, 1, 120, 30, 9, 4, 43, 26, 17, 1, 22, 28, 2, 19, 14, 28,
|
||||
3, 4, 113, 28, 3, 11, 44, 26, 17, 4, 21, 26, 9, 16, 13, 26,
|
||||
3, 5, 107, 28, 3, 13, 41, 26, 15, 5, 24, 30, 15, 10, 15, 28,
|
||||
4, 4, 116, 28, 17, 0, 42, 26, 17, 6, 22, 28, 19, 6, 16, 30,
|
||||
2, 7, 111, 28, 17, 0, 46, 28, 7, 16, 24, 30, 34, 0, 13, 24,
|
||||
4, 5, 121, 30, 4, 14, 47, 28, 11, 14, 24, 30, 16, 14, 15, 30,
|
||||
6, 4, 117, 30, 6, 14, 45, 28, 11, 16, 24, 30, 30, 2, 16, 30,
|
||||
8, 4, 106, 26, 8, 13, 47, 28, 7, 22, 24, 30, 22, 13, 15, 30,
|
||||
10, 2, 114, 28, 19, 4, 46, 28, 28, 6, 22, 28, 33, 4, 16, 30,
|
||||
8, 4, 122, 30, 22, 3, 45, 28, 8, 26, 23, 30, 12, 28, 15, 30,
|
||||
3, 10, 117, 30, 3, 23, 45, 28, 4, 31, 24, 30, 11, 31, 15, 30,
|
||||
7, 7, 116, 30, 21, 7, 45, 28, 1, 37, 23, 30, 19, 26, 15, 30,
|
||||
5, 10, 115, 30, 19, 10, 47, 28, 15, 25, 24, 30, 23, 25, 15, 30,
|
||||
13, 3, 115, 30, 2, 29, 46, 28, 42, 1, 24, 30, 23, 28, 15, 30,
|
||||
17, 0, 115, 30, 10, 23, 46, 28, 10, 35, 24, 30, 19, 35, 15, 30,
|
||||
17, 1, 115, 30, 14, 21, 46, 28, 29, 19, 24, 30, 11, 46, 15, 30,
|
||||
13, 6, 115, 30, 14, 23, 46, 28, 44, 7, 24, 30, 59, 1, 16, 30,
|
||||
12, 7, 121, 30, 12, 26, 47, 28, 39, 14, 24, 30, 22, 41, 15, 30,
|
||||
6, 14, 121, 30, 6, 34, 47, 28, 46, 10, 24, 30, 2, 64, 15, 30,
|
||||
17, 4, 122, 30, 29, 14, 46, 28, 49, 10, 24, 30, 24, 46, 15, 30,
|
||||
4, 18, 122, 30, 13, 32, 46, 28, 48, 14, 24, 30, 42, 32, 15, 30,
|
||||
20, 4, 117, 30, 40, 7, 47, 28, 43, 22, 24, 30, 10, 67, 15, 30,
|
||||
19, 6, 118, 30, 18, 31, 47, 28, 34, 34, 24, 30, 20, 61, 15, 30
|
||||
];
|
||||
|
||||
// Galois field log table
|
||||
var glog = [
|
||||
0xff, 0x00, 0x01, 0x19, 0x02, 0x32, 0x1a, 0xc6, 0x03, 0xdf, 0x33, 0xee, 0x1b, 0x68, 0xc7, 0x4b,
|
||||
0x04, 0x64, 0xe0, 0x0e, 0x34, 0x8d, 0xef, 0x81, 0x1c, 0xc1, 0x69, 0xf8, 0xc8, 0x08, 0x4c, 0x71,
|
||||
0x05, 0x8a, 0x65, 0x2f, 0xe1, 0x24, 0x0f, 0x21, 0x35, 0x93, 0x8e, 0xda, 0xf0, 0x12, 0x82, 0x45,
|
||||
0x1d, 0xb5, 0xc2, 0x7d, 0x6a, 0x27, 0xf9, 0xb9, 0xc9, 0x9a, 0x09, 0x78, 0x4d, 0xe4, 0x72, 0xa6,
|
||||
0x06, 0xbf, 0x8b, 0x62, 0x66, 0xdd, 0x30, 0xfd, 0xe2, 0x98, 0x25, 0xb3, 0x10, 0x91, 0x22, 0x88,
|
||||
0x36, 0xd0, 0x94, 0xce, 0x8f, 0x96, 0xdb, 0xbd, 0xf1, 0xd2, 0x13, 0x5c, 0x83, 0x38, 0x46, 0x40,
|
||||
0x1e, 0x42, 0xb6, 0xa3, 0xc3, 0x48, 0x7e, 0x6e, 0x6b, 0x3a, 0x28, 0x54, 0xfa, 0x85, 0xba, 0x3d,
|
||||
0xca, 0x5e, 0x9b, 0x9f, 0x0a, 0x15, 0x79, 0x2b, 0x4e, 0xd4, 0xe5, 0xac, 0x73, 0xf3, 0xa7, 0x57,
|
||||
0x07, 0x70, 0xc0, 0xf7, 0x8c, 0x80, 0x63, 0x0d, 0x67, 0x4a, 0xde, 0xed, 0x31, 0xc5, 0xfe, 0x18,
|
||||
0xe3, 0xa5, 0x99, 0x77, 0x26, 0xb8, 0xb4, 0x7c, 0x11, 0x44, 0x92, 0xd9, 0x23, 0x20, 0x89, 0x2e,
|
||||
0x37, 0x3f, 0xd1, 0x5b, 0x95, 0xbc, 0xcf, 0xcd, 0x90, 0x87, 0x97, 0xb2, 0xdc, 0xfc, 0xbe, 0x61,
|
||||
0xf2, 0x56, 0xd3, 0xab, 0x14, 0x2a, 0x5d, 0x9e, 0x84, 0x3c, 0x39, 0x53, 0x47, 0x6d, 0x41, 0xa2,
|
||||
0x1f, 0x2d, 0x43, 0xd8, 0xb7, 0x7b, 0xa4, 0x76, 0xc4, 0x17, 0x49, 0xec, 0x7f, 0x0c, 0x6f, 0xf6,
|
||||
0x6c, 0xa1, 0x3b, 0x52, 0x29, 0x9d, 0x55, 0xaa, 0xfb, 0x60, 0x86, 0xb1, 0xbb, 0xcc, 0x3e, 0x5a,
|
||||
0xcb, 0x59, 0x5f, 0xb0, 0x9c, 0xa9, 0xa0, 0x51, 0x0b, 0xf5, 0x16, 0xeb, 0x7a, 0x75, 0x2c, 0xd7,
|
||||
0x4f, 0xae, 0xd5, 0xe9, 0xe6, 0xe7, 0xad, 0xe8, 0x74, 0xd6, 0xf4, 0xea, 0xa8, 0x50, 0x58, 0xaf
|
||||
];
|
||||
|
||||
// Galios field exponent table
|
||||
var gexp = [
|
||||
0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1d, 0x3a, 0x74, 0xe8, 0xcd, 0x87, 0x13, 0x26,
|
||||
0x4c, 0x98, 0x2d, 0x5a, 0xb4, 0x75, 0xea, 0xc9, 0x8f, 0x03, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0,
|
||||
0x9d, 0x27, 0x4e, 0x9c, 0x25, 0x4a, 0x94, 0x35, 0x6a, 0xd4, 0xb5, 0x77, 0xee, 0xc1, 0x9f, 0x23,
|
||||
0x46, 0x8c, 0x05, 0x0a, 0x14, 0x28, 0x50, 0xa0, 0x5d, 0xba, 0x69, 0xd2, 0xb9, 0x6f, 0xde, 0xa1,
|
||||
0x5f, 0xbe, 0x61, 0xc2, 0x99, 0x2f, 0x5e, 0xbc, 0x65, 0xca, 0x89, 0x0f, 0x1e, 0x3c, 0x78, 0xf0,
|
||||
0xfd, 0xe7, 0xd3, 0xbb, 0x6b, 0xd6, 0xb1, 0x7f, 0xfe, 0xe1, 0xdf, 0xa3, 0x5b, 0xb6, 0x71, 0xe2,
|
||||
0xd9, 0xaf, 0x43, 0x86, 0x11, 0x22, 0x44, 0x88, 0x0d, 0x1a, 0x34, 0x68, 0xd0, 0xbd, 0x67, 0xce,
|
||||
0x81, 0x1f, 0x3e, 0x7c, 0xf8, 0xed, 0xc7, 0x93, 0x3b, 0x76, 0xec, 0xc5, 0x97, 0x33, 0x66, 0xcc,
|
||||
0x85, 0x17, 0x2e, 0x5c, 0xb8, 0x6d, 0xda, 0xa9, 0x4f, 0x9e, 0x21, 0x42, 0x84, 0x15, 0x2a, 0x54,
|
||||
0xa8, 0x4d, 0x9a, 0x29, 0x52, 0xa4, 0x55, 0xaa, 0x49, 0x92, 0x39, 0x72, 0xe4, 0xd5, 0xb7, 0x73,
|
||||
0xe6, 0xd1, 0xbf, 0x63, 0xc6, 0x91, 0x3f, 0x7e, 0xfc, 0xe5, 0xd7, 0xb3, 0x7b, 0xf6, 0xf1, 0xff,
|
||||
0xe3, 0xdb, 0xab, 0x4b, 0x96, 0x31, 0x62, 0xc4, 0x95, 0x37, 0x6e, 0xdc, 0xa5, 0x57, 0xae, 0x41,
|
||||
0x82, 0x19, 0x32, 0x64, 0xc8, 0x8d, 0x07, 0x0e, 0x1c, 0x38, 0x70, 0xe0, 0xdd, 0xa7, 0x53, 0xa6,
|
||||
0x51, 0xa2, 0x59, 0xb2, 0x79, 0xf2, 0xf9, 0xef, 0xc3, 0x9b, 0x2b, 0x56, 0xac, 0x45, 0x8a, 0x09,
|
||||
0x12, 0x24, 0x48, 0x90, 0x3d, 0x7a, 0xf4, 0xf5, 0xf7, 0xf3, 0xfb, 0xeb, 0xcb, 0x8b, 0x0b, 0x16,
|
||||
0x2c, 0x58, 0xb0, 0x7d, 0xfa, 0xe9, 0xcf, 0x83, 0x1b, 0x36, 0x6c, 0xd8, 0xad, 0x47, 0x8e, 0x00
|
||||
];
|
||||
|
||||
// Working buffers:
|
||||
// data input and ecc append, image working buffer, fixed part of image, run lengths for badness
|
||||
var strinbuf = [], eccbuf = [], qrframe = [], framask = [], rlens = [];
|
||||
// Control values - width is based on version, last 4 are from table.
|
||||
var version, width, neccblk1, neccblk2, datablkw, eccblkwid;
|
||||
var ecclevel = 2;
|
||||
// set bit to indicate cell in qrframe is immutable. symmetric around diagonal
|
||||
function setmask(x, y) {
|
||||
var bt;
|
||||
if (x > y) {
|
||||
bt = x;
|
||||
x = y;
|
||||
y = bt;
|
||||
}
|
||||
// y*y = 1+3+5...
|
||||
bt = y;
|
||||
bt *= y;
|
||||
bt += y;
|
||||
bt >>= 1;
|
||||
bt += x;
|
||||
framask[bt] = 1;
|
||||
}
|
||||
|
||||
// enter alignment pattern - black to qrframe, white to mask (later black frame merged to mask)
|
||||
function putalign(x, y) {
|
||||
var j;
|
||||
|
||||
qrframe[x + width * y] = 1;
|
||||
for (j = -2; j < 2; j++) {
|
||||
qrframe[(x + j) + width * (y - 2)] = 1;
|
||||
qrframe[(x - 2) + width * (y + j + 1)] = 1;
|
||||
qrframe[(x + 2) + width * (y + j)] = 1;
|
||||
qrframe[(x + j + 1) + width * (y + 2)] = 1;
|
||||
}
|
||||
for (j = 0; j < 2; j++) {
|
||||
setmask(x - 1, y + j);
|
||||
setmask(x + 1, y - j);
|
||||
setmask(x - j, y - 1);
|
||||
setmask(x + j, y + 1);
|
||||
}
|
||||
}
|
||||
|
||||
//========================================================================
|
||||
// Reed Solomon error correction
|
||||
// exponentiation mod N
|
||||
function modnn(x) {
|
||||
while (x >= 255) {
|
||||
x -= 255;
|
||||
x = (x >> 8) + (x & 255);
|
||||
}
|
||||
return x;
|
||||
}
|
||||
|
||||
var genpoly = [];
|
||||
|
||||
// Calculate and append ECC data to data block. Block is in strinbuf, indexes to buffers given.
|
||||
function appendrs(data, dlen, ecbuf, eclen) {
|
||||
var i, j, fb;
|
||||
|
||||
for (i = 0; i < eclen; i++)
|
||||
strinbuf[ecbuf + i] = 0;
|
||||
for (i = 0; i < dlen; i++) {
|
||||
fb = glog[strinbuf[data + i] ^ strinbuf[ecbuf]];
|
||||
if (fb != 255) /* fb term is non-zero */
|
||||
for (j = 1; j < eclen; j++)
|
||||
strinbuf[ecbuf + j - 1] = strinbuf[ecbuf + j] ^ gexp[modnn(fb + genpoly[eclen - j])];
|
||||
else
|
||||
for (j = ecbuf; j < ecbuf + eclen; j++)
|
||||
strinbuf[j] = strinbuf[j + 1];
|
||||
strinbuf[ecbuf + eclen - 1] = fb == 255 ? 0 : gexp[modnn(fb + genpoly[0])];
|
||||
}
|
||||
}
|
||||
|
||||
//========================================================================
|
||||
// Frame data insert following the path rules
|
||||
|
||||
// check mask - since symmetrical use half.
|
||||
function ismasked(x, y) {
|
||||
var bt;
|
||||
if (x > y) {
|
||||
bt = x;
|
||||
x = y;
|
||||
y = bt;
|
||||
}
|
||||
bt = y;
|
||||
bt += y * y;
|
||||
bt >>= 1;
|
||||
bt += x;
|
||||
return framask[bt];
|
||||
}
|
||||
|
||||
//========================================================================
|
||||
// Apply the selected mask out of the 8.
|
||||
function applymask(m) {
|
||||
var x, y, r3x, r3y;
|
||||
|
||||
switch (m) {
|
||||
case 0:
|
||||
for (y = 0; y < width; y++)
|
||||
for (x = 0; x < width; x++)
|
||||
if (!((x + y) & 1) && !ismasked(x, y))
|
||||
qrframe[x + y * width] ^= 1;
|
||||
break;
|
||||
case 1:
|
||||
for (y = 0; y < width; y++)
|
||||
for (x = 0; x < width; x++)
|
||||
if (!(y & 1) && !ismasked(x, y))
|
||||
qrframe[x + y * width] ^= 1;
|
||||
break;
|
||||
case 2:
|
||||
for (y = 0; y < width; y++)
|
||||
for (r3x = 0, x = 0; x < width; x++ , r3x++) {
|
||||
if (r3x == 3)
|
||||
r3x = 0;
|
||||
if (!r3x && !ismasked(x, y))
|
||||
qrframe[x + y * width] ^= 1;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
for (r3y = 0, y = 0; y < width; y++ , r3y++) {
|
||||
if (r3y == 3)
|
||||
r3y = 0;
|
||||
for (r3x = r3y, x = 0; x < width; x++ , r3x++) {
|
||||
if (r3x == 3)
|
||||
r3x = 0;
|
||||
if (!r3x && !ismasked(x, y))
|
||||
qrframe[x + y * width] ^= 1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
for (y = 0; y < width; y++)
|
||||
for (r3x = 0, r3y = ((y >> 1) & 1), x = 0; x < width; x++ , r3x++) {
|
||||
if (r3x == 3) {
|
||||
r3x = 0;
|
||||
r3y = !r3y;
|
||||
}
|
||||
if (!r3y && !ismasked(x, y))
|
||||
qrframe[x + y * width] ^= 1;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
for (r3y = 0, y = 0; y < width; y++ , r3y++) {
|
||||
if (r3y == 3)
|
||||
r3y = 0;
|
||||
for (r3x = 0, x = 0; x < width; x++ , r3x++) {
|
||||
if (r3x == 3)
|
||||
r3x = 0;
|
||||
if (!((x & y & 1) + !(!r3x | !r3y)) && !ismasked(x, y))
|
||||
qrframe[x + y * width] ^= 1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
for (r3y = 0, y = 0; y < width; y++ , r3y++) {
|
||||
if (r3y == 3)
|
||||
r3y = 0;
|
||||
for (r3x = 0, x = 0; x < width; x++ , r3x++) {
|
||||
if (r3x == 3)
|
||||
r3x = 0;
|
||||
if (!(((x & y & 1) + (r3x && (r3x == r3y))) & 1) && !ismasked(x, y))
|
||||
qrframe[x + y * width] ^= 1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
for (r3y = 0, y = 0; y < width; y++ , r3y++) {
|
||||
if (r3y == 3)
|
||||
r3y = 0;
|
||||
for (r3x = 0, x = 0; x < width; x++ , r3x++) {
|
||||
if (r3x == 3)
|
||||
r3x = 0;
|
||||
if (!(((r3x && (r3x == r3y)) + ((x + y) & 1)) & 1) && !ismasked(x, y))
|
||||
qrframe[x + y * width] ^= 1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Badness coefficients.
|
||||
var N1 = 3, N2 = 3, N3 = 40, N4 = 10;
|
||||
|
||||
// Using the table of the length of each run, calculate the amount of bad image
|
||||
// - long runs or those that look like finders; called twice, once each for X and Y
|
||||
function badruns(length) {
|
||||
var i;
|
||||
var runsbad = 0;
|
||||
for (i = 0; i <= length; i++)
|
||||
if (rlens[i] >= 5)
|
||||
runsbad += N1 + rlens[i] - 5;
|
||||
// BwBBBwB as in finder
|
||||
for (i = 3; i < length - 1; i += 2)
|
||||
if (rlens[i - 2] == rlens[i + 2]
|
||||
&& rlens[i + 2] == rlens[i - 1]
|
||||
&& rlens[i - 1] == rlens[i + 1]
|
||||
&& rlens[i - 1] * 3 == rlens[i]
|
||||
// white around the black pattern? Not part of spec
|
||||
&& (rlens[i - 3] == 0 // beginning
|
||||
|| i + 3 > length // end
|
||||
|| rlens[i - 3] * 3 >= rlens[i] * 4 || rlens[i + 3] * 3 >= rlens[i] * 4)
|
||||
)
|
||||
runsbad += N3;
|
||||
return runsbad;
|
||||
}
|
||||
|
||||
// Calculate how bad the masked image is - blocks, imbalance, runs, or finders.
|
||||
function badcheck() {
|
||||
var x, y, h, b, b1;
|
||||
var thisbad = 0;
|
||||
var bw = 0;
|
||||
|
||||
// blocks of same color.
|
||||
for (y = 0; y < width - 1; y++)
|
||||
for (x = 0; x < width - 1; x++)
|
||||
if ((qrframe[x + width * y] && qrframe[(x + 1) + width * y]
|
||||
&& qrframe[x + width * (y + 1)] && qrframe[(x + 1) + width * (y + 1)]) // all black
|
||||
|| !(qrframe[x + width * y] || qrframe[(x + 1) + width * y]
|
||||
|| qrframe[x + width * (y + 1)] || qrframe[(x + 1) + width * (y + 1)])) // all white
|
||||
thisbad += N2;
|
||||
|
||||
// X runs
|
||||
for (y = 0; y < width; y++) {
|
||||
rlens[0] = 0;
|
||||
for (h = b = x = 0; x < width; x++) {
|
||||
if ((b1 = qrframe[x + width * y]) == b)
|
||||
rlens[h]++;
|
||||
else
|
||||
rlens[++h] = 1;
|
||||
b = b1;
|
||||
bw += b ? 1 : -1;
|
||||
}
|
||||
thisbad += badruns(h);
|
||||
}
|
||||
|
||||
// black/white imbalance
|
||||
if (bw < 0)
|
||||
bw = -bw;
|
||||
|
||||
var big = bw;
|
||||
var count = 0;
|
||||
big += big << 2;
|
||||
big <<= 1;
|
||||
while (big > width * width)
|
||||
big -= width * width, count++;
|
||||
thisbad += count * N4;
|
||||
|
||||
// Y runs
|
||||
for (x = 0; x < width; x++) {
|
||||
rlens[0] = 0;
|
||||
for (h = b = y = 0; y < width; y++) {
|
||||
if ((b1 = qrframe[x + width * y]) == b)
|
||||
rlens[h]++;
|
||||
else
|
||||
rlens[++h] = 1;
|
||||
b = b1;
|
||||
}
|
||||
thisbad += badruns(h);
|
||||
}
|
||||
return thisbad;
|
||||
}
|
||||
|
||||
function genframe(instring) {
|
||||
var x, y, k, t, v, i, j, m;
|
||||
|
||||
// find the smallest version that fits the string
|
||||
t = instring.length;
|
||||
version = 0;
|
||||
do {
|
||||
version++;
|
||||
k = (ecclevel - 1) * 4 + (version - 1) * 16;
|
||||
neccblk1 = eccblocks[k++];
|
||||
neccblk2 = eccblocks[k++];
|
||||
datablkw = eccblocks[k++];
|
||||
eccblkwid = eccblocks[k];
|
||||
k = datablkw * (neccblk1 + neccblk2) + neccblk2 - 3 + (version <= 9);
|
||||
if (t <= k)
|
||||
break;
|
||||
} while (version < 40);
|
||||
|
||||
// FIXME - insure that it fits insted of being truncated
|
||||
width = 17 + 4 * version;
|
||||
|
||||
// allocate, clear and setup data structures
|
||||
v = datablkw + (datablkw + eccblkwid) * (neccblk1 + neccblk2) + neccblk2;
|
||||
for (t = 0; t < v; t++)
|
||||
eccbuf[t] = 0;
|
||||
strinbuf = instring.slice(0);
|
||||
|
||||
for (t = 0; t < width * width; t++)
|
||||
qrframe[t] = 0;
|
||||
|
||||
for (t = 0; t < (width * (width + 1) + 1) / 2; t++)
|
||||
framask[t] = 0;
|
||||
|
||||
// insert finders - black to frame, white to mask
|
||||
for (t = 0; t < 3; t++) {
|
||||
k = 0;
|
||||
y = 0;
|
||||
if (t == 1)
|
||||
k = (width - 7);
|
||||
if (t == 2)
|
||||
y = (width - 7);
|
||||
qrframe[(y + 3) + width * (k + 3)] = 1;
|
||||
for (x = 0; x < 6; x++) {
|
||||
qrframe[(y + x) + width * k] = 1;
|
||||
qrframe[y + width * (k + x + 1)] = 1;
|
||||
qrframe[(y + 6) + width * (k + x)] = 1;
|
||||
qrframe[(y + x + 1) + width * (k + 6)] = 1;
|
||||
}
|
||||
for (x = 1; x < 5; x++) {
|
||||
setmask(y + x, k + 1);
|
||||
setmask(y + 1, k + x + 1);
|
||||
setmask(y + 5, k + x);
|
||||
setmask(y + x + 1, k + 5);
|
||||
}
|
||||
for (x = 2; x < 4; x++) {
|
||||
qrframe[(y + x) + width * (k + 2)] = 1;
|
||||
qrframe[(y + 2) + width * (k + x + 1)] = 1;
|
||||
qrframe[(y + 4) + width * (k + x)] = 1;
|
||||
qrframe[(y + x + 1) + width * (k + 4)] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
// alignment blocks
|
||||
if (version > 1) {
|
||||
t = adelta[version];
|
||||
y = width - 7;
|
||||
for (; ;) {
|
||||
x = width - 7;
|
||||
while (x > t - 3) {
|
||||
putalign(x, y);
|
||||
if (x < t)
|
||||
break;
|
||||
x -= t;
|
||||
}
|
||||
if (y <= t + 9)
|
||||
break;
|
||||
y -= t;
|
||||
putalign(6, y);
|
||||
putalign(y, 6);
|
||||
}
|
||||
}
|
||||
|
||||
// single black
|
||||
qrframe[8 + width * (width - 8)] = 1;
|
||||
|
||||
// timing gap - mask only
|
||||
for (y = 0; y < 7; y++) {
|
||||
setmask(7, y);
|
||||
setmask(width - 8, y);
|
||||
setmask(7, y + width - 7);
|
||||
}
|
||||
for (x = 0; x < 8; x++) {
|
||||
setmask(x, 7);
|
||||
setmask(x + width - 8, 7);
|
||||
setmask(x, width - 8);
|
||||
}
|
||||
|
||||
// reserve mask-format area
|
||||
for (x = 0; x < 9; x++)
|
||||
setmask(x, 8);
|
||||
for (x = 0; x < 8; x++) {
|
||||
setmask(x + width - 8, 8);
|
||||
setmask(8, x);
|
||||
}
|
||||
for (y = 0; y < 7; y++)
|
||||
setmask(8, y + width - 7);
|
||||
|
||||
// timing row/col
|
||||
for (x = 0; x < width - 14; x++)
|
||||
if (x & 1) {
|
||||
setmask(8 + x, 6);
|
||||
setmask(6, 8 + x);
|
||||
}
|
||||
else {
|
||||
qrframe[(8 + x) + width * 6] = 1;
|
||||
qrframe[6 + width * (8 + x)] = 1;
|
||||
}
|
||||
|
||||
// version block
|
||||
if (version > 6) {
|
||||
t = vpat[version - 7];
|
||||
k = 17;
|
||||
for (x = 0; x < 6; x++)
|
||||
for (y = 0; y < 3; y++ , k--)
|
||||
if (1 & (k > 11 ? version >> (k - 12) : t >> k)) {
|
||||
qrframe[(5 - x) + width * (2 - y + width - 11)] = 1;
|
||||
qrframe[(2 - y + width - 11) + width * (5 - x)] = 1;
|
||||
}
|
||||
else {
|
||||
setmask(5 - x, 2 - y + width - 11);
|
||||
setmask(2 - y + width - 11, 5 - x);
|
||||
}
|
||||
}
|
||||
|
||||
// sync mask bits - only set above for white spaces, so add in black bits
|
||||
for (y = 0; y < width; y++)
|
||||
for (x = 0; x <= y; x++)
|
||||
if (qrframe[x + width * y])
|
||||
setmask(x, y);
|
||||
|
||||
// convert string to bitstream
|
||||
// 8 bit data to QR-coded 8 bit data (numeric or alphanum, or kanji not supported)
|
||||
v = strinbuf.length;
|
||||
|
||||
// string to array
|
||||
for (i = 0; i < v; i++)
|
||||
eccbuf[i] = strinbuf.charCodeAt(i);
|
||||
strinbuf = eccbuf.slice(0);
|
||||
|
||||
// calculate max string length
|
||||
x = datablkw * (neccblk1 + neccblk2) + neccblk2;
|
||||
if (v >= x - 2) {
|
||||
v = x - 2;
|
||||
if (version > 9)
|
||||
v--;
|
||||
}
|
||||
|
||||
// shift and repack to insert length prefix
|
||||
i = v;
|
||||
if (version > 9) {
|
||||
strinbuf[i + 2] = 0;
|
||||
strinbuf[i + 3] = 0;
|
||||
while (i--) {
|
||||
t = strinbuf[i];
|
||||
strinbuf[i + 3] |= 255 & (t << 4);
|
||||
strinbuf[i + 2] = t >> 4;
|
||||
}
|
||||
strinbuf[2] |= 255 & (v << 4);
|
||||
strinbuf[1] = v >> 4;
|
||||
strinbuf[0] = 0x40 | (v >> 12);
|
||||
}
|
||||
else {
|
||||
strinbuf[i + 1] = 0;
|
||||
strinbuf[i + 2] = 0;
|
||||
while (i--) {
|
||||
t = strinbuf[i];
|
||||
strinbuf[i + 2] |= 255 & (t << 4);
|
||||
strinbuf[i + 1] = t >> 4;
|
||||
}
|
||||
strinbuf[1] |= 255 & (v << 4);
|
||||
strinbuf[0] = 0x40 | (v >> 4);
|
||||
}
|
||||
// fill to end with pad pattern
|
||||
i = v + 3 - (version < 10);
|
||||
while (i < x) {
|
||||
strinbuf[i++] = 0xec;
|
||||
// buffer has room if (i == x) break;
|
||||
strinbuf[i++] = 0x11;
|
||||
}
|
||||
|
||||
// calculate and append ECC
|
||||
|
||||
// calculate generator polynomial
|
||||
genpoly[0] = 1;
|
||||
for (i = 0; i < eccblkwid; i++) {
|
||||
genpoly[i + 1] = 1;
|
||||
for (j = i; j > 0; j--)
|
||||
genpoly[j] = genpoly[j]
|
||||
? genpoly[j - 1] ^ gexp[modnn(glog[genpoly[j]] + i)] : genpoly[j - 1];
|
||||
genpoly[0] = gexp[modnn(glog[genpoly[0]] + i)];
|
||||
}
|
||||
for (i = 0; i <= eccblkwid; i++)
|
||||
genpoly[i] = glog[genpoly[i]]; // use logs for genpoly[] to save calc step
|
||||
|
||||
// append ecc to data buffer
|
||||
k = x;
|
||||
y = 0;
|
||||
for (i = 0; i < neccblk1; i++) {
|
||||
appendrs(y, datablkw, k, eccblkwid);
|
||||
y += datablkw;
|
||||
k += eccblkwid;
|
||||
}
|
||||
for (i = 0; i < neccblk2; i++) {
|
||||
appendrs(y, datablkw + 1, k, eccblkwid);
|
||||
y += datablkw + 1;
|
||||
k += eccblkwid;
|
||||
}
|
||||
// interleave blocks
|
||||
y = 0;
|
||||
for (i = 0; i < datablkw; i++) {
|
||||
for (j = 0; j < neccblk1; j++)
|
||||
eccbuf[y++] = strinbuf[i + j * datablkw];
|
||||
for (j = 0; j < neccblk2; j++)
|
||||
eccbuf[y++] = strinbuf[(neccblk1 * datablkw) + i + (j * (datablkw + 1))];
|
||||
}
|
||||
for (j = 0; j < neccblk2; j++)
|
||||
eccbuf[y++] = strinbuf[(neccblk1 * datablkw) + i + (j * (datablkw + 1))];
|
||||
for (i = 0; i < eccblkwid; i++)
|
||||
for (j = 0; j < neccblk1 + neccblk2; j++)
|
||||
eccbuf[y++] = strinbuf[x + i + j * eccblkwid];
|
||||
strinbuf = eccbuf;
|
||||
|
||||
// pack bits into frame avoiding masked area.
|
||||
x = y = width - 1;
|
||||
k = v = 1; // up, minus
|
||||
/* inteleaved data and ecc codes */
|
||||
m = (datablkw + eccblkwid) * (neccblk1 + neccblk2) + neccblk2;
|
||||
for (i = 0; i < m; i++) {
|
||||
t = strinbuf[i];
|
||||
for (j = 0; j < 8; j++ , t <<= 1) {
|
||||
if (0x80 & t)
|
||||
qrframe[x + width * y] = 1;
|
||||
do { // find next fill position
|
||||
if (v)
|
||||
x--;
|
||||
else {
|
||||
x++;
|
||||
if (k) {
|
||||
if (y != 0)
|
||||
y--;
|
||||
else {
|
||||
x -= 2;
|
||||
k = !k;
|
||||
if (x == 6) {
|
||||
x--;
|
||||
y = 9;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (y != width - 1)
|
||||
y++;
|
||||
else {
|
||||
x -= 2;
|
||||
k = !k;
|
||||
if (x == 6) {
|
||||
x--;
|
||||
y -= 8;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
v = !v;
|
||||
} while (ismasked(x, y));
|
||||
}
|
||||
}
|
||||
|
||||
// save pre-mask copy of frame
|
||||
strinbuf = qrframe.slice(0);
|
||||
t = 0; // best
|
||||
y = 30000; // demerit
|
||||
// for instead of while since in original arduino code
|
||||
// if an early mask was "good enough" it wouldn't try for a better one
|
||||
// since they get more complex and take longer.
|
||||
for (k = 0; k < 8; k++) {
|
||||
applymask(k); // returns black-white imbalance
|
||||
x = badcheck();
|
||||
if (x < y) { // current mask better than previous best?
|
||||
y = x;
|
||||
t = k;
|
||||
}
|
||||
if (t == 7)
|
||||
break; // don't increment i to a void redoing mask
|
||||
qrframe = strinbuf.slice(0); // reset for next pass
|
||||
}
|
||||
if (t != k) // redo best mask - none good enough, last wasn't t
|
||||
applymask(t);
|
||||
|
||||
// add in final mask/ecclevel bytes
|
||||
y = fmtword[t + ((ecclevel - 1) << 3)];
|
||||
// low byte
|
||||
for (k = 0; k < 8; k++ , y >>= 1)
|
||||
if (y & 1) {
|
||||
qrframe[(width - 1 - k) + width * 8] = 1;
|
||||
if (k < 6)
|
||||
qrframe[8 + width * k] = 1;
|
||||
else
|
||||
qrframe[8 + width * (k + 1)] = 1;
|
||||
}
|
||||
// high byte
|
||||
for (k = 0; k < 7; k++ , y >>= 1)
|
||||
if (y & 1) {
|
||||
qrframe[8 + width * (width - 7 + k)] = 1;
|
||||
if (k)
|
||||
qrframe[(6 - k) + width * 8] = 1;
|
||||
else
|
||||
qrframe[7 + width * 8] = 1;
|
||||
}
|
||||
return qrframe;
|
||||
}
|
||||
|
||||
var drawImg = function (src, width, ctx) {
|
||||
var imgSize = width / 10;
|
||||
var imgheight = width / 9;
|
||||
var imgPos = width / 20 * 9;
|
||||
var imgPosFix = width / 120;
|
||||
ctx.strokeStyle = '#fff';
|
||||
ctx.lineWidth = 1;
|
||||
ctx.globalAlpha = 1;
|
||||
ctx.lineCap = "round";
|
||||
ctx.lineJoin = "round";
|
||||
|
||||
ctx.beginPath();
|
||||
|
||||
ctx.moveTo(imgPos - imgPosFix, imgPos - imgPosFix);
|
||||
|
||||
// 绘制layer
|
||||
// ctx.lineTo(imgPos + imgSize + imgPosFix, imgPos - imgPosFix);
|
||||
// ctx.lineTo(imgPos + imgSize + imgPosFix, imgPos + imgSize + imgPosFix);
|
||||
// ctx.lineTo(imgPos - imgPosFix, imgPos + imgSize + imgPosFix);
|
||||
// ctx.lineTo(imgPos - imgPosFix, imgPos - imgPosFix);
|
||||
|
||||
ctx.stroke();
|
||||
ctx.closePath();
|
||||
|
||||
ctx.drawImage(src, imgPos, imgPos, imgSize, imgheight);
|
||||
ctx.beginPath();
|
||||
}
|
||||
|
||||
|
||||
var _canvas = null;
|
||||
|
||||
var api = {
|
||||
|
||||
get ecclevel() {
|
||||
return ecclevel;
|
||||
},
|
||||
|
||||
set ecclevel(val) {
|
||||
ecclevel = val;
|
||||
},
|
||||
|
||||
get size() {
|
||||
return _size;
|
||||
},
|
||||
|
||||
set size(val) {
|
||||
_size = val
|
||||
},
|
||||
|
||||
get canvas() {
|
||||
return _canvas;
|
||||
},
|
||||
|
||||
set canvas(el) {
|
||||
_canvas = el;
|
||||
},
|
||||
|
||||
getFrame: function (string) {
|
||||
return genframe(string);
|
||||
},
|
||||
//这里的utf16to8(str)是对Text中的字符串进行转码,让其支持中文
|
||||
utf16to8: function (str) {
|
||||
var out, i, len, c;
|
||||
|
||||
out = "";
|
||||
len = str.length;
|
||||
for (i = 0; i < len; i++) {
|
||||
c = str.charCodeAt(i);
|
||||
if ((c >= 0x0001) && (c <= 0x007F)) {
|
||||
out += str.charAt(i);
|
||||
} else if (c > 0x07FF) {
|
||||
out += String.fromCharCode(0xE0 | ((c >> 12) & 0x0F));
|
||||
out += String.fromCharCode(0x80 | ((c >> 6) & 0x3F));
|
||||
out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
|
||||
} else {
|
||||
out += String.fromCharCode(0xC0 | ((c >> 6) & 0x1F));
|
||||
out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
|
||||
}
|
||||
}
|
||||
return out;
|
||||
},
|
||||
|
||||
///绘制二维码
|
||||
draw: function (str, canvas, cavW, cavH, ecc, src) {
|
||||
|
||||
ecclevel = ecc || ecclevel;
|
||||
canvas = canvas || _canvas;
|
||||
if (!canvas) {
|
||||
console.warn('No canvas provided to draw QR code in!')
|
||||
return;
|
||||
}
|
||||
var size = Math.min(cavW, cavH);
|
||||
str = this.utf16to8(str);//增加中文显示
|
||||
//console.log(str)
|
||||
var frame = this.getFrame(str),
|
||||
ctx = wx.createCanvasContext(canvas),
|
||||
px = Math.round(size / (width + 8));
|
||||
var roundedSize = px * (width + 8),
|
||||
offset = Math.floor((size - roundedSize) / 2);
|
||||
size = roundedSize;
|
||||
ctx.clearRect(0, 0, cavW, cavW);
|
||||
ctx.setFillStyle('#000000');
|
||||
for (var i = 0; i < width; i++) {
|
||||
for (var j = 0; j < width; j++) {
|
||||
if (frame[j * width + i]) {
|
||||
ctx.fillRect(px * (4 + i) + offset, px * (4 + j) + offset, px, px);
|
||||
}
|
||||
}
|
||||
}
|
||||
drawImg(src, cavW, ctx);
|
||||
ctx.draw();
|
||||
}
|
||||
}
|
||||
module.exports = {
|
||||
qrApi: api
|
||||
}
|
||||
|
||||
})();
|
||||
312
common/shopList.json
Normal file
312
common/shopList.json
Normal file
@ -0,0 +1,312 @@
|
||||
{
|
||||
"catList": [
|
||||
{
|
||||
"id": 49,
|
||||
"shopId": 1,
|
||||
"categoryName": "22",
|
||||
"createTime": 1509004117000,
|
||||
"goodsList": []
|
||||
},
|
||||
{
|
||||
"id": 48,
|
||||
"shopId": 1,
|
||||
"categoryName": "6666",
|
||||
"createTime": 1509004096000,
|
||||
"goodsList": []
|
||||
},
|
||||
{
|
||||
"id": 47,
|
||||
"shopId": 1,
|
||||
"categoryName": "牛肉",
|
||||
"createTime": 1509003890000,
|
||||
"goodsList": []
|
||||
},
|
||||
{
|
||||
"id": 46,
|
||||
"shopId": 1,
|
||||
"categoryName": "海鲜",
|
||||
"createTime": 1508403109000,
|
||||
"goodsList": []
|
||||
},
|
||||
{
|
||||
"id": 45,
|
||||
"shopId": 1,
|
||||
"categoryName": "GG",
|
||||
"createTime": 1508402074000,
|
||||
"goodsList": []
|
||||
},
|
||||
{
|
||||
"id": 44,
|
||||
"shopId": 1,
|
||||
"categoryName": "炸药",
|
||||
"createTime": 1508400823000,
|
||||
"goodsList": []
|
||||
},
|
||||
{
|
||||
"id": 41,
|
||||
"shopId": 1,
|
||||
"categoryName": "555555",
|
||||
"createTime": 1507626025000,
|
||||
"goodsList": []
|
||||
},
|
||||
{
|
||||
"id": 40,
|
||||
"shopId": 1,
|
||||
"categoryName": "96969",
|
||||
"createTime": 1507625996000,
|
||||
"goodsList": []
|
||||
},
|
||||
{
|
||||
"id": 39,
|
||||
"shopId": 1,
|
||||
"categoryName": "55",
|
||||
"createTime": 1507625974000,
|
||||
"goodsList": []
|
||||
},
|
||||
{
|
||||
"id": 36,
|
||||
"shopId": 1,
|
||||
"categoryName": "马肉",
|
||||
"createTime": 1505871886000,
|
||||
"goodsList": [
|
||||
{
|
||||
"id": 42,
|
||||
"shopId": 1,
|
||||
"catId": 36,
|
||||
"name": "213",
|
||||
"store": 34,
|
||||
"image": "http://119.23.56.196:8888/prizeclawspc/resource/images/item/15096878908242 (2).png",
|
||||
"price": 23,
|
||||
"disabled": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 35,
|
||||
"shopId": 1,
|
||||
"categoryName": "猪头",
|
||||
"createTime": 1505871874000,
|
||||
"goodsList": [
|
||||
{
|
||||
"id": 47,
|
||||
"shopId": 1,
|
||||
"catId": 35,
|
||||
"name": "2",
|
||||
"store": 2,
|
||||
"image": "http://119.23.56.196:8888/prizeclawspc/resource/images/item/15096878908242 (2).png",
|
||||
"price": 2,
|
||||
"disabled": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 34,
|
||||
"shopId": 1,
|
||||
"categoryName": "小笼包",
|
||||
"createTime": 1505871796000,
|
||||
"goodsList": [
|
||||
{
|
||||
"id": 44,
|
||||
"shopId": 1,
|
||||
"catId": 34,
|
||||
"name": "213",
|
||||
"store": 5,
|
||||
"image": "http://119.23.56.196:8888/prizeclawspc/resource/images/item/15096878908242 (2).png",
|
||||
"price": 60,
|
||||
"disabled": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 33,
|
||||
"shopId": 1,
|
||||
"categoryName": "干果",
|
||||
"createTime": 1505871674000,
|
||||
"goodsList": []
|
||||
},
|
||||
{
|
||||
"id": 32,
|
||||
"shopId": 1,
|
||||
"categoryName": "板砖",
|
||||
"createTime": 1505799519000,
|
||||
"goodsList": []
|
||||
},
|
||||
{
|
||||
"id": 31,
|
||||
"shopId": 1,
|
||||
"categoryName": "炸药",
|
||||
"createTime": 1505799073000,
|
||||
"goodsList": []
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"shopId": 1,
|
||||
"categoryName": "肉",
|
||||
"createTime": 1505791642000,
|
||||
"goodsList": [
|
||||
{
|
||||
"id": 43,
|
||||
"shopId": 1,
|
||||
"catId": 5,
|
||||
"name": "狗腿腊肉",
|
||||
"store": 60,
|
||||
"image": "http://119.23.56.196:8888/prizeclawspc/resource/images/item/15096878908242 (2).png",
|
||||
"price": 88,
|
||||
"disabled": 0
|
||||
},
|
||||
{
|
||||
"id": 52,
|
||||
"shopId": 1,
|
||||
"catId": 5,
|
||||
"name": "麻鸡",
|
||||
"store": 10,
|
||||
"image": "http://119.23.56.196:8888/prizeclawspc/resource/images/item/15096878908242 (2).png",
|
||||
"price": 10,
|
||||
"disabled": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"shopId": 1,
|
||||
"categoryName": "王者农药皮肤",
|
||||
"createTime": 1501229094000,
|
||||
"goodsList": [
|
||||
{
|
||||
"id": 7,
|
||||
"shopId": 1,
|
||||
"catId": 8,
|
||||
"name": "拉不住的亚瑟",
|
||||
"store": 50,
|
||||
"image": "http://119.23.56.196:8888/prizeclawspc/resource/images/item/15096878908242 (2).png",
|
||||
"price": 22.2,
|
||||
"disabled": 0
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"shopId": 1,
|
||||
"catId": 8,
|
||||
"name": "拉不住的德玛西亚",
|
||||
"store": 22,
|
||||
"image": "http://119.23.56.196:8888/prizeclawspc/resource/images/item/15096878908242 (2).png",
|
||||
"price": 22,
|
||||
"disabled": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"shopId": 1,
|
||||
"categoryName": "lol皮肤",
|
||||
"createTime": 1501229086000,
|
||||
"goodsList": [
|
||||
{
|
||||
"id": 6,
|
||||
"shopId": 1,
|
||||
"catId": 7,
|
||||
"name": "德玛西亚",
|
||||
"store": 99,
|
||||
"image": "http://119.23.56.196:8888/prizeclawspc/resource/images/item/15096878908242 (2).png",
|
||||
"price": 99,
|
||||
"disabled": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"shopId": 1,
|
||||
"categoryName": "飞机大炮",
|
||||
"createTime": 1501229077000,
|
||||
"goodsList": [
|
||||
{
|
||||
"id": 5,
|
||||
"shopId": 1,
|
||||
"catId": 6,
|
||||
"name": "大刀",
|
||||
"store": 10,
|
||||
"image": "http://119.23.56.196:8888/prizeclawspc/resource/images/item/15096878908242 (2).png",
|
||||
"price": 32.41,
|
||||
"disabled": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"shopId": 1,
|
||||
"categoryName": "零食",
|
||||
"createTime": 1500971858000,
|
||||
"goodsList": [
|
||||
{
|
||||
"id": 2,
|
||||
"shopId": 1,
|
||||
"catId": 4,
|
||||
"name": "山泉水",
|
||||
"store": 100,
|
||||
"image": "http://119.23.56.196:8888/prizeclawspc/resource/images/item/15096878908242 (2).png",
|
||||
"price": 0.01,
|
||||
"disabled": 0
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"shopId": 1,
|
||||
"catId": 4,
|
||||
"name": "中华",
|
||||
"store": 100,
|
||||
"image": "http://119.23.56.196:8888/prizeclawspc/resource/images/item/15096878908242 (2).png",
|
||||
"price": 50,
|
||||
"disabled": 0
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"shopId": 1,
|
||||
"catId": 4,
|
||||
"name": "老婆饼",
|
||||
"store": 100,
|
||||
"image": "http://119.23.56.196:8888/prizeclawspc/resource/images/item/15096878908242 (2).png",
|
||||
"price": 100,
|
||||
"disabled": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"shopId": 1,
|
||||
"categoryName": "酒水",
|
||||
"createTime": 1500971822000,
|
||||
"goodsList": [
|
||||
{
|
||||
"id": 1,
|
||||
"shopId": 1,
|
||||
"catId": 1,
|
||||
"name": "矿泉水",
|
||||
"store": 100,
|
||||
"image": "http://119.23.56.196:8888/prizeclawspc/resource/images/item/15096878908242 (2).png",
|
||||
"price": 0.01,
|
||||
"disabled": 1
|
||||
},
|
||||
{
|
||||
"id": 48,
|
||||
"shopId": 1,
|
||||
"catId": 1,
|
||||
"name": "纯生",
|
||||
"store": 800,
|
||||
"image": "http://119.23.56.196:8888/prizeclawspc/resource/images/item/15096878908242 (2).png",
|
||||
"price": 6.5,
|
||||
"disabled": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"shop": {
|
||||
"id": 1,
|
||||
"name": "起帆棋牌",
|
||||
"avatar": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1502800400869&di=a588089ff0d0072abafc3f2ec3c01806&imgtype=0&src=http%3A%2F%2Fp.zhuna.cn%2FHotel_Images%2F33479%2F283b40cb-30d5-403d-b583-d7ace1afd8a0.jpg",
|
||||
"timeStart": 1500543684000,
|
||||
"timeEnd": 1500565289000,
|
||||
"mobile": "13602427535",
|
||||
"status": 2,
|
||||
"areaId": 440100,
|
||||
"addr": "临江大道57号中和广场16A"
|
||||
},
|
||||
"hasFav": 0
|
||||
}
|
||||
215
components/card.vue
Normal file
215
components/card.vue
Normal file
@ -0,0 +1,215 @@
|
||||
<template>
|
||||
<!-- <div class="coupon-list"> -->
|
||||
<div class="coupon-card">
|
||||
<div class="coupon-top">
|
||||
<image
|
||||
class="coupon-img"
|
||||
:src="
|
||||
props.CouponImgUrl || 'https://eshangtech.com/ShopICO/no-picture.png'
|
||||
"
|
||||
/>
|
||||
<div style="width: 362rpx">
|
||||
<div class="coupon-name">{{ props.CouponName }}</div>
|
||||
<div class="coupon-type-text">{{ props.CouponTypeText }}</div>
|
||||
<div class="coupon-center">
|
||||
<span class="coupon-date" v-if="props.CouponSendId"
|
||||
>有效期至{{ props.EndTime }}</span
|
||||
>
|
||||
<span class="coupon-date" v-else>活动至{{ props.EndTime }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="coupon-left">
|
||||
<span v-if="props.CouponType === 2000"
|
||||
><span class="coupon-price">{{ props.UseAmount * 10 }}</span
|
||||
>折</span
|
||||
>
|
||||
<span v-else
|
||||
>¥<span class="coupon-price">{{ props.UseAmount }}</span></span
|
||||
>
|
||||
<div v-if="!props.CouponSendId && props.CouponPoint" class="span24">
|
||||
{{ props.CouponPoint }}积分兑换
|
||||
</div>
|
||||
<div v-else class="span24">
|
||||
{{
|
||||
props.WithAmount > 0
|
||||
? "满" + props.WithAmount + "可用"
|
||||
: "无门槛使用"
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="coupon-bottom">
|
||||
<div class="coupon-des">
|
||||
{{ props.CouponInstructions || " 具体使用规则详询店内工作人员" }}
|
||||
</div>
|
||||
<div v-if="type === 1">
|
||||
<span class="coupon-use-door" v-if="props.usedState" @click="drop()"
|
||||
>已兑换</span
|
||||
>
|
||||
<span class="coupon-use-door" v-else @click="drop()"
|
||||
>去兑换</span
|
||||
>
|
||||
<!-- <span class="coupon-use-door" v-if="!props.CouponSendId" @click="drop()">去兑换</span>
|
||||
<span class="coupon-use-door" @click="drop()" v-else-if="props.CouponState==0">立即使用</span>
|
||||
<span class="coupon-door" v-else>{{props.CouponStateText}}</span> -->
|
||||
</div>
|
||||
<div v-else>
|
||||
<!-- calcTakeState true 是领了 -->
|
||||
<span class="coupon-use-door" v-if="!props.CouponSendId" @click="drop()"
|
||||
>去兑换</span
|
||||
>
|
||||
<span
|
||||
class="coupon-use-door"
|
||||
@click="drop()"
|
||||
v-else-if="props.CouponState == 0"
|
||||
>立即使用</span
|
||||
>
|
||||
<span class="coupon-door" v-else>{{ props.CouponStateText }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- </div> -->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: ["props", "type"],
|
||||
methods: {
|
||||
drop(event) {
|
||||
// let el = event.currentTarget
|
||||
this.$emit("drop", this.props);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="stylus">
|
||||
.coupon-card {
|
||||
background: url('https://eshangtech.com/ShopICO/icos/coup-bg.png') no-repeat center; // eshangtech.com/ShopICO/icos/coup-bg.png) no-repeat center
|
||||
background-size: contain;
|
||||
height: 263rpx;
|
||||
width: 708rpx;
|
||||
padding: 12rpx 30rpx;
|
||||
margin: 0rpx auto 0rpx auto;
|
||||
box-sizing: border-box;
|
||||
font-size: 24rpx;
|
||||
|
||||
.coupon-top {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height: 164rpx;
|
||||
}
|
||||
|
||||
.coupon-left {
|
||||
text-align: center;
|
||||
color: #E94B43;
|
||||
width: 130rpx;
|
||||
}
|
||||
|
||||
.coupon-price {
|
||||
color: #E94B43;
|
||||
font-size: 46rpx;
|
||||
font-weight: bolder;
|
||||
font-family: 'San Francisco Display Medium';
|
||||
line-height: 46rpx;
|
||||
}
|
||||
|
||||
.coupon-manjian {
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.coupon-center {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
// margin-top 16rpx
|
||||
}
|
||||
|
||||
.coupon-img {
|
||||
width: 110rpx;
|
||||
height: 110rpx;
|
||||
border-radius: 10rpx;
|
||||
background: #eee;
|
||||
}
|
||||
|
||||
.coupon-zx {
|
||||
display: inline-block;
|
||||
padding: 6rpx 10rpx;
|
||||
color: #be6f6b;
|
||||
border: 2rpx solid #edd0cc;
|
||||
background: #fef4f3;
|
||||
border-radius: 6rpx;
|
||||
margin: 6rpx 0;
|
||||
}
|
||||
|
||||
.coupon-name {
|
||||
color: #333;
|
||||
font-size: 26rpx;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.coupon-type-text {
|
||||
color: #5A5B56;
|
||||
font-size: 20rpx;
|
||||
border: 1rpx solid #E9E9E9;
|
||||
margin-bottom: 12rpx;
|
||||
display: inline-block;
|
||||
padding: 1rpx 4rpx;
|
||||
border-radius: 1rpx;
|
||||
line-height: 20rpx;
|
||||
}
|
||||
|
||||
.coupon-right {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
|
||||
.coupon-use-door {
|
||||
background-image: linear-gradient(to right, #E53B3E, #E96455);
|
||||
border-radius: 6rpx;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
width: 106rpx;
|
||||
height: 38rpx;
|
||||
line-height: 36rpx;
|
||||
font-size: 20rpx;
|
||||
}
|
||||
|
||||
.coupon-door {
|
||||
display: inline-block;
|
||||
background: #f2f2f2;
|
||||
color: #999;
|
||||
padding: 6rpx 30rpx;
|
||||
border-radius: 6rpx;
|
||||
font-size: 20rpx;
|
||||
}
|
||||
|
||||
.coupon-date {
|
||||
color: #6A6A6A;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
|
||||
.coupon-des {
|
||||
color: #999997;
|
||||
font-size: 20rpx;
|
||||
}
|
||||
|
||||
.span24 {
|
||||
margin-top: 8rpx;
|
||||
color: #6A6A6A;
|
||||
font-size: 20rpx;
|
||||
}
|
||||
|
||||
.coupon-bottom {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
height: 76rpx;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
334
components/currentService.vue
Normal file
334
components/currentService.vue
Normal file
@ -0,0 +1,334 @@
|
||||
<template>
|
||||
<view class="main" @click="handleGoDetail">
|
||||
<view class="serviceMessage">
|
||||
<view class="leftMessage">
|
||||
<view class="leftTop">
|
||||
<view class="massageNameBox">{{
|
||||
currentServiceMessage.SERVERPART_NAME || ""
|
||||
}}</view>
|
||||
<span class="state">营业中</span>
|
||||
</view>
|
||||
<view class="leftBottom">
|
||||
<image class="pointIcon" src="/static/images/home/address.png" />
|
||||
<span class="distanceText">{{
|
||||
currentServiceMessage.SERVERPART_DISTANCE
|
||||
? currentServiceMessage.SERVERPART_DISTANCE + "km"
|
||||
: "-"
|
||||
}}</span>
|
||||
<span class="line"></span>
|
||||
<span
|
||||
class="address"
|
||||
v-if="currentServiceMessage && currentServiceMessage.ServerpartInfo"
|
||||
>{{ currentServiceMessage.SERVERPART_ADDRESS || "" }}</span
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="rightMessage"
|
||||
@click.stop="handleToMap(currentServiceMessage)"
|
||||
v-if="currentServiceMessage.SERVERPART_DISTANCE > 0"
|
||||
>
|
||||
<image
|
||||
class="navigationIcon"
|
||||
src="https://eshangtech.com/ShopICO/discovery/navigationIcon.png"
|
||||
/>
|
||||
导航
|
||||
<!-- <span class="distance">{{
|
||||
currentServiceMessage.SERVERPART_DISTANCE
|
||||
? currentServiceMessage.SERVERPART_DISTANCE + "km"
|
||||
: ""
|
||||
}}</span> -->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<div class="serviceTypeTabs" v-if="!noIcon">
|
||||
<div class="serviceTypeItem">
|
||||
<image
|
||||
class="itemIcon"
|
||||
:src="
|
||||
currentServiceMessage.HASCHARGE
|
||||
? '/static/images/home/Charging.svg'
|
||||
: '/static/images/home/noCharging.svg'
|
||||
"
|
||||
/>
|
||||
|
||||
<!-- <image
|
||||
class="itemIcon"
|
||||
:src="
|
||||
serviceMessage.chargingStation
|
||||
? 'https://eshangtech.com/ShopICO/discovery/chargingStationSelect.png'
|
||||
: 'https://eshangtech.com/ShopICO/discovery/chargingStationNo.png'
|
||||
"
|
||||
/> -->
|
||||
<!-- <span class="itemText">充电桩</span> -->
|
||||
</div>
|
||||
<div class="serviceTypeItem">
|
||||
<image
|
||||
class="itemIcon"
|
||||
:src="
|
||||
currentServiceMessage.HASPILOTLOUNGE
|
||||
? '/static/images/home/jinCar.svg'
|
||||
: '/static/images/home/noJinCar.svg'
|
||||
"
|
||||
/>
|
||||
<!-- <image
|
||||
class="itemIcon"
|
||||
src="https://eshangtech.com/ShopICO/discovery/gasStationSelect.png"
|
||||
/> -->
|
||||
<!-- <span class="itemText">加油站</span> -->
|
||||
</div>
|
||||
<div class="serviceTypeItem">
|
||||
<image
|
||||
class="itemIcon"
|
||||
:src="
|
||||
currentServiceMessage.SERVERPART_TYPE
|
||||
? '/static/images/home/health.svg'
|
||||
: '/static/images/home/noHealth.svg'
|
||||
"
|
||||
/>
|
||||
|
||||
<!-- <image
|
||||
class="itemIcon"
|
||||
:src="
|
||||
serviceMessage.nursery
|
||||
? 'https://eshangtech.com/ShopICO/discovery/nurserySelect.png'
|
||||
: 'https://eshangtech.com/ShopICO/discovery/nurseryNo.png'
|
||||
"
|
||||
/> -->
|
||||
<!-- <span class="itemText">母婴室</span> -->
|
||||
</div>
|
||||
<div class="serviceTypeItem">
|
||||
<image
|
||||
class="itemIcon"
|
||||
:src="
|
||||
currentServiceMessage.HASMOTHER
|
||||
? '/static/images/home/baby.svg'
|
||||
: '/static/images/home/nobaby.svg'
|
||||
"
|
||||
/>
|
||||
|
||||
<!-- <image
|
||||
class="itemIcon"
|
||||
:src="
|
||||
serviceMessage.parkingSpace
|
||||
? 'https://eshangtech.com/ShopICO/discovery/parkingSpaceSelect.png'
|
||||
: 'https://eshangtech.com/ShopICO/discovery/parkingSpaceNo.png'
|
||||
"
|
||||
/> -->
|
||||
<!-- <span class="itemText">停车位</span> -->
|
||||
</div>
|
||||
<div class="serviceTypeItem">
|
||||
<image
|
||||
class="itemIcon"
|
||||
:src="
|
||||
currentServiceMessage.HASGUESTROOM
|
||||
? '/static/images/home/hotel.svg'
|
||||
: '/static/images/home/nohotel.svg'
|
||||
"
|
||||
/>
|
||||
<!-- <image
|
||||
class="itemIcon"
|
||||
:src="
|
||||
serviceMessage.store
|
||||
? 'https://eshangtech.com/ShopICO/discovery/storeSelect.png'
|
||||
: 'https://eshangtech.com/ShopICO/discovery/storeNo.png'
|
||||
"
|
||||
/> -->
|
||||
<!-- <span class="itemText">便利店</span> -->
|
||||
</div>
|
||||
</div>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// currentServiceInfo: {},
|
||||
};
|
||||
},
|
||||
props: ["goDetail", "noIcon", "currentServiceMessage", "NoChange"], // goDetail 是否可以跳转详情 noIcon 为true时不出现 下面的小图标 NoChange 禁止切换服务区
|
||||
watch: {
|
||||
currentServiceMessage(newVal, oldVal) {
|
||||
console.log("newVal", newVal);
|
||||
console.log("oldVal", oldVal);
|
||||
// this.currentServiceInfo = newVal;
|
||||
this.$forceUpdate();
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 跳转去地图
|
||||
handleToMap(obj) {
|
||||
uni.openLocation({
|
||||
latitude: obj.latitude ? obj.latitude * 1 : obj.SERVERPART_Y * 1,
|
||||
longitude: obj.longitude ? obj.longitude * 1 : obj.SERVERPART_X * 1,
|
||||
scale: 16, // 缩放比例
|
||||
name: obj.SERVERPART_NAME,
|
||||
// address: "", // 这个可能会影响地图的定位,所以可以选择不填
|
||||
success(data) {
|
||||
console.log(data);
|
||||
},
|
||||
fail(err) {
|
||||
console.log(err);
|
||||
},
|
||||
});
|
||||
},
|
||||
handleGoDetail() {
|
||||
if (this.NoChange) {
|
||||
return;
|
||||
} else {
|
||||
if (this.goDetail) {
|
||||
uni.navigateTo({
|
||||
url:
|
||||
"/pages/serviceDetail/index?id=" +
|
||||
this.currentServiceMessage.SERVERPART_ID,
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
.main {
|
||||
background: #fff;
|
||||
|
||||
.serviceMessage {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 8rpx 0;
|
||||
margin-top: 24rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.leftMessage {
|
||||
width: calc(100% - 178rpx);
|
||||
margin-right: 16rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
.leftTop {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.leftIcon {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
|
||||
.massageNameBox {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 600;
|
||||
font-size: 32rpx;
|
||||
color: #282622;
|
||||
line-height: 44rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.state {
|
||||
display: inline-block;
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #1ba74d;
|
||||
line-height: 36rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
padding: 2rpx 8rpx;
|
||||
background: #e9f8ee;
|
||||
border-radius: 4rpx;
|
||||
margin-left: 16rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.leftBottom {
|
||||
width: 100%;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 16rpx;
|
||||
.pointIcon {
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
.distanceText {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #130f05;
|
||||
line-height: 36rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
.line {
|
||||
display: inline-block;
|
||||
width: 2rpx;
|
||||
height: 24rpx;
|
||||
background: #e7e7e6;
|
||||
margin: 0 12rpx;
|
||||
}
|
||||
|
||||
.address {
|
||||
width: 300rpx;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
display: inline-block;
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #5f5b52;
|
||||
line-height: 32rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
// margin-left: 36rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.rightMessage {
|
||||
border-radius: 16px;
|
||||
// border: 1px solid #ae8d3e;
|
||||
padding: 14rpx 24rpx;
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #ba922f;
|
||||
line-height: 36rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.navigationIcon {
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.serviceTypeTabs {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 16rpx;
|
||||
.serviceTypeItem {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
margin-right: 16rpx;
|
||||
.itemIcon {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
232
components/keyboard.vue
Normal file
232
components/keyboard.vue
Normal file
@ -0,0 +1,232 @@
|
||||
<template lang="">
|
||||
<div>
|
||||
<div class='panel-wrap' v-if="isShow" data-value="exit" @tap='colse_da'>
|
||||
<div class="vehicle-panel" :style="{background:backgroundColor,height:'472rpx'}">
|
||||
<!-- height:'500rpx'; -->
|
||||
<div class='topItem'>
|
||||
<!-- <span class='check' @tap='check'>中/英</span>
|
||||
<span class='contentShow'>{{oinp}}</span> -->
|
||||
<span class='exit' @tap='vehicleTap("ok")'>完成</span>
|
||||
</div>
|
||||
<!--省份简写键盘-->
|
||||
<div v-if="keyBoardType === 1">
|
||||
<div class="vehicle-panel-row">
|
||||
<div class='vehicle-panel-row-button' v-for="(item,idx) in keyVehicle1" @tap='vehicleTap(item)' :key="idx">{{item}}</div>
|
||||
</div>
|
||||
<div class="vehicle-panel-row">
|
||||
<div class='vehicle-panel-row-button' v-for="(item,idx) in keyVehicle2" @tap='vehicleTap(item)' :key="idx">{{item}}</div>
|
||||
</div>
|
||||
<div class="vehicle-panel-row">
|
||||
<div class='vehicle-panel-row-button' v-for="(item,idx) in keyVehicle3" @tap='vehicleTap(item)' :key="idx">
|
||||
{{item}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="vehicle-panel-row-last">
|
||||
<div class='vehicle-panel-row-button vehicle-panel-row-button-img' @tap="check">
|
||||
ABC
|
||||
</div>
|
||||
<div class='vehicle-panel-row-button vehicle-panel-row-button-last' @tap='vehicleTap(item)' v-for="(item,idx) in keyVehicle4" :key="idx">
|
||||
{{item}}
|
||||
</div>
|
||||
<div class='vehicle-panel-row-button vehicle-panel-row-button-img'>
|
||||
<img src='/static/images/keyboard-delete.svg' class='vehicle-en-button-delete' @tap='vehicleTap("delete")' mode='aspectFit'>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--英文键盘 -->
|
||||
<div v-else>
|
||||
<div class="vehicle-panel-row">
|
||||
<div class='vehicle-panel-row-button ' @tap='vehicleTap(item)' v-for="(item,idx) in keyNumber"
|
||||
:key="idx">{{item}}</div>
|
||||
</div>
|
||||
<div class="vehicle-panel-row">
|
||||
<div class='vehicle-panel-row-button' v-for="(item,idx) in keyEnInput1" @tap='vehicleTap(item)' :key="idx" :class="{'vehicle-panel-row-button-number':item==='I'|| item==='O'}" >{{item}}</div>
|
||||
</div>
|
||||
<div class="vehicle-panel-row">
|
||||
<div class='vehicle-panel-row-button' v-for="(item,idx) in keyEnInput2" @tap='vehicleTap(item)' :key="idx">{{item}}</div>
|
||||
|
||||
</div>
|
||||
<div class="vehicle-panel-row-last">
|
||||
<div class='vehicle-panel-row-button vehicle-panel-row-button-img' @tap="check">
|
||||
省份
|
||||
</div>
|
||||
<div class='vehicle-panel-row-button vehicle-panel-row-button-last' @tap='vehicleTap(item)' v-for="(item,idx) in keyEnInput3"
|
||||
:key="idx">
|
||||
{{item}}
|
||||
</div>
|
||||
|
||||
<div class='vehicle-panel-row-button vehicle-panel-row-button-img'>
|
||||
<img src='/static/images/keyboard-delete.svg' class='vehicle-en-button-delete' @tap='vehicleTap("delete")' mode='aspectFit'>
|
||||
</div>
|
||||
<!-- <div :style="{border:buttonBorder}" class='vehicle-panel-row-button vehicle-panel-ok' @tap='vehicleTap("ok")' >确定</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
isShow: false,
|
||||
oinp: ''
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
keyVehicle1: ['陕', '京', '津', '沪', '冀', '豫', '云', '辽', '吉', '黑'],
|
||||
keyVehicle2: ['湘', '皖', '鲁', '苏', '浙', '赣', '甘', '晋', '蒙', '闽'],
|
||||
keyVehicle3: ['鄂', '桂', '粤', '川', '青', '藏', '琼', '宁', '贵', '渝'],
|
||||
keyVehicle4: ['新', '使', '领', '警', '学', '港', '澳'],
|
||||
keyNumber: '1234567890',
|
||||
keyEnInput1: 'QWERTYUIOP',
|
||||
keyEnInput2: 'ASDFGHJKL',
|
||||
keyEnInput3: 'ZXCVBNM',
|
||||
backgroundColor: '#cfd5dc',
|
||||
keyBoardType: 1,
|
||||
buttonBorder: '1px solid #ccc'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
vehicleTap: function (event) {
|
||||
console.log(event)
|
||||
switch (event) {
|
||||
case 'delete':
|
||||
this.$emit('delete')
|
||||
// this.$emit('inputchange', event)
|
||||
break
|
||||
case 'ok':
|
||||
this.$emit('ok')
|
||||
break
|
||||
case 'exit':
|
||||
this.$emit('exit')
|
||||
break
|
||||
default:
|
||||
if (event === 'I' || event === 'O') {
|
||||
return
|
||||
}
|
||||
this.$emit('inputchange', event)
|
||||
}
|
||||
},
|
||||
colse_da () {
|
||||
this.$emit('exit2')
|
||||
},
|
||||
check () {
|
||||
if (this.keyBoardType === 1) {
|
||||
this.keyBoardType = 2
|
||||
} else if (this.keyBoardType === 2) {
|
||||
this.keyBoardType = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
:host {
|
||||
width: 100%;
|
||||
}
|
||||
.bgf7 {
|
||||
background: #fefefe;
|
||||
}
|
||||
/* .panel-wrap {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
z-index: 999;
|
||||
} */
|
||||
.vehicle-panel {
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
z-index: 1000;
|
||||
background: #fff;
|
||||
padding-bottom: 28rpx;
|
||||
}
|
||||
.jik {
|
||||
width: 0.6rem;
|
||||
height: 0.8rem;
|
||||
}
|
||||
|
||||
.vehicle-panel-row {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.vehicle-panel-row-last {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.vehicle-panel-row-button {
|
||||
background-color: #fff;
|
||||
margin: 7rpx 5rpx;
|
||||
font-size: 32rpx;
|
||||
width: 60rpx;
|
||||
height: 80rpx;
|
||||
text-align: center;
|
||||
line-height: 80rpx;
|
||||
border-radius: 10rpx;
|
||||
box-shadow: 0 2rpx 4rpx #7f7f7f;
|
||||
}
|
||||
.vehicle-panel-row-button-number {
|
||||
background-color: #eee;
|
||||
box-shadow: none;
|
||||
}
|
||||
/* .vehicle-panel-row-button-last {
|
||||
width: 0.9rem;
|
||||
height: 0.9rem;
|
||||
line-height: 0.9rem;
|
||||
} */
|
||||
.vehicle-hover {
|
||||
background-color: #ccc;
|
||||
}
|
||||
.vehicle-panel-row-button-img {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 96rpx;
|
||||
background: #acb3bd;
|
||||
font-size: 28rpx;
|
||||
box-shadow: 0 2rpx 4rpx #acb3bd;
|
||||
}
|
||||
.vehicle-en-button-delete {
|
||||
width: 52rpx;;
|
||||
height: 80rpx;
|
||||
}
|
||||
.vehicle-panel-ok {
|
||||
background-color: #6a7cff;
|
||||
color: #fff;
|
||||
width: 1.5rem;
|
||||
height: 0.8rem;
|
||||
line-height: 0.8rem;
|
||||
}
|
||||
.topItem {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
height: 80rpx;
|
||||
/* background: #f0f0f0; */
|
||||
}
|
||||
.exit {
|
||||
margin-right: 30rpx;
|
||||
color: #000;
|
||||
font-size: 28rpx;
|
||||
display: block;
|
||||
line-height: 0.5rem;
|
||||
}
|
||||
.check {
|
||||
margin-left: 0.3rem;
|
||||
color: #6a7cff;
|
||||
font-size: 0.28rem;
|
||||
display: block;
|
||||
line-height: 0.5rem;
|
||||
}
|
||||
</style>
|
||||
70
components/noData.vue
Normal file
70
components/noData.vue
Normal file
@ -0,0 +1,70 @@
|
||||
<template>
|
||||
<div class="no-data-tip" v-if="!isLoading && isShow">
|
||||
<!-- <image :src="noDataPath" v-if="type === 1"></image> -->
|
||||
<div v-if="type === 1" class="imgBox">
|
||||
<image style="width: 72rpx; height: 72rpx" :src="newNoDataPath"></image>
|
||||
</div>
|
||||
<image :src="noCoupon" v-else class="imgBigBox"></image>
|
||||
<div class="textBox" @click="refresh">{{ text }}</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from "vuex";
|
||||
export default {
|
||||
props: {
|
||||
// 基础类型检测, null意味着任何类型都行
|
||||
text: String,
|
||||
isShow: Boolean,
|
||||
type: {
|
||||
type: Number,
|
||||
default: 1,
|
||||
},
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
newNoDataPath: "/static/images/home/lostAndFoundIcon.svg",
|
||||
noDataPath: "https://eshangtech.com/ShopICO/no-data.png",
|
||||
noCoupon: "https://eshangtech.com/ShopICO/no-coupon.png",
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters({
|
||||
isLoading: "isLoading",
|
||||
}),
|
||||
},
|
||||
methods: {
|
||||
refresh() {
|
||||
if (this.text.indexOf("点击") > -1) {
|
||||
this.$emit("refresh");
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.no-data-tip {
|
||||
width: 100%;
|
||||
|
||||
.imgBox {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.imgBigBox {
|
||||
width: 200px;
|
||||
height: 150px;
|
||||
}
|
||||
|
||||
.textBox {
|
||||
font-size: 28rpx;
|
||||
font-weight: bolder;
|
||||
color: #B8B7B4;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
margin-top: 8rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
243
components/payForVip.vue
Normal file
243
components/payForVip.vue
Normal file
@ -0,0 +1,243 @@
|
||||
<template>
|
||||
<div v-show="payForVip" >
|
||||
<div class="box-shade" :style="{'height':height}">
|
||||
</div>
|
||||
<div class="content">
|
||||
<!-- <button target="miniProgram" path="pages/pay/index" :extra-data="minJson" app-id="wxa9fc47caa941b0a7" envVersion="develop" @complete="complete" @fail="complete">客无忧</button> -->
|
||||
<image class="becomeVip" mode="aspectFit" src="https://eshangtech.com/ShopICO/payforVip.png" />
|
||||
<div class="payfor-btn" @click="isUser"></div>
|
||||
<div class="agreement" @click="goAgreement"></div>
|
||||
<image class="vip-close" mode="aspectFit" src="https://eshangtech.com/ShopICO/vip-close.png" @click="close" />
|
||||
<div class="aready-btn" v-show="user.ISPLUS===1">
|
||||
您的首充优惠已到,快去使用吧!
|
||||
<div class="see-btn" @click="goDiscovery">查看我的券包</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapGetters, mapMutations} from 'vuex'
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
minJson: {}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['user', 'payForVip']),
|
||||
height () {
|
||||
let systemInfo = mpvue.getStorageSync('systemInfo')
|
||||
return systemInfo.windowHeight + 'px'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
...mapMutations({
|
||||
closePop: 'payForVip'
|
||||
}),
|
||||
close () {
|
||||
this.closePop(false)
|
||||
},
|
||||
goAgreement () {
|
||||
mpvue.navigateTo({url: '/pages/payAgreement/main'})
|
||||
},
|
||||
isUser () {
|
||||
if (!this.user.MEMBERSHIP_MOBILEPHONE) {
|
||||
mpvue.navigateTo({url: '/pages/register/main'})
|
||||
} else {
|
||||
this.payfor()
|
||||
}
|
||||
},
|
||||
payfor () {
|
||||
let _this = this
|
||||
|
||||
_this.$api.postCoop({
|
||||
action_type: 'ScanOrder',
|
||||
salebillType: 2000
|
||||
}).then(rs => {
|
||||
if (rs.ResultCode === '100') {
|
||||
_this.getOrderInfo(rs.Data)
|
||||
} else {
|
||||
mpvue.showToast({title: rs.ResultDesc, icon: 'none'})
|
||||
}
|
||||
})
|
||||
},
|
||||
getMember () {
|
||||
let _this = this
|
||||
_this.$api.getCoop({
|
||||
action_type: 'GetMembershipInfo',
|
||||
// memberShipId: this.user.MEMBERSHIP_ID,
|
||||
WechatUserId: this.user.WechatUserId,
|
||||
RegisterType: 0
|
||||
}).then(function (data) {
|
||||
if (data.ResultCode === '100') {
|
||||
let _data = data.Data
|
||||
_this.user.MEMBERSHIP_LEVEL_TEXT = _data.MEMBERSHIP_LEVEL_TEXT || ''
|
||||
_this.user.COUPON_COUNT = _data.COUPON_COUNT || ''
|
||||
_this.user.PENDORDER_COUNT = _data.PENDORDER_COUNT || ''
|
||||
_this.user.RESERVATION_COUNT = _data.RESERVATION_COUNT || ''
|
||||
_this.user.ACCOUNT_BALANCE = _data.ACCOUNT_BALANCE || ''
|
||||
_this.user.ISPLUS = _data.ISPLUS || ''
|
||||
_this.user.INDUSTRY_MEMBERSHIP_ID = _data.INDUSTRY_MEMBERSHIP_ID || ''
|
||||
_this.user.MEMBERSHIP_TYPE = _data.MEMBERSHIP_TYPE || ''
|
||||
_this.user.MEMBERSHIP_LEVEL = _data.MEMBERSHIP_LEVEL || ''
|
||||
_this.user.InviteCode = _data.InviteCode || ''
|
||||
_this.user.MEMBERSHIP_MOBILEPHONE = _data.MEMBERSHIP_MOBILEPHONE || ''
|
||||
_this.user.MEMBERSHIP_POINT = _data.MEMBERSHIP_POINT || ''
|
||||
|
||||
_this.$store.commit('setUser', _this.user)
|
||||
// if (_this.user.ISPLUS === 0 && _this.isFirst === 1) {
|
||||
// _this.becomeVip = true
|
||||
// _this.isFirst = 0
|
||||
// }
|
||||
}
|
||||
})
|
||||
},
|
||||
goDiscovery () {
|
||||
this.close(false)
|
||||
// mpvue.navigateToMiniProgram({
|
||||
// path: 'pages/pay/index',
|
||||
// extraData: {
|
||||
// foo: 'bar'
|
||||
// },
|
||||
// appId: 'wxa9fc47caa941b0a7',
|
||||
// envVersion: 'develop',
|
||||
// success (data) {
|
||||
// console.log(data)
|
||||
// },
|
||||
// fail (data) {
|
||||
// console.log(data)
|
||||
// }
|
||||
// })
|
||||
mpvue.navigateTo({url: '/pages/homeFn/myCoupon/main'})
|
||||
},
|
||||
// 获取后台信息调取微信支付
|
||||
getOrderInfo (obj) {
|
||||
let _this = this
|
||||
_this.$api.postCoop({
|
||||
action_type: 'JsApiPay',
|
||||
action_data: 1,
|
||||
action_record: _this.user.WECHATAPP_OPENID,
|
||||
TOTAL_FEE: obj.ORDER_AMOUNT,
|
||||
OFFPRICE: 0,
|
||||
payType: 2,
|
||||
SALEBILL_ID: obj.SALEBILL_ID,
|
||||
SALEBILL_CODE: obj.SALEBILL_CODE
|
||||
}).then(res => {
|
||||
if (res) {
|
||||
mpvue.requestPayment({
|
||||
appId: res.appid, // appid
|
||||
timeStamp: res.timeStamp + '', // 时间戳,自1970年以来的秒数
|
||||
nonceStr: res.nonceStr, // 随机串
|
||||
package: res.package,
|
||||
signType: res.signType, // 微信签名方式
|
||||
paySign: res.paySign, // 微信签名
|
||||
success (res) {
|
||||
if (res.errMsg === 'requestPayment:ok') {
|
||||
mpvue.showToast({
|
||||
title: '开通成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
setTimeout(() => {
|
||||
_this.$api.postCoop({
|
||||
action_type: 'EndPay',
|
||||
action_data: obj.SALEBILL_CODE,
|
||||
action_record: 1
|
||||
}).then(res => {
|
||||
// _this.close(false)
|
||||
_this.getMember()
|
||||
})
|
||||
}, 1000)
|
||||
}
|
||||
},
|
||||
fail (res) {
|
||||
console.log(res)
|
||||
if (res.errMsg === 'requestPayment:fail cancel') {
|
||||
mpvue.showToast({
|
||||
title: '支付取消',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
},
|
||||
complete (res) {}
|
||||
})
|
||||
} else {
|
||||
mpvue.showToast({
|
||||
title: '网络异常,请稍后再试',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="stylus" scoped>
|
||||
.box-shade
|
||||
width 100%
|
||||
position absolute
|
||||
overflow hidden
|
||||
top 0
|
||||
left 0
|
||||
background-color #000
|
||||
opacity .8
|
||||
z-index 1
|
||||
.content
|
||||
position absolute
|
||||
transform translate(-50%,-50%)
|
||||
top 50%
|
||||
left 50%
|
||||
width 690rpx
|
||||
z-index 2
|
||||
box-sizing border-box
|
||||
height 1000rpx
|
||||
overflow hidden
|
||||
.payfor-btn
|
||||
|
||||
height 100rpx
|
||||
width 606rpx
|
||||
position relative
|
||||
top -230rpx
|
||||
margin 0 auto
|
||||
.becomeVip
|
||||
height 846rpx
|
||||
width 690rpx
|
||||
.vip-close
|
||||
height 64rpx
|
||||
width 64rpx
|
||||
position relative
|
||||
top -70rpx
|
||||
margin 0 auto
|
||||
display block
|
||||
.agreement
|
||||
height 35rpx
|
||||
width 300rpx
|
||||
position relative
|
||||
top -165rpx
|
||||
margin 0 auto
|
||||
.aready-btn
|
||||
background-color #fff
|
||||
height 242rpx
|
||||
width 613rpx
|
||||
position relative
|
||||
top -450rpx
|
||||
margin 0 auto
|
||||
text-align center
|
||||
color #854e1e
|
||||
font-size 32rpx
|
||||
.see-btn
|
||||
height 100rpx
|
||||
width 606rpx
|
||||
margin 20rpx auto
|
||||
border-radius 50rpx
|
||||
line-height 100rpx
|
||||
color #f0dccf
|
||||
background linear-gradient(to right ,#1f1f1f,#62605f)
|
||||
</style>
|
||||
|
||||
|
||||
252
components/pickerAddress.vue
Normal file
252
components/pickerAddress.vue
Normal file
@ -0,0 +1,252 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<!-- 支付按钮 -->
|
||||
<view class="pay_popup" :class="isOpen ? 'on' : ''">
|
||||
<view class="pay-title flex-sb-cent">
|
||||
<button class="btn" @click="onClose">取消</button>
|
||||
<button class="btn" @click="onSubmit">完成</button>
|
||||
</view>
|
||||
<view class="">
|
||||
<picker-view
|
||||
:value="idxArr"
|
||||
@change="bindChange"
|
||||
class="picker-view"
|
||||
indicator-class="picker-box"
|
||||
>
|
||||
<picker-view-column>
|
||||
<view
|
||||
class="item"
|
||||
v-for="(item, index) in provinceArray"
|
||||
:key="index"
|
||||
>{{ item.label }}</view
|
||||
>
|
||||
</picker-view-column>
|
||||
<picker-view-column>
|
||||
<view
|
||||
class="item"
|
||||
v-for="(item, index) in cityArray"
|
||||
:key="index"
|
||||
>{{ item.label }}</view
|
||||
>
|
||||
</picker-view-column>
|
||||
<picker-view-column v-if="isDistrictY">
|
||||
<view
|
||||
class="item"
|
||||
v-for="(item, index) in districtArray"
|
||||
:key="index"
|
||||
>{{ item.label }}</view
|
||||
>
|
||||
</picker-view-column>
|
||||
</picker-view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mask" v-if="isOpen" @click="onClose"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import addressData from "../common/newArea.js";
|
||||
export default {
|
||||
props: {
|
||||
isOpen: {
|
||||
default: false,
|
||||
type: Boolean,
|
||||
},
|
||||
|
||||
isDistrictY: {
|
||||
// 判断是否选择区域数据true表示选择false表示不显示
|
||||
default: true,
|
||||
type: Boolean,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: "picker-view",
|
||||
area1_name: "",
|
||||
area2_name: "",
|
||||
area3_name: "",
|
||||
area1_code: "",
|
||||
area2_code: "",
|
||||
area3_code: "",
|
||||
idxArr: [0, 0, 0],
|
||||
oldpProvinceDataList: addressData,
|
||||
provinceArray: [],
|
||||
cityArray: [],
|
||||
districtArray: [],
|
||||
column1: 0,
|
||||
column2: 0,
|
||||
column3: 0,
|
||||
// indicatorStyle: `height: 50px;`
|
||||
};
|
||||
},
|
||||
created() {
|
||||
for (let i = 0; i < this.oldpProvinceDataList.length; i++) {
|
||||
this.provinceArray.push(this.oldpProvinceDataList[i]);
|
||||
}
|
||||
for (let i = 0; i < this.oldpProvinceDataList[0].children.length; i++) {
|
||||
this.cityArray.push(this.oldpProvinceDataList[0].children[i]);
|
||||
}
|
||||
this.area1_name = this.provinceArray[0].label;
|
||||
this.area2_name = this.cityArray[0].label;
|
||||
this.area1_code = this.provinceArray[0].value;
|
||||
this.area2_code = this.cityArray[0].value;
|
||||
if (!this.isDistrictY) return;
|
||||
for (
|
||||
let i = 0;
|
||||
i < this.oldpProvinceDataList[0].children[0].children.length;
|
||||
i++
|
||||
) {
|
||||
this.districtArray.push(
|
||||
this.oldpProvinceDataList[0].children[0].children[i]
|
||||
);
|
||||
}
|
||||
this.area3_name = this.districtArray[0].label;
|
||||
this.area3_code = this.districtArray[0].value;
|
||||
},
|
||||
|
||||
methods: {
|
||||
pickerColumnchange() {
|
||||
let idxArr = this.idxArr;
|
||||
if (
|
||||
this.oldpProvinceDataList[idxArr[0]].children &&
|
||||
this.oldpProvinceDataList[idxArr[0]].children.length > 0
|
||||
) {
|
||||
this.cityArray = this.oldpProvinceDataList[idxArr[0]].children.map(
|
||||
(item, index) => {
|
||||
return item;
|
||||
}
|
||||
);
|
||||
}
|
||||
if (!this.isDistrictY) return;
|
||||
if (
|
||||
this.oldpProvinceDataList[idxArr[0]].children &&
|
||||
this.oldpProvinceDataList[idxArr[0]].children.length > 0 &&
|
||||
this.oldpProvinceDataList[idxArr[0]].children[idxArr[1]].children &&
|
||||
idxArr.length == 3
|
||||
) {
|
||||
this.districtArray = this.oldpProvinceDataList[idxArr[0]].children[
|
||||
idxArr[1]
|
||||
].children.map((item, index) => {
|
||||
return item;
|
||||
});
|
||||
} else {
|
||||
this.idxArr[2] = 0;
|
||||
this.districtArray = [];
|
||||
}
|
||||
},
|
||||
bindChange: function (e) {
|
||||
const val = e.detail.value;
|
||||
if (this.column1 !== val[0]) {
|
||||
this.column1 = val[0];
|
||||
this.column2 = 0;
|
||||
this.column3 = 0;
|
||||
} else if (this.column2 !== val[1]) {
|
||||
this.column1 = val[0];
|
||||
this.column2 = val[1];
|
||||
this.column3 = 0;
|
||||
} else {
|
||||
this.column1 = val[0];
|
||||
this.column2 = val[1];
|
||||
this.column3 = val[2];
|
||||
}
|
||||
|
||||
this.idxArr = [this.column1, this.column2, this.column3];
|
||||
this.pickerColumnchange();
|
||||
if (this.provinceArray.length > 0) {
|
||||
this.area1_name = this.provinceArray[this.column1].label;
|
||||
this.area1_code = this.provinceArray[this.column1].value;
|
||||
}
|
||||
if (this.cityArray.length > 0) {
|
||||
this.area2_name = this.cityArray[this.column2].label;
|
||||
this.area2_code = this.cityArray[this.column2].value;
|
||||
} else {
|
||||
this.area2_name = "";
|
||||
this.area2_code = "";
|
||||
}
|
||||
if (!this.isDistrictY) return;
|
||||
if (this.districtArray.length > 0) {
|
||||
this.area3_name = this.districtArray[this.column3].label;
|
||||
this.area3_code = this.districtArray[this.column3].value;
|
||||
} else {
|
||||
this.area3_name = "";
|
||||
this.area3_code = "";
|
||||
}
|
||||
},
|
||||
onClose() {
|
||||
this.$emit("close", 1);
|
||||
},
|
||||
onSubmit() {
|
||||
let data = {
|
||||
area1_name: this.area1_name,
|
||||
area2_name: this.area2_name,
|
||||
area3_name: this.area3_name,
|
||||
area1_code: this.area1_code,
|
||||
area2_code: this.area2_code,
|
||||
area3_code: this.area3_code,
|
||||
};
|
||||
this.$emit("bindChage", data);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.pay_popup {
|
||||
.body-title {
|
||||
font-size: 36rpx;
|
||||
color: #666;
|
||||
text-align: center;
|
||||
padding-bottom: 12rpx;
|
||||
}
|
||||
.pay-title {
|
||||
border-bottom: none;
|
||||
padding: 0 32rpx;
|
||||
.btn {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #c90f07;
|
||||
line-height: 32rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.picker-view {
|
||||
width: 100%;
|
||||
height: 432rpx;
|
||||
padding: 0 32rpx;
|
||||
.picker-box {
|
||||
// width: 686px;
|
||||
height: 80rpx;
|
||||
background: #c90f07;
|
||||
font-weight: 500;
|
||||
color: #45454c;
|
||||
line-height: 80rpx;
|
||||
opacity: 0.12;
|
||||
}
|
||||
uni-picker-view-column {
|
||||
&:first-child {
|
||||
.picker-box {
|
||||
border-top-left-radius: 16rpx;
|
||||
border-bottom-left-radius: 16rpx;
|
||||
}
|
||||
}
|
||||
&:last-child {
|
||||
.picker-box {
|
||||
border-top-right-radius: 16rpx;
|
||||
border-bottom-right-radius: 16rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.item {
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
color: #45454c !important;
|
||||
font-size: 36rpx;
|
||||
font-family: PingFang SC;
|
||||
}
|
||||
</style>
|
||||
|
||||
431
components/switchcity.vue
Normal file
431
components/switchcity.vue
Normal file
@ -0,0 +1,431 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="input">
|
||||
<input placeholder="输入城市名或拼音查询" placeholder-style="font-size: 13px" :value="inputName" @input="bindKeyInput" @blur="bindBlur"/>
|
||||
</div>
|
||||
|
||||
<div class="container-inner">
|
||||
<div class="searchLetter touchClass">
|
||||
<div class="thishotText" @click="hotCity">
|
||||
<div style="margin-top:0;">当前</div>
|
||||
<div style="margin-top:0;">热门</div>
|
||||
</div>
|
||||
<div v-for="(item, idx) in searchLetter" :key="idx" style="color:#8BC34A;font-size:20rpx;" :data-letter="item.name" @click="clickLetter">
|
||||
{{ item.name }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
|
||||
<block v-if="isShowLetter">
|
||||
<div class="showSlectedLetter">
|
||||
{{ toastShowLetter }}
|
||||
</div>
|
||||
</block>
|
||||
|
||||
<scroll-view scroll-y="true" v-bind:style="{height: winHeight + 'px'}" :scroll-into-view="scrollTopId">
|
||||
<ul class="ul" id="completelist">
|
||||
<li class="li" v-for="(item, idx) in completeList" :key="idx" :data-city="item.city" :data-code="item.code" @click="bindCity">
|
||||
{{ item.city }}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div v-if="condition" class="hotcity-common" id="selectcounty">选择区县</div>
|
||||
<div v-if="condition" class="county">
|
||||
<div class="hotcity" v-for="(item, idx) in countyList" :key="idx">
|
||||
<div class="weui-grid" style="margin-right: 16rpx;" :data-code="item.id" :data-city="item.fullname" @click="bindCounty">
|
||||
<div class="weui-grid__label">{{ item.fullname }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="selectCity">
|
||||
<div class="hotcity-common" @click="reGetLocation" id="currentcity">重新定位城区</div>
|
||||
<div class="thisCityName" :data-city="city" :data-code="currentCityCode">{{ city }}</div>
|
||||
|
||||
<div class="hotcity-common">热门城市</div>
|
||||
<div class="weui-grids">
|
||||
<div class="weui-grid" :data-code="110000" data-city="北京市" @click="bindCity">
|
||||
<div class="weui-grid__label">北京市</div>
|
||||
</div>
|
||||
<div class="weui-grid" :data-code="310000" data-city="上海市" @click="bindCity">
|
||||
<div class="weui-grid__label">上海市</div>
|
||||
</div>
|
||||
<div class="weui-grid" :data-code="440100" data-city="广州市" @click="bindCity">
|
||||
<div class="weui-grid__label">广州市</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="weui-grids">
|
||||
<div class="weui-grid" :data-code="440300" data-city="深圳市" @click="bindCity">
|
||||
<div class="weui-grid__label">深圳市</div>
|
||||
</div>
|
||||
<div class="weui-grid" :data-code="330100" data-city="杭州市" @click="bindCity">
|
||||
<div class="weui-grid__label">杭州市</div>
|
||||
</div>
|
||||
<div class="weui-grid" :data-code="320100" data-city="南京市" @click="bindCity">
|
||||
<div class="weui-grid__label">南京市</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="weui-grids">
|
||||
<div class="weui-grid" :data-code="420100" data-city="武汉市" @click="bindCity">
|
||||
<div class="weui-grid__label">武汉市</div>
|
||||
</div>
|
||||
<div class="weui-grid" :data-code="120000" data-city="天津市" @click="bindCity">
|
||||
<div class="weui-grid__label">天津市</div>
|
||||
</div>
|
||||
<div class="weui-grid" :data-code="610100" data-city="西安市" @click="bindCity">
|
||||
<div class="weui-grid__label">西安市</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="selection" v-for="(item, idx) in cityList" :key="idx">
|
||||
<div class="item_letter" :id="item.initial">{{ item.initial }}</div>
|
||||
<div class="item_city" v-for="(cityItem, index) in item.cityInfo" :key="index" :data-code="cityItem.code" :data-city="cityItem.city" @click="bindCity">
|
||||
{{cityItem.city}}
|
||||
</div>
|
||||
</div>
|
||||
</scroll-view>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import city from '@/utils/city.js'
|
||||
import { CITY_GET_LOCATION, CITY_SELECT_COUNTY, CITY_CHANGE_CODE, CITY_CHANGE_COUNTY } from '@/store/mutation-types'
|
||||
import { mapActions, mapGetters } from 'vuex'
|
||||
export default {
|
||||
computed: {
|
||||
...mapGetters('city', {
|
||||
city: 'city',
|
||||
county: 'county',
|
||||
currentCityCode: 'currentCityCode',
|
||||
defaultCity: 'defaultCity',
|
||||
defaultCounty: 'defaultCounty',
|
||||
countyList: 'countyList'
|
||||
})
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
searchLetter: [],
|
||||
showLetter: '',
|
||||
winHeight: 0,
|
||||
cityList: [],
|
||||
isShowLetter: false,
|
||||
// 置顶id
|
||||
scrollTopId: '',
|
||||
hotcityList: [],
|
||||
inputName: '',
|
||||
completeList: [],
|
||||
condition: false,
|
||||
detailAddress: '',
|
||||
toastShowLetter: ''
|
||||
}
|
||||
},
|
||||
created () {
|
||||
const searchLetter = city.searchLetter
|
||||
const cityList = city.cityList()
|
||||
const sysInfo = mpvue.getSystemInfoSync()
|
||||
console.log(sysInfo)
|
||||
const winHeight = sysInfo.windowHeight
|
||||
const itemH = winHeight / searchLetter.length
|
||||
let tempArr = []
|
||||
searchLetter.map(
|
||||
(item, index) => {
|
||||
let temp = {}
|
||||
temp.name = item
|
||||
temp.tHeight = index * itemH
|
||||
temp.bHeight = (index + 1) * itemH
|
||||
tempArr.push(temp)
|
||||
}
|
||||
)
|
||||
this.winHeight = winHeight
|
||||
this.itemH = itemH
|
||||
this.searchLetter = tempArr
|
||||
this.cityList = cityList
|
||||
this.getLocation()
|
||||
},
|
||||
methods: {
|
||||
...mapActions('city', {
|
||||
'getLocation': CITY_GET_LOCATION,
|
||||
'selectCounty': CITY_SELECT_COUNTY,
|
||||
'changeCity': CITY_CHANGE_CODE,
|
||||
'changeCounty': CITY_CHANGE_COUNTY
|
||||
}),
|
||||
clickLetter (e) {
|
||||
const showLetter = e.currentTarget.dataset.letter
|
||||
this.toastShowLetter = showLetter
|
||||
this.isShowLetter = true
|
||||
this.scrollTopId = showLetter
|
||||
const self = this
|
||||
setTimeout(() => {
|
||||
self.isShowLetter = false
|
||||
}, 500)
|
||||
},
|
||||
reGetLocation () {
|
||||
this.getLocation()
|
||||
},
|
||||
// 选择城市
|
||||
bindCity (e) {
|
||||
this.condition = true
|
||||
this.changeCity({
|
||||
city: e.currentTarget.dataset.city,
|
||||
code: e.currentTarget.dataset.code
|
||||
})
|
||||
this.scrollTopId = 'selectcounty'
|
||||
this.completeList = []
|
||||
this.selectCounty()
|
||||
},
|
||||
bindCounty (e) {
|
||||
this.county = e.currentTarget.dataset.city
|
||||
this.changeCounty({
|
||||
county: e.currentTarget.dataset.city
|
||||
})
|
||||
mpvue.switchTab({
|
||||
url: '/pages/index'
|
||||
})
|
||||
},
|
||||
hotCity () {
|
||||
this.scrollTopId = 'currentcity'
|
||||
},
|
||||
bindScroll (e) {
|
||||
console.log(e.detail)
|
||||
},
|
||||
bindBlur (e) {
|
||||
this.inputName = ''
|
||||
},
|
||||
bindKeyInput (e) {
|
||||
this.inputName = e.mp.detail.value
|
||||
// 空搜索框时 取消匹配显示
|
||||
if (this.inputName.length < 1) {
|
||||
this.completeList = []
|
||||
}
|
||||
this.scrollTopId = 'completelist'
|
||||
this.auto()
|
||||
},
|
||||
auto () {
|
||||
let inputSd = this.inputName.trim()
|
||||
let sd = inputSd.toLowerCase()
|
||||
let num = sd.length
|
||||
const cityList = city.cityObjs
|
||||
let finalCityList = []
|
||||
let temp = cityList.filter(
|
||||
item => {
|
||||
let text = item.short.slice(0, num).toLowerCase()
|
||||
// eslint-disable-next-line
|
||||
return (text && text == sd);
|
||||
}
|
||||
)
|
||||
// 在城市数据中,添加简拼到“shorter”属性,就可以实现简拼搜索
|
||||
let tempShorter = cityList.filter(
|
||||
itemShorter => {
|
||||
if (itemShorter.shorter) {
|
||||
let textShorter = itemShorter.shorter.slice(0, num).toLowerCase()
|
||||
// eslint-disable-next-line
|
||||
return (textShorter && textShorter == sd);
|
||||
}
|
||||
}
|
||||
)
|
||||
let tempChinese = cityList.filter(
|
||||
itemChinese => {
|
||||
let textChinese = itemChinese.city.slice(0, num)
|
||||
// eslint-disable-next-line
|
||||
return (textChinese && textChinese == sd);
|
||||
}
|
||||
)
|
||||
if (temp[0]) {
|
||||
temp.map(
|
||||
item => {
|
||||
let testObj = {}
|
||||
testObj.city = item.city
|
||||
testObj.code = item.code
|
||||
finalCityList.push(testObj)
|
||||
}
|
||||
)
|
||||
this.completeList = finalCityList
|
||||
} else if (tempShorter[0]) {
|
||||
tempShorter.map(
|
||||
item => {
|
||||
let testObj = {}
|
||||
testObj.city = item.city
|
||||
testObj.code = item.code
|
||||
finalCityList.push(testObj)
|
||||
}
|
||||
)
|
||||
this.completeList = finalCityList
|
||||
} else if (tempChinese[0]) {
|
||||
tempChinese.map(
|
||||
item => {
|
||||
let testObj = {}
|
||||
testObj.city = item.city
|
||||
testObj.code = item.code
|
||||
finalCityList.push(testObj)
|
||||
}
|
||||
)
|
||||
this.completeList = finalCityList
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.container-inner {
|
||||
display: flex;
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
.container {
|
||||
flex-grow: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 10rpx;
|
||||
}
|
||||
input {
|
||||
text-align: center;
|
||||
font-size: 32rpx;
|
||||
padding: 5px;
|
||||
}
|
||||
.searchLetter {
|
||||
flex-shrink: 0;
|
||||
width: 80rpx;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
color: #666;
|
||||
}
|
||||
.searchLetter view {
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.touchClass {
|
||||
background-color: #fff;
|
||||
color: #fff;
|
||||
padding-top: 16rpx;
|
||||
padding-bottom: 16rpx;
|
||||
}
|
||||
.showSlectedLetter {
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
color: #fff;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin: -100rpx;
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
border-radius: 20rpx;
|
||||
font-size: 52rpx;
|
||||
z-index: 1;
|
||||
}
|
||||
.selection {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
flex-direction: column;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.selectCity {
|
||||
padding: 16rpx;
|
||||
background-color: #f5f5f5;
|
||||
margin-bottom: -10rpx;
|
||||
}
|
||||
.item_letter {
|
||||
display: flex;
|
||||
background-color: #f5f5f5;
|
||||
height: 40rpx;
|
||||
padding-left: 34rpx;
|
||||
align-items: center;
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
}
|
||||
.item_city {
|
||||
display: flex;
|
||||
background-color: #fff;
|
||||
height: 100rpx;
|
||||
padding-left: 34rpx;
|
||||
align-items: center;
|
||||
border-bottom: 1rpx solid #ededed;
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
}
|
||||
.hotcity-common {
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
padding-bottom: 0;
|
||||
margin: 8rpx 0;
|
||||
margin-left: 16rpx;
|
||||
}
|
||||
.hotcity {
|
||||
padding-right: 50rpx;
|
||||
margin: auto;
|
||||
}
|
||||
.thisCityName {
|
||||
display: inline-block;
|
||||
border: 1rpx solid #8BC34A;
|
||||
border-radius: 8rpx;
|
||||
padding: 10rpx 0;
|
||||
font-size: 24rpx;
|
||||
color: #8BC34A;
|
||||
text-align: center;
|
||||
min-width: 149.5rpx;
|
||||
margin: 16rpx 0;
|
||||
}
|
||||
.thishotText {
|
||||
color: #8BC34A;
|
||||
font-size: 20rpx;
|
||||
margin: 0 !important;
|
||||
}
|
||||
.slectCity {
|
||||
border-color: #8BC34A !important;
|
||||
}
|
||||
.slectCity view {
|
||||
color: #8BC34A !important;
|
||||
}
|
||||
.weui-grid {
|
||||
padding: 10rpx 0;
|
||||
width: 200rpx;
|
||||
box-sizing: border-box;
|
||||
border: 1rpx solid #ececec;
|
||||
border-radius: 8rpx;
|
||||
background-color: white;
|
||||
margin: 8rpx 0;
|
||||
}
|
||||
.weui-grids {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
border: none;
|
||||
}
|
||||
.weui-grid__label {
|
||||
display: block;
|
||||
text-align: center;
|
||||
color: #333;
|
||||
font-size: 24rpx;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
.ul {
|
||||
display: block;
|
||||
color: grey;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.li {
|
||||
display: block;
|
||||
font-weight: 100;
|
||||
font-size: 28rpx;
|
||||
padding: 16rpx 0;
|
||||
}
|
||||
input {
|
||||
background-color: #eee;
|
||||
}
|
||||
.input {
|
||||
padding: 16rpx;
|
||||
border-bottom: 1rpx solid #f1f1f1;
|
||||
}
|
||||
.county {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
</style>
|
||||
20
index.html
Normal file
20
index.html
Normal file
@ -0,0 +1,20 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<script>
|
||||
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
|
||||
CSS.supports('top: constant(a)'))
|
||||
document.write(
|
||||
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
|
||||
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
|
||||
</script>
|
||||
<title></title>
|
||||
<!--preload-links-->
|
||||
<!--app-context-->
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"><!--app-html--></div>
|
||||
<script type="module" src="/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
32
main.js
Normal file
32
main.js
Normal file
@ -0,0 +1,32 @@
|
||||
import App from './App'
|
||||
import store from './store/index'
|
||||
import api from './utils/api'
|
||||
import utils from './utils/index'
|
||||
// #ifndef VUE3
|
||||
import Vue from 'vue'
|
||||
import './uni.promisify.adaptor'
|
||||
Vue.config.productionTip = false
|
||||
App.mpType = 'app'
|
||||
const app = new Vue({
|
||||
store,
|
||||
api,
|
||||
utils,
|
||||
...App
|
||||
})
|
||||
Vue.prototype.$api = api;
|
||||
Vue.prototype.$utils = utils;
|
||||
Vue.prototype.$store = store;
|
||||
app.$mount()
|
||||
// #endif
|
||||
|
||||
// #ifdef VUE3
|
||||
import {
|
||||
createSSRApp
|
||||
} from 'vue'
|
||||
export function createApp() {
|
||||
const app = createSSRApp(App)
|
||||
return {
|
||||
app
|
||||
}
|
||||
}
|
||||
// #endif
|
||||
119
manifest.json
Normal file
119
manifest.json
Normal file
@ -0,0 +1,119 @@
|
||||
{
|
||||
"name" : "皖美驿站",
|
||||
"appid" : "__UNI__F870657",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.0",
|
||||
"versionCode" : "100",
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
"usingComponents" : true,
|
||||
"nvueStyleCompiler" : "uni-app",
|
||||
"compilerVersion" : 3,
|
||||
"splashscreen" : {
|
||||
"alwaysShowBeforeRender" : true,
|
||||
"waiting" : true,
|
||||
"autoclose" : true,
|
||||
"delay" : 0
|
||||
},
|
||||
/* 模块配置 */
|
||||
"modules" : {
|
||||
"Maps" : {}
|
||||
},
|
||||
/* 应用发布信息 */
|
||||
"distribute" : {
|
||||
/* android打包配置 */
|
||||
"android" : {
|
||||
"permissions" : [
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>"
|
||||
]
|
||||
},
|
||||
/* ios打包配置 */
|
||||
"ios" : {
|
||||
"dSYMs" : false,
|
||||
"info" : {
|
||||
"NSLocationWhenInUseUsageDescription" : "我们需要获取您的位置信息,提供更精准的服务。",
|
||||
"NSLocationAlwaysUsageDescription" : "我们需要获取您的位置信息,以便提供更全面的服务。"
|
||||
}
|
||||
},
|
||||
/* SDK配置 */
|
||||
"sdkConfigs" : {
|
||||
"ad" : {},
|
||||
"oauth" : {},
|
||||
"maps" : {
|
||||
"amap" : {
|
||||
"name" : "amap_18158132615AICJ55IM2",
|
||||
"appkey_ios" : "78e8b8340770d439c5415a6d897b68a7",
|
||||
"appkey_android" : "d773aa156f8ca2160cfb06d5f117dacd"
|
||||
}
|
||||
}
|
||||
},
|
||||
/* nvue */
|
||||
"nvue" : {
|
||||
"user-agent" : "user-agent"
|
||||
},
|
||||
"icons" : {
|
||||
"android" : {
|
||||
"hdpi" : "C:/Users/yskj03/Desktop/wanmeiyizhanLogo.png",
|
||||
"xhdpi" : "C:/Users/yskj03/Desktop/wanmeiyizhanLogo.png",
|
||||
"xxhdpi" : "C:/Users/yskj03/Desktop/wanmeiyizhanLogo.png",
|
||||
"xxxhdpi" : "C:/Users/yskj03/Desktop/wanmeiyizhanLogo.png"
|
||||
},
|
||||
"ios" : {
|
||||
"appstore" : ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"useragent" : {
|
||||
"value" : "app",
|
||||
"concatenate" : true
|
||||
}
|
||||
},
|
||||
/* 快应用特有相关 */
|
||||
"quickapp" : {},
|
||||
/* 小程序特有相关 */
|
||||
"mp-weixin" : {
|
||||
"appid" : "wx4c497eddcec4a0e7",
|
||||
"setting" : {
|
||||
"urlCheck" : false
|
||||
},
|
||||
"usingComponents" : true,
|
||||
"requiredPrivateInfos" : [ "getLocation" ],
|
||||
"__usePrivacyCheck__" : true,
|
||||
"lazyCodeLoading" : "requiredComponents",
|
||||
"permission" : {
|
||||
"scope.userLocation" : {
|
||||
"desc" : "获取位置信息用于展示"
|
||||
}
|
||||
}
|
||||
},
|
||||
"mp-alipay" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-baidu" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-toutiao" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"uniStatistics" : {
|
||||
"enable" : false
|
||||
},
|
||||
"vueVersion" : "2"
|
||||
}
|
||||
16
node_modules/.bin/atob
generated
vendored
Normal file
16
node_modules/.bin/atob
generated
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../atob/bin/atob.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../atob/bin/atob.js" "$@"
|
||||
fi
|
||||
17
node_modules/.bin/atob.cmd
generated
vendored
Normal file
17
node_modules/.bin/atob.cmd
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\atob\bin\atob.js" %*
|
||||
28
node_modules/.bin/atob.ps1
generated
vendored
Normal file
28
node_modules/.bin/atob.ps1
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../atob/bin/atob.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../atob/bin/atob.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../atob/bin/atob.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../atob/bin/atob.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
||||
16
node_modules/.bin/json5
generated
vendored
Normal file
16
node_modules/.bin/json5
generated
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../json5/lib/cli.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../json5/lib/cli.js" "$@"
|
||||
fi
|
||||
17
node_modules/.bin/json5.cmd
generated
vendored
Normal file
17
node_modules/.bin/json5.cmd
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\json5\lib\cli.js" %*
|
||||
28
node_modules/.bin/json5.ps1
generated
vendored
Normal file
28
node_modules/.bin/json5.ps1
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../json5/lib/cli.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../json5/lib/cli.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../json5/lib/cli.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../json5/lib/cli.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
||||
16
node_modules/.bin/mkdirp
generated
vendored
Normal file
16
node_modules/.bin/mkdirp
generated
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../mkdirp/bin/cmd.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../mkdirp/bin/cmd.js" "$@"
|
||||
fi
|
||||
17
node_modules/.bin/mkdirp.cmd
generated
vendored
Normal file
17
node_modules/.bin/mkdirp.cmd
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\mkdirp\bin\cmd.js" %*
|
||||
28
node_modules/.bin/mkdirp.ps1
generated
vendored
Normal file
28
node_modules/.bin/mkdirp.ps1
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../mkdirp/bin/cmd.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../mkdirp/bin/cmd.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../mkdirp/bin/cmd.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../mkdirp/bin/cmd.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
||||
16
node_modules/.bin/nanoid
generated
vendored
Normal file
16
node_modules/.bin/nanoid
generated
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../nanoid/bin/nanoid.cjs" "$@"
|
||||
else
|
||||
exec node "$basedir/../nanoid/bin/nanoid.cjs" "$@"
|
||||
fi
|
||||
17
node_modules/.bin/nanoid.cmd
generated
vendored
Normal file
17
node_modules/.bin/nanoid.cmd
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\nanoid\bin\nanoid.cjs" %*
|
||||
28
node_modules/.bin/nanoid.ps1
generated
vendored
Normal file
28
node_modules/.bin/nanoid.ps1
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
||||
16
node_modules/.bin/parser
generated
vendored
Normal file
16
node_modules/.bin/parser
generated
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../@babel/parser/bin/babel-parser.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../@babel/parser/bin/babel-parser.js" "$@"
|
||||
fi
|
||||
17
node_modules/.bin/parser.cmd
generated
vendored
Normal file
17
node_modules/.bin/parser.cmd
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\@babel\parser\bin\babel-parser.js" %*
|
||||
28
node_modules/.bin/parser.ps1
generated
vendored
Normal file
28
node_modules/.bin/parser.ps1
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
||||
16
node_modules/.bin/prettier
generated
vendored
Normal file
16
node_modules/.bin/prettier
generated
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../prettier/bin-prettier.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../prettier/bin-prettier.js" "$@"
|
||||
fi
|
||||
17
node_modules/.bin/prettier.cmd
generated
vendored
Normal file
17
node_modules/.bin/prettier.cmd
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\prettier\bin-prettier.js" %*
|
||||
28
node_modules/.bin/prettier.ps1
generated
vendored
Normal file
28
node_modules/.bin/prettier.ps1
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../prettier/bin-prettier.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../prettier/bin-prettier.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../prettier/bin-prettier.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../prettier/bin-prettier.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
||||
16
node_modules/.bin/semver
generated
vendored
Normal file
16
node_modules/.bin/semver
generated
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../semver/bin/semver.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../semver/bin/semver.js" "$@"
|
||||
fi
|
||||
17
node_modules/.bin/semver.cmd
generated
vendored
Normal file
17
node_modules/.bin/semver.cmd
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\semver\bin\semver.js" %*
|
||||
28
node_modules/.bin/semver.ps1
generated
vendored
Normal file
28
node_modules/.bin/semver.ps1
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../semver/bin/semver.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../semver/bin/semver.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
||||
16
node_modules/.bin/stylus
generated
vendored
Normal file
16
node_modules/.bin/stylus
generated
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../stylus/bin/stylus" "$@"
|
||||
else
|
||||
exec node "$basedir/../stylus/bin/stylus" "$@"
|
||||
fi
|
||||
17
node_modules/.bin/stylus.cmd
generated
vendored
Normal file
17
node_modules/.bin/stylus.cmd
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\stylus\bin\stylus" %*
|
||||
28
node_modules/.bin/stylus.ps1
generated
vendored
Normal file
28
node_modules/.bin/stylus.ps1
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../stylus/bin/stylus" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../stylus/bin/stylus" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../stylus/bin/stylus" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../stylus/bin/stylus" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
||||
529
node_modules/.package-lock.json
generated
vendored
Normal file
529
node_modules/.package-lock.json
generated
vendored
Normal file
@ -0,0 +1,529 @@
|
||||
{
|
||||
"name": "wanmeiyizhan",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"node_modules/@babel/helper-string-parser": {
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz",
|
||||
"integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helper-validator-identifier": {
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz",
|
||||
"integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/parser": {
|
||||
"version": "7.26.2",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.2.tgz",
|
||||
"integrity": "sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@babel/types": "^7.26.0"
|
||||
},
|
||||
"bin": {
|
||||
"parser": "bin/babel-parser.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/types": {
|
||||
"version": "7.26.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.0.tgz",
|
||||
"integrity": "sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@babel/helper-string-parser": "^7.25.9",
|
||||
"@babel/helper-validator-identifier": "^7.25.9"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@dcloudio/uni-ui": {
|
||||
"version": "1.5.7",
|
||||
"resolved": "https://registry.npmjs.org/@dcloudio/uni-ui/-/uni-ui-1.5.7.tgz",
|
||||
"integrity": "sha512-DugxSIrQrze1FLdUOj9a+JEQ0bHGjnJTcGUK1mN/MivKg7nuKJBRWk5Ipa9sUdoBznX6ndz5h2e7Uao6x1CdCw=="
|
||||
},
|
||||
"node_modules/@vue/compiler-sfc": {
|
||||
"version": "2.7.16",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-2.7.16.tgz",
|
||||
"integrity": "sha512-KWhJ9k5nXuNtygPU7+t1rX6baZeqOYLEforUPjgNDBnLicfHCoi48H87Q8XyLZOrNNsmhuwKqtpDQWjEFe6Ekg==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@babel/parser": "^7.23.5",
|
||||
"postcss": "^8.4.14",
|
||||
"source-map": "^0.6.1"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"prettier": "^1.18.2 || ^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/compiler-sfc/node_modules/source-map": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/atob": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
|
||||
"integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==",
|
||||
"bin": {
|
||||
"atob": "bin/atob.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 4.5.0"
|
||||
}
|
||||
},
|
||||
"node_modules/balanced-match": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
|
||||
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
|
||||
},
|
||||
"node_modules/big.js": {
|
||||
"version": "5.2.2",
|
||||
"resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz",
|
||||
"integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||
"dependencies": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/concat-map": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="
|
||||
},
|
||||
"node_modules/css": {
|
||||
"version": "2.2.4",
|
||||
"resolved": "https://registry.npmjs.org/css/-/css-2.2.4.tgz",
|
||||
"integrity": "sha512-oUnjmWpy0niI3x/mPL8dVEI1l7MnG3+HHyRPHf+YFSbK+svOhXpmSOcDURUh2aOCgl2grzrOPt1nHLuCVFULLw==",
|
||||
"dependencies": {
|
||||
"inherits": "^2.0.3",
|
||||
"source-map": "^0.6.1",
|
||||
"source-map-resolve": "^0.5.2",
|
||||
"urix": "^0.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/css-parse": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/css-parse/-/css-parse-2.0.0.tgz",
|
||||
"integrity": "sha512-UNIFik2RgSbiTwIW1IsFwXWn6vs+bYdq83LKTSOsx7NJR7WII9dxewkHLltfTLVppoUApHV0118a4RZRI9FLwA==",
|
||||
"dependencies": {
|
||||
"css": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/css/node_modules/source-map": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/csstype": {
|
||||
"version": "3.1.3",
|
||||
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz",
|
||||
"integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/debug": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
|
||||
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
|
||||
"dependencies": {
|
||||
"ms": "2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/decode-uri-component": {
|
||||
"version": "0.2.2",
|
||||
"resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz",
|
||||
"integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==",
|
||||
"engines": {
|
||||
"node": ">=0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/deepmerge": {
|
||||
"version": "4.3.1",
|
||||
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz",
|
||||
"integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/emojis-list": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz",
|
||||
"integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">= 4"
|
||||
}
|
||||
},
|
||||
"node_modules/fs.realpath": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
||||
"integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw=="
|
||||
},
|
||||
"node_modules/glob": {
|
||||
"version": "7.2.3",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
|
||||
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
|
||||
"deprecated": "Glob versions prior to v9 are no longer supported",
|
||||
"dependencies": {
|
||||
"fs.realpath": "^1.0.0",
|
||||
"inflight": "^1.0.4",
|
||||
"inherits": "2",
|
||||
"minimatch": "^3.1.1",
|
||||
"once": "^1.3.0",
|
||||
"path-is-absolute": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/inflight": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
||||
"integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
|
||||
"deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.",
|
||||
"dependencies": {
|
||||
"once": "^1.3.0",
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"node_modules/inherits": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
||||
},
|
||||
"node_modules/json5": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz",
|
||||
"integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"minimist": "^1.2.0"
|
||||
},
|
||||
"bin": {
|
||||
"json5": "lib/cli.js"
|
||||
}
|
||||
},
|
||||
"node_modules/loader-utils": {
|
||||
"version": "1.4.2",
|
||||
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.2.tgz",
|
||||
"integrity": "sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"big.js": "^5.2.2",
|
||||
"emojis-list": "^3.0.0",
|
||||
"json5": "^1.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/lodash.clonedeep": {
|
||||
"version": "4.5.0",
|
||||
"resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz",
|
||||
"integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/minimatch": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
||||
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
|
||||
"dependencies": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/minimist": {
|
||||
"version": "1.2.8",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
|
||||
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
|
||||
"dev": true,
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/mkdirp": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
|
||||
"integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
|
||||
"bin": {
|
||||
"mkdirp": "bin/cmd.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/ms": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
|
||||
},
|
||||
"node_modules/nanoid": {
|
||||
"version": "3.3.8",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz",
|
||||
"integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/ai"
|
||||
}
|
||||
],
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"nanoid": "bin/nanoid.cjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/once": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
|
||||
"dependencies": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"node_modules/path-is-absolute": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
||||
"integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/picocolors": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
|
||||
"integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/postcss": {
|
||||
"version": "8.4.49",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.49.tgz",
|
||||
"integrity": "sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/postcss/"
|
||||
},
|
||||
{
|
||||
"type": "tidelift",
|
||||
"url": "https://tidelift.com/funding/github/npm/postcss"
|
||||
},
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/ai"
|
||||
}
|
||||
],
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"nanoid": "^3.3.7",
|
||||
"picocolors": "^1.1.1",
|
||||
"source-map-js": "^1.2.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^10 || ^12 || >=14"
|
||||
}
|
||||
},
|
||||
"node_modules/prettier": {
|
||||
"version": "2.8.8",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz",
|
||||
"integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==",
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"prettier": "bin-prettier.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10.13.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/prettier/prettier?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/resolve-url": {
|
||||
"version": "0.2.1",
|
||||
"resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz",
|
||||
"integrity": "sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==",
|
||||
"deprecated": "https://github.com/lydell/resolve-url#deprecated"
|
||||
},
|
||||
"node_modules/safer-buffer": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
||||
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
|
||||
},
|
||||
"node_modules/sax": {
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
|
||||
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="
|
||||
},
|
||||
"node_modules/semver": {
|
||||
"version": "6.3.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
|
||||
"integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
|
||||
"bin": {
|
||||
"semver": "bin/semver.js"
|
||||
}
|
||||
},
|
||||
"node_modules/shvl": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/shvl/-/shvl-2.0.3.tgz",
|
||||
"integrity": "sha512-V7C6S9Hlol6SzOJPnQ7qzOVEWUQImt3BNmmzh40wObhla3XOYMe4gGiYzLrJd5TFa+cI2f9LKIRJTTKZSTbWgw==",
|
||||
"deprecated": "older versions vulnerable to prototype pollution"
|
||||
},
|
||||
"node_modules/source-map": {
|
||||
"version": "0.7.4",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz",
|
||||
"integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==",
|
||||
"engines": {
|
||||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/source-map-js": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
|
||||
"integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/source-map-resolve": {
|
||||
"version": "0.5.3",
|
||||
"resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz",
|
||||
"integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==",
|
||||
"deprecated": "See https://github.com/lydell/source-map-resolve#deprecated",
|
||||
"dependencies": {
|
||||
"atob": "^2.1.2",
|
||||
"decode-uri-component": "^0.2.0",
|
||||
"resolve-url": "^0.2.1",
|
||||
"source-map-url": "^0.4.0",
|
||||
"urix": "^0.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/source-map-url": {
|
||||
"version": "0.4.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz",
|
||||
"integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==",
|
||||
"deprecated": "See https://github.com/lydell/source-map-url#deprecated"
|
||||
},
|
||||
"node_modules/stylus": {
|
||||
"version": "0.54.8",
|
||||
"resolved": "https://registry.npmjs.org/stylus/-/stylus-0.54.8.tgz",
|
||||
"integrity": "sha512-vr54Or4BZ7pJafo2mpf0ZcwA74rpuYCZbxrHBsH8kbcXOwSfvBFwsRfpGO5OD5fhG5HDCFW737PKaawI7OqEAg==",
|
||||
"dependencies": {
|
||||
"css-parse": "~2.0.0",
|
||||
"debug": "~3.1.0",
|
||||
"glob": "^7.1.6",
|
||||
"mkdirp": "~1.0.4",
|
||||
"safer-buffer": "^2.1.2",
|
||||
"sax": "~1.2.4",
|
||||
"semver": "^6.3.0",
|
||||
"source-map": "^0.7.3"
|
||||
},
|
||||
"bin": {
|
||||
"stylus": "bin/stylus"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/stylus-loader": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/stylus-loader/-/stylus-loader-3.0.2.tgz",
|
||||
"integrity": "sha512-+VomPdZ6a0razP+zinir61yZgpw2NfljeSsdUF5kJuEzlo3khXhY19Fn6l8QQz1GRJGtMCo8nG5C04ePyV7SUA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"loader-utils": "^1.0.2",
|
||||
"lodash.clonedeep": "^4.5.0",
|
||||
"when": "~3.6.x"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"stylus": ">=0.52.4"
|
||||
}
|
||||
},
|
||||
"node_modules/urix": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz",
|
||||
"integrity": "sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==",
|
||||
"deprecated": "Please see https://github.com/lydell/urix#deprecated"
|
||||
},
|
||||
"node_modules/vue": {
|
||||
"version": "2.7.16",
|
||||
"resolved": "https://registry.npmjs.org/vue/-/vue-2.7.16.tgz",
|
||||
"integrity": "sha512-4gCtFXaAA3zYZdTp5s4Hl2sozuySsgz4jy1EnpBHNfpMa9dK1ZCG7viqBPCwXtmgc8nHqUsAu3G4gtmXkkY3Sw==",
|
||||
"deprecated": "Vue 2 has reached EOL and is no longer actively maintained. See https://v2.vuejs.org/eol/ for more details.",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@vue/compiler-sfc": "2.7.16",
|
||||
"csstype": "^3.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/vuex": {
|
||||
"version": "3.6.2",
|
||||
"resolved": "https://registry.npmjs.org/vuex/-/vuex-3.6.2.tgz",
|
||||
"integrity": "sha512-ETW44IqCgBpVomy520DT5jf8n0zoCac+sxWnn+hMe/CzaSejb/eVw2YToiXYX+Ex/AuHHia28vWTq4goAexFbw==",
|
||||
"peerDependencies": {
|
||||
"vue": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/vuex-persistedstate": {
|
||||
"version": "2.7.1",
|
||||
"resolved": "https://registry.npmjs.org/vuex-persistedstate/-/vuex-persistedstate-2.7.1.tgz",
|
||||
"integrity": "sha512-Ktvp6Bt6ApYj35MuxTClu+9Lpukcgl3Z/0o4PU12+Z4jU6lyOMzos0k6zGT5xrukAkGM1VV3EYNwz1TnHPhgFA==",
|
||||
"deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.",
|
||||
"dependencies": {
|
||||
"deepmerge": "^4.2.2",
|
||||
"shvl": "^2.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"vue": "^2.0.0",
|
||||
"vuex": "^2.0.0 || ^3.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/when": {
|
||||
"version": "3.6.4",
|
||||
"resolved": "https://registry.npmjs.org/when/-/when-3.6.4.tgz",
|
||||
"integrity": "sha512-d1VUP9F96w664lKINMGeElWdhhb5sC+thXM+ydZGU3ZnaE09Wv6FaS+mpM9570kcDs/xMfcXJBTLsMdHEFYY9Q==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/wrappy": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
|
||||
}
|
||||
}
|
||||
}
|
||||
22
node_modules/@babel/helper-string-parser/LICENSE
generated
vendored
Normal file
22
node_modules/@babel/helper-string-parser/LICENSE
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2014-present Sebastian McKenzie and other contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
19
node_modules/@babel/helper-string-parser/README.md
generated
vendored
Normal file
19
node_modules/@babel/helper-string-parser/README.md
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
# @babel/helper-string-parser
|
||||
|
||||
> A utility package to parse strings
|
||||
|
||||
See our website [@babel/helper-string-parser](https://babeljs.io/docs/babel-helper-string-parser) for more information.
|
||||
|
||||
## Install
|
||||
|
||||
Using npm:
|
||||
|
||||
```sh
|
||||
npm install --save @babel/helper-string-parser
|
||||
```
|
||||
|
||||
or using yarn:
|
||||
|
||||
```sh
|
||||
yarn add @babel/helper-string-parser
|
||||
```
|
||||
295
node_modules/@babel/helper-string-parser/lib/index.js
generated
vendored
Normal file
295
node_modules/@babel/helper-string-parser/lib/index.js
generated
vendored
Normal file
@ -0,0 +1,295 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.readCodePoint = readCodePoint;
|
||||
exports.readInt = readInt;
|
||||
exports.readStringContents = readStringContents;
|
||||
var _isDigit = function isDigit(code) {
|
||||
return code >= 48 && code <= 57;
|
||||
};
|
||||
const forbiddenNumericSeparatorSiblings = {
|
||||
decBinOct: new Set([46, 66, 69, 79, 95, 98, 101, 111]),
|
||||
hex: new Set([46, 88, 95, 120])
|
||||
};
|
||||
const isAllowedNumericSeparatorSibling = {
|
||||
bin: ch => ch === 48 || ch === 49,
|
||||
oct: ch => ch >= 48 && ch <= 55,
|
||||
dec: ch => ch >= 48 && ch <= 57,
|
||||
hex: ch => ch >= 48 && ch <= 57 || ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102
|
||||
};
|
||||
function readStringContents(type, input, pos, lineStart, curLine, errors) {
|
||||
const initialPos = pos;
|
||||
const initialLineStart = lineStart;
|
||||
const initialCurLine = curLine;
|
||||
let out = "";
|
||||
let firstInvalidLoc = null;
|
||||
let chunkStart = pos;
|
||||
const {
|
||||
length
|
||||
} = input;
|
||||
for (;;) {
|
||||
if (pos >= length) {
|
||||
errors.unterminated(initialPos, initialLineStart, initialCurLine);
|
||||
out += input.slice(chunkStart, pos);
|
||||
break;
|
||||
}
|
||||
const ch = input.charCodeAt(pos);
|
||||
if (isStringEnd(type, ch, input, pos)) {
|
||||
out += input.slice(chunkStart, pos);
|
||||
break;
|
||||
}
|
||||
if (ch === 92) {
|
||||
out += input.slice(chunkStart, pos);
|
||||
const res = readEscapedChar(input, pos, lineStart, curLine, type === "template", errors);
|
||||
if (res.ch === null && !firstInvalidLoc) {
|
||||
firstInvalidLoc = {
|
||||
pos,
|
||||
lineStart,
|
||||
curLine
|
||||
};
|
||||
} else {
|
||||
out += res.ch;
|
||||
}
|
||||
({
|
||||
pos,
|
||||
lineStart,
|
||||
curLine
|
||||
} = res);
|
||||
chunkStart = pos;
|
||||
} else if (ch === 8232 || ch === 8233) {
|
||||
++pos;
|
||||
++curLine;
|
||||
lineStart = pos;
|
||||
} else if (ch === 10 || ch === 13) {
|
||||
if (type === "template") {
|
||||
out += input.slice(chunkStart, pos) + "\n";
|
||||
++pos;
|
||||
if (ch === 13 && input.charCodeAt(pos) === 10) {
|
||||
++pos;
|
||||
}
|
||||
++curLine;
|
||||
chunkStart = lineStart = pos;
|
||||
} else {
|
||||
errors.unterminated(initialPos, initialLineStart, initialCurLine);
|
||||
}
|
||||
} else {
|
||||
++pos;
|
||||
}
|
||||
}
|
||||
return {
|
||||
pos,
|
||||
str: out,
|
||||
firstInvalidLoc,
|
||||
lineStart,
|
||||
curLine,
|
||||
containsInvalid: !!firstInvalidLoc
|
||||
};
|
||||
}
|
||||
function isStringEnd(type, ch, input, pos) {
|
||||
if (type === "template") {
|
||||
return ch === 96 || ch === 36 && input.charCodeAt(pos + 1) === 123;
|
||||
}
|
||||
return ch === (type === "double" ? 34 : 39);
|
||||
}
|
||||
function readEscapedChar(input, pos, lineStart, curLine, inTemplate, errors) {
|
||||
const throwOnInvalid = !inTemplate;
|
||||
pos++;
|
||||
const res = ch => ({
|
||||
pos,
|
||||
ch,
|
||||
lineStart,
|
||||
curLine
|
||||
});
|
||||
const ch = input.charCodeAt(pos++);
|
||||
switch (ch) {
|
||||
case 110:
|
||||
return res("\n");
|
||||
case 114:
|
||||
return res("\r");
|
||||
case 120:
|
||||
{
|
||||
let code;
|
||||
({
|
||||
code,
|
||||
pos
|
||||
} = readHexChar(input, pos, lineStart, curLine, 2, false, throwOnInvalid, errors));
|
||||
return res(code === null ? null : String.fromCharCode(code));
|
||||
}
|
||||
case 117:
|
||||
{
|
||||
let code;
|
||||
({
|
||||
code,
|
||||
pos
|
||||
} = readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors));
|
||||
return res(code === null ? null : String.fromCodePoint(code));
|
||||
}
|
||||
case 116:
|
||||
return res("\t");
|
||||
case 98:
|
||||
return res("\b");
|
||||
case 118:
|
||||
return res("\u000b");
|
||||
case 102:
|
||||
return res("\f");
|
||||
case 13:
|
||||
if (input.charCodeAt(pos) === 10) {
|
||||
++pos;
|
||||
}
|
||||
case 10:
|
||||
lineStart = pos;
|
||||
++curLine;
|
||||
case 8232:
|
||||
case 8233:
|
||||
return res("");
|
||||
case 56:
|
||||
case 57:
|
||||
if (inTemplate) {
|
||||
return res(null);
|
||||
} else {
|
||||
errors.strictNumericEscape(pos - 1, lineStart, curLine);
|
||||
}
|
||||
default:
|
||||
if (ch >= 48 && ch <= 55) {
|
||||
const startPos = pos - 1;
|
||||
const match = /^[0-7]+/.exec(input.slice(startPos, pos + 2));
|
||||
let octalStr = match[0];
|
||||
let octal = parseInt(octalStr, 8);
|
||||
if (octal > 255) {
|
||||
octalStr = octalStr.slice(0, -1);
|
||||
octal = parseInt(octalStr, 8);
|
||||
}
|
||||
pos += octalStr.length - 1;
|
||||
const next = input.charCodeAt(pos);
|
||||
if (octalStr !== "0" || next === 56 || next === 57) {
|
||||
if (inTemplate) {
|
||||
return res(null);
|
||||
} else {
|
||||
errors.strictNumericEscape(startPos, lineStart, curLine);
|
||||
}
|
||||
}
|
||||
return res(String.fromCharCode(octal));
|
||||
}
|
||||
return res(String.fromCharCode(ch));
|
||||
}
|
||||
}
|
||||
function readHexChar(input, pos, lineStart, curLine, len, forceLen, throwOnInvalid, errors) {
|
||||
const initialPos = pos;
|
||||
let n;
|
||||
({
|
||||
n,
|
||||
pos
|
||||
} = readInt(input, pos, lineStart, curLine, 16, len, forceLen, false, errors, !throwOnInvalid));
|
||||
if (n === null) {
|
||||
if (throwOnInvalid) {
|
||||
errors.invalidEscapeSequence(initialPos, lineStart, curLine);
|
||||
} else {
|
||||
pos = initialPos - 1;
|
||||
}
|
||||
}
|
||||
return {
|
||||
code: n,
|
||||
pos
|
||||
};
|
||||
}
|
||||
function readInt(input, pos, lineStart, curLine, radix, len, forceLen, allowNumSeparator, errors, bailOnError) {
|
||||
const start = pos;
|
||||
const forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct;
|
||||
const isAllowedSibling = radix === 16 ? isAllowedNumericSeparatorSibling.hex : radix === 10 ? isAllowedNumericSeparatorSibling.dec : radix === 8 ? isAllowedNumericSeparatorSibling.oct : isAllowedNumericSeparatorSibling.bin;
|
||||
let invalid = false;
|
||||
let total = 0;
|
||||
for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) {
|
||||
const code = input.charCodeAt(pos);
|
||||
let val;
|
||||
if (code === 95 && allowNumSeparator !== "bail") {
|
||||
const prev = input.charCodeAt(pos - 1);
|
||||
const next = input.charCodeAt(pos + 1);
|
||||
if (!allowNumSeparator) {
|
||||
if (bailOnError) return {
|
||||
n: null,
|
||||
pos
|
||||
};
|
||||
errors.numericSeparatorInEscapeSequence(pos, lineStart, curLine);
|
||||
} else if (Number.isNaN(next) || !isAllowedSibling(next) || forbiddenSiblings.has(prev) || forbiddenSiblings.has(next)) {
|
||||
if (bailOnError) return {
|
||||
n: null,
|
||||
pos
|
||||
};
|
||||
errors.unexpectedNumericSeparator(pos, lineStart, curLine);
|
||||
}
|
||||
++pos;
|
||||
continue;
|
||||
}
|
||||
if (code >= 97) {
|
||||
val = code - 97 + 10;
|
||||
} else if (code >= 65) {
|
||||
val = code - 65 + 10;
|
||||
} else if (_isDigit(code)) {
|
||||
val = code - 48;
|
||||
} else {
|
||||
val = Infinity;
|
||||
}
|
||||
if (val >= radix) {
|
||||
if (val <= 9 && bailOnError) {
|
||||
return {
|
||||
n: null,
|
||||
pos
|
||||
};
|
||||
} else if (val <= 9 && errors.invalidDigit(pos, lineStart, curLine, radix)) {
|
||||
val = 0;
|
||||
} else if (forceLen) {
|
||||
val = 0;
|
||||
invalid = true;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
++pos;
|
||||
total = total * radix + val;
|
||||
}
|
||||
if (pos === start || len != null && pos - start !== len || invalid) {
|
||||
return {
|
||||
n: null,
|
||||
pos
|
||||
};
|
||||
}
|
||||
return {
|
||||
n: total,
|
||||
pos
|
||||
};
|
||||
}
|
||||
function readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors) {
|
||||
const ch = input.charCodeAt(pos);
|
||||
let code;
|
||||
if (ch === 123) {
|
||||
++pos;
|
||||
({
|
||||
code,
|
||||
pos
|
||||
} = readHexChar(input, pos, lineStart, curLine, input.indexOf("}", pos) - pos, true, throwOnInvalid, errors));
|
||||
++pos;
|
||||
if (code !== null && code > 0x10ffff) {
|
||||
if (throwOnInvalid) {
|
||||
errors.invalidCodePoint(pos, lineStart, curLine);
|
||||
} else {
|
||||
return {
|
||||
code: null,
|
||||
pos
|
||||
};
|
||||
}
|
||||
}
|
||||
} else {
|
||||
({
|
||||
code,
|
||||
pos
|
||||
} = readHexChar(input, pos, lineStart, curLine, 4, false, throwOnInvalid, errors));
|
||||
}
|
||||
return {
|
||||
code,
|
||||
pos
|
||||
};
|
||||
}
|
||||
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/@babel/helper-string-parser/lib/index.js.map
generated
vendored
Normal file
1
node_modules/@babel/helper-string-parser/lib/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
31
node_modules/@babel/helper-string-parser/package.json
generated
vendored
Normal file
31
node_modules/@babel/helper-string-parser/package.json
generated
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
{
|
||||
"name": "@babel/helper-string-parser",
|
||||
"version": "7.25.9",
|
||||
"description": "A utility package to parse strings",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/babel/babel.git",
|
||||
"directory": "packages/babel-helper-string-parser"
|
||||
},
|
||||
"homepage": "https://babel.dev/docs/en/next/babel-helper-string-parser",
|
||||
"license": "MIT",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"devDependencies": {
|
||||
"charcodes": "^0.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
},
|
||||
"author": "The Babel Team (https://babel.dev/team)",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./lib/index.d.ts",
|
||||
"default": "./lib/index.js"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"type": "commonjs"
|
||||
}
|
||||
22
node_modules/@babel/helper-validator-identifier/LICENSE
generated
vendored
Normal file
22
node_modules/@babel/helper-validator-identifier/LICENSE
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2014-present Sebastian McKenzie and other contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
19
node_modules/@babel/helper-validator-identifier/README.md
generated
vendored
Normal file
19
node_modules/@babel/helper-validator-identifier/README.md
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
# @babel/helper-validator-identifier
|
||||
|
||||
> Validate identifier/keywords name
|
||||
|
||||
See our website [@babel/helper-validator-identifier](https://babeljs.io/docs/babel-helper-validator-identifier) for more information.
|
||||
|
||||
## Install
|
||||
|
||||
Using npm:
|
||||
|
||||
```sh
|
||||
npm install --save @babel/helper-validator-identifier
|
||||
```
|
||||
|
||||
or using yarn:
|
||||
|
||||
```sh
|
||||
yarn add @babel/helper-validator-identifier
|
||||
```
|
||||
70
node_modules/@babel/helper-validator-identifier/lib/identifier.js
generated
vendored
Normal file
70
node_modules/@babel/helper-validator-identifier/lib/identifier.js
generated
vendored
Normal file
@ -0,0 +1,70 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.isIdentifierChar = isIdentifierChar;
|
||||
exports.isIdentifierName = isIdentifierName;
|
||||
exports.isIdentifierStart = isIdentifierStart;
|
||||
let nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u0870-\u0887\u0889-\u088e\u08a0-\u08c9\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c5d\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cdd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u1711\u171f-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4c\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c8a\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7cd\ua7d0\ua7d1\ua7d3\ua7d5-\ua7dc\ua7f2-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab69\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc";
|
||||
let nonASCIIidentifierChars = "\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0897-\u089f\u08ca-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3c\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0cf3\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ece\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u180f-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf-\u1ace\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1dff\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\u30fb\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f\uff65";
|
||||
const nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
|
||||
const nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
|
||||
nonASCIIidentifierStartChars = nonASCIIidentifierChars = null;
|
||||
const astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 2, 60, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 42, 9, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 496, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191];
|
||||
const astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 80, 3, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 343, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 726, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
|
||||
function isInAstralSet(code, set) {
|
||||
let pos = 0x10000;
|
||||
for (let i = 0, length = set.length; i < length; i += 2) {
|
||||
pos += set[i];
|
||||
if (pos > code) return false;
|
||||
pos += set[i + 1];
|
||||
if (pos >= code) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function isIdentifierStart(code) {
|
||||
if (code < 65) return code === 36;
|
||||
if (code <= 90) return true;
|
||||
if (code < 97) return code === 95;
|
||||
if (code <= 122) return true;
|
||||
if (code <= 0xffff) {
|
||||
return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code));
|
||||
}
|
||||
return isInAstralSet(code, astralIdentifierStartCodes);
|
||||
}
|
||||
function isIdentifierChar(code) {
|
||||
if (code < 48) return code === 36;
|
||||
if (code < 58) return true;
|
||||
if (code < 65) return false;
|
||||
if (code <= 90) return true;
|
||||
if (code < 97) return code === 95;
|
||||
if (code <= 122) return true;
|
||||
if (code <= 0xffff) {
|
||||
return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));
|
||||
}
|
||||
return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes);
|
||||
}
|
||||
function isIdentifierName(name) {
|
||||
let isFirst = true;
|
||||
for (let i = 0; i < name.length; i++) {
|
||||
let cp = name.charCodeAt(i);
|
||||
if ((cp & 0xfc00) === 0xd800 && i + 1 < name.length) {
|
||||
const trail = name.charCodeAt(++i);
|
||||
if ((trail & 0xfc00) === 0xdc00) {
|
||||
cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff);
|
||||
}
|
||||
}
|
||||
if (isFirst) {
|
||||
isFirst = false;
|
||||
if (!isIdentifierStart(cp)) {
|
||||
return false;
|
||||
}
|
||||
} else if (!isIdentifierChar(cp)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return !isFirst;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=identifier.js.map
|
||||
1
node_modules/@babel/helper-validator-identifier/lib/identifier.js.map
generated
vendored
Normal file
1
node_modules/@babel/helper-validator-identifier/lib/identifier.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
57
node_modules/@babel/helper-validator-identifier/lib/index.js
generated
vendored
Normal file
57
node_modules/@babel/helper-validator-identifier/lib/index.js
generated
vendored
Normal file
@ -0,0 +1,57 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "isIdentifierChar", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _identifier.isIdentifierChar;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "isIdentifierName", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _identifier.isIdentifierName;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "isIdentifierStart", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _identifier.isIdentifierStart;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "isKeyword", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _keyword.isKeyword;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "isReservedWord", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _keyword.isReservedWord;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "isStrictBindOnlyReservedWord", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _keyword.isStrictBindOnlyReservedWord;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "isStrictBindReservedWord", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _keyword.isStrictBindReservedWord;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "isStrictReservedWord", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _keyword.isStrictReservedWord;
|
||||
}
|
||||
});
|
||||
var _identifier = require("./identifier.js");
|
||||
var _keyword = require("./keyword.js");
|
||||
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/@babel/helper-validator-identifier/lib/index.js.map
generated
vendored
Normal file
1
node_modules/@babel/helper-validator-identifier/lib/index.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"names":["_identifier","require","_keyword"],"sources":["../src/index.ts"],"sourcesContent":["export {\n isIdentifierName,\n isIdentifierChar,\n isIdentifierStart,\n} from \"./identifier.ts\";\nexport {\n isReservedWord,\n isStrictBindOnlyReservedWord,\n isStrictBindReservedWord,\n isStrictReservedWord,\n isKeyword,\n} from \"./keyword.ts\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA","ignoreList":[]}
|
||||
35
node_modules/@babel/helper-validator-identifier/lib/keyword.js
generated
vendored
Normal file
35
node_modules/@babel/helper-validator-identifier/lib/keyword.js
generated
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.isKeyword = isKeyword;
|
||||
exports.isReservedWord = isReservedWord;
|
||||
exports.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord;
|
||||
exports.isStrictBindReservedWord = isStrictBindReservedWord;
|
||||
exports.isStrictReservedWord = isStrictReservedWord;
|
||||
const reservedWords = {
|
||||
keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"],
|
||||
strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
|
||||
strictBind: ["eval", "arguments"]
|
||||
};
|
||||
const keywords = new Set(reservedWords.keyword);
|
||||
const reservedWordsStrictSet = new Set(reservedWords.strict);
|
||||
const reservedWordsStrictBindSet = new Set(reservedWords.strictBind);
|
||||
function isReservedWord(word, inModule) {
|
||||
return inModule && word === "await" || word === "enum";
|
||||
}
|
||||
function isStrictReservedWord(word, inModule) {
|
||||
return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);
|
||||
}
|
||||
function isStrictBindOnlyReservedWord(word) {
|
||||
return reservedWordsStrictBindSet.has(word);
|
||||
}
|
||||
function isStrictBindReservedWord(word, inModule) {
|
||||
return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);
|
||||
}
|
||||
function isKeyword(word) {
|
||||
return keywords.has(word);
|
||||
}
|
||||
|
||||
//# sourceMappingURL=keyword.js.map
|
||||
1
node_modules/@babel/helper-validator-identifier/lib/keyword.js.map
generated
vendored
Normal file
1
node_modules/@babel/helper-validator-identifier/lib/keyword.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"names":["reservedWords","keyword","strict","strictBind","keywords","Set","reservedWordsStrictSet","reservedWordsStrictBindSet","isReservedWord","word","inModule","isStrictReservedWord","has","isStrictBindOnlyReservedWord","isStrictBindReservedWord","isKeyword"],"sources":["../src/keyword.ts"],"sourcesContent":["const reservedWords = {\n keyword: [\n \"break\",\n \"case\",\n \"catch\",\n \"continue\",\n \"debugger\",\n \"default\",\n \"do\",\n \"else\",\n \"finally\",\n \"for\",\n \"function\",\n \"if\",\n \"return\",\n \"switch\",\n \"throw\",\n \"try\",\n \"var\",\n \"const\",\n \"while\",\n \"with\",\n \"new\",\n \"this\",\n \"super\",\n \"class\",\n \"extends\",\n \"export\",\n \"import\",\n \"null\",\n \"true\",\n \"false\",\n \"in\",\n \"instanceof\",\n \"typeof\",\n \"void\",\n \"delete\",\n ],\n strict: [\n \"implements\",\n \"interface\",\n \"let\",\n \"package\",\n \"private\",\n \"protected\",\n \"public\",\n \"static\",\n \"yield\",\n ],\n strictBind: [\"eval\", \"arguments\"],\n};\nconst keywords = new Set(reservedWords.keyword);\nconst reservedWordsStrictSet = new Set(reservedWords.strict);\nconst reservedWordsStrictBindSet = new Set(reservedWords.strictBind);\n\n/**\n * Checks if word is a reserved word in non-strict mode\n */\nexport function isReservedWord(word: string, inModule: boolean): boolean {\n return (inModule && word === \"await\") || word === \"enum\";\n}\n\n/**\n * Checks if word is a reserved word in non-binding strict mode\n *\n * Includes non-strict reserved words\n */\nexport function isStrictReservedWord(word: string, inModule: boolean): boolean {\n return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);\n}\n\n/**\n * Checks if word is a reserved word in binding strict mode, but it is allowed as\n * a normal identifier.\n */\nexport function isStrictBindOnlyReservedWord(word: string): boolean {\n return reservedWordsStrictBindSet.has(word);\n}\n\n/**\n * Checks if word is a reserved word in binding strict mode\n *\n * Includes non-strict reserved words and non-binding strict reserved words\n */\nexport function isStrictBindReservedWord(\n word: string,\n inModule: boolean,\n): boolean {\n return (\n isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word)\n );\n}\n\nexport function isKeyword(word: string): boolean {\n return keywords.has(word);\n}\n"],"mappings":";;;;;;;;;;AAAA,MAAMA,aAAa,GAAG;EACpBC,OAAO,EAAE,CACP,OAAO,EACP,MAAM,EACN,OAAO,EACP,UAAU,EACV,UAAU,EACV,SAAS,EACT,IAAI,EACJ,MAAM,EACN,SAAS,EACT,KAAK,EACL,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,KAAK,EACL,KAAK,EACL,OAAO,EACP,OAAO,EACP,MAAM,EACN,KAAK,EACL,MAAM,EACN,OAAO,EACP,OAAO,EACP,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,MAAM,EACN,OAAO,EACP,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,QAAQ,CACT;EACDC,MAAM,EAAE,CACN,YAAY,EACZ,WAAW,EACX,KAAK,EACL,SAAS,EACT,SAAS,EACT,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,OAAO,CACR;EACDC,UAAU,EAAE,CAAC,MAAM,EAAE,WAAW;AAClC,CAAC;AACD,MAAMC,QAAQ,GAAG,IAAIC,GAAG,CAACL,aAAa,CAACC,OAAO,CAAC;AAC/C,MAAMK,sBAAsB,GAAG,IAAID,GAAG,CAACL,aAAa,CAACE,MAAM,CAAC;AAC5D,MAAMK,0BAA0B,GAAG,IAAIF,GAAG,CAACL,aAAa,CAACG,UAAU,CAAC;AAK7D,SAASK,cAAcA,CAACC,IAAY,EAAEC,QAAiB,EAAW;EACvE,OAAQA,QAAQ,IAAID,IAAI,KAAK,OAAO,IAAKA,IAAI,KAAK,MAAM;AAC1D;AAOO,SAASE,oBAAoBA,CAACF,IAAY,EAAEC,QAAiB,EAAW;EAC7E,OAAOF,cAAc,CAACC,IAAI,EAAEC,QAAQ,CAAC,IAAIJ,sBAAsB,CAACM,GAAG,CAACH,IAAI,CAAC;AAC3E;AAMO,SAASI,4BAA4BA,CAACJ,IAAY,EAAW;EAClE,OAAOF,0BAA0B,CAACK,GAAG,CAACH,IAAI,CAAC;AAC7C;AAOO,SAASK,wBAAwBA,CACtCL,IAAY,EACZC,QAAiB,EACR;EACT,OACEC,oBAAoB,CAACF,IAAI,EAAEC,QAAQ,CAAC,IAAIG,4BAA4B,CAACJ,IAAI,CAAC;AAE9E;AAEO,SAASM,SAASA,CAACN,IAAY,EAAW;EAC/C,OAAOL,QAAQ,CAACQ,GAAG,CAACH,IAAI,CAAC;AAC3B","ignoreList":[]}
|
||||
31
node_modules/@babel/helper-validator-identifier/package.json
generated
vendored
Normal file
31
node_modules/@babel/helper-validator-identifier/package.json
generated
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
{
|
||||
"name": "@babel/helper-validator-identifier",
|
||||
"version": "7.25.9",
|
||||
"description": "Validate identifier/keywords name",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/babel/babel.git",
|
||||
"directory": "packages/babel-helper-validator-identifier"
|
||||
},
|
||||
"license": "MIT",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./lib/index.d.ts",
|
||||
"default": "./lib/index.js"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@unicode/unicode-16.0.0": "^1.0.0",
|
||||
"charcodes": "^0.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
},
|
||||
"author": "The Babel Team (https://babel.dev/team)",
|
||||
"type": "commonjs"
|
||||
}
|
||||
1073
node_modules/@babel/parser/CHANGELOG.md
generated
vendored
Normal file
1073
node_modules/@babel/parser/CHANGELOG.md
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
19
node_modules/@babel/parser/LICENSE
generated
vendored
Normal file
19
node_modules/@babel/parser/LICENSE
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
Copyright (C) 2012-2014 by various contributors (see AUTHORS)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
19
node_modules/@babel/parser/README.md
generated
vendored
Normal file
19
node_modules/@babel/parser/README.md
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
# @babel/parser
|
||||
|
||||
> A JavaScript parser
|
||||
|
||||
See our website [@babel/parser](https://babeljs.io/docs/babel-parser) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20parser%22+is%3Aopen) associated with this package.
|
||||
|
||||
## Install
|
||||
|
||||
Using npm:
|
||||
|
||||
```sh
|
||||
npm install --save-dev @babel/parser
|
||||
```
|
||||
|
||||
or using yarn:
|
||||
|
||||
```sh
|
||||
yarn add @babel/parser --dev
|
||||
```
|
||||
15
node_modules/@babel/parser/bin/babel-parser.js
generated
vendored
Normal file
15
node_modules/@babel/parser/bin/babel-parser.js
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env node
|
||||
/* eslint no-var: 0 */
|
||||
|
||||
var parser = require("..");
|
||||
var fs = require("fs");
|
||||
|
||||
var filename = process.argv[2];
|
||||
if (!filename) {
|
||||
console.error("no filename specified");
|
||||
} else {
|
||||
var file = fs.readFileSync(filename, "utf8");
|
||||
var ast = parser.parse(file);
|
||||
|
||||
console.log(JSON.stringify(ast, null, " "));
|
||||
}
|
||||
5
node_modules/@babel/parser/index.cjs
generated
vendored
Normal file
5
node_modules/@babel/parser/index.cjs
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
try {
|
||||
module.exports = require("./lib/index.cjs");
|
||||
} catch {
|
||||
module.exports = require("./lib/index.js");
|
||||
}
|
||||
14023
node_modules/@babel/parser/lib/index.js
generated
vendored
Normal file
14023
node_modules/@babel/parser/lib/index.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
node_modules/@babel/parser/lib/index.js.map
generated
vendored
Normal file
1
node_modules/@babel/parser/lib/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
50
node_modules/@babel/parser/package.json
generated
vendored
Normal file
50
node_modules/@babel/parser/package.json
generated
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
{
|
||||
"name": "@babel/parser",
|
||||
"version": "7.26.2",
|
||||
"description": "A JavaScript parser",
|
||||
"author": "The Babel Team (https://babel.dev/team)",
|
||||
"homepage": "https://babel.dev/docs/en/next/babel-parser",
|
||||
"bugs": "https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A+parser+%28babylon%29%22+is%3Aopen",
|
||||
"license": "MIT",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"keywords": [
|
||||
"babel",
|
||||
"javascript",
|
||||
"parser",
|
||||
"tc39",
|
||||
"ecmascript",
|
||||
"@babel/parser"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/babel/babel.git",
|
||||
"directory": "packages/babel-parser"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"types": "./typings/babel-parser.d.ts",
|
||||
"files": [
|
||||
"bin",
|
||||
"lib",
|
||||
"typings/babel-parser.d.ts",
|
||||
"index.cjs"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=6.0.0"
|
||||
},
|
||||
"# dependencies": "This package doesn't actually have runtime dependencies. @babel/types is only needed for type definitions.",
|
||||
"dependencies": {
|
||||
"@babel/types": "^7.26.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/code-frame": "^7.26.2",
|
||||
"@babel/helper-check-duplicate-nodes": "^7.25.9",
|
||||
"@babel/helper-fixtures": "^7.26.0",
|
||||
"@babel/helper-string-parser": "^7.25.9",
|
||||
"@babel/helper-validator-identifier": "^7.25.9",
|
||||
"charcodes": "^0.2.0"
|
||||
},
|
||||
"bin": "./bin/babel-parser.js",
|
||||
"type": "commonjs"
|
||||
}
|
||||
267
node_modules/@babel/parser/typings/babel-parser.d.ts
generated
vendored
Normal file
267
node_modules/@babel/parser/typings/babel-parser.d.ts
generated
vendored
Normal file
@ -0,0 +1,267 @@
|
||||
// This file is auto-generated! Do not modify it directly.
|
||||
/* eslint-disable @typescript-eslint/consistent-type-imports, @typescript-eslint/no-redundant-type-constituents */
|
||||
import * as _babel_types from '@babel/types';
|
||||
|
||||
type BABEL_8_BREAKING = false;
|
||||
type IF_BABEL_7<V> = false extends BABEL_8_BREAKING ? V : never;
|
||||
|
||||
type Plugin =
|
||||
| "asyncDoExpressions"
|
||||
| IF_BABEL_7<"asyncGenerators">
|
||||
| IF_BABEL_7<"bigInt">
|
||||
| IF_BABEL_7<"classPrivateMethods">
|
||||
| IF_BABEL_7<"classPrivateProperties">
|
||||
| IF_BABEL_7<"classProperties">
|
||||
| IF_BABEL_7<"classStaticBlock">
|
||||
| IF_BABEL_7<"decimal">
|
||||
| "decorators-legacy"
|
||||
| "deferredImportEvaluation"
|
||||
| "decoratorAutoAccessors"
|
||||
| "destructuringPrivate"
|
||||
| "deprecatedImportAssert"
|
||||
| "doExpressions"
|
||||
| IF_BABEL_7<"dynamicImport">
|
||||
| "explicitResourceManagement"
|
||||
| "exportDefaultFrom"
|
||||
| IF_BABEL_7<"exportNamespaceFrom">
|
||||
| "flow"
|
||||
| "flowComments"
|
||||
| "functionBind"
|
||||
| "functionSent"
|
||||
| "importMeta"
|
||||
| "jsx"
|
||||
| IF_BABEL_7<"jsonStrings">
|
||||
| IF_BABEL_7<"logicalAssignment">
|
||||
| IF_BABEL_7<"importAssertions">
|
||||
| IF_BABEL_7<"importReflection">
|
||||
| "moduleBlocks"
|
||||
| IF_BABEL_7<"moduleStringNames">
|
||||
| IF_BABEL_7<"nullishCoalescingOperator">
|
||||
| IF_BABEL_7<"numericSeparator">
|
||||
| IF_BABEL_7<"objectRestSpread">
|
||||
| IF_BABEL_7<"optionalCatchBinding">
|
||||
| IF_BABEL_7<"optionalChaining">
|
||||
| "partialApplication"
|
||||
| "placeholders"
|
||||
| IF_BABEL_7<"privateIn">
|
||||
| IF_BABEL_7<"regexpUnicodeSets">
|
||||
| "sourcePhaseImports"
|
||||
| "throwExpressions"
|
||||
| IF_BABEL_7<"topLevelAwait">
|
||||
| "v8intrinsic"
|
||||
| ParserPluginWithOptions[0];
|
||||
|
||||
type ParserPluginWithOptions =
|
||||
| ["decorators", DecoratorsPluginOptions]
|
||||
| ["estree", { classFeatures?: boolean }]
|
||||
| IF_BABEL_7<["importAttributes", { deprecatedAssertSyntax: boolean }]>
|
||||
| IF_BABEL_7<["moduleAttributes", { version: "may-2020" }]>
|
||||
| ["optionalChainingAssign", { version: "2023-07" }]
|
||||
| ["pipelineOperator", PipelineOperatorPluginOptions]
|
||||
| ["recordAndTuple", RecordAndTuplePluginOptions]
|
||||
| ["flow", FlowPluginOptions]
|
||||
| ["typescript", TypeScriptPluginOptions];
|
||||
|
||||
type PluginConfig = Plugin | ParserPluginWithOptions;
|
||||
|
||||
interface DecoratorsPluginOptions {
|
||||
decoratorsBeforeExport?: boolean;
|
||||
allowCallParenthesized?: boolean;
|
||||
}
|
||||
|
||||
interface PipelineOperatorPluginOptions {
|
||||
proposal: BABEL_8_BREAKING extends false
|
||||
? "minimal" | "fsharp" | "hack" | "smart"
|
||||
: "fsharp" | "hack";
|
||||
topicToken?: "%" | "#" | "@@" | "^^" | "^";
|
||||
}
|
||||
|
||||
interface RecordAndTuplePluginOptions {
|
||||
syntaxType: "bar" | "hash";
|
||||
}
|
||||
|
||||
type FlowPluginOptions = BABEL_8_BREAKING extends true
|
||||
? {
|
||||
all?: boolean;
|
||||
enums?: boolean;
|
||||
}
|
||||
: {
|
||||
all?: boolean;
|
||||
};
|
||||
|
||||
interface TypeScriptPluginOptions {
|
||||
dts?: boolean;
|
||||
disallowAmbiguousJSXLike?: boolean;
|
||||
}
|
||||
|
||||
// Type definitions for @babel/parser
|
||||
// Project: https://github.com/babel/babel/tree/main/packages/babel-parser
|
||||
// Definitions by: Troy Gerwien <https://github.com/yortus>
|
||||
// Marvin Hagemeister <https://github.com/marvinhagemeister>
|
||||
// Avi Vahl <https://github.com/AviVahl>
|
||||
// TypeScript Version: 2.9
|
||||
|
||||
/**
|
||||
* Parse the provided code as an entire ECMAScript program.
|
||||
*/
|
||||
declare function parse(
|
||||
input: string,
|
||||
options?: ParserOptions
|
||||
): ParseResult<_babel_types.File>;
|
||||
|
||||
/**
|
||||
* Parse the provided code as a single expression.
|
||||
*/
|
||||
declare function parseExpression(
|
||||
input: string,
|
||||
options?: ParserOptions
|
||||
): ParseResult<_babel_types.Expression>;
|
||||
|
||||
interface ParserOptions {
|
||||
/**
|
||||
* By default, import and export declarations can only appear at a program's top level.
|
||||
* Setting this option to true allows them anywhere where a statement is allowed.
|
||||
*/
|
||||
allowImportExportEverywhere?: boolean;
|
||||
|
||||
/**
|
||||
* By default, await use is not allowed outside of an async function.
|
||||
* Set this to true to accept such code.
|
||||
*/
|
||||
allowAwaitOutsideFunction?: boolean;
|
||||
|
||||
/**
|
||||
* By default, a return statement at the top level raises an error.
|
||||
* Set this to true to accept such code.
|
||||
*/
|
||||
allowReturnOutsideFunction?: boolean;
|
||||
|
||||
/**
|
||||
* By default, new.target use is not allowed outside of a function or class.
|
||||
* Set this to true to accept such code.
|
||||
*/
|
||||
allowNewTargetOutsideFunction?: boolean;
|
||||
|
||||
allowSuperOutsideMethod?: boolean;
|
||||
|
||||
/**
|
||||
* By default, exported identifiers must refer to a declared variable.
|
||||
* Set this to true to allow export statements to reference undeclared variables.
|
||||
*/
|
||||
allowUndeclaredExports?: boolean;
|
||||
|
||||
/**
|
||||
* By default, Babel parser JavaScript code according to Annex B syntax.
|
||||
* Set this to `false` to disable such behavior.
|
||||
*/
|
||||
annexB?: boolean;
|
||||
|
||||
/**
|
||||
* By default, Babel attaches comments to adjacent AST nodes.
|
||||
* When this option is set to false, comments are not attached.
|
||||
* It can provide up to 30% performance improvement when the input code has many comments.
|
||||
* @babel/eslint-parser will set it for you.
|
||||
* It is not recommended to use attachComment: false with Babel transform,
|
||||
* as doing so removes all the comments in output code, and renders annotations such as
|
||||
* /* istanbul ignore next *\/ nonfunctional.
|
||||
*/
|
||||
attachComment?: boolean;
|
||||
|
||||
/**
|
||||
* By default, Babel always throws an error when it finds some invalid code.
|
||||
* When this option is set to true, it will store the parsing error and
|
||||
* try to continue parsing the invalid input file.
|
||||
*/
|
||||
errorRecovery?: boolean;
|
||||
|
||||
/**
|
||||
* Indicate the mode the code should be parsed in.
|
||||
* Can be one of "script", "module", or "unambiguous". Defaults to "script".
|
||||
* "unambiguous" will make @babel/parser attempt to guess, based on the presence
|
||||
* of ES6 import or export statements.
|
||||
* Files with ES6 imports and exports are considered "module" and are otherwise "script".
|
||||
*/
|
||||
sourceType?: "script" | "module" | "unambiguous";
|
||||
|
||||
/**
|
||||
* Correlate output AST nodes with their source filename.
|
||||
* Useful when generating code and source maps from the ASTs of multiple input files.
|
||||
*/
|
||||
sourceFilename?: string;
|
||||
|
||||
/**
|
||||
* By default, all source indexes start from 0.
|
||||
* You can provide a start index to alternatively start with.
|
||||
* Useful for integration with other source tools.
|
||||
*/
|
||||
startIndex?: number;
|
||||
|
||||
/**
|
||||
* By default, the first line of code parsed is treated as line 1.
|
||||
* You can provide a line number to alternatively start with.
|
||||
* Useful for integration with other source tools.
|
||||
*/
|
||||
startLine?: number;
|
||||
|
||||
/**
|
||||
* By default, the parsed code is treated as if it starts from line 1, column 0.
|
||||
* You can provide a column number to alternatively start with.
|
||||
* Useful for integration with other source tools.
|
||||
*/
|
||||
startColumn?: number;
|
||||
|
||||
/**
|
||||
* Array containing the plugins that you want to enable.
|
||||
*/
|
||||
plugins?: ParserPlugin[];
|
||||
|
||||
/**
|
||||
* Should the parser work in strict mode.
|
||||
* Defaults to true if sourceType === 'module'. Otherwise, false.
|
||||
*/
|
||||
strictMode?: boolean;
|
||||
|
||||
/**
|
||||
* Adds a ranges property to each node: [node.start, node.end]
|
||||
*/
|
||||
ranges?: boolean;
|
||||
|
||||
/**
|
||||
* Adds all parsed tokens to a tokens property on the File node.
|
||||
*/
|
||||
tokens?: boolean;
|
||||
|
||||
/**
|
||||
* By default, the parser adds information about parentheses by setting
|
||||
* `extra.parenthesized` to `true` as needed.
|
||||
* When this option is `true` the parser creates `ParenthesizedExpression`
|
||||
* AST nodes instead of using the `extra` property.
|
||||
*/
|
||||
createParenthesizedExpressions?: boolean;
|
||||
|
||||
/**
|
||||
* The default is false in Babel 7 and true in Babel 8
|
||||
* Set this to true to parse it as an `ImportExpression` node.
|
||||
* Otherwise `import(foo)` is parsed as `CallExpression(Import, [Identifier(foo)])`.
|
||||
*/
|
||||
createImportExpressions?: boolean;
|
||||
}
|
||||
|
||||
type ParserPlugin = PluginConfig;
|
||||
|
||||
|
||||
declare const tokTypes: {
|
||||
// todo(flow->ts) real token type
|
||||
[name: string]: any;
|
||||
};
|
||||
|
||||
interface ParseError {
|
||||
code: string;
|
||||
reasonCode: string;
|
||||
}
|
||||
|
||||
type ParseResult<Result> = Result & {
|
||||
errors: ParseError[];
|
||||
};
|
||||
|
||||
export { DecoratorsPluginOptions, FlowPluginOptions, ParseError, ParseResult, ParserOptions, ParserPlugin, ParserPluginWithOptions, PipelineOperatorPluginOptions, RecordAndTuplePluginOptions, TypeScriptPluginOptions, parse, parseExpression, tokTypes };
|
||||
22
node_modules/@babel/types/LICENSE
generated
vendored
Normal file
22
node_modules/@babel/types/LICENSE
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2014-present Sebastian McKenzie and other contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
19
node_modules/@babel/types/README.md
generated
vendored
Normal file
19
node_modules/@babel/types/README.md
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
# @babel/types
|
||||
|
||||
> Babel Types is a Lodash-esque utility library for AST nodes
|
||||
|
||||
See our website [@babel/types](https://babeljs.io/docs/babel-types) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20types%22+is%3Aopen) associated with this package.
|
||||
|
||||
## Install
|
||||
|
||||
Using npm:
|
||||
|
||||
```sh
|
||||
npm install --save-dev @babel/types
|
||||
```
|
||||
|
||||
or using yarn:
|
||||
|
||||
```sh
|
||||
yarn add @babel/types --dev
|
||||
```
|
||||
16
node_modules/@babel/types/lib/asserts/assertNode.js
generated
vendored
Normal file
16
node_modules/@babel/types/lib/asserts/assertNode.js
generated
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = assertNode;
|
||||
var _isNode = require("../validators/isNode.js");
|
||||
function assertNode(node) {
|
||||
if (!(0, _isNode.default)(node)) {
|
||||
var _node$type;
|
||||
const type = (_node$type = node == null ? void 0 : node.type) != null ? _node$type : JSON.stringify(node);
|
||||
throw new TypeError(`Not a valid node of type "${type}"`);
|
||||
}
|
||||
}
|
||||
|
||||
//# sourceMappingURL=assertNode.js.map
|
||||
1
node_modules/@babel/types/lib/asserts/assertNode.js.map
generated
vendored
Normal file
1
node_modules/@babel/types/lib/asserts/assertNode.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"names":["_isNode","require","assertNode","node","isNode","_node$type","type","JSON","stringify","TypeError"],"sources":["../../src/asserts/assertNode.ts"],"sourcesContent":["import isNode from \"../validators/isNode.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default function assertNode(node?: any): asserts node is t.Node {\n if (!isNode(node)) {\n const type = node?.type ?? JSON.stringify(node);\n throw new TypeError(`Not a valid node of type \"${type}\"`);\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAGe,SAASC,UAAUA,CAACC,IAAU,EAA0B;EACrE,IAAI,CAAC,IAAAC,eAAM,EAACD,IAAI,CAAC,EAAE;IAAA,IAAAE,UAAA;IACjB,MAAMC,IAAI,IAAAD,UAAA,GAAGF,IAAI,oBAAJA,IAAI,CAAEG,IAAI,YAAAD,UAAA,GAAIE,IAAI,CAACC,SAAS,CAACL,IAAI,CAAC;IAC/C,MAAM,IAAIM,SAAS,CAAC,6BAA6BH,IAAI,GAAG,CAAC;EAC3D;AACF","ignoreList":[]}
|
||||
1235
node_modules/@babel/types/lib/asserts/generated/index.js
generated
vendored
Normal file
1235
node_modules/@babel/types/lib/asserts/generated/index.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
node_modules/@babel/types/lib/asserts/generated/index.js.map
generated
vendored
Normal file
1
node_modules/@babel/types/lib/asserts/generated/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
3
node_modules/@babel/types/lib/ast-types/generated/index.js
generated
vendored
Normal file
3
node_modules/@babel/types/lib/ast-types/generated/index.js
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
|
||||
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/@babel/types/lib/ast-types/generated/index.js.map
generated
vendored
Normal file
1
node_modules/@babel/types/lib/ast-types/generated/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
18
node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js
generated
vendored
Normal file
18
node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = createFlowUnionType;
|
||||
var _index = require("../generated/index.js");
|
||||
var _removeTypeDuplicates = require("../../modifications/flow/removeTypeDuplicates.js");
|
||||
function createFlowUnionType(types) {
|
||||
const flattened = (0, _removeTypeDuplicates.default)(types);
|
||||
if (flattened.length === 1) {
|
||||
return flattened[0];
|
||||
} else {
|
||||
return (0, _index.unionTypeAnnotation)(flattened);
|
||||
}
|
||||
}
|
||||
|
||||
//# sourceMappingURL=createFlowUnionType.js.map
|
||||
1
node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js.map
generated
vendored
Normal file
1
node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"names":["_index","require","_removeTypeDuplicates","createFlowUnionType","types","flattened","removeTypeDuplicates","length","unionTypeAnnotation"],"sources":["../../../src/builders/flow/createFlowUnionType.ts"],"sourcesContent":["import { unionTypeAnnotation } from \"../generated/index.ts\";\nimport removeTypeDuplicates from \"../../modifications/flow/removeTypeDuplicates.ts\";\nimport type * as t from \"../../index.ts\";\n\n/**\n * Takes an array of `types` and flattens them, removing duplicates and\n * returns a `UnionTypeAnnotation` node containing them.\n */\nexport default function createFlowUnionType<T extends t.FlowType>(\n types: [T] | Array<T>,\n): T | t.UnionTypeAnnotation {\n const flattened = removeTypeDuplicates(types);\n\n if (flattened.length === 1) {\n return flattened[0] as T;\n } else {\n return unionTypeAnnotation(flattened);\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,qBAAA,GAAAD,OAAA;AAOe,SAASE,mBAAmBA,CACzCC,KAAqB,EACM;EAC3B,MAAMC,SAAS,GAAG,IAAAC,6BAAoB,EAACF,KAAK,CAAC;EAE7C,IAAIC,SAAS,CAACE,MAAM,KAAK,CAAC,EAAE;IAC1B,OAAOF,SAAS,CAAC,CAAC,CAAC;EACrB,CAAC,MAAM;IACL,OAAO,IAAAG,0BAAmB,EAACH,SAAS,CAAC;EACvC;AACF","ignoreList":[]}
|
||||
31
node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js
generated
vendored
Normal file
31
node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js
generated
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
var _index = require("../generated/index.js");
|
||||
var _default = exports.default = createTypeAnnotationBasedOnTypeof;
|
||||
function createTypeAnnotationBasedOnTypeof(type) {
|
||||
switch (type) {
|
||||
case "string":
|
||||
return (0, _index.stringTypeAnnotation)();
|
||||
case "number":
|
||||
return (0, _index.numberTypeAnnotation)();
|
||||
case "undefined":
|
||||
return (0, _index.voidTypeAnnotation)();
|
||||
case "boolean":
|
||||
return (0, _index.booleanTypeAnnotation)();
|
||||
case "function":
|
||||
return (0, _index.genericTypeAnnotation)((0, _index.identifier)("Function"));
|
||||
case "object":
|
||||
return (0, _index.genericTypeAnnotation)((0, _index.identifier)("Object"));
|
||||
case "symbol":
|
||||
return (0, _index.genericTypeAnnotation)((0, _index.identifier)("Symbol"));
|
||||
case "bigint":
|
||||
return (0, _index.anyTypeAnnotation)();
|
||||
}
|
||||
throw new Error("Invalid typeof value: " + type);
|
||||
}
|
||||
|
||||
//# sourceMappingURL=createTypeAnnotationBasedOnTypeof.js.map
|
||||
1
node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js.map
generated
vendored
Normal file
1
node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"names":["_index","require","_default","exports","default","createTypeAnnotationBasedOnTypeof","type","stringTypeAnnotation","numberTypeAnnotation","voidTypeAnnotation","booleanTypeAnnotation","genericTypeAnnotation","identifier","anyTypeAnnotation","Error"],"sources":["../../../src/builders/flow/createTypeAnnotationBasedOnTypeof.ts"],"sourcesContent":["import {\n anyTypeAnnotation,\n stringTypeAnnotation,\n numberTypeAnnotation,\n voidTypeAnnotation,\n booleanTypeAnnotation,\n genericTypeAnnotation,\n identifier,\n} from \"../generated/index.ts\";\nimport type * as t from \"../../index.ts\";\n\nexport default createTypeAnnotationBasedOnTypeof as {\n (type: \"string\"): t.StringTypeAnnotation;\n (type: \"number\"): t.NumberTypeAnnotation;\n (type: \"undefined\"): t.VoidTypeAnnotation;\n (type: \"boolean\"): t.BooleanTypeAnnotation;\n (type: \"function\"): t.GenericTypeAnnotation;\n (type: \"object\"): t.GenericTypeAnnotation;\n (type: \"symbol\"): t.GenericTypeAnnotation;\n (type: \"bigint\"): t.AnyTypeAnnotation;\n};\n\n/**\n * Create a type annotation based on typeof expression.\n */\nfunction createTypeAnnotationBasedOnTypeof(type: string): t.FlowType {\n switch (type) {\n case \"string\":\n return stringTypeAnnotation();\n case \"number\":\n return numberTypeAnnotation();\n case \"undefined\":\n return voidTypeAnnotation();\n case \"boolean\":\n return booleanTypeAnnotation();\n case \"function\":\n return genericTypeAnnotation(identifier(\"Function\"));\n case \"object\":\n return genericTypeAnnotation(identifier(\"Object\"));\n case \"symbol\":\n return genericTypeAnnotation(identifier(\"Symbol\"));\n case \"bigint\":\n // todo: use BigInt annotation when Flow supports BigInt\n // https://github.com/facebook/flow/issues/6639\n return anyTypeAnnotation();\n }\n throw new Error(\"Invalid typeof value: \" + type);\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAQ+B,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAGhBC,iCAAiC;AAchD,SAASA,iCAAiCA,CAACC,IAAY,EAAc;EACnE,QAAQA,IAAI;IACV,KAAK,QAAQ;MACX,OAAO,IAAAC,2BAAoB,EAAC,CAAC;IAC/B,KAAK,QAAQ;MACX,OAAO,IAAAC,2BAAoB,EAAC,CAAC;IAC/B,KAAK,WAAW;MACd,OAAO,IAAAC,yBAAkB,EAAC,CAAC;IAC7B,KAAK,SAAS;MACZ,OAAO,IAAAC,4BAAqB,EAAC,CAAC;IAChC,KAAK,UAAU;MACb,OAAO,IAAAC,4BAAqB,EAAC,IAAAC,iBAAU,EAAC,UAAU,CAAC,CAAC;IACtD,KAAK,QAAQ;MACX,OAAO,IAAAD,4BAAqB,EAAC,IAAAC,iBAAU,EAAC,QAAQ,CAAC,CAAC;IACpD,KAAK,QAAQ;MACX,OAAO,IAAAD,4BAAqB,EAAC,IAAAC,iBAAU,EAAC,QAAQ,CAAC,CAAC;IACpD,KAAK,QAAQ;MAGX,OAAO,IAAAC,wBAAiB,EAAC,CAAC;EAC9B;EACA,MAAM,IAAIC,KAAK,CAAC,wBAAwB,GAAGR,IAAI,CAAC;AAClD","ignoreList":[]}
|
||||
2865
node_modules/@babel/types/lib/builders/generated/index.js
generated
vendored
Normal file
2865
node_modules/@babel/types/lib/builders/generated/index.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
node_modules/@babel/types/lib/builders/generated/index.js.map
generated
vendored
Normal file
1
node_modules/@babel/types/lib/builders/generated/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1532
node_modules/@babel/types/lib/builders/generated/uppercase.js
generated
vendored
Normal file
1532
node_modules/@babel/types/lib/builders/generated/uppercase.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
node_modules/@babel/types/lib/builders/generated/uppercase.js.map
generated
vendored
Normal file
1
node_modules/@babel/types/lib/builders/generated/uppercase.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
12
node_modules/@babel/types/lib/builders/productions.js
generated
vendored
Normal file
12
node_modules/@babel/types/lib/builders/productions.js
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.buildUndefinedNode = buildUndefinedNode;
|
||||
var _index = require("./generated/index.js");
|
||||
function buildUndefinedNode() {
|
||||
return (0, _index.unaryExpression)("void", (0, _index.numericLiteral)(0), true);
|
||||
}
|
||||
|
||||
//# sourceMappingURL=productions.js.map
|
||||
1
node_modules/@babel/types/lib/builders/productions.js.map
generated
vendored
Normal file
1
node_modules/@babel/types/lib/builders/productions.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"names":["_index","require","buildUndefinedNode","unaryExpression","numericLiteral"],"sources":["../../src/builders/productions.ts"],"sourcesContent":["import { numericLiteral, unaryExpression } from \"./generated/index.ts\";\n\nexport function buildUndefinedNode() {\n return unaryExpression(\"void\", numericLiteral(0), true);\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEO,SAASC,kBAAkBA,CAAA,EAAG;EACnC,OAAO,IAAAC,sBAAe,EAAC,MAAM,EAAE,IAAAC,qBAAc,EAAC,CAAC,CAAC,EAAE,IAAI,CAAC;AACzD","ignoreList":[]}
|
||||
24
node_modules/@babel/types/lib/builders/react/buildChildren.js
generated
vendored
Normal file
24
node_modules/@babel/types/lib/builders/react/buildChildren.js
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = buildChildren;
|
||||
var _index = require("../../validators/generated/index.js");
|
||||
var _cleanJSXElementLiteralChild = require("../../utils/react/cleanJSXElementLiteralChild.js");
|
||||
function buildChildren(node) {
|
||||
const elements = [];
|
||||
for (let i = 0; i < node.children.length; i++) {
|
||||
let child = node.children[i];
|
||||
if ((0, _index.isJSXText)(child)) {
|
||||
(0, _cleanJSXElementLiteralChild.default)(child, elements);
|
||||
continue;
|
||||
}
|
||||
if ((0, _index.isJSXExpressionContainer)(child)) child = child.expression;
|
||||
if ((0, _index.isJSXEmptyExpression)(child)) continue;
|
||||
elements.push(child);
|
||||
}
|
||||
return elements;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=buildChildren.js.map
|
||||
1
node_modules/@babel/types/lib/builders/react/buildChildren.js.map
generated
vendored
Normal file
1
node_modules/@babel/types/lib/builders/react/buildChildren.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"names":["_index","require","_cleanJSXElementLiteralChild","buildChildren","node","elements","i","children","length","child","isJSXText","cleanJSXElementLiteralChild","isJSXExpressionContainer","expression","isJSXEmptyExpression","push"],"sources":["../../../src/builders/react/buildChildren.ts"],"sourcesContent":["import {\n isJSXText,\n isJSXExpressionContainer,\n isJSXEmptyExpression,\n} from \"../../validators/generated/index.ts\";\nimport cleanJSXElementLiteralChild from \"../../utils/react/cleanJSXElementLiteralChild.ts\";\nimport type * as t from \"../../index.ts\";\n\ntype ReturnedChild =\n | t.JSXSpreadChild\n | t.JSXElement\n | t.JSXFragment\n | t.Expression;\n\nexport default function buildChildren(\n node: t.JSXElement | t.JSXFragment,\n): ReturnedChild[] {\n const elements = [];\n\n for (let i = 0; i < node.children.length; i++) {\n let child: any = node.children[i];\n\n if (isJSXText(child)) {\n cleanJSXElementLiteralChild(child, elements);\n continue;\n }\n\n if (isJSXExpressionContainer(child)) child = child.expression;\n if (isJSXEmptyExpression(child)) continue;\n\n elements.push(child);\n }\n\n return elements;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,4BAAA,GAAAD,OAAA;AASe,SAASE,aAAaA,CACnCC,IAAkC,EACjB;EACjB,MAAMC,QAAQ,GAAG,EAAE;EAEnB,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGF,IAAI,CAACG,QAAQ,CAACC,MAAM,EAAEF,CAAC,EAAE,EAAE;IAC7C,IAAIG,KAAU,GAAGL,IAAI,CAACG,QAAQ,CAACD,CAAC,CAAC;IAEjC,IAAI,IAAAI,gBAAS,EAACD,KAAK,CAAC,EAAE;MACpB,IAAAE,oCAA2B,EAACF,KAAK,EAAEJ,QAAQ,CAAC;MAC5C;IACF;IAEA,IAAI,IAAAO,+BAAwB,EAACH,KAAK,CAAC,EAAEA,KAAK,GAAGA,KAAK,CAACI,UAAU;IAC7D,IAAI,IAAAC,2BAAoB,EAACL,KAAK,CAAC,EAAE;IAEjCJ,QAAQ,CAACU,IAAI,CAACN,KAAK,CAAC;EACtB;EAEA,OAAOJ,QAAQ;AACjB","ignoreList":[]}
|
||||
22
node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js
generated
vendored
Normal file
22
node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = createTSUnionType;
|
||||
var _index = require("../generated/index.js");
|
||||
var _removeTypeDuplicates = require("../../modifications/typescript/removeTypeDuplicates.js");
|
||||
var _index2 = require("../../validators/generated/index.js");
|
||||
function createTSUnionType(typeAnnotations) {
|
||||
const types = typeAnnotations.map(type => {
|
||||
return (0, _index2.isTSTypeAnnotation)(type) ? type.typeAnnotation : type;
|
||||
});
|
||||
const flattened = (0, _removeTypeDuplicates.default)(types);
|
||||
if (flattened.length === 1) {
|
||||
return flattened[0];
|
||||
} else {
|
||||
return (0, _index.tsUnionType)(flattened);
|
||||
}
|
||||
}
|
||||
|
||||
//# sourceMappingURL=createTSUnionType.js.map
|
||||
1
node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js.map
generated
vendored
Normal file
1
node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"names":["_index","require","_removeTypeDuplicates","_index2","createTSUnionType","typeAnnotations","types","map","type","isTSTypeAnnotation","typeAnnotation","flattened","removeTypeDuplicates","length","tsUnionType"],"sources":["../../../src/builders/typescript/createTSUnionType.ts"],"sourcesContent":["import { tsUnionType } from \"../generated/index.ts\";\nimport removeTypeDuplicates from \"../../modifications/typescript/removeTypeDuplicates.ts\";\nimport { isTSTypeAnnotation } from \"../../validators/generated/index.ts\";\nimport type * as t from \"../../index.ts\";\n\n/**\n * Takes an array of `types` and flattens them, removing duplicates and\n * returns a `UnionTypeAnnotation` node containing them.\n */\nexport default function createTSUnionType(\n typeAnnotations: Array<t.TSTypeAnnotation | t.TSType>,\n): t.TSType {\n const types = typeAnnotations.map(type => {\n return isTSTypeAnnotation(type) ? type.typeAnnotation : type;\n });\n const flattened = removeTypeDuplicates(types);\n\n if (flattened.length === 1) {\n return flattened[0];\n } else {\n return tsUnionType(flattened);\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,qBAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAOe,SAASG,iBAAiBA,CACvCC,eAAqD,EAC3C;EACV,MAAMC,KAAK,GAAGD,eAAe,CAACE,GAAG,CAACC,IAAI,IAAI;IACxC,OAAO,IAAAC,0BAAkB,EAACD,IAAI,CAAC,GAAGA,IAAI,CAACE,cAAc,GAAGF,IAAI;EAC9D,CAAC,CAAC;EACF,MAAMG,SAAS,GAAG,IAAAC,6BAAoB,EAACN,KAAK,CAAC;EAE7C,IAAIK,SAAS,CAACE,MAAM,KAAK,CAAC,EAAE;IAC1B,OAAOF,SAAS,CAAC,CAAC,CAAC;EACrB,CAAC,MAAM;IACL,OAAO,IAAAG,kBAAW,EAACH,SAAS,CAAC;EAC/B;AACF","ignoreList":[]}
|
||||
21
node_modules/@babel/types/lib/builders/validateNode.js
generated
vendored
Normal file
21
node_modules/@babel/types/lib/builders/validateNode.js
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = validateNode;
|
||||
var _validate = require("../validators/validate.js");
|
||||
var _index = require("../index.js");
|
||||
function validateNode(node) {
|
||||
if (node == null || typeof node !== "object") return;
|
||||
const fields = _index.NODE_FIELDS[node.type];
|
||||
if (!fields) return;
|
||||
const keys = _index.BUILDER_KEYS[node.type];
|
||||
for (const key of keys) {
|
||||
const field = fields[key];
|
||||
if (field != null) (0, _validate.validateInternal)(field, node, key, node[key]);
|
||||
}
|
||||
return node;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=validateNode.js.map
|
||||
1
node_modules/@babel/types/lib/builders/validateNode.js.map
generated
vendored
Normal file
1
node_modules/@babel/types/lib/builders/validateNode.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"names":["_validate","require","_index","validateNode","node","fields","NODE_FIELDS","type","keys","BUILDER_KEYS","key","field","validateInternal"],"sources":["../../src/builders/validateNode.ts"],"sourcesContent":["import { validateInternal } from \"../validators/validate.ts\";\nimport type * as t from \"../index.ts\";\nimport { BUILDER_KEYS, NODE_FIELDS } from \"../index.ts\";\n\nexport default function validateNode<N extends t.Node>(node: N) {\n if (node == null || typeof node !== \"object\") return;\n const fields = NODE_FIELDS[node.type];\n if (!fields) return;\n\n // todo: because keys not in BUILDER_KEYS are not validated - this actually allows invalid nodes in some cases\n const keys = BUILDER_KEYS[node.type] as (keyof N & string)[];\n for (const key of keys) {\n const field = fields[key];\n if (field != null) validateInternal(field, node, key, node[key]);\n }\n return node;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAEe,SAASE,YAAYA,CAAmBC,IAAO,EAAE;EAC9D,IAAIA,IAAI,IAAI,IAAI,IAAI,OAAOA,IAAI,KAAK,QAAQ,EAAE;EAC9C,MAAMC,MAAM,GAAGC,kBAAW,CAACF,IAAI,CAACG,IAAI,CAAC;EACrC,IAAI,CAACF,MAAM,EAAE;EAGb,MAAMG,IAAI,GAAGC,mBAAY,CAACL,IAAI,CAACG,IAAI,CAAyB;EAC5D,KAAK,MAAMG,GAAG,IAAIF,IAAI,EAAE;IACtB,MAAMG,KAAK,GAAGN,MAAM,CAACK,GAAG,CAAC;IACzB,IAAIC,KAAK,IAAI,IAAI,EAAE,IAAAC,0BAAgB,EAACD,KAAK,EAAEP,IAAI,EAAEM,GAAG,EAAEN,IAAI,CAACM,GAAG,CAAC,CAAC;EAClE;EACA,OAAON,IAAI;AACb","ignoreList":[]}
|
||||
12
node_modules/@babel/types/lib/clone/clone.js
generated
vendored
Normal file
12
node_modules/@babel/types/lib/clone/clone.js
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = clone;
|
||||
var _cloneNode = require("./cloneNode.js");
|
||||
function clone(node) {
|
||||
return (0, _cloneNode.default)(node, false);
|
||||
}
|
||||
|
||||
//# sourceMappingURL=clone.js.map
|
||||
1
node_modules/@babel/types/lib/clone/clone.js.map
generated
vendored
Normal file
1
node_modules/@babel/types/lib/clone/clone.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"names":["_cloneNode","require","clone","node","cloneNode"],"sources":["../../src/clone/clone.ts"],"sourcesContent":["import cloneNode from \"./cloneNode.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Create a shallow clone of a `node`, including only\n * properties belonging to the node.\n * @deprecated Use t.cloneNode instead.\n */\nexport default function clone<T extends t.Node>(node: T): T {\n return cloneNode(node, /* deep */ false);\n}\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAQe,SAASC,KAAKA,CAAmBC,IAAO,EAAK;EAC1D,OAAO,IAAAC,kBAAS,EAACD,IAAI,EAAa,KAAK,CAAC;AAC1C","ignoreList":[]}
|
||||
12
node_modules/@babel/types/lib/clone/cloneDeep.js
generated
vendored
Normal file
12
node_modules/@babel/types/lib/clone/cloneDeep.js
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = cloneDeep;
|
||||
var _cloneNode = require("./cloneNode.js");
|
||||
function cloneDeep(node) {
|
||||
return (0, _cloneNode.default)(node);
|
||||
}
|
||||
|
||||
//# sourceMappingURL=cloneDeep.js.map
|
||||
1
node_modules/@babel/types/lib/clone/cloneDeep.js.map
generated
vendored
Normal file
1
node_modules/@babel/types/lib/clone/cloneDeep.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"names":["_cloneNode","require","cloneDeep","node","cloneNode"],"sources":["../../src/clone/cloneDeep.ts"],"sourcesContent":["import cloneNode from \"./cloneNode.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Create a deep clone of a `node` and all of it's child nodes\n * including only properties belonging to the node.\n * @deprecated Use t.cloneNode instead.\n */\nexport default function cloneDeep<T extends t.Node>(node: T): T {\n return cloneNode(node);\n}\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAQe,SAASC,SAASA,CAAmBC,IAAO,EAAK;EAC9D,OAAO,IAAAC,kBAAS,EAACD,IAAI,CAAC;AACxB","ignoreList":[]}
|
||||
12
node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js
generated
vendored
Normal file
12
node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = cloneDeepWithoutLoc;
|
||||
var _cloneNode = require("./cloneNode.js");
|
||||
function cloneDeepWithoutLoc(node) {
|
||||
return (0, _cloneNode.default)(node, true, true);
|
||||
}
|
||||
|
||||
//# sourceMappingURL=cloneDeepWithoutLoc.js.map
|
||||
1
node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js.map
generated
vendored
Normal file
1
node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"names":["_cloneNode","require","cloneDeepWithoutLoc","node","cloneNode"],"sources":["../../src/clone/cloneDeepWithoutLoc.ts"],"sourcesContent":["import cloneNode from \"./cloneNode.ts\";\nimport type * as t from \"../index.ts\";\n/**\n * Create a deep clone of a `node` and all of it's child nodes\n * including only properties belonging to the node.\n * excluding `_private` and location properties.\n */\nexport default function cloneDeepWithoutLoc<T extends t.Node>(node: T): T {\n return cloneNode(node, /* deep */ true, /* withoutLoc */ true);\n}\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAOe,SAASC,mBAAmBA,CAAmBC,IAAO,EAAK;EACxE,OAAO,IAAAC,kBAAS,EAACD,IAAI,EAAa,IAAI,EAAmB,IAAI,CAAC;AAChE","ignoreList":[]}
|
||||
107
node_modules/@babel/types/lib/clone/cloneNode.js
generated
vendored
Normal file
107
node_modules/@babel/types/lib/clone/cloneNode.js
generated
vendored
Normal file
@ -0,0 +1,107 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = cloneNode;
|
||||
var _index = require("../definitions/index.js");
|
||||
var _index2 = require("../validators/generated/index.js");
|
||||
const {
|
||||
hasOwn
|
||||
} = {
|
||||
hasOwn: Function.call.bind(Object.prototype.hasOwnProperty)
|
||||
};
|
||||
function cloneIfNode(obj, deep, withoutLoc, commentsCache) {
|
||||
if (obj && typeof obj.type === "string") {
|
||||
return cloneNodeInternal(obj, deep, withoutLoc, commentsCache);
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
function cloneIfNodeOrArray(obj, deep, withoutLoc, commentsCache) {
|
||||
if (Array.isArray(obj)) {
|
||||
return obj.map(node => cloneIfNode(node, deep, withoutLoc, commentsCache));
|
||||
}
|
||||
return cloneIfNode(obj, deep, withoutLoc, commentsCache);
|
||||
}
|
||||
function cloneNode(node, deep = true, withoutLoc = false) {
|
||||
return cloneNodeInternal(node, deep, withoutLoc, new Map());
|
||||
}
|
||||
function cloneNodeInternal(node, deep = true, withoutLoc = false, commentsCache) {
|
||||
if (!node) return node;
|
||||
const {
|
||||
type
|
||||
} = node;
|
||||
const newNode = {
|
||||
type: node.type
|
||||
};
|
||||
if ((0, _index2.isIdentifier)(node)) {
|
||||
newNode.name = node.name;
|
||||
if (hasOwn(node, "optional") && typeof node.optional === "boolean") {
|
||||
newNode.optional = node.optional;
|
||||
}
|
||||
if (hasOwn(node, "typeAnnotation")) {
|
||||
newNode.typeAnnotation = deep ? cloneIfNodeOrArray(node.typeAnnotation, true, withoutLoc, commentsCache) : node.typeAnnotation;
|
||||
}
|
||||
if (hasOwn(node, "decorators")) {
|
||||
newNode.decorators = deep ? cloneIfNodeOrArray(node.decorators, true, withoutLoc, commentsCache) : node.decorators;
|
||||
}
|
||||
} else if (!hasOwn(_index.NODE_FIELDS, type)) {
|
||||
throw new Error(`Unknown node type: "${type}"`);
|
||||
} else {
|
||||
for (const field of Object.keys(_index.NODE_FIELDS[type])) {
|
||||
if (hasOwn(node, field)) {
|
||||
if (deep) {
|
||||
newNode[field] = (0, _index2.isFile)(node) && field === "comments" ? maybeCloneComments(node.comments, deep, withoutLoc, commentsCache) : cloneIfNodeOrArray(node[field], true, withoutLoc, commentsCache);
|
||||
} else {
|
||||
newNode[field] = node[field];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (hasOwn(node, "loc")) {
|
||||
if (withoutLoc) {
|
||||
newNode.loc = null;
|
||||
} else {
|
||||
newNode.loc = node.loc;
|
||||
}
|
||||
}
|
||||
if (hasOwn(node, "leadingComments")) {
|
||||
newNode.leadingComments = maybeCloneComments(node.leadingComments, deep, withoutLoc, commentsCache);
|
||||
}
|
||||
if (hasOwn(node, "innerComments")) {
|
||||
newNode.innerComments = maybeCloneComments(node.innerComments, deep, withoutLoc, commentsCache);
|
||||
}
|
||||
if (hasOwn(node, "trailingComments")) {
|
||||
newNode.trailingComments = maybeCloneComments(node.trailingComments, deep, withoutLoc, commentsCache);
|
||||
}
|
||||
if (hasOwn(node, "extra")) {
|
||||
newNode.extra = Object.assign({}, node.extra);
|
||||
}
|
||||
return newNode;
|
||||
}
|
||||
function maybeCloneComments(comments, deep, withoutLoc, commentsCache) {
|
||||
if (!comments || !deep) {
|
||||
return comments;
|
||||
}
|
||||
return comments.map(comment => {
|
||||
const cache = commentsCache.get(comment);
|
||||
if (cache) return cache;
|
||||
const {
|
||||
type,
|
||||
value,
|
||||
loc
|
||||
} = comment;
|
||||
const ret = {
|
||||
type,
|
||||
value,
|
||||
loc
|
||||
};
|
||||
if (withoutLoc) {
|
||||
ret.loc = null;
|
||||
}
|
||||
commentsCache.set(comment, ret);
|
||||
return ret;
|
||||
});
|
||||
}
|
||||
|
||||
//# sourceMappingURL=cloneNode.js.map
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user