@roxyapi/ui 1.6.2 → 1.8.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 +2 -2
- package/dist/cdn/components/angel-number-card.js +3 -3
- package/dist/cdn/components/angel-number-lookup.js +2 -2
- package/dist/cdn/components/arudha-padas.js +2 -2
- package/dist/cdn/components/ashtakavarga-grid.js +1 -1
- package/dist/cdn/components/aspects-table.js +2 -2
- package/dist/cdn/components/astrocartography-map.js +1 -1
- package/dist/cdn/components/bazi-chart.js +2 -2
- package/dist/cdn/components/bhav-chalit-table.js +2 -2
- package/dist/cdn/components/bhava-bala-table.js +3 -3
- package/dist/cdn/components/biorhythm-chart.js +2 -2
- package/dist/cdn/components/bodygraph.js +3 -3
- package/dist/cdn/components/chara-karakas.js +2 -2
- package/dist/cdn/components/choghadiya-grid.js +1 -1
- package/dist/cdn/components/compatibility-card.js +2 -2
- package/dist/cdn/components/compound-number.js +2 -2
- 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 +2 -2
- package/dist/cdn/components/data.js +1 -1
- package/dist/cdn/components/divisional-chart.js +1 -1
- package/dist/cdn/components/dosha-card.js +2 -2
- package/dist/cdn/components/dosha-constitution.js +2 -2
- package/dist/cdn/components/dream-card.js +1 -1
- package/dist/cdn/components/dream-search.js +2 -2
- package/dist/cdn/components/endpoint-form.js +2 -2
- 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 +2 -2
- 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 +2 -2
- package/dist/cdn/components/guna-milan.js +3 -3
- package/dist/cdn/components/hd-connection.js +1 -1
- package/dist/cdn/components/hd-penta.js +15 -15
- 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 +2 -2
- package/dist/cdn/components/hexagram.js +1 -1
- package/dist/cdn/components/hora-table.js +1 -1
- package/dist/cdn/components/horoscope-card.js +3 -3
- package/dist/cdn/components/kp-chart.js +3 -3
- package/dist/cdn/components/kp-finance-card.js +2 -2
- package/dist/cdn/components/kp-planets-table.js +3 -3
- package/dist/cdn/components/kp-ruling-planets.js +1 -1
- package/dist/cdn/components/kua-card.js +3 -3
- 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 +3 -3
- package/dist/cdn/components/mayan-day-sign.js +1 -1
- package/dist/cdn/components/moon-phase.js +2 -2
- package/dist/cdn/components/nakshatra-card.js +1 -1
- package/dist/cdn/components/natal-chart.js +17 -17
- package/dist/cdn/components/numerology-card.js +2 -2
- package/dist/cdn/components/panchang-table.js +2 -2
- package/dist/cdn/components/positions-table.js +1 -1
- package/dist/cdn/components/profection-card.js +2 -2
- package/dist/cdn/components/reference-card.js +1 -1
- package/dist/cdn/components/relocation-wheel.js +17 -17
- 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 +2 -2
- package/dist/cdn/components/tarot-catalog.js +2 -2
- package/dist/cdn/components/tarot-spread.js +3 -3
- package/dist/cdn/components/transit-wheel.js +1 -1
- package/dist/cdn/components/transits-table.js +2 -2
- package/dist/cdn/components/upagraha-table.js +3 -3
- package/dist/cdn/components/vastu-mandala.js +2 -2
- package/dist/cdn/components/vedic-aspects.js +2 -2
- package/dist/cdn/components/vedic-daily.js +2 -2
- 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 +2 -2
- package/dist/cdn/components/zodiac-card.js +2 -2
- package/dist/cdn/locales/de.js +1 -1
- package/dist/cdn/locales/es.js +1 -1
- package/dist/cdn/locales/fr.js +1 -1
- package/dist/cdn/locales/hi.js +1 -1
- package/dist/cdn/locales/pt.js +1 -1
- package/dist/cdn/locales/ru.js +1 -1
- package/dist/cdn/locales/tr.js +1 -1
- package/dist/cdn/roxy-ui.js +85 -85
- package/dist/charts.cjs +13 -13
- package/dist/charts.js +10 -10
- 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 +2 -2
- 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.d.ts +24 -8
- 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 +2 -2
- 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.d.ts +5 -0
- package/dist/components/natal-chart.js +14 -14
- 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 +15 -15
- 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.d.ts +2 -0
- package/dist/components/tarot-spread.js +1 -1
- package/dist/components/transit-wheel.js +8 -8
- package/dist/components/transits-table.js +1 -1
- package/dist/components/upagraha-table.js +1 -1
- package/dist/components/vastu-mandala.js +2 -2
- package/dist/components/vedic-aspects.js +1 -1
- package/dist/components/vedic-daily.js +1 -1
- package/dist/components/vedic-kundli.js +2 -2
- package/dist/components/vedic-planets-table.js +1 -1
- package/dist/components/western-planets-table.d.ts +1 -0
- 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/forms.json +1 -1
- package/dist/i18n/chrome-strings.d.ts +1 -1
- package/dist/index.cjs +111 -111
- package/dist/index.js +95 -95
- package/dist/locales/de.js +1 -1
- package/dist/locales/es.js +1 -1
- package/dist/locales/fr.js +1 -1
- package/dist/locales/hi.js +1 -1
- package/dist/locales/pt.js +1 -1
- package/dist/locales/ru.js +1 -1
- package/dist/locales/tr.js +1 -1
- package/dist/manifest.json +1 -1
- package/dist/schemas/get--astrology-horoscope-sign-daily.json +1 -1
- package/dist/schemas/get--astrology-horoscope-sign-monthly.json +1 -1
- package/dist/schemas/get--astrology-horoscope-sign-weekly.json +1 -1
- package/dist/schemas/post--astrology-aspect-patterns.json +1 -1
- package/dist/types/types.gen.d.ts +407 -63
- package/dist/utils/base-element.d.ts +2 -1
- package/dist/utils/format.d.ts +2 -0
- package/dist/utils/interp-accordion.d.ts +2 -2
- package/dist/utils/string.d.ts +2 -0
- package/dist/utils/tarot.d.ts +2 -0
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var RoxyUI_upagraha_table=(()=>{var H=Object.defineProperty;var Et=Object.getOwnPropertyDescriptor;var Oe=Object.getOwnPropertyNames;var Le=Object.prototype.hasOwnProperty;var Ue=(n,t)=>{for(var e in t)H(n,e,{get:t[e],enumerable:true})},
|
|
2
|
-
\f\r]`,
|
|
3
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ot=/'/g,Lt=/"/g,It=/^(?:script|style|textarea|title)$/i,ft=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),c=ft(1),Lr=ft(2),Ur=ft(3),A=Symbol.for("lit-noChange"),l=Symbol.for("lit-nothing"),Ut=new WeakMap,$=k.createTreeWalker(k,129);function Gt(n,t){if(!gt(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ct!==void 0?Ct.createHTML(t):t}var Ve=(n,t)=>{let e=n.length-1,r=[],o,i=t===2?"<svg>":t===3?"<math>":"",s=M;for(let d=0;d<e;d++){let a=n[d],y,u,m=-1,b=0;for(;b<a.length&&(s.lastIndex=b,u=s.exec(a),u!==null);)b=s.lastIndex,s===M?u[1]==="!--"?s=Rt:u[1]!==void 0?s=Ft:u[2]!==void 0?(It.test(u[2])&&(o=RegExp("</"+u[2],"g")),s=T):u[3]!==void 0&&(s=T):s===T?u[0]===">"?(s=o??M,m=-1):u[1]===void 0?m=-2:(m=s.lastIndex-u[2].length,y=u[1],s=u[3]===void 0?T:u[3]==='"'?Lt:Ot):s===Lt||s===Ot?s=T:s===Rt||s===Ft?s=M:(s=T,o=void 0);let v=s===T&&n[d+1].startsWith("/>")?" ":"";i+=s===M?a+qe:m>=0?(r.push(y),a.slice(0,m)+Mt+a.slice(m)+w+v):a+w+(m===-2?d:v)}return[Gt(n,i+(n[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},G=class n{constructor({strings:t,_$litType$:e},r){let o;this.parts=[];let i=0,s=0,d=t.length-1,a=this.parts,[y,u]=Ve(t,e);if(this.el=n.createElement(y,r),$.currentNode=this.el.content,e===2||e===3){let m=this.el.content.firstChild;m.replaceWith(...m.childNodes)}for(;(o=$.nextNode())!==null&&a.length<d;){if(o.nodeType===1){if(o.hasAttributes())for(let m of o.getAttributeNames())if(m.endsWith(Mt)){let b=u[s++],v=o.getAttribute(m).split(w),B=/([.?@])?(.*)/.exec(b);a.push({type:1,index:i,name:B[2],strings:v,ctor:B[1]==="."?pt:B[1]==="?"?ht:B[1]==="@"?ut:R}),o.removeAttribute(m)}else m.startsWith(w)&&(a.push({type:6,index:i}),o.removeAttribute(m));if(It.test(o.tagName)){let m=o.textContent.split(w),b=m.length-1;if(b>0){o.textContent=V?V.emptyScript:"";for(let v=0;v<b;v++)o.append(m[v],N()),$.nextNode(),a.push({type:2,index:++i});o.append(m[b],N())}}}else if(o.nodeType===8)if(o.data===Nt)a.push({type:2,index:i});else{let m=-1;for(;(m=o.data.indexOf(w,m+1))!==-1;)a.push({type:7,index:i}),m+=w.length-1}i++}}static createElement(t,e){let r=k.createElement("template");return r.innerHTML=t,r}};function C(n,t,e=n,r){if(t===A)return t;let o=r!==void 0?e._$Co?.[r]:e._$Cl,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=C(n,o._$AS(n,t.values),o,r)),t}var ct=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:r}=this._$AD,o=(t?.creationScope??k).importNode(e,true);$.currentNode=o;let i=$.nextNode(),s=0,d=0,a=r[0];for(;a!==void 0;){if(s===a.index){let y;a.type===2?y=new D(i,i.nextSibling,this,t):a.type===1?y=new a.ctor(i,a.name,a.strings,this,t):a.type===6&&(y=new mt(i,this,t)),this._$AV.push(y),a=r[++d]}s!==a?.index&&(i=$.nextNode(),s++)}return $.currentNode=k,o}p(t){let e=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++}},D=class n{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,r,o){this.type=2,this._$AH=l,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=o,this._$Cv=o?.isConnected??true}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=C(this,t,e),I(t)?t===l||t==null||t===""?(this._$AH!==l&&this._$AR(),this._$AH=l):t!==this._$AH&&t!==A&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Ye(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==l&&I(this._$AH)?this._$AA.nextSibling.data=t:this.T(k.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:r}=t,o=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=G.createElement(Gt(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===o)this._$AH.p(e);else{let i=new ct(o,this),s=i.u(this.options);i.p(e),this.T(s),this._$AH=i}}_$AC(t){let e=Ut.get(t.strings);return e===void 0&&Ut.set(t.strings,e=new G(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(N()),this.O(N()),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))}},R=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,o,i){this.type=1,this._$AH=l,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=l}_$AI(t,e=this,r,o){let i=this.strings,s=false;if(i===void 0)t=C(this,t,e,0),s=!I(t)||t!==this._$AH&&t!==A,s&&(this._$AH=t);else{let d=t,a,y;for(t=i[0],a=0;a<i.length-1;a++)y=C(this,d[r+a],e,a),y===A&&(y=this._$AH[a]),s||=!I(y)||y!==this._$AH[a],y===l?t=l:t!==l&&(t+=(y??"")+i[a+1]),this._$AH[a]=y}s&&!o&&this.j(t)}j(t){t===l?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},pt=class extends R{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===l?void 0:t}},ht=class extends R{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==l)}},ut=class extends R{constructor(t,e,r,o,i){super(t,e,r,o,i),this.type=5}_$AI(t,e=this){if((t=C(this,t,e,0)??l)===A)return;let r=this._$AH,o=t===l&&r!==l||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,i=t!==l&&(r===l||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)}},mt=class{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){C(this,t)}};var We=yt.litHtmlPolyfillSupport;We?.(G,D),(yt.litHtmlVersions??=[]).push("3.3.3");var Dt=(n,t,e)=>{let r=e?.renderBefore??t,o=r._$litPart$;if(o===void 0){let i=e?.renderBefore??null;r._$litPart$=o=new D(t.insertBefore(N(),i),i,void 0,e??{})}return o._$AI(n),o};var xt=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=Dt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false)}render(){return A}};E._$litElement$=true,E.finalized=true,xt.litElementHydrateSupport?.({LitElement:E});var Je=xt.litElementPolyfillSupport;Je?.({LitElement:E});(xt.litElementVersions??=[]).push("4.2.2");var jt=[{endpoint:"vedic-astrology/upagraha",method:"POST"}];function W(n){return n.toLowerCase().replace(/[\s_-]+/g," ").trim()}function Bt(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 Ze=new RegExp("(?![\\d#*])\\p{Emoji}","gu"),Xe=n=>n.replace(Ze,"$&\uFE0E"),J=n=>Object.fromEntries(Object.entries(n).map(([t,e])=>[t,Xe(e)])),Qe=(n,t)=>t?n[W(t)]:void 0,Zr=J({sun:"\u2609",moon:"\u263D",mercury:"\u263F",venus:"\u2640",earth:"\u2641",mars:"\u2642",jupiter:"\u2643",saturn:"\u2644",uranus:"\u2645",neptune:"\u2646",pluto:"\u2BD3",rahu:"\u260A",ketu:"\u260B",ascendant:"Asc",midheaven:"MC","part of fortune":"\u2297",vertex:"Vx",lagna:"La","north node":"\u260A","south node":"\u260B",chiron:"\u26B7",lilith:"\u26B8","black moon lilith":"\u26B8"});var tr=J({aries:"\u2648",taurus:"\u2649",gemini:"\u264A",cancer:"\u264B",leo:"\u264C",virgo:"\u264D",libra:"\u264E",scorpio:"\u264F",sagittarius:"\u2650",capricorn:"\u2651",aquarius:"\u2652",pisces:"\u2653"}),Ht=n=>Qe(tr,n);var Kt=["Aries","Taurus","Gemini","Cancer","Leo","Virgo","Libra","Scorpio","Sagittarius","Capricorn","Aquarius","Pisces"],Xr=J({conjunction:"\u260C",semisextile:"\u26BA","semi sextile":"\u26BA",semisquare:"\u2220","semi square":"\u2220",sextile:"\u26B9",square:"\u25A1",trine:"\u25B3",sesquiquadrate:"\u26BC",quincunx:"\u26BB",opposition:"\u260D"});var Qr=J({heaven:"\u2630",lake:"\u2631",fire:"\u2632",thunder:"\u2633",wind:"\u2634",water:"\u2635",mountain:"\u2636",earth:"\u2637"});var er={attribute:true,type:String,converter:U,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(d){let a=t.get.call(this);t.set.call(this,d),this.requestUpdate(s,a,n,true,d)},init(d){return d!==void 0&&this.C(s,void 0,n,d),d}}}if(r==="setter"){let{name:s}=e;return function(d){let a=this[s];t.call(this,d),this.requestUpdate(s,a,n,true,d)}}throw Error("Unsupported decorator location: "+r)};function g(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 g({...n,state:true,attribute:false})}var _=n=>n??l;var zt=["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 bt(n,t){let e=n.toLowerCase();return t.find(r=>r.toLowerCase()===e)}function qt(n,t=zt){let e=St(n);if(!e)return;let r=bt(e,t);if(r)return r;let o=e.toLowerCase().split("-"),i=o[0];if(i==="zh"){let s=o.find(d=>d==="hans"||d==="hant")??nr[o[1]??""];return s?bt(`zh-${s}`,t):void 0}return bt(i,t)}var Wt="symbols";var or={Fraunces:["latin","latin-ext"],Jost:["latin","latin-ext","cyrillic"],Geist:["latin","latin-ext","cyrillic"]},vt='"Jost", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Yt='"Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Vt='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',X={"fraunces-jost":{name:"Fraunces with Jost",sans:vt,display:'"Fraunces", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif'},jost:{name:"Jost",sans:vt,display:vt},geist:{name:"Geist",sans:Yt,display:Yt},system:{name:"System",sans:Vt,display:Vt}};function Jt(n){let{sans:t,display:e}=X[n];return Object.keys(or).filter(r=>`${t} ${e}`.includes(`"${r}"`))}var Zt="1.6.2";var ir=/^(.*)\/cdn\/(?:roxy-ui|components\/[\w-]+)\.js$/,sr=/^(.*\/dist)\/(?:index|components\/[\w-]+)\.js$/;function Xt(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)",Qt=/^#(?:[\da-f]{3}|[\da-f]{6})$/i;function te(n){return n!==void 0&&Object.hasOwn(X,n)}function ee(n){let t=[];return n.brandColor&&Qt.test(n.brandColor)&&t.push(`--roxy-primary:${n.brandColor}`),n.brandAccent&&Qt.test(n.brandAccent)&&t.push(`--roxy-accent:${n.brandAccent}`,`--roxy-accent-ink:light-dark(${ar},${dr})`,`--roxy-ring:${lr}`),t.join(";")}function re(n,t){if(te(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,d,a;try{let y=globalThis.getComputedStyle(n),u=m=>y.getPropertyValue(m).trim();s=u("--roxy-font-sans"),d=u("--roxy-font-display"),a=u("--roxy-font")}finally{i?.sheet&&(i.sheet.disabled=false)}if(!(s||d))return te(a)?a:void 0}function ne(n){let{sans:t,display:e}=X[n];return`--roxy-font:${n};--roxy-font-sans:${t};--roxy-font-display:${e}`}var oe=Xt(Zt,globalThis.document?.currentScript?.src||cr.url);function ie(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 se(n,t=oe){Jt(n).length>0&&ie(n,t)}function ae(n=oe){ie(Wt,n)}var de='@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 Q="roxy-ui-tokens";function tt(){if(typeof document>"u")return null;let n=document.getElementById(Q);if(n)return n;let t=document.createElement("style");return t.id=Q,t.textContent=de,document.head.prepend(t),t}var le="__ROXY_UI_I18N__";function ce(){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 pe(n,t,e){return pr(hr(n,t)??t,e)}function hr(n,t){if(!n)return;let{catalogs:e}=ce(),r=n.toLowerCase();return(e[r]??e[r.split("-")[0]])?.[W(t)]}function he(n){let{listeners:t}=ce();return t.add(n),()=>{t.delete(n)}}var et=class{constructor(t){this.host=t,t.addController(this)}hostConnected(){this.unsubscribe=he(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var rt=class extends E{constructor(){super();this.translator=(e,r)=>this.t(e,r);new et(this)}connectedCallback(){super.connectedCallback(),tt()}updated(e){super.updated(e),this.renderRoot.querySelector(".roxy-glyph")&&ae()}fontDeclarations(e){let r=re(this,e);return r?(se(r),ne(r)):""}renderFontStyle(){let e=this.fontDeclarations();return e?c`<style>:host{${e}}</style>`:l}t(e,r){return pe(this.effectiveLang(),e,r)}effectiveLang(){return St(this)}};var ue=f`:where(.roxy-glyph){font-family:var(--roxy-font-symbol)}`;function me(n){return n?c`<span class="roxy-glyph" aria-hidden="true">${n}</span>`:l}var ye=f`: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 ur=f`: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);letter-spacing:var(--roxy-tracking-normal);word-spacing: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(:focus){outline:none!important}: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}`,nt=[ur,ye,ue];var mr="__cols",yr="__rows";function gr(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function ot(n){if(Array.isArray(n)){let i=false,s=n.map(d=>{let a=ot(d);return a!==d&&(i=true),a});return i?s:n}if(!gr(n))return n;let t=n[mr],e=n[yr];if(Array.isArray(t)&&Array.isArray(e)&&Object.keys(n).length===2)return e.map(i=>{let s={};return t.forEach((d,a)=>{s[d]=ot(i[a])}),s});let r=false,o={};for(let[i,s]of Object.entries(n)){let d=ot(s);d!==s&&(r=true),o[i]=d}return r?o:n}function ge(n){return ot(n)}function fe(n,t){return n.find(e=>e.attrs&&Object.entries(e.attrs).every(([r,o])=>t[r]===o))??n[0]}var fr="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===fr?xe.sample:n.startsWith("pk_")?void 0:xe.secret}function Se(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 xr(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 we={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.")}}},F=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 Ee(n){return n.submitUrl?void 0:be(n.publishableKey)}async function wt(n,t,e){let r=Ee(n);if(r)throw new F(r.message);let o=n.submitUrl?await fetch(n.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:br(t,n.submitContext),signal:e}):await Sr(n,t,e);if(!o.ok){let i=await xr(o);throw new F(i.message,i.issues,i.worded,o.status,i.code)}return await o.json()}function br(n,t){return JSON.stringify(t?{...n,context:t}:n)}function Sr(n,t,e){let r=new URL(`${n.baseUrl??ve}${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 it=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=Ee(this);if(e){this.host.error=e.message,Se(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 wt(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 F&&(this.host.issues=o.issues,this.failure={status:o.status,code:o.code}),this.worded=o instanceof F&&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 Te(n,t,e,r=[]){let o={...e},i=`/${n.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(y,u)=>{let m=o[u];return delete o[u],encodeURIComponent(String(m??""))}),s=new Set(r),d={},a={};for(let[y,u]of Object.entries(o))u===void 0||u===""||(t==="GET"||s.has(y)?d[y]=u:a[y]=u);return{path:i,method:t,query:d,body:t==="POST"?a:void 0}}function $e(){return c`<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 xo=f`summary{list-style:none}summary::-webkit-details-marker{display:none}.roxy-chevron{aspect-ratio:auto;width:.7lh;height:.7lh;color:var(--roxy-muted);transition:transform var(--roxy-motion-duration) var(--roxy-motion-easing);flex-shrink:0}details[open]>summary .roxy-chevron{transform:rotate(180deg)}@media (prefers-reduced-motion:reduce){.roxy-chevron{transition:none}}`;var Eo=f`.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?l:c`<section class="block" part="section readings"><h3>${e}</h3>${r.map((o,i)=>c`<details class="interp-card" part="reading" name="${t}" ?open="${i===0}"><summary><span class="interp-lead">${me(o.glyph)} ${o.label}</span> ${$e()} ${o.aside?c`<span class="interp-aside"><small>${o.aside}</small></span>`:l}</summary><div class="interp-body"><p>${o.body}</p>${o.extra??l}</div></details>`)}</section>`}var vr="roxy-data";function wr(n){return n.nodeName==="SCRIPT"&&n.getAttribute("type")==="application/json"}var st=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(vr))return t;return null}parse(t){if(t?.trim())try{return JSON.parse(t)}catch{return}}};var p=class extends rt{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 wt(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(Te(r.endpoint,r.method,{...o.values,...this.ownRequest()},o.queryKeys??[]))};new st(this),this.fetcher=new it(this)}static{this.styles=[nt]}static{this.endpoints=[]}willUpdate(e){if(e.has("data")&&this.data!=null){let r=ge(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:fe(this.constructor.endpoints,this);return e&&{endpoint:e.endpoint,method:this.method??e.method}}render(){return c`${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")?c`<roxy-data .data="${e}" lang="${_(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=[ee(this),this.fontDeclarations(this.font)].filter(Boolean).join(";");if(e.length===0&&!r)return l;let o=(r?`:host{${r}}`:"")+e.map(i=>`[part~="${i}"],roxy-endpoint-form::part(${i}){display:none!important}`).join("");return c`<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()?c`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data):this.renderNoData()}renderInterpretation(e,r,o){return this.hideReadings?l:ke(e,r,this.t(o??"Reading"))}renderResult(e){let r=c`<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()?c`${r}${this.renderAttribution()}`:r}renderWithForm(e){return c`${this.renderForm()}${e}`}stickyBody(){return this.loading?this.renderLoading():this.error!=null?this.issues?l:this.renderErrorBanner(this.error):this.data==null?l:this.showAttribution()?c`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data)}renderMore(){let e=this.listRows(),r=this.data?.total;return!this.lastRequest||!e||typeof r!="number"?l:e.length>=r?l:c`<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?c`<p class="roxy-error" role="alert">${this.t(this.moreError)}</p>`:l}</div>`}listRows(){let e=this.listKey?this.data?.[this.listKey]:void 0;return Array.isArray(e)?e:void 0}fetchFresh(e){return this.lastRequest=e,this.openedRow=void 0,this.openedRowId=void 0,this.moreError=null,this.fetcher.run(e)}load(e){return this.hostLoaded=true,this.syncFetcher(),this.fetchFresh(e)}pickRow(e){this.dispatchEvent(new CustomEvent("roxy-symbol-select",{detail:e,bubbles:true,composed:true})),this.openRow(e.id)}openRow(e){if(!this.rowDetail||!(this.publishableKey||this.submitUrl))return;let r=this.openedRow??document.createElement(this.rowDetail.tag);r.publishableKey=this.publishableKey,r.baseUrl=this.baseUrl,r.submitUrl=this.submitUrl,r.submitContext=this.submitContext,r.hideReadings=this.hideReadings,r.hideSections=this.hideSections;let o=this.effectiveLang();o&&r.setAttribute("lang",o),this.openedRow=r,this.openedRowId=e,r.load({path:`/${this.rowDetail.path.replace("{id}",encodeURIComponent(e))}`,method:"GET",query:{lang:qt(this)}}).then(()=>r.scrollIntoView?.({block:"nearest"}))}showAttribution(){return this.attribution!=null&&this.attribution!=="off"&&this.attribution!=="false"}renderAttribution(){return c`<div class="roxy-attribution" part="attribution"><a href="https://roxyapi.com/?utm_source=widget&utm_medium=embed" target="_blank" rel="noopener">${this.t("Spiritual data by RoxyAPI")}</a></div>`}renderNoData(){return this.selfFetch()?this.renderWithForm(l):this.renderEmpty()}renderForm(){let e=this.selfFetch();return c`<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 c`<div class="roxy-empty" role="status" part="empty">${this.t("No data")}</div>`}renderLoading(){return c`<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?c`${o}${this.renderForm()}`:o}renderErrorBanner(e){return c`<div class="roxy-error" role="alert" part="error">${!this.fetcher.worded&&this.errorMessage||this.t(e)}</div>`}};h([g({attribute:false})],p.prototype,"data",2),h([g({type:String,attribute:"data-endpoint"})],p.prototype,"endpoint",2),h([g({type:String})],p.prototype,"method",2),h([g({type:String,attribute:"publishable-key"})],p.prototype,"publishableKey",2),h([g({type:String,attribute:"base-url"})],p.prototype,"baseUrl",2),h([g({type:String,attribute:"spec-url"})],p.prototype,"specUrl",2),h([g({type:String,attribute:"submit-url"})],p.prototype,"submitUrl",2),h([g({attribute:"submit-context",converter:we})],p.prototype,"submitContext",2),h([g({type:String,attribute:"location-url"})],p.prototype,"locationUrl",2),h([g({type:Boolean})],p.prototype,"remember",2),h([g({type:Boolean,attribute:"hide-readings",reflect:true})],p.prototype,"hideReadings",2),h([g({type:String,attribute:"hide-sections",reflect:true})],p.prototype,"hideSections",2),h([g({type:String,attribute:"brand-color"})],p.prototype,"brandColor",2),h([g({type:String,attribute:"brand-accent"})],p.prototype,"brandAccent",2),h([g({type:String})],p.prototype,"font",2),h([g({type:String})],p.prototype,"hemisphere",2),h([g({type:String,attribute:"submit-label"})],p.prototype,"submitLabel",2),h([g({type:String,attribute:"error-message"})],p.prototype,"errorMessage",2),h([g({type:String})],p.prototype,"attribution",2),h([x()],p.prototype,"loading",2),h([x()],p.prototype,"error",2),h([x()],p.prototype,"issues",2),h([x()],p.prototype,"selfFetched",2),h([x()],p.prototype,"editing",2),h([x()],p.prototype,"sticky",2),h([x()],p.prototype,"openedRow",2),h([x()],p.prototype,"openedRowId",2),h([x()],p.prototype,"moreLoading",2),h([x()],p.prototype,"moreError",2);var Ae=n=>t=>{customElements.get(n)||customElements.define(n,t)};function Er(n){let t=n%360;return t<0?t+360:t}function Tr(n){let t=Er(n),e=Math.floor(t/30)%12,r=t%30,o=Math.floor(r),i=(r-o)*60,s=Math.floor(i),d=Math.round((i-s)*60);return{sign:Kt[e]??"Aries",signIndex:e,degree:o,minute:s,second:d}}function _e(n,t){let{sign:e,degree:r,minute:o}=Tr(n);return`${r}\xB0 ${t||e} ${String(o).padStart(2,"0")}'`}var Pe=new Map;function $r(n){if(!n)return["en"];let t=Pe.get(n);if(t)return[t,"en"];let e="en";try{e=Intl.getCanonicalLocales(n)[0]??"en"}catch{e="en"}return Pe.set(n,e),[e,"en"]}function j(n,t,e=1){return typeof t!="number"||!Number.isFinite(t)?"":t.toLocaleString($r(n),{maximumFractionDigits:e})}var kr={"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"?kr[t]??Bt(t):"",o=typeof e=="number"?`${j(n,e,2)}\xB0`:"";return r&&o?`${r} (${o})`:r||o}var Re=f`.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 Fe(n,t,e){if(!t?.ayanamsa)return l;let r=Ce(n,t.ayanamsa);if(!r)return l;let o=typeof t.ayanamsaDegrees=="number"?j(n,t.ayanamsaDegrees,4):void 0;return c`<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>`}var Ar=[{key:"timeBased",titleSource:"Time based",noteSource:"From the eightfold division of the day or night, so these depend on the birth time, the place and the weekday."},{key:"sunBased",titleSource:"Sun based",noteSource:"The Dhuma group, derived by fixed arc from the Sun. Dhuma is the Sun plus 133 degrees 20 minutes, and each of the rest follows from the one before it."}],P=class extends p{renderData(t){let e=Ar.filter(r=>t[r.key]?.length);return e.length?c`<div class="wrap" part="card" aria-label="${this.t("Upagraha positions")}"><header class="head" part="header"><h2>${this.t("Upagrahas")}</h2>${Fe(this.effectiveLang(),t.frame,this.translator)}</header>${e.map(r=>this.renderGroup(r,t[r.key]))}</div>`:this.renderEmpty()}renderGroup(t,e){let r=c`<div class="group-head"><h3>${this.t(t.titleSource)}</h3><p class="group-note">${this.t(t.noteSource)}</p></div><div class="scroll" part="table" tabindex="0" role="region" aria-label="${this.t(t.titleSource)}"><table role="table"><caption class="roxy-sr-only">${this.t("{{group}} upagrahas: each sub-planet with its rashi, degree in sign, sidereal longitude, and nakshatra with pada.",{group:this.t(t.titleSource)})}</caption><thead><tr><th scope="col">${this.t("Upagraha")}</th><th scope="col">${this.t("Rashi")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("Longitude")}</th><th scope="col">${this.t("Nakshatra")}</th><th scope="col">${this.t("Pada")}</th></tr></thead><tbody>${e.map(o=>{let i=Ht(o.rashi)??"";return c`<tr><td class="name">${o.name}</td><td>${i?c`<span class="glyph roxy-glyph">${i}</span>`:l}${o.rashi??""}</td><td>${typeof o.longitude=="number"?_e(o.longitude):""}</td><td>${j(this.effectiveLang(),o.longitude,2)}</td><td>${o.nakshatra??""}</td><td>${o.nakshatraPada??""}</td></tr>`})}</tbody></table></div>`;return t.key==="timeBased"?c`<section part="section time-based">${r}</section>`:c`<section part="section sun-based">${r}</section>`}};P.endpoints=jt,P.styles=[nt,Re,f`.wrap{overflow:hidden}.head{padding:var(--roxy-space-md);border-block-end:1px solid var(--roxy-border)}h2,h3,p{margin:0}.group-head{gap:var(--roxy-space-xs);padding:var(--roxy-space-md) var(--roxy-space-md) 0;display:grid}.group-note{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td{white-space:nowrap}:is(th,td):first-child{padding-inline-start:var(--roxy-space-md)}:is(th,td):last-child{padding-inline-end:var(--roxy-space-md)}tbody tr:last-child td{border-block-end:0}td.name{font-weight:var(--roxy-weight-bold)}.glyph{color:var(--roxy-muted);margin-inline-end:var(--roxy-space-xs)}`],P=h([Ae("roxy-upagraha-table")],P);return Ne(_r)})();
|
|
1
|
+
var RoxyUI_upagraha_table=(()=>{var H=Object.defineProperty;var Et=Object.getOwnPropertyDescriptor;var Oe=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 Oe(t))!Le.call(n,o)&&o!==e&&H(n,o,{get:()=>t[o],enumerable:!(r=Et(t,o))||r.enumerable});return n};var Me=n=>Ne(H({},"__esModule",{value:true}),n),h=(n,t,e,r)=>{for(var o=r>1?void 0:r?Et(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&&H(t,e,o),o};var _r={};Ue(_r,{ROXY_UI_TOKENS_STYLE_ID:()=>Q,RoxyUpagrahaTable:()=>P,injectRoxyTokens:()=>tt});var K=globalThis,z=K.ShadowRoot&&(K.ShadyCSS===void 0||K.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,at=Symbol(),Tt=new WeakMap,O=class{constructor(t,e,r){if(this._$cssResult$=true,r!==at)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(z&&t===void 0){let r=e!==void 0&&e.length===1;r&&(t=Tt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&Tt.set(e,t))}return t}toString(){return this.cssText}},$t=n=>new O(typeof n=="string"?n:n+"",void 0,at),f=(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 O(e,n,at)},kt=(n,t)=>{if(z)n.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let r=document.createElement("style"),o=K.litNonce;o!==void 0&&r.setAttribute("nonce",o),r.textContent=e.cssText,n.appendChild(r)}},dt=z?n=>n:n=>n instanceof CSSStyleSheet?(t=>{let e="";for(let r of t.cssRules)e+=r.cssText;return $t(e)})(n):n;var{is:Ie,defineProperty:Ge,getOwnPropertyDescriptor:De,getOwnPropertyNames:je,getOwnPropertySymbols:Be,getPrototypeOf:He}=Object,q=globalThis,At=q.trustedTypes,Ke=At?At.emptyScript:"",ze=q.reactiveElementPolyfillSupport,L=(n,t)=>n,U={toAttribute(n,t){switch(t){case Boolean:n=n?Ke: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),_t={attribute:true,type:String,converter:U,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=_t){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:i}=De(this.prototype,t)??{get(){return this[e]},set(s){this[e]=s}};return{get:o,set(s){let d=o?.call(this);i?.call(this,s),this.requestUpdate(t,d,r)},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??_t}static _$Ei(){if(this.hasOwnProperty(L("elementProperties")))return;let t=He(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),...Be(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(dt(o))}else t!==void 0&&e.push(dt(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 i=(r.converter?.toAttribute!==void 0?r.converter:U).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:U;this._$Em=o;let d=s.fromAttribute(e,i.type);this[o]=d??this._$Ej?.get(o)??d,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,d=this[o];s!==true||this._$AL.has(o)||d===void 0||this.C(o,void 0,i,d)}}let t=false,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(e)):this._$EM()}catch(r){throw t=false,this._$EM(),r}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=false}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};S.elementStyles=[],S.shadowRootOptions={mode:"open"},S[L("elementProperties")]=new Map,S[L("finalized")]=new Map,ze?.({ReactiveElement:S}),(q.reactiveElementVersions??=[]).push("2.1.2");var yt=globalThis,Pt=n=>n,V=yt.trustedTypes,Ct=V?V.createPolicy("lit-html",{createHTML:n=>n}):void 0,Nt="$lit$",w=`lit$${Math.random().toFixed(9).slice(2)}$`,Mt="?"+w,qe=`<${Mt}>`,k=document,M=()=>k.createComment(""),I=n=>n===null||typeof n!="object"&&typeof n!="function",gt=Array.isArray,Ye=n=>gt(n)||typeof n?.[Symbol.iterator]=="function",lt=`[
|
|
2
|
+
\f\r]`,N=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Rt=/-->/g,Ft=/>/g,T=RegExp(`>|${lt}(?:([^\\s"'>=/]+)(${lt}*=${lt}*(?:[^
|
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ot=/'/g,Lt=/"/g,It=/^(?:script|style|textarea|title)$/i,ft=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),c=ft(1),Lr=ft(2),Ur=ft(3),A=Symbol.for("lit-noChange"),l=Symbol.for("lit-nothing"),Ut=new WeakMap,$=k.createTreeWalker(k,129);function Gt(n,t){if(!gt(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ct!==void 0?Ct.createHTML(t):t}var Ve=(n,t)=>{let e=n.length-1,r=[],o,i=t===2?"<svg>":t===3?"<math>":"",s=N;for(let d=0;d<e;d++){let a=n[d],y,u,m=-1,b=0;for(;b<a.length&&(s.lastIndex=b,u=s.exec(a),u!==null);)b=s.lastIndex,s===N?u[1]==="!--"?s=Rt:u[1]!==void 0?s=Ft:u[2]!==void 0?(It.test(u[2])&&(o=RegExp("</"+u[2],"g")),s=T):u[3]!==void 0&&(s=T):s===T?u[0]===">"?(s=o??N,m=-1):u[1]===void 0?m=-2:(m=s.lastIndex-u[2].length,y=u[1],s=u[3]===void 0?T:u[3]==='"'?Lt:Ot):s===Lt||s===Ot?s=T:s===Rt||s===Ft?s=N:(s=T,o=void 0);let v=s===T&&n[d+1].startsWith("/>")?" ":"";i+=s===N?a+qe:m>=0?(r.push(y),a.slice(0,m)+Nt+a.slice(m)+w+v):a+w+(m===-2?d:v)}return[Gt(n,i+(n[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},G=class n{constructor({strings:t,_$litType$:e},r){let o;this.parts=[];let i=0,s=0,d=t.length-1,a=this.parts,[y,u]=Ve(t,e);if(this.el=n.createElement(y,r),$.currentNode=this.el.content,e===2||e===3){let m=this.el.content.firstChild;m.replaceWith(...m.childNodes)}for(;(o=$.nextNode())!==null&&a.length<d;){if(o.nodeType===1){if(o.hasAttributes())for(let m of o.getAttributeNames())if(m.endsWith(Nt)){let b=u[s++],v=o.getAttribute(m).split(w),B=/([.?@])?(.*)/.exec(b);a.push({type:1,index:i,name:B[2],strings:v,ctor:B[1]==="."?pt:B[1]==="?"?ht:B[1]==="@"?ut:R}),o.removeAttribute(m)}else m.startsWith(w)&&(a.push({type:6,index:i}),o.removeAttribute(m));if(It.test(o.tagName)){let m=o.textContent.split(w),b=m.length-1;if(b>0){o.textContent=V?V.emptyScript:"";for(let v=0;v<b;v++)o.append(m[v],M()),$.nextNode(),a.push({type:2,index:++i});o.append(m[b],M())}}}else if(o.nodeType===8)if(o.data===Mt)a.push({type:2,index:i});else{let m=-1;for(;(m=o.data.indexOf(w,m+1))!==-1;)a.push({type:7,index:i}),m+=w.length-1}i++}}static createElement(t,e){let r=k.createElement("template");return r.innerHTML=t,r}};function C(n,t,e=n,r){if(t===A)return t;let o=r!==void 0?e._$Co?.[r]:e._$Cl,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=C(n,o._$AS(n,t.values),o,r)),t}var ct=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:r}=this._$AD,o=(t?.creationScope??k).importNode(e,true);$.currentNode=o;let i=$.nextNode(),s=0,d=0,a=r[0];for(;a!==void 0;){if(s===a.index){let y;a.type===2?y=new D(i,i.nextSibling,this,t):a.type===1?y=new a.ctor(i,a.name,a.strings,this,t):a.type===6&&(y=new mt(i,this,t)),this._$AV.push(y),a=r[++d]}s!==a?.index&&(i=$.nextNode(),s++)}return $.currentNode=k,o}p(t){let e=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++}},D=class n{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,r,o){this.type=2,this._$AH=l,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=o,this._$Cv=o?.isConnected??true}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=C(this,t,e),I(t)?t===l||t==null||t===""?(this._$AH!==l&&this._$AR(),this._$AH=l):t!==this._$AH&&t!==A&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Ye(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==l&&I(this._$AH)?this._$AA.nextSibling.data=t:this.T(k.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:r}=t,o=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=G.createElement(Gt(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===o)this._$AH.p(e);else{let i=new ct(o,this),s=i.u(this.options);i.p(e),this.T(s),this._$AH=i}}_$AC(t){let e=Ut.get(t.strings);return e===void 0&&Ut.set(t.strings,e=new G(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(M()),this.O(M()),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))}},R=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,o,i){this.type=1,this._$AH=l,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=l}_$AI(t,e=this,r,o){let i=this.strings,s=false;if(i===void 0)t=C(this,t,e,0),s=!I(t)||t!==this._$AH&&t!==A,s&&(this._$AH=t);else{let d=t,a,y;for(t=i[0],a=0;a<i.length-1;a++)y=C(this,d[r+a],e,a),y===A&&(y=this._$AH[a]),s||=!I(y)||y!==this._$AH[a],y===l?t=l:t!==l&&(t+=(y??"")+i[a+1]),this._$AH[a]=y}s&&!o&&this.j(t)}j(t){t===l?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},pt=class extends R{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===l?void 0:t}},ht=class extends R{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==l)}},ut=class extends R{constructor(t,e,r,o,i){super(t,e,r,o,i),this.type=5}_$AI(t,e=this){if((t=C(this,t,e,0)??l)===A)return;let r=this._$AH,o=t===l&&r!==l||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,i=t!==l&&(r===l||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)}},mt=class{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){C(this,t)}};var We=yt.litHtmlPolyfillSupport;We?.(G,D),(yt.litHtmlVersions??=[]).push("3.3.3");var Dt=(n,t,e)=>{let r=e?.renderBefore??t,o=r._$litPart$;if(o===void 0){let i=e?.renderBefore??null;r._$litPart$=o=new D(t.insertBefore(M(),i),i,void 0,e??{})}return o._$AI(n),o};var xt=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=Dt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false)}render(){return A}};E._$litElement$=true,E.finalized=true,xt.litElementHydrateSupport?.({LitElement:E});var Ze=xt.litElementPolyfillSupport;Ze?.({LitElement:E});(xt.litElementVersions??=[]).push("4.2.2");var jt=[{endpoint:"vedic-astrology/upagraha",method:"POST"}];function W(n){return n.toLowerCase().replace(/[\s_-]+/g," ").trim()}function Bt(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 Je=new RegExp("(?![\\d#*])\\p{Emoji}","gu"),Xe=n=>n.replace(Je,"$&\uFE0E"),Z=n=>Object.fromEntries(Object.entries(n).map(([t,e])=>[t,Xe(e)])),Qe=(n,t)=>t?n[W(t)]:void 0,Jr=Z({sun:"\u2609",moon:"\u263D",mercury:"\u263F",venus:"\u2640",earth:"\u2641",mars:"\u2642",jupiter:"\u2643",saturn:"\u2644",uranus:"\u2645",neptune:"\u2646",pluto:"\u2BD3",rahu:"\u260A",ketu:"\u260B",ascendant:"Asc",midheaven:"MC","part of fortune":"\u2297",vertex:"Vx",lagna:"La","north node":"\u260A","south node":"\u260B",chiron:"\u26B7",lilith:"\u26B8","black moon lilith":"\u26B8"});var tr=Z({aries:"\u2648",taurus:"\u2649",gemini:"\u264A",cancer:"\u264B",leo:"\u264C",virgo:"\u264D",libra:"\u264E",scorpio:"\u264F",sagittarius:"\u2650",capricorn:"\u2651",aquarius:"\u2652",pisces:"\u2653"}),Ht=n=>Qe(tr,n);var Kt=["Aries","Taurus","Gemini","Cancer","Leo","Virgo","Libra","Scorpio","Sagittarius","Capricorn","Aquarius","Pisces"],Xr=Z({conjunction:"\u260C",semisextile:"\u26BA","semi sextile":"\u26BA",semisquare:"\u2220","semi square":"\u2220",sextile:"\u26B9",square:"\u25A1",trine:"\u25B3",sesquiquadrate:"\u26BC",quincunx:"\u26BB",opposition:"\u260D"});var Qr=Z({heaven:"\u2630",lake:"\u2631",fire:"\u2632",thunder:"\u2633",wind:"\u2634",water:"\u2635",mountain:"\u2636",earth:"\u2637"});var er={attribute:true,type:String,converter:U,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(d){let a=t.get.call(this);t.set.call(this,d),this.requestUpdate(s,a,n,true,d)},init(d){return d!==void 0&&this.C(s,void 0,n,d),d}}}if(r==="setter"){let{name:s}=e;return function(d){let a=this[s];t.call(this,d),this.requestUpdate(s,a,n,true,d)}}throw Error("Unsupported decorator location: "+r)};function g(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 g({...n,state:true,attribute:false})}var _=n=>n??l;var zt=["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 bt(n,t){let e=n.toLowerCase();return t.find(r=>r.toLowerCase()===e)}function qt(n,t=zt){let e=St(n);if(!e)return;let r=bt(e,t);if(r)return r;let o=e.toLowerCase().split("-"),i=o[0];if(i==="zh"){let s=o.find(d=>d==="hans"||d==="hant")??nr[o[1]??""];return s?bt(`zh-${s}`,t):void 0}return bt(i,t)}var Wt="symbols";var or={Fraunces:["latin","latin-ext"],Jost:["latin","latin-ext","cyrillic"],Geist:["latin","latin-ext","cyrillic"]},vt='"Jost", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Yt='"Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Vt='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',X={"fraunces-jost":{name:"Fraunces with Jost",sans:vt,display:'"Fraunces", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif'},jost:{name:"Jost",sans:vt,display:vt},geist:{name:"Geist",sans:Yt,display:Yt},system:{name:"System",sans:Vt,display:Vt}};function Zt(n){let{sans:t,display:e}=X[n];return Object.keys(or).filter(r=>`${t} ${e}`.includes(`"${r}"`))}var Jt="1.8.0";var ir=/^(.*)\/cdn\/(?:roxy-ui|components\/[\w-]+)\.js$/,sr=/^(.*\/dist)\/(?:index|components\/[\w-]+)\.js$/;function Xt(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)",Qt=/^#(?:[\da-f]{3}|[\da-f]{6})$/i;function te(n){return n!==void 0&&Object.hasOwn(X,n)}function ee(n){let t=[];return n.brandColor&&Qt.test(n.brandColor)&&t.push(`--roxy-primary:${n.brandColor}`),n.brandAccent&&Qt.test(n.brandAccent)&&t.push(`--roxy-accent:${n.brandAccent}`,`--roxy-accent-ink:light-dark(${ar},${dr})`,`--roxy-ring:${lr}`),t.join(";")}function re(n,t){if(te(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,d,a;try{let y=globalThis.getComputedStyle(n),u=m=>y.getPropertyValue(m).trim();s=u("--roxy-font-sans"),d=u("--roxy-font-display"),a=u("--roxy-font")}finally{i?.sheet&&(i.sheet.disabled=false)}if(!(s||d))return te(a)?a:void 0}function ne(n){let{sans:t,display:e}=X[n];return`--roxy-font:${n};--roxy-font-sans:${t};--roxy-font-display:${e}`}var oe=Xt(Jt,globalThis.document?.currentScript?.src||cr.url);function ie(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 se(n,t=oe){Zt(n).length>0&&ie(n,t)}function ae(n=oe){ie(Wt,n)}var de='@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 Q="roxy-ui-tokens";function tt(){if(typeof document>"u")return null;let n=document.getElementById(Q);if(n)return n;let t=document.createElement("style");return t.id=Q,t.textContent=de,document.head.prepend(t),t}var le="__ROXY_UI_I18N__";function ce(){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 pe(n,t,e){return pr(hr(n,t)??t,e)}function hr(n,t){if(!n)return;let{catalogs:e}=ce(),r=n.toLowerCase();return(e[r]??e[r.split("-")[0]])?.[W(t)]}function he(n){let{listeners:t}=ce();return t.add(n),()=>{t.delete(n)}}var et=class{constructor(t){this.host=t,t.addController(this)}hostConnected(){this.unsubscribe=he(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var rt=class extends E{constructor(){super();this.translator=(e,r)=>this.t(e,r);new et(this)}connectedCallback(){super.connectedCallback(),tt()}updated(e){super.updated(e),this.renderRoot.querySelector(".roxy-glyph")&&ae()}fontDeclarations(e){let r=re(this,e);return r?(se(r),ne(r)):""}renderFontStyle(){let e=this.fontDeclarations();return e?c`<style>:host{${e}}</style>`:l}t(e,r){return pe(this.effectiveLang(),e,r)}effectiveLang(){return St(this)}};var ue=f`:where(.roxy-glyph){font-family:var(--roxy-font-symbol)}`;function me(n){return n?c`<span class="roxy-glyph" aria-hidden="true">${n}</span>`:l}var ye=f`: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 ur=f`: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);letter-spacing:var(--roxy-tracking-normal);word-spacing: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(:focus){outline:none!important}: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}`,nt=[ur,ye,ue];var mr="__cols",yr="__rows";function gr(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function ot(n){if(Array.isArray(n)){let i=false,s=n.map(d=>{let a=ot(d);return a!==d&&(i=true),a});return i?s:n}if(!gr(n))return n;let t=n[mr],e=n[yr];if(Array.isArray(t)&&Array.isArray(e)&&Object.keys(n).length===2)return e.map(i=>{let s={};return t.forEach((d,a)=>{s[d]=ot(i[a])}),s});let r=false,o={};for(let[i,s]of Object.entries(n)){let d=ot(s);d!==s&&(r=true),o[i]=d}return r?o:n}function ge(n){return ot(n)}function fe(n,t){return n.find(e=>e.attrs&&Object.entries(e.attrs).every(([r,o])=>t[r]===o))??n[0]}var fr="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===fr?xe.sample:n.startsWith("pk_")?void 0:xe.secret}function Se(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 xr(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 we={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.")}}},F=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 Ee(n){return n.submitUrl?void 0:be(n.publishableKey)}async function wt(n,t,e){let r=Ee(n);if(r)throw new F(r.message);let o=n.submitUrl?await fetch(n.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:br(t,n.submitContext),signal:e}):await Sr(n,t,e);if(!o.ok){let i=await xr(o);throw new F(i.message,i.issues,i.worded,o.status,i.code)}return await o.json()}function br(n,t){return JSON.stringify(t?{...n,context:t}:n)}function Sr(n,t,e){let r=new URL(`${n.baseUrl??ve}${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 it=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=Ee(this);if(e){this.host.error=e.message,Se(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 wt(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 F&&(this.host.issues=o.issues,this.failure={status:o.status,code:o.code}),this.worded=o instanceof F&&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 Te(n,t,e,r=[]){let o={...e},i=`/${n.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(y,u)=>{let m=o[u];return delete o[u],encodeURIComponent(String(m??""))}),s=new Set(r),d={},a={};for(let[y,u]of Object.entries(o))u===void 0||u===""||(t==="GET"||s.has(y)?d[y]=u:a[y]=u);return{path:i,method:t,query:d,body:t==="POST"?a:void 0}}function $e(){return c`<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 xo=f`summary{list-style:none}summary::-webkit-details-marker{display:none}.roxy-chevron{aspect-ratio:auto;width:.7lh;height:.7lh;color:var(--roxy-muted);transition:transform var(--roxy-motion-duration) var(--roxy-motion-easing);flex-shrink:0}details[open]>summary .roxy-chevron{transform:rotate(180deg)}@media (prefers-reduced-motion:reduce){.roxy-chevron{transition:none}}`;var Eo=f`.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,r=false){let o=n.filter(i=>!!i.body);return o.length===0?l:c`<section class="block" part="section readings"><h3>${e}</h3>${o.map((i,s)=>c`<details class="interp-card" part="reading" name="${t}" ?open="${s===0&&!r}"><summary><span class="interp-lead">${me(i.glyph)} ${i.label}</span> ${$e()} ${i.aside?c`<span class="interp-aside"><small>${i.aside}</small></span>`:l}</summary><div class="interp-body"><p>${i.body}</p>${i.extra??l}</div></details>`)}</section>`}var vr="roxy-data";function wr(n){return n.nodeName==="SCRIPT"&&n.getAttribute("type")==="application/json"}var st=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(vr))return t;return null}parse(t){if(t?.trim())try{return JSON.parse(t)}catch{return}}};var p=class extends rt{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 wt(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(Te(r.endpoint,r.method,{...o.values,...this.ownRequest()},o.queryKeys??[]))};new st(this),this.fetcher=new it(this)}static{this.styles=[nt]}static{this.endpoints=[]}willUpdate(e){if(e.has("data")&&this.data!=null){let r=ge(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:fe(this.constructor.endpoints,this);return e&&{endpoint:e.endpoint,method:this.method??e.method}}render(){return c`${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")?c`<roxy-data .data="${e}" lang="${_(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=[ee(this),this.fontDeclarations(this.font)].filter(Boolean).join(";");if(e.length===0&&!r)return l;let o=(r?`:host{${r}}`:"")+e.map(i=>`[part~="${i}"],roxy-endpoint-form::part(${i}){display:none!important}`).join("");return c`<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()?c`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data):this.renderNoData()}renderInterpretation(e,r,o,i=false){return this.hideReadings?l:ke(e,r,this.t(o??"Reading"),i)}renderResult(e){let r=c`<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()?c`${r}${this.renderAttribution()}`:r}renderWithForm(e){return c`${this.renderForm()}${e}`}stickyBody(){return this.loading?this.renderLoading():this.error!=null?this.issues?l:this.renderErrorBanner(this.error):this.data==null?l:this.showAttribution()?c`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data)}renderMore(){let e=this.listRows(),r=this.data?.total;return!this.lastRequest||!e||typeof r!="number"?l:e.length>=r?l:c`<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?c`<p class="roxy-error" role="alert">${this.t(this.moreError)}</p>`:l}</div>`}listRows(){let e=this.listKey?this.data?.[this.listKey]:void 0;return Array.isArray(e)?e:void 0}fetchFresh(e){return this.lastRequest=e,this.openedRow=void 0,this.openedRowId=void 0,this.moreError=null,this.fetcher.run(e)}load(e){return this.hostLoaded=true,this.syncFetcher(),this.fetchFresh(e)}pickRow(e){this.dispatchEvent(new CustomEvent("roxy-symbol-select",{detail:e,bubbles:true,composed:true})),this.openRow(e.id)}openRow(e){if(!this.rowDetail||!(this.publishableKey||this.submitUrl))return;let r=this.openedRow??document.createElement(this.rowDetail.tag);r.publishableKey=this.publishableKey,r.baseUrl=this.baseUrl,r.submitUrl=this.submitUrl,r.submitContext=this.submitContext,r.hideReadings=this.hideReadings,r.hideSections=this.hideSections;let o=this.effectiveLang();o&&r.setAttribute("lang",o),this.openedRow=r,this.openedRowId=e,r.load({path:`/${this.rowDetail.path.replace("{id}",encodeURIComponent(e))}`,method:"GET",query:{lang:qt(this)}}).then(()=>r.scrollIntoView?.({block:"nearest"}))}showAttribution(){return this.attribution!=null&&this.attribution!=="off"&&this.attribution!=="false"}renderAttribution(){return c`<div class="roxy-attribution" part="attribution"><a href="https://roxyapi.com/?utm_source=widget&utm_medium=embed" target="_blank" rel="noopener">${this.t("Spiritual data by RoxyAPI")}</a></div>`}renderNoData(){return this.selfFetch()?this.renderWithForm(l):this.renderEmpty()}renderForm(){let e=this.selfFetch();return c`<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 c`<div class="roxy-empty" role="status" part="empty">${this.t("No data")}</div>`}renderLoading(){return c`<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?c`${o}${this.renderForm()}`:o}renderErrorBanner(e){return c`<div class="roxy-error" role="alert" part="error">${!this.fetcher.worded&&this.errorMessage||this.t(e)}</div>`}};h([g({attribute:false})],p.prototype,"data",2),h([g({type:String,attribute:"data-endpoint"})],p.prototype,"endpoint",2),h([g({type:String})],p.prototype,"method",2),h([g({type:String,attribute:"publishable-key"})],p.prototype,"publishableKey",2),h([g({type:String,attribute:"base-url"})],p.prototype,"baseUrl",2),h([g({type:String,attribute:"spec-url"})],p.prototype,"specUrl",2),h([g({type:String,attribute:"submit-url"})],p.prototype,"submitUrl",2),h([g({attribute:"submit-context",converter:we})],p.prototype,"submitContext",2),h([g({type:String,attribute:"location-url"})],p.prototype,"locationUrl",2),h([g({type:Boolean})],p.prototype,"remember",2),h([g({type:Boolean,attribute:"hide-readings",reflect:true})],p.prototype,"hideReadings",2),h([g({type:String,attribute:"hide-sections",reflect:true})],p.prototype,"hideSections",2),h([g({type:String,attribute:"brand-color"})],p.prototype,"brandColor",2),h([g({type:String,attribute:"brand-accent"})],p.prototype,"brandAccent",2),h([g({type:String})],p.prototype,"font",2),h([g({type:String})],p.prototype,"hemisphere",2),h([g({type:String,attribute:"submit-label"})],p.prototype,"submitLabel",2),h([g({type:String,attribute:"error-message"})],p.prototype,"errorMessage",2),h([g({type:String})],p.prototype,"attribution",2),h([x()],p.prototype,"loading",2),h([x()],p.prototype,"error",2),h([x()],p.prototype,"issues",2),h([x()],p.prototype,"selfFetched",2),h([x()],p.prototype,"editing",2),h([x()],p.prototype,"sticky",2),h([x()],p.prototype,"openedRow",2),h([x()],p.prototype,"openedRowId",2),h([x()],p.prototype,"moreLoading",2),h([x()],p.prototype,"moreError",2);var Ae=n=>t=>{customElements.get(n)||customElements.define(n,t)};function Er(n){let t=n%360;return t<0?t+360:t}function Tr(n){let t=Er(n),e=Math.floor(t/30)%12,r=t%30,o=Math.floor(r),i=(r-o)*60,s=Math.floor(i),d=Math.round((i-s)*60);return{sign:Kt[e]??"Aries",signIndex:e,degree:o,minute:s,second:d}}function _e(n,t){let{sign:e,degree:r,minute:o}=Tr(n);return`${r}\xB0 ${t||e} ${String(o).padStart(2,"0")}'`}var Pe=new Map;function $r(n){if(!n)return["en"];let t=Pe.get(n);if(t)return[t,"en"];let e="en";try{e=Intl.getCanonicalLocales(n)[0]??"en"}catch{e="en"}return Pe.set(n,e),[e,"en"]}function j(n,t,e=1){return typeof t!="number"||!Number.isFinite(t)?"":t.toLocaleString($r(n),{maximumFractionDigits:e})}var kr={"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"?kr[t]??Bt(t):"",o=typeof e=="number"?`${j(n,e,2)}\xB0`:"";return r&&o?`${r} (${o})`:r||o}var Re=f`.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 Fe(n,t,e){if(!t?.ayanamsa)return l;let r=Ce(n,t.ayanamsa);if(!r)return l;let o=typeof t.ayanamsaDegrees=="number"?j(n,t.ayanamsaDegrees,4):void 0;return c`<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>`}var Ar=[{key:"timeBased",titleSource:"Time based",noteSource:"From the eightfold division of the day or night, so these depend on the birth time, the place and the weekday."},{key:"sunBased",titleSource:"Sun based",noteSource:"The Dhuma group, derived by fixed arc from the Sun. Dhuma is the Sun plus 133 degrees 20 minutes, and each of the rest follows from the one before it."}],P=class extends p{renderData(t){let e=Ar.filter(r=>t[r.key]?.length);return e.length?c`<div class="wrap" part="card" aria-label="${this.t("Upagraha positions")}"><header class="head" part="header"><h2>${this.t("Upagrahas")}</h2>${Fe(this.effectiveLang(),t.frame,this.translator)}</header>${e.map(r=>this.renderGroup(r,t[r.key]))}</div>`:this.renderEmpty()}renderGroup(t,e){let r=c`<div class="group-head"><h3>${this.t(t.titleSource)}</h3><p class="group-note">${this.t(t.noteSource)}</p></div><div class="scroll" part="table" tabindex="0" role="region" aria-label="${this.t(t.titleSource)}"><table role="table"><caption class="roxy-sr-only">${this.t("{{group}} upagrahas: each sub-planet with its rashi, degree in sign, sidereal longitude, and nakshatra with pada.",{group:this.t(t.titleSource)})}</caption><thead><tr><th scope="col">${this.t("Upagraha")}</th><th scope="col">${this.t("Rashi")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("Longitude")}</th><th scope="col">${this.t("Nakshatra")}</th><th scope="col">${this.t("Pada")}</th></tr></thead><tbody>${e.map(o=>{let i=Ht(o.rashi)??"";return c`<tr><td class="name">${o.name}</td><td>${i?c`<span class="glyph roxy-glyph">${i}</span>`:l}${o.rashi??""}</td><td>${typeof o.longitude=="number"?_e(o.longitude):""}</td><td>${j(this.effectiveLang(),o.longitude,2)}</td><td>${o.nakshatra??""}</td><td>${o.nakshatraPada??""}</td></tr>`})}</tbody></table></div>`;return t.key==="timeBased"?c`<section part="section time-based">${r}</section>`:c`<section part="section sun-based">${r}</section>`}};P.endpoints=jt,P.styles=[nt,Re,f`.wrap{overflow:hidden}.head{padding:var(--roxy-space-md);border-block-end:1px solid var(--roxy-border)}h2,h3,p{margin:0}.group-head{gap:var(--roxy-space-xs);padding:var(--roxy-space-md) var(--roxy-space-md) 0;display:grid}.group-note{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td{white-space:nowrap}:is(th,td):first-child{padding-inline-start:var(--roxy-space-md)}:is(th,td):last-child{padding-inline-end:var(--roxy-space-md)}tbody tr:last-child td{border-block-end:0}td.name{font-weight:var(--roxy-weight-bold)}.glyph{color:var(--roxy-muted);margin-inline-end:var(--roxy-space-xs)}`],P=h([Ae("roxy-upagraha-table")],P);return Me(_r)})();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var RoxyUI_vastu_mandala=(()=>{var q=Object.defineProperty;var At=Object.getOwnPropertyDescriptor;var
|
|
1
|
+
var RoxyUI_vastu_mandala=(()=>{var q=Object.defineProperty;var At=Object.getOwnPropertyDescriptor;var De=Object.getOwnPropertyNames;var Ge=Object.prototype.hasOwnProperty;var ze=(n,t)=>{for(var e in t)q(n,e,{get:t[e],enumerable:true})},je=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of De(t))!Ge.call(n,o)&&o!==e&&q(n,o,{get:()=>t[o],enumerable:!(r=At(t,o))||r.enumerable});return n};var Ke=n=>je(q({},"__esModule",{value:true}),n),p=(n,t,e,r)=>{for(var o=r>1?void 0:r?At(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&&q(t,e,o),o};var Lr={};ze(Lr,{ROXY_UI_TOKENS_STYLE_ID:()=>tt,RoxyVastuMandala:()=>A,injectRoxyTokens:()=>et});var Y=globalThis,V=Y.ShadowRoot&&(Y.ShadyCSS===void 0||Y.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ct=Symbol(),_t=new WeakMap,M=class{constructor(t,e,r){if(this._$cssResult$=true,r!==ct)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(V&&t===void 0){let 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}},Ct=n=>new M(typeof n=="string"?n:n+"",void 0,ct),g=(n,...t)=>{let e=n.length===1?n[0]:t.reduce((r,o,s)=>r+(i=>{if(i._$cssResult$===true)return i.cssText;if(typeof i=="number")return i;throw Error("Value passed to 'css' function must be a 'css' function result: "+i+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+n[s+1],n[0]);return new M(e,n,ct)},Pt=(n,t)=>{if(V)n.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let r=document.createElement("style"),o=Y.litNonce;o!==void 0&&r.setAttribute("nonce",o),r.textContent=e.cssText,n.appendChild(r)}},pt=V?n=>n:n=>n instanceof CSSStyleSheet?(t=>{let e="";for(let r of t.cssRules)e+=r.cssText;return Ct(e)})(n):n;var{is:He,defineProperty:Be,getOwnPropertyDescriptor:qe,getOwnPropertyNames:Ye,getOwnPropertySymbols:Ve,getPrototypeOf:We}=Object,W=globalThis,Rt=W.trustedTypes,Ze=Rt?Rt.emptyScript:"",Je=W.reactiveElementPolyfillSupport,I=(n,t)=>n,D={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}},Z=(n,t)=>!He(n,t),Ot={attribute:true,type:String,converter:D,reflect:false,useDefault:false,hasChanged:Z};Symbol.metadata??=Symbol("metadata"),W.litPropertyMetadata??=new WeakMap;var S=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Ot){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&&Be(this.prototype,t,o)}}static getPropertyDescriptor(t,e,r){let{get:o,set:s}=qe(this.prototype,t)??{get(){return this[e]},set(i){this[e]=i}};return{get:o,set(i){let a=o?.call(this);s?.call(this,i),this.requestUpdate(t,a,r)},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??Ot}static _$Ei(){if(this.hasOwnProperty(I("elementProperties")))return;let t=We(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(I("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(I("properties"))){let e=this.properties,r=[...Ye(e),...Ve(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(pt(o))}else t!==void 0&&e.push(pt(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 Pt(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:D).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:D;this._$Em=o;let a=i.fromAttribute(e,s.type);this[o]=a??this._$Ej?.get(o)??a,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??Z)(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,a=this[o];i!==true||this._$AL.has(o)||a===void 0||this.C(o,void 0,s,a)}}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[I("elementProperties")]=new Map,S[I("finalized")]=new Map,Je?.({ReactiveElement:S}),(W.reactiveElementVersions??=[]).push("2.1.2");var xt=globalThis,Ft=n=>n,J=xt.trustedTypes,Lt=J?J.createPolicy("lit-html",{createHTML:n=>n}):void 0,Gt="$lit$",w=`lit$${Math.random().toFixed(9).slice(2)}$`,zt="?"+w,Xe=`<${zt}>`,P=document,z=()=>P.createComment(""),j=n=>n===null||typeof n!="object"&&typeof n!="function",bt=Array.isArray,Qe=n=>bt(n)||typeof n?.[Symbol.iterator]=="function",ht=`[
|
|
2
2
|
\f\r]`,G=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ut=/-->/g,Nt=/>/g,_=RegExp(`>|${ht}(?:([^\\s"'>=/]+)(${ht}*=${ht}*(?:[^
|
|
3
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Mt=/'/g,Dt=/"/g,jt=/^(?:script|style|textarea|title)$/i,vt=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),c=vt(1),O=vt(2),Gr=vt(3),R=Symbol.for("lit-noChange"),l=Symbol.for("lit-nothing"),It=new WeakMap,C=P.createTreeWalker(P,129);function Kt(n,t){if(!bt(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return Lt!==void 0?Lt.createHTML(t):t}var tr=(n,t)=>{let e=n.length-1,r=[],o,s=t===2?"<svg>":t===3?"<math>":"",i=G;for(let a=0;a<e;a++){let d=n[a],y,u,m=-1,v=0;for(;v<d.length&&(i.lastIndex=v,u=i.exec(d),u!==null);)v=i.lastIndex,i===G?u[1]==="!--"?i=Ut:u[1]!==void 0?i=Nt:u[2]!==void 0?(jt.test(u[2])&&(o=RegExp("</"+u[2],"g")),i=_):u[3]!==void 0&&(i=_):i===_?u[0]===">"?(i=o??G,m=-1):u[1]===void 0?m=-2:(m=i.lastIndex-u[2].length,y=u[1],i=u[3]===void 0?_:u[3]==='"'?Dt:Mt):i===Dt||i===Mt?i=_:i===Ut||i===Nt?i=G:(i=_,o=void 0);let $=i===_&&n[a+1].startsWith("/>")?" ":"";s+=i===G?d+Xe:m>=0?(r.push(y),d.slice(0,m)+Gt+d.slice(m)+w+$):d+w+(m===-2?a:$)}return[Kt(n,s+(n[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},K=class n{constructor({strings:t,_$litType$:e},r){let o;this.parts=[];let s=0,i=0,a=t.length-1,d=this.parts,[y,u]=tr(t,e);if(this.el=n.createElement(y,r),C.currentNode=this.el.content,e===2||e===3){let m=this.el.content.firstChild;m.replaceWith(...m.childNodes)}for(;(o=C.nextNode())!==null&&d.length<a;){if(o.nodeType===1){if(o.hasAttributes())for(let m of o.getAttributeNames())if(m.endsWith(Gt)){let v=u[i++],$=o.getAttribute(m).split(w),B=/([.?@])?(.*)/.exec(v);d.push({type:1,index:s,name:B[2],strings:$,ctor:B[1]==="."?mt:B[1]==="?"?yt:B[1]==="@"?ft:L}),o.removeAttribute(m)}else m.startsWith(w)&&(d.push({type:6,index:s}),o.removeAttribute(m));if(jt.test(o.tagName)){let m=o.textContent.split(w),v=m.length-1;if(v>0){o.textContent=J?J.emptyScript:"";for(let $=0;$<v;$++)o.append(m[$],z()),C.nextNode(),d.push({type:2,index:++s});o.append(m[v],z())}}}else if(o.nodeType===8)if(o.data===zt)d.push({type:2,index:s});else{let m=-1;for(;(m=o.data.indexOf(w,m+1))!==-1;)d.push({type:7,index:s}),m+=w.length-1}s++}}static createElement(t,e){let r=P.createElement("template");return r.innerHTML=t,r}};function F(n,t,e=n,r){if(t===R)return t;let o=r!==void 0?e._$Co?.[r]:e._$Cl,s=j(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=F(n,o._$AS(n,t.values),o,r)),t}var ut=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??P).importNode(e,true);C.currentNode=o;let s=C.nextNode(),i=0,a=0,d=r[0];for(;d!==void 0;){if(i===d.index){let y;d.type===2?y=new H(s,s.nextSibling,this,t):d.type===1?y=new d.ctor(s,d.name,d.strings,this,t):d.type===6&&(y=new gt(s,this,t)),this._$AV.push(y),d=r[++a]}i!==d?.index&&(s=C.nextNode(),i++)}return C.currentNode=P,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++}},H=class n{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,r,o){this.type=2,this._$AH=l,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=o,this._$Cv=o?.isConnected??true}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=F(this,t,e),j(t)?t===l||t==null||t===""?(this._$AH!==l&&this._$AR(),this._$AH=l):t!==this._$AH&&t!==R&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):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!==l&&j(this._$AH)?this._$AA.nextSibling.data=t:this.T(P.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=K.createElement(Kt(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===o)this._$AH.p(e);else{let s=new ut(o,this),i=s.u(this.options);s.p(e),this.T(i),this._$AH=s}}_$AC(t){let e=It.get(t.strings);return e===void 0&&It.set(t.strings,e=new K(t)),e}k(t){bt(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(z()),this.O(z()),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=Ft(t).nextSibling;Ft(t).remove(),t=r}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},L=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,o,s){this.type=1,this._$AH=l,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=l}_$AI(t,e=this,r,o){let s=this.strings,i=false;if(s===void 0)t=F(this,t,e,0),i=!j(t)||t!==this._$AH&&t!==R,i&&(this._$AH=t);else{let a=t,d,y;for(t=s[0],d=0;d<s.length-1;d++)y=F(this,a[r+d],e,d),y===R&&(y=this._$AH[d]),i||=!j(y)||y!==this._$AH[d],y===l?t=l:t!==l&&(t+=(y??"")+s[d+1]),this._$AH[d]=y}i&&!o&&this.j(t)}j(t){t===l?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},mt=class extends L{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===l?void 0:t}},yt=class extends L{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==l)}},ft=class extends L{constructor(t,e,r,o,s){super(t,e,r,o,s),this.type=5}_$AI(t,e=this){if((t=F(this,t,e,0)??l)===R)return;let r=this._$AH,o=t===l&&r!==l||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,s=t!==l&&(r===l||o);o&&this.element.removeEventListener(this.name,this,r),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},gt=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){F(this,t)}};var er=xt.litHtmlPolyfillSupport;er?.(K,H),(xt.litHtmlVersions??=[]).push("3.3.3");var Ht=(n,t,e)=>{let r=e?.renderBefore??t,o=r._$litPart$;if(o===void 0){let s=e?.renderBefore??null;r._$litPart$=o=new H(t.insertBefore(z(),s),s,void 0,e??{})}return o._$AI(n),o};var St=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=Ht(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false)}render(){return R}};E._$litElement$=true,E.finalized=true,St.litElementHydrateSupport?.({LitElement:E});var rr=St.litElementPolyfillSupport;rr?.({LitElement:E});(St.litElementVersions??=[]).push("4.2.2");var nr={attribute:true,type:String,converter:I,reflect:false,hasChanged:Z},or=(n=nr,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(a){let d=t.get.call(this);t.set.call(this,a),this.requestUpdate(i,d,n,true,a)},init(a){return a!==void 0&&this.C(i,void 0,n,a),a}}}if(r==="setter"){let{name:i}=e;return function(a){let d=this[i];t.call(this,a),this.requestUpdate(i,d,n,true,a)}}throw Error("Unsupported decorator location: "+r)};function f(n){return(t,e)=>typeof e=="object"?or(n,t,e):((r,o,s)=>{let i=o.hasOwnProperty(s);return o.constructor.createProperty(s,r),i?Object.getOwnPropertyDescriptor(o,s):void 0})(n,t,e)}function x(n){return f({...n,state:true,attribute:false})}var b=n=>n??l;var Bt=[{endpoint:"vastu/mandala",method:"POST",attrs:{mode:"mandala"}},{endpoint:"vastu/entrance",method:"POST",attrs:{mode:"entrance"}}];var qt=["de","en","es","fr","hi","pt","ru","tr","zh-Hans","zh-Hant"];function wt(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 sr={tw:"hant",hk:"hant",mo:"hant",cn:"hans",sg:"hans",my:"hans"};function $t(n,t){let e=n.toLowerCase();return t.find(r=>r.toLowerCase()===e)}function Yt(n,t=qt){let e=wt(n);if(!e)return;let r=$t(e,t);if(r)return r;let o=e.toLowerCase().split("-"),s=o[0];if(s==="zh"){let i=o.find(a=>a==="hans"||a==="hant")??sr[o[1]??""];return i?$t(`zh-${i}`,t):void 0}return $t(s,t)}var Zt="symbols";var ir={Fraunces:["latin","latin-ext"],Jost:["latin","latin-ext","cyrillic"],Geist:["latin","latin-ext","cyrillic"]},Et='"Jost", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Vt='"Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Wt='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',Q={"fraunces-jost":{name:"Fraunces with Jost",sans:Et,display:'"Fraunces", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif'},jost:{name:"Jost",sans:Et,display:Et},geist:{name:"Geist",sans:Vt,display:Vt},system:{name:"System",sans:Wt,display:Wt}};function Jt(n){let{sans:t,display:e}=Q[n];return Object.keys(ir).filter(r=>`${t} ${e}`.includes(`"${r}"`))}var Xt="1.6.2";var ar=/^(.*)\/cdn\/(?:roxy-ui|components\/[\w-]+)\.js$/,dr=/^(.*\/dist)\/(?:index|components\/[\w-]+)\.js$/;function Qt(n,t){if(!t)return;let e=new URL(t);if(e.protocol!=="https:"&&e.protocol!=="http:")return;let r=(ar.exec(e.pathname)??dr.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 hr={},lr="color-mix(in oklab, var(--roxy-accent) 70%, black)",cr="var(--roxy-accent)",pr="color-mix(in srgb, var(--roxy-accent) 40%, transparent)",te=/^#(?:[\da-f]{3}|[\da-f]{6})$/i;function ee(n){return n!==void 0&&Object.hasOwn(Q,n)}function re(n){let t=[];return n.brandColor&&te.test(n.brandColor)&&t.push(`--roxy-primary:${n.brandColor}`),n.brandAccent&&te.test(n.brandAccent)&&t.push(`--roxy-accent:${n.brandAccent}`,`--roxy-accent-ink:light-dark(${lr},${cr})`,`--roxy-ring:${pr}`),t.join(";")}function ne(n,t){if(ee(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,a,d;try{let y=globalThis.getComputedStyle(n),u=m=>y.getPropertyValue(m).trim();i=u("--roxy-font-sans"),a=u("--roxy-font-display"),d=u("--roxy-font")}finally{s?.sheet&&(s.sheet.disabled=false)}if(!(i||a))return ee(d)?d:void 0}function oe(n){let{sans:t,display:e}=Q[n];return`--roxy-font:${n};--roxy-font-sans:${t};--roxy-font-display:${e}`}var se=Qt(Xt,globalThis.document?.currentScript?.src||hr.url);function ie(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 ae(n,t=se){Jt(n).length>0&&ie(n,t)}function de(n=se){ie(Zt,n)}var le='@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 tt="roxy-ui-tokens";function et(){if(typeof document>"u")return null;let n=document.getElementById(tt);if(n)return n;let t=document.createElement("style");return t.id=tt,t.textContent=le,document.head.prepend(t),t}function ce(n){return n.toLowerCase().replace(/[\s_-]+/g," ").trim()}function T(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 pe="__ROXY_UI_I18N__";function Tt(){let n=globalThis,t=n[pe];if(t)return t;let e={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return n[pe]=e,e}function ur(n,t){return t?n.replace(/\{\{(\w+)\}\}/g,(e,r)=>r in t?String(t[r]??""):e):n}function he(n,t,e){return ur(mr(n,t)??t,e)}function mr(n,t){if(!n)return;let{catalogs:e}=Tt(),r=n.toLowerCase();return(e[r]??e[r.split("-")[0]])?.[ce(t)]}function ue(n){if(!n)return;let{fieldLabels:t}=Tt(),e=n.toLowerCase();return t[e]??t[e.split("-")[0]]}function me(n,t){return ue(n)?.fields[t]}function ye(n,t,e){return ue(n)?.enums[`${t}.${e}`]}function fe(n){let{listeners:t}=Tt();return t.add(n),()=>{t.delete(n)}}var rt=class{constructor(t){this.host=t,t.addController(this)}hostConnected(){this.unsubscribe=fe(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var nt=class extends E{constructor(){super();this.translator=(e,r)=>this.t(e,r);new rt(this)}connectedCallback(){super.connectedCallback(),et()}updated(e){super.updated(e),this.renderRoot.querySelector(".roxy-glyph")&&de()}fontDeclarations(e){let r=ne(this,e);return r?(ae(r),oe(r)):""}renderFontStyle(){let e=this.fontDeclarations();return e?c`<style>:host{${e}}</style>`:l}t(e,r){return he(this.effectiveLang(),e,r)}effectiveLang(){return wt(this)}};var ge=g`:where(.roxy-glyph){font-family:var(--roxy-font-symbol)}`;function xe(n){return n?c`<span class="roxy-glyph" aria-hidden="true">${n}</span>`:l}var be=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 yr=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);letter-spacing:var(--roxy-tracking-normal);word-spacing: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(:focus){outline:none!important}: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}`,ot=[yr,be,ge];var fr="__cols",gr="__rows";function xr(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function st(n){if(Array.isArray(n)){let s=false,i=n.map(a=>{let d=st(a);return d!==a&&(s=true),d});return s?i:n}if(!xr(n))return n;let t=n[fr],e=n[gr];if(Array.isArray(t)&&Array.isArray(e)&&Object.keys(n).length===2)return e.map(s=>{let i={};return t.forEach((a,d)=>{i[a]=st(s[d])}),i});let r=false,o={};for(let[s,i]of Object.entries(n)){let a=st(i);a!==i&&(r=true),o[s]=a}return r?o:n}function ve(n){return st(n)}function Se(n,t){return n.find(e=>e.attrs&&Object.entries(e.attrs).every(([r,o])=>t[r]===o))??n[0]}var br="pk_live_YOUR_KEY",$e={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 we(n){if(n)return n===br?$e.sample:n.startsWith("pk_")?void 0:$e.secret}function Ee(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 Te="https://roxyapi.com/api/v2";async function vr(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 ke={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.")}}},U=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 Ae(n){return n.submitUrl?void 0:we(n.publishableKey)}async function kt(n,t,e){let r=Ae(n);if(r)throw new U(r.message);let o=n.submitUrl?await fetch(n.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:Sr(t,n.submitContext),signal:e}):await $r(n,t,e);if(!o.ok){let s=await vr(o);throw new U(s.message,s.issues,s.worded,o.status,s.code)}return await o.json()}function Sr(n,t){return JSON.stringify(t?{...n,context:t}:n)}function $r(n,t,e){let r=new URL(`${n.baseUrl??Te}${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 it=class{constructor(t){this.baseUrl=Te;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=Ae(this);if(e){this.host.error=e.message,Ee(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 kt(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 U&&(this.host.issues=o.issues,this.failure={status:o.status,code:o.code}),this.worded=o instanceof U&&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 _e(n,t,e,r=[]){let o={...e},s=`/${n.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(y,u)=>{let m=o[u];return delete o[u],encodeURIComponent(String(m??""))}),i=new Set(r),a={},d={};for(let[y,u]of Object.entries(o))u===void 0||u===""||(t==="GET"||i.has(y)?a[y]=u:d[y]=u);return{path:s,method:t,query:a,body:t==="POST"?d:void 0}}function Ce(){return c`<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 xo=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 wo=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 Pe(n,t,e){let r=n.filter(o=>!!o.body);return r.length===0?l:c`<section class="block" part="section readings"><h3>${e}</h3>${r.map((o,s)=>c`<details class="interp-card" part="reading" name="${t}" ?open="${s===0}"><summary><span class="interp-lead">${xe(o.glyph)} ${o.label}</span> ${Ce()} ${o.aside?c`<span class="interp-aside"><small>${o.aside}</small></span>`:l}</summary><div class="interp-body"><p>${o.body}</p>${o.extra??l}</div></details>`)}</section>`}var wr="roxy-data";function Er(n){return n.nodeName==="SCRIPT"&&n.getAttribute("type")==="application/json"}var at=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(Er(t)&&t.classList.contains(wr))return t;return null}parse(t){if(t?.trim())try{return JSON.parse(t)}catch{return}}};var h=class extends nt{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 kt(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(_e(r.endpoint,r.method,{...o.values,...this.ownRequest()},o.queryKeys??[]))};new at(this),this.fetcher=new it(this)}static{this.styles=[ot]}static{this.endpoints=[]}willUpdate(e){if(e.has("data")&&this.data!=null){let r=ve(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:Se(this.constructor.endpoints,this);return e&&{endpoint:e.endpoint,method:this.method??e.method}}render(){return c`${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")?c`<roxy-data .data="${e}" lang="${b(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=[re(this),this.fontDeclarations(this.font)].filter(Boolean).join(";");if(e.length===0&&!r)return l;let o=(r?`:host{${r}}`:"")+e.map(s=>`[part~="${s}"],roxy-endpoint-form::part(${s}){display:none!important}`).join("");return c`<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()?c`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data):this.renderNoData()}renderInterpretation(e,r,o){return this.hideReadings?l:Pe(e,r,this.t(o??"Reading"))}renderResult(e){let r=c`<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()?c`${r}${this.renderAttribution()}`:r}renderWithForm(e){return c`${this.renderForm()}${e}`}stickyBody(){return this.loading?this.renderLoading():this.error!=null?this.issues?l:this.renderErrorBanner(this.error):this.data==null?l:this.showAttribution()?c`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data)}renderMore(){let e=this.listRows(),r=this.data?.total;return!this.lastRequest||!e||typeof r!="number"?l:e.length>=r?l:c`<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?c`<p class="roxy-error" role="alert">${this.t(this.moreError)}</p>`:l}</div>`}listRows(){let e=this.listKey?this.data?.[this.listKey]:void 0;return Array.isArray(e)?e:void 0}fetchFresh(e){return this.lastRequest=e,this.openedRow=void 0,this.openedRowId=void 0,this.moreError=null,this.fetcher.run(e)}load(e){return this.hostLoaded=true,this.syncFetcher(),this.fetchFresh(e)}pickRow(e){this.dispatchEvent(new CustomEvent("roxy-symbol-select",{detail:e,bubbles:true,composed:true})),this.openRow(e.id)}openRow(e){if(!this.rowDetail||!(this.publishableKey||this.submitUrl))return;let r=this.openedRow??document.createElement(this.rowDetail.tag);r.publishableKey=this.publishableKey,r.baseUrl=this.baseUrl,r.submitUrl=this.submitUrl,r.submitContext=this.submitContext,r.hideReadings=this.hideReadings,r.hideSections=this.hideSections;let o=this.effectiveLang();o&&r.setAttribute("lang",o),this.openedRow=r,this.openedRowId=e,r.load({path:`/${this.rowDetail.path.replace("{id}",encodeURIComponent(e))}`,method:"GET",query:{lang:Yt(this)}}).then(()=>r.scrollIntoView?.({block:"nearest"}))}showAttribution(){return this.attribution!=null&&this.attribution!=="off"&&this.attribution!=="false"}renderAttribution(){return c`<div class="roxy-attribution" part="attribution"><a href="https://roxyapi.com/?utm_source=widget&utm_medium=embed" target="_blank" rel="noopener">${this.t("Spiritual data by RoxyAPI")}</a></div>`}renderNoData(){return this.selfFetch()?this.renderWithForm(l):this.renderEmpty()}renderForm(){let e=this.selfFetch();return c`<roxy-endpoint-form part="form" exportparts="hint" data-endpoint="${e?.endpoint??""}" method="${e?.method??"POST"}" spec-url="${b(this.specUrl)}" publishable-key="${b(this.publishableKey)}" location-url="${b(this.locationUrl)}" submit-label="${b(this.submitLabel)}" lang="${b(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 c`<div class="roxy-empty" role="status" part="empty">${this.t("No data")}</div>`}renderLoading(){return c`<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?c`${o}${this.renderForm()}`:o}renderErrorBanner(e){return c`<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:ke})],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 Tr=/^\d+(?:[.,]\d+)*(?:\s*-\s*\d+(?:[.,]\d+)*)?$/;function Re(n){if(!n.text)return"";let t=n.chapter==null?"":String(n.chapter),e=n.verse??"",r=t;e&&(r=t?Tr.test(e.trim())?`${t}.${e}`:`${t}, ${e}`:e);let o=n.translation?[n.translation,n.year].filter(Boolean).join(" "):"";return[[T(n.text),r].filter(Boolean).join(" "),o,n.basis].filter(Boolean).join(" \xB7 ")}var Oe=n=>t=>{customElements.get(n)||customElements.define(n,t)};var Fe=new Map;function Le(n){if(!n)return["en"];let t=Fe.get(n);if(t)return[t,"en"];let e="en";try{e=Intl.getCanonicalLocales(n)[0]??"en"}catch{e="en"}return Fe.set(n,e),[e,"en"]}function k(n,t){return typeof t!="number"||!Number.isFinite(t)?"":t.toLocaleString(Le(n),{maximumFractionDigits:0})}function Ue(n,t,e=1){return typeof t!="number"||!Number.isFinite(t)?"":t.toLocaleString(Le(n),{maximumFractionDigits:e})}function Ne(n,t,e){return me(n,t)??e??T(t)}function N(n,t,e,r){return ye(n,t,e)??r??T(e)}var kr=["North","East","South","West"],Ar={perimeter:"Perimeter",innerRing:"Inner ring",innerCorner:"Inner corner",center:"Center"},_r={auspicious:"Favourable",inauspicious:"Unfavourable",mixed:"Mixed"},Cr={feet:"ft\xB2",metres:"m\xB2"},dt=.04,Pr=8,Rr=.88;function Me(n){return"cells"in n}function Or(n){let t=n.map(i=>i.center?.x).filter(i=>i!=null),e=n.map(i=>i.center?.y).filter(i=>i!=null),r=Math.max(0,...n.map(i=>i.rowFromNorth??0),...n.map(i=>i.columnFromWest??0));if(r<2||t.length===0||e.length===0)return;let o=(Math.max(...t)-Math.min(...t))/(r-1),s=(Math.max(...e)-Math.min(...e))/(r-1);if(!(!(o>0)||!(s>0)))return{size:r,cellW:o,cellH:s,originX:Math.min(...t)-o/2,originY:Math.min(...e)-s/2}}function lt(n,t){let e=((t?.x??0)-n.originX)/n.cellW,r=n.size-((t?.y??0)-n.originY)/n.cellH;return[De(e),De(r)]}function De(n){return Math.round(n*1e3)/1e3}var A=class extends h{constructor(){super(...arguments);this.mode="mandala"}renderData(e){let r=this.effectiveLang(),o=Me(e)?e:void 0,s=this.mode==="entrance"&&!Me(e)?e:void 0,i=o?Or(o.cells??[]):Fr(e.conventions?.grid);return c`<article class="card" part="card" aria-labelledby="vastu-title"><header class="head" part="header"><h2 class="title" id="vastu-title">${s?this.t("Entrance pada"):this.t("Vastu mandala")}</h2>${s?.auspiciousness?c`<span class="${`roxy-chip verdict-${s.auspiciousness}`}">${this.verdictLabel(s.auspiciousness)}</span>`:l}</header>${this.renderGrid(r,i,o,s)} ${this.renderLegend(s,o)} ${this.renderDevatas(r,o?.cells)} ${this.renderFacts(r,e,o,s)} ${s?.effect&&!this.hideReadings?c`<p class="effect" part="reading">${s.effect}</p>`:l} ${s?.reading&&!this.hideReadings?c`<p class="reading" part="reading">${s.reading}</p>`:l} ${this.renderSources(o?.sources??(s?.source?[s.source]:[]))}</article>`}renderGrid(e,r,o,s){if(!r)return l;let i=r.size,a=`${-dt} ${-dt} ${i+dt*2} ${i+dt*2}`;return c`<div class="frame" part="chart">${kr.map(d=>c`<span class="${`compass compass-${d[0]?.toLowerCase()}`}">${N(e,"facing",d)}</span>`)} <svg viewBox="${a}" role="img" aria-label="${this.t("Vastu grid, north at the top and west on the left")}">${(o?.cells??[]).map(d=>this.renderCell(e,d))} ${s?this.renderEmptyGrid(i):l} ${s?this.renderDoor(e,s):l} ${this.renderVamsa(r,o?.vamsa)} ${this.renderBrahmasthan(r,o?.brahmasthan?.polygon)} ${this.renderAtimarma(r,o)}</svg></div>`}renderCell(e,r){let o=r.class??r.role??"",s=["pada",o?`pada-${o}`:"",r.withinPlot===false?"pada-outside":""].filter(Boolean).join(" "),i=r.devataName??"";return this.renderPada(e,r.columnFromWest,r.rowFromNorth,s,r.square,i,[i,this.ringLabel(o)].filter(Boolean).join(" \xB7 "))}renderPada(e,r,o,s,i,a,d){let y=(r??1)-1,u=(o??1)-1,m=a.length>Pr;return O`<g>
|
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Mt=/'/g,It=/"/g,jt=/^(?:script|style|textarea|title)$/i,vt=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),c=vt(1),O=vt(2),Gr=vt(3),R=Symbol.for("lit-noChange"),l=Symbol.for("lit-nothing"),Dt=new WeakMap,C=P.createTreeWalker(P,129);function Kt(n,t){if(!bt(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return Lt!==void 0?Lt.createHTML(t):t}var tr=(n,t)=>{let e=n.length-1,r=[],o,s=t===2?"<svg>":t===3?"<math>":"",i=G;for(let a=0;a<e;a++){let d=n[a],y,u,m=-1,v=0;for(;v<d.length&&(i.lastIndex=v,u=i.exec(d),u!==null);)v=i.lastIndex,i===G?u[1]==="!--"?i=Ut:u[1]!==void 0?i=Nt:u[2]!==void 0?(jt.test(u[2])&&(o=RegExp("</"+u[2],"g")),i=_):u[3]!==void 0&&(i=_):i===_?u[0]===">"?(i=o??G,m=-1):u[1]===void 0?m=-2:(m=i.lastIndex-u[2].length,y=u[1],i=u[3]===void 0?_:u[3]==='"'?It:Mt):i===It||i===Mt?i=_:i===Ut||i===Nt?i=G:(i=_,o=void 0);let $=i===_&&n[a+1].startsWith("/>")?" ":"";s+=i===G?d+Xe:m>=0?(r.push(y),d.slice(0,m)+Gt+d.slice(m)+w+$):d+w+(m===-2?a:$)}return[Kt(n,s+(n[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},K=class n{constructor({strings:t,_$litType$:e},r){let o;this.parts=[];let s=0,i=0,a=t.length-1,d=this.parts,[y,u]=tr(t,e);if(this.el=n.createElement(y,r),C.currentNode=this.el.content,e===2||e===3){let m=this.el.content.firstChild;m.replaceWith(...m.childNodes)}for(;(o=C.nextNode())!==null&&d.length<a;){if(o.nodeType===1){if(o.hasAttributes())for(let m of o.getAttributeNames())if(m.endsWith(Gt)){let v=u[i++],$=o.getAttribute(m).split(w),B=/([.?@])?(.*)/.exec(v);d.push({type:1,index:s,name:B[2],strings:$,ctor:B[1]==="."?mt:B[1]==="?"?yt:B[1]==="@"?ft:L}),o.removeAttribute(m)}else m.startsWith(w)&&(d.push({type:6,index:s}),o.removeAttribute(m));if(jt.test(o.tagName)){let m=o.textContent.split(w),v=m.length-1;if(v>0){o.textContent=J?J.emptyScript:"";for(let $=0;$<v;$++)o.append(m[$],z()),C.nextNode(),d.push({type:2,index:++s});o.append(m[v],z())}}}else if(o.nodeType===8)if(o.data===zt)d.push({type:2,index:s});else{let m=-1;for(;(m=o.data.indexOf(w,m+1))!==-1;)d.push({type:7,index:s}),m+=w.length-1}s++}}static createElement(t,e){let r=P.createElement("template");return r.innerHTML=t,r}};function F(n,t,e=n,r){if(t===R)return t;let o=r!==void 0?e._$Co?.[r]:e._$Cl,s=j(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=F(n,o._$AS(n,t.values),o,r)),t}var ut=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??P).importNode(e,true);C.currentNode=o;let s=C.nextNode(),i=0,a=0,d=r[0];for(;d!==void 0;){if(i===d.index){let y;d.type===2?y=new H(s,s.nextSibling,this,t):d.type===1?y=new d.ctor(s,d.name,d.strings,this,t):d.type===6&&(y=new gt(s,this,t)),this._$AV.push(y),d=r[++a]}i!==d?.index&&(s=C.nextNode(),i++)}return C.currentNode=P,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++}},H=class n{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,r,o){this.type=2,this._$AH=l,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=o,this._$Cv=o?.isConnected??true}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=F(this,t,e),j(t)?t===l||t==null||t===""?(this._$AH!==l&&this._$AR(),this._$AH=l):t!==this._$AH&&t!==R&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):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!==l&&j(this._$AH)?this._$AA.nextSibling.data=t:this.T(P.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=K.createElement(Kt(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===o)this._$AH.p(e);else{let s=new ut(o,this),i=s.u(this.options);s.p(e),this.T(i),this._$AH=s}}_$AC(t){let e=Dt.get(t.strings);return e===void 0&&Dt.set(t.strings,e=new K(t)),e}k(t){bt(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(z()),this.O(z()),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=Ft(t).nextSibling;Ft(t).remove(),t=r}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},L=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,o,s){this.type=1,this._$AH=l,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=l}_$AI(t,e=this,r,o){let s=this.strings,i=false;if(s===void 0)t=F(this,t,e,0),i=!j(t)||t!==this._$AH&&t!==R,i&&(this._$AH=t);else{let a=t,d,y;for(t=s[0],d=0;d<s.length-1;d++)y=F(this,a[r+d],e,d),y===R&&(y=this._$AH[d]),i||=!j(y)||y!==this._$AH[d],y===l?t=l:t!==l&&(t+=(y??"")+s[d+1]),this._$AH[d]=y}i&&!o&&this.j(t)}j(t){t===l?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},mt=class extends L{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===l?void 0:t}},yt=class extends L{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==l)}},ft=class extends L{constructor(t,e,r,o,s){super(t,e,r,o,s),this.type=5}_$AI(t,e=this){if((t=F(this,t,e,0)??l)===R)return;let r=this._$AH,o=t===l&&r!==l||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,s=t!==l&&(r===l||o);o&&this.element.removeEventListener(this.name,this,r),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},gt=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){F(this,t)}};var er=xt.litHtmlPolyfillSupport;er?.(K,H),(xt.litHtmlVersions??=[]).push("3.3.3");var Ht=(n,t,e)=>{let r=e?.renderBefore??t,o=r._$litPart$;if(o===void 0){let s=e?.renderBefore??null;r._$litPart$=o=new H(t.insertBefore(z(),s),s,void 0,e??{})}return o._$AI(n),o};var St=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=Ht(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false)}render(){return R}};E._$litElement$=true,E.finalized=true,St.litElementHydrateSupport?.({LitElement:E});var rr=St.litElementPolyfillSupport;rr?.({LitElement:E});(St.litElementVersions??=[]).push("4.2.2");var nr={attribute:true,type:String,converter:D,reflect:false,hasChanged:Z},or=(n=nr,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(a){let d=t.get.call(this);t.set.call(this,a),this.requestUpdate(i,d,n,true,a)},init(a){return a!==void 0&&this.C(i,void 0,n,a),a}}}if(r==="setter"){let{name:i}=e;return function(a){let d=this[i];t.call(this,a),this.requestUpdate(i,d,n,true,a)}}throw Error("Unsupported decorator location: "+r)};function f(n){return(t,e)=>typeof e=="object"?or(n,t,e):((r,o,s)=>{let i=o.hasOwnProperty(s);return o.constructor.createProperty(s,r),i?Object.getOwnPropertyDescriptor(o,s):void 0})(n,t,e)}function x(n){return f({...n,state:true,attribute:false})}var b=n=>n??l;var Bt=[{endpoint:"vastu/mandala",method:"POST",attrs:{mode:"mandala"}},{endpoint:"vastu/entrance",method:"POST",attrs:{mode:"entrance"}}];var qt=["de","en","es","fr","hi","pt","ru","tr","zh-Hans","zh-Hant"];function wt(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 sr={tw:"hant",hk:"hant",mo:"hant",cn:"hans",sg:"hans",my:"hans"};function $t(n,t){let e=n.toLowerCase();return t.find(r=>r.toLowerCase()===e)}function Yt(n,t=qt){let e=wt(n);if(!e)return;let r=$t(e,t);if(r)return r;let o=e.toLowerCase().split("-"),s=o[0];if(s==="zh"){let i=o.find(a=>a==="hans"||a==="hant")??sr[o[1]??""];return i?$t(`zh-${i}`,t):void 0}return $t(s,t)}var Zt="symbols";var ir={Fraunces:["latin","latin-ext"],Jost:["latin","latin-ext","cyrillic"],Geist:["latin","latin-ext","cyrillic"]},Et='"Jost", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Vt='"Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Wt='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',Q={"fraunces-jost":{name:"Fraunces with Jost",sans:Et,display:'"Fraunces", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif'},jost:{name:"Jost",sans:Et,display:Et},geist:{name:"Geist",sans:Vt,display:Vt},system:{name:"System",sans:Wt,display:Wt}};function Jt(n){let{sans:t,display:e}=Q[n];return Object.keys(ir).filter(r=>`${t} ${e}`.includes(`"${r}"`))}var Xt="1.8.0";var ar=/^(.*)\/cdn\/(?:roxy-ui|components\/[\w-]+)\.js$/,dr=/^(.*\/dist)\/(?:index|components\/[\w-]+)\.js$/;function Qt(n,t){if(!t)return;let e=new URL(t);if(e.protocol!=="https:"&&e.protocol!=="http:")return;let r=(ar.exec(e.pathname)??dr.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 hr={},lr="color-mix(in oklab, var(--roxy-accent) 70%, black)",cr="var(--roxy-accent)",pr="color-mix(in srgb, var(--roxy-accent) 40%, transparent)",te=/^#(?:[\da-f]{3}|[\da-f]{6})$/i;function ee(n){return n!==void 0&&Object.hasOwn(Q,n)}function re(n){let t=[];return n.brandColor&&te.test(n.brandColor)&&t.push(`--roxy-primary:${n.brandColor}`),n.brandAccent&&te.test(n.brandAccent)&&t.push(`--roxy-accent:${n.brandAccent}`,`--roxy-accent-ink:light-dark(${lr},${cr})`,`--roxy-ring:${pr}`),t.join(";")}function ne(n,t){if(ee(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,a,d;try{let y=globalThis.getComputedStyle(n),u=m=>y.getPropertyValue(m).trim();i=u("--roxy-font-sans"),a=u("--roxy-font-display"),d=u("--roxy-font")}finally{s?.sheet&&(s.sheet.disabled=false)}if(!(i||a))return ee(d)?d:void 0}function oe(n){let{sans:t,display:e}=Q[n];return`--roxy-font:${n};--roxy-font-sans:${t};--roxy-font-display:${e}`}var se=Qt(Xt,globalThis.document?.currentScript?.src||hr.url);function ie(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 ae(n,t=se){Jt(n).length>0&&ie(n,t)}function de(n=se){ie(Zt,n)}var le='@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 tt="roxy-ui-tokens";function et(){if(typeof document>"u")return null;let n=document.getElementById(tt);if(n)return n;let t=document.createElement("style");return t.id=tt,t.textContent=le,document.head.prepend(t),t}function ce(n){return n.toLowerCase().replace(/[\s_-]+/g," ").trim()}function T(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 pe="__ROXY_UI_I18N__";function Tt(){let n=globalThis,t=n[pe];if(t)return t;let e={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return n[pe]=e,e}function ur(n,t){return t?n.replace(/\{\{(\w+)\}\}/g,(e,r)=>r in t?String(t[r]??""):e):n}function he(n,t,e){return ur(mr(n,t)??t,e)}function mr(n,t){if(!n)return;let{catalogs:e}=Tt(),r=n.toLowerCase();return(e[r]??e[r.split("-")[0]])?.[ce(t)]}function ue(n){if(!n)return;let{fieldLabels:t}=Tt(),e=n.toLowerCase();return t[e]??t[e.split("-")[0]]}function me(n,t){return ue(n)?.fields[t]}function ye(n,t,e){return ue(n)?.enums[`${t}.${e}`]}function fe(n){let{listeners:t}=Tt();return t.add(n),()=>{t.delete(n)}}var rt=class{constructor(t){this.host=t,t.addController(this)}hostConnected(){this.unsubscribe=fe(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var nt=class extends E{constructor(){super();this.translator=(e,r)=>this.t(e,r);new rt(this)}connectedCallback(){super.connectedCallback(),et()}updated(e){super.updated(e),this.renderRoot.querySelector(".roxy-glyph")&&de()}fontDeclarations(e){let r=ne(this,e);return r?(ae(r),oe(r)):""}renderFontStyle(){let e=this.fontDeclarations();return e?c`<style>:host{${e}}</style>`:l}t(e,r){return he(this.effectiveLang(),e,r)}effectiveLang(){return wt(this)}};var ge=g`:where(.roxy-glyph){font-family:var(--roxy-font-symbol)}`;function xe(n){return n?c`<span class="roxy-glyph" aria-hidden="true">${n}</span>`:l}var be=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 yr=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);letter-spacing:var(--roxy-tracking-normal);word-spacing: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(:focus){outline:none!important}: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}`,ot=[yr,be,ge];var fr="__cols",gr="__rows";function xr(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function st(n){if(Array.isArray(n)){let s=false,i=n.map(a=>{let d=st(a);return d!==a&&(s=true),d});return s?i:n}if(!xr(n))return n;let t=n[fr],e=n[gr];if(Array.isArray(t)&&Array.isArray(e)&&Object.keys(n).length===2)return e.map(s=>{let i={};return t.forEach((a,d)=>{i[a]=st(s[d])}),i});let r=false,o={};for(let[s,i]of Object.entries(n)){let a=st(i);a!==i&&(r=true),o[s]=a}return r?o:n}function ve(n){return st(n)}function Se(n,t){return n.find(e=>e.attrs&&Object.entries(e.attrs).every(([r,o])=>t[r]===o))??n[0]}var br="pk_live_YOUR_KEY",$e={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 we(n){if(n)return n===br?$e.sample:n.startsWith("pk_")?void 0:$e.secret}function Ee(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 Te="https://roxyapi.com/api/v2";async function vr(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 ke={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.")}}},U=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 Ae(n){return n.submitUrl?void 0:we(n.publishableKey)}async function kt(n,t,e){let r=Ae(n);if(r)throw new U(r.message);let o=n.submitUrl?await fetch(n.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:Sr(t,n.submitContext),signal:e}):await $r(n,t,e);if(!o.ok){let s=await vr(o);throw new U(s.message,s.issues,s.worded,o.status,s.code)}return await o.json()}function Sr(n,t){return JSON.stringify(t?{...n,context:t}:n)}function $r(n,t,e){let r=new URL(`${n.baseUrl??Te}${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 it=class{constructor(t){this.baseUrl=Te;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=Ae(this);if(e){this.host.error=e.message,Ee(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 kt(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 U&&(this.host.issues=o.issues,this.failure={status:o.status,code:o.code}),this.worded=o instanceof U&&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 _e(n,t,e,r=[]){let o={...e},s=`/${n.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(y,u)=>{let m=o[u];return delete o[u],encodeURIComponent(String(m??""))}),i=new Set(r),a={},d={};for(let[y,u]of Object.entries(o))u===void 0||u===""||(t==="GET"||i.has(y)?a[y]=u:d[y]=u);return{path:s,method:t,query:a,body:t==="POST"?d:void 0}}function Ce(){return c`<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 xo=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 wo=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 Pe(n,t,e,r=false){let o=n.filter(s=>!!s.body);return o.length===0?l:c`<section class="block" part="section readings"><h3>${e}</h3>${o.map((s,i)=>c`<details class="interp-card" part="reading" name="${t}" ?open="${i===0&&!r}"><summary><span class="interp-lead">${xe(s.glyph)} ${s.label}</span> ${Ce()} ${s.aside?c`<span class="interp-aside"><small>${s.aside}</small></span>`:l}</summary><div class="interp-body"><p>${s.body}</p>${s.extra??l}</div></details>`)}</section>`}var wr="roxy-data";function Er(n){return n.nodeName==="SCRIPT"&&n.getAttribute("type")==="application/json"}var at=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(Er(t)&&t.classList.contains(wr))return t;return null}parse(t){if(t?.trim())try{return JSON.parse(t)}catch{return}}};var h=class extends nt{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 kt(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(_e(r.endpoint,r.method,{...o.values,...this.ownRequest()},o.queryKeys??[]))};new at(this),this.fetcher=new it(this)}static{this.styles=[ot]}static{this.endpoints=[]}willUpdate(e){if(e.has("data")&&this.data!=null){let r=ve(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:Se(this.constructor.endpoints,this);return e&&{endpoint:e.endpoint,method:this.method??e.method}}render(){return c`${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")?c`<roxy-data .data="${e}" lang="${b(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=[re(this),this.fontDeclarations(this.font)].filter(Boolean).join(";");if(e.length===0&&!r)return l;let o=(r?`:host{${r}}`:"")+e.map(s=>`[part~="${s}"],roxy-endpoint-form::part(${s}){display:none!important}`).join("");return c`<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()?c`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data):this.renderNoData()}renderInterpretation(e,r,o,s=false){return this.hideReadings?l:Pe(e,r,this.t(o??"Reading"),s)}renderResult(e){let r=c`<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()?c`${r}${this.renderAttribution()}`:r}renderWithForm(e){return c`${this.renderForm()}${e}`}stickyBody(){return this.loading?this.renderLoading():this.error!=null?this.issues?l:this.renderErrorBanner(this.error):this.data==null?l:this.showAttribution()?c`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data)}renderMore(){let e=this.listRows(),r=this.data?.total;return!this.lastRequest||!e||typeof r!="number"?l:e.length>=r?l:c`<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?c`<p class="roxy-error" role="alert">${this.t(this.moreError)}</p>`:l}</div>`}listRows(){let e=this.listKey?this.data?.[this.listKey]:void 0;return Array.isArray(e)?e:void 0}fetchFresh(e){return this.lastRequest=e,this.openedRow=void 0,this.openedRowId=void 0,this.moreError=null,this.fetcher.run(e)}load(e){return this.hostLoaded=true,this.syncFetcher(),this.fetchFresh(e)}pickRow(e){this.dispatchEvent(new CustomEvent("roxy-symbol-select",{detail:e,bubbles:true,composed:true})),this.openRow(e.id)}openRow(e){if(!this.rowDetail||!(this.publishableKey||this.submitUrl))return;let r=this.openedRow??document.createElement(this.rowDetail.tag);r.publishableKey=this.publishableKey,r.baseUrl=this.baseUrl,r.submitUrl=this.submitUrl,r.submitContext=this.submitContext,r.hideReadings=this.hideReadings,r.hideSections=this.hideSections;let o=this.effectiveLang();o&&r.setAttribute("lang",o),this.openedRow=r,this.openedRowId=e,r.load({path:`/${this.rowDetail.path.replace("{id}",encodeURIComponent(e))}`,method:"GET",query:{lang:Yt(this)}}).then(()=>r.scrollIntoView?.({block:"nearest"}))}showAttribution(){return this.attribution!=null&&this.attribution!=="off"&&this.attribution!=="false"}renderAttribution(){return c`<div class="roxy-attribution" part="attribution"><a href="https://roxyapi.com/?utm_source=widget&utm_medium=embed" target="_blank" rel="noopener">${this.t("Spiritual data by RoxyAPI")}</a></div>`}renderNoData(){return this.selfFetch()?this.renderWithForm(l):this.renderEmpty()}renderForm(){let e=this.selfFetch();return c`<roxy-endpoint-form part="form" exportparts="hint" data-endpoint="${e?.endpoint??""}" method="${e?.method??"POST"}" spec-url="${b(this.specUrl)}" publishable-key="${b(this.publishableKey)}" location-url="${b(this.locationUrl)}" submit-label="${b(this.submitLabel)}" lang="${b(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 c`<div class="roxy-empty" role="status" part="empty">${this.t("No data")}</div>`}renderLoading(){return c`<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?c`${o}${this.renderForm()}`:o}renderErrorBanner(e){return c`<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:ke})],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 Tr=/^\d+(?:[.,]\d+)*(?:\s*-\s*\d+(?:[.,]\d+)*)?$/;function Re(n){if(!n.text)return"";let t=n.chapter==null?"":String(n.chapter),e=n.verse??"",r=t;e&&(r=t?Tr.test(e.trim())?`${t}.${e}`:`${t}, ${e}`:e);let o=n.translation?[n.translation,n.year].filter(Boolean).join(" "):"";return[[T(n.text),r].filter(Boolean).join(" "),o,n.basis].filter(Boolean).join(" \xB7 ")}var Oe=n=>t=>{customElements.get(n)||customElements.define(n,t)};var Fe=new Map;function Le(n){if(!n)return["en"];let t=Fe.get(n);if(t)return[t,"en"];let e="en";try{e=Intl.getCanonicalLocales(n)[0]??"en"}catch{e="en"}return Fe.set(n,e),[e,"en"]}function k(n,t){return typeof t!="number"||!Number.isFinite(t)?"":t.toLocaleString(Le(n),{maximumFractionDigits:0})}function Ue(n,t,e=1){return typeof t!="number"||!Number.isFinite(t)?"":t.toLocaleString(Le(n),{maximumFractionDigits:e})}function Ne(n,t,e){return me(n,t)??e??T(t)}function N(n,t,e,r){return ye(n,t,e)??r??T(e)}var kr=["North","East","South","West"],Ar={perimeter:"Perimeter",innerRing:"Inner ring",innerCorner:"Inner corner",center:"Center"},_r={auspicious:"Favourable",inauspicious:"Unfavourable",mixed:"Mixed"},Cr={feet:"ft\xB2",metres:"m\xB2"},dt=.04,Pr=8,Rr=.88;function Me(n){return"cells"in n}function Or(n){let t=n.map(i=>i.center?.x).filter(i=>i!=null),e=n.map(i=>i.center?.y).filter(i=>i!=null),r=Math.max(0,...n.map(i=>i.rowFromNorth??0),...n.map(i=>i.columnFromWest??0));if(r<2||t.length===0||e.length===0)return;let o=(Math.max(...t)-Math.min(...t))/(r-1),s=(Math.max(...e)-Math.min(...e))/(r-1);if(!(!(o>0)||!(s>0)))return{size:r,cellW:o,cellH:s,originX:Math.min(...t)-o/2,originY:Math.min(...e)-s/2}}function lt(n,t){let e=((t?.x??0)-n.originX)/n.cellW,r=n.size-((t?.y??0)-n.originY)/n.cellH;return[Ie(e),Ie(r)]}function Ie(n){return Math.round(n*1e3)/1e3}var A=class extends h{constructor(){super(...arguments);this.mode="mandala"}renderData(e){let r=this.effectiveLang(),o=Me(e)?e:void 0,s=this.mode==="entrance"&&!Me(e)?e:void 0,i=o?Or(o.cells??[]):Fr(e.conventions?.grid);return c`<article class="card" part="card" aria-labelledby="vastu-title"><header class="head" part="header"><h2 class="title" id="vastu-title">${s?this.t("Entrance pada"):this.t("Vastu mandala")}</h2>${s?.auspiciousness?c`<span class="${`roxy-chip verdict-${s.auspiciousness}`}">${this.verdictLabel(s.auspiciousness)}</span>`:l}</header>${this.renderGrid(r,i,o,s)} ${this.renderLegend(s,o)} ${this.renderDevatas(r,o?.cells)} ${this.renderFacts(r,e,o,s)} ${s?.effect&&!this.hideReadings?c`<p class="effect" part="reading">${s.effect}</p>`:l} ${s?.reading&&!this.hideReadings?c`<p class="reading" part="reading">${s.reading}</p>`:l} ${this.renderSources(o?.sources??(s?.source?[s.source]:[]))}</article>`}renderGrid(e,r,o,s){if(!r)return l;let i=r.size,a=`${-dt} ${-dt} ${i+dt*2} ${i+dt*2}`;return c`<div class="frame" part="chart">${kr.map(d=>c`<span class="${`compass compass-${d[0]?.toLowerCase()}`}">${N(e,"facing",d)}</span>`)} <svg viewBox="${a}" role="img" aria-label="${this.t("Vastu grid, north at the top and west on the left")}">${(o?.cells??[]).map(d=>this.renderCell(e,d))} ${s?this.renderEmptyGrid(i):l} ${s?this.renderDoor(e,s):l} ${this.renderVamsa(r,o?.vamsa)} ${this.renderBrahmasthan(r,o?.brahmasthan?.polygon)} ${this.renderAtimarma(r,o)}</svg></div>`}renderCell(e,r){let o=r.class??r.role??"",s=["pada",o?`pada-${o}`:"",r.withinPlot===false?"pada-outside":""].filter(Boolean).join(" "),i=r.devataName??"";return this.renderPada(e,r.columnFromWest,r.rowFromNorth,s,r.square,i,[i,this.ringLabel(o)].filter(Boolean).join(" \xB7 "))}renderPada(e,r,o,s,i,a,d){let y=(r??1)-1,u=(o??1)-1,m=a.length>Pr;return O`<g>
|
|
4
4
|
<rect class=${s} x=${y} y=${u} width="1" height="1">
|
|
5
5
|
<title>${d}</title>
|
|
6
6
|
</rect>
|