@roxyapi/ui 1.1.1 → 1.1.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.
Files changed (195) hide show
  1. package/AGENTS.md +5 -5
  2. package/README.md +3 -3
  3. package/THEMING.md +3 -3
  4. package/components-catalog.json +258 -158
  5. package/dist/cdn/components/almanac-day.js +3 -205
  6. package/dist/cdn/components/angel-number-card.js +3 -205
  7. package/dist/cdn/components/angel-number-lookup.js +3 -205
  8. package/dist/cdn/components/arudha-padas.js +3 -205
  9. package/dist/cdn/components/ashtakavarga-grid.js +3 -205
  10. package/dist/cdn/components/aspects-table.js +3 -205
  11. package/dist/cdn/components/astrocartography-map.js +3 -205
  12. package/dist/cdn/components/bazi-chart.js +3 -205
  13. package/dist/cdn/components/bhav-chalit-table.js +2 -204
  14. package/dist/cdn/components/bhava-bala-table.js +3 -205
  15. package/dist/cdn/components/biorhythm-chart.js +3 -205
  16. package/dist/cdn/components/bodygraph.js +7 -209
  17. package/dist/cdn/components/chara-karakas.js +3 -205
  18. package/dist/cdn/components/choghadiya-grid.js +3 -205
  19. package/dist/cdn/components/compatibility-card.js +2 -204
  20. package/dist/cdn/components/compound-number.js +3 -205
  21. package/dist/cdn/components/crystal-card.js +3 -205
  22. package/dist/cdn/components/crystal-grid.js +3 -205
  23. package/dist/cdn/components/dasha-timeline.js +3 -205
  24. package/dist/cdn/components/data.js +3 -205
  25. package/dist/cdn/components/divisional-chart.js +13 -215
  26. package/dist/cdn/components/dosha-card.js +3 -205
  27. package/dist/cdn/components/dosha-constitution.js +3 -205
  28. package/dist/cdn/components/dream-card.js +3 -205
  29. package/dist/cdn/components/dream-search.js +3 -205
  30. package/dist/cdn/components/endpoint-form.js +3 -205
  31. package/dist/cdn/components/ephemeris-table.js +2 -204
  32. package/dist/cdn/components/fixed-stars.js +2 -204
  33. package/dist/cdn/components/flying-star-chart.js +2 -204
  34. package/dist/cdn/components/forecast-digest.js +3 -205
  35. package/dist/cdn/components/forecast-timeline.js +3 -205
  36. package/dist/cdn/components/gematria.js +3 -205
  37. package/dist/cdn/components/gochara-table.js +3 -205
  38. package/dist/cdn/components/guna-milan.js +3 -205
  39. package/dist/cdn/components/hd-connection.js +5 -207
  40. package/dist/cdn/components/hd-penta.js +5 -207
  41. package/dist/cdn/components/hd-type-card.js +3 -205
  42. package/dist/cdn/components/hd-variables.js +3 -205
  43. package/dist/cdn/components/heliacal-table.js +3 -205
  44. package/dist/cdn/components/hexagram.js +3 -205
  45. package/dist/cdn/components/hora-table.js +3 -205
  46. package/dist/cdn/components/horoscope-card.js +3 -205
  47. package/dist/cdn/components/kp-chart.js +3 -205
  48. package/dist/cdn/components/kp-finance-card.js +3 -205
  49. package/dist/cdn/components/kp-planets-table.js +3 -205
  50. package/dist/cdn/components/kp-ruling-planets.js +3 -205
  51. package/dist/cdn/components/kua-card.js +3 -205
  52. package/dist/cdn/components/local-space-compass.js +8 -210
  53. package/dist/cdn/components/location-search.js +3 -205
  54. package/dist/cdn/components/luck-pillars.js +3 -205
  55. package/dist/cdn/components/mayan-day-sign.js +3 -205
  56. package/dist/cdn/components/moon-phase.js +3 -205
  57. package/dist/cdn/components/nakshatra-card.js +3 -205
  58. package/dist/cdn/components/natal-chart.js +6 -208
  59. package/dist/cdn/components/numerology-card.js +3 -205
  60. package/dist/cdn/components/panchang-table.js +3 -205
  61. package/dist/cdn/components/positions-table.js +3 -205
  62. package/dist/cdn/components/profection-card.js +3 -205
  63. package/dist/cdn/components/reference-card.js +3 -205
  64. package/dist/cdn/components/relocation-wheel.js +6 -208
  65. package/dist/cdn/components/shadbala-table.js +3 -205
  66. package/dist/cdn/components/synastry-chart.js +7 -209
  67. package/dist/cdn/components/tarot-card.js +3 -205
  68. package/dist/cdn/components/tarot-catalog.js +3 -205
  69. package/dist/cdn/components/tarot-spread.js +3 -205
  70. package/dist/cdn/components/transit-wheel.js +8 -210
  71. package/dist/cdn/components/transits-table.js +3 -205
  72. package/dist/cdn/components/upagraha-table.js +2 -204
  73. package/dist/cdn/components/vastu-mandala.js +4 -206
  74. package/dist/cdn/components/vedic-aspects.js +2 -204
  75. package/dist/cdn/components/vedic-daily.js +3 -205
  76. package/dist/cdn/components/vedic-kundli.js +10 -212
  77. package/dist/cdn/components/vedic-planets-table.js +3 -205
  78. package/dist/cdn/components/western-planets-table.js +2 -204
  79. package/dist/cdn/components/yoga-list.js +3 -205
  80. package/dist/cdn/components/zodiac-card.js +2 -204
  81. package/dist/cdn/locales/de.js +1 -1
  82. package/dist/cdn/roxy-ui.js +49 -251
  83. package/dist/components/almanac-day.js +1 -203
  84. package/dist/components/angel-number-card.js +1 -203
  85. package/dist/components/angel-number-lookup.js +1 -203
  86. package/dist/components/arudha-padas.js +1 -203
  87. package/dist/components/ashtakavarga-grid.js +1 -203
  88. package/dist/components/aspects-table.js +1 -203
  89. package/dist/components/astrocartography-map.js +6 -208
  90. package/dist/components/bazi-chart.js +1 -203
  91. package/dist/components/bhav-chalit-table.js +1 -203
  92. package/dist/components/bhava-bala-table.js +1 -203
  93. package/dist/components/biorhythm-chart.js +1 -203
  94. package/dist/components/bodygraph.js +3 -205
  95. package/dist/components/chara-karakas.js +1 -203
  96. package/dist/components/choghadiya-grid.js +1 -203
  97. package/dist/components/compatibility-card.js +1 -203
  98. package/dist/components/compound-number.js +1 -203
  99. package/dist/components/crystal-card.js +1 -203
  100. package/dist/components/crystal-grid.js +1 -203
  101. package/dist/components/dasha-timeline.js +1 -203
  102. package/dist/components/data.js +1 -203
  103. package/dist/components/divisional-chart.js +45 -247
  104. package/dist/components/dosha-card.js +1 -203
  105. package/dist/components/dosha-constitution.js +1 -203
  106. package/dist/components/dream-card.js +1 -203
  107. package/dist/components/dream-search.js +1 -203
  108. package/dist/components/endpoint-form.js +1 -203
  109. package/dist/components/ephemeris-table.js +1 -203
  110. package/dist/components/fixed-stars.js +1 -203
  111. package/dist/components/flying-star-chart.js +1 -203
  112. package/dist/components/forecast-digest.js +1 -203
  113. package/dist/components/forecast-timeline.js +1 -203
  114. package/dist/components/gematria.js +1 -203
  115. package/dist/components/gochara-table.js +1 -203
  116. package/dist/components/guna-milan.js +1 -203
  117. package/dist/components/hd-connection.js +3 -205
  118. package/dist/components/hd-penta.js +5 -207
  119. package/dist/components/hd-type-card.js +1 -203
  120. package/dist/components/hd-variables.js +1 -203
  121. package/dist/components/heliacal-table.js +1 -203
  122. package/dist/components/hexagram.d.ts +1 -1
  123. package/dist/components/hexagram.js +1 -203
  124. package/dist/components/hora-table.js +1 -203
  125. package/dist/components/horoscope-card.js +1 -203
  126. package/dist/components/kp-chart.js +1 -203
  127. package/dist/components/kp-finance-card.js +1 -203
  128. package/dist/components/kp-planets-table.js +1 -203
  129. package/dist/components/kp-ruling-planets.js +1 -203
  130. package/dist/components/kua-card.js +1 -203
  131. package/dist/components/local-space-compass.js +4 -206
  132. package/dist/components/location-search.js +1 -203
  133. package/dist/components/luck-pillars.js +1 -203
  134. package/dist/components/mayan-day-sign.js +1 -203
  135. package/dist/components/moon-phase.js +1 -203
  136. package/dist/components/nakshatra-card.js +1 -203
  137. package/dist/components/natal-chart.d.ts +1 -1
  138. package/dist/components/natal-chart.js +5 -207
  139. package/dist/components/numerology-card.js +1 -203
  140. package/dist/components/panchang-table.js +1 -203
  141. package/dist/components/positions-table.js +1 -203
  142. package/dist/components/profection-card.js +1 -203
  143. package/dist/components/reference-card.js +1 -203
  144. package/dist/components/relocation-wheel.js +3 -205
  145. package/dist/components/shadbala-table.js +1 -203
  146. package/dist/components/synastry-chart.js +6 -208
  147. package/dist/components/tarot-card.js +1 -203
  148. package/dist/components/tarot-catalog.js +1 -203
  149. package/dist/components/tarot-spread.js +1 -203
  150. package/dist/components/transit-wheel.js +8 -210
  151. package/dist/components/transits-table.js +1 -203
  152. package/dist/components/upagraha-table.js +1 -203
  153. package/dist/components/vastu-mandala.js +6 -208
  154. package/dist/components/vedic-aspects.js +1 -203
  155. package/dist/components/vedic-daily.js +1 -203
  156. package/dist/components/vedic-kundli.js +15 -217
  157. package/dist/components/vedic-planets-table.js +1 -203
  158. package/dist/components/western-planets-table.js +1 -203
  159. package/dist/components/yoga-list.js +1 -203
  160. package/dist/components/zodiac-card.js +1 -203
  161. package/dist/forms.json +1 -1
  162. package/dist/index.cjs +49 -251
  163. package/dist/index.js +50 -252
  164. package/dist/locales/de.js +1 -1
  165. package/dist/schemas/post--astrology-lilith.json +1 -1
  166. package/dist/schemas/post--astrology-progressions.json +1 -1
  167. package/dist/schemas/post--kabbalah-birth-profile.json +1 -1
  168. package/dist/schemas/post--numerology-chart.json +1 -1
  169. package/dist/schemas/post--vedic-astrology-daily.json +1 -1
  170. package/dist/schemas/post--vedic-astrology-dasha-current.json +1 -1
  171. package/dist/schemas/post--vedic-astrology-dasha-major.json +1 -1
  172. package/dist/schemas/post--vedic-astrology-dasha-sub-mahadasha-antardasha-pratyantardasha-sookshma.json +1 -1
  173. package/dist/schemas/post--vedic-astrology-dasha-sub-mahadasha-antardasha-pratyantardasha.json +1 -1
  174. package/dist/schemas/post--vedic-astrology-dasha-sub-mahadasha-antardasha.json +1 -1
  175. package/dist/schemas/post--vedic-astrology-dasha-sub-mahadasha.json +1 -1
  176. package/dist/schemas/post--vedic-astrology-kp-chart.json +1 -1
  177. package/dist/schemas/post--vedic-astrology-kp-cusps.json +1 -1
  178. package/dist/schemas/post--vedic-astrology-kp-daily-finance.json +1 -1
  179. package/dist/schemas/post--vedic-astrology-kp-horary.json +1 -1
  180. package/dist/schemas/post--vedic-astrology-kp-planets.json +1 -1
  181. package/dist/schemas/post--vedic-astrology-kp-ruling-planets-interval.json +1 -1
  182. package/dist/schemas/post--vedic-astrology-kp-ruling-planets.json +1 -1
  183. package/dist/schemas/post--vedic-astrology-transit.json +1 -1
  184. package/dist/styles/palettes.d.ts +4 -0
  185. package/dist/styles/themes/celeste.css +1 -115
  186. package/dist/styles/themes/eucalyptus.css +1 -121
  187. package/dist/styles/themes/kiln.css +1 -121
  188. package/dist/styles/themes/moonlit.css +1 -121
  189. package/dist/styles/themes/practitioner.css +1 -170
  190. package/dist/styles/tokens-css.d.ts +1 -1
  191. package/dist/styles/tokens.css +1 -202
  192. package/dist/types/types.gen.d.ts +48 -36
  193. package/dist/utils/string.d.ts +2 -0
  194. package/dist/version.d.ts +1 -1
  195. package/package.json +1 -1
