@roxyapi/ui 0.25.0 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +3 -1
- package/README.md +9 -1
- package/components-catalog.json +125 -125
- package/dist/cdn/components/endpoint-form.js +1 -1
- package/dist/cdn/components/endpoint-form.js.map +1 -1
- package/dist/cdn/components/natal-chart.js.map +2 -2
- package/dist/cdn/components/relocation-wheel.js.map +2 -2
- package/dist/cdn/components/transit-wheel.js +12 -12
- package/dist/cdn/components/transit-wheel.js.map +3 -3
- package/dist/cdn/locales/de.js +1 -1
- package/dist/cdn/locales/de.js.map +2 -2
- package/dist/cdn/locales/es.js +1 -1
- package/dist/cdn/locales/es.js.map +2 -2
- package/dist/cdn/locales/fr.js +1 -1
- package/dist/cdn/locales/fr.js.map +2 -2
- package/dist/cdn/locales/hi.js +1 -1
- package/dist/cdn/locales/hi.js.map +2 -2
- package/dist/cdn/locales/pt.js +1 -1
- package/dist/cdn/locales/pt.js.map +2 -2
- package/dist/cdn/locales/ru.js +1 -1
- package/dist/cdn/locales/ru.js.map +2 -2
- package/dist/cdn/locales/tr.js +1 -1
- package/dist/cdn/locales/tr.js.map +2 -2
- package/dist/cdn/roxy-ui.js +17 -17
- package/dist/cdn/roxy-ui.js.map +3 -3
- package/dist/components/endpoint-form.js +1 -1
- package/dist/components/endpoint-form.js.map +1 -1
- package/dist/components/natal-chart.d.ts +4 -0
- package/dist/components/natal-chart.d.ts.map +1 -1
- package/dist/components/natal-chart.js.map +2 -2
- package/dist/components/relocation-wheel.js.map +2 -2
- package/dist/components/transit-wheel.d.ts +79 -37
- package/dist/components/transit-wheel.d.ts.map +1 -1
- package/dist/components/transit-wheel.js +11 -11
- package/dist/components/transit-wheel.js.map +3 -3
- package/dist/i18n/chrome-strings.d.ts +1 -1
- package/dist/i18n/chrome-strings.d.ts.map +1 -1
- package/dist/index.cjs +5 -5
- package/dist/index.cjs.map +3 -3
- package/dist/index.js +5 -5
- package/dist/index.js.map +3 -3
- package/dist/locales/de.d.ts.map +1 -1
- package/dist/locales/de.js +1 -1
- package/dist/locales/de.js.map +2 -2
- package/dist/locales/es.d.ts.map +1 -1
- package/dist/locales/es.js +1 -1
- package/dist/locales/es.js.map +2 -2
- package/dist/locales/fr.d.ts.map +1 -1
- package/dist/locales/fr.js +1 -1
- package/dist/locales/fr.js.map +2 -2
- package/dist/locales/hi.d.ts.map +1 -1
- package/dist/locales/hi.js +1 -1
- package/dist/locales/hi.js.map +2 -2
- package/dist/locales/pt.d.ts.map +1 -1
- package/dist/locales/pt.js +1 -1
- package/dist/locales/pt.js.map +2 -2
- package/dist/locales/ru.d.ts.map +1 -1
- package/dist/locales/ru.js +1 -1
- package/dist/locales/ru.js.map +2 -2
- package/dist/locales/tr.d.ts.map +1 -1
- package/dist/locales/tr.js +1 -1
- package/dist/locales/tr.js.map +2 -2
- package/dist/types/types.gen.d.ts +46 -0
- package/dist/types/types.gen.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/natal-chart.ts +11 -1
- package/src/components/transit-wheel.ts +115 -49
- package/src/i18n/chrome-strings.ts +1 -0
- package/src/locales/de.ts +1 -0
- package/src/locales/es.ts +2 -0
- package/src/locales/fr.ts +1 -0
- package/src/locales/hi.ts +1 -0
- package/src/locales/pt.ts +1 -0
- package/src/locales/ru.ts +1 -0
- package/src/locales/tr.ts +1 -0
- package/src/types/types.gen.ts +46 -0
- package/src/version.ts +1 -1
|
@@ -25,46 +25,58 @@ import { RoxyDataElement } from '../utils/base-element.js';
|
|
|
25
25
|
* missing House column for months. The numbers are rendered, in their own
|
|
26
26
|
* columns, labelled with the system the response names.
|
|
27
27
|
*
|
|
28
|
-
* **
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
28
|
+
* **The GEOMETRY arrived next, and the wheel now draws itself.** The response also
|
|
29
|
+
* carries the twelve natal cusps as `houses` and the natal `ascendant`, the same
|
|
30
|
+
* twelve the house numbers above were read against, so the sector ring and the
|
|
31
|
+
* real horizon come out of the one call the page already made. That closed the
|
|
32
|
+
* house-less bi-wheel every embed drew through WordPress, /embed and the CDN
|
|
33
|
+
* widgets, none of which can compose a second call. {@link RoxyTransitWheel.houses}
|
|
34
|
+
* and {@link RoxyTransitWheel.ascendant} remain as OVERRIDES and keep winning
|
|
35
|
+
* where a page sets them, which is what a stored response predating the fields,
|
|
36
|
+
* or a trimming proxy, needs.
|
|
37
|
+
*
|
|
38
|
+
* **Nothing is ever derived, whichever source it came from.** A payload with
|
|
39
|
+
* neither field still fixes 0 degrees Aries on the left horizon, says so in the
|
|
40
|
+
* legend and in the SVG description rather than leaving a reader to discover it,
|
|
41
|
+
* and draws no house divisions at all. Equal sectors derived from an Ascendant
|
|
42
|
+
* and labelled with a quadrant system would replace one false statement with a
|
|
43
|
+
* worse one. Every cusp on this wheel is a longitude some source stated, placed
|
|
44
|
+
* on a circle, never one this component worked out.
|
|
39
45
|
*/
|
|
40
46
|
export declare class RoxyTransitWheel extends RoxyDataElement<CalculateTransitAspectsResponse> {
|
|
41
47
|
static styles: import("lit").CSSResult[];
|
|
42
48
|
/** Heading above the wheel. The default is translated; a heading the page sets is passed through the catalogue too, so a host that supplies its own English wording still gets it localized when one is registered for it. */
|
|
43
49
|
heading: string;
|
|
44
50
|
/**
|
|
45
|
-
* Natal Ascendant as an ecliptic longitude in degrees (0-360),
|
|
46
|
-
*
|
|
51
|
+
* Natal Ascendant as an ecliptic longitude in degrees (0-360), to override the
|
|
52
|
+
* one the response carries.
|
|
47
53
|
*
|
|
48
54
|
* @remarks
|
|
49
|
-
* /astrology/transit-aspects
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
+
* Leave it unset on a live /astrology/transit-aspects response: that endpoint
|
|
56
|
+
* returns the natal `ascendant` and the wheel reads it, so the horizon is
|
|
57
|
+
* right with no page wiring at all. Set it only to orient the wheel on a
|
|
58
|
+
* DIFFERENT horizon than the response describes, or to give one to a payload
|
|
59
|
+
* that carries none. Either way it ROTATES the wheel so the given longitude
|
|
60
|
+
* falls on the left horizon and draws the ASC/DSC axis. It draws no house
|
|
61
|
+
* divisions, because a rotation is not a cusp; that is what
|
|
62
|
+
* {@link RoxyTransitWheel.houses} is for. With neither the prop nor a payload
|
|
63
|
+
* ascendant the wheel falls back to the honest default: 0 degrees Aries on
|
|
64
|
+
* the left.
|
|
55
65
|
*/
|
|
56
66
|
ascendant?: number;
|
|
57
67
|
/**
|
|
58
|
-
* The twelve natal house cusps,
|
|
59
|
-
* /astrology/natal-chart `houses` array verbatim, or twelve bare
|
|
60
|
-
* longitudes in house order.
|
|
68
|
+
* The twelve natal house cusps, to override the ones the response carries.
|
|
69
|
+
* Takes the /astrology/natal-chart `houses` array verbatim, or twelve bare
|
|
70
|
+
* cusp longitudes in house order.
|
|
61
71
|
*
|
|
62
72
|
* @remarks
|
|
63
|
-
* /astrology/transit-aspects
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
73
|
+
* Leave it unset on a live /astrology/transit-aspects response: that endpoint
|
|
74
|
+
* returns the same twelve natal cusps its house numbers are read against, so
|
|
75
|
+
* the sector ring draws itself. Set it to draw a different cusp set than the
|
|
76
|
+
* response carries, or to give one to a payload that carries none (a stored
|
|
77
|
+
* response predating the field, or a proxy that trims it). Supplying either
|
|
78
|
+
* source draws the twelve cusp lines and their numbers and, unless an
|
|
79
|
+
* ascendant is also available, rotates the first cusp onto the left horizon.
|
|
68
80
|
*
|
|
69
81
|
* Both accepted shapes exist because the natural source is a natal-chart
|
|
70
82
|
* response a host already holds, and passing `chart.houses` straight through
|
|
@@ -75,17 +87,36 @@ export declare class RoxyTransitWheel extends RoxyDataElement<CalculateTransitAs
|
|
|
75
87
|
* ring is a claim about placements the wheel cannot support.
|
|
76
88
|
*/
|
|
77
89
|
houses?: NatalChartResponse['houses'] | number[];
|
|
78
|
-
/**
|
|
90
|
+
/** The response widened to the natal frame it carries. One cast, so nothing below repeats it. */
|
|
91
|
+
private get payload();
|
|
92
|
+
/**
|
|
93
|
+
* The Ascendant longitude the wheel orients on, or undefined.
|
|
94
|
+
*
|
|
95
|
+
* @remarks
|
|
96
|
+
* The PROP wins over the payload wherever both exist: a page that passes one
|
|
97
|
+
* has said something the response cannot know, and silently preferring the
|
|
98
|
+
* response would make the prop dead on exactly the responses that carry the
|
|
99
|
+
* field.
|
|
100
|
+
*/
|
|
101
|
+
private get effectiveAscendant();
|
|
102
|
+
/** True when an ascendant is available at all, so the ASC/DSC axis is a real horizon rather than one derived from a cusp. */
|
|
79
103
|
private get ascendantGiven();
|
|
104
|
+
/** True when the sector ring came from the page rather than from the response, so the legend can say which. */
|
|
105
|
+
private get cuspsFromPage();
|
|
80
106
|
/**
|
|
81
|
-
* The
|
|
107
|
+
* The cusps to draw, normalized to houses 1 to 12 in order, or null. The prop
|
|
108
|
+
* first, then the ones the response carries, on the same precedence rule as
|
|
109
|
+
* {@link RoxyTransitWheel.effectiveAscendant}.
|
|
82
110
|
*
|
|
83
111
|
* @remarks
|
|
84
112
|
* Sorted by house number rather than trusted in array order, and rejected
|
|
85
113
|
* whole unless the twelve numbers are exactly 1 to 12 with finite longitudes.
|
|
86
114
|
* A cusp set that fails either check is not a house division, and drawing part
|
|
87
115
|
* of one would put a sector boundary where the host never claimed there was
|
|
88
|
-
* one.
|
|
116
|
+
* one. A malformed PROP is rejected outright rather than falling through to
|
|
117
|
+
* the payload: the page overrode the response on purpose, and quietly drawing
|
|
118
|
+
* the response cusps under a bad override would be a different chart than
|
|
119
|
+
* either source asked for.
|
|
89
120
|
*/
|
|
90
121
|
private get cusps();
|
|
91
122
|
/**
|
|
@@ -108,15 +139,25 @@ export declare class RoxyTransitWheel extends RoxyDataElement<CalculateTransitAs
|
|
|
108
139
|
* its accessible text cannot end up claiming different orientations.
|
|
109
140
|
*/
|
|
110
141
|
private get orientationCaption();
|
|
111
|
-
/**
|
|
142
|
+
/**
|
|
143
|
+
* Whether the twelve sectors on the wheel are real cusps, in words, and where
|
|
144
|
+
* they came from. Same dual use as {@link RoxyTransitWheel.orientationCaption}.
|
|
145
|
+
*
|
|
146
|
+
* @remarks
|
|
147
|
+
* The source is named because the caption is provenance: a reader
|
|
148
|
+
* reconciling this wheel against another calculator needs to know whether the
|
|
149
|
+
* cusps are the ones the endpoint computed the house numbers against, or a set
|
|
150
|
+
* the page substituted for them.
|
|
151
|
+
*/
|
|
112
152
|
private get cuspCaption();
|
|
113
153
|
private renderWheel;
|
|
114
154
|
/** A short mark every 5 degrees and a longer one on each sign cusp, so the band reads as a degree scale rather than a bare ring. */
|
|
115
155
|
private renderTicks;
|
|
116
|
-
/** Twelve sign boundaries, drawn from the inner ring outward. Solid, and always exactly 30 degrees apart: house cusps are the dashed lines from {@link RoxyTransitWheel.renderHouses} and only exist when
|
|
156
|
+
/** Twelve sign boundaries, drawn from the inner ring outward. Solid, and always exactly 30 degrees apart: house cusps are the dashed lines from {@link RoxyTransitWheel.renderHouses} and only exist when a cusp set is available. */
|
|
117
157
|
private renderSpokes;
|
|
118
158
|
/**
|
|
119
|
-
* The twelve house sectors, drawn ONLY from cusps the
|
|
159
|
+
* The twelve house sectors, drawn ONLY from cusps some source stated: the ones
|
|
160
|
+
* the response carries, or the {@link RoxyTransitWheel.houses} override.
|
|
120
161
|
*
|
|
121
162
|
* @remarks
|
|
122
163
|
* Dashed and inset to the sign band, because the solid spokes beside them are
|
|
@@ -125,7 +166,7 @@ export declare class RoxyTransitWheel extends RoxyDataElement<CalculateTransitAs
|
|
|
125
166
|
* of its own sector, so an unequal house carries its label inside itself; the
|
|
126
167
|
* hub is the one band on this wheel with nothing else in it.
|
|
127
168
|
*
|
|
128
|
-
* Nothing here is derived. With no cusps
|
|
169
|
+
* Nothing here is derived. With no cusps available this renders nothing at all
|
|
129
170
|
* rather than twelve equal sectors from the Ascendant, which would be a
|
|
130
171
|
* different chart wearing the same label.
|
|
131
172
|
*
|
|
@@ -161,8 +202,9 @@ export declare class RoxyTransitWheel extends RoxyDataElement<CalculateTransitAs
|
|
|
161
202
|
/** One line per returned aspect, from the transiting body on the outer ring to the natal body on the inner one. */
|
|
162
203
|
private renderAspectLines;
|
|
163
204
|
/**
|
|
164
|
-
* ASC and DSC ticks, drawn ONLY when
|
|
165
|
-
* is derived: the descendant is the exact
|
|
205
|
+
* ASC and DSC ticks, drawn ONLY when an ascendant is available, from the prop
|
|
206
|
+
* or from the response. Nothing is derived: the descendant is the exact
|
|
207
|
+
* opposite point of that value.
|
|
166
208
|
*
|
|
167
209
|
* Gated on the ascendant alone, never on the cusps. Under whole-sign the first
|
|
168
210
|
* cusp is 0 degrees of the rising sign rather than the Ascendant, so labelling
|
|
@@ -191,7 +233,7 @@ export declare class RoxyTransitWheel extends RoxyDataElement<CalculateTransitAs
|
|
|
191
233
|
*
|
|
192
234
|
* @remarks
|
|
193
235
|
* The House columns are where the response's house numbers land, because the
|
|
194
|
-
* wheel has no sectors to put them in unless
|
|
236
|
+
* wheel has no sectors to put them in unless a cusp set is available. Both
|
|
195
237
|
* columns are read against the NATAL cusps: the transiting one is the natal
|
|
196
238
|
* house that body is currently passing through, which is the whole point of a
|
|
197
239
|
* transit report and is why the two are not the same fact under one heading.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transit-wheel.d.ts","sourceRoot":"","sources":["../../src/components/transit-wheel.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACX,+BAA+B,EAC/B,kBAAkB,EAClB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"transit-wheel.d.ts","sourceRoot":"","sources":["../../src/components/transit-wheel.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACX,+BAA+B,EAC/B,kBAAkB,EAClB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAgH3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,qBACa,gBAAiB,SAAQ,eAAe,CAAC,+BAA+B,CAAC;IACrF,MAAM,CAAC,MAAM,4BAuTX;IAEF,8NAA8N;IAE9N,OAAO,SAAc;IAErB;;;;;;;;;;;;;;;OAeG;IAEH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;;;;;;;;;;;;;;;;;OAqBG;IAEH,MAAM,CAAC,EAAE,kBAAkB,CAAC,QAAQ,CAAC,GAAG,MAAM,EAAE,CAAC;IAEjD,iGAAiG;IACjG,OAAO,KAAK,OAAO,GAElB;IAED;;;;;;;;OAQG;IACH,OAAO,KAAK,kBAAkB,GAK7B;IAED,6HAA6H;IAC7H,OAAO,KAAK,cAAc,GAEzB;IAED,+GAA+G;IAC/G,OAAO,KAAK,aAAa,GAExB;IAED;;;;;;;;;;;;;;OAcG;IACH,OAAO,KAAK,KAAK,GAchB;IAED;;;;;;;;;;OAUG;IACH,OAAO,CAAC,OAAO;IAKf,SAAS,CAAC,WAAW;IAIrB,SAAS,CAAC,UAAU,CAAC,CAAC,EAAE,+BAA+B;IAsCvD;;;;OAIG;IACH,OAAO,KAAK,kBAAkB,GAI7B;IAED;;;;;;;;;OASG;IACH,OAAO,KAAK,WAAW,GAKtB;IAED,OAAO,CAAC,WAAW;IA6BnB,oIAAoI;IACpI,OAAO,CAAC,WAAW;IAmBnB,sOAAsO;IACtO,OAAO,CAAC,YAAY;IASpB;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,OAAO,CAAC,YAAY;IAuBpB,OAAO,CAAC,WAAW;IAYnB;;;;;;;;;;;;;;;;OAgBG;IACH,OAAO,CAAC,UAAU;IAqDlB,mHAAmH;IACnH,OAAO,CAAC,iBAAiB;IAmCzB;;;;;;;;OAQG;IACH,OAAO,CAAC,UAAU;IAelB;;;;;;;;;;OAUG;IACH,OAAO,CAAC,YAAY;IAqBpB,oHAAoH;IACpH,OAAO,CAAC,aAAa;IAqBrB,gIAAgI;IAChI,OAAO,CAAC,eAAe;IAYvB;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,eAAe;IAwDvB;;;;;OAKG;IACH,OAAO,CAAC,cAAc;CA6BtB;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,oBAAoB,EAAE,gBAAgB,CAAC;KACvC;CACD"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
var It=Object.defineProperty;var zt=Object.getOwnPropertyDescriptor;var m=(i,e,t,r)=>{for(var n=r>1?void 0:r?zt(e,t):e,s=i.length-1,o;s>=0;s--)(o=i[s])&&(n=(r?o(e,t,n):o(n))||n);return r&&n&&It(e,t,n),n};import{css as Jt,html as d,nothing as p,svg as w}from"lit";import{customElement as Xt,property as Y}from"lit/decorators.js";function E(i){return i.toLowerCase().replace(/[\s_-]+/g," ").trim()}function A(i){return i?i.charAt(0).toUpperCase()+i.slice(1).toLowerCase():""}var nt=(i,e)=>e?i[E(e)]:void 0,Pt={sun:"\u2609",moon:"\u263D",mercury:"\u263F",venus:"\u2640",earth:"\u2641",mars:"\u2642",jupiter:"\u2643",saturn:"\u2644",uranus:"\u2645",neptune:"\u2646",pluto:"\u2647",rahu:"\u260A",ketu:"\u260B",ascendant:"Asc",lagna:"La","north node":"\u260A","south node":"\u260B",chiron:"\u26B7",lilith:"\u26B8","black moon lilith":"\u26B8"},it=i=>nt(Pt,i);var Bt={aries:"\u2648",taurus:"\u2649",gemini:"\u264A",cancer:"\u264B",leo:"\u264C",virgo:"\u264D",libra:"\u264E",scorpio:"\u264F",sagittarius:"\u2650",capricorn:"\u2651",aquarius:"\u2652",pisces:"\u2653"},D=i=>nt(Bt,i);var L=["Aries","Taurus","Gemini","Cancer","Leo","Virgo","Libra","Scorpio","Sagittarius","Capricorn","Aquarius","Pisces"];import{html as v,LitElement as jt,nothing as Ht}from"lit";import{property as b,state as C}from"lit/decorators.js";import{ifDefined as K}from"lit/directives/if-defined.js";function st(i){if(i.lang)return i.lang;if(typeof document>"u")return;let e=i.closest?.("[lang]")?.getAttribute("lang");return e||document.documentElement.lang||void 0}var ot="__ROXY_UI_I18N__";function lt(){let i=globalThis,e=i[ot];if(e)return e;let t={catalogs:{},listeners:new Set};return i[ot]=t,t}function at(i,e){return e?i.replace(/\{\{(\w+)\}\}/g,(t,r)=>r in e?String(e[r]??""):t):i}function ct(i,e,t){if(!i)return at(e,t);let{catalogs:r}=lt(),n=i.toLowerCase(),s=r[n]??r[n.split("-")[0]];return at(s?.[E(e)]??e,t)}function dt(i){let{listeners:e}=lt();return e.add(i),()=>{e.delete(i)}}var _=class{constructor(e){this.host=e,e.addController(this)}hostConnected(){this.unsubscribe=dt(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};import{css as Kt}from"lit";var I=Kt`:host{font-family:var(--roxy-font-sans,system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-base,1rem);line-height:var(--roxy-leading-normal,1.5);animation:roxy-fade-in var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,cubic-bezier(.4, 0, .2, 1)) both;background:0 0;display:block;container-type:inline-size}:host([bare]){--roxy-surface:transparent;--roxy-shadow-sm:none;--roxy-shadow-md:none}*,:before,:after{box-sizing:border-box}h1,h2,h3,h4{font-family:var(--roxy-font-display,var(--roxy-font-sans,system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif))}@keyframes roxy-fade-in{0%{opacity:0;transform:translateY(2px)}to{opacity:1;transform:translateY(0)}}@media (prefers-reduced-motion:reduce){:host{animation:none}}.roxy-skeleton{background:linear-gradient(90deg, var(--roxy-border,#e4e4e7) 0%, color-mix(in srgb, var(--roxy-border,#e4e4e7) 60%, transparent) 50%, var(--roxy-border,#e4e4e7) 100%);border-radius:var(--roxy-radius-md,8px);background-size:200% 100%;animation:1.4s ease-in-out infinite roxy-shimmer}@keyframes roxy-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media (prefers-reduced-motion:reduce){.roxy-skeleton{animation:none}}.roxy-sr-only{clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:0;padding:0;position:absolute;overflow:hidden}.roxy-empty{padding:var(--roxy-space-lg,1.5rem);color:var(--roxy-muted,#71717a);text-align:center;font-size:var(--roxy-text-sm,.875rem)}.roxy-error{gap:var(--roxy-space-sm,.5rem);padding:var(--roxy-space-lg,1.5rem);background:var(--roxy-surface,#fff);border:1px solid var(--roxy-danger,#dc2626);border-radius:var(--roxy-radius-md,8px);color:var(--roxy-danger-fg,#991b1b);font-size:var(--roxy-text-sm,.875rem);justify-items:start;display:grid}.roxy-surface{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a)}:host(:focus-within) .roxy-card{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}.roxy-attribution{margin-top:var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-align:right}.roxy-attribution a{color:inherit;text-decoration:none}.roxy-attribution a:hover{color:var(--roxy-accent-ink,#b45309);text-decoration:underline}.roxy-attribution a:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}.roxy-edit-bar{margin-bottom:var(--roxy-space-sm,.5rem);justify-content:flex-end;display:flex}.roxy-edit{padding:var(--roxy-space-xs,.25rem) var(--roxy-space-md,1rem);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);color:var(--roxy-fg,#0a0a0a);font-family:inherit;font-size:var(--roxy-text-sm,.875rem);cursor:pointer;background:0 0}.roxy-edit:hover{border-color:var(--roxy-accent,#f59e0b);color:var(--roxy-accent-ink,#b45309)}.roxy-edit:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}:host{font-variant-emoji:text}`;var z="Client-side components accept a pk_ publishable key only. Use a publishable key with an origin allowlist, or render server-side.";function ut(i){return!!i&&!i.startsWith("pk_")}function pt(i,e={}){e.warn&&console.warn(z),i.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:"possible-secret-key",message:z},bubbles:!0,composed:!0}))}var Mt="https://roxyapi.com/api/v2",P=class{constructor(e){this.baseUrl=Mt;this.host=e,e.addController(this)}hostDisconnected(){this.abort?.abort(),this.abort=void 0}async run(e){if(!this.submitUrl&&this.secretKeyRefused())return;this.abort?.abort();let t=new AbortController;this.abort=t,this.host.loading=!0,this.host.error=null;try{let r=this.submitUrl?await fetch(this.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(e),signal:t.signal}):await this.callApi(e,t.signal);if(!r.ok)throw new Error(await this.readError(r));let n=await r.json();if(t.signal.aborted)return;this.host.data=n}catch(r){if(r?.name==="AbortError")return;this.host.error=r instanceof Error?r.message:String(r)}finally{this.abort===t&&(this.abort=void 0),t.signal.aborted||(this.host.loading=!1)}}callApi(e,t){let r=new URL(`${this.baseUrl}${e.path}`);for(let[s,o]of Object.entries(e.query??{}))o!=null&&r.searchParams.set(s,String(o));let n={Accept:"application/json"};return this.publishableKey&&(n["X-API-Key"]=this.publishableKey),e.body!=null&&(n["Content-Type"]="application/json"),fetch(r,{method:e.method??"GET",headers:n,body:e.body!=null?JSON.stringify(e.body):void 0,signal:t})}secretKeyRefused(){return ut(this.publishableKey)?(this.host.error=z,pt(this.host),!0):!1}async readError(e){try{let t=await e.json();if(t?.error)return t.error}catch{}return`Request failed (${e.status})`}};function gt(i,e,t,r=[]){let n={...t},s=`/${i.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(u,c)=>{let x=n[c];return delete n[c],encodeURIComponent(String(x??""))}),o=new Set(r),l={},g={};for(let[u,c]of Object.entries(n))c===void 0||c===""||(e==="GET"||o.has(u)?l[u]=c:g[u]=c);return{path:s,method:e,query:l,body:e==="POST"?g:void 0}}import{css as Dt,html as F,nothing as O}from"lit";import{css as Gt,html as Ut}from"lit";function mt(){return Ut`<svg class="roxy-chevron" viewBox="0 0 16 16" width="14" height="14" aria-hidden="true"><path d="M4 6l4 4 4-4" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>`}var ht=Gt`summary{list-style:none}summary::-webkit-details-marker{display:none}.roxy-chevron{aspect-ratio:auto;width:14px;height:14px;color:var(--roxy-muted,#71717a);transition:transform var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,ease);flex-shrink:0}details[open]>summary .roxy-chevron{transform:rotate(180deg)}@media (prefers-reduced-motion:reduce){.roxy-chevron{transition:none}}`;var ft=Dt`.block{border-top:1px solid var(--roxy-border,#e4e4e7);padding-top:var(--roxy-space-md,1rem)}.block h3{margin:0 0 var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em}.interp-card{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);margin-bottom:var(--roxy-space-xs,.25rem)}.interp-card summary{cursor:pointer;color:var(--roxy-fg,#0a0a0a);align-items:center;gap:var(--roxy-space-sm,.5rem);font-weight:500;font-size:var(--roxy-text-sm,.875rem);display:flex}.interp-card summary:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px;border-radius:var(--roxy-radius-sm,4px)}.interp-lead{flex-wrap:wrap;flex:auto;order:1;align-items:baseline;gap:.4rem;min-width:0;display:inline-flex}.interp-aside{flex-shrink:0;order:2;align-items:center;gap:.5rem;display:inline-flex}.roxy-chevron{order:3}.interp-aside small{color:var(--roxy-muted,#71717a);white-space:nowrap;font-weight:400}@container (width<=26rem){.interp-card summary{flex-wrap:wrap}.roxy-chevron{order:2}.interp-aside{flex-basis:100%;order:3;justify-content:flex-end}}.interp-body{margin-top:var(--roxy-space-sm,.5rem);gap:var(--roxy-space-sm,.5rem);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);overflow-wrap:anywhere;line-height:1.6;display:grid}.interp-body p{margin:0}`;function yt(i,e,t="Reading"){let r=i.filter(n=>!!n.body);return r.length===0?O:F`<section class="block" part="section readings"><h3>${t}</h3>${r.map((n,s)=>F`<details class="interp-card" part="reading" name="${e}" ?open="${s===0}"><summary><span class="interp-lead">${n.label}</span> ${mt()} ${n.aside?F`<span class="interp-aside"><small>${n.aside}</small></span>`:O}</summary><div class="interp-body"><p>${n.body}</p>${n.extra??O}</div></details>`)}</section>`}var Ft="roxy-data";function Ot(i){return i.nodeName==="SCRIPT"&&i.getAttribute("type")==="application/json"}var B=class{constructor(e){this.host=e,e.addController(this)}hostConnected(){if(this.host.data!=null)return;let e=this.read();e!==void 0&&(this.host.data=e,this.host.requestUpdate())}read(){let e=this.findInlineScript();return e?this.parse(e.textContent):void 0}findInlineScript(){for(let e of Array.from(this.host.children))if(Ot(e)&&e.classList.contains(Ft))return e;return null}parse(e){if(e?.trim())try{return JSON.parse(e)}catch{return}}};var h=class extends jt{constructor(){super();this.data=null;this.endpoint="";this.method="POST";this.remember=!1;this.hideReadings=!1;this.loading=!1;this.error=null;this.selfFetched=!1;this.editing=!1;this.sticky=!1;this.translator=(t,r)=>this.t(t,r);this.onEdit=()=>{this.editing=!0};this.onFormSubmit=t=>{let r=t.detail;this.lastValues=r.values,this.sticky=!!r.sticky,this.selfFetched=!0,this.editing=!1,this.remember&&this.writeRemembered(r.values),this.fetcher.run(gt(this.endpoint,this.method,r.values,r.queryKeys??[]))};new B(this),new _(this),this.fetcher=new P(this)}static{this.styles=[I]}t(t,r){return ct(this.effectiveLang(),t,r)}willUpdate(t){t.has("publishableKey")&&(this.fetcher.publishableKey=this.publishableKey),t.has("baseUrl")&&this.baseUrl&&(this.fetcher.baseUrl=this.baseUrl),t.has("submitUrl")&&(this.fetcher.submitUrl=this.submitUrl)}render(){return this.loading?this.renderLoading():this.error!=null?this.renderError(this.error):this.data!=null?this.selfFetched?this.editing?this.renderForm():this.renderResult(this.data):this.showAttribution()?v`${this.renderData(this.data)}${this.renderAttribution()}`:this.renderData(this.data):this.renderNoData()}renderInterpretation(t,r,n){return this.hideReadings?Ht:yt(t,r,n??this.t("Reading"))}renderResult(t){let r=this.sticky?v`${this.renderForm()}${this.renderData(t)}`:v`<div class="roxy-edit-bar" part="edit-bar"><button type="button" class="roxy-edit" @click="${this.onEdit}">${this.t("Edit query")}</button></div>${this.renderData(t)}`;return this.showAttribution()?v`${r}${this.renderAttribution()}`:r}showAttribution(){return this.attribution!=null&&this.attribution!=="off"&&this.attribution!=="false"}renderAttribution(){return v`<div class="roxy-attribution" part="attribution"><a href="https://roxyapi.com/?utm_source=widget&utm_medium=embed" target="_blank" rel="noopener">${this.t("Spiritual data by RoxyAPI")}</a></div>`}renderNoData(){return this.endpoint?this.renderForm():this.renderEmpty()}renderForm(){return v`<roxy-endpoint-form part="form" data-endpoint="${this.endpoint}" method="${this.method}" spec-url="${K(this.specUrl)}" publishable-key="${K(this.publishableKey)}" submit-label="${K(this.submitLabel)}" lang="${K(this.effectiveLang())}" .initialValues="${this.formInitialValues()}" @roxy-submit="${this.onFormSubmit}"></roxy-endpoint-form>`}formInitialValues(){return this.lastValues??(this.remember?this.readRemembered():void 0)}effectiveLang(){return st(this)}rememberKey(){return`roxy-ui:form:${this.endpoint}`}readRemembered(){try{let t=sessionStorage.getItem(this.rememberKey());return t?JSON.parse(t):void 0}catch{return}}writeRemembered(t){try{sessionStorage.setItem(this.rememberKey(),JSON.stringify(t))}catch{}}renderEmpty(){return v`<div class="roxy-empty" role="status">${this.t("No data")}</div>`}renderLoading(){return v`<div class="roxy-skeleton" style="height:8rem" role="status" aria-label="${this.t("Loading")}" part="loading"></div>`}renderError(t){let r=v`<div class="roxy-error" role="alert" part="error">${t}</div>`;return this.endpoint?v`${r}${this.renderForm()}`:r}};m([b({attribute:!1})],h.prototype,"data",2),m([b({type:String,attribute:"data-endpoint"})],h.prototype,"endpoint",2),m([b({type:String})],h.prototype,"method",2),m([b({type:String,attribute:"publishable-key"})],h.prototype,"publishableKey",2),m([b({type:String,attribute:"base-url"})],h.prototype,"baseUrl",2),m([b({type:String,attribute:"spec-url"})],h.prototype,"specUrl",2),m([b({type:String,attribute:"submit-url"})],h.prototype,"submitUrl",2),m([b({type:Boolean})],h.prototype,"remember",2),m([b({type:Boolean,attribute:"hide-readings",reflect:!0})],h.prototype,"hideReadings",2),m([b({type:String,attribute:"submit-label"})],h.prototype,"submitLabel",2),m([b({type:String})],h.prototype,"attribution",2),m([C()],h.prototype,"loading",2),m([C()],h.prototype,"error",2),m([C()],h.prototype,"selfFetched",2),m([C()],h.prototype,"editing",2),m([C()],h.prototype,"sticky",2);function k(i){let e=i%360;return e<0?e+360:e}function j(i){let e=k(i),t=Math.floor(e/30)%12,r=e%30,n=Math.floor(r),s=(r-n)*60,o=Math.floor(s),l=Math.round((s-o)*60);return{sign:L[t]??"Aries",signIndex:t,degree:n,minute:o,second:l}}function xt(i){return k(i+180)}function bt(i,e){let t=k(i),r=k(e)-t;return r<0&&(r+=360),k(t+r/2)}function vt(i,e,t){let r=i.filter(s=>Number.isFinite(e(s))).map(s=>{let o=k(e(s));return{item:s,longitude:o,displayLongitude:o}}).sort((s,o)=>s.longitude-o.longitude);for(let s=1;s<r.length;s++){let o=r[s-1],l=r[s];if(!o||!l)continue;let g=o.displayLongitude+t;l.displayLongitude<g&&(l.displayLongitude=g)}let n=r[r.length-1];if(n&&n.displayLongitude>360){let s=n.displayLongitude-360;for(let o of r)o.displayLongitude-=s}return r}function H(i,e){return e>0?i/e*(180/Math.PI):0}function f(i,e,t,r){let n=r*Math.PI/180;return{x:i+t*Math.cos(n),y:e+t*Math.sin(n)}}var q=/^\d{4}-\d{2}-\d{2}$/,wt=/^\d{2}:\d{2}(:\d{2})?$/,qt=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2}(\.\d+)?)?$/,$t=new Map;function kt(i){if(!i)return["en"];let e=$t.get(i);if(e)return[e,"en"];let t="en";try{t=Intl.getCanonicalLocales(i)[0]??"en"}catch{t="en"}return $t.set(i,t),[t,"en"]}function St(i){let e=wt.test(i)?`1970-01-01T${i}`:qt.test(i)?i:null;return e?{d:new Date(`${e}Z`),timeZone:"UTC"}:{d:new Date(i)}}function Vt(i,e){if(typeof e!="string"||e.length===0||q.test(e))return"";let{d:t,timeZone:r}=St(e);return Number.isNaN(t.getTime())?e:t.toLocaleTimeString(kt(i),{hour:"numeric",minute:"2-digit",timeZone:r})}function Yt(i,e){if(typeof e!="string"||e.length===0)return"";let{d:t,timeZone:r}=St(q.test(e)?`${e}T00:00:00`:e);return Number.isNaN(t.getTime())?e:t.toLocaleDateString(kt(i),{month:"short",day:"numeric",year:"numeric",timeZone:r})}function M(i,e=1){if(typeof i!="number"||!Number.isFinite(i))return"";let t=i.toFixed(e);return t.includes(".")?t.replace(/\.?0+$/,""):t}var At={conjunction:"aspect-conjunction",sextile:"aspect-sextile",square:"aspect-square",trine:"aspect-trine",opposition:"aspect-opposition"};function V(i){return(i.type??"").toLowerCase().trim().replace(/[\s_]+/g,"-")}function G(i){return A(V(i))}function Rt(i,e,t){let r=typeof e=="string"&&q.test(e)&&typeof t=="string"&&wt.test(t)?`${e}T${t}`:e,n=Yt(i,r),s=Vt(i,r);return n&&s?`${n}, ${s}`:n||s}var Zt="Localized";function y(i,e,t){let r=i,n=r?.[`${e}${Zt}`];if(typeof n=="string"&&n!=="")return n;if(t!==void 0)return t;let s=r?.[e];return typeof s=="string"?s:""}var X=400,a=X/2,Wt=184,N=170,Qt=154,Z=140,te=124,ee=135,re=94,ne=83,Tt=112,ie=104,J=70,se=58,oe=13,ae=15,le=8,ce=4,R=(i,e)=>it(i)??e,Lt=i=>{let e=j(i);return`${e.degree}\xB0${String(e.minute).padStart(2,"0")}'`},Ct=i=>typeof i=="number"&&Number.isFinite(i)?String(Math.round(i)):"",U=i=>{let e=new Map;for(let t of i)e.set(A(t.name),t);return e},S=class extends h{constructor(){super(...arguments);this.heading="Transits"}get ascendantGiven(){return typeof this.ascendant=="number"&&Number.isFinite(this.ascendant)}get cusps(){let t=this.houses;if(!Array.isArray(t)||t.length!==12)return null;let r=t.map((s,o)=>typeof s=="number"?{number:o+1,longitude:s}:{number:Number(s?.number),longitude:Number(s?.longitude)}).sort((s,o)=>s.number-o.number);return r.every((s,o)=>s.number===o+1&&Number.isFinite(s.longitude))?r:null}toAngle(t){return 180+(this.ascendantGiven?this.ascendant:this.cusps?.[0]?.longitude??0)-t}renderEmpty(){return d`<div class="roxy-empty" role="status">${this.t("No transit data")}</div>`}renderData(t){let r=t.natalPlanets??[],n=t.transitPlanets??[],s=t.aspects??[],o=Rt(this.effectiveLang(),t.transitDate),l=s.length>0?this.t("Aspects to the natal chart: {{count}}",{count:s.length}):"",g=[...r,...n].some(u=>Number.isFinite(u.house));return d`<div class="wrap" part="card" aria-label="${this.t("Natal and transit bi-wheel")}"><div class="head" part="header"><h2 class="title">${this.t(this.heading)}</h2>${o||l?d`<p class="subtitle">${[o,l].filter(Boolean).join(" \xB7 ")}</p>`:p}</div>${this.renderWheel(r,n,s)} ${this.renderLegend(r,n,s,g?t.houseSystem:void 0)} ${this.renderSummary(t.summary)} ${this.renderPositions(r,n,g)} ${this.renderReadings(s)}</div>`}get orientationCaption(){return this.ascendantGiven?this.t("Ascendant on the left horizon"):this.cusps?this.t("First house cusp on the left horizon"):this.t("Sign wheel, 0\xB0 Aries on the left")}get cuspCaption(){return this.cusps?this.t("House cusps supplied by the page"):this.t("No house cusps")}renderWheel(t,r,n){return d`<svg viewBox="0 0 ${X} ${X}" part="chart" role="img" aria-label="${this.t("Bi-wheel with natal bodies on the inner ring and transiting bodies on the outer ring")}"><title>${this.t("Natal and transit bi-wheel")}</title><desc>${this.t("Twelve zodiac sign segments around a circular wheel. Natal bodies sit at their ecliptic longitudes on the inner ring and transiting bodies on the outer ring, and each line joins a transiting body to the natal body it aspects.")} ${this.orientationCaption}. ${this.cuspCaption}.</desc><circle class="wheel-line" cx="${a}" cy="${a}" r="${N}" stroke-width="1.5"/><circle class="wheel-line" cx="${a}" cy="${a}" r="${Z}" stroke-width="0.8"/><circle class="wheel-line" cx="${a}" cy="${a}" r="${Tt}" stroke-width="0.6"/><circle class="wheel-line" cx="${a}" cy="${a}" r="${J}" stroke-width="0.5"/>${this.renderTicks()} ${this.renderSpokes()} ${this.renderSigns()} ${this.renderHouses()} ${this.renderAspectLines(t,r,n)} ${this.renderRing(t,re,ne,"natal-glyph",this.t("Natal"),1)} ${this.renderRing(r,te,ee,"transit-glyph",this.t("Transiting"),-1)} ${this.renderAxis()}</svg>`}renderTicks(){let t=[];for(let r=0;r<360;r+=5){let n=this.toAngle(r),s=r%30===0,o=f(a,a,s?Z:N-5,n),l=f(a,a,N,n);t.push(w`<line class=${s?"tick tick-major":"tick"} x1=${o.x} y1=${o.y} x2=${l.x} y2=${l.y} stroke-width=${s?1:.5} />`)}return t}renderSpokes(){return L.map((t,r)=>{let n=this.toAngle(r*30),s=f(a,a,J,n),o=f(a,a,N,n);return w`<line class="wheel-line" x1=${s.x} y1=${s.y} x2=${o.x} y2=${o.y} stroke-width="0.6" />`})}renderHouses(){let t=this.cusps;return t?t.map((r,n)=>{let s=t[(n+1)%12],o=this.toAngle(r.longitude),l=f(a,a,J,o),g=f(a,a,Z,o),u=f(a,a,se,this.toAngle(bt(r.longitude,s?.longitude??r.longitude+30)));return w`<g>
|
|
2
|
-
<line class="house-cusp" x1=${l.x} y1=${l.y} x2=${
|
|
3
|
-
<text class="house-num" x=${
|
|
4
|
-
</g>`}):
|
|
5
|
-
${_t?w`<line class=${`leader ${s}`} x1=${et.x} y1=${et.y} x2=${rt.x} y2=${rt.y} />`:
|
|
6
|
-
<text class=${s} x=${
|
|
7
|
-
<text class="planet-deg" x=${W.x} y=${W.y} text-anchor="middle" dominant-baseline="central">${Nt}${Q?w`<tspan class="retro"> ℞</tspan>`:
|
|
8
|
-
</g>`})}renderAspectLines(t,r,n){let s=
|
|
9
|
-
<line class="axis-tick" x1=${
|
|
10
|
-
<text class="axis-label" x=${
|
|
11
|
-
</g>`})}renderLegend(t,r,n,s){return
|
|
1
|
+
var It=Object.defineProperty;var zt=Object.getOwnPropertyDescriptor;var m=(i,e,t,r)=>{for(var n=r>1?void 0:r?zt(e,t):e,s=i.length-1,o;s>=0;s--)(o=i[s])&&(n=(r?o(e,t,n):o(n))||n);return r&&n&&It(e,t,n),n};import{css as Jt,html as u,nothing as g,svg as w}from"lit";import{customElement as Xt,property as Y}from"lit/decorators.js";function E(i){return i.toLowerCase().replace(/[\s_-]+/g," ").trim()}function A(i){return i?i.charAt(0).toUpperCase()+i.slice(1).toLowerCase():""}var nt=(i,e)=>e?i[E(e)]:void 0,Pt={sun:"\u2609",moon:"\u263D",mercury:"\u263F",venus:"\u2640",earth:"\u2641",mars:"\u2642",jupiter:"\u2643",saturn:"\u2644",uranus:"\u2645",neptune:"\u2646",pluto:"\u2647",rahu:"\u260A",ketu:"\u260B",ascendant:"Asc",lagna:"La","north node":"\u260A","south node":"\u260B",chiron:"\u26B7",lilith:"\u26B8","black moon lilith":"\u26B8"},it=i=>nt(Pt,i);var Bt={aries:"\u2648",taurus:"\u2649",gemini:"\u264A",cancer:"\u264B",leo:"\u264C",virgo:"\u264D",libra:"\u264E",scorpio:"\u264F",sagittarius:"\u2650",capricorn:"\u2651",aquarius:"\u2652",pisces:"\u2653"},G=i=>nt(Bt,i);var L=["Aries","Taurus","Gemini","Cancer","Leo","Virgo","Libra","Scorpio","Sagittarius","Capricorn","Aquarius","Pisces"];import{html as v,LitElement as jt,nothing as Ht}from"lit";import{property as b,state as C}from"lit/decorators.js";import{ifDefined as K}from"lit/directives/if-defined.js";function st(i){if(i.lang)return i.lang;if(typeof document>"u")return;let e=i.closest?.("[lang]")?.getAttribute("lang");return e||document.documentElement.lang||void 0}var ot="__ROXY_UI_I18N__";function lt(){let i=globalThis,e=i[ot];if(e)return e;let t={catalogs:{},listeners:new Set};return i[ot]=t,t}function at(i,e){return e?i.replace(/\{\{(\w+)\}\}/g,(t,r)=>r in e?String(e[r]??""):t):i}function ct(i,e,t){if(!i)return at(e,t);let{catalogs:r}=lt(),n=i.toLowerCase(),s=r[n]??r[n.split("-")[0]];return at(s?.[E(e)]??e,t)}function dt(i){let{listeners:e}=lt();return e.add(i),()=>{e.delete(i)}}var _=class{constructor(e){this.host=e,e.addController(this)}hostConnected(){this.unsubscribe=dt(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};import{css as Kt}from"lit";var I=Kt`:host{font-family:var(--roxy-font-sans,system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-base,1rem);line-height:var(--roxy-leading-normal,1.5);animation:roxy-fade-in var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,cubic-bezier(.4, 0, .2, 1)) both;background:0 0;display:block;container-type:inline-size}:host([bare]){--roxy-surface:transparent;--roxy-shadow-sm:none;--roxy-shadow-md:none}*,:before,:after{box-sizing:border-box}h1,h2,h3,h4{font-family:var(--roxy-font-display,var(--roxy-font-sans,system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif))}@keyframes roxy-fade-in{0%{opacity:0;transform:translateY(2px)}to{opacity:1;transform:translateY(0)}}@media (prefers-reduced-motion:reduce){:host{animation:none}}.roxy-skeleton{background:linear-gradient(90deg, var(--roxy-border,#e4e4e7) 0%, color-mix(in srgb, var(--roxy-border,#e4e4e7) 60%, transparent) 50%, var(--roxy-border,#e4e4e7) 100%);border-radius:var(--roxy-radius-md,8px);background-size:200% 100%;animation:1.4s ease-in-out infinite roxy-shimmer}@keyframes roxy-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media (prefers-reduced-motion:reduce){.roxy-skeleton{animation:none}}.roxy-sr-only{clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:0;padding:0;position:absolute;overflow:hidden}.roxy-empty{padding:var(--roxy-space-lg,1.5rem);color:var(--roxy-muted,#71717a);text-align:center;font-size:var(--roxy-text-sm,.875rem)}.roxy-error{gap:var(--roxy-space-sm,.5rem);padding:var(--roxy-space-lg,1.5rem);background:var(--roxy-surface,#fff);border:1px solid var(--roxy-danger,#dc2626);border-radius:var(--roxy-radius-md,8px);color:var(--roxy-danger-fg,#991b1b);font-size:var(--roxy-text-sm,.875rem);justify-items:start;display:grid}.roxy-surface{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a)}:host(:focus-within) .roxy-card{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}.roxy-attribution{margin-top:var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-align:right}.roxy-attribution a{color:inherit;text-decoration:none}.roxy-attribution a:hover{color:var(--roxy-accent-ink,#b45309);text-decoration:underline}.roxy-attribution a:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}.roxy-edit-bar{margin-bottom:var(--roxy-space-sm,.5rem);justify-content:flex-end;display:flex}.roxy-edit{padding:var(--roxy-space-xs,.25rem) var(--roxy-space-md,1rem);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);color:var(--roxy-fg,#0a0a0a);font-family:inherit;font-size:var(--roxy-text-sm,.875rem);cursor:pointer;background:0 0}.roxy-edit:hover{border-color:var(--roxy-accent,#f59e0b);color:var(--roxy-accent-ink,#b45309)}.roxy-edit:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}:host{font-variant-emoji:text}`;var z="Client-side components accept a pk_ publishable key only. Use a publishable key with an origin allowlist, or render server-side.";function ut(i){return!!i&&!i.startsWith("pk_")}function pt(i,e={}){e.warn&&console.warn(z),i.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:"possible-secret-key",message:z},bubbles:!0,composed:!0}))}var Mt="https://roxyapi.com/api/v2",P=class{constructor(e){this.baseUrl=Mt;this.host=e,e.addController(this)}hostDisconnected(){this.abort?.abort(),this.abort=void 0}async run(e){if(!this.submitUrl&&this.secretKeyRefused())return;this.abort?.abort();let t=new AbortController;this.abort=t,this.host.loading=!0,this.host.error=null;try{let r=this.submitUrl?await fetch(this.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(e),signal:t.signal}):await this.callApi(e,t.signal);if(!r.ok)throw new Error(await this.readError(r));let n=await r.json();if(t.signal.aborted)return;this.host.data=n}catch(r){if(r?.name==="AbortError")return;this.host.error=r instanceof Error?r.message:String(r)}finally{this.abort===t&&(this.abort=void 0),t.signal.aborted||(this.host.loading=!1)}}callApi(e,t){let r=new URL(`${this.baseUrl}${e.path}`);for(let[s,o]of Object.entries(e.query??{}))o!=null&&r.searchParams.set(s,String(o));let n={Accept:"application/json"};return this.publishableKey&&(n["X-API-Key"]=this.publishableKey),e.body!=null&&(n["Content-Type"]="application/json"),fetch(r,{method:e.method??"GET",headers:n,body:e.body!=null?JSON.stringify(e.body):void 0,signal:t})}secretKeyRefused(){return ut(this.publishableKey)?(this.host.error=z,pt(this.host),!0):!1}async readError(e){try{let t=await e.json();if(t?.error)return t.error}catch{}return`Request failed (${e.status})`}};function gt(i,e,t,r=[]){let n={...t},s=`/${i.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(p,c)=>{let x=n[c];return delete n[c],encodeURIComponent(String(x??""))}),o=new Set(r),l={},d={};for(let[p,c]of Object.entries(n))c===void 0||c===""||(e==="GET"||o.has(p)?l[p]=c:d[p]=c);return{path:s,method:e,query:l,body:e==="POST"?d:void 0}}import{css as Gt,html as D,nothing as O}from"lit";import{css as Ut,html as Ft}from"lit";function mt(){return Ft`<svg class="roxy-chevron" viewBox="0 0 16 16" width="14" height="14" aria-hidden="true"><path d="M4 6l4 4 4-4" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>`}var ht=Ut`summary{list-style:none}summary::-webkit-details-marker{display:none}.roxy-chevron{aspect-ratio:auto;width:14px;height:14px;color:var(--roxy-muted,#71717a);transition:transform var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,ease);flex-shrink:0}details[open]>summary .roxy-chevron{transform:rotate(180deg)}@media (prefers-reduced-motion:reduce){.roxy-chevron{transition:none}}`;var ft=Gt`.block{border-top:1px solid var(--roxy-border,#e4e4e7);padding-top:var(--roxy-space-md,1rem)}.block h3{margin:0 0 var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em}.interp-card{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);margin-bottom:var(--roxy-space-xs,.25rem)}.interp-card summary{cursor:pointer;color:var(--roxy-fg,#0a0a0a);align-items:center;gap:var(--roxy-space-sm,.5rem);font-weight:500;font-size:var(--roxy-text-sm,.875rem);display:flex}.interp-card summary:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px;border-radius:var(--roxy-radius-sm,4px)}.interp-lead{flex-wrap:wrap;flex:auto;order:1;align-items:baseline;gap:.4rem;min-width:0;display:inline-flex}.interp-aside{flex-shrink:0;order:2;align-items:center;gap:.5rem;display:inline-flex}.roxy-chevron{order:3}.interp-aside small{color:var(--roxy-muted,#71717a);white-space:nowrap;font-weight:400}@container (width<=26rem){.interp-card summary{flex-wrap:wrap}.roxy-chevron{order:2}.interp-aside{flex-basis:100%;order:3;justify-content:flex-end}}.interp-body{margin-top:var(--roxy-space-sm,.5rem);gap:var(--roxy-space-sm,.5rem);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);overflow-wrap:anywhere;line-height:1.6;display:grid}.interp-body p{margin:0}`;function yt(i,e,t="Reading"){let r=i.filter(n=>!!n.body);return r.length===0?O:D`<section class="block" part="section readings"><h3>${t}</h3>${r.map((n,s)=>D`<details class="interp-card" part="reading" name="${e}" ?open="${s===0}"><summary><span class="interp-lead">${n.label}</span> ${mt()} ${n.aside?D`<span class="interp-aside"><small>${n.aside}</small></span>`:O}</summary><div class="interp-body"><p>${n.body}</p>${n.extra??O}</div></details>`)}</section>`}var Dt="roxy-data";function Ot(i){return i.nodeName==="SCRIPT"&&i.getAttribute("type")==="application/json"}var B=class{constructor(e){this.host=e,e.addController(this)}hostConnected(){if(this.host.data!=null)return;let e=this.read();e!==void 0&&(this.host.data=e,this.host.requestUpdate())}read(){let e=this.findInlineScript();return e?this.parse(e.textContent):void 0}findInlineScript(){for(let e of Array.from(this.host.children))if(Ot(e)&&e.classList.contains(Dt))return e;return null}parse(e){if(e?.trim())try{return JSON.parse(e)}catch{return}}};var h=class extends jt{constructor(){super();this.data=null;this.endpoint="";this.method="POST";this.remember=!1;this.hideReadings=!1;this.loading=!1;this.error=null;this.selfFetched=!1;this.editing=!1;this.sticky=!1;this.translator=(t,r)=>this.t(t,r);this.onEdit=()=>{this.editing=!0};this.onFormSubmit=t=>{let r=t.detail;this.lastValues=r.values,this.sticky=!!r.sticky,this.selfFetched=!0,this.editing=!1,this.remember&&this.writeRemembered(r.values),this.fetcher.run(gt(this.endpoint,this.method,r.values,r.queryKeys??[]))};new B(this),new _(this),this.fetcher=new P(this)}static{this.styles=[I]}t(t,r){return ct(this.effectiveLang(),t,r)}willUpdate(t){t.has("publishableKey")&&(this.fetcher.publishableKey=this.publishableKey),t.has("baseUrl")&&this.baseUrl&&(this.fetcher.baseUrl=this.baseUrl),t.has("submitUrl")&&(this.fetcher.submitUrl=this.submitUrl)}render(){return this.loading?this.renderLoading():this.error!=null?this.renderError(this.error):this.data!=null?this.selfFetched?this.editing?this.renderForm():this.renderResult(this.data):this.showAttribution()?v`${this.renderData(this.data)}${this.renderAttribution()}`:this.renderData(this.data):this.renderNoData()}renderInterpretation(t,r,n){return this.hideReadings?Ht:yt(t,r,n??this.t("Reading"))}renderResult(t){let r=this.sticky?v`${this.renderForm()}${this.renderData(t)}`:v`<div class="roxy-edit-bar" part="edit-bar"><button type="button" class="roxy-edit" @click="${this.onEdit}">${this.t("Edit query")}</button></div>${this.renderData(t)}`;return this.showAttribution()?v`${r}${this.renderAttribution()}`:r}showAttribution(){return this.attribution!=null&&this.attribution!=="off"&&this.attribution!=="false"}renderAttribution(){return v`<div class="roxy-attribution" part="attribution"><a href="https://roxyapi.com/?utm_source=widget&utm_medium=embed" target="_blank" rel="noopener">${this.t("Spiritual data by RoxyAPI")}</a></div>`}renderNoData(){return this.endpoint?this.renderForm():this.renderEmpty()}renderForm(){return v`<roxy-endpoint-form part="form" data-endpoint="${this.endpoint}" method="${this.method}" spec-url="${K(this.specUrl)}" publishable-key="${K(this.publishableKey)}" submit-label="${K(this.submitLabel)}" lang="${K(this.effectiveLang())}" .initialValues="${this.formInitialValues()}" @roxy-submit="${this.onFormSubmit}"></roxy-endpoint-form>`}formInitialValues(){return this.lastValues??(this.remember?this.readRemembered():void 0)}effectiveLang(){return st(this)}rememberKey(){return`roxy-ui:form:${this.endpoint}`}readRemembered(){try{let t=sessionStorage.getItem(this.rememberKey());return t?JSON.parse(t):void 0}catch{return}}writeRemembered(t){try{sessionStorage.setItem(this.rememberKey(),JSON.stringify(t))}catch{}}renderEmpty(){return v`<div class="roxy-empty" role="status">${this.t("No data")}</div>`}renderLoading(){return v`<div class="roxy-skeleton" style="height:8rem" role="status" aria-label="${this.t("Loading")}" part="loading"></div>`}renderError(t){let r=v`<div class="roxy-error" role="alert" part="error">${t}</div>`;return this.endpoint?v`${r}${this.renderForm()}`:r}};m([b({attribute:!1})],h.prototype,"data",2),m([b({type:String,attribute:"data-endpoint"})],h.prototype,"endpoint",2),m([b({type:String})],h.prototype,"method",2),m([b({type:String,attribute:"publishable-key"})],h.prototype,"publishableKey",2),m([b({type:String,attribute:"base-url"})],h.prototype,"baseUrl",2),m([b({type:String,attribute:"spec-url"})],h.prototype,"specUrl",2),m([b({type:String,attribute:"submit-url"})],h.prototype,"submitUrl",2),m([b({type:Boolean})],h.prototype,"remember",2),m([b({type:Boolean,attribute:"hide-readings",reflect:!0})],h.prototype,"hideReadings",2),m([b({type:String,attribute:"submit-label"})],h.prototype,"submitLabel",2),m([b({type:String})],h.prototype,"attribution",2),m([C()],h.prototype,"loading",2),m([C()],h.prototype,"error",2),m([C()],h.prototype,"selfFetched",2),m([C()],h.prototype,"editing",2),m([C()],h.prototype,"sticky",2);function k(i){let e=i%360;return e<0?e+360:e}function j(i){let e=k(i),t=Math.floor(e/30)%12,r=e%30,n=Math.floor(r),s=(r-n)*60,o=Math.floor(s),l=Math.round((s-o)*60);return{sign:L[t]??"Aries",signIndex:t,degree:n,minute:o,second:l}}function xt(i){return k(i+180)}function bt(i,e){let t=k(i),r=k(e)-t;return r<0&&(r+=360),k(t+r/2)}function vt(i,e,t){let r=i.filter(s=>Number.isFinite(e(s))).map(s=>{let o=k(e(s));return{item:s,longitude:o,displayLongitude:o}}).sort((s,o)=>s.longitude-o.longitude);for(let s=1;s<r.length;s++){let o=r[s-1],l=r[s];if(!o||!l)continue;let d=o.displayLongitude+t;l.displayLongitude<d&&(l.displayLongitude=d)}let n=r[r.length-1];if(n&&n.displayLongitude>360){let s=n.displayLongitude-360;for(let o of r)o.displayLongitude-=s}return r}function H(i,e){return e>0?i/e*(180/Math.PI):0}function f(i,e,t,r){let n=r*Math.PI/180;return{x:i+t*Math.cos(n),y:e+t*Math.sin(n)}}var q=/^\d{4}-\d{2}-\d{2}$/,wt=/^\d{2}:\d{2}(:\d{2})?$/,qt=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2}(\.\d+)?)?$/,$t=new Map;function kt(i){if(!i)return["en"];let e=$t.get(i);if(e)return[e,"en"];let t="en";try{t=Intl.getCanonicalLocales(i)[0]??"en"}catch{t="en"}return $t.set(i,t),[t,"en"]}function St(i){let e=wt.test(i)?`1970-01-01T${i}`:qt.test(i)?i:null;return e?{d:new Date(`${e}Z`),timeZone:"UTC"}:{d:new Date(i)}}function Vt(i,e){if(typeof e!="string"||e.length===0||q.test(e))return"";let{d:t,timeZone:r}=St(e);return Number.isNaN(t.getTime())?e:t.toLocaleTimeString(kt(i),{hour:"numeric",minute:"2-digit",timeZone:r})}function Yt(i,e){if(typeof e!="string"||e.length===0)return"";let{d:t,timeZone:r}=St(q.test(e)?`${e}T00:00:00`:e);return Number.isNaN(t.getTime())?e:t.toLocaleDateString(kt(i),{month:"short",day:"numeric",year:"numeric",timeZone:r})}function M(i,e=1){if(typeof i!="number"||!Number.isFinite(i))return"";let t=i.toFixed(e);return t.includes(".")?t.replace(/\.?0+$/,""):t}var At={conjunction:"aspect-conjunction",sextile:"aspect-sextile",square:"aspect-square",trine:"aspect-trine",opposition:"aspect-opposition"};function V(i){return(i.type??"").toLowerCase().trim().replace(/[\s_]+/g,"-")}function U(i){return A(V(i))}function Tt(i,e,t){let r=typeof e=="string"&&q.test(e)&&typeof t=="string"&&wt.test(t)?`${e}T${t}`:e,n=Yt(i,r),s=Vt(i,r);return n&&s?`${n}, ${s}`:n||s}var Zt="Localized";function y(i,e,t){let r=i,n=r?.[`${e}${Zt}`];if(typeof n=="string"&&n!=="")return n;if(t!==void 0)return t;let s=r?.[e];return typeof s=="string"?s:""}var X=400,a=X/2,Wt=184,N=170,Qt=154,Z=140,te=124,ee=135,re=94,ne=83,Rt=112,ie=104,J=70,se=58,oe=13,ae=15,le=8,ce=4,T=(i,e)=>it(i)??e,Lt=i=>{let e=j(i);return`${e.degree}\xB0${String(e.minute).padStart(2,"0")}'`},Ct=i=>typeof i=="number"&&Number.isFinite(i)?String(Math.round(i)):"",F=i=>{let e=new Map;for(let t of i)e.set(A(t.name),t);return e},S=class extends h{constructor(){super(...arguments);this.heading="Transits"}get payload(){return this.data}get effectiveAscendant(){for(let t of[this.ascendant,this.payload?.ascendant?.longitude])if(typeof t=="number"&&Number.isFinite(t))return t}get ascendantGiven(){return this.effectiveAscendant!==void 0}get cuspsFromPage(){return Array.isArray(this.houses)}get cusps(){let t=this.houses??this.payload?.houses;if(!Array.isArray(t)||t.length!==12)return null;let r=t.map((s,o)=>typeof s=="number"?{number:o+1,longitude:s}:{number:Number(s?.number),longitude:Number(s?.longitude)}).sort((s,o)=>s.number-o.number);return r.every((s,o)=>s.number===o+1&&Number.isFinite(s.longitude))?r:null}toAngle(t){return 180+(this.effectiveAscendant??this.cusps?.[0]?.longitude??0)-t}renderEmpty(){return u`<div class="roxy-empty" role="status">${this.t("No transit data")}</div>`}renderData(t){let r=t.natalPlanets??[],n=t.transitPlanets??[],s=t.aspects??[],o=Tt(this.effectiveLang(),t.transitDate),l=s.length>0?this.t("Aspects to the natal chart: {{count}}",{count:s.length}):"",d=[...r,...n].some(p=>Number.isFinite(p.house));return u`<div class="wrap" part="card" aria-label="${this.t("Natal and transit bi-wheel")}"><div class="head" part="header"><h2 class="title">${this.t(this.heading)}</h2>${o||l?u`<p class="subtitle">${[o,l].filter(Boolean).join(" \xB7 ")}</p>`:g}</div>${this.renderWheel(r,n,s)} ${this.renderLegend(r,n,s,d?t.houseSystem:void 0)} ${this.renderSummary(t.summary)} ${this.renderPositions(r,n,d)} ${this.renderReadings(s)}</div>`}get orientationCaption(){return this.ascendantGiven?this.t("Ascendant on the left horizon"):this.cusps?this.t("First house cusp on the left horizon"):this.t("Sign wheel, 0\xB0 Aries on the left")}get cuspCaption(){return this.cusps?this.cuspsFromPage?this.t("House cusps supplied by the page"):this.t("House cusps from the response"):this.t("No house cusps")}renderWheel(t,r,n){return u`<svg viewBox="0 0 ${X} ${X}" part="chart" role="img" aria-label="${this.t("Bi-wheel with natal bodies on the inner ring and transiting bodies on the outer ring")}"><title>${this.t("Natal and transit bi-wheel")}</title><desc>${this.t("Twelve zodiac sign segments around a circular wheel. Natal bodies sit at their ecliptic longitudes on the inner ring and transiting bodies on the outer ring, and each line joins a transiting body to the natal body it aspects.")} ${this.orientationCaption}. ${this.cuspCaption}.</desc><circle class="wheel-line" cx="${a}" cy="${a}" r="${N}" stroke-width="1.5"/><circle class="wheel-line" cx="${a}" cy="${a}" r="${Z}" stroke-width="0.8"/><circle class="wheel-line" cx="${a}" cy="${a}" r="${Rt}" stroke-width="0.6"/><circle class="wheel-line" cx="${a}" cy="${a}" r="${J}" stroke-width="0.5"/>${this.renderTicks()} ${this.renderSpokes()} ${this.renderSigns()} ${this.renderHouses()} ${this.renderAspectLines(t,r,n)} ${this.renderRing(t,re,ne,"natal-glyph",this.t("Natal"),1)} ${this.renderRing(r,te,ee,"transit-glyph",this.t("Transiting"),-1)} ${this.renderAxis()}</svg>`}renderTicks(){let t=[];for(let r=0;r<360;r+=5){let n=this.toAngle(r),s=r%30===0,o=f(a,a,s?Z:N-5,n),l=f(a,a,N,n);t.push(w`<line class=${s?"tick tick-major":"tick"} x1=${o.x} y1=${o.y} x2=${l.x} y2=${l.y} stroke-width=${s?1:.5} />`)}return t}renderSpokes(){return L.map((t,r)=>{let n=this.toAngle(r*30),s=f(a,a,J,n),o=f(a,a,N,n);return w`<line class="wheel-line" x1=${s.x} y1=${s.y} x2=${o.x} y2=${o.y} stroke-width="0.6" />`})}renderHouses(){let t=this.cusps;return t?t.map((r,n)=>{let s=t[(n+1)%12],o=this.toAngle(r.longitude),l=f(a,a,J,o),d=f(a,a,Z,o),p=f(a,a,se,this.toAngle(bt(r.longitude,s?.longitude??r.longitude+30)));return w`<g>
|
|
2
|
+
<line class="house-cusp" x1=${l.x} y1=${l.y} x2=${d.x} y2=${d.y} />
|
|
3
|
+
<text class="house-num" x=${p.x} y=${p.y} text-anchor="middle" dominant-baseline="central">${r.number}</text>
|
|
4
|
+
</g>`}):g}renderSigns(){return L.map((t,r)=>{let n=f(a,a,Qt,this.toAngle(r*30+15));return w`<text class="sign-glyph" x=${n.x} y=${n.y} text-anchor="middle" dominant-baseline="central">${G(t)}</text>`})}renderRing(t,r,n,s,o,l){let d=Math.max(H(oe,r),H(ae,n));return vt(t,p=>p.longitude,d).map(({item:p,longitude:c,displayLongitude:x})=>{let $=this.toAngle(x),R=f(a,a,r,$),W=f(a,a,n,$),Q=p.isRetrograde===!0,Nt=`${j(c).degree}\xB0`,tt=y(p,"name"),Et=`${o} ${tt}${Q?` ${this.t("retrograde")}`:""} - ${Lt(c)} ${y(p,"sign")}`,_t=Math.abs(x-c)>.5,et=f(a,a,r+l*le,this.toAngle(c)),rt=f(a,a,r+l*ce,$);return w`<g>
|
|
5
|
+
${_t?w`<line class=${`leader ${s}`} x1=${et.x} y1=${et.y} x2=${rt.x} y2=${rt.y} />`:g}
|
|
6
|
+
<text class=${s} x=${R.x} y=${R.y} text-anchor="middle" dominant-baseline="central"><title>${Et}</title>${T(p.name,tt)}</text>
|
|
7
|
+
<text class="planet-deg" x=${W.x} y=${W.y} text-anchor="middle" dominant-baseline="central">${Nt}${Q?w`<tspan class="retro"> ℞</tspan>`:g}</text>
|
|
8
|
+
</g>`})}renderAspectLines(t,r,n){let s=F(t),o=F(r);return n.map(l=>{let d=o.get(A(l.planet1)),p=s.get(A(l.planet2));if(!d||!p||!Number.isFinite(d.longitude)||!Number.isFinite(p.longitude))return g;let c=f(a,a,Rt,this.toAngle(d.longitude)),x=f(a,a,ie,this.toAngle(p.longitude)),$=V(l),R=M(l.orb,1);return w`<line class=${`aspect ${At[$]??"aspect-other"}`} x1=${c.x} y1=${c.y} x2=${x.x} y2=${x.y}><title>${this.t("Transiting")} ${y(l,"planet1")} ${y(l,"type",$)} ${this.t("Natal")} ${y(l,"planet2")}${R?` (${this.t("orb")} ${R}\xB0)`:""}</title></line>`})}renderAxis(){let t=this.effectiveAscendant;if(t===void 0)return g;let r=k(t);return[r,xt(r)].map((n,s)=>{let o=this.toAngle(n),l=f(a,a,N,o),d=f(a,a,Wt,o);return w`<g>
|
|
9
|
+
<line class="axis-tick" x1=${l.x} y1=${l.y} x2=${d.x} y2=${d.y} />
|
|
10
|
+
<text class="axis-label" x=${d.x} y=${d.y} text-anchor="middle" dominant-baseline="central">${s===0?"ASC":"DSC"}</text>
|
|
11
|
+
</g>`})}renderLegend(t,r,n,s){return u`<div class="legend" part="legend"><span><span class="swatch swatch--natal"></span>${this.t("{{count}} natal bodies",{count:t.length})}</span> <span><span class="swatch swatch--transit"></span>${this.t("{{count}} transiting bodies",{count:r.length})}</span> ${n.length>0?u`<span><span class="swatch swatch--harmonious"></span>${this.t("Harmonious")}</span> <span><span class="swatch swatch--challenging"></span>${this.t("Challenging")}</span>`:g} ${s?u`<span>${this.t("{{system}} houses",{system:s})}</span>`:g} <span>${this.orientationCaption}</span> <span>${this.cuspCaption}</span></div>`}renderSummary(t){if(!t)return g;let r=Object.entries(t.byType??{}).sort((n,s)=>s[1]-n[1]);return u`<div part="details"><div class="summary-pills" role="region" aria-label="${this.t("Transit aspect summary")}">${typeof t.total=="number"?u`<span class="pill pill--muted">${this.t("Total")}: ${t.total}</span>`:g} <span class="pill pill--success">${this.t("Harmonious")}: ${t.harmonious}</span> <span class="pill pill--danger">${this.t("Challenging")}: ${t.challenging}</span> <span class="pill pill--muted">${this.t("Neutral")}: ${t.neutral}</span> ${r.map(([n,s])=>u`<span class="pill pill--muted">${U({type:n})}: ${s}</span>`)}</div>${t.strongest?this.renderStrongest(t.strongest):g}</div>`}renderStrongest(t){let r=y(t,"planet1"),n=y(t,"planet2");return u`<div class="strongest" part="details strongest"><span class="label">${this.t("Strongest")}</span> <span aria-hidden="true" class="glyph">${T(t.planet1,r)}</span>${this.t("Transiting")} ${r} <span class="nature-badge ${(t.interpretation??"neutral").toLowerCase()}">${y(t,"type",U(t))}</span> <span aria-hidden="true" class="glyph">${T(t.planet2,n)}</span>${this.t("Natal")} ${n} <span class="meta">${t.isApplying?this.t("Applying"):this.t("Separating")} · ${this.t("orb")} ${M(t.orb,2)}° · ${this.t("strength")} ${Ct(t.strength)}</span></div>`}renderPositions(t,r,n){if(t.length===0&&r.length===0)return g;let s=F(t),o=F(r),l=t.length>0?t:r,d=c=>c?u`${G(c.sign)??""} ${Lt(c.longitude)} ${y(c,"sign")}${c.isRetrograde?u`<span class="retro-badge" aria-label="${this.t("retrograde")}">℞</span>`:g}`:g,p=c=>n?u`<td>${c&&Number.isFinite(c.house)?c.house:g}</td>`:g;return u`<div class="scroll" part="table" tabindex="0" role="region" aria-labelledby="transit-positions"><table><caption id="transit-positions" class="roxy-sr-only">${this.t("Every body with its natal position and its position on the transit date, each as a zodiac sign and a degree.")} ${n?this.t("Both house numbers are read against the natal house cusps."):g}</caption><thead><tr><th scope="col">${this.t("Body")}</th><th scope="col"><span class="swatch swatch--natal" aria-hidden="true"></span>${this.t("Natal")}</th>${n?u`<th scope="col">${this.t("Natal house")}</th>`:g}<th scope="col"><span class="swatch swatch--transit" aria-hidden="true"></span>${this.t("Transiting")}</th>${n?u`<th scope="col">${this.t("Transiting house")}</th>`:g}</tr></thead><tbody>${l.map(c=>{let x=A(c.name),$=y(c,"name");return u`<tr><th scope="row"><span aria-hidden="true" class="glyph">${T(c.name,$)}</span> ${$}</th><td>${d(s.get(x))}</td>${p(s.get(x))}<td>${d(o.get(x))}</td>${p(o.get(x))}</tr>`})}</tbody></table></div>`}renderReadings(t){let r=t.filter(n=>n.transitInterpretation?.summary).map(n=>{let s=n.transitInterpretation,o=y(n,"planet1"),l=y(n,"planet2");return{label:`${T(n.planet1,o)} ${o} ${y(n,"type",U(n))} ${T(n.planet2,l)} ${l}`,aside:`${this.t("orb")} ${M(n.orb,2)}\xB0 \xB7 ${this.t("strength")} ${Ct(n.strength)}`,body:s.summary,extra:u`${s.impact?u`<p><strong>${this.t("Impact")}:</strong> ${s.impact}</p>`:g} ${s.timing?u`<p><strong>${this.t("Timing")}:</strong> ${s.timing}</p>`:g} ${s.guidance?u`<p><strong>${this.t("Guidance")}:</strong> ${s.guidance}</p>`:g} ${s.keywords?.length?u`<div class="interp-keywords">${s.keywords.map(d=>u`<span class="kw">${d}</span>`)}</div>`:g}`}});return this.renderInterpretation(r,"transit-aspect-readings",this.t("Transit readings"))}};S.styles=[I,ht,ft,Jt`.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.subtitle{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);margin:0}svg{width:100%;max-width:var(--roxy-chart-max-width,560px);aspect-ratio:1;height:auto;margin:0 auto;display:block}.wheel-line{fill:none;stroke:var(--roxy-border,#e4e4e7)}.sign-glyph{fill:var(--roxy-secondary,#475569);font-size:14px;font-family:var(--roxy-font-sans)}.natal-glyph{fill:var(--roxy-accent-ink,#b45309);font-size:13px;font-weight:600;font-family:var(--roxy-font-sans)}.transit-glyph{fill:var(--roxy-info,#0284c7);font-size:13px;font-weight:600;font-family:var(--roxy-font-sans)}.leader{stroke:currentColor;stroke-width:.6px;opacity:.6}.leader.natal-glyph{stroke:var(--roxy-accent-ink,#b45309)}.leader.transit-glyph{stroke:var(--roxy-info,#0284c7)}.planet-deg{fill:var(--roxy-muted,#71717a);font-size:7px;font-family:var(--roxy-font-sans)}.planet-deg .retro{fill:var(--roxy-danger,#dc2626)}@container (width<=480px){.sign-glyph,.natal-glyph,.transit-glyph{font-size:18px}.planet-deg{font-size:10px}.house-num{font-size:12px}}.tick{stroke:var(--roxy-border,#e4e4e7)}.tick-major{stroke:var(--roxy-secondary,#475569)}.house-cusp{stroke:var(--roxy-secondary,#475569);stroke-width:1px;stroke-dasharray:3 3}.house-num{fill:var(--roxy-secondary,#475569);font-size:9px;font-family:var(--roxy-font-sans)}.axis-tick{stroke:var(--roxy-accent-ink,#b45309);stroke-width:1.5px}.axis-label{fill:var(--roxy-accent-ink,#b45309);font-size:10px;font-weight:700;font-family:var(--roxy-font-sans);letter-spacing:.04em}.aspect{stroke-width:.8px;fill:none;opacity:.55}.aspect-trine,.aspect-sextile{stroke:var(--roxy-success,#16a34a)}.aspect-square,.aspect-opposition{stroke:var(--roxy-danger,#dc2626)}.aspect-conjunction{stroke:var(--roxy-accent-ink,#b45309)}.aspect-other{stroke:var(--roxy-muted,#71717a);opacity:.4}.swatch{vertical-align:middle;border-radius:50%;width:8px;height:8px;margin-right:4px;display:inline-block}.swatch--natal{background:var(--roxy-accent-ink,#b45309)}.swatch--transit{background:var(--roxy-info,#0284c7)}.swatch--harmonious{background:var(--roxy-success,#16a34a)}.swatch--challenging{background:var(--roxy-danger,#dc2626)}.legend{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);gap:var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.summary-pills{gap:var(--roxy-space-sm,.5rem);margin-bottom:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.pill{padding:2px var(--roxy-space-sm,.5rem);border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);border:1px solid;align-items:center;gap:4px;display:inline-flex}.pill--muted{color:var(--roxy-fg,#0a0a0a);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 60%, transparent)}.pill--success{color:var(--roxy-success-fg,#166534);background:color-mix(in srgb, var(--roxy-success,#16a34a) 10%, transparent)}.pill--danger{color:var(--roxy-danger-fg,#991b1b);background:color-mix(in srgb, var(--roxy-danger,#dc2626) 10%, transparent)}.strongest{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);flex-wrap:wrap;align-items:center;gap:.4rem;display:flex}.strongest .label{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600)}.strongest .meta{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);font-variant-numeric:tabular-nums;margin-left:auto}.glyph{font-size:1.1em;line-height:1}.nature-badge{font-size:var(--roxy-text-xs,.75rem);text-transform:capitalize;border-radius:9999px;padding:1px 8px;font-weight:600;display:inline-block}.nature-badge.harmonious{background:color-mix(in srgb, var(--roxy-success,#16a34a) 12%, transparent);color:var(--roxy-success-fg,#166534)}.nature-badge.challenging{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 12%, transparent);color:var(--roxy-danger-fg,#991b1b)}.nature-badge.neutral{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 60%, transparent);color:var(--roxy-fg,#0a0a0a)}.scroll{-webkit-overflow-scrolling:touch;min-width:0;overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem)}th,td{padding:var(--roxy-space-sm,.5rem);border-bottom:1px solid var(--roxy-border,#e4e4e7);text-align:left;white-space:nowrap}thead th{color:var(--roxy-muted,#71717a);text-transform:uppercase;font-size:var(--roxy-text-xs,.75rem);letter-spacing:.06em}th{font-weight:var(--roxy-weight-bold,600)}td{font-variant-numeric:tabular-nums}.retro-badge{color:var(--roxy-danger-fg,#991b1b);font-weight:var(--roxy-weight-bold,600);margin-left:.25rem}.interp-keywords{flex-wrap:wrap;gap:.25rem;display:flex}.interp-keywords .kw{border-radius:var(--roxy-radius-full,9999px);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 14%, transparent);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-xs,.75rem);padding:1px 8px}`],m([Y({type:String})],S.prototype,"heading",2),m([Y({type:Number})],S.prototype,"ascendant",2),m([Y({type:Array})],S.prototype,"houses",2),S=m([Xt("roxy-transit-wheel")],S);export{S as RoxyTransitWheel};
|
|
12
12
|
//# sourceMappingURL=transit-wheel.js.map
|