chart2txt 0.8.0 → 0.8.2
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/config/ChartSettings.d.ts +1 -0
- package/dist/constants.js +1 -0
- package/dist/core/analysis.js +89 -0
- package/dist/formatters/text/sections/metadata.d.ts +2 -2
- package/dist/formatters/text/sections/metadata.js +8 -1
- package/dist/formatters/text/textFormatter.js +6 -2
- package/dist/types.d.ts +6 -1
- package/dist/utils/validation.js +1 -1
- 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 $=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})()));
|
|
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,n={}){const f=(0,o.validateInputData)(t);if(f)throw new Error(`Invalid chart data: ${f}`);const C=new s.ChartSettings(n),E=(0,a.isMultiChartData)(t)?t:[t],O=function(e,t){if(void 0!==t.houseSystemName)return t.houseSystemName;const n=e.map((e=>e.houseSystemName?.trim())).filter((e=>Boolean(e)));if(0===n.length)return;const a=[...new Set(n)];if(1===a.length)return a[0];return`mixed (${a.join(", ")})`}(E,n);void 0!==O&&(C.houseSystemName=O);if("composite"===C.outputMode){const t=E.filter((e=>"transit"!==e.chartType));if(E.filter((e=>"transit"===e.chartType)).length>0)throw new Error("Composite output mode does not support transit charts");if(2!==t.length)throw new Error(`Composite output mode requires exactly 2 non-transit charts, got ${t.length}`);const a=function(e,t,n){const a=new Map(t.planets.map((e=>[e.name,e]))),s=e.planets.filter((e=>a.has(e.name))).map((e=>{const t=a.get(e.name);return{name:e.name,degree:d([e.degree,t.degree]),speed:g(e.speed,t.speed)}})),o=void 0!==e.ascendant&&void 0!==t.ascendant?d([e.ascendant,t.ascendant]):void 0,r=void 0!==e.midheaven&&void 0!==t.midheaven?d([e.midheaven,t.midheaven]):void 0,i=e.houseCusps&&t.houseCusps?e.houseCusps.map(((e,n)=>d([e,t.houseCusps[n]]))):void 0;return{name:`${e.name}-${t.name}`,planets:s,ascendant:o,midheaven:r,houseCusps:i,houseSystemName:n,chartType:"composite",compositeSource:{chartNames:[e.name,t.name],method:"midpoint"}}}(t[0],t[1],C.houseSystemName);return e(a,{...n,outputMode:"standard"})}const v=E.filter((e=>"transit"!==e.chartType)),b=E.find((e=>"transit"===e.chartType)),M=[...v,...b?[b]:[]],P=[],N=S(M,!0);for(const e of M){const t=S([e]),n=(0,r.calculateAspects)(C.resolvedAspectDefinitions,t,C.skipOutOfSignAspects);P.push(...n)}for(let e=0;e<M.length;e++)for(let t=e+1;t<M.length;t++){const n=M[t],a=[...S([M[e]]),...S([n])],s=(0,r.calculateMultichartAspects)(C.resolvedAspectDefinitions,a,C.skipOutOfSignAspects);P.push(...s)}const _=C.includeAspectPatterns?(0,i.detectAspectPatterns)(N,P):[],D=[],I=[],j=[];let G,R;for(const e of M){const t=P.filter((t=>t.p1ChartName===e.name&&t.p2ChartName===e.name)),n=T(_,1,1).filter((t=>y(t,e.name))),a=C.includeAspectPatterns?(0,c.detectStelliums)(m(e),e.houseCusps):[];D.push({chart:e,placements:{planets:(0,u.getPlanetPositions)(e.planets,e.houseCusps)},aspects:t,patterns:n,stelliums:a,signDistributions:C.includeSignDistributions?(0,l.calculateSignDistributions)(e.planets,e.ascendant):{elements:{},modalities:{},polarities:{}},dispositors:"transit"!==e.chartType?(0,p.calculateDispositors)(e.planets,C.includeDispositors):{}})}if(v.length>=2)for(let e=0;e<v.length;e++)for(let t=e+1;t<v.length;t++){const n=v[e],a=v[t],s=P.filter((e=>e.p1ChartName===n.name&&e.p2ChartName===a.name||e.p1ChartName===a.name&&e.p2ChartName===n.name)),o=T(_,2,2).filter((e=>y(e,n.name)&&y(e,a.name)));I.push({chart1:n,chart2:a,synastryAspects:s,compositePatterns:o,houseOverlays:C.includeHouseOverlays?(0,h.calculateHouseOverlays)(n,a):{chart1InChart2Houses:{},chart2InChart1Houses:{}}})}if(v.length>2){const e=T(_,3).filter((e=>!A(e).has(b?.name||"TRANSIT_PLACEHOLDER")));e.length>0&&(G={charts:v,patterns:e})}if(b){for(const e of v){const t=P.filter((t=>t.p1ChartName===e.name&&t.p2ChartName===b.name||t.p1ChartName===b.name&&t.p2ChartName===e.name)),n=T(_,2,2).filter((t=>y(t,e.name)&&y(t,b.name)));j.push({natalChart:e,transitChart:b,aspects:t,patterns:n})}if(v.length>0){const e=(x=_,L=[b.name],x.filter((e=>L.some((t=>y(e,t)))))).filter((e=>$(e)>=3));e.length>0&&(R={charts:M,patterns:e})}}var x,L;return{settings:C,chartAnalyses:D,pairwiseAnalyses:I,globalAnalysis:G,transitAnalyses:j,globalTransitAnalysis:R}};const a=n(613),s=n(230),o=n(371),r=n(75),i=n(919),c=n(390),u=n(175),l=n(858),p=n(729),h=n(600);function f(e){return(e%360+360)%360}function d(e){if(0===e.length)throw new Error("Cannot compute circular mean of empty degree list");const t=e.map((e=>f(e)*Math.PI/180)),n=t.reduce(((e,t)=>e+Math.cos(t)),0),a=t.reduce(((e,t)=>e+Math.sin(t)),0);return f(180*Math.atan2(a,n)/Math.PI)}function g(e,t){if(void 0!==e&&void 0!==t)return(e+t)/2}function m(e){const t=["Ascendant","Midheaven","North Node","South Node"];return e.planets.filter((e=>!t.includes(e.name)))}function S(e,t=!1){return e.flatMap((e=>(t?m(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 A(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 $(e){return A(e).size}function y(e,t){return A(e).has(t)}function T(e,t,n=1/0){return e.filter((e=>{const a=$(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 o=s+1;o<t.length;o++){const[r,c]=t[s],[u,l]=t[o],p=i(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 o=s+1;o<t.length;o++){const[r,c]=t[s],[u,l]=t[o];if(c!==l){const t=i(e,r,u,n,c,l);t&&a.push(t)}}return a};const a=n(904),s=n(318);function o(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 o=e.speed,r=t.speed,i=(0,a.normalizeDegree)(e.degree),c=(0,a.normalizeDegree)(t.degree);let u=Math.abs(i-c);u>180&&(u=360-u);const l=Math.abs(u-n);if((0,s.isExactAspect)(l))return"exact";if(0===o-r)return"exact";const p=(0,a.normalizeDegree)(i+.1*o),h=(0,a.normalizeDegree)(c+.1*r),f=Math.abs(u-n);let d=Math.abs(p-h);d>180&&(d=360-d);return Math.abs(d-n)<f?"applying":"separating"}function i(e,t,n,i,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(i){const e=Math.floor(l/30),t=Math.floor(p/30),n=o(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 o=n(666);Object.defineProperty(t,"chart2txt",{enumerable:!0,get:function(){return o.chart2txt}});var r=n(6);Object.defineProperty(t,"analyzeCharts",{enumerable:!0,get:function(){return r.analyzeCharts}});var i=n(865);Object.defineProperty(t,"groupAspects",{enumerable:!0,get:function(){return i.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=o,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=o(n,t)),a}))};const a=n(921);function s(e){const t=Math.floor(e/30);return a.ZODIAC_SIGNS[t]}function o(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),o=e.speed&&e.speed<0?" Retrograde":"";let r=`${e.name}: ${Math.floor(e.degree%30)}° ${e.sign}${o} ${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 o(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","composite"];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=o(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=o,t.validateMultiChartData=r,t.validateInputData=function(e){if(!e)return"Data is required";return Array.isArray(e)?r(e):o(e)}},388:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.determineChartType=function(e){if(1===e.length&&"composite"===e[0].chartType)return"composite";let t="natal",n="";const a=e.filter((({chartType:e})=>"transit"!==e&&"event"!==e)),s=e.filter((({chartType:e})=>"event"===e)),o=e.filter((({chartType:e})=>"transit"===e));if(o.length>1)throw new Error("Must provide at most one transit chart");const r=o.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,a){const s=["[METADATA]",`chart_type: ${t}`];n&&s.push(`house_system: ${n}`);a&&(s.push(`composite_method: ${a.method}`),s.push(`source_charts: ${a.chartNames.join(", ")}`));return s.push(`date_format: ${e.dateFormat}`),s}},390:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.detectStelliums=function(e,t,n=3){const o=[],i=new Map;if(e.forEach((e=>{const t=(0,a.getDegreeSign)(e.degree);i.has(t)||i.set(t,[]),i.get(t).push(e)})),i.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)),i=e.map((e=>e.degree)),c=Math.max(...i)-Math.min(...i);o.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)),i=Math.max(...s)-Math.min(...s);o.find((e=>"Stellium"===e.type&&e.planets.some((e=>n.some((t=>t.name===e.name))))))||o.push({type:"Stellium",planets:n,houses:[a],span:i})}}))}return o},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,o.getOrdinal)(e.houses[0])} House`:e.houses.map((e=>`${(0,o.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),o=n(175);function r(e,t){const n=(0,a.getDegreeSign)(e.degree),o=t&&(0,s.getHouseForPoint)(e.degree,t)||void 0;return{name:e.name,degree:e.degree,sign:n,house:o}}},400:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.formatPlanetWithDignities=function(e){const t=e.sign,n=s[e.name],o=a.ZODIAC_SIGN_DATA.find((e=>e.name===t))?.ruler,r=[];n&&n[t]&&r.push(...n[t]);let i=r.join(", ");o&&e.name!==o&&(i?i+=` | Ruler: ${o}`:i=`Ruler: ${o}`);if(i)return`[${i}]`;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,o.formatReportToText)(n)};const a=n(6),s=n(865),o=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 o=n,r=n+6,i=e[o],c=e[r],u=(0,a.getDegreeSign)(i),l=Math.floor((0,a.getDegreeInSign)(i)),p=(0,s.getOrdinal)(o+1)+" house",h=(0,a.getDegreeSign)(c),f=Math.floor((0,a.getDegreeInSign)(c)),d=(0,s.getOrdinal)(r+1)+" house",g=`${p}: ${l}° ${u}`.padEnd(24),m=`${d}: ${f}° ${h}`;t.push(`${g} ${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:i,globalTransitAnalysis:u}=e,h=e.settings,f=[],d=t.map((e=>e.chart)),A=(0,a.determineChartType)(d),$=1===d.length&&"composite"===d[0].chartType?d[0].compositeSource:void 0;f.push(...(0,a.generateMetadataOutput)(h,A,h.houseSystemName,$)),f.push("");const y=t.filter((e=>"transit"!==e.chart.chartType));for(const e of y){const t="composite"===e.chart.chartType?"COMPOSITE":void 0;f.push(...g(e,h,t))}for(const e of n)f.push(...m(e,h));r&&f.push(...S(r,!1));if(i.length>0){const e=t.find((e=>"transit"===e.chart.chartType));e&&(f.push(...(0,s.generateChartHeaderOutput)(e.chart.name,"TRANSIT")),f.push(...(0,o.generateBirthdataOutput)(e.chart.location,e.chart.timestamp,h,"[DATETIME]")),f.push(...(0,c.generatePlanetsOutput)(e.placements.planets)),f.push(""));for(const e of i)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),o=n(888),r=n(945),i=n(668),c=n(234),u=n(82),l=n(784),p=n(762),h=n(756),f=n(109),d=n(390),g=(e,t,n)=>{const a=[],{chart:h,groupedAspects:g,patterns:m,stelliums:S,signDistributions:A,dispositors:$,placements:y}=e;return a.push(...(0,s.generateChartHeaderOutput)(h.name,n)),a.push(...(0,o.generateBirthdataOutput)(h.location,h.timestamp,t)),a.push(...(0,r.generateAnglesOutput)(h.ascendant,h.midheaven)),a.push(...(0,i.generateHousesOutput)(h.houseCusps)),a.push(...(0,c.generatePlanetsOutput)(y.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]",g)),t.includeAspectPatterns&&(a.push(...(0,p.generateAspectPatternsOutput)(m,void 0,!1)),S.length>0?S.forEach((e=>{a.push(...(0,d.formatStellium)(e))})):a.push("No Stelliums detected.")),a.push(""),a},m=(e,t)=>{const n=[],{chart1:a,chart2:o,groupedSynastryAspects:r,compositePatterns:i,houseOverlays:c}=e,u="event"===a.chartType&&"event"===o.chartType?"EVENT_RELATIONSHIP":"event"===a.chartType||"event"===o.chartType?"NATAL_EVENT":"SYNASTRY";return n.push(...(0,s.generateChartHeaderOutput)(`${a.name}-${o.name}`,u)),n.push(...(0,l.generateAspectsOutput)("[PLANET-PLANET ASPECTS]",r,a.name,o.name)),t.includeAspectPatterns&&i.length>0&&n.push(...(0,p.generateAspectPatternsOutput)(i,`${a.name}-${o.name} Composite`,!0)),n.push(""),t.includeHouseOverlays&&(n.push(...(0,h.generateHouseOverlaysOutput)(c,a.name,o.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 o=`${e} Global Composite`;t&&(o=`${e} Global Transit Composite`),n.push(...(0,p.generateAspectPatternsOutput)(s,o,!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 o={};if(e.forEach((e=>{o[e.name]||function(e,t,n){if(n[e])return n[e];const a=[e];let s=e;for(;;){const o=t[s];if(!o||!t.hasOwnProperty(o)){const t={path:[...a,o],isCycle:!1,isFinal:!1,isBroken:!0};return n[e]=t}if(o===s){const t={path:a,isCycle:!1,isFinal:!0,isBroken:!1};return n[e]=t}if(a.includes(o)){const e=a.indexOf(o),t=a.slice(e),s={path:[...a,o],isCycle:!0,isFinal:!1,isBroken:!1};return t.forEach((e=>{n[e]=s})),s}if(n[o]){const t=n[o],s=[...a,...t.path],r={...t,path:s};return n[e]=r}a.push(o),s=o}}(e.name,n,o)})),"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 o){const t=o[e];if(t.isCycle){const e=t.path[t.path.length-1],n=t.path.indexOf(e),s=t.path.slice(n,-1),o=[...new Set(s)].sort().join("|");a.has(o)||a.set(o,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=o(e.apex,!1,t),a=o(e.opposition[0],!1,t),s=o(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=>o(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=>o(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=o(e.apex,!1,t),a=o(e.base[0],!1,t),s=o(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=o(e.oppositions[0][0],!1,t),a=o(e.oppositions[0][1],!1,t),s=o(e.oppositions[1][0],!1,t),r=o(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=>o(e,!1,t))).join(" △ "),a=o(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 o(e,t=!1,n=!0){const o=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} ${o}° ${e.sign}${r}`}},784:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generateAspectsOutput=function(e,t,n,a,s=!1){const o=[e];if(!t||0===t.size)return o.push("None"),o;return t.forEach(((e,t)=>{o.push(t),e.forEach((e=>{o.push(function(e,t,n,a=!1){const s=t?`${t}'s ${e.planetA}`:e.planetA;let o=e.planetB;a?o=`transiting ${e.planetB}`:n&&(o=`${n}'s ${e.planetB}`);const r=e.application&&"exact"!==e.application?` (${e.application})`:"";return`${s} ${e.aspectType} ${o}: ${e.orb.toFixed(1)}°${r}`}(e,n,a,s))}))})),o}},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:o}=n(s.longitude);if(t.push({planet:s.name,gate:e,line:o}),"Sun"===s.name){const n=a(e),s=o;t.push({planet:"Earth",gate:n,line:s})}else if("North Node"===s.name){const n=a(e),s=o;t.push({planet:"South Node",gate:n,line:s})}}return t}function o(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 i(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 o=[],r=[],i=[];for(const e of t.ALL_CENTERS)a.has(e)?o.push(e):s.has(e)?r.push(e):i.push(e);return{defined:o,undefined:r,open:i}}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 o(e,t){const n=s(e),o=s(t);n!==o&&a.set(n,o)}for(const t of e){const[e,n]=t.centers;a.has(e)&&a.has(n)&&o(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 d(e,n,a,s,o,r){let i;return i=o<4?"Right Angle Cross":o>=5?"Left Angle Cross":r<4?"Juxtaposition Cross":"Left Angle Cross",`${i} of ${t.INCARNATION_CROSSES[e]||"Unknown"} (${e}/${n} | ${a}/${s})`}function g(e,n={}){const{personality:a,design:g}=e,m=s(a.planets),S=s(g.planets),A=o(m,S),$=r(A),{defined:y,undefined:T,open:C}=i($,A),E=c(y,$),O=t.STRATEGY_BY_TYPE[E],v=u(y,$),b=l($,y),M=p($,y),P=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=d(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)),o=e.personalityActivations.find((e=>"Earth"===e.planet)),r=e.personalityActivations.find((e=>"Moon"===e.planet)),i=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)),d=e.personalityActivations.find((e=>"Uranus"===e.planet)),g=e.personalityActivations.find((e=>"Neptune"===e.planet)),m=e.personalityActivations.find((e=>"Pluto"===e.planet));n.push(`Sun: ${s.gate}.${s.line} Earth: ${o.gate}.${o.line}`),n.push(`Moon: ${r.gate}.${r.line}`),n.push(`North Node: ${i.gate}.${i.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: ${d.gate}.${d.line} Neptune: ${g.gate}.${g.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)),y=e.designActivations.find((e=>"North Node"===e.planet)),T=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)),v=e.designActivations.find((e=>"Jupiter"===e.planet)),b=e.designActivations.find((e=>"Saturn"===e.planet)),M=e.designActivations.find((e=>"Uranus"===e.planet)),P=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: ${y.gate}.${y.line} South Node: ${T.gate}.${T.line}`),n.push(`Mercury: ${C.gate}.${C.line} Venus: ${E.gate}.${E.line} Mars: ${O.gate}.${O.line}`),n.push(`Jupiter: ${v.gate}.${v.line} Saturn: ${b.gate}.${b.line}`),n.push(`Uranus: ${M.gate}.${M.line} Neptune: ${P.gate}.${P.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:v,definition:b,definitionIslands:M,profile:D,profileName:I,incarnationCross:R,definedCenters:y,undefinedCenters:T,openCenters:C,activeChannels:$,hangingGates:P,allGates:A,personalityActivations:m,designActivations:S})}function m(e,n){const a=[],s=[],o=[],u=[],h=new Set(e.allGates.keys()),f=new Set(n.allGates.keys()),d=new Set;for(const t of e.activeChannels)d.add(`${t.gates[0]}-${t.gates[1]}`);const g=new Set;for(const e of n.activeChannels)g.add(`${e.gates[0]}-${e.gates[1]}`);for(const r of t.CHANNELS){const[t,i]=r.gates,c=h.has(t),l=h.has(i),p=f.has(t),d=f.has(i),g=c&&l,m=p&&d;if(g&&m)s.push({channel:r,type:"companionship",person1Gates:[t,i],person2Gates:[t,i],description:`Both ${e.name} and ${n.name} have the complete ${r.name} channel - deep mutual understanding in this area`});else if(g||m){if(g&&!m&&(p||d)){const a=[];p&&a.push(t),d&&a.push(i),o.push({channel:r,type:"dominance",person1Gates:[t,i],person2Gates:a,description:`${e.name} has the complete ${r.name} channel and leads; ${n.name} has gate ${a.join(", ")}`})}else if(m&&!g&&(c||l)){const a=[];c&&a.push(t),l&&a.push(i),o.push({channel:r,type:"dominance",person1Gates:a,person2Gates:[t,i],description:`${n.name} has the complete ${r.name} channel and leads; ${e.name} has gate ${a.join(", ")}`})}}else{if((c||p)&&(l||d)){const s=[],o=[];c&&s.push(t),l&&s.push(i),p&&o.push(t),d&&o.push(i);const h=s.filter((e=>!o.includes(e))),f=o.filter((e=>!s.includes(e)));h.length>0&&f.length>0?a.push({channel:r,type:"electromagnetic",person1Gates:s,person2Gates:o,description:`${e.name} brings gate ${h.join(", ")}, ${n.name} brings gate ${f.join(", ")} - magnetic attraction`}):s.length>0&&o.length>0&&u.push({channel:r,type:"compromise",person1Gates:s,person2Gates:o,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=i(S,m),$=c(A.defined,S),y=t.STRATEGY_BY_TYPE[$],T=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]}`))),v=[],b=[],M=[];for(const e of S){const t=`${e.gates[0]}-${e.gates[1]}`,n=E.has(t),a=O.has(t);n&&!a?v.push(e):a&&!n?b.push(e):n||a||M.push(e)}const P=[],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?P.push(s):"unique_person1"===s.type?N.push(s):_.push(s)}return{person1:e,person2:n,electromagneticChannels:a,companionshipChannels:s,dominanceChannels:o,compromiseChannels:u,compositeDefinedCenters:A.defined,compositeUndefinedCenters:A.undefined,compositeOpenCenters:A.open,compositeChannels:S,compositeType:$,compositeStrategy:y,compositeDefinition:T,compositeDefinitionIslands:C,channelsPerson1Only:v,channelsPerson2Only:b,channelsOnlyTogether:M,sharedGates:P,uniqueGatesPerson1:N,uniqueGatesPerson2:_}}function S(e,n={}){const{personality:a,design:g}=e,m=s(a.planets),S=s(g.planets),A=o(m,S),$=r(A),{defined:y,undefined:T,open:C}=i($,A),E=c(y,$),O=t.STRATEGY_BY_TYPE[E],v=u(y,$),b=l($,y),M=p($,y),P=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=d(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:v,definition:b,definitionIslands:M,profile:D,profileName:I,incarnationCross:R,definedCenters:y,undefinedCenters:T,openCenters:C,activeChannels:$,hangingGates:P,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=o,t.getActiveChannels=r,t.getCenterStatus=i,t.calculateType=c,t.calculateAuthority=u,t.calculateDefinition=l,t.getDefinitionIslands=p,t.getHangingGates=h,t.calculateProfile=f,t.getIncarnationCross=d,t.humandesign2txt=g,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=g},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 o={Fire:[],Earth:[],Air:[],Water:[]},r={Cardinal:0,Fixed:0,Mutable:0},i={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&&(o[n.element].push(e.name),r[n.modality]++,i[n.polarity]++)}return{elements:o,modalities:r,polarities:i}},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=[],o=[],r=[];if(e.forEach((e=>{e.orb<=a.tight?s.push(e):e.orb<=a.moderate?o.push(e):r.push(e)})),s.sort(((e,t)=>e.orb-t.orb)),o.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(o.length>0){const e=`[MODERATE ASPECTS: orb ${a.tight.toFixed(1)}-${a.moderate.toFixed(1)}°]`;n.set(e,o)}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 o=(0,a.formatDateCustom)(t,n.dateFormat),r=(0,a.formatTime)(t);return[`${s} ${e||"Unknown Location"} | ${o} | ${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(i(e[s],e[u],"opposition",t))for(let l=0;l<e.length;l++)if(l!==s&&l!==u&&i(e[s],e[l],"square",t)&&i(e[u],e[l],"square",t)){const[i,p]=e[l],[h,f]=e[s],[d,g]=e[u],m=o(i,n,p),S=o(h,n,f),A=o(d,n,g),$=c(e[s],e[u],t),y=c(e[s],e[l],t),T=c(e[u],e[l],t),C=($.orb+y.orb+T.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 d=0,g=0;const m=[];if([[0,1],[2,3]].forEach((([e,n])=>{i(h[e],h[n],"opposition",t)&&(d++,m.push(c(h[e],h[n],t)))})),f.forEach((([e,n])=>{i(h[e],h[n],"square",t)&&(g++,m.push(c(h[e],h[n],t)))})),2===d&&4===g){const[e,t]=h[0],[s,i]=h[1],[c,u]=h[2],[l,p]=h[3],f=o(e,n,t),d=o(s,n,i),g=o(c,n,u),S=o(l,n,p),A=m.reduce(((e,t)=>e+t.orb),0)/m.length,$=r(f.sign);a.push({type:"Grand Cross",planets:[f,d,g,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(i(e[s],e[r],"sextile",t))for(let u=0;u<e.length;u++)if(u!==s&&u!==r&&i(e[s],e[u],"quincunx",t)&&i(e[r],e[u],"quincunx",t)){const[i,l]=e[u],[p,h]=e[s],[f,d]=e[r],g=o(i,n,l),m=o(p,n,h),S=o(f,n,d),A=c(e[s],e[r],t),$=c(e[s],e[u],t),y=c(e[r],e[u],t),T=(A.orb+$.orb+y.orb)/3;a.push({type:"Yod",apex:g,base:[m,S],averageOrb:T})}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])=>{i(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,i]=p[e.oppositions[0][1]],[c,l]=p[e.oppositions[1][0]],[h,f]=p[e.oppositions[1][1]],d=o(t,n,s),g=o(r,n,i),m=o(c,n,l),S=o(h,n,f),A=u.reduce(((e,t)=>e+t.orb),0)/u.length;a.push({type:"Mystic Rectangle",oppositions:[[d,g],[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&&i(h,u,"opposition",t)){const e=o(l,n,p),r=c(h,u,t),i=(s.averageOrb+r.orb)/2;a.push({type:"Kite",grandTrine:s.planets,opposition:e,averageOrb:i})}}}))}))})),a}(e,l,n)),a};const a=n(904);function s(e,t){return t?`${e}-${t}`:e}function o(e,t,n){const s=(0,a.getDegreeSign)(e.degree),o=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:o,chartName:n}}function r(e){return["Aries","Cancer","Libra","Capricorn"].includes(e)?"Cardinal":["Taurus","Leo","Scorpio","Aquarius"].includes(e)?"Fixed":"Mutable"}function i(e,t,n,a){const o=s(e[0].name,e[1]),r=s(t[0].name,t[1]),i=a.get(o);if(!i)return!1;const c=i.get(r);return void 0!==c&&c.aspectType===n}function c(e,t,n){const a=s(e[0].name,e[1]),o=s(t[0].name,t[1]),r=n.get(a);if(r)return r.get(o)}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(i(e[r],e[u],"trine",t)&&i(e[u],e[l],"trine",t)&&i(e[l],e[r],"trine",t)){const[i,p]=e[r],[h,f]=e[u],[d,g]=e[l],m=o(i,n,p),S=o(h,n,f),A=o(d,n,g),$=c(e[r],e[u],t),y=c(e[u],e[l],t),T=c(e[l],e[r],t),C=($.orb+y.orb+T.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",outputMode:"standard"}},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 o=t[a]={exports:{}};return e[a].call(o.exports,o,o.exports,n),o.exports}(156);return n})()));
|
|
@@ -9,6 +9,7 @@ export declare class ChartSettings implements Settings {
|
|
|
9
9
|
includeDispositors: boolean | 'finals';
|
|
10
10
|
includeHouseOverlays: boolean;
|
|
11
11
|
dateFormat: string;
|
|
12
|
+
outputMode: 'standard' | 'composite';
|
|
12
13
|
constructor(customSettings?: PartialSettings);
|
|
13
14
|
/**
|
|
14
15
|
* Gets the resolved aspect definitions (handles preset strings)
|
package/dist/constants.js
CHANGED
package/dist/core/analysis.js
CHANGED
|
@@ -12,6 +12,60 @@ const signDistributions_1 = require("./signDistributions");
|
|
|
12
12
|
const dispositors_1 = require("./dispositors");
|
|
13
13
|
const houseCalculations_1 = require("../utils/houseCalculations");
|
|
14
14
|
// Helper functions
|
|
15
|
+
function normalizeDegree(degree) {
|
|
16
|
+
return ((degree % 360) + 360) % 360;
|
|
17
|
+
}
|
|
18
|
+
function circularMeanDegrees(degrees) {
|
|
19
|
+
if (degrees.length === 0) {
|
|
20
|
+
throw new Error('Cannot compute circular mean of empty degree list');
|
|
21
|
+
}
|
|
22
|
+
const radians = degrees.map((degree) => (normalizeDegree(degree) * Math.PI) / 180);
|
|
23
|
+
const x = radians.reduce((sum, rad) => sum + Math.cos(rad), 0);
|
|
24
|
+
const y = radians.reduce((sum, rad) => sum + Math.sin(rad), 0);
|
|
25
|
+
const angle = (Math.atan2(y, x) * 180) / Math.PI;
|
|
26
|
+
return normalizeDegree(angle);
|
|
27
|
+
}
|
|
28
|
+
function midpointSpeed(speedA, speedB) {
|
|
29
|
+
if (speedA === undefined || speedB === undefined) {
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
32
|
+
return (speedA + speedB) / 2;
|
|
33
|
+
}
|
|
34
|
+
function createMidpointCompositeChart(chart1, chart2, houseSystemName) {
|
|
35
|
+
const chart2PlanetMap = new Map(chart2.planets.map((planet) => [planet.name, planet]));
|
|
36
|
+
const compositePlanets = chart1.planets
|
|
37
|
+
.filter((planet) => chart2PlanetMap.has(planet.name))
|
|
38
|
+
.map((planet) => {
|
|
39
|
+
const otherPlanet = chart2PlanetMap.get(planet.name);
|
|
40
|
+
return {
|
|
41
|
+
name: planet.name,
|
|
42
|
+
degree: circularMeanDegrees([planet.degree, otherPlanet.degree]),
|
|
43
|
+
speed: midpointSpeed(planet.speed, otherPlanet.speed),
|
|
44
|
+
};
|
|
45
|
+
});
|
|
46
|
+
const ascendant = chart1.ascendant !== undefined && chart2.ascendant !== undefined
|
|
47
|
+
? circularMeanDegrees([chart1.ascendant, chart2.ascendant])
|
|
48
|
+
: undefined;
|
|
49
|
+
const midheaven = chart1.midheaven !== undefined && chart2.midheaven !== undefined
|
|
50
|
+
? circularMeanDegrees([chart1.midheaven, chart2.midheaven])
|
|
51
|
+
: undefined;
|
|
52
|
+
const houseCusps = chart1.houseCusps && chart2.houseCusps
|
|
53
|
+
? chart1.houseCusps.map((cusp, index) => circularMeanDegrees([cusp, chart2.houseCusps[index]]))
|
|
54
|
+
: undefined;
|
|
55
|
+
return {
|
|
56
|
+
name: `${chart1.name}-${chart2.name}`,
|
|
57
|
+
planets: compositePlanets,
|
|
58
|
+
ascendant,
|
|
59
|
+
midheaven,
|
|
60
|
+
houseCusps,
|
|
61
|
+
houseSystemName,
|
|
62
|
+
chartType: 'composite',
|
|
63
|
+
compositeSource: {
|
|
64
|
+
chartNames: [chart1.name, chart2.name],
|
|
65
|
+
method: 'midpoint',
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
}
|
|
15
69
|
function getAllPointsFromChart(chartData) {
|
|
16
70
|
const allPoints = [...chartData.planets];
|
|
17
71
|
if (chartData.ascendant !== undefined) {
|
|
@@ -89,6 +143,22 @@ function filterPatternsByChartInvolvement(patterns, requiredChartNames) {
|
|
|
89
143
|
return requiredChartNames.some((chartName) => patternInvolvesChart(pattern, chartName));
|
|
90
144
|
});
|
|
91
145
|
}
|
|
146
|
+
function resolveHouseSystemName(charts, partialSettings) {
|
|
147
|
+
if (partialSettings.houseSystemName !== undefined) {
|
|
148
|
+
return partialSettings.houseSystemName;
|
|
149
|
+
}
|
|
150
|
+
const houseSystems = charts
|
|
151
|
+
.map((chart) => chart.houseSystemName?.trim())
|
|
152
|
+
.filter((value) => Boolean(value));
|
|
153
|
+
if (houseSystems.length === 0) {
|
|
154
|
+
return undefined;
|
|
155
|
+
}
|
|
156
|
+
const uniqueHouseSystems = [...new Set(houseSystems)];
|
|
157
|
+
if (uniqueHouseSystems.length === 1) {
|
|
158
|
+
return uniqueHouseSystems[0];
|
|
159
|
+
}
|
|
160
|
+
return `mixed (${uniqueHouseSystems.join(', ')})`;
|
|
161
|
+
}
|
|
92
162
|
/**
|
|
93
163
|
* Analyzes single or multiple chart data and returns a structured report
|
|
94
164
|
* containing all detected astrological configurations without any formatting.
|
|
@@ -100,6 +170,25 @@ function analyzeCharts(data, partialSettings = {}) {
|
|
|
100
170
|
}
|
|
101
171
|
const settings = new ChartSettings_1.ChartSettings(partialSettings);
|
|
102
172
|
const rawCharts = (0, types_1.isMultiChartData)(data) ? data : [data];
|
|
173
|
+
const resolvedHouseSystemName = resolveHouseSystemName(rawCharts, partialSettings);
|
|
174
|
+
if (resolvedHouseSystemName !== undefined) {
|
|
175
|
+
settings.houseSystemName = resolvedHouseSystemName;
|
|
176
|
+
}
|
|
177
|
+
if (settings.outputMode === 'composite') {
|
|
178
|
+
const nonTransitCharts = rawCharts.filter((c) => c.chartType !== 'transit');
|
|
179
|
+
const transitCharts = rawCharts.filter((c) => c.chartType === 'transit');
|
|
180
|
+
if (transitCharts.length > 0) {
|
|
181
|
+
throw new Error('Composite output mode does not support transit charts');
|
|
182
|
+
}
|
|
183
|
+
if (nonTransitCharts.length !== 2) {
|
|
184
|
+
throw new Error(`Composite output mode requires exactly 2 non-transit charts, got ${nonTransitCharts.length}`);
|
|
185
|
+
}
|
|
186
|
+
const compositeChart = createMidpointCompositeChart(nonTransitCharts[0], nonTransitCharts[1], settings.houseSystemName);
|
|
187
|
+
return analyzeCharts(compositeChart, {
|
|
188
|
+
...partialSettings,
|
|
189
|
+
outputMode: 'standard',
|
|
190
|
+
});
|
|
191
|
+
}
|
|
103
192
|
const nonTransitCharts = rawCharts.filter((c) => c.chartType !== 'transit');
|
|
104
193
|
const transitChart = rawCharts.find((c) => c.chartType === 'transit');
|
|
105
194
|
const allCharts = [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChartSettings } from '../../../config/ChartSettings';
|
|
2
|
-
import { MultiChartData } from '../../../types';
|
|
2
|
+
import { MultiChartData, ChartData } from '../../../types';
|
|
3
3
|
export declare function determineChartType(data: MultiChartData): string;
|
|
4
4
|
/**
|
|
5
5
|
* Generates the [METADATA] section of the chart output.
|
|
@@ -8,4 +8,4 @@ export declare function determineChartType(data: MultiChartData): string;
|
|
|
8
8
|
* @param houseSystemName Optional: The name of the house system used.
|
|
9
9
|
* @returns An array of strings, each representing a line in the output.
|
|
10
10
|
*/
|
|
11
|
-
export declare function generateMetadataOutput(settings: ChartSettings, chartType: string, houseSystemName?: string): string[];
|
|
11
|
+
export declare function generateMetadataOutput(settings: ChartSettings, chartType: string, houseSystemName?: string, compositeSource?: ChartData['compositeSource']): string[];
|
|
@@ -3,6 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.determineChartType = determineChartType;
|
|
4
4
|
exports.generateMetadataOutput = generateMetadataOutput;
|
|
5
5
|
function determineChartType(data) {
|
|
6
|
+
if (data.length === 1 && data[0].chartType === 'composite') {
|
|
7
|
+
return 'composite';
|
|
8
|
+
}
|
|
6
9
|
let baseChartString = 'natal';
|
|
7
10
|
let suffixString = '';
|
|
8
11
|
const natalCharts = data.filter(({ chartType }) => chartType !== 'transit' && chartType !== 'event');
|
|
@@ -62,11 +65,15 @@ function determineChartType(data) {
|
|
|
62
65
|
* @param houseSystemName Optional: The name of the house system used.
|
|
63
66
|
* @returns An array of strings, each representing a line in the output.
|
|
64
67
|
*/
|
|
65
|
-
function generateMetadataOutput(settings, chartType, houseSystemName) {
|
|
68
|
+
function generateMetadataOutput(settings, chartType, houseSystemName, compositeSource) {
|
|
66
69
|
const output = ['[METADATA]', `chart_type: ${chartType}`];
|
|
67
70
|
if (houseSystemName) {
|
|
68
71
|
output.push(`house_system: ${houseSystemName}`);
|
|
69
72
|
}
|
|
73
|
+
if (compositeSource) {
|
|
74
|
+
output.push(`composite_method: ${compositeSource.method}`);
|
|
75
|
+
output.push(`source_charts: ${compositeSource.chartNames.join(', ')}`);
|
|
76
|
+
}
|
|
70
77
|
output.push(`date_format: ${settings.dateFormat}`);
|
|
71
78
|
return output;
|
|
72
79
|
}
|
|
@@ -89,12 +89,16 @@ function formatReportToText(report) {
|
|
|
89
89
|
const outputLines = [];
|
|
90
90
|
const originalCharts = chartAnalyses.map((ca) => ca.chart);
|
|
91
91
|
const chartType = (0, metadata_1.determineChartType)(originalCharts);
|
|
92
|
-
|
|
92
|
+
const compositeSource = originalCharts.length === 1 && originalCharts[0].chartType === 'composite'
|
|
93
|
+
? originalCharts[0].compositeSource
|
|
94
|
+
: undefined;
|
|
95
|
+
outputLines.push(...(0, metadata_1.generateMetadataOutput)(settings, chartType, settings.houseSystemName, compositeSource));
|
|
93
96
|
outputLines.push('');
|
|
94
97
|
// 1. Process individual non-transit charts
|
|
95
98
|
const nonTransitAnalyses = chartAnalyses.filter((a) => a.chart.chartType !== 'transit');
|
|
96
99
|
for (const analysis of nonTransitAnalyses) {
|
|
97
|
-
|
|
100
|
+
const chartTitlePrefix = analysis.chart.chartType === 'composite' ? 'COMPOSITE' : undefined;
|
|
101
|
+
outputLines.push(...processSingleChartOutput(analysis, settings, chartTitlePrefix));
|
|
98
102
|
}
|
|
99
103
|
// 2. Process pairwise analyses
|
|
100
104
|
for (const analysis of pairwiseAnalyses) {
|
package/dist/types.d.ts
CHANGED
|
@@ -13,7 +13,11 @@ export interface ChartData {
|
|
|
13
13
|
houseSystemName?: string;
|
|
14
14
|
timestamp?: Date;
|
|
15
15
|
location?: string;
|
|
16
|
-
chartType?: 'natal' | 'event' | 'transit';
|
|
16
|
+
chartType?: 'natal' | 'event' | 'transit' | 'composite';
|
|
17
|
+
compositeSource?: {
|
|
18
|
+
chartNames: [string, string];
|
|
19
|
+
method: 'midpoint';
|
|
20
|
+
};
|
|
17
21
|
}
|
|
18
22
|
export type MultiChartData = ChartData[];
|
|
19
23
|
export declare function isMultiChartData(obj: ChartData | MultiChartData): obj is MultiChartData;
|
|
@@ -184,6 +188,7 @@ export interface GroupingSettings {
|
|
|
184
188
|
export interface FormattingSettings {
|
|
185
189
|
dateFormat?: string;
|
|
186
190
|
houseSystemName?: string;
|
|
191
|
+
outputMode?: 'standard' | 'composite';
|
|
187
192
|
}
|
|
188
193
|
export interface Settings extends AnalysisSettings, GroupingSettings, FormattingSettings {
|
|
189
194
|
}
|
package/dist/utils/validation.js
CHANGED
|
@@ -122,7 +122,7 @@ function validateChartData(chartData) {
|
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
if (chartData.chartType !== undefined) {
|
|
125
|
-
const validTypes = ['natal', 'event', 'transit'];
|
|
125
|
+
const validTypes = ['natal', 'event', 'transit', 'composite'];
|
|
126
126
|
if (!validTypes.includes(chartData.chartType)) {
|
|
127
127
|
return `Chart type must be one of: ${validTypes.join(', ')}`;
|
|
128
128
|
}
|