dsh-metaphysics 0.64.0 → 0.66.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.
@@ -1,6 +1,6 @@
1
1
  window.__ModuleLoader__.load({id:"dsh-metaphysics",chunk:"client.xiaoliuren.js",factory(Nt){const v={};return v.fail=(function(){return{fail:(C,Z)=>{const H=new Error(Z);return H.code=C,H}}})(),v.bool=(function(){function L(s,$=!1){return s==null||s===""?$:s===!0||s===1||s==="true"||s==="1"?!0:s===!1||s===0||s==="false"||s==="0"?!1:$}const C={lateZi:!0,trueSolar:!0,dst:!0,isLeapMonth:!1,leapAsNext:!1,cross:!1,hourUnknown:!1,diff:!1,shadow:!1,trace:!1,rectify:!1,withInterpret:!1},Z={lateZi:!0,trueSolar:!0,dst:!0,hourUnknown:!1};function H(s,$){let d=s;const f=(o,l)=>{Object.is(s[o],l)||(d===s&&(d={...s}),d[o]=l)},r=o=>{d===s&&(d={...s}),delete d[o]};for(const[o,l]of Object.entries($))if(s[o]!==void 0){if(typeof s[o]=="string"&&s[o].trim()===""){r(o);continue}f(o,L(s[o],l))}return d}function P(s){if(!s||typeof s!="object"||Array.isArray(s))return s;let $=s;for(const[d,f]of Object.entries(Z)){if(s[d]===void 0)continue;if(typeof s[d]=="string"&&s[d].trim()===""){$===s&&($={...s}),delete $[d];continue}const r=L(s[d],f);Object.is(s[d],r)||($===s&&($={...s}),$[d]=r)}return $}function A(s){if(!s||typeof s!="object")return s;let $=H(s,C);for(const d of["partner","partner2"]){const f=$[d],r=P(f);r!==f&&($===s&&($={...s}),$[d]=r)}return $}const E=["hour","minute","longitude","verifyPast","seed","days","lunarYear","lunarMonth","lunarDay","num1","num2","num3","upper","lower","changing","count","toAge","fortuneYear","period","limit","sittingOffset","sittingDegree","facingOffset","facingDegree","year","month","day"],q=["lines","rectifyHours","answers"],z=["strokeOverrides","surnameStrokes"],p=/^[+-]?(\d+(\.\d*)?|\.\d+)([eE][+-]?\d+)?$/;function w(s){if(typeof s!="string")return s;const $=s.trim();if(!p.test($))return s;const d=Number($);return Number.isFinite(d)?d:s}function _(s){let $=!1;const d={};for(const[f,r]of Object.entries(s)){const o=r===null?null:w(r);Object.is(o,r)||($=!0),d[f]=o}return $?d:s}function k(s){if(!s||typeof s!="object")return s;let $=s;const d=(f,r)=>{Object.is(s[f],r)||($===s&&($={...s}),$[f]=r)};for(const f of E)if(s[f]!==void 0){if(typeof s[f]=="string"&&s[f].trim()===""){$===s&&($={...s}),delete $[f];continue}d(f,w(s[f]))}for(const f of q){const r=s[f];if(!Array.isArray(r))continue;let o=!1;const l=r.map(i=>{if(i===null)return null;if(typeof i=="string"&&i.trim()===""){o=!0;return}const u=w(i);return Object.is(u,i)||(o=!0),u});o&&d(f,l)}for(const f of z){const r=s[f];!r||typeof r!="object"||Array.isArray(r)||d(f,_(r))}return $}return{bool:L,FLAG_DEFAULTS:C,canonicalFlags:A,NUMERIC_KEYS:E,NUMERIC_ARRAY_KEYS:q,NUMERIC_MAP_KEYS:z,canonicalNumbers:k}})(),v.diff=(function(){const{bool:L}=v.bool||{},C=new Set(["summary","interpret","castAt","asOf","precision","disclaimer","note","trueSolarText","civilText","offsetMinutes","input","jd","juMethod","juMethodNote","lateZiHourMode","leapPolicy","schools","bodyMasterSchool","bodyMasterNote","handle","handleError","revision","brief","briefError"]),Z=i=>i!==null&&typeof i=="object";function H(i,u,h="",y=[]){if(i===u)return y;if(!Z(i)||!Z(u))return y.push({path:h||"(root)",from:i,to:u}),y;const S=new Set([...Object.keys(i),...Object.keys(u)]);for(const x of S){if(C.has(x))continue;const b=h?`${h}.${x}`:x,G=i[x],I=u[x];Z(G)&&Z(I)?H(G,I,b,y):JSON.stringify(G)!==JSON.stringify(I)&&y.push({path:b,from:G,to:I})}return y}const P=[[/^pillars\.year\.ganzhi$/,"年柱"],[/^pillars\.month\.ganzhi$/,"月柱"],[/^pillars\.day\.ganzhi$/,"日柱"],[/^pillars\.hour\.ganzhi$/,"时柱"],[/^pillars\.\w+\.hidden/,"藏干"],[/^pillars\.\w+\.stemTenGod$/,"十神"],[/^pillars\.\w+\.kongwang/,"空亡"],[/^pillars\.\w+\.dishi$|^pillars\.\w+\.zizuo$/,"十二长生"],[/^pillars\.\w+\.nayin$/,"纳音"],[/^dayMaster\./,"日主"],[/^palaces\.(taiyuan|minggong|shengong)\./,"命身宫"],[/^palaces\.\d+\.(palace|branch|stem|ganzhi)$/,"宫位"],[/^palaces\.\d+\.stars\.\d+\.(name|brightness|type)$/,"星曜"],[/^palaces\.\d+\.shensha\./,"神煞"],[/^palaces\.\d+\.(daxian|xiaoxian)\./,"大限"],[/^palaces\.\d+\.sanfang\./,"三方四正"],[/^palaces\.\d+\./,"宫位"],[/^palaces\./,"命身宫"],[/^soul\./,"命宫"],[/^body\./,"身宫"],[/^doujun\./,"流年斗君"],[/^siZhu\.year$/,"年柱"],[/^siZhu\.month$/,"月柱"],[/^siZhu\.day$/,"日柱"],[/^siZhu\.time$/,"时柱"],[/^ju$|^juNumber$/,"局数"],[/^yuan$/,"三元"],[/^dun$/,"阴阳遁"],[/^daxian(List)?\./,"大限"],[/^fly(Chains|Composite)?\./,"飞星"],[/^pattern/,"格局"],[/^schools\./,"流派回显"],[/^dayun\.jiao\./,"起运"],[/^dayun\.toNextJieDays$/,"起运时间"],[/^dayun\.list\.(\d+)\.ganzhi$/,"大运干支"],[/^dayun\.startAge(Exact)?\./,"起运时间"],[/^dayun\./,"大运评分"],[/^liunian\./,"流年"],[/^jieqi\./,"节气边界"],[/^solarTime\./,"真太阳时"],[/^dayGanZhi$/,"日辰"],[/^hourZhi$/,"时支"],[/^yueJiang\./,"月将"],[/^xunKong$/,"旬空"],[/^lines\.(\d+)\./,"爻"],[/^shensha\./,"神煞"],[/^frame\./,"格局用神"],[/^strength\./,"旺衰"],[/^wuxing\./,"五行计数"],[/^relations\./,"干支关系"],[/^input\./,"输入回显"]],A=[[/^pillars\./,"四柱"],[/^shensha\./,"神煞"],[/^dayun\./,"大运"],[/^liunian\./,"流年"],[/^frame\./,"格局用神"],[/^strength\./,"旺衰"],[/^wuxing\./,"五行计数"],[/^dayMaster\./,"日主"],[/^relations\./,"干支关系"],[/^palaces\.(taiyuan|minggong|shengong)\./,"命身宫"],[/^palaces\.\d+\./,"宫位"],[/^palaces\./,"命身宫"],[/^soul\.|^body\.|^doujun\./,"命身宫"],[/^siZhu\./,"四柱"],[/^ju$|^juNumber$|^yuan$|^dun$/,"局数"],[/^daxian/,"大限"],[/^fly/,"飞星"],[/^pattern/,"格局"],[/^jieqi\./,"节气"],[/^solarTime\./,"真太阳时"],[/^input\./,"输入回显"],[/^lines\./,"爻"]],E=[[/^pillars\.(year|month|day|hour)\.ganzhi$/,"柱"],[/^palaces\.(minggong|shengong)\.ganzhi$/,"命身宫"],[/^soul\.ganzhi$/,"命宫"],[/^body\.branch$/,"身宫"],[/^siZhu\.(year|month|day|time)$/,"柱"],[/^dayun\.jiao\.at$/,"起运"],[/^dayGanZhi$/,"日辰"],[/^hourZhi$/,"时支"],[/^ju$|^juNumber$|^juName$/,"局数"],[/^dun$/,"阴阳遁"],[/^lines\.\d+\.(ganzhi|yinYang|name)$/,"爻"],[/^yueJiang\.(name|zhi)$/,"月将"]];function q(i){for(const[u,h]of P)if(u.test(i))return h;return z(i)||i}function z(i){for(const[u,h]of A)if(u.test(i))return h;return""}function p(i){for(const[u,h]of E)if(u.test(i))return h;return""}function w(i){return[...i].sort((u,h)=>u.path.localeCompare(h.path,"zh-Hans-CN",{numeric:!0}))}function _(i){if(!i.length)return"本盘不受此口径影响:所有字段一致。";const u=i.filter(x=>p(x.path)),h=[...new Set(i.map(x=>z(x.path)).filter(Boolean))],y=u.length?`根因 ${u.length} 处:`+u.slice(0,4).map(x=>`${q(x.path)} ${k(x.from)}→${k(x.to)}`).join("、")+(u.length>4?" 等":""):"无单一根因",S=h.length?`;连带影响 ${h.slice(0,6).join("、")}${h.length>6?" 等":""} ${h.length} 类,共 ${i.length} 处`:`;共 ${i.length} 处`;return y+S+"。"}const k=i=>i===void 0?"—":i===null?"null":typeof i=="string"?i:Array.isArray(i)?i.join("")||"[]":typeof i=="object"?JSON.stringify(i):String(i);function s(i,{title:u="",limit:h=12}={}){const y=[];if(u&&y.push(`【${u}】`),y.push(_(i)),!i.length)return y.join(`
2
2
  `);const S=w(i.filter(b=>p(b.path))),x=w(i.filter(b=>!p(b.path)));if(S.length){y.push(""),y.push(" 根因(口径直接改动):");for(const b of S)y.push(` ${q(b.path).padEnd(6)} ${k(b.from)} → ${k(b.to)}`)}if(x.length){y.push(""),y.push(` 连带变化(${x.length} 处,展示前 ${Math.min(h,x.length)} 处):`);for(const b of x.slice(0,h))y.push(` ${q(b.path).padEnd(6)} ${k(b.from)} → ${k(b.to)}`);if(x.length>h){const b={};for(const G of x.slice(h)){const I=z(G.path)||"其他";b[I]=(b[I]||0)+1}y.push(" 其余:"+Object.entries(b).map(([G,I])=>`${G} ${I} 处`).join("、"))}}return y.join(`
3
- `)}const $=(i,u,h,y,S,x)=>({key:i,title:u,short:h,read:b=>{const G=b[i]!==void 0?b[i]:b.schools&&b.schools[i];return x[G]?G:y},alt:b=>b===S?y:S,label:b=>x[b]||b}),d={bazi:[{key:"lateZi",title:"晚子时:23:00 后是否换日",short:"晚子时",read:i=>L(i.lateZi,!0),alt:i=>!i,label:i=>i?"换日":"不换日"},{key:"trueSolar",title:"真太阳时:是否按出生地经度修正",short:"真太阳时",read:i=>L(i.trueSolar,!0),alt:i=>!i,label:i=>i?"修正":"不修正"}],ziwei:[{key:"leapMonth",title:"闰月归月:按日切分 / 整月归次月",short:"闰月归月",read:i=>i.leapMonth==="next"||i.leapMonth==="prev"?i.leapMonth:"split",alt:i=>i==="split"?"next":"split",label:i=>({split:"按日切分",next:"整月归次月",prev:"整月归本月"})[i]||i},{key:"trueSolar",title:"真太阳时:是否按出生地经度修正",short:"真太阳时",read:i=>L(i.trueSolar,!0),alt:i=>!i,label:i=>i?"修正":"不修正"},$("brightnessSchool","亮度表:默认 / QS 七档","亮度表","default","QS",{default:"默认",QS:"QS(七档)",XD1:"XD1(七档)",ZZ:"ZZ(五档)",XD2:"XD2(五档)"}),$("gengYearSihua","庚干四化:阳武阴同 / 同科阴忌","庚干四化","GYWYT","GYWTY",{GYWYT:"阳武阴同",GYWTY:"同科阴忌",GYWFT:"府科同忌",GYWFX:"府科相忌",GYWTX:"同科相忌"}),$("tianmaSchool","天马:按年支 / 按生月","天马","year-branch","month-branch",{"year-branch":"年支","month-branch":"生月"}),$("tiankongSchool","天空:不排 / 年支顺行","天空","off","normal",{off:"不排",normal:"年支顺行","shun-jia-shi":"加生时"}),$("jiekongSchool","截空旬空:不排 / 正副双星","截空旬空","off","double",{off:"不排",single:"单星",double:"正副双星",zhanyan:"占验派"}),$("kuiyueSchool","魁钺:qs1 / qs2","魁钺","qs1","qs2",{qs1:"qs1",qs2:"qs2","zhong-yiming":"中一鸣"}),$("tianshiTianshang","天伤天使:常规 / 中州互换","天伤天使","normal","zhongzhou",{normal:"常规",zhongzhou:"中州(阴男阳女互换)"}),$("changshengSchool","长生:阴阳顺逆 / 火土起寅","长生","yin-yang-shun-ni","huo-tu",{"yin-yang-shun-ni":"阴阳顺逆","shui-tu":"水二","huo-tu":"火土(土五局起寅)"}),$("lateZishi","晚子时:归当日 / 归次日","晚子时","current-day","next-day",{"current-day":"归当日","next-day":"归次日","all-current":"全归当日","day-cur-time-next":"日归当日·时归次日"}),$("shenzhuSchool","身主:子午皆火星 / 子铃午火","身主","common","verse",{common:"子午皆火星",verse:"子铃午火(安身主诀逐字)"}),$("mingzhuSchool","命主取法:命宫地支 / 生年年支","命主取法","soul-branch","year-branch",{"soul-branch":"命宫地支(通行本)","year-branch":"生年年支(中州派)"}),$("zuoyaoSchool","杂曜:49 颗简盘 / 61 颗全表","杂曜全表","minimal","full",{minimal:"49 颗(简盘)",full:"61 颗(加十二颗杂曜)"}),$("liunianSihua","流年四化取干:流年天干 / 流年命宫宫干","流年四化取干","year-stem","life-palace-stem",{"year-stem":"流年天干","life-palace-stem":"流年命宫宫干"}),$("sihuaVariant","十干四化:通行表 / 变体整表替换","十干四化变体","default","廉破曲阳",{default:"各干通行表",廉破曲阳:"甲干 廉破曲阳",贪阴阳机:"戊干 贪阴阳机",阳武同阴:"庚干 阳武同阴",阳武府同:"庚干 阳武府同",阳武府相:"庚干 阳武府相",阳武同相:"庚干 阳武同相",巨阳武昌:"辛干 巨阳武昌",梁紫府武:"壬干 梁紫府武",梁紫相武:"壬干 梁紫相武",破巨阳贪:"癸干 破巨阳贪"})],qimen:[{key:"juMethod",title:"取局流派:拆补 / 超神接气 / 置闰",short:"取局流派",read:i=>["chaibu","chaoshen","zhirun"].includes(i.juMethod)?i.juMethod:"chaibu",alt:i=>i==="chaibu"?"zhirun":"chaibu",label:i=>({chaibu:"拆补法",chaoshen:"超神接气",zhirun:"置闰法"})[i]||i},{key:"lateZiHourMode",title:"晚子时:23:00 后归当日 / 次日",short:"晚子时归日",read:i=>i.lateZiHourMode==="next-day"?"next-day":"same-day",alt:i=>i==="next-day"?"same-day":"next-day",label:i=>i==="next-day"?"归次日":"归当日"}]},f={bazi:[{path:"pillars.day.ganzhi",label:"日柱"},{path:"pillars.hour.ganzhi",label:"时柱"},{path:"strength.level",label:"旺衰"},{path:"frame.primaryName",label:"格局"},{path:"frame.yongshen.favor",label:"喜用"},{path:"dayun.jiao.at",label:"起运"}],ziwei:[{path:"soul.ganzhi",label:"命宫"},{path:"body.branch",label:"身宫支"},{path:"bureau.name",label:"五行局"},{path:"bodyMaster",label:"身主"},{path:"daxianList.0.ages",label:"起大限"}],qimen:[{path:"siZhu.day",label:"日柱"},{path:"ju",label:"局数"},{path:"zhiFu.star",label:"值符"},{path:"zhiShi.gate",label:"值使"}]};function r(i,u){let h=i;for(const y of String(u).split(".")){if(h==null)return;h=h[y]}return h}function o(i){return i==null?"—":Array.isArray(i)?i.join("、"):typeof i=="object"?"—":String(i)}function l(i,u,h){return(f[i]||[]).map(S=>{const x=o(r(u,S.path)),b=o(r(h,S.path));return{key:S.path,label:S.label,current:x,alt:b,changed:x!==b}})}return{diffObjects:H,labelOf:q,categoryOf:z,rootOf:p,sortDiffs:w,summarize:_,formatValue:k,renderDiff:s,CALIBER_SWITCHES:d,CALIBER_VIEWS:f,viewCell:o,viewRows:l}})(),v.fingerprint=(function(){const L="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function C(A){return JSON.stringify(Z(A))}function Z(A){if(A===null)return null;const E=typeof A;if(E==="string")return typeof A.normalize=="function"?A.normalize("NFC"):A;if(E==="number")return Number.isFinite(A)?Object.is(A,-0)?0:A:null;if(E==="boolean")return A;if(Array.isArray(A))return A.map(Z);if(E==="object"){const q=Object.create(null);for(const z of Object.keys(A).sort()){const p=A[z];p===void 0||typeof p=="function"||typeof p=="symbol"||(q[z]=Z(p))}return q}return null}function H(A){const E=String(A);let q=2166136261,z=2654435769;for(let _=0;_<E.length;_+=1){const k=E.charCodeAt(_);for(const s of[k&255,k>>>8])q=Math.imul(q^s,16777619),z=Math.imul(z^s,2246822507)}let p=(q>>>0)*8+(z>>>29),w="";for(let _=0;_<7;_+=1)w=L[p%32]+w,p=Math.floor(p/32);return w}function P(A={}){const E=String(A.system||""),q=String(A.version||"dev"),z=A.seed===void 0||A.seed===null||A.seed===""?null:Number(A.seed),p=A.asOf?String(A.asOf):null,w=A.params&&typeof A.params=="object"?A.params:{},_=C({system:E,params:w,seed:z,asOf:p}),k=C({base:_,version:q});return{id:`LY-${H(k)}`,baseId:`LY-${H(_)}`,version:q,system:E,payload:_}}return{canonicalJson:C,shortHash:H,fingerprintOf:P}})(),v.validate=(function(){const{fail:L}=v.fail||{},C=1600,Z=2400;function H(w){return w%4===0&&w%100!==0||w%400===0}function P(w,_){return _===2?H(w)?29:28:[31,28,31,30,31,30,31,31,30,31,30,31][_-1]||0}const A=w=>typeof w=="string"?`「${w}」`:String(w),E="引擎只接受解析好的公历字段 { year, month, day, hour?, minute? };字符串请先交给宿主层的 parseDateTime 解析";function q(w,_=""){const k=_?`${_} 的`:"";if(!w||typeof w!="object"||Array.isArray(w)){const f=w===null?"null":Array.isArray(w)?"数组":typeof w;throw L("E_INPUT",`${k}入参必须是对象(收到 ${f});${E}`)}const s=w.hour===void 0?0:w.hour,$=w.minute===void 0?0:w.minute;for(const[f,r]of[["year",w.year],["month",w.month],["day",w.day],["hour",s],["minute",$]])if(!Number.isInteger(r))throw L("E_INPUT",`${k}${f} 必须是整数(收到 ${A(r)});${E}`);if(w.year<C||w.year>Z)throw L("E_INPUT",`${k}year 超出支持范围 ${C}–${Z}(收到 ${w.year});更早的年份时区与历法口径不可靠`);if(w.month<1||w.month>12)throw L("E_INPUT",`${k}month 超出范围 1–12(收到 ${w.month})`);const d=P(w.year,w.month);if(w.day<1||w.day>d)throw L("E_INPUT",`${k}日期不存在:${w.year}-${w.month}-${w.day}(${w.year} 年 ${w.month} 月只有 ${d} 天)`);if(s<0||s>23)throw L("E_INPUT",`${k}hour 超出范围 0–23(收到 ${s})`);if($<0||$>59)throw L("E_INPUT",`${k}minute 超出范围 0–59(收到 ${$})`);return w}function z(w,_,k){if(!w||typeof w!="object"||Array.isArray(w)){const s=w===null?"null":w===void 0?"undefined":Array.isArray(w)?"数组":typeof w;throw L("E_INPUT",`${_} 必须是对象(收到 ${s});${k}`)}return w}function p(w,_=""){const k=_?`${_}:`:"";if(w.year<C||w.year>Z)throw L("E_RANGE",`${k}晚子时按次日归后落到 ${w.year}-${String(w.month).padStart(2,"0")}-${String(w.day).padStart(2,"0")},超出可计算范围 ${C}–${Z};请把时刻挪到 23 点前,或换一天起课`);return w}return{MIN_YEAR:C,MAX_YEAR:Z,isLeapYear:H,daysInMonth:P,assertCivil:q,assertObject:z,assertShifted:p}})(),v.datetime=(function(){const{fail:L}=v.fail||{},{MIN_YEAR:C,MAX_YEAR:Z}=v.validate||{};function H(E,q){return q===2?E%4===0&&E%100!==0||E%400===0?29:28:[31,28,31,30,31,30,31,31,30,31,30,31][q-1]}function P(E,q=""){const z=String(E??"").trim(),p=/^(\d{4})-(\d{1,2})-(\d{1,2})$/.exec(z);if(!p)return null;const w=Number(p[1]),_=Number(p[2]),k=Number(p[3]);if(_<1||_>12||k<1||k>H(w,_))return null;if(w<C||w>Z){const s=q?`${q} `:"";throw L("E_RANGE",`${s}「${p[0]}」的年份超出可计算范围(${C}–${Z},收到 ${w} 年);农历与节气表不覆盖之外的年份`)}return{year:w,month:_,day:k}}function A(E){if(typeof E!="string"||!E.trim())throw L("E_INPUT","缺少 datetime(公历日期时间),例如 1990-05-12T14:30");const q=E.trim().match(/^(\d{4})-(\d{1,2})-(\d{1,2})(?:[T\s](\d{1,2}):(\d{1,2})(?::(\d{1,2}))?)?$/);if(!q)throw L("E_INPUT",`无法解析 datetime:「${E}」,请用 1990-05-12T14:30 这种格式`);if(q[6]!==void 0&&Number(q[6])>59)throw L("E_INPUT",`秒超出范围:${q[6]}`);const z={year:Number(q[1]),month:Number(q[2]),day:Number(q[3]),hour:Number(q[4]??0),minute:Number(q[5]??0)};if(z.month<1||z.month>12)throw L("E_INPUT",`月份超出范围:${z.month}`);const p=H(z.year,z.month);if(z.day<1||z.day>p)throw L("E_INPUT",`日期不存在:${z.year}-${z.month}-${z.day}(${z.year} 年 ${z.month} 月只有 ${p} 天)`);if(z.hour>23||z.minute>59)throw L("E_INPUT",`时间超出范围:${z.hour}:${z.minute}`);if(z.year<C||z.year>Z)throw L("E_RANGE",`年份 ${z.year} 超出可计算范围(${C}–${Z})`);return(z.year<1900||z.year>2100)&&(z.precision={level:"approx",note:`ΔT 模型仅覆盖 1900–2100,${z.year} 年按端点值外推,节气与朔望时刻可能有分钟级偏差,月柱在交节前后需复核`}),z}return{daysInMonth:H,parseYmd:P,parseDateTime:A}})(),v.lru=(function(){function L({max:C=64,ttlMs:Z=0,name:H="lru",now:P=()=>Date.now()}={}){const A=new Map,E={name:H,hits:0,misses:0,evictions:0,expirations:0},q=z=>Z>0&&P()-z.at>Z;return{name:H,max:C,ttlMs:Z,get(z){const p=A.get(z);if(!p||q(p)){p&&(A.delete(z),E.expirations+=1),E.misses+=1;return}return A.delete(z),A.set(z,p),E.hits+=1,p.value},set(z,p){for(A.has(z)&&A.delete(z),A.set(z,{value:p,at:P()});A.size>C;)A.delete(A.keys().next().value),E.evictions+=1;return p},has(z){const p=A.get(z);return p?q(p)?(A.delete(z),E.expirations+=1,!1):!0:!1},delete(z){return A.delete(z)},clear(){A.clear()},get size(){return A.size},stats(){const z=E.hits+E.misses;return{name:H,size:A.size,max:C,hits:E.hits,misses:E.misses,evictions:E.evictions,expirations:E.expirations,hitRate:z?E.hits/z:0}}}}return{createLru:L}})(),v.nayin=(function(){const L=["海中金","炉中火","大林木","路旁土","剑锋金","山头火","涧下水","城头土","白蜡金","杨柳木","泉中水","屋上土","霹雳火","松柏木","长流水","沙中金","山下火","平地木","壁上土","金箔金","覆灯火","天河水","大驿土","钗钏金","桑柘木","大溪水","沙中土","天上火","石榴木","大海水"];function C(Z){const H=(Number(Z)%60+60)%60,P=L[Math.floor(H/2)];return{name:P,element:P[2]}}return{NAYIN_NAMES:L,nayinOf:C}})(),v.sanhe=(function(){const L=[{branches:["申","子","辰"],element:"水"},{branches:["亥","卯","未"],element:"木"},{branches:["寅","午","戌"],element:"火"},{branches:["巳","酉","丑"],element:"金"}],C=Object.fromEntries(L.map(P=>[P.branches.join(""),P.element])),Z=Object.fromEntries(L.flatMap(P=>P.branches.map(A=>[A,P.element])));function H(P){return L.find(A=>A.branches.includes(P))||null}return{SANHE_GROUPS:L,SANHE:C,SANHE_ELEMENT:Z,sanheGroupOf:H}})(),v["vsop-earth"]=(function(){const L=[[1.75347045673,0,0],[.03341656453,4.66925680415,6283.0758499914],[.00034894275,4.62610242189,12566.1516999828],[3417572e-11,2.82886579754,3.523118349],[3497056e-11,2.74411783405,5753.3848848968],[3135899e-11,3.62767041756,77713.7714681205],[2676218e-11,4.41808345438,7860.4193924392],[2342691e-11,6.13516214446,3930.2096962196],[1273165e-11,2.03709657878,529.6909650946],[1324294e-11,.74246341673,11506.7697697936],[901854e-11,2.04505446477,26.2983197998],[1199167e-11,1.10962946234,1577.3435424478],[857223e-11,3.50849152283,398.1490034082],[779786e-11,1.17882681962,5223.6939198022],[99025e-10,5.23268072088,5884.9268465832],[753141e-11,2.53339052847,5507.5532386674],[505267e-11,4.58292599973,18849.2275499742],[492392e-11,4.20505711826,775.522611324],[356672e-11,2.91954114478,.0673103028],[284125e-11,1.89869240932,796.2980068164],[242879e-11,.34481445893,5486.777843175],[317087e-11,5.84901948512,11790.6290886588],[271112e-11,.31486255375,10977.078804699],[206217e-11,4.80646631478,2544.3144198834],[205478e-11,1.86953770281,5573.1428014331],[202318e-11,2.45767790232,6069.7767545534],[126225e-11,1.08295459501,20.7753954924],[155516e-11,.83306084617,213.299095438],[115132e-11,.64544911683,.9803210682],[102851e-11,.63599845579,4694.0029547076],[101724e-11,4.2667980198,7.1135470008],[99206e-11,6.20992926918,2146.1654164752],[132212e-11,3.41118292683,2942.4634232916],[97607e-11,.68101342359,155.4203994342],[85128e-11,1.29870764804,6275.9623029906],[74651e-11,1.755089133,5088.6288397668],[101895e-11,.97569280312,15720.8387848784],[84711e-11,3.67080093031,71430.69561812909],[73547e-11,4.67926633877,801.8209311238],[73874e-11,3.50319414955,3154.6870848956],[78757e-11,3.03697458703,12036.4607348882],[79637e-11,1.80791287082,17260.1546546904],[85803e-11,5.9832263126,161000.6857376741],[56963e-11,2.78430458592,6286.5989683404],[61148e-11,1.81839892984,7084.8967811152],[69627e-11,.83297621398,9437.762934887],[56116e-11,4.38694865354,14143.4952424306],[62449e-11,3.97763912806,8827.3902698748],[51145e-11,.28306832879,5856.4776591154],[55577e-11,3.47006059924,6279.5527316424],[41036e-11,5.36817592855,8429.2412664666],[51605e-11,1.33282739866,1748.016413067],[51992e-11,.18914947184,12139.5535091068],[49e-8,.48735014197,1194.4470102246],[392e-9,6.16833020996,10447.3878396044],[3557e-10,1.775968892,6812.766815086],[3677e-10,6.04133863162,10213.285546211],[36596e-11,2.56957481827,1059.3819301892],[33296e-11,.59310278598,17789.845619785],[35954e-11,1.70875808777,2352.8661537718],[40938e-11,2.39850938714,19651.048481098],[30047e-11,2.73975124088,1349.8674096588],[30412e-11,.44294464169,83996.84731811189],[23663e-11,.48473622521,8031.0922630584],[23574e-11,2.06528133162,3340.6124266998],[21089e-11,4.14825468851,951.7184062506],[24738e-11,.21484762138,3.5904286518],[25352e-11,3.16470891653,4690.4798363586],[22823e-11,5.22195230819,4705.7323075436],[21419e-11,1.42563910473,16730.4636895958],[21891e-11,5.55594302779,553.5694028424],[203e-9,.37133792946,283.8593188652]],C=[[6283.0758499914,0,0],[.00206058863,2.67823455808,6283.0758499914],[4303419e-11,2.63512233481,12566.1516999828],[425264e-11,1.59046982018,3.523118349],[109017e-11,2.96631010675,1577.3435424478],[93479e-11,2.59211109542,18849.2275499742],[119305e-11,5.79555765566,26.2983197998],[72121e-11,1.13840581212,529.6909650946],[67784e-11,1.87453300345,398.1490034082],[6735e-10,4.40932832004,5507.5532386674],[59045e-11,2.88815790631,5223.6939198022],[55976e-11,2.17471740035,155.4203994342],[45411e-11,.39799502896,796.2980068164],[36298e-11,.46875437227,775.522611324],[28962e-11,2.64732254645,7.1135470008],[20844e-11,5.34138275149,.9803210682]],Z=[[8721859e-11,1.07253635559,6283.0758499914],[99099e-10,3.14159265359,0],[294833e-11,.43717350256,12566.1516999828],[27338e-11,.05295636147,3.523118349],[16333e-11,5.18820215724,26.2983197998],[15745e-11,3.68504712183,155.4203994342],[9425e-11,.29667114694,18849.2275499742],[8938e-11,2.05706319592,77713.7714681205],[694e-10,.82691541038,775.522611324],[5061e-11,4.6624323168,1577.3435424478]],H=[[289058e-11,5.84173149732,6283.0758499914],[20712e-11,6.0498393902,12566.1516999828],[2962e-11,5.1956057957,155.4203994342],[2527e-11,3.14159265359,0],[1288e-11,4.7219761197,3.523118349]],P=[[7714e-11,4.14117321449,6283.0758499914],[1016e-11,3.27573644241,12566.1516999828]];function A(E){let q=0;for(const[p,w,_]of L)q+=p*Math.cos(w+_*E);let z=1;for(const p of[C,Z,H,P]){z*=E;for(const[w,_,k]of p)q+=w*z*Math.cos(_+k*E)}return q}return{earthL:A}})(),v.calendar=(function(){const{earthL:L}=v["vsop-earth"]||{},{createLru:C}=v.lru||{},{bool:Z}=v.bool||{},H=["甲","乙","丙","丁","戊","己","庚","辛","壬","癸"],P=["子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"],A=["小寒","大寒","立春","雨水","惊蛰","春分","清明","谷雨","立夏","小满","芒种","夏至","小暑","大暑","立秋","处暑","白露","秋分","寒露","霜降","立冬","小雪","大雪","冬至"];function E(R){return(285+15*R)%360}function q(R,D,Y){const ie=Math.floor((14-D)/12),Q=R+4800-ie,F=D+12*ie-3;return Y+Math.floor((153*F+2)/5)+365*Q+Math.floor(Q/4)-Math.floor(Q/100)+Math.floor(Q/400)-32045}function z(R){const D=R+32044,Y=Math.floor((4*D+3)/146097),ie=D-Math.floor(146097*Y/4),Q=Math.floor((4*ie+3)/1461),F=ie-Math.floor(1461*Q/4),B=Math.floor((5*F+2)/153);return{year:100*Y+Q-4800+Math.floor(B/10),month:B+3-12*Math.floor(B/10),day:F-Math.floor((153*B+2)/5)+1}}function p(R,D){for(let Y=0;Y<60;Y++)if(Y%10===R&&Y%12===D)return Y;return-1}function w(R){const D=(R%60+60)%60;return{index:D,stem:H[D%10],branch:P[D%12],name:H[D%10]+P[D%12]}}function _(R){return((R+49)%60+60)%60}function k(R){const D=R-2451545,Y=D/36525,ie=D/365250;let Q=L(ie)*180/Math.PI+180;Q=(Q%360+360)%360;const F=(5029.0966*Y+1.11113*Y*Y-6e-6*Y*Y*Y)/3600;Q+=F,Q-=.09033/3600;const B=(125.04452-1934.136261*Y)*Math.PI/180,le=(280.4665+36000.7698*Y)*Math.PI/180,oe=(218.3165+481267.8813*Y)*Math.PI/180,xe=(-17.2*Math.sin(B)-1.32*Math.sin(2*le)-.23*Math.sin(2*oe)+.21*Math.sin(2*B))/3600;Q+=xe;const ne=(357.52911+35999.05029*Y-1537e-7*Y*Y)*Math.PI/180,pe=.016708634-42037e-9*Y-1267e-10*Y*Y,Ce=1.000001018*(1-pe*pe)/(1+pe*Math.cos(ne+(1.914602-.004817*Y)*(Math.PI/180)*Math.sin(ne)));return Q-=20.4898/3600/(Ce||1),(Q%360+360)%360}function s(R){if(R<1900){const B=R;if(B<1600)return 120;if(B<1700){const oe=B-1600;return 120-.9808*oe-.01532*oe*oe+oe*oe*oe/7129}if(B<1800){const oe=B-1700;return 8.83+.1603*oe-.0059285*oe*oe+13336e-8*oe*oe*oe-oe**4/1174e3}if(B<1860){const oe=B-1800;return 13.72-.332447*oe+.0068612*oe*oe+.0041116*oe**3-37436e-8*oe**4+121272e-10*oe**5-1699e-10*oe**6+875e-12*oe**7}const le=B-1860;return 7.62+.5737*le-.251754*le*le+.01680668*le**3-.0004473624*le**4+le**5/233174}const D=[[1900,-2.8],[1920,21.2],[1940,24.3],[1950,29.1],[1960,33.2],[1970,40.2],[1980,50.5],[1990,56.9],[2e3,63.8],[2010,66.1],[2020,69.4],[2030,72],[2050,80],[2100,110]];if(R<=D[0][0])return D[0][1];for(let B=1;B<D.length;B++)if(R<=D[B][0]){const[le,oe]=D[B-1],[xe,ne]=D[B];return oe+(ne-oe)*(R-le)/(xe-le)}const[Y,ie]=D[D.length-1],Q=(Y-1820)/100,F=(R-1820)/100;return ie+32*(F*F-Q*Q)}const $=8/24,d=7.7611/24,f=2425612+4/24;function r(R){return R<f?d:$}const o=C({max:4096,name:"termInstant"}),l=1e-5,i=new Map,u=365.2422;function h(R,D){const Y=E(D),ie=q(R,1,5)-.5+D*15.2184,Q=i.get(D);let F=Q!==void 0?Q+u:ie;Math.abs(F-ie)>20&&(F=ie);for(let le=0;le<12;le++){let oe=Y-k(F);if(oe=((oe+180)%360+360)%360-180,F+=oe/.98564736,Math.abs(oe)<l)break}i.set(D,F);const B=F-s(R)/86400;return B+r(B)}function y(R,D){const Y=R*24+D,ie=o.get(Y);if(ie!==void 0)return ie;const Q=h(R,D);return o.set(Y,Q),Q}function S(R){const D=Math.floor(R+.5),Y=R+.5-D,ie=Math.min(1439,Math.floor(Math.round(Y*86400)/60)),{year:Q,month:F,day:B}=z(D);return{year:Q,month:F,day:B,hour:Math.floor(ie/60),minute:ie%60}}function x({year:R,month:D,day:Y,hour:ie=0,minute:Q=0}){return q(R,D,Y)-.5+(ie*60+Q)/1440}function b(R,D,Y){const ie=q(R,D,Y)-q(R,1,1)+1,Q=2*Math.PI*(ie-81)/364;return 9.87*Math.sin(2*Q)-7.53*Math.cos(Q)-1.5*Math.sin(Q)}const G=C({max:8,name:"termWindow"}),I=C({max:32,name:"termYear"}),fe=Array.from({length:24},(R,D)=>D),we=fe.filter(R=>R%2===0);function c(R,D){const Y=D?`${R}|jie`:`${R}|all`,ie=I.get(Y);if(ie)return ie;if(D){const F=I.get(`${R}|all`);if(F){const B=F.filter(le=>le.index%2===0);return I.set(Y,B),B}}const Q=[];for(const F of D?we:fe)Q.push({year:R,index:F,name:A[F],jd:y(R,F)});return Q.sort((F,B)=>F.jd-B.jd),I.set(Y,Q),Q}function M(R,D={}){const Y=Z(D.jieOnly),ie=Y?`${R}|jie`:R,Q=G.get(ie);if(Q)return Q;const F=[...c(R-1,Y),...c(R,Y),...c(R+1,Y)];return F.sort((B,le)=>B.jd-le.jd),G.set(ie,F),F}function J(R){if(typeof R!="string"||R.length<2)return[];const D=H.indexOf(R[0]),Y=P.indexOf(R[1]);if(D<0||Y<0)return[];const ie=p(D,Y);if(ie<0)return[];const Q=Math.floor(ie/10)*10;return[P[(Q+10)%12],P[(Q+11)%12]]}function te(R,D){let Y=null;for(const ie of R)if(ie.index%2===0)if(ie.jd<=D)Y=ie;else break;return Y}function X(R,D){for(const Y of R)if(Y.index%2===0&&Y.jd>D)return Y;return null}function ee(R){const D=S(R),Y=ie=>String(ie).padStart(2,"0");return`${D.year}-${Y(D.month)}-${Y(D.day)} ${Y(D.hour)}:${Y(D.minute)}`}function re(){return[o.stats(),I.stats(),G.stats()]}return{STEMS:H,BRANCHES:P,TERM_NAMES:A,termLongitude:E,toJDN:q,fromJDN:z,sexagenaryIndex:p,ganzhiName:w,dayGanzhiIndex:_,sunLongitude:k,deltaTSeconds:s,OFFSET_MODERN:$,OFFSET_BEIJING_LOCAL:d,CUTOVER_JD:f,localOffsetFor:r,termInstantJd:y,jdToParts:S,partsToJd:x,equationOfTime:b,termWindow:M,xunKongOf:J,previousJie:te,nextJie:X,formatJd:ee,cacheMetrics:re}})(),v.lunar=(function(){const{toJDN:L,jdToParts:C,termInstantJd:Z,deltaTSeconds:H,localOffsetFor:P}=v.calendar||{},A=29.530588861,E=245155009766e-5,q=Math.PI/180;function z(s){const $=s/1236.85,d=E+A*s+15437e-8*$*$-15e-8*$*$*$+73e-11*$*$*$*$,f=1-.002516*$-74e-7*$*$,r=(2.5534+29.1053567*s-14e-7*$*$-11e-8*$*$*$)*q,o=(201.5643+385.81693528*s+.0107582*$*$+1238e-8*$*$*$-58e-9*$*$*$*$)*q,l=(160.7108+390.67050284*s-.0016118*$*$-227e-8*$*$*$+11e-9*$*$*$*$)*q,i=(124.7746-1.56375588*s+.0020672*$*$+215e-8*$*$*$)*q,u=-.4072*Math.sin(o)+.17241*f*Math.sin(r)+.01608*Math.sin(2*o)+.01039*Math.sin(2*l)+.00739*f*Math.sin(o-r)-.00514*f*Math.sin(o+r)+.00208*f*f*Math.sin(2*r)-.00111*Math.sin(o-2*l)-57e-5*Math.sin(o+2*l)+56e-5*f*Math.sin(2*o+r)-42e-5*Math.sin(3*o)+42e-5*f*Math.sin(r+2*l)+38e-5*f*Math.sin(r-2*l)-24e-5*f*Math.sin(2*o-r)-17e-5*Math.sin(i)-7e-5*Math.sin(o+2*r)+4e-5*Math.sin(2*o-2*l)+4e-5*Math.sin(3*r)+3e-5*Math.sin(o+r-2*l)+3e-5*Math.sin(2*o+2*l)-3e-5*Math.sin(o+r+2*l)+3e-5*Math.sin(o-r+2*l)-2e-5*Math.sin(o-r-2*l)-2e-5*Math.sin(3*o+r)+2e-5*Math.sin(4*o),h=d+u-H(2e3+$*100)/86400;return h+P(h)}function p(s){return Math.floor(s+.5)}function w(s){return Math.round((s+.5-E)/A)}function _(s,$,d){for(let f=s-1;f<=s+1;f++)for(let r=1;r<24;r+=2){const o=Z(f,r),l=p(o);if(l>=$&&l<d)return{index:r,jd:o}}return null}function k(s,$,d){const f=L(s,$,d),r=p(Z(s,23)),o=f<r?s-1:s,l=p(Z(o,23));let i=w(l);for(;p(z(i))>l;)i--;for(;p(z(i+1))<=l;)i++;const u=p(Z(o+1,23));let h=i;for(;p(z(h+1))<=u;)h++;const y=h-i;let S=-1;if(y===13)for(let G=1;G<=y;G++){const I=p(z(i+G-1)),fe=p(z(i+G));if(!_(o,I,fe)){S=G;break}}let x=11,b=!1;for(let G=1;G<=15;G++){const I=p(z(i+G-1)),fe=p(z(i+G)),we=_(o,I,fe),c=G===S;if(f>=I&&f<fe){const M=C(z(i+G-1)),J=c?(x+10)%12+1:x;return{year:o,lunarYear:b?o+1:o,month:J,day:f-I+1,isLeap:c,monthStart:`${M.year}-${String(M.month).padStart(2,"0")}-${String(M.day).padStart(2,"0")}`,hasZhongQi:!!we}}c||(x=x%12+1,x===1&&(b=!0))}throw new Error(`农历换算失败:${s}-${$}-${d}`)}return{SYNODIC:A,newMoonJd:z,dayNumberOf:p,solarToLunar:k}})(),v.geo=(function(){const{bool:L}=v.bool||{},C=`
3
+ `)}const $=(i,u,h,y,S,x)=>({key:i,title:u,short:h,read:b=>{const G=b[i]!==void 0?b[i]:b.schools&&b.schools[i];return x[G]?G:y},alt:b=>b===S?y:S,label:b=>x[b]||b}),d={bazi:[{key:"lateZi",title:"晚子时:23:00 后是否换日",short:"晚子时",read:i=>L(i.lateZi,!0),alt:i=>!i,label:i=>i?"换日":"不换日"},{key:"trueSolar",title:"真太阳时:是否按出生地经度修正",short:"真太阳时",read:i=>L(i.trueSolar,!0),alt:i=>!i,label:i=>i?"修正":"不修正"}],ziwei:[{key:"leapMonth",title:"闰月归月:按日切分 / 整月归次月",short:"闰月归月",read:i=>i.leapMonth==="next"||i.leapMonth==="prev"?i.leapMonth:"split",alt:i=>i==="split"?"next":"split",label:i=>({split:"按日切分",next:"整月归次月",prev:"整月归本月"})[i]||i},{key:"trueSolar",title:"真太阳时:是否按出生地经度修正",short:"真太阳时",read:i=>L(i.trueSolar,!0),alt:i=>!i,label:i=>i?"修正":"不修正"},$("brightnessSchool","亮度表:默认 / QS 七档","亮度表","default","QS",{default:"默认",QS:"QS(七档)",XD1:"XD1(七档)",ZZ:"ZZ(五档)",XD2:"XD2(五档)"}),$("gengYearSihua","庚干四化:阳武阴同 / 同科阴忌","庚干四化","GYWYT","GYWTY",{GYWYT:"阳武阴同",GYWTY:"同科阴忌",GYWFT:"府科同忌",GYWFX:"府科相忌",GYWTX:"同科相忌"}),$("tianmaSchool","天马:按年支 / 按生月","天马","year-branch","month-branch",{"year-branch":"年支","month-branch":"生月"}),$("tiankongSchool","天空:不排 / 年支顺行","天空","off","normal",{off:"不排",normal:"年支顺行","shun-jia-shi":"加生时"}),$("jiekongSchool","截空旬空:不排 / 正副双星","截空旬空","off","double",{off:"不排",single:"单星",double:"正副双星",zhanyan:"占验派"}),$("kuiyueSchool","魁钺:qs1 / qs2","魁钺","qs1","qs2",{qs1:"qs1",qs2:"qs2","zhong-yiming":"中一鸣"}),$("tianshiTianshang","天伤天使:常规 / 中州互换","天伤天使","normal","zhongzhou",{normal:"常规",zhongzhou:"中州(阴男阳女互换)"}),$("changshengSchool","长生:阴阳顺逆 / 火土起寅","长生","yin-yang-shun-ni","huo-tu",{"yin-yang-shun-ni":"阴阳顺逆","shui-tu":"水二","huo-tu":"火土(土五局起寅)"}),$("lateZishi","晚子时:归当日 / 归次日","晚子时","current-day","next-day",{"current-day":"归当日","next-day":"归次日","all-current":"全归当日","day-cur-time-next":"日归当日·时归次日"}),$("shenzhuSchool","身主:子午皆火星 / 子铃午火","身主","common","verse",{common:"子午皆火星",verse:"子铃午火(安身主诀逐字)"}),$("mingzhuSchool","命主取法:命宫地支 / 生年年支","命主取法","soul-branch","year-branch",{"soul-branch":"命宫地支(通行本)","year-branch":"生年年支(中州派)"}),$("zuoyaoSchool","杂曜:49 颗简盘 / 61 颗全表","杂曜全表","minimal","full",{minimal:"49 颗(简盘)",full:"61 颗(加十二颗杂曜)"}),$("liunianSihua","流年四化取干:流年天干 / 流年命宫宫干","流年四化取干","year-stem","life-palace-stem",{"year-stem":"流年天干","life-palace-stem":"流年命宫宫干"}),$("sihuaVariant","十干四化:通行表 / 变体整表替换","十干四化变体","default","廉破曲阳",{default:"各干通行表",廉破曲阳:"甲干 廉破曲阳",贪阴阳机:"戊干 贪阴阳机",阳武同阴:"庚干 阳武同阴",阳武府同:"庚干 阳武府同",阳武府相:"庚干 阳武府相",阳武同相:"庚干 阳武同相",巨阳武昌:"辛干 巨阳武昌",梁紫府武:"壬干 梁紫府武",梁紫相武:"壬干 梁紫相武",破巨阳贪:"癸干 破巨阳贪"}),$("jieluSchool","截路空亡:照常 / 不排(中州派)","截路空亡","off","zhongzhou",{off:"照常(截空/副截/旬空/副旬)",zhongzhou:"不排(中州派)"}),$("suipoSchool","岁前十二神:照常 / 大耗改岁破(中州派)","岁前十二神","off","zhongzhou",{off:"照常(大耗)",zhongzhou:"大耗改岁破"})],qimen:[{key:"juMethod",title:"取局流派:拆补 / 超神接气 / 置闰",short:"取局流派",read:i=>["chaibu","chaoshen","zhirun"].includes(i.juMethod)?i.juMethod:"chaibu",alt:i=>i==="chaibu"?"zhirun":"chaibu",label:i=>({chaibu:"拆补法",chaoshen:"超神接气",zhirun:"置闰法"})[i]||i},{key:"lateZiHourMode",title:"晚子时:23:00 后归当日 / 次日",short:"晚子时归日",read:i=>i.lateZiHourMode==="next-day"?"next-day":"same-day",alt:i=>i==="next-day"?"same-day":"next-day",label:i=>i==="next-day"?"归次日":"归当日"}]},f={bazi:[{path:"pillars.day.ganzhi",label:"日柱"},{path:"pillars.hour.ganzhi",label:"时柱"},{path:"strength.level",label:"旺衰"},{path:"frame.primaryName",label:"格局"},{path:"frame.yongshen.favor",label:"喜用"},{path:"dayun.jiao.at",label:"起运"}],ziwei:[{path:"soul.ganzhi",label:"命宫"},{path:"body.branch",label:"身宫支"},{path:"bureau.name",label:"五行局"},{path:"bodyMaster",label:"身主"},{path:"daxianList.0.ages",label:"起大限"}],qimen:[{path:"siZhu.day",label:"日柱"},{path:"ju",label:"局数"},{path:"zhiFu.star",label:"值符"},{path:"zhiShi.gate",label:"值使"}]};function r(i,u){let h=i;for(const y of String(u).split(".")){if(h==null)return;h=h[y]}return h}function o(i){return i==null?"—":Array.isArray(i)?i.join("、"):typeof i=="object"?"—":String(i)}function l(i,u,h){return(f[i]||[]).map(S=>{const x=o(r(u,S.path)),b=o(r(h,S.path));return{key:S.path,label:S.label,current:x,alt:b,changed:x!==b}})}return{diffObjects:H,labelOf:q,categoryOf:z,rootOf:p,sortDiffs:w,summarize:_,formatValue:k,renderDiff:s,CALIBER_SWITCHES:d,CALIBER_VIEWS:f,viewCell:o,viewRows:l}})(),v.fingerprint=(function(){const L="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function C(A){return JSON.stringify(Z(A))}function Z(A){if(A===null)return null;const E=typeof A;if(E==="string")return typeof A.normalize=="function"?A.normalize("NFC"):A;if(E==="number")return Number.isFinite(A)?Object.is(A,-0)?0:A:null;if(E==="boolean")return A;if(Array.isArray(A))return A.map(Z);if(E==="object"){const q=Object.create(null);for(const z of Object.keys(A).sort()){const p=A[z];p===void 0||typeof p=="function"||typeof p=="symbol"||(q[z]=Z(p))}return q}return null}function H(A){const E=String(A);let q=2166136261,z=2654435769;for(let _=0;_<E.length;_+=1){const k=E.charCodeAt(_);for(const s of[k&255,k>>>8])q=Math.imul(q^s,16777619),z=Math.imul(z^s,2246822507)}let p=(q>>>0)*8+(z>>>29),w="";for(let _=0;_<7;_+=1)w=L[p%32]+w,p=Math.floor(p/32);return w}function P(A={}){const E=String(A.system||""),q=String(A.version||"dev"),z=A.seed===void 0||A.seed===null||A.seed===""?null:Number(A.seed),p=A.asOf?String(A.asOf):null,w=A.params&&typeof A.params=="object"?A.params:{},_=C({system:E,params:w,seed:z,asOf:p}),k=C({base:_,version:q});return{id:`LY-${H(k)}`,baseId:`LY-${H(_)}`,version:q,system:E,payload:_}}return{canonicalJson:C,shortHash:H,fingerprintOf:P}})(),v.validate=(function(){const{fail:L}=v.fail||{},C=1600,Z=2400;function H(w){return w%4===0&&w%100!==0||w%400===0}function P(w,_){return _===2?H(w)?29:28:[31,28,31,30,31,30,31,31,30,31,30,31][_-1]||0}const A=w=>typeof w=="string"?`「${w}」`:String(w),E="引擎只接受解析好的公历字段 { year, month, day, hour?, minute? };字符串请先交给宿主层的 parseDateTime 解析";function q(w,_=""){const k=_?`${_} 的`:"";if(!w||typeof w!="object"||Array.isArray(w)){const f=w===null?"null":Array.isArray(w)?"数组":typeof w;throw L("E_INPUT",`${k}入参必须是对象(收到 ${f});${E}`)}const s=w.hour===void 0?0:w.hour,$=w.minute===void 0?0:w.minute;for(const[f,r]of[["year",w.year],["month",w.month],["day",w.day],["hour",s],["minute",$]])if(!Number.isInteger(r))throw L("E_INPUT",`${k}${f} 必须是整数(收到 ${A(r)});${E}`);if(w.year<C||w.year>Z)throw L("E_INPUT",`${k}year 超出支持范围 ${C}–${Z}(收到 ${w.year});更早的年份时区与历法口径不可靠`);if(w.month<1||w.month>12)throw L("E_INPUT",`${k}month 超出范围 1–12(收到 ${w.month})`);const d=P(w.year,w.month);if(w.day<1||w.day>d)throw L("E_INPUT",`${k}日期不存在:${w.year}-${w.month}-${w.day}(${w.year} 年 ${w.month} 月只有 ${d} 天)`);if(s<0||s>23)throw L("E_INPUT",`${k}hour 超出范围 0–23(收到 ${s})`);if($<0||$>59)throw L("E_INPUT",`${k}minute 超出范围 0–59(收到 ${$})`);return w}function z(w,_,k){if(!w||typeof w!="object"||Array.isArray(w)){const s=w===null?"null":w===void 0?"undefined":Array.isArray(w)?"数组":typeof w;throw L("E_INPUT",`${_} 必须是对象(收到 ${s});${k}`)}return w}function p(w,_=""){const k=_?`${_}:`:"";if(w.year<C||w.year>Z)throw L("E_RANGE",`${k}晚子时按次日归后落到 ${w.year}-${String(w.month).padStart(2,"0")}-${String(w.day).padStart(2,"0")},超出可计算范围 ${C}–${Z};请把时刻挪到 23 点前,或换一天起课`);return w}return{MIN_YEAR:C,MAX_YEAR:Z,isLeapYear:H,daysInMonth:P,assertCivil:q,assertObject:z,assertShifted:p}})(),v.datetime=(function(){const{fail:L}=v.fail||{},{MIN_YEAR:C,MAX_YEAR:Z}=v.validate||{};function H(E,q){return q===2?E%4===0&&E%100!==0||E%400===0?29:28:[31,28,31,30,31,30,31,31,30,31,30,31][q-1]}function P(E,q=""){const z=String(E??"").trim(),p=/^(\d{4})-(\d{1,2})-(\d{1,2})$/.exec(z);if(!p)return null;const w=Number(p[1]),_=Number(p[2]),k=Number(p[3]);if(_<1||_>12||k<1||k>H(w,_))return null;if(w<C||w>Z){const s=q?`${q} `:"";throw L("E_RANGE",`${s}「${p[0]}」的年份超出可计算范围(${C}–${Z},收到 ${w} 年);农历与节气表不覆盖之外的年份`)}return{year:w,month:_,day:k}}function A(E){if(typeof E!="string"||!E.trim())throw L("E_INPUT","缺少 datetime(公历日期时间),例如 1990-05-12T14:30");const q=E.trim().match(/^(\d{4})-(\d{1,2})-(\d{1,2})(?:[T\s](\d{1,2}):(\d{1,2})(?::(\d{1,2}))?)?$/);if(!q)throw L("E_INPUT",`无法解析 datetime:「${E}」,请用 1990-05-12T14:30 这种格式`);if(q[6]!==void 0&&Number(q[6])>59)throw L("E_INPUT",`秒超出范围:${q[6]}`);const z={year:Number(q[1]),month:Number(q[2]),day:Number(q[3]),hour:Number(q[4]??0),minute:Number(q[5]??0)};if(z.month<1||z.month>12)throw L("E_INPUT",`月份超出范围:${z.month}`);const p=H(z.year,z.month);if(z.day<1||z.day>p)throw L("E_INPUT",`日期不存在:${z.year}-${z.month}-${z.day}(${z.year} 年 ${z.month} 月只有 ${p} 天)`);if(z.hour>23||z.minute>59)throw L("E_INPUT",`时间超出范围:${z.hour}:${z.minute}`);if(z.year<C||z.year>Z)throw L("E_RANGE",`年份 ${z.year} 超出可计算范围(${C}–${Z})`);return(z.year<1900||z.year>2100)&&(z.precision={level:"approx",note:`ΔT 模型仅覆盖 1900–2100,${z.year} 年按端点值外推,节气与朔望时刻可能有分钟级偏差,月柱在交节前后需复核`}),z}return{daysInMonth:H,parseYmd:P,parseDateTime:A}})(),v.lru=(function(){function L({max:C=64,ttlMs:Z=0,name:H="lru",now:P=()=>Date.now()}={}){const A=new Map,E={name:H,hits:0,misses:0,evictions:0,expirations:0},q=z=>Z>0&&P()-z.at>Z;return{name:H,max:C,ttlMs:Z,get(z){const p=A.get(z);if(!p||q(p)){p&&(A.delete(z),E.expirations+=1),E.misses+=1;return}return A.delete(z),A.set(z,p),E.hits+=1,p.value},set(z,p){for(A.has(z)&&A.delete(z),A.set(z,{value:p,at:P()});A.size>C;)A.delete(A.keys().next().value),E.evictions+=1;return p},has(z){const p=A.get(z);return p?q(p)?(A.delete(z),E.expirations+=1,!1):!0:!1},delete(z){return A.delete(z)},clear(){A.clear()},get size(){return A.size},stats(){const z=E.hits+E.misses;return{name:H,size:A.size,max:C,hits:E.hits,misses:E.misses,evictions:E.evictions,expirations:E.expirations,hitRate:z?E.hits/z:0}}}}return{createLru:L}})(),v.nayin=(function(){const L=["海中金","炉中火","大林木","路旁土","剑锋金","山头火","涧下水","城头土","白蜡金","杨柳木","泉中水","屋上土","霹雳火","松柏木","长流水","沙中金","山下火","平地木","壁上土","金箔金","覆灯火","天河水","大驿土","钗钏金","桑柘木","大溪水","沙中土","天上火","石榴木","大海水"];function C(Z){const H=(Number(Z)%60+60)%60,P=L[Math.floor(H/2)];return{name:P,element:P[2]}}return{NAYIN_NAMES:L,nayinOf:C}})(),v.sanhe=(function(){const L=[{branches:["申","子","辰"],element:"水"},{branches:["亥","卯","未"],element:"木"},{branches:["寅","午","戌"],element:"火"},{branches:["巳","酉","丑"],element:"金"}],C=Object.fromEntries(L.map(P=>[P.branches.join(""),P.element])),Z=Object.fromEntries(L.flatMap(P=>P.branches.map(A=>[A,P.element])));function H(P){return L.find(A=>A.branches.includes(P))||null}return{SANHE_GROUPS:L,SANHE:C,SANHE_ELEMENT:Z,sanheGroupOf:H}})(),v["vsop-earth"]=(function(){const L=[[1.75347045673,0,0],[.03341656453,4.66925680415,6283.0758499914],[.00034894275,4.62610242189,12566.1516999828],[3417572e-11,2.82886579754,3.523118349],[3497056e-11,2.74411783405,5753.3848848968],[3135899e-11,3.62767041756,77713.7714681205],[2676218e-11,4.41808345438,7860.4193924392],[2342691e-11,6.13516214446,3930.2096962196],[1273165e-11,2.03709657878,529.6909650946],[1324294e-11,.74246341673,11506.7697697936],[901854e-11,2.04505446477,26.2983197998],[1199167e-11,1.10962946234,1577.3435424478],[857223e-11,3.50849152283,398.1490034082],[779786e-11,1.17882681962,5223.6939198022],[99025e-10,5.23268072088,5884.9268465832],[753141e-11,2.53339052847,5507.5532386674],[505267e-11,4.58292599973,18849.2275499742],[492392e-11,4.20505711826,775.522611324],[356672e-11,2.91954114478,.0673103028],[284125e-11,1.89869240932,796.2980068164],[242879e-11,.34481445893,5486.777843175],[317087e-11,5.84901948512,11790.6290886588],[271112e-11,.31486255375,10977.078804699],[206217e-11,4.80646631478,2544.3144198834],[205478e-11,1.86953770281,5573.1428014331],[202318e-11,2.45767790232,6069.7767545534],[126225e-11,1.08295459501,20.7753954924],[155516e-11,.83306084617,213.299095438],[115132e-11,.64544911683,.9803210682],[102851e-11,.63599845579,4694.0029547076],[101724e-11,4.2667980198,7.1135470008],[99206e-11,6.20992926918,2146.1654164752],[132212e-11,3.41118292683,2942.4634232916],[97607e-11,.68101342359,155.4203994342],[85128e-11,1.29870764804,6275.9623029906],[74651e-11,1.755089133,5088.6288397668],[101895e-11,.97569280312,15720.8387848784],[84711e-11,3.67080093031,71430.69561812909],[73547e-11,4.67926633877,801.8209311238],[73874e-11,3.50319414955,3154.6870848956],[78757e-11,3.03697458703,12036.4607348882],[79637e-11,1.80791287082,17260.1546546904],[85803e-11,5.9832263126,161000.6857376741],[56963e-11,2.78430458592,6286.5989683404],[61148e-11,1.81839892984,7084.8967811152],[69627e-11,.83297621398,9437.762934887],[56116e-11,4.38694865354,14143.4952424306],[62449e-11,3.97763912806,8827.3902698748],[51145e-11,.28306832879,5856.4776591154],[55577e-11,3.47006059924,6279.5527316424],[41036e-11,5.36817592855,8429.2412664666],[51605e-11,1.33282739866,1748.016413067],[51992e-11,.18914947184,12139.5535091068],[49e-8,.48735014197,1194.4470102246],[392e-9,6.16833020996,10447.3878396044],[3557e-10,1.775968892,6812.766815086],[3677e-10,6.04133863162,10213.285546211],[36596e-11,2.56957481827,1059.3819301892],[33296e-11,.59310278598,17789.845619785],[35954e-11,1.70875808777,2352.8661537718],[40938e-11,2.39850938714,19651.048481098],[30047e-11,2.73975124088,1349.8674096588],[30412e-11,.44294464169,83996.84731811189],[23663e-11,.48473622521,8031.0922630584],[23574e-11,2.06528133162,3340.6124266998],[21089e-11,4.14825468851,951.7184062506],[24738e-11,.21484762138,3.5904286518],[25352e-11,3.16470891653,4690.4798363586],[22823e-11,5.22195230819,4705.7323075436],[21419e-11,1.42563910473,16730.4636895958],[21891e-11,5.55594302779,553.5694028424],[203e-9,.37133792946,283.8593188652]],C=[[6283.0758499914,0,0],[.00206058863,2.67823455808,6283.0758499914],[4303419e-11,2.63512233481,12566.1516999828],[425264e-11,1.59046982018,3.523118349],[109017e-11,2.96631010675,1577.3435424478],[93479e-11,2.59211109542,18849.2275499742],[119305e-11,5.79555765566,26.2983197998],[72121e-11,1.13840581212,529.6909650946],[67784e-11,1.87453300345,398.1490034082],[6735e-10,4.40932832004,5507.5532386674],[59045e-11,2.88815790631,5223.6939198022],[55976e-11,2.17471740035,155.4203994342],[45411e-11,.39799502896,796.2980068164],[36298e-11,.46875437227,775.522611324],[28962e-11,2.64732254645,7.1135470008],[20844e-11,5.34138275149,.9803210682]],Z=[[8721859e-11,1.07253635559,6283.0758499914],[99099e-10,3.14159265359,0],[294833e-11,.43717350256,12566.1516999828],[27338e-11,.05295636147,3.523118349],[16333e-11,5.18820215724,26.2983197998],[15745e-11,3.68504712183,155.4203994342],[9425e-11,.29667114694,18849.2275499742],[8938e-11,2.05706319592,77713.7714681205],[694e-10,.82691541038,775.522611324],[5061e-11,4.6624323168,1577.3435424478]],H=[[289058e-11,5.84173149732,6283.0758499914],[20712e-11,6.0498393902,12566.1516999828],[2962e-11,5.1956057957,155.4203994342],[2527e-11,3.14159265359,0],[1288e-11,4.7219761197,3.523118349]],P=[[7714e-11,4.14117321449,6283.0758499914],[1016e-11,3.27573644241,12566.1516999828]];function A(E){let q=0;for(const[p,w,_]of L)q+=p*Math.cos(w+_*E);let z=1;for(const p of[C,Z,H,P]){z*=E;for(const[w,_,k]of p)q+=w*z*Math.cos(_+k*E)}return q}return{earthL:A}})(),v.calendar=(function(){const{earthL:L}=v["vsop-earth"]||{},{createLru:C}=v.lru||{},{bool:Z}=v.bool||{},H=["甲","乙","丙","丁","戊","己","庚","辛","壬","癸"],P=["子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"],A=["小寒","大寒","立春","雨水","惊蛰","春分","清明","谷雨","立夏","小满","芒种","夏至","小暑","大暑","立秋","处暑","白露","秋分","寒露","霜降","立冬","小雪","大雪","冬至"];function E(R){return(285+15*R)%360}function q(R,D,Y){const ie=Math.floor((14-D)/12),Q=R+4800-ie,F=D+12*ie-3;return Y+Math.floor((153*F+2)/5)+365*Q+Math.floor(Q/4)-Math.floor(Q/100)+Math.floor(Q/400)-32045}function z(R){const D=R+32044,Y=Math.floor((4*D+3)/146097),ie=D-Math.floor(146097*Y/4),Q=Math.floor((4*ie+3)/1461),F=ie-Math.floor(1461*Q/4),B=Math.floor((5*F+2)/153);return{year:100*Y+Q-4800+Math.floor(B/10),month:B+3-12*Math.floor(B/10),day:F-Math.floor((153*B+2)/5)+1}}function p(R,D){for(let Y=0;Y<60;Y++)if(Y%10===R&&Y%12===D)return Y;return-1}function w(R){const D=(R%60+60)%60;return{index:D,stem:H[D%10],branch:P[D%12],name:H[D%10]+P[D%12]}}function _(R){return((R+49)%60+60)%60}function k(R){const D=R-2451545,Y=D/36525,ie=D/365250;let Q=L(ie)*180/Math.PI+180;Q=(Q%360+360)%360;const F=(5029.0966*Y+1.11113*Y*Y-6e-6*Y*Y*Y)/3600;Q+=F,Q-=.09033/3600;const B=(125.04452-1934.136261*Y)*Math.PI/180,le=(280.4665+36000.7698*Y)*Math.PI/180,oe=(218.3165+481267.8813*Y)*Math.PI/180,xe=(-17.2*Math.sin(B)-1.32*Math.sin(2*le)-.23*Math.sin(2*oe)+.21*Math.sin(2*B))/3600;Q+=xe;const ne=(357.52911+35999.05029*Y-1537e-7*Y*Y)*Math.PI/180,pe=.016708634-42037e-9*Y-1267e-10*Y*Y,Ce=1.000001018*(1-pe*pe)/(1+pe*Math.cos(ne+(1.914602-.004817*Y)*(Math.PI/180)*Math.sin(ne)));return Q-=20.4898/3600/(Ce||1),(Q%360+360)%360}function s(R){if(R<1900){const B=R;if(B<1600)return 120;if(B<1700){const oe=B-1600;return 120-.9808*oe-.01532*oe*oe+oe*oe*oe/7129}if(B<1800){const oe=B-1700;return 8.83+.1603*oe-.0059285*oe*oe+13336e-8*oe*oe*oe-oe**4/1174e3}if(B<1860){const oe=B-1800;return 13.72-.332447*oe+.0068612*oe*oe+.0041116*oe**3-37436e-8*oe**4+121272e-10*oe**5-1699e-10*oe**6+875e-12*oe**7}const le=B-1860;return 7.62+.5737*le-.251754*le*le+.01680668*le**3-.0004473624*le**4+le**5/233174}const D=[[1900,-2.8],[1920,21.2],[1940,24.3],[1950,29.1],[1960,33.2],[1970,40.2],[1980,50.5],[1990,56.9],[2e3,63.8],[2010,66.1],[2020,69.4],[2030,72],[2050,80],[2100,110]];if(R<=D[0][0])return D[0][1];for(let B=1;B<D.length;B++)if(R<=D[B][0]){const[le,oe]=D[B-1],[xe,ne]=D[B];return oe+(ne-oe)*(R-le)/(xe-le)}const[Y,ie]=D[D.length-1],Q=(Y-1820)/100,F=(R-1820)/100;return ie+32*(F*F-Q*Q)}const $=8/24,d=7.7611/24,f=2425612+4/24;function r(R){return R<f?d:$}const o=C({max:4096,name:"termInstant"}),l=1e-5,i=new Map,u=365.2422;function h(R,D){const Y=E(D),ie=q(R,1,5)-.5+D*15.2184,Q=i.get(D);let F=Q!==void 0?Q+u:ie;Math.abs(F-ie)>20&&(F=ie);for(let le=0;le<12;le++){let oe=Y-k(F);if(oe=((oe+180)%360+360)%360-180,F+=oe/.98564736,Math.abs(oe)<l)break}i.set(D,F);const B=F-s(R)/86400;return B+r(B)}function y(R,D){const Y=R*24+D,ie=o.get(Y);if(ie!==void 0)return ie;const Q=h(R,D);return o.set(Y,Q),Q}function S(R){const D=Math.floor(R+.5),Y=R+.5-D,ie=Math.min(1439,Math.floor(Math.round(Y*86400)/60)),{year:Q,month:F,day:B}=z(D);return{year:Q,month:F,day:B,hour:Math.floor(ie/60),minute:ie%60}}function x({year:R,month:D,day:Y,hour:ie=0,minute:Q=0}){return q(R,D,Y)-.5+(ie*60+Q)/1440}function b(R,D,Y){const ie=q(R,D,Y)-q(R,1,1)+1,Q=2*Math.PI*(ie-81)/364;return 9.87*Math.sin(2*Q)-7.53*Math.cos(Q)-1.5*Math.sin(Q)}const G=C({max:8,name:"termWindow"}),I=C({max:32,name:"termYear"}),fe=Array.from({length:24},(R,D)=>D),we=fe.filter(R=>R%2===0);function c(R,D){const Y=D?`${R}|jie`:`${R}|all`,ie=I.get(Y);if(ie)return ie;if(D){const F=I.get(`${R}|all`);if(F){const B=F.filter(le=>le.index%2===0);return I.set(Y,B),B}}const Q=[];for(const F of D?we:fe)Q.push({year:R,index:F,name:A[F],jd:y(R,F)});return Q.sort((F,B)=>F.jd-B.jd),I.set(Y,Q),Q}function M(R,D={}){const Y=Z(D.jieOnly),ie=Y?`${R}|jie`:R,Q=G.get(ie);if(Q)return Q;const F=[...c(R-1,Y),...c(R,Y),...c(R+1,Y)];return F.sort((B,le)=>B.jd-le.jd),G.set(ie,F),F}function J(R){if(typeof R!="string"||R.length<2)return[];const D=H.indexOf(R[0]),Y=P.indexOf(R[1]);if(D<0||Y<0)return[];const ie=p(D,Y);if(ie<0)return[];const Q=Math.floor(ie/10)*10;return[P[(Q+10)%12],P[(Q+11)%12]]}function te(R,D){let Y=null;for(const ie of R)if(ie.index%2===0)if(ie.jd<=D)Y=ie;else break;return Y}function X(R,D){for(const Y of R)if(Y.index%2===0&&Y.jd>D)return Y;return null}function ee(R){const D=S(R),Y=ie=>String(ie).padStart(2,"0");return`${D.year}-${Y(D.month)}-${Y(D.day)} ${Y(D.hour)}:${Y(D.minute)}`}function re(){return[o.stats(),I.stats(),G.stats()]}return{STEMS:H,BRANCHES:P,TERM_NAMES:A,termLongitude:E,toJDN:q,fromJDN:z,sexagenaryIndex:p,ganzhiName:w,dayGanzhiIndex:_,sunLongitude:k,deltaTSeconds:s,OFFSET_MODERN:$,OFFSET_BEIJING_LOCAL:d,CUTOVER_JD:f,localOffsetFor:r,termInstantJd:y,jdToParts:S,partsToJd:x,equationOfTime:b,termWindow:M,xunKongOf:J,previousJie:te,nextJie:X,formatJd:ee,cacheMetrics:re}})(),v.lunar=(function(){const{toJDN:L,jdToParts:C,termInstantJd:Z,deltaTSeconds:H,localOffsetFor:P}=v.calendar||{},A=29.530588861,E=245155009766e-5,q=Math.PI/180;function z(s){const $=s/1236.85,d=E+A*s+15437e-8*$*$-15e-8*$*$*$+73e-11*$*$*$*$,f=1-.002516*$-74e-7*$*$,r=(2.5534+29.1053567*s-14e-7*$*$-11e-8*$*$*$)*q,o=(201.5643+385.81693528*s+.0107582*$*$+1238e-8*$*$*$-58e-9*$*$*$*$)*q,l=(160.7108+390.67050284*s-.0016118*$*$-227e-8*$*$*$+11e-9*$*$*$*$)*q,i=(124.7746-1.56375588*s+.0020672*$*$+215e-8*$*$*$)*q,u=-.4072*Math.sin(o)+.17241*f*Math.sin(r)+.01608*Math.sin(2*o)+.01039*Math.sin(2*l)+.00739*f*Math.sin(o-r)-.00514*f*Math.sin(o+r)+.00208*f*f*Math.sin(2*r)-.00111*Math.sin(o-2*l)-57e-5*Math.sin(o+2*l)+56e-5*f*Math.sin(2*o+r)-42e-5*Math.sin(3*o)+42e-5*f*Math.sin(r+2*l)+38e-5*f*Math.sin(r-2*l)-24e-5*f*Math.sin(2*o-r)-17e-5*Math.sin(i)-7e-5*Math.sin(o+2*r)+4e-5*Math.sin(2*o-2*l)+4e-5*Math.sin(3*r)+3e-5*Math.sin(o+r-2*l)+3e-5*Math.sin(2*o+2*l)-3e-5*Math.sin(o+r+2*l)+3e-5*Math.sin(o-r+2*l)-2e-5*Math.sin(o-r-2*l)-2e-5*Math.sin(3*o+r)+2e-5*Math.sin(4*o),h=d+u-H(2e3+$*100)/86400;return h+P(h)}function p(s){return Math.floor(s+.5)}function w(s){return Math.round((s+.5-E)/A)}function _(s,$,d){for(let f=s-1;f<=s+1;f++)for(let r=1;r<24;r+=2){const o=Z(f,r),l=p(o);if(l>=$&&l<d)return{index:r,jd:o}}return null}function k(s,$,d){const f=L(s,$,d),r=p(Z(s,23)),o=f<r?s-1:s,l=p(Z(o,23));let i=w(l);for(;p(z(i))>l;)i--;for(;p(z(i+1))<=l;)i++;const u=p(Z(o+1,23));let h=i;for(;p(z(h+1))<=u;)h++;const y=h-i;let S=-1;if(y===13)for(let G=1;G<=y;G++){const I=p(z(i+G-1)),fe=p(z(i+G));if(!_(o,I,fe)){S=G;break}}let x=11,b=!1;for(let G=1;G<=15;G++){const I=p(z(i+G-1)),fe=p(z(i+G)),we=_(o,I,fe),c=G===S;if(f>=I&&f<fe){const M=C(z(i+G-1)),J=c?(x+10)%12+1:x;return{year:o,lunarYear:b?o+1:o,month:J,day:f-I+1,isLeap:c,monthStart:`${M.year}-${String(M.month).padStart(2,"0")}-${String(M.day).padStart(2,"0")}`,hasZhongQi:!!we}}c||(x=x%12+1,x===1&&(b=!0))}throw new Error(`农历换算失败:${s}-${$}-${d}`)}return{SYNODIC:A,newMoonJd:z,dayNumberOf:p,solarToLunar:k}})(),v.geo=(function(){const{bool:L}=v.bool||{},C=`
4
4
  北京 116.41 39.90;上海 121.47 31.23;天津 117.20 39.13;重庆 106.55 29.56
5
5
  广州 113.26 23.13;深圳 114.06 22.55;珠海 113.58 22.27;东莞 113.75 23.02;佛山 113.12 23.02
6
6
  汕头 116.68 23.35;中山 113.39 22.52;惠州 114.42 23.11;江门 113.08 22.58;湛江 110.36 21.27
@@ -80,9 +80,9 @@ window.__ModuleLoader__.load({id:"dsh-metaphysics",chunk:"client.xiaoliuren.js",
80
80
  - 取法理由:${b.why}${b.fact?`
81
81
  - 盘面:${b.fact}`:""}${b.warn?`
82
82
  - 注意:${b.warn}`:""}`),"","## 三、怎么读状态(最容易偷懒的地方)","- 先说明这一位落在什么处境(旺/衰、空/实、动/静、被制/得助),再说这对他意味着什么。","- 关系只认四种,且都要指到具体两位符号:生(谁生谁)、克(谁克谁)、合(连在一起,合住也可能是拴住)、冲(变动、对立、打破)。","- 空亡、入墓、伏藏、用神两现这些「减分项」,要么说清压低了什么,要么别提——不要念一遍名字就过去。","","## 四、开口之前先自检这三问",...d.map((b,G)=>`${G+1}. ${b}`),"三问答不全,就还没到能下结论的程度,先把答不出的那条写出来。","","## 五、最后必须回到现实核对",...u.reality.map((b,G)=>`${G+1}. ${b}`),"盘面只给方向;上面这些是他明天可以去查、去问、去要的东西。核对完再回来谈结论。","","## 六、表达要求",...s.map(b=>`- ${b}`),"","## 七、禁止",...$.map(b=>`- ${b}`),"","## 八、输出格式","1. **先给你要的答案**:三到五句人话,直接回答他问的那件事。","2. **盘上依据**:按「我 / 对方或事体 / 环境」三块列,每块一句符号 + 一句人话。","3. **现实里该去核对什么**:抄第五节里适用的,不要全抄。","4. **相反提示与不确定处**:盘上哪里指向另一头,你为什么这样权衡。","5. **一句提醒**:这是参考,不替代你自己去核实和决定。"];return{version:C,system:l,kind:i,blocked:!1,subjects:S,text:x.join(`
83
- `)}}return{EVENT_PROMPT_VERSION:C,ASK_KINDS:Z,buildEventPrompt:f}})(),v["plain-summary"]=(function(){const{ASK_KINDS:L}=v["event-prompt"]||{},{PALACE_FIELD:C,GATE_MEANING:Z}=v["qimen-prompt"]||{},H=L||{},P=C||{},A=Z||{},E={wealth:"business",career:"career",love:"love",health:"other",study:"career",travel:"action",general:"other"},q=c=>E[c]||(H[c]?c:"other"),z={木:{color:"青、绿",where:"东边、有树有水的地方",daily:"早上多出门走走"},火:{color:"红、橙、紫",where:"南边、向阳的房间",daily:"白天多晒太阳,别总待在阴冷的屋里"},土:{color:"黄、棕、米色",where:"中原地带、干爽高燥处",daily:"把作息和吃饭时间固定下来"},金:{color:"白、银、浅灰",where:"西边、通风利落的地方",daily:"把该断的事断干净,别拖"},水:{color:"黑、深蓝",where:"北边、临水处",daily:"留出独处和放空的时间"}},p={正印:"靠吸收和消化来获得安全感,习惯先想明白再动",偏印:"想得比说得多,一件事会在心里推演出很多种可能",正官:"对规矩和责任敏感,别人一句交代会变成自己的压力",七杀:"对压力和竞争敏感,遇强则强,也容易被强势的人吸引",正财:"对现实条件敏感,不太会被空话打动",偏财:"对机会敏感,愿意为看得见的回报承担风险",食神:"表达温和,喜欢把日子过得有滋味",伤官:"有自己的标准,看不上粗糙的东西,容易先挑毛病",比肩:"自我边界清楚,不太愿意被安排",劫财:"同辈之间容易较劲,也容易替朋友出头"},w={长生:"刚起步,有生机",沐浴:"不安定,容易被外界牵动",冠带:"在成形,开始要面子",临官:"正当力,能扛事",帝旺:"很足,但也容易过满",衰:"开始收力,做事偏保守",病:"使不上劲,需要借外力",死:"静态,不爱主动",墓:"收着、藏着,不爱外露",绝:"在这里使不上劲,容易觉得被压着",胎:"还在孕育,慢热",养:"在积攒,等时机"},_={紫微:"要主导、在意体面",天机:"脑子转得快,爱盘算",太阳:"愿意给出去,也容易被消耗",武曲:"务实,认结果",天同:"图安稳,怕冲突",廉贞:"要强,情绪起伏大",天府:"稳,能存住东西",太阴:"细腻,心思藏在里面",贪狼:"欲望强、多才多艺",巨门:"爱辨析,也容易生口舌",天相:"会配合,擅长讲和",天梁:"老成,愿意护着别人",七杀:"独断,敢冲",破军:"破旧立新,不安于现状"},k={庙:"得力",旺:"得力",得地:"还算得力",平:"一般",陷:"不太稳"},s=c=>[...new Set(c.filter(Boolean))],$={寅:"初春",卯:"仲春",辰:"暮春",巳:"初夏",午:"盛夏",未:"长夏",申:"初秋",酉:"仲秋",戌:"深秋",亥:"初冬",子:"仲冬",丑:"隆冬"};function d(c,M){const J={po:[],chong:[],he:[]};for(const te of c&&c.branches||[])!M||!String(te).includes(M)||(/破/.test(te)?J.po.push(te):/冲/.test(te)?J.chong.push(te):/合/.test(te)&&J.he.push(te));return J}function f(c){const M=c.pillars||{},J=M.day||{},te=M.month||{},X=c.dayMaster||{},ee=c.climate||{},re=c.input&&c.input.gender||"female",R=Object.entries(c.frame&&c.frame.godStats&&c.frame.godStats.groups||{}).filter(([,me])=>me>0).sort((me,qe)=>qe[1]-me[1]),D=c.frame&&c.frame.yongshen&&c.frame.yongshen.favorTenGods||[],Y=c.frame&&c.frame.yongshen&&c.frame.yongshen.favor||[],ie=c.frame&&c.frame.yongshen&&c.frame.yongshen.avoid||[],Q=$[te.branch]||`${te.branch}月`,F=ee.label==="寒湿"?"天寒水旺,木像冬天的藤,不是不强,是冷得伸展不开":ee.label==="燥热"?"火土偏燥,像久旱的地,需要水和湿气来松一松":"寒暖相对均衡,没有极端的偏枯",B=ee.need&&ee.need.element||Y[0]||"",le=`${X.stem||""}${X.element||""}日主,生在${Q}${te.branch||""}月:${F}。${B?`最需要的是${B}${ee.need&&ee.need.why?`——${ee.need.why}`:""}。`:""}整体${c.strength?c.strength.level:"中和"},不是极旺也不是极弱,所以${c.strength&&c.strength.level==="身弱"?"很多事要靠外部条件配合,硬扛不如借力":"撑得住,关键是别把力气用在错的地方"}。`,oe=R.slice(0,2).map(([me])=>me),xe=[];for(const me of Object.values(M))me&&(me.stemTenGod&&xe.push(me.stemTenGod),me.hidden&&me.hidden[0]&&me.hidden[0].tenGod&&xe.push(me.hidden[0].tenGod));const pe=`${oe.map(me=>{const qe={印:["正印","偏印"],官杀:["正官","七杀"],食伤:["食神","伤官"],财:["正财","偏财"],比劫:["比肩","劫财"]}[me]||[],_e=qe.find(Ue=>xe.includes(Ue))||qe[0];return _e&&p[_e]?`${me}偏重:${p[_e]}。`:""}).filter(Boolean).join("")}${D.length,""}`+(oe.includes("印")?"想得多是你的默认状态,好处是稳,代价是慢和累。":""),Ce=re==="female"?["正官","七杀"]:["正财","偏财"],Ye=re==="female"?"官杀(正官与七杀)":"财星(正财与偏财)",ue={year:"年干",month:"月干",day:"日干",hour:"时干"},he=Object.entries(M).filter(([,me])=>me&&Ce.includes(me.stemTenGod)).map(([me,qe])=>`${ue[me]}${qe.stemTenGod}`),de=J.hidden&&J.hidden[0]&&J.hidden[0].tenGod||"",ge=d(c.relations,J.branch),ye=[];ye.push(`${re==="female"?"女命":"男命"}看配偶星取${Ye}${he.length?`,${he.join("、")}`:",盘中未透干"}${he.length?"——摆在明处,说明这件事在你生活里是绕不开的主题":"——不显在明处,往往要靠后天遇到的人把它带出来"}。`),de&&ye.push(`日支(配偶宫)坐${J.branch}${de}${J.dishi?`,日主在这里是「${J.dishi}」:${w[J.dishi]||""}`:""}。`),ge.po.length&&ye.push(`日支与另一支相破(${ge.po.join("、")}):破不是吵架,是那种说不清、解释不明白的暗耗,容易冷处理。`),ge.chong.length&&ye.push(`日支逢冲(${ge.chong.join("、")}):关系里变动感强,聚散、异地、节奏不一致都可能出现。`),ge.he.length&&ye.push(`日支有合(${ge.he.join("、")}):容易被关系拴住,进去了就不太想出来。`),c.hourUnknown&&ye.push("时柱暂缺,所以「子女」这一路的信息读不出,感情结论也就少了三分之一。");const ze=(c.frame&&c.frame.geju||[]).map(me=>me.name),Oe=[];ge.po.length&&Oe.push("破在日支:最伤人的往往不是大事,是没说开的小事。"),ze.includes("伤官见官")&&Oe.push("盘里有「伤官见官」的组合:既想要稳定,又忍不了对方的毛病,这是同一件事的两面。"),oe.includes("印")&&!oe.includes("财")&&Oe.push("印重而财轻:想得多、落得少;越焦虑越容易继续想。"),Oe.length||Oe.push("这一盘没有特别尖锐的冲克,卡点更多在「节奏」上——什么时候该动,什么时候该停。");const Re=[];if(B&&z[B]){const me=z[B];Re.push(`多接触${B}:${me.color}这类颜色、${me.where},日常可以${me.daily}。`)}return ie.length&&Re.push(`少把自己放在${ie.slice(0,2).join("、")}过重的环境里——不是不能碰,是别长期待在那种氛围中。`),oe.includes("印")&&Re.push("给「想」设个时限:一件事想超过十分钟还没结论,就先做一个最小动作,用行动换信息。"),ze.includes("伤官见官")&&Re.push("把标准用在事情上,不要用在人身上;对人提要求之前,先说清你需要什么。"),{system:"bazi",title:"先看这一张:这张盘大致在说什么",chips:s([`${X.stem||""}${X.element||""}日主`,`${te.branch||""}月`,ee.label||"",c.strength?c.strength.level:"",c.hourUnknown?"时柱暂缺":""]),lead:le,sections:[{h:"你的底色",t:pe||"结构比较均衡,没有一边倒的偏重。"},{h:"感情这件事",t:ye.join("")},{h:"最容易卡住的地方",t:Oe.join("")}],advice:Re,caveat:c.hourUnknown?"时柱暂缺:以上只据年、月、日六个字,等于全盘信息的七成左右。子女缘分、晚年走势、以及「内心最深处那一层」都读不全,结论只作参考。":"",footer:"以上都是对结构的描述,不是断语;判断好坏要结合你自己的处境。"}}function r(c){const M=c.palaces||[],J=M[0]||{},te=c.body||{},X=(J.stars||[]).filter(ne=>ne.type==="主星"),ee=M.find(ne=>ne.isBody)||{},re=M.find(ne=>ne.palace==="夫妻")||{},R=X.map(ne=>ne.name).join("、")||"空宫(借对宫)",D=X.map(ne=>k[ne.brightness]||"").filter(Boolean)[0]||"",Y=ne=>ne.filter(pe=>pe.type==="主星").map(pe=>`${pe.name}${_[pe.name]?`(${_[pe.name]})`:""}`).join(";"),ie=c.patternSummary||{},Q=s(ie.broken||[]),F=s(ie.bad||[]),B=s([...ie.good||[],...ie.neutral||[]]).filter(ne=>!Q.includes(ne)),le=re.stars||[],oe=le.filter(ne=>ne.type==="主星"),xe=le.filter(ne=>ne.type==="煞星");return{system:"ziwei",title:"先看这一张:这张盘大致在说什么",chips:s([`命宫在${J.branch||""}`,R,c.bureau?c.bureau.name:"",te.lands?`身宫落${te.lands}`:""]),lead:`命宫在${J.branch||""},坐${R}${D?`(${D})`:""};身宫落在${te.lands||te.palace||"—"}。${X.length?`底色是${X.map(ne=>_[ne.name]||ne.name).join("、")}。`:"命宫无主星,性格更多由对宫与三方决定,可塑性反而大。"}${B.length?`结构上成的是${B.slice(0,3).join("、")}——格局只说明形状,不是吉凶判词。`:"没有完整成套的格局,这一盘更多看单颗星的性质,少看组合。"}`,sections:[{h:"你的底色",t:`${Y(J.stars||[])||"命宫无主星,靠三方四正补"}。身宫落${te.lands||"—"},说明你这辈子真正花力气的地方在${te.lands||"那一块"}。`},{h:"感情这件事",t:`夫妻宫在${re.branch||"—"},坐${oe.map(ne=>`${ne.name}${ne.brightness?`(${k[ne.brightness]||ne.brightness})`:""}`).join("、")||"空宫(借对宫)"}。${xe.length?`同宫还有${xe.map(ne=>ne.name).join("、")}——关系里容易起摩擦,来得快也去得快。`:"没有明显的煞星同宫,关系相对平顺。"}`},{h:"最容易卡住的地方",t:`${Q.length?`被冲破的格局有${Q.join("、")}——结构还在,但成色打折;冲不等于毁,说的是它不如完好时那么顶用。`:"主要格局没有明显被冲破。"}${F.length?`另有${F.join("、")}这类忌格,只描述结构,不作吉凶断。`:""}`}],advice:[`命宫主星${X.length?`是${X.map(ne=>ne.name).join("、")},顺它的长处在做事,比硬改性格省力`:"不显,先靠环境和习惯替自己定节奏"}。`,`身宫落${te.lands||"—"}:这块是你真正在意的地方,也是容易耗人的地方,留出余量。`],caveat:"",footer:"以上都是对结构的描述,不是断语;判断好坏要结合你自己的处境。"}}const o={旺:"当令,气最足",相:"有生机,正在起",休:"气在泄,歇着",囚:"被压着,使不上劲",死:"最弱,得靠外援"},l={官鬼:"职位、压力、管你的人和事",妻财:"钱、资源、实际回报",父母:"文书、答复、流程与长辈",子孙:"结果本身、松弛、把事情落地",兄弟:"同辈、分利、竞争"},i={日生:"日辰生它,当天有人托着",日克:"日辰克它,当天被压一头",比和:"与日辰同气,力量相当",日合:"与日辰相合,黏住了",日冲:"与日辰相冲,当天就动"};function u(c){if(!c)return"";const M=[],J=o[c.monthState]||c.monthSay||"";J&&M.push(`月令${c.monthState||""}(${J})`);const te=i[c.dayRelation]||c.daySay||"";return te&&M.push(te),c.kong&&M.push("旬空——抓不实,等冲或填"),c.moving&&M.push("发动,是这件事的动因"),c.monthChong&&M.push("月破,先破后立"),M.join(";")}function h(c){const M=c.hexStrength&&c.hexStrength.lines||[];if(!M.length)return null;const J=M.find(B=>B.shi)||null,te=M.find(B=>B.ying)||null,X=c.body||{},ee=X.ben||{},re=X.bian||{},R=c.cast&&c.cast.movingPositions||[],D=M.filter(B=>B.moving),Y=String(c.question||"").trim(),ie=s([...X.labels||[],...c.hexStrength&&c.hexStrength.labels||[]]),Q=c.hexStrength&&c.hexStrength.month?c.hexStrength.month.branch:"",F=[ee.chong?"六冲卦:事情容易散、节奏快":"",ee.he?"六合卦:事情黏住、快不起来":"",X.fuYin&&(X.fuYin.inner||X.fuYin.outer)?"有伏吟:原地打转":"",X.fanYin&&(X.fanYin.inner||X.fanYin.outer)?"有反吟:来回反复":""].filter(Boolean);return{system:"liuyao",title:"先看这一卦:这卦大致在说什么",chips:s([ee.name,re.name?`变${re.name}`:"",R.length?`${R.length} 爻动`:"静卦",Q?`${Q}月`:""]),lead:`${Y?`你问的是「${Y}」。`:""}本卦「${ee.name||"—"}」${re.name?`,${R.length?`第 ${R.join("、")} 爻动`:"六爻安静"},变「${re.name}」`:""}。方向还留在「综合」,所以这一卦没有取用神——先只讲与问题无关的那几样:你(世爻)、事情(应爻)、卦体。`,sections:[{h:"代表你的是",t:J?`世爻在${J.name}(${J.branch}${J.element}·${J.liuqin}):${u(J)||"状态平稳"}。`:"这一卦取不到世爻。"},{h:"代表事情的是",t:te?`应爻在${te.name}(${te.branch}${te.element}·${te.liuqin}):${u(te)||"状态平稳"}。应爻说的是「事情那一头」的状态,不是你努力的程度。`:"这一卦取不到应爻。"},{h:"卦体与动爻",t:`${F.length?`${F.join(";")}。`:"没有六冲、六合、伏吟、反吟这类整体结构。"}${D.length?`动爻在${D.map(B=>`${B.name}(${B.liuqin})`).join("、")}——动的地方,就是这件事会发生变化的那一环。`:"六爻安静:眼下没有明显在动的地方,说明事情的节奏还没起来。"}`}],advice:["先在上面选一个「询问方向」(工作、感情、生意、推进、择日):选完才会取用神,旺衰、应期、成败条件才有落点。",...(H.other&&H.other.reality||[]).slice(0,2)].filter(Boolean),caveat:"未指定所问之事:这一版只读世应、卦体与动爻,不判成败,也不给应期——不是算不出来,是取用神要先知道问什么。",footer:"以上是把盘面符号翻译成话,不是断语;真正的判断要看现实里那几步。"}}function y(c){const M=c.useGod||{};if(!M.liuqin)return h(c);const J=M.found||[];if(!J.length&&!M.missing)return null;const te=String(c.question||"").trim(),X=c.useGodStrength&&c.useGodStrength.lines||[],ee=ne=>X.find(pe=>pe.position===ne)||null,R=(c.hexStrength&&c.hexStrength.lines||[]).find(ne=>ne.shi)||null,D=c.useGodStrength&&c.useGodStrength.month?c.useGodStrength.month.branch:"",Y=c.dayGanZhi&&c.dayGanZhi.name||"",ie=J.map(ne=>ne.name).join("、"),Q=`${te?`你问的是「${te}」。`:"你没填具体问题,这里按「综合」取用神,结论会更粗。"}这卦里代表它的是「${M.liuqin}」(${M.ask||""}),`+(J.length?`落在${ie}${J.length>1?"——两处都出现了,两个条件要一起看":""}。`:"盘中看不见它(伏藏),要等冲开或引出才有动静。")+`日辰是${Y||"—"},月建是${D||"—"}。`,F=[],B=[];for(const ne of J){const pe=ee(ne.position);pe&&(/旺|相/.test(pe.monthState||"")&&!pe.kong&&!pe.monthChong&&F.push(ne.name),(/日克|日冲/.test(pe.dayRelation||"")||pe.kong||pe.monthChong)&&B.push(ne.name))}const le=J.length?F.length>B.length?"条件偏有利":B.length>F.length?"条件偏紧,得有外力或时间":"一半一半,取决于你怎么推":"没有可判的落点",oe=s([...(M.labels||[]).filter(ne=>/两现|伏藏|六合|六冲/.test(ne)),c.body&&c.body.ben&&c.body.ben.chong?"六冲卦:事情容易散,节奏偏快":"",c.body&&c.body.ben&&c.body.ben.he?"六合卦:事情黏住,快不起来":""]),xe=s((c.yingqi&&c.yingqi.items||[]).map(ne=>ne.branch)).slice(0,4);return{system:"liuyao",title:"先看这一卦:这卦大致在说什么",chips:s([c.ben&&c.ben.name,`用神 ${M.liuqin||""}`,D?`${D}月`:"",c.yingqi?c.yingqi.tempo:""]),lead:Q,sections:[{h:"代表你的是",t:R?`世爻在${R.name}(${R.branch}${R.element}·${R.liuqin}):${u(R)||"状态平稳"}。`:"这一卦的世爻取不到,先看用神那一条。"},{h:"代表这件事的是",t:J.length?J.map(ne=>`${ne.name} ${ne.ganzhi}(${ne.liuqin}):${u(ee(ne.position))||"没有明显的月日冲克"}。`).join(""):"用神伏藏:盘中看不见它,说明这件事现在还不在明面上,要等一个引子。"},{h:"成不成看哪里",t:`把用神的月令与日辰放在一起,盘面给的是「${le}」。${oe.length?`另有:${oe.join(";")}。`:""}`}],advice:[...(H[q(M.direction)]&&H[q(M.direction)].reality||[]).slice(0,2),xe.length?`应期只看地支:${xe.join("、")}——地支只是「往哪个方向等」,不是公历日期。`:""].filter(Boolean),caveat:s([J.length>1?`用神两现(${ie}):本插件不替你二选一,两处条件一起看。`:"",M.missing?"用神伏藏:先看伏神与飞神的关系,再看有没有东西把它冲出来。":"","世应只说明「你」和「事」的相对位置,不直接等于吉凶。"]).join(""),footer:"以上是把盘面符号翻译成话,不是断语;真正的判断要看现实里那几步。"}}function S(c){const M=c.bodyUse;if(!M||!M.body||!M.use)return null;const J=String(c.question||"").trim();return{system:"meihua",title:"先看这一卦:方向大致在哪",chips:s([c.ben&&c.ben.name,c.bian&&`变${c.bian.name}`,M.relation?`体用 ${M.relation.split("(")[0]}`:""]),lead:`${J?`你问的是「${J}」。`:""}本卦「${c.ben&&c.ben.name}」,动在第 ${c.moving} 爻,变卦「${c.bian&&c.bian.name}」。体卦 ${M.body.trigram}(${M.body.element})代表你,用卦 ${M.use.trigram}(${M.use.element})代表这件事:${M.relation}。`,sections:[{h:"过程与结果",t:`过程看互卦「${c.hu&&c.hu.name||"—"}」,结果看变卦「${c.bian&&c.bian.name||"—"}」。梅花给的是方向,不是细节——它不会告诉你几号、多少钱。`},{h:"盘面给的分量",t:`这一卦的体用关系被标成「${M.level}」。注意:这是条件层面的判断,不是结果已经发生;条件好但不动,一样没有结果。`}],advice:["把它当「换个角度看这件事」:体用只分「谁在给、谁在耗」,剩下要你自己补具体动作。","如果要推进,先定一个最小动作(打个电话、发条消息),别等条件齐了再动。"],caveat:"梅花取象的自由度大:同一卦,不同人读出的细节可以不同。本插件只取体用生克这一层。",footer:"以上是把盘面符号翻译成话,不是断语;真正的判断要看现实里那几步。"}}function x(c){const M=c.sanChuan||{};if(!M.chu||!M.zhong||!M.mo)return null;const J=String(c.question||"").trim(),te=ee=>`${ee.zhi}(${ee.liuQin||""}·${ee.jiangFull||""})`,X=ee=>l[ee.liuQin]?`——${l[ee.liuQin]}`:"";return{system:"daliuren",title:"先看这一课:事情怎么走到这一步",chips:s([c.geJu&&c.geJu.name,`${M.chu.zhi}→${M.mo.zhi}`,c.yueJiang&&`月将${c.yueJiang.zhi}`]),lead:`${J?`你问的是「${J}」。`:""}三传是 ${M.chu.zhi} → ${M.zhong.zhi} → ${M.mo.zhi};末传落 ${M.mo.zhi}(${M.mo.liuQin||""}·${M.mo.jiangFull||""}),课体是「${c.geJu&&c.geJu.name||"—"}」。`,sections:[{h:"起手(初传)",t:`${te(M.chu)}${X(M.chu)}。这是事情开头的样子。`},{h:"转折(中传)",t:`${te(M.zhong)}${X(M.zhong)}。中间会经过这一段,也是容易改道的地方。`},{h:"落点(末传)",t:`${te(M.mo)}${X(M.mo)}。末传比初传更接近结果——但也只是「照现在这样走下去会到哪」。`}],advice:["先看初传:事情是从哪儿起的?把那个起点找出来,比猜结果有用。","中传若与初传相冲相克,说明中途会变;这时别把计划定死。"],caveat:"三传讲的是传变形态,不给具体日期;同一课不同流派对课体的命名也有差异。",footer:"以上是把盘面符号翻译成话,不是断语;真正的判断要看现实里那几步。"}}function b(c){const M=c.siZhu&&c.siZhu.day?String(c.siZhu.day)[0]:"",J=c.siZhu&&c.siZhu.time?String(c.siZhu.time)[0]:"",te=c.palaces||[];if(!te.length)return null;const X=F=>te.find(B=>B.tianPan===F)||(c.centerPalace&&c.centerPalace.tianPan===F?c.centerPalace:null),ee=X(M),re=X(J),R=String(c.question||"").trim(),D=F=>{const B=F&&P[F.palace]&&P[F.palace].field;return B?B.split(":")[0]:F?`${F.palace}宫`:"盘中取不到"},Y=F=>F&&P[F.palace]&&P[F.palace].dir?`(${P[F.palace].dir})`:"",ie=F=>F?`${D(F)}${Y(F)}|${F.gate||"—"}·${F.star||"—"}·${F.god||"—"}`:"盘中取不到",Q=F=>!F||!F.gateRelation||!F.gateRelation.type?"门与宫的关系没算到":`${F.gateRelation.type}(${F.gateRelation.note||""})`;return{system:"qimen",title:"先看这一局:条件和位置在哪",chips:s([c.ju,c.zhiFu&&`值符${c.zhiFu.star}`]),lead:`${R?`你问的是「${R}」。`:""}日干 ${M} 落在${ie(ee)},时干 ${J} 落在${ie(re)}——前者代表你,后者代表这件事。你这边门与宫是${Q(ee)};事情那边是${Q(re)}。`,sections:[{h:"你这边的条件",t:ee?`你在${P[ee.palace]?P[ee.palace].field:ee.palace+"宫"};门是${ee.gate||"—"}——${A[ee.gate]||"门名只说明形态"}。`:"日干落在中宫或取不到:中宫无门无神,按寄宫(多寄坤二)取用,读的时候要说清这是寄宫。"},{h:"事情那边的条件",t:re?`事情落在${P[re.palace]?P[re.palace].field:re.palace+"宫"};门是${re.gate||"—"}——${A[re.gate]||"门名只说明形态"}。`:"时干落在中宫或取不到,同样按寄宫看,别当成坤二本宫。"},{h:"门名不是吉凶",t:"开门主启动、生门主生长、休门主等待、伤门主损耗、杜门主隐藏——这些说的是「这件事现在是什么形态」,不是好坏判决。要看它与日干宫、时干宫的生克。"}],advice:["把「我这边」和「事情那边」的宫位对一下:两边相距越远,越需要中间人、流程或时间。","如果门名是伤门、死门,不是叫你别做,而是提醒这件事的代价和收尾要先想清楚。"],caveat:s([c.juMethodNote||"","奇门重方位与时机;本插件不给具体方位建议,只把宫位与门星神摊开。"]).join(""),footer:"以上是把盘面符号翻译成话,不是断语;真正的判断要看现实里那几步。"}}function G(c){const M=c.cards||[];if(!M.length)return null;const J=String(c.question||"").trim(),te=M.find(X=>/现在|现况|当下|建议|核心/.test(X.position||""))||M[Math.floor(M.length/2)];return{system:"tarot",title:"先看这几张牌:它们各在说什么",chips:s([c.spread]),lead:`${J?`你问的是「${J}」。`:""}${c.spread||""}:`+M.map(X=>`${X.position}「${X.name}」${X.orientation}`).join(",")+"。",sections:M.slice(0,4).map(X=>({h:X.position,t:`「${X.name}」${X.orientation}:${(X.keywords||[]).slice(0,3).join("、")||X.core||""}。${X.image?`牌面上${X.image}。`:""}${X.astro?`占星对应是${X.astro}。`:X.role?`它在盘上顶的是「${X.role}」那个角色。`:""}${X.positionHint||""}`})),advice:[`最值得先看的是「${te.name}」(${te.position}·${te.orientation})——${(te.keywords||[]).slice(0,3).join("、")||"它所在的位置,就是这件事现在的着力点"}。`,"把牌当镜子:它给的是看事情的角度,不是判决。看完写一句「那我下一步做什么」。"],caveat:c.systemNote||"塔罗为象征系统,牌义与元素对应存在流派差异。",footer:"以上是把盘面符号翻译成话,不是断语;真正的判断要看现实里那几步。"}}function I(c){const M=c.score;if(!M)return null;const J=(c.dimensions||[]).filter(re=>re&&re.text),te=re=>{const R=re&&re.dayMaster;return R?typeof R=="string"?R.replace(/日主$/,""):`${R.stem||""}${R.element||""}`:""},X=te(c.a),ee=te(c.b);return{system:"hepan",title:"先看这一张:你们大致怎么相处",chips:s([X&&ee?`${X} × ${ee}`:"",M.level,`${M.total}/100`]),lead:`${X&&ee?`你们是 ${X} 与 ${ee}。`:""}合盘描述的是「相处方式与互补点」,不判合不合,也不决定关系成败。整体上盘面给的是「${M.level}」(${M.total}/100——分数只是相对刻度,不是及格线)。`,sections:J.slice(0,3).map(re=>({h:re.label,t:re.text})),advice:["一起看,别一个人看完拿去判断对方:前者是对话,后者是审判。","把上面的分歧当话题清单:哪一条你们真的在意,就聊哪一条。"],caveat:c.notes&&c.notes[0]||"合盘看的是相处方式与互补点,不决定关系成败。",footer:"以上是把盘面符号翻译成话,不是断语;真正的判断要看现实里那几步。"}}function fe(c){const M=c.points||[],J=c.segments||[];if(!M.length||!J.length)return null;const te=Number.isInteger(c.meta&&c.meta.nowYear)?c.meta.nowYear:null,X=te&&M.find(le=>le.year===te)||null,ee=X&&J.find(le=>X.age>=le.startAge&&X.age<=le.endAge)||J[0],re=J[J.indexOf(ee)+1],R=M.filter(le=>le.age>=ee.startAge&&le.age<=ee.endAge),D=R.length?R.reduce((le,oe)=>le+oe.score,0)/R.length:0,Y=M.reduce((le,oe)=>le+oe.score,0)/M.length,ie=D>=Y+5?"比一生平均更亮":D<=Y-5?"比一生平均更闷":"与一生平均差不多",Q=c.highlights&&c.highlights.best||[],F=c.highlights&&c.highlights.worst||[],B=X?`你现在 ${X.age} 岁(${te} 年),在「${ee.ganZhi}」这一步的第 ${X.age-ee.startAge+1} 年(${ee.startAge}–${ee.endAge} 岁)${re?`,再过 ${ee.endAge-X.age+1} 年到 ${re.startAge} 岁换「${re.ganZhi}」`:",已是最后一步"}。`:`没给当前日期(asOf),所以不标「现在在第几步」;先看第一步「${ee.ganZhi}」(${ee.startAge}–${ee.endAge} 岁)起手的样子。`;return{system:"trend",title:"先看这一条线:这些年大致什么走势",chips:s([ee.ganZhi,`${ee.startAge}–${ee.endAge} 岁`,X?`${X.age} 岁`:""]),lead:`这条线按 ${c.meta&&c.meta.toAge||M.length} 岁排到 ${M[M.length-1].year} 年,共 ${J.length} 步大运。`+B,sections:[{h:"这一步的基调",t:`这一步里各年的平均分是 ${D.toFixed(0)},${ie}(全盘平均 ${Y.toFixed(0)})。分数是相对刻度,不是绝对值。`},{h:"这些年里最亮和最闷的",t:`${Q.length?`高点:${Q.slice(0,2).join("、")}`:"没有特别高的点"};${F.length?`低点:${F.slice(0,2).join("、")}`:"没有特别低的点"}。高点适合推进,低点适合收口。`},{h:"怎么用这条线",t:"它不是命运表,是把「顺/不顺」画成可视的起伏。真正决定走向的,是你在这几步里做了什么。"}],advice:["把下一步换运的年龄记下来:换运前后半年,通常是最容易做决定、也最容易冲动的时候。","低点年别做大额投入,高点年别只观望——这两条比记分数管用。"],caveat:"线按年岁等距绘制,实际每步大运十年;起点与交运按节气推算,出生时刻未知时按日估算。",footer:"以上是把盘面符号翻译成话,不是断语;真正的判断要看现实里那几步。"}}function we(c){return!c||typeof c!="object"?null:c.system==="bazi"?f(c):c.system==="ziwei"?r(c):c.system==="liuyao"?y(c):c.system==="meihua"?S(c):c.system==="daliuren"?x(c):c.system==="qimen"?b(c):c.system==="tarot"?G(c):c.system==="hepan"?I(c):c.system==="trend"?fe(c):null}return{plainSummary:we}})(),v.index=(function(){const{buildBazi:L}=v.bazi||{},{buildLiuyao:C,tossLines:Z,bodyLabels:H,yongshenOf:P,yongshenStrength:A,fushenAccess:E,hexagramStrength:q,jinTuiPower:z,yingqiWindow:p}=v.liuyao||{},{buildZiwei:w,BRIGHTNESS:_,flowOf:k,asOfParts:s,ZIWEI_SCHOOL_DEFAULTS:$}=v.ziwei||{},{drawTarot:d}=v.tarot||{},{buildMeihua:f}=v.meihua||{},{buildDaliuren:r}=v.daliuren||{},{buildHepan:o,tripleOf:l}=v.hepan||{},{buildZiweiHepan:i}=v["ziwei-hepan"]||{},{buildQimen:u,buildSnapshot:h}=v.qimen||{},{geocodeAddress:y,resolveAddress:S}=v.geo||{},{toJDN:x,ganzhiName:b,dayGanzhiIndex:G}=v.calendar||{},{bool:I,canonicalFlags:fe,canonicalNumbers:we}=v.bool||{},{randomOf:c,isSeed:M}=v.random||{},{encodeHandle:J,decodeHandle:te,resolveHandle:X,pruneForeignKeys:ee,ownedKeys:re}=v.handle||{},{askLink:R,parseAskLink:D,formOf:Y,restNote:ie,askPackages:Q}=v.bridge||{},{parseRevision:F,displayValue:B}=v.revise||{},{interpret:le,DIRECTIONS:oe,DIRECTION_DEFAULT:xe}=v.interpret||{},{followup:ne,askPrompt:pe}=v.followup||{},{crossCheck:Ce,crossText:Ye,crossSection:ue}=v.crosscheck||{},{pastSignals:he,verifyFit:de}=v.verify||{},{rectifyBirth:ge}=v.rectify||{},{buildAlmanac:ye}=v.almanac||{},{buildZeri:ze}=v.zeri||{},{buildChenggu:Oe}=v.chenggu||{},{buildXiaoliuren:Re}=v.xiaoliuren||{},{buildStar:me}=v.star||{},{buildNumerology:qe}=v.numerology||{},{buildMbti:_e,mbtiPaper:Ue}=v.mbti||{},{buildConvert:Le}=v.convert||{},{classicsFor:dn,classicsText:Ve,suiyunClassicOf:Ze,classicOf:mn,CLASSIC_BOOKS:He}=v.classics||{},{diffObjects:en,summarize:Ae,sortDiffs:Te,labelOf:Fe,rootOf:nn,categoryOf:We,formatValue:Be,CALIBER_SWITCHES:Je,viewRows:De}=v.diff||{},{canonicalJson:fn,fingerprintOf:tn}=v.fingerprint||{},{buildTrend:an}=v.trend||{},{buildFengshui:Xe}=v.fengshui||{},{buildName:on}=v.name||{},{buildTrace:sn,traceMarkdown:Qe,SYSTEM_LABEL:$n}=v.trace||{},{fail:ce}=v.fail||{},{assertCivil:gn,MIN_YEAR:rn,MAX_YEAR:ln}=v.validate||{},{parseDateTime:be,daysInMonth:cn}=v.datetime||{},ke=e=>String(e).padStart(2,"0"),Pe=["male","female"],yn=new Set(["bazi","ziwei","hepan","trend","meihua","daliuren","qimen","name"]),pn={bazi:{what:"时柱",advice:"知道大概几点就补上,不知道就传 hourUnknown:true(只排三柱)"},ziwei:{what:"命宫与生时星曜",advice:"紫微排不出三柱,必须补上出生时刻"},hepan:{what:"两侧时柱",advice:"两侧都要出生时刻,合盘才有意义"},trend:{what:"时柱与起运",advice:"知道大概几点就补上,不知道就传 hourUnknown:true(按日估算)"},meihua:{what:"起卦时刻",advice:"时间起卦要用真实起念时刻,请补 HH:mm"},daliuren:{what:"起课时辰(月将与贵人)",advice:"请补起课时刻 HH:mm"},qimen:{what:"起局时辰(旬首与局数)",advice:"请补起局时刻 HH:mm"},name:{what:"时柱",advice:"请补出生时刻 HH:mm"}};function Ne(e,t=""){if(Pe.includes(e))return e;const a=e==null||e===""?"(未提供)":`「${e}」`;throw ce("E_INPUT",`${t?t+"的":""}gender 必须是 male 或 female${a};性别决定大运/大限顺逆,不能靠默认值`)}const _n=["brightnessSchool","gengYearSihua","tianmaSchool","tiankongSchool","jiekongSchool","kuiyueSchool","tianshiTianshang","changshengSchool","lateZishi","shenzhuSchool","mingzhuSchool","zuoyaoSchool","liunianSihua","sihuaVariant"];function zn(e){const t={};for(const a of _n)e[a]!==void 0&&(t[a]=e[a]);return e.schools&&typeof e.schools=="object"&&(t.schools=e.schools),t}function vn(e){const t=e.pillars,a=(se,je)=>`${se}:${je.ganzhi} ${je.stemTenGod?`十神 ${je.stemTenGod} `:""}藏干 ${je.hidden.map(Ge=>`${Ge.stem}(${Ge.tenGod})`).join(" ")} 纳音 ${je.nayin} 地势 ${je.dishi} 自坐 ${je.zizuo} 空亡 ${je.kongwang.join("")}`+(je.shensha&&je.shensha.length?` 神煞 ${je.shensha.join("、")}`:""),n=Object.entries(e.wuxing).map(([se,je])=>`${se}${je}`).join(" "),g=e.palaces?`【胎元】${e.palaces.taiyuan.ganzhi} 胎息 ${e.palaces.taixi?e.palaces.taixi.ganzhi:"—"}`+(e.palaces.minggong?` 命宫 ${e.palaces.minggong.ganzhi}`:" 命宫 时柱暂缺,不排")+(e.palaces.shengong?` 身宫 ${e.palaces.shengong.ganzhi}`:" 身宫 时柱暂缺,不排"):"",m=e.dayun.list.slice(0,8).map(se=>`${se.startAge}岁 ${se.ganzhi}(${se.stemTenGod})${se.luck?`·${se.luck.tier}`:""}${se.relations&&se.relations.length?`[${se.relations.join("")}]`:""}`).join(" "),j=e.dayun.jiao&&e.dayun.jiao.at?`;交运 ${e.dayun.jiao.at}(${e.dayun.jiao.frame},距${e.dayun.jiao.from.name} ${e.dayun.jiao.spanDays} 天,三日折一年)`:"",N=e.dayun.startAgeExact,O=N&&Number.isInteger(N.years)?`起运岁(精确):${N.years} 年 ${N.months} 个月 ${N.days} 天 ${N.hours} 小时(${N.caliber};上面「${e.dayun.startAge.years}岁${e.dayun.startAge.months}个月」是四舍五入到月,两者同源)`:"",V=e.jieqi.nearBoundaryMinutes<20?`
83
+ `)}}return{EVENT_PROMPT_VERSION:C,ASK_KINDS:Z,buildEventPrompt:f}})(),v["plain-summary"]=(function(){const{ASK_KINDS:L}=v["event-prompt"]||{},{PALACE_FIELD:C,GATE_MEANING:Z}=v["qimen-prompt"]||{},H=L||{},P=C||{},A=Z||{},E={wealth:"business",career:"career",love:"love",health:"other",study:"career",travel:"action",general:"other"},q=c=>E[c]||(H[c]?c:"other"),z={木:{color:"青、绿",where:"东边、有树有水的地方",daily:"早上多出门走走"},火:{color:"红、橙、紫",where:"南边、向阳的房间",daily:"白天多晒太阳,别总待在阴冷的屋里"},土:{color:"黄、棕、米色",where:"中原地带、干爽高燥处",daily:"把作息和吃饭时间固定下来"},金:{color:"白、银、浅灰",where:"西边、通风利落的地方",daily:"把该断的事断干净,别拖"},水:{color:"黑、深蓝",where:"北边、临水处",daily:"留出独处和放空的时间"}},p={正印:"靠吸收和消化来获得安全感,习惯先想明白再动",偏印:"想得比说得多,一件事会在心里推演出很多种可能",正官:"对规矩和责任敏感,别人一句交代会变成自己的压力",七杀:"对压力和竞争敏感,遇强则强,也容易被强势的人吸引",正财:"对现实条件敏感,不太会被空话打动",偏财:"对机会敏感,愿意为看得见的回报承担风险",食神:"表达温和,喜欢把日子过得有滋味",伤官:"有自己的标准,看不上粗糙的东西,容易先挑毛病",比肩:"自我边界清楚,不太愿意被安排",劫财:"同辈之间容易较劲,也容易替朋友出头"},w={长生:"刚起步,有生机",沐浴:"不安定,容易被外界牵动",冠带:"在成形,开始要面子",临官:"正当力,能扛事",帝旺:"很足,但也容易过满",衰:"开始收力,做事偏保守",病:"使不上劲,需要借外力",死:"静态,不爱主动",墓:"收着、藏着,不爱外露",绝:"在这里使不上劲,容易觉得被压着",胎:"还在孕育,慢热",养:"在积攒,等时机"},_={紫微:"要主导、在意体面",天机:"脑子转得快,爱盘算",太阳:"愿意给出去,也容易被消耗",武曲:"务实,认结果",天同:"图安稳,怕冲突",廉贞:"要强,情绪起伏大",天府:"稳,能存住东西",太阴:"细腻,心思藏在里面",贪狼:"欲望强、多才多艺",巨门:"爱辨析,也容易生口舌",天相:"会配合,擅长讲和",天梁:"老成,愿意护着别人",七杀:"独断,敢冲",破军:"破旧立新,不安于现状"},k={庙:"得力",旺:"得力",得地:"还算得力",平:"一般",陷:"不太稳"},s=c=>[...new Set(c.filter(Boolean))],$={寅:"初春",卯:"仲春",辰:"暮春",巳:"初夏",午:"盛夏",未:"长夏",申:"初秋",酉:"仲秋",戌:"深秋",亥:"初冬",子:"仲冬",丑:"隆冬"};function d(c,M){const J={po:[],chong:[],he:[]};for(const te of c&&c.branches||[])!M||!String(te).includes(M)||(/破/.test(te)?J.po.push(te):/冲/.test(te)?J.chong.push(te):/合/.test(te)&&J.he.push(te));return J}function f(c){const M=c.pillars||{},J=M.day||{},te=M.month||{},X=c.dayMaster||{},ee=c.climate||{},re=c.input&&c.input.gender||"female",R=Object.entries(c.frame&&c.frame.godStats&&c.frame.godStats.groups||{}).filter(([,me])=>me>0).sort((me,qe)=>qe[1]-me[1]),D=c.frame&&c.frame.yongshen&&c.frame.yongshen.favorTenGods||[],Y=c.frame&&c.frame.yongshen&&c.frame.yongshen.favor||[],ie=c.frame&&c.frame.yongshen&&c.frame.yongshen.avoid||[],Q=$[te.branch]||`${te.branch}月`,F=ee.label==="寒湿"?"天寒水旺,木像冬天的藤,不是不强,是冷得伸展不开":ee.label==="燥热"?"火土偏燥,像久旱的地,需要水和湿气来松一松":"寒暖相对均衡,没有极端的偏枯",B=ee.need&&ee.need.element||Y[0]||"",le=`${X.stem||""}${X.element||""}日主,生在${Q}${te.branch||""}月:${F}。${B?`最需要的是${B}${ee.need&&ee.need.why?`——${ee.need.why}`:""}。`:""}整体${c.strength?c.strength.level:"中和"},不是极旺也不是极弱,所以${c.strength&&c.strength.level==="身弱"?"很多事要靠外部条件配合,硬扛不如借力":"撑得住,关键是别把力气用在错的地方"}。`,oe=R.slice(0,2).map(([me])=>me),xe=[];for(const me of Object.values(M))me&&(me.stemTenGod&&xe.push(me.stemTenGod),me.hidden&&me.hidden[0]&&me.hidden[0].tenGod&&xe.push(me.hidden[0].tenGod));const pe=`${oe.map(me=>{const qe={印:["正印","偏印"],官杀:["正官","七杀"],食伤:["食神","伤官"],财:["正财","偏财"],比劫:["比肩","劫财"]}[me]||[],_e=qe.find(Ue=>xe.includes(Ue))||qe[0];return _e&&p[_e]?`${me}偏重:${p[_e]}。`:""}).filter(Boolean).join("")}${D.length,""}`+(oe.includes("印")?"想得多是你的默认状态,好处是稳,代价是慢和累。":""),Ce=re==="female"?["正官","七杀"]:["正财","偏财"],Ye=re==="female"?"官杀(正官与七杀)":"财星(正财与偏财)",ue={year:"年干",month:"月干",day:"日干",hour:"时干"},he=Object.entries(M).filter(([,me])=>me&&Ce.includes(me.stemTenGod)).map(([me,qe])=>`${ue[me]}${qe.stemTenGod}`),de=J.hidden&&J.hidden[0]&&J.hidden[0].tenGod||"",ge=d(c.relations,J.branch),ye=[];ye.push(`${re==="female"?"女命":"男命"}看配偶星取${Ye}${he.length?`,${he.join("、")}`:",盘中未透干"}${he.length?"——摆在明处,说明这件事在你生活里是绕不开的主题":"——不显在明处,往往要靠后天遇到的人把它带出来"}。`),de&&ye.push(`日支(配偶宫)坐${J.branch}${de}${J.dishi?`,日主在这里是「${J.dishi}」:${w[J.dishi]||""}`:""}。`),ge.po.length&&ye.push(`日支与另一支相破(${ge.po.join("、")}):破不是吵架,是那种说不清、解释不明白的暗耗,容易冷处理。`),ge.chong.length&&ye.push(`日支逢冲(${ge.chong.join("、")}):关系里变动感强,聚散、异地、节奏不一致都可能出现。`),ge.he.length&&ye.push(`日支有合(${ge.he.join("、")}):容易被关系拴住,进去了就不太想出来。`),c.hourUnknown&&ye.push("时柱暂缺,所以「子女」这一路的信息读不出,感情结论也就少了三分之一。");const ze=(c.frame&&c.frame.geju||[]).map(me=>me.name),Oe=[];ge.po.length&&Oe.push("破在日支:最伤人的往往不是大事,是没说开的小事。"),ze.includes("伤官见官")&&Oe.push("盘里有「伤官见官」的组合:既想要稳定,又忍不了对方的毛病,这是同一件事的两面。"),oe.includes("印")&&!oe.includes("财")&&Oe.push("印重而财轻:想得多、落得少;越焦虑越容易继续想。"),Oe.length||Oe.push("这一盘没有特别尖锐的冲克,卡点更多在「节奏」上——什么时候该动,什么时候该停。");const Re=[];if(B&&z[B]){const me=z[B];Re.push(`多接触${B}:${me.color}这类颜色、${me.where},日常可以${me.daily}。`)}return ie.length&&Re.push(`少把自己放在${ie.slice(0,2).join("、")}过重的环境里——不是不能碰,是别长期待在那种氛围中。`),oe.includes("印")&&Re.push("给「想」设个时限:一件事想超过十分钟还没结论,就先做一个最小动作,用行动换信息。"),ze.includes("伤官见官")&&Re.push("把标准用在事情上,不要用在人身上;对人提要求之前,先说清你需要什么。"),{system:"bazi",title:"先看这一张:这张盘大致在说什么",chips:s([`${X.stem||""}${X.element||""}日主`,`${te.branch||""}月`,ee.label||"",c.strength?c.strength.level:"",c.hourUnknown?"时柱暂缺":""]),lead:le,sections:[{h:"你的底色",t:pe||"结构比较均衡,没有一边倒的偏重。"},{h:"感情这件事",t:ye.join("")},{h:"最容易卡住的地方",t:Oe.join("")}],advice:Re,caveat:c.hourUnknown?"时柱暂缺:以上只据年、月、日六个字,等于全盘信息的七成左右。子女缘分、晚年走势、以及「内心最深处那一层」都读不全,结论只作参考。":"",footer:"以上都是对结构的描述,不是断语;判断好坏要结合你自己的处境。"}}function r(c){const M=c.palaces||[],J=M[0]||{},te=c.body||{},X=(J.stars||[]).filter(ne=>ne.type==="主星"),ee=M.find(ne=>ne.isBody)||{},re=M.find(ne=>ne.palace==="夫妻")||{},R=X.map(ne=>ne.name).join("、")||"空宫(借对宫)",D=X.map(ne=>k[ne.brightness]||"").filter(Boolean)[0]||"",Y=ne=>ne.filter(pe=>pe.type==="主星").map(pe=>`${pe.name}${_[pe.name]?`(${_[pe.name]})`:""}`).join(";"),ie=c.patternSummary||{},Q=s(ie.broken||[]),F=s(ie.bad||[]),B=s([...ie.good||[],...ie.neutral||[]]).filter(ne=>!Q.includes(ne)),le=re.stars||[],oe=le.filter(ne=>ne.type==="主星"),xe=le.filter(ne=>ne.type==="煞星");return{system:"ziwei",title:"先看这一张:这张盘大致在说什么",chips:s([`命宫在${J.branch||""}`,R,c.bureau?c.bureau.name:"",te.lands?`身宫落${te.lands}`:""]),lead:`命宫在${J.branch||""},坐${R}${D?`(${D})`:""};身宫落在${te.lands||te.palace||"—"}。${X.length?`底色是${X.map(ne=>_[ne.name]||ne.name).join("、")}。`:"命宫无主星,性格更多由对宫与三方决定,可塑性反而大。"}${B.length?`结构上成的是${B.slice(0,3).join("、")}——格局只说明形状,不是吉凶判词。`:"没有完整成套的格局,这一盘更多看单颗星的性质,少看组合。"}`,sections:[{h:"你的底色",t:`${Y(J.stars||[])||"命宫无主星,靠三方四正补"}。身宫落${te.lands||"—"},说明你这辈子真正花力气的地方在${te.lands||"那一块"}。`},{h:"感情这件事",t:`夫妻宫在${re.branch||"—"},坐${oe.map(ne=>`${ne.name}${ne.brightness?`(${k[ne.brightness]||ne.brightness})`:""}`).join("、")||"空宫(借对宫)"}。${xe.length?`同宫还有${xe.map(ne=>ne.name).join("、")}——关系里容易起摩擦,来得快也去得快。`:"没有明显的煞星同宫,关系相对平顺。"}`},{h:"最容易卡住的地方",t:`${Q.length?`被冲破的格局有${Q.join("、")}——结构还在,但成色打折;冲不等于毁,说的是它不如完好时那么顶用。`:"主要格局没有明显被冲破。"}${F.length?`另有${F.join("、")}这类忌格,只描述结构,不作吉凶断。`:""}`}],advice:[`命宫主星${X.length?`是${X.map(ne=>ne.name).join("、")},顺它的长处在做事,比硬改性格省力`:"不显,先靠环境和习惯替自己定节奏"}。`,`身宫落${te.lands||"—"}:这块是你真正在意的地方,也是容易耗人的地方,留出余量。`],caveat:"",footer:"以上都是对结构的描述,不是断语;判断好坏要结合你自己的处境。"}}const o={旺:"当令,气最足",相:"有生机,正在起",休:"气在泄,歇着",囚:"被压着,使不上劲",死:"最弱,得靠外援"},l={官鬼:"职位、压力、管你的人和事",妻财:"钱、资源、实际回报",父母:"文书、答复、流程与长辈",子孙:"结果本身、松弛、把事情落地",兄弟:"同辈、分利、竞争"},i={日生:"日辰生它,当天有人托着",日克:"日辰克它,当天被压一头",比和:"与日辰同气,力量相当",日合:"与日辰相合,黏住了",日冲:"与日辰相冲,当天就动"};function u(c){if(!c)return"";const M=[],J=o[c.monthState]||c.monthSay||"";J&&M.push(`月令${c.monthState||""}(${J})`);const te=i[c.dayRelation]||c.daySay||"";return te&&M.push(te),c.kong&&M.push("旬空——抓不实,等冲或填"),c.moving&&M.push("发动,是这件事的动因"),c.monthChong&&M.push("月破,先破后立"),M.join(";")}function h(c){const M=c.hexStrength&&c.hexStrength.lines||[];if(!M.length)return null;const J=M.find(B=>B.shi)||null,te=M.find(B=>B.ying)||null,X=c.body||{},ee=X.ben||{},re=X.bian||{},R=c.cast&&c.cast.movingPositions||[],D=M.filter(B=>B.moving),Y=String(c.question||"").trim(),ie=s([...X.labels||[],...c.hexStrength&&c.hexStrength.labels||[]]),Q=c.hexStrength&&c.hexStrength.month?c.hexStrength.month.branch:"",F=[ee.chong?"六冲卦:事情容易散、节奏快":"",ee.he?"六合卦:事情黏住、快不起来":"",X.fuYin&&(X.fuYin.inner||X.fuYin.outer)?"有伏吟:原地打转":"",X.fanYin&&(X.fanYin.inner||X.fanYin.outer)?"有反吟:来回反复":""].filter(Boolean);return{system:"liuyao",title:"先看这一卦:这卦大致在说什么",chips:s([ee.name,re.name?`变${re.name}`:"",R.length?`${R.length} 爻动`:"静卦",Q?`${Q}月`:""]),lead:`${Y?`你问的是「${Y}」。`:""}本卦「${ee.name||"—"}」${re.name?`,${R.length?`第 ${R.join("、")} 爻动`:"六爻安静"},变「${re.name}」`:""}。方向还留在「综合」,所以这一卦没有取用神——先只讲与问题无关的那几样:你(世爻)、事情(应爻)、卦体。`,sections:[{h:"代表你的是",t:J?`世爻在${J.name}(${J.branch}${J.element}·${J.liuqin}):${u(J)||"状态平稳"}。`:"这一卦取不到世爻。"},{h:"代表事情的是",t:te?`应爻在${te.name}(${te.branch}${te.element}·${te.liuqin}):${u(te)||"状态平稳"}。应爻说的是「事情那一头」的状态,不是你努力的程度。`:"这一卦取不到应爻。"},{h:"卦体与动爻",t:`${F.length?`${F.join(";")}。`:"没有六冲、六合、伏吟、反吟这类整体结构。"}${D.length?`动爻在${D.map(B=>`${B.name}(${B.liuqin})`).join("、")}——动的地方,就是这件事会发生变化的那一环。`:"六爻安静:眼下没有明显在动的地方,说明事情的节奏还没起来。"}`}],advice:["先在上面选一个「询问方向」(工作、感情、生意、推进、择日):选完才会取用神,旺衰、应期、成败条件才有落点。",...(H.other&&H.other.reality||[]).slice(0,2)].filter(Boolean),caveat:"未指定所问之事:这一版只读世应、卦体与动爻,不判成败,也不给应期——不是算不出来,是取用神要先知道问什么。",footer:"以上是把盘面符号翻译成话,不是断语;真正的判断要看现实里那几步。"}}function y(c){const M=c.useGod||{};if(!M.liuqin)return h(c);const J=M.found||[];if(!J.length&&!M.missing)return null;const te=String(c.question||"").trim(),X=c.useGodStrength&&c.useGodStrength.lines||[],ee=ne=>X.find(pe=>pe.position===ne)||null,R=(c.hexStrength&&c.hexStrength.lines||[]).find(ne=>ne.shi)||null,D=c.useGodStrength&&c.useGodStrength.month?c.useGodStrength.month.branch:"",Y=c.dayGanZhi&&c.dayGanZhi.name||"",ie=J.map(ne=>ne.name).join("、"),Q=`${te?`你问的是「${te}」。`:"你没填具体问题,这里按「综合」取用神,结论会更粗。"}这卦里代表它的是「${M.liuqin}」(${M.ask||""}),`+(J.length?`落在${ie}${J.length>1?"——两处都出现了,两个条件要一起看":""}。`:"盘中看不见它(伏藏),要等冲开或引出才有动静。")+`日辰是${Y||"—"},月建是${D||"—"}。`,F=[],B=[];for(const ne of J){const pe=ee(ne.position);pe&&(/旺|相/.test(pe.monthState||"")&&!pe.kong&&!pe.monthChong&&F.push(ne.name),(/日克|日冲/.test(pe.dayRelation||"")||pe.kong||pe.monthChong)&&B.push(ne.name))}const le=J.length?F.length>B.length?"条件偏有利":B.length>F.length?"条件偏紧,得有外力或时间":"一半一半,取决于你怎么推":"没有可判的落点",oe=s([...(M.labels||[]).filter(ne=>/两现|伏藏|六合|六冲/.test(ne)),c.body&&c.body.ben&&c.body.ben.chong?"六冲卦:事情容易散,节奏偏快":"",c.body&&c.body.ben&&c.body.ben.he?"六合卦:事情黏住,快不起来":""]),xe=s((c.yingqi&&c.yingqi.items||[]).map(ne=>ne.branch)).slice(0,4);return{system:"liuyao",title:"先看这一卦:这卦大致在说什么",chips:s([c.ben&&c.ben.name,`用神 ${M.liuqin||""}`,D?`${D}月`:"",c.yingqi?c.yingqi.tempo:""]),lead:Q,sections:[{h:"代表你的是",t:R?`世爻在${R.name}(${R.branch}${R.element}·${R.liuqin}):${u(R)||"状态平稳"}。`:"这一卦的世爻取不到,先看用神那一条。"},{h:"代表这件事的是",t:J.length?J.map(ne=>`${ne.name} ${ne.ganzhi}(${ne.liuqin}):${u(ee(ne.position))||"没有明显的月日冲克"}。`).join(""):"用神伏藏:盘中看不见它,说明这件事现在还不在明面上,要等一个引子。"},{h:"成不成看哪里",t:`把用神的月令与日辰放在一起,盘面给的是「${le}」。${oe.length?`另有:${oe.join(";")}。`:""}`}],advice:[...(H[q(M.direction)]&&H[q(M.direction)].reality||[]).slice(0,2),xe.length?`应期只看地支:${xe.join("、")}——地支只是「往哪个方向等」,不是公历日期。`:""].filter(Boolean),caveat:s([J.length>1?`用神两现(${ie}):本插件不替你二选一,两处条件一起看。`:"",M.missing?"用神伏藏:先看伏神与飞神的关系,再看有没有东西把它冲出来。":"","世应只说明「你」和「事」的相对位置,不直接等于吉凶。"]).join(""),footer:"以上是把盘面符号翻译成话,不是断语;真正的判断要看现实里那几步。"}}function S(c){const M=c.bodyUse;if(!M||!M.body||!M.use)return null;const J=String(c.question||"").trim();return{system:"meihua",title:"先看这一卦:方向大致在哪",chips:s([c.ben&&c.ben.name,c.bian&&`变${c.bian.name}`,M.relation?`体用 ${M.relation.split("(")[0]}`:""]),lead:`${J?`你问的是「${J}」。`:""}本卦「${c.ben&&c.ben.name}」,动在第 ${c.moving} 爻,变卦「${c.bian&&c.bian.name}」。体卦 ${M.body.trigram}(${M.body.element})代表你,用卦 ${M.use.trigram}(${M.use.element})代表这件事:${M.relation}。`,sections:[{h:"过程与结果",t:`过程看互卦「${c.hu&&c.hu.name||"—"}」,结果看变卦「${c.bian&&c.bian.name||"—"}」。梅花给的是方向,不是细节——它不会告诉你几号、多少钱。`},{h:"盘面给的分量",t:`这一卦的体用关系被标成「${M.level}」。注意:这是条件层面的判断,不是结果已经发生;条件好但不动,一样没有结果。`}],advice:["把它当「换个角度看这件事」:体用只分「谁在给、谁在耗」,剩下要你自己补具体动作。","如果要推进,先定一个最小动作(打个电话、发条消息),别等条件齐了再动。"],caveat:"梅花取象的自由度大:同一卦,不同人读出的细节可以不同。本插件只取体用生克这一层。",footer:"以上是把盘面符号翻译成话,不是断语;真正的判断要看现实里那几步。"}}function x(c){const M=c.sanChuan||{};if(!M.chu||!M.zhong||!M.mo)return null;const J=String(c.question||"").trim(),te=ee=>`${ee.zhi}(${ee.liuQin||""}·${ee.jiangFull||""})`,X=ee=>l[ee.liuQin]?`——${l[ee.liuQin]}`:"";return{system:"daliuren",title:"先看这一课:事情怎么走到这一步",chips:s([c.geJu&&c.geJu.name,`${M.chu.zhi}→${M.mo.zhi}`,c.yueJiang&&`月将${c.yueJiang.zhi}`]),lead:`${J?`你问的是「${J}」。`:""}三传是 ${M.chu.zhi} → ${M.zhong.zhi} → ${M.mo.zhi};末传落 ${M.mo.zhi}(${M.mo.liuQin||""}·${M.mo.jiangFull||""}),课体是「${c.geJu&&c.geJu.name||"—"}」。`,sections:[{h:"起手(初传)",t:`${te(M.chu)}${X(M.chu)}。这是事情开头的样子。`},{h:"转折(中传)",t:`${te(M.zhong)}${X(M.zhong)}。中间会经过这一段,也是容易改道的地方。`},{h:"落点(末传)",t:`${te(M.mo)}${X(M.mo)}。末传比初传更接近结果——但也只是「照现在这样走下去会到哪」。`}],advice:["先看初传:事情是从哪儿起的?把那个起点找出来,比猜结果有用。","中传若与初传相冲相克,说明中途会变;这时别把计划定死。"],caveat:"三传讲的是传变形态,不给具体日期;同一课不同流派对课体的命名也有差异。",footer:"以上是把盘面符号翻译成话,不是断语;真正的判断要看现实里那几步。"}}function b(c){const M=c.siZhu&&c.siZhu.day?String(c.siZhu.day)[0]:"",J=c.siZhu&&c.siZhu.time?String(c.siZhu.time)[0]:"",te=c.palaces||[];if(!te.length)return null;const X=F=>te.find(B=>B.tianPan===F)||(c.centerPalace&&c.centerPalace.tianPan===F?c.centerPalace:null),ee=X(M),re=X(J),R=String(c.question||"").trim(),D=F=>{const B=F&&P[F.palace]&&P[F.palace].field;return B?B.split(":")[0]:F?`${F.palace}宫`:"盘中取不到"},Y=F=>F&&P[F.palace]&&P[F.palace].dir?`(${P[F.palace].dir})`:"",ie=F=>F?`${D(F)}${Y(F)}|${F.gate||"—"}·${F.star||"—"}·${F.god||"—"}`:"盘中取不到",Q=F=>!F||!F.gateRelation||!F.gateRelation.type?"门与宫的关系没算到":`${F.gateRelation.type}(${F.gateRelation.note||""})`;return{system:"qimen",title:"先看这一局:条件和位置在哪",chips:s([c.ju,c.zhiFu&&`值符${c.zhiFu.star}`]),lead:`${R?`你问的是「${R}」。`:""}日干 ${M} 落在${ie(ee)},时干 ${J} 落在${ie(re)}——前者代表你,后者代表这件事。你这边门与宫是${Q(ee)};事情那边是${Q(re)}。`,sections:[{h:"你这边的条件",t:ee?`你在${P[ee.palace]?P[ee.palace].field:ee.palace+"宫"};门是${ee.gate||"—"}——${A[ee.gate]||"门名只说明形态"}。`:"日干落在中宫或取不到:中宫无门无神,按寄宫(多寄坤二)取用,读的时候要说清这是寄宫。"},{h:"事情那边的条件",t:re?`事情落在${P[re.palace]?P[re.palace].field:re.palace+"宫"};门是${re.gate||"—"}——${A[re.gate]||"门名只说明形态"}。`:"时干落在中宫或取不到,同样按寄宫看,别当成坤二本宫。"},{h:"门名不是吉凶",t:"开门主启动、生门主生长、休门主等待、伤门主损耗、杜门主隐藏——这些说的是「这件事现在是什么形态」,不是好坏判决。要看它与日干宫、时干宫的生克。"}],advice:["把「我这边」和「事情那边」的宫位对一下:两边相距越远,越需要中间人、流程或时间。","如果门名是伤门、死门,不是叫你别做,而是提醒这件事的代价和收尾要先想清楚。"],caveat:s([c.juMethodNote||"","奇门重方位与时机;本插件不给具体方位建议,只把宫位与门星神摊开。"]).join(""),footer:"以上是把盘面符号翻译成话,不是断语;真正的判断要看现实里那几步。"}}function G(c){const M=c.cards||[];if(!M.length)return null;const J=String(c.question||"").trim(),te=M.find(X=>/现在|现况|当下|建议|核心/.test(X.position||""))||M[Math.floor(M.length/2)];return{system:"tarot",title:"先看这几张牌:它们各在说什么",chips:s([c.spread]),lead:`${J?`你问的是「${J}」。`:""}${c.spread||""}:`+M.map(X=>`${X.position}「${X.name}」${X.orientation}`).join(",")+"。",sections:M.slice(0,4).map(X=>({h:X.position,t:`「${X.name}」${X.orientation}:${(X.keywords||[]).slice(0,3).join("、")||X.core||""}。${X.image?`牌面上${X.image}。`:""}${X.astro?`占星对应是${X.astro}。`:X.role?`它在盘上顶的是「${X.role}」那个角色。`:""}${X.positionHint||""}`})),advice:[`最值得先看的是「${te.name}」(${te.position}·${te.orientation})——${(te.keywords||[]).slice(0,3).join("、")||"它所在的位置,就是这件事现在的着力点"}。`,"把牌当镜子:它给的是看事情的角度,不是判决。看完写一句「那我下一步做什么」。"],caveat:c.systemNote||"塔罗为象征系统,牌义与元素对应存在流派差异。",footer:"以上是把盘面符号翻译成话,不是断语;真正的判断要看现实里那几步。"}}function I(c){const M=c.score;if(!M)return null;const J=(c.dimensions||[]).filter(re=>re&&re.text),te=re=>{const R=re&&re.dayMaster;return R?typeof R=="string"?R.replace(/日主$/,""):`${R.stem||""}${R.element||""}`:""},X=te(c.a),ee=te(c.b);return{system:"hepan",title:"先看这一张:你们大致怎么相处",chips:s([X&&ee?`${X} × ${ee}`:"",M.level,`${M.total}/100`]),lead:`${X&&ee?`你们是 ${X} 与 ${ee}。`:""}合盘描述的是「相处方式与互补点」,不判合不合,也不决定关系成败。整体上盘面给的是「${M.level}」(${M.total}/100——分数只是相对刻度,不是及格线)。`,sections:J.slice(0,3).map(re=>({h:re.label,t:re.text})),advice:["一起看,别一个人看完拿去判断对方:前者是对话,后者是审判。","把上面的分歧当话题清单:哪一条你们真的在意,就聊哪一条。"],caveat:c.notes&&c.notes[0]||"合盘看的是相处方式与互补点,不决定关系成败。",footer:"以上是把盘面符号翻译成话,不是断语;真正的判断要看现实里那几步。"}}function fe(c){const M=c.points||[],J=c.segments||[];if(!M.length||!J.length)return null;const te=Number.isInteger(c.meta&&c.meta.nowYear)?c.meta.nowYear:null,X=te&&M.find(le=>le.year===te)||null,ee=X&&J.find(le=>X.age>=le.startAge&&X.age<=le.endAge)||J[0],re=J[J.indexOf(ee)+1],R=M.filter(le=>le.age>=ee.startAge&&le.age<=ee.endAge),D=R.length?R.reduce((le,oe)=>le+oe.score,0)/R.length:0,Y=M.reduce((le,oe)=>le+oe.score,0)/M.length,ie=D>=Y+5?"比一生平均更亮":D<=Y-5?"比一生平均更闷":"与一生平均差不多",Q=c.highlights&&c.highlights.best||[],F=c.highlights&&c.highlights.worst||[],B=X?`你现在 ${X.age} 岁(${te} 年),在「${ee.ganZhi}」这一步的第 ${X.age-ee.startAge+1} 年(${ee.startAge}–${ee.endAge} 岁)${re?`,再过 ${ee.endAge-X.age+1} 年到 ${re.startAge} 岁换「${re.ganZhi}」`:",已是最后一步"}。`:`没给当前日期(asOf),所以不标「现在在第几步」;先看第一步「${ee.ganZhi}」(${ee.startAge}–${ee.endAge} 岁)起手的样子。`;return{system:"trend",title:"先看这一条线:这些年大致什么走势",chips:s([ee.ganZhi,`${ee.startAge}–${ee.endAge} 岁`,X?`${X.age} 岁`:""]),lead:`这条线按 ${c.meta&&c.meta.toAge||M.length} 岁排到 ${M[M.length-1].year} 年,共 ${J.length} 步大运。`+B,sections:[{h:"这一步的基调",t:`这一步里各年的平均分是 ${D.toFixed(0)},${ie}(全盘平均 ${Y.toFixed(0)})。分数是相对刻度,不是绝对值。`},{h:"这些年里最亮和最闷的",t:`${Q.length?`高点:${Q.slice(0,2).join("、")}`:"没有特别高的点"};${F.length?`低点:${F.slice(0,2).join("、")}`:"没有特别低的点"}。高点适合推进,低点适合收口。`},{h:"怎么用这条线",t:"它不是命运表,是把「顺/不顺」画成可视的起伏。真正决定走向的,是你在这几步里做了什么。"}],advice:["把下一步换运的年龄记下来:换运前后半年,通常是最容易做决定、也最容易冲动的时候。","低点年别做大额投入,高点年别只观望——这两条比记分数管用。"],caveat:"线按年岁等距绘制,实际每步大运十年;起点与交运按节气推算,出生时刻未知时按日估算。",footer:"以上是把盘面符号翻译成话,不是断语;真正的判断要看现实里那几步。"}}function we(c){return!c||typeof c!="object"?null:c.system==="bazi"?f(c):c.system==="ziwei"?r(c):c.system==="liuyao"?y(c):c.system==="meihua"?S(c):c.system==="daliuren"?x(c):c.system==="qimen"?b(c):c.system==="tarot"?G(c):c.system==="hepan"?I(c):c.system==="trend"?fe(c):null}return{plainSummary:we}})(),v.index=(function(){const{buildBazi:L}=v.bazi||{},{buildLiuyao:C,tossLines:Z,bodyLabels:H,yongshenOf:P,yongshenStrength:A,fushenAccess:E,hexagramStrength:q,jinTuiPower:z,yingqiWindow:p}=v.liuyao||{},{buildZiwei:w,BRIGHTNESS:_,flowOf:k,asOfParts:s,ZIWEI_SCHOOL_DEFAULTS:$}=v.ziwei||{},{drawTarot:d}=v.tarot||{},{buildMeihua:f}=v.meihua||{},{buildDaliuren:r}=v.daliuren||{},{buildHepan:o,tripleOf:l}=v.hepan||{},{buildZiweiHepan:i}=v["ziwei-hepan"]||{},{buildQimen:u,buildSnapshot:h}=v.qimen||{},{geocodeAddress:y,resolveAddress:S}=v.geo||{},{toJDN:x,ganzhiName:b,dayGanzhiIndex:G}=v.calendar||{},{bool:I,canonicalFlags:fe,canonicalNumbers:we}=v.bool||{},{randomOf:c,isSeed:M}=v.random||{},{encodeHandle:J,decodeHandle:te,resolveHandle:X,pruneForeignKeys:ee,ownedKeys:re}=v.handle||{},{askLink:R,parseAskLink:D,formOf:Y,restNote:ie,askPackages:Q}=v.bridge||{},{parseRevision:F,displayValue:B}=v.revise||{},{interpret:le,DIRECTIONS:oe,DIRECTION_DEFAULT:xe}=v.interpret||{},{followup:ne,askPrompt:pe}=v.followup||{},{crossCheck:Ce,crossText:Ye,crossSection:ue}=v.crosscheck||{},{pastSignals:he,verifyFit:de}=v.verify||{},{rectifyBirth:ge}=v.rectify||{},{buildAlmanac:ye}=v.almanac||{},{buildZeri:ze}=v.zeri||{},{buildChenggu:Oe}=v.chenggu||{},{buildXiaoliuren:Re}=v.xiaoliuren||{},{buildStar:me}=v.star||{},{buildNumerology:qe}=v.numerology||{},{buildMbti:_e,mbtiPaper:Ue}=v.mbti||{},{buildConvert:Le}=v.convert||{},{classicsFor:dn,classicsText:Ve,suiyunClassicOf:Ze,classicOf:mn,CLASSIC_BOOKS:He}=v.classics||{},{diffObjects:en,summarize:Ae,sortDiffs:Te,labelOf:Fe,rootOf:nn,categoryOf:We,formatValue:Be,CALIBER_SWITCHES:Je,viewRows:De}=v.diff||{},{canonicalJson:fn,fingerprintOf:tn}=v.fingerprint||{},{buildTrend:an}=v.trend||{},{buildFengshui:Xe}=v.fengshui||{},{buildName:on}=v.name||{},{buildTrace:sn,traceMarkdown:Qe,SYSTEM_LABEL:$n}=v.trace||{},{fail:ce}=v.fail||{},{assertCivil:gn,MIN_YEAR:rn,MAX_YEAR:ln}=v.validate||{},{parseDateTime:be,daysInMonth:cn}=v.datetime||{},ke=e=>String(e).padStart(2,"0"),Pe=["male","female"],yn=new Set(["bazi","ziwei","hepan","trend","meihua","daliuren","qimen","name"]),pn={bazi:{what:"时柱",advice:"知道大概几点就补上,不知道就传 hourUnknown:true(只排三柱)"},ziwei:{what:"命宫与生时星曜",advice:"紫微排不出三柱,必须补上出生时刻"},hepan:{what:"两侧时柱",advice:"两侧都要出生时刻,合盘才有意义"},trend:{what:"时柱与起运",advice:"知道大概几点就补上,不知道就传 hourUnknown:true(按日估算)"},meihua:{what:"起卦时刻",advice:"时间起卦要用真实起念时刻,请补 HH:mm"},daliuren:{what:"起课时辰(月将与贵人)",advice:"请补起课时刻 HH:mm"},qimen:{what:"起局时辰(旬首与局数)",advice:"请补起局时刻 HH:mm"},name:{what:"时柱",advice:"请补出生时刻 HH:mm"}};function Ne(e,t=""){if(Pe.includes(e))return e;const a=e==null||e===""?"(未提供)":`「${e}」`;throw ce("E_INPUT",`${t?t+"的":""}gender 必须是 male 或 female${a};性别决定大运/大限顺逆,不能靠默认值`)}const _n=["brightnessSchool","gengYearSihua","tianmaSchool","tiankongSchool","jiekongSchool","kuiyueSchool","tianshiTianshang","changshengSchool","lateZishi","shenzhuSchool","mingzhuSchool","zuoyaoSchool","liunianSihua","sihuaVariant","jieluSchool","suipoSchool"];function zn(e){const t={};for(const a of _n)e[a]!==void 0&&(t[a]=e[a]);return e.schools&&typeof e.schools=="object"&&(t.schools=e.schools),t}function vn(e){const t=e.pillars,a=(se,je)=>`${se}:${je.ganzhi} ${je.stemTenGod?`十神 ${je.stemTenGod} `:""}藏干 ${je.hidden.map(Ge=>`${Ge.stem}(${Ge.tenGod})`).join(" ")} 纳音 ${je.nayin} 地势 ${je.dishi} 自坐 ${je.zizuo} 空亡 ${je.kongwang.join("")}`+(je.shensha&&je.shensha.length?` 神煞 ${je.shensha.join("、")}`:""),n=Object.entries(e.wuxing).map(([se,je])=>`${se}${je}`).join(" "),g=e.palaces?`【胎元】${e.palaces.taiyuan.ganzhi} 胎息 ${e.palaces.taixi?e.palaces.taixi.ganzhi:"—"}`+(e.palaces.minggong?` 命宫 ${e.palaces.minggong.ganzhi}`:" 命宫 时柱暂缺,不排")+(e.palaces.shengong?` 身宫 ${e.palaces.shengong.ganzhi}`:" 身宫 时柱暂缺,不排"):"",m=e.dayun.list.slice(0,8).map(se=>`${se.startAge}岁 ${se.ganzhi}(${se.stemTenGod})${se.luck?`·${se.luck.tier}`:""}${se.relations&&se.relations.length?`[${se.relations.join("")}]`:""}`).join(" "),j=e.dayun.jiao&&e.dayun.jiao.at?`;交运 ${e.dayun.jiao.at}(${e.dayun.jiao.frame},距${e.dayun.jiao.from.name} ${e.dayun.jiao.spanDays} 天,三日折一年)`:"",N=e.dayun.startAgeExact,O=N&&Number.isInteger(N.years)?`起运岁(精确):${N.years} 年 ${N.months} 个月 ${N.days} 天 ${N.hours} 小时(${N.caliber};上面「${e.dayun.startAge.years}岁${e.dayun.startAge.months}个月」是四舍五入到月,两者同源)`:"",V=e.jieqi.nearBoundaryMinutes<20?`
84
84
  ⚠ 出生时刻距「节」仅 ${e.jieqi.nearBoundaryMinutes} 分钟,而节气时刻本身有最多约 14 分钟的偏差,月柱与年柱建议人工复核。`:"",K={year:"年",month:"月",day:"日",hour:"时"},U=e.shensha&&e.shensha.groups&&e.shensha.groups.length?`神煞(${e.shensha.count} 见):`+e.shensha.groups.map(se=>`${se.cat}|`+se.items.map(je=>`${je.name}(${je.pillars.map(Ge=>K[Ge]).join("")})`).join("、")).join(";"):"神煞:—",T=e.renyuan,ae=mn("smt-renyuan"),W=T?`人元:${T.month}月第${T.day}日,${T.active}${T.activeElement}司权(${T.segments.map(se=>`${se.stem}${se.from}–${se.to}`).join(" ")})${T.beyond?";已过 30 日表,按本气算":""}${ae?`|原文见《${He[ae.book].name}·${ae.chapter}》`:""}`:"",Se=e.frame&&e.frame.yongshen&&e.frame.yongshen.disputed||[],$e=Se.length?` 有争议:${Se.map(se=>`${se.element}(${se.favorRole};${se.climate}盘调候忌${se.element})`).join("、")}`:"",Ee=new Set(Se.map(se=>se.element)),Ie=e.frame&&e.frame.yongshen&&e.frame.yongshen.neutral||[],wt=Ie.length?` 中性偏忌:${Ie.map(se=>`${se.element} ${se.weight} 分`).join("、")}(近零,不作实忌)`:"",St=e.frame?[`格局:${e.frame.primary?`${e.frame.primary.name}(${e.frame.primary.evidence})`:"—"}`,`   ${e.frame.geju.map(se=>`${se.name}[${se.kind}${se.status?`·${se.status}`:""}]`).join(" ")}`,`用神:喜${e.frame.yongshen.favor.join("")}(${e.frame.yongshen.favorTenGods.join("、")}) 忌${e.frame.yongshen.avoid.join("")}(${e.frame.yongshen.avoidTenGods.join("、")})${$e}${wt} ${e.frame.yongshen.method}`,`   ${e.frame.yongshen.detail}`,`寒暖:${e.climate?`${e.climate.label}(${(e.climate.evidence||[]).join("、")})${e.climate.need?` 调候取${e.climate.need.stem}${e.climate.need.element} 忌${e.climate.avoidElement}${Ee.has(e.climate.avoidElement)?"(有争议)":""}`:""}`:"—"}`+(e.frame.yongshen.qt?` 穷通:${e.frame.yongshen.qt.month}${e.frame.yongshen.qt.stem}取${e.frame.yongshen.qt.yong.join("、")}(首取${e.frame.yongshen.qt.primary})`:""),`十神权重:${Object.entries(e.frame.godStats.groups).map(([se,je])=>`${se}${je}`).join(" ")}`]:[],ve=e.strength&&e.strength.branchStructure,jt=ve?ve.branches.map(se=>`${se.label}${se.branch}${se.camp}${ve.placeholderHour&&se.key==="hour"?"·占位":""}`).join("、"):"",kt=ve&&!ve.placeholderHour&&!ve.complete?" 时柱暂缺,只列三支":"",In=ve?`地支结构:${ve.placeholderHour?"三支+占位":"四支"} ${ve.code}(${jt}) ${ve.word}${ve.congProb!=null?`(静态从格 ${ve.congRange})`:""}${kt}`:"",hn=e.relations&&Array.isArray(e.relations.anhe)?e.relations.anhe:[],Mn=hn.length?`暗合:${hn.join(" ")}(另列,不并入上面的合冲刑害;${hn.length===1?"只一对,按口径可忽略":`共 ${hn.length} 对`})`:"",xt=e.hourUnknown===!0||!t.hour;return[`【四柱】${t.year.ganzhi} ${t.month.ganzhi} ${t.day.ganzhi}${t.hour?` ${t.hour.ganzhi}`:"(时柱暂缺)"}`,`日主:${e.dayMaster.stem}${e.dayMaster.element}(${e.dayMaster.yinYang}) 空亡:${e.kongwang.join("")}`,a("年柱",t.year),a("月柱",t.month),a("日柱",t.day),...xt?[]:[a("时柱",t.hour)],`五行:${n}`,...g?[g]:[],`日主强弱:${e.strength.level}(${e.strength.score}) ${e.strength.detail}`,...In?[In]:[],...St,`天干关系:${e.relations&&e.relations.stems.length?e.relations.stems.join(" "):"—"}`,`地支关系:${e.relations&&e.relations.branches.length?e.relations.branches.join(" "):"—"}`,...Mn?[Mn]:[],U,`真太阳时:${e.solarTime.trueSolarText}(${e.input.geo?e.input.geo.note+";":""}${e.solarTime.note}) 晚子时:${e.input.lateZi?"23:00 后算次日":"23:00 后仍算当日"}`,`节气:上一节 ${e.jieqi.previous.name} ${e.jieqi.previous.time} 下一节 ${e.jieqi.next.name} ${e.jieqi.next.time}`,...W?[W]:[],`大运:${e.dayun.rule}(${e.dayun.direction}),${e.dayun.startAge.years}岁${e.dayun.startAge.months}个月起运${j}`,...O?[O]:[],` ${m}`,`流年:${e.liunian.slice(0,10).map(se=>`${se.year}${se.ganzhi}(${se.stemTenGod})${se.luck?`·${se.luck.tier}`:""}`).join(" ")}`,(()=>{const se=e.liunian.filter(Me=>Me.suiyun&&Me.suiyun.signals&&Me.suiyun.signals.length);if(!se.length)return"岁运提示:近十年无岁运并临、运年反吟或大运/流年伏吟、反吟(只标干支,不判吉凶)";const je=Me=>`${Me.type}${(Me.type.startsWith("流年")||Me.type.startsWith("大运"))&&Me.target?`(${Me.target})`:""}`,Ge=Ze(e),zt=Ge?`|古籍见《${He[Ge.book].name}·${Ge.chapter}》`:"";return"岁运提示(只标干支变动,不判吉凶):"+se.map(Me=>`${Me.year}${Me.ganzhi} ${Me.suiyun.signals.map(je).join("/")}`).join(";")+zt})(),"(格局、用神、行运吉凶为扶抑+简化调候的量化提示,非断语。)"].join(`
85
- `)+V}function qn(e){const t=e.lunar.monthRaw||e.lunar.month,a=`${e.lunar.year}年${e.lunar.isLeap?`闰${t}`:e.lunar.month}月${e.lunar.day}日`+(e.lunar.isLeap&&e.lunar.month!==t?`(按${e.lunar.month}月起盘)`:""),n=(()=>{if(!e.schools)return"";const ae=Object.entries({brightnessSchool:"亮度",gengYearSihua:"庚干四化",tianmaSchool:"天马",tiankongSchool:"天空",jiekongSchool:"截空",kuiyueSchool:"魁钺",tianshiTianshang:"天伤天使",changshengSchool:"长生",lateZishi:"晚子时",shenzhuSchool:"身主",mingzhuSchool:"命主取法",zuoyaoSchool:"杂曜全表",liunianSihua:"流年四化取干",sihuaVariant:"十干四化变体"}).filter(([W])=>e.schools[W]&&e.schools[W]!==$[W]).map(([W,Se])=>`${Se} ${e.schools[W]}`);return ae.length?`【流派】${ae.join(" ")}`:""})(),g=T=>T.length?T.map(ae=>`${ae.name}${ae.mutagen?`化${ae.mutagen}`:""}`).join(" "):"—",m=T=>`神煞:长生(${T.changsheng}) 博士(${T.boshi}) 将前(${T.jiangqian}) 岁前(${T.suiqi})`,j=[];for(const T of e.palaces){const ae=T.isSoul?"【命】":T.isBody?"【身】":"  ";j.push(` ${T.palace} ${T.branch} ${T.ganzhi} ${ae} 大限${String(T.daxian.start).padStart(2)}-${T.daxian.end} 小限${String(T.xiaoxian.age).padStart(2)} ${g(T.stars)}`),j.push(` ${m(T.shensha)}`)}const N=(e.liunian??[]).slice(0,6).map(T=>` ${T.year} ${T.ganzhi} ${String(T.age).padStart(2)}岁 命宫${T.lifePalace.branch}(${T.lifePalace.palace}) 流禄${T.liulu} 流羊${T.liuyang} 流陀${T.liutuo} | ${T.mutagen.map(ae=>ae.replace("化","")).join(" ")}`+(T.mutagenHits?` 四化落宫 ${T.mutagenHits.map(ae=>`${ae.star}${ae.type}→${ae.palace||"未上盘"}`).join("、")}`:"")+(T.sanfangMainStars?` 三方主星 ${T.sanfangMainStars.join("")}`:"")),O=(e.patterns??[]).length?e.patterns.map(T=>`${T.name}(${T.tone==="good"?"吉格":T.tone==="bad"?"忌格":"中"}:${T.evidence})`).join(";"):"无明显格局(按内置规则)",V=(e.daxianList??[]).slice(0,8).map(T=>` ${T.branch}宫(${T.palace})${T.ages[0]}-${T.ages[1]}岁 ${T.ganzhi} 会${T.mainStars.join("")||"—"} 化 ${T.mutagenHits.map(ae=>`${ae.star}${ae.type}→${ae.palace||"未上盘"}`).join("、")}`),K=(()=>{const T=e.flyChains;if(!T)return"";const ae=Se=>{const $e=T[Se];return!$e||!$e.steps.length?"":`${Se}:${$e.path.join("→")}${$e.closed?"(成环)":""}`},W=["禄","权","科","忌"].map(ae).filter(Boolean).join(" ");return W?`【命宫飞星】${W}`:""})(),U=(()=>{const T=e.flyComposite;if(!T||!Array.isArray(T.sources)||!T.sources.length)return"";const ae=T.labels.length?T.labels.join(" · "):"无同宫会聚",W=["禄","权","科","忌"].map(Se=>{const $e=(T.byType&&T.byType[Se]||[]).filter(Ie=>!Ie.self),Ee=[...new Set($e.map(Ie=>String(Ie.to).replace(/宫$/,"")))];return Ee.length?`${Se}→${Ee.join("/")}`:""}).filter(Boolean).join(" ");return`【三方四正飞化】${T.sanfang.join("·")}:${ae}${W?` ${W}`:""}`})();return[`【农历】${a}(月首 ${e.lunar.monthStart}) 时支:${e.hourBranch} 年干支:${e.yearGanzhi}`,`【时刻】${e.solarTime?`${e.solarTime.civilText} → 真太阳时 ${e.solarTime.trueSolarText}${e.input.geo?"("+e.input.geo.note+")":""}`:""}`,`【命宫】${e.soul.branch}(${e.soul.ganzhi}·${e.soul.nayin}) 【身宫】${e.body.branch}(落${e.body.lands}) 【五行局】${e.bureau.name}`,`【紫微】${e.ziwei} 【天府】${e.tianfu} 【命主】${e.lifeMaster} 【身主】${e.bodyMaster}${e.bodyMasterNote?`(${e.bodyMasterSchool==="common"?"子午皆火星":"子铃午火"})`:""}${e.lifeMasterNote?`(${e.lifeMasterNote})`:""}`,`【大限】${e.daxian.rule},${e.daxian.startAge}岁起 【小限】${e.xiaoxianRule.direction}`,n,`【昌曲】文昌${e.changqu.wenchang.branch}(${e.changqu.wenchang.palace}${e.changqu.wenchang.mutagen?"·化"+e.changqu.wenchang.mutagen:""}) 文曲${e.changqu.wenqu.branch}(${e.changqu.wenqu.palace}${e.changqu.wenqu.mutagen?"·化"+e.changqu.wenqu.mutagen:""})`,`   ${e.changqu.relation} 入命三方:${e.changqu.inSoulSanfang?"是":"否"} 吸收面:${e.changqu.absorb.label}(${e.changqu.absorb.reason})`,K,U,"十二宫:",...j,"大限(按起运年龄排序,前 8 限,宫干四化落宫):",...V,"流年(前 6 年,完整 12 年在结构化数据里):",...N,`【格局】${O}`,e.patternSummary?`【结构统计】吉格 ${e.patternSummary.good.length}、中性 ${e.patternSummary.neutral.length}、忌格 ${e.patternSummary.bad.length}${e.patternSummary.broken.length?`、破格 ${e.patternSummary.broken.length}(${e.patternSummary.broken.join("、")})`:""};${e.patternSummary.note}`:"",e.lunar.note?`注:${e.lunar.note}`:""].filter(Boolean).join(`
85
+ `)+V}function qn(e){const t=e.lunar.monthRaw||e.lunar.month,a=`${e.lunar.year}年${e.lunar.isLeap?`闰${t}`:e.lunar.month}月${e.lunar.day}日`+(e.lunar.isLeap&&e.lunar.month!==t?`(按${e.lunar.month}月起盘)`:""),n=(()=>{if(!e.schools)return"";const ae=Object.entries({brightnessSchool:"亮度",gengYearSihua:"庚干四化",tianmaSchool:"天马",tiankongSchool:"天空",jiekongSchool:"截空",kuiyueSchool:"魁钺",tianshiTianshang:"天伤天使",changshengSchool:"长生",lateZishi:"晚子时",shenzhuSchool:"身主",mingzhuSchool:"命主取法",zuoyaoSchool:"杂曜全表",liunianSihua:"流年四化取干",sihuaVariant:"十干四化变体",jieluSchool:"截路空亡",suipoSchool:"岁前十二神"}).filter(([W])=>e.schools[W]&&e.schools[W]!==$[W]).map(([W,Se])=>`${Se} ${e.schools[W]}`);return ae.length?`【流派】${ae.join(" ")}`:""})(),g=T=>T.length?T.map(ae=>`${ae.name}${ae.mutagen?`化${ae.mutagen}`:""}`).join(" "):"—",m=T=>`神煞:长生(${T.changsheng}) 博士(${T.boshi}) 将前(${T.jiangqian}) 岁前(${T.suiqi})`,j=[];for(const T of e.palaces){const ae=T.isSoul?"【命】":T.isBody?"【身】":"  ";j.push(` ${T.palace} ${T.branch} ${T.ganzhi} ${ae} 大限${String(T.daxian.start).padStart(2)}-${T.daxian.end} 小限${String(T.xiaoxian.age).padStart(2)} ${g(T.stars)}`),j.push(` ${m(T.shensha)}`)}const N=(e.liunian??[]).slice(0,6).map(T=>` ${T.year} ${T.ganzhi} ${String(T.age).padStart(2)}岁 命宫${T.lifePalace.branch}(${T.lifePalace.palace}) 流禄${T.liulu} 流羊${T.liuyang} 流陀${T.liutuo} | ${T.mutagen.map(ae=>ae.replace("化","")).join(" ")}`+(T.mutagenHits?` 四化落宫 ${T.mutagenHits.map(ae=>`${ae.star}${ae.type}→${ae.palace||"未上盘"}`).join("、")}`:"")+(T.sanfangMainStars?` 三方主星 ${T.sanfangMainStars.join("")}`:"")),O=(e.patterns??[]).length?e.patterns.map(T=>`${T.name}(${T.tone==="good"?"吉格":T.tone==="bad"?"忌格":"中"}:${T.evidence})`).join(";"):"无明显格局(按内置规则)",V=(e.daxianList??[]).slice(0,8).map(T=>` ${T.branch}宫(${T.palace})${T.ages[0]}-${T.ages[1]}岁 ${T.ganzhi} 会${T.mainStars.join("")||"—"} 化 ${T.mutagenHits.map(ae=>`${ae.star}${ae.type}→${ae.palace||"未上盘"}`).join("、")}`),K=(()=>{const T=e.flyChains;if(!T)return"";const ae=Se=>{const $e=T[Se];return!$e||!$e.steps.length?"":`${Se}:${$e.path.join("→")}${$e.closed?"(成环)":""}`},W=["禄","权","科","忌"].map(ae).filter(Boolean).join(" ");return W?`【命宫飞星】${W}`:""})(),U=(()=>{const T=e.flyComposite;if(!T||!Array.isArray(T.sources)||!T.sources.length)return"";const ae=T.labels.length?T.labels.join(" · "):"无同宫会聚",W=["禄","权","科","忌"].map(Se=>{const $e=(T.byType&&T.byType[Se]||[]).filter(Ie=>!Ie.self),Ee=[...new Set($e.map(Ie=>String(Ie.to).replace(/宫$/,"")))];return Ee.length?`${Se}→${Ee.join("/")}`:""}).filter(Boolean).join(" ");return`【三方四正飞化】${T.sanfang.join("·")}:${ae}${W?` ${W}`:""}`})();return[`【农历】${a}(月首 ${e.lunar.monthStart}) 时支:${e.hourBranch} 年干支:${e.yearGanzhi}`,`【时刻】${e.solarTime?`${e.solarTime.civilText} → 真太阳时 ${e.solarTime.trueSolarText}${e.input.geo?"("+e.input.geo.note+")":""}`:""}`,`【命宫】${e.soul.branch}(${e.soul.ganzhi}·${e.soul.nayin}) 【身宫】${e.body.branch}(落${e.body.lands}) 【五行局】${e.bureau.name}`,`【紫微】${e.ziwei} 【天府】${e.tianfu} 【命主】${e.lifeMaster} 【身主】${e.bodyMaster}${e.bodyMasterNote?`(${e.bodyMasterSchool==="common"?"子午皆火星":"子铃午火"})`:""}${e.lifeMasterNote?`(${e.lifeMasterNote})`:""}`,`【大限】${e.daxian.rule},${e.daxian.startAge}岁起 【小限】${e.xiaoxianRule.direction}`,n,`【昌曲】文昌${e.changqu.wenchang.branch}(${e.changqu.wenchang.palace}${e.changqu.wenchang.mutagen?"·化"+e.changqu.wenchang.mutagen:""}) 文曲${e.changqu.wenqu.branch}(${e.changqu.wenqu.palace}${e.changqu.wenqu.mutagen?"·化"+e.changqu.wenqu.mutagen:""})`,`   ${e.changqu.relation} 入命三方:${e.changqu.inSoulSanfang?"是":"否"} 吸收面:${e.changqu.absorb.label}(${e.changqu.absorb.reason})`,K,U,"十二宫:",...j,"大限(按起运年龄排序,前 8 限,宫干四化落宫):",...V,"流年(前 6 年,完整 12 年在结构化数据里):",...N,`【格局】${O}`,e.patternSummary?`【结构统计】吉格 ${e.patternSummary.good.length}、中性 ${e.patternSummary.neutral.length}、忌格 ${e.patternSummary.bad.length}${e.patternSummary.broken.length?`、破格 ${e.patternSummary.broken.length}(${e.patternSummary.broken.join("、")})`:""};${e.patternSummary.note}`:"",e.lunar.note?`注:${e.lunar.note}`:""].filter(Boolean).join(`
86
86
  `)}const Rn=["旺","相","休","囚","死"];function Ln(e){const t=e.states,a=e.month;if(!t||!a)return"无月令数据";const n=g=>Rn.filter(m=>g&&Array.isArray(g[m])&&g[m].length).map(m=>`${m} ${g[m].join("/")}`).join(" ");return`月令 ${a.branch}(${a.element}) 门 ${n(t.gate)||"—"} 星 ${n(t.star)||"—"} 干 ${n(t.stem)||"—"}`}function Pn(e){const t=e.palaces,a=n=>`${n.palace}宫 ${n.star||"—"}/${n.gate||"—"}/${n.god||"—"}${n.kong?" 空":""}${n.ma?" 马":""}`;return[`【四柱】${e.siZhu.year} ${e.siZhu.month} ${e.siZhu.day} ${e.siZhu.time}`,`【局数】${e.ju} 节气 ${e.jieqi}(${e.jieqiTime})`,`【值符】${e.zhiFu.star}(${e.zhiFu.gong}宫) 【值使】${e.zhiShi.gate}(${e.zhiShi.gong}宫) 旬首 ${e.xunshou}`,`【空亡】${e.kongWang.join("")||"—"} 驿马 ${e.ma.zhi||"—"}(${e.ma.gong||"—"}宫)`,`【宫位条件】击刑 ${(e.conditions&&e.conditions.jiXing||[]).map(n=>`${n.palace}宫${n.stem}`).join("、")||"无"} 三奇入墓 ${(e.conditions&&e.conditions.ruMu||[]).map(n=>`${n.palace}宫${n.stem}`).join("、")||"无"} 六仪入墓 ${(e.conditions&&e.conditions.liuYiRuMu||[]).map(n=>`${n.palace}宫${n.stem}`).join("、")||"无"}`,`【十干克应】${[...t,e.centerPalace].filter(n=>n&&n.ganYing).map(n=>`${n.palace}宫 ${n.ganYing.tian}加${n.ganYing.di} ${n.ganYing.name}`).join(" ")||"—"}`,`【旺衰】${Ln(e)}`,`【九宫】${t.map(a).join(" ")}`,`※ 晚子时:${e.lateZiHourMode==="next-day"?"23:00 后归次日":"23:00 后仍归当日"}(可用 lateZiHourMode / lateZi 指定)`,`※ ${e.rules[e.rules.length-1]}`].join(`
87
87
  `)}function Nn(e){if(!e||!Array.isArray(e.pairs)||!e.pairs.length)return[];const t=["【三方合盘】三对两两并列,不合成「三人总分」",...e.pairs.map(a=>`· ${a.a}–${a.b}:${a.level||"—"}(${a.total==null?"—":`${a.total}/100`})`)];return e.best&&(e.spread>=3?t.push(` 最顺:${e.best.a}–${e.best.b}(${e.best.total}/100)`+(e.hardest?`;最需磨合:${e.hardest.a}–${e.hardest.b}(${e.hardest.total}/100)`:"")):t.push(` 三对分数接近(最高与最低相差 ${e.spread} 分),不排名`)),e.focus&&e.focus.spread>=3&&t.push(` 差异最大的一维:${e.focus.label}(三对相差 ${e.focus.spread} 分)`),e.note&&t.push(`※ ${e.note}`),t}function Cn(e){if(e.chart==="ziwei"){const n=g=>`${g.label}:${g.score>=0?"+":""}${g.score} ${g.text}`;return[`【紫微合盘】${e.score.level}(${e.score.total}/100)`,`你 命宫 ${e.a.soul.branch}(${e.a.soulStars.join("、")||"无主星"}) 夫妻 ${e.a.spouseStars.join("、")||"无主星"} ${e.a.bureau}`,`对方 命宫 ${e.b.soul.branch}(${e.b.soulStars.join("、")||"无主星"}) 夫妻 ${e.b.spouseStars.join("、")||"无主星"} ${e.b.bureau}`,...e.dimensions.map(n),...e.interactions.map(g=>` · ${g.text}`),...Nn(e.triple),...e.notes.map(g=>`※ ${g}`)].join(`
88
88
  `)}const t=n=>`${n.label}:${n.score>=0?"+":""}${n.score} ${n.text}`,a=n=>!n||!n.solarNote?"—":`${n.longitude==null?"未含经度修正":`${n.longitude}°E`}(${n.solarNote})`;return[`【合盘】${e.score.level}(${e.score.total}/100)`,`你 ${e.a.pillars.join(" ")} 日主 ${e.a.dayMaster} 日支 ${e.a.dayBranch} ${e.a.strength||""}`,`对方 ${e.b.pillars.join(" ")} 日主 ${e.b.dayMaster} 日支 ${e.b.dayBranch} ${e.b.strength||""}`,`真太阳时:你 ${a(e.a)};对方 ${a(e.b)}`,...e.dimensions.map(t),...e.detail?[`属相:${e.detail.yearRelation.label}——${e.detail.yearRelation.text}`,`日干:${e.detail.stems.text}`,...e.detail.crossBranches&&e.detail.crossBranches.length?[`跨盘地支:${e.detail.crossBranches.map(n=>`${n.name}(${n.a}${n.b})`).join("、")}`]:[],`年命纳音:${e.detail.nayin.a} / ${e.detail.nayin.b}(${e.detail.nayin.label})——${e.detail.nayin.text}`,`吉凶象:吉 ${e.detail.tally.good} / 凶 ${e.detail.tally.bad}(${e.detail.tally.lean};分档只数象,总分以上面三维度为准)`]:[],...Nn(e.triple),...e.notes.map(n=>`※ ${n}`)].join(`