@roxyapi/ui 1.5.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (166) hide show
  1. package/components-catalog.json +1 -1
  2. package/dist/cdn/components/almanac-day.js +1 -1
  3. package/dist/cdn/components/angel-number-card.js +1 -1
  4. package/dist/cdn/components/angel-number-lookup.js +1 -1
  5. package/dist/cdn/components/arudha-padas.js +1 -1
  6. package/dist/cdn/components/ashtakavarga-grid.js +1 -1
  7. package/dist/cdn/components/aspects-table.js +1 -1
  8. package/dist/cdn/components/astrocartography-map.js +1 -1
  9. package/dist/cdn/components/bazi-chart.js +1 -1
  10. package/dist/cdn/components/bhav-chalit-table.js +1 -1
  11. package/dist/cdn/components/bhava-bala-table.js +1 -1
  12. package/dist/cdn/components/biorhythm-chart.js +1 -1
  13. package/dist/cdn/components/bodygraph.js +1 -1
  14. package/dist/cdn/components/chara-karakas.js +1 -1
  15. package/dist/cdn/components/choghadiya-grid.js +1 -1
  16. package/dist/cdn/components/compatibility-card.js +1 -1
  17. package/dist/cdn/components/compound-number.js +1 -1
  18. package/dist/cdn/components/crystal-card.js +1 -1
  19. package/dist/cdn/components/crystal-grid.js +1 -1
  20. package/dist/cdn/components/dasha-timeline.js +1 -1
  21. package/dist/cdn/components/data.js +2 -2
  22. package/dist/cdn/components/divisional-chart.js +1 -1
  23. package/dist/cdn/components/dosha-card.js +1 -1
  24. package/dist/cdn/components/dosha-constitution.js +1 -1
  25. package/dist/cdn/components/dream-card.js +1 -1
  26. package/dist/cdn/components/dream-search.js +1 -1
  27. package/dist/cdn/components/endpoint-form.js +1 -1
  28. package/dist/cdn/components/ephemeris-table.js +1 -1
  29. package/dist/cdn/components/fixed-stars.js +1 -1
  30. package/dist/cdn/components/flying-star-chart.js +1 -1
  31. package/dist/cdn/components/forecast-digest.js +1 -1
  32. package/dist/cdn/components/forecast-timeline.js +1 -1
  33. package/dist/cdn/components/gematria.js +1 -1
  34. package/dist/cdn/components/gochara-table.js +1 -1
  35. package/dist/cdn/components/guna-milan.js +1 -1
  36. package/dist/cdn/components/hd-connection.js +1 -1
  37. package/dist/cdn/components/hd-penta.js +1 -1
  38. package/dist/cdn/components/hd-type-card.js +1 -1
  39. package/dist/cdn/components/hd-variables.js +1 -1
  40. package/dist/cdn/components/heliacal-table.js +1 -1
  41. package/dist/cdn/components/hexagram.js +1 -1
  42. package/dist/cdn/components/hora-table.js +1 -1
  43. package/dist/cdn/components/horoscope-card.js +1 -1
  44. package/dist/cdn/components/kp-chart.js +1 -1
  45. package/dist/cdn/components/kp-finance-card.js +1 -1
  46. package/dist/cdn/components/kp-planets-table.js +1 -1
  47. package/dist/cdn/components/kp-ruling-planets.js +1 -1
  48. package/dist/cdn/components/kua-card.js +1 -1
  49. package/dist/cdn/components/local-space-compass.js +1 -1
  50. package/dist/cdn/components/location-search.js +1 -1
  51. package/dist/cdn/components/luck-pillars.js +1 -1
  52. package/dist/cdn/components/mayan-day-sign.js +1 -1
  53. package/dist/cdn/components/moon-phase.js +1 -1
  54. package/dist/cdn/components/nakshatra-card.js +1 -1
  55. package/dist/cdn/components/natal-chart.js +1 -1
  56. package/dist/cdn/components/numerology-card.js +1 -1
  57. package/dist/cdn/components/panchang-table.js +1 -1
  58. package/dist/cdn/components/positions-table.js +1 -1
  59. package/dist/cdn/components/profection-card.js +1 -1
  60. package/dist/cdn/components/reference-card.js +1 -1
  61. package/dist/cdn/components/relocation-wheel.js +1 -1
  62. package/dist/cdn/components/report.js +1 -1
  63. package/dist/cdn/components/shadbala-table.js +1 -1
  64. package/dist/cdn/components/synastry-chart.js +1 -1
  65. package/dist/cdn/components/tarot-card.js +1 -1
  66. package/dist/cdn/components/tarot-catalog.js +1 -1
  67. package/dist/cdn/components/tarot-spread.js +1 -1
  68. package/dist/cdn/components/transit-wheel.js +1 -1
  69. package/dist/cdn/components/transits-table.js +1 -1
  70. package/dist/cdn/components/upagraha-table.js +1 -1
  71. package/dist/cdn/components/vastu-mandala.js +1 -1
  72. package/dist/cdn/components/vedic-aspects.js +1 -1
  73. package/dist/cdn/components/vedic-daily.js +1 -1
  74. package/dist/cdn/components/vedic-kundli.js +1 -1
  75. package/dist/cdn/components/vedic-planets-table.js +1 -1
  76. package/dist/cdn/components/western-planets-table.js +1 -1
  77. package/dist/cdn/components/yoga-list.js +1 -1
  78. package/dist/cdn/components/zodiac-card.js +1 -1
  79. package/dist/cdn/roxy-ui.js +42 -42
  80. package/dist/charts.cjs +2 -2
  81. package/dist/charts.js +2 -2
  82. package/dist/components/almanac-day.js +1 -1
  83. package/dist/components/angel-number-card.js +1 -1
  84. package/dist/components/angel-number-lookup.js +1 -1
  85. package/dist/components/arudha-padas.js +1 -1
  86. package/dist/components/ashtakavarga-grid.js +1 -1
  87. package/dist/components/aspects-table.js +1 -1
  88. package/dist/components/astrocartography-map.js +1 -1
  89. package/dist/components/bazi-chart.js +1 -1
  90. package/dist/components/bhav-chalit-table.js +1 -1
  91. package/dist/components/bhava-bala-table.js +1 -1
  92. package/dist/components/biorhythm-chart.js +1 -1
  93. package/dist/components/bodygraph.js +1 -1
  94. package/dist/components/chara-karakas.js +1 -1
  95. package/dist/components/choghadiya-grid.js +1 -1
  96. package/dist/components/compatibility-card.js +1 -1
  97. package/dist/components/compound-number.js +1 -1
  98. package/dist/components/crystal-card.js +1 -1
  99. package/dist/components/crystal-grid.js +1 -1
  100. package/dist/components/dasha-timeline.js +1 -1
  101. package/dist/components/data.js +1 -1
  102. package/dist/components/divisional-chart.js +1 -1
  103. package/dist/components/dosha-card.js +1 -1
  104. package/dist/components/dosha-constitution.js +1 -1
  105. package/dist/components/dream-card.js +1 -1
  106. package/dist/components/dream-search.js +1 -1
  107. package/dist/components/endpoint-form.js +1 -1
  108. package/dist/components/ephemeris-table.js +1 -1
  109. package/dist/components/fixed-stars.js +1 -1
  110. package/dist/components/flying-star-chart.js +1 -1
  111. package/dist/components/forecast-digest.js +1 -1
  112. package/dist/components/forecast-timeline.js +1 -1
  113. package/dist/components/gematria.js +1 -1
  114. package/dist/components/gochara-table.js +1 -1
  115. package/dist/components/guna-milan.js +1 -1
  116. package/dist/components/hd-connection.js +1 -1
  117. package/dist/components/hd-penta.js +1 -1
  118. package/dist/components/hd-type-card.js +1 -1
  119. package/dist/components/hd-variables.js +1 -1
  120. package/dist/components/heliacal-table.js +1 -1
  121. package/dist/components/hexagram.js +1 -1
  122. package/dist/components/hora-table.js +1 -1
  123. package/dist/components/horoscope-card.js +1 -1
  124. package/dist/components/kp-chart.js +1 -1
  125. package/dist/components/kp-finance-card.js +1 -1
  126. package/dist/components/kp-planets-table.js +1 -1
  127. package/dist/components/kp-ruling-planets.js +1 -1
  128. package/dist/components/kua-card.js +1 -1
  129. package/dist/components/local-space-compass.js +1 -1
  130. package/dist/components/location-search.js +1 -1
  131. package/dist/components/luck-pillars.js +1 -1
  132. package/dist/components/mayan-day-sign.js +1 -1
  133. package/dist/components/moon-phase.js +1 -1
  134. package/dist/components/nakshatra-card.js +1 -1
  135. package/dist/components/natal-chart.js +1 -1
  136. package/dist/components/numerology-card.js +1 -1
  137. package/dist/components/panchang-table.js +1 -1
  138. package/dist/components/positions-table.js +1 -1
  139. package/dist/components/profection-card.js +1 -1
  140. package/dist/components/reference-card.js +1 -1
  141. package/dist/components/relocation-wheel.js +1 -1
  142. package/dist/components/report.js +1 -1
  143. package/dist/components/shadbala-table.js +1 -1
  144. package/dist/components/synastry-chart.js +1 -1
  145. package/dist/components/tarot-card.js +1 -1
  146. package/dist/components/tarot-catalog.js +1 -1
  147. package/dist/components/tarot-spread.js +1 -1
  148. package/dist/components/transit-wheel.js +1 -1
  149. package/dist/components/transits-table.js +1 -1
  150. package/dist/components/upagraha-table.js +1 -1
  151. package/dist/components/vastu-mandala.js +1 -1
  152. package/dist/components/vedic-aspects.js +1 -1
  153. package/dist/components/vedic-daily.js +1 -1
  154. package/dist/components/vedic-kundli.js +1 -1
  155. package/dist/components/vedic-planets-table.js +1 -1
  156. package/dist/components/western-planets-table.js +1 -1
  157. package/dist/components/yoga-list.js +1 -1
  158. package/dist/components/zodiac-card.js +1 -1
  159. package/dist/generated/symbol-font.d.ts +2 -2
  160. package/dist/index.cjs +41 -41
  161. package/dist/index.js +41 -41
  162. package/dist/styles/fonts/symbols/noto-sans-symbols-2.woff2 +0 -0
  163. package/dist/styles/fonts/symbols/noto-sans-symbols.woff2 +0 -0
  164. package/dist/styles/fonts/symbols.css +1 -1
  165. package/dist/version.d.ts +1 -1
  166. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  var RoxyUI_kp_finance_card=(()=>{var q=Object.defineProperty;var Ct=Object.getOwnPropertyDescriptor;var ze=Object.getOwnPropertyNames;var qe=Object.prototype.hasOwnProperty;var Ye=(r,t)=>{for(var e in t)q(r,e,{get:t[e],enumerable:true})},Ve=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ze(t))!qe.call(r,o)&&o!==e&&q(r,o,{get:()=>t[o],enumerable:!(n=Ct(t,o))||n.enumerable});return r};var We=r=>Ve(q({},"__esModule",{value:true}),r),h=(r,t,e,n)=>{for(var o=n>1?void 0:n?Ct(t,e):t,s=r.length-1,i;s>=0;s--)(i=r[s])&&(o=(n?i(t,e,o):i(o))||o);return n&&o&&q(t,e,o),o};var Br={};Ye(Br,{ROXY_UI_TOKENS_STYLE_ID:()=>rt,RoxyKpFinanceCard:()=>P,injectRoxyTokens:()=>nt});var Y=globalThis,V=Y.ShadowRoot&&(Y.ShadyCSS===void 0||Y.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ht=Symbol(),Pt=new WeakMap,U=class{constructor(t,e,n){if(this._$cssResult$=true,n!==ht)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(V&&t===void 0){let n=e!==void 0&&e.length===1;n&&(t=Pt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&Pt.set(e,t))}return t}toString(){return this.cssText}},Ft=r=>new U(typeof r=="string"?r:r+"",void 0,ht),g=(r,...t)=>{let e=r.length===1?r[0]:t.reduce((n,o,s)=>n+(i=>{if(i._$cssResult$===true)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.")})(o)+r[s+1],r[0]);return new U(e,r,ht)},Ot=(r,t)=>{if(V)r.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let n=document.createElement("style"),o=Y.litNonce;o!==void 0&&n.setAttribute("nonce",o),n.textContent=e.cssText,r.appendChild(n)}},ut=V?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(let n of t.cssRules)e+=n.cssText;return Ft(e)})(r):r;var{is:Je,defineProperty:Ze,getOwnPropertyDescriptor:Xe,getOwnPropertyNames:Qe,getOwnPropertySymbols:tr,getPrototypeOf:er}=Object,W=globalThis,Lt=W.trustedTypes,rr=Lt?Lt.emptyScript:"",nr=W.reactiveElementPolyfillSupport,N=(r,t)=>r,D={toAttribute(r,t){switch(t){case Boolean:r=r?rr:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},J=(r,t)=>!Je(r,t),Ut={attribute:true,type:String,converter:D,reflect:false,useDefault:false,hasChanged:J};Symbol.metadata??=Symbol("metadata"),W.litPropertyMetadata??=new WeakMap;var S=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=Ut){if(e.state&&(e.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=true),this.elementProperties.set(t,e),!e.noAccessor){let n=Symbol(),o=this.getPropertyDescriptor(t,n,e);o!==void 0&&Ze(this.prototype,t,o)}}static getPropertyDescriptor(t,e,n){let{get:o,set:s}=Xe(this.prototype,t)??{get(){return this[e]},set(i){this[e]=i}};return{get:o,set(i){let c=o?.call(this);s?.call(this,i),this.requestUpdate(t,c,n)},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??Ut}static _$Ei(){if(this.hasOwnProperty(N("elementProperties")))return;let t=er(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(N("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(N("properties"))){let e=this.properties,n=[...Qe(e),...tr(e)];for(let o of n)this.createProperty(o,e[o])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[n,o]of e)this.elementProperties.set(n,o)}this._$Eh=new Map;for(let[e,n]of this.elementProperties){let o=this._$Eu(e,n);o!==void 0&&this._$Eh.set(o,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let n=new Set(t.flat(1/0).reverse());for(let o of n)e.unshift(ut(o))}else t!==void 0&&e.push(ut(t));return e}static _$Eu(t,e){let n=e.attribute;return n===false?void 0:typeof n=="string"?n:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,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 n of e.keys())this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Ot(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,n){this._$AK(t,n)}_$ET(t,e){let n=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,n);if(o!==void 0&&n.reflect===true){let s=(n.converter?.toAttribute!==void 0?n.converter:D).toAttribute(e,n.type);this._$Em=t,s==null?this.removeAttribute(o):this.setAttribute(o,s),this._$Em=null}}_$AK(t,e){let n=this.constructor,o=n._$Eh.get(t);if(o!==void 0&&this._$Em!==o){let s=n.getPropertyOptions(o),i=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:D;this._$Em=o;let c=i.fromAttribute(e,s.type);this[o]=c??this._$Ej?.get(o)??c,this._$Em=null}}requestUpdate(t,e,n,o=false,s){if(t!==void 0){let i=this.constructor;if(o===false&&(s=this[t]),n??=i.getPropertyOptions(t),!((n.hasChanged??J)(s,e)||n.useDefault&&n.reflect&&s===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,n))))return;this.C(t,e,n)}this.isUpdatePending===false&&(this._$ES=this._$EP())}C(t,e,{useDefault:n,reflect:o,wrapped:s},i){n&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,i??e??this[t]),s!==true||i!==void 0)||(this._$AL.has(t)||(this.hasUpdated||n||(e=void 0),this._$AL.set(t,e)),o===true&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=true;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[o,s]of this._$Ep)this[o]=s;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[o,s]of n){let{wrapped:i}=s,c=this[o];i!==true||this._$AL.has(o)||c===void 0||this.C(o,void 0,s,c)}}let t=false,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(n=>n.hostUpdate?.()),this.update(e)):this._$EM()}catch(n){throw t=false,this._$EM(),n}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=false}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};S.elementStyles=[],S.shadowRootOptions={mode:"open"},S[N("elementProperties")]=new Map,S[N("finalized")]=new Map,nr?.({ReactiveElement:S}),(W.reactiveElementVersions??=[]).push("2.1.2");var vt=globalThis,Nt=r=>r,Z=vt.trustedTypes,Dt=Z?Z.createPolicy("lit-html",{createHTML:r=>r}):void 0,Kt="$lit$",$=`lit$${Math.random().toFixed(9).slice(2)}$`,Bt="?"+$,or=`<${Bt}>`,A=document,G=()=>A.createComment(""),I=r=>r===null||typeof r!="object"&&typeof r!="function",St=Array.isArray,sr=r=>St(r)||typeof r?.[Symbol.iterator]=="function",mt=`[
2
2
  \f\r]`,M=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Mt=/-->/g,Gt=/>/g,T=RegExp(`>|${mt}(?:([^\\s"'>=/]+)(${mt}*=${mt}*(?:[^
3
- \f\r"'\`<>=]|("|')|))|$)`,"g"),It=/'/g,jt=/"/g,zt=/^(?:script|style|textarea|title)$/i,wt=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),a=wt(1),Jr=wt(2),Zr=wt(3),R=Symbol.for("lit-noChange"),l=Symbol.for("lit-nothing"),Ht=new WeakMap,k=A.createTreeWalker(A,129);function qt(r,t){if(!St(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return Dt!==void 0?Dt.createHTML(t):t}var ir=(r,t)=>{let e=r.length-1,n=[],o,s=t===2?"<svg>":t===3?"<math>":"",i=M;for(let c=0;c<e;c++){let d=r[c],y,u,m=-1,v=0;for(;v<d.length&&(i.lastIndex=v,u=i.exec(d),u!==null);)v=i.lastIndex,i===M?u[1]==="!--"?i=Mt:u[1]!==void 0?i=Gt:u[2]!==void 0?(zt.test(u[2])&&(o=RegExp("</"+u[2],"g")),i=T):u[3]!==void 0&&(i=T):i===T?u[0]===">"?(i=o??M,m=-1):u[1]===void 0?m=-2:(m=i.lastIndex-u[2].length,y=u[1],i=u[3]===void 0?T:u[3]==='"'?jt:It):i===jt||i===It?i=T:i===Mt||i===Gt?i=M:(i=T,o=void 0);let w=i===T&&r[c+1].startsWith("/>")?" ":"";s+=i===M?d+or:m>=0?(n.push(y),d.slice(0,m)+Kt+d.slice(m)+$+w):d+$+(m===-2?c:w)}return[qt(r,s+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),n]},j=class r{constructor({strings:t,_$litType$:e},n){let o;this.parts=[];let s=0,i=0,c=t.length-1,d=this.parts,[y,u]=ir(t,e);if(this.el=r.createElement(y,n),k.currentNode=this.el.content,e===2||e===3){let m=this.el.content.firstChild;m.replaceWith(...m.childNodes)}for(;(o=k.nextNode())!==null&&d.length<c;){if(o.nodeType===1){if(o.hasAttributes())for(let m of o.getAttributeNames())if(m.endsWith(Kt)){let v=u[i++],w=o.getAttribute(m).split($),z=/([.?@])?(.*)/.exec(v);d.push({type:1,index:s,name:z[2],strings:w,ctor:z[1]==="."?ft:z[1]==="?"?gt:z[1]==="@"?xt:O}),o.removeAttribute(m)}else m.startsWith($)&&(d.push({type:6,index:s}),o.removeAttribute(m));if(zt.test(o.tagName)){let m=o.textContent.split($),v=m.length-1;if(v>0){o.textContent=Z?Z.emptyScript:"";for(let w=0;w<v;w++)o.append(m[w],G()),k.nextNode(),d.push({type:2,index:++s});o.append(m[v],G())}}}else if(o.nodeType===8)if(o.data===Bt)d.push({type:2,index:s});else{let m=-1;for(;(m=o.data.indexOf($,m+1))!==-1;)d.push({type:7,index:s}),m+=$.length-1}s++}}static createElement(t,e){let n=A.createElement("template");return n.innerHTML=t,n}};function F(r,t,e=r,n){if(t===R)return t;let o=n!==void 0?e._$Co?.[n]:e._$Cl,s=I(t)?void 0:t._$litDirective$;return o?.constructor!==s&&(o?._$AO?.(false),s===void 0?o=void 0:(o=new s(r),o._$AT(r,e,n)),n!==void 0?(e._$Co??=[])[n]=o:e._$Cl=o),o!==void 0&&(t=F(r,o._$AS(r,t.values),o,n)),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:n}=this._$AD,o=(t?.creationScope??A).importNode(e,true);k.currentNode=o;let s=k.nextNode(),i=0,c=0,d=n[0];for(;d!==void 0;){if(i===d.index){let y;d.type===2?y=new H(s,s.nextSibling,this,t):d.type===1?y=new d.ctor(s,d.name,d.strings,this,t):d.type===6&&(y=new bt(s,this,t)),this._$AV.push(y),d=n[++c]}i!==d?.index&&(s=k.nextNode(),i++)}return k.currentNode=A,o}p(t){let e=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}},H=class r{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,n,o){this.type=2,this._$AH=l,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=o,this._$Cv=o?.isConnected??true}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=F(this,t,e),I(t)?t===l||t==null||t===""?(this._$AH!==l&&this._$AR(),this._$AH=l):t!==this._$AH&&t!==R&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):sr(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!==l&&I(this._$AH)?this._$AA.nextSibling.data=t:this.T(A.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:n}=t,o=typeof n=="number"?this._$AC(t):(n.el===void 0&&(n.el=j.createElement(qt(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===o)this._$AH.p(e);else{let s=new yt(o,this),i=s.u(this.options);s.p(e),this.T(i),this._$AH=s}}_$AC(t){let e=Ht.get(t.strings);return e===void 0&&Ht.set(t.strings,e=new j(t)),e}k(t){St(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,n,o=0;for(let s of t)o===e.length?e.push(n=new r(this.O(G()),this.O(G()),this,this.options)):n=e[o],n._$AI(s),o++;o<e.length&&(this._$AR(n&&n._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(false,true,e);t!==this._$AB;){let n=Nt(t).nextSibling;Nt(t).remove(),t=n}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},O=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,n,o,s){this.type=1,this._$AH=l,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=l}_$AI(t,e=this,n,o){let s=this.strings,i=false;if(s===void 0)t=F(this,t,e,0),i=!I(t)||t!==this._$AH&&t!==R,i&&(this._$AH=t);else{let c=t,d,y;for(t=s[0],d=0;d<s.length-1;d++)y=F(this,c[n+d],e,d),y===R&&(y=this._$AH[d]),i||=!I(y)||y!==this._$AH[d],y===l?t=l:t!==l&&(t+=(y??"")+s[d+1]),this._$AH[d]=y}i&&!o&&this.j(t)}j(t){t===l?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},ft=class extends O{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===l?void 0:t}},gt=class extends O{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==l)}},xt=class extends O{constructor(t,e,n,o,s){super(t,e,n,o,s),this.type=5}_$AI(t,e=this){if((t=F(this,t,e,0)??l)===R)return;let n=this._$AH,o=t===l&&n!==l||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,s=t!==l&&(n===l||o);o&&this.element.removeEventListener(this.name,this,n),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)}},bt=class{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){F(this,t)}};var ar=vt.litHtmlPolyfillSupport;ar?.(j,H),(vt.litHtmlVersions??=[]).push("3.3.3");var Yt=(r,t,e)=>{let n=e?.renderBefore??t,o=n._$litPart$;if(o===void 0){let s=e?.renderBefore??null;n._$litPart$=o=new H(t.insertBefore(G(),s),s,void 0,e??{})}return o._$AI(r),o};var $t=globalThis,E=class extends S{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=Yt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false)}render(){return R}};E._$litElement$=true,E.finalized=true,$t.litElementHydrateSupport?.({LitElement:E});var dr=$t.litElementPolyfillSupport;dr?.({LitElement:E});($t.litElementVersions??=[]).push("4.2.2");var Vt=[{endpoint:"vedic-astrology/kp/daily-finance",method:"POST"}];function X(r){return r.toLowerCase().replace(/[\s_-]+/g," ").trim()}function Wt(r){return r.replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([a-z])([0-9])/g,"$1 $2").replace(/^\w/,t=>t.toUpperCase())}var cr=new RegExp("(?![\\d#*])\\p{Emoji}","gu"),lr=r=>r.replace(cr,"$&\uFE0E"),Q=r=>Object.fromEntries(Object.entries(r).map(([t,e])=>[t,lr(e)])),pr=(r,t)=>t?r[X(t)]:void 0,hr=Q({sun:"\u2609",moon:"\u263D",mercury:"\u263F",venus:"\u2640",earth:"\u2641",mars:"\u2642",jupiter:"\u2643",saturn:"\u2644",uranus:"\u2645",neptune:"\u2646",pluto:"\u2647",rahu:"\u260A",ketu:"\u260B",ascendant:"Asc",midheaven:"MC","part of fortune":"\u2297",vertex:"Vx",lagna:"La","north node":"\u260A","south node":"\u260B",chiron:"\u26B7",lilith:"\u26B8","black moon lilith":"\u26B8"}),Jt=r=>pr(hr,r);var mn=Q({aries:"\u2648",taurus:"\u2649",gemini:"\u264A",cancer:"\u264B",leo:"\u264C",virgo:"\u264D",libra:"\u264E",scorpio:"\u264F",sagittarius:"\u2650",capricorn:"\u2651",aquarius:"\u2652",pisces:"\u2653"});var yn=Q({conjunction:"\u260C",semisextile:"\u26BA","semi sextile":"\u26BA",semisquare:"\u2220","semi square":"\u2220",sextile:"\u26B9",square:"\u25A1",trine:"\u25B3",sesquiquadrate:"\u26BC",quincunx:"\u26BB",opposition:"\u260D"});var fn=Q({heaven:"\u2630",lake:"\u2631",fire:"\u2632",thunder:"\u2633",wind:"\u2634",water:"\u2635",mountain:"\u2636",earth:"\u2637"});var Zt="\u211E";var ur={attribute:true,type:String,converter:D,reflect:false,hasChanged:J},mr=(r=ur,t,e)=>{let{kind:n,metadata:o}=e,s=globalThis.litPropertyMetadata.get(o);if(s===void 0&&globalThis.litPropertyMetadata.set(o,s=new Map),n==="setter"&&((r=Object.create(r)).wrapped=true),s.set(e.name,r),n==="accessor"){let{name:i}=e;return{set(c){let d=t.get.call(this);t.set.call(this,c),this.requestUpdate(i,d,r,true,c)},init(c){return c!==void 0&&this.C(i,void 0,r,c),c}}}if(n==="setter"){let{name:i}=e;return function(c){let d=this[i];t.call(this,c),this.requestUpdate(i,d,r,true,c)}}throw Error("Unsupported decorator location: "+n)};function f(r){return(t,e)=>typeof e=="object"?mr(r,t,e):((n,o,s)=>{let i=o.hasOwnProperty(s);return o.constructor.createProperty(s,n),i?Object.getOwnPropertyDescriptor(o,s):void 0})(r,t,e)}function x(r){return f({...r,state:true,attribute:false})}var _=r=>r??l;var Xt=["de","en","es","fr","hi","pt","ru","tr","zh-Hans","zh-Hant"];function Tt(r){if(r.lang)return r.lang;if(typeof document>"u")return;let t=r.closest?.("[lang]")?.getAttribute("lang");return t||document.documentElement.lang||void 0}var yr={tw:"hant",hk:"hant",mo:"hant",cn:"hans",sg:"hans",my:"hans"};function Et(r,t){let e=r.toLowerCase();return t.find(n=>n.toLowerCase()===e)}function Qt(r,t=Xt){let e=Tt(r);if(!e)return;let n=Et(e,t);if(n)return n;let o=e.toLowerCase().split("-"),s=o[0];if(s==="zh"){let i=o.find(c=>c==="hans"||c==="hant")??yr[o[1]??""];return i?Et(`zh-${i}`,t):void 0}return Et(s,t)}var re="symbols";var fr={Fraunces:["latin","latin-ext"],Jost:["latin","latin-ext","cyrillic"],Geist:["latin","latin-ext","cyrillic"]},kt='"Jost", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',te='"Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',ee='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',et={"fraunces-jost":{name:"Fraunces with Jost",sans:kt,display:'"Fraunces", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif'},jost:{name:"Jost",sans:kt,display:kt},geist:{name:"Geist",sans:te,display:te},system:{name:"System",sans:ee,display:ee}};function ne(r){let{sans:t,display:e}=et[r];return Object.keys(fr).filter(n=>`${t} ${e}`.includes(`"${n}"`))}var oe="1.5.0";var gr=/^(.*)\/cdn\/(?:roxy-ui|components\/[\w-]+)\.js$/,xr=/^(.*\/dist)\/(?:index|components\/[\w-]+)\.js$/;function se(r,t){if(!t)return;let e=new URL(t);if(e.protocol!=="https:"&&e.protocol!=="http:")return;let n=(gr.exec(e.pathname)??xr.exec(e.pathname))?.[1];if(n!==void 0)return e.hostname==="cdn.jsdelivr.net"?`https://cdn.jsdelivr.net/npm/@roxyapi/ui@${r}/dist`:`${e.origin}${n}`}var wr={},br="color-mix(in oklab, var(--roxy-accent) 70%, black)",vr="var(--roxy-accent)",Sr="color-mix(in srgb, var(--roxy-accent) 40%, transparent)",ie=/^#(?:[\da-f]{3}|[\da-f]{6})$/i;function ae(r){return r!==void 0&&Object.hasOwn(et,r)}function de(r){let t=[];return r.brandColor&&ie.test(r.brandColor)&&t.push(`--roxy-primary:${r.brandColor}`),r.brandAccent&&ie.test(r.brandAccent)&&t.push(`--roxy-accent:${r.brandAccent}`,`--roxy-accent-ink:light-dark(${br},${vr})`,`--roxy-ring:${Sr}`),t.join(";")}function ce(r,t){if(ae(t))return t;let e=r.getRootNode();if(("host"in e?e.host:null)?.localName.startsWith("roxy-")||!globalThis.getComputedStyle)return;let o=r.shadowRoot?.firstElementChild,s=o?.localName==="style"?o:null;s?.sheet&&(s.sheet.disabled=true);let i,c,d;try{let y=globalThis.getComputedStyle(r),u=m=>y.getPropertyValue(m).trim();i=u("--roxy-font-sans"),c=u("--roxy-font-display"),d=u("--roxy-font")}finally{s?.sheet&&(s.sheet.disabled=false)}if(!(i||c))return ae(d)?d:void 0}function le(r){let{sans:t,display:e}=et[r];return`--roxy-font:${r};--roxy-font-sans:${t};--roxy-font-display:${e}`}var pe=se(oe,globalThis.document?.currentScript?.src||wr.url);function he(r,t){if(typeof document>"u"||t===void 0)return;let e=`roxy-ui-font-${r}`;if(document.getElementById(e))return;let n=document.createElement("link");n.id=e,n.rel="stylesheet",n.href=`${t}/styles/fonts/${r}.css`,document.head.append(n)}function ue(r,t=pe){ne(r).length>0&&he(r,t)}function me(r=pe){he(re,r)}var ye='@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-moon-shade: color-mix(in oklab, var(--roxy-fg) 78%, var(--roxy-bg));--roxy-font: initial;--roxy-font-sans: initial;--roxy-font-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, "Liberation Mono", monospace;--roxy-font-symbol: "Roxy Symbols", ui-sans-serif, system-ui, sans-serif;--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-moon-lit: color-mix(in oklab, var(--roxy-accent) 6%, #f6eedf);--roxy-moon-mare: color-mix( in oklab, var(--roxy-moon-lit) 62%, var(--roxy-moon-shade) );--roxy-moon-rim: color-mix( in oklab, var(--roxy-moon-shade) 70%, var(--roxy-fg) );--roxy-moon-eclipse: color-mix( in oklab, color-mix(in oklab, var(--roxy-danger) 55%, var(--roxy-warning)) 72%, var(--roxy-moon-shade) );--roxy-moon-corona: color-mix( in oklab, var(--roxy-warning) 60%, var(--roxy-moon-lit) );--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);--roxy-moon-shade: color-mix( in oklab, var(--roxy-fg) 10%, var(--roxy-bg) )}}: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);--roxy-moon-shade: color-mix(in oklab, var(--roxy-fg) 78%, var(--roxy-bg))}: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);--roxy-moon-shade: color-mix(in oklab, var(--roxy-fg) 10%, var(--roxy-bg))}@media(prefers-reduced-motion:reduce){:where(:root,:host){--roxy-motion-duration: 0ms}}}';var rt="roxy-ui-tokens";function nt(){if(typeof document>"u")return null;let r=document.getElementById(rt);if(r)return r;let t=document.createElement("style");return t.id=rt,t.textContent=ye,document.head.prepend(t),t}var fe="__ROXY_UI_I18N__";function ge(){let r=globalThis,t=r[fe];if(t)return t;let e={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return r[fe]=e,e}function $r(r,t){return t?r.replace(/\{\{(\w+)\}\}/g,(e,n)=>n in t?String(t[n]??""):e):r}function xe(r,t,e){return $r(Er(r,t)??t,e)}function Er(r,t){if(!r)return;let{catalogs:e}=ge(),n=r.toLowerCase();return(e[n]??e[n.split("-")[0]])?.[X(t)]}function be(r){let{listeners:t}=ge();return t.add(r),()=>{t.delete(r)}}var ot=class{constructor(t){this.host=t,t.addController(this)}hostConnected(){this.unsubscribe=be(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var st=class extends E{constructor(){super();this.translator=(e,n)=>this.t(e,n);new ot(this)}connectedCallback(){super.connectedCallback(),nt()}updated(e){super.updated(e),this.renderRoot.querySelector(".roxy-glyph")&&me()}fontDeclarations(e){let n=ce(this,e);return n?(ue(n),le(n)):""}renderFontStyle(){let e=this.fontDeclarations();return e?a`<style>:host{${e}}</style>`:l}t(e,n){return xe(this.effectiveLang(),e,n)}effectiveLang(){return Tt(this)}};var ve=g`:where(.roxy-glyph){font-family:var(--roxy-font-symbol)}`;function Se(r){return r?a`<span class="roxy-glyph" aria-hidden="true">${r}</span>`:l}var we=g`: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 Tr=g`: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}`,it=[Tr,we,ve];var kr="__cols",Ar="__rows";function Rr(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function at(r){if(Array.isArray(r)){let s=false,i=r.map(c=>{let d=at(c);return d!==c&&(s=true),d});return s?i:r}if(!Rr(r))return r;let t=r[kr],e=r[Ar];if(Array.isArray(t)&&Array.isArray(e)&&Object.keys(r).length===2)return e.map(s=>{let i={};return t.forEach((c,d)=>{i[c]=at(s[d])}),i});let n=false,o={};for(let[s,i]of Object.entries(r)){let c=at(i);c!==i&&(n=true),o[s]=c}return n?o:r}function $e(r){return at(r)}function Ee(r,t){return r.find(e=>e.attrs&&Object.entries(e.attrs).every(([n,o])=>t[n]===o))??r[0]}var _r="pk_live_YOUR_KEY",Te={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 ke(r){if(r)return r===_r?Te.sample:r.startsWith("pk_")?void 0:Te.secret}function Ae(r,t,e={}){e.warn&&console.warn(t.message),r.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:t.reason,message:t.message},bubbles:true,composed:true}))}var Re="https://roxyapi.com/api/v2";async function Cr(r){try{let t=await r.json();if(t?.error){let e=t.code==="validation_error"&&Array.isArray(t.issues)?t.issues.filter(n=>typeof n.path=="string"&&typeof n.message=="string").map(n=>({path:n.path,message:n.message})):null;return{message:t.error,issues:e?.length?e:null,worded:true,...t.code?{code:t.code}:{}}}}catch{}return{message:`Request failed (${r.status})`,issues:null,worded:false}}var _e={fromAttribute:r=>{if(r!=null){try{let t=JSON.parse(r);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.")}}},L=class extends Error{constructor(e,n=null,o=true,s,i){super(e);this.issues=n;this.worded=o;this.status=s;this.code=i}};function Ce(r){return r.submitUrl?void 0:ke(r.publishableKey)}async function At(r,t,e){let n=Ce(r);if(n)throw new L(n.message);let o=r.submitUrl?await fetch(r.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:Pr(t,r.submitContext),signal:e}):await Fr(r,t,e);if(!o.ok){let s=await Cr(o);throw new L(s.message,s.issues,s.worded,o.status,s.code)}return await o.json()}function Pr(r,t){return JSON.stringify(t?{...r,context:t}:r)}function Fr(r,t,e){let n=new URL(`${r.baseUrl??Re}${t.path}`,document.baseURI);for(let[s,i]of Object.entries(t.query??{}))i!=null&&n.searchParams.set(s,String(i));let o={Accept:"application/json"};return r.publishableKey&&(o["X-API-Key"]=r.publishableKey),t.body!=null&&(o["Content-Type"]="application/json"),fetch(n,{method:t.method??"GET",headers:o,body:t.body!=null?JSON.stringify(t.body):void 0,signal:e})}var dt=class{constructor(t){this.baseUrl=Re;this.worded=true;this.failure={};this.host=t,t.addController(this)}hostDisconnected(){this.abort?.abort(),this.abort=void 0}async run(t){this.worded=true,this.failure={};let e=Ce(this);if(e){this.host.error=e.message,Ae(this.host,e);return}this.abort?.abort();let n=new AbortController;this.abort=n,this.host.loading=true,this.host.error=null,this.host.issues=null;try{let o=await At(this,t,n.signal);if(n.signal.aborted)return;this.host.data=o}catch(o){if(n.signal.aborted||o?.name==="AbortError")return;o instanceof L&&(this.host.issues=o.issues,this.failure={status:o.status,code:o.code}),this.worded=o instanceof L&&o.worded,this.host.error=o instanceof Error?o.message:String(o)}finally{this.abort===n&&(this.abort=void 0),n.signal.aborted||(this.host.loading=false)}}};function Pe(r,t,e,n=[]){let o={...e},s=`/${r.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(y,u)=>{let m=o[u];return delete o[u],encodeURIComponent(String(m??""))}),i=new Set(n),c={},d={};for(let[y,u]of Object.entries(o))u===void 0||u===""||(t==="GET"||i.has(y)?c[y]=u:d[y]=u);return{path:s,method:t,query:c,body:t==="POST"?d:void 0}}function Fe(){return a`<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 Lo=g`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 Go=g`.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 Oe(r,t,e){let n=r.filter(o=>!!o.body);return n.length===0?l:a`<section class="block" part="section readings"><h3>${e}</h3>${n.map((o,s)=>a`<details class="interp-card" part="reading" name="${t}" ?open="${s===0}"><summary><span class="interp-lead">${Se(o.glyph)} ${o.label}</span> ${Fe()} ${o.aside?a`<span class="interp-aside"><small>${o.aside}</small></span>`:l}</summary><div class="interp-body"><p>${o.body}</p>${o.extra??l}</div></details>`)}</section>`}var Or="roxy-data";function Lr(r){return r.nodeName==="SCRIPT"&&r.getAttribute("type")==="application/json"}var ct=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(Lr(t)&&t.classList.contains(Or))return t;return null}parse(t){if(t?.trim())try{return JSON.parse(t)}catch{return}}};var p=class extends st{constructor(){super();this.data=null;this.endpoint="";this.remember=false;this.hideReadings=false;this.hideSections="";this.loading=false;this.error=null;this.issues=null;this.selfFetched=false;this.editing=false;this.sticky=false;this.hostLoaded=false;this.moreLoading=false;this.moreError=null;this.onMore=async()=>{let e=this.lastRequest,n=this.listKey,o=this.listRows();if(!(!e||!n||!o)){this.moreLoading=true,this.moreError=null;try{let s=await At(this.fetcher,{...e,query:{...e.query,offset:o.length}});if(this.lastRequest!==e)return;let i=s[n];this.data={...this.data,...s,[n]:[...o,...Array.isArray(i)?i:[]]}}catch(s){this.lastRequest===e&&(this.moreError=s instanceof Error?s.message:String(s))}finally{this.moreLoading=false}}};this.onEdit=()=>{this.editing=true};this.onFormSubmit=e=>{let n=this.selfFetch();if(!n)return;let o=e.detail;this.lastValues=o.values,this.sticky=!!o.sticky,this.selfFetched=true,this.editing=false,this.remember&&this.writeRemembered(o.values),this.fetchFresh(Pe(n.endpoint,n.method,{...o.values,...this.ownRequest()},o.queryKeys??[]))};new ct(this),this.fetcher=new dt(this)}static{this.styles=[it]}static{this.endpoints=[]}willUpdate(e){if(e.has("data")&&this.data!=null){let n=$e(this.data);n!==this.data&&(this.data=n)}(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:Ee(this.constructor.endpoints,this);return e&&{endpoint:e.endpoint,method:this.method??e.method}}render(){return a`${this.hostStyle()}${this.renderState()}`}drawn(e){try{return this.renderData(e)}catch(n){return console.warn(`[roxy-ui] ${this.localName} could not draw its response`,n),this.dispatchEvent(new CustomEvent("roxy-render-error",{detail:{error:n},bubbles:true,composed:true})),customElements.get("roxy-data")?a`<roxy-data .data="${e}" lang="${_(this.effectiveLang())}"></roxy-data>`:this.renderEmpty()}}hostStyle(){let e=this.hideSections.split(",").map(s=>s.trim().toLowerCase()).filter(s=>/^[a-z][a-z0-9-]*$/.test(s)),n=[de(this),this.fontDeclarations(this.font)].filter(Boolean).join(";");if(e.length===0&&!n)return l;let o=(n?`:host{${n}}`:"")+e.map(s=>`[part~="${s}"],roxy-endpoint-form::part(${s}){display:none!important}`).join("");return a`<style>${o}</style>`}ownRequest(){return{}}get failure(){return this.fetcher.failure}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()?a`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data):this.renderNoData()}renderInterpretation(e,n,o){return this.hideReadings?l:Oe(e,n,this.t(o??"Reading"))}renderResult(e){let n=a`<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()?a`${n}${this.renderAttribution()}`:n}renderWithForm(e){return a`${this.renderForm()}${e}`}stickyBody(){return this.loading?this.renderLoading():this.error!=null?this.issues?l:this.renderErrorBanner(this.error):this.data==null?l:this.showAttribution()?a`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data)}renderMore(){let e=this.listRows(),n=this.data?.total;return!this.lastRequest||!e||typeof n!="number"?l:e.length>=n?l:a`<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?a`<p class="roxy-error" role="alert">${this.t(this.moreError)}</p>`:l}</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=true,this.syncFetcher(),this.fetchFresh(e)}pickRow(e){this.dispatchEvent(new CustomEvent("roxy-symbol-select",{detail:e,bubbles:true,composed:true})),this.openRow(e.id)}openRow(e){if(!this.rowDetail||!(this.publishableKey||this.submitUrl))return;let n=this.openedRow??document.createElement(this.rowDetail.tag);n.publishableKey=this.publishableKey,n.baseUrl=this.baseUrl,n.submitUrl=this.submitUrl,n.submitContext=this.submitContext,n.hideReadings=this.hideReadings,n.hideSections=this.hideSections;let o=this.effectiveLang();o&&n.setAttribute("lang",o),this.openedRow=n,this.openedRowId=e,n.load({path:`/${this.rowDetail.path.replace("{id}",encodeURIComponent(e))}`,method:"GET",query:{lang:Qt(this)}}).then(()=>n.scrollIntoView?.({block:"nearest"}))}showAttribution(){return this.attribution!=null&&this.attribution!=="off"&&this.attribution!=="false"}renderAttribution(){return a`<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(l):this.renderEmpty()}renderForm(){let e=this.selfFetch();return a`<roxy-endpoint-form part="form" exportparts="hint" data-endpoint="${e?.endpoint??""}" method="${e?.method??"POST"}" spec-url="${_(this.specUrl)}" publishable-key="${_(this.publishableKey)}" location-url="${_(this.locationUrl)}" submit-label="${_(this.submitLabel)}" lang="${_(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 a`<div class="roxy-empty" role="status" part="empty">${this.t("No data")}</div>`}renderLoading(){return a`<div class="roxy-skeleton" style="height:5lh" role="status" aria-label="${this.t("Loading")}" part="loading"></div>`}renderError(e){let n=!!this.selfFetch();if(n&&this.issues)return this.renderForm();let o=this.renderErrorBanner(e);return n?a`${o}${this.renderForm()}`:o}renderErrorBanner(e){return a`<div class="roxy-error" role="alert" part="error">${!this.fetcher.worded&&this.errorMessage||this.t(e)}</div>`}};h([f({attribute:false})],p.prototype,"data",2),h([f({type:String,attribute:"data-endpoint"})],p.prototype,"endpoint",2),h([f({type:String})],p.prototype,"method",2),h([f({type:String,attribute:"publishable-key"})],p.prototype,"publishableKey",2),h([f({type:String,attribute:"base-url"})],p.prototype,"baseUrl",2),h([f({type:String,attribute:"spec-url"})],p.prototype,"specUrl",2),h([f({type:String,attribute:"submit-url"})],p.prototype,"submitUrl",2),h([f({attribute:"submit-context",converter:_e})],p.prototype,"submitContext",2),h([f({type:String,attribute:"location-url"})],p.prototype,"locationUrl",2),h([f({type:Boolean})],p.prototype,"remember",2),h([f({type:Boolean,attribute:"hide-readings",reflect:true})],p.prototype,"hideReadings",2),h([f({type:String,attribute:"hide-sections",reflect:true})],p.prototype,"hideSections",2),h([f({type:String,attribute:"brand-color"})],p.prototype,"brandColor",2),h([f({type:String,attribute:"brand-accent"})],p.prototype,"brandAccent",2),h([f({type:String})],p.prototype,"font",2),h([f({type:String})],p.prototype,"hemisphere",2),h([f({type:String,attribute:"submit-label"})],p.prototype,"submitLabel",2),h([f({type:String,attribute:"error-message"})],p.prototype,"errorMessage",2),h([f({type:String})],p.prototype,"attribution",2),h([x()],p.prototype,"loading",2),h([x()],p.prototype,"error",2),h([x()],p.prototype,"issues",2),h([x()],p.prototype,"selfFetched",2),h([x()],p.prototype,"editing",2),h([x()],p.prototype,"sticky",2),h([x()],p.prototype,"openedRow",2),h([x()],p.prototype,"openedRowId",2),h([x()],p.prototype,"moreLoading",2),h([x()],p.prototype,"moreError",2);var Le=r=>t=>{customElements.get(r)||customElements.define(r,t)};var Ue=g`.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}`;var lt=/^\d{4}-\d{2}-\d{2}$/,Ur=/^\d{4}-\d{2}$/,Me=/^\d{2}:\d{2}(:\d{2})?$/,Nr=/^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2}(\.\d+)?)?$/,Ne=new Map;function C(r){if(!r)return["en"];let t=Ne.get(r);if(t)return[t,"en"];let e="en";try{e=Intl.getCanonicalLocales(r)[0]??"en"}catch{e="en"}return Ne.set(r,e),[e,"en"]}var De=new Map;function Ge(r){let t=r??"",e=De.get(t);if(e)return e;let o={hour:new Intl.DateTimeFormat(C(r),{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 De.set(t,o),o}function Dr(r,t){return r&&t?`${r} - ${t}`:r||t}function Rt(r){let t=Me.test(r)?`1970-01-01T${r}`:lt.test(r)?`${r}T00:00:00`:Ur.test(r)?`${r}-01T00:00:00`:Nr.test(r)?r.replace(" ","T"):null;return t?{d:new Date(`${t}Z`),timeZone:"UTC"}:{d:new Date(r)}}function K(r,t){if(typeof t!="string"||t.length===0||lt.test(t))return"";let{d:e,timeZone:n}=Rt(t);return Number.isNaN(e.getTime())?t:e.toLocaleTimeString(C(r),{...Ge(r),timeZone:n})}function Mr(r,t){if(typeof t!="string"||t.length===0)return"";let{d:e,timeZone:n}=Rt(t);return Number.isNaN(e.getTime())?t:e.toLocaleDateString(C(r),{month:"short",day:"numeric",year:"numeric",timeZone:n})}function Ie(r,t){return t?Dr(K(r,t.start),K(r,t.end)):""}function pt(r,t){let e=t.filter(Boolean);return e.length<2?e[0]??"":new Intl.ListFormat(C(r),{style:"long",type:"conjunction"}).format(e)}function b(r,t,e=1){return typeof t!="number"||!Number.isFinite(t)?"":t.toLocaleString(C(r),{maximumFractionDigits:e})}function _t(r,t,e=1){return typeof t!="number"||!Number.isFinite(t)?"":(t/100).toLocaleString(C(r),{style:"percent",maximumFractionDigits:e})}var Gr={"kp-newcomb":"KP Newcomb","kp-old":"KP Old",lahiri:"Lahiri",raman:"B.V. Raman",custom:"Custom"};function je(r,t,e){let n=typeof t=="string"?Gr[t]??Wt(t):"",o=typeof e=="number"?`${b(r,e,2)}\xB0`:"";return n&&o?`${n} (${o})`:n||o}function B(r,t,e,n=false){let o=typeof t=="string"&&lt.test(t)&&typeof e=="string"&&Me.test(e)?`${t}T${e}`:t;if(typeof o!="string"||o.length===0)return"";if(lt.test(o))return Mr(r,o);let{d:s,timeZone:i}=Rt(o);return Number.isNaN(s.getTime())?o:s.toLocaleString(C(r),{month:"short",day:"numeric",year:"numeric",...Ge(r),...n?{second:"2-digit"}:{},timeZone:i})}var He=g`.roxy-frame{color:var(--roxy-muted);font-size:var(--roxy-text-xs);line-height:var(--roxy-leading-normal);margin:0}.roxy-frame .roxy-frame-deg{font-variant-numeric:tabular-nums}`;function Ke(r,t,e){if(!t?.ayanamsa)return l;let n=je(r,t.ayanamsa);if(!n)return l;let o=typeof t.ayanamsaDegrees=="number"?b(r,t.ayanamsaDegrees,4):void 0;return a`<p class="roxy-frame">${o===void 0?e("Sidereal frame: {{frame}}",{frame:n}):e("Sidereal frame: {{frame}}, {{degrees}}\xB0 subtracted",{frame:n,degrees:o})}</p>`}var Ir={strong:"Strong",favourable:"Favourable",mixed:"Mixed",caution:"Caution",unfavourable:"Unfavourable"},jr={favourable:"Favourable",mixed:"Mixed",unfavourable:"Unfavourable",neutral:"Neutral"},Be={cusps:"Cusps",dasha:"Dasha",rulingPlanets:"Ruling planets",moonWindows:"Moon windows"},Hr={gain:"Gain",loss:"Loss"},Kr={mahadasha:"Mahadasha",antardasha:"Antardasha",pratyantardasha:"Pratyantardasha",sookshmaDasha:"Sookshma"},P=class extends p{renderData(t){return t.layers?a`<div class="wrap" part="card" aria-label="${this.t("KP daily finance")}">${this.renderHead(t)} ${this.renderSignificators(t)}<section class="block" part="section cusps">${this.renderLayer("cusps",t.layers.cusps,this.renderCuspRows(t.layers.cusps.rows))}</section><section class="block" part="section dasha">${this.renderLayer("dasha",t.layers.dasha,this.renderDashaRows(t.layers.dasha.rows))}</section><section class="block" part="section ruling-planets">${this.renderLayer("rulingPlanets",t.layers.rulingPlanets,this.renderRulingRows(t.layers.rulingPlanets.rows))}</section><section class="block" part="section moon-windows">${this.renderLayer("moonWindows",t.layers.moonWindows,this.renderWindowRows(t.layers.moonWindows.rows))}</section>${this.renderWindows(t)}<section class="block" part="section frame">${Ke(this.effectiveLang(),{ayanamsa:t.ayanamsa,ayanamsaDegrees:t.ayanamsaDegrees},this.translator)}</section></div>`:this.renderEmpty()}renderHead(t){let e=this.effectiveLang();return a`<header class="head" part="header"><div class="title-row"><h2 class="title">${this.t("KP daily finance")}</h2><span class="when">${B(e,t.date)}</span></div><div class="verdict-row"><span class="verdict ${t.band}">${this.t(Ir[t.band])}</span> <span class="evidence">${b(e,t.score,1)}</span></div><dl class="roxy-facts" part="details"><div class="fact"><dt>${this.t("Reading moment")}</dt><dd>${B(e,t.readingAt)}</dd></div><div class="fact"><dt>${this.t("Gain houses")}</dt><dd>${pt(e,t.houses.gain.map(String))}</dd></div><div class="fact"><dt>${this.t("Loss houses")}</dt><dd>${pt(e,t.houses.loss.map(String))}</dd></div></dl></header>`}renderSignificators(t){let e=t.significators,n=this.effectiveLang(),o=s=>a`<div class="roxy-chips">${s.map(i=>a`<span class="chip roxy-chip">${this.glyphName(i)}</span>`)}</div>`;return a`<section class="block" part="section significators"><h3>${this.t("Significators")}</h3><dl class="roxy-facts"><div class="fact"><dt>${this.t("Gain")}</dt><dd>${o(e.gain)}</dd></div><div class="fact"><dt>${this.t("Loss")}</dt><dd>${o(e.loss)}</dd></div></dl>${e.byHouse.length?a`<div class="scroll" part="table" tabindex="0" role="region" aria-label="${this.t("Significators")}"><table><thead><tr><th scope="col">${this.t("House")}</th><th scope="col">${this.t("Significators")}</th></tr></thead><tbody>${e.byHouse.map(s=>a`<tr><td class="num">${s.house} ${this.groupChip(s.group)}</td><td class="names">${pt(n,[...new Set(s.significators)])}</td></tr>`)}</tbody></table></div>`:l}</section>`}renderLayer(t,e,n){let o=this.effectiveLang();return a`<div class="block-head"><h3>${this.t(Be[t])}</h3><span class="evidence">${this.t("Weight")} ${_t(o,e.weight,0)} · ${this.t("Score")} ${b(o,e.score,1)}</span></div><div class="scroll" part="table" tabindex="0" role="region" aria-label="${this.t(Be[t])}">${n}</div>`}renderCuspRows(t){return a`<table><thead><tr><th scope="col">${this.t("House")}</th><th scope="col">${this.t("Sub lord")}</th><th scope="col">${this.t("Star lord")}</th><th scope="col">${this.t("Sign lord")}</th><th scope="col">${this.t("Verdict")}</th><th scope="col">${this.t("Score")}</th></tr></thead><tbody>${t.map(e=>a`<tr><td class="num">${e.house} ${this.groupChip(e.inverted?"loss":"gain")}</td><td>${this.glyphName(e.subLord)}</td><td>${this.glyphName(e.starLord)}</td><td>${this.glyphName(e.signLord)}</td><td>${this.verdictChip(e.verdict)}</td><td class="num">${b(this.effectiveLang(),e.score,0)}</td></tr>`)}</tbody></table>`}renderDashaRows(t){let e=this.effectiveLang();return a`<table><thead><tr><th scope="col">${this.t("Level")}</th><th scope="col">${this.t("Lord")}</th><th scope="col">${this.t("Start")}</th><th scope="col">${this.t("End")}</th><th scope="col">${this.t("Verdict")}</th><th scope="col">${this.t("Score")}</th><th scope="col">${this.t("Weight")}</th></tr></thead><tbody>${t.map(n=>a`<tr><td>${this.t(Kr[n.level])}</td><td>${this.glyphName(n.lord,n.retrograde)}</td><td>${B(e,n.startDate)}</td><td>${B(e,n.endDate)}</td><td>${this.verdictChip(n.verdict)}</td><td class="num">${b(e,n.score,0)}</td><td class="num">${_t(e,n.weight,0)}</td></tr>`)}</tbody></table>`}renderRulingRows(t){return a`<table><thead><tr><th scope="col">${this.t("Planet")}</th><th scope="col">${this.t("Verdict")}</th><th scope="col">${this.t("Score")}</th></tr></thead><tbody>${t.map(e=>a`<tr><td>${this.glyphName(e.planet,e.retrograde)}</td><td>${this.verdictChip(e.verdict)}</td><td class="num">${b(this.effectiveLang(),e.score,0)}</td></tr>`)}</tbody></table>`}renderWindowRows(t){let e=this.effectiveLang();return a`<table><thead><tr><th scope="col">${this.t("Start")}</th><th scope="col">${this.t("End")}</th><th scope="col">${this.t("Sub lord")}</th><th scope="col">${this.t("Verdict")}</th><th scope="col">${this.t("Score")}</th></tr></thead><tbody>${t.map(n=>a`<tr><td>${K(e,n.from)}</td><td>${K(e,n.to)}</td><td>${this.glyphName(n.subLord)}</td><td>${this.verdictChip(n.verdict)}</td><td class="num">${b(e,n.score,0)}</td></tr>`)}</tbody></table>`}renderWindows(t){let e=this.effectiveLang(),n=t.bestWindow,o=t.worstWindows??[];if(!n&&!o.length)return l;let s=(i,c)=>a`<span class="window roxy-chip ${c}" data-tone="${c==="best"?"success":"danger"}"><span>${this.glyphName(i.subLord)}</span> <small>${Ie(e,{start:i.from,end:i.to})}</small></span>`;return a`<section class="block" part="section windows"><dl class="roxy-facts">${n?a`<div class="fact"><dt>${this.t("Best window")}</dt><dd><div class="roxy-chips">${s(n,"best")}</div></dd></div>`:l} ${o.length?a`<div class="fact"><dt>${this.t("Worst windows")}</dt><dd><div class="roxy-chips">${o.map(i=>s(i,"worst"))}</div></dd></div>`:l}</dl></section>`}glyphName(t,e=false){let n=Jt(t);return a`${n?a`<span class="glyph roxy-glyph" aria-hidden="true">${n}</span>`:l}${t}${e?a`<span class="retro roxy-glyph" aria-label="${this.t("retrograde")}">${Zt}</span>`:l}`}verdictChip(t){return a`<span class="state ${t}">${this.t(jr[t])}</span>`}groupChip(t){return a`<span class="chip roxy-chip">${this.t(Hr[t])}</span>`}};P.endpoints=Vt,P.styles=[it,Ue,He,g`.wrap{grid-template-columns:minmax(0,1fr);display:grid;overflow:hidden}.head,.block{gap:var(--roxy-space-sm);padding:var(--roxy-space-md);display:grid}.block{border-block-start:1px solid var(--roxy-border)}.title-row,.block-head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.title,.block h3{margin:0}.when{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.verdict-row{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.verdict{font-size:var(--roxy-text-lg);font-weight:var(--roxy-weight-bold)}.evidence{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums}:is(.verdict,.state):is(.strong,.favourable){color:var(--roxy-success-fg)}:is(.verdict,.state):is(.mixed,.caution){color:var(--roxy-warning-fg)}:is(.verdict,.state).unfavourable{color:var(--roxy-danger-fg)}.state.neutral{color:var(--roxy-secondary)}.state{font-weight:var(--roxy-weight-bold)}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td{white-space:nowrap}td.num{font-variant-numeric:tabular-nums}td.names{white-space:normal}.glyph{color:var(--roxy-muted);margin-inline-end:var(--roxy-space-xs)}.retro{color:var(--roxy-muted);font-size:var(--roxy-text-xs);margin-inline-start:var(--roxy-space-xs)}.window small{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums}`],P=h([Le("roxy-kp-finance-card")],P);return We(Br)})();/*! Bundled license information:
3
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),It=/'/g,jt=/"/g,zt=/^(?:script|style|textarea|title)$/i,wt=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),a=wt(1),Jr=wt(2),Zr=wt(3),R=Symbol.for("lit-noChange"),l=Symbol.for("lit-nothing"),Ht=new WeakMap,k=A.createTreeWalker(A,129);function qt(r,t){if(!St(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return Dt!==void 0?Dt.createHTML(t):t}var ir=(r,t)=>{let e=r.length-1,n=[],o,s=t===2?"<svg>":t===3?"<math>":"",i=M;for(let c=0;c<e;c++){let d=r[c],y,u,m=-1,v=0;for(;v<d.length&&(i.lastIndex=v,u=i.exec(d),u!==null);)v=i.lastIndex,i===M?u[1]==="!--"?i=Mt:u[1]!==void 0?i=Gt:u[2]!==void 0?(zt.test(u[2])&&(o=RegExp("</"+u[2],"g")),i=T):u[3]!==void 0&&(i=T):i===T?u[0]===">"?(i=o??M,m=-1):u[1]===void 0?m=-2:(m=i.lastIndex-u[2].length,y=u[1],i=u[3]===void 0?T:u[3]==='"'?jt:It):i===jt||i===It?i=T:i===Mt||i===Gt?i=M:(i=T,o=void 0);let w=i===T&&r[c+1].startsWith("/>")?" ":"";s+=i===M?d+or:m>=0?(n.push(y),d.slice(0,m)+Kt+d.slice(m)+$+w):d+$+(m===-2?c:w)}return[qt(r,s+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),n]},j=class r{constructor({strings:t,_$litType$:e},n){let o;this.parts=[];let s=0,i=0,c=t.length-1,d=this.parts,[y,u]=ir(t,e);if(this.el=r.createElement(y,n),k.currentNode=this.el.content,e===2||e===3){let m=this.el.content.firstChild;m.replaceWith(...m.childNodes)}for(;(o=k.nextNode())!==null&&d.length<c;){if(o.nodeType===1){if(o.hasAttributes())for(let m of o.getAttributeNames())if(m.endsWith(Kt)){let v=u[i++],w=o.getAttribute(m).split($),z=/([.?@])?(.*)/.exec(v);d.push({type:1,index:s,name:z[2],strings:w,ctor:z[1]==="."?ft:z[1]==="?"?gt:z[1]==="@"?xt:O}),o.removeAttribute(m)}else m.startsWith($)&&(d.push({type:6,index:s}),o.removeAttribute(m));if(zt.test(o.tagName)){let m=o.textContent.split($),v=m.length-1;if(v>0){o.textContent=Z?Z.emptyScript:"";for(let w=0;w<v;w++)o.append(m[w],G()),k.nextNode(),d.push({type:2,index:++s});o.append(m[v],G())}}}else if(o.nodeType===8)if(o.data===Bt)d.push({type:2,index:s});else{let m=-1;for(;(m=o.data.indexOf($,m+1))!==-1;)d.push({type:7,index:s}),m+=$.length-1}s++}}static createElement(t,e){let n=A.createElement("template");return n.innerHTML=t,n}};function F(r,t,e=r,n){if(t===R)return t;let o=n!==void 0?e._$Co?.[n]:e._$Cl,s=I(t)?void 0:t._$litDirective$;return o?.constructor!==s&&(o?._$AO?.(false),s===void 0?o=void 0:(o=new s(r),o._$AT(r,e,n)),n!==void 0?(e._$Co??=[])[n]=o:e._$Cl=o),o!==void 0&&(t=F(r,o._$AS(r,t.values),o,n)),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:n}=this._$AD,o=(t?.creationScope??A).importNode(e,true);k.currentNode=o;let s=k.nextNode(),i=0,c=0,d=n[0];for(;d!==void 0;){if(i===d.index){let y;d.type===2?y=new H(s,s.nextSibling,this,t):d.type===1?y=new d.ctor(s,d.name,d.strings,this,t):d.type===6&&(y=new bt(s,this,t)),this._$AV.push(y),d=n[++c]}i!==d?.index&&(s=k.nextNode(),i++)}return k.currentNode=A,o}p(t){let e=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}},H=class r{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,n,o){this.type=2,this._$AH=l,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=o,this._$Cv=o?.isConnected??true}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=F(this,t,e),I(t)?t===l||t==null||t===""?(this._$AH!==l&&this._$AR(),this._$AH=l):t!==this._$AH&&t!==R&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):sr(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!==l&&I(this._$AH)?this._$AA.nextSibling.data=t:this.T(A.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:n}=t,o=typeof n=="number"?this._$AC(t):(n.el===void 0&&(n.el=j.createElement(qt(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===o)this._$AH.p(e);else{let s=new yt(o,this),i=s.u(this.options);s.p(e),this.T(i),this._$AH=s}}_$AC(t){let e=Ht.get(t.strings);return e===void 0&&Ht.set(t.strings,e=new j(t)),e}k(t){St(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,n,o=0;for(let s of t)o===e.length?e.push(n=new r(this.O(G()),this.O(G()),this,this.options)):n=e[o],n._$AI(s),o++;o<e.length&&(this._$AR(n&&n._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(false,true,e);t!==this._$AB;){let n=Nt(t).nextSibling;Nt(t).remove(),t=n}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},O=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,n,o,s){this.type=1,this._$AH=l,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=l}_$AI(t,e=this,n,o){let s=this.strings,i=false;if(s===void 0)t=F(this,t,e,0),i=!I(t)||t!==this._$AH&&t!==R,i&&(this._$AH=t);else{let c=t,d,y;for(t=s[0],d=0;d<s.length-1;d++)y=F(this,c[n+d],e,d),y===R&&(y=this._$AH[d]),i||=!I(y)||y!==this._$AH[d],y===l?t=l:t!==l&&(t+=(y??"")+s[d+1]),this._$AH[d]=y}i&&!o&&this.j(t)}j(t){t===l?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},ft=class extends O{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===l?void 0:t}},gt=class extends O{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==l)}},xt=class extends O{constructor(t,e,n,o,s){super(t,e,n,o,s),this.type=5}_$AI(t,e=this){if((t=F(this,t,e,0)??l)===R)return;let n=this._$AH,o=t===l&&n!==l||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,s=t!==l&&(n===l||o);o&&this.element.removeEventListener(this.name,this,n),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)}},bt=class{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){F(this,t)}};var ar=vt.litHtmlPolyfillSupport;ar?.(j,H),(vt.litHtmlVersions??=[]).push("3.3.3");var Yt=(r,t,e)=>{let n=e?.renderBefore??t,o=n._$litPart$;if(o===void 0){let s=e?.renderBefore??null;n._$litPart$=o=new H(t.insertBefore(G(),s),s,void 0,e??{})}return o._$AI(r),o};var $t=globalThis,E=class extends S{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=Yt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false)}render(){return R}};E._$litElement$=true,E.finalized=true,$t.litElementHydrateSupport?.({LitElement:E});var dr=$t.litElementPolyfillSupport;dr?.({LitElement:E});($t.litElementVersions??=[]).push("4.2.2");var Vt=[{endpoint:"vedic-astrology/kp/daily-finance",method:"POST"}];function X(r){return r.toLowerCase().replace(/[\s_-]+/g," ").trim()}function Wt(r){return r.replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([a-z])([0-9])/g,"$1 $2").replace(/^\w/,t=>t.toUpperCase())}var cr=new RegExp("(?![\\d#*])\\p{Emoji}","gu"),lr=r=>r.replace(cr,"$&\uFE0E"),Q=r=>Object.fromEntries(Object.entries(r).map(([t,e])=>[t,lr(e)])),pr=(r,t)=>t?r[X(t)]:void 0,hr=Q({sun:"\u2609",moon:"\u263D",mercury:"\u263F",venus:"\u2640",earth:"\u2641",mars:"\u2642",jupiter:"\u2643",saturn:"\u2644",uranus:"\u2645",neptune:"\u2646",pluto:"\u2BD3",rahu:"\u260A",ketu:"\u260B",ascendant:"Asc",midheaven:"MC","part of fortune":"\u2297",vertex:"Vx",lagna:"La","north node":"\u260A","south node":"\u260B",chiron:"\u26B7",lilith:"\u26B8","black moon lilith":"\u26B8"}),Jt=r=>pr(hr,r);var mn=Q({aries:"\u2648",taurus:"\u2649",gemini:"\u264A",cancer:"\u264B",leo:"\u264C",virgo:"\u264D",libra:"\u264E",scorpio:"\u264F",sagittarius:"\u2650",capricorn:"\u2651",aquarius:"\u2652",pisces:"\u2653"});var yn=Q({conjunction:"\u260C",semisextile:"\u26BA","semi sextile":"\u26BA",semisquare:"\u2220","semi square":"\u2220",sextile:"\u26B9",square:"\u25A1",trine:"\u25B3",sesquiquadrate:"\u26BC",quincunx:"\u26BB",opposition:"\u260D"});var fn=Q({heaven:"\u2630",lake:"\u2631",fire:"\u2632",thunder:"\u2633",wind:"\u2634",water:"\u2635",mountain:"\u2636",earth:"\u2637"});var Zt="\u211E";var ur={attribute:true,type:String,converter:D,reflect:false,hasChanged:J},mr=(r=ur,t,e)=>{let{kind:n,metadata:o}=e,s=globalThis.litPropertyMetadata.get(o);if(s===void 0&&globalThis.litPropertyMetadata.set(o,s=new Map),n==="setter"&&((r=Object.create(r)).wrapped=true),s.set(e.name,r),n==="accessor"){let{name:i}=e;return{set(c){let d=t.get.call(this);t.set.call(this,c),this.requestUpdate(i,d,r,true,c)},init(c){return c!==void 0&&this.C(i,void 0,r,c),c}}}if(n==="setter"){let{name:i}=e;return function(c){let d=this[i];t.call(this,c),this.requestUpdate(i,d,r,true,c)}}throw Error("Unsupported decorator location: "+n)};function f(r){return(t,e)=>typeof e=="object"?mr(r,t,e):((n,o,s)=>{let i=o.hasOwnProperty(s);return o.constructor.createProperty(s,n),i?Object.getOwnPropertyDescriptor(o,s):void 0})(r,t,e)}function x(r){return f({...r,state:true,attribute:false})}var _=r=>r??l;var Xt=["de","en","es","fr","hi","pt","ru","tr","zh-Hans","zh-Hant"];function Tt(r){if(r.lang)return r.lang;if(typeof document>"u")return;let t=r.closest?.("[lang]")?.getAttribute("lang");return t||document.documentElement.lang||void 0}var yr={tw:"hant",hk:"hant",mo:"hant",cn:"hans",sg:"hans",my:"hans"};function Et(r,t){let e=r.toLowerCase();return t.find(n=>n.toLowerCase()===e)}function Qt(r,t=Xt){let e=Tt(r);if(!e)return;let n=Et(e,t);if(n)return n;let o=e.toLowerCase().split("-"),s=o[0];if(s==="zh"){let i=o.find(c=>c==="hans"||c==="hant")??yr[o[1]??""];return i?Et(`zh-${i}`,t):void 0}return Et(s,t)}var re="symbols";var fr={Fraunces:["latin","latin-ext"],Jost:["latin","latin-ext","cyrillic"],Geist:["latin","latin-ext","cyrillic"]},kt='"Jost", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',te='"Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',ee='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',et={"fraunces-jost":{name:"Fraunces with Jost",sans:kt,display:'"Fraunces", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif'},jost:{name:"Jost",sans:kt,display:kt},geist:{name:"Geist",sans:te,display:te},system:{name:"System",sans:ee,display:ee}};function ne(r){let{sans:t,display:e}=et[r];return Object.keys(fr).filter(n=>`${t} ${e}`.includes(`"${n}"`))}var oe="1.6.0";var gr=/^(.*)\/cdn\/(?:roxy-ui|components\/[\w-]+)\.js$/,xr=/^(.*\/dist)\/(?:index|components\/[\w-]+)\.js$/;function se(r,t){if(!t)return;let e=new URL(t);if(e.protocol!=="https:"&&e.protocol!=="http:")return;let n=(gr.exec(e.pathname)??xr.exec(e.pathname))?.[1];if(n!==void 0)return e.hostname==="cdn.jsdelivr.net"?`https://cdn.jsdelivr.net/npm/@roxyapi/ui@${r}/dist`:`${e.origin}${n}`}var wr={},br="color-mix(in oklab, var(--roxy-accent) 70%, black)",vr="var(--roxy-accent)",Sr="color-mix(in srgb, var(--roxy-accent) 40%, transparent)",ie=/^#(?:[\da-f]{3}|[\da-f]{6})$/i;function ae(r){return r!==void 0&&Object.hasOwn(et,r)}function de(r){let t=[];return r.brandColor&&ie.test(r.brandColor)&&t.push(`--roxy-primary:${r.brandColor}`),r.brandAccent&&ie.test(r.brandAccent)&&t.push(`--roxy-accent:${r.brandAccent}`,`--roxy-accent-ink:light-dark(${br},${vr})`,`--roxy-ring:${Sr}`),t.join(";")}function ce(r,t){if(ae(t))return t;let e=r.getRootNode();if(("host"in e?e.host:null)?.localName.startsWith("roxy-")||!globalThis.getComputedStyle)return;let o=r.shadowRoot?.firstElementChild,s=o?.localName==="style"?o:null;s?.sheet&&(s.sheet.disabled=true);let i,c,d;try{let y=globalThis.getComputedStyle(r),u=m=>y.getPropertyValue(m).trim();i=u("--roxy-font-sans"),c=u("--roxy-font-display"),d=u("--roxy-font")}finally{s?.sheet&&(s.sheet.disabled=false)}if(!(i||c))return ae(d)?d:void 0}function le(r){let{sans:t,display:e}=et[r];return`--roxy-font:${r};--roxy-font-sans:${t};--roxy-font-display:${e}`}var pe=se(oe,globalThis.document?.currentScript?.src||wr.url);function he(r,t){if(typeof document>"u"||t===void 0)return;let e=`roxy-ui-font-${r}`;if(document.getElementById(e))return;let n=document.createElement("link");n.id=e,n.rel="stylesheet",n.href=`${t}/styles/fonts/${r}.css`,document.head.append(n)}function ue(r,t=pe){ne(r).length>0&&he(r,t)}function me(r=pe){he(re,r)}var ye='@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-moon-shade: color-mix(in oklab, var(--roxy-fg) 78%, var(--roxy-bg));--roxy-font: initial;--roxy-font-sans: initial;--roxy-font-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, "Liberation Mono", monospace;--roxy-font-symbol: "Roxy Symbols", ui-sans-serif, system-ui, sans-serif;--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-moon-lit: color-mix(in oklab, var(--roxy-accent) 6%, #f6eedf);--roxy-moon-mare: color-mix( in oklab, var(--roxy-moon-lit) 62%, var(--roxy-moon-shade) );--roxy-moon-rim: color-mix( in oklab, var(--roxy-moon-shade) 70%, var(--roxy-fg) );--roxy-moon-eclipse: color-mix( in oklab, color-mix(in oklab, var(--roxy-danger) 55%, var(--roxy-warning)) 72%, var(--roxy-moon-shade) );--roxy-moon-corona: color-mix( in oklab, var(--roxy-warning) 60%, var(--roxy-moon-lit) );--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);--roxy-moon-shade: color-mix( in oklab, var(--roxy-fg) 10%, var(--roxy-bg) )}}: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);--roxy-moon-shade: color-mix(in oklab, var(--roxy-fg) 78%, var(--roxy-bg))}: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);--roxy-moon-shade: color-mix(in oklab, var(--roxy-fg) 10%, var(--roxy-bg))}@media(prefers-reduced-motion:reduce){:where(:root,:host){--roxy-motion-duration: 0ms}}}';var rt="roxy-ui-tokens";function nt(){if(typeof document>"u")return null;let r=document.getElementById(rt);if(r)return r;let t=document.createElement("style");return t.id=rt,t.textContent=ye,document.head.prepend(t),t}var fe="__ROXY_UI_I18N__";function ge(){let r=globalThis,t=r[fe];if(t)return t;let e={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return r[fe]=e,e}function $r(r,t){return t?r.replace(/\{\{(\w+)\}\}/g,(e,n)=>n in t?String(t[n]??""):e):r}function xe(r,t,e){return $r(Er(r,t)??t,e)}function Er(r,t){if(!r)return;let{catalogs:e}=ge(),n=r.toLowerCase();return(e[n]??e[n.split("-")[0]])?.[X(t)]}function be(r){let{listeners:t}=ge();return t.add(r),()=>{t.delete(r)}}var ot=class{constructor(t){this.host=t,t.addController(this)}hostConnected(){this.unsubscribe=be(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var st=class extends E{constructor(){super();this.translator=(e,n)=>this.t(e,n);new ot(this)}connectedCallback(){super.connectedCallback(),nt()}updated(e){super.updated(e),this.renderRoot.querySelector(".roxy-glyph")&&me()}fontDeclarations(e){let n=ce(this,e);return n?(ue(n),le(n)):""}renderFontStyle(){let e=this.fontDeclarations();return e?a`<style>:host{${e}}</style>`:l}t(e,n){return xe(this.effectiveLang(),e,n)}effectiveLang(){return Tt(this)}};var ve=g`:where(.roxy-glyph){font-family:var(--roxy-font-symbol)}`;function Se(r){return r?a`<span class="roxy-glyph" aria-hidden="true">${r}</span>`:l}var we=g`: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 Tr=g`: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}`,it=[Tr,we,ve];var kr="__cols",Ar="__rows";function Rr(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function at(r){if(Array.isArray(r)){let s=false,i=r.map(c=>{let d=at(c);return d!==c&&(s=true),d});return s?i:r}if(!Rr(r))return r;let t=r[kr],e=r[Ar];if(Array.isArray(t)&&Array.isArray(e)&&Object.keys(r).length===2)return e.map(s=>{let i={};return t.forEach((c,d)=>{i[c]=at(s[d])}),i});let n=false,o={};for(let[s,i]of Object.entries(r)){let c=at(i);c!==i&&(n=true),o[s]=c}return n?o:r}function $e(r){return at(r)}function Ee(r,t){return r.find(e=>e.attrs&&Object.entries(e.attrs).every(([n,o])=>t[n]===o))??r[0]}var _r="pk_live_YOUR_KEY",Te={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 ke(r){if(r)return r===_r?Te.sample:r.startsWith("pk_")?void 0:Te.secret}function Ae(r,t,e={}){e.warn&&console.warn(t.message),r.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:t.reason,message:t.message},bubbles:true,composed:true}))}var Re="https://roxyapi.com/api/v2";async function Cr(r){try{let t=await r.json();if(t?.error){let e=t.code==="validation_error"&&Array.isArray(t.issues)?t.issues.filter(n=>typeof n.path=="string"&&typeof n.message=="string").map(n=>({path:n.path,message:n.message})):null;return{message:t.error,issues:e?.length?e:null,worded:true,...t.code?{code:t.code}:{}}}}catch{}return{message:`Request failed (${r.status})`,issues:null,worded:false}}var _e={fromAttribute:r=>{if(r!=null){try{let t=JSON.parse(r);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.")}}},L=class extends Error{constructor(e,n=null,o=true,s,i){super(e);this.issues=n;this.worded=o;this.status=s;this.code=i}};function Ce(r){return r.submitUrl?void 0:ke(r.publishableKey)}async function At(r,t,e){let n=Ce(r);if(n)throw new L(n.message);let o=r.submitUrl?await fetch(r.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:Pr(t,r.submitContext),signal:e}):await Fr(r,t,e);if(!o.ok){let s=await Cr(o);throw new L(s.message,s.issues,s.worded,o.status,s.code)}return await o.json()}function Pr(r,t){return JSON.stringify(t?{...r,context:t}:r)}function Fr(r,t,e){let n=new URL(`${r.baseUrl??Re}${t.path}`,document.baseURI);for(let[s,i]of Object.entries(t.query??{}))i!=null&&n.searchParams.set(s,String(i));let o={Accept:"application/json"};return r.publishableKey&&(o["X-API-Key"]=r.publishableKey),t.body!=null&&(o["Content-Type"]="application/json"),fetch(n,{method:t.method??"GET",headers:o,body:t.body!=null?JSON.stringify(t.body):void 0,signal:e})}var dt=class{constructor(t){this.baseUrl=Re;this.worded=true;this.failure={};this.host=t,t.addController(this)}hostDisconnected(){this.abort?.abort(),this.abort=void 0}async run(t){this.worded=true,this.failure={};let e=Ce(this);if(e){this.host.error=e.message,Ae(this.host,e);return}this.abort?.abort();let n=new AbortController;this.abort=n,this.host.loading=true,this.host.error=null,this.host.issues=null;try{let o=await At(this,t,n.signal);if(n.signal.aborted)return;this.host.data=o}catch(o){if(n.signal.aborted||o?.name==="AbortError")return;o instanceof L&&(this.host.issues=o.issues,this.failure={status:o.status,code:o.code}),this.worded=o instanceof L&&o.worded,this.host.error=o instanceof Error?o.message:String(o)}finally{this.abort===n&&(this.abort=void 0),n.signal.aborted||(this.host.loading=false)}}};function Pe(r,t,e,n=[]){let o={...e},s=`/${r.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(y,u)=>{let m=o[u];return delete o[u],encodeURIComponent(String(m??""))}),i=new Set(n),c={},d={};for(let[y,u]of Object.entries(o))u===void 0||u===""||(t==="GET"||i.has(y)?c[y]=u:d[y]=u);return{path:s,method:t,query:c,body:t==="POST"?d:void 0}}function Fe(){return a`<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 Lo=g`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 Go=g`.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 Oe(r,t,e){let n=r.filter(o=>!!o.body);return n.length===0?l:a`<section class="block" part="section readings"><h3>${e}</h3>${n.map((o,s)=>a`<details class="interp-card" part="reading" name="${t}" ?open="${s===0}"><summary><span class="interp-lead">${Se(o.glyph)} ${o.label}</span> ${Fe()} ${o.aside?a`<span class="interp-aside"><small>${o.aside}</small></span>`:l}</summary><div class="interp-body"><p>${o.body}</p>${o.extra??l}</div></details>`)}</section>`}var Or="roxy-data";function Lr(r){return r.nodeName==="SCRIPT"&&r.getAttribute("type")==="application/json"}var ct=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(Lr(t)&&t.classList.contains(Or))return t;return null}parse(t){if(t?.trim())try{return JSON.parse(t)}catch{return}}};var p=class extends st{constructor(){super();this.data=null;this.endpoint="";this.remember=false;this.hideReadings=false;this.hideSections="";this.loading=false;this.error=null;this.issues=null;this.selfFetched=false;this.editing=false;this.sticky=false;this.hostLoaded=false;this.moreLoading=false;this.moreError=null;this.onMore=async()=>{let e=this.lastRequest,n=this.listKey,o=this.listRows();if(!(!e||!n||!o)){this.moreLoading=true,this.moreError=null;try{let s=await At(this.fetcher,{...e,query:{...e.query,offset:o.length}});if(this.lastRequest!==e)return;let i=s[n];this.data={...this.data,...s,[n]:[...o,...Array.isArray(i)?i:[]]}}catch(s){this.lastRequest===e&&(this.moreError=s instanceof Error?s.message:String(s))}finally{this.moreLoading=false}}};this.onEdit=()=>{this.editing=true};this.onFormSubmit=e=>{let n=this.selfFetch();if(!n)return;let o=e.detail;this.lastValues=o.values,this.sticky=!!o.sticky,this.selfFetched=true,this.editing=false,this.remember&&this.writeRemembered(o.values),this.fetchFresh(Pe(n.endpoint,n.method,{...o.values,...this.ownRequest()},o.queryKeys??[]))};new ct(this),this.fetcher=new dt(this)}static{this.styles=[it]}static{this.endpoints=[]}willUpdate(e){if(e.has("data")&&this.data!=null){let n=$e(this.data);n!==this.data&&(this.data=n)}(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:Ee(this.constructor.endpoints,this);return e&&{endpoint:e.endpoint,method:this.method??e.method}}render(){return a`${this.hostStyle()}${this.renderState()}`}drawn(e){try{return this.renderData(e)}catch(n){return console.warn(`[roxy-ui] ${this.localName} could not draw its response`,n),this.dispatchEvent(new CustomEvent("roxy-render-error",{detail:{error:n},bubbles:true,composed:true})),customElements.get("roxy-data")?a`<roxy-data .data="${e}" lang="${_(this.effectiveLang())}"></roxy-data>`:this.renderEmpty()}}hostStyle(){let e=this.hideSections.split(",").map(s=>s.trim().toLowerCase()).filter(s=>/^[a-z][a-z0-9-]*$/.test(s)),n=[de(this),this.fontDeclarations(this.font)].filter(Boolean).join(";");if(e.length===0&&!n)return l;let o=(n?`:host{${n}}`:"")+e.map(s=>`[part~="${s}"],roxy-endpoint-form::part(${s}){display:none!important}`).join("");return a`<style>${o}</style>`}ownRequest(){return{}}get failure(){return this.fetcher.failure}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()?a`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data):this.renderNoData()}renderInterpretation(e,n,o){return this.hideReadings?l:Oe(e,n,this.t(o??"Reading"))}renderResult(e){let n=a`<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()?a`${n}${this.renderAttribution()}`:n}renderWithForm(e){return a`${this.renderForm()}${e}`}stickyBody(){return this.loading?this.renderLoading():this.error!=null?this.issues?l:this.renderErrorBanner(this.error):this.data==null?l:this.showAttribution()?a`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data)}renderMore(){let e=this.listRows(),n=this.data?.total;return!this.lastRequest||!e||typeof n!="number"?l:e.length>=n?l:a`<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?a`<p class="roxy-error" role="alert">${this.t(this.moreError)}</p>`:l}</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=true,this.syncFetcher(),this.fetchFresh(e)}pickRow(e){this.dispatchEvent(new CustomEvent("roxy-symbol-select",{detail:e,bubbles:true,composed:true})),this.openRow(e.id)}openRow(e){if(!this.rowDetail||!(this.publishableKey||this.submitUrl))return;let n=this.openedRow??document.createElement(this.rowDetail.tag);n.publishableKey=this.publishableKey,n.baseUrl=this.baseUrl,n.submitUrl=this.submitUrl,n.submitContext=this.submitContext,n.hideReadings=this.hideReadings,n.hideSections=this.hideSections;let o=this.effectiveLang();o&&n.setAttribute("lang",o),this.openedRow=n,this.openedRowId=e,n.load({path:`/${this.rowDetail.path.replace("{id}",encodeURIComponent(e))}`,method:"GET",query:{lang:Qt(this)}}).then(()=>n.scrollIntoView?.({block:"nearest"}))}showAttribution(){return this.attribution!=null&&this.attribution!=="off"&&this.attribution!=="false"}renderAttribution(){return a`<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(l):this.renderEmpty()}renderForm(){let e=this.selfFetch();return a`<roxy-endpoint-form part="form" exportparts="hint" data-endpoint="${e?.endpoint??""}" method="${e?.method??"POST"}" spec-url="${_(this.specUrl)}" publishable-key="${_(this.publishableKey)}" location-url="${_(this.locationUrl)}" submit-label="${_(this.submitLabel)}" lang="${_(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 a`<div class="roxy-empty" role="status" part="empty">${this.t("No data")}</div>`}renderLoading(){return a`<div class="roxy-skeleton" style="height:5lh" role="status" aria-label="${this.t("Loading")}" part="loading"></div>`}renderError(e){let n=!!this.selfFetch();if(n&&this.issues)return this.renderForm();let o=this.renderErrorBanner(e);return n?a`${o}${this.renderForm()}`:o}renderErrorBanner(e){return a`<div class="roxy-error" role="alert" part="error">${!this.fetcher.worded&&this.errorMessage||this.t(e)}</div>`}};h([f({attribute:false})],p.prototype,"data",2),h([f({type:String,attribute:"data-endpoint"})],p.prototype,"endpoint",2),h([f({type:String})],p.prototype,"method",2),h([f({type:String,attribute:"publishable-key"})],p.prototype,"publishableKey",2),h([f({type:String,attribute:"base-url"})],p.prototype,"baseUrl",2),h([f({type:String,attribute:"spec-url"})],p.prototype,"specUrl",2),h([f({type:String,attribute:"submit-url"})],p.prototype,"submitUrl",2),h([f({attribute:"submit-context",converter:_e})],p.prototype,"submitContext",2),h([f({type:String,attribute:"location-url"})],p.prototype,"locationUrl",2),h([f({type:Boolean})],p.prototype,"remember",2),h([f({type:Boolean,attribute:"hide-readings",reflect:true})],p.prototype,"hideReadings",2),h([f({type:String,attribute:"hide-sections",reflect:true})],p.prototype,"hideSections",2),h([f({type:String,attribute:"brand-color"})],p.prototype,"brandColor",2),h([f({type:String,attribute:"brand-accent"})],p.prototype,"brandAccent",2),h([f({type:String})],p.prototype,"font",2),h([f({type:String})],p.prototype,"hemisphere",2),h([f({type:String,attribute:"submit-label"})],p.prototype,"submitLabel",2),h([f({type:String,attribute:"error-message"})],p.prototype,"errorMessage",2),h([f({type:String})],p.prototype,"attribution",2),h([x()],p.prototype,"loading",2),h([x()],p.prototype,"error",2),h([x()],p.prototype,"issues",2),h([x()],p.prototype,"selfFetched",2),h([x()],p.prototype,"editing",2),h([x()],p.prototype,"sticky",2),h([x()],p.prototype,"openedRow",2),h([x()],p.prototype,"openedRowId",2),h([x()],p.prototype,"moreLoading",2),h([x()],p.prototype,"moreError",2);var Le=r=>t=>{customElements.get(r)||customElements.define(r,t)};var Ue=g`.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}`;var lt=/^\d{4}-\d{2}-\d{2}$/,Ur=/^\d{4}-\d{2}$/,Me=/^\d{2}:\d{2}(:\d{2})?$/,Nr=/^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2}(\.\d+)?)?$/,Ne=new Map;function C(r){if(!r)return["en"];let t=Ne.get(r);if(t)return[t,"en"];let e="en";try{e=Intl.getCanonicalLocales(r)[0]??"en"}catch{e="en"}return Ne.set(r,e),[e,"en"]}var De=new Map;function Ge(r){let t=r??"",e=De.get(t);if(e)return e;let o={hour:new Intl.DateTimeFormat(C(r),{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 De.set(t,o),o}function Dr(r,t){return r&&t?`${r} - ${t}`:r||t}function Rt(r){let t=Me.test(r)?`1970-01-01T${r}`:lt.test(r)?`${r}T00:00:00`:Ur.test(r)?`${r}-01T00:00:00`:Nr.test(r)?r.replace(" ","T"):null;return t?{d:new Date(`${t}Z`),timeZone:"UTC"}:{d:new Date(r)}}function K(r,t){if(typeof t!="string"||t.length===0||lt.test(t))return"";let{d:e,timeZone:n}=Rt(t);return Number.isNaN(e.getTime())?t:e.toLocaleTimeString(C(r),{...Ge(r),timeZone:n})}function Mr(r,t){if(typeof t!="string"||t.length===0)return"";let{d:e,timeZone:n}=Rt(t);return Number.isNaN(e.getTime())?t:e.toLocaleDateString(C(r),{month:"short",day:"numeric",year:"numeric",timeZone:n})}function Ie(r,t){return t?Dr(K(r,t.start),K(r,t.end)):""}function pt(r,t){let e=t.filter(Boolean);return e.length<2?e[0]??"":new Intl.ListFormat(C(r),{style:"long",type:"conjunction"}).format(e)}function b(r,t,e=1){return typeof t!="number"||!Number.isFinite(t)?"":t.toLocaleString(C(r),{maximumFractionDigits:e})}function _t(r,t,e=1){return typeof t!="number"||!Number.isFinite(t)?"":(t/100).toLocaleString(C(r),{style:"percent",maximumFractionDigits:e})}var Gr={"kp-newcomb":"KP Newcomb","kp-old":"KP Old",lahiri:"Lahiri",raman:"B.V. Raman",custom:"Custom"};function je(r,t,e){let n=typeof t=="string"?Gr[t]??Wt(t):"",o=typeof e=="number"?`${b(r,e,2)}\xB0`:"";return n&&o?`${n} (${o})`:n||o}function B(r,t,e,n=false){let o=typeof t=="string"&&lt.test(t)&&typeof e=="string"&&Me.test(e)?`${t}T${e}`:t;if(typeof o!="string"||o.length===0)return"";if(lt.test(o))return Mr(r,o);let{d:s,timeZone:i}=Rt(o);return Number.isNaN(s.getTime())?o:s.toLocaleString(C(r),{month:"short",day:"numeric",year:"numeric",...Ge(r),...n?{second:"2-digit"}:{},timeZone:i})}var He=g`.roxy-frame{color:var(--roxy-muted);font-size:var(--roxy-text-xs);line-height:var(--roxy-leading-normal);margin:0}.roxy-frame .roxy-frame-deg{font-variant-numeric:tabular-nums}`;function Ke(r,t,e){if(!t?.ayanamsa)return l;let n=je(r,t.ayanamsa);if(!n)return l;let o=typeof t.ayanamsaDegrees=="number"?b(r,t.ayanamsaDegrees,4):void 0;return a`<p class="roxy-frame">${o===void 0?e("Sidereal frame: {{frame}}",{frame:n}):e("Sidereal frame: {{frame}}, {{degrees}}\xB0 subtracted",{frame:n,degrees:o})}</p>`}var Ir={strong:"Strong",favourable:"Favourable",mixed:"Mixed",caution:"Caution",unfavourable:"Unfavourable"},jr={favourable:"Favourable",mixed:"Mixed",unfavourable:"Unfavourable",neutral:"Neutral"},Be={cusps:"Cusps",dasha:"Dasha",rulingPlanets:"Ruling planets",moonWindows:"Moon windows"},Hr={gain:"Gain",loss:"Loss"},Kr={mahadasha:"Mahadasha",antardasha:"Antardasha",pratyantardasha:"Pratyantardasha",sookshmaDasha:"Sookshma"},P=class extends p{renderData(t){return t.layers?a`<div class="wrap" part="card" aria-label="${this.t("KP daily finance")}">${this.renderHead(t)} ${this.renderSignificators(t)}<section class="block" part="section cusps">${this.renderLayer("cusps",t.layers.cusps,this.renderCuspRows(t.layers.cusps.rows))}</section><section class="block" part="section dasha">${this.renderLayer("dasha",t.layers.dasha,this.renderDashaRows(t.layers.dasha.rows))}</section><section class="block" part="section ruling-planets">${this.renderLayer("rulingPlanets",t.layers.rulingPlanets,this.renderRulingRows(t.layers.rulingPlanets.rows))}</section><section class="block" part="section moon-windows">${this.renderLayer("moonWindows",t.layers.moonWindows,this.renderWindowRows(t.layers.moonWindows.rows))}</section>${this.renderWindows(t)}<section class="block" part="section frame">${Ke(this.effectiveLang(),{ayanamsa:t.ayanamsa,ayanamsaDegrees:t.ayanamsaDegrees},this.translator)}</section></div>`:this.renderEmpty()}renderHead(t){let e=this.effectiveLang();return a`<header class="head" part="header"><div class="title-row"><h2 class="title">${this.t("KP daily finance")}</h2><span class="when">${B(e,t.date)}</span></div><div class="verdict-row"><span class="verdict ${t.band}">${this.t(Ir[t.band])}</span> <span class="evidence">${b(e,t.score,1)}</span></div><dl class="roxy-facts" part="details"><div class="fact"><dt>${this.t("Reading moment")}</dt><dd>${B(e,t.readingAt)}</dd></div><div class="fact"><dt>${this.t("Gain houses")}</dt><dd>${pt(e,t.houses.gain.map(String))}</dd></div><div class="fact"><dt>${this.t("Loss houses")}</dt><dd>${pt(e,t.houses.loss.map(String))}</dd></div></dl></header>`}renderSignificators(t){let e=t.significators,n=this.effectiveLang(),o=s=>a`<div class="roxy-chips">${s.map(i=>a`<span class="chip roxy-chip">${this.glyphName(i)}</span>`)}</div>`;return a`<section class="block" part="section significators"><h3>${this.t("Significators")}</h3><dl class="roxy-facts"><div class="fact"><dt>${this.t("Gain")}</dt><dd>${o(e.gain)}</dd></div><div class="fact"><dt>${this.t("Loss")}</dt><dd>${o(e.loss)}</dd></div></dl>${e.byHouse.length?a`<div class="scroll" part="table" tabindex="0" role="region" aria-label="${this.t("Significators")}"><table><thead><tr><th scope="col">${this.t("House")}</th><th scope="col">${this.t("Significators")}</th></tr></thead><tbody>${e.byHouse.map(s=>a`<tr><td class="num">${s.house} ${this.groupChip(s.group)}</td><td class="names">${pt(n,[...new Set(s.significators)])}</td></tr>`)}</tbody></table></div>`:l}</section>`}renderLayer(t,e,n){let o=this.effectiveLang();return a`<div class="block-head"><h3>${this.t(Be[t])}</h3><span class="evidence">${this.t("Weight")} ${_t(o,e.weight,0)} · ${this.t("Score")} ${b(o,e.score,1)}</span></div><div class="scroll" part="table" tabindex="0" role="region" aria-label="${this.t(Be[t])}">${n}</div>`}renderCuspRows(t){return a`<table><thead><tr><th scope="col">${this.t("House")}</th><th scope="col">${this.t("Sub lord")}</th><th scope="col">${this.t("Star lord")}</th><th scope="col">${this.t("Sign lord")}</th><th scope="col">${this.t("Verdict")}</th><th scope="col">${this.t("Score")}</th></tr></thead><tbody>${t.map(e=>a`<tr><td class="num">${e.house} ${this.groupChip(e.inverted?"loss":"gain")}</td><td>${this.glyphName(e.subLord)}</td><td>${this.glyphName(e.starLord)}</td><td>${this.glyphName(e.signLord)}</td><td>${this.verdictChip(e.verdict)}</td><td class="num">${b(this.effectiveLang(),e.score,0)}</td></tr>`)}</tbody></table>`}renderDashaRows(t){let e=this.effectiveLang();return a`<table><thead><tr><th scope="col">${this.t("Level")}</th><th scope="col">${this.t("Lord")}</th><th scope="col">${this.t("Start")}</th><th scope="col">${this.t("End")}</th><th scope="col">${this.t("Verdict")}</th><th scope="col">${this.t("Score")}</th><th scope="col">${this.t("Weight")}</th></tr></thead><tbody>${t.map(n=>a`<tr><td>${this.t(Kr[n.level])}</td><td>${this.glyphName(n.lord,n.retrograde)}</td><td>${B(e,n.startDate)}</td><td>${B(e,n.endDate)}</td><td>${this.verdictChip(n.verdict)}</td><td class="num">${b(e,n.score,0)}</td><td class="num">${_t(e,n.weight,0)}</td></tr>`)}</tbody></table>`}renderRulingRows(t){return a`<table><thead><tr><th scope="col">${this.t("Planet")}</th><th scope="col">${this.t("Verdict")}</th><th scope="col">${this.t("Score")}</th></tr></thead><tbody>${t.map(e=>a`<tr><td>${this.glyphName(e.planet,e.retrograde)}</td><td>${this.verdictChip(e.verdict)}</td><td class="num">${b(this.effectiveLang(),e.score,0)}</td></tr>`)}</tbody></table>`}renderWindowRows(t){let e=this.effectiveLang();return a`<table><thead><tr><th scope="col">${this.t("Start")}</th><th scope="col">${this.t("End")}</th><th scope="col">${this.t("Sub lord")}</th><th scope="col">${this.t("Verdict")}</th><th scope="col">${this.t("Score")}</th></tr></thead><tbody>${t.map(n=>a`<tr><td>${K(e,n.from)}</td><td>${K(e,n.to)}</td><td>${this.glyphName(n.subLord)}</td><td>${this.verdictChip(n.verdict)}</td><td class="num">${b(e,n.score,0)}</td></tr>`)}</tbody></table>`}renderWindows(t){let e=this.effectiveLang(),n=t.bestWindow,o=t.worstWindows??[];if(!n&&!o.length)return l;let s=(i,c)=>a`<span class="window roxy-chip ${c}" data-tone="${c==="best"?"success":"danger"}"><span>${this.glyphName(i.subLord)}</span> <small>${Ie(e,{start:i.from,end:i.to})}</small></span>`;return a`<section class="block" part="section windows"><dl class="roxy-facts">${n?a`<div class="fact"><dt>${this.t("Best window")}</dt><dd><div class="roxy-chips">${s(n,"best")}</div></dd></div>`:l} ${o.length?a`<div class="fact"><dt>${this.t("Worst windows")}</dt><dd><div class="roxy-chips">${o.map(i=>s(i,"worst"))}</div></dd></div>`:l}</dl></section>`}glyphName(t,e=false){let n=Jt(t);return a`${n?a`<span class="glyph roxy-glyph" aria-hidden="true">${n}</span>`:l}${t}${e?a`<span class="retro roxy-glyph" aria-label="${this.t("retrograde")}">${Zt}</span>`:l}`}verdictChip(t){return a`<span class="state ${t}">${this.t(jr[t])}</span>`}groupChip(t){return a`<span class="chip roxy-chip">${this.t(Hr[t])}</span>`}};P.endpoints=Vt,P.styles=[it,Ue,He,g`.wrap{grid-template-columns:minmax(0,1fr);display:grid;overflow:hidden}.head,.block{gap:var(--roxy-space-sm);padding:var(--roxy-space-md);display:grid}.block{border-block-start:1px solid var(--roxy-border)}.title-row,.block-head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.title,.block h3{margin:0}.when{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.verdict-row{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.verdict{font-size:var(--roxy-text-lg);font-weight:var(--roxy-weight-bold)}.evidence{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums}:is(.verdict,.state):is(.strong,.favourable){color:var(--roxy-success-fg)}:is(.verdict,.state):is(.mixed,.caution){color:var(--roxy-warning-fg)}:is(.verdict,.state).unfavourable{color:var(--roxy-danger-fg)}.state.neutral{color:var(--roxy-secondary)}.state{font-weight:var(--roxy-weight-bold)}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td{white-space:nowrap}td.num{font-variant-numeric:tabular-nums}td.names{white-space:normal}.glyph{color:var(--roxy-muted);margin-inline-end:var(--roxy-space-xs)}.retro{color:var(--roxy-muted);font-size:var(--roxy-text-xs);margin-inline-start:var(--roxy-space-xs)}.window small{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums}`],P=h([Le("roxy-kp-finance-card")],P);return We(Br)})();/*! Bundled license information:
4
4
 
5
5
  @lit/reactive-element/css-tag.js:
6
6
  (**
@@ -1,6 +1,6 @@
1
1
  var RoxyUI_kp_planets_table=(()=>{var H=Object.defineProperty;var vt=Object.getOwnPropertyDescriptor;var Te=Object.getOwnPropertyNames;var ke=Object.prototype.hasOwnProperty;var Ae=(n,t)=>{for(var e in t)H(n,e,{get:t[e],enumerable:true})},_e=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Te(t))!ke.call(n,o)&&o!==e&&H(n,o,{get:()=>t[o],enumerable:!(r=vt(t,o))||r.enumerable});return n};var Pe=n=>_e(H({},"__esModule",{value:true}),n),p=(n,t,e,r)=>{for(var o=r>1?void 0:r?vt(t,e):t,s=n.length-1,i;s>=0;s--)(i=n[s])&&(o=(r?i(t,e,o):i(o))||o);return r&&o&&H(t,e,o),o};var hr={};Ae(hr,{ROXY_UI_TOKENS_STYLE_ID:()=>Z,RoxyKpPlanetsTable:()=>P,injectRoxyTokens:()=>J});var K=globalThis,z=K.ShadowRoot&&(K.ShadyCSS===void 0||K.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ot=Symbol(),St=new WeakMap,F=class{constructor(t,e,r){if(this._$cssResult$=true,r!==ot)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(z&&t===void 0){let r=e!==void 0&&e.length===1;r&&(t=St.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&St.set(e,t))}return t}toString(){return this.cssText}},wt=n=>new F(typeof n=="string"?n:n+"",void 0,ot),g=(n,...t)=>{let e=n.length===1?n[0]:t.reduce((r,o,s)=>r+(i=>{if(i._$cssResult$===true)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.")})(o)+n[s+1],n[0]);return new F(e,n,ot)},Et=(n,t)=>{if(z)n.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let r=document.createElement("style"),o=K.litNonce;o!==void 0&&r.setAttribute("nonce",o),r.textContent=e.cssText,n.appendChild(r)}},st=z?n=>n:n=>n instanceof CSSStyleSheet?(t=>{let e="";for(let r of t.cssRules)e+=r.cssText;return wt(e)})(n):n;var{is:Ce,defineProperty:Oe,getOwnPropertyDescriptor:Re,getOwnPropertyNames:Fe,getOwnPropertySymbols:Ue,getPrototypeOf:Le}=Object,B=globalThis,$t=B.trustedTypes,Ne=$t?$t.emptyScript:"",Ie=B.reactiveElementPolyfillSupport,U=(n,t)=>n,L={toAttribute(n,t){switch(t){case Boolean:n=n?Ne:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,t){let e=n;switch(t){case Boolean:e=n!==null;break;case Number:e=n===null?null:Number(n);break;case Object:case Array:try{e=JSON.parse(n)}catch{e=null}}return e}},q=(n,t)=>!Ce(n,t),Tt={attribute:true,type:String,converter:L,reflect:false,useDefault:false,hasChanged:q};Symbol.metadata??=Symbol("metadata"),B.litPropertyMetadata??=new WeakMap;var v=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=Tt){if(e.state&&(e.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=true),this.elementProperties.set(t,e),!e.noAccessor){let r=Symbol(),o=this.getPropertyDescriptor(t,r,e);o!==void 0&&Oe(this.prototype,t,o)}}static getPropertyDescriptor(t,e,r){let{get:o,set:s}=Re(this.prototype,t)??{get(){return this[e]},set(i){this[e]=i}};return{get:o,set(i){let d=o?.call(this);s?.call(this,i),this.requestUpdate(t,d,r)},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??Tt}static _$Ei(){if(this.hasOwnProperty(U("elementProperties")))return;let t=Le(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(U("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(U("properties"))){let e=this.properties,r=[...Fe(e),...Ue(e)];for(let o of r)this.createProperty(o,e[o])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[r,o]of e)this.elementProperties.set(r,o)}this._$Eh=new Map;for(let[e,r]of this.elementProperties){let o=this._$Eu(e,r);o!==void 0&&this._$Eh.set(o,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 o of r)e.unshift(st(o))}else t!==void 0&&e.push(st(t));return e}static _$Eu(t,e){let r=e.attribute;return r===false?void 0:typeof r=="string"?r:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,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 Et(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),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),o=this.constructor._$Eu(t,r);if(o!==void 0&&r.reflect===true){let s=(r.converter?.toAttribute!==void 0?r.converter:L).toAttribute(e,r.type);this._$Em=t,s==null?this.removeAttribute(o):this.setAttribute(o,s),this._$Em=null}}_$AK(t,e){let r=this.constructor,o=r._$Eh.get(t);if(o!==void 0&&this._$Em!==o){let s=r.getPropertyOptions(o),i=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:L;this._$Em=o;let d=i.fromAttribute(e,s.type);this[o]=d??this._$Ej?.get(o)??d,this._$Em=null}}requestUpdate(t,e,r,o=false,s){if(t!==void 0){let i=this.constructor;if(o===false&&(s=this[t]),r??=i.getPropertyOptions(t),!((r.hasChanged??q)(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===false&&(this._$ES=this._$EP())}C(t,e,{useDefault:r,reflect:o,wrapped:s},i){r&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,i??e??this[t]),s!==true||i!==void 0)||(this._$AL.has(t)||(this.hasUpdated||r||(e=void 0),this._$AL.set(t,e)),o===true&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=true;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[o,s]of this._$Ep)this[o]=s;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[o,s]of r){let{wrapped:i}=s,d=this[o];i!==true||this._$AL.has(o)||d===void 0||this.C(o,void 0,s,d)}}let t=false,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=false,this._$EM(),r}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=false}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};v.elementStyles=[],v.shadowRootOptions={mode:"open"},v[U("elementProperties")]=new Map,v[U("finalized")]=new Map,Ie?.({ReactiveElement:v}),(B.reactiveElementVersions??=[]).push("2.1.2");var ht=globalThis,kt=n=>n,Y=ht.trustedTypes,At=Y?Y.createPolicy("lit-html",{createHTML:n=>n}):void 0,Ft="$lit$",w=`lit$${Math.random().toFixed(9).slice(2)}$`,Ut="?"+w,De=`<${Ut}>`,k=document,I=()=>k.createComment(""),D=n=>n===null||typeof n!="object"&&typeof n!="function",ut=Array.isArray,Me=n=>ut(n)||typeof n?.[Symbol.iterator]=="function",it=`[
2
2
  \f\r]`,N=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_t=/-->/g,Pt=/>/g,$=RegExp(`>|${it}(?:([^\\s"'>=/]+)(${it}*=${it}*(?:[^
3
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Ct=/'/g,Ot=/"/g,Lt=/^(?:script|style|textarea|title)$/i,mt=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),h=mt(1),xr=mt(2),br=mt(3),A=Symbol.for("lit-noChange"),l=Symbol.for("lit-nothing"),Rt=new WeakMap,T=k.createTreeWalker(k,129);function Nt(n,t){if(!ut(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return At!==void 0?At.createHTML(t):t}var je=(n,t)=>{let e=n.length-1,r=[],o,s=t===2?"<svg>":t===3?"<math>":"",i=N;for(let d=0;d<e;d++){let a=n[d],y,u,m=-1,b=0;for(;b<a.length&&(i.lastIndex=b,u=i.exec(a),u!==null);)b=i.lastIndex,i===N?u[1]==="!--"?i=_t:u[1]!==void 0?i=Pt:u[2]!==void 0?(Lt.test(u[2])&&(o=RegExp("</"+u[2],"g")),i=$):u[3]!==void 0&&(i=$):i===$?u[0]===">"?(i=o??N,m=-1):u[1]===void 0?m=-2:(m=i.lastIndex-u[2].length,y=u[1],i=u[3]===void 0?$:u[3]==='"'?Ot:Ct):i===Ot||i===Ct?i=$:i===_t||i===Pt?i=N:(i=$,o=void 0);let S=i===$&&n[d+1].startsWith("/>")?" ":"";s+=i===N?a+De:m>=0?(r.push(y),a.slice(0,m)+Ft+a.slice(m)+w+S):a+w+(m===-2?d:S)}return[Nt(n,s+(n[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},M=class n{constructor({strings:t,_$litType$:e},r){let o;this.parts=[];let s=0,i=0,d=t.length-1,a=this.parts,[y,u]=je(t,e);if(this.el=n.createElement(y,r),T.currentNode=this.el.content,e===2||e===3){let m=this.el.content.firstChild;m.replaceWith(...m.childNodes)}for(;(o=T.nextNode())!==null&&a.length<d;){if(o.nodeType===1){if(o.hasAttributes())for(let m of o.getAttributeNames())if(m.endsWith(Ft)){let b=u[i++],S=o.getAttribute(m).split(w),G=/([.?@])?(.*)/.exec(b);a.push({type:1,index:s,name:G[2],strings:S,ctor:G[1]==="."?dt:G[1]==="?"?lt:G[1]==="@"?ct:O}),o.removeAttribute(m)}else m.startsWith(w)&&(a.push({type:6,index:s}),o.removeAttribute(m));if(Lt.test(o.tagName)){let m=o.textContent.split(w),b=m.length-1;if(b>0){o.textContent=Y?Y.emptyScript:"";for(let S=0;S<b;S++)o.append(m[S],I()),T.nextNode(),a.push({type:2,index:++s});o.append(m[b],I())}}}else if(o.nodeType===8)if(o.data===Ut)a.push({type:2,index:s});else{let m=-1;for(;(m=o.data.indexOf(w,m+1))!==-1;)a.push({type:7,index:s}),m+=w.length-1}s++}}static createElement(t,e){let r=k.createElement("template");return r.innerHTML=t,r}};function C(n,t,e=n,r){if(t===A)return t;let o=r!==void 0?e._$Co?.[r]:e._$Cl,s=D(t)?void 0:t._$litDirective$;return o?.constructor!==s&&(o?._$AO?.(false),s===void 0?o=void 0:(o=new s(n),o._$AT(n,e,r)),r!==void 0?(e._$Co??=[])[r]=o:e._$Cl=o),o!==void 0&&(t=C(n,o._$AS(n,t.values),o,r)),t}var at=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,o=(t?.creationScope??k).importNode(e,true);T.currentNode=o;let s=T.nextNode(),i=0,d=0,a=r[0];for(;a!==void 0;){if(i===a.index){let y;a.type===2?y=new j(s,s.nextSibling,this,t):a.type===1?y=new a.ctor(s,a.name,a.strings,this,t):a.type===6&&(y=new pt(s,this,t)),this._$AV.push(y),a=r[++d]}i!==a?.index&&(s=T.nextNode(),i++)}return T.currentNode=k,o}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++}},j=class n{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,r,o){this.type=2,this._$AH=l,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=o,this._$Cv=o?.isConnected??true}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=C(this,t,e),D(t)?t===l||t==null||t===""?(this._$AH!==l&&this._$AR(),this._$AH=l):t!==this._$AH&&t!==A&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Me(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!==l&&D(this._$AH)?this._$AA.nextSibling.data=t:this.T(k.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:r}=t,o=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=M.createElement(Nt(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===o)this._$AH.p(e);else{let s=new at(o,this),i=s.u(this.options);s.p(e),this.T(i),this._$AH=s}}_$AC(t){let e=Rt.get(t.strings);return e===void 0&&Rt.set(t.strings,e=new M(t)),e}k(t){ut(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,r,o=0;for(let s of t)o===e.length?e.push(r=new n(this.O(I()),this.O(I()),this,this.options)):r=e[o],r._$AI(s),o++;o<e.length&&(this._$AR(r&&r._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(false,true,e);t!==this._$AB;){let r=kt(t).nextSibling;kt(t).remove(),t=r}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},O=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,o,s){this.type=1,this._$AH=l,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=l}_$AI(t,e=this,r,o){let s=this.strings,i=false;if(s===void 0)t=C(this,t,e,0),i=!D(t)||t!==this._$AH&&t!==A,i&&(this._$AH=t);else{let d=t,a,y;for(t=s[0],a=0;a<s.length-1;a++)y=C(this,d[r+a],e,a),y===A&&(y=this._$AH[a]),i||=!D(y)||y!==this._$AH[a],y===l?t=l:t!==l&&(t+=(y??"")+s[a+1]),this._$AH[a]=y}i&&!o&&this.j(t)}j(t){t===l?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},dt=class extends O{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===l?void 0:t}},lt=class extends O{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==l)}},ct=class extends O{constructor(t,e,r,o,s){super(t,e,r,o,s),this.type=5}_$AI(t,e=this){if((t=C(this,t,e,0)??l)===A)return;let r=this._$AH,o=t===l&&r!==l||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,s=t!==l&&(r===l||o);o&&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)}},pt=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){C(this,t)}};var Ge=ht.litHtmlPolyfillSupport;Ge?.(M,j),(ht.litHtmlVersions??=[]).push("3.3.3");var It=(n,t,e)=>{let r=e?.renderBefore??t,o=r._$litPart$;if(o===void 0){let s=e?.renderBefore??null;r._$litPart$=o=new j(t.insertBefore(I(),s),s,void 0,e??{})}return o._$AI(n),o};var yt=globalThis,E=class extends v{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=It(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false)}render(){return A}};E._$litElement$=true,E.finalized=true,yt.litElementHydrateSupport?.({LitElement:E});var He=yt.litElementPolyfillSupport;He?.({LitElement:E});(yt.litElementVersions??=[]).push("4.2.2");var Dt=[{endpoint:"vedic-astrology/kp/planets",method:"POST"}];var Ke={attribute:true,type:String,converter:L,reflect:false,hasChanged:q},ze=(n=Ke,t,e)=>{let{kind:r,metadata:o}=e,s=globalThis.litPropertyMetadata.get(o);if(s===void 0&&globalThis.litPropertyMetadata.set(o,s=new Map),r==="setter"&&((n=Object.create(n)).wrapped=true),s.set(e.name,n),r==="accessor"){let{name:i}=e;return{set(d){let a=t.get.call(this);t.set.call(this,d),this.requestUpdate(i,a,n,true,d)},init(d){return d!==void 0&&this.C(i,void 0,n,d),d}}}if(r==="setter"){let{name:i}=e;return function(d){let a=this[i];t.call(this,d),this.requestUpdate(i,a,n,true,d)}}throw Error("Unsupported decorator location: "+r)};function f(n){return(t,e)=>typeof e=="object"?ze(n,t,e):((r,o,s)=>{let i=o.hasOwnProperty(s);return o.constructor.createProperty(s,r),i?Object.getOwnPropertyDescriptor(o,s):void 0})(n,t,e)}function x(n){return f({...n,state:true,attribute:false})}var _=n=>n??l;var Mt=["de","en","es","fr","hi","pt","ru","tr","zh-Hans","zh-Hant"];function gt(n){if(n.lang)return n.lang;if(typeof document>"u")return;let t=n.closest?.("[lang]")?.getAttribute("lang");return t||document.documentElement.lang||void 0}var Be={tw:"hant",hk:"hant",mo:"hant",cn:"hans",sg:"hans",my:"hans"};function ft(n,t){let e=n.toLowerCase();return t.find(r=>r.toLowerCase()===e)}function jt(n,t=Mt){let e=gt(n);if(!e)return;let r=ft(e,t);if(r)return r;let o=e.toLowerCase().split("-"),s=o[0];if(s==="zh"){let i=o.find(d=>d==="hans"||d==="hant")??Be[o[1]??""];return i?ft(`zh-${i}`,t):void 0}return ft(s,t)}var Kt="symbols";var qe={Fraunces:["latin","latin-ext"],Jost:["latin","latin-ext","cyrillic"],Geist:["latin","latin-ext","cyrillic"]},xt='"Jost", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Gt='"Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Ht='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',W={"fraunces-jost":{name:"Fraunces with Jost",sans:xt,display:'"Fraunces", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif'},jost:{name:"Jost",sans:xt,display:xt},geist:{name:"Geist",sans:Gt,display:Gt},system:{name:"System",sans:Ht,display:Ht}};function zt(n){let{sans:t,display:e}=W[n];return Object.keys(qe).filter(r=>`${t} ${e}`.includes(`"${r}"`))}var Bt="1.5.0";var Ye=/^(.*)\/cdn\/(?:roxy-ui|components\/[\w-]+)\.js$/,Ve=/^(.*\/dist)\/(?:index|components\/[\w-]+)\.js$/;function qt(n,t){if(!t)return;let e=new URL(t);if(e.protocol!=="https:"&&e.protocol!=="http:")return;let r=(Ye.exec(e.pathname)??Ve.exec(e.pathname))?.[1];if(r!==void 0)return e.hostname==="cdn.jsdelivr.net"?`https://cdn.jsdelivr.net/npm/@roxyapi/ui@${n}/dist`:`${e.origin}${r}`}var Xe={},We="color-mix(in oklab, var(--roxy-accent) 70%, black)",Ze="var(--roxy-accent)",Je="color-mix(in srgb, var(--roxy-accent) 40%, transparent)",Yt=/^#(?:[\da-f]{3}|[\da-f]{6})$/i;function Vt(n){return n!==void 0&&Object.hasOwn(W,n)}function Wt(n){let t=[];return n.brandColor&&Yt.test(n.brandColor)&&t.push(`--roxy-primary:${n.brandColor}`),n.brandAccent&&Yt.test(n.brandAccent)&&t.push(`--roxy-accent:${n.brandAccent}`,`--roxy-accent-ink:light-dark(${We},${Ze})`,`--roxy-ring:${Je}`),t.join(";")}function Zt(n,t){if(Vt(t))return t;let e=n.getRootNode();if(("host"in e?e.host:null)?.localName.startsWith("roxy-")||!globalThis.getComputedStyle)return;let o=n.shadowRoot?.firstElementChild,s=o?.localName==="style"?o:null;s?.sheet&&(s.sheet.disabled=true);let i,d,a;try{let y=globalThis.getComputedStyle(n),u=m=>y.getPropertyValue(m).trim();i=u("--roxy-font-sans"),d=u("--roxy-font-display"),a=u("--roxy-font")}finally{s?.sheet&&(s.sheet.disabled=false)}if(!(i||d))return Vt(a)?a:void 0}function Jt(n){let{sans:t,display:e}=W[n];return`--roxy-font:${n};--roxy-font-sans:${t};--roxy-font-display:${e}`}var Xt=qt(Bt,globalThis.document?.currentScript?.src||Xe.url);function Qt(n,t){if(typeof document>"u"||t===void 0)return;let e=`roxy-ui-font-${n}`;if(document.getElementById(e))return;let r=document.createElement("link");r.id=e,r.rel="stylesheet",r.href=`${t}/styles/fonts/${n}.css`,document.head.append(r)}function te(n,t=Xt){zt(n).length>0&&Qt(n,t)}function ee(n=Xt){Qt(Kt,n)}var re='@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-moon-shade: color-mix(in oklab, var(--roxy-fg) 78%, var(--roxy-bg));--roxy-font: initial;--roxy-font-sans: initial;--roxy-font-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, "Liberation Mono", monospace;--roxy-font-symbol: "Roxy Symbols", ui-sans-serif, system-ui, sans-serif;--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-moon-lit: color-mix(in oklab, var(--roxy-accent) 6%, #f6eedf);--roxy-moon-mare: color-mix( in oklab, var(--roxy-moon-lit) 62%, var(--roxy-moon-shade) );--roxy-moon-rim: color-mix( in oklab, var(--roxy-moon-shade) 70%, var(--roxy-fg) );--roxy-moon-eclipse: color-mix( in oklab, color-mix(in oklab, var(--roxy-danger) 55%, var(--roxy-warning)) 72%, var(--roxy-moon-shade) );--roxy-moon-corona: color-mix( in oklab, var(--roxy-warning) 60%, var(--roxy-moon-lit) );--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);--roxy-moon-shade: color-mix( in oklab, var(--roxy-fg) 10%, var(--roxy-bg) )}}: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);--roxy-moon-shade: color-mix(in oklab, var(--roxy-fg) 78%, var(--roxy-bg))}: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);--roxy-moon-shade: color-mix(in oklab, var(--roxy-fg) 10%, var(--roxy-bg))}@media(prefers-reduced-motion:reduce){:where(:root,:host){--roxy-motion-duration: 0ms}}}';var Z="roxy-ui-tokens";function J(){if(typeof document>"u")return null;let n=document.getElementById(Z);if(n)return n;let t=document.createElement("style");return t.id=Z,t.textContent=re,document.head.prepend(t),t}function ne(n){return n.toLowerCase().replace(/[\s_-]+/g," ").trim()}var oe="__ROXY_UI_I18N__";function se(){let n=globalThis,t=n[oe];if(t)return t;let e={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return n[oe]=e,e}function Qe(n,t){return t?n.replace(/\{\{(\w+)\}\}/g,(e,r)=>r in t?String(t[r]??""):e):n}function ie(n,t,e){return Qe(tr(n,t)??t,e)}function tr(n,t){if(!n)return;let{catalogs:e}=se(),r=n.toLowerCase();return(e[r]??e[r.split("-")[0]])?.[ne(t)]}function ae(n){let{listeners:t}=se();return t.add(n),()=>{t.delete(n)}}var X=class{constructor(t){this.host=t,t.addController(this)}hostConnected(){this.unsubscribe=ae(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var Q=class extends E{constructor(){super();this.translator=(e,r)=>this.t(e,r);new X(this)}connectedCallback(){super.connectedCallback(),J()}updated(e){super.updated(e),this.renderRoot.querySelector(".roxy-glyph")&&ee()}fontDeclarations(e){let r=Zt(this,e);return r?(te(r),Jt(r)):""}renderFontStyle(){let e=this.fontDeclarations();return e?h`<style>:host{${e}}</style>`:l}t(e,r){return ie(this.effectiveLang(),e,r)}effectiveLang(){return gt(this)}};var de=g`:where(.roxy-glyph){font-family:var(--roxy-font-symbol)}`;function le(n){return n?h`<span class="roxy-glyph" aria-hidden="true">${n}</span>`:l}var ce=g`: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 er=g`: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}`,tt=[er,ce,de];var rr="__cols",nr="__rows";function or(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function et(n){if(Array.isArray(n)){let s=false,i=n.map(d=>{let a=et(d);return a!==d&&(s=true),a});return s?i:n}if(!or(n))return n;let t=n[rr],e=n[nr];if(Array.isArray(t)&&Array.isArray(e)&&Object.keys(n).length===2)return e.map(s=>{let i={};return t.forEach((d,a)=>{i[d]=et(s[a])}),i});let r=false,o={};for(let[s,i]of Object.entries(n)){let d=et(i);d!==i&&(r=true),o[s]=d}return r?o:n}function pe(n){return et(n)}function he(n,t){return n.find(e=>e.attrs&&Object.entries(e.attrs).every(([r,o])=>t[r]===o))??n[0]}var sr="pk_live_YOUR_KEY",ue={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 me(n){if(n)return n===sr?ue.sample:n.startsWith("pk_")?void 0:ue.secret}function ye(n,t,e={}){e.warn&&console.warn(t.message),n.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:t.reason,message:t.message},bubbles:true,composed:true}))}var fe="https://roxyapi.com/api/v2";async function ir(n){try{let t=await n.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:true,...t.code?{code:t.code}:{}}}}catch{}return{message:`Request failed (${n.status})`,issues:null,worded:false}}var ge={fromAttribute:n=>{if(n!=null){try{let t=JSON.parse(n);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.")}}},R=class extends Error{constructor(e,r=null,o=true,s,i){super(e);this.issues=r;this.worded=o;this.status=s;this.code=i}};function xe(n){return n.submitUrl?void 0:me(n.publishableKey)}async function bt(n,t,e){let r=xe(n);if(r)throw new R(r.message);let o=n.submitUrl?await fetch(n.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:ar(t,n.submitContext),signal:e}):await dr(n,t,e);if(!o.ok){let s=await ir(o);throw new R(s.message,s.issues,s.worded,o.status,s.code)}return await o.json()}function ar(n,t){return JSON.stringify(t?{...n,context:t}:n)}function dr(n,t,e){let r=new URL(`${n.baseUrl??fe}${t.path}`,document.baseURI);for(let[s,i]of Object.entries(t.query??{}))i!=null&&r.searchParams.set(s,String(i));let o={Accept:"application/json"};return n.publishableKey&&(o["X-API-Key"]=n.publishableKey),t.body!=null&&(o["Content-Type"]="application/json"),fetch(r,{method:t.method??"GET",headers:o,body:t.body!=null?JSON.stringify(t.body):void 0,signal:e})}var rt=class{constructor(t){this.baseUrl=fe;this.worded=true;this.failure={};this.host=t,t.addController(this)}hostDisconnected(){this.abort?.abort(),this.abort=void 0}async run(t){this.worded=true,this.failure={};let e=xe(this);if(e){this.host.error=e.message,ye(this.host,e);return}this.abort?.abort();let r=new AbortController;this.abort=r,this.host.loading=true,this.host.error=null,this.host.issues=null;try{let o=await bt(this,t,r.signal);if(r.signal.aborted)return;this.host.data=o}catch(o){if(r.signal.aborted||o?.name==="AbortError")return;o instanceof R&&(this.host.issues=o.issues,this.failure={status:o.status,code:o.code}),this.worded=o instanceof R&&o.worded,this.host.error=o instanceof Error?o.message:String(o)}finally{this.abort===r&&(this.abort=void 0),r.signal.aborted||(this.host.loading=false)}}};function be(n,t,e,r=[]){let o={...e},s=`/${n.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(y,u)=>{let m=o[u];return delete o[u],encodeURIComponent(String(m??""))}),i=new Set(r),d={},a={};for(let[y,u]of Object.entries(o))u===void 0||u===""||(t==="GET"||i.has(y)?d[y]=u:a[y]=u);return{path:s,method:t,query:d,body:t==="POST"?a:void 0}}function ve(){return h`<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 Zn=g`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 eo=g`.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 Se(n,t,e){let r=n.filter(o=>!!o.body);return r.length===0?l:h`<section class="block" part="section readings"><h3>${e}</h3>${r.map((o,s)=>h`<details class="interp-card" part="reading" name="${t}" ?open="${s===0}"><summary><span class="interp-lead">${le(o.glyph)} ${o.label}</span> ${ve()} ${o.aside?h`<span class="interp-aside"><small>${o.aside}</small></span>`:l}</summary><div class="interp-body"><p>${o.body}</p>${o.extra??l}</div></details>`)}</section>`}var lr="roxy-data";function cr(n){return n.nodeName==="SCRIPT"&&n.getAttribute("type")==="application/json"}var nt=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(cr(t)&&t.classList.contains(lr))return t;return null}parse(t){if(t?.trim())try{return JSON.parse(t)}catch{return}}};var c=class extends Q{constructor(){super();this.data=null;this.endpoint="";this.remember=false;this.hideReadings=false;this.hideSections="";this.loading=false;this.error=null;this.issues=null;this.selfFetched=false;this.editing=false;this.sticky=false;this.hostLoaded=false;this.moreLoading=false;this.moreError=null;this.onMore=async()=>{let e=this.lastRequest,r=this.listKey,o=this.listRows();if(!(!e||!r||!o)){this.moreLoading=true,this.moreError=null;try{let s=await bt(this.fetcher,{...e,query:{...e.query,offset:o.length}});if(this.lastRequest!==e)return;let i=s[r];this.data={...this.data,...s,[r]:[...o,...Array.isArray(i)?i:[]]}}catch(s){this.lastRequest===e&&(this.moreError=s instanceof Error?s.message:String(s))}finally{this.moreLoading=false}}};this.onEdit=()=>{this.editing=true};this.onFormSubmit=e=>{let r=this.selfFetch();if(!r)return;let o=e.detail;this.lastValues=o.values,this.sticky=!!o.sticky,this.selfFetched=true,this.editing=false,this.remember&&this.writeRemembered(o.values),this.fetchFresh(be(r.endpoint,r.method,{...o.values,...this.ownRequest()},o.queryKeys??[]))};new nt(this),this.fetcher=new rt(this)}static{this.styles=[tt]}static{this.endpoints=[]}willUpdate(e){if(e.has("data")&&this.data!=null){let r=pe(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:he(this.constructor.endpoints,this);return e&&{endpoint:e.endpoint,method:this.method??e.method}}render(){return h`${this.hostStyle()}${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:true,composed:true})),customElements.get("roxy-data")?h`<roxy-data .data="${e}" lang="${_(this.effectiveLang())}"></roxy-data>`:this.renderEmpty()}}hostStyle(){let e=this.hideSections.split(",").map(s=>s.trim().toLowerCase()).filter(s=>/^[a-z][a-z0-9-]*$/.test(s)),r=[Wt(this),this.fontDeclarations(this.font)].filter(Boolean).join(";");if(e.length===0&&!r)return l;let o=(r?`:host{${r}}`:"")+e.map(s=>`[part~="${s}"],roxy-endpoint-form::part(${s}){display:none!important}`).join("");return h`<style>${o}</style>`}ownRequest(){return{}}get failure(){return this.fetcher.failure}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()?h`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data):this.renderNoData()}renderInterpretation(e,r,o){return this.hideReadings?l:Se(e,r,this.t(o??"Reading"))}renderResult(e){let r=h`<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()?h`${r}${this.renderAttribution()}`:r}renderWithForm(e){return h`${this.renderForm()}${e}`}stickyBody(){return this.loading?this.renderLoading():this.error!=null?this.issues?l:this.renderErrorBanner(this.error):this.data==null?l:this.showAttribution()?h`${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"?l:e.length>=r?l:h`<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?h`<p class="roxy-error" role="alert">${this.t(this.moreError)}</p>`:l}</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=true,this.syncFetcher(),this.fetchFresh(e)}pickRow(e){this.dispatchEvent(new CustomEvent("roxy-symbol-select",{detail:e,bubbles:true,composed:true})),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 o=this.effectiveLang();o&&r.setAttribute("lang",o),this.openedRow=r,this.openedRowId=e,r.load({path:`/${this.rowDetail.path.replace("{id}",encodeURIComponent(e))}`,method:"GET",query:{lang:jt(this)}}).then(()=>r.scrollIntoView?.({block:"nearest"}))}showAttribution(){return this.attribution!=null&&this.attribution!=="off"&&this.attribution!=="false"}renderAttribution(){return h`<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(l):this.renderEmpty()}renderForm(){let e=this.selfFetch();return h`<roxy-endpoint-form part="form" exportparts="hint" data-endpoint="${e?.endpoint??""}" method="${e?.method??"POST"}" spec-url="${_(this.specUrl)}" publishable-key="${_(this.publishableKey)}" location-url="${_(this.locationUrl)}" submit-label="${_(this.submitLabel)}" lang="${_(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 h`<div class="roxy-empty" role="status" part="empty">${this.t("No data")}</div>`}renderLoading(){return h`<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 o=this.renderErrorBanner(e);return r?h`${o}${this.renderForm()}`:o}renderErrorBanner(e){return h`<div class="roxy-error" role="alert" part="error">${!this.fetcher.worded&&this.errorMessage||this.t(e)}</div>`}};p([f({attribute:false})],c.prototype,"data",2),p([f({type:String,attribute:"data-endpoint"})],c.prototype,"endpoint",2),p([f({type:String})],c.prototype,"method",2),p([f({type:String,attribute:"publishable-key"})],c.prototype,"publishableKey",2),p([f({type:String,attribute:"base-url"})],c.prototype,"baseUrl",2),p([f({type:String,attribute:"spec-url"})],c.prototype,"specUrl",2),p([f({type:String,attribute:"submit-url"})],c.prototype,"submitUrl",2),p([f({attribute:"submit-context",converter:ge})],c.prototype,"submitContext",2),p([f({type:String,attribute:"location-url"})],c.prototype,"locationUrl",2),p([f({type:Boolean})],c.prototype,"remember",2),p([f({type:Boolean,attribute:"hide-readings",reflect:true})],c.prototype,"hideReadings",2),p([f({type:String,attribute:"hide-sections",reflect:true})],c.prototype,"hideSections",2),p([f({type:String,attribute:"brand-color"})],c.prototype,"brandColor",2),p([f({type:String,attribute:"brand-accent"})],c.prototype,"brandAccent",2),p([f({type:String})],c.prototype,"font",2),p([f({type:String})],c.prototype,"hemisphere",2),p([f({type:String,attribute:"submit-label"})],c.prototype,"submitLabel",2),p([f({type:String,attribute:"error-message"})],c.prototype,"errorMessage",2),p([f({type:String})],c.prototype,"attribution",2),p([x()],c.prototype,"loading",2),p([x()],c.prototype,"error",2),p([x()],c.prototype,"issues",2),p([x()],c.prototype,"selfFetched",2),p([x()],c.prototype,"editing",2),p([x()],c.prototype,"sticky",2),p([x()],c.prototype,"openedRow",2),p([x()],c.prototype,"openedRowId",2),p([x()],c.prototype,"moreLoading",2),p([x()],c.prototype,"moreError",2);var we=n=>t=>{customElements.get(n)||customElements.define(n,t)};var Ee=new Map;function pr(n){if(!n)return["en"];let t=Ee.get(n);if(t)return[t,"en"];let e="en";try{e=Intl.getCanonicalLocales(n)[0]??"en"}catch{e="en"}return Ee.set(n,e),[e,"en"]}function $e(n,t,e=1){return typeof t!="number"||!Number.isFinite(t)?"":t.toLocaleString(pr(n),{maximumFractionDigits:e})}var P=class extends c{renderData(t){let e=t.planets??[];return h`<div class="wrap" part="card" aria-label="KP planets table"><header class="head" part="header"><h2 class="title">KP planets</h2>${typeof t.ayanamsa=="number"?h`<span class="ayanamsa">Ayanamsa: ${$e(this.effectiveLang(),t.ayanamsa,2)}°</span>`:l}</header><div class="scroll" tabindex="0" role="region" aria-labelledby="kp-planets-table-caption"><table part="table" role="table"><caption id="kp-planets-table-caption" class="roxy-sr-only">KP planets: each planet with its sign, sign lord, nakshatra, star lord, sub lord, sub sub lord and KP number.</caption><thead><tr><th scope="col">Planet</th><th scope="col">Sign</th><th scope="col">Sign lord</th><th scope="col">Nakshatra</th><th scope="col">Star lord</th><th scope="col">Sub lord</th><th scope="col">Sub-sub lord</th><th scope="col">KP no.</th></tr></thead><tbody>${e.map(r=>h`<tr><td class="planet">${r.planet} ${r.retrograde?h`<span class="retro">R</span>`:l}</td><td>${r.sign??""}</td><td>${r.signLord??""}</td><td>${r.nakshatra??""}</td><td>${r.nakshatraLord??""}</td><td>${r.subLord??""}</td><td>${r.subSubLord??""}</td><td>${r.kpNumber??""}</td></tr>`)}</tbody></table></div></div>`}};P.endpoints=Dt,P.styles=[tt,g`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-md);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.title{margin:0}.ayanamsa{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td{white-space:nowrap}td.planet{font-weight:var(--roxy-weight-bold)}.retro{color:var(--roxy-warning-fg);font-size:var(--roxy-text-xs);margin-inline-start:var(--roxy-space-xs)}`],P=p([we("roxy-kp-planets-table")],P);return Pe(hr)})();/*! Bundled license information:
3
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Ct=/'/g,Ot=/"/g,Lt=/^(?:script|style|textarea|title)$/i,mt=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),h=mt(1),xr=mt(2),br=mt(3),A=Symbol.for("lit-noChange"),l=Symbol.for("lit-nothing"),Rt=new WeakMap,T=k.createTreeWalker(k,129);function Nt(n,t){if(!ut(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return At!==void 0?At.createHTML(t):t}var je=(n,t)=>{let e=n.length-1,r=[],o,s=t===2?"<svg>":t===3?"<math>":"",i=N;for(let d=0;d<e;d++){let a=n[d],y,u,m=-1,b=0;for(;b<a.length&&(i.lastIndex=b,u=i.exec(a),u!==null);)b=i.lastIndex,i===N?u[1]==="!--"?i=_t:u[1]!==void 0?i=Pt:u[2]!==void 0?(Lt.test(u[2])&&(o=RegExp("</"+u[2],"g")),i=$):u[3]!==void 0&&(i=$):i===$?u[0]===">"?(i=o??N,m=-1):u[1]===void 0?m=-2:(m=i.lastIndex-u[2].length,y=u[1],i=u[3]===void 0?$:u[3]==='"'?Ot:Ct):i===Ot||i===Ct?i=$:i===_t||i===Pt?i=N:(i=$,o=void 0);let S=i===$&&n[d+1].startsWith("/>")?" ":"";s+=i===N?a+De:m>=0?(r.push(y),a.slice(0,m)+Ft+a.slice(m)+w+S):a+w+(m===-2?d:S)}return[Nt(n,s+(n[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},M=class n{constructor({strings:t,_$litType$:e},r){let o;this.parts=[];let s=0,i=0,d=t.length-1,a=this.parts,[y,u]=je(t,e);if(this.el=n.createElement(y,r),T.currentNode=this.el.content,e===2||e===3){let m=this.el.content.firstChild;m.replaceWith(...m.childNodes)}for(;(o=T.nextNode())!==null&&a.length<d;){if(o.nodeType===1){if(o.hasAttributes())for(let m of o.getAttributeNames())if(m.endsWith(Ft)){let b=u[i++],S=o.getAttribute(m).split(w),G=/([.?@])?(.*)/.exec(b);a.push({type:1,index:s,name:G[2],strings:S,ctor:G[1]==="."?dt:G[1]==="?"?lt:G[1]==="@"?ct:O}),o.removeAttribute(m)}else m.startsWith(w)&&(a.push({type:6,index:s}),o.removeAttribute(m));if(Lt.test(o.tagName)){let m=o.textContent.split(w),b=m.length-1;if(b>0){o.textContent=Y?Y.emptyScript:"";for(let S=0;S<b;S++)o.append(m[S],I()),T.nextNode(),a.push({type:2,index:++s});o.append(m[b],I())}}}else if(o.nodeType===8)if(o.data===Ut)a.push({type:2,index:s});else{let m=-1;for(;(m=o.data.indexOf(w,m+1))!==-1;)a.push({type:7,index:s}),m+=w.length-1}s++}}static createElement(t,e){let r=k.createElement("template");return r.innerHTML=t,r}};function C(n,t,e=n,r){if(t===A)return t;let o=r!==void 0?e._$Co?.[r]:e._$Cl,s=D(t)?void 0:t._$litDirective$;return o?.constructor!==s&&(o?._$AO?.(false),s===void 0?o=void 0:(o=new s(n),o._$AT(n,e,r)),r!==void 0?(e._$Co??=[])[r]=o:e._$Cl=o),o!==void 0&&(t=C(n,o._$AS(n,t.values),o,r)),t}var at=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,o=(t?.creationScope??k).importNode(e,true);T.currentNode=o;let s=T.nextNode(),i=0,d=0,a=r[0];for(;a!==void 0;){if(i===a.index){let y;a.type===2?y=new j(s,s.nextSibling,this,t):a.type===1?y=new a.ctor(s,a.name,a.strings,this,t):a.type===6&&(y=new pt(s,this,t)),this._$AV.push(y),a=r[++d]}i!==a?.index&&(s=T.nextNode(),i++)}return T.currentNode=k,o}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++}},j=class n{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,r,o){this.type=2,this._$AH=l,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=o,this._$Cv=o?.isConnected??true}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=C(this,t,e),D(t)?t===l||t==null||t===""?(this._$AH!==l&&this._$AR(),this._$AH=l):t!==this._$AH&&t!==A&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Me(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!==l&&D(this._$AH)?this._$AA.nextSibling.data=t:this.T(k.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:r}=t,o=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=M.createElement(Nt(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===o)this._$AH.p(e);else{let s=new at(o,this),i=s.u(this.options);s.p(e),this.T(i),this._$AH=s}}_$AC(t){let e=Rt.get(t.strings);return e===void 0&&Rt.set(t.strings,e=new M(t)),e}k(t){ut(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,r,o=0;for(let s of t)o===e.length?e.push(r=new n(this.O(I()),this.O(I()),this,this.options)):r=e[o],r._$AI(s),o++;o<e.length&&(this._$AR(r&&r._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(false,true,e);t!==this._$AB;){let r=kt(t).nextSibling;kt(t).remove(),t=r}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},O=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,o,s){this.type=1,this._$AH=l,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=l}_$AI(t,e=this,r,o){let s=this.strings,i=false;if(s===void 0)t=C(this,t,e,0),i=!D(t)||t!==this._$AH&&t!==A,i&&(this._$AH=t);else{let d=t,a,y;for(t=s[0],a=0;a<s.length-1;a++)y=C(this,d[r+a],e,a),y===A&&(y=this._$AH[a]),i||=!D(y)||y!==this._$AH[a],y===l?t=l:t!==l&&(t+=(y??"")+s[a+1]),this._$AH[a]=y}i&&!o&&this.j(t)}j(t){t===l?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},dt=class extends O{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===l?void 0:t}},lt=class extends O{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==l)}},ct=class extends O{constructor(t,e,r,o,s){super(t,e,r,o,s),this.type=5}_$AI(t,e=this){if((t=C(this,t,e,0)??l)===A)return;let r=this._$AH,o=t===l&&r!==l||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,s=t!==l&&(r===l||o);o&&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)}},pt=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){C(this,t)}};var Ge=ht.litHtmlPolyfillSupport;Ge?.(M,j),(ht.litHtmlVersions??=[]).push("3.3.3");var It=(n,t,e)=>{let r=e?.renderBefore??t,o=r._$litPart$;if(o===void 0){let s=e?.renderBefore??null;r._$litPart$=o=new j(t.insertBefore(I(),s),s,void 0,e??{})}return o._$AI(n),o};var yt=globalThis,E=class extends v{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=It(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false)}render(){return A}};E._$litElement$=true,E.finalized=true,yt.litElementHydrateSupport?.({LitElement:E});var He=yt.litElementPolyfillSupport;He?.({LitElement:E});(yt.litElementVersions??=[]).push("4.2.2");var Dt=[{endpoint:"vedic-astrology/kp/planets",method:"POST"}];var Ke={attribute:true,type:String,converter:L,reflect:false,hasChanged:q},ze=(n=Ke,t,e)=>{let{kind:r,metadata:o}=e,s=globalThis.litPropertyMetadata.get(o);if(s===void 0&&globalThis.litPropertyMetadata.set(o,s=new Map),r==="setter"&&((n=Object.create(n)).wrapped=true),s.set(e.name,n),r==="accessor"){let{name:i}=e;return{set(d){let a=t.get.call(this);t.set.call(this,d),this.requestUpdate(i,a,n,true,d)},init(d){return d!==void 0&&this.C(i,void 0,n,d),d}}}if(r==="setter"){let{name:i}=e;return function(d){let a=this[i];t.call(this,d),this.requestUpdate(i,a,n,true,d)}}throw Error("Unsupported decorator location: "+r)};function f(n){return(t,e)=>typeof e=="object"?ze(n,t,e):((r,o,s)=>{let i=o.hasOwnProperty(s);return o.constructor.createProperty(s,r),i?Object.getOwnPropertyDescriptor(o,s):void 0})(n,t,e)}function x(n){return f({...n,state:true,attribute:false})}var _=n=>n??l;var Mt=["de","en","es","fr","hi","pt","ru","tr","zh-Hans","zh-Hant"];function gt(n){if(n.lang)return n.lang;if(typeof document>"u")return;let t=n.closest?.("[lang]")?.getAttribute("lang");return t||document.documentElement.lang||void 0}var Be={tw:"hant",hk:"hant",mo:"hant",cn:"hans",sg:"hans",my:"hans"};function ft(n,t){let e=n.toLowerCase();return t.find(r=>r.toLowerCase()===e)}function jt(n,t=Mt){let e=gt(n);if(!e)return;let r=ft(e,t);if(r)return r;let o=e.toLowerCase().split("-"),s=o[0];if(s==="zh"){let i=o.find(d=>d==="hans"||d==="hant")??Be[o[1]??""];return i?ft(`zh-${i}`,t):void 0}return ft(s,t)}var Kt="symbols";var qe={Fraunces:["latin","latin-ext"],Jost:["latin","latin-ext","cyrillic"],Geist:["latin","latin-ext","cyrillic"]},xt='"Jost", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Gt='"Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Ht='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',W={"fraunces-jost":{name:"Fraunces with Jost",sans:xt,display:'"Fraunces", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif'},jost:{name:"Jost",sans:xt,display:xt},geist:{name:"Geist",sans:Gt,display:Gt},system:{name:"System",sans:Ht,display:Ht}};function zt(n){let{sans:t,display:e}=W[n];return Object.keys(qe).filter(r=>`${t} ${e}`.includes(`"${r}"`))}var Bt="1.6.0";var Ye=/^(.*)\/cdn\/(?:roxy-ui|components\/[\w-]+)\.js$/,Ve=/^(.*\/dist)\/(?:index|components\/[\w-]+)\.js$/;function qt(n,t){if(!t)return;let e=new URL(t);if(e.protocol!=="https:"&&e.protocol!=="http:")return;let r=(Ye.exec(e.pathname)??Ve.exec(e.pathname))?.[1];if(r!==void 0)return e.hostname==="cdn.jsdelivr.net"?`https://cdn.jsdelivr.net/npm/@roxyapi/ui@${n}/dist`:`${e.origin}${r}`}var Xe={},We="color-mix(in oklab, var(--roxy-accent) 70%, black)",Ze="var(--roxy-accent)",Je="color-mix(in srgb, var(--roxy-accent) 40%, transparent)",Yt=/^#(?:[\da-f]{3}|[\da-f]{6})$/i;function Vt(n){return n!==void 0&&Object.hasOwn(W,n)}function Wt(n){let t=[];return n.brandColor&&Yt.test(n.brandColor)&&t.push(`--roxy-primary:${n.brandColor}`),n.brandAccent&&Yt.test(n.brandAccent)&&t.push(`--roxy-accent:${n.brandAccent}`,`--roxy-accent-ink:light-dark(${We},${Ze})`,`--roxy-ring:${Je}`),t.join(";")}function Zt(n,t){if(Vt(t))return t;let e=n.getRootNode();if(("host"in e?e.host:null)?.localName.startsWith("roxy-")||!globalThis.getComputedStyle)return;let o=n.shadowRoot?.firstElementChild,s=o?.localName==="style"?o:null;s?.sheet&&(s.sheet.disabled=true);let i,d,a;try{let y=globalThis.getComputedStyle(n),u=m=>y.getPropertyValue(m).trim();i=u("--roxy-font-sans"),d=u("--roxy-font-display"),a=u("--roxy-font")}finally{s?.sheet&&(s.sheet.disabled=false)}if(!(i||d))return Vt(a)?a:void 0}function Jt(n){let{sans:t,display:e}=W[n];return`--roxy-font:${n};--roxy-font-sans:${t};--roxy-font-display:${e}`}var Xt=qt(Bt,globalThis.document?.currentScript?.src||Xe.url);function Qt(n,t){if(typeof document>"u"||t===void 0)return;let e=`roxy-ui-font-${n}`;if(document.getElementById(e))return;let r=document.createElement("link");r.id=e,r.rel="stylesheet",r.href=`${t}/styles/fonts/${n}.css`,document.head.append(r)}function te(n,t=Xt){zt(n).length>0&&Qt(n,t)}function ee(n=Xt){Qt(Kt,n)}var re='@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-moon-shade: color-mix(in oklab, var(--roxy-fg) 78%, var(--roxy-bg));--roxy-font: initial;--roxy-font-sans: initial;--roxy-font-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, "Liberation Mono", monospace;--roxy-font-symbol: "Roxy Symbols", ui-sans-serif, system-ui, sans-serif;--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-moon-lit: color-mix(in oklab, var(--roxy-accent) 6%, #f6eedf);--roxy-moon-mare: color-mix( in oklab, var(--roxy-moon-lit) 62%, var(--roxy-moon-shade) );--roxy-moon-rim: color-mix( in oklab, var(--roxy-moon-shade) 70%, var(--roxy-fg) );--roxy-moon-eclipse: color-mix( in oklab, color-mix(in oklab, var(--roxy-danger) 55%, var(--roxy-warning)) 72%, var(--roxy-moon-shade) );--roxy-moon-corona: color-mix( in oklab, var(--roxy-warning) 60%, var(--roxy-moon-lit) );--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);--roxy-moon-shade: color-mix( in oklab, var(--roxy-fg) 10%, var(--roxy-bg) )}}: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);--roxy-moon-shade: color-mix(in oklab, var(--roxy-fg) 78%, var(--roxy-bg))}: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);--roxy-moon-shade: color-mix(in oklab, var(--roxy-fg) 10%, var(--roxy-bg))}@media(prefers-reduced-motion:reduce){:where(:root,:host){--roxy-motion-duration: 0ms}}}';var Z="roxy-ui-tokens";function J(){if(typeof document>"u")return null;let n=document.getElementById(Z);if(n)return n;let t=document.createElement("style");return t.id=Z,t.textContent=re,document.head.prepend(t),t}function ne(n){return n.toLowerCase().replace(/[\s_-]+/g," ").trim()}var oe="__ROXY_UI_I18N__";function se(){let n=globalThis,t=n[oe];if(t)return t;let e={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return n[oe]=e,e}function Qe(n,t){return t?n.replace(/\{\{(\w+)\}\}/g,(e,r)=>r in t?String(t[r]??""):e):n}function ie(n,t,e){return Qe(tr(n,t)??t,e)}function tr(n,t){if(!n)return;let{catalogs:e}=se(),r=n.toLowerCase();return(e[r]??e[r.split("-")[0]])?.[ne(t)]}function ae(n){let{listeners:t}=se();return t.add(n),()=>{t.delete(n)}}var X=class{constructor(t){this.host=t,t.addController(this)}hostConnected(){this.unsubscribe=ae(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var Q=class extends E{constructor(){super();this.translator=(e,r)=>this.t(e,r);new X(this)}connectedCallback(){super.connectedCallback(),J()}updated(e){super.updated(e),this.renderRoot.querySelector(".roxy-glyph")&&ee()}fontDeclarations(e){let r=Zt(this,e);return r?(te(r),Jt(r)):""}renderFontStyle(){let e=this.fontDeclarations();return e?h`<style>:host{${e}}</style>`:l}t(e,r){return ie(this.effectiveLang(),e,r)}effectiveLang(){return gt(this)}};var de=g`:where(.roxy-glyph){font-family:var(--roxy-font-symbol)}`;function le(n){return n?h`<span class="roxy-glyph" aria-hidden="true">${n}</span>`:l}var ce=g`: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 er=g`: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}`,tt=[er,ce,de];var rr="__cols",nr="__rows";function or(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function et(n){if(Array.isArray(n)){let s=false,i=n.map(d=>{let a=et(d);return a!==d&&(s=true),a});return s?i:n}if(!or(n))return n;let t=n[rr],e=n[nr];if(Array.isArray(t)&&Array.isArray(e)&&Object.keys(n).length===2)return e.map(s=>{let i={};return t.forEach((d,a)=>{i[d]=et(s[a])}),i});let r=false,o={};for(let[s,i]of Object.entries(n)){let d=et(i);d!==i&&(r=true),o[s]=d}return r?o:n}function pe(n){return et(n)}function he(n,t){return n.find(e=>e.attrs&&Object.entries(e.attrs).every(([r,o])=>t[r]===o))??n[0]}var sr="pk_live_YOUR_KEY",ue={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 me(n){if(n)return n===sr?ue.sample:n.startsWith("pk_")?void 0:ue.secret}function ye(n,t,e={}){e.warn&&console.warn(t.message),n.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:t.reason,message:t.message},bubbles:true,composed:true}))}var fe="https://roxyapi.com/api/v2";async function ir(n){try{let t=await n.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:true,...t.code?{code:t.code}:{}}}}catch{}return{message:`Request failed (${n.status})`,issues:null,worded:false}}var ge={fromAttribute:n=>{if(n!=null){try{let t=JSON.parse(n);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.")}}},R=class extends Error{constructor(e,r=null,o=true,s,i){super(e);this.issues=r;this.worded=o;this.status=s;this.code=i}};function xe(n){return n.submitUrl?void 0:me(n.publishableKey)}async function bt(n,t,e){let r=xe(n);if(r)throw new R(r.message);let o=n.submitUrl?await fetch(n.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:ar(t,n.submitContext),signal:e}):await dr(n,t,e);if(!o.ok){let s=await ir(o);throw new R(s.message,s.issues,s.worded,o.status,s.code)}return await o.json()}function ar(n,t){return JSON.stringify(t?{...n,context:t}:n)}function dr(n,t,e){let r=new URL(`${n.baseUrl??fe}${t.path}`,document.baseURI);for(let[s,i]of Object.entries(t.query??{}))i!=null&&r.searchParams.set(s,String(i));let o={Accept:"application/json"};return n.publishableKey&&(o["X-API-Key"]=n.publishableKey),t.body!=null&&(o["Content-Type"]="application/json"),fetch(r,{method:t.method??"GET",headers:o,body:t.body!=null?JSON.stringify(t.body):void 0,signal:e})}var rt=class{constructor(t){this.baseUrl=fe;this.worded=true;this.failure={};this.host=t,t.addController(this)}hostDisconnected(){this.abort?.abort(),this.abort=void 0}async run(t){this.worded=true,this.failure={};let e=xe(this);if(e){this.host.error=e.message,ye(this.host,e);return}this.abort?.abort();let r=new AbortController;this.abort=r,this.host.loading=true,this.host.error=null,this.host.issues=null;try{let o=await bt(this,t,r.signal);if(r.signal.aborted)return;this.host.data=o}catch(o){if(r.signal.aborted||o?.name==="AbortError")return;o instanceof R&&(this.host.issues=o.issues,this.failure={status:o.status,code:o.code}),this.worded=o instanceof R&&o.worded,this.host.error=o instanceof Error?o.message:String(o)}finally{this.abort===r&&(this.abort=void 0),r.signal.aborted||(this.host.loading=false)}}};function be(n,t,e,r=[]){let o={...e},s=`/${n.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(y,u)=>{let m=o[u];return delete o[u],encodeURIComponent(String(m??""))}),i=new Set(r),d={},a={};for(let[y,u]of Object.entries(o))u===void 0||u===""||(t==="GET"||i.has(y)?d[y]=u:a[y]=u);return{path:s,method:t,query:d,body:t==="POST"?a:void 0}}function ve(){return h`<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 Zn=g`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 eo=g`.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 Se(n,t,e){let r=n.filter(o=>!!o.body);return r.length===0?l:h`<section class="block" part="section readings"><h3>${e}</h3>${r.map((o,s)=>h`<details class="interp-card" part="reading" name="${t}" ?open="${s===0}"><summary><span class="interp-lead">${le(o.glyph)} ${o.label}</span> ${ve()} ${o.aside?h`<span class="interp-aside"><small>${o.aside}</small></span>`:l}</summary><div class="interp-body"><p>${o.body}</p>${o.extra??l}</div></details>`)}</section>`}var lr="roxy-data";function cr(n){return n.nodeName==="SCRIPT"&&n.getAttribute("type")==="application/json"}var nt=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(cr(t)&&t.classList.contains(lr))return t;return null}parse(t){if(t?.trim())try{return JSON.parse(t)}catch{return}}};var c=class extends Q{constructor(){super();this.data=null;this.endpoint="";this.remember=false;this.hideReadings=false;this.hideSections="";this.loading=false;this.error=null;this.issues=null;this.selfFetched=false;this.editing=false;this.sticky=false;this.hostLoaded=false;this.moreLoading=false;this.moreError=null;this.onMore=async()=>{let e=this.lastRequest,r=this.listKey,o=this.listRows();if(!(!e||!r||!o)){this.moreLoading=true,this.moreError=null;try{let s=await bt(this.fetcher,{...e,query:{...e.query,offset:o.length}});if(this.lastRequest!==e)return;let i=s[r];this.data={...this.data,...s,[r]:[...o,...Array.isArray(i)?i:[]]}}catch(s){this.lastRequest===e&&(this.moreError=s instanceof Error?s.message:String(s))}finally{this.moreLoading=false}}};this.onEdit=()=>{this.editing=true};this.onFormSubmit=e=>{let r=this.selfFetch();if(!r)return;let o=e.detail;this.lastValues=o.values,this.sticky=!!o.sticky,this.selfFetched=true,this.editing=false,this.remember&&this.writeRemembered(o.values),this.fetchFresh(be(r.endpoint,r.method,{...o.values,...this.ownRequest()},o.queryKeys??[]))};new nt(this),this.fetcher=new rt(this)}static{this.styles=[tt]}static{this.endpoints=[]}willUpdate(e){if(e.has("data")&&this.data!=null){let r=pe(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:he(this.constructor.endpoints,this);return e&&{endpoint:e.endpoint,method:this.method??e.method}}render(){return h`${this.hostStyle()}${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:true,composed:true})),customElements.get("roxy-data")?h`<roxy-data .data="${e}" lang="${_(this.effectiveLang())}"></roxy-data>`:this.renderEmpty()}}hostStyle(){let e=this.hideSections.split(",").map(s=>s.trim().toLowerCase()).filter(s=>/^[a-z][a-z0-9-]*$/.test(s)),r=[Wt(this),this.fontDeclarations(this.font)].filter(Boolean).join(";");if(e.length===0&&!r)return l;let o=(r?`:host{${r}}`:"")+e.map(s=>`[part~="${s}"],roxy-endpoint-form::part(${s}){display:none!important}`).join("");return h`<style>${o}</style>`}ownRequest(){return{}}get failure(){return this.fetcher.failure}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()?h`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data):this.renderNoData()}renderInterpretation(e,r,o){return this.hideReadings?l:Se(e,r,this.t(o??"Reading"))}renderResult(e){let r=h`<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()?h`${r}${this.renderAttribution()}`:r}renderWithForm(e){return h`${this.renderForm()}${e}`}stickyBody(){return this.loading?this.renderLoading():this.error!=null?this.issues?l:this.renderErrorBanner(this.error):this.data==null?l:this.showAttribution()?h`${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"?l:e.length>=r?l:h`<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?h`<p class="roxy-error" role="alert">${this.t(this.moreError)}</p>`:l}</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=true,this.syncFetcher(),this.fetchFresh(e)}pickRow(e){this.dispatchEvent(new CustomEvent("roxy-symbol-select",{detail:e,bubbles:true,composed:true})),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 o=this.effectiveLang();o&&r.setAttribute("lang",o),this.openedRow=r,this.openedRowId=e,r.load({path:`/${this.rowDetail.path.replace("{id}",encodeURIComponent(e))}`,method:"GET",query:{lang:jt(this)}}).then(()=>r.scrollIntoView?.({block:"nearest"}))}showAttribution(){return this.attribution!=null&&this.attribution!=="off"&&this.attribution!=="false"}renderAttribution(){return h`<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(l):this.renderEmpty()}renderForm(){let e=this.selfFetch();return h`<roxy-endpoint-form part="form" exportparts="hint" data-endpoint="${e?.endpoint??""}" method="${e?.method??"POST"}" spec-url="${_(this.specUrl)}" publishable-key="${_(this.publishableKey)}" location-url="${_(this.locationUrl)}" submit-label="${_(this.submitLabel)}" lang="${_(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 h`<div class="roxy-empty" role="status" part="empty">${this.t("No data")}</div>`}renderLoading(){return h`<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 o=this.renderErrorBanner(e);return r?h`${o}${this.renderForm()}`:o}renderErrorBanner(e){return h`<div class="roxy-error" role="alert" part="error">${!this.fetcher.worded&&this.errorMessage||this.t(e)}</div>`}};p([f({attribute:false})],c.prototype,"data",2),p([f({type:String,attribute:"data-endpoint"})],c.prototype,"endpoint",2),p([f({type:String})],c.prototype,"method",2),p([f({type:String,attribute:"publishable-key"})],c.prototype,"publishableKey",2),p([f({type:String,attribute:"base-url"})],c.prototype,"baseUrl",2),p([f({type:String,attribute:"spec-url"})],c.prototype,"specUrl",2),p([f({type:String,attribute:"submit-url"})],c.prototype,"submitUrl",2),p([f({attribute:"submit-context",converter:ge})],c.prototype,"submitContext",2),p([f({type:String,attribute:"location-url"})],c.prototype,"locationUrl",2),p([f({type:Boolean})],c.prototype,"remember",2),p([f({type:Boolean,attribute:"hide-readings",reflect:true})],c.prototype,"hideReadings",2),p([f({type:String,attribute:"hide-sections",reflect:true})],c.prototype,"hideSections",2),p([f({type:String,attribute:"brand-color"})],c.prototype,"brandColor",2),p([f({type:String,attribute:"brand-accent"})],c.prototype,"brandAccent",2),p([f({type:String})],c.prototype,"font",2),p([f({type:String})],c.prototype,"hemisphere",2),p([f({type:String,attribute:"submit-label"})],c.prototype,"submitLabel",2),p([f({type:String,attribute:"error-message"})],c.prototype,"errorMessage",2),p([f({type:String})],c.prototype,"attribution",2),p([x()],c.prototype,"loading",2),p([x()],c.prototype,"error",2),p([x()],c.prototype,"issues",2),p([x()],c.prototype,"selfFetched",2),p([x()],c.prototype,"editing",2),p([x()],c.prototype,"sticky",2),p([x()],c.prototype,"openedRow",2),p([x()],c.prototype,"openedRowId",2),p([x()],c.prototype,"moreLoading",2),p([x()],c.prototype,"moreError",2);var we=n=>t=>{customElements.get(n)||customElements.define(n,t)};var Ee=new Map;function pr(n){if(!n)return["en"];let t=Ee.get(n);if(t)return[t,"en"];let e="en";try{e=Intl.getCanonicalLocales(n)[0]??"en"}catch{e="en"}return Ee.set(n,e),[e,"en"]}function $e(n,t,e=1){return typeof t!="number"||!Number.isFinite(t)?"":t.toLocaleString(pr(n),{maximumFractionDigits:e})}var P=class extends c{renderData(t){let e=t.planets??[];return h`<div class="wrap" part="card" aria-label="KP planets table"><header class="head" part="header"><h2 class="title">KP planets</h2>${typeof t.ayanamsa=="number"?h`<span class="ayanamsa">Ayanamsa: ${$e(this.effectiveLang(),t.ayanamsa,2)}°</span>`:l}</header><div class="scroll" tabindex="0" role="region" aria-labelledby="kp-planets-table-caption"><table part="table" role="table"><caption id="kp-planets-table-caption" class="roxy-sr-only">KP planets: each planet with its sign, sign lord, nakshatra, star lord, sub lord, sub sub lord and KP number.</caption><thead><tr><th scope="col">Planet</th><th scope="col">Sign</th><th scope="col">Sign lord</th><th scope="col">Nakshatra</th><th scope="col">Star lord</th><th scope="col">Sub lord</th><th scope="col">Sub-sub lord</th><th scope="col">KP no.</th></tr></thead><tbody>${e.map(r=>h`<tr><td class="planet">${r.planet} ${r.retrograde?h`<span class="retro">R</span>`:l}</td><td>${r.sign??""}</td><td>${r.signLord??""}</td><td>${r.nakshatra??""}</td><td>${r.nakshatraLord??""}</td><td>${r.subLord??""}</td><td>${r.subSubLord??""}</td><td>${r.kpNumber??""}</td></tr>`)}</tbody></table></div></div>`}};P.endpoints=Dt,P.styles=[tt,g`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-md);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.title{margin:0}.ayanamsa{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td{white-space:nowrap}td.planet{font-weight:var(--roxy-weight-bold)}.retro{color:var(--roxy-warning-fg);font-size:var(--roxy-text-xs);margin-inline-start:var(--roxy-space-xs)}`],P=p([we("roxy-kp-planets-table")],P);return Pe(hr)})();/*! Bundled license information:
4
4
 
5
5
  @lit/reactive-element/css-tag.js:
6
6
  (**