@roxyapi/ui 1.5.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (166) hide show
  1. package/components-catalog.json +1 -1
  2. package/dist/cdn/components/almanac-day.js +1 -1
  3. package/dist/cdn/components/angel-number-card.js +1 -1
  4. package/dist/cdn/components/angel-number-lookup.js +1 -1
  5. package/dist/cdn/components/arudha-padas.js +1 -1
  6. package/dist/cdn/components/ashtakavarga-grid.js +1 -1
  7. package/dist/cdn/components/aspects-table.js +1 -1
  8. package/dist/cdn/components/astrocartography-map.js +1 -1
  9. package/dist/cdn/components/bazi-chart.js +1 -1
  10. package/dist/cdn/components/bhav-chalit-table.js +1 -1
  11. package/dist/cdn/components/bhava-bala-table.js +1 -1
  12. package/dist/cdn/components/biorhythm-chart.js +1 -1
  13. package/dist/cdn/components/bodygraph.js +1 -1
  14. package/dist/cdn/components/chara-karakas.js +1 -1
  15. package/dist/cdn/components/choghadiya-grid.js +1 -1
  16. package/dist/cdn/components/compatibility-card.js +1 -1
  17. package/dist/cdn/components/compound-number.js +1 -1
  18. package/dist/cdn/components/crystal-card.js +1 -1
  19. package/dist/cdn/components/crystal-grid.js +1 -1
  20. package/dist/cdn/components/dasha-timeline.js +1 -1
  21. package/dist/cdn/components/data.js +2 -2
  22. package/dist/cdn/components/divisional-chart.js +1 -1
  23. package/dist/cdn/components/dosha-card.js +1 -1
  24. package/dist/cdn/components/dosha-constitution.js +1 -1
  25. package/dist/cdn/components/dream-card.js +1 -1
  26. package/dist/cdn/components/dream-search.js +1 -1
  27. package/dist/cdn/components/endpoint-form.js +1 -1
  28. package/dist/cdn/components/ephemeris-table.js +1 -1
  29. package/dist/cdn/components/fixed-stars.js +1 -1
  30. package/dist/cdn/components/flying-star-chart.js +1 -1
  31. package/dist/cdn/components/forecast-digest.js +1 -1
  32. package/dist/cdn/components/forecast-timeline.js +1 -1
  33. package/dist/cdn/components/gematria.js +1 -1
  34. package/dist/cdn/components/gochara-table.js +1 -1
  35. package/dist/cdn/components/guna-milan.js +1 -1
  36. package/dist/cdn/components/hd-connection.js +1 -1
  37. package/dist/cdn/components/hd-penta.js +1 -1
  38. package/dist/cdn/components/hd-type-card.js +1 -1
  39. package/dist/cdn/components/hd-variables.js +1 -1
  40. package/dist/cdn/components/heliacal-table.js +1 -1
  41. package/dist/cdn/components/hexagram.js +1 -1
  42. package/dist/cdn/components/hora-table.js +1 -1
  43. package/dist/cdn/components/horoscope-card.js +1 -1
  44. package/dist/cdn/components/kp-chart.js +1 -1
  45. package/dist/cdn/components/kp-finance-card.js +1 -1
  46. package/dist/cdn/components/kp-planets-table.js +1 -1
  47. package/dist/cdn/components/kp-ruling-planets.js +1 -1
  48. package/dist/cdn/components/kua-card.js +1 -1
  49. package/dist/cdn/components/local-space-compass.js +1 -1
  50. package/dist/cdn/components/location-search.js +1 -1
  51. package/dist/cdn/components/luck-pillars.js +1 -1
  52. package/dist/cdn/components/mayan-day-sign.js +1 -1
  53. package/dist/cdn/components/moon-phase.js +1 -1
  54. package/dist/cdn/components/nakshatra-card.js +1 -1
  55. package/dist/cdn/components/natal-chart.js +1 -1
  56. package/dist/cdn/components/numerology-card.js +1 -1
  57. package/dist/cdn/components/panchang-table.js +1 -1
  58. package/dist/cdn/components/positions-table.js +1 -1
  59. package/dist/cdn/components/profection-card.js +1 -1
  60. package/dist/cdn/components/reference-card.js +1 -1
  61. package/dist/cdn/components/relocation-wheel.js +1 -1
  62. package/dist/cdn/components/report.js +1 -1
  63. package/dist/cdn/components/shadbala-table.js +1 -1
  64. package/dist/cdn/components/synastry-chart.js +1 -1
  65. package/dist/cdn/components/tarot-card.js +1 -1
  66. package/dist/cdn/components/tarot-catalog.js +1 -1
  67. package/dist/cdn/components/tarot-spread.js +1 -1
  68. package/dist/cdn/components/transit-wheel.js +1 -1
  69. package/dist/cdn/components/transits-table.js +1 -1
  70. package/dist/cdn/components/upagraha-table.js +1 -1
  71. package/dist/cdn/components/vastu-mandala.js +1 -1
  72. package/dist/cdn/components/vedic-aspects.js +1 -1
  73. package/dist/cdn/components/vedic-daily.js +1 -1
  74. package/dist/cdn/components/vedic-kundli.js +1 -1
  75. package/dist/cdn/components/vedic-planets-table.js +1 -1
  76. package/dist/cdn/components/western-planets-table.js +1 -1
  77. package/dist/cdn/components/yoga-list.js +1 -1
  78. package/dist/cdn/components/zodiac-card.js +1 -1
  79. package/dist/cdn/roxy-ui.js +42 -42
  80. package/dist/charts.cjs +2 -2
  81. package/dist/charts.js +2 -2
  82. package/dist/components/almanac-day.js +1 -1
  83. package/dist/components/angel-number-card.js +1 -1
  84. package/dist/components/angel-number-lookup.js +1 -1
  85. package/dist/components/arudha-padas.js +1 -1
  86. package/dist/components/ashtakavarga-grid.js +1 -1
  87. package/dist/components/aspects-table.js +1 -1
  88. package/dist/components/astrocartography-map.js +1 -1
  89. package/dist/components/bazi-chart.js +1 -1
  90. package/dist/components/bhav-chalit-table.js +1 -1
  91. package/dist/components/bhava-bala-table.js +1 -1
  92. package/dist/components/biorhythm-chart.js +1 -1
  93. package/dist/components/bodygraph.js +1 -1
  94. package/dist/components/chara-karakas.js +1 -1
  95. package/dist/components/choghadiya-grid.js +1 -1
  96. package/dist/components/compatibility-card.js +1 -1
  97. package/dist/components/compound-number.js +1 -1
  98. package/dist/components/crystal-card.js +1 -1
  99. package/dist/components/crystal-grid.js +1 -1
  100. package/dist/components/dasha-timeline.js +1 -1
  101. package/dist/components/data.js +1 -1
  102. package/dist/components/divisional-chart.js +1 -1
  103. package/dist/components/dosha-card.js +1 -1
  104. package/dist/components/dosha-constitution.js +1 -1
  105. package/dist/components/dream-card.js +1 -1
  106. package/dist/components/dream-search.js +1 -1
  107. package/dist/components/endpoint-form.js +1 -1
  108. package/dist/components/ephemeris-table.js +1 -1
  109. package/dist/components/fixed-stars.js +1 -1
  110. package/dist/components/flying-star-chart.js +1 -1
  111. package/dist/components/forecast-digest.js +1 -1
  112. package/dist/components/forecast-timeline.js +1 -1
  113. package/dist/components/gematria.js +1 -1
  114. package/dist/components/gochara-table.js +1 -1
  115. package/dist/components/guna-milan.js +1 -1
  116. package/dist/components/hd-connection.js +1 -1
  117. package/dist/components/hd-penta.js +1 -1
  118. package/dist/components/hd-type-card.js +1 -1
  119. package/dist/components/hd-variables.js +1 -1
  120. package/dist/components/heliacal-table.js +1 -1
  121. package/dist/components/hexagram.js +1 -1
  122. package/dist/components/hora-table.js +1 -1
  123. package/dist/components/horoscope-card.js +1 -1
  124. package/dist/components/kp-chart.js +1 -1
  125. package/dist/components/kp-finance-card.js +1 -1
  126. package/dist/components/kp-planets-table.js +1 -1
  127. package/dist/components/kp-ruling-planets.js +1 -1
  128. package/dist/components/kua-card.js +1 -1
  129. package/dist/components/local-space-compass.js +1 -1
  130. package/dist/components/location-search.js +1 -1
  131. package/dist/components/luck-pillars.js +1 -1
  132. package/dist/components/mayan-day-sign.js +1 -1
  133. package/dist/components/moon-phase.js +1 -1
  134. package/dist/components/nakshatra-card.js +1 -1
  135. package/dist/components/natal-chart.js +1 -1
  136. package/dist/components/numerology-card.js +1 -1
  137. package/dist/components/panchang-table.js +1 -1
  138. package/dist/components/positions-table.js +1 -1
  139. package/dist/components/profection-card.js +1 -1
  140. package/dist/components/reference-card.js +1 -1
  141. package/dist/components/relocation-wheel.js +1 -1
  142. package/dist/components/report.js +1 -1
  143. package/dist/components/shadbala-table.js +1 -1
  144. package/dist/components/synastry-chart.js +1 -1
  145. package/dist/components/tarot-card.js +1 -1
  146. package/dist/components/tarot-catalog.js +1 -1
  147. package/dist/components/tarot-spread.js +1 -1
  148. package/dist/components/transit-wheel.js +1 -1
  149. package/dist/components/transits-table.js +1 -1
  150. package/dist/components/upagraha-table.js +1 -1
  151. package/dist/components/vastu-mandala.js +1 -1
  152. package/dist/components/vedic-aspects.js +1 -1
  153. package/dist/components/vedic-daily.js +1 -1
  154. package/dist/components/vedic-kundli.js +1 -1
  155. package/dist/components/vedic-planets-table.js +1 -1
  156. package/dist/components/western-planets-table.js +1 -1
  157. package/dist/components/yoga-list.js +1 -1
  158. package/dist/components/zodiac-card.js +1 -1
  159. package/dist/generated/symbol-font.d.ts +2 -2
  160. package/dist/index.cjs +41 -41
  161. package/dist/index.js +41 -41
  162. package/dist/styles/fonts/symbols/noto-sans-symbols-2.woff2 +0 -0
  163. package/dist/styles/fonts/symbols/noto-sans-symbols.woff2 +0 -0
  164. package/dist/styles/fonts/symbols.css +1 -1
  165. package/dist/version.d.ts +1 -1
  166. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  var RoxyUI_local_space_compass=(()=>{var q=Object.defineProperty;var Lt=Object.getOwnPropertyDescriptor;var Ve=Object.getOwnPropertyNames;var We=Object.prototype.hasOwnProperty;var Ze=(r,t)=>{for(var e in t)q(r,e,{get:t[e],enumerable:true})},Je=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Ve(t))!We.call(r,o)&&o!==e&&q(r,o,{get:()=>t[o],enumerable:!(n=Lt(t,o))||n.enumerable});return r};var Xe=r=>Je(q({},"__esModule",{value:true}),r),y=(r,t,e,n)=>{for(var o=n>1?void 0:n?Lt(t,e):t,i=r.length-1,s;i>=0;i--)(s=r[i])&&(o=(n?s(t,e,o):s(o))||o);return n&&o&&q(t,e,o),o};var Wr={};Ze(Wr,{COMPASS_TYPE_SIZES:()=>Ye,ROXY_UI_TOKENS_STYLE_ID:()=>rt,RoxyLocalSpaceCompass:()=>O,injectRoxyTokens:()=>nt});var Y=globalThis,V=Y.ShadowRoot&&(Y.ShadyCSS===void 0||Y.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ut=Symbol(),Ut=new WeakMap,N=class{constructor(t,e,n){if(this._$cssResult$=true,n!==ut)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(V&&t===void 0){let n=e!==void 0&&e.length===1;n&&(t=Ut.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&Ut.set(e,t))}return t}toString(){return this.cssText}},Mt=r=>new N(typeof r=="string"?r:r+"",void 0,ut),x=(r,...t)=>{let e=r.length===1?r[0]:t.reduce((n,o,i)=>n+(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)+r[i+1],r[0]);return new N(e,r,ut)},Nt=(r,t)=>{if(V)r.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let n=document.createElement("style"),o=Y.litNonce;o!==void 0&&n.setAttribute("nonce",o),n.textContent=e.cssText,r.appendChild(n)}},mt=V?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(let n of t.cssRules)e+=n.cssText;return Mt(e)})(r):r;var{is:Qe,defineProperty:tr,getOwnPropertyDescriptor:er,getOwnPropertyNames:rr,getOwnPropertySymbols:nr,getPrototypeOf:or}=Object,W=globalThis,zt=W.trustedTypes,ir=zt?zt.emptyScript:"",sr=W.reactiveElementPolyfillSupport,z=(r,t)=>r,I={toAttribute(r,t){switch(t){case Boolean:r=r?ir:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},Z=(r,t)=>!Qe(r,t),It={attribute:true,type:String,converter:I,reflect:false,useDefault:false,hasChanged:Z};Symbol.metadata??=Symbol("metadata"),W.litPropertyMetadata??=new WeakMap;var w=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=It){if(e.state&&(e.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=true),this.elementProperties.set(t,e),!e.noAccessor){let n=Symbol(),o=this.getPropertyDescriptor(t,n,e);o!==void 0&&tr(this.prototype,t,o)}}static getPropertyDescriptor(t,e,n){let{get:o,set:i}=er(this.prototype,t)??{get(){return this[e]},set(s){this[e]=s}};return{get:o,set(s){let a=o?.call(this);i?.call(this,s),this.requestUpdate(t,a,n)},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??It}static _$Ei(){if(this.hasOwnProperty(z("elementProperties")))return;let t=or(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(z("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(z("properties"))){let e=this.properties,n=[...rr(e),...nr(e)];for(let o of n)this.createProperty(o,e[o])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[n,o]of e)this.elementProperties.set(n,o)}this._$Eh=new Map;for(let[e,n]of this.elementProperties){let o=this._$Eu(e,n);o!==void 0&&this._$Eh.set(o,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let n=new Set(t.flat(1/0).reverse());for(let o of n)e.unshift(mt(o))}else t!==void 0&&e.push(mt(t));return e}static _$Eu(t,e){let n=e.attribute;return n===false?void 0:typeof n=="string"?n:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let n of e.keys())this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Nt(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,n){this._$AK(t,n)}_$ET(t,e){let n=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,n);if(o!==void 0&&n.reflect===true){let i=(n.converter?.toAttribute!==void 0?n.converter:I).toAttribute(e,n.type);this._$Em=t,i==null?this.removeAttribute(o):this.setAttribute(o,i),this._$Em=null}}_$AK(t,e){let n=this.constructor,o=n._$Eh.get(t);if(o!==void 0&&this._$Em!==o){let i=n.getPropertyOptions(o),s=typeof i.converter=="function"?{fromAttribute:i.converter}:i.converter?.fromAttribute!==void 0?i.converter:I;this._$Em=o;let a=s.fromAttribute(e,i.type);this[o]=a??this._$Ej?.get(o)??a,this._$Em=null}}requestUpdate(t,e,n,o=false,i){if(t!==void 0){let s=this.constructor;if(o===false&&(i=this[t]),n??=s.getPropertyOptions(t),!((n.hasChanged??Z)(i,e)||n.useDefault&&n.reflect&&i===this._$Ej?.get(t)&&!this.hasAttribute(s._$Eu(t,n))))return;this.C(t,e,n)}this.isUpdatePending===false&&(this._$ES=this._$EP())}C(t,e,{useDefault:n,reflect:o,wrapped:i},s){n&&!(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||n||(e=void 0),this._$AL.set(t,e)),o===true&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=true;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[o,i]of this._$Ep)this[o]=i;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[o,i]of n){let{wrapped:s}=i,a=this[o];s!==true||this._$AL.has(o)||a===void 0||this.C(o,void 0,i,a)}}let t=false,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(n=>n.hostUpdate?.()),this.update(e)):this._$EM()}catch(n){throw t=false,this._$EM(),n}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=false}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};w.elementStyles=[],w.shadowRootOptions={mode:"open"},w[z("elementProperties")]=new Map,w[z("finalized")]=new Map,sr?.({ReactiveElement:w}),(W.reactiveElementVersions??=[]).push("2.1.2");var St=globalThis,Dt=r=>r,J=St.trustedTypes,Ht=J?J.createPolicy("lit-html",{createHTML:r=>r}):void 0,Yt="$lit$",T=`lit$${Math.random().toFixed(9).slice(2)}$`,Vt="?"+T,ar=`<${Vt}>`,P=document,H=()=>P.createComment(""),G=r=>r===null||typeof r!="object"&&typeof r!="function",wt=Array.isArray,dr=r=>wt(r)||typeof r?.[Symbol.iterator]=="function",yt=`[
2
2
  \f\r]`,D=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Gt=/-->/g,jt=/>/g,A=RegExp(`>|${yt}(?:([^\\s"'>=/]+)(${yt}*=${yt}*(?:[^
3
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Kt=/'/g,Bt=/"/g,Wt=/^(?:script|style|textarea|title)$/i,$t=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),h=$t(1),B=$t(2),en=$t(3),R=Symbol.for("lit-noChange"),p=Symbol.for("lit-nothing"),qt=new WeakMap,_=P.createTreeWalker(P,129);function Zt(r,t){if(!wt(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ht!==void 0?Ht.createHTML(t):t}var cr=(r,t)=>{let e=r.length-1,n=[],o,i=t===2?"<svg>":t===3?"<math>":"",s=D;for(let a=0;a<e;a++){let d=r[a],c,l,u=-1,f=0;for(;f<d.length&&(s.lastIndex=f,l=s.exec(d),l!==null);)f=s.lastIndex,s===D?l[1]==="!--"?s=Gt:l[1]!==void 0?s=jt:l[2]!==void 0?(Wt.test(l[2])&&(o=RegExp("</"+l[2],"g")),s=A):l[3]!==void 0&&(s=A):s===A?l[0]===">"?(s=o??D,u=-1):l[1]===void 0?u=-2:(u=s.lastIndex-l[2].length,c=l[1],s=l[3]===void 0?A:l[3]==='"'?Bt:Kt):s===Bt||s===Kt?s=A:s===Gt||s===jt?s=D:(s=A,o=void 0);let S=s===A&&r[a+1].startsWith("/>")?" ":"";i+=s===D?d+ar:u>=0?(n.push(c),d.slice(0,u)+Yt+d.slice(u)+T+S):d+T+(u===-2?a:S)}return[Zt(r,i+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),n]},j=class r{constructor({strings:t,_$litType$:e},n){let o;this.parts=[];let i=0,s=0,a=t.length-1,d=this.parts,[c,l]=cr(t,e);if(this.el=r.createElement(c,n),_.currentNode=this.el.content,e===2||e===3){let u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}for(;(o=_.nextNode())!==null&&d.length<a;){if(o.nodeType===1){if(o.hasAttributes())for(let u of o.getAttributeNames())if(u.endsWith(Yt)){let f=l[s++],S=o.getAttribute(u).split(T),F=/([.?@])?(.*)/.exec(f);d.push({type:1,index:i,name:F[2],strings:S,ctor:F[1]==="."?ft:F[1]==="?"?xt:F[1]==="@"?bt:U}),o.removeAttribute(u)}else u.startsWith(T)&&(d.push({type:6,index:i}),o.removeAttribute(u));if(Wt.test(o.tagName)){let u=o.textContent.split(T),f=u.length-1;if(f>0){o.textContent=J?J.emptyScript:"";for(let S=0;S<f;S++)o.append(u[S],H()),_.nextNode(),d.push({type:2,index:++i});o.append(u[f],H())}}}else if(o.nodeType===8)if(o.data===Vt)d.push({type:2,index:i});else{let u=-1;for(;(u=o.data.indexOf(T,u+1))!==-1;)d.push({type:7,index:i}),u+=T.length-1}i++}}static createElement(t,e){let n=P.createElement("template");return n.innerHTML=t,n}};function L(r,t,e=r,n){if(t===R)return t;let o=n!==void 0?e._$Co?.[n]:e._$Cl,i=G(t)?void 0:t._$litDirective$;return o?.constructor!==i&&(o?._$AO?.(false),i===void 0?o=void 0:(o=new i(r),o._$AT(r,e,n)),n!==void 0?(e._$Co??=[])[n]=o:e._$Cl=o),o!==void 0&&(t=L(r,o._$AS(r,t.values),o,n)),t}var gt=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:n}=this._$AD,o=(t?.creationScope??P).importNode(e,true);_.currentNode=o;let i=_.nextNode(),s=0,a=0,d=n[0];for(;d!==void 0;){if(s===d.index){let c;d.type===2?c=new K(i,i.nextSibling,this,t):d.type===1?c=new d.ctor(i,d.name,d.strings,this,t):d.type===6&&(c=new vt(i,this,t)),this._$AV.push(c),d=n[++a]}s!==d?.index&&(i=_.nextNode(),s++)}return _.currentNode=P,o}p(t){let e=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}},K=class r{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,n,o){this.type=2,this._$AH=p,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=o,this._$Cv=o?.isConnected??true}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=L(this,t,e),G(t)?t===p||t==null||t===""?(this._$AH!==p&&this._$AR(),this._$AH=p):t!==this._$AH&&t!==R&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):dr(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!==p&&G(this._$AH)?this._$AA.nextSibling.data=t:this.T(P.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:n}=t,o=typeof n=="number"?this._$AC(t):(n.el===void 0&&(n.el=j.createElement(Zt(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===o)this._$AH.p(e);else{let i=new gt(o,this),s=i.u(this.options);i.p(e),this.T(s),this._$AH=i}}_$AC(t){let e=qt.get(t.strings);return e===void 0&&qt.set(t.strings,e=new j(t)),e}k(t){wt(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,n,o=0;for(let i of t)o===e.length?e.push(n=new r(this.O(H()),this.O(H()),this,this.options)):n=e[o],n._$AI(i),o++;o<e.length&&(this._$AR(n&&n._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(false,true,e);t!==this._$AB;){let n=Dt(t).nextSibling;Dt(t).remove(),t=n}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},U=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,n,o,i){this.type=1,this._$AH=p,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=i,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=p}_$AI(t,e=this,n,o){let i=this.strings,s=false;if(i===void 0)t=L(this,t,e,0),s=!G(t)||t!==this._$AH&&t!==R,s&&(this._$AH=t);else{let a=t,d,c;for(t=i[0],d=0;d<i.length-1;d++)c=L(this,a[n+d],e,d),c===R&&(c=this._$AH[d]),s||=!G(c)||c!==this._$AH[d],c===p?t=p:t!==p&&(t+=(c??"")+i[d+1]),this._$AH[d]=c}s&&!o&&this.j(t)}j(t){t===p?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},ft=class extends U{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===p?void 0:t}},xt=class extends U{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==p)}},bt=class extends U{constructor(t,e,n,o,i){super(t,e,n,o,i),this.type=5}_$AI(t,e=this){if((t=L(this,t,e,0)??p)===R)return;let n=this._$AH,o=t===p&&n!==p||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,i=t!==p&&(n===p||o);o&&this.element.removeEventListener(this.name,this,n),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)}},vt=class{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){L(this,t)}};var lr=St.litHtmlPolyfillSupport;lr?.(j,K),(St.litHtmlVersions??=[]).push("3.3.3");var Jt=(r,t,e)=>{let n=e?.renderBefore??t,o=n._$litPart$;if(o===void 0){let i=e?.renderBefore??null;n._$litPart$=o=new K(t.insertBefore(H(),i),i,void 0,e??{})}return o._$AI(r),o};var Et=globalThis,k=class extends w{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Jt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false)}render(){return R}};k._$litElement$=true,k.finalized=true,Et.litElementHydrateSupport?.({LitElement:k});var pr=Et.litElementPolyfillSupport;pr?.({LitElement:k});(Et.litElementVersions??=[]).push("4.2.2");var Xt=[{endpoint:"astrology/local-space",method:"POST"}];function X(r){return r.toLowerCase().replace(/[\s_-]+/g," ").trim()}function Qt(r){return r?r.charAt(0).toUpperCase()+r.slice(1).toLowerCase():""}var hr=new RegExp("(?![\\d#*])\\p{Emoji}","gu"),ur=r=>r.replace(hr,"$&\uFE0E"),Q=r=>Object.fromEntries(Object.entries(r).map(([t,e])=>[t,ur(e)])),mr=(r,t)=>t?r[X(t)]:void 0,yr=Q({sun:"\u2609",moon:"\u263D",mercury:"\u263F",venus:"\u2640",earth:"\u2641",mars:"\u2642",jupiter:"\u2643",saturn:"\u2644",uranus:"\u2645",neptune:"\u2646",pluto:"\u2647",rahu:"\u260A",ketu:"\u260B",ascendant:"Asc",midheaven:"MC","part of fortune":"\u2297",vertex:"Vx",lagna:"La","north node":"\u260A","south node":"\u260B",chiron:"\u26B7",lilith:"\u26B8","black moon lilith":"\u26B8"}),Tt=r=>mr(yr,r);var xn=Q({aries:"\u2648",taurus:"\u2649",gemini:"\u264A",cancer:"\u264B",leo:"\u264C",virgo:"\u264D",libra:"\u264E",scorpio:"\u264F",sagittarius:"\u2650",capricorn:"\u2651",aquarius:"\u2652",pisces:"\u2653"});var bn=Q({conjunction:"\u260C",semisextile:"\u26BA","semi sextile":"\u26BA",semisquare:"\u2220","semi square":"\u2220",sextile:"\u26B9",square:"\u25A1",trine:"\u25B3",sesquiquadrate:"\u26BC",quincunx:"\u26BB",opposition:"\u260D"});var vn=Q({heaven:"\u2630",lake:"\u2631",fire:"\u2632",thunder:"\u2633",wind:"\u2634",water:"\u2635",mountain:"\u2636",earth:"\u2637"});var gr={attribute:true,type:String,converter:I,reflect:false,hasChanged:Z},fr=(r=gr,t,e)=>{let{kind:n,metadata:o}=e,i=globalThis.litPropertyMetadata.get(o);if(i===void 0&&globalThis.litPropertyMetadata.set(o,i=new Map),n==="setter"&&((r=Object.create(r)).wrapped=true),i.set(e.name,r),n==="accessor"){let{name:s}=e;return{set(a){let d=t.get.call(this);t.set.call(this,a),this.requestUpdate(s,d,r,true,a)},init(a){return a!==void 0&&this.C(s,void 0,r,a),a}}}if(n==="setter"){let{name:s}=e;return function(a){let d=this[s];t.call(this,a),this.requestUpdate(s,d,r,true,a)}}throw Error("Unsupported decorator location: "+n)};function g(r){return(t,e)=>typeof e=="object"?fr(r,t,e):((n,o,i)=>{let s=o.hasOwnProperty(i);return o.constructor.createProperty(i,n),s?Object.getOwnPropertyDescriptor(o,i):void 0})(r,t,e)}function v(r){return g({...r,state:true,attribute:false})}var C=r=>r??p;var te=["de","en","es","fr","hi","pt","ru","tr","zh-Hans","zh-Hant"];function At(r){if(r.lang)return r.lang;if(typeof document>"u")return;let t=r.closest?.("[lang]")?.getAttribute("lang");return t||document.documentElement.lang||void 0}var xr={tw:"hant",hk:"hant",mo:"hant",cn:"hans",sg:"hans",my:"hans"};function kt(r,t){let e=r.toLowerCase();return t.find(n=>n.toLowerCase()===e)}function ee(r,t=te){let e=At(r);if(!e)return;let n=kt(e,t);if(n)return n;let o=e.toLowerCase().split("-"),i=o[0];if(i==="zh"){let s=o.find(a=>a==="hans"||a==="hant")??xr[o[1]??""];return s?kt(`zh-${s}`,t):void 0}return kt(i,t)}var oe="symbols";var br={Fraunces:["latin","latin-ext"],Jost:["latin","latin-ext","cyrillic"],Geist:["latin","latin-ext","cyrillic"]},_t='"Jost", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',re='"Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',ne='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',et={"fraunces-jost":{name:"Fraunces with Jost",sans:_t,display:'"Fraunces", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif'},jost:{name:"Jost",sans:_t,display:_t},geist:{name:"Geist",sans:re,display:re},system:{name:"System",sans:ne,display:ne}};function ie(r){let{sans:t,display:e}=et[r];return Object.keys(br).filter(n=>`${t} ${e}`.includes(`"${n}"`))}var se="1.5.0";var vr=/^(.*)\/cdn\/(?:roxy-ui|components\/[\w-]+)\.js$/,Sr=/^(.*\/dist)\/(?:index|components\/[\w-]+)\.js$/;function ae(r,t){if(!t)return;let e=new URL(t);if(e.protocol!=="https:"&&e.protocol!=="http:")return;let n=(vr.exec(e.pathname)??Sr.exec(e.pathname))?.[1];if(n!==void 0)return e.hostname==="cdn.jsdelivr.net"?`https://cdn.jsdelivr.net/npm/@roxyapi/ui@${r}/dist`:`${e.origin}${n}`}var Tr={},wr="color-mix(in oklab, var(--roxy-accent) 70%, black)",$r="var(--roxy-accent)",Er="color-mix(in srgb, var(--roxy-accent) 40%, transparent)",de=/^#(?:[\da-f]{3}|[\da-f]{6})$/i;function ce(r){return r!==void 0&&Object.hasOwn(et,r)}function le(r){let t=[];return r.brandColor&&de.test(r.brandColor)&&t.push(`--roxy-primary:${r.brandColor}`),r.brandAccent&&de.test(r.brandAccent)&&t.push(`--roxy-accent:${r.brandAccent}`,`--roxy-accent-ink:light-dark(${wr},${$r})`,`--roxy-ring:${Er}`),t.join(";")}function pe(r,t){if(ce(t))return t;let e=r.getRootNode();if(("host"in e?e.host:null)?.localName.startsWith("roxy-")||!globalThis.getComputedStyle)return;let o=r.shadowRoot?.firstElementChild,i=o?.localName==="style"?o:null;i?.sheet&&(i.sheet.disabled=true);let s,a,d;try{let c=globalThis.getComputedStyle(r),l=u=>c.getPropertyValue(u).trim();s=l("--roxy-font-sans"),a=l("--roxy-font-display"),d=l("--roxy-font")}finally{i?.sheet&&(i.sheet.disabled=false)}if(!(s||a))return ce(d)?d:void 0}function he(r){let{sans:t,display:e}=et[r];return`--roxy-font:${r};--roxy-font-sans:${t};--roxy-font-display:${e}`}var ue=ae(se,globalThis.document?.currentScript?.src||Tr.url);function me(r,t){if(typeof document>"u"||t===void 0)return;let e=`roxy-ui-font-${r}`;if(document.getElementById(e))return;let n=document.createElement("link");n.id=e,n.rel="stylesheet",n.href=`${t}/styles/fonts/${r}.css`,document.head.append(n)}function ye(r,t=ue){ie(r).length>0&&me(r,t)}function ge(r=ue){me(oe,r)}var fe='@layer roxy.tokens,roxy.theme;@layer roxy.tokens{:where(:root,:host){color-scheme:light;--roxy-bg: #ffffff;--roxy-fg: #0a0a0a;--roxy-accent: #4a6297;--roxy-success: #16a34a;--roxy-warning: #ea580c;--roxy-danger: #dc2626;--roxy-info: #0284c7;--roxy-accent-ink: color-mix(in oklab, var(--roxy-accent) 70%, black);--roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, black);--roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, black);--roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, black);--roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, black);--roxy-moon-shade: color-mix(in oklab, var(--roxy-fg) 78%, var(--roxy-bg));--roxy-font: initial;--roxy-font-sans: initial;--roxy-font-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, "Liberation Mono", monospace;--roxy-font-symbol: "Roxy Symbols", ui-sans-serif, system-ui, sans-serif;--roxy-text-base: 1rem;--roxy-text-scale: 1.15;--roxy-weight-normal: 400;--roxy-weight-bold: 600;--roxy-leading-tight: 1.25;--roxy-leading-normal: 1.5;--roxy-tracking-tight: -0.01em;--roxy-tracking-normal: 0em;--roxy-space-unit: 0.25rem;--roxy-radius: 6px;--roxy-motion-duration: 200ms;--roxy-motion-easing: cubic-bezier(0.4, 0, 0.2, 1)}:where(:root,:host,[data-theme],.light,.dark){--roxy-surface: var(--roxy-bg);--roxy-primary: var(--roxy-fg);--roxy-secondary: color-mix(in oklab, var(--roxy-fg) 78%, var(--roxy-bg));--roxy-muted: color-mix(in oklab, var(--roxy-fg) 60%, var(--roxy-bg));--roxy-border: color-mix(in oklab, var(--roxy-fg) 14%, var(--roxy-bg));--roxy-ring: color-mix(in srgb, var(--roxy-accent) 40%, transparent);--roxy-heat: var(--roxy-danger);--roxy-moon-lit: color-mix(in oklab, var(--roxy-accent) 6%, #f6eedf);--roxy-moon-mare: color-mix( in oklab, var(--roxy-moon-lit) 62%, var(--roxy-moon-shade) );--roxy-moon-rim: color-mix( in oklab, var(--roxy-moon-shade) 70%, var(--roxy-fg) );--roxy-moon-eclipse: color-mix( in oklab, color-mix(in oklab, var(--roxy-danger) 55%, var(--roxy-warning)) 72%, var(--roxy-moon-shade) );--roxy-moon-corona: color-mix( in oklab, var(--roxy-warning) 60%, var(--roxy-moon-lit) );--roxy-font-display: var(--roxy-font-sans);--roxy-text-sm: calc(var(--roxy-text-base) / var(--roxy-text-scale));--roxy-text-xs: calc(var(--roxy-text-sm) / var(--roxy-text-scale));--roxy-text-lg: calc(var(--roxy-text-base) * var(--roxy-text-scale));--roxy-text-xl: calc( var(--roxy-text-lg) * var(--roxy-text-scale) * var(--roxy-text-scale) );--roxy-space-xs: var(--roxy-space-unit);--roxy-space-sm: calc(var(--roxy-space-unit) * 2);--roxy-space-md: calc(var(--roxy-space-unit) * 4);--roxy-space-lg: calc(var(--roxy-space-unit) * 6);--roxy-space-xl: calc(var(--roxy-space-unit) * 10);--roxy-line-thick: calc(var(--roxy-space-unit) / 2);--roxy-touch: calc(var(--roxy-space-unit) * 11);--roxy-radius-sm: calc(var(--roxy-radius) / 2);--roxy-radius-md: var(--roxy-radius);--roxy-radius-lg: calc(var(--roxy-radius) * 5 / 3);--roxy-radius-full: 9999px;--roxy-shadow-sm: none;--roxy-shadow-md: 0 4px 12px color-mix(in srgb, black 10%, transparent);--roxy-shadow-lg: 0 12px 32px color-mix(in srgb, black 18%, transparent)}@media(prefers-color-scheme:dark){:where(:root,:host){color-scheme:dark;--roxy-bg: #0a0a0a;--roxy-fg: #fafafa;--roxy-accent: #92aade;--roxy-success: #22c55e;--roxy-warning: #fb923c;--roxy-danger: #ef4444;--roxy-info: #38bdf8;--roxy-accent-ink: var(--roxy-accent);--roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, white);--roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, white);--roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, white);--roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, white);--roxy-moon-shade: color-mix( in oklab, var(--roxy-fg) 10%, var(--roxy-bg) )}}:where(:root[data-theme=light],[data-theme=light],:root.light,.light,:host([data-theme="light"])){color-scheme:light;--roxy-bg: #ffffff;--roxy-fg: #0a0a0a;--roxy-accent: #4a6297;--roxy-success: #16a34a;--roxy-warning: #ea580c;--roxy-danger: #dc2626;--roxy-info: #0284c7;--roxy-accent-ink: color-mix(in oklab, var(--roxy-accent) 70%, black);--roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, black);--roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, black);--roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, black);--roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, black);--roxy-moon-shade: color-mix(in oklab, var(--roxy-fg) 78%, var(--roxy-bg))}:where(:root[data-theme=dark],[data-theme=dark],:root.dark,.dark,:host([data-theme="dark"])){color-scheme:dark;--roxy-bg: #0a0a0a;--roxy-fg: #fafafa;--roxy-accent: #92aade;--roxy-success: #22c55e;--roxy-warning: #fb923c;--roxy-danger: #ef4444;--roxy-info: #38bdf8;--roxy-accent-ink: var(--roxy-accent);--roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, white);--roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, white);--roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, white);--roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, white);--roxy-moon-shade: color-mix(in oklab, var(--roxy-fg) 10%, var(--roxy-bg))}@media(prefers-reduced-motion:reduce){:where(:root,:host){--roxy-motion-duration: 0ms}}}';var rt="roxy-ui-tokens";function nt(){if(typeof document>"u")return null;let r=document.getElementById(rt);if(r)return r;let t=document.createElement("style");return t.id=rt,t.textContent=fe,document.head.prepend(t),t}var xe="__ROXY_UI_I18N__";function be(){let r=globalThis,t=r[xe];if(t)return t;let e={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return r[xe]=e,e}function kr(r,t){return t?r.replace(/\{\{(\w+)\}\}/g,(e,n)=>n in t?String(t[n]??""):e):r}function ve(r,t,e){return kr(Ar(r,t)??t,e)}function Ar(r,t){if(!r)return;let{catalogs:e}=be(),n=r.toLowerCase();return(e[n]??e[n.split("-")[0]])?.[X(t)]}function Se(r){let{listeners:t}=be();return t.add(r),()=>{t.delete(r)}}var ot=class{constructor(t){this.host=t,t.addController(this)}hostConnected(){this.unsubscribe=Se(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var it=class extends k{constructor(){super();this.translator=(e,n)=>this.t(e,n);new ot(this)}connectedCallback(){super.connectedCallback(),nt()}updated(e){super.updated(e),this.renderRoot.querySelector(".roxy-glyph")&&ge()}fontDeclarations(e){let n=pe(this,e);return n?(ye(n),he(n)):""}renderFontStyle(){let e=this.fontDeclarations();return e?h`<style>:host{${e}}</style>`:p}t(e,n){return ve(this.effectiveLang(),e,n)}effectiveLang(){return At(this)}};var we=x`:where(.roxy-glyph){font-family:var(--roxy-font-symbol)}`;function st(r){return r?h`<span class="roxy-glyph" aria-hidden="true">${r}</span>`:p}var $e=x`:where([part~=card]){background:var(--roxy-surface);color:var(--roxy-fg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-lg);box-shadow:var(--roxy-shadow-sm)}:where([part~=card] [part~=card],[part~=card] [part~=reading],[part~=card] .roxy-card){border:0;border-block-start:1px solid var(--roxy-border);box-shadow:none;background:0 0;border-radius:0;padding-inline:0}:host([bare]) [part~=card]{box-shadow:none;background:0 0;border:0;border-radius:0;padding:0}:where(h1,h2){color:var(--roxy-fg);font-size:var(--roxy-text-lg);font-weight:var(--roxy-weight-bold);line-height:var(--roxy-leading-tight);letter-spacing:var(--roxy-tracking-tight);text-wrap:balance}:where(h3,h4,h5,h6){color:var(--roxy-fg);font-size:var(--roxy-text-base);font-weight:var(--roxy-weight-bold);line-height:var(--roxy-leading-tight);letter-spacing:var(--roxy-tracking-normal);text-transform:none}:where(.roxy-label,th,dt){color:var(--roxy-muted);font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-normal);letter-spacing:var(--roxy-tracking-normal);text-transform:none}:where(.roxy-chips){gap:var(--roxy-space-xs);flex-wrap:wrap;margin:0;padding:0;list-style:none;display:flex}:where(.roxy-chip,.roxy-chips>li){align-items:center;gap:var(--roxy-space-xs);padding:calc(var(--roxy-space-unit) / 2) var(--roxy-space-sm);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-sm);color:var(--roxy-secondary);font-size:var(--roxy-text-xs);line-height:var(--roxy-leading-tight);overflow-wrap:anywhere;background:0 0;max-inline-size:100%;display:inline-flex}:where(.roxy-chip[data-tone=success],.roxy-chips>li[data-tone=success]){color:var(--roxy-success-fg)}:where(.roxy-chip[data-tone=warning],.roxy-chips>li[data-tone=warning]){color:var(--roxy-warning-fg)}:where(.roxy-chip[data-tone=danger],.roxy-chips>li[data-tone=danger]){color:var(--roxy-danger-fg)}:where(.roxy-chip[data-tone=info],.roxy-chips>li[data-tone=info]){color:var(--roxy-info-fg)}:where(table){border-collapse:collapse;font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums}:where(th,td){padding:var(--roxy-space-xs) var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);text-align:start;vertical-align:top}:where(summary){cursor:pointer}:where(a,button,summary,input,select,textarea,[tabindex]):focus-visible{outline:var(--roxy-line-thick) solid var(--roxy-ring);outline-offset:var(--roxy-line-thick)}:where(summary:focus-visible){border-radius:var(--roxy-radius-sm)}:where(input,select,textarea,button){font:inherit}:where(input:not([type=checkbox],[type=radio],[type=range]),select,textarea){padding:var(--roxy-space-xs) var(--roxy-space-sm);background:var(--roxy-bg);color:var(--roxy-fg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md)}`;var _r=x`:host{--roxy-label-col:minmax(0, 25%);--_mask:var(--roxy-surface);font-family:var(--roxy-font-sans);color:var(--roxy-fg);font-size:var(--roxy-text-base);line-height:var(--roxy-leading-normal);animation:roxy-fade-in var(--roxy-motion-duration) var(--roxy-motion-easing) both;background:0 0;display:block;container-type:inline-size}:host([bare]){--_mask:var(--roxy-bg)}:host([hidden]){display:none}:host([bare]){--roxy-surface:transparent;--roxy-shadow-sm:none;--roxy-shadow-md:none}*,:before,:after{box-sizing:border-box}h1,h2,h3,h4{font-family:var(--roxy-font-display)}@keyframes roxy-fade-in{0%{transform:translateY(calc(var(--roxy-space-unit) / 2))}to{transform:translateY(0)}}@media (prefers-reduced-motion:reduce){:host{animation:none}}.roxy-skeleton{background:linear-gradient(90deg, var(--roxy-border) 0%, color-mix(in srgb, var(--roxy-border) 60%, transparent) 50%, var(--roxy-border) 100%);border-radius:var(--roxy-radius-md);background-size:200% 100%;animation:1.4s ease-in-out infinite roxy-shimmer}@keyframes roxy-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media (prefers-reduced-motion:reduce){.roxy-skeleton{animation:none}}.roxy-sr-only{clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:0;padding:0;position:absolute;overflow:hidden}.roxy-empty{padding:var(--roxy-space-lg);color:var(--roxy-muted);text-align:center;font-size:var(--roxy-text-sm)}.roxy-error{gap:var(--roxy-space-sm);padding:var(--roxy-space-lg);background:var(--roxy-surface);border:1px solid var(--roxy-danger);border-radius:var(--roxy-radius-md);color:var(--roxy-danger-fg);font-size:var(--roxy-text-sm);justify-items:start;display:grid}:host(:focus-within) .roxy-card{outline:var(--roxy-line-thick) solid var(--roxy-ring);outline-offset:var(--roxy-line-thick)}.roxy-attribution{margin-top:var(--roxy-space-sm);font-size:var(--roxy-text-xs);color:var(--roxy-muted);text-align:right}.roxy-attribution a{color:inherit;text-decoration:none}.roxy-attribution a:hover{color:var(--roxy-accent-ink);text-decoration:underline}.roxy-edit-bar{margin-bottom:var(--roxy-space-sm);justify-content:flex-end;display:flex}.roxy-edit{padding:var(--roxy-space-xs) var(--roxy-space-md);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);color:var(--roxy-fg);font-family:inherit;font-size:var(--roxy-text-sm);cursor:pointer;background:0 0}.roxy-edit:hover{border-color:var(--roxy-accent);color:var(--roxy-accent-ink)}.roxy-edit:disabled{cursor:progress;color:var(--roxy-muted)}roxy-endpoint-form+*{margin-top:var(--roxy-space-md)}.roxy-more{justify-items:center;gap:var(--roxy-space-sm);margin-top:var(--roxy-space-md);display:grid}.roxy-more .roxy-edit{min-height:var(--roxy-touch)}:host{font-variant-emoji:text}`,at=[_r,$e,we];var Pr="__cols",Rr="__rows";function Cr(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function dt(r){if(Array.isArray(r)){let i=false,s=r.map(a=>{let d=dt(a);return d!==a&&(i=true),d});return i?s:r}if(!Cr(r))return r;let t=r[Pr],e=r[Rr];if(Array.isArray(t)&&Array.isArray(e)&&Object.keys(r).length===2)return e.map(i=>{let s={};return t.forEach((a,d)=>{s[a]=dt(i[d])}),s});let n=false,o={};for(let[i,s]of Object.entries(r)){let a=dt(s);a!==s&&(n=true),o[i]=a}return n?o:r}function Ee(r){return dt(r)}function Te(r,t){return r.find(e=>e.attrs&&Object.entries(e.attrs).every(([n,o])=>t[n]===o))??r[0]}var Or="pk_live_YOUR_KEY",ke={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 Ae(r){if(r)return r===Or?ke.sample:r.startsWith("pk_")?void 0:ke.secret}function _e(r,t,e={}){e.warn&&console.warn(t.message),r.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:t.reason,message:t.message},bubbles:true,composed:true}))}var Pe="https://roxyapi.com/api/v2";async function Fr(r){try{let t=await r.json();if(t?.error){let e=t.code==="validation_error"&&Array.isArray(t.issues)?t.issues.filter(n=>typeof n.path=="string"&&typeof n.message=="string").map(n=>({path:n.path,message:n.message})):null;return{message:t.error,issues:e?.length?e:null,worded:true,...t.code?{code:t.code}:{}}}}catch{}return{message:`Request failed (${r.status})`,issues:null,worded:false}}var Re={fromAttribute:r=>{if(r!=null){try{let t=JSON.parse(r);if(t&&typeof t=="object"&&!Array.isArray(t))return t}catch{}console.warn("[roxy-ui] submit-context must be a JSON object; sending the request without it.")}}},M=class extends Error{constructor(e,n=null,o=true,i,s){super(e);this.issues=n;this.worded=o;this.status=i;this.code=s}};function Ce(r){return r.submitUrl?void 0:Ae(r.publishableKey)}async function Pt(r,t,e){let n=Ce(r);if(n)throw new M(n.message);let o=r.submitUrl?await fetch(r.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:Lr(t,r.submitContext),signal:e}):await Ur(r,t,e);if(!o.ok){let i=await Fr(o);throw new M(i.message,i.issues,i.worded,o.status,i.code)}return await o.json()}function Lr(r,t){return JSON.stringify(t?{...r,context:t}:r)}function Ur(r,t,e){let n=new URL(`${r.baseUrl??Pe}${t.path}`,document.baseURI);for(let[i,s]of Object.entries(t.query??{}))s!=null&&n.searchParams.set(i,String(s));let o={Accept:"application/json"};return r.publishableKey&&(o["X-API-Key"]=r.publishableKey),t.body!=null&&(o["Content-Type"]="application/json"),fetch(n,{method:t.method??"GET",headers:o,body:t.body!=null?JSON.stringify(t.body):void 0,signal:e})}var ct=class{constructor(t){this.baseUrl=Pe;this.worded=true;this.failure={};this.host=t,t.addController(this)}hostDisconnected(){this.abort?.abort(),this.abort=void 0}async run(t){this.worded=true,this.failure={};let e=Ce(this);if(e){this.host.error=e.message,_e(this.host,e);return}this.abort?.abort();let n=new AbortController;this.abort=n,this.host.loading=true,this.host.error=null,this.host.issues=null;try{let o=await Pt(this,t,n.signal);if(n.signal.aborted)return;this.host.data=o}catch(o){if(n.signal.aborted||o?.name==="AbortError")return;o instanceof M&&(this.host.issues=o.issues,this.failure={status:o.status,code:o.code}),this.worded=o instanceof M&&o.worded,this.host.error=o instanceof Error?o.message:String(o)}finally{this.abort===n&&(this.abort=void 0),n.signal.aborted||(this.host.loading=false)}}};function Oe(r,t,e,n=[]){let o={...e},i=`/${r.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(c,l)=>{let u=o[l];return delete o[l],encodeURIComponent(String(u??""))}),s=new Set(n),a={},d={};for(let[c,l]of Object.entries(o))l===void 0||l===""||(t==="GET"||s.has(c)?a[c]=l:d[c]=l);return{path:i,method:t,query:a,body:t==="POST"?d:void 0}}function Fe(){return h`<svg class="roxy-chevron" viewBox="0 0 16 16" width="14" height="14" aria-hidden="true"><path d="M4 6l4 4 4-4" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>`}var zo=x`summary{list-style:none}summary::-webkit-details-marker{display:none}.roxy-chevron{aspect-ratio:auto;width:.7lh;height:.7lh;color:var(--roxy-muted);transition:transform var(--roxy-motion-duration) var(--roxy-motion-easing);flex-shrink:0}details[open]>summary .roxy-chevron{transform:rotate(180deg)}@media (prefers-reduced-motion:reduce){.roxy-chevron{transition:none}}`;var jo=x`.block{border-top:1px solid var(--roxy-border);padding-top:var(--roxy-space-md)}.block h3{margin:0 0 var(--roxy-space-sm)}.interp-card{padding-block:var(--roxy-space-sm)}.interp-card summary{font-weight:var(--roxy-weight-bold);color:var(--roxy-fg);align-items:center;gap:var(--roxy-space-sm);font-size:var(--roxy-text-sm);display:flex}.interp-lead{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;flex:auto;order:1;min-width:0;display:inline-flex}.interp-aside{align-items:center;gap:var(--roxy-space-sm);flex-shrink:0;order:2;display:inline-flex}.roxy-chevron{order:3}.interp-aside small{color:var(--roxy-muted);font-weight:var(--roxy-weight-normal);white-space:nowrap}@container (width<=26rem){.interp-card summary{flex-wrap:wrap}.roxy-chevron{order:2}.interp-aside{flex-basis:100%;order:3;justify-content:flex-end}}.interp-body{margin-top:var(--roxy-space-sm);gap:var(--roxy-space-sm);color:var(--roxy-fg);font-size:var(--roxy-text-sm);line-height:var(--roxy-leading-normal);overflow-wrap:anywhere;display:grid}.interp-body p{margin:0}`;function Le(r,t,e){let n=r.filter(o=>!!o.body);return n.length===0?p:h`<section class="block" part="section readings"><h3>${e}</h3>${n.map((o,i)=>h`<details class="interp-card" part="reading" name="${t}" ?open="${i===0}"><summary><span class="interp-lead">${st(o.glyph)} ${o.label}</span> ${Fe()} ${o.aside?h`<span class="interp-aside"><small>${o.aside}</small></span>`:p}</summary><div class="interp-body"><p>${o.body}</p>${o.extra??p}</div></details>`)}</section>`}var Mr="roxy-data";function Nr(r){return r.nodeName==="SCRIPT"&&r.getAttribute("type")==="application/json"}var lt=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(Nr(t)&&t.classList.contains(Mr))return t;return null}parse(t){if(t?.trim())try{return JSON.parse(t)}catch{return}}};var m=class extends it{constructor(){super();this.data=null;this.endpoint="";this.remember=false;this.hideReadings=false;this.hideSections="";this.loading=false;this.error=null;this.issues=null;this.selfFetched=false;this.editing=false;this.sticky=false;this.hostLoaded=false;this.moreLoading=false;this.moreError=null;this.onMore=async()=>{let e=this.lastRequest,n=this.listKey,o=this.listRows();if(!(!e||!n||!o)){this.moreLoading=true,this.moreError=null;try{let i=await Pt(this.fetcher,{...e,query:{...e.query,offset:o.length}});if(this.lastRequest!==e)return;let s=i[n];this.data={...this.data,...i,[n]:[...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 n=this.selfFetch();if(!n)return;let o=e.detail;this.lastValues=o.values,this.sticky=!!o.sticky,this.selfFetched=true,this.editing=false,this.remember&&this.writeRemembered(o.values),this.fetchFresh(Oe(n.endpoint,n.method,{...o.values,...this.ownRequest()},o.queryKeys??[]))};new lt(this),this.fetcher=new ct(this)}static{this.styles=[at]}static{this.endpoints=[]}willUpdate(e){if(e.has("data")&&this.data!=null){let n=Ee(this.data);n!==this.data&&(this.data=n)}(e.has("publishableKey")||e.has("baseUrl")||e.has("submitUrl")||e.has("submitContext"))&&this.syncFetcher()}syncFetcher(){this.fetcher.publishableKey=this.publishableKey,this.baseUrl&&(this.fetcher.baseUrl=this.baseUrl),this.fetcher.submitUrl=this.submitUrl,this.fetcher.submitContext=this.submitContext}selfFetch(){let e=this.endpoint?{endpoint:this.endpoint,method:"POST"}:this.hostLoaded||!(this.publishableKey||this.submitUrl)?void 0:Te(this.constructor.endpoints,this);return e&&{endpoint:e.endpoint,method:this.method??e.method}}render(){return h`${this.hostStyle()}${this.renderState()}`}drawn(e){try{return this.renderData(e)}catch(n){return console.warn(`[roxy-ui] ${this.localName} could not draw its response`,n),this.dispatchEvent(new CustomEvent("roxy-render-error",{detail:{error:n},bubbles:true,composed:true})),customElements.get("roxy-data")?h`<roxy-data .data="${e}" lang="${C(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)),n=[le(this),this.fontDeclarations(this.font)].filter(Boolean).join(";");if(e.length===0&&!n)return p;let o=(n?`:host{${n}}`:"")+e.map(i=>`[part~="${i}"],roxy-endpoint-form::part(${i}){display:none!important}`).join("");return h`<style>${o}</style>`}ownRequest(){return{}}get failure(){return this.fetcher.failure}renderState(){return this.selfFetch()&&this.sticky&&this.selfFetched&&!this.editing?this.renderWithForm(this.stickyBody()):this.loading?this.renderLoading():this.error!=null?this.renderError(this.error):this.data!=null?this.selfFetched?this.editing?this.renderForm():this.renderResult(this.data):this.showAttribution()?h`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data):this.renderNoData()}renderInterpretation(e,n,o){return this.hideReadings?p:Le(e,n,this.t(o??"Reading"))}renderResult(e){let n=h`<div class="roxy-edit-bar" part="edit-bar"><button type="button" class="roxy-edit" @click="${this.onEdit}">${this.t("Edit query")}</button></div>${this.drawn(e)}`;return this.showAttribution()?h`${n}${this.renderAttribution()}`:n}renderWithForm(e){return h`${this.renderForm()}${e}`}stickyBody(){return this.loading?this.renderLoading():this.error!=null?this.issues?p:this.renderErrorBanner(this.error):this.data==null?p:this.showAttribution()?h`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data)}renderMore(){let e=this.listRows(),n=this.data?.total;return!this.lastRequest||!e||typeof n!="number"?p:e.length>=n?p:h`<div class="roxy-more" part="more"><button type="button" class="roxy-edit" ?disabled="${this.moreLoading}" aria-busy="${this.moreLoading?"true":"false"}" @click="${this.onMore}">${this.t("Show more")}</button> ${this.moreError?h`<p class="roxy-error" role="alert">${this.t(this.moreError)}</p>`:p}</div>`}listRows(){let e=this.listKey?this.data?.[this.listKey]:void 0;return Array.isArray(e)?e:void 0}fetchFresh(e){return this.lastRequest=e,this.openedRow=void 0,this.openedRowId=void 0,this.moreError=null,this.fetcher.run(e)}load(e){return this.hostLoaded=true,this.syncFetcher(),this.fetchFresh(e)}pickRow(e){this.dispatchEvent(new CustomEvent("roxy-symbol-select",{detail:e,bubbles:true,composed:true})),this.openRow(e.id)}openRow(e){if(!this.rowDetail||!(this.publishableKey||this.submitUrl))return;let n=this.openedRow??document.createElement(this.rowDetail.tag);n.publishableKey=this.publishableKey,n.baseUrl=this.baseUrl,n.submitUrl=this.submitUrl,n.submitContext=this.submitContext,n.hideReadings=this.hideReadings,n.hideSections=this.hideSections;let o=this.effectiveLang();o&&n.setAttribute("lang",o),this.openedRow=n,this.openedRowId=e,n.load({path:`/${this.rowDetail.path.replace("{id}",encodeURIComponent(e))}`,method:"GET",query:{lang:ee(this)}}).then(()=>n.scrollIntoView?.({block:"nearest"}))}showAttribution(){return this.attribution!=null&&this.attribution!=="off"&&this.attribution!=="false"}renderAttribution(){return h`<div class="roxy-attribution" part="attribution"><a href="https://roxyapi.com/?utm_source=widget&utm_medium=embed" target="_blank" rel="noopener">${this.t("Spiritual data by RoxyAPI")}</a></div>`}renderNoData(){return this.selfFetch()?this.renderWithForm(p):this.renderEmpty()}renderForm(){let e=this.selfFetch();return h`<roxy-endpoint-form part="form" exportparts="hint" data-endpoint="${e?.endpoint??""}" method="${e?.method??"POST"}" spec-url="${C(this.specUrl)}" publishable-key="${C(this.publishableKey)}" location-url="${C(this.locationUrl)}" submit-label="${C(this.submitLabel)}" lang="${C(this.effectiveLang())}" .initialValues="${this.formInitialValues()}" .serverIssues="${this.issues}" .apiRoute="${this.fetcher}" .autoload="${!this.selfFetched}" .fullPages="${!!this.listKey}" @roxy-submit="${this.onFormSubmit}"></roxy-endpoint-form>`}formInitialValues(){return this.lastValues??(this.remember?this.readRemembered():void 0)}rememberKey(){return`roxy-ui:form:${this.selfFetch()?.endpoint??""}`}readRemembered(){try{let e=sessionStorage.getItem(this.rememberKey());return e?JSON.parse(e):void 0}catch{return}}writeRemembered(e){try{sessionStorage.setItem(this.rememberKey(),JSON.stringify(e))}catch{}}renderEmpty(){return h`<div class="roxy-empty" role="status" part="empty">${this.t("No data")}</div>`}renderLoading(){return h`<div class="roxy-skeleton" style="height:5lh" role="status" aria-label="${this.t("Loading")}" part="loading"></div>`}renderError(e){let n=!!this.selfFetch();if(n&&this.issues)return this.renderForm();let o=this.renderErrorBanner(e);return n?h`${o}${this.renderForm()}`:o}renderErrorBanner(e){return h`<div class="roxy-error" role="alert" part="error">${!this.fetcher.worded&&this.errorMessage||this.t(e)}</div>`}};y([g({attribute:false})],m.prototype,"data",2),y([g({type:String,attribute:"data-endpoint"})],m.prototype,"endpoint",2),y([g({type:String})],m.prototype,"method",2),y([g({type:String,attribute:"publishable-key"})],m.prototype,"publishableKey",2),y([g({type:String,attribute:"base-url"})],m.prototype,"baseUrl",2),y([g({type:String,attribute:"spec-url"})],m.prototype,"specUrl",2),y([g({type:String,attribute:"submit-url"})],m.prototype,"submitUrl",2),y([g({attribute:"submit-context",converter:Re})],m.prototype,"submitContext",2),y([g({type:String,attribute:"location-url"})],m.prototype,"locationUrl",2),y([g({type:Boolean})],m.prototype,"remember",2),y([g({type:Boolean,attribute:"hide-readings",reflect:true})],m.prototype,"hideReadings",2),y([g({type:String,attribute:"hide-sections",reflect:true})],m.prototype,"hideSections",2),y([g({type:String,attribute:"brand-color"})],m.prototype,"brandColor",2),y([g({type:String,attribute:"brand-accent"})],m.prototype,"brandAccent",2),y([g({type:String})],m.prototype,"font",2),y([g({type:String})],m.prototype,"hemisphere",2),y([g({type:String,attribute:"submit-label"})],m.prototype,"submitLabel",2),y([g({type:String,attribute:"error-message"})],m.prototype,"errorMessage",2),y([g({type:String})],m.prototype,"attribution",2),y([v()],m.prototype,"loading",2),y([v()],m.prototype,"error",2),y([v()],m.prototype,"issues",2),y([v()],m.prototype,"selfFetched",2),y([v()],m.prototype,"editing",2),y([v()],m.prototype,"sticky",2),y([v()],m.prototype,"openedRow",2),y([v()],m.prototype,"openedRowId",2),y([v()],m.prototype,"moreLoading",2),y([v()],m.prototype,"moreError",2);var pt=class{constructor(t){this.host=t;this.state="closed";this.zoom=1;this.pressedBy="";this.press=t2=>{this.pressedBy=t2.pointerType};this.openOnMouse=t2=>{let e=this.pressedBy==="mouse";this.pressedBy="",e&&(t2.target?.closest?.("a, button, summary, input, select, textarea")||getSelection()?.toString()||this.open())};t.addController(this)}hostUpdated(){let t=this.host.renderRoot.querySelector(".roxy-chart-dialog");if(!t)this.reset();else if(t.isConnected&&this.state!=="closed"){this.state==="opening"&&(this.state="open",t.open||t.showModal());let e=t.querySelector(".roxy-chart-scroll");t.open&&e&&this.position&&(e.scrollLeft=e.scrollWidth*this.position.x-e.clientWidth/2,e.scrollTop=e.scrollHeight*this.position.y-e.clientHeight/2,this.position=void 0)}}hostDisconnected(){this.reset(),this.host.renderRoot.querySelector(".roxy-chart-dialog")?.close()}open(){this.state="opening",this.position={x:.5,y:0},this.host.requestUpdate()}reset(){this.state="closed",this.zoom=1,this.position=void 0}resize(t){let e=this.host.renderRoot.querySelector(".roxy-chart-scroll");this.position=t===0?{x:.5,y:0}:e?{x:(e.scrollLeft+e.clientWidth/2)/e.scrollWidth,y:(e.scrollTop+e.clientHeight/2)/e.scrollHeight}:void 0,this.zoom=t===0?1:Math.min(3,Math.max(1,this.zoom+t)),this.host.requestUpdate()}renderChartViewport(t,e,n){return h`<div class="roxy-chart-view"><div class="roxy-chart-hit" @pointerdown="${this.press}" @click="${this.openOnMouse}">${t}</div><div class="roxy-chart-tools" part="chart-controls"><button type="button" @click="${()=>this.open()}">${n("Enlarge chart")}</button></div><dialog class="roxy-chart-dialog" part="chart-dialog" aria-label="${e}" @close="${()=>{this.reset(),this.host.requestUpdate()}}">${this.state!=="closed"?h`<div class="roxy-chart-bar"><strong>${e}</strong><div class="roxy-chart-tools"><button type="button" aria-label="${n("Zoom out")}" ?disabled="${this.zoom===1}" @click="${()=>this.resize(-.5)}">−</button> <button type="button" @click="${()=>this.resize(0)}">${n("Reset zoom")}</button> <button type="button" aria-label="${n("Zoom in")}" ?disabled="${this.zoom===3}" @click="${()=>this.resize(.5)}">+</button> <button type="button" @click="${()=>this.host.renderRoot.querySelector(".roxy-chart-dialog")?.close()}">${n("Close")}</button></div></div><div class="roxy-chart-scroll" role="region" tabindex="0" aria-label="${e}"><div class="roxy-chart-expanded" style="${`--chart-zoom:${this.zoom}`}">${t}</div></div>`:p}</dialog></div>`}},Ue=x`.roxy-chart-view{min-width:0}@media (hover:hover) and (pointer:fine){.roxy-chart-hit{cursor:zoom-in}}.roxy-chart-tools{gap:var(--roxy-space-sm);flex-wrap:wrap;justify-content:flex-end;align-items:center;display:flex}.roxy-chart-tools button{font-size:var(--roxy-text-sm);color:var(--roxy-secondary);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);min-width:2lh;min-height:2lh;padding:var(--roxy-space-xs) var(--roxy-space-sm);cursor:pointer;background:0 0}.roxy-chart-tools button:hover:not(:disabled){border-color:var(--roxy-accent);color:var(--roxy-accent-ink)}.roxy-chart-tools button:disabled{color:var(--roxy-muted);cursor:default}.roxy-chart-dialog{--roxy-surface:var(--roxy-bg);width:calc(100% - 2 * var(--roxy-space-md));max-width:calc(var(--roxy-chart-expanded-width,60rem) * 1.2);max-height:calc(100% - 2 * var(--roxy-space-md));padding:var(--roxy-space-md);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-lg);color:var(--roxy-fg);background:var(--roxy-bg);box-shadow:var(--roxy-shadow-lg);margin:auto}.roxy-chart-dialog[open]{flex-direction:column;display:flex;overflow:hidden}.roxy-chart-dialog::backdrop{background:color-mix(in oklab, var(--roxy-bg) 85%, transparent)}.roxy-chart-bar{justify-content:space-between;align-items:center;gap:var(--roxy-space-md);margin-bottom:var(--roxy-space-md);flex-wrap:wrap;flex-shrink:0;display:flex}.roxy-chart-bar>strong{overflow-wrap:anywhere;min-width:0}.roxy-chart-scroll{overscroll-behavior:contain;flex:auto;min-height:0;overflow:auto}.roxy-chart-expanded{width:max(100%, calc(var(--roxy-chart-expanded-width,60rem) * var(--chart-zoom)));padding:var(--roxy-space-sm)}.roxy-chart-expanded>svg{width:100%;max-width:none;height:auto;margin:0}`;var Me=r=>t=>{customElements.get(r)||customElements.define(r,t)};function Ne(r){let t=r%360;return t<0?t+360:t}function ze(r,t,e){let n=r.filter(c=>Number.isFinite(t(c))).map(c=>{let l=Ne(t(c));return{item:c,longitude:l,displayLongitude:l}}).sort((c,l)=>c.longitude-l.longitude),o=n.length;if(o<2)return n;let i=0,s=-1;for(let c=0;c<o;c++){let l=n[(c+o-1)%o],f=(n[c].longitude-l.longitude+360)%360;f>s&&(s=f,i=c)}let a=n[i],d=a.longitude;for(let c=1;c<o;c++){let l=n[(i+c)%o],u=typeof e=="function"?e(a.item,l.item):e,f=l.longitude+(i+c>=o?360:0);d=Math.max(f,d+u),l.displayLongitude=Ne(d),a=l}return n}function Ie(r,t){return t>0?r/t*(180/Math.PI):0}var Rt=/^\d{4}-\d{2}-\d{2}$/,zr=/^\d{4}-\d{2}$/,Ge=/^\d{2}:\d{2}(:\d{2})?$/,Ir=/^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2}(\.\d+)?)?$/,De=new Map;function Ct(r){if(!r)return["en"];let t=De.get(r);if(t)return[t,"en"];let e="en";try{e=Intl.getCanonicalLocales(r)[0]??"en"}catch{e="en"}return De.set(r,e),[e,"en"]}var He=new Map;function Dr(r){let t=r??"",e=He.get(t);if(e)return e;let o={hour:new Intl.DateTimeFormat(Ct(r),{timeStyle:"short",timeZone:"UTC"}).formatToParts(new Date(Date.UTC(2e3,0,1,1))).find(i=>i.type==="hour")?.value?.length===2?"2-digit":"numeric",minute:"2-digit"};return He.set(t,o),o}function je(r){let t=Ge.test(r)?`1970-01-01T${r}`:Rt.test(r)?`${r}T00:00:00`:zr.test(r)?`${r}-01T00:00:00`:Ir.test(r)?r.replace(" ","T"):null;return t?{d:new Date(`${t}Z`),timeZone:"UTC"}:{d:new Date(r)}}function Hr(r,t){if(typeof t!="string"||t.length===0)return"";let{d:e,timeZone:n}=je(t);return Number.isNaN(e.getTime())?t:e.toLocaleDateString(Ct(r),{month:"short",day:"numeric",year:"numeric",timeZone:n})}function Ke(r,t,e,n=false){let o=typeof t=="string"&&Rt.test(t)&&typeof e=="string"&&Ge.test(e)?`${t}T${e}`:t;if(typeof o!="string"||o.length===0)return"";if(Rt.test(o))return Hr(r,o);let{d:i,timeZone:s}=je(o);return Number.isNaN(i.getTime())?o:i.toLocaleString(Ct(r),{month:"short",day:"numeric",year:"numeric",...Dr(r),...n?{second:"2-digit"}:{},timeZone:s})}var Gr="Localized";function ht(r,t,e){let n=r,o=n?.[`${t}${Gr}`];if(typeof o=="string"&&o!=="")return o;if(e!==void 0)return e;let i=n?.[t];return typeof i=="string"?i:""}var jr={Sun:"var(--roxy-accent)",Moon:"var(--roxy-secondary)",Mercury:"var(--roxy-info)",Venus:"var(--roxy-success)",Mars:"var(--roxy-danger)",Jupiter:"var(--roxy-warning)",Saturn:"var(--roxy-muted)",Uranus:"var(--roxy-info-fg)",Neptune:"var(--roxy-success-fg)",Pluto:"var(--roxy-danger-fg)"},Be=["var(--roxy-accent)","var(--roxy-info)","var(--roxy-success)","var(--roxy-danger)","var(--roxy-warning)","var(--roxy-secondary)","var(--roxy-info-fg)","var(--roxy-success-fg)","var(--roxy-danger-fg)","var(--roxy-accent-ink)","var(--roxy-warning-fg)","var(--roxy-primary)"];function Ot(r,t=0){return jr[Qt(r)]??Be[t%Be.length]??"var(--roxy-accent)"}var Ft=320,b=Ft/2,$=128,Kr=118,qe=137,Br=152,qr=.95,Ye={glyph:11},Yr=Ye.glyph;function E(r,t){let e=r*Math.PI/180;return{x:b+t*Math.sin(e),y:b-t*Math.cos(e)}}var Vr=[{az:0,source:"N"},{az:45,source:"NE"},{az:90,source:"E"},{az:135,source:"SE"},{az:180,source:"S"},{az:225,source:"SW"},{az:270,source:"W"},{az:315,source:"NW"}],O=class extends m{constructor(){super(...arguments);this.chartViewport=new pt(this)}renderData(e){let n=e.bodies??[],o=e.birthDetails;return h`<div class="wrap" part="card"><header part="header"><h2>${this.t("Local space")}</h2>${o?h`<p class="roxy-label">${Ke(this.effectiveLang(),o.date,o.time)}</p>`:p}</header>${this.chartViewport.renderChartViewport(this.renderDial(n),this.t("Local space"),this.translator)} ${e.summary&&!this.hideReadings?h`<p class="summary">${e.summary}</p>`:p} ${this.renderList(n)}</div>`}renderDial(e){return h`<svg viewBox="0 0 ${Ft} ${Ft}" part="chart" role="img" aria-label="${this.t("Local space compass of planetary directions from the birthplace")}"><title>${this.t("Local space compass")}</title><desc>${this.t("A compass centered on the birthplace. Each body is a line pointing to its azimuth, clockwise from north. Bodies below the horizon are dimmed.")}</desc><circle class="dial-fill" cx="${b}" cy="${b}" r="${$}"/><circle class="dial" cx="${b}" cy="${b}" r="${$*.66}" stroke-width="0.5"/><circle class="dial" cx="${b}" cy="${b}" r="${$*.33}" stroke-width="0.5"/>${this.renderCompassRing()} ${this.renderSpokes(e)}<circle class="center-dot" cx="${b}" cy="${b}" r="2.5"/></svg>`}renderCompassRing(){let e=[];for(let d=0;d<360;d+=22.5){let c=E(d,$),l=E(d,$-(d%45===0?8:4));e.push(B`<line class="tick" x1=${l.x} y1=${l.y} x2=${c.x} y2=${c.y} />`)}let n=E(0,$),o=E(180,$),i=E(90,$),s=E(270,$),a=Vr.map(({az:d,source:c})=>{let l=E(d,Br),u=d%90===0;return B`<text class=${`compass-label${u?" cardinal":""}`} x=${l.x} y=${l.y} text-anchor="middle" dominant-baseline="central">${this.t(c)}</text>`});return B`
3
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Kt=/'/g,Bt=/"/g,Wt=/^(?:script|style|textarea|title)$/i,$t=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),h=$t(1),B=$t(2),en=$t(3),R=Symbol.for("lit-noChange"),p=Symbol.for("lit-nothing"),qt=new WeakMap,_=P.createTreeWalker(P,129);function Zt(r,t){if(!wt(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ht!==void 0?Ht.createHTML(t):t}var cr=(r,t)=>{let e=r.length-1,n=[],o,i=t===2?"<svg>":t===3?"<math>":"",s=D;for(let a=0;a<e;a++){let d=r[a],c,l,u=-1,f=0;for(;f<d.length&&(s.lastIndex=f,l=s.exec(d),l!==null);)f=s.lastIndex,s===D?l[1]==="!--"?s=Gt:l[1]!==void 0?s=jt:l[2]!==void 0?(Wt.test(l[2])&&(o=RegExp("</"+l[2],"g")),s=A):l[3]!==void 0&&(s=A):s===A?l[0]===">"?(s=o??D,u=-1):l[1]===void 0?u=-2:(u=s.lastIndex-l[2].length,c=l[1],s=l[3]===void 0?A:l[3]==='"'?Bt:Kt):s===Bt||s===Kt?s=A:s===Gt||s===jt?s=D:(s=A,o=void 0);let S=s===A&&r[a+1].startsWith("/>")?" ":"";i+=s===D?d+ar:u>=0?(n.push(c),d.slice(0,u)+Yt+d.slice(u)+T+S):d+T+(u===-2?a:S)}return[Zt(r,i+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),n]},j=class r{constructor({strings:t,_$litType$:e},n){let o;this.parts=[];let i=0,s=0,a=t.length-1,d=this.parts,[c,l]=cr(t,e);if(this.el=r.createElement(c,n),_.currentNode=this.el.content,e===2||e===3){let u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}for(;(o=_.nextNode())!==null&&d.length<a;){if(o.nodeType===1){if(o.hasAttributes())for(let u of o.getAttributeNames())if(u.endsWith(Yt)){let f=l[s++],S=o.getAttribute(u).split(T),F=/([.?@])?(.*)/.exec(f);d.push({type:1,index:i,name:F[2],strings:S,ctor:F[1]==="."?ft:F[1]==="?"?xt:F[1]==="@"?bt:U}),o.removeAttribute(u)}else u.startsWith(T)&&(d.push({type:6,index:i}),o.removeAttribute(u));if(Wt.test(o.tagName)){let u=o.textContent.split(T),f=u.length-1;if(f>0){o.textContent=J?J.emptyScript:"";for(let S=0;S<f;S++)o.append(u[S],H()),_.nextNode(),d.push({type:2,index:++i});o.append(u[f],H())}}}else if(o.nodeType===8)if(o.data===Vt)d.push({type:2,index:i});else{let u=-1;for(;(u=o.data.indexOf(T,u+1))!==-1;)d.push({type:7,index:i}),u+=T.length-1}i++}}static createElement(t,e){let n=P.createElement("template");return n.innerHTML=t,n}};function L(r,t,e=r,n){if(t===R)return t;let o=n!==void 0?e._$Co?.[n]:e._$Cl,i=G(t)?void 0:t._$litDirective$;return o?.constructor!==i&&(o?._$AO?.(false),i===void 0?o=void 0:(o=new i(r),o._$AT(r,e,n)),n!==void 0?(e._$Co??=[])[n]=o:e._$Cl=o),o!==void 0&&(t=L(r,o._$AS(r,t.values),o,n)),t}var gt=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:n}=this._$AD,o=(t?.creationScope??P).importNode(e,true);_.currentNode=o;let i=_.nextNode(),s=0,a=0,d=n[0];for(;d!==void 0;){if(s===d.index){let c;d.type===2?c=new K(i,i.nextSibling,this,t):d.type===1?c=new d.ctor(i,d.name,d.strings,this,t):d.type===6&&(c=new vt(i,this,t)),this._$AV.push(c),d=n[++a]}s!==d?.index&&(i=_.nextNode(),s++)}return _.currentNode=P,o}p(t){let e=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}},K=class r{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,n,o){this.type=2,this._$AH=p,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=o,this._$Cv=o?.isConnected??true}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=L(this,t,e),G(t)?t===p||t==null||t===""?(this._$AH!==p&&this._$AR(),this._$AH=p):t!==this._$AH&&t!==R&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):dr(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!==p&&G(this._$AH)?this._$AA.nextSibling.data=t:this.T(P.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:n}=t,o=typeof n=="number"?this._$AC(t):(n.el===void 0&&(n.el=j.createElement(Zt(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===o)this._$AH.p(e);else{let i=new gt(o,this),s=i.u(this.options);i.p(e),this.T(s),this._$AH=i}}_$AC(t){let e=qt.get(t.strings);return e===void 0&&qt.set(t.strings,e=new j(t)),e}k(t){wt(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,n,o=0;for(let i of t)o===e.length?e.push(n=new r(this.O(H()),this.O(H()),this,this.options)):n=e[o],n._$AI(i),o++;o<e.length&&(this._$AR(n&&n._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(false,true,e);t!==this._$AB;){let n=Dt(t).nextSibling;Dt(t).remove(),t=n}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},U=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,n,o,i){this.type=1,this._$AH=p,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=i,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=p}_$AI(t,e=this,n,o){let i=this.strings,s=false;if(i===void 0)t=L(this,t,e,0),s=!G(t)||t!==this._$AH&&t!==R,s&&(this._$AH=t);else{let a=t,d,c;for(t=i[0],d=0;d<i.length-1;d++)c=L(this,a[n+d],e,d),c===R&&(c=this._$AH[d]),s||=!G(c)||c!==this._$AH[d],c===p?t=p:t!==p&&(t+=(c??"")+i[d+1]),this._$AH[d]=c}s&&!o&&this.j(t)}j(t){t===p?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},ft=class extends U{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===p?void 0:t}},xt=class extends U{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==p)}},bt=class extends U{constructor(t,e,n,o,i){super(t,e,n,o,i),this.type=5}_$AI(t,e=this){if((t=L(this,t,e,0)??p)===R)return;let n=this._$AH,o=t===p&&n!==p||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,i=t!==p&&(n===p||o);o&&this.element.removeEventListener(this.name,this,n),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)}},vt=class{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){L(this,t)}};var lr=St.litHtmlPolyfillSupport;lr?.(j,K),(St.litHtmlVersions??=[]).push("3.3.3");var Jt=(r,t,e)=>{let n=e?.renderBefore??t,o=n._$litPart$;if(o===void 0){let i=e?.renderBefore??null;n._$litPart$=o=new K(t.insertBefore(H(),i),i,void 0,e??{})}return o._$AI(r),o};var Et=globalThis,k=class extends w{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Jt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false)}render(){return R}};k._$litElement$=true,k.finalized=true,Et.litElementHydrateSupport?.({LitElement:k});var pr=Et.litElementPolyfillSupport;pr?.({LitElement:k});(Et.litElementVersions??=[]).push("4.2.2");var Xt=[{endpoint:"astrology/local-space",method:"POST"}];function X(r){return r.toLowerCase().replace(/[\s_-]+/g," ").trim()}function Qt(r){return r?r.charAt(0).toUpperCase()+r.slice(1).toLowerCase():""}var hr=new RegExp("(?![\\d#*])\\p{Emoji}","gu"),ur=r=>r.replace(hr,"$&\uFE0E"),Q=r=>Object.fromEntries(Object.entries(r).map(([t,e])=>[t,ur(e)])),mr=(r,t)=>t?r[X(t)]:void 0,yr=Q({sun:"\u2609",moon:"\u263D",mercury:"\u263F",venus:"\u2640",earth:"\u2641",mars:"\u2642",jupiter:"\u2643",saturn:"\u2644",uranus:"\u2645",neptune:"\u2646",pluto:"\u2BD3",rahu:"\u260A",ketu:"\u260B",ascendant:"Asc",midheaven:"MC","part of fortune":"\u2297",vertex:"Vx",lagna:"La","north node":"\u260A","south node":"\u260B",chiron:"\u26B7",lilith:"\u26B8","black moon lilith":"\u26B8"}),Tt=r=>mr(yr,r);var xn=Q({aries:"\u2648",taurus:"\u2649",gemini:"\u264A",cancer:"\u264B",leo:"\u264C",virgo:"\u264D",libra:"\u264E",scorpio:"\u264F",sagittarius:"\u2650",capricorn:"\u2651",aquarius:"\u2652",pisces:"\u2653"});var bn=Q({conjunction:"\u260C",semisextile:"\u26BA","semi sextile":"\u26BA",semisquare:"\u2220","semi square":"\u2220",sextile:"\u26B9",square:"\u25A1",trine:"\u25B3",sesquiquadrate:"\u26BC",quincunx:"\u26BB",opposition:"\u260D"});var vn=Q({heaven:"\u2630",lake:"\u2631",fire:"\u2632",thunder:"\u2633",wind:"\u2634",water:"\u2635",mountain:"\u2636",earth:"\u2637"});var gr={attribute:true,type:String,converter:I,reflect:false,hasChanged:Z},fr=(r=gr,t,e)=>{let{kind:n,metadata:o}=e,i=globalThis.litPropertyMetadata.get(o);if(i===void 0&&globalThis.litPropertyMetadata.set(o,i=new Map),n==="setter"&&((r=Object.create(r)).wrapped=true),i.set(e.name,r),n==="accessor"){let{name:s}=e;return{set(a){let d=t.get.call(this);t.set.call(this,a),this.requestUpdate(s,d,r,true,a)},init(a){return a!==void 0&&this.C(s,void 0,r,a),a}}}if(n==="setter"){let{name:s}=e;return function(a){let d=this[s];t.call(this,a),this.requestUpdate(s,d,r,true,a)}}throw Error("Unsupported decorator location: "+n)};function g(r){return(t,e)=>typeof e=="object"?fr(r,t,e):((n,o,i)=>{let s=o.hasOwnProperty(i);return o.constructor.createProperty(i,n),s?Object.getOwnPropertyDescriptor(o,i):void 0})(r,t,e)}function v(r){return g({...r,state:true,attribute:false})}var C=r=>r??p;var te=["de","en","es","fr","hi","pt","ru","tr","zh-Hans","zh-Hant"];function At(r){if(r.lang)return r.lang;if(typeof document>"u")return;let t=r.closest?.("[lang]")?.getAttribute("lang");return t||document.documentElement.lang||void 0}var xr={tw:"hant",hk:"hant",mo:"hant",cn:"hans",sg:"hans",my:"hans"};function kt(r,t){let e=r.toLowerCase();return t.find(n=>n.toLowerCase()===e)}function ee(r,t=te){let e=At(r);if(!e)return;let n=kt(e,t);if(n)return n;let o=e.toLowerCase().split("-"),i=o[0];if(i==="zh"){let s=o.find(a=>a==="hans"||a==="hant")??xr[o[1]??""];return s?kt(`zh-${s}`,t):void 0}return kt(i,t)}var oe="symbols";var br={Fraunces:["latin","latin-ext"],Jost:["latin","latin-ext","cyrillic"],Geist:["latin","latin-ext","cyrillic"]},_t='"Jost", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',re='"Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',ne='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',et={"fraunces-jost":{name:"Fraunces with Jost",sans:_t,display:'"Fraunces", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif'},jost:{name:"Jost",sans:_t,display:_t},geist:{name:"Geist",sans:re,display:re},system:{name:"System",sans:ne,display:ne}};function ie(r){let{sans:t,display:e}=et[r];return Object.keys(br).filter(n=>`${t} ${e}`.includes(`"${n}"`))}var se="1.6.0";var vr=/^(.*)\/cdn\/(?:roxy-ui|components\/[\w-]+)\.js$/,Sr=/^(.*\/dist)\/(?:index|components\/[\w-]+)\.js$/;function ae(r,t){if(!t)return;let e=new URL(t);if(e.protocol!=="https:"&&e.protocol!=="http:")return;let n=(vr.exec(e.pathname)??Sr.exec(e.pathname))?.[1];if(n!==void 0)return e.hostname==="cdn.jsdelivr.net"?`https://cdn.jsdelivr.net/npm/@roxyapi/ui@${r}/dist`:`${e.origin}${n}`}var Tr={},wr="color-mix(in oklab, var(--roxy-accent) 70%, black)",$r="var(--roxy-accent)",Er="color-mix(in srgb, var(--roxy-accent) 40%, transparent)",de=/^#(?:[\da-f]{3}|[\da-f]{6})$/i;function ce(r){return r!==void 0&&Object.hasOwn(et,r)}function le(r){let t=[];return r.brandColor&&de.test(r.brandColor)&&t.push(`--roxy-primary:${r.brandColor}`),r.brandAccent&&de.test(r.brandAccent)&&t.push(`--roxy-accent:${r.brandAccent}`,`--roxy-accent-ink:light-dark(${wr},${$r})`,`--roxy-ring:${Er}`),t.join(";")}function pe(r,t){if(ce(t))return t;let e=r.getRootNode();if(("host"in e?e.host:null)?.localName.startsWith("roxy-")||!globalThis.getComputedStyle)return;let o=r.shadowRoot?.firstElementChild,i=o?.localName==="style"?o:null;i?.sheet&&(i.sheet.disabled=true);let s,a,d;try{let c=globalThis.getComputedStyle(r),l=u=>c.getPropertyValue(u).trim();s=l("--roxy-font-sans"),a=l("--roxy-font-display"),d=l("--roxy-font")}finally{i?.sheet&&(i.sheet.disabled=false)}if(!(s||a))return ce(d)?d:void 0}function he(r){let{sans:t,display:e}=et[r];return`--roxy-font:${r};--roxy-font-sans:${t};--roxy-font-display:${e}`}var ue=ae(se,globalThis.document?.currentScript?.src||Tr.url);function me(r,t){if(typeof document>"u"||t===void 0)return;let e=`roxy-ui-font-${r}`;if(document.getElementById(e))return;let n=document.createElement("link");n.id=e,n.rel="stylesheet",n.href=`${t}/styles/fonts/${r}.css`,document.head.append(n)}function ye(r,t=ue){ie(r).length>0&&me(r,t)}function ge(r=ue){me(oe,r)}var fe='@layer roxy.tokens,roxy.theme;@layer roxy.tokens{:where(:root,:host){color-scheme:light;--roxy-bg: #ffffff;--roxy-fg: #0a0a0a;--roxy-accent: #4a6297;--roxy-success: #16a34a;--roxy-warning: #ea580c;--roxy-danger: #dc2626;--roxy-info: #0284c7;--roxy-accent-ink: color-mix(in oklab, var(--roxy-accent) 70%, black);--roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, black);--roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, black);--roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, black);--roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, black);--roxy-moon-shade: color-mix(in oklab, var(--roxy-fg) 78%, var(--roxy-bg));--roxy-font: initial;--roxy-font-sans: initial;--roxy-font-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, "Liberation Mono", monospace;--roxy-font-symbol: "Roxy Symbols", ui-sans-serif, system-ui, sans-serif;--roxy-text-base: 1rem;--roxy-text-scale: 1.15;--roxy-weight-normal: 400;--roxy-weight-bold: 600;--roxy-leading-tight: 1.25;--roxy-leading-normal: 1.5;--roxy-tracking-tight: -0.01em;--roxy-tracking-normal: 0em;--roxy-space-unit: 0.25rem;--roxy-radius: 6px;--roxy-motion-duration: 200ms;--roxy-motion-easing: cubic-bezier(0.4, 0, 0.2, 1)}:where(:root,:host,[data-theme],.light,.dark){--roxy-surface: var(--roxy-bg);--roxy-primary: var(--roxy-fg);--roxy-secondary: color-mix(in oklab, var(--roxy-fg) 78%, var(--roxy-bg));--roxy-muted: color-mix(in oklab, var(--roxy-fg) 60%, var(--roxy-bg));--roxy-border: color-mix(in oklab, var(--roxy-fg) 14%, var(--roxy-bg));--roxy-ring: color-mix(in srgb, var(--roxy-accent) 40%, transparent);--roxy-heat: var(--roxy-danger);--roxy-moon-lit: color-mix(in oklab, var(--roxy-accent) 6%, #f6eedf);--roxy-moon-mare: color-mix( in oklab, var(--roxy-moon-lit) 62%, var(--roxy-moon-shade) );--roxy-moon-rim: color-mix( in oklab, var(--roxy-moon-shade) 70%, var(--roxy-fg) );--roxy-moon-eclipse: color-mix( in oklab, color-mix(in oklab, var(--roxy-danger) 55%, var(--roxy-warning)) 72%, var(--roxy-moon-shade) );--roxy-moon-corona: color-mix( in oklab, var(--roxy-warning) 60%, var(--roxy-moon-lit) );--roxy-font-display: var(--roxy-font-sans);--roxy-text-sm: calc(var(--roxy-text-base) / var(--roxy-text-scale));--roxy-text-xs: calc(var(--roxy-text-sm) / var(--roxy-text-scale));--roxy-text-lg: calc(var(--roxy-text-base) * var(--roxy-text-scale));--roxy-text-xl: calc( var(--roxy-text-lg) * var(--roxy-text-scale) * var(--roxy-text-scale) );--roxy-space-xs: var(--roxy-space-unit);--roxy-space-sm: calc(var(--roxy-space-unit) * 2);--roxy-space-md: calc(var(--roxy-space-unit) * 4);--roxy-space-lg: calc(var(--roxy-space-unit) * 6);--roxy-space-xl: calc(var(--roxy-space-unit) * 10);--roxy-line-thick: calc(var(--roxy-space-unit) / 2);--roxy-touch: calc(var(--roxy-space-unit) * 11);--roxy-radius-sm: calc(var(--roxy-radius) / 2);--roxy-radius-md: var(--roxy-radius);--roxy-radius-lg: calc(var(--roxy-radius) * 5 / 3);--roxy-radius-full: 9999px;--roxy-shadow-sm: none;--roxy-shadow-md: 0 4px 12px color-mix(in srgb, black 10%, transparent);--roxy-shadow-lg: 0 12px 32px color-mix(in srgb, black 18%, transparent)}@media(prefers-color-scheme:dark){:where(:root,:host){color-scheme:dark;--roxy-bg: #0a0a0a;--roxy-fg: #fafafa;--roxy-accent: #92aade;--roxy-success: #22c55e;--roxy-warning: #fb923c;--roxy-danger: #ef4444;--roxy-info: #38bdf8;--roxy-accent-ink: var(--roxy-accent);--roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, white);--roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, white);--roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, white);--roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, white);--roxy-moon-shade: color-mix( in oklab, var(--roxy-fg) 10%, var(--roxy-bg) )}}:where(:root[data-theme=light],[data-theme=light],:root.light,.light,:host([data-theme="light"])){color-scheme:light;--roxy-bg: #ffffff;--roxy-fg: #0a0a0a;--roxy-accent: #4a6297;--roxy-success: #16a34a;--roxy-warning: #ea580c;--roxy-danger: #dc2626;--roxy-info: #0284c7;--roxy-accent-ink: color-mix(in oklab, var(--roxy-accent) 70%, black);--roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, black);--roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, black);--roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, black);--roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, black);--roxy-moon-shade: color-mix(in oklab, var(--roxy-fg) 78%, var(--roxy-bg))}:where(:root[data-theme=dark],[data-theme=dark],:root.dark,.dark,:host([data-theme="dark"])){color-scheme:dark;--roxy-bg: #0a0a0a;--roxy-fg: #fafafa;--roxy-accent: #92aade;--roxy-success: #22c55e;--roxy-warning: #fb923c;--roxy-danger: #ef4444;--roxy-info: #38bdf8;--roxy-accent-ink: var(--roxy-accent);--roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, white);--roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, white);--roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, white);--roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, white);--roxy-moon-shade: color-mix(in oklab, var(--roxy-fg) 10%, var(--roxy-bg))}@media(prefers-reduced-motion:reduce){:where(:root,:host){--roxy-motion-duration: 0ms}}}';var rt="roxy-ui-tokens";function nt(){if(typeof document>"u")return null;let r=document.getElementById(rt);if(r)return r;let t=document.createElement("style");return t.id=rt,t.textContent=fe,document.head.prepend(t),t}var xe="__ROXY_UI_I18N__";function be(){let r=globalThis,t=r[xe];if(t)return t;let e={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return r[xe]=e,e}function kr(r,t){return t?r.replace(/\{\{(\w+)\}\}/g,(e,n)=>n in t?String(t[n]??""):e):r}function ve(r,t,e){return kr(Ar(r,t)??t,e)}function Ar(r,t){if(!r)return;let{catalogs:e}=be(),n=r.toLowerCase();return(e[n]??e[n.split("-")[0]])?.[X(t)]}function Se(r){let{listeners:t}=be();return t.add(r),()=>{t.delete(r)}}var ot=class{constructor(t){this.host=t,t.addController(this)}hostConnected(){this.unsubscribe=Se(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var it=class extends k{constructor(){super();this.translator=(e,n)=>this.t(e,n);new ot(this)}connectedCallback(){super.connectedCallback(),nt()}updated(e){super.updated(e),this.renderRoot.querySelector(".roxy-glyph")&&ge()}fontDeclarations(e){let n=pe(this,e);return n?(ye(n),he(n)):""}renderFontStyle(){let e=this.fontDeclarations();return e?h`<style>:host{${e}}</style>`:p}t(e,n){return ve(this.effectiveLang(),e,n)}effectiveLang(){return At(this)}};var we=x`:where(.roxy-glyph){font-family:var(--roxy-font-symbol)}`;function st(r){return r?h`<span class="roxy-glyph" aria-hidden="true">${r}</span>`:p}var $e=x`:where([part~=card]){background:var(--roxy-surface);color:var(--roxy-fg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-lg);box-shadow:var(--roxy-shadow-sm)}:where([part~=card] [part~=card],[part~=card] [part~=reading],[part~=card] .roxy-card){border:0;border-block-start:1px solid var(--roxy-border);box-shadow:none;background:0 0;border-radius:0;padding-inline:0}:host([bare]) [part~=card]{box-shadow:none;background:0 0;border:0;border-radius:0;padding:0}:where(h1,h2){color:var(--roxy-fg);font-size:var(--roxy-text-lg);font-weight:var(--roxy-weight-bold);line-height:var(--roxy-leading-tight);letter-spacing:var(--roxy-tracking-tight);text-wrap:balance}:where(h3,h4,h5,h6){color:var(--roxy-fg);font-size:var(--roxy-text-base);font-weight:var(--roxy-weight-bold);line-height:var(--roxy-leading-tight);letter-spacing:var(--roxy-tracking-normal);text-transform:none}:where(.roxy-label,th,dt){color:var(--roxy-muted);font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-normal);letter-spacing:var(--roxy-tracking-normal);text-transform:none}:where(.roxy-chips){gap:var(--roxy-space-xs);flex-wrap:wrap;margin:0;padding:0;list-style:none;display:flex}:where(.roxy-chip,.roxy-chips>li){align-items:center;gap:var(--roxy-space-xs);padding:calc(var(--roxy-space-unit) / 2) var(--roxy-space-sm);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-sm);color:var(--roxy-secondary);font-size:var(--roxy-text-xs);line-height:var(--roxy-leading-tight);overflow-wrap:anywhere;background:0 0;max-inline-size:100%;display:inline-flex}:where(.roxy-chip[data-tone=success],.roxy-chips>li[data-tone=success]){color:var(--roxy-success-fg)}:where(.roxy-chip[data-tone=warning],.roxy-chips>li[data-tone=warning]){color:var(--roxy-warning-fg)}:where(.roxy-chip[data-tone=danger],.roxy-chips>li[data-tone=danger]){color:var(--roxy-danger-fg)}:where(.roxy-chip[data-tone=info],.roxy-chips>li[data-tone=info]){color:var(--roxy-info-fg)}:where(table){border-collapse:collapse;font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums}:where(th,td){padding:var(--roxy-space-xs) var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);text-align:start;vertical-align:top}:where(summary){cursor:pointer}:where(a,button,summary,input,select,textarea,[tabindex]):focus-visible{outline:var(--roxy-line-thick) solid var(--roxy-ring);outline-offset:var(--roxy-line-thick)}:where(summary:focus-visible){border-radius:var(--roxy-radius-sm)}:where(input,select,textarea,button){font:inherit}:where(input:not([type=checkbox],[type=radio],[type=range]),select,textarea){padding:var(--roxy-space-xs) var(--roxy-space-sm);background:var(--roxy-bg);color:var(--roxy-fg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md)}`;var _r=x`:host{--roxy-label-col:minmax(0, 25%);--_mask:var(--roxy-surface);font-family:var(--roxy-font-sans);color:var(--roxy-fg);font-size:var(--roxy-text-base);line-height:var(--roxy-leading-normal);animation:roxy-fade-in var(--roxy-motion-duration) var(--roxy-motion-easing) both;background:0 0;display:block;container-type:inline-size}:host([bare]){--_mask:var(--roxy-bg)}:host([hidden]){display:none}:host([bare]){--roxy-surface:transparent;--roxy-shadow-sm:none;--roxy-shadow-md:none}*,:before,:after{box-sizing:border-box}h1,h2,h3,h4{font-family:var(--roxy-font-display)}@keyframes roxy-fade-in{0%{transform:translateY(calc(var(--roxy-space-unit) / 2))}to{transform:translateY(0)}}@media (prefers-reduced-motion:reduce){:host{animation:none}}.roxy-skeleton{background:linear-gradient(90deg, var(--roxy-border) 0%, color-mix(in srgb, var(--roxy-border) 60%, transparent) 50%, var(--roxy-border) 100%);border-radius:var(--roxy-radius-md);background-size:200% 100%;animation:1.4s ease-in-out infinite roxy-shimmer}@keyframes roxy-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media (prefers-reduced-motion:reduce){.roxy-skeleton{animation:none}}.roxy-sr-only{clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:0;padding:0;position:absolute;overflow:hidden}.roxy-empty{padding:var(--roxy-space-lg);color:var(--roxy-muted);text-align:center;font-size:var(--roxy-text-sm)}.roxy-error{gap:var(--roxy-space-sm);padding:var(--roxy-space-lg);background:var(--roxy-surface);border:1px solid var(--roxy-danger);border-radius:var(--roxy-radius-md);color:var(--roxy-danger-fg);font-size:var(--roxy-text-sm);justify-items:start;display:grid}:host(:focus-within) .roxy-card{outline:var(--roxy-line-thick) solid var(--roxy-ring);outline-offset:var(--roxy-line-thick)}.roxy-attribution{margin-top:var(--roxy-space-sm);font-size:var(--roxy-text-xs);color:var(--roxy-muted);text-align:right}.roxy-attribution a{color:inherit;text-decoration:none}.roxy-attribution a:hover{color:var(--roxy-accent-ink);text-decoration:underline}.roxy-edit-bar{margin-bottom:var(--roxy-space-sm);justify-content:flex-end;display:flex}.roxy-edit{padding:var(--roxy-space-xs) var(--roxy-space-md);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);color:var(--roxy-fg);font-family:inherit;font-size:var(--roxy-text-sm);cursor:pointer;background:0 0}.roxy-edit:hover{border-color:var(--roxy-accent);color:var(--roxy-accent-ink)}.roxy-edit:disabled{cursor:progress;color:var(--roxy-muted)}roxy-endpoint-form+*{margin-top:var(--roxy-space-md)}.roxy-more{justify-items:center;gap:var(--roxy-space-sm);margin-top:var(--roxy-space-md);display:grid}.roxy-more .roxy-edit{min-height:var(--roxy-touch)}:host{font-variant-emoji:text}`,at=[_r,$e,we];var Pr="__cols",Rr="__rows";function Cr(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function dt(r){if(Array.isArray(r)){let i=false,s=r.map(a=>{let d=dt(a);return d!==a&&(i=true),d});return i?s:r}if(!Cr(r))return r;let t=r[Pr],e=r[Rr];if(Array.isArray(t)&&Array.isArray(e)&&Object.keys(r).length===2)return e.map(i=>{let s={};return t.forEach((a,d)=>{s[a]=dt(i[d])}),s});let n=false,o={};for(let[i,s]of Object.entries(r)){let a=dt(s);a!==s&&(n=true),o[i]=a}return n?o:r}function Ee(r){return dt(r)}function Te(r,t){return r.find(e=>e.attrs&&Object.entries(e.attrs).every(([n,o])=>t[n]===o))??r[0]}var Or="pk_live_YOUR_KEY",ke={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 Ae(r){if(r)return r===Or?ke.sample:r.startsWith("pk_")?void 0:ke.secret}function _e(r,t,e={}){e.warn&&console.warn(t.message),r.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:t.reason,message:t.message},bubbles:true,composed:true}))}var Pe="https://roxyapi.com/api/v2";async function Fr(r){try{let t=await r.json();if(t?.error){let e=t.code==="validation_error"&&Array.isArray(t.issues)?t.issues.filter(n=>typeof n.path=="string"&&typeof n.message=="string").map(n=>({path:n.path,message:n.message})):null;return{message:t.error,issues:e?.length?e:null,worded:true,...t.code?{code:t.code}:{}}}}catch{}return{message:`Request failed (${r.status})`,issues:null,worded:false}}var Re={fromAttribute:r=>{if(r!=null){try{let t=JSON.parse(r);if(t&&typeof t=="object"&&!Array.isArray(t))return t}catch{}console.warn("[roxy-ui] submit-context must be a JSON object; sending the request without it.")}}},M=class extends Error{constructor(e,n=null,o=true,i,s){super(e);this.issues=n;this.worded=o;this.status=i;this.code=s}};function Ce(r){return r.submitUrl?void 0:Ae(r.publishableKey)}async function Pt(r,t,e){let n=Ce(r);if(n)throw new M(n.message);let o=r.submitUrl?await fetch(r.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:Lr(t,r.submitContext),signal:e}):await Ur(r,t,e);if(!o.ok){let i=await Fr(o);throw new M(i.message,i.issues,i.worded,o.status,i.code)}return await o.json()}function Lr(r,t){return JSON.stringify(t?{...r,context:t}:r)}function Ur(r,t,e){let n=new URL(`${r.baseUrl??Pe}${t.path}`,document.baseURI);for(let[i,s]of Object.entries(t.query??{}))s!=null&&n.searchParams.set(i,String(s));let o={Accept:"application/json"};return r.publishableKey&&(o["X-API-Key"]=r.publishableKey),t.body!=null&&(o["Content-Type"]="application/json"),fetch(n,{method:t.method??"GET",headers:o,body:t.body!=null?JSON.stringify(t.body):void 0,signal:e})}var ct=class{constructor(t){this.baseUrl=Pe;this.worded=true;this.failure={};this.host=t,t.addController(this)}hostDisconnected(){this.abort?.abort(),this.abort=void 0}async run(t){this.worded=true,this.failure={};let e=Ce(this);if(e){this.host.error=e.message,_e(this.host,e);return}this.abort?.abort();let n=new AbortController;this.abort=n,this.host.loading=true,this.host.error=null,this.host.issues=null;try{let o=await Pt(this,t,n.signal);if(n.signal.aborted)return;this.host.data=o}catch(o){if(n.signal.aborted||o?.name==="AbortError")return;o instanceof M&&(this.host.issues=o.issues,this.failure={status:o.status,code:o.code}),this.worded=o instanceof M&&o.worded,this.host.error=o instanceof Error?o.message:String(o)}finally{this.abort===n&&(this.abort=void 0),n.signal.aborted||(this.host.loading=false)}}};function Oe(r,t,e,n=[]){let o={...e},i=`/${r.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(c,l)=>{let u=o[l];return delete o[l],encodeURIComponent(String(u??""))}),s=new Set(n),a={},d={};for(let[c,l]of Object.entries(o))l===void 0||l===""||(t==="GET"||s.has(c)?a[c]=l:d[c]=l);return{path:i,method:t,query:a,body:t==="POST"?d:void 0}}function Fe(){return h`<svg class="roxy-chevron" viewBox="0 0 16 16" width="14" height="14" aria-hidden="true"><path d="M4 6l4 4 4-4" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>`}var zo=x`summary{list-style:none}summary::-webkit-details-marker{display:none}.roxy-chevron{aspect-ratio:auto;width:.7lh;height:.7lh;color:var(--roxy-muted);transition:transform var(--roxy-motion-duration) var(--roxy-motion-easing);flex-shrink:0}details[open]>summary .roxy-chevron{transform:rotate(180deg)}@media (prefers-reduced-motion:reduce){.roxy-chevron{transition:none}}`;var jo=x`.block{border-top:1px solid var(--roxy-border);padding-top:var(--roxy-space-md)}.block h3{margin:0 0 var(--roxy-space-sm)}.interp-card{padding-block:var(--roxy-space-sm)}.interp-card summary{font-weight:var(--roxy-weight-bold);color:var(--roxy-fg);align-items:center;gap:var(--roxy-space-sm);font-size:var(--roxy-text-sm);display:flex}.interp-lead{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;flex:auto;order:1;min-width:0;display:inline-flex}.interp-aside{align-items:center;gap:var(--roxy-space-sm);flex-shrink:0;order:2;display:inline-flex}.roxy-chevron{order:3}.interp-aside small{color:var(--roxy-muted);font-weight:var(--roxy-weight-normal);white-space:nowrap}@container (width<=26rem){.interp-card summary{flex-wrap:wrap}.roxy-chevron{order:2}.interp-aside{flex-basis:100%;order:3;justify-content:flex-end}}.interp-body{margin-top:var(--roxy-space-sm);gap:var(--roxy-space-sm);color:var(--roxy-fg);font-size:var(--roxy-text-sm);line-height:var(--roxy-leading-normal);overflow-wrap:anywhere;display:grid}.interp-body p{margin:0}`;function Le(r,t,e){let n=r.filter(o=>!!o.body);return n.length===0?p:h`<section class="block" part="section readings"><h3>${e}</h3>${n.map((o,i)=>h`<details class="interp-card" part="reading" name="${t}" ?open="${i===0}"><summary><span class="interp-lead">${st(o.glyph)} ${o.label}</span> ${Fe()} ${o.aside?h`<span class="interp-aside"><small>${o.aside}</small></span>`:p}</summary><div class="interp-body"><p>${o.body}</p>${o.extra??p}</div></details>`)}</section>`}var Mr="roxy-data";function Nr(r){return r.nodeName==="SCRIPT"&&r.getAttribute("type")==="application/json"}var lt=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(Nr(t)&&t.classList.contains(Mr))return t;return null}parse(t){if(t?.trim())try{return JSON.parse(t)}catch{return}}};var m=class extends it{constructor(){super();this.data=null;this.endpoint="";this.remember=false;this.hideReadings=false;this.hideSections="";this.loading=false;this.error=null;this.issues=null;this.selfFetched=false;this.editing=false;this.sticky=false;this.hostLoaded=false;this.moreLoading=false;this.moreError=null;this.onMore=async()=>{let e=this.lastRequest,n=this.listKey,o=this.listRows();if(!(!e||!n||!o)){this.moreLoading=true,this.moreError=null;try{let i=await Pt(this.fetcher,{...e,query:{...e.query,offset:o.length}});if(this.lastRequest!==e)return;let s=i[n];this.data={...this.data,...i,[n]:[...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 n=this.selfFetch();if(!n)return;let o=e.detail;this.lastValues=o.values,this.sticky=!!o.sticky,this.selfFetched=true,this.editing=false,this.remember&&this.writeRemembered(o.values),this.fetchFresh(Oe(n.endpoint,n.method,{...o.values,...this.ownRequest()},o.queryKeys??[]))};new lt(this),this.fetcher=new ct(this)}static{this.styles=[at]}static{this.endpoints=[]}willUpdate(e){if(e.has("data")&&this.data!=null){let n=Ee(this.data);n!==this.data&&(this.data=n)}(e.has("publishableKey")||e.has("baseUrl")||e.has("submitUrl")||e.has("submitContext"))&&this.syncFetcher()}syncFetcher(){this.fetcher.publishableKey=this.publishableKey,this.baseUrl&&(this.fetcher.baseUrl=this.baseUrl),this.fetcher.submitUrl=this.submitUrl,this.fetcher.submitContext=this.submitContext}selfFetch(){let e=this.endpoint?{endpoint:this.endpoint,method:"POST"}:this.hostLoaded||!(this.publishableKey||this.submitUrl)?void 0:Te(this.constructor.endpoints,this);return e&&{endpoint:e.endpoint,method:this.method??e.method}}render(){return h`${this.hostStyle()}${this.renderState()}`}drawn(e){try{return this.renderData(e)}catch(n){return console.warn(`[roxy-ui] ${this.localName} could not draw its response`,n),this.dispatchEvent(new CustomEvent("roxy-render-error",{detail:{error:n},bubbles:true,composed:true})),customElements.get("roxy-data")?h`<roxy-data .data="${e}" lang="${C(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)),n=[le(this),this.fontDeclarations(this.font)].filter(Boolean).join(";");if(e.length===0&&!n)return p;let o=(n?`:host{${n}}`:"")+e.map(i=>`[part~="${i}"],roxy-endpoint-form::part(${i}){display:none!important}`).join("");return h`<style>${o}</style>`}ownRequest(){return{}}get failure(){return this.fetcher.failure}renderState(){return this.selfFetch()&&this.sticky&&this.selfFetched&&!this.editing?this.renderWithForm(this.stickyBody()):this.loading?this.renderLoading():this.error!=null?this.renderError(this.error):this.data!=null?this.selfFetched?this.editing?this.renderForm():this.renderResult(this.data):this.showAttribution()?h`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data):this.renderNoData()}renderInterpretation(e,n,o){return this.hideReadings?p:Le(e,n,this.t(o??"Reading"))}renderResult(e){let n=h`<div class="roxy-edit-bar" part="edit-bar"><button type="button" class="roxy-edit" @click="${this.onEdit}">${this.t("Edit query")}</button></div>${this.drawn(e)}`;return this.showAttribution()?h`${n}${this.renderAttribution()}`:n}renderWithForm(e){return h`${this.renderForm()}${e}`}stickyBody(){return this.loading?this.renderLoading():this.error!=null?this.issues?p:this.renderErrorBanner(this.error):this.data==null?p:this.showAttribution()?h`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data)}renderMore(){let e=this.listRows(),n=this.data?.total;return!this.lastRequest||!e||typeof n!="number"?p:e.length>=n?p:h`<div class="roxy-more" part="more"><button type="button" class="roxy-edit" ?disabled="${this.moreLoading}" aria-busy="${this.moreLoading?"true":"false"}" @click="${this.onMore}">${this.t("Show more")}</button> ${this.moreError?h`<p class="roxy-error" role="alert">${this.t(this.moreError)}</p>`:p}</div>`}listRows(){let e=this.listKey?this.data?.[this.listKey]:void 0;return Array.isArray(e)?e:void 0}fetchFresh(e){return this.lastRequest=e,this.openedRow=void 0,this.openedRowId=void 0,this.moreError=null,this.fetcher.run(e)}load(e){return this.hostLoaded=true,this.syncFetcher(),this.fetchFresh(e)}pickRow(e){this.dispatchEvent(new CustomEvent("roxy-symbol-select",{detail:e,bubbles:true,composed:true})),this.openRow(e.id)}openRow(e){if(!this.rowDetail||!(this.publishableKey||this.submitUrl))return;let n=this.openedRow??document.createElement(this.rowDetail.tag);n.publishableKey=this.publishableKey,n.baseUrl=this.baseUrl,n.submitUrl=this.submitUrl,n.submitContext=this.submitContext,n.hideReadings=this.hideReadings,n.hideSections=this.hideSections;let o=this.effectiveLang();o&&n.setAttribute("lang",o),this.openedRow=n,this.openedRowId=e,n.load({path:`/${this.rowDetail.path.replace("{id}",encodeURIComponent(e))}`,method:"GET",query:{lang:ee(this)}}).then(()=>n.scrollIntoView?.({block:"nearest"}))}showAttribution(){return this.attribution!=null&&this.attribution!=="off"&&this.attribution!=="false"}renderAttribution(){return h`<div class="roxy-attribution" part="attribution"><a href="https://roxyapi.com/?utm_source=widget&utm_medium=embed" target="_blank" rel="noopener">${this.t("Spiritual data by RoxyAPI")}</a></div>`}renderNoData(){return this.selfFetch()?this.renderWithForm(p):this.renderEmpty()}renderForm(){let e=this.selfFetch();return h`<roxy-endpoint-form part="form" exportparts="hint" data-endpoint="${e?.endpoint??""}" method="${e?.method??"POST"}" spec-url="${C(this.specUrl)}" publishable-key="${C(this.publishableKey)}" location-url="${C(this.locationUrl)}" submit-label="${C(this.submitLabel)}" lang="${C(this.effectiveLang())}" .initialValues="${this.formInitialValues()}" .serverIssues="${this.issues}" .apiRoute="${this.fetcher}" .autoload="${!this.selfFetched}" .fullPages="${!!this.listKey}" @roxy-submit="${this.onFormSubmit}"></roxy-endpoint-form>`}formInitialValues(){return this.lastValues??(this.remember?this.readRemembered():void 0)}rememberKey(){return`roxy-ui:form:${this.selfFetch()?.endpoint??""}`}readRemembered(){try{let e=sessionStorage.getItem(this.rememberKey());return e?JSON.parse(e):void 0}catch{return}}writeRemembered(e){try{sessionStorage.setItem(this.rememberKey(),JSON.stringify(e))}catch{}}renderEmpty(){return h`<div class="roxy-empty" role="status" part="empty">${this.t("No data")}</div>`}renderLoading(){return h`<div class="roxy-skeleton" style="height:5lh" role="status" aria-label="${this.t("Loading")}" part="loading"></div>`}renderError(e){let n=!!this.selfFetch();if(n&&this.issues)return this.renderForm();let o=this.renderErrorBanner(e);return n?h`${o}${this.renderForm()}`:o}renderErrorBanner(e){return h`<div class="roxy-error" role="alert" part="error">${!this.fetcher.worded&&this.errorMessage||this.t(e)}</div>`}};y([g({attribute:false})],m.prototype,"data",2),y([g({type:String,attribute:"data-endpoint"})],m.prototype,"endpoint",2),y([g({type:String})],m.prototype,"method",2),y([g({type:String,attribute:"publishable-key"})],m.prototype,"publishableKey",2),y([g({type:String,attribute:"base-url"})],m.prototype,"baseUrl",2),y([g({type:String,attribute:"spec-url"})],m.prototype,"specUrl",2),y([g({type:String,attribute:"submit-url"})],m.prototype,"submitUrl",2),y([g({attribute:"submit-context",converter:Re})],m.prototype,"submitContext",2),y([g({type:String,attribute:"location-url"})],m.prototype,"locationUrl",2),y([g({type:Boolean})],m.prototype,"remember",2),y([g({type:Boolean,attribute:"hide-readings",reflect:true})],m.prototype,"hideReadings",2),y([g({type:String,attribute:"hide-sections",reflect:true})],m.prototype,"hideSections",2),y([g({type:String,attribute:"brand-color"})],m.prototype,"brandColor",2),y([g({type:String,attribute:"brand-accent"})],m.prototype,"brandAccent",2),y([g({type:String})],m.prototype,"font",2),y([g({type:String})],m.prototype,"hemisphere",2),y([g({type:String,attribute:"submit-label"})],m.prototype,"submitLabel",2),y([g({type:String,attribute:"error-message"})],m.prototype,"errorMessage",2),y([g({type:String})],m.prototype,"attribution",2),y([v()],m.prototype,"loading",2),y([v()],m.prototype,"error",2),y([v()],m.prototype,"issues",2),y([v()],m.prototype,"selfFetched",2),y([v()],m.prototype,"editing",2),y([v()],m.prototype,"sticky",2),y([v()],m.prototype,"openedRow",2),y([v()],m.prototype,"openedRowId",2),y([v()],m.prototype,"moreLoading",2),y([v()],m.prototype,"moreError",2);var pt=class{constructor(t){this.host=t;this.state="closed";this.zoom=1;this.pressedBy="";this.press=t2=>{this.pressedBy=t2.pointerType};this.openOnMouse=t2=>{let e=this.pressedBy==="mouse";this.pressedBy="",e&&(t2.target?.closest?.("a, button, summary, input, select, textarea")||getSelection()?.toString()||this.open())};t.addController(this)}hostUpdated(){let t=this.host.renderRoot.querySelector(".roxy-chart-dialog");if(!t)this.reset();else if(t.isConnected&&this.state!=="closed"){this.state==="opening"&&(this.state="open",t.open||t.showModal());let e=t.querySelector(".roxy-chart-scroll");t.open&&e&&this.position&&(e.scrollLeft=e.scrollWidth*this.position.x-e.clientWidth/2,e.scrollTop=e.scrollHeight*this.position.y-e.clientHeight/2,this.position=void 0)}}hostDisconnected(){this.reset(),this.host.renderRoot.querySelector(".roxy-chart-dialog")?.close()}open(){this.state="opening",this.position={x:.5,y:0},this.host.requestUpdate()}reset(){this.state="closed",this.zoom=1,this.position=void 0}resize(t){let e=this.host.renderRoot.querySelector(".roxy-chart-scroll");this.position=t===0?{x:.5,y:0}:e?{x:(e.scrollLeft+e.clientWidth/2)/e.scrollWidth,y:(e.scrollTop+e.clientHeight/2)/e.scrollHeight}:void 0,this.zoom=t===0?1:Math.min(3,Math.max(1,this.zoom+t)),this.host.requestUpdate()}renderChartViewport(t,e,n){return h`<div class="roxy-chart-view"><div class="roxy-chart-hit" @pointerdown="${this.press}" @click="${this.openOnMouse}">${t}</div><div class="roxy-chart-tools" part="chart-controls"><button type="button" @click="${()=>this.open()}">${n("Enlarge chart")}</button></div><dialog class="roxy-chart-dialog" part="chart-dialog" aria-label="${e}" @close="${()=>{this.reset(),this.host.requestUpdate()}}">${this.state!=="closed"?h`<div class="roxy-chart-bar"><strong>${e}</strong><div class="roxy-chart-tools"><button type="button" aria-label="${n("Zoom out")}" ?disabled="${this.zoom===1}" @click="${()=>this.resize(-.5)}">−</button> <button type="button" @click="${()=>this.resize(0)}">${n("Reset zoom")}</button> <button type="button" aria-label="${n("Zoom in")}" ?disabled="${this.zoom===3}" @click="${()=>this.resize(.5)}">+</button> <button type="button" @click="${()=>this.host.renderRoot.querySelector(".roxy-chart-dialog")?.close()}">${n("Close")}</button></div></div><div class="roxy-chart-scroll" role="region" tabindex="0" aria-label="${e}"><div class="roxy-chart-expanded" style="${`--chart-zoom:${this.zoom}`}">${t}</div></div>`:p}</dialog></div>`}},Ue=x`.roxy-chart-view{min-width:0}@media (hover:hover) and (pointer:fine){.roxy-chart-hit{cursor:zoom-in}}.roxy-chart-tools{gap:var(--roxy-space-sm);flex-wrap:wrap;justify-content:flex-end;align-items:center;display:flex}.roxy-chart-tools button{font-size:var(--roxy-text-sm);color:var(--roxy-secondary);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);min-width:2lh;min-height:2lh;padding:var(--roxy-space-xs) var(--roxy-space-sm);cursor:pointer;background:0 0}.roxy-chart-tools button:hover:not(:disabled){border-color:var(--roxy-accent);color:var(--roxy-accent-ink)}.roxy-chart-tools button:disabled{color:var(--roxy-muted);cursor:default}.roxy-chart-dialog{--roxy-surface:var(--roxy-bg);width:calc(100% - 2 * var(--roxy-space-md));max-width:calc(var(--roxy-chart-expanded-width,60rem) * 1.2);max-height:calc(100% - 2 * var(--roxy-space-md));padding:var(--roxy-space-md);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-lg);color:var(--roxy-fg);background:var(--roxy-bg);box-shadow:var(--roxy-shadow-lg);margin:auto}.roxy-chart-dialog[open]{flex-direction:column;display:flex;overflow:hidden}.roxy-chart-dialog::backdrop{background:color-mix(in oklab, var(--roxy-bg) 85%, transparent)}.roxy-chart-bar{justify-content:space-between;align-items:center;gap:var(--roxy-space-md);margin-bottom:var(--roxy-space-md);flex-wrap:wrap;flex-shrink:0;display:flex}.roxy-chart-bar>strong{overflow-wrap:anywhere;min-width:0}.roxy-chart-scroll{overscroll-behavior:contain;flex:auto;min-height:0;overflow:auto}.roxy-chart-expanded{width:max(100%, calc(var(--roxy-chart-expanded-width,60rem) * var(--chart-zoom)));padding:var(--roxy-space-sm)}.roxy-chart-expanded>svg{width:100%;max-width:none;height:auto;margin:0}`;var Me=r=>t=>{customElements.get(r)||customElements.define(r,t)};function Ne(r){let t=r%360;return t<0?t+360:t}function ze(r,t,e){let n=r.filter(c=>Number.isFinite(t(c))).map(c=>{let l=Ne(t(c));return{item:c,longitude:l,displayLongitude:l}}).sort((c,l)=>c.longitude-l.longitude),o=n.length;if(o<2)return n;let i=0,s=-1;for(let c=0;c<o;c++){let l=n[(c+o-1)%o],f=(n[c].longitude-l.longitude+360)%360;f>s&&(s=f,i=c)}let a=n[i],d=a.longitude;for(let c=1;c<o;c++){let l=n[(i+c)%o],u=typeof e=="function"?e(a.item,l.item):e,f=l.longitude+(i+c>=o?360:0);d=Math.max(f,d+u),l.displayLongitude=Ne(d),a=l}return n}function Ie(r,t){return t>0?r/t*(180/Math.PI):0}var Rt=/^\d{4}-\d{2}-\d{2}$/,zr=/^\d{4}-\d{2}$/,Ge=/^\d{2}:\d{2}(:\d{2})?$/,Ir=/^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2}(\.\d+)?)?$/,De=new Map;function Ct(r){if(!r)return["en"];let t=De.get(r);if(t)return[t,"en"];let e="en";try{e=Intl.getCanonicalLocales(r)[0]??"en"}catch{e="en"}return De.set(r,e),[e,"en"]}var He=new Map;function Dr(r){let t=r??"",e=He.get(t);if(e)return e;let o={hour:new Intl.DateTimeFormat(Ct(r),{timeStyle:"short",timeZone:"UTC"}).formatToParts(new Date(Date.UTC(2e3,0,1,1))).find(i=>i.type==="hour")?.value?.length===2?"2-digit":"numeric",minute:"2-digit"};return He.set(t,o),o}function je(r){let t=Ge.test(r)?`1970-01-01T${r}`:Rt.test(r)?`${r}T00:00:00`:zr.test(r)?`${r}-01T00:00:00`:Ir.test(r)?r.replace(" ","T"):null;return t?{d:new Date(`${t}Z`),timeZone:"UTC"}:{d:new Date(r)}}function Hr(r,t){if(typeof t!="string"||t.length===0)return"";let{d:e,timeZone:n}=je(t);return Number.isNaN(e.getTime())?t:e.toLocaleDateString(Ct(r),{month:"short",day:"numeric",year:"numeric",timeZone:n})}function Ke(r,t,e,n=false){let o=typeof t=="string"&&Rt.test(t)&&typeof e=="string"&&Ge.test(e)?`${t}T${e}`:t;if(typeof o!="string"||o.length===0)return"";if(Rt.test(o))return Hr(r,o);let{d:i,timeZone:s}=je(o);return Number.isNaN(i.getTime())?o:i.toLocaleString(Ct(r),{month:"short",day:"numeric",year:"numeric",...Dr(r),...n?{second:"2-digit"}:{},timeZone:s})}var Gr="Localized";function ht(r,t,e){let n=r,o=n?.[`${t}${Gr}`];if(typeof o=="string"&&o!=="")return o;if(e!==void 0)return e;let i=n?.[t];return typeof i=="string"?i:""}var jr={Sun:"var(--roxy-accent)",Moon:"var(--roxy-secondary)",Mercury:"var(--roxy-info)",Venus:"var(--roxy-success)",Mars:"var(--roxy-danger)",Jupiter:"var(--roxy-warning)",Saturn:"var(--roxy-muted)",Uranus:"var(--roxy-info-fg)",Neptune:"var(--roxy-success-fg)",Pluto:"var(--roxy-danger-fg)"},Be=["var(--roxy-accent)","var(--roxy-info)","var(--roxy-success)","var(--roxy-danger)","var(--roxy-warning)","var(--roxy-secondary)","var(--roxy-info-fg)","var(--roxy-success-fg)","var(--roxy-danger-fg)","var(--roxy-accent-ink)","var(--roxy-warning-fg)","var(--roxy-primary)"];function Ot(r,t=0){return jr[Qt(r)]??Be[t%Be.length]??"var(--roxy-accent)"}var Ft=320,b=Ft/2,$=128,Kr=118,qe=137,Br=152,qr=.95,Ye={glyph:11},Yr=Ye.glyph;function E(r,t){let e=r*Math.PI/180;return{x:b+t*Math.sin(e),y:b-t*Math.cos(e)}}var Vr=[{az:0,source:"N"},{az:45,source:"NE"},{az:90,source:"E"},{az:135,source:"SE"},{az:180,source:"S"},{az:225,source:"SW"},{az:270,source:"W"},{az:315,source:"NW"}],O=class extends m{constructor(){super(...arguments);this.chartViewport=new pt(this)}renderData(e){let n=e.bodies??[],o=e.birthDetails;return h`<div class="wrap" part="card"><header part="header"><h2>${this.t("Local space")}</h2>${o?h`<p class="roxy-label">${Ke(this.effectiveLang(),o.date,o.time)}</p>`:p}</header>${this.chartViewport.renderChartViewport(this.renderDial(n),this.t("Local space"),this.translator)} ${e.summary&&!this.hideReadings?h`<p class="summary">${e.summary}</p>`:p} ${this.renderList(n)}</div>`}renderDial(e){return h`<svg viewBox="0 0 ${Ft} ${Ft}" part="chart" role="img" aria-label="${this.t("Local space compass of planetary directions from the birthplace")}"><title>${this.t("Local space compass")}</title><desc>${this.t("A compass centered on the birthplace. Each body is a line pointing to its azimuth, clockwise from north. Bodies below the horizon are dimmed.")}</desc><circle class="dial-fill" cx="${b}" cy="${b}" r="${$}"/><circle class="dial" cx="${b}" cy="${b}" r="${$*.66}" stroke-width="0.5"/><circle class="dial" cx="${b}" cy="${b}" r="${$*.33}" stroke-width="0.5"/>${this.renderCompassRing()} ${this.renderSpokes(e)}<circle class="center-dot" cx="${b}" cy="${b}" r="2.5"/></svg>`}renderCompassRing(){let e=[];for(let d=0;d<360;d+=22.5){let c=E(d,$),l=E(d,$-(d%45===0?8:4));e.push(B`<line class="tick" x1=${l.x} y1=${l.y} x2=${c.x} y2=${c.y} />`)}let n=E(0,$),o=E(180,$),i=E(90,$),s=E(270,$),a=Vr.map(({az:d,source:c})=>{let l=E(d,Br),u=d%90===0;return B`<text class=${`compass-label${u?" cardinal":""}`} x=${l.x} y=${l.y} text-anchor="middle" dominant-baseline="central">${this.t(c)}</text>`});return B`
4
4
  <line class="cardinal-axis" x1=${n.x} y1=${n.y} x2=${o.x} y2=${o.y} />
5
5
  <line class="cardinal-axis" x1=${i.x} y1=${i.y} x2=${s.x} y2=${s.y} />
6
6
  ${e}${a}`}renderSpokes(e){let n=e.map((i,s)=>({b:i,i:s})),o=Ie(qr*Yr,qe);return ze(n,({b:i})=>i.azimuth,o).map(({item:i,displayLongitude:s})=>{let{b:a,i:d}=i,c=Ot(a.planet,d),l=a.aboveHorizon===false,u=E(a.azimuth,Kr),f=E(s,qe),S=Tt(a.planet)??ht(a,"planet"),F=`${a.altitude>0?"+":""}${Math.round(a.altitude)}\xB0`;return B`<g>
@@ -1,6 +1,6 @@
1
1
  var RoxyUI_location_search=(()=>{var K=Object.defineProperty;var ye=Object.getOwnPropertyDescriptor;var ct=Object.getOwnPropertyNames;var dt=Object.prototype.hasOwnProperty;var ut=(o,e)=>{for(var t in e)K(o,t,{get:e[t],enumerable:true})},ht=(o,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of ct(e))!dt.call(o,s)&&s!==t&&K(o,s,{get:()=>e[s],enumerable:!(r=ye(e,s))||r.enumerable});return o};var pt=o=>ht(K({},"__esModule",{value:true}),o),y=(o,e,t,r)=>{for(var s=r>1?void 0:r?ye(e,t):e,n=o.length-1,i;n>=0;n--)(i=o[n])&&(s=(r?i(e,t,s):i(s))||s);return r&&s&&K(e,t,s),s};var jt={};ut(jt,{ROXY_UI_TOKENS_STYLE_ID:()=>G,RoxyLocationSearch:()=>p,injectRoxyTokens:()=>V});var j=globalThis,D=j.ShadowRoot&&(j.ShadyCSS===void 0||j.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Q=Symbol(),fe=new WeakMap,U=class{constructor(e,t,r){if(this._$cssResult$=true,r!==Q)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(D&&e===void 0){let r=t!==void 0&&t.length===1;r&&(e=fe.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&fe.set(t,e))}return e}toString(){return this.cssText}},me=o=>new U(typeof o=="string"?o:o+"",void 0,Q),m=(o,...e)=>{let t=o.length===1?o[0]:e.reduce((r,s,n)=>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.")})(s)+o[n+1],o[0]);return new U(t,o,Q)},ge=(o,e)=>{if(D)o.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of e){let r=document.createElement("style"),s=j.litNonce;s!==void 0&&r.setAttribute("nonce",s),r.textContent=t.cssText,o.appendChild(r)}},ee=D?o=>o:o=>o instanceof CSSStyleSheet?(e=>{let t="";for(let r of e.cssRules)t+=r.cssText;return me(t)})(o):o;var{is:yt,defineProperty:ft,getOwnPropertyDescriptor:mt,getOwnPropertyNames:gt,getOwnPropertySymbols:xt,getPrototypeOf:bt}=Object,I=globalThis,xe=I.trustedTypes,vt=xe?xe.emptyScript:"",$t=I.reactiveElementPolyfillSupport,T=(o,e)=>o,F={toAttribute(o,e){switch(e){case Boolean:o=o?vt:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,e){let t=o;switch(e){case Boolean:t=o!==null;break;case Number:t=o===null?null:Number(o);break;case Object:case Array:try{t=JSON.parse(o)}catch{t=null}}return t}},z=(o,e)=>!yt(o,e),be={attribute:true,type:String,converter:F,reflect:false,useDefault:false,hasChanged:z};Symbol.metadata??=Symbol("metadata"),I.litPropertyMetadata??=new WeakMap;var b=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=be){if(t.state&&(t.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=true),this.elementProperties.set(e,t),!t.noAccessor){let r=Symbol(),s=this.getPropertyDescriptor(e,r,t);s!==void 0&&ft(this.prototype,e,s)}}static getPropertyDescriptor(e,t,r){let{get:s,set:n}=mt(this.prototype,e)??{get(){return this[t]},set(i){this[t]=i}};return{get:s,set(i){let l=s?.call(this);n?.call(this,i),this.requestUpdate(e,l,r)},configurable:true,enumerable:true}}static getPropertyOptions(e){return this.elementProperties.get(e)??be}static _$Ei(){if(this.hasOwnProperty(T("elementProperties")))return;let e=bt(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(T("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(T("properties"))){let t=this.properties,r=[...gt(t),...xt(t)];for(let s of r)this.createProperty(s,t[s])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[r,s]of t)this.elementProperties.set(r,s)}this._$Eh=new Map;for(let[t,r]of this.elementProperties){let s=this._$Eu(t,r);s!==void 0&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let r=new Set(e.flat(1/0).reverse());for(let s of r)t.unshift(ee(s))}else e!==void 0&&t.push(ee(e));return t}static _$Eu(e,t){let r=t.attribute;return r===false?void 0:typeof r=="string"?r:typeof e=="string"?e.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(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return ge(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$ET(e,t){let r=this.constructor.elementProperties.get(e),s=this.constructor._$Eu(e,r);if(s!==void 0&&r.reflect===true){let n=(r.converter?.toAttribute!==void 0?r.converter:F).toAttribute(t,r.type);this._$Em=e,n==null?this.removeAttribute(s):this.setAttribute(s,n),this._$Em=null}}_$AK(e,t){let r=this.constructor,s=r._$Eh.get(e);if(s!==void 0&&this._$Em!==s){let n=r.getPropertyOptions(s),i=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:F;this._$Em=s;let l=i.fromAttribute(t,n.type);this[s]=l??this._$Ej?.get(s)??l,this._$Em=null}}requestUpdate(e,t,r,s=false,n){if(e!==void 0){let i=this.constructor;if(s===false&&(n=this[e]),r??=i.getPropertyOptions(e),!((r.hasChanged??z)(n,t)||r.useDefault&&r.reflect&&n===this._$Ej?.get(e)&&!this.hasAttribute(i._$Eu(e,r))))return;this.C(e,t,r)}this.isUpdatePending===false&&(this._$ES=this._$EP())}C(e,t,{useDefault:r,reflect:s,wrapped:n},i){r&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,i??t??this[e]),n!==true||i!==void 0)||(this._$AL.has(e)||(this.hasUpdated||r||(t=void 0),this._$AL.set(e,t)),s===true&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=true;try{await this._$ES}catch(t){Promise.reject(t)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[s,n]of this._$Ep)this[s]=n;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[s,n]of r){let{wrapped:i}=n,l=this[s];i!==true||this._$AL.has(s)||l===void 0||this.C(s,void 0,n,l)}}let e=false,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(t)):this._$EM()}catch(r){throw e=false,this._$EM(),r}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=false}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return true}update(e){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(e){}firstUpdated(e){}};b.elementStyles=[],b.shadowRootOptions={mode:"open"},b[T("elementProperties")]=new Map,b[T("finalized")]=new Map,$t?.({ReactiveElement:b}),(I.reactiveElementVersions??=[]).push("2.1.2");var ae=globalThis,ve=o=>o,B=ae.trustedTypes,$e=B?B.createPolicy("lit-html",{createHTML:o=>o}):void 0,Ee="$lit$",$=`lit$${Math.random().toFixed(9).slice(2)}$`,Ce="?"+$,wt=`<${Ce}>`,k=document,P=()=>k.createComment(""),L=o=>o===null||typeof o!="object"&&typeof o!="function",le=Array.isArray,_t=o=>le(o)||typeof o?.[Symbol.iterator]=="function",te=`[
2
2
  \f\r]`,O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,we=/-->/g,_e=/>/g,A=RegExp(`>|${te}(?:([^\\s"'>=/]+)(${te}*=${te}*(?:[^
3
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Ae=/'/g,Se=/"/g,Re=/^(?:script|style|textarea|title)$/i,ce=o=>(e,...t)=>({_$litType$:o,strings:e,values:t}),f=ce(1),Yt=ce(2),Gt=ce(3),E=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),ke=new WeakMap,S=k.createTreeWalker(k,129);function Ue(o,e){if(!le(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return $e!==void 0?$e.createHTML(e):e}var At=(o,e)=>{let t=o.length-1,r=[],s,n=e===2?"<svg>":e===3?"<math>":"",i=O;for(let l=0;l<t;l++){let a=o[l],u,h,c=-1,x=0;for(;x<a.length&&(i.lastIndex=x,h=i.exec(a),h!==null);)x=i.lastIndex,i===O?h[1]==="!--"?i=we:h[1]!==void 0?i=_e:h[2]!==void 0?(Re.test(h[2])&&(s=RegExp("</"+h[2],"g")),i=A):h[3]!==void 0&&(i=A):i===A?h[0]===">"?(i=s??O,c=-1):h[1]===void 0?c=-2:(c=i.lastIndex-h[2].length,u=h[1],i=h[3]===void 0?A:h[3]==='"'?Se:Ae):i===Se||i===Ae?i=A:i===we||i===_e?i=O:(i=A,s=void 0);let v=i===A&&o[l+1].startsWith("/>")?" ":"";n+=i===O?a+wt:c>=0?(r.push(u),a.slice(0,c)+Ee+a.slice(c)+$+v):a+$+(c===-2?l:v)}return[Ue(o,n+(o[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]},H=class o{constructor({strings:e,_$litType$:t},r){let s;this.parts=[];let n=0,i=0,l=e.length-1,a=this.parts,[u,h]=At(e,t);if(this.el=o.createElement(u,r),S.currentNode=this.el.content,t===2||t===3){let c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(s=S.nextNode())!==null&&a.length<l;){if(s.nodeType===1){if(s.hasAttributes())for(let c of s.getAttributeNames())if(c.endsWith(Ee)){let x=h[i++],v=s.getAttribute(c).split($),M=/([.?@])?(.*)/.exec(x);a.push({type:1,index:n,name:M[2],strings:v,ctor:M[1]==="."?oe:M[1]==="?"?se:M[1]==="@"?ne:R}),s.removeAttribute(c)}else c.startsWith($)&&(a.push({type:6,index:n}),s.removeAttribute(c));if(Re.test(s.tagName)){let c=s.textContent.split($),x=c.length-1;if(x>0){s.textContent=B?B.emptyScript:"";for(let v=0;v<x;v++)s.append(c[v],P()),S.nextNode(),a.push({type:2,index:++n});s.append(c[x],P())}}}else if(s.nodeType===8)if(s.data===Ce)a.push({type:2,index:n});else{let c=-1;for(;(c=s.data.indexOf($,c+1))!==-1;)a.push({type:7,index:n}),c+=$.length-1}n++}}static createElement(e,t){let r=k.createElement("template");return r.innerHTML=e,r}};function C(o,e,t=o,r){if(e===E)return e;let s=r!==void 0?t._$Co?.[r]:t._$Cl,n=L(e)?void 0:e._$litDirective$;return s?.constructor!==n&&(s?._$AO?.(false),n===void 0?s=void 0:(s=new n(o),s._$AT(o,t,r)),r!==void 0?(t._$Co??=[])[r]=s:t._$Cl=s),s!==void 0&&(e=C(o,s._$AS(o,e.values),s,r)),e}var re=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:r}=this._$AD,s=(e?.creationScope??k).importNode(t,true);S.currentNode=s;let n=S.nextNode(),i=0,l=0,a=r[0];for(;a!==void 0;){if(i===a.index){let u;a.type===2?u=new N(n,n.nextSibling,this,e):a.type===1?u=new a.ctor(n,a.name,a.strings,this,e):a.type===6&&(u=new ie(n,this,e)),this._$AV.push(u),a=r[++l]}i!==a?.index&&(n=S.nextNode(),i++)}return S.currentNode=k,s}p(e){let t=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}},N=class o{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,r,s){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=s,this._$Cv=s?.isConnected??true}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=C(this,e,t),L(e)?e===d||e==null||e===""?(this._$AH!==d&&this._$AR(),this._$AH=d):e!==this._$AH&&e!==E&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):_t(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==d&&L(this._$AH)?this._$AA.nextSibling.data=e:this.T(k.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:r}=e,s=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=H.createElement(Ue(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===s)this._$AH.p(t);else{let n=new re(s,this),i=n.u(this.options);n.p(t),this.T(i),this._$AH=n}}_$AC(e){let t=ke.get(e.strings);return t===void 0&&ke.set(e.strings,t=new H(e)),t}k(e){le(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,r,s=0;for(let n of e)s===t.length?t.push(r=new o(this.O(P()),this.O(P()),this,this.options)):r=t[s],r._$AI(n),s++;s<t.length&&(this._$AR(r&&r._$AB.nextSibling,s),t.length=s)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(false,true,t);e!==this._$AB;){let r=ve(e).nextSibling;ve(e).remove(),e=r}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},R=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,s,n){this.type=1,this._$AH=d,this._$AN=void 0,this.element=e,this.name=t,this._$AM=s,this.options=n,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=d}_$AI(e,t=this,r,s){let n=this.strings,i=false;if(n===void 0)e=C(this,e,t,0),i=!L(e)||e!==this._$AH&&e!==E,i&&(this._$AH=e);else{let l=e,a,u;for(e=n[0],a=0;a<n.length-1;a++)u=C(this,l[r+a],t,a),u===E&&(u=this._$AH[a]),i||=!L(u)||u!==this._$AH[a],u===d?e=d:e!==d&&(e+=(u??"")+n[a+1]),this._$AH[a]=u}i&&!s&&this.j(e)}j(e){e===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},oe=class extends R{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===d?void 0:e}},se=class extends R{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==d)}},ne=class extends R{constructor(e,t,r,s,n){super(e,t,r,s,n),this.type=5}_$AI(e,t=this){if((e=C(this,e,t,0)??d)===E)return;let r=this._$AH,s=e===d&&r!==d||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,n=e!==d&&(r===d||s);s&&this.element.removeEventListener(this.name,this,r),n&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},ie=class{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){C(this,e)}};var St=ae.litHtmlPolyfillSupport;St?.(H,N),(ae.litHtmlVersions??=[]).push("3.3.3");var Te=(o,e,t)=>{let r=t?.renderBefore??e,s=r._$litPart$;if(s===void 0){let n=t?.renderBefore??null;r._$litPart$=s=new N(e.insertBefore(P(),n),n,void 0,t??{})}return s._$AI(o),s};var de=globalThis,w=class extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Te(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false)}render(){return E}};w._$litElement$=true,w.finalized=true,de.litElementHydrateSupport?.({LitElement:w});var kt=de.litElementPolyfillSupport;kt?.({LitElement:w});(de.litElementVersions??=[]).push("4.2.2");var Et={attribute:true,type:String,converter:F,reflect:false,hasChanged:z},Ct=(o=Et,e,t)=>{let{kind:r,metadata:s}=t,n=globalThis.litPropertyMetadata.get(s);if(n===void 0&&globalThis.litPropertyMetadata.set(s,n=new Map),r==="setter"&&((o=Object.create(o)).wrapped=true),n.set(t.name,o),r==="accessor"){let{name:i}=t;return{set(l){let a=e.get.call(this);e.set.call(this,l),this.requestUpdate(i,a,o,true,l)},init(l){return l!==void 0&&this.C(i,void 0,o,l),l}}}if(r==="setter"){let{name:i}=t;return function(l){let a=this[i];e.call(this,l),this.requestUpdate(i,a,o,true,l)}}throw Error("Unsupported decorator location: "+r)};function g(o){return(e,t)=>typeof t=="object"?Ct(o,e,t):((r,s,n)=>{let i=s.hasOwnProperty(n);return s.constructor.createProperty(n,r),i?Object.getOwnPropertyDescriptor(s,n):void 0})(o,e,t)}function _(o){return g({...o,state:true,attribute:false})}var Pe="symbols";var Rt={Fraunces:["latin","latin-ext"],Jost:["latin","latin-ext","cyrillic"],Geist:["latin","latin-ext","cyrillic"]},ue='"Jost", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Fe='"Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Oe='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',Y={"fraunces-jost":{name:"Fraunces with Jost",sans:ue,display:'"Fraunces", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif'},jost:{name:"Jost",sans:ue,display:ue},geist:{name:"Geist",sans:Fe,display:Fe},system:{name:"System",sans:Oe,display:Oe}};function Le(o){let{sans:e,display:t}=Y[o];return Object.keys(Rt).filter(r=>`${e} ${t}`.includes(`"${r}"`))}var He="1.5.0";var Ut=/^(.*)\/cdn\/(?:roxy-ui|components\/[\w-]+)\.js$/,Tt=/^(.*\/dist)\/(?:index|components\/[\w-]+)\.js$/;function Ne(o,e){if(!e)return;let t=new URL(e);if(t.protocol!=="https:"&&t.protocol!=="http:")return;let r=(Ut.exec(t.pathname)??Tt.exec(t.pathname))?.[1];if(r!==void 0)return t.hostname==="cdn.jsdelivr.net"?`https://cdn.jsdelivr.net/npm/@roxyapi/ui@${o}/dist`:`${t.origin}${r}`}var Ft={};function Me(o){return o!==void 0&&Object.hasOwn(Y,o)}function Ke(o,e){if(Me(e))return e;let t=o.getRootNode();if(("host"in t?t.host:null)?.localName.startsWith("roxy-")||!globalThis.getComputedStyle)return;let s=o.shadowRoot?.firstElementChild,n=s?.localName==="style"?s:null;n?.sheet&&(n.sheet.disabled=true);let i,l,a;try{let u=globalThis.getComputedStyle(o),h=c=>u.getPropertyValue(c).trim();i=h("--roxy-font-sans"),l=h("--roxy-font-display"),a=h("--roxy-font")}finally{n?.sheet&&(n.sheet.disabled=false)}if(!(i||l))return Me(a)?a:void 0}function je(o){let{sans:e,display:t}=Y[o];return`--roxy-font:${o};--roxy-font-sans:${e};--roxy-font-display:${t}`}var De=Ne(He,globalThis.document?.currentScript?.src||Ft.url);function Ie(o,e){if(typeof document>"u"||e===void 0)return;let t=`roxy-ui-font-${o}`;if(document.getElementById(t))return;let r=document.createElement("link");r.id=t,r.rel="stylesheet",r.href=`${e}/styles/fonts/${o}.css`,document.head.append(r)}function ze(o,e=De){Le(o).length>0&&Ie(o,e)}function Be(o=De){Ie(Pe,o)}var qe='@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 G="roxy-ui-tokens";function V(){if(typeof document>"u")return null;let o=document.getElementById(G);if(o)return o;let e=document.createElement("style");return e.id=G,e.textContent=qe,document.head.prepend(e),e}function Ye(o){if(o.lang)return o.lang;if(typeof document>"u")return;let e=o.closest?.("[lang]")?.getAttribute("lang");return e||document.documentElement.lang||void 0}function Ge(o){return o.toLowerCase().replace(/[\s_-]+/g," ").trim()}var Ve="__ROXY_UI_I18N__";function Je(){let o=globalThis,e=o[Ve];if(e)return e;let t={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return o[Ve]=t,t}function Ot(o,e){return e?o.replace(/\{\{(\w+)\}\}/g,(t,r)=>r in e?String(e[r]??""):t):o}function Xe(o,e,t){return Ot(Pt(o,e)??e,t)}function Pt(o,e){if(!o)return;let{catalogs:t}=Je(),r=o.toLowerCase();return(t[r]??t[r.split("-")[0]])?.[Ge(e)]}function We(o){let{listeners:e}=Je();return e.add(o),()=>{e.delete(o)}}var J=class{constructor(e){this.host=e,e.addController(this)}hostConnected(){this.unsubscribe=We(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var X=class extends w{constructor(){super();this.translator=(t,r)=>this.t(t,r);new J(this)}connectedCallback(){super.connectedCallback(),V()}updated(t){super.updated(t),this.renderRoot.querySelector(".roxy-glyph")&&Be()}fontDeclarations(t){let r=Ke(this,t);return r?(ze(r),je(r)):""}renderFontStyle(){let t=this.fontDeclarations();return t?f`<style>:host{${t}}</style>`:d}t(t,r){return Xe(this.effectiveLang(),t,r)}effectiveLang(){return Ye(this)}};var Ze=m`:where(.roxy-glyph){font-family:var(--roxy-font-symbol)}`;var Qe=m`: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 Lt=m`:host{--roxy-label-col:minmax(0, 25%);--_mask:var(--roxy-surface);font-family:var(--roxy-font-sans);color:var(--roxy-fg);font-size:var(--roxy-text-base);line-height:var(--roxy-leading-normal);animation:roxy-fade-in var(--roxy-motion-duration) var(--roxy-motion-easing) both;background:0 0;display:block;container-type:inline-size}:host([bare]){--_mask:var(--roxy-bg)}:host([hidden]){display:none}:host([bare]){--roxy-surface:transparent;--roxy-shadow-sm:none;--roxy-shadow-md:none}*,:before,:after{box-sizing:border-box}h1,h2,h3,h4{font-family:var(--roxy-font-display)}@keyframes roxy-fade-in{0%{transform:translateY(calc(var(--roxy-space-unit) / 2))}to{transform:translateY(0)}}@media (prefers-reduced-motion:reduce){:host{animation:none}}.roxy-skeleton{background:linear-gradient(90deg, var(--roxy-border) 0%, color-mix(in srgb, var(--roxy-border) 60%, transparent) 50%, var(--roxy-border) 100%);border-radius:var(--roxy-radius-md);background-size:200% 100%;animation:1.4s ease-in-out infinite roxy-shimmer}@keyframes roxy-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media (prefers-reduced-motion:reduce){.roxy-skeleton{animation:none}}.roxy-sr-only{clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:0;padding:0;position:absolute;overflow:hidden}.roxy-empty{padding:var(--roxy-space-lg);color:var(--roxy-muted);text-align:center;font-size:var(--roxy-text-sm)}.roxy-error{gap:var(--roxy-space-sm);padding:var(--roxy-space-lg);background:var(--roxy-surface);border:1px solid var(--roxy-danger);border-radius:var(--roxy-radius-md);color:var(--roxy-danger-fg);font-size:var(--roxy-text-sm);justify-items:start;display:grid}:host(:focus-within) .roxy-card{outline:var(--roxy-line-thick) solid var(--roxy-ring);outline-offset:var(--roxy-line-thick)}.roxy-attribution{margin-top:var(--roxy-space-sm);font-size:var(--roxy-text-xs);color:var(--roxy-muted);text-align:right}.roxy-attribution a{color:inherit;text-decoration:none}.roxy-attribution a:hover{color:var(--roxy-accent-ink);text-decoration:underline}.roxy-edit-bar{margin-bottom:var(--roxy-space-sm);justify-content:flex-end;display:flex}.roxy-edit{padding:var(--roxy-space-xs) var(--roxy-space-md);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);color:var(--roxy-fg);font-family:inherit;font-size:var(--roxy-text-sm);cursor:pointer;background:0 0}.roxy-edit:hover{border-color:var(--roxy-accent);color:var(--roxy-accent-ink)}.roxy-edit:disabled{cursor:progress;color:var(--roxy-muted)}roxy-endpoint-form+*{margin-top:var(--roxy-space-md)}.roxy-more{justify-items:center;gap:var(--roxy-space-sm);margin-top:var(--roxy-space-md);display:grid}.roxy-more .roxy-edit{min-height:var(--roxy-touch)}:host{font-variant-emoji:text}`,et=[Lt,Qe,Ze];var tt=m`.spinner{inset-inline-end:calc(var(--roxy-space-unit) * 3);border:var(--roxy-line-thick) solid var(--roxy-muted);border-radius:var(--roxy-radius-full);border-top-color:#0000;block-size:.6lh;inline-size:.6lh;animation:.7s linear infinite roxy-spin;position:absolute;top:50%;transform:translateY(-50%)}@keyframes roxy-spin{to{transform:translateY(-50%)rotate(360deg)}}@media (prefers-reduced-motion:reduce){.spinner{animation:none}}.results{z-index:50;top:calc(100% + var(--roxy-space-xs));padding:var(--roxy-space-xs);background:var(--roxy-bg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);box-shadow:var(--roxy-shadow-md);max-block-size:15lh;animation:roxy-fade-in var(--roxy-motion-duration) var(--roxy-motion-easing);margin:0;list-style:none;position:absolute;left:0;right:0;overflow-y:auto}.option{align-items:center;gap:var(--roxy-space-sm);inline-size:100%;min-block-size:var(--roxy-touch);padding:var(--roxy-space-sm) var(--roxy-space-md);border-radius:var(--roxy-radius-sm);text-align:start;font-size:var(--roxy-text-sm);color:var(--roxy-fg);cursor:pointer;transition:background-color var(--roxy-motion-duration);background:0 0;border:0;display:flex}.option:hover,.option[aria-selected=true]{background:color-mix(in srgb, var(--roxy-accent) 10%, transparent)}.empty{padding:var(--roxy-space-md);color:var(--roxy-muted);font-size:var(--roxy-text-sm)}`;function rt(o,e){let t,r=((...s)=>{t&&clearTimeout(t),t=setTimeout(()=>{t=void 0,o(...s)},e)});return r.cancel=()=>{t&&(clearTimeout(t),t=void 0)},r}var ot=o=>e=>{customElements.get(o)||customElements.define(o,e)};var Ht="pk_live_YOUR_KEY",st={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 W(o){if(o)return o===Ht?st.sample:o.startsWith("pk_")?void 0:st.secret}function he(o,e,t={}){t.warn&&console.warn(e.message),o.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:e.reason,message:e.message},bubbles:true,composed:true}))}var pe="https://roxyapi.com/api/v2";async function nt(o){return(await it(o)).message}async function it(o){try{let e=await o.json();if(e?.error){let t=e.code==="validation_error"&&Array.isArray(e.issues)?e.issues.filter(r=>typeof r.path=="string"&&typeof r.message=="string").map(r=>({path:r.path,message:r.message})):null;return{message:e.error,issues:t?.length?t:null,worded:true,...e.code?{code:e.code}:{}}}}catch{}return{message:`Request failed (${o.status})`,issues:null,worded:false}}var at={fromAttribute:o=>{if(o!=null){try{let e=JSON.parse(o);if(e&&typeof e=="object"&&!Array.isArray(e))return e}catch{}console.warn("[roxy-ui] submit-context must be a JSON object; sending the request without it.")}}},Z=class extends Error{constructor(t,r=null,s=true,n,i){super(t);this.issues=r;this.worded=s;this.status=n;this.code=i}};function Nt(o){return o.submitUrl?void 0:W(o.publishableKey)}async function lt(o,e,t){let r=Nt(o);if(r)throw new Z(r.message);let s=o.submitUrl?await fetch(o.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:Mt(e,o.submitContext),signal:t}):await Kt(o,e,t);if(!s.ok){let n=await it(s);throw new Z(n.message,n.issues,n.worded,s.status,n.code)}return await s.json()}function Mt(o,e){return JSON.stringify(e?{...o,context:e}:o)}function Kt(o,e,t){let r=new URL(`${o.baseUrl??pe}${e.path}`,document.baseURI);for(let[n,i]of Object.entries(e.query??{}))i!=null&&r.searchParams.set(n,String(i));let s={Accept:"application/json"};return o.publishableKey&&(s["X-API-Key"]=o.publishableKey),e.body!=null&&(s["Content-Type"]="application/json"),fetch(r,{method:e.method??"GET",headers:s,body:e.body!=null?JSON.stringify(e.body):void 0,signal:t})}var p=class extends X{constructor(){super(...arguments);this.placeholder="Search city";this.defaultValue="";this.query="";this.results=[];this.isOpen=false;this.isLoading=false;this.highlight=-1;this.error=null;this.debouncedFetch=rt(t=>{this.fetchResults(t)},300);this.onInput=t=>{let r=t.target.value;if(this.query=r,r.length<2){this.results=[],this.isOpen=false,this.highlight=-1,this.error=null;return}this.debouncedFetch(r)};this.onKeyDown=t=>{if(!this.isOpen||this.results.length===0){t.key==="ArrowDown"&&this.query.length>=2&&(this.fetchResults(this.query),t.preventDefault());return}if(t.key==="ArrowDown")t.preventDefault(),this.highlight=(this.highlight+1)%this.results.length;else if(t.key==="ArrowUp")t.preventDefault(),this.highlight=(this.highlight-1+this.results.length)%this.results.length;else if(t.key==="Enter"){t.preventDefault();let r=this.results[this.highlight]??this.results[0];r&&this.select(r)}else t.key==="Escape"&&(this.isOpen=false)}}connectedCallback(){super.connectedCallback(),this.query=this.defaultValue,this.clickOutsideHandler=t=>{t.composedPath().includes(this)||(this.isOpen=false)},document.addEventListener("mousedown",this.clickOutsideHandler)}willUpdate(t){if(t.has("publishableKey")||t.has("apiKey")){let r=W(this.publishableKey??this.apiKey);r&&!this.refusal&&he(this,r,{warn:true}),this.refusal=r}}disconnectedCallback(){super.disconnectedCallback(),this.clickOutsideHandler&&document.removeEventListener("mousedown",this.clickOutsideHandler),this.debouncedFetch.cancel(),this.abortController&&(this.abortController.abort(),this.abortController=void 0)}async fetchResults(t){if(this.refusal)return;this.abortController&&this.abortController.abort();let r=new AbortController;this.abortController=r,this.isLoading=true;try{let s=await this.search(t,r.signal);if(r.signal.aborted)return;this.error=null,this.results=s.cities??[],this.isOpen=true,this.highlight=this.results.length>0?0:-1}catch(s){if(s?.name==="AbortError")return;this.results=[],this.isOpen=false,this.highlight=-1,this.error=s instanceof Error?s.message:String(s)}finally{this.abortController===r&&(this.abortController=void 0),r.signal.aborted||(this.isLoading=false)}}async search(t,r){if(!this.endpoint&&this.submitUrl)return lt({submitUrl:this.submitUrl,submitContext:this.submitContext},{path:"/location/search",method:"GET",query:{q:t,limit:8}},r);let s=new URL(this.endpoint||`${pe}/location/search`,document.baseURI);s.searchParams.set("q",t),s.searchParams.set("limit","8");let n={Accept:"application/json"};this.apiKey&&this.publishableKey&&console.warn("[roxy-location-search] both api-key and publishable-key set; using publishable-key. Remove api-key from your widget markup.");let i=this.publishableKey??this.apiKey;i&&(n["X-API-Key"]=i);let l=await fetch(s,{headers:n,signal:r});if(!l.ok)throw new Error(await nt(l));return await l.json()}select(t){this.query=`${t.city}${t.province?`, ${t.province}`:""}, ${t.country}`,this.isOpen=false,this.results=[],this.dispatchEvent(new CustomEvent("roxy-location-select",{detail:t,bubbles:true,composed:true}))}render(){return f`${this.renderFontStyle()}${this.renderBody()}`}renderBody(){return this.refusal?f`<div class="roxy-error" role="alert">${this.t(this.refusal.message)}</div>`:f`<div class="field"><input part="input" type="text" role="combobox" aria-expanded="${this.isOpen?"true":"false"}" aria-controls="roxy-location-listbox" aria-activedescendant="${this.isOpen&&this.highlight>=0?`roxy-location-option-${this.highlight}`:""}" aria-autocomplete="list" autocomplete="off" placeholder="${this.t(this.placeholder)}" .value="${this.query}" @input="${this.onInput}" @keydown="${this.onKeyDown}" @focus="${()=>{this.results.length>0&&(this.isOpen=true)}}"> ${this.isLoading?f`<span class="spinner" role="status" aria-label="${this.t("Loading")}"></span>`:d} ${this.isOpen?f`<ul id="roxy-location-listbox" part="results" class="results" role="listbox">${this.results.length===0?f`<li class="empty" role="status">${this.t("No cities found")}</li>`:this.results.map((t,r)=>f`<li role="presentation"><button type="button" part="option" class="option" role="option" id="${`roxy-location-option-${r}`}" aria-selected="${this.highlight===r?"true":"false"}" @click="${()=>this.select(t)}" @mouseenter="${()=>{this.highlight=r}}"><span class="city">${t.city}</span> <span class="where">${t.province?f`${t.province},`:""}${t.country}</span> <span class="tz">UTC${t.utcOffset>=0?"+":""}${t.utcOffset}</span></button></li>`)}</ul>`:d}</div>${this.error?f`<p class="search-error" role="alert">${this.t(this.error)}</p>`:d}`}};p.styles=[et,tt,m`:host{display:block;position:relative}.field{position:relative}input{inline-size:100%;min-block-size:var(--roxy-touch)}.option .city{font-weight:var(--roxy-weight-bold)}.option .where{color:var(--roxy-muted);flex-grow:1}.option .tz{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums}.search-error{margin:var(--roxy-space-xs) 0 0;color:var(--roxy-danger-fg);font-size:var(--roxy-text-sm)}`],y([g({type:String,attribute:"api-key"})],p.prototype,"apiKey",2),y([g({type:String,attribute:"publishable-key"})],p.prototype,"publishableKey",2),y([g({type:String})],p.prototype,"endpoint",2),y([g({type:String,attribute:"submit-url"})],p.prototype,"submitUrl",2),y([g({attribute:"submit-context",converter:at})],p.prototype,"submitContext",2),y([g({type:String})],p.prototype,"placeholder",2),y([g({type:String,attribute:"default-value"})],p.prototype,"defaultValue",2),y([_()],p.prototype,"query",2),y([_()],p.prototype,"results",2),y([_()],p.prototype,"isOpen",2),y([_()],p.prototype,"isLoading",2),y([_()],p.prototype,"highlight",2),y([_()],p.prototype,"refusal",2),y([_()],p.prototype,"error",2),p=y([ot("roxy-location-search")],p);return pt(jt)})();/*! Bundled license information:
3
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Ae=/'/g,Se=/"/g,Re=/^(?:script|style|textarea|title)$/i,ce=o=>(e,...t)=>({_$litType$:o,strings:e,values:t}),f=ce(1),Yt=ce(2),Gt=ce(3),E=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),ke=new WeakMap,S=k.createTreeWalker(k,129);function Ue(o,e){if(!le(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return $e!==void 0?$e.createHTML(e):e}var At=(o,e)=>{let t=o.length-1,r=[],s,n=e===2?"<svg>":e===3?"<math>":"",i=O;for(let l=0;l<t;l++){let a=o[l],u,h,c=-1,x=0;for(;x<a.length&&(i.lastIndex=x,h=i.exec(a),h!==null);)x=i.lastIndex,i===O?h[1]==="!--"?i=we:h[1]!==void 0?i=_e:h[2]!==void 0?(Re.test(h[2])&&(s=RegExp("</"+h[2],"g")),i=A):h[3]!==void 0&&(i=A):i===A?h[0]===">"?(i=s??O,c=-1):h[1]===void 0?c=-2:(c=i.lastIndex-h[2].length,u=h[1],i=h[3]===void 0?A:h[3]==='"'?Se:Ae):i===Se||i===Ae?i=A:i===we||i===_e?i=O:(i=A,s=void 0);let v=i===A&&o[l+1].startsWith("/>")?" ":"";n+=i===O?a+wt:c>=0?(r.push(u),a.slice(0,c)+Ee+a.slice(c)+$+v):a+$+(c===-2?l:v)}return[Ue(o,n+(o[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]},H=class o{constructor({strings:e,_$litType$:t},r){let s;this.parts=[];let n=0,i=0,l=e.length-1,a=this.parts,[u,h]=At(e,t);if(this.el=o.createElement(u,r),S.currentNode=this.el.content,t===2||t===3){let c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(s=S.nextNode())!==null&&a.length<l;){if(s.nodeType===1){if(s.hasAttributes())for(let c of s.getAttributeNames())if(c.endsWith(Ee)){let x=h[i++],v=s.getAttribute(c).split($),M=/([.?@])?(.*)/.exec(x);a.push({type:1,index:n,name:M[2],strings:v,ctor:M[1]==="."?oe:M[1]==="?"?se:M[1]==="@"?ne:R}),s.removeAttribute(c)}else c.startsWith($)&&(a.push({type:6,index:n}),s.removeAttribute(c));if(Re.test(s.tagName)){let c=s.textContent.split($),x=c.length-1;if(x>0){s.textContent=B?B.emptyScript:"";for(let v=0;v<x;v++)s.append(c[v],P()),S.nextNode(),a.push({type:2,index:++n});s.append(c[x],P())}}}else if(s.nodeType===8)if(s.data===Ce)a.push({type:2,index:n});else{let c=-1;for(;(c=s.data.indexOf($,c+1))!==-1;)a.push({type:7,index:n}),c+=$.length-1}n++}}static createElement(e,t){let r=k.createElement("template");return r.innerHTML=e,r}};function C(o,e,t=o,r){if(e===E)return e;let s=r!==void 0?t._$Co?.[r]:t._$Cl,n=L(e)?void 0:e._$litDirective$;return s?.constructor!==n&&(s?._$AO?.(false),n===void 0?s=void 0:(s=new n(o),s._$AT(o,t,r)),r!==void 0?(t._$Co??=[])[r]=s:t._$Cl=s),s!==void 0&&(e=C(o,s._$AS(o,e.values),s,r)),e}var re=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:r}=this._$AD,s=(e?.creationScope??k).importNode(t,true);S.currentNode=s;let n=S.nextNode(),i=0,l=0,a=r[0];for(;a!==void 0;){if(i===a.index){let u;a.type===2?u=new N(n,n.nextSibling,this,e):a.type===1?u=new a.ctor(n,a.name,a.strings,this,e):a.type===6&&(u=new ie(n,this,e)),this._$AV.push(u),a=r[++l]}i!==a?.index&&(n=S.nextNode(),i++)}return S.currentNode=k,s}p(e){let t=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}},N=class o{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,r,s){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=s,this._$Cv=s?.isConnected??true}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=C(this,e,t),L(e)?e===d||e==null||e===""?(this._$AH!==d&&this._$AR(),this._$AH=d):e!==this._$AH&&e!==E&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):_t(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==d&&L(this._$AH)?this._$AA.nextSibling.data=e:this.T(k.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:r}=e,s=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=H.createElement(Ue(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===s)this._$AH.p(t);else{let n=new re(s,this),i=n.u(this.options);n.p(t),this.T(i),this._$AH=n}}_$AC(e){let t=ke.get(e.strings);return t===void 0&&ke.set(e.strings,t=new H(e)),t}k(e){le(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,r,s=0;for(let n of e)s===t.length?t.push(r=new o(this.O(P()),this.O(P()),this,this.options)):r=t[s],r._$AI(n),s++;s<t.length&&(this._$AR(r&&r._$AB.nextSibling,s),t.length=s)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(false,true,t);e!==this._$AB;){let r=ve(e).nextSibling;ve(e).remove(),e=r}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},R=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,s,n){this.type=1,this._$AH=d,this._$AN=void 0,this.element=e,this.name=t,this._$AM=s,this.options=n,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=d}_$AI(e,t=this,r,s){let n=this.strings,i=false;if(n===void 0)e=C(this,e,t,0),i=!L(e)||e!==this._$AH&&e!==E,i&&(this._$AH=e);else{let l=e,a,u;for(e=n[0],a=0;a<n.length-1;a++)u=C(this,l[r+a],t,a),u===E&&(u=this._$AH[a]),i||=!L(u)||u!==this._$AH[a],u===d?e=d:e!==d&&(e+=(u??"")+n[a+1]),this._$AH[a]=u}i&&!s&&this.j(e)}j(e){e===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},oe=class extends R{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===d?void 0:e}},se=class extends R{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==d)}},ne=class extends R{constructor(e,t,r,s,n){super(e,t,r,s,n),this.type=5}_$AI(e,t=this){if((e=C(this,e,t,0)??d)===E)return;let r=this._$AH,s=e===d&&r!==d||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,n=e!==d&&(r===d||s);s&&this.element.removeEventListener(this.name,this,r),n&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},ie=class{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){C(this,e)}};var St=ae.litHtmlPolyfillSupport;St?.(H,N),(ae.litHtmlVersions??=[]).push("3.3.3");var Te=(o,e,t)=>{let r=t?.renderBefore??e,s=r._$litPart$;if(s===void 0){let n=t?.renderBefore??null;r._$litPart$=s=new N(e.insertBefore(P(),n),n,void 0,t??{})}return s._$AI(o),s};var de=globalThis,w=class extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Te(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false)}render(){return E}};w._$litElement$=true,w.finalized=true,de.litElementHydrateSupport?.({LitElement:w});var kt=de.litElementPolyfillSupport;kt?.({LitElement:w});(de.litElementVersions??=[]).push("4.2.2");var Et={attribute:true,type:String,converter:F,reflect:false,hasChanged:z},Ct=(o=Et,e,t)=>{let{kind:r,metadata:s}=t,n=globalThis.litPropertyMetadata.get(s);if(n===void 0&&globalThis.litPropertyMetadata.set(s,n=new Map),r==="setter"&&((o=Object.create(o)).wrapped=true),n.set(t.name,o),r==="accessor"){let{name:i}=t;return{set(l){let a=e.get.call(this);e.set.call(this,l),this.requestUpdate(i,a,o,true,l)},init(l){return l!==void 0&&this.C(i,void 0,o,l),l}}}if(r==="setter"){let{name:i}=t;return function(l){let a=this[i];e.call(this,l),this.requestUpdate(i,a,o,true,l)}}throw Error("Unsupported decorator location: "+r)};function g(o){return(e,t)=>typeof t=="object"?Ct(o,e,t):((r,s,n)=>{let i=s.hasOwnProperty(n);return s.constructor.createProperty(n,r),i?Object.getOwnPropertyDescriptor(s,n):void 0})(o,e,t)}function _(o){return g({...o,state:true,attribute:false})}var Pe="symbols";var Rt={Fraunces:["latin","latin-ext"],Jost:["latin","latin-ext","cyrillic"],Geist:["latin","latin-ext","cyrillic"]},ue='"Jost", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Fe='"Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Oe='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',Y={"fraunces-jost":{name:"Fraunces with Jost",sans:ue,display:'"Fraunces", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif'},jost:{name:"Jost",sans:ue,display:ue},geist:{name:"Geist",sans:Fe,display:Fe},system:{name:"System",sans:Oe,display:Oe}};function Le(o){let{sans:e,display:t}=Y[o];return Object.keys(Rt).filter(r=>`${e} ${t}`.includes(`"${r}"`))}var He="1.6.0";var Ut=/^(.*)\/cdn\/(?:roxy-ui|components\/[\w-]+)\.js$/,Tt=/^(.*\/dist)\/(?:index|components\/[\w-]+)\.js$/;function Ne(o,e){if(!e)return;let t=new URL(e);if(t.protocol!=="https:"&&t.protocol!=="http:")return;let r=(Ut.exec(t.pathname)??Tt.exec(t.pathname))?.[1];if(r!==void 0)return t.hostname==="cdn.jsdelivr.net"?`https://cdn.jsdelivr.net/npm/@roxyapi/ui@${o}/dist`:`${t.origin}${r}`}var Ft={};function Me(o){return o!==void 0&&Object.hasOwn(Y,o)}function Ke(o,e){if(Me(e))return e;let t=o.getRootNode();if(("host"in t?t.host:null)?.localName.startsWith("roxy-")||!globalThis.getComputedStyle)return;let s=o.shadowRoot?.firstElementChild,n=s?.localName==="style"?s:null;n?.sheet&&(n.sheet.disabled=true);let i,l,a;try{let u=globalThis.getComputedStyle(o),h=c=>u.getPropertyValue(c).trim();i=h("--roxy-font-sans"),l=h("--roxy-font-display"),a=h("--roxy-font")}finally{n?.sheet&&(n.sheet.disabled=false)}if(!(i||l))return Me(a)?a:void 0}function je(o){let{sans:e,display:t}=Y[o];return`--roxy-font:${o};--roxy-font-sans:${e};--roxy-font-display:${t}`}var De=Ne(He,globalThis.document?.currentScript?.src||Ft.url);function Ie(o,e){if(typeof document>"u"||e===void 0)return;let t=`roxy-ui-font-${o}`;if(document.getElementById(t))return;let r=document.createElement("link");r.id=t,r.rel="stylesheet",r.href=`${e}/styles/fonts/${o}.css`,document.head.append(r)}function ze(o,e=De){Le(o).length>0&&Ie(o,e)}function Be(o=De){Ie(Pe,o)}var qe='@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 G="roxy-ui-tokens";function V(){if(typeof document>"u")return null;let o=document.getElementById(G);if(o)return o;let e=document.createElement("style");return e.id=G,e.textContent=qe,document.head.prepend(e),e}function Ye(o){if(o.lang)return o.lang;if(typeof document>"u")return;let e=o.closest?.("[lang]")?.getAttribute("lang");return e||document.documentElement.lang||void 0}function Ge(o){return o.toLowerCase().replace(/[\s_-]+/g," ").trim()}var Ve="__ROXY_UI_I18N__";function Je(){let o=globalThis,e=o[Ve];if(e)return e;let t={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return o[Ve]=t,t}function Ot(o,e){return e?o.replace(/\{\{(\w+)\}\}/g,(t,r)=>r in e?String(e[r]??""):t):o}function Xe(o,e,t){return Ot(Pt(o,e)??e,t)}function Pt(o,e){if(!o)return;let{catalogs:t}=Je(),r=o.toLowerCase();return(t[r]??t[r.split("-")[0]])?.[Ge(e)]}function We(o){let{listeners:e}=Je();return e.add(o),()=>{e.delete(o)}}var J=class{constructor(e){this.host=e,e.addController(this)}hostConnected(){this.unsubscribe=We(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var X=class extends w{constructor(){super();this.translator=(t,r)=>this.t(t,r);new J(this)}connectedCallback(){super.connectedCallback(),V()}updated(t){super.updated(t),this.renderRoot.querySelector(".roxy-glyph")&&Be()}fontDeclarations(t){let r=Ke(this,t);return r?(ze(r),je(r)):""}renderFontStyle(){let t=this.fontDeclarations();return t?f`<style>:host{${t}}</style>`:d}t(t,r){return Xe(this.effectiveLang(),t,r)}effectiveLang(){return Ye(this)}};var Ze=m`:where(.roxy-glyph){font-family:var(--roxy-font-symbol)}`;var Qe=m`: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 Lt=m`:host{--roxy-label-col:minmax(0, 25%);--_mask:var(--roxy-surface);font-family:var(--roxy-font-sans);color:var(--roxy-fg);font-size:var(--roxy-text-base);line-height:var(--roxy-leading-normal);animation:roxy-fade-in var(--roxy-motion-duration) var(--roxy-motion-easing) both;background:0 0;display:block;container-type:inline-size}:host([bare]){--_mask:var(--roxy-bg)}:host([hidden]){display:none}:host([bare]){--roxy-surface:transparent;--roxy-shadow-sm:none;--roxy-shadow-md:none}*,:before,:after{box-sizing:border-box}h1,h2,h3,h4{font-family:var(--roxy-font-display)}@keyframes roxy-fade-in{0%{transform:translateY(calc(var(--roxy-space-unit) / 2))}to{transform:translateY(0)}}@media (prefers-reduced-motion:reduce){:host{animation:none}}.roxy-skeleton{background:linear-gradient(90deg, var(--roxy-border) 0%, color-mix(in srgb, var(--roxy-border) 60%, transparent) 50%, var(--roxy-border) 100%);border-radius:var(--roxy-radius-md);background-size:200% 100%;animation:1.4s ease-in-out infinite roxy-shimmer}@keyframes roxy-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media (prefers-reduced-motion:reduce){.roxy-skeleton{animation:none}}.roxy-sr-only{clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:0;padding:0;position:absolute;overflow:hidden}.roxy-empty{padding:var(--roxy-space-lg);color:var(--roxy-muted);text-align:center;font-size:var(--roxy-text-sm)}.roxy-error{gap:var(--roxy-space-sm);padding:var(--roxy-space-lg);background:var(--roxy-surface);border:1px solid var(--roxy-danger);border-radius:var(--roxy-radius-md);color:var(--roxy-danger-fg);font-size:var(--roxy-text-sm);justify-items:start;display:grid}:host(:focus-within) .roxy-card{outline:var(--roxy-line-thick) solid var(--roxy-ring);outline-offset:var(--roxy-line-thick)}.roxy-attribution{margin-top:var(--roxy-space-sm);font-size:var(--roxy-text-xs);color:var(--roxy-muted);text-align:right}.roxy-attribution a{color:inherit;text-decoration:none}.roxy-attribution a:hover{color:var(--roxy-accent-ink);text-decoration:underline}.roxy-edit-bar{margin-bottom:var(--roxy-space-sm);justify-content:flex-end;display:flex}.roxy-edit{padding:var(--roxy-space-xs) var(--roxy-space-md);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);color:var(--roxy-fg);font-family:inherit;font-size:var(--roxy-text-sm);cursor:pointer;background:0 0}.roxy-edit:hover{border-color:var(--roxy-accent);color:var(--roxy-accent-ink)}.roxy-edit:disabled{cursor:progress;color:var(--roxy-muted)}roxy-endpoint-form+*{margin-top:var(--roxy-space-md)}.roxy-more{justify-items:center;gap:var(--roxy-space-sm);margin-top:var(--roxy-space-md);display:grid}.roxy-more .roxy-edit{min-height:var(--roxy-touch)}:host{font-variant-emoji:text}`,et=[Lt,Qe,Ze];var tt=m`.spinner{inset-inline-end:calc(var(--roxy-space-unit) * 3);border:var(--roxy-line-thick) solid var(--roxy-muted);border-radius:var(--roxy-radius-full);border-top-color:#0000;block-size:.6lh;inline-size:.6lh;animation:.7s linear infinite roxy-spin;position:absolute;top:50%;transform:translateY(-50%)}@keyframes roxy-spin{to{transform:translateY(-50%)rotate(360deg)}}@media (prefers-reduced-motion:reduce){.spinner{animation:none}}.results{z-index:50;top:calc(100% + var(--roxy-space-xs));padding:var(--roxy-space-xs);background:var(--roxy-bg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);box-shadow:var(--roxy-shadow-md);max-block-size:15lh;animation:roxy-fade-in var(--roxy-motion-duration) var(--roxy-motion-easing);margin:0;list-style:none;position:absolute;left:0;right:0;overflow-y:auto}.option{align-items:center;gap:var(--roxy-space-sm);inline-size:100%;min-block-size:var(--roxy-touch);padding:var(--roxy-space-sm) var(--roxy-space-md);border-radius:var(--roxy-radius-sm);text-align:start;font-size:var(--roxy-text-sm);color:var(--roxy-fg);cursor:pointer;transition:background-color var(--roxy-motion-duration);background:0 0;border:0;display:flex}.option:hover,.option[aria-selected=true]{background:color-mix(in srgb, var(--roxy-accent) 10%, transparent)}.empty{padding:var(--roxy-space-md);color:var(--roxy-muted);font-size:var(--roxy-text-sm)}`;function rt(o,e){let t,r=((...s)=>{t&&clearTimeout(t),t=setTimeout(()=>{t=void 0,o(...s)},e)});return r.cancel=()=>{t&&(clearTimeout(t),t=void 0)},r}var ot=o=>e=>{customElements.get(o)||customElements.define(o,e)};var Ht="pk_live_YOUR_KEY",st={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 W(o){if(o)return o===Ht?st.sample:o.startsWith("pk_")?void 0:st.secret}function he(o,e,t={}){t.warn&&console.warn(e.message),o.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:e.reason,message:e.message},bubbles:true,composed:true}))}var pe="https://roxyapi.com/api/v2";async function nt(o){return(await it(o)).message}async function it(o){try{let e=await o.json();if(e?.error){let t=e.code==="validation_error"&&Array.isArray(e.issues)?e.issues.filter(r=>typeof r.path=="string"&&typeof r.message=="string").map(r=>({path:r.path,message:r.message})):null;return{message:e.error,issues:t?.length?t:null,worded:true,...e.code?{code:e.code}:{}}}}catch{}return{message:`Request failed (${o.status})`,issues:null,worded:false}}var at={fromAttribute:o=>{if(o!=null){try{let e=JSON.parse(o);if(e&&typeof e=="object"&&!Array.isArray(e))return e}catch{}console.warn("[roxy-ui] submit-context must be a JSON object; sending the request without it.")}}},Z=class extends Error{constructor(t,r=null,s=true,n,i){super(t);this.issues=r;this.worded=s;this.status=n;this.code=i}};function Nt(o){return o.submitUrl?void 0:W(o.publishableKey)}async function lt(o,e,t){let r=Nt(o);if(r)throw new Z(r.message);let s=o.submitUrl?await fetch(o.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:Mt(e,o.submitContext),signal:t}):await Kt(o,e,t);if(!s.ok){let n=await it(s);throw new Z(n.message,n.issues,n.worded,s.status,n.code)}return await s.json()}function Mt(o,e){return JSON.stringify(e?{...o,context:e}:o)}function Kt(o,e,t){let r=new URL(`${o.baseUrl??pe}${e.path}`,document.baseURI);for(let[n,i]of Object.entries(e.query??{}))i!=null&&r.searchParams.set(n,String(i));let s={Accept:"application/json"};return o.publishableKey&&(s["X-API-Key"]=o.publishableKey),e.body!=null&&(s["Content-Type"]="application/json"),fetch(r,{method:e.method??"GET",headers:s,body:e.body!=null?JSON.stringify(e.body):void 0,signal:t})}var p=class extends X{constructor(){super(...arguments);this.placeholder="Search city";this.defaultValue="";this.query="";this.results=[];this.isOpen=false;this.isLoading=false;this.highlight=-1;this.error=null;this.debouncedFetch=rt(t=>{this.fetchResults(t)},300);this.onInput=t=>{let r=t.target.value;if(this.query=r,r.length<2){this.results=[],this.isOpen=false,this.highlight=-1,this.error=null;return}this.debouncedFetch(r)};this.onKeyDown=t=>{if(!this.isOpen||this.results.length===0){t.key==="ArrowDown"&&this.query.length>=2&&(this.fetchResults(this.query),t.preventDefault());return}if(t.key==="ArrowDown")t.preventDefault(),this.highlight=(this.highlight+1)%this.results.length;else if(t.key==="ArrowUp")t.preventDefault(),this.highlight=(this.highlight-1+this.results.length)%this.results.length;else if(t.key==="Enter"){t.preventDefault();let r=this.results[this.highlight]??this.results[0];r&&this.select(r)}else t.key==="Escape"&&(this.isOpen=false)}}connectedCallback(){super.connectedCallback(),this.query=this.defaultValue,this.clickOutsideHandler=t=>{t.composedPath().includes(this)||(this.isOpen=false)},document.addEventListener("mousedown",this.clickOutsideHandler)}willUpdate(t){if(t.has("publishableKey")||t.has("apiKey")){let r=W(this.publishableKey??this.apiKey);r&&!this.refusal&&he(this,r,{warn:true}),this.refusal=r}}disconnectedCallback(){super.disconnectedCallback(),this.clickOutsideHandler&&document.removeEventListener("mousedown",this.clickOutsideHandler),this.debouncedFetch.cancel(),this.abortController&&(this.abortController.abort(),this.abortController=void 0)}async fetchResults(t){if(this.refusal)return;this.abortController&&this.abortController.abort();let r=new AbortController;this.abortController=r,this.isLoading=true;try{let s=await this.search(t,r.signal);if(r.signal.aborted)return;this.error=null,this.results=s.cities??[],this.isOpen=true,this.highlight=this.results.length>0?0:-1}catch(s){if(s?.name==="AbortError")return;this.results=[],this.isOpen=false,this.highlight=-1,this.error=s instanceof Error?s.message:String(s)}finally{this.abortController===r&&(this.abortController=void 0),r.signal.aborted||(this.isLoading=false)}}async search(t,r){if(!this.endpoint&&this.submitUrl)return lt({submitUrl:this.submitUrl,submitContext:this.submitContext},{path:"/location/search",method:"GET",query:{q:t,limit:8}},r);let s=new URL(this.endpoint||`${pe}/location/search`,document.baseURI);s.searchParams.set("q",t),s.searchParams.set("limit","8");let n={Accept:"application/json"};this.apiKey&&this.publishableKey&&console.warn("[roxy-location-search] both api-key and publishable-key set; using publishable-key. Remove api-key from your widget markup.");let i=this.publishableKey??this.apiKey;i&&(n["X-API-Key"]=i);let l=await fetch(s,{headers:n,signal:r});if(!l.ok)throw new Error(await nt(l));return await l.json()}select(t){this.query=`${t.city}${t.province?`, ${t.province}`:""}, ${t.country}`,this.isOpen=false,this.results=[],this.dispatchEvent(new CustomEvent("roxy-location-select",{detail:t,bubbles:true,composed:true}))}render(){return f`${this.renderFontStyle()}${this.renderBody()}`}renderBody(){return this.refusal?f`<div class="roxy-error" role="alert">${this.t(this.refusal.message)}</div>`:f`<div class="field"><input part="input" type="text" role="combobox" aria-expanded="${this.isOpen?"true":"false"}" aria-controls="roxy-location-listbox" aria-activedescendant="${this.isOpen&&this.highlight>=0?`roxy-location-option-${this.highlight}`:""}" aria-autocomplete="list" autocomplete="off" placeholder="${this.t(this.placeholder)}" .value="${this.query}" @input="${this.onInput}" @keydown="${this.onKeyDown}" @focus="${()=>{this.results.length>0&&(this.isOpen=true)}}"> ${this.isLoading?f`<span class="spinner" role="status" aria-label="${this.t("Loading")}"></span>`:d} ${this.isOpen?f`<ul id="roxy-location-listbox" part="results" class="results" role="listbox">${this.results.length===0?f`<li class="empty" role="status">${this.t("No cities found")}</li>`:this.results.map((t,r)=>f`<li role="presentation"><button type="button" part="option" class="option" role="option" id="${`roxy-location-option-${r}`}" aria-selected="${this.highlight===r?"true":"false"}" @click="${()=>this.select(t)}" @mouseenter="${()=>{this.highlight=r}}"><span class="city">${t.city}</span> <span class="where">${t.province?f`${t.province},`:""}${t.country}</span> <span class="tz">UTC${t.utcOffset>=0?"+":""}${t.utcOffset}</span></button></li>`)}</ul>`:d}</div>${this.error?f`<p class="search-error" role="alert">${this.t(this.error)}</p>`:d}`}};p.styles=[et,tt,m`:host{display:block;position:relative}.field{position:relative}input{inline-size:100%;min-block-size:var(--roxy-touch)}.option .city{font-weight:var(--roxy-weight-bold)}.option .where{color:var(--roxy-muted);flex-grow:1}.option .tz{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums}.search-error{margin:var(--roxy-space-xs) 0 0;color:var(--roxy-danger-fg);font-size:var(--roxy-text-sm)}`],y([g({type:String,attribute:"api-key"})],p.prototype,"apiKey",2),y([g({type:String,attribute:"publishable-key"})],p.prototype,"publishableKey",2),y([g({type:String})],p.prototype,"endpoint",2),y([g({type:String,attribute:"submit-url"})],p.prototype,"submitUrl",2),y([g({attribute:"submit-context",converter:at})],p.prototype,"submitContext",2),y([g({type:String})],p.prototype,"placeholder",2),y([g({type:String,attribute:"default-value"})],p.prototype,"defaultValue",2),y([_()],p.prototype,"query",2),y([_()],p.prototype,"results",2),y([_()],p.prototype,"isOpen",2),y([_()],p.prototype,"isLoading",2),y([_()],p.prototype,"highlight",2),y([_()],p.prototype,"refusal",2),y([_()],p.prototype,"error",2),p=y([ot("roxy-location-search")],p);return pt(jt)})();/*! Bundled license information:
4
4
 
5
5
  @lit/reactive-element/css-tag.js:
6
6
  (**