dsh-metaphysics 0.63.0 → 0.65.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +123 -0
- package/client.almanac.js +10 -10
- package/client.chart.js +137 -137
- package/client.chenggu.js +39 -39
- package/client.convert.js +38 -38
- package/client.daliuren.js +43 -43
- package/client.fengshui.js +13 -13
- package/client.js +475 -344
- package/client.liuyao.js +19 -19
- package/client.mbti.js +3 -3
- package/client.name.js +14 -14
- package/client.numerology.js +33 -33
- package/client.qimen.js +17 -17
- package/client.star.js +40 -40
- package/client.tarot.js +39 -39
- package/client.xiaoliuren.js +3 -3
- package/client.zeri.js +22 -22
- package/engine/diff.js +20 -0
- package/engine/index.js +6 -4
- package/engine/interpret.js +4 -3
- package/engine/ziwei.js +268 -23
- package/index.js +34 -2
- package/package.json +1 -1
- package//345/221/275/347/220/206/346/216/222/347/233/230.html +582 -56
|
@@ -362,7 +362,7 @@ h3::after{content:"";flex:1;height:1px;background:linear-gradient(90deg,var(--li
|
|
|
362
362
|
<div class="wrap">
|
|
363
363
|
<header>
|
|
364
364
|
<div class="brand-row">
|
|
365
|
-
<div class="brand"><span class="seal" aria-hidden="true">命</span><span class="brand-txt">命理排盘<span class="ver">v0.
|
|
365
|
+
<div class="brand"><span class="seal" aria-hidden="true">命</span><span class="brand-txt">命理排盘<span class="ver">v0.65.0</span><small>八字 · 紫微 · 六爻 · 梅花 · 六壬 · 奇门 · 合盘 · 塔罗 全部在本机计算</small></span></div>
|
|
366
366
|
<div class="view-switch">
|
|
367
367
|
<span class="hint">熟练了可以换回平铺</span>
|
|
368
368
|
<span class="seg" role="group" aria-label="首屏样式">
|
|
@@ -653,7 +653,7 @@ h3::after{content:"";flex:1;height:1px;background:linear-gradient(90deg,var(--li
|
|
|
653
653
|
<h3>对拍:把典籍当期望值</h3>
|
|
654
654
|
<ul><li>六爻:京房八宫卦序与世应,64 卦全表;旬空六旬表</li><li>六壬:日干寄宫、中气换将;紫微:纳音定五行局、紫微天府相照</li><li>卦例:《增删卜易》9 条 +《卜筮正宗》128 条(93 成对 + 35 静卦),核本变卦 / 动爻数 / 卦宫 / 缺爻 / 旬空</li><li>奇门:20 个时辰 × 9 宫,核四柱 / 局数 / 值符 / 值使 / 星门神 / 天盘干</li></ul>
|
|
655
655
|
<h3>工程验证</h3>
|
|
656
|
-
<ul><li>测试:
|
|
656
|
+
<ul><li>测试:165 个测试文件 / 9019 条断言;七道闸(回归 · 断言基线 · 测试可失败自检 · HTML 注入面 · 工程约定 · 产物宿主形态 · 随机扫射)</li><li>可复现:seed / asOf 显式;同一输入同一输出</li><li>口径:晚子时、真太阳时、奇门三流派、闰月归月都可切换,并有字段级差异对照</li></ul>
|
|
657
657
|
|
|
658
658
|
<h3>已知边界(不猜)</h3>
|
|
659
659
|
<ul><li>六爻应期(具体哪天应验)不做;卦例只录动爻个数,不录爻位</li><li>财富/健康只给结构判断与档位,不给金额区间、不作诊断</li><li>紫微飞星已做「单一支化逐宫追到成环」与「三方四正 16 条按落宫归堆」,但都未叠大限流年四化、不折吉凶;八字交运日已能算到日/时,但未与第三方排盘案例批量对拍</li></ul>
|
|
@@ -1224,9 +1224,29 @@ const CALIBER_SWITCHES = {
|
|
|
1224
1224
|
ziweiSchoolSwitch('shenzhuSchool', '身主:子午皆火星 / 子铃午火', '身主', 'common', 'verse', {
|
|
1225
1225
|
common: '子午皆火星', verse: '子铃午火(安身主诀逐字)',
|
|
1226
1226
|
}),
|
|
1227
|
+
ziweiSchoolSwitch('mingzhuSchool', '命主取法:命宫地支 / 生年年支', '命主取法', 'soul-branch', 'year-branch', {
|
|
1228
|
+
'soul-branch': '命宫地支(通行本)', 'year-branch': '生年年支(中州派)',
|
|
1229
|
+
}),
|
|
1227
1230
|
ziweiSchoolSwitch('zuoyaoSchool', '杂曜:49 颗简盘 / 61 颗全表', '杂曜全表', 'minimal', 'full', {
|
|
1228
1231
|
minimal: '49 颗(简盘)', full: '61 颗(加十二颗杂曜)',
|
|
1229
1232
|
}),
|
|
1233
|
+
ziweiSchoolSwitch('liunianSihua', '流年四化取干:流年天干 / 流年命宫宫干', '流年四化取干', 'year-stem', 'life-palace-stem', {
|
|
1234
|
+
'year-stem': '流年天干', 'life-palace-stem': '流年命宫宫干',
|
|
1235
|
+
}),
|
|
1236
|
+
// 十干四化变体有十一档,口径卡只拿「甲干廉破曲阳」当对照样本:
|
|
1237
|
+
// 甲年换成文曲化科、太阳化忌这一档,与本插件默认的武曲化科最近、最能看出整表在动。
|
|
1238
|
+
ziweiSchoolSwitch('sihuaVariant', '十干四化:通行表 / 变体整表替换', '十干四化变体', 'default', '廉破曲阳', {
|
|
1239
|
+
default: '各干通行表', 廉破曲阳: '甲干 廉破曲阳',
|
|
1240
|
+
贪阴阳机: '戊干 贪阴阳机', 阳武同阴: '庚干 阳武同阴', 阳武府同: '庚干 阳武府同',
|
|
1241
|
+
阳武府相: '庚干 阳武府相', 阳武同相: '庚干 阳武同相', 巨阳武昌: '辛干 巨阳武昌',
|
|
1242
|
+
梁紫府武: '壬干 梁紫府武', 梁紫相武: '壬干 梁紫相武', 破巨阳贪: '癸干 破巨阳贪',
|
|
1243
|
+
}),
|
|
1244
|
+
ziweiSchoolSwitch('jieluSchool', '截路空亡:照常 / 不排(中州派)', '截路空亡', 'off', 'zhongzhou', {
|
|
1245
|
+
off: '照常(截空/副截/旬空/副旬)', zhongzhou: '不排(中州派)',
|
|
1246
|
+
}),
|
|
1247
|
+
ziweiSchoolSwitch('suipoSchool', '岁前十二神:照常 / 大耗改岁破(中州派)', '岁前十二神', 'off', 'zhongzhou', {
|
|
1248
|
+
off: '照常(大耗)', zhongzhou: '大耗改岁破',
|
|
1249
|
+
}),
|
|
1230
1250
|
],
|
|
1231
1251
|
qimen: [
|
|
1232
1252
|
{
|
|
@@ -9462,7 +9482,7 @@ return { PALACE_FIELD, STAR_EXTRA, STAR_PAIR, SHA_STAR, MAIN_SHA, FU_STAR, HUA_R
|
|
|
9462
9482
|
|
|
9463
9483
|
__mods.ziwei = (function () {
|
|
9464
9484
|
// 紫微斗数安星:命身宫 → 五行局 → 紫微/天府 → 十四主星 → 诸辅煞杂曜 → 十二宫 → 四化 → 大限小限流年 → 格局
|
|
9465
|
-
const { STEMS, BRANCHES, ganzhiName, sexagenaryIndex, jdToParts, partsToJd, formatJd } = (__mods.calendar || {});
|
|
9485
|
+
const { STEMS, BRANCHES, ganzhiName, sexagenaryIndex, jdToParts, partsToJd, formatJd, dayGanzhiIndex } = (__mods.calendar || {});
|
|
9466
9486
|
const { solarToLunar } = (__mods.lunar || {});
|
|
9467
9487
|
const { applyTrueSolar } = (__mods.bazi || {});
|
|
9468
9488
|
const { applyDst } = (__mods.dst || {});
|
|
@@ -9558,7 +9578,17 @@ const ZIWEI_SCHOOL_DEFAULTS = Object.freeze({
|
|
|
9558
9578
|
changshengSchool: 'yin-yang-shun-ni',
|
|
9559
9579
|
lateZishi: 'current-day',
|
|
9560
9580
|
shenzhuSchool: 'common',
|
|
9581
|
+
mingzhuSchool: 'soul-branch',
|
|
9561
9582
|
zuoyaoSchool: 'minimal',
|
|
9583
|
+
liunianSihua: 'year-stem',
|
|
9584
|
+
sihuaVariant: 'default',
|
|
9585
|
+
// 中州派成组差异:off 全部用通行本(默认,默认盘逐字节不变);zhongzhou 表示
|
|
9586
|
+
// 「跟随 tianshiTianshang 的 zhongzhou 档」—— 那把开关切到中州派时,这一组跟着生效;
|
|
9587
|
+
// 单独选 off/zhongzhou 而不动 tianshiTianshang 也可。
|
|
9588
|
+
// jieluSchool 截路空亡:zhongzhou 不排(截空、副截、旬空、副旬整组不出)
|
|
9589
|
+
// suipoSchool 岁前十二神:zhongzhou 把「大耗」改记作「岁破」(宫位不变,只换名字)
|
|
9590
|
+
jieluSchool: 'off',
|
|
9591
|
+
suipoSchool: 'off',
|
|
9562
9592
|
});
|
|
9563
9593
|
|
|
9564
9594
|
const ZIWEI_SCHOOL_OPTIONS = Object.freeze({
|
|
@@ -9572,7 +9602,23 @@ const ZIWEI_SCHOOL_OPTIONS = Object.freeze({
|
|
|
9572
9602
|
changshengSchool: ['yin-yang-shun-ni', 'shui-tu', 'huo-tu'],
|
|
9573
9603
|
lateZishi: ['current-day', 'next-day', 'all-current', 'day-cur-time-next'],
|
|
9574
9604
|
shenzhuSchool: ['common', 'verse'],
|
|
9605
|
+
// 命主取法:两派共用同一张十二支→命主星的表(贪狼子、巨门丑亥、禄存寅戌、文曲卯酉、
|
|
9606
|
+
// 廉贞辰申、武曲巳未、破军午),分歧只在「拿哪个地支去查」——
|
|
9607
|
+
// soul-branch(默认,通行本 /《紫微斗数全书》卷二「安命主」):按命宫地支
|
|
9608
|
+
// year-branch(中州派,王亭之整理):按生年年支
|
|
9609
|
+
// 实测命宫地支与生年年支重合的只占约 8%,两派约九成的人的命主不同。
|
|
9610
|
+
mingzhuSchool: ['soul-branch', 'year-branch'],
|
|
9575
9611
|
zuoyaoSchool: ['minimal', 'full'],
|
|
9612
|
+
liunianSihua: ['year-stem', 'life-palace-stem'],
|
|
9613
|
+
// 十干四化变体:default 表示各干用本插件原有通行表;其余按文墨变体名整表替换。
|
|
9614
|
+
// 只列与 default 不同的那一档(default 之外全是「换掉某一干」的显式选择)。
|
|
9615
|
+
sihuaVariant: ['default', '廉破曲阳', '贪阴阳机', '阳武同阴', '阳武府同', '阳武府相',
|
|
9616
|
+
'阳武同相', '巨阳武昌', '梁紫府武', '梁紫相武', '破巨阳贪'],
|
|
9617
|
+
// 中州派成组差异(两档各自独立,可单独开):
|
|
9618
|
+
// jieluSchool off 截路空亡照常 / zhongzhou 整组不排(截空、副截、旬空、副旬都不出)
|
|
9619
|
+
// suipoSchool off 岁前十二神照常 / zhongzhou 把「大耗」改记作「岁破」
|
|
9620
|
+
jieluSchool: ['off', 'zhongzhou'],
|
|
9621
|
+
suipoSchool: ['off', 'zhongzhou'],
|
|
9576
9622
|
});
|
|
9577
9623
|
|
|
9578
9624
|
function ziweiSchoolsOf(input = {}) {
|
|
@@ -9684,11 +9730,67 @@ const GENG_MUTAGEN = {
|
|
|
9684
9730
|
GYWTX: { 太阳: '禄', 武曲: '权', 天同: '科', 天相: '忌' },
|
|
9685
9731
|
};
|
|
9686
9732
|
|
|
9733
|
+
// 十干四化变体全表(文墨天机「十干四化」,2026-11 从 WMTJ-Pro64-2.5.26 的 App.swf 常量表挖出)。
|
|
9734
|
+
// 变体名一律取文墨原文四字,按「禄 权 科 忌」的顺序念,所以名字本身就是这张表:
|
|
9735
|
+
// 「廉破曲阳」= 廉贞化禄、破军化权、文曲化科、太阳化忌。
|
|
9736
|
+
// 每干第一个是与本插件原有默认表完全一致的那一档,乙丙丁己四干文墨没有变体。
|
|
9737
|
+
// 这张表和 gengYearSihua 不是一回事:gengYearSihua 只换生年四化里庚年那一支,
|
|
9738
|
+
// sihuaVariant 换的是整张十干四化表(生年、宫干自化、大限宫干、飞星、流年一起走)。
|
|
9739
|
+
const SIHUA_VARIANTS = Object.freeze({
|
|
9740
|
+
廉破武阳: { stem: '甲', table: MUTAGEN.甲 },
|
|
9741
|
+
廉破曲阳: { stem: '甲', table: Object.freeze({ 廉贞: '禄', 破军: '权', 文曲: '科', 太阳: '忌' }) },
|
|
9742
|
+
贪阴右机: { stem: '戊', table: MUTAGEN.戊 },
|
|
9743
|
+
贪阴阳机: { stem: '戊', table: Object.freeze({ 贪狼: '禄', 太阴: '权', 太阳: '科', 天机: '忌' }) },
|
|
9744
|
+
阳武阴同: { stem: '庚', table: GENG_MUTAGEN.GYWYT },
|
|
9745
|
+
阳武同阴: { stem: '庚', table: GENG_MUTAGEN.GYWTY },
|
|
9746
|
+
阳武府同: { stem: '庚', table: GENG_MUTAGEN.GYWFT },
|
|
9747
|
+
阳武府相: { stem: '庚', table: GENG_MUTAGEN.GYWFX },
|
|
9748
|
+
阳武同相: { stem: '庚', table: GENG_MUTAGEN.GYWTX },
|
|
9749
|
+
巨阳曲昌: { stem: '辛', table: MUTAGEN.辛 },
|
|
9750
|
+
巨阳武昌: { stem: '辛', table: Object.freeze({ 巨门: '禄', 太阳: '权', 武曲: '科', 文昌: '忌' }) },
|
|
9751
|
+
梁紫辅武: { stem: '壬', table: MUTAGEN.壬 },
|
|
9752
|
+
梁紫府武: { stem: '壬', table: Object.freeze({ 天梁: '禄', 紫微: '权', 天府: '科', 武曲: '忌' }) },
|
|
9753
|
+
梁紫相武: { stem: '壬', table: Object.freeze({ 天梁: '禄', 紫微: '权', 天相: '科', 武曲: '忌' }) },
|
|
9754
|
+
破巨阴贪: { stem: '癸', table: MUTAGEN.癸 },
|
|
9755
|
+
破巨阳贪: { stem: '癸', table: Object.freeze({ 破军: '禄', 巨门: '权', 太阳: '科', 贪狼: '忌' }) },
|
|
9756
|
+
});
|
|
9757
|
+
|
|
9687
9758
|
function mutagenOf(stem, schools) {
|
|
9688
9759
|
if (stem === '庚') return GENG_MUTAGEN[schools.gengYearSihua] || MUTAGEN.庚;
|
|
9689
9760
|
return MUTAGEN[stem] ?? {};
|
|
9690
9761
|
}
|
|
9691
9762
|
|
|
9763
|
+
/**
|
|
9764
|
+
* 取某一干的四化表(宫干自化、大限宫干、飞星、流年都用这张)。
|
|
9765
|
+
* 只认 `sihuaVariant`——`gengYearSihua` 按既有约定只管生年四化那一支,
|
|
9766
|
+
* 不能让它顺带改掉宫干自化(那是另一套断法,混了就是两派口径串味)。
|
|
9767
|
+
* 变体名所属天干对不上这一干时不生效,直接落回该干通行表,不会把甲的表套到乙上。
|
|
9768
|
+
* @param {string} stem 天干
|
|
9769
|
+
* @param {object} [schools] 流派开关
|
|
9770
|
+
* @returns {Record<string,string>} 星名 → 禄/权/科/忌
|
|
9771
|
+
*/
|
|
9772
|
+
function sihuaTableOf(stem, schools) {
|
|
9773
|
+
const variant = schools && schools.sihuaVariant;
|
|
9774
|
+
if (variant && variant !== 'default') {
|
|
9775
|
+
const v = SIHUA_VARIANTS[variant];
|
|
9776
|
+
if (v && v.stem === stem) return v.table;
|
|
9777
|
+
}
|
|
9778
|
+
return MUTAGEN[stem] ?? {};
|
|
9779
|
+
}
|
|
9780
|
+
|
|
9781
|
+
/**
|
|
9782
|
+
* 生年四化专用的取表:先看 `sihuaVariant`,没命中该干再让 `gengYearSihua` 生效。
|
|
9783
|
+
* 两项同时指向庚干时以 `sihuaVariant` 为准——它说的是「整张表长这样」,比单点覆盖更明确。
|
|
9784
|
+
* @param {string} stem 年干
|
|
9785
|
+
* @param {object} [schools] 流派开关
|
|
9786
|
+
* @returns {Record<string,string>} 星名 → 禄/权/科/忌
|
|
9787
|
+
*/
|
|
9788
|
+
function natalSihuaTableOf(stem, schools) {
|
|
9789
|
+
const table = sihuaTableOf(stem, schools);
|
|
9790
|
+
if (table === MUTAGEN[stem]) return mutagenOf(stem, schools || {});
|
|
9791
|
+
return table;
|
|
9792
|
+
}
|
|
9793
|
+
|
|
9692
9794
|
// 安魁钺三派:差异集中在庚辛壬癸年(「网络派」与 qs1 同表,不单列)
|
|
9693
9795
|
const KUI_YUE_SCHOOLS = {
|
|
9694
9796
|
qs2: {
|
|
@@ -9719,7 +9821,7 @@ const KUI_YUE = {
|
|
|
9719
9821
|
};
|
|
9720
9822
|
KUI_YUE_SCHOOLS.qs1 = KUI_YUE;
|
|
9721
9823
|
|
|
9722
|
-
/**
|
|
9824
|
+
/** 命主:按地支查表。两派共用这张表,分歧在拿哪个地支 —— 见 mingzhuSchool。 */
|
|
9723
9825
|
const MING_ZHU = {
|
|
9724
9826
|
子: '贪狼', 丑: '巨门', 寅: '禄存', 卯: '文曲', 辰: '廉贞', 巳: '武曲',
|
|
9725
9827
|
午: '破军', 未: '武曲', 申: '廉贞', 酉: '文曲', 戌: '禄存', 亥: '巨门',
|
|
@@ -9979,7 +10081,11 @@ function buildZiwei(input) {
|
|
|
9979
10081
|
if (schools.tiankongSchool !== 'off') {
|
|
9980
10082
|
put(schools.tiankongSchool === 'shun-jia-shi' ? yb + hb : yb + 1, '天空', '杂曜');
|
|
9981
10083
|
}
|
|
9982
|
-
|
|
10084
|
+
// 截路空亡:zhongzhou(中州派)整组不排——截空、副截、旬空、副旬都不出。
|
|
10085
|
+
// 依据《中州派紫微斗数》:截路空亡不入中州派体系;通行本才排。
|
|
10086
|
+
// 这一组只影响杂曜清单,不动宫盘、主星、十二宫位置。
|
|
10087
|
+
const skipJielu = schools.jieluSchool === 'zhongzhou';
|
|
10088
|
+
if (schools.jiekongSchool !== 'off' && !skipJielu) {
|
|
9983
10089
|
const jk = JIEKONG[schools.jiekongSchool][yearStem];
|
|
9984
10090
|
if (Array.isArray(jk)) {
|
|
9985
10091
|
put(jk[0], '截空', '杂曜');
|
|
@@ -10027,7 +10133,7 @@ function buildZiwei(input) {
|
|
|
10027
10133
|
}
|
|
10028
10134
|
|
|
10029
10135
|
// 生年四化(庚干按所选变体)
|
|
10030
|
-
const mutagenMap =
|
|
10136
|
+
const mutagenMap = natalSihuaTableOf(yearStem, schools);
|
|
10031
10137
|
for (const list of starsByBranch) {
|
|
10032
10138
|
for (const star of list) {
|
|
10033
10139
|
if (mutagenMap[star.name]) star.mutagen = mutagenMap[star.name];
|
|
@@ -10046,13 +10152,17 @@ function buildZiwei(input) {
|
|
|
10046
10152
|
const csStart = schools.changshengSchool === 'huo-tu' && bureau.number === 5
|
|
10047
10153
|
? 2
|
|
10048
10154
|
: CHANGSHENG_START[bureau.number];
|
|
10155
|
+
// 岁前十二神:中州派把「大耗」改记作「岁破」(宫位不变,只换名字)。
|
|
10156
|
+
const renameDahao = schools.suipoSchool === 'zhongzhou';
|
|
10049
10157
|
const shenshaAt = (branch) => {
|
|
10050
10158
|
const d = forward ? 1 : -1;
|
|
10159
|
+
let suiqi = SUIQI_NAMES[fix(branch - yb)];
|
|
10160
|
+
if (renameDahao && suiqi === '大耗') suiqi = '岁破';
|
|
10051
10161
|
return {
|
|
10052
10162
|
changsheng: CHANGSHENG_NAMES[fix(d * (branch - csStart))],
|
|
10053
10163
|
boshi: BOSHI_NAMES[fix(d * (branch - lucun))],
|
|
10054
10164
|
jiangqian: JIANGQIAN_NAMES[fix(branch - JIANGXING[triad])],
|
|
10055
|
-
suiqi
|
|
10165
|
+
suiqi,
|
|
10056
10166
|
};
|
|
10057
10167
|
};
|
|
10058
10168
|
|
|
@@ -10063,7 +10173,7 @@ function buildZiwei(input) {
|
|
|
10063
10173
|
const stepIndex = forward ? fix(branch - soulIndex) : fix(soulIndex - branch);
|
|
10064
10174
|
const dxStart = startAge + stepIndex * 10;
|
|
10065
10175
|
const gz = STEMS[stem] + BRANCHES[branch];
|
|
10066
|
-
const pal =
|
|
10176
|
+
const pal = sihuaTableOf(STEMS[stem], schools);
|
|
10067
10177
|
const selfHua = starsByBranch[branch]
|
|
10068
10178
|
.filter((s) => pal[s.name])
|
|
10069
10179
|
.map((s) => ({ star: s.name, type: pal[s.name] }));
|
|
@@ -10081,7 +10191,7 @@ function buildZiwei(input) {
|
|
|
10081
10191
|
start: dxStart,
|
|
10082
10192
|
end: dxStart + 9,
|
|
10083
10193
|
stem: STEMS[stem],
|
|
10084
|
-
mutagen: Object.entries(
|
|
10194
|
+
mutagen: Object.entries(sihuaTableOf(STEMS[stem], schools)).map(([s, k]) => `${s}化${k}`),
|
|
10085
10195
|
},
|
|
10086
10196
|
xiaoxian: { age: xiaoxianAge(branch, triad, gender) },
|
|
10087
10197
|
sanfang: [branch, branch + 4, branch + 8, branch + 6]
|
|
@@ -10089,6 +10199,10 @@ function buildZiwei(input) {
|
|
|
10089
10199
|
});
|
|
10090
10200
|
}
|
|
10091
10201
|
|
|
10202
|
+
// 来因宫(iztro 口径):生年天干与宫干相同的宫,子丑两宫除外(这两支五虎遁永不排甲己…的生年干)。
|
|
10203
|
+
// 之所以叫「来因」:此宫是今生命局展开的起点,主「因何而来」,看一个人的先天因缘与执念方向。
|
|
10204
|
+
const laiyin = palaces.find((p) => p.stem === yearStem && p.branch !== '子' && p.branch !== '丑') || null;
|
|
10205
|
+
|
|
10092
10206
|
// 昌曲专论:与丑未的关系、是否入命三方、吸收面的清杂
|
|
10093
10207
|
const changqu = (() => {
|
|
10094
10208
|
const set = new Set([wenchang, wenqu]);
|
|
@@ -10145,10 +10259,21 @@ function buildZiwei(input) {
|
|
|
10145
10259
|
const xxAge = ((age - 1) % 12) + 1;
|
|
10146
10260
|
const xxPalace = palaces.find((p) => p.xiaoxian.age === xxAge);
|
|
10147
10261
|
const dxPalace = palaces.find((p) => age >= p.daxian.start && age <= p.daxian.end);
|
|
10262
|
+
// 流年四化取干:默认按流年天干;liunianSihua: life-palace-stem 改按该年命宫
|
|
10263
|
+
// 的宫干(文墨设置树里的「依据流年命宫天干」)。这两干各依不同的表:年干随年份走,
|
|
10264
|
+
// 命宫宫干由五虎遁从出生年干起,所以实测十二年会换掉十二次,不是只差个别年。
|
|
10265
|
+
// 取哪一干必须随盘回显,否则用户看不出四颗化星是被哪张表定的。
|
|
10266
|
+
const lnStemOf = (() => {
|
|
10267
|
+
if (schools.liunianSihua !== 'life-palace-stem') return gz.stem;
|
|
10268
|
+
const lp = palaces.find((p) => p.branch === gz.branch);
|
|
10269
|
+
return lp ? lp.stem : gz.stem;
|
|
10270
|
+
})();
|
|
10148
10271
|
liunian.push({
|
|
10149
10272
|
year: y,
|
|
10150
10273
|
ganzhi: gz.name,
|
|
10151
10274
|
age,
|
|
10275
|
+
sihuaStem: lnStemOf,
|
|
10276
|
+
sihuaStemFrom: schools.liunianSihua === 'life-palace-stem' ? '流年命宫天干' : '流年天干',
|
|
10152
10277
|
lifePalace: { branch: gz.branch, palace: palaceNames[b] },
|
|
10153
10278
|
doujun: BRANCHES[fix(b - (lunarMonth - 1) + hb)],
|
|
10154
10279
|
sanfang: [fix(b), fix(b + 4), fix(b + 8), fix(b + 6)].map((x) => palaceNames[x]),
|
|
@@ -10157,7 +10282,20 @@ function buildZiwei(input) {
|
|
|
10157
10282
|
liutuo: BRANCHES[fix(lu - 1)],
|
|
10158
10283
|
liukui: BRANCHES[kuiyueTable[gz.stem][0]],
|
|
10159
10284
|
liuyue: BRANCHES[kuiyueTable[gz.stem][1]],
|
|
10160
|
-
|
|
10285
|
+
// 流曜补全(流昌曲按流年干、流马按流年支三合、流鸾流喜按流年支、年解按流年支)
|
|
10286
|
+
...(() => {
|
|
10287
|
+
const s = horoscopeStarsByBranch(gz, true);
|
|
10288
|
+
const out = {};
|
|
10289
|
+
for (const [name, br] of Object.entries(s)) {
|
|
10290
|
+
if (name === '流禄' || name === '流羊' || name === '流陀' || name === '流魁' || name === '流钺') continue;
|
|
10291
|
+
out[name] = br;
|
|
10292
|
+
}
|
|
10293
|
+
return out;
|
|
10294
|
+
})(),
|
|
10295
|
+
mutagen: Object.entries(sihuaTableOf(lnStemOf, schools)).map(([s, k]) => `${s}化${k}`),
|
|
10296
|
+
// 流年十二神:岁前/将前随流年支重安(iztro getYearly12 口径)
|
|
10297
|
+
lnSuiqi: suiqiByBranch(gz.branch, schools.suipoSchool),
|
|
10298
|
+
lnJiangqian: jiangqianByBranch(gz.branch),
|
|
10161
10299
|
daxian: dxPalace
|
|
10162
10300
|
? { palace: dxPalace.palace, start: dxPalace.daxian.start, end: dxPalace.daxian.end }
|
|
10163
10301
|
: null,
|
|
@@ -10202,6 +10340,30 @@ function buildZiwei(input) {
|
|
|
10202
10340
|
},
|
|
10203
10341
|
hourBranch,
|
|
10204
10342
|
yearGanzhi: yearGanzhi.name,
|
|
10343
|
+
...((() => {
|
|
10344
|
+
// 非节气四柱(紫微斗数口径,文墨「显示非节气四柱」开关的数据源):
|
|
10345
|
+
// 紫微按农历排盘,年柱以正月初一换岁(lunarYear 已是此口径)、月柱按农历月配五虎遁;
|
|
10346
|
+
// 日柱、时柱与节气版完全一致(日时不受节气影响)。与八字(节气)四柱只在立春前后的
|
|
10347
|
+
// 出生者上年/月两柱有差异,正好给用户对照。
|
|
10348
|
+
const yIdx = (((lunarRaw.lunarYear - 4) % 60) + 60) % 60;
|
|
10349
|
+
const nYinStem = ((STEMS.indexOf(yearGanzhi.stem) % 5) * 2 + 2) % 10;
|
|
10350
|
+
const mBranchIdx = 2 + (lunarMonth - 1) >= 12 ? 2 + (lunarMonth - 1) - 12 : 2 + (lunarMonth - 1); // 正月建寅
|
|
10351
|
+
const mStemIdx = (nYinStem + lunarMonth - 1) % 10;
|
|
10352
|
+
const nJd = partsToJd({ year, month, day, hour: 12 });
|
|
10353
|
+
const dIdx = dayGanzhiIndex(Math.floor(nJd + 0.5));
|
|
10354
|
+
const dStemIdx = dIdx % 10;
|
|
10355
|
+
const ziStem = ((dStemIdx % 5) * 2) % 10;
|
|
10356
|
+
const hIdx = sexagenaryIndex((ziStem + hb) % 10, hb);
|
|
10357
|
+
return {
|
|
10358
|
+
nonJieqi: {
|
|
10359
|
+
year: ganzhiName(yIdx).name,
|
|
10360
|
+
month: ganzhiName(sexagenaryIndex(mStemIdx, mBranchIdx)).name,
|
|
10361
|
+
day: ganzhiName(dIdx).name,
|
|
10362
|
+
hour: ganzhiName(hIdx).name,
|
|
10363
|
+
note: '非节气(农历)口径:年以正月初一、月以朔为界;与八字节气四柱仅立春前后出生者有差',
|
|
10364
|
+
},
|
|
10365
|
+
};
|
|
10366
|
+
})()),
|
|
10205
10367
|
soul: {
|
|
10206
10368
|
palace: '命宫',
|
|
10207
10369
|
branch: BRANCHES[soulIndex],
|
|
@@ -10210,7 +10372,20 @@ function buildZiwei(input) {
|
|
|
10210
10372
|
nayin: soulNayin.name,
|
|
10211
10373
|
},
|
|
10212
10374
|
body: { palace: '身宫', branch: BRANCHES[bodyIndex], lands: palaceNames[bodyIndex] },
|
|
10213
|
-
lifeMaster: MING_ZHU[BRANCHES[soulIndex]],
|
|
10375
|
+
lifeMaster: MING_ZHU[schools.mingzhuSchool === 'year-branch' ? BRANCHES[yb] : BRANCHES[soulIndex]],
|
|
10376
|
+
lifeMasterSchool: schools.mingzhuSchool,
|
|
10377
|
+
...((() => {
|
|
10378
|
+
// 两派取的地支不同时,把另一派的结果一并回显——不然用户切档后只看到命主变了一个字,
|
|
10379
|
+
// 无从判断是取法变了还是排盘出了问题。
|
|
10380
|
+
const bySoul = MING_ZHU[BRANCHES[soulIndex]];
|
|
10381
|
+
const byYear = MING_ZHU[BRANCHES[yb]];
|
|
10382
|
+
if (bySoul === byYear) return {};
|
|
10383
|
+
return {
|
|
10384
|
+
lifeMasterNote: schools.mingzhuSchool === 'year-branch'
|
|
10385
|
+
? `中州派按生年年支${BRANCHES[yb]}取${byYear};通行本按命宫地支${BRANCHES[soulIndex]}取${bySoul}`
|
|
10386
|
+
: `通行本按命宫地支${BRANCHES[soulIndex]}取${bySoul};中州派按生年年支${BRANCHES[yb]}取${byYear}`,
|
|
10387
|
+
};
|
|
10388
|
+
})()),
|
|
10214
10389
|
bodyMaster: SHEN_ZHU[schools.shenzhuSchool][BRANCHES[yb]],
|
|
10215
10390
|
bodyMasterSchool: schools.shenzhuSchool,
|
|
10216
10391
|
...((yb === 0 || yb === 6) ? {
|
|
@@ -10226,6 +10401,8 @@ function buildZiwei(input) {
|
|
|
10226
10401
|
ziwei: BRANCHES[ziwei],
|
|
10227
10402
|
tianfu: BRANCHES[tianfu],
|
|
10228
10403
|
changqu,
|
|
10404
|
+
// 来因宫:{branch, palace, ganzhi} 或 null(理论上不 null,防御性保留)
|
|
10405
|
+
laiyin: laiyin ? { branch: laiyin.branch, palace: laiyin.palace, ganzhi: laiyin.ganzhi } : null,
|
|
10229
10406
|
// 杂曜全表的这一层只写「这一盘怎么定宫」:面板、独立页与「复制提问」共用。
|
|
10230
10407
|
// 默认(minimal)时 placed 为空,但 skipped 照旧给出,说明为什么少了两颗。
|
|
10231
10408
|
zuoyao: {
|
|
@@ -10257,15 +10434,15 @@ function buildZiwei(input) {
|
|
|
10257
10434
|
rules: {
|
|
10258
10435
|
ziweiPlacement: '借数法:局数除日数取商,商数自寅宫顺行,借数奇逆偶顺',
|
|
10259
10436
|
mutagen: '生年四化用中州派常用表;庚干可按流派切换(默认阳武阴同,另有同科阴忌、府科、府科相忌、同科相忌)',
|
|
10260
|
-
schools: `流派开关:亮度 ${schools.brightnessSchool}、庚干四化 ${schools.gengYearSihua}、天马 ${schools.tianmaSchool}、天空 ${schools.tiankongSchool}、截空 ${schools.jiekongSchool}、魁钺 ${schools.kuiyueSchool}、天伤天使 ${schools.tianshiTianshang}、长生 ${schools.changshengSchool}、晚子时 ${schools.lateZishi}、身主 ${schools.shenzhuSchool}(common 子午皆火星 / verse
|
|
10437
|
+
schools: `流派开关:亮度 ${schools.brightnessSchool}、庚干四化 ${schools.gengYearSihua}、天马 ${schools.tianmaSchool}、天空 ${schools.tiankongSchool}、截空 ${schools.jiekongSchool}、魁钺 ${schools.kuiyueSchool}、天伤天使 ${schools.tianshiTianshang}、长生 ${schools.changshengSchool}、晚子时 ${schools.lateZishi}、身主 ${schools.shenzhuSchool}(common 子午皆火星 / verse 子铃午火)、命主 ${schools.mingzhuSchool}(soul-branch 按命宫地支 / year-branch 按生年年支)、杂曜 ${schools.zuoyaoSchool}(minimal 49 颗 / full 61 颗)、流年四化取干 ${schools.liunianSihua}(year-stem 按流年天干 / life-palace-stem 按流年命宫宫干)、十干四化 ${schools.sihuaVariant}(default 各干通行表,其余为文墨变体整表替换)、截路空亡 ${schools.jieluSchool}(off 照常排 / zhongzhou 整组不排)、岁前十二神 ${schools.suipoSchool}(off 照常 / zhongzhou 大耗改岁破);庚干四化只作用于生年四化,sihuaVariant 换的是宫干自化、大限宫干、飞星与流年共用的那张表`,
|
|
10261
10438
|
zuoyao: schools.zuoyaoSchool === 'full'
|
|
10262
10439
|
? `全表十二颗已安:生月 解神、天巫、天月、阴煞;生年干 天官、天福、天厨;生年支 蜚廉、天德、年解;命宫+生年支 天才、身宫+生年支 天寿。蜚廉与博士十二神的飞廉同名异星,年解与月解(解神)分列,天德与岁前十二神的天德同名异宫。`
|
|
10263
10440
|
: `本盘按 49 颗的通行简盘安星,未排全表杂曜。开 zuoyaoSchool: "full" 追加十二颗:解神、天巫、天月、阴煞(生月)、天官、天福、天厨(生年干)、蜚廉、天德、年解(生年支)、天才(命宫+生年支)、天寿(身宫+生年支),每颗都带安星诀。`,
|
|
10264
10441
|
leapMonth: '闰月默认按日切分(1–15 归本月、16 起归次月,主流排盘口径);可传 leapMonth: next(整月归次月)或 prev(整月归本月),leapAsNext: true 等同 next',
|
|
10265
10442
|
auxStars: '火铃按年支三合起点顺数至生时;羊陀夹禄存;魁钺按年干;地空亥起子时逆行、地劫顺行;三台八座随辅弼;恩光天贵随昌曲退一位;台辅封诰按时支',
|
|
10266
10443
|
shensha: '长生、博士随大限顺逆;将前、岁前恒顺行;天伤恒在交友、天使恒在疾厄',
|
|
10267
|
-
masters: '
|
|
10268
|
-
liunian: '流年命宫取该年地支宫;三方四正为本宫与 +4/+8/+6
|
|
10444
|
+
masters: '命主按 mingzhuSchool 取地支再查表(soul-branch 命宫地支 / year-branch 生年年支),身主按生年地支;两派共用同一张十二支命主表,只换查表用的地支',
|
|
10445
|
+
liunian: '流年命宫取该年地支宫;三方四正为本宫与 +4/+8/+6;并给该年所属大限与小限;四化取干按 liunianSihua 口径,sihuaStem 回显实际用的那一干',
|
|
10269
10446
|
flyComposite: '三方四正取本宫、对宫与两个三合宫共四宫,四宫宫干各化禄权科忌共 16 条,按落宫归堆标会聚(双忌会、禄忌同宫、三化会、自化);只描会照,不折吉凶',
|
|
10270
10447
|
changqu: '昌曲落宫只由时支决定,故与丑未的关系(夹/三合/同宫/无关)是结构性结论;absorb 的「清/杂」是启发式标记,依据昌曲化忌与会煞,不是断语',
|
|
10271
10448
|
},
|
|
@@ -10542,6 +10719,34 @@ const PATTERN_TONE = {
|
|
|
10542
10719
|
刑囚夹印: 'bad', 泛水桃花: 'bad',
|
|
10543
10720
|
};
|
|
10544
10721
|
|
|
10722
|
+
// ── 限流十二神(iztro 口径):随流年干支重安的只有岁前/将前两组 ──
|
|
10723
|
+
// 长生十二神、博士十二神只在本命排盘算一次,horoscope scope 不重算(iztro
|
|
10724
|
+
// FunctionalAstrolabe._getHoroscopeBySolarDate 里 yearlyDecStar=getYearly12(solarDate)
|
|
10725
|
+
// 只重出 suiqian12/jiangqian12,长生与博士留在本命宫位上)。
|
|
10726
|
+
// 岁前:流年支起岁建,顺数 SUIQI_NAMES;将前:寅午戌起午、申子辰起子、巳酉丑起酉、亥卯未起卯。
|
|
10727
|
+
function suiqiByBranch(branch, suipoSchool) {
|
|
10728
|
+
const b = BRANCHES.indexOf(branch);
|
|
10729
|
+
if (b < 0) return {};
|
|
10730
|
+
const out = {};
|
|
10731
|
+
for (let i = 0; i < 12; i++) {
|
|
10732
|
+
let name = SUIQI_NAMES[i];
|
|
10733
|
+
if (suipoSchool === 'zhongzhou' && name === '大耗') name = '岁破';
|
|
10734
|
+
out[name] = BRANCHES[fix(b + i)];
|
|
10735
|
+
}
|
|
10736
|
+
return out;
|
|
10737
|
+
}
|
|
10738
|
+
|
|
10739
|
+
function jiangqianByBranch(branch) {
|
|
10740
|
+
const b = BRANCHES.indexOf(branch);
|
|
10741
|
+
if (b < 0) return {};
|
|
10742
|
+
const triad = ['寅午戌', '申子辰', '巳酉丑', '亥卯未'].find((t) => t.includes(branch));
|
|
10743
|
+
if (!triad) return {};
|
|
10744
|
+
const start = JIANGXING[triad];
|
|
10745
|
+
const out = {};
|
|
10746
|
+
for (let i = 0; i < 12; i++) out[JIANGQIAN_NAMES[i]] = BRANCHES[fix(start + i)];
|
|
10747
|
+
return out;
|
|
10748
|
+
}
|
|
10749
|
+
|
|
10545
10750
|
// ── 大限一览:宫干四化落宫、三方主星 ──────────────────────────
|
|
10546
10751
|
|
|
10547
10752
|
function daxianList(chart) {
|
|
@@ -10564,7 +10769,12 @@ function daxianList(chart) {
|
|
|
10564
10769
|
selfHua: p.selfHua,
|
|
10565
10770
|
sanfang: p.sanfang,
|
|
10566
10771
|
mainStars: mainOf(p.sanfang),
|
|
10567
|
-
|
|
10772
|
+
// 运曜:按大限宫干支安 10 颗(魁钺昌曲禄羊陀马鸾喜),映射 星名→地支
|
|
10773
|
+
yunStars: horoscopeStarsByBranch(p.ganzhi, false),
|
|
10774
|
+
// 限流十二神:随大限宫支重安的岁前/将前两组(长生、博士不随限流变)
|
|
10775
|
+
yunSuiqi: suiqiByBranch(p.branch, chart.schools.suipoSchool),
|
|
10776
|
+
yunJiangqian: jiangqianByBranch(p.branch),
|
|
10777
|
+
mutagenHits: Object.entries(sihuaTableOf(p.stem, chart.schools)).map(([star, type]) => {
|
|
10568
10778
|
const b = starBranchOf(chart, star);
|
|
10569
10779
|
return { star, type, branch: b >= 0 ? BRANCHES[b] : null, palace: b >= 0 ? chart.palaces.find((x) => x.branch === BRANCHES[b])?.palace ?? null : null };
|
|
10570
10780
|
}),
|
|
@@ -10581,9 +10791,10 @@ function daxianList(chart) {
|
|
|
10581
10791
|
const FLY_TYPES = ['禄', '权', '科', '忌'];
|
|
10582
10792
|
|
|
10583
10793
|
// 某天干下某一化的星曜;表里没有就返回 null(不会凭印象补)
|
|
10584
|
-
|
|
10585
|
-
|
|
10586
|
-
|
|
10794
|
+
// 第三参 schools 选填:给了就按该盘的十干四化变体取表,不给沿用通行表(旧调用零漂移)
|
|
10795
|
+
function flyStarOf(stem, type, schools) {
|
|
10796
|
+
const map = sihuaTableOf(stem, schools || {});
|
|
10797
|
+
if (!map || !Object.keys(map).length) return null;
|
|
10587
10798
|
for (const [star, t] of Object.entries(map)) if (t === type) return star;
|
|
10588
10799
|
return null;
|
|
10589
10800
|
}
|
|
@@ -10596,7 +10807,7 @@ function flyStars(chart) {
|
|
|
10596
10807
|
branch: p.branch,
|
|
10597
10808
|
stem: p.stem,
|
|
10598
10809
|
flies: FLY_TYPES.map((type) => {
|
|
10599
|
-
const star = flyStarOf(p.stem, type);
|
|
10810
|
+
const star = flyStarOf(p.stem, type, chart.schools);
|
|
10600
10811
|
const b = star ? starBranchOf(chart, star) : -1;
|
|
10601
10812
|
const target = b >= 0 ? palaces.find((x) => x.branch === BRANCHES[b]) : null;
|
|
10602
10813
|
return {
|
|
@@ -10622,7 +10833,7 @@ function flyChain(chart, { from = '命宫', type = '忌', maxSteps = 12 } = {})
|
|
|
10622
10833
|
let cur = start;
|
|
10623
10834
|
let ended = 'max';
|
|
10624
10835
|
for (let i = 0; i < Math.max(1, maxSteps); i++) {
|
|
10625
|
-
const star = flyStarOf(cur.stem, type);
|
|
10836
|
+
const star = flyStarOf(cur.stem, type, chart.schools);
|
|
10626
10837
|
if (!star) { ended = 'no-star'; break; }
|
|
10627
10838
|
const b = starBranchOf(chart, star);
|
|
10628
10839
|
if (b < 0) { ended = 'off-chart'; break; }
|
|
@@ -10672,7 +10883,7 @@ function flyComposite(chart, { from = '命宫' } = {}) {
|
|
|
10672
10883
|
branch: p.branch,
|
|
10673
10884
|
stem: p.stem,
|
|
10674
10885
|
flies: FLY_TYPES.map((type) => {
|
|
10675
|
-
const star = flyStarOf(p.stem, type);
|
|
10886
|
+
const star = flyStarOf(p.stem, type, chart.schools);
|
|
10676
10887
|
const b = star ? starBranchOf(chart, star) : -1;
|
|
10677
10888
|
const target = b >= 0 ? palaces.find((x) => x.branch === BRANCHES[b]) : null;
|
|
10678
10889
|
return {
|
|
@@ -10745,12 +10956,66 @@ function flyComposite(chart, { from = '命宫' } = {}) {
|
|
|
10745
10956
|
};
|
|
10746
10957
|
}
|
|
10747
10958
|
|
|
10748
|
-
// ──
|
|
10959
|
+
// ── 限流星曜(运曜/流曜)────────────────────────────────────
|
|
10960
|
+
// 口径依据 iztro star/horoscopeStar.ts + star/location.ts(本命同表换干支重算):
|
|
10961
|
+
// · 魁钺、昌曲、禄羊陀 按运限天干;天马按运限地支三合;红鸾天喜按运限地支(卯起逆数)。
|
|
10962
|
+
// · 流年另加「年解」:戌上起子,逆数至流年地支。
|
|
10963
|
+
// 与本命安星的差异只有两点:昌曲在本命按时支(戌起逆数/辰起顺数),限流按天干
|
|
10964
|
+
//(甲昌巳曲酉、乙昌午曲申、丙戊昌申曲午、丁己昌酉曲巳、庚昌亥曲卯、辛昌子曲寅、壬昌寅曲辰、癸昌卯曲巳);
|
|
10965
|
+
// 火铃不随限流重安(iztro 同样只安这 10+1 颗)。
|
|
10966
|
+
const LIU_CHANGQU = {
|
|
10967
|
+
甲: [5, 9], 乙: [6, 8], 丙: [8, 6], 戊: [8, 6], 丁: [9, 5], 己: [9, 5],
|
|
10968
|
+
庚: [11, 3], 辛: [0, 2], 壬: [2, 4], 癸: [3, 5],
|
|
10969
|
+
};
|
|
10970
|
+
|
|
10971
|
+
const NIANJIE_OF = { 子: 10, 丑: 9, 寅: 8, 卯: 7, 辰: 6, 巳: 5, 午: 4, 未: 3, 申: 2, 酉: 1, 戌: 0, 亥: 11 };
|
|
10972
|
+
|
|
10973
|
+
/** 前缀:大限叫运X、流年叫流X(iztro 同款命名) */
|
|
10974
|
+
const HS_PREFIX = (yearly) => (yearly ? '流' : '运');
|
|
10975
|
+
|
|
10976
|
+
/** 按一组干支安限流星曜,返回 12 宫(按地支序)各宫的星名数组。yearly=true 时前缀用「流」并加年解。 */
|
|
10977
|
+
function horoscopeStarsOf(gz, yearly = false) {
|
|
10978
|
+
const stem = gz.stem ?? String(gz).replace(/[子丑寅卯辰巳午未申酉戌亥]$/, '');
|
|
10979
|
+
const branch = gz.branch ?? String(gz).slice(-1);
|
|
10980
|
+
const sb = BRANCHES.indexOf(branch);
|
|
10981
|
+
const pre = HS_PREFIX(yearly);
|
|
10982
|
+
const lu = LUCUN[stem];
|
|
10983
|
+
const [kui, yue] = KUI_YUE[stem];
|
|
10984
|
+
const [chang, qu] = LIU_CHANGQU[stem];
|
|
10985
|
+
const ma = TIANMA[triadOf(sb)];
|
|
10986
|
+
const luang = fix(3 - sb);
|
|
10987
|
+
const byBranch = Array.from({ length: 12 }, () => []);
|
|
10988
|
+
const add = (idx, name) => byBranch[fix(idx)].push(name);
|
|
10989
|
+
add(kui, `${pre}魁`);
|
|
10990
|
+
add(yue, `${pre}钺`);
|
|
10991
|
+
add(chang, `${pre}昌`);
|
|
10992
|
+
add(qu, `${pre}曲`);
|
|
10993
|
+
add(lu, `${pre}禄`);
|
|
10994
|
+
add(lu + 1, `${pre}羊`);
|
|
10995
|
+
add(lu - 1, `${pre}陀`);
|
|
10996
|
+
add(ma, `${pre}马`);
|
|
10997
|
+
add(luang, `${pre}鸾`);
|
|
10998
|
+
add(luang + 6, `${pre}喜`);
|
|
10999
|
+
if (yearly) add(NIANJIE_OF[branch], '年解');
|
|
11000
|
+
return byBranch;
|
|
11001
|
+
}
|
|
11002
|
+
|
|
11003
|
+
/** 把 12 宫的星名数组转成 {星名: 地支}(供 daxianList/liunian 挂字段) */
|
|
11004
|
+
function horoscopeStarsByBranch(gz, yearly = false) {
|
|
11005
|
+
const byBranch = horoscopeStarsOf(gz, yearly);
|
|
11006
|
+
const out = {};
|
|
11007
|
+
byBranch.forEach((stars, i) => {
|
|
11008
|
+
for (const name of stars) out[name] = BRANCHES[i];
|
|
11009
|
+
});
|
|
11010
|
+
return out;
|
|
11011
|
+
}
|
|
11012
|
+
|
|
11013
|
+
|
|
10749
11014
|
|
|
10750
11015
|
function enrichLiunian(chart) {
|
|
10751
11016
|
for (const ln of chart.liunian) {
|
|
10752
|
-
const stem = ln.ganzhi[0];
|
|
10753
|
-
ln.mutagenHits = Object.entries(
|
|
11017
|
+
const stem = ln.sihuaStem || ln.ganzhi[0];
|
|
11018
|
+
ln.mutagenHits = Object.entries(sihuaTableOf(stem, chart.schools)).map(([star, type]) => {
|
|
10754
11019
|
const b = starBranchOf(chart, star);
|
|
10755
11020
|
return {
|
|
10756
11021
|
star,
|
|
@@ -10812,7 +11077,7 @@ function flowOf(chart, asOf) {
|
|
|
10812
11077
|
const p = chart.palaces.find((x) => x.branch === br);
|
|
10813
11078
|
const stem = p ? p.stem : null;
|
|
10814
11079
|
const mutagenHits = stem
|
|
10815
|
-
? Object.entries(
|
|
11080
|
+
? Object.entries(sihuaTableOf(stem, chart.schools)).map(([star, type]) => {
|
|
10816
11081
|
const b = starBranchOf(chart, star);
|
|
10817
11082
|
return {
|
|
10818
11083
|
star,
|
|
@@ -10855,7 +11120,7 @@ function flowOf(chart, asOf) {
|
|
|
10855
11120
|
};
|
|
10856
11121
|
}
|
|
10857
11122
|
|
|
10858
|
-
return { PALACE_NAMES, BRIGHTNESS, MUTAGEN, ZIWEI_SCHOOL_DEFAULTS, ZIWEI_SCHOOL_OPTIONS, ziweiSchoolsOf, BRIGHTNESS_SCHOOLS, schoolBrightness, KUI_YUE_SCHOOLS, LUCUN, KUI_YUE, MING_ZHU, SHEN_ZHU, triadOf, HUO_START, LING_START, TIANMA, XIANCHI, HUAGAI, JIANGXING, GUCHEN, GUASU, posuIndex, XIAOXIAN_START, CHANGSHENG_NAMES, BOSHI_NAMES, JIANGQIAN_NAMES, SUIQI_NAMES, CHANGSHENG_START, hourBranchIndex, ziweiTianfuIndex, xiaoxianAge, LEAP_POLICIES, leapPolicyOf, effectiveLunarMonth, buildZiwei, detectPatterns, PATTERN_BREAK_RULES, PATTERN_TONE, daxianList, FLY_TYPES, flyStarOf, flyStars, flyChain, flyChains, flyComposite, enrichLiunian, asOfParts, flowOf };
|
|
11123
|
+
return { PALACE_NAMES, BRIGHTNESS, MUTAGEN, ZIWEI_SCHOOL_DEFAULTS, ZIWEI_SCHOOL_OPTIONS, ziweiSchoolsOf, BRIGHTNESS_SCHOOLS, schoolBrightness, SIHUA_VARIANTS, sihuaTableOf, natalSihuaTableOf, KUI_YUE_SCHOOLS, LUCUN, KUI_YUE, MING_ZHU, SHEN_ZHU, triadOf, HUO_START, LING_START, TIANMA, XIANCHI, HUAGAI, JIANGXING, GUCHEN, GUASU, posuIndex, XIAOXIAN_START, CHANGSHENG_NAMES, BOSHI_NAMES, JIANGQIAN_NAMES, SUIQI_NAMES, CHANGSHENG_START, hourBranchIndex, ziweiTianfuIndex, xiaoxianAge, LEAP_POLICIES, leapPolicyOf, effectiveLunarMonth, buildZiwei, detectPatterns, PATTERN_BREAK_RULES, PATTERN_TONE, suiqiByBranch, jiangqianByBranch, daxianList, FLY_TYPES, flyStarOf, flyStars, flyChain, flyChains, flyComposite, horoscopeStarsOf, horoscopeStarsByBranch, enrichLiunian, asOfParts, flowOf };
|
|
10859
11124
|
})();
|
|
10860
11125
|
|
|
10861
11126
|
__mods['tarot-cards'] = (function () {
|
|
@@ -22042,7 +22307,7 @@ __mods.interpret = (function () {
|
|
|
22042
22307
|
|
|
22043
22308
|
const { HEX64, HEX_BY_CORE, TRIGRAM, YAO_POSITION, MOVING_NATURE, ZIWEI_STARS, WUXING_INDUSTRY, WUXING_ORGAN, TENGOD_STYLE, LIUREN_JIANG, TAROT_ELEMENT_FOCUS, DISCLAIMER } = (__mods['interpret-data'] || {});
|
|
22044
22309
|
// 生年四化要按年干反查四颗星,四化表只在紫微引擎里定义了一份,这里直接复用,避免两处维护打架
|
|
22045
|
-
const {
|
|
22310
|
+
const { natalSihuaTableOf } = (__mods.ziwei || {});
|
|
22046
22311
|
// 紫微的词库单列一处:宫位取象、主星细节、双星、煞星辅星、四化措辞、庙旺语气、格局读法
|
|
22047
22312
|
const { palaceFieldOf, starExtraOf, starPairOf, brightRead, huaInLine, shaLineOf, shaNatureOf, fuLineOf, patternReadOf, MAIN_SHA } = (__mods['ziwei-words'] || {});
|
|
22048
22313
|
// 八字的画像词库:日主取象、十神画像、命局基调与地支关系说法
|
|
@@ -22693,9 +22958,10 @@ function zwNatalSihua(r) {
|
|
|
22693
22958
|
}
|
|
22694
22959
|
|
|
22695
22960
|
// 年干四化表:用来补齐「盘上没有落点」的那几颗,以及保证输出顺序
|
|
22961
|
+
// 该盘若选了十干四化变体,这张表也要跟着换,否则文案里的四化与盘面标的不是同一张
|
|
22696
22962
|
const ganzhi = pick(r, 'yearGanzhi', '');
|
|
22697
22963
|
const yearStem = typeof ganzhi === 'string' ? ganzhi.slice(0, 1) : '';
|
|
22698
|
-
const table =
|
|
22964
|
+
const table = natalSihuaTableOf(yearStem, r?.schools);
|
|
22699
22965
|
const starOfType = {};
|
|
22700
22966
|
for (const [star, type] of Object.entries(table)) starOfType[type] = star;
|
|
22701
22967
|
|
|
@@ -22897,7 +23163,7 @@ function ziweiInterpret(r) {
|
|
|
22897
23163
|
soulPair ? `${soulPair.gist};要留意的是${soulPair.watch}。` : '',
|
|
22898
23164
|
bodyLands ? `身宫寄在${bodyLands}——${bodyField ? `${bodyField.field}是后天更容易使上劲的地方` : '这是后天着力点'},中年以后会越来越明显。` : '',
|
|
22899
23165
|
`五行局为${pick(r.bureau, 'name', '—')},${pick(r.daxian, 'startAge', '—')}岁起运:局定的是节奏(几步起、十年一换),不是好坏。`,
|
|
22900
|
-
`命主${pick(r, 'lifeMaster', '—')}、身主${pick(r, 'bodyMaster', '—')}
|
|
23166
|
+
`命主${pick(r, 'lifeMaster', '—')}、身主${pick(r, 'bodyMaster', '—')}:传统把这两颗当作整张盘的定调星,命主看底色,身主看后半程的着力点。${r.lifeMasterNote ? '(本盘' + r.lifeMasterNote + '。)' : ''}`,
|
|
22901
23167
|
].filter(Boolean).join('\n');
|
|
22902
23168
|
|
|
22903
23169
|
// ── 逐宫分析:十二宫各一行清单 + 一句读法 ────────────────────
|
|
@@ -27163,7 +27429,8 @@ function requireGender(value, who = '') {
|
|
|
27163
27429
|
const ZIWEI_SCHOOL_KEYS = [
|
|
27164
27430
|
'brightnessSchool', 'gengYearSihua', 'tianmaSchool', 'tiankongSchool', 'jiekongSchool',
|
|
27165
27431
|
'kuiyueSchool', 'tianshiTianshang', 'changshengSchool', 'lateZishi', 'shenzhuSchool',
|
|
27166
|
-
'zuoyaoSchool',
|
|
27432
|
+
'mingzhuSchool', 'zuoyaoSchool', 'liunianSihua', 'sihuaVariant',
|
|
27433
|
+
'jieluSchool', 'suipoSchool',
|
|
27167
27434
|
];
|
|
27168
27435
|
|
|
27169
27436
|
/** 紫微流派参数原样透传;非法值交给引擎按默认口径回退 */
|
|
@@ -27296,8 +27563,9 @@ function ziweiText(r) {
|
|
|
27296
27563
|
const labels = {
|
|
27297
27564
|
brightnessSchool: '亮度', gengYearSihua: '庚干四化', tianmaSchool: '天马', tiankongSchool: '天空',
|
|
27298
27565
|
jiekongSchool: '截空', kuiyueSchool: '魁钺', tianshiTianshang: '天伤天使',
|
|
27299
|
-
changshengSchool: '长生', lateZishi: '晚子时', shenzhuSchool: '身主',
|
|
27300
|
-
zuoyaoSchool: '杂曜全表',
|
|
27566
|
+
changshengSchool: '长生', lateZishi: '晚子时', shenzhuSchool: '身主', mingzhuSchool: '命主取法',
|
|
27567
|
+
zuoyaoSchool: '杂曜全表', liunianSihua: '流年四化取干', sihuaVariant: '十干四化变体',
|
|
27568
|
+
jieluSchool: '截路空亡', suipoSchool: '岁前十二神',
|
|
27301
27569
|
};
|
|
27302
27570
|
const diff = Object.entries(labels)
|
|
27303
27571
|
.filter(([key]) => r.schools[key] && r.schools[key] !== ZIWEI_SCHOOL_DEFAULTS[key])
|
|
@@ -27352,7 +27620,7 @@ function ziweiText(r) {
|
|
|
27352
27620
|
`【农历】${lunarText}(月首 ${r.lunar.monthStart}) 时支:${r.hourBranch} 年干支:${r.yearGanzhi}`,
|
|
27353
27621
|
`【时刻】${r.solarTime ? `${r.solarTime.civilText} → 真太阳时 ${r.solarTime.trueSolarText}${r.input.geo ? '(' + r.input.geo.note + ')' : ''}` : ''}`,
|
|
27354
27622
|
`【命宫】${r.soul.branch}(${r.soul.ganzhi}·${r.soul.nayin}) 【身宫】${r.body.branch}(落${r.body.lands}) 【五行局】${r.bureau.name}`,
|
|
27355
|
-
`【紫微】${r.ziwei} 【天府】${r.tianfu} 【命主】${r.lifeMaster} 【身主】${r.bodyMaster}${r.bodyMasterNote ? `(${r.bodyMasterSchool === 'common' ? '子午皆火星' : '子铃午火'})` : ''}`,
|
|
27623
|
+
`【紫微】${r.ziwei} 【天府】${r.tianfu} 【命主】${r.lifeMaster} 【身主】${r.bodyMaster}${r.bodyMasterNote ? `(${r.bodyMasterSchool === 'common' ? '子午皆火星' : '子铃午火'})` : ''}${r.lifeMasterNote ? `(${r.lifeMasterNote})` : ''}`,
|
|
27356
27624
|
`【大限】${r.daxian.rule},${r.daxian.startAge}岁起 【小限】${r.xiaoxianRule.direction}`,
|
|
27357
27625
|
schoolLine,
|
|
27358
27626
|
`【昌曲】文昌${r.changqu.wenchang.branch}(${r.changqu.wenchang.palace}${r.changqu.wenchang.mutagen ? '·化' + r.changqu.wenchang.mutagen : ''}) 文曲${r.changqu.wenqu.branch}(${r.changqu.wenqu.palace}${r.changqu.wenqu.mutagen ? '·化' + r.changqu.wenqu.mutagen : ''})`,
|
|
@@ -29199,7 +29467,7 @@ return { interpret, DIRECTIONS, DIRECTION_DEFAULT, BRIGHTNESS, flowOf, parseDate
|
|
|
29199
29467
|
})();
|
|
29200
29468
|
|
|
29201
29469
|
window.Engine = __mods.index;
|
|
29202
|
-
window.__MP_VER = "0.
|
|
29470
|
+
window.__MP_VER = "0.65.0";
|
|
29203
29471
|
</script>
|
|
29204
29472
|
<script>
|
|
29205
29473
|
// 两个 UI 共用的表单规则:宿主面板(src/app.js)与独立页(src/web-ui.js)。
|
|
@@ -29385,9 +29653,8 @@ window.__MP_VER = "0.63.0";
|
|
|
29385
29653
|
/* 大限/流年四化:只留色框不填充,与生年四化的实心块区分 */
|
|
29386
29654
|
.pp-m.view{background:transparent;box-shadow:inset 0 0 0 1px currentColor}
|
|
29387
29655
|
.pp-m.view.lu{color:var(--lu)}.pp-m.view.quan{color:var(--quan)}.pp-m.view.ke{color:var(--ke)}.pp-m.view.ji{color:var(--ji)}
|
|
29388
|
-
/*
|
|
29389
|
-
.pp-m.self
|
|
29390
|
-
.pp-m.self.lu{color:var(--lu)}.pp-m.self.quan{color:var(--quan)}.pp-m.self.ke{color:var(--ke)}.pp-m.self.ji{color:var(--ji)}
|
|
29656
|
+
/* 自化:宫干化回本宫。0.64.0 起不再用徽章,改在星名后画彩色小箭头(见 .pp-zha),
|
|
29657
|
+
与生年实心块、大限/流年空心框分成三层——所以这里不再保留 .pp-m.self 样式 */
|
|
29391
29658
|
/* 庙旺得利平不陷:星名后的等级小字。刻意压低视觉权重(灰为主、陷才微红),
|
|
29392
29659
|
避免与四化的实心彩色方块抢层次 */
|
|
29393
29660
|
.pp-b{font-style:normal;font-size:10px;margin-left:3px;padding:0 3px;border-radius:999px;color:var(--muted);letter-spacing:0;opacity:.92;background:var(--band)}
|
|
@@ -29409,6 +29676,9 @@ window.__MP_VER = "0.63.0";
|
|
|
29409
29676
|
.pp-body 是 static 定位的整块视图容器,::after 却是 absolute,
|
|
29410
29677
|
结果每次排盘都会在文档左上角飘出一个孤立的灰色「身」方块。已删除。 */
|
|
29411
29678
|
.pp-shen::after{content:"身";position:absolute;top:4px;left:4px;font-size:12px;color:var(--on-accent);background:var(--muted);padding:0 3px;border-radius:2px;z-index:1}
|
|
29679
|
+
/* 来因宫角标:右上角「因」,与身宫左上角对称;开关 ppm-d-laiyin 控显隐(默认勾) */
|
|
29680
|
+
.pp-laiyin::after{content:"因";position:absolute;top:4px;right:4px;font-size:12px;color:var(--on-accent);background:var(--ji);padding:0 3px;border-radius:2px;z-index:1}
|
|
29681
|
+
#ppm-d-laiyin:not(:checked)~.pp-body .pp-laiyin::after{display:none}
|
|
29412
29682
|
.pp-legend{display:flex;gap:10px;align-items:center;justify-content:center;font-size:12px;color:var(--muted);margin-top:6px}
|
|
29413
29683
|
.pp-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px;font-family:system-ui,sans-serif}
|
|
29414
29684
|
.pp-chip{font-size:12.5px;padding:3px 9px;border:1px solid var(--line);color:var(--muted);background:var(--bg)}
|
|
@@ -29491,13 +29761,35 @@ window.__MP_VER = "0.63.0";
|
|
|
29491
29761
|
.pp-fx i{font-style:normal;white-space:nowrap;margin-right:4px}
|
|
29492
29762
|
.pp-fx i em{font-style:normal;color:var(--faint)}
|
|
29493
29763
|
#ppm-sc-feixing:checked~.pp-body .pp-fx{display:block}
|
|
29764
|
+
/* 运曜/流曜行:默认隐藏,勾选「显示运曜和流曜」才显示(限流盘显示组,纯增强) */
|
|
29765
|
+
.pp-hs{display:none;margin-top:3px;font-size:10.5px;line-height:1.55;color:var(--muted);border-top:1px dashed var(--hair);padding-top:2px}
|
|
29766
|
+
.pp-hs i{font-style:normal;white-space:nowrap;margin-right:4px}
|
|
29767
|
+
.pp-hs i em{font-style:normal;color:var(--faint)}
|
|
29768
|
+
#ppm-d-hs:checked~.pp-body .pp-hs{display:block}
|
|
29769
|
+
/* 日干四化:宫格下方一行小字(禄权科忌四颗化星落宫),默认隐藏,勾 ppm-d-rigan 才显示 */
|
|
29770
|
+
.pp-rigan{display:none;margin-top:6px;padding:5px 11px;border:1px solid var(--line);background:var(--band);font-size:12px;line-height:1.7;color:var(--muted)}
|
|
29771
|
+
.pp-rigan b{color:var(--ink);font-weight:600;margin-right:8px}
|
|
29772
|
+
.pp-rigan i{font-style:normal;margin-right:10px;white-space:nowrap}
|
|
29773
|
+
.pp-rigan i em{font-style:normal}
|
|
29774
|
+
.pp-rigan i .rl{color:var(--lu)}.pp-rigan i .rq{color:var(--quan)}.pp-rigan i .rk{color:var(--ke)}.pp-rigan i .rj{color:var(--ji)}
|
|
29775
|
+
#ppm-d-rigan:checked~.pp-rigan{display:block}
|
|
29494
29776
|
#ppm-sc-feixing:checked~.pp-body .pp-m.view,
|
|
29495
29777
|
#ppm-sc-feixing:checked~.pp-body .pp-viewhua{display:none}
|
|
29496
|
-
/* 三合派:四化信息整体退场(生年/自化/大限流年/图例/飞星链 chips
|
|
29778
|
+
/* 三合派:四化信息整体退场(生年/自化/大限流年/图例/飞星链 chips/自化箭头) */
|
|
29497
29779
|
#ppm-sc-sanhe:checked~.pp-body .pp-m,
|
|
29498
|
-
#ppm-sc-sanhe:checked~.pp-body .pp-
|
|
29780
|
+
#ppm-sc-sanhe:checked~.pp-body .pp-zha,
|
|
29499
29781
|
#ppm-sc-sanhe:checked~.pp-body .pp-viewhua,
|
|
29500
29782
|
#ppm-sc-sanhe:checked~.pp-flywrap{display:none}
|
|
29783
|
+
/* 自化箭头(学文墨天机):自化是「宫干化回本宫」,箭头画在星名左边、箭头尖顶住星名,
|
|
29784
|
+
由左向右弧着落回这颗星——读成「这笔化飞出去又落回自己」。
|
|
29785
|
+
为什么必须放星名左边:放右边箭头就朝外,视觉上成了「从本宫飞出去」,意思正好反了。
|
|
29786
|
+
为什么 inline 在星名旁而不是绝对定位:宫格左侧会被满星曜的宫撞上(实测压住「紫微 庙」)。 */
|
|
29787
|
+
.pp-zha{display:inline-block;margin-right:3px;vertical-align:-1px;line-height:0;cursor:help}
|
|
29788
|
+
.pp-zha .z-a{width:19px;height:8px;display:block;overflow:visible}
|
|
29789
|
+
.pp-zha .z-shaft{fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round}
|
|
29790
|
+
.pp-zha .z-head{fill:currentColor;stroke:none}
|
|
29791
|
+
.pp-zha.lu{color:var(--lu)}.pp-zha.quan{color:var(--quan)}
|
|
29792
|
+
.pp-zha.ke{color:var(--ke)}.pp-zha.ji{color:var(--ji)}
|
|
29501
29793
|
#ppm-sc-sihe:checked~.pp-flywrap{display:block}
|
|
29502
29794
|
#ppm-sc-feixing:checked~.pp-flywrap{display:block}
|
|
29503
29795
|
/* 自化图示(文墨式图例行):箭头颜色跟四化色走 */
|
|
@@ -29510,7 +29802,6 @@ window.__MP_VER = "0.63.0";
|
|
|
29510
29802
|
.pp::before{content:"";position:absolute;inset:0;pointer-events:none;z-index:0;opacity:.5;
|
|
29511
29803
|
background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='2' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 0.32 0 0 0 0 0.29 0 0 0 0 0.24 0 0 0 0.10 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23p)'/%3E%3C/svg%3E")}
|
|
29512
29804
|
.pp>*{position:relative;z-index:1}
|
|
29513
|
-
.pp-zh{margin-left:4px;white-space:nowrap}
|
|
29514
29805
|
.pp-borrow{font-size:9.5px;color:var(--muted);margin-top:1px;letter-spacing:.02em}
|
|
29515
29806
|
|
|
29516
29807
|
/* —— 宫位点击展开详情 + 三方四正联动 ——
|
|
@@ -29551,6 +29842,7 @@ window.__MP_VER = "0.63.0";
|
|
|
29551
29842
|
.pp-detail .dt-tri em{font-style:normal;color:var(--muted);font-size:12px;margin-left:5px}
|
|
29552
29843
|
.pp-detail .dt-tri em::before{content:"·";margin-right:3px}
|
|
29553
29844
|
.pp-detail .dt-empty{color:var(--faint);font-size:12.5px}
|
|
29845
|
+
.pp-detail .dt-self{margin-right:10px;white-space:nowrap}
|
|
29554
29846
|
.pp-detail .hint{color:var(--faint);font-size:11.5px;margin-top:6px}
|
|
29555
29847
|
.pp-ss{display:flex;flex-wrap:wrap;gap:0 7px;font-size:12.5px;line-height:1.6}
|
|
29556
29848
|
.pp-bz .pp-ss{flex-direction:column;align-items:center;gap:0;font-size:11.5px;line-height:1.5}
|
|
@@ -30729,12 +31021,71 @@ window.__MP_VER = "0.63.0";
|
|
|
30729
31021
|
.pp table tbody tr:hover{background:var(--hover)}
|
|
30730
31022
|
/* 结果卡阴影分层:默认最轻,hover 时浮起一档(只对可交互的卡,避免整页抖动) */
|
|
30731
31023
|
.pp{transition:box-shadow var(--dur) var(--ease)}
|
|
31024
|
+
|
|
31025
|
+
/* —— 文墨式「显示设置」14 项(学文墨天机 group_fxp / group_4hb / group_3hp)——
|
|
31026
|
+
纯 CSS 显隐:勾了盘面立刻变,不重排盘、不进引擎、不进工具 schema。
|
|
31027
|
+
复选框必须是 .pp 的直接子元素,才能用 ~ 命中后面的 .pp-body / .pp-zhlegend。
|
|
31028
|
+
组1/组2 默认勾(:not(:checked) 才隐藏),组3 默认不勾(:checked 才增强,默认盘观感不变)。 */
|
|
31029
|
+
.pp-disp{font-family:var(--sans);border-bottom:1px solid var(--line);background:var(--band);font-size:12px}
|
|
31030
|
+
.pp-disp>summary{cursor:pointer;padding:5px 12px;color:var(--muted);user-select:none;list-style:none;min-height:32px;display:flex;align-items:center}
|
|
31031
|
+
.pp-disp>summary::-webkit-details-marker{display:none}
|
|
31032
|
+
.pp-disp>summary::before{content:"▸";margin-right:6px;font-size:10px;color:var(--label)}
|
|
31033
|
+
.pp-disp[open]>summary::before{content:"▾"}
|
|
31034
|
+
.pp-disp-g{display:flex;flex-wrap:wrap;gap:2px 14px;padding:3px 12px 8px;border-top:1px dashed var(--hair)}
|
|
31035
|
+
.pp-disp-g>span{width:100%;font-size:11px;color:var(--label);letter-spacing:.06em;margin-bottom:1px}
|
|
31036
|
+
.pp-disp label{display:inline-flex;align-items:center;gap:5px;cursor:pointer;color:var(--ink2);user-select:none;padding:2px 0;min-height:26px}
|
|
31037
|
+
.pp-disp-box{width:13px;height:13px;border:1px solid var(--line);border-radius:3px;background:var(--card);display:inline-block;flex:none}
|
|
31038
|
+
.pp-disp label:hover .pp-disp-box{border-color:var(--lu)}
|
|
31039
|
+
/* 勾选态:12 条 :checked 各自点亮自己 label 的方框(复选框与 .pp-disp 同为 .pp 直接子元素) */
|
|
31040
|
+
#ppm-d-ss:checked~.pp-disp label[for="ppm-d-ss"] .pp-disp-box,
|
|
31041
|
+
#ppm-d-sbg:checked~.pp-disp label[for="ppm-d-sbg"] .pp-disp-box,
|
|
31042
|
+
#ppm-d-zha:checked~.pp-disp label[for="ppm-d-zha"] .pp-disp-box,
|
|
31043
|
+
#ppm-d-ages:checked~.pp-disp label[for="ppm-d-ages"] .pp-disp-box,
|
|
31044
|
+
#ppm-d-sizhu:checked~.pp-disp label[for="ppm-d-sizhu"] .pp-disp-box,
|
|
31045
|
+
#ppm-d-small:checked~.pp-disp label[for="ppm-d-small"] .pp-disp-box,
|
|
31046
|
+
#ppm-d-shen:checked~.pp-disp label[for="ppm-d-shen"] .pp-disp-box,
|
|
31047
|
+
#ppm-d-hua:checked~.pp-disp label[for="ppm-d-hua"] .pp-disp-box,
|
|
31048
|
+
#ppm-d-sf:checked~.pp-disp label[for="ppm-d-sf"] .pp-disp-box,
|
|
31049
|
+
#ppm-d-laiyin:checked~.pp-disp label[for="ppm-d-laiyin"] .pp-disp-box,
|
|
31050
|
+
#ppm-d-zha-bold:checked~.pp-disp label[for="ppm-d-zha-bold"] .pp-disp-box,
|
|
31051
|
+
#ppm-d-bad-ink:checked~.pp-disp label[for="ppm-d-bad-ink"] .pp-disp-box,
|
|
31052
|
+
#ppm-d-bold:checked~.pp-disp label[for="ppm-d-bold"] .pp-disp-box,
|
|
31053
|
+
#ppm-d-hs:checked~.pp-disp label[for="ppm-d-hs"] .pp-disp-box{background:var(--lu);border-color:var(--lu);box-shadow:inset 0 0 0 2px var(--card)}
|
|
31054
|
+
/* 组1 飞星派显示(默认全勾,取消才隐藏) */
|
|
31055
|
+
#ppm-d-ss:not(:checked)~.pp-body .pp-ss-txt{display:none}
|
|
31056
|
+
#ppm-d-sbg:not(:checked)~.pp-body .pp-st.st-sbg{display:none}
|
|
31057
|
+
#ppm-d-zha:not(:checked)~.pp-body .pp-zha{display:none}
|
|
31058
|
+
#ppm-d-zha:not(:checked)~.pp-zhlegend{display:none}
|
|
31059
|
+
#ppm-d-ages:not(:checked)~.pp-body .pp-ages{display:none}
|
|
31060
|
+
#ppm-d-sizhu:not(:checked)~.pp-body .ct-t3{display:none}
|
|
31061
|
+
/* 非节气四柱行:默认隐藏,勾 ppm-d-njq 才显示(纯增强,不改默认观感) */
|
|
31062
|
+
.ct-t3nj{font-size:11.5px;letter-spacing:.2em;font-weight:500;color:var(--muted)}
|
|
31063
|
+
.ct-t3nj .nj-tag{font-style:normal;letter-spacing:.08em;font-size:10px;color:var(--lu);border:1px solid currentColor;border-radius:3px;padding:0 3px;margin-left:6px;vertical-align:1px}
|
|
31064
|
+
#ppm-d-njq:not(:checked)~.pp-body .ct-t3nj{display:none}
|
|
31065
|
+
/* 太极点转换信息:详情面板「太极转换」行,默认隐藏,勾 ppm-d-tjz 才显示 */
|
|
31066
|
+
#ppm-d-tjz:not(:checked)~.pp-body .pp-detail .dt-taiji{display:none}
|
|
31067
|
+
/* 组2 四化派显示(默认全勾,取消才隐藏) */
|
|
31068
|
+
#ppm-d-small:not(:checked)~.pp-body .pp-st.aux{display:none}
|
|
31069
|
+
#ppm-d-shen:not(:checked)~.pp-body .pp-shen::after{display:none}
|
|
31070
|
+
#ppm-d-hua:not(:checked)~.pp-body .pp-m{display:none}
|
|
31071
|
+
#ppm-d-sf:not(:checked)~.pp-body .pp-cell.pp-tri{background:var(--bg)}
|
|
31072
|
+
#ppm-d-sf:not(:checked)~.pp-body .pp-cell.pp-link{background:var(--bg);box-shadow:none}
|
|
31073
|
+
#ppm-d-sf:not(:checked)~.pp-body svg.pp-sf{display:none}
|
|
31074
|
+
/* 组3 限流盘增强(默认不勾,勾了才生效;不改默认盘观感) */
|
|
31075
|
+
#ppm-d-zha-bold:checked~.pp-body .pp-zha .z-shaft{stroke-width:2.8}
|
|
31076
|
+
#ppm-d-bad-ink:checked~.pp-body .pp-st.bad{color:var(--ink)}
|
|
31077
|
+
#ppm-d-bad-ink:checked~.pp-body .pp-st.bad::before{content:none}
|
|
31078
|
+
#ppm-d-bold:checked~.pp-body .pp-st.main,#ppm-d-bold:checked~.pp-body .pp-st.good{font-weight:700}
|
|
30732
31079
|
`;
|
|
30733
31080
|
const pp = (window.__PP = window.__PP || {});
|
|
30734
31081
|
pp.CSS = CSS;
|
|
30735
31082
|
|
|
30736
31083
|
const TYPE_CLASS = { 主星: 'main', 吉星: 'good', 煞星: 'bad', 辅星: 'aux', 杂曜: 'aux' };
|
|
30737
31084
|
const MUT = { 禄: 'lu', 权: 'quan', 科: 'ke', 忌: 'ji' };
|
|
31085
|
+
// 「显示三台八座恩光天贵」专用:这四颗是日系吉星,引擎给它们 type='吉星',
|
|
31086
|
+
// 与其它吉星共用 .pp-st.good。只给这四颗追加 st-sbg 供 CSS 单独显隐;
|
|
31087
|
+
// 其余星(尤其十四主星)的 class 串保持字面不变,别动 upgrade.test.mjs 的顺序断言。
|
|
31088
|
+
const SBG = new Set(['三台', '八座', '恩光', '天贵']);
|
|
30738
31089
|
// 庙旺得利平不陷 → 三档视觉权重:吉(庙旺)/ 中(得利平)/ 忌(不陷)
|
|
30739
31090
|
const BR_CLASS = { 庙: 'good', 旺: 'good', 得: 'mid', 利: 'mid', 平: 'mid', 不: 'bad', 陷: 'bad' };
|
|
30740
31091
|
const POS = {
|
|
@@ -30802,7 +31153,7 @@ window.__MP_VER = "0.63.0";
|
|
|
30802
31153
|
pp._wxIcon = wxIcon;
|
|
30803
31154
|
pp._triGlyph = triGlyph;
|
|
30804
31155
|
|
|
30805
|
-
function starsHTML(stars, viewHua) {
|
|
31156
|
+
function starsHTML(stars, viewHua, selfHuaMap) {
|
|
30806
31157
|
if (!stars || !stars.length) return '';
|
|
30807
31158
|
return stars.map((s) => {
|
|
30808
31159
|
const cls = TYPE_CLASS[s.type] || 'aux';
|
|
@@ -30813,9 +31164,15 @@ window.__MP_VER = "0.63.0";
|
|
|
30813
31164
|
const b = s.brightness ? `<em class="pp-b ${BR_CLASS[s.brightness] || 'mid'}">${s.brightness}</em>` : '';
|
|
30814
31165
|
// 全表杂曜的入庙标记(天官/天福只有四宫入庙,来路是庙地专论,不是十四主星那张亮度表)
|
|
30815
31166
|
const tm = s.inTemple ? '<em class="pp-b good">庙</em>' : '';
|
|
30816
|
-
//
|
|
31167
|
+
// 自化(宫干化回本宫)画成箭头,箭头尖顶在星名前——«化» 从宫干飞出去又落回这颗星,
|
|
31168
|
+
// 所以读作「←这笔化飞回本宫」而不是「从这颗星飞出去」。放星名前是关键:
|
|
31169
|
+
// 放星名后箭头朝右,视觉上就成了「飞出本宫」,意思正好反了
|
|
31170
|
+
const zh = (selfHuaMap && selfHuaMap[s.name]) ? zhaMark(selfHuaMap[s.name], s.name) : '';
|
|
31171
|
+
// 日系四吉星单独可寻址(文墨「显示三台八座恩光天贵」);其余星 class 串一字不改
|
|
31172
|
+
const extra = SBG.has(s.name) ? ' st-sbg' : '';
|
|
31173
|
+
// 顺序:自化箭头 → 星名 → 亮度灰字 → 四化色块。灰字紧贴星名变成一体,彩色实心框独立在末尾,
|
|
30817
31174
|
// 避免两者字号差导致视觉叠压(试过 星名→四化→亮度,10px 字形会压住 8.5px 的框)
|
|
30818
|
-
return `<span class="pp-st ${cls}">${s.name}${b}${tm}${m}${vm}</span>`;
|
|
31175
|
+
return `<span class="pp-st ${cls}${extra}">${zh}${s.name}${b}${tm}${m}${vm}</span>`;
|
|
30819
31176
|
}).join('');
|
|
30820
31177
|
}
|
|
30821
31178
|
|
|
@@ -30830,19 +31187,18 @@ window.__MP_VER = "0.63.0";
|
|
|
30830
31187
|
const fx = (n) => ((n % 12) + 12) % 12;
|
|
30831
31188
|
const isTrine = (b, m) => b !== m && [fx(m + 4), fx(m + 8), fx(m + 6)].includes(b);
|
|
30832
31189
|
|
|
30833
|
-
function cellHTML(p, soulIdx, view, allPalaces, viewHua, flyByBranch) {
|
|
31190
|
+
function cellHTML(p, soulIdx, view, allPalaces, viewHua, flyByBranch, hsByBranch, laiyinBranch) {
|
|
30834
31191
|
const pos = POS[p.branch] || [1, 1];
|
|
30835
31192
|
const b = BR.indexOf(p.branch);
|
|
30836
31193
|
const cls = ['pp-cell'];
|
|
30837
31194
|
if (b === soulIdx) cls.push('pp-soul');
|
|
30838
31195
|
else if (isTrine(b, soulIdx)) cls.push('pp-tri');
|
|
30839
31196
|
if (p.isBody) cls.push('pp-shen');
|
|
31197
|
+
if (laiyinBranch && p.branch === laiyinBranch) cls.push('pp-laiyin');
|
|
30840
31198
|
if (pos[0] === 4) cls.push('pp-lastrow');
|
|
30841
31199
|
if (pos[1] === 4) cls.push('pp-lastcol');
|
|
30842
31200
|
const ss = p.shensha || {};
|
|
30843
31201
|
const pname = NAMES[fx(soulIdx - b)];
|
|
30844
|
-
const zh = (p.selfHua && p.selfHua.length)
|
|
30845
|
-
? `<span class="pp-zh">${p.selfHua.map((x) => `<i class="pp-m self ${MUT[x.type]}" title="自化:宫干化回本宫">${x.type}</i>`).join('')}</span>` : '';
|
|
30846
31202
|
// 命无正曜:命宫无十四主星时,传统要借对宫(迁移宫)主星来看
|
|
30847
31203
|
let borrow = '';
|
|
30848
31204
|
if (b === soulIdx && allPalaces) {
|
|
@@ -30856,18 +31212,19 @@ window.__MP_VER = "0.63.0";
|
|
|
30856
31212
|
}
|
|
30857
31213
|
}
|
|
30858
31214
|
return `<div class="${cls.join(' ')}" data-pi="${b}" data-view="${view}" role="button" tabindex="0" aria-expanded="false" style="grid-row:${pos[0]};grid-column:${pos[1]}">
|
|
30859
|
-
<div class="pp-stars">${starsHTML(p.stars, viewHua)}
|
|
31215
|
+
<div class="pp-stars">${starsHTML(p.stars, viewHua, selfHuaMapOf(p))}</div>
|
|
30860
31216
|
${borrow}
|
|
30861
31217
|
<div class="pp-ages">${agesHTML(p.xiaoxian.age)}</div>
|
|
30862
31218
|
${fxLineHTML(p, flyByBranch)}
|
|
31219
|
+
${hsLineHTML(p, hsByBranch)}
|
|
30863
31220
|
<div class="pp-foot">
|
|
30864
31221
|
<div class="ft-l">
|
|
30865
|
-
<span class="ft-dx">${ss.boshi} ${p.daxian.start}-${p.daxian.end}</span>
|
|
30866
|
-
<span>${ss.jiangqian}</span>
|
|
30867
|
-
<span>${ss.suiqi}</span>
|
|
31222
|
+
<span class="ft-dx"><span class="pp-ss-txt">${ss.boshi}</span> ${p.daxian.start}-${p.daxian.end}</span>
|
|
31223
|
+
<span class="pp-ss-txt">${ss.jiangqian}</span>
|
|
31224
|
+
<span class="pp-ss-txt">${ss.suiqi}</span>
|
|
30868
31225
|
</div>
|
|
30869
31226
|
<div class="ft-r">
|
|
30870
|
-
<span>${ss.changsheng}</span>
|
|
31227
|
+
<span class="pp-ss-txt">${ss.changsheng}</span>
|
|
30871
31228
|
<span>${p.ganzhi}</span>
|
|
30872
31229
|
<span class="ft-pn">${pname}</span>
|
|
30873
31230
|
</div>
|
|
@@ -30875,6 +31232,31 @@ window.__MP_VER = "0.63.0";
|
|
|
30875
31232
|
</div>`;
|
|
30876
31233
|
}
|
|
30877
31234
|
|
|
31235
|
+
/* 自化箭头(文墨天机式):自化的定义是「宫干化回本宫」,箭头从左侧弧进来、箭头尖顶住星名,
|
|
31236
|
+
读成「这笔化飞出去又落回本宫」,不是「从这颗星飞出去」。
|
|
31237
|
+
几何按 22×9 画:左侧起笔 → 弧线上行 → 右侧箭头尖落在星名左边缘。
|
|
31238
|
+
stroke 跟 currentColor 走,颜色由 .pp-zha.lu/.quan/.ke/.ji 决定。
|
|
31239
|
+
位置:星名左边 inline,不绝对定位——宫格左侧常被满星曜占满,绝对定位会压住星名(实测压「紫微 庙」);
|
|
31240
|
+
也不能放星名右边,那样箭头朝外,语义正好反了。 */
|
|
31241
|
+
function zhaMark(type, star) {
|
|
31242
|
+
return `<span class="pp-zha ${MUT[type]}" title="自化${esc(type)}:${esc(star)}·宫干化回本宫"><svg class="z-a" viewBox="0 0 22 9" role="img" aria-label="自化${esc(type)}">
|
|
31243
|
+
<path class="z-shaft" d="M1 7C6.6 7 11.4 5.6 17.2 3.2"/>
|
|
31244
|
+
<path class="z-head" d="M20.2 2 17.8 4.9 16.6 1.9Z"/>
|
|
31245
|
+
</svg></span>`;
|
|
31246
|
+
}
|
|
31247
|
+
pp._zhaMark = zhaMark;
|
|
31248
|
+
|
|
31249
|
+
/* selfHua → { 星名: 化类型 },供 starsHTML 把箭头贴到对应星上。
|
|
31250
|
+
同一颗星一般只被一种化命中;万一多条,取第一条(数据层已按四化顺序排)。 */
|
|
31251
|
+
function selfHuaMapOf(p) {
|
|
31252
|
+
const map = {};
|
|
31253
|
+
for (const x of p.selfHua || []) {
|
|
31254
|
+
if (!x || !x.star || !MUT[x.type]) continue;
|
|
31255
|
+
if (!map[x.star]) map[x.star] = x.type;
|
|
31256
|
+
}
|
|
31257
|
+
return map;
|
|
31258
|
+
}
|
|
31259
|
+
|
|
30878
31260
|
/* 飞星派专属:本宫宫干四化飞到哪一宫,逐条摊在宫格内(只此模式展开,CSS 控显隐)。
|
|
30879
31261
|
宫数据不带 mutagenHits,从 r.daxianList 借:同一宫干,飞化等价。 */
|
|
30880
31262
|
function fxLineHTML(p, flyByBranch) {
|
|
@@ -30884,6 +31266,16 @@ window.__MP_VER = "0.63.0";
|
|
|
30884
31266
|
return `<div class="pp-fx">${esc(p.ganzhi)}宫干 ${items}</div>`;
|
|
30885
31267
|
}
|
|
30886
31268
|
|
|
31269
|
+
/* 运曜/流曜小字行(文墨天机「显示运曜和流曜」):宫格内一行小字,形如「运禄巳 运羊午 …」。
|
|
31270
|
+
大限视图传该宫的 yunStars({星名:地支}),流年视图传流X 键值对;默认隐藏,勾选 ppm-d-hs 才显示。
|
|
31271
|
+
返回空串时不占位(本命视图、无数据时不渲染)。 */
|
|
31272
|
+
function hsLineHTML(p, hsByBranch) {
|
|
31273
|
+
const o = (hsByBranch && hsByBranch[p.branch]) || null;
|
|
31274
|
+
if (!o) return '';
|
|
31275
|
+
const items = Object.entries(o).map(([k, br]) => `<i>${esc(k)}<em>${esc(br)}</em></i>`).join('');
|
|
31276
|
+
return `<div class="pp-hs">${items}</div>`;
|
|
31277
|
+
}
|
|
31278
|
+
|
|
30887
31279
|
function sizhuOf(r) {
|
|
30888
31280
|
try {
|
|
30889
31281
|
const E = window.Engine || (window.__PP && window.__PP.Engine);
|
|
@@ -30897,6 +31289,25 @@ window.__MP_VER = "0.63.0";
|
|
|
30897
31289
|
} catch (e) { return ''; }
|
|
30898
31290
|
}
|
|
30899
31291
|
|
|
31292
|
+
/* 日干四化:取日柱天干,查十干四化表,四颗化星按本命落宫归堆。
|
|
31293
|
+
口径:日干起四化(文墨飞星派「显示日干四化」);表用 sihuaTableOf 的通行表
|
|
31294
|
+
这里无法直接调引擎内部表,改用宫干自化同源法——宫干 = 生年干那颗的四化已由
|
|
31295
|
+
mutagenMarks 体现,日干四化是另一层。实现:window.Engine 不暴露 sihuaTableOf,
|
|
31296
|
+
改从宫干四化反推——十二宫宫干覆盖十干(寅申两支各占两干),日干对应的宫干四化
|
|
31297
|
+
可从 daxianList[].mutagenHits(按宫干分组)直接借。 */
|
|
31298
|
+
function dayStemOf(r) {
|
|
31299
|
+
try {
|
|
31300
|
+
const E = window.Engine || (window.__PP && window.__PP.Engine);
|
|
31301
|
+
if (!E || !E.buildBazi || !r.input) return null;
|
|
31302
|
+
const b = E.buildBazi({
|
|
31303
|
+
year: r.input.year, month: r.input.month, day: r.input.day,
|
|
31304
|
+
hour: r.input.hour, minute: r.input.minute,
|
|
31305
|
+
gender: r.input.gender, trueSolar: false,
|
|
31306
|
+
});
|
|
31307
|
+
return b.pillars.day.stem;
|
|
31308
|
+
} catch (e) { return null; }
|
|
31309
|
+
}
|
|
31310
|
+
|
|
30900
31311
|
pp.ziweiHTML = function (r) {
|
|
30901
31312
|
const soulIdx = BR.indexOf(r.soul.branch);
|
|
30902
31313
|
const ln = (r.liunian && r.liunian[0]) || null;
|
|
@@ -30916,7 +31327,51 @@ window.__MP_VER = "0.63.0";
|
|
|
30916
31327
|
|
|
30917
31328
|
const flyByBranch = {};
|
|
30918
31329
|
for (const d of r.daxianList || []) flyByBranch[d.branch] = d.mutagenHits || [];
|
|
30919
|
-
|
|
31330
|
+
|
|
31331
|
+
// 日干四化:借宫干四化反推——daxianList[].mutagenHits 按「宫干→四化星」分组,
|
|
31332
|
+
// 找到宫干 === 日干的那一宫,其 mutagenHits 就是日干四化(同一张十干四化表)。
|
|
31333
|
+
// 星 → 落宫:palaces[].stars 里找星名。
|
|
31334
|
+
const riGanHits = (() => {
|
|
31335
|
+
const ds = dayStemOf(r);
|
|
31336
|
+
if (!ds) return null;
|
|
31337
|
+
const hit = (r.daxianList || []).find((d) => d.stem === ds);
|
|
31338
|
+
if (!hit) return null;
|
|
31339
|
+
const starBranch = {};
|
|
31340
|
+
for (const p of r.palaces) for (const s of p.stars || []) if (!(s.name in starBranch)) starBranch[s.name] = p.branch;
|
|
31341
|
+
return {
|
|
31342
|
+
stem: ds,
|
|
31343
|
+
items: (hit.mutagenHits || []).map((h) => ({
|
|
31344
|
+
type: h.type, star: h.star,
|
|
31345
|
+
branch: starBranch[h.star] || null,
|
|
31346
|
+
palace: starBranch[h.star] ? (r.palaces.find((p) => p.branch === starBranch[h.star]) || {}).palace : null,
|
|
31347
|
+
})),
|
|
31348
|
+
};
|
|
31349
|
+
})();
|
|
31350
|
+
// 运曜/流曜:按宫位摊。大限视图用 daxianList[].yunStars({星名:地支}),流年视图用 ln 的 流X/年解 键。
|
|
31351
|
+
let lnHsByBranch = null;
|
|
31352
|
+
if (ln) {
|
|
31353
|
+
lnHsByBranch = {};
|
|
31354
|
+
for (const [k, br] of Object.entries(ln)) if (/^(流|年解)/.test(k) && typeof br === 'string' && BR.includes(br)) lnHsByBranch[br] = lnHsByBranch[br] || {}, lnHsByBranch[br][k] = br;
|
|
31355
|
+
}
|
|
31356
|
+
const hsByView = {
|
|
31357
|
+
da: dxObj && dxObj.yunStars
|
|
31358
|
+
? (() => {
|
|
31359
|
+
const o = {};
|
|
31360
|
+
for (const [k, br] of Object.entries(dxObj.yunStars)) (o[br] = o[br] || {})[k] = br;
|
|
31361
|
+
// 限流十二神(随大限宫支重安的岁前/将前)并入同一小字行
|
|
31362
|
+
if (dxObj.yunSuiqi) for (const [k, br] of Object.entries(dxObj.yunSuiqi)) (o[br] = o[br] || {})[k] = br;
|
|
31363
|
+
if (dxObj.yunJiangqian) for (const [k, br] of Object.entries(dxObj.yunJiangqian)) (o[br] = o[br] || {})[k] = br;
|
|
31364
|
+
return o;
|
|
31365
|
+
})()
|
|
31366
|
+
: null,
|
|
31367
|
+
ln: lnHsByBranch,
|
|
31368
|
+
};
|
|
31369
|
+
if (r.liunian && r.liunian.length) {
|
|
31370
|
+
const ln0 = r.liunian.find((x) => x.ganzhi === (r._lnSel || r.liunian[0].ganzhi)) || r.liunian[0];
|
|
31371
|
+
if (ln0.lnSuiqi) for (const [k, br] of Object.entries(ln0.lnSuiqi)) (lnHsByBranch[br] = lnHsByBranch[br] || {})[k] = br;
|
|
31372
|
+
if (ln0.lnJiangqian) for (const [k, br] of Object.entries(ln0.lnJiangqian)) (lnHsByBranch[br] = lnHsByBranch[br] || {})[k] = br;
|
|
31373
|
+
}
|
|
31374
|
+
const grid = (m, kind) => r.palaces.map((p) => cellHTML(p, m, kind, r.palaces, huaByView[kind] || null, flyByBranch, hsByView[kind] || null, r.laiyin && r.laiyin.branch)).join('');
|
|
30920
31375
|
const center = (m, kind) => {
|
|
30921
31376
|
const mode = kind === 'da'
|
|
30922
31377
|
? `<div class="ct-t1">大限 ${dxPalace.ganzhi} ${dxPalace.daxian.start}-${dxPalace.daxian.end}岁</div>`
|
|
@@ -30928,14 +31383,15 @@ window.__MP_VER = "0.63.0";
|
|
|
30928
31383
|
<div class="ct-t2">公历 ${r.input.year}-${String(r.input.month).padStart(2, '0')}-${String(r.input.day).padStart(2, '0')} ${String(r.input.hour).padStart(2, '0')}:${String(r.input.minute).padStart(2, '0')}</div>
|
|
30929
31384
|
<div class="ct-t2">农历 ${r.lunar.year}年${r.lunar.isLeap ? `闰${r.lunar.monthRaw || r.lunar.month}` : r.lunar.month}月${r.lunar.day}日${r.hourBranch}时${r.lunar.isLeap && r.lunar.monthRaw && r.lunar.month !== r.lunar.monthRaw ? `(按${r.lunar.month}月起盘)` : ''}</div>
|
|
30930
31385
|
${sizhuOf(r) ? `<div class="ct-t3">${sizhuOf(r)}</div>` : ''}
|
|
30931
|
-
|
|
31386
|
+
${r.nonJieqi ? `<div class="ct-t3 ct-t3nj" title="${esc(r.nonJieqi.note)}">${r.nonJieqi.year} ${r.nonJieqi.month} ${r.nonJieqi.day} ${r.nonJieqi.hour}<em class="nj-tag">非节气</em></div>` : ''}
|
|
31387
|
+
<div class="ct-t4">命主 ${r.lifeMaster}${r.lifeMasterNote ? `<span class="pp-dim" title="${esc(r.lifeMasterNote)}">*</span>` : ''} 身主 ${r.bodyMaster}${r.bodyMasterNote ? `<span class="pp-dim" title="${esc(r.bodyMasterNote)}">*</span>` : ''}</div>
|
|
30932
31388
|
<div class="ct-t4">命宫 ${r.soul.branch} 身宫 ${r.body.branch} 五行局 ${r.bureau.name}</div>
|
|
30933
31389
|
<div class="ct-t4">子年斗君 ${r.doujun ? r.doujun.zinian : '—'} 流年斗君 ${ln && ln.doujun ? ln.doujun : '—'}</div>
|
|
30934
31390
|
<div class="ct-t4">紫微 ${r.ziwei} 天府 ${r.tianfu} ${kind === 'da' ? '大限命宫 ' + BR[dxIdx] : kind === 'ln' ? '流年命宫 ' + BR[lnIdx] : '本命命宫 ' + r.soul.branch}</div>
|
|
30935
31391
|
${kind === 'da' || kind === 'ln' ? `<div class="ct-t4 pp-viewhua">${kind === 'da' ? '大限' : '流年'}四化 ${(kind === 'da' ? huaByView.da : huaByView.ln) && Object.keys(kind === 'da' ? huaByView.da : huaByView.ln).length
|
|
30936
31392
|
? Object.entries(kind === 'da' ? huaByView.da : huaByView.ln).map(([s2, t]) => `${s2}化${t}`).join(' ')
|
|
30937
31393
|
: '<span class="pp-dim">未飞四化</span>'}</div>` : ''}
|
|
30938
|
-
<div class="pp-legend"><span class="pp-m lu">禄</span><span class="pp-m quan">权</span><span class="pp-m ke">科</span><span class="pp-m ji">忌</span><span>实心=生年四化 空心=大限/流年四化
|
|
31394
|
+
<div class="pp-legend"><span class="pp-m lu">禄</span><span class="pp-m quan">权</span><span class="pp-m ke">科</span><span class="pp-m ji">忌</span><span>实心=生年四化 空心=大限/流年四化 箭头=自化 红框=命宫 浅底=三方四正</span></div>
|
|
30939
31395
|
</div>`;
|
|
30940
31396
|
};
|
|
30941
31397
|
|
|
@@ -31017,6 +31473,51 @@ window.__MP_VER = "0.63.0";
|
|
|
31017
31473
|
<input type="radio" name="ppm-sc" id="ppm-sc-sihe" class="pp-r" checked>
|
|
31018
31474
|
<input type="radio" name="ppm-sc" id="ppm-sc-feixing" class="pp-r">
|
|
31019
31475
|
<input type="radio" name="ppm-sc" id="ppm-sc-sanhe" class="pp-r">
|
|
31476
|
+
<!-- 文墨式显示设置:14 个复选框必须与 .pp-body / .pp-zhlegend 同层(.pp 的直接子元素)。
|
|
31477
|
+
组1/组2 默认勾(观感与旧版一致),组3 默认不勾(纯增强)。不重排盘、不进引擎。 -->
|
|
31478
|
+
<input type="checkbox" id="ppm-d-ss" class="pp-r" checked>
|
|
31479
|
+
<input type="checkbox" id="ppm-d-sbg" class="pp-r" checked>
|
|
31480
|
+
<input type="checkbox" id="ppm-d-zha" class="pp-r" checked>
|
|
31481
|
+
<input type="checkbox" id="ppm-d-ages" class="pp-r" checked>
|
|
31482
|
+
<input type="checkbox" id="ppm-d-sizhu" class="pp-r" checked>
|
|
31483
|
+
<input type="checkbox" id="ppm-d-small" class="pp-r" checked>
|
|
31484
|
+
<input type="checkbox" id="ppm-d-shen" class="pp-r" checked>
|
|
31485
|
+
<input type="checkbox" id="ppm-d-hua" class="pp-r" checked>
|
|
31486
|
+
<input type="checkbox" id="ppm-d-sf" class="pp-r" checked>
|
|
31487
|
+
<input type="checkbox" id="ppm-d-laiyin" class="pp-r" checked>
|
|
31488
|
+
<input type="checkbox" id="ppm-d-zha-bold" class="pp-r">
|
|
31489
|
+
<input type="checkbox" id="ppm-d-bad-ink" class="pp-r">
|
|
31490
|
+
<input type="checkbox" id="ppm-d-bold" class="pp-r">
|
|
31491
|
+
<input type="checkbox" id="ppm-d-hs" class="pp-r">
|
|
31492
|
+
<input type="checkbox" id="ppm-d-rigan" class="pp-r">
|
|
31493
|
+
<input type="checkbox" id="ppm-d-njq" class="pp-r">
|
|
31494
|
+
<input type="checkbox" id="ppm-d-tjz" class="pp-r">
|
|
31495
|
+
<details class="pp-disp">
|
|
31496
|
+
<summary>显示设置 · 17 项(学文墨天机)</summary>
|
|
31497
|
+
<div class="pp-disp-g"><span>飞星派显示</span>
|
|
31498
|
+
<label for="ppm-d-ss"><i class="pp-disp-box"></i>显示神煞</label>
|
|
31499
|
+
<label for="ppm-d-sbg"><i class="pp-disp-box"></i>三台八座恩光天贵</label>
|
|
31500
|
+
<label for="ppm-d-zha"><i class="pp-disp-box"></i>彩色箭头标识自化</label>
|
|
31501
|
+
<label for="ppm-d-ages"><i class="pp-disp-box"></i>流年虚岁年龄</label>
|
|
31502
|
+
<label for="ppm-d-sizhu"><i class="pp-disp-box"></i>中宫八字</label>
|
|
31503
|
+
<label for="ppm-d-rigan"><i class="pp-disp-box"></i>显示日干四化</label>
|
|
31504
|
+
<label for="ppm-d-njq"><i class="pp-disp-box"></i>显示非节气四柱</label>
|
|
31505
|
+
<label for="ppm-d-tjz"><i class="pp-disp-box"></i>显示太极点转换信息</label>
|
|
31506
|
+
</div>
|
|
31507
|
+
<div class="pp-disp-g"><span>四化派显示</span>
|
|
31508
|
+
<label for="ppm-d-small"><i class="pp-disp-box"></i>显示小星</label>
|
|
31509
|
+
<label for="ppm-d-shen"><i class="pp-disp-box"></i>显示身宫</label>
|
|
31510
|
+
<label for="ppm-d-hua"><i class="pp-disp-box"></i>显示命宫四化</label>
|
|
31511
|
+
<label for="ppm-d-sf"><i class="pp-disp-box"></i>显示三方四正</label>
|
|
31512
|
+
<label for="ppm-d-laiyin"><i class="pp-disp-box"></i>显示来因宫</label>
|
|
31513
|
+
</div>
|
|
31514
|
+
<div class="pp-disp-g"><span>限流盘显示</span>
|
|
31515
|
+
<label for="ppm-d-zha-bold"><i class="pp-disp-box"></i>自化箭头加粗</label>
|
|
31516
|
+
<label for="ppm-d-bad-ink"><i class="pp-disp-box"></i>六煞星黑字</label>
|
|
31517
|
+
<label for="ppm-d-bold"><i class="pp-disp-box"></i>主辅星加粗</label>
|
|
31518
|
+
<label for="ppm-d-hs"><i class="pp-disp-box"></i>显示运曜和流曜</label>
|
|
31519
|
+
</div>
|
|
31520
|
+
</details>
|
|
31020
31521
|
<div class="pp-modes">
|
|
31021
31522
|
<label for="ppm-ben">本命</label><label for="ppm-da">大限</label><label for="ppm-ln">流年</label>
|
|
31022
31523
|
<span class="pp-soon">点任一宫位看详情</span>
|
|
@@ -31027,7 +31528,22 @@ window.__MP_VER = "0.63.0";
|
|
|
31027
31528
|
${body('ben', soulIdx, 'ben')}
|
|
31028
31529
|
${body('da', dxIdx, 'da')}
|
|
31029
31530
|
${body('ln', lnIdx, 'ln')}
|
|
31030
|
-
|
|
31531
|
+
${(() => {
|
|
31532
|
+
if (!riGanHits) return '';
|
|
31533
|
+
const CLS = { 禄: 'rl', 权: 'rq', 科: 'rk', 忌: 'rj' };
|
|
31534
|
+
const items = riGanHits.items
|
|
31535
|
+
.map((h) => `<i><em class="${CLS[h.type] || ''}">${h.type}</em>${esc(h.star)}<em>${esc(h.branch || '?')}${h.palace ? `·${esc(h.palace)}` : ''}</em></i>`)
|
|
31536
|
+
.join('');
|
|
31537
|
+
return `<div class="pp-rigan"><b>日干${esc(riGanHits.stem)}四化</b>${items}</div>`;
|
|
31538
|
+
})()} ${(() => {
|
|
31539
|
+
if (!riGanHits) return '';
|
|
31540
|
+
const CLS = { 禄: 'rl', 权: 'rq', 科: 'rk', 忌: 'rj' };
|
|
31541
|
+
const items = riGanHits.items
|
|
31542
|
+
.map((h) => `<i><em class="${CLS[h.type] || ''}">${h.type}</em>${esc(h.star)}<em>${esc(h.branch || '?')}${h.palace ? `·${esc(h.palace)}` : ''}</em></i>`)
|
|
31543
|
+
.join('');
|
|
31544
|
+
return `<div class="pp-rigan"><b>日干${esc(riGanHits.stem)}四化</b>${items}</div>`;
|
|
31545
|
+
})()}
|
|
31546
|
+
<div class="pp-zhlegend">自化图示 <span class="z-lu">${pp._zhaMark('禄', '本宫')}禄</span><span class="z-quan">${pp._zhaMark('权', '本宫')}权</span><span class="z-ke">${pp._zhaMark('科', '本宫')}科</span><span class="z-ji">${pp._zhaMark('忌', '本宫')}忌</span></div>
|
|
31031
31547
|
<div class="pp-flywrap">${flyHTML}${flyCompositeHTML}</div>
|
|
31032
31548
|
</div>${flowHTML}${chips}${pats}${dxs}${lnHit}${zyHTML}`;
|
|
31033
31549
|
};
|
|
@@ -31059,8 +31575,9 @@ window.__MP_VER = "0.63.0";
|
|
|
31059
31575
|
const auxes = p.stars.filter((s) => s.type === '吉星' || s.type === '辅星');
|
|
31060
31576
|
const bads = p.stars.filter((s) => s.type === '煞星');
|
|
31061
31577
|
const misc = p.stars.filter((s) => !['主星', '吉星', '辅星', '煞星'].includes(s.type));
|
|
31578
|
+
// 自化与盘面统一用箭头:详情里额外标出被化那颗星(盘面靠位置,这里靠文字)
|
|
31062
31579
|
const selfHua = (p.selfHua || []).length
|
|
31063
|
-
? p.selfHua.map((x) => `<
|
|
31580
|
+
? p.selfHua.map((x) => `<span class="dt-self">${zhaMark(x.type, x.star || '本宫')}${esc(x.star || '')}</span>`).join('')
|
|
31064
31581
|
: '<span class="dt-empty">无</span>';
|
|
31065
31582
|
// 三方四正:三合(+4/+8)与对宫(+6)
|
|
31066
31583
|
const tri = [fx(b + 4), fx(b + 8), fx(b + 6)].map((idx) => {
|
|
@@ -31077,6 +31594,14 @@ window.__MP_VER = "0.63.0";
|
|
|
31077
31594
|
? starLine(mains)
|
|
31078
31595
|
: `<span class="dt-empty">无主星</span><span class="dt-tri"> 借对宫 <b>${borrowStars.length ? borrowStars.map((s) => s.name).join('、') : '亦无主星'}</b></span>`;
|
|
31079
31596
|
const row = (k, v) => `<div class="dt-dr"><span class="dt-k">${k}</span><div class="dt-v">${v}</div></div>`;
|
|
31597
|
+
// 太极点转换(文墨「显示太极点转换信息」):以本宫为新命宫重布十二宫名。
|
|
31598
|
+
// 宫序顺时针与本命同名序一致——新命宫=本宫,其后按本命十二宫顺序依次重排。
|
|
31599
|
+
const N = NAMES.length;
|
|
31600
|
+
const pivotOffset = fx(soulIdx - b); // 本宫在本命盘的宫名序
|
|
31601
|
+
const taiji = NAMES.map((_, i) => {
|
|
31602
|
+
const idx = fx(b + (i - pivotOffset + N) % N); // 从本宫起,按宫名序号推地支
|
|
31603
|
+
return `<span class="dt-st">${NAMES[i]}[${BR[idx]}]</span>`;
|
|
31604
|
+
}).join('');
|
|
31080
31605
|
|
|
31081
31606
|
return `<div class="dt-dh">
|
|
31082
31607
|
<b>${nm}</b><span>${p.branch}宫 · ${p.ganzhi}</span>
|
|
@@ -31092,6 +31617,7 @@ window.__MP_VER = "0.63.0";
|
|
|
31092
31617
|
${row('宫干四化', selfHua)}
|
|
31093
31618
|
${row('十二神', `<span class="dt-tri">长生 ${ss.changsheng || '—'} 博士 ${ss.boshi || '—'} 将前 ${ss.jiangqian || '—'} 岁前 ${ss.suiqi || '—'}</span>`)}
|
|
31094
31619
|
${row('三方四正', `<span class="dt-tri">${tri}</span>`)}
|
|
31620
|
+
${row('太极转换', `<span class="dt-tri dt-taiji">以${nm}[${p.branch}]立太极${taiji}</span>`)}
|
|
31095
31621
|
<div class="hint">三方四正在盘上已同步标出(浅红描边)。再点一次本宫可收起。</div>`;
|
|
31096
31622
|
}
|
|
31097
31623
|
|