@roxyapi/ui 0.31.0 → 0.31.1

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.
@@ -1,4 +1,4 @@
1
- var RoxyUI_bodygraph=(()=>{var X=Object.defineProperty;var Oe=Object.getOwnPropertyDescriptor;var Tt=Object.getOwnPropertyNames;var Lt=Object.prototype.hasOwnProperty;var Pt=(n,e)=>{for(var t in e)X(n,t,{get:e[t],enumerable:!0})},Ot=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Tt(e))!Lt.call(n,o)&&o!==t&&X(n,o,{get:()=>e[o],enumerable:!(r=Oe(e,o))||r.enumerable});return n};var Mt=n=>Ot(X({},"__esModule",{value:!0}),n),f=(n,e,t,r)=>{for(var o=r>1?void 0:r?Oe(e,t):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(o=(r?i(e,t,o):i(o))||o);return r&&o&&X(e,t,o),o};var br={};Pt(br,{ROXY_UI_TOKENS_STYLE_ID:()=>J,RoxyBodygraph:()=>M,injectRoxyTokens:()=>Z});var Me=`/**
1
+ var RoxyUI_bodygraph=(()=>{var X=Object.defineProperty;var Me=Object.getOwnPropertyDescriptor;var Lt=Object.getOwnPropertyNames;var Pt=Object.prototype.hasOwnProperty;var Ot=(o,e)=>{for(var t in e)X(o,t,{get:e[t],enumerable:!0})},Mt=(o,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Lt(e))!Pt.call(o,n)&&n!==t&&X(o,n,{get:()=>e[n],enumerable:!(r=Me(e,n))||r.enumerable});return o};var Nt=o=>Mt(X({},"__esModule",{value:!0}),o),f=(o,e,t,r)=>{for(var n=r>1?void 0:r?Me(e,t):e,s=o.length-1,i;s>=0;s--)(i=o[s])&&(n=(r?i(e,t,n):i(n))||n);return r&&n&&X(e,t,n),n};var Ar={};Ot(Ar,{ROXY_UI_TOKENS_STYLE_ID:()=>J,RoxyBodygraph:()=>N,injectRoxyTokens:()=>Z});var Ne=`/**
2
2
  * Roxy UI design tokens. 47 CSS custom properties that every component reads. Light + dark defaults. Host page overrides at :root or per element. No Tailwind, no class-name overrides, no JS theme switcher.
3
3
  *
4
4
  * Delivery model: this file ships as a global light-DOM stylesheet (linked, or auto-injected by the CDN bundle). Custom properties inherit through the shadow boundary, so tokens set on a light-DOM ancestor reach every component shadow. The explicit theme blocks therefore target light-DOM selectors (:root, .dark, [data-theme="dark"], a wrapper element), NOT :host (a :host rule in a global sheet matches nothing). The :host([data-theme]) selectors are kept only for the case where this CSS is ever adopted directly into a shadow root; they are inert in global delivery.
@@ -278,18 +278,18 @@ var RoxyUI_bodygraph=(()=>{var X=Object.defineProperty;var Oe=Object.getOwnPrope
278
278
  --roxy-motion-duration: 0ms;
279
279
  }
280
280
  }
281
- `;var J="roxy-ui-tokens";function Z(){if(typeof document>"u")return null;let n=document.getElementById(J);if(n)return n;let e=document.createElement("style");return e.id=J,e.textContent=Me,document.head.prepend(e),e}var Q=globalThis,ee=Q.ShadowRoot&&(Q.ShadyCSS===void 0||Q.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,fe=Symbol(),Ie=new WeakMap,H=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==fe)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(ee&&e===void 0){let r=t!==void 0&&t.length===1;r&&(e=Ie.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&Ie.set(t,e))}return e}toString(){return this.cssText}},Ne=n=>new H(typeof n=="string"?n:n+"",void 0,fe),b=(n,...e)=>{let t=n.length===1?n[0]:e.reduce((r,o,s)=>r+(i=>{if(i._$cssResult$===!0)return i.cssText;if(typeof i=="number")return i;throw Error("Value passed to 'css' function must be a 'css' function result: "+i+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+n[s+1],n[0]);return new H(t,n,fe)},Ue=(n,e)=>{if(ee)n.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of e){let r=document.createElement("style"),o=Q.litNonce;o!==void 0&&r.setAttribute("nonce",o),r.textContent=t.cssText,n.appendChild(r)}},me=ee?n=>n:n=>n instanceof CSSStyleSheet?(e=>{let t="";for(let r of e.cssRules)t+=r.cssText;return Ne(t)})(n):n;var{is:It,defineProperty:Nt,getOwnPropertyDescriptor:Ut,getOwnPropertyNames:Dt,getOwnPropertySymbols:Ht,getPrototypeOf:Gt}=Object,te=globalThis,De=te.trustedTypes,Bt=De?De.emptyScript:"",jt=te.reactiveElementPolyfillSupport,G=(n,e)=>n,B={toAttribute(n,e){switch(e){case Boolean:n=n?Bt:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,e){let t=n;switch(e){case Boolean:t=n!==null;break;case Number:t=n===null?null:Number(n);break;case Object:case Array:try{t=JSON.parse(n)}catch{t=null}}return t}},re=(n,e)=>!It(n,e),He={attribute:!0,type:String,converter:B,reflect:!1,useDefault:!1,hasChanged:re};Symbol.metadata??=Symbol("metadata"),te.litPropertyMetadata??=new WeakMap;var _=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=He){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let r=Symbol(),o=this.getPropertyDescriptor(e,r,t);o!==void 0&&Nt(this.prototype,e,o)}}static getPropertyDescriptor(e,t,r){let{get:o,set:s}=Ut(this.prototype,e)??{get(){return this[t]},set(i){this[t]=i}};return{get:o,set(i){let c=o?.call(this);s?.call(this,i),this.requestUpdate(e,c,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??He}static _$Ei(){if(this.hasOwnProperty(G("elementProperties")))return;let e=Gt(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(G("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(G("properties"))){let t=this.properties,r=[...Dt(t),...Ht(t)];for(let o of r)this.createProperty(o,t[o])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[r,o]of t)this.elementProperties.set(r,o)}this._$Eh=new Map;for(let[t,r]of this.elementProperties){let o=this._$Eu(t,r);o!==void 0&&this._$Eh.set(o,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let r=new Set(e.flat(1/0).reverse());for(let o of r)t.unshift(me(o))}else e!==void 0&&t.push(me(e));return t}static _$Eu(e,t){let r=t.attribute;return r===!1?void 0:typeof r=="string"?r:typeof e=="string"?e.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(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Ue(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$ET(e,t){let r=this.constructor.elementProperties.get(e),o=this.constructor._$Eu(e,r);if(o!==void 0&&r.reflect===!0){let s=(r.converter?.toAttribute!==void 0?r.converter:B).toAttribute(t,r.type);this._$Em=e,s==null?this.removeAttribute(o):this.setAttribute(o,s),this._$Em=null}}_$AK(e,t){let r=this.constructor,o=r._$Eh.get(e);if(o!==void 0&&this._$Em!==o){let s=r.getPropertyOptions(o),i=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:B;this._$Em=o;let c=i.fromAttribute(t,s.type);this[o]=c??this._$Ej?.get(o)??c,this._$Em=null}}requestUpdate(e,t,r,o=!1,s){if(e!==void 0){let i=this.constructor;if(o===!1&&(s=this[e]),r??=i.getPropertyOptions(e),!((r.hasChanged??re)(s,t)||r.useDefault&&r.reflect&&s===this._$Ej?.get(e)&&!this.hasAttribute(i._$Eu(e,r))))return;this.C(e,t,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:r,reflect:o,wrapped:s},i){r&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,i??t??this[e]),s!==!0||i!==void 0)||(this._$AL.has(e)||(this.hasUpdated||r||(t=void 0),this._$AL.set(e,t)),o===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[o,s]of this._$Ep)this[o]=s;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[o,s]of r){let{wrapped:i}=s,c=this[o];i!==!0||this._$AL.has(o)||c===void 0||this.C(o,void 0,s,c)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(t)):this._$EM()}catch(r){throw e=!1,this._$EM(),r}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(e){}firstUpdated(e){}};_.elementStyles=[],_.shadowRootOptions={mode:"open"},_[G("elementProperties")]=new Map,_[G("finalized")]=new Map,jt?.({ReactiveElement:_}),(te.reactiveElementVersions??=[]).push("2.1.2");var Se=globalThis,Ge=n=>n,ne=Se.trustedTypes,Be=ne?ne.createPolicy("lit-html",{createHTML:n=>n}):void 0,Ye="$lit$",k=`lit$${Math.random().toFixed(9).slice(2)}$`,Ve="?"+k,zt=`<${Ve}>`,L=document,z=()=>L.createComment(""),K=n=>n===null||typeof n!="object"&&typeof n!="function",Ae=Array.isArray,Kt=n=>Ae(n)||typeof n?.[Symbol.iterator]=="function",ye=`[
282
- \f\r]`,j=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,je=/-->/g,ze=/>/g,E=RegExp(`>|${ye}(?:([^\\s"'>=/]+)(${ye}*=${ye}*(?:[^
283
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Ke=/'/g,qe=/"/g,We=/^(?:script|style|textarea|title)$/i,_e=n=>(e,...t)=>({_$litType$:n,strings:e,values:t}),d=_e(1),w=_e(2),Cr=_e(3),P=Symbol.for("lit-noChange"),l=Symbol.for("lit-nothing"),Fe=new WeakMap,T=L.createTreeWalker(L,129);function Xe(n,e){if(!Ae(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return Be!==void 0?Be.createHTML(e):e}var qt=(n,e)=>{let t=n.length-1,r=[],o,s=e===2?"<svg>":e===3?"<math>":"",i=j;for(let c=0;c<t;c++){let a=n[c],h,u,g=-1,S=0;for(;S<a.length&&(i.lastIndex=S,u=i.exec(a),u!==null);)S=i.lastIndex,i===j?u[1]==="!--"?i=je:u[1]!==void 0?i=ze:u[2]!==void 0?(We.test(u[2])&&(o=RegExp("</"+u[2],"g")),i=E):u[3]!==void 0&&(i=E):i===E?u[0]===">"?(i=o??j,g=-1):u[1]===void 0?g=-2:(g=i.lastIndex-u[2].length,h=u[1],i=u[3]===void 0?E:u[3]==='"'?qe:Ke):i===qe||i===Ke?i=E:i===je||i===ze?i=j:(i=E,o=void 0);let A=i===E&&n[c+1].startsWith("/>")?" ":"";s+=i===j?a+zt:g>=0?(r.push(h),a.slice(0,g)+Ye+a.slice(g)+k+A):a+k+(g===-2?c:A)}return[Xe(n,s+(n[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]},q=class n{constructor({strings:e,_$litType$:t},r){let o;this.parts=[];let s=0,i=0,c=e.length-1,a=this.parts,[h,u]=qt(e,t);if(this.el=n.createElement(h,r),T.currentNode=this.el.content,t===2||t===3){let g=this.el.content.firstChild;g.replaceWith(...g.childNodes)}for(;(o=T.nextNode())!==null&&a.length<c;){if(o.nodeType===1){if(o.hasAttributes())for(let g of o.getAttributeNames())if(g.endsWith(Ye)){let S=u[i++],A=o.getAttribute(g).split(k),W=/([.?@])?(.*)/.exec(S);a.push({type:1,index:s,name:W[2],strings:A,ctor:W[1]==="."?be:W[1]==="?"?ve:W[1]==="@"?$e:N}),o.removeAttribute(g)}else g.startsWith(k)&&(a.push({type:6,index:s}),o.removeAttribute(g));if(We.test(o.tagName)){let g=o.textContent.split(k),S=g.length-1;if(S>0){o.textContent=ne?ne.emptyScript:"";for(let A=0;A<S;A++)o.append(g[A],z()),T.nextNode(),a.push({type:2,index:++s});o.append(g[S],z())}}}else if(o.nodeType===8)if(o.data===Ve)a.push({type:2,index:s});else{let g=-1;for(;(g=o.data.indexOf(k,g+1))!==-1;)a.push({type:7,index:s}),g+=k.length-1}s++}}static createElement(e,t){let r=L.createElement("template");return r.innerHTML=e,r}};function I(n,e,t=n,r){if(e===P)return e;let o=r!==void 0?t._$Co?.[r]:t._$Cl,s=K(e)?void 0:e._$litDirective$;return o?.constructor!==s&&(o?._$AO?.(!1),s===void 0?o=void 0:(o=new s(n),o._$AT(n,t,r)),r!==void 0?(t._$Co??=[])[r]=o:t._$Cl=o),o!==void 0&&(e=I(n,o._$AS(n,e.values),o,r)),e}var xe=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:r}=this._$AD,o=(e?.creationScope??L).importNode(t,!0);T.currentNode=o;let s=T.nextNode(),i=0,c=0,a=r[0];for(;a!==void 0;){if(i===a.index){let h;a.type===2?h=new F(s,s.nextSibling,this,e):a.type===1?h=new a.ctor(s,a.name,a.strings,this,e):a.type===6&&(h=new we(s,this,e)),this._$AV.push(h),a=r[++c]}i!==a?.index&&(s=T.nextNode(),i++)}return T.currentNode=L,o}p(e){let t=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}},F=class n{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,r,o){this.type=2,this._$AH=l,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=o,this._$Cv=o?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=I(this,e,t),K(e)?e===l||e==null||e===""?(this._$AH!==l&&this._$AR(),this._$AH=l):e!==this._$AH&&e!==P&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Kt(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==l&&K(this._$AH)?this._$AA.nextSibling.data=e:this.T(L.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:r}=e,o=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=q.createElement(Xe(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===o)this._$AH.p(t);else{let s=new xe(o,this),i=s.u(this.options);s.p(t),this.T(i),this._$AH=s}}_$AC(e){let t=Fe.get(e.strings);return t===void 0&&Fe.set(e.strings,t=new q(e)),t}k(e){Ae(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,r,o=0;for(let s of e)o===t.length?t.push(r=new n(this.O(z()),this.O(z()),this,this.options)):r=t[o],r._$AI(s),o++;o<t.length&&(this._$AR(r&&r._$AB.nextSibling,o),t.length=o)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let r=Ge(e).nextSibling;Ge(e).remove(),e=r}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},N=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,o,s){this.type=1,this._$AH=l,this._$AN=void 0,this.element=e,this.name=t,this._$AM=o,this.options=s,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=l}_$AI(e,t=this,r,o){let s=this.strings,i=!1;if(s===void 0)e=I(this,e,t,0),i=!K(e)||e!==this._$AH&&e!==P,i&&(this._$AH=e);else{let c=e,a,h;for(e=s[0],a=0;a<s.length-1;a++)h=I(this,c[r+a],t,a),h===P&&(h=this._$AH[a]),i||=!K(h)||h!==this._$AH[a],h===l?e=l:e!==l&&(e+=(h??"")+s[a+1]),this._$AH[a]=h}i&&!o&&this.j(e)}j(e){e===l?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},be=class extends N{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===l?void 0:e}},ve=class extends N{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==l)}},$e=class extends N{constructor(e,t,r,o,s){super(e,t,r,o,s),this.type=5}_$AI(e,t=this){if((e=I(this,e,t,0)??l)===P)return;let r=this._$AH,o=e===l&&r!==l||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,s=e!==l&&(r===l||o);o&&this.element.removeEventListener(this.name,this,r),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},we=class{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){I(this,e)}};var Ft=Se.litHtmlPolyfillSupport;Ft?.(q,F),(Se.litHtmlVersions??=[]).push("3.3.3");var Je=(n,e,t)=>{let r=t?.renderBefore??e,o=r._$litPart$;if(o===void 0){let s=t?.renderBefore??null;r._$litPart$=o=new F(e.insertBefore(z(),s),s,void 0,t??{})}return o._$AI(n),o};var ke=globalThis,R=class extends _{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Je(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return P}};R._$litElement$=!0,R.finalized=!0,ke.litElementHydrateSupport?.({LitElement:R});var Yt=ke.litElementPolyfillSupport;Yt?.({LitElement:R});(ke.litElementVersions??=[]).push("4.2.2");var Ze=n=>(e,t)=>{t!==void 0?t.addInitializer(()=>{customElements.define(n,e)}):customElements.define(n,e)};var Vt={attribute:!0,type:String,converter:B,reflect:!1,hasChanged:re},Wt=(n=Vt,e,t)=>{let{kind:r,metadata:o}=t,s=globalThis.litPropertyMetadata.get(o);if(s===void 0&&globalThis.litPropertyMetadata.set(o,s=new Map),r==="setter"&&((n=Object.create(n)).wrapped=!0),s.set(t.name,n),r==="accessor"){let{name:i}=t;return{set(c){let a=e.get.call(this);e.set.call(this,c),this.requestUpdate(i,a,n,!0,c)},init(c){return c!==void 0&&this.C(i,void 0,n,c),c}}}if(r==="setter"){let{name:i}=t;return function(c){let a=this[i];e.call(this,c),this.requestUpdate(i,a,n,!0,c)}}throw Error("Unsupported decorator location: "+r)};function v(n){return(e,t)=>typeof t=="object"?Wt(n,e,t):((r,o,s)=>{let i=o.hasOwnProperty(s);return o.constructor.createProperty(s,r),i?Object.getOwnPropertyDescriptor(o,s):void 0})(n,e,t)}function C(n){return v({...n,state:!0,attribute:!1})}function se(n){return n.toLowerCase().replace(/[\s_-]+/g," ").trim()}var Xt=(n,e)=>e?n[se(e)]:void 0,Jt={sun:"☉",moon:"☽",mercury:"☿",venus:"♀",earth:"♁",mars:"♂",jupiter:"♃",saturn:"♄",uranus:"♅",neptune:"♆",pluto:"♇",rahu:"☊",ketu:"☋",ascendant:"Asc",lagna:"La","north node":"☊","south node":"☋",chiron:"⚷",lilith:"⚸","black moon lilith":"⚸"},Qe=n=>Xt(Jt,n);var Y=n=>n??l;function et(n){if(n.lang)return n.lang;if(typeof document>"u")return;let e=n.closest?.("[lang]")?.getAttribute("lang");return e||document.documentElement.lang||void 0}var tt="__ROXY_UI_I18N__";function nt(){let n=globalThis,e=n[tt];if(e)return e;let t={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return n[tt]=t,t}function rt(n,e){return e?n.replace(/\{\{(\w+)\}\}/g,(t,r)=>r in e?String(e[r]??""):t):n}function ot(n,e,t){if(!n)return rt(e,t);let{catalogs:r}=nt(),o=n.toLowerCase(),s=r[o]??r[o.split("-")[0]];return rt(s?.[se(e)]??e,t)}function st(n){let{listeners:e}=nt();return e.add(n),()=>{e.delete(n)}}var ie=class{constructor(e){this.host=e,e.addController(this)}hostConnected(){this.unsubscribe=st(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var ae=class extends R{constructor(){super();this.translator=(t,r)=>this.t(t,r);new ie(this)}t(t,r){return ot(this.effectiveLang(),t,r)}effectiveLang(){return et(this)}};var le=b`:host{font-family:var(--roxy-font-sans,system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-base,1rem);line-height:var(--roxy-leading-normal,1.5);animation:roxy-fade-in var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,cubic-bezier(.4, 0, .2, 1)) both;background:0 0;display:block;container-type:inline-size}: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,var(--roxy-font-sans,system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif))}@keyframes roxy-fade-in{0%{opacity:0;transform:translateY(2px)}to{opacity:1;transform:translateY(0)}}@media (prefers-reduced-motion:reduce){:host{animation:none}}.roxy-skeleton{background:linear-gradient(90deg, var(--roxy-border,#e4e4e7) 0%, color-mix(in srgb, var(--roxy-border,#e4e4e7) 60%, transparent) 50%, var(--roxy-border,#e4e4e7) 100%);border-radius:var(--roxy-radius-md,8px);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,1.5rem);color:var(--roxy-muted,#71717a);text-align:center;font-size:var(--roxy-text-sm,.875rem)}.roxy-error{gap:var(--roxy-space-sm,.5rem);padding:var(--roxy-space-lg,1.5rem);background:var(--roxy-surface,#fff);border:1px solid var(--roxy-danger,#dc2626);border-radius:var(--roxy-radius-md,8px);color:var(--roxy-danger-fg,#991b1b);font-size:var(--roxy-text-sm,.875rem);justify-items:start;display:grid}.roxy-surface{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a)}:host(:focus-within) .roxy-card{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}.roxy-attribution{margin-top:var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-align:right}.roxy-attribution a{color:inherit;text-decoration:none}.roxy-attribution a:hover{color:var(--roxy-accent-ink,#b45309);text-decoration:underline}.roxy-attribution a:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}.roxy-edit-bar{margin-bottom:var(--roxy-space-sm,.5rem);justify-content:flex-end;display:flex}.roxy-edit{padding:var(--roxy-space-xs,.25rem) var(--roxy-space-md,1rem);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);color:var(--roxy-fg,#0a0a0a);font-family:inherit;font-size:var(--roxy-text-sm,.875rem);cursor:pointer;background:0 0}.roxy-edit:hover{border-color:var(--roxy-accent,#f59e0b);color:var(--roxy-accent-ink,#b45309)}.roxy-edit:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}:host{font-variant-emoji:text}`;var de="Client-side components accept a pk_ publishable key only. Use a publishable key with an origin allowlist, or render server-side.";function it(n){return!!n&&!n.startsWith("pk_")}function at(n,e={}){e.warn&&console.warn(de),n.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:"possible-secret-key",message:de},bubbles:!0,composed:!0}))}var Zt="https://roxyapi.com/api/v2";async function Qt(n){try{let e=await n.json();if(e?.error)return e.error}catch{}return`Request failed (${n.status})`}var ce=class{constructor(e){this.baseUrl=Zt;this.host=e,e.addController(this)}hostDisconnected(){this.abort?.abort(),this.abort=void 0}async run(e){if(!this.submitUrl&&this.secretKeyRefused())return;this.abort?.abort();let t=new AbortController;this.abort=t,this.host.loading=!0,this.host.error=null;try{let r=this.submitUrl?await fetch(this.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(e),signal:t.signal}):await this.callApi(e,t.signal);if(!r.ok)throw new Error(await Qt(r));let o=await r.json();if(t.signal.aborted)return;this.host.data=o}catch(r){if(r?.name==="AbortError")return;this.host.error=r instanceof Error?r.message:String(r)}finally{this.abort===t&&(this.abort=void 0),t.signal.aborted||(this.host.loading=!1)}}callApi(e,t){let r=new URL(`${this.baseUrl}${e.path}`);for(let[s,i]of Object.entries(e.query??{}))i!=null&&r.searchParams.set(s,String(i));let o={Accept:"application/json"};return this.publishableKey&&(o["X-API-Key"]=this.publishableKey),e.body!=null&&(o["Content-Type"]="application/json"),fetch(r,{method:e.method??"GET",headers:o,body:e.body!=null?JSON.stringify(e.body):void 0,signal:t})}secretKeyRefused(){return it(this.publishableKey)?(this.host.error=de,at(this.host),!0):!1}};function lt(n,e,t,r=[]){let o={...t},s=`/${n.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(h,u)=>{let g=o[u];return delete o[u],encodeURIComponent(String(g??""))}),i=new Set(r),c={},a={};for(let[h,u]of Object.entries(o))u===void 0||u===""||(e==="GET"||i.has(h)?c[h]=u:a[h]=u);return{path:s,method:e,query:c,body:e==="POST"?a:void 0}}function U(){return d`<svg class="roxy-chevron" viewBox="0 0 16 16" width="14" height="14" aria-hidden="true"><path d="M4 6l4 4 4-4" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>`}var dt=b`summary{list-style:none}summary::-webkit-details-marker{display:none}.roxy-chevron{aspect-ratio:auto;width:14px;height:14px;color:var(--roxy-muted,#71717a);transition:transform var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,ease);flex-shrink:0}details[open]>summary .roxy-chevron{transform:rotate(180deg)}@media (prefers-reduced-motion:reduce){.roxy-chevron{transition:none}}`;var er=b`.interp-keywords{flex-wrap:wrap;gap:.25rem;display:flex}.interp-keywords .kw{border-radius:var(--roxy-radius-full,9999px);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 14%, transparent);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-xs,.75rem);padding:1px 8px}`,ct=b`.block{border-top:1px solid var(--roxy-border,#e4e4e7);padding-top:var(--roxy-space-md,1rem)}.block h3{margin:0 0 var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em}.interp-card{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);margin-bottom:var(--roxy-space-xs,.25rem)}.interp-card summary{cursor:pointer;color:var(--roxy-fg,#0a0a0a);align-items:center;gap:var(--roxy-space-sm,.5rem);font-weight:500;font-size:var(--roxy-text-sm,.875rem);display:flex}.interp-card summary:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px;border-radius:var(--roxy-radius-sm,4px)}.interp-lead{flex-wrap:wrap;flex:auto;order:1;align-items:baseline;gap:.4rem;min-width:0;display:inline-flex}.interp-aside{flex-shrink:0;order:2;align-items:center;gap:.5rem;display:inline-flex}.roxy-chevron{order:3}.interp-aside small{color:var(--roxy-muted,#71717a);white-space:nowrap;font-weight:400}@container (width<=26rem){.interp-card summary{flex-wrap:wrap}.roxy-chevron{order:2}.interp-aside{flex-basis:100%;order:3;justify-content:flex-end}}.interp-body{margin-top:var(--roxy-space-sm,.5rem);gap:var(--roxy-space-sm,.5rem);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);overflow-wrap:anywhere;line-height:1.6;display:grid}.interp-body p{margin:0}${er}`;function pt(n,e,t){let r=n.filter(o=>!!o.body);return r.length===0?l:d`<section class="block" part="section readings"><h3>${t}</h3>${r.map((o,s)=>d`<details class="interp-card" part="reading" name="${e}" ?open="${s===0}"><summary><span class="interp-lead">${o.label}</span> ${U()} ${o.aside?d`<span class="interp-aside"><small>${o.aside}</small></span>`:l}</summary><div class="interp-body"><p>${o.body}</p>${o.extra??l}</div></details>`)}</section>`}var tr="roxy-data";function rr(n){return n.nodeName==="SCRIPT"&&n.getAttribute("type")==="application/json"}var pe=class{constructor(e){this.host=e,e.addController(this)}hostConnected(){if(this.host.data!=null)return;let e=this.read();e!==void 0&&(this.host.data=e,this.host.requestUpdate())}read(){let e=this.findInlineScript();return e?this.parse(e.textContent):void 0}findInlineScript(){for(let e of Array.from(this.host.children))if(rr(e)&&e.classList.contains(tr))return e;return null}parse(e){if(e?.trim())try{return JSON.parse(e)}catch{return}}};var m=class extends ae{constructor(){super();this.data=null;this.endpoint="";this.method="POST";this.remember=!1;this.hideReadings=!1;this.hideSections="";this.loading=!1;this.error=null;this.selfFetched=!1;this.editing=!1;this.sticky=!1;this.onEdit=()=>{this.editing=!0};this.onFormSubmit=t=>{let r=t.detail;this.lastValues=r.values,this.sticky=!!r.sticky,this.selfFetched=!0,this.editing=!1,this.remember&&this.writeRemembered(r.values),this.fetcher.run(lt(this.endpoint,this.method,r.values,r.queryKeys??[]))};new pe(this),this.fetcher=new ce(this)}static{this.styles=[le]}willUpdate(t){t.has("publishableKey")&&(this.fetcher.publishableKey=this.publishableKey),t.has("baseUrl")&&this.baseUrl&&(this.fetcher.baseUrl=this.baseUrl),t.has("submitUrl")&&(this.fetcher.submitUrl=this.submitUrl)}render(){return d`${this.hiddenSectionsStyle()}${this.renderState()}`}hiddenSectionsStyle(){let t=this.hideSections.split(",").map(o=>o.trim().toLowerCase()).filter(o=>/^[a-z][a-z0-9-]*$/.test(o));if(t.length===0)return l;let r=t.map(o=>`[part~="${o}"]{display:none!important}`).join("");return d`<style>${r}</style>`}renderState(){return this.loading?this.renderLoading():this.error!=null?this.renderError(this.error):this.data!=null?this.selfFetched?this.editing?this.renderForm():this.renderResult(this.data):this.showAttribution()?d`${this.renderData(this.data)}${this.renderAttribution()}`:this.renderData(this.data):this.renderNoData()}renderInterpretation(t,r,o){return this.hideReadings?l:pt(t,r,this.t(o??"Reading"))}renderResult(t){let r=this.sticky?d`${this.renderForm()}${this.renderData(t)}`:d`<div class="roxy-edit-bar" part="edit-bar"><button type="button" class="roxy-edit" @click="${this.onEdit}">${this.t("Edit query")}</button></div>${this.renderData(t)}`;return this.showAttribution()?d`${r}${this.renderAttribution()}`:r}showAttribution(){return this.attribution!=null&&this.attribution!=="off"&&this.attribution!=="false"}renderAttribution(){return d`<div class="roxy-attribution" part="attribution"><a href="https://roxyapi.com/?utm_source=widget&utm_medium=embed" target="_blank" rel="noopener">${this.t("Spiritual data by RoxyAPI")}</a></div>`}renderNoData(){return this.endpoint?this.renderForm():this.renderEmpty()}renderForm(){return d`<roxy-endpoint-form part="form" data-endpoint="${this.endpoint}" method="${this.method}" spec-url="${Y(this.specUrl)}" publishable-key="${Y(this.publishableKey)}" submit-label="${Y(this.submitLabel)}" lang="${Y(this.effectiveLang())}" .initialValues="${this.formInitialValues()}" @roxy-submit="${this.onFormSubmit}"></roxy-endpoint-form>`}formInitialValues(){return this.lastValues??(this.remember?this.readRemembered():void 0)}rememberKey(){return`roxy-ui:form:${this.endpoint}`}readRemembered(){try{let t=sessionStorage.getItem(this.rememberKey());return t?JSON.parse(t):void 0}catch{return}}writeRemembered(t){try{sessionStorage.setItem(this.rememberKey(),JSON.stringify(t))}catch{}}renderEmpty(){return d`<div class="roxy-empty" role="status" part="empty">${this.t("No data")}</div>`}renderLoading(){return d`<div class="roxy-skeleton" style="height:8rem" role="status" aria-label="${this.t("Loading")}" part="loading"></div>`}renderError(t){let r=d`<div class="roxy-error" role="alert" part="error">${this.t(t)}</div>`;return this.endpoint?d`${r}${this.renderForm()}`:r}};f([v({attribute:!1})],m.prototype,"data",2),f([v({type:String,attribute:"data-endpoint"})],m.prototype,"endpoint",2),f([v({type:String})],m.prototype,"method",2),f([v({type:String,attribute:"publishable-key"})],m.prototype,"publishableKey",2),f([v({type:String,attribute:"base-url"})],m.prototype,"baseUrl",2),f([v({type:String,attribute:"spec-url"})],m.prototype,"specUrl",2),f([v({type:String,attribute:"submit-url"})],m.prototype,"submitUrl",2),f([v({type:Boolean})],m.prototype,"remember",2),f([v({type:Boolean,attribute:"hide-readings",reflect:!0})],m.prototype,"hideReadings",2),f([v({type:String,attribute:"hide-sections",reflect:!0})],m.prototype,"hideSections",2),f([v({type:String,attribute:"submit-label"})],m.prototype,"submitLabel",2),f([v({type:String})],m.prototype,"attribution",2),f([C()],m.prototype,"loading",2),f([C()],m.prototype,"error",2),f([C()],m.prototype,"selfFetched",2),f([C()],m.prototype,"editing",2),f([C()],m.prototype,"sticky",2);var ft=14,nr=86,mt=0,or=102,D=6,yt=(nr-ft)*D,sr=(or-mt)*D;function ge(n,e){return{x:(n-ft)*D,y:(e-mt)*D}}var p=50,Le=n=>2*p-n,V=1.02*D,xt=1.35*D,y=2.87,$=4.4,ht=5.65,Re={head:{64:[p-y,11.2],61:[p,11.2],63:[p+y,11.2]},ajna:{47:[p-y,18],24:[p,18],4:[p+y,18],17:[p-y,20.6],11:[p+y,20.6],43:[p,25.3]},throat:{62:[p-y,32.4],23:[p,32.4],56:[p+y,32.4],16:[p-$,34.7],35:[p+$,34.7],20:[p-$,37.3],12:[p+$,37.3],45:[p+$,39.6],31:[p-y,41.9],8:[p,41.9],33:[p+y,41.9]},g:{1:[p,47.7],7:[p-y,50.3],13:[p+y,50.3],10:[p-ht,53.4],25:[p+ht,53.4],15:[p-y,56.8],46:[p+y,56.8],2:[p,59.2]},heart:{21:[63.9,59.5],51:[62.1,61.3],26:[60.1,63.3],40:[66.6,63.3]},spleen:{48:[20,70.8],57:[22.5,72.4],44:[25,73.8],50:[27.7,75.3],32:[25,76.6],28:[22.5,78],18:[20,79.5]},sacral:{5:[p-y,72.7],14:[p,72.7],29:[p+y,72.7],34:[p-$,75.4],27:[p-$,79],59:[p+$,79],42:[p-y,81.7],3:[p,81.7],9:[p+y,81.7]},"solar-plexus":{},root:{53:[p-y,90.2],60:[p,90.2],52:[p+y,90.2],54:[p-$,92.6],19:[p+$,92.6],38:[p-$,95.3],39:[p+$,95.3],58:[p-$,98.1],41:[p+$,98.1]}},ir={48:36,57:22,44:37,50:6,32:49,28:55,18:30};function ar(){let n={},e={};for(let[t,[r,o]]of Object.entries(Re.spleen))Re["solar-plexus"][ir[Number(t)]]=[Le(r),o];for(let[t,r]of Object.entries(Re))for(let[o,[s,i]]of Object.entries(r))n[Number(o)]=ge(s,i),e[Number(o)]=t;return{points:n,centerOf:e}}var{points:Te,centerOf:eo}=ar(),to=yt/2;function O(n){return n.map(([e,t])=>ge(e,t))}function Ce(n,e,t){return O([[p-n,e],[p+n,e],[p+n,t],[p-n,t]])}var Ee=5.9,ut=[[18.3,68.3],[18.3,82],[30.3,75.15]],Pe=[{id:"head",label:"Head",color:"gold",points:O([[43.55,12.5],[56.45,12.5],[50,1.7]])},{id:"ajna",label:"Ajna",color:"green",points:O([[43.55,16.5],[56.45,16.5],[50,27.7]])},{id:"throat",label:"Throat",color:"brown",points:Ce(Ee,31,43.3)},{id:"g",label:"G",color:"gold",points:O([[50,45.8],[57.7,53.6],[50,61.4],[42.3,53.6]])},{id:"heart",label:"Heart",color:"red",points:O([[56.65,65.23],[64.2,56.74],[69.75,65.23]])},{id:"spleen",label:"Spleen",color:"brown",points:O(ut)},{id:"sacral",label:"Sacral",color:"red",points:Ce(Ee,71.3,83.1)},{id:"solar-plexus",label:"Solar Plexus",color:"brown",points:O(ut.map(([n,e])=>[Le(n),e]))},{id:"root",label:"Root",color:"brown",points:Ce(Ee,88.5,99.8)}],lr=[[64,47],[61,24],[63,4],[17,62],[11,56],[43,23],[16,48],[20,34],[20,10],[7,31],[1,8],[13,33],[21,45],[12,22],[35,36],[57,20],[15,5],[2,14],[46,29],[34,10],[10,57],[25,51],[27,50],[57,34],[26,44],[18,58],[28,38],[32,54],[3,60],[9,52],[42,53],[59,6],[19,49],[39,55],[41,30],[37,40]],dr=cr();function cr(){let n=Le,e=[[50,3],[58,3],[60,10],[57,17.5],[56.5,20.5],[53.5,23.5],[51.5,27],[54,28],[64,30],[79,35],[83,42],[84,58],[83,74],[83,86],[76,93],[68,97],[64,99],[62,100.5],[60,100.5]],t=[`M ${he(e[0])}`];for(let r=1;r+2<e.length;r+=3)t.push(`C ${he(e[r])} ${he(e[r+1])} ${he(e[r+2])}`);t.push(`L ${ue(e[e.length-1],n)}`);for(let r=e.length-3;r>=1;r-=3)t.push(`C ${ue(e[r+1],n)} ${ue(e[r],n)} ${ue(e[r-1],n)}`);return t.push("Z"),t.join(" ")}function he([n,e]){let t=ge(n,e);return`${t.x} ${t.y}`}function ue([n,e],t){let r=ge(t(n),e);return`${r.x} ${r.y}`}function pr(n){return n.map(e=>`${e.x},${e.y}`).join(" ")}function bt(n){return n.left&&n.right?"both":n.left?"src-left":"src-right"}function hr(){return w`<path class="bg-body" d=${dr} />`}function ur(n){let e=[];for(let[t,r]of lr){let o=Te[t],s=Te[r];if(!o||!s)continue;e.push(w`<line class="bg-channel" x1=${o.x} y1=${o.y} x2=${s.x} y2=${s.y} />`);let i={x:(o.x+s.x)/2,y:(o.y+s.y)/2};for(let[c,a]of[[t,o],[r,s]]){let h=n.get(c);if(!h)continue;let u=bt(h);e.push(w`<line class="bg-half ${u==="both"?"src-left":u}" x1=${a.x} y1=${a.y} x2=${i.x} y2=${i.y} />`),u==="both"&&e.push(w`<line class="bg-half src-right stripe" x1=${a.x} y1=${a.y} x2=${i.x} y2=${i.y} />`)}}return e}function gr(n,e,t){return Pe.map(r=>{let o=n.has(r.id),s=`bg-center bg-${r.color}${o?" defined":""}`,i=e?.get(r.id)||r.label;return w`<polygon class=${s} points=${pr(r.points)}><title>${i}: ${o?t.defined:t.open}</title></polygon>`})}function gt(n,e){return`M ${n.x} ${n.y-V} A ${V} ${V} 0 0 ${e} ${n.x} ${n.y+V} Z`}function fr(n,e){let t=[];for(let[r,o]of Object.entries(Te)){let s=Number(r),i=n.get(s),c=i?bt(i):"",a=e.get(s);t.push(w`<g class="bg-gate-node">
284
- ${c==="both"?[w`<path class="bg-gate-dot on src-left" d=${gt(o,0)} />`,w`<path class="bg-gate-dot on src-right" d=${gt(o,1)} />`]:w`<circle class="bg-gate-dot ${c&&`on ${c}`}" cx=${o.x} cy=${o.y} r=${V} />`}
285
- <text class="bg-gate ${i?"on":""}" x=${o.x} y=${o.y} text-anchor="middle" dominant-baseline="central">${s}</text>
286
- ${a?w`<title>${a}</title>`:l}
287
- </g>`)}return t}var vt=`0 0 ${yt} ${sr}`;function $t(n){return w`
288
- ${hr()}
289
- ${ur(n.gateSources)}
290
- ${gr(n.definedCenters,n.centerNames,n.stateWords??{defined:"defined",open:"open"})}
291
- ${fr(n.gateSources,n.gateTitles)}
292
- `}var wt=b`.chart{width:100%;max-width:var(--roxy-chart-max-width,30rem);height:auto;margin:0 auto;display:block}@container (width<=26rem){.chart{width:calc(100% + 2 * var(--roxy-space-lg,1.5rem));margin-inline:calc(-1 * var(--roxy-space-lg,1.5rem))}}.bg-body{fill:color-mix(in srgb, var(--roxy-secondary,#475569) 8%, transparent);stroke:var(--roxy-border,#e4e4e7);stroke-width:1px}.bg-channel{stroke:var(--roxy-border,#e4e4e7);stroke-width:5px;stroke-linecap:round}.bg-half{stroke-width:5px;stroke-linecap:round}.bg-half.stripe{stroke-linecap:butt;stroke-dasharray:7 7}.bg-center{fill:var(--roxy-surface,#fff);stroke:var(--roxy-secondary,#475569);stroke-width:1.8px}.bg-center.defined{stroke:color-mix(in srgb, var(--roxy-fg,#0a0a0a) 45%, transparent)}:host{--center-gold:#e0a200;--center-green:#2f8f00;--center-red:#c41f1f;--center-brown:#76502f}.bg-center.bg-gold.defined,.legend .swatch.bg-gold{fill:var(--center-gold);background:var(--center-gold)}.bg-center.bg-green.defined,.legend .swatch.bg-green{fill:var(--center-green);background:var(--center-green)}.bg-center.bg-red.defined,.legend .swatch.bg-red{fill:var(--center-red);background:var(--center-red)}.bg-center.bg-brown.defined,.legend .swatch.bg-brown{fill:var(--center-brown);background:var(--center-brown)}.bg-gate-dot{fill:var(--roxy-surface,#fff);stroke:var(--roxy-border,#e4e4e7);stroke-width:1px}.bg-gate-dot.on{stroke:none}.bg-gate{fill:var(--roxy-muted,#71717a);font-size:${xt}px;font-weight:600;font-family:var(--roxy-font-sans)}.bg-gate.on{fill:var(--src-ink,var(--roxy-surface,#fff))}.legend{gap:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);flex-wrap:wrap;display:flex}.legend .swatch{vertical-align:middle;border:1px solid var(--roxy-secondary,#475569);border-radius:2px;width:10px;height:10px;margin-right:4px;display:inline-block}.bg-half.src-left{stroke:var(--src-left)}.bg-half.src-right{stroke:var(--src-right)}.bg-gate-dot.on.src-left{fill:var(--src-left)}.bg-gate-dot.on.src-right{fill:var(--src-right)}.legend .swatch.src-left{background:var(--src-left)}.legend .swatch.src-right{background:var(--src-right)}.legend .swatch.source{border-radius:var(--roxy-radius-full,9999px);border-color:#0000}`;var St=b`.facts{gap:var(--roxy-space-sm,.5rem);grid-template-columns:repeat(auto-fit,minmax(8rem,1fr));display:grid}.fact{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);background:var(--roxy-surface,#fff)}.fact span{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;display:block}.fact strong{font-size:var(--roxy-text-base,1rem);color:var(--roxy-fg,#0a0a0a)}.lead{color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);margin:0;line-height:1.6}.themes{gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.pill{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);padding:2px 10px}.pill--good{background:color-mix(in srgb, var(--roxy-success,#16a34a) 16%, transparent);color:var(--roxy-success-fg,#166534)}.pill--shadow{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 16%, transparent);color:var(--roxy-danger-fg,#991b1b)}.keynotes{gap:var(--roxy-space-xs,.25rem);margin:0;display:grid}.keynotes dt{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.05em}.keynotes dd{margin:0}`;function At(n,e){return n==="design"?e("Design"):n==="personality"?e("Personality"):n??""}function _t(n){let e=n.filter(t=>!!t.value);return e.length===0?l:d`<div class="facts" part="facts">${e.map(t=>d`<div class="fact" part="fact"><span>${t.label}</span> <strong>${t.value}</strong></div>`)}</div>`}function kt(n,e,t){return!n&&!e?l:d`<div class="themes" part="themes">${n?d`<span class="pill pill--good">${t("Signature: {{value}}",{value:n})}</span>`:l} ${e?d`<span class="pill pill--shadow">${t("Not-self: {{value}}",{value:e})}</span>`:l}</div>`}function Rt(n,e){return!n?.personality&&!n?.design?l:d`<dl class="keynotes" part="keynotes">${n.personality?d`<dt>${e("Line {{line}} · Personality",{line:n.personalityLine??""})}</dt><dd>${n.personality}</dd>`:l} ${n.design?d`<dt>${e("Line {{line}} · Design",{line:n.designLine??""})}</dt><dd>${n.design}</dd>`:l}</dl>`}var mr="Localized";function x(n,e,t){let r=n,o=r?.[`${e}${mr}`];if(typeof o=="string"&&o!=="")return o;if(t!==void 0)return t;let s=r?.[e];return typeof s=="string"?s:""}var Ct=b`.roxy-tablist{border-bottom:2px solid var(--roxy-border,#e4e4e7);scrollbar-width:thin;gap:2px;min-width:0;display:flex;overflow-x:auto}.roxy-tab{padding:var(--roxy-space-xs,.25rem) var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);cursor:pointer;color:var(--roxy-muted,#71717a);transition:color var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,ease);background:0 0;border:none;border-bottom:2px solid #0000;flex-shrink:0;margin-bottom:-2px;font-family:inherit}.roxy-tab[aria-selected=true]{color:var(--roxy-accent-ink,#b45309);border-bottom-color:var(--roxy-accent,#f59e0b);font-weight:var(--roxy-weight-bold,600)}.roxy-tab:hover:not([aria-selected=true]){color:var(--roxy-fg,#0a0a0a)}.roxy-tab:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:-2px;border-radius:4px}`;function Et(n){let{items:e,active:t,onSelect:r,label:o,idPrefix:s,controls:i=!1}=n;return d`<div class="roxy-tablist" part="tablist" role="tablist" aria-label="${o}" @keydown="${a=>{if(a.key!=="ArrowRight"&&a.key!=="ArrowLeft")return;a.preventDefault();let h=e.findIndex(A=>A.id===t);if(h===-1)return;let u=a.key==="ArrowRight"?1:-1,g=e[(h+u+e.length)%e.length];if(!g)return;r(g.id);let S=a.currentTarget.getRootNode();requestAnimationFrame(()=>{S.querySelector(`#${s}-tab-${g.id}`)?.focus()})}}">${e.map(a=>d`<button type="button" class="roxy-tab" part="tab" role="tab" id="${s}-tab-${a.id}" aria-selected="${t===a.id?"true":"false"}" aria-controls="${i?`${s}-panel-${a.id}`:l}" tabindex="${t===a.id?"0":"-1"}" @click="${()=>r(a.id)}">${a.label}</button>`)}</div>${i?e.filter(a=>a.id!==t).map(a=>d`<div role="tabpanel" id="${s}-panel-${a.id}" aria-labelledby="${s}-tab-${a.id}" hidden></div>`):l}`}var yr=["gold","green","brown","red"];function xr(n){let e=new Map;for(let t of n){if(t.gate==null)continue;let r=e.get(t.gate);r?r.push(t):e.set(t.gate,[t])}return e}var M=class extends m{constructor(){super(...arguments);this.side="personality"}renderData(t){let r=t.centers??[],o=new Set(r.filter(h=>h.defined).map(h=>h.id)),s=xr(t.gates??[]),i=new Map([...s].map(([h,u])=>[h,{left:u.some(g=>g.side==="design"),right:u.some(g=>g.side==="personality")}])),c=this.buildGateTitles(s),a=new Map(r.map(h=>[h.id,x(h,"name")]));return d`<div class="wrap" part="card"><header class="head" part="header"><h2 class="title">${this.t("Bodygraph")}</h2>${t.type||t.profile?d`<div class="type-line">${[x(t,"type"),t.profile?this.t("Profile {{profile}}",{profile:t.profile}):""].filter(Boolean).join(" · ")}</div>`:l}</header><div class="layout" part="layout"><svg class="chart" part="chart" viewBox="${vt}" preserveAspectRatio="xMidYMid meet" role="img" aria-label="${this.t("Human Design bodygraph with nine centers, channels, and activated gates overlaid on a human silhouette")}"><title>${this.t("Human Design bodygraph")}</title><desc>${this.t("Nine energy centers in their canonical positions over a human silhouette, each filled with its traditional color when defined and outlined when open, wired by channels between activated gates.")}</desc>${$t({definedCenters:o,gateSources:i,gateTitles:c,centerNames:a,stateWords:{defined:this.t("Defined"),open:this.t("Open")}})}</svg> ${this.renderSummary(t,a)}</div>${this.renderReading(t)} ${this.renderChannels(t.channels??[],a)} ${this.renderCenters(r)} ${this.renderActivations(t)}</div>`}buildGateTitles(t){let r=new Map;for(let[o,s]of t){let i=s.map(c=>[this.gateGlyph(c),`${o}${c.line!=null?`.${c.line}`:""}`,At(c.side,this.translator)].filter(Boolean).join(" "));r.set(o,[this.t("Gate {{gate}}",{gate:o}),x(s[0],"gateName"),...i].filter(Boolean).join(" · "))}return r}gateGlyph(t){return t.planet?Qe(t.planet)??x(t,"planet"):""}renderSummary(t,r){let o=t.incarnationCross;return d`<div class="summary" part="details">${_t([{label:this.t("Type"),value:x(t,"type")},{label:this.t("Strategy"),value:x(t,"strategy")},{label:this.t("Authority"),value:x(t,"authority")},{label:this.t("Profile"),value:t.profile},{label:this.t("Definition"),value:x(t,"definition")}])} ${t.typeDescription&&!this.hideReadings?d`<p class="lead">${t.typeDescription}</p>`:l} ${o?.name?d`<p class="cross">${o.name} ${o.gates?.length?d`<span class="gates">(${o.gates.join(", ")})</span>`:l}</p>`:l} ${kt(t.signature?x(t,"signature"):void 0,t.notSelf?x(t,"notSelf"):void 0,this.translator)} ${this.renderLegend(r)}</div>`}renderLegend(t){let r=yr.map(o=>[o,Pe.filter(s=>s.color===o).map(s=>t.get(s.id)||s.label).join(", ")]);return d`<div class="legend" part="legend"><span class="legend-row"><span class="swatch source src-right"></span>${this.t("Personality")} <span class="swatch source src-left"></span>${this.t("Design")} </span><span class="legend-row">${this.t("Center colors when defined. Open centers are outlined.")}</span> ${r.map(([o,s])=>d`<span><span class="swatch bg-${o} defined"></span>${s}</span>`)} <span><span class="swatch"></span>${this.t("Open center")}</span></div>`}renderReading(t){let r=t.incarnationCross,o=[{label:this.t("Strategy"),aside:x(t,"strategy"),body:t.strategyDescription},{label:this.t("Authority"),aside:x(t,"authority"),body:t.authorityDescription},{label:this.t("Profile"),aside:t.profile,body:t.profileDescription,extra:Rt(t.profileKeynotes,this.translator)},{label:this.t("Definition"),aside:x(t,"definition"),body:t.definitionDescription},{label:this.t("Aura"),body:t.aura},{label:this.t("Incarnation cross"),aside:r?x(r,"angle"):void 0,body:r?.description??""}];return this.renderInterpretation(o,"hd-reading")}renderChannels(t,r){if(t.length===0||this.hideReadings)return l;let o=new Map;for(let i of t){let c=i.circuit??"",a=o.get(c);a?a.push(i):o.set(c,[i])}let s=0;return d`<section class="block" part="section channels"><h3>${this.t("Defined channels ({{count}})",{count:t.length})}</h3>${[...o].map(([i,c])=>d`<div class="group">${i?d`<p class="group-head">${this.t("{{circuit}} circuit",{circuit:x(c[0],"circuit")})}</p>`:l} ${c[0]?.circuitDescription?d`<p class="group-note">${c[0].circuitDescription}</p>`:l} ${c.map(a=>d`<details class="interp-card" part="reading" name="hd-channel" ?open="${s++===0}"><summary><span class="interp-lead"><span class="chan-gates">${a.gateA}-${a.gateB}</span> <span>${x(a,"name")}</span> </span>${U()} <span class="interp-aside"><span class="chips">${(a.centers??[]).map(h=>d`<span class="chip">${r.get(h)||h}</span>`)}</span></span></summary><div class="interp-body">${a.description?d`<p>${a.description}</p>`:l}</div></details>`)}</div>`)}</section>`}renderCenters(t){if(t.length===0||this.hideReadings)return l;let r=t.filter(o=>o.defined).length;return d`<section class="block" part="section centers"><h3>${this.t("Centers ({{defined}} defined, {{open}} open)",{defined:r,open:t.length-r})}</h3>${t.map((o,s)=>d`<details class="interp-card" part="reading" name="hd-center" ?open="${s===0}"><summary><span class="interp-lead">${x(o,"name")}</span> ${U()} <span class="interp-aside"><span class="chips"><span class="chip ${o.defined?"chip--on":""}">${o.defined?this.t("Defined"):this.t("Open")}</span> ${o.motor?d`<span class="chip">${this.t("Motor")}</span>`:l} ${o.awareness?d`<span class="chip">${this.t("Awareness")}</span>`:l}</span></span></summary><div class="interp-body">${o.theme?d`<p>${o.theme}</p>`:l} ${!o.defined&&o.notSelfQuestion?d`<dl class="keynotes"><dt>${this.t("Not-self question")}</dt><dd>${o.notSelfQuestion}</dd></dl>`:l} ${o.biology?d`<p class="footnote">${this.t("Biology")}. ${o.biology}</p>`:l} ${o.gates?.length?d`<p class="footnote">${this.t("Gates {{gates}}",{gates:o.gates.join(", ")})}</p>`:l}</div></details>`)}</section>`}renderActivations(t){let r=t.gates??[];if(r.length===0||this.hideReadings)return l;let o=r.filter(u=>u.side==="personality"),s=r.filter(u=>u.side==="design"),i=o.length>0&&s.length>0,c=this.side,a=i?c==="design"?s:o:r,h=i?t.sides?.[c]:void 0;return d`<section class="block" part="section activations"><h3>${this.t("Activations ({{count}})",{count:r.length})}</h3>${i?Et({items:[{id:"personality",label:`${this.t("Personality")} (${o.length})`},{id:"design",label:`${this.t("Design")} (${s.length})`}],active:c,onSelect:u=>{this.side=u},label:this.t("Chart sides"),idPrefix:"hd",controls:!0}):l}<div id="${i?`hd-panel-${c}`:l}" part="panel" role="${i?"tabpanel":l}" aria-labelledby="${i?`hd-tab-${c}`:l}">${h?d`<p class="side-note">${h}</p>`:l} ${a.map((u,g)=>this.renderGate(u,g===0))}</div></section>`}renderGate(t,r){let o=this.gateGlyph(t),s=x(t,"planet"),i=t.ichingHexagram;return d`<details class="interp-card" part="reading" name="hd-gate" ?open="${r}"><summary><span class="interp-lead">${o?d`<span class="glyph" aria-hidden="true">${o}</span>`:l} <span class="gate-id">${t.gate}${t.line!=null?`.${t.line}`:""}</span> <span>${x(t,"gateName")}</span> </span>${U()} ${s?d`<span class="interp-aside"><small>${s}</small></span>`:l}</summary><div class="interp-body">${t.gateDescription?d`<p>${t.gateDescription}</p>`:l} ${t.lineMeaning?d`<dl class="keynotes"><dt>${this.t("Line {{line}}",{line:t.line??""})}</dt><dd>${t.lineMeaning}</dd></dl>`:l} ${t.planetDescription?d`<p class="footnote">${s}. ${t.planetDescription}</p>`:l} ${i?.number?d`<p class="footnote">${this.t("I Ching hexagram {{number}}",{number:i.number})}${i.english?`, ${i.english}`:""}</p>`:l}</div></details>`}};M.styles=[le,Ct,dt,ct,St,wt,b`.wrap{background:var(--roxy-surface,#fff);width:100%;color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.type-line{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem)}.layout{gap:var(--roxy-space-lg,1.5rem);grid-template-columns:minmax(0,1fr);align-items:start;display:grid}.wrap{--src-left:var(--roxy-danger,#dc2626);--src-right:var(--roxy-fg,#0a0a0a)}.summary{gap:var(--roxy-space-md,1rem);display:grid}.cross{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a);border-left:2px solid var(--roxy-accent,#f59e0b);padding-left:var(--roxy-space-sm,.5rem);margin:0}.cross .gates{color:var(--roxy-muted,#71717a);font-variant-numeric:tabular-nums}.legend-row{color:var(--roxy-muted,#71717a);flex-basis:100%}.legend-row .swatch:not(:first-child){margin-left:var(--roxy-space-md,1rem)}.legend .swatch.defined{border-color:color-mix(in srgb, var(--roxy-fg,#0a0a0a) 45%, transparent)}.group{margin-bottom:var(--roxy-space-md,1rem)}.group:last-child{margin-bottom:0}.group-head{font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a);margin:0}.group-note{margin:0 0 var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);line-height:1.6}.footnote{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);margin:0;line-height:1.6}.chip{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 45%, transparent);color:var(--roxy-fg,#0a0a0a);padding:1px 8px;display:inline-block}.chip--on{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 18%, transparent)}.chips{flex-wrap:wrap;gap:.25rem;display:inline-flex}.gate-id,.chan-gates{font-variant-numeric:tabular-nums;font-weight:var(--roxy-weight-bold,600);color:var(--roxy-accent-ink,#b45309)}.glyph{color:var(--roxy-accent-ink,#b45309)}.side-note{margin:0 0 var(--roxy-space-sm,.5rem);padding-top:var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);line-height:1.6}`],f([C()],M.prototype,"side",2),M=f([Ze("roxy-bodygraph")],M);Z();return Mt(br);})();
281
+ `;var J="roxy-ui-tokens";function Z(){if(typeof document>"u")return null;let o=document.getElementById(J);if(o)return o;let e=document.createElement("style");return e.id=J,e.textContent=Ne,document.head.prepend(e),e}var Q=globalThis,ee=Q.ShadowRoot&&(Q.ShadyCSS===void 0||Q.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,fe=Symbol(),Ie=new WeakMap,H=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==fe)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(ee&&e===void 0){let r=t!==void 0&&t.length===1;r&&(e=Ie.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&Ie.set(t,e))}return e}toString(){return this.cssText}},Ue=o=>new H(typeof o=="string"?o:o+"",void 0,fe),b=(o,...e)=>{let t=o.length===1?o[0]:e.reduce((r,n,s)=>r+(i=>{if(i._$cssResult$===!0)return i.cssText;if(typeof i=="number")return i;throw Error("Value passed to 'css' function must be a 'css' function result: "+i+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+o[s+1],o[0]);return new H(t,o,fe)},De=(o,e)=>{if(ee)o.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of e){let r=document.createElement("style"),n=Q.litNonce;n!==void 0&&r.setAttribute("nonce",n),r.textContent=t.cssText,o.appendChild(r)}},me=ee?o=>o:o=>o instanceof CSSStyleSheet?(e=>{let t="";for(let r of e.cssRules)t+=r.cssText;return Ue(t)})(o):o;var{is:It,defineProperty:Ut,getOwnPropertyDescriptor:Dt,getOwnPropertyNames:Ht,getOwnPropertySymbols:Bt,getPrototypeOf:Gt}=Object,te=globalThis,He=te.trustedTypes,jt=He?He.emptyScript:"",zt=te.reactiveElementPolyfillSupport,B=(o,e)=>o,G={toAttribute(o,e){switch(e){case Boolean:o=o?jt:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,e){let t=o;switch(e){case Boolean:t=o!==null;break;case Number:t=o===null?null:Number(o);break;case Object:case Array:try{t=JSON.parse(o)}catch{t=null}}return t}},re=(o,e)=>!It(o,e),Be={attribute:!0,type:String,converter:G,reflect:!1,useDefault:!1,hasChanged:re};Symbol.metadata??=Symbol("metadata"),te.litPropertyMetadata??=new WeakMap;var _=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Be){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let r=Symbol(),n=this.getPropertyDescriptor(e,r,t);n!==void 0&&Ut(this.prototype,e,n)}}static getPropertyDescriptor(e,t,r){let{get:n,set:s}=Dt(this.prototype,e)??{get(){return this[t]},set(i){this[t]=i}};return{get:n,set(i){let d=n?.call(this);s?.call(this,i),this.requestUpdate(e,d,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Be}static _$Ei(){if(this.hasOwnProperty(B("elementProperties")))return;let e=Gt(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(B("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(B("properties"))){let t=this.properties,r=[...Ht(t),...Bt(t)];for(let n of r)this.createProperty(n,t[n])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[r,n]of t)this.elementProperties.set(r,n)}this._$Eh=new Map;for(let[t,r]of this.elementProperties){let n=this._$Eu(t,r);n!==void 0&&this._$Eh.set(n,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let r=new Set(e.flat(1/0).reverse());for(let n of r)t.unshift(me(n))}else e!==void 0&&t.push(me(e));return t}static _$Eu(e,t){let r=t.attribute;return r===!1?void 0:typeof r=="string"?r:typeof e=="string"?e.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(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return De(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$ET(e,t){let r=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,r);if(n!==void 0&&r.reflect===!0){let s=(r.converter?.toAttribute!==void 0?r.converter:G).toAttribute(t,r.type);this._$Em=e,s==null?this.removeAttribute(n):this.setAttribute(n,s),this._$Em=null}}_$AK(e,t){let r=this.constructor,n=r._$Eh.get(e);if(n!==void 0&&this._$Em!==n){let s=r.getPropertyOptions(n),i=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:G;this._$Em=n;let d=i.fromAttribute(t,s.type);this[n]=d??this._$Ej?.get(n)??d,this._$Em=null}}requestUpdate(e,t,r,n=!1,s){if(e!==void 0){let i=this.constructor;if(n===!1&&(s=this[e]),r??=i.getPropertyOptions(e),!((r.hasChanged??re)(s,t)||r.useDefault&&r.reflect&&s===this._$Ej?.get(e)&&!this.hasAttribute(i._$Eu(e,r))))return;this.C(e,t,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:r,reflect:n,wrapped:s},i){r&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,i??t??this[e]),s!==!0||i!==void 0)||(this._$AL.has(e)||(this.hasUpdated||r||(t=void 0),this._$AL.set(e,t)),n===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[n,s]of this._$Ep)this[n]=s;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[n,s]of r){let{wrapped:i}=s,d=this[n];i!==!0||this._$AL.has(n)||d===void 0||this.C(n,void 0,s,d)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(t)):this._$EM()}catch(r){throw e=!1,this._$EM(),r}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(e){}firstUpdated(e){}};_.elementStyles=[],_.shadowRootOptions={mode:"open"},_[B("elementProperties")]=new Map,_[B("finalized")]=new Map,zt?.({ReactiveElement:_}),(te.reactiveElementVersions??=[]).push("2.1.2");var Se=globalThis,Ge=o=>o,ne=Se.trustedTypes,je=ne?ne.createPolicy("lit-html",{createHTML:o=>o}):void 0,Ve="$lit$",k=`lit$${Math.random().toFixed(9).slice(2)}$`,We="?"+k,Kt=`<${We}>`,L=document,z=()=>L.createComment(""),K=o=>o===null||typeof o!="object"&&typeof o!="function",Ae=Array.isArray,qt=o=>Ae(o)||typeof o?.[Symbol.iterator]=="function",ye=`[
282
+ \f\r]`,j=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ze=/-->/g,Ke=/>/g,C=RegExp(`>|${ye}(?:([^\\s"'>=/]+)(${ye}*=${ye}*(?:[^
283
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),qe=/'/g,Fe=/"/g,Xe=/^(?:script|style|textarea|title)$/i,_e=o=>(e,...t)=>({_$litType$:o,strings:e,values:t}),c=_e(1),$=_e(2),Or=_e(3),P=Symbol.for("lit-noChange"),l=Symbol.for("lit-nothing"),Ye=new WeakMap,T=L.createTreeWalker(L,129);function Je(o,e){if(!Ae(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return je!==void 0?je.createHTML(e):e}var Ft=(o,e)=>{let t=o.length-1,r=[],n,s=e===2?"<svg>":e===3?"<math>":"",i=j;for(let d=0;d<t;d++){let a=o[d],h,u,g=-1,S=0;for(;S<a.length&&(i.lastIndex=S,u=i.exec(a),u!==null);)S=i.lastIndex,i===j?u[1]==="!--"?i=ze:u[1]!==void 0?i=Ke:u[2]!==void 0?(Xe.test(u[2])&&(n=RegExp("</"+u[2],"g")),i=C):u[3]!==void 0&&(i=C):i===C?u[0]===">"?(i=n??j,g=-1):u[1]===void 0?g=-2:(g=i.lastIndex-u[2].length,h=u[1],i=u[3]===void 0?C:u[3]==='"'?Fe:qe):i===Fe||i===qe?i=C:i===ze||i===Ke?i=j:(i=C,n=void 0);let A=i===C&&o[d+1].startsWith("/>")?" ":"";s+=i===j?a+Kt:g>=0?(r.push(h),a.slice(0,g)+Ve+a.slice(g)+k+A):a+k+(g===-2?d:A)}return[Je(o,s+(o[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]},q=class o{constructor({strings:e,_$litType$:t},r){let n;this.parts=[];let s=0,i=0,d=e.length-1,a=this.parts,[h,u]=Ft(e,t);if(this.el=o.createElement(h,r),T.currentNode=this.el.content,t===2||t===3){let g=this.el.content.firstChild;g.replaceWith(...g.childNodes)}for(;(n=T.nextNode())!==null&&a.length<d;){if(n.nodeType===1){if(n.hasAttributes())for(let g of n.getAttributeNames())if(g.endsWith(Ve)){let S=u[i++],A=n.getAttribute(g).split(k),W=/([.?@])?(.*)/.exec(S);a.push({type:1,index:s,name:W[2],strings:A,ctor:W[1]==="."?be:W[1]==="?"?ve:W[1]==="@"?$e:U}),n.removeAttribute(g)}else g.startsWith(k)&&(a.push({type:6,index:s}),n.removeAttribute(g));if(Xe.test(n.tagName)){let g=n.textContent.split(k),S=g.length-1;if(S>0){n.textContent=ne?ne.emptyScript:"";for(let A=0;A<S;A++)n.append(g[A],z()),T.nextNode(),a.push({type:2,index:++s});n.append(g[S],z())}}}else if(n.nodeType===8)if(n.data===We)a.push({type:2,index:s});else{let g=-1;for(;(g=n.data.indexOf(k,g+1))!==-1;)a.push({type:7,index:s}),g+=k.length-1}s++}}static createElement(e,t){let r=L.createElement("template");return r.innerHTML=e,r}};function I(o,e,t=o,r){if(e===P)return e;let n=r!==void 0?t._$Co?.[r]:t._$Cl,s=K(e)?void 0:e._$litDirective$;return n?.constructor!==s&&(n?._$AO?.(!1),s===void 0?n=void 0:(n=new s(o),n._$AT(o,t,r)),r!==void 0?(t._$Co??=[])[r]=n:t._$Cl=n),n!==void 0&&(e=I(o,n._$AS(o,e.values),n,r)),e}var xe=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:r}=this._$AD,n=(e?.creationScope??L).importNode(t,!0);T.currentNode=n;let s=T.nextNode(),i=0,d=0,a=r[0];for(;a!==void 0;){if(i===a.index){let h;a.type===2?h=new F(s,s.nextSibling,this,e):a.type===1?h=new a.ctor(s,a.name,a.strings,this,e):a.type===6&&(h=new we(s,this,e)),this._$AV.push(h),a=r[++d]}i!==a?.index&&(s=T.nextNode(),i++)}return T.currentNode=L,n}p(e){let t=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}},F=class o{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,r,n){this.type=2,this._$AH=l,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=I(this,e,t),K(e)?e===l||e==null||e===""?(this._$AH!==l&&this._$AR(),this._$AH=l):e!==this._$AH&&e!==P&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):qt(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==l&&K(this._$AH)?this._$AA.nextSibling.data=e:this.T(L.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:r}=e,n=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=q.createElement(Je(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(t);else{let s=new xe(n,this),i=s.u(this.options);s.p(t),this.T(i),this._$AH=s}}_$AC(e){let t=Ye.get(e.strings);return t===void 0&&Ye.set(e.strings,t=new q(e)),t}k(e){Ae(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,r,n=0;for(let s of e)n===t.length?t.push(r=new o(this.O(z()),this.O(z()),this,this.options)):r=t[n],r._$AI(s),n++;n<t.length&&(this._$AR(r&&r._$AB.nextSibling,n),t.length=n)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let r=Ge(e).nextSibling;Ge(e).remove(),e=r}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},U=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,n,s){this.type=1,this._$AH=l,this._$AN=void 0,this.element=e,this.name=t,this._$AM=n,this.options=s,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=l}_$AI(e,t=this,r,n){let s=this.strings,i=!1;if(s===void 0)e=I(this,e,t,0),i=!K(e)||e!==this._$AH&&e!==P,i&&(this._$AH=e);else{let d=e,a,h;for(e=s[0],a=0;a<s.length-1;a++)h=I(this,d[r+a],t,a),h===P&&(h=this._$AH[a]),i||=!K(h)||h!==this._$AH[a],h===l?e=l:e!==l&&(e+=(h??"")+s[a+1]),this._$AH[a]=h}i&&!n&&this.j(e)}j(e){e===l?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},be=class extends U{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===l?void 0:e}},ve=class extends U{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==l)}},$e=class extends U{constructor(e,t,r,n,s){super(e,t,r,n,s),this.type=5}_$AI(e,t=this){if((e=I(this,e,t,0)??l)===P)return;let r=this._$AH,n=e===l&&r!==l||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,s=e!==l&&(r===l||n);n&&this.element.removeEventListener(this.name,this,r),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},we=class{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){I(this,e)}};var Yt=Se.litHtmlPolyfillSupport;Yt?.(q,F),(Se.litHtmlVersions??=[]).push("3.3.3");var Ze=(o,e,t)=>{let r=t?.renderBefore??e,n=r._$litPart$;if(n===void 0){let s=t?.renderBefore??null;r._$litPart$=n=new F(e.insertBefore(z(),s),s,void 0,t??{})}return n._$AI(o),n};var ke=globalThis,R=class extends _{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Ze(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return P}};R._$litElement$=!0,R.finalized=!0,ke.litElementHydrateSupport?.({LitElement:R});var Vt=ke.litElementPolyfillSupport;Vt?.({LitElement:R});(ke.litElementVersions??=[]).push("4.2.2");var Qe=o=>(e,t)=>{t!==void 0?t.addInitializer(()=>{customElements.define(o,e)}):customElements.define(o,e)};var Wt={attribute:!0,type:String,converter:G,reflect:!1,hasChanged:re},Xt=(o=Wt,e,t)=>{let{kind:r,metadata:n}=t,s=globalThis.litPropertyMetadata.get(n);if(s===void 0&&globalThis.litPropertyMetadata.set(n,s=new Map),r==="setter"&&((o=Object.create(o)).wrapped=!0),s.set(t.name,o),r==="accessor"){let{name:i}=t;return{set(d){let a=e.get.call(this);e.set.call(this,d),this.requestUpdate(i,a,o,!0,d)},init(d){return d!==void 0&&this.C(i,void 0,o,d),d}}}if(r==="setter"){let{name:i}=t;return function(d){let a=this[i];e.call(this,d),this.requestUpdate(i,a,o,!0,d)}}throw Error("Unsupported decorator location: "+r)};function v(o){return(e,t)=>typeof t=="object"?Xt(o,e,t):((r,n,s)=>{let i=n.hasOwnProperty(s);return n.constructor.createProperty(s,r),i?Object.getOwnPropertyDescriptor(n,s):void 0})(o,e,t)}function E(o){return v({...o,state:!0,attribute:!1})}function se(o){return o.toLowerCase().replace(/[\s_-]+/g," ").trim()}var Jt=(o,e)=>e?o[se(e)]:void 0,Zt={sun:"☉",moon:"☽",mercury:"☿",venus:"♀",earth:"♁",mars:"♂",jupiter:"♃",saturn:"♄",uranus:"♅",neptune:"♆",pluto:"♇",rahu:"☊",ketu:"☋",ascendant:"Asc",lagna:"La","north node":"☊","south node":"☋",chiron:"⚷",lilith:"⚸","black moon lilith":"⚸"},et=o=>Jt(Zt,o);var Y=o=>o??l;function tt(o){if(o.lang)return o.lang;if(typeof document>"u")return;let e=o.closest?.("[lang]")?.getAttribute("lang");return e||document.documentElement.lang||void 0}var rt="__ROXY_UI_I18N__";function ot(){let o=globalThis,e=o[rt];if(e)return e;let t={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return o[rt]=t,t}function nt(o,e){return e?o.replace(/\{\{(\w+)\}\}/g,(t,r)=>r in e?String(e[r]??""):t):o}function st(o,e,t){if(!o)return nt(e,t);let{catalogs:r}=ot(),n=o.toLowerCase(),s=r[n]??r[n.split("-")[0]];return nt(s?.[se(e)]??e,t)}function it(o){let{listeners:e}=ot();return e.add(o),()=>{e.delete(o)}}var ie=class{constructor(e){this.host=e,e.addController(this)}hostConnected(){this.unsubscribe=it(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var ae=class extends R{constructor(){super();this.translator=(t,r)=>this.t(t,r);new ie(this)}t(t,r){return st(this.effectiveLang(),t,r)}effectiveLang(){return tt(this)}};var le=b`:host{font-family:var(--roxy-font-sans,system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-base,1rem);line-height:var(--roxy-leading-normal,1.5);animation:roxy-fade-in var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,cubic-bezier(.4, 0, .2, 1)) both;background:0 0;display:block;container-type:inline-size}: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,var(--roxy-font-sans,system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif))}@keyframes roxy-fade-in{0%{opacity:0;transform:translateY(2px)}to{opacity:1;transform:translateY(0)}}@media (prefers-reduced-motion:reduce){:host{animation:none}}.roxy-skeleton{background:linear-gradient(90deg, var(--roxy-border,#e4e4e7) 0%, color-mix(in srgb, var(--roxy-border,#e4e4e7) 60%, transparent) 50%, var(--roxy-border,#e4e4e7) 100%);border-radius:var(--roxy-radius-md,8px);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,1.5rem);color:var(--roxy-muted,#71717a);text-align:center;font-size:var(--roxy-text-sm,.875rem)}.roxy-error{gap:var(--roxy-space-sm,.5rem);padding:var(--roxy-space-lg,1.5rem);background:var(--roxy-surface,#fff);border:1px solid var(--roxy-danger,#dc2626);border-radius:var(--roxy-radius-md,8px);color:var(--roxy-danger-fg,#991b1b);font-size:var(--roxy-text-sm,.875rem);justify-items:start;display:grid}.roxy-surface{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a)}:host(:focus-within) .roxy-card{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}.roxy-attribution{margin-top:var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-align:right}.roxy-attribution a{color:inherit;text-decoration:none}.roxy-attribution a:hover{color:var(--roxy-accent-ink,#b45309);text-decoration:underline}.roxy-attribution a:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}.roxy-edit-bar{margin-bottom:var(--roxy-space-sm,.5rem);justify-content:flex-end;display:flex}.roxy-edit{padding:var(--roxy-space-xs,.25rem) var(--roxy-space-md,1rem);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);color:var(--roxy-fg,#0a0a0a);font-family:inherit;font-size:var(--roxy-text-sm,.875rem);cursor:pointer;background:0 0}.roxy-edit:hover{border-color:var(--roxy-accent,#f59e0b);color:var(--roxy-accent-ink,#b45309)}.roxy-edit:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}:host{font-variant-emoji:text}`;var de="Client-side components accept a pk_ publishable key only. Use a publishable key with an origin allowlist, or render server-side.";function at(o){return!!o&&!o.startsWith("pk_")}function lt(o,e={}){e.warn&&console.warn(de),o.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:"possible-secret-key",message:de},bubbles:!0,composed:!0}))}var Qt="https://roxyapi.com/api/v2";async function er(o){try{let e=await o.json();if(e?.error)return e.error}catch{}return`Request failed (${o.status})`}var ce=class{constructor(e){this.baseUrl=Qt;this.host=e,e.addController(this)}hostDisconnected(){this.abort?.abort(),this.abort=void 0}async run(e){if(!this.submitUrl&&this.secretKeyRefused())return;this.abort?.abort();let t=new AbortController;this.abort=t,this.host.loading=!0,this.host.error=null;try{let r=this.submitUrl?await fetch(this.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(e),signal:t.signal}):await this.callApi(e,t.signal);if(!r.ok)throw new Error(await er(r));let n=await r.json();if(t.signal.aborted)return;this.host.data=n}catch(r){if(r?.name==="AbortError")return;this.host.error=r instanceof Error?r.message:String(r)}finally{this.abort===t&&(this.abort=void 0),t.signal.aborted||(this.host.loading=!1)}}callApi(e,t){let r=new URL(`${this.baseUrl}${e.path}`);for(let[s,i]of Object.entries(e.query??{}))i!=null&&r.searchParams.set(s,String(i));let n={Accept:"application/json"};return this.publishableKey&&(n["X-API-Key"]=this.publishableKey),e.body!=null&&(n["Content-Type"]="application/json"),fetch(r,{method:e.method??"GET",headers:n,body:e.body!=null?JSON.stringify(e.body):void 0,signal:t})}secretKeyRefused(){return at(this.publishableKey)?(this.host.error=de,lt(this.host),!0):!1}};function dt(o,e,t,r=[]){let n={...t},s=`/${o.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(h,u)=>{let g=n[u];return delete n[u],encodeURIComponent(String(g??""))}),i=new Set(r),d={},a={};for(let[h,u]of Object.entries(n))u===void 0||u===""||(e==="GET"||i.has(h)?d[h]=u:a[h]=u);return{path:s,method:e,query:d,body:e==="POST"?a:void 0}}function D(){return c`<svg class="roxy-chevron" viewBox="0 0 16 16" width="14" height="14" aria-hidden="true"><path d="M4 6l4 4 4-4" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>`}var ct=b`summary{list-style:none}summary::-webkit-details-marker{display:none}.roxy-chevron{aspect-ratio:auto;width:14px;height:14px;color:var(--roxy-muted,#71717a);transition:transform var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,ease);flex-shrink:0}details[open]>summary .roxy-chevron{transform:rotate(180deg)}@media (prefers-reduced-motion:reduce){.roxy-chevron{transition:none}}`;var tr=b`.interp-keywords{flex-wrap:wrap;gap:.25rem;display:flex}.interp-keywords .kw{border-radius:var(--roxy-radius-full,9999px);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 14%, transparent);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-xs,.75rem);padding:1px 8px}`,pt=b`.block{border-top:1px solid var(--roxy-border,#e4e4e7);padding-top:var(--roxy-space-md,1rem)}.block h3{margin:0 0 var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em}.interp-card{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);margin-bottom:var(--roxy-space-xs,.25rem)}.interp-card summary{cursor:pointer;color:var(--roxy-fg,#0a0a0a);align-items:center;gap:var(--roxy-space-sm,.5rem);font-weight:500;font-size:var(--roxy-text-sm,.875rem);display:flex}.interp-card summary:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px;border-radius:var(--roxy-radius-sm,4px)}.interp-lead{flex-wrap:wrap;flex:auto;order:1;align-items:baseline;gap:.4rem;min-width:0;display:inline-flex}.interp-aside{flex-shrink:0;order:2;align-items:center;gap:.5rem;display:inline-flex}.roxy-chevron{order:3}.interp-aside small{color:var(--roxy-muted,#71717a);white-space:nowrap;font-weight:400}@container (width<=26rem){.interp-card summary{flex-wrap:wrap}.roxy-chevron{order:2}.interp-aside{flex-basis:100%;order:3;justify-content:flex-end}}.interp-body{margin-top:var(--roxy-space-sm,.5rem);gap:var(--roxy-space-sm,.5rem);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);overflow-wrap:anywhere;line-height:1.6;display:grid}.interp-body p{margin:0}${tr}`;function ht(o,e,t){let r=o.filter(n=>!!n.body);return r.length===0?l:c`<section class="block" part="section readings"><h3>${t}</h3>${r.map((n,s)=>c`<details class="interp-card" part="reading" name="${e}" ?open="${s===0}"><summary><span class="interp-lead">${n.label}</span> ${D()} ${n.aside?c`<span class="interp-aside"><small>${n.aside}</small></span>`:l}</summary><div class="interp-body"><p>${n.body}</p>${n.extra??l}</div></details>`)}</section>`}var rr="roxy-data";function nr(o){return o.nodeName==="SCRIPT"&&o.getAttribute("type")==="application/json"}var pe=class{constructor(e){this.host=e,e.addController(this)}hostConnected(){if(this.host.data!=null)return;let e=this.read();e!==void 0&&(this.host.data=e,this.host.requestUpdate())}read(){let e=this.findInlineScript();return e?this.parse(e.textContent):void 0}findInlineScript(){for(let e of Array.from(this.host.children))if(nr(e)&&e.classList.contains(rr))return e;return null}parse(e){if(e?.trim())try{return JSON.parse(e)}catch{return}}};var m=class extends ae{constructor(){super();this.data=null;this.endpoint="";this.method="POST";this.remember=!1;this.hideReadings=!1;this.hideSections="";this.loading=!1;this.error=null;this.selfFetched=!1;this.editing=!1;this.sticky=!1;this.onEdit=()=>{this.editing=!0};this.onFormSubmit=t=>{let r=t.detail;this.lastValues=r.values,this.sticky=!!r.sticky,this.selfFetched=!0,this.editing=!1,this.remember&&this.writeRemembered(r.values),this.fetcher.run(dt(this.endpoint,this.method,r.values,r.queryKeys??[]))};new pe(this),this.fetcher=new ce(this)}static{this.styles=[le]}willUpdate(t){t.has("publishableKey")&&(this.fetcher.publishableKey=this.publishableKey),t.has("baseUrl")&&this.baseUrl&&(this.fetcher.baseUrl=this.baseUrl),t.has("submitUrl")&&(this.fetcher.submitUrl=this.submitUrl)}render(){return c`${this.hiddenSectionsStyle()}${this.renderState()}`}hiddenSectionsStyle(){let t=this.hideSections.split(",").map(n=>n.trim().toLowerCase()).filter(n=>/^[a-z][a-z0-9-]*$/.test(n));if(t.length===0)return l;let r=t.map(n=>`[part~="${n}"]{display:none!important}`).join("");return c`<style>${r}</style>`}renderState(){return this.loading?this.renderLoading():this.error!=null?this.renderError(this.error):this.data!=null?this.selfFetched?this.editing?this.renderForm():this.renderResult(this.data):this.showAttribution()?c`${this.renderData(this.data)}${this.renderAttribution()}`:this.renderData(this.data):this.renderNoData()}renderInterpretation(t,r,n){return this.hideReadings?l:ht(t,r,this.t(n??"Reading"))}renderResult(t){let r=this.sticky?c`${this.renderForm()}${this.renderData(t)}`:c`<div class="roxy-edit-bar" part="edit-bar"><button type="button" class="roxy-edit" @click="${this.onEdit}">${this.t("Edit query")}</button></div>${this.renderData(t)}`;return this.showAttribution()?c`${r}${this.renderAttribution()}`:r}showAttribution(){return this.attribution!=null&&this.attribution!=="off"&&this.attribution!=="false"}renderAttribution(){return c`<div class="roxy-attribution" part="attribution"><a href="https://roxyapi.com/?utm_source=widget&utm_medium=embed" target="_blank" rel="noopener">${this.t("Spiritual data by RoxyAPI")}</a></div>`}renderNoData(){return this.endpoint?this.renderForm():this.renderEmpty()}renderForm(){return c`<roxy-endpoint-form part="form" data-endpoint="${this.endpoint}" method="${this.method}" spec-url="${Y(this.specUrl)}" publishable-key="${Y(this.publishableKey)}" submit-label="${Y(this.submitLabel)}" lang="${Y(this.effectiveLang())}" .initialValues="${this.formInitialValues()}" @roxy-submit="${this.onFormSubmit}"></roxy-endpoint-form>`}formInitialValues(){return this.lastValues??(this.remember?this.readRemembered():void 0)}rememberKey(){return`roxy-ui:form:${this.endpoint}`}readRemembered(){try{let t=sessionStorage.getItem(this.rememberKey());return t?JSON.parse(t):void 0}catch{return}}writeRemembered(t){try{sessionStorage.setItem(this.rememberKey(),JSON.stringify(t))}catch{}}renderEmpty(){return c`<div class="roxy-empty" role="status" part="empty">${this.t("No data")}</div>`}renderLoading(){return c`<div class="roxy-skeleton" style="height:8rem" role="status" aria-label="${this.t("Loading")}" part="loading"></div>`}renderError(t){let r=c`<div class="roxy-error" role="alert" part="error">${this.t(t)}</div>`;return this.endpoint?c`${r}${this.renderForm()}`:r}};f([v({attribute:!1})],m.prototype,"data",2),f([v({type:String,attribute:"data-endpoint"})],m.prototype,"endpoint",2),f([v({type:String})],m.prototype,"method",2),f([v({type:String,attribute:"publishable-key"})],m.prototype,"publishableKey",2),f([v({type:String,attribute:"base-url"})],m.prototype,"baseUrl",2),f([v({type:String,attribute:"spec-url"})],m.prototype,"specUrl",2),f([v({type:String,attribute:"submit-url"})],m.prototype,"submitUrl",2),f([v({type:Boolean})],m.prototype,"remember",2),f([v({type:Boolean,attribute:"hide-readings",reflect:!0})],m.prototype,"hideReadings",2),f([v({type:String,attribute:"hide-sections",reflect:!0})],m.prototype,"hideSections",2),f([v({type:String,attribute:"submit-label"})],m.prototype,"submitLabel",2),f([v({type:String})],m.prototype,"attribution",2),f([E()],m.prototype,"loading",2),f([E()],m.prototype,"error",2),f([E()],m.prototype,"selfFetched",2),f([E()],m.prototype,"editing",2),f([E()],m.prototype,"sticky",2);var mt=14,or=86,yt=0,sr=102,M=6,xt=(or-mt)*M,ir=(sr-yt)*M;function ge(o,e){return{x:(o-mt)*M,y:(e-yt)*M}}var p=50,Le=o=>2*p-o,V=1.02*M,bt=1.35*M,Pe=1.15*M,y=2.87,w=4.4,ut=5.65,Re={head:{64:[p-y,11.2],61:[p,11.2],63:[p+y,11.2]},ajna:{47:[p-y,18],24:[p,18],4:[p+y,18],17:[p-y,20.6],11:[p+y,20.6],43:[p,25.3]},throat:{62:[p-y,32.4],23:[p,32.4],56:[p+y,32.4],16:[p-w,34.7],35:[p+w,34.7],20:[p-w,37.3],12:[p+w,37.3],45:[p+w,39.6],31:[p-y,41.9],8:[p,41.9],33:[p+y,41.9]},g:{1:[p,47.7],7:[p-y,50.3],13:[p+y,50.3],10:[p-ut,53.4],25:[p+ut,53.4],15:[p-y,56.8],46:[p+y,56.8],2:[p,59.2]},heart:{21:[63.9,59.5],51:[62.1,61.3],26:[60.1,63.3],40:[66.6,63.3]},spleen:{48:[20,70.8],57:[22.5,72.4],44:[25,73.8],50:[27.7,75.3],32:[25,76.6],28:[22.5,78],18:[20,79.5]},sacral:{5:[p-y,72.7],14:[p,72.7],29:[p+y,72.7],34:[p-w,75.4],27:[p-w,79],59:[p+w,79],42:[p-y,81.7],3:[p,81.7],9:[p+y,81.7]},"solar-plexus":{},root:{53:[p-y,90.2],60:[p,90.2],52:[p+y,90.2],54:[p-w,92.6],19:[p+w,92.6],38:[p-w,95.3],39:[p+w,95.3],58:[p-w,98.1],41:[p+w,98.1]}},ar={48:36,57:22,44:37,50:6,32:49,28:55,18:30};function lr(){let o={},e={};for(let[t,[r,n]]of Object.entries(Re.spleen))Re["solar-plexus"][ar[Number(t)]]=[Le(r),n];for(let[t,r]of Object.entries(Re))for(let[n,[s,i]]of Object.entries(r))o[Number(n)]=ge(s,i),e[Number(n)]=t;return{points:o,centerOf:e}}var{points:Te,centerOf:so}=lr(),io=xt/2;function O(o){return o.map(([e,t])=>ge(e,t))}function Ee(o,e,t){return O([[p-o,e],[p+o,e],[p+o,t],[p-o,t]])}var Ce=5.9,gt=[[18.3,68.3],[18.3,82],[30.3,75.15]],Oe=[{id:"head",label:"Head",color:"gold",points:O([[43.55,12.5],[56.45,12.5],[50,1.7]])},{id:"ajna",label:"Ajna",color:"green",points:O([[43.55,16.5],[56.45,16.5],[50,27.7]])},{id:"throat",label:"Throat",color:"brown",points:Ee(Ce,31,43.3)},{id:"g",label:"G",color:"gold",points:O([[50,45.8],[57.7,53.6],[50,61.4],[42.3,53.6]])},{id:"heart",label:"Heart",color:"red",points:O([[56.65,65.23],[64.2,56.74],[69.75,65.23]])},{id:"spleen",label:"Spleen",color:"brown",points:O(gt)},{id:"sacral",label:"Sacral",color:"red",points:Ee(Ce,71.3,83.1)},{id:"solar-plexus",label:"Solar Plexus",color:"brown",points:O(gt.map(([o,e])=>[Le(o),e]))},{id:"root",label:"Root",color:"brown",points:Ee(Ce,88.5,99.8)}],dr=[[64,47],[61,24],[63,4],[17,62],[11,56],[43,23],[16,48],[20,34],[20,10],[7,31],[1,8],[13,33],[21,45],[12,22],[35,36],[57,20],[15,5],[2,14],[46,29],[34,10],[10,57],[25,51],[27,50],[57,34],[26,44],[18,58],[28,38],[32,54],[3,60],[9,52],[42,53],[59,6],[19,49],[39,55],[41,30],[37,40]],cr=pr();function pr(){let o=Le,e=[[50,3],[58,3],[60,10],[57,17.5],[56.5,20.5],[53.5,23.5],[51.5,27],[54,28],[64,30],[79,35],[83,42],[84,58],[83,74],[83,86],[76,93],[68,97],[64,99],[62,100.5],[60,100.5]],t=[`M ${he(e[0])}`];for(let r=1;r+2<e.length;r+=3)t.push(`C ${he(e[r])} ${he(e[r+1])} ${he(e[r+2])}`);t.push(`L ${ue(e[e.length-1],o)}`);for(let r=e.length-3;r>=1;r-=3)t.push(`C ${ue(e[r+1],o)} ${ue(e[r],o)} ${ue(e[r-1],o)}`);return t.push("Z"),t.join(" ")}function he([o,e]){let t=ge(o,e);return`${t.x} ${t.y}`}function ue([o,e],t){let r=ge(t(o),e);return`${r.x} ${r.y}`}function hr(o){return o.map(e=>`${e.x},${e.y}`).join(" ")}function vt(o){return o.left&&o.right?"both":o.left?"src-left":"src-right"}function ur(){return $`<path class="bg-body" d=${cr} />`}function gr(o){let e=[];for(let[t,r]of dr){let n=Te[t],s=Te[r];if(!n||!s)continue;e.push($`<line class="bg-channel" x1=${n.x} y1=${n.y} x2=${s.x} y2=${s.y} />`);let i={x:(n.x+s.x)/2,y:(n.y+s.y)/2};for(let[d,a]of[[t,n],[r,s]]){let h=o.get(d);if(!h)continue;let u=vt(h);e.push($`<line class="bg-half ${u==="both"?"src-left":u}" x1=${a.x} y1=${a.y} x2=${i.x} y2=${i.y} />`),u==="both"&&e.push($`<line class="bg-half src-right stripe" x1=${a.x} y1=${a.y} x2=${i.x} y2=${i.y} />`)}}return e}function fr(o,e,t){return Oe.flatMap(r=>{let n=o.has(r.id),s=`bg-center bg-${r.color}${n?" defined":""}`,i=e?.get(r.id)||r.label,d=r.labelAt??br(r.points);return[$`<polygon class=${s} points=${hr(r.points)}><title>${i}: ${n?t.defined:t.open}</title></polygon>`,mr(i,d,n,r.points)]})}function mr(o,e,t,r){let n=o.split(/\s+/).filter(Boolean),s=n.reduce((u,g)=>Math.max(u,g.length),0),i=xr(r,e.y)*.86,d=Math.min(Pe,i/Math.max(1,s*yr)),a=d*1.05,h=e.y-a*(n.length-1)/2;return $`<text class="bg-center-name ${t?"defined":""}" style=${`font-size:${d}px`} x=${e.x} y=${e.y} text-anchor="middle" dominant-baseline="central" aria-hidden="true">${n.map((u,g)=>$`<tspan x=${e.x} y=${h+g*a}>${u}</tspan>`)}</text>`}var yr=.66;function xr(o,e){let t=[];for(let r=0;r<o.length;r++){let n=o[r],s=o[(r+1)%o.length];if(n.y===s.y)continue;let i=Math.min(n.y,s.y),d=Math.max(n.y,s.y);e<i||e>d||t.push(n.x+(e-n.y)/(s.y-n.y)*(s.x-n.x))}return t.length<2?0:Math.max(...t)-Math.min(...t)}function br(o){let e=o.length||1;return{x:o.reduce((t,r)=>t+r.x,0)/e,y:o.reduce((t,r)=>t+r.y,0)/e}}function ft(o,e){return`M ${o.x} ${o.y-V} A ${V} ${V} 0 0 ${e} ${o.x} ${o.y+V} Z`}function vr(o,e){let t=[];for(let[r,n]of Object.entries(Te)){let s=Number(r),i=o.get(s),d=i?vt(i):"",a=e.get(s);t.push($`<g class="bg-gate-node">
284
+ ${d==="both"?[$`<path class="bg-gate-dot on src-left" d=${ft(n,0)} />`,$`<path class="bg-gate-dot on src-right" d=${ft(n,1)} />`]:$`<circle class="bg-gate-dot ${d&&`on ${d}`}" cx=${n.x} cy=${n.y} r=${V} />`}
285
+ <text class="bg-gate ${i?"on":""}" x=${n.x} y=${n.y} text-anchor="middle" dominant-baseline="central">${s}</text>
286
+ ${a?$`<title>${a}</title>`:l}
287
+ </g>`)}return t}var $t=`0 0 ${xt} ${ir}`;function wt(o){return $`
288
+ ${ur()}
289
+ ${gr(o.gateSources)}
290
+ ${fr(o.definedCenters,o.centerNames,o.stateWords??{defined:"defined",open:"open"})}
291
+ ${vr(o.gateSources,o.gateTitles)}
292
+ `}var St=b`.chart{width:100%;max-width:var(--roxy-chart-max-width,30rem);height:auto;margin:0 auto;display:block}@container (width<=26rem){.chart{width:calc(100% + 2 * var(--roxy-space-lg,1.5rem));margin-inline:calc(-1 * var(--roxy-space-lg,1.5rem))}}.bg-body{fill:color-mix(in srgb, var(--roxy-secondary,#475569) 8%, transparent);stroke:var(--roxy-border,#e4e4e7);stroke-width:1px}.bg-channel{stroke:var(--roxy-border,#e4e4e7);stroke-width:5px;stroke-linecap:round}.bg-half{stroke-width:5px;stroke-linecap:round}.bg-half.stripe{stroke-linecap:butt;stroke-dasharray:7 7}.bg-center{fill:var(--roxy-surface,#fff);stroke:var(--roxy-secondary,#475569);stroke-width:1.8px}.bg-center.defined{stroke:color-mix(in srgb, var(--roxy-fg,#0a0a0a) 45%, transparent)}:host{--center-gold:#e0a200;--center-green:#2f8f00;--center-red:#c41f1f;--center-brown:#76502f}.bg-center.bg-gold.defined,.legend .swatch.bg-gold{fill:var(--center-gold);background:var(--center-gold)}.bg-center.bg-green.defined,.legend .swatch.bg-green{fill:var(--center-green);background:var(--center-green)}.bg-center.bg-red.defined,.legend .swatch.bg-red{fill:var(--center-red);background:var(--center-red)}.bg-center.bg-brown.defined,.legend .swatch.bg-brown{fill:var(--center-brown);background:var(--center-brown)}.bg-gate-dot{fill:var(--roxy-surface,#fff);stroke:var(--roxy-border,#e4e4e7);stroke-width:1px}.bg-gate-dot.on{stroke:none}.bg-center-name{fill:var(--roxy-muted,#71717a);opacity:.5;font-size:${Pe}px;letter-spacing:.08em;text-transform:uppercase;pointer-events:none;font-weight:600}.bg-center-name.defined{fill:var(--roxy-surface,#fff);opacity:.62}.bg-gate{fill:var(--roxy-muted,#71717a);font-size:${bt}px;font-weight:600;font-family:var(--roxy-font-sans)}.bg-gate.on{fill:var(--src-ink,var(--roxy-surface,#fff))}.legend{gap:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);flex-wrap:wrap;display:flex}.legend .swatch{vertical-align:middle;border:1px solid var(--roxy-secondary,#475569);border-radius:2px;width:10px;height:10px;margin-right:4px;display:inline-block}.bg-half.src-left{stroke:var(--src-left)}.bg-half.src-right{stroke:var(--src-right)}.bg-gate-dot.on.src-left{fill:var(--src-left)}.bg-gate-dot.on.src-right{fill:var(--src-right)}.legend .swatch.src-left{background:var(--src-left)}.legend .swatch.src-right{background:var(--src-right)}.legend .swatch.source{border-radius:var(--roxy-radius-full,9999px);border-color:#0000}`;var At=b`.facts{gap:var(--roxy-space-sm,.5rem);grid-template-columns:repeat(auto-fit,minmax(8rem,1fr));display:grid}.fact{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);background:var(--roxy-surface,#fff)}.fact span{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;display:block}.fact strong{font-size:var(--roxy-text-base,1rem);color:var(--roxy-fg,#0a0a0a)}.lead{color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);margin:0;line-height:1.6}.themes{gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.pill{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);padding:2px 10px}.pill--good{background:color-mix(in srgb, var(--roxy-success,#16a34a) 16%, transparent);color:var(--roxy-success-fg,#166534)}.pill--shadow{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 16%, transparent);color:var(--roxy-danger-fg,#991b1b)}.keynotes{gap:var(--roxy-space-xs,.25rem);margin:0;display:grid}.keynotes dt{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.05em}.keynotes dd{margin:0}`;function _t(o,e){return o==="design"?e("Design"):o==="personality"?e("Personality"):o??""}function kt(o){let e=o.filter(t=>!!t.value);return e.length===0?l:c`<div class="facts" part="facts">${e.map(t=>c`<div class="fact" part="fact"><span>${t.label}</span> <strong>${t.value}</strong></div>`)}</div>`}function Rt(o,e,t){return!o&&!e?l:c`<div class="themes" part="themes">${o?c`<span class="pill pill--good">${t("Signature: {{value}}",{value:o})}</span>`:l} ${e?c`<span class="pill pill--shadow">${t("Not-self: {{value}}",{value:e})}</span>`:l}</div>`}function Et(o,e){return!o?.personality&&!o?.design?l:c`<dl class="keynotes" part="keynotes">${o.personality?c`<dt>${e("Line {{line}} · Personality",{line:o.personalityLine??""})}</dt><dd>${o.personality}</dd>`:l} ${o.design?c`<dt>${e("Line {{line}} · Design",{line:o.designLine??""})}</dt><dd>${o.design}</dd>`:l}</dl>`}var $r="Localized";function x(o,e,t){let r=o,n=r?.[`${e}${$r}`];if(typeof n=="string"&&n!=="")return n;if(t!==void 0)return t;let s=r?.[e];return typeof s=="string"?s:""}var Ct=b`.roxy-tablist{border-bottom:2px solid var(--roxy-border,#e4e4e7);scrollbar-width:thin;gap:2px;min-width:0;display:flex;overflow-x:auto}.roxy-tab{padding:var(--roxy-space-xs,.25rem) var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);cursor:pointer;color:var(--roxy-muted,#71717a);transition:color var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,ease);background:0 0;border:none;border-bottom:2px solid #0000;flex-shrink:0;margin-bottom:-2px;font-family:inherit}.roxy-tab[aria-selected=true]{color:var(--roxy-accent-ink,#b45309);border-bottom-color:var(--roxy-accent,#f59e0b);font-weight:var(--roxy-weight-bold,600)}.roxy-tab:hover:not([aria-selected=true]){color:var(--roxy-fg,#0a0a0a)}.roxy-tab:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:-2px;border-radius:4px}`;function Tt(o){let{items:e,active:t,onSelect:r,label:n,idPrefix:s,controls:i=!1}=o;return c`<div class="roxy-tablist" part="tablist" role="tablist" aria-label="${n}" @keydown="${a=>{if(a.key!=="ArrowRight"&&a.key!=="ArrowLeft")return;a.preventDefault();let h=e.findIndex(A=>A.id===t);if(h===-1)return;let u=a.key==="ArrowRight"?1:-1,g=e[(h+u+e.length)%e.length];if(!g)return;r(g.id);let S=a.currentTarget.getRootNode();requestAnimationFrame(()=>{S.querySelector(`#${s}-tab-${g.id}`)?.focus()})}}">${e.map(a=>c`<button type="button" class="roxy-tab" part="tab" role="tab" id="${s}-tab-${a.id}" aria-selected="${t===a.id?"true":"false"}" aria-controls="${i?`${s}-panel-${a.id}`:l}" tabindex="${t===a.id?"0":"-1"}" @click="${()=>r(a.id)}">${a.label}</button>`)}</div>${i?e.filter(a=>a.id!==t).map(a=>c`<div role="tabpanel" id="${s}-panel-${a.id}" aria-labelledby="${s}-tab-${a.id}" hidden></div>`):l}`}var wr=["gold","green","brown","red"];function Sr(o){let e=new Map;for(let t of o){if(t.gate==null)continue;let r=e.get(t.gate);r?r.push(t):e.set(t.gate,[t])}return e}var N=class extends m{constructor(){super(...arguments);this.side="personality"}renderData(t){let r=t.centers??[],n=new Set(r.filter(h=>h.defined).map(h=>h.id)),s=Sr(t.gates??[]),i=new Map([...s].map(([h,u])=>[h,{left:u.some(g=>g.side==="design"),right:u.some(g=>g.side==="personality")}])),d=this.buildGateTitles(s),a=new Map(r.map(h=>[h.id,x(h,"name")]));return c`<div class="wrap" part="card"><header class="head" part="header"><h2 class="title">${this.t("Bodygraph")}</h2>${t.type||t.profile?c`<div class="type-line">${[x(t,"type"),t.profile?this.t("Profile {{profile}}",{profile:t.profile}):""].filter(Boolean).join(" · ")}</div>`:l}</header><div class="layout" part="layout"><svg class="chart" part="chart" viewBox="${$t}" preserveAspectRatio="xMidYMid meet" role="img" aria-label="${this.t("Human Design bodygraph with nine centers, channels, and activated gates overlaid on a human silhouette")}"><title>${this.t("Human Design bodygraph")}</title><desc>${this.t("Nine energy centers in their canonical positions over a human silhouette, each filled with its traditional color when defined and outlined when open, wired by channels between activated gates.")}</desc>${wt({definedCenters:n,gateSources:i,gateTitles:d,centerNames:a,stateWords:{defined:this.t("Defined"),open:this.t("Open")}})}</svg> ${this.renderSummary(t,a)}</div>${this.renderReading(t)} ${this.renderChannels(t.channels??[],a)} ${this.renderCenters(r)} ${this.renderActivations(t)}</div>`}buildGateTitles(t){let r=new Map;for(let[n,s]of t){let i=s.map(d=>[this.gateGlyph(d),`${n}${d.line!=null?`.${d.line}`:""}`,_t(d.side,this.translator)].filter(Boolean).join(" "));r.set(n,[this.t("Gate {{gate}}",{gate:n}),x(s[0],"gateName"),...i].filter(Boolean).join(" · "))}return r}gateGlyph(t){return t.planet?et(t.planet)??x(t,"planet"):""}renderSummary(t,r){let n=t.incarnationCross;return c`<div class="summary" part="details">${kt([{label:this.t("Type"),value:x(t,"type")},{label:this.t("Strategy"),value:x(t,"strategy")},{label:this.t("Authority"),value:x(t,"authority")},{label:this.t("Profile"),value:t.profile},{label:this.t("Definition"),value:x(t,"definition")}])} ${t.typeDescription&&!this.hideReadings?c`<p class="lead">${t.typeDescription}</p>`:l} ${n?.name?c`<p class="cross">${n.name} ${n.gates?.length?c`<span class="gates">(${n.gates.join(", ")})</span>`:l}</p>`:l} ${Rt(t.signature?x(t,"signature"):void 0,t.notSelf?x(t,"notSelf"):void 0,this.translator)} ${this.renderLegend(r)}</div>`}renderLegend(t){let r=wr.map(n=>[n,Oe.filter(s=>s.color===n).map(s=>t.get(s.id)||s.label).join(", ")]);return c`<div class="legend" part="legend"><span class="legend-row"><span class="swatch source src-right"></span>${this.t("Personality")} <span class="swatch source src-left"></span>${this.t("Design")} </span><span class="legend-row">${this.t("Center colors when defined. Open centers are outlined.")}</span> ${r.map(([n,s])=>c`<span><span class="swatch bg-${n} defined"></span>${s}</span>`)} <span><span class="swatch"></span>${this.t("Open center")}</span></div>`}renderReading(t){let r=t.incarnationCross,n=[{label:this.t("Strategy"),aside:x(t,"strategy"),body:t.strategyDescription},{label:this.t("Authority"),aside:x(t,"authority"),body:t.authorityDescription},{label:this.t("Profile"),aside:t.profile,body:t.profileDescription,extra:Et(t.profileKeynotes,this.translator)},{label:this.t("Definition"),aside:x(t,"definition"),body:t.definitionDescription},{label:this.t("Aura"),body:t.aura},{label:this.t("Incarnation cross"),aside:r?x(r,"angle"):void 0,body:r?.description??""}];return this.renderInterpretation(n,"hd-reading")}renderChannels(t,r){if(t.length===0||this.hideReadings)return l;let n=new Map;for(let i of t){let d=i.circuit??"",a=n.get(d);a?a.push(i):n.set(d,[i])}let s=0;return c`<section class="block" part="section channels"><h3>${this.t("Defined channels ({{count}})",{count:t.length})}</h3>${[...n].map(([i,d])=>c`<div class="group">${i?c`<p class="group-head">${this.t("{{circuit}} circuit",{circuit:x(d[0],"circuit")})}</p>`:l} ${d[0]?.circuitDescription?c`<p class="group-note">${d[0].circuitDescription}</p>`:l} ${d.map(a=>c`<details class="interp-card" part="reading" name="hd-channel" ?open="${s++===0}"><summary><span class="interp-lead"><span class="chan-gates">${a.gateA}-${a.gateB}</span> <span>${x(a,"name")}</span> </span>${D()} <span class="interp-aside"><span class="chips">${(a.centers??[]).map(h=>c`<span class="chip">${r.get(h)||h}</span>`)}</span></span></summary><div class="interp-body">${a.description?c`<p>${a.description}</p>`:l}</div></details>`)}</div>`)}</section>`}renderCenters(t){if(t.length===0||this.hideReadings)return l;let r=t.filter(n=>n.defined).length;return c`<section class="block" part="section centers"><h3>${this.t("Centers ({{defined}} defined, {{open}} open)",{defined:r,open:t.length-r})}</h3>${t.map((n,s)=>c`<details class="interp-card" part="reading" name="hd-center" ?open="${s===0}"><summary><span class="interp-lead">${x(n,"name")}</span> ${D()} <span class="interp-aside"><span class="chips"><span class="chip ${n.defined?"chip--on":""}">${n.defined?this.t("Defined"):this.t("Open")}</span> ${n.motor?c`<span class="chip">${this.t("Motor")}</span>`:l} ${n.awareness?c`<span class="chip">${this.t("Awareness")}</span>`:l}</span></span></summary><div class="interp-body">${n.theme?c`<p>${n.theme}</p>`:l} ${!n.defined&&n.notSelfQuestion?c`<dl class="keynotes"><dt>${this.t("Not-self question")}</dt><dd>${n.notSelfQuestion}</dd></dl>`:l} ${n.biology?c`<p class="footnote">${this.t("Biology")}. ${n.biology}</p>`:l} ${n.gates?.length?c`<p class="footnote">${this.t("Gates {{gates}}",{gates:n.gates.join(", ")})}</p>`:l}</div></details>`)}</section>`}renderActivations(t){let r=t.gates??[];if(r.length===0||this.hideReadings)return l;let n=r.filter(u=>u.side==="personality"),s=r.filter(u=>u.side==="design"),i=n.length>0&&s.length>0,d=this.side,a=i?d==="design"?s:n:r,h=i?t.sides?.[d]:void 0;return c`<section class="block" part="section activations"><h3>${this.t("Activations ({{count}})",{count:r.length})}</h3>${i?Tt({items:[{id:"personality",label:`${this.t("Personality")} (${n.length})`},{id:"design",label:`${this.t("Design")} (${s.length})`}],active:d,onSelect:u=>{this.side=u},label:this.t("Chart sides"),idPrefix:"hd",controls:!0}):l}<div id="${i?`hd-panel-${d}`:l}" part="panel" role="${i?"tabpanel":l}" aria-labelledby="${i?`hd-tab-${d}`:l}">${h?c`<p class="side-note">${h}</p>`:l} ${a.map((u,g)=>this.renderGate(u,g===0))}</div></section>`}renderGate(t,r){let n=this.gateGlyph(t),s=x(t,"planet"),i=t.ichingHexagram;return c`<details class="interp-card" part="reading" name="hd-gate" ?open="${r}"><summary><span class="interp-lead">${n?c`<span class="glyph" aria-hidden="true">${n}</span>`:l} <span class="gate-id">${t.gate}${t.line!=null?`.${t.line}`:""}</span> <span>${x(t,"gateName")}</span> </span>${D()} ${s?c`<span class="interp-aside"><small>${s}</small></span>`:l}</summary><div class="interp-body">${t.gateDescription?c`<p>${t.gateDescription}</p>`:l} ${t.lineMeaning?c`<dl class="keynotes"><dt>${this.t("Line {{line}}",{line:t.line??""})}</dt><dd>${t.lineMeaning}</dd></dl>`:l} ${t.planetDescription?c`<p class="footnote">${s}. ${t.planetDescription}</p>`:l} ${i?.number?c`<p class="footnote">${this.t("I Ching hexagram {{number}}",{number:i.number})}${i.english?`, ${i.english}`:""}</p>`:l}</div></details>`}};N.styles=[le,Ct,ct,pt,At,St,b`.wrap{background:var(--roxy-surface,#fff);width:100%;color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.type-line{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem)}.layout{gap:var(--roxy-space-lg,1.5rem);grid-template-columns:minmax(0,1fr);align-items:start;display:grid}.wrap{--src-left:var(--roxy-danger,#dc2626);--src-right:var(--roxy-fg,#0a0a0a)}.summary{gap:var(--roxy-space-md,1rem);display:grid}.cross{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a);border-left:2px solid var(--roxy-accent,#f59e0b);padding-left:var(--roxy-space-sm,.5rem);margin:0}.cross .gates{color:var(--roxy-muted,#71717a);font-variant-numeric:tabular-nums}.legend-row{color:var(--roxy-muted,#71717a);flex-basis:100%}.legend-row .swatch:not(:first-child){margin-left:var(--roxy-space-md,1rem)}.legend .swatch.defined{border-color:color-mix(in srgb, var(--roxy-fg,#0a0a0a) 45%, transparent)}.group{margin-bottom:var(--roxy-space-md,1rem)}.group:last-child{margin-bottom:0}.group-head{font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a);margin:0}.group-note{margin:0 0 var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);line-height:1.6}.footnote{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);margin:0;line-height:1.6}.chip{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 45%, transparent);color:var(--roxy-fg,#0a0a0a);padding:1px 8px;display:inline-block}.chip--on{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 18%, transparent)}.chips{flex-wrap:wrap;gap:.25rem;display:inline-flex}.gate-id,.chan-gates{font-variant-numeric:tabular-nums;font-weight:var(--roxy-weight-bold,600);color:var(--roxy-accent-ink,#b45309)}.glyph{color:var(--roxy-accent-ink,#b45309)}.side-note{margin:0 0 var(--roxy-space-sm,.5rem);padding-top:var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);line-height:1.6}`],f([E()],N.prototype,"side",2),N=f([Qe("roxy-bodygraph")],N);Z();return Nt(Ar);})();
293
293
  /*! Bundled license information:
294
294
 
295
295
  @lit/reactive-element/css-tag.js: