@roxyapi/ui 0.51.2 → 0.51.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components-catalog.json +153 -153
- package/dist/cdn/components/data.js +4 -4
- package/dist/cdn/components/data.js.map +4 -4
- package/dist/cdn/components/endpoint-form.js +1 -1
- package/dist/cdn/components/endpoint-form.js.map +1 -1
- package/dist/cdn/components/gematria.js +1 -1
- package/dist/cdn/components/gematria.js.map +2 -2
- package/dist/cdn/components/guna-milan.js +1 -1
- package/dist/cdn/components/guna-milan.js.map +2 -2
- package/dist/cdn/components/mayan-day-sign.js +1 -1
- package/dist/cdn/components/mayan-day-sign.js.map +2 -2
- package/dist/cdn/roxy-ui.js +52 -52
- package/dist/cdn/roxy-ui.js.map +4 -4
- package/dist/components/data.d.ts +10 -33
- package/dist/components/data.d.ts.map +1 -1
- package/dist/components/data.js +1 -1
- package/dist/components/data.js.map +4 -4
- package/dist/components/endpoint-form.js +1 -1
- package/dist/components/endpoint-form.js.map +1 -1
- package/dist/components/gematria.js +1 -1
- package/dist/components/gematria.js.map +2 -2
- package/dist/components/guna-milan.js +1 -1
- package/dist/components/guna-milan.js.map +2 -2
- package/dist/components/mayan-day-sign.js +1 -1
- package/dist/components/mayan-day-sign.js.map +2 -2
- package/dist/index.cjs +81 -81
- package/dist/index.cjs.map +4 -4
- package/dist/index.js +76 -76
- package/dist/index.js.map +4 -4
- package/dist/styles/themes/practitioner.css +5 -5
- package/dist/utils/stacked-table.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/data.ts +85 -94
- package/src/styles/themes/practitioner.css +5 -5
- package/src/utils/stacked-table.ts +2 -0
- package/src/version.ts +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var RoxyUI_data=(()=>{var
|
|
1
|
+
var RoxyUI_data=(()=>{var q=Object.defineProperty;var Ae=Object.getOwnPropertyDescriptor;var wt=Object.getOwnPropertyNames;var vt=Object.prototype.hasOwnProperty;var $t=(n,e)=>{for(var t in e)q(n,t,{get:e[t],enumerable:!0})},kt=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of wt(e))!vt.call(n,o)&&o!==t&&q(n,o,{get:()=>e[o],enumerable:!(r=Ae(e,o))||r.enumerable});return n};var St=n=>kt(q({},"__esModule",{value:!0}),n),m=(n,e,t,r)=>{for(var o=r>1?void 0:r?Ae(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&&q(e,t,o),o};var $r={};$t($r,{ROXY_UI_TOKENS_STYLE_ID:()=>B,RoxyData:()=>C,injectRoxyTokens:()=>Y});var _e=`/**
|
|
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). Why every rule sits in a cascade layer is the note above the layer statement below. 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.
|
|
@@ -296,9 +296,9 @@ var RoxyUI_data=(()=>{var F=Object.defineProperty;var ke=Object.getOwnPropertyDe
|
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
|
-
`;var
|
|
300
|
-
\f\r]`,
|
|
301
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Pe=/'/g,Ie=/"/g,je=/^(?:script|style|textarea|title)$/i,ge=n=>(e,...t)=>({_$litType$:n,strings:e,values:t}),l=ge(1),Tr=ge(2),Er=ge(3),T=Symbol.for("lit-noChange"),h=Symbol.for("lit-nothing"),De=new WeakMap,_=R.createTreeWalker(R,129);function ze(n,e){if(!ye(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return Oe!==void 0?Oe.createHTML(e):e}var Nt=(n,e)=>{let t=n.length-1,r=[],o,s=e===2?"<svg>":e===3?"<math>":"",i=D;for(let c=0;c<t;c++){let a=n[c],u,p,d=-1,g=0;for(;g<a.length&&(i.lastIndex=g,p=i.exec(a),p!==null);)g=i.lastIndex,i===D?p[1]==="!--"?i=Ue:p[1]!==void 0?i=Ne:p[2]!==void 0?(je.test(p[2])&&(o=RegExp("</"+p[2],"g")),i=A):p[3]!==void 0&&(i=A):i===A?p[0]===">"?(i=o??D,d=-1):p[1]===void 0?d=-2:(d=i.lastIndex-p[2].length,u=p[1],i=p[3]===void 0?A:p[3]==='"'?Ie:Pe):i===Ie||i===Pe?i=A:i===Ue||i===Ne?i=D:(i=A,o=void 0);let $=i===A&&n[c+1].startsWith("/>")?" ":"";s+=i===D?a+Ot:d>=0?(r.push(u),a.slice(0,d)+Me+a.slice(d)+S+$):a+S+(d===-2?c:$)}return[ze(n,s+(n[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]},j=class n{constructor({strings:e,_$litType$:t},r){let o;this.parts=[];let s=0,i=0,c=e.length-1,a=this.parts,[u,p]=Nt(e,t);if(this.el=n.createElement(u,r),_.currentNode=this.el.content,t===2||t===3){let d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(o=_.nextNode())!==null&&a.length<c;){if(o.nodeType===1){if(o.hasAttributes())for(let d of o.getAttributeNames())if(d.endsWith(Me)){let g=p[i++],$=o.getAttribute(d).split(S),H=/([.?@])?(.*)/.exec(g);a.push({type:1,index:s,name:H[2],strings:$,ctor:H[1]==="."?he:H[1]==="?"?ue:H[1]==="@"?pe:O}),o.removeAttribute(d)}else d.startsWith(S)&&(a.push({type:6,index:s}),o.removeAttribute(d));if(je.test(o.tagName)){let d=o.textContent.split(S),g=d.length-1;if(g>0){o.textContent=W?W.emptyScript:"";for(let $=0;$<g;$++)o.append(d[$],M()),_.nextNode(),a.push({type:2,index:++s});o.append(d[g],M())}}}else if(o.nodeType===8)if(o.data===Ke)a.push({type:2,index:s});else{let d=-1;for(;(d=o.data.indexOf(S,d+1))!==-1;)a.push({type:7,index:s}),d+=S.length-1}s++}}static createElement(e,t){let r=R.createElement("template");return r.innerHTML=e,r}};function L(n,e,t=n,r){if(e===T)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=L(n,o._$AS(n,e.values),o,r)),e}var ce=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??R).importNode(t,!0);_.currentNode=o;let s=_.nextNode(),i=0,c=0,a=r[0];for(;a!==void 0;){if(i===a.index){let u;a.type===2?u=new z(s,s.nextSibling,this,e):a.type===1?u=new a.ctor(s,a.name,a.strings,this,e):a.type===6&&(u=new fe(s,this,e)),this._$AV.push(u),a=r[++c]}i!==a?.index&&(s=_.nextNode(),i++)}return _.currentNode=R,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++}},z=class n{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,r,o){this.type=2,this._$AH=h,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=L(this,e,t),K(e)?e===h||e==null||e===""?(this._$AH!==h&&this._$AR(),this._$AH=h):e!==this._$AH&&e!==T&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Ut(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!==h&&K(this._$AH)?this._$AA.nextSibling.data=e:this.T(R.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=j.createElement(ze(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===o)this._$AH.p(t);else{let s=new ce(o,this),i=s.u(this.options);s.p(t),this.T(i),this._$AH=s}}_$AC(e){let t=De.get(e.strings);return t===void 0&&De.set(e.strings,t=new j(e)),t}k(e){ye(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(M()),this.O(M()),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=Le(e).nextSibling;Le(e).remove(),e=r}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},O=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,o,s){this.type=1,this._$AH=h,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=h}_$AI(e,t=this,r,o){let s=this.strings,i=!1;if(s===void 0)e=L(this,e,t,0),i=!K(e)||e!==this._$AH&&e!==T,i&&(this._$AH=e);else{let c=e,a,u;for(e=s[0],a=0;a<s.length-1;a++)u=L(this,c[r+a],t,a),u===T&&(u=this._$AH[a]),i||=!K(u)||u!==this._$AH[a],u===h?e=h:e!==h&&(e+=(u??"")+s[a+1]),this._$AH[a]=u}i&&!o&&this.j(e)}j(e){e===h?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},he=class extends O{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===h?void 0:e}},ue=class extends O{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==h)}},pe=class extends O{constructor(e,t,r,o,s){super(e,t,r,o,s),this.type=5}_$AI(e,t=this){if((e=L(this,e,t,0)??h)===T)return;let r=this._$AH,o=e===h&&r!==h||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,s=e!==h&&(r===h||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)}},fe=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){L(this,e)}};var Pt=me.litHtmlPolyfillSupport;Pt?.(j,z),(me.litHtmlVersions??=[]).push("3.3.3");var He=(n,e,t)=>{let r=t?.renderBefore??e,o=r._$litPart$;if(o===void 0){let s=t?.renderBefore??null;r._$litPart$=o=new z(e.insertBefore(M(),s),s,void 0,t??{})}return o._$AI(n),o};var xe=globalThis,k=class extends v{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=He(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return T}};k._$litElement$=!0,k.finalized=!0,xe.litElementHydrateSupport?.({LitElement:k});var It=xe.litElementPolyfillSupport;It?.({LitElement:k});(xe.litElementVersions??=[]).push("4.2.2");var Fe=n=>(e,t)=>{t!==void 0?t.addInitializer(()=>{customElements.define(n,e)}):customElements.define(n,e)};var Dt={attribute:!0,type:String,converter:I,reflect:!1,hasChanged:G},Mt=(n=Dt,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 y(n){return(e,t)=>typeof t=="object"?Mt(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 x(n){return y({...n,state:!0,attribute:!1})}var w=n=>n??h;var qe=["de","en","es","fr","hi","pt","ru","tr","zh-Hans","zh-Hant"];function we(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 Kt={tw:"hant",hk:"hant",mo:"hant",cn:"hans",sg:"hans",my:"hans"};function be(n){let e=n.toLowerCase();return qe.find(t=>t.toLowerCase()===e)}function Be(n){let e=we(n);if(!e)return;let t=be(e);if(t)return t;let r=e.toLowerCase().split("-"),o=r[0];if(o==="zh"){let s=r.find(i=>i==="hans"||i==="hant")??Kt[r[1]??""];return s?be(`zh-${s}`):void 0}return be(o)}function Ye(n){return n.toLowerCase().replace(/[\s_-]+/g," ").trim()}function X(n){return n.replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([a-z])([0-9])/g,"$1 $2").replace(/^\w/,e=>e.toUpperCase())}var Je="__ROXY_UI_I18N__";function ve(){let n=globalThis,e=n[Je];if(e)return e;let t={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return n[Je]=t,t}function jt(n,e){return e?n.replace(/\{\{(\w+)\}\}/g,(t,r)=>r in e?String(e[r]??""):t):n}function Ve(n,e,t){return jt(zt(n,e)??e,t)}function zt(n,e){if(!n)return;let{catalogs:t}=ve(),r=n.toLowerCase();return(t[r]??t[r.split("-")[0]])?.[Ye(e)]}function Ht(n){if(!n)return;let{fieldLabels:e}=ve(),t=n.toLowerCase();return e[t]??e[t.split("-")[0]]}function Ge(n,e){return Ht(n)?.fields[e]}function We(n){let{listeners:e}=ve();return e.add(n),()=>{e.delete(n)}}var Q=class{constructor(e){this.host=e,e.addController(this)}hostConnected(){this.unsubscribe=We(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var ee=class extends k{constructor(){super();this.translator=(t,r)=>this.t(t,r);new Q(this)}t(t,r){return Ve(this.effectiveLang(),t,r)}effectiveLang(){return we(this)}};var te=b`:host{--roxy-label-col:minmax(0, 25%);--_success-fg:var(--roxy-success-fg,#09632a);--_warning-fg:var(--roxy-warning-fg,#913304);--_danger-fg:var(--roxy-danger-fg,#881313);--_info-fg:var(--roxy-info-fg,#014f7a);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([hidden]){display:none}:host([bare]){--roxy-surface:transparent;--roxy-shadow-sm:none;--roxy-shadow-md:none}*,:before,:after{box-sizing:border-box}h1,h2,h3,h4{font-family:var(--roxy-font-display,var(--roxy-font-sans,system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif))}@keyframes roxy-fade-in{0%{transform:translateY(2px)}to{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(--_danger-fg);font-size:var(--roxy-text-sm,.875rem);justify-items:start;display:grid}: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}.roxy-edit:disabled{cursor:progress;color:var(--roxy-muted,#71717a)}roxy-endpoint-form+*{margin-top:var(--roxy-space-md,1rem)}.roxy-more{justify-items:center;gap:var(--roxy-space-sm,.5rem);margin-top:var(--roxy-space-md,1rem);display:grid}.roxy-more .roxy-edit{min-height:44px}:host{font-variant-emoji:text}`;var Ft="__cols",qt="__rows";function Bt(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function re(n){if(Array.isArray(n)){let s=!1,i=n.map(c=>{let a=re(c);return a!==c&&(s=!0),a});return s?i:n}if(!Bt(n))return n;let e=n[Ft],t=n[qt];if(Array.isArray(e)&&Array.isArray(t)&&Object.keys(n).length===2)return t.map(s=>{let i={};return e.forEach((c,a)=>{i[c]=re(s[a])}),i});let r=!1,o={};for(let[s,i]of Object.entries(n)){let c=re(i);c!==i&&(r=!0),o[s]=c}return r?o:n}function Ze(n){return re(n)}var Yt="pk_live_YOUR_KEY",Xe={secret:{reason:"possible-secret-key",message:"Client-side components accept a pk_ publishable key only. Use a publishable key with an origin allowlist, or render server-side."},sample:{reason:"sample-key",message:"Replace the sample key with your own publishable key from your RoxyAPI account."}};function Qe(n){if(n)return n===Yt?Xe.sample:n.startsWith("pk_")?void 0:Xe.secret}function et(n,e,t={}){t.warn&&console.warn(e.message),n.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:e.reason,message:e.message},bubbles:!0,composed:!0}))}var tt="https://roxyapi.com/api/v2";async function Jt(n){try{let e=await n.json();if(e?.error){let t=e.code==="validation_error"&&Array.isArray(e.issues)?e.issues.filter(r=>typeof r.path=="string"&&typeof r.message=="string").map(r=>({path:r.path,message:r.message})):null;return{message:e.error,issues:t?.length?t:null,worded:!0}}}catch{}return{message:`Request failed (${n.status})`,issues:null,worded:!1}}var U=class extends Error{constructor(t,r=null,o=!0){super(t);this.issues=r;this.worded=o}};function rt(n){return n.submitUrl?void 0:Qe(n.publishableKey)}async function $e(n,e,t){let r=rt(n);if(r)throw new U(r.message);let o=n.submitUrl?await fetch(n.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:Vt(e,n.submitContext),signal:t}):await Gt(n,e,t);if(!o.ok){let s=await Jt(o);throw new U(s.message,s.issues,s.worded)}return await o.json()}function Vt(n,e){return JSON.stringify(e?{...n,context:e}:n)}function Gt(n,e,t){let r=new URL(`${n.baseUrl??tt}${e.path}`,document.baseURI);for(let[s,i]of Object.entries(e.query??{}))i!=null&&r.searchParams.set(s,String(i));let o={Accept:"application/json"};return n.publishableKey&&(o["X-API-Key"]=n.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})}var ne=class{constructor(e){this.baseUrl=tt;this.worded=!0;this.host=e,e.addController(this)}hostDisconnected(){this.abort?.abort(),this.abort=void 0}async run(e){this.worded=!0;let t=rt(this);if(t){this.host.error=t.message,et(this.host,t);return}this.abort?.abort();let r=new AbortController;this.abort=r,this.host.loading=!0,this.host.error=null,this.host.issues=null;try{let o=await $e(this,e,r.signal);if(r.signal.aborted)return;this.host.data=o}catch(o){if(r.signal.aborted||o?.name==="AbortError")return;o instanceof U&&(this.host.issues=o.issues),this.worded=o instanceof U&&o.worded,this.host.error=o instanceof Error?o.message:String(o)}finally{this.abort===r&&(this.abort=void 0),r.signal.aborted||(this.host.loading=!1)}}};function nt(n,e,t,r=[]){let o={...t},s=`/${n.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(u,p)=>{let d=o[p];return delete o[p],encodeURIComponent(String(d??""))}),i=new Set(r),c={},a={};for(let[u,p]of Object.entries(o))p===void 0||p===""||(e==="GET"||i.has(u)?c[u]=p:a[u]=p);return{path:s,method:e,query:c,body:e==="POST"?a:void 0}}function ot(){return l`<svg class="roxy-chevron" viewBox="0 0 16 16" width="14" height="14" aria-hidden="true"><path d="M4 6l4 4 4-4" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>`}var jn=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 Wt=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}`,qn=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}${Wt}`;function st(n,e,t){let r=n.filter(o=>!!o.body);return r.length===0?h:l`<section class="block" part="section readings"><h3>${t}</h3>${r.map((o,s)=>l`<details class="interp-card" part="reading" name="${e}" ?open="${s===0}"><summary><span class="interp-lead">${o.label}</span> ${ot()} ${o.aside?l`<span class="interp-aside"><small>${o.aside}</small></span>`:h}</summary><div class="interp-body"><p>${o.body}</p>${o.extra??h}</div></details>`)}</section>`}var Zt="roxy-data";function Xt(n){return n.nodeName==="SCRIPT"&&n.getAttribute("type")==="application/json"}var oe=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(Xt(e)&&e.classList.contains(Zt))return e;return null}parse(e){if(e?.trim())try{return JSON.parse(e)}catch{return}}};var Qt={fromAttribute:n=>{if(n!=null){try{let e=JSON.parse(n);if(e&&typeof e=="object"&&!Array.isArray(e))return e}catch{}console.warn("[roxy-ui] submit-context must be a JSON object; sending the request without it.")}}},m=class extends ee{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.issues=null;this.selfFetched=!1;this.editing=!1;this.sticky=!1;this.moreLoading=!1;this.moreError=null;this.onMore=async()=>{let t=this.lastRequest,r=this.listKey,o=this.listRows();if(!(!t||!r||!o)){this.moreLoading=!0,this.moreError=null;try{let s=await $e(this.fetcher,{...t,query:{...t.query,offset:o.length}});if(this.lastRequest!==t)return;let i=s[r];this.data={...this.data,...s,[r]:[...o,...Array.isArray(i)?i:[]]}}catch(s){this.lastRequest===t&&(this.moreError=s instanceof Error?s.message:String(s))}finally{this.moreLoading=!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.fetchFresh(nt(this.endpoint,this.method,r.values,r.queryKeys??[]))};new oe(this),this.fetcher=new ne(this)}static{this.styles=[te]}willUpdate(t){if(t.has("data")&&this.data!=null){let r=Ze(this.data);r!==this.data&&(this.data=r)}(t.has("publishableKey")||t.has("baseUrl")||t.has("submitUrl")||t.has("submitContext"))&&this.syncFetcher()}syncFetcher(){this.fetcher.publishableKey=this.publishableKey,this.baseUrl&&(this.fetcher.baseUrl=this.baseUrl),this.fetcher.submitUrl=this.submitUrl,this.fetcher.submitContext=this.submitContext}render(){return l`${this.hiddenSectionsStyle()}${this.renderState()}`}drawn(t){try{return this.renderData(t)}catch(r){return console.warn(`[roxy-ui] ${this.localName} could not draw its response`,r),this.dispatchEvent(new CustomEvent("roxy-render-error",{detail:{error:r},bubbles:!0,composed:!0})),customElements.get("roxy-data")?l`<roxy-data .data="${t}" lang="${w(this.effectiveLang())}"></roxy-data>`:this.renderEmpty()}}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 h;let r=t.map(o=>`[part~="${o}"],roxy-endpoint-form::part(${o}){display:none!important}`).join("");return l`<style>${r}</style>`}renderState(){return this.endpoint&&this.sticky&&this.selfFetched&&!this.editing?this.renderWithForm(this.stickyBody()):this.loading?this.renderLoading():this.error!=null?this.renderError(this.error):this.data!=null?this.selfFetched?this.editing?this.renderForm():this.renderResult(this.data):this.showAttribution()?l`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data):this.renderNoData()}renderInterpretation(t,r,o){return this.hideReadings?h:st(t,r,this.t(o??"Reading"))}renderResult(t){let r=l`<div class="roxy-edit-bar" part="edit-bar"><button type="button" class="roxy-edit" @click="${this.onEdit}">${this.t("Edit query")}</button></div>${this.drawn(t)}`;return this.showAttribution()?l`${r}${this.renderAttribution()}`:r}renderWithForm(t){return l`${this.renderForm()}${t}`}stickyBody(){return this.loading?this.renderLoading():this.error!=null?this.issues?h:this.renderErrorBanner(this.error):this.data==null?h:this.showAttribution()?l`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data)}renderMore(){let t=this.listRows(),r=this.data?.total;return!this.lastRequest||!t||typeof r!="number"?h:t.length>=r?h:l`<div class="roxy-more" part="more"><button type="button" class="roxy-edit" ?disabled="${this.moreLoading}" aria-busy="${this.moreLoading?"true":"false"}" @click="${this.onMore}">${this.t("Show more")}</button> ${this.moreError?l`<p class="roxy-error" role="alert">${this.t(this.moreError)}</p>`:h}</div>`}listRows(){let t=this.listKey?this.data?.[this.listKey]:void 0;return Array.isArray(t)?t:void 0}fetchFresh(t){return this.lastRequest=t,this.openedRow=void 0,this.openedRowId=void 0,this.moreError=null,this.fetcher.run(t)}load(t){return this.syncFetcher(),this.fetchFresh(t)}pickRow(t){this.dispatchEvent(new CustomEvent("roxy-symbol-select",{detail:t,bubbles:!0,composed:!0})),this.openRow(t.id)}openRow(t){if(!this.rowDetail||!(this.publishableKey||this.submitUrl))return;let r=this.openedRow??document.createElement(this.rowDetail.tag);r.publishableKey=this.publishableKey,r.baseUrl=this.baseUrl,r.submitUrl=this.submitUrl,r.submitContext=this.submitContext,r.hideReadings=this.hideReadings,r.hideSections=this.hideSections;let o=this.effectiveLang();o&&r.setAttribute("lang",o),this.openedRow=r,this.openedRowId=t,r.load({path:`/${this.rowDetail.path.replace("{id}",encodeURIComponent(t))}`,method:"GET",query:{lang:Be(this)}}).then(()=>r.scrollIntoView?.({block:"nearest"}))}showAttribution(){return this.attribution!=null&&this.attribution!=="off"&&this.attribution!=="false"}renderAttribution(){return l`<div class="roxy-attribution" part="attribution"><a href="https://roxyapi.com/?utm_source=widget&utm_medium=embed" target="_blank" rel="noopener">${this.t("Spiritual data by RoxyAPI")}</a></div>`}renderNoData(){return this.endpoint?this.renderWithForm(h):this.renderEmpty()}renderForm(){return l`<roxy-endpoint-form part="form" exportparts="hint" data-endpoint="${this.endpoint}" method="${this.method}" spec-url="${w(this.specUrl)}" publishable-key="${w(this.publishableKey)}" location-url="${w(this.locationUrl)}" submit-label="${w(this.submitLabel)}" lang="${w(this.effectiveLang())}" .initialValues="${this.formInitialValues()}" .serverIssues="${this.issues}" .apiRoute="${this.fetcher}" .autoload="${!this.selfFetched}" .fullPages="${!!this.listKey}" @roxy-submit="${this.onFormSubmit}"></roxy-endpoint-form>`}formInitialValues(){return this.lastValues??(this.remember?this.readRemembered():void 0)}rememberKey(){return`roxy-ui:form:${this.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 l`<div class="roxy-empty" role="status" part="empty">${this.t("No data")}</div>`}renderLoading(){return l`<div class="roxy-skeleton" style="height:8rem" role="status" aria-label="${this.t("Loading")}" part="loading"></div>`}renderError(t){if(this.endpoint&&this.issues)return this.renderForm();let r=this.renderErrorBanner(t);return this.endpoint?l`${r}${this.renderForm()}`:r}renderErrorBanner(t){return l`<div class="roxy-error" role="alert" part="error">${!this.fetcher.worded&&this.errorMessage||this.t(t)}</div>`}};f([y({attribute:!1})],m.prototype,"data",2),f([y({type:String,attribute:"data-endpoint"})],m.prototype,"endpoint",2),f([y({type:String})],m.prototype,"method",2),f([y({type:String,attribute:"publishable-key"})],m.prototype,"publishableKey",2),f([y({type:String,attribute:"base-url"})],m.prototype,"baseUrl",2),f([y({type:String,attribute:"spec-url"})],m.prototype,"specUrl",2),f([y({type:String,attribute:"submit-url"})],m.prototype,"submitUrl",2),f([y({attribute:"submit-context",converter:Qt})],m.prototype,"submitContext",2),f([y({type:String,attribute:"location-url"})],m.prototype,"locationUrl",2),f([y({type:Boolean})],m.prototype,"remember",2),f([y({type:Boolean,attribute:"hide-readings",reflect:!0})],m.prototype,"hideReadings",2),f([y({type:String,attribute:"hide-sections",reflect:!0})],m.prototype,"hideSections",2),f([y({type:String,attribute:"submit-label"})],m.prototype,"submitLabel",2),f([y({type:String,attribute:"error-message"})],m.prototype,"errorMessage",2),f([y({type:String})],m.prototype,"attribution",2),f([x()],m.prototype,"loading",2),f([x()],m.prototype,"error",2),f([x()],m.prototype,"issues",2),f([x()],m.prototype,"selfFetched",2),f([x()],m.prototype,"editing",2),f([x()],m.prototype,"sticky",2),f([x()],m.prototype,"openedRow",2),f([x()],m.prototype,"openedRowId",2),f([x()],m.prototype,"moreLoading",2),f([x()],m.prototype,"moreError",2);var lt=/^\d{4}-\d{2}-\d{2}$/,er=/^\d{4}-\d{2}$/,tr=/^\d{2}:\d{2}(:\d{2})?$/,rr=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2}(\.\d+)?)?$/,it=new Map;function se(n){if(!n)return["en"];let e=it.get(n);if(e)return[e,"en"];let t="en";try{t=Intl.getCanonicalLocales(n)[0]??"en"}catch{t="en"}return it.set(n,t),[t,"en"]}var at=new Map;function nr(n){let e=n??"",t=at.get(e);if(t)return t;let o={hour:new Intl.DateTimeFormat(se(n),{timeStyle:"short",timeZone:"UTC"}).formatToParts(new Date(Date.UTC(2e3,0,1,1))).find(s=>s.type==="hour")?.value?.length===2?"2-digit":"numeric",minute:"2-digit"};return at.set(e,o),o}function dt(n){let e=tr.test(n)?`1970-01-01T${n}`:lt.test(n)?`${n}T00:00:00`:er.test(n)?`${n}-01T00:00:00`:rr.test(n)?n:null;return e?{d:new Date(`${e}Z`),timeZone:"UTC"}:{d:new Date(n)}}function ct(n,e){if(typeof e!="string"||e.length===0||lt.test(e))return"";let{d:t,timeZone:r}=dt(e);return Number.isNaN(t.getTime())?e:t.toLocaleTimeString(se(n),{...nr(n),timeZone:r})}function ht(n,e){if(typeof e!="string"||e.length===0)return"";let{d:t,timeZone:r}=dt(e);return Number.isNaN(t.getTime())?e:t.toLocaleDateString(se(n),{month:"short",day:"numeric",year:"numeric",timeZone:r})}function ut(n,e,t=1){return typeof e!="number"||!Number.isFinite(e)?"":e.toLocaleString(se(n),{maximumFractionDigits:t})}function ie(n,e,t){return Ge(n,e)??t??X(e)}var pt="Localized";function ft(n){let e;for(let t of Object.keys(n)){if(!t.endsWith(pt))continue;let r=t.slice(0,-pt.length);if(r===""||!(r in n))continue;e??={...n};let o=n[t];o!=null&&o!==""&&(e[r]=o),delete e[t]}return e??n}var mt=["title","name","label","heading","overview","summary"],or=80,sr=["imageUrl","image","icon","symbol"],ir=["imageUrl","image"],ar=["affirmation","mantra","motto","quote"],lr=new Set(["seed"]),dr=new Set(["id","slug","key"]),cr=new Set(["calculation","calculations","type","position","count","totalcount","total","limit","offset","page","pagesize","perpage"]),hr=8,yt=1,ur=12,pr=n=>n.toLowerCase().replace(/[_-]/g,""),gt=n=>/^(has|is)([A-Z_]|$)/.test(n),fr=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}(:\d{2}(\.\d+)?)?(Z|[+-]\d{2}:\d{2})?)?$/,mr=/^[A-Z0-9]+(_[A-Z0-9]+)+$/,yr=/^https?:\/\//,gr=6;function xr(n,e){if(!Number.isInteger(e))return!1;let t=n.replace(/([a-z])([A-Z])/g,"$1 $2").split(/[\s_-]+/);return t[t.length-1].toLowerCase()==="year"}function E(n){return n===null||["string","number","boolean"].includes(typeof n)}function Se(n){return n!==null&&typeof n=="object"&&!(Array.isArray(n)&&n.every(E))}function xt(n){if(n==null)return!0;if(Array.isArray(n))return n.length===0;if(typeof n!="object")return!1;let e=Object.values(n);return e.length===0||e.every(xt)}var C=class extends m{constructor(){super(...arguments);this.depth=0}renderData(t){return this.depth>=gr?l`<div class="roxy-empty" role="status">${this.t("Nested data omitted")}</div>`:l`<div class="roxy-card" part="card" aria-label="${this.t("Generic data display")}">${this.renderValue(t)}</div>`}renderValue(t){return t==null?h:E(t)?l`<p>${this.scalarTemplate(t)}</p>`:Array.isArray(t)?this.renderArray(t):this.renderObject(t)}renderArray(t){return t.length===0?l`<div class="roxy-empty" role="status">${this.t("Empty list")}</div>`:t.every(E)?this.renderChips(t):t.every(o=>o!==null&&typeof o=="object"&&!Array.isArray(o))?this.renderTable(t):l`<ol>${t.map(o=>l`<li>${this.renderValue(o)}</li>`)}</ol>`}renderChips(t){return l`<ul class="roxy-chips">${t.filter(r=>r!==null).map(r=>l`<li>${this.formatScalar(r)}</li>`)}</ul>`}renderTable(t){let r=t.map(u=>this.suppress(u)),o=this.collectKeys(r),s=new Set(o.filter(u=>r.some(p=>Se(p[u]??null)))),i=s.size>0&&s.size<o.length,c=u=>i?s.has(u)?"col-wide":"col-tight":"",a=l`<div class="roxy-table-wrap" part="table" role="group" aria-label="${this.t("Data table")}" tabindex="0"><table class="roxy-table" role="table"><thead><tr>${o.map(u=>l`<th class="${c(u)}">${ie(this.effectiveLang(),u)}</th>`)}</tr></thead><tbody>${r.map(u=>l`<tr>${o.map(p=>l`<td class="${c(p)}">${this.renderCell(u[p],p)}</td>`)}</tr>`)}</tbody></table></div>`;return r.length>ur?l`<details class="roxy-table-details"><summary>${this.t("{{count}} rows",{count:r.length})}</summary>${a}</details>`:a}suppress(t){let r=ft(t),o=mt.some(s=>typeof r[s]=="string");return Object.fromEntries(Object.entries(r).filter(([s])=>{let i=pr(s);return lr.has(i)||o&&dr.has(i)?!1:!cr.has(i)}))}renderObject(t){let r=this.suppress(t),o=mt.find(d=>typeof r[d]=="string"&&r[d].length<=or),s=sr.find(d=>typeof r[d]=="string"&&r[d].startsWith("http")),i=o!=="summary"&&typeof r.summary=="string"?"summary":null,c=ar.find(d=>typeof r[d]=="string"),a=Object.entries(r).filter(([d,g])=>d!==o&&d!==i&&d!==c&&!ir.includes(d)&&!xt(g)),u=a.filter(([,d])=>!Se(d)),p=a.filter(([,d])=>Se(d));return l`${s?l`<img class="roxy-image" src="${String(r[s])}" alt="${o?String(r[o]):this.t("illustration")}" loading="lazy">`:h} ${o?l`<h3 class="roxy-title" part="header">${r[o]}</h3>`:h} ${i?l`<p class="roxy-summary">${r[i]}</p>`:h} ${c?l`<blockquote class="roxy-quote">${r[c]}</blockquote>`:h} ${u.length>0?l`<dl class="roxy-rows" part="details label-track">${u.map(([d,g])=>l`<dt>${ie(this.effectiveLang(),d)}</dt><dd>${this.renderField(g,d)}</dd>`)}</dl>`:h} ${p.map(([d,g])=>this.renderSection(d,g))}`}renderSection(t,r){let o=r!==null&&typeof r=="object"?Array.isArray(r)?r.length:Object.keys(r).length:0,s=this.renderField(r,t),i=ie(this.effectiveLang(),t);return o>hr||this.depth>=yt?l`<details class="roxy-section" ?open="${this.depth<yt}"><summary>${i}</summary>${s}</details>`:l`<div class="roxy-section"><h4>${i}</h4>${s}</div>`}renderField(t,r){return t==null?"":t===!0&&r!==void 0&>(r)?l`<span class="roxy-badge">${this.t("Yes")}</span>`:E(t)?l`${this.scalarTemplate(t,r)}`:Array.isArray(t)&&t.every(E)?this.renderChips(t):l`<roxy-data bare lang="${w(this.effectiveLang())}" .data="${t}" .depth="${this.depth+1}"></roxy-data>`}renderCell(t,r){return t==null?"":t===!0&&r!==void 0&>(r)?l`<span class="roxy-badge">${this.t("Yes")}</span>`:E(t)?this.scalarTemplate(t,r):Array.isArray(t)&&t.every(E)?t.filter(o=>o!==null).map(o=>this.formatScalar(o)).join(", "):l`<roxy-data bare lang="${w(this.effectiveLang())}" .data="${t}" .depth="${this.depth+1}"></roxy-data>`}scalarTemplate(t,r){return typeof t=="string"&&yr.test(t)?l`<a href="${t}" target="_blank" rel="noopener noreferrer">${t}</a>`:this.formatScalar(t,r)}formatScalar(t,r){if(typeof t=="number")return r!==void 0&&xr(r,t)?String(t):ut(this.effectiveLang(),t,2)||String(t);if(typeof t=="boolean")return t?this.t("Yes"):this.t("No");if(fr.test(t)){let o=ct(this.effectiveLang(),t),s=ht(this.effectiveLang(),t);return o?`${s}, ${o}`:s}return mr.test(t)?X(t.toLowerCase()):t}collectKeys(t){let r=new Set;for(let o of t)for(let s of Object.keys(o))r.add(s);return Array.from(r)}};C.styles=[te,b`.roxy-card{background:var(--roxy-surface,#fff);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-md,1rem);box-shadow:var(--roxy-shadow-sm)}.roxy-card a{color:var(--roxy-accent-ink,#b45309)}.roxy-title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0 0 var(--roxy-space-sm,.5rem) 0;color:var(--roxy-primary,#0f172a);letter-spacing:var(--roxy-tracking-tight)}.roxy-summary{color:var(--roxy-secondary,#475569);margin:0 0 var(--roxy-space-md,1rem) 0;font-size:var(--roxy-text-sm,.875rem)}dl.roxy-rows{grid-template-columns:minmax(8ch, min(25%, max-content)) minmax(0, 1fr);gap:var(--roxy-space-xs,.25rem) var(--roxy-space-md,1rem);margin:0;display:grid}dl.roxy-rows dt{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);text-transform:capitalize}dl.roxy-rows dd{color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);word-break:break-word;margin:0}ul.roxy-chips{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;margin:0;padding:0;list-style:none;display:flex}ul.roxy-chips li{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 14%, transparent);color:var(--roxy-fg,#0a0a0a);border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);padding:2px 8px}.roxy-table-wrap{min-width:0;overflow-x:auto}table.roxy-table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem)}table.roxy-table th,table.roxy-table td{border-bottom:1px solid var(--roxy-border,#e4e4e7);padding:var(--roxy-space-sm,.5rem);text-align:left;text-transform:none;word-break:normal;overflow-wrap:normal}table.roxy-table th{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:capitalize;font-size:var(--roxy-text-xs,.75rem);letter-spacing:.04em;white-space:nowrap}table.roxy-table th.col-tight,table.roxy-table td.col-tight{white-space:nowrap;width:1%}table.roxy-table th.col-wide,table.roxy-table td.col-wide{width:auto}.roxy-image{border-radius:var(--roxy-radius-md,8px);max-width:100%;height:auto;margin-bottom:var(--roxy-space-md,1rem)}.roxy-section{margin-top:var(--roxy-space-md,1rem)}.roxy-section h4{font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-secondary,#475569);margin:0 0 var(--roxy-space-xs,.25rem) 0;text-transform:capitalize}blockquote.roxy-quote{margin:var(--roxy-space-md,1rem) 0;padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);border-left:3px solid var(--roxy-accent,#f59e0b);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 8%, transparent);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);font-style:italic}.roxy-badge{border-radius:var(--roxy-radius-full,9999px);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 18%, transparent);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);padding:1px 8px;display:inline-block}details.roxy-section,details.roxy-table-details{margin-top:var(--roxy-space-md,1rem)}details.roxy-section>summary,details.roxy-table-details>summary{cursor:pointer;font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-secondary,#475569);text-transform:capitalize}details.roxy-section>summary:focus-visible,details.roxy-table-details>summary:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px;border-radius:4px}`],f([y({attribute:!1})],C.prototype,"depth",2),C=f([Fe("roxy-data")],C);B();return St(br);})();
|
|
299
|
+
`;var B="roxy-ui-tokens";function Y(){if(typeof document>"u")return null;let n=document.getElementById(B);if(n)return n;let e=document.createElement("style");return e.id=B,e.textContent=_e,document.head.prepend(e),e}var J=globalThis,V=J.ShadowRoot&&(J.ShadyCSS===void 0||J.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ae=Symbol(),Re=new WeakMap,N=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==ae)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(V&&e===void 0){let r=t!==void 0&&t.length===1;r&&(e=Re.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&Re.set(t,e))}return e}toString(){return this.cssText}},Ee=n=>new N(typeof n=="string"?n:n+"",void 0,ae),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 N(t,n,ae)},Te=(n,e)=>{if(V)n.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of e){let r=document.createElement("style"),o=J.litNonce;o!==void 0&&r.setAttribute("nonce",o),r.textContent=t.cssText,n.appendChild(r)}},le=V?n=>n:n=>n instanceof CSSStyleSheet?(e=>{let t="";for(let r of e.cssRules)t+=r.cssText;return Ee(t)})(n):n;var{is:At,defineProperty:_t,getOwnPropertyDescriptor:Rt,getOwnPropertyNames:Et,getOwnPropertySymbols:Tt,getPrototypeOf:Ct}=Object,G=globalThis,Ce=G.trustedTypes,Lt=Ce?Ce.emptyScript:"",Ot=G.reactiveElementPolyfillSupport,P=(n,e)=>n,I={toAttribute(n,e){switch(e){case Boolean:n=n?Lt: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}},W=(n,e)=>!At(n,e),Le={attribute:!0,type:String,converter:I,reflect:!1,useDefault:!1,hasChanged:W};Symbol.metadata??=Symbol("metadata"),G.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=Le){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&&_t(this.prototype,e,o)}}static getPropertyDescriptor(e,t,r){let{get:o,set:s}=Rt(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)??Le}static _$Ei(){if(this.hasOwnProperty(P("elementProperties")))return;let e=Ct(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(P("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(P("properties"))){let t=this.properties,r=[...Et(t),...Tt(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(le(o))}else e!==void 0&&t.push(le(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 Te(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:I).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:I;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??W)(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"},$[P("elementProperties")]=new Map,$[P("finalized")]=new Map,Ot?.({ReactiveElement:$}),(G.reactiveElementVersions??=[]).push("2.1.2");var me=globalThis,Oe=n=>n,Z=me.trustedTypes,Ue=Z?Z.createPolicy("lit-html",{createHTML:n=>n}):void 0,De="$lit$",k=`lit$${Math.random().toFixed(9).slice(2)}$`,Ke="?"+k,Ut=`<${Ke}>`,R=document,z=()=>R.createComment(""),D=n=>n===null||typeof n!="object"&&typeof n!="function",ye=Array.isArray,Nt=n=>ye(n)||typeof n?.[Symbol.iterator]=="function",de=`[
|
|
300
|
+
\f\r]`,M=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ne=/-->/g,Pe=/>/g,A=RegExp(`>|${de}(?:([^\\s"'>=/]+)(${de}*=${de}*(?:[^
|
|
301
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ie=/'/g,Me=/"/g,je=/^(?:script|style|textarea|title)$/i,ge=n=>(e,...t)=>({_$litType$:n,strings:e,values:t}),a=ge(1),Lr=ge(2),Or=ge(3),E=Symbol.for("lit-noChange"),h=Symbol.for("lit-nothing"),ze=new WeakMap,_=R.createTreeWalker(R,129);function He(n,e){if(!ye(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ue!==void 0?Ue.createHTML(e):e}var Pt=(n,e)=>{let t=n.length-1,r=[],o,s=e===2?"<svg>":e===3?"<math>":"",i=M;for(let c=0;c<t;c++){let l=n[c],u,f,d=-1,p=0;for(;p<l.length&&(i.lastIndex=p,f=i.exec(l),f!==null);)p=i.lastIndex,i===M?f[1]==="!--"?i=Ne:f[1]!==void 0?i=Pe:f[2]!==void 0?(je.test(f[2])&&(o=RegExp("</"+f[2],"g")),i=A):f[3]!==void 0&&(i=A):i===A?f[0]===">"?(i=o??M,d=-1):f[1]===void 0?d=-2:(d=i.lastIndex-f[2].length,u=f[1],i=f[3]===void 0?A:f[3]==='"'?Me:Ie):i===Me||i===Ie?i=A:i===Ne||i===Pe?i=M:(i=A,o=void 0);let x=i===A&&n[c+1].startsWith("/>")?" ":"";s+=i===M?l+Ut:d>=0?(r.push(u),l.slice(0,d)+De+l.slice(d)+k+x):l+k+(d===-2?c:x)}return[He(n,s+(n[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]},K=class n{constructor({strings:e,_$litType$:t},r){let o;this.parts=[];let s=0,i=0,c=e.length-1,l=this.parts,[u,f]=Pt(e,t);if(this.el=n.createElement(u,r),_.currentNode=this.el.content,t===2||t===3){let d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(o=_.nextNode())!==null&&l.length<c;){if(o.nodeType===1){if(o.hasAttributes())for(let d of o.getAttributeNames())if(d.endsWith(De)){let p=f[i++],x=o.getAttribute(d).split(k),F=/([.?@])?(.*)/.exec(p);l.push({type:1,index:s,name:F[2],strings:x,ctor:F[1]==="."?he:F[1]==="?"?ue:F[1]==="@"?pe:O}),o.removeAttribute(d)}else d.startsWith(k)&&(l.push({type:6,index:s}),o.removeAttribute(d));if(je.test(o.tagName)){let d=o.textContent.split(k),p=d.length-1;if(p>0){o.textContent=Z?Z.emptyScript:"";for(let x=0;x<p;x++)o.append(d[x],z()),_.nextNode(),l.push({type:2,index:++s});o.append(d[p],z())}}}else if(o.nodeType===8)if(o.data===Ke)l.push({type:2,index:s});else{let d=-1;for(;(d=o.data.indexOf(k,d+1))!==-1;)l.push({type:7,index:s}),d+=k.length-1}s++}}static createElement(e,t){let r=R.createElement("template");return r.innerHTML=e,r}};function L(n,e,t=n,r){if(e===E)return e;let o=r!==void 0?t._$Co?.[r]:t._$Cl,s=D(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=L(n,o._$AS(n,e.values),o,r)),e}var ce=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??R).importNode(t,!0);_.currentNode=o;let s=_.nextNode(),i=0,c=0,l=r[0];for(;l!==void 0;){if(i===l.index){let u;l.type===2?u=new j(s,s.nextSibling,this,e):l.type===1?u=new l.ctor(s,l.name,l.strings,this,e):l.type===6&&(u=new fe(s,this,e)),this._$AV.push(u),l=r[++c]}i!==l?.index&&(s=_.nextNode(),i++)}return _.currentNode=R,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++}},j=class n{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,r,o){this.type=2,this._$AH=h,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=L(this,e,t),D(e)?e===h||e==null||e===""?(this._$AH!==h&&this._$AR(),this._$AH=h):e!==this._$AH&&e!==E&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Nt(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!==h&&D(this._$AH)?this._$AA.nextSibling.data=e:this.T(R.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=K.createElement(He(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===o)this._$AH.p(t);else{let s=new ce(o,this),i=s.u(this.options);s.p(t),this.T(i),this._$AH=s}}_$AC(e){let t=ze.get(e.strings);return t===void 0&&ze.set(e.strings,t=new K(e)),t}k(e){ye(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=Oe(e).nextSibling;Oe(e).remove(),e=r}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},O=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,o,s){this.type=1,this._$AH=h,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=h}_$AI(e,t=this,r,o){let s=this.strings,i=!1;if(s===void 0)e=L(this,e,t,0),i=!D(e)||e!==this._$AH&&e!==E,i&&(this._$AH=e);else{let c=e,l,u;for(e=s[0],l=0;l<s.length-1;l++)u=L(this,c[r+l],t,l),u===E&&(u=this._$AH[l]),i||=!D(u)||u!==this._$AH[l],u===h?e=h:e!==h&&(e+=(u??"")+s[l+1]),this._$AH[l]=u}i&&!o&&this.j(e)}j(e){e===h?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},he=class extends O{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===h?void 0:e}},ue=class extends O{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==h)}},pe=class extends O{constructor(e,t,r,o,s){super(e,t,r,o,s),this.type=5}_$AI(e,t=this){if((e=L(this,e,t,0)??h)===E)return;let r=this._$AH,o=e===h&&r!==h||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,s=e!==h&&(r===h||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)}},fe=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){L(this,e)}};var It=me.litHtmlPolyfillSupport;It?.(K,j),(me.litHtmlVersions??=[]).push("3.3.3");var Fe=(n,e,t)=>{let r=t?.renderBefore??e,o=r._$litPart$;if(o===void 0){let s=t?.renderBefore??null;r._$litPart$=o=new j(e.insertBefore(z(),s),s,void 0,t??{})}return o._$AI(n),o};var xe=globalThis,S=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=Fe(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return E}};S._$litElement$=!0,S.finalized=!0,xe.litElementHydrateSupport?.({LitElement:S});var Mt=xe.litElementPolyfillSupport;Mt?.({LitElement:S});(xe.litElementVersions??=[]).push("4.2.2");var qe=n=>(e,t)=>{t!==void 0?t.addInitializer(()=>{customElements.define(n,e)}):customElements.define(n,e)};var zt={attribute:!0,type:String,converter:I,reflect:!1,hasChanged:W},Dt=(n=zt,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 l=e.get.call(this);e.set.call(this,c),this.requestUpdate(i,l,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 l=this[i];e.call(this,c),this.requestUpdate(i,l,n,!0,c)}}throw Error("Unsupported decorator location: "+r)};function g(n){return(e,t)=>typeof t=="object"?Dt(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 w(n){return g({...n,state:!0,attribute:!1})}var v=n=>n??h;var Be=["de","en","es","fr","hi","pt","ru","tr","zh-Hans","zh-Hant"];function we(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 Kt={tw:"hant",hk:"hant",mo:"hant",cn:"hans",sg:"hans",my:"hans"};function be(n){let e=n.toLowerCase();return Be.find(t=>t.toLowerCase()===e)}function Ye(n){let e=we(n);if(!e)return;let t=be(e);if(t)return t;let r=e.toLowerCase().split("-"),o=r[0];if(o==="zh"){let s=r.find(i=>i==="hans"||i==="hant")??Kt[r[1]??""];return s?be(`zh-${s}`):void 0}return be(o)}function Je(n){return n.toLowerCase().replace(/[\s_-]+/g," ").trim()}function Q(n){return n.replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([a-z])([0-9])/g,"$1 $2").replace(/^\w/,e=>e.toUpperCase())}var Ve="__ROXY_UI_I18N__";function ve(){let n=globalThis,e=n[Ve];if(e)return e;let t={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return n[Ve]=t,t}function jt(n,e){return e?n.replace(/\{\{(\w+)\}\}/g,(t,r)=>r in e?String(e[r]??""):t):n}function Ge(n,e,t){return jt(Ht(n,e)??e,t)}function Ht(n,e){if(!n)return;let{catalogs:t}=ve(),r=n.toLowerCase();return(t[r]??t[r.split("-")[0]])?.[Je(e)]}function Ft(n){if(!n)return;let{fieldLabels:e}=ve(),t=n.toLowerCase();return e[t]??e[t.split("-")[0]]}function We(n,e){return Ft(n)?.fields[e]}function Ze(n){let{listeners:e}=ve();return e.add(n),()=>{e.delete(n)}}var ee=class{constructor(e){this.host=e,e.addController(this)}hostConnected(){this.unsubscribe=Ze(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var te=class extends S{constructor(){super();this.translator=(t,r)=>this.t(t,r);new ee(this)}t(t,r){return Ge(this.effectiveLang(),t,r)}effectiveLang(){return we(this)}};var re=b`:host{--roxy-label-col:minmax(0, 25%);--_success-fg:var(--roxy-success-fg,#09632a);--_warning-fg:var(--roxy-warning-fg,#913304);--_danger-fg:var(--roxy-danger-fg,#881313);--_info-fg:var(--roxy-info-fg,#014f7a);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([hidden]){display:none}:host([bare]){--roxy-surface:transparent;--roxy-shadow-sm:none;--roxy-shadow-md:none}*,:before,:after{box-sizing:border-box}h1,h2,h3,h4{font-family:var(--roxy-font-display,var(--roxy-font-sans,system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif))}@keyframes roxy-fade-in{0%{transform:translateY(2px)}to{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(--_danger-fg);font-size:var(--roxy-text-sm,.875rem);justify-items:start;display:grid}: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}.roxy-edit:disabled{cursor:progress;color:var(--roxy-muted,#71717a)}roxy-endpoint-form+*{margin-top:var(--roxy-space-md,1rem)}.roxy-more{justify-items:center;gap:var(--roxy-space-sm,.5rem);margin-top:var(--roxy-space-md,1rem);display:grid}.roxy-more .roxy-edit{min-height:44px}:host{font-variant-emoji:text}`;var qt="__cols",Bt="__rows";function Yt(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function ne(n){if(Array.isArray(n)){let s=!1,i=n.map(c=>{let l=ne(c);return l!==c&&(s=!0),l});return s?i:n}if(!Yt(n))return n;let e=n[qt],t=n[Bt];if(Array.isArray(e)&&Array.isArray(t)&&Object.keys(n).length===2)return t.map(s=>{let i={};return e.forEach((c,l)=>{i[c]=ne(s[l])}),i});let r=!1,o={};for(let[s,i]of Object.entries(n)){let c=ne(i);c!==i&&(r=!0),o[s]=c}return r?o:n}function Xe(n){return ne(n)}var Jt="pk_live_YOUR_KEY",Qe={secret:{reason:"possible-secret-key",message:"Client-side components accept a pk_ publishable key only. Use a publishable key with an origin allowlist, or render server-side."},sample:{reason:"sample-key",message:"Replace the sample key with your own publishable key from your RoxyAPI account."}};function et(n){if(n)return n===Jt?Qe.sample:n.startsWith("pk_")?void 0:Qe.secret}function tt(n,e,t={}){t.warn&&console.warn(e.message),n.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:e.reason,message:e.message},bubbles:!0,composed:!0}))}var rt="https://roxyapi.com/api/v2";async function Vt(n){try{let e=await n.json();if(e?.error){let t=e.code==="validation_error"&&Array.isArray(e.issues)?e.issues.filter(r=>typeof r.path=="string"&&typeof r.message=="string").map(r=>({path:r.path,message:r.message})):null;return{message:e.error,issues:t?.length?t:null,worded:!0}}}catch{}return{message:`Request failed (${n.status})`,issues:null,worded:!1}}var U=class extends Error{constructor(t,r=null,o=!0){super(t);this.issues=r;this.worded=o}};function nt(n){return n.submitUrl?void 0:et(n.publishableKey)}async function $e(n,e,t){let r=nt(n);if(r)throw new U(r.message);let o=n.submitUrl?await fetch(n.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:Gt(e,n.submitContext),signal:t}):await Wt(n,e,t);if(!o.ok){let s=await Vt(o);throw new U(s.message,s.issues,s.worded)}return await o.json()}function Gt(n,e){return JSON.stringify(e?{...n,context:e}:n)}function Wt(n,e,t){let r=new URL(`${n.baseUrl??rt}${e.path}`,document.baseURI);for(let[s,i]of Object.entries(e.query??{}))i!=null&&r.searchParams.set(s,String(i));let o={Accept:"application/json"};return n.publishableKey&&(o["X-API-Key"]=n.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})}var oe=class{constructor(e){this.baseUrl=rt;this.worded=!0;this.host=e,e.addController(this)}hostDisconnected(){this.abort?.abort(),this.abort=void 0}async run(e){this.worded=!0;let t=nt(this);if(t){this.host.error=t.message,tt(this.host,t);return}this.abort?.abort();let r=new AbortController;this.abort=r,this.host.loading=!0,this.host.error=null,this.host.issues=null;try{let o=await $e(this,e,r.signal);if(r.signal.aborted)return;this.host.data=o}catch(o){if(r.signal.aborted||o?.name==="AbortError")return;o instanceof U&&(this.host.issues=o.issues),this.worded=o instanceof U&&o.worded,this.host.error=o instanceof Error?o.message:String(o)}finally{this.abort===r&&(this.abort=void 0),r.signal.aborted||(this.host.loading=!1)}}};function ot(n,e,t,r=[]){let o={...t},s=`/${n.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(u,f)=>{let d=o[f];return delete o[f],encodeURIComponent(String(d??""))}),i=new Set(r),c={},l={};for(let[u,f]of Object.entries(o))f===void 0||f===""||(e==="GET"||i.has(u)?c[u]=f:l[u]=f);return{path:s,method:e,query:c,body:e==="POST"?l:void 0}}function st(){return a`<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 Fn=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 Zt=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}`,Jn=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}${Zt}`;function it(n,e,t){let r=n.filter(o=>!!o.body);return r.length===0?h:a`<section class="block" part="section readings"><h3>${t}</h3>${r.map((o,s)=>a`<details class="interp-card" part="reading" name="${e}" ?open="${s===0}"><summary><span class="interp-lead">${o.label}</span> ${st()} ${o.aside?a`<span class="interp-aside"><small>${o.aside}</small></span>`:h}</summary><div class="interp-body"><p>${o.body}</p>${o.extra??h}</div></details>`)}</section>`}var Xt="roxy-data";function Qt(n){return n.nodeName==="SCRIPT"&&n.getAttribute("type")==="application/json"}var se=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(Qt(e)&&e.classList.contains(Xt))return e;return null}parse(e){if(e?.trim())try{return JSON.parse(e)}catch{return}}};var er={fromAttribute:n=>{if(n!=null){try{let e=JSON.parse(n);if(e&&typeof e=="object"&&!Array.isArray(e))return e}catch{}console.warn("[roxy-ui] submit-context must be a JSON object; sending the request without it.")}}},y=class extends te{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.issues=null;this.selfFetched=!1;this.editing=!1;this.sticky=!1;this.moreLoading=!1;this.moreError=null;this.onMore=async()=>{let t=this.lastRequest,r=this.listKey,o=this.listRows();if(!(!t||!r||!o)){this.moreLoading=!0,this.moreError=null;try{let s=await $e(this.fetcher,{...t,query:{...t.query,offset:o.length}});if(this.lastRequest!==t)return;let i=s[r];this.data={...this.data,...s,[r]:[...o,...Array.isArray(i)?i:[]]}}catch(s){this.lastRequest===t&&(this.moreError=s instanceof Error?s.message:String(s))}finally{this.moreLoading=!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.fetchFresh(ot(this.endpoint,this.method,r.values,r.queryKeys??[]))};new se(this),this.fetcher=new oe(this)}static{this.styles=[re]}willUpdate(t){if(t.has("data")&&this.data!=null){let r=Xe(this.data);r!==this.data&&(this.data=r)}(t.has("publishableKey")||t.has("baseUrl")||t.has("submitUrl")||t.has("submitContext"))&&this.syncFetcher()}syncFetcher(){this.fetcher.publishableKey=this.publishableKey,this.baseUrl&&(this.fetcher.baseUrl=this.baseUrl),this.fetcher.submitUrl=this.submitUrl,this.fetcher.submitContext=this.submitContext}render(){return a`${this.hiddenSectionsStyle()}${this.renderState()}`}drawn(t){try{return this.renderData(t)}catch(r){return console.warn(`[roxy-ui] ${this.localName} could not draw its response`,r),this.dispatchEvent(new CustomEvent("roxy-render-error",{detail:{error:r},bubbles:!0,composed:!0})),customElements.get("roxy-data")?a`<roxy-data .data="${t}" lang="${v(this.effectiveLang())}"></roxy-data>`:this.renderEmpty()}}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 h;let r=t.map(o=>`[part~="${o}"],roxy-endpoint-form::part(${o}){display:none!important}`).join("");return a`<style>${r}</style>`}renderState(){return this.endpoint&&this.sticky&&this.selfFetched&&!this.editing?this.renderWithForm(this.stickyBody()):this.loading?this.renderLoading():this.error!=null?this.renderError(this.error):this.data!=null?this.selfFetched?this.editing?this.renderForm():this.renderResult(this.data):this.showAttribution()?a`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data):this.renderNoData()}renderInterpretation(t,r,o){return this.hideReadings?h:it(t,r,this.t(o??"Reading"))}renderResult(t){let r=a`<div class="roxy-edit-bar" part="edit-bar"><button type="button" class="roxy-edit" @click="${this.onEdit}">${this.t("Edit query")}</button></div>${this.drawn(t)}`;return this.showAttribution()?a`${r}${this.renderAttribution()}`:r}renderWithForm(t){return a`${this.renderForm()}${t}`}stickyBody(){return this.loading?this.renderLoading():this.error!=null?this.issues?h:this.renderErrorBanner(this.error):this.data==null?h:this.showAttribution()?a`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data)}renderMore(){let t=this.listRows(),r=this.data?.total;return!this.lastRequest||!t||typeof r!="number"?h:t.length>=r?h:a`<div class="roxy-more" part="more"><button type="button" class="roxy-edit" ?disabled="${this.moreLoading}" aria-busy="${this.moreLoading?"true":"false"}" @click="${this.onMore}">${this.t("Show more")}</button> ${this.moreError?a`<p class="roxy-error" role="alert">${this.t(this.moreError)}</p>`:h}</div>`}listRows(){let t=this.listKey?this.data?.[this.listKey]:void 0;return Array.isArray(t)?t:void 0}fetchFresh(t){return this.lastRequest=t,this.openedRow=void 0,this.openedRowId=void 0,this.moreError=null,this.fetcher.run(t)}load(t){return this.syncFetcher(),this.fetchFresh(t)}pickRow(t){this.dispatchEvent(new CustomEvent("roxy-symbol-select",{detail:t,bubbles:!0,composed:!0})),this.openRow(t.id)}openRow(t){if(!this.rowDetail||!(this.publishableKey||this.submitUrl))return;let r=this.openedRow??document.createElement(this.rowDetail.tag);r.publishableKey=this.publishableKey,r.baseUrl=this.baseUrl,r.submitUrl=this.submitUrl,r.submitContext=this.submitContext,r.hideReadings=this.hideReadings,r.hideSections=this.hideSections;let o=this.effectiveLang();o&&r.setAttribute("lang",o),this.openedRow=r,this.openedRowId=t,r.load({path:`/${this.rowDetail.path.replace("{id}",encodeURIComponent(t))}`,method:"GET",query:{lang:Ye(this)}}).then(()=>r.scrollIntoView?.({block:"nearest"}))}showAttribution(){return this.attribution!=null&&this.attribution!=="off"&&this.attribution!=="false"}renderAttribution(){return a`<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.renderWithForm(h):this.renderEmpty()}renderForm(){return a`<roxy-endpoint-form part="form" exportparts="hint" data-endpoint="${this.endpoint}" method="${this.method}" spec-url="${v(this.specUrl)}" publishable-key="${v(this.publishableKey)}" location-url="${v(this.locationUrl)}" submit-label="${v(this.submitLabel)}" lang="${v(this.effectiveLang())}" .initialValues="${this.formInitialValues()}" .serverIssues="${this.issues}" .apiRoute="${this.fetcher}" .autoload="${!this.selfFetched}" .fullPages="${!!this.listKey}" @roxy-submit="${this.onFormSubmit}"></roxy-endpoint-form>`}formInitialValues(){return this.lastValues??(this.remember?this.readRemembered():void 0)}rememberKey(){return`roxy-ui:form:${this.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 a`<div class="roxy-empty" role="status" part="empty">${this.t("No data")}</div>`}renderLoading(){return a`<div class="roxy-skeleton" style="height:8rem" role="status" aria-label="${this.t("Loading")}" part="loading"></div>`}renderError(t){if(this.endpoint&&this.issues)return this.renderForm();let r=this.renderErrorBanner(t);return this.endpoint?a`${r}${this.renderForm()}`:r}renderErrorBanner(t){return a`<div class="roxy-error" role="alert" part="error">${!this.fetcher.worded&&this.errorMessage||this.t(t)}</div>`}};m([g({attribute:!1})],y.prototype,"data",2),m([g({type:String,attribute:"data-endpoint"})],y.prototype,"endpoint",2),m([g({type:String})],y.prototype,"method",2),m([g({type:String,attribute:"publishable-key"})],y.prototype,"publishableKey",2),m([g({type:String,attribute:"base-url"})],y.prototype,"baseUrl",2),m([g({type:String,attribute:"spec-url"})],y.prototype,"specUrl",2),m([g({type:String,attribute:"submit-url"})],y.prototype,"submitUrl",2),m([g({attribute:"submit-context",converter:er})],y.prototype,"submitContext",2),m([g({type:String,attribute:"location-url"})],y.prototype,"locationUrl",2),m([g({type:Boolean})],y.prototype,"remember",2),m([g({type:Boolean,attribute:"hide-readings",reflect:!0})],y.prototype,"hideReadings",2),m([g({type:String,attribute:"hide-sections",reflect:!0})],y.prototype,"hideSections",2),m([g({type:String,attribute:"submit-label"})],y.prototype,"submitLabel",2),m([g({type:String,attribute:"error-message"})],y.prototype,"errorMessage",2),m([g({type:String})],y.prototype,"attribution",2),m([w()],y.prototype,"loading",2),m([w()],y.prototype,"error",2),m([w()],y.prototype,"issues",2),m([w()],y.prototype,"selfFetched",2),m([w()],y.prototype,"editing",2),m([w()],y.prototype,"sticky",2),m([w()],y.prototype,"openedRow",2),m([w()],y.prototype,"openedRowId",2),m([w()],y.prototype,"moreLoading",2),m([w()],y.prototype,"moreError",2);var ke=/^\d{4}-\d{2}-\d{2}$/,tr=/^\d{4}-\d{2}$/,dt=/^\d{2}:\d{2}(:\d{2})?$/,rr=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2}(\.\d+)?)?$/,at=new Map;function ie(n){if(!n)return["en"];let e=at.get(n);if(e)return[e,"en"];let t="en";try{t=Intl.getCanonicalLocales(n)[0]??"en"}catch{t="en"}return at.set(n,t),[t,"en"]}var lt=new Map;function nr(n){let e=n??"",t=lt.get(e);if(t)return t;let o={hour:new Intl.DateTimeFormat(ie(n),{timeStyle:"short",timeZone:"UTC"}).formatToParts(new Date(Date.UTC(2e3,0,1,1))).find(s=>s.type==="hour")?.value?.length===2?"2-digit":"numeric",minute:"2-digit"};return lt.set(e,o),o}function ct(n){let e=dt.test(n)?`1970-01-01T${n}`:ke.test(n)?`${n}T00:00:00`:tr.test(n)?`${n}-01T00:00:00`:rr.test(n)?n:null;return e?{d:new Date(`${e}Z`),timeZone:"UTC"}:{d:new Date(n)}}function or(n,e){if(typeof e!="string"||e.length===0)return"";let{d:t,timeZone:r}=ct(e);return Number.isNaN(t.getTime())?e:t.toLocaleDateString(ie(n),{month:"short",day:"numeric",year:"numeric",timeZone:r})}function ht(n,e,t=1){return typeof e!="number"||!Number.isFinite(e)?"":e.toLocaleString(ie(n),{maximumFractionDigits:t})}function ut(n,e,t){let r=typeof e=="string"&&ke.test(e)&&typeof t=="string"&&dt.test(t)?`${e}T${t}`:e;if(typeof r!="string"||r.length===0)return"";if(ke.test(r))return or(n,r);let{d:o,timeZone:s}=ct(r);return Number.isNaN(o.getTime())?r:o.toLocaleString(ie(n),{month:"short",day:"numeric",year:"numeric",...nr(n),timeZone:s})}function H(n,e,t){return We(n,e)??t??Q(e)}var pt="Localized";function ft(n){let e;for(let t of Object.keys(n)){if(!t.endsWith(pt))continue;let r=t.slice(0,-pt.length);if(r===""||!(r in n))continue;e??={...n};let o=n[t];o!=null&&o!==""&&(e[r]=o),delete e[t]}return e??n}var mt=b`@container (width<=30rem){table.stacked,table.stacked caption,table.stacked tbody,table.stacked tr,table.stacked td{width:100%;min-width:0;display:block}table.stacked thead{display:none}table.stacked tr{border-bottom:1px solid var(--roxy-border,#e4e4e7);padding-block:var(--roxy-space-sm,.5rem)}table.stacked tr:last-child{border-bottom:0}table.stacked td{white-space:normal;border:0;padding:.1rem 0}table.stacked td:empty{display:none}table.stacked td[data-label]:before{content:attr(data-label) " ";color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600)}}`;var yt=["title","name","label","heading","overview","summary"],sr=80,ir=80,ar=3,lr=["imageUrl","image","icon","symbol"],dr=["imageUrl","image"],cr=["affirmation","mantra","motto","quote"],hr=new Set(["seed"]),ur=new Set(["id","slug","key"]),pr=new Set(["calculation","calculations","type","position","count","totalcount","total","limit","offset","page","pagesize","perpage"]),fr=8,gt=1,mr=12,yr=n=>n.toLowerCase().replace(/[_-]/g,""),xt=n=>/^(has|is)([A-Z_]|$)/.test(n),gr=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}(:\d{2}(\.\d+)?)?(Z|[+-]\d{2}:\d{2})?)?$/,xr=/^[A-Z0-9]+(_[A-Z0-9]+)+$/,br=/^https?:\/\//,wr=6;function vr(n,e){if(!Number.isInteger(e))return!1;let t=n.replace(/([a-z])([A-Z])/g,"$1 $2").split(/[\s_-]+/);return t[t.length-1].toLowerCase()==="year"}function T(n){return n===null||["string","number","boolean"].includes(typeof n)}function Se(n){return n!==null&&typeof n=="object"&&!(Array.isArray(n)&&n.every(T))}function bt(n){if(n==null)return!0;if(Array.isArray(n))return n.length===0;if(typeof n!="object")return!1;let e=Object.values(n);return e.length===0||e.every(bt)}var C=class extends y{constructor(){super(...arguments);this.depth=0}renderData(t){return this.depth>=wr?a`<div class="roxy-empty" role="status">${this.t("Nested data omitted")}</div>`:a`<div class="roxy-card" part="card" aria-label="${this.t("Generic data display")}">${this.renderValue(t)}</div>`}renderValue(t){return t==null?h:T(t)?a`<p>${this.scalarTemplate(t)}</p>`:Array.isArray(t)?this.renderArray(t):this.renderObject(t)}renderArray(t){return t.length===0?a`<div class="roxy-empty" role="status">${this.t("Empty list")}</div>`:t.every(T)?this.renderChips(t):t.every(o=>o!==null&&typeof o=="object"&&!Array.isArray(o))?this.renderObjectArray(t):a`<ol>${t.map(o=>a`<li>${this.renderValue(o)}</li>`)}</ol>`}renderChips(t){return a`<ul class="roxy-chips">${t.filter(r=>r!==null).map(r=>a`<li>${this.formatScalar(r)}</li>`)}</ul>`}renderObjectArray(t){let r=t.map(p=>this.suppress(p)),o=this.collectKeys(r),s=new Set(o.filter(p=>r.some(x=>typeof x[p]=="string"&&Array.from(x[p]).length>ir))),i=new Set(o.filter(p=>s.has(p)||r.some(x=>Se(x[p]??null)))),c=s.size>0||i.size>0&&i.size<o.length,l=p=>c?i.has(p)?"col-wide":"col-tight":"",u=i.size>0&&o.length>ar,f=r.length>mr;return a`<div class="${u?"roxy-collection":f&&!u?"roxy-collection compact long":"roxy-collection compact"}" part="table" role="${u?"list":"group"}" aria-label="${u?this.t("{{count}} rows",{count:r.length}):this.t("Data table")}" tabindex="${u?h:"0"}">${u?a`${f?a`<p>${this.t("{{count}} rows",{count:r.length})}</p>`:h} ${r.map(p=>a`<div class="roxy-record" role="listitem">${this.renderField(p)}</div>`)}`:a`<table class="${s.size?"roxy-table stacked prose":i.size?"roxy-table stacked":"roxy-table"}" role="table">${f?a`<caption>${this.t("{{count}} rows",{count:r.length})}</caption>`:h}<thead><tr>${o.map(p=>a`<th class="${l(p)}">${H(this.effectiveLang(),p)}</th>`)}</tr></thead><tbody>${r.map(p=>a`<tr>${o.map(x=>a`<td class="${l(x)}" data-label="${H(this.effectiveLang(),x)}">${this.renderCell(p[x],x)}</td>`)}</tr>`)}</tbody></table>`}</div>`}suppress(t){let r=ft(t),o=yt.some(s=>typeof r[s]=="string");return Object.fromEntries(Object.entries(r).filter(([s])=>{let i=yr(s);return hr.has(i)||o&&ur.has(i)?!1:!pr.has(i)}))}renderObject(t){let r=this.suppress(t),o=yt.find(d=>typeof r[d]=="string"&&r[d].length<=sr),s=lr.find(d=>typeof r[d]=="string"&&r[d].startsWith("http")),i=o!=="summary"&&typeof r.summary=="string"?"summary":null,c=cr.find(d=>typeof r[d]=="string"),l=Object.entries(r).filter(([d,p])=>d!==o&&d!==i&&d!==c&&!dr.includes(d)&&!bt(p)),u=l.filter(([,d])=>!Se(d)),f=l.filter(([,d])=>Se(d));return a`${s?a`<img class="roxy-image" src="${String(r[s])}" alt="${o?String(r[o]):this.t("illustration")}" loading="lazy">`:h} ${o?a`<h3 class="roxy-title" part="header">${r[o]}</h3>`:h} ${i?a`<p class="roxy-summary">${r[i]}</p>`:h} ${c?a`<blockquote class="roxy-quote">${r[c]}</blockquote>`:h} ${u.length>0?a`<dl class="roxy-rows" part="details label-track">${u.map(([d,p])=>a`<dt>${H(this.effectiveLang(),d)}</dt><dd>${this.renderField(p,d)}</dd>`)}</dl>`:h} ${f.map(([d,p])=>this.renderSection(d,p))}`}renderSection(t,r){let o=r!==null&&typeof r=="object"?Array.isArray(r)?r.length:Object.keys(r).length:0,s=this.renderField(r,t),i=H(this.effectiveLang(),t);return o>fr||this.depth>=gt?a`<details class="roxy-section" ?open="${this.depth<gt}"><summary>${i}</summary>${s}</details>`:a`<div class="roxy-section"><h4>${i}</h4>${s}</div>`}renderField(t,r){return t==null?"":t===!0&&r!==void 0&&xt(r)?a`<span class="roxy-badge">${this.t("Yes")}</span>`:T(t)?a`${this.scalarTemplate(t,r)}`:Array.isArray(t)&&t.every(T)?this.renderChips(t):a`<roxy-data bare lang="${v(this.effectiveLang())}" .data="${t}" .depth="${this.depth+1}"></roxy-data>`}renderCell(t,r){return t==null?"":t===!0&&r!==void 0&&xt(r)?a`<span class="roxy-badge">${this.t("Yes")}</span>`:T(t)?this.scalarTemplate(t,r):Array.isArray(t)&&t.every(T)?t.filter(o=>o!==null).map(o=>this.formatScalar(o)).join(", "):a`<roxy-data bare lang="${v(this.effectiveLang())}" .data="${t}" .depth="${this.depth+1}"></roxy-data>`}scalarTemplate(t,r){return typeof t=="string"&&br.test(t)?a`<a href="${t}" target="_blank" rel="noopener noreferrer">${t}</a>`:this.formatScalar(t,r)}formatScalar(t,r){return typeof t=="number"?r!==void 0&&vr(r,t)?String(t):ht(this.effectiveLang(),t,2)||String(t):typeof t=="boolean"?t?this.t("Yes"):this.t("No"):gr.test(t)?ut(this.effectiveLang(),t):xr.test(t)?Q(t.toLowerCase()):t}collectKeys(t){let r=new Set;for(let o of t)for(let s of Object.keys(o))r.add(s);return Array.from(r)}};C.styles=[re,b`.roxy-card{background:var(--roxy-surface,#fff);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-md,1rem);box-shadow:var(--roxy-shadow-sm)}.roxy-card a{color:var(--roxy-accent-ink,#b45309)}.roxy-title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0 0 var(--roxy-space-sm,.5rem) 0;color:var(--roxy-primary,#0f172a);letter-spacing:var(--roxy-tracking-tight)}.roxy-summary{color:var(--roxy-secondary,#475569);margin:0 0 var(--roxy-space-md,1rem) 0;font-size:var(--roxy-text-sm,.875rem)}dl.roxy-rows{grid-template-columns:minmax(8ch, min(25%, max-content)) minmax(0, 1fr);gap:var(--roxy-space-xs,.25rem) var(--roxy-space-md,1rem);margin:0;display:grid}dl.roxy-rows dt{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);text-transform:capitalize}dl.roxy-rows dd{color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);word-break:break-word;margin:0}ul.roxy-chips{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;margin:0;padding:0;list-style:none;display:flex}ul.roxy-chips li{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 14%, transparent);color:var(--roxy-fg,#0a0a0a);border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);padding:2px 8px}.roxy-collection{min-width:0}.roxy-collection.compact{overflow-x:auto}.roxy-collection.long{max-block-size:32rem}.roxy-collection:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}.roxy-record+.roxy-record{margin-block-start:var(--roxy-space-sm,.5rem)}table.roxy-table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem)}table.roxy-table caption{text-align:start}table.roxy-table th,table.roxy-table td{border-bottom:1px solid var(--roxy-border,#e4e4e7);padding:var(--roxy-space-sm,.5rem);text-align:left;vertical-align:top;text-transform:none;word-break:normal;overflow-wrap:normal}table.roxy-table th{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:capitalize;font-size:var(--roxy-text-xs,.75rem);letter-spacing:.04em;white-space:nowrap}:where(table.roxy-table) :is(th,td).col-tight{white-space:nowrap;width:1%}:where(table.roxy-table) :is(th,td).col-wide{width:auto}:where(table.roxy-table.prose) :is(th,td).col-wide{min-width:40ch}.roxy-image{border-radius:var(--roxy-radius-md,8px);max-width:100%;height:auto;margin-bottom:var(--roxy-space-md,1rem)}.roxy-section{margin-top:var(--roxy-space-md,1rem)}.roxy-section h4{font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-secondary,#475569);margin:0 0 var(--roxy-space-xs,.25rem) 0;text-transform:capitalize}blockquote.roxy-quote{margin:var(--roxy-space-md,1rem) 0;padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);border-left:3px solid var(--roxy-accent,#f59e0b);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 8%, transparent);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);font-style:italic}.roxy-badge{border-radius:var(--roxy-radius-full,9999px);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 18%, transparent);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);padding:1px 8px;display:inline-block}details.roxy-section{margin-top:var(--roxy-space-md,1rem)}details.roxy-section>summary{cursor:pointer;font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-secondary,#475569);text-transform:capitalize}details.roxy-section>summary:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px;border-radius:4px}`,mt],m([g({attribute:!1})],C.prototype,"depth",2),C=m([qe("roxy-data")],C);Y();return St($r);})();
|
|
302
302
|
/*! Bundled license information:
|
|
303
303
|
|
|
304
304
|
@lit/reactive-element/css-tag.js:
|