@@ -1,218 +1,16 @@
1
- var RoxyUI_natal_chart=(()=>{var yt=Object.defineProperty;var Ae=Object.getOwnPropertyDescriptor;var zr=Object.getOwnPropertyNames;var Ir=Object.prototype.hasOwnProperty;var Ur=(o,t)=>{for(var e in t)yt(o,e,{get:t[e],enumerable:!0})},Gr=(o,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of zr(t))!Ir.call(o,n)&&n!==e&&yt(o,n,{get:()=>t[n],enumerable:!(r=Ae(t,n))||r.enumerable});return o};var Hr=o=>Gr(yt({},"__esModule",{value:!0}),o),y=(o,t,e,r)=>{for(var n=r>1?void 0:r?Ae(t,e):t,s=o.length-1,i;s>=0;s--)(i=o[s])&&(n=(r?i(t,e,n):i(n))||n);return r&&n&&yt(t,e,n),n};var Gn={};Ur(Gn,{NATAL_TYPE_SIZES:()=>jt,ROXY_UI_TOKENS_STYLE_ID:()=>Tt,RoxyNatalChart:()=>F,injectRoxyTokens:()=>At});var ft=globalThis,xt=ft.ShadowRoot&&(ft.ShadyCSS===void 0||ft.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,qt=Symbol(),Re=new WeakMap,nt=class{constructor(t,e,r){if(this._$cssResult$=!0,r!==qt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(xt&&t===void 0){let r=e!==void 0&&e.length===1;r&&(t=Re.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&Re.set(e,t))}return t}toString(){return this.cssText}},_e=o=>new nt(typeof o=="string"?o:o+"",void 0,qt),w=(o,...t)=>{let e=o.length===1?o[0]:t.reduce((r,n,s)=>r+(i=>{if(i._$cssResult$===!0)return i.cssText;if(typeof i=="number")return i;throw Error("Value passed to 'css' function must be a 'css' function result: "+i+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+o[s+1],o[0]);return new nt(e,o,qt)},Pe=(o,t)=>{if(xt)o.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let r=document.createElement("style"),n=ft.litNonce;n!==void 0&&r.setAttribute("nonce",n),r.textContent=e.cssText,o.appendChild(r)}},Bt=xt?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(let r of t.cssRules)e+=r.cssText;return _e(e)})(o):o;var{is:jr,defineProperty:Kr,getOwnPropertyDescriptor:qr,getOwnPropertyNames:Br,getOwnPropertySymbols:Wr,getPrototypeOf:Yr}=Object,bt=globalThis,Ce=bt.trustedTypes,Vr=Ce?Ce.emptyScript:"",Zr=bt.reactiveElementPolyfillSupport,ot=(o,t)=>o,st={toAttribute(o,t){switch(t){case Boolean:o=o?Vr:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o)}catch{e=null}}return e}},vt=(o,t)=>!jr(o,t),Le={attribute:!0,type:String,converter:st,reflect:!1,useDefault:!1,hasChanged:vt};Symbol.metadata??=Symbol("metadata"),bt.litPropertyMetadata??=new WeakMap;var N=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Le){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let r=Symbol(),n=this.getPropertyDescriptor(t,r,e);n!==void 0&&Kr(this.prototype,t,n)}}static getPropertyDescriptor(t,e,r){let{get:n,set:s}=qr(this.prototype,t)??{get(){return this[e]},set(i){this[e]=i}};return{get:n,set(i){let a=n?.call(this);s?.call(this,i),this.requestUpdate(t,a,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Le}static _$Ei(){if(this.hasOwnProperty(ot("elementProperties")))return;let t=Yr(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(ot("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ot("properties"))){let e=this.properties,r=[...Br(e),...Wr(e)];for(let n of r)this.createProperty(n,e[n])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[r,n]of e)this.elementProperties.set(r,n)}this._$Eh=new Map;for(let[e,r]of this.elementProperties){let n=this._$Eu(e,r);n!==void 0&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let r=new Set(t.flat(1/0).reverse());for(let n of r)e.unshift(Bt(n))}else t!==void 0&&e.push(Bt(t));return e}static _$Eu(t,e){let r=e.attribute;return r===!1?void 0:typeof r=="string"?r:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let r of e.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Pe(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,r){this._$AK(t,r)}_$ET(t,e){let r=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,r);if(n!==void 0&&r.reflect===!0){let s=(r.converter?.toAttribute!==void 0?r.converter:st).toAttribute(e,r.type);this._$Em=t,s==null?this.removeAttribute(n):this.setAttribute(n,s),this._$Em=null}}_$AK(t,e){let r=this.constructor,n=r._$Eh.get(t);if(n!==void 0&&this._$Em!==n){let s=r.getPropertyOptions(n),i=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:st;this._$Em=n;let a=i.fromAttribute(e,s.type);this[n]=a??this._$Ej?.get(n)??a,this._$Em=null}}requestUpdate(t,e,r,n=!1,s){if(t!==void 0){let i=this.constructor;if(n===!1&&(s=this[t]),r??=i.getPropertyOptions(t),!((r.hasChanged??vt)(s,e)||r.useDefault&&r.reflect&&s===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,r))))return;this.C(t,e,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:r,reflect:n,wrapped:s},i){r&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,i??e??this[t]),s!==!0||i!==void 0)||(this._$AL.has(t)||(this.hasUpdated||r||(e=void 0),this._$AL.set(t,e)),n===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[n,s]of this._$Ep)this[n]=s;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[n,s]of r){let{wrapped:i}=s,a=this[n];i!==!0||this._$AL.has(n)||a===void 0||this.C(n,void 0,s,a)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(e)):this._$EM()}catch(r){throw t=!1,this._$EM(),r}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};N.elementStyles=[],N.shadowRootOptions={mode:"open"},N[ot("elementProperties")]=new Map,N[ot("finalized")]=new Map,Zr?.({ReactiveElement:N}),(bt.reactiveElementVersions??=[]).push("2.1.2");var Qt=globalThis,Oe=o=>o,$t=Qt.trustedTypes,Ne=$t?$t.createPolicy("lit-html",{createHTML:o=>o}):void 0,Ue="$lit$",M=`lit$${Math.random().toFixed(9).slice(2)}$`,Ge="?"+M,Jr=`<${Ge}>`,H=document,at=()=>H.createComment(""),dt=o=>o===null||typeof o!="object"&&typeof o!="function",te=Array.isArray,Xr=o=>te(o)||typeof o?.[Symbol.iterator]=="function",Wt=`[
1
+ var RoxyUI_natal_chart=(()=>{var yt=Object.defineProperty;var Ae=Object.getOwnPropertyDescriptor;var zr=Object.getOwnPropertyNames;var Ir=Object.prototype.hasOwnProperty;var Ur=(o,t)=>{for(var e in t)yt(o,e,{get:t[e],enumerable:!0})},Gr=(o,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of zr(t))!Ir.call(o,n)&&n!==e&&yt(o,n,{get:()=>t[n],enumerable:!(r=Ae(t,n))||r.enumerable});return o};var Hr=o=>Gr(yt({},"__esModule",{value:!0}),o),y=(o,t,e,r)=>{for(var n=r>1?void 0:r?Ae(t,e):t,s=o.length-1,i;s>=0;s--)(i=o[s])&&(n=(r?i(t,e,n):i(n))||n);return r&&n&&yt(t,e,n),n};var Gn={};Ur(Gn,{NATAL_TYPE_SIZES:()=>jt,ROXY_UI_TOKENS_STYLE_ID:()=>kt,RoxyNatalChart:()=>F,injectRoxyTokens:()=>At});var ft=globalThis,xt=ft.ShadowRoot&&(ft.ShadyCSS===void 0||ft.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,qt=Symbol(),Re=new WeakMap,nt=class{constructor(t,e,r){if(this._$cssResult$=!0,r!==qt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(xt&&t===void 0){let r=e!==void 0&&e.length===1;r&&(t=Re.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&Re.set(e,t))}return t}toString(){return this.cssText}},_e=o=>new nt(typeof o=="string"?o:o+"",void 0,qt),w=(o,...t)=>{let e=o.length===1?o[0]:t.reduce((r,n,s)=>r+(i=>{if(i._$cssResult$===!0)return i.cssText;if(typeof i=="number")return i;throw Error("Value passed to 'css' function must be a 'css' function result: "+i+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+o[s+1],o[0]);return new nt(e,o,qt)},Pe=(o,t)=>{if(xt)o.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let r=document.createElement("style"),n=ft.litNonce;n!==void 0&&r.setAttribute("nonce",n),r.textContent=e.cssText,o.appendChild(r)}},Bt=xt?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(let r of t.cssRules)e+=r.cssText;return _e(e)})(o):o;var{is:jr,defineProperty:Kr,getOwnPropertyDescriptor:qr,getOwnPropertyNames:Br,getOwnPropertySymbols:Wr,getPrototypeOf:Yr}=Object,bt=globalThis,Ce=bt.trustedTypes,Vr=Ce?Ce.emptyScript:"",Zr=bt.reactiveElementPolyfillSupport,ot=(o,t)=>o,st={toAttribute(o,t){switch(t){case Boolean:o=o?Vr:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o)}catch{e=null}}return e}},vt=(o,t)=>!jr(o,t),Le={attribute:!0,type:String,converter:st,reflect:!1,useDefault:!1,hasChanged:vt};Symbol.metadata??=Symbol("metadata"),bt.litPropertyMetadata??=new WeakMap;var N=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Le){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let r=Symbol(),n=this.getPropertyDescriptor(t,r,e);n!==void 0&&Kr(this.prototype,t,n)}}static getPropertyDescriptor(t,e,r){let{get:n,set:s}=qr(this.prototype,t)??{get(){return this[e]},set(i){this[e]=i}};return{get:n,set(i){let a=n?.call(this);s?.call(this,i),this.requestUpdate(t,a,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Le}static _$Ei(){if(this.hasOwnProperty(ot("elementProperties")))return;let t=Yr(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(ot("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ot("properties"))){let e=this.properties,r=[...Br(e),...Wr(e)];for(let n of r)this.createProperty(n,e[n])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[r,n]of e)this.elementProperties.set(r,n)}this._$Eh=new Map;for(let[e,r]of this.elementProperties){let n=this._$Eu(e,r);n!==void 0&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let r=new Set(t.flat(1/0).reverse());for(let n of r)e.unshift(Bt(n))}else t!==void 0&&e.push(Bt(t));return e}static _$Eu(t,e){let r=e.attribute;return r===!1?void 0:typeof r=="string"?r:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let r of e.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Pe(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,r){this._$AK(t,r)}_$ET(t,e){let r=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,r);if(n!==void 0&&r.reflect===!0){let s=(r.converter?.toAttribute!==void 0?r.converter:st).toAttribute(e,r.type);this._$Em=t,s==null?this.removeAttribute(n):this.setAttribute(n,s),this._$Em=null}}_$AK(t,e){let r=this.constructor,n=r._$Eh.get(t);if(n!==void 0&&this._$Em!==n){let s=r.getPropertyOptions(n),i=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:st;this._$Em=n;let a=i.fromAttribute(e,s.type);this[n]=a??this._$Ej?.get(n)??a,this._$Em=null}}requestUpdate(t,e,r,n=!1,s){if(t!==void 0){let i=this.constructor;if(n===!1&&(s=this[t]),r??=i.getPropertyOptions(t),!((r.hasChanged??vt)(s,e)||r.useDefault&&r.reflect&&s===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,r))))return;this.C(t,e,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:r,reflect:n,wrapped:s},i){r&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,i??e??this[t]),s!==!0||i!==void 0)||(this._$AL.has(t)||(this.hasUpdated||r||(e=void 0),this._$AL.set(t,e)),n===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[n,s]of this._$Ep)this[n]=s;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[n,s]of r){let{wrapped:i}=s,a=this[n];i!==!0||this._$AL.has(n)||a===void 0||this.C(n,void 0,s,a)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(e)):this._$EM()}catch(r){throw t=!1,this._$EM(),r}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};N.elementStyles=[],N.shadowRootOptions={mode:"open"},N[ot("elementProperties")]=new Map,N[ot("finalized")]=new Map,Zr?.({ReactiveElement:N}),(bt.reactiveElementVersions??=[]).push("2.1.2");var Qt=globalThis,Oe=o=>o,$t=Qt.trustedTypes,Ne=$t?$t.createPolicy("lit-html",{createHTML:o=>o}):void 0,Ue="$lit$",M=`lit$${Math.random().toFixed(9).slice(2)}$`,Ge="?"+M,Jr=`<${Ge}>`,H=document,at=()=>H.createComment(""),dt=o=>o===null||typeof o!="object"&&typeof o!="function",te=Array.isArray,Xr=o=>te(o)||typeof o?.[Symbol.iterator]=="function",Wt=`[
2
2
  \f\r]`,it=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Fe=/-->/g,Me=/>/g,U=RegExp(`>|${Wt}(?:([^\\s"'>=/]+)(${Wt}*=${Wt}*(?:[^
3
- \f\r"'\`<>=]|("|')|))|$)`,"g"),De=/'/g,ze=/"/g,He=/^(?:script|style|textarea|title)$/i,ee=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),l=ee(1),R=ee(2),Wn=ee(3),j=Symbol.for("lit-noChange"),c=Symbol.for("lit-nothing"),Ie=new WeakMap,G=H.createTreeWalker(H,129);function je(o,t){if(!te(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ne!==void 0?Ne.createHTML(t):t}var Qr=(o,t)=>{let e=o.length-1,r=[],n,s=t===2?"<svg>":t===3?"<math>":"",i=it;for(let a=0;a<e;a++){let d=o[a],p,u,h=-1,$=0;for(;$<d.length&&(i.lastIndex=$,u=i.exec(d),u!==null);)$=i.lastIndex,i===it?u[1]==="!--"?i=Fe:u[1]!==void 0?i=Me:u[2]!==void 0?(He.test(u[2])&&(n=RegExp("</"+u[2],"g")),i=U):u[3]!==void 0&&(i=U):i===U?u[0]===">"?(i=n??it,h=-1):u[1]===void 0?h=-2:(h=i.lastIndex-u[2].length,p=u[1],i=u[3]===void 0?U:u[3]==='"'?ze:De):i===ze||i===De?i=U:i===Fe||i===Me?i=it:(i=U,n=void 0);let v=i===U&&o[a+1].startsWith("/>")?" ":"";s+=i===it?d+Jr:h>=0?(r.push(p),d.slice(0,h)+Ue+d.slice(h)+M+v):d+M+(h===-2?a:v)}return[je(o,s+(o[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},lt=class o{constructor({strings:t,_$litType$:e},r){let n;this.parts=[];let s=0,i=0,a=t.length-1,d=this.parts,[p,u]=Qr(t,e);if(this.el=o.createElement(p,r),G.currentNode=this.el.content,e===2||e===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(n=G.nextNode())!==null&&d.length<a;){if(n.nodeType===1){if(n.hasAttributes())for(let h of n.getAttributeNames())if(h.endsWith(Ue)){let $=u[i++],v=n.getAttribute(h).split(M),g=/([.?@])?(.*)/.exec($);d.push({type:1,index:s,name:g[2],strings:v,ctor:g[1]==="."?Vt:g[1]==="?"?Zt:g[1]==="@"?Jt:W}),n.removeAttribute(h)}else h.startsWith(M)&&(d.push({type:6,index:s}),n.removeAttribute(h));if(He.test(n.tagName)){let h=n.textContent.split(M),$=h.length-1;if($>0){n.textContent=$t?$t.emptyScript:"";for(let v=0;v<$;v++)n.append(h[v],at()),G.nextNode(),d.push({type:2,index:++s});n.append(h[$],at())}}}else if(n.nodeType===8)if(n.data===Ge)d.push({type:2,index:s});else{let h=-1;for(;(h=n.data.indexOf(M,h+1))!==-1;)d.push({type:7,index:s}),h+=M.length-1}s++}}static createElement(t,e){let r=H.createElement("template");return r.innerHTML=t,r}};function B(o,t,e=o,r){if(t===j)return t;let n=r!==void 0?e._$Co?.[r]:e._$Cl,s=dt(t)?void 0:t._$litDirective$;return n?.constructor!==s&&(n?._$AO?.(!1),s===void 0?n=void 0:(n=new s(o),n._$AT(o,e,r)),r!==void 0?(e._$Co??=[])[r]=n:e._$Cl=n),n!==void 0&&(t=B(o,n._$AS(o,t.values),n,r)),t}var Yt=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:r}=this._$AD,n=(t?.creationScope??H).importNode(e,!0);G.currentNode=n;let s=G.nextNode(),i=0,a=0,d=r[0];for(;d!==void 0;){if(i===d.index){let p;d.type===2?p=new ct(s,s.nextSibling,this,t):d.type===1?p=new d.ctor(s,d.name,d.strings,this,t):d.type===6&&(p=new Xt(s,this,t)),this._$AV.push(p),d=r[++a]}i!==d?.index&&(s=G.nextNode(),i++)}return G.currentNode=H,n}p(t){let e=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++}},ct=class o{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,r,n){this.type=2,this._$AH=c,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=B(this,t,e),dt(t)?t===c||t==null||t===""?(this._$AH!==c&&this._$AR(),this._$AH=c):t!==this._$AH&&t!==j&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Xr(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==c&&dt(this._$AH)?this._$AA.nextSibling.data=t:this.T(H.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:r}=t,n=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=lt.createElement(je(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(e);else{let s=new Yt(n,this),i=s.u(this.options);s.p(e),this.T(i),this._$AH=s}}_$AC(t){let e=Ie.get(t.strings);return e===void 0&&Ie.set(t.strings,e=new lt(t)),e}k(t){te(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,r,n=0;for(let s of t)n===e.length?e.push(r=new o(this.O(at()),this.O(at()),this,this.options)):r=e[n],r._$AI(s),n++;n<e.length&&(this._$AR(r&&r._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let r=Oe(t).nextSibling;Oe(t).remove(),t=r}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},W=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,n,s){this.type=1,this._$AH=c,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=s,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=c}_$AI(t,e=this,r,n){let s=this.strings,i=!1;if(s===void 0)t=B(this,t,e,0),i=!dt(t)||t!==this._$AH&&t!==j,i&&(this._$AH=t);else{let a=t,d,p;for(t=s[0],d=0;d<s.length-1;d++)p=B(this,a[r+d],e,d),p===j&&(p=this._$AH[d]),i||=!dt(p)||p!==this._$AH[d],p===c?t=c:t!==c&&(t+=(p??"")+s[d+1]),this._$AH[d]=p}i&&!n&&this.j(t)}j(t){t===c?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},Vt=class extends W{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===c?void 0:t}},Zt=class extends W{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==c)}},Jt=class extends W{constructor(t,e,r,n,s){super(t,e,r,n,s),this.type=5}_$AI(t,e=this){if((t=B(this,t,e,0)??c)===j)return;let r=this._$AH,n=t===c&&r!==c||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,s=t!==c&&(r===c||n);n&&this.element.removeEventListener(this.name,this,r),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},Xt=class{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){B(this,t)}};var tn=Qt.litHtmlPolyfillSupport;tn?.(lt,ct),(Qt.litHtmlVersions??=[]).push("3.3.3");var Ke=(o,t,e)=>{let r=e?.renderBefore??t,n=r._$litPart$;if(n===void 0){let s=e?.renderBefore??null;r._$litPart$=n=new ct(t.insertBefore(at(),s),s,void 0,e??{})}return n._$AI(o),n};var re=globalThis,D=class extends N{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Ke(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return j}};D._$litElement$=!0,D.finalized=!0,re.litElementHydrateSupport?.({LitElement:D});var en=re.litElementPolyfillSupport;en?.({LitElement:D});(re.litElementVersions??=[]).push("4.2.2");var qe=[{endpoint:"astrology/aspects",method:"POST"},{endpoint:"astrology/transit-aspects",method:"POST"},{endpoint:"astrology/aspect-patterns",method:"POST"}];var Be=[{endpoint:"astrology/natal-chart",method:"POST"}];var We=[{endpoint:"astrology/natal-chart",method:"POST"}];function L(o){return o.toLowerCase().replace(/[\s_-]+/g," ").trim()}function z(o){return o?o.charAt(0).toUpperCase()+o.slice(1).toLowerCase():""}function wt(o){return o.replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([a-z])([0-9])/g,"$1 $2").replace(/^\w/,t=>t.toUpperCase())}var ne=(o,t)=>t?o[L(t)]:void 0,rn={sun:"☉",moon:"☽",mercury:"☿",venus:"♀",earth:"♁",mars:"♂",jupiter:"♃",saturn:"♄",uranus:"♅",neptune:"♆",pluto:"♇",rahu:"☊",ketu:"☋",ascendant:"Asc",midheaven:"MC","part of fortune":"⊗",vertex:"Vx",lagna:"La","north node":"☊","south node":"☋",chiron:"⚷",lilith:"⚸","black moon lilith":"⚸"},A=o=>ne(rn,o);var nn={aries:"♈",taurus:"♉",gemini:"♊",cancer:"♋",leo:"♌",virgo:"♍",libra:"♎",scorpio:"♏",sagittarius:"♐",capricorn:"♑",aquarius:"♒",pisces:"♓"},St=o=>ne(nn,o);var pt=["Aries","Taurus","Gemini","Cancer","Leo","Virgo","Libra","Scorpio","Sagittarius","Capricorn","Aquarius","Pisces"],on={conjunction:"☌",semisextile:"⚺","semi sextile":"⚺",semisquare:"∠","semi square":"∠",sextile:"⚹",square:"□",trine:"△",sesquiquadrate:"⚼",quincunx:"⚻",opposition:"☍"},Ye=o=>ne(on,o);var oe=/^\d{4}-\d{2}-\d{2}$/,sn=/^\d{4}-\d{2}$/,Je=/^\d{2}:\d{2}(:\d{2})?$/,an=/^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2}(\.\d+)?)?$/,Ve=new Map;function Y(o){if(!o)return["en"];let t=Ve.get(o);if(t)return[t,"en"];let e="en";try{e=Intl.getCanonicalLocales(o)[0]??"en"}catch{e="en"}return Ve.set(o,e),[e,"en"]}var Ze=new Map;function dn(o){let t=o??"",e=Ze.get(t);if(e)return e;let n={hour:new Intl.DateTimeFormat(Y(o),{timeStyle:"short",timeZone:"UTC"}).formatToParts(new Date(Date.UTC(2e3,0,1,1))).find(s=>s.type==="hour")?.value?.length===2?"2-digit":"numeric",minute:"2-digit"};return Ze.set(t,n),n}function Xe(o){let t=Je.test(o)?`1970-01-01T${o}`:oe.test(o)?`${o}T00:00:00`:sn.test(o)?`${o}-01T00:00:00`:an.test(o)?o.replace(" ","T"):null;return t?{d:new Date(`${t}Z`),timeZone:"UTC"}:{d:new Date(o)}}function ln(o,t){if(typeof t!="string"||t.length===0)return"";let{d:e,timeZone:r}=Xe(t);return Number.isNaN(e.getTime())?t:e.toLocaleDateString(Y(o),{month:"short",day:"numeric",year:"numeric",timeZone:r})}function Qe(o,t){let e=t.filter(Boolean);return e.length<2?e[0]??"":new Intl.ListFormat(Y(o),{style:"long",type:"conjunction"}).format(e)}function k(o,t,e=1){return typeof t!="number"||!Number.isFinite(t)?"":t.toLocaleString(Y(o),{maximumFractionDigits:e})}function Et(o,t,e=1){return typeof t!="number"||!Number.isFinite(t)?"":(t/100).toLocaleString(Y(o),{style:"percent",maximumFractionDigits:e})}function K(o){return(o.type??"").toLowerCase().trim().replace(/[\s_]+/g,"-")}function V(o){return z(K(o))}function Z(o,t,e,r=!1){let n=typeof t=="string"&&oe.test(t)&&typeof e=="string"&&Je.test(e)?`${t}T${e}`:t;if(typeof n!="string"||n.length===0)return"";if(oe.test(n))return ln(o,n);let{d:s,timeZone:i}=Xe(n);return Number.isNaN(s.getTime())?n:s.toLocaleString(Y(o),{month:"short",day:"numeric",year:"numeric",...dn(o),...r?{second:"2-digit"}:{},timeZone:i})}var se=w`.aspect-trine,.aspect-sextile{--_aspect:var(--roxy-info);--_aspect-ink:var(--roxy-info-fg)}.aspect-square,.aspect-opposition{--_aspect:var(--roxy-danger);--_aspect-ink:var(--roxy-danger-fg)}.aspect-quincunx,.aspect-semi-sextile{--_aspect:var(--roxy-success);--_aspect-ink:var(--roxy-success-fg)}.aspect-conjunction{--_aspect:var(--roxy-accent-ink);--_aspect-ink:var(--roxy-accent-ink)}:is(.aspect-trine,.aspect-sextile,.aspect-square,.aspect-opposition,.aspect-quincunx,.aspect-semi-sextile,.aspect-conjunction){color:var(--_aspect-ink);stroke-opacity:1}.aspect-swatch{inline-size:var(--roxy-space-sm);block-size:var(--roxy-space-sm);border-radius:var(--roxy-radius-full);background:var(--_aspect);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}`,rr=[w`.aspect{stroke:var(--_aspect,var(--roxy-muted));stroke-width:.8px;fill:none;opacity:.55;stroke-opacity:.7}`,se],cn=new Set(["conjunction","sextile","square","trine","opposition"]);function ie(o){return cn.has(K(o))}function J(o){return`aspect-${K(o)}`}var tr=.3,pn=.9,er=.5,hn=1.8;function nr(o){let{strength:t}=o;if(typeof t!="number"||!Number.isFinite(t))return;let e=Math.min(1,Math.max(0,t/100)),r=tr+e*(pn-tr),n=er+e*(hn-er);return`opacity:${r.toFixed(3)};stroke-width:${n.toFixed(3)}`}var un={attribute:!0,type:String,converter:st,reflect:!1,hasChanged:vt},mn=(o=un,t,e)=>{let{kind:r,metadata:n}=e,s=globalThis.litPropertyMetadata.get(n);if(s===void 0&&globalThis.litPropertyMetadata.set(n,s=new Map),r==="setter"&&((o=Object.create(o)).wrapped=!0),s.set(e.name,o),r==="accessor"){let{name:i}=e;return{set(a){let d=t.get.call(this);t.set.call(this,a),this.requestUpdate(i,d,o,!0,a)},init(a){return a!==void 0&&this.C(i,void 0,o,a),a}}}if(r==="setter"){let{name:i}=e;return function(a){let d=this[i];t.call(this,a),this.requestUpdate(i,d,o,!0,a)}}throw Error("Unsupported decorator location: "+r)};function S(o){return(t,e)=>typeof e=="object"?mn(o,t,e):((r,n,s)=>{let i=n.hasOwnProperty(s);return n.constructor.createProperty(s,r),i?Object.getOwnPropertyDescriptor(n,s):void 0})(o,t,e)}function _(o){return S({...o,state:!0,attribute:!1})}var O=o=>o??c;var or=["de","en","es","fr","hi","pt","ru","tr","zh-Hans","zh-Hant"];function de(o){if(o.lang)return o.lang;if(typeof document>"u")return;let t=o.closest?.("[lang]")?.getAttribute("lang");return t||document.documentElement.lang||void 0}var gn={tw:"hant",hk:"hant",mo:"hant",cn:"hans",sg:"hans",my:"hans"};function ae(o){let t=o.toLowerCase();return or.find(e=>e.toLowerCase()===t)}function sr(o){let t=de(o);if(!t)return;let e=ae(t);if(e)return e;let r=t.toLowerCase().split("-"),n=r[0];if(n==="zh"){let s=r.find(i=>i==="hans"||i==="hant")??gn[r[1]??""];return s?ae(`zh-${s}`):void 0}return ae(n)}var ir=`/**
4
- * Roxy UI design tokens: every colour, size, space, radius, font and duration a component reads.
5
- *
6
- * Two tiers. BASES are the few values a host tunes: fonts, base text size and its scale ratio, the
7
- * space unit, the base radius, motion, and the colour bases (bg, fg, accent and the four status
8
- * colours). Every other token DERIVES from them with calc() or color-mix(), so dark mode reassigns
9
- * the colour bases only and one font token restyles every heading. A host may still set any
10
- * derived token directly, and its value wins.
11
- *
12
- * Delivery: a global light-DOM stylesheet (linked, or injected by the CDN bundle). Custom properties
13
- * inherit through the shadow boundary, so a token set on any light-DOM ancestor reaches every
14
- * component. The :host selectors apply only if this sheet is adopted into a shadow root.
15
- *
16
- * Light is the default. Dark applies under prefers-color-scheme: dark, or [data-theme="dark"] or
17
- * .dark on the element or any ancestor; [data-theme="light"] or .light opts back into light. An
18
- * explicit choice wins over the OS because those blocks come later in source order.
19
- *
20
- * A derivation is computed where it is declared, so the derived block also matches every theme
21
- * trigger: a base reassigned on :root or on an element carrying data-theme, .light or .dark
22
- * re-derives everything below it.
23
- *
24
- * Font: --roxy-font-sans is unset by default, so every component inherits the host page font; any
25
- * value set by the host or a preset replaces it, and --roxy-font-display follows it until set.
26
- *
27
- * Motion: --roxy-motion-duration defaults to 200ms and prefers-reduced-motion forces 0ms.
28
- */
29
-
30
- /*
31
- * Two mechanisms keep the host page in charge of every token, and both are load bearing.
32
- *
33
- * Every rule sits in the roxy.tokens cascade layer, and an unlayered declaration beats a layered
34
- * one at ANY specificity, so a plain \`:root { --roxy-accent: #8b5cf6 }\` on the host page wins, and
35
- * so does the same line inside a layer of its own, because this statement registers ours first
36
- * and the CDN bundle injects this sheet at the top of <head>. A host that links this file after its
37
- * own CSS orders the layers itself: \`@layer roxy, base, components, utilities;\` before either sheet.
38
- *
39
- * Every selector is ALSO wrapped in :where(), which has ZERO specificity, so a host declaration
40
- * still wins wherever a layer cannot decide it, under every dark signal alike.
41
- *
42
- * The theme presets in styles/themes/*.css write into roxy.theme; both files declare this order,
43
- * so either one loading alone still ranks a preset above these defaults.
44
- */
45
- @layer roxy.tokens, roxy.theme;
46
-
47
- @layer roxy.tokens {
48
- /* Bases, light. Also the mode-specific derivations: accent ink and status inks mix toward black. */
49
- :where(:root, :host) {
50
- /* A real inherited property: native controls, popups and scrollbars follow it. */
51
- color-scheme: light;
52
-
53
- --roxy-bg: #ffffff;
54
- --roxy-fg: #0a0a0a;
55
- --roxy-accent: #4a6297;
56
- --roxy-success: #16a34a;
57
- --roxy-warning: #ea580c;
58
- --roxy-danger: #dc2626;
59
- --roxy-info: #0284c7;
60
-
61
- /* Accent and status inks: 70 percent toward black reads at AA on the card and on a tint of the base. */
62
- --roxy-accent-ink: color-mix(in oklab, var(--roxy-accent) 70%, black);
63
- --roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, black);
64
- --roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, black);
65
- --roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, black);
66
- --roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, black);
67
-
68
- /* Unset on purpose: a component inherits the host page font until a host or preset sets one. */
69
- --roxy-font-sans: initial;
70
- --roxy-font-mono:
71
- ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas,
72
- "Liberation Mono", monospace;
73
-
74
- --roxy-text-base: 1rem;
75
- --roxy-text-scale: 1.15;
76
- --roxy-weight-normal: 400;
77
- --roxy-weight-bold: 600;
78
- --roxy-leading-tight: 1.25;
79
- --roxy-leading-normal: 1.5;
80
- --roxy-tracking-tight: -0.01em;
81
- --roxy-tracking-normal: 0em;
82
-
83
- --roxy-space-unit: 0.25rem;
84
- --roxy-radius: 6px;
85
-
86
- --roxy-motion-duration: 200ms;
87
- --roxy-motion-easing: cubic-bezier(0.4, 0, 0.2, 1);
88
- }
89
-
90
- /* Derived roles, identical in every mode, restated on every theme trigger so they follow its bases. */
91
- :where(:root, :host, [data-theme], .light, .dark) {
92
- /* Flat: the card is the page colour, separated by a hairline. */
93
- --roxy-surface: var(--roxy-bg);
94
- --roxy-primary: var(--roxy-fg);
95
- --roxy-secondary: color-mix(in oklab, var(--roxy-fg) 78%, var(--roxy-bg));
96
- --roxy-muted: color-mix(in oklab, var(--roxy-fg) 60%, var(--roxy-bg));
97
- --roxy-border: color-mix(in oklab, var(--roxy-fg) 14%, var(--roxy-bg));
98
- --roxy-ring: color-mix(in srgb, var(--roxy-accent) 40%, transparent);
99
- --roxy-heat: var(--roxy-danger);
100
-
101
- --roxy-font-display: var(--roxy-font-sans);
102
-
103
- --roxy-text-sm: calc(var(--roxy-text-base) / var(--roxy-text-scale));
104
- --roxy-text-xs: calc(var(--roxy-text-sm) / var(--roxy-text-scale));
105
- --roxy-text-lg: calc(var(--roxy-text-base) * var(--roxy-text-scale));
106
- --roxy-text-xl: calc(
107
- var(--roxy-text-lg) *
108
- var(--roxy-text-scale) *
109
- var(--roxy-text-scale)
110
- );
111
-
112
- --roxy-space-xs: var(--roxy-space-unit);
113
- --roxy-space-sm: calc(var(--roxy-space-unit) * 2);
114
- --roxy-space-md: calc(var(--roxy-space-unit) * 4);
115
- --roxy-space-lg: calc(var(--roxy-space-unit) * 6);
116
- --roxy-space-xl: calc(var(--roxy-space-unit) * 10);
117
- --roxy-line-thick: calc(var(--roxy-space-unit) / 2);
118
- --roxy-touch: calc(var(--roxy-space-unit) * 11);
119
-
120
- --roxy-radius-sm: calc(var(--roxy-radius) / 2);
121
- --roxy-radius-md: var(--roxy-radius);
122
- --roxy-radius-lg: calc(var(--roxy-radius) * 5 / 3);
123
- --roxy-radius-full: 9999px;
124
-
125
- /* Flat surfaces cast nothing; only a floating layer (a popup, an enlarged chart) lifts. */
126
- --roxy-shadow-sm: none;
127
- --roxy-shadow-md: 0 4px 12px color-mix(in srgb, black 10%, transparent);
128
- --roxy-shadow-lg: 0 12px 32px color-mix(in srgb, black 18%, transparent);
129
- }
130
-
131
- /* Bases, dark, by system preference. Inks mix toward white so they read on a dark card. */
132
- @media (prefers-color-scheme: dark) {
133
- :where(:root, :host) {
134
- color-scheme: dark;
135
- --roxy-bg: #0a0a0a;
136
- --roxy-fg: #fafafa;
137
- --roxy-accent: #92aade;
138
- --roxy-success: #22c55e;
139
- --roxy-warning: #fb923c;
140
- --roxy-danger: #ef4444;
141
- --roxy-info: #38bdf8;
142
-
143
- --roxy-accent-ink: var(--roxy-accent);
144
- --roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, white);
145
- --roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, white);
146
- --roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, white);
147
- --roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, white);
148
- }
149
- }
150
-
151
- /* Explicit light: beats the OS dark block when the host chooses light. */
152
- :where(
153
- :root[data-theme="light"],
154
- [data-theme="light"],
155
- :root.light,
156
- .light,
157
- :host([data-theme="light"])
158
- ) {
159
- color-scheme: light;
160
- --roxy-bg: #ffffff;
161
- --roxy-fg: #0a0a0a;
162
- --roxy-accent: #4a6297;
163
- --roxy-success: #16a34a;
164
- --roxy-warning: #ea580c;
165
- --roxy-danger: #dc2626;
166
- --roxy-info: #0284c7;
167
-
168
- --roxy-accent-ink: color-mix(in oklab, var(--roxy-accent) 70%, black);
169
- --roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, black);
170
- --roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, black);
171
- --roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, black);
172
- --roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, black);
173
- }
174
-
175
- /* Explicit dark: a .dark class or data-theme="dark" on any ancestor themes every component below it. */
176
- :where(
177
- :root[data-theme="dark"],
178
- [data-theme="dark"],
179
- :root.dark,
180
- .dark,
181
- :host([data-theme="dark"])
182
- ) {
183
- color-scheme: dark;
184
- --roxy-bg: #0a0a0a;
185
- --roxy-fg: #fafafa;
186
- --roxy-accent: #92aade;
187
- --roxy-success: #22c55e;
188
- --roxy-warning: #fb923c;
189
- --roxy-danger: #ef4444;
190
- --roxy-info: #38bdf8;
191
-
192
- --roxy-accent-ink: var(--roxy-accent);
193
- --roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, white);
194
- --roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, white);
195
- --roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, white);
196
- --roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, white);
197
- }
198
-
199
- @media (prefers-reduced-motion: reduce) {
200
- :where(:root, :host) {
201
- --roxy-motion-duration: 0ms;
202
- }
203
- }
204
- }
205
- `;var Tt="roxy-ui-tokens";function At(){if(typeof document>"u")return null;let o=document.getElementById(Tt);if(o)return o;let t=document.createElement("style");return t.id=Tt,t.textContent=ir,document.head.prepend(t),t}var ar="__ROXY_UI_I18N__";function le(){let o=globalThis,t=o[ar];if(t)return t;let e={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return o[ar]=e,e}function yn(o,t){return t?o.replace(/\{\{(\w+)\}\}/g,(e,r)=>r in t?String(t[r]??""):e):o}function dr(o,t,e){return yn(fn(o,t)??t,e)}function fn(o,t){if(!o)return;let{catalogs:e}=le(),r=o.toLowerCase();return(e[r]??e[r.split("-")[0]])?.[L(t)]}function lr(o){if(!o)return;let{fieldLabels:t}=le(),e=o.toLowerCase();return t[e]??t[e.split("-")[0]]}function cr(o,t){return lr(o)?.fields[t]}function pr(o,t,e){return lr(o)?.enums[`${t}.${e}`]}function hr(o){let{listeners:t}=le();return t.add(o),()=>{t.delete(o)}}var Rt=class{constructor(t){this.host=t,t.addController(this)}hostConnected(){this.unsubscribe=hr(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var _t=class extends D{constructor(){super();this.translator=(e,r)=>this.t(e,r);new Rt(this)}connectedCallback(){super.connectedCallback(),At()}t(e,r){return dr(this.effectiveLang(),e,r)}effectiveLang(){return de(this)}};var ur=w`:where([part~=card]){background:var(--roxy-surface);color:var(--roxy-fg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-lg);box-shadow:var(--roxy-shadow-sm)}:where([part~=card] [part~=card],[part~=card] [part~=reading],[part~=card] .roxy-card){border:0;border-block-start:1px solid var(--roxy-border);box-shadow:none;background:0 0;border-radius:0;padding-inline:0}:host([bare]) [part~=card]{box-shadow:none;background:0 0;border:0;border-radius:0;padding:0}:where(h1,h2){color:var(--roxy-fg);font-size:var(--roxy-text-lg);font-weight:var(--roxy-weight-bold);line-height:var(--roxy-leading-tight);letter-spacing:var(--roxy-tracking-tight);text-wrap:balance}:where(h3,h4,h5,h6){color:var(--roxy-fg);font-size:var(--roxy-text-base);font-weight:var(--roxy-weight-bold);line-height:var(--roxy-leading-tight);letter-spacing:var(--roxy-tracking-normal);text-transform:none}:where(.roxy-label,th,dt){color:var(--roxy-muted);font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-normal);letter-spacing:var(--roxy-tracking-normal);text-transform:none}:where(.roxy-chips){gap:var(--roxy-space-xs);flex-wrap:wrap;margin:0;padding:0;list-style:none;display:flex}:where(.roxy-chip,.roxy-chips>li){align-items:center;gap:var(--roxy-space-xs);padding:calc(var(--roxy-space-unit) / 2) var(--roxy-space-sm);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-sm);color:var(--roxy-secondary);font-size:var(--roxy-text-xs);line-height:var(--roxy-leading-tight);overflow-wrap:anywhere;background:0 0;max-inline-size:100%;display:inline-flex}:where(.roxy-chip[data-tone=success],.roxy-chips>li[data-tone=success]){color:var(--roxy-success-fg)}:where(.roxy-chip[data-tone=warning],.roxy-chips>li[data-tone=warning]){color:var(--roxy-warning-fg)}:where(.roxy-chip[data-tone=danger],.roxy-chips>li[data-tone=danger]){color:var(--roxy-danger-fg)}:where(.roxy-chip[data-tone=info],.roxy-chips>li[data-tone=info]){color:var(--roxy-info-fg)}:where(table){border-collapse:collapse;font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums}:where(th,td){padding:var(--roxy-space-xs) var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);text-align:start;vertical-align:top}:where(summary){cursor:pointer}:where(a,button,summary,input,select,textarea,[tabindex]):focus-visible{outline:var(--roxy-line-thick) solid var(--roxy-ring);outline-offset:var(--roxy-line-thick)}:where(summary:focus-visible){border-radius:var(--roxy-radius-sm)}:where(input,select,textarea,button){font:inherit}:where(input:not([type=checkbox],[type=radio],[type=range]),select,textarea){padding:var(--roxy-space-xs) var(--roxy-space-sm);background:var(--roxy-bg);color:var(--roxy-fg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md)}`;var xn=w`:host{--roxy-label-col:minmax(0, 25%);--_mask:var(--roxy-surface);font-family:var(--roxy-font-sans);color:var(--roxy-fg);font-size:var(--roxy-text-base);line-height:var(--roxy-leading-normal);animation:roxy-fade-in var(--roxy-motion-duration) var(--roxy-motion-easing) both;background:0 0;display:block;container-type:inline-size}:host([bare]){--_mask:var(--roxy-bg)}:host([hidden]){display:none}: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)}@keyframes roxy-fade-in{0%{transform:translateY(calc(var(--roxy-space-unit) / 2))}to{transform:translateY(0)}}@media (prefers-reduced-motion:reduce){:host{animation:none}}.roxy-skeleton{background:linear-gradient(90deg, var(--roxy-border) 0%, color-mix(in srgb, var(--roxy-border) 60%, transparent) 50%, var(--roxy-border) 100%);border-radius:var(--roxy-radius-md);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);color:var(--roxy-muted);text-align:center;font-size:var(--roxy-text-sm)}.roxy-error{gap:var(--roxy-space-sm);padding:var(--roxy-space-lg);background:var(--roxy-surface);border:1px solid var(--roxy-danger);border-radius:var(--roxy-radius-md);color:var(--roxy-danger-fg);font-size:var(--roxy-text-sm);justify-items:start;display:grid}:host(:focus-within) .roxy-card{outline:var(--roxy-line-thick) solid var(--roxy-ring);outline-offset:var(--roxy-line-thick)}.roxy-attribution{margin-top:var(--roxy-space-sm);font-size:var(--roxy-text-xs);color:var(--roxy-muted);text-align:right}.roxy-attribution a{color:inherit;text-decoration:none}.roxy-attribution a:hover{color:var(--roxy-accent-ink);text-decoration:underline}.roxy-edit-bar{margin-bottom:var(--roxy-space-sm);justify-content:flex-end;display:flex}.roxy-edit{padding:var(--roxy-space-xs) var(--roxy-space-md);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);color:var(--roxy-fg);font-family:inherit;font-size:var(--roxy-text-sm);cursor:pointer;background:0 0}.roxy-edit:hover{border-color:var(--roxy-accent);color:var(--roxy-accent-ink)}.roxy-edit:disabled{cursor:progress;color:var(--roxy-muted)}roxy-endpoint-form+*{margin-top:var(--roxy-space-md)}.roxy-more{justify-items:center;gap:var(--roxy-space-sm);margin-top:var(--roxy-space-md);display:grid}.roxy-more .roxy-edit{min-height:var(--roxy-touch)}:host{font-variant-emoji:text}`,I=[xn,ur];var bn="__cols",vn="__rows";function $n(o){return typeof o=="object"&&o!==null&&!Array.isArray(o)}function Pt(o){if(Array.isArray(o)){let s=!1,i=o.map(a=>{let d=Pt(a);return d!==a&&(s=!0),d});return s?i:o}if(!$n(o))return o;let t=o[bn],e=o[vn];if(Array.isArray(t)&&Array.isArray(e)&&Object.keys(o).length===2)return e.map(s=>{let i={};return t.forEach((a,d)=>{i[a]=Pt(s[d])}),i});let r=!1,n={};for(let[s,i]of Object.entries(o)){let a=Pt(i);a!==i&&(r=!0),n[s]=a}return r?n:o}function mr(o){return Pt(o)}function gr(o,t){return o.find(e=>e.attrs&&Object.entries(e.attrs).every(([r,n])=>t[r]===n))??o[0]}var wn="pk_live_YOUR_KEY",yr={secret:{reason:"possible-secret-key",message:"Client-side components accept a pk_ publishable key only. Use a publishable key with an origin allowlist, or render server-side."},sample:{reason:"sample-key",message:"Replace the sample key with your own publishable key from your RoxyAPI account."}};function fr(o){if(o)return o===wn?yr.sample:o.startsWith("pk_")?void 0:yr.secret}function xr(o,t,e={}){e.warn&&console.warn(t.message),o.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:t.reason,message:t.message},bubbles:!0,composed:!0}))}var br="https://roxyapi.com/api/v2";async function Sn(o){try{let t=await o.json();if(t?.error){let e=t.code==="validation_error"&&Array.isArray(t.issues)?t.issues.filter(r=>typeof r.path=="string"&&typeof r.message=="string").map(r=>({path:r.path,message:r.message})):null;return{message:t.error,issues:e?.length?e:null,worded:!0}}}catch{}return{message:`Request failed (${o.status})`,issues:null,worded:!1}}var vr={fromAttribute:o=>{if(o!=null){try{let t=JSON.parse(o);if(t&&typeof t=="object"&&!Array.isArray(t))return t}catch{}console.warn("[roxy-ui] submit-context must be a JSON object; sending the request without it.")}}},X=class extends Error{constructor(e,r=null,n=!0){super(e);this.issues=r;this.worded=n}};function $r(o){return o.submitUrl?void 0:fr(o.publishableKey)}async function ce(o,t,e){let r=$r(o);if(r)throw new X(r.message);let n=o.submitUrl?await fetch(o.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:En(t,o.submitContext),signal:e}):await kn(o,t,e);if(!n.ok){let s=await Sn(n);throw new X(s.message,s.issues,s.worded)}return await n.json()}function En(o,t){return JSON.stringify(t?{...o,context:t}:o)}function kn(o,t,e){let r=new URL(`${o.baseUrl??br}${t.path}`,document.baseURI);for(let[s,i]of Object.entries(t.query??{}))i!=null&&r.searchParams.set(s,String(i));let n={Accept:"application/json"};return o.publishableKey&&(n["X-API-Key"]=o.publishableKey),t.body!=null&&(n["Content-Type"]="application/json"),fetch(r,{method:t.method??"GET",headers:n,body:t.body!=null?JSON.stringify(t.body):void 0,signal:e})}var Ct=class{constructor(t){this.baseUrl=br;this.worded=!0;this.host=t,t.addController(this)}hostDisconnected(){this.abort?.abort(),this.abort=void 0}async run(t){this.worded=!0;let e=$r(this);if(e){this.host.error=e.message,xr(this.host,e);return}this.abort?.abort();let r=new AbortController;this.abort=r,this.host.loading=!0,this.host.error=null,this.host.issues=null;try{let n=await ce(this,t,r.signal);if(r.signal.aborted)return;this.host.data=n}catch(n){if(r.signal.aborted||n?.name==="AbortError")return;n instanceof X&&(this.host.issues=n.issues),this.worded=n instanceof X&&n.worded,this.host.error=n instanceof Error?n.message:String(n)}finally{this.abort===r&&(this.abort=void 0),r.signal.aborted||(this.host.loading=!1)}}};function wr(o,t,e,r=[]){let n={...e},s=`/${o.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(p,u)=>{let h=n[u];return delete n[u],encodeURIComponent(String(h??""))}),i=new Set(r),a={},d={};for(let[p,u]of Object.entries(n))u===void 0||u===""||(t==="GET"||i.has(p)?a[p]=u:d[p]=u);return{path:s,method:t,query:a,body:t==="POST"?d:void 0}}function Lt(){return l`<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 Ot=w`summary{list-style:none}summary::-webkit-details-marker{display:none}.roxy-chevron{aspect-ratio:auto;width:.7lh;height:.7lh;color:var(--roxy-muted);transition:transform var(--roxy-motion-duration) var(--roxy-motion-easing);flex-shrink:0}details[open]>summary .roxy-chevron{transform:rotate(180deg)}@media (prefers-reduced-motion:reduce){.roxy-chevron{transition:none}}`;var Nt=w`.block{border-top:1px solid var(--roxy-border);padding-top:var(--roxy-space-md)}.block h3{margin:0 0 var(--roxy-space-sm)}.interp-card{padding-block:var(--roxy-space-sm)}.interp-card summary{font-weight:var(--roxy-weight-bold);color:var(--roxy-fg);align-items:center;gap:var(--roxy-space-sm);font-size:var(--roxy-text-sm);display:flex}.interp-lead{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;flex:auto;order:1;min-width:0;display:inline-flex}.interp-aside{align-items:center;gap:var(--roxy-space-sm);flex-shrink:0;order:2;display:inline-flex}.roxy-chevron{order:3}.interp-aside small{color:var(--roxy-muted);font-weight:var(--roxy-weight-normal);white-space:nowrap}@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);gap:var(--roxy-space-sm);color:var(--roxy-fg);font-size:var(--roxy-text-sm);line-height:var(--roxy-leading-normal);overflow-wrap:anywhere;display:grid}.interp-body p{margin:0}`;function ht(o){return o?.length?l`<div class="interp-keywords roxy-chips">${o.map(t=>l`<span class="roxy-chip">${t}</span>`)}</div>`:c}function pe(o,t){if(!o)return c;let e=(r,n)=>n?l`<p><strong>${t(r)}</strong> ${n}</p>`:c;return l`${o.summary?l`<p>${o.summary}</p>`:c} ${e("Impact:",o.impact)}${e("Timing:",o.timing)}${e("Guidance:",o.guidance)} ${ht(o.keywords)}`}function Sr(o,t,e){let r=o.filter(n=>!!n.body);return r.length===0?c:l`<section class="block" part="section readings"><h3>${e}</h3>${r.map((n,s)=>l`<details class="interp-card" part="reading" name="${t}" ?open="${s===0}"><summary><span class="interp-lead">${n.label}</span> ${Lt()} ${n.aside?l`<span class="interp-aside"><small>${n.aside}</small></span>`:c}</summary><div class="interp-body"><p>${n.body}</p>${n.extra??c}</div></details>`)}</section>`}var Tn="roxy-data";function An(o){return o.nodeName==="SCRIPT"&&o.getAttribute("type")==="application/json"}var Ft=class{constructor(t){this.host=t,t.addController(this)}hostConnected(){if(this.host.data!=null)return;let t=this.read();t!==void 0&&(this.host.data=t,this.host.requestUpdate())}read(){let t=this.findInlineScript();return t?this.parse(t.textContent):void 0}findInlineScript(){for(let t of Array.from(this.host.children))if(An(t)&&t.classList.contains(Tn))return t;return null}parse(t){if(t?.trim())try{return JSON.parse(t)}catch{return}}};var f=class extends _t{constructor(){super();this.data=null;this.endpoint="";this.remember=!1;this.hideReadings=!1;this.hideSections="";this.loading=!1;this.error=null;this.issues=null;this.selfFetched=!1;this.editing=!1;this.sticky=!1;this.hostLoaded=!1;this.moreLoading=!1;this.moreError=null;this.onMore=async()=>{let e=this.lastRequest,r=this.listKey,n=this.listRows();if(!(!e||!r||!n)){this.moreLoading=!0,this.moreError=null;try{let s=await ce(this.fetcher,{...e,query:{...e.query,offset:n.length}});if(this.lastRequest!==e)return;let i=s[r];this.data={...this.data,...s,[r]:[...n,...Array.isArray(i)?i:[]]}}catch(s){this.lastRequest===e&&(this.moreError=s instanceof Error?s.message:String(s))}finally{this.moreLoading=!1}}};this.onEdit=()=>{this.editing=!0};this.onFormSubmit=e=>{let r=this.selfFetch();if(!r)return;let n=e.detail;this.lastValues=n.values,this.sticky=!!n.sticky,this.selfFetched=!0,this.editing=!1,this.remember&&this.writeRemembered(n.values),this.fetchFresh(wr(r.endpoint,r.method,n.values,n.queryKeys??[]))};new Ft(this),this.fetcher=new Ct(this)}static{this.styles=[I]}static{this.endpoints=[]}willUpdate(e){if(e.has("data")&&this.data!=null){let r=mr(this.data);r!==this.data&&(this.data=r)}(e.has("publishableKey")||e.has("baseUrl")||e.has("submitUrl")||e.has("submitContext"))&&this.syncFetcher()}syncFetcher(){this.fetcher.publishableKey=this.publishableKey,this.baseUrl&&(this.fetcher.baseUrl=this.baseUrl),this.fetcher.submitUrl=this.submitUrl,this.fetcher.submitContext=this.submitContext}selfFetch(){let e=this.endpoint?{endpoint:this.endpoint,method:"POST"}:this.hostLoaded||!(this.publishableKey||this.submitUrl)?void 0:gr(this.constructor.endpoints,this);return e&&{endpoint:e.endpoint,method:this.method??e.method}}render(){return l`${this.hiddenSectionsStyle()}${this.renderState()}`}drawn(e){try{return this.renderData(e)}catch(r){return console.warn(`[roxy-ui] ${this.localName} could not draw its response`,r),this.dispatchEvent(new CustomEvent("roxy-render-error",{detail:{error:r},bubbles:!0,composed:!0})),customElements.get("roxy-data")?l`<roxy-data .data="${e}" lang="${O(this.effectiveLang())}"></roxy-data>`:this.renderEmpty()}}hiddenSectionsStyle(){let e=this.hideSections.split(",").map(n=>n.trim().toLowerCase()).filter(n=>/^[a-z][a-z0-9-]*$/.test(n));if(e.length===0)return c;let r=e.map(n=>`[part~="${n}"],roxy-endpoint-form::part(${n}){display:none!important}`).join("");return l`<style>${r}</style>`}renderState(){return this.selfFetch()&&this.sticky&&this.selfFetched&&!this.editing?this.renderWithForm(this.stickyBody()):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()?l`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data):this.renderNoData()}renderInterpretation(e,r,n){return this.hideReadings?c:Sr(e,r,this.t(n??"Reading"))}renderResult(e){let r=l`<div class="roxy-edit-bar" part="edit-bar"><button type="button" class="roxy-edit" @click="${this.onEdit}">${this.t("Edit query")}</button></div>${this.drawn(e)}`;return this.showAttribution()?l`${r}${this.renderAttribution()}`:r}renderWithForm(e){return l`${this.renderForm()}${e}`}stickyBody(){return this.loading?this.renderLoading():this.error!=null?this.issues?c:this.renderErrorBanner(this.error):this.data==null?c:this.showAttribution()?l`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data)}renderMore(){let e=this.listRows(),r=this.data?.total;return!this.lastRequest||!e||typeof r!="number"?c:e.length>=r?c:l`<div class="roxy-more" part="more"><button type="button" class="roxy-edit" ?disabled="${this.moreLoading}" aria-busy="${this.moreLoading?"true":"false"}" @click="${this.onMore}">${this.t("Show more")}</button> ${this.moreError?l`<p class="roxy-error" role="alert">${this.t(this.moreError)}</p>`:c}</div>`}listRows(){let e=this.listKey?this.data?.[this.listKey]:void 0;return Array.isArray(e)?e:void 0}fetchFresh(e){return this.lastRequest=e,this.openedRow=void 0,this.openedRowId=void 0,this.moreError=null,this.fetcher.run(e)}load(e){return this.hostLoaded=!0,this.syncFetcher(),this.fetchFresh(e)}pickRow(e){this.dispatchEvent(new CustomEvent("roxy-symbol-select",{detail:e,bubbles:!0,composed:!0})),this.openRow(e.id)}openRow(e){if(!this.rowDetail||!(this.publishableKey||this.submitUrl))return;let r=this.openedRow??document.createElement(this.rowDetail.tag);r.publishableKey=this.publishableKey,r.baseUrl=this.baseUrl,r.submitUrl=this.submitUrl,r.submitContext=this.submitContext,r.hideReadings=this.hideReadings,r.hideSections=this.hideSections;let n=this.effectiveLang();n&&r.setAttribute("lang",n),this.openedRow=r,this.openedRowId=e,r.load({path:`/${this.rowDetail.path.replace("{id}",encodeURIComponent(e))}`,method:"GET",query:{lang:sr(this)}}).then(()=>r.scrollIntoView?.({block:"nearest"}))}showAttribution(){return this.attribution!=null&&this.attribution!=="off"&&this.attribution!=="false"}renderAttribution(){return l`<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.selfFetch()?this.renderWithForm(c):this.renderEmpty()}renderForm(){let e=this.selfFetch();return l`<roxy-endpoint-form part="form" exportparts="hint" data-endpoint="${e?.endpoint??""}" method="${e?.method??"POST"}" spec-url="${O(this.specUrl)}" publishable-key="${O(this.publishableKey)}" location-url="${O(this.locationUrl)}" submit-label="${O(this.submitLabel)}" lang="${O(this.effectiveLang())}" .initialValues="${this.formInitialValues()}" .serverIssues="${this.issues}" .apiRoute="${this.fetcher}" .autoload="${!this.selfFetched}" .fullPages="${!!this.listKey}" @roxy-submit="${this.onFormSubmit}"></roxy-endpoint-form>`}formInitialValues(){return this.lastValues??(this.remember?this.readRemembered():void 0)}rememberKey(){return`roxy-ui:form:${this.selfFetch()?.endpoint??""}`}readRemembered(){try{let e=sessionStorage.getItem(this.rememberKey());return e?JSON.parse(e):void 0}catch{return}}writeRemembered(e){try{sessionStorage.setItem(this.rememberKey(),JSON.stringify(e))}catch{}}renderEmpty(){return l`<div class="roxy-empty" role="status" part="empty">${this.t("No data")}</div>`}renderLoading(){return l`<div class="roxy-skeleton" style="height:5lh" role="status" aria-label="${this.t("Loading")}" part="loading"></div>`}renderError(e){let r=!!this.selfFetch();if(r&&this.issues)return this.renderForm();let n=this.renderErrorBanner(e);return r?l`${n}${this.renderForm()}`:n}renderErrorBanner(e){return l`<div class="roxy-error" role="alert" part="error">${!this.fetcher.worded&&this.errorMessage||this.t(e)}</div>`}};y([S({attribute:!1})],f.prototype,"data",2),y([S({type:String,attribute:"data-endpoint"})],f.prototype,"endpoint",2),y([S({type:String})],f.prototype,"method",2),y([S({type:String,attribute:"publishable-key"})],f.prototype,"publishableKey",2),y([S({type:String,attribute:"base-url"})],f.prototype,"baseUrl",2),y([S({type:String,attribute:"spec-url"})],f.prototype,"specUrl",2),y([S({type:String,attribute:"submit-url"})],f.prototype,"submitUrl",2),y([S({attribute:"submit-context",converter:vr})],f.prototype,"submitContext",2),y([S({type:String,attribute:"location-url"})],f.prototype,"locationUrl",2),y([S({type:Boolean})],f.prototype,"remember",2),y([S({type:Boolean,attribute:"hide-readings",reflect:!0})],f.prototype,"hideReadings",2),y([S({type:String,attribute:"hide-sections",reflect:!0})],f.prototype,"hideSections",2),y([S({type:String,attribute:"submit-label"})],f.prototype,"submitLabel",2),y([S({type:String,attribute:"error-message"})],f.prototype,"errorMessage",2),y([S({type:String})],f.prototype,"attribution",2),y([_()],f.prototype,"loading",2),y([_()],f.prototype,"error",2),y([_()],f.prototype,"issues",2),y([_()],f.prototype,"selfFetched",2),y([_()],f.prototype,"editing",2),y([_()],f.prototype,"sticky",2),y([_()],f.prototype,"openedRow",2),y([_()],f.prototype,"openedRowId",2),y([_()],f.prototype,"moreLoading",2),y([_()],f.prototype,"moreError",2);var Q=o=>t=>{customElements.get(o)||customElements.define(o,t)};var Mt=w`.roxy-facts{gap:var(--roxy-space-sm) var(--roxy-space-lg);margin:var(--roxy-space-sm) 0 0;font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums;flex-wrap:wrap;display:flex}.roxy-facts>div{min-width:0}.roxy-facts dd{overflow-wrap:anywhere;margin:0}`;function q(o,t,e){return cr(o,t)??e??wt(t)}function Er(o,t,e,r){return pr(o,t,e)??r??wt(e)}var kr="Localized";function b(o,t,e){let r=o,n=r?.[`${t}${kr}`];if(typeof n=="string"&&n!=="")return n;if(e!==void 0)return e;let s=r?.[t];return typeof s=="string"?s:""}function Tr(o,t){let e=o,r=e?.[t];if(!Array.isArray(r))return[];let n=e?.[`${t}${kr}`],s=Array.isArray(n)?n:[];return r.map((i,a)=>{let d=s[a];return{value:String(i),label:typeof d=="string"&&d!==""?d:String(i)}})}function Rn(o,t,e){if(o.include?.length){let r={bodies:Qe(t,o.include)};return o.strictOrbs?e("Detected with strict orbs, including {{bodies}}.",r):e("Detected with industry-standard orbs, including {{bodies}}.",r)}return o.strictOrbs?e("Detected with strict orbs, classical bodies only."):e("Detected with industry-standard orbs, classical bodies only.")}var Ar={GRAND_CROSS:0,GRAND_TRINE:1,KITE:2,T_SQUARE:3,YOD:4,MYSTIC_RECTANGLE:5,STELLIUM:6},tt=class extends f{renderData(t){let e="aspects"in t?t.aspects??[]:[],r="patterns"in t?t.patterns??[]:[],n="summary"in t?t.summary:void 0;if(e.length===0&&r.length===0)return this.renderEmpty();let s=Z(this.effectiveLang(),"transitDate"in t?t.transitDate:"date"in t?t.date:"","time"in t?t.time:void 0,!0),i="timezone"in t?t.timezone:void 0,a="options"in t?t.options:void 0;return l`<div class="wrap" part="card" aria-label="${this.t("Aspects")}"><div class="head" part="header"><h2>${e.length===0?this.t("Chart patterns"):this.t("Aspects")}</h2>${e.length>0||s?l`<p class="subtitle roxy-label">${[e.length===1?this.t("1 aspect"):e.length>1?this.t("{{count}} aspects",{count:e.length}):"",s].filter(Boolean).join(" · ")}</p>`:c} ${typeof i=="number"&&Number.isFinite(i)?l`<dl class="roxy-facts" part="details"><div><dt>${q(this.effectiveLang(),"timezone")}</dt><dd>${k(this.effectiveLang(),i,5)}</dd></div></dl>`:c}</div>${n?this.renderSummary(n):c} ${n&&"strongest"in n&&n.strongest?this.renderStrongest(n.strongest):c} ${e.length>0?l`<div role="list" part="section aspects" aria-label="${this.t("Aspect list")}">${e.map((d,p)=>l`<div role="listitem">${this.renderAspect(d,p)}</div>`)}</div>`:c} ${r.length>0?l`<section class="patterns" part="section patterns"><h3>${this.t("Chart patterns")}</h3>${[...r].sort((d,p)=>(Ar[d.kind]??9)-(Ar[p.kind]??9)||(p.tightness??0)-(d.tightness??0)).map(d=>this.renderPattern(d))}</section>`:c} ${a?l`<p class="provenance">${Rn(a,this.effectiveLang(),this.translator)}</p>`:c}</div>`}renderSummary(t){let e="totalAspects"in t?t.totalAspects:t.total,r=Object.entries(t.byType??{}).sort((n,s)=>s[1]-n[1]);return l`<p class="counts" part="details" role="region" aria-label="${this.t("Aspect summary")}">${typeof e=="number"?l`<span>${this.t("Total")}: ${e}</span>`:c} <span class="harmonious">${this.t("Harmonious: {{count}}",{count:t.harmonious})}</span> <span class="challenging">${this.t("Challenging: {{count}}",{count:t.challenging})}</span> <span>${this.t("Neutral: {{count}}",{count:t.neutral})}</span> ${r.map(([n,s])=>l`<span>${V({type:n})}: ${s}</span>`)}</p>`}renderStrongest(t){let e=A(t.planet1)??"",r=A(t.planet2)??"";return l`<div class="strongest" part="details strongest"><span class="roxy-label">${this.t("Strongest")}</span> <span aria-hidden="true" class="glyph">${e}</span>${b(t,"planet1")} <span class="asp-name ${J(t)}">${b(t,"type",V(t))}</span> <span aria-hidden="true" class="glyph">${r}</span>${b(t,"planet2")} <span class="meta">${this.t("{{status}} · orb {{orb}}° · str {{strength}}",{status:t.isApplying?this.t("Applying"):this.t("Separating"),orb:k(this.effectiveLang(),t.orb,2),strength:k(this.effectiveLang(),t.strength,0)})}</span></div>`}renderAspect(t,e){let r=A(t.planet1)??"",n=A(t.planet2)??"",s=V(t),i=t.isApplying?this.t("Applying"):this.t("Separating"),a="meaning"in t?t.meaning:void 0,d="transitInterpretation"in t?t.transitInterpretation:void 0,p="aspectInterpretation"in t?t.aspectInterpretation:void 0,u=!!(a||d||p),h=l`<span aria-hidden="true" class="glyph">${r}</span>${b(t,"planet1")} <span class="asp-name ${J(t)}">${b(t,"type",s)}</span> <span aria-hidden="true" class="glyph">${n}</span>${b(t,"planet2")} <span class="meta">${this.t("{{status}} · orb {{orb}}° · str {{strength}}",{status:i,orb:k(this.effectiveLang(),t.orb,2),strength:k(this.effectiveLang(),t.strength,0)})}</span>`;return!u||this.hideReadings?l`<div class="interp-card" part="reading"><div class="static-head">${h}</div></div>`:l`<details class="interp-card" part="reading" name="aspects" ?open="${e===0}"><summary>${h}${Lt()}</summary><div class="interp-body" part="readings">${a?this.renderMeaning(a):c} ${d?this.renderTransit(d):c} ${p?pe(p,this.translator):c}</div></details>`}renderMeaning(t){return l`${t.description?.short?l`<p>${t.description.short}</p>`:c} ${t.description?.long&&t.description.long!==t.description.short?l`<p>${t.description.long}</p>`:c} ${ht(t.keywords)}`}renderTransit(t){return pe(t,this.translator)}renderPattern(t){let e=t.planets??[],r=t.apex?[...e].sort((n,s)=>+(s===t.apex)-+(n===t.apex)):e;return l`<div class="pattern" part="pattern"><div class="pattern-head"><span class="pattern-name">${t.name??t.kind??this.t("Pattern")}</span> ${t.element?l`<span class="roxy-chip">${t.element}</span>`:c} ${t.modality?l`<span class="roxy-chip">${t.modality}</span>`:c} ${t.dissociate?l`<span class="roxy-chip" title="${this.t("Out of sign: one or more planets sit outside the pattern element or modality, so the theme holds but runs weaker.")}">${this.t("Dissociate")}</span>`:c} ${typeof t.tightness=="number"?l`<span class="pattern-tight roxy-label">${this.t("{{percent}} tight",{percent:Et(this.effectiveLang(),t.tightness,0)})}</span>`:c}</div>${r.length?l`<ul class="roxy-chips">${r.map(n=>{let s=A(n),i=!!t.apex&&n===t.apex;return l`<li class="${i?"roxy-chip apex":"roxy-chip"}">${s?l`<span aria-hidden="true">${s}</span>`:c}${n}${i?l`<span>${this.t("apex")}</span>`:c}</li>`})}</ul>`:c} ${t.interpretation&&!this.hideReadings?l`<p class="pattern-interp">${t.interpretation}</p>`:c}</div>`}};tt.endpoints=qe,tt.styles=[I,Mt,Ot,Nt,se,w`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}.head{gap:var(--roxy-space-xs);display:grid}.counts{gap:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.harmonious{color:var(--roxy-info-fg)}.challenging{color:var(--roxy-danger-fg)}.interp-card summary,.static-head{align-items:center;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.static-head{font-size:var(--roxy-text-sm)}.meta{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-normal);font-variant-numeric:tabular-nums;margin-inline-start:auto}.glyph{line-height:1}.asp-name{font-weight:var(--roxy-weight-bold)}.strongest,.pattern{padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border)}.strongest{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.pattern{gap:var(--roxy-space-xs);display:grid}.pattern-head{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.pattern-name{font-weight:var(--roxy-weight-bold)}.pattern-tight{font-variant-numeric:tabular-nums;margin-inline-start:auto}.roxy-chip.apex{color:var(--roxy-fg);border-color:var(--roxy-accent);font-weight:var(--roxy-weight-bold)}.pattern-interp{font-size:var(--roxy-text-sm)}.provenance{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}`],tt=y([Q("roxy-aspects-table")],tt);function P(o){let t=o%360;return t<0?t+360:t}function he(o){let t=P(o),e=Math.floor(t/30)%12,r=t%30,n=Math.floor(r),s=(r-n)*60,i=Math.floor(s),a=Math.round((s-i)*60);return{sign:pt[e]??"Aries",signIndex:e,degree:n,minute:i,second:a}}function ue(o,t){let{sign:e,degree:r,minute:n}=he(o);return`${r}° ${t||e} ${String(n).padStart(2,"0")}'`}function Dt(o){return Pn(P(o)%30)}function _n(o){let t=Math.floor(o);return{degree:t,minute:Math.floor((o-t)*60)}}function Pn(o){let{degree:t,minute:e}=_n(o);return`${t}°${String(e).padStart(2,"0")}'`}function me(o){return P(o+180)}function Rr(o,t){let e=P(o),r=P(t)-e;return r<0&&(r+=360),P(e+r/2)}function ge(o,t,e){let r=o.filter(p=>Number.isFinite(t(p))).map(p=>{let u=P(t(p));return{item:p,longitude:u,displayLongitude:u}}).sort((p,u)=>p.longitude-u.longitude),n=r.length;if(n<2)return r;let s=0,i=-1;for(let p=0;p<n;p++){let u=r[(p+n-1)%n],$=(r[p].longitude-u.longitude+360)%360;$>i&&(i=$,s=p)}let a=r[s],d=a.longitude;for(let p=1;p<n;p++){let u=r[(s+p)%n],h=typeof e=="function"?e(a.item,u.item):e,$=u.longitude+(s+p>=n?360:0);d=Math.max($,d+h),u.displayLongitude=P(d),a=u}return r}var zt=2;function _r(o,t){let e=o*Math.PI/180;return t.width/2*Math.abs(Math.cos(e))+t.height/2*Math.abs(Math.sin(e))}function ye(o,t,e,r){let n=o*Math.PI/180,s=(i,a)=>a>1e-9?(i+r)/a:Number.POSITIVE_INFINITY;return Math.min(s((t.width+e.width)/2,Math.abs(Math.cos(n))),s((t.height+e.height)/2,Math.abs(Math.sin(n))))}var Cn=(o,t)=>Math.abs(o.x-t.x)<(o.width+t.width)/2&&Math.abs(o.y-t.y)<(o.height+t.height)/2;function Pr(o,t){let e=[],r=n=>e.reduce((s,i)=>Cn(n,i)?Math.max(s,Math.min((n.width+i.width)/2-Math.abs(n.x-i.x),(n.height+i.height)/2-Math.abs(n.y-i.y))):s,0);return[...o].map((n,s)=>({point:n,index:s})).sort((n,s)=>n.point.displayLongitude-s.point.displayLongitude).reduce((n,{point:s,index:i})=>{let a=t(s,0),d=t(s,1),p=r(a)===0||r(a)<=r(d)?0:1;return e.push(p===0?a:d),n[i]=p,n},[])}function It(o,t){return t>0?o/t*(180/Math.PI):0}function E(o,t,e,r){let n=r*Math.PI/180;return{x:o+e*Math.cos(n),y:t+e*Math.sin(n)}}var et=class extends f{rows(){let t=this.data;if(!t)return[];let e=(t.planets??[]).map(n=>({name:n.name,label:b(n,"name"),sign:n.sign,signLabel:b(n,"sign"),longitude:n.longitude,latitude:n.latitude,house:n.house,speed:n.speed,isRetrograde:n.isRetrograde,dignity:n.dignity})),r=[["Ascendant",t.ascendant],["Midheaven",t.midheaven],["Part of Fortune",t.partOfFortune],["Vertex",t.vertex]];for(let[n,s]of r)s&&e.push({name:n,label:this.t(n),sign:s.sign,signLabel:b(s,"sign"),longitude:s.longitude,house:"house"in s?s.house:void 0,sect:"sect"in s?s.sect:void 0,isPoint:!0});return e}renderData(t){if(!t.planets)return this.renderEmpty();let e=this.rows(),r=t.birthDetails,n=e.some(a=>Number.isFinite(a.latitude)),s=e.some(a=>a.sect),i=["latitude","longitude","timezone"];return l`<div class="wrap" part="card"><header part="header"><h2>${this.t("Planetary positions")}</h2>${r?l`<div part="details"><p class="roxy-label">${Z(this.effectiveLang(),r.date,r.time,!0)}</p><dl class="roxy-facts">${i.map(a=>l`<div><dt>${q(this.effectiveLang(),a)}</dt><dd>${k(this.effectiveLang(),r[a],5)}</dd></div>`)}</dl></div>`:c}</header><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Western planetary positions")}"><table part="table"><caption class="roxy-sr-only">${this.t("Western planetary positions: each body with its sign, degree, house, essential dignity and motion. The dignity cell is blank for the lunar nodes, Chiron and Lilith, which rule no sign and therefore hold no dignity at all.")}</caption><thead><tr><th scope="col">${this.t("Body")}</th><th scope="col">${this.t("Sign")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("Longitude")}</th>${n?l`<th scope="col">${q(this.effectiveLang(),"latitude")}</th>`:c}<th scope="col">${this.t("House")}</th><th scope="col">${this.t("Dignity")}</th><th scope="col">${this.t("Motion")}</th>${s?l`<th scope="col">${this.t("Sect")}</th>`:c}</tr></thead><tbody>${e.map(a=>{let d=A(a.name)??"",p=a.sect==="day"?this.t("Daytime"):a.sect==="night"?this.t("Night"):"",u=St(a.sign)??"",h=typeof a.speed=="number"?k(this.effectiveLang(),a.speed,6):"";return l`<tr class="${a.isPoint?"point":""}"><td class="body">${d?l`<span class="glyph">${d}</span>`:c}${a.label}</td><td>${u?l`<span class="glyph">${u}</span>`:c}${a.signLabel??""}</td><td>${typeof a.longitude=="number"?ue(a.longitude,a.signLabel):""}</td><td>${typeof a.longitude=="number"?`${k(this.effectiveLang(),a.longitude,5)}°`:c}</td>${n?l`<td>${typeof a.latitude=="number"?`${k(this.effectiveLang(),a.latitude,5)}°`:c}</td>`:c}<td>${typeof a.house=="number"?a.house:""}</td><td class="dignity">${a.dignity?z(a.dignity):""}</td><td>${h?l`${h}${this.t("°/day")}`:c} ${a.isRetrograde?l`<span class="retro">℞</span>`:c}</td>${s?l`<td>${p}</td>`:c}</tr>`})}</tbody></table></div>${t.houses?.length?l`<details part="section houses"><summary>${this.t("Houses")}</summary><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Houses")}"><table part="table"><thead><tr><th scope="col">${this.t("House")}</th><th scope="col">${this.t("Sign")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("Longitude")}</th></tr></thead><tbody>${t.houses.map(a=>l`<tr><th scope="row">${k(this.effectiveLang(),a.number,0)}</th><td>${b(a,"sign")}</td><td>${ue(a.longitude,b(a,"sign"))}</td><td>${k(this.effectiveLang(),a.longitude,5)}°</td></tr>`)}</tbody></table></div></details>`:c}</div>`}};et.endpoints=We,et.styles=[I,Mt,w`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}h2{overflow-wrap:anywhere}.scroll{min-width:0;overflow-x:auto}table{width:100%}:is(th,td){white-space:nowrap}tr:not(.point)+tr.point>*{border-block-start:1px solid var(--roxy-secondary)}td.body{font-weight:var(--roxy-weight-bold)}.glyph{color:var(--roxy-muted);margin-inline-end:var(--roxy-space-xs)}.retro{color:var(--roxy-danger-fg);font-weight:var(--roxy-weight-bold)}details>summary{font-weight:var(--roxy-weight-bold)}details>.scroll{margin-block-start:var(--roxy-space-sm)}`],et=y([Q("roxy-western-planets-table")],et);var Ut=class{constructor(t){this.host=t;this.state="closed";this.zoom=1;this.pressedBy="";this.press=t=>{this.pressedBy=t.pointerType};this.openOnMouse=t=>{let e=this.pressedBy==="mouse";this.pressedBy="",e&&(t.target?.closest?.("a, button, summary, input, select, textarea")||getSelection()?.toString()||this.open())};t.addController(this)}hostUpdated(){let t=this.host.renderRoot.querySelector(".roxy-chart-dialog");if(!t)this.reset();else if(t.isConnected&&this.state!=="closed"){this.state==="opening"&&(this.state="open",t.open||t.showModal());let e=t.querySelector(".roxy-chart-scroll");t.open&&e&&this.position&&(e.scrollLeft=e.scrollWidth*this.position.x-e.clientWidth/2,e.scrollTop=e.scrollHeight*this.position.y-e.clientHeight/2,this.position=void 0)}}hostDisconnected(){this.reset(),this.host.renderRoot.querySelector(".roxy-chart-dialog")?.close()}open(){this.state="opening",this.position={x:.5,y:0},this.host.requestUpdate()}reset(){this.state="closed",this.zoom=1,this.position=void 0}resize(t){let e=this.host.renderRoot.querySelector(".roxy-chart-scroll");this.position=t===0?{x:.5,y:0}:e?{x:(e.scrollLeft+e.clientWidth/2)/e.scrollWidth,y:(e.scrollTop+e.clientHeight/2)/e.scrollHeight}:void 0,this.zoom=t===0?1:Math.min(3,Math.max(1,this.zoom+t)),this.host.requestUpdate()}renderChartViewport(t,e,r){return l`<div class="roxy-chart-view"><div class="roxy-chart-hit" @pointerdown="${this.press}" @click="${this.openOnMouse}">${t}</div><div class="roxy-chart-tools" part="chart-controls"><button type="button" @click="${()=>this.open()}">${r("Enlarge chart")}</button></div><dialog class="roxy-chart-dialog" part="chart-dialog" aria-label="${e}" @close="${()=>{this.reset(),this.host.requestUpdate()}}">${this.state!=="closed"?l`<div class="roxy-chart-bar"><strong>${e}</strong><div class="roxy-chart-tools"><button type="button" aria-label="${r("Zoom out")}" ?disabled="${this.zoom===1}" @click="${()=>this.resize(-.5)}">−</button> <button type="button" @click="${()=>this.resize(0)}">${r("Reset zoom")}</button> <button type="button" aria-label="${r("Zoom in")}" ?disabled="${this.zoom===3}" @click="${()=>this.resize(.5)}">+</button> <button type="button" @click="${()=>this.host.renderRoot.querySelector(".roxy-chart-dialog")?.close()}">${r("Close")}</button></div></div><div class="roxy-chart-scroll" role="region" tabindex="0" aria-label="${e}"><div class="roxy-chart-expanded" style="${`--chart-zoom:${this.zoom}`}">${t}</div></div>`:c}</dialog></div>`}},Cr=w`.roxy-chart-view{min-width:0}@media (hover:hover) and (pointer:fine){.roxy-chart-hit{cursor:zoom-in}}.roxy-chart-tools{gap:var(--roxy-space-sm);flex-wrap:wrap;justify-content:flex-end;align-items:center;display:flex}.roxy-chart-tools button{font-size:var(--roxy-text-sm);color:var(--roxy-secondary);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);min-width:2lh;min-height:2lh;padding:var(--roxy-space-xs) var(--roxy-space-sm);cursor:pointer;background:0 0}.roxy-chart-tools button:hover:not(:disabled){border-color:var(--roxy-accent);color:var(--roxy-accent-ink)}.roxy-chart-tools button:disabled{color:var(--roxy-muted);cursor:default}.roxy-chart-dialog{--roxy-surface:var(--roxy-bg);width:calc(100% - 2 * var(--roxy-space-md));max-width:calc(var(--roxy-chart-expanded-width,60rem) * 1.2);max-height:calc(100% - 2 * var(--roxy-space-md));padding:var(--roxy-space-md);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-lg);color:var(--roxy-fg);background:var(--roxy-bg);box-shadow:var(--roxy-shadow-lg);margin:auto}.roxy-chart-dialog[open]{flex-direction:column;display:flex;overflow:hidden}.roxy-chart-dialog::backdrop{background:color-mix(in oklab, var(--roxy-bg) 85%, transparent)}.roxy-chart-bar{justify-content:space-between;align-items:center;gap:var(--roxy-space-md);margin-bottom:var(--roxy-space-md);flex-wrap:wrap;flex-shrink:0;display:flex}.roxy-chart-bar>strong{overflow-wrap:anywhere;min-width:0}.roxy-chart-scroll{overscroll-behavior:contain;flex:auto;min-height:0;overflow:auto}.roxy-chart-expanded{width:max(100%, calc(var(--roxy-chart-expanded-width,60rem) * var(--chart-zoom)));padding:var(--roxy-space-sm)}.roxy-chart-expanded>svg{width:100%;max-width:none;height:auto;margin:0}`;var Lr=w`.roxy-tablist{gap:var(--roxy-space-xs);box-shadow:inset 0 calc(var(--roxy-line-thick) * -1) 0 var(--roxy-border);scrollbar-width:thin;min-width:0;display:flex;overflow-x:auto}.roxy-tab{padding:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-sm);border:none;border-bottom:var(--roxy-line-thick) solid transparent;cursor:pointer;color:var(--roxy-muted);transition:color var(--roxy-motion-duration) var(--roxy-motion-easing);background:0 0;flex-shrink:0}.roxy-tab[aria-selected=true]{color:var(--roxy-accent-ink);border-bottom-color:var(--roxy-accent);font-weight:var(--roxy-weight-bold)}.roxy-tab:hover:not([aria-selected=true]){color:var(--roxy-fg)}.roxy-tab:focus-visible{outline-offset:calc(var(--roxy-line-thick) * -1);border-radius:var(--roxy-radius-sm)}`;function Or(o){let{items:t,active:e,onSelect:r,label:n,idPrefix:s,controls:i=!1}=o;return l`<div class="roxy-tablist" part="tablist" role="tablist" aria-label="${n}" @keydown="${d=>{if(d.key!=="ArrowRight"&&d.key!=="ArrowLeft")return;d.preventDefault();let p=t.findIndex(v=>v.id===e);if(p===-1)return;let u=d.key==="ArrowRight"?1:-1,h=t[(p+u+t.length)%t.length];if(!h)return;r(h.id);let $=d.currentTarget.getRootNode();requestAnimationFrame(()=>{$.querySelector(`#${s}-tab-${h.id}`)?.focus()})}}">${t.map(d=>l`<button type="button" class="roxy-tab" part="tab" role="tab" id="${s}-tab-${d.id}" aria-selected="${e===d.id?"true":"false"}" aria-controls="${i?`${s}-panel-${d.id}`:c}" tabindex="${e===d.id?"0":"-1"}" @click="${()=>r(d.id)}">${d.label}</button>`)}</div>${i?t.filter(d=>d.id!==e).map(d=>l`<div role="tabpanel" id="${s}-panel-${d.id}" aria-labelledby="${s}-tab-${d.id}" hidden></div>`):c}`}var Gt=class{constructor(t,e){this.host=t,this.marks=e,this.size=Object.fromEntries(Object.keys(e).map(r=>[r,e[r][1]])),t.addController(this)}hostConnected(){typeof ResizeObserver>"u"||(this.observer=new ResizeObserver(()=>this.host.requestUpdate()),this.observer.observe(this.host))}hostDisconnected(){this.observer?.disconnect(),this.observer=void 0}hostUpdated(){let t=!1;for(let e of Object.keys(this.marks)){let[r]=this.marks[e],n=Ln(this.host.renderRoot,r,this.size[e]);n!==this.size[e]&&(this.size[e]=n,t=!0)}t&&this.host.requestUpdate()}};function Ln(o,t,e){let r=o?.querySelector(t);if(!r||typeof getComputedStyle!="function")return e;let n=Number.parseFloat(getComputedStyle(r).fontSize);return Number.isFinite(n)&&n>0?n:e}var Nr={GRAND_CROSS:0,GRAND_TRINE:1,KITE:2,T_SQUARE:3,YOD:4,MYSTIC_RECTANGLE:5,STELLIUM:6},be=540,m=be/2,rt=220,fe=202,ut=174,mt=144,On=232,xe=249,jt={glyph:14,degree:7},Nn=.95,Fn=3.4,Mn=1.85,Dn=1.25,zn=.9,In=28,Un=13,Ht=84,F=class extends f{constructor(){super(...arguments);this.viewport=new Ut(this);this.heading="Natal chart";this.view="wheel";this.type=new Gt(this,{glyph:[".planet-glyph",jt.glyph],degree:[".planet-deg",jt.degree]})}getPlanets(){return this.data?.planets??[]}getAscendant(){return this.data?.ascendant?.longitude??0}getMidheaven(){let e=this.data?.midheaven?.longitude;return typeof e=="number"?e:null}get hasCusps(){return(this.data?.houses??[]).length===12}toAngle(e){return 180+this.getAscendant()-e}renderData(e){let r=this.getPlanets(),n=e.aspects??[],s=this.view;return l`<div class="wrap" part="card"><header part="header"><h2>${this.t(this.heading)}</h2>${e.birthDetails?l`<p class="roxy-label">${Z(this.effectiveLang(),e.birthDetails.date,e.birthDetails.time)}</p>`:c}</header>${n.length>0?l`${Or({items:[{id:"wheel",label:this.t("Wheel")},{id:"grid",label:this.t("Aspect grid")}],active:s,onSelect:i=>{this.view=i},label:this.t("Natal chart views"),idPrefix:"natal",controls:!0})}<div id="natal-panel-${s}" part="panel" role="tabpanel" aria-labelledby="natal-tab-${s}">${s==="wheel"?this.renderWheel(r,n):this.renderAspectGrid(r,n)}</div>`:this.renderWheel(r,n)}<div class="legend" part="legend"><span>${this.t("Positions")}: ${k(this.effectiveLang(),r.length,0)}</span> ${n.length>0?l`<span>${this.t("{{count}} aspects",{count:s==="grid"?n.length:n.filter(ie).length})}</span>`:c} ${this.hasCusps&&e.houseSystem?l`<span>${q(this.effectiveLang(),"houseSystem")}: ${Er(this.effectiveLang(),"houseSystem",e.houseSystem)}</span>`:l`<span class="caveat">${this.t("Equal sectors from the Ascendant, no house cusps in this response")}</span>`} ${n.length>0?l`<span><span class="aspect-swatch aspect-trine"></span>${this.t("Harmonious aspects")}</span> <span><span class="aspect-swatch aspect-square"></span>${this.t("Challenging aspects")}</span>`:c}</div>${this.renderPositionDetails(e)} ${this.renderDetails()} ${this.renderPatterns()} ${this.renderAspectDetails(n)} ${this.renderInterpretations()}</div>`}renderWheel(e,r){return this.viewport.renderChartViewport(l`<svg viewBox="0 0 ${be} ${be}" part="chart" role="img" aria-label="${this.hasCusps?this.t("Natal chart wheel with twelve houses, planets, and aspects"):this.t("Natal chart wheel with planets and aspects, houses shown as equal sectors from the Ascendant")}"><title>${this.t("Natal chart wheel")}</title><desc>${this.t("Twelve zodiac sign segments around a circular wheel. Planet glyphs are placed at their ecliptic longitudes. Aspect lines connect related planets.")}</desc><circle class="wheel-line" cx="${m}" cy="${m}" r="${rt}" stroke-width="1.5"/><circle class="wheel-line" cx="${m}" cy="${m}" r="${fe-14}" stroke-width="0.8"/><circle class="wheel-line" cx="${m}" cy="${m}" r="${ut}" stroke-width="1"/><circle class="wheel-line" cx="${m}" cy="${m}" r="${Ht}" stroke-width="0.5"/>${this.renderTicks()} ${this.renderSpokes()} ${this.renderSigns()} ${this.renderHouseNumbers()} ${this.renderCuspDegrees()} ${this.renderAspects(e,r)} ${this.renderPlanets(e)} ${this.renderAngles()}</svg>`,this.t(this.heading),this.translator)}renderAspectGrid(e,r){let n=e.map(a=>({name:a.name,label:b(a,"name")})),s=(a,d)=>[L(a),L(d)].sort().join("|"),i=new Map;for(let a of r)i.set(s(a.planet1,a.planet2),a);return n.length===0?l`<p class="roxy-empty" role="status">${this.t("No planets to grid")}</p>`:l`<div class="scroll" part="section aspects table aspect-grid" tabindex="0" role="region" aria-label="${this.t("Aspect grid")}"><table class="aspect-grid"><caption class="roxy-sr-only">${this.t("Planet by planet aspect grid: the aspect each pair of planets forms, read from the planet naming the row across to the planet naming the column.")}</caption><thead><tr><td></td>${n.slice(0,-1).map(a=>{let d=A(a.name)??a.label;return l`<th scope="col" title="${a.label}">${d}</th>`})}</tr></thead><tbody>${n.slice(1).map((a,d)=>{let p=A(a.name)??a.label;return l`<tr><th scope="row" title="${a.label}">${p}</th>${n.slice(0,d+1).map(u=>{let h=i.get(s(a.name,u.name));if(!h)return l`<td></td>`;let $=K(h),v=Ye($)??b(h,"type",V(h)),g=k(this.effectiveLang(),h.orb,1);return l`<td class="${`cell ${J(h)}`}" title="${`${a.label} ${b(h,"type",$)} ${u.label}${g?` (${this.t("Orb")} ${g}°)`:""}`}"><span class="asp">${v}</span></td>`})} ${n.slice(d+1,-1).map(()=>l`<td></td>`)}</tr>`})}</tbody></table></div>`}renderAngles(){let e=this.getAscendant(),r=this.getMidheaven(),n=[{longitude:e,label:this.t("ASC")},{longitude:me(e),label:this.t("DSC")}];r!==null&&(n.push({longitude:r,label:this.t("MC")}),n.push({longitude:me(r),label:this.t("IC")}));let s=this.data?.partOfFortune?.longitude;typeof s=="number"&&n.push({longitude:P(s),label:this.t("PoF")});let i=this.data?.vertex?.longitude;return typeof i=="number"&&n.push({longitude:P(i),label:this.t("Vtx")}),ge(n,a=>a.longitude,It(In,xe)).map(({item:a,longitude:d,displayLongitude:p})=>this.renderAngleMark(d,p,a.label))}renderAngleMark(e,r,n){let s=this.toAngle(e),i=this.toAngle(r),a=E(m,m,rt,s),d=E(m,m,On,s),p=E(m,m,xe,i),u=Math.abs(r-e)>.5,h=E(m,m,xe-8,i);return R`
3
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),De=/'/g,ze=/"/g,He=/^(?:script|style|textarea|title)$/i,ee=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),l=ee(1),R=ee(2),Wn=ee(3),j=Symbol.for("lit-noChange"),c=Symbol.for("lit-nothing"),Ie=new WeakMap,G=H.createTreeWalker(H,129);function je(o,t){if(!te(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ne!==void 0?Ne.createHTML(t):t}var Qr=(o,t)=>{let e=o.length-1,r=[],n,s=t===2?"<svg>":t===3?"<math>":"",i=it;for(let a=0;a<e;a++){let d=o[a],p,u,h=-1,$=0;for(;$<d.length&&(i.lastIndex=$,u=i.exec(d),u!==null);)$=i.lastIndex,i===it?u[1]==="!--"?i=Fe:u[1]!==void 0?i=Me:u[2]!==void 0?(He.test(u[2])&&(n=RegExp("</"+u[2],"g")),i=U):u[3]!==void 0&&(i=U):i===U?u[0]===">"?(i=n??it,h=-1):u[1]===void 0?h=-2:(h=i.lastIndex-u[2].length,p=u[1],i=u[3]===void 0?U:u[3]==='"'?ze:De):i===ze||i===De?i=U:i===Fe||i===Me?i=it:(i=U,n=void 0);let v=i===U&&o[a+1].startsWith("/>")?" ":"";s+=i===it?d+Jr:h>=0?(r.push(p),d.slice(0,h)+Ue+d.slice(h)+M+v):d+M+(h===-2?a:v)}return[je(o,s+(o[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},lt=class o{constructor({strings:t,_$litType$:e},r){let n;this.parts=[];let s=0,i=0,a=t.length-1,d=this.parts,[p,u]=Qr(t,e);if(this.el=o.createElement(p,r),G.currentNode=this.el.content,e===2||e===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(n=G.nextNode())!==null&&d.length<a;){if(n.nodeType===1){if(n.hasAttributes())for(let h of n.getAttributeNames())if(h.endsWith(Ue)){let $=u[i++],v=n.getAttribute(h).split(M),g=/([.?@])?(.*)/.exec($);d.push({type:1,index:s,name:g[2],strings:v,ctor:g[1]==="."?Vt:g[1]==="?"?Zt:g[1]==="@"?Jt:W}),n.removeAttribute(h)}else h.startsWith(M)&&(d.push({type:6,index:s}),n.removeAttribute(h));if(He.test(n.tagName)){let h=n.textContent.split(M),$=h.length-1;if($>0){n.textContent=$t?$t.emptyScript:"";for(let v=0;v<$;v++)n.append(h[v],at()),G.nextNode(),d.push({type:2,index:++s});n.append(h[$],at())}}}else if(n.nodeType===8)if(n.data===Ge)d.push({type:2,index:s});else{let h=-1;for(;(h=n.data.indexOf(M,h+1))!==-1;)d.push({type:7,index:s}),h+=M.length-1}s++}}static createElement(t,e){let r=H.createElement("template");return r.innerHTML=t,r}};function B(o,t,e=o,r){if(t===j)return t;let n=r!==void 0?e._$Co?.[r]:e._$Cl,s=dt(t)?void 0:t._$litDirective$;return n?.constructor!==s&&(n?._$AO?.(!1),s===void 0?n=void 0:(n=new s(o),n._$AT(o,e,r)),r!==void 0?(e._$Co??=[])[r]=n:e._$Cl=n),n!==void 0&&(t=B(o,n._$AS(o,t.values),n,r)),t}var Yt=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:r}=this._$AD,n=(t?.creationScope??H).importNode(e,!0);G.currentNode=n;let s=G.nextNode(),i=0,a=0,d=r[0];for(;d!==void 0;){if(i===d.index){let p;d.type===2?p=new ct(s,s.nextSibling,this,t):d.type===1?p=new d.ctor(s,d.name,d.strings,this,t):d.type===6&&(p=new Xt(s,this,t)),this._$AV.push(p),d=r[++a]}i!==d?.index&&(s=G.nextNode(),i++)}return G.currentNode=H,n}p(t){let e=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++}},ct=class o{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,r,n){this.type=2,this._$AH=c,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=B(this,t,e),dt(t)?t===c||t==null||t===""?(this._$AH!==c&&this._$AR(),this._$AH=c):t!==this._$AH&&t!==j&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Xr(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==c&&dt(this._$AH)?this._$AA.nextSibling.data=t:this.T(H.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:r}=t,n=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=lt.createElement(je(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(e);else{let s=new Yt(n,this),i=s.u(this.options);s.p(e),this.T(i),this._$AH=s}}_$AC(t){let e=Ie.get(t.strings);return e===void 0&&Ie.set(t.strings,e=new lt(t)),e}k(t){te(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,r,n=0;for(let s of t)n===e.length?e.push(r=new o(this.O(at()),this.O(at()),this,this.options)):r=e[n],r._$AI(s),n++;n<e.length&&(this._$AR(r&&r._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let r=Oe(t).nextSibling;Oe(t).remove(),t=r}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},W=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,n,s){this.type=1,this._$AH=c,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=s,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=c}_$AI(t,e=this,r,n){let s=this.strings,i=!1;if(s===void 0)t=B(this,t,e,0),i=!dt(t)||t!==this._$AH&&t!==j,i&&(this._$AH=t);else{let a=t,d,p;for(t=s[0],d=0;d<s.length-1;d++)p=B(this,a[r+d],e,d),p===j&&(p=this._$AH[d]),i||=!dt(p)||p!==this._$AH[d],p===c?t=c:t!==c&&(t+=(p??"")+s[d+1]),this._$AH[d]=p}i&&!n&&this.j(t)}j(t){t===c?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},Vt=class extends W{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===c?void 0:t}},Zt=class extends W{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==c)}},Jt=class extends W{constructor(t,e,r,n,s){super(t,e,r,n,s),this.type=5}_$AI(t,e=this){if((t=B(this,t,e,0)??c)===j)return;let r=this._$AH,n=t===c&&r!==c||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,s=t!==c&&(r===c||n);n&&this.element.removeEventListener(this.name,this,r),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},Xt=class{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){B(this,t)}};var tn=Qt.litHtmlPolyfillSupport;tn?.(lt,ct),(Qt.litHtmlVersions??=[]).push("3.3.3");var Ke=(o,t,e)=>{let r=e?.renderBefore??t,n=r._$litPart$;if(n===void 0){let s=e?.renderBefore??null;r._$litPart$=n=new ct(t.insertBefore(at(),s),s,void 0,e??{})}return n._$AI(o),n};var re=globalThis,D=class extends N{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Ke(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return j}};D._$litElement$=!0,D.finalized=!0,re.litElementHydrateSupport?.({LitElement:D});var en=re.litElementPolyfillSupport;en?.({LitElement:D});(re.litElementVersions??=[]).push("4.2.2");var qe=[{endpoint:"astrology/aspects",method:"POST"},{endpoint:"astrology/transit-aspects",method:"POST"},{endpoint:"astrology/aspect-patterns",method:"POST"}];var Be=[{endpoint:"astrology/natal-chart",method:"POST"}];var We=[{endpoint:"astrology/natal-chart",method:"POST"}];function L(o){return o.toLowerCase().replace(/[\s_-]+/g," ").trim()}function z(o){return o?o.charAt(0).toUpperCase()+o.slice(1).toLowerCase():""}function wt(o){return o.replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([a-z])([0-9])/g,"$1 $2").replace(/^\w/,t=>t.toUpperCase())}var ne=(o,t)=>t?o[L(t)]:void 0,rn={sun:"☉",moon:"☽",mercury:"☿",venus:"♀",earth:"♁",mars:"♂",jupiter:"♃",saturn:"♄",uranus:"♅",neptune:"♆",pluto:"♇",rahu:"☊",ketu:"☋",ascendant:"Asc",midheaven:"MC","part of fortune":"⊗",vertex:"Vx",lagna:"La","north node":"☊","south node":"☋",chiron:"⚷",lilith:"⚸","black moon lilith":"⚸"},A=o=>ne(rn,o);var nn={aries:"♈",taurus:"♉",gemini:"♊",cancer:"♋",leo:"♌",virgo:"♍",libra:"♎",scorpio:"♏",sagittarius:"♐",capricorn:"♑",aquarius:"♒",pisces:"♓"},St=o=>ne(nn,o);var pt=["Aries","Taurus","Gemini","Cancer","Leo","Virgo","Libra","Scorpio","Sagittarius","Capricorn","Aquarius","Pisces"],on={conjunction:"☌",semisextile:"⚺","semi sextile":"⚺",semisquare:"∠","semi square":"∠",sextile:"⚹",square:"□",trine:"△",sesquiquadrate:"⚼",quincunx:"⚻",opposition:"☍"},Ye=o=>ne(on,o);var oe=/^\d{4}-\d{2}-\d{2}$/,sn=/^\d{4}-\d{2}$/,Je=/^\d{2}:\d{2}(:\d{2})?$/,an=/^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2}(\.\d+)?)?$/,Ve=new Map;function Y(o){if(!o)return["en"];let t=Ve.get(o);if(t)return[t,"en"];let e="en";try{e=Intl.getCanonicalLocales(o)[0]??"en"}catch{e="en"}return Ve.set(o,e),[e,"en"]}var Ze=new Map;function dn(o){let t=o??"",e=Ze.get(t);if(e)return e;let n={hour:new Intl.DateTimeFormat(Y(o),{timeStyle:"short",timeZone:"UTC"}).formatToParts(new Date(Date.UTC(2e3,0,1,1))).find(s=>s.type==="hour")?.value?.length===2?"2-digit":"numeric",minute:"2-digit"};return Ze.set(t,n),n}function Xe(o){let t=Je.test(o)?`1970-01-01T${o}`:oe.test(o)?`${o}T00:00:00`:sn.test(o)?`${o}-01T00:00:00`:an.test(o)?o.replace(" ","T"):null;return t?{d:new Date(`${t}Z`),timeZone:"UTC"}:{d:new Date(o)}}function ln(o,t){if(typeof t!="string"||t.length===0)return"";let{d:e,timeZone:r}=Xe(t);return Number.isNaN(e.getTime())?t:e.toLocaleDateString(Y(o),{month:"short",day:"numeric",year:"numeric",timeZone:r})}function Qe(o,t){let e=t.filter(Boolean);return e.length<2?e[0]??"":new Intl.ListFormat(Y(o),{style:"long",type:"conjunction"}).format(e)}function T(o,t,e=1){return typeof t!="number"||!Number.isFinite(t)?"":t.toLocaleString(Y(o),{maximumFractionDigits:e})}function Et(o,t,e=1){return typeof t!="number"||!Number.isFinite(t)?"":(t/100).toLocaleString(Y(o),{style:"percent",maximumFractionDigits:e})}function K(o){return(o.type??"").toLowerCase().trim().replace(/[\s_]+/g,"-")}function V(o){return z(K(o))}function Z(o,t,e,r=!1){let n=typeof t=="string"&&oe.test(t)&&typeof e=="string"&&Je.test(e)?`${t}T${e}`:t;if(typeof n!="string"||n.length===0)return"";if(oe.test(n))return ln(o,n);let{d:s,timeZone:i}=Xe(n);return Number.isNaN(s.getTime())?n:s.toLocaleString(Y(o),{month:"short",day:"numeric",year:"numeric",...dn(o),...r?{second:"2-digit"}:{},timeZone:i})}var se=w`.aspect-trine,.aspect-sextile{--_aspect:var(--roxy-info);--_aspect-ink:var(--roxy-info-fg)}.aspect-square,.aspect-opposition{--_aspect:var(--roxy-danger);--_aspect-ink:var(--roxy-danger-fg)}.aspect-quincunx,.aspect-semi-sextile{--_aspect:var(--roxy-success);--_aspect-ink:var(--roxy-success-fg)}.aspect-conjunction{--_aspect:var(--roxy-accent-ink);--_aspect-ink:var(--roxy-accent-ink)}:is(.aspect-trine,.aspect-sextile,.aspect-square,.aspect-opposition,.aspect-quincunx,.aspect-semi-sextile,.aspect-conjunction){color:var(--_aspect-ink);stroke-opacity:1}.aspect-swatch{inline-size:var(--roxy-space-sm);block-size:var(--roxy-space-sm);border-radius:var(--roxy-radius-full);background:var(--_aspect);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}`,rr=[w`.aspect{stroke:var(--_aspect,var(--roxy-muted));stroke-width:.8px;fill:none;opacity:.55;stroke-opacity:.7}`,se],cn=new Set(["conjunction","sextile","square","trine","opposition"]);function ie(o){return cn.has(K(o))}function J(o){return`aspect-${K(o)}`}var tr=.3,pn=.9,er=.5,hn=1.8;function nr(o){let{strength:t}=o;if(typeof t!="number"||!Number.isFinite(t))return;let e=Math.min(1,Math.max(0,t/100)),r=tr+e*(pn-tr),n=er+e*(hn-er);return`opacity:${r.toFixed(3)};stroke-width:${n.toFixed(3)}`}var un={attribute:!0,type:String,converter:st,reflect:!1,hasChanged:vt},mn=(o=un,t,e)=>{let{kind:r,metadata:n}=e,s=globalThis.litPropertyMetadata.get(n);if(s===void 0&&globalThis.litPropertyMetadata.set(n,s=new Map),r==="setter"&&((o=Object.create(o)).wrapped=!0),s.set(e.name,o),r==="accessor"){let{name:i}=e;return{set(a){let d=t.get.call(this);t.set.call(this,a),this.requestUpdate(i,d,o,!0,a)},init(a){return a!==void 0&&this.C(i,void 0,o,a),a}}}if(r==="setter"){let{name:i}=e;return function(a){let d=this[i];t.call(this,a),this.requestUpdate(i,d,o,!0,a)}}throw Error("Unsupported decorator location: "+r)};function S(o){return(t,e)=>typeof e=="object"?mn(o,t,e):((r,n,s)=>{let i=n.hasOwnProperty(s);return n.constructor.createProperty(s,r),i?Object.getOwnPropertyDescriptor(n,s):void 0})(o,t,e)}function _(o){return S({...o,state:!0,attribute:!1})}var O=o=>o??c;var or=["de","en","es","fr","hi","pt","ru","tr","zh-Hans","zh-Hant"];function de(o){if(o.lang)return o.lang;if(typeof document>"u")return;let t=o.closest?.("[lang]")?.getAttribute("lang");return t||document.documentElement.lang||void 0}var gn={tw:"hant",hk:"hant",mo:"hant",cn:"hans",sg:"hans",my:"hans"};function ae(o){let t=o.toLowerCase();return or.find(e=>e.toLowerCase()===t)}function sr(o){let t=de(o);if(!t)return;let e=ae(t);if(e)return e;let r=t.toLowerCase().split("-"),n=r[0];if(n==="zh"){let s=r.find(i=>i==="hans"||i==="hant")??gn[r[1]??""];return s?ae(`zh-${s}`):void 0}return ae(n)}var ir='@layer roxy.tokens,roxy.theme;@layer roxy.tokens{:where(:root,:host){color-scheme:light;--roxy-bg: #ffffff;--roxy-fg: #0a0a0a;--roxy-accent: #4a6297;--roxy-success: #16a34a;--roxy-warning: #ea580c;--roxy-danger: #dc2626;--roxy-info: #0284c7;--roxy-accent-ink: color-mix(in oklab, var(--roxy-accent) 70%, black);--roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, black);--roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, black);--roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, black);--roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, black);--roxy-font-sans: initial;--roxy-font-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, "Liberation Mono", monospace;--roxy-text-base: 1rem;--roxy-text-scale: 1.15;--roxy-weight-normal: 400;--roxy-weight-bold: 600;--roxy-leading-tight: 1.25;--roxy-leading-normal: 1.5;--roxy-tracking-tight: -0.01em;--roxy-tracking-normal: 0em;--roxy-space-unit: 0.25rem;--roxy-radius: 6px;--roxy-motion-duration: 200ms;--roxy-motion-easing: cubic-bezier(0.4, 0, 0.2, 1)}:where(:root,:host,[data-theme],.light,.dark){--roxy-surface: var(--roxy-bg);--roxy-primary: var(--roxy-fg);--roxy-secondary: color-mix(in oklab, var(--roxy-fg) 78%, var(--roxy-bg));--roxy-muted: color-mix(in oklab, var(--roxy-fg) 60%, var(--roxy-bg));--roxy-border: color-mix(in oklab, var(--roxy-fg) 14%, var(--roxy-bg));--roxy-ring: color-mix(in srgb, var(--roxy-accent) 40%, transparent);--roxy-heat: var(--roxy-danger);--roxy-font-display: var(--roxy-font-sans);--roxy-text-sm: calc(var(--roxy-text-base) / var(--roxy-text-scale));--roxy-text-xs: calc(var(--roxy-text-sm) / var(--roxy-text-scale));--roxy-text-lg: calc(var(--roxy-text-base) * var(--roxy-text-scale));--roxy-text-xl: calc( var(--roxy-text-lg) * var(--roxy-text-scale) * var(--roxy-text-scale) );--roxy-space-xs: var(--roxy-space-unit);--roxy-space-sm: calc(var(--roxy-space-unit) * 2);--roxy-space-md: calc(var(--roxy-space-unit) * 4);--roxy-space-lg: calc(var(--roxy-space-unit) * 6);--roxy-space-xl: calc(var(--roxy-space-unit) * 10);--roxy-line-thick: calc(var(--roxy-space-unit) / 2);--roxy-touch: calc(var(--roxy-space-unit) * 11);--roxy-radius-sm: calc(var(--roxy-radius) / 2);--roxy-radius-md: var(--roxy-radius);--roxy-radius-lg: calc(var(--roxy-radius) * 5 / 3);--roxy-radius-full: 9999px;--roxy-shadow-sm: none;--roxy-shadow-md: 0 4px 12px color-mix(in srgb, black 10%, transparent);--roxy-shadow-lg: 0 12px 32px color-mix(in srgb, black 18%, transparent)}@media(prefers-color-scheme:dark){:where(:root,:host){color-scheme:dark;--roxy-bg: #0a0a0a;--roxy-fg: #fafafa;--roxy-accent: #92aade;--roxy-success: #22c55e;--roxy-warning: #fb923c;--roxy-danger: #ef4444;--roxy-info: #38bdf8;--roxy-accent-ink: var(--roxy-accent);--roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, white);--roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, white);--roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, white);--roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, white)}}:where(:root[data-theme=light],[data-theme=light],:root.light,.light,:host([data-theme="light"])){color-scheme:light;--roxy-bg: #ffffff;--roxy-fg: #0a0a0a;--roxy-accent: #4a6297;--roxy-success: #16a34a;--roxy-warning: #ea580c;--roxy-danger: #dc2626;--roxy-info: #0284c7;--roxy-accent-ink: color-mix(in oklab, var(--roxy-accent) 70%, black);--roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, black);--roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, black);--roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, black);--roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, black)}:where(:root[data-theme=dark],[data-theme=dark],:root.dark,.dark,:host([data-theme="dark"])){color-scheme:dark;--roxy-bg: #0a0a0a;--roxy-fg: #fafafa;--roxy-accent: #92aade;--roxy-success: #22c55e;--roxy-warning: #fb923c;--roxy-danger: #ef4444;--roxy-info: #38bdf8;--roxy-accent-ink: var(--roxy-accent);--roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, white);--roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, white);--roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, white);--roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, white)}@media(prefers-reduced-motion:reduce){:where(:root,:host){--roxy-motion-duration: 0ms}}}';var kt="roxy-ui-tokens";function At(){if(typeof document>"u")return null;let o=document.getElementById(kt);if(o)return o;let t=document.createElement("style");return t.id=kt,t.textContent=ir,document.head.prepend(t),t}var ar="__ROXY_UI_I18N__";function le(){let o=globalThis,t=o[ar];if(t)return t;let e={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return o[ar]=e,e}function yn(o,t){return t?o.replace(/\{\{(\w+)\}\}/g,(e,r)=>r in t?String(t[r]??""):e):o}function dr(o,t,e){return yn(fn(o,t)??t,e)}function fn(o,t){if(!o)return;let{catalogs:e}=le(),r=o.toLowerCase();return(e[r]??e[r.split("-")[0]])?.[L(t)]}function lr(o){if(!o)return;let{fieldLabels:t}=le(),e=o.toLowerCase();return t[e]??t[e.split("-")[0]]}function cr(o,t){return lr(o)?.fields[t]}function pr(o,t,e){return lr(o)?.enums[`${t}.${e}`]}function hr(o){let{listeners:t}=le();return t.add(o),()=>{t.delete(o)}}var Rt=class{constructor(t){this.host=t,t.addController(this)}hostConnected(){this.unsubscribe=hr(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var _t=class extends D{constructor(){super();this.translator=(e,r)=>this.t(e,r);new Rt(this)}connectedCallback(){super.connectedCallback(),At()}t(e,r){return dr(this.effectiveLang(),e,r)}effectiveLang(){return de(this)}};var ur=w`:where([part~=card]){background:var(--roxy-surface);color:var(--roxy-fg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-lg);box-shadow:var(--roxy-shadow-sm)}:where([part~=card] [part~=card],[part~=card] [part~=reading],[part~=card] .roxy-card){border:0;border-block-start:1px solid var(--roxy-border);box-shadow:none;background:0 0;border-radius:0;padding-inline:0}:host([bare]) [part~=card]{box-shadow:none;background:0 0;border:0;border-radius:0;padding:0}:where(h1,h2){color:var(--roxy-fg);font-size:var(--roxy-text-lg);font-weight:var(--roxy-weight-bold);line-height:var(--roxy-leading-tight);letter-spacing:var(--roxy-tracking-tight);text-wrap:balance}:where(h3,h4,h5,h6){color:var(--roxy-fg);font-size:var(--roxy-text-base);font-weight:var(--roxy-weight-bold);line-height:var(--roxy-leading-tight);letter-spacing:var(--roxy-tracking-normal);text-transform:none}:where(.roxy-label,th,dt){color:var(--roxy-muted);font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-normal);letter-spacing:var(--roxy-tracking-normal);text-transform:none}:where(.roxy-chips){gap:var(--roxy-space-xs);flex-wrap:wrap;margin:0;padding:0;list-style:none;display:flex}:where(.roxy-chip,.roxy-chips>li){align-items:center;gap:var(--roxy-space-xs);padding:calc(var(--roxy-space-unit) / 2) var(--roxy-space-sm);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-sm);color:var(--roxy-secondary);font-size:var(--roxy-text-xs);line-height:var(--roxy-leading-tight);overflow-wrap:anywhere;background:0 0;max-inline-size:100%;display:inline-flex}:where(.roxy-chip[data-tone=success],.roxy-chips>li[data-tone=success]){color:var(--roxy-success-fg)}:where(.roxy-chip[data-tone=warning],.roxy-chips>li[data-tone=warning]){color:var(--roxy-warning-fg)}:where(.roxy-chip[data-tone=danger],.roxy-chips>li[data-tone=danger]){color:var(--roxy-danger-fg)}:where(.roxy-chip[data-tone=info],.roxy-chips>li[data-tone=info]){color:var(--roxy-info-fg)}:where(table){border-collapse:collapse;font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums}:where(th,td){padding:var(--roxy-space-xs) var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);text-align:start;vertical-align:top}:where(summary){cursor:pointer}:where(a,button,summary,input,select,textarea,[tabindex]):focus-visible{outline:var(--roxy-line-thick) solid var(--roxy-ring);outline-offset:var(--roxy-line-thick)}:where(summary:focus-visible){border-radius:var(--roxy-radius-sm)}:where(input,select,textarea,button){font:inherit}:where(input:not([type=checkbox],[type=radio],[type=range]),select,textarea){padding:var(--roxy-space-xs) var(--roxy-space-sm);background:var(--roxy-bg);color:var(--roxy-fg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md)}`;var xn=w`:host{--roxy-label-col:minmax(0, 25%);--_mask:var(--roxy-surface);font-family:var(--roxy-font-sans);color:var(--roxy-fg);font-size:var(--roxy-text-base);line-height:var(--roxy-leading-normal);animation:roxy-fade-in var(--roxy-motion-duration) var(--roxy-motion-easing) both;background:0 0;display:block;container-type:inline-size}:host([bare]){--_mask:var(--roxy-bg)}:host([hidden]){display:none}: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)}@keyframes roxy-fade-in{0%{transform:translateY(calc(var(--roxy-space-unit) / 2))}to{transform:translateY(0)}}@media (prefers-reduced-motion:reduce){:host{animation:none}}.roxy-skeleton{background:linear-gradient(90deg, var(--roxy-border) 0%, color-mix(in srgb, var(--roxy-border) 60%, transparent) 50%, var(--roxy-border) 100%);border-radius:var(--roxy-radius-md);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);color:var(--roxy-muted);text-align:center;font-size:var(--roxy-text-sm)}.roxy-error{gap:var(--roxy-space-sm);padding:var(--roxy-space-lg);background:var(--roxy-surface);border:1px solid var(--roxy-danger);border-radius:var(--roxy-radius-md);color:var(--roxy-danger-fg);font-size:var(--roxy-text-sm);justify-items:start;display:grid}:host(:focus-within) .roxy-card{outline:var(--roxy-line-thick) solid var(--roxy-ring);outline-offset:var(--roxy-line-thick)}.roxy-attribution{margin-top:var(--roxy-space-sm);font-size:var(--roxy-text-xs);color:var(--roxy-muted);text-align:right}.roxy-attribution a{color:inherit;text-decoration:none}.roxy-attribution a:hover{color:var(--roxy-accent-ink);text-decoration:underline}.roxy-edit-bar{margin-bottom:var(--roxy-space-sm);justify-content:flex-end;display:flex}.roxy-edit{padding:var(--roxy-space-xs) var(--roxy-space-md);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);color:var(--roxy-fg);font-family:inherit;font-size:var(--roxy-text-sm);cursor:pointer;background:0 0}.roxy-edit:hover{border-color:var(--roxy-accent);color:var(--roxy-accent-ink)}.roxy-edit:disabled{cursor:progress;color:var(--roxy-muted)}roxy-endpoint-form+*{margin-top:var(--roxy-space-md)}.roxy-more{justify-items:center;gap:var(--roxy-space-sm);margin-top:var(--roxy-space-md);display:grid}.roxy-more .roxy-edit{min-height:var(--roxy-touch)}:host{font-variant-emoji:text}`,I=[xn,ur];var bn="__cols",vn="__rows";function $n(o){return typeof o=="object"&&o!==null&&!Array.isArray(o)}function Pt(o){if(Array.isArray(o)){let s=!1,i=o.map(a=>{let d=Pt(a);return d!==a&&(s=!0),d});return s?i:o}if(!$n(o))return o;let t=o[bn],e=o[vn];if(Array.isArray(t)&&Array.isArray(e)&&Object.keys(o).length===2)return e.map(s=>{let i={};return t.forEach((a,d)=>{i[a]=Pt(s[d])}),i});let r=!1,n={};for(let[s,i]of Object.entries(o)){let a=Pt(i);a!==i&&(r=!0),n[s]=a}return r?n:o}function mr(o){return Pt(o)}function gr(o,t){return o.find(e=>e.attrs&&Object.entries(e.attrs).every(([r,n])=>t[r]===n))??o[0]}var wn="pk_live_YOUR_KEY",yr={secret:{reason:"possible-secret-key",message:"Client-side components accept a pk_ publishable key only. Use a publishable key with an origin allowlist, or render server-side."},sample:{reason:"sample-key",message:"Replace the sample key with your own publishable key from your RoxyAPI account."}};function fr(o){if(o)return o===wn?yr.sample:o.startsWith("pk_")?void 0:yr.secret}function xr(o,t,e={}){e.warn&&console.warn(t.message),o.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:t.reason,message:t.message},bubbles:!0,composed:!0}))}var br="https://roxyapi.com/api/v2";async function Sn(o){try{let t=await o.json();if(t?.error){let e=t.code==="validation_error"&&Array.isArray(t.issues)?t.issues.filter(r=>typeof r.path=="string"&&typeof r.message=="string").map(r=>({path:r.path,message:r.message})):null;return{message:t.error,issues:e?.length?e:null,worded:!0}}}catch{}return{message:`Request failed (${o.status})`,issues:null,worded:!1}}var vr={fromAttribute:o=>{if(o!=null){try{let t=JSON.parse(o);if(t&&typeof t=="object"&&!Array.isArray(t))return t}catch{}console.warn("[roxy-ui] submit-context must be a JSON object; sending the request without it.")}}},X=class extends Error{constructor(e,r=null,n=!0){super(e);this.issues=r;this.worded=n}};function $r(o){return o.submitUrl?void 0:fr(o.publishableKey)}async function ce(o,t,e){let r=$r(o);if(r)throw new X(r.message);let n=o.submitUrl?await fetch(o.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:En(t,o.submitContext),signal:e}):await Tn(o,t,e);if(!n.ok){let s=await Sn(n);throw new X(s.message,s.issues,s.worded)}return await n.json()}function En(o,t){return JSON.stringify(t?{...o,context:t}:o)}function Tn(o,t,e){let r=new URL(`${o.baseUrl??br}${t.path}`,document.baseURI);for(let[s,i]of Object.entries(t.query??{}))i!=null&&r.searchParams.set(s,String(i));let n={Accept:"application/json"};return o.publishableKey&&(n["X-API-Key"]=o.publishableKey),t.body!=null&&(n["Content-Type"]="application/json"),fetch(r,{method:t.method??"GET",headers:n,body:t.body!=null?JSON.stringify(t.body):void 0,signal:e})}var Ct=class{constructor(t){this.baseUrl=br;this.worded=!0;this.host=t,t.addController(this)}hostDisconnected(){this.abort?.abort(),this.abort=void 0}async run(t){this.worded=!0;let e=$r(this);if(e){this.host.error=e.message,xr(this.host,e);return}this.abort?.abort();let r=new AbortController;this.abort=r,this.host.loading=!0,this.host.error=null,this.host.issues=null;try{let n=await ce(this,t,r.signal);if(r.signal.aborted)return;this.host.data=n}catch(n){if(r.signal.aborted||n?.name==="AbortError")return;n instanceof X&&(this.host.issues=n.issues),this.worded=n instanceof X&&n.worded,this.host.error=n instanceof Error?n.message:String(n)}finally{this.abort===r&&(this.abort=void 0),r.signal.aborted||(this.host.loading=!1)}}};function wr(o,t,e,r=[]){let n={...e},s=`/${o.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(p,u)=>{let h=n[u];return delete n[u],encodeURIComponent(String(h??""))}),i=new Set(r),a={},d={};for(let[p,u]of Object.entries(n))u===void 0||u===""||(t==="GET"||i.has(p)?a[p]=u:d[p]=u);return{path:s,method:t,query:a,body:t==="POST"?d:void 0}}function Lt(){return l`<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 Ot=w`summary{list-style:none}summary::-webkit-details-marker{display:none}.roxy-chevron{aspect-ratio:auto;width:.7lh;height:.7lh;color:var(--roxy-muted);transition:transform var(--roxy-motion-duration) var(--roxy-motion-easing);flex-shrink:0}details[open]>summary .roxy-chevron{transform:rotate(180deg)}@media (prefers-reduced-motion:reduce){.roxy-chevron{transition:none}}`;var Nt=w`.block{border-top:1px solid var(--roxy-border);padding-top:var(--roxy-space-md)}.block h3{margin:0 0 var(--roxy-space-sm)}.interp-card{padding-block:var(--roxy-space-sm)}.interp-card summary{font-weight:var(--roxy-weight-bold);color:var(--roxy-fg);align-items:center;gap:var(--roxy-space-sm);font-size:var(--roxy-text-sm);display:flex}.interp-lead{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;flex:auto;order:1;min-width:0;display:inline-flex}.interp-aside{align-items:center;gap:var(--roxy-space-sm);flex-shrink:0;order:2;display:inline-flex}.roxy-chevron{order:3}.interp-aside small{color:var(--roxy-muted);font-weight:var(--roxy-weight-normal);white-space:nowrap}@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);gap:var(--roxy-space-sm);color:var(--roxy-fg);font-size:var(--roxy-text-sm);line-height:var(--roxy-leading-normal);overflow-wrap:anywhere;display:grid}.interp-body p{margin:0}`;function ht(o){return o?.length?l`<div class="interp-keywords roxy-chips">${o.map(t=>l`<span class="roxy-chip">${t}</span>`)}</div>`:c}function pe(o,t){if(!o)return c;let e=(r,n)=>n?l`<p><strong>${t(r)}</strong> ${n}</p>`:c;return l`${o.summary?l`<p>${o.summary}</p>`:c} ${e("Impact:",o.impact)}${e("Timing:",o.timing)}${e("Guidance:",o.guidance)} ${ht(o.keywords)}`}function Sr(o,t,e){let r=o.filter(n=>!!n.body);return r.length===0?c:l`<section class="block" part="section readings"><h3>${e}</h3>${r.map((n,s)=>l`<details class="interp-card" part="reading" name="${t}" ?open="${s===0}"><summary><span class="interp-lead">${n.label}</span> ${Lt()} ${n.aside?l`<span class="interp-aside"><small>${n.aside}</small></span>`:c}</summary><div class="interp-body"><p>${n.body}</p>${n.extra??c}</div></details>`)}</section>`}var kn="roxy-data";function An(o){return o.nodeName==="SCRIPT"&&o.getAttribute("type")==="application/json"}var Ft=class{constructor(t){this.host=t,t.addController(this)}hostConnected(){if(this.host.data!=null)return;let t=this.read();t!==void 0&&(this.host.data=t,this.host.requestUpdate())}read(){let t=this.findInlineScript();return t?this.parse(t.textContent):void 0}findInlineScript(){for(let t of Array.from(this.host.children))if(An(t)&&t.classList.contains(kn))return t;return null}parse(t){if(t?.trim())try{return JSON.parse(t)}catch{return}}};var f=class extends _t{constructor(){super();this.data=null;this.endpoint="";this.remember=!1;this.hideReadings=!1;this.hideSections="";this.loading=!1;this.error=null;this.issues=null;this.selfFetched=!1;this.editing=!1;this.sticky=!1;this.hostLoaded=!1;this.moreLoading=!1;this.moreError=null;this.onMore=async()=>{let e=this.lastRequest,r=this.listKey,n=this.listRows();if(!(!e||!r||!n)){this.moreLoading=!0,this.moreError=null;try{let s=await ce(this.fetcher,{...e,query:{...e.query,offset:n.length}});if(this.lastRequest!==e)return;let i=s[r];this.data={...this.data,...s,[r]:[...n,...Array.isArray(i)?i:[]]}}catch(s){this.lastRequest===e&&(this.moreError=s instanceof Error?s.message:String(s))}finally{this.moreLoading=!1}}};this.onEdit=()=>{this.editing=!0};this.onFormSubmit=e=>{let r=this.selfFetch();if(!r)return;let n=e.detail;this.lastValues=n.values,this.sticky=!!n.sticky,this.selfFetched=!0,this.editing=!1,this.remember&&this.writeRemembered(n.values),this.fetchFresh(wr(r.endpoint,r.method,n.values,n.queryKeys??[]))};new Ft(this),this.fetcher=new Ct(this)}static{this.styles=[I]}static{this.endpoints=[]}willUpdate(e){if(e.has("data")&&this.data!=null){let r=mr(this.data);r!==this.data&&(this.data=r)}(e.has("publishableKey")||e.has("baseUrl")||e.has("submitUrl")||e.has("submitContext"))&&this.syncFetcher()}syncFetcher(){this.fetcher.publishableKey=this.publishableKey,this.baseUrl&&(this.fetcher.baseUrl=this.baseUrl),this.fetcher.submitUrl=this.submitUrl,this.fetcher.submitContext=this.submitContext}selfFetch(){let e=this.endpoint?{endpoint:this.endpoint,method:"POST"}:this.hostLoaded||!(this.publishableKey||this.submitUrl)?void 0:gr(this.constructor.endpoints,this);return e&&{endpoint:e.endpoint,method:this.method??e.method}}render(){return l`${this.hiddenSectionsStyle()}${this.renderState()}`}drawn(e){try{return this.renderData(e)}catch(r){return console.warn(`[roxy-ui] ${this.localName} could not draw its response`,r),this.dispatchEvent(new CustomEvent("roxy-render-error",{detail:{error:r},bubbles:!0,composed:!0})),customElements.get("roxy-data")?l`<roxy-data .data="${e}" lang="${O(this.effectiveLang())}"></roxy-data>`:this.renderEmpty()}}hiddenSectionsStyle(){let e=this.hideSections.split(",").map(n=>n.trim().toLowerCase()).filter(n=>/^[a-z][a-z0-9-]*$/.test(n));if(e.length===0)return c;let r=e.map(n=>`[part~="${n}"],roxy-endpoint-form::part(${n}){display:none!important}`).join("");return l`<style>${r}</style>`}renderState(){return this.selfFetch()&&this.sticky&&this.selfFetched&&!this.editing?this.renderWithForm(this.stickyBody()):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()?l`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data):this.renderNoData()}renderInterpretation(e,r,n){return this.hideReadings?c:Sr(e,r,this.t(n??"Reading"))}renderResult(e){let r=l`<div class="roxy-edit-bar" part="edit-bar"><button type="button" class="roxy-edit" @click="${this.onEdit}">${this.t("Edit query")}</button></div>${this.drawn(e)}`;return this.showAttribution()?l`${r}${this.renderAttribution()}`:r}renderWithForm(e){return l`${this.renderForm()}${e}`}stickyBody(){return this.loading?this.renderLoading():this.error!=null?this.issues?c:this.renderErrorBanner(this.error):this.data==null?c:this.showAttribution()?l`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data)}renderMore(){let e=this.listRows(),r=this.data?.total;return!this.lastRequest||!e||typeof r!="number"?c:e.length>=r?c:l`<div class="roxy-more" part="more"><button type="button" class="roxy-edit" ?disabled="${this.moreLoading}" aria-busy="${this.moreLoading?"true":"false"}" @click="${this.onMore}">${this.t("Show more")}</button> ${this.moreError?l`<p class="roxy-error" role="alert">${this.t(this.moreError)}</p>`:c}</div>`}listRows(){let e=this.listKey?this.data?.[this.listKey]:void 0;return Array.isArray(e)?e:void 0}fetchFresh(e){return this.lastRequest=e,this.openedRow=void 0,this.openedRowId=void 0,this.moreError=null,this.fetcher.run(e)}load(e){return this.hostLoaded=!0,this.syncFetcher(),this.fetchFresh(e)}pickRow(e){this.dispatchEvent(new CustomEvent("roxy-symbol-select",{detail:e,bubbles:!0,composed:!0})),this.openRow(e.id)}openRow(e){if(!this.rowDetail||!(this.publishableKey||this.submitUrl))return;let r=this.openedRow??document.createElement(this.rowDetail.tag);r.publishableKey=this.publishableKey,r.baseUrl=this.baseUrl,r.submitUrl=this.submitUrl,r.submitContext=this.submitContext,r.hideReadings=this.hideReadings,r.hideSections=this.hideSections;let n=this.effectiveLang();n&&r.setAttribute("lang",n),this.openedRow=r,this.openedRowId=e,r.load({path:`/${this.rowDetail.path.replace("{id}",encodeURIComponent(e))}`,method:"GET",query:{lang:sr(this)}}).then(()=>r.scrollIntoView?.({block:"nearest"}))}showAttribution(){return this.attribution!=null&&this.attribution!=="off"&&this.attribution!=="false"}renderAttribution(){return l`<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.selfFetch()?this.renderWithForm(c):this.renderEmpty()}renderForm(){let e=this.selfFetch();return l`<roxy-endpoint-form part="form" exportparts="hint" data-endpoint="${e?.endpoint??""}" method="${e?.method??"POST"}" spec-url="${O(this.specUrl)}" publishable-key="${O(this.publishableKey)}" location-url="${O(this.locationUrl)}" submit-label="${O(this.submitLabel)}" lang="${O(this.effectiveLang())}" .initialValues="${this.formInitialValues()}" .serverIssues="${this.issues}" .apiRoute="${this.fetcher}" .autoload="${!this.selfFetched}" .fullPages="${!!this.listKey}" @roxy-submit="${this.onFormSubmit}"></roxy-endpoint-form>`}formInitialValues(){return this.lastValues??(this.remember?this.readRemembered():void 0)}rememberKey(){return`roxy-ui:form:${this.selfFetch()?.endpoint??""}`}readRemembered(){try{let e=sessionStorage.getItem(this.rememberKey());return e?JSON.parse(e):void 0}catch{return}}writeRemembered(e){try{sessionStorage.setItem(this.rememberKey(),JSON.stringify(e))}catch{}}renderEmpty(){return l`<div class="roxy-empty" role="status" part="empty">${this.t("No data")}</div>`}renderLoading(){return l`<div class="roxy-skeleton" style="height:5lh" role="status" aria-label="${this.t("Loading")}" part="loading"></div>`}renderError(e){let r=!!this.selfFetch();if(r&&this.issues)return this.renderForm();let n=this.renderErrorBanner(e);return r?l`${n}${this.renderForm()}`:n}renderErrorBanner(e){return l`<div class="roxy-error" role="alert" part="error">${!this.fetcher.worded&&this.errorMessage||this.t(e)}</div>`}};y([S({attribute:!1})],f.prototype,"data",2),y([S({type:String,attribute:"data-endpoint"})],f.prototype,"endpoint",2),y([S({type:String})],f.prototype,"method",2),y([S({type:String,attribute:"publishable-key"})],f.prototype,"publishableKey",2),y([S({type:String,attribute:"base-url"})],f.prototype,"baseUrl",2),y([S({type:String,attribute:"spec-url"})],f.prototype,"specUrl",2),y([S({type:String,attribute:"submit-url"})],f.prototype,"submitUrl",2),y([S({attribute:"submit-context",converter:vr})],f.prototype,"submitContext",2),y([S({type:String,attribute:"location-url"})],f.prototype,"locationUrl",2),y([S({type:Boolean})],f.prototype,"remember",2),y([S({type:Boolean,attribute:"hide-readings",reflect:!0})],f.prototype,"hideReadings",2),y([S({type:String,attribute:"hide-sections",reflect:!0})],f.prototype,"hideSections",2),y([S({type:String,attribute:"submit-label"})],f.prototype,"submitLabel",2),y([S({type:String,attribute:"error-message"})],f.prototype,"errorMessage",2),y([S({type:String})],f.prototype,"attribution",2),y([_()],f.prototype,"loading",2),y([_()],f.prototype,"error",2),y([_()],f.prototype,"issues",2),y([_()],f.prototype,"selfFetched",2),y([_()],f.prototype,"editing",2),y([_()],f.prototype,"sticky",2),y([_()],f.prototype,"openedRow",2),y([_()],f.prototype,"openedRowId",2),y([_()],f.prototype,"moreLoading",2),y([_()],f.prototype,"moreError",2);var Q=o=>t=>{customElements.get(o)||customElements.define(o,t)};var Mt=w`.roxy-facts{gap:var(--roxy-space-sm) var(--roxy-space-lg);margin:var(--roxy-space-sm) 0 0;font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums;flex-wrap:wrap;display:flex}.roxy-facts>div{min-width:0}.roxy-facts dd{overflow-wrap:anywhere;margin:0}`;function q(o,t,e){return cr(o,t)??e??wt(t)}function Er(o,t,e,r){return pr(o,t,e)??r??wt(e)}var Tr="Localized";function b(o,t,e){let r=o,n=r?.[`${t}${Tr}`];if(typeof n=="string"&&n!=="")return n;if(e!==void 0)return e;let s=r?.[t];return typeof s=="string"?s:""}function kr(o,t){let e=o,r=e?.[t];if(!Array.isArray(r))return[];let n=e?.[`${t}${Tr}`],s=Array.isArray(n)?n:[];return r.map((i,a)=>{let d=s[a];return{value:String(i),label:typeof d=="string"&&d!==""?d:String(i)}})}function Rn(o,t,e){if(o.include?.length){let r={bodies:Qe(t,o.include)};return o.strictOrbs?e("Detected with strict orbs, including {{bodies}}.",r):e("Detected with industry-standard orbs, including {{bodies}}.",r)}return o.strictOrbs?e("Detected with strict orbs, classical bodies only."):e("Detected with industry-standard orbs, classical bodies only.")}var Ar={GRAND_CROSS:0,GRAND_TRINE:1,KITE:2,T_SQUARE:3,YOD:4,MYSTIC_RECTANGLE:5,STELLIUM:6},tt=class extends f{renderData(t){let e="aspects"in t?t.aspects??[]:[],r="patterns"in t?t.patterns??[]:[],n="summary"in t?t.summary:void 0;if(e.length===0&&r.length===0)return this.renderEmpty();let s=Z(this.effectiveLang(),"transitDate"in t?t.transitDate:"date"in t?t.date:"","time"in t?t.time:void 0,!0),i="timezone"in t?t.timezone:void 0,a="options"in t?t.options:void 0;return l`<div class="wrap" part="card" aria-label="${this.t("Aspects")}"><div class="head" part="header"><h2>${e.length===0?this.t("Chart patterns"):this.t("Aspects")}</h2>${e.length>0||s?l`<p class="subtitle roxy-label">${[e.length===1?this.t("1 aspect"):e.length>1?this.t("{{count}} aspects",{count:e.length}):"",s].filter(Boolean).join(" · ")}</p>`:c} ${typeof i=="number"&&Number.isFinite(i)?l`<dl class="roxy-facts" part="details"><div><dt>${q(this.effectiveLang(),"timezone")}</dt><dd>${T(this.effectiveLang(),i,5)}</dd></div></dl>`:c}</div>${n?this.renderSummary(n):c} ${n&&"strongest"in n&&n.strongest?this.renderStrongest(n.strongest):c} ${e.length>0?l`<div role="list" part="section aspects" aria-label="${this.t("Aspect list")}">${e.map((d,p)=>l`<div role="listitem">${this.renderAspect(d,p)}</div>`)}</div>`:c} ${r.length>0?l`<section class="patterns" part="section patterns"><h3>${this.t("Chart patterns")}</h3>${[...r].sort((d,p)=>(Ar[d.kind]??9)-(Ar[p.kind]??9)||(p.tightness??0)-(d.tightness??0)).map(d=>this.renderPattern(d))}</section>`:c} ${a?l`<p class="provenance">${Rn(a,this.effectiveLang(),this.translator)}</p>`:c}</div>`}renderSummary(t){let e="totalAspects"in t?t.totalAspects:t.total,r=Object.entries(t.byType??{}).sort((n,s)=>s[1]-n[1]);return l`<p class="counts" part="details" role="region" aria-label="${this.t("Aspect summary")}">${typeof e=="number"?l`<span>${this.t("Total")}: ${e}</span>`:c} <span class="harmonious">${this.t("Harmonious: {{count}}",{count:t.harmonious})}</span> <span class="challenging">${this.t("Challenging: {{count}}",{count:t.challenging})}</span> <span>${this.t("Neutral: {{count}}",{count:t.neutral})}</span> ${r.map(([n,s])=>l`<span>${V({type:n})}: ${s}</span>`)}</p>`}renderStrongest(t){let e=A(t.planet1)??"",r=A(t.planet2)??"";return l`<div class="strongest" part="details strongest"><span class="roxy-label">${this.t("Strongest")}</span> <span aria-hidden="true" class="glyph">${e}</span>${b(t,"planet1")} <span class="asp-name ${J(t)}">${b(t,"type",V(t))}</span> <span aria-hidden="true" class="glyph">${r}</span>${b(t,"planet2")} <span class="meta">${this.t("{{status}} · orb {{orb}}° · str {{strength}}",{status:t.isApplying?this.t("Applying"):this.t("Separating"),orb:T(this.effectiveLang(),t.orb,2),strength:T(this.effectiveLang(),t.strength,0)})}</span></div>`}renderAspect(t,e){let r=A(t.planet1)??"",n=A(t.planet2)??"",s=V(t),i=t.isApplying?this.t("Applying"):this.t("Separating"),a="meaning"in t?t.meaning:void 0,d="transitInterpretation"in t?t.transitInterpretation:void 0,p="aspectInterpretation"in t?t.aspectInterpretation:void 0,u=!!(a||d||p),h=l`<span aria-hidden="true" class="glyph">${r}</span>${b(t,"planet1")} <span class="asp-name ${J(t)}">${b(t,"type",s)}</span> <span aria-hidden="true" class="glyph">${n}</span>${b(t,"planet2")} <span class="meta">${this.t("{{status}} · orb {{orb}}° · str {{strength}}",{status:i,orb:T(this.effectiveLang(),t.orb,2),strength:T(this.effectiveLang(),t.strength,0)})}</span>`;return!u||this.hideReadings?l`<div class="interp-card" part="reading"><div class="static-head">${h}</div></div>`:l`<details class="interp-card" part="reading" name="aspects" ?open="${e===0}"><summary>${h}${Lt()}</summary><div class="interp-body" part="readings">${a?this.renderMeaning(a):c} ${d?this.renderTransit(d):c} ${p?pe(p,this.translator):c}</div></details>`}renderMeaning(t){return l`${t.description?.short?l`<p>${t.description.short}</p>`:c} ${t.description?.long&&t.description.long!==t.description.short?l`<p>${t.description.long}</p>`:c} ${ht(t.keywords)}`}renderTransit(t){return pe(t,this.translator)}renderPattern(t){let e=t.planets??[],r=t.apex?[...e].sort((n,s)=>+(s===t.apex)-+(n===t.apex)):e;return l`<div class="pattern" part="pattern"><div class="pattern-head"><span class="pattern-name">${t.name??t.kind??this.t("Pattern")}</span> ${t.element?l`<span class="roxy-chip">${t.element}</span>`:c} ${t.modality?l`<span class="roxy-chip">${t.modality}</span>`:c} ${t.dissociate?l`<span class="roxy-chip" title="${this.t("Out of sign: one or more planets sit outside the pattern element or modality, so the theme holds but runs weaker.")}">${this.t("Dissociate")}</span>`:c} ${typeof t.tightness=="number"?l`<span class="pattern-tight roxy-label">${this.t("{{percent}} tight",{percent:Et(this.effectiveLang(),t.tightness,0)})}</span>`:c}</div>${r.length?l`<ul class="roxy-chips">${r.map(n=>{let s=A(n),i=!!t.apex&&n===t.apex;return l`<li class="${i?"roxy-chip apex":"roxy-chip"}">${s?l`<span aria-hidden="true">${s}</span>`:c}${n}${i?l`<span>${this.t("apex")}</span>`:c}</li>`})}</ul>`:c} ${t.interpretation&&!this.hideReadings?l`<p class="pattern-interp">${t.interpretation}</p>`:c}</div>`}};tt.endpoints=qe,tt.styles=[I,Mt,Ot,Nt,se,w`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}.head{gap:var(--roxy-space-xs);display:grid}.counts{gap:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.harmonious{color:var(--roxy-info-fg)}.challenging{color:var(--roxy-danger-fg)}.interp-card summary,.static-head{align-items:center;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.static-head{font-size:var(--roxy-text-sm)}.meta{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-normal);font-variant-numeric:tabular-nums;margin-inline-start:auto}.glyph{line-height:1}.asp-name{font-weight:var(--roxy-weight-bold)}.strongest,.pattern{padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border)}.strongest{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.pattern{gap:var(--roxy-space-xs);display:grid}.pattern-head{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.pattern-name{font-weight:var(--roxy-weight-bold)}.pattern-tight{font-variant-numeric:tabular-nums;margin-inline-start:auto}.roxy-chip.apex{color:var(--roxy-fg);border-color:var(--roxy-accent);font-weight:var(--roxy-weight-bold)}.pattern-interp{font-size:var(--roxy-text-sm)}.provenance{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}`],tt=y([Q("roxy-aspects-table")],tt);function P(o){let t=o%360;return t<0?t+360:t}function he(o){let t=P(o),e=Math.floor(t/30)%12,r=t%30,n=Math.floor(r),s=(r-n)*60,i=Math.floor(s),a=Math.round((s-i)*60);return{sign:pt[e]??"Aries",signIndex:e,degree:n,minute:i,second:a}}function ue(o,t){let{sign:e,degree:r,minute:n}=he(o);return`${r}° ${t||e} ${String(n).padStart(2,"0")}'`}function Dt(o){return Pn(P(o)%30)}function _n(o){let t=Math.floor(o);return{degree:t,minute:Math.floor((o-t)*60)}}function Pn(o){let{degree:t,minute:e}=_n(o);return`${t}°${String(e).padStart(2,"0")}'`}function me(o){return P(o+180)}function Rr(o,t){let e=P(o),r=P(t)-e;return r<0&&(r+=360),P(e+r/2)}function ge(o,t,e){let r=o.filter(p=>Number.isFinite(t(p))).map(p=>{let u=P(t(p));return{item:p,longitude:u,displayLongitude:u}}).sort((p,u)=>p.longitude-u.longitude),n=r.length;if(n<2)return r;let s=0,i=-1;for(let p=0;p<n;p++){let u=r[(p+n-1)%n],$=(r[p].longitude-u.longitude+360)%360;$>i&&(i=$,s=p)}let a=r[s],d=a.longitude;for(let p=1;p<n;p++){let u=r[(s+p)%n],h=typeof e=="function"?e(a.item,u.item):e,$=u.longitude+(s+p>=n?360:0);d=Math.max($,d+h),u.displayLongitude=P(d),a=u}return r}var zt=2;function _r(o,t){let e=o*Math.PI/180;return t.width/2*Math.abs(Math.cos(e))+t.height/2*Math.abs(Math.sin(e))}function ye(o,t,e,r){let n=o*Math.PI/180,s=(i,a)=>a>1e-9?(i+r)/a:Number.POSITIVE_INFINITY;return Math.min(s((t.width+e.width)/2,Math.abs(Math.cos(n))),s((t.height+e.height)/2,Math.abs(Math.sin(n))))}var Cn=(o,t)=>Math.abs(o.x-t.x)<(o.width+t.width)/2&&Math.abs(o.y-t.y)<(o.height+t.height)/2;function Pr(o,t){let e=[],r=n=>e.reduce((s,i)=>Cn(n,i)?Math.max(s,Math.min((n.width+i.width)/2-Math.abs(n.x-i.x),(n.height+i.height)/2-Math.abs(n.y-i.y))):s,0);return[...o].map((n,s)=>({point:n,index:s})).sort((n,s)=>n.point.displayLongitude-s.point.displayLongitude).reduce((n,{point:s,index:i})=>{let a=t(s,0),d=t(s,1),p=r(a)===0||r(a)<=r(d)?0:1;return e.push(p===0?a:d),n[i]=p,n},[])}function It(o,t){return t>0?o/t*(180/Math.PI):0}function E(o,t,e,r){let n=r*Math.PI/180;return{x:o+e*Math.cos(n),y:t+e*Math.sin(n)}}var et=class extends f{rows(){let t=this.data;if(!t)return[];let e=(t.planets??[]).map(n=>({name:n.name,label:b(n,"name"),sign:n.sign,signLabel:b(n,"sign"),longitude:n.longitude,latitude:n.latitude,house:n.house,speed:n.speed,isRetrograde:n.isRetrograde,dignity:n.dignity})),r=[["Ascendant",t.ascendant],["Midheaven",t.midheaven],["Part of Fortune",t.partOfFortune],["Vertex",t.vertex]];for(let[n,s]of r)s&&e.push({name:n,label:this.t(n),sign:s.sign,signLabel:b(s,"sign"),longitude:s.longitude,house:"house"in s?s.house:void 0,sect:"sect"in s?s.sect:void 0,isPoint:!0});return e}renderData(t){if(!t.planets)return this.renderEmpty();let e=this.rows(),r=t.birthDetails,n=e.some(a=>Number.isFinite(a.latitude)),s=e.some(a=>a.sect),i=["latitude","longitude","timezone"];return l`<div class="wrap" part="card"><header part="header"><h2>${this.t("Planetary positions")}</h2>${r?l`<div part="details"><p class="roxy-label">${Z(this.effectiveLang(),r.date,r.time,!0)}</p><dl class="roxy-facts">${i.map(a=>l`<div><dt>${q(this.effectiveLang(),a)}</dt><dd>${T(this.effectiveLang(),r[a],5)}</dd></div>`)}</dl></div>`:c}</header><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Western planetary positions")}"><table part="table"><caption class="roxy-sr-only">${this.t("Western planetary positions: each body with its sign, degree, house, essential dignity and motion. The dignity cell is blank for the lunar nodes, Chiron and Lilith, which rule no sign and therefore hold no dignity at all.")}</caption><thead><tr><th scope="col">${this.t("Body")}</th><th scope="col">${this.t("Sign")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("Longitude")}</th>${n?l`<th scope="col">${q(this.effectiveLang(),"latitude")}</th>`:c}<th scope="col">${this.t("House")}</th><th scope="col">${this.t("Dignity")}</th><th scope="col">${this.t("Motion")}</th>${s?l`<th scope="col">${this.t("Sect")}</th>`:c}</tr></thead><tbody>${e.map(a=>{let d=A(a.name)??"",p=a.sect==="day"?this.t("Daytime"):a.sect==="night"?this.t("Night"):"",u=St(a.sign)??"",h=typeof a.speed=="number"?T(this.effectiveLang(),a.speed,6):"";return l`<tr class="${a.isPoint?"point":""}"><td class="body">${d?l`<span class="glyph">${d}</span>`:c}${a.label}</td><td>${u?l`<span class="glyph">${u}</span>`:c}${a.signLabel??""}</td><td>${typeof a.longitude=="number"?ue(a.longitude,a.signLabel):""}</td><td>${typeof a.longitude=="number"?`${T(this.effectiveLang(),a.longitude,5)}°`:c}</td>${n?l`<td>${typeof a.latitude=="number"?`${T(this.effectiveLang(),a.latitude,5)}°`:c}</td>`:c}<td>${typeof a.house=="number"?a.house:""}</td><td class="dignity">${a.dignity?z(a.dignity):""}</td><td>${h?l`${h}${this.t("°/day")}`:c} ${a.isRetrograde?l`<span class="retro">℞</span>`:c}</td>${s?l`<td>${p}</td>`:c}</tr>`})}</tbody></table></div>${t.houses?.length?l`<details part="section houses"><summary>${this.t("Houses")}</summary><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Houses")}"><table part="table"><thead><tr><th scope="col">${this.t("House")}</th><th scope="col">${this.t("Sign")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("Longitude")}</th></tr></thead><tbody>${t.houses.map(a=>l`<tr><th scope="row">${T(this.effectiveLang(),a.number,0)}</th><td>${b(a,"sign")}</td><td>${ue(a.longitude,b(a,"sign"))}</td><td>${T(this.effectiveLang(),a.longitude,5)}°</td></tr>`)}</tbody></table></div></details>`:c}</div>`}};et.endpoints=We,et.styles=[I,Mt,w`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}h2{overflow-wrap:anywhere}.scroll{min-width:0;overflow-x:auto}table{width:100%}:is(th,td){white-space:nowrap}tr:not(.point)+tr.point>*{border-block-start:1px solid var(--roxy-secondary)}td.body{font-weight:var(--roxy-weight-bold)}.glyph{color:var(--roxy-muted);margin-inline-end:var(--roxy-space-xs)}.retro{color:var(--roxy-danger-fg);font-weight:var(--roxy-weight-bold)}details>summary{font-weight:var(--roxy-weight-bold)}details>.scroll{margin-block-start:var(--roxy-space-sm)}`],et=y([Q("roxy-western-planets-table")],et);var Ut=class{constructor(t){this.host=t;this.state="closed";this.zoom=1;this.pressedBy="";this.press=t=>{this.pressedBy=t.pointerType};this.openOnMouse=t=>{let e=this.pressedBy==="mouse";this.pressedBy="",e&&(t.target?.closest?.("a, button, summary, input, select, textarea")||getSelection()?.toString()||this.open())};t.addController(this)}hostUpdated(){let t=this.host.renderRoot.querySelector(".roxy-chart-dialog");if(!t)this.reset();else if(t.isConnected&&this.state!=="closed"){this.state==="opening"&&(this.state="open",t.open||t.showModal());let e=t.querySelector(".roxy-chart-scroll");t.open&&e&&this.position&&(e.scrollLeft=e.scrollWidth*this.position.x-e.clientWidth/2,e.scrollTop=e.scrollHeight*this.position.y-e.clientHeight/2,this.position=void 0)}}hostDisconnected(){this.reset(),this.host.renderRoot.querySelector(".roxy-chart-dialog")?.close()}open(){this.state="opening",this.position={x:.5,y:0},this.host.requestUpdate()}reset(){this.state="closed",this.zoom=1,this.position=void 0}resize(t){let e=this.host.renderRoot.querySelector(".roxy-chart-scroll");this.position=t===0?{x:.5,y:0}:e?{x:(e.scrollLeft+e.clientWidth/2)/e.scrollWidth,y:(e.scrollTop+e.clientHeight/2)/e.scrollHeight}:void 0,this.zoom=t===0?1:Math.min(3,Math.max(1,this.zoom+t)),this.host.requestUpdate()}renderChartViewport(t,e,r){return l`<div class="roxy-chart-view"><div class="roxy-chart-hit" @pointerdown="${this.press}" @click="${this.openOnMouse}">${t}</div><div class="roxy-chart-tools" part="chart-controls"><button type="button" @click="${()=>this.open()}">${r("Enlarge chart")}</button></div><dialog class="roxy-chart-dialog" part="chart-dialog" aria-label="${e}" @close="${()=>{this.reset(),this.host.requestUpdate()}}">${this.state!=="closed"?l`<div class="roxy-chart-bar"><strong>${e}</strong><div class="roxy-chart-tools"><button type="button" aria-label="${r("Zoom out")}" ?disabled="${this.zoom===1}" @click="${()=>this.resize(-.5)}">−</button> <button type="button" @click="${()=>this.resize(0)}">${r("Reset zoom")}</button> <button type="button" aria-label="${r("Zoom in")}" ?disabled="${this.zoom===3}" @click="${()=>this.resize(.5)}">+</button> <button type="button" @click="${()=>this.host.renderRoot.querySelector(".roxy-chart-dialog")?.close()}">${r("Close")}</button></div></div><div class="roxy-chart-scroll" role="region" tabindex="0" aria-label="${e}"><div class="roxy-chart-expanded" style="${`--chart-zoom:${this.zoom}`}">${t}</div></div>`:c}</dialog></div>`}},Cr=w`.roxy-chart-view{min-width:0}@media (hover:hover) and (pointer:fine){.roxy-chart-hit{cursor:zoom-in}}.roxy-chart-tools{gap:var(--roxy-space-sm);flex-wrap:wrap;justify-content:flex-end;align-items:center;display:flex}.roxy-chart-tools button{font-size:var(--roxy-text-sm);color:var(--roxy-secondary);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);min-width:2lh;min-height:2lh;padding:var(--roxy-space-xs) var(--roxy-space-sm);cursor:pointer;background:0 0}.roxy-chart-tools button:hover:not(:disabled){border-color:var(--roxy-accent);color:var(--roxy-accent-ink)}.roxy-chart-tools button:disabled{color:var(--roxy-muted);cursor:default}.roxy-chart-dialog{--roxy-surface:var(--roxy-bg);width:calc(100% - 2 * var(--roxy-space-md));max-width:calc(var(--roxy-chart-expanded-width,60rem) * 1.2);max-height:calc(100% - 2 * var(--roxy-space-md));padding:var(--roxy-space-md);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-lg);color:var(--roxy-fg);background:var(--roxy-bg);box-shadow:var(--roxy-shadow-lg);margin:auto}.roxy-chart-dialog[open]{flex-direction:column;display:flex;overflow:hidden}.roxy-chart-dialog::backdrop{background:color-mix(in oklab, var(--roxy-bg) 85%, transparent)}.roxy-chart-bar{justify-content:space-between;align-items:center;gap:var(--roxy-space-md);margin-bottom:var(--roxy-space-md);flex-wrap:wrap;flex-shrink:0;display:flex}.roxy-chart-bar>strong{overflow-wrap:anywhere;min-width:0}.roxy-chart-scroll{overscroll-behavior:contain;flex:auto;min-height:0;overflow:auto}.roxy-chart-expanded{width:max(100%, calc(var(--roxy-chart-expanded-width,60rem) * var(--chart-zoom)));padding:var(--roxy-space-sm)}.roxy-chart-expanded>svg{width:100%;max-width:none;height:auto;margin:0}`;var Lr=w`.roxy-tablist{gap:var(--roxy-space-xs);box-shadow:inset 0 calc(var(--roxy-line-thick) * -1) 0 var(--roxy-border);scrollbar-width:thin;min-width:0;display:flex;overflow-x:auto}.roxy-tab{padding:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-sm);border:none;border-bottom:var(--roxy-line-thick) solid transparent;cursor:pointer;color:var(--roxy-muted);transition:color var(--roxy-motion-duration) var(--roxy-motion-easing);background:0 0;flex-shrink:0}.roxy-tab[aria-selected=true]{color:var(--roxy-accent-ink);border-bottom-color:var(--roxy-accent);font-weight:var(--roxy-weight-bold)}.roxy-tab:hover:not([aria-selected=true]){color:var(--roxy-fg)}.roxy-tab:focus-visible{outline-offset:calc(var(--roxy-line-thick) * -1);border-radius:var(--roxy-radius-sm)}`;function Or(o){let{items:t,active:e,onSelect:r,label:n,idPrefix:s,controls:i=!1}=o;return l`<div class="roxy-tablist" part="tablist" role="tablist" aria-label="${n}" @keydown="${d=>{if(d.key!=="ArrowRight"&&d.key!=="ArrowLeft")return;d.preventDefault();let p=t.findIndex(v=>v.id===e);if(p===-1)return;let u=d.key==="ArrowRight"?1:-1,h=t[(p+u+t.length)%t.length];if(!h)return;r(h.id);let $=d.currentTarget.getRootNode();requestAnimationFrame(()=>{$.querySelector(`#${s}-tab-${h.id}`)?.focus()})}}">${t.map(d=>l`<button type="button" class="roxy-tab" part="tab" role="tab" id="${s}-tab-${d.id}" aria-selected="${e===d.id?"true":"false"}" aria-controls="${i?`${s}-panel-${d.id}`:c}" tabindex="${e===d.id?"0":"-1"}" @click="${()=>r(d.id)}">${d.label}</button>`)}</div>${i?t.filter(d=>d.id!==e).map(d=>l`<div role="tabpanel" id="${s}-panel-${d.id}" aria-labelledby="${s}-tab-${d.id}" hidden></div>`):c}`}var Gt=class{constructor(t,e){this.host=t,this.marks=e,this.size=Object.fromEntries(Object.keys(e).map(r=>[r,e[r][1]])),t.addController(this)}hostConnected(){typeof ResizeObserver>"u"||(this.observer=new ResizeObserver(()=>this.host.requestUpdate()),this.observer.observe(this.host))}hostDisconnected(){this.observer?.disconnect(),this.observer=void 0}hostUpdated(){let t=!1;for(let e of Object.keys(this.marks)){let[r]=this.marks[e],n=Ln(this.host.renderRoot,r,this.size[e]);n!==this.size[e]&&(this.size[e]=n,t=!0)}t&&this.host.requestUpdate()}};function Ln(o,t,e){let r=o?.querySelector(t);if(!r||typeof getComputedStyle!="function")return e;let n=Number.parseFloat(getComputedStyle(r).fontSize);return Number.isFinite(n)&&n>0?n:e}var Nr={GRAND_CROSS:0,GRAND_TRINE:1,KITE:2,T_SQUARE:3,YOD:4,MYSTIC_RECTANGLE:5,STELLIUM:6},be=540,m=be/2,rt=220,fe=202,ut=174,mt=144,On=232,xe=249,jt={glyph:14,degree:7},Nn=.95,Fn=3.4,Mn=1.85,Dn=1.25,zn=.9,In=28,Un=13,Ht=84,F=class extends f{constructor(){super(...arguments);this.viewport=new Ut(this);this.heading="Natal chart";this.view="wheel";this.type=new Gt(this,{glyph:[".planet-glyph",jt.glyph],degree:[".planet-deg",jt.degree]})}getPlanets(){return this.data?.planets??[]}getAscendant(){return this.data?.ascendant?.longitude??0}getMidheaven(){let e=this.data?.midheaven?.longitude;return typeof e=="number"?e:null}get hasCusps(){return(this.data?.houses??[]).length===12}toAngle(e){return 180+this.getAscendant()-e}renderData(e){let r=this.getPlanets(),n=e.aspects??[],s=this.view;return l`<div class="wrap" part="card"><header part="header"><h2>${this.t(this.heading)}</h2>${e.birthDetails?l`<p class="roxy-label">${Z(this.effectiveLang(),e.birthDetails.date,e.birthDetails.time)}</p>`:c}</header>${n.length>0?l`${Or({items:[{id:"wheel",label:this.t("Wheel")},{id:"grid",label:this.t("Aspect grid")}],active:s,onSelect:i=>{this.view=i},label:this.t("Natal chart views"),idPrefix:"natal",controls:!0})}<div id="natal-panel-${s}" part="panel" role="tabpanel" aria-labelledby="natal-tab-${s}">${s==="wheel"?this.renderWheel(r,n):this.renderAspectGrid(r,n)}</div>`:this.renderWheel(r,n)}<div class="legend" part="legend"><span>${this.t("Positions")}: ${T(this.effectiveLang(),r.length,0)}</span> ${n.length>0?l`<span>${this.t("{{count}} aspects",{count:s==="grid"?n.length:n.filter(ie).length})}</span>`:c} ${this.hasCusps&&e.houseSystem?l`<span>${q(this.effectiveLang(),"houseSystem")}: ${Er(this.effectiveLang(),"houseSystem",e.houseSystem)}</span>`:l`<span class="caveat">${this.t("Equal sectors from the Ascendant, no house cusps in this response")}</span>`} ${n.length>0?l`<span><span class="aspect-swatch aspect-trine"></span>${this.t("Harmonious aspects")}</span> <span><span class="aspect-swatch aspect-square"></span>${this.t("Challenging aspects")}</span>`:c}</div>${this.renderPositionDetails(e)} ${this.renderDetails()} ${this.renderPatterns()} ${this.renderAspectDetails(n)} ${this.renderInterpretations()}</div>`}renderWheel(e,r){return this.viewport.renderChartViewport(l`<svg viewBox="0 0 ${be} ${be}" part="chart" role="img" aria-label="${this.hasCusps?this.t("Natal chart wheel with twelve houses, planets, and aspects"):this.t("Natal chart wheel with planets and aspects, houses shown as equal sectors from the Ascendant")}"><title>${this.t("Natal chart wheel")}</title><desc>${this.t("Twelve zodiac sign segments around a circular wheel. Planet glyphs are placed at their ecliptic longitudes. Aspect lines connect related planets.")}</desc><circle class="wheel-line" cx="${m}" cy="${m}" r="${rt}" stroke-width="1.5"/><circle class="wheel-line" cx="${m}" cy="${m}" r="${fe-14}" stroke-width="0.8"/><circle class="wheel-line" cx="${m}" cy="${m}" r="${ut}" stroke-width="1"/><circle class="wheel-line" cx="${m}" cy="${m}" r="${Ht}" stroke-width="0.5"/>${this.renderTicks()} ${this.renderSpokes()} ${this.renderSigns()} ${this.renderHouseNumbers()} ${this.renderCuspDegrees()} ${this.renderAspects(e,r)} ${this.renderPlanets(e)} ${this.renderAngles()}</svg>`,this.t(this.heading),this.translator)}renderAspectGrid(e,r){let n=e.map(a=>({name:a.name,label:b(a,"name")})),s=(a,d)=>[L(a),L(d)].sort().join("|"),i=new Map;for(let a of r)i.set(s(a.planet1,a.planet2),a);return n.length===0?l`<p class="roxy-empty" role="status">${this.t("No planets to grid")}</p>`:l`<div class="scroll" part="section aspects table aspect-grid" tabindex="0" role="region" aria-label="${this.t("Aspect grid")}"><table class="aspect-grid"><caption class="roxy-sr-only">${this.t("Planet by planet aspect grid: the aspect each pair of planets forms, read from the planet naming the row across to the planet naming the column.")}</caption><thead><tr><td></td>${n.slice(0,-1).map(a=>{let d=A(a.name)??a.label;return l`<th scope="col" title="${a.label}">${d}</th>`})}</tr></thead><tbody>${n.slice(1).map((a,d)=>{let p=A(a.name)??a.label;return l`<tr><th scope="row" title="${a.label}">${p}</th>${n.slice(0,d+1).map(u=>{let h=i.get(s(a.name,u.name));if(!h)return l`<td></td>`;let $=K(h),v=Ye($)??b(h,"type",V(h)),g=T(this.effectiveLang(),h.orb,1);return l`<td class="${`cell ${J(h)}`}" title="${`${a.label} ${b(h,"type",$)} ${u.label}${g?` (${this.t("Orb")} ${g}°)`:""}`}"><span class="asp">${v}</span></td>`})} ${n.slice(d+1,-1).map(()=>l`<td></td>`)}</tr>`})}</tbody></table></div>`}renderAngles(){let e=this.getAscendant(),r=this.getMidheaven(),n=[{longitude:e,label:this.t("ASC")},{longitude:me(e),label:this.t("DSC")}];r!==null&&(n.push({longitude:r,label:this.t("MC")}),n.push({longitude:me(r),label:this.t("IC")}));let s=this.data?.partOfFortune?.longitude;typeof s=="number"&&n.push({longitude:P(s),label:this.t("PoF")});let i=this.data?.vertex?.longitude;return typeof i=="number"&&n.push({longitude:P(i),label:this.t("Vtx")}),ge(n,a=>a.longitude,It(In,xe)).map(({item:a,longitude:d,displayLongitude:p})=>this.renderAngleMark(d,p,a.label))}renderAngleMark(e,r,n){let s=this.toAngle(e),i=this.toAngle(r),a=E(m,m,rt,s),d=E(m,m,On,s),p=E(m,m,xe,i),u=Math.abs(r-e)>.5,h=E(m,m,xe-8,i);return R`
206
4
  <g>
