## 特别感谢
-
- [@GideonSenku](https://github.com/GideonSenku)
- [@NobyDa](https://github.com/NobyDa)
- [@chavyleung](https://github.com/chavyleung)
- [@lxk0301](https://github.com/lxk0301)
+- [@『Hell Cell』](https://t.me/HellCellZC123)
+- [@xinian](https://github.com/58xinian) 提供 UI 帮助
diff --git a/Scripts/12123.js b/Scripts/12123.js
new file mode 100644
index 0000000..3714c6c
--- /dev/null
+++ b/Scripts/12123.js
@@ -0,0 +1,261 @@
+// Variables used by Scriptable.
+// These must be at the very top of the file. Do not edit.
+// icon-color: deep-gray; icon-glyph: car;
+
+// 添加require,是为了vscode中可以正确引入包,以获得自动补全等功能
+if (typeof require === 'undefined') require = importModule;
+const { DmYY, Runing } = require('./DmYY');
+
+const API_PARAMS = {
+ api4: 'biz.vio.detail.query',
+ infoURL: 'https://miniappcsfw.122.gov.cn:8443/openapi/invokeApi/business/biz',
+ api1: 'biz.vio.unhandledVioCount.query',
+ productId: 'p10000000000000000001',
+ alipay: 'alipays://platformapi/startapp?appId=2019050964403523',
+ api2: 'biz.vio.peccancyChannelList.query',
+ status:
+ 'alipays://platformapi/startapp?appId=2019050964403523&page=pages%2Flicense%2Flicense',
+ update: 'https://gitcode.net/4qiao/scriptable/raw/master/api/violation.js',
+ api3: 'biz.vio.peccancyUnhandleInfoList.query',
+ Ver: 'Version 1.2\n\nverifyToken过期需打开Quantumult-X',
+};
+
+// @组件代码开始
+class Widget extends DmYY {
+ constructor(arg) {
+ super(arg, {
+ lightBgColor: '#2581f2',
+ darkBgColor: '#2581f2',
+ darkColor: '#fff',
+ lightColor: '#fff',
+ });
+ this.en = '12123';
+ this.name = '交管 12123';
+ config.runsInApp &&
+ this.registerAction({
+ icon: { name: 'paperplane', color: '#722ed1' },
+ type: 'input',
+ title: 'Token',
+ desc: '微信小程序交管12123获取',
+ val: 'Token',
+ onClick: async () => {
+ const token = this.settings.token;
+ this.settings.token =
+ (await this.getCache('wx_12123', false)) || token;
+ if (this.settings.token) this.saveSettings(false);
+ return this.setAlertInput('Token', '设置 token', {
+ token: '微信小程序交管12123获取',
+ });
+ },
+ });
+
+ config.runsInApp && this.registerAction('基础设置', this.setWidgetConfig);
+ }
+
+ format = (str) => {
+ return parseInt(str) >= 10 ? str : `0${str}`;
+ };
+
+ date = new Date();
+ arrUpdateTime = [
+ this.format(this.date.getMonth() + 1),
+ this.format(this.date.getDate()),
+ this.format(this.date.getHours()),
+ this.format(this.date.getMinutes()),
+ ];
+
+ dataSource = {
+ left: {
+ title: '川 G88888',
+ icon: 'car.fill',
+ listItem: [
+ { label: '未处违法', value: `0`, unit: '条' },
+ { label: '车辆状态', value: '正常' },
+ { label: '上次更新', value: '00:00' },
+ ],
+ },
+ right: {
+ title: '驾驶证',
+ icon: 'creditcard.fill',
+ listItem: [
+ { label: '证件状态', value: '正常' },
+ { label: '累计扣分', value: `0`, unit: '分' },
+ { label: '重置日期', value: '—' },
+ ],
+ },
+ };
+
+ init = async () => {
+ this.settings.token =
+ (await this.getCache('wx_12123', false)) || this.settings.token;
+ if (this.settings.dataSource) {
+ this.dataSource = this.settings.dataSource;
+ } else {
+ await this.cacheData();
+ }
+ this.cacheData();
+ };
+
+ cacheData = async () => {
+ try {
+ const token = this.settings.token.replace('params=', '');
+ const body = JSON.parse(decodeURIComponent(token));
+ const params = {
+ sign: body.sign,
+ // businessId: body.businessId,
+ verifyToken: body.verifyToken,
+ // businessPrincipalId: body.businessPrincipalId,
+ };
+
+ const response = await this.$request.post(API_PARAMS.infoURL, {
+ body: `params=${JSON.stringify({
+ api: API_PARAMS.api1,
+ productId: API_PARAMS.productId,
+ ...params,
+ })}`,
+ });
+ console.log(response);
+ if (response.success) {
+ const illegal = response.data.list[0] || {};
+ this.dataSource.left.listItem[0].value = illegal.count || 0;
+
+ const details = await this.$request.post(API_PARAMS.infoURL, {
+ body: `params=${encodeURIComponent(
+ JSON.stringify({
+ api: 'biz.user.integration.query',
+ productId: API_PARAMS.productId,
+ ...params,
+ })
+ )}`,
+ });
+
+ console.log(details);
+
+ if (details.success) {
+ const { drivingLicense, vehicles } = details.data;
+ const reaccDate = drivingLicense.reaccDate.split('-');
+ this.dataSource.right.title = `驾驶证 ${drivingLicense.allowToDrive}`;
+ this.dataSource.right.listItem[1].value =
+ drivingLicense.cumulativePoint;
+ this.dataSource.right.listItem[2].value = `${reaccDate[1]}-${reaccDate[2]}`;
+
+ if (vehicles.length) {
+ this.dataSource.left.title = vehicles[0].plateNumber;
+ }
+ }
+
+ this.dataSource.left.listItem[2].value = `${this.arrUpdateTime[2]}:${this.arrUpdateTime[3]}`;
+
+ this.settings.dataSource = this.dataSource;
+ this.saveSettings(false);
+ } else {
+ this.notify(
+ `verifyToken已过期 ⚠️`,
+ '点击通知框自动跳转到支付宝小程序交管12123页面获取最新的Token ( 请确保已打开辅助工具 )',
+ API_PARAMS.alipay
+ );
+ }
+ } catch (e) {
+ console.log(e);
+ }
+ };
+
+ renderImage = async (uri) => {
+ return this.$request.get(uri, 'IMG');
+ };
+
+ notSupport(w) {
+ const stack = w.addStack();
+ stack.addText('暂不支持');
+ return w;
+ }
+
+ renderSmall = async (w) => {
+ this.notSupport(w);
+ return w;
+ };
+
+ renderLarge = async (w) => {
+ return this.notSupport(w);
+ };
+
+ renderCard = (w, data) => {
+ w.borderColor = this.widgetColor;
+ w.borderWidth = 2;
+ w.cornerRadius = 8;
+
+ w.layoutVertically();
+ w.setPadding(10, 10, 10, 10);
+ const topStack = w.addStack();
+ topStack.layoutHorizontally();
+ topStack.centerAlignContent();
+ const iconImage = SFSymbol.named(data.icon).image;
+ const iconImageStack = topStack.addImage(iconImage);
+ iconImageStack.tintColor = this.widgetColor;
+ iconImageStack.imageSize = new Size(30, 30);
+
+ topStack.addSpacer(10);
+
+ const licensePlateText = topStack.addText(data.title);
+ licensePlateText.textColor = this.widgetColor;
+ licensePlateText.font = this.provideFont('bold', 14);
+
+ w.addSpacer();
+
+ data.listItem.forEach((item, index) => {
+ const listItemStack = w.addStack();
+ listItemStack.centerAlignContent();
+ const labelText = listItemStack.addText(item.label);
+ labelText.textColor = this.widgetColor;
+ labelText.font = this.provideFont('medium', 14);
+
+ listItemStack.addSpacer();
+ if (index !== data.listItem.length - 1) w.addSpacer();
+
+ const valueText = listItemStack.addText(`${item.value}`);
+ valueText.textColor = this.widgetColor;
+ valueText.font = this.provideFont('medium', 14);
+
+ if (item.unit) {
+ const unitText = listItemStack.addText(item.unit);
+ unitText.textColor = this.widgetColor;
+ unitText.font = this.provideFont('medium', 14);
+ }
+ });
+ };
+
+ renderMedium = async (w) => {
+ const containerStack = w.addStack();
+ containerStack.layoutHorizontally();
+ containerStack.centerAlignContent();
+
+ const leftStack = containerStack.addStack();
+ this.renderCard(leftStack, this.dataSource.left);
+
+ containerStack.addSpacer(10);
+
+ const rightStack = containerStack.addStack();
+ this.renderCard(rightStack, this.dataSource.right);
+ return w;
+ };
+
+ /**
+ * 渲染函数,函数名固定
+ * 可以根据 this.widgetFamily 来判断小组件尺寸,以返回不同大小的内容
+ */
+ async render() {
+ await this.init();
+ const widget = new ListWidget();
+ await this.getWidgetBackgroundImage(widget);
+ if (this.widgetFamily === 'medium') {
+ return await this.renderMedium(widget);
+ } else if (this.widgetFamily === 'large') {
+ return await this.renderLarge(widget);
+ } else {
+ return await this.renderSmall(widget);
+ }
+ }
+}
+
+// @组件代码结束
+await Runing(Widget, '', false); //远程开发环境
diff --git a/Scripts/BiliBili.js b/Scripts/BiliBili.js
index 49276f2..90216bc 100644
--- a/Scripts/BiliBili.js
+++ b/Scripts/BiliBili.js
@@ -1,168 +1,273 @@
+// Variables used by Scriptable.
+// These must be at the very top of the file. Do not edit.
+// icon-color: deep-gray; icon-glyph: tv;
+
// 添加require,是为了vscode中可以正确引入包,以获得自动补全等功能
-if (typeof require === "undefined") require = importModule;
-const { DmYY, Runing } = require("./DmYY");
+if (typeof require === 'undefined') require = importModule;
+const { DmYY, Runing } = require('./DmYY');
// @组件代码开始
class Widget extends DmYY {
- constructor(arg) {
- super(arg);
- this.name = "bilibili今日番剧";
- this.en = "BiliBiliMonitor";
- this.logo =
- "https://raw.githubusercontent.com/Orz-3/task/master/bilibili.png";
- config.runsInApp &&
- this.registerAction("设置背景图", this.setWidgetBackground);
- this.cacheName = this.md5(`dataSouce_${this.en}`);
- }
-
- today = "";
- dataSource = [];
-
- init = async () => {
- try {
- const today = new Date();
- const month = today.getMonth() + 1;
- const day = today.getDate();
- this.today = `${month}-${day}`;
- if (Keychain.contains(this.cacheName)) {
- const dataSource = JSON.parse(Keychain.get(this.cacheName));
- if (dataSource[this.today]) {
- this.dataSource = dataSource[this.today].seasons;
- } else {
- this.dataSource = await this.getDramaList();
- }
- } else {
- this.dataSource = await this.getDramaList();
- }
- } catch (e) {
- console.log(e);
- }
- };
-
- getDramaList = async () => {
- const url = `https://bangumi.bilibili.com/web_api/timeline_global`;
- const response = await this.$request.get(url);
- try {
- if (response.code === 0 && response.result.length > 0) {
- const dataSource = response.result;
- const result = dataSource.find((item) => item.date === this.today);
- if (result) {
- Keychain.set(
- this.cacheName,
- JSON.stringify({ [this.today]: result }),
- );
- return result.seasons;
- }
- }
- return false;
- } catch (e) {
- return false;
- }
- };
-
- setListCell = async (cell, data) => {
- let { cover, url, title, pub_time, pub_index, delay, delay_reason, delay_index } = data;
- let body = cell.addStack();
- body.url = url;
- if (this.widgetFamily !== "small") {
- const imageView = body.addStack();
- imageView.size = new Size(43, 43);
- imageView.cornerRadius = 5;
- const image = await this.$request.get(cover, "IMG");
- imageView.backgroundImage = image;
- body.addSpacer(10);
- }
-
- const textView = body.addStack();
- textView.layoutVertically();
-
- const descText = textView.addText(title);
- descText.font = Font.boldSystemFont(14);
- descText.textColor = this.widgetColor;
- descText.lineLimit = 1;
-
- textView.addSpacer(3);
- if (delay) pub_index = `${delay_index}「${delay_reason}」`;
- const subContent = textView.addText(pub_index);
- subContent.font = Font.boldSystemFont(10);
- subContent.textColor = this.widgetColor;
- subContent.lineLimit = 1;
- const timerText = textView.addText(`更新时间:${pub_time}`);
- timerText.font = Font.lightSystemFont(10);
- timerText.textColor = this.widgetColor;
- timerText.lineLimit = 1;
-
- return cell;
- };
-
- setWidget = async (body, size) => {
- const container = body.addStack();
- container.layoutVertically();
- const dataSource = this.getRandomArrayElements(this.dataSource, size);
- for (let index = 0; index < dataSource.length; index++) {
- const data = dataSource[index];
- let listItem = container.addStack();
- await this.setListCell(listItem, data);
- container.addSpacer(10);
- }
- body.addSpacer();
- return body;
- };
-
- renderSmall = async (w) => {
- return await this.setWidget(w, 2);
- };
-
- renderLarge = async (w) => {
- return await this.setWidget(w, 5);
- };
-
- renderMedium = async (w) => {
- return await this.setWidget(w, 2);
- };
-
- /**
- * 渲染函数,函数名固定
- * 可以根据 this.widgetFamily 来判断小组件尺寸,以返回不同大小的内容
- */
- async render() {
- await this.init();
- const widget = new ListWidget();
- await this.getWidgetBackgroundImage(widget);
- const header = widget.addStack();
- if (this.widgetFamily !== "small") {
- await this.renderJDHeader(header);
- } else {
- await this.renderHeader(header, this.logo, this.name, this.widgetColor);
- }
- widget.addSpacer(10);
- if (this.widgetFamily === "medium") {
- return await this.renderMedium(widget);
- } else if (this.widgetFamily === "large") {
- return await this.renderLarge(widget);
- } else {
- return await this.renderSmall(widget);
- }
- }
-
- renderJDHeader = async (header) => {
- header.centerAlignContent();
- await this.renderHeader(header, this.logo, this.name, this.widgetColor);
- header.addSpacer();
- const headerMore = header.addStack();
- headerMore.url = "";
- headerMore.setPadding(1, 10, 1, 10);
- headerMore.cornerRadius = 10;
- headerMore.backgroundColor = new Color("#fff", 0.5);
- const textItem = headerMore.addText(this.today);
- textItem.font = Font.boldSystemFont(12);
- textItem.textColor = this.widgetColor;
- textItem.lineLimit = 1;
- textItem.rightAlignText();
- return header;
- };
+ constructor(arg) {
+ super(arg);
+ this.name = '哔哩哔哩今日番剧';
+ this.en = 'BiliBiliMonitor';
+ this.logo =
+ 'https://raw.githubusercontent.com/Orz-3/mini/master/Color/bilibili.png';
+ config.runsInApp && this.registerAction('基础设置', this.setWidgetConfig);
+ this.cacheName = this.md5(`dataSouce_${this.en}`);
+ }
+
+ useBoxJS = false;
+ today = '';
+ dataSource = [];
+
+ init = async () => {
+ try {
+ const today = new Date();
+ const month = today.getMonth() + 1;
+ const day = today.getDate();
+ this.today = `${month}-${day}`;
+ if (Keychain.contains(this.cacheName)) {
+ const dataSource = JSON.parse(Keychain.get(this.cacheName));
+ if (dataSource[this.today]) {
+ this.dataSource = dataSource[this.today].seasons;
+ } else {
+ this.dataSource = await this.getDramaList();
+ }
+ } else {
+ this.dataSource = await this.getDramaList();
+ }
+ } catch (e) {
+ console.log(e);
+ }
+ };
+
+ getDramaList = async () => {
+ const url = `https://bangumi.bilibili.com/web_api/timeline_global`;
+ const response = await this.$request.get(url);
+ try {
+ if (response.code === 0 && response.result.length > 0) {
+ const dataSource = response.result;
+ const result = dataSource.find((item) => item.date === this.today);
+ if (result) {
+ Keychain.set(
+ this.cacheName,
+ JSON.stringify({ [this.today]: result }),
+ );
+ return result.seasons;
+ }
+ }
+ return false;
+ } catch (e) {
+ return false;
+ }
+ };
+
+ setListCell = async (body, data) => {
+ let {
+ cover,
+ url,
+ title,
+ pub_time,
+ pub_index,
+ delay,
+ delay_reason,
+ delay_index,
+ } = data;
+ body.url = url;
+ const imageView = body.addStack();
+ imageView.size = new Size(89, 105);
+ imageView.cornerRadius = 5;
+ const image = await this.$request.get(cover, 'IMG');
+ imageView.backgroundImage = image;
+ imageView.borderWidth = 1;
+ imageView.borderColor = new Color(this.widgetColor.hex, 0.7);
+ const stackDesc = imageView.addStack();
+
+ stackDesc.layoutVertically();
+ const stackDescTop = stackDesc.addStack();
+ stackDescTop.setPadding(5, 0, 0, 0);
+ const textColor = new Color('#fff');
+ if (delay) pub_index = `${delay_index}「${delay_reason}」`;
+ stackDescTop.addSpacer();
+ const stackTopText = stackDescTop.addStack();
+ stackTopText.setPadding(0, 2, 0, 2);
+ stackTopText.backgroundColor = new Color('#000', 0.3);
+ stackTopText.cornerRadius = 4;
+ const subContent = stackTopText.addText(pub_index);
+ subContent.font = Font.boldSystemFont(10);
+ subContent.textColor = textColor;
+ subContent.lineLimit = 1;
+
+ stackDesc.addSpacer();
+ const stackDescBottom = stackDesc.addStack();
+ stackDescBottom.addSpacer();
+ stackDescBottom.backgroundColor = new Color('#000', 0.3);
+
+ const textView = stackDescBottom.addStack();
+ textView.setPadding(0, 10, 0, 10);
+ textView.size = new Size(89, 30);
+ textView.layoutVertically();
+ const descText = textView.addText(title);
+ descText.font = Font.boldSystemFont(10);
+ descText.textColor = textColor;
+ descText.lineLimit = 1;
+
+ const timerText = textView.addText(`更新:${pub_time}`);
+ timerText.font = Font.lightSystemFont(10);
+ timerText.textColor = textColor;
+ timerText.lineLimit = 1;
+ stackDescBottom.addSpacer();
+
+ return body;
+ };
+
+ fillRect(drawing, rect, color) {
+ const path = new Path();
+ path.addRoundedRect(rect, 0, 0);
+ drawing.addPath(path);
+ drawing.setFillColor(new Color(color, 1));
+ drawing.fillPath();
+ }
+
+ drawLine(drawing, rect, color, scale) {
+ const x1 = Math.round(rect.x + scale * 1.5);
+ const y1 = rect.y - scale;
+ const x2 = Math.round(rect.width + scale * 1.5);
+ const point1 = new Point(x1, y1);
+ const point2 = new Point(x2, y1);
+ const path = new Path();
+ path.move(point1);
+ path.addLine(point2);
+ drawing.addPath(path);
+ drawing.setStrokeColor(new Color(color, 1));
+ drawing.setLineWidth(60 / (40 + 15 * scale));
+ drawing.strokePath();
+ }
+
+ setLine = (stack, color) => {
+ try {
+ const topDrawing = new DrawContext();
+ topDrawing.size = new Size(642, 100);
+ topDrawing.opaque = false;
+ topDrawing.respectScreenScale = true;
+
+ const rectLine = new Rect(0, 70, 610, 26);
+ this.fillRect(topDrawing, rectLine, color);
+ for (let i = 0; i < 40; i++) {
+ this.drawLine(topDrawing, rectLine, color, i);
+ }
+
+ const stackLine = stack.addStack();
+ stack.backgroundImage = topDrawing.getImage();
+ stackLine.addSpacer();
+ const line = stackLine.addStack();
+ line.size = new Size(1, 10);
+ stackLine.addSpacer();
+ } catch (e) {
+ console.log(e);
+ }
+ };
+
+ setWidget = async (body, data) => {
+ const d = body.addStack();
+ d.addSpacer();
+ const container = d.addStack();
+ container.layoutVertically();
+ const dataSource = data.length > 3 ? [data.splice(0, 3), data] : [data];
+ let itemIndex = 0;
+ for (const item of dataSource) {
+ let listItem = container.addStack();
+ let index = 0;
+ for (const video of item) {
+ const stackItem = listItem.addStack();
+ await this.setListCell(stackItem, video);
+ index++;
+ if (item.length !== index) listItem.addSpacer(13);
+ }
+ itemIndex++;
+ if (dataSource.length !== itemIndex) container.addSpacer(13);
+ }
+ if (this.widgetFamily === 'large') {
+ container.addSpacer();
+ this.setLine(container, '#e8e8e8');
+ const timerColor = new Color(this.widgetColor.hex, 0.7);
+ const fontSize = 10;
+ container.addSpacer();
+ const stackFooter = container.addStack();
+ stackFooter.addSpacer();
+ const now = new Date();
+ const stackDate = stackFooter.addDate(
+ new Date(`${now.getFullYear()}/${now.getMonth() + 1}/${now.getDate()}`),
+ );
+ stackDate.textColor = timerColor;
+ stackDate.fontSize = fontSize;
+ stackDate.rightAlignText();
+ stackDate.applyTimerStyle();
+ }
+ d.addSpacer();
+ return body;
+ };
+
+ renderSmall = async (w) => {
+ const stack = w.addStack();
+ stack.addText('暂不支持');
+ return w;
+ };
+
+ renderLarge = async (w) => {
+ const dataSource = this.getRandomArrayElements(this.dataSource, 6);
+ return await this.setWidget(w, dataSource);
+ };
+
+ renderMedium = async (w) => {
+ const dataSource = this.getRandomArrayElements(this.dataSource, 3);
+ return await this.setWidget(w, dataSource);
+ };
+
+ /**
+ * 渲染函数,函数名固定
+ * 可以根据 this.widgetFamily 来判断小组件尺寸,以返回不同大小的内容
+ */
+ async render() {
+ await this.init();
+ const widget = new ListWidget();
+ await this.getWidgetBackgroundImage(widget);
+ const header = widget.addStack();
+ if (this.widgetFamily !== 'small') {
+ await this.renderJDHeader(header);
+ } else {
+ await this.renderHeader(header, this.logo, this.name, this.widgetColor);
+ }
+ widget.addSpacer(10);
+ if (this.widgetFamily === 'medium') {
+ return await this.renderMedium(widget);
+ } else if (this.widgetFamily === 'large') {
+ return await this.renderLarge(widget);
+ } else {
+ return await this.renderSmall(widget);
+ }
+ }
+
+ renderJDHeader = async (header) => {
+ header.centerAlignContent();
+ await this.renderHeader(header, this.logo, this.name, this.widgetColor);
+ header.addSpacer();
+ const headerMore = header.addStack();
+ headerMore.url = '';
+ headerMore.setPadding(1, 10, 1, 10);
+ headerMore.cornerRadius = 10;
+ headerMore.backgroundColor = new Color('#fff', 0.5);
+ const textItem = headerMore.addText(this.today);
+ textItem.font = Font.boldSystemFont(12);
+ textItem.textColor = this.widgetColor;
+ textItem.lineLimit = 1;
+ textItem.rightAlignText();
+ return header;
+ };
}
// @组件代码结束
// await Runing(Widget, "", false); // 正式环境
-await Runing(Widget, "", false); //远程开发环境
+await Runing(Widget, '', false); //远程开发环境
diff --git a/Scripts/BiliBiliUp.js b/Scripts/BiliBiliUp.js
new file mode 100644
index 0000000..56dd5f7
--- /dev/null
+++ b/Scripts/BiliBiliUp.js
@@ -0,0 +1,215 @@
+// Variables used by Scriptable.
+// These must be at the very top of the file. Do not edit.
+// icon-color: gray; icon-glyph: chalkboard;
+
+// 添加require,是为了vscode中可以正确引入包,以获得自动补全等功能
+if (typeof require === 'undefined') require = importModule;
+const {DmYY, Runing} = require('./DmYY');
+
+// @组件代码开始
+class Widget extends DmYY {
+ constructor(arg) {
+ super(arg);
+ this.name = 'B站 UP 主';
+ this.en = 'BiliBiliUp';
+ this.inputValue = arg || '50952087';
+ this.Run();
+ }
+
+ useBoxJS = false;
+ ytInitialData = {};
+ videos = [];
+ baseUrl = 'https://api.bilibili.com/x';
+ url;
+
+ numberFormat(value) {
+ try {
+ const param = {};
+ let k = 10000;
+ const size = ['', '万', '亿', '万亿'];
+ let i;
+ if (value < k) {
+ param.value = value;
+ param.unit = '';
+ } else {
+ i = Math.floor(Math.log(value) / Math.log(k));
+ param.value = ((value / Math.pow(k, i))).toFixed(2);
+ param.unit = size[i];
+ }
+ return `${param.value}${param.unit}`;
+ } catch (e) {
+ console.log(e);
+ }
+ }
+
+ init = async () => {
+ try {
+ await this.getData();
+ await this.getRelationStat();
+ await this.getVideoList();
+ } catch (e) {
+ console.log('❌错误信息:' + e);
+ }
+ };
+
+ getData = async () => {
+ const url = `${this.baseUrl}/space/acc/info?mid=${this.inputValue}&jsonp=jsonp`;
+ const response = await this.$request.get(url);
+ if (response.code === 0) {
+ this.ytInitialData = response.data;
+ }
+ };
+
+ getRelationStat = async () => {
+ const url = `${this.baseUrl}/relation/stat?vmid=${this.inputValue}&jsonp=jsonp`;
+ const response = await this.$request.get(url);
+ if (response.code === 0) {
+ this.ytInitialData = {...this.ytInitialData, relation: response.data};
+ }
+ };
+
+ getVideoList = async () => {
+ const url = `${this.baseUrl}/space/arc/search?mid=${this.inputValue}&pn=1&ps=25&index=1&jsonp=jsonp`;
+ const response = await this.$request.get(url);
+ if (response.code === 0) {
+ this.ytInitialData = {
+ ...this.ytInitialData,
+ videos: response.data.list.vlist.map(item => ({
+ thumb: item.pic,
+ title: item.title,
+ view: `${this.numberFormat(item.play)}次`,
+ url: item.bvid,
+ })),
+ };
+ }
+ };
+
+ setAvatar = async (stack) => {
+ stack.size = new Size(50, 50);
+ stack.cornerRadius = 5;
+ const {face} = this.ytInitialData;
+ const imgLogo = await this.$request.get(face, 'IMG');
+ const imgLogoItem = stack.addImage(imgLogo);
+ imgLogoItem.imageSize = new Size(50, 50);
+ return stack;
+ };
+
+ setTitleStack = (stack) => {
+ const textFormatNumber = this.textFormat.title;
+ textFormatNumber.color = this.backGroundColor;
+ const {name} = this.ytInitialData;
+ const title = name;
+ textFormatNumber.size =
+ title.length > 20 || this.widgetFamily === 'small' ? 16 : 20;
+ const titleItem = this.provideText(title, stack, textFormatNumber);
+ titleItem.lineLimit = 1;
+ };
+
+ setPathStack = (stack) => {
+ const textFormatNumber = this.textFormat.defaultText;
+ textFormatNumber.color = this.backGroundColor;
+ textFormatNumber.size = 12;
+ const {relation} = this.ytInitialData;
+ let simpleText = `关注数:${this.numberFormat(relation.follower)}`;
+ const titleItem = this.provideText(
+ simpleText,
+ stack,
+ textFormatNumber,
+ );
+ titleItem.lineLimit = 1;
+ titleItem.textOpacity = 0.9;
+ };
+
+ setFooterCell = async (stack) => {
+ const datas = this.getRandomArrayElements(this.ytInitialData.videos, 3);
+ for (let i = 0; i < datas.length; i++) {
+ if (i === 1) stack.addSpacer();
+ const video = datas[i];
+ const stackVideo = stack.addStack();
+ stackVideo.setPadding(10, 10, 10, 10);
+ stackVideo.url = 'https://www.bilibili.com/video/' + video.url;
+ stackVideo.backgroundColor = this.widgetColor;
+ stackVideo.centerAlignContent();
+ stackVideo.layoutVertically();
+ const img = await this.$request.get(video.thumb, 'IMG');
+ stackVideo.backgroundImage = await this.shadowImage(img, '#000', 0.3);
+ const title = {...this.textFormat.defaultText};
+ title.size = 8;
+ title.color = new Color('#fff');
+ this.provideText(video.title, stackVideo, title);
+ stackVideo.addSpacer();
+ title.color = new Color('#fff', 0.7);
+ this.provideText(video.view, stackVideo, title);
+ stackVideo.size = new Size(87, 56);
+ stackVideo.cornerRadius = 4;
+ if (i === 1) stack.addSpacer();
+ }
+ };
+
+ renderSmall = async (w) => {
+ return w;
+ };
+
+ renderMedium = async (w) => {
+ const stackBody = w.addStack();
+ stackBody.url = `https://space.bilibili.com/${this.inputValue}/`;
+ stackBody.layoutVertically();
+ const stackHeader = stackBody.addStack();
+ stackHeader.setPadding(5, 10, 5, 10);
+ stackHeader.cornerRadius = 10;
+ stackHeader.backgroundColor = this.widgetColor;
+
+ stackHeader.centerAlignContent();
+ const stackLeft = stackHeader.addStack();
+ await this.setAvatar(stackLeft);
+ stackHeader.addSpacer(20);
+
+ const stackRight = stackHeader.addStack();
+ stackRight.layoutVertically();
+ this.setTitleStack(stackRight);
+ stackRight.addSpacer(5);
+ this.setPathStack(stackRight);
+ stackHeader.addSpacer();
+ stackBody.addSpacer();
+
+ const stackFooter = stackBody.addStack();
+ stackFooter.setPadding(10, 0, 10, 0);
+ stackFooter.cornerRadius = 10;
+ stackFooter.backgroundColor = this.widgetColor;
+ stackFooter.addSpacer();
+ await this.setFooterCell(stackFooter);
+ stackFooter.addSpacer();
+ return w;
+ };
+
+ renderLarge = async (w) => {
+ return w;
+ };
+
+ Run() {
+ if (config.runsInApp) {
+ this.registerAction('基础设置', this.setWidgetConfig);
+ }
+ }
+
+ /**
+ * 渲染函数,函数名固定
+ * 可以根据 this.widgetFamily 来判断小组件尺寸,以返回不同大小的内容
+ */
+ async render() {
+ await this.init();
+ const widget = new ListWidget();
+ await this.getWidgetBackgroundImage(widget);
+ if (this.widgetFamily === 'medium') {
+ return await this.renderMedium(widget);
+ } else if (this.widgetFamily === 'large') {
+ return await this.renderLarge(widget);
+ } else {
+ return await this.renderSmall(widget);
+ }
+ }
+}
+
+// @组件代码结束
+// await Runing(Widget, "", true); // 正式环境
+await Runing(Widget, args.widgetParameter, false); //远程开发环境
diff --git a/Scripts/BiliBiliWatch.js b/Scripts/BiliBiliWatch.js
index 5df35a8..6e8d751 100644
--- a/Scripts/BiliBiliWatch.js
+++ b/Scripts/BiliBiliWatch.js
@@ -3,261 +3,256 @@
// icon-color: gray; icon-glyph: chalkboard;
// 添加require,是为了vscode中可以正确引入包,以获得自动补全等功能
-if (typeof require === "undefined") require = importModule;
-const { DmYY, Runing } = require("./DmYY");
+if (typeof require === 'undefined') require = importModule;
+const { DmYY, Runing } = require('./DmYY');
// @组件代码开始
class Widget extends DmYY {
- constructor(arg) {
- super(arg);
- this.name = "哔哩哔哩关注";
- this.en = "BiliBiliWatch";
- this.logo =
- "https://raw.githubusercontent.com/Orz-3/task/master/bilibili.png";
- this.Run(module.filename);
- this.cacheName = this.md5(`dataSouce_${this.en}`);
- }
+ constructor(arg) {
+ super(arg);
+ this.name = '哔哩哔哩关注';
+ this.en = 'BiliBiliWatch';
+ this.logo =
+ 'https://raw.githubusercontent.com/Orz-3/mini/master/Color/bilibili.png';
+ this.Run(module.filename);
+ }
- cookie = "";
- dataSource = [];
+ cookie = '';
+ dataSource = [];
- init = async () => {
- try {
- await this.getDramaList();
- } catch (e) {
- console.log(e);
- }
- };
+ init = async () => {
+ try {
+ await this.getDramaList();
+ } catch (e) {
+ console.log(e);
+ }
+ };
- getDramaList = async () => {
- const url = `https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_new?type_list=268435455`;
- const method = `GET`;
- const headers = {
- Cookie: this.cookie,
- "User-Agent": `bili-universal/10320 CFNetwork/1206 Darwin/20.1.0 os/ios model/iPhone XR mobi_app/iphone build/10320 osVer/14.2 network/2 channel/AppStore`,
- };
- const response = await this.$request.get(url, {
- method,
- headers,
- });
- try {
- const { code, data } = response;
- if (code === 0 && data.cards.length > 0) {
- let dataSource = data.cards;
- dataSource.forEach((item) => {
- const card = JSON.parse(item.card);
- let temp = false;
- if (card.apiSeasonInfo) {
- temp = {};
- temp.title = card.apiSeasonInfo.title;
- temp.url = card.url;
- temp.reply = card.reply_count;
- temp.play = card.play_count;
- temp.img = card.cover;
- temp.desc = card.new_desc;
- temp.timestamp = item.desc.timestamp;
- } else if (card.videos === 1) {
- temp = {};
- temp.title = card.title;
- temp.url = card.jump_url;
- temp.reply = card.stat.reply;
- temp.play = card.stat.view;
- temp.desc = card.desc;
- temp.img = card.pic;
- temp.timestamp = item.desc.timestamp;
- }
- if (temp) this.dataSource.push(temp);
- });
- return this.dataSource;
- }
- return false;
- } catch (e) {
- console.log(e);
- return false;
- }
- };
+ getDramaList = async () => {
+ const url = `https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_new?type_list=268435455`;
+ const method = `GET`;
+ const headers = {
+ Cookie: this.cookie,
+ 'User-Agent': `bili-universal/10320 CFNetwork/1206 Darwin/20.1.0 os/ios model/iPhone XR mobi_app/iphone build/10320 osVer/14.2 network/2 channel/AppStore`,
+ };
+ const response = await this.$request.get(url, {
+ method,
+ headers,
+ });
+ try {
+ const { code, data } = response;
+ if (code === 0 && data.cards.length > 0) {
+ let dataSource = data.cards;
+ dataSource.forEach((item) => {
+ const card = JSON.parse(item.card);
+ let temp = false;
+ if (card.apiSeasonInfo) {
+ temp = {};
+ temp.title = card.apiSeasonInfo.title;
+ temp.url = card.url;
+ temp.reply = card.reply_count;
+ temp.play = card.play_count;
+ temp.img = card.cover;
+ temp.desc = card.new_desc;
+ temp.timestamp = item.desc.timestamp;
+ } else if (card.videos === 1) {
+ temp = {};
+ temp.title = card.title;
+ temp.url = card.jump_url;
+ temp.reply = card.stat.reply;
+ temp.play = card.stat.view;
+ temp.desc = card.desc;
+ temp.img = card.pic;
+ temp.timestamp = item.desc.timestamp;
+ }
+ if (temp) this.dataSource.push(temp);
+ });
+ return this.dataSource;
+ } else {
+ throw 'cookie 失效,请重新获取';
+ }
+ } catch (e) {
+ console.log('❌错误信息:' + e);
+ return false;
+ }
+ };
- setListCell = async (cell, data) => {
- const { title, url, reply, play, desc, img, timestamp } = data;
- let body = cell.addStack();
- body.url = url;
- if (this.widgetFamily !== "small") {
- const imageView = body.addStack();
- imageView.size = new Size(43, 43);
- imageView.cornerRadius = 5;
- const image = await this.$request.get(img, "IMG");
- imageView.backgroundImage = image;
- body.addSpacer(10);
- }
+ setListCell = async (cell, data) => {
+ const { title, url, reply, play, desc, img, timestamp } = data;
+ let body = cell.addStack();
+ body.url = url;
+ if (this.widgetFamily !== 'small') {
+ const imageView = body.addStack();
+ imageView.size = new Size(43, 43);
+ imageView.cornerRadius = 5;
+ const image = await this.$request.get(img, 'IMG');
+ imageView.backgroundImage = image;
+ body.addSpacer(10);
+ }
- const textView = body.addStack();
- textView.layoutVertically();
+ const textView = body.addStack();
+ textView.layoutVertically();
- const descText = textView.addText(`${title} ${desc}`);
- descText.font = Font.boldSystemFont(14);
- descText.textColor = this.widgetColor;
- descText.lineLimit = 1;
+ const descText = textView.addText(`${title} ${desc}`);
+ descText.font = Font.boldSystemFont(14);
+ descText.textColor = this.widgetColor;
+ descText.lineLimit = 1;
- textView.addSpacer(3);
+ textView.addSpacer(3);
- const date = new Date();
- date.setTime(timestamp * 1000); //注意,这行是关键代码
- let month = date.getMonth() + 1;
- let day = date.getDate();
+ const date = new Date();
+ date.setTime(timestamp * 1000); //注意,这行是关键代码
+ let month = date.getMonth() + 1;
+ let day = date.getDate();
- const timerText1 = textView.addText(`${month}-${day} 更新了`);
- timerText1.font = Font.lightSystemFont(10);
- timerText1.textColor = this.widgetColor;
- timerText1.lineLimit = 1;
+ const timerText1 = textView.addText(`${month}-${day} 更新了`);
+ timerText1.font = Font.lightSystemFont(10);
+ timerText1.textColor = this.widgetColor;
+ timerText1.lineLimit = 1;
- const descView = textView.addStack();
+ const descView = textView.addStack();
- const icon1 = descView.addText("浏览:");
- icon1.font = Font.lightSystemFont(10);
- icon1.textColor = this.widgetColor;
- descView.addSpacer(3);
- const timerText = descView.addText(`${play}`);
- timerText.font = Font.lightSystemFont(10);
- timerText.textColor = this.widgetColor;
- descView.addSpacer(5);
+ const icon1 = descView.addText('浏览:');
+ icon1.font = Font.lightSystemFont(10);
+ icon1.textColor = this.widgetColor;
+ descView.addSpacer(3);
+ const timerText = descView.addText(`${play}`);
+ timerText.font = Font.lightSystemFont(10);
+ timerText.textColor = this.widgetColor;
+ descView.addSpacer(5);
- const icon2 = descView.addText("评论:");
- icon2.font = Font.lightSystemFont(10);
- icon2.textColor = this.widgetColor;
+ const icon2 = descView.addText('评论:');
+ icon2.font = Font.lightSystemFont(10);
+ icon2.textColor = this.widgetColor;
- descView.addSpacer(3);
- const timerText2 = descView.addText(`${reply}`);
- timerText2.font = Font.lightSystemFont(10);
- timerText2.textColor = this.widgetColor;
- return cell;
- };
+ descView.addSpacer(3);
+ const timerText2 = descView.addText(`${reply}`);
+ timerText2.font = Font.lightSystemFont(10);
+ timerText2.textColor = this.widgetColor;
+ return cell;
+ };
- setWidget = async (body, size) => {
- const container = body.addStack();
- container.layoutVertically();
- const dataSource = this.getRandomArrayElements(this.dataSource, size);
- for (let index = 0; index < dataSource.length; index++) {
- const data = dataSource[index];
- let listItem = container.addStack();
- await this.setListCell(listItem, data);
- container.addSpacer(10);
- }
- body.addSpacer();
- return body;
- };
+ setWidget = async (body, size) => {
+ const container = body.addStack();
+ container.layoutVertically();
+ const dataSource = this.getRandomArrayElements(this.dataSource, size);
+ for (let index = 0; index < dataSource.length; index++) {
+ const data = dataSource[index];
+ let listItem = container.addStack();
+ await this.setListCell(listItem, data);
+ container.addSpacer(10);
+ }
+ body.addSpacer();
+ return body;
+ };
- renderSmall = async (w) => {
- return await this.setWidget(w, 2);
- };
+ renderSmall = async (w) => {
+ return await this.setWidget(w, 2);
+ };
- renderLarge = async (w) => {
- return await this.setWidget(w, 5);
- };
+ renderLarge = async (w) => {
+ return await this.setWidget(w, 6);
+ };
- renderMedium = async (w) => {
- return await this.setWidget(w, 2);
- };
+ renderMedium = async (w) => {
+ return await this.setWidget(w, 2);
+ };
- /**
- * 渲染函数,函数名固定
- * 可以根据 this.widgetFamily 来判断小组件尺寸,以返回不同大小的内容
- */
- async render() {
- await this.init();
- const widget = new ListWidget();
- await this.getWidgetBackgroundImage(widget);
- const header = widget.addStack();
- if (this.widgetFamily !== "small") {
- await this.renderJDHeader(header);
- } else {
- await this.renderHeader(header, this.logo, this.name, this.widgetColor);
- }
- widget.addSpacer(10);
- if (this.widgetFamily === "medium") {
- return await this.renderMedium(widget);
- } else if (this.widgetFamily === "large") {
- return await this.renderLarge(widget);
- } else {
- return await this.renderSmall(widget);
- }
- }
+ /**
+ * 渲染函数,函数名固定
+ * 可以根据 this.widgetFamily 来判断小组件尺寸,以返回不同大小的内容
+ */
+ async render() {
+ await this.init();
+ const widget = new ListWidget();
+ await this.getWidgetBackgroundImage(widget);
+ const header = widget.addStack();
+ if (this.widgetFamily !== 'small') {
+ await this.renderJDHeader(header);
+ } else {
+ await this.renderHeader(header, this.logo, this.name, this.widgetColor);
+ }
+ widget.addSpacer(10);
+ if (this.widgetFamily === 'medium') {
+ return await this.renderMedium(widget);
+ } else if (this.widgetFamily === 'large') {
+ return await this.renderLarge(widget);
+ } else {
+ return await this.renderSmall(widget);
+ }
+ }
- renderJDHeader = async (header) => {
- header.centerAlignContent();
- await this.renderHeader(header, this.logo, this.name, this.widgetColor);
- header.addSpacer();
- const headerMore = header.addStack();
- headerMore.url = "";
- headerMore.setPadding(1, 10, 1, 10);
- headerMore.cornerRadius = 10;
- headerMore.backgroundColor = new Color("#fff", 0.5);
- const textItem = headerMore.addText("个人中心");
- textItem.font = Font.boldSystemFont(12);
- textItem.textColor = this.widgetColor;
- textItem.lineLimit = 1;
- textItem.rightAlignText();
- return header;
- };
+ renderJDHeader = async (header) => {
+ header.centerAlignContent();
+ await this.renderHeader(header, this.logo, this.name, this.widgetColor);
+ header.addSpacer();
+ const headerMore = header.addStack();
+ headerMore.url = '';
+ headerMore.setPadding(1, 10, 1, 10);
+ headerMore.cornerRadius = 10;
+ headerMore.backgroundColor = new Color('#fff', 0.5);
+ const textItem = headerMore.addText('个人中心');
+ textItem.font = Font.boldSystemFont(12);
+ textItem.textColor = this.widgetColor;
+ textItem.lineLimit = 1;
+ textItem.rightAlignText();
+ return header;
+ };
- Run = (filename) => {
- if (config.runsInApp) {
- this.registerAction("设置背景图", this.setWidgetBackground);
- this.registerAction("设置 Cookie", this.inputCk);
- this.registerAction("设置 BoxJS Cookie", this._loadCk);
- }
- let _md5 = this.md5(filename + this.en);
- this.CACHE_KEY = `cache_${_md5}`;
- try {
- this.cookie = this.settings[this.en];
- if (!this.cookie) {
- throw "CK 获取失败";
- }
- return true;
- } catch (e) {
- this.notify("错误提示", e);
- return false;
- }
- };
+ Run = (filename) => {
+ if (config.runsInApp) {
+ this.registerAction('基础设置', this.setWidgetConfig);
+ this.registerAction('账号设置', this.inputCk);
+ this.registerAction('代理缓存', this._loadCk);
+ }
+ let _md5 = this.md5(filename + this.en);
+ this.CACHE_KEY = `cache_${_md5}`;
+ try {
+ this.cookie = this.settings[this.en];
+ if (!this.cookie) {
+ throw 'CK 获取失败';
+ }
+ return true;
+ } catch (e) {
+ this.notify('错误提示', e);
+ return false;
+ }
+ };
- _loadCk = async () => {
- try {
- const cookie = await this.getCache("@bilibili.cookie");
- if (cookie) {
- this.cookie = cookie;
- this.settings[this.en] = this.cookie;
- this.saveSettings();
- } else {
- throw "ck 获取失败";
- }
- return true;
- } catch (e) {
- console.log(e);
- this.cookie = "";
- this.notify(
- this.name,
- "BoxJS Cookie 设置失败,点击根据配置获取",
- "https://raw.githubusercontent.com/dompling/Script/master/BiliBili/bilibili.cookie.js",
- );
- return false;
- }
- };
+ _loadCk = async () => {
+ try {
+ const cookie = await this.getCache('@bilibili.cookie');
+ if (cookie) {
+ this.cookie = cookie;
+ this.settings[this.en] = this.cookie;
+ this.saveSettings();
+ } else {
+ throw 'ck 获取失败';
+ }
+ return true;
+ } catch (e) {
+ console.log(e);
+ this.cookie = '';
+ return false;
+ }
+ };
- async inputCk() {
- const a = new Alert();
- a.title = "哔哩哔哩 CK";
- a.message = "手动输入 Ck";
- a.addTextField("Cookie", this.cookie);
- a.addAction("确定");
- a.addCancelAction("取消");
- const id = await a.presentAlert();
- if (id === -1) return;
- this.cookie = a.textFieldValue(0);
- // 保存到本地
- this.settings[this.en] = this.cookie;
- this.saveSettings();
- }
+ async inputCk() {
+ const a = new Alert();
+ a.title = '账号设置';
+ a.message = '手动输入 Ck';
+ a.addTextField('Cookie', this.cookie);
+ a.addAction('确定');
+ a.addCancelAction('取消');
+ const id = await a.presentAlert();
+ if (id === -1) return;
+ this.cookie = a.textFieldValue(0);
+ // 保存到本地
+ this.settings[this.en] = this.cookie;
+ this.saveSettings();
+ }
}
// @组件代码结束
// await Runing(Widget, "", false); // 正式环境
-await Runing(Widget, "", false); //远程开发环境
+await Runing(Widget, '', false); //远程开发环境
diff --git a/Scripts/Birthday.js b/Scripts/Birthday.js
deleted file mode 100644
index 8ae4a54..0000000
--- a/Scripts/Birthday.js
+++ /dev/null
@@ -1,399 +0,0 @@
-// Variables used by Scriptable.
-// These must be at the very top of the file. Do not edit.
-// icon-color: pink; icon-glyph: birthday-cake;
-
-// 添加require,是为了vscode中可以正确引入包,以获得自动补全等功能
-if (typeof require === "undefined") require = importModule;
-const { DmYY } = require("./DmYY");
-const { Calendar } = require("./Calendar");
-
-const $ = new Calendar();
-
-class Widget extends DmYY {
- constructor(arg) {
- super(arg);
- this.name = "破壳日";
- this.en = "birthday";
- this.logo =
- "https://raw.githubusercontent.com/Orz-3/task/master/birthday.png";
- this.LEFT_IMG_KEY = this.FILE_MGR_LOCAL.joinPath(
- this.FILE_MGR_LOCAL.documentsDirectory(),
- `left_image_${this.SETTING_KEY}.jpg`
- );
- this.defaultData = { ...this.defaultData, ...this.settings[this.en] };
- console.log(this.defaultData);
- this.registerAction("组件内部配置", this.setWidgetConfig);
- this.registerAction("读取BoxJS数据", this.setWidgetBoxJSConfig);
- this.registerAction("设置左侧图", this.setLeftWidgetImage);
- this.registerAction("设置背景图", this.setWidgetBackground);
- }
-
- defaultData = {
- username: "", // 姓名
- time: "", // 生日日期
- nongli: "", // 农历生日
- eday: "", //相识
- isLeapMonth: false, //如果是农历闰月第四个参数赋值true即可
- };
-
- contentText = {};
-
- init = async () => {
- try {
- this.getCalendarData();
- } catch (e) {
- console.log(e);
- }
- };
-
- getEdayNumber = (date) => {
- var initDay = date.split("-");
- var obj = {
- cYear: parseInt(initDay[0]),
- cMonth: parseInt(initDay[1]),
- cDay: parseInt(initDay[2]),
- };
- return Math.abs($.daysBetween(obj));
- };
-
- getCalendarData = () => {
- const { time, nongli, isLeapMonth, eday } = this.defaultData;
- const _data = time.split("-");
- const opt = {
- year: parseInt(_data[0]),
- month: parseInt(_data[1]),
- day: parseInt(_data[2]),
- nongli,
- isLeapMonth,
- };
-
- const response = {};
- response.birthdayText = $.birthday(opt);
- response.nextBirthday = response.birthdayText[0];
-
- const solarData =
- nongli === "true"
- ? $.lunar2solar(opt.year, opt.month, opt.day, isLeapMonth)
- : $.solar2lunar(opt.year, opt.month, opt.day);
- response.gregorian = solarData;
- response.animal = `${$.getAnimalZodiacToEmoji(solarData.Animal)}-${
- solarData.Animal
- }`;
- response.astro = `${$.getAstroToEmoji(solarData.astro)}-${solarData.astro}`;
- if ($.verifyTime(eday)) {
- response.meetDay = this.getEdayNumber(eday);
- }
- this.contentText = response;
- };
-
- setRightCell = (text, rowCell) => {
- const subContent = rowCell.addText(text);
- subContent.font = Font.boldSystemFont(14);
- subContent.textColor = this.widgetColor;
- subContent.lineLimit = 1;
- rowCell.addSpacer(5);
- };
-
- setLeftView = (w) => {
- const leftImg = this.getLeftImage();
- const left = w.addStack();
- left.size = new Size(110, 110);
- left.cornerRadius = 5;
- left.borderWidth = 2;
- left.borderColor = this.widgetColor;
- if (leftImg) {
- const widgetImg = left.addImage(leftImg);
- widgetImg.imageSize = new Size(110, 110);
- widgetImg.applyFillingContentMode();
- widgetImg.cornerRadius = 5;
- }
- return w;
- };
-
- setRightView = (right) => {
- const {
- animal,
- astro,
- gregorian,
- nextBirthday,
- meetDay,
- birthdayText,
- } = this.contentText;
- const { IMonthCn, IDayCn } = gregorian;
- right.layoutVertically();
- this.setRightCell(`🐽相:${animal}`, right); // 属相
- this.setRightCell(`🌠座:${astro}`, right); // 属相
- if (meetDay) {
- this.setRightCell(`💖遇:${meetDay} 天`, right);
- }
- const _birth = `🎂生:${nextBirthday.cYear}-${nextBirthday.cMonth}-${nextBirthday.cDay} (${birthdayText[1]}天)`;
- this.setRightCell(_birth, right);
- this.setRightCell(`📆农:${IMonthCn}${IDayCn}`, right);
- return right;
- };
-
- fetch = async () => {
- const response = await this.$request.get(
- "https://api.uomg.com/api/rand.qinghua?format=json"
- );
- return response.content;
- };
-
- renderSmall = async (w) => {
- this.setRightView(w.addStack());
- return w;
- };
-
- renderLarge = async (w) => {
- w.addSpacer(20);
- const body = w.addStack();
- const left = body.addStack();
- this.setLeftView(left);
- body.addSpacer(20);
- const right = body.addStack();
- this.setRightView(right);
-
- w.addSpacer(20);
- const footer = w.addStack();
- const text = await this.fetch();
- const subContent = footer.addText(text);
- subContent.font = Font.boldSystemFont(16);
- subContent.textColor = this.widgetColor;
- w.addSpacer();
- return w;
- };
-
- renderMedium = async (w) => {
- const body = w.addStack();
- const left = body.addStack();
- this.setLeftView(left);
- body.addSpacer();
- const right = body.addStack();
- this.setRightView(right);
- body.addSpacer();
- w.addSpacer();
- return w;
- };
-
- /**
- * 渲染函数,函数名固定
- * 可以根据 this.widgetFamily 来判断小组件尺寸,以返回不同大小的内容
- */
- async render() {
- await this.init();
- const widget = new ListWidget();
- await this.getWidgetBackgroundImage(widget);
- const header = widget.addStack();
- if (this.widgetFamily !== "small") {
- await this.renderMoreHeader(header);
- } else {
- await this.renderHeader(header, this.logo, this.name, this.widgetColor);
- }
- widget.addSpacer(10);
- if (this.widgetFamily === "medium") {
- await this.renderMedium(widget);
- } else if (this.widgetFamily === "large") {
- await this.renderLarge(widget);
- } else {
- await this.renderSmall(widget);
- }
- return widget;
- }
-
- renderMoreHeader = async (header) => {
- header.centerAlignContent();
- await this.renderHeader(header, this.logo, this.name, this.widgetColor);
- header.addSpacer();
- const headerMore = header.addStack();
- headerMore.setPadding(1, 10, 1, 10);
- headerMore.cornerRadius = 10;
- headerMore.backgroundColor = new Color("#fff", 0.5);
- const textItem = headerMore.addText(this.defaultData.username);
- textItem.font = Font.boldSystemFont(12);
- textItem.textColor = this.widgetColor;
- textItem.lineLimit = 1;
- textItem.rightAlignText();
- return header;
- };
-
- /**
- * 获取当前插件是否有自定义背景图片
- * @reutrn img | false
- */
- getLeftImage() {
- let result = null;
- if (this.FILE_MGR_LOCAL.fileExists(this.LEFT_IMG_KEY)) {
- result = Image.fromFile(this.LEFT_IMG_KEY);
- }
- return result;
- }
-
- /**
- * 设置当前组件的背景图片
- * @param {image} img
- */
- setLeftImage(img, notify = true) {
- if (!img) {
- // 移除背景
- if (this.FILE_MGR_LOCAL.fileExists(this.LEFT_IMG_KEY)) {
- this.FILE_MGR_LOCAL.remove(this.LEFT_IMG_KEY);
- }
- if (notify) this.notify("移除成功", "小组件图片已移除,稍后刷新生效");
- } else {
- // 设置背景
- // 全部设置一遍,
- this.FILE_MGR_LOCAL.writeImage(this.LEFT_IMG_KEY, img);
- if (notify) this.notify("设置成功", "小组件图片已设置!稍后刷新生效");
- }
- }
-
- setLeftWidgetImage = async () => {
- const alert = new Alert();
- alert.title = "设置左侧图";
- alert.message = "显示左侧图片";
- alert.addAction("设置新图");
- alert.addAction("清空图片");
- alert.addCancelAction("取消");
- const actions = [
- async () => {
- const backImage = await this.chooseImg();
- await this.setLeftImage(backImage, true);
- },
- () => {
- this.setLeftImage(false, true);
- },
- ];
- const id = await alert.presentAlert();
- if (id === -1) return;
- actions[id] && actions[id].call(this);
- };
-
- setWidgetConfig = async () => {
- const a = new Alert();
- a.title = "🐣破壳日配置";
- a.message = "配置破壳日的基础信息";
- a.addTextField("昵称", this.defaultData.username);
- a.addTextField("生日/ 年-月-日", this.defaultData.time);
- a.addTextField("农历/ true | false", `${this.defaultData.nongli || ""}`);
- a.addTextField("相识/ 年-月-日", this.defaultData.eday);
- a.addAction("确定");
- a.addCancelAction("取消");
- const id = await a.presentAlert();
- if (id === -1) return;
- this.defaultData.username = a.textFieldValue(0);
- this.defaultData.time = a.textFieldValue(1);
- this.defaultData.nongli = a.textFieldValue(2) === "true";
- this.defaultData.eday = a.textFieldValue(3);
- // 保存到本地
- this.settings[this.en] = this.defaultData;
- this.saveSettings();
- };
-
- setWidgetBoxJSConfig = async () => {
- try {
- const datas = await this.getCache();
- Object.keys(this.defaultData).forEach((key) => {
- this.defaultData[key] = datas[`@${this.en}.${key}`];
- });
- this.settings[this.en] = this.defaultData;
- this.saveSettings();
- } catch (e) {
- this.notify(
- this.name,
- "BoxJS教程",
- "https://chavyleung.gitbook.io/boxjs/awesome/videos"
- );
- }
- };
-}
-
-let M = null;
-// 判断hash是否和当前设备匹配
-if (config.runsInWidget) {
- M = new Widget(args.widgetParameter || "");
- const W = await M.render();
- if (W) {
- Script.setWidget(W);
- Script.complete();
- }
-} else {
- let { act, __arg, __size } = args.queryParameters;
- M = new Widget(__arg || "");
- if (__size) M.init(__size);
- if (!act || !M["_actions"]) {
- // 弹出选择菜单
- const actions = M["_actions"];
- const _actions = [
- // 预览组件
- async (debug = false) => {
- let a = new Alert();
- a.title = "预览组件";
- a.message = "测试桌面组件在各种尺寸下的显示效果";
- a.addAction("小尺寸 Small");
- a.addAction("中尺寸 Medium");
- a.addAction("大尺寸 Large");
- a.addAction("全部 All");
- a.addCancelAction("取消操作");
- const funcs = [];
- if (debug) {
- for (let _ in actions) {
- a.addAction(_);
- funcs.push(actions[_].bind(M));
- }
- a.addDestructiveAction("停止调试");
- }
- let i = await a.presentSheet();
- if (i === -1) return;
- let w;
- switch (i) {
- case 0:
- M.widgetFamily = "small";
- w = await M.render();
- w && (await w.presentSmall());
- break;
- case 1:
- M.widgetFamily = "medium";
- w = await M.render();
- w && (await w.presentMedium());
- break;
- case 2:
- M.widgetFamily = "large";
- w = await M.render();
- w && (await w.presentLarge());
- break;
- case 3:
- M.widgetFamily = "small";
- w = await M.render();
- w && (await w.presentSmall());
- M.widgetFamily = "medium";
- w = await M.render();
- w && (await w.presentMedium());
- M.widgetFamily = "large";
- w = await M.render();
- w && (await w.presentLarge());
- break;
- default:
- const func = funcs[i - 4];
- if (func) await func();
- break;
- }
-
- return i;
- },
- ];
- const alert = new Alert();
- alert.title = M.name;
- alert.message = M.desc;
- alert.addAction("预览组件");
- for (let _ in actions) {
- alert.addAction(_);
- _actions.push(actions[_]);
- }
- alert.addCancelAction("取消操作");
- const idx = await alert.presentSheet();
- if (_actions[idx]) {
- const func = _actions[idx];
- await func();
- }
- }
-}
diff --git a/Scripts/CalendarFnc.js b/Scripts/CalendarFnc.js
new file mode 100644
index 0000000..a8b5f21
--- /dev/null
+++ b/Scripts/CalendarFnc.js
@@ -0,0 +1 @@
+function calendarFun(){const calendar={lunarInfo:[0x04bd8,0x04ae0,0x0a570,0x054d5,0x0d260,0x0d950,0x16554,0x056a0,0x09ad0,0x055d2,0x04ae0,0x0a5b6,0x0a4d0,0x0d250,0x1d255,0x0b540,0x0d6a0,0x0ada2,0x095b0,0x14977,0x04970,0x0a4b0,0x0b4b5,0x06a50,0x06d40,0x1ab54,0x02b60,0x09570,0x052f2,0x04970,0x06566,0x0d4a0,0x0ea50,0x06e95,0x05ad0,0x02b60,0x186e3,0x092e0,0x1c8d7,0x0c950,0x0d4a0,0x1d8a6,0x0b550,0x056a0,0x1a5b4,0x025d0,0x092d0,0x0d2b2,0x0a950,0x0b557,0x06ca0,0x0b550,0x15355,0x04da0,0x0a5b0,0x14573,0x052b0,0x0a9a8,0x0e950,0x06aa0,0x0aea6,0x0ab50,0x04b60,0x0aae4,0x0a570,0x05260,0x0f263,0x0d950,0x05b57,0x056a0,0x096d0,0x04dd5,0x04ad0,0x0a4d0,0x0d4d4,0x0d250,0x0d558,0x0b540,0x0b6a0,0x195a6,0x095b0,0x049b0,0x0a974,0x0a4b0,0x0b27a,0x06a50,0x06d40,0x0af46,0x0ab60,0x09570,0x04af5,0x04970,0x064b0,0x074a3,0x0ea50,0x06b58,0x055c0,0x0ab60,0x096d5,0x092e0,0x0c960,0x0d954,0x0d4a0,0x0da50,0x07552,0x056a0,0x0abb7,0x025d0,0x092d0,0x0cab5,0x0a950,0x0b4a0,0x0baa4,0x0ad50,0x055d9,0x04ba0,0x0a5b0,0x15176,0x052b0,0x0a930,0x07954,0x06aa0,0x0ad50,0x05b52,0x04b60,0x0a6e6,0x0a4e0,0x0d260,0x0ea65,0x0d530,0x05aa0,0x076a3,0x096d0,0x04afb,0x04ad0,0x0a4d0,0x1d0b6,0x0d250,0x0d520,0x0dd45,0x0b5a0,0x056d0,0x055b2,0x049b0,0x0a577,0x0a4b0,0x0aa50,0x1b255,0x06d20,0x0ada0,0x14b63,0x09370,0x049f8,0x04970,0x064b0,0x168a6,0x0ea50,0x06b20,0x1a6c4,0x0aae0,0x0a2e0,0x0d2e3,0x0c960,0x0d557,0x0d4a0,0x0da50,0x05d55,0x056a0,0x0a6d0,0x055d4,0x052d0,0x0a9b8,0x0a950,0x0b4a0,0x0b6a6,0x0ad50,0x055a0,0x0aba4,0x0a5b0,0x052b0,0x0b273,0x06930,0x07337,0x06aa0,0x0ad50,0x14b55,0x04b60,0x0a570,0x054e4,0x0d160,0x0e968,0x0d520,0x0daa0,0x16aa6,0x056d0,0x04ae0,0x0a9d4,0x0a2d0,0x0d150,0x0f252,0x0d520,],solarMonth:[31,28,31,30,31,30,31,31,30,31,30,31],Gan:["\u7532","\u4e59","\u4e19","\u4e01","\u620a","\u5df1","\u5e9a","\u8f9b","\u58ec","\u7678",],Zhi:["\u5b50","\u4e11","\u5bc5","\u536f","\u8fb0","\u5df3","\u5348","\u672a","\u7533","\u9149","\u620c","\u4ea5",],Animals:["\u9f20","\u725b","\u864e","\u5154","\u9f99","\u86c7","\u9a6c","\u7f8a","\u7334","\u9e21","\u72d7","\u732a",],solarTerm:["\u5c0f\u5bd2","\u5927\u5bd2","\u7acb\u6625","\u96e8\u6c34","\u60ca\u86f0","\u6625\u5206","\u6e05\u660e","\u8c37\u96e8","\u7acb\u590f","\u5c0f\u6ee1","\u8292\u79cd","\u590f\u81f3","\u5c0f\u6691","\u5927\u6691","\u7acb\u79cb","\u5904\u6691","\u767d\u9732","\u79cb\u5206","\u5bd2\u9732","\u971c\u964d","\u7acb\u51ac","\u5c0f\u96ea","\u5927\u96ea","\u51ac\u81f3",],sTermInfo:["9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c3598082c95f8c965cc920f","97bd0b06bdb0722c965ce1cfcc920f","b027097bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c359801ec95f8c965cc920f","97bd0b06bdb0722c965ce1cfcc920f","b027097bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c359801ec95f8c965cc920f","97bd0b06bdb0722c965ce1cfcc920f","b027097bd097c36b0b6fc9274c91aa","9778397bd19801ec9210c965cc920e","97b6b97bd19801ec95f8c965cc920f","97bd09801d98082c95f8e1cfcc920f","97bd097bd097c36b0b6fc9210c8dc2","9778397bd197c36c9210c9274c91aa","97b6b97bd19801ec95f8c965cc920e","97bd09801d98082c95f8e1cfcc920f","97bd097bd097c36b0b6fc9210c8dc2","9778397bd097c36c9210c9274c91aa","97b6b97bd19801ec95f8c965cc920e","97bcf97c3598082c95f8e1cfcc920f","97bd097bd097c36b0b6fc9210c8dc2","9778397bd097c36c9210c9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c3598082c95f8c965cc920f","97bd097bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c3598082c95f8c965cc920f","97bd097bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c359801ec95f8c965cc920f","97bd097bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c359801ec95f8c965cc920f","97bd097bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c359801ec95f8c965cc920f","97bd097bd07f595b0b6fc920fb0722","9778397bd097c36b0b6fc9210c8dc2","9778397bd19801ec9210c9274c920e","97b6b97bd19801ec95f8c965cc920f","97bd07f5307f595b0b0bc920fb0722","7f0e397bd097c36b0b6fc9210c8dc2","9778397bd097c36c9210c9274c920e","97b6b97bd19801ec95f8c965cc920f","97bd07f5307f595b0b0bc920fb0722","7f0e397bd097c36b0b6fc9210c8dc2","9778397bd097c36c9210c9274c91aa","97b6b97bd19801ec9210c965cc920e","97bd07f1487f595b0b0bc920fb0722","7f0e397bd097c36b0b6fc9210c8dc2","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf7f1487f595b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf7f1487f595b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf7f1487f531b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf7f1487f531b0b0bb0b6fb0722","7f0e397bd07f595b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c9274c920e","97bcf7f0e47f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","9778397bd097c36b0b6fc9210c91aa","97b6b97bd197c36c9210c9274c920e","97bcf7f0e47f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","9778397bd097c36b0b6fc9210c8dc2","9778397bd097c36c9210c9274c920e","97b6b7f0e47f531b0723b0b6fb0722","7f0e37f5307f595b0b0bc920fb0722","7f0e397bd097c36b0b6fc9210c8dc2","9778397bd097c36b0b70c9274c91aa","97b6b7f0e47f531b0723b0b6fb0721","7f0e37f1487f595b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc9210c8dc2","9778397bd097c36b0b6fc9274c91aa","97b6b7f0e47f531b0723b0b6fb0721","7f0e27f1487f595b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b7f0e47f531b0723b0787b0721","7f0e27f0e47f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","9778397bd097c36b0b6fc9210c91aa","97b6b7f0e47f149b0723b0787b0721","7f0e27f0e47f531b0723b0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","9778397bd097c36b0b6fc9210c8dc2","977837f0e37f149b0723b0787b0721","7f07e7f0e47f531b0723b0b6fb0722","7f0e37f5307f595b0b0bc920fb0722","7f0e397bd097c35b0b6fc9210c8dc2","977837f0e37f14998082b0787b0721","7f07e7f0e47f531b0723b0b6fb0721","7f0e37f1487f595b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc9210c8dc2","977837f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","977837f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","977837f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","977837f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","977837f0e37f14998082b0787b06bd","7f07e7f0e47f149b0723b0787b0721","7f0e27f0e47f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","977837f0e37f14998082b0723b06bd","7f07e7f0e37f149b0723b0787b0721","7f0e27f0e47f531b0723b0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","977837f0e37f14898082b0723b02d5","7ec967f0e37f14998082b0787b0721","7f07e7f0e47f531b0723b0b6fb0722","7f0e37f1487f595b0b0bb0b6fb0722","7f0e37f0e37f14898082b0723b02d5","7ec967f0e37f14998082b0787b0721","7f07e7f0e47f531b0723b0b6fb0722","7f0e37f1487f531b0b0bb0b6fb0722","7f0e37f0e37f14898082b0723b02d5","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e37f1487f531b0b0bb0b6fb0722","7f0e37f0e37f14898082b072297c35","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e37f0e37f14898082b072297c35","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e37f0e366aa89801eb072297c35","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f149b0723b0787b0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e37f0e366aa89801eb072297c35","7ec967f0e37f14998082b0723b06bd","7f07e7f0e47f149b0723b0787b0721","7f0e27f0e47f531b0723b0b6fb0722","7f0e37f0e366aa89801eb072297c35","7ec967f0e37f14998082b0723b06bd","7f07e7f0e37f14998083b0787b0721","7f0e27f0e47f531b0723b0b6fb0722","7f0e37f0e366aa89801eb072297c35","7ec967f0e37f14898082b0723b02d5","7f07e7f0e37f14998082b0787b0721","7f07e7f0e47f531b0723b0b6fb0722","7f0e36665b66aa89801e9808297c35","665f67f0e37f14898082b0723b02d5","7ec967f0e37f14998082b0787b0721","7f07e7f0e47f531b0723b0b6fb0722","7f0e36665b66a449801e9808297c35","665f67f0e37f14898082b0723b02d5","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e36665b66a449801e9808297c35","665f67f0e37f14898082b072297c35","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e26665b66a449801e9808297c35","665f67f0e37f1489801eb072297c35","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722",],nStr1:["\u65e5","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341",],nStr2:["\u521d","\u5341","\u5eff","\u5345"],nStr3:["\u6b63","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341","\u51ac","\u814a",],lYearDays:function(y){var i,sum=348;for(i=0x8000;i>0x8;i>>=1){sum+=calendar.lunarInfo[y-1900]&i?1:0}return sum+calendar.leapDays(y)},leapMonth:function(y){return calendar.lunarInfo[y-1900]&0xf},leapDays:function(y){if(calendar.leapMonth(y)){return calendar.lunarInfo[y-1900]&0x10000?30:29}return 0},monthDays:function(y,m){if(m>12||m<1){return-1}return calendar.lunarInfo[y-1900]&(0x10000>>m)?30:29},solarDays:function(y,m){if(m>12||m<1){return-1}var ms=m-1;if(ms==1){return(y%4==0&&y%100!=0)||y%400==0?29:28}else{return calendar.solarMonth[ms]}},toGanZhiYear:function(lYear){var ganKey=(lYear-3)%10;var zhiKey=(lYear-3)%12;if(ganKey==0)ganKey=10;if(zhiKey==0)zhiKey=12;return calendar.Gan[ganKey-1]+calendar.Zhi[zhiKey-1]},toAstro:function(cMonth,cDay){var s="\u9b54\u7faf\u6c34\u74f6\u53cc\u9c7c\u767d\u7f8a\u91d1\u725b\u53cc\u5b50\u5de8\u87f9\u72ee\u5b50\u5904\u5973\u5929\u79e4\u5929\u874e\u5c04\u624b\u9b54\u7faf";var arr=[20,19,21,21,21,22,23,23,23,23,22,22];return(s.substr(cMonth*2-(cDay>>0?1:0),vt+pt),bt=_t+dt+(xt>>>0>>0?1:0);j=X,N=L,X=U,L=K,U=O,K=I,I=W+St|0,O=P+mt+(I>>>0 >>0?1:0)|0,P=M,W=F,M=E,F=R,E=C,R=D,D=St+xt|0,C=mt+bt+(D>>>0 >>0?1:0)|0}p=i.low=p+D,i.high=d+C+(p>>>0 >>0?1:0),v=n.low=v+R,n.high=_+E+(v>>>0 >>0?1:0),g=o.low=g+F,o.high=y+M+(g>>>0 >>0?1:0),w=s.low=w+W,s.high=B+P+(w>>>0 >>0?1:0),S=c.low=S+I,c.high=k+O+(S>>>0>>0?1:0),x=l.low=x+K,l.high=m+U+(x>>>0 >>0?1:0),H=f.low=H+L,f.high=b+X+(H>>>0 >>0?1:0),A=u.low=A+N,u.high=z+j+(A>>>0 >>0?1:0)},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;e[i>>>5]|=128<<24-i%32,e[30+(i+128>>>10<<5)]=Math.floor(r/4294967296),e[31+(i+128>>>10<<5)]=r,t.sigBytes=4*e.length,this._process();var n=this._hash.toX32();return n},clone:function(){var t=i.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32});e.SHA512=i._createHelper(f),e.HmacSHA512=i._createHmacHelper(f)}(),function(){var t=l,e=t.x64,r=e.Word,i=e.WordArray,n=t.algo,o=n.SHA512,s=n.SHA384=o.extend({_doReset:function(){this._hash=new i.init([new r.init(3418070365,3238371032),new r.init(1654270250,914150663),new r.init(2438529370,812702999),new r.init(355462360,4144912697),new r.init(1731405415,4290775857),new r.init(2394180231,1750603025),new r.init(3675008525,1694076839),new r.init(1203062813,3204075428)])},_doFinalize:function(){var t=o._doFinalize.call(this);return t.sigBytes-=16,t}});t.SHA384=o._createHelper(s),t.HmacSHA384=o._createHmacHelper(s)}(),l.lib.Cipher||function(t){var e=l,r=e.lib,i=r.Base,n=r.WordArray,o=r.BufferedBlockAlgorithm,s=e.enc,c=(s.Utf8,s.Base64),a=e.algo,h=a.EvpKDF,f=r.Cipher=o.extend({cfg:i.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,r){this.cfg=this.cfg.extend(r),this._xformMode=t,this._key=e,this.reset()},reset:function(){o.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){t&&this._append(t);var e=this._doFinalize();return e},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function t(t){return"string"==typeof t?m:w}return function(e){return{encrypt:function(r,i,n){return t(i).encrypt(e,r,i,n)},decrypt:function(r,i,n){return t(i).decrypt(e,r,i,n)}}}}()}),u=(r.StreamCipher=f.extend({_doFinalize:function(){var t=this._process(!0);return t},blockSize:1}),e.mode={}),d=r.BlockCipherMode=i.extend({createEncryptor:function(t,e){return this.Encryptor.create(t,e)},createDecryptor:function(t,e){return this.Decryptor.create(t,e)},init:function(t,e){this._cipher=t,this._iv=e}}),p=u.CBC=function(){function e(e,r,i){var n,o=this._iv;o?(n=o,this._iv=t):n=this._prevBlock;for(var s=0;s>>2];t.sigBytes-=e}},y=(r.BlockCipher=f.extend({cfg:f.cfg.extend({mode:p,padding:v}),reset:function(){var t;f.reset.call(this);var e=this.cfg,r=e.iv,i=e.mode;this._xformMode==this._ENC_XFORM_MODE?t=i.createEncryptor:(t=i.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==t?this._mode.init(this,r&&r.words):(this._mode=t.call(i,this,r&&r.words),this._mode.__creator=t)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t,e=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(e.pad(this._data,this.blockSize),t=this._process(!0)):(t=this._process(!0),e.unpad(t)),t},blockSize:4}),r.CipherParams=i.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}})),g=e.format={},B=g.OpenSSL={stringify:function(t){var e,r=t.ciphertext,i=t.salt;return e=i?n.create([1398893684,1701076831]).concat(i).concat(r):r,e.toString(c)},parse:function(t){var e,r=c.parse(t),i=r.words;return 1398893684==i[0]&&1701076831==i[1]&&(e=n.create(i.slice(2,4)),i.splice(0,4),r.sigBytes-=16),y.create({ciphertext:r,salt:e})}},w=r.SerializableCipher=i.extend({cfg:i.extend({format:B}),encrypt:function(t,e,r,i){i=this.cfg.extend(i);var n=t.createEncryptor(r,i),o=n.finalize(e),s=n.cfg;return y.create({ciphertext:o,key:r,iv:s.iv,algorithm:t,mode:s.mode,padding:s.padding,blockSize:t.blockSize,formatter:i.format})},decrypt:function(t,e,r,i){i=this.cfg.extend(i),e=this._parse(e,i.format);var n=t.createDecryptor(r,i).finalize(e.ciphertext);return n},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),k=e.kdf={},S=k.OpenSSL={execute:function(t,e,r,i){i||(i=n.random(8));var o=h.create({keySize:e+r}).compute(t,i),s=n.create(o.words.slice(e),4*r);return o.sigBytes=4*e,y.create({key:o,iv:s,salt:i})}},m=r.PasswordBasedCipher=w.extend({cfg:w.cfg.extend({kdf:S}),encrypt:function(t,e,r,i){i=this.cfg.extend(i);var n=i.kdf.execute(r,t.keySize,t.ivSize);i.iv=n.iv;var o=w.encrypt.call(this,t,e,n.key,i);return o.mixIn(n),o},decrypt:function(t,e,r,i){i=this.cfg.extend(i),e=this._parse(e,i.format);var n=i.kdf.execute(r,t.keySize,t.ivSize,e.salt);i.iv=n.iv;var o=w.decrypt.call(this,t,e,n.key,i);return o}})}(),l.mode.CFB=function(){function t(t,e,r,i){var n,o=this._iv;o?(n=o.slice(0),this._iv=void 0):n=this._prevBlock,i.encryptBlock(n,0);for(var s=0;s >>2]|=n<<24-o%4*8,t.sigBytes+=n},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},l.pad.Iso10126={pad:function(t,e){var r=4*e,i=r-t.sigBytes%r;t.concat(l.lib.WordArray.random(i-1)).concat(l.lib.WordArray.create([i<<24],1))},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},l.pad.Iso97971={pad:function(t,e){t.concat(l.lib.WordArray.create([2147483648],1)),l.pad.ZeroPadding.pad(t,e)},unpad:function(t){l.pad.ZeroPadding.unpad(t),t.sigBytes--}},l.mode.OFB=(a=l.lib.BlockCipherMode.extend(),h=a.Encryptor=a.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize,n=this._iv,o=this._keystream;n&&(o=this._keystream=n.slice(0),this._iv=void 0),r.encryptBlock(o,0);for(var s=0;s>>8^255&l^99,n[r]=l,o[l]=r;var _=t[r],v=t[_],y=t[v],g=257*t[l]^16843008*l;s[r]=g<<24|g>>>8,c[r]=g<<16|g>>>16,a[r]=g<<8|g>>>24,h[r]=g;g=16843009*y^65537*v^257*_^16843008*r;f[l]=g<<24|g>>>8,u[l]=g<<16|g>>>16,d[l]=g<<8|g>>>24,p[l]=g,r?(r=_^t[t[t[y^_]]],i^=t[t[i]]):r=i=1}})();var _=[0,1,2,4,8,16,32,64,128,27,54],v=i.AES=r.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var t=this._keyPriorReset=this._key,e=t.words,r=t.sigBytes/4,i=this._nRounds=r+6,o=4*(i+1),s=this._keySchedule=[],c=0;c 6&&c%r==4&&(l=n[l>>>24]<<24|n[l>>>16&255]<<16|n[l>>>8&255]<<8|n[255&l]):(l=l<<8|l>>>24,l=n[l>>>24]<<24|n[l>>>16&255]<<16|n[l>>>8&255]<<8|n[255&l],l^=_[c/r|0]<<24),s[c]=s[c-r]^l);for(var a=this._invKeySchedule=[],h=0;h >>24]]^u[n[l>>>16&255]]^d[n[l>>>8&255]]^p[n[255&l]]}}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,s,c,a,h,n)},decryptBlock:function(t,e){var r=t[e+1];t[e+1]=t[e+3],t[e+3]=r,this._doCryptBlock(t,e,this._invKeySchedule,f,u,d,p,o);r=t[e+1];t[e+1]=t[e+3],t[e+3]=r},_doCryptBlock:function(t,e,r,i,n,o,s,c){for(var a=this._nRounds,h=t[e]^r[0],l=t[e+1]^r[1],f=t[e+2]^r[2],u=t[e+3]^r[3],d=4,p=1;p>>24]^n[l>>>16&255]^o[f>>>8&255]^s[255&u]^r[d++],v=i[l>>>24]^n[f>>>16&255]^o[u>>>8&255]^s[255&h]^r[d++],y=i[f>>>24]^n[u>>>16&255]^o[h>>>8&255]^s[255&l]^r[d++],g=i[u>>>24]^n[h>>>16&255]^o[l>>>8&255]^s[255&f]^r[d++];h=_,l=v,f=y,u=g}_=(c[h>>>24]<<24|c[l>>>16&255]<<16|c[f>>>8&255]<<8|c[255&u])^r[d++],v=(c[l>>>24]<<24|c[f>>>16&255]<<16|c[u>>>8&255]<<8|c[255&h])^r[d++],y=(c[f>>>24]<<24|c[u>>>16&255]<<16|c[h>>>8&255]<<8|c[255&l])^r[d++],g=(c[u>>>24]<<24|c[h>>>16&255]<<16|c[l>>>8&255]<<8|c[255&f])^r[d++];t[e]=_,t[e+1]=v,t[e+2]=y,t[e+3]=g},keySize:8});t.AES=r._createHelper(v)}(),function(){function t(t,e){var r=(this._lBlock>>>t^this._rBlock)&e;this._rBlock^=r,this._lBlock^=r< >>t^this._lBlock)&e;this._lBlock^=r,this._rBlock^=r< >>5]>>>31-n%32&1}for(var o=this._subKeys=[],s=0;s<16;s++){var l=o[s]=[],f=h[s];for(i=0;i<24;i++)l[i/6|0]|=r[(a[i]-1+f)%28]<<31-i%6,l[4+(i/6|0)]|=r[28+(a[i+24]-1+f)%28]<<31-i%6;l[0]=l[0]<<1|l[0]>>>31;for(i=1;i<7;i++)l[i]=l[i]>>>4*(i-1)+3;l[7]=l[7]<<5|l[7]>>>27}var u=this._invSubKeys=[];for(i=0;i<16;i++)u[i]=o[15-i]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._subKeys)},decryptBlock:function(t,e){this._doCryptBlock(t,e,this._invSubKeys)},_doCryptBlock:function(r,i,n){this._lBlock=r[i],this._rBlock=r[i+1],t.call(this,4,252645135),t.call(this,16,65535),e.call(this,2,858993459),e.call(this,8,16711935),t.call(this,1,1431655765);for(var o=0;o<16;o++){for(var s=n[o],c=this._lBlock,a=this._rBlock,h=0,l=0;l<8;l++)h|=f[l][((a^s[l])&u[l])>>>0];this._lBlock=a,this._rBlock=c^h}var d=this._lBlock;this._lBlock=this._rBlock,this._rBlock=d,t.call(this,1,1431655765),e.call(this,8,16711935),e.call(this,2,858993459),t.call(this,16,65535),t.call(this,4,252645135),r[i]=this._lBlock,r[i+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});r.DES=o._createHelper(d);var p=s.TripleDES=o.extend({_doReset:function(){var t=this._key,e=t.words;if(2!==e.length&&4!==e.length&&e.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var r=e.slice(0,2),i=e.length<4?e.slice(0,2):e.slice(2,4),o=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=d.createEncryptor(n.create(r)),this._des2=d.createEncryptor(n.create(i)),this._des3=d.createEncryptor(n.create(o))},encryptBlock:function(t,e){this._des1.encryptBlock(t,e),this._des2.decryptBlock(t,e),this._des3.encryptBlock(t,e)},decryptBlock:function(t,e){this._des3.decryptBlock(t,e),this._des2.encryptBlock(t,e),this._des1.decryptBlock(t,e)},keySize:6,ivSize:2,blockSize:2});r.TripleDES=o._createHelper(p)}(),function(){function t(){for(var t=this._S,e=this._i,r=this._j,i=0,n=0;n<4;n++){e=(e+1)%256,r=(r+t[e])%256;var o=t[e];t[e]=t[r],t[r]=o,i|=t[(t[e]+t[r])%256]<<24-8*n}return this._i=e,this._j=r,i}var e=l,r=e.lib,i=r.StreamCipher,n=e.algo,o=n.RC4=i.extend({_doReset:function(){for(var t=this._key,e=t.words,r=t.sigBytes,i=this._S=[],n=0;n<256;n++)i[n]=n;n=0;for(var o=0;n<256;n++){var s=n%r,c=e[s>>>2]>>>24-s%4*8&255;o=(o+i[n]+c)%256;var a=i[n];i[n]=i[o],i[o]=a}this._i=this._j=0},_doProcessBlock:function(e,r){e[r]^=t.call(this)},keySize:8,ivSize:0});e.RC4=i._createHelper(o);var s=n.RC4Drop=o.extend({cfg:o.cfg.extend({drop:192}),_doReset:function(){o._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)t.call(this)}});e.RC4Drop=i._createHelper(s)}(),l.mode.CTRGladman=function(){function t(t){if(255==(t>>24&255)){var e=t>>16&255,r=t>>8&255,i=255&t;255===e?(e=0,255===r?(r=0,255===i?i=0:++i):++r):++e,t=0,t+=e<<16,t+=r<<8,t+=i}else t+=1<<24;return t}function e(e){return 0===(e[0]=t(e[0]))&&(e[1]=t(e[1])),e}var r=l.lib.BlockCipherMode.extend(),i=r.Encryptor=r.extend({processBlock:function(t,r){var i=this._cipher,n=i.blockSize,o=this._iv,s=this._counter;o&&(s=this._counter=o.slice(0),this._iv=void 0),e(s);var c=s.slice(0);i.encryptBlock(c,0);for(var a=0;a >>0 >>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0>>0?1:0)|0,this._b=e[7]>>>0>>0?1:0;for(r=0;r<8;r++){var i=t[r]+e[r],n=65535&i,o=i>>>16,a=((n*n>>>17)+n*o>>>15)+o*o,h=((4294901760&i)*i|0)+((65535&i)*i|0);c[r]=a^h}t[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,t[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,t[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,t[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,t[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,t[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,t[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,t[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}var e=l,r=e.lib,i=r.StreamCipher,n=e.algo,o=[],s=[],c=[],a=n.Rabbit=i.extend({_doReset:function(){for(var e=this._key.words,r=this.cfg.iv,i=0;i<4;i++)e[i]=16711935&(e[i]<<8|e[i]>>>24)|4278255360&(e[i]<<24|e[i]>>>8);var n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],o=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(i=0;i<4;i++)t.call(this);for(i=0;i<8;i++)o[i]^=n[i+4&7];if(r){var s=r.words,c=s[0],a=s[1],h=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),f=h>>>16|4294901760&l,u=l<<16|65535&h;o[0]^=h,o[1]^=f,o[2]^=l,o[3]^=u,o[4]^=h,o[5]^=f,o[6]^=l,o[7]^=u;for(i=0;i<4;i++)t.call(this)}},_doProcessBlock:function(e,r){var i=this._X;t.call(this),o[0]=i[0]^i[5]>>>16^i[3]<<16,o[1]=i[2]^i[7]>>>16^i[5]<<16,o[2]=i[4]^i[1]>>>16^i[7]<<16,o[3]=i[6]^i[3]>>>16^i[1]<<16;for(var n=0;n<4;n++)o[n]=16711935&(o[n]<<8|o[n]>>>24)|4278255360&(o[n]<<24|o[n]>>>8),e[r+n]^=o[n]},blockSize:4,ivSize:2});e.Rabbit=i._createHelper(a)}(),l.mode.CTR=function(){var t=l.lib.BlockCipherMode.extend(),e=t.Encryptor=t.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize,n=this._iv,o=this._counter;n&&(o=this._counter=n.slice(0),this._iv=void 0);var s=o.slice(0);r.encryptBlock(s,0),o[i-1]=o[i-1]+1|0;for(var c=0;c>>0>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0>>0?1:0)|0,this._b=e[7]>>>0>>0?1:0;for(r=0;r<8;r++){var i=t[r]+e[r],n=65535&i,o=i>>>16,a=((n*n>>>17)+n*o>>>15)+o*o,h=((4294901760&i)*i|0)+((65535&i)*i|0);c[r]=a^h}t[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,t[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,t[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,t[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,t[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,t[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,t[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,t[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}var e=l,r=e.lib,i=r.StreamCipher,n=e.algo,o=[],s=[],c=[],a=n.RabbitLegacy=i.extend({_doReset:function(){var e=this._key.words,r=this.cfg.iv,i=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],n=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var o=0;o<4;o++)t.call(this);for(o=0;o<8;o++)n[o]^=i[o+4&7];if(r){var s=r.words,c=s[0],a=s[1],h=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),f=h>>>16|4294901760&l,u=l<<16|65535&h;n[0]^=h,n[1]^=f,n[2]^=l,n[3]^=u,n[4]^=h,n[5]^=f,n[6]^=l,n[7]^=u;for(o=0;o<4;o++)t.call(this)}},_doProcessBlock:function(e,r){var i=this._X;t.call(this),o[0]=i[0]^i[5]>>>16^i[3]<<16,o[1]=i[2]^i[7]>>>16^i[5]<<16,o[2]=i[4]^i[1]>>>16^i[7]<<16,o[3]=i[6]^i[3]>>>16^i[1]<<16;for(var n=0;n<4;n++)o[n]=16711935&(o[n]<<8|o[n]>>>24)|4278255360&(o[n]<<24|o[n]>>>8),e[r+n]^=o[n]},blockSize:4,ivSize:2});e.RabbitLegacy=i._createHelper(a)}(),l.pad.ZeroPadding={pad:function(t,e){var r=4*e;t.clamp(),t.sigBytes+=r-(t.sigBytes%r||r)},unpad:function(t){var e=t.words,r=t.sigBytes-1;for(r=t.sigBytes-1;r>=0;r--)if(e[r>>>2]>>>24-r%4*8&255){t.sigBytes=r+1;break}}},l}); \ No newline at end of file diff --git a/Scripts/webo.js b/Scripts/webo.js new file mode 100644 index 0000000..f079bb9 --- /dev/null +++ b/Scripts/webo.js @@ -0,0 +1,183 @@ +// +// iOS 桌面组件脚本 @「小件件」 +// 开发说明:请从 Widget 类开始编写,注释请勿修改 +// https://x.im3x.cn +// + +// 添加require,是为了vscode中可以正确引入包,以获得自动补全等功能 + +// @组件代码开始 +let w = new ListWidget(); + +if (typeof require === 'undefined') require = importModule; // +const { DmYY, Runing } = require('./DmYY'); + +class Widget extends DmYY { + constructor(arg) { + super(arg); + this.name = '微博热搜'; + this.en = 'weiboresou'; + if (config.runsInApp) { + this.registerAction('基础设置', this.setWidgetConfig); + this.registerAction('插件设置', this.actionSetting); + } + } + + actionUrl(name = '', data = '') { + let u = URLScheme.forRunningScript(); + let q = `act=${encodeURIComponent(name)}&data=${encodeURIComponent( + data, + )}&__arg=${encodeURIComponent(this.arg)}&__size=${this.widgetFamily}`; + let result = ''; + if (u.includes('run?')) { + result = `${u}&${q}`; + } else { + result = `${u}?${q}`; + } + return result; + } + + /** + * 渲染小尺寸组件 + */ + async renderSmall() { + let res = await this.$request.get( + 'https://m.weibo.cn/api/container/getIndex?containerid=106003%26filter_type%3Drealtimehot', + ); + let data = res['data']['cards'][0]['card_group']; + // 去除第一条 + data.shift(); + let topic = data[0]; + console.log(topic); + // 显示数据 + + w = await this.renderHeader( + w, + 'https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2225458401,2104443747&fm=26&gp=0.jpg', + '微博热搜', + ); + let body = w.addStack(); + let txt = body.addText(topic['desc']); + body.addSpacer(); + txt.leftAlignText(); + txt.font = Font.lightSystemFont(14); + txt.textColor = this.widgetColor; + w.addSpacer(); + let footer = w.addStack(); + footer.centerAlignContent(); + let img = footer.addImage(await this.$request.get(topic['pic'], 'IMG')); + img.imageSize = new Size(18, 18); + footer.addSpacer(5); + if (topic['icon']) { + let hot = footer.addImage(await this.$request.get(topic['icon'], 'IMG')); + hot.imageSize = new Size(18, 18); + footer.addSpacer(5); + } + let num = footer.addText(String(topic['desc_extr'])); + num.font = Font.lightSystemFont(10); + num.textOpacity = 0.5; + num.textColor = this.widgetColor; + body.url = topic['scheme']; + return w; + } + /** + * 渲染中尺寸组件 + */ + + async renderMedium(count = 4) { + let res = await this.$request.get( + 'https://m.weibo.cn/api/container/getIndex?containerid=106003%26filter_type%3Drealtimehot', + ); + let data = res['data']['cards'][0]['card_group']; + // 去除第一条 + data.shift(); + // 显示数据 + + w = await this.renderHeader( + w, + 'https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2225458401,2104443747&fm=26&gp=0.jpg', + '微博热搜', + ); + + // 布局:一行一个,左边顺序排序,中间标题,后边热/新 + const body = w.addStack(); + const bodyLeft = body.addStack(); + bodyLeft.layoutVertically(); + for (let i = 0; i < count; i++) { + let topic = data[i]; + let dom = bodyLeft.addStack(); + dom.centerAlignContent(); + let pic = dom.addImage(await this.$request.get(topic['pic'], 'IMG')); + pic.imageSize = new Size(18, 18); + dom.addSpacer(5); + let title = dom.addText(topic['desc']); + title.lineLimit = 1; + title.font = Font.lightSystemFont(14); + title.textColor = this.widgetColor; + dom.addSpacer(5); + if (topic['icon']) { + let iconDom = dom.addStack(); + let icon = iconDom.addImage( + await this.$request.get(topic['icon'], 'IMG'), + ); + icon.imageSize = new Size(18, 18); + } + dom.addSpacer(); + let extr = dom.addText(String(topic['desc_extr'])); + extr.font = Font.lightSystemFont(12); + extr.textColor = this.widgetColor; + extr.textOpacity = 0.6; + dom.url = topic['scheme']; + bodyLeft.addSpacer(5); + } + body.addSpacer(); + w.url = this.actionUrl('setting'); + return w; + } + /** + * 渲染大尺寸组件 + */ + async renderLarge() { + return await this.renderMedium(11); + } + + async actionSetting() { + const settings = this.getSettings(); + const arg = settings['type'] || '1'; + let a = new Alert(); + a.title = '打开方式'; + a.message = '点击小组件浏览热点的方式'; + a.addAction((arg === '0' ? '✅ ' : '') + '微博客户端'); + a.addAction((arg === '1' ? '✅ ' : '') + 'Vvebo'); + a.addCancelAction('取消设置'); + let i = await a.presentSheet(); + if (i === -1) return; + this.settings['type'] = String(i); + this.saveSettings(); + } + + async actionOpenUrl(url) { + const settings = this.getSettings(); + if (settings['type'] === '1') { + Safari.openInApp(url, false); + } else { + let k = decodeURIComponent(url).split('q=')[1].split('&')[0]; + Safari.open('vvebo://search?q=' + encodeURIComponent(k)); + } + } + + useBoxJS = false; + + async render() { + await this.getWidgetBackgroundImage(w); + if (this.widgetFamily === 'medium') { + return this.renderMedium(); + } else if (this.widgetFamily === 'large') { + return this.renderLarge(); + } else { + return this.renderSmall(); + } + } +} + +await Runing(Widget); diff --git a/Scripts/wsgw.js b/Scripts/wsgw.js new file mode 100644 index 0000000..a8c1007 --- /dev/null +++ b/Scripts/wsgw.js @@ -0,0 +1,381 @@ +// Variables used by Scriptable. +// These must be at the very top of the file. Do not edit. +// icon-color: deep-gray; icon-glyph: setting; + +// 添加require,是为了vscode中可以正确引入包,以获得自动补全等功能 +if (typeof require === 'undefined') require = importModule; +const { DmYY, Runing } = require('./DmYY'); + +/** + * 重写修改自作者 + * @channel https://t.me/yqc_123/ + * @feedback https://t.me/NobyDa_Chat + * @author 小白脸|𝐎𝐍𝐙𝟑𝐕 + * + * 添加重写:https://raw.githubusercontent.com/dompling/Script/master/wsgw/index.js + * + */ + +const defaultData = { + user: '**', + left: { + dayElePq: [], + balance: 0, + arrearsOfFees: false, + }, + right: { + previousBill: 0, + previousBillRate: 0, + thisYear: 0, + thisYearRate: 0, + }, + update: '', +}; + +// @组件代码开始 +class Widget extends DmYY { + constructor(arg) { + super(arg); + this.en = 'wsgw'; + this.name = '网上国网'; + this.userNum = args.widgetParameter || 0; + if (config.runsInApp) { + this.registerAction({ + icon: { name: 'photo.tv', color: '#5A74EF' }, + type: 'color', + title: '左侧背景', + desc: '左侧背景色', + val: 'leftColor', + }); + this.registerAction({ + icon: { name: 'arrow.clockwise', color: '#1890ff' }, + type: 'input', + title: '缓存时间', + desc: '默认3小时 (单位小时),填写方式数字', + placeholder: '3', + val: 'cacheTime', + }); + + this.registerAction({ + icon: { name: 'character.cursor.ibeam', color: '#EC6240' }, + type: 'input', + title: '文字缩放', + desc: '文字缩放比例,值为 0-1', + placeholder: '1', + val: 'scale', + }); + + this.registerAction('基础设置', this.setWidgetConfig); + } + } + + date = new Date(); + day = this.date.getTime(); + + dataSource = { ...defaultData }; + + init = async () => { + console.log(`当前用户下标:${this.userNum}`); + this.cacheTime = (this.settings.cacheTime || 3) * 3600000; + this.scale = parseFloat(this.settings.scale || '1'); + if ( + !this.settings.data || + this.settings.cacheDay + this.cacheTime < this.day + ) { + console.log(`缓存失效,重新获取`); + await this.cacheData(); + } else { + console.log( + `最后更新时间:${new Date(parseInt(this.settings.cacheDay)).toLocaleString()}` + ); + console.log( + `缓存失效时间:${new Date(parseInt(this.settings.cacheDay) + this.cacheTime).toLocaleString()}` + ); + this.dataSource = { ...this.settings.data[this.userNum] }; + if (!this.dataSource.user) await this.cacheData(); + console.log(this.dataSource); + } + }; + + cacheData = async () => { + try { + const response = await this.$request.get( + 'https://api.wsgw-rewrite.com/electricity/bill/all', + { timeoutInterval: 60 } + ); + console.log(response); + this.settings.data = []; + response?.forEach((dataInfo) => { + const dataSource = { + user: '**', + left: { + dayElePq: [], + balance: 0, + arrearsOfFees: false, + }, + right: { + previousBill: 0, + previousBillRate: 0, + thisYear: 0, + thisYearRate: 0, + }, + update: '', + }; + + dataSource.user = dataInfo.userInfo.consName_dst.replaceAll('*', ''); + dataSource.left.balance = parseFloat(dataInfo.eleBill.sumMoney); + dataSource.left.dayElePq = dataInfo.dayElecQuantity.sevenEleList + .filter((item) => item.dayElePq !== '-') + .map((item) => ({ + label: item.day, + value: parseFloat(item.dayElePq), + })); + + dataSource.left.arrearsOfFees = dataInfo.arrearsOfFees; + + dataSource.right.previousBill = parseFloat( + this.last(dataInfo.monthElecQuantity?.mothEleList || []) + ?.monthEleCost || 0 + ); + + const oldVal = + this.last(dataInfo.monthElecQuantity?.mothEleList || [], 2) + ?.monthEleCost || 1; + + dataSource.right.previousBillRate = + ((dataSource.right.previousBill - oldVal) / oldVal) * 100; + + dataSource.right.previousBillRate = parseFloat( + dataSource.right.previousBillRate.toFixed(2) + ); + + dataSource.right.thisYear = parseFloat( + dataInfo.monthElecQuantity?.dataInfo?.totalEleCost || 0 + ); + + const lastYearVal = dataInfo.lastYearElecQuantity.dataInfo.totalEleCost; + + dataSource.right.thisYearRate = + ((dataSource.right.thisYear - lastYearVal) / lastYearVal) * 100; + + dataSource.right.thisYearRate = parseFloat( + dataSource.right.thisYearRate.toFixed(2) + ); + + dataSource.update = dataInfo.eleBill.date; + this.settings.data.push({ ...dataSource }); + }); + console.log(this.settings.data); + this.dataSource = { ...this.settings.data[this.userNum] }; + this.settings.cacheDay = this.day; + this.saveSettings(false); + } catch (e) { + console.log(`接口数据异常:请检查 BoxJS 重写`); + console.log(e); + } + }; + + last = (data = [], index = 1) => { + return data[data.length - index]; + }; + + renderImage = async (uri) => { + return this.$request.get(uri, 'IMG'); + }; + + notSupport(w) { + const stack = w.addStack(); + stack.addText('暂不支持'); + return w; + } + + barChart() { + return ` + { + "type": "bar", + "data": { + "labels": ${JSON.stringify(this.dataSource.left.dayElePq.map((item) => item.label).reverse())}, + "datasets": [ + { + "label": "Sales", + "data": ${JSON.stringify(this.dataSource.left.dayElePq.map((item) => parseFloat(item.value)).reverse())}, + "backgroundColor": "#fff", + "borderColor": "#fff", + "borderWidth": 1, + "borderRadius": { + "topLeft": 30, + "topRight": 30, + "bottomLeft": 30, // 只为柱状图底部设置圆角 + "bottomRight": 30 + }, + "barPercentage": 0.8, // 控制柱子的宽度 + "categoryPercentage": 0.4, + "borderSkipped": false // 应用自定义的圆角设置 + } + ] + }, + "options": { + "plugins": { + "legend": { + "display": false // 隐藏图例 + }, + "title": { + "display": false // 隐藏标题 + } + }, + "scales": { + "x": { + "display": false // 完全隐藏 X 轴 + }, + "y": { + "display": false // 完全隐藏 Y 轴 + } + }, + "layout": { + "padding": 0 // 移除图表周围的内边距 + } + } +} +`; + } + + createLeft = async (widget) => { + const fontStyle = { + color: new Color('#fff'), + size: 20 * this.scale, + opacity: 0.8, + }; + const leftStack = widget.addStack(); + leftStack.cornerRadius = 10; + leftStack.layoutVertically(); + leftStack.backgroundColor = new Color( + this.settings.leftColor || '#5A74EF', + 0.8 + ); + leftStack.setPadding(10, 10, 10, 10); + + const chartStack = leftStack.addStack(); + + const chartImage = await this.renderImage( + `https://quickchart.io/chart?v=4&w=800&h=400&f=png&c=${encodeURIComponent(this.barChart())}` + ); + const chartImageStack = chartStack.addImage(chartImage); + chartImageStack.imageSize = new Size(120, 60); + + leftStack.addSpacer(); + + this.provideText('余额', leftStack, fontStyle); + + const todayStack = leftStack.addStack(); + todayStack.centerAlignContent(); + if (this.dataSource.left.arrearsOfFees) + fontStyle.color = new Color('#f65755'); + + fontStyle.size = 20 * this.scale; + this.provideText('¥ ', todayStack, fontStyle); + + fontStyle.opacity = 1; + const todayUse = this.dataSource.left.balance; + + this.provideText(` ${todayUse.toLocaleString()}`, todayStack, fontStyle); + }; + + createDot = (stack, color) => { + const dotStack = stack.addStack(); + dotStack.setPadding(0, 0, 2, 0); + const dot = dotStack.addStack(); + + dot.size = new Size(10, 10); + dot.backgroundColor = new Color(color); + dot.cornerRadius = 10; + }; + + createCell = (widget, data = { title: '', num: 0, radio: 0 }) => { + const cellStack = widget.addStack(); + cellStack.backgroundColor = new Color('#404045'); + cellStack.setPadding(10, 10, 10, 10); + cellStack.cornerRadius = 10; + cellStack.layoutVertically(); + + const fontStyle = { + color: new Color('#fff'), + size: 14 * this.scale, + opacity: 0.6, + }; + this.provideText(data.title, cellStack, fontStyle); + + const dataStack = cellStack.addStack(); + dataStack.bottomAlignContent(); + + fontStyle.size = 12 * this.scale; + this.provideText('¥ ', dataStack, fontStyle); + + fontStyle.opacity = 1; + fontStyle.size = 20 * this.scale; + this.provideText(` ${data.num.toLocaleString()}`, dataStack, fontStyle); + dataStack.addSpacer(); + + const dotStack = dataStack.addStack(); + this.createDot(dotStack, data.radio > 0 ? '#7EEF8F' : '#ED86A5'); + + fontStyle.size = 12 * this.scale; + this.provideText( + data.radio > 0 ? ` +${data.radio}%` : ` -${Math.abs(data.radio)}%`, + dataStack, + fontStyle + ); + }; + + createRight = async (widget) => { + const rightStack = widget.addStack(); + rightStack.layoutVertically(); + this.createCell(rightStack, { + title: '上期费用', + num: this.dataSource.right.previousBill, + radio: this.dataSource.right.previousBillRate, + }); + rightStack.addSpacer(); + this.createCell(rightStack, { + title: '今年费用', + num: this.dataSource.right.thisYear, + radio: this.dataSource.right.thisYearRate, + }); + }; + + renderSmall = async (w) => { + w.setPadding(10, 10, 10, 10); + await this.createLeft(w); + return w; + }; + + renderMedium = async (w) => { + w.setPadding(10, 10, 10, 10); + const containerStack = w.addStack(); + containerStack.layoutHorizontally(); + await this.createLeft(containerStack); + containerStack.addSpacer(10); + await this.createRight(containerStack); + return w; + }; + + /** + * 渲染函数,函数名固定 + * 可以根据 this.widgetFamily 来判断小组件尺寸,以返回不同大小的内容 + */ + async render() { + await this.init(); + const widget = new ListWidget(); + widget.url = `com.wsgw.e.zsdl://platformapi/`; + await this.getWidgetBackgroundImage(widget); + if (this.widgetFamily === 'medium') { + return await this.renderMedium(widget); + } else if (this.widgetFamily === 'large') { + return await this.notSupport(widget); + } else { + return await this.renderSmall(widget); + } + } +} + +// @组件代码结束 +await Runing(Widget, '0', false); //远程开发环境 diff --git a/app.js b/app.js deleted file mode 100644 index f98514e..0000000 --- a/app.js +++ /dev/null @@ -1,139 +0,0 @@ -const fs = require("fs"); -const os = require("os"); -const path = require("path"); -const express = require("express"); -const child_process = require("child_process"); -const multer = require("multer"); -const bodyParser = require("body-parser"); - -const HTTP_PORT = 5566; -const WORK_DIR = path.dirname(__filename); -const SCRIPTS_DIR = path.join(WORK_DIR, "Scripts"); - -const app = express(); -const upload = multer({ - dest: os.tmpdir(), -}); -app.use(upload.any()); -app.use( - bodyParser.urlencoded({ - extended: false, - }) -); -app.use(bodyParser.json()); - -app.get("/ping", (req, res) => { - console.log("[-] ping.."); - setTimeout(() => { - res.send("pong").end(); - }, 1000); -}); - -let FILE_DATE = null; - -app.get("/sync", (req, res) => { - // console.log('[-] 等待同步到手机..') - const { name } = req.query; - - const WIDGET_FILE = path.join(SCRIPTS_DIR, name + ".js"); - if (!fs.existsSync(WIDGET_FILE)) return res.send("nofile").end(); - - setTimeout(() => { - // 判断文件时间 - const _time = fs.statSync(WIDGET_FILE).mtimeMs; - if (_time === FILE_DATE) { - res.send("no").end(); - return; - // return console.log("[!] 文件没有更改,不同步") - } - // 同步 - res.sendFile(WIDGET_FILE); - console.log("[+] 同步到手机完毕"); - FILE_DATE = _time; - }, 1000); -}); - -app.post("/sync", (req, res) => { - if (req.files.length !== 1) return res.send("no"); - console.log("[+] Scriptalbe App 已连接"); - const _file = req.files[0]; - const FILE_NAME = _file["originalname"] + ".js"; - const WIDGET_FILE = path.join(SCRIPTS_DIR, FILE_NAME); - fs.renameSync(_file["path"], WIDGET_FILE); - res.send("ok"); - console.log(`[*] 小组件源码(${_file["originalname"]})已同步,请打开编辑`); - FILE_DATE = fs.statSync(WIDGET_FILE).mtimeMs; - // 尝试打开 - let cmd = `code "${WIDGET_FILE}"`; - if (os.platform() === "win32") { - cmd = `cmd.exe /c ${cmd}`; - } else if (os.platform() === "linux") { - let shell = process.env["SHELL"]; - cmd = `${shell} -c ${cmd}`; - } else { - cmd = `"/Applications/Visual Studio Code.app/Contents/MacOS/Electron" "${WIDGET_FILE}"`; - } - child_process.execSync(cmd); -}); - -// 远程 console,调试中把调试输出内容传送到服务端控制台输出 -app.post("/console", (req, res) => { - const { t, data } = req.body; - const _time = new Date().toLocaleString().split(" ")[1]; - switch (t) { - case "warn": - console.warn( - `[console.warn / ${_time}]`, - typeof data === "string" ? data : "" - ); - if (typeof data === "object") console.warn(data); - break; - case "error": - console.error( - `[console.error / ${_time}]`, - typeof data === "string" ? data : "" - ); - if (typeof data === "object") console.error(data); - break; - default: - console.log( - `[console.log / ${_time}]`, - typeof data === "string" ? data : "" - ); - if (typeof data === "object") console.log(data); - } - res.send("ok"); -}); - -// 获取当前电脑IP -function getIPAdress() { - var interfaces = os.networkInterfaces(); - for (var devName in interfaces) { - var iface = interfaces[devName]; - for (var i = 0; i < iface.length; i++) { - var alias = iface[i]; - if ( - alias.family === "IPv4" && - alias.address !== "127.0.0.1" && - !alias.internal - ) { - return alias.address; - } - } - } -} - -const _ip = getIPAdress(); -const _host = `http://${_ip}:${HTTP_PORT}`; - -console.log("[*] 「小件件」开发服务运行中"); -console.log(`[-] 地址:${_host}`); -console.log( - `[-] 如果你的手机还没有配置开发环境,请手机 Safari 访问上述地址,查看引导` -); -console.log( - "[+] 如果你的手机已经安装好环境和小组件模板,请在 Scriptable 里点击小组件模板->远程开发,服务器地址输入:", - _ip -); -console.log("[*] 更多帮助:https://github.com/im3x/scriptables"); -app.listen(HTTP_PORT); diff --git a/birthdayCountDown/2Ya.jpg b/birthdayCountDown/2Ya.jpg new file mode 100644 index 0000000..19b31fc Binary files /dev/null and b/birthdayCountDown/2Ya.jpg differ diff --git a/birthdayCountDown/index.js b/birthdayCountDown/index.js index e80a4b3..de35e94 100644 --- a/birthdayCountDown/index.js +++ b/birthdayCountDown/index.js @@ -344,7 +344,7 @@ class YaYaBirthday extends Calendar { widget.setPadding(0, 10, 0, 10); await this.setHeader( widget, - "https://raw.githubusercontent.com/Orz-3/task/master/birthday.png", + "https://raw.githubusercontent.com/Orz-3/mini/master/Color/birthday.png", "破壳日🎂" ); let body = await this.getEnableLeft(widget); diff --git a/extra_install.json b/extra_install.json new file mode 100644 index 0000000..03231c7 --- /dev/null +++ b/extra_install.json @@ -0,0 +1,60 @@ +{ + "author": "YaYa推荐", + "scriptable": true, + "icon": "https://avatars3.githubusercontent.com/u/23498579?s=460&u=1e87605e4abc4e6ecf3edd8b1d730227f54db4d4&v=4", + "repo": "https://github.com/dompling/Scriptable", + "apps": [ + { + "version": "1.0.0", + "author": "KeiKinn", + "description": "透明贴纸,随机换磁贴图片", + "scriptURL": "https://raw.githubusercontent.com/KeiKinn/StickerOnScreen/main/src/StickerOnScreen.js", + "thumb": "https://img.icons8.com/clouds/344/apple-app-store.png", + "name": "StickerOnScreen", + "title": "透明贴纸", + "html": [ + "作者:@KeiKinn>" + ], + "images": [ + "https://raw.githubusercontent.com/KeiKinn/StickerOnScreen/main/img/IMG_3804.JPEG" + ] + }, + { + "version": "1.0.0", + "author": "@Michael Lee", + "description": "根据脚本注释,自行填写 API, 和频道ID", + "scriptURL": "https://raw.githubusercontent.com/zc-nju-med/own_JS/master/YouTube%20Plus.js", + "thumb": "https://www.gstatic.com/youtube/img/branding/favicon/favicon_144x144.png", + "name": "YouTubePlus", + "title": "油管订阅", + "html": [ + "作者:@Michael Lee
", + "Michael Lee 大佬博客里一篇文章详细的描述了关于这个小组件开发和使用,有一定英语水平的大佬可以自行摸索,了解了解代码
", + "博客:iOS Scriptable YouTube widget
", + "谷歌的 API KEY 需要自行申请,地址:YouTube DataAPI
" + ] + }, + { + "version": "1.0.0", + "author": "@Unknown", + "description": "根据脚本注释自行使用", + "scriptURL": "https://raw.githubusercontent.com/zc-nju-med/own_JS/master/NBA.js", + "thumb": "https://img.icons8.com/nolan/344/basketball.png", + "name": "NBA", + "title": "NBA", + "html": ["
喜欢篮球的,可以看看
"] + }, + { + "version": "1.0.0", + "author": "@三行", + "description": "根据脚本注释自行使用", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/webo.js", + "thumb": "https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2225458401,2104443747&fm=26&gp=0.jpg", + "name": "Webo", + "title": "微博热搜", + "html": [ + "修改自三行大佬的脚本@三行
" + ] + } + ] +} diff --git a/historyToDay/README.md b/historyToDay/README.md deleted file mode 100644 index f59c3e1..0000000 --- a/historyToDay/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# 历史上的今天 - - - -> 项目地址:[https://github.com/dompling/Scriptable/tree/master/historyToday](https://github.com/dompling/Scriptable/tree/master/historyToday) - -## 特别感谢 - -1. [@GideonSenku](https://github.com/GideonSenku) 提供帮助 diff --git a/historyToDay/historyToday.gif b/historyToDay/historyToday.gif deleted file mode 100644 index 313b528..0000000 Binary files a/historyToDay/historyToday.gif and /dev/null differ diff --git a/historyToDay/index.js b/historyToDay/index.js deleted file mode 100644 index b47f68e..0000000 --- a/historyToDay/index.js +++ /dev/null @@ -1,298 +0,0 @@ -// Variables used by Scriptable. -// These must be at the very top of the file. Do not edit. -// icon-color: teal; icon-glyph: map-pin; - -/* - * Author: 2Ya - * Github: https://github.com/dompling - * 本脚本使用了@Gideon_Senku的Env - */ - -const $ = importModule("Env"); - -const blurBackground = true; // 开启背景虚化 true 值类型布尔或数字 ,默认 0.7 取值范围 0 至 1 -const imageBackground = true; // 设置配置背景图片 -const forceImageUpdate = false; // 设置为true将重置小部件的背景图像 -const cacheBackgroundName = "historyDay-image"; // 缓存背景图片名字 - -const textFormat = { - // Set the default font and color. - defaultText: { size: 14, color: "ffffff", font: "regular" }, // 默认字体颜色 - light: { size: 14, color: "D0D3D4", font: "light" }, // 夜间字体颜色 - title: { size: 16, color: "ff651a", font: "semibold" }, - hot: { size: 20, color: "ffffff", font: "semibold" }, - more: { size: 14, color: "ffffff", font: "regular" }, -}; - -// 设置widget 背景色 -const skinColor = { - defaultColor: { - color: [new Color("#a18cd1"), new Color("#fbc2eb")], - position: [0.0, 1.0], - }, - night: { - color: [new Color("#030079"), new Color("#000000")], - position: [0.0, 1.0], - }, -}; - -// 设置单行内容背景色 -const cellBgColor = { - color: [new Color("#aaa")], - position: [1.0], -}; - -const imgUri = "http://img.lssdjt.com"; -const date = new Date(); -let month = date.getMonth() + 1; -month = month >= 10 ? month : `0${month}`; -let day = date.getDate(); -class YaYaHistory { - constructor(widgetParameter) { - this.start = parseInt(widgetParameter) > 0 ? widgetParameter : 0; - this.size = this.start > 0 ? 9 : 3; - this.widgetSize = config.runsInWidget ? config.widgetFamily : "large"; - this.mode = Device.isUsingDarkAppearance(); - this.textFormat = this.mode ? textFormat.light : textFormat.defaultText; - this.dataSource = []; - if (blurBackground) { - if (typeof blurBackground === "number") { - this.backgroundOpacity = blurBackground; - } else { - this.backgroundOpacity = this.mode ? 0.7 : 0.4; - } - } - } - - init = async () => { - // const url = `https://api.nowtime.cc/v1/today_in_history`; - const url = `http://code.lssdjt.com/jsondata/history.${month}.${day}.js`; - const response = await $.get({ url }); - this.dataSource = response.d; - }; - - // 给图片加透明遮罩 - setShadowImage = async (img, opacity) => { - if (!opacity) return img; - let ctx = new DrawContext(); - // 获取图片的尺寸 - ctx.size = img.size; - - ctx.drawImageInRect( - img, - new Rect(0, 0, img.size["width"], img.size["height"]) - ); - ctx.setFillColor(new Color("#000000", opacity)); - ctx.fillRect(new Rect(0, 0, img.size["width"], img.size["height"])); - - let res = await ctx.getImage(); - return res; - }; - - setWidgetBackGround = async (widget) => { - if (imageBackground) { - const files = FileManager.local(); - const path = files.joinPath( - files.documentsDirectory(), - cacheBackgroundName - ); - const exists = files.fileExists(path); - if (exists && (config.runsInWidget || !forceImageUpdate)) { - const image = files.readImage(path); - widget.backgroundImage = await this.setShadowImage( - image, - this.backgroundOpacity - ); - } else if (!exists && config.runsInWidget) { - widget.backgroundColor = Color.gray(); - } else { - const img = await Photos.fromLibrary(); - widget.backgroundImage = await this.setShadowImage( - img, - this.backgroundOpacity - ); - files.writeImage(path, img); - } - } else { - let gradient = new LinearGradient(); - let gradientSettings = this.mode - ? skinColor.night - : skinColor.defaultColor; - gradient.colors = gradientSettings.color(); - gradient.locations = gradientSettings.position(); - widget.backgroundGradient = gradient; - } - return widget; - }; - - // Draw the vertical line in the tomorrow view. - drawVerticalLine(color, height) { - const width = 2; - - let draw = new DrawContext(); - draw.opaque = false; - draw.respectScreenScale = true; - draw.size = new Size(width, height); - - let barPath = new Path(); - // const barHeight = height; - barPath.addRoundedRect( - new Rect(0, 0, height, height), - width / 2, - width / 2 - ); - draw.addPath(barPath); - draw.setFillColor(color); - draw.fillPath(); - return draw.getImage(); - } - - setHeader = async (widget) => { - const headerBody = widget.addStack(); - headerBody.centerAlignContent(); - // 左边内容 - const headerLeft = headerBody.addStack(); - const icon = - "https://raw.githubusercontent.com/Orz-3/task/master/historyToday.png"; - const title = "历史上的今天"; - let _icon = headerLeft.addImage(await this.fetchImg(icon)); - _icon.imageSize = new Size(14, 16); - _icon.cornerRadius = 4; - headerLeft.addSpacer(5); - $.provideText(title, headerLeft, textFormat.title); - headerBody.addSpacer(170); - // 右边更多 - const headerRight = headerBody.addStack(); - headerRight.url = `https://m.8684.cn/today_d${month}${day}`; - headerRight.setPadding(1, 10, 1, 10); - headerRight.cornerRadius = 10; - headerRight.backgroundColor = new Color("#fff", 0.5); - - $.provideText("更多", headerRight, textFormat.more); - - widget.addSpacer(10); - return widget; - }; - - setCell = async ( - text, - cell, - prefixColor = "fff", - format = this.textFormat - ) => { - if (prefixColor) { - let tomorrowLine = cell.addImage( - this.drawVerticalLine(new Color(prefixColor, 0.8), 12) - ); - tomorrowLine.imageSize = new Size(3, 28); - } - cell.addSpacer(5); - $.provideText(text, cell, format); - cell.addSpacer(2); - }; - - randomHexColor() { - var hex = Math.floor(Math.random() * 16777216).toString(16); //生成ffffff以内16进制数 - while (hex.length < 6) { - //while循环判断hex位数,少于6位前面加0凑够6位 - hex = "0" + hex; - } - return hex; //返回‘#’开头16进制颜色 - } - - setWidget = async (widget, start = 0, number) => { - await this.setHeader(widget); - if (this.dataSource.length) { - const data = this.dataSource.splice(start, number); - data.forEach((item) => { - let dom = widget.addStack(); - dom.url = `https://www.lssdjt.com/d/${item.f}.htm`; - dom.centerAlignContent(); - dom.cornerRadius = 5; - let prefixColor = this.randomHexColor(); - this.setCell(`${item.t}`, dom, prefixColor); - widget.addSpacer(5); - }); - } - return widget; - }; - - fetchImg = async (url) => { - const response = new Request(url); - return await response.loadImage(); - }; - - renderErrorWidget = (widget) => { - widget.addText("暂不支持该尺寸组件"); - return widget; - }; - - renderSmall = async (widget) => { - return await this.setWidget(widget, this.start, 1); - }; - - renderMedium = async (widget) => { - await this.setWidget(widget, this.start, 3); - return widget; - }; - - renderLarge = async (widget) => { - if (this.start === 0) { - const topItem = - this.dataSource.find((item) => item.g === 1) || - this.dataSource.find((item) => item.j !== ""); - const hotBody = widget.addStack(); - hotBody.setPadding(10, 10, 10, 10); - hotBody.url = `https://www.lssdjt.com/d/${topItem.f}.htm`; - hotBody.centerAlignContent(); - hotBody.size = new Size(340, 200); - hotBody.borderWidth = 15; - hotBody.borderColor = new Color("#fff"); - hotBody.cornerRadius = 20; - const hotImg = await this.fetchImg(`${imgUri}/${topItem.j}`); - hotBody.backgroundImage = await this.setShadowImage( - hotImg, - this.backgroundOpacity - ); - this.setCell(`${topItem.t}`, hotBody, false, textFormat.hot); - hotBody.addSpacer(10); - widget.addSpacer(10); - } - await this.setWidget(widget, this.start, this.size); - return widget; - }; - - render = async () => { - const widget = new ListWidget(); - widget.setPadding(10, 10, 10, 10); - let w = await this.setWidgetBackGround(widget); - switch (this.widgetSize) { - case "small": { - w = await this.renderSmall(w); - w.presentSmall(); - break; - } - case "medium": { - w = await this.renderMedium(w); - w.presentMedium(); - break; - } - case "large": { - w = await this.renderLarge(w); - w.presentLarge(); - break; - } - default: { - w = await this.renderErrorWidget(w); - w.presentSmall(); - break; - } - } - Script.setWidget(w); - Script.complete(); - }; -} - -const _2YaHistory = new YaYaHistory(args.widgetParameter); -await _2YaHistory.init(); // 初始化数据 -await _2YaHistory.render(); // 加载widget diff --git a/images/count.png b/images/count.png new file mode 100644 index 0000000..919c7fb Binary files /dev/null and b/images/count.png differ diff --git a/images/ftms.png b/images/ftms.png new file mode 100644 index 0000000..59c4bfe Binary files /dev/null and b/images/ftms.png differ diff --git a/images/gas-night.png b/images/gas-night.png new file mode 100644 index 0000000..74f0508 Binary files /dev/null and b/images/gas-night.png differ diff --git a/images/jdk.jpg b/images/jdk.jpg new file mode 100644 index 0000000..e869613 Binary files /dev/null and b/images/jdk.jpg differ diff --git a/images/large.png b/images/large.png new file mode 100644 index 0000000..31eba02 Binary files /dev/null and b/images/large.png differ diff --git a/images/medium.png b/images/medium.png new file mode 100644 index 0000000..c336dca Binary files /dev/null and b/images/medium.png differ diff --git a/images/more.png b/images/more.png new file mode 100644 index 0000000..e1e36cb Binary files /dev/null and b/images/more.png differ diff --git a/images/small.png b/images/small.png new file mode 100644 index 0000000..b2fe824 Binary files /dev/null and b/images/small.png differ diff --git a/install.json b/install.json index c4cc432..a8b7d63 100644 --- a/install.json +++ b/install.json @@ -1,97 +1,542 @@ { - "author": "@DomplingYaYa", + "author": "DomplingYaYa", + "scriptable": true, "icon": "https://avatars3.githubusercontent.com/u/23498579?s=460&u=1e87605e4abc4e6ecf3edd8b1d730227f54db4d4&v=4", - "repo": "https://github.com/dompling/Script", + "repo": "https://github.com/dompling/Scriptable", "apps": [ { - "version": "1.0.0", - "description": "一键安装所有包", - "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/2YaInstall.js", - "thumb": "https://avatars0.githubusercontent.com/u/23498579?s=60&v=4", - "name": "2YaInstall", - "title": "一键安装所有包" - }, - { - "version": "1.0.0", + "version": "1.1.2", "description": "DmYY组件库", "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/DmYY.js", - "thumb": "https://avatars0.githubusercontent.com/u/23498579?s=60&v=4", + "thumb": "https://img.icons8.com/clouds/344/settings.png", "name": "DmYY", - "title": "DmYY" + "title": "DmYY", + "html": [ + "更新说明
", + "v1.1.2", + "fix: 输入默认值问题 ", + "v1.1.1", + "feat: DmYY 判断有无 actions ", + "v1.1.0", + "修复 boxjs 读取问题 ", + "v1.0.8", + "兼容 ios15 系统,图标引起脚本一直转圈问题 ", + "v1.0.7", + "处理背景图在 12mini 下错位的情况 ", + "v1.0.6", + "优化菜单,增加菜单图标 ", + "v1.0.5", + "修改调整菜单更多图标 ", + "预览关闭菜单功能 ", + "
", + "历史版本
", + "可视化界面版本 " + ] }, { "version": "1.0.0", - "description": "依赖DmYY,根据代理软件获取到京东 CK ,或者自行输入。显示京东最近的未确认收货的订单和信息。", + "description": "根据代理软件获取到京东 CK ,或者自行输入。显示京东最近的未确认收货的订单和信息。组件使用,参考下方京东豆走势视频", "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/JDWuLiu.js", - "thumb": "https://raw.githubusercontent.com/Orz-3/task/master/jd.png", + "thumb": "https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png", "name": "JDWuLiu", "homepage": "https://github.com/dompling/Scriptable/blob/master/JDWuLiu/README.md", - "title": "京东物流" + "title": "京东物流", + "html": [ + "京东组件教程
", + "" + ], + "depend": [ + { + "name": "DmYY", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/DmYY.js" + } + ] }, { "version": "1.0.0", - "description": "依赖DmYY,根据代理软件获取到京东 CK ,或者自行输入。显示京东最近的京豆收支。", - "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/JDDou.js", - "thumb": "https://raw.githubusercontent.com/Orz-3/task/master/jd.png", + "description": "根据代理软件获取到京东 CK ,或者自行输入。显示京豆总量,和昨日收支情况。组件使用,参考下方京东豆走势视频", + "scriptURL": "https://raw.githubusercontent.com/dompling/scriptableTsx/master/scripts/JDDou.js", + "thumb": "https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png", "name": "JDDou", "homepage": "https://github.com/dompling/Scriptable/blob/master/JDDou/README.md", - "title": "京东豆" + "title": "京东豆", + "html": [ + "京东组件教程
", + "" + ], + "depend": [ + { + "name": "DmYY", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/DmYY.js" + } + ] }, { "version": "1.0.0", - "description": "依赖DmYY,根据代理软件获取到京东 CK ,或者自行输入。显示京东最近的京豆收支。", + "description": "根据代理软件获取到京东 CK ,或者自行输入。显示京东最近的京豆收支。组件使用,参考下方视频", "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/JDDouK.js", - "thumb": "https://raw.githubusercontent.com/Orz-3/task/master/jd.png", - "name": "JDDou", - "title": "京东豆走势" + "thumb": "https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png", + "name": "JDDouK", + "title": "京东豆走势", + "html": [ + "京东组件教程
", + "" + ], + "images": [ + "https://raw.githubusercontent.com/dompling/Scriptable/master/images/jdk.jpg" + ], + "depend": [ + { + "name": "DmYY", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/DmYY.js" + } + ] }, { - "version": "1.0.0", - "description": "依赖DmYY", - "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/BiliBili.js", - "thumb": "https://raw.githubusercontent.com/Orz-3/task/master/bilibili.png", + "version": "1.0.1", + "description": "哔哩哔哩今日的推送番剧情况", + "scriptURL": "https://raw.githubusercontent.com/dompling/scriptableTsx/master/scripts/BiliBili.js", + "thumb": "https://raw.githubusercontent.com/Orz-3/mini/master/Color/bilibili.png", "name": "BiliBili", - "title": "哔哩哔哩今日番剧" + "title": "今日番剧", + "depend": [ + { + "name": "DmYY", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/DmYY.js" + } + ] }, { "version": "1.0.0", - "description": "依赖DmYY", + "description": "哔哩哔哩关注中心的最近更新", "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/BiliBiliWatch.js", - "thumb": "https://raw.githubusercontent.com/Orz-3/task/master/bilibili.png", + "thumb": "https://raw.githubusercontent.com/Orz-3/mini/master/Color/bilibili.png", "name": "BiliBiliWatch", - "title": "哔哩哔哩关注中心" + "title": "关注中心", + "depend": [ + { + "name": "DmYY", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/DmYY.js" + } + ] + }, + { + "version": "1.0.0", + "description": "哔哩哔哩Up主订阅控件的视频信息等", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/BiliBiliUp.js", + "thumb": "https://raw.githubusercontent.com/Orz-3/mini/master/Color/bilibili.png", + "name": "BiliBiliUp", + "title": "哔哩UP主", + "depend": [ + { + "name": "DmYY", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/DmYY.js" + } + ] }, { "version": "1.0.0", - "description": "依赖DmYY,Canlendar", - "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/Canlendar.js", - "thumb": "https://avatars0.githubusercontent.com/u/23498579?s=60&v=4", - "name": "Canlendar", - "title": "日历函数" + "description": "日历函数插件,组件的依赖包", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/Calendar.js", + "thumb": "https://img.icons8.com/clouds/344/edit-calendar.png", + "name": "Calendar", + "title": "日历函数", + "depend": [ + { + "name": "DmYY", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/DmYY.js" + } + ] }, { "version": "1.0.0", - "description": "依赖DmYY,Canlendar", + "description": "生日的信息和倒计时", "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/Birthday.js", - "thumb": "https://raw.githubusercontent.com/Orz-3/task/master/birthday.png", + "thumb": "https://raw.githubusercontent.com/Orz-3/mini/master/Color/birthday.png", "name": "Birthday", - "title": "破壳日" + "title": "破壳日", + "depend": [ + { + "name": "DmYY", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/DmYY.js" + }, + { + "name": "Calendar", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/Calendar.js" + } + ] }, { - "version": "1.0.0", - "description": "依赖DmYY", - "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/HistoryDay.js", - "thumb": "https://raw.githubusercontent.com/Orz-3/task/master/historyToday.png", - "name": "HistoryDay", - "title": "历史上的今天" + "version": "1.0.2", + "description": "显示历史上的今日带图片情况", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/HistoryToday.js", + "thumb": "https://raw.githubusercontent.com/Orz-3/mini/master/Color/historyToday.png", + "name": "HistoryToday", + "title": "历史上的今天", + "depend": [ + { + "name": "DmYY", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/DmYY.js" + } + ] }, { "version": "1.0.0", - "description": "依赖DmYY", + "description": "智行火车票的出行提醒,需要手动的去智行火车的待出行列表使用重写获取待出行数据", "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/ZXTrains.js", - "thumb": "https://raw.githubusercontent.com/Orz-3/task/master/zxhc.png", + "thumb": "https://raw.githubusercontent.com/Orz-3/mini/master/Color/zxhc.png", "name": "ZXTrains", - "title": "智行火车票提醒" + "title": "车票提醒", + "depend": [ + { + "name": "DmYY", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/DmYY.js" + } + ] + }, + { + "version": "1.0.0", + "description": "根据快捷指令,可以获取到相关的健康数据,然后使用本组件可以查询最近的步行跑步的数据", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/Health.js", + "thumb": "https://img.icons8.com/clouds/344/apple-health.png", + "name": "Health", + "title": "健康步数", + "depend": [ + { + "name": "DmYY", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/DmYY.js" + } + ] + }, + { + "version": "1.0.0", + "description": "在文本框里面输入电话簿中的联系人,可以在桌面显示联系人信息,可以进行电话拨号等", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/Contact.js", + "thumb": "https://img.icons8.com/clouds/344/apple-contacts.png", + "name": "Contact", + "title": "桌面联系人", + "depend": [ + { + "name": "DmYY", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/DmYY.js" + } + ] + }, + { + "version": "1.0.0", + "description": "在文本框里面输入电报频道的信息,可以显示订阅的人数等信息", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/Telegram.js", + "thumb": "https://img.icons8.com/clouds/344/telegram-app.png", + "name": "Telegram", + "title": "Telegram", + "depend": [ + { + "name": "DmYY", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/DmYY.js" + } + ] + }, + { + "version": "1.0.0", + "description": "在文本框里面输入YouTube 作者的信息,可以展示作者的粉丝数,视频信息等", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/YouTube.js", + "thumb": "https://img.icons8.com/clouds/2x/youtube.png", + "name": "YouTube", + "title": "YouTube", + "html": [ + "组件教程
", + "" + ], + "depend": [ + { + "name": "DmYY", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/DmYY.js" + } + ] + }, + { + "version": "1.0.0", + "description": "显示中国电信的手机号的套餐信息,可以在 app 里面登录,登录成功之后可以展示信息,也可以使用代理缓存读取 boxjs 的账号信息", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/ChinaTelecom.js", + "thumb": "https://raw.githubusercontent.com/Orz-3/mini/master/Color/10000.png", + "name": "ChinaTelecom", + "title": "中国电信", + "html": [ + "组件教程
", + "" + ], + "depend": [ + { + "name": "DmYY", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/DmYY.js" + } + ] + }, + { + "version": "1.0.0", + "description": "显示移动的套餐信息,目前暂不支持登录,请自行使用代理软件抓取数据信息。推荐使用 boxjs 代理缓存", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/ChinaMobile.js", + "thumb": "https://raw.githubusercontent.com/Orz-3/mini/master/Color/10086.png", + "name": "ChinaMobile", + "title": "中国移动", + "depend": [ + { + "name": "DmYY", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/DmYY.js" + }, + { + "name": "crypto-js", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/crypto-js.min.js" + } + ] + }, + { + "version": "1.0.0", + "description": "显示联通的套餐信息,目前暂不支持登录,请自行使用代理软件抓取数据信息。推荐使用 boxjs 代理缓存", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/ChinaUnicom.js", + "thumb": "https://raw.githubusercontent.com/Orz-3/mini/master/Color/10010.png", + "name": "ChinaUnicom", + "title": "中国联通", + "depend": [ + { + "name": "DmYY", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/DmYY.js" + } + ] + }, + { + "version": "1.0.0", + "description": "Vpn 折线图面板,带签到功能。支持的机场 url 地址:https://**/auth/login", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/VpnBoard.js", + "thumb": "https://img.icons8.com/clouds/344/paper-plane-message-1.png", + "name": "VPNBoard", + "title": "VPN面板", + "html": [ + "机场模板要求
", + "登陆地址如下:https://***/auth/login , 以/auth/login 结尾的地址则符合要求
" + ], + "depend": [ + { + "name": "DmYY", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/DmYY.js" + } + ] + }, + { + "version": "1.0.0", + "description": "Vpn 圆形进度条,带签到功能。 url 地址:https://**/auth/login", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/VPNBoardPress.js", + "thumb": "https://img.icons8.com/clouds/344/paper-plane-message-1.png", + "name": "VPNBoardPress", + "title": "VPN圆形", + "html": [ + "机场模板要求
", + "登陆地址如下:https://***/auth/login , 以/auth/login 结尾的地址则符合要求
" + ], + "depend": [ + { + "name": "DmYY", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/DmYY.js" + } + ] + }, + { + "version": "1.0.1", + "description": "VPN 圆形进度条,vpn 的订阅地址返回的信息中需要有带各种流量的使用情况的订阅地址", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/VPNSubscription.js", + "thumb": "https://img.icons8.com/clouds/344/paper-plane-message-1.png", + "name": "VPNSubscription", + "title": "VPN订阅", + "html": [ + "机场模板要求
", + "PC:订阅链接
", + "打开订阅链接 ", + "电脑端使用 F12 打开调试控制台,找到NetWork ", + "找到订阅地址的请求 ", + "如果 response里面含有subscription-userinfo的关键字则满足条件 ", + "
", + "Mobile:
", + "操作方式类似 PC 登陆地址的查看步骤 " + ], + "depend": [ + { + "name": "DmYY", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/DmYY.js" + } + ] + }, + { + "version": "1.0.0", + "description": "VPN 圆形进度条,vpn 登陆地址必须是 https://****/api/v1/passport/auth/login", + "scriptURL": "https://raw.githubusercontent.com/dompling/scriptableTsx/master/scripts/VPNV2Bord.js", + "thumb": "https://img.icons8.com/clouds/344/paper-plane-message-1.png", + "name": "VPNV2Board", + "title": "V2模板", + "html": [ + "VPN 小组件教学
", + "", + "机场模板要求
", + "登陆地址如下:https://xn--mesr8b36x.net/#/login , 以/#/login 结尾的地址则符合要求
", + "PC登陆地址接口:
", + "输入账号密码(错误的账号密码即可)点击登陆 ", + "电脑端使用 F12 打开调试控制台,找到NetWork ", + "找到 login 接口:https://*****/api/v1/passport/auth/login ", + "在 scriptable中的登陆地址输入/api/v1/passport/auth/login前面的那段地址 ", + "
", + "Mobile登陆地址接口:
", + "请自行使用代理软件查看搜索即可,操作方式类似 PC 登陆地址的查看步骤 " + ], + "depend": [ + { + "name": "DmYY", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/DmYY.js" + } + ] + }, + { + "version": "1.0.0", + "description": "毒汤日历,每天一杯毒鸡汤,扎心不怕百年享。", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/PoisonCalendar.js", + "thumb": "https://img.icons8.com/clouds/344/google-calendar.png", + "name": "PoisonCalendar", + "title": "毒汤日历", + "depend": [ + { + "name": "DmYY", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/DmYY.js" + }, + { + "name": "Calendar", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/Calendar.js" + } + ] + }, + { + "version": "1.0.0", + "description": "毒汤日历纯文字版,无需抓包信息", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/PoisonCalendarText.js", + "thumb": "https://img.icons8.com/clouds/344/google-calendar.png", + "name": "PoisonCalendarText", + "title": "毒汤纯文字", + "depend": [ + { + "name": "DmYY", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/DmYY.js" + } + ] + }, + { + "version": "1.0.1", + "description": "获取当前省份油价", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/Oild.js", + "thumb": "https://img.icons8.com/clouds/344/engine-oil-level.png", + "name": "TodayOilPrice", + "title": "今日油价", + "depend": [ + { + "name": "DmYY", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/DmYY.js" + } + ], + "html": [ + "今日油价
", + "1.0.1
", + "增加自动定位设置
", + "增加省份选择
" + ] + }, + { + "version": "1.0.0", + "description": "根据定位信息,显示本地区的新冠病毒的数据情况,可能有数据更新不及时的情况", + "scriptURL": "https://raw.githubusercontent.com/dompling/scriptableTsx/master/scripts/COVID-19.js", + "thumb": "https://img.icons8.com/clouds/344/coronavirus.png", + "name": "COVID-19", + "title": "疫情日报", + "depend": [ + { + "name": "DmYY", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/DmYY.js" + } + ] + }, + { + "version": "1.0.1", + "description": "显示公历和农历,根据近期的信息会出现一个倒计时的提示信息", + "scriptURL": "https://raw.githubusercontent.com/dompling/scriptableTsx/master/scripts/CountDown.js", + "thumb": "https://raw.githubusercontent.com/Orz-3/mini/master/Color/daysmatter.png", + "name": "CountDownCalendar", + "title": "日历倒计时", + "html": [ + "更新说明
", + "v1.0.1", + "调整大尺寸排列效果 ", + "调整下班倒计时默认不开启 " + ], + "depend": [ + { + "name": "DmYY", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/DmYY.js" + } + ] + }, + { + "version": "1.0.0", + "description": "交管 12123 违章和扣分查询", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/12123.js", + "thumb": "https://is5-ssl.mzstatic.com/image/thumb/Purple112/v4/a7/a1/61/a7a16170-e644-079e-a362-9eb273becf9d/AppIcon-1x_U007emarketing-0-4-0-0-85-220.png/492x0w.webp", + "name": "12123", + "title": "交管 12123", + "html": [ + "Token获取说明
", + "获取Token重写:Surge 12123重写模块 ", + "使用方法:配置重写规则,手动运行小组件,按提示跳转到 支付宝12123小程序 登录即可自动抓取/更新Token。 ", + "使用前,请确保您的代理APP已配置好BoxJs重写,BoxJs配置方法:BoxJS教程 " + ], + "depend": [ + { + "name": "DmYY", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/DmYY.js" + } + ] + }, + { + "version": "1.0.0", + "description": "币种涨幅", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/PriceWidgets.js", + "thumb": "https://assets.coingecko.com/coins/images/1/large/bitcoin.png", + "name": "PriceWidgets", + "title": "网络货币", + "html": [ + "迁移自JSBox脚本
", + "原项目:wuzeyou/PriceWidgets ", + "特别感谢大佬:@Jackie Xiang " + ], + "depend": [ + { + "name": "DmYY", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/DmYY.js" + } + ] + }, + { + "version": "1.0.2", + "description": "网上国网", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/wsgw.js", + "thumb": "https://is1-ssl.mzstatic.com/image/thumb/Purple116/v4/83/d8/8a/83d88a92-5a4d-7a2f-118c-80d795e7a9f6/AppIcon-0-0-1x_U007emarketing-0-5-0-0-sRGB-85-220.png/144x144.png", + "name": "wsgw", + "title": "网上国网", + "html": [ + "网上国网
", + "1.填写账号密码BoxJS订阅 ", + "2.参考借用【@小白脸】大佬的重写和【@Yuheng0101】大佬的脚本 ", + "3.Surge 添加远程重写模块【网上国网重写】、其他的请自行使用 https://script.hub 转换 " + ], + "depend": [ + { + "name": "DmYY", + "scriptURL": "https://raw.githubusercontent.com/dompling/Scriptable/master/Scripts/DmYY.js" + } + ] } ] } diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 9cdcb2a..0000000 --- a/package-lock.json +++ /dev/null @@ -1,836 +0,0 @@ -{ - "name": "scriptable", - "version": "1.0.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@types/scriptable-ios": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@types/scriptable-ios/-/scriptable-ios-1.6.0.tgz", - "integrity": "sha512-zVZkVpDZYQTUE6nx/fHOl0u6Q06UCMNyIItOTaWZOJgEZlczEp3kkMOgKbjKKDuLYt07i0n523gb3Mjny+N4Gg==" - }, - "accepts": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", - "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", - "requires": { - "mime-types": "~2.1.24", - "negotiator": "0.6.2" - } - }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "append-field": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/append-field/-/append-field-1.0.0.tgz", - "integrity": "sha1-HjRA6RXwsSA9I3SOeO3XubW0PlY=" - }, - "array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" - }, - "asn1": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" - }, - "aws4": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", - "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "body-parser": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", - "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", - "requires": { - "bytes": "3.1.0", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "1.7.2", - "iconv-lite": "0.4.24", - "on-finished": "~2.3.0", - "qs": "6.7.0", - "raw-body": "2.4.0", - "type-is": "~1.6.17" - } - }, - "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" - }, - "busboy": { - "version": "0.2.14", - "resolved": "https://registry.npmjs.org/busboy/-/busboy-0.2.14.tgz", - "integrity": "sha1-bCpiLvz0fFe7vh4qnDetNseSVFM=", - "requires": { - "dicer": "0.2.5", - "readable-stream": "1.1.x" - } - }, - "bytes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", - "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" - }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "content-disposition": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", - "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", - "requires": { - "safe-buffer": "5.1.2" - } - }, - "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" - }, - "cookie": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", - "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" - }, - "cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "requires": { - "assert-plus": "^1.0.0" - } - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" - }, - "depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" - }, - "destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" - }, - "dicer": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/dicer/-/dicer-0.2.5.tgz", - "integrity": "sha1-WZbAhrszIYyBLAkL3cCc0S+stw8=", - "requires": { - "readable-stream": "1.1.x", - "streamsearch": "0.1.2" - } - }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" - }, - "encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" - }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" - }, - "etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" - }, - "express": { - "version": "4.17.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", - "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", - "requires": { - "accepts": "~1.3.7", - "array-flatten": "1.1.1", - "body-parser": "1.19.0", - "content-disposition": "0.5.3", - "content-type": "~1.0.4", - "cookie": "0.4.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "~1.1.2", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "~1.1.2", - "fresh": "0.5.2", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.5", - "qs": "6.7.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.1.2", - "send": "0.17.1", - "serve-static": "1.14.1", - "setprototypeof": "1.1.1", - "statuses": "~1.5.0", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - } - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" - }, - "finalhandler": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", - "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "statuses": "~1.5.0", - "unpipe": "~1.0.0" - } - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" - }, - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - }, - "forwarded": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", - "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" - }, - "fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "requires": { - "assert-plus": "^1.0.0" - } - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" - }, - "har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "requires": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" - } - }, - "http-errors": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", - "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", - "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.1", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.0" - } - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" - }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" - }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" - }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - } - }, - "media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" - }, - "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" - }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" - }, - "mime-db": { - "version": "1.44.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", - "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" - }, - "mime-types": { - "version": "2.1.27", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", - "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", - "requires": { - "mime-db": "1.44.0" - } - }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" - }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "requires": { - "minimist": "^1.2.5" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "multer": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/multer/-/multer-1.4.2.tgz", - "integrity": "sha512-xY8pX7V+ybyUpbYMxtjM9KAiD9ixtg5/JkeKUTD6xilfDv0vzzOFcCp4Ljb1UU3tSOM3VTZtKo63OmzOrGi3Cg==", - "requires": { - "append-field": "^1.0.0", - "busboy": "^0.2.11", - "concat-stream": "^1.5.2", - "mkdirp": "^0.5.1", - "object-assign": "^4.1.1", - "on-finished": "^2.3.0", - "type-is": "^1.6.4", - "xtend": "^4.0.0" - } - }, - "negotiator": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", - "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" - }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" - }, - "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", - "requires": { - "ee-first": "1.1.1" - } - }, - "parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" - }, - "path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" - }, - "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" - }, - "proxy-addr": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", - "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==", - "requires": { - "forwarded": "~0.1.2", - "ipaddr.js": "1.9.1" - } - }, - "psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" - }, - "qs": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" - }, - "range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" - }, - "raw-body": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", - "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", - "requires": { - "bytes": "3.1.0", - "http-errors": "1.7.2", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - } - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - }, - "dependencies": { - "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" - } - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "send": { - "version": "0.17.1", - "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", - "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", - "requires": { - "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "~1.7.2", - "mime": "1.6.0", - "ms": "2.1.1", - "on-finished": "~2.3.0", - "range-parser": "~1.2.1", - "statuses": "~1.5.0" - }, - "dependencies": { - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" - } - } - }, - "serve-static": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", - "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", - "requires": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.17.1" - } - }, - "setprototypeof": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", - "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" - }, - "sshpk": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", - "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - } - }, - "statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" - }, - "streamsearch": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-0.1.2.tgz", - "integrity": "sha1-gIudDlb8Jz2Am6VzOOkpkZoanxo=" - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" - }, - "toidentifier": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", - "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" - }, - "tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "requires": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - } - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" - }, - "type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "requires": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - } - }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" - }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" - }, - "uri-js": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.0.tgz", - "integrity": "sha512-B0yRTzYdUCCn9n+F4+Gh4yIDtMQcaJsmYBDsTSG8g/OejKBodLQ2IHfN3bM7jUsRXndopT7OIXWdYqc1fjmV6g==", - "requires": { - "punycode": "^2.1.0" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" - }, - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" - }, - "vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" - } - } -} diff --git a/package.json b/package.json index 7ba4242..7d7494d 100644 --- a/package.json +++ b/package.json @@ -1,27 +1,17 @@ { - "name": "scriptable", + "name": "scriptable-types", "version": "1.0.0", - "description": "> 将文件 [2YaInstall.scriptable](https://raw.githubusercontent.com/dompling/Scriptable/master/2YaInstall.scriptable) 导入到 scriptable 软件中,点击运行即可", - "repository": { - "type": "git", - "url": "git+https://github.com/dompling/Scriptable.git" - }, - "bugs": { - "url": "https://github.com/dompling/Scriptable/issues" - }, - "homepage": "https://github.com/dompling/Scriptable#readme", + "author": "2Ya", + "description": "", "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1", - "start": "node app" - }, - "author": "", + "keywords": [ + "scriptable", + "ios", + "widget" + ], "license": "ISC", - "dependencies": { - "@types/scriptable-ios": "^1.5.0", - "body-parser": "^1.19.0", - "express": "^4.17.1", - "multer": "^1.4.2", - "request": "^2.88.2" + "devDependencies": { + "@types/scriptable-ios": "^1.6.1", + "prettier": "^3.3.3" } } diff --git a/widget.Install.js b/widget.Install.js index 6b12033..95ae3fb 100644 --- a/widget.Install.js +++ b/widget.Install.js @@ -2,20 +2,11 @@ // These must be at the very top of the file. Do not edit. // icon-color: brown; icon-glyph: download; -const mainAlert = new Alert(); +// version:'1.0.0'; + const Files = FileManager.iCloud(); const RootPath = Files.documentsDirectory(); -const saveFile = async ({ moduleName, url }) => { - const header = `// Variables used by Scriptable. - // These must be at the very top of the file. Do not edit. - // icon-color: deep-gray; icon-glyph: file-code;\n`; - const req = new Request(url); - const content = await req.loadString(); - const fileHeader = content.includes("icon-color") ? `` : header; - write(`${moduleName}`, `${fileHeader}${content}`); -}; - const saveFileName = (fileName) => { const hasSuffix = fileName.lastIndexOf(".") + 1; return !hasSuffix ? `${fileName}.js` : fileName; @@ -23,11 +14,18 @@ const saveFileName = (fileName) => { const write = (fileName, content) => { let file = saveFileName(fileName); - const filePath = `${RootPath}/${file}`; + const filePath = Files.joinPath(RootPath, file); Files.writeString(filePath, content); return true; }; +const saveFile = async ({ moduleName, url }) => { + const req = new Request(encodeURI(url)); + const content = await req.loadString(); + write(`${moduleName}`, content); + return true; +}; + const notify = async (title, body, url, opts = {}) => { let n = new Notification(); n = Object.assign(n, opts); @@ -59,8 +57,26 @@ const renderTableList = async (data) => { downloadCell.centerAligned(); downloadCell.dismissOnTap = true; downloadCell.onTap = async () => { - const res = await new Request(item.scriptURL).loadString(); - const isWrite = await write(item.name, res); + if (item.depend) { + try { + for (let i = 0; i < item.depend.length; i++) { + const relyItem = item.depend[i]; + const _isWrite = await saveFile({ + moduleName: relyItem.name, + url: relyItem.scriptURL, + }); + if (_isWrite) { + notify("下载提示", `依赖插件:${relyItem.name}下载/更新成功`); + } + } + } catch (e) { + console.log(e); + } + } + const isWrite = await saveFile({ + moduleName: item.name, + url: item.scriptURL, + }); if (isWrite) { notify("下载提示", `插件:${item.title}下载/更新成功`); } @@ -74,79 +90,87 @@ const renderTableList = async (data) => { notify("错误提示", "订阅获取失败"); } }; - -mainAlert.title = "组件下载"; -mainAlert.message = "可以自行添加订阅地址"; -try { - const cacheKey = "subscriptionList"; - const render = async () => { - let subscriptionList = []; - if (Keychain.contains(cacheKey)) { - subscriptionList = JSON.parse(Keychain.get(cacheKey)); - } - const _actions = []; - console.log(subscriptionList); - subscriptionList.forEach((item) => { - const { author } = item; - mainAlert.addAction("作者:" + author); - _actions.push(async () => { - await renderTableList(item); +const Run = async () => { + try { + const mainAlert = new Alert(); + mainAlert.title = "组件下载"; + mainAlert.message = "可以自行添加订阅地址"; + const cacheKey = "subscriptionList"; + const render = async () => { + let subscriptionList = []; + if (Keychain.contains(cacheKey)) { + subscriptionList = JSON.parse(Keychain.get(cacheKey)); + } + const _actions = []; + console.log(subscriptionList); + subscriptionList.forEach((item) => { + const { author } = item; + mainAlert.addAction("作者:" + author); + _actions.push(async () => { + await renderTableList(item); + }); }); - }); - _actions.push(async () => { - const a = new Alert(); - a.title = "订阅地址"; - a.addTextField( - "URL", - "https://raw.githubusercontent.com/dompling/Scriptable/master/install.json" - ); - a.addAction("确定"); - a.addCancelAction("取消"); - const id = await a.presentAlert(); - if (id === -1) return; - try { - const url = a.textFieldValue(0); - const response = await new Request(url).loadJSON(); - delete response.apps; - const data = []; - for (let i in subscriptionList) { - const item = subscriptionList[i]; - if (response.author === item.author) { - data.push({ ...response, subscription: url }); - } else { - data.push(item); + _actions.push(async () => { + const a = new Alert(); + a.title = "订阅地址"; + a.addTextField( + "URL", + "https://raw.githubusercontent.com/dompling/Scriptable/master/install.json" + ); + a.addAction("确定"); + a.addCancelAction("取消"); + const id = await a.presentAlert(); + if (id === -1) return; + try { + const url = a.textFieldValue(0); + const response = await new Request(url).loadJSON(); + delete response.apps; + const data = []; + let isPush = true; + for (let i in subscriptionList) { + const item = subscriptionList[i]; + if (response.author === item.author) { + isPush = false; + data.push({ ...response, subscription: url }); + } else { + data.push(item); + } } + if (isPush) data.push({ author: response.author, subscription: url }); + Keychain.set(cacheKey, JSON.stringify(data)); + notify("更新成功", "请重新运行本脚本"); + } catch (e) { + console.log(e); + notify("错误提示", "订阅地址错误,不是一个 JSON 格式"); } - if (!subscriptionList.length) - data.push({ author: response.author, subscription: url }); - Keychain.set(cacheKey, JSON.stringify(data)); - notify("更新成功", "请重新运行本脚本"); - } catch (e) { - console.log(e); - notify("错误提示", "订阅地址错误,不是一个 JSON 格式"); - } - }); - - mainAlert.addAction("添加订阅"); - mainAlert.addCancelAction("取消操作"); - const _actionsIndex = await mainAlert.presentSheet(); - if (_actions[_actionsIndex]) { - const func = _actions[_actionsIndex]; - await func(); - } - }; - await render(); -} catch (e) { - console.log("缓存读取错误" + e); -} + }); -const REMOTE_REQ = new Request( - "https://raw.githubusercontent.com/dompling/Scriptable/master/widget.Install.js" -); -const REMOTE_RES = await REMOTE_REQ.loadString(); -const result = await write("widget.Install", REMOTE_RES); -console.log(result); -if (result) { - console.log("🤖自我更新成功"); -} + mainAlert.addAction("添加订阅"); + mainAlert.addCancelAction("取消操作"); + const _actionsIndex = await mainAlert.presentSheet(); + if (_actions[_actionsIndex]) { + const func = _actions[_actionsIndex]; + await func(); + } + }; + await render(); + } catch (e) { + console.log("缓存读取错误" + e); + } +}; +(async () => { + try { + console.log("🤖自更新开始"); + const modules = { + moduleName: "widget.Install", + url: + "https://raw.githubusercontent.com/dompling/Scriptable/master/widget.Install.js", + }; + const result = await saveFile(modules); + if (result) console.log("🤖自更新成功"); + } catch (e) { + console.log(e); + } +})(); +await Run(); diff --git a/yarn.lock b/yarn.lock index 6c1e2e4..789a8f1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,810 +2,12 @@ # yarn lockfile v1 -"@types/scriptable-ios@^1.5.0": - version "1.5.0" - resolved "https://registry.npm.taobao.org/@types/scriptable-ios/download/@types/scriptable-ios-1.5.0.tgz#bf0545452e8882a4634b279cfc29d7f7dd8cef8d" - integrity sha1-vwVFRS6IgqRjSyec/CnX992M740= - -accepts@~1.3.7: - version "1.3.7" - resolved "https://registry.npm.taobao.org/accepts/download/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" - integrity sha1-UxvHJlF6OytB+FACHGzBXqq1B80= - dependencies: - mime-types "~2.1.24" - negotiator "0.6.2" - -ajv@^6.12.3: - version "6.12.6" - resolved "https://registry.npm.taobao.org/ajv/download/ajv-6.12.6.tgz?cache=0&sync_timestamp=1604564396010&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fajv%2Fdownload%2Fajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" - integrity sha1-uvWmLoArB9l3A0WG+MO69a3ybfQ= - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -append-field@^1.0.0: - version "1.0.0" - resolved "https://registry.npm.taobao.org/append-field/download/append-field-1.0.0.tgz#1e3440e915f0b1203d23748e78edd7b9b5b43e56" - integrity sha1-HjRA6RXwsSA9I3SOeO3XubW0PlY= - -array-flatten@1.1.1: - version "1.1.1" - resolved "https://registry.npm.taobao.org/array-flatten/download/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" - integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= - -asn1@~0.2.3: - version "0.2.4" - resolved "https://registry.npm.taobao.org/asn1/download/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" - integrity sha1-jSR136tVO7M+d7VOWeiAu4ziMTY= - dependencies: - safer-buffer "~2.1.0" - -assert-plus@1.0.0, assert-plus@^1.0.0: - version "1.0.0" - resolved "https://registry.npm.taobao.org/assert-plus/download/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.npm.taobao.org/asynckit/download/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= - -aws-sign2@~0.7.0: - version "0.7.0" - resolved "https://registry.npm.taobao.org/aws-sign2/download/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" - integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= - -aws4@^1.8.0: - version "1.11.0" - resolved "https://registry.npm.taobao.org/aws4/download/aws4-1.11.0.tgz?cache=0&sync_timestamp=1604101210422&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Faws4%2Fdownload%2Faws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" - integrity sha1-1h9G2DslGSUOJ4Ta9bCUeai0HFk= - -bcrypt-pbkdf@^1.0.0: - version "1.0.2" - resolved "https://registry.npm.taobao.org/bcrypt-pbkdf/download/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" - integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= - dependencies: - tweetnacl "^0.14.3" - -body-parser@1.19.0, body-parser@^1.19.0: - version "1.19.0" - resolved "https://registry.npm.taobao.org/body-parser/download/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a" - integrity sha1-lrJwnlfJxOCab9Zqj9l5hE9p8Io= - dependencies: - bytes "3.1.0" - content-type "~1.0.4" - debug "2.6.9" - depd "~1.1.2" - http-errors "1.7.2" - iconv-lite "0.4.24" - on-finished "~2.3.0" - qs "6.7.0" - raw-body "2.4.0" - type-is "~1.6.17" - -buffer-from@^1.0.0: - version "1.1.1" - resolved "https://registry.npm.taobao.org/buffer-from/download/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" - integrity sha1-MnE7wCj3XAL9txDXx7zsHyxgcO8= - -busboy@^0.2.11: - version "0.2.14" - resolved "https://registry.npm.taobao.org/busboy/download/busboy-0.2.14.tgz#6c2a622efcf47c57bbbe1e2a9c37ad36c7925453" - integrity sha1-bCpiLvz0fFe7vh4qnDetNseSVFM= - dependencies: - dicer "0.2.5" - readable-stream "1.1.x" - -bytes@3.1.0: - version "3.1.0" - resolved "https://registry.npm.taobao.org/bytes/download/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" - integrity sha1-9s95M6Ng4FiPqf3oVlHNx/gF0fY= - -caseless@~0.12.0: - version "0.12.0" - resolved "https://registry.npm.taobao.org/caseless/download/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" - integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= - -combined-stream@^1.0.6, combined-stream@~1.0.6: - version "1.0.8" - resolved "https://registry.npm.taobao.org/combined-stream/download/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" - integrity sha1-w9RaizT9cwYxoRCoolIGgrMdWn8= - dependencies: - delayed-stream "~1.0.0" - -concat-stream@^1.5.2: - version "1.6.2" - resolved "https://registry.npm.taobao.org/concat-stream/download/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" - integrity sha1-kEvfGUzTEi/Gdcd/xKw9T/D9GjQ= - dependencies: - buffer-from "^1.0.0" - inherits "^2.0.3" - readable-stream "^2.2.2" - typedarray "^0.0.6" - -content-disposition@0.5.3: - version "0.5.3" - resolved "https://registry.npm.taobao.org/content-disposition/download/content-disposition-0.5.3.tgz#e130caf7e7279087c5616c2007d0485698984fbd" - integrity sha1-4TDK9+cnkIfFYWwgB9BIVpiYT70= - dependencies: - safe-buffer "5.1.2" - -content-type@~1.0.4: - version "1.0.4" - resolved "https://registry.npm.taobao.org/content-type/download/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" - integrity sha1-4TjMdeBAxyexlm/l5fjJruJW/js= - -cookie-signature@1.0.6: - version "1.0.6" - resolved "https://registry.npm.taobao.org/cookie-signature/download/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" - integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= - -cookie@0.4.0: - version "0.4.0" - resolved "https://registry.npm.taobao.org/cookie/download/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba" - integrity sha1-vrQ35wIrO21JAZ0IhmUwPr6cFLo= - -core-util-is@1.0.2, core-util-is@~1.0.0: - version "1.0.2" - resolved "https://registry.npm.taobao.org/core-util-is/download/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= - -dashdash@^1.12.0: - version "1.14.1" - resolved "https://registry.npm.taobao.org/dashdash/download/dashdash-1.14.1.tgz?cache=0&sync_timestamp=1601073714105&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdashdash%2Fdownload%2Fdashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" - integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= - dependencies: - assert-plus "^1.0.0" - -debug@2.6.9: - version "2.6.9" - resolved "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz?cache=0&sync_timestamp=1600502871403&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - integrity sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8= - dependencies: - ms "2.0.0" - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.npm.taobao.org/delayed-stream/download/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= - -depd@~1.1.2: - version "1.1.2" - resolved "https://registry.npm.taobao.org/depd/download/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" - integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= - -destroy@~1.0.4: - version "1.0.4" - resolved "https://registry.npm.taobao.org/destroy/download/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" - integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= - -dicer@0.2.5: - version "0.2.5" - resolved "https://registry.npm.taobao.org/dicer/download/dicer-0.2.5.tgz#5996c086bb33218c812c090bddc09cd12facb70f" - integrity sha1-WZbAhrszIYyBLAkL3cCc0S+stw8= - dependencies: - readable-stream "1.1.x" - streamsearch "0.1.2" - -ecc-jsbn@~0.1.1: - version "0.1.2" - resolved "https://registry.npm.taobao.org/ecc-jsbn/download/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" - integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= - dependencies: - jsbn "~0.1.0" - safer-buffer "^2.1.0" - -ee-first@1.1.1: - version "1.1.1" - resolved "https://registry.npm.taobao.org/ee-first/download/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" - integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= - -encodeurl@~1.0.2: - version "1.0.2" - resolved "https://registry.npm.taobao.org/encodeurl/download/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" - integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= - -escape-html@~1.0.3: - version "1.0.3" - resolved "https://registry.npm.taobao.org/escape-html/download/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" - integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= - -etag@~1.8.1: - version "1.8.1" - resolved "https://registry.npm.taobao.org/etag/download/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" - integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= - -express@^4.17.1: - version "4.17.1" - resolved "https://registry.npm.taobao.org/express/download/express-4.17.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fexpress%2Fdownload%2Fexpress-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134" - integrity sha1-RJH8OGBc9R+GKdOcK10Cb5ikwTQ= - dependencies: - accepts "~1.3.7" - array-flatten "1.1.1" - body-parser "1.19.0" - content-disposition "0.5.3" - content-type "~1.0.4" - cookie "0.4.0" - cookie-signature "1.0.6" - debug "2.6.9" - depd "~1.1.2" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - finalhandler "~1.1.2" - fresh "0.5.2" - merge-descriptors "1.0.1" - methods "~1.1.2" - on-finished "~2.3.0" - parseurl "~1.3.3" - path-to-regexp "0.1.7" - proxy-addr "~2.0.5" - qs "6.7.0" - range-parser "~1.2.1" - safe-buffer "5.1.2" - send "0.17.1" - serve-static "1.14.1" - setprototypeof "1.1.1" - statuses "~1.5.0" - type-is "~1.6.18" - utils-merge "1.0.1" - vary "~1.1.2" - -extend@~3.0.2: - version "3.0.2" - resolved "https://registry.npm.taobao.org/extend/download/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" - integrity sha1-+LETa0Bx+9jrFAr/hYsQGewpFfo= - -extsprintf@1.3.0: - version "1.3.0" - resolved "https://registry.npm.taobao.org/extsprintf/download/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" - integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= - -extsprintf@^1.2.0: - version "1.4.0" - resolved "https://registry.npm.taobao.org/extsprintf/download/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" - integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= - -fast-deep-equal@^3.1.1: - version "3.1.3" - resolved "https://registry.npm.taobao.org/fast-deep-equal/download/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" - integrity sha1-On1WtVnWy8PrUSMlJE5hmmXGxSU= - -fast-json-stable-stringify@^2.0.0: - version "2.1.0" - resolved "https://registry.npm.taobao.org/fast-json-stable-stringify/download/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" - integrity sha1-h0v2nG9ATCtdmcSBNBOZ/VWJJjM= - -finalhandler@~1.1.2: - version "1.1.2" - resolved "https://registry.npm.taobao.org/finalhandler/download/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" - integrity sha1-t+fQAP/RGTjQ/bBTUG9uur6fWH0= - dependencies: - debug "2.6.9" - encodeurl "~1.0.2" - escape-html "~1.0.3" - on-finished "~2.3.0" - parseurl "~1.3.3" - statuses "~1.5.0" - unpipe "~1.0.0" - -forever-agent@~0.6.1: - version "0.6.1" - resolved "https://registry.npm.taobao.org/forever-agent/download/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" - integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= - -form-data@~2.3.2: - version "2.3.3" - resolved "https://registry.npm.taobao.org/form-data/download/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" - integrity sha1-3M5SwF9kTymManq5Nr1yTO/786Y= - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.6" - mime-types "^2.1.12" - -forwarded@~0.1.2: - version "0.1.2" - resolved "https://registry.npm.taobao.org/forwarded/download/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" - integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ= - -fresh@0.5.2: - version "0.5.2" - resolved "https://registry.npm.taobao.org/fresh/download/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" - integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= - -getpass@^0.1.1: - version "0.1.7" - resolved "https://registry.npm.taobao.org/getpass/download/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" - integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= - dependencies: - assert-plus "^1.0.0" - -har-schema@^2.0.0: - version "2.0.0" - resolved "https://registry.npm.taobao.org/har-schema/download/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" - integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= - -har-validator@~5.1.3: - version "5.1.5" - resolved "https://registry.npm.taobao.org/har-validator/download/har-validator-5.1.5.tgz?cache=0&sync_timestamp=1596082605533&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhar-validator%2Fdownload%2Fhar-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd" - integrity sha1-HwgDufjLIMD6E4It8ezds2veHv0= - dependencies: - ajv "^6.12.3" - har-schema "^2.0.0" - -http-errors@1.7.2: - version "1.7.2" - resolved "https://registry.npm.taobao.org/http-errors/download/http-errors-1.7.2.tgz?cache=0&sync_timestamp=1593407647372&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhttp-errors%2Fdownload%2Fhttp-errors-1.7.2.tgz#4f5029cf13239f31036e5b2e55292bcfbcc85c8f" - integrity sha1-T1ApzxMjnzEDblsuVSkrz7zIXI8= - dependencies: - depd "~1.1.2" - inherits "2.0.3" - setprototypeof "1.1.1" - statuses ">= 1.5.0 < 2" - toidentifier "1.0.0" - -http-errors@~1.7.2: - version "1.7.3" - resolved "https://registry.npm.taobao.org/http-errors/download/http-errors-1.7.3.tgz?cache=0&sync_timestamp=1593407647372&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhttp-errors%2Fdownload%2Fhttp-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06" - integrity sha1-bGGeT5xgMIw4UZSYwU+7EKrOuwY= - dependencies: - depd "~1.1.2" - inherits "2.0.4" - setprototypeof "1.1.1" - statuses ">= 1.5.0 < 2" - toidentifier "1.0.0" - -http-signature@~1.2.0: - version "1.2.0" - resolved "https://registry.npm.taobao.org/http-signature/download/http-signature-1.2.0.tgz?cache=0&sync_timestamp=1600868470262&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhttp-signature%2Fdownload%2Fhttp-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" - integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= - dependencies: - assert-plus "^1.0.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - -iconv-lite@0.4.24: - version "0.4.24" - resolved "https://registry.npm.taobao.org/iconv-lite/download/iconv-lite-0.4.24.tgz?cache=0&sync_timestamp=1594184278451&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ficonv-lite%2Fdownload%2Ficonv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" - integrity sha1-ICK0sl+93CHS9SSXSkdKr+czkIs= - dependencies: - safer-buffer ">= 2.1.2 < 3" - -inherits@2.0.3: - version "2.0.3" - resolved "https://registry.npm.taobao.org/inherits/download/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= - -inherits@2.0.4, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3: - version "2.0.4" - resolved "https://registry.npm.taobao.org/inherits/download/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha1-D6LGT5MpF8NDOg3tVTY6rjdBa3w= - -ipaddr.js@1.9.1: - version "1.9.1" - resolved "https://registry.npm.taobao.org/ipaddr.js/download/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" - integrity sha1-v/OFQ+64mEglB5/zoqjmy9RngbM= - -is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.npm.taobao.org/is-typedarray/download/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= - -isarray@0.0.1: - version "0.0.1" - resolved "https://registry.npm.taobao.org/isarray/download/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" - integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= - -isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= - -isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.npm.taobao.org/isstream/download/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= - -jsbn@~0.1.0: - version "0.1.1" - resolved "https://registry.npm.taobao.org/jsbn/download/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" - integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.npm.taobao.org/json-schema-traverse/download/json-schema-traverse-0.4.1.tgz?cache=0&sync_timestamp=1599333925809&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjson-schema-traverse%2Fdownload%2Fjson-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" - integrity sha1-afaofZUTq4u4/mO9sJecRI5oRmA= - -json-schema@0.2.3: - version "0.2.3" - resolved "https://registry.npm.taobao.org/json-schema/download/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" - integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= - -json-stringify-safe@~5.0.1: - version "5.0.1" - resolved "https://registry.npm.taobao.org/json-stringify-safe/download/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= - -jsprim@^1.2.2: - version "1.4.1" - resolved "https://registry.npm.taobao.org/jsprim/download/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" - integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= - dependencies: - assert-plus "1.0.0" - extsprintf "1.3.0" - json-schema "0.2.3" - verror "1.10.0" - -media-typer@0.3.0: - version "0.3.0" - resolved "https://registry.npm.taobao.org/media-typer/download/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" - integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= - -merge-descriptors@1.0.1: - version "1.0.1" - resolved "https://registry.npm.taobao.org/merge-descriptors/download/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" - integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= - -methods@~1.1.2: - version "1.1.2" - resolved "https://registry.npm.taobao.org/methods/download/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" - integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= - -mime-db@1.44.0: - version "1.44.0" - resolved "https://registry.npm.taobao.org/mime-db/download/mime-db-1.44.0.tgz?cache=0&sync_timestamp=1600831159918&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmime-db%2Fdownload%2Fmime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" - integrity sha1-+hHF6wrKEzS0Izy01S8QxaYnL5I= - -mime-types@^2.1.12, mime-types@~2.1.19, mime-types@~2.1.24: - version "2.1.27" - resolved "https://registry.npm.taobao.org/mime-types/download/mime-types-2.1.27.tgz?cache=0&sync_timestamp=1587700357245&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmime-types%2Fdownload%2Fmime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f" - integrity sha1-R5SfmOJ56lMRn1ci4PNOUpvsAJ8= - dependencies: - mime-db "1.44.0" - -mime@1.6.0: - version "1.6.0" - resolved "https://registry.npm.taobao.org/mime/download/mime-1.6.0.tgz?cache=0&sync_timestamp=1590596637243&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmime%2Fdownload%2Fmime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" - integrity sha1-Ms2eXGRVO9WNGaVor0Uqz/BJgbE= - -minimist@^1.2.5: - version "1.2.5" - resolved "https://registry.npm.taobao.org/minimist/download/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" - integrity sha1-Z9ZgFLZqaoqqDAg8X9WN9OTpdgI= - -mkdirp@^0.5.1: - version "0.5.5" - resolved "https://registry.npm.taobao.org/mkdirp/download/mkdirp-0.5.5.tgz?cache=0&sync_timestamp=1591257007439&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmkdirp%2Fdownload%2Fmkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" - integrity sha1-2Rzv1i0UNsoPQWIOJRKI1CAJne8= - dependencies: - minimist "^1.2.5" - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= - -ms@2.1.1: - version "2.1.1" - resolved "https://registry.npm.taobao.org/ms/download/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" - integrity sha1-MKWGTrPrsKZvLr5tcnrwagnYbgo= - -multer@^1.4.2: - version "1.4.2" - resolved "https://registry.npm.taobao.org/multer/download/multer-1.4.2.tgz#2f1f4d12dbaeeba74cb37e623f234bf4d3d2057a" - integrity sha1-Lx9NEtuu66dMs35iPyNL9NPSBXo= - dependencies: - append-field "^1.0.0" - busboy "^0.2.11" - concat-stream "^1.5.2" - mkdirp "^0.5.1" - object-assign "^4.1.1" - on-finished "^2.3.0" - type-is "^1.6.4" - xtend "^4.0.0" - -negotiator@0.6.2: - version "0.6.2" - resolved "https://registry.npm.taobao.org/negotiator/download/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" - integrity sha1-/qz3zPUlp3rpY0Q2pkiD/+yjRvs= - -oauth-sign@~0.9.0: - version "0.9.0" - resolved "https://registry.npm.taobao.org/oauth-sign/download/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" - integrity sha1-R6ewFrqmi1+g7PPe4IqFxnmsZFU= - -object-assign@^4.1.1: - version "4.1.1" - resolved "https://registry.npm.taobao.org/object-assign/download/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= - -on-finished@^2.3.0, on-finished@~2.3.0: - version "2.3.0" - resolved "https://registry.npm.taobao.org/on-finished/download/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" - integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= - dependencies: - ee-first "1.1.1" - -parseurl@~1.3.3: - version "1.3.3" - resolved "https://registry.npm.taobao.org/parseurl/download/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" - integrity sha1-naGee+6NEt/wUT7Vt2lXeTvC6NQ= - -path-to-regexp@0.1.7: - version "0.1.7" - resolved "https://registry.npm.taobao.org/path-to-regexp/download/path-to-regexp-0.1.7.tgz?cache=0&sync_timestamp=1601400433519&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpath-to-regexp%2Fdownload%2Fpath-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" - integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= - -performance-now@^2.1.0: - version "2.1.0" - resolved "https://registry.npm.taobao.org/performance-now/download/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" - integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= - -process-nextick-args@~2.0.0: - version "2.0.1" - resolved "https://registry.npm.taobao.org/process-nextick-args/download/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" - integrity sha1-eCDZsWEgzFXKmud5JoCufbptf+I= - -proxy-addr@~2.0.5: - version "2.0.6" - resolved "https://registry.npm.taobao.org/proxy-addr/download/proxy-addr-2.0.6.tgz#fdc2336505447d3f2f2c638ed272caf614bbb2bf" - integrity sha1-/cIzZQVEfT8vLGOO0nLK9hS7sr8= - dependencies: - forwarded "~0.1.2" - ipaddr.js "1.9.1" - -psl@^1.1.28: - version "1.8.0" - resolved "https://registry.npm.taobao.org/psl/download/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" - integrity sha1-kyb4vPsBOtzABf3/BWrM4CDlHCQ= - -punycode@^2.1.0, punycode@^2.1.1: - version "2.1.1" - resolved "https://registry.npm.taobao.org/punycode/download/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" - integrity sha1-tYsBCsQMIsVldhbI0sLALHv0eew= - -qs@6.7.0: - version "6.7.0" - resolved "https://registry.npm.taobao.org/qs/download/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc" - integrity sha1-QdwaAV49WB8WIXdr4xr7KHapsbw= - -qs@~6.5.2: - version "6.5.2" - resolved "https://registry.npm.taobao.org/qs/download/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" - integrity sha1-yzroBuh0BERYTvFUzo7pjUA/PjY= - -range-parser@~1.2.1: - version "1.2.1" - resolved "https://registry.npm.taobao.org/range-parser/download/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" - integrity sha1-PPNwI9GZ4cJNGlW4SADC8+ZGgDE= - -raw-body@2.4.0: - version "2.4.0" - resolved "https://registry.npm.taobao.org/raw-body/download/raw-body-2.4.0.tgz#a1ce6fb9c9bc356ca52e89256ab59059e13d0332" - integrity sha1-oc5vucm8NWylLoklarWQWeE9AzI= - dependencies: - bytes "3.1.0" - http-errors "1.7.2" - iconv-lite "0.4.24" - unpipe "1.0.0" - -readable-stream@1.1.x: - version "1.1.14" - resolved "https://registry.npm.taobao.org/readable-stream/download/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" - integrity sha1-fPTFTvZI44EwhMY23SB54WbAgdk= - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "0.0.1" - string_decoder "~0.10.x" - -readable-stream@^2.2.2: - version "2.3.7" - resolved "https://registry.npm.taobao.org/readable-stream/download/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" - integrity sha1-Hsoc9xGu+BTAT2IlKjamL2yyO1c= - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~2.0.0" - safe-buffer "~5.1.1" - string_decoder "~1.1.1" - util-deprecate "~1.0.1" - -request@^2.88.2: - version "2.88.2" - resolved "https://registry.npm.taobao.org/request/download/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" - integrity sha1-1zyRhzHLWofaBH4gcjQUb2ZNErM= - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.8.0" - caseless "~0.12.0" - combined-stream "~1.0.6" - extend "~3.0.2" - forever-agent "~0.6.1" - form-data "~2.3.2" - har-validator "~5.1.3" - http-signature "~1.2.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.19" - oauth-sign "~0.9.0" - performance-now "^2.1.0" - qs "~6.5.2" - safe-buffer "^5.1.2" - tough-cookie "~2.5.0" - tunnel-agent "^0.6.0" - uuid "^3.3.2" - -safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - integrity sha1-mR7GnSluAxN0fVm9/St0XDX4go0= - -safe-buffer@^5.0.1, safe-buffer@^5.1.2: - version "5.2.1" - resolved "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha1-Hq+fqb2x/dTsdfWPnNtOa3gn7sY= - -"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: - version "2.1.2" - resolved "https://registry.npm.taobao.org/safer-buffer/download/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo= - -send@0.17.1: - version "0.17.1" - resolved "https://registry.npm.taobao.org/send/download/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" - integrity sha1-wdiwWfeQD3Rm3Uk4vcROEd2zdsg= - dependencies: - debug "2.6.9" - depd "~1.1.2" - destroy "~1.0.4" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - fresh "0.5.2" - http-errors "~1.7.2" - mime "1.6.0" - ms "2.1.1" - on-finished "~2.3.0" - range-parser "~1.2.1" - statuses "~1.5.0" - -serve-static@1.14.1: - version "1.14.1" - resolved "https://registry.npm.taobao.org/serve-static/download/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9" - integrity sha1-Zm5jbcTwEPfvKZcKiKZ0MgiYsvk= - dependencies: - encodeurl "~1.0.2" - escape-html "~1.0.3" - parseurl "~1.3.3" - send "0.17.1" - -setprototypeof@1.1.1: - version "1.1.1" - resolved "https://registry.npm.taobao.org/setprototypeof/download/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" - integrity sha1-fpWsskqpL1iF4KvvW6ExMw1K5oM= - -sshpk@^1.7.0: - version "1.16.1" - resolved "https://registry.npm.taobao.org/sshpk/download/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" - integrity sha1-+2YcC+8ps520B2nuOfpwCT1vaHc= - dependencies: - asn1 "~0.2.3" - assert-plus "^1.0.0" - bcrypt-pbkdf "^1.0.0" - dashdash "^1.12.0" - ecc-jsbn "~0.1.1" - getpass "^0.1.1" - jsbn "~0.1.0" - safer-buffer "^2.0.2" - tweetnacl "~0.14.0" - -"statuses@>= 1.5.0 < 2", statuses@~1.5.0: - version "1.5.0" - resolved "https://registry.npm.taobao.org/statuses/download/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" - integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= - -streamsearch@0.1.2: - version "0.1.2" - resolved "https://registry.npm.taobao.org/streamsearch/download/streamsearch-0.1.2.tgz#808b9d0e56fc273d809ba57338e929919a1a9f1a" - integrity sha1-gIudDlb8Jz2Am6VzOOkpkZoanxo= - -string_decoder@~0.10.x: - version "0.10.31" - resolved "https://registry.npm.taobao.org/string_decoder/download/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" - integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ= - -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.npm.taobao.org/string_decoder/download/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" - integrity sha1-nPFhG6YmhdcDCunkujQUnDrwP8g= - dependencies: - safe-buffer "~5.1.0" - -toidentifier@1.0.0: - version "1.0.0" - resolved "https://registry.npm.taobao.org/toidentifier/download/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" - integrity sha1-fhvjRw8ed5SLxD2Uo8j013UrpVM= - -tough-cookie@~2.5.0: - version "2.5.0" - resolved "https://registry.npm.taobao.org/tough-cookie/download/tough-cookie-2.5.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftough-cookie%2Fdownload%2Ftough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" - integrity sha1-zZ+yoKodWhK0c72fuW+j3P9lreI= - dependencies: - psl "^1.1.28" - punycode "^2.1.1" - -tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.npm.taobao.org/tunnel-agent/download/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" - integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= - dependencies: - safe-buffer "^5.0.1" - -tweetnacl@^0.14.3, tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.npm.taobao.org/tweetnacl/download/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" - integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= - -type-is@^1.6.4, type-is@~1.6.17, type-is@~1.6.18: - version "1.6.18" - resolved "https://registry.npm.taobao.org/type-is/download/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" - integrity sha1-TlUs0F3wlGfcvE73Od6J8s83wTE= - dependencies: - media-typer "0.3.0" - mime-types "~2.1.24" - -typedarray@^0.0.6: - version "0.0.6" - resolved "https://registry.npm.taobao.org/typedarray/download/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" - integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= - -unpipe@1.0.0, unpipe@~1.0.0: - version "1.0.0" - resolved "https://registry.npm.taobao.org/unpipe/download/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" - integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= - -uri-js@^4.2.2: - version "4.4.0" - resolved "https://registry.npm.taobao.org/uri-js/download/uri-js-4.4.0.tgz#aa714261de793e8a82347a7bcc9ce74e86f28602" - integrity sha1-qnFCYd55PoqCNHp7zJznTobyhgI= - dependencies: - punycode "^2.1.0" - -util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.npm.taobao.org/util-deprecate/download/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= - -utils-merge@1.0.1: - version "1.0.1" - resolved "https://registry.npm.taobao.org/utils-merge/download/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" - integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= - -uuid@^3.3.2: - version "3.4.0" - resolved "https://registry.npm.taobao.org/uuid/download/uuid-3.4.0.tgz?cache=0&sync_timestamp=1601826526166&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fuuid%2Fdownload%2Fuuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" - integrity sha1-sj5DWK+oogL+ehAK8fX4g/AgB+4= - -vary@~1.1.2: - version "1.1.2" - resolved "https://registry.npm.taobao.org/vary/download/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" - integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= - -verror@1.10.0: - version "1.10.0" - resolved "https://registry.npm.taobao.org/verror/download/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" - integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= - dependencies: - assert-plus "^1.0.0" - core-util-is "1.0.2" - extsprintf "^1.2.0" - -xtend@^4.0.0: - version "4.0.2" - resolved "https://registry.npm.taobao.org/xtend/download/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" - integrity sha1-u3J3n1+kZRhrH0OPZ0+jR/2121Q= +"@types/scriptable-ios@^1.6.1": + version "1.6.1" + resolved "https://registry.npm.taobao.org/@types/scriptable-ios/download/@types/scriptable-ios-1.6.1.tgz#44766b47a0c0c9f92a3c1bf46214288cf3d926f4" + integrity sha1-RHZrR6DAyfkqPBv0YhQojPPZJvQ= + +prettier@^3.3.3: + version "3.3.3" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.3.tgz#30c54fe0be0d8d12e6ae61dbb10109ea00d53105" + integrity sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==