@roxyapi/ui 1.1.1 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (195) hide show
  1. package/AGENTS.md +5 -5
  2. package/README.md +3 -3
  3. package/THEMING.md +3 -3
  4. package/components-catalog.json +258 -158
  5. package/dist/cdn/components/almanac-day.js +3 -205
  6. package/dist/cdn/components/angel-number-card.js +3 -205
  7. package/dist/cdn/components/angel-number-lookup.js +3 -205
  8. package/dist/cdn/components/arudha-padas.js +3 -205
  9. package/dist/cdn/components/ashtakavarga-grid.js +3 -205
  10. package/dist/cdn/components/aspects-table.js +3 -205
  11. package/dist/cdn/components/astrocartography-map.js +3 -205
  12. package/dist/cdn/components/bazi-chart.js +3 -205
  13. package/dist/cdn/components/bhav-chalit-table.js +2 -204
  14. package/dist/cdn/components/bhava-bala-table.js +3 -205
  15. package/dist/cdn/components/biorhythm-chart.js +3 -205
  16. package/dist/cdn/components/bodygraph.js +7 -209
  17. package/dist/cdn/components/chara-karakas.js +3 -205
  18. package/dist/cdn/components/choghadiya-grid.js +3 -205
  19. package/dist/cdn/components/compatibility-card.js +2 -204
  20. package/dist/cdn/components/compound-number.js +3 -205
  21. package/dist/cdn/components/crystal-card.js +3 -205
  22. package/dist/cdn/components/crystal-grid.js +3 -205
  23. package/dist/cdn/components/dasha-timeline.js +3 -205
  24. package/dist/cdn/components/data.js +3 -205
  25. package/dist/cdn/components/divisional-chart.js +13 -215
  26. package/dist/cdn/components/dosha-card.js +3 -205
  27. package/dist/cdn/components/dosha-constitution.js +3 -205
  28. package/dist/cdn/components/dream-card.js +3 -205
  29. package/dist/cdn/components/dream-search.js +3 -205
  30. package/dist/cdn/components/endpoint-form.js +3 -205
  31. package/dist/cdn/components/ephemeris-table.js +2 -204
  32. package/dist/cdn/components/fixed-stars.js +2 -204
  33. package/dist/cdn/components/flying-star-chart.js +2 -204
  34. package/dist/cdn/components/forecast-digest.js +3 -205
  35. package/dist/cdn/components/forecast-timeline.js +3 -205
  36. package/dist/cdn/components/gematria.js +3 -205
  37. package/dist/cdn/components/gochara-table.js +3 -205
  38. package/dist/cdn/components/guna-milan.js +3 -205
  39. package/dist/cdn/components/hd-connection.js +5 -207
  40. package/dist/cdn/components/hd-penta.js +5 -207
  41. package/dist/cdn/components/hd-type-card.js +3 -205
  42. package/dist/cdn/components/hd-variables.js +3 -205
  43. package/dist/cdn/components/heliacal-table.js +3 -205
  44. package/dist/cdn/components/hexagram.js +3 -205
  45. package/dist/cdn/components/hora-table.js +3 -205
  46. package/dist/cdn/components/horoscope-card.js +3 -205
  47. package/dist/cdn/components/kp-chart.js +3 -205
  48. package/dist/cdn/components/kp-finance-card.js +3 -205
  49. package/dist/cdn/components/kp-planets-table.js +3 -205
  50. package/dist/cdn/components/kp-ruling-planets.js +3 -205
  51. package/dist/cdn/components/kua-card.js +3 -205
  52. package/dist/cdn/components/local-space-compass.js +8 -210
  53. package/dist/cdn/components/location-search.js +3 -205
  54. package/dist/cdn/components/luck-pillars.js +3 -205
  55. package/dist/cdn/components/mayan-day-sign.js +3 -205
  56. package/dist/cdn/components/moon-phase.js +3 -205
  57. package/dist/cdn/components/nakshatra-card.js +3 -205
  58. package/dist/cdn/components/natal-chart.js +6 -208
  59. package/dist/cdn/components/numerology-card.js +3 -205
  60. package/dist/cdn/components/panchang-table.js +3 -205
  61. package/dist/cdn/components/positions-table.js +3 -205
  62. package/dist/cdn/components/profection-card.js +3 -205
  63. package/dist/cdn/components/reference-card.js +3 -205
  64. package/dist/cdn/components/relocation-wheel.js +6 -208
  65. package/dist/cdn/components/shadbala-table.js +3 -205
  66. package/dist/cdn/components/synastry-chart.js +7 -209
  67. package/dist/cdn/components/tarot-card.js +3 -205
  68. package/dist/cdn/components/tarot-catalog.js +3 -205
  69. package/dist/cdn/components/tarot-spread.js +3 -205
  70. package/dist/cdn/components/transit-wheel.js +8 -210
  71. package/dist/cdn/components/transits-table.js +3 -205
  72. package/dist/cdn/components/upagraha-table.js +2 -204
  73. package/dist/cdn/components/vastu-mandala.js +4 -206
  74. package/dist/cdn/components/vedic-aspects.js +2 -204
  75. package/dist/cdn/components/vedic-daily.js +3 -205
  76. package/dist/cdn/components/vedic-kundli.js +10 -212
  77. package/dist/cdn/components/vedic-planets-table.js +3 -205
  78. package/dist/cdn/components/western-planets-table.js +2 -204
  79. package/dist/cdn/components/yoga-list.js +3 -205
  80. package/dist/cdn/components/zodiac-card.js +2 -204
  81. package/dist/cdn/locales/de.js +1 -1
  82. package/dist/cdn/roxy-ui.js +49 -251
  83. package/dist/components/almanac-day.js +1 -203
  84. package/dist/components/angel-number-card.js +1 -203
  85. package/dist/components/angel-number-lookup.js +1 -203
  86. package/dist/components/arudha-padas.js +1 -203
  87. package/dist/components/ashtakavarga-grid.js +1 -203
  88. package/dist/components/aspects-table.js +1 -203
  89. package/dist/components/astrocartography-map.js +6 -208
  90. package/dist/components/bazi-chart.js +1 -203
  91. package/dist/components/bhav-chalit-table.js +1 -203
  92. package/dist/components/bhava-bala-table.js +1 -203
  93. package/dist/components/biorhythm-chart.js +1 -203
  94. package/dist/components/bodygraph.js +3 -205
  95. package/dist/components/chara-karakas.js +1 -203
  96. package/dist/components/choghadiya-grid.js +1 -203
  97. package/dist/components/compatibility-card.js +1 -203
  98. package/dist/components/compound-number.js +1 -203
  99. package/dist/components/crystal-card.js +1 -203
  100. package/dist/components/crystal-grid.js +1 -203
  101. package/dist/components/dasha-timeline.js +1 -203
  102. package/dist/components/data.js +1 -203
  103. package/dist/components/divisional-chart.js +45 -247
  104. package/dist/components/dosha-card.js +1 -203
  105. package/dist/components/dosha-constitution.js +1 -203
  106. package/dist/components/dream-card.js +1 -203
  107. package/dist/components/dream-search.js +1 -203
  108. package/dist/components/endpoint-form.js +1 -203
  109. package/dist/components/ephemeris-table.js +1 -203
  110. package/dist/components/fixed-stars.js +1 -203
  111. package/dist/components/flying-star-chart.js +1 -203
  112. package/dist/components/forecast-digest.js +1 -203
  113. package/dist/components/forecast-timeline.js +1 -203
  114. package/dist/components/gematria.js +1 -203
  115. package/dist/components/gochara-table.js +1 -203
  116. package/dist/components/guna-milan.js +1 -203
  117. package/dist/components/hd-connection.js +3 -205
  118. package/dist/components/hd-penta.js +5 -207
  119. package/dist/components/hd-type-card.js +1 -203
  120. package/dist/components/hd-variables.js +1 -203
  121. package/dist/components/heliacal-table.js +1 -203
  122. package/dist/components/hexagram.d.ts +1 -1
  123. package/dist/components/hexagram.js +1 -203
  124. package/dist/components/hora-table.js +1 -203
  125. package/dist/components/horoscope-card.js +1 -203
  126. package/dist/components/kp-chart.js +1 -203
  127. package/dist/components/kp-finance-card.js +1 -203
  128. package/dist/components/kp-planets-table.js +1 -203
  129. package/dist/components/kp-ruling-planets.js +1 -203
  130. package/dist/components/kua-card.js +1 -203
  131. package/dist/components/local-space-compass.js +4 -206
  132. package/dist/components/location-search.js +1 -203
  133. package/dist/components/luck-pillars.js +1 -203
  134. package/dist/components/mayan-day-sign.js +1 -203
  135. package/dist/components/moon-phase.js +1 -203
  136. package/dist/components/nakshatra-card.js +1 -203
  137. package/dist/components/natal-chart.d.ts +1 -1
  138. package/dist/components/natal-chart.js +5 -207
  139. package/dist/components/numerology-card.js +1 -203
  140. package/dist/components/panchang-table.js +1 -203
  141. package/dist/components/positions-table.js +1 -203
  142. package/dist/components/profection-card.js +1 -203
  143. package/dist/components/reference-card.js +1 -203
  144. package/dist/components/relocation-wheel.js +3 -205
  145. package/dist/components/shadbala-table.js +1 -203
  146. package/dist/components/synastry-chart.js +6 -208
  147. package/dist/components/tarot-card.js +1 -203
  148. package/dist/components/tarot-catalog.js +1 -203
  149. package/dist/components/tarot-spread.js +1 -203
  150. package/dist/components/transit-wheel.js +8 -210
  151. package/dist/components/transits-table.js +1 -203
  152. package/dist/components/upagraha-table.js +1 -203
  153. package/dist/components/vastu-mandala.js +6 -208
  154. package/dist/components/vedic-aspects.js +1 -203
  155. package/dist/components/vedic-daily.js +1 -203
  156. package/dist/components/vedic-kundli.js +15 -217
  157. package/dist/components/vedic-planets-table.js +1 -203
  158. package/dist/components/western-planets-table.js +1 -203
  159. package/dist/components/yoga-list.js +1 -203
  160. package/dist/components/zodiac-card.js +1 -203
  161. package/dist/forms.json +1 -1
  162. package/dist/index.cjs +49 -251
  163. package/dist/index.js +50 -252
  164. package/dist/locales/de.js +1 -1
  165. package/dist/schemas/post--astrology-lilith.json +1 -1
  166. package/dist/schemas/post--astrology-progressions.json +1 -1
  167. package/dist/schemas/post--kabbalah-birth-profile.json +1 -1
  168. package/dist/schemas/post--numerology-chart.json +1 -1
  169. package/dist/schemas/post--vedic-astrology-daily.json +1 -1
  170. package/dist/schemas/post--vedic-astrology-dasha-current.json +1 -1
  171. package/dist/schemas/post--vedic-astrology-dasha-major.json +1 -1
  172. package/dist/schemas/post--vedic-astrology-dasha-sub-mahadasha-antardasha-pratyantardasha-sookshma.json +1 -1
  173. package/dist/schemas/post--vedic-astrology-dasha-sub-mahadasha-antardasha-pratyantardasha.json +1 -1
  174. package/dist/schemas/post--vedic-astrology-dasha-sub-mahadasha-antardasha.json +1 -1
  175. package/dist/schemas/post--vedic-astrology-dasha-sub-mahadasha.json +1 -1
  176. package/dist/schemas/post--vedic-astrology-kp-chart.json +1 -1
  177. package/dist/schemas/post--vedic-astrology-kp-cusps.json +1 -1
  178. package/dist/schemas/post--vedic-astrology-kp-daily-finance.json +1 -1
  179. package/dist/schemas/post--vedic-astrology-kp-horary.json +1 -1
  180. package/dist/schemas/post--vedic-astrology-kp-planets.json +1 -1
  181. package/dist/schemas/post--vedic-astrology-kp-ruling-planets-interval.json +1 -1
  182. package/dist/schemas/post--vedic-astrology-kp-ruling-planets.json +1 -1
  183. package/dist/schemas/post--vedic-astrology-transit.json +1 -1
  184. package/dist/styles/palettes.d.ts +4 -0
  185. package/dist/styles/themes/celeste.css +1 -115
  186. package/dist/styles/themes/eucalyptus.css +1 -121
  187. package/dist/styles/themes/kiln.css +1 -121
  188. package/dist/styles/themes/moonlit.css +1 -121
  189. package/dist/styles/themes/practitioner.css +1 -170
  190. package/dist/styles/tokens-css.d.ts +1 -1
  191. package/dist/styles/tokens.css +1 -202
  192. package/dist/types/types.gen.d.ts +48 -36
  193. package/dist/utils/string.d.ts +2 -0
  194. package/dist/version.d.ts +1 -1
  195. package/package.json +1 -1