207
5
  <line class="angle-tick" x1=${a.x} y1=${a.y} x2=${d.x} y2=${d.y} />
208
6
  ${u?R`<line class="angle-tick" x1=${d.x} y1=${d.y} x2=${h.x} y2=${h.y} />`:c}
209
7
  <text class="angle-marker" x=${p.x} y=${p.y} text-anchor="middle" dominant-baseline="central">${n}</text>
210
8
  </g>
211
- `}renderSpokes(){let e=this.data?.houses??[];return(this.hasCusps?e.map(n=>n.longitude):Array.from({length:12},(n,s)=>this.getAscendant()+s*30)).map(n=>{let s=this.toAngle(n),i=E(m,m,ut,s),a=E(m,m,rt,s);return R`<line class="wheel-line" x1=${i.x} y1=${i.y} x2=${a.x} y2=${a.y} stroke-width="0.8" />`})}renderSigns(){return pt.map((e,r)=>{let n=this.toAngle(r*30+15),s=E(m,m,fe,n);return R`<text class="sign-glyph" x=${s.x} y=${s.y} text-anchor="middle" dominant-baseline="central">${St(e)??""}</text>`})}renderHouseNumbers(){let e=this.data?.houses??[];if(this.hasCusps)return e.map((n,s)=>{let i=e[(s+1)%12],a=Rr(n.longitude,i?i.longitude:n.longitude+30),d=E(m,m,ut-12,this.toAngle(a));return R`<text class="house-num" x=${d.x} y=${d.y} text-anchor="middle" dominant-baseline="central">${n.number}</text>`});let r=this.getAscendant();return Array.from({length:12},(n,s)=>{let i=this.toAngle(r+s*30+15),a=E(m,m,ut-12,i),d=s+1;return R`<text class="house-num" x=${a.x} y=${a.y} text-anchor="middle" dominant-baseline="central">${d}</text>`})}renderTicks(){let e=[];for(let r=0;r<360;r+=5){let n=this.toAngle(r),s=r%30===0,i=s?fe-14:rt-5,a=E(m,m,i,n),d=E(m,m,rt,n);e.push(R`<line class=${s?"tick tick-major":"tick"} x1=${a.x} y1=${a.y} x2=${d.x} y2=${d.y} stroke-width=${s?1:.5} />`)}return e}renderCuspDegrees(){let e=this.data?.houses??[];return this.hasCusps?e.map(r=>{let n=this.toAngle(r.longitude),s=E(m,m,ut+9,n);return R`<text class="cusp-deg" x=${s.x} y=${s.y} text-anchor="middle" dominant-baseline="central">${Dt(r.longitude)}</text>`}):c}renderPlanets(e){let r=this.type.size.degree>jt.degree,n=Nn*this.type.size.glyph,s={width:n,height:n},i=v=>({width:((r?Mn:Fn)+(v?Dn:0))*this.type.size.degree,height:zn*this.type.size.degree}),a=(v,g,x)=>{let T=i(v.isRetrograde===!0),C=mt-ye(g,s,T,zt);return x===0?C:Math.min(C,Math.max(C-Un,Ht+zt+_r(g,T)))},d=It(n,mt),p=i(!0),u=Math.max(d,It(p.width,mt-ye(90,s,p,zt))/2),h=ge(e,v=>v.longitude,u),$=Pr(h,({item:v,displayLongitude:g},x)=>{let T=this.toAngle(g);return{...E(m,m,a(v,T,x),T),...i(v.isRetrograde===!0)}});return h.map((v,g)=>{let{item:x,longitude:T,displayLongitude:C}=v,Kt=this.toAngle(T),gt=this.toAngle(C),ve=E(m,m,mt,gt),$e=E(m,m,a(x,gt,$[g]??0),gt),we=E(m,m,rt-4,Kt),Se=E(m,m,mt+8,gt),Ee=b(x,"name"),Fr=A(x.name)??Ee,ke=x.isRetrograde===!0,Te=Dt(x.longitude),Mr=r?`${he(x.longitude).degree}°`:Te,Dr=Math.abs(C-T)>.5;return R`<g>
9
+ `}renderSpokes(){let e=this.data?.houses??[];return(this.hasCusps?e.map(n=>n.longitude):Array.from({length:12},(n,s)=>this.getAscendant()+s*30)).map(n=>{let s=this.toAngle(n),i=E(m,m,ut,s),a=E(m,m,rt,s);return R`<line class="wheel-line" x1=${i.x} y1=${i.y} x2=${a.x} y2=${a.y} stroke-width="0.8" />`})}renderSigns(){return pt.map((e,r)=>{let n=this.toAngle(r*30+15),s=E(m,m,fe,n);return R`<text class="sign-glyph" x=${s.x} y=${s.y} text-anchor="middle" dominant-baseline="central">${St(e)??""}</text>`})}renderHouseNumbers(){let e=this.data?.houses??[];if(this.hasCusps)return e.map((n,s)=>{let i=e[(s+1)%12],a=Rr(n.longitude,i?i.longitude:n.longitude+30),d=E(m,m,ut-12,this.toAngle(a));return R`<text class="house-num" x=${d.x} y=${d.y} text-anchor="middle" dominant-baseline="central">${n.number}</text>`});let r=this.getAscendant();return Array.from({length:12},(n,s)=>{let i=this.toAngle(r+s*30+15),a=E(m,m,ut-12,i),d=s+1;return R`<text class="house-num" x=${a.x} y=${a.y} text-anchor="middle" dominant-baseline="central">${d}</text>`})}renderTicks(){let e=[];for(let r=0;r<360;r+=5){let n=this.toAngle(r),s=r%30===0,i=s?fe-14:rt-5,a=E(m,m,i,n),d=E(m,m,rt,n);e.push(R`<line class=${s?"tick tick-major":"tick"} x1=${a.x} y1=${a.y} x2=${d.x} y2=${d.y} stroke-width=${s?1:.5} />`)}return e}renderCuspDegrees(){let e=this.data?.houses??[];return this.hasCusps?e.map(r=>{let n=this.toAngle(r.longitude),s=E(m,m,ut+9,n);return R`<text class="cusp-deg" x=${s.x} y=${s.y} text-anchor="middle" dominant-baseline="central">${Dt(r.longitude)}</text>`}):c}renderPlanets(e){let r=this.type.size.degree>jt.degree,n=Nn*this.type.size.glyph,s={width:n,height:n},i=v=>({width:((r?Mn:Fn)+(v?Dn:0))*this.type.size.degree,height:zn*this.type.size.degree}),a=(v,g,x)=>{let k=i(v.isRetrograde===!0),C=mt-ye(g,s,k,zt);return x===0?C:Math.min(C,Math.max(C-Un,Ht+zt+_r(g,k)))},d=It(n,mt),p=i(!0),u=Math.max(d,It(p.width,mt-ye(90,s,p,zt))/2),h=ge(e,v=>v.longitude,u),$=Pr(h,({item:v,displayLongitude:g},x)=>{let k=this.toAngle(g);return{...E(m,m,a(v,k,x),k),...i(v.isRetrograde===!0)}});return h.map((v,g)=>{let{item:x,longitude:k,displayLongitude:C}=v,Kt=this.toAngle(k),gt=this.toAngle(C),ve=E(m,m,mt,gt),$e=E(m,m,a(x,gt,$[g]??0),gt),we=E(m,m,rt-4,Kt),Se=E(m,m,mt+8,gt),Ee=b(x,"name"),Fr=A(x.name)??Ee,Te=x.isRetrograde===!0,ke=Dt(x.longitude),Mr=r?`${he(x.longitude).degree}°`:ke,Dr=Math.abs(C-k)>.5;return R`<g>
212
10
  ${Dr?R`<line class="planet-leader" x1=${we.x} y1=${we.y} x2=${Se.x} y2=${Se.y} />`:c}
