chart2txt 0.7.1 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chart2txt.min.js +1 -1
- package/dist/core/dispositors.js +2 -0
- package/dist/core/orbResolver.d.ts +38 -0
- package/dist/core/orbResolver.js +167 -0
- package/dist/humandesign2txt.d.ts +239 -0
- package/dist/humandesign2txt.js +1253 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +8 -2
- package/package.json +1 -1
package/dist/chart2txt.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.chart2txt=t():e.chart2txt=t()}(this,(()=>(()=>{"use strict";var e={6:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.analyzeCharts=function(e,t={}){const n=(0,i.validateInputData)(e);if(n)throw new Error(`Invalid chart data: ${n}`);const b=new a.ChartSettings(t),y=(0,r.isMultiChartData)(e)?e:[e],T=y.filter((e=>"transit"!==e.chartType)),O=y.find((e=>"transit"===e.chartType)),M=[...T,...O?[O]:[]],_=[],D=d(M,!0);for(const e of M){const t=d([e]),n=(0,s.calculateAspects)(b.resolvedAspectDefinitions,t,b.skipOutOfSignAspects);_.push(...n)}for(let e=0;e<M.length;e++)for(let t=e+1;t<M.length;t++){const n=M[t],r=[...d([M[e]]),...d([n])],a=(0,s.calculateMultichartAspects)(b.resolvedAspectDefinitions,r,b.skipOutOfSignAspects);_.push(...a)}const C=b.includeAspectPatterns?(0,o.detectAspectPatterns)(D,_):[],E=[],v=[],$=[];let P,I;for(const e of M){const t=_.filter((t=>t.p1ChartName===e.name&&t.p2ChartName===e.name)),n=S(C,1,1).filter((t=>A(t,e.name))),r=b.includeAspectPatterns?(0,u.detectStelliums)(h(e),e.houseCusps):[];E.push({chart:e,placements:{planets:(0,c.getPlanetPositions)(e.planets,e.houseCusps)},aspects:t,patterns:n,stelliums:r,signDistributions:b.includeSignDistributions?(0,l.calculateSignDistributions)(e.planets,e.ascendant):{elements:{},modalities:{},polarities:{}},dispositors:"transit"!==e.chartType?(0,p.calculateDispositors)(e.planets,b.includeDispositors):{}})}if(T.length>=2)for(let e=0;e<T.length;e++)for(let t=e+1;t<T.length;t++){const n=T[e],r=T[t],a=_.filter((e=>e.p1ChartName===n.name&&e.p2ChartName===r.name||e.p1ChartName===r.name&&e.p2ChartName===n.name)),i=S(C,2,2).filter((e=>A(e,n.name)&&A(e,r.name)));v.push({chart1:n,chart2:r,synastryAspects:a,compositePatterns:i,houseOverlays:b.includeHouseOverlays?(0,f.calculateHouseOverlays)(n,r):{chart1InChart2Houses:{},chart2InChart1Houses:{}}})}if(T.length>2){const e=S(C,3).filter((e=>!g(e).has(O?.name||"TRANSIT_PLACEHOLDER")));e.length>0&&(P={charts:T,patterns:e})}if(O){for(const e of T){const t=_.filter((t=>t.p1ChartName===e.name&&t.p2ChartName===O.name||t.p1ChartName===O.name&&t.p2ChartName===e.name)),n=S(C,2,2).filter((t=>A(t,e.name)&&A(t,O.name)));$.push({natalChart:e,transitChart:O,aspects:t,patterns:n})}if(T.length>0){const e=(j=C,N=[O.name],j.filter((e=>N.some((t=>A(e,t)))))).filter((e=>m(e)>=3));e.length>0&&(I={charts:M,patterns:e})}}var j,N;return{settings:b,chartAnalyses:E,pairwiseAnalyses:v,globalAnalysis:P,transitAnalyses:$,globalTransitAnalysis:I}};const r=n(613),a=n(230),i=n(371),s=n(75),o=n(919),u=n(390),c=n(175),l=n(858),p=n(729),f=n(600);function h(e){const t=["Ascendant","Midheaven","North Node","South Node"];return e.planets.filter((e=>!t.includes(e.name)))}function d(e,t=!1){return e.flatMap((e=>(t?h(e):function(e){const t=[...e.planets];return void 0!==e.ascendant&&t.push({name:"Ascendant",degree:e.ascendant}),void 0!==e.midheaven&&t.push({name:"Midheaven",degree:e.midheaven}),t}(e)).map((t=>[t,e.name]))))}function g(e){const t=new Set,n=[],r=e=>{e&&n.push(e)};switch(e.type){case"T-Square":r(e.apex),e.opposition.forEach(r);break;case"Grand Trine":case"Grand Cross":e.planets.forEach(r);break;case"Yod":r(e.apex),e.base.forEach(r);break;case"Mystic Rectangle":e.oppositions.flat().forEach(r);break;case"Kite":e.grandTrine.forEach(r),r(e.opposition)}return n.forEach((e=>{e.chartName&&t.add(e.chartName)})),t}function m(e){return g(e).size}function A(e,t){return g(e).has(t)}function S(e,t,n=1/0){return e.filter((e=>{const r=m(e);return r>=t&&r<=n}))}},75:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.calculateAspects=function(e,t,n=!0){const r=[];if(!t||t.length<2)return r;for(let a=0;a<t.length;a++)for(let i=a+1;i<t.length;i++){const[s,u]=t[a],[c,l]=t[i],p=o(e,s,c,n,u,l);p&&r.push(p)}return r},t.calculateMultichartAspects=function(e,t,n=!0){const r=[];for(let a=0;a<t.length;a++)for(let i=a+1;i<t.length;i++){const[s,u]=t[a],[c,l]=t[i];if(u!==l){const t=o(e,s,c,n,u,l);t&&r.push(t)}}return r};const r=n(904),a=n(318);function i(e){const t=e<=180?e:360-e;switch(t){case 0:return 0;case 30:return 1;case 60:return 2;case 90:return 3;case 120:return 4;case 150:return 5;case 180:return 6;default:return Math.round(t/30)}}function s(e,t,n){if(void 0===e.speed||void 0===t.speed)return"exact";const i=e.speed,s=t.speed,o=(0,r.normalizeDegree)(e.degree),u=(0,r.normalizeDegree)(t.degree);let c=Math.abs(o-u);c>180&&(c=360-c);const l=Math.abs(c-n);if((0,a.isExactAspect)(l))return"exact";if(0===i-s)return"exact";const p=(0,r.normalizeDegree)(o+.1*i),f=(0,r.normalizeDegree)(u+.1*s),h=Math.abs(c-n);let d=Math.abs(p-f);d>180&&(d=360-d);return Math.abs(d-n)<h?"applying":"separating"}function o(e,t,n,o,u,c){const l=(0,a.roundDegrees)((0,r.normalizeDegree)(t.degree)),p=(0,a.roundDegrees)((0,r.normalizeDegree)(n.degree));let f=Math.abs(l-p);f>180&&(f=360-f);let h=null;for(const r of e){const e=(0,a.roundDegrees)(Math.abs(f-r.angle));if(o){const e=Math.floor(l/30),t=Math.floor(p/30),n=i(r.angle);let a=Math.abs(e-t);if(a>6&&(a=12-a),a!==n)continue}if(e<=r.orb&&(!h||e<h.orb)){const a=s(t,n,r.angle);h={planetA:t.name,planetB:n.name,p1ChartName:u,p2ChartName:c,aspectType:r.name,orb:e,application:a}}}return h}},82:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generateDispositorsOutput=function(e){if(e.summary)return[`[DISPOSITORS] ${e.summary}`];const t=["[DISPOSITOR TREE]"];if(0===Object.keys(e).length)return t.push("No dispositor data available."),t;for(const n in e)t.push(e[n]);return t}},109:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generateElementDistributionOutput=function(e){const t=["[ELEMENT DISTRIBUTION]"];return t.push(...(0,r.formatElementDistribution)(e)),t},t.generateModalityDistributionOutput=function(e){const t=["[MODALITY DISTRIBUTION]"];return t.push(...(0,r.formatModalityDistribution)(e)),t},t.generatePolarityOutput=function(e){const t=["[POLARITY]"];return t.push(...(0,r.formatPolarityDistribution)(e)),t};const r=n(858)},156:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var a=Object.getOwnPropertyDescriptor(t,n);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,a)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.ChartSettings=t.ZODIAC_SIGNS=t.DEFAULT_ASPECTS=t.DEFAULT_SETTINGS=t.formatReportToText=t.groupAspects=t.analyzeCharts=t.chart2txt=void 0;var i=n(666);Object.defineProperty(t,"chart2txt",{enumerable:!0,get:function(){return i.chart2txt}});var s=n(6);Object.defineProperty(t,"analyzeCharts",{enumerable:!0,get:function(){return s.analyzeCharts}});var o=n(865);Object.defineProperty(t,"groupAspects",{enumerable:!0,get:function(){return o.groupAspects}});var u=n(723);Object.defineProperty(t,"formatReportToText",{enumerable:!0,get:function(){return u.formatReportToText}}),a(n(613),t);var c=n(921);Object.defineProperty(t,"DEFAULT_SETTINGS",{enumerable:!0,get:function(){return c.DEFAULT_SETTINGS}}),Object.defineProperty(t,"DEFAULT_ASPECTS",{enumerable:!0,get:function(){return c.DEFAULT_ASPECTS}}),Object.defineProperty(t,"ZODIAC_SIGNS",{enumerable:!0,get:function(){return c.ZODIAC_SIGNS}});var l=n(230);Object.defineProperty(t,"ChartSettings",{enumerable:!0,get:function(){return l.ChartSettings}});const p=n(666);t.default=p.chart2txt},172:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generateChartHeaderOutput=function(e,t="CHART"){return[`[${t}: ${e||"Unknown"}]`]}},175:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getOrdinal=function(e){const t=["th","st","nd","rd"],n=e%100;return e+(t[(n-20)%10]||t[n]||t[0])},t.getSign=a,t.getHouse=i,t.getPlanetPositions=function(e,t){return e.map((e=>{const n=(e.degree%360+360)%360;const r={name:e.name,degree:n,sign:a(n),speed:e.speed};return t&&(r.house=i(n,t)),r}))};const r=n(921);function a(e){const t=Math.floor(e/30);return r.ZODIAC_SIGNS[t]}function i(e,t){for(let n=0;n<12;n++){const r=t[n],a=t[(n+1)%12];if(r<a){if(e>=r&&e<a)return n+1}else if(e>=r||e<a)return n+1}return-1}},230:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ChartSettings=void 0;const r=n(921);t.ChartSettings=class{constructor(e={}){const t={...r.DEFAULT_SETTINGS,...e};Object.assign(this,t)}get resolvedAspectDefinitions(){if(Array.isArray(this.aspectDefinitions))return this.aspectDefinitions;switch(this.aspectDefinitions){case"traditional":return r.SIMPLE_TRADITIONAL_ORBS;case"modern":return r.SIMPLE_MODERN_ORBS;case"tight":return r.SIMPLE_TIGHT_ORBS;case"wide":return r.SIMPLE_WIDE_ORBS;default:return r.DEFAULT_SETTINGS.aspectDefinitions}}}},234:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generatePlanetsOutput=function(e){const t=["[PLANETS]"];e.forEach((e=>{const n=(0,a.formatPlanetWithDignities)(e),i=e.speed&&e.speed<0?" Retrograde":"";let s=`${e.name}: ${Math.floor(e.degree%30)}° ${e.sign}${i} ${n}`;e.house&&(s+=`, ${(0,r.getOrdinal)(e.house)} house`),t.push(s.replace(/\s+/g," ").trim())})),0===e.length&&t.push("No planets listed.");return t};const r=n(175),a=n(400)},318:(e,t)=>{function n(e,n,r=t.DEFAULT_EPSILON){return Math.abs(e-n)<r}function r(e,n=t.DEFAULT_EPSILON){return Math.abs(e)<n}function a(e,r,a=t.DEFAULT_EPSILON){return n(e,r,a)}Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_EPSILON=void 0,t.floatEquals=n,t.isNearZero=r,t.roundDegrees=function(e){return Math.round(1e4*e)/1e4},t.degreeEquals=a,t.isOnCusp=function(e,t,n=.001){return a(e,t,n)},t.isExactAspect=function(e,t=.1){return r(e,t)},t.DEFAULT_EPSILON=1e-4},371:(e,t)=>{function n(e){return e&&"object"==typeof e?"string"!=typeof e.name||""===e.name.trim()?"Point name must be a non-empty string":"number"==typeof e.degree&&isFinite(e.degree)?void 0===e.speed||"number"==typeof e.speed&&isFinite(e.speed)?null:`Point ${e.name} has invalid speed value: ${e.speed}`:`Point ${e.name} has invalid degree value: ${e.degree}`:"Point must be an object"}function r(e){if(!Array.isArray(e))return"Points must be an array";for(let t=0;t<e.length;t++){const r=n(e[t]);if(r)return`Point at index ${t}: ${r}`}const t=e.map((e=>e.name)),r=t.filter(((e,n)=>t.indexOf(e)!==n));return r.length>0?`Duplicate point names found: ${r.join(", ")}`:null}function a(e){if(void 0===e)return null;if(!Array.isArray(e))return"House cusps must be an array";if(12!==e.length)return`House cusps must contain exactly 12 values, got ${e.length}`;for(let t=0;t<e.length;t++)if("number"!=typeof e[t]||!isFinite(e[t]))return`House cusp ${t+1} has invalid value: ${e[t]}`;return null}function i(e){if(!e||"object"!=typeof e)return"Chart data must be an object";if("string"!=typeof e.name||""===e.name.trim())return"Chart name must be a non-empty string";const t=r(e.planets);if(t)return`Planets validation failed: ${t}`;if(void 0!==e.ascendant&&("number"!=typeof e.ascendant||!isFinite(e.ascendant)))return`Ascendant has invalid value: ${e.ascendant}`;if(void 0!==e.midheaven&&("number"!=typeof e.midheaven||!isFinite(e.midheaven)))return`Midheaven has invalid value: ${e.midheaven}`;const n=a(e.houseCusps);if(n)return`House cusps validation failed: ${n}`;if(void 0!==e.points){const t=r(e.points);if(t)return`Additional points validation failed: ${t}`}if(void 0!==e.timestamp&&(!(e.timestamp instanceof Date)||isNaN(e.timestamp.getTime())))return"Timestamp must be a valid Date object";if(void 0!==e.location&&"string"!=typeof e.location)return"Location must be a string";if(void 0!==e.chartType){const t=["natal","event","transit"];if(!t.includes(e.chartType))return`Chart type must be one of: ${t.join(", ")}`}return null}function s(e){if(!Array.isArray(e))return"Multi-chart data must be an array";if(0===e.length)return"Multi-chart data must contain at least one chart";if(e.length>10)return"Multi-chart data cannot contain more than 10 charts";for(let t=0;t<e.length;t++){const n=i(e[t]);if(n)return`Chart at index ${t} (${e[t]?.name||"unnamed"}): ${n}`}const t=e.map((e=>e.name)),n=t.filter(((e,n)=>t.indexOf(e)!==n));if(n.length>0)return`Duplicate chart names found: ${n.join(", ")}`;return e.filter((e=>"transit"===e.chartType)).length>1?"Cannot have more than one transit chart":null}Object.defineProperty(t,"__esModule",{value:!0}),t.validatePoint=n,t.validatePoints=r,t.validateHouseCusps=a,t.validateChartData=i,t.validateMultiChartData=s,t.validateInputData=function(e){if(!e)return"Data is required";return Array.isArray(e)?s(e):i(e)}},388:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.determineChartType=function(e){let t="natal",n="";const r=e.filter((({chartType:e})=>"transit"!==e&&"event"!==e)),a=e.filter((({chartType:e})=>"event"===e)),i=e.filter((({chartType:e})=>"transit"===e));if(i.length>1)throw new Error("Must provide at most one transit chart");const s=i.length>0;r.length>0?0===a.length?s&&(n="_with_transit"):n=1===a.length?s?"_with_event_and_transit":"_with_event":s?"_with_events_and_transit":"_with_events":s&&(n="_with_transit");if(0===r.length){if(0===a.length)throw new Error("Must provide at least one non-transit chart");t=1===a.length?"event":"multi_event"}else t=1===r.length?"natal":2===r.length?"synastry":"group_synastry";return t+n},t.generateMetadataOutput=function(e,t,n){const r=["[METADATA]",`chart_type: ${t}`];n&&r.push(`house_system: ${n}`);return r.push(`date_format: ${e.dateFormat}`),r}},390:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.detectStelliums=function(e,t,n=3){const i=[],o=new Map;if(e.forEach((e=>{const t=(0,r.getDegreeSign)(e.degree);o.has(t)||o.set(t,[]),o.get(t).push(e)})),o.forEach(((e,r)=>{if(e.length>=n){const n=e.map((e=>s(e,t))),a=n.map((e=>e.house)).filter((e=>void 0!==e)),o=e.map((e=>e.degree)),u=Math.max(...o)-Math.min(...o);i.push({type:"Stellium",planets:n,sign:r,houses:[...new Set(a)].sort(),span:u})}})),t){const r=new Map;e.forEach((e=>{const n=(0,a.getHouseForPoint)(e.degree,t);n&&(r.has(n)||r.set(n,[]),r.get(n).push(e))})),r.forEach(((e,r)=>{if(e.length>=n){const n=e.map((e=>s(e,t))),a=e.map((e=>e.degree)),o=Math.max(...a)-Math.min(...a);i.find((e=>"Stellium"===e.type&&e.planets.some((e=>n.some((t=>t.name===e.name))))))||i.push({type:"Stellium",planets:n,houses:[r],span:o})}}))}return i},t.formatStellium=function(e){const t=e.planets.map((e=>e.name)).join(", ");let n="";e.sign&&(n=e.sign);if(e.houses&&e.houses.length>0){const t=1===e.houses.length?`${(0,i.getOrdinal)(e.houses[0])} House`:e.houses.map((e=>`${(0,i.getOrdinal)(e)} House`)).join("-");n+=n?` (${t})`:t}const r=n?` in ${n}`:"";return[`Stellium (${e.span.toFixed(1)}°): ${t}${r}`]};const r=n(904),a=n(600),i=n(175);function s(e,t){const n=(0,r.getDegreeSign)(e.degree),i=t&&(0,a.getHouseForPoint)(e.degree,t)||void 0;return{name:e.name,degree:e.degree,sign:n,house:i}}},400:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.formatPlanetWithDignities=function(e){const t=e.sign,n=a[e.name],i=r.ZODIAC_SIGN_DATA.find((e=>e.name===t))?.ruler,s=[];n&&n[t]&&s.push(...n[t]);let o=s.join(", ");i&&e.name!==i&&(o?o+=` | Ruler: ${i}`:o=`Ruler: ${i}`);if(o)return`[${o}]`;return""};const r=n(921),a={Sun:{Leo:["Domicile"],Aries:["Exaltation"],Aquarius:["Detriment"],Libra:["Fall"]},Moon:{Cancer:["Domicile"],Taurus:["Exaltation"],Capricorn:["Detriment"],Scorpio:["Fall"]},Mercury:{Gemini:["Domicile"],Virgo:["Domicile","Exaltation"],Pisces:["Detriment","Fall"],Sagittarius:["Detriment"]},Venus:{Taurus:["Domicile"],Libra:["Domicile"],Scorpio:["Detriment"],Aries:["Fall"],Virgo:["Fall"]},Mars:{Aries:["Domicile"],Scorpio:["Domicile"],Libra:["Detriment"],Cancer:["Fall"]},Jupiter:{Sagittarius:["Domicile"],Pisces:["Domicile"],Gemini:["Detriment"],Virgo:["Fall"]},Saturn:{Capricorn:["Domicile"],Aquarius:["Domicile"],Cancer:["Detriment"],Leo:["Fall"]}}},600:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.calculateHouseOverlays=function(e,t){const n={};if(t.houseCusps)for(const a of e.planets)n[a.name]=(0,r.getHouse)(a.degree,t.houseCusps);const a={};if(e.houseCusps)for(const n of t.planets)a[n.name]=(0,r.getHouse)(n.degree,e.houseCusps);return{chart1InChart2Houses:n,chart2InChart1Houses:a}},t.getHouseForPoint=function(e,t){return(0,r.getHouse)(e,t)};const r=n(175)},613:(e,t)=>{var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.PlanetCategory=t.AspectClassification=void 0,t.isMultiChartData=function(e){return Array.isArray(e)},function(e){e.Major="major",e.Minor="minor",e.Esoteric="esoteric"}(n||(t.AspectClassification=n={})),function(e){e.Luminaries="luminaries",e.Personal="personal",e.Social="social",e.Outer="outer",e.Angles="angles"}(r||(t.PlanetCategory=r={}))},666:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.chart2txt=function(e,t={}){const n=(0,r.analyzeCharts)(e,t),s=n.settings;return n.chartAnalyses.forEach((e=>{e.groupedAspects=(0,a.groupAspects)(e.aspects,s)})),n.pairwiseAnalyses.forEach((e=>{e.groupedSynastryAspects=(0,a.groupAspects)(e.synastryAspects,s)})),n.transitAnalyses.forEach((e=>{e.groupedAspects=(0,a.groupAspects)(e.aspects,s)})),(0,i.formatReportToText)(n)};const r=n(6),a=n(865),i=n(723)},668:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generateHousesOutput=function(e){const t=["[HOUSE CUSPS]"];if(!e||12!==e.length)return t.push("House cusps not available"),t;for(let n=0;n<6;n++){const i=n,s=n+6,o=e[i],u=e[s],c=(0,r.getDegreeSign)(o),l=Math.floor((0,r.getDegreeInSign)(o)),p=(0,a.getOrdinal)(i+1)+" house",f=(0,r.getDegreeSign)(u),h=Math.floor((0,r.getDegreeInSign)(u)),d=(0,a.getOrdinal)(s+1)+" house",g=`${p}: ${l}° ${c}`.padEnd(24),m=`${d}: ${h}° ${f}`;t.push(`${g} ${m}`)}return t};const r=n(904),a=n(175)},723:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.formatReportToText=function(e){const{chartAnalyses:t,pairwiseAnalyses:n,globalAnalysis:s,transitAnalyses:o,globalTransitAnalysis:c}=e,f=e.settings,h=[],d=t.map((e=>e.chart)),S=(0,r.determineChartType)(d);h.push(...(0,r.generateMetadataOutput)(f,S,f.houseSystemName)),h.push("");const b=t.filter((e=>"transit"!==e.chart.chartType));for(const e of b)h.push(...g(e,f));for(const e of n)h.push(...m(e,f));s&&h.push(...A(s,!1));if(o.length>0){const e=t.find((e=>"transit"===e.chart.chartType));e&&(h.push(...(0,a.generateChartHeaderOutput)(e.chart.name,"TRANSIT")),h.push(...(0,i.generateBirthdataOutput)(e.chart.location,e.chart.timestamp,f,"[DATETIME]")),h.push(...(0,u.generatePlanetsOutput)(e.placements.planets)),h.push(""));for(const e of o)h.push(...(0,l.generateAspectsOutput)(`[TRANSIT ASPECTS: ${e.natalChart.name}]`,e.groupedAspects,e.natalChart.name,e.transitChart.name,!0)),f.includeAspectPatterns&&h.push(...(0,p.generateAspectPatternsOutput)(e.patterns,`Transit to ${e.natalChart.name}`,!0)),h.push("")}c&&h.push(...A(c,!0));return h.join("\n").trimEnd()};const r=n(388),a=n(172),i=n(888),s=n(945),o=n(668),u=n(234),c=n(82),l=n(784),p=n(762),f=n(756),h=n(109),d=n(390),g=(e,t,n)=>{const r=[],{chart:f,groupedAspects:g,patterns:m,stelliums:A,signDistributions:S,dispositors:b,placements:y}=e;return r.push(...(0,a.generateChartHeaderOutput)(f.name,n)),r.push(...(0,i.generateBirthdataOutput)(f.location,f.timestamp,t)),r.push(...(0,s.generateAnglesOutput)(f.ascendant,f.midheaven)),r.push(...(0,o.generateHousesOutput)(f.houseCusps)),r.push(...(0,u.generatePlanetsOutput)(y.planets)),t.includeDispositors&&r.push(...(0,c.generateDispositorsOutput)(b)),t.includeSignDistributions&&(r.push(...(0,h.generateElementDistributionOutput)(S.elements)),r.push(...(0,h.generateModalityDistributionOutput)(S.modalities)),r.push(...(0,h.generatePolarityOutput)(S.polarities))),r.push(...(0,l.generateAspectsOutput)("[ASPECTS]",g)),t.includeAspectPatterns&&(r.push(...(0,p.generateAspectPatternsOutput)(m,void 0,!1)),A.length>0?A.forEach((e=>{r.push(...(0,d.formatStellium)(e))})):r.push("No Stelliums detected.")),r.push(""),r},m=(e,t)=>{const n=[],{chart1:r,chart2:i,groupedSynastryAspects:s,compositePatterns:o,houseOverlays:u}=e,c="event"===r.chartType&&"event"===i.chartType?"EVENT_RELATIONSHIP":"event"===r.chartType||"event"===i.chartType?"NATAL_EVENT":"SYNASTRY";return n.push(...(0,a.generateChartHeaderOutput)(`${r.name}-${i.name}`,c)),n.push(...(0,l.generateAspectsOutput)("[PLANET-PLANET ASPECTS]",s,r.name,i.name)),t.includeAspectPatterns&&o.length>0&&n.push(...(0,p.generateAspectPatternsOutput)(o,`${r.name}-${i.name} Composite`,!0)),n.push(""),t.includeHouseOverlays&&(n.push(...(0,f.generateHouseOverlaysOutput)(u,r.name,i.name)),n.push("")),n},A=(e,t=!1)=>{const n=[],{charts:r,patterns:a}=e;if(a.length>0){const e=r.map((e=>e.name)).join("-");let i=`${e} Global Composite`;t&&(i=`${e} Global Transit Composite`),n.push(...(0,p.generateAspectPatternsOutput)(a,i,!0)),n.push("")}return n}},729:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.calculateDispositors=function(e,t=!0){if(!1===t)return{};const n={};e.forEach((e=>{n[e.name]=function(e){const t=(0,a.getSign)(e.degree),n=r.ZODIAC_SIGN_DATA.find((e=>e.name===t));return n?n.ruler:"Unknown"}(e)}));const i={};if(e.forEach((e=>{i[e.name]||function(e,t,n){if(n[e])return n[e];const r=[e];let a=e;for(;;){const i=t[a];if(!i||!t.hasOwnProperty(i)){const t={path:[...r,i],isCycle:!1,isFinal:!1,isBroken:!0};return n[e]=t}if(i===a){const t={path:r,isCycle:!1,isFinal:!0,isBroken:!1};return n[e]=t}if(r.includes(i)){const e=r.indexOf(i),t=r.slice(e),a={path:[...r,i],isCycle:!0,isFinal:!1,isBroken:!1};return t.forEach((e=>{n[e]=a})),a}if(n[i]){const t=n[i],a=[...r,...t.path],s={...t,path:a};return n[e]=s}r.push(i),a=i}}(e.name,n,i)})),"finals"===t){const t=new Set,r=new Map;e.forEach((e=>{n[e.name]===e.name&&t.add(e.name)}));for(const e in i){const t=i[e];if(t.isCycle){const e=t.path[t.path.length-1],n=t.path.indexOf(e),a=t.path.slice(n,-1),i=[...new Set(a)].sort().join("|");r.has(i)||r.set(i,a)}}const a=[];if(t.size>0&&a.push(`Final dispositors: ${[...t].sort().join(", ")}`),r.size>0){const e=[...r.values()].map((e=>{const t=[...new Set(e)].sort()[0],n=e.indexOf(t);return[...[...e.slice(n),...e.slice(0,n)],t].join(" → ")})).sort();a.push(`Cycles: ${e.join(", ")}`)}return 0===a.length?{summary:"No final dispositors or cycles found"}:{summary:a.join("; ")}}const s={};return e.forEach((e=>{const t=e.name,r=[t];let a=t;for(;;){const e=n[a];if(!e||!n.hasOwnProperty(e)){s[t]=`${r.join(" → ")} → ${e} (not in chart)`;break}if(e===a){s[t]=`${r.join(" → ")} → (final)`;break}if(r.includes(e)){s[t]=`${r.join(" → ")} → ${e} (cycle)`;break}r.push(e),a=e}})),s};const r=n(921),a=n(175)},756:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generateHouseOverlaysOutput=function(e,t,n){const r=["[HOUSE OVERLAYS]"];r.push(`${t}'s planets in ${n}'s houses:`),Object.keys(e.chart1InChart2Houses).length>0?r.push(a(e.chart1InChart2Houses)):r.push(`(${n} house cusps not available)`);r.push(`${n}'s planets in ${t}'s houses:`),Object.keys(e.chart2InChart1Houses).length>0?r.push(a(e.chart2InChart1Houses)):r.push(`(${t} house cusps not available)`);return r};const r=n(175);function a(e){const t={};for(const n in e){const r=e[n];t[r]||(t[r]=[]),t[r].push(n)}return Object.keys(t).map(Number).sort(((e,t)=>e-t)).map((e=>{const n=t[e].join(", ");return`${(0,r.getOrdinal)(e)}: ${n}`})).join(" | ")}},762:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generateAspectPatternsOutput=function(e,t,n=!0){const r=[t?`[ASPECT PATTERNS: ${t}]`:"[ASPECT PATTERNS]"];if(0===e.length)return r.push("No T-Squares detected."),r.push("No Grand Trines detected."),r;const a=e.filter((t=>"Grand Trine"!==t.type||!function(e,t){return"Grand Trine"===e.type&&t.some((t=>{if("Kite"!==t.type)return!1;const n=e=>`${e.chartName||""}-${e.name}-${e.degree}`,r=t.grandTrine.map(n),a=e.planets.map(n);return r.length===a.length&&r.every((e=>a.includes(e)))}))}(t,e))),s=["T-Square","Grand Trine","Grand Cross","Yod","Mystic Rectangle","Kite"];a.sort(((e,t)=>s.indexOf(e.type)-s.indexOf(t.type))).forEach((e=>{switch(e.type){case"T-Square":r.push(...function(e,t=!0){if("T-Square"!==e.type)return[];const n=i(e.apex,!1,t),r=i(e.opposition[0],!1,t),a=i(e.opposition[1],!1,t);return[`T-Square (${e.mode}, ${e.averageOrb.toFixed(1)}°): ${n} ← ${r} ↔ ${a}`]}(e,n));break;case"Grand Trine":r.push(...function(e,t=!0){if("Grand Trine"!==e.type)return[];const n=e.planets.map((e=>i(e,!1,t))).join(" △ ");return[`Grand Trine (${e.element}, ${e.averageOrb.toFixed(1)}°): ${n}`]}(e,n));break;case"Grand Cross":r.push(...function(e,t=!0){if("Grand Cross"!==e.type)return[];const n=e.planets.map((e=>i(e,!1,t))).join(" ⨯ ");return[`Grand Cross (${e.mode}, ${e.averageOrb.toFixed(1)}°): ${n}`]}(e,n));break;case"Yod":r.push(...function(e,t=!0){if("Yod"!==e.type)return[];const n=i(e.apex,!1,t),r=i(e.base[0],!1,t),a=i(e.base[1],!1,t);return[`Yod (${e.averageOrb.toFixed(1)}°): ${n} ← ${r} • ${a}`]}(e,n));break;case"Mystic Rectangle":r.push(...function(e,t=!0){if("Mystic Rectangle"!==e.type)return[];const n=i(e.oppositions[0][0],!1,t),r=i(e.oppositions[0][1],!1,t),a=i(e.oppositions[1][0],!1,t),s=i(e.oppositions[1][1],!1,t);return[`Mystic Rectangle (${e.averageOrb.toFixed(1)}°): ${n} ↔ ${r} | ${a} ↔ ${s}`]}(e,n));break;case"Kite":r.push(...function(e,t=!0){if("Kite"!==e.type)return[];const n=e.grandTrine.map((e=>i(e,!1,t))).join(" △ "),r=i(e.opposition,!1,t),a=e.grandTrine[0].sign?function(e){const t=["Taurus","Virgo","Capricorn"],n=["Gemini","Libra","Aquarius"],r=["Cancer","Scorpio","Pisces"];return["Aries","Leo","Sagittarius"].includes(e)?"Fire":t.includes(e)?"Earth":n.includes(e)?"Air":r.includes(e)?"Water":""}(e.grandTrine[0].sign):"";return[`Kite (${a?`${a}, `:""}${e.averageOrb.toFixed(1)}°): [${n}] ← ${r}`]}(e,n))}})),""===r[r.length-1]&&r.pop();return r};const r=n(904),a=n(175);function i(e,t=!1,n=!0){const i=Math.floor((0,r.getDegreeInSign)(e.degree)),s=t&&e.house?` (${(0,a.getOrdinal)(e.house)} house)`:"";return`${n&&e.chartName?`${e.chartName}'s `:""}${e.name} ${i}° ${e.sign}${s}`}},784:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generateAspectsOutput=function(e,t,n,r,a=!1){const i=[e];if(!t||0===t.size)return i.push("None"),i;return t.forEach(((e,t)=>{i.push(t),e.forEach((e=>{i.push(function(e,t,n,r=!1){const a=t?`${t}'s ${e.planetA}`:e.planetA;let i=e.planetB;r?i=`transiting ${e.planetB}`:n&&(i=`${n}'s ${e.planetB}`);const s=e.application&&"exact"!==e.application?` (${e.application})`:"";return`${a} ${e.aspectType} ${i}: ${e.orb.toFixed(1)}°${s}`}(e,n,r,a))}))})),i}},858:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.calculateSignDistributions=function(e,t){const n=[...e];void 0!==t&&n.push({name:"Ascendant",degree:t});const i={Fire:[],Earth:[],Air:[],Water:[]},s={Cardinal:0,Fixed:0,Mutable:0},o={Masculine:0,Feminine:0};for(const e of n){const t=(0,r.getSign)(e.degree),n=a.ZODIAC_SIGN_DATA.find((e=>e.name===t));n&&(i[n.element].push(e.name),s[n.modality]++,o[n.polarity]++)}return{elements:i,modalities:s,polarities:o}},t.formatElementDistribution=function(e){return[Object.entries(e).map((([e,t])=>0===t.length?`${e}: 0`:`${e}: ${t.length} (${t.join(", ")})`)).join(" | ")]},t.formatModalityDistribution=function(e){return[Object.entries(e).map((([e,t])=>`${e}: ${t}`)).join(" | ")]},t.formatPolarityDistribution=function(e){return[Object.entries(e).map((([e,t])=>`${e}: ${t}`)).join(" | ")]};const r=n(175),a=n(921)},865:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.groupAspects=function(e,t){const n=new Map,r=t.aspectStrengthThresholds,a=[],i=[],s=[];if(e.forEach((e=>{e.orb<=r.tight?a.push(e):e.orb<=r.moderate?i.push(e):s.push(e)})),a.sort(((e,t)=>e.orb-t.orb)),i.sort(((e,t)=>e.orb-t.orb)),s.sort(((e,t)=>e.orb-t.orb)),a.length>0){const e=`[TIGHT ASPECTS: orb under ${r.tight.toFixed(1)}°]`;n.set(e,a)}if(i.length>0){const e=`[MODERATE ASPECTS: orb ${r.tight.toFixed(1)}-${r.moderate.toFixed(1)}°]`;n.set(e,i)}if(s.length>0){const e=`[WIDE ASPECTS: orb over ${r.moderate.toFixed(1)}°]`;n.set(e,s)}return n}},888:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generateBirthdataOutput=function(e,t,n,a="[BIRTHDATA]"){if(!t)return[`${a} Not available`];const i=(0,r.formatDateCustom)(t,n.dateFormat),s=(0,r.formatTime)(t);return[`${a} ${e||"Unknown Location"} | ${i} | ${s}`]};const r=n(889)},889:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.formatDateCustom=function(e,t){const n=e.getMonth()+1,r=e.getDate(),a=e.getFullYear();switch(t.toUpperCase()){case"MM/DD/YYYY":return`${n.toString().padStart(2,"0")}/${r.toString().padStart(2,"0")}/${a}`;case"DD/MM/YYYY":return`${r.toString().padStart(2,"0")}/${n.toString().padStart(2,"0")}/${a}`;case"YYYY-MM-DD":return`${a}-${n.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}`;default:return console.warn(`Unrecognized date format: ${t}. Falling back to toLocaleDateString().`),e.toLocaleDateString()}},t.formatTime=function(e){return e.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0})}},904:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeDegree=a,t.getDegreeSign=function(e){const t=a(e),n=Math.floor(t/30);if(n<0||n>=r.ZODIAC_SIGNS.length)return console.error(`Invalid sign index computed: ${n} for normalized degree ${t}`),"Unknown Sign";return r.ZODIAC_SIGNS[n]},t.getDegreeInSign=function(e){return a(e)%30};const r=n(921);function a(e){if(!isFinite(e))throw new Error(`Invalid degree value: ${e}`);let t=e%360;return t<0&&(t+=360),t}},919:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.detectAspectPatterns=function(e,t,n){const r=[],l=function(e){const t=new Map;return e.forEach((e=>{const n=a(e.planetA,e.p1ChartName),r=a(e.planetB,e.p2ChartName);t.has(n)||t.set(n,new Map),t.has(r)||t.set(r,new Map),t.get(n).set(r,e),t.get(r).set(n,e)})),t}(t);return r.push(...function(e,t,n){const r=[];for(let a=0;a<e.length;a++)for(let c=a+1;c<e.length;c++)if(o(e[a],e[c],"opposition",t))for(let l=0;l<e.length;l++)if(l!==a&&l!==c&&o(e[a],e[l],"square",t)&&o(e[c],e[l],"square",t)){const[o,p]=e[l],[f,h]=e[a],[d,g]=e[c],m=i(o,n,p),A=i(f,n,h),S=i(d,n,g),b=u(e[a],e[c],t),y=u(e[a],e[l],t),T=u(e[c],e[l],t),O=(b.orb+y.orb+T.orb)/3,M=s(m.sign);r.push({type:"T-Square",apex:m,opposition:[A,S],mode:M,averageOrb:O})}return r}(e,l,n)),r.push(...c(e,l,n)),r.push(...function(e,t,n){const r=[];for(let a=0;a<e.length;a++)for(let c=a+1;c<e.length;c++)for(let l=c+1;l<e.length;l++)for(let p=l+1;p<e.length;p++){const f=[e[a],e[c],e[l],e[p]],h=[[0,2],[1,3],[0,3],[1,2]];let d=0,g=0;const m=[];if([[0,1],[2,3]].forEach((([e,n])=>{o(f[e],f[n],"opposition",t)&&(d++,m.push(u(f[e],f[n],t)))})),h.forEach((([e,n])=>{o(f[e],f[n],"square",t)&&(g++,m.push(u(f[e],f[n],t)))})),2===d&&4===g){const[e,t]=f[0],[a,o]=f[1],[u,c]=f[2],[l,p]=f[3],h=i(e,n,t),d=i(a,n,o),g=i(u,n,c),A=i(l,n,p),S=m.reduce(((e,t)=>e+t.orb),0)/m.length,b=s(h.sign);r.push({type:"Grand Cross",planets:[h,d,g,A],mode:b,averageOrb:S})}}return r}(e,l,n)),r.push(...function(e,t,n){const r=[];for(let a=0;a<e.length;a++)for(let s=a+1;s<e.length;s++)if(o(e[a],e[s],"sextile",t))for(let c=0;c<e.length;c++)if(c!==a&&c!==s&&o(e[a],e[c],"quincunx",t)&&o(e[s],e[c],"quincunx",t)){const[o,l]=e[c],[p,f]=e[a],[h,d]=e[s],g=i(o,n,l),m=i(p,n,f),A=i(h,n,d),S=u(e[a],e[s],t),b=u(e[a],e[c],t),y=u(e[s],e[c],t),T=(S.orb+b.orb+y.orb)/3;r.push({type:"Yod",apex:g,base:[m,A],averageOrb:T})}return r}(e,l,n)),r.push(...function(e,t,n){const r=[];for(let a=0;a<e.length;a++)for(let s=a+1;s<e.length;s++)for(let c=s+1;c<e.length;c++)for(let l=c+1;l<e.length;l++){const p=[e[a],e[s],e[c],e[l]],f=[{oppositions:[[0,1],[2,3]],sextiles:[[0,2],[0,3],[1,2],[1,3]]},{oppositions:[[0,2],[1,3]],sextiles:[[0,1],[0,3],[2,1],[2,3]]},{oppositions:[[0,3],[1,2]],sextiles:[[0,1],[0,2],[3,1],[3,2]]}];for(const e of f){let a=0,s=0;const c=[];if(e.oppositions.forEach((([e,n])=>{o(p[e],p[n],"opposition",t)&&(a++,c.push(u(p[e],p[n],t)))})),e.sextiles.forEach((([e,n])=>{const r=u(p[e],p[n],t);!r||"sextile"!==r.aspectType&&"trine"!==r.aspectType||(s++,c.push(r))})),2===a&&4===s){const[t,a]=p[e.oppositions[0][0]],[s,o]=p[e.oppositions[0][1]],[u,l]=p[e.oppositions[1][0]],[f,h]=p[e.oppositions[1][1]],d=i(t,n,a),g=i(s,n,o),m=i(u,n,l),A=i(f,n,h),S=c.reduce(((e,t)=>e+t.orb),0)/c.length;r.push({type:"Mystic Rectangle",oppositions:[[d,g],[m,A]],averageOrb:S})}}}return r}(e,l,n)),r.push(...function(e,t,n){const r=[];return c(e,t,n).forEach((a=>{a.planets.forEach((s=>{e.forEach((c=>{const[l,p]=c;if(!a.planets.some((e=>e.name===l.name&&e.chartName===p))){const f=e.find((([e,t])=>e.name===s.name&&t===s.chartName));if(f&&o(f,c,"opposition",t)){const e=i(l,n,p),s=u(f,c,t),o=(a.averageOrb+s.orb)/2;r.push({type:"Kite",grandTrine:a.planets,opposition:e,averageOrb:o})}}}))}))})),r}(e,l,n)),r};const r=n(904);function a(e,t){return t?`${e}-${t}`:e}function i(e,t,n){const a=(0,r.getDegreeSign)(e.degree),i=t&&12===t.length?(()=>{const n=e.degree%360;for(let e=0;e<12;e++){const r=t[e],a=t[(e+1)%12];if(a>r){if(n>=r&&n<a)return e+1}else if(n>=r||n<a)return e+1}})():void 0;return{name:e.name,degree:e.degree,sign:a,house:i,chartName:n}}function s(e){return["Aries","Cancer","Libra","Capricorn"].includes(e)?"Cardinal":["Taurus","Leo","Scorpio","Aquarius"].includes(e)?"Fixed":"Mutable"}function o(e,t,n,r){const i=a(e[0].name,e[1]),s=a(t[0].name,t[1]),o=r.get(i);if(!o)return!1;const u=o.get(s);return void 0!==u&&u.aspectType===n}function u(e,t,n){const r=a(e[0].name,e[1]),i=a(t[0].name,t[1]),s=n.get(r);if(s)return s.get(i)}function c(e,t,n){const r=[];for(let s=0;s<e.length;s++)for(let c=s+1;c<e.length;c++)for(let l=c+1;l<e.length;l++)if(o(e[s],e[c],"trine",t)&&o(e[c],e[l],"trine",t)&&o(e[l],e[s],"trine",t)){const[o,p]=e[s],[f,h]=e[c],[d,g]=e[l],m=i(o,n,p),A=i(f,n,h),S=i(d,n,g),b=u(e[s],e[c],t),y=u(e[c],e[l],t),T=u(e[l],e[s],t),O=(b.orb+y.orb+T.orb)/3,M=(a=m.sign,["Aries","Leo","Sagittarius"].includes(a)?"Fire":["Taurus","Virgo","Capricorn"].includes(a)?"Earth":["Gemini","Libra","Aquarius"].includes(a)?"Air":"Water");r.push({type:"Grand Trine",planets:[m,A,S],element:M,averageOrb:O})}var a;return r}},921:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_SETTINGS=t.DEFAULT_ASPECT_STRENGTH_THRESHOLDS=t.WIDE_ASPECTS=t.TIGHT_ASPECTS=t.MODERN_ASPECTS=t.TRADITIONAL_ASPECTS=t.SIMPLE_WIDE_ORBS=t.SIMPLE_TIGHT_ORBS=t.SIMPLE_MODERN_ORBS=t.SIMPLE_TRADITIONAL_ORBS=t.DEFAULT_ASPECTS=t.ZODIAC_SIGNS=t.ZODIAC_SIGN_DATA=void 0;const r=n(613);t.ZODIAC_SIGN_DATA=[{name:"Aries",element:"Fire",modality:"Cardinal",polarity:"Masculine",ruler:"Mars"},{name:"Taurus",element:"Earth",modality:"Fixed",polarity:"Feminine",ruler:"Venus"},{name:"Gemini",element:"Air",modality:"Mutable",polarity:"Masculine",ruler:"Mercury"},{name:"Cancer",element:"Water",modality:"Cardinal",polarity:"Feminine",ruler:"Moon"},{name:"Leo",element:"Fire",modality:"Fixed",polarity:"Masculine",ruler:"Sun"},{name:"Virgo",element:"Earth",modality:"Mutable",polarity:"Feminine",ruler:"Mercury"},{name:"Libra",element:"Air",modality:"Fixed",polarity:"Masculine",ruler:"Venus"},{name:"Scorpio",element:"Water",modality:"Fixed",polarity:"Feminine",ruler:"Mars"},{name:"Sagittarius",element:"Fire",modality:"Mutable",polarity:"Masculine",ruler:"Jupiter"},{name:"Capricorn",element:"Earth",modality:"Cardinal",polarity:"Feminine",ruler:"Saturn"},{name:"Aquarius",element:"Air",modality:"Fixed",polarity:"Masculine",ruler:"Saturn"},{name:"Pisces",element:"Water",modality:"Mutable",polarity:"Feminine",ruler:"Jupiter"}],t.ZODIAC_SIGNS=t.ZODIAC_SIGN_DATA.map((e=>e.name)),t.DEFAULT_ASPECTS=[{name:"conjunction",angle:0,orb:5,classification:r.AspectClassification.Major},{name:"opposition",angle:180,orb:5,classification:r.AspectClassification.Major},{name:"trine",angle:120,orb:5,classification:r.AspectClassification.Major},{name:"square",angle:90,orb:5,classification:r.AspectClassification.Major},{name:"sextile",angle:60,orb:3,classification:r.AspectClassification.Minor},{name:"quincunx",angle:150,orb:2,classification:r.AspectClassification.Minor}],t.SIMPLE_TRADITIONAL_ORBS=[{name:"conjunction",angle:0,orb:10,classification:r.AspectClassification.Major},{name:"opposition",angle:180,orb:10,classification:r.AspectClassification.Major},{name:"trine",angle:120,orb:8,classification:r.AspectClassification.Major},{name:"square",angle:90,orb:8,classification:r.AspectClassification.Major},{name:"sextile",angle:60,orb:6,classification:r.AspectClassification.Minor},{name:"quincunx",angle:150,orb:4,classification:r.AspectClassification.Minor}],t.SIMPLE_MODERN_ORBS=[{name:"conjunction",angle:0,orb:8,classification:r.AspectClassification.Major},{name:"opposition",angle:180,orb:8,classification:r.AspectClassification.Major},{name:"trine",angle:120,orb:6,classification:r.AspectClassification.Major},{name:"square",angle:90,orb:6,classification:r.AspectClassification.Major},{name:"sextile",angle:60,orb:4,classification:r.AspectClassification.Minor},{name:"quincunx",angle:150,orb:3,classification:r.AspectClassification.Minor}],t.SIMPLE_TIGHT_ORBS=[{name:"conjunction",angle:0,orb:4,classification:r.AspectClassification.Major},{name:"opposition",angle:180,orb:4,classification:r.AspectClassification.Major},{name:"trine",angle:120,orb:3,classification:r.AspectClassification.Major},{name:"square",angle:90,orb:3,classification:r.AspectClassification.Major},{name:"sextile",angle:60,orb:2,classification:r.AspectClassification.Minor},{name:"quincunx",angle:150,orb:1,classification:r.AspectClassification.Minor}],t.SIMPLE_WIDE_ORBS=[{name:"conjunction",angle:0,orb:12,classification:r.AspectClassification.Major},{name:"opposition",angle:180,orb:12,classification:r.AspectClassification.Major},{name:"trine",angle:120,orb:10,classification:r.AspectClassification.Major},{name:"square",angle:90,orb:10,classification:r.AspectClassification.Major},{name:"sextile",angle:60,orb:8,classification:r.AspectClassification.Minor},{name:"quincunx",angle:150,orb:6,classification:r.AspectClassification.Minor},{name:"semi-sextile",angle:30,orb:4,classification:r.AspectClassification.Minor}],t.TRADITIONAL_ASPECTS=t.SIMPLE_TRADITIONAL_ORBS,t.MODERN_ASPECTS=t.SIMPLE_MODERN_ORBS,t.TIGHT_ASPECTS=t.SIMPLE_TIGHT_ORBS,t.WIDE_ASPECTS=t.SIMPLE_WIDE_ORBS,t.DEFAULT_ASPECT_STRENGTH_THRESHOLDS={tight:2,moderate:4},t.DEFAULT_SETTINGS={aspectDefinitions:t.DEFAULT_ASPECTS,skipOutOfSignAspects:!0,includeAspectPatterns:!1,includeSignDistributions:!0,includeDispositors:!0,includeHouseOverlays:!0,aspectStrengthThresholds:t.DEFAULT_ASPECT_STRENGTH_THRESHOLDS,houseSystemName:"whole_sign",dateFormat:"MM/DD/YYYY"}},945:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generateAnglesOutput=function(e,t){const n=["[ANGLES]"];void 0!==e?n.push(`Ascendant: ${Math.floor((0,r.getDegreeInSign)(e))}° ${(0,r.getDegreeSign)(e)}`):n.push("Ascendant: Not available");void 0!==t?n.push(`Midheaven: ${Math.floor((0,r.getDegreeInSign)(t))}° ${(0,r.getDegreeSign)(t)}`):n.push("Midheaven: Not available");return n};const r=n(904)}},t={};var n=function n(r){var a=t[r];if(void 0!==a)return a.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}(156);return n})()));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.chart2txt=t():e.chart2txt=t()}(this,(()=>(()=>{"use strict";var e={6:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.analyzeCharts=function(e,t={}){const n=(0,i.validateInputData)(e);if(n)throw new Error(`Invalid chart data: ${n}`);const $=new s.ChartSettings(t),T=(0,a.isMultiChartData)(e)?e:[e],y=T.filter((e=>"transit"!==e.chartType)),C=T.find((e=>"transit"===e.chartType)),E=[...y,...C?[C]:[]],O=[],b=g(E,!0);for(const e of E){const t=g([e]),n=(0,r.calculateAspects)($.resolvedAspectDefinitions,t,$.skipOutOfSignAspects);O.push(...n)}for(let e=0;e<E.length;e++)for(let t=e+1;t<E.length;t++){const n=E[t],a=[...g([E[e]]),...g([n])],s=(0,r.calculateMultichartAspects)($.resolvedAspectDefinitions,a,$.skipOutOfSignAspects);O.push(...s)}const P=$.includeAspectPatterns?(0,o.detectAspectPatterns)(b,O):[],M=[],v=[],N=[];let _,D;for(const e of E){const t=O.filter((t=>t.p1ChartName===e.name&&t.p2ChartName===e.name)),n=A(P,1,1).filter((t=>S(t,e.name))),a=$.includeAspectPatterns?(0,c.detectStelliums)(f(e),e.houseCusps):[];M.push({chart:e,placements:{planets:(0,u.getPlanetPositions)(e.planets,e.houseCusps)},aspects:t,patterns:n,stelliums:a,signDistributions:$.includeSignDistributions?(0,l.calculateSignDistributions)(e.planets,e.ascendant):{elements:{},modalities:{},polarities:{}},dispositors:"transit"!==e.chartType?(0,p.calculateDispositors)(e.planets,$.includeDispositors):{}})}if(y.length>=2)for(let e=0;e<y.length;e++)for(let t=e+1;t<y.length;t++){const n=y[e],a=y[t],s=O.filter((e=>e.p1ChartName===n.name&&e.p2ChartName===a.name||e.p1ChartName===a.name&&e.p2ChartName===n.name)),i=A(P,2,2).filter((e=>S(e,n.name)&&S(e,a.name)));v.push({chart1:n,chart2:a,synastryAspects:s,compositePatterns:i,houseOverlays:$.includeHouseOverlays?(0,h.calculateHouseOverlays)(n,a):{chart1InChart2Houses:{},chart2InChart1Houses:{}}})}if(y.length>2){const e=A(P,3).filter((e=>!d(e).has(C?.name||"TRANSIT_PLACEHOLDER")));e.length>0&&(_={charts:y,patterns:e})}if(C){for(const e of y){const t=O.filter((t=>t.p1ChartName===e.name&&t.p2ChartName===C.name||t.p1ChartName===C.name&&t.p2ChartName===e.name)),n=A(P,2,2).filter((t=>S(t,e.name)&&S(t,C.name)));N.push({natalChart:e,transitChart:C,aspects:t,patterns:n})}if(y.length>0){const e=(I=P,j=[C.name],I.filter((e=>j.some((t=>S(e,t)))))).filter((e=>m(e)>=3));e.length>0&&(D={charts:E,patterns:e})}}var I,j;return{settings:$,chartAnalyses:M,pairwiseAnalyses:v,globalAnalysis:_,transitAnalyses:N,globalTransitAnalysis:D}};const a=n(613),s=n(230),i=n(371),r=n(75),o=n(919),c=n(390),u=n(175),l=n(858),p=n(729),h=n(600);function f(e){const t=["Ascendant","Midheaven","North Node","South Node"];return e.planets.filter((e=>!t.includes(e.name)))}function g(e,t=!1){return e.flatMap((e=>(t?f(e):function(e){const t=[...e.planets];return void 0!==e.ascendant&&t.push({name:"Ascendant",degree:e.ascendant}),void 0!==e.midheaven&&t.push({name:"Midheaven",degree:e.midheaven}),t}(e)).map((t=>[t,e.name]))))}function d(e){const t=new Set,n=[],a=e=>{e&&n.push(e)};switch(e.type){case"T-Square":a(e.apex),e.opposition.forEach(a);break;case"Grand Trine":case"Grand Cross":e.planets.forEach(a);break;case"Yod":a(e.apex),e.base.forEach(a);break;case"Mystic Rectangle":e.oppositions.flat().forEach(a);break;case"Kite":e.grandTrine.forEach(a),a(e.opposition)}return n.forEach((e=>{e.chartName&&t.add(e.chartName)})),t}function m(e){return d(e).size}function S(e,t){return d(e).has(t)}function A(e,t,n=1/0){return e.filter((e=>{const a=m(e);return a>=t&&a<=n}))}},75:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.calculateAspects=function(e,t,n=!0){const a=[];if(!t||t.length<2)return a;for(let s=0;s<t.length;s++)for(let i=s+1;i<t.length;i++){const[r,c]=t[s],[u,l]=t[i],p=o(e,r,u,n,c,l);p&&a.push(p)}return a},t.calculateMultichartAspects=function(e,t,n=!0){const a=[];for(let s=0;s<t.length;s++)for(let i=s+1;i<t.length;i++){const[r,c]=t[s],[u,l]=t[i];if(c!==l){const t=o(e,r,u,n,c,l);t&&a.push(t)}}return a};const a=n(904),s=n(318);function i(e){const t=e<=180?e:360-e;switch(t){case 0:return 0;case 30:return 1;case 60:return 2;case 90:return 3;case 120:return 4;case 150:return 5;case 180:return 6;default:return Math.round(t/30)}}function r(e,t,n){if(void 0===e.speed||void 0===t.speed)return"exact";const i=e.speed,r=t.speed,o=(0,a.normalizeDegree)(e.degree),c=(0,a.normalizeDegree)(t.degree);let u=Math.abs(o-c);u>180&&(u=360-u);const l=Math.abs(u-n);if((0,s.isExactAspect)(l))return"exact";if(0===i-r)return"exact";const p=(0,a.normalizeDegree)(o+.1*i),h=(0,a.normalizeDegree)(c+.1*r),f=Math.abs(u-n);let g=Math.abs(p-h);g>180&&(g=360-g);return Math.abs(g-n)<f?"applying":"separating"}function o(e,t,n,o,c,u){const l=(0,s.roundDegrees)((0,a.normalizeDegree)(t.degree)),p=(0,s.roundDegrees)((0,a.normalizeDegree)(n.degree));let h=Math.abs(l-p);h>180&&(h=360-h);let f=null;for(const a of e){const e=(0,s.roundDegrees)(Math.abs(h-a.angle));if(o){const e=Math.floor(l/30),t=Math.floor(p/30),n=i(a.angle);let s=Math.abs(e-t);if(s>6&&(s=12-s),s!==n)continue}if(e<=a.orb&&(!f||e<f.orb)){const s=r(t,n,a.angle);f={planetA:t.name,planetB:n.name,p1ChartName:c,p2ChartName:u,aspectType:a.name,orb:e,application:s}}}return f}},82:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generateDispositorsOutput=function(e){if(e.summary)return[`[DISPOSITORS] ${e.summary}`];const t=["[DISPOSITOR TREE]"];if(0===Object.keys(e).length)return t.push("No dispositor data available."),t;for(const n in e)t.push(e[n]);return t}},109:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generateElementDistributionOutput=function(e){const t=["[ELEMENT DISTRIBUTION]"];return t.push(...(0,a.formatElementDistribution)(e)),t},t.generateModalityDistributionOutput=function(e){const t=["[MODALITY DISTRIBUTION]"];return t.push(...(0,a.formatModalityDistribution)(e)),t},t.generatePolarityOutput=function(e){const t=["[POLARITY]"];return t.push(...(0,a.formatPolarityDistribution)(e)),t};const a=n(858)},156:function(e,t,n){var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,s)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),s=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.ChartSettings=t.ZODIAC_SIGNS=t.DEFAULT_ASPECTS=t.DEFAULT_SETTINGS=t.analyzePartnership=t.buildChart=t.humandesignPartnership2txt=t.humandesign2txt=t.formatReportToText=t.groupAspects=t.analyzeCharts=t.chart2txt=void 0;var i=n(666);Object.defineProperty(t,"chart2txt",{enumerable:!0,get:function(){return i.chart2txt}});var r=n(6);Object.defineProperty(t,"analyzeCharts",{enumerable:!0,get:function(){return r.analyzeCharts}});var o=n(865);Object.defineProperty(t,"groupAspects",{enumerable:!0,get:function(){return o.groupAspects}});var c=n(723);Object.defineProperty(t,"formatReportToText",{enumerable:!0,get:function(){return c.formatReportToText}});var u=n(785);Object.defineProperty(t,"humandesign2txt",{enumerable:!0,get:function(){return u.humandesign2txt}}),Object.defineProperty(t,"humandesignPartnership2txt",{enumerable:!0,get:function(){return u.humandesignPartnership2txt}}),Object.defineProperty(t,"buildChart",{enumerable:!0,get:function(){return u.buildChart}}),Object.defineProperty(t,"analyzePartnership",{enumerable:!0,get:function(){return u.analyzePartnership}}),s(n(613),t);var l=n(921);Object.defineProperty(t,"DEFAULT_SETTINGS",{enumerable:!0,get:function(){return l.DEFAULT_SETTINGS}}),Object.defineProperty(t,"DEFAULT_ASPECTS",{enumerable:!0,get:function(){return l.DEFAULT_ASPECTS}}),Object.defineProperty(t,"ZODIAC_SIGNS",{enumerable:!0,get:function(){return l.ZODIAC_SIGNS}});var p=n(230);Object.defineProperty(t,"ChartSettings",{enumerable:!0,get:function(){return p.ChartSettings}});const h=n(666);t.default=h.chart2txt},172:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generateChartHeaderOutput=function(e,t="CHART"){return[`[${t}: ${e||"Unknown"}]`]}},175:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getOrdinal=function(e){const t=["th","st","nd","rd"],n=e%100;return e+(t[(n-20)%10]||t[n]||t[0])},t.getSign=s,t.getHouse=i,t.getPlanetPositions=function(e,t){return e.map((e=>{const n=(e.degree%360+360)%360;const a={name:e.name,degree:n,sign:s(n),speed:e.speed};return t&&(a.house=i(n,t)),a}))};const a=n(921);function s(e){const t=Math.floor(e/30);return a.ZODIAC_SIGNS[t]}function i(e,t){for(let n=0;n<12;n++){const a=t[n],s=t[(n+1)%12];if(a<s){if(e>=a&&e<s)return n+1}else if(e>=a||e<s)return n+1}return-1}},230:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ChartSettings=void 0;const a=n(921);t.ChartSettings=class{constructor(e={}){const t={...a.DEFAULT_SETTINGS,...e};Object.assign(this,t)}get resolvedAspectDefinitions(){if(Array.isArray(this.aspectDefinitions))return this.aspectDefinitions;switch(this.aspectDefinitions){case"traditional":return a.SIMPLE_TRADITIONAL_ORBS;case"modern":return a.SIMPLE_MODERN_ORBS;case"tight":return a.SIMPLE_TIGHT_ORBS;case"wide":return a.SIMPLE_WIDE_ORBS;default:return a.DEFAULT_SETTINGS.aspectDefinitions}}}},234:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generatePlanetsOutput=function(e){const t=["[PLANETS]"];e.forEach((e=>{const n=(0,s.formatPlanetWithDignities)(e),i=e.speed&&e.speed<0?" Retrograde":"";let r=`${e.name}: ${Math.floor(e.degree%30)}° ${e.sign}${i} ${n}`;e.house&&(r+=`, ${(0,a.getOrdinal)(e.house)} house`),t.push(r.replace(/\s+/g," ").trim())})),0===e.length&&t.push("No planets listed.");return t};const a=n(175),s=n(400)},318:(e,t)=>{function n(e,n,a=t.DEFAULT_EPSILON){return Math.abs(e-n)<a}function a(e,n=t.DEFAULT_EPSILON){return Math.abs(e)<n}function s(e,a,s=t.DEFAULT_EPSILON){return n(e,a,s)}Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_EPSILON=void 0,t.floatEquals=n,t.isNearZero=a,t.roundDegrees=function(e){return Math.round(1e4*e)/1e4},t.degreeEquals=s,t.isOnCusp=function(e,t,n=.001){return s(e,t,n)},t.isExactAspect=function(e,t=.1){return a(e,t)},t.DEFAULT_EPSILON=1e-4},371:(e,t)=>{function n(e){return e&&"object"==typeof e?"string"!=typeof e.name||""===e.name.trim()?"Point name must be a non-empty string":"number"==typeof e.degree&&isFinite(e.degree)?void 0===e.speed||"number"==typeof e.speed&&isFinite(e.speed)?null:`Point ${e.name} has invalid speed value: ${e.speed}`:`Point ${e.name} has invalid degree value: ${e.degree}`:"Point must be an object"}function a(e){if(!Array.isArray(e))return"Points must be an array";for(let t=0;t<e.length;t++){const a=n(e[t]);if(a)return`Point at index ${t}: ${a}`}const t=e.map((e=>e.name)),a=t.filter(((e,n)=>t.indexOf(e)!==n));return a.length>0?`Duplicate point names found: ${a.join(", ")}`:null}function s(e){if(void 0===e)return null;if(!Array.isArray(e))return"House cusps must be an array";if(12!==e.length)return`House cusps must contain exactly 12 values, got ${e.length}`;for(let t=0;t<e.length;t++)if("number"!=typeof e[t]||!isFinite(e[t]))return`House cusp ${t+1} has invalid value: ${e[t]}`;return null}function i(e){if(!e||"object"!=typeof e)return"Chart data must be an object";if("string"!=typeof e.name||""===e.name.trim())return"Chart name must be a non-empty string";const t=a(e.planets);if(t)return`Planets validation failed: ${t}`;if(void 0!==e.ascendant&&("number"!=typeof e.ascendant||!isFinite(e.ascendant)))return`Ascendant has invalid value: ${e.ascendant}`;if(void 0!==e.midheaven&&("number"!=typeof e.midheaven||!isFinite(e.midheaven)))return`Midheaven has invalid value: ${e.midheaven}`;const n=s(e.houseCusps);if(n)return`House cusps validation failed: ${n}`;if(void 0!==e.points){const t=a(e.points);if(t)return`Additional points validation failed: ${t}`}if(void 0!==e.timestamp&&(!(e.timestamp instanceof Date)||isNaN(e.timestamp.getTime())))return"Timestamp must be a valid Date object";if(void 0!==e.location&&"string"!=typeof e.location)return"Location must be a string";if(void 0!==e.chartType){const t=["natal","event","transit"];if(!t.includes(e.chartType))return`Chart type must be one of: ${t.join(", ")}`}return null}function r(e){if(!Array.isArray(e))return"Multi-chart data must be an array";if(0===e.length)return"Multi-chart data must contain at least one chart";if(e.length>10)return"Multi-chart data cannot contain more than 10 charts";for(let t=0;t<e.length;t++){const n=i(e[t]);if(n)return`Chart at index ${t} (${e[t]?.name||"unnamed"}): ${n}`}const t=e.map((e=>e.name)),n=t.filter(((e,n)=>t.indexOf(e)!==n));if(n.length>0)return`Duplicate chart names found: ${n.join(", ")}`;return e.filter((e=>"transit"===e.chartType)).length>1?"Cannot have more than one transit chart":null}Object.defineProperty(t,"__esModule",{value:!0}),t.validatePoint=n,t.validatePoints=a,t.validateHouseCusps=s,t.validateChartData=i,t.validateMultiChartData=r,t.validateInputData=function(e){if(!e)return"Data is required";return Array.isArray(e)?r(e):i(e)}},388:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.determineChartType=function(e){let t="natal",n="";const a=e.filter((({chartType:e})=>"transit"!==e&&"event"!==e)),s=e.filter((({chartType:e})=>"event"===e)),i=e.filter((({chartType:e})=>"transit"===e));if(i.length>1)throw new Error("Must provide at most one transit chart");const r=i.length>0;a.length>0?0===s.length?r&&(n="_with_transit"):n=1===s.length?r?"_with_event_and_transit":"_with_event":r?"_with_events_and_transit":"_with_events":r&&(n="_with_transit");if(0===a.length){if(0===s.length)throw new Error("Must provide at least one non-transit chart");t=1===s.length?"event":"multi_event"}else t=1===a.length?"natal":2===a.length?"synastry":"group_synastry";return t+n},t.generateMetadataOutput=function(e,t,n){const a=["[METADATA]",`chart_type: ${t}`];n&&a.push(`house_system: ${n}`);return a.push(`date_format: ${e.dateFormat}`),a}},390:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.detectStelliums=function(e,t,n=3){const i=[],o=new Map;if(e.forEach((e=>{const t=(0,a.getDegreeSign)(e.degree);o.has(t)||o.set(t,[]),o.get(t).push(e)})),o.forEach(((e,a)=>{if(e.length>=n){const n=e.map((e=>r(e,t))),s=n.map((e=>e.house)).filter((e=>void 0!==e)),o=e.map((e=>e.degree)),c=Math.max(...o)-Math.min(...o);i.push({type:"Stellium",planets:n,sign:a,houses:[...new Set(s)].sort(),span:c})}})),t){const a=new Map;e.forEach((e=>{const n=(0,s.getHouseForPoint)(e.degree,t);n&&(a.has(n)||a.set(n,[]),a.get(n).push(e))})),a.forEach(((e,a)=>{if(e.length>=n){const n=e.map((e=>r(e,t))),s=e.map((e=>e.degree)),o=Math.max(...s)-Math.min(...s);i.find((e=>"Stellium"===e.type&&e.planets.some((e=>n.some((t=>t.name===e.name))))))||i.push({type:"Stellium",planets:n,houses:[a],span:o})}}))}return i},t.formatStellium=function(e){const t=e.planets.map((e=>e.name)).join(", ");let n="";e.sign&&(n=e.sign);if(e.houses&&e.houses.length>0){const t=1===e.houses.length?`${(0,i.getOrdinal)(e.houses[0])} House`:e.houses.map((e=>`${(0,i.getOrdinal)(e)} House`)).join("-");n+=n?` (${t})`:t}const a=n?` in ${n}`:"";return[`Stellium (${e.span.toFixed(1)}°): ${t}${a}`]};const a=n(904),s=n(600),i=n(175);function r(e,t){const n=(0,a.getDegreeSign)(e.degree),i=t&&(0,s.getHouseForPoint)(e.degree,t)||void 0;return{name:e.name,degree:e.degree,sign:n,house:i}}},400:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.formatPlanetWithDignities=function(e){const t=e.sign,n=s[e.name],i=a.ZODIAC_SIGN_DATA.find((e=>e.name===t))?.ruler,r=[];n&&n[t]&&r.push(...n[t]);let o=r.join(", ");i&&e.name!==i&&(o?o+=` | Ruler: ${i}`:o=`Ruler: ${i}`);if(o)return`[${o}]`;return""};const a=n(921),s={Sun:{Leo:["Domicile"],Aries:["Exaltation"],Aquarius:["Detriment"],Libra:["Fall"]},Moon:{Cancer:["Domicile"],Taurus:["Exaltation"],Capricorn:["Detriment"],Scorpio:["Fall"]},Mercury:{Gemini:["Domicile"],Virgo:["Domicile","Exaltation"],Pisces:["Detriment","Fall"],Sagittarius:["Detriment"]},Venus:{Taurus:["Domicile"],Libra:["Domicile"],Scorpio:["Detriment"],Aries:["Fall"],Virgo:["Fall"]},Mars:{Aries:["Domicile"],Scorpio:["Domicile"],Libra:["Detriment"],Cancer:["Fall"]},Jupiter:{Sagittarius:["Domicile"],Pisces:["Domicile"],Gemini:["Detriment"],Virgo:["Fall"]},Saturn:{Capricorn:["Domicile"],Aquarius:["Domicile"],Cancer:["Detriment"],Leo:["Fall"]}}},600:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.calculateHouseOverlays=function(e,t){const n={};if(t.houseCusps)for(const s of e.planets)n[s.name]=(0,a.getHouse)(s.degree,t.houseCusps);const s={};if(e.houseCusps)for(const n of t.planets)s[n.name]=(0,a.getHouse)(n.degree,e.houseCusps);return{chart1InChart2Houses:n,chart2InChart1Houses:s}},t.getHouseForPoint=function(e,t){return(0,a.getHouse)(e,t)};const a=n(175)},613:(e,t)=>{var n,a;Object.defineProperty(t,"__esModule",{value:!0}),t.PlanetCategory=t.AspectClassification=void 0,t.isMultiChartData=function(e){return Array.isArray(e)},function(e){e.Major="major",e.Minor="minor",e.Esoteric="esoteric"}(n||(t.AspectClassification=n={})),function(e){e.Luminaries="luminaries",e.Personal="personal",e.Social="social",e.Outer="outer",e.Angles="angles"}(a||(t.PlanetCategory=a={}))},666:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.chart2txt=function(e,t={}){const n=(0,a.analyzeCharts)(e,t),r=n.settings;return n.chartAnalyses.forEach((e=>{e.groupedAspects=(0,s.groupAspects)(e.aspects,r)})),n.pairwiseAnalyses.forEach((e=>{e.groupedSynastryAspects=(0,s.groupAspects)(e.synastryAspects,r)})),n.transitAnalyses.forEach((e=>{e.groupedAspects=(0,s.groupAspects)(e.aspects,r)})),(0,i.formatReportToText)(n)};const a=n(6),s=n(865),i=n(723)},668:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generateHousesOutput=function(e){const t=["[HOUSE CUSPS]"];if(!e||12!==e.length)return t.push("House cusps not available"),t;for(let n=0;n<6;n++){const i=n,r=n+6,o=e[i],c=e[r],u=(0,a.getDegreeSign)(o),l=Math.floor((0,a.getDegreeInSign)(o)),p=(0,s.getOrdinal)(i+1)+" house",h=(0,a.getDegreeSign)(c),f=Math.floor((0,a.getDegreeInSign)(c)),g=(0,s.getOrdinal)(r+1)+" house",d=`${p}: ${l}° ${u}`.padEnd(24),m=`${g}: ${f}° ${h}`;t.push(`${d} ${m}`)}return t};const a=n(904),s=n(175)},723:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.formatReportToText=function(e){const{chartAnalyses:t,pairwiseAnalyses:n,globalAnalysis:r,transitAnalyses:o,globalTransitAnalysis:u}=e,h=e.settings,f=[],g=t.map((e=>e.chart)),A=(0,a.determineChartType)(g);f.push(...(0,a.generateMetadataOutput)(h,A,h.houseSystemName)),f.push("");const $=t.filter((e=>"transit"!==e.chart.chartType));for(const e of $)f.push(...d(e,h));for(const e of n)f.push(...m(e,h));r&&f.push(...S(r,!1));if(o.length>0){const e=t.find((e=>"transit"===e.chart.chartType));e&&(f.push(...(0,s.generateChartHeaderOutput)(e.chart.name,"TRANSIT")),f.push(...(0,i.generateBirthdataOutput)(e.chart.location,e.chart.timestamp,h,"[DATETIME]")),f.push(...(0,c.generatePlanetsOutput)(e.placements.planets)),f.push(""));for(const e of o)f.push(...(0,l.generateAspectsOutput)(`[TRANSIT ASPECTS: ${e.natalChart.name}]`,e.groupedAspects,e.natalChart.name,e.transitChart.name,!0)),h.includeAspectPatterns&&f.push(...(0,p.generateAspectPatternsOutput)(e.patterns,`Transit to ${e.natalChart.name}`,!0)),f.push("")}u&&f.push(...S(u,!0));return f.join("\n").trimEnd()};const a=n(388),s=n(172),i=n(888),r=n(945),o=n(668),c=n(234),u=n(82),l=n(784),p=n(762),h=n(756),f=n(109),g=n(390),d=(e,t,n)=>{const a=[],{chart:h,groupedAspects:d,patterns:m,stelliums:S,signDistributions:A,dispositors:$,placements:T}=e;return a.push(...(0,s.generateChartHeaderOutput)(h.name,n)),a.push(...(0,i.generateBirthdataOutput)(h.location,h.timestamp,t)),a.push(...(0,r.generateAnglesOutput)(h.ascendant,h.midheaven)),a.push(...(0,o.generateHousesOutput)(h.houseCusps)),a.push(...(0,c.generatePlanetsOutput)(T.planets)),t.includeDispositors&&a.push(...(0,u.generateDispositorsOutput)($)),t.includeSignDistributions&&(a.push(...(0,f.generateElementDistributionOutput)(A.elements)),a.push(...(0,f.generateModalityDistributionOutput)(A.modalities)),a.push(...(0,f.generatePolarityOutput)(A.polarities))),a.push(...(0,l.generateAspectsOutput)("[ASPECTS]",d)),t.includeAspectPatterns&&(a.push(...(0,p.generateAspectPatternsOutput)(m,void 0,!1)),S.length>0?S.forEach((e=>{a.push(...(0,g.formatStellium)(e))})):a.push("No Stelliums detected.")),a.push(""),a},m=(e,t)=>{const n=[],{chart1:a,chart2:i,groupedSynastryAspects:r,compositePatterns:o,houseOverlays:c}=e,u="event"===a.chartType&&"event"===i.chartType?"EVENT_RELATIONSHIP":"event"===a.chartType||"event"===i.chartType?"NATAL_EVENT":"SYNASTRY";return n.push(...(0,s.generateChartHeaderOutput)(`${a.name}-${i.name}`,u)),n.push(...(0,l.generateAspectsOutput)("[PLANET-PLANET ASPECTS]",r,a.name,i.name)),t.includeAspectPatterns&&o.length>0&&n.push(...(0,p.generateAspectPatternsOutput)(o,`${a.name}-${i.name} Composite`,!0)),n.push(""),t.includeHouseOverlays&&(n.push(...(0,h.generateHouseOverlaysOutput)(c,a.name,i.name)),n.push("")),n},S=(e,t=!1)=>{const n=[],{charts:a,patterns:s}=e;if(s.length>0){const e=a.map((e=>e.name)).join("-");let i=`${e} Global Composite`;t&&(i=`${e} Global Transit Composite`),n.push(...(0,p.generateAspectPatternsOutput)(s,i,!0)),n.push("")}return n}},729:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.calculateDispositors=function(e,t=!0){if(!1===t)return{};const n={};e.forEach((e=>{n[e.name]=function(e){const t=(0,s.getSign)(e.degree),n=a.ZODIAC_SIGN_DATA.find((e=>e.name===t));return n?n.ruler:"Unknown"}(e)}));const i={};if(e.forEach((e=>{i[e.name]||function(e,t,n){if(n[e])return n[e];const a=[e];let s=e;for(;;){const i=t[s];if(!i||!t.hasOwnProperty(i)){const t={path:[...a,i],isCycle:!1,isFinal:!1,isBroken:!0};return n[e]=t}if(i===s){const t={path:a,isCycle:!1,isFinal:!0,isBroken:!1};return n[e]=t}if(a.includes(i)){const e=a.indexOf(i),t=a.slice(e),s={path:[...a,i],isCycle:!0,isFinal:!1,isBroken:!1};return t.forEach((e=>{n[e]=s})),s}if(n[i]){const t=n[i],s=[...a,...t.path],r={...t,path:s};return n[e]=r}a.push(i),s=i}}(e.name,n,i)})),"finals"===t){const t=new Set,a=new Map;e.forEach((e=>{n[e.name]===e.name&&t.add(e.name)}));for(const e in i){const t=i[e];if(t.isCycle){const e=t.path[t.path.length-1],n=t.path.indexOf(e),s=t.path.slice(n,-1),i=[...new Set(s)].sort().join("|");a.has(i)||a.set(i,s)}}const s=[];if(t.size>0&&s.push(`Final dispositors: ${[...t].sort().join(", ")}`),a.size>0){const e=[...a.values()].map((e=>{const t=[...new Set(e)].sort()[0],n=e.indexOf(t);return[...[...e.slice(n),...e.slice(0,n)],t].join(" → ")})).sort();s.push(`Cycles: ${e.join(", ")}`)}return 0===s.length?{summary:"No final dispositors or cycles found"}:{summary:s.join("; ")}}const r={};return e.forEach((e=>{const t=e.name,a=[t];let s=t;for(;;){const e=n[s];if(!e||!n.hasOwnProperty(e)){r[t]=`${a.join(" → ")} → ${e} (not in chart)`;break}if(e===s){r[t]=`${a.join(" → ")} → (final)`;break}if(a.includes(e)){r[t]=`${a.join(" → ")} → ${e} (cycle)`;break}a.push(e),s=e}})),r};const a=n(921),s=n(175)},756:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generateHouseOverlaysOutput=function(e,t,n){const a=["[HOUSE OVERLAYS]"];a.push(`${t}'s planets in ${n}'s houses:`),Object.keys(e.chart1InChart2Houses).length>0?a.push(s(e.chart1InChart2Houses)):a.push(`(${n} house cusps not available)`);a.push(`${n}'s planets in ${t}'s houses:`),Object.keys(e.chart2InChart1Houses).length>0?a.push(s(e.chart2InChart1Houses)):a.push(`(${t} house cusps not available)`);return a};const a=n(175);function s(e){const t={};for(const n in e){const a=e[n];t[a]||(t[a]=[]),t[a].push(n)}return Object.keys(t).map(Number).sort(((e,t)=>e-t)).map((e=>{const n=t[e].join(", ");return`${(0,a.getOrdinal)(e)}: ${n}`})).join(" | ")}},762:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generateAspectPatternsOutput=function(e,t,n=!0){const a=[t?`[ASPECT PATTERNS: ${t}]`:"[ASPECT PATTERNS]"];if(0===e.length)return a.push("No T-Squares detected."),a.push("No Grand Trines detected."),a;const s=e.filter((t=>"Grand Trine"!==t.type||!function(e,t){return"Grand Trine"===e.type&&t.some((t=>{if("Kite"!==t.type)return!1;const n=e=>`${e.chartName||""}-${e.name}-${e.degree}`,a=t.grandTrine.map(n),s=e.planets.map(n);return a.length===s.length&&a.every((e=>s.includes(e)))}))}(t,e))),r=["T-Square","Grand Trine","Grand Cross","Yod","Mystic Rectangle","Kite"];s.sort(((e,t)=>r.indexOf(e.type)-r.indexOf(t.type))).forEach((e=>{switch(e.type){case"T-Square":a.push(...function(e,t=!0){if("T-Square"!==e.type)return[];const n=i(e.apex,!1,t),a=i(e.opposition[0],!1,t),s=i(e.opposition[1],!1,t);return[`T-Square (${e.mode}, ${e.averageOrb.toFixed(1)}°): ${n} ← ${a} ↔ ${s}`]}(e,n));break;case"Grand Trine":a.push(...function(e,t=!0){if("Grand Trine"!==e.type)return[];const n=e.planets.map((e=>i(e,!1,t))).join(" △ ");return[`Grand Trine (${e.element}, ${e.averageOrb.toFixed(1)}°): ${n}`]}(e,n));break;case"Grand Cross":a.push(...function(e,t=!0){if("Grand Cross"!==e.type)return[];const n=e.planets.map((e=>i(e,!1,t))).join(" ⨯ ");return[`Grand Cross (${e.mode}, ${e.averageOrb.toFixed(1)}°): ${n}`]}(e,n));break;case"Yod":a.push(...function(e,t=!0){if("Yod"!==e.type)return[];const n=i(e.apex,!1,t),a=i(e.base[0],!1,t),s=i(e.base[1],!1,t);return[`Yod (${e.averageOrb.toFixed(1)}°): ${n} ← ${a} • ${s}`]}(e,n));break;case"Mystic Rectangle":a.push(...function(e,t=!0){if("Mystic Rectangle"!==e.type)return[];const n=i(e.oppositions[0][0],!1,t),a=i(e.oppositions[0][1],!1,t),s=i(e.oppositions[1][0],!1,t),r=i(e.oppositions[1][1],!1,t);return[`Mystic Rectangle (${e.averageOrb.toFixed(1)}°): ${n} ↔ ${a} | ${s} ↔ ${r}`]}(e,n));break;case"Kite":a.push(...function(e,t=!0){if("Kite"!==e.type)return[];const n=e.grandTrine.map((e=>i(e,!1,t))).join(" △ "),a=i(e.opposition,!1,t),s=e.grandTrine[0].sign?function(e){const t=["Taurus","Virgo","Capricorn"],n=["Gemini","Libra","Aquarius"],a=["Cancer","Scorpio","Pisces"];return["Aries","Leo","Sagittarius"].includes(e)?"Fire":t.includes(e)?"Earth":n.includes(e)?"Air":a.includes(e)?"Water":""}(e.grandTrine[0].sign):"";return[`Kite (${s?`${s}, `:""}${e.averageOrb.toFixed(1)}°): [${n}] ← ${a}`]}(e,n))}})),""===a[a.length-1]&&a.pop();return a};const a=n(904),s=n(175);function i(e,t=!1,n=!0){const i=Math.floor((0,a.getDegreeInSign)(e.degree)),r=t&&e.house?` (${(0,s.getOrdinal)(e.house)} house)`:"";return`${n&&e.chartName?`${e.chartName}'s `:""}${e.name} ${i}° ${e.sign}${r}`}},784:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generateAspectsOutput=function(e,t,n,a,s=!1){const i=[e];if(!t||0===t.size)return i.push("None"),i;return t.forEach(((e,t)=>{i.push(t),e.forEach((e=>{i.push(function(e,t,n,a=!1){const s=t?`${t}'s ${e.planetA}`:e.planetA;let i=e.planetB;a?i=`transiting ${e.planetB}`:n&&(i=`${n}'s ${e.planetB}`);const r=e.application&&"exact"!==e.application?` (${e.application})`:"";return`${s} ${e.aspectType} ${i}: ${e.orb.toFixed(1)}°${r}`}(e,n,a,s))}))})),i}},785:(e,t)=>{function n(e){const n=(e+58)%360/360,a=Math.floor(64*n),s=384*n%6;return{gate:t.GATES[a],line:Math.floor(s)+1}}function a(e){const n=(t.GATES.indexOf(e)+32)%64;return t.GATES[n]}function s(e){const t=[];for(const s of e){const{gate:e,line:i}=n(s.longitude);if(t.push({planet:s.name,gate:e,line:i}),"Sun"===s.name){const n=a(e),s=i;t.push({planet:"Earth",gate:n,line:s})}else if("North Node"===s.name){const n=a(e),s=i;t.push({planet:"South Node",gate:n,line:s})}}return t}function i(e,n){const a=new Map;for(const n of e){const e=a.get(n.gate);e?e.sources.includes("Personality")||e.sources.push("Personality"):a.set(n.gate,{center:t.GATE_CENTERS[n.gate],sources:["Personality"]})}for(const e of n){const n=a.get(e.gate);n?n.sources.includes("Design")||n.sources.push("Design"):a.set(e.gate,{center:t.GATE_CENTERS[e.gate],sources:["Design"]})}return a}function r(e){const n=[];for(const a of t.CHANNELS){const[t,s]=a.gates;e.has(t)&&e.has(s)&&n.push(a)}return n}function o(e,n){const a=new Set,s=new Set;for(const t of e)a.add(t.centers[0]),a.add(t.centers[1]);for(const[,e]of n)s.add(e.center);const i=[],r=[],o=[];for(const e of t.ALL_CENTERS)a.has(e)?i.push(e):s.has(e)?r.push(e):o.push(e);return{defined:i,undefined:r,open:o}}function c(e,n){const a=e.includes("Sacral"),s=function(e,n){const a=["Sacral","Solar Plexus","Ego","Root"],s=new Map;for(const e of t.ALL_CENTERS)s.set(e,new Set);for(const t of e)s.get(t.centers[0]).add(t.centers[1]),s.get(t.centers[1]).add(t.centers[0]);for(const e of a){if(!n.includes(e))continue;const t=new Set,a=[e];for(;a.length>0;){const e=a.shift();if("Throat"===e)return!0;if(!t.has(e)){t.add(e);for(const n of s.get(e)||[])t.has(n)||a.push(n)}}}return!1}(n,e);return a?s?"Manifesting Generator":"Generator":s?"Manifestor":0===e.length?"Reflector":"Projector"}function u(e,t){if(e.includes("Solar Plexus"))return"Emotional (Solar Plexus)";if(e.includes("Sacral"))return"Sacral";if(e.includes("Spleen"))return"Splenic";if(e.includes("Ego")){const e=t.some((e=>e.centers.includes("Ego")&&e.centers.includes("Throat"))),n=t.some((e=>e.centers.includes("Ego")&&e.centers.includes("G Center")));if(e||n)return"Ego"}if(e.includes("G Center")){if(t.some((e=>e.centers.includes("G Center")&&e.centers.includes("Throat"))))return"Self-Projected"}return e.includes("Ajna")||e.includes("Head")?"Mental (Outer Authority)":"Lunar"}function l(e,t){if(0===t.length)return"None";const n=p(e,t);switch(n.length){case 1:return"Single Definition";case 2:return"Split Definition";case 3:return"Triple Split Definition";case 4:return"Quadruple Split Definition";default:return`${n.length}-Split Definition`}}function p(e,n){if(0===n.length)return[];const a=new Map;for(const e of n)a.set(e,e);function s(e){return a.get(e)!==e&&a.set(e,s(a.get(e))),a.get(e)}function i(e,t){const n=s(e),i=s(t);n!==i&&a.set(n,i)}for(const t of e){const[e,n]=t.centers;a.has(e)&&a.has(n)&&i(e,n)}const r=new Map;for(const e of n){const t=s(e);r.has(t)||r.set(t,[]),r.get(t).push(e)}return Array.from(r.values()).sort(((e,n)=>t.ALL_CENTERS.indexOf(e[0])-t.ALL_CENTERS.indexOf(n[0])))}function h(e,t){const n=new Set;for(const e of t)n.add(e.gates[0]),n.add(e.gates[1]);const a=[];for(const[t,s]of e)n.has(t)||a.push({gate:t,center:s.center});return a.sort(((e,t)=>e.gate-t.gate))}function f(e,t){return`${e}/${t}`}function g(e,n,a,s,i,r){let o;return o=i<4?"Right Angle Cross":i>=5?"Left Angle Cross":r<4?"Juxtaposition Cross":"Left Angle Cross",`${o} of ${t.INCARNATION_CROSSES[e]||"Unknown"} (${e}/${n} | ${a}/${s})`}function d(e,n={}){const{personality:a,design:d}=e,m=s(a.planets),S=s(d.planets),A=i(m,S),$=r(A),{defined:T,undefined:y,open:C}=o($,A),E=c(T,$),O=t.STRATEGY_BY_TYPE[E],b=u(T,$),P=l($,T),M=p($,T),v=h(A,$),N=m.find((e=>"Sun"===e.planet)),_=S.find((e=>"Sun"===e.planet)),D=f(N.line,_.line),I=t.PROFILE_NAMES[D]||"",j=m.find((e=>"Earth"===e.planet)),G=S.find((e=>"Earth"===e.planet)),R=g(N.gate,j.gate,_.gate,G.gate,N.line,_.line);return function(e){const n=[];if(n.push("[METADATA]"),n.push("chart_type: human_design"),n.push(""),n.push(`[CHART: ${e.name}]`),n.push(`[BIRTHDATA] ${e.location} | ${e.date} | ${e.time}`),n.push(""),n.push("[TYPE]"),n.push(`Type: ${e.type}`),n.push(`Strategy: ${e.strategy}`),n.push(`Authority: ${e.authority}`),n.push(`Definition: ${e.definition}`),e.definitionIslands.length>1){const t=e.definitionIslands.map((e=>`[${e.join("+")}]`));n.push(`Definition Islands: ${t.join(" + ")}`)}n.push(`Profile: ${e.profile}${e.profileName?` (${e.profileName})`:""}`),n.push(`Incarnation Cross: ${e.incarnationCross}`),n.push(""),n.push("[CENTERS]"),e.definedCenters.length>0&&n.push(`Defined: ${e.definedCenters.join(", ")}`);e.undefinedCenters.length>0&&n.push(`Undefined: ${e.undefinedCenters.join(", ")}`);e.openCenters.length>0&&n.push(`Open: ${e.openCenters.join(", ")}`);if(n.push(""),n.push("[CHANNELS]"),e.activeChannels.length>0)for(const t of e.activeChannels)n.push(`${t.gates[0]}-${t.gates[1]} (${t.name}): ${t.centers[0]} ↔ ${t.centers[1]}`);else n.push("None");if(n.push(""),n.push("[HANGING GATES]"),n.push("(Gates not part of a complete channel)"),e.hangingGates.length>0)for(const a of e.hangingGates)n.push(`${a.gate}: ${t.GATE_NAMES[a.gate]} | ${a.center}`);else n.push("None");n.push(""),n.push("[GATES]");const a=Array.from(e.allGates.entries()).sort(((e,t)=>e[0]-t[0]));for(const[e,s]of a){const a=2===s.sources.length?"Both":s.sources[0];n.push(`${e}: ${t.GATE_NAMES[e]} | ${s.center} (${a})`)}n.push(""),n.push("[PERSONALITY ACTIVATIONS]");const s=e.personalityActivations.find((e=>"Sun"===e.planet)),i=e.personalityActivations.find((e=>"Earth"===e.planet)),r=e.personalityActivations.find((e=>"Moon"===e.planet)),o=e.personalityActivations.find((e=>"North Node"===e.planet)),c=e.personalityActivations.find((e=>"South Node"===e.planet)),u=e.personalityActivations.find((e=>"Mercury"===e.planet)),l=e.personalityActivations.find((e=>"Venus"===e.planet)),p=e.personalityActivations.find((e=>"Mars"===e.planet)),h=e.personalityActivations.find((e=>"Jupiter"===e.planet)),f=e.personalityActivations.find((e=>"Saturn"===e.planet)),g=e.personalityActivations.find((e=>"Uranus"===e.planet)),d=e.personalityActivations.find((e=>"Neptune"===e.planet)),m=e.personalityActivations.find((e=>"Pluto"===e.planet));n.push(`Sun: ${s.gate}.${s.line} Earth: ${i.gate}.${i.line}`),n.push(`Moon: ${r.gate}.${r.line}`),n.push(`North Node: ${o.gate}.${o.line} South Node: ${c.gate}.${c.line}`),n.push(`Mercury: ${u.gate}.${u.line} Venus: ${l.gate}.${l.line} Mars: ${p.gate}.${p.line}`),n.push(`Jupiter: ${h.gate}.${h.line} Saturn: ${f.gate}.${f.line}`),n.push(`Uranus: ${g.gate}.${g.line} Neptune: ${d.gate}.${d.line} Pluto: ${m.gate}.${m.line}`),n.push(""),n.push("[DESIGN ACTIVATIONS]");const S=e.designActivations.find((e=>"Sun"===e.planet)),A=e.designActivations.find((e=>"Earth"===e.planet)),$=e.designActivations.find((e=>"Moon"===e.planet)),T=e.designActivations.find((e=>"North Node"===e.planet)),y=e.designActivations.find((e=>"South Node"===e.planet)),C=e.designActivations.find((e=>"Mercury"===e.planet)),E=e.designActivations.find((e=>"Venus"===e.planet)),O=e.designActivations.find((e=>"Mars"===e.planet)),b=e.designActivations.find((e=>"Jupiter"===e.planet)),P=e.designActivations.find((e=>"Saturn"===e.planet)),M=e.designActivations.find((e=>"Uranus"===e.planet)),v=e.designActivations.find((e=>"Neptune"===e.planet)),N=e.designActivations.find((e=>"Pluto"===e.planet));return n.push(`Sun: ${S.gate}.${S.line} Earth: ${A.gate}.${A.line}`),n.push(`Moon: ${$.gate}.${$.line}`),n.push(`North Node: ${T.gate}.${T.line} South Node: ${y.gate}.${y.line}`),n.push(`Mercury: ${C.gate}.${C.line} Venus: ${E.gate}.${E.line} Mars: ${O.gate}.${O.line}`),n.push(`Jupiter: ${b.gate}.${b.line} Saturn: ${P.gate}.${P.line}`),n.push(`Uranus: ${M.gate}.${M.line} Neptune: ${v.gate}.${v.line} Pluto: ${N.gate}.${N.line}`),n.join("\n")}({name:n.name||"Chart",location:n.location||`${a.location.latitude}, ${a.location.longitude}`,date:a.date,time:a.time,type:E,strategy:O,authority:b,definition:P,definitionIslands:M,profile:D,profileName:I,incarnationCross:R,definedCenters:T,undefinedCenters:y,openCenters:C,activeChannels:$,hangingGates:v,allGates:A,personalityActivations:m,designActivations:S})}function m(e,n){const a=[],s=[],i=[],u=[],h=new Set(e.allGates.keys()),f=new Set(n.allGates.keys()),g=new Set;for(const t of e.activeChannels)g.add(`${t.gates[0]}-${t.gates[1]}`);const d=new Set;for(const e of n.activeChannels)d.add(`${e.gates[0]}-${e.gates[1]}`);for(const r of t.CHANNELS){const[t,o]=r.gates,c=h.has(t),l=h.has(o),p=f.has(t),g=f.has(o),d=c&&l,m=p&&g;if(d&&m)s.push({channel:r,type:"companionship",person1Gates:[t,o],person2Gates:[t,o],description:`Both ${e.name} and ${n.name} have the complete ${r.name} channel - deep mutual understanding in this area`});else if(d||m){if(d&&!m&&(p||g)){const a=[];p&&a.push(t),g&&a.push(o),i.push({channel:r,type:"dominance",person1Gates:[t,o],person2Gates:a,description:`${e.name} has the complete ${r.name} channel and leads; ${n.name} has gate ${a.join(", ")}`})}else if(m&&!d&&(c||l)){const a=[];c&&a.push(t),l&&a.push(o),i.push({channel:r,type:"dominance",person1Gates:a,person2Gates:[t,o],description:`${n.name} has the complete ${r.name} channel and leads; ${e.name} has gate ${a.join(", ")}`})}}else{if((c||p)&&(l||g)){const s=[],i=[];c&&s.push(t),l&&s.push(o),p&&i.push(t),g&&i.push(o);const h=s.filter((e=>!i.includes(e))),f=i.filter((e=>!s.includes(e)));h.length>0&&f.length>0?a.push({channel:r,type:"electromagnetic",person1Gates:s,person2Gates:i,description:`${e.name} brings gate ${h.join(", ")}, ${n.name} brings gate ${f.join(", ")} - magnetic attraction`}):s.length>0&&i.length>0&&u.push({channel:r,type:"compromise",person1Gates:s,person2Gates:i,description:`Both contribute to the ${r.name} channel but share gate(s) - requires compromise`})}}}const m=new Map;for(const[t,n]of e.allGates)m.set(t,{center:n.center,sources:[e.name]});for(const[e,t]of n.allGates){const a=m.get(e);a?a.sources.push(n.name):m.set(e,{center:t.center,sources:[n.name]})}const S=r(m),A=o(S,m),$=c(A.defined,S),T=t.STRATEGY_BY_TYPE[$],y=l(S,A.defined),C=p(S,A.defined),E=new Set(e.activeChannels.map((e=>`${e.gates[0]}-${e.gates[1]}`))),O=new Set(n.activeChannels.map((e=>`${e.gates[0]}-${e.gates[1]}`))),b=[],P=[],M=[];for(const e of S){const t=`${e.gates[0]}-${e.gates[1]}`,n=E.has(t),a=O.has(t);n&&!a?b.push(e):a&&!n?P.push(e):n||a||M.push(e)}const v=[],N=[],_=[];for(const[n,a]of m){const s={gate:n,gateName:t.GATE_NAMES[n],center:a.center,type:2===a.sources.length?"shared":a.sources[0]===e.name?"unique_person1":"unique_person2"};"shared"===s.type?v.push(s):"unique_person1"===s.type?N.push(s):_.push(s)}return{person1:e,person2:n,electromagneticChannels:a,companionshipChannels:s,dominanceChannels:i,compromiseChannels:u,compositeDefinedCenters:A.defined,compositeUndefinedCenters:A.undefined,compositeOpenCenters:A.open,compositeChannels:S,compositeType:$,compositeStrategy:T,compositeDefinition:y,compositeDefinitionIslands:C,channelsPerson1Only:b,channelsPerson2Only:P,channelsOnlyTogether:M,sharedGates:v,uniqueGatesPerson1:N,uniqueGatesPerson2:_}}function S(e,n={}){const{personality:a,design:d}=e,m=s(a.planets),S=s(d.planets),A=i(m,S),$=r(A),{defined:T,undefined:y,open:C}=o($,A),E=c(T,$),O=t.STRATEGY_BY_TYPE[E],b=u(T,$),P=l($,T),M=p($,T),v=h(A,$),N=m.find((e=>"Sun"===e.planet)),_=S.find((e=>"Sun"===e.planet)),D=f(N.line,_.line),I=t.PROFILE_NAMES[D]||"",j=m.find((e=>"Earth"===e.planet)),G=S.find((e=>"Earth"===e.planet)),R=g(N.gate,j.gate,_.gate,G.gate,N.line,_.line);return{name:n.name||"Chart",location:n.location||`${a.location.latitude}, ${a.location.longitude}`,date:a.date,time:a.time,type:E,strategy:O,authority:b,definition:P,definitionIslands:M,profile:D,profileName:I,incarnationCross:R,definedCenters:T,undefinedCenters:y,openCenters:C,activeChannels:$,hangingGates:v,allGates:A,personalityActivations:m,designActivations:S}}Object.defineProperty(t,"__esModule",{value:!0}),t.ALL_CENTERS=t.STRATEGY_BY_TYPE=t.INCARNATION_CROSSES=t.PROFILE_NAMES=t.CHANNELS=t.GATE_CENTERS=t.GATE_NAMES=t.GATES=void 0,t.longitudeToGateLine=n,t.oppositeGate=a,t.calculateActivations=s,t.getAllGates=i,t.getActiveChannels=r,t.getCenterStatus=o,t.calculateType=c,t.calculateAuthority=u,t.calculateDefinition=l,t.getDefinitionIslands=p,t.getHangingGates=h,t.calculateProfile=f,t.getIncarnationCross=g,t.humandesign2txt=d,t.analyzePartnership=m,t.buildChart=S,t.humandesignPartnership2txt=function(e,t,n={}){const a=S(e,{name:n.person1Name||"Person 1",location:n.person1Location}),s=S(t,{name:n.person2Name||"Person 2",location:n.person2Location});return function(e){const t=[],{person1:n,person2:a}=e;if(t.push("[METADATA]"),t.push("chart_type: human_design_partnership"),t.push(""),t.push(`[CHART: ${n.name}]`),t.push(`[BIRTHDATA] ${n.location} | ${n.date} | ${n.time}`),t.push(`Type: ${n.type} | Strategy: ${n.strategy} | Authority: ${n.authority}`),t.push(`Definition: ${n.definition} | Profile: ${n.profile}${n.profileName?` (${n.profileName})`:""}`),n.definitionIslands.length>1){const e=n.definitionIslands.map((e=>`[${e.join("+")}]`));t.push(`Definition Islands: ${e.join(" + ")}`)}if(t.push(`Defined Centers: ${n.definedCenters.join(", ")||"None"}`),n.hangingGates.length>0){const e=n.hangingGates.map((e=>`${e.gate} (${e.center})`)).join(", ");t.push(`Hanging Gates: ${e}`)}if(t.push(""),t.push(`[CHART: ${a.name}]`),t.push(`[BIRTHDATA] ${a.location} | ${a.date} | ${a.time}`),t.push(`Type: ${a.type} | Strategy: ${a.strategy} | Authority: ${a.authority}`),t.push(`Definition: ${a.definition} | Profile: ${a.profile}${a.profileName?` (${a.profileName})`:""}`),a.definitionIslands.length>1){const e=a.definitionIslands.map((e=>`[${e.join("+")}]`));t.push(`Definition Islands: ${e.join(" + ")}`)}if(t.push(`Defined Centers: ${a.definedCenters.join(", ")||"None"}`),a.hangingGates.length>0){const e=a.hangingGates.map((e=>`${e.gate} (${e.center})`)).join(", ");t.push(`Hanging Gates: ${e}`)}if(t.push(""),t.push(`[PARTNERSHIP: ${n.name} & ${a.name}]`),t.push(""),t.push("[COMPOSITE OVERVIEW]"),t.push(`Composite Type: ${e.compositeType}`),t.push(`Composite Strategy: ${e.compositeStrategy}`),t.push(`Composite Definition: ${e.compositeDefinition}`),e.compositeDefinitionIslands.length>1){const n=e.compositeDefinitionIslands.map((e=>`[${e.join("+")}]`));t.push(`Composite Definition Islands: ${n.join(" + ")}`)}e.compositeDefinedCenters.length>0&&t.push(`Defined Centers Together: ${e.compositeDefinedCenters.join(", ")}`);e.compositeUndefinedCenters.length>0&&t.push(`Undefined Centers Together: ${e.compositeUndefinedCenters.join(", ")}`);e.compositeOpenCenters.length>0&&t.push(`Open Centers Together: ${e.compositeOpenCenters.join(", ")}`);if(t.push(""),t.push("[ELECTROMAGNETIC CONNECTIONS]"),t.push("(Channels completed together - magnetic attraction and chemistry)"),e.electromagneticChannels.length>0)for(const n of e.electromagneticChannels)t.push(`${n.channel.gates[0]}-${n.channel.gates[1]} (${n.channel.name}): ${n.channel.centers[0]} ↔ ${n.channel.centers[1]}`),t.push(` ${n.description}`);else t.push("None");if(t.push(""),t.push("[COMPANIONSHIP CONNECTIONS]"),t.push("(Channels both have individually - deep mutual understanding)"),e.companionshipChannels.length>0)for(const n of e.companionshipChannels)t.push(`${n.channel.gates[0]}-${n.channel.gates[1]} (${n.channel.name}): ${n.channel.centers[0]} ↔ ${n.channel.centers[1]}`),t.push(` ${n.description}`);else t.push("None");if(t.push(""),t.push("[DOMINANCE CONNECTIONS]"),t.push("(One person has full channel, the other has hanging gate - one naturally leads)"),e.dominanceChannels.length>0)for(const n of e.dominanceChannels)t.push(`${n.channel.gates[0]}-${n.channel.gates[1]} (${n.channel.name}): ${n.channel.centers[0]} ↔ ${n.channel.centers[1]}`),t.push(` ${n.description}`);else t.push("None");if(t.push(""),t.push("[COMPROMISE CONNECTIONS]"),t.push("(Both have hanging gates in same channel - requires negotiation)"),e.compromiseChannels.length>0)for(const n of e.compromiseChannels)t.push(`${n.channel.gates[0]}-${n.channel.gates[1]} (${n.channel.name}): ${n.channel.centers[0]} ↔ ${n.channel.centers[1]}`),t.push(` ${n.description}`);else t.push("None");if(t.push(""),t.push("[SHARED GATES]"),t.push("(Gates both people have - common ground)"),e.sharedGates.length>0){const n=[...e.sharedGates].sort(((e,t)=>e.gate-t.gate));for(const e of n)t.push(`${e.gate}: ${e.gateName} | ${e.center}`)}else t.push("None");if(t.push(""),t.push(`[UNIQUE GATES: ${n.name}]`),t.push(`(Gates only ${n.name} brings to the relationship)`),e.uniqueGatesPerson1.length>0){const n=[...e.uniqueGatesPerson1].sort(((e,t)=>e.gate-t.gate));for(const e of n)t.push(`${e.gate}: ${e.gateName} | ${e.center}`)}else t.push("None");if(t.push(""),t.push(`[UNIQUE GATES: ${a.name}]`),t.push(`(Gates only ${a.name} brings to the relationship)`),e.uniqueGatesPerson2.length>0){const n=[...e.uniqueGatesPerson2].sort(((e,t)=>e.gate-t.gate));for(const e of n)t.push(`${e.gate}: ${e.gateName} | ${e.center}`)}else t.push("None");if(t.push(""),t.push(`[CHANNELS: ${n.name} Only]`),t.push(`(Channels only ${n.name} has)`),e.channelsPerson1Only.length>0)for(const n of e.channelsPerson1Only)t.push(`${n.gates[0]}-${n.gates[1]} (${n.name}): ${n.centers[0]} ↔ ${n.centers[1]}`);else t.push("None");if(t.push(""),t.push(`[CHANNELS: ${a.name} Only]`),t.push(`(Channels only ${a.name} has)`),e.channelsPerson2Only.length>0)for(const n of e.channelsPerson2Only)t.push(`${n.gates[0]}-${n.gates[1]} (${n.name}): ${n.centers[0]} ↔ ${n.centers[1]}`);else t.push("None");if(t.push(""),t.push("[CHANNELS: Only Together]"),t.push("(Channels formed only when both are together - neither has individually)"),e.channelsOnlyTogether.length>0)for(const n of e.channelsOnlyTogether)t.push(`${n.gates[0]}-${n.gates[1]} (${n.name}): ${n.centers[0]} ↔ ${n.centers[1]}`);else t.push("None");if(t.push(""),t.push("[COMPOSITE CHANNELS]"),t.push("(All channels active when together)"),e.compositeChannels.length>0)for(const n of e.compositeChannels)t.push(`${n.gates[0]}-${n.gates[1]} (${n.name}): ${n.centers[0]} ↔ ${n.centers[1]}`);else t.push("None");return t.join("\n")}(m(a,s))},t.GATES=[41,19,13,49,30,55,37,63,22,36,25,17,21,51,42,3,27,24,2,23,8,20,16,35,45,12,15,52,39,53,62,56,31,33,7,4,29,59,40,64,47,6,46,18,48,57,32,50,28,44,1,43,14,34,9,5,26,11,10,58,38,54,61,60],t.GATE_NAMES={1:"Self-Expression",2:"Direction of the Self",3:"Ordering",4:"Formulization",5:"Fixed Rhythms",6:"Friction",7:"The Role of the Self",8:"Contribution",9:"Focus",10:"Behavior of the Self",11:"Ideas",12:"Caution",13:"The Listener",14:"Power Skills",15:"Extremes",16:"Skills",17:"Opinions",18:"Correction",19:"Wanting",20:"The Now",21:"The Hunter",22:"Openness",23:"Assimilation",24:"Rationalization",25:"Innocence",26:"The Egoist",27:"Caring",28:"The Game Player",29:"Perseverance",30:"Feelings",31:"Influence",32:"Continuity",33:"Privacy",34:"Power",35:"Change",36:"Crisis",37:"Friendship",38:"The Fighter",39:"Provocation",40:"Aloneness",41:"Contraction",42:"Growth",43:"Insight",44:"Alertness",45:"The Gatherer",46:"Determination",47:"Realization",48:"Depth",49:"Principles",50:"Values",51:"Shock",52:"Stillness",53:"Beginnings",54:"Ambition",55:"Spirit",56:"Stimulation",57:"Intuition",58:"Vitality",59:"Sexuality",60:"Limitation",61:"Mystery",62:"Details",63:"Doubt",64:"Confusion"},t.GATE_CENTERS={64:"Head",61:"Head",63:"Head",47:"Ajna",24:"Ajna",4:"Ajna",17:"Ajna",43:"Ajna",11:"Ajna",62:"Throat",23:"Throat",56:"Throat",35:"Throat",12:"Throat",45:"Throat",33:"Throat",8:"Throat",31:"Throat",20:"Throat",16:"Throat",7:"G Center",1:"G Center",13:"G Center",25:"G Center",46:"G Center",2:"G Center",15:"G Center",10:"G Center",21:"Ego",40:"Ego",26:"Ego",51:"Ego",36:"Solar Plexus",22:"Solar Plexus",37:"Solar Plexus",6:"Solar Plexus",49:"Solar Plexus",55:"Solar Plexus",30:"Solar Plexus",34:"Sacral",5:"Sacral",14:"Sacral",29:"Sacral",59:"Sacral",9:"Sacral",3:"Sacral",42:"Sacral",27:"Sacral",48:"Spleen",57:"Spleen",44:"Spleen",50:"Spleen",32:"Spleen",28:"Spleen",18:"Spleen",58:"Root",38:"Root",54:"Root",53:"Root",60:"Root",52:"Root",19:"Root",39:"Root",41:"Root"},t.CHANNELS=[{gates:[64,47],name:"Abstraction",centers:["Head","Ajna"]},{gates:[61,24],name:"Awareness",centers:["Head","Ajna"]},{gates:[63,4],name:"Logic",centers:["Head","Ajna"]},{gates:[17,62],name:"Acceptance",centers:["Ajna","Throat"]},{gates:[43,23],name:"Structuring",centers:["Ajna","Throat"]},{gates:[11,56],name:"Curiosity",centers:["Ajna","Throat"]},{gates:[7,31],name:"The Alpha",centers:["G Center","Throat"]},{gates:[1,8],name:"Inspiration",centers:["G Center","Throat"]},{gates:[13,33],name:"The Prodigal",centers:["G Center","Throat"]},{gates:[10,20],name:"Awakening",centers:["G Center","Throat"]},{gates:[15,5],name:"Rhythm",centers:["G Center","Sacral"]},{gates:[2,14],name:"The Beat",centers:["G Center","Sacral"]},{gates:[46,29],name:"Discovery",centers:["G Center","Sacral"]},{gates:[10,57],name:"Perfected Form",centers:["G Center","Spleen"]},{gates:[25,51],name:"Initiation",centers:["G Center","Ego"]},{gates:[21,45],name:"Money",centers:["Ego","Throat"]},{gates:[37,40],name:"Community",centers:["Ego","Solar Plexus"]},{gates:[26,44],name:"Surrender",centers:["Ego","Spleen"]},{gates:[34,20],name:"Charisma",centers:["Sacral","Throat"]},{gates:[34,57],name:"Power",centers:["Sacral","Spleen"]},{gates:[27,50],name:"Preservation",centers:["Sacral","Spleen"]},{gates:[59,6],name:"Intimacy",centers:["Sacral","Solar Plexus"]},{gates:[42,53],name:"Maturation",centers:["Sacral","Root"]},{gates:[3,60],name:"Mutation",centers:["Sacral","Root"]},{gates:[9,52],name:"Concentration",centers:["Sacral","Root"]},{gates:[16,48],name:"The Wavelength",centers:["Spleen","Throat"]},{gates:[57,20],name:"The Brainwave",centers:["Spleen","Throat"]},{gates:[18,58],name:"Judgment",centers:["Spleen","Root"]},{gates:[28,38],name:"Struggle",centers:["Spleen","Root"]},{gates:[32,54],name:"Transformation",centers:["Spleen","Root"]},{gates:[12,22],name:"Openness",centers:["Solar Plexus","Throat"]},{gates:[35,36],name:"Transitoriness",centers:["Solar Plexus","Throat"]},{gates:[19,49],name:"Synthesis",centers:["Solar Plexus","Root"]},{gates:[39,55],name:"Emoting",centers:["Solar Plexus","Root"]},{gates:[41,30],name:"Recognition",centers:["Solar Plexus","Root"]},{gates:[34,10],name:"Exploration",centers:["Sacral","G Center"]}],t.PROFILE_NAMES={"1/3":"Investigator/Martyr","1/4":"Investigator/Opportunist","2/4":"Hermit/Opportunist","2/5":"Hermit/Heretic","3/5":"Martyr/Heretic","3/6":"Martyr/Role Model","4/6":"Opportunist/Role Model","4/1":"Opportunist/Investigator","5/1":"Heretic/Investigator","5/2":"Heretic/Hermit","6/2":"Role Model/Hermit","6/3":"Role Model/Martyr"},t.INCARNATION_CROSSES={1:"The Sphinx",2:"The Sphinx",3:"Laws",4:"Explanation",5:"Consciousness",6:"Eden",7:"The Sphinx",8:"Contagion",9:"Planning",10:"Vessel of Love",11:"Eden",12:"Eden",13:"The Sphinx",14:"Contagion",15:"Vessel of Love",16:"Planning",17:"Service",18:"Service",19:"The Four Ways",20:"The Sleeping Phoenix",21:"Tension",22:"Rulership",23:"Explanation",24:"The Four Ways",25:"Vessel of Love",26:"Rulership",27:"The Unexpected",28:"The Unexpected",29:"Contagion",30:"Contagion",31:"The Unexpected",32:"Maya",33:"The Four Ways",34:"The Sleeping Phoenix",35:"Consciousness",36:"Eden",37:"Planning",38:"Tension",39:"Tension",40:"Planning",41:"The Unexpected",42:"Maya",43:"Explanation",44:"The Four Ways",45:"Rulership",46:"Vessel of Love",47:"Rulership",48:"Tension",49:"Explanation",50:"Laws",51:"Penetration",52:"Service",53:"Penetration",54:"Penetration",55:"The Sleeping Phoenix",56:"Laws",57:"Penetration",58:"Service",59:"The Sleeping Phoenix",60:"Laws",61:"Maya",62:"Maya",63:"Consciousness",64:"Consciousness"},t.STRATEGY_BY_TYPE={Generator:"Wait to Respond","Manifesting Generator":"Wait to Respond",Manifestor:"Inform Before Acting",Projector:"Wait for the Invitation",Reflector:"Wait a Lunar Cycle"},t.ALL_CENTERS=["Head","Ajna","Throat","G Center","Ego","Solar Plexus","Sacral","Spleen","Root"],t.default=d},858:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.calculateSignDistributions=function(e,t){const n=[...e];void 0!==t&&n.push({name:"Ascendant",degree:t});const i={Fire:[],Earth:[],Air:[],Water:[]},r={Cardinal:0,Fixed:0,Mutable:0},o={Masculine:0,Feminine:0};for(const e of n){const t=(0,a.getSign)(e.degree),n=s.ZODIAC_SIGN_DATA.find((e=>e.name===t));n&&(i[n.element].push(e.name),r[n.modality]++,o[n.polarity]++)}return{elements:i,modalities:r,polarities:o}},t.formatElementDistribution=function(e){return[Object.entries(e).map((([e,t])=>0===t.length?`${e}: 0`:`${e}: ${t.length} (${t.join(", ")})`)).join(" | ")]},t.formatModalityDistribution=function(e){return[Object.entries(e).map((([e,t])=>`${e}: ${t}`)).join(" | ")]},t.formatPolarityDistribution=function(e){return[Object.entries(e).map((([e,t])=>`${e}: ${t}`)).join(" | ")]};const a=n(175),s=n(921)},865:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.groupAspects=function(e,t){const n=new Map,a=t.aspectStrengthThresholds,s=[],i=[],r=[];if(e.forEach((e=>{e.orb<=a.tight?s.push(e):e.orb<=a.moderate?i.push(e):r.push(e)})),s.sort(((e,t)=>e.orb-t.orb)),i.sort(((e,t)=>e.orb-t.orb)),r.sort(((e,t)=>e.orb-t.orb)),s.length>0){const e=`[TIGHT ASPECTS: orb under ${a.tight.toFixed(1)}°]`;n.set(e,s)}if(i.length>0){const e=`[MODERATE ASPECTS: orb ${a.tight.toFixed(1)}-${a.moderate.toFixed(1)}°]`;n.set(e,i)}if(r.length>0){const e=`[WIDE ASPECTS: orb over ${a.moderate.toFixed(1)}°]`;n.set(e,r)}return n}},888:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generateBirthdataOutput=function(e,t,n,s="[BIRTHDATA]"){if(!t)return[`${s} Not available`];const i=(0,a.formatDateCustom)(t,n.dateFormat),r=(0,a.formatTime)(t);return[`${s} ${e||"Unknown Location"} | ${i} | ${r}`]};const a=n(889)},889:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.formatDateCustom=function(e,t){const n=e.getMonth()+1,a=e.getDate(),s=e.getFullYear();switch(t.toUpperCase()){case"MM/DD/YYYY":return`${n.toString().padStart(2,"0")}/${a.toString().padStart(2,"0")}/${s}`;case"DD/MM/YYYY":return`${a.toString().padStart(2,"0")}/${n.toString().padStart(2,"0")}/${s}`;case"YYYY-MM-DD":return`${s}-${n.toString().padStart(2,"0")}-${a.toString().padStart(2,"0")}`;default:return console.warn(`Unrecognized date format: ${t}. Falling back to toLocaleDateString().`),e.toLocaleDateString()}},t.formatTime=function(e){return e.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0})}},904:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeDegree=s,t.getDegreeSign=function(e){const t=s(e),n=Math.floor(t/30);if(n<0||n>=a.ZODIAC_SIGNS.length)return console.error(`Invalid sign index computed: ${n} for normalized degree ${t}`),"Unknown Sign";return a.ZODIAC_SIGNS[n]},t.getDegreeInSign=function(e){return s(e)%30};const a=n(921);function s(e){if(!isFinite(e))throw new Error(`Invalid degree value: ${e}`);let t=e%360;return t<0&&(t+=360),t}},919:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.detectAspectPatterns=function(e,t,n){const a=[],l=function(e){const t=new Map;return e.forEach((e=>{const n=s(e.planetA,e.p1ChartName),a=s(e.planetB,e.p2ChartName);t.has(n)||t.set(n,new Map),t.has(a)||t.set(a,new Map),t.get(n).set(a,e),t.get(a).set(n,e)})),t}(t);return a.push(...function(e,t,n){const a=[];for(let s=0;s<e.length;s++)for(let u=s+1;u<e.length;u++)if(o(e[s],e[u],"opposition",t))for(let l=0;l<e.length;l++)if(l!==s&&l!==u&&o(e[s],e[l],"square",t)&&o(e[u],e[l],"square",t)){const[o,p]=e[l],[h,f]=e[s],[g,d]=e[u],m=i(o,n,p),S=i(h,n,f),A=i(g,n,d),$=c(e[s],e[u],t),T=c(e[s],e[l],t),y=c(e[u],e[l],t),C=($.orb+T.orb+y.orb)/3,E=r(m.sign);a.push({type:"T-Square",apex:m,opposition:[S,A],mode:E,averageOrb:C})}return a}(e,l,n)),a.push(...u(e,l,n)),a.push(...function(e,t,n){const a=[];for(let s=0;s<e.length;s++)for(let u=s+1;u<e.length;u++)for(let l=u+1;l<e.length;l++)for(let p=l+1;p<e.length;p++){const h=[e[s],e[u],e[l],e[p]],f=[[0,2],[1,3],[0,3],[1,2]];let g=0,d=0;const m=[];if([[0,1],[2,3]].forEach((([e,n])=>{o(h[e],h[n],"opposition",t)&&(g++,m.push(c(h[e],h[n],t)))})),f.forEach((([e,n])=>{o(h[e],h[n],"square",t)&&(d++,m.push(c(h[e],h[n],t)))})),2===g&&4===d){const[e,t]=h[0],[s,o]=h[1],[c,u]=h[2],[l,p]=h[3],f=i(e,n,t),g=i(s,n,o),d=i(c,n,u),S=i(l,n,p),A=m.reduce(((e,t)=>e+t.orb),0)/m.length,$=r(f.sign);a.push({type:"Grand Cross",planets:[f,g,d,S],mode:$,averageOrb:A})}}return a}(e,l,n)),a.push(...function(e,t,n){const a=[];for(let s=0;s<e.length;s++)for(let r=s+1;r<e.length;r++)if(o(e[s],e[r],"sextile",t))for(let u=0;u<e.length;u++)if(u!==s&&u!==r&&o(e[s],e[u],"quincunx",t)&&o(e[r],e[u],"quincunx",t)){const[o,l]=e[u],[p,h]=e[s],[f,g]=e[r],d=i(o,n,l),m=i(p,n,h),S=i(f,n,g),A=c(e[s],e[r],t),$=c(e[s],e[u],t),T=c(e[r],e[u],t),y=(A.orb+$.orb+T.orb)/3;a.push({type:"Yod",apex:d,base:[m,S],averageOrb:y})}return a}(e,l,n)),a.push(...function(e,t,n){const a=[];for(let s=0;s<e.length;s++)for(let r=s+1;r<e.length;r++)for(let u=r+1;u<e.length;u++)for(let l=u+1;l<e.length;l++){const p=[e[s],e[r],e[u],e[l]],h=[{oppositions:[[0,1],[2,3]],sextiles:[[0,2],[0,3],[1,2],[1,3]]},{oppositions:[[0,2],[1,3]],sextiles:[[0,1],[0,3],[2,1],[2,3]]},{oppositions:[[0,3],[1,2]],sextiles:[[0,1],[0,2],[3,1],[3,2]]}];for(const e of h){let s=0,r=0;const u=[];if(e.oppositions.forEach((([e,n])=>{o(p[e],p[n],"opposition",t)&&(s++,u.push(c(p[e],p[n],t)))})),e.sextiles.forEach((([e,n])=>{const a=c(p[e],p[n],t);!a||"sextile"!==a.aspectType&&"trine"!==a.aspectType||(r++,u.push(a))})),2===s&&4===r){const[t,s]=p[e.oppositions[0][0]],[r,o]=p[e.oppositions[0][1]],[c,l]=p[e.oppositions[1][0]],[h,f]=p[e.oppositions[1][1]],g=i(t,n,s),d=i(r,n,o),m=i(c,n,l),S=i(h,n,f),A=u.reduce(((e,t)=>e+t.orb),0)/u.length;a.push({type:"Mystic Rectangle",oppositions:[[g,d],[m,S]],averageOrb:A})}}}return a}(e,l,n)),a.push(...function(e,t,n){const a=[];return u(e,t,n).forEach((s=>{s.planets.forEach((r=>{e.forEach((u=>{const[l,p]=u;if(!s.planets.some((e=>e.name===l.name&&e.chartName===p))){const h=e.find((([e,t])=>e.name===r.name&&t===r.chartName));if(h&&o(h,u,"opposition",t)){const e=i(l,n,p),r=c(h,u,t),o=(s.averageOrb+r.orb)/2;a.push({type:"Kite",grandTrine:s.planets,opposition:e,averageOrb:o})}}}))}))})),a}(e,l,n)),a};const a=n(904);function s(e,t){return t?`${e}-${t}`:e}function i(e,t,n){const s=(0,a.getDegreeSign)(e.degree),i=t&&12===t.length?(()=>{const n=e.degree%360;for(let e=0;e<12;e++){const a=t[e],s=t[(e+1)%12];if(s>a){if(n>=a&&n<s)return e+1}else if(n>=a||n<s)return e+1}})():void 0;return{name:e.name,degree:e.degree,sign:s,house:i,chartName:n}}function r(e){return["Aries","Cancer","Libra","Capricorn"].includes(e)?"Cardinal":["Taurus","Leo","Scorpio","Aquarius"].includes(e)?"Fixed":"Mutable"}function o(e,t,n,a){const i=s(e[0].name,e[1]),r=s(t[0].name,t[1]),o=a.get(i);if(!o)return!1;const c=o.get(r);return void 0!==c&&c.aspectType===n}function c(e,t,n){const a=s(e[0].name,e[1]),i=s(t[0].name,t[1]),r=n.get(a);if(r)return r.get(i)}function u(e,t,n){const a=[];for(let r=0;r<e.length;r++)for(let u=r+1;u<e.length;u++)for(let l=u+1;l<e.length;l++)if(o(e[r],e[u],"trine",t)&&o(e[u],e[l],"trine",t)&&o(e[l],e[r],"trine",t)){const[o,p]=e[r],[h,f]=e[u],[g,d]=e[l],m=i(o,n,p),S=i(h,n,f),A=i(g,n,d),$=c(e[r],e[u],t),T=c(e[u],e[l],t),y=c(e[l],e[r],t),C=($.orb+T.orb+y.orb)/3,E=(s=m.sign,["Aries","Leo","Sagittarius"].includes(s)?"Fire":["Taurus","Virgo","Capricorn"].includes(s)?"Earth":["Gemini","Libra","Aquarius"].includes(s)?"Air":"Water");a.push({type:"Grand Trine",planets:[m,S,A],element:E,averageOrb:C})}var s;return a}},921:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_SETTINGS=t.DEFAULT_ASPECT_STRENGTH_THRESHOLDS=t.WIDE_ASPECTS=t.TIGHT_ASPECTS=t.MODERN_ASPECTS=t.TRADITIONAL_ASPECTS=t.SIMPLE_WIDE_ORBS=t.SIMPLE_TIGHT_ORBS=t.SIMPLE_MODERN_ORBS=t.SIMPLE_TRADITIONAL_ORBS=t.DEFAULT_ASPECTS=t.ZODIAC_SIGNS=t.ZODIAC_SIGN_DATA=void 0;const a=n(613);t.ZODIAC_SIGN_DATA=[{name:"Aries",element:"Fire",modality:"Cardinal",polarity:"Masculine",ruler:"Mars"},{name:"Taurus",element:"Earth",modality:"Fixed",polarity:"Feminine",ruler:"Venus"},{name:"Gemini",element:"Air",modality:"Mutable",polarity:"Masculine",ruler:"Mercury"},{name:"Cancer",element:"Water",modality:"Cardinal",polarity:"Feminine",ruler:"Moon"},{name:"Leo",element:"Fire",modality:"Fixed",polarity:"Masculine",ruler:"Sun"},{name:"Virgo",element:"Earth",modality:"Mutable",polarity:"Feminine",ruler:"Mercury"},{name:"Libra",element:"Air",modality:"Fixed",polarity:"Masculine",ruler:"Venus"},{name:"Scorpio",element:"Water",modality:"Fixed",polarity:"Feminine",ruler:"Mars"},{name:"Sagittarius",element:"Fire",modality:"Mutable",polarity:"Masculine",ruler:"Jupiter"},{name:"Capricorn",element:"Earth",modality:"Cardinal",polarity:"Feminine",ruler:"Saturn"},{name:"Aquarius",element:"Air",modality:"Fixed",polarity:"Masculine",ruler:"Saturn"},{name:"Pisces",element:"Water",modality:"Mutable",polarity:"Feminine",ruler:"Jupiter"}],t.ZODIAC_SIGNS=t.ZODIAC_SIGN_DATA.map((e=>e.name)),t.DEFAULT_ASPECTS=[{name:"conjunction",angle:0,orb:5,classification:a.AspectClassification.Major},{name:"opposition",angle:180,orb:5,classification:a.AspectClassification.Major},{name:"trine",angle:120,orb:5,classification:a.AspectClassification.Major},{name:"square",angle:90,orb:5,classification:a.AspectClassification.Major},{name:"sextile",angle:60,orb:3,classification:a.AspectClassification.Minor},{name:"quincunx",angle:150,orb:2,classification:a.AspectClassification.Minor}],t.SIMPLE_TRADITIONAL_ORBS=[{name:"conjunction",angle:0,orb:10,classification:a.AspectClassification.Major},{name:"opposition",angle:180,orb:10,classification:a.AspectClassification.Major},{name:"trine",angle:120,orb:8,classification:a.AspectClassification.Major},{name:"square",angle:90,orb:8,classification:a.AspectClassification.Major},{name:"sextile",angle:60,orb:6,classification:a.AspectClassification.Minor},{name:"quincunx",angle:150,orb:4,classification:a.AspectClassification.Minor}],t.SIMPLE_MODERN_ORBS=[{name:"conjunction",angle:0,orb:8,classification:a.AspectClassification.Major},{name:"opposition",angle:180,orb:8,classification:a.AspectClassification.Major},{name:"trine",angle:120,orb:6,classification:a.AspectClassification.Major},{name:"square",angle:90,orb:6,classification:a.AspectClassification.Major},{name:"sextile",angle:60,orb:4,classification:a.AspectClassification.Minor},{name:"quincunx",angle:150,orb:3,classification:a.AspectClassification.Minor}],t.SIMPLE_TIGHT_ORBS=[{name:"conjunction",angle:0,orb:4,classification:a.AspectClassification.Major},{name:"opposition",angle:180,orb:4,classification:a.AspectClassification.Major},{name:"trine",angle:120,orb:3,classification:a.AspectClassification.Major},{name:"square",angle:90,orb:3,classification:a.AspectClassification.Major},{name:"sextile",angle:60,orb:2,classification:a.AspectClassification.Minor},{name:"quincunx",angle:150,orb:1,classification:a.AspectClassification.Minor}],t.SIMPLE_WIDE_ORBS=[{name:"conjunction",angle:0,orb:12,classification:a.AspectClassification.Major},{name:"opposition",angle:180,orb:12,classification:a.AspectClassification.Major},{name:"trine",angle:120,orb:10,classification:a.AspectClassification.Major},{name:"square",angle:90,orb:10,classification:a.AspectClassification.Major},{name:"sextile",angle:60,orb:8,classification:a.AspectClassification.Minor},{name:"quincunx",angle:150,orb:6,classification:a.AspectClassification.Minor},{name:"semi-sextile",angle:30,orb:4,classification:a.AspectClassification.Minor}],t.TRADITIONAL_ASPECTS=t.SIMPLE_TRADITIONAL_ORBS,t.MODERN_ASPECTS=t.SIMPLE_MODERN_ORBS,t.TIGHT_ASPECTS=t.SIMPLE_TIGHT_ORBS,t.WIDE_ASPECTS=t.SIMPLE_WIDE_ORBS,t.DEFAULT_ASPECT_STRENGTH_THRESHOLDS={tight:2,moderate:4},t.DEFAULT_SETTINGS={aspectDefinitions:t.DEFAULT_ASPECTS,skipOutOfSignAspects:!0,includeAspectPatterns:!1,includeSignDistributions:!0,includeDispositors:!0,includeHouseOverlays:!0,aspectStrengthThresholds:t.DEFAULT_ASPECT_STRENGTH_THRESHOLDS,houseSystemName:"whole_sign",dateFormat:"MM/DD/YYYY"}},945:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generateAnglesOutput=function(e,t){const n=["[ANGLES]"];void 0!==e?n.push(`Ascendant: ${Math.floor((0,a.getDegreeInSign)(e))}° ${(0,a.getDegreeSign)(e)}`):n.push("Ascendant: Not available");void 0!==t?n.push(`Midheaven: ${Math.floor((0,a.getDegreeInSign)(t))}° ${(0,a.getDegreeSign)(t)}`):n.push("Midheaven: Not available");return n};const a=n(904)}},t={};var n=function n(a){var s=t[a];if(void 0!==s)return s.exports;var i=t[a]={exports:{}};return e[a].call(i.exports,i,i.exports,n),i.exports}(156);return n})()));
|
package/dist/core/dispositors.js
CHANGED
|
@@ -29,6 +29,7 @@ function analyzePlanetChain(startPlanet, dispositorMap, cache) {
|
|
|
29
29
|
// eslint-disable-next-line no-constant-condition
|
|
30
30
|
while (true) {
|
|
31
31
|
const nextDispositor = dispositorMap[current];
|
|
32
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
32
33
|
if (!nextDispositor || !dispositorMap.hasOwnProperty(nextDispositor)) {
|
|
33
34
|
// Chain is broken (dispositor not in the chart)
|
|
34
35
|
const result = {
|
|
@@ -149,6 +150,7 @@ function calculateDispositors(planets, mode = true) {
|
|
|
149
150
|
// eslint-disable-next-line no-constant-condition
|
|
150
151
|
while (true) {
|
|
151
152
|
const nextDispositor = dispositorMap[current];
|
|
153
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
152
154
|
if (!nextDispositor || !dispositorMap.hasOwnProperty(nextDispositor)) {
|
|
153
155
|
chains[planetName] = `${path.join(' → ')} → ${nextDispositor} (not in chart)`;
|
|
154
156
|
break;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Aspect, PlanetCategory, OrbConfiguration, Point } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Chart context for orb resolution
|
|
4
|
+
*/
|
|
5
|
+
export interface OrbResolutionContext {
|
|
6
|
+
chartType?: 'natal' | 'synastry' | 'transit' | 'composite';
|
|
7
|
+
planetA: Point | string;
|
|
8
|
+
planetB: Point | string;
|
|
9
|
+
aspect: Aspect;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Resolves orbs using hierarchical rules with caching for performance
|
|
13
|
+
*/
|
|
14
|
+
export declare class OrbResolver {
|
|
15
|
+
private orbCache;
|
|
16
|
+
private orbConfiguration;
|
|
17
|
+
private planetMapping;
|
|
18
|
+
constructor(orbConfiguration?: OrbConfiguration);
|
|
19
|
+
/**
|
|
20
|
+
* Resolves the appropriate orb for a given context
|
|
21
|
+
*/
|
|
22
|
+
resolveOrb(context: OrbResolutionContext): number;
|
|
23
|
+
/**
|
|
24
|
+
* Clears the orb cache (useful when configuration changes)
|
|
25
|
+
*/
|
|
26
|
+
clearCache(): void;
|
|
27
|
+
/**
|
|
28
|
+
* Gets the planet category for a given planet name
|
|
29
|
+
*/
|
|
30
|
+
getPlanetCategory(planetName: string): PlanetCategory | undefined;
|
|
31
|
+
private calculateOrb;
|
|
32
|
+
private getBaseOrb;
|
|
33
|
+
private getPlanetSpecificOrb;
|
|
34
|
+
private applyClassificationMultipliers;
|
|
35
|
+
private applyContextualMultipliers;
|
|
36
|
+
private applyConstraints;
|
|
37
|
+
private generateCacheKey;
|
|
38
|
+
}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OrbResolver = void 0;
|
|
4
|
+
const types_1 = require("../types");
|
|
5
|
+
/**
|
|
6
|
+
* Default planet categorization mapping
|
|
7
|
+
*/
|
|
8
|
+
const DEFAULT_PLANET_MAPPING = {
|
|
9
|
+
Sun: types_1.PlanetCategory.Luminaries,
|
|
10
|
+
Moon: types_1.PlanetCategory.Luminaries,
|
|
11
|
+
Mercury: types_1.PlanetCategory.Personal,
|
|
12
|
+
Venus: types_1.PlanetCategory.Personal,
|
|
13
|
+
Mars: types_1.PlanetCategory.Personal,
|
|
14
|
+
Jupiter: types_1.PlanetCategory.Social,
|
|
15
|
+
Saturn: types_1.PlanetCategory.Social,
|
|
16
|
+
Uranus: types_1.PlanetCategory.Outer,
|
|
17
|
+
Neptune: types_1.PlanetCategory.Outer,
|
|
18
|
+
Pluto: types_1.PlanetCategory.Outer,
|
|
19
|
+
Ascendant: types_1.PlanetCategory.Angles,
|
|
20
|
+
Midheaven: types_1.PlanetCategory.Angles,
|
|
21
|
+
MC: types_1.PlanetCategory.Angles,
|
|
22
|
+
ASC: types_1.PlanetCategory.Angles,
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Resolves orbs using hierarchical rules with caching for performance
|
|
26
|
+
*/
|
|
27
|
+
class OrbResolver {
|
|
28
|
+
constructor(orbConfiguration = {}) {
|
|
29
|
+
this.orbCache = new Map();
|
|
30
|
+
this.orbConfiguration = orbConfiguration;
|
|
31
|
+
this.planetMapping = {
|
|
32
|
+
...DEFAULT_PLANET_MAPPING,
|
|
33
|
+
...orbConfiguration.planetMapping,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Resolves the appropriate orb for a given context
|
|
38
|
+
*/
|
|
39
|
+
resolveOrb(context) {
|
|
40
|
+
const cacheKey = this.generateCacheKey(context);
|
|
41
|
+
// Check cache first
|
|
42
|
+
if (this.orbCache.has(cacheKey)) {
|
|
43
|
+
return this.orbCache.get(cacheKey);
|
|
44
|
+
}
|
|
45
|
+
const orb = this.calculateOrb(context);
|
|
46
|
+
this.orbCache.set(cacheKey, orb);
|
|
47
|
+
return orb;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Clears the orb cache (useful when configuration changes)
|
|
51
|
+
*/
|
|
52
|
+
clearCache() {
|
|
53
|
+
this.orbCache.clear();
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Gets the planet category for a given planet name
|
|
57
|
+
*/
|
|
58
|
+
getPlanetCategory(planetName) {
|
|
59
|
+
return this.planetMapping[planetName];
|
|
60
|
+
}
|
|
61
|
+
calculateOrb(context) {
|
|
62
|
+
let baseOrb = this.getBaseOrb(context);
|
|
63
|
+
// Apply aspect classification multipliers
|
|
64
|
+
baseOrb = this.applyClassificationMultipliers(baseOrb, context.aspect);
|
|
65
|
+
// Apply contextual multipliers (synastry, transit, etc.)
|
|
66
|
+
baseOrb = this.applyContextualMultipliers(baseOrb, context);
|
|
67
|
+
// Ensure minimum constraints
|
|
68
|
+
baseOrb = this.applyConstraints(baseOrb, context.aspect);
|
|
69
|
+
// Round to reasonable precision
|
|
70
|
+
return Math.round(baseOrb * 10) / 10;
|
|
71
|
+
}
|
|
72
|
+
getBaseOrb(context) {
|
|
73
|
+
const planetAName = typeof context.planetA === 'string'
|
|
74
|
+
? context.planetA
|
|
75
|
+
: context.planetA.name;
|
|
76
|
+
const planetBName = typeof context.planetB === 'string'
|
|
77
|
+
? context.planetB
|
|
78
|
+
: context.planetB.name;
|
|
79
|
+
// Try to get planet-specific orbs
|
|
80
|
+
const orbA = this.getPlanetSpecificOrb(planetAName, context.aspect);
|
|
81
|
+
const orbB = this.getPlanetSpecificOrb(planetBName, context.aspect);
|
|
82
|
+
// Use the larger of the two planet-specific orbs, or aspect default
|
|
83
|
+
if (orbA !== null && orbB !== null) {
|
|
84
|
+
return Math.max(orbA, orbB);
|
|
85
|
+
}
|
|
86
|
+
else if (orbA !== null) {
|
|
87
|
+
return orbA;
|
|
88
|
+
}
|
|
89
|
+
else if (orbB !== null) {
|
|
90
|
+
return orbB;
|
|
91
|
+
}
|
|
92
|
+
// Fall back to aspect's default orb
|
|
93
|
+
return context.aspect.orb;
|
|
94
|
+
}
|
|
95
|
+
getPlanetSpecificOrb(planetName, aspect) {
|
|
96
|
+
const planetCategory = this.getPlanetCategory(planetName);
|
|
97
|
+
if (!planetCategory)
|
|
98
|
+
return null;
|
|
99
|
+
const categoryRules = this.orbConfiguration.planetCategories?.[planetCategory];
|
|
100
|
+
if (!categoryRules)
|
|
101
|
+
return null;
|
|
102
|
+
// Try aspect-specific orb first
|
|
103
|
+
const aspectOrb = categoryRules.aspectOrbs?.[aspect.name];
|
|
104
|
+
if (aspectOrb !== undefined)
|
|
105
|
+
return aspectOrb;
|
|
106
|
+
// Fall back to category default orb
|
|
107
|
+
return categoryRules.defaultOrb ?? null;
|
|
108
|
+
}
|
|
109
|
+
applyClassificationMultipliers(orb, aspect) {
|
|
110
|
+
if (!aspect.classification)
|
|
111
|
+
return orb;
|
|
112
|
+
const classificationRules = this.orbConfiguration.aspectClassification?.[aspect.classification];
|
|
113
|
+
if (!classificationRules?.orbMultiplier)
|
|
114
|
+
return orb;
|
|
115
|
+
return orb * classificationRules.orbMultiplier;
|
|
116
|
+
}
|
|
117
|
+
applyContextualMultipliers(orb, context) {
|
|
118
|
+
if (!context.chartType || context.chartType === 'natal')
|
|
119
|
+
return orb;
|
|
120
|
+
// Map 'transit' to 'transits' for the configuration key
|
|
121
|
+
const configKey = context.chartType === 'transit' ? 'transits' : context.chartType;
|
|
122
|
+
const contextRules = this.orbConfiguration.contextualOrbs?.[configKey];
|
|
123
|
+
if (!contextRules)
|
|
124
|
+
return orb;
|
|
125
|
+
// Apply aspect-specific multiplier if available
|
|
126
|
+
const aspectMultiplier = contextRules.aspectMultipliers?.[context.aspect.name];
|
|
127
|
+
if (aspectMultiplier) {
|
|
128
|
+
return orb * aspectMultiplier;
|
|
129
|
+
}
|
|
130
|
+
// Fall back to general multiplier
|
|
131
|
+
if (contextRules.orbMultiplier) {
|
|
132
|
+
return orb * contextRules.orbMultiplier;
|
|
133
|
+
}
|
|
134
|
+
return orb;
|
|
135
|
+
}
|
|
136
|
+
applyConstraints(orb, aspect) {
|
|
137
|
+
const classificationRules = aspect.classification
|
|
138
|
+
? this.orbConfiguration.aspectClassification?.[aspect.classification]
|
|
139
|
+
: undefined;
|
|
140
|
+
let constrainedOrb = orb;
|
|
141
|
+
// Apply minimum constraint
|
|
142
|
+
const minOrb = classificationRules?.minOrb;
|
|
143
|
+
if (minOrb !== undefined && constrainedOrb < minOrb) {
|
|
144
|
+
constrainedOrb = minOrb;
|
|
145
|
+
}
|
|
146
|
+
// Apply maximum constraint
|
|
147
|
+
const maxOrb = classificationRules?.maxOrb;
|
|
148
|
+
if (maxOrb !== undefined && constrainedOrb > maxOrb) {
|
|
149
|
+
constrainedOrb = maxOrb;
|
|
150
|
+
}
|
|
151
|
+
// Global fallback if somehow orb is still invalid
|
|
152
|
+
if (constrainedOrb <= 0) {
|
|
153
|
+
constrainedOrb = this.orbConfiguration.globalFallbackOrb ?? 3;
|
|
154
|
+
}
|
|
155
|
+
return constrainedOrb;
|
|
156
|
+
}
|
|
157
|
+
generateCacheKey(context) {
|
|
158
|
+
const planetAName = typeof context.planetA === 'string'
|
|
159
|
+
? context.planetA
|
|
160
|
+
: context.planetA.name;
|
|
161
|
+
const planetBName = typeof context.planetB === 'string'
|
|
162
|
+
? context.planetB
|
|
163
|
+
: context.planetB.name;
|
|
164
|
+
return `${planetAName}-${planetBName}-${context.aspect.name}-${context.chartType || 'natal'}`;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
exports.OrbResolver = OrbResolver;
|