@@ -1,208 +1,6 @@
1
- var RoxyUI_endpoint_form=(()=>{var J=Object.defineProperty;var We=Object.getOwnPropertyDescriptor;var ur=Object.getOwnPropertyNames;var pr=Object.prototype.hasOwnProperty;var hr=(i,t)=>{for(var e in t)J(i,e,{get:t[e],enumerable:!0})},mr=(i,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of ur(t))!pr.call(i,n)&&n!==e&&J(i,n,{get:()=>t[n],enumerable:!(r=We(t,n))||r.enumerable});return i};var fr=i=>mr(J({},"__esModule",{value:!0}),i),y=(i,t,e,r)=>{for(var n=r>1?void 0:r?We(t,e):t,o=i.length-1,s;o>=0;o--)(s=i[o])&&(n=(r?s(t,e,n):s(n))||n);return r&&n&&J(t,e,n),n};var ti={};hr(ti,{ROXY_UI_TOKENS_STYLE_ID:()=>ce,RoxyEndpointForm:()=>g,injectRoxyTokens:()=>ue,resetSpecCache:()=>Jr});var Q=globalThis,X=Q.ShadowRoot&&(Q.ShadyCSS===void 0||Q.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ae=Symbol(),Je=new WeakMap,j=class{constructor(t,e,r){if(this._$cssResult$=!0,r!==Ae)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(X&&t===void 0){let r=e!==void 0&&e.length===1;r&&(t=Je.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&Je.set(e,t))}return t}toString(){return this.cssText}},Qe=i=>new j(typeof i=="string"?i:i+"",void 0,Ae),w=(i,...t)=>{let e=i.length===1?i[0]:t.reduce((r,n,o)=>r+(s=>{if(s._$cssResult$===!0)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.")})(n)+i[o+1],i[0]);return new j(e,i,Ae)},Xe=(i,t)=>{if(X)i.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let r=document.createElement("style"),n=Q.litNonce;n!==void 0&&r.setAttribute("nonce",n),r.textContent=e.cssText,i.appendChild(r)}},Se=X?i=>i:i=>i instanceof CSSStyleSheet?(t=>{let e="";for(let r of t.cssRules)e+=r.cssText;return Qe(e)})(i):i;var{is:gr,defineProperty:yr,getOwnPropertyDescriptor:xr,getOwnPropertyNames:br,getOwnPropertySymbols:vr,getPrototypeOf:kr}=Object,ee=globalThis,et=ee.trustedTypes,$r=et?et.emptyScript:"",wr=ee.reactiveElementPolyfillSupport,K=(i,t)=>i,B={toAttribute(i,t){switch(t){case Boolean:i=i?$r:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,t){let e=i;switch(t){case Boolean:e=i!==null;break;case Number:e=i===null?null:Number(i);break;case Object:case Array:try{e=JSON.parse(i)}catch{e=null}}return e}},te=(i,t)=>!gr(i,t),tt={attribute:!0,type:String,converter:B,reflect:!1,useDefault:!1,hasChanged:te};Symbol.metadata??=Symbol("metadata"),ee.litPropertyMetadata??=new WeakMap;var L=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=tt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let r=Symbol(),n=this.getPropertyDescriptor(t,r,e);n!==void 0&&yr(this.prototype,t,n)}}static getPropertyDescriptor(t,e,r){let{get:n,set:o}=xr(this.prototype,t)??{get(){return this[e]},set(s){this[e]=s}};return{get:n,set(s){let a=n?.call(this);o?.call(this,s),this.requestUpdate(t,a,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??tt}static _$Ei(){if(this.hasOwnProperty(K("elementProperties")))return;let t=kr(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(K("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(K("properties"))){let e=this.properties,r=[...br(e),...vr(e)];for(let n of r)this.createProperty(n,e[n])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[r,n]of e)this.elementProperties.set(r,n)}this._$Eh=new Map;for(let[e,r]of this.elementProperties){let n=this._$Eu(e,r);n!==void 0&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let r=new Set(t.flat(1/0).reverse());for(let n of r)e.unshift(Se(n))}else t!==void 0&&e.push(Se(t));return e}static _$Eu(t,e){let r=e.attribute;return r===!1?void 0:typeof r=="string"?r:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let r of e.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Xe(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,r){this._$AK(t,r)}_$ET(t,e){let r=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,r);if(n!==void 0&&r.reflect===!0){let o=(r.converter?.toAttribute!==void 0?r.converter:B).toAttribute(e,r.type);this._$Em=t,o==null?this.removeAttribute(n):this.setAttribute(n,o),this._$Em=null}}_$AK(t,e){let r=this.constructor,n=r._$Eh.get(t);if(n!==void 0&&this._$Em!==n){let o=r.getPropertyOptions(n),s=typeof o.converter=="function"?{fromAttribute:o.converter}:o.converter?.fromAttribute!==void 0?o.converter:B;this._$Em=n;let a=s.fromAttribute(e,o.type);this[n]=a??this._$Ej?.get(n)??a,this._$Em=null}}requestUpdate(t,e,r,n=!1,o){if(t!==void 0){let s=this.constructor;if(n===!1&&(o=this[t]),r??=s.getPropertyOptions(t),!((r.hasChanged??te)(o,e)||r.useDefault&&r.reflect&&o===this._$Ej?.get(t)&&!this.hasAttribute(s._$Eu(t,r))))return;this.C(t,e,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:r,reflect:n,wrapped:o},s){r&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,s??e??this[t]),o!==!0||s!==void 0)||(this._$AL.has(t)||(this.hasUpdated||r||(e=void 0),this._$AL.set(t,e)),n===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[n,o]of this._$Ep)this[n]=o;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[n,o]of r){let{wrapped:s}=o,a=this[n];s!==!0||this._$AL.has(n)||a===void 0||this.C(n,void 0,o,a)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(e)):this._$EM()}catch(r){throw t=!1,this._$EM(),r}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};L.elementStyles=[],L.shadowRootOptions={mode:"open"},L[K("elementProperties")]=new Map,L[K("finalized")]=new Map,wr?.({ReactiveElement:L}),(ee.reactiveElementVersions??=[]).push("2.1.2");var Re=globalThis,rt=i=>i,re=Re.trustedTypes,it=re?re.createPolicy("lit-html",{createHTML:i=>i}):void 0,Le="$lit$",E=`lit$${Math.random().toFixed(9).slice(2)}$`,Ee="?"+E,Ar=`<${Ee}>`,F=document,Y=()=>F.createComment(""),V=i=>i===null||typeof i!="object"&&typeof i!="function",Te=Array.isArray,dt=i=>Te(i)||typeof i?.[Symbol.iterator]=="function",_e=`[
2
- \f\r]`,G=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,nt=/-->/g,ot=/>/g,D=RegExp(`>|${_e}(?:([^\\s"'>=/]+)(${_e}*=${_e}*(?:[^
3
- \f\r"'\`<>=]|("|')|))|$)`,"g"),st=/'/g,at=/"/g,ct=/^(?:script|style|textarea|title)$/i,Ce=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),m=Ce(1),ai=Ce(2),li=Ce(3),A=Symbol.for("lit-noChange"),h=Symbol.for("lit-nothing"),lt=new WeakMap,P=F.createTreeWalker(F,129);function ut(i,t){if(!Te(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return it!==void 0?it.createHTML(t):t}var pt=(i,t)=>{let e=i.length-1,r=[],n,o=t===2?"<svg>":t===3?"<math>":"",s=G;for(let a=0;a<e;a++){let c=i[a],p,d,u=-1,l=0;for(;l<c.length&&(s.lastIndex=l,d=s.exec(c),d!==null);)l=s.lastIndex,s===G?d[1]==="!--"?s=nt:d[1]!==void 0?s=ot:d[2]!==void 0?(ct.test(d[2])&&(n=RegExp("</"+d[2],"g")),s=D):d[3]!==void 0&&(s=D):s===D?d[0]===">"?(s=n??G,u=-1):d[1]===void 0?u=-2:(u=s.lastIndex-d[2].length,p=d[1],s=d[3]===void 0?D:d[3]==='"'?at:st):s===at||s===st?s=D:s===nt||s===ot?s=G:(s=D,n=void 0);let f=s===D&&i[a+1].startsWith("/>")?" ":"";o+=s===G?c+Ar:u>=0?(r.push(p),c.slice(0,u)+Le+c.slice(u)+E+f):c+E+(u===-2?a:f)}return[ut(i,o+(i[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},Z=class i{constructor({strings:t,_$litType$:e},r){let n;this.parts=[];let o=0,s=0,a=t.length-1,c=this.parts,[p,d]=pt(t,e);if(this.el=i.createElement(p,r),P.currentNode=this.el.content,e===2||e===3){let u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}for(;(n=P.nextNode())!==null&&c.length<a;){if(n.nodeType===1){if(n.hasAttributes())for(let u of n.getAttributeNames())if(u.endsWith(Le)){let l=d[s++],f=n.getAttribute(u).split(E),b=/([.?@])?(.*)/.exec(l);c.push({type:1,index:o,name:b[2],strings:f,ctor:b[1]==="."?ne:b[1]==="?"?oe:b[1]==="@"?se:N}),n.removeAttribute(u)}else u.startsWith(E)&&(c.push({type:6,index:o}),n.removeAttribute(u));if(ct.test(n.tagName)){let u=n.textContent.split(E),l=u.length-1;if(l>0){n.textContent=re?re.emptyScript:"";for(let f=0;f<l;f++)n.append(u[f],Y()),P.nextNode(),c.push({type:2,index:++o});n.append(u[l],Y())}}}else if(n.nodeType===8)if(n.data===Ee)c.push({type:2,index:o});else{let u=-1;for(;(u=n.data.indexOf(E,u+1))!==-1;)c.push({type:7,index:o}),u+=E.length-1}o++}}static createElement(t,e){let r=F.createElement("template");return r.innerHTML=t,r}};function I(i,t,e=i,r){if(t===A)return t;let n=r!==void 0?e._$Co?.[r]:e._$Cl,o=V(t)?void 0:t._$litDirective$;return n?.constructor!==o&&(n?._$AO?.(!1),o===void 0?n=void 0:(n=new o(i),n._$AT(i,e,r)),r!==void 0?(e._$Co??=[])[r]=n:e._$Cl=n),n!==void 0&&(t=I(i,n._$AS(i,t.values),n,r)),t}var ie=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:r}=this._$AD,n=(t?.creationScope??F).importNode(e,!0);P.currentNode=n;let o=P.nextNode(),s=0,a=0,c=r[0];for(;c!==void 0;){if(s===c.index){let p;c.type===2?p=new z(o,o.nextSibling,this,t):c.type===1?p=new c.ctor(o,c.name,c.strings,this,t):c.type===6&&(p=new ae(o,this,t)),this._$AV.push(p),c=r[++a]}s!==c?.index&&(o=P.nextNode(),s++)}return P.currentNode=F,n}p(t){let e=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++}},z=class i{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,r,n){this.type=2,this._$AH=h,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=I(this,t,e),V(t)?t===h||t==null||t===""?(this._$AH!==h&&this._$AR(),this._$AH=h):t!==this._$AH&&t!==A&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):dt(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!==h&&V(this._$AH)?this._$AA.nextSibling.data=t:this.T(F.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:r}=t,n=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=Z.createElement(ut(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(e);else{let o=new ie(n,this),s=o.u(this.options);o.p(e),this.T(s),this._$AH=o}}_$AC(t){let e=lt.get(t.strings);return e===void 0&&lt.set(t.strings,e=new Z(t)),e}k(t){Te(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,r,n=0;for(let o of t)n===e.length?e.push(r=new i(this.O(Y()),this.O(Y()),this,this.options)):r=e[n],r._$AI(o),n++;n<e.length&&(this._$AR(r&&r._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let r=rt(t).nextSibling;rt(t).remove(),t=r}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},N=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,n,o){this.type=1,this._$AH=h,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=o,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=h}_$AI(t,e=this,r,n){let o=this.strings,s=!1;if(o===void 0)t=I(this,t,e,0),s=!V(t)||t!==this._$AH&&t!==A,s&&(this._$AH=t);else{let a=t,c,p;for(t=o[0],c=0;c<o.length-1;c++)p=I(this,a[r+c],e,c),p===A&&(p=this._$AH[c]),s||=!V(p)||p!==this._$AH[c],p===h?t=h:t!==h&&(t+=(p??"")+o[c+1]),this._$AH[c]=p}s&&!n&&this.j(t)}j(t){t===h?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},ne=class extends N{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===h?void 0:t}},oe=class extends N{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==h)}},se=class extends N{constructor(t,e,r,n,o){super(t,e,r,n,o),this.type=5}_$AI(t,e=this){if((t=I(this,t,e,0)??h)===A)return;let r=this._$AH,n=t===h&&r!==h||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,o=t!==h&&(r===h||n);n&&this.element.removeEventListener(this.name,this,r),o&&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)}},ae=class{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){I(this,t)}},ht={M:Le,P:E,A:Ee,C:1,L:pt,R:ie,D:dt,V:I,I:z,H:N,N:oe,U:se,B:ne,F:ae},Sr=Re.litHtmlPolyfillSupport;Sr?.(Z,z),(Re.litHtmlVersions??=[]).push("3.3.3");var mt=(i,t,e)=>{let r=e?.renderBefore??t,n=r._$litPart$;if(n===void 0){let o=e?.renderBefore??null;r._$litPart$=n=new z(t.insertBefore(Y(),o),o,void 0,e??{})}return n._$AI(i),n};var Oe=globalThis,C=class extends L{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=mt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return A}};C._$litElement$=!0,C.finalized=!0,Oe.litElementHydrateSupport?.({LitElement:C});var _r=Oe.litElementPolyfillSupport;_r?.({LitElement:C});(Oe.litElementVersions??=[]).push("4.2.2");var Rr={attribute:!0,type:String,converter:B,reflect:!1,hasChanged:te},Lr=(i=Rr,t,e)=>{let{kind:r,metadata:n}=e,o=globalThis.litPropertyMetadata.get(n);if(o===void 0&&globalThis.litPropertyMetadata.set(n,o=new Map),r==="setter"&&((i=Object.create(i)).wrapped=!0),o.set(e.name,i),r==="accessor"){let{name:s}=e;return{set(a){let c=t.get.call(this);t.set.call(this,a),this.requestUpdate(s,c,i,!0,a)},init(a){return a!==void 0&&this.C(s,void 0,i,a),a}}}if(r==="setter"){let{name:s}=e;return function(a){let c=this[s];t.call(this,a),this.requestUpdate(s,c,i,!0,a)}}throw Error("Unsupported decorator location: "+r)};function $(i){return(t,e)=>typeof e=="object"?Lr(i,t,e):((r,n,o)=>{let s=n.hasOwnProperty(o);return n.constructor.createProperty(o,r),s?Object.getOwnPropertyDescriptor(n,o):void 0})(i,t,e)}function _(i){return $({...i,state:!0,attribute:!1})}var v=i=>i??h;var q={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},ft=i=>(...t)=>({_$litDirective$:i,values:t}),de=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,r){this._$Ct=t,this._$AM=e,this._$Ci=r}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var{I:en}=ht;var gt=i=>i.strings===void 0;var Er={},yt=(i,t=Er)=>i._$AH=t;var xt=ft(class extends de{constructor(i){if(super(i),i.type!==q.PROPERTY&&i.type!==q.ATTRIBUTE&&i.type!==q.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!gt(i))throw Error("`live` bindings can only contain a single expression")}render(i){return i}update(i,[t]){if(t===A||t===h)return t;let e=i.element,r=i.name;if(i.type===q.PROPERTY){if(t===e[r])return A}else if(i.type===q.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(r))return A}else if(i.type===q.ATTRIBUTE&&e.getAttribute(r)===t+"")return A;return yt(i),t}});var T={afterSunset:"Born after sunset",allowDuplicates:"Allow duplicate cards",allowReversals:"Allow reversed cards",angelDating:"How the name of the day is dated",annualFromYear:"Annual pillars from year",annualYears:"Years of annual pillars",approximateDate:"Approximate date",aspectTypes:"Aspect types",atbashOutput:"AtBash and Albam output",avasthaInfo:"Include avastha details",avoidAnimal:"Avoid clashes with",ayadiText:"Ayadi text family",ayanamsaValue:"Custom ayanamsa value",birthData:"Birth details",birthDate:"Birth date",birthLatitude:"Birth latitude",birthLongitude:"Birth longitude",birthTime:"Birth time",ciphers:"Ciphers to return",context:"Where you saw it",coordinateSystem:"Coordinate system",correlation:"Correlation constant",count:"How many",currentYear:"Current year",cuts:"Cut corners",dasha:"Dasha lords",datetime:"Date and time",dayBoundary:"Day boundary",depth:"Depth, north to south",directionScheme:"Direction reading",division:"Divisional chart",domainWeights:"Domain weights",door:"Door coordinates",doorPosition:"Door position along the side",doshaClock:"How the dosha periods are cut",endDate:"End date",endDatetime:"End date and time",expression:"Expression number",extensions:"Extended corners",facing:"Facing direction",facingDegrees:"Facing degrees",family:"Yoga family",firstName:"First name",firstNameHebrew:"First name in Hebrew",fullName:"Full name",gainHouses:"Gain houses",grid:"Mandala grid",hastaInches:"Length of one hasta in inches",horaryNumber:"Horary number",hourClock:"Hour clock",houseSystem:"House system",id:"ID",include:"Additional bodies",includeMatches:"Include equal value matches",interpretation:"Position meaning",intervalMinutes:"Interval in minutes",isLeapMonth:"Leap month",iso2:"Country code",kua:"Kua number",lang:"Language",latinCiphers:"Also score the Latin ciphers",leapDayPolicy:"Where 29 February falls",letter:"Starting letter",letterAttribution:"Letter attribution reading",lifePath:"Life Path number",limit:"Results per page",lines:"Line pattern",lossHouses:"Loss houses",lunarDay:"Lunar day",lunarMonth:"Lunar month",lunarYear:"Lunar year",members:"Group members",minSignificance:"Minimum significance",minStrength:"Minimum strength",misparGadol:"Mispar gadol method",modernPlanets:"Include modern planets",moonWindows:"Moon windows",muhurtaText:"Muhurta text",nameHebrew:"Name in Hebrew",natalChart:"Natal chart",nodeType:"Lunar node type",offset:"Results to skip",polygon:"Outline",positions:"Spread positions",q:"Search",question:"Your question",relocationLatitude:"Relocation latitude",relocationLongitude:"Relocation longitude",returnDate:"Return date",returnYear:"Return year",ritucharyaScheme:"Season division",rituZodiac:"Zodiac the season boundaries are measured in",road:"Road side",rulingPlanets:"Ruling planets",scheme:"Karaka scheme",secondName:"Second name",secondNameHebrew:"Second name in Hebrew",sephirotSystem:"Sephirot reading",sign:"Zodiac sign",sign1:"First animal sign",sign2:"Second animal sign",signDoshaScheme:"Sign humour table",significators:"Include KP significators",slopeLowDirection:"Direction the ground falls toward",slopeSchool:"Ground level school",soulUrge:"Soul Urge number",spreadName:"Spread name",startDate:"Start date",startDatetime:"Start date and time",strictOrbs:"Use tighter orbs",system:"Avastha system",targetDate:"Target date",targetMonth:"Target month",text:"Word or name",textHebrew:"Hebrew word or name",top:"Top events per window",transitDate:"Transit date",transitTime:"Transit time",transliteration:"Transliteration scheme",treeVariant:"Tree arrangement",type:"Pattern type",vyayaFormula:"Vyaya formula",water:"Standing water direction",weights:"Layer weights",width:"Width, east to west",x:"Distance east",y:"Distance north",yearBearerSystem:"Year Bearer school",yearBoundary:"Year boundary",yearStart:"Wheel year start",zodiac:"Zodiac sign"};var bt=["de","en","es","fr","hi","pt","ru","tr","zh-Hans","zh-Hant"];function Pe(i){if(i.lang)return i.lang;if(typeof document>"u")return;let t=i.closest?.("[lang]")?.getAttribute("lang");return t||document.documentElement.lang||void 0}function vt(i){return!i||i.toLowerCase().split("-")[0]==="en"}var Tr={tw:"hant",hk:"hant",mo:"hant",cn:"hans",sg:"hans",my:"hans"};function De(i){let t=i.toLowerCase();return bt.find(e=>e.toLowerCase()===t)}function kt(i){let t=Pe(i);if(!t)return;let e=De(t);if(e)return e;let r=t.toLowerCase().split("-"),n=r[0];if(n==="zh"){let o=r.find(s=>s==="hans"||s==="hant")??Tr[r[1]??""];return o?De(`zh-${o}`):void 0}return De(n)}var $t=`/**
4
- * Roxy UI design tokens: every colour, size, space, radius, font and duration a component reads.
5
- *
6
- * Two tiers. BASES are the few values a host tunes: fonts, base text size and its scale ratio, the
7
- * space unit, the base radius, motion, and the colour bases (bg, fg, accent and the four status
8
- * colours). Every other token DERIVES from them with calc() or color-mix(), so dark mode reassigns
9
- * the colour bases only and one font token restyles every heading. A host may still set any
10
- * derived token directly, and its value wins.
11
- *
12
- * Delivery: a global light-DOM stylesheet (linked, or injected by the CDN bundle). Custom properties
13
- * inherit through the shadow boundary, so a token set on any light-DOM ancestor reaches every
14
- * component. The :host selectors apply only if this sheet is adopted into a shadow root.
15
- *
16
- * Light is the default. Dark applies under prefers-color-scheme: dark, or [data-theme="dark"] or
17
- * .dark on the element or any ancestor; [data-theme="light"] or .light opts back into light. An
18
- * explicit choice wins over the OS because those blocks come later in source order.
19
- *
20
- * A derivation is computed where it is declared, so the derived block also matches every theme
21
- * trigger: a base reassigned on :root or on an element carrying data-theme, .light or .dark
22
- * re-derives everything below it.
23
- *
24
- * Font: --roxy-font-sans is unset by default, so every component inherits the host page font; any
25
- * value set by the host or a preset replaces it, and --roxy-font-display follows it until set.
26
- *
27
- * Motion: --roxy-motion-duration defaults to 200ms and prefers-reduced-motion forces 0ms.
28
- */
29
-
30
- /*
31
- * Two mechanisms keep the host page in charge of every token, and both are load bearing.
32
- *
33
- * Every rule sits in the roxy.tokens cascade layer, and an unlayered declaration beats a layered
34
- * one at ANY specificity, so a plain \`:root { --roxy-accent: #8b5cf6 }\` on the host page wins, and
35
- * so does the same line inside a layer of its own, because this statement registers ours first
36
- * and the CDN bundle injects this sheet at the top of <head>. A host that links this file after its
37
- * own CSS orders the layers itself: \`@layer roxy, base, components, utilities;\` before either sheet.
38
- *
39
- * Every selector is ALSO wrapped in :where(), which has ZERO specificity, so a host declaration
40
- * still wins wherever a layer cannot decide it, under every dark signal alike.
41
- *
42
- * The theme presets in styles/themes/*.css write into roxy.theme; both files declare this order,
43
- * so either one loading alone still ranks a preset above these defaults.
44
- */
45
- @layer roxy.tokens, roxy.theme;
46
-
47
- @layer roxy.tokens {
48
- /* Bases, light. Also the mode-specific derivations: accent ink and status inks mix toward black. */
49
- :where(:root, :host) {
50
- /* A real inherited property: native controls, popups and scrollbars follow it. */
51
- color-scheme: light;
52
-
53
- --roxy-bg: #ffffff;
54
- --roxy-fg: #0a0a0a;
55
- --roxy-accent: #4a6297;
56
- --roxy-success: #16a34a;
57
- --roxy-warning: #ea580c;
58
- --roxy-danger: #dc2626;
59
- --roxy-info: #0284c7;
60
-
61
- /* Accent and status inks: 70 percent toward black reads at AA on the card and on a tint of the base. */
62
- --roxy-accent-ink: color-mix(in oklab, var(--roxy-accent) 70%, black);
63
- --roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, black);
64
- --roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, black);
65
- --roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, black);
66
- --roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, black);
67
-
68
- /* Unset on purpose: a component inherits the host page font until a host or preset sets one. */
69
- --roxy-font-sans: initial;
70
- --roxy-font-mono:
71
- ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas,
72
- "Liberation Mono", monospace;
73
-
74
- --roxy-text-base: 1rem;
75
- --roxy-text-scale: 1.15;
76
- --roxy-weight-normal: 400;
77
- --roxy-weight-bold: 600;
78
- --roxy-leading-tight: 1.25;
79
- --roxy-leading-normal: 1.5;
80
- --roxy-tracking-tight: -0.01em;
81
- --roxy-tracking-normal: 0em;
82
-
83
- --roxy-space-unit: 0.25rem;
84
- --roxy-radius: 6px;
85
-
86
- --roxy-motion-duration: 200ms;
87
- --roxy-motion-easing: cubic-bezier(0.4, 0, 0.2, 1);
88
- }
89
-
90
- /* Derived roles, identical in every mode, restated on every theme trigger so they follow its bases. */
91
- :where(:root, :host, [data-theme], .light, .dark) {
92
- /* Flat: the card is the page colour, separated by a hairline. */
93
- --roxy-surface: var(--roxy-bg);
94
- --roxy-primary: var(--roxy-fg);
95
- --roxy-secondary: color-mix(in oklab, var(--roxy-fg) 78%, var(--roxy-bg));
96
- --roxy-muted: color-mix(in oklab, var(--roxy-fg) 60%, var(--roxy-bg));
97
- --roxy-border: color-mix(in oklab, var(--roxy-fg) 14%, var(--roxy-bg));
98
- --roxy-ring: color-mix(in srgb, var(--roxy-accent) 40%, transparent);
99
- --roxy-heat: var(--roxy-danger);
100
-
101
- --roxy-font-display: var(--roxy-font-sans);
102
-
103
- --roxy-text-sm: calc(var(--roxy-text-base) / var(--roxy-text-scale));
104
- --roxy-text-xs: calc(var(--roxy-text-sm) / var(--roxy-text-scale));
105
- --roxy-text-lg: calc(var(--roxy-text-base) * var(--roxy-text-scale));
106
- --roxy-text-xl: calc(
107
- var(--roxy-text-lg) *
108
- var(--roxy-text-scale) *
109
- var(--roxy-text-scale)
110
- );
111
-
112
- --roxy-space-xs: var(--roxy-space-unit);
113
- --roxy-space-sm: calc(var(--roxy-space-unit) * 2);
114
- --roxy-space-md: calc(var(--roxy-space-unit) * 4);
115
- --roxy-space-lg: calc(var(--roxy-space-unit) * 6);
116
- --roxy-space-xl: calc(var(--roxy-space-unit) * 10);
117
- --roxy-line-thick: calc(var(--roxy-space-unit) / 2);
118
- --roxy-touch: calc(var(--roxy-space-unit) * 11);
119
-
120
- --roxy-radius-sm: calc(var(--roxy-radius) / 2);
121
- --roxy-radius-md: var(--roxy-radius);
122
- --roxy-radius-lg: calc(var(--roxy-radius) * 5 / 3);
123
- --roxy-radius-full: 9999px;
124
-
125
- /* Flat surfaces cast nothing; only a floating layer (a popup, an enlarged chart) lifts. */
126
- --roxy-shadow-sm: none;
127
- --roxy-shadow-md: 0 4px 12px color-mix(in srgb, black 10%, transparent);
128
- --roxy-shadow-lg: 0 12px 32px color-mix(in srgb, black 18%, transparent);
129
- }
130
-
131
- /* Bases, dark, by system preference. Inks mix toward white so they read on a dark card. */
132
- @media (prefers-color-scheme: dark) {
133
- :where(:root, :host) {
134
- color-scheme: dark;
135
- --roxy-bg: #0a0a0a;
136
- --roxy-fg: #fafafa;
137
- --roxy-accent: #92aade;
138
- --roxy-success: #22c55e;
139
- --roxy-warning: #fb923c;
140
- --roxy-danger: #ef4444;
141
- --roxy-info: #38bdf8;
142
-
143
- --roxy-accent-ink: var(--roxy-accent);
144
- --roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, white);
145
- --roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, white);
146
- --roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, white);
147
- --roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, white);
148
- }
149
- }
150
-
151
- /* Explicit light: beats the OS dark block when the host chooses light. */
152
- :where(
153
- :root[data-theme="light"],
154
- [data-theme="light"],
155
- :root.light,
156
- .light,
157
- :host([data-theme="light"])
158
- ) {
159
- color-scheme: light;
160
- --roxy-bg: #ffffff;
161
- --roxy-fg: #0a0a0a;
162
- --roxy-accent: #4a6297;
163
- --roxy-success: #16a34a;
164
- --roxy-warning: #ea580c;
165
- --roxy-danger: #dc2626;
166
- --roxy-info: #0284c7;
167
-
168
- --roxy-accent-ink: color-mix(in oklab, var(--roxy-accent) 70%, black);
169
- --roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, black);
170
- --roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, black);
171
- --roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, black);
172
- --roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, black);
173
- }
174
-
175
- /* Explicit dark: a .dark class or data-theme="dark" on any ancestor themes every component below it. */
176
- :where(
177
- :root[data-theme="dark"],
178
- [data-theme="dark"],
179
- :root.dark,
180
- .dark,
181
- :host([data-theme="dark"])
182
- ) {
183
- color-scheme: dark;
184
- --roxy-bg: #0a0a0a;
185
- --roxy-fg: #fafafa;
186
- --roxy-accent: #92aade;
187
- --roxy-success: #22c55e;
188
- --roxy-warning: #fb923c;
189
- --roxy-danger: #ef4444;
190
- --roxy-info: #38bdf8;
191
-
192
- --roxy-accent-ink: var(--roxy-accent);
193
- --roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, white);
194
- --roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, white);
195
- --roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, white);
196
- --roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, white);
197
- }
198
-
199
- @media (prefers-reduced-motion: reduce) {
200
- :where(:root, :host) {
201
- --roxy-motion-duration: 0ms;
202
- }
203
- }
204
- }
205
- `;var ce="roxy-ui-tokens";function ue(){if(typeof document>"u")return null;let i=document.getElementById(ce);if(i)return i;let t=document.createElement("style");return t.id=ce,t.textContent=$t,document.head.prepend(t),t}function pe(i){return i.toLowerCase().replace(/[\s_-]+/g," ").trim()}function R(i){return i.replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([a-z])([0-9])/g,"$1 $2").replace(/^\w/,t=>t.toUpperCase())}var wt="__ROXY_UI_I18N__";function Fe(){let i=globalThis,t=i[wt];if(t)return t;let e={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return i[wt]=e,e}function Ie(i,t){return t?i.replace(/\{\{(\w+)\}\}/g,(e,r)=>r in t?String(t[r]??""):e):i}function At(i,t,e){return Ie(Ne(i,t)??t,e)}function Ne(i,t){if(!i)return;let{catalogs:e}=Fe(),r=i.toLowerCase();return(e[r]??e[r.split("-")[0]])?.[pe(t)]}function St(i){if(!i)return;let{fieldLabels:t}=Fe(),e=i.toLowerCase();return t[e]??t[e.split("-")[0]]}function H(i,t){return St(i)?.fields[t]}function _t(i,t,e){return St(i)?.enums[`${t}.${e}`]}function Rt(i){let{listeners:t}=Fe();return t.add(i),()=>{t.delete(i)}}var he=class{constructor(t){this.host=t,t.addController(this)}hostConnected(){this.unsubscribe=Rt(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var me=class extends C{constructor(){super();this.translator=(e,r)=>this.t(e,r);new he(this)}connectedCallback(){super.connectedCallback(),ue()}t(e,r){return At(this.effectiveLang(),e,r)}effectiveLang(){return Pe(this)}};var Cr=(i,t)=>t?i[pe(t)]:void 0;var Or={aries:"♈",taurus:"♉",gemini:"♊",cancer:"♋",leo:"♌",virgo:"♍",libra:"♎",scorpio:"♏",sagittarius:"♐",capricorn:"♑",aquarius:"♒",pisces:"♓"},Lt=i=>Cr(Or,i);var Et=["Aries","Taurus","Gemini","Cancer","Leo","Virgo","Libra","Scorpio","Sagittarius","Capricorn","Aquarius","Pisces"];var Tt=w`:where([part~=card]){background:var(--roxy-surface);color:var(--roxy-fg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-lg);box-shadow:var(--roxy-shadow-sm)}:where([part~=card] [part~=card],[part~=card] [part~=reading],[part~=card] .roxy-card){border:0;border-block-start:1px solid var(--roxy-border);box-shadow:none;background:0 0;border-radius:0;padding-inline:0}:host([bare]) [part~=card]{box-shadow:none;background:0 0;border:0;border-radius:0;padding:0}:where(h1,h2){color:var(--roxy-fg);font-size:var(--roxy-text-lg);font-weight:var(--roxy-weight-bold);line-height:var(--roxy-leading-tight);letter-spacing:var(--roxy-tracking-tight);text-wrap:balance}:where(h3,h4,h5,h6){color:var(--roxy-fg);font-size:var(--roxy-text-base);font-weight:var(--roxy-weight-bold);line-height:var(--roxy-leading-tight);letter-spacing:var(--roxy-tracking-normal);text-transform:none}:where(.roxy-label,th,dt){color:var(--roxy-muted);font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-normal);letter-spacing:var(--roxy-tracking-normal);text-transform:none}:where(.roxy-chips){gap:var(--roxy-space-xs);flex-wrap:wrap;margin:0;padding:0;list-style:none;display:flex}:where(.roxy-chip,.roxy-chips>li){align-items:center;gap:var(--roxy-space-xs);padding:calc(var(--roxy-space-unit) / 2) var(--roxy-space-sm);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-sm);color:var(--roxy-secondary);font-size:var(--roxy-text-xs);line-height:var(--roxy-leading-tight);overflow-wrap:anywhere;background:0 0;max-inline-size:100%;display:inline-flex}:where(.roxy-chip[data-tone=success],.roxy-chips>li[data-tone=success]){color:var(--roxy-success-fg)}:where(.roxy-chip[data-tone=warning],.roxy-chips>li[data-tone=warning]){color:var(--roxy-warning-fg)}:where(.roxy-chip[data-tone=danger],.roxy-chips>li[data-tone=danger]){color:var(--roxy-danger-fg)}:where(.roxy-chip[data-tone=info],.roxy-chips>li[data-tone=info]){color:var(--roxy-info-fg)}:where(table){border-collapse:collapse;font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums}:where(th,td){padding:var(--roxy-space-xs) var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);text-align:start;vertical-align:top}:where(summary){cursor:pointer}:where(a,button,summary,input,select,textarea,[tabindex]):focus-visible{outline:var(--roxy-line-thick) solid var(--roxy-ring);outline-offset:var(--roxy-line-thick)}:where(summary:focus-visible){border-radius:var(--roxy-radius-sm)}:where(input,select,textarea,button){font:inherit}:where(input:not([type=checkbox],[type=radio],[type=range]),select,textarea){padding:var(--roxy-space-xs) var(--roxy-space-sm);background:var(--roxy-bg);color:var(--roxy-fg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md)}`;var Dr=w`:host{--roxy-label-col:minmax(0, 25%);--_mask:var(--roxy-surface);font-family:var(--roxy-font-sans);color:var(--roxy-fg);font-size:var(--roxy-text-base);line-height:var(--roxy-leading-normal);animation:roxy-fade-in var(--roxy-motion-duration) var(--roxy-motion-easing) both;background:0 0;display:block;container-type:inline-size}:host([bare]){--_mask:var(--roxy-bg)}:host([hidden]){display:none}:host([bare]){--roxy-surface:transparent;--roxy-shadow-sm:none;--roxy-shadow-md:none}*,:before,:after{box-sizing:border-box}h1,h2,h3,h4{font-family:var(--roxy-font-display)}@keyframes roxy-fade-in{0%{transform:translateY(calc(var(--roxy-space-unit) / 2))}to{transform:translateY(0)}}@media (prefers-reduced-motion:reduce){:host{animation:none}}.roxy-skeleton{background:linear-gradient(90deg, var(--roxy-border) 0%, color-mix(in srgb, var(--roxy-border) 60%, transparent) 50%, var(--roxy-border) 100%);border-radius:var(--roxy-radius-md);background-size:200% 100%;animation:1.4s ease-in-out infinite roxy-shimmer}@keyframes roxy-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media (prefers-reduced-motion:reduce){.roxy-skeleton{animation:none}}.roxy-sr-only{clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:0;padding:0;position:absolute;overflow:hidden}.roxy-empty{padding:var(--roxy-space-lg);color:var(--roxy-muted);text-align:center;font-size:var(--roxy-text-sm)}.roxy-error{gap:var(--roxy-space-sm);padding:var(--roxy-space-lg);background:var(--roxy-surface);border:1px solid var(--roxy-danger);border-radius:var(--roxy-radius-md);color:var(--roxy-danger-fg);font-size:var(--roxy-text-sm);justify-items:start;display:grid}:host(:focus-within) .roxy-card{outline:var(--roxy-line-thick) solid var(--roxy-ring);outline-offset:var(--roxy-line-thick)}.roxy-attribution{margin-top:var(--roxy-space-sm);font-size:var(--roxy-text-xs);color:var(--roxy-muted);text-align:right}.roxy-attribution a{color:inherit;text-decoration:none}.roxy-attribution a:hover{color:var(--roxy-accent-ink);text-decoration:underline}.roxy-edit-bar{margin-bottom:var(--roxy-space-sm);justify-content:flex-end;display:flex}.roxy-edit{padding:var(--roxy-space-xs) var(--roxy-space-md);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);color:var(--roxy-fg);font-family:inherit;font-size:var(--roxy-text-sm);cursor:pointer;background:0 0}.roxy-edit:hover{border-color:var(--roxy-accent);color:var(--roxy-accent-ink)}.roxy-edit:disabled{cursor:progress;color:var(--roxy-muted)}roxy-endpoint-form+*{margin-top:var(--roxy-space-md)}.roxy-more{justify-items:center;gap:var(--roxy-space-sm);margin-top:var(--roxy-space-md);display:grid}.roxy-more .roxy-edit{min-height:var(--roxy-touch)}:host{font-variant-emoji:text}`,Ct=[Dr,Tt];var Ot=i=>t=>{customElements.get(i)||customElements.define(i,t)};function qe(){return m`<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 Dt=w`summary{list-style:none}summary::-webkit-details-marker{display:none}.roxy-chevron{aspect-ratio:auto;width:.7lh;height:.7lh;color:var(--roxy-muted);transition:transform var(--roxy-motion-duration) var(--roxy-motion-easing);flex-shrink:0}details[open]>summary .roxy-chevron{transform:rotate(180deg)}@media (prefers-reduced-motion:reduce){.roxy-chevron{transition:none}}`;var Pr="pk_live_YOUR_KEY",Pt={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(i){if(i)return i===Pr?Pt.sample:i.startsWith("pk_")?void 0:Pt.secret}function Me(i,t,e={}){e.warn&&console.warn(t.message),i.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:t.reason,message:t.message},bubbles:!0,composed:!0}))}var Fr="https://roxyapi.com/api/v2";async function Ir(i){try{let t=await i.json();if(t?.error){let e=t.code==="validation_error"&&Array.isArray(t.issues)?t.issues.filter(r=>typeof r.path=="string"&&typeof r.message=="string").map(r=>({path:r.path,message:r.message})):null;return{message:t.error,issues:e?.length?e:null,worded:!0}}}catch{}return{message:`Request failed (${i.status})`,issues:null,worded:!1}}var fe=class extends Error{constructor(e,r=null,n=!0){super(e);this.issues=r;this.worded=n}};function Ft(i){return i.submitUrl?void 0:W(i.publishableKey)}function Ue(i){return!!(i.submitUrl||i.publishableKey&&!Ft(i))}async function ze(i,t,e){let r=Ft(i);if(r)throw new fe(r.message);let n=i.submitUrl?await fetch(i.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:Nr(t,i.submitContext),signal:e}):await qr(i,t,e);if(!n.ok){let o=await Ir(n);throw new fe(o.message,o.issues,o.worded)}return await n.json()}function Nr(i,t){return JSON.stringify(t?{...i,context:t}:i)}function qr(i,t,e){let r=new URL(`${i.baseUrl??Fr}${t.path}`,document.baseURI);for(let[o,s]of Object.entries(t.query??{}))s!=null&&r.searchParams.set(o,String(s));let n={Accept:"application/json"};return i.publishableKey&&(n["X-API-Key"]=i.publishableKey),t.body!=null&&(n["Content-Type"]="application/json"),fetch(r,{method:t.method??"GET",headers:n,body:t.body!=null?JSON.stringify(t.body):void 0,signal:e})}var It={"GET /angel-numbers/numbers/{number}":{number:{path:"/angel-numbers/numbers",limit:50,lang:!0}},"GET /astrology/planet-meanings/{id}":{id:{path:"/astrology/planet-meanings",lang:!0}},"GET /astrology/signs/{id}":{id:{path:"/astrology/signs",lang:!0}},"GET /crystals":{color:{path:"/crystals/colors",lang:!0},planet:{path:"/crystals/planets",lang:!0}},"GET /crystals/{id}":{id:{path:"/crystals",limit:100,lang:!0}},"GET /dreams/symbols":{letter:{path:"/dreams/symbols/letters"}},"GET /dreams/symbols/{id}":{id:{path:"/dreams/symbols",search:"q",limit:50}},"GET /iching/trigrams/{id}":{id:{path:"/iching/trigrams",lang:!0}},"GET /tarot/cards/{id}":{id:{path:"/tarot/cards",limit:100,lang:!0}}},Nt={"GET /tarot/cards":{suit:{field:"arcana",value:"major"}}};var S=(i,t)=>`${i}.${t}`;function ye(i){let t=/^(.+)\.(\d+)$/.exec(i);return t?{key:t[1],index:Number(t[2])}:null}function xe(i,t=Ie,e=r=>T[r]??R(r)){let r=ye(i);return r?t("{{group}} {{n}}",{group:e(r.key),n:r.index+1}):t(R(i))}function Mt(i,t){let e=t.key??t.name;if(zt(e))return H(i,e);if(!t.label)return H(i,t.name);let r=Object.keys(T).find(n=>T[n]===t.label);return Ne(i,t.label)??(r?H(i,r):void 0)}function Ut(i,t,e){let r=S(t,0);return i.filter(n=>n.group===r).map(n=>({...n,key:`${S(t,e)}.${n.name}`,group:S(t,e)}))}function Ke(i){return i.length<=(be(i)?30:12)?"tiles":"select"}function be(i){return i.every(t=>t.length<=2)}var Mr=["latitude","longitude","timezone"],qt=["latitude","longitude"];function zt(i){let t=i.match(/^(.+?)(Latitude|Longitude)$/);return t?{group:t[1],leaf:t[2].toLowerCase()}:null}var Ur=Et.map(i=>i.toLowerCase());function M(i,t){if(i){if("$ref"in i&&i.$ref){let e=i.$ref.split("/").pop();return e?t[e]:void 0}return i}}function Ht(i){let t=i.anyOf??i.oneOf;return!t||t.length===0?i:t.find(e=>Array.isArray(e.enum))??t.find(e=>je(e)&&je(e)!=="null")??t[0]??i}function je(i){if(typeof i.type=="string")return i.type;if(!Array.isArray(i.type))return;let t=i.type.filter(e=>e!=="null");return t.length===1?t[0]:void 0}function zr(i){let t=Ht(i),e=je(t);return Array.isArray(t.enum)?Ke(t.enum):e==="boolean"?"toggle":t.format==="date"?"date":t.format==="time"?"time":t.format==="date-time"?"datetime":e==="integer"||e==="number"?"number":e==="string"?"text":e==="array"?"array":null}function jt(i){if(i.length!==12)return!1;let t=new Set(i.map(e=>e.toLowerCase()));return Ur.every(e=>t.has(e))}function ge(i,t,e){let r=Ht(t);return{key:e.key,name:i,group:e.group,inQuery:e.inQuery,kind:zr(t)??"text",required:e.required,description:r.description??t.description,enum:r.enum,min:r.minimum??r.exclusiveMinimum,max:r.maximum??r.exclusiveMaximum,default:t.default??r.default,example:t.example??r.example}}function He(i){return new Set([...i.required??[],...i["x-required-any-of"]?.[0]??[]])}function Kt(i,t,e,r=i.requestBody?"POST":"GET"){let n=[],o=[],s=!1,a=i.requestBody?.content?.["application/json"]?.schema,c=M(a,t),p=c?.["x-required-any-of"];if(c?.properties){let d=He(c);for(let[u,l]of Object.entries(c.properties)){let f=M(l,t)??{},b=f.type==="array"?M(f.items,t):void 0;if(b?.type==="object"&&b.properties){let k=Math.max(1,f.minItems??1),x=He(b);o.push({key:u,min:k,max:f.maxItems??k});for(let U=0;U<k;U++)for(let[O,dr]of Object.entries(b.properties)){let cr=M(dr,t)??{};n.push(ge(O,cr,{key:`${S(u,U)}.${O}`,group:S(u,U),required:d.has(u)&&x.has(O)}))}}else if(f.type==="object"&&f.properties){let k=He(f);for(let[x,U]of Object.entries(f.properties)){let O=M(U,t)??{};O.type==="array"&&M(O.items,t)?.type==="object"||n.push(ge(x,O,{key:`${u}.${x}`,group:u,required:d.has(u)&&k.has(x)}))}}else{let k=zt(u),x=ge(k?.leaf??u,f,{key:u,group:k?.group,required:d.has(u)});k&&(x.label=`${R(k.group)} ${k.leaf}`),n.push(x)}}}for(let d of i.parameters??[]){if(d.in!=="path"&&d.in!=="query")continue;if(d.name==="lang"&&d.in==="query"){s=!0;continue}let u=M(d.schema,t)??{},l=ge(d.name,u,{key:d.name,required:!!d.required,inQuery:d.in==="query"});if(d.in==="path"&&l.enum&&/^(id|identifier|slug)$/i.test(T[l.name]??R(l.name))){let f=/^([A-Za-z][A-Za-z -]*?)\s+(?:id|identifier|slug)\b/i.exec(d.description??l.description??"")?.[1]?.trim();f&&(l.label=f)}n.push(l)}for(let d of n)!d.group&&!d.label&&n.some(u=>u.group&&u.name===d.name)&&(d.label=Hr(d));return Be({title:jr(i.summary,e),fields:n,hasLang:s,...o.length>0?{repeats:o}:{},...p?{requiredAnyOf:p}:{}},r,e)}function Hr(i){let e=(T[i.name]??R(i.name)).toLowerCase().replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r=new RegExp(`^(\\p{L}+) ${e}\\b`,"iu").exec(i.description??"")?.[1];return r?T[r.toLowerCase()+i.name.replace(/^./,n=>n.toUpperCase())]:void 0}function Be(i,t,e){let r=`${t.toUpperCase()} /${e.replace(/^\//,"")}`,n=It[r]??{},o=Nt[r]??{},s=i.fields.map(l=>{let f={...l};return delete f.role,delete f.city,delete f.viewerZone,delete f.moment,delete f.fold,{...f,...n[l.key]&&{source:n[l.key]},...o[l.key]&&{disabledWhen:o[l.key]}}}),a=[...new Set(s.map(l=>l.group))].map(l=>l===void 0?{}:{key:l,label:xe(l)}),c=a.filter(l=>qt.every(f=>s.some(b=>b.group===l.key&&b.name===f)));for(let[l,f]of c.entries()){let b=s.filter(x=>x.group===f.key),k=b.find(x=>x.name==="timezone")??(l===0?s.find(x=>!x.group&&x.name==="timezone"):void 0);f.location={fields:[...b.filter(x=>qt.includes(x.name)).map(x=>x.key),...k?[k.key]:[]],required:b.some(x=>Mr.includes(x.name)&&x.required)}}for(let l of s)l.name==="seed"?l.role="seed":(l.name==="limit"||l.name==="offset")&&!l.required?l.role="hidden-default":c.some(f=>f.location?.fields.includes(l.key))?l.role="location":l.name==="timezone"&&(l.city=!0,!l.group&&!l.required&&(l.viewerZone=!0));let p=a.filter(l=>l.key!==void 0&&(l.location||s.some(f=>f.group===l.key&&f.required))),d=s.some(l=>!l.group&&!l.role&&l.required)||p.length>0||c.some(l=>l.key===void 0);for(let l of a)l.key!==void 0&&d&&!p.includes(l)&&(l.fold=!0);let u=l=>p.length>0&&l.default===void 0&&(l.kind==="date"||l.kind==="time"||l.kind==="datetime");for(let l of s)l.group?a.find(f=>f.key===l.group)?.fold&&(l.fold=!0):!l.role&&d&&!l.required?u(l)?l.moment=!0:l.fold=!0:!l.role&&!d&&l.default!==void 0&&(l.fold=!0);return{...i,fields:s,groups:a,opensOnLoad:Kr(i,t)}}function Bt(i,t){let e=i.filter(r=>r.moment);return e.some(r=>r.kind==="time"||r.kind==="datetime")&&e.every(r=>t[r.key]===void 0||t[r.key]==="")}function jr(i,t){let e=i?.split(" - ")[0]?.trim();return e||R(t.split("/").pop()??"")}function Kr(i,t){return t.toUpperCase()==="GET"&&!i.fields.some(e=>e.required)}function Gt(i,t=[]){if(t.some(r=>r.name==="limit"||r.name==="offset"))return"Search";let e=i.toLowerCase();return/compat|synastry|guna|connection|penta|composite/.test(e)?"Compare":/\bcast\b|\/draw|iching|hexagram|tarot/.test(e)?"Cast":/horoscope|dream|angel|nakshatra|crystal|meaning|reference/.test(e)?"Get reading":"Generate"}function Yt(i,t){let e=`https://cdn.jsdelivr.net/npm/@roxyapi/ui@${i}/dist/schemas`;if(!t)return e;let r=new URL(t),n=/^(.*)\/cdn\/(?:roxy-ui|components\/[\w-]+)\.js$/.exec(r.pathname)?.[1];return r.hostname==="cdn.jsdelivr.net"||n===void 0?e:`${r.origin}${n}/schemas`}function Vt(i,t){let e=t.replace(/^\//,"").replace(/[{}]/g,"").replace(/\//g,"-");return`${i.toLowerCase()}--${e}.json`}function Br(i){if(Array.isArray(i))return i;if(!i||typeof i!="object")return null;let t=Object.values(i),e=t.find(Array.isArray);return e||(t.find(n=>!!n&&typeof n=="object"&&Object.values(n).every(o=>typeof o=="number"))??null)}function Ge(i,t="id"){let e=Br(i);if(!e)return[];if(!Array.isArray(e)){let n=Object.keys(e),o=n.length>0&&n.every(a=>/^[a-z]$/.test(a));return(o?[..."abcdefghijklmnopqrstuvwxyz"]:n).map(a=>({value:a,label:o?a.toUpperCase():a,disabled:!e[a]}))}let r=[];for(let n of e){if(typeof n=="string"){r.push({value:n,label:n});continue}if(!n||typeof n!="object")continue;let o=n,s=o.id??o[t]??o.number;if(s==null)continue;let a=String(s),c=o.name??o.english;r.push({value:a,label:typeof c=="string"?c:a})}return r}function Zt(i){let t=i?.total;return typeof t=="number"?t:void 0}var Wt=new Map;function Gr(i){if(!i)return["en"];let t=Wt.get(i);if(t)return[t,"en"];let e="en";try{e=Intl.getCanonicalLocales(i)[0]??"en"}catch{e="en"}return Wt.set(i,e),[e,"en"]}function Jt(){try{return new Intl.DateTimeFormat(Gr(void 0)).resolvedOptions().timeZone}catch{return}}function Qt(i,t,e){return H(i,t)??e??R(t)}function Xt(i,t,e,r){return _t(i,t,e)??r??R(e)}var er=w`.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 tr(i,t){let e,r=((...n)=>{e&&clearTimeout(e),e=setTimeout(()=>{e=void 0,i(...n)},t)});return r.cancel=()=>{e&&(clearTimeout(e),e=void 0)},r}var Yr=10,Vr=10,Ye=new Map;function rr(i,t,e={}){return{...i.limit?{limit:i.limit}:{},...i.lang&&t?{lang:t}:{},...e}}function Ze(i,t,e,r){let n=JSON.stringify([i.submitUrl??i.baseUrl,t.path,e,r]),o=Ye.get(n);return o||(o=Zr(i,t,e,r).catch(s=>{throw Ye.delete(n),s}),Ye.set(n,o)),o}async function Zr(i,t,e,r){let n=[];for(let o=0;o<Vr;o++){let s=await ze(i,{path:t.path,method:"GET",query:rr(t,r,n.length?{offset:n.length}:{})}),a=Ge(s,e);n.push(...a);let c=Zt(s);if(!t.limit||c===void 0||n.length>=c||!a.length)break}return n}var Ve=i=>i.normalize("NFD").replace(new RegExp("\\p{M}","gu"),"").toLowerCase(),ve=class{constructor(t,e,r,n,o){this.host=t;this.source=e;this.field=r;this.context=n;this.onPick=o;this.query="";this.options=[];this.open=!1;this.highlight=-1;this.loading=!1;this.error=null;this.search=tr(t=>{this.searchServer(t)},250);t.addController(this)}hostDisconnected(){this.search.cancel(),this.abort?.abort()}input(t){this.query=t,this.error=null,this.source.search?t.trim().length<2?this.close():this.search(t):this.filter(t),this.host.requestUpdate()}focus(){!this.source.search&&!this.open&&this.filter(this.query)}close(){this.open=!1,this.highlight=-1,this.host.requestUpdate()}pick(t){this.query=t.label,this.close(),this.onPick(t)}keydown(t){let e=this.options.length;if(t.key==="Escape"){this.close();return}if(t.key==="ArrowDown"&&!this.open){t.preventDefault(),this.input(this.query);return}if(!(!this.open||e===0)){if(t.key==="ArrowDown")this.highlight=(this.highlight+1)%e;else if(t.key==="ArrowUp")this.highlight=(this.highlight-1+e)%e;else if(t.key==="Home")this.highlight=0;else if(t.key==="End")this.highlight=e-1;else if(t.key==="Enter"){let r=this.options[this.highlight]??this.options[0];r&&this.pick(r)}else return;t.preventDefault(),this.host.requestUpdate()}}async filter(t){let{route:e,lang:r}=this.context();this.loading=!0,this.host.requestUpdate();try{let n=await Ze(e,this.source,this.field,r);if(t!==this.query)return;let o=Ve(t.trim());this.show(n.filter(s=>Ve(s.label).includes(o)||Ve(s.value).includes(o)))}catch(n){this.fail(n)}finally{this.loading=!1,this.host.requestUpdate()}}async searchServer(t){let{route:e,lang:r}=this.context(),n=this.source.search;this.abort?.abort();let o=new AbortController;this.abort=o,this.loading=!0,this.host.requestUpdate();try{let s=await ze(e,{path:this.source.path,method:"GET",query:rr({...this.source,limit:Yr},r,{[n]:t})},o.signal);if(o.signal.aborted)return;this.show(Ge(s,this.field))}catch(s){if(o.signal.aborted)return;this.fail(s)}finally{this.abort===o&&(this.abort=void 0),o.signal.aborted||(this.loading=!1,this.host.requestUpdate())}}show(t){this.options=t,this.open=!0,this.highlight=t.length?0:-1}fail(t){this.options=[],this.open=!1,this.error=t instanceof Error?t.message:String(t)}};function ir(i,t,e,r={}){let n=`${t}-listbox`;return m`<div class="picker"><input id="${t}" type="text" role="combobox" aria-expanded="${i.open?"true":"false"}" aria-controls="${n}" aria-autocomplete="list" aria-labelledby="${v(r.labelledby)}" aria-describedby="${v(r.describedby)}" aria-invalid="${v(r.invalid?"true":void 0)}" aria-activedescendant="${i.open&&i.highlight>=0?`${t}-opt-${i.highlight}`:""}" autocomplete="off" placeholder="${e.placeholder}" .value="${i.query}" @input="${o=>i.input(o.target.value)}" @keydown="${o=>i.keydown(o)}" @focus="${()=>i.focus()}" @blur="${()=>i.close()}"> ${i.loading?m`<span class="spinner" role="status" aria-label="${e.loading}"></span>`:h} ${i.open?m`<ul id="${n}" class="results" role="listbox">${i.options.length===0?m`<li class="empty" role="status">${e.empty}</li>`:i.options.map((o,s)=>m`<li id="${`${t}-opt-${s}`}" class="option" role="option" aria-selected="${i.highlight===s?"true":"false"}" @mousedown="${a=>a.preventDefault()}" @click="${()=>i.pick(o)}">${o.label}</li>`)}</ul>`:h}</div>${i.error?m`<small class="field-error" role="alert">${i.error}</small>`:h}`}var nr=[er,w`.picker{position:relative}`];var or="1.1.1";var sr="https://roxyapi.com/api/v2/openapi.json",Wr=Yt(or,globalThis.document?.currentScript?.src||void 0),ke=new Map,$e=class extends Error{constructor(e){super(`HTTP ${e}`);this.status=e}},we=class extends Error{constructor(e,r){super(`Endpoint ${e} ${r} not found in OpenAPI spec`);this.method=e;this.path=r}};function Jr(){ke.clear()}async function Qr(i){let t=ke.get(i);return t||(t=fetch(i).then(async e=>{if(!e.ok)throw new $e(e.status);return await e.json()}).catch(e=>{throw ke.delete(i),e}),ke.set(i,t)),t}function Xr(){return globalThis.crypto?.randomUUID?.()??Math.random().toString(36).slice(2)}var ar=i=>/\bbirth/i.test(i?.description??""),lr=i=>i.key===`${i.group}.${i.name}`;function ei(i){let t=i.trim();if(!t)return[];try{let e=JSON.parse(t);if(Array.isArray(e))return e}catch{}return t.split(",").map(e=>e.trim()).filter(Boolean)}var g=class extends me{constructor(){super(...arguments);this.endpoint="vedic-astrology/birth-chart";this.method="POST";this.specUrl="";this.submitLabel="";this.serverIssues=null;this.autoload=!1;this.fullPages=!1;this.choices={};this.pickers=new Map;this.clearedIssues=new Set;this.fields=[];this.groups=[];this.modelOpensOnLoad=!1;this.repeats=[];this.formTitle="";this.hasLang=!1;this.values={};this.loaded=!1;this.specError=null;this.validationErrors=[];this.retryLoadSchema=()=>{this.loaded=!1,this.specError=null,this.loadSchema()};this.onSubmit=e=>{e.preventDefault(),this.submit()}}connectedCallback(){super.connectedCallback(),this.loadSchema()}async loadSchema(){this.specError=null;try{this.applyModel(await this.resolveModel())}catch(e){this.specError=this.specErrorMessage(e),this.loaded=!0,this.dispatchEvent(new CustomEvent("roxy-spec-error",{detail:{url:this.specUrl||sr,message:e instanceof Error?e.message:String(e)},bubbles:!0,composed:!0}))}}specErrorMessage(e){return e instanceof $e?this.t("HTTP error {{status}}",{status:e.status}):e instanceof we?this.t("Endpoint {{method}} {{path}} not found in OpenAPI spec",{method:e.method,path:e.path}):e instanceof Error?e.message:String(e)}async resolveModel(){return this.specUrl?this.modelFromSpec(this.specUrl):await this.tryLoadSlice()??this.modelFromSpec(sr)}async modelFromSpec(e){let r=await Qr(e),n=`/${this.endpoint.replace(/^\//,"")}`,o=r.paths?.[n]?.[this.method.toLowerCase()];if(!o)throw new we(this.method,n);return Kt(o,r.components?.schemas??{},this.endpoint,this.method)}async tryLoadSlice(){try{let e=await fetch(`${Wr}/${Vt(this.method,this.endpoint)}`);return e.ok?await e.json():null}catch{return null}}applyModel(e){(!e.groups||e.opensOnLoad===void 0)&&(e=Be(e,this.method,this.endpoint)),this.fields=e.fields,this.groups=e.groups??[],this.modelOpensOnLoad=e.opensOnLoad??!1,this.repeats=e.repeats??[],this.formTitle=e.title,this.hasLang=e.hasLang;let r={};for(let n of e.fields){let o=n.viewerZone?void 0:this.fullPages&&n.name==="limit"&&this.roleOf(n)==="hidden-default"?n.max??n.default:n.default;o!==void 0&&(r[n.key]=o);let s=n.group&&lr(n)?this.initialValues?.[n.group]?.[n.name]:this.initialValues?.[n.key];s!==void 0&&(r[n.key]=s)}this.values=this.withoutDisabled(r),this.loaded=!0,this.loadChoices(),this.autoload&&this.opensOnLoad&&Ue(this.route)&&this.updateComplete.then(()=>this.submit())}get route(){return this.apiRoute??{publishableKey:this.publishableKey}}loadChoices(){for(let r of this.pickers.values())this.removeController(r);if(this.pickers.clear(),!Ue(this.route))return;let e=()=>({route:this.route,lang:this.requestLang()});for(let r of this.fields)if(r.source){if(r.required){let n=new ve(this,r.source,r.name,e,o=>this.pickChoice(r,o.value));n.query=String(this.values[r.key]??""),this.pickers.set(r.key,n);continue}this.choices={...this.choices,[r.key]:"loading"},Ze(this.route,r.source,r.name,this.requestLang()).then(n=>{this.choices={...this.choices,[r.key]:n}},()=>{let{[r.key]:n,...o}=this.choices;this.choices=o})}}setValue(e,r){this.setValues({[e]:r})}setValues(e){this.values=this.withoutDisabled({...this.values,...e});let r=Object.keys(e).filter(n=>this.serverIssues?.some(o=>o.path===n));r.length&&(this.clearedIssues=new Set([...this.clearedIssues,...r]))}isDisabled(e,r=this.values){let n=e.disabledWhen;return!!n&&r[n.field]===n.value}withoutDisabled(e){for(let r of this.fields)this.isDisabled(r,e)&&(e[r.key]=void 0);return e}willUpdate(e){e.has("serverIssues")&&(this.clearedIssues=new Set);let r=e.has("publishableKey")?W(this.publishableKey):void 0;r&&Me(this,r,{warn:!0})}liveIssues(){return(this.serverIssues??[]).filter(e=>!this.clearedIssues.has(e.path))}issueFor(e){return this.liveIssues().find(r=>r.path===e.key)}cityIssues(e){return this.liveIssues().filter(r=>{let n=this.fields.find(o=>o.key===r.path);return!!n&&this.roleOf(n)==="location"&&this.cityGroup(n)===e})}issuesForGroup(e){return this.liveIssues().filter(r=>r.path===e)}fieldLabel(e){return this.roleOf(e)==="location"||e.city?this.locationLabel(this.cityGroup(e)):e.group?`${this.groupName(e.group)} ${this.fieldText(e)}`:this.fieldText(e)}issueLines(e){return e.map(r=>m`<small part="field-error" class="field-error" role="alert">${r.message}</small>`)}fieldIssue(e){let r=this.issueFor(e);return r?m`<small part="field-error" class="field-error" id="${`roxy-form-${e.key}-error`}" role="alert">${r.message}</small>`:h}renderIssueSummary(){let e=this.liveIssues();if(e.length===0)return h;let r=n=>{let o=this.fields.find(a=>a.key===n);if(o)return this.fieldLabel(o);let s=this.groupKeys().find(a=>a===n);return s?this.groupName(s):this.fieldText({name:n.split(".")[0]??n})};return m`<div part="validation-error" class="validation-error" role="alert">${e.map(n=>m`<div><strong>${r(n.path)}</strong> ${n.message}</div>`)}</div>`}roleOf(e){return e.role??"normal"}isRendered(e){return this.roleOf(e)==="normal"}groupKeys(){return this.groups.map(e=>e.key)}groupHasLocation(e){return!!this.groups.find(r=>r.key===e)?.location}cityGroup(e){return this.groups.find(r=>r.location?.fields.includes(e.key))?.key??e.group}placeField(e){let r=this.fields.filter(n=>n.group===e);return r.find(n=>n.name==="latitude")??r.find(n=>n.name==="timezone")}locationRequired(e){return this.groups.find(r=>r.key===e)?.location?.required??!1}get soleChoice(){if(this.groupKeys().some(n=>this.groupHasLocation(n))||this.groupKeys().some(n=>n!==void 0))return null;let e=this.fields.filter(n=>n.required&&this.isRendered(n)),r=e[0];return e.length!==1||!r?null:r.kind==="tiles"||r.kind==="select"||this.pickers.has(r.key)?r:null}get opensOnLoad(){return this.modelOpensOnLoad}isFilter(e){return this.opensOnLoad&&!e.required&&!!(e.enum||e.source)}get selfSubmits(){if(this.soleChoice)return!0;if(!this.opensOnLoad)return!1;let e=this.fields.filter(r=>this.isRendered(r));return e.length>0&&e.every(r=>this.isFilter(r))}choiceKind(e){let r=this.choicesOf(e).map(n=>n.value);return this.isFilter(e)&&!be(r)?"select":this.choices[e.key]?Ke(r):e.kind}choicesOf(e){let r=this.choices[e.key];return Array.isArray(r)?r:(e.enum??[]).map(n=>({value:n,label:this.optionText(e.name,n)}))}effectiveSubmitLabel(){return this.submitLabel?this.submitLabel:Bt(this.fields,this.values)?this.t("Show right now"):this.t(Gt(this.endpoint,this.fields))}requestLang(){return kt(this)}fieldText(e){let r=this.requestLang();return e.label?Mt(r,e)??e.label:Qt(r,e.name,T[e.name])}optionText(e,r){return Xt(this.requestLang(),e,r)}onLocationFor(e){return r=>{let n=this.groups.find(s=>s.key===e)?.location?.fields??[],o={};for(let s of n){let a=this.fields.find(c=>c.key===s)?.name;a&&(o[s]=r[a])}this.setValues(o)}}chooseOption(e,r){if(this.isFilter(e)){this.setFilter(e,this.values[e.key]===r?"":r),this.submit();return}this.pickChoice(e,r)}pickChoice(e,r){this.setValue(e.key,r),this.resend()}resend(){let e=this.soleChoice;e&&this.values[e.key]&&this.submit()}setFilter(e,r){let n={[e.key]:r};for(let o of this.fields)o!==e&&(this.isFilter(o)||this.opensOnLoad&&o.kind==="text"&&this.isRendered(o))&&(n[o.key]=void 0);this.setValues(n)}onTilesKeyDown(e){return r=>{let n=this.choicesOf(e).filter(d=>!d.disabled).map(d=>d.value);if(n.length===0)return;let o=n.indexOf(this.values[e.key]),s;if(r.key==="Home")s=0;else if(r.key==="End")s=n.length-1;else if(r.key==="ArrowRight"||r.key==="ArrowDown")s=o===-1?0:(o+1)%n.length;else if(r.key==="ArrowLeft"||r.key==="ArrowUp")s=o===-1?n.length-1:(o-1+n.length)%n.length;else return;r.preventDefault();let a=n[s];if(a===void 0)return;this.chooseOption(e,a);let c=r.currentTarget,p=this.choicesOf(e).findIndex(d=>d.value===a);requestAnimationFrame(()=>c.querySelector(`[data-tile='${p}']`)?.focus())}}submit(){let e=this.collectMissing();if(e.keys.length>0){this.validationErrors=e.labels,this.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{missing:e.keys},bubbles:!0,composed:!0}));return}this.validationErrors=[],this.clearedIssues=new Set((this.serverIssues??[]).map(s=>s.path));let r={};for(let s of this.fields){let a=this.values[s.key];if(s.name==="seed"&&(a===void 0||a==="")&&(a=Xr()),s.viewerZone&&(a===void 0||a==="")&&(a=Jt()??s.default),a===void 0||a==="")continue;s.kind==="array"&&typeof a=="string"&&(a=ei(a));let c=s.group?ye(s.group):null;if(c){let p=r[c.key]??[],d=p[c.index]??{};d[s.name]=a,p[c.index]=d,r[c.key]=p}else if(s.group&&lr(s)){let p=r[s.group]??{};p[s.name]=a,r[s.group]=p}else r[s.key]=a}let n=this.fields.filter(s=>s.inQuery).map(s=>s.name),o=this.requestLang();this.hasLang&&o&&(r.lang=o,n.push("lang")),this.dispatchEvent(new CustomEvent("roxy-submit",{detail:{endpoint:this.endpoint,values:r,queryKeys:n,sticky:this.soleChoice!=null||this.opensOnLoad},bubbles:!0,composed:!0}))}collectMissing(){let e=[],r=[],n=new Set;for(let o of this.fields){if(!o.required)continue;let s=this.roleOf(o)==="location";if(!this.isRendered(o)&&!s)continue;let a=this.values[o.key];if(!(a!==void 0&&a!=="")){if(e.push(o.key),s){n.add(this.cityGroup(o));continue}r.push(this.fieldLabel(o))}}for(let o of n)r.push(this.locationLabel(o));return{keys:e,labels:r}}get readsEnglish(){return vt(this.effectiveLang())}renderTitle(){return this.readsEnglish?m`<h2 part="title" class="title" id="roxy-form-title">${this.formTitle}</h2>`:h}reqMark(e){return e.required?m`<span class="req" aria-hidden="true">*</span>`:h}description(e){if(!e.description||!this.readsEnglish)return h;if(e.description.length<=120)return m`<small part="hint" class="help">${e.description}</small>`;let r=e.description.split(". ")[0]??e.description;return m`<details part="hint" class="help-details"><summary><span class="help-lead">${r}</span>${qe()}</summary><small class="help help-full">${e.description}</small></details>`}renderTiles(e){let r=`roxy-form-${e.key}-label`,n=!!e.enum&&jt(e.enum),o=this.choicesOf(e),s=be(o.map(p=>p.value)),a=o.findIndex(p=>p.value===this.values[e.key]),c=a===-1?o.findIndex(p=>!p.disabled):a;return m`<div class="field tiles-field"><span class="label" id="${r}">${this.fieldText(e)}${this.reqMark(e)}</span><div class="${s?"tiles narrow":"tiles"}" role="radiogroup" aria-labelledby="${r}" @keydown="${this.onTilesKeyDown(e)}">${o.map((p,d)=>{let u=this.values[e.key]===p.value,l=n?Lt(p.value):void 0;return m`<button type="button" class="tile" role="radio" data-tile="${d}" aria-checked="${u?"true":"false"}" tabindex="${d===c?"0":"-1"}" ?disabled="${!!p.disabled||this.isDisabled(e)}" @click="${()=>this.chooseOption(e,p.value)}">${l?m`<span class="tile-glyph" aria-hidden="true">${l}</span>`:h} <span class="tile-label">${p.label}</span></button>`})}</div>${this.description(e)} ${this.fieldIssue(e)}</div>`}renderSelect(e){let r=`roxy-form-${e.key}`;return m`<div part="field" class="field"><label for="${r}">${this.fieldText(e)}${this.reqMark(e)}</label> <select id="${r}" ?required="${e.required}" ?disabled="${this.isDisabled(e)}" aria-invalid="${v(this.issueFor(e)?"true":void 0)}" aria-describedby="${v(this.issueFor(e)?`${r}-error`:void 0)}" .value="${xt(this.values[e.key]??"")}" @change="${n=>this.chooseOption(e,n.target.value)}"><option value="">${this.t("Choose")}</option>${this.choicesOf(e).map(n=>m`<option value="${n.value}" ?selected="${this.values[e.key]===n.value}" ?disabled="${!!n.disabled}">${n.label}</option>`)}</select> ${this.description(e)} ${this.fieldIssue(e)}</div>`}renderPickerField(e,r){let n=`roxy-form-${e.key}`,o=this.soleChoice?.key===e.key&&this.readsEnglish,s=this.issueFor(e);return m`<div part="field" class="field">${o?h:m`<label for="${n}">${this.fieldText(e)}${this.reqMark(e)}</label>`} ${ir(r,n,{placeholder:this.t("Type to search"),empty:this.t("{{count}} matches",{count:0}),loading:this.t("Loading")},{labelledby:o?"roxy-form-title":void 0,describedby:s?`${n}-error`:void 0,invalid:!!s})} ${this.fieldIssue(e)}</div>`}renderToggle(e){let r=`roxy-form-${e.key}`,n=this.values[e.key]===!0;return m`<div part="field" class="field"><div class="toggle-row"><button type="button" id="${r}" class="toggle" role="switch" aria-checked="${n?"true":"false"}" @click="${()=>this.pickChoice(e,!n)}"><span class="knob"></span></button> <label class="toggle-label" for="${r}">${this.fieldText(e)}${this.reqMark(e)}</label></div>${this.description(e)} ${this.fieldIssue(e)}</div>`}renderInput(e){let r=`roxy-form-${e.key}`,n=e.kind==="datetime"?"datetime-local":e.kind==="number"?"number":e.kind,o=e.example!=null?String(e.example):"",s=e.kind==="array"?this.t("Comma separated"):this.readsEnglish||!new RegExp("\\p{L}","u").test(o)?o:"";return m`<div part="field" class="field"><label for="${r}">${this.fieldText(e)}${this.reqMark(e)}</label> <input id="${r}" type="${e.kind==="array"?"text":n}" ?required="${e.required}" ?disabled="${this.isDisabled(e)}" aria-invalid="${v(this.issueFor(e)?"true":void 0)}" aria-describedby="${v(this.issueFor(e)?`${r}-error`:void 0)}" min="${v(e.min)}" max="${v(e.max)}" step="${e.kind==="number"?"any":h}" placeholder="${s||h}" .value="${this.values[e.key]??""}" @input="${a=>{let c=this.coerce(e.kind,a.target.value);this.opensOnLoad&&e.kind==="text"?this.setFilter(e,c):this.setValue(e.key,c)}}" @change="${()=>this.resend()}"> ${this.description(e)} ${this.fieldIssue(e)}</div>`}renderField(e){if(e.city)return this.renderTimezoneCity(e);let r=this.pickers.get(e.key);if(r)return this.renderPickerField(e,r);let n=this.choices[e.key];return n==="loading"?m`<div class="field"><div class="roxy-skeleton field-skeleton" aria-label="${this.t("Loading")}" role="status"></div></div>`:n||e.kind==="tiles"||e.kind==="select"?this.choiceKind(e)==="tiles"?this.renderTiles(e):this.renderSelect(e):e.kind==="toggle"?this.renderToggle(e):this.renderInput(e)}groupName(e){return xe(e,(r,n)=>this.t(r,n),r=>this.fieldText({name:r}))}repeatCount(e){return new Set(this.fields.map(r=>r.group&&ye(r.group)).filter(r=>r&&r.key===e).map(r=>r.index)).size}addRecord(e){let r=this.repeatCount(e),n=Ut(this.fields,e,r),o=this.groups.find(a=>a.key===S(e,0));if(o){let a=c=>c.replace(`${S(e,0)}.`,`${S(e,r)}.`);this.groups=[...this.groups,{...o,key:S(e,r),label:xe(S(e,r)),...o.location&&{location:{...o.location,fields:o.location.fields.map(a)}}}]}let s={...this.values};for(let a of n)a.default!==void 0&&(s[a.key]=a.default);this.values=s,this.fields=[...this.fields,...n]}removeRecord(e){let r=S(e,this.repeatCount(e)-1);this.fields=this.fields.filter(o=>o.group!==r),this.groups=this.groups.filter(o=>o.key!==r);let n={...this.values};for(let o of Object.keys(n))o.startsWith(`${r}.`)&&delete n[o];this.values=n}repeatControls(e){let r=this.repeatCount(e.key);return e.max<=e.min?h:m`<div class="repeat-controls">${r<e.max?m`<button type="button" class="repeat-btn" @click="${()=>this.addRecord(e.key)}"><span aria-hidden="true">+</span> ${this.t("Add")}</button>`:h} ${r>e.min?m`<button type="button" class="repeat-btn" @click="${()=>this.removeRecord(e.key)}"><span aria-hidden="true">−</span> ${this.t("Remove")}</button>`:h}</div>`}locationLabel(e){return e?this.t("{{group}} location",{group:this.groupName(e)}):ar(this.placeField(e))?this.t("Birth location"):this.t("Location")}locationBlock(e){return m`<div class="location-block"><label>${this.locationLabel(e)}${this.locationRequired(e)?m`<span class="req" aria-hidden="true">*</span>`:h}</label> ${this.citySearch(e,this.onLocationFor(e))} ${this.issueLines(this.cityIssues(e))}</div>`}renderTimezoneCity(e){return m`<div part="field" class="field location-block"><label>${this.locationLabel(e.group)}${this.reqMark(e)}</label> ${this.citySearch(e.group,r=>this.pickChoice(e,r.timezone))} ${this.fieldIssue(e)}</div>`}citySearch(e,r){let n=e?this.t("{{group}} city",{group:this.groupName(e)}):ar(this.placeField(e))?this.t("City of birth"):void 0;return m`<roxy-location-search endpoint="${v(this.locationUrl||void 0)}" publishable-key="${v(this.publishableKey)}" .submitUrl="${this.route.submitUrl}" .submitContext="${this.route.submitContext}" lang="${v(this.effectiveLang())}" placeholder="${v(n)}" @roxy-location-select="${o=>r(o.detail)}"></roxy-location-search><small class="help">${this.t("Type a city, then pick it from the list.")}</small>`}groupCard(e){let r=this.fields.filter(n=>n.group===e&&this.isRendered(n));return m`<fieldset part="group" class="person-group"><legend>${this.groupName(e)}</legend>${this.groupHasLocation(e)?this.locationBlock(e):h}<div class="fields">${r.map(n=>this.renderField(n))}</div>${this.issueLines(this.issuesForGroup(e))}</fieldset>`}render(){if(!this.loaded)return m`<form><div class="roxy-skeleton form-skeleton"></div></form>`;if(this.specError)return m`<div class="roxy-error" role="alert">${this.t("Schema load failed: {{message}}",{message:this.specError})} <button type="button" class="submit" @click="${this.retryLoadSchema}">${this.t("Retry")}</button></div>`;let e=W(this.publishableKey);if(e)return m`<form>${this.renderTitle()}<div part="validation-error" class="validation-error" role="alert">${this.t(e.message)}</div></form>`;let r=this.fields.filter(d=>!d.group&&this.isRendered(d)),n=this.groupKeys().filter(d=>d!==void 0),o=r.filter(d=>!d.fold),s=r.filter(d=>d.fold),a=n.filter(d=>!this.groups.find(u=>u.key===d)?.fold),c=n.filter(d=>this.groups.find(u=>u.key===d)?.fold),p=s.length>0||c.length>0;return m`<form @submit="${this.onSubmit}">${this.renderTitle()} ${this.validationErrors.length>0?m`<div part="validation-error" class="validation-error" role="alert"><strong>${this.t("Please complete:")}</strong> ${this.validationErrors.join(", ")}</div>`:h} ${this.renderIssueSummary()}<div class="fields">${o.map(d=>this.renderField(d))}</div>${this.groupHasLocation(void 0)?this.locationBlock(void 0):h} ${a.map(d=>this.groupCard(d))} ${this.repeats.map(d=>this.repeatControls(d))} ${p?m`<details part="advanced" class="advanced" ?open="${this.liveIssues().some(d=>[...s.map(u=>u.key),...c].some(u=>d.path===u||d.path.startsWith(`${u}.`)))}"><summary>${this.t("Advanced")}${qe()}</summary><div class="fields">${s.map(d=>this.renderField(d))}</div>${c.map(d=>this.groupCard(d))}</details>`:h} ${this.selfSubmits?h:m`<button part="submit" class="submit" type="submit">${this.effectiveSubmitLabel()}</button>`}</form>`}coerce(e,r){if(r!==""){if(e==="number"){let n=Number(r);return Number.isFinite(n)?n:void 0}return r}}};g.styles=[Ct,Dt,nr,w`form{gap:var(--roxy-space-md);background:var(--roxy-surface);color:var(--roxy-fg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-lg);padding:var(--roxy-space-lg);box-shadow:var(--roxy-shadow-sm);grid-template-columns:minmax(0,1fr);display:grid}.title{margin:0}.fields{align-items:start;gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(22ch,1fr));display:grid}.fields:empty{display:none}.person-group{gap:var(--roxy-space-md);min-inline-size:0;padding:var(--roxy-space-md) 0 0;border:0;border-block-start:1px solid var(--roxy-border);margin:0;display:grid}.person-group legend{float:inline-start;color:var(--roxy-fg);font-weight:var(--roxy-weight-bold);padding:0}.field{gap:var(--roxy-space-xs);flex-direction:column;min-inline-size:0;display:flex}.fields>*{min-inline-size:0}.tiles-field{grid-column:1/-1}label,.label{font-size:var(--roxy-text-sm);color:var(--roxy-secondary)}.req{color:var(--roxy-danger-fg);margin-inline-start:var(--roxy-space-xs)}input,select{inline-size:100%;min-inline-size:0;min-block-size:var(--roxy-touch)}.help{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.field-error{color:var(--roxy-danger-fg);font-size:var(--roxy-text-xs)}input[aria-invalid=true],select[aria-invalid=true]{border-color:var(--roxy-danger)}input:disabled,select:disabled{cursor:default;color:var(--roxy-muted);border-style:dashed}.help-details>summary{align-items:center;gap:var(--roxy-space-xs);color:var(--roxy-muted);font-size:var(--roxy-text-xs);display:flex}.help-details .help-lead{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.help-details .help-full{margin-block-start:var(--roxy-space-xs);display:block}.location-block{gap:var(--roxy-space-xs);grid-column:1/-1;display:grid}.tiles{gap:var(--roxy-space-sm);grid-template-columns:repeat(auto-fit,minmax(10ch,1fr));display:grid}.tiles.narrow{gap:var(--roxy-space-xs);grid-template-columns:repeat(auto-fill,minmax(4ch,1fr))}.tile{justify-content:center;align-items:center;gap:calc(var(--roxy-space-unit) / 2);min-block-size:var(--roxy-touch);padding:var(--roxy-space-sm);background:var(--roxy-bg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);color:var(--roxy-fg);font-size:var(--roxy-text-sm);cursor:pointer;transition:border-color var(--roxy-motion-duration) var(--roxy-motion-easing), background-color var(--roxy-motion-duration) var(--roxy-motion-easing);flex-direction:column;display:flex}.tile:hover:not(:disabled){border-color:var(--roxy-accent)}.tile:disabled{cursor:default;color:var(--roxy-muted);border-style:dashed}.tile[aria-checked=true]{border-color:var(--roxy-accent);background:color-mix(in srgb, var(--roxy-accent) 12%, transparent);color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold)}.tile-glyph{font-size:var(--roxy-text-lg);line-height:1}.toggle-row{align-items:center;gap:var(--roxy-space-sm);display:flex}.toggle{box-sizing:content-box;block-size:.8lh;inline-size:1.6lh;padding:calc(var(--roxy-space-unit) / 2);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-full);background:var(--roxy-border);cursor:pointer;transition:background-color var(--roxy-motion-duration) var(--roxy-motion-easing);flex-shrink:0;display:inline-flex}.toggle[aria-checked=true]{background:var(--roxy-accent);border-color:var(--roxy-accent)}.toggle .knob{border-radius:var(--roxy-radius-full);background:var(--roxy-bg);block-size:.8lh;inline-size:.8lh;transition:transform var(--roxy-motion-duration) var(--roxy-motion-easing)}.toggle[aria-checked=true] .knob{transform:translate(100%)}.toggle-label{cursor:pointer}@media (prefers-reduced-motion:reduce){.tile,.toggle,.toggle .knob{transition:none}}.advanced{border-block-start:1px solid var(--roxy-border);padding-block-start:var(--roxy-space-md)}.advanced>summary{align-items:center;gap:var(--roxy-space-xs);font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold);color:var(--roxy-fg);display:flex}.advanced[open]>summary{margin-block-end:var(--roxy-space-md)}.repeat-controls{gap:var(--roxy-space-sm);display:flex}.repeat-btn{color:var(--roxy-accent-ink);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);padding:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold);cursor:pointer;background:0 0}.repeat-btn:hover{border-color:var(--roxy-accent-ink)}.advanced .fields,.advanced .person-group{margin-block-start:var(--roxy-space-md)}.validation-error{gap:var(--roxy-space-xs);border-inline-start:var(--roxy-line-thick) solid var(--roxy-danger);color:var(--roxy-danger-fg);font-size:var(--roxy-text-sm);padding-inline-start:var(--roxy-space-sm);display:grid}button.submit{min-block-size:var(--roxy-touch);background:var(--roxy-accent-ink);color:var(--roxy-bg);border-radius:var(--roxy-radius-md);padding:var(--roxy-space-sm) var(--roxy-space-lg);font-weight:var(--roxy-weight-bold);cursor:pointer;transition:transform var(--roxy-motion-duration) var(--roxy-motion-easing);border:0;justify-self:start}button.submit:hover{transform:scale(1.02)}@media (prefers-reduced-motion:reduce){button.submit{transition:none}}.field-skeleton{block-size:var(--roxy-touch)}.form-skeleton{block-size:5lh}`],y([$({type:String,attribute:"data-endpoint"})],g.prototype,"endpoint",2),y([$({type:String})],g.prototype,"method",2),y([$({type:String,attribute:"spec-url"})],g.prototype,"specUrl",2),y([$({type:String,attribute:"submit-label"})],g.prototype,"submitLabel",2),y([$({type:String,attribute:"publishable-key"})],g.prototype,"publishableKey",2),y([$({type:String,attribute:"location-url"})],g.prototype,"locationUrl",2),y([$({attribute:!1})],g.prototype,"initialValues",2),y([$({attribute:!1})],g.prototype,"serverIssues",2),y([$({attribute:!1})],g.prototype,"apiRoute",2),y([$({attribute:!1})],g.prototype,"autoload",2),y([$({attribute:!1})],g.prototype,"fullPages",2),y([_()],g.prototype,"choices",2),y([_()],g.prototype,"clearedIssues",2),y([_()],g.prototype,"fields",2),y([_()],g.prototype,"repeats",2),y([_()],g.prototype,"formTitle",2),y([_()],g.prototype,"hasLang",2),y([_()],g.prototype,"values",2),y([_()],g.prototype,"loaded",2),y([_()],g.prototype,"specError",2),y([_()],g.prototype,"validationErrors",2),g=y([Ot("roxy-endpoint-form")],g);return fr(ti);})();
1
+ var RoxyUI_endpoint_form=(()=>{var J=Object.defineProperty;var We=Object.getOwnPropertyDescriptor;var ur=Object.getOwnPropertyNames;var pr=Object.prototype.hasOwnProperty;var hr=(i,t)=>{for(var e in t)J(i,e,{get:t[e],enumerable:!0})},mr=(i,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of ur(t))!pr.call(i,n)&&n!==e&&J(i,n,{get:()=>t[n],enumerable:!(r=We(t,n))||r.enumerable});return i};var fr=i=>mr(J({},"__esModule",{value:!0}),i),y=(i,t,e,r)=>{for(var n=r>1?void 0:r?We(t,e):t,o=i.length-1,s;o>=0;o--)(s=i[o])&&(n=(r?s(t,e,n):s(n))||n);return r&&n&&J(t,e,n),n};var ti={};hr(ti,{ROXY_UI_TOKENS_STYLE_ID:()=>ce,RoxyEndpointForm:()=>g,injectRoxyTokens:()=>ue,resetSpecCache:()=>Jr});var Q=globalThis,X=Q.ShadowRoot&&(Q.ShadyCSS===void 0||Q.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ae=Symbol(),Je=new WeakMap,j=class{constructor(t,e,r){if(this._$cssResult$=!0,r!==Ae)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(X&&t===void 0){let r=e!==void 0&&e.length===1;r&&(t=Je.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&Je.set(e,t))}return t}toString(){return this.cssText}},Qe=i=>new j(typeof i=="string"?i:i+"",void 0,Ae),w=(i,...t)=>{let e=i.length===1?i[0]:t.reduce((r,n,o)=>r+(s=>{if(s._$cssResult$===!0)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.")})(n)+i[o+1],i[0]);return new j(e,i,Ae)},Xe=(i,t)=>{if(X)i.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let r=document.createElement("style"),n=Q.litNonce;n!==void 0&&r.setAttribute("nonce",n),r.textContent=e.cssText,i.appendChild(r)}},Se=X?i=>i:i=>i instanceof CSSStyleSheet?(t=>{let e="";for(let r of t.cssRules)e+=r.cssText;return Qe(e)})(i):i;var{is:gr,defineProperty:yr,getOwnPropertyDescriptor:xr,getOwnPropertyNames:br,getOwnPropertySymbols:vr,getPrototypeOf:kr}=Object,ee=globalThis,et=ee.trustedTypes,$r=et?et.emptyScript:"",wr=ee.reactiveElementPolyfillSupport,K=(i,t)=>i,G={toAttribute(i,t){switch(t){case Boolean:i=i?$r:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,t){let e=i;switch(t){case Boolean:e=i!==null;break;case Number:e=i===null?null:Number(i);break;case Object:case Array:try{e=JSON.parse(i)}catch{e=null}}return e}},te=(i,t)=>!gr(i,t),tt={attribute:!0,type:String,converter:G,reflect:!1,useDefault:!1,hasChanged:te};Symbol.metadata??=Symbol("metadata"),ee.litPropertyMetadata??=new WeakMap;var L=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=tt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let r=Symbol(),n=this.getPropertyDescriptor(t,r,e);n!==void 0&&yr(this.prototype,t,n)}}static getPropertyDescriptor(t,e,r){let{get:n,set:o}=xr(this.prototype,t)??{get(){return this[e]},set(s){this[e]=s}};return{get:n,set(s){let a=n?.call(this);o?.call(this,s),this.requestUpdate(t,a,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??tt}static _$Ei(){if(this.hasOwnProperty(K("elementProperties")))return;let t=kr(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(K("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(K("properties"))){let e=this.properties,r=[...br(e),...vr(e)];for(let n of r)this.createProperty(n,e[n])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[r,n]of e)this.elementProperties.set(r,n)}this._$Eh=new Map;for(let[e,r]of this.elementProperties){let n=this._$Eu(e,r);n!==void 0&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let r=new Set(t.flat(1/0).reverse());for(let n of r)e.unshift(Se(n))}else t!==void 0&&e.push(Se(t));return e}static _$Eu(t,e){let r=e.attribute;return r===!1?void 0:typeof r=="string"?r:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let r of e.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Xe(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,r){this._$AK(t,r)}_$ET(t,e){let r=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,r);if(n!==void 0&&r.reflect===!0){let o=(r.converter?.toAttribute!==void 0?r.converter:G).toAttribute(e,r.type);this._$Em=t,o==null?this.removeAttribute(n):this.setAttribute(n,o),this._$Em=null}}_$AK(t,e){let r=this.constructor,n=r._$Eh.get(t);if(n!==void 0&&this._$Em!==n){let o=r.getPropertyOptions(n),s=typeof o.converter=="function"?{fromAttribute:o.converter}:o.converter?.fromAttribute!==void 0?o.converter:G;this._$Em=n;let a=s.fromAttribute(e,o.type);this[n]=a??this._$Ej?.get(n)??a,this._$Em=null}}requestUpdate(t,e,r,n=!1,o){if(t!==void 0){let s=this.constructor;if(n===!1&&(o=this[t]),r??=s.getPropertyOptions(t),!((r.hasChanged??te)(o,e)||r.useDefault&&r.reflect&&o===this._$Ej?.get(t)&&!this.hasAttribute(s._$Eu(t,r))))return;this.C(t,e,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:r,reflect:n,wrapped:o},s){r&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,s??e??this[t]),o!==!0||s!==void 0)||(this._$AL.has(t)||(this.hasUpdated||r||(e=void 0),this._$AL.set(t,e)),n===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[n,o]of this._$Ep)this[n]=o;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[n,o]of r){let{wrapped:s}=o,a=this[n];s!==!0||this._$AL.has(n)||a===void 0||this.C(n,void 0,o,a)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(e)):this._$EM()}catch(r){throw t=!1,this._$EM(),r}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};L.elementStyles=[],L.shadowRootOptions={mode:"open"},L[K("elementProperties")]=new Map,L[K("finalized")]=new Map,wr?.({ReactiveElement:L}),(ee.reactiveElementVersions??=[]).push("2.1.2");var Re=globalThis,rt=i=>i,re=Re.trustedTypes,it=re?re.createPolicy("lit-html",{createHTML:i=>i}):void 0,Le="$lit$",E=`lit$${Math.random().toFixed(9).slice(2)}$`,Ee="?"+E,Ar=`<${Ee}>`,F=document,Y=()=>F.createComment(""),V=i=>i===null||typeof i!="object"&&typeof i!="function",Te=Array.isArray,dt=i=>Te(i)||typeof i?.[Symbol.iterator]=="function",_e=`[
2
+ \f\r]`,B=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,nt=/-->/g,ot=/>/g,D=RegExp(`>|${_e}(?:([^\\s"'>=/]+)(${_e}*=${_e}*(?:[^
3
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),st=/'/g,at=/"/g,ct=/^(?:script|style|textarea|title)$/i,Ce=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),m=Ce(1),ai=Ce(2),li=Ce(3),A=Symbol.for("lit-noChange"),h=Symbol.for("lit-nothing"),lt=new WeakMap,P=F.createTreeWalker(F,129);function ut(i,t){if(!Te(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return it!==void 0?it.createHTML(t):t}var pt=(i,t)=>{let e=i.length-1,r=[],n,o=t===2?"<svg>":t===3?"<math>":"",s=B;for(let a=0;a<e;a++){let c=i[a],p,d,u=-1,l=0;for(;l<c.length&&(s.lastIndex=l,d=s.exec(c),d!==null);)l=s.lastIndex,s===B?d[1]==="!--"?s=nt:d[1]!==void 0?s=ot:d[2]!==void 0?(ct.test(d[2])&&(n=RegExp("</"+d[2],"g")),s=D):d[3]!==void 0&&(s=D):s===D?d[0]===">"?(s=n??B,u=-1):d[1]===void 0?u=-2:(u=s.lastIndex-d[2].length,p=d[1],s=d[3]===void 0?D:d[3]==='"'?at:st):s===at||s===st?s=D:s===nt||s===ot?s=B:(s=D,n=void 0);let f=s===D&&i[a+1].startsWith("/>")?" ":"";o+=s===B?c+Ar:u>=0?(r.push(p),c.slice(0,u)+Le+c.slice(u)+E+f):c+E+(u===-2?a:f)}return[ut(i,o+(i[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},Z=class i{constructor({strings:t,_$litType$:e},r){let n;this.parts=[];let o=0,s=0,a=t.length-1,c=this.parts,[p,d]=pt(t,e);if(this.el=i.createElement(p,r),P.currentNode=this.el.content,e===2||e===3){let u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}for(;(n=P.nextNode())!==null&&c.length<a;){if(n.nodeType===1){if(n.hasAttributes())for(let u of n.getAttributeNames())if(u.endsWith(Le)){let l=d[s++],f=n.getAttribute(u).split(E),b=/([.?@])?(.*)/.exec(l);c.push({type:1,index:o,name:b[2],strings:f,ctor:b[1]==="."?ne:b[1]==="?"?oe:b[1]==="@"?se:N}),n.removeAttribute(u)}else u.startsWith(E)&&(c.push({type:6,index:o}),n.removeAttribute(u));if(ct.test(n.tagName)){let u=n.textContent.split(E),l=u.length-1;if(l>0){n.textContent=re?re.emptyScript:"";for(let f=0;f<l;f++)n.append(u[f],Y()),P.nextNode(),c.push({type:2,index:++o});n.append(u[l],Y())}}}else if(n.nodeType===8)if(n.data===Ee)c.push({type:2,index:o});else{let u=-1;for(;(u=n.data.indexOf(E,u+1))!==-1;)c.push({type:7,index:o}),u+=E.length-1}o++}}static createElement(t,e){let r=F.createElement("template");return r.innerHTML=t,r}};function I(i,t,e=i,r){if(t===A)return t;let n=r!==void 0?e._$Co?.[r]:e._$Cl,o=V(t)?void 0:t._$litDirective$;return n?.constructor!==o&&(n?._$AO?.(!1),o===void 0?n=void 0:(n=new o(i),n._$AT(i,e,r)),r!==void 0?(e._$Co??=[])[r]=n:e._$Cl=n),n!==void 0&&(t=I(i,n._$AS(i,t.values),n,r)),t}var ie=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:r}=this._$AD,n=(t?.creationScope??F).importNode(e,!0);P.currentNode=n;let o=P.nextNode(),s=0,a=0,c=r[0];for(;c!==void 0;){if(s===c.index){let p;c.type===2?p=new z(o,o.nextSibling,this,t):c.type===1?p=new c.ctor(o,c.name,c.strings,this,t):c.type===6&&(p=new ae(o,this,t)),this._$AV.push(p),c=r[++a]}s!==c?.index&&(o=P.nextNode(),s++)}return P.currentNode=F,n}p(t){let e=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++}},z=class i{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,r,n){this.type=2,this._$AH=h,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=I(this,t,e),V(t)?t===h||t==null||t===""?(this._$AH!==h&&this._$AR(),this._$AH=h):t!==this._$AH&&t!==A&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):dt(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!==h&&V(this._$AH)?this._$AA.nextSibling.data=t:this.T(F.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:r}=t,n=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=Z.createElement(ut(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(e);else{let o=new ie(n,this),s=o.u(this.options);o.p(e),this.T(s),this._$AH=o}}_$AC(t){let e=lt.get(t.strings);return e===void 0&&lt.set(t.strings,e=new Z(t)),e}k(t){Te(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,r,n=0;for(let o of t)n===e.length?e.push(r=new i(this.O(Y()),this.O(Y()),this,this.options)):r=e[n],r._$AI(o),n++;n<e.length&&(this._$AR(r&&r._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let r=rt(t).nextSibling;rt(t).remove(),t=r}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},N=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,n,o){this.type=1,this._$AH=h,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=o,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=h}_$AI(t,e=this,r,n){let o=this.strings,s=!1;if(o===void 0)t=I(this,t,e,0),s=!V(t)||t!==this._$AH&&t!==A,s&&(this._$AH=t);else{let a=t,c,p;for(t=o[0],c=0;c<o.length-1;c++)p=I(this,a[r+c],e,c),p===A&&(p=this._$AH[c]),s||=!V(p)||p!==this._$AH[c],p===h?t=h:t!==h&&(t+=(p??"")+o[c+1]),this._$AH[c]=p}s&&!n&&this.j(t)}j(t){t===h?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},ne=class extends N{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===h?void 0:t}},oe=class extends N{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==h)}},se=class extends N{constructor(t,e,r,n,o){super(t,e,r,n,o),this.type=5}_$AI(t,e=this){if((t=I(this,t,e,0)??h)===A)return;let r=this._$AH,n=t===h&&r!==h||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,o=t!==h&&(r===h||n);n&&this.element.removeEventListener(this.name,this,r),o&&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)}},ae=class{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){I(this,t)}},ht={M:Le,P:E,A:Ee,C:1,L:pt,R:ie,D:dt,V:I,I:z,H:N,N:oe,U:se,B:ne,F:ae},Sr=Re.litHtmlPolyfillSupport;Sr?.(Z,z),(Re.litHtmlVersions??=[]).push("3.3.3");var mt=(i,t,e)=>{let r=e?.renderBefore??t,n=r._$litPart$;if(n===void 0){let o=e?.renderBefore??null;r._$litPart$=n=new z(t.insertBefore(Y(),o),o,void 0,e??{})}return n._$AI(i),n};var Oe=globalThis,C=class extends L{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=mt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return A}};C._$litElement$=!0,C.finalized=!0,Oe.litElementHydrateSupport?.({LitElement:C});var _r=Oe.litElementPolyfillSupport;_r?.({LitElement:C});(Oe.litElementVersions??=[]).push("4.2.2");var Rr={attribute:!0,type:String,converter:G,reflect:!1,hasChanged:te},Lr=(i=Rr,t,e)=>{let{kind:r,metadata:n}=e,o=globalThis.litPropertyMetadata.get(n);if(o===void 0&&globalThis.litPropertyMetadata.set(n,o=new Map),r==="setter"&&((i=Object.create(i)).wrapped=!0),o.set(e.name,i),r==="accessor"){let{name:s}=e;return{set(a){let c=t.get.call(this);t.set.call(this,a),this.requestUpdate(s,c,i,!0,a)},init(a){return a!==void 0&&this.C(s,void 0,i,a),a}}}if(r==="setter"){let{name:s}=e;return function(a){let c=this[s];t.call(this,a),this.requestUpdate(s,c,i,!0,a)}}throw Error("Unsupported decorator location: "+r)};function $(i){return(t,e)=>typeof e=="object"?Lr(i,t,e):((r,n,o)=>{let s=n.hasOwnProperty(o);return n.constructor.createProperty(o,r),s?Object.getOwnPropertyDescriptor(n,o):void 0})(i,t,e)}function _(i){return $({...i,state:!0,attribute:!1})}var v=i=>i??h;var q={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},ft=i=>(...t)=>({_$litDirective$:i,values:t}),de=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,r){this._$Ct=t,this._$AM=e,this._$Ci=r}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var{I:en}=ht;var gt=i=>i.strings===void 0;var Er={},yt=(i,t=Er)=>i._$AH=t;var xt=ft(class extends de{constructor(i){if(super(i),i.type!==q.PROPERTY&&i.type!==q.ATTRIBUTE&&i.type!==q.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!gt(i))throw Error("`live` bindings can only contain a single expression")}render(i){return i}update(i,[t]){if(t===A||t===h)return t;let e=i.element,r=i.name;if(i.type===q.PROPERTY){if(t===e[r])return A}else if(i.type===q.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(r))return A}else if(i.type===q.ATTRIBUTE&&e.getAttribute(r)===t+"")return A;return yt(i),t}});var T={afterSunset:"Born after sunset",allowDuplicates:"Allow duplicate cards",allowReversals:"Allow reversed cards",angelDating:"How the name of the day is dated",annualFromYear:"Annual pillars from year",annualYears:"Years of annual pillars",approximateDate:"Approximate date",aspectTypes:"Aspect types",atbashOutput:"AtBash and Albam output",avasthaInfo:"Include avastha details",avoidAnimal:"Avoid clashes with",ayadiText:"Ayadi text family",ayanamsaValue:"Custom ayanamsa value",birthData:"Birth details",birthDate:"Birth date",birthLatitude:"Birth latitude",birthLongitude:"Birth longitude",birthTime:"Birth time",ciphers:"Ciphers to return",context:"Where you saw it",coordinateSystem:"Coordinate system",correlation:"Correlation constant",count:"How many",currentYear:"Current year",cuts:"Cut corners",dasha:"Dasha lords",datetime:"Date and time",dayBoundary:"Day boundary",depth:"Depth, north to south",directionScheme:"Direction reading",division:"Divisional chart",domainWeights:"Domain weights",door:"Door coordinates",doorPosition:"Door position along the side",doshaClock:"How the dosha periods are cut",endDate:"End date",endDatetime:"End date and time",expression:"Expression number",extensions:"Extended corners",facing:"Facing direction",facingDegrees:"Facing degrees",family:"Yoga family",firstName:"First name",firstNameHebrew:"First name in Hebrew",fullName:"Full name",gainHouses:"Gain houses",grid:"Mandala grid",hastaInches:"Length of one hasta in inches",horaryNumber:"Horary number",hourClock:"Hour clock",houseSystem:"House system",id:"ID",include:"Additional bodies",includeMatches:"Include equal value matches",interpretation:"Position meaning",intervalMinutes:"Interval in minutes",isLeapMonth:"Leap month",iso2:"Country code",kua:"Kua number",lang:"Language",latinCiphers:"Also score the Latin ciphers",leapDayPolicy:"Where 29 February falls",letter:"Starting letter",letterAttribution:"Letter attribution reading",lifePath:"Life Path number",limit:"Results per page",lines:"Line pattern",lossHouses:"Loss houses",lunarDay:"Lunar day",lunarMonth:"Lunar month",lunarYear:"Lunar year",members:"Group members",minSignificance:"Minimum significance",minStrength:"Minimum strength",misparGadol:"Mispar gadol method",modernPlanets:"Include modern planets",moonWindows:"Moon windows",muhurtaText:"Muhurta text",nameHebrew:"Name in Hebrew",natalChart:"Natal chart",nodeType:"Lunar node type",offset:"Results to skip",polygon:"Outline",positions:"Spread positions",q:"Search",question:"Your question",relocationLatitude:"Relocation latitude",relocationLongitude:"Relocation longitude",returnDate:"Return date",returnYear:"Return year",ritucharyaScheme:"Season division",rituZodiac:"Zodiac the season boundaries are measured in",road:"Road side",rulingPlanets:"Ruling planets",scheme:"Karaka scheme",secondName:"Second name",secondNameHebrew:"Second name in Hebrew",sephirotSystem:"Sephirot reading",sign:"Zodiac sign",sign1:"First animal sign",sign2:"Second animal sign",signDoshaScheme:"Sign humour table",significators:"Include KP significators",slopeLowDirection:"Direction the ground falls toward",slopeSchool:"Ground level school",soulUrge:"Soul Urge number",spreadName:"Spread name",startDate:"Start date",startDatetime:"Start date and time",strictOrbs:"Use tighter orbs",system:"Avastha system",targetDate:"Target date",targetMonth:"Target month",text:"Word or name",textHebrew:"Hebrew word or name",top:"Top events per window",transitDate:"Transit date",transitTime:"Transit time",transliteration:"Transliteration scheme",treeVariant:"Tree arrangement",type:"Pattern type",vyayaFormula:"Vyaya formula",water:"Standing water direction",weights:"Layer weights",width:"Width, east to west",x:"Distance east",y:"Distance north",yearBearerSystem:"Year Bearer school",yearBoundary:"Year boundary",yearStart:"Wheel year start",zodiac:"Zodiac sign"};var bt=["de","en","es","fr","hi","pt","ru","tr","zh-Hans","zh-Hant"];function Pe(i){if(i.lang)return i.lang;if(typeof document>"u")return;let t=i.closest?.("[lang]")?.getAttribute("lang");return t||document.documentElement.lang||void 0}function vt(i){return!i||i.toLowerCase().split("-")[0]==="en"}var Tr={tw:"hant",hk:"hant",mo:"hant",cn:"hans",sg:"hans",my:"hans"};function De(i){let t=i.toLowerCase();return bt.find(e=>e.toLowerCase()===t)}function kt(i){let t=Pe(i);if(!t)return;let e=De(t);if(e)return e;let r=t.toLowerCase().split("-"),n=r[0];if(n==="zh"){let o=r.find(s=>s==="hans"||s==="hant")??Tr[r[1]??""];return o?De(`zh-${o}`):void 0}return De(n)}var $t='@layer roxy.tokens,roxy.theme;@layer roxy.tokens{:where(:root,:host){color-scheme:light;--roxy-bg: #ffffff;--roxy-fg: #0a0a0a;--roxy-accent: #4a6297;--roxy-success: #16a34a;--roxy-warning: #ea580c;--roxy-danger: #dc2626;--roxy-info: #0284c7;--roxy-accent-ink: color-mix(in oklab, var(--roxy-accent) 70%, black);--roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, black);--roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, black);--roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, black);--roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, black);--roxy-font-sans: initial;--roxy-font-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, "Liberation Mono", monospace;--roxy-text-base: 1rem;--roxy-text-scale: 1.15;--roxy-weight-normal: 400;--roxy-weight-bold: 600;--roxy-leading-tight: 1.25;--roxy-leading-normal: 1.5;--roxy-tracking-tight: -0.01em;--roxy-tracking-normal: 0em;--roxy-space-unit: 0.25rem;--roxy-radius: 6px;--roxy-motion-duration: 200ms;--roxy-motion-easing: cubic-bezier(0.4, 0, 0.2, 1)}:where(:root,:host,[data-theme],.light,.dark){--roxy-surface: var(--roxy-bg);--roxy-primary: var(--roxy-fg);--roxy-secondary: color-mix(in oklab, var(--roxy-fg) 78%, var(--roxy-bg));--roxy-muted: color-mix(in oklab, var(--roxy-fg) 60%, var(--roxy-bg));--roxy-border: color-mix(in oklab, var(--roxy-fg) 14%, var(--roxy-bg));--roxy-ring: color-mix(in srgb, var(--roxy-accent) 40%, transparent);--roxy-heat: var(--roxy-danger);--roxy-font-display: var(--roxy-font-sans);--roxy-text-sm: calc(var(--roxy-text-base) / var(--roxy-text-scale));--roxy-text-xs: calc(var(--roxy-text-sm) / var(--roxy-text-scale));--roxy-text-lg: calc(var(--roxy-text-base) * var(--roxy-text-scale));--roxy-text-xl: calc( var(--roxy-text-lg) * var(--roxy-text-scale) * var(--roxy-text-scale) );--roxy-space-xs: var(--roxy-space-unit);--roxy-space-sm: calc(var(--roxy-space-unit) * 2);--roxy-space-md: calc(var(--roxy-space-unit) * 4);--roxy-space-lg: calc(var(--roxy-space-unit) * 6);--roxy-space-xl: calc(var(--roxy-space-unit) * 10);--roxy-line-thick: calc(var(--roxy-space-unit) / 2);--roxy-touch: calc(var(--roxy-space-unit) * 11);--roxy-radius-sm: calc(var(--roxy-radius) / 2);--roxy-radius-md: var(--roxy-radius);--roxy-radius-lg: calc(var(--roxy-radius) * 5 / 3);--roxy-radius-full: 9999px;--roxy-shadow-sm: none;--roxy-shadow-md: 0 4px 12px color-mix(in srgb, black 10%, transparent);--roxy-shadow-lg: 0 12px 32px color-mix(in srgb, black 18%, transparent)}@media(prefers-color-scheme:dark){:where(:root,:host){color-scheme:dark;--roxy-bg: #0a0a0a;--roxy-fg: #fafafa;--roxy-accent: #92aade;--roxy-success: #22c55e;--roxy-warning: #fb923c;--roxy-danger: #ef4444;--roxy-info: #38bdf8;--roxy-accent-ink: var(--roxy-accent);--roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, white);--roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, white);--roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, white);--roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, white)}}:where(:root[data-theme=light],[data-theme=light],:root.light,.light,:host([data-theme="light"])){color-scheme:light;--roxy-bg: #ffffff;--roxy-fg: #0a0a0a;--roxy-accent: #4a6297;--roxy-success: #16a34a;--roxy-warning: #ea580c;--roxy-danger: #dc2626;--roxy-info: #0284c7;--roxy-accent-ink: color-mix(in oklab, var(--roxy-accent) 70%, black);--roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, black);--roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, black);--roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, black);--roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, black)}:where(:root[data-theme=dark],[data-theme=dark],:root.dark,.dark,:host([data-theme="dark"])){color-scheme:dark;--roxy-bg: #0a0a0a;--roxy-fg: #fafafa;--roxy-accent: #92aade;--roxy-success: #22c55e;--roxy-warning: #fb923c;--roxy-danger: #ef4444;--roxy-info: #38bdf8;--roxy-accent-ink: var(--roxy-accent);--roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, white);--roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, white);--roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, white);--roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, white)}@media(prefers-reduced-motion:reduce){:where(:root,:host){--roxy-motion-duration: 0ms}}}';var ce="roxy-ui-tokens";function ue(){if(typeof document>"u")return null;let i=document.getElementById(ce);if(i)return i;let t=document.createElement("style");return t.id=ce,t.textContent=$t,document.head.prepend(t),t}function pe(i){return i.toLowerCase().replace(/[\s_-]+/g," ").trim()}function R(i){return i.replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([a-z])([0-9])/g,"$1 $2").replace(/^\w/,t=>t.toUpperCase())}var wt="__ROXY_UI_I18N__";function Fe(){let i=globalThis,t=i[wt];if(t)return t;let e={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return i[wt]=e,e}function Ie(i,t){return t?i.replace(/\{\{(\w+)\}\}/g,(e,r)=>r in t?String(t[r]??""):e):i}function At(i,t,e){return Ie(Ne(i,t)??t,e)}function Ne(i,t){if(!i)return;let{catalogs:e}=Fe(),r=i.toLowerCase();return(e[r]??e[r.split("-")[0]])?.[pe(t)]}function St(i){if(!i)return;let{fieldLabels:t}=Fe(),e=i.toLowerCase();return t[e]??t[e.split("-")[0]]}function H(i,t){return St(i)?.fields[t]}function _t(i,t,e){return St(i)?.enums[`${t}.${e}`]}function Rt(i){let{listeners:t}=Fe();return t.add(i),()=>{t.delete(i)}}var he=class{constructor(t){this.host=t,t.addController(this)}hostConnected(){this.unsubscribe=Rt(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var me=class extends C{constructor(){super();this.translator=(e,r)=>this.t(e,r);new he(this)}connectedCallback(){super.connectedCallback(),ue()}t(e,r){return At(this.effectiveLang(),e,r)}effectiveLang(){return Pe(this)}};var Cr=(i,t)=>t?i[pe(t)]:void 0;var Or={aries:"♈",taurus:"♉",gemini:"♊",cancer:"♋",leo:"♌",virgo:"♍",libra:"♎",scorpio:"♏",sagittarius:"♐",capricorn:"♑",aquarius:"♒",pisces:"♓"},Lt=i=>Cr(Or,i);var Et=["Aries","Taurus","Gemini","Cancer","Leo","Virgo","Libra","Scorpio","Sagittarius","Capricorn","Aquarius","Pisces"];var Tt=w`:where([part~=card]){background:var(--roxy-surface);color:var(--roxy-fg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-lg);box-shadow:var(--roxy-shadow-sm)}:where([part~=card] [part~=card],[part~=card] [part~=reading],[part~=card] .roxy-card){border:0;border-block-start:1px solid var(--roxy-border);box-shadow:none;background:0 0;border-radius:0;padding-inline:0}:host([bare]) [part~=card]{box-shadow:none;background:0 0;border:0;border-radius:0;padding:0}:where(h1,h2){color:var(--roxy-fg);font-size:var(--roxy-text-lg);font-weight:var(--roxy-weight-bold);line-height:var(--roxy-leading-tight);letter-spacing:var(--roxy-tracking-tight);text-wrap:balance}:where(h3,h4,h5,h6){color:var(--roxy-fg);font-size:var(--roxy-text-base);font-weight:var(--roxy-weight-bold);line-height:var(--roxy-leading-tight);letter-spacing:var(--roxy-tracking-normal);text-transform:none}:where(.roxy-label,th,dt){color:var(--roxy-muted);font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-normal);letter-spacing:var(--roxy-tracking-normal);text-transform:none}:where(.roxy-chips){gap:var(--roxy-space-xs);flex-wrap:wrap;margin:0;padding:0;list-style:none;display:flex}:where(.roxy-chip,.roxy-chips>li){align-items:center;gap:var(--roxy-space-xs);padding:calc(var(--roxy-space-unit) / 2) var(--roxy-space-sm);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-sm);color:var(--roxy-secondary);font-size:var(--roxy-text-xs);line-height:var(--roxy-leading-tight);overflow-wrap:anywhere;background:0 0;max-inline-size:100%;display:inline-flex}:where(.roxy-chip[data-tone=success],.roxy-chips>li[data-tone=success]){color:var(--roxy-success-fg)}:where(.roxy-chip[data-tone=warning],.roxy-chips>li[data-tone=warning]){color:var(--roxy-warning-fg)}:where(.roxy-chip[data-tone=danger],.roxy-chips>li[data-tone=danger]){color:var(--roxy-danger-fg)}:where(.roxy-chip[data-tone=info],.roxy-chips>li[data-tone=info]){color:var(--roxy-info-fg)}:where(table){border-collapse:collapse;font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums}:where(th,td){padding:var(--roxy-space-xs) var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);text-align:start;vertical-align:top}:where(summary){cursor:pointer}:where(a,button,summary,input,select,textarea,[tabindex]):focus-visible{outline:var(--roxy-line-thick) solid var(--roxy-ring);outline-offset:var(--roxy-line-thick)}:where(summary:focus-visible){border-radius:var(--roxy-radius-sm)}:where(input,select,textarea,button){font:inherit}:where(input:not([type=checkbox],[type=radio],[type=range]),select,textarea){padding:var(--roxy-space-xs) var(--roxy-space-sm);background:var(--roxy-bg);color:var(--roxy-fg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md)}`;var Dr=w`:host{--roxy-label-col:minmax(0, 25%);--_mask:var(--roxy-surface);font-family:var(--roxy-font-sans);color:var(--roxy-fg);font-size:var(--roxy-text-base);line-height:var(--roxy-leading-normal);animation:roxy-fade-in var(--roxy-motion-duration) var(--roxy-motion-easing) both;background:0 0;display:block;container-type:inline-size}:host([bare]){--_mask:var(--roxy-bg)}:host([hidden]){display:none}:host([bare]){--roxy-surface:transparent;--roxy-shadow-sm:none;--roxy-shadow-md:none}*,:before,:after{box-sizing:border-box}h1,h2,h3,h4{font-family:var(--roxy-font-display)}@keyframes roxy-fade-in{0%{transform:translateY(calc(var(--roxy-space-unit) / 2))}to{transform:translateY(0)}}@media (prefers-reduced-motion:reduce){:host{animation:none}}.roxy-skeleton{background:linear-gradient(90deg, var(--roxy-border) 0%, color-mix(in srgb, var(--roxy-border) 60%, transparent) 50%, var(--roxy-border) 100%);border-radius:var(--roxy-radius-md);background-size:200% 100%;animation:1.4s ease-in-out infinite roxy-shimmer}@keyframes roxy-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media (prefers-reduced-motion:reduce){.roxy-skeleton{animation:none}}.roxy-sr-only{clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:0;padding:0;position:absolute;overflow:hidden}.roxy-empty{padding:var(--roxy-space-lg);color:var(--roxy-muted);text-align:center;font-size:var(--roxy-text-sm)}.roxy-error{gap:var(--roxy-space-sm);padding:var(--roxy-space-lg);background:var(--roxy-surface);border:1px solid var(--roxy-danger);border-radius:var(--roxy-radius-md);color:var(--roxy-danger-fg);font-size:var(--roxy-text-sm);justify-items:start;display:grid}:host(:focus-within) .roxy-card{outline:var(--roxy-line-thick) solid var(--roxy-ring);outline-offset:var(--roxy-line-thick)}.roxy-attribution{margin-top:var(--roxy-space-sm);font-size:var(--roxy-text-xs);color:var(--roxy-muted);text-align:right}.roxy-attribution a{color:inherit;text-decoration:none}.roxy-attribution a:hover{color:var(--roxy-accent-ink);text-decoration:underline}.roxy-edit-bar{margin-bottom:var(--roxy-space-sm);justify-content:flex-end;display:flex}.roxy-edit{padding:var(--roxy-space-xs) var(--roxy-space-md);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);color:var(--roxy-fg);font-family:inherit;font-size:var(--roxy-text-sm);cursor:pointer;background:0 0}.roxy-edit:hover{border-color:var(--roxy-accent);color:var(--roxy-accent-ink)}.roxy-edit:disabled{cursor:progress;color:var(--roxy-muted)}roxy-endpoint-form+*{margin-top:var(--roxy-space-md)}.roxy-more{justify-items:center;gap:var(--roxy-space-sm);margin-top:var(--roxy-space-md);display:grid}.roxy-more .roxy-edit{min-height:var(--roxy-touch)}:host{font-variant-emoji:text}`,Ct=[Dr,Tt];var Ot=i=>t=>{customElements.get(i)||customElements.define(i,t)};function qe(){return m`<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 Dt=w`summary{list-style:none}summary::-webkit-details-marker{display:none}.roxy-chevron{aspect-ratio:auto;width:.7lh;height:.7lh;color:var(--roxy-muted);transition:transform var(--roxy-motion-duration) var(--roxy-motion-easing);flex-shrink:0}details[open]>summary .roxy-chevron{transform:rotate(180deg)}@media (prefers-reduced-motion:reduce){.roxy-chevron{transition:none}}`;var Pr="pk_live_YOUR_KEY",Pt={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(i){if(i)return i===Pr?Pt.sample:i.startsWith("pk_")?void 0:Pt.secret}function Me(i,t,e={}){e.warn&&console.warn(t.message),i.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:t.reason,message:t.message},bubbles:!0,composed:!0}))}var Fr="https://roxyapi.com/api/v2";async function Ir(i){try{let t=await i.json();if(t?.error){let e=t.code==="validation_error"&&Array.isArray(t.issues)?t.issues.filter(r=>typeof r.path=="string"&&typeof r.message=="string").map(r=>({path:r.path,message:r.message})):null;return{message:t.error,issues:e?.length?e:null,worded:!0}}}catch{}return{message:`Request failed (${i.status})`,issues:null,worded:!1}}var fe=class extends Error{constructor(e,r=null,n=!0){super(e);this.issues=r;this.worded=n}};function Ft(i){return i.submitUrl?void 0:W(i.publishableKey)}function Ue(i){return!!(i.submitUrl||i.publishableKey&&!Ft(i))}async function ze(i,t,e){let r=Ft(i);if(r)throw new fe(r.message);let n=i.submitUrl?await fetch(i.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:Nr(t,i.submitContext),signal:e}):await qr(i,t,e);if(!n.ok){let o=await Ir(n);throw new fe(o.message,o.issues,o.worded)}return await n.json()}function Nr(i,t){return JSON.stringify(t?{...i,context:t}:i)}function qr(i,t,e){let r=new URL(`${i.baseUrl??Fr}${t.path}`,document.baseURI);for(let[o,s]of Object.entries(t.query??{}))s!=null&&r.searchParams.set(o,String(s));let n={Accept:"application/json"};return i.publishableKey&&(n["X-API-Key"]=i.publishableKey),t.body!=null&&(n["Content-Type"]="application/json"),fetch(r,{method:t.method??"GET",headers:n,body:t.body!=null?JSON.stringify(t.body):void 0,signal:e})}var It={"GET /angel-numbers/numbers/{number}":{number:{path:"/angel-numbers/numbers",limit:50,lang:!0}},"GET /astrology/planet-meanings/{id}":{id:{path:"/astrology/planet-meanings",lang:!0}},"GET /astrology/signs/{id}":{id:{path:"/astrology/signs",lang:!0}},"GET /crystals":{color:{path:"/crystals/colors",lang:!0},planet:{path:"/crystals/planets",lang:!0}},"GET /crystals/{id}":{id:{path:"/crystals",limit:100,lang:!0}},"GET /dreams/symbols":{letter:{path:"/dreams/symbols/letters"}},"GET /dreams/symbols/{id}":{id:{path:"/dreams/symbols",search:"q",limit:50}},"GET /iching/trigrams/{id}":{id:{path:"/iching/trigrams",lang:!0}},"GET /tarot/cards/{id}":{id:{path:"/tarot/cards",limit:100,lang:!0}}},Nt={"GET /tarot/cards":{suit:{field:"arcana",value:"major"}}};var S=(i,t)=>`${i}.${t}`;function ye(i){let t=/^(.+)\.(\d+)$/.exec(i);return t?{key:t[1],index:Number(t[2])}:null}function xe(i,t=Ie,e=r=>T[r]??R(r)){let r=ye(i);return r?t("{{group}} {{n}}",{group:e(r.key),n:r.index+1}):t(R(i))}function Mt(i,t){let e=t.key??t.name;if(zt(e))return H(i,e);if(!t.label)return H(i,t.name);let r=Object.keys(T).find(n=>T[n]===t.label);return Ne(i,t.label)??(r?H(i,r):void 0)}function Ut(i,t,e){let r=S(t,0);return i.filter(n=>n.group===r).map(n=>({...n,key:`${S(t,e)}.${n.name}`,group:S(t,e)}))}function Ke(i){return i.length<=(be(i)?30:12)?"tiles":"select"}function be(i){return i.every(t=>t.length<=2)}var Mr=["latitude","longitude","timezone"],qt=["latitude","longitude"];function zt(i){let t=i.match(/^(.+?)(Latitude|Longitude)$/);return t?{group:t[1],leaf:t[2].toLowerCase()}:null}var Ur=Et.map(i=>i.toLowerCase());function M(i,t){if(i){if("$ref"in i&&i.$ref){let e=i.$ref.split("/").pop();return e?t[e]:void 0}return i}}function Ht(i){let t=i.anyOf??i.oneOf;return!t||t.length===0?i:t.find(e=>Array.isArray(e.enum))??t.find(e=>je(e)&&je(e)!=="null")??t[0]??i}function je(i){if(typeof i.type=="string")return i.type;if(!Array.isArray(i.type))return;let t=i.type.filter(e=>e!=="null");return t.length===1?t[0]:void 0}function zr(i){let t=Ht(i),e=je(t);return Array.isArray(t.enum)?Ke(t.enum):e==="boolean"?"toggle":t.format==="date"?"date":t.format==="time"?"time":t.format==="date-time"?"datetime":e==="integer"||e==="number"?"number":e==="string"?"text":e==="array"?"array":null}function jt(i){if(i.length!==12)return!1;let t=new Set(i.map(e=>e.toLowerCase()));return Ur.every(e=>t.has(e))}function ge(i,t,e){let r=Ht(t);return{key:e.key,name:i,group:e.group,inQuery:e.inQuery,kind:zr(t)??"text",required:e.required,description:r.description??t.description,enum:r.enum,min:r.minimum??r.exclusiveMinimum,max:r.maximum??r.exclusiveMaximum,default:t.default??r.default,example:t.example??r.example}}function He(i){return new Set([...i.required??[],...i["x-required-any-of"]?.[0]??[]])}function Kt(i,t,e,r=i.requestBody?"POST":"GET"){let n=[],o=[],s=!1,a=i.requestBody?.content?.["application/json"]?.schema,c=M(a,t),p=c?.["x-required-any-of"];if(c?.properties){let d=He(c);for(let[u,l]of Object.entries(c.properties)){let f=M(l,t)??{},b=f.type==="array"?M(f.items,t):void 0;if(b?.type==="object"&&b.properties){let k=Math.max(1,f.minItems??1),x=He(b);o.push({key:u,min:k,max:f.maxItems??k});for(let U=0;U<k;U++)for(let[O,dr]of Object.entries(b.properties)){let cr=M(dr,t)??{};n.push(ge(O,cr,{key:`${S(u,U)}.${O}`,group:S(u,U),required:d.has(u)&&x.has(O)}))}}else if(f.type==="object"&&f.properties){let k=He(f);for(let[x,U]of Object.entries(f.properties)){let O=M(U,t)??{};O.type==="array"&&M(O.items,t)?.type==="object"||n.push(ge(x,O,{key:`${u}.${x}`,group:u,required:d.has(u)&&k.has(x)}))}}else{let k=zt(u),x=ge(k?.leaf??u,f,{key:u,group:k?.group,required:d.has(u)});k&&(x.label=`${R(k.group)} ${k.leaf}`),n.push(x)}}}for(let d of i.parameters??[]){if(d.in!=="path"&&d.in!=="query")continue;if(d.name==="lang"&&d.in==="query"){s=!0;continue}let u=M(d.schema,t)??{},l=ge(d.name,u,{key:d.name,required:!!d.required,inQuery:d.in==="query"});if(d.in==="path"&&l.enum&&/^(id|identifier|slug)$/i.test(T[l.name]??R(l.name))){let f=/^([A-Za-z][A-Za-z -]*?)\s+(?:id|identifier|slug)\b/i.exec(d.description??l.description??"")?.[1]?.trim();f&&(l.label=f)}n.push(l)}for(let d of n)!d.group&&!d.label&&n.some(u=>u.group&&u.name===d.name)&&(d.label=Hr(d));return Ge({title:jr(i.summary,e),fields:n,hasLang:s,...o.length>0?{repeats:o}:{},...p?{requiredAnyOf:p}:{}},r,e)}function Hr(i){let e=(T[i.name]??R(i.name)).toLowerCase().replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r=new RegExp(`^(\\p{L}+) ${e}\\b`,"iu").exec(i.description??"")?.[1];return r?T[r.toLowerCase()+i.name.replace(/^./,n=>n.toUpperCase())]:void 0}function Ge(i,t,e){let r=`${t.toUpperCase()} /${e.replace(/^\//,"")}`,n=It[r]??{},o=Nt[r]??{},s=i.fields.map(l=>{let f={...l};return delete f.role,delete f.city,delete f.viewerZone,delete f.moment,delete f.fold,{...f,...n[l.key]&&{source:n[l.key]},...o[l.key]&&{disabledWhen:o[l.key]}}}),a=[...new Set(s.map(l=>l.group))].map(l=>l===void 0?{}:{key:l,label:xe(l)}),c=a.filter(l=>qt.every(f=>s.some(b=>b.group===l.key&&b.name===f)));for(let[l,f]of c.entries()){let b=s.filter(x=>x.group===f.key),k=b.find(x=>x.name==="timezone")??(l===0?s.find(x=>!x.group&&x.name==="timezone"):void 0);f.location={fields:[...b.filter(x=>qt.includes(x.name)).map(x=>x.key),...k?[k.key]:[]],required:b.some(x=>Mr.includes(x.name)&&x.required)}}for(let l of s)l.name==="seed"?l.role="seed":(l.name==="limit"||l.name==="offset")&&!l.required?l.role="hidden-default":c.some(f=>f.location?.fields.includes(l.key))?l.role="location":l.name==="timezone"&&(l.city=!0,!l.group&&!l.required&&(l.viewerZone=!0));let p=a.filter(l=>l.key!==void 0&&(l.location||s.some(f=>f.group===l.key&&f.required))),d=s.some(l=>!l.group&&!l.role&&l.required)||p.length>0||c.some(l=>l.key===void 0);for(let l of a)l.key!==void 0&&d&&!p.includes(l)&&(l.fold=!0);let u=l=>p.length>0&&l.default===void 0&&(l.kind==="date"||l.kind==="time"||l.kind==="datetime");for(let l of s)l.group?a.find(f=>f.key===l.group)?.fold&&(l.fold=!0):!l.role&&d&&!l.required?u(l)?l.moment=!0:l.fold=!0:!l.role&&!d&&l.default!==void 0&&(l.fold=!0);return{...i,fields:s,groups:a,opensOnLoad:Kr(i,t)}}function Gt(i,t){let e=i.filter(r=>r.moment);return e.some(r=>r.kind==="time"||r.kind==="datetime")&&e.every(r=>t[r.key]===void 0||t[r.key]==="")}function jr(i,t){let e=i?.split(" - ")[0]?.trim();return e||R(t.split("/").pop()??"")}function Kr(i,t){return t.toUpperCase()==="GET"&&!i.fields.some(e=>e.required)}function Bt(i,t=[]){if(t.some(r=>r.name==="limit"||r.name==="offset"))return"Search";let e=i.toLowerCase();return/compat|synastry|guna|connection|penta|composite/.test(e)?"Compare":/\bcast\b|\/draw|iching|hexagram|tarot/.test(e)?"Cast":/horoscope|dream|angel|nakshatra|crystal|meaning|reference/.test(e)?"Get reading":"Generate"}function Yt(i,t){let e=`https://cdn.jsdelivr.net/npm/@roxyapi/ui@${i}/dist/schemas`;if(!t)return e;let r=new URL(t),n=/^(.*)\/cdn\/(?:roxy-ui|components\/[\w-]+)\.js$/.exec(r.pathname)?.[1];return r.hostname==="cdn.jsdelivr.net"||n===void 0?e:`${r.origin}${n}/schemas`}function Vt(i,t){let e=t.replace(/^\//,"").replace(/[{}]/g,"").replace(/\//g,"-");return`${i.toLowerCase()}--${e}.json`}function Gr(i){if(Array.isArray(i))return i;if(!i||typeof i!="object")return null;let t=Object.values(i),e=t.find(Array.isArray);return e||(t.find(n=>!!n&&typeof n=="object"&&Object.values(n).every(o=>typeof o=="number"))??null)}function Be(i,t="id"){let e=Gr(i);if(!e)return[];if(!Array.isArray(e)){let n=Object.keys(e),o=n.length>0&&n.every(a=>/^[a-z]$/.test(a));return(o?[..."abcdefghijklmnopqrstuvwxyz"]:n).map(a=>({value:a,label:o?a.toUpperCase():a,disabled:!e[a]}))}let r=[];for(let n of e){if(typeof n=="string"){r.push({value:n,label:n});continue}if(!n||typeof n!="object")continue;let o=n,s=o.id??o[t]??o.number;if(s==null)continue;let a=String(s),c=o.name??o.english;r.push({value:a,label:typeof c=="string"?c:a})}return r}function Zt(i){let t=i?.total;return typeof t=="number"?t:void 0}var Wt=new Map;function Br(i){if(!i)return["en"];let t=Wt.get(i);if(t)return[t,"en"];let e="en";try{e=Intl.getCanonicalLocales(i)[0]??"en"}catch{e="en"}return Wt.set(i,e),[e,"en"]}function Jt(){try{return new Intl.DateTimeFormat(Br(void 0)).resolvedOptions().timeZone}catch{return}}function Qt(i,t,e){return H(i,t)??e??R(t)}function Xt(i,t,e,r){return _t(i,t,e)??r??R(e)}var er=w`.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 tr(i,t){let e,r=((...n)=>{e&&clearTimeout(e),e=setTimeout(()=>{e=void 0,i(...n)},t)});return r.cancel=()=>{e&&(clearTimeout(e),e=void 0)},r}var Yr=10,Vr=10,Ye=new Map;function rr(i,t,e={}){return{...i.limit?{limit:i.limit}:{},...i.lang&&t?{lang:t}:{},...e}}function Ze(i,t,e,r){let n=JSON.stringify([i.submitUrl??i.baseUrl,t.path,e,r]),o=Ye.get(n);return o||(o=Zr(i,t,e,r).catch(s=>{throw Ye.delete(n),s}),Ye.set(n,o)),o}async function Zr(i,t,e,r){let n=[];for(let o=0;o<Vr;o++){let s=await ze(i,{path:t.path,method:"GET",query:rr(t,r,n.length?{offset:n.length}:{})}),a=Be(s,e);n.push(...a);let c=Zt(s);if(!t.limit||c===void 0||n.length>=c||!a.length)break}return n}var Ve=i=>i.normalize("NFD").replace(new RegExp("\\p{M}","gu"),"").toLowerCase(),ve=class{constructor(t,e,r,n,o){this.host=t;this.source=e;this.field=r;this.context=n;this.onPick=o;this.query="";this.options=[];this.open=!1;this.highlight=-1;this.loading=!1;this.error=null;this.search=tr(t=>{this.searchServer(t)},250);t.addController(this)}hostDisconnected(){this.search.cancel(),this.abort?.abort()}input(t){this.query=t,this.error=null,this.source.search?t.trim().length<2?this.close():this.search(t):this.filter(t),this.host.requestUpdate()}focus(){!this.source.search&&!this.open&&this.filter(this.query)}close(){this.open=!1,this.highlight=-1,this.host.requestUpdate()}pick(t){this.query=t.label,this.close(),this.onPick(t)}keydown(t){let e=this.options.length;if(t.key==="Escape"){this.close();return}if(t.key==="ArrowDown"&&!this.open){t.preventDefault(),this.input(this.query);return}if(!(!this.open||e===0)){if(t.key==="ArrowDown")this.highlight=(this.highlight+1)%e;else if(t.key==="ArrowUp")this.highlight=(this.highlight-1+e)%e;else if(t.key==="Home")this.highlight=0;else if(t.key==="End")this.highlight=e-1;else if(t.key==="Enter"){let r=this.options[this.highlight]??this.options[0];r&&this.pick(r)}else return;t.preventDefault(),this.host.requestUpdate()}}async filter(t){let{route:e,lang:r}=this.context();this.loading=!0,this.host.requestUpdate();try{let n=await Ze(e,this.source,this.field,r);if(t!==this.query)return;let o=Ve(t.trim());this.show(n.filter(s=>Ve(s.label).includes(o)||Ve(s.value).includes(o)))}catch(n){this.fail(n)}finally{this.loading=!1,this.host.requestUpdate()}}async searchServer(t){let{route:e,lang:r}=this.context(),n=this.source.search;this.abort?.abort();let o=new AbortController;this.abort=o,this.loading=!0,this.host.requestUpdate();try{let s=await ze(e,{path:this.source.path,method:"GET",query:rr({...this.source,limit:Yr},r,{[n]:t})},o.signal);if(o.signal.aborted)return;this.show(Be(s,this.field))}catch(s){if(o.signal.aborted)return;this.fail(s)}finally{this.abort===o&&(this.abort=void 0),o.signal.aborted||(this.loading=!1,this.host.requestUpdate())}}show(t){this.options=t,this.open=!0,this.highlight=t.length?0:-1}fail(t){this.options=[],this.open=!1,this.error=t instanceof Error?t.message:String(t)}};function ir(i,t,e,r={}){let n=`${t}-listbox`;return m`<div class="picker"><input id="${t}" type="text" role="combobox" aria-expanded="${i.open?"true":"false"}" aria-controls="${n}" aria-autocomplete="list" aria-labelledby="${v(r.labelledby)}" aria-describedby="${v(r.describedby)}" aria-invalid="${v(r.invalid?"true":void 0)}" aria-activedescendant="${i.open&&i.highlight>=0?`${t}-opt-${i.highlight}`:""}" autocomplete="off" placeholder="${e.placeholder}" .value="${i.query}" @input="${o=>i.input(o.target.value)}" @keydown="${o=>i.keydown(o)}" @focus="${()=>i.focus()}" @blur="${()=>i.close()}"> ${i.loading?m`<span class="spinner" role="status" aria-label="${e.loading}"></span>`:h} ${i.open?m`<ul id="${n}" class="results" role="listbox">${i.options.length===0?m`<li class="empty" role="status">${e.empty}</li>`:i.options.map((o,s)=>m`<li id="${`${t}-opt-${s}`}" class="option" role="option" aria-selected="${i.highlight===s?"true":"false"}" @mousedown="${a=>a.preventDefault()}" @click="${()=>i.pick(o)}">${o.label}</li>`)}</ul>`:h}</div>${i.error?m`<small class="field-error" role="alert">${i.error}</small>`:h}`}var nr=[er,w`.picker{position:relative}`];var or="1.1.3";var sr="https://roxyapi.com/api/v2/openapi.json",Wr=Yt(or,globalThis.document?.currentScript?.src||void 0),ke=new Map,$e=class extends Error{constructor(e){super(`HTTP ${e}`);this.status=e}},we=class extends Error{constructor(e,r){super(`Endpoint ${e} ${r} not found in OpenAPI spec`);this.method=e;this.path=r}};function Jr(){ke.clear()}async function Qr(i){let t=ke.get(i);return t||(t=fetch(i).then(async e=>{if(!e.ok)throw new $e(e.status);return await e.json()}).catch(e=>{throw ke.delete(i),e}),ke.set(i,t)),t}function Xr(){return globalThis.crypto?.randomUUID?.()??Math.random().toString(36).slice(2)}var ar=i=>/\bbirth/i.test(i?.description??""),lr=i=>i.key===`${i.group}.${i.name}`;function ei(i){let t=i.trim();if(!t)return[];try{let e=JSON.parse(t);if(Array.isArray(e))return e}catch{}return t.split(",").map(e=>e.trim()).filter(Boolean)}var g=class extends me{constructor(){super(...arguments);this.endpoint="vedic-astrology/birth-chart";this.method="POST";this.specUrl="";this.submitLabel="";this.serverIssues=null;this.autoload=!1;this.fullPages=!1;this.choices={};this.pickers=new Map;this.clearedIssues=new Set;this.fields=[];this.groups=[];this.modelOpensOnLoad=!1;this.repeats=[];this.formTitle="";this.hasLang=!1;this.values={};this.loaded=!1;this.specError=null;this.validationErrors=[];this.retryLoadSchema=()=>{this.loaded=!1,this.specError=null,this.loadSchema()};this.onSubmit=e=>{e.preventDefault(),this.submit()}}connectedCallback(){super.connectedCallback(),this.loadSchema()}async loadSchema(){this.specError=null;try{this.applyModel(await this.resolveModel())}catch(e){this.specError=this.specErrorMessage(e),this.loaded=!0,this.dispatchEvent(new CustomEvent("roxy-spec-error",{detail:{url:this.specUrl||sr,message:e instanceof Error?e.message:String(e)},bubbles:!0,composed:!0}))}}specErrorMessage(e){return e instanceof $e?this.t("HTTP error {{status}}",{status:e.status}):e instanceof we?this.t("Endpoint {{method}} {{path}} not found in OpenAPI spec",{method:e.method,path:e.path}):e instanceof Error?e.message:String(e)}async resolveModel(){return this.specUrl?this.modelFromSpec(this.specUrl):await this.tryLoadSlice()??this.modelFromSpec(sr)}async modelFromSpec(e){let r=await Qr(e),n=`/${this.endpoint.replace(/^\//,"")}`,o=r.paths?.[n]?.[this.method.toLowerCase()];if(!o)throw new we(this.method,n);return Kt(o,r.components?.schemas??{},this.endpoint,this.method)}async tryLoadSlice(){try{let e=await fetch(`${Wr}/${Vt(this.method,this.endpoint)}`);return e.ok?await e.json():null}catch{return null}}applyModel(e){(!e.groups||e.opensOnLoad===void 0)&&(e=Ge(e,this.method,this.endpoint)),this.fields=e.fields,this.groups=e.groups??[],this.modelOpensOnLoad=e.opensOnLoad??!1,this.repeats=e.repeats??[],this.formTitle=e.title,this.hasLang=e.hasLang;let r={};for(let n of e.fields){let o=n.viewerZone?void 0:this.fullPages&&n.name==="limit"&&this.roleOf(n)==="hidden-default"?n.max??n.default:n.default;o!==void 0&&(r[n.key]=o);let s=n.group&&lr(n)?this.initialValues?.[n.group]?.[n.name]:this.initialValues?.[n.key];s!==void 0&&(r[n.key]=s)}this.values=this.withoutDisabled(r),this.loaded=!0,this.loadChoices(),this.autoload&&this.opensOnLoad&&Ue(this.route)&&this.updateComplete.then(()=>this.submit())}get route(){return this.apiRoute??{publishableKey:this.publishableKey}}loadChoices(){for(let r of this.pickers.values())this.removeController(r);if(this.pickers.clear(),!Ue(this.route))return;let e=()=>({route:this.route,lang:this.requestLang()});for(let r of this.fields)if(r.source){if(r.required){let n=new ve(this,r.source,r.name,e,o=>this.pickChoice(r,o.value));n.query=String(this.values[r.key]??""),this.pickers.set(r.key,n);continue}this.choices={...this.choices,[r.key]:"loading"},Ze(this.route,r.source,r.name,this.requestLang()).then(n=>{this.choices={...this.choices,[r.key]:n}},()=>{let{[r.key]:n,...o}=this.choices;this.choices=o})}}setValue(e,r){this.setValues({[e]:r})}setValues(e){this.values=this.withoutDisabled({...this.values,...e});let r=Object.keys(e).filter(n=>this.serverIssues?.some(o=>o.path===n));r.length&&(this.clearedIssues=new Set([...this.clearedIssues,...r]))}isDisabled(e,r=this.values){let n=e.disabledWhen;return!!n&&r[n.field]===n.value}withoutDisabled(e){for(let r of this.fields)this.isDisabled(r,e)&&(e[r.key]=void 0);return e}willUpdate(e){e.has("serverIssues")&&(this.clearedIssues=new Set);let r=e.has("publishableKey")?W(this.publishableKey):void 0;r&&Me(this,r,{warn:!0})}liveIssues(){return(this.serverIssues??[]).filter(e=>!this.clearedIssues.has(e.path))}issueFor(e){return this.liveIssues().find(r=>r.path===e.key)}cityIssues(e){return this.liveIssues().filter(r=>{let n=this.fields.find(o=>o.key===r.path);return!!n&&this.roleOf(n)==="location"&&this.cityGroup(n)===e})}issuesForGroup(e){return this.liveIssues().filter(r=>r.path===e)}fieldLabel(e){return this.roleOf(e)==="location"||e.city?this.locationLabel(this.cityGroup(e)):e.group?`${this.groupName(e.group)} ${this.fieldText(e)}`:this.fieldText(e)}issueLines(e){return e.map(r=>m`<small part="field-error" class="field-error" role="alert">${r.message}</small>`)}fieldIssue(e){let r=this.issueFor(e);return r?m`<small part="field-error" class="field-error" id="${`roxy-form-${e.key}-error`}" role="alert">${r.message}</small>`:h}renderIssueSummary(){let e=this.liveIssues();if(e.length===0)return h;let r=n=>{let o=this.fields.find(a=>a.key===n);if(o)return this.fieldLabel(o);let s=this.groupKeys().find(a=>a===n);return s?this.groupName(s):this.fieldText({name:n.split(".")[0]??n})};return m`<div part="validation-error" class="validation-error" role="alert">${e.map(n=>m`<div><strong>${r(n.path)}</strong> ${n.message}</div>`)}</div>`}roleOf(e){return e.role??"normal"}isRendered(e){return this.roleOf(e)==="normal"}groupKeys(){return this.groups.map(e=>e.key)}groupHasLocation(e){return!!this.groups.find(r=>r.key===e)?.location}cityGroup(e){return this.groups.find(r=>r.location?.fields.includes(e.key))?.key??e.group}placeField(e){let r=this.fields.filter(n=>n.group===e);return r.find(n=>n.name==="latitude")??r.find(n=>n.name==="timezone")}locationRequired(e){return this.groups.find(r=>r.key===e)?.location?.required??!1}get soleChoice(){if(this.groupKeys().some(n=>this.groupHasLocation(n))||this.groupKeys().some(n=>n!==void 0))return null;let e=this.fields.filter(n=>n.required&&this.isRendered(n)),r=e[0];return e.length!==1||!r?null:r.kind==="tiles"||r.kind==="select"||this.pickers.has(r.key)?r:null}get opensOnLoad(){return this.modelOpensOnLoad}isFilter(e){return this.opensOnLoad&&!e.required&&!!(e.enum||e.source)}get selfSubmits(){if(this.soleChoice)return!0;if(!this.opensOnLoad)return!1;let e=this.fields.filter(r=>this.isRendered(r));return e.length>0&&e.every(r=>this.isFilter(r))}choiceKind(e){let r=this.choicesOf(e).map(n=>n.value);return this.isFilter(e)&&!be(r)?"select":this.choices[e.key]?Ke(r):e.kind}choicesOf(e){let r=this.choices[e.key];return Array.isArray(r)?r:(e.enum??[]).map(n=>({value:n,label:this.optionText(e.name,n)}))}effectiveSubmitLabel(){return this.submitLabel?this.submitLabel:Gt(this.fields,this.values)?this.t("Show right now"):this.t(Bt(this.endpoint,this.fields))}requestLang(){return kt(this)}fieldText(e){let r=this.requestLang();return e.label?Mt(r,e)??e.label:Qt(r,e.name,T[e.name])}optionText(e,r){return Xt(this.requestLang(),e,r)}onLocationFor(e){return r=>{let n=this.groups.find(s=>s.key===e)?.location?.fields??[],o={};for(let s of n){let a=this.fields.find(c=>c.key===s)?.name;a&&(o[s]=r[a])}this.setValues(o)}}chooseOption(e,r){if(this.isFilter(e)){this.setFilter(e,this.values[e.key]===r?"":r),this.submit();return}this.pickChoice(e,r)}pickChoice(e,r){this.setValue(e.key,r),this.resend()}resend(){let e=this.soleChoice;e&&this.values[e.key]&&this.submit()}setFilter(e,r){let n={[e.key]:r};for(let o of this.fields)o!==e&&(this.isFilter(o)||this.opensOnLoad&&o.kind==="text"&&this.isRendered(o))&&(n[o.key]=void 0);this.setValues(n)}onTilesKeyDown(e){return r=>{let n=this.choicesOf(e).filter(d=>!d.disabled).map(d=>d.value);if(n.length===0)return;let o=n.indexOf(this.values[e.key]),s;if(r.key==="Home")s=0;else if(r.key==="End")s=n.length-1;else if(r.key==="ArrowRight"||r.key==="ArrowDown")s=o===-1?0:(o+1)%n.length;else if(r.key==="ArrowLeft"||r.key==="ArrowUp")s=o===-1?n.length-1:(o-1+n.length)%n.length;else return;r.preventDefault();let a=n[s];if(a===void 0)return;this.chooseOption(e,a);let c=r.currentTarget,p=this.choicesOf(e).findIndex(d=>d.value===a);requestAnimationFrame(()=>c.querySelector(`[data-tile='${p}']`)?.focus())}}submit(){let e=this.collectMissing();if(e.keys.length>0){this.validationErrors=e.labels,this.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{missing:e.keys},bubbles:!0,composed:!0}));return}this.validationErrors=[],this.clearedIssues=new Set((this.serverIssues??[]).map(s=>s.path));let r={};for(let s of this.fields){let a=this.values[s.key];if(s.name==="seed"&&(a===void 0||a==="")&&(a=Xr()),s.viewerZone&&(a===void 0||a==="")&&(a=Jt()??s.default),a===void 0||a==="")continue;s.kind==="array"&&typeof a=="string"&&(a=ei(a));let c=s.group?ye(s.group):null;if(c){let p=r[c.key]??[],d=p[c.index]??{};d[s.name]=a,p[c.index]=d,r[c.key]=p}else if(s.group&&lr(s)){let p=r[s.group]??{};p[s.name]=a,r[s.group]=p}else r[s.key]=a}let n=this.fields.filter(s=>s.inQuery).map(s=>s.name),o=this.requestLang();this.hasLang&&o&&(r.lang=o,n.push("lang")),this.dispatchEvent(new CustomEvent("roxy-submit",{detail:{endpoint:this.endpoint,values:r,queryKeys:n,sticky:this.soleChoice!=null||this.opensOnLoad},bubbles:!0,composed:!0}))}collectMissing(){let e=[],r=[],n=new Set;for(let o of this.fields){if(!o.required)continue;let s=this.roleOf(o)==="location";if(!this.isRendered(o)&&!s)continue;let a=this.values[o.key];if(!(a!==void 0&&a!=="")){if(e.push(o.key),s){n.add(this.cityGroup(o));continue}r.push(this.fieldLabel(o))}}for(let o of n)r.push(this.locationLabel(o));return{keys:e,labels:r}}get readsEnglish(){return vt(this.effectiveLang())}renderTitle(){return this.readsEnglish?m`<h2 part="title" class="title" id="roxy-form-title">${this.formTitle}</h2>`:h}reqMark(e){return e.required?m`<span class="req" aria-hidden="true">*</span>`:h}description(e){if(!e.description||!this.readsEnglish)return h;if(e.description.length<=120)return m`<small part="hint" class="help">${e.description}</small>`;let r=e.description.split(". ")[0]??e.description;return m`<details part="hint" class="help-details"><summary><span class="help-lead">${r}</span>${qe()}</summary><small class="help help-full">${e.description}</small></details>`}renderTiles(e){let r=`roxy-form-${e.key}-label`,n=!!e.enum&&jt(e.enum),o=this.choicesOf(e),s=be(o.map(p=>p.value)),a=o.findIndex(p=>p.value===this.values[e.key]),c=a===-1?o.findIndex(p=>!p.disabled):a;return m`<div class="field tiles-field"><span class="label" id="${r}">${this.fieldText(e)}${this.reqMark(e)}</span><div class="${s?"tiles narrow":"tiles"}" role="radiogroup" aria-labelledby="${r}" @keydown="${this.onTilesKeyDown(e)}">${o.map((p,d)=>{let u=this.values[e.key]===p.value,l=n?Lt(p.value):void 0;return m`<button type="button" class="tile" role="radio" data-tile="${d}" aria-checked="${u?"true":"false"}" tabindex="${d===c?"0":"-1"}" ?disabled="${!!p.disabled||this.isDisabled(e)}" @click="${()=>this.chooseOption(e,p.value)}">${l?m`<span class="tile-glyph" aria-hidden="true">${l}</span>`:h} <span class="tile-label">${p.label}</span></button>`})}</div>${this.description(e)} ${this.fieldIssue(e)}</div>`}renderSelect(e){let r=`roxy-form-${e.key}`;return m`<div part="field" class="field"><label for="${r}">${this.fieldText(e)}${this.reqMark(e)}</label> <select id="${r}" ?required="${e.required}" ?disabled="${this.isDisabled(e)}" aria-invalid="${v(this.issueFor(e)?"true":void 0)}" aria-describedby="${v(this.issueFor(e)?`${r}-error`:void 0)}" .value="${xt(this.values[e.key]??"")}" @change="${n=>this.chooseOption(e,n.target.value)}"><option value="">${this.t("Choose")}</option>${this.choicesOf(e).map(n=>m`<option value="${n.value}" ?selected="${this.values[e.key]===n.value}" ?disabled="${!!n.disabled}">${n.label}</option>`)}</select> ${this.description(e)} ${this.fieldIssue(e)}</div>`}renderPickerField(e,r){let n=`roxy-form-${e.key}`,o=this.soleChoice?.key===e.key&&this.readsEnglish,s=this.issueFor(e);return m`<div part="field" class="field">${o?h:m`<label for="${n}">${this.fieldText(e)}${this.reqMark(e)}</label>`} ${ir(r,n,{placeholder:this.t("Type to search"),empty:this.t("{{count}} matches",{count:0}),loading:this.t("Loading")},{labelledby:o?"roxy-form-title":void 0,describedby:s?`${n}-error`:void 0,invalid:!!s})} ${this.fieldIssue(e)}</div>`}renderToggle(e){let r=`roxy-form-${e.key}`,n=this.values[e.key]===!0;return m`<div part="field" class="field"><div class="toggle-row"><button type="button" id="${r}" class="toggle" role="switch" aria-checked="${n?"true":"false"}" @click="${()=>this.pickChoice(e,!n)}"><span class="knob"></span></button> <label class="toggle-label" for="${r}">${this.fieldText(e)}${this.reqMark(e)}</label></div>${this.description(e)} ${this.fieldIssue(e)}</div>`}renderInput(e){let r=`roxy-form-${e.key}`,n=e.kind==="datetime"?"datetime-local":e.kind==="number"?"number":e.kind,o=e.example!=null?String(e.example):"",s=e.kind==="array"?this.t("Comma separated"):this.readsEnglish||!new RegExp("\\p{L}","u").test(o)?o:"";return m`<div part="field" class="field"><label for="${r}">${this.fieldText(e)}${this.reqMark(e)}</label> <input id="${r}" type="${e.kind==="array"?"text":n}" ?required="${e.required}" ?disabled="${this.isDisabled(e)}" aria-invalid="${v(this.issueFor(e)?"true":void 0)}" aria-describedby="${v(this.issueFor(e)?`${r}-error`:void 0)}" min="${v(e.min)}" max="${v(e.max)}" step="${e.kind==="number"?"any":h}" placeholder="${s||h}" .value="${this.values[e.key]??""}" @input="${a=>{let c=this.coerce(e.kind,a.target.value);this.opensOnLoad&&e.kind==="text"?this.setFilter(e,c):this.setValue(e.key,c)}}" @change="${()=>this.resend()}"> ${this.description(e)} ${this.fieldIssue(e)}</div>`}renderField(e){if(e.city)return this.renderTimezoneCity(e);let r=this.pickers.get(e.key);if(r)return this.renderPickerField(e,r);let n=this.choices[e.key];return n==="loading"?m`<div class="field"><div class="roxy-skeleton field-skeleton" aria-label="${this.t("Loading")}" role="status"></div></div>`:n||e.kind==="tiles"||e.kind==="select"?this.choiceKind(e)==="tiles"?this.renderTiles(e):this.renderSelect(e):e.kind==="toggle"?this.renderToggle(e):this.renderInput(e)}groupName(e){return xe(e,(r,n)=>this.t(r,n),r=>this.fieldText({name:r}))}repeatCount(e){return new Set(this.fields.map(r=>r.group&&ye(r.group)).filter(r=>r&&r.key===e).map(r=>r.index)).size}addRecord(e){let r=this.repeatCount(e),n=Ut(this.fields,e,r),o=this.groups.find(a=>a.key===S(e,0));if(o){let a=c=>c.replace(`${S(e,0)}.`,`${S(e,r)}.`);this.groups=[...this.groups,{...o,key:S(e,r),label:xe(S(e,r)),...o.location&&{location:{...o.location,fields:o.location.fields.map(a)}}}]}let s={...this.values};for(let a of n)a.default!==void 0&&(s[a.key]=a.default);this.values=s,this.fields=[...this.fields,...n]}removeRecord(e){let r=S(e,this.repeatCount(e)-1);this.fields=this.fields.filter(o=>o.group!==r),this.groups=this.groups.filter(o=>o.key!==r);let n={...this.values};for(let o of Object.keys(n))o.startsWith(`${r}.`)&&delete n[o];this.values=n}repeatControls(e){let r=this.repeatCount(e.key);return e.max<=e.min?h:m`<div class="repeat-controls">${r<e.max?m`<button type="button" class="repeat-btn" @click="${()=>this.addRecord(e.key)}"><span aria-hidden="true">+</span> ${this.t("Add")}</button>`:h} ${r>e.min?m`<button type="button" class="repeat-btn" @click="${()=>this.removeRecord(e.key)}"><span aria-hidden="true">−</span> ${this.t("Remove")}</button>`:h}</div>`}locationLabel(e){return e?this.t("{{group}} location",{group:this.groupName(e)}):ar(this.placeField(e))?this.t("Birth location"):this.t("Location")}locationBlock(e){return m`<div class="location-block"><label>${this.locationLabel(e)}${this.locationRequired(e)?m`<span class="req" aria-hidden="true">*</span>`:h}</label> ${this.citySearch(e,this.onLocationFor(e))} ${this.issueLines(this.cityIssues(e))}</div>`}renderTimezoneCity(e){return m`<div part="field" class="field location-block"><label>${this.locationLabel(e.group)}${this.reqMark(e)}</label> ${this.citySearch(e.group,r=>this.pickChoice(e,r.timezone))} ${this.fieldIssue(e)}</div>`}citySearch(e,r){let n=e?this.t("{{group}} city",{group:this.groupName(e)}):ar(this.placeField(e))?this.t("City of birth"):void 0;return m`<roxy-location-search endpoint="${v(this.locationUrl||void 0)}" publishable-key="${v(this.publishableKey)}" .submitUrl="${this.route.submitUrl}" .submitContext="${this.route.submitContext}" lang="${v(this.effectiveLang())}" placeholder="${v(n)}" @roxy-location-select="${o=>r(o.detail)}"></roxy-location-search><small class="help">${this.t("Type a city, then pick it from the list.")}</small>`}groupCard(e){let r=this.fields.filter(n=>n.group===e&&this.isRendered(n));return m`<fieldset part="group" class="person-group"><legend>${this.groupName(e)}</legend>${this.groupHasLocation(e)?this.locationBlock(e):h}<div class="fields">${r.map(n=>this.renderField(n))}</div>${this.issueLines(this.issuesForGroup(e))}</fieldset>`}render(){if(!this.loaded)return m`<form><div class="roxy-skeleton form-skeleton"></div></form>`;if(this.specError)return m`<div class="roxy-error" role="alert">${this.t("Schema load failed: {{message}}",{message:this.specError})} <button type="button" class="submit" @click="${this.retryLoadSchema}">${this.t("Retry")}</button></div>`;let e=W(this.publishableKey);if(e)return m`<form>${this.renderTitle()}<div part="validation-error" class="validation-error" role="alert">${this.t(e.message)}</div></form>`;let r=this.fields.filter(d=>!d.group&&this.isRendered(d)),n=this.groupKeys().filter(d=>d!==void 0),o=r.filter(d=>!d.fold),s=r.filter(d=>d.fold),a=n.filter(d=>!this.groups.find(u=>u.key===d)?.fold),c=n.filter(d=>this.groups.find(u=>u.key===d)?.fold),p=s.length>0||c.length>0;return m`<form @submit="${this.onSubmit}">${this.renderTitle()} ${this.validationErrors.length>0?m`<div part="validation-error" class="validation-error" role="alert"><strong>${this.t("Please complete:")}</strong> ${this.validationErrors.join(", ")}</div>`:h} ${this.renderIssueSummary()}<div class="fields">${o.map(d=>this.renderField(d))}</div>${this.groupHasLocation(void 0)?this.locationBlock(void 0):h} ${a.map(d=>this.groupCard(d))} ${this.repeats.map(d=>this.repeatControls(d))} ${p?m`<details part="advanced" class="advanced" ?open="${this.liveIssues().some(d=>[...s.map(u=>u.key),...c].some(u=>d.path===u||d.path.startsWith(`${u}.`)))}"><summary>${this.t("Advanced")}${qe()}</summary><div class="fields">${s.map(d=>this.renderField(d))}</div>${c.map(d=>this.groupCard(d))}</details>`:h} ${this.selfSubmits?h:m`<button part="submit" class="submit" type="submit">${this.effectiveSubmitLabel()}</button>`}</form>`}coerce(e,r){if(r!==""){if(e==="number"){let n=Number(r);return Number.isFinite(n)?n:void 0}return r}}};g.styles=[Ct,Dt,nr,w`form{gap:var(--roxy-space-md);background:var(--roxy-surface);color:var(--roxy-fg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-lg);padding:var(--roxy-space-lg);box-shadow:var(--roxy-shadow-sm);grid-template-columns:minmax(0,1fr);display:grid}.title{margin:0}.fields{align-items:start;gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(22ch,1fr));display:grid}.fields:empty{display:none}.person-group{gap:var(--roxy-space-md);min-inline-size:0;padding:var(--roxy-space-md) 0 0;border:0;border-block-start:1px solid var(--roxy-border);margin:0;display:grid}.person-group legend{float:inline-start;color:var(--roxy-fg);font-weight:var(--roxy-weight-bold);padding:0}.field{gap:var(--roxy-space-xs);flex-direction:column;min-inline-size:0;display:flex}.fields>*{min-inline-size:0}.tiles-field{grid-column:1/-1}label,.label{font-size:var(--roxy-text-sm);color:var(--roxy-secondary)}.req{color:var(--roxy-danger-fg);margin-inline-start:var(--roxy-space-xs)}input,select{inline-size:100%;min-inline-size:0;min-block-size:var(--roxy-touch)}.help{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.field-error{color:var(--roxy-danger-fg);font-size:var(--roxy-text-xs)}input[aria-invalid=true],select[aria-invalid=true]{border-color:var(--roxy-danger)}input:disabled,select:disabled{cursor:default;color:var(--roxy-muted);border-style:dashed}.help-details>summary{align-items:center;gap:var(--roxy-space-xs);color:var(--roxy-muted);font-size:var(--roxy-text-xs);display:flex}.help-details .help-lead{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.help-details .help-full{margin-block-start:var(--roxy-space-xs);display:block}.location-block{gap:var(--roxy-space-xs);grid-column:1/-1;display:grid}.tiles{gap:var(--roxy-space-sm);grid-template-columns:repeat(auto-fit,minmax(10ch,1fr));display:grid}.tiles.narrow{gap:var(--roxy-space-xs);grid-template-columns:repeat(auto-fill,minmax(4ch,1fr))}.tile{justify-content:center;align-items:center;gap:calc(var(--roxy-space-unit) / 2);min-block-size:var(--roxy-touch);padding:var(--roxy-space-sm);background:var(--roxy-bg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);color:var(--roxy-fg);font-size:var(--roxy-text-sm);cursor:pointer;transition:border-color var(--roxy-motion-duration) var(--roxy-motion-easing), background-color var(--roxy-motion-duration) var(--roxy-motion-easing);flex-direction:column;display:flex}.tile:hover:not(:disabled){border-color:var(--roxy-accent)}.tile:disabled{cursor:default;color:var(--roxy-muted);border-style:dashed}.tile[aria-checked=true]{border-color:var(--roxy-accent);background:color-mix(in srgb, var(--roxy-accent) 12%, transparent);color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold)}.tile-glyph{font-size:var(--roxy-text-lg);line-height:1}.toggle-row{align-items:center;gap:var(--roxy-space-sm);display:flex}.toggle{box-sizing:content-box;block-size:.8lh;inline-size:1.6lh;padding:calc(var(--roxy-space-unit) / 2);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-full);background:var(--roxy-border);cursor:pointer;transition:background-color var(--roxy-motion-duration) var(--roxy-motion-easing);flex-shrink:0;display:inline-flex}.toggle[aria-checked=true]{background:var(--roxy-accent);border-color:var(--roxy-accent)}.toggle .knob{border-radius:var(--roxy-radius-full);background:var(--roxy-bg);block-size:.8lh;inline-size:.8lh;transition:transform var(--roxy-motion-duration) var(--roxy-motion-easing)}.toggle[aria-checked=true] .knob{transform:translate(100%)}.toggle-label{cursor:pointer}@media (prefers-reduced-motion:reduce){.tile,.toggle,.toggle .knob{transition:none}}.advanced{border-block-start:1px solid var(--roxy-border);padding-block-start:var(--roxy-space-md)}.advanced>summary{align-items:center;gap:var(--roxy-space-xs);font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold);color:var(--roxy-fg);display:flex}.advanced[open]>summary{margin-block-end:var(--roxy-space-md)}.repeat-controls{gap:var(--roxy-space-sm);display:flex}.repeat-btn{color:var(--roxy-accent-ink);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);padding:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold);cursor:pointer;background:0 0}.repeat-btn:hover{border-color:var(--roxy-accent-ink)}.advanced .fields,.advanced .person-group{margin-block-start:var(--roxy-space-md)}.validation-error{gap:var(--roxy-space-xs);border-inline-start:var(--roxy-line-thick) solid var(--roxy-danger);color:var(--roxy-danger-fg);font-size:var(--roxy-text-sm);padding-inline-start:var(--roxy-space-sm);display:grid}button.submit{min-block-size:var(--roxy-touch);background:var(--roxy-accent-ink);color:var(--roxy-bg);border-radius:var(--roxy-radius-md);padding:var(--roxy-space-sm) var(--roxy-space-lg);font-weight:var(--roxy-weight-bold);cursor:pointer;transition:transform var(--roxy-motion-duration) var(--roxy-motion-easing);border:0;justify-self:start}button.submit:hover{transform:scale(1.02)}@media (prefers-reduced-motion:reduce){button.submit{transition:none}}.field-skeleton{block-size:var(--roxy-touch)}.form-skeleton{block-size:5lh}`],y([$({type:String,attribute:"data-endpoint"})],g.prototype,"endpoint",2),y([$({type:String})],g.prototype,"method",2),y([$({type:String,attribute:"spec-url"})],g.prototype,"specUrl",2),y([$({type:String,attribute:"submit-label"})],g.prototype,"submitLabel",2),y([$({type:String,attribute:"publishable-key"})],g.prototype,"publishableKey",2),y([$({type:String,attribute:"location-url"})],g.prototype,"locationUrl",2),y([$({attribute:!1})],g.prototype,"initialValues",2),y([$({attribute:!1})],g.prototype,"serverIssues",2),y([$({attribute:!1})],g.prototype,"apiRoute",2),y([$({attribute:!1})],g.prototype,"autoload",2),y([$({attribute:!1})],g.prototype,"fullPages",2),y([_()],g.prototype,"choices",2),y([_()],g.prototype,"clearedIssues",2),y([_()],g.prototype,"fields",2),y([_()],g.prototype,"repeats",2),y([_()],g.prototype,"formTitle",2),y([_()],g.prototype,"hasLang",2),y([_()],g.prototype,"values",2),y([_()],g.prototype,"loaded",2),y([_()],g.prototype,"specError",2),y([_()],g.prototype,"validationErrors",2),g=y([Ot("roxy-endpoint-form")],g);return fr(ti);})();
206
4
  /*! Bundled license information:
207
5
 
208
6
  @lit/reactive-element/css-tag.js: