@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.
- package/components-catalog.json +1 -1
- package/dist/cdn/components/almanac-day.js +1 -1
- package/dist/cdn/components/angel-number-card.js +1 -1
- package/dist/cdn/components/angel-number-lookup.js +1 -1
- package/dist/cdn/components/arudha-padas.js +1 -1
- package/dist/cdn/components/ashtakavarga-grid.js +1 -1
- package/dist/cdn/components/aspects-table.js +1 -1
- package/dist/cdn/components/astrocartography-map.js +1 -1
- package/dist/cdn/components/bazi-chart.js +1 -1
- package/dist/cdn/components/bhav-chalit-table.js +1 -1
- package/dist/cdn/components/bhava-bala-table.js +1 -1
- package/dist/cdn/components/biorhythm-chart.js +1 -1
- package/dist/cdn/components/bodygraph.js +1 -1
- package/dist/cdn/components/chara-karakas.js +1 -1
- package/dist/cdn/components/choghadiya-grid.js +1 -1
- package/dist/cdn/components/compatibility-card.js +1 -1
- package/dist/cdn/components/compound-number.js +1 -1
- package/dist/cdn/components/crystal-card.js +1 -1
- package/dist/cdn/components/crystal-grid.js +1 -1
- package/dist/cdn/components/dasha-timeline.js +1 -1
- package/dist/cdn/components/data.js +2 -2
- package/dist/cdn/components/divisional-chart.js +1 -1
- package/dist/cdn/components/dosha-card.js +1 -1
- package/dist/cdn/components/dosha-constitution.js +1 -1
- package/dist/cdn/components/dream-card.js +1 -1
- package/dist/cdn/components/dream-search.js +1 -1
- package/dist/cdn/components/endpoint-form.js +1 -1
- package/dist/cdn/components/ephemeris-table.js +1 -1
- package/dist/cdn/components/fixed-stars.js +1 -1
- package/dist/cdn/components/flying-star-chart.js +1 -1
- package/dist/cdn/components/forecast-digest.js +1 -1
- package/dist/cdn/components/forecast-timeline.js +1 -1
- package/dist/cdn/components/gematria.js +1 -1
- package/dist/cdn/components/gochara-table.js +1 -1
- package/dist/cdn/components/guna-milan.js +1 -1
- package/dist/cdn/components/hd-connection.js +1 -1
- package/dist/cdn/components/hd-penta.js +1 -1
- package/dist/cdn/components/hd-type-card.js +1 -1
- package/dist/cdn/components/hd-variables.js +1 -1
- package/dist/cdn/components/heliacal-table.js +1 -1
- package/dist/cdn/components/hexagram.js +1 -1
- package/dist/cdn/components/hora-table.js +1 -1
- package/dist/cdn/components/horoscope-card.js +1 -1
- package/dist/cdn/components/kp-chart.js +1 -1
- package/dist/cdn/components/kp-finance-card.js +1 -1
- package/dist/cdn/components/kp-planets-table.js +1 -1
- package/dist/cdn/components/kp-ruling-planets.js +1 -1
- package/dist/cdn/components/kua-card.js +1 -1
- package/dist/cdn/components/local-space-compass.js +1 -1
- package/dist/cdn/components/location-search.js +1 -1
- package/dist/cdn/components/luck-pillars.js +1 -1
- package/dist/cdn/components/mayan-day-sign.js +1 -1
- package/dist/cdn/components/moon-phase.js +1 -1
- package/dist/cdn/components/nakshatra-card.js +1 -1
- package/dist/cdn/components/natal-chart.js +1 -1
- package/dist/cdn/components/numerology-card.js +1 -1
- package/dist/cdn/components/panchang-table.js +1 -1
- package/dist/cdn/components/positions-table.js +1 -1
- package/dist/cdn/components/profection-card.js +1 -1
- package/dist/cdn/components/reference-card.js +1 -1
- package/dist/cdn/components/relocation-wheel.js +1 -1
- package/dist/cdn/components/report.js +1 -1
- package/dist/cdn/components/shadbala-table.js +1 -1
- package/dist/cdn/components/synastry-chart.js +1 -1
- package/dist/cdn/components/tarot-card.js +1 -1
- package/dist/cdn/components/tarot-catalog.js +1 -1
- package/dist/cdn/components/tarot-spread.js +1 -1
- package/dist/cdn/components/transit-wheel.js +1 -1
- package/dist/cdn/components/transits-table.js +1 -1
- package/dist/cdn/components/upagraha-table.js +1 -1
- package/dist/cdn/components/vastu-mandala.js +1 -1
- package/dist/cdn/components/vedic-aspects.js +1 -1
- package/dist/cdn/components/vedic-daily.js +1 -1
- package/dist/cdn/components/vedic-kundli.js +1 -1
- package/dist/cdn/components/vedic-planets-table.js +1 -1
- package/dist/cdn/components/western-planets-table.js +1 -1
- package/dist/cdn/components/yoga-list.js +1 -1
- package/dist/cdn/components/zodiac-card.js +1 -1
- package/dist/cdn/roxy-ui.js +42 -42
- package/dist/charts.cjs +2 -2
- package/dist/charts.js +2 -2
- package/dist/components/almanac-day.js +1 -1
- package/dist/components/angel-number-card.js +1 -1
- package/dist/components/angel-number-lookup.js +1 -1
- package/dist/components/arudha-padas.js +1 -1
- package/dist/components/ashtakavarga-grid.js +1 -1
- package/dist/components/aspects-table.js +1 -1
- package/dist/components/astrocartography-map.js +1 -1
- package/dist/components/bazi-chart.js +1 -1
- package/dist/components/bhav-chalit-table.js +1 -1
- package/dist/components/bhava-bala-table.js +1 -1
- package/dist/components/biorhythm-chart.js +1 -1
- package/dist/components/bodygraph.js +1 -1
- package/dist/components/chara-karakas.js +1 -1
- package/dist/components/choghadiya-grid.js +1 -1
- package/dist/components/compatibility-card.js +1 -1
- package/dist/components/compound-number.js +1 -1
- package/dist/components/crystal-card.js +1 -1
- package/dist/components/crystal-grid.js +1 -1
- package/dist/components/dasha-timeline.js +1 -1
- package/dist/components/data.js +1 -1
- package/dist/components/divisional-chart.js +1 -1
- package/dist/components/dosha-card.js +1 -1
- package/dist/components/dosha-constitution.js +1 -1
- package/dist/components/dream-card.js +1 -1
- package/dist/components/dream-search.js +1 -1
- package/dist/components/endpoint-form.js +1 -1
- package/dist/components/ephemeris-table.js +1 -1
- package/dist/components/fixed-stars.js +1 -1
- package/dist/components/flying-star-chart.js +1 -1
- package/dist/components/forecast-digest.js +1 -1
- package/dist/components/forecast-timeline.js +1 -1
- package/dist/components/gematria.js +1 -1
- package/dist/components/gochara-table.js +1 -1
- package/dist/components/guna-milan.js +1 -1
- package/dist/components/hd-connection.js +1 -1
- package/dist/components/hd-penta.js +1 -1
- package/dist/components/hd-type-card.js +1 -1
- package/dist/components/hd-variables.js +1 -1
- package/dist/components/heliacal-table.js +1 -1
- package/dist/components/hexagram.js +1 -1
- package/dist/components/hora-table.js +1 -1
- package/dist/components/horoscope-card.js +1 -1
- package/dist/components/kp-chart.js +1 -1
- package/dist/components/kp-finance-card.js +1 -1
- package/dist/components/kp-planets-table.js +1 -1
- package/dist/components/kp-ruling-planets.js +1 -1
- package/dist/components/kua-card.js +1 -1
- package/dist/components/local-space-compass.js +1 -1
- package/dist/components/location-search.js +1 -1
- package/dist/components/luck-pillars.js +1 -1
- package/dist/components/mayan-day-sign.js +1 -1
- package/dist/components/moon-phase.js +1 -1
- package/dist/components/nakshatra-card.js +1 -1
- package/dist/components/natal-chart.js +1 -1
- package/dist/components/numerology-card.js +1 -1
- package/dist/components/panchang-table.js +1 -1
- package/dist/components/positions-table.js +1 -1
- package/dist/components/profection-card.js +1 -1
- package/dist/components/reference-card.js +1 -1
- package/dist/components/relocation-wheel.js +1 -1
- package/dist/components/report.js +1 -1
- package/dist/components/shadbala-table.js +1 -1
- package/dist/components/synastry-chart.js +1 -1
- package/dist/components/tarot-card.js +1 -1
- package/dist/components/tarot-catalog.js +1 -1
- package/dist/components/tarot-spread.js +1 -1
- package/dist/components/transit-wheel.js +1 -1
- package/dist/components/transits-table.js +1 -1
- package/dist/components/upagraha-table.js +1 -1
- package/dist/components/vastu-mandala.js +1 -1
- package/dist/components/vedic-aspects.js +1 -1
- package/dist/components/vedic-daily.js +1 -1
- package/dist/components/vedic-kundli.js +1 -1
- package/dist/components/vedic-planets-table.js +1 -1
- package/dist/components/western-planets-table.js +1 -1
- package/dist/components/yoga-list.js +1 -1
- package/dist/components/zodiac-card.js +1 -1
- package/dist/generated/symbol-font.d.ts +2 -2
- package/dist/index.cjs +41 -41
- package/dist/index.js +41 -41
- package/dist/styles/fonts/symbols/noto-sans-symbols-2.woff2 +0 -0
- package/dist/styles/fonts/symbols/noto-sans-symbols.woff2 +0 -0
- package/dist/styles/fonts/symbols.css +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var RoxyUI_yoga_list=(()=>{var H=Object.defineProperty;var Et=Object.getOwnPropertyDescriptor;var Pe=Object.getOwnPropertyNames;var Le=Object.prototype.hasOwnProperty;var Ue=(n,t)=>{for(var e in t)H(n,e,{get:t[e],enumerable:true})},Ne=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Pe(t))!Le.call(n,o)&&o!==e&&H(n,o,{get:()=>t[o],enumerable:!(r=Et(t,o))||r.enumerable});return n};var De=n=>Ne(H({},"__esModule",{value:true}),n),m=(n,t,e,r)=>{for(var o=r>1?void 0:r?Et(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 Er={};Ue(Er,{FAMILY_ORDER:()=>wt,ROXY_UI_TOKENS_STYLE_ID:()=>Z,RoxyYogaList:()=>$,injectRoxyTokens:()=>J});var z=globalThis,B=z.ShadowRoot&&(z.ShadyCSS===void 0||z.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,st=Symbol(),$t=new WeakMap,P=class{constructor(t,e,r){if(this._$cssResult$=true,r!==st)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(B&&t===void 0){let r=e!==void 0&&e.length===1;r&&(t=$t.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&$t.set(e,t))}return t}toString(){return this.cssText}},Tt=n=>new P(typeof n=="string"?n:n+"",void 0,st),x=(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 P(e,n,st)},kt=(n,t)=>{if(B)n.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let r=document.createElement("style"),o=z.litNonce;o!==void 0&&r.setAttribute("nonce",o),r.textContent=e.cssText,n.appendChild(r)}},it=B?n=>n:n=>n instanceof CSSStyleSheet?(t=>{let e="";for(let r of t.cssRules)e+=r.cssText;return Tt(e)})(n):n;var{is:Ie,defineProperty:Ge,getOwnPropertyDescriptor:Me,getOwnPropertyNames:je,getOwnPropertySymbols:He,getPrototypeOf:ze}=Object,K=globalThis,At=K.trustedTypes,Be=At?At.emptyScript:"",Ke=K.reactiveElementPolyfillSupport,L=(n,t)=>n,U={toAttribute(n,t){switch(t){case Boolean:n=n?Be: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}},Y=(n,t)=>!Ie(n,t),Ct={attribute:true,type:String,converter:U,reflect:false,useDefault:false,hasChanged:Y};Symbol.metadata??=Symbol("metadata"),K.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=Ct){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&&Ge(this.prototype,t,o)}}static getPropertyDescriptor(t,e,r){let{get:o,set:s}=Me(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,r)},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??Ct}static _$Ei(){if(this.hasOwnProperty(L("elementProperties")))return;let t=ze(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(L("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(L("properties"))){let e=this.properties,r=[...je(e),...He(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(it(o))}else t!==void 0&&e.push(it(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 kt(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:U).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:U;this._$Em=o;let c=i.fromAttribute(e,s.type);this[o]=c??this._$Ej?.get(o)??c,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??Y)(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,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(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){}};S.elementStyles=[],S.shadowRootOptions={mode:"open"},S[L("elementProperties")]=new Map,S[L("finalized")]=new Map,Ke?.({ReactiveElement:S}),(K.reactiveElementVersions??=[]).push("2.1.2");var ut=globalThis,_t=n=>n,q=ut.trustedTypes,Rt=q?q.createPolicy("lit-html",{createHTML:n=>n}):void 0,Nt="$lit$",w=`lit$${Math.random().toFixed(9).slice(2)}$`,Dt="?"+w,Ye=`<${Dt}>`,A=document,D=()=>A.createComment(""),I=n=>n===null||typeof n!="object"&&typeof n!="function",mt=Array.isArray,qe=n=>mt(n)||typeof n?.[Symbol.iterator]=="function",at=`[
|
|
2
2
|
\f\r]`,N=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ft=/-->/g,Ot=/>/g,T=RegExp(`>|${at}(?:([^\\s"'>=/]+)(${at}*=${at}*(?:[^
|
|
3
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Pt=/'/g,Lt=/"/g,It=/^(?:script|style|textarea|title)$/i,yt=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),l=yt(1),_r=yt(2),Rr=yt(3),C=Symbol.for("lit-noChange"),a=Symbol.for("lit-nothing"),Ut=new WeakMap,k=A.createTreeWalker(A,129);function Gt(n,t){if(!mt(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return Rt!==void 0?Rt.createHTML(t):t}var Ve=(n,t)=>{let e=n.length-1,r=[],o,s=t===2?"<svg>":t===3?"<math>":"",i=N;for(let c=0;c<e;c++){let d=n[c],p,h,u=-1,f=0;for(;f<d.length&&(i.lastIndex=f,h=i.exec(d),h!==null);)f=i.lastIndex,i===N?h[1]==="!--"?i=Ft:h[1]!==void 0?i=Ot:h[2]!==void 0?(It.test(h[2])&&(o=RegExp("</"+h[2],"g")),i=T):h[3]!==void 0&&(i=T):i===T?h[0]===">"?(i=o??N,u=-1):h[1]===void 0?u=-2:(u=i.lastIndex-h[2].length,p=h[1],i=h[3]===void 0?T:h[3]==='"'?Lt:Pt):i===Lt||i===Pt?i=T:i===Ft||i===Ot?i=N:(i=T,o=void 0);let v=i===T&&n[c+1].startsWith("/>")?" ":"";s+=i===N?d+Ye:u>=0?(r.push(p),d.slice(0,u)+Nt+d.slice(u)+w+v):d+w+(u===-2?c:v)}return[Gt(n,s+(n[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},G=class n{constructor({strings:t,_$litType$:e},r){let o;this.parts=[];let s=0,i=0,c=t.length-1,d=this.parts,[p,h]=Ve(t,e);if(this.el=n.createElement(p,r),k.currentNode=this.el.content,e===2||e===3){let u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}for(;(o=k.nextNode())!==null&&d.length<c;){if(o.nodeType===1){if(o.hasAttributes())for(let u of o.getAttributeNames())if(u.endsWith(Nt)){let f=h[i++],v=o.getAttribute(u).split(w),j=/([.?@])?(.*)/.exec(f);d.push({type:1,index:s,name:j[2],strings:v,ctor:j[1]==="."?lt:j[1]==="?"?ct:j[1]==="@"?pt:F}),o.removeAttribute(u)}else u.startsWith(w)&&(d.push({type:6,index:s}),o.removeAttribute(u));if(It.test(o.tagName)){let u=o.textContent.split(w),f=u.length-1;if(f>0){o.textContent=q?q.emptyScript:"";for(let v=0;v<f;v++)o.append(u[v],D()),k.nextNode(),d.push({type:2,index:++s});o.append(u[f],D())}}}else if(o.nodeType===8)if(o.data===Dt)d.push({type:2,index:s});else{let u=-1;for(;(u=o.data.indexOf(w,u+1))!==-1;)d.push({type:7,index:s}),u+=w.length-1}s++}}static createElement(t,e){let r=A.createElement("template");return r.innerHTML=t,r}};function R(n,t,e=n,r){if(t===C)return t;let o=r!==void 0?e._$Co?.[r]: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(n),o._$AT(n,e,r)),r!==void 0?(e._$Co??=[])[r]=o:e._$Cl=o),o!==void 0&&(t=R(n,o._$AS(n,t.values),o,r)),t}var dt=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??A).importNode(e,true);k.currentNode=o;let s=k.nextNode(),i=0,c=0,d=r[0];for(;d!==void 0;){if(i===d.index){let p;d.type===2?p=new M(s,s.nextSibling,this,t):d.type===1?p=new d.ctor(s,d.name,d.strings,this,t):d.type===6&&(p=new ht(s,this,t)),this._$AV.push(p),d=r[++c]}i!==d?.index&&(s=k.nextNode(),i++)}return k.currentNode=A,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++}},M=class n{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,r,o){this.type=2,this._$AH=a,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=R(this,t,e),I(t)?t===a||t==null||t===""?(this._$AH!==a&&this._$AR(),this._$AH=a):t!==this._$AH&&t!==C&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):qe(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!==a&&I(this._$AH)?this._$AA.nextSibling.data=t:this.T(A.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=G.createElement(Gt(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===o)this._$AH.p(e);else{let s=new dt(o,this),i=s.u(this.options);s.p(e),this.T(i),this._$AH=s}}_$AC(t){let e=Ut.get(t.strings);return e===void 0&&Ut.set(t.strings,e=new G(t)),e}k(t){mt(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(D()),this.O(D()),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=_t(t).nextSibling;_t(t).remove(),t=r}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},F=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,o,s){this.type=1,this._$AH=a,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=a}_$AI(t,e=this,r,o){let s=this.strings,i=false;if(s===void 0)t=R(this,t,e,0),i=!I(t)||t!==this._$AH&&t!==C,i&&(this._$AH=t);else{let c=t,d,p;for(t=s[0],d=0;d<s.length-1;d++)p=R(this,c[r+d],e,d),p===C&&(p=this._$AH[d]),i||=!I(p)||p!==this._$AH[d],p===a?t=a:t!==a&&(t+=(p??"")+s[d+1]),this._$AH[d]=p}i&&!o&&this.j(t)}j(t){t===a?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},lt=class extends F{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===a?void 0:t}},ct=class extends F{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==a)}},pt=class extends F{constructor(t,e,r,o,s){super(t,e,r,o,s),this.type=5}_$AI(t,e=this){if((t=R(this,t,e,0)??a)===C)return;let r=this._$AH,o=t===a&&r!==a||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,s=t!==a&&(r===a||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)}},ht=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){R(this,t)}};var We=ut.litHtmlPolyfillSupport;We?.(G,M),(ut.litHtmlVersions??=[]).push("3.3.3");var Mt=(n,t,e)=>{let r=e?.renderBefore??t,o=r._$litPart$;if(o===void 0){let s=e?.renderBefore??null;r._$litPart$=o=new M(t.insertBefore(D(),s),s,void 0,e??{})}return o._$AI(n),o};var gt=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=Mt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false)}render(){return C}};E._$litElement$=true,E.finalized=true,gt.litElementHydrateSupport?.({LitElement:E});var Ze=gt.litElementPolyfillSupport;Ze?.({LitElement:E});(gt.litElementVersions??=[]).push("4.2.2");var Je={attribute:true,type:String,converter:U,reflect:false,hasChanged:Y},Xe=(n=Je,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(c){let d=t.get.call(this);t.set.call(this,c),this.requestUpdate(i,d,n,true,c)},init(c){return c!==void 0&&this.C(i,void 0,n,c),c}}}if(r==="setter"){let{name:i}=e;return function(c){let d=this[i];t.call(this,c),this.requestUpdate(i,d,n,true,c)}}throw Error("Unsupported decorator location: "+r)};function g(n){return(t,e)=>typeof e=="object"?Xe(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 b(n){return g({...n,state:true,attribute:false})}var jt=[{endpoint:"vedic-astrology/yoga",method:"GET"},{endpoint:"vedic-astrology/yoga/detect",method:"POST"},{endpoint:"vedic-astrology/yoga/{id}",method:"GET"}];var _=n=>n??a;var Ht=["de","en","es","fr","hi","pt","ru","tr","zh-Hans","zh-Hant"];function xt(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 Qe={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 zt(n,t=Ht){let e=xt(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(c=>c==="hans"||c==="hant")??Qe[o[1]??""];return i?ft(`zh-${i}`,t):void 0}return ft(s,t)}var Yt="symbols";var tr={Fraunces:["latin","latin-ext"],Jost:["latin","latin-ext","cyrillic"],Geist:["latin","latin-ext","cyrillic"]},bt='"Jost", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Bt='"Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Kt='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',W={"fraunces-jost":{name:"Fraunces with Jost",sans:bt,display:'"Fraunces", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif'},jost:{name:"Jost",sans:bt,display:bt},geist:{name:"Geist",sans:Bt,display:Bt},system:{name:"System",sans:Kt,display:Kt}};function qt(n){let{sans:t,display:e}=W[n];return Object.keys(tr).filter(r=>`${t} ${e}`.includes(`"${r}"`))}var Vt="1.5.0";var er=/^(.*)\/cdn\/(?:roxy-ui|components\/[\w-]+)\.js$/,rr=/^(.*\/dist)\/(?:index|components\/[\w-]+)\.js$/;function Wt(n,t){if(!t)return;let e=new URL(t);if(e.protocol!=="https:"&&e.protocol!=="http:")return;let r=(er.exec(e.pathname)??rr.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 ir={},nr="color-mix(in oklab, var(--roxy-accent) 70%, black)",or="var(--roxy-accent)",sr="color-mix(in srgb, var(--roxy-accent) 40%, transparent)",Zt=/^#(?:[\da-f]{3}|[\da-f]{6})$/i;function Jt(n){return n!==void 0&&Object.hasOwn(W,n)}function Xt(n){let t=[];return n.brandColor&&Zt.test(n.brandColor)&&t.push(`--roxy-primary:${n.brandColor}`),n.brandAccent&&Zt.test(n.brandAccent)&&t.push(`--roxy-accent:${n.brandAccent}`,`--roxy-accent-ink:light-dark(${nr},${or})`,`--roxy-ring:${sr}`),t.join(";")}function Qt(n,t){if(Jt(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,c,d;try{let p=globalThis.getComputedStyle(n),h=u=>p.getPropertyValue(u).trim();i=h("--roxy-font-sans"),c=h("--roxy-font-display"),d=h("--roxy-font")}finally{s?.sheet&&(s.sheet.disabled=false)}if(!(i||c))return Jt(d)?d:void 0}function te(n){let{sans:t,display:e}=W[n];return`--roxy-font:${n};--roxy-font-sans:${t};--roxy-font-display:${e}`}var ee=Wt(Vt,globalThis.document?.currentScript?.src||ir.url);function re(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 ne(n,t=ee){qt(n).length>0&&re(n,t)}function oe(n=ee){re(Yt,n)}var se='@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=se,document.head.prepend(t),t}function ie(n){return n.toLowerCase().replace(/[\s_-]+/g," ").trim()}function X(n){return n?n.charAt(0).toUpperCase()+n.slice(1).toLowerCase():""}function ae(n){return n.replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([a-z])([0-9])/g,"$1 $2").replace(/^\w/,t=>t.toUpperCase())}var de="__ROXY_UI_I18N__";function le(){let n=globalThis,t=n[de];if(t)return t;let e={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return n[de]=e,e}function ar(n,t){return t?n.replace(/\{\{(\w+)\}\}/g,(e,r)=>r in t?String(t[r]??""):e):n}function ce(n,t,e){return ar(dr(n,t)??t,e)}function dr(n,t){if(!n)return;let{catalogs:e}=le(),r=n.toLowerCase();return(e[r]??e[r.split("-")[0]])?.[ie(t)]}function pe(n){let{listeners:t}=le();return t.add(n),()=>{t.delete(n)}}var Q=class{constructor(t){this.host=t,t.addController(this)}hostConnected(){this.unsubscribe=pe(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var tt=class extends E{constructor(){super();this.translator=(e,r)=>this.t(e,r);new Q(this)}connectedCallback(){super.connectedCallback(),J()}updated(e){super.updated(e),this.renderRoot.querySelector(".roxy-glyph")&&oe()}fontDeclarations(e){let r=Qt(this,e);return r?(ne(r),te(r)):""}renderFontStyle(){let e=this.fontDeclarations();return e?l`<style>:host{${e}}</style>`:a}t(e,r){return ce(this.effectiveLang(),e,r)}effectiveLang(){return xt(this)}};var he=x`:where(.roxy-glyph){font-family:var(--roxy-font-symbol)}`;function ue(n){return n?l`<span class="roxy-glyph" aria-hidden="true">${n}</span>`:a}var me=x`: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 lr=x`: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}`,et=[lr,me,he];var cr="__cols",pr="__rows";function hr(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function rt(n){if(Array.isArray(n)){let s=false,i=n.map(c=>{let d=rt(c);return d!==c&&(s=true),d});return s?i:n}if(!hr(n))return n;let t=n[cr],e=n[pr];if(Array.isArray(t)&&Array.isArray(e)&&Object.keys(n).length===2)return e.map(s=>{let i={};return t.forEach((c,d)=>{i[c]=rt(s[d])}),i});let r=false,o={};for(let[s,i]of Object.entries(n)){let c=rt(i);c!==i&&(r=true),o[s]=c}return r?o:n}function ye(n){return rt(n)}function ge(n,t){return n.find(e=>e.attrs&&Object.entries(e.attrs).every(([r,o])=>t[r]===o))??n[0]}var ur="pk_live_YOUR_KEY",fe={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 xe(n){if(n)return n===ur?fe.sample:n.startsWith("pk_")?void 0:fe.secret}function be(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 ve="https://roxyapi.com/api/v2";async function mr(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 Se={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.")}}},O=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 we(n){return n.submitUrl?void 0:xe(n.publishableKey)}async function vt(n,t,e){let r=we(n);if(r)throw new O(r.message);let o=n.submitUrl?await fetch(n.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:yr(t,n.submitContext),signal:e}):await gr(n,t,e);if(!o.ok){let s=await mr(o);throw new O(s.message,s.issues,s.worded,o.status,s.code)}return await o.json()}function yr(n,t){return JSON.stringify(t?{...n,context:t}:n)}function gr(n,t,e){let r=new URL(`${n.baseUrl??ve}${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 nt=class{constructor(t){this.baseUrl=ve;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=we(this);if(e){this.host.error=e.message,be(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 vt(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 O&&(this.host.issues=o.issues,this.failure={status:o.status,code:o.code}),this.worded=o instanceof O&&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 Ee(n,t,e,r=[]){let o={...e},s=`/${n.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(p,h)=>{let u=o[h];return delete o[h],encodeURIComponent(String(u??""))}),i=new Set(r),c={},d={};for(let[p,h]of Object.entries(o))h===void 0||h===""||(t==="GET"||i.has(p)?c[p]=h:d[p]=h);return{path:s,method:t,query:c,body:t==="POST"?d:void 0}}function $e(){return l`<svg class="roxy-chevron" viewBox="0 0 16 16" width="14" height="14" aria-hidden="true"><path d="M4 6l4 4 4-4" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>`}var ao=x`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 uo=x`.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 Te(n,t,e){let r=n.filter(o=>!!o.body);return r.length===0?a:l`<section class="block" part="section readings"><h3>${e}</h3>${r.map((o,s)=>l`<details class="interp-card" part="reading" name="${t}" ?open="${s===0}"><summary><span class="interp-lead">${ue(o.glyph)} ${o.label}</span> ${$e()} ${o.aside?l`<span class="interp-aside"><small>${o.aside}</small></span>`:a}</summary><div class="interp-body"><p>${o.body}</p>${o.extra??a}</div></details>`)}</section>`}var fr="roxy-data";function xr(n){return n.nodeName==="SCRIPT"&&n.getAttribute("type")==="application/json"}var ot=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(xr(t)&&t.classList.contains(fr))return t;return null}parse(t){if(t?.trim())try{return JSON.parse(t)}catch{return}}};var y=class extends tt{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 vt(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(Ee(r.endpoint,r.method,{...o.values,...this.ownRequest()},o.queryKeys??[]))};new ot(this),this.fetcher=new nt(this)}static{this.styles=[et]}static{this.endpoints=[]}willUpdate(e){if(e.has("data")&&this.data!=null){let r=ye(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:ge(this.constructor.endpoints,this);return e&&{endpoint:e.endpoint,method:this.method??e.method}}render(){return l`${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")?l`<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=[Xt(this),this.fontDeclarations(this.font)].filter(Boolean).join(";");if(e.length===0&&!r)return a;let o=(r?`:host{${r}}`:"")+e.map(s=>`[part~="${s}"],roxy-endpoint-form::part(${s}){display:none!important}`).join("");return l`<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()?l`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data):this.renderNoData()}renderInterpretation(e,r,o){return this.hideReadings?a:Te(e,r,this.t(o??"Reading"))}renderResult(e){let r=l`<div class="roxy-edit-bar" part="edit-bar"><button type="button" class="roxy-edit" @click="${this.onEdit}">${this.t("Edit query")}</button></div>${this.drawn(e)}`;return this.showAttribution()?l`${r}${this.renderAttribution()}`:r}renderWithForm(e){return l`${this.renderForm()}${e}`}stickyBody(){return this.loading?this.renderLoading():this.error!=null?this.issues?a:this.renderErrorBanner(this.error):this.data==null?a:this.showAttribution()?l`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data)}renderMore(){let e=this.listRows(),r=this.data?.total;return!this.lastRequest||!e||typeof r!="number"?a:e.length>=r?a:l`<div class="roxy-more" part="more"><button type="button" class="roxy-edit" ?disabled="${this.moreLoading}" aria-busy="${this.moreLoading?"true":"false"}" @click="${this.onMore}">${this.t("Show more")}</button> ${this.moreError?l`<p class="roxy-error" role="alert">${this.t(this.moreError)}</p>`:a}</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:zt(this)}}).then(()=>r.scrollIntoView?.({block:"nearest"}))}showAttribution(){return this.attribution!=null&&this.attribution!=="off"&&this.attribution!=="false"}renderAttribution(){return l`<div class="roxy-attribution" part="attribution"><a href="https://roxyapi.com/?utm_source=widget&utm_medium=embed" target="_blank" rel="noopener">${this.t("Spiritual data by RoxyAPI")}</a></div>`}renderNoData(){return this.selfFetch()?this.renderWithForm(a):this.renderEmpty()}renderForm(){let e=this.selfFetch();return l`<roxy-endpoint-form part="form" exportparts="hint" data-endpoint="${e?.endpoint??""}" method="${e?.method??"POST"}" spec-url="${_(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 l`<div class="roxy-empty" role="status" part="empty">${this.t("No data")}</div>`}renderLoading(){return l`<div class="roxy-skeleton" style="height:5lh" role="status" aria-label="${this.t("Loading")}" part="loading"></div>`}renderError(e){let r=!!this.selfFetch();if(r&&this.issues)return this.renderForm();let o=this.renderErrorBanner(e);return r?l`${o}${this.renderForm()}`:o}renderErrorBanner(e){return l`<div class="roxy-error" role="alert" part="error">${!this.fetcher.worded&&this.errorMessage||this.t(e)}</div>`}};m([g({attribute:false})],y.prototype,"data",2),m([g({type:String,attribute:"data-endpoint"})],y.prototype,"endpoint",2),m([g({type:String})],y.prototype,"method",2),m([g({type:String,attribute:"publishable-key"})],y.prototype,"publishableKey",2),m([g({type:String,attribute:"base-url"})],y.prototype,"baseUrl",2),m([g({type:String,attribute:"spec-url"})],y.prototype,"specUrl",2),m([g({type:String,attribute:"submit-url"})],y.prototype,"submitUrl",2),m([g({attribute:"submit-context",converter:Se})],y.prototype,"submitContext",2),m([g({type:String,attribute:"location-url"})],y.prototype,"locationUrl",2),m([g({type:Boolean})],y.prototype,"remember",2),m([g({type:Boolean,attribute:"hide-readings",reflect:true})],y.prototype,"hideReadings",2),m([g({type:String,attribute:"hide-sections",reflect:true})],y.prototype,"hideSections",2),m([g({type:String,attribute:"brand-color"})],y.prototype,"brandColor",2),m([g({type:String,attribute:"brand-accent"})],y.prototype,"brandAccent",2),m([g({type:String})],y.prototype,"font",2),m([g({type:String})],y.prototype,"hemisphere",2),m([g({type:String,attribute:"submit-label"})],y.prototype,"submitLabel",2),m([g({type:String,attribute:"error-message"})],y.prototype,"errorMessage",2),m([g({type:String})],y.prototype,"attribution",2),m([b()],y.prototype,"loading",2),m([b()],y.prototype,"error",2),m([b()],y.prototype,"issues",2),m([b()],y.prototype,"selfFetched",2),m([b()],y.prototype,"editing",2),m([b()],y.prototype,"sticky",2),m([b()],y.prototype,"openedRow",2),m([b()],y.prototype,"openedRowId",2),m([b()],y.prototype,"moreLoading",2),m([b()],y.prototype,"moreError",2);var ke=n=>t=>{customElements.get(n)||customElements.define(n,t)};var Ae=new Map;function br(n){if(!n)return["en"];let t=Ae.get(n);if(t)return[t,"en"];let e="en";try{e=Intl.getCanonicalLocales(n)[0]??"en"}catch{e="en"}return Ae.set(n,e),[e,"en"]}function St(n,t,e=1){return typeof t!="number"||!Number.isFinite(t)?"":t.toLocaleString(br(n),{maximumFractionDigits:e})}var vr={"kp-newcomb":"KP Newcomb","kp-old":"KP Old",lahiri:"Lahiri",raman:"B.V. Raman",custom:"Custom"};function Ce(n,t,e){let r=typeof t=="string"?vr[t]??ae(t):"",o=typeof e=="number"?`${St(n,e,2)}\xB0`:"";return r&&o?`${r} (${o})`:r||o}var _e=x`.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 Re(n,t,e){if(!t?.ayanamsa)return a;let r=Ce(n,t.ayanamsa);if(!r)return a;let o=typeof t.ayanamsaDegrees=="number"?St(n,t.ayanamsaDegrees,4):void 0;return l`<p class="roxy-frame">${o===void 0?e("Sidereal frame: {{frame}}",{frame:r}):e("Sidereal frame: {{frame}}, {{degrees}}\xB0 subtracted",{frame:r,degrees:o})}</p>`}function Fe(n){return n.suppressedBy||void 0}var wt=["classical","asraya","dala","akriti","sankhya"];function Oe(n){let t=wt.indexOf(n.family);return t===-1?wt.length:t}var Sr=[{id:"present",source:"Present",open:true,noteSource:"Every classical condition is satisfied by this chart."},{id:"outranked",source:"Outranked",open:true,noteSource:"The rule matched, but a stronger family silences it under the classical precedence norms. Each card names the family that took precedence."},{id:"absent",source:"Not present",open:false,noteSource:"At least one classical condition fails. Read the evidence for which."}],wr={Positive:"success",Negative:"danger",Both:"warning"},$=class extends y{constructor(){super(...arguments);this.filter="";this.handleInput=e=>{this.filter=e.target.value}}verdictOf(e){return e.present?"present":Fe(e)?"outranked":"absent"}renderVerdictGroup(e,r){if(!r.length)return a;let o=[...r].sort((s,i)=>Oe(s)-Oe(i));return l`<details class="group" part="section verdict" ?open="${e.open||!!this.filter}"><summary class="group-summary"><span class="group-label">${this.t(e.source)}</span> <span class="group-count">${r.length}</span></summary><p class="group-note">${this.t(e.noteSource)}</p><div class="detail-grid">${o.map(s=>this.renderDetectCard(s))}</div></details>`}renderQualityChip(e){return l`<span class="quality-chip roxy-chip quality-${e}" data-tone="${wr[e]??a}">${e}</span>`}renderFamilyChip(e){return e.family?l`<span class="family-chip roxy-chip" title="${this.t("Classical family")}">${X(e.family)}</span>`:a}renderDetailCard(e){return l`<div class="detail-card"><p class="detail-name">${e.name} ${e.quality?this.renderQualityChip(e.quality):a} ${this.renderFamilyChip(e)}</p>${e.description&&!this.hideReadings?l`<p class="description">${e.description}</p>`:a} ${this.renderEffects(e.result)}</div>`}renderEffects(e){return!e||this.hideReadings?a:l`<details part="reading"><summary>${this.t("Effects")}</summary><div class="result-body">${e}</div></details>`}renderDetectCard(e){let r=e.present?void 0:Fe(e),[o,s,i]=e.present?["is-present","Present","success"]:r?["is-outranked",`Outranked by ${X(r)}`,"warning"]:["is-absent","Not present",void 0];return l`<div class="detail-card ${e.present?"":r?"outranked":"absent"}"><p class="detail-name">${e.name} ${e.quality?this.renderQualityChip(e.quality):a} ${this.renderFamilyChip(e)} <span class="present-badge roxy-chip ${o}" data-tone="${i??a}">${s}</span></p>${e.description&&!this.hideReadings?l`<p class="description">${e.description}</p>`:a} ${e.present?this.renderEffects(e.result):a} ${e.evidence?l`<p class="evidence">${e.evidence}</p>`:a}</div>`}renderData(e){let r=this.filter.toLowerCase();if("description"in e&&typeof e.description=="string"){let o=e;return l`<div class="wrap" part="card">${this.renderDetailCard(o)}</div>`}if("yogas"in e&&Array.isArray(e.yogas)){let o=e.yogas;if(o.length>0&&"present"in o[0]){let p=o,h=r?p.filter(f=>f.name.toLowerCase().includes(r)):p,u=e.total??p.filter(f=>f.present).length;return l`<div class="wrap" part="card"><div class="head" part="header"><h2>${this.t("Detected yogas")}</h2><span class="count">${this.t("{{count}} of {{total}} present",{count:u,total:p.length})}</span></div>${Re(this.effectiveLang(),e.frame,this.translator)}<div class="search-wrap"><input class="search" type="search" placeholder="${this.t("Filter yogas...")}" aria-label="${this.t("Filter detected yogas by name")}" .value="${this.filter}" @input="${this.handleInput}"></div><div class="group-stack" part="section verdicts" role="region" aria-live="polite" aria-label="${this.t("Detected yogas")}">${h.length>0?Sr.map(f=>this.renderVerdictGroup(f,h.filter(v=>this.verdictOf(v)===f.id))):l`<p class="no-results">${this.t("No yogas match your search.")}</p>`}</div></div>`}if(o.length>0&&"description"in o[0]){let p=o,h=r?p.filter(f=>f.name.toLowerCase().includes(r)):p,u=e.total;return l`<div class="wrap" part="card"><div class="head" part="header"><h2>${this.t("Yoga catalog")}</h2>${u!==void 0?l`<span class="count">${this.t("{{count}} total",{count:u})}</span>`:a}</div><div class="search-wrap"><input class="search" type="search" placeholder="${this.t("Filter yogas...")}" aria-label="${this.t("Filter yoga list by name")}" .value="${this.filter}" @input="${this.handleInput}"></div><div class="detail-grid" part="section yogas" role="region" aria-live="polite" aria-label="${this.t("Yoga results")}">${h.length>0?h.map(f=>this.renderDetailCard(f)):l`<p class="no-results">${this.t("No yogas match your search.")}</p>`}</div></div>`}let i=o,c=r?i.filter(p=>p.name.toLowerCase().includes(r)):i,d=e.total;return l`<div class="wrap" part="card"><div class="head" part="header"><h2>${this.t("Yoga catalog")}</h2>${d!==void 0?l`<span class="count">${this.t("{{count}} total",{count:d})}</span>`:a}</div><div class="search-wrap"><input class="search" type="search" placeholder="${this.t("Filter yogas...")}" aria-label="${this.t("Filter yoga list by name")}" .value="${this.filter}" @input="${this.handleInput}"></div><div class="grid" part="section yogas" role="region" aria-live="polite" aria-label="${this.t("Yoga results")}">${c.length>0?c.map(p=>l`<div class="yoga-chip">${p.name}</div>`):l`<p class="no-results">${this.t("No yogas match your search.")}</p>`}</div></div>`}return l`<div class="roxy-empty" role="status">${this.t("No yoga data")}</div>`}};$.endpoints=jt,$.styles=[et,_e,x`.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}h2,p{margin:0}.count,.no-results{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.search{inline-size:100%;max-inline-size:32ch;font-size:var(--roxy-text-sm)}.search::placeholder{color:var(--roxy-muted)}.grid{gap:0 var(--roxy-space-md);grid-template-columns:repeat(auto-fill,minmax(min(100%,22ch),1fr));display:grid}.yoga-chip{padding-block:var(--roxy-space-xs);border-block-end:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);overflow-wrap:anywhere}.detail-card{gap:var(--roxy-space-sm);display:grid}.detail-grid>.detail-card+.detail-card{border-block-start:1px solid var(--roxy-border);padding-block-start:var(--roxy-space-sm)}.detail-name{align-items:center;gap:var(--roxy-space-sm);font-weight:var(--roxy-weight-bold);flex-wrap:wrap;display:flex}.wrap>.detail-card .detail-name{font-size:var(--roxy-text-lg)}.family-chip{color:var(--roxy-fg)}.quality-chip,.present-badge{font-weight:var(--roxy-weight-bold)}.detail-card.absent,.detail-card.outranked{color:var(--roxy-secondary)}.group-stack,.group,.detail-grid{gap:var(--roxy-space-sm);display:grid}.group-stack{gap:var(--roxy-space-md)}.group-summary{align-items:baseline;gap:var(--roxy-space-sm);color:var(--roxy-secondary);list-style:none;display:flex}.group-summary:before,.detail-card details>summary:before{content:"+";font-size:var(--roxy-text-base);line-height:1}.group-summary:before{color:var(--roxy-accent-ink)}.group[open]>.group-summary:before,.detail-card details[open]>summary:before{content:"-"}.group-label{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.group-count{font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums}.group-note,.evidence{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.description{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.detail-card details{font-size:var(--roxy-text-sm)}.detail-card details>summary{align-items:center;gap:var(--roxy-space-xs);padding-block:var(--roxy-space-xs);color:var(--roxy-accent-ink);list-style:none;display:flex}.result-body{color:var(--roxy-fg);padding-block-start:var(--roxy-space-xs)}`],m([b()],$.prototype,"filter",2),$=m([ke("roxy-yoga-list")],$);return De(Er)})();/*! Bundled license information:
|
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Pt=/'/g,Lt=/"/g,It=/^(?:script|style|textarea|title)$/i,yt=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),l=yt(1),_r=yt(2),Rr=yt(3),C=Symbol.for("lit-noChange"),a=Symbol.for("lit-nothing"),Ut=new WeakMap,k=A.createTreeWalker(A,129);function Gt(n,t){if(!mt(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return Rt!==void 0?Rt.createHTML(t):t}var Ve=(n,t)=>{let e=n.length-1,r=[],o,s=t===2?"<svg>":t===3?"<math>":"",i=N;for(let c=0;c<e;c++){let d=n[c],p,h,u=-1,f=0;for(;f<d.length&&(i.lastIndex=f,h=i.exec(d),h!==null);)f=i.lastIndex,i===N?h[1]==="!--"?i=Ft:h[1]!==void 0?i=Ot:h[2]!==void 0?(It.test(h[2])&&(o=RegExp("</"+h[2],"g")),i=T):h[3]!==void 0&&(i=T):i===T?h[0]===">"?(i=o??N,u=-1):h[1]===void 0?u=-2:(u=i.lastIndex-h[2].length,p=h[1],i=h[3]===void 0?T:h[3]==='"'?Lt:Pt):i===Lt||i===Pt?i=T:i===Ft||i===Ot?i=N:(i=T,o=void 0);let v=i===T&&n[c+1].startsWith("/>")?" ":"";s+=i===N?d+Ye:u>=0?(r.push(p),d.slice(0,u)+Nt+d.slice(u)+w+v):d+w+(u===-2?c:v)}return[Gt(n,s+(n[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},G=class n{constructor({strings:t,_$litType$:e},r){let o;this.parts=[];let s=0,i=0,c=t.length-1,d=this.parts,[p,h]=Ve(t,e);if(this.el=n.createElement(p,r),k.currentNode=this.el.content,e===2||e===3){let u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}for(;(o=k.nextNode())!==null&&d.length<c;){if(o.nodeType===1){if(o.hasAttributes())for(let u of o.getAttributeNames())if(u.endsWith(Nt)){let f=h[i++],v=o.getAttribute(u).split(w),j=/([.?@])?(.*)/.exec(f);d.push({type:1,index:s,name:j[2],strings:v,ctor:j[1]==="."?lt:j[1]==="?"?ct:j[1]==="@"?pt:F}),o.removeAttribute(u)}else u.startsWith(w)&&(d.push({type:6,index:s}),o.removeAttribute(u));if(It.test(o.tagName)){let u=o.textContent.split(w),f=u.length-1;if(f>0){o.textContent=q?q.emptyScript:"";for(let v=0;v<f;v++)o.append(u[v],D()),k.nextNode(),d.push({type:2,index:++s});o.append(u[f],D())}}}else if(o.nodeType===8)if(o.data===Dt)d.push({type:2,index:s});else{let u=-1;for(;(u=o.data.indexOf(w,u+1))!==-1;)d.push({type:7,index:s}),u+=w.length-1}s++}}static createElement(t,e){let r=A.createElement("template");return r.innerHTML=t,r}};function R(n,t,e=n,r){if(t===C)return t;let o=r!==void 0?e._$Co?.[r]: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(n),o._$AT(n,e,r)),r!==void 0?(e._$Co??=[])[r]=o:e._$Cl=o),o!==void 0&&(t=R(n,o._$AS(n,t.values),o,r)),t}var dt=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??A).importNode(e,true);k.currentNode=o;let s=k.nextNode(),i=0,c=0,d=r[0];for(;d!==void 0;){if(i===d.index){let p;d.type===2?p=new M(s,s.nextSibling,this,t):d.type===1?p=new d.ctor(s,d.name,d.strings,this,t):d.type===6&&(p=new ht(s,this,t)),this._$AV.push(p),d=r[++c]}i!==d?.index&&(s=k.nextNode(),i++)}return k.currentNode=A,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++}},M=class n{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,r,o){this.type=2,this._$AH=a,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=R(this,t,e),I(t)?t===a||t==null||t===""?(this._$AH!==a&&this._$AR(),this._$AH=a):t!==this._$AH&&t!==C&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):qe(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!==a&&I(this._$AH)?this._$AA.nextSibling.data=t:this.T(A.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=G.createElement(Gt(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===o)this._$AH.p(e);else{let s=new dt(o,this),i=s.u(this.options);s.p(e),this.T(i),this._$AH=s}}_$AC(t){let e=Ut.get(t.strings);return e===void 0&&Ut.set(t.strings,e=new G(t)),e}k(t){mt(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(D()),this.O(D()),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=_t(t).nextSibling;_t(t).remove(),t=r}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},F=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,o,s){this.type=1,this._$AH=a,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=a}_$AI(t,e=this,r,o){let s=this.strings,i=false;if(s===void 0)t=R(this,t,e,0),i=!I(t)||t!==this._$AH&&t!==C,i&&(this._$AH=t);else{let c=t,d,p;for(t=s[0],d=0;d<s.length-1;d++)p=R(this,c[r+d],e,d),p===C&&(p=this._$AH[d]),i||=!I(p)||p!==this._$AH[d],p===a?t=a:t!==a&&(t+=(p??"")+s[d+1]),this._$AH[d]=p}i&&!o&&this.j(t)}j(t){t===a?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},lt=class extends F{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===a?void 0:t}},ct=class extends F{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==a)}},pt=class extends F{constructor(t,e,r,o,s){super(t,e,r,o,s),this.type=5}_$AI(t,e=this){if((t=R(this,t,e,0)??a)===C)return;let r=this._$AH,o=t===a&&r!==a||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,s=t!==a&&(r===a||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)}},ht=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){R(this,t)}};var We=ut.litHtmlPolyfillSupport;We?.(G,M),(ut.litHtmlVersions??=[]).push("3.3.3");var Mt=(n,t,e)=>{let r=e?.renderBefore??t,o=r._$litPart$;if(o===void 0){let s=e?.renderBefore??null;r._$litPart$=o=new M(t.insertBefore(D(),s),s,void 0,e??{})}return o._$AI(n),o};var gt=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=Mt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false)}render(){return C}};E._$litElement$=true,E.finalized=true,gt.litElementHydrateSupport?.({LitElement:E});var Ze=gt.litElementPolyfillSupport;Ze?.({LitElement:E});(gt.litElementVersions??=[]).push("4.2.2");var Je={attribute:true,type:String,converter:U,reflect:false,hasChanged:Y},Xe=(n=Je,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(c){let d=t.get.call(this);t.set.call(this,c),this.requestUpdate(i,d,n,true,c)},init(c){return c!==void 0&&this.C(i,void 0,n,c),c}}}if(r==="setter"){let{name:i}=e;return function(c){let d=this[i];t.call(this,c),this.requestUpdate(i,d,n,true,c)}}throw Error("Unsupported decorator location: "+r)};function g(n){return(t,e)=>typeof e=="object"?Xe(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 b(n){return g({...n,state:true,attribute:false})}var jt=[{endpoint:"vedic-astrology/yoga",method:"GET"},{endpoint:"vedic-astrology/yoga/detect",method:"POST"},{endpoint:"vedic-astrology/yoga/{id}",method:"GET"}];var _=n=>n??a;var Ht=["de","en","es","fr","hi","pt","ru","tr","zh-Hans","zh-Hant"];function xt(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 Qe={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 zt(n,t=Ht){let e=xt(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(c=>c==="hans"||c==="hant")??Qe[o[1]??""];return i?ft(`zh-${i}`,t):void 0}return ft(s,t)}var Yt="symbols";var tr={Fraunces:["latin","latin-ext"],Jost:["latin","latin-ext","cyrillic"],Geist:["latin","latin-ext","cyrillic"]},bt='"Jost", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Bt='"Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Kt='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',W={"fraunces-jost":{name:"Fraunces with Jost",sans:bt,display:'"Fraunces", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif'},jost:{name:"Jost",sans:bt,display:bt},geist:{name:"Geist",sans:Bt,display:Bt},system:{name:"System",sans:Kt,display:Kt}};function qt(n){let{sans:t,display:e}=W[n];return Object.keys(tr).filter(r=>`${t} ${e}`.includes(`"${r}"`))}var Vt="1.6.0";var er=/^(.*)\/cdn\/(?:roxy-ui|components\/[\w-]+)\.js$/,rr=/^(.*\/dist)\/(?:index|components\/[\w-]+)\.js$/;function Wt(n,t){if(!t)return;let e=new URL(t);if(e.protocol!=="https:"&&e.protocol!=="http:")return;let r=(er.exec(e.pathname)??rr.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 ir={},nr="color-mix(in oklab, var(--roxy-accent) 70%, black)",or="var(--roxy-accent)",sr="color-mix(in srgb, var(--roxy-accent) 40%, transparent)",Zt=/^#(?:[\da-f]{3}|[\da-f]{6})$/i;function Jt(n){return n!==void 0&&Object.hasOwn(W,n)}function Xt(n){let t=[];return n.brandColor&&Zt.test(n.brandColor)&&t.push(`--roxy-primary:${n.brandColor}`),n.brandAccent&&Zt.test(n.brandAccent)&&t.push(`--roxy-accent:${n.brandAccent}`,`--roxy-accent-ink:light-dark(${nr},${or})`,`--roxy-ring:${sr}`),t.join(";")}function Qt(n,t){if(Jt(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,c,d;try{let p=globalThis.getComputedStyle(n),h=u=>p.getPropertyValue(u).trim();i=h("--roxy-font-sans"),c=h("--roxy-font-display"),d=h("--roxy-font")}finally{s?.sheet&&(s.sheet.disabled=false)}if(!(i||c))return Jt(d)?d:void 0}function te(n){let{sans:t,display:e}=W[n];return`--roxy-font:${n};--roxy-font-sans:${t};--roxy-font-display:${e}`}var ee=Wt(Vt,globalThis.document?.currentScript?.src||ir.url);function re(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 ne(n,t=ee){qt(n).length>0&&re(n,t)}function oe(n=ee){re(Yt,n)}var se='@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=se,document.head.prepend(t),t}function ie(n){return n.toLowerCase().replace(/[\s_-]+/g," ").trim()}function X(n){return n?n.charAt(0).toUpperCase()+n.slice(1).toLowerCase():""}function ae(n){return n.replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([a-z])([0-9])/g,"$1 $2").replace(/^\w/,t=>t.toUpperCase())}var de="__ROXY_UI_I18N__";function le(){let n=globalThis,t=n[de];if(t)return t;let e={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return n[de]=e,e}function ar(n,t){return t?n.replace(/\{\{(\w+)\}\}/g,(e,r)=>r in t?String(t[r]??""):e):n}function ce(n,t,e){return ar(dr(n,t)??t,e)}function dr(n,t){if(!n)return;let{catalogs:e}=le(),r=n.toLowerCase();return(e[r]??e[r.split("-")[0]])?.[ie(t)]}function pe(n){let{listeners:t}=le();return t.add(n),()=>{t.delete(n)}}var Q=class{constructor(t){this.host=t,t.addController(this)}hostConnected(){this.unsubscribe=pe(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var tt=class extends E{constructor(){super();this.translator=(e,r)=>this.t(e,r);new Q(this)}connectedCallback(){super.connectedCallback(),J()}updated(e){super.updated(e),this.renderRoot.querySelector(".roxy-glyph")&&oe()}fontDeclarations(e){let r=Qt(this,e);return r?(ne(r),te(r)):""}renderFontStyle(){let e=this.fontDeclarations();return e?l`<style>:host{${e}}</style>`:a}t(e,r){return ce(this.effectiveLang(),e,r)}effectiveLang(){return xt(this)}};var he=x`:where(.roxy-glyph){font-family:var(--roxy-font-symbol)}`;function ue(n){return n?l`<span class="roxy-glyph" aria-hidden="true">${n}</span>`:a}var me=x`: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 lr=x`: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}`,et=[lr,me,he];var cr="__cols",pr="__rows";function hr(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function rt(n){if(Array.isArray(n)){let s=false,i=n.map(c=>{let d=rt(c);return d!==c&&(s=true),d});return s?i:n}if(!hr(n))return n;let t=n[cr],e=n[pr];if(Array.isArray(t)&&Array.isArray(e)&&Object.keys(n).length===2)return e.map(s=>{let i={};return t.forEach((c,d)=>{i[c]=rt(s[d])}),i});let r=false,o={};for(let[s,i]of Object.entries(n)){let c=rt(i);c!==i&&(r=true),o[s]=c}return r?o:n}function ye(n){return rt(n)}function ge(n,t){return n.find(e=>e.attrs&&Object.entries(e.attrs).every(([r,o])=>t[r]===o))??n[0]}var ur="pk_live_YOUR_KEY",fe={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 xe(n){if(n)return n===ur?fe.sample:n.startsWith("pk_")?void 0:fe.secret}function be(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 ve="https://roxyapi.com/api/v2";async function mr(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 Se={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.")}}},O=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 we(n){return n.submitUrl?void 0:xe(n.publishableKey)}async function vt(n,t,e){let r=we(n);if(r)throw new O(r.message);let o=n.submitUrl?await fetch(n.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:yr(t,n.submitContext),signal:e}):await gr(n,t,e);if(!o.ok){let s=await mr(o);throw new O(s.message,s.issues,s.worded,o.status,s.code)}return await o.json()}function yr(n,t){return JSON.stringify(t?{...n,context:t}:n)}function gr(n,t,e){let r=new URL(`${n.baseUrl??ve}${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 nt=class{constructor(t){this.baseUrl=ve;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=we(this);if(e){this.host.error=e.message,be(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 vt(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 O&&(this.host.issues=o.issues,this.failure={status:o.status,code:o.code}),this.worded=o instanceof O&&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 Ee(n,t,e,r=[]){let o={...e},s=`/${n.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(p,h)=>{let u=o[h];return delete o[h],encodeURIComponent(String(u??""))}),i=new Set(r),c={},d={};for(let[p,h]of Object.entries(o))h===void 0||h===""||(t==="GET"||i.has(p)?c[p]=h:d[p]=h);return{path:s,method:t,query:c,body:t==="POST"?d:void 0}}function $e(){return l`<svg class="roxy-chevron" viewBox="0 0 16 16" width="14" height="14" aria-hidden="true"><path d="M4 6l4 4 4-4" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>`}var ao=x`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 uo=x`.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 Te(n,t,e){let r=n.filter(o=>!!o.body);return r.length===0?a:l`<section class="block" part="section readings"><h3>${e}</h3>${r.map((o,s)=>l`<details class="interp-card" part="reading" name="${t}" ?open="${s===0}"><summary><span class="interp-lead">${ue(o.glyph)} ${o.label}</span> ${$e()} ${o.aside?l`<span class="interp-aside"><small>${o.aside}</small></span>`:a}</summary><div class="interp-body"><p>${o.body}</p>${o.extra??a}</div></details>`)}</section>`}var fr="roxy-data";function xr(n){return n.nodeName==="SCRIPT"&&n.getAttribute("type")==="application/json"}var ot=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(xr(t)&&t.classList.contains(fr))return t;return null}parse(t){if(t?.trim())try{return JSON.parse(t)}catch{return}}};var y=class extends tt{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 vt(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(Ee(r.endpoint,r.method,{...o.values,...this.ownRequest()},o.queryKeys??[]))};new ot(this),this.fetcher=new nt(this)}static{this.styles=[et]}static{this.endpoints=[]}willUpdate(e){if(e.has("data")&&this.data!=null){let r=ye(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:ge(this.constructor.endpoints,this);return e&&{endpoint:e.endpoint,method:this.method??e.method}}render(){return l`${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")?l`<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=[Xt(this),this.fontDeclarations(this.font)].filter(Boolean).join(";");if(e.length===0&&!r)return a;let o=(r?`:host{${r}}`:"")+e.map(s=>`[part~="${s}"],roxy-endpoint-form::part(${s}){display:none!important}`).join("");return l`<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()?l`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data):this.renderNoData()}renderInterpretation(e,r,o){return this.hideReadings?a:Te(e,r,this.t(o??"Reading"))}renderResult(e){let r=l`<div class="roxy-edit-bar" part="edit-bar"><button type="button" class="roxy-edit" @click="${this.onEdit}">${this.t("Edit query")}</button></div>${this.drawn(e)}`;return this.showAttribution()?l`${r}${this.renderAttribution()}`:r}renderWithForm(e){return l`${this.renderForm()}${e}`}stickyBody(){return this.loading?this.renderLoading():this.error!=null?this.issues?a:this.renderErrorBanner(this.error):this.data==null?a:this.showAttribution()?l`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data)}renderMore(){let e=this.listRows(),r=this.data?.total;return!this.lastRequest||!e||typeof r!="number"?a:e.length>=r?a:l`<div class="roxy-more" part="more"><button type="button" class="roxy-edit" ?disabled="${this.moreLoading}" aria-busy="${this.moreLoading?"true":"false"}" @click="${this.onMore}">${this.t("Show more")}</button> ${this.moreError?l`<p class="roxy-error" role="alert">${this.t(this.moreError)}</p>`:a}</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:zt(this)}}).then(()=>r.scrollIntoView?.({block:"nearest"}))}showAttribution(){return this.attribution!=null&&this.attribution!=="off"&&this.attribution!=="false"}renderAttribution(){return l`<div class="roxy-attribution" part="attribution"><a href="https://roxyapi.com/?utm_source=widget&utm_medium=embed" target="_blank" rel="noopener">${this.t("Spiritual data by RoxyAPI")}</a></div>`}renderNoData(){return this.selfFetch()?this.renderWithForm(a):this.renderEmpty()}renderForm(){let e=this.selfFetch();return l`<roxy-endpoint-form part="form" exportparts="hint" data-endpoint="${e?.endpoint??""}" method="${e?.method??"POST"}" spec-url="${_(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 l`<div class="roxy-empty" role="status" part="empty">${this.t("No data")}</div>`}renderLoading(){return l`<div class="roxy-skeleton" style="height:5lh" role="status" aria-label="${this.t("Loading")}" part="loading"></div>`}renderError(e){let r=!!this.selfFetch();if(r&&this.issues)return this.renderForm();let o=this.renderErrorBanner(e);return r?l`${o}${this.renderForm()}`:o}renderErrorBanner(e){return l`<div class="roxy-error" role="alert" part="error">${!this.fetcher.worded&&this.errorMessage||this.t(e)}</div>`}};m([g({attribute:false})],y.prototype,"data",2),m([g({type:String,attribute:"data-endpoint"})],y.prototype,"endpoint",2),m([g({type:String})],y.prototype,"method",2),m([g({type:String,attribute:"publishable-key"})],y.prototype,"publishableKey",2),m([g({type:String,attribute:"base-url"})],y.prototype,"baseUrl",2),m([g({type:String,attribute:"spec-url"})],y.prototype,"specUrl",2),m([g({type:String,attribute:"submit-url"})],y.prototype,"submitUrl",2),m([g({attribute:"submit-context",converter:Se})],y.prototype,"submitContext",2),m([g({type:String,attribute:"location-url"})],y.prototype,"locationUrl",2),m([g({type:Boolean})],y.prototype,"remember",2),m([g({type:Boolean,attribute:"hide-readings",reflect:true})],y.prototype,"hideReadings",2),m([g({type:String,attribute:"hide-sections",reflect:true})],y.prototype,"hideSections",2),m([g({type:String,attribute:"brand-color"})],y.prototype,"brandColor",2),m([g({type:String,attribute:"brand-accent"})],y.prototype,"brandAccent",2),m([g({type:String})],y.prototype,"font",2),m([g({type:String})],y.prototype,"hemisphere",2),m([g({type:String,attribute:"submit-label"})],y.prototype,"submitLabel",2),m([g({type:String,attribute:"error-message"})],y.prototype,"errorMessage",2),m([g({type:String})],y.prototype,"attribution",2),m([b()],y.prototype,"loading",2),m([b()],y.prototype,"error",2),m([b()],y.prototype,"issues",2),m([b()],y.prototype,"selfFetched",2),m([b()],y.prototype,"editing",2),m([b()],y.prototype,"sticky",2),m([b()],y.prototype,"openedRow",2),m([b()],y.prototype,"openedRowId",2),m([b()],y.prototype,"moreLoading",2),m([b()],y.prototype,"moreError",2);var ke=n=>t=>{customElements.get(n)||customElements.define(n,t)};var Ae=new Map;function br(n){if(!n)return["en"];let t=Ae.get(n);if(t)return[t,"en"];let e="en";try{e=Intl.getCanonicalLocales(n)[0]??"en"}catch{e="en"}return Ae.set(n,e),[e,"en"]}function St(n,t,e=1){return typeof t!="number"||!Number.isFinite(t)?"":t.toLocaleString(br(n),{maximumFractionDigits:e})}var vr={"kp-newcomb":"KP Newcomb","kp-old":"KP Old",lahiri:"Lahiri",raman:"B.V. Raman",custom:"Custom"};function Ce(n,t,e){let r=typeof t=="string"?vr[t]??ae(t):"",o=typeof e=="number"?`${St(n,e,2)}\xB0`:"";return r&&o?`${r} (${o})`:r||o}var _e=x`.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 Re(n,t,e){if(!t?.ayanamsa)return a;let r=Ce(n,t.ayanamsa);if(!r)return a;let o=typeof t.ayanamsaDegrees=="number"?St(n,t.ayanamsaDegrees,4):void 0;return l`<p class="roxy-frame">${o===void 0?e("Sidereal frame: {{frame}}",{frame:r}):e("Sidereal frame: {{frame}}, {{degrees}}\xB0 subtracted",{frame:r,degrees:o})}</p>`}function Fe(n){return n.suppressedBy||void 0}var wt=["classical","asraya","dala","akriti","sankhya"];function Oe(n){let t=wt.indexOf(n.family);return t===-1?wt.length:t}var Sr=[{id:"present",source:"Present",open:true,noteSource:"Every classical condition is satisfied by this chart."},{id:"outranked",source:"Outranked",open:true,noteSource:"The rule matched, but a stronger family silences it under the classical precedence norms. Each card names the family that took precedence."},{id:"absent",source:"Not present",open:false,noteSource:"At least one classical condition fails. Read the evidence for which."}],wr={Positive:"success",Negative:"danger",Both:"warning"},$=class extends y{constructor(){super(...arguments);this.filter="";this.handleInput=e=>{this.filter=e.target.value}}verdictOf(e){return e.present?"present":Fe(e)?"outranked":"absent"}renderVerdictGroup(e,r){if(!r.length)return a;let o=[...r].sort((s,i)=>Oe(s)-Oe(i));return l`<details class="group" part="section verdict" ?open="${e.open||!!this.filter}"><summary class="group-summary"><span class="group-label">${this.t(e.source)}</span> <span class="group-count">${r.length}</span></summary><p class="group-note">${this.t(e.noteSource)}</p><div class="detail-grid">${o.map(s=>this.renderDetectCard(s))}</div></details>`}renderQualityChip(e){return l`<span class="quality-chip roxy-chip quality-${e}" data-tone="${wr[e]??a}">${e}</span>`}renderFamilyChip(e){return e.family?l`<span class="family-chip roxy-chip" title="${this.t("Classical family")}">${X(e.family)}</span>`:a}renderDetailCard(e){return l`<div class="detail-card"><p class="detail-name">${e.name} ${e.quality?this.renderQualityChip(e.quality):a} ${this.renderFamilyChip(e)}</p>${e.description&&!this.hideReadings?l`<p class="description">${e.description}</p>`:a} ${this.renderEffects(e.result)}</div>`}renderEffects(e){return!e||this.hideReadings?a:l`<details part="reading"><summary>${this.t("Effects")}</summary><div class="result-body">${e}</div></details>`}renderDetectCard(e){let r=e.present?void 0:Fe(e),[o,s,i]=e.present?["is-present","Present","success"]:r?["is-outranked",`Outranked by ${X(r)}`,"warning"]:["is-absent","Not present",void 0];return l`<div class="detail-card ${e.present?"":r?"outranked":"absent"}"><p class="detail-name">${e.name} ${e.quality?this.renderQualityChip(e.quality):a} ${this.renderFamilyChip(e)} <span class="present-badge roxy-chip ${o}" data-tone="${i??a}">${s}</span></p>${e.description&&!this.hideReadings?l`<p class="description">${e.description}</p>`:a} ${e.present?this.renderEffects(e.result):a} ${e.evidence?l`<p class="evidence">${e.evidence}</p>`:a}</div>`}renderData(e){let r=this.filter.toLowerCase();if("description"in e&&typeof e.description=="string"){let o=e;return l`<div class="wrap" part="card">${this.renderDetailCard(o)}</div>`}if("yogas"in e&&Array.isArray(e.yogas)){let o=e.yogas;if(o.length>0&&"present"in o[0]){let p=o,h=r?p.filter(f=>f.name.toLowerCase().includes(r)):p,u=e.total??p.filter(f=>f.present).length;return l`<div class="wrap" part="card"><div class="head" part="header"><h2>${this.t("Detected yogas")}</h2><span class="count">${this.t("{{count}} of {{total}} present",{count:u,total:p.length})}</span></div>${Re(this.effectiveLang(),e.frame,this.translator)}<div class="search-wrap"><input class="search" type="search" placeholder="${this.t("Filter yogas...")}" aria-label="${this.t("Filter detected yogas by name")}" .value="${this.filter}" @input="${this.handleInput}"></div><div class="group-stack" part="section verdicts" role="region" aria-live="polite" aria-label="${this.t("Detected yogas")}">${h.length>0?Sr.map(f=>this.renderVerdictGroup(f,h.filter(v=>this.verdictOf(v)===f.id))):l`<p class="no-results">${this.t("No yogas match your search.")}</p>`}</div></div>`}if(o.length>0&&"description"in o[0]){let p=o,h=r?p.filter(f=>f.name.toLowerCase().includes(r)):p,u=e.total;return l`<div class="wrap" part="card"><div class="head" part="header"><h2>${this.t("Yoga catalog")}</h2>${u!==void 0?l`<span class="count">${this.t("{{count}} total",{count:u})}</span>`:a}</div><div class="search-wrap"><input class="search" type="search" placeholder="${this.t("Filter yogas...")}" aria-label="${this.t("Filter yoga list by name")}" .value="${this.filter}" @input="${this.handleInput}"></div><div class="detail-grid" part="section yogas" role="region" aria-live="polite" aria-label="${this.t("Yoga results")}">${h.length>0?h.map(f=>this.renderDetailCard(f)):l`<p class="no-results">${this.t("No yogas match your search.")}</p>`}</div></div>`}let i=o,c=r?i.filter(p=>p.name.toLowerCase().includes(r)):i,d=e.total;return l`<div class="wrap" part="card"><div class="head" part="header"><h2>${this.t("Yoga catalog")}</h2>${d!==void 0?l`<span class="count">${this.t("{{count}} total",{count:d})}</span>`:a}</div><div class="search-wrap"><input class="search" type="search" placeholder="${this.t("Filter yogas...")}" aria-label="${this.t("Filter yoga list by name")}" .value="${this.filter}" @input="${this.handleInput}"></div><div class="grid" part="section yogas" role="region" aria-live="polite" aria-label="${this.t("Yoga results")}">${c.length>0?c.map(p=>l`<div class="yoga-chip">${p.name}</div>`):l`<p class="no-results">${this.t("No yogas match your search.")}</p>`}</div></div>`}return l`<div class="roxy-empty" role="status">${this.t("No yoga data")}</div>`}};$.endpoints=jt,$.styles=[et,_e,x`.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}h2,p{margin:0}.count,.no-results{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.search{inline-size:100%;max-inline-size:32ch;font-size:var(--roxy-text-sm)}.search::placeholder{color:var(--roxy-muted)}.grid{gap:0 var(--roxy-space-md);grid-template-columns:repeat(auto-fill,minmax(min(100%,22ch),1fr));display:grid}.yoga-chip{padding-block:var(--roxy-space-xs);border-block-end:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);overflow-wrap:anywhere}.detail-card{gap:var(--roxy-space-sm);display:grid}.detail-grid>.detail-card+.detail-card{border-block-start:1px solid var(--roxy-border);padding-block-start:var(--roxy-space-sm)}.detail-name{align-items:center;gap:var(--roxy-space-sm);font-weight:var(--roxy-weight-bold);flex-wrap:wrap;display:flex}.wrap>.detail-card .detail-name{font-size:var(--roxy-text-lg)}.family-chip{color:var(--roxy-fg)}.quality-chip,.present-badge{font-weight:var(--roxy-weight-bold)}.detail-card.absent,.detail-card.outranked{color:var(--roxy-secondary)}.group-stack,.group,.detail-grid{gap:var(--roxy-space-sm);display:grid}.group-stack{gap:var(--roxy-space-md)}.group-summary{align-items:baseline;gap:var(--roxy-space-sm);color:var(--roxy-secondary);list-style:none;display:flex}.group-summary:before,.detail-card details>summary:before{content:"+";font-size:var(--roxy-text-base);line-height:1}.group-summary:before{color:var(--roxy-accent-ink)}.group[open]>.group-summary:before,.detail-card details[open]>summary:before{content:"-"}.group-label{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.group-count{font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums}.group-note,.evidence{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.description{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.detail-card details{font-size:var(--roxy-text-sm)}.detail-card details>summary{align-items:center;gap:var(--roxy-space-xs);padding-block:var(--roxy-space-xs);color:var(--roxy-accent-ink);list-style:none;display:flex}.result-body{color:var(--roxy-fg);padding-block-start:var(--roxy-space-xs)}`],m([b()],$.prototype,"filter",2),$=m([ke("roxy-yoga-list")],$);return De(Er)})();/*! Bundled license information:
|
|
4
4
|
|
|
5
5
|
@lit/reactive-element/css-tag.js:
|
|
6
6
|
(**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var RoxyUI_zodiac_card=(()=>{var K=Object.defineProperty;var Tt=Object.getOwnPropertyDescriptor;var De=Object.getOwnPropertyNames;var ze=Object.prototype.hasOwnProperty;var Ie=(n,t)=>{for(var e in t)K(n,e,{get:t[e],enumerable:true})},Me=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of De(t))!ze.call(n,o)&&o!==e&&K(n,o,{get:()=>t[o],enumerable:!(r=Tt(t,o))||r.enumerable});return n};var Ge=n=>Me(K({},"__esModule",{value:true}),n),p=(n,t,e,r)=>{for(var o=r>1?void 0:r?Tt(t,e):t,i=n.length-1,s;i>=0;i--)(s=n[i])&&(o=(r?s(t,e,o):s(o))||o);return r&&o&&K(t,e,o),o};var Pr={};Ie(Pr,{ROXY_UI_TOKENS_STYLE_ID:()=>J,RoxyZodiacCard:()=>T,injectRoxyTokens:()=>X});var H=globalThis,B=H.ShadowRoot&&(H.ShadyCSS===void 0||H.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,dt=Symbol(),kt=new WeakMap,L=class{constructor(t,e,r){if(this._$cssResult$=true,r!==dt)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(B&&t===void 0){let r=e!==void 0&&e.length===1;r&&(t=kt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&kt.set(e,t))}return t}toString(){return this.cssText}},At=n=>new L(typeof n=="string"?n:n+"",void 0,dt),g=(n,...t)=>{let e=n.length===1?n[0]:t.reduce((r,o,i)=>r+(s=>{if(s._$cssResult$===true)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+n[i+1],n[0]);return new L(e,n,dt)},_t=(n,t)=>{if(B)n.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let r=document.createElement("style"),o=H.litNonce;o!==void 0&&r.setAttribute("nonce",o),r.textContent=e.cssText,n.appendChild(r)}},lt=B?n=>n:n=>n instanceof CSSStyleSheet?(t=>{let e="";for(let r of t.cssRules)e+=r.cssText;return At(e)})(n):n;var{is:je,defineProperty:Ke,getOwnPropertyDescriptor:He,getOwnPropertyNames:Be,getOwnPropertySymbols:qe,getPrototypeOf:Ye}=Object,q=globalThis,Ct=q.trustedTypes,Ze=Ct?Ct.emptyScript:"",Ve=q.reactiveElementPolyfillSupport,U=(n,t)=>n,N={toAttribute(n,t){switch(t){case Boolean:n=n?Ze: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}},Y=(n,t)=>!je(n,t),Rt={attribute:true,type:String,converter:N,reflect:false,useDefault:false,hasChanged:Y};Symbol.metadata??=Symbol("metadata"),q.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=Rt){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&&Ke(this.prototype,t,o)}}static getPropertyDescriptor(t,e,r){let{get:o,set:i}=He(this.prototype,t)??{get(){return this[e]},set(s){this[e]=s}};return{get:o,set(s){let l=o?.call(this);i?.call(this,s),this.requestUpdate(t,l,r)},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??Rt}static _$Ei(){if(this.hasOwnProperty(U("elementProperties")))return;let t=Ye(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=[...Be(e),...qe(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(lt(o))}else t!==void 0&&e.push(lt(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 _t(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 i=(r.converter?.toAttribute!==void 0?r.converter:N).toAttribute(e,r.type);this._$Em=t,i==null?this.removeAttribute(o):this.setAttribute(o,i),this._$Em=null}}_$AK(t,e){let r=this.constructor,o=r._$Eh.get(t);if(o!==void 0&&this._$Em!==o){let i=r.getPropertyOptions(o),s=typeof i.converter=="function"?{fromAttribute:i.converter}:i.converter?.fromAttribute!==void 0?i.converter:N;this._$Em=o;let l=s.fromAttribute(e,i.type);this[o]=l??this._$Ej?.get(o)??l,this._$Em=null}}requestUpdate(t,e,r,o=false,i){if(t!==void 0){let s=this.constructor;if(o===false&&(i=this[t]),r??=s.getPropertyOptions(t),!((r.hasChanged??Y)(i,e)||r.useDefault&&r.reflect&&i===this._$Ej?.get(t)&&!this.hasAttribute(s._$Eu(t,r))))return;this.C(t,e,r)}this.isUpdatePending===false&&(this._$ES=this._$EP())}C(t,e,{useDefault:r,reflect:o,wrapped:i},s){r&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,s??e??this[t]),i!==true||s!==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,i]of this._$Ep)this[o]=i;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[o,i]of r){let{wrapped:s}=i,l=this[o];s!==true||this._$AL.has(o)||l===void 0||this.C(o,void 0,i,l)}}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){}};S.elementStyles=[],S.shadowRootOptions={mode:"open"},S[U("elementProperties")]=new Map,S[U("finalized")]=new Map,Ve?.({ReactiveElement:S}),(q.reactiveElementVersions??=[]).push("2.1.2");var ft=globalThis,Pt=n=>n,Z=ft.trustedTypes,Ft=Z?Z.createPolicy("lit-html",{createHTML:n=>n}):void 0,zt="$lit$",w=`lit$${Math.random().toFixed(9).slice(2)}$`,It="?"+w,We=`<${It}>`,_=document,z=()=>_.createComment(""),I=n=>n===null||typeof n!="object"&&typeof n!="function",gt=Array.isArray,Je=n=>gt(n)||typeof n?.[Symbol.iterator]=="function",ct=`[
|
|
2
2
|
\f\r]`,D=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ot=/-->/g,Lt=/>/g,k=RegExp(`>|${ct}(?:([^\\s"'>=/]+)(${ct}*=${ct}*(?:[^
|
|
3
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ut=/'/g,Nt=/"/g,Mt=/^(?:script|style|textarea|title)$/i,xt=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),d=xt(1),Dr=xt(2),zr=xt(3),C=Symbol.for("lit-noChange"),a=Symbol.for("lit-nothing"),Dt=new WeakMap,A=_.createTreeWalker(_,129);function Gt(n,t){if(!gt(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ft!==void 0?Ft.createHTML(t):t}var Xe=(n,t)=>{let e=n.length-1,r=[],o,i=t===2?"<svg>":t===3?"<math>":"",s=D;for(let l=0;l<e;l++){let c=n[l],u,m,y=-1,v=0;for(;v<c.length&&(s.lastIndex=v,m=s.exec(c),m!==null);)v=s.lastIndex,s===D?m[1]==="!--"?s=Ot:m[1]!==void 0?s=Lt:m[2]!==void 0?(Mt.test(m[2])&&(o=RegExp("</"+m[2],"g")),s=k):m[3]!==void 0&&(s=k):s===k?m[0]===">"?(s=o??D,y=-1):m[1]===void 0?y=-2:(y=s.lastIndex-m[2].length,u=m[1],s=m[3]===void 0?k:m[3]==='"'?Nt:Ut):s===Nt||s===Ut?s=k:s===Ot||s===Lt?s=D:(s=k,o=void 0);let $=s===k&&n[l+1].startsWith("/>")?" ":"";i+=s===D?c+We:y>=0?(r.push(u),c.slice(0,y)+zt+c.slice(y)+w+$):c+w+(y===-2?l:$)}return[Gt(n,i+(n[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},M=class n{constructor({strings:t,_$litType$:e},r){let o;this.parts=[];let i=0,s=0,l=t.length-1,c=this.parts,[u,m]=Xe(t,e);if(this.el=n.createElement(u,r),A.currentNode=this.el.content,e===2||e===3){let y=this.el.content.firstChild;y.replaceWith(...y.childNodes)}for(;(o=A.nextNode())!==null&&c.length<l;){if(o.nodeType===1){if(o.hasAttributes())for(let y of o.getAttributeNames())if(y.endsWith(zt)){let v=m[s++],$=o.getAttribute(y).split(w),j=/([.?@])?(.*)/.exec(v);c.push({type:1,index:i,name:j[2],strings:$,ctor:j[1]==="."?ht:j[1]==="?"?ut:j[1]==="@"?mt:F}),o.removeAttribute(y)}else y.startsWith(w)&&(c.push({type:6,index:i}),o.removeAttribute(y));if(Mt.test(o.tagName)){let y=o.textContent.split(w),v=y.length-1;if(v>0){o.textContent=Z?Z.emptyScript:"";for(let $=0;$<v;$++)o.append(y[$],z()),A.nextNode(),c.push({type:2,index:++i});o.append(y[v],z())}}}else if(o.nodeType===8)if(o.data===It)c.push({type:2,index:i});else{let y=-1;for(;(y=o.data.indexOf(w,y+1))!==-1;)c.push({type:7,index:i}),y+=w.length-1}i++}}static createElement(t,e){let r=_.createElement("template");return r.innerHTML=t,r}};function P(n,t,e=n,r){if(t===C)return t;let o=r!==void 0?e._$Co?.[r]:e._$Cl,i=I(t)?void 0:t._$litDirective$;return o?.constructor!==i&&(o?._$AO?.(false),i===void 0?o=void 0:(o=new i(n),o._$AT(n,e,r)),r!==void 0?(e._$Co??=[])[r]=o:e._$Cl=o),o!==void 0&&(t=P(n,o._$AS(n,t.values),o,r)),t}var pt=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??_).importNode(e,true);A.currentNode=o;let i=A.nextNode(),s=0,l=0,c=r[0];for(;c!==void 0;){if(s===c.index){let u;c.type===2?u=new G(i,i.nextSibling,this,t):c.type===1?u=new c.ctor(i,c.name,c.strings,this,t):c.type===6&&(u=new yt(i,this,t)),this._$AV.push(u),c=r[++l]}s!==c?.index&&(i=A.nextNode(),s++)}return A.currentNode=_,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++}},G=class n{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,r,o){this.type=2,this._$AH=a,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=P(this,t,e),I(t)?t===a||t==null||t===""?(this._$AH!==a&&this._$AR(),this._$AH=a):t!==this._$AH&&t!==C&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Je(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!==a&&I(this._$AH)?this._$AA.nextSibling.data=t:this.T(_.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(Gt(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===o)this._$AH.p(e);else{let i=new pt(o,this),s=i.u(this.options);i.p(e),this.T(s),this._$AH=i}}_$AC(t){let e=Dt.get(t.strings);return e===void 0&&Dt.set(t.strings,e=new M(t)),e}k(t){gt(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,r,o=0;for(let i of t)o===e.length?e.push(r=new n(this.O(z()),this.O(z()),this,this.options)):r=e[o],r._$AI(i),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=Pt(t).nextSibling;Pt(t).remove(),t=r}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},F=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,o,i){this.type=1,this._$AH=a,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=i,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=a}_$AI(t,e=this,r,o){let i=this.strings,s=false;if(i===void 0)t=P(this,t,e,0),s=!I(t)||t!==this._$AH&&t!==C,s&&(this._$AH=t);else{let l=t,c,u;for(t=i[0],c=0;c<i.length-1;c++)u=P(this,l[r+c],e,c),u===C&&(u=this._$AH[c]),s||=!I(u)||u!==this._$AH[c],u===a?t=a:t!==a&&(t+=(u??"")+i[c+1]),this._$AH[c]=u}s&&!o&&this.j(t)}j(t){t===a?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},ht=class extends F{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===a?void 0:t}},ut=class extends F{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==a)}},mt=class extends F{constructor(t,e,r,o,i){super(t,e,r,o,i),this.type=5}_$AI(t,e=this){if((t=P(this,t,e,0)??a)===C)return;let r=this._$AH,o=t===a&&r!==a||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,i=t!==a&&(r===a||o);o&&this.element.removeEventListener(this.name,this,r),i&&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)}},yt=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){P(this,t)}};var Qe=ft.litHtmlPolyfillSupport;Qe?.(M,G),(ft.litHtmlVersions??=[]).push("3.3.3");var jt=(n,t,e)=>{let r=e?.renderBefore??t,o=r._$litPart$;if(o===void 0){let i=e?.renderBefore??null;r._$litPart$=o=new G(t.insertBefore(z(),i),i,void 0,e??{})}return o._$AI(n),o};var bt=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=jt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false)}render(){return C}};E._$litElement$=true,E.finalized=true,bt.litElementHydrateSupport?.({LitElement:E});var tr=bt.litElementPolyfillSupport;tr?.({LitElement:E});(bt.litElementVersions??=[]).push("4.2.2");var er={attribute:true,type:String,converter:N,reflect:false,hasChanged:Y},rr=(n=er,t,e)=>{let{kind:r,metadata:o}=e,i=globalThis.litPropertyMetadata.get(o);if(i===void 0&&globalThis.litPropertyMetadata.set(o,i=new Map),r==="setter"&&((n=Object.create(n)).wrapped=true),i.set(e.name,n),r==="accessor"){let{name:s}=e;return{set(l){let c=t.get.call(this);t.set.call(this,l),this.requestUpdate(s,c,n,true,l)},init(l){return l!==void 0&&this.C(s,void 0,n,l),l}}}if(r==="setter"){let{name:s}=e;return function(l){let c=this[s];t.call(this,l),this.requestUpdate(s,c,n,true,l)}}throw Error("Unsupported decorator location: "+r)};function f(n){return(t,e)=>typeof e=="object"?rr(n,t,e):((r,o,i)=>{let s=o.hasOwnProperty(i);return o.constructor.createProperty(i,r),s?Object.getOwnPropertyDescriptor(o,i):void 0})(n,t,e)}function x(n){return f({...n,state:true,attribute:false})}var Kt=[{endpoint:"chinese-astrology/zodiac/sign",method:"POST",attrs:{mode:"sign"}},{endpoint:"chinese-astrology/zodiac/animals/{id}",method:"GET",attrs:{mode:"animal"}},{endpoint:"chinese-astrology/zodiac/{id}/daily",method:"GET",attrs:{mode:"daily"}},{endpoint:"chinese-astrology/zodiac/compatibility/{sign1}/{sign2}",method:"GET",attrs:{mode:"compatibility"}}];var R=n=>n??a;var Ht=["de","en","es","fr","hi","pt","ru","tr","zh-Hans","zh-Hant"];function St(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 nr={tw:"hant",hk:"hant",mo:"hant",cn:"hans",sg:"hans",my:"hans"};function vt(n,t){let e=n.toLowerCase();return t.find(r=>r.toLowerCase()===e)}function Bt(n,t=Ht){let e=St(n);if(!e)return;let r=vt(e,t);if(r)return r;let o=e.toLowerCase().split("-"),i=o[0];if(i==="zh"){let s=o.find(l=>l==="hans"||l==="hant")??nr[o[1]??""];return s?vt(`zh-${s}`,t):void 0}return vt(i,t)}var Zt="symbols";var or={Fraunces:["latin","latin-ext"],Jost:["latin","latin-ext","cyrillic"],Geist:["latin","latin-ext","cyrillic"]},$t='"Jost", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',qt='"Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Yt='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',W={"fraunces-jost":{name:"Fraunces with Jost",sans:$t,display:'"Fraunces", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif'},jost:{name:"Jost",sans:$t,display:$t},geist:{name:"Geist",sans:qt,display:qt},system:{name:"System",sans:Yt,display:Yt}};function Vt(n){let{sans:t,display:e}=W[n];return Object.keys(or).filter(r=>`${t} ${e}`.includes(`"${r}"`))}var Wt="1.5.0";var ir=/^(.*)\/cdn\/(?:roxy-ui|components\/[\w-]+)\.js$/,sr=/^(.*\/dist)\/(?:index|components\/[\w-]+)\.js$/;function Jt(n,t){if(!t)return;let e=new URL(t);if(e.protocol!=="https:"&&e.protocol!=="http:")return;let r=(ir.exec(e.pathname)??sr.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 cr={},ar="color-mix(in oklab, var(--roxy-accent) 70%, black)",dr="var(--roxy-accent)",lr="color-mix(in srgb, var(--roxy-accent) 40%, transparent)",Xt=/^#(?:[\da-f]{3}|[\da-f]{6})$/i;function Qt(n){return n!==void 0&&Object.hasOwn(W,n)}function te(n){let t=[];return n.brandColor&&Xt.test(n.brandColor)&&t.push(`--roxy-primary:${n.brandColor}`),n.brandAccent&&Xt.test(n.brandAccent)&&t.push(`--roxy-accent:${n.brandAccent}`,`--roxy-accent-ink:light-dark(${ar},${dr})`,`--roxy-ring:${lr}`),t.join(";")}function ee(n,t){if(Qt(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,i=o?.localName==="style"?o:null;i?.sheet&&(i.sheet.disabled=true);let s,l,c;try{let u=globalThis.getComputedStyle(n),m=y=>u.getPropertyValue(y).trim();s=m("--roxy-font-sans"),l=m("--roxy-font-display"),c=m("--roxy-font")}finally{i?.sheet&&(i.sheet.disabled=false)}if(!(s||l))return Qt(c)?c:void 0}function re(n){let{sans:t,display:e}=W[n];return`--roxy-font:${n};--roxy-font-sans:${t};--roxy-font-display:${e}`}var ne=Jt(Wt,globalThis.document?.currentScript?.src||cr.url);function oe(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 ie(n,t=ne){Vt(n).length>0&&oe(n,t)}function se(n=ne){oe(Zt,n)}var ae='@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 J="roxy-ui-tokens";function X(){if(typeof document>"u")return null;let n=document.getElementById(J);if(n)return n;let t=document.createElement("style");return t.id=J,t.textContent=ae,document.head.prepend(t),t}function Q(n){return n.toLowerCase().replace(/[\s_-]+/g," ").trim()}function de(n){return n.replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([a-z])([0-9])/g,"$1 $2").replace(/^\w/,t=>t.toUpperCase())}var le="__ROXY_UI_I18N__";function wt(){let n=globalThis,t=n[le];if(t)return t;let e={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return n[le]=e,e}function pr(n,t){return t?n.replace(/\{\{(\w+)\}\}/g,(e,r)=>r in t?String(t[r]??""):e):n}function ce(n,t,e){return pr(hr(n,t)??t,e)}function hr(n,t){if(!n)return;let{catalogs:e}=wt(),r=n.toLowerCase();return(e[r]??e[r.split("-")[0]])?.[Q(t)]}function ur(n){if(!n)return;let{fieldLabels:t}=wt(),e=n.toLowerCase();return t[e]??t[e.split("-")[0]]}function pe(n,t,e){return ur(n)?.enums[`${t}.${e}`]}function he(n){let{listeners:t}=wt();return t.add(n),()=>{t.delete(n)}}var tt=class{constructor(t){this.host=t,t.addController(this)}hostConnected(){this.unsubscribe=he(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var et=class extends E{constructor(){super();this.translator=(e,r)=>this.t(e,r);new tt(this)}connectedCallback(){super.connectedCallback(),X()}updated(e){super.updated(e),this.renderRoot.querySelector(".roxy-glyph")&&se()}fontDeclarations(e){let r=ee(this,e);return r?(ie(r),re(r)):""}renderFontStyle(){let e=this.fontDeclarations();return e?d`<style>:host{${e}}</style>`:a}t(e,r){return ce(this.effectiveLang(),e,r)}effectiveLang(){return St(this)}};var ue=g`:where(.roxy-glyph){font-family:var(--roxy-font-symbol)}`;function me(n){return n?d`<span class="roxy-glyph" aria-hidden="true">${n}</span>`:a}var ye=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 mr=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}`,rt=[mr,ye,ue];var yr="__cols",fr="__rows";function gr(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function nt(n){if(Array.isArray(n)){let i=false,s=n.map(l=>{let c=nt(l);return c!==l&&(i=true),c});return i?s:n}if(!gr(n))return n;let t=n[yr],e=n[fr];if(Array.isArray(t)&&Array.isArray(e)&&Object.keys(n).length===2)return e.map(i=>{let s={};return t.forEach((l,c)=>{s[l]=nt(i[c])}),s});let r=false,o={};for(let[i,s]of Object.entries(n)){let l=nt(s);l!==s&&(r=true),o[i]=l}return r?o:n}function fe(n){return nt(n)}function ge(n,t){return n.find(e=>e.attrs&&Object.entries(e.attrs).every(([r,o])=>t[r]===o))??n[0]}var xr="pk_live_YOUR_KEY",xe={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 be(n){if(n)return n===xr?xe.sample:n.startsWith("pk_")?void 0:xe.secret}function ve(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 Se="https://roxyapi.com/api/v2";async function br(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 $e={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.")}}},O=class extends Error{constructor(e,r=null,o=true,i,s){super(e);this.issues=r;this.worded=o;this.status=i;this.code=s}};function we(n){return n.submitUrl?void 0:be(n.publishableKey)}async function Et(n,t,e){let r=we(n);if(r)throw new O(r.message);let o=n.submitUrl?await fetch(n.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:vr(t,n.submitContext),signal:e}):await Sr(n,t,e);if(!o.ok){let i=await br(o);throw new O(i.message,i.issues,i.worded,o.status,i.code)}return await o.json()}function vr(n,t){return JSON.stringify(t?{...n,context:t}:n)}function Sr(n,t,e){let r=new URL(`${n.baseUrl??Se}${t.path}`,document.baseURI);for(let[i,s]of Object.entries(t.query??{}))s!=null&&r.searchParams.set(i,String(s));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 ot=class{constructor(t){this.baseUrl=Se;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=we(this);if(e){this.host.error=e.message,ve(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 Et(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 O&&(this.host.issues=o.issues,this.failure={status:o.status,code:o.code}),this.worded=o instanceof O&&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 Ee(n,t,e,r=[]){let o={...e},i=`/${n.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(u,m)=>{let y=o[m];return delete o[m],encodeURIComponent(String(y??""))}),s=new Set(r),l={},c={};for(let[u,m]of Object.entries(o))m===void 0||m===""||(t==="GET"||s.has(u)?l[u]=m:c[u]=m);return{path:i,method:t,query:l,body:t==="POST"?c:void 0}}function Te(){return d`<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 fo=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 So=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 ke(n,t,e){let r=n.filter(o=>!!o.body);return r.length===0?a:d`<section class="block" part="section readings"><h3>${e}</h3>${r.map((o,i)=>d`<details class="interp-card" part="reading" name="${t}" ?open="${i===0}"><summary><span class="interp-lead">${me(o.glyph)} ${o.label}</span> ${Te()} ${o.aside?d`<span class="interp-aside"><small>${o.aside}</small></span>`:a}</summary><div class="interp-body"><p>${o.body}</p>${o.extra??a}</div></details>`)}</section>`}var $r="roxy-data";function wr(n){return n.nodeName==="SCRIPT"&&n.getAttribute("type")==="application/json"}var it=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(wr(t)&&t.classList.contains($r))return t;return null}parse(t){if(t?.trim())try{return JSON.parse(t)}catch{return}}};var h=class extends et{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 i=await Et(this.fetcher,{...e,query:{...e.query,offset:o.length}});if(this.lastRequest!==e)return;let s=i[r];this.data={...this.data,...i,[r]:[...o,...Array.isArray(s)?s:[]]}}catch(i){this.lastRequest===e&&(this.moreError=i instanceof Error?i.message:String(i))}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(Ee(r.endpoint,r.method,{...o.values,...this.ownRequest()},o.queryKeys??[]))};new it(this),this.fetcher=new ot(this)}static{this.styles=[rt]}static{this.endpoints=[]}willUpdate(e){if(e.has("data")&&this.data!=null){let r=fe(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:ge(this.constructor.endpoints,this);return e&&{endpoint:e.endpoint,method:this.method??e.method}}render(){return d`${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")?d`<roxy-data .data="${e}" lang="${R(this.effectiveLang())}"></roxy-data>`:this.renderEmpty()}}hostStyle(){let e=this.hideSections.split(",").map(i=>i.trim().toLowerCase()).filter(i=>/^[a-z][a-z0-9-]*$/.test(i)),r=[te(this),this.fontDeclarations(this.font)].filter(Boolean).join(";");if(e.length===0&&!r)return a;let o=(r?`:host{${r}}`:"")+e.map(i=>`[part~="${i}"],roxy-endpoint-form::part(${i}){display:none!important}`).join("");return d`<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()?d`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data):this.renderNoData()}renderInterpretation(e,r,o){return this.hideReadings?a:ke(e,r,this.t(o??"Reading"))}renderResult(e){let r=d`<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()?d`${r}${this.renderAttribution()}`:r}renderWithForm(e){return d`${this.renderForm()}${e}`}stickyBody(){return this.loading?this.renderLoading():this.error!=null?this.issues?a:this.renderErrorBanner(this.error):this.data==null?a:this.showAttribution()?d`${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"?a:e.length>=r?a:d`<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?d`<p class="roxy-error" role="alert">${this.t(this.moreError)}</p>`:a}</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:Bt(this)}}).then(()=>r.scrollIntoView?.({block:"nearest"}))}showAttribution(){return this.attribution!=null&&this.attribution!=="off"&&this.attribution!=="false"}renderAttribution(){return d`<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(a):this.renderEmpty()}renderForm(){let e=this.selfFetch();return d`<roxy-endpoint-form part="form" exportparts="hint" data-endpoint="${e?.endpoint??""}" method="${e?.method??"POST"}" spec-url="${R(this.specUrl)}" publishable-key="${R(this.publishableKey)}" location-url="${R(this.locationUrl)}" submit-label="${R(this.submitLabel)}" lang="${R(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 d`<div class="roxy-empty" role="status" part="empty">${this.t("No data")}</div>`}renderLoading(){return d`<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?d`${o}${this.renderForm()}`:o}renderErrorBanner(e){return d`<div class="roxy-error" role="alert" part="error">${!this.fetcher.worded&&this.errorMessage||this.t(e)}</div>`}};p([f({attribute:false})],h.prototype,"data",2),p([f({type:String,attribute:"data-endpoint"})],h.prototype,"endpoint",2),p([f({type:String})],h.prototype,"method",2),p([f({type:String,attribute:"publishable-key"})],h.prototype,"publishableKey",2),p([f({type:String,attribute:"base-url"})],h.prototype,"baseUrl",2),p([f({type:String,attribute:"spec-url"})],h.prototype,"specUrl",2),p([f({type:String,attribute:"submit-url"})],h.prototype,"submitUrl",2),p([f({attribute:"submit-context",converter:$e})],h.prototype,"submitContext",2),p([f({type:String,attribute:"location-url"})],h.prototype,"locationUrl",2),p([f({type:Boolean})],h.prototype,"remember",2),p([f({type:Boolean,attribute:"hide-readings",reflect:true})],h.prototype,"hideReadings",2),p([f({type:String,attribute:"hide-sections",reflect:true})],h.prototype,"hideSections",2),p([f({type:String,attribute:"brand-color"})],h.prototype,"brandColor",2),p([f({type:String,attribute:"brand-accent"})],h.prototype,"brandAccent",2),p([f({type:String})],h.prototype,"font",2),p([f({type:String})],h.prototype,"hemisphere",2),p([f({type:String,attribute:"submit-label"})],h.prototype,"submitLabel",2),p([f({type:String,attribute:"error-message"})],h.prototype,"errorMessage",2),p([f({type:String})],h.prototype,"attribution",2),p([x()],h.prototype,"loading",2),p([x()],h.prototype,"error",2),p([x()],h.prototype,"issues",2),p([x()],h.prototype,"selfFetched",2),p([x()],h.prototype,"editing",2),p([x()],h.prototype,"sticky",2),p([x()],h.prototype,"openedRow",2),p([x()],h.prototype,"openedRowId",2),p([x()],h.prototype,"moreLoading",2),p([x()],h.prototype,"moreError",2);var Ae=n=>t=>{customElements.get(n)||customElements.define(n,t)};var Er=new Set(["wood","fire","earth","metal","water"]);function st(n){let t=Q(n??"");return Er.has(t)?`element-${t}`:""}var _e=g`.element-wood{--_element:var(--roxy-success);--_element-ink:var(--roxy-success-fg)}.element-fire{--_element:var(--roxy-danger);--_element-ink:var(--roxy-danger-fg)}.element-earth{--_element:var(--roxy-warning);--_element-ink:var(--roxy-warning-fg)}.element-metal{--_element:var(--roxy-secondary);--_element-ink:var(--roxy-secondary)}.element-water{--_element:var(--roxy-info);--_element-ink:var(--roxy-info-fg)}.element-word{color:var(--_element-ink)}`;var Tr=/^\d{4}-\d{2}-\d{2}$/,kr=/^\d{4}-\d{2}$/,Ar=/^\d{2}:\d{2}(:\d{2})?$/,_r=/^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2}(\.\d+)?)?$/,Ce=new Map;function Re(n){if(!n)return["en"];let t=Ce.get(n);if(t)return[t,"en"];let e="en";try{e=Intl.getCanonicalLocales(n)[0]??"en"}catch{e="en"}return Ce.set(n,e),[e,"en"]}function Cr(n){let t=Ar.test(n)?`1970-01-01T${n}`:Tr.test(n)?`${n}T00:00:00`:kr.test(n)?`${n}-01T00:00:00`:_r.test(n)?n.replace(" ","T"):null;return t?{d:new Date(`${t}Z`),timeZone:"UTC"}:{d:new Date(n)}}function Pe(n,t){if(typeof t!="string"||t.length===0)return"";let{d:e,timeZone:r}=Cr(t);return Number.isNaN(e.getTime())?t:e.toLocaleDateString(Re(n),{month:"short",day:"numeric",year:"numeric",timeZone:r})}function Fe(n,t){return typeof t!="number"||!Number.isFinite(t)?"":t.toLocaleString(Re(n),{maximumFractionDigits:0})}function Oe(n,t,e,r){return pe(n,t,e)??r??de(e)}var Rr="Localized";function b(n,t,e){let r=n,o=r?.[`${t}${Rr}`];if(typeof o=="string"&&o!=="")return o;if(e!==void 0)return e;let i=r?.[t];return typeof i=="string"?i:""}var Le=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 Ue(n,t,e){let r=[];return n?.yearBoundary&&r.push(["Year boundary","yearBoundary",n.yearBoundary]),n?.dayBoundary&&r.push(["Day boundary","dayBoundary",n.dayBoundary]),n?.hourClock&&r.push(["Hour clock","hourClock",n.hourClock]),r.length===0?a:d`<p class="roxy-frame">${r.map(([o,i,s],l)=>d`${l>0?" \xB7 ":""}${t(o)}: <span class="roxy-frame-deg" title="${s}">${Oe(e,i,s)}</span>`)}</p>`}var at={"secret-friend":"Secret friend",trine:"Trine",same:"Same",neutral:"Neutral",harm:"Harm",clash:"Clash"},Ne={excellent:"Excellent",strong:"Strong",workable:"Workable",challenging:"Challenging",difficult:"Difficult"},T=class extends h{constructor(){super(...arguments);this.mode="sign"}renderData(e){if(this.mode==="compatibility"&&"signs"in e)return this.renderCompatibility(e);let r="animal"in e&&e.animal?e.animal:e,o=this.effectiveLang(),i="energyRating"in e&&typeof e.energyRating=="number"?e.energyRating:null,s="date"in e&&e.date?Pe(o,e.date):"";return d`<article class="card" part="card" aria-labelledby="zodiac-title"><header class="head" part="header"><span class="hanzi" lang="zh">${r.chinese??""}</span><div><h2 class="title" id="zodiac-title">${b(r,"name")}</h2><div class="sub">${r.pinyin??""}${s?` ${s}`:""}</div></div>${i!==null?d`<span class="energy" part="details" aria-label="${this.t("Energy {{value}} of 10",{value:i})}">${this.t("Energy {{value}}/10",{value:Fe(o,i)})} <span class="energy-bar"><span style="width:${i/10*100}%"></span></span></span>`:a}</header>${this.renderIdentity(e,r)} ${this.renderDaily(e)} ${this.renderReference(e)} ${"interpretation"in e&&e.interpretation&&!this.hideReadings?d`<p class="prose" part="section interpretation">${e.interpretation}</p>`:a} ${"conventions"in e?Ue(e.conventions,this.translator,this.effectiveLang()):a}</article>`}renderIdentity(e,r){let o="yearPillar"in e&&e.yearPillar||"dayPillar"in e&&e.dayPillar||null,i="hours"in e?e.hours:void 0,s="element"in e&&typeof e.element=="string"?e:void 0,l=s?b(s,"element"):b(r,"element"),c=st(s?.element??r.element),u="polarity"in e&&typeof e.polarity=="string"&&e.polarity||r.polarity||"";return!l&&!u&&!o&&!i&&!r.branch?a:d`<div class="facts" part="details">${l?d`<span><span class="roxy-label">${this.t("Element")}</span><b class="element-word ${c}">${l}</b></span>`:a} ${u?d`<span><span class="roxy-label">${this.t("Polarity")}</span>${u}</span>`:a} ${r.branch?d`<span><span class="roxy-label">${this.t("Branch")}</span>${r.branch}</span>`:a} ${o?d`<span><span class="roxy-label">${this.t("Pillar")}</span> <b>${o.stem??""}</b> ${o.branch??""}</span>`:a} ${i&&typeof i.start=="number"?d`<span><span class="roxy-label">${this.t("Hours")}</span>${this.t("{{start}} to {{end}}",{start:this.hourLabel(i.start),end:this.hourLabel(i.end)})}</span>`:a}</div>`}hourLabel(e){return typeof e=="number"?`${String(e).padStart(2,"0")}:00`:""}renderDaily(e){if(!("relationship"in e)||!("overview"in e))return a;let r="year"in e?e.year:void 0,o="benMingNian"in e?e.benMingNian:false;return d`${d`<div class="facts" part="details"><span><span class="roxy-label">${this.t("Day")}</span><b>${e.relationship&&at[e.relationship]?this.t(at[e.relationship]):e.relationship??""}</b></span> ${r?d`<span><span class="roxy-label">${this.t("Year")}</span>${r.pillar??""} ${b(r,"animal")} ${r.relationship&&at[r.relationship]?this.t(at[r.relationship]):r.relationship??""}</span>`:a} ${o?d`<span class="roxy-chip tag">${this.t("Ben Ming Nian")}</span>`:a}</div>`} ${this.hideReadings?a:d`${e.overview?d`<p class="prose" part="section overview">${e.overview}</p>`:a}<div class="sections" part="section outlook">${"love"in e&&e.love?d`<div class="section"><h3 class="block-title">${this.t("Love")}</h3><p>${e.love}</p></div>`:a} ${"career"in e&&e.career?d`<div class="section"><h3 class="block-title">${this.t("Career")}</h3><p>${e.career}</p></div>`:a} ${"advice"in e&&e.advice?d`<div class="section"><h3 class="block-title">${this.t("Advice")}</h3><p>${e.advice}</p></div>`:a}</div>`} ${r?.note&&!this.hideReadings?d`<p class="prose" part="reading">${r.note}</p>`:a}`}renderReference(e){if(!("trine"in e)&&!("secretFriend"in e))return a;let r=e;return d`${r.trine?d`<section part="section trine"><h3 class="block-title">${this.t("Trine")} ${r.trine.number??""}</h3><div class="facts"><span><b lang="zh">${r.trine.chinese??""}</b> <span class="element-word ${st(r.trine.element)}">${b(r.trine,"element")}</span></span> ${r.trine.members?.length?d`<span class="roxy-chips">${r.trine.members.map(o=>d`<span class="roxy-chip">${o}</span>`)}</span>`:a} ${r.trine.theme?d`<span>${r.trine.theme}</span>`:a}</div></section>`:a} ${this.renderPartners(r)} ${this.hideReadings?a:d`${r.summary?d`<p class="prose" part="section summary">${r.summary}</p>`:a} ${r.traits?.length?d`<section part="section traits"><h3 class="block-title">${this.t("Traits")}</h3><ul class="roxy-chips">${r.traits.map(o=>d`<li>${o}</li>`)}</ul></section>`:a} ${this.bullets(this.t("Strengths"),r.strengths)} ${this.bullets(this.t("Weaknesses"),r.weaknesses)} ${r.compatibilitySummary?d`<p class="prose" part="reading">${r.compatibilitySummary}</p>`:a}`}`}renderPartners(e){let o=[["Secret friend",e.secretFriend],["Clash",e.clashPartner],["Harm",e.harmPartner]].filter(([,i])=>i?.name);return o.length===0?a:d`<section part="section partners"><div class="partners">${o.map(([i,s])=>d`<div class="partner"><span class="role roxy-label">${this.t(i)}</span> <span class="glyph" lang="zh">${s?.chinese??""}</span> <span class="who">${b(s,"name")}</span></div>`)}</div></section>`}bullets(e,r){return r?.length?d`<section part="section list"><h3 class="block-title">${e}</h3><ul class="bullets">${r.map(o=>d`<li>${o}</li>`)}</ul></section>`:a}renderCompatibility(e){let r=e.signs?.first,o=e.signs?.second,i=typeof e.score=="number"?e.score:null;return d`<article class="card" part="card" aria-labelledby="zodiac-title"><header class="head" part="header"><div class="pair"><span class="side"><span class="hanzi" lang="zh">${r?.chinese??""}</span> <span class="sub">${b(r,"name")}</span></span> <span class="side"><span class="hanzi" lang="zh">${o?.chinese??""}</span> <span class="sub">${b(o,"name")}</span></span></div></header><h2 class="title" id="zodiac-title">${b(e,"relationshipName")} <span lang="zh">${e.relationshipChinese??""}</span></h2>${i!==null?d`<div class="score" part="details"><span class="score-value">${i}</span> <span class="score-track"><span class="score-fill" style="width:${Math.max(0,Math.min(100,i))}%"></span></span> ${e.verdict?d`<span class="roxy-chip tag">${Ne[e.verdict]?this.t(Ne[e.verdict]):e.verdict}</span>`:a}</div>`:a} ${e.sharedElement?d`<div class="facts" part="details"><span><span class="roxy-label">${this.t("Shared element")}</span><b class="element-word ${st(e.sharedElement)}">${b(e,"sharedElement")}</b></span></div>`:a} ${this.hideReadings?a:d`${e.summary?d`<p class="prose" part="section summary">${e.summary}</p>`:a} ${this.bullets(this.t("Strengths"),e.strengths)} ${this.bullets(this.t("Frictions"),e.frictions)} ${e.advice?d`<p class="prose" part="reading">${e.advice}</p>`:a}`}</article>`}};T.endpoints=Kt,T.styles=[rt,Le,_e,g`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:center;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}.hanzi{font-size:calc(var(--roxy-text-base) * 2.75);color:var(--roxy-accent-ink);line-height:1}.title,.block-title{margin:0}.title{font-size:var(--roxy-text-xl)}.block-title{margin-block-end:var(--roxy-space-sm)}.sub{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.energy{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums;margin-inline-start:auto}.energy-bar,.score-track{background:var(--roxy-border);border-radius:var(--roxy-radius-full);overflow:hidden}.energy-bar{block-size:.25lh;inline-size:12ch;vertical-align:middle;margin-inline-start:var(--roxy-space-xs);display:inline-block}.energy-bar>span,.score-fill{background:var(--roxy-accent);height:100%;display:block}.facts{gap:var(--roxy-space-xs) var(--roxy-space-md);border-block-start:1px solid var(--roxy-border);color:var(--roxy-secondary);font-size:var(--roxy-text-sm);flex-wrap:wrap;padding-block-start:var(--roxy-space-md);display:flex}.facts .roxy-label{margin-inline-end:var(--roxy-space-xs)}.facts b{color:var(--roxy-fg)}.prose{margin:0}.prose[part~=reading]{padding-block-start:var(--roxy-space-md)}section .facts{border-block-start:0;padding-block-start:0}.sections{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,24ch),1fr));display:grid}.section p{font-size:var(--roxy-text-sm);margin:0}.bullets{font-size:var(--roxy-text-sm);margin:0;padding-inline-start:var(--roxy-space-lg)}.partners{gap:var(--roxy-space-sm);grid-template-columns:repeat(auto-fit,minmax(16ch,1fr));display:grid}.partner,.pair .side{gap:calc(var(--roxy-space-unit) / 2);text-align:center;display:grid}.partner .glyph{font-size:calc(var(--roxy-text-base) * 1.5);line-height:var(--roxy-leading-tight);color:var(--roxy-accent-ink)}.partner .who{font-size:var(--roxy-text-sm)}.score{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.score-value{font-size:calc(var(--roxy-text-base) * 2);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums;line-height:1}.score-track{flex:1;block-size:.35lh;min-inline-size:16ch}.tag{color:var(--roxy-info-fg)}.pair{justify-content:center;align-items:center;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}`],p([f({type:String,reflect:true})],T.prototype,"mode",2),T=p([Ae("roxy-zodiac-card")],T);return Ge(Pr)})();/*! Bundled license information:
|
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ut=/'/g,Nt=/"/g,Mt=/^(?:script|style|textarea|title)$/i,xt=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),d=xt(1),Dr=xt(2),zr=xt(3),C=Symbol.for("lit-noChange"),a=Symbol.for("lit-nothing"),Dt=new WeakMap,A=_.createTreeWalker(_,129);function Gt(n,t){if(!gt(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ft!==void 0?Ft.createHTML(t):t}var Xe=(n,t)=>{let e=n.length-1,r=[],o,i=t===2?"<svg>":t===3?"<math>":"",s=D;for(let l=0;l<e;l++){let c=n[l],u,m,y=-1,v=0;for(;v<c.length&&(s.lastIndex=v,m=s.exec(c),m!==null);)v=s.lastIndex,s===D?m[1]==="!--"?s=Ot:m[1]!==void 0?s=Lt:m[2]!==void 0?(Mt.test(m[2])&&(o=RegExp("</"+m[2],"g")),s=k):m[3]!==void 0&&(s=k):s===k?m[0]===">"?(s=o??D,y=-1):m[1]===void 0?y=-2:(y=s.lastIndex-m[2].length,u=m[1],s=m[3]===void 0?k:m[3]==='"'?Nt:Ut):s===Nt||s===Ut?s=k:s===Ot||s===Lt?s=D:(s=k,o=void 0);let $=s===k&&n[l+1].startsWith("/>")?" ":"";i+=s===D?c+We:y>=0?(r.push(u),c.slice(0,y)+zt+c.slice(y)+w+$):c+w+(y===-2?l:$)}return[Gt(n,i+(n[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},M=class n{constructor({strings:t,_$litType$:e},r){let o;this.parts=[];let i=0,s=0,l=t.length-1,c=this.parts,[u,m]=Xe(t,e);if(this.el=n.createElement(u,r),A.currentNode=this.el.content,e===2||e===3){let y=this.el.content.firstChild;y.replaceWith(...y.childNodes)}for(;(o=A.nextNode())!==null&&c.length<l;){if(o.nodeType===1){if(o.hasAttributes())for(let y of o.getAttributeNames())if(y.endsWith(zt)){let v=m[s++],$=o.getAttribute(y).split(w),j=/([.?@])?(.*)/.exec(v);c.push({type:1,index:i,name:j[2],strings:$,ctor:j[1]==="."?ht:j[1]==="?"?ut:j[1]==="@"?mt:F}),o.removeAttribute(y)}else y.startsWith(w)&&(c.push({type:6,index:i}),o.removeAttribute(y));if(Mt.test(o.tagName)){let y=o.textContent.split(w),v=y.length-1;if(v>0){o.textContent=Z?Z.emptyScript:"";for(let $=0;$<v;$++)o.append(y[$],z()),A.nextNode(),c.push({type:2,index:++i});o.append(y[v],z())}}}else if(o.nodeType===8)if(o.data===It)c.push({type:2,index:i});else{let y=-1;for(;(y=o.data.indexOf(w,y+1))!==-1;)c.push({type:7,index:i}),y+=w.length-1}i++}}static createElement(t,e){let r=_.createElement("template");return r.innerHTML=t,r}};function P(n,t,e=n,r){if(t===C)return t;let o=r!==void 0?e._$Co?.[r]:e._$Cl,i=I(t)?void 0:t._$litDirective$;return o?.constructor!==i&&(o?._$AO?.(false),i===void 0?o=void 0:(o=new i(n),o._$AT(n,e,r)),r!==void 0?(e._$Co??=[])[r]=o:e._$Cl=o),o!==void 0&&(t=P(n,o._$AS(n,t.values),o,r)),t}var pt=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??_).importNode(e,true);A.currentNode=o;let i=A.nextNode(),s=0,l=0,c=r[0];for(;c!==void 0;){if(s===c.index){let u;c.type===2?u=new G(i,i.nextSibling,this,t):c.type===1?u=new c.ctor(i,c.name,c.strings,this,t):c.type===6&&(u=new yt(i,this,t)),this._$AV.push(u),c=r[++l]}s!==c?.index&&(i=A.nextNode(),s++)}return A.currentNode=_,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++}},G=class n{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,r,o){this.type=2,this._$AH=a,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=P(this,t,e),I(t)?t===a||t==null||t===""?(this._$AH!==a&&this._$AR(),this._$AH=a):t!==this._$AH&&t!==C&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Je(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!==a&&I(this._$AH)?this._$AA.nextSibling.data=t:this.T(_.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(Gt(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===o)this._$AH.p(e);else{let i=new pt(o,this),s=i.u(this.options);i.p(e),this.T(s),this._$AH=i}}_$AC(t){let e=Dt.get(t.strings);return e===void 0&&Dt.set(t.strings,e=new M(t)),e}k(t){gt(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,r,o=0;for(let i of t)o===e.length?e.push(r=new n(this.O(z()),this.O(z()),this,this.options)):r=e[o],r._$AI(i),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=Pt(t).nextSibling;Pt(t).remove(),t=r}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},F=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,o,i){this.type=1,this._$AH=a,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=i,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=a}_$AI(t,e=this,r,o){let i=this.strings,s=false;if(i===void 0)t=P(this,t,e,0),s=!I(t)||t!==this._$AH&&t!==C,s&&(this._$AH=t);else{let l=t,c,u;for(t=i[0],c=0;c<i.length-1;c++)u=P(this,l[r+c],e,c),u===C&&(u=this._$AH[c]),s||=!I(u)||u!==this._$AH[c],u===a?t=a:t!==a&&(t+=(u??"")+i[c+1]),this._$AH[c]=u}s&&!o&&this.j(t)}j(t){t===a?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},ht=class extends F{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===a?void 0:t}},ut=class extends F{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==a)}},mt=class extends F{constructor(t,e,r,o,i){super(t,e,r,o,i),this.type=5}_$AI(t,e=this){if((t=P(this,t,e,0)??a)===C)return;let r=this._$AH,o=t===a&&r!==a||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,i=t!==a&&(r===a||o);o&&this.element.removeEventListener(this.name,this,r),i&&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)}},yt=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){P(this,t)}};var Qe=ft.litHtmlPolyfillSupport;Qe?.(M,G),(ft.litHtmlVersions??=[]).push("3.3.3");var jt=(n,t,e)=>{let r=e?.renderBefore??t,o=r._$litPart$;if(o===void 0){let i=e?.renderBefore??null;r._$litPart$=o=new G(t.insertBefore(z(),i),i,void 0,e??{})}return o._$AI(n),o};var bt=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=jt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false)}render(){return C}};E._$litElement$=true,E.finalized=true,bt.litElementHydrateSupport?.({LitElement:E});var tr=bt.litElementPolyfillSupport;tr?.({LitElement:E});(bt.litElementVersions??=[]).push("4.2.2");var er={attribute:true,type:String,converter:N,reflect:false,hasChanged:Y},rr=(n=er,t,e)=>{let{kind:r,metadata:o}=e,i=globalThis.litPropertyMetadata.get(o);if(i===void 0&&globalThis.litPropertyMetadata.set(o,i=new Map),r==="setter"&&((n=Object.create(n)).wrapped=true),i.set(e.name,n),r==="accessor"){let{name:s}=e;return{set(l){let c=t.get.call(this);t.set.call(this,l),this.requestUpdate(s,c,n,true,l)},init(l){return l!==void 0&&this.C(s,void 0,n,l),l}}}if(r==="setter"){let{name:s}=e;return function(l){let c=this[s];t.call(this,l),this.requestUpdate(s,c,n,true,l)}}throw Error("Unsupported decorator location: "+r)};function f(n){return(t,e)=>typeof e=="object"?rr(n,t,e):((r,o,i)=>{let s=o.hasOwnProperty(i);return o.constructor.createProperty(i,r),s?Object.getOwnPropertyDescriptor(o,i):void 0})(n,t,e)}function x(n){return f({...n,state:true,attribute:false})}var Kt=[{endpoint:"chinese-astrology/zodiac/sign",method:"POST",attrs:{mode:"sign"}},{endpoint:"chinese-astrology/zodiac/animals/{id}",method:"GET",attrs:{mode:"animal"}},{endpoint:"chinese-astrology/zodiac/{id}/daily",method:"GET",attrs:{mode:"daily"}},{endpoint:"chinese-astrology/zodiac/compatibility/{sign1}/{sign2}",method:"GET",attrs:{mode:"compatibility"}}];var R=n=>n??a;var Ht=["de","en","es","fr","hi","pt","ru","tr","zh-Hans","zh-Hant"];function St(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 nr={tw:"hant",hk:"hant",mo:"hant",cn:"hans",sg:"hans",my:"hans"};function vt(n,t){let e=n.toLowerCase();return t.find(r=>r.toLowerCase()===e)}function Bt(n,t=Ht){let e=St(n);if(!e)return;let r=vt(e,t);if(r)return r;let o=e.toLowerCase().split("-"),i=o[0];if(i==="zh"){let s=o.find(l=>l==="hans"||l==="hant")??nr[o[1]??""];return s?vt(`zh-${s}`,t):void 0}return vt(i,t)}var Zt="symbols";var or={Fraunces:["latin","latin-ext"],Jost:["latin","latin-ext","cyrillic"],Geist:["latin","latin-ext","cyrillic"]},$t='"Jost", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',qt='"Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Yt='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',W={"fraunces-jost":{name:"Fraunces with Jost",sans:$t,display:'"Fraunces", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif'},jost:{name:"Jost",sans:$t,display:$t},geist:{name:"Geist",sans:qt,display:qt},system:{name:"System",sans:Yt,display:Yt}};function Vt(n){let{sans:t,display:e}=W[n];return Object.keys(or).filter(r=>`${t} ${e}`.includes(`"${r}"`))}var Wt="1.6.0";var ir=/^(.*)\/cdn\/(?:roxy-ui|components\/[\w-]+)\.js$/,sr=/^(.*\/dist)\/(?:index|components\/[\w-]+)\.js$/;function Jt(n,t){if(!t)return;let e=new URL(t);if(e.protocol!=="https:"&&e.protocol!=="http:")return;let r=(ir.exec(e.pathname)??sr.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 cr={},ar="color-mix(in oklab, var(--roxy-accent) 70%, black)",dr="var(--roxy-accent)",lr="color-mix(in srgb, var(--roxy-accent) 40%, transparent)",Xt=/^#(?:[\da-f]{3}|[\da-f]{6})$/i;function Qt(n){return n!==void 0&&Object.hasOwn(W,n)}function te(n){let t=[];return n.brandColor&&Xt.test(n.brandColor)&&t.push(`--roxy-primary:${n.brandColor}`),n.brandAccent&&Xt.test(n.brandAccent)&&t.push(`--roxy-accent:${n.brandAccent}`,`--roxy-accent-ink:light-dark(${ar},${dr})`,`--roxy-ring:${lr}`),t.join(";")}function ee(n,t){if(Qt(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,i=o?.localName==="style"?o:null;i?.sheet&&(i.sheet.disabled=true);let s,l,c;try{let u=globalThis.getComputedStyle(n),m=y=>u.getPropertyValue(y).trim();s=m("--roxy-font-sans"),l=m("--roxy-font-display"),c=m("--roxy-font")}finally{i?.sheet&&(i.sheet.disabled=false)}if(!(s||l))return Qt(c)?c:void 0}function re(n){let{sans:t,display:e}=W[n];return`--roxy-font:${n};--roxy-font-sans:${t};--roxy-font-display:${e}`}var ne=Jt(Wt,globalThis.document?.currentScript?.src||cr.url);function oe(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 ie(n,t=ne){Vt(n).length>0&&oe(n,t)}function se(n=ne){oe(Zt,n)}var ae='@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 J="roxy-ui-tokens";function X(){if(typeof document>"u")return null;let n=document.getElementById(J);if(n)return n;let t=document.createElement("style");return t.id=J,t.textContent=ae,document.head.prepend(t),t}function Q(n){return n.toLowerCase().replace(/[\s_-]+/g," ").trim()}function de(n){return n.replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([a-z])([0-9])/g,"$1 $2").replace(/^\w/,t=>t.toUpperCase())}var le="__ROXY_UI_I18N__";function wt(){let n=globalThis,t=n[le];if(t)return t;let e={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return n[le]=e,e}function pr(n,t){return t?n.replace(/\{\{(\w+)\}\}/g,(e,r)=>r in t?String(t[r]??""):e):n}function ce(n,t,e){return pr(hr(n,t)??t,e)}function hr(n,t){if(!n)return;let{catalogs:e}=wt(),r=n.toLowerCase();return(e[r]??e[r.split("-")[0]])?.[Q(t)]}function ur(n){if(!n)return;let{fieldLabels:t}=wt(),e=n.toLowerCase();return t[e]??t[e.split("-")[0]]}function pe(n,t,e){return ur(n)?.enums[`${t}.${e}`]}function he(n){let{listeners:t}=wt();return t.add(n),()=>{t.delete(n)}}var tt=class{constructor(t){this.host=t,t.addController(this)}hostConnected(){this.unsubscribe=he(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var et=class extends E{constructor(){super();this.translator=(e,r)=>this.t(e,r);new tt(this)}connectedCallback(){super.connectedCallback(),X()}updated(e){super.updated(e),this.renderRoot.querySelector(".roxy-glyph")&&se()}fontDeclarations(e){let r=ee(this,e);return r?(ie(r),re(r)):""}renderFontStyle(){let e=this.fontDeclarations();return e?d`<style>:host{${e}}</style>`:a}t(e,r){return ce(this.effectiveLang(),e,r)}effectiveLang(){return St(this)}};var ue=g`:where(.roxy-glyph){font-family:var(--roxy-font-symbol)}`;function me(n){return n?d`<span class="roxy-glyph" aria-hidden="true">${n}</span>`:a}var ye=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 mr=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}`,rt=[mr,ye,ue];var yr="__cols",fr="__rows";function gr(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function nt(n){if(Array.isArray(n)){let i=false,s=n.map(l=>{let c=nt(l);return c!==l&&(i=true),c});return i?s:n}if(!gr(n))return n;let t=n[yr],e=n[fr];if(Array.isArray(t)&&Array.isArray(e)&&Object.keys(n).length===2)return e.map(i=>{let s={};return t.forEach((l,c)=>{s[l]=nt(i[c])}),s});let r=false,o={};for(let[i,s]of Object.entries(n)){let l=nt(s);l!==s&&(r=true),o[i]=l}return r?o:n}function fe(n){return nt(n)}function ge(n,t){return n.find(e=>e.attrs&&Object.entries(e.attrs).every(([r,o])=>t[r]===o))??n[0]}var xr="pk_live_YOUR_KEY",xe={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 be(n){if(n)return n===xr?xe.sample:n.startsWith("pk_")?void 0:xe.secret}function ve(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 Se="https://roxyapi.com/api/v2";async function br(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 $e={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.")}}},O=class extends Error{constructor(e,r=null,o=true,i,s){super(e);this.issues=r;this.worded=o;this.status=i;this.code=s}};function we(n){return n.submitUrl?void 0:be(n.publishableKey)}async function Et(n,t,e){let r=we(n);if(r)throw new O(r.message);let o=n.submitUrl?await fetch(n.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:vr(t,n.submitContext),signal:e}):await Sr(n,t,e);if(!o.ok){let i=await br(o);throw new O(i.message,i.issues,i.worded,o.status,i.code)}return await o.json()}function vr(n,t){return JSON.stringify(t?{...n,context:t}:n)}function Sr(n,t,e){let r=new URL(`${n.baseUrl??Se}${t.path}`,document.baseURI);for(let[i,s]of Object.entries(t.query??{}))s!=null&&r.searchParams.set(i,String(s));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 ot=class{constructor(t){this.baseUrl=Se;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=we(this);if(e){this.host.error=e.message,ve(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 Et(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 O&&(this.host.issues=o.issues,this.failure={status:o.status,code:o.code}),this.worded=o instanceof O&&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 Ee(n,t,e,r=[]){let o={...e},i=`/${n.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(u,m)=>{let y=o[m];return delete o[m],encodeURIComponent(String(y??""))}),s=new Set(r),l={},c={};for(let[u,m]of Object.entries(o))m===void 0||m===""||(t==="GET"||s.has(u)?l[u]=m:c[u]=m);return{path:i,method:t,query:l,body:t==="POST"?c:void 0}}function Te(){return d`<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 fo=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 So=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 ke(n,t,e){let r=n.filter(o=>!!o.body);return r.length===0?a:d`<section class="block" part="section readings"><h3>${e}</h3>${r.map((o,i)=>d`<details class="interp-card" part="reading" name="${t}" ?open="${i===0}"><summary><span class="interp-lead">${me(o.glyph)} ${o.label}</span> ${Te()} ${o.aside?d`<span class="interp-aside"><small>${o.aside}</small></span>`:a}</summary><div class="interp-body"><p>${o.body}</p>${o.extra??a}</div></details>`)}</section>`}var $r="roxy-data";function wr(n){return n.nodeName==="SCRIPT"&&n.getAttribute("type")==="application/json"}var it=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(wr(t)&&t.classList.contains($r))return t;return null}parse(t){if(t?.trim())try{return JSON.parse(t)}catch{return}}};var h=class extends et{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 i=await Et(this.fetcher,{...e,query:{...e.query,offset:o.length}});if(this.lastRequest!==e)return;let s=i[r];this.data={...this.data,...i,[r]:[...o,...Array.isArray(s)?s:[]]}}catch(i){this.lastRequest===e&&(this.moreError=i instanceof Error?i.message:String(i))}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(Ee(r.endpoint,r.method,{...o.values,...this.ownRequest()},o.queryKeys??[]))};new it(this),this.fetcher=new ot(this)}static{this.styles=[rt]}static{this.endpoints=[]}willUpdate(e){if(e.has("data")&&this.data!=null){let r=fe(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:ge(this.constructor.endpoints,this);return e&&{endpoint:e.endpoint,method:this.method??e.method}}render(){return d`${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")?d`<roxy-data .data="${e}" lang="${R(this.effectiveLang())}"></roxy-data>`:this.renderEmpty()}}hostStyle(){let e=this.hideSections.split(",").map(i=>i.trim().toLowerCase()).filter(i=>/^[a-z][a-z0-9-]*$/.test(i)),r=[te(this),this.fontDeclarations(this.font)].filter(Boolean).join(";");if(e.length===0&&!r)return a;let o=(r?`:host{${r}}`:"")+e.map(i=>`[part~="${i}"],roxy-endpoint-form::part(${i}){display:none!important}`).join("");return d`<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()?d`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data):this.renderNoData()}renderInterpretation(e,r,o){return this.hideReadings?a:ke(e,r,this.t(o??"Reading"))}renderResult(e){let r=d`<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()?d`${r}${this.renderAttribution()}`:r}renderWithForm(e){return d`${this.renderForm()}${e}`}stickyBody(){return this.loading?this.renderLoading():this.error!=null?this.issues?a:this.renderErrorBanner(this.error):this.data==null?a:this.showAttribution()?d`${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"?a:e.length>=r?a:d`<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?d`<p class="roxy-error" role="alert">${this.t(this.moreError)}</p>`:a}</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:Bt(this)}}).then(()=>r.scrollIntoView?.({block:"nearest"}))}showAttribution(){return this.attribution!=null&&this.attribution!=="off"&&this.attribution!=="false"}renderAttribution(){return d`<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(a):this.renderEmpty()}renderForm(){let e=this.selfFetch();return d`<roxy-endpoint-form part="form" exportparts="hint" data-endpoint="${e?.endpoint??""}" method="${e?.method??"POST"}" spec-url="${R(this.specUrl)}" publishable-key="${R(this.publishableKey)}" location-url="${R(this.locationUrl)}" submit-label="${R(this.submitLabel)}" lang="${R(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 d`<div class="roxy-empty" role="status" part="empty">${this.t("No data")}</div>`}renderLoading(){return d`<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?d`${o}${this.renderForm()}`:o}renderErrorBanner(e){return d`<div class="roxy-error" role="alert" part="error">${!this.fetcher.worded&&this.errorMessage||this.t(e)}</div>`}};p([f({attribute:false})],h.prototype,"data",2),p([f({type:String,attribute:"data-endpoint"})],h.prototype,"endpoint",2),p([f({type:String})],h.prototype,"method",2),p([f({type:String,attribute:"publishable-key"})],h.prototype,"publishableKey",2),p([f({type:String,attribute:"base-url"})],h.prototype,"baseUrl",2),p([f({type:String,attribute:"spec-url"})],h.prototype,"specUrl",2),p([f({type:String,attribute:"submit-url"})],h.prototype,"submitUrl",2),p([f({attribute:"submit-context",converter:$e})],h.prototype,"submitContext",2),p([f({type:String,attribute:"location-url"})],h.prototype,"locationUrl",2),p([f({type:Boolean})],h.prototype,"remember",2),p([f({type:Boolean,attribute:"hide-readings",reflect:true})],h.prototype,"hideReadings",2),p([f({type:String,attribute:"hide-sections",reflect:true})],h.prototype,"hideSections",2),p([f({type:String,attribute:"brand-color"})],h.prototype,"brandColor",2),p([f({type:String,attribute:"brand-accent"})],h.prototype,"brandAccent",2),p([f({type:String})],h.prototype,"font",2),p([f({type:String})],h.prototype,"hemisphere",2),p([f({type:String,attribute:"submit-label"})],h.prototype,"submitLabel",2),p([f({type:String,attribute:"error-message"})],h.prototype,"errorMessage",2),p([f({type:String})],h.prototype,"attribution",2),p([x()],h.prototype,"loading",2),p([x()],h.prototype,"error",2),p([x()],h.prototype,"issues",2),p([x()],h.prototype,"selfFetched",2),p([x()],h.prototype,"editing",2),p([x()],h.prototype,"sticky",2),p([x()],h.prototype,"openedRow",2),p([x()],h.prototype,"openedRowId",2),p([x()],h.prototype,"moreLoading",2),p([x()],h.prototype,"moreError",2);var Ae=n=>t=>{customElements.get(n)||customElements.define(n,t)};var Er=new Set(["wood","fire","earth","metal","water"]);function st(n){let t=Q(n??"");return Er.has(t)?`element-${t}`:""}var _e=g`.element-wood{--_element:var(--roxy-success);--_element-ink:var(--roxy-success-fg)}.element-fire{--_element:var(--roxy-danger);--_element-ink:var(--roxy-danger-fg)}.element-earth{--_element:var(--roxy-warning);--_element-ink:var(--roxy-warning-fg)}.element-metal{--_element:var(--roxy-secondary);--_element-ink:var(--roxy-secondary)}.element-water{--_element:var(--roxy-info);--_element-ink:var(--roxy-info-fg)}.element-word{color:var(--_element-ink)}`;var Tr=/^\d{4}-\d{2}-\d{2}$/,kr=/^\d{4}-\d{2}$/,Ar=/^\d{2}:\d{2}(:\d{2})?$/,_r=/^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2}(\.\d+)?)?$/,Ce=new Map;function Re(n){if(!n)return["en"];let t=Ce.get(n);if(t)return[t,"en"];let e="en";try{e=Intl.getCanonicalLocales(n)[0]??"en"}catch{e="en"}return Ce.set(n,e),[e,"en"]}function Cr(n){let t=Ar.test(n)?`1970-01-01T${n}`:Tr.test(n)?`${n}T00:00:00`:kr.test(n)?`${n}-01T00:00:00`:_r.test(n)?n.replace(" ","T"):null;return t?{d:new Date(`${t}Z`),timeZone:"UTC"}:{d:new Date(n)}}function Pe(n,t){if(typeof t!="string"||t.length===0)return"";let{d:e,timeZone:r}=Cr(t);return Number.isNaN(e.getTime())?t:e.toLocaleDateString(Re(n),{month:"short",day:"numeric",year:"numeric",timeZone:r})}function Fe(n,t){return typeof t!="number"||!Number.isFinite(t)?"":t.toLocaleString(Re(n),{maximumFractionDigits:0})}function Oe(n,t,e,r){return pe(n,t,e)??r??de(e)}var Rr="Localized";function b(n,t,e){let r=n,o=r?.[`${t}${Rr}`];if(typeof o=="string"&&o!=="")return o;if(e!==void 0)return e;let i=r?.[t];return typeof i=="string"?i:""}var Le=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 Ue(n,t,e){let r=[];return n?.yearBoundary&&r.push(["Year boundary","yearBoundary",n.yearBoundary]),n?.dayBoundary&&r.push(["Day boundary","dayBoundary",n.dayBoundary]),n?.hourClock&&r.push(["Hour clock","hourClock",n.hourClock]),r.length===0?a:d`<p class="roxy-frame">${r.map(([o,i,s],l)=>d`${l>0?" \xB7 ":""}${t(o)}: <span class="roxy-frame-deg" title="${s}">${Oe(e,i,s)}</span>`)}</p>`}var at={"secret-friend":"Secret friend",trine:"Trine",same:"Same",neutral:"Neutral",harm:"Harm",clash:"Clash"},Ne={excellent:"Excellent",strong:"Strong",workable:"Workable",challenging:"Challenging",difficult:"Difficult"},T=class extends h{constructor(){super(...arguments);this.mode="sign"}renderData(e){if(this.mode==="compatibility"&&"signs"in e)return this.renderCompatibility(e);let r="animal"in e&&e.animal?e.animal:e,o=this.effectiveLang(),i="energyRating"in e&&typeof e.energyRating=="number"?e.energyRating:null,s="date"in e&&e.date?Pe(o,e.date):"";return d`<article class="card" part="card" aria-labelledby="zodiac-title"><header class="head" part="header"><span class="hanzi" lang="zh">${r.chinese??""}</span><div><h2 class="title" id="zodiac-title">${b(r,"name")}</h2><div class="sub">${r.pinyin??""}${s?` ${s}`:""}</div></div>${i!==null?d`<span class="energy" part="details" aria-label="${this.t("Energy {{value}} of 10",{value:i})}">${this.t("Energy {{value}}/10",{value:Fe(o,i)})} <span class="energy-bar"><span style="width:${i/10*100}%"></span></span></span>`:a}</header>${this.renderIdentity(e,r)} ${this.renderDaily(e)} ${this.renderReference(e)} ${"interpretation"in e&&e.interpretation&&!this.hideReadings?d`<p class="prose" part="section interpretation">${e.interpretation}</p>`:a} ${"conventions"in e?Ue(e.conventions,this.translator,this.effectiveLang()):a}</article>`}renderIdentity(e,r){let o="yearPillar"in e&&e.yearPillar||"dayPillar"in e&&e.dayPillar||null,i="hours"in e?e.hours:void 0,s="element"in e&&typeof e.element=="string"?e:void 0,l=s?b(s,"element"):b(r,"element"),c=st(s?.element??r.element),u="polarity"in e&&typeof e.polarity=="string"&&e.polarity||r.polarity||"";return!l&&!u&&!o&&!i&&!r.branch?a:d`<div class="facts" part="details">${l?d`<span><span class="roxy-label">${this.t("Element")}</span><b class="element-word ${c}">${l}</b></span>`:a} ${u?d`<span><span class="roxy-label">${this.t("Polarity")}</span>${u}</span>`:a} ${r.branch?d`<span><span class="roxy-label">${this.t("Branch")}</span>${r.branch}</span>`:a} ${o?d`<span><span class="roxy-label">${this.t("Pillar")}</span> <b>${o.stem??""}</b> ${o.branch??""}</span>`:a} ${i&&typeof i.start=="number"?d`<span><span class="roxy-label">${this.t("Hours")}</span>${this.t("{{start}} to {{end}}",{start:this.hourLabel(i.start),end:this.hourLabel(i.end)})}</span>`:a}</div>`}hourLabel(e){return typeof e=="number"?`${String(e).padStart(2,"0")}:00`:""}renderDaily(e){if(!("relationship"in e)||!("overview"in e))return a;let r="year"in e?e.year:void 0,o="benMingNian"in e?e.benMingNian:false;return d`${d`<div class="facts" part="details"><span><span class="roxy-label">${this.t("Day")}</span><b>${e.relationship&&at[e.relationship]?this.t(at[e.relationship]):e.relationship??""}</b></span> ${r?d`<span><span class="roxy-label">${this.t("Year")}</span>${r.pillar??""} ${b(r,"animal")} ${r.relationship&&at[r.relationship]?this.t(at[r.relationship]):r.relationship??""}</span>`:a} ${o?d`<span class="roxy-chip tag">${this.t("Ben Ming Nian")}</span>`:a}</div>`} ${this.hideReadings?a:d`${e.overview?d`<p class="prose" part="section overview">${e.overview}</p>`:a}<div class="sections" part="section outlook">${"love"in e&&e.love?d`<div class="section"><h3 class="block-title">${this.t("Love")}</h3><p>${e.love}</p></div>`:a} ${"career"in e&&e.career?d`<div class="section"><h3 class="block-title">${this.t("Career")}</h3><p>${e.career}</p></div>`:a} ${"advice"in e&&e.advice?d`<div class="section"><h3 class="block-title">${this.t("Advice")}</h3><p>${e.advice}</p></div>`:a}</div>`} ${r?.note&&!this.hideReadings?d`<p class="prose" part="reading">${r.note}</p>`:a}`}renderReference(e){if(!("trine"in e)&&!("secretFriend"in e))return a;let r=e;return d`${r.trine?d`<section part="section trine"><h3 class="block-title">${this.t("Trine")} ${r.trine.number??""}</h3><div class="facts"><span><b lang="zh">${r.trine.chinese??""}</b> <span class="element-word ${st(r.trine.element)}">${b(r.trine,"element")}</span></span> ${r.trine.members?.length?d`<span class="roxy-chips">${r.trine.members.map(o=>d`<span class="roxy-chip">${o}</span>`)}</span>`:a} ${r.trine.theme?d`<span>${r.trine.theme}</span>`:a}</div></section>`:a} ${this.renderPartners(r)} ${this.hideReadings?a:d`${r.summary?d`<p class="prose" part="section summary">${r.summary}</p>`:a} ${r.traits?.length?d`<section part="section traits"><h3 class="block-title">${this.t("Traits")}</h3><ul class="roxy-chips">${r.traits.map(o=>d`<li>${o}</li>`)}</ul></section>`:a} ${this.bullets(this.t("Strengths"),r.strengths)} ${this.bullets(this.t("Weaknesses"),r.weaknesses)} ${r.compatibilitySummary?d`<p class="prose" part="reading">${r.compatibilitySummary}</p>`:a}`}`}renderPartners(e){let o=[["Secret friend",e.secretFriend],["Clash",e.clashPartner],["Harm",e.harmPartner]].filter(([,i])=>i?.name);return o.length===0?a:d`<section part="section partners"><div class="partners">${o.map(([i,s])=>d`<div class="partner"><span class="role roxy-label">${this.t(i)}</span> <span class="glyph" lang="zh">${s?.chinese??""}</span> <span class="who">${b(s,"name")}</span></div>`)}</div></section>`}bullets(e,r){return r?.length?d`<section part="section list"><h3 class="block-title">${e}</h3><ul class="bullets">${r.map(o=>d`<li>${o}</li>`)}</ul></section>`:a}renderCompatibility(e){let r=e.signs?.first,o=e.signs?.second,i=typeof e.score=="number"?e.score:null;return d`<article class="card" part="card" aria-labelledby="zodiac-title"><header class="head" part="header"><div class="pair"><span class="side"><span class="hanzi" lang="zh">${r?.chinese??""}</span> <span class="sub">${b(r,"name")}</span></span> <span class="side"><span class="hanzi" lang="zh">${o?.chinese??""}</span> <span class="sub">${b(o,"name")}</span></span></div></header><h2 class="title" id="zodiac-title">${b(e,"relationshipName")} <span lang="zh">${e.relationshipChinese??""}</span></h2>${i!==null?d`<div class="score" part="details"><span class="score-value">${i}</span> <span class="score-track"><span class="score-fill" style="width:${Math.max(0,Math.min(100,i))}%"></span></span> ${e.verdict?d`<span class="roxy-chip tag">${Ne[e.verdict]?this.t(Ne[e.verdict]):e.verdict}</span>`:a}</div>`:a} ${e.sharedElement?d`<div class="facts" part="details"><span><span class="roxy-label">${this.t("Shared element")}</span><b class="element-word ${st(e.sharedElement)}">${b(e,"sharedElement")}</b></span></div>`:a} ${this.hideReadings?a:d`${e.summary?d`<p class="prose" part="section summary">${e.summary}</p>`:a} ${this.bullets(this.t("Strengths"),e.strengths)} ${this.bullets(this.t("Frictions"),e.frictions)} ${e.advice?d`<p class="prose" part="reading">${e.advice}</p>`:a}`}</article>`}};T.endpoints=Kt,T.styles=[rt,Le,_e,g`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:center;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}.hanzi{font-size:calc(var(--roxy-text-base) * 2.75);color:var(--roxy-accent-ink);line-height:1}.title,.block-title{margin:0}.title{font-size:var(--roxy-text-xl)}.block-title{margin-block-end:var(--roxy-space-sm)}.sub{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.energy{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums;margin-inline-start:auto}.energy-bar,.score-track{background:var(--roxy-border);border-radius:var(--roxy-radius-full);overflow:hidden}.energy-bar{block-size:.25lh;inline-size:12ch;vertical-align:middle;margin-inline-start:var(--roxy-space-xs);display:inline-block}.energy-bar>span,.score-fill{background:var(--roxy-accent);height:100%;display:block}.facts{gap:var(--roxy-space-xs) var(--roxy-space-md);border-block-start:1px solid var(--roxy-border);color:var(--roxy-secondary);font-size:var(--roxy-text-sm);flex-wrap:wrap;padding-block-start:var(--roxy-space-md);display:flex}.facts .roxy-label{margin-inline-end:var(--roxy-space-xs)}.facts b{color:var(--roxy-fg)}.prose{margin:0}.prose[part~=reading]{padding-block-start:var(--roxy-space-md)}section .facts{border-block-start:0;padding-block-start:0}.sections{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,24ch),1fr));display:grid}.section p{font-size:var(--roxy-text-sm);margin:0}.bullets{font-size:var(--roxy-text-sm);margin:0;padding-inline-start:var(--roxy-space-lg)}.partners{gap:var(--roxy-space-sm);grid-template-columns:repeat(auto-fit,minmax(16ch,1fr));display:grid}.partner,.pair .side{gap:calc(var(--roxy-space-unit) / 2);text-align:center;display:grid}.partner .glyph{font-size:calc(var(--roxy-text-base) * 1.5);line-height:var(--roxy-leading-tight);color:var(--roxy-accent-ink)}.partner .who{font-size:var(--roxy-text-sm)}.score{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.score-value{font-size:calc(var(--roxy-text-base) * 2);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums;line-height:1}.score-track{flex:1;block-size:.35lh;min-inline-size:16ch}.tag{color:var(--roxy-info-fg)}.pair{justify-content:center;align-items:center;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}`],p([f({type:String,reflect:true})],T.prototype,"mode",2),T=p([Ae("roxy-zodiac-card")],T);return Ge(Pr)})();/*! Bundled license information:
|
|
4
4
|
|
|
5
5
|
@lit/reactive-element/css-tag.js:
|
|
6
6
|
(**
|