@africode/core 5.0.8 → 5.0.9
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/AGENT_INSTRUCTIONS.md +595 -595
- package/COMPONENT_SCHEMA.json +1800 -991
- package/bin/create-africode.js +87 -25
- package/components/auth-form.js +154 -0
- package/components/index.js +10 -0
- package/components/kyc-upload.js +173 -0
- package/components/nav-drawer.js +217 -0
- package/components/transaction-ledger.js +138 -0
- package/components/wallet-balance.js +114 -0
- package/core/a2ui-schema-manager.js +1 -1
- package/core/a2ui.js +178 -1
- package/core/bun-runtime.js +122 -7
- package/core/cli/commands/build.js +30 -5
- package/core/cli/ui.js +13 -3
- package/core/compliance.js +201 -0
- package/core/middleware.js +80 -17
- package/core/patterns.js +168 -0
- package/core/request-analytics.js +254 -0
- package/core/request-identity.js +79 -29
- package/core/sdk.js +4 -1
- package/core/validation.js +13 -0
- package/dist/africode.js +858 -457
- package/dist/africode.js.map +14 -9
- package/dist/build-info.json +3 -3
- package/dist/components.js +784 -383
- package/dist/components.js.map +11 -6
- package/package.json +1 -1
- package/templates/starter/package.json +5 -5
- package/templates/starter/src/index.js +18 -0
- package/templates/starter/src/pages/index.js +1 -1
- package/templates/starter-3d/package.json +5 -5
- package/templates/starter-3d/src/pages/index.js +1 -1
- package/templates/starter-dashboard/.env.example +21 -0
- package/templates/starter-dashboard/africode.config.js +20 -0
- package/templates/starter-dashboard/package.json +14 -0
- package/templates/starter-dashboard/src/index.js +17 -0
- package/templates/starter-dashboard/src/pages/api/analytics.js +24 -0
- package/templates/starter-dashboard/src/pages/index.html +118 -0
- package/templates/starter-dashboard/src/pages/index.js +110 -0
- package/templates/starter-dashboard/src/styles/main.css +172 -0
- package/templates/starter-fintech/.env.example +28 -0
- package/templates/starter-fintech/africode.config.js +20 -0
- package/templates/starter-fintech/package.json +15 -0
- package/templates/starter-fintech/src/index.js +17 -0
- package/templates/starter-fintech/src/pages/api/auth.js +45 -0
- package/templates/starter-fintech/src/pages/api/transfer.js +65 -0
- package/templates/starter-fintech/src/pages/api/wallet.js +39 -0
- package/templates/starter-fintech/src/pages/api/webhooks/payment.js +32 -0
- package/templates/starter-fintech/src/pages/index.html +169 -0
- package/templates/starter-fintech/src/pages/index.js +161 -0
- package/templates/starter-fintech/src/styles/main.css +246 -0
- package/templates/starter-react/package.json +5 -5
- package/templates/starter-react/src/pages/index.js +1 -1
- package/templates/starter-tailwind/package.json +5 -5
- package/templates/starter-tailwind/src/pages/index.js +1 -1
- package/templates/starter-website/.env.example +18 -0
- package/templates/starter-website/africode.config.js +20 -0
- package/templates/starter-website/package.json +14 -0
- package/templates/starter-website/src/index.js +17 -0
- package/templates/starter-website/src/pages/index.html +124 -0
- package/templates/starter-website/src/pages/index.js +116 -0
- package/templates/starter-website/src/styles/main.css +195 -0
package/dist/components.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var me=Object.defineProperty;var pe=(t)=>t;function ve(t,n){this[t]=pe.bind(null,n)}var u=(t,n)=>{for(var r in n)me(t,r,{get:n[r],enumerable:!0,configurable:!0,set:ve.bind(n,r)})};var s=(t,n)=>()=>(t&&(n=t(t=0)),n);class Vn{constructor(t){this.value=t,this.__type="RawHtml",Object.freeze(this)}toString(){return this.value}valueOf(){return this.value}}function ue(t){return String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function ir(t){if(t instanceof Vn)return t.toString();if(Array.isArray(t))return t.map(ir).join("");if(t===null||t===void 0||t===!1)return"";if(t===!0)return"true";return ue(t)}var g=(t,...n)=>{let r="";for(let o=0;o<t.length;o++)if(r+=t[o],o<n.length)r+=ir(n[o]);return new Vn(r)};function d(t,n){if(typeof customElements>"u")return;if(!customElements.get(t))customElements.define(t,n)}var $e,br,b;var v=s(()=>{$e=globalThis.HTMLElement??class{},br=typeof CSSStyleSheet<"u";b=class b extends $e{constructor(){super();this.attachShadow({mode:"open"});let t=this.render;if(t&&typeof t==="function")this.render=()=>{try{t.call(this),this.removeAttribute("has-error")}catch(n){console.error(`[AfriCode] Rendering error in <${this.localName}>:`,n),this.setAttribute("has-error","true"),this.shadowRoot.innerHTML=`
|
|
2
2
|
<style>
|
|
3
3
|
.af-local-error {
|
|
4
4
|
padding: 1rem;
|
|
@@ -17,7 +17,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
17
17
|
<span aria-hidden="true">⚠️</span>
|
|
18
18
|
<span>Failed to render</span>
|
|
19
19
|
</div>
|
|
20
|
-
`,this.emit("af-component-error",{component:this.localName,message:n.message,stack:n.stack})}}}connectedCallback(){}static styleCache=new Map;static globalSheets=[];static injectGlobalSheet(t){if(!
|
|
20
|
+
`,this.emit("af-component-error",{component:this.localName,message:n.message,stack:n.stack})}}}connectedCallback(){}static styleCache=new Map;static globalSheets=[];static injectGlobalSheet(t){if(!br)return;if(!(t instanceof CSSStyleSheet))return;if(!b.globalSheets.includes(t))b.globalSheets.push(t)}async loadStyles(t=""){if(!this.shadowRoot)return;let r=br&&"adoptedStyleSheets"in this.shadowRoot,o=typeof t==="string"&&t.length>0?t:"/styles/africanity.css",a=typeof t==="string"&&t.length>0?t:null;if(b.styleCache.has(o)){let e=b.styleCache.get(o);if(r)this.shadowRoot.adoptedStyleSheets=[e,...b.globalSheets];else this._applyFallbackStyle(e?.cssText||e?.text||e||"");return}try{let e=a;if(!e){let l=await fetch("/styles/africanity.css");if(!l.ok)throw Error(`Unable to load stylesheet: ${l.status}`);e=await l.text()}if(r){let l=new CSSStyleSheet;l.replaceSync(e),b.styleCache.set(o,l),this.shadowRoot.adoptedStyleSheets=[l,...b.globalSheets];return}this._applyFallbackStyle(e),b.styleCache.set(o,{text:e})}catch(e){this._applyFallbackStyle(a||"")}}_applyFallbackStyle(t){if(!this.shadowRoot)return;let n=this.shadowRoot.querySelector("style[data-africode-core-styles]");if(!n)n=document.createElement("style"),n.setAttribute("data-africode-core-styles",""),this.shadowRoot.prepend(n);n.textContent=t}spacing(t){return`var(--space-${t})`}createElement(t,{classes:n=[],attributes:r={},text:o=""}={}){let a=document.createElement(t);if(n.length)a.classList.add(...n);if(Object.entries(r).forEach(([e,l])=>a.setAttribute(e,l)),o)a.textContent=o;return a}emit(t,n){this.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0,composed:!0}))}}});var dr={};u(dr,{default:()=>we,AfriUIButton:()=>vt});var vt,we;var jn=s(()=>{v();vt=class vt extends b{static get observedAttributes(){return["variant","size","disabled","loading","full-width","aria-label"]}constructor(){super();this.render()}connectedCallback(){this.shadowRoot.querySelector("button")?.addEventListener("click",(n)=>{if(this.hasAttribute("disabled")||this.hasAttribute("loading")){n.preventDefault();return}this.emit("af-ui-button-click",{originalEvent:n})})}attributeChangedCallback(){this.render()}render(){let t=this.getAttribute("variant")||"primary",n=this.getAttribute("size")||"md",r=this.hasAttribute("disabled"),o=this.hasAttribute("loading"),a=this.getAttribute("aria-label")||"";this.shadowRoot.innerHTML=g`
|
|
21
21
|
<style>
|
|
22
22
|
:host { display: inline-block; }
|
|
23
23
|
|
|
@@ -110,14 +110,14 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
110
110
|
|
|
111
111
|
<button
|
|
112
112
|
class="${t} ${n}"
|
|
113
|
-
${
|
|
113
|
+
${r?"disabled":""}
|
|
114
114
|
${a?`aria-label="${a}"`:""}
|
|
115
|
-
${
|
|
115
|
+
${o?'aria-busy="true"':""}
|
|
116
116
|
>
|
|
117
|
-
${
|
|
117
|
+
${o?g`<span class="spinner"></span>`:""}
|
|
118
118
|
<slot></slot>
|
|
119
119
|
</button>
|
|
120
|
-
`}};
|
|
120
|
+
`}};d("af-ui-button",vt);we=vt});var cr={};u(cr,{default:()=>xe,AfriUICard:()=>ut});var ut,xe;var Cn=s(()=>{v();ut=class ut extends b{static get observedAttributes(){return["variant","bordered","clickable"]}constructor(){super();this.render()}connectedCallback(){if(this.loadStyles(),this.hasAttribute("clickable"))this.shadowRoot.querySelector(".card")?.addEventListener("click",()=>{this.emit("af-ui-card-click")})}attributeChangedCallback(){this.render()}render(){let t=this.getAttribute("variant")||"elevated",n=this.hasAttribute("bordered"),r=this.hasAttribute("clickable");this.shadowRoot.innerHTML=g`
|
|
121
121
|
<style>
|
|
122
122
|
:host { display: block; }
|
|
123
123
|
|
|
@@ -147,7 +147,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
147
147
|
<article class="card ${t}">
|
|
148
148
|
<slot></slot>
|
|
149
149
|
</article>
|
|
150
|
-
`}};
|
|
150
|
+
`}};d("af-ui-card",ut);xe=ut});var fr={};u(fr,{default:()=>Ae,AfriUIInput:()=>$t});var $t,Ae;var In=s(()=>{v();$t=class $t extends b{static get observedAttributes(){return["label","placeholder","type","value","disabled","error"]}constructor(){super();this.render()}connectedCallback(){this._attachListeners(),this.loadStyles()}attributeChangedCallback(){this.render(),this._attachListeners()}_attachListeners(){let t=this.shadowRoot.querySelector("input");if(!t)return;t.addEventListener("input",()=>{this.emit("af-ui-input",{value:t.value})})}render(){let t=this.getAttribute("label")||"",n=this.getAttribute("placeholder")||"",r=this.getAttribute("type")||"text",o=this.getAttribute("value")||"",a=this.hasAttribute("disabled"),e=this.getAttribute("error")||"";this.shadowRoot.innerHTML=g`
|
|
151
151
|
<style>
|
|
152
152
|
:host { display: block; font-family: 'Inter', system-ui, sans-serif; }
|
|
153
153
|
|
|
@@ -197,15 +197,15 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
197
197
|
<div class="field">
|
|
198
198
|
${t?g`<label>${t}</label>`:""}
|
|
199
199
|
<input
|
|
200
|
-
type="${
|
|
200
|
+
type="${r}"
|
|
201
201
|
placeholder="${n}"
|
|
202
|
-
value="${
|
|
202
|
+
value="${o}"
|
|
203
203
|
${a?"disabled":""}
|
|
204
204
|
aria-invalid="${Boolean(e)}"
|
|
205
205
|
/>
|
|
206
206
|
<div class="error">${e}</div>
|
|
207
207
|
</div>
|
|
208
|
-
`}};
|
|
208
|
+
`}};d("af-ui-input",$t);Ae=$t});var hr={};u(hr,{default:()=>_e,AfriUIBadge:()=>wt});var wt,_e;var Pn=s(()=>{v();wt=class wt extends b{static get observedAttributes(){return["variant","size","pill"]}constructor(){super();this.render()}attributeChangedCallback(){this.render()}render(){let t=this.getAttribute("variant")||"secondary",n=this.getAttribute("size")||"md",r=this.hasAttribute("pill");this.shadowRoot.innerHTML=g`
|
|
209
209
|
<style>
|
|
210
210
|
:host { display: inline-block; font-family: 'Inter', system-ui, sans-serif; }
|
|
211
211
|
|
|
@@ -214,7 +214,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
214
214
|
align-items: center;
|
|
215
215
|
justify-content: center;
|
|
216
216
|
gap: 0.4rem;
|
|
217
|
-
border-radius: ${
|
|
217
|
+
border-radius: ${r?"999px":"0.6rem"};
|
|
218
218
|
padding: ${n==="sm"?"0.25rem 0.65rem":n==="lg"?"0.55rem 1rem":"0.4rem 0.8rem"};
|
|
219
219
|
font-size: ${n==="sm"?"0.75rem":n==="lg"?"0.95rem":"0.85rem"};
|
|
220
220
|
font-weight: 700;
|
|
@@ -232,16 +232,16 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
232
232
|
</style>
|
|
233
233
|
|
|
234
234
|
<span class="badge ${t}"><slot></slot></span>
|
|
235
|
-
`}};
|
|
235
|
+
`}};d("af-ui-badge",wt);_e=wt});var gr={};u(gr,{default:()=>ke,AfriUISwitch:()=>xt});var xt,ke;var Tn=s(()=>{v();xt=class xt extends b{static get observedAttributes(){return["checked","disabled","size"]}constructor(){super();this.render()}connectedCallback(){this.shadowRoot.querySelector("button")?.addEventListener("click",(t)=>{if(this.hasAttribute("disabled"))return;let n=!this.hasAttribute("checked");if(n)this.setAttribute("checked","");else this.removeAttribute("checked");this.emit("af-ui-switch-toggle",{checked:n,originalEvent:t})})}attributeChangedCallback(){this.render()}render(){let t=this.hasAttribute("checked"),n=this.hasAttribute("disabled"),r=this.getAttribute("size")||"md",o=r==="sm"?{width:36,height:20,knob:14}:r==="lg"?{width:56,height:32,knob:24}:{width:48,height:28,knob:20},a=t?"true":"false";this.shadowRoot.innerHTML=g`
|
|
236
236
|
<style>
|
|
237
237
|
:host { display: inline-block; }
|
|
238
238
|
|
|
239
239
|
button {
|
|
240
240
|
all: unset;
|
|
241
241
|
position: relative;
|
|
242
|
-
width: ${
|
|
243
|
-
height: ${
|
|
244
|
-
border-radius: ${
|
|
242
|
+
width: ${o.width}px;
|
|
243
|
+
height: ${o.height}px;
|
|
244
|
+
border-radius: ${o.height/2}px;
|
|
245
245
|
background: ${t?"#2563eb":"#e5e7eb"};
|
|
246
246
|
cursor: ${n?"not-allowed":"pointer"};
|
|
247
247
|
transition: background 180ms ease;
|
|
@@ -251,10 +251,10 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
251
251
|
.knob {
|
|
252
252
|
position: absolute;
|
|
253
253
|
top: 50%;
|
|
254
|
-
left: ${t?`${
|
|
254
|
+
left: ${t?`${o.width-o.knob-4}px`:"4px"};
|
|
255
255
|
transform: translateY(-50%);
|
|
256
|
-
width: ${
|
|
257
|
-
height: ${
|
|
256
|
+
width: ${o.knob}px;
|
|
257
|
+
height: ${o.knob}px;
|
|
258
258
|
border-radius: 999px;
|
|
259
259
|
background: #ffffff;
|
|
260
260
|
transition: left 180ms ease;
|
|
@@ -267,7 +267,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
267
267
|
<button role="switch" aria-checked="${a}" ${n?"disabled":""}>
|
|
268
268
|
<span class="knob"></span>
|
|
269
269
|
</button>
|
|
270
|
-
`}};
|
|
270
|
+
`}};d("af-ui-switch",xt);ke=xt});var sr={};u(sr,{default:()=>qe,AfriUISelect:()=>At});var At,qe;var Zn=s(()=>{v();At=class At extends b{static get observedAttributes(){return["label","placeholder","disabled","error"]}constructor(){super();this.render()}connectedCallback(){this._attachListeners(),this.loadStyles()}attributeChangedCallback(){this.render(),this._attachListeners()}_attachListeners(){let t=this.shadowRoot.querySelector("select");if(!t)return;t.addEventListener("change",()=>{this.emit("af-ui-select",{value:t.value})})}render(){let t=this.getAttribute("label")||"",n=this.getAttribute("placeholder")||"Select an option",r=this.hasAttribute("disabled"),o=this.getAttribute("error")||"";this.shadowRoot.innerHTML=g`
|
|
271
271
|
<style>
|
|
272
272
|
:host { display: block; font-family: 'Inter', system-ui, sans-serif; }
|
|
273
273
|
|
|
@@ -297,13 +297,13 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
297
297
|
|
|
298
298
|
<div class="field">
|
|
299
299
|
${t?g`<label>${t}</label>`:""}
|
|
300
|
-
<select ${
|
|
300
|
+
<select ${r?"disabled":""}>
|
|
301
301
|
<option disabled selected hidden>${n}</option>
|
|
302
302
|
<slot></slot>
|
|
303
303
|
</select>
|
|
304
|
-
<div class="error">${
|
|
304
|
+
<div class="error">${o}</div>
|
|
305
305
|
</div>
|
|
306
|
-
`}};
|
|
306
|
+
`}};d("af-ui-select",At);qe=At});var mr={};u(mr,{default:()=>Le,AfriUITextarea:()=>_t});var _t,Le;var zn=s(()=>{v();_t=class _t extends b{static get observedAttributes(){return["label","placeholder","rows","disabled","error"]}constructor(){super();this.render()}connectedCallback(){this._attachListeners(),this.loadStyles()}attributeChangedCallback(){this.render(),this._attachListeners()}_attachListeners(){let t=this.shadowRoot.querySelector("textarea");if(!t)return;t.addEventListener("input",()=>{this.emit("af-ui-textarea",{value:t.value})})}render(){let t=this.getAttribute("label")||"",n=this.getAttribute("placeholder")||"",r=this.getAttribute("rows")||"4",o=this.hasAttribute("disabled"),a=this.getAttribute("error")||"";this.shadowRoot.innerHTML=g`
|
|
307
307
|
<style>
|
|
308
308
|
:host { display: block; font-family: 'Inter', system-ui, sans-serif; }
|
|
309
309
|
|
|
@@ -334,10 +334,10 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
334
334
|
|
|
335
335
|
<div class="field">
|
|
336
336
|
${t?g`<label>${t}</label>`:""}
|
|
337
|
-
<textarea rows="${
|
|
337
|
+
<textarea rows="${r}" placeholder="${n}" ${o?"disabled":""}></textarea>
|
|
338
338
|
<div class="error">${a}</div>
|
|
339
339
|
</div>
|
|
340
|
-
`}};
|
|
340
|
+
`}};d("af-ui-textarea",_t);Le=_t});var pr={};u(pr,{default:()=>Ee,AfriUIChip:()=>kt});var kt,Ee;var to=s(()=>{v();kt=class kt extends b{static get observedAttributes(){return["variant","size","dismissible"]}constructor(){super();this.render()}connectedCallback(){this.render(),this._attachListeners()}attributeChangedCallback(){this.render(),this._attachListeners()}_attachListeners(){let t=this.shadowRoot.querySelector(".chip button");if(!t)return;t.addEventListener("click",(n)=>{n.stopPropagation(),this.emit("af-ui-chip-dismiss",{})})}render(){let t=this.getAttribute("variant")||"neutral",n=this.getAttribute("size")||"md",r=this.hasAttribute("dismissible");this.shadowRoot.innerHTML=g`
|
|
341
341
|
<style>
|
|
342
342
|
:host { display: inline-flex; }
|
|
343
343
|
|
|
@@ -373,9 +373,9 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
373
373
|
|
|
374
374
|
<span class="chip ${t}">
|
|
375
375
|
<slot></slot>
|
|
376
|
-
${
|
|
376
|
+
${r?g`<button aria-label="Remove">×</button>`:""}
|
|
377
377
|
</span>
|
|
378
|
-
`}};
|
|
378
|
+
`}};d("af-ui-chip",kt);Ee=kt});var vr={};u(vr,{default:()=>Me,AfriUITag:()=>qt});var qt,Me;var no=s(()=>{v();qt=class qt extends b{static get observedAttributes(){return["variant","size"]}constructor(){super();this.render()}attributeChangedCallback(){this.render()}render(){let t=this.getAttribute("variant")||"secondary",n=this.getAttribute("size")||"md",r={sm:"0.25rem 0.6rem",md:"0.35rem 0.8rem",lg:"0.5rem 1rem"};this.shadowRoot.innerHTML=g`
|
|
379
379
|
<style>
|
|
380
380
|
:host { display: inline-block; font-family: 'Inter', sans-serif; }
|
|
381
381
|
|
|
@@ -384,7 +384,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
384
384
|
align-items: center;
|
|
385
385
|
justify-content: center;
|
|
386
386
|
gap: 0.35rem;
|
|
387
|
-
padding: ${
|
|
387
|
+
padding: ${r[n]};
|
|
388
388
|
border-radius: 999px;
|
|
389
389
|
font-size: ${n==="sm"?"0.75rem":n==="lg"?"0.95rem":"0.85rem"};
|
|
390
390
|
font-weight: 600;
|
|
@@ -401,14 +401,14 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
401
401
|
</style>
|
|
402
402
|
|
|
403
403
|
<span class="tag ${t}"><slot></slot></span>
|
|
404
|
-
`}};
|
|
404
|
+
`}};d("af-ui-tag",qt);Me=qt});var ur={};u(ur,{default:()=>He,AfriUIAvatar:()=>Lt});var Lt,He;var oo=s(()=>{v();Lt=class Lt extends b{static get observedAttributes(){return["src","initials","size","badge"]}constructor(){super();this.render()}attributeChangedCallback(){this.render()}render(){let t=this.getAttribute("src"),n=this.getAttribute("initials")||"AC",r=this.getAttribute("size")||"md",o=r==="sm"?"32px":r==="lg"?"64px":"48px",a=this.getAttribute("badge");this.shadowRoot.innerHTML=g`
|
|
405
405
|
<style>
|
|
406
406
|
:host { display: inline-flex; }
|
|
407
407
|
|
|
408
408
|
.avatar {
|
|
409
409
|
position: relative;
|
|
410
|
-
width: ${
|
|
411
|
-
height: ${
|
|
410
|
+
width: ${o};
|
|
411
|
+
height: ${o};
|
|
412
412
|
border-radius: 999px;
|
|
413
413
|
overflow: hidden;
|
|
414
414
|
background: linear-gradient(135deg, #1eb53a, #fcd116);
|
|
@@ -417,7 +417,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
417
417
|
align-items: center;
|
|
418
418
|
justify-content: center;
|
|
419
419
|
font-weight: 700;
|
|
420
|
-
font-size: ${
|
|
420
|
+
font-size: ${r==="sm"?"0.85rem":r==="lg"?"1.25rem":"1rem"};
|
|
421
421
|
}
|
|
422
422
|
|
|
423
423
|
img {
|
|
@@ -444,12 +444,12 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
444
444
|
${t?g`<img src="${t}" alt="Avatar" />`:g`<span>${n}</span>`}
|
|
445
445
|
${a?g`<span class="badge">${a}</span>`:""}
|
|
446
446
|
</div>
|
|
447
|
-
`}};
|
|
447
|
+
`}};d("af-ui-avatar",Lt);He=Lt});var $r={};u($r,{default:()=>Se,AfriUIProgressRing:()=>Et});var Et,Se;var ro=s(()=>{v();Et=class Et extends b{static get observedAttributes(){return["value","size","stroke","label"]}constructor(){super();this.render()}attributeChangedCallback(){this.render()}render(){let t=Number(this.getAttribute("value")||0),n=Number(this.getAttribute("size")||96),r=Number(this.getAttribute("stroke")||10),o=this.getAttribute("label")||"",a=(n-r)/2,e=2*Math.PI*a,l=e-t/100*e;this.shadowRoot.innerHTML=g`
|
|
448
448
|
<style>
|
|
449
449
|
:host { display: inline-flex; align-items: center; justify-content: center; }
|
|
450
450
|
.ring { position: relative; width: ${n}px; height: ${n}px; }
|
|
451
451
|
svg { transform: rotate(-90deg); width: 100%; height: 100%; }
|
|
452
|
-
circle { fill: none; stroke-width: ${
|
|
452
|
+
circle { fill: none; stroke-width: ${r}; stroke-linecap: round; }
|
|
453
453
|
.bg { stroke: rgba(15, 23, 42, 0.12); }
|
|
454
454
|
.progress { stroke: #2563eb; stroke-dasharray: ${e}; stroke-dashoffset: ${l}; transition: stroke-dashoffset 0.35s ease; }
|
|
455
455
|
.label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #111827; font-family: 'Inter', sans-serif; }
|
|
@@ -463,10 +463,10 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
463
463
|
</svg>
|
|
464
464
|
<div class="label">
|
|
465
465
|
<div class="value">${t}%</div>
|
|
466
|
-
${
|
|
466
|
+
${o?g`<div class="subtitle">${o}</div>`:""}
|
|
467
467
|
</div>
|
|
468
468
|
</div>
|
|
469
|
-
`}};
|
|
469
|
+
`}};d("af-ui-progress-ring",Et);Se=Et});var wr={};u(wr,{default:()=>Re,AfriUITooltip:()=>Mt});var Mt,Re;var ao=s(()=>{v();Mt=class Mt extends b{static get observedAttributes(){return["text","position"]}constructor(){super();this.render()}attributeChangedCallback(){this.render()}render(){let t=this.getAttribute("text")||"",n=this.getAttribute("position")||"top";this.shadowRoot.innerHTML=g`
|
|
470
470
|
<style>
|
|
471
471
|
:host { position: relative; display: inline-flex; }
|
|
472
472
|
|
|
@@ -499,7 +499,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
499
499
|
</style>
|
|
500
500
|
<slot></slot>
|
|
501
501
|
<div class="tooltip ${n}" role="tooltip">${t}</div>
|
|
502
|
-
`}};
|
|
502
|
+
`}};d("af-ui-tooltip",Mt);Re=Mt});var xr={};u(xr,{default:()=>Ye,AfriUIPopover:()=>Ht});var Ht,Ye;var eo=s(()=>{v();Ht=class Ht extends b{static get observedAttributes(){return["label","open"]}constructor(){super();this._open=this.hasAttribute("open"),this.render()}connectedCallback(){this._attachListeners()}attributeChangedCallback(){this._open=this.hasAttribute("open"),this.render(),this._attachListeners()}_attachListeners(){let t=this.shadowRoot.querySelector(".trigger");if(!t)return;t.addEventListener("click",()=>{if(this._open=!this._open,this._open)this.setAttribute("open","");else this.removeAttribute("open");this.render(),this._attachListeners()})}render(){let t=this.getAttribute("label")||"Open",n=this._open;this.shadowRoot.innerHTML=g`
|
|
503
503
|
<style>
|
|
504
504
|
:host { position: relative; display: inline-flex; }
|
|
505
505
|
.trigger {
|
|
@@ -531,7 +531,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
531
531
|
</style>
|
|
532
532
|
<button class="trigger" type="button">${t}</button>
|
|
533
533
|
<div class="panel"><slot></slot></div>
|
|
534
|
-
`}};
|
|
534
|
+
`}};d("af-ui-popover",Ht);Ye=Ht});var Ar={};u(Ar,{default:()=>Xe,AfriUITabs:()=>St,AfriUITabPanel:()=>lo});var St,lo,Xe;var io=s(()=>{v();St=class St extends b{static get observedAttributes(){return["active"]}constructor(){super();this._active=this.getAttribute("active")||"0",this.render()}connectedCallback(){this._attachListeners()}attributeChangedCallback(){this._active=this.getAttribute("active")||"0",this.render(),this._attachListeners()}_attachListeners(){this.shadowRoot.querySelectorAll('[role="tab"]').forEach((n)=>{n.addEventListener("click",()=>{let r=n.getAttribute("data-index");this.setAttribute("active",r)})})}render(){let t=this._active,n=Array.from(this.children).filter((r)=>r.tagName.toLowerCase()==="ui-tab-panel");this.shadowRoot.innerHTML=g`
|
|
535
535
|
<style>
|
|
536
536
|
:host { display: block; font-family: 'Inter', system-ui, sans-serif; }
|
|
537
537
|
|
|
@@ -557,23 +557,23 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
557
557
|
.panel.active { display: block; }
|
|
558
558
|
</style>
|
|
559
559
|
<div class="tab-list" role="tablist">
|
|
560
|
-
${n.map((o
|
|
560
|
+
${n.map((r,o)=>g`
|
|
561
561
|
<button
|
|
562
562
|
role="tab"
|
|
563
|
-
data-index="${
|
|
564
|
-
class="${String(
|
|
565
|
-
aria-selected="${String(
|
|
563
|
+
data-index="${o}"
|
|
564
|
+
class="${String(o)===String(t)?"active":""}"
|
|
565
|
+
aria-selected="${String(o)===String(t)}"
|
|
566
566
|
>
|
|
567
|
-
${
|
|
567
|
+
${r.getAttribute("label")||`Tab ${o+1}`}
|
|
568
568
|
</button>
|
|
569
569
|
`).join("")}
|
|
570
570
|
</div>
|
|
571
|
-
${n.map((o
|
|
572
|
-
<div class="panel ${String(
|
|
573
|
-
${
|
|
571
|
+
${n.map((r,o)=>g`
|
|
572
|
+
<div class="panel ${String(o)===String(t)?"active":""}" role="tabpanel">
|
|
573
|
+
${r.innerHTML}
|
|
574
574
|
</div>
|
|
575
575
|
`).join("")}
|
|
576
|
-
`}};
|
|
576
|
+
`}};lo=class lo extends b{render(){this.shadowRoot.innerHTML=g`<slot></slot>`}};d("af-ui-tabs",St);d("ui-tab-panel",lo);Xe=St});var _r={};u(_r,{default:()=>Fe,AfriUITable:()=>Rt});var Rt,Fe;var bo=s(()=>{v();Rt=class Rt extends b{static get observedAttributes(){return["striped","bordered","compact"]}constructor(){super();this.render()}attributeChangedCallback(){this.render()}render(){let t=this.hasAttribute("striped"),n=this.hasAttribute("bordered"),r=this.hasAttribute("compact");this.shadowRoot.innerHTML=g`
|
|
577
577
|
<style>
|
|
578
578
|
:host { display: block; overflow-x: auto; }
|
|
579
579
|
table {
|
|
@@ -584,7 +584,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
584
584
|
color: #0f172a;
|
|
585
585
|
}
|
|
586
586
|
th, td {
|
|
587
|
-
padding: ${
|
|
587
|
+
padding: ${r?"0.75rem":"1rem"};
|
|
588
588
|
text-align: left;
|
|
589
589
|
border-bottom: 1px solid #e5e7eb;
|
|
590
590
|
}
|
|
@@ -608,7 +608,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
608
608
|
<table class="${n?"bordered":""}">
|
|
609
609
|
<slot></slot>
|
|
610
610
|
</table>
|
|
611
|
-
`}};
|
|
611
|
+
`}};d("af-ui-table",Rt);Fe=Rt});var kr={};u(kr,{default:()=>Je,AfriUIStat:()=>Yt});var Yt,Je;var co=s(()=>{v();Yt=class Yt extends b{static get observedAttributes(){return["label","value","delta","trend"]}constructor(){super();this.render()}attributeChangedCallback(){this.render()}render(){let t=this.getAttribute("label")||"Metric",n=this.getAttribute("value")||"0",r=this.getAttribute("delta")||"",o=this.getAttribute("trend")||"neutral",a=o==="positive"?"#16a34a":o==="negative"?"#dc2626":"#475569";this.shadowRoot.innerHTML=g`
|
|
612
612
|
<style>
|
|
613
613
|
:host { display: block; font-family: 'Inter', sans-serif; }
|
|
614
614
|
.stat {
|
|
@@ -644,9 +644,9 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
644
644
|
<div class="stat">
|
|
645
645
|
<div class="label">${t}</div>
|
|
646
646
|
<div class="value">${n}</div>
|
|
647
|
-
${
|
|
647
|
+
${r?g`<div class="delta">${r}</div>`:""}
|
|
648
648
|
</div>
|
|
649
|
-
`}};
|
|
649
|
+
`}};d("af-ui-stat",Yt);Je=Yt});var qr={};u(qr,{default:()=>Ge,AfriFooter:()=>Xt});var Xt,Ge;var fo=s(()=>{v();Xt=class Xt extends b{static get observedAttributes(){return["company","year"]}constructor(){super();this.render()}attributeChangedCallback(){this.render()}render(){let t=this.getAttribute("company")||"AfriCode",n=this.getAttribute("year")||new Date().getFullYear();this.shadowRoot.innerHTML=g`
|
|
650
650
|
<style>
|
|
651
651
|
:host {
|
|
652
652
|
display: block;
|
|
@@ -726,7 +726,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
726
726
|
<slot name="legal"></slot>
|
|
727
727
|
</div>
|
|
728
728
|
</footer>
|
|
729
|
-
`}};
|
|
729
|
+
`}};d("af-footer",Xt);Ge=Xt});var Lr={};u(Lr,{default:()=>Qe,AfriBreadcrumb:()=>Ft});var Ft,Qe;var ho=s(()=>{v();Ft=class Ft extends b{static get observedAttributes(){return["separator"]}constructor(){super();this.render()}attributeChangedCallback(){this.render()}render(){let t=this.getAttribute("separator")||"/";this.shadowRoot.innerHTML=g`
|
|
730
730
|
<style>
|
|
731
731
|
:host {
|
|
732
732
|
display: block;
|
|
@@ -766,7 +766,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
766
766
|
<nav aria-label="Breadcrumb">
|
|
767
767
|
<slot></slot>
|
|
768
768
|
</nav>
|
|
769
|
-
`}};
|
|
769
|
+
`}};d("af-breadcrumb",Ft);Qe=Ft});var Er={};u(Er,{default:()=>Be,AfriFeatureGrid:()=>Jt});var Jt,Be;var go=s(()=>{v();Jt=class Jt extends b{static get observedAttributes(){return["columns"]}constructor(){super();this.render()}attributeChangedCallback(){this.render()}render(){let t=this.getAttribute("columns")||"3";this.shadowRoot.innerHTML=g`
|
|
770
770
|
<style>
|
|
771
771
|
:host {
|
|
772
772
|
display: block;
|
|
@@ -819,7 +819,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
819
819
|
<div class="grid">
|
|
820
820
|
<slot></slot>
|
|
821
821
|
</div>
|
|
822
|
-
`}};
|
|
822
|
+
`}};d("af-feature-grid",Jt);Be=Jt});var Mr={};u(Mr,{default:()=>De,AfriPricingCard:()=>Gt});var Gt,De;var so=s(()=>{v();Gt=class Gt extends b{static get observedAttributes(){return["title","price","frequency","highlight"]}constructor(){super();this.render()}attributeChangedCallback(){this.render()}render(){let t=this.getAttribute("title")||"Standard",n=this.getAttribute("price")||"$49",r=this.getAttribute("frequency")||"per month",o=this.hasAttribute("highlight");this.shadowRoot.innerHTML=g`
|
|
823
823
|
<style>
|
|
824
824
|
:host {
|
|
825
825
|
display: block;
|
|
@@ -831,8 +831,8 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
831
831
|
gap: 1rem;
|
|
832
832
|
padding: 1.75rem;
|
|
833
833
|
border-radius: 28px;
|
|
834
|
-
background: ${
|
|
835
|
-
color: ${
|
|
834
|
+
background: ${o?"linear-gradient(180deg, #1EB53A, #0f172a)":"#ffffff"};
|
|
835
|
+
color: ${o?"#ffffff":"#0f172a"};
|
|
836
836
|
border: 1px solid rgba(15, 23, 42, 0.08);
|
|
837
837
|
box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
|
|
838
838
|
}
|
|
@@ -850,7 +850,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
850
850
|
}
|
|
851
851
|
|
|
852
852
|
.frequency {
|
|
853
|
-
color: ${
|
|
853
|
+
color: ${o?"rgba(255,255,255,0.8)":"#64748b"};
|
|
854
854
|
font-size: 0.95rem;
|
|
855
855
|
margin-top: -0.25rem;
|
|
856
856
|
}
|
|
@@ -861,7 +861,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
861
861
|
}
|
|
862
862
|
|
|
863
863
|
::slotted(.feature) {
|
|
864
|
-
color: ${
|
|
864
|
+
color: ${o?"#e2e8f0":"#475569"};
|
|
865
865
|
font-size: 0.95rem;
|
|
866
866
|
display: flex;
|
|
867
867
|
align-items: center;
|
|
@@ -877,14 +877,14 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
877
877
|
<div>
|
|
878
878
|
<h3 class="title">${t}</h3>
|
|
879
879
|
<div class="price">${n}</div>
|
|
880
|
-
<div class="frequency">${
|
|
880
|
+
<div class="frequency">${r}</div>
|
|
881
881
|
</div>
|
|
882
882
|
<div class="features">
|
|
883
883
|
<slot></slot>
|
|
884
884
|
</div>
|
|
885
885
|
<div class="footer"><slot name="action"></slot></div>
|
|
886
886
|
</div>
|
|
887
|
-
`}};
|
|
887
|
+
`}};d("af-pricing-card",Gt);De=Gt});var Hr={};u(Hr,{default:()=>Oe,AfriTestimonial:()=>Qt});var Qt,Oe;var mo=s(()=>{v();Qt=class Qt extends b{static get observedAttributes(){return["author","role","company"]}constructor(){super();this.render()}attributeChangedCallback(){this.render()}render(){let t=this.getAttribute("author")||"Customer",n=this.getAttribute("role")||"Founder",r=this.getAttribute("company")||"";this.shadowRoot.innerHTML=g`
|
|
888
888
|
<style>
|
|
889
889
|
:host {
|
|
890
890
|
display: block;
|
|
@@ -941,10 +941,10 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
941
941
|
<div class="quote"><slot></slot></div>
|
|
942
942
|
<div class="author">
|
|
943
943
|
<span class="name">${t}</span>
|
|
944
|
-
<span class="meta">${n}${
|
|
944
|
+
<span class="meta">${n}${r?` · ${r}`:""}</span>
|
|
945
945
|
</div>
|
|
946
946
|
</article>
|
|
947
|
-
`}};
|
|
947
|
+
`}};d("af-testimonial",Qt);Oe=Qt});var Sr={};u(Sr,{default:()=>We,AfriDashboardShell:()=>Bt});var Bt,We;var po=s(()=>{v();Bt=class Bt extends b{static get observedAttributes(){return["sidebar-width","topbar-height"]}constructor(){super();this.render()}attributeChangedCallback(){this.render()}render(){let t=this.getAttribute("sidebar-width")||"280px",n=this.getAttribute("topbar-height")||"72px";this.shadowRoot.innerHTML=g`
|
|
948
948
|
<style>
|
|
949
949
|
:host {
|
|
950
950
|
display: block;
|
|
@@ -995,7 +995,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
995
995
|
<header class="topbar"><slot name="topbar"></slot></header>
|
|
996
996
|
<main class="content"><slot></slot></main>
|
|
997
997
|
</div>
|
|
998
|
-
`}};
|
|
998
|
+
`}};d("af-dashboard-shell",Bt);We=Bt});var Rr={};u(Rr,{default:()=>ye,AfriDashboardTopbar:()=>Dt});var Dt,ye;var vo=s(()=>{v();Dt=class Dt extends b{static get observedAttributes(){return["title","description"]}constructor(){super();this.render()}attributeChangedCallback(){this.render()}render(){let t=this.getAttribute("title")||"Dashboard",n=this.getAttribute("description")||"";this.shadowRoot.innerHTML=g`
|
|
999
999
|
<style>
|
|
1000
1000
|
:host {
|
|
1001
1001
|
display: block;
|
|
@@ -1046,7 +1046,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
1046
1046
|
</div>
|
|
1047
1047
|
<div class="actions"><slot name="actions"></slot></div>
|
|
1048
1048
|
</div>
|
|
1049
|
-
`}};
|
|
1049
|
+
`}};d("af-dashboard-topbar",Dt);ye=Dt});var Yr={};u(Yr,{default:()=>Ue,AfriDashboardCard:()=>Ot});var Ot,Ue;var uo=s(()=>{v();Ot=class Ot extends b{static get observedAttributes(){return["title","variant"]}constructor(){super();this.render()}attributeChangedCallback(){this.render()}render(){let t=this.getAttribute("title")||"",n=this.getAttribute("variant")||"surface",r={surface:{background:"#ffffff",border:"1px solid rgba(15, 23, 42, 0.08)",shadow:"0 18px 36px rgba(15, 23, 42, 0.04)"},elevated:{background:"linear-gradient(180deg, #ffffff 0%, #f8fafc 100%)",border:"1px solid rgba(15, 23, 42, 0.12)",shadow:"0 24px 48px rgba(15, 23, 42, 0.08)"}},o=r[n]||r.surface;this.shadowRoot.innerHTML=g`
|
|
1050
1050
|
<style>
|
|
1051
1051
|
:host {
|
|
1052
1052
|
display: block;
|
|
@@ -1054,10 +1054,10 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
1054
1054
|
}
|
|
1055
1055
|
|
|
1056
1056
|
.card {
|
|
1057
|
-
background: ${
|
|
1058
|
-
border: ${
|
|
1057
|
+
background: ${o.background};
|
|
1058
|
+
border: ${o.border};
|
|
1059
1059
|
border-radius: 24px;
|
|
1060
|
-
box-shadow: ${
|
|
1060
|
+
box-shadow: ${o.shadow};
|
|
1061
1061
|
padding: 1.5rem;
|
|
1062
1062
|
min-height: 100px;
|
|
1063
1063
|
overflow: hidden;
|
|
@@ -1083,7 +1083,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
1083
1083
|
${t?g`<div class="header"><h3 class="title">${t}</h3><slot name="header"></slot></div>`:""}
|
|
1084
1084
|
<div class="body"><slot></slot></div>
|
|
1085
1085
|
</div>
|
|
1086
|
-
`}};
|
|
1086
|
+
`}};d("af-dashboard-card",Ot);Ue=Ot});var Xr={};u(Xr,{default:()=>Ne,AfriDashboardMetric:()=>Wt});var Wt,Ne;var $o=s(()=>{v();Wt=class Wt extends b{static get observedAttributes(){return["label","value","delta","trend"]}constructor(){super();this.render()}attributeChangedCallback(){this.render()}render(){let t=this.getAttribute("label")||"Metric",n=this.getAttribute("value")||"0",r=this.getAttribute("delta")||"",o=this.getAttribute("trend")||"neutral",a=o==="positive"?"#16a34a":o==="negative"?"#dc2626":"#475569";this.shadowRoot.innerHTML=g`
|
|
1087
1087
|
<style>
|
|
1088
1088
|
:host {
|
|
1089
1089
|
display: block;
|
|
@@ -1126,9 +1126,9 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
1126
1126
|
<div class="metric">
|
|
1127
1127
|
<div class="label">${t}</div>
|
|
1128
1128
|
<div class="value">${n}</div>
|
|
1129
|
-
${
|
|
1129
|
+
${r?g`<div class="delta">${r}</div>`:""}
|
|
1130
1130
|
</div>
|
|
1131
|
-
`}};
|
|
1131
|
+
`}};d("af-dashboard-metric",Wt);Ne=Wt});var Fr={};u(Fr,{default:()=>Ve,AfriDashboardActivityList:()=>yt});var yt,Ve;var wo=s(()=>{v();yt=class yt extends b{static get observedAttributes(){return["title","empty-text"]}constructor(){super();this.render()}attributeChangedCallback(){this.render()}render(){let t=this.getAttribute("title")||"Recent Activity",n=this.getAttribute("empty-text")||"No recent activity available.";this.shadowRoot.innerHTML=g`
|
|
1132
1132
|
<style>
|
|
1133
1133
|
:host {
|
|
1134
1134
|
display: block;
|
|
@@ -1198,7 +1198,348 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
1198
1198
|
</slot>
|
|
1199
1199
|
</div>
|
|
1200
1200
|
</div>
|
|
1201
|
-
`}};
|
|
1201
|
+
`}};d("af-dashboard-activity-list",yt);Ve=yt});var Jr={};u(Jr,{AfriAuthForm:()=>nn});function je(t){return typeof t==="string"&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)}var Ke=`
|
|
1202
|
+
:host {
|
|
1203
|
+
display: block;
|
|
1204
|
+
color: var(--af-smart-text, var(--af-text, #172033));
|
|
1205
|
+
font-family: var(--af-font-family, Inter, system-ui, sans-serif);
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
form {
|
|
1209
|
+
display: grid;
|
|
1210
|
+
gap: 12px;
|
|
1211
|
+
}
|
|
1212
|
+
|
|
1213
|
+
label {
|
|
1214
|
+
display: grid;
|
|
1215
|
+
gap: 6px;
|
|
1216
|
+
color: var(--af-smart-muted, var(--af-muted, #647084));
|
|
1217
|
+
font-size: 0.86rem;
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
input {
|
|
1221
|
+
min-height: 42px;
|
|
1222
|
+
border: 1px solid var(--af-smart-border, var(--af-border, #d8dee8));
|
|
1223
|
+
border-radius: 6px;
|
|
1224
|
+
padding: 0 12px;
|
|
1225
|
+
background: var(--af-smart-field-bg, var(--af-surface-muted, #eef2f7));
|
|
1226
|
+
color: inherit;
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
button {
|
|
1230
|
+
min-height: 42px;
|
|
1231
|
+
border: 1px solid var(--af-smart-primary, var(--af-primary, #0f766e));
|
|
1232
|
+
border-radius: 6px;
|
|
1233
|
+
background: var(--af-smart-primary, var(--af-primary, #0f766e));
|
|
1234
|
+
color: var(--af-smart-primary-text, #ffffff);
|
|
1235
|
+
cursor: pointer;
|
|
1236
|
+
font: inherit;
|
|
1237
|
+
font-weight: 700;
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
button:disabled {
|
|
1241
|
+
cursor: wait;
|
|
1242
|
+
opacity: 0.7;
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1245
|
+
.message {
|
|
1246
|
+
min-height: 20px;
|
|
1247
|
+
color: var(--af-smart-muted, var(--af-muted, #647084));
|
|
1248
|
+
font-size: 0.86rem;
|
|
1249
|
+
}
|
|
1250
|
+
|
|
1251
|
+
.message.error {
|
|
1252
|
+
color: var(--af-smart-danger, var(--af-danger, #b42318));
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1255
|
+
.message.success {
|
|
1256
|
+
color: var(--af-smart-success, var(--af-success, #087443));
|
|
1257
|
+
}
|
|
1258
|
+
`,nn;var xo=s(()=>{v();nn=class nn extends b{static get observedAttributes(){return["endpoint","button-label"]}connectedCallback(){this.render()}attributeChangedCallback(){if(this.isConnected)this.render()}get endpoint(){return this.getAttribute("endpoint")||"/api/auth"}render(){this.shadowRoot.innerHTML=`
|
|
1259
|
+
<style>${Ke}</style>
|
|
1260
|
+
<form novalidate>
|
|
1261
|
+
<label>
|
|
1262
|
+
Email
|
|
1263
|
+
<input name="email" type="email" autocomplete="email" required />
|
|
1264
|
+
</label>
|
|
1265
|
+
<label>
|
|
1266
|
+
Password
|
|
1267
|
+
<input name="password" type="password" autocomplete="current-password" minlength="8" required />
|
|
1268
|
+
</label>
|
|
1269
|
+
<button type="submit">${this.getAttribute("button-label")||"Continue"}</button>
|
|
1270
|
+
<div class="message" role="status" aria-live="polite"></div>
|
|
1271
|
+
</form>
|
|
1272
|
+
`,this.shadowRoot.querySelector("form").addEventListener("submit",(t)=>this.handleSubmit(t))}setMessage(t,n=""){let r=this.shadowRoot.querySelector(".message");r.className=n?`message ${n}`:"message",r.textContent=t}async handleSubmit(t){t.preventDefault();let n=t.currentTarget,r=n.querySelector("button"),o={email:n.elements.email.value.trim(),password:n.elements.password.value};if(!je(o.email)||o.password.length<8){this.setMessage("Enter a valid email and password.","error"),this.emit("af-auth-error",{code:"INVALID_INPUT"});return}r.disabled=!0,this.setMessage("Checking credentials...");try{let a=await fetch(this.endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)}),e=await a.json();if(!a.ok||e.ok===!1){this.setMessage(e.error||"Authentication failed.","error"),this.emit("af-auth-error",{response:e,status:a.status});return}this.setMessage("Authenticated.","success"),this.emit("af-auth-success",e)}catch(a){this.setMessage("Authentication service unavailable.","error"),this.emit("af-auth-error",{code:"NETWORK_ERROR",message:a.message})}finally{r.disabled=!1}}};d("af-auth-form",nn)});var Gr={};u(Gr,{AfriKycUpload:()=>on});var Ce=`
|
|
1273
|
+
:host {
|
|
1274
|
+
display: block;
|
|
1275
|
+
color: var(--af-smart-text, var(--af-text, #172033));
|
|
1276
|
+
font-family: var(--af-font-family, Inter, system-ui, sans-serif);
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
form {
|
|
1280
|
+
display: grid;
|
|
1281
|
+
gap: 12px;
|
|
1282
|
+
padding: 16px;
|
|
1283
|
+
border: 1px solid var(--af-smart-border, var(--af-border, #d8dee8));
|
|
1284
|
+
border-radius: 8px;
|
|
1285
|
+
background: var(--af-smart-surface, var(--af-surface, #ffffff));
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1288
|
+
label {
|
|
1289
|
+
display: grid;
|
|
1290
|
+
gap: 6px;
|
|
1291
|
+
color: var(--af-smart-muted, var(--af-muted, #647084));
|
|
1292
|
+
font-size: 0.86rem;
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1295
|
+
input {
|
|
1296
|
+
width: 100%;
|
|
1297
|
+
border: 1px solid var(--af-smart-border, var(--af-border, #d8dee8));
|
|
1298
|
+
border-radius: 6px;
|
|
1299
|
+
padding: 10px;
|
|
1300
|
+
background: var(--af-smart-field-bg, var(--af-surface-muted, #eef2f7));
|
|
1301
|
+
color: inherit;
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
|
+
button {
|
|
1305
|
+
min-height: 42px;
|
|
1306
|
+
border: 1px solid var(--af-smart-primary, var(--af-primary, #0f766e));
|
|
1307
|
+
border-radius: 6px;
|
|
1308
|
+
background: var(--af-smart-primary, var(--af-primary, #0f766e));
|
|
1309
|
+
color: var(--af-smart-primary-text, #ffffff);
|
|
1310
|
+
cursor: pointer;
|
|
1311
|
+
font: inherit;
|
|
1312
|
+
font-weight: 700;
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
button:disabled {
|
|
1316
|
+
cursor: wait;
|
|
1317
|
+
opacity: 0.7;
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1320
|
+
.hint,
|
|
1321
|
+
.message {
|
|
1322
|
+
color: var(--af-smart-muted, var(--af-muted, #647084));
|
|
1323
|
+
font-size: 0.84rem;
|
|
1324
|
+
}
|
|
1325
|
+
|
|
1326
|
+
.message.error {
|
|
1327
|
+
color: var(--af-smart-danger, var(--af-danger, #b42318));
|
|
1328
|
+
}
|
|
1329
|
+
|
|
1330
|
+
.message.success {
|
|
1331
|
+
color: var(--af-smart-success, var(--af-success, #087443));
|
|
1332
|
+
}
|
|
1333
|
+
`,Ie,on;var Ao=s(()=>{v();Ie=new Set(["application/pdf","image/jpeg","image/png"]);on=class on extends b{static get observedAttributes(){return["endpoint","max-size-mb"]}connectedCallback(){this.render()}attributeChangedCallback(){if(this.isConnected)this.render()}get endpoint(){return this.getAttribute("endpoint")||"/api/kyc"}get maxSizeMb(){return Number(this.getAttribute("max-size-mb")||5)}render(){this.shadowRoot.innerHTML=`
|
|
1334
|
+
<style>${Ce}</style>
|
|
1335
|
+
<form novalidate>
|
|
1336
|
+
<label>
|
|
1337
|
+
Identity document
|
|
1338
|
+
<input name="document" type="file" accept="application/pdf,image/jpeg,image/png" required />
|
|
1339
|
+
</label>
|
|
1340
|
+
<span class="hint">PDF, JPG, or PNG. Maximum ${this.maxSizeMb} MB.</span>
|
|
1341
|
+
<button type="submit">Upload for review</button>
|
|
1342
|
+
<div class="message" role="status" aria-live="polite"></div>
|
|
1343
|
+
</form>
|
|
1344
|
+
`,this.shadowRoot.querySelector("form").addEventListener("submit",(t)=>this.handleSubmit(t))}setMessage(t,n=""){let r=this.shadowRoot.querySelector(".message");r.className=n?`message ${n}`:"message",r.textContent=t}validateFile(t){if(!t)return{ok:!1,code:"FILE_REQUIRED",error:"Choose an identity document."};if(!Ie.has(t.type))return{ok:!1,code:"UNSUPPORTED_FILE_TYPE",error:"Use a PDF, JPG, or PNG document."};if(t.size>this.maxSizeMb*1024*1024)return{ok:!1,code:"FILE_TOO_LARGE",error:`File must be ${this.maxSizeMb} MB or smaller.`};return{ok:!0}}async handleSubmit(t){t.preventDefault();let n=t.currentTarget,r=n.querySelector("button"),o=n.elements.document.files?.[0],a=this.validateFile(o);if(!a.ok){this.setMessage(a.error,"error"),this.emit("af-kyc-error",a);return}let e=new FormData;e.set("document",o,o.name),r.disabled=!0,this.setMessage("Uploading document...");try{let l=await fetch(this.endpoint,{method:"POST",body:e}),i=await l.json().catch(()=>({}));if(!l.ok||i.ok===!1){this.setMessage(i.error||"Document upload failed.","error"),this.emit("af-kyc-error",{response:i,status:l.status});return}this.setMessage("Document received for review.","success"),this.emit("af-kyc-success",i)}catch(l){this.setMessage("KYC service unavailable.","error"),this.emit("af-kyc-error",{code:"NETWORK_ERROR",message:l.message})}finally{r.disabled=!1}}};d("af-kyc-upload",on)});var Qr={};u(Qr,{AfriWalletBalance:()=>rn});function ko(t,n){return`${n||"TZS"} ${Number(t||0).toLocaleString("en-US")}`}var _o=`
|
|
1345
|
+
:host {
|
|
1346
|
+
display: block;
|
|
1347
|
+
color: var(--af-smart-text, var(--af-text, #172033));
|
|
1348
|
+
font-family: var(--af-font-family, Inter, system-ui, sans-serif);
|
|
1349
|
+
}
|
|
1350
|
+
|
|
1351
|
+
.wallet {
|
|
1352
|
+
display: grid;
|
|
1353
|
+
gap: 8px;
|
|
1354
|
+
padding: 16px;
|
|
1355
|
+
border: 1px solid var(--af-smart-border, var(--af-border, #d8dee8));
|
|
1356
|
+
border-radius: 8px;
|
|
1357
|
+
background: var(--af-smart-surface, var(--af-surface, #ffffff));
|
|
1358
|
+
}
|
|
1359
|
+
|
|
1360
|
+
.label,
|
|
1361
|
+
.meta {
|
|
1362
|
+
color: var(--af-smart-muted, var(--af-muted, #647084));
|
|
1363
|
+
font-size: 0.84rem;
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1366
|
+
.amount {
|
|
1367
|
+
font-size: 1.8rem;
|
|
1368
|
+
font-weight: 760;
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
.error {
|
|
1372
|
+
color: var(--af-smart-danger, var(--af-danger, #b42318));
|
|
1373
|
+
}
|
|
1374
|
+
`,rn;var qo=s(()=>{v();rn=class rn extends b{static get observedAttributes(){return["endpoint"]}connectedCallback(){this.renderLoading(),this.load()}attributeChangedCallback(){if(this.isConnected)this.load()}get endpoint(){return this.getAttribute("endpoint")||"/api/wallet"}renderLoading(){this.shadowRoot.innerHTML=`
|
|
1375
|
+
<style>${_o}</style>
|
|
1376
|
+
<article class="wallet">
|
|
1377
|
+
<span class="label">Available balance</span>
|
|
1378
|
+
<strong class="amount">Loading</strong>
|
|
1379
|
+
<span class="meta">Fetching wallet</span>
|
|
1380
|
+
</article>
|
|
1381
|
+
`}renderWallet(t){this.shadowRoot.innerHTML=`
|
|
1382
|
+
<style>${_o}</style>
|
|
1383
|
+
<article class="wallet">
|
|
1384
|
+
<span class="label">Available balance</span>
|
|
1385
|
+
<strong class="amount"></strong>
|
|
1386
|
+
<span class="meta"></span>
|
|
1387
|
+
</article>
|
|
1388
|
+
`,this.shadowRoot.querySelector(".amount").textContent=ko(t.availableBalance,t.currency),this.shadowRoot.querySelector(".meta").textContent=`Ledger ${ko(t.ledgerBalance,t.currency)} · Daily limit ${ko(t.dailyLimit,t.currency)}`}renderError(t){this.shadowRoot.innerHTML=`
|
|
1389
|
+
<style>${_o}</style>
|
|
1390
|
+
<article class="wallet">
|
|
1391
|
+
<span class="label">Available balance</span>
|
|
1392
|
+
<strong class="amount error">Unavailable</strong>
|
|
1393
|
+
<span class="meta error"></span>
|
|
1394
|
+
</article>
|
|
1395
|
+
`,this.shadowRoot.querySelector(".meta").textContent=t}async load(){try{let t=await fetch(this.endpoint),n=await t.json();if(!t.ok||n.ok===!1||!n.wallet)throw Error(n.error||"Wallet data unavailable.");this.renderWallet(n.wallet),this.emit("af-wallet-load",n)}catch(t){this.renderError("Wallet API is unavailable."),this.emit("af-wallet-error",{message:t.message})}}};d("af-wallet-balance",rn)});var Dr={};u(Dr,{AfriTransactionLedger:()=>an});function Pe(t,n){return`${n||"TZS"} ${Number(t||0).toLocaleString("en-US")}`}var Br=`
|
|
1396
|
+
:host {
|
|
1397
|
+
display: block;
|
|
1398
|
+
color: var(--af-smart-text, var(--af-text, #172033));
|
|
1399
|
+
font-family: var(--af-font-family, Inter, system-ui, sans-serif);
|
|
1400
|
+
}
|
|
1401
|
+
|
|
1402
|
+
.ledger {
|
|
1403
|
+
display: grid;
|
|
1404
|
+
gap: 10px;
|
|
1405
|
+
}
|
|
1406
|
+
|
|
1407
|
+
.row {
|
|
1408
|
+
display: grid;
|
|
1409
|
+
grid-template-columns: 1fr auto;
|
|
1410
|
+
gap: 12px;
|
|
1411
|
+
padding: 12px;
|
|
1412
|
+
border: 1px solid var(--af-smart-border, var(--af-border, #d8dee8));
|
|
1413
|
+
border-radius: 8px;
|
|
1414
|
+
background: var(--af-smart-surface, var(--af-surface, #ffffff));
|
|
1415
|
+
}
|
|
1416
|
+
|
|
1417
|
+
.status,
|
|
1418
|
+
.empty {
|
|
1419
|
+
color: var(--af-smart-muted, var(--af-muted, #647084));
|
|
1420
|
+
font-size: 0.84rem;
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1423
|
+
.amount {
|
|
1424
|
+
font-weight: 760;
|
|
1425
|
+
}
|
|
1426
|
+
|
|
1427
|
+
.error {
|
|
1428
|
+
color: var(--af-smart-danger, var(--af-danger, #b42318));
|
|
1429
|
+
}
|
|
1430
|
+
`,an;var Lo=s(()=>{v();an=class an extends b{static get observedAttributes(){return["endpoint"]}connectedCallback(){this.renderShell("Loading transactions"),this.load()}attributeChangedCallback(){if(this.isConnected)this.load()}get endpoint(){return this.getAttribute("endpoint")||"/api/wallet"}renderShell(t=""){if(this.shadowRoot.innerHTML=`
|
|
1431
|
+
<style>${Br}</style>
|
|
1432
|
+
<div class="ledger" role="list"></div>
|
|
1433
|
+
`,t){let n=document.createElement("div");n.className="empty",n.textContent=t,this.shadowRoot.querySelector(".ledger").append(n)}}renderTransactions(t){this.renderShell();let n=this.shadowRoot.querySelector(".ledger");if(!t.length){let r=document.createElement("div");r.className="empty",r.textContent="No transactions yet.",n.append(r);return}n.replaceChildren(...t.map((r)=>{let o=document.createElement("article"),a=document.createElement("div"),e=document.createElement("strong"),l=document.createElement("div"),i=document.createElement("span");return o.className="row",o.setAttribute("role","listitem"),l.className="status",i.className="amount",e.textContent=r.counterparty||r.id||"Transaction",l.textContent=r.status||r.type||"pending",i.textContent=Pe(r.amount,r.currency),a.append(e,l),o.append(a,i),o}))}renderError(t){this.shadowRoot.innerHTML=`
|
|
1434
|
+
<style>${Br}</style>
|
|
1435
|
+
<div class="empty error"></div>
|
|
1436
|
+
`,this.shadowRoot.querySelector(".empty").textContent=t}async load(){try{let t=await fetch(this.endpoint),n=await t.json(),r=Array.isArray(n.transactions)?n.transactions:[];if(!t.ok||n.ok===!1)throw Error(n.error||"Ledger data unavailable.");this.renderTransactions(r),this.emit("af-ledger-load",{transactions:r})}catch(t){this.renderError("Transaction ledger unavailable."),this.emit("af-ledger-error",{message:t.message})}}};d("af-transaction-ledger",an)});var Or={};u(Or,{default:()=>Te,AfriNavDrawer:()=>Ut});var Ut,Te;var Eo=s(()=>{v();v();Ut=class Ut extends b{constructor(){super();this.isOpen=!1,this.position=this.getAttribute("position")||"left",this.width=this.getAttribute("width")||"280px",this.overlay=this.hasAttribute("overlay")}static get observedAttributes(){return["open","position","width","overlay"]}attributeChangedCallback(t,n,r){switch(t){case"open":this.isOpen=r!==null,this.render();break;case"position":this.position=r;break;case"width":this.width=r;break;case"overlay":this.overlay=r!==null;break}}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.handleKeyDown),this.loadStyles()}disconnectedCallback(){this.removeEventListener("keydown",this.handleKeyDown)}handleKeyDown=(t)=>{if(t.key==="Escape"&&this.isOpen)this.close()};toggle(){this.isOpen?this.close():this.open()}open(){this.isOpen=!0,this.setAttribute("open",""),this.render(),this.emit("af-navdrawer-open",{drawer:this})}close(){this.isOpen=!1,this.removeAttribute("open"),this.render(),this.emit("af-navdrawer-close",{drawer:this})}render(){if(!this.shadowRoot)return;if(this.shadowRoot.innerHTML=`
|
|
1437
|
+
<style>
|
|
1438
|
+
:host {
|
|
1439
|
+
display: block;
|
|
1440
|
+
position: fixed;
|
|
1441
|
+
z-index: 1000;
|
|
1442
|
+
}
|
|
1443
|
+
|
|
1444
|
+
.nav-drawer {
|
|
1445
|
+
position: fixed;
|
|
1446
|
+
top: 0;
|
|
1447
|
+
${this.position}: 0;
|
|
1448
|
+
width: ${this.width};
|
|
1449
|
+
height: 100vh;
|
|
1450
|
+
background: var(--af-bg, #ffffff);
|
|
1451
|
+
box-shadow: var(--af-shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1));
|
|
1452
|
+
transform: translateX(${this.position==="left"?"-100%":"100%"});
|
|
1453
|
+
transition: transform 0.3s ease-in-out;
|
|
1454
|
+
overflow-y: auto;
|
|
1455
|
+
z-index: 1001;
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1458
|
+
.nav-drawer.open {
|
|
1459
|
+
transform: translateX(0);
|
|
1460
|
+
}
|
|
1461
|
+
|
|
1462
|
+
.nav-drawer-overlay {
|
|
1463
|
+
position: fixed;
|
|
1464
|
+
top: 0;
|
|
1465
|
+
left: 0;
|
|
1466
|
+
width: 100vw;
|
|
1467
|
+
height: 100vh;
|
|
1468
|
+
background: rgba(0, 0, 0, 0.5);
|
|
1469
|
+
opacity: 0;
|
|
1470
|
+
visibility: hidden;
|
|
1471
|
+
transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
|
|
1472
|
+
z-index: 1000;
|
|
1473
|
+
}
|
|
1474
|
+
|
|
1475
|
+
.nav-drawer-overlay.open {
|
|
1476
|
+
opacity: 1;
|
|
1477
|
+
visibility: visible;
|
|
1478
|
+
}
|
|
1479
|
+
|
|
1480
|
+
.nav-drawer-header {
|
|
1481
|
+
display: flex;
|
|
1482
|
+
justify-content: space-between;
|
|
1483
|
+
align-items: center;
|
|
1484
|
+
padding: 1rem;
|
|
1485
|
+
border-bottom: 1px solid var(--af-border-color, #e5e7eb);
|
|
1486
|
+
}
|
|
1487
|
+
|
|
1488
|
+
.nav-drawer-title {
|
|
1489
|
+
margin: 0;
|
|
1490
|
+
font-size: 1.25rem;
|
|
1491
|
+
font-weight: 600;
|
|
1492
|
+
}
|
|
1493
|
+
|
|
1494
|
+
.close-btn {
|
|
1495
|
+
background: none;
|
|
1496
|
+
border: none;
|
|
1497
|
+
font-size: 1.5rem;
|
|
1498
|
+
cursor: pointer;
|
|
1499
|
+
padding: 0.25rem;
|
|
1500
|
+
border-radius: 4px;
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1503
|
+
.close-btn:hover {
|
|
1504
|
+
background: var(--af-hover-bg, #f3f4f6);
|
|
1505
|
+
}
|
|
1506
|
+
|
|
1507
|
+
.nav-drawer-content {
|
|
1508
|
+
padding: 1rem;
|
|
1509
|
+
}
|
|
1510
|
+
|
|
1511
|
+
.nav-item {
|
|
1512
|
+
display: block;
|
|
1513
|
+
padding: 0.75rem 1rem;
|
|
1514
|
+
text-decoration: none;
|
|
1515
|
+
color: var(--af-text, #1f2937);
|
|
1516
|
+
border-radius: 6px;
|
|
1517
|
+
margin-bottom: 0.25rem;
|
|
1518
|
+
transition: background-color 0.2s;
|
|
1519
|
+
}
|
|
1520
|
+
|
|
1521
|
+
.nav-item:hover {
|
|
1522
|
+
background-color: var(--af-hover-bg, #f3f4f6);
|
|
1523
|
+
}
|
|
1524
|
+
|
|
1525
|
+
.nav-item.active {
|
|
1526
|
+
background-color: var(--af-primary, #10b981);
|
|
1527
|
+
color: white;
|
|
1528
|
+
}
|
|
1529
|
+
</style>
|
|
1530
|
+
|
|
1531
|
+
${this.overlay?`<div class="nav-drawer-overlay ${this.isOpen?"open":""}" part="overlay"></div>`:""}
|
|
1532
|
+
|
|
1533
|
+
<aside class="nav-drawer ${this.isOpen?"open":""}" part="drawer" role="dialog" aria-modal="true" aria-label="Navigation menu">
|
|
1534
|
+
<header class="nav-drawer-header" part="header">
|
|
1535
|
+
<h2 class="nav-drawer-title" part="title"><slot name="title">Menu</slot></h2>
|
|
1536
|
+
<button class="close-btn" part="close-button" @click="${()=>this.close()}" aria-label="Close menu">✕</button>
|
|
1537
|
+
</header>
|
|
1538
|
+
<div class="nav-drawer-content" part="content">
|
|
1539
|
+
<slot name="content"></slot>
|
|
1540
|
+
</div>
|
|
1541
|
+
</aside>
|
|
1542
|
+
`,this.overlay){let t=this.shadowRoot.querySelector(".nav-drawer-overlay");if(t)t.addEventListener("click",()=>this.close())}}getItems(){return this.querySelectorAll('[slot="content"] .nav-item')}setActiveItem(t){this.getItems().forEach((o)=>o.classList.remove("active"));let r=this.querySelector(t);if(r)r.classList.add("active")}};d("af-nav-drawer",Ut);Te=Ut});var Wr={};u(Wr,{default:()=>Ze,AfriButton:()=>en});var en,Ze;var yr=s(()=>{v();en=class en extends b{static get observedAttributes(){return["variant","size","theme","disabled","loading","icon","aria-label"]}constructor(){super();this.render()}connectedCallback(){this.shadowRoot.querySelector("button")?.addEventListener("click",(n)=>{if(this.hasAttribute("disabled")||this.hasAttribute("loading")){n.preventDefault();return}this.emit("af-click",{originalEvent:n})})}attributeChangedCallback(){this.render()}render(){let t=this.getAttribute("variant")||"primary",n=this.getAttribute("size")||"md",r=this.getAttribute("theme")||"tanzania",o=this.hasAttribute("disabled"),a=this.hasAttribute("loading"),e=this.getAttribute("icon"),l=this.getAttribute("aria-label"),i={tanzania:{primary:"#1EB53A",accent:"#FCD116",text:"#FFFFFF"},maasai:{primary:"#FF0000",accent:"#8B0000",text:"#FFFFFF"},ndebele:{primary:"#4169E1",accent:"#FFD700",text:"#FFFFFF"},ocean:{primary:"#00A3DD",accent:"#0077BE",text:"#FFFFFF"}},c=i[r]||i.tanzania;this.shadowRoot.innerHTML=`
|
|
1202
1543
|
<style>
|
|
1203
1544
|
:host {
|
|
1204
1545
|
display: inline-block;
|
|
@@ -1294,7 +1635,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
1294
1635
|
|
|
1295
1636
|
<button
|
|
1296
1637
|
class="variant-${t} size-${n}"
|
|
1297
|
-
${
|
|
1638
|
+
${o?"disabled":""}
|
|
1298
1639
|
${l?`aria-label="${l}"`:""}
|
|
1299
1640
|
${a?'aria-busy="true"':""}
|
|
1300
1641
|
>
|
|
@@ -1302,7 +1643,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
1302
1643
|
${e&&!a?`<span class="icon">${e}</span>`:""}
|
|
1303
1644
|
<slot></slot>
|
|
1304
1645
|
</button>
|
|
1305
|
-
`}};
|
|
1646
|
+
`}};d("af-button",en);Ze=en});var Ur={};u(Ur,{default:()=>ze,AfriCard:()=>ln});var ln,ze;var Nr=s(()=>{v();ln=class ln extends b{static get observedAttributes(){return["theme","variant","clickable","image"]}constructor(){super();this.render()}connectedCallback(){if(this.hasAttribute("clickable"))this.shadowRoot.querySelector(".card").addEventListener("click",()=>{this.emit("af-click")})}attributeChangedCallback(){this.render()}render(){let t=this.getAttribute("theme")||"default",n=this.getAttribute("variant")||"elevated",r=this.hasAttribute("clickable"),o=this.getAttribute("image"),a={default:{accent:"#333",border:"#eee"},tanzania:{accent:"#1EB53A",border:"#1EB53A"},maasai:{accent:"#FF0000",border:"#8B0000"},ndebele:{accent:"#4169E1",border:"#4169E1"}},l={elevated:"box-shadow: 0 2px 12px rgba(0,0,0,0.1);",outlined:`border: 2px solid ${(a[t]||a.default).border};`,flat:"background: #f8f9fa;"};this.shadowRoot.innerHTML=html`
|
|
1306
1647
|
<style>
|
|
1307
1648
|
:host {
|
|
1308
1649
|
display: block;
|
|
@@ -1317,7 +1658,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
1317
1658
|
overflow: hidden;
|
|
1318
1659
|
transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
|
|
1319
1660
|
position: relative;
|
|
1320
|
-
${
|
|
1661
|
+
${r?"cursor: pointer;":""}
|
|
1321
1662
|
}
|
|
1322
1663
|
|
|
1323
1664
|
.card::before {
|
|
@@ -1328,7 +1669,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
1328
1669
|
pointer-events: none;
|
|
1329
1670
|
}
|
|
1330
1671
|
|
|
1331
|
-
${
|
|
1672
|
+
${r?`
|
|
1332
1673
|
.card:hover {
|
|
1333
1674
|
transform: translateY(-8px);
|
|
1334
1675
|
border-color: rgba(252, 209, 22, 0.4);
|
|
@@ -1370,7 +1711,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
1370
1711
|
</style>
|
|
1371
1712
|
|
|
1372
1713
|
<article class="card">
|
|
1373
|
-
${
|
|
1714
|
+
${o?`<img class="card-image" src="${o}" alt="" />`:""}
|
|
1374
1715
|
<div class="card-body">
|
|
1375
1716
|
<slot></slot>
|
|
1376
1717
|
</div>
|
|
@@ -1380,7 +1721,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
1380
1721
|
</div>
|
|
1381
1722
|
`:""}
|
|
1382
1723
|
</article>
|
|
1383
|
-
`}};
|
|
1724
|
+
`}};d("af-card",ln);ze=ln});function Mo(t){if(bn.has(t))return bn.get(t);let r=new Proxy(t,{get(o,a,e){let l=Reflect.get(o,a,e);if(l!==null&&typeof l==="object")return Mo(l);return l},set(o,a,e,l){let i=Reflect.get(o,a,l);if(i!==e){let c=Reflect.set(o,a,e,l);if(c)Vr(l,e,i,a);return c}return!0},deleteProperty(o,a){let e=Reflect.get(o,a),l=Reflect.deleteProperty(o,a);if(l){let i=bn.get(o);Vr(i,void 0,e,a)}return l}});return bn.set(t,r),r}function cn(t,n){if(!dn.has(t))dn.set(t,new Set);let r=dn.get(t);return r.add(n),()=>{r.delete(n)}}function Vr(t,n,r,o){let a=dn.get(t);if(!a)return;a.forEach((e)=>{try{e(n,r,o)}catch(l){console.error("[AfriCode State] Subscriber error:",l)}})}class Kr{constructor(){this.store={}}get(t){return t.split("/").reduce((n,r)=>n?.[r],this.store)}set(t,n){let r=t.split("/"),o=this.store;while(r.length>1){let a=r.shift();if(!o[a]||typeof o[a]!=="object")o[a]={};o=o[a]}o[r[0]]=n}getAll(){return this.store}}var dn,bn,Db;var Nt=s(()=>{dn=new WeakMap,bn=new WeakMap;Db=new Kr});var tl,Vt;var fn=s(()=>{Nt();tl={theme:"light",language:"en",ui:{sidebarCollapsed:!1,theme:"dark",activePage:"home"},user:{name:"Guest",permissions:[]},config:{animationsEnabled:!0,soundEnabled:!1}},Vt=Mo(tl)});var jr={};u(jr,{default:()=>nl,AfriNavbar:()=>hn});var hn,nl;var Cr=s(()=>{v();fn();Nt();hn=class hn extends b{static get observedAttributes(){return["theme","logo","sticky"]}constructor(){super();this._isOpen=!1,this._unsubscribe=null,this.render()}connectedCallback(){super.connectedCallback(),this.shadowRoot.querySelector(".menu-toggle")?.addEventListener("click",()=>{this._isOpen=!this._isOpen;let t=this.shadowRoot.querySelector(".nav-links"),n=this.shadowRoot.querySelector(".menu-toggle");if(t)t.classList.toggle("open",this._isOpen);if(n)n.classList.toggle("open",this._isOpen),n.setAttribute("aria-expanded",String(this._isOpen))})}disconnectedCallback(){if(this._unsubscribe)this._unsubscribe()}attributeChangedCallback(){this.render()}render(){let t=this.getAttribute("theme")||"dark",n=this.getAttribute("logo")||"AfriCode",r=this.hasAttribute("sticky");this.shadowRoot.innerHTML=`
|
|
1384
1725
|
<style>
|
|
1385
1726
|
:host {
|
|
1386
1727
|
display: block;
|
|
@@ -1556,7 +1897,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
1556
1897
|
<slot></slot>
|
|
1557
1898
|
</div>
|
|
1558
1899
|
</nav>
|
|
1559
|
-
`}};f("af-navbar",ln);Ye=ln});var q,vo,h,D=(t)=>{switch(typeof t){case"undefined":return h.undefined;case"string":return h.string;case"number":return Number.isNaN(t)?h.nan:h.number;case"boolean":return h.boolean;case"function":return h.function;case"bigint":return h.bigint;case"symbol":return h.symbol;case"object":if(Array.isArray(t))return h.array;if(t===null)return h.null;if(t.then&&typeof t.then==="function"&&t.catch&&typeof t.catch==="function")return h.promise;if(typeof Map<"u"&&t instanceof Map)return h.map;if(typeof Set<"u"&&t instanceof Set)return h.set;if(typeof Date<"u"&&t instanceof Date)return h.date;return h.object;default:return h.unknown}};var Kt=s(()=>{(function(t){t.assertEqual=(a)=>{};function n(a){}t.assertIs=n;function o(a){throw Error()}t.assertNever=o,t.arrayToEnum=(a)=>{let e={};for(let l of a)e[l]=l;return e},t.getValidEnumValues=(a)=>{let e=t.objectKeys(a).filter((i)=>typeof a[a[i]]!=="number"),l={};for(let i of e)l[i]=a[i];return t.objectValues(l)},t.objectValues=(a)=>{return t.objectKeys(a).map(function(e){return a[e]})},t.objectKeys=typeof Object.keys==="function"?(a)=>Object.keys(a):(a)=>{let e=[];for(let l in a)if(Object.prototype.hasOwnProperty.call(a,l))e.push(l);return e},t.find=(a,e)=>{for(let l of a)if(e(l))return l;return},t.isInteger=typeof Number.isInteger==="function"?(a)=>Number.isInteger(a):(a)=>typeof a==="number"&&Number.isFinite(a)&&Math.floor(a)===a;function r(a,e=" | "){return a.map((l)=>typeof l==="string"?`'${l}'`:l).join(e)}t.joinValues=r,t.jsonStringifyReplacer=(a,e)=>{if(typeof e==="bigint")return e.toString();return e}})(q||(q={}));(function(t){t.mergeShapes=(n,o)=>{return{...n,...o}}})(vo||(vo={}));h=q.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"])});var d,Re=(t)=>{return JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:")},R;var bn=s(()=>{Kt();d=q.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);R=class R extends Error{get errors(){return this.issues}constructor(t){super();this.issues=[],this.addIssue=(o)=>{this.issues=[...this.issues,o]},this.addIssues=(o=[])=>{this.issues=[...this.issues,...o]};let n=new.target.prototype;if(Object.setPrototypeOf)Object.setPrototypeOf(this,n);else this.__proto__=n;this.name="ZodError",this.issues=t}format(t){let n=t||function(a){return a.message},o={_errors:[]},r=(a)=>{for(let e of a.issues)if(e.code==="invalid_union")e.unionErrors.map(r);else if(e.code==="invalid_return_type")r(e.returnTypeError);else if(e.code==="invalid_arguments")r(e.argumentsError);else if(e.path.length===0)o._errors.push(n(e));else{let l=o,i=0;while(i<e.path.length){let c=e.path[i];if(i!==e.path.length-1)l[c]=l[c]||{_errors:[]};else l[c]=l[c]||{_errors:[]},l[c]._errors.push(n(e));l=l[c],i++}}};return r(this),o}static assert(t){if(!(t instanceof R))throw Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,q.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=(n)=>n.message){let n={},o=[];for(let r of this.issues)if(r.path.length>0){let a=r.path[0];n[a]=n[a]||[],n[a].push(t(r))}else o.push(t(r));return{formErrors:o,fieldErrors:n}}get formErrors(){return this.flatten()}};R.create=(t)=>{return new R(t)}});var Xe=(t,n)=>{let o;switch(t.code){case d.invalid_type:if(t.received===h.undefined)o="Required";else o=`Expected ${t.expected}, received ${t.received}`;break;case d.invalid_literal:o=`Invalid literal value, expected ${JSON.stringify(t.expected,q.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:o=`Unrecognized key(s) in object: ${q.joinValues(t.keys,", ")}`;break;case d.invalid_union:o="Invalid input";break;case d.invalid_union_discriminator:o=`Invalid discriminator value. Expected ${q.joinValues(t.options)}`;break;case d.invalid_enum_value:o=`Invalid enum value. Expected ${q.joinValues(t.options)}, received '${t.received}'`;break;case d.invalid_arguments:o="Invalid function arguments";break;case d.invalid_return_type:o="Invalid function return type";break;case d.invalid_date:o="Invalid date";break;case d.invalid_string:if(typeof t.validation==="object")if("includes"in t.validation){if(o=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position==="number")o=`${o} at one or more positions greater than or equal to ${t.validation.position}`}else if("startsWith"in t.validation)o=`Invalid input: must start with "${t.validation.startsWith}"`;else if("endsWith"in t.validation)o=`Invalid input: must end with "${t.validation.endsWith}"`;else q.assertNever(t.validation);else if(t.validation!=="regex")o=`Invalid ${t.validation}`;else o="Invalid";break;case d.too_small:if(t.type==="array")o=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`;else if(t.type==="string")o=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`;else if(t.type==="number")o=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`;else if(t.type==="bigint")o=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`;else if(t.type==="date")o=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`;else o="Invalid input";break;case d.too_big:if(t.type==="array")o=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`;else if(t.type==="string")o=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`;else if(t.type==="number")o=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`;else if(t.type==="bigint")o=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`;else if(t.type==="date")o=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`;else o="Invalid input";break;case d.custom:o="Invalid input";break;case d.invalid_intersection_types:o="Intersection results could not be merged";break;case d.not_multiple_of:o=`Number must be a multiple of ${t.multipleOf}`;break;case d.not_finite:o="Number must be finite";break;default:o=n.defaultError,q.assertNever(t)}return{message:o}},U;var $o=s(()=>{bn();Kt();U=Xe});function Qe(t){Yr=t}function ot(){return Yr}var Yr;var cn=s(()=>{$o();Yr=U});function m(t,n){let o=ot(),r=jt({issueData:n,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,o,o===U?void 0:U].filter((a)=>!!a)});t.common.issues.push(r)}class S{constructor(){this.value="valid"}dirty(){if(this.value==="valid")this.value="dirty"}abort(){if(this.value!=="aborted")this.value="aborted"}static mergeArray(t,n){let o=[];for(let r of n){if(r.status==="aborted")return x;if(r.status==="dirty")t.dirty();o.push(r.value)}return{status:t.value,value:o}}static async mergeObjectAsync(t,n){let o=[];for(let r of n){let a=await r.key,e=await r.value;o.push({key:a,value:e})}return S.mergeObjectSync(t,o)}static mergeObjectSync(t,n){let o={};for(let r of n){let{key:a,value:e}=r;if(a.status==="aborted")return x;if(e.status==="aborted")return x;if(a.status==="dirty")t.dirty();if(e.status==="dirty")t.dirty();if(a.value!=="__proto__"&&(typeof e.value<"u"||r.alwaysSet))o[a.value]=e.value}return{status:t.value,value:o}}}var jt=(t)=>{let{data:n,path:o,errorMaps:r,issueData:a}=t,e=[...o,...a.path||[]],l={...a,path:e};if(a.message!==void 0)return{...a,path:e,message:a.message};let i="",c=r.filter((v)=>!!v).slice().reverse();for(let v of c)i=v(l,{data:n,defaultError:i}).message;return{...a,path:e,message:i}},Je,x,T=(t)=>({status:"dirty",value:t}),Y=(t)=>({status:"valid",value:t}),fn=(t)=>t.status==="aborted",dn=(t)=>t.status==="dirty",j=(t)=>t.status==="valid",rt=(t)=>typeof Promise<"u"&&t instanceof Promise;var uo=s(()=>{cn();$o();Je=[];x=Object.freeze({status:"aborted"})});var Rr=()=>{};var $;var Xr=s(()=>{(function(t){t.errToObj=(n)=>typeof n==="string"?{message:n}:n||{},t.toString=(n)=>typeof n==="string"?n:n?.message})($||($={}))});class F{constructor(t,n,o,r){this._cachedPath=[],this.parent=t,this.data=n,this._path=o,this._key=r}get path(){if(!this._cachedPath.length)if(Array.isArray(this._key))this._cachedPath.push(...this._path,...this._key);else this._cachedPath.push(...this._path,this._key);return this._cachedPath}}function _(t){if(!t)return{};let{errorMap:n,invalid_type_error:o,required_error:r,description:a}=t;if(n&&(o||r))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if(n)return{errorMap:n,description:a};return{errorMap:(l,i)=>{let{message:c}=t;if(l.code==="invalid_enum_value")return{message:c??i.defaultError};if(typeof i.data>"u")return{message:c??r??i.defaultError};if(l.code!=="invalid_type")return{message:i.defaultError};return{message:c??o??i.defaultError}},description:a}}class k{get description(){return this._def.description}_getType(t){return D(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:D(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new S,ctx:{common:t.parent.common,data:t.data,parsedType:D(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let n=this._parse(t);if(rt(n))throw Error("Synchronous parse encountered promise.");return n}_parseAsync(t){let n=this._parse(t);return Promise.resolve(n)}parse(t,n){let o=this.safeParse(t,n);if(o.success)return o.data;throw o.error}safeParse(t,n){let o={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:D(t)},r=this._parseSync({data:t,path:o.path,parent:o});return Qr(o,r)}"~validate"(t){let n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:D(t)};if(!this["~standard"].async)try{let o=this._parseSync({data:t,path:[],parent:n});return j(o)?{value:o.value}:{issues:n.common.issues}}catch(o){if(o?.message?.toLowerCase()?.includes("encountered"))this["~standard"].async=!0;n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then((o)=>j(o)?{value:o.value}:{issues:n.common.issues})}async parseAsync(t,n){let o=await this.safeParseAsync(t,n);if(o.success)return o.data;throw o.error}async safeParseAsync(t,n){let o={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:D(t)},r=this._parse({data:t,path:o.path,parent:o}),a=await(rt(r)?r:Promise.resolve(r));return Qr(o,a)}refine(t,n){let o=(r)=>{if(typeof n==="string"||typeof n>"u")return{message:n};else if(typeof n==="function")return n(r);else return n};return this._refinement((r,a)=>{let e=t(r),l=()=>a.addIssue({code:d.custom,...o(r)});if(typeof Promise<"u"&&e instanceof Promise)return e.then((i)=>{if(!i)return l(),!1;else return!0});if(!e)return l(),!1;else return!0})}refinement(t,n){return this._refinement((o,r)=>{if(!t(o))return r.addIssue(typeof n==="function"?n(o,r):n),!1;else return!0})}_refinement(t){return new B({schema:this,typeName:A.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:(n)=>this["~validate"](n)}}optional(){return G.create(this,this._def)}nullable(){return N.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return J.create(this)}promise(){return nt.create(this,this._def)}or(t){return ct.create([this,t],this._def)}and(t){return ft.create(this,t,this._def)}transform(t){return new B({..._(this._def),schema:this,typeName:A.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let n=typeof t==="function"?t:()=>t;return new mt({..._(this._def),innerType:this,defaultValue:n,typeName:A.ZodDefault})}brand(){return new gn({typeName:A.ZodBranded,type:this,..._(this._def)})}catch(t){let n=typeof t==="function"?t:()=>t;return new pt({..._(this._def),innerType:this,catchValue:n,typeName:A.ZodCatch})}describe(t){return new this.constructor({...this._def,description:t})}pipe(t){return Zt.create(this,t)}readonly(){return st.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}function Fr(t){let n="[0-5]\\d";if(t.precision)n=`${n}\\.\\d{${t.precision}}`;else if(t.precision==null)n=`${n}(\\.\\d+)?`;let o=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${n})${o}`}function Ze(t){return new RegExp(`^${Fr(t)}$`)}function Br(t){let n=`${Gr}T${Fr(t)}`,o=[];if(o.push(t.local?"Z?":"Z"),t.offset)o.push("([+-]\\d{2}:?\\d{2})");return n=`${n}(${o.join("|")})`,new RegExp(`^${n}$`)}function ze(t,n){if((n==="v4"||!n)&&Ke.test(t))return!0;if((n==="v6"||!n)&&ye.test(t))return!0;return!1}function tl(t,n){if(!We.test(t))return!1;try{let[o]=t.split(".");if(!o)return!1;let r=o.replace(/-/g,"+").replace(/_/g,"/").padEnd(o.length+(4-o.length%4)%4,"="),a=JSON.parse(atob(r));if(typeof a!=="object"||a===null)return!1;if("typ"in a&&a?.typ!=="JWT")return!1;if(!a.alg)return!1;if(n&&a.alg!==n)return!1;return!0}catch{return!1}}function nl(t,n){if((n==="v4"||!n)&&je.test(t))return!0;if((n==="v6"||!n)&&Ce.test(t))return!0;return!1}function ol(t,n){let o=(t.toString().split(".")[1]||"").length,r=(n.toString().split(".")[1]||"").length,a=o>r?o:r,e=Number.parseInt(t.toFixed(a).replace(".","")),l=Number.parseInt(n.toFixed(a).replace(".",""));return e%l/10**a}function at(t){if(t instanceof L){let n={};for(let o in t.shape){let r=t.shape[o];n[o]=G.create(at(r))}return new L({...t._def,shape:()=>n})}else if(t instanceof J)return new J({...t._def,type:at(t.element)});else if(t instanceof G)return G.create(at(t.unwrap()));else if(t instanceof N)return N.create(at(t.unwrap()));else if(t instanceof W)return W.create(t.items.map((n)=>at(n)));else return t}function xo(t,n){let o=D(t),r=D(n);if(t===n)return{valid:!0,data:t};else if(o===h.object&&r===h.object){let a=q.objectKeys(n),e=q.objectKeys(t).filter((i)=>a.indexOf(i)!==-1),l={...t,...n};for(let i of e){let c=xo(t[i],n[i]);if(!c.valid)return{valid:!1};l[i]=c.data}return{valid:!0,data:l}}else if(o===h.array&&r===h.array){if(t.length!==n.length)return{valid:!1};let a=[];for(let e=0;e<t.length;e++){let l=t[e],i=n[e],c=xo(l,i);if(!c.valid)return{valid:!1};a.push(c.data)}return{valid:!0,data:a}}else if(o===h.date&&r===h.date&&+t===+n)return{valid:!0,data:t};else return{valid:!1}}function Dr(t,n){return new P({values:t,typeName:A.ZodEnum,..._(n)})}function Jr(t,n){let o=typeof t==="function"?t(n):typeof t==="string"?{message:t}:t;return typeof o==="string"?{message:o}:o}function Or(t,n={},o){if(t)return z.create().superRefine((r,a)=>{let e=t(r);if(e instanceof Promise)return e.then((l)=>{if(!l){let i=Jr(n,r),c=i.fatal??o??!0;a.addIssue({code:"custom",...i,fatal:c})}});if(!e){let l=Jr(n,r),i=l.fatal??o??!0;a.addIssue({code:"custom",...l,fatal:i})}return});return z.create()}var Qr=(t,n)=>{if(j(n))return{success:!0,data:n.value};else{if(!t.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let o=new R(t.common.issues);return this._error=o,this._error}}}},Ge,Fe,Be,De,Oe,We,Ue,Ve,Ne="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",wo,Ke,je,ye,Ce,Ie,Pe,Gr="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Te,Q,C,I,lt,Z,yt,it,bt,z,y,O,Ct,J,L,ct,V=(t)=>{if(t instanceof dt)return V(t.schema);else if(t instanceof B)return V(t.innerType());else if(t instanceof ht)return[t.value];else if(t instanceof P)return t.options;else if(t instanceof gt)return q.objectValues(t.enum);else if(t instanceof mt)return V(t._def.innerType);else if(t instanceof it)return[void 0];else if(t instanceof bt)return[null];else if(t instanceof G)return[void 0,...V(t.unwrap())];else if(t instanceof N)return[null,...V(t.unwrap())];else if(t instanceof gn)return V(t.unwrap());else if(t instanceof st)return V(t.unwrap());else if(t instanceof pt)return V(t._def.innerType);else return[]},hn,ft,W,It,Pt,tt,et,dt,ht,P,gt,nt,B,G,N,mt,pt,Tt,rl,gn,Zt,st,al,A,el=(t,n={message:`Input not instance of ${t.name}`})=>Or((o)=>o instanceof t,n),Wr,Ur,ll,il,Vr,bl,cl,fl,dl,hl,gl,ml,pl,sl,vl,$l,ul,wl,xl,Al,_l,kl,ql,Hl,Ll,Ml,El,Sl,Yl,Rl,Xl,Ql,Jl,Gl,Fl=()=>Wr().optional(),Bl=()=>Ur().optional(),Dl=()=>Vr().optional(),Ol,Wl;var Nr=s(()=>{bn();cn();Xr();uo();Kt();Ge=/^c[^\s-]{8,}$/i,Fe=/^[0-9a-z]+$/,Be=/^[0-9A-HJKMNP-TV-Z]{26}$/i,De=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Oe=/^[a-z0-9_-]{21}$/i,We=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Ue=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Ve=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ke=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,je=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ye=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Ce=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Ie=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Pe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Te=new RegExp(`^${Gr}$`);Q=class Q extends k{_parse(t){if(this._def.coerce)t.data=String(t.data);if(this._getType(t)!==h.string){let a=this._getOrReturnCtx(t);return m(a,{code:d.invalid_type,expected:h.string,received:a.parsedType}),x}let o=new S,r=void 0;for(let a of this._def.checks)if(a.kind==="min"){if(t.data.length<a.value)r=this._getOrReturnCtx(t,r),m(r,{code:d.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),o.dirty()}else if(a.kind==="max"){if(t.data.length>a.value)r=this._getOrReturnCtx(t,r),m(r,{code:d.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),o.dirty()}else if(a.kind==="length"){let e=t.data.length>a.value,l=t.data.length<a.value;if(e||l){if(r=this._getOrReturnCtx(t,r),e)m(r,{code:d.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message});else if(l)m(r,{code:d.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message});o.dirty()}}else if(a.kind==="email"){if(!Ve.test(t.data))r=this._getOrReturnCtx(t,r),m(r,{validation:"email",code:d.invalid_string,message:a.message}),o.dirty()}else if(a.kind==="emoji"){if(!wo)wo=new RegExp(Ne,"u");if(!wo.test(t.data))r=this._getOrReturnCtx(t,r),m(r,{validation:"emoji",code:d.invalid_string,message:a.message}),o.dirty()}else if(a.kind==="uuid"){if(!De.test(t.data))r=this._getOrReturnCtx(t,r),m(r,{validation:"uuid",code:d.invalid_string,message:a.message}),o.dirty()}else if(a.kind==="nanoid"){if(!Oe.test(t.data))r=this._getOrReturnCtx(t,r),m(r,{validation:"nanoid",code:d.invalid_string,message:a.message}),o.dirty()}else if(a.kind==="cuid"){if(!Ge.test(t.data))r=this._getOrReturnCtx(t,r),m(r,{validation:"cuid",code:d.invalid_string,message:a.message}),o.dirty()}else if(a.kind==="cuid2"){if(!Fe.test(t.data))r=this._getOrReturnCtx(t,r),m(r,{validation:"cuid2",code:d.invalid_string,message:a.message}),o.dirty()}else if(a.kind==="ulid"){if(!Be.test(t.data))r=this._getOrReturnCtx(t,r),m(r,{validation:"ulid",code:d.invalid_string,message:a.message}),o.dirty()}else if(a.kind==="url")try{new URL(t.data)}catch{r=this._getOrReturnCtx(t,r),m(r,{validation:"url",code:d.invalid_string,message:a.message}),o.dirty()}else if(a.kind==="regex"){if(a.regex.lastIndex=0,!a.regex.test(t.data))r=this._getOrReturnCtx(t,r),m(r,{validation:"regex",code:d.invalid_string,message:a.message}),o.dirty()}else if(a.kind==="trim")t.data=t.data.trim();else if(a.kind==="includes"){if(!t.data.includes(a.value,a.position))r=this._getOrReturnCtx(t,r),m(r,{code:d.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),o.dirty()}else if(a.kind==="toLowerCase")t.data=t.data.toLowerCase();else if(a.kind==="toUpperCase")t.data=t.data.toUpperCase();else if(a.kind==="startsWith"){if(!t.data.startsWith(a.value))r=this._getOrReturnCtx(t,r),m(r,{code:d.invalid_string,validation:{startsWith:a.value},message:a.message}),o.dirty()}else if(a.kind==="endsWith"){if(!t.data.endsWith(a.value))r=this._getOrReturnCtx(t,r),m(r,{code:d.invalid_string,validation:{endsWith:a.value},message:a.message}),o.dirty()}else if(a.kind==="datetime"){if(!Br(a).test(t.data))r=this._getOrReturnCtx(t,r),m(r,{code:d.invalid_string,validation:"datetime",message:a.message}),o.dirty()}else if(a.kind==="date"){if(!Te.test(t.data))r=this._getOrReturnCtx(t,r),m(r,{code:d.invalid_string,validation:"date",message:a.message}),o.dirty()}else if(a.kind==="time"){if(!Ze(a).test(t.data))r=this._getOrReturnCtx(t,r),m(r,{code:d.invalid_string,validation:"time",message:a.message}),o.dirty()}else if(a.kind==="duration"){if(!Ue.test(t.data))r=this._getOrReturnCtx(t,r),m(r,{validation:"duration",code:d.invalid_string,message:a.message}),o.dirty()}else if(a.kind==="ip"){if(!ze(t.data,a.version))r=this._getOrReturnCtx(t,r),m(r,{validation:"ip",code:d.invalid_string,message:a.message}),o.dirty()}else if(a.kind==="jwt"){if(!tl(t.data,a.alg))r=this._getOrReturnCtx(t,r),m(r,{validation:"jwt",code:d.invalid_string,message:a.message}),o.dirty()}else if(a.kind==="cidr"){if(!nl(t.data,a.version))r=this._getOrReturnCtx(t,r),m(r,{validation:"cidr",code:d.invalid_string,message:a.message}),o.dirty()}else if(a.kind==="base64"){if(!Ie.test(t.data))r=this._getOrReturnCtx(t,r),m(r,{validation:"base64",code:d.invalid_string,message:a.message}),o.dirty()}else if(a.kind==="base64url"){if(!Pe.test(t.data))r=this._getOrReturnCtx(t,r),m(r,{validation:"base64url",code:d.invalid_string,message:a.message}),o.dirty()}else q.assertNever(a);return{status:o.value,value:t.data}}_regex(t,n,o){return this.refinement((r)=>t.test(r),{validation:n,code:d.invalid_string,...$.errToObj(o)})}_addCheck(t){return new Q({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...$.errToObj(t)})}url(t){return this._addCheck({kind:"url",...$.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...$.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...$.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...$.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...$.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...$.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...$.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...$.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...$.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...$.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...$.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...$.errToObj(t)})}datetime(t){if(typeof t==="string")return this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t});return this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...$.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){if(typeof t==="string")return this._addCheck({kind:"time",precision:null,message:t});return this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...$.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...$.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...$.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...$.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...$.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...$.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...$.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...$.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...$.errToObj(n)})}nonempty(t){return this.min(1,$.errToObj(t))}trim(){return new Q({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Q({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Q({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((t)=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find((t)=>t.kind==="date")}get isTime(){return!!this._def.checks.find((t)=>t.kind==="time")}get isDuration(){return!!this._def.checks.find((t)=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find((t)=>t.kind==="email")}get isURL(){return!!this._def.checks.find((t)=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find((t)=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find((t)=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find((t)=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find((t)=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find((t)=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find((t)=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find((t)=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find((t)=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find((t)=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find((t)=>t.kind==="base64url")}get minLength(){let t=null;for(let n of this._def.checks)if(n.kind==="min"){if(t===null||n.value>t)t=n.value}return t}get maxLength(){let t=null;for(let n of this._def.checks)if(n.kind==="max"){if(t===null||n.value<t)t=n.value}return t}};Q.create=(t)=>{return new Q({checks:[],typeName:A.ZodString,coerce:t?.coerce??!1,..._(t)})};C=class C extends k{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce)t.data=Number(t.data);if(this._getType(t)!==h.number){let a=this._getOrReturnCtx(t);return m(a,{code:d.invalid_type,expected:h.number,received:a.parsedType}),x}let o=void 0,r=new S;for(let a of this._def.checks)if(a.kind==="int"){if(!q.isInteger(t.data))o=this._getOrReturnCtx(t,o),m(o,{code:d.invalid_type,expected:"integer",received:"float",message:a.message}),r.dirty()}else if(a.kind==="min"){if(a.inclusive?t.data<a.value:t.data<=a.value)o=this._getOrReturnCtx(t,o),m(o,{code:d.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),r.dirty()}else if(a.kind==="max"){if(a.inclusive?t.data>a.value:t.data>=a.value)o=this._getOrReturnCtx(t,o),m(o,{code:d.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),r.dirty()}else if(a.kind==="multipleOf"){if(ol(t.data,a.value)!==0)o=this._getOrReturnCtx(t,o),m(o,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),r.dirty()}else if(a.kind==="finite"){if(!Number.isFinite(t.data))o=this._getOrReturnCtx(t,o),m(o,{code:d.not_finite,message:a.message}),r.dirty()}else q.assertNever(a);return{status:r.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,$.toString(n))}gt(t,n){return this.setLimit("min",t,!1,$.toString(n))}lte(t,n){return this.setLimit("max",t,!0,$.toString(n))}lt(t,n){return this.setLimit("max",t,!1,$.toString(n))}setLimit(t,n,o,r){return new C({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:o,message:$.toString(r)}]})}_addCheck(t){return new C({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:$.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:$.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:$.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:$.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:$.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:$.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:$.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:$.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:$.toString(t)})}get minValue(){let t=null;for(let n of this._def.checks)if(n.kind==="min"){if(t===null||n.value>t)t=n.value}return t}get maxValue(){let t=null;for(let n of this._def.checks)if(n.kind==="max"){if(t===null||n.value<t)t=n.value}return t}get isInt(){return!!this._def.checks.find((t)=>t.kind==="int"||t.kind==="multipleOf"&&q.isInteger(t.value))}get isFinite(){let t=null,n=null;for(let o of this._def.checks)if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return!0;else if(o.kind==="min"){if(n===null||o.value>n)n=o.value}else if(o.kind==="max"){if(t===null||o.value<t)t=o.value}return Number.isFinite(n)&&Number.isFinite(t)}};C.create=(t)=>{return new C({checks:[],typeName:A.ZodNumber,coerce:t?.coerce||!1,..._(t)})};I=class I extends k{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==h.bigint)return this._getInvalidInput(t);let o=void 0,r=new S;for(let a of this._def.checks)if(a.kind==="min"){if(a.inclusive?t.data<a.value:t.data<=a.value)o=this._getOrReturnCtx(t,o),m(o,{code:d.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),r.dirty()}else if(a.kind==="max"){if(a.inclusive?t.data>a.value:t.data>=a.value)o=this._getOrReturnCtx(t,o),m(o,{code:d.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),r.dirty()}else if(a.kind==="multipleOf"){if(t.data%a.value!==BigInt(0))o=this._getOrReturnCtx(t,o),m(o,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),r.dirty()}else q.assertNever(a);return{status:r.value,value:t.data}}_getInvalidInput(t){let n=this._getOrReturnCtx(t);return m(n,{code:d.invalid_type,expected:h.bigint,received:n.parsedType}),x}gte(t,n){return this.setLimit("min",t,!0,$.toString(n))}gt(t,n){return this.setLimit("min",t,!1,$.toString(n))}lte(t,n){return this.setLimit("max",t,!0,$.toString(n))}lt(t,n){return this.setLimit("max",t,!1,$.toString(n))}setLimit(t,n,o,r){return new I({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:o,message:$.toString(r)}]})}_addCheck(t){return new I({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:$.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:$.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:$.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:$.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:$.toString(n)})}get minValue(){let t=null;for(let n of this._def.checks)if(n.kind==="min"){if(t===null||n.value>t)t=n.value}return t}get maxValue(){let t=null;for(let n of this._def.checks)if(n.kind==="max"){if(t===null||n.value<t)t=n.value}return t}};I.create=(t)=>{return new I({checks:[],typeName:A.ZodBigInt,coerce:t?.coerce??!1,..._(t)})};lt=class lt extends k{_parse(t){if(this._def.coerce)t.data=Boolean(t.data);if(this._getType(t)!==h.boolean){let o=this._getOrReturnCtx(t);return m(o,{code:d.invalid_type,expected:h.boolean,received:o.parsedType}),x}return Y(t.data)}};lt.create=(t)=>{return new lt({typeName:A.ZodBoolean,coerce:t?.coerce||!1,..._(t)})};Z=class Z extends k{_parse(t){if(this._def.coerce)t.data=new Date(t.data);if(this._getType(t)!==h.date){let a=this._getOrReturnCtx(t);return m(a,{code:d.invalid_type,expected:h.date,received:a.parsedType}),x}if(Number.isNaN(t.data.getTime())){let a=this._getOrReturnCtx(t);return m(a,{code:d.invalid_date}),x}let o=new S,r=void 0;for(let a of this._def.checks)if(a.kind==="min"){if(t.data.getTime()<a.value)r=this._getOrReturnCtx(t,r),m(r,{code:d.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),o.dirty()}else if(a.kind==="max"){if(t.data.getTime()>a.value)r=this._getOrReturnCtx(t,r),m(r,{code:d.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),o.dirty()}else q.assertNever(a);return{status:o.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Z({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:$.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:$.toString(n)})}get minDate(){let t=null;for(let n of this._def.checks)if(n.kind==="min"){if(t===null||n.value>t)t=n.value}return t!=null?new Date(t):null}get maxDate(){let t=null;for(let n of this._def.checks)if(n.kind==="max"){if(t===null||n.value<t)t=n.value}return t!=null?new Date(t):null}};Z.create=(t)=>{return new Z({checks:[],coerce:t?.coerce||!1,typeName:A.ZodDate,..._(t)})};yt=class yt extends k{_parse(t){if(this._getType(t)!==h.symbol){let o=this._getOrReturnCtx(t);return m(o,{code:d.invalid_type,expected:h.symbol,received:o.parsedType}),x}return Y(t.data)}};yt.create=(t)=>{return new yt({typeName:A.ZodSymbol,..._(t)})};it=class it extends k{_parse(t){if(this._getType(t)!==h.undefined){let o=this._getOrReturnCtx(t);return m(o,{code:d.invalid_type,expected:h.undefined,received:o.parsedType}),x}return Y(t.data)}};it.create=(t)=>{return new it({typeName:A.ZodUndefined,..._(t)})};bt=class bt extends k{_parse(t){if(this._getType(t)!==h.null){let o=this._getOrReturnCtx(t);return m(o,{code:d.invalid_type,expected:h.null,received:o.parsedType}),x}return Y(t.data)}};bt.create=(t)=>{return new bt({typeName:A.ZodNull,..._(t)})};z=class z extends k{constructor(){super(...arguments);this._any=!0}_parse(t){return Y(t.data)}};z.create=(t)=>{return new z({typeName:A.ZodAny,..._(t)})};y=class y extends k{constructor(){super(...arguments);this._unknown=!0}_parse(t){return Y(t.data)}};y.create=(t)=>{return new y({typeName:A.ZodUnknown,..._(t)})};O=class O extends k{_parse(t){let n=this._getOrReturnCtx(t);return m(n,{code:d.invalid_type,expected:h.never,received:n.parsedType}),x}};O.create=(t)=>{return new O({typeName:A.ZodNever,..._(t)})};Ct=class Ct extends k{_parse(t){if(this._getType(t)!==h.undefined){let o=this._getOrReturnCtx(t);return m(o,{code:d.invalid_type,expected:h.void,received:o.parsedType}),x}return Y(t.data)}};Ct.create=(t)=>{return new Ct({typeName:A.ZodVoid,..._(t)})};J=class J extends k{_parse(t){let{ctx:n,status:o}=this._processInputParams(t),r=this._def;if(n.parsedType!==h.array)return m(n,{code:d.invalid_type,expected:h.array,received:n.parsedType}),x;if(r.exactLength!==null){let e=n.data.length>r.exactLength.value,l=n.data.length<r.exactLength.value;if(e||l)m(n,{code:e?d.too_big:d.too_small,minimum:l?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),o.dirty()}if(r.minLength!==null){if(n.data.length<r.minLength.value)m(n,{code:d.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),o.dirty()}if(r.maxLength!==null){if(n.data.length>r.maxLength.value)m(n,{code:d.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),o.dirty()}if(n.common.async)return Promise.all([...n.data].map((e,l)=>{return r.type._parseAsync(new F(n,e,n.path,l))})).then((e)=>{return S.mergeArray(o,e)});let a=[...n.data].map((e,l)=>{return r.type._parseSync(new F(n,e,n.path,l))});return S.mergeArray(o,a)}get element(){return this._def.type}min(t,n){return new J({...this._def,minLength:{value:t,message:$.toString(n)}})}max(t,n){return new J({...this._def,maxLength:{value:t,message:$.toString(n)}})}length(t,n){return new J({...this._def,exactLength:{value:t,message:$.toString(n)}})}nonempty(t){return this.min(1,t)}};J.create=(t,n)=>{return new J({type:t,minLength:null,maxLength:null,exactLength:null,typeName:A.ZodArray,..._(n)})};L=class L extends k{constructor(){super(...arguments);this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),n=q.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==h.object){let c=this._getOrReturnCtx(t);return m(c,{code:d.invalid_type,expected:h.object,received:c.parsedType}),x}let{status:o,ctx:r}=this._processInputParams(t),{shape:a,keys:e}=this._getCached(),l=[];if(!(this._def.catchall instanceof O&&this._def.unknownKeys==="strip")){for(let c in r.data)if(!e.includes(c))l.push(c)}let i=[];for(let c of e){let v=a[c],H=r.data[c];i.push({key:{status:"valid",value:c},value:v._parse(new F(r,H,r.path,c)),alwaysSet:c in r.data})}if(this._def.catchall instanceof O){let c=this._def.unknownKeys;if(c==="passthrough")for(let v of l)i.push({key:{status:"valid",value:v},value:{status:"valid",value:r.data[v]}});else if(c==="strict"){if(l.length>0)m(r,{code:d.unrecognized_keys,keys:l}),o.dirty()}else if(c==="strip");else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let c=this._def.catchall;for(let v of l){let H=r.data[v];i.push({key:{status:"valid",value:v},value:c._parse(new F(r,H,r.path,v)),alwaysSet:v in r.data})}}if(r.common.async)return Promise.resolve().then(async()=>{let c=[];for(let v of i){let H=await v.key,E=await v.value;c.push({key:H,value:E,alwaysSet:v.alwaysSet})}return c}).then((c)=>{return S.mergeObjectSync(o,c)});else return S.mergeObjectSync(o,i)}get shape(){return this._def.shape()}strict(t){return $.errToObj,new L({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,o)=>{let r=this._def.errorMap?.(n,o).message??o.defaultError;if(n.code==="unrecognized_keys")return{message:$.errToObj(t).message??r};return{message:r}}}:{}})}strip(){return new L({...this._def,unknownKeys:"strip"})}passthrough(){return new L({...this._def,unknownKeys:"passthrough"})}extend(t){return new L({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new L({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:A.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new L({...this._def,catchall:t})}pick(t){let n={};for(let o of q.objectKeys(t))if(t[o]&&this.shape[o])n[o]=this.shape[o];return new L({...this._def,shape:()=>n})}omit(t){let n={};for(let o of q.objectKeys(this.shape))if(!t[o])n[o]=this.shape[o];return new L({...this._def,shape:()=>n})}deepPartial(){return at(this)}partial(t){let n={};for(let o of q.objectKeys(this.shape)){let r=this.shape[o];if(t&&!t[o])n[o]=r;else n[o]=r.optional()}return new L({...this._def,shape:()=>n})}required(t){let n={};for(let o of q.objectKeys(this.shape))if(t&&!t[o])n[o]=this.shape[o];else{let a=this.shape[o];while(a instanceof G)a=a._def.innerType;n[o]=a}return new L({...this._def,shape:()=>n})}keyof(){return Dr(q.objectKeys(this.shape))}};L.create=(t,n)=>{return new L({shape:()=>t,unknownKeys:"strip",catchall:O.create(),typeName:A.ZodObject,..._(n)})};L.strictCreate=(t,n)=>{return new L({shape:()=>t,unknownKeys:"strict",catchall:O.create(),typeName:A.ZodObject,..._(n)})};L.lazycreate=(t,n)=>{return new L({shape:t,unknownKeys:"strip",catchall:O.create(),typeName:A.ZodObject,..._(n)})};ct=class ct extends k{_parse(t){let{ctx:n}=this._processInputParams(t),o=this._def.options;function r(a){for(let l of a)if(l.result.status==="valid")return l.result;for(let l of a)if(l.result.status==="dirty")return n.common.issues.push(...l.ctx.common.issues),l.result;let e=a.map((l)=>new R(l.ctx.common.issues));return m(n,{code:d.invalid_union,unionErrors:e}),x}if(n.common.async)return Promise.all(o.map(async(a)=>{let e={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:e}),ctx:e}})).then(r);else{let a=void 0,e=[];for(let i of o){let c={...n,common:{...n.common,issues:[]},parent:null},v=i._parseSync({data:n.data,path:n.path,parent:c});if(v.status==="valid")return v;else if(v.status==="dirty"&&!a)a={result:v,ctx:c};if(c.common.issues.length)e.push(c.common.issues)}if(a)return n.common.issues.push(...a.ctx.common.issues),a.result;let l=e.map((i)=>new R(i));return m(n,{code:d.invalid_union,unionErrors:l}),x}}get options(){return this._def.options}};ct.create=(t,n)=>{return new ct({options:t,typeName:A.ZodUnion,..._(n)})};hn=class hn extends k{_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==h.object)return m(n,{code:d.invalid_type,expected:h.object,received:n.parsedType}),x;let o=this.discriminator,r=n.data[o],a=this.optionsMap.get(r);if(!a)return m(n,{code:d.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),x;if(n.common.async)return a._parseAsync({data:n.data,path:n.path,parent:n});else return a._parseSync({data:n.data,path:n.path,parent:n})}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,o){let r=new Map;for(let a of n){let e=V(a.shape[t]);if(!e.length)throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let l of e){if(r.has(l))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(l)}`);r.set(l,a)}}return new hn({typeName:A.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:r,..._(o)})}};ft=class ft extends k{_parse(t){let{status:n,ctx:o}=this._processInputParams(t),r=(a,e)=>{if(fn(a)||fn(e))return x;let l=xo(a.value,e.value);if(!l.valid)return m(o,{code:d.invalid_intersection_types}),x;if(dn(a)||dn(e))n.dirty();return{status:n.value,value:l.data}};if(o.common.async)return Promise.all([this._def.left._parseAsync({data:o.data,path:o.path,parent:o}),this._def.right._parseAsync({data:o.data,path:o.path,parent:o})]).then(([a,e])=>r(a,e));else return r(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}};ft.create=(t,n,o)=>{return new ft({left:t,right:n,typeName:A.ZodIntersection,..._(o)})};W=class W extends k{_parse(t){let{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==h.array)return m(o,{code:d.invalid_type,expected:h.array,received:o.parsedType}),x;if(o.data.length<this._def.items.length)return m(o,{code:d.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),x;if(!this._def.rest&&o.data.length>this._def.items.length)m(o,{code:d.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty();let a=[...o.data].map((e,l)=>{let i=this._def.items[l]||this._def.rest;if(!i)return null;return i._parse(new F(o,e,o.path,l))}).filter((e)=>!!e);if(o.common.async)return Promise.all(a).then((e)=>{return S.mergeArray(n,e)});else return S.mergeArray(n,a)}get items(){return this._def.items}rest(t){return new W({...this._def,rest:t})}};W.create=(t,n)=>{if(!Array.isArray(t))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new W({items:t,typeName:A.ZodTuple,rest:null,..._(n)})};It=class It extends k{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==h.object)return m(o,{code:d.invalid_type,expected:h.object,received:o.parsedType}),x;let r=[],a=this._def.keyType,e=this._def.valueType;for(let l in o.data)r.push({key:a._parse(new F(o,l,o.path,l)),value:e._parse(new F(o,o.data[l],o.path,l)),alwaysSet:l in o.data});if(o.common.async)return S.mergeObjectAsync(n,r);else return S.mergeObjectSync(n,r)}get element(){return this._def.valueType}static create(t,n,o){if(n instanceof k)return new It({keyType:t,valueType:n,typeName:A.ZodRecord,..._(o)});return new It({keyType:Q.create(),valueType:t,typeName:A.ZodRecord,..._(n)})}};Pt=class Pt extends k{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==h.map)return m(o,{code:d.invalid_type,expected:h.map,received:o.parsedType}),x;let r=this._def.keyType,a=this._def.valueType,e=[...o.data.entries()].map(([l,i],c)=>{return{key:r._parse(new F(o,l,o.path,[c,"key"])),value:a._parse(new F(o,i,o.path,[c,"value"]))}});if(o.common.async){let l=new Map;return Promise.resolve().then(async()=>{for(let i of e){let c=await i.key,v=await i.value;if(c.status==="aborted"||v.status==="aborted")return x;if(c.status==="dirty"||v.status==="dirty")n.dirty();l.set(c.value,v.value)}return{status:n.value,value:l}})}else{let l=new Map;for(let i of e){let{key:c,value:v}=i;if(c.status==="aborted"||v.status==="aborted")return x;if(c.status==="dirty"||v.status==="dirty")n.dirty();l.set(c.value,v.value)}return{status:n.value,value:l}}}};Pt.create=(t,n,o)=>{return new Pt({valueType:n,keyType:t,typeName:A.ZodMap,..._(o)})};tt=class tt extends k{_parse(t){let{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==h.set)return m(o,{code:d.invalid_type,expected:h.set,received:o.parsedType}),x;let r=this._def;if(r.minSize!==null){if(o.data.size<r.minSize.value)m(o,{code:d.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),n.dirty()}if(r.maxSize!==null){if(o.data.size>r.maxSize.value)m(o,{code:d.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),n.dirty()}let a=this._def.valueType;function e(i){let c=new Set;for(let v of i){if(v.status==="aborted")return x;if(v.status==="dirty")n.dirty();c.add(v.value)}return{status:n.value,value:c}}let l=[...o.data.values()].map((i,c)=>a._parse(new F(o,i,o.path,c)));if(o.common.async)return Promise.all(l).then((i)=>e(i));else return e(l)}min(t,n){return new tt({...this._def,minSize:{value:t,message:$.toString(n)}})}max(t,n){return new tt({...this._def,maxSize:{value:t,message:$.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}};tt.create=(t,n)=>{return new tt({valueType:t,minSize:null,maxSize:null,typeName:A.ZodSet,..._(n)})};et=class et extends k{constructor(){super(...arguments);this.validate=this.implement}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==h.function)return m(n,{code:d.invalid_type,expected:h.function,received:n.parsedType}),x;function o(l,i){return jt({data:l,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ot(),U].filter((c)=>!!c),issueData:{code:d.invalid_arguments,argumentsError:i}})}function r(l,i){return jt({data:l,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ot(),U].filter((c)=>!!c),issueData:{code:d.invalid_return_type,returnTypeError:i}})}let a={errorMap:n.common.contextualErrorMap},e=n.data;if(this._def.returns instanceof nt){let l=this;return Y(async function(...i){let c=new R([]),v=await l._def.args.parseAsync(i,a).catch((M)=>{throw c.addIssue(o(i,M)),c}),H=await Reflect.apply(e,this,v);return await l._def.returns._def.type.parseAsync(H,a).catch((M)=>{throw c.addIssue(r(H,M)),c})})}else{let l=this;return Y(function(...i){let c=l._def.args.safeParse(i,a);if(!c.success)throw new R([o(i,c.error)]);let v=Reflect.apply(e,this,c.data),H=l._def.returns.safeParse(v,a);if(!H.success)throw new R([r(v,H.error)]);return H.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new et({...this._def,args:W.create(t).rest(y.create())})}returns(t){return new et({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,o){return new et({args:t?t:W.create([]).rest(y.create()),returns:n||y.create(),typeName:A.ZodFunction,..._(o)})}};dt=class dt extends k{get schema(){return this._def.getter()}_parse(t){let{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}};dt.create=(t,n)=>{return new dt({getter:t,typeName:A.ZodLazy,..._(n)})};ht=class ht extends k{_parse(t){if(t.data!==this._def.value){let n=this._getOrReturnCtx(t);return m(n,{received:n.data,code:d.invalid_literal,expected:this._def.value}),x}return{status:"valid",value:t.data}}get value(){return this._def.value}};ht.create=(t,n)=>{return new ht({value:t,typeName:A.ZodLiteral,..._(n)})};P=class P extends k{_parse(t){if(typeof t.data!=="string"){let n=this._getOrReturnCtx(t),o=this._def.values;return m(n,{expected:q.joinValues(o),received:n.parsedType,code:d.invalid_type}),x}if(!this._cache)this._cache=new Set(this._def.values);if(!this._cache.has(t.data)){let n=this._getOrReturnCtx(t),o=this._def.values;return m(n,{received:n.data,code:d.invalid_enum_value,options:o}),x}return Y(t.data)}get options(){return this._def.values}get enum(){let t={};for(let n of this._def.values)t[n]=n;return t}get Values(){let t={};for(let n of this._def.values)t[n]=n;return t}get Enum(){let t={};for(let n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return P.create(t,{...this._def,...n})}exclude(t,n=this._def){return P.create(this.options.filter((o)=>!t.includes(o)),{...this._def,...n})}};P.create=Dr;gt=class gt extends k{_parse(t){let n=q.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(t);if(o.parsedType!==h.string&&o.parsedType!==h.number){let r=q.objectValues(n);return m(o,{expected:q.joinValues(r),received:o.parsedType,code:d.invalid_type}),x}if(!this._cache)this._cache=new Set(q.getValidEnumValues(this._def.values));if(!this._cache.has(t.data)){let r=q.objectValues(n);return m(o,{received:o.data,code:d.invalid_enum_value,options:r}),x}return Y(t.data)}get enum(){return this._def.values}};gt.create=(t,n)=>{return new gt({values:t,typeName:A.ZodNativeEnum,..._(n)})};nt=class nt extends k{unwrap(){return this._def.type}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==h.promise&&n.common.async===!1)return m(n,{code:d.invalid_type,expected:h.promise,received:n.parsedType}),x;let o=n.parsedType===h.promise?n.data:Promise.resolve(n.data);return Y(o.then((r)=>{return this._def.type.parseAsync(r,{path:n.path,errorMap:n.common.contextualErrorMap})}))}};nt.create=(t,n)=>{return new nt({type:t,typeName:A.ZodPromise,..._(n)})};B=class B extends k{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===A.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:n,ctx:o}=this._processInputParams(t),r=this._def.effect||null,a={addIssue:(e)=>{if(m(o,e),e.fatal)n.abort();else n.dirty()},get path(){return o.path}};if(a.addIssue=a.addIssue.bind(a),r.type==="preprocess"){let e=r.transform(o.data,a);if(o.common.async)return Promise.resolve(e).then(async(l)=>{if(n.value==="aborted")return x;let i=await this._def.schema._parseAsync({data:l,path:o.path,parent:o});if(i.status==="aborted")return x;if(i.status==="dirty")return T(i.value);if(n.value==="dirty")return T(i.value);return i});else{if(n.value==="aborted")return x;let l=this._def.schema._parseSync({data:e,path:o.path,parent:o});if(l.status==="aborted")return x;if(l.status==="dirty")return T(l.value);if(n.value==="dirty")return T(l.value);return l}}if(r.type==="refinement"){let e=(l)=>{let i=r.refinement(l,a);if(o.common.async)return Promise.resolve(i);if(i instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l};if(o.common.async===!1){let l=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(l.status==="aborted")return x;if(l.status==="dirty")n.dirty();return e(l.value),{status:n.value,value:l.value}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then((l)=>{if(l.status==="aborted")return x;if(l.status==="dirty")n.dirty();return e(l.value).then(()=>{return{status:n.value,value:l.value}})})}if(r.type==="transform")if(o.common.async===!1){let e=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!j(e))return x;let l=r.transform(e.value,a);if(l instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:l}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then((e)=>{if(!j(e))return x;return Promise.resolve(r.transform(e.value,a)).then((l)=>({status:n.value,value:l}))});q.assertNever(r)}};B.create=(t,n,o)=>{return new B({schema:t,typeName:A.ZodEffects,effect:n,..._(o)})};B.createWithPreprocess=(t,n,o)=>{return new B({schema:n,effect:{type:"preprocess",transform:t},typeName:A.ZodEffects,..._(o)})};G=class G extends k{_parse(t){if(this._getType(t)===h.undefined)return Y(void 0);return this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};G.create=(t,n)=>{return new G({innerType:t,typeName:A.ZodOptional,..._(n)})};N=class N extends k{_parse(t){if(this._getType(t)===h.null)return Y(null);return this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};N.create=(t,n)=>{return new N({innerType:t,typeName:A.ZodNullable,..._(n)})};mt=class mt extends k{_parse(t){let{ctx:n}=this._processInputParams(t),o=n.data;if(n.parsedType===h.undefined)o=this._def.defaultValue();return this._def.innerType._parse({data:o,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};mt.create=(t,n)=>{return new mt({innerType:t,typeName:A.ZodDefault,defaultValue:typeof n.default==="function"?n.default:()=>n.default,..._(n)})};pt=class pt extends k{_parse(t){let{ctx:n}=this._processInputParams(t),o={...n,common:{...n.common,issues:[]}},r=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});if(rt(r))return r.then((a)=>{return{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new R(o.common.issues)},input:o.data})}});else return{status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new R(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}};pt.create=(t,n)=>{return new pt({innerType:t,typeName:A.ZodCatch,catchValue:typeof n.catch==="function"?n.catch:()=>n.catch,..._(n)})};Tt=class Tt extends k{_parse(t){if(this._getType(t)!==h.nan){let o=this._getOrReturnCtx(t);return m(o,{code:d.invalid_type,expected:h.nan,received:o.parsedType}),x}return{status:"valid",value:t.data}}};Tt.create=(t)=>{return new Tt({typeName:A.ZodNaN,..._(t)})};rl=Symbol("zod_brand");gn=class gn extends k{_parse(t){let{ctx:n}=this._processInputParams(t),o=n.data;return this._def.type._parse({data:o,path:n.path,parent:n})}unwrap(){return this._def.type}};Zt=class Zt extends k{_parse(t){let{status:n,ctx:o}=this._processInputParams(t);if(o.common.async)return(async()=>{let a=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});if(a.status==="aborted")return x;if(a.status==="dirty")return n.dirty(),T(a.value);else return this._def.out._parseAsync({data:a.value,path:o.path,parent:o})})();else{let r=this._def.in._parseSync({data:o.data,path:o.path,parent:o});if(r.status==="aborted")return x;if(r.status==="dirty")return n.dirty(),{status:"dirty",value:r.value};else return this._def.out._parseSync({data:r.value,path:o.path,parent:o})}}static create(t,n){return new Zt({in:t,out:n,typeName:A.ZodPipeline})}};st=class st extends k{_parse(t){let n=this._def.innerType._parse(t),o=(r)=>{if(j(r))r.value=Object.freeze(r.value);return r};return rt(n)?n.then((r)=>o(r)):o(n)}unwrap(){return this._def.innerType}};st.create=(t,n)=>{return new st({innerType:t,typeName:A.ZodReadonly,..._(n)})};al={object:L.lazycreate};(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(A||(A={}));Wr=Q.create,Ur=C.create,ll=Tt.create,il=I.create,Vr=lt.create,bl=Z.create,cl=yt.create,fl=it.create,dl=bt.create,hl=z.create,gl=y.create,ml=O.create,pl=Ct.create,sl=J.create,vl=L.create,$l=L.strictCreate,ul=ct.create,wl=hn.create,xl=ft.create,Al=W.create,_l=It.create,kl=Pt.create,ql=tt.create,Hl=et.create,Ll=dt.create,Ml=ht.create,El=P.create,Sl=gt.create,Yl=nt.create,Rl=B.create,Xl=G.create,Ql=N.create,Jl=B.createWithPreprocess,Gl=Zt.create,Ol={string:(t)=>Q.create({...t,coerce:!0}),number:(t)=>C.create({...t,coerce:!0}),boolean:(t)=>lt.create({...t,coerce:!0}),bigint:(t)=>I.create({...t,coerce:!0}),date:(t)=>Z.create({...t,coerce:!0})},Wl=x});var p={};w(p,{void:()=>pl,util:()=>q,unknown:()=>gl,union:()=>ul,undefined:()=>fl,tuple:()=>Al,transformer:()=>Rl,symbol:()=>cl,string:()=>Wr,strictObject:()=>$l,setErrorMap:()=>Qe,set:()=>ql,record:()=>_l,quotelessJson:()=>Re,promise:()=>Yl,preprocess:()=>Jl,pipeline:()=>Gl,ostring:()=>Fl,optional:()=>Xl,onumber:()=>Bl,oboolean:()=>Dl,objectUtil:()=>vo,object:()=>vl,number:()=>Ur,nullable:()=>Ql,null:()=>dl,never:()=>ml,nativeEnum:()=>Sl,nan:()=>ll,map:()=>kl,makeIssue:()=>jt,literal:()=>Ml,lazy:()=>Ll,late:()=>al,isValid:()=>j,isDirty:()=>dn,isAsync:()=>rt,isAborted:()=>fn,intersection:()=>xl,instanceof:()=>el,getParsedType:()=>D,getErrorMap:()=>ot,function:()=>Hl,enum:()=>El,effect:()=>Rl,discriminatedUnion:()=>wl,defaultErrorMap:()=>U,datetimeRegex:()=>Br,date:()=>bl,custom:()=>Or,coerce:()=>Ol,boolean:()=>Vr,bigint:()=>il,array:()=>sl,any:()=>hl,addIssueToContext:()=>m,ZodVoid:()=>Ct,ZodUnknown:()=>y,ZodUnion:()=>ct,ZodUndefined:()=>it,ZodType:()=>k,ZodTuple:()=>W,ZodTransformer:()=>B,ZodSymbol:()=>yt,ZodString:()=>Q,ZodSet:()=>tt,ZodSchema:()=>k,ZodRecord:()=>It,ZodReadonly:()=>st,ZodPromise:()=>nt,ZodPipeline:()=>Zt,ZodParsedType:()=>h,ZodOptional:()=>G,ZodObject:()=>L,ZodNumber:()=>C,ZodNullable:()=>N,ZodNull:()=>bt,ZodNever:()=>O,ZodNativeEnum:()=>gt,ZodNaN:()=>Tt,ZodMap:()=>Pt,ZodLiteral:()=>ht,ZodLazy:()=>dt,ZodIssueCode:()=>d,ZodIntersection:()=>ft,ZodFunction:()=>et,ZodFirstPartyTypeKind:()=>A,ZodError:()=>R,ZodEnum:()=>P,ZodEffects:()=>B,ZodDiscriminatedUnion:()=>hn,ZodDefault:()=>mt,ZodDate:()=>Z,ZodCatch:()=>pt,ZodBranded:()=>gn,ZodBoolean:()=>lt,ZodBigInt:()=>I,ZodArray:()=>J,ZodAny:()=>z,Schema:()=>k,ParseStatus:()=>S,OK:()=>Y,NEVER:()=>Wl,INVALID:()=>x,EMPTY_PATH:()=>Je,DIRTY:()=>T,BRAND:()=>rl});var Ao=s(()=>{cn();uo();Rr();Kt();Nr();bn()});var Kr=s(()=>{Ao();Ao()});function _o(t){if(t===null||typeof t!=="object")return t;if(Array.isArray(t))return t.map(_o);let n={};for(let o of Object.keys(t))n[o]=_o(t[o]);return n}var Ul,Vb;var jr=s(()=>{Ul={validation:{trimStrings:!1,emptyAsNullDefault:!1},security:{csrf:{enabled:!0,excludePaths:[],sameSite:"Strict",secure:!1},rateLimit:{enabled:!0,windowMs:60000,maxRequests:60,excludePaths:[]}},hooks:{onValidationError:null,onSecurityViolation:null,onRateLimit:null,onDatabaseError:null,onRequest:null}},Vb=_o(Ul)});class zt{static validate(t,n){try{return{success:!0,data:t.parse(n)}}catch(o){if(o instanceof p.ZodError){let r={};return o.errors.forEach((a)=>{let e=a.path.join(".");r[e]=a.message}),{success:!1,errors:r}}return{success:!1,errors:{general:"Validation failed"}}}}static validateField(t,n){try{return t.parse(n),{success:!0}}catch(o){if(o instanceof p.ZodError)return{success:!1,error:o.errors[0]?.message||"Invalid value"};return{success:!1,error:"Validation failed"}}}static getFieldError(t,n){if(t.success)return null;return t.errors?.[n]||null}static hasFieldError(t,n){return!!this.getFieldError(t,n)}}var yr,K;var ko=s(()=>{Kr();jr();yr={login:p.object({email:p.string().min(1,"Email is required").email("Please enter a valid email address"),password:p.string().min(8,"Password must be at least 8 characters").regex(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)/,"Password must contain at least one uppercase letter, one lowercase letter, and one number")}),register:p.object({name:p.string().min(2,"Name must be at least 2 characters").max(50,"Name must be less than 50 characters").regex(/^[a-zA-Z\s'-]+$/,"Name can only contain letters, spaces, hyphens, and apostrophes"),email:p.string().min(1,"Email is required").email("Please enter a valid email address"),password:p.string().min(8,"Password must be at least 8 characters").regex(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])/,"Password must contain uppercase, lowercase, number, and special character"),confirmPassword:p.string()}).refine((t)=>t.password===t.confirmPassword,{message:"Passwords don't match",path:["confirmPassword"]}),auth:{register:p.object({action:p.literal("register"),email:p.string().min(1,"Email is required").email("Please enter a valid email address"),username:p.string().min(3,"Username must be at least 3 characters").max(30,"Username must be less than 30 characters"),password:p.string().min(8,"Password must be at least 8 characters"),full_name:p.string().min(2,"Full name is required").max(100,"Full name is too long")}),login:p.object({action:p.literal("login"),email:p.string().min(1,"Email is required").email("Please enter a valid email address"),password:p.string().min(8,"Password must be at least 8 characters")}),logout:p.object({action:p.literal("logout")}),action:p.discriminatedUnion("action",[p.object({action:p.literal("register")}).merge(p.object({email:p.string().min(1,"Email is required").email("Please enter a valid email address"),username:p.string().min(3,"Username must be at least 3 characters").max(30,"Username must be less than 30 characters"),password:p.string().min(8,"Password must be at least 8 characters"),full_name:p.string().min(2,"Full name is required").max(100,"Full name is too long")})),p.object({action:p.literal("login")}).merge(p.object({email:p.string().min(1,"Email is required").email("Please enter a valid email address"),password:p.string().min(8,"Password must be at least 8 characters")})),p.object({action:p.literal("logout")})])},contact:p.object({name:p.string().min(2,"Name must be at least 2 characters").max(100,"Name is too long"),email:p.string().email("Please enter a valid email address"),message:p.string().min(10,"Message must be at least 10 characters").max(1000,"Message is too long")}),email:p.string().min(1,"Email is required").email("Please enter a valid email address"),password:p.string().min(8,"Password must be at least 8 characters").regex(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)/,"Password must contain uppercase, lowercase, and number"),phone:p.string().regex(/^[\+]?[1-9][\d]{0,15}$/,"Please enter a valid phone number"),url:p.string().min(1,"URL is required").url("Please enter a valid URL"),required:p.string().min(1,"This field is required"),positiveNumber:p.number().positive("Must be a positive number"),integer:p.number().int("Must be a whole number"),futureDate:p.date().min(new Date,"Date must be in the future"),imageFile:p.instanceof(File).refine((t)=>t.size<=5242880,"File size must be less than 5MB").refine((t)=>["image/jpeg","image/png","image/gif","image/webp"].includes(t.type),"File must be a JPEG, PNG, GIF, or WebP image"),userProfile:p.object({full_name:p.string().min(2,"Full name must be at least 2 characters").max(100,"Full name is too long").optional(),bio:p.string().max(500,"Bio must be less than 500 characters").nullable().optional(),avatar_url:p.string().url("Please enter a valid URL").nullable().optional(),theme:p.enum(["africanity","dark","light","system"]).optional(),language:p.string().min(2).max(10).optional()}),project:p.object({name:p.string().min(1,"Project name is required").max(100,"Project name is too long"),description:p.string().max(1000,"Description is too long").nullable().optional(),repository_url:p.string().url("Please enter a valid repository URL").nullable().optional(),demo_url:p.string().url("Please enter a valid demo URL").nullable().optional(),tags:p.array(p.string()).optional(),is_public:p.boolean().optional()})};K={required:(t="This field is required")=>p.string().min(1,t),email:(t="Please enter a valid email address")=>p.string().email(t),minLength:(t,n)=>p.string().min(t,n||`Must be at least ${t} characters`),maxLength:(t,n)=>p.string().max(t,n||`Must be less than ${t} characters`),pattern:(t,n)=>p.string().regex(t,n),numeric:(t="Must be a number")=>p.string().regex(/^\d+$/,t),phone:(t="Please enter a valid phone number")=>p.string().regex(/^[\+]?[1-9][\d]{0,15}$/,t),url:(t="Please enter a valid URL")=>p.string().min(1,"URL is required").url(t)}});var Cr={};w(Cr,{default:()=>Vl,AfriInput:()=>mn});var mn,Vl;var Ir=s(()=>{u();ko();mn=class mn extends b{static get observedAttributes(){return["type","name","label","placeholder","error","helper","theme","icon","required","aria-label","aria-describedby","validation"]}constructor(){super();this._uniqueId=Math.random().toString(36).substr(2,9),this.render()}get value(){return this.shadowRoot.querySelector("input")?.value||""}set value(t){let n=this.shadowRoot.querySelector("input");if(n)n.value=t}connectedCallback(){this._attachInputListeners(),this.loadStyles()}attributeChangedCallback(){this.render(),this._attachInputListeners()}_attachInputListeners(){let t=this.shadowRoot.querySelector("input");if(!t)return;t.addEventListener("input",(n)=>{if(this.emit("af-input",{value:n.target.value}),this.hasAttribute("error"))this.removeAttribute("error")}),t.addEventListener("blur",()=>{this.emit("af-blur",{value:this.value}),this._validateInput()})}_setupValidation(){if(!this.getAttribute("validation"))return;let n=this.shadowRoot.querySelector("input");if(!n)return;n.addEventListener("input",()=>{if(this.hasAttribute("error"))this.removeAttribute("error")})}_validateInput(){let t=this.shadowRoot.querySelector("input");if(!t)return;let n=this.getAttribute("validation"),o=t.value;if(this.hasAttribute("required")&&!o.trim()){this.setAttribute("error","This field is required");return}if(n&&o.trim()){let a=this._getValidationSchema(n);if(a){let e=zt.validateField(a,o);if(!e.success)this.setAttribute("error",e.error);else this.removeAttribute("error")}}}_getValidationSchema(t){let n={email:K.email(),password:K.password(),phone:K.phone(),url:K.url(),required:K.required()};if(t.includes(":")){let[o,r]=t.split(":"),a=parseInt(r);switch(o){case"minLength":return K.minLength(a);case"maxLength":return K.maxLength(a);case"pattern":return K.pattern(new RegExp(r),"Invalid format")}}return n[t]||null}attributeChangedCallback(){this.render()}render(){let t=this.getAttribute("type")||"text",n=this.getAttribute("name")||"",o=this.getAttribute("label")||"",r=this.getAttribute("placeholder")||"",a=this.getAttribute("error")||"",e=this.getAttribute("helper")||"",l=this.getAttribute("theme")||"tanzania",i=this.getAttribute("icon")||"",c=this.hasAttribute("required"),v=this.getAttribute("aria-label"),H=this.getAttribute("aria-describedby"),E={tanzania:{focus:"#1EB53A",error:"#DC3545"},maasai:{focus:"#FF0000",error:"#8B0000"},ndebele:{focus:"#4169E1",error:"#DC143C"}},M=E[l]||E.tanzania,X=[];if(a)X.push(`error-${this._uniqueId}`);else if(e)X.push(`helper-${this._uniqueId}`);if(H)X.push(...H.split(" "));let Bn=X.length>0?`aria-describedby="${X.join(" ")}"`:"";this.shadowRoot.innerHTML=`
|
|
1900
|
+
`}};d("af-navbar",hn);nl=hn});var q,Ho,h,D=(t)=>{switch(typeof t){case"undefined":return h.undefined;case"string":return h.string;case"number":return Number.isNaN(t)?h.nan:h.number;case"boolean":return h.boolean;case"function":return h.function;case"bigint":return h.bigint;case"symbol":return h.symbol;case"object":if(Array.isArray(t))return h.array;if(t===null)return h.null;if(t.then&&typeof t.then==="function"&&t.catch&&typeof t.catch==="function")return h.promise;if(typeof Map<"u"&&t instanceof Map)return h.map;if(typeof Set<"u"&&t instanceof Set)return h.set;if(typeof Date<"u"&&t instanceof Date)return h.date;return h.object;default:return h.unknown}};var Kt=s(()=>{(function(t){t.assertEqual=(a)=>{};function n(a){}t.assertIs=n;function r(a){throw Error()}t.assertNever=r,t.arrayToEnum=(a)=>{let e={};for(let l of a)e[l]=l;return e},t.getValidEnumValues=(a)=>{let e=t.objectKeys(a).filter((i)=>typeof a[a[i]]!=="number"),l={};for(let i of e)l[i]=a[i];return t.objectValues(l)},t.objectValues=(a)=>{return t.objectKeys(a).map(function(e){return a[e]})},t.objectKeys=typeof Object.keys==="function"?(a)=>Object.keys(a):(a)=>{let e=[];for(let l in a)if(Object.prototype.hasOwnProperty.call(a,l))e.push(l);return e},t.find=(a,e)=>{for(let l of a)if(e(l))return l;return},t.isInteger=typeof Number.isInteger==="function"?(a)=>Number.isInteger(a):(a)=>typeof a==="number"&&Number.isFinite(a)&&Math.floor(a)===a;function o(a,e=" | "){return a.map((l)=>typeof l==="string"?`'${l}'`:l).join(e)}t.joinValues=o,t.jsonStringifyReplacer=(a,e)=>{if(typeof e==="bigint")return e.toString();return e}})(q||(q={}));(function(t){t.mergeShapes=(n,r)=>{return{...n,...r}}})(Ho||(Ho={}));h=q.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"])});var f,ol=(t)=>{return JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:")},Y;var gn=s(()=>{Kt();f=q.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);Y=class Y extends Error{get errors(){return this.issues}constructor(t){super();this.issues=[],this.addIssue=(r)=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};let n=new.target.prototype;if(Object.setPrototypeOf)Object.setPrototypeOf(this,n);else this.__proto__=n;this.name="ZodError",this.issues=t}format(t){let n=t||function(a){return a.message},r={_errors:[]},o=(a)=>{for(let e of a.issues)if(e.code==="invalid_union")e.unionErrors.map(o);else if(e.code==="invalid_return_type")o(e.returnTypeError);else if(e.code==="invalid_arguments")o(e.argumentsError);else if(e.path.length===0)r._errors.push(n(e));else{let l=r,i=0;while(i<e.path.length){let c=e.path[i];if(i!==e.path.length-1)l[c]=l[c]||{_errors:[]};else l[c]=l[c]||{_errors:[]},l[c]._errors.push(n(e));l=l[c],i++}}};return o(this),r}static assert(t){if(!(t instanceof Y))throw Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,q.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=(n)=>n.message){let n={},r=[];for(let o of this.issues)if(o.path.length>0){let a=o.path[0];n[a]=n[a]||[],n[a].push(t(o))}else r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}};Y.create=(t)=>{return new Y(t)}});var rl=(t,n)=>{let r;switch(t.code){case f.invalid_type:if(t.received===h.undefined)r="Required";else r=`Expected ${t.expected}, received ${t.received}`;break;case f.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,q.jsonStringifyReplacer)}`;break;case f.unrecognized_keys:r=`Unrecognized key(s) in object: ${q.joinValues(t.keys,", ")}`;break;case f.invalid_union:r="Invalid input";break;case f.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${q.joinValues(t.options)}`;break;case f.invalid_enum_value:r=`Invalid enum value. Expected ${q.joinValues(t.options)}, received '${t.received}'`;break;case f.invalid_arguments:r="Invalid function arguments";break;case f.invalid_return_type:r="Invalid function return type";break;case f.invalid_date:r="Invalid date";break;case f.invalid_string:if(typeof t.validation==="object")if("includes"in t.validation){if(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position==="number")r=`${r} at one or more positions greater than or equal to ${t.validation.position}`}else if("startsWith"in t.validation)r=`Invalid input: must start with "${t.validation.startsWith}"`;else if("endsWith"in t.validation)r=`Invalid input: must end with "${t.validation.endsWith}"`;else q.assertNever(t.validation);else if(t.validation!=="regex")r=`Invalid ${t.validation}`;else r="Invalid";break;case f.too_small:if(t.type==="array")r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`;else if(t.type==="string")r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`;else if(t.type==="number")r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`;else if(t.type==="bigint")r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`;else if(t.type==="date")r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`;else r="Invalid input";break;case f.too_big:if(t.type==="array")r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`;else if(t.type==="string")r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`;else if(t.type==="number")r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`;else if(t.type==="bigint")r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`;else if(t.type==="date")r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`;else r="Invalid input";break;case f.custom:r="Invalid input";break;case f.invalid_intersection_types:r="Intersection results could not be merged";break;case f.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case f.not_finite:r="Number must be finite";break;default:r=n.defaultError,q.assertNever(t)}return{message:r}},y;var So=s(()=>{gn();Kt();y=rl});function al(t){Ir=t}function ot(){return Ir}var Ir;var sn=s(()=>{So();Ir=y});function m(t,n){let r=ot(),o=jt({issueData:n,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===y?void 0:y].filter((a)=>!!a)});t.common.issues.push(o)}class S{constructor(){this.value="valid"}dirty(){if(this.value==="valid")this.value="dirty"}abort(){if(this.value!=="aborted")this.value="aborted"}static mergeArray(t,n){let r=[];for(let o of n){if(o.status==="aborted")return x;if(o.status==="dirty")t.dirty();r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){let r=[];for(let o of n){let a=await o.key,e=await o.value;r.push({key:a,value:e})}return S.mergeObjectSync(t,r)}static mergeObjectSync(t,n){let r={};for(let o of n){let{key:a,value:e}=o;if(a.status==="aborted")return x;if(e.status==="aborted")return x;if(a.status==="dirty")t.dirty();if(e.status==="dirty")t.dirty();if(a.value!=="__proto__"&&(typeof e.value<"u"||o.alwaysSet))r[a.value]=e.value}return{status:t.value,value:r}}}var jt=(t)=>{let{data:n,path:r,errorMaps:o,issueData:a}=t,e=[...r,...a.path||[]],l={...a,path:e};if(a.message!==void 0)return{...a,path:e,message:a.message};let i="",c=o.filter(($)=>!!$).slice().reverse();for(let $ of c)i=$(l,{data:n,defaultError:i}).message;return{...a,path:e,message:i}},el,x,T=(t)=>({status:"dirty",value:t}),R=(t)=>({status:"valid",value:t}),mn=(t)=>t.status==="aborted",pn=(t)=>t.status==="dirty",K=(t)=>t.status==="valid",rt=(t)=>typeof Promise<"u"&&t instanceof Promise;var Ro=s(()=>{sn();So();el=[];x=Object.freeze({status:"aborted"})});var Pr=()=>{};var w;var Tr=s(()=>{(function(t){t.errToObj=(n)=>typeof n==="string"?{message:n}:n||{},t.toString=(n)=>typeof n==="string"?n:n?.message})(w||(w={}))});class Q{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){if(!this._cachedPath.length)if(Array.isArray(this._key))this._cachedPath.push(...this._path,...this._key);else this._cachedPath.push(...this._path,this._key);return this._cachedPath}}function _(t){if(!t)return{};let{errorMap:n,invalid_type_error:r,required_error:o,description:a}=t;if(n&&(r||o))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if(n)return{errorMap:n,description:a};return{errorMap:(l,i)=>{let{message:c}=t;if(l.code==="invalid_enum_value")return{message:c??i.defaultError};if(typeof i.data>"u")return{message:c??o??i.defaultError};if(l.code!=="invalid_type")return{message:i.defaultError};return{message:c??r??i.defaultError}},description:a}}class k{get description(){return this._def.description}_getType(t){return D(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:D(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new S,ctx:{common:t.parent.common,data:t.data,parsedType:D(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let n=this._parse(t);if(rt(n))throw Error("Synchronous parse encountered promise.");return n}_parseAsync(t){let n=this._parse(t);return Promise.resolve(n)}parse(t,n){let r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){let r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:D(t)},o=this._parseSync({data:t,path:r.path,parent:r});return Zr(r,o)}"~validate"(t){let n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:D(t)};if(!this["~standard"].async)try{let r=this._parseSync({data:t,path:[],parent:n});return K(r)?{value:r.value}:{issues:n.common.issues}}catch(r){if(r?.message?.toLowerCase()?.includes("encountered"))this["~standard"].async=!0;n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then((r)=>K(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(t,n){let r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){let r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:D(t)},o=this._parse({data:t,path:r.path,parent:r}),a=await(rt(o)?o:Promise.resolve(o));return Zr(r,a)}refine(t,n){let r=(o)=>{if(typeof n==="string"||typeof n>"u")return{message:n};else if(typeof n==="function")return n(o);else return n};return this._refinement((o,a)=>{let e=t(o),l=()=>a.addIssue({code:f.custom,...r(o)});if(typeof Promise<"u"&&e instanceof Promise)return e.then((i)=>{if(!i)return l(),!1;else return!0});if(!e)return l(),!1;else return!0})}refinement(t,n){return this._refinement((r,o)=>{if(!t(r))return o.addIssue(typeof n==="function"?n(r,o):n),!1;else return!0})}_refinement(t){return new B({schema:this,typeName:A.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:(n)=>this["~validate"](n)}}optional(){return G.create(this,this._def)}nullable(){return N.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return J.create(this)}promise(){return nt.create(this,this._def)}or(t){return dt.create([this,t],this._def)}and(t){return ct.create(this,t,this._def)}transform(t){return new B({..._(this._def),schema:this,typeName:A.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let n=typeof t==="function"?t:()=>t;return new st({..._(this._def),innerType:this,defaultValue:n,typeName:A.ZodDefault})}brand(){return new un({typeName:A.ZodBranded,type:this,..._(this._def)})}catch(t){let n=typeof t==="function"?t:()=>t;return new mt({..._(this._def),innerType:this,catchValue:n,typeName:A.ZodCatch})}describe(t){return new this.constructor({...this._def,description:t})}pipe(t){return zt.create(this,t)}readonly(){return pt.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}function na(t){let n="[0-5]\\d";if(t.precision)n=`${n}\\.\\d{${t.precision}}`;else if(t.precision==null)n=`${n}(\\.\\d+)?`;let r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${n})${r}`}function Al(t){return new RegExp(`^${na(t)}$`)}function oa(t){let n=`${ta}T${na(t)}`,r=[];if(r.push(t.local?"Z?":"Z"),t.offset)r.push("([+-]\\d{2}:?\\d{2})");return n=`${n}(${r.join("|")})`,new RegExp(`^${n}$`)}function _l(t,n){if((n==="v4"||!n)&&ml.test(t))return!0;if((n==="v6"||!n)&&vl.test(t))return!0;return!1}function kl(t,n){if(!fl.test(t))return!1;try{let[r]=t.split(".");if(!r)return!1;let o=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),a=JSON.parse(atob(o));if(typeof a!=="object"||a===null)return!1;if("typ"in a&&a?.typ!=="JWT")return!1;if(!a.alg)return!1;if(n&&a.alg!==n)return!1;return!0}catch{return!1}}function ql(t,n){if((n==="v4"||!n)&&pl.test(t))return!0;if((n==="v6"||!n)&&ul.test(t))return!0;return!1}function Ll(t,n){let r=(t.toString().split(".")[1]||"").length,o=(n.toString().split(".")[1]||"").length,a=r>o?r:o,e=Number.parseInt(t.toFixed(a).replace(".","")),l=Number.parseInt(n.toFixed(a).replace(".",""));return e%l/10**a}function at(t){if(t instanceof E){let n={};for(let r in t.shape){let o=t.shape[r];n[r]=G.create(at(o))}return new E({...t._def,shape:()=>n})}else if(t instanceof J)return new J({...t._def,type:at(t.element)});else if(t instanceof G)return G.create(at(t.unwrap()));else if(t instanceof N)return N.create(at(t.unwrap()));else if(t instanceof W)return W.create(t.items.map((n)=>at(n)));else return t}function Xo(t,n){let r=D(t),o=D(n);if(t===n)return{valid:!0,data:t};else if(r===h.object&&o===h.object){let a=q.objectKeys(n),e=q.objectKeys(t).filter((i)=>a.indexOf(i)!==-1),l={...t,...n};for(let i of e){let c=Xo(t[i],n[i]);if(!c.valid)return{valid:!1};l[i]=c.data}return{valid:!0,data:l}}else if(r===h.array&&o===h.array){if(t.length!==n.length)return{valid:!1};let a=[];for(let e=0;e<t.length;e++){let l=t[e],i=n[e],c=Xo(l,i);if(!c.valid)return{valid:!1};a.push(c.data)}return{valid:!0,data:a}}else if(r===h.date&&o===h.date&&+t===+n)return{valid:!0,data:t};else return{valid:!1}}function ra(t,n){return new P({values:t,typeName:A.ZodEnum,..._(n)})}function zr(t,n){let r=typeof t==="function"?t(n):typeof t==="string"?{message:t}:t;return typeof r==="string"?{message:r}:r}function aa(t,n={},r){if(t)return z.create().superRefine((o,a)=>{let e=t(o);if(e instanceof Promise)return e.then((l)=>{if(!l){let i=zr(n,o),c=i.fatal??r??!0;a.addIssue({code:"custom",...i,fatal:c})}});if(!e){let l=zr(n,o),i=l.fatal??r??!0;a.addIssue({code:"custom",...l,fatal:i})}return});return z.create()}var Zr=(t,n)=>{if(K(n))return{success:!0,data:n.value};else{if(!t.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new Y(t.common.issues);return this._error=r,this._error}}}},ll,il,bl,dl,cl,fl,hl,gl,sl="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Yo,ml,pl,vl,ul,$l,wl,ta="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",xl,F,C,I,lt,Z,Ct,it,bt,z,j,O,It,J,E,dt,U=(t)=>{if(t instanceof ft)return U(t.schema);else if(t instanceof B)return U(t.innerType());else if(t instanceof ht)return[t.value];else if(t instanceof P)return t.options;else if(t instanceof gt)return q.objectValues(t.enum);else if(t instanceof st)return U(t._def.innerType);else if(t instanceof it)return[void 0];else if(t instanceof bt)return[null];else if(t instanceof G)return[void 0,...U(t.unwrap())];else if(t instanceof N)return[null,...U(t.unwrap())];else if(t instanceof un)return U(t.unwrap());else if(t instanceof pt)return U(t.unwrap());else if(t instanceof mt)return U(t._def.innerType);else return[]},vn,ct,W,Pt,Tt,tt,et,ft,ht,P,gt,nt,B,G,N,st,mt,Zt,El,un,zt,pt,Ml,A,Hl=(t,n={message:`Input not instance of ${t.name}`})=>aa((r)=>r instanceof t,n),ea,la,Sl,Rl,ia,Yl,Xl,Fl,Jl,Gl,Ql,Bl,Dl,Ol,Wl,yl,Ul,Nl,Vl,Kl,jl,Cl,Il,Pl,Tl,Zl,zl,ti,ni,oi,ri,ai,ei,li,ii=()=>ea().optional(),bi=()=>la().optional(),di=()=>ia().optional(),ci,fi;var ba=s(()=>{gn();sn();Tr();Ro();Kt();ll=/^c[^\s-]{8,}$/i,il=/^[0-9a-z]+$/,bl=/^[0-9A-HJKMNP-TV-Z]{26}$/i,dl=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,cl=/^[a-z0-9_-]{21}$/i,fl=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,hl=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,gl=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ml=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,pl=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,vl=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,ul=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,$l=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,wl=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,xl=new RegExp(`^${ta}$`);F=class F extends k{_parse(t){if(this._def.coerce)t.data=String(t.data);if(this._getType(t)!==h.string){let a=this._getOrReturnCtx(t);return m(a,{code:f.invalid_type,expected:h.string,received:a.parsedType}),x}let r=new S,o=void 0;for(let a of this._def.checks)if(a.kind==="min"){if(t.data.length<a.value)o=this._getOrReturnCtx(t,o),m(o,{code:f.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty()}else if(a.kind==="max"){if(t.data.length>a.value)o=this._getOrReturnCtx(t,o),m(o,{code:f.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty()}else if(a.kind==="length"){let e=t.data.length>a.value,l=t.data.length<a.value;if(e||l){if(o=this._getOrReturnCtx(t,o),e)m(o,{code:f.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message});else if(l)m(o,{code:f.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message});r.dirty()}}else if(a.kind==="email"){if(!gl.test(t.data))o=this._getOrReturnCtx(t,o),m(o,{validation:"email",code:f.invalid_string,message:a.message}),r.dirty()}else if(a.kind==="emoji"){if(!Yo)Yo=new RegExp(sl,"u");if(!Yo.test(t.data))o=this._getOrReturnCtx(t,o),m(o,{validation:"emoji",code:f.invalid_string,message:a.message}),r.dirty()}else if(a.kind==="uuid"){if(!dl.test(t.data))o=this._getOrReturnCtx(t,o),m(o,{validation:"uuid",code:f.invalid_string,message:a.message}),r.dirty()}else if(a.kind==="nanoid"){if(!cl.test(t.data))o=this._getOrReturnCtx(t,o),m(o,{validation:"nanoid",code:f.invalid_string,message:a.message}),r.dirty()}else if(a.kind==="cuid"){if(!ll.test(t.data))o=this._getOrReturnCtx(t,o),m(o,{validation:"cuid",code:f.invalid_string,message:a.message}),r.dirty()}else if(a.kind==="cuid2"){if(!il.test(t.data))o=this._getOrReturnCtx(t,o),m(o,{validation:"cuid2",code:f.invalid_string,message:a.message}),r.dirty()}else if(a.kind==="ulid"){if(!bl.test(t.data))o=this._getOrReturnCtx(t,o),m(o,{validation:"ulid",code:f.invalid_string,message:a.message}),r.dirty()}else if(a.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),m(o,{validation:"url",code:f.invalid_string,message:a.message}),r.dirty()}else if(a.kind==="regex"){if(a.regex.lastIndex=0,!a.regex.test(t.data))o=this._getOrReturnCtx(t,o),m(o,{validation:"regex",code:f.invalid_string,message:a.message}),r.dirty()}else if(a.kind==="trim")t.data=t.data.trim();else if(a.kind==="includes"){if(!t.data.includes(a.value,a.position))o=this._getOrReturnCtx(t,o),m(o,{code:f.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),r.dirty()}else if(a.kind==="toLowerCase")t.data=t.data.toLowerCase();else if(a.kind==="toUpperCase")t.data=t.data.toUpperCase();else if(a.kind==="startsWith"){if(!t.data.startsWith(a.value))o=this._getOrReturnCtx(t,o),m(o,{code:f.invalid_string,validation:{startsWith:a.value},message:a.message}),r.dirty()}else if(a.kind==="endsWith"){if(!t.data.endsWith(a.value))o=this._getOrReturnCtx(t,o),m(o,{code:f.invalid_string,validation:{endsWith:a.value},message:a.message}),r.dirty()}else if(a.kind==="datetime"){if(!oa(a).test(t.data))o=this._getOrReturnCtx(t,o),m(o,{code:f.invalid_string,validation:"datetime",message:a.message}),r.dirty()}else if(a.kind==="date"){if(!xl.test(t.data))o=this._getOrReturnCtx(t,o),m(o,{code:f.invalid_string,validation:"date",message:a.message}),r.dirty()}else if(a.kind==="time"){if(!Al(a).test(t.data))o=this._getOrReturnCtx(t,o),m(o,{code:f.invalid_string,validation:"time",message:a.message}),r.dirty()}else if(a.kind==="duration"){if(!hl.test(t.data))o=this._getOrReturnCtx(t,o),m(o,{validation:"duration",code:f.invalid_string,message:a.message}),r.dirty()}else if(a.kind==="ip"){if(!_l(t.data,a.version))o=this._getOrReturnCtx(t,o),m(o,{validation:"ip",code:f.invalid_string,message:a.message}),r.dirty()}else if(a.kind==="jwt"){if(!kl(t.data,a.alg))o=this._getOrReturnCtx(t,o),m(o,{validation:"jwt",code:f.invalid_string,message:a.message}),r.dirty()}else if(a.kind==="cidr"){if(!ql(t.data,a.version))o=this._getOrReturnCtx(t,o),m(o,{validation:"cidr",code:f.invalid_string,message:a.message}),r.dirty()}else if(a.kind==="base64"){if(!$l.test(t.data))o=this._getOrReturnCtx(t,o),m(o,{validation:"base64",code:f.invalid_string,message:a.message}),r.dirty()}else if(a.kind==="base64url"){if(!wl.test(t.data))o=this._getOrReturnCtx(t,o),m(o,{validation:"base64url",code:f.invalid_string,message:a.message}),r.dirty()}else q.assertNever(a);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement((o)=>t.test(o),{validation:n,code:f.invalid_string,...w.errToObj(r)})}_addCheck(t){return new F({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...w.errToObj(t)})}url(t){return this._addCheck({kind:"url",...w.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...w.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...w.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...w.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...w.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...w.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...w.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...w.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...w.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...w.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...w.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...w.errToObj(t)})}datetime(t){if(typeof t==="string")return this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t});return this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...w.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){if(typeof t==="string")return this._addCheck({kind:"time",precision:null,message:t});return this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...w.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...w.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...w.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...w.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...w.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...w.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...w.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...w.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...w.errToObj(n)})}nonempty(t){return this.min(1,w.errToObj(t))}trim(){return new F({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new F({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new F({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((t)=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find((t)=>t.kind==="date")}get isTime(){return!!this._def.checks.find((t)=>t.kind==="time")}get isDuration(){return!!this._def.checks.find((t)=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find((t)=>t.kind==="email")}get isURL(){return!!this._def.checks.find((t)=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find((t)=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find((t)=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find((t)=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find((t)=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find((t)=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find((t)=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find((t)=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find((t)=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find((t)=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find((t)=>t.kind==="base64url")}get minLength(){let t=null;for(let n of this._def.checks)if(n.kind==="min"){if(t===null||n.value>t)t=n.value}return t}get maxLength(){let t=null;for(let n of this._def.checks)if(n.kind==="max"){if(t===null||n.value<t)t=n.value}return t}};F.create=(t)=>{return new F({checks:[],typeName:A.ZodString,coerce:t?.coerce??!1,..._(t)})};C=class C extends k{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce)t.data=Number(t.data);if(this._getType(t)!==h.number){let a=this._getOrReturnCtx(t);return m(a,{code:f.invalid_type,expected:h.number,received:a.parsedType}),x}let r=void 0,o=new S;for(let a of this._def.checks)if(a.kind==="int"){if(!q.isInteger(t.data))r=this._getOrReturnCtx(t,r),m(r,{code:f.invalid_type,expected:"integer",received:"float",message:a.message}),o.dirty()}else if(a.kind==="min"){if(a.inclusive?t.data<a.value:t.data<=a.value)r=this._getOrReturnCtx(t,r),m(r,{code:f.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),o.dirty()}else if(a.kind==="max"){if(a.inclusive?t.data>a.value:t.data>=a.value)r=this._getOrReturnCtx(t,r),m(r,{code:f.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),o.dirty()}else if(a.kind==="multipleOf"){if(Ll(t.data,a.value)!==0)r=this._getOrReturnCtx(t,r),m(r,{code:f.not_multiple_of,multipleOf:a.value,message:a.message}),o.dirty()}else if(a.kind==="finite"){if(!Number.isFinite(t.data))r=this._getOrReturnCtx(t,r),m(r,{code:f.not_finite,message:a.message}),o.dirty()}else q.assertNever(a);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,w.toString(n))}gt(t,n){return this.setLimit("min",t,!1,w.toString(n))}lte(t,n){return this.setLimit("max",t,!0,w.toString(n))}lt(t,n){return this.setLimit("max",t,!1,w.toString(n))}setLimit(t,n,r,o){return new C({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:w.toString(o)}]})}_addCheck(t){return new C({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:w.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:w.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:w.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:w.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:w.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:w.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:w.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:w.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:w.toString(t)})}get minValue(){let t=null;for(let n of this._def.checks)if(n.kind==="min"){if(t===null||n.value>t)t=n.value}return t}get maxValue(){let t=null;for(let n of this._def.checks)if(n.kind==="max"){if(t===null||n.value<t)t=n.value}return t}get isInt(){return!!this._def.checks.find((t)=>t.kind==="int"||t.kind==="multipleOf"&&q.isInteger(t.value))}get isFinite(){let t=null,n=null;for(let r of this._def.checks)if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;else if(r.kind==="min"){if(n===null||r.value>n)n=r.value}else if(r.kind==="max"){if(t===null||r.value<t)t=r.value}return Number.isFinite(n)&&Number.isFinite(t)}};C.create=(t)=>{return new C({checks:[],typeName:A.ZodNumber,coerce:t?.coerce||!1,..._(t)})};I=class I extends k{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==h.bigint)return this._getInvalidInput(t);let r=void 0,o=new S;for(let a of this._def.checks)if(a.kind==="min"){if(a.inclusive?t.data<a.value:t.data<=a.value)r=this._getOrReturnCtx(t,r),m(r,{code:f.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),o.dirty()}else if(a.kind==="max"){if(a.inclusive?t.data>a.value:t.data>=a.value)r=this._getOrReturnCtx(t,r),m(r,{code:f.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),o.dirty()}else if(a.kind==="multipleOf"){if(t.data%a.value!==BigInt(0))r=this._getOrReturnCtx(t,r),m(r,{code:f.not_multiple_of,multipleOf:a.value,message:a.message}),o.dirty()}else q.assertNever(a);return{status:o.value,value:t.data}}_getInvalidInput(t){let n=this._getOrReturnCtx(t);return m(n,{code:f.invalid_type,expected:h.bigint,received:n.parsedType}),x}gte(t,n){return this.setLimit("min",t,!0,w.toString(n))}gt(t,n){return this.setLimit("min",t,!1,w.toString(n))}lte(t,n){return this.setLimit("max",t,!0,w.toString(n))}lt(t,n){return this.setLimit("max",t,!1,w.toString(n))}setLimit(t,n,r,o){return new I({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:w.toString(o)}]})}_addCheck(t){return new I({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:w.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:w.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:w.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:w.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:w.toString(n)})}get minValue(){let t=null;for(let n of this._def.checks)if(n.kind==="min"){if(t===null||n.value>t)t=n.value}return t}get maxValue(){let t=null;for(let n of this._def.checks)if(n.kind==="max"){if(t===null||n.value<t)t=n.value}return t}};I.create=(t)=>{return new I({checks:[],typeName:A.ZodBigInt,coerce:t?.coerce??!1,..._(t)})};lt=class lt extends k{_parse(t){if(this._def.coerce)t.data=Boolean(t.data);if(this._getType(t)!==h.boolean){let r=this._getOrReturnCtx(t);return m(r,{code:f.invalid_type,expected:h.boolean,received:r.parsedType}),x}return R(t.data)}};lt.create=(t)=>{return new lt({typeName:A.ZodBoolean,coerce:t?.coerce||!1,..._(t)})};Z=class Z extends k{_parse(t){if(this._def.coerce)t.data=new Date(t.data);if(this._getType(t)!==h.date){let a=this._getOrReturnCtx(t);return m(a,{code:f.invalid_type,expected:h.date,received:a.parsedType}),x}if(Number.isNaN(t.data.getTime())){let a=this._getOrReturnCtx(t);return m(a,{code:f.invalid_date}),x}let r=new S,o=void 0;for(let a of this._def.checks)if(a.kind==="min"){if(t.data.getTime()<a.value)o=this._getOrReturnCtx(t,o),m(o,{code:f.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()}else if(a.kind==="max"){if(t.data.getTime()>a.value)o=this._getOrReturnCtx(t,o),m(o,{code:f.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()}else q.assertNever(a);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Z({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:w.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:w.toString(n)})}get minDate(){let t=null;for(let n of this._def.checks)if(n.kind==="min"){if(t===null||n.value>t)t=n.value}return t!=null?new Date(t):null}get maxDate(){let t=null;for(let n of this._def.checks)if(n.kind==="max"){if(t===null||n.value<t)t=n.value}return t!=null?new Date(t):null}};Z.create=(t)=>{return new Z({checks:[],coerce:t?.coerce||!1,typeName:A.ZodDate,..._(t)})};Ct=class Ct extends k{_parse(t){if(this._getType(t)!==h.symbol){let r=this._getOrReturnCtx(t);return m(r,{code:f.invalid_type,expected:h.symbol,received:r.parsedType}),x}return R(t.data)}};Ct.create=(t)=>{return new Ct({typeName:A.ZodSymbol,..._(t)})};it=class it extends k{_parse(t){if(this._getType(t)!==h.undefined){let r=this._getOrReturnCtx(t);return m(r,{code:f.invalid_type,expected:h.undefined,received:r.parsedType}),x}return R(t.data)}};it.create=(t)=>{return new it({typeName:A.ZodUndefined,..._(t)})};bt=class bt extends k{_parse(t){if(this._getType(t)!==h.null){let r=this._getOrReturnCtx(t);return m(r,{code:f.invalid_type,expected:h.null,received:r.parsedType}),x}return R(t.data)}};bt.create=(t)=>{return new bt({typeName:A.ZodNull,..._(t)})};z=class z extends k{constructor(){super(...arguments);this._any=!0}_parse(t){return R(t.data)}};z.create=(t)=>{return new z({typeName:A.ZodAny,..._(t)})};j=class j extends k{constructor(){super(...arguments);this._unknown=!0}_parse(t){return R(t.data)}};j.create=(t)=>{return new j({typeName:A.ZodUnknown,..._(t)})};O=class O extends k{_parse(t){let n=this._getOrReturnCtx(t);return m(n,{code:f.invalid_type,expected:h.never,received:n.parsedType}),x}};O.create=(t)=>{return new O({typeName:A.ZodNever,..._(t)})};It=class It extends k{_parse(t){if(this._getType(t)!==h.undefined){let r=this._getOrReturnCtx(t);return m(r,{code:f.invalid_type,expected:h.void,received:r.parsedType}),x}return R(t.data)}};It.create=(t)=>{return new It({typeName:A.ZodVoid,..._(t)})};J=class J extends k{_parse(t){let{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==h.array)return m(n,{code:f.invalid_type,expected:h.array,received:n.parsedType}),x;if(o.exactLength!==null){let e=n.data.length>o.exactLength.value,l=n.data.length<o.exactLength.value;if(e||l)m(n,{code:e?f.too_big:f.too_small,minimum:l?o.exactLength.value:void 0,maximum:e?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty()}if(o.minLength!==null){if(n.data.length<o.minLength.value)m(n,{code:f.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()}if(o.maxLength!==null){if(n.data.length>o.maxLength.value)m(n,{code:f.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()}if(n.common.async)return Promise.all([...n.data].map((e,l)=>{return o.type._parseAsync(new Q(n,e,n.path,l))})).then((e)=>{return S.mergeArray(r,e)});let a=[...n.data].map((e,l)=>{return o.type._parseSync(new Q(n,e,n.path,l))});return S.mergeArray(r,a)}get element(){return this._def.type}min(t,n){return new J({...this._def,minLength:{value:t,message:w.toString(n)}})}max(t,n){return new J({...this._def,maxLength:{value:t,message:w.toString(n)}})}length(t,n){return new J({...this._def,exactLength:{value:t,message:w.toString(n)}})}nonempty(t){return this.min(1,t)}};J.create=(t,n)=>{return new J({type:t,minLength:null,maxLength:null,exactLength:null,typeName:A.ZodArray,..._(n)})};E=class E extends k{constructor(){super(...arguments);this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),n=q.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==h.object){let c=this._getOrReturnCtx(t);return m(c,{code:f.invalid_type,expected:h.object,received:c.parsedType}),x}let{status:r,ctx:o}=this._processInputParams(t),{shape:a,keys:e}=this._getCached(),l=[];if(!(this._def.catchall instanceof O&&this._def.unknownKeys==="strip")){for(let c in o.data)if(!e.includes(c))l.push(c)}let i=[];for(let c of e){let $=a[c],L=o.data[c];i.push({key:{status:"valid",value:c},value:$._parse(new Q(o,L,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof O){let c=this._def.unknownKeys;if(c==="passthrough")for(let $ of l)i.push({key:{status:"valid",value:$},value:{status:"valid",value:o.data[$]}});else if(c==="strict"){if(l.length>0)m(o,{code:f.unrecognized_keys,keys:l}),r.dirty()}else if(c==="strip");else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let c=this._def.catchall;for(let $ of l){let L=o.data[$];i.push({key:{status:"valid",value:$},value:c._parse(new Q(o,L,o.path,$)),alwaysSet:$ in o.data})}}if(o.common.async)return Promise.resolve().then(async()=>{let c=[];for(let $ of i){let L=await $.key,H=await $.value;c.push({key:L,value:H,alwaysSet:$.alwaysSet})}return c}).then((c)=>{return S.mergeObjectSync(r,c)});else return S.mergeObjectSync(r,i)}get shape(){return this._def.shape()}strict(t){return w.errToObj,new E({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{let o=this._def.errorMap?.(n,r).message??r.defaultError;if(n.code==="unrecognized_keys")return{message:w.errToObj(t).message??o};return{message:o}}}:{}})}strip(){return new E({...this._def,unknownKeys:"strip"})}passthrough(){return new E({...this._def,unknownKeys:"passthrough"})}extend(t){return new E({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new E({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:A.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new E({...this._def,catchall:t})}pick(t){let n={};for(let r of q.objectKeys(t))if(t[r]&&this.shape[r])n[r]=this.shape[r];return new E({...this._def,shape:()=>n})}omit(t){let n={};for(let r of q.objectKeys(this.shape))if(!t[r])n[r]=this.shape[r];return new E({...this._def,shape:()=>n})}deepPartial(){return at(this)}partial(t){let n={};for(let r of q.objectKeys(this.shape)){let o=this.shape[r];if(t&&!t[r])n[r]=o;else n[r]=o.optional()}return new E({...this._def,shape:()=>n})}required(t){let n={};for(let r of q.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let a=this.shape[r];while(a instanceof G)a=a._def.innerType;n[r]=a}return new E({...this._def,shape:()=>n})}keyof(){return ra(q.objectKeys(this.shape))}};E.create=(t,n)=>{return new E({shape:()=>t,unknownKeys:"strip",catchall:O.create(),typeName:A.ZodObject,..._(n)})};E.strictCreate=(t,n)=>{return new E({shape:()=>t,unknownKeys:"strict",catchall:O.create(),typeName:A.ZodObject,..._(n)})};E.lazycreate=(t,n)=>{return new E({shape:t,unknownKeys:"strip",catchall:O.create(),typeName:A.ZodObject,..._(n)})};dt=class dt extends k{_parse(t){let{ctx:n}=this._processInputParams(t),r=this._def.options;function o(a){for(let l of a)if(l.result.status==="valid")return l.result;for(let l of a)if(l.result.status==="dirty")return n.common.issues.push(...l.ctx.common.issues),l.result;let e=a.map((l)=>new Y(l.ctx.common.issues));return m(n,{code:f.invalid_union,unionErrors:e}),x}if(n.common.async)return Promise.all(r.map(async(a)=>{let e={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:e}),ctx:e}})).then(o);else{let a=void 0,e=[];for(let i of r){let c={...n,common:{...n.common,issues:[]},parent:null},$=i._parseSync({data:n.data,path:n.path,parent:c});if($.status==="valid")return $;else if($.status==="dirty"&&!a)a={result:$,ctx:c};if(c.common.issues.length)e.push(c.common.issues)}if(a)return n.common.issues.push(...a.ctx.common.issues),a.result;let l=e.map((i)=>new Y(i));return m(n,{code:f.invalid_union,unionErrors:l}),x}}get options(){return this._def.options}};dt.create=(t,n)=>{return new dt({options:t,typeName:A.ZodUnion,..._(n)})};vn=class vn extends k{_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==h.object)return m(n,{code:f.invalid_type,expected:h.object,received:n.parsedType}),x;let r=this.discriminator,o=n.data[r],a=this.optionsMap.get(o);if(!a)return m(n,{code:f.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),x;if(n.common.async)return a._parseAsync({data:n.data,path:n.path,parent:n});else return a._parseSync({data:n.data,path:n.path,parent:n})}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let o=new Map;for(let a of n){let e=U(a.shape[t]);if(!e.length)throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let l of e){if(o.has(l))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(l)}`);o.set(l,a)}}return new vn({typeName:A.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,..._(r)})}};ct=class ct extends k{_parse(t){let{status:n,ctx:r}=this._processInputParams(t),o=(a,e)=>{if(mn(a)||mn(e))return x;let l=Xo(a.value,e.value);if(!l.valid)return m(r,{code:f.invalid_intersection_types}),x;if(pn(a)||pn(e))n.dirty();return{status:n.value,value:l.data}};if(r.common.async)return Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([a,e])=>o(a,e));else return o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};ct.create=(t,n,r)=>{return new ct({left:t,right:n,typeName:A.ZodIntersection,..._(r)})};W=class W extends k{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==h.array)return m(r,{code:f.invalid_type,expected:h.array,received:r.parsedType}),x;if(r.data.length<this._def.items.length)return m(r,{code:f.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),x;if(!this._def.rest&&r.data.length>this._def.items.length)m(r,{code:f.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty();let a=[...r.data].map((e,l)=>{let i=this._def.items[l]||this._def.rest;if(!i)return null;return i._parse(new Q(r,e,r.path,l))}).filter((e)=>!!e);if(r.common.async)return Promise.all(a).then((e)=>{return S.mergeArray(n,e)});else return S.mergeArray(n,a)}get items(){return this._def.items}rest(t){return new W({...this._def,rest:t})}};W.create=(t,n)=>{if(!Array.isArray(t))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new W({items:t,typeName:A.ZodTuple,rest:null,..._(n)})};Pt=class Pt extends k{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==h.object)return m(r,{code:f.invalid_type,expected:h.object,received:r.parsedType}),x;let o=[],a=this._def.keyType,e=this._def.valueType;for(let l in r.data)o.push({key:a._parse(new Q(r,l,r.path,l)),value:e._parse(new Q(r,r.data[l],r.path,l)),alwaysSet:l in r.data});if(r.common.async)return S.mergeObjectAsync(n,o);else return S.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){if(n instanceof k)return new Pt({keyType:t,valueType:n,typeName:A.ZodRecord,..._(r)});return new Pt({keyType:F.create(),valueType:t,typeName:A.ZodRecord,..._(n)})}};Tt=class Tt extends k{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==h.map)return m(r,{code:f.invalid_type,expected:h.map,received:r.parsedType}),x;let o=this._def.keyType,a=this._def.valueType,e=[...r.data.entries()].map(([l,i],c)=>{return{key:o._parse(new Q(r,l,r.path,[c,"key"])),value:a._parse(new Q(r,i,r.path,[c,"value"]))}});if(r.common.async){let l=new Map;return Promise.resolve().then(async()=>{for(let i of e){let c=await i.key,$=await i.value;if(c.status==="aborted"||$.status==="aborted")return x;if(c.status==="dirty"||$.status==="dirty")n.dirty();l.set(c.value,$.value)}return{status:n.value,value:l}})}else{let l=new Map;for(let i of e){let{key:c,value:$}=i;if(c.status==="aborted"||$.status==="aborted")return x;if(c.status==="dirty"||$.status==="dirty")n.dirty();l.set(c.value,$.value)}return{status:n.value,value:l}}}};Tt.create=(t,n,r)=>{return new Tt({valueType:n,keyType:t,typeName:A.ZodMap,..._(r)})};tt=class tt extends k{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==h.set)return m(r,{code:f.invalid_type,expected:h.set,received:r.parsedType}),x;let o=this._def;if(o.minSize!==null){if(r.data.size<o.minSize.value)m(r,{code:f.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()}if(o.maxSize!==null){if(r.data.size>o.maxSize.value)m(r,{code:f.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty()}let a=this._def.valueType;function e(i){let c=new Set;for(let $ of i){if($.status==="aborted")return x;if($.status==="dirty")n.dirty();c.add($.value)}return{status:n.value,value:c}}let l=[...r.data.values()].map((i,c)=>a._parse(new Q(r,i,r.path,c)));if(r.common.async)return Promise.all(l).then((i)=>e(i));else return e(l)}min(t,n){return new tt({...this._def,minSize:{value:t,message:w.toString(n)}})}max(t,n){return new tt({...this._def,maxSize:{value:t,message:w.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}};tt.create=(t,n)=>{return new tt({valueType:t,minSize:null,maxSize:null,typeName:A.ZodSet,..._(n)})};et=class et extends k{constructor(){super(...arguments);this.validate=this.implement}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==h.function)return m(n,{code:f.invalid_type,expected:h.function,received:n.parsedType}),x;function r(l,i){return jt({data:l,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ot(),y].filter((c)=>!!c),issueData:{code:f.invalid_arguments,argumentsError:i}})}function o(l,i){return jt({data:l,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ot(),y].filter((c)=>!!c),issueData:{code:f.invalid_return_type,returnTypeError:i}})}let a={errorMap:n.common.contextualErrorMap},e=n.data;if(this._def.returns instanceof nt){let l=this;return R(async function(...i){let c=new Y([]),$=await l._def.args.parseAsync(i,a).catch((M)=>{throw c.addIssue(r(i,M)),c}),L=await Reflect.apply(e,this,$);return await l._def.returns._def.type.parseAsync(L,a).catch((M)=>{throw c.addIssue(o(L,M)),c})})}else{let l=this;return R(function(...i){let c=l._def.args.safeParse(i,a);if(!c.success)throw new Y([r(i,c.error)]);let $=Reflect.apply(e,this,c.data),L=l._def.returns.safeParse($,a);if(!L.success)throw new Y([o($,L.error)]);return L.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new et({...this._def,args:W.create(t).rest(j.create())})}returns(t){return new et({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new et({args:t?t:W.create([]).rest(j.create()),returns:n||j.create(),typeName:A.ZodFunction,..._(r)})}};ft=class ft extends k{get schema(){return this._def.getter()}_parse(t){let{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}};ft.create=(t,n)=>{return new ft({getter:t,typeName:A.ZodLazy,..._(n)})};ht=class ht extends k{_parse(t){if(t.data!==this._def.value){let n=this._getOrReturnCtx(t);return m(n,{received:n.data,code:f.invalid_literal,expected:this._def.value}),x}return{status:"valid",value:t.data}}get value(){return this._def.value}};ht.create=(t,n)=>{return new ht({value:t,typeName:A.ZodLiteral,..._(n)})};P=class P extends k{_parse(t){if(typeof t.data!=="string"){let n=this._getOrReturnCtx(t),r=this._def.values;return m(n,{expected:q.joinValues(r),received:n.parsedType,code:f.invalid_type}),x}if(!this._cache)this._cache=new Set(this._def.values);if(!this._cache.has(t.data)){let n=this._getOrReturnCtx(t),r=this._def.values;return m(n,{received:n.data,code:f.invalid_enum_value,options:r}),x}return R(t.data)}get options(){return this._def.values}get enum(){let t={};for(let n of this._def.values)t[n]=n;return t}get Values(){let t={};for(let n of this._def.values)t[n]=n;return t}get Enum(){let t={};for(let n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return P.create(t,{...this._def,...n})}exclude(t,n=this._def){return P.create(this.options.filter((r)=>!t.includes(r)),{...this._def,...n})}};P.create=ra;gt=class gt extends k{_parse(t){let n=q.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==h.string&&r.parsedType!==h.number){let o=q.objectValues(n);return m(r,{expected:q.joinValues(o),received:r.parsedType,code:f.invalid_type}),x}if(!this._cache)this._cache=new Set(q.getValidEnumValues(this._def.values));if(!this._cache.has(t.data)){let o=q.objectValues(n);return m(r,{received:r.data,code:f.invalid_enum_value,options:o}),x}return R(t.data)}get enum(){return this._def.values}};gt.create=(t,n)=>{return new gt({values:t,typeName:A.ZodNativeEnum,..._(n)})};nt=class nt extends k{unwrap(){return this._def.type}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==h.promise&&n.common.async===!1)return m(n,{code:f.invalid_type,expected:h.promise,received:n.parsedType}),x;let r=n.parsedType===h.promise?n.data:Promise.resolve(n.data);return R(r.then((o)=>{return this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})}))}};nt.create=(t,n)=>{return new nt({type:t,typeName:A.ZodPromise,..._(n)})};B=class B extends k{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===A.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,a={addIssue:(e)=>{if(m(r,e),e.fatal)n.abort();else n.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),o.type==="preprocess"){let e=o.transform(r.data,a);if(r.common.async)return Promise.resolve(e).then(async(l)=>{if(n.value==="aborted")return x;let i=await this._def.schema._parseAsync({data:l,path:r.path,parent:r});if(i.status==="aborted")return x;if(i.status==="dirty")return T(i.value);if(n.value==="dirty")return T(i.value);return i});else{if(n.value==="aborted")return x;let l=this._def.schema._parseSync({data:e,path:r.path,parent:r});if(l.status==="aborted")return x;if(l.status==="dirty")return T(l.value);if(n.value==="dirty")return T(l.value);return l}}if(o.type==="refinement"){let e=(l)=>{let i=o.refinement(l,a);if(r.common.async)return Promise.resolve(i);if(i instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l};if(r.common.async===!1){let l=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(l.status==="aborted")return x;if(l.status==="dirty")n.dirty();return e(l.value),{status:n.value,value:l.value}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then((l)=>{if(l.status==="aborted")return x;if(l.status==="dirty")n.dirty();return e(l.value).then(()=>{return{status:n.value,value:l.value}})})}if(o.type==="transform")if(r.common.async===!1){let e=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!K(e))return x;let l=o.transform(e.value,a);if(l instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:l}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then((e)=>{if(!K(e))return x;return Promise.resolve(o.transform(e.value,a)).then((l)=>({status:n.value,value:l}))});q.assertNever(o)}};B.create=(t,n,r)=>{return new B({schema:t,typeName:A.ZodEffects,effect:n,..._(r)})};B.createWithPreprocess=(t,n,r)=>{return new B({schema:n,effect:{type:"preprocess",transform:t},typeName:A.ZodEffects,..._(r)})};G=class G extends k{_parse(t){if(this._getType(t)===h.undefined)return R(void 0);return this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};G.create=(t,n)=>{return new G({innerType:t,typeName:A.ZodOptional,..._(n)})};N=class N extends k{_parse(t){if(this._getType(t)===h.null)return R(null);return this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};N.create=(t,n)=>{return new N({innerType:t,typeName:A.ZodNullable,..._(n)})};st=class st extends k{_parse(t){let{ctx:n}=this._processInputParams(t),r=n.data;if(n.parsedType===h.undefined)r=this._def.defaultValue();return this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};st.create=(t,n)=>{return new st({innerType:t,typeName:A.ZodDefault,defaultValue:typeof n.default==="function"?n.default:()=>n.default,..._(n)})};mt=class mt extends k{_parse(t){let{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});if(rt(o))return o.then((a)=>{return{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Y(r.common.issues)},input:r.data})}});else return{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Y(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};mt.create=(t,n)=>{return new mt({innerType:t,typeName:A.ZodCatch,catchValue:typeof n.catch==="function"?n.catch:()=>n.catch,..._(n)})};Zt=class Zt extends k{_parse(t){if(this._getType(t)!==h.nan){let r=this._getOrReturnCtx(t);return m(r,{code:f.invalid_type,expected:h.nan,received:r.parsedType}),x}return{status:"valid",value:t.data}}};Zt.create=(t)=>{return new Zt({typeName:A.ZodNaN,..._(t)})};El=Symbol("zod_brand");un=class un extends k{_parse(t){let{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}};zt=class zt extends k{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{let a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});if(a.status==="aborted")return x;if(a.status==="dirty")return n.dirty(),T(a.value);else return this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();else{let o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});if(o.status==="aborted")return x;if(o.status==="dirty")return n.dirty(),{status:"dirty",value:o.value};else return this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new zt({in:t,out:n,typeName:A.ZodPipeline})}};pt=class pt extends k{_parse(t){let n=this._def.innerType._parse(t),r=(o)=>{if(K(o))o.value=Object.freeze(o.value);return o};return rt(n)?n.then((o)=>r(o)):r(n)}unwrap(){return this._def.innerType}};pt.create=(t,n)=>{return new pt({innerType:t,typeName:A.ZodReadonly,..._(n)})};Ml={object:E.lazycreate};(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(A||(A={}));ea=F.create,la=C.create,Sl=Zt.create,Rl=I.create,ia=lt.create,Yl=Z.create,Xl=Ct.create,Fl=it.create,Jl=bt.create,Gl=z.create,Ql=j.create,Bl=O.create,Dl=It.create,Ol=J.create,Wl=E.create,yl=E.strictCreate,Ul=dt.create,Nl=vn.create,Vl=ct.create,Kl=W.create,jl=Pt.create,Cl=Tt.create,Il=tt.create,Pl=et.create,Tl=ft.create,Zl=ht.create,zl=P.create,ti=gt.create,ni=nt.create,oi=B.create,ri=G.create,ai=N.create,ei=B.createWithPreprocess,li=zt.create,ci={string:(t)=>F.create({...t,coerce:!0}),number:(t)=>C.create({...t,coerce:!0}),boolean:(t)=>lt.create({...t,coerce:!0}),bigint:(t)=>I.create({...t,coerce:!0}),date:(t)=>Z.create({...t,coerce:!0})},fi=x});var p={};u(p,{void:()=>Dl,util:()=>q,unknown:()=>Ql,union:()=>Ul,undefined:()=>Fl,tuple:()=>Kl,transformer:()=>oi,symbol:()=>Xl,string:()=>ea,strictObject:()=>yl,setErrorMap:()=>al,set:()=>Il,record:()=>jl,quotelessJson:()=>ol,promise:()=>ni,preprocess:()=>ei,pipeline:()=>li,ostring:()=>ii,optional:()=>ri,onumber:()=>bi,oboolean:()=>di,objectUtil:()=>Ho,object:()=>Wl,number:()=>la,nullable:()=>ai,null:()=>Jl,never:()=>Bl,nativeEnum:()=>ti,nan:()=>Sl,map:()=>Cl,makeIssue:()=>jt,literal:()=>Zl,lazy:()=>Tl,late:()=>Ml,isValid:()=>K,isDirty:()=>pn,isAsync:()=>rt,isAborted:()=>mn,intersection:()=>Vl,instanceof:()=>Hl,getParsedType:()=>D,getErrorMap:()=>ot,function:()=>Pl,enum:()=>zl,effect:()=>oi,discriminatedUnion:()=>Nl,defaultErrorMap:()=>y,datetimeRegex:()=>oa,date:()=>Yl,custom:()=>aa,coerce:()=>ci,boolean:()=>ia,bigint:()=>Rl,array:()=>Ol,any:()=>Gl,addIssueToContext:()=>m,ZodVoid:()=>It,ZodUnknown:()=>j,ZodUnion:()=>dt,ZodUndefined:()=>it,ZodType:()=>k,ZodTuple:()=>W,ZodTransformer:()=>B,ZodSymbol:()=>Ct,ZodString:()=>F,ZodSet:()=>tt,ZodSchema:()=>k,ZodRecord:()=>Pt,ZodReadonly:()=>pt,ZodPromise:()=>nt,ZodPipeline:()=>zt,ZodParsedType:()=>h,ZodOptional:()=>G,ZodObject:()=>E,ZodNumber:()=>C,ZodNullable:()=>N,ZodNull:()=>bt,ZodNever:()=>O,ZodNativeEnum:()=>gt,ZodNaN:()=>Zt,ZodMap:()=>Tt,ZodLiteral:()=>ht,ZodLazy:()=>ft,ZodIssueCode:()=>f,ZodIntersection:()=>ct,ZodFunction:()=>et,ZodFirstPartyTypeKind:()=>A,ZodError:()=>Y,ZodEnum:()=>P,ZodEffects:()=>B,ZodDiscriminatedUnion:()=>vn,ZodDefault:()=>st,ZodDate:()=>Z,ZodCatch:()=>mt,ZodBranded:()=>un,ZodBoolean:()=>lt,ZodBigInt:()=>I,ZodArray:()=>J,ZodAny:()=>z,Schema:()=>k,ParseStatus:()=>S,OK:()=>R,NEVER:()=>fi,INVALID:()=>x,EMPTY_PATH:()=>el,DIRTY:()=>T,BRAND:()=>El});var Fo=s(()=>{sn();Ro();Pr();Kt();ba();gn()});var da=s(()=>{Fo();Fo()});function Jo(t){if(t===null||typeof t!=="object")return t;if(Array.isArray(t))return t.map(Jo);let n={};for(let r of Object.keys(t))n[r]=Jo(t[r]);return n}var hi,xd;var ca=s(()=>{hi={validation:{trimStrings:!1,emptyAsNullDefault:!1},security:{csrf:{enabled:!0,excludePaths:[],sameSite:"Strict",secure:!1},rateLimit:{enabled:!0,windowMs:60000,maxRequests:60,excludePaths:[]}},hooks:{onValidationError:null,onSecurityViolation:null,onRateLimit:null,onDatabaseError:null,onRequest:null}},xd=Jo(hi)});class tn{static validate(t,n){try{return{success:!0,data:t.parse(n)}}catch(r){if(r instanceof p.ZodError){let o={};return r.errors.forEach((a)=>{let e=a.path.join(".");o[e]=a.message}),{success:!1,errors:o}}return{success:!1,errors:{general:"Validation failed"}}}}static validateField(t,n){try{return t.parse(n),{success:!0}}catch(r){if(r instanceof p.ZodError)return{success:!1,error:r.errors[0]?.message||"Invalid value"};return{success:!1,error:"Validation failed"}}}static getFieldError(t,n){if(t.success)return null;return t.errors?.[n]||null}static hasFieldError(t,n){return!!this.getFieldError(t,n)}}var fa,V;var Go=s(()=>{da();ca();fa={login:p.object({email:p.string().min(1,"Email is required").email("Please enter a valid email address"),password:p.string().min(8,"Password must be at least 8 characters").regex(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)/,"Password must contain at least one uppercase letter, one lowercase letter, and one number")}),register:p.object({name:p.string().min(2,"Name must be at least 2 characters").max(50,"Name must be less than 50 characters").regex(/^[a-zA-Z\s'-]+$/,"Name can only contain letters, spaces, hyphens, and apostrophes"),email:p.string().min(1,"Email is required").email("Please enter a valid email address"),password:p.string().min(8,"Password must be at least 8 characters").regex(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])/,"Password must contain uppercase, lowercase, number, and special character"),confirmPassword:p.string()}).refine((t)=>t.password===t.confirmPassword,{message:"Passwords don't match",path:["confirmPassword"]}),auth:{register:p.object({action:p.literal("register"),email:p.string().min(1,"Email is required").email("Please enter a valid email address"),username:p.string().min(3,"Username must be at least 3 characters").max(30,"Username must be less than 30 characters"),password:p.string().min(8,"Password must be at least 8 characters"),full_name:p.string().min(2,"Full name is required").max(100,"Full name is too long")}),login:p.object({action:p.literal("login"),email:p.string().min(1,"Email is required").email("Please enter a valid email address"),password:p.string().min(8,"Password must be at least 8 characters")}),logout:p.object({action:p.literal("logout")}),action:p.discriminatedUnion("action",[p.object({action:p.literal("register")}).merge(p.object({email:p.string().min(1,"Email is required").email("Please enter a valid email address"),username:p.string().min(3,"Username must be at least 3 characters").max(30,"Username must be less than 30 characters"),password:p.string().min(8,"Password must be at least 8 characters"),full_name:p.string().min(2,"Full name is required").max(100,"Full name is too long")})),p.object({action:p.literal("login")}).merge(p.object({email:p.string().min(1,"Email is required").email("Please enter a valid email address"),password:p.string().min(8,"Password must be at least 8 characters")})),p.object({action:p.literal("logout")})])},contact:p.object({name:p.string().min(2,"Name must be at least 2 characters").max(100,"Name is too long"),email:p.string().email("Please enter a valid email address"),message:p.string().min(10,"Message must be at least 10 characters").max(1000,"Message is too long")}),email:p.string().min(1,"Email is required").email("Please enter a valid email address"),password:p.string().min(8,"Password must be at least 8 characters").regex(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)/,"Password must contain uppercase, lowercase, and number"),phone:p.string().regex(/^[\+]?[1-9][\d]{0,15}$/,"Please enter a valid phone number"),url:p.string().min(1,"URL is required").url("Please enter a valid URL"),required:p.string().min(1,"This field is required"),positiveNumber:p.number().positive("Must be a positive number"),integer:p.number().int("Must be a whole number"),futureDate:p.date().min(new Date,"Date must be in the future"),imageFile:p.instanceof(File).refine((t)=>t.size<=5242880,"File size must be less than 5MB").refine((t)=>["image/jpeg","image/png","image/gif","image/webp"].includes(t.type),"File must be a JPEG, PNG, GIF, or WebP image"),userProfile:p.object({full_name:p.string().min(2,"Full name must be at least 2 characters").max(100,"Full name is too long").optional(),bio:p.string().max(500,"Bio must be less than 500 characters").nullable().optional(),avatar_url:p.string().url("Please enter a valid URL").nullable().optional(),theme:p.enum(["africanity","dark","light","system"]).optional(),language:p.string().min(2).max(10).optional()}),project:p.object({name:p.string().min(1,"Project name is required").max(100,"Project name is too long"),description:p.string().max(1000,"Description is too long").nullable().optional(),repository_url:p.string().url("Please enter a valid repository URL").nullable().optional(),demo_url:p.string().url("Please enter a valid demo URL").nullable().optional(),tags:p.array(p.string()).optional(),is_public:p.boolean().optional()})};V={required:(t="This field is required")=>p.string().min(1,t),email:(t="Please enter a valid email address")=>p.string().email(t),minLength:(t,n)=>p.string().min(t,n||`Must be at least ${t} characters`),maxLength:(t,n)=>p.string().max(t,n||`Must be less than ${t} characters`),pattern:(t,n)=>p.string().regex(t,n),numeric:(t="Must be a number")=>p.string().regex(/^\d+$/,t),phone:(t="Please enter a valid phone number")=>p.string().regex(/^[\+]?[1-9][\d]{0,15}$/,t),url:(t="Please enter a valid URL")=>p.string().min(1,"URL is required").url(t)}});var ha={};u(ha,{default:()=>gi,AfriInput:()=>$n});var $n,gi;var ga=s(()=>{v();Go();$n=class $n extends b{static get observedAttributes(){return["type","name","label","placeholder","error","helper","theme","icon","required","aria-label","aria-describedby","validation"]}constructor(){super();this._uniqueId=Math.random().toString(36).substr(2,9),this.render()}get value(){return this.shadowRoot.querySelector("input")?.value||""}set value(t){let n=this.shadowRoot.querySelector("input");if(n)n.value=t}connectedCallback(){this._attachInputListeners(),this.loadStyles()}attributeChangedCallback(){this.render(),this._attachInputListeners()}_attachInputListeners(){let t=this.shadowRoot.querySelector("input");if(!t)return;t.addEventListener("input",(n)=>{if(this.emit("af-input",{value:n.target.value}),this.hasAttribute("error"))this.removeAttribute("error")}),t.addEventListener("blur",()=>{this.emit("af-blur",{value:this.value}),this._validateInput()})}_setupValidation(){if(!this.getAttribute("validation"))return;let n=this.shadowRoot.querySelector("input");if(!n)return;n.addEventListener("input",()=>{if(this.hasAttribute("error"))this.removeAttribute("error")})}_validateInput(){let t=this.shadowRoot.querySelector("input");if(!t)return;let n=this.getAttribute("validation"),r=t.value;if(this.hasAttribute("required")&&!r.trim()){this.setAttribute("error","This field is required");return}if(n&&r.trim()){let a=this._getValidationSchema(n);if(a){let e=tn.validateField(a,r);if(!e.success)this.setAttribute("error",e.error);else this.removeAttribute("error")}}}_getValidationSchema(t){let n={email:V.email(),password:V.password(),phone:V.phone(),url:V.url(),required:V.required()};if(t.includes(":")){let[r,o]=t.split(":"),a=parseInt(o);switch(r){case"minLength":return V.minLength(a);case"maxLength":return V.maxLength(a);case"pattern":return V.pattern(new RegExp(o),"Invalid format")}}return n[t]||null}attributeChangedCallback(){this.render()}render(){let t=this.getAttribute("type")||"text",n=this.getAttribute("name")||"",r=this.getAttribute("label")||"",o=this.getAttribute("placeholder")||"",a=this.getAttribute("error")||"",e=this.getAttribute("helper")||"",l=this.getAttribute("theme")||"tanzania",i=this.getAttribute("icon")||"",c=this.hasAttribute("required"),$=this.getAttribute("aria-label"),L=this.getAttribute("aria-describedby"),H={tanzania:{focus:"#1EB53A",error:"#DC3545"},maasai:{focus:"#FF0000",error:"#8B0000"},ndebele:{focus:"#4169E1",error:"#DC143C"}},M=H[l]||H.tanzania,X=[];if(a)X.push(`error-${this._uniqueId}`);else if(e)X.push(`helper-${this._uniqueId}`);if(L)X.push(...L.split(" "));let Un=X.length>0?`aria-describedby="${X.join(" ")}"`:"";this.shadowRoot.innerHTML=`
|
|
1560
1901
|
<style>
|
|
1561
1902
|
:host {
|
|
1562
1903
|
display: block;
|
|
@@ -1630,25 +1971,25 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
1630
1971
|
</style>
|
|
1631
1972
|
|
|
1632
1973
|
<div class="input-wrapper">
|
|
1633
|
-
${
|
|
1974
|
+
${r?`<label for="input-${this._uniqueId}">${r}${c?'<span class="required-star">*</span>':""}</label>`:""}
|
|
1634
1975
|
<div class="input-container">
|
|
1635
1976
|
${i?`<span class="icon">${i}</span>`:""}
|
|
1636
1977
|
<input
|
|
1637
1978
|
id="input-${this._uniqueId}"
|
|
1638
1979
|
name="${n}"
|
|
1639
1980
|
type="${t}"
|
|
1640
|
-
placeholder="${
|
|
1981
|
+
placeholder="${o}"
|
|
1641
1982
|
class="${a?"has-error":""}"
|
|
1642
1983
|
${c?"required":""}
|
|
1643
|
-
${
|
|
1984
|
+
${$?`aria-label="${$}"`:""}
|
|
1644
1985
|
${a?'aria-invalid="true"':""}
|
|
1645
|
-
${
|
|
1986
|
+
${Un}
|
|
1646
1987
|
/>
|
|
1647
1988
|
</div>
|
|
1648
1989
|
${a?`<div id="error-${this._uniqueId}" class="error-text" role="alert">${a}</div>`:""}
|
|
1649
1990
|
${e&&!a?`<div id="helper-${this._uniqueId}" class="helper-text">${e}</div>`:""}
|
|
1650
1991
|
</div>
|
|
1651
|
-
`}};
|
|
1992
|
+
`}};d("af-input",$n);gi=$n});var sa={};u(sa,{default:()=>si,AfriAlert:()=>wn});var wn,si;var ma=s(()=>{v();wn=class wn extends b{static get observedAttributes(){return["type","title","dismissible"]}constructor(){super();this.render()}connectedCallback(){this.shadowRoot.querySelector(".close-btn")?.addEventListener("click",()=>{this.remove(),this.emit("af-dismiss")})}attributeChangedCallback(){this.render()}render(){let t=this.getAttribute("type")||"info",n=this.getAttribute("title")||"",r=this.hasAttribute("dismissible"),o={success:{bg:"#d4edda",border:"#1EB53A",text:"#155724",icon:"✓"},warning:{bg:"#fff3cd",border:"#FCD116",text:"#856404",icon:"⚠"},error:{bg:"#f8d7da",border:"#DC3545",text:"#721c24",icon:"✕"},info:{bg:"#d1ecf1",border:"#00A3DD",text:"#0c5460",icon:"ℹ"}},a=o[t]||o.info;this.shadowRoot.innerHTML=`
|
|
1652
1993
|
<style>
|
|
1653
1994
|
:host {
|
|
1654
1995
|
display: block;
|
|
@@ -1726,36 +2067,36 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
1726
2067
|
${n?`<div class="title">${n}</div>`:""}
|
|
1727
2068
|
<slot></slot>
|
|
1728
2069
|
</div>
|
|
1729
|
-
${
|
|
2070
|
+
${r?'<button class="close-btn" aria-label="Dismiss">×</button>':""}
|
|
1730
2071
|
</div>
|
|
1731
|
-
`}};
|
|
2072
|
+
`}};d("af-alert",wn);si=wn});var pa={};u(pa,{AfriGrid:()=>Qo});function mi(t,n){let{sidebarSide:r="left",sidebarWidth:o="280px",minWidth:a="280px",gap:e="24px",columns:l,rows:i,align:c="stretch",justify:$="stretch",dense:L=!1}=n,H=L?"dense":"",M=`
|
|
1732
2073
|
align-items: ${c};
|
|
1733
|
-
justify-items: ${
|
|
2074
|
+
justify-items: ${$};
|
|
1734
2075
|
gap: ${e};
|
|
1735
|
-
`;switch(t){case"sidebar":return
|
|
2076
|
+
`;switch(t){case"sidebar":return r==="right"?`display: grid; grid-template-columns: 1fr ${o}; ${M}`:`display: grid; grid-template-columns: ${o} 1fr; ${M}`;case"holy-grail":return`
|
|
1736
2077
|
display: grid;
|
|
1737
|
-
grid-template-columns: ${
|
|
2078
|
+
grid-template-columns: ${o} 1fr ${o};
|
|
1738
2079
|
grid-template-rows: auto 1fr auto;
|
|
1739
2080
|
${M}
|
|
1740
2081
|
`;case"bento":return`
|
|
1741
2082
|
display: grid;
|
|
1742
2083
|
grid-template-columns: repeat(12, 1fr);
|
|
1743
2084
|
grid-auto-rows: minmax(120px, auto);
|
|
1744
|
-
grid-auto-flow: row ${
|
|
2085
|
+
grid-auto-flow: row ${H};
|
|
1745
2086
|
${M}
|
|
1746
2087
|
`;case"masonry":return`
|
|
1747
2088
|
display: grid;
|
|
1748
2089
|
grid-template-columns: repeat(auto-fill, minmax(${a}, 1fr));
|
|
1749
2090
|
grid-template-rows: masonry;
|
|
1750
|
-
grid-auto-flow: row ${
|
|
2091
|
+
grid-auto-flow: row ${H};
|
|
1751
2092
|
${M}
|
|
1752
|
-
`;case"auto":default:{let X=l?`repeat(${l}, 1fr)`:`repeat(auto-fit, minmax(${a}, 1fr))`,
|
|
2093
|
+
`;case"auto":default:{let X=l?`repeat(${l}, 1fr)`:`repeat(auto-fit, minmax(${a}, 1fr))`,Un=i?`repeat(${i}, 1fr)`:"auto";return`
|
|
1753
2094
|
display: grid;
|
|
1754
2095
|
grid-template-columns: ${X};
|
|
1755
|
-
${i?`grid-template-rows: ${
|
|
1756
|
-
grid-auto-flow: row ${
|
|
2096
|
+
${i?`grid-template-rows: ${Un};`:""}
|
|
2097
|
+
grid-auto-flow: row ${H};
|
|
1757
2098
|
${M}
|
|
1758
|
-
`}}}var
|
|
2099
|
+
`}}}var Qo;var va=s(()=>{v();Qo=class Qo extends b{static get observedAttributes(){return["min-width","gap","columns","rows","layout","align","justify","dense","sidebar-side","sidebar-width"]}attributeChangedCallback(){if(this.isConnected)this.render()}_getAttrs(){return{minWidth:this.getAttribute("min-width")||"280px",gap:this.getAttribute("gap")||"24px",columns:this.getAttribute("columns")||null,rows:this.getAttribute("rows")||null,layout:this.getAttribute("layout")||"auto",align:this.getAttribute("align")||"stretch",justify:this.getAttribute("justify")||"stretch",dense:this.hasAttribute("dense"),sidebarSide:this.getAttribute("sidebar-side")||"left",sidebarWidth:this.getAttribute("sidebar-width")||"280px"}}_buildResponsiveBreakpoints(t){if(t.layout!=="auto"&&t.layout!=="masonry")return"";return`
|
|
1759
2100
|
@media (max-width: 768px) {
|
|
1760
2101
|
.grid {
|
|
1761
2102
|
grid-template-columns: repeat(auto-fit, minmax(min(${t.minWidth}, 100%), 1fr));
|
|
@@ -1772,7 +2113,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
1772
2113
|
grid-template-columns: 1fr;
|
|
1773
2114
|
}
|
|
1774
2115
|
}
|
|
1775
|
-
`}render(){let t=this._getAttrs(),n=
|
|
2116
|
+
`}render(){let t=this._getAttrs(),n=mi(t.layout,t),r=this._buildResponsiveBreakpoints(t)+this._buildSidebarResponsive(t);this.shadowRoot.innerHTML=g`
|
|
1776
2117
|
<style>
|
|
1777
2118
|
:host {
|
|
1778
2119
|
display: block;
|
|
@@ -1791,7 +2132,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
1791
2132
|
min-width: 0; /* Prevent overflow in grid context */
|
|
1792
2133
|
}
|
|
1793
2134
|
|
|
1794
|
-
${
|
|
2135
|
+
${r}
|
|
1795
2136
|
</style>
|
|
1796
2137
|
|
|
1797
2138
|
<div
|
|
@@ -1802,7 +2143,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
1802
2143
|
>
|
|
1803
2144
|
<slot></slot>
|
|
1804
2145
|
</div>
|
|
1805
|
-
`}connectedCallback(){this.render(),this._setupResizeObserver()}disconnectedCallback(){if(this._resizeObserver)this._resizeObserver.disconnect()}_setupResizeObserver(){if(typeof ResizeObserver>"u")return;let t=this.offsetWidth;this._resizeObserver=new ResizeObserver((n)=>{for(let
|
|
2146
|
+
`}connectedCallback(){this.render(),this._setupResizeObserver()}disconnectedCallback(){if(this._resizeObserver)this._resizeObserver.disconnect()}_setupResizeObserver(){if(typeof ResizeObserver>"u")return;let t=this.offsetWidth;this._resizeObserver=new ResizeObserver((n)=>{for(let r of n){let o=r.contentRect.width;if(Math.abs(o-t)>10)t=o,this.emit("af-grid-resize",{width:o,height:r.contentRect.height,layout:this.getAttribute("layout")||"auto"})}}),this._resizeObserver.observe(this)}setLayout(t){this.setAttribute("layout",t)}setColumns(t){this.setAttribute("columns",String(t))}setDense(t){if(t)this.setAttribute("dense","");else this.removeAttribute("dense")}};d("af-grid",Qo)});var ua={};u(ua,{AfriSection:()=>Bo});var Bo;var $a=s(()=>{v();Bo=class Bo extends b{render(){let t=this.getAttribute("variant")||"default",n=this.getAttribute("title");this.shadowRoot.innerHTML=g`
|
|
1806
2147
|
<style>
|
|
1807
2148
|
:host { display: block; width: 100%; }
|
|
1808
2149
|
.section {
|
|
@@ -1836,13 +2177,13 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
1836
2177
|
`:""}
|
|
1837
2178
|
<slot></slot>
|
|
1838
2179
|
</section>
|
|
1839
|
-
`}connectedCallback(){this.render()}};
|
|
2180
|
+
`}connectedCallback(){this.render()}};d("af-section",Bo)});var wa={};u(wa,{default:()=>pi,AfriIcon:()=>xn});var xn,pi;var xa=s(()=>{v();xn=class xn extends b{static get observedAttributes(){return["name","size"]}connectedCallback(){this.render()}render(){let t=this.getAttribute("name")||"circle",n=this.getAttribute("size")||"24",o={check:'<path d="M20 6L9 17l-5-5" />',x:'<path d="M18 6L6 18M6 6l12 12" />',"arrow-right":'<path d="M5 12h14M12 5l7 7-7 7" />',menu:'<path d="M3 12h18M3 6h18M3 18h18" />',search:'<circle cx="11" cy="11" r="8" /><path d="M21 21l-4.35-4.35" />'}[t]||"";this.shadowRoot.innerHTML=`
|
|
1840
2181
|
<style>
|
|
1841
2182
|
:host { display: inline-flex; vertical-align: middle; }
|
|
1842
2183
|
svg { width: ${n}px; height: ${n}px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
|
|
1843
2184
|
</style>
|
|
1844
|
-
<svg viewBox="0 0 24 24">${
|
|
1845
|
-
`}};
|
|
2185
|
+
<svg viewBox="0 0 24 24">${o}</svg>
|
|
2186
|
+
`}};d("af-icon",xn);pi=xn});var Aa={};u(Aa,{default:()=>vi,AfriAccordion:()=>An});var An,vi;var _a=s(()=>{v();An=class An extends b{static get observedAttributes(){return["theme","multiple"]}constructor(){super();this._openItems=new Set,this._uniqueId=Math.random().toString(36).substr(2,9),this.render()}connectedCallback(){this._setupAccordion()}_setupAccordion(){this.shadowRoot.querySelectorAll(".accordion-header").forEach((n,r)=>{n.addEventListener("click",()=>{this._toggleItem(r)})})}_toggleItem(t){let n=this.hasAttribute("multiple");if(this._openItems.has(t))this._openItems.delete(t);else{if(!n)this._openItems.clear();this._openItems.add(t)}this.render(),this._setupAccordion(),this.emit("af-toggle",{index:t,open:this._openItems.has(t)})}attributeChangedCallback(){this.render(),this._setupAccordion()}render(){let t=this.getAttribute("theme")||"tanzania",n=this.querySelector('[slot="items"]'),r=n?Array.from(n.children):[],o={tanzania:{accent:"#1EB53A"},maasai:{accent:"#FF0000"},ndebele:{accent:"#4169E1"}},a=o[t]||o.tanzania;this.shadowRoot.innerHTML=`
|
|
1846
2187
|
<style>
|
|
1847
2188
|
:host {
|
|
1848
2189
|
display: block;
|
|
@@ -1920,12 +2261,12 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
1920
2261
|
</style>
|
|
1921
2262
|
|
|
1922
2263
|
<div class="accordion">
|
|
1923
|
-
${
|
|
2264
|
+
${r.map((e,l)=>{let i=this._openItems.has(l),c=`accordion-header-${this._uniqueId}-${l}`,$=`accordion-panel-${this._uniqueId}-${l}`;return`
|
|
1924
2265
|
<div class="accordion-item">
|
|
1925
2266
|
<button
|
|
1926
2267
|
class="accordion-header ${i?"active":""}"
|
|
1927
2268
|
aria-expanded="${i}"
|
|
1928
|
-
aria-controls="${
|
|
2269
|
+
aria-controls="${$}"
|
|
1929
2270
|
id="${c}"
|
|
1930
2271
|
>
|
|
1931
2272
|
<span>${e.getAttribute("title")||`Item ${l+1}`}</span>
|
|
@@ -1933,7 +2274,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
1933
2274
|
</button>
|
|
1934
2275
|
<div
|
|
1935
2276
|
class="accordion-content ${i?"open":""}"
|
|
1936
|
-
id="${
|
|
2277
|
+
id="${$}"
|
|
1937
2278
|
role="region"
|
|
1938
2279
|
aria-labelledby="${c}"
|
|
1939
2280
|
>
|
|
@@ -1945,7 +2286,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
1945
2286
|
`}).join("")}
|
|
1946
2287
|
</div>
|
|
1947
2288
|
<slot name="items"></slot>
|
|
1948
|
-
`}};
|
|
2289
|
+
`}};d("af-accordion",An);vi=An});var ka={};u(ka,{default:()=>ui,AfriHero:()=>_n});var _n,ui;var qa=s(()=>{v();fn();Nt();_n=class _n extends b{static get observedAttributes(){return["title","subtitle","pattern","overlay"]}connectedCallback(){super.connectedCallback(),this.render(),this.loadStyles()}render(){let t=this.getAttribute("title")||"AfriCode",n=this.getAttribute("subtitle")||"",r=this.getAttribute("pattern")||"",o=this.getAttribute("variant")||"default";this.shadowRoot.innerHTML=`
|
|
1949
2290
|
<style>
|
|
1950
2291
|
:host {
|
|
1951
2292
|
display: flex;
|
|
@@ -2013,11 +2354,11 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
2013
2354
|
z-index: 2;
|
|
2014
2355
|
}
|
|
2015
2356
|
|
|
2016
|
-
${
|
|
2357
|
+
${r?`
|
|
2017
2358
|
.pattern-bg {
|
|
2018
2359
|
position: absolute;
|
|
2019
2360
|
inset: 0;
|
|
2020
|
-
background-image: url('${
|
|
2361
|
+
background-image: url('${r}');
|
|
2021
2362
|
background-size: cover;
|
|
2022
2363
|
background-position: center;
|
|
2023
2364
|
opacity: 0.15;
|
|
@@ -2035,7 +2376,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
2035
2376
|
|
|
2036
2377
|
<div class="aura"></div>
|
|
2037
2378
|
<div class="mesh"></div>
|
|
2038
|
-
${
|
|
2379
|
+
${r?'<div class="pattern-bg"></div>':""}
|
|
2039
2380
|
|
|
2040
2381
|
<div class="content">
|
|
2041
2382
|
<h1>${t}</h1>
|
|
@@ -2045,7 +2386,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
2045
2386
|
</div>
|
|
2046
2387
|
<slot></slot>
|
|
2047
2388
|
</div>
|
|
2048
|
-
`}};
|
|
2389
|
+
`}};d("af-hero",_n);ui=_n});var La={};u(La,{default:()=>$i,AfriTable:()=>kn});var kn,$i;var Ea=s(()=>{v();kn=class kn extends b{static get observedAttributes(){return["theme","striped","hoverable"]}constructor(){super();this._columns=[],this._data=[],this._sortColumn=null,this._sortDirection="asc",this.render()}set columns(t){this._columns=t,this.render()}set data(t){this._data=t,this.render()}attributeChangedCallback(){this.render()}_handleSort(t){if(this._sortColumn===t)this._sortDirection=this._sortDirection==="asc"?"desc":"asc";else this._sortColumn=t,this._sortDirection="asc";this.emit("af-sort",{column:t,direction:this._sortDirection}),this.render()}_getSortedData(){if(!this._sortColumn)return this._data;return[...this._data].sort((t,n)=>{let r=t[this._sortColumn],o=n[this._sortColumn],a=this._sortDirection==="asc"?1:-1;if(typeof r==="number")return(r-o)*a;return String(r).localeCompare(String(o))*a})}render(){let t=this.getAttribute("theme")||"tanzania",n=this.hasAttribute("striped"),r=this.hasAttribute("hoverable"),o={tanzania:{header:"#1EB53A",text:"#FFFFFF",accent:"#FCD116"},maasai:{header:"#8B0000",text:"#FFFFFF",accent:"#FF0000"},ndebele:{header:"#4169E1",text:"#FFFFFF",accent:"#FFD700"}},a=o[t]||o.tanzania,e=this._getSortedData();this.shadowRoot.innerHTML=`
|
|
2049
2390
|
<style>
|
|
2050
2391
|
:host {
|
|
2051
2392
|
display: block;
|
|
@@ -2095,7 +2436,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
2095
2436
|
}
|
|
2096
2437
|
`:""}
|
|
2097
2438
|
|
|
2098
|
-
${
|
|
2439
|
+
${r?`
|
|
2099
2440
|
tbody tr:hover {
|
|
2100
2441
|
background: ${a.accent}20;
|
|
2101
2442
|
}
|
|
@@ -2135,7 +2476,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
2135
2476
|
</tbody>
|
|
2136
2477
|
</table>
|
|
2137
2478
|
</div>
|
|
2138
|
-
`,this.shadowRoot.querySelectorAll("th").forEach((l)=>{l.addEventListener("click",()=>{this._handleSort(l.dataset.column)})})}};
|
|
2479
|
+
`,this.shadowRoot.querySelectorAll("th").forEach((l)=>{l.addEventListener("click",()=>{this._handleSort(l.dataset.column)})})}};d("af-table",kn);$i=kn});var Ma={};u(Ma,{default:()=>wi,AfriModal:()=>qn});var qn,wi;var Ha=s(()=>{v();qn=class qn extends b{static get observedAttributes(){return["open","theme","size","aria-label","aria-labelledby"]}constructor(){super();this.render()}connectedCallback(){this._setupListeners()}_setupListeners(){this.shadowRoot.querySelector(".backdrop")?.addEventListener("click",(t)=>{if(t.target.classList.contains("backdrop"))this.close()}),this.shadowRoot.querySelector(".close-btn")?.addEventListener("click",()=>{this.close()}),document.addEventListener("keydown",(t)=>{if(t.key==="Escape"&&this.hasAttribute("open"))this.close()}),this.shadowRoot.addEventListener("keydown",(t)=>{if(t.key==="Tab"&&this.hasAttribute("open"))this._handleTabKey(t)})}_getFocusableElements(){let t=this.shadowRoot.querySelector(".modal"),n='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])',r=Array.from(t?.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')||[]),o=Array.from(this.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'));return[...r,...o]}_focusFirstFocusableElement(){let t=this._getFocusableElements();if(t.length>0)t[0].focus();else this.shadowRoot.querySelector(".close-btn")?.focus()}_handleTabKey(t){let n=this._getFocusableElements();if(n.length===0){t.preventDefault();return}let r=n[0],o=n[n.length-1];if(t.shiftKey){if(document.activeElement===r)t.preventDefault(),o.focus()}else if(document.activeElement===o)t.preventDefault(),r.focus()}open(){this.setAttribute("open",""),document.body.style.overflow="hidden",this._previousFocus=document.activeElement,this._focusFirstFocusableElement(),this.emit("af-open")}close(){if(this.removeAttribute("open"),document.body.style.overflow="",this._previousFocus&&this._previousFocus.focus)this._previousFocus.focus();this.emit("af-close")}attributeChangedCallback(t,n,r){if(this.render(),t==="open")this._setupListeners()}render(){let t=this.hasAttribute("open"),n=this.getAttribute("theme")||"tanzania",r=this.getAttribute("size")||"md",o={tanzania:{accent:"#1EB53A"},maasai:{accent:"#FF0000"},ndebele:{accent:"#4169E1"}},a=o[n]||o.tanzania,e={sm:"400px",md:"560px",lg:"720px",full:"95vw"},l=this.getAttribute("aria-label"),i=this.getAttribute("aria-labelledby")||"modal-title";this.shadowRoot.innerHTML=`
|
|
2139
2480
|
<style>
|
|
2140
2481
|
:host {
|
|
2141
2482
|
font-family: 'Inter', system-ui, sans-serif;
|
|
@@ -2162,7 +2503,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
2162
2503
|
background: white;
|
|
2163
2504
|
border-radius: 8px;
|
|
2164
2505
|
width: 100%;
|
|
2165
|
-
max-width: ${e[
|
|
2506
|
+
max-width: ${e[r]||e.md};
|
|
2166
2507
|
max-height: 90vh;
|
|
2167
2508
|
overflow: hidden;
|
|
2168
2509
|
display: flex;
|
|
@@ -2239,7 +2580,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
2239
2580
|
</div>
|
|
2240
2581
|
</div>
|
|
2241
2582
|
</div>
|
|
2242
|
-
`}};
|
|
2583
|
+
`}};d("af-modal",qn);wi=qn});var Sa={};u(Sa,{default:()=>xi,AfriTabs:()=>Ln});var Ln,xi;var Ra=s(()=>{v();Ln=class Ln extends b{static get observedAttributes(){return["theme"]}constructor(){super();this._activeTab=0,this.render()}connectedCallback(){this._setupTabs(),this.addEventListener("keydown",this._handleKeydown.bind(this))}_handleKeydown(t){let n=this.querySelector('[slot="tabs"]'),r=n?Array.from(n.children):[];if(r.length===0)return;switch(t.key){case"ArrowLeft":t.preventDefault(),this._activeTab=this._activeTab>0?this._activeTab-1:r.length-1,this.render(),this._setupTabs(),this._focusActiveTab();break;case"ArrowRight":t.preventDefault(),this._activeTab=this._activeTab<r.length-1?this._activeTab+1:0,this.render(),this._setupTabs(),this._focusActiveTab();break;case"Home":t.preventDefault(),this._activeTab=0,this.render(),this._setupTabs(),this._focusActiveTab();break;case"End":t.preventDefault(),this._activeTab=r.length-1,this.render(),this._setupTabs(),this._focusActiveTab();break}}_focusActiveTab(){let t=this.shadowRoot.querySelectorAll(".tab-button");if(t[this._activeTab])t[this._activeTab].focus()}_setupTabs(){this.shadowRoot.querySelectorAll(".tab-button").forEach((n,r)=>{n.addEventListener("click",()=>{this._activeTab=r,this.render(),this._setupTabs(),this.emit("af-tab-change",{index:r,tab:n.textContent})})})}attributeChangedCallback(){this.render(),this._setupTabs()}render(){let t=this.getAttribute("theme")||"tanzania",n=this.querySelector('[slot="tabs"]'),r=n?Array.from(n.children):[],o={tanzania:{active:"#1EB53A",text:"#FFFFFF"},maasai:{active:"#FF0000",text:"#FFFFFF"},ndebele:{active:"#4169E1",text:"#FFFFFF"}},a=o[t]||o.tanzania;this.shadowRoot.innerHTML=`
|
|
2243
2584
|
<style>
|
|
2244
2585
|
:host {
|
|
2245
2586
|
display: block;
|
|
@@ -2311,7 +2652,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
2311
2652
|
|
|
2312
2653
|
<div class="tabs-container">
|
|
2313
2654
|
<div class="tab-list" role="tablist">
|
|
2314
|
-
${
|
|
2655
|
+
${r.map((e,l)=>`
|
|
2315
2656
|
<button class="tab-button ${l===this._activeTab?"active":""}"
|
|
2316
2657
|
role="tab"
|
|
2317
2658
|
aria-selected="${l===this._activeTab}"
|
|
@@ -2323,7 +2664,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
2323
2664
|
`).join("")}
|
|
2324
2665
|
</div>
|
|
2325
2666
|
<div class="tab-panels">
|
|
2326
|
-
${
|
|
2667
|
+
${r.map((e,l)=>`
|
|
2327
2668
|
<div class="tab-panel ${l===this._activeTab?"active":""}"
|
|
2328
2669
|
role="tabpanel"
|
|
2329
2670
|
id="panel-${l}"
|
|
@@ -2334,7 +2675,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
2334
2675
|
</div>
|
|
2335
2676
|
</div>
|
|
2336
2677
|
<slot name="tabs"></slot>
|
|
2337
|
-
`}};
|
|
2678
|
+
`}};d("af-tabs",Ln);xi=Ln});var Ya={};u(Ya,{default:()=>Ai,AfriSidebar:()=>En});var En,Ai;var Xa=s(()=>{v();fn();Nt();En=class En extends b{static get observedAttributes(){return["position"]}constructor(){super();this._unsubscribe=null}connectedCallback(){super.connectedCallback(),this._unsubscribe=cn(()=>{this.updateUI()}),this.render()}disconnectedCallback(){if(this._unsubscribe)this._unsubscribe()}updateUI(){let t=Vt.ui.sidebarCollapsed,n=this.shadowRoot.querySelector(".sidebar"),r=this.shadowRoot.querySelector(".sidebar-title"),o=this.shadowRoot.getElementById("toggle"),a=this.shadowRoot.querySelector(".sidebar-content");if(n)n.style.width=t?"60px":"260px";if(r)r.style.opacity=t?"0":"1";if(a)a.style.padding=t?"12px":"20px";if(o)o.innerHTML=t?"→":"← Collapse"}render(){let t=this.getAttribute("position")||"left",n=Vt.ui.sidebarCollapsed;this.shadowRoot.innerHTML=`
|
|
2338
2679
|
<style>
|
|
2339
2680
|
:host {
|
|
2340
2681
|
display: block;
|
|
@@ -2443,7 +2784,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
2443
2784
|
</button>
|
|
2444
2785
|
</div>
|
|
2445
2786
|
</aside>
|
|
2446
|
-
`,this.shadowRoot.getElementById("toggle").addEventListener("click",()=>{actions.toggleSidebar()})}};
|
|
2787
|
+
`,this.shadowRoot.getElementById("toggle").addEventListener("click",()=>{actions.toggleSidebar()})}};d("af-sidebar",En);Ai=En});var Fa={};u(Fa,{default:()=>_i,AfriDropdown:()=>Mn});var Mn,_i;var Ja=s(()=>{v();Mn=class Mn extends b{static get observedAttributes(){return["label","open"]}constructor(){super();this._open=!1,this.render()}toggle(){if(this._open=!this._open,this._open)this.setAttribute("open","");else this.removeAttribute("open");this.render()}close(){this._open=!1,this.removeAttribute("open"),this.render()}connectedCallback(){document.addEventListener("click",(t)=>{if(!this.contains(t.target))this.close()}),this.addEventListener("keydown",this._handleKeydown.bind(this))}_handleKeydown(t){let n=this.shadowRoot.getElementById("trigger");switch(t.key){case"Enter":case" ":t.preventDefault(),this.toggle();break;case"Escape":if(this._open)t.preventDefault(),this.close(),n.focus();break;case"ArrowDown":if(!this._open)t.preventDefault(),this.toggle();break}}render(){let t=this.getAttribute("label")||"Menu",n=this.hasAttribute("open");this.shadowRoot.innerHTML=`
|
|
2447
2788
|
<style>
|
|
2448
2789
|
:host {
|
|
2449
2790
|
display: inline-block;
|
|
@@ -2525,7 +2866,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
2525
2866
|
<div class="dropdown-menu" role="menu" ${n?"":'aria-hidden="true"'}>
|
|
2526
2867
|
<slot></slot>
|
|
2527
2868
|
</div>
|
|
2528
|
-
`,this.shadowRoot.getElementById("trigger").addEventListener("click",(
|
|
2869
|
+
`,this.shadowRoot.getElementById("trigger").addEventListener("click",(r)=>{r.stopPropagation(),this.toggle()})}};d("af-dropdown",Mn);_i=Mn});var Ga={};u(Ga,{default:()=>ki,AfriSelect:()=>Hn});var Hn,ki;var Qa=s(()=>{v();Hn=class Hn extends b{static get observedAttributes(){return["label","placeholder","theme","error","required","aria-label","aria-describedby"]}constructor(){super();this._uniqueId=Math.random().toString(36).substr(2,9),this._isOpen=!1,this._selectedIndex=-1,this._options=[],this.render()}get value(){return this._selectedIndex>=0?this._options[this._selectedIndex]?.value:""}connectedCallback(){this._options=Array.from(this.querySelectorAll("option")).map((t)=>({value:t.value,label:t.textContent})),this.render(),this._setupListeners()}_setupListeners(){let t=this.shadowRoot.querySelector(".select-trigger"),n=this.shadowRoot.querySelector(".select-dropdown");t?.addEventListener("click",()=>{this._toggleDropdown()}),t?.addEventListener("keydown",(r)=>{this._handleKeydown(r)}),this.shadowRoot.querySelectorAll(".select-option").forEach((r,o)=>{r.addEventListener("click",()=>{this._selectOption(o)})}),document.addEventListener("click",(r)=>{if(!this.contains(r.target)&&this._isOpen)this._closeDropdown()})}_toggleDropdown(){this._isOpen=!this._isOpen;let t=this.shadowRoot.querySelector(".select-trigger"),n=this.shadowRoot.querySelector(".select-dropdown");if(n?.classList.toggle("open",this._isOpen),t?.classList.toggle("open",this._isOpen),this._isOpen)t?.setAttribute("aria-expanded","true"),n?.setAttribute("aria-hidden","false");else t?.setAttribute("aria-expanded","false"),n?.setAttribute("aria-hidden","true")}_closeDropdown(){this._isOpen=!1;let t=this.shadowRoot.querySelector(".select-trigger"),n=this.shadowRoot.querySelector(".select-dropdown");n?.classList.remove("open"),t?.classList.remove("open"),t?.setAttribute("aria-expanded","false"),n?.setAttribute("aria-hidden","true")}_selectOption(t){this._selectedIndex=t,this._closeDropdown(),this.render(),this._setupListeners(),this.emit("af-change",{value:this.value,label:this._options[t].label})}_handleKeydown(t){let n=this.shadowRoot.querySelector(".select-trigger");switch(t.key){case"Enter":case" ":t.preventDefault(),this._toggleDropdown();break;case"Escape":if(this._isOpen)t.preventDefault(),this._closeDropdown(),n.focus();break;case"ArrowDown":if(!this._isOpen)t.preventDefault(),this._toggleDropdown();else t.preventDefault(),this._navigateOptions(1);break;case"ArrowUp":if(this._isOpen)t.preventDefault(),this._navigateOptions(-1);break}}_navigateOptions(t){let n=this.shadowRoot.querySelectorAll(".select-option");if(n.length===0)return;let r=this._selectedIndex+t;if(r<0)r=n.length-1;if(r>=n.length)r=0;this._selectedIndex=r,this.render(),this._setupListeners(),this.shadowRoot.querySelector(".select-option.selected")?.scrollIntoView({block:"nearest"})}attributeChangedCallback(){this.render(),this._setupListeners()}render(){let t=this.getAttribute("label")||"",n=this.getAttribute("placeholder")||"Select an option",r=this.getAttribute("theme")||"tanzania",o=this.getAttribute("error")||"",a=this.hasAttribute("required"),e=this.getAttribute("aria-label"),l=this.getAttribute("aria-describedby"),i={tanzania:{focus:"#1EB53A",error:"#DC3545"},maasai:{focus:"#FF0000",error:"#8B0000"},ndebele:{focus:"#4169E1",error:"#DC143C"}},c=i[r]||i.tanzania,$=[];if(o)$.push(`error-${this._uniqueId}`);if(l)$.push(...l.split(" "));let L=$.length>0?`aria-describedby="${$.join(" ")}"`:"",H=this._selectedIndex>=0?this._options[this._selectedIndex]?.label:n;this.shadowRoot.innerHTML=`
|
|
2529
2870
|
<style>
|
|
2530
2871
|
:host {
|
|
2531
2872
|
display: block;
|
|
@@ -2554,7 +2895,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
2554
2895
|
width: 100%;
|
|
2555
2896
|
padding: 10px 40px 10px 13px;
|
|
2556
2897
|
font-size: 15px;
|
|
2557
|
-
border: 2px solid ${
|
|
2898
|
+
border: 2px solid ${o?c.error:"#ddd"};
|
|
2558
2899
|
border-radius: 5px;
|
|
2559
2900
|
background: white;
|
|
2560
2901
|
cursor: pointer;
|
|
@@ -2567,8 +2908,8 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
2567
2908
|
.select-trigger:focus,
|
|
2568
2909
|
.select-trigger.open {
|
|
2569
2910
|
outline: none;
|
|
2570
|
-
border-color: ${
|
|
2571
|
-
box-shadow: 0 0 0 3px ${
|
|
2911
|
+
border-color: ${o?c.error:c.focus};
|
|
2912
|
+
box-shadow: 0 0 0 3px ${o?c.error+"20":c.focus+"20"};
|
|
2572
2913
|
}
|
|
2573
2914
|
|
|
2574
2915
|
.select-arrow {
|
|
@@ -2641,9 +2982,9 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
2641
2982
|
aria-expanded="${this._isOpen}"
|
|
2642
2983
|
aria-haspopup="listbox"
|
|
2643
2984
|
${e?`aria-label="${e}"`:""}
|
|
2644
|
-
${
|
|
2645
|
-
${
|
|
2646
|
-
${
|
|
2985
|
+
${o?'aria-invalid="true"':""}
|
|
2986
|
+
${L}>
|
|
2987
|
+
${H}
|
|
2647
2988
|
</button>
|
|
2648
2989
|
<span class="select-arrow" aria-hidden="true">▼</span>
|
|
2649
2990
|
<div class="select-dropdown ${this._isOpen?"open":""}"
|
|
@@ -2659,9 +3000,9 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
2659
3000
|
`).join("")}
|
|
2660
3001
|
</div>
|
|
2661
3002
|
</div>
|
|
2662
|
-
${
|
|
3003
|
+
${o?`<div id="error-${this._uniqueId}" class="error-text" role="alert">${o}</div>`:""}
|
|
2663
3004
|
<slot></slot>
|
|
2664
|
-
`}};
|
|
3005
|
+
`}};d("af-select",Hn);ki=Hn});var Ba={};u(Ba,{default:()=>qi,AfriForm:()=>Sn});var Sn,qi;var Da=s(()=>{v();Go();Sn=class Sn extends b{static get observedAttributes(){return["action","method","error","success","schema"]}constructor(){super();this.handleSubmit=this.handleSubmit.bind(this)}connectedCallback(){this.render(),this.shadowRoot.querySelector("form").addEventListener("submit",this.handleSubmit),this.loadStyles()}async handleSubmit(t){t.preventDefault();let n=t.target,r=this.querySelector('[type="submit"]')||this.shadowRoot.querySelector('button[type="submit"]'),o=this.getAttribute("schema"),a=o?this._getSchema(o):null,e=this.getAttribute("action"),l=this.getAttribute("method")||"GET",i=new FormData(n),c=Object.fromEntries(i.entries());if(Array.from(this.querySelectorAll("af-input")).forEach((L)=>{let H=L.getAttribute("name");if(H)c[H]=L.value}),a){let L=tn.validate(a,c);if(!L.success){this._showValidationErrors(L.errors),this.emit("af-validation-error",{errors:L.errors});return}}if(!e)return;if(r){var $=r.textContent;r.textContent="Wait...",r.disabled=!0}try{let L=await fetch(e,{method:l,headers:{"Content-Type":"application/json"},body:JSON.stringify(c)});if(L.ok)this.emit("success",await L.json()),this.setAttribute("success","Form submitted successfully!"),this.removeAttribute("error");else{let H=await L.text();this.emit("error",H),this.setAttribute("error",H),this.removeAttribute("success")}}catch(L){this.emit("error",L.message),this.setAttribute("error",L.message),this.removeAttribute("success")}finally{if(r)r.textContent=$,r.disabled=!1}}_getSchema(t){return fa[t]||null}_showValidationErrors(t){this.shadowRoot.querySelectorAll(".field-error").forEach((n)=>n.remove()),Object.entries(t).forEach(([n,r])=>{let o=this.querySelector(`[name="${n}"]`);if(o)if(o.tagName==="AF-INPUT")o.setAttribute("error",r);else{let a=document.createElement("div");a.className="field-error",a.textContent=r,a.style.color="red",a.style.fontSize="12px",a.style.marginTop="4px",o.parentNode.insertBefore(a,o.nextSibling)}})}};d("af-form",Sn);qi=Sn});var Oa={};u(Oa,{default:()=>Li,AfriTooltip:()=>Rn});var Rn,Li;var Wa=s(()=>{v();Rn=class Rn extends b{static get observedAttributes(){return["text","position"]}constructor(){super();this._tooltipId=`af-tooltip-${Math.random().toString(36).substr(2,9)}`,this.render()}connectedCallback(){this._setupTooltipListeners()}attributeChangedCallback(){this.render(),this._setupTooltipListeners()}_setupTooltipListeners(){let t=this.shadowRoot.querySelector(".tooltip-trigger"),n=this.shadowRoot.querySelector(".tooltip-content");if(!t||!n)return;t.addEventListener("focus",()=>{n.style.opacity="1",n.style.visibility="visible",n.setAttribute("aria-hidden","false")}),t.addEventListener("blur",()=>{n.style.opacity="0",n.style.visibility="hidden",n.setAttribute("aria-hidden","true")}),t.addEventListener("mouseenter",()=>{n.style.opacity="1",n.style.visibility="visible",n.setAttribute("aria-hidden","false")}),t.addEventListener("mouseleave",()=>{n.style.opacity="0",n.style.visibility="hidden",n.setAttribute("aria-hidden","true")})}render(){let t=this.getAttribute("text")||"Tooltip",n=this.getAttribute("position")||"top",r={top:`
|
|
2665
3006
|
bottom: 100%;
|
|
2666
3007
|
left: 50%;
|
|
2667
3008
|
transform: translateX(-50%) translateY(-8px);
|
|
@@ -2692,7 +3033,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
2692
3033
|
|
|
2693
3034
|
.tooltip-content {
|
|
2694
3035
|
position: absolute;
|
|
2695
|
-
${
|
|
3036
|
+
${r[n]}
|
|
2696
3037
|
padding: 8px 12px;
|
|
2697
3038
|
background: #1e1e1e;
|
|
2698
3039
|
border: 1px solid #2a2a2a;
|
|
@@ -2750,7 +3091,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
2750
3091
|
<slot></slot>
|
|
2751
3092
|
</span>
|
|
2752
3093
|
<div class="tooltip-content" id="${this._tooltipId}" role="tooltip" aria-hidden="true">${t}</div>
|
|
2753
|
-
`}};
|
|
3094
|
+
`}};d("af-tooltip",Rn);Li=Rn});var ya={};u(ya,{default:()=>Ei,AfriToast:()=>Yn});var Yn,Ei;var Ua=s(()=>{v();Yn=class Yn extends b{static get observedAttributes(){return["type","message","duration"]}constructor(){super();this.render()}show(t,n="info",r=4000){if(this.setAttribute("message",t),this.setAttribute("type",n),this.render(),this.shadowRoot.querySelector(".toast").classList.add("show"),r>0)setTimeout(()=>this.hide(),r)}hide(){this.shadowRoot.querySelector(".toast").classList.remove("show"),setTimeout(()=>this.emit("af-toast-close"),300)}render(){let t=this.getAttribute("type")||"info",n=this.getAttribute("message")||"",r={success:"✓",error:"✗",warning:"⚠",info:"ℹ"},o={success:"#1EB53A",error:"#EF3340",warning:"#FCD116",info:"#00A3DD"};this.shadowRoot.innerHTML=`
|
|
2754
3095
|
<style>
|
|
2755
3096
|
:host {
|
|
2756
3097
|
position: fixed;
|
|
@@ -2767,7 +3108,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
2767
3108
|
padding: 16px 20px;
|
|
2768
3109
|
background: #121212;
|
|
2769
3110
|
border: 1px solid #1e1e1e;
|
|
2770
|
-
border-left: 4px solid ${
|
|
3111
|
+
border-left: 4px solid ${o[t]};
|
|
2771
3112
|
border-radius: 8px;
|
|
2772
3113
|
box-shadow: 0 10px 40px rgba(0,0,0,0.5);
|
|
2773
3114
|
transform: translateX(120%);
|
|
@@ -2784,8 +3125,8 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
2784
3125
|
width: 28px;
|
|
2785
3126
|
height: 28px;
|
|
2786
3127
|
border-radius: 50%;
|
|
2787
|
-
background: ${
|
|
2788
|
-
color: ${
|
|
3128
|
+
background: ${o[t]}20;
|
|
3129
|
+
color: ${o[t]};
|
|
2789
3130
|
display: flex;
|
|
2790
3131
|
align-items: center;
|
|
2791
3132
|
justify-content: center;
|
|
@@ -2818,13 +3159,13 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
2818
3159
|
</style>
|
|
2819
3160
|
|
|
2820
3161
|
<div class="toast">
|
|
2821
|
-
<span class="toast-icon">${
|
|
3162
|
+
<span class="toast-icon">${r[t]}</span>
|
|
2822
3163
|
<div class="toast-content">
|
|
2823
3164
|
<div class="toast-message">${n}</div>
|
|
2824
3165
|
</div>
|
|
2825
3166
|
<button class="toast-close" id="close">×</button>
|
|
2826
3167
|
</div>
|
|
2827
|
-
`,this.shadowRoot.getElementById("close")?.addEventListener("click",()=>this.hide())}};
|
|
3168
|
+
`,this.shadowRoot.getElementById("close")?.addEventListener("click",()=>this.hide())}};d("af-toast",Yn);Ei=Yn});var Na={};u(Na,{default:()=>Mi,AfriBadge:()=>Xn});var Xn,Mi;var Va=s(()=>{v();Xn=class Xn extends b{static get observedAttributes(){return["variant","size","removable"]}constructor(){super();this.render()}connectedCallback(){this.shadowRoot.querySelector(".remove-btn")?.addEventListener("click",()=>{this.emit("af-remove"),this.remove()})}attributeChangedCallback(){this.render()}render(){let t=this.getAttribute("variant")||"default",n=this.getAttribute("size")||"md",r=this.hasAttribute("removable"),o={default:{bg:"#e9ecef",text:"#495057"},success:{bg:"#d4edda",text:"#155724"},warning:{bg:"#fff3cd",text:"#856404"},error:{bg:"#f8d7da",text:"#721c24"},info:{bg:"#d1ecf1",text:"#0c5460"},tanzania:{bg:"#1EB53A",text:"#FFFFFF"},maasai:{bg:"#FF0000",text:"#FFFFFF"},ndebele:{bg:"#4169E1",text:"#FFFFFF"},gold:{bg:"#FCD116",text:"#000000"}},a=o[t]||o.default,e={sm:{padding:"2px 6px",fontSize:"11px"},md:{padding:"4px 10px",fontSize:"13px"},lg:{padding:"6px 14px",fontSize:"15px"}},l=e[n]||e.md;this.shadowRoot.innerHTML=`
|
|
2828
3169
|
<style>
|
|
2829
3170
|
:host {
|
|
2830
3171
|
display: inline-block;
|
|
@@ -2863,9 +3204,9 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
2863
3204
|
|
|
2864
3205
|
<span class="badge">
|
|
2865
3206
|
<slot></slot>
|
|
2866
|
-
${
|
|
3207
|
+
${r?'<button class="remove-btn" aria-label="Remove">×</button>':""}
|
|
2867
3208
|
</span>
|
|
2868
|
-
`}};
|
|
3209
|
+
`}};d("af-badge",Xn);Mi=Xn});var Ka={};u(Ka,{default:()=>Hi,AfriAvatar:()=>Fn});var Fn,Hi;var ja=s(()=>{v();Fn=class Fn extends b{static get observedAttributes(){return["src","name","size","status","theme"]}constructor(){super();this.render()}attributeChangedCallback(){this.render()}_getInitials(t){if(!t)return"?";let n=t.trim().split(" ");if(n.length>=2)return(n[0][0]+n[n.length-1][0]).toUpperCase();return t.substring(0,2).toUpperCase()}render(){let t=this.getAttribute("src"),n=this.getAttribute("name")||"",r=this.getAttribute("size")||"md",o=this.getAttribute("status"),a=this.getAttribute("theme")||"tanzania",e={tanzania:"#1EB53A",maasai:"#FF0000",ndebele:"#4169E1",gold:"#FCD116"},l=e[a]||e.tanzania,i={sm:{size:"32px",font:"12px",status:"8px"},md:{size:"44px",font:"16px",status:"10px"},lg:{size:"64px",font:"22px",status:"14px"},xl:{size:"96px",font:"32px",status:"18px"}},c=i[r]||i.md,$={online:"#28a745",offline:"#6c757d",busy:"#dc3545",away:"#ffc107"};this.shadowRoot.innerHTML=`
|
|
2869
3210
|
<style>
|
|
2870
3211
|
:host {
|
|
2871
3212
|
display: inline-block;
|
|
@@ -2901,15 +3242,15 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
2901
3242
|
height: ${c.status};
|
|
2902
3243
|
border-radius: 50%;
|
|
2903
3244
|
border: 2px solid white;
|
|
2904
|
-
background: ${
|
|
3245
|
+
background: ${o?$[o]||$.offline:"transparent"};
|
|
2905
3246
|
}
|
|
2906
3247
|
</style>
|
|
2907
3248
|
|
|
2908
3249
|
<div class="avatar" title="${n}">
|
|
2909
3250
|
${t?`<img src="${t}" alt="${n}" />`:this._getInitials(n)}
|
|
2910
|
-
${
|
|
3251
|
+
${o?'<span class="status"></span>':""}
|
|
2911
3252
|
</div>
|
|
2912
|
-
`}};
|
|
3253
|
+
`}};d("af-avatar",Fn);Hi=Fn});var Ca={};u(Ca,{default:()=>Si,AfriProgress:()=>Jn});var Jn,Si;var Ia=s(()=>{v();Jn=class Jn extends b{static get observedAttributes(){return["value","max","theme","size","label","animated"]}constructor(){super();this.render()}attributeChangedCallback(){this.render()}render(){let t=parseFloat(this.getAttribute("value"))||0,n=parseFloat(this.getAttribute("max"))||100,r=this.getAttribute("theme")||"tanzania",o=this.getAttribute("size")||"md",a=this.getAttribute("label"),e=this.hasAttribute("animated"),l=Math.min(100,Math.max(0,t/n*100)),i={tanzania:{bar:"#1EB53A",track:"#e9ecef"},maasai:{bar:"#FF0000",track:"#e9ecef"},ndebele:{bar:"#4169E1",track:"#e9ecef"},gold:{bar:"#FCD116",track:"#e9ecef"},gradient:{bar:"linear-gradient(90deg, #1EB53A 0%, #FCD116 50%, #00A3DD 100%)",track:"#e9ecef"}},c=i[r]||i.tanzania,$={sm:"6px",md:"10px",lg:"16px"},L=$[o]||$.md;this.shadowRoot.innerHTML=`
|
|
2913
3254
|
<style>
|
|
2914
3255
|
:host {
|
|
2915
3256
|
display: block;
|
|
@@ -2938,7 +3279,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
2938
3279
|
|
|
2939
3280
|
.progress-track {
|
|
2940
3281
|
width: 100%;
|
|
2941
|
-
height: ${
|
|
3282
|
+
height: ${L};
|
|
2942
3283
|
background: ${c.track};
|
|
2943
3284
|
border-radius: 100px;
|
|
2944
3285
|
overflow: hidden;
|
|
@@ -2986,7 +3327,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
2986
3327
|
aria-valuemax="${n}"></div>
|
|
2987
3328
|
</div>
|
|
2988
3329
|
</div>
|
|
2989
|
-
`}};
|
|
3330
|
+
`}};d("af-progress",Jn);Si=Jn});var Pa={};u(Pa,{default:()=>Ri,AfriLoader:()=>Gn});var Gn,Ri;var Ta=s(()=>{v();Gn=class Gn extends b{static get observedAttributes(){return["size","color","type"]}constructor(){super();this.render()}attributeChangedCallback(){this.render()}render(){let t=this.getAttribute("size")||"40",n=this.getAttribute("color")||"currentColor",r=this.getAttribute("type")||"spiral",o={spiral:`M25,25 m0,-20 a20,20 0 1,1 0,40 a20,20 0 1,1 0,-40
|
|
2990
3331
|
M25,25 m0,-15 a15,15 0 1,0 0,30 a15,15 0 1,0 0,-30`,sun:"M25,5 L25,45 M5,25 L45,25 M11,11 L39,39 M39,11 L11,39",diamond:"M25,5 L45,25 L25,45 L5,25 Z"};this.shadowRoot.innerHTML=`
|
|
2991
3332
|
<style>
|
|
2992
3333
|
:host {
|
|
@@ -3014,10 +3355,10 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
3014
3355
|
</style>
|
|
3015
3356
|
<div class="loader">
|
|
3016
3357
|
<svg viewBox="0 0 50 50">
|
|
3017
|
-
${
|
|
3358
|
+
${r==="spiral"?`<path d="${o.spiral}" fill="none" stroke="currentColor" stroke-width="4" stroke-linecap="round" />`:r==="sun"?`<path d="${o.sun}" stroke="currentColor" stroke-width="4" stroke-linecap="round" />`:`<path d="${o.diamond}" fill="none" stroke="currentColor" stroke-width="4" />`}
|
|
3018
3359
|
</svg>
|
|
3019
3360
|
</div>
|
|
3020
|
-
`}};
|
|
3361
|
+
`}};d("af-loader",Gn);Ri=Gn});var Za={};u(Za,{default:()=>Yi,AfriSkeleton:()=>Qn});var Qn,Yi;var za=s(()=>{v();Qn=class Qn extends b{static get observedAttributes(){return["variant","width","height","lines"]}constructor(){super();this.render()}attributeChangedCallback(){this.render()}render(){let t=this.getAttribute("variant")||"text",n=this.getAttribute("width")||"100%",r=this.getAttribute("height")||"auto",o=parseInt(this.getAttribute("lines"))||1,a={text:{height:"16px",borderRadius:"4px"},title:{height:"28px",borderRadius:"4px"},avatar:{width:"48px",height:"48px",borderRadius:"50%"},card:{height:"200px",borderRadius:"12px"},button:{height:"40px",borderRadius:"6px",width:"120px"}},e=a[t]||a.text;this.shadowRoot.innerHTML=`
|
|
3021
3362
|
<style>
|
|
3022
3363
|
:host {
|
|
3023
3364
|
display: block;
|
|
@@ -3052,143 +3393,143 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
3052
3393
|
}
|
|
3053
3394
|
</style>
|
|
3054
3395
|
|
|
3055
|
-
${t==="text"||t==="title"?Array(
|
|
3056
|
-
`}};
|
|
3057
|
-
L${n*0.625},0 L${n*0.75},${
|
|
3058
|
-
L${n*0.9},${
|
|
3059
|
-
L${n*0.7},${
|
|
3060
|
-
L${n*0.5},${
|
|
3061
|
-
L${n*0.3},${
|
|
3062
|
-
L${n*0.1},${
|
|
3396
|
+
${t==="text"||t==="title"?Array(o).fill(0).map(()=>'<div class="skeleton skeleton-line"></div>').join(""):`<div class="skeleton" style="width: ${e.width||n}; height: ${e.height||r};"></div>`}
|
|
3397
|
+
`}};d("af-skeleton",Qn);Yi=Qn});var te={};u(te,{default:()=>Xi,AfriDivider:()=>Bn});var Bn,Xi;var ne=s(()=>{v();Bn=class Bn extends b{static get observedAttributes(){return["pattern","height","color","flip"]}constructor(){super();this.render()}attributeChangedCallback(){this.render()}_getPatternPath(t,n,r){switch(t||"zigzag"){case"zigzag":return`M0,${r} L${n/4},0 L${n/2},${r} L${n*0.75},0 L${n},${r} V${r+10} H0 Z`;case"waves":return`M0,${r/2} Q${n/4},0 ${n/2},${r/2} T${n},${r/2} V${r} H0 Z`;case"triangles":return`M0,${r} L${n/8},0 L${n/4},${r} L${n*0.375},0 L${n/2},${r}
|
|
3398
|
+
L${n*0.625},0 L${n*0.75},${r} L${n*0.875},0 L${n},${r} V${r+10} H0 Z`;case"diamonds":return`M0,0 H${n} V${r/2}
|
|
3399
|
+
L${n*0.9},${r} L${n*0.8},${r/2}
|
|
3400
|
+
L${n*0.7},${r} L${n*0.6},${r/2}
|
|
3401
|
+
L${n*0.5},${r} L${n*0.4},${r/2}
|
|
3402
|
+
L${n*0.3},${r} L${n*0.2},${r/2}
|
|
3403
|
+
L${n*0.1},${r} L0,${r/2} Z`;default:return`M0,0 H${n} V${r} H0 Z`}}render(){let t=this.getAttribute("pattern")||"zigzag",n=this.getAttribute("height")||"50",r=this.getAttribute("color")||"currentColor",o=this.hasAttribute("flip");this.shadowRoot.innerHTML=`
|
|
3063
3404
|
<style>
|
|
3064
3405
|
:host {
|
|
3065
3406
|
display: block;
|
|
3066
3407
|
line-height: 0;
|
|
3067
3408
|
width: 100%;
|
|
3068
3409
|
overflow: hidden;
|
|
3069
|
-
color: ${
|
|
3410
|
+
color: ${r};
|
|
3070
3411
|
}
|
|
3071
3412
|
svg {
|
|
3072
3413
|
display: block;
|
|
3073
3414
|
width: 100%;
|
|
3074
3415
|
height: ${n}px;
|
|
3075
|
-
${
|
|
3416
|
+
${o?"transform: rotate(180deg);":""}
|
|
3076
3417
|
}
|
|
3077
3418
|
</style>
|
|
3078
3419
|
<svg viewBox="0 0 100 ${n}" preserveAspectRatio="none">
|
|
3079
3420
|
<path d="${this._getPatternPath(t,100,parseInt(n))}" fill="currentColor" />
|
|
3080
3421
|
</svg>
|
|
3081
|
-
`}};
|
|
3422
|
+
`}};d("af-divider",Bn);Xi=Bn});function Fi(t,n,r=50,o=50){let a=[];for(let e=0;e<t;e++){let l=2*Math.PI*e/t-Math.PI/2,i=r+n*Math.cos(l),c=o+n*Math.sin(l);a.push(`${i.toFixed(2)},${c.toFixed(2)}`)}return a.join(" ")}function Do({primaryColor:t="#FF0000",secondaryColor:n="#000000",backgroundColor:r="#8B0000",stripeWidth:o=4,size:a=40}={}){let e=`
|
|
3082
3423
|
<svg xmlns="http://www.w3.org/2000/svg" width="${a}" height="${a}" viewBox="0 0 ${a} ${a}">
|
|
3083
|
-
<rect width="${a}" height="${a}" fill="${
|
|
3084
|
-
<rect x="0" y="0" width="${a}" height="${
|
|
3085
|
-
<rect x="0" y="${a/2-
|
|
3086
|
-
<rect x="0" y="${a-
|
|
3087
|
-
<rect x="0" y="0" width="${
|
|
3088
|
-
<rect x="${a/2-
|
|
3089
|
-
<rect x="${a-
|
|
3424
|
+
<rect width="${a}" height="${a}" fill="${r}"/>
|
|
3425
|
+
<rect x="0" y="0" width="${a}" height="${o}" fill="${t}" opacity="0.8"/>
|
|
3426
|
+
<rect x="0" y="${a/2-o/2}" width="${a}" height="${o}" fill="${n}" opacity="0.6"/>
|
|
3427
|
+
<rect x="0" y="${a-o}" width="${a}" height="${o}" fill="${t}" opacity="0.8"/>
|
|
3428
|
+
<rect x="0" y="0" width="${o}" height="${a}" fill="${t}" opacity="0.5"/>
|
|
3429
|
+
<rect x="${a/2-o/2}" y="0" width="${o}" height="${a}" fill="${n}" opacity="0.4"/>
|
|
3430
|
+
<rect x="${a-o}" y="0" width="${o}" height="${a}" fill="${t}" opacity="0.5"/>
|
|
3090
3431
|
</svg>
|
|
3091
|
-
`;return`data:image/svg+xml,${encodeURIComponent(e.trim())}`}function
|
|
3092
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="${
|
|
3093
|
-
<rect width="${
|
|
3432
|
+
`;return`data:image/svg+xml,${encodeURIComponent(e.trim())}`}function Oo({earthColor:t="#8B4513",ochreColor:n="#CD853F",charcoalColor:r="#2F2F2F",size:o=50}={}){let a=`
|
|
3433
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}">
|
|
3434
|
+
<rect width="${o}" height="${o}" fill="${t}"/>
|
|
3094
3435
|
<!-- Cave art inspired figures -->
|
|
3095
|
-
<circle cx="${
|
|
3096
|
-
<line x1="${
|
|
3097
|
-
<line x1="${
|
|
3436
|
+
<circle cx="${o*0.3}" cy="${o*0.3}" r="${o*0.08}" fill="${n}"/>
|
|
3437
|
+
<line x1="${o*0.3}" y1="${o*0.38}" x2="${o*0.3}" y2="${o*0.6}" stroke="${r}" stroke-width="2"/>
|
|
3438
|
+
<line x1="${o*0.2}" y1="${o*0.45}" x2="${o*0.4}" y2="${o*0.45}" stroke="${r}" stroke-width="2"/>
|
|
3098
3439
|
<!-- Animal figure -->
|
|
3099
|
-
<ellipse cx="${
|
|
3100
|
-
<line x1="${
|
|
3101
|
-
<line x1="${
|
|
3440
|
+
<ellipse cx="${o*0.7}" cy="${o*0.5}" rx="${o*0.15}" ry="${o*0.08}" fill="${n}"/>
|
|
3441
|
+
<line x1="${o*0.6}" y1="${o*0.58}" x2="${o*0.6}" y2="${o*0.7}" stroke="${r}" stroke-width="2"/>
|
|
3442
|
+
<line x1="${o*0.8}" y1="${o*0.58}" x2="${o*0.8}" y2="${o*0.7}" stroke="${r}" stroke-width="2"/>
|
|
3102
3443
|
<!-- Dots like ancient markings -->
|
|
3103
|
-
<circle cx="${
|
|
3104
|
-
<circle cx="${
|
|
3444
|
+
<circle cx="${o*0.15}" cy="${o*0.8}" r="3" fill="${n}"/>
|
|
3445
|
+
<circle cx="${o*0.85}" cy="${o*0.2}" r="3" fill="${n}"/>
|
|
3105
3446
|
</svg>
|
|
3106
|
-
`;return`data:image/svg+xml,${encodeURIComponent(a.trim())}`}function
|
|
3107
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="${
|
|
3108
|
-
<rect width="${
|
|
3447
|
+
`;return`data:image/svg+xml,${encodeURIComponent(a.trim())}`}function Wo({primaryColor:t="#1EB53A",accentColor:n="#FCD116",size:r=30}={}){let o=`
|
|
3448
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="${r}" height="${r}" viewBox="0 0 ${r} ${r}">
|
|
3449
|
+
<rect width="${r}" height="${r}" fill="${t}"/>
|
|
3109
3450
|
<!-- Pindo (Border) Motifs: Cashew/Triangle -->
|
|
3110
|
-
<path d="M0,0 L${
|
|
3111
|
-
<path d="M${
|
|
3112
|
-
<circle cx="${
|
|
3451
|
+
<path d="M0,0 L${r/2},${r/2} L0,${r} Z" fill="${n}"/>
|
|
3452
|
+
<path d="M${r},0 L${r/2},${r/2} L${r},${r} Z" fill="${n}"/>
|
|
3453
|
+
<circle cx="${r/2}" cy="${r/2}" r="${r*0.15}" fill="none" stroke="${n}" stroke-width="2"/>
|
|
3113
3454
|
</svg>
|
|
3114
|
-
`;return`data:image/svg+xml,${encodeURIComponent(
|
|
3115
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="${
|
|
3116
|
-
<rect width="${
|
|
3455
|
+
`;return`data:image/svg+xml,${encodeURIComponent(o.trim())}`}function Ji({primaryColor:t="#FF6B00",secondaryColor:n="#002B5C",backgroundColor:r="#FFFFFF",size:o=40}={}){let a=`
|
|
3456
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}">
|
|
3457
|
+
<rect width="${o}" height="${o}" fill="${r}"/>
|
|
3117
3458
|
<!-- Border pattern -->
|
|
3118
|
-
<rect x="0" y="0" width="${
|
|
3119
|
-
<rect x="0" y="${
|
|
3120
|
-
<rect x="0" y="0" width="${
|
|
3121
|
-
<rect x="${
|
|
3459
|
+
<rect x="0" y="0" width="${o}" height="${o*0.1}" fill="${t}"/>
|
|
3460
|
+
<rect x="0" y="${o*0.9}" width="${o}" height="${o*0.1}" fill="${t}"/>
|
|
3461
|
+
<rect x="0" y="0" width="${o*0.1}" height="${o}" fill="${t}"/>
|
|
3462
|
+
<rect x="${o*0.9}" y="0" width="${o*0.1}" height="${o}" fill="${t}"/>
|
|
3122
3463
|
<!-- Center motif -->
|
|
3123
|
-
<circle cx="${
|
|
3124
|
-
<text x="${
|
|
3464
|
+
<circle cx="${o*0.5}" cy="${o*0.5}" r="${o*0.15}" fill="${n}"/>
|
|
3465
|
+
<text x="${o*0.5}" y="${o*0.55}" text-anchor="middle" fill="${t}" font-size="${o*0.08}">KANGA</text>
|
|
3125
3466
|
</svg>
|
|
3126
|
-
`;return`data:image/svg+xml,${encodeURIComponent(a.trim())}`}function
|
|
3127
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="${
|
|
3128
|
-
<rect width="${
|
|
3467
|
+
`;return`data:image/svg+xml,${encodeURIComponent(a.trim())}`}function Gi({primaryColor:t="#8B4513",secondaryColor:n="#DAA520",backgroundColor:r="#F5F5DC",size:o=30}={}){let a=`
|
|
3468
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}">
|
|
3469
|
+
<rect width="${o}" height="${o}" fill="${r}"/>
|
|
3129
3470
|
<!-- Kuba geometric border -->
|
|
3130
|
-
<polygon points="0,0 ${
|
|
3131
|
-
<polygon points="${
|
|
3132
|
-
<polygon points="0,${
|
|
3133
|
-
<polygon points="${
|
|
3471
|
+
<polygon points="0,0 ${o*0.3},0 0,${o*0.3}" fill="${t}"/>
|
|
3472
|
+
<polygon points="${o},0 ${o*0.7},0 ${o},${o*0.3}" fill="${t}"/>
|
|
3473
|
+
<polygon points="0,${o} ${o*0.3},${o} 0,${o*0.7}" fill="${t}"/>
|
|
3474
|
+
<polygon points="${o},${o} ${o*0.7},${o} ${o},${o*0.7}" fill="${t}"/>
|
|
3134
3475
|
<!-- Center diamond -->
|
|
3135
|
-
<polygon points="${
|
|
3476
|
+
<polygon points="${o*0.5},${o*0.3} ${o*0.7},${o*0.5} ${o*0.5},${o*0.7} ${o*0.3},${o*0.5}" fill="${n}"/>
|
|
3136
3477
|
</svg>
|
|
3137
|
-
`;return`data:image/svg+xml,${encodeURIComponent(a.trim())}`}function
|
|
3138
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="${
|
|
3139
|
-
<rect width="${
|
|
3478
|
+
`;return`data:image/svg+xml,${encodeURIComponent(a.trim())}`}function Qi({primaryColor:t="#FF0000",secondaryColor:n="#000000",accentColor:r="#FFFFFF",size:o=40}={}){let a=`
|
|
3479
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}">
|
|
3480
|
+
<rect width="${o}" height="${o}" fill="${r}"/>
|
|
3140
3481
|
<!-- Bead pattern -->
|
|
3141
|
-
<circle cx="${
|
|
3142
|
-
<circle cx="${
|
|
3143
|
-
<circle cx="${
|
|
3144
|
-
<circle cx="${
|
|
3145
|
-
<circle cx="${
|
|
3146
|
-
<circle cx="${
|
|
3147
|
-
<circle cx="${
|
|
3148
|
-
<circle cx="${
|
|
3149
|
-
<circle cx="${
|
|
3482
|
+
<circle cx="${o*0.2}" cy="${o*0.2}" r="${o*0.08}" fill="${t}"/>
|
|
3483
|
+
<circle cx="${o*0.5}" cy="${o*0.2}" r="${o*0.08}" fill="${n}"/>
|
|
3484
|
+
<circle cx="${o*0.8}" cy="${o*0.2}" r="${o*0.08}" fill="${t}"/>
|
|
3485
|
+
<circle cx="${o*0.2}" cy="${o*0.5}" r="${o*0.08}" fill="${n}"/>
|
|
3486
|
+
<circle cx="${o*0.5}" cy="${o*0.5}" r="${o*0.08}" fill="${t}"/>
|
|
3487
|
+
<circle cx="${o*0.8}" cy="${o*0.5}" r="${o*0.08}" fill="${n}"/>
|
|
3488
|
+
<circle cx="${o*0.2}" cy="${o*0.8}" r="${o*0.08}" fill="${t}"/>
|
|
3489
|
+
<circle cx="${o*0.5}" cy="${o*0.8}" r="${o*0.08}" fill="${n}"/>
|
|
3490
|
+
<circle cx="${o*0.8}" cy="${o*0.8}" r="${o*0.08}" fill="${t}"/>
|
|
3150
3491
|
</svg>
|
|
3151
|
-
`;return`data:image/svg+xml,${encodeURIComponent(a.trim())}`}function
|
|
3152
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="${
|
|
3153
|
-
<ellipse cx="${
|
|
3492
|
+
`;return`data:image/svg+xml,${encodeURIComponent(a.trim())}`}function Bi({primaryColor:t="#8B0000",secondaryColor:n="#FFD700",backgroundColor:r="#654321",size:o=50}={}){let a=`
|
|
3493
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}">
|
|
3494
|
+
<ellipse cx="${o*0.5}" cy="${o*0.5}" rx="${o*0.4}" ry="${o*0.45}" fill="${r}"/>
|
|
3154
3495
|
<!-- Shield patterns -->
|
|
3155
|
-
<ellipse cx="${
|
|
3156
|
-
<rect x="${
|
|
3496
|
+
<ellipse cx="${o*0.5}" cy="${o*0.3}" rx="${o*0.2}" ry="${o*0.15}" fill="${t}"/>
|
|
3497
|
+
<rect x="${o*0.4}" y="${o*0.5}" width="${o*0.2}" height="${o*0.3}" fill="${n}"/>
|
|
3157
3498
|
<!-- Decorative lines -->
|
|
3158
|
-
<line x1="${
|
|
3159
|
-
<line x1="${
|
|
3499
|
+
<line x1="${o*0.3}" y1="${o*0.2}" x2="${o*0.7}" y2="${o*0.2}" stroke="${t}" stroke-width="3"/>
|
|
3500
|
+
<line x1="${o*0.3}" y1="${o*0.8}" x2="${o*0.7}" y2="${o*0.8}" stroke="${t}" stroke-width="3"/>
|
|
3160
3501
|
</svg>
|
|
3161
|
-
`;return`data:image/svg+xml,${encodeURIComponent(a.trim())}`}function
|
|
3502
|
+
`;return`data:image/svg+xml,${encodeURIComponent(a.trim())}`}function Di({primaryColor:t="#FF1493",secondaryColor:n="#00FF00",accentColor:r="#FFFF00",backgroundColor:o="#FFFFFF",size:a=50}={}){let e=`
|
|
3162
3503
|
<svg xmlns="http://www.w3.org/2000/svg" width="${a}" height="${a}" viewBox="0 0 ${a} ${a}">
|
|
3163
|
-
<rect width="${a}" height="${a}" fill="${
|
|
3504
|
+
<rect width="${a}" height="${a}" fill="${o}"/>
|
|
3164
3505
|
<!-- Ndebele geometric patterns -->
|
|
3165
3506
|
<polygon points="${a*0.2},${a*0.2} ${a*0.4},${a*0.2} ${a*0.3},${a*0.4}" fill="${t}"/>
|
|
3166
3507
|
<polygon points="${a*0.6},${a*0.2} ${a*0.8},${a*0.2} ${a*0.7},${a*0.4}" fill="${n}"/>
|
|
3167
|
-
<polygon points="${a*0.2},${a*0.6} ${a*0.4},${a*0.6} ${a*0.3},${a*0.8}" fill="${
|
|
3508
|
+
<polygon points="${a*0.2},${a*0.6} ${a*0.4},${a*0.6} ${a*0.3},${a*0.8}" fill="${r}"/>
|
|
3168
3509
|
<polygon points="${a*0.6},${a*0.6} ${a*0.8},${a*0.6} ${a*0.7},${a*0.8}" fill="${t}"/>
|
|
3169
3510
|
<!-- Center design -->
|
|
3170
3511
|
<circle cx="${a*0.5}" cy="${a*0.5}" r="${a*0.15}" fill="${n}"/>
|
|
3171
|
-
<rect x="${a*0.45}" y="${a*0.45}" width="${a*0.1}" height="${a*0.1}" fill="${
|
|
3512
|
+
<rect x="${a*0.45}" y="${a*0.45}" width="${a*0.1}" height="${a*0.1}" fill="${r}"/>
|
|
3172
3513
|
</svg>
|
|
3173
|
-
`;return`data:image/svg+xml,${encodeURIComponent(e.trim())}`}function
|
|
3174
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="${
|
|
3175
|
-
<rect width="${
|
|
3176
|
-
<circle cx="${
|
|
3177
|
-
<circle cx="${
|
|
3178
|
-
<circle cx="${
|
|
3179
|
-
<circle cx="${
|
|
3180
|
-
<circle cx="${
|
|
3181
|
-
<circle cx="${
|
|
3514
|
+
`;return`data:image/svg+xml,${encodeURIComponent(e.trim())}`}function yo({primaryColor:t="#00A3DD",secondaryColor:n="#FCD116",backgroundColor:r="#1EB53A",size:o=50}={}){let a=`
|
|
3515
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}">
|
|
3516
|
+
<rect width="${o}" height="${o}" fill="${r}"/>
|
|
3517
|
+
<circle cx="${o*0.25}" cy="${o*0.25}" r="${o*0.2}" fill="${t}" opacity="0.8"/>
|
|
3518
|
+
<circle cx="${o*0.75}" cy="${o*0.75}" r="${o*0.2}" fill="${t}" opacity="0.8"/>
|
|
3519
|
+
<circle cx="${o*0.25}" cy="${o*0.25}" r="${o*0.1}" fill="${n}"/>
|
|
3520
|
+
<circle cx="${o*0.75}" cy="${o*0.75}" r="${o*0.1}" fill="${n}"/>
|
|
3521
|
+
<circle cx="${o*0.75}" cy="${o*0.25}" r="${o*0.08}" fill="${n}" opacity="0.6"/>
|
|
3522
|
+
<circle cx="${o*0.25}" cy="${o*0.75}" r="${o*0.08}" fill="${n}" opacity="0.6"/>
|
|
3182
3523
|
</svg>
|
|
3183
|
-
`;return`data:image/svg+xml,${encodeURIComponent(a.trim())}`}function
|
|
3524
|
+
`;return`data:image/svg+xml,${encodeURIComponent(a.trim())}`}function Uo({colors:t=["#FFD700","#228B22","#DC143C","#000000"],size:n=60}={}){let[r,o,a,e]=t,l=n/6,i=`
|
|
3184
3525
|
<svg xmlns="http://www.w3.org/2000/svg" width="${n}" height="${n}" viewBox="0 0 ${n} ${n}">
|
|
3185
3526
|
<rect width="${n}" height="${n}" fill="${e}"/>
|
|
3186
3527
|
<!-- Horizontal bands -->
|
|
3187
|
-
<rect x="0" y="0" width="${n}" height="${l}" fill="${
|
|
3188
|
-
<rect x="0" y="${l}" width="${n}" height="${l}" fill="${
|
|
3528
|
+
<rect x="0" y="0" width="${n}" height="${l}" fill="${r}"/>
|
|
3529
|
+
<rect x="0" y="${l}" width="${n}" height="${l}" fill="${o}"/>
|
|
3189
3530
|
<rect x="0" y="${l*2}" width="${n}" height="${l}" fill="${a}"/>
|
|
3190
|
-
<rect x="0" y="${l*3}" width="${n}" height="${l}" fill="${
|
|
3191
|
-
<rect x="0" y="${l*4}" width="${n}" height="${l}" fill="${
|
|
3531
|
+
<rect x="0" y="${l*3}" width="${n}" height="${l}" fill="${r}"/>
|
|
3532
|
+
<rect x="0" y="${l*4}" width="${n}" height="${l}" fill="${o}"/>
|
|
3192
3533
|
<rect x="0" y="${l*5}" width="${n}" height="${l}" fill="${a}"/>
|
|
3193
3534
|
<!-- Vertical accents -->
|
|
3194
3535
|
<rect x="${n*0.2}" y="0" width="3" height="${n}" fill="${e}" opacity="0.5"/>
|
|
@@ -3196,47 +3537,47 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
3196
3537
|
<rect x="${n*0.6}" y="0" width="3" height="${n}" fill="${e}" opacity="0.5"/>
|
|
3197
3538
|
<rect x="${n*0.8}" y="0" width="3" height="${n}" fill="${e}" opacity="0.5"/>
|
|
3198
3539
|
<!-- Kente squares -->
|
|
3199
|
-
<rect x="${n*0.1}" y="${n*0.1}" width="${n*0.15}" height="${n*0.15}" fill="${
|
|
3540
|
+
<rect x="${n*0.1}" y="${n*0.1}" width="${n*0.15}" height="${n*0.15}" fill="${r}" stroke="${e}" stroke-width="1"/>
|
|
3200
3541
|
<rect x="${n*0.75}" y="${n*0.75}" width="${n*0.15}" height="${n*0.15}" fill="${a}" stroke="${e}" stroke-width="1"/>
|
|
3201
3542
|
</svg>
|
|
3202
|
-
`;return`data:image/svg+xml,${encodeURIComponent(i.trim())}`}function
|
|
3203
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="${
|
|
3204
|
-
<rect width="${
|
|
3543
|
+
`;return`data:image/svg+xml,${encodeURIComponent(i.trim())}`}function No({symbolColor:t="#000000",backgroundColor:n="#CD853F",size:r=50}={}){let o=`
|
|
3544
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="${r}" height="${r}" viewBox="0 0 ${r} ${r}">
|
|
3545
|
+
<rect width="${r}" height="${r}" fill="${n}"/>
|
|
3205
3546
|
<!-- Sankofa-inspired heart shape (go back and get it) -->
|
|
3206
|
-
<path d="M${
|
|
3207
|
-
C${
|
|
3208
|
-
L${
|
|
3209
|
-
L${
|
|
3210
|
-
C${
|
|
3547
|
+
<path d="M${r*0.5} ${r*0.2}
|
|
3548
|
+
C${r*0.3} ${r*0.1} ${r*0.15} ${r*0.3} ${r*0.25} ${r*0.5}
|
|
3549
|
+
L${r*0.5} ${r*0.8}
|
|
3550
|
+
L${r*0.75} ${r*0.5}
|
|
3551
|
+
C${r*0.85} ${r*0.3} ${r*0.7} ${r*0.1} ${r*0.5} ${r*0.2}"
|
|
3211
3552
|
fill="none" stroke="${t}" stroke-width="3"/>
|
|
3212
3553
|
<!-- Spiral detail -->
|
|
3213
|
-
<circle cx="${
|
|
3214
|
-
<circle cx="${
|
|
3554
|
+
<circle cx="${r*0.35}" cy="${r*0.45}" r="${r*0.08}" fill="none" stroke="${t}" stroke-width="2"/>
|
|
3555
|
+
<circle cx="${r*0.65}" cy="${r*0.45}" r="${r*0.08}" fill="none" stroke="${t}" stroke-width="2"/>
|
|
3215
3556
|
</svg>
|
|
3216
|
-
`;return`data:image/svg+xml,${encodeURIComponent(
|
|
3557
|
+
`;return`data:image/svg+xml,${encodeURIComponent(o.trim())}`}function Vo({colors:t=["#4B0082","#FFD700","#FFFFFF"],size:n=50}={}){let[r,o,a]=t,e=n/10,l=`
|
|
3217
3558
|
<svg xmlns="http://www.w3.org/2000/svg" width="${n}" height="${n}" viewBox="0 0 ${n} ${n}">
|
|
3218
|
-
<rect width="${n}" height="${n}" fill="${
|
|
3559
|
+
<rect width="${n}" height="${n}" fill="${r}"/>
|
|
3219
3560
|
<!-- Horizontal stripes -->
|
|
3220
|
-
<rect x="0" y="${e}" width="${n}" height="${e*0.5}" fill="${
|
|
3561
|
+
<rect x="0" y="${e}" width="${n}" height="${e*0.5}" fill="${o}"/>
|
|
3221
3562
|
<rect x="0" y="${e*3}" width="${n}" height="${e*0.5}" fill="${a}"/>
|
|
3222
|
-
<rect x="0" y="${e*5}" width="${n}" height="${e*0.5}" fill="${
|
|
3563
|
+
<rect x="0" y="${e*5}" width="${n}" height="${e*0.5}" fill="${o}"/>
|
|
3223
3564
|
<rect x="0" y="${e*7}" width="${n}" height="${e*0.5}" fill="${a}"/>
|
|
3224
|
-
<rect x="0" y="${e*9}" width="${n}" height="${e*0.5}" fill="${
|
|
3565
|
+
<rect x="0" y="${e*9}" width="${n}" height="${e*0.5}" fill="${o}"/>
|
|
3225
3566
|
<!-- Vertical accent lines -->
|
|
3226
|
-
<rect x="${n*0.48}" y="0" width="${e*0.4}" height="${n}" fill="${
|
|
3567
|
+
<rect x="${n*0.48}" y="0" width="${e*0.4}" height="${n}" fill="${o}" opacity="0.7"/>
|
|
3227
3568
|
<!-- Diamond motifs -->
|
|
3228
3569
|
<polygon points="${n*0.25},${n*0.3} ${n*0.35},${n*0.5} ${n*0.25},${n*0.7} ${n*0.15},${n*0.5}"
|
|
3229
|
-
fill="${
|
|
3570
|
+
fill="${o}" stroke="${a}" stroke-width="1"/>
|
|
3230
3571
|
<polygon points="${n*0.75},${n*0.3} ${n*0.85},${n*0.5} ${n*0.75},${n*0.7} ${n*0.65},${n*0.5}"
|
|
3231
|
-
fill="${
|
|
3572
|
+
fill="${o}" stroke="${a}" stroke-width="1"/>
|
|
3232
3573
|
</svg>
|
|
3233
|
-
`;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function
|
|
3574
|
+
`;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function Ko({primaryColor:t="#FF6B00",secondaryColor:n="#00A86B",accentColor:r="#FFD700",backgroundColor:o="#FFFFFF",size:a=60}={}){let e=`
|
|
3234
3575
|
<svg xmlns="http://www.w3.org/2000/svg" width="${a}" height="${a}" viewBox="0 0 ${a} ${a}">
|
|
3235
|
-
<rect width="${a}" height="${a}" fill="${
|
|
3576
|
+
<rect width="${a}" height="${a}" fill="${o}"/>
|
|
3236
3577
|
<!-- Bold circular motifs -->
|
|
3237
3578
|
<circle cx="${a*0.3}" cy="${a*0.3}" r="${a*0.25}" fill="${t}"/>
|
|
3238
3579
|
<circle cx="${a*0.3}" cy="${a*0.3}" r="${a*0.15}" fill="${n}"/>
|
|
3239
|
-
<circle cx="${a*0.3}" cy="${a*0.3}" r="${a*0.08}" fill="${
|
|
3580
|
+
<circle cx="${a*0.3}" cy="${a*0.3}" r="${a*0.08}" fill="${r}"/>
|
|
3240
3581
|
|
|
3241
3582
|
<circle cx="${a*0.8}" cy="${a*0.8}" r="${a*0.2}" fill="${n}"/>
|
|
3242
3583
|
<circle cx="${a*0.8}" cy="${a*0.8}" r="${a*0.1}" fill="${t}"/>
|
|
@@ -3246,108 +3587,108 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
3246
3587
|
stroke="${t}" stroke-width="4"/>
|
|
3247
3588
|
|
|
3248
3589
|
<!-- Small dots -->
|
|
3249
|
-
<circle cx="${a*0.1}" cy="${a*0.8}" r="${a*0.05}" fill="${
|
|
3250
|
-
<circle cx="${a*0.9}" cy="${a*0.2}" r="${a*0.05}" fill="${
|
|
3590
|
+
<circle cx="${a*0.1}" cy="${a*0.8}" r="${a*0.05}" fill="${r}"/>
|
|
3591
|
+
<circle cx="${a*0.9}" cy="${a*0.2}" r="${a*0.05}" fill="${r}"/>
|
|
3251
3592
|
</svg>
|
|
3252
|
-
`;return`data:image/svg+xml,${encodeURIComponent(e.trim())}`}function
|
|
3253
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="${
|
|
3254
|
-
<rect width="${
|
|
3593
|
+
`;return`data:image/svg+xml,${encodeURIComponent(e.trim())}`}function jo({primaryColor:t="#000000",secondaryColor:n="#FFFFFF",accentColor:r="#8B4513",size:o=60}={}){let a=`
|
|
3594
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}">
|
|
3595
|
+
<rect width="${o}" height="${o}" fill="${t}"/>
|
|
3255
3596
|
<!-- Zigzags -->
|
|
3256
|
-
<polyline points="0,${
|
|
3597
|
+
<polyline points="0,${o*0.2} ${o*0.25},0 ${o*0.5},${o*0.2} ${o*0.75},0 ${o},${o*0.2}"
|
|
3257
3598
|
fill="none" stroke="${n}" stroke-width="3"/>
|
|
3258
|
-
<polyline points="0,${
|
|
3599
|
+
<polyline points="0,${o*0.8} ${o*0.25},${o} ${o*0.5},${o*0.8} ${o*0.75},${o} ${o},${o*0.8}"
|
|
3259
3600
|
fill="none" stroke="${n}" stroke-width="3"/>
|
|
3260
3601
|
<!-- Crosses -->
|
|
3261
|
-
<line x1="${
|
|
3262
|
-
<line x1="${
|
|
3263
|
-
<line x1="${
|
|
3264
|
-
<line x1="${
|
|
3602
|
+
<line x1="${o*0.25}" y1="${o*0.4}" x2="${o*0.25}" y2="${o*0.6}" stroke="${n}" stroke-width="2"/>
|
|
3603
|
+
<line x1="${o*0.15}" y1="${o*0.5}" x2="${o*0.35}" y2="${o*0.5}" stroke="${n}" stroke-width="2"/>
|
|
3604
|
+
<line x1="${o*0.75}" y1="${o*0.4}" x2="${o*0.75}" y2="${o*0.6}" stroke="${n}" stroke-width="2"/>
|
|
3605
|
+
<line x1="${o*0.65}" y1="${o*0.5}" x2="${o*0.85}" y2="${o*0.5}" stroke="${n}" stroke-width="2"/>
|
|
3265
3606
|
<!-- Dots -->
|
|
3266
|
-
<circle cx="${
|
|
3607
|
+
<circle cx="${o*0.5}" cy="${o*0.5}" r="${o*0.08}" fill="${r}"/>
|
|
3267
3608
|
</svg>
|
|
3268
|
-
`;return`data:image/svg+xml,${encodeURIComponent(a.trim())}`}function
|
|
3269
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="${
|
|
3270
|
-
<rect width="${
|
|
3609
|
+
`;return`data:image/svg+xml,${encodeURIComponent(a.trim())}`}function Co({primaryColor:t="#D2B48C",secondaryColor:n="#3E2723",size:r=60}={}){let o=`
|
|
3610
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="${r}" height="${r}" viewBox="0 0 ${r} ${r}">
|
|
3611
|
+
<rect width="${r}" height="${r}" fill="${t}"/>
|
|
3271
3612
|
<!-- Interlocking diamonds/rectangles -->
|
|
3272
|
-
<rect x="${
|
|
3273
|
-
<rect x="${
|
|
3274
|
-
<rect x="${
|
|
3613
|
+
<rect x="${r*0.1}" y="${r*0.1}" width="${r*0.3}" height="${r*0.3}" fill="${n}"/>
|
|
3614
|
+
<rect x="${r*0.6}" y="${r*0.6}" width="${r*0.3}" height="${r*0.3}" fill="${n}"/>
|
|
3615
|
+
<rect x="${r*0.6}" y="${r*0.1}" width="${r*0.3}" height="${r*0.3}"
|
|
3275
3616
|
fill="none" stroke="${n}" stroke-width="4"/>
|
|
3276
|
-
<rect x="${
|
|
3617
|
+
<rect x="${r*0.1}" y="${r*0.6}" width="${r*0.3}" height="${r*0.3}"
|
|
3277
3618
|
fill="none" stroke="${n}" stroke-width="4"/>
|
|
3278
3619
|
<!-- Center lines -->
|
|
3279
|
-
<line x1="${
|
|
3280
|
-
<line x1="${
|
|
3620
|
+
<line x1="${r*0.4}" y1="${r*0.5}" x2="${r*0.6}" y2="${r*0.5}" stroke="${n}" stroke-width="2"/>
|
|
3621
|
+
<line x1="${r*0.5}" y1="${r*0.4}" x2="${r*0.5}" y2="${r*0.6}" stroke="${n}" stroke-width="2"/>
|
|
3281
3622
|
</svg>
|
|
3282
|
-
`;return`data:image/svg+xml,${encodeURIComponent(
|
|
3283
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="${
|
|
3284
|
-
<rect width="${
|
|
3623
|
+
`;return`data:image/svg+xml,${encodeURIComponent(o.trim())}`}function Io({primaryColor:t="#000000",secondaryColor:n="#FFFFFF",accentColor:r="#B22222",size:o=60}={}){let a=`
|
|
3624
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}">
|
|
3625
|
+
<rect width="${o}" height="${o}" fill="${n}"/>
|
|
3285
3626
|
<!-- Spiral/Diamond Motif -->
|
|
3286
|
-
<path d="M${
|
|
3287
|
-
L${
|
|
3288
|
-
L${
|
|
3289
|
-
L${
|
|
3627
|
+
<path d="M${o*0.5} ${o*0.1}
|
|
3628
|
+
L${o*0.9} ${o*0.5}
|
|
3629
|
+
L${o*0.5} ${o*0.9}
|
|
3630
|
+
L${o*0.1} ${o*0.5} Z"
|
|
3290
3631
|
fill="${t}"/>
|
|
3291
|
-
<path d="M${
|
|
3292
|
-
L${
|
|
3293
|
-
L${
|
|
3294
|
-
L${
|
|
3632
|
+
<path d="M${o*0.5} ${o*0.3}
|
|
3633
|
+
L${o*0.7} ${o*0.5}
|
|
3634
|
+
L${o*0.5} ${o*0.7}
|
|
3635
|
+
L${o*0.3} ${o*0.5} Z"
|
|
3295
3636
|
fill="${n}"/>
|
|
3296
|
-
<circle cx="${
|
|
3637
|
+
<circle cx="${o*0.5}" cy="${o*0.5}" r="${o*0.1}" fill="${r}"/>
|
|
3297
3638
|
</svg>
|
|
3298
|
-
`;return`data:image/svg+xml,${encodeURIComponent(a.trim())}`}function
|
|
3299
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="${
|
|
3300
|
-
<rect width="${
|
|
3639
|
+
`;return`data:image/svg+xml,${encodeURIComponent(a.trim())}`}function Po({colors:t=["#009E60","#FCDD09","#EF3340"],backgroundColor:n="#FFFFFF",size:r=40}={}){let[o,a,e]=t,l=`
|
|
3640
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="${r}" height="${r}" viewBox="0 0 ${r} ${r}">
|
|
3641
|
+
<rect width="${r}" height="${r}" fill="${n}"/>
|
|
3301
3642
|
<!-- Diamond Chain -->
|
|
3302
|
-
<polygon points="${
|
|
3303
|
-
fill="${
|
|
3304
|
-
<polygon points="${
|
|
3643
|
+
<polygon points="${r*0.5},0 ${r},${r*0.5} ${r*0.5},${r} 0,${r*0.5}"
|
|
3644
|
+
fill="${o}" opacity="0.2"/>
|
|
3645
|
+
<polygon points="${r*0.5},${r*0.2} ${r*0.8},${r*0.5} ${r*0.5},${r*0.8} ${r*0.2},${r*0.5}"
|
|
3305
3646
|
fill="${a}"/>
|
|
3306
|
-
<rect x="${
|
|
3647
|
+
<rect x="${r*0.4}" y="${r*0.4}" width="${r*0.2}" height="${r*0.2}" fill="${e}"/>
|
|
3307
3648
|
<!-- Side accents -->
|
|
3308
|
-
<line x1="0" y1="0" x2="0" y2="${
|
|
3309
|
-
<line x1="${
|
|
3649
|
+
<line x1="0" y1="0" x2="0" y2="${r}" stroke="${o}" stroke-width="4"/>
|
|
3650
|
+
<line x1="${r}" y1="0" x2="${r}" y2="${r}" stroke="${o}" stroke-width="4"/>
|
|
3310
3651
|
</svg>
|
|
3311
|
-
`;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function
|
|
3652
|
+
`;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function To({colors:t=["#FFD700","#4169E1","#FF69B4","#228B22"],size:n=60,strokeWidth:r=2}={}){let[o,a,e,l]=t,i=`
|
|
3312
3653
|
<svg xmlns="http://www.w3.org/2000/svg" width="${n}" height="${n}" viewBox="0 0 ${n} ${n}">
|
|
3313
3654
|
<rect width="${n}" height="${n}" fill="#FFFFFF"/>
|
|
3314
|
-
<rect x="${
|
|
3315
|
-
width="${n-
|
|
3316
|
-
fill="none" stroke="#000000" stroke-width="${
|
|
3655
|
+
<rect x="${r}" y="${r}"
|
|
3656
|
+
width="${n-r*2}" height="${n-r*2}"
|
|
3657
|
+
fill="none" stroke="#000000" stroke-width="${r}"/>
|
|
3317
3658
|
<rect x="${n*0.15}" y="${n*0.15}" width="${n*0.35}" height="${n*0.35}"
|
|
3318
|
-
fill="${
|
|
3659
|
+
fill="${o}" stroke="#000000" stroke-width="${r/2}"/>
|
|
3319
3660
|
<rect x="${n*0.5}" y="${n*0.15}" width="${n*0.35}" height="${n*0.35}"
|
|
3320
|
-
fill="${a}" stroke="#000000" stroke-width="${
|
|
3661
|
+
fill="${a}" stroke="#000000" stroke-width="${r/2}"/>
|
|
3321
3662
|
<rect x="${n*0.15}" y="${n*0.5}" width="${n*0.35}" height="${n*0.35}"
|
|
3322
|
-
fill="${e}" stroke="#000000" stroke-width="${
|
|
3663
|
+
fill="${e}" stroke="#000000" stroke-width="${r/2}"/>
|
|
3323
3664
|
<rect x="${n*0.5}" y="${n*0.5}" width="${n*0.35}" height="${n*0.35}"
|
|
3324
|
-
fill="${l}" stroke="#000000" stroke-width="${
|
|
3665
|
+
fill="${l}" stroke="#000000" stroke-width="${r/2}"/>
|
|
3325
3666
|
<polygon points="${n/2},${n*0.3} ${n*0.7},${n/2} ${n/2},${n*0.7} ${n*0.3},${n/2}"
|
|
3326
|
-
fill="#FFFFFF" stroke="#000000" stroke-width="${
|
|
3667
|
+
fill="#FFFFFF" stroke="#000000" stroke-width="${r}"/>
|
|
3327
3668
|
</svg>
|
|
3328
|
-
`;return`data:image/svg+xml,${encodeURIComponent(i.trim())}`}function
|
|
3669
|
+
`;return`data:image/svg+xml,${encodeURIComponent(i.trim())}`}function Zo({colors:t=["#FFFFFF","#000000","#FF0000","#00A86B","#FFD700"],size:n=50}={}){let[r,o,a,e,l]=t,i=n/10,c=`
|
|
3329
3670
|
<svg xmlns="http://www.w3.org/2000/svg" width="${n}" height="${n}" viewBox="0 0 ${n} ${n}">
|
|
3330
|
-
<rect width="${n}" height="${n}" fill="${
|
|
3671
|
+
<rect width="${n}" height="${n}" fill="${o}"/>
|
|
3331
3672
|
<!-- Triangle pattern (isivivane - sacred cairn) -->
|
|
3332
3673
|
<polygon points="${n*0.5},${n*0.1} ${n*0.9},${n*0.9} ${n*0.1},${n*0.9}"
|
|
3333
|
-
fill="none" stroke="${
|
|
3674
|
+
fill="none" stroke="${r}" stroke-width="2"/>
|
|
3334
3675
|
<polygon points="${n*0.5},${n*0.25} ${n*0.75},${n*0.75} ${n*0.25},${n*0.75}"
|
|
3335
3676
|
fill="${a}"/>
|
|
3336
3677
|
<!-- Beadwork dots -->
|
|
3337
|
-
<circle cx="${n*0.5}" cy="${n*0.35}" r="${i}" fill="${
|
|
3678
|
+
<circle cx="${n*0.5}" cy="${n*0.35}" r="${i}" fill="${r}"/>
|
|
3338
3679
|
<circle cx="${n*0.35}" cy="${n*0.6}" r="${i}" fill="${e}"/>
|
|
3339
3680
|
<circle cx="${n*0.65}" cy="${n*0.6}" r="${i}" fill="${l}"/>
|
|
3340
|
-
<circle cx="${n*0.5}" cy="${n*0.8}" r="${i}" fill="${
|
|
3681
|
+
<circle cx="${n*0.5}" cy="${n*0.8}" r="${i}" fill="${r}"/>
|
|
3341
3682
|
<!-- Border dots -->
|
|
3342
3683
|
<circle cx="${n*0.1}" cy="${n*0.1}" r="${i*0.7}" fill="${a}"/>
|
|
3343
3684
|
<circle cx="${n*0.9}" cy="${n*0.1}" r="${i*0.7}" fill="${e}"/>
|
|
3344
3685
|
</svg>
|
|
3345
|
-
`;return`data:image/svg+xml,${encodeURIComponent(c.trim())}`}function
|
|
3686
|
+
`;return`data:image/svg+xml,${encodeURIComponent(c.trim())}`}function zo({colors:t=["#3E5EB9","#FECD00","#B10C0C","#FFFFFF"],size:n=50}={}){let[r,o,a,e]=t,l=`
|
|
3346
3687
|
<svg xmlns="http://www.w3.org/2000/svg" width="${n}" height="${n}" viewBox="0 0 ${n} ${n}">
|
|
3347
|
-
<rect width="${n}" height="${n}" fill="${
|
|
3688
|
+
<rect width="${n}" height="${n}" fill="${r}"/>
|
|
3348
3689
|
<!-- Shield shape (central to Eswatini culture) -->
|
|
3349
3690
|
<ellipse cx="${n*0.5}" cy="${n*0.45}" rx="${n*0.35}" ry="${n*0.4}"
|
|
3350
|
-
fill="${
|
|
3691
|
+
fill="${o}" stroke="${a}" stroke-width="3"/>
|
|
3351
3692
|
<!-- Inner pattern -->
|
|
3352
3693
|
<ellipse cx="${n*0.5}" cy="${n*0.45}" rx="${n*0.2}" ry="${n*0.25}"
|
|
3353
3694
|
fill="${a}"/>
|
|
@@ -3362,72 +3703,72 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
3362
3703
|
<polygon points="${n*0.1},${n*0.3} ${n*0.05},${n*0.5} ${n*0.15},${n*0.5}" fill="${e}"/>
|
|
3363
3704
|
<polygon points="${n*0.9},${n*0.3} ${n*0.85},${n*0.5} ${n*0.95},${n*0.5}" fill="${e}"/>
|
|
3364
3705
|
</svg>
|
|
3365
|
-
`;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function
|
|
3366
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="${
|
|
3367
|
-
<rect width="${
|
|
3706
|
+
`;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function tr({primaryColor:t="#FFFFFF",accentColor:n="#00A86B",backgroundColor:r="#1a1a2e",size:o=50}={}){let a=`
|
|
3707
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}">
|
|
3708
|
+
<rect width="${o}" height="${o}" fill="${r}"/>
|
|
3368
3709
|
<!-- Horizontal bands -->
|
|
3369
|
-
<rect x="0" y="${
|
|
3370
|
-
<rect x="0" y="${
|
|
3710
|
+
<rect x="0" y="${o*0.2}" width="${o}" height="${o*0.1}" fill="${t}"/>
|
|
3711
|
+
<rect x="0" y="${o*0.7}" width="${o}" height="${o*0.1}" fill="${t}"/>
|
|
3371
3712
|
<!-- Vertical bands -->
|
|
3372
|
-
<rect x="${
|
|
3373
|
-
<rect x="${
|
|
3713
|
+
<rect x="${o*0.2}" y="0" width="${o*0.1}" height="${o}" fill="${n}"/>
|
|
3714
|
+
<rect x="${o*0.7}" y="0" width="${o*0.1}" height="${o}" fill="${n}"/>
|
|
3374
3715
|
<!-- Central diamond -->
|
|
3375
|
-
<polygon points="${
|
|
3716
|
+
<polygon points="${o*0.5},${o*0.35} ${o*0.65},${o*0.5} ${o*0.5},${o*0.65} ${o*0.35},${o*0.5}"
|
|
3376
3717
|
fill="${n}" stroke="${t}" stroke-width="2"/>
|
|
3377
3718
|
<!-- Corner triangles -->
|
|
3378
|
-
<polygon points="0,0 ${
|
|
3379
|
-
<polygon points="${
|
|
3380
|
-
<polygon points="0,${
|
|
3381
|
-
<polygon points="${
|
|
3719
|
+
<polygon points="0,0 ${o*0.15},0 0,${o*0.15}" fill="${n}"/>
|
|
3720
|
+
<polygon points="${o},0 ${o*0.85},0 ${o},${o*0.15}" fill="${n}"/>
|
|
3721
|
+
<polygon points="0,${o} ${o*0.15},${o} 0,${o*0.85}" fill="${n}"/>
|
|
3722
|
+
<polygon points="${o},${o} ${o*0.85},${o} ${o},${o*0.85}" fill="${n}"/>
|
|
3382
3723
|
</svg>
|
|
3383
|
-
`;return`data:image/svg+xml,${encodeURIComponent(a.trim())}`}function
|
|
3724
|
+
`;return`data:image/svg+xml,${encodeURIComponent(a.trim())}`}function Oi(t,n){t.style.backgroundImage=`url("${n}")`,t.style.backgroundRepeat="repeat"}function nr({primaryColor:t="#8B0000",secondaryColor:n="#000000",accentColor:r="#FFD700",backgroundColor:o="#F5F5DC",size:a=60}={}){let e=`
|
|
3384
3725
|
<svg xmlns="http://www.w3.org/2000/svg" width="${a}" height="${a}" viewBox="0 0 ${a} ${a}">
|
|
3385
|
-
<rect width="${a}" height="${a}" fill="${
|
|
3726
|
+
<rect width="${a}" height="${a}" fill="${o}"/>
|
|
3386
3727
|
<!-- Lozenge (Diamond) - universal protective symbol -->
|
|
3387
3728
|
<polygon points="${a*0.5},${a*0.1} ${a*0.9},${a*0.5} ${a*0.5},${a*0.9} ${a*0.1},${a*0.5}"
|
|
3388
3729
|
fill="${t}" stroke="${n}" stroke-width="2"/>
|
|
3389
3730
|
<!-- Inner geometric details -->
|
|
3390
|
-
<line x1="${a*0.5}" y1="${a*0.1}" x2="${a*0.5}" y2="${a*0.9}" stroke="${
|
|
3391
|
-
<line x1="${a*0.1}" y1="${a*0.5}" x2="${a*0.9}" y2="${a*0.5}" stroke="${
|
|
3731
|
+
<line x1="${a*0.5}" y1="${a*0.1}" x2="${a*0.5}" y2="${a*0.9}" stroke="${r}" stroke-width="2"/>
|
|
3732
|
+
<line x1="${a*0.1}" y1="${a*0.5}" x2="${a*0.9}" y2="${a*0.5}" stroke="${r}" stroke-width="2"/>
|
|
3392
3733
|
<!-- X symbols (Fibula/Cross) -->
|
|
3393
3734
|
<line x1="${a*0.4}" y1="${a*0.4}" x2="${a*0.6}" y2="${a*0.6}" stroke="${n}" stroke-width="2"/>
|
|
3394
3735
|
<line x1="${a*0.6}" y1="${a*0.4}" x2="${a*0.4}" y2="${a*0.6}" stroke="${n}" stroke-width="2"/>
|
|
3395
3736
|
</svg>
|
|
3396
|
-
`;return`data:image/svg+xml,${encodeURIComponent(e.trim())}`}function
|
|
3397
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="${
|
|
3398
|
-
<rect width="${
|
|
3737
|
+
`;return`data:image/svg+xml,${encodeURIComponent(e.trim())}`}function or({primaryColor:t="#4B0082",secondaryColor:n="#8A2BE2",accentColor:r="#FFFFFF",size:o=50}={}){let a=`
|
|
3738
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}">
|
|
3739
|
+
<rect width="${o}" height="${o}" fill="${t}"/>
|
|
3399
3740
|
<!-- Resist circles (Oniko) -->
|
|
3400
|
-
<circle cx="${
|
|
3401
|
-
<circle cx="${
|
|
3402
|
-
<circle cx="${
|
|
3741
|
+
<circle cx="${o*0.5}" cy="${o*0.5}" r="${o*0.35}" fill="none" stroke="${n}" stroke-width="3"/>
|
|
3742
|
+
<circle cx="${o*0.5}" cy="${o*0.5}" r="${o*0.25}" fill="none" stroke="${r}" stroke-width="2" stroke-dasharray="4 2"/>
|
|
3743
|
+
<circle cx="${o*0.5}" cy="${o*0.5}" r="${o*0.1}" fill="${r}" opacity="0.8"/>
|
|
3403
3744
|
<!-- Corner ripples -->
|
|
3404
|
-
<path d="M0,0 Q${
|
|
3405
|
-
<path d="M${
|
|
3745
|
+
<path d="M0,0 Q${o*0.2},0 ${o*0.2},${o*0.2} Q0,${o*0.2} 0,0" fill="${n}"/>
|
|
3746
|
+
<path d="M${o},${o} Q${o*0.8},${o} ${o*0.8},${o*0.8} Q${o},${o*0.8} ${o},${o}" fill="${n}"/>
|
|
3406
3747
|
</svg>
|
|
3407
|
-
`;return`data:image/svg+xml,${encodeURIComponent(a.trim())}`}function
|
|
3408
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="${
|
|
3409
|
-
<rect width="${
|
|
3748
|
+
`;return`data:image/svg+xml,${encodeURIComponent(a.trim())}`}function Wi({primaryColor:t="#2D3D6B",secondaryColor:n="#6B8CC7",accentColor:r="#FFFFFF",size:o=60}={}){let a=`
|
|
3749
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}">
|
|
3750
|
+
<rect width="${o}" height="${o}" fill="${t}"/>
|
|
3410
3751
|
<!-- Southern Cross / Tuareg Star -->
|
|
3411
|
-
<path d="M${
|
|
3412
|
-
fill="none" stroke="${
|
|
3413
|
-
<circle cx="${
|
|
3752
|
+
<path d="M${o*0.5} 0 L${o*0.6} ${o*0.4} L${o} ${o*0.5} L${o*0.6} ${o*0.6} L${o*0.5} ${o} L${o*0.4} ${o*0.6} L0 ${o*0.5} L${o*0.4} ${o*0.4} Z"
|
|
3753
|
+
fill="none" stroke="${r}" stroke-width="2"/>
|
|
3754
|
+
<circle cx="${o*0.5}" cy="${o*0.5}" r="${o*0.1}" fill="${n}"/>
|
|
3414
3755
|
</svg>
|
|
3415
|
-
`;return`data:image/svg+xml,${encodeURIComponent(a.trim())}`}function
|
|
3416
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="${
|
|
3417
|
-
<rect width="${
|
|
3418
|
-
<path d="M${
|
|
3756
|
+
`;return`data:image/svg+xml,${encodeURIComponent(a.trim())}`}function yi({inkColor:t="#3A2E2C",parchmentColor:n="#F4E4BC",size:r=50}={}){let o=`
|
|
3757
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="${r}" height="${r}" viewBox="0 0 ${r} ${r}">
|
|
3758
|
+
<rect width="${r}" height="${r}" fill="${n}"/>
|
|
3759
|
+
<path d="M${r*0.2} ${r*0.2} L${r*0.4} ${r*0.2} M${r*0.3} ${r*0.2} L${r*0.3} ${r*0.5} Q${r*0.4} ${r*0.6} ${r*0.2} ${r*0.7}"
|
|
3419
3760
|
fill="none" stroke="${t}" stroke-width="3" stroke-linecap="round"/>
|
|
3420
|
-
<path d="M${
|
|
3761
|
+
<path d="M${r*0.6} ${r*0.3} C${r*0.8} ${r*0.3} ${r*0.8} ${r*0.6} ${r*0.6} ${r*0.6} L${r*0.8} ${r*0.8}"
|
|
3421
3762
|
fill="none" stroke="${t}" stroke-width="3" stroke-linecap="round"/>
|
|
3422
3763
|
</svg>
|
|
3423
|
-
`;return`data:image/svg+xml,${encodeURIComponent(
|
|
3424
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="${
|
|
3425
|
-
<rect width="${
|
|
3426
|
-
<path d="M${
|
|
3427
|
-
fill="${t}" stroke="${
|
|
3764
|
+
`;return`data:image/svg+xml,${encodeURIComponent(o.trim())}`}function Ui({clayColor:t="#4E342E",earthColor:n="#3E2723",accentColor:r="#BCAAA4",size:o=60}={}){let a=`
|
|
3765
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}">
|
|
3766
|
+
<rect width="${o}" height="${o}" fill="${n}"/>
|
|
3767
|
+
<path d="M${o*0.2} ${o*0.5} Q${o*0.3} ${o*0.2} ${o*0.5} ${o*0.3} T${o*0.8} ${o*0.5} Q${o*0.7} ${o*0.8} ${o*0.5} ${o*0.7} T${o*0.2} ${o*0.5}"
|
|
3768
|
+
fill="${t}" stroke="${r}" stroke-width="2"/>
|
|
3428
3769
|
</svg>
|
|
3429
|
-
`;return`data:image/svg+xml,${encodeURIComponent(a.trim())}`}function
|
|
3430
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="${
|
|
3770
|
+
`;return`data:image/svg+xml,${encodeURIComponent(a.trim())}`}function oe({primaryColor:t="#334155",secondaryColor:n="#1e293b",size:r=100}={}){let o=`
|
|
3771
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="${r}" height="${r}" viewBox="0 0 100 100">
|
|
3431
3772
|
<rect width="100" height="100" fill="${n}"/>
|
|
3432
3773
|
<path d="M10 10 H90 V90 H10 Z" fill="none" stroke="${t}" stroke-width="0.5" opacity="0.3"/>
|
|
3433
3774
|
<path d="M20 20 V50 H50 V80 H80" fill="none" stroke="${t}" stroke-width="1"/>
|
|
@@ -3435,7 +3776,67 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
3435
3776
|
<circle cx="80" cy="80" r="2" fill="${t}"/>
|
|
3436
3777
|
<circle cx="50" cy="50" r="1.5" fill="${t}"/>
|
|
3437
3778
|
</svg>
|
|
3438
|
-
`;return`data:image/svg+xml,${encodeURIComponent(
|
|
3779
|
+
`;return`data:image/svg+xml,${encodeURIComponent(o.trim())}`}function Ni({primaryColor:t="#000000",secondaryColor:n="#FCD116",backgroundColor:r="#FFFFFF",size:o=50}={}){let a=`
|
|
3780
|
+
|
|
3781
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}">
|
|
3782
|
+
|
|
3783
|
+
<rect width="${o}" height="${o}" fill="${r}"/>
|
|
3784
|
+
|
|
3785
|
+
<!-- Adire tie-dye circles -->
|
|
3786
|
+
|
|
3787
|
+
<circle cx="${o*0.2}" cy="${o*0.2}" r="${o*0.15}" fill="${t}"/>
|
|
3788
|
+
|
|
3789
|
+
<circle cx="${o*0.8}" cy="${o*0.2}" r="${o*0.15}" fill="${t}"/>
|
|
3790
|
+
|
|
3791
|
+
<circle cx="${o*0.2}" cy="${o*0.8}" r="${o*0.15}" fill="${t}"/>
|
|
3792
|
+
|
|
3793
|
+
<circle cx="${o*0.8}" cy="${o*0.8}" r="${o*0.15}" fill="${t}"/>
|
|
3794
|
+
|
|
3795
|
+
<circle cx="${o*0.5}" cy="${o*0.5}" r="${o*0.1}" fill="${n}"/>
|
|
3796
|
+
|
|
3797
|
+
<!-- Connecting lines -->
|
|
3798
|
+
|
|
3799
|
+
<line x1="${o*0.2}" y1="${o*0.2}" x2="${o*0.8}" y2="${o*0.8}" stroke="${t}" stroke-width="2"/>
|
|
3800
|
+
|
|
3801
|
+
<line x1="${o*0.8}" y1="${o*0.2}" x2="${o*0.2}" y2="${o*0.8}" stroke="${t}" stroke-width="2"/>
|
|
3802
|
+
|
|
3803
|
+
</svg>
|
|
3804
|
+
|
|
3805
|
+
`;return`data:image/svg+xml,${encodeURIComponent(a.trim())}`}function Vi({colors:t=["#000000","#FCD116","#E82127","#006B3F"],size:n=60}={}){let[r,o,a,e]=t,l=n/6,i=`
|
|
3806
|
+
|
|
3807
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="${n}" height="${n}" viewBox="0 0 ${n} ${n}">
|
|
3808
|
+
|
|
3809
|
+
<rect width="${n}" height="${n}" fill="${o}"/>
|
|
3810
|
+
|
|
3811
|
+
<!-- Horizontal black stripes -->
|
|
3812
|
+
|
|
3813
|
+
<rect x="0" y="0" width="${n}" height="${l}" fill="${r}"/>
|
|
3814
|
+
|
|
3815
|
+
<rect x="0" y="${l*2}" width="${n}" height="${l}" fill="${r}"/>
|
|
3816
|
+
|
|
3817
|
+
<rect x="0" y="${l*4}" width="${n}" height="${l}" fill="${r}"/>
|
|
3818
|
+
|
|
3819
|
+
<!-- Vertical red stripes -->
|
|
3820
|
+
|
|
3821
|
+
<rect x="0" y="0" width="${l}" height="${n}" fill="${a}" opacity="0.6"/>
|
|
3822
|
+
|
|
3823
|
+
<rect x="${l*2}" y="0" width="${l}" height="${n}" fill="${a}" opacity="0.6"/>
|
|
3824
|
+
|
|
3825
|
+
<rect x="${l*4}" y="0" width="${l}" height="${n}" fill="${a}" opacity="0.6"/>
|
|
3826
|
+
|
|
3827
|
+
<!-- Green corner squares -->
|
|
3828
|
+
|
|
3829
|
+
<rect x="0" y="0" width="${l*0.8}" height="${l*0.8}" fill="${e}"/>
|
|
3830
|
+
|
|
3831
|
+
<rect x="${n-l*0.8}" y="0" width="${l*0.8}" height="${l*0.8}" fill="${e}"/>
|
|
3832
|
+
|
|
3833
|
+
<rect x="0" y="${n-l*0.8}" width="${l*0.8}" height="${l*0.8}" fill="${e}"/>
|
|
3834
|
+
|
|
3835
|
+
<rect x="${n-l*0.8}" y="${n-l*0.8}" width="${l*0.8}" height="${l*0.8}" fill="${e}"/>
|
|
3836
|
+
|
|
3837
|
+
</svg>
|
|
3838
|
+
|
|
3839
|
+
`;return`data:image/svg+xml,${encodeURIComponent(i.trim())}`}var rr;var Dn=s(()=>{rr={generatePolygon:Fi,generateShuka:Do,generateHadzabe:Oo,generateKanga:Ji,generateKangaBorder:Wo,generateKitenge:yo,generateMasaiShield:Bi,generateTibeb:Po,generateImigongo:Io,generateKente:Uo,generateAdinkra:No,generateAsoOke:Vo,generateAnkara:Ko,generateBogolan:jo,generateAdire:or,generateKuba:Co,generateKubaBorder:Gi,generateBerber:nr,generateNdebele:To,generateNdebelePaint:Di,generateZulu:Zo,generateZuluBeads:Qi,generateSwazi:zo,generateXhosa:tr,generateYorubaAdire:Ni,generateAkanKente:Vi,applyPattern:Oi,generateTuareg:Wi,generateGeez:yi,generateBoli:Ui,generateCircuit:oe,circuit:oe}});var re={};u(re,{default:()=>ji,KangaCard:()=>On});var On,ji;var ae=s(()=>{v();Dn();On=class On extends b{static get observedAttributes(){return["theme","proverb","proverb-translation"]}constructor(){super();this.render()}connectedCallback(){this.loadStyles(),this.applyTheme()}attributeChangedCallback(t,n,r){if(n!==r)if(t==="theme")this.applyTheme();else this.render()}getThemeColors(){let t=this.getAttribute("theme")||"tanzania",n={tanzania:{primary:"#1EB53A",accent:"#FCD116",border:"#00A3DD",text:"#000000"},maasai:{primary:"#8B0000",accent:"#FF0000",border:"#000000",text:"#FFFFFF"},ndebele:{primary:"#4169E1",accent:"#FFD700",border:"#FF69B4",text:"#000000"}};return n[t]||n.tanzania}applyTheme(){let t=this.getThemeColors(),n=this.shadowRoot.querySelector(".pindo");if(n){let r=generateKangaBorder({primaryColor:t.primary,accentColor:t.accent});n.style.backgroundImage=`url("${r}")`,n.style.backgroundRepeat="repeat"}}render(){let t=this.getAttribute("proverb")||"",n=this.getAttribute("proverb-translation")||"",r=this.getThemeColors();this.shadowRoot.innerHTML=`
|
|
3439
3840
|
<style>
|
|
3440
3841
|
:host {
|
|
3441
3842
|
display: block;
|
|
@@ -3458,7 +3859,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
3458
3859
|
/* Pindo - Decorative Border */
|
|
3459
3860
|
.pindo {
|
|
3460
3861
|
padding: var(--space-13, 13px);
|
|
3461
|
-
background-color: ${
|
|
3862
|
+
background-color: ${r.primary};
|
|
3462
3863
|
}
|
|
3463
3864
|
|
|
3464
3865
|
/* Mji - Central Content Area */
|
|
@@ -3470,8 +3871,8 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
3470
3871
|
|
|
3471
3872
|
/* Jina - Proverb Inscription */
|
|
3472
3873
|
.jina {
|
|
3473
|
-
background-color: ${
|
|
3474
|
-
color: ${
|
|
3874
|
+
background-color: ${r.border};
|
|
3875
|
+
color: ${r.text};
|
|
3475
3876
|
padding: var(--space-8, 8px) var(--space-13, 13px);
|
|
3476
3877
|
text-align: center;
|
|
3477
3878
|
font-style: italic;
|
|
@@ -3498,7 +3899,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
3498
3899
|
}
|
|
3499
3900
|
|
|
3500
3901
|
::slotted(h1), ::slotted(h2), ::slotted(h3) {
|
|
3501
|
-
color: ${
|
|
3902
|
+
color: ${r.primary};
|
|
3502
3903
|
margin-bottom: var(--space-8, 8px);
|
|
3503
3904
|
}
|
|
3504
3905
|
</style>
|
|
@@ -3517,7 +3918,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
3517
3918
|
</div>
|
|
3518
3919
|
`:'<div class="jina"><slot name="proverb"></slot></div>'}
|
|
3519
3920
|
</article>
|
|
3520
|
-
`,this.applyTheme()}};
|
|
3921
|
+
`,this.applyTheme()}};d("af-kanga-card",On);ji=On});var ee={};u(ee,{default:()=>Ci,CulturalCard:()=>Wn});var Wn,Ci;var le=s(()=>{v();Dn();Wn=class Wn extends b{static get observedAttributes(){return["culture","interactive"]}constructor(){super();this._cultures={maasai:{name:"Maasai",region:"Tanzania/Kenya",pattern:"generateShuka",colors:{primary:"#FF0000",accent:"#000000"}},hadzabe:{name:"Hadzabe",region:"Tanzania",pattern:"generateHadzabe",colors:{primary:"#8B4513",accent:"#CD853F"}},swahili:{name:"Swahili",region:"East Africa",pattern:"generateKangaBorder",colors:{primary:"#1EB53A",accent:"#FCD116"}},kitenge:{name:"Kitenge",region:"East Africa",pattern:"generateKitenge",colors:{primary:"#00A3DD",accent:"#1EB53A"}},tibeb:{name:"Tibeb",region:"Ethiopia",pattern:"generateTibeb",colors:{primary:"#009E60",accent:"#FCDD09"}},ashanti:{name:"Ashanti/Akan",region:"Ghana",pattern:"generateKente",colors:{primary:"#FFD700",accent:"#228B22"}},adinkra:{name:"Adinkra",region:"Ghana",pattern:"generateAdinkra",colors:{primary:"#000000",accent:"#CD853F"}},bogolan:{name:"Bogolan",region:"Mali",pattern:"generateBogolan",colors:{primary:"#3E2723",accent:"#D7CCC8"}},yoruba:{name:"Yoruba",region:"Nigeria",pattern:"generateAsoOke",colors:{primary:"#4B0082",accent:"#FFD700"}},ankara:{name:"Ankara",region:"West Africa",pattern:"generateAnkara",colors:{primary:"#FF6B00",accent:"#00A86B"}},kuba:{name:"Kuba Shoowa",region:"DRC",pattern:"generateKuba",colors:{primary:"#D2B48C",accent:"#3E2723"}},imigongo:{name:"Imigongo",region:"Rwanda",pattern:"generateImigongo",colors:{primary:"#000000",accent:"#B22222"}},ndebele:{name:"Ndebele",region:"South Africa",pattern:"generateNdebele",colors:{primary:"#4169E1",accent:"#FFD700"}},zulu:{name:"Zulu",region:"South Africa",pattern:"generateZulu",colors:{primary:"#FF0000",accent:"#000000"}},swazi:{name:"Swazi",region:"Eswatini",pattern:"generateSwazi",colors:{primary:"#3E5EB9",accent:"#FECD00"}},xhosa:{name:"Xhosa",region:"South Africa",pattern:"generateXhosa",colors:{primary:"#00A86B",accent:"#1a1a2e"}}},this.render()}connectedCallback(){this._setupInteraction()}_setupInteraction(){if(!this.hasAttribute("interactive"))return;this.shadowRoot.querySelector(".culture-selector")?.addEventListener("change",(n)=>{this.setAttribute("culture",n.target.value),this.emit("af-culture-change",{culture:n.target.value})})}attributeChangedCallback(){this.render(),this._setupInteraction()}render(){let t=this.getAttribute("culture")||"maasai",n=this.hasAttribute("interactive"),r=this._cultures[t]||this._cultures.maasai,o=rr[r.pattern],a=o?o():"";this.shadowRoot.innerHTML=`
|
|
3521
3922
|
<style>
|
|
3522
3923
|
:host {
|
|
3523
3924
|
display: block;
|
|
@@ -3559,7 +3960,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
3559
3960
|
position: absolute;
|
|
3560
3961
|
bottom: 10px;
|
|
3561
3962
|
left: 10px;
|
|
3562
|
-
background: ${
|
|
3963
|
+
background: ${r.colors.primary};
|
|
3563
3964
|
color: white;
|
|
3564
3965
|
padding: 4px 12px;
|
|
3565
3966
|
border-radius: 20px;
|
|
@@ -3594,7 +3995,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
3594
3995
|
.card-title h3 {
|
|
3595
3996
|
margin: 0;
|
|
3596
3997
|
font-size: 18px;
|
|
3597
|
-
color: ${
|
|
3998
|
+
color: ${r.colors.primary};
|
|
3598
3999
|
}
|
|
3599
4000
|
|
|
3600
4001
|
.culture-icon {
|
|
@@ -3603,7 +4004,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
3603
4004
|
border-radius: 50%;
|
|
3604
4005
|
background-image: url("${a}");
|
|
3605
4006
|
background-size: cover;
|
|
3606
|
-
border: 2px solid ${
|
|
4007
|
+
border: 2px solid ${r.colors.accent};
|
|
3607
4008
|
}
|
|
3608
4009
|
|
|
3609
4010
|
.card-content {
|
|
@@ -3615,7 +4016,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
3615
4016
|
width: 100%;
|
|
3616
4017
|
padding: 10px;
|
|
3617
4018
|
margin-top: 15px;
|
|
3618
|
-
border: 2px solid ${
|
|
4019
|
+
border: 2px solid ${r.colors.primary};
|
|
3619
4020
|
border-radius: 6px;
|
|
3620
4021
|
font-family: inherit;
|
|
3621
4022
|
font-size: 14px;
|
|
@@ -3625,7 +4026,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
3625
4026
|
|
|
3626
4027
|
.culture-selector:focus {
|
|
3627
4028
|
outline: none;
|
|
3628
|
-
box-shadow: 0 0 0 3px ${
|
|
4029
|
+
box-shadow: 0 0 0 3px ${r.colors.primary}30;
|
|
3629
4030
|
}
|
|
3630
4031
|
|
|
3631
4032
|
select option {
|
|
@@ -3641,13 +4042,13 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
3641
4042
|
<article class="cultural-card">
|
|
3642
4043
|
<div class="pattern-header">
|
|
3643
4044
|
<div class="pattern-overlay"></div>
|
|
3644
|
-
<span class="culture-badge">${
|
|
3645
|
-
<span class="region-badge">\uD83D\uDCCD ${
|
|
4045
|
+
<span class="culture-badge">${r.name}</span>
|
|
4046
|
+
<span class="region-badge">\uD83D\uDCCD ${r.region}</span>
|
|
3646
4047
|
</div>
|
|
3647
4048
|
<div class="card-body">
|
|
3648
4049
|
<div class="card-title">
|
|
3649
4050
|
<div class="culture-icon"></div>
|
|
3650
|
-
<h3>${
|
|
4051
|
+
<h3>${r.name} Pattern</h3>
|
|
3651
4052
|
</div>
|
|
3652
4053
|
<div class="card-content">
|
|
3653
4054
|
<slot></slot>
|
|
@@ -3682,7 +4083,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
3682
4083
|
`:""}
|
|
3683
4084
|
</div>
|
|
3684
4085
|
</article>
|
|
3685
|
-
`}};
|
|
4086
|
+
`}};d("af-cultural-card",Wn);Ci=Wn});var ie={};u(ie,{default:()=>Ii,PatternShowcase:()=>yn});var yn,Ii;var be=s(()=>{v();Dn();yn=class yn extends b{static get observedAttributes(){return["region","size"]}constructor(){super();this._allPatterns=[{key:"shuka",name:"Maasai Shuka",region:"east",country:"Tanzania/Kenya",fn:Do,meaning:"Bravery, Unity, Identity"},{key:"hadzabe",name:"Hadzabe",region:"east",country:"Tanzania",fn:Oo,meaning:"Ancient traditions, Hunter-gatherer heritage"},{key:"kanga",name:"Kanga",region:"east",country:"Tanzania/Kenya",fn:Wo,meaning:"Communication, Proverbs, Femininity"},{key:"kitenge",name:"Kitenge",region:"east",country:"East Africa",fn:yo,meaning:"Celebration, African identity"},{key:"tibeb",name:"Tibeb",region:"east",country:"Ethiopia",fn:Po,meaning:"Faith, Tradition, Celebration"},{key:"kente",name:"Kente",region:"west",country:"Ghana",fn:Uo,meaning:"Royalty, Wisdom, Celebration"},{key:"adinkra",name:"Adinkra",region:"west",country:"Ghana",fn:No,meaning:"Philosophy, Proverbs, Wisdom"},{key:"bogolan",name:"Bogolan",region:"west",country:"Mali",fn:jo,meaning:"Earth energy, Protection, Healing"},{key:"asooke",name:"Aso-Oke",region:"west",country:"Nigeria",fn:Vo,meaning:"Prestige, Celebration, Heritage"},{key:"adire",name:"Adire (Indigo)",region:"west",country:"Nigeria",fn:or,meaning:"Creativity, Uniqueness, Depth"},{key:"ankara",name:"Ankara",region:"west",country:"West Africa",fn:Ko,meaning:"Boldness, Pan-African pride"},{key:"kuba",name:"Kuba Shoowa",region:"central",country:"DRC",fn:Co,meaning:"Status, Mathematics, Eternity"},{key:"imigongo",name:"Imigongo",region:"central",country:"Rwanda",fn:Io,meaning:"Resilience, Strength, Artistry"},{key:"berber",name:"Berber",region:"north",country:"North Africa",fn:nr,meaning:"Protection, Nature, Identity"},{key:"ndebele",name:"Ndebele",region:"south",country:"South Africa",fn:To,meaning:"Artistry, Marriage, Status"},{key:"zulu",name:"Zulu Beadwork",region:"south",country:"South Africa",fn:Zo,meaning:"Love letters, Community"},{key:"swazi",name:"Swazi",region:"south",country:"Eswatini",fn:zo,meaning:"Monarchy, Warriors, Pride"},{key:"xhosa",name:"Xhosa",region:"south",country:"South Africa",fn:tr,meaning:"Dignity, Coming of age"}],this.render()}connectedCallback(){this._setupHovers()}_setupHovers(){this.shadowRoot.querySelectorAll(".pattern-item").forEach((t)=>{t.addEventListener("click",()=>{let n=t.dataset.key,r=this._allPatterns.find((o)=>o.key===n);if(r)this.emit("af-pattern-select",{pattern:r})})})}attributeChangedCallback(){this.render(),this._setupHovers()}render(){let t=this.getAttribute("region")||"all",n=this.getAttribute("size")||"md",r=t==="all"?this._allPatterns:this._allPatterns.filter((e)=>e.region===t),o={sm:80,md:120,lg:160},a=o[n]||o.md;this.shadowRoot.innerHTML=`
|
|
3686
4087
|
<style>
|
|
3687
4088
|
:host {
|
|
3688
4089
|
display: block;
|
|
@@ -3802,7 +4203,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
3802
4203
|
</div>
|
|
3803
4204
|
|
|
3804
4205
|
<div class="pattern-grid">
|
|
3805
|
-
${
|
|
4206
|
+
${r.map((e)=>`
|
|
3806
4207
|
<div class="pattern-item" data-key="${e.key}">
|
|
3807
4208
|
<div class="pattern-preview" style="background-image: url('${e.fn()}')"></div>
|
|
3808
4209
|
<div class="pattern-info">
|
|
@@ -3815,7 +4216,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
3815
4216
|
`).join("")}
|
|
3816
4217
|
</div>
|
|
3817
4218
|
</div>
|
|
3818
|
-
`,this.shadowRoot.querySelectorAll(".region-tab").forEach((e)=>{e.addEventListener("click",()=>{this.setAttribute("region",e.dataset.region)})})}};
|
|
4219
|
+
`,this.shadowRoot.querySelectorAll(".region-tab").forEach((e)=>{e.addEventListener("click",()=>{this.setAttribute("region",e.dataset.region)})})}};d("af-pattern-showcase",yn);Ii=yn});var de={};u(de,{AfriLanguageSwitcher:()=>ar});var ar;var ce=s(()=>{v();ar=class ar extends b{static get observedAttributes(){return["current"]}render(){let t=[{code:"en",name:"English"},{code:"sw",name:"Kiswahili"},{code:"fr",name:"Français"},{code:"ar",name:"العربية",dir:"rtl"},{code:"am",name:"አማርኛ"},{code:"yo",name:"Yorùbá"}],n=this.getAttribute("current")||"en",r=t.find((o)=>o.code===n)||t[0];this.shadowRoot.innerHTML=g`
|
|
3819
4220
|
<style>
|
|
3820
4221
|
:host { display: inline-block; position: relative; font-family: var(--font-body); }
|
|
3821
4222
|
.switcher-btn {
|
|
@@ -3856,17 +4257,17 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
3856
4257
|
|
|
3857
4258
|
<button class="switcher-btn">
|
|
3858
4259
|
<span>🌍</span>
|
|
3859
|
-
<span>${
|
|
4260
|
+
<span>${r.name}</span>
|
|
3860
4261
|
</button>
|
|
3861
4262
|
|
|
3862
4263
|
<div class="dropdown">
|
|
3863
|
-
${t.map((
|
|
3864
|
-
<div class="lang-option" data-code="${
|
|
3865
|
-
${
|
|
4264
|
+
${t.map((o)=>g`
|
|
4265
|
+
<div class="lang-option" data-code="${o.code}" dir="${o.dir||"ltr"}">
|
|
4266
|
+
${o.name}
|
|
3866
4267
|
</div>
|
|
3867
4268
|
`)}
|
|
3868
4269
|
</div>
|
|
3869
|
-
`,this.shadowRoot.querySelector(".switcher-btn").onclick=()=>{this.toggleAttribute("open")},this.shadowRoot.querySelectorAll(".lang-option").forEach((
|
|
4270
|
+
`,this.shadowRoot.querySelector(".switcher-btn").onclick=()=>{this.toggleAttribute("open")},this.shadowRoot.querySelectorAll(".lang-option").forEach((o)=>{o.onclick=()=>{let a=o.dataset.code;if(this.setAttribute("current",a),this.removeAttribute("open"),this.emit("lang-change",{code:a}),a==="ar")document.documentElement.dir="rtl";else document.documentElement.dir="ltr"}})}connectedCallback(){this.render()}attributeChangedCallback(){this.render()}};d("af-language-switcher",ar)});var fe={};u(fe,{AfriAuth:()=>er});var er;var he=s(()=>{v();er=class er extends b{constructor(){super();this.mode="login"}connectedCallback(){this.render(),this.setupEvents()}setupEvents(){let t=this.shadowRoot.querySelector("form"),n=this.shadowRoot.querySelector(".toggle-mode");if(n)n.addEventListener("click",(r)=>{r.preventDefault(),this.mode=this.mode==="login"?"register":"login",this.render(),this.setupEvents()});if(t)t.addEventListener("submit",async(r)=>{r.preventDefault();let o=this.shadowRoot.querySelector("#email").value,a=this.shadowRoot.querySelector("#password").value,e=this.shadowRoot.querySelector(".feedback");e.textContent="Processing...";try{let i=await(await fetch("/api/auth",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:this.mode,email:o,password:a})})).json();if(i.error)e.textContent=i.error,e.style.color="#ef4444";else e.textContent="Success! Redirecting...",e.style.color="#22c55e",setTimeout(()=>window.location.href="/",1000)}catch(l){e.textContent="Network Error"}})}render(){let t=this.mode==="login";this.shadowRoot.innerHTML=`
|
|
3870
4271
|
<style>
|
|
3871
4272
|
:host {
|
|
3872
4273
|
display: block;
|
|
@@ -3964,7 +4365,7 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
3964
4365
|
<span class="toggle-mode">${t?"Create an account":"Sign in"}</span>
|
|
3965
4366
|
</div>
|
|
3966
4367
|
</div>
|
|
3967
|
-
`}};
|
|
4368
|
+
`}};d("af-auth",er)});var ge={};u(ge,{default:()=>Pi});var lr,Pi;var se=s(()=>{v();lr=class lr extends b{constructor(){super();this.currentTheme="dark"}connectedCallback(){this.loadStyles();let t=localStorage.getItem("africode-theme");if(t)this.currentTheme=t,document.documentElement.setAttribute("data-theme",t);else{let n=window.matchMedia("(prefers-color-scheme: light)").matches;this.currentTheme=n?"light":"dark",document.documentElement.setAttribute("data-theme",this.currentTheme)}this.render()}toggleTheme(){this.currentTheme=this.currentTheme==="dark"?"light":"dark",document.documentElement.setAttribute("data-theme",this.currentTheme),localStorage.setItem("africode-theme",this.currentTheme),window.dispatchEvent(new CustomEvent("theme-changed",{detail:{theme:this.currentTheme}})),this.render()}render(){let t=this.currentTheme==="dark";this.shadowRoot.innerHTML=g`
|
|
3968
4369
|
<style>
|
|
3969
4370
|
.toggle-btn {
|
|
3970
4371
|
background: var(--bg-surface-elevated, var(--afri-obsidian));
|
|
@@ -3993,13 +4394,13 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
3993
4394
|
<span class="icon">\${isDark ? '🌙' : '☀️'}</span>
|
|
3994
4395
|
<span>\${isDark ? 'Dark Mode' : 'Light Mode'}</span>
|
|
3995
4396
|
</button>
|
|
3996
|
-
`;let n=this.shadowRoot.querySelector(".toggle-btn");if(n)n.addEventListener("click",()=>this.toggleTheme())}};
|
|
4397
|
+
`;let n=this.shadowRoot.querySelector(".toggle-btn");if(n)n.addEventListener("click",()=>this.toggleTheme())}};d("af-theme-toggle",lr);Pi=lr});v();v();class Kn extends b{static get observedAttributes(){return["theme","fallback-message"]}constructor(){super();this._hasError=!1,this._errorDetail=null,this.render()}connectedCallback(){this.addEventListener("af-component-error",this._handleError.bind(this))}disconnectedCallback(){this.removeEventListener("af-component-error",this._handleError.bind(this))}_handleError(t){t.stopPropagation(),this._hasError=!0,this._errorDetail=t.detail,console.warn("[AfriCode Boundary] Caught error:",this._errorDetail),this.render()}reset(){this._hasError=!1,this._errorDetail=null,this.render()}attributeChangedCallback(){this.render()}render(){let t=this.getAttribute("theme")||"tanzania",n=this.getAttribute("fallback-message")||"A part of this page failed to load.",r={tanzania:{bg:"#FFF9E6",border:"#FCD116",text:"#5A4A00"},maasai:{bg:"#FFEEEE",border:"#FF0000",text:"#8B0000"},ndebele:{bg:"#EBF0FF",border:"#4169E1",text:"#002B5C"},ocean:{bg:"#E6FAFF",border:"#00A3DD",text:"#004A66"}},o=r[t]||r.tanzania;if(this._hasError){this.shadowRoot.innerHTML=`
|
|
3997
4398
|
<style>
|
|
3998
4399
|
:host { display: block; width: 100%; font-family: 'Inter', system-ui, sans-serif; }
|
|
3999
4400
|
.boundary-error {
|
|
4000
|
-
background: ${
|
|
4001
|
-
border-left: 4px solid ${
|
|
4002
|
-
color: ${
|
|
4401
|
+
background: ${o.bg};
|
|
4402
|
+
border-left: 4px solid ${o.border};
|
|
4403
|
+
color: ${o.text};
|
|
4003
4404
|
padding: 16px 20px;
|
|
4004
4405
|
border-radius: 4px;
|
|
4005
4406
|
margin: 12px 0;
|
|
@@ -4032,8 +4433,8 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
4032
4433
|
}
|
|
4033
4434
|
button {
|
|
4034
4435
|
background: transparent;
|
|
4035
|
-
border: 1px solid ${
|
|
4036
|
-
color: ${
|
|
4436
|
+
border: 1px solid ${o.border};
|
|
4437
|
+
color: ${o.text};
|
|
4037
4438
|
padding: 6px 12px;
|
|
4038
4439
|
border-radius: 4px;
|
|
4039
4440
|
cursor: pointer;
|
|
@@ -4064,6 +4465,6 @@ var Ta=Object.defineProperty;var Za=(t)=>t;function za(t,n){this[t]=Za.bind(null
|
|
|
4064
4465
|
`,this.shadowRoot.getElementById("retry-btn").addEventListener("click",()=>{this.reset()});return}this.shadowRoot.innerHTML=`
|
|
4065
4466
|
<style>:host { display: block; }</style>
|
|
4066
4467
|
<slot></slot>
|
|
4067
|
-
`}}
|
|
4468
|
+
`}}d("af-error-boundary",Kn);jn();Cn();In();Pn();Tn();Zn();zn();to();no();oo();ro();ao();eo();io();bo();co();fo();ho();go();so();mo();po();vo();uo();$o();wo();xo();Ao();qo();Lo();Eo();var Ti={"af-button":()=>Promise.resolve().then(() => (yr(),Wr)),"af-card":()=>Promise.resolve().then(() => (Nr(),Ur)),"af-navbar":()=>Promise.resolve().then(() => (Cr(),jr)),"af-input":()=>Promise.resolve().then(() => (ga(),ha)),"af-alert":()=>Promise.resolve().then(() => (ma(),sa)),"af-grid":()=>Promise.resolve().then(() => (va(),pa)),"af-section":()=>Promise.resolve().then(() => ($a(),ua)),"af-icon":()=>Promise.resolve().then(() => (xa(),wa)),"af-ui-button":()=>Promise.resolve().then(() => (jn(),dr)),"af-ui-card":()=>Promise.resolve().then(() => (Cn(),cr)),"af-ui-input":()=>Promise.resolve().then(() => (In(),fr)),"af-ui-badge":()=>Promise.resolve().then(() => (Pn(),hr)),"af-ui-switch":()=>Promise.resolve().then(() => (Tn(),gr)),"af-ui-select":()=>Promise.resolve().then(() => (Zn(),sr)),"af-ui-textarea":()=>Promise.resolve().then(() => (zn(),mr)),"af-ui-chip":()=>Promise.resolve().then(() => (to(),pr)),"af-ui-tag":()=>Promise.resolve().then(() => (no(),vr)),"af-ui-avatar":()=>Promise.resolve().then(() => (oo(),ur)),"af-ui-progress-ring":()=>Promise.resolve().then(() => (ro(),$r)),"af-ui-tooltip":()=>Promise.resolve().then(() => (ao(),wr)),"af-ui-popover":()=>Promise.resolve().then(() => (eo(),xr)),"af-ui-tabs":()=>Promise.resolve().then(() => (io(),Ar)),"af-ui-table":()=>Promise.resolve().then(() => (bo(),_r)),"af-ui-stat":()=>Promise.resolve().then(() => (co(),kr)),"af-footer":()=>Promise.resolve().then(() => (fo(),qr)),"af-breadcrumb":()=>Promise.resolve().then(() => (ho(),Lr)),"af-feature-grid":()=>Promise.resolve().then(() => (go(),Er)),"af-pricing-card":()=>Promise.resolve().then(() => (so(),Mr)),"af-testimonial":()=>Promise.resolve().then(() => (mo(),Hr)),"af-dashboard-shell":()=>Promise.resolve().then(() => (po(),Sr)),"af-dashboard-topbar":()=>Promise.resolve().then(() => (vo(),Rr)),"af-dashboard-card":()=>Promise.resolve().then(() => (uo(),Yr)),"af-dashboard-metric":()=>Promise.resolve().then(() => ($o(),Xr)),"af-dashboard-activity-list":()=>Promise.resolve().then(() => (wo(),Fr)),"af-accordion":()=>Promise.resolve().then(() => (_a(),Aa)),"af-hero":()=>Promise.resolve().then(() => (qa(),ka)),"af-table":()=>Promise.resolve().then(() => (Ea(),La)),"af-modal":()=>Promise.resolve().then(() => (Ha(),Ma)),"af-tabs":()=>Promise.resolve().then(() => (Ra(),Sa)),"af-sidebar":()=>Promise.resolve().then(() => (Xa(),Ya)),"af-dropdown":()=>Promise.resolve().then(() => (Ja(),Fa)),"af-select":()=>Promise.resolve().then(() => (Qa(),Ga)),"af-form":()=>Promise.resolve().then(() => (Da(),Ba)),"af-tooltip":()=>Promise.resolve().then(() => (Wa(),Oa)),"af-toast":()=>Promise.resolve().then(() => (Ua(),ya)),"af-badge":()=>Promise.resolve().then(() => (Va(),Na)),"af-avatar":()=>Promise.resolve().then(() => (ja(),Ka)),"af-progress":()=>Promise.resolve().then(() => (Ia(),Ca)),"af-loader":()=>Promise.resolve().then(() => (Ta(),Pa)),"af-skeleton":()=>Promise.resolve().then(() => (za(),Za)),"af-divider":()=>Promise.resolve().then(() => (ne(),te)),"af-kanga-card":()=>Promise.resolve().then(() => (ae(),re)),"af-cultural-card":()=>Promise.resolve().then(() => (le(),ee)),"af-pattern-showcase":()=>Promise.resolve().then(() => (be(),ie)),"af-language-switcher":()=>Promise.resolve().then(() => (ce(),de)),"af-auth":()=>Promise.resolve().then(() => (he(),fe)),"af-auth-form":()=>Promise.resolve().then(() => (xo(),Jr)),"af-kyc-upload":()=>Promise.resolve().then(() => (Ao(),Gr)),"af-wallet-balance":()=>Promise.resolve().then(() => (qo(),Qr)),"af-transaction-ledger":()=>Promise.resolve().then(() => (Lo(),Dr)),"af-nav-drawer":()=>Promise.resolve().then(() => (Eo(),Or)),"af-theme-toggle":()=>Promise.resolve().then(() => (se(),ge))},Nc=Ti;export{Nc as default,Ti as componentMap,rn as AfriWalletBalance,Mt as AfriUITooltip,_t as AfriUITextarea,qt as AfriUITag,St as AfriUITabs,Rt as AfriUITable,xt as AfriUISwitch,Yt as AfriUIStat,At as AfriUISelect,Et as AfriUIProgressRing,Ht as AfriUIPopover,$t as AfriUIInput,kt as AfriUIChip,ut as AfriUICard,vt as AfriUIButton,wt as AfriUIBadge,Lt as AfriUIAvatar,an as AfriTransactionLedger,Qt as AfriTestimonial,Gt as AfriPricingCard,Ut as AfriNavDrawer,on as AfriKycUpload,Xt as AfriFooter,Jt as AfriFeatureGrid,Kn as AfriErrorBoundary,Dt as AfriDashboardTopbar,Bt as AfriDashboardShell,Wt as AfriDashboardMetric,Ot as AfriDashboardCard,yt as AfriDashboardActivityList,b as AfriCodeComponent,Ft as AfriBreadcrumb,nn as AfriAuthForm};
|
|
4068
4469
|
|
|
4069
|
-
//# debugId=
|
|
4470
|
+
//# debugId=813F24D57AFAE13564756E2164756E21
|