213
- <text class="planet-glyph" x=${ve.x} y=${ve.y} text-anchor="middle" dominant-baseline="central"><title>${Ee}${ke?` ${this.t("retrograde")}`:""} - ${Te} ${b(x,"sign")}</title>${Fr}</text>
214
- <text class="planet-deg" x=${$e.x} y=${$e.y} text-anchor="middle" dominant-baseline="central">${Mr}${ke?R`<tspan class="retro"> ℞</tspan>`:c}</text>
215
- </g>`})}renderPositionDetails(e){return l`<details class="block" part="section positions"><summary>${this.t("Chart details")}</summary><roxy-western-planets-table bare lang="${O(this.effectiveLang())}" exportparts="card, header, table, details, section, houses" .data="${e}"></roxy-western-planets-table></details>`}renderDetails(){let e=this.data?.summary,r=this.data?.aspectsInterpretation;if(!e&&!r)return c;let n=Tr(e,"retrogradePlanets");return l`<div class="facts" part="details">${e?.dominantElement||e?.dominantModality?l`<ul class="roxy-chips">${e.dominantElement?l`<li>${this.t("Dominant element")}: ${b(e,"dominantElement")}</li>`:c} ${e.dominantModality?l`<li>${this.t("Dominant modality")}: ${b(e,"dominantModality")}</li>`:c}</ul>`:c} ${r?l`<p class="counts"><span class="harmonious">${this.t("Harmonious: {{count}}",{count:r.harmonious})}</span> <span class="challenging">${this.t("Challenging: {{count}}",{count:r.challenging})}</span> <span>${this.t("Neutral: {{count}}",{count:r.neutral})}</span></p>`:c} ${n.length>0?l`<ul class="roxy-chips">${n.map(({value:s,label:i})=>{let a=A(s)??"";return l`<li>${a} ${i} ℞</li>`})}</ul>`:c} ${r?.summary&&!this.hideReadings?l`<p>${r.summary}</p>`:c} ${this.renderElementModalityGrid()}</div>`}renderElementModalityGrid(){let e=this.getPlanets();if(e.length===0)return c;let r=["Fire","Earth","Air","Water"],n=["Cardinal","Fixed","Mutable"],s={Fire:this.t("Fire"),Earth:this.t("Earth"),Air:this.t("Air"),Water:this.t("Water")},i={Cardinal:{abbr:this.t("Car"),full:this.t("Cardinal")},Fixed:{abbr:this.t("Fix"),full:this.t("Fixed")},Mutable:{abbr:this.t("Mut"),full:this.t("Mutable")}},a=pt,d=this.data?.summary,p={};for(let g of r)p[g]={Cardinal:[],Fixed:[],Mutable:[]};let u=0;for(let g of e){let x=a.indexOf(z(g.sign??""));if(x<0)continue;let T=r[x%4],C=n[x%3],Kt=A(g.name)??b(g,"name");p[T]?.[C]?.push(Kt),u++}if(u===0)return c;let h=g=>r.reduce((x,T)=>x+(p[T]?.[g]?.length??0),0),$=[...Object.entries(d?.elementDistribution??{}).map(([g,x])=>({label:s[z(g)]??g,count:x})),...Object.entries(d?.modalityDistribution??{}).map(([g,x])=>({label:i[z(g)]?.full??g,count:x}))],v=Object.values(d?.elementDistribution??{}).reduce((g,x)=>g+x,0);return l`${$.length?l`<section class="block distribution" part="section distribution"><h3>${this.t("Element and modality distribution")}</h3><p class="counts"><span class="roxy-label">${this.t("{{count}} planets",{count:v})}</span> ${$.map(({label:g,count:x})=>l`<span>${g}: ${k(this.effectiveLang(),x,0)}</span>`)}</p></section>`:c}<div class="scroll" tabindex="0" role="region" aria-label="${this.t("Element and modality distribution")}"><table class="em-grid" part="table element-modality" aria-label="${this.t("Element and modality distribution")}"><caption class="roxy-label">${this.t("All {{count}} bodies in the chart, placed by sign",{count:u})}</caption><thead><tr><td></td>${n.map(g=>l`<th scope="col" title="${i[g]?.full??g}">${i[g]?.abbr??g}</th>`)}<th scope="col">${this.t("Total")}</th></tr></thead><tbody>${r.map(g=>{let x=n.reduce((T,C)=>T+(p[g]?.[C]?.length??0),0);return l`<tr><th scope="row">${s[g]??g}</th>${n.map(T=>l`<td>${(p[g]?.[T]??[]).join(" ")}</td>`)}<td class="em-total">${x}</td></tr>`})}<tr><th scope="row">${this.t("Total")}</th>${n.map(g=>l`<td class="em-total">${h(g)}</td>`)}<td class="em-total">${u}</td></tr></tbody></table></div>`}renderPatterns(){let e=this.data?.patterns??[];if(e.length===0)return c;let r=[...e].sort((n,s)=>(Nr[n.kind]??9)-(Nr[s.kind]??9)||(s.tightness??0)-(n.tightness??0));return l`<section class="block patterns" part="section patterns"><h3>${this.t("Chart patterns")}</h3>${r.map(n=>this.renderPattern(n))}</section>`}renderPattern(e){let r=e.planets??[],n=e.apex?[...r].sort((s,i)=>+(i===e.apex)-+(s===e.apex)):r;return l`<div class="pattern" part="pattern"><div class="pattern-head"><span class="pattern-name">${e.name}</span> ${e.element?l`<span class="roxy-chip">${e.element}</span>`:c} ${e.modality?l`<span class="roxy-chip">${e.modality}</span>`:c} ${e.dissociate?l`<span class="roxy-chip" title="${this.t("Out of sign: one or more planets sit outside the pattern element or modality, so the theme holds but runs weaker.")}">${this.t("Dissociate")}</span>`:c} ${typeof e.tightness=="number"?l`<span class="pattern-tight roxy-label">${this.t("{{percent}} tight",{percent:Et(this.effectiveLang(),e.tightness,0)})}</span>`:c}</div><ul class="roxy-chips">${n.map(s=>{let i=A(s),a=!!e.apex&&s===e.apex;return l`<li class="${a?"roxy-chip apex":"roxy-chip"}">${i?l`<span aria-hidden="true">${i}</span>`:c}${s}${a?l`<span>${this.t("apex")}</span>`:c}</li>`})}</ul>${e.interpretation&&!this.hideReadings?l`<p class="pattern-interp">${e.interpretation}</p>`:c}</div>`}renderAspectDetails(e){return e.length===0?c:l`<details class="block" part="section aspects"><summary>${this.t("Aspects ({{count}})",{count:e.length})}</summary><roxy-aspects-table bare hide-sections="header" lang="${O(this.effectiveLang())}" ?hide-readings="${this.hideReadings}" exportparts="card, header, section, aspects, details, reading, readings, pattern, patterns, strongest" .data="${{aspects:e}}"></roxy-aspects-table></details>`}renderInterpretations(){let e=this.getPlanets().filter(r=>r.interpretation).map(r=>{let n=r.interpretation,s=A(r.name)??"",i=b(r,"name"),a=n.summary||n.detailed||"",d=n.summary?n.detailed:void 0;return{label:`${s} ${i}`.trim(),aside:`${b(r,"sign")} ${Dt(r.longitude)}`,body:a,extra:l`${d?l`<p>${d}</p>`:c} ${ht(n.keywords)}`}});return this.renderInterpretation(e,"natal-planet-readings","Planet readings")}renderAspects(e,r){let n=new Map;for(let s of e){if(typeof s.longitude!="number")continue;let i=L(s.name);i&&n.set(i,s.longitude)}return r.filter(ie).map(s=>{let i=n.get(L(s.planet1)),a=n.get(L(s.planet2));if(i===void 0||a===void 0)return c;let d=E(m,m,Ht-2,this.toAngle(i)),p=E(m,m,Ht-2,this.toAngle(a)),u=K(s),h=k(this.effectiveLang(),s.orb,1);return R`<line class=${`aspect ${J(s)}`} style=${nr(s)} x1=${d.x} y1=${d.y} x2=${p.x} y2=${p.y}><title>${b(s,"planet1")} ${b(s,"type",u)} ${b(s,"planet2")}${h?` (${this.t("Orb")} ${h}°)`:""}</title></line>`})}};F.endpoints=Be,F.styles=[I,Cr,rr,Lr,Ot,Nt,w`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}h2{overflow-wrap:anywhere}details.block>summary{font-weight:var(--roxy-weight-bold)}svg:where([part~=chart]){width:100%;max-width:var(--roxy-chart-max-width,42.5rem);aspect-ratio:1;height:auto;margin:0 auto;display:block}.wheel-line,.tick{fill:none;stroke:var(--roxy-border)}.tick-major{stroke:var(--roxy-secondary)}.sign-glyph{fill:var(--roxy-secondary);font-size:calc(var(--roxy-text-base) * .875)}.planet-glyph{fill:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-base) * .875);font-weight:var(--roxy-weight-bold)}.planet-deg{fill:var(--roxy-fg);font-size:calc(var(--roxy-text-base) * .4375)}.planet-deg .retro{fill:var(--roxy-danger-fg)}.planet-leader{stroke:var(--roxy-accent);stroke-width:.5px;opacity:.55}.house-num{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .5625)}.cusp-deg{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .375)}.angle-marker{fill:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-base) * .8125);font-weight:var(--roxy-weight-bold)}.angle-tick{stroke:var(--roxy-accent-ink);stroke-width:1.5px}@container (width<=480px){.sign-glyph,.planet-glyph{font-size:calc(var(--roxy-text-base) * 1.5)}.planet-deg{font-size:calc(var(--roxy-text-base) * .8125)}.house-num{font-size:calc(var(--roxy-text-base) * .75)}}.legend,.counts{gap:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-xs);color:var(--roxy-muted);flex-wrap:wrap;display:flex}.counts{font-size:var(--roxy-text-sm);color:var(--roxy-fg)}.legend .caveat{color:var(--roxy-fg);font-weight:var(--roxy-weight-bold)}.harmonious{color:var(--roxy-info-fg)}.challenging{color:var(--roxy-danger-fg)}.scroll{min-width:0;overflow-x:auto}.aspect-grid{margin:0 auto}.aspect-grid :is(th,td){inline-size:var(--roxy-space-lg);block-size:var(--roxy-space-lg);text-align:center;vertical-align:middle;border:1px solid var(--roxy-border);padding:0}.aspect-grid .asp{color:var(--_aspect-ink,var(--roxy-muted))}.facts,.distribution,.patterns{gap:var(--roxy-space-sm);display:grid}.em-grid{width:100%}.em-grid caption{caption-side:top;text-align:start}.em-grid :is(th,td){text-align:center}.em-grid th[scope=row]{text-align:start}.em-grid td{color:var(--roxy-accent-ink)}.em-grid .em-total{color:var(--roxy-fg);font-weight:var(--roxy-weight-bold)}.pattern{gap:var(--roxy-space-xs);padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);display:grid}.pattern-head{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.pattern-name{font-weight:var(--roxy-weight-bold)}.pattern-tight{font-variant-numeric:tabular-nums;margin-inline-start:auto}.roxy-chip.apex{color:var(--roxy-fg);border-color:var(--roxy-accent);font-weight:var(--roxy-weight-bold)}.pattern-interp{font-size:var(--roxy-text-sm)}`],y([S({type:String})],F.prototype,"heading",2),y([_()],F.prototype,"view",2),F=y([Q("roxy-natal-chart")],F);return Hr(Gn);})();
11
+ <text class="planet-glyph" x=${ve.x} y=${ve.y} text-anchor="middle" dominant-baseline="central"><title>${Ee}${Te?` ${this.t("retrograde")}`:""} - ${ke} ${b(x,"sign")}</title>${Fr}</text>
12
+ <text class="planet-deg" x=${$e.x} y=${$e.y} text-anchor="middle" dominant-baseline="central">${Mr}${Te?R`<tspan class="retro"> ℞</tspan>`:c}</text>
13
+ </g>`})}renderPositionDetails(e){return l`<details class="block" part="section positions"><summary>${this.t("Chart details")}</summary><roxy-western-planets-table bare lang="${O(this.effectiveLang())}" exportparts="card, header, table, details, section, houses" .data="${e}"></roxy-western-planets-table></details>`}renderDetails(){let e=this.data?.summary,r=this.data?.aspectsInterpretation;if(!e&&!r)return c;let n=kr(e,"retrogradePlanets");return l`<div class="facts" part="details">${e?.dominantElement||e?.dominantModality?l`<ul class="roxy-chips">${e.dominantElement?l`<li>${this.t("Dominant element")}: ${b(e,"dominantElement")}</li>`:c} ${e.dominantModality?l`<li>${this.t("Dominant modality")}: ${b(e,"dominantModality")}</li>`:c}</ul>`:c} ${r?l`<p class="counts"><span class="harmonious">${this.t("Harmonious: {{count}}",{count:r.harmonious})}</span> <span class="challenging">${this.t("Challenging: {{count}}",{count:r.challenging})}</span> <span>${this.t("Neutral: {{count}}",{count:r.neutral})}</span></p>`:c} ${n.length>0?l`<ul class="roxy-chips">${n.map(({value:s,label:i})=>{let a=A(s)??"";return l`<li>${a} ${i} ℞</li>`})}</ul>`:c} ${r?.summary&&!this.hideReadings?l`<p>${r.summary}</p>`:c} ${this.renderElementModalityGrid()}</div>`}renderElementModalityGrid(){let e=this.getPlanets();if(e.length===0)return c;let r=["Fire","Earth","Air","Water"],n=["Cardinal","Fixed","Mutable"],s={Fire:this.t("Fire"),Earth:this.t("Earth"),Air:this.t("Air"),Water:this.t("Water")},i={Cardinal:{abbr:this.t("Car"),full:this.t("Cardinal")},Fixed:{abbr:this.t("Fix"),full:this.t("Fixed")},Mutable:{abbr:this.t("Mut"),full:this.t("Mutable")}},a=pt,d=this.data?.summary,p={};for(let g of r)p[g]={Cardinal:[],Fixed:[],Mutable:[]};let u=0;for(let g of e){let x=a.indexOf(z(g.sign??""));if(x<0)continue;let k=r[x%4],C=n[x%3],Kt=A(g.name)??b(g,"name");p[k]?.[C]?.push(Kt),u++}if(u===0)return c;let h=g=>r.reduce((x,k)=>x+(p[k]?.[g]?.length??0),0),$=[...Object.entries(d?.elementDistribution??{}).map(([g,x])=>({label:s[z(g)]??g,count:x})),...Object.entries(d?.modalityDistribution??{}).map(([g,x])=>({label:i[z(g)]?.full??g,count:x}))],v=Object.values(d?.elementDistribution??{}).reduce((g,x)=>g+x,0);return l`${$.length?l`<section class="block distribution" part="section distribution"><h3>${this.t("Element and modality distribution")}</h3><p class="counts"><span class="roxy-label">${this.t("{{count}} planets",{count:v})}</span> ${$.map(({label:g,count:x})=>l`<span>${g}: ${T(this.effectiveLang(),x,0)}</span>`)}</p></section>`:c}<div class="scroll" tabindex="0" role="region" aria-label="${this.t("Element and modality distribution")}"><table class="em-grid" part="table element-modality" aria-label="${this.t("Element and modality distribution")}"><caption class="roxy-label">${this.t("All {{count}} bodies in the chart, placed by sign",{count:u})}</caption><thead><tr><td></td>${n.map(g=>l`<th scope="col" title="${i[g]?.full??g}">${i[g]?.abbr??g}</th>`)}<th scope="col">${this.t("Total")}</th></tr></thead><tbody>${r.map(g=>{let x=n.reduce((k,C)=>k+(p[g]?.[C]?.length??0),0);return l`<tr><th scope="row">${s[g]??g}</th>${n.map(k=>l`<td>${(p[g]?.[k]??[]).join(" ")}</td>`)}<td class="em-total">${x}</td></tr>`})}<tr><th scope="row">${this.t("Total")}</th>${n.map(g=>l`<td class="em-total">${h(g)}</td>`)}<td class="em-total">${u}</td></tr></tbody></table></div>`}renderPatterns(){let e=this.data?.patterns??[];if(e.length===0)return c;let r=[...e].sort((n,s)=>(Nr[n.kind]??9)-(Nr[s.kind]??9)||(s.tightness??0)-(n.tightness??0));return l`<section class="block patterns" part="section patterns"><h3>${this.t("Chart patterns")}</h3>${r.map(n=>this.renderPattern(n))}</section>`}renderPattern(e){let r=e.planets??[],n=e.apex?[...r].sort((s,i)=>+(i===e.apex)-+(s===e.apex)):r;return l`<div class="pattern" part="pattern"><div class="pattern-head"><span class="pattern-name">${e.name}</span> ${e.element?l`<span class="roxy-chip">${e.element}</span>`:c} ${e.modality?l`<span class="roxy-chip">${e.modality}</span>`:c} ${e.dissociate?l`<span class="roxy-chip" title="${this.t("Out of sign: one or more planets sit outside the pattern element or modality, so the theme holds but runs weaker.")}">${this.t("Dissociate")}</span>`:c} ${typeof e.tightness=="number"?l`<span class="pattern-tight roxy-label">${this.t("{{percent}} tight",{percent:Et(this.effectiveLang(),e.tightness,0)})}</span>`:c}</div><ul class="roxy-chips">${n.map(s=>{let i=A(s),a=!!e.apex&&s===e.apex;return l`<li class="${a?"roxy-chip apex":"roxy-chip"}">${i?l`<span aria-hidden="true">${i}</span>`:c}${s}${a?l`<span>${this.t("apex")}</span>`:c}</li>`})}</ul>${e.interpretation&&!this.hideReadings?l`<p class="pattern-interp">${e.interpretation}</p>`:c}</div>`}renderAspectDetails(e){return e.length===0?c:l`<details class="block" part="section aspects"><summary>${this.t("Aspects ({{count}})",{count:e.length})}</summary><roxy-aspects-table bare hide-sections="header" lang="${O(this.effectiveLang())}" ?hide-readings="${this.hideReadings}" exportparts="card, header, section, aspects, details, reading, readings, pattern, patterns, strongest" .data="${{aspects:e}}"></roxy-aspects-table></details>`}renderInterpretations(){let e=this.getPlanets().filter(r=>r.interpretation).map(r=>{let n=r.interpretation,s=A(r.name)??"",i=b(r,"name"),a=n.summary||n.detailed||"",d=n.summary?n.detailed:void 0;return{label:`${s} ${i}`.trim(),aside:`${b(r,"sign")} ${Dt(r.longitude)}`,body:a,extra:l`${d?l`<p>${d}</p>`:c} ${ht(n.keywords)}`}});return this.renderInterpretation(e,"natal-planet-readings","Planet readings")}renderAspects(e,r){let n=new Map;for(let s of e){if(typeof s.longitude!="number")continue;let i=L(s.name);i&&n.set(i,s.longitude)}return r.filter(ie).map(s=>{let i=n.get(L(s.planet1)),a=n.get(L(s.planet2));if(i===void 0||a===void 0)return c;let d=E(m,m,Ht-2,this.toAngle(i)),p=E(m,m,Ht-2,this.toAngle(a)),u=K(s),h=T(this.effectiveLang(),s.orb,1);return R`<line class=${`aspect ${J(s)}`} style=${nr(s)} x1=${d.x} y1=${d.y} x2=${p.x} y2=${p.y}><title>${b(s,"planet1")} ${b(s,"type",u)} ${b(s,"planet2")}${h?` (${this.t("Orb")} ${h}°)`:""}</title></line>`})}};F.endpoints=Be,F.styles=[I,Cr,rr,Lr,Ot,Nt,w`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}h2{overflow-wrap:anywhere}details.block>summary{font-weight:var(--roxy-weight-bold)}svg:where([part~=chart]){width:100%;max-width:var(--roxy-chart-max-width,42.5rem);aspect-ratio:1;height:auto;margin:0 auto;display:block}.wheel-line,.tick{fill:none;stroke:var(--roxy-border)}.tick-major{stroke:var(--roxy-secondary)}.sign-glyph{fill:var(--roxy-secondary);font-size:calc(var(--roxy-text-base) * .875)}.planet-glyph{fill:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-base) * .875);font-weight:var(--roxy-weight-bold)}.planet-deg{fill:var(--roxy-fg);font-size:calc(var(--roxy-text-base) * .4375)}.planet-deg .retro{fill:var(--roxy-danger-fg)}.planet-leader{stroke:var(--roxy-accent);stroke-width:.5px;opacity:.55}.house-num{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .5625)}.cusp-deg{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .375)}.angle-marker{fill:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-base) * .8125);font-weight:var(--roxy-weight-bold)}.angle-tick{stroke:var(--roxy-accent-ink);stroke-width:1.5px}@container (width<=480px){.sign-glyph,.planet-glyph{font-size:calc(var(--roxy-text-base) * 1.5)}.planet-deg{font-size:calc(var(--roxy-text-base) * .8125)}.house-num{font-size:calc(var(--roxy-text-base) * .75)}}.legend,.counts{gap:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-xs);color:var(--roxy-muted);flex-wrap:wrap;display:flex}.counts{font-size:var(--roxy-text-sm);color:var(--roxy-fg)}.legend .caveat{color:var(--roxy-fg);font-weight:var(--roxy-weight-bold)}.harmonious{color:var(--roxy-info-fg)}.challenging{color:var(--roxy-danger-fg)}.scroll{min-width:0;overflow-x:auto}.aspect-grid{margin:0 auto}.aspect-grid :is(th,td){inline-size:var(--roxy-space-lg);block-size:var(--roxy-space-lg);text-align:center;vertical-align:middle;border:1px solid var(--roxy-border);padding:0}.aspect-grid .asp{color:var(--_aspect-ink,var(--roxy-muted))}.facts,.distribution,.patterns{gap:var(--roxy-space-sm);display:grid}.em-grid{width:100%}.em-grid caption{caption-side:top;text-align:start}.em-grid :is(th,td){text-align:center}.em-grid th[scope=row]{text-align:start}.em-grid td{color:var(--roxy-accent-ink)}.em-grid .em-total{color:var(--roxy-fg);font-weight:var(--roxy-weight-bold)}.pattern{gap:var(--roxy-space-xs);padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);display:grid}.pattern-head{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.pattern-name{font-weight:var(--roxy-weight-bold)}.pattern-tight{font-variant-numeric:tabular-nums;margin-inline-start:auto}.roxy-chip.apex{color:var(--roxy-fg);border-color:var(--roxy-accent);font-weight:var(--roxy-weight-bold)}.pattern-interp{font-size:var(--roxy-text-sm)}`],y([S({type:String})],F.prototype,"heading",2),y([_()],F.prototype,"view",2),F=y([Q("roxy-natal-chart")],F);return Hr(Gn);})();
216
14
  /*! Bundled license information:
217
15
 
218
16
  @lit/reactive-element/css-tag.js: