@africode/core 5.0.4 → 5.0.6
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/AGENTS.md +583 -0
- package/AGENT_INSTRUCTIONS.md +595 -0
- package/COMPONENT_SCHEMA.json +990 -836
- package/README.md +32 -0
- package/components/index.js +14 -0
- package/components/ui-badge.js +61 -0
- package/components/ui-button.js +149 -0
- package/components/ui-card.js +75 -0
- package/components/ui-input.js +110 -0
- package/components/ui-switch.js +85 -0
- package/core/cli/commands/build.js +31 -1
- package/core/cli/commands/dev.js +38 -1
- package/core/lipa-namba-journey.js +28 -6
- package/dist/africode.js +672 -422
- package/dist/africode.js.map +9 -4
- package/dist/build-info.json +3 -3
- package/dist/components.js +554 -304
- package/dist/components.js.map +9 -4
- package/package.json +3 -1
- package/templates/starter-tailwind/src/pages/index.js +30 -0
- package/templates/starter-tailwind/tailwind.config.cjs +18 -0
package/dist/components.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Va=Object.defineProperty;var ja=(t)=>t;function ea(t,n){this[t]=ja.bind(null,n)}var H=(t,n)=>{for(var a in n)Va(t,a,{get:n[a],enumerable:!0,configurable:!0,set:ea.bind(n,a)})};var A=(t,n)=>()=>(t&&(n=t(t=0)),n);class xn{constructor(t){this.value=t,this.__type="RawHtml",Object.freeze(this)}toString(){return this.value}valueOf(){return this.value}}function Na(t){return String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function bo(t){if(t instanceof xn)return t.toString();if(Array.isArray(t))return t.map(bo).join("");if(t===null||t===void 0||t===!1)return"";if(t===!0)return"true";return Na(t)}var Y=(t,...n)=>{let a="";for(let o=0;o<t.length;o++)if(a+=t[o],o<n.length)a+=bo(n[o]);return new xn(a)};function d(t,n){if(typeof customElements>"u")return;if(!customElements.get(t))customElements.define(t,n)}var Ka,ro,c;var q=A(()=>{Ka=globalThis.HTMLElement??class{},ro=typeof CSSStyleSheet<"u";c=class c extends Ka{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,257 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.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(!ro)return;if(!(t instanceof CSSStyleSheet))return;if(!c.globalSheets.includes(t))c.globalSheets.push(t)}async loadStyles(t=""){if(!this.shadowRoot)return;let a=ro&&"adoptedStyleSheets"in this.shadowRoot,o=typeof t==="string"&&t.length>0?t:"/styles/africanity.css",l=typeof t==="string"&&t.length>0?t:null;if(c.styleCache.has(o)){let b=c.styleCache.get(o);if(a)this.shadowRoot.adoptedStyleSheets=[b,...c.globalSheets];else this._applyFallbackStyle(b?.cssText||b?.text||b||"");return}try{let b=l;if(!b){let r=await fetch("/styles/africanity.css");if(!r.ok)throw Error(`Unable to load stylesheet: ${r.status}`);b=await r.text()}if(a){let r=new CSSStyleSheet;r.replaceSync(b),c.styleCache.set(o,r),this.shadowRoot.adoptedStyleSheets=[r,...c.globalSheets];return}this._applyFallbackStyle(b),c.styleCache.set(o,{text:b})}catch(b){this._applyFallbackStyle(l||"")}}_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:a={},text:o=""}={}){let l=document.createElement(t);if(n.length)l.classList.add(...n);if(Object.entries(a).forEach(([b,r])=>l.setAttribute(b,r)),o)l.textContent=o;return l}emit(t,n){this.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0,composed:!0}))}}});var ho={};H(ho,{default:()=>Ia,AfriUIButton:()=>At});var At,Ia;var qn=A(()=>{q();At=class At extends c{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",a=this.hasAttribute("disabled"),o=this.hasAttribute("loading"),l=this.getAttribute("aria-label")||"";this.shadowRoot.innerHTML=Y`
|
|
21
|
+
<style>
|
|
22
|
+
:host { display: inline-block; }
|
|
23
|
+
|
|
24
|
+
button {
|
|
25
|
+
all: unset;
|
|
26
|
+
box-sizing: border-box;
|
|
27
|
+
min-height: 42px;
|
|
28
|
+
padding: 0 18px;
|
|
29
|
+
border-radius: 999px;
|
|
30
|
+
font-family: 'Inter', system-ui, sans-serif;
|
|
31
|
+
font-weight: 600;
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
display: inline-flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
justify-content: center;
|
|
36
|
+
gap: 0.5rem;
|
|
37
|
+
transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
|
|
38
|
+
text-decoration: none;
|
|
39
|
+
border: 1px solid transparent;
|
|
40
|
+
user-select: none;
|
|
41
|
+
white-space: nowrap;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
:host([full-width]) button { width: 100%; }
|
|
45
|
+
|
|
46
|
+
button.primary {
|
|
47
|
+
background: #2563eb;
|
|
48
|
+
color: #fff;
|
|
49
|
+
box-shadow: 0 8px 24px rgba(37, 99, 235, 0.24);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
button.primary:hover:not(:disabled) {
|
|
53
|
+
transform: translateY(-1px);
|
|
54
|
+
background: #1d4ed8;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
button.secondary {
|
|
58
|
+
background: #f8fafc;
|
|
59
|
+
color: #1f2937;
|
|
60
|
+
border-color: #cbd5e1;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
button.secondary:hover:not(:disabled) {
|
|
64
|
+
background: #e2e8f0;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
button.ghost {
|
|
68
|
+
background: transparent;
|
|
69
|
+
color: #0f172a;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
button.ghost:hover:not(:disabled) {
|
|
73
|
+
background: rgba(15, 23, 42, 0.05);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
button.link {
|
|
77
|
+
background: transparent;
|
|
78
|
+
color: #2563eb;
|
|
79
|
+
box-shadow: none;
|
|
80
|
+
padding: 0;
|
|
81
|
+
border-radius: 0;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
button.link:hover:not(:disabled) {
|
|
85
|
+
text-decoration: underline;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
button.size-sm { min-height: 34px; padding: 0 14px; font-size: 0.85rem; }
|
|
89
|
+
button.size-md { min-height: 42px; padding: 0 18px; font-size: 0.95rem; }
|
|
90
|
+
button.size-lg { min-height: 50px; padding: 0 22px; font-size: 1rem; }
|
|
91
|
+
|
|
92
|
+
button:disabled {
|
|
93
|
+
opacity: 0.55;
|
|
94
|
+
cursor: not-allowed;
|
|
95
|
+
transform: none;
|
|
96
|
+
box-shadow: none;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.spinner {
|
|
100
|
+
width: 18px;
|
|
101
|
+
height: 18px;
|
|
102
|
+
border: 2px solid currentColor;
|
|
103
|
+
border-bottom-color: transparent;
|
|
104
|
+
border-radius: 999px;
|
|
105
|
+
animation: spin 0.8s linear infinite;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
@keyframes spin { to { transform: rotate(360deg); } }
|
|
109
|
+
</style>
|
|
110
|
+
|
|
111
|
+
<button
|
|
112
|
+
class="${t} ${n}"
|
|
113
|
+
${a?"disabled":""}
|
|
114
|
+
${l?`aria-label="${l}"`:""}
|
|
115
|
+
${o?'aria-busy="true"':""}
|
|
116
|
+
>
|
|
117
|
+
${o?Y`<span class="spinner"></span>`:""}
|
|
118
|
+
<slot></slot>
|
|
119
|
+
</button>
|
|
120
|
+
`}};d("af-ui-button",At);Ia=At});var fo={};H(fo,{default:()=>Pa,AfriUICard:()=>mt});var mt,Pa;var pn=A(()=>{q();mt=class mt extends c{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"),a=this.hasAttribute("clickable");this.shadowRoot.innerHTML=Y`
|
|
121
|
+
<style>
|
|
122
|
+
:host { display: block; }
|
|
123
|
+
|
|
124
|
+
.card {
|
|
125
|
+
border-radius: 1rem;
|
|
126
|
+
padding: 1.5rem;
|
|
127
|
+
background: #ffffff;
|
|
128
|
+
color: #0f172a;
|
|
129
|
+
transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
|
|
130
|
+
border: 1px solid transparent;
|
|
131
|
+
box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.card.elevated { background: #fff; }
|
|
135
|
+
.card.flat { background: #f8fafc; box-shadow: none; }
|
|
136
|
+
.card.outlined { background: #fff; border-color: #e2e8f0; box-shadow: none; }
|
|
137
|
+
|
|
138
|
+
.card:hover:not(.disabled) {
|
|
139
|
+
transform: translateY(-2px);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
:host([bordered]) .card { border-color: #cbd5e1; }
|
|
143
|
+
|
|
144
|
+
:host([clickable]) .card { cursor: pointer; }
|
|
145
|
+
</style>
|
|
146
|
+
|
|
147
|
+
<article class="card ${t}">
|
|
148
|
+
<slot></slot>
|
|
149
|
+
</article>
|
|
150
|
+
`}};d("af-ui-card",mt);Pa=mt});var go={};H(go,{default:()=>Ca,AfriUIInput:()=>xt});var xt,Ca;var Hn=A(()=>{q();xt=class xt extends c{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")||"",a=this.getAttribute("type")||"text",o=this.getAttribute("value")||"",l=this.hasAttribute("disabled"),b=this.getAttribute("error")||"";this.shadowRoot.innerHTML=Y`
|
|
151
|
+
<style>
|
|
152
|
+
:host { display: block; font-family: 'Inter', system-ui, sans-serif; }
|
|
153
|
+
|
|
154
|
+
label {
|
|
155
|
+
display: block;
|
|
156
|
+
font-size: 0.85rem;
|
|
157
|
+
font-weight: 600;
|
|
158
|
+
margin-bottom: 0.5rem;
|
|
159
|
+
color: #111827;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.field {
|
|
163
|
+
display: grid;
|
|
164
|
+
gap: 0.45rem;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
input {
|
|
168
|
+
width: 100%;
|
|
169
|
+
border: 1px solid #d1d5db;
|
|
170
|
+
border-radius: 0.75rem;
|
|
171
|
+
padding: 0.95rem 1rem;
|
|
172
|
+
font-size: 0.95rem;
|
|
173
|
+
color: #111827;
|
|
174
|
+
background: #ffffff;
|
|
175
|
+
transition: border-color 150ms ease, box-shadow 150ms ease;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
input:focus {
|
|
179
|
+
outline: none;
|
|
180
|
+
border-color: #2563eb;
|
|
181
|
+
box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
input:disabled {
|
|
185
|
+
opacity: 0.65;
|
|
186
|
+
cursor: not-allowed;
|
|
187
|
+
background: #f8fafc;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.error {
|
|
191
|
+
color: #dc2626;
|
|
192
|
+
font-size: 0.8rem;
|
|
193
|
+
min-height: 1rem;
|
|
194
|
+
}
|
|
195
|
+
</style>
|
|
196
|
+
|
|
197
|
+
<div class="field">
|
|
198
|
+
${t?Y`<label>${t}</label>`:""}
|
|
199
|
+
<input
|
|
200
|
+
type="${a}"
|
|
201
|
+
placeholder="${n}"
|
|
202
|
+
value="${o}"
|
|
203
|
+
${l?"disabled":""}
|
|
204
|
+
aria-invalid="${Boolean(b)}"
|
|
205
|
+
/>
|
|
206
|
+
<div class="error">${b}</div>
|
|
207
|
+
</div>
|
|
208
|
+
`}};d("af-ui-input",xt);Ca=xt});var co={};H(co,{default:()=>Ta,AfriUIBadge:()=>kt});var kt,Ta;var En=A(()=>{q();kt=class kt extends c{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",a=this.hasAttribute("pill");this.shadowRoot.innerHTML=Y`
|
|
209
|
+
<style>
|
|
210
|
+
:host { display: inline-block; font-family: 'Inter', system-ui, sans-serif; }
|
|
211
|
+
|
|
212
|
+
.badge {
|
|
213
|
+
display: inline-flex;
|
|
214
|
+
align-items: center;
|
|
215
|
+
justify-content: center;
|
|
216
|
+
gap: 0.4rem;
|
|
217
|
+
border-radius: ${a?"999px":"0.6rem"};
|
|
218
|
+
padding: ${n==="sm"?"0.25rem 0.65rem":n==="lg"?"0.55rem 1rem":"0.4rem 0.8rem"};
|
|
219
|
+
font-size: ${n==="sm"?"0.75rem":n==="lg"?"0.95rem":"0.85rem"};
|
|
220
|
+
font-weight: 700;
|
|
221
|
+
color: #111827;
|
|
222
|
+
background: var(--af-ui-badge-bg, #e2e8f0);
|
|
223
|
+
border: 1px solid transparent;
|
|
224
|
+
white-space: nowrap;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.badge.primary { background: #2563eb; color: #ffffff; }
|
|
228
|
+
.badge.success { background: #16a34a; color: #ffffff; }
|
|
229
|
+
.badge.warning { background: #f59e0b; color: #0f172a; }
|
|
230
|
+
.badge.danger { background: #dc2626; color: #ffffff; }
|
|
231
|
+
.badge.secondary { background: #f8fafc; color: #0f172a; }
|
|
232
|
+
</style>
|
|
233
|
+
|
|
234
|
+
<span class="badge ${t}"><slot></slot></span>
|
|
235
|
+
`}};d("af-ui-badge",kt);Ta=kt});var $o={};H($o,{default:()=>ya,AfriUISwitch:()=>qt});var qt,ya;var Mn=A(()=>{q();qt=class qt extends c{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"),a=this.getAttribute("size")||"md",o=a==="sm"?{width:36,height:20,knob:14}:a==="lg"?{width:56,height:32,knob:24}:{width:48,height:28,knob:20},l=t?"true":"false";this.shadowRoot.innerHTML=Y`
|
|
236
|
+
<style>
|
|
237
|
+
:host { display: inline-block; }
|
|
238
|
+
|
|
239
|
+
button {
|
|
240
|
+
all: unset;
|
|
241
|
+
position: relative;
|
|
242
|
+
width: ${o.width}px;
|
|
243
|
+
height: ${o.height}px;
|
|
244
|
+
border-radius: ${o.height/2}px;
|
|
245
|
+
background: ${t?"#2563eb":"#e5e7eb"};
|
|
246
|
+
cursor: ${n?"not-allowed":"pointer"};
|
|
247
|
+
transition: background 180ms ease;
|
|
248
|
+
box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.knob {
|
|
252
|
+
position: absolute;
|
|
253
|
+
top: 50%;
|
|
254
|
+
left: ${t?`${o.width-o.knob-4}px`:"4px"};
|
|
255
|
+
transform: translateY(-50%);
|
|
256
|
+
width: ${o.knob}px;
|
|
257
|
+
height: ${o.knob}px;
|
|
258
|
+
border-radius: 999px;
|
|
259
|
+
background: #ffffff;
|
|
260
|
+
transition: left 180ms ease;
|
|
261
|
+
box-shadow: 0 2px 6px rgba(15, 23, 42, 0.16);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
button:disabled { opacity: 0.65; }
|
|
265
|
+
</style>
|
|
266
|
+
|
|
267
|
+
<button role="switch" aria-checked="${l}" ${n?"disabled":""}>
|
|
268
|
+
<span class="knob"></span>
|
|
269
|
+
</button>
|
|
270
|
+
`}};d("af-ui-switch",qt);ya=qt});var vo={};H(vo,{default:()=>Za,AfriButton:()=>Rt});var Rt,Za;var wo=A(()=>{q();Rt=class Rt extends c{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",a=this.getAttribute("theme")||"tanzania",o=this.hasAttribute("disabled"),l=this.hasAttribute("loading"),b=this.getAttribute("icon"),r=this.getAttribute("aria-label"),h={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"}},f=h[a]||h.tanzania;this.shadowRoot.innerHTML=`
|
|
21
271
|
<style>
|
|
22
272
|
:host {
|
|
23
273
|
display: inline-block;
|
|
@@ -45,8 +295,8 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
45
295
|
|
|
46
296
|
/* Variants */
|
|
47
297
|
.variant-primary {
|
|
48
|
-
background: ${
|
|
49
|
-
color: ${
|
|
298
|
+
background: ${f.primary};
|
|
299
|
+
color: ${f.text};
|
|
50
300
|
}
|
|
51
301
|
.variant-primary:hover:not(:disabled) {
|
|
52
302
|
filter: brightness(1.1);
|
|
@@ -56,25 +306,25 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
56
306
|
|
|
57
307
|
.variant-secondary {
|
|
58
308
|
background: transparent;
|
|
59
|
-
color: ${
|
|
60
|
-
border: 2px solid ${
|
|
309
|
+
color: ${f.primary};
|
|
310
|
+
border: 2px solid ${f.primary};
|
|
61
311
|
}
|
|
62
312
|
.variant-secondary:hover:not(:disabled) {
|
|
63
|
-
background: ${
|
|
64
|
-
color: ${
|
|
313
|
+
background: ${f.primary};
|
|
314
|
+
color: ${f.text};
|
|
65
315
|
}
|
|
66
316
|
|
|
67
317
|
.variant-ghost {
|
|
68
318
|
background: transparent;
|
|
69
|
-
color: ${
|
|
319
|
+
color: ${f.primary};
|
|
70
320
|
}
|
|
71
321
|
.variant-ghost:hover:not(:disabled) {
|
|
72
322
|
background: rgba(0,0,0,0.05);
|
|
73
323
|
}
|
|
74
324
|
|
|
75
325
|
.variant-gradient {
|
|
76
|
-
background: linear-gradient(135deg, ${
|
|
77
|
-
color: ${
|
|
326
|
+
background: linear-gradient(135deg, ${f.primary} 0%, ${f.accent} 100%);
|
|
327
|
+
color: ${f.text};
|
|
78
328
|
}
|
|
79
329
|
.variant-gradient:hover:not(:disabled) {
|
|
80
330
|
transform: translateY(-2px);
|
|
@@ -114,14 +364,14 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
114
364
|
<button
|
|
115
365
|
class="variant-${t} size-${n}"
|
|
116
366
|
${o?"disabled":""}
|
|
117
|
-
${
|
|
367
|
+
${r?`aria-label="${r}"`:""}
|
|
118
368
|
${l?'aria-busy="true"':""}
|
|
119
369
|
>
|
|
120
370
|
${l?'<span class="spinner"></span>':""}
|
|
121
|
-
${
|
|
371
|
+
${b&&!l?`<span class="icon">${b}</span>`:""}
|
|
122
372
|
<slot></slot>
|
|
123
373
|
</button>
|
|
124
|
-
`}};
|
|
374
|
+
`}};d("af-button",Rt);Za=Rt});var _o={};H(_o,{default:()=>sa,AfriCard:()=>Ft});var Ft,sa;var io=A(()=>{q();Ft=class Ft extends c{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",a=this.hasAttribute("clickable"),o=this.getAttribute("image"),l={default:{accent:"#333",border:"#eee"},tanzania:{accent:"#1EB53A",border:"#1EB53A"},maasai:{accent:"#FF0000",border:"#8B0000"},ndebele:{accent:"#4169E1",border:"#4169E1"}},r={elevated:"box-shadow: 0 2px 12px rgba(0,0,0,0.1);",outlined:`border: 2px solid ${(l[t]||l.default).border};`,flat:"background: #f8f9fa;"};this.shadowRoot.innerHTML=html`
|
|
125
375
|
<style>
|
|
126
376
|
:host {
|
|
127
377
|
display: block;
|
|
@@ -136,7 +386,7 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
136
386
|
overflow: hidden;
|
|
137
387
|
transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
|
|
138
388
|
position: relative;
|
|
139
|
-
${
|
|
389
|
+
${a?"cursor: pointer;":""}
|
|
140
390
|
}
|
|
141
391
|
|
|
142
392
|
.card::before {
|
|
@@ -147,7 +397,7 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
147
397
|
pointer-events: none;
|
|
148
398
|
}
|
|
149
399
|
|
|
150
|
-
${
|
|
400
|
+
${a?`
|
|
151
401
|
.card:hover {
|
|
152
402
|
transform: translateY(-8px);
|
|
153
403
|
border-color: rgba(252, 209, 22, 0.4);
|
|
@@ -199,7 +449,7 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
199
449
|
</div>
|
|
200
450
|
`:""}
|
|
201
451
|
</article>
|
|
202
|
-
`}};
|
|
452
|
+
`}};d("af-card",Ft);sa=Ft});function Yn(t){if(ut.has(t))return ut.get(t);let a=new Proxy(t,{get(o,l,b){let r=Reflect.get(o,l,b);if(r!==null&&typeof r==="object")return Yn(r);return r},set(o,l,b,r){let h=Reflect.get(o,l,r);if(h!==b){let f=Reflect.set(o,l,b,r);if(f)Ao(r,b,h,l);return f}return!0},deleteProperty(o,l){let b=Reflect.get(o,l),r=Reflect.deleteProperty(o,l);if(r){let h=ut.get(o);Ao(h,void 0,b,l)}return r}});return ut.set(t,a),a}function Dt(t,n){if(!Bt.has(t))Bt.set(t,new Set);let a=Bt.get(t);return a.add(n),()=>{a.delete(n)}}function Ao(t,n,a,o){let l=Bt.get(t);if(!l)return;l.forEach((b)=>{try{b(n,a,o)}catch(r){console.error("[AfriCode State] Subscriber error:",r)}})}class mo{constructor(){this.store={}}get(t){return t.split("/").reduce((n,a)=>n?.[a],this.store)}set(t,n){let a=t.split("/"),o=this.store;while(a.length>1){let l=a.shift();if(!o[l]||typeof o[l]!=="object")o[l]={};o=o[l]}o[a[0]]=n}getAll(){return this.store}}var Bt,ut,gr;var pt=A(()=>{Bt=new WeakMap,ut=new WeakMap;gr=new mo});var za,Ht;var Ot=A(()=>{pt();za={theme:"light",language:"en",ui:{sidebarCollapsed:!1,theme:"dark",activePage:"home"},user:{name:"Guest",permissions:[]},config:{animationsEnabled:!0,soundEnabled:!1}},Ht=Yn(za)});var xo={};H(xo,{default:()=>tl,AfriNavbar:()=>Wt});var Wt,tl;var ko=A(()=>{q();Ot();pt();Wt=class Wt extends c{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",a=this.hasAttribute("sticky");this.shadowRoot.innerHTML=`
|
|
203
453
|
<style>
|
|
204
454
|
:host {
|
|
205
455
|
display: block;
|
|
@@ -375,7 +625,7 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
375
625
|
<slot></slot>
|
|
376
626
|
</div>
|
|
377
627
|
</nav>
|
|
378
|
-
`}};_("af-navbar",Dt);D0=Dt});var X,qn,$,V=(t)=>{switch(typeof t){case"undefined":return $.undefined;case"string":return $.string;case"number":return Number.isNaN(t)?$.nan:$.number;case"boolean":return $.boolean;case"function":return $.function;case"bigint":return $.bigint;case"symbol":return $.symbol;case"object":if(Array.isArray(t))return $.array;if(t===null)return $.null;if(t.then&&typeof t.then==="function"&&t.catch&&typeof t.catch==="function")return $.promise;if(typeof Map<"u"&&t instanceof Map)return $.map;if(typeof Set<"u"&&t instanceof Set)return $.set;if(typeof Date<"u"&&t instanceof Date)return $.date;return $.object;default:return $.unknown}};var xt=x(()=>{(function(t){t.assertEqual=(l)=>{};function n(l){}t.assertIs=n;function b(l){throw Error()}t.assertNever=b,t.arrayToEnum=(l)=>{let a={};for(let f of l)a[f]=f;return a},t.getValidEnumValues=(l)=>{let a=t.objectKeys(l).filter((r)=>typeof l[l[r]]!=="number"),f={};for(let r of a)f[r]=l[r];return t.objectValues(f)},t.objectValues=(l)=>{return t.objectKeys(l).map(function(a){return l[a]})},t.objectKeys=typeof Object.keys==="function"?(l)=>Object.keys(l):(l)=>{let a=[];for(let f in l)if(Object.prototype.hasOwnProperty.call(l,f))a.push(f);return a},t.find=(l,a)=>{for(let f of l)if(a(f))return f;return},t.isInteger=typeof Number.isInteger==="function"?(l)=>Number.isInteger(l):(l)=>typeof l==="number"&&Number.isFinite(l)&&Math.floor(l)===l;function o(l,a=" | "){return l.map((f)=>typeof f==="string"?`'${f}'`:f).join(a)}t.joinValues=o,t.jsonStringifyReplacer=(l,a)=>{if(typeof a==="bigint")return a.toString();return a}})(X||(X={}));(function(t){t.mergeShapes=(n,b)=>{return{...n,...b}}})(qn||(qn={}));$=X.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"])});var g,W0=(t)=>{return JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:")},R;var Wt=x(()=>{xt();g=X.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=(b)=>{this.issues=[...this.issues,b]},this.addIssues=(b=[])=>{this.issues=[...this.issues,...b]};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(l){return l.message},b={_errors:[]},o=(l)=>{for(let a of l.issues)if(a.code==="invalid_union")a.unionErrors.map(o);else if(a.code==="invalid_return_type")o(a.returnTypeError);else if(a.code==="invalid_arguments")o(a.argumentsError);else if(a.path.length===0)b._errors.push(n(a));else{let f=b,r=0;while(r<a.path.length){let h=a.path[r];if(r!==a.path.length-1)f[h]=f[h]||{_errors:[]};else f[h]=f[h]||{_errors:[]},f[h]._errors.push(n(a));f=f[h],r++}}};return o(this),b}static assert(t){if(!(t instanceof R))throw Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,X.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=(n)=>n.message){let n={},b=[];for(let o of this.issues)if(o.path.length>0){let l=o.path[0];n[l]=n[l]||[],n[l].push(t(o))}else b.push(t(o));return{formErrors:b,fieldErrors:n}}get formErrors(){return this.flatten()}};R.create=(t)=>{return new R(t)}});var d0=(t,n)=>{let b;switch(t.code){case g.invalid_type:if(t.received===$.undefined)b="Required";else b=`Expected ${t.expected}, received ${t.received}`;break;case g.invalid_literal:b=`Invalid literal value, expected ${JSON.stringify(t.expected,X.jsonStringifyReplacer)}`;break;case g.unrecognized_keys:b=`Unrecognized key(s) in object: ${X.joinValues(t.keys,", ")}`;break;case g.invalid_union:b="Invalid input";break;case g.invalid_union_discriminator:b=`Invalid discriminator value. Expected ${X.joinValues(t.options)}`;break;case g.invalid_enum_value:b=`Invalid enum value. Expected ${X.joinValues(t.options)}, received '${t.received}'`;break;case g.invalid_arguments:b="Invalid function arguments";break;case g.invalid_return_type:b="Invalid function return type";break;case g.invalid_date:b="Invalid date";break;case g.invalid_string:if(typeof t.validation==="object")if("includes"in t.validation){if(b=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position==="number")b=`${b} at one or more positions greater than or equal to ${t.validation.position}`}else if("startsWith"in t.validation)b=`Invalid input: must start with "${t.validation.startsWith}"`;else if("endsWith"in t.validation)b=`Invalid input: must end with "${t.validation.endsWith}"`;else X.assertNever(t.validation);else if(t.validation!=="regex")b=`Invalid ${t.validation}`;else b="Invalid";break;case g.too_small:if(t.type==="array")b=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`;else if(t.type==="string")b=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`;else if(t.type==="number")b=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`;else if(t.type==="bigint")b=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`;else if(t.type==="date")b=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`;else b="Invalid input";break;case g.too_big:if(t.type==="array")b=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`;else if(t.type==="string")b=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`;else if(t.type==="number")b=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`;else if(t.type==="bigint")b=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`;else if(t.type==="date")b=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`;else b="Invalid input";break;case g.custom:b="Invalid input";break;case g.invalid_intersection_types:b="Intersection results could not be merged";break;case g.not_multiple_of:b=`Number must be a multiple of ${t.multipleOf}`;break;case g.not_finite:b="Number must be finite";break;default:b=n.defaultError,X.assertNever(t)}return{message:b}},K;var Hn=x(()=>{Wt();xt();K=d0});function U0(t){ao=t}function ot(){return ao}var ao;var dt=x(()=>{Hn();ao=K});function v(t,n){let b=ot(),o=Yt({issueData:n,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,b,b===K?void 0:K].filter((l)=>!!l)});t.common.issues.push(o)}class L{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 b=[];for(let o of n){if(o.status==="aborted")return H;if(o.status==="dirty")t.dirty();b.push(o.value)}return{status:t.value,value:b}}static async mergeObjectAsync(t,n){let b=[];for(let o of n){let l=await o.key,a=await o.value;b.push({key:l,value:a})}return L.mergeObjectSync(t,b)}static mergeObjectSync(t,n){let b={};for(let o of n){let{key:l,value:a}=o;if(l.status==="aborted")return H;if(a.status==="aborted")return H;if(l.status==="dirty")t.dirty();if(a.status==="dirty")t.dirty();if(l.value!=="__proto__"&&(typeof a.value<"u"||o.alwaysSet))b[l.value]=a.value}return{status:t.value,value:b}}}var Yt=(t)=>{let{data:n,path:b,errorMaps:o,issueData:l}=t,a=[...b,...l.path||[]],f={...l,path:a};if(l.message!==void 0)return{...l,path:a,message:l.message};let r="",h=o.filter((A)=>!!A).slice().reverse();for(let A of h)r=A(f,{data:n,defaultError:r}).message;return{...l,path:a,message:r}},j0,H,Z=(t)=>({status:"dirty",value:t}),F=(t)=>({status:"valid",value:t}),Ut=(t)=>t.status==="aborted",jt=(t)=>t.status==="dirty",P=(t)=>t.status==="valid",bt=(t)=>typeof Promise<"u"&&t instanceof Promise;var En=x(()=>{dt();Hn();j0=[];H=Object.freeze({status:"aborted"})});var fo=()=>{};var q;var ro=x(()=>{(function(t){t.errToObj=(n)=>typeof n==="string"?{message:n}:n||{},t.toString=(n)=>typeof n==="string"?n:n?.message})(q||(q={}))});class U{constructor(t,n,b,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=b,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 Y(t){if(!t)return{};let{errorMap:n,invalid_type_error:b,required_error:o,description:l}=t;if(n&&(b||o))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if(n)return{errorMap:n,description:l};return{errorMap:(f,r)=>{let{message:h}=t;if(f.code==="invalid_enum_value")return{message:h??r.defaultError};if(typeof r.data>"u")return{message:h??o??r.defaultError};if(f.code!=="invalid_type")return{message:r.defaultError};return{message:h??b??r.defaultError}},description:l}}class M{get description(){return this._def.description}_getType(t){return V(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:V(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new L,ctx:{common:t.parent.common,data:t.data,parsedType:V(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let n=this._parse(t);if(bt(n))throw Error("Synchronous parse encountered promise.");return n}_parseAsync(t){let n=this._parse(t);return Promise.resolve(n)}parse(t,n){let b=this.safeParse(t,n);if(b.success)return b.data;throw b.error}safeParse(t,n){let b={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:V(t)},o=this._parseSync({data:t,path:b.path,parent:b});return ho(b,o)}"~validate"(t){let n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:V(t)};if(!this["~standard"].async)try{let b=this._parseSync({data:t,path:[],parent:n});return P(b)?{value:b.value}:{issues:n.common.issues}}catch(b){if(b?.message?.toLowerCase()?.includes("encountered"))this["~standard"].async=!0;n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then((b)=>P(b)?{value:b.value}:{issues:n.common.issues})}async parseAsync(t,n){let b=await this.safeParseAsync(t,n);if(b.success)return b.data;throw b.error}async safeParseAsync(t,n){let b={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:V(t)},o=this._parse({data:t,path:b.path,parent:b}),l=await(bt(o)?o:Promise.resolve(o));return ho(b,l)}refine(t,n){let b=(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,l)=>{let a=t(o),f=()=>l.addIssue({code:g.custom,...b(o)});if(typeof Promise<"u"&&a instanceof Promise)return a.then((r)=>{if(!r)return f(),!1;else return!0});if(!a)return f(),!1;else return!0})}refinement(t,n){return this._refinement((b,o)=>{if(!t(b))return o.addIssue(typeof n==="function"?n(b,o):n),!1;else return!0})}_refinement(t){return new j({schema:this,typeName:E.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 d.create(this,this._def)}nullable(){return i.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return W.create(this)}promise(){return nt.create(this,this._def)}or(t){return gt.create([this,t],this._def)}and(t){return $t.create(this,t,this._def)}transform(t){return new j({...Y(this._def),schema:this,typeName:E.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let n=typeof t==="function"?t:()=>t;return new _t({...Y(this._def),innerType:this,defaultValue:n,typeName:E.ZodDefault})}brand(){return new pt({typeName:E.ZodBranded,type:this,...Y(this._def)})}catch(t){let n=typeof t==="function"?t:()=>t;return new At({...Y(this._def),innerType:this,catchValue:n,typeName:E.ZodCatch})}describe(t){return new this.constructor({...this._def,description:t})}pipe(t){return Qt.create(this,t)}readonly(){return qt.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}function vo(t){let n="[0-5]\\d";if(t.precision)n=`${n}\\.\\d{${t.precision}}`;else if(t.precision==null)n=`${n}(\\.\\d+)?`;let b=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${n})${b}`}function nb(t){return new RegExp(`^${vo(t)}$`)}function wo(t){let n=`${$o}T${vo(t)}`,b=[];if(b.push(t.local?"Z?":"Z"),t.offset)b.push("([+-]\\d{2}:?\\d{2})");return n=`${n}(${b.join("|")})`,new RegExp(`^${n}$`)}function ob(t,n){if((n==="v4"||!n)&&C0.test(t))return!0;if((n==="v6"||!n)&&e0.test(t))return!0;return!1}function bb(t,n){if(!i0.test(t))return!1;try{let[b]=t.split(".");if(!b)return!1;let o=b.replace(/-/g,"+").replace(/_/g,"/").padEnd(b.length+(4-b.length%4)%4,"="),l=JSON.parse(atob(o));if(typeof l!=="object"||l===null)return!1;if("typ"in l&&l?.typ!=="JWT")return!1;if(!l.alg)return!1;if(n&&l.alg!==n)return!1;return!0}catch{return!1}}function lb(t,n){if((n==="v4"||!n)&&y0.test(t))return!0;if((n==="v6"||!n)&&Z0.test(t))return!0;return!1}function ab(t,n){let b=(t.toString().split(".")[1]||"").length,o=(n.toString().split(".")[1]||"").length,l=b>o?b:o,a=Number.parseInt(t.toFixed(l).replace(".","")),f=Number.parseInt(n.toFixed(l).replace(".",""));return a%f/10**l}function lt(t){if(t instanceof Q){let n={};for(let b in t.shape){let o=t.shape[b];n[b]=d.create(lt(o))}return new Q({...t._def,shape:()=>n})}else if(t instanceof W)return new W({...t._def,type:lt(t.element)});else if(t instanceof d)return d.create(lt(t.unwrap()));else if(t instanceof i)return i.create(lt(t.unwrap()));else if(t instanceof N)return N.create(t.items.map((n)=>lt(n)));else return t}function Yn(t,n){let b=V(t),o=V(n);if(t===n)return{valid:!0,data:t};else if(b===$.object&&o===$.object){let l=X.objectKeys(n),a=X.objectKeys(t).filter((r)=>l.indexOf(r)!==-1),f={...t,...n};for(let r of a){let h=Yn(t[r],n[r]);if(!h.valid)return{valid:!1};f[r]=h.data}return{valid:!0,data:f}}else if(b===$.array&&o===$.array){if(t.length!==n.length)return{valid:!1};let l=[];for(let a=0;a<t.length;a++){let f=t[a],r=n[a],h=Yn(f,r);if(!h.valid)return{valid:!1};l.push(h.data)}return{valid:!0,data:l}}else if(b===$.date&&o===$.date&&+t===+n)return{valid:!0,data:t};else return{valid:!1}}function co(t,n){return new e({values:t,typeName:E.ZodEnum,...Y(n)})}function go(t,n){let b=typeof t==="function"?t(n):typeof t==="string"?{message:t}:t;return typeof b==="string"?{message:b}:b}function _o(t,n={},b){if(t)return z.create().superRefine((o,l)=>{let a=t(o);if(a instanceof Promise)return a.then((f)=>{if(!f){let r=go(n,o),h=r.fatal??b??!0;l.addIssue({code:"custom",...r,fatal:h})}});if(!a){let f=go(n,o),r=f.fatal??b??!0;l.addIssue({code:"custom",...f,fatal:r})}return});return z.create()}var ho=(t,n)=>{if(P(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 b=new R(t.common.issues);return this._error=b,this._error}}}},V0,p0,N0,K0,u0,i0,I0,P0,T0="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",xn,C0,y0,e0,Z0,s0,z0,$o="((\\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])))",tb,D,C,y,ft,s,Mt,rt,ht,z,T,p,Xt,W,Q,gt,u=(t)=>{if(t instanceof vt)return u(t.schema);else if(t instanceof j)return u(t.innerType());else if(t instanceof wt)return[t.value];else if(t instanceof e)return t.options;else if(t instanceof ct)return X.objectValues(t.enum);else if(t instanceof _t)return u(t._def.innerType);else if(t instanceof rt)return[void 0];else if(t instanceof ht)return[null];else if(t instanceof d)return[void 0,...u(t.unwrap())];else if(t instanceof i)return[null,...u(t.unwrap())];else if(t instanceof pt)return u(t.unwrap());else if(t instanceof qt)return u(t.unwrap());else if(t instanceof At)return u(t._def.innerType);else return[]},Vt,$t,N,St,mt,tt,at,vt,wt,e,ct,nt,j,d,i,_t,At,kt,fb,pt,Qt,qt,rb,E,hb=(t,n={message:`Input not instance of ${t.name}`})=>_o((b)=>b instanceof t,n),Ao,qo,gb,$b,Ho,vb,wb,cb,_b,Ab,qb,Hb,Eb,xb,Yb,Mb,Xb,Sb,mb,kb,Qb,Jb,Gb,Lb,Fb,Rb,Bb,Ob,Db,Wb,db,Ub,jb,Vb,pb=()=>Ao().optional(),Nb=()=>qo().optional(),Kb=()=>Ho().optional(),ub,ib;var Eo=x(()=>{Wt();dt();ro();En();xt();V0=/^c[^\s-]{8,}$/i,p0=/^[0-9a-z]+$/,N0=/^[0-9A-HJKMNP-TV-Z]{26}$/i,K0=/^[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,u0=/^[a-z0-9_-]{21}$/i,i0=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,I0=/^[-+]?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)?)??$/,P0=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,C0=/^(?:(?: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])$/,y0=/^(?:(?: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])$/,e0=/^(([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]))$/,Z0=/^(([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])$/,s0=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,z0=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,tb=new RegExp(`^${$o}$`);D=class D extends M{_parse(t){if(this._def.coerce)t.data=String(t.data);if(this._getType(t)!==$.string){let l=this._getOrReturnCtx(t);return v(l,{code:g.invalid_type,expected:$.string,received:l.parsedType}),H}let b=new L,o=void 0;for(let l of this._def.checks)if(l.kind==="min"){if(t.data.length<l.value)o=this._getOrReturnCtx(t,o),v(o,{code:g.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),b.dirty()}else if(l.kind==="max"){if(t.data.length>l.value)o=this._getOrReturnCtx(t,o),v(o,{code:g.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),b.dirty()}else if(l.kind==="length"){let a=t.data.length>l.value,f=t.data.length<l.value;if(a||f){if(o=this._getOrReturnCtx(t,o),a)v(o,{code:g.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message});else if(f)v(o,{code:g.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message});b.dirty()}}else if(l.kind==="email"){if(!P0.test(t.data))o=this._getOrReturnCtx(t,o),v(o,{validation:"email",code:g.invalid_string,message:l.message}),b.dirty()}else if(l.kind==="emoji"){if(!xn)xn=new RegExp(T0,"u");if(!xn.test(t.data))o=this._getOrReturnCtx(t,o),v(o,{validation:"emoji",code:g.invalid_string,message:l.message}),b.dirty()}else if(l.kind==="uuid"){if(!K0.test(t.data))o=this._getOrReturnCtx(t,o),v(o,{validation:"uuid",code:g.invalid_string,message:l.message}),b.dirty()}else if(l.kind==="nanoid"){if(!u0.test(t.data))o=this._getOrReturnCtx(t,o),v(o,{validation:"nanoid",code:g.invalid_string,message:l.message}),b.dirty()}else if(l.kind==="cuid"){if(!V0.test(t.data))o=this._getOrReturnCtx(t,o),v(o,{validation:"cuid",code:g.invalid_string,message:l.message}),b.dirty()}else if(l.kind==="cuid2"){if(!p0.test(t.data))o=this._getOrReturnCtx(t,o),v(o,{validation:"cuid2",code:g.invalid_string,message:l.message}),b.dirty()}else if(l.kind==="ulid"){if(!N0.test(t.data))o=this._getOrReturnCtx(t,o),v(o,{validation:"ulid",code:g.invalid_string,message:l.message}),b.dirty()}else if(l.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),v(o,{validation:"url",code:g.invalid_string,message:l.message}),b.dirty()}else if(l.kind==="regex"){if(l.regex.lastIndex=0,!l.regex.test(t.data))o=this._getOrReturnCtx(t,o),v(o,{validation:"regex",code:g.invalid_string,message:l.message}),b.dirty()}else if(l.kind==="trim")t.data=t.data.trim();else if(l.kind==="includes"){if(!t.data.includes(l.value,l.position))o=this._getOrReturnCtx(t,o),v(o,{code:g.invalid_string,validation:{includes:l.value,position:l.position},message:l.message}),b.dirty()}else if(l.kind==="toLowerCase")t.data=t.data.toLowerCase();else if(l.kind==="toUpperCase")t.data=t.data.toUpperCase();else if(l.kind==="startsWith"){if(!t.data.startsWith(l.value))o=this._getOrReturnCtx(t,o),v(o,{code:g.invalid_string,validation:{startsWith:l.value},message:l.message}),b.dirty()}else if(l.kind==="endsWith"){if(!t.data.endsWith(l.value))o=this._getOrReturnCtx(t,o),v(o,{code:g.invalid_string,validation:{endsWith:l.value},message:l.message}),b.dirty()}else if(l.kind==="datetime"){if(!wo(l).test(t.data))o=this._getOrReturnCtx(t,o),v(o,{code:g.invalid_string,validation:"datetime",message:l.message}),b.dirty()}else if(l.kind==="date"){if(!tb.test(t.data))o=this._getOrReturnCtx(t,o),v(o,{code:g.invalid_string,validation:"date",message:l.message}),b.dirty()}else if(l.kind==="time"){if(!nb(l).test(t.data))o=this._getOrReturnCtx(t,o),v(o,{code:g.invalid_string,validation:"time",message:l.message}),b.dirty()}else if(l.kind==="duration"){if(!I0.test(t.data))o=this._getOrReturnCtx(t,o),v(o,{validation:"duration",code:g.invalid_string,message:l.message}),b.dirty()}else if(l.kind==="ip"){if(!ob(t.data,l.version))o=this._getOrReturnCtx(t,o),v(o,{validation:"ip",code:g.invalid_string,message:l.message}),b.dirty()}else if(l.kind==="jwt"){if(!bb(t.data,l.alg))o=this._getOrReturnCtx(t,o),v(o,{validation:"jwt",code:g.invalid_string,message:l.message}),b.dirty()}else if(l.kind==="cidr"){if(!lb(t.data,l.version))o=this._getOrReturnCtx(t,o),v(o,{validation:"cidr",code:g.invalid_string,message:l.message}),b.dirty()}else if(l.kind==="base64"){if(!s0.test(t.data))o=this._getOrReturnCtx(t,o),v(o,{validation:"base64",code:g.invalid_string,message:l.message}),b.dirty()}else if(l.kind==="base64url"){if(!z0.test(t.data))o=this._getOrReturnCtx(t,o),v(o,{validation:"base64url",code:g.invalid_string,message:l.message}),b.dirty()}else X.assertNever(l);return{status:b.value,value:t.data}}_regex(t,n,b){return this.refinement((o)=>t.test(o),{validation:n,code:g.invalid_string,...q.errToObj(b)})}_addCheck(t){return new D({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...q.errToObj(t)})}url(t){return this._addCheck({kind:"url",...q.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...q.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...q.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...q.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...q.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...q.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...q.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...q.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...q.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...q.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...q.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...q.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,...q.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,...q.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...q.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...q.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...q.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...q.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...q.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...q.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...q.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...q.errToObj(n)})}nonempty(t){return this.min(1,q.errToObj(t))}trim(){return new D({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new D({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new D({...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}};D.create=(t)=>{return new D({checks:[],typeName:E.ZodString,coerce:t?.coerce??!1,...Y(t)})};C=class C extends M{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)!==$.number){let l=this._getOrReturnCtx(t);return v(l,{code:g.invalid_type,expected:$.number,received:l.parsedType}),H}let b=void 0,o=new L;for(let l of this._def.checks)if(l.kind==="int"){if(!X.isInteger(t.data))b=this._getOrReturnCtx(t,b),v(b,{code:g.invalid_type,expected:"integer",received:"float",message:l.message}),o.dirty()}else if(l.kind==="min"){if(l.inclusive?t.data<l.value:t.data<=l.value)b=this._getOrReturnCtx(t,b),v(b,{code:g.too_small,minimum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),o.dirty()}else if(l.kind==="max"){if(l.inclusive?t.data>l.value:t.data>=l.value)b=this._getOrReturnCtx(t,b),v(b,{code:g.too_big,maximum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),o.dirty()}else if(l.kind==="multipleOf"){if(ab(t.data,l.value)!==0)b=this._getOrReturnCtx(t,b),v(b,{code:g.not_multiple_of,multipleOf:l.value,message:l.message}),o.dirty()}else if(l.kind==="finite"){if(!Number.isFinite(t.data))b=this._getOrReturnCtx(t,b),v(b,{code:g.not_finite,message:l.message}),o.dirty()}else X.assertNever(l);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,q.toString(n))}gt(t,n){return this.setLimit("min",t,!1,q.toString(n))}lte(t,n){return this.setLimit("max",t,!0,q.toString(n))}lt(t,n){return this.setLimit("max",t,!1,q.toString(n))}setLimit(t,n,b,o){return new C({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:b,message:q.toString(o)}]})}_addCheck(t){return new C({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:q.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:q.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:q.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:q.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:q.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:q.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:q.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:q.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:q.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"&&X.isInteger(t.value))}get isFinite(){let t=null,n=null;for(let b of this._def.checks)if(b.kind==="finite"||b.kind==="int"||b.kind==="multipleOf")return!0;else if(b.kind==="min"){if(n===null||b.value>n)n=b.value}else if(b.kind==="max"){if(t===null||b.value<t)t=b.value}return Number.isFinite(n)&&Number.isFinite(t)}};C.create=(t)=>{return new C({checks:[],typeName:E.ZodNumber,coerce:t?.coerce||!1,...Y(t)})};y=class y extends M{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)!==$.bigint)return this._getInvalidInput(t);let b=void 0,o=new L;for(let l of this._def.checks)if(l.kind==="min"){if(l.inclusive?t.data<l.value:t.data<=l.value)b=this._getOrReturnCtx(t,b),v(b,{code:g.too_small,type:"bigint",minimum:l.value,inclusive:l.inclusive,message:l.message}),o.dirty()}else if(l.kind==="max"){if(l.inclusive?t.data>l.value:t.data>=l.value)b=this._getOrReturnCtx(t,b),v(b,{code:g.too_big,type:"bigint",maximum:l.value,inclusive:l.inclusive,message:l.message}),o.dirty()}else if(l.kind==="multipleOf"){if(t.data%l.value!==BigInt(0))b=this._getOrReturnCtx(t,b),v(b,{code:g.not_multiple_of,multipleOf:l.value,message:l.message}),o.dirty()}else X.assertNever(l);return{status:o.value,value:t.data}}_getInvalidInput(t){let n=this._getOrReturnCtx(t);return v(n,{code:g.invalid_type,expected:$.bigint,received:n.parsedType}),H}gte(t,n){return this.setLimit("min",t,!0,q.toString(n))}gt(t,n){return this.setLimit("min",t,!1,q.toString(n))}lte(t,n){return this.setLimit("max",t,!0,q.toString(n))}lt(t,n){return this.setLimit("max",t,!1,q.toString(n))}setLimit(t,n,b,o){return new y({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:b,message:q.toString(o)}]})}_addCheck(t){return new y({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:q.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:q.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:q.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:q.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:q.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}};y.create=(t)=>{return new y({checks:[],typeName:E.ZodBigInt,coerce:t?.coerce??!1,...Y(t)})};ft=class ft extends M{_parse(t){if(this._def.coerce)t.data=Boolean(t.data);if(this._getType(t)!==$.boolean){let b=this._getOrReturnCtx(t);return v(b,{code:g.invalid_type,expected:$.boolean,received:b.parsedType}),H}return F(t.data)}};ft.create=(t)=>{return new ft({typeName:E.ZodBoolean,coerce:t?.coerce||!1,...Y(t)})};s=class s extends M{_parse(t){if(this._def.coerce)t.data=new Date(t.data);if(this._getType(t)!==$.date){let l=this._getOrReturnCtx(t);return v(l,{code:g.invalid_type,expected:$.date,received:l.parsedType}),H}if(Number.isNaN(t.data.getTime())){let l=this._getOrReturnCtx(t);return v(l,{code:g.invalid_date}),H}let b=new L,o=void 0;for(let l of this._def.checks)if(l.kind==="min"){if(t.data.getTime()<l.value)o=this._getOrReturnCtx(t,o),v(o,{code:g.too_small,message:l.message,inclusive:!0,exact:!1,minimum:l.value,type:"date"}),b.dirty()}else if(l.kind==="max"){if(t.data.getTime()>l.value)o=this._getOrReturnCtx(t,o),v(o,{code:g.too_big,message:l.message,inclusive:!0,exact:!1,maximum:l.value,type:"date"}),b.dirty()}else X.assertNever(l);return{status:b.value,value:new Date(t.data.getTime())}}_addCheck(t){return new s({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:q.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:q.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}};s.create=(t)=>{return new s({checks:[],coerce:t?.coerce||!1,typeName:E.ZodDate,...Y(t)})};Mt=class Mt extends M{_parse(t){if(this._getType(t)!==$.symbol){let b=this._getOrReturnCtx(t);return v(b,{code:g.invalid_type,expected:$.symbol,received:b.parsedType}),H}return F(t.data)}};Mt.create=(t)=>{return new Mt({typeName:E.ZodSymbol,...Y(t)})};rt=class rt extends M{_parse(t){if(this._getType(t)!==$.undefined){let b=this._getOrReturnCtx(t);return v(b,{code:g.invalid_type,expected:$.undefined,received:b.parsedType}),H}return F(t.data)}};rt.create=(t)=>{return new rt({typeName:E.ZodUndefined,...Y(t)})};ht=class ht extends M{_parse(t){if(this._getType(t)!==$.null){let b=this._getOrReturnCtx(t);return v(b,{code:g.invalid_type,expected:$.null,received:b.parsedType}),H}return F(t.data)}};ht.create=(t)=>{return new ht({typeName:E.ZodNull,...Y(t)})};z=class z extends M{constructor(){super(...arguments);this._any=!0}_parse(t){return F(t.data)}};z.create=(t)=>{return new z({typeName:E.ZodAny,...Y(t)})};T=class T extends M{constructor(){super(...arguments);this._unknown=!0}_parse(t){return F(t.data)}};T.create=(t)=>{return new T({typeName:E.ZodUnknown,...Y(t)})};p=class p extends M{_parse(t){let n=this._getOrReturnCtx(t);return v(n,{code:g.invalid_type,expected:$.never,received:n.parsedType}),H}};p.create=(t)=>{return new p({typeName:E.ZodNever,...Y(t)})};Xt=class Xt extends M{_parse(t){if(this._getType(t)!==$.undefined){let b=this._getOrReturnCtx(t);return v(b,{code:g.invalid_type,expected:$.void,received:b.parsedType}),H}return F(t.data)}};Xt.create=(t)=>{return new Xt({typeName:E.ZodVoid,...Y(t)})};W=class W extends M{_parse(t){let{ctx:n,status:b}=this._processInputParams(t),o=this._def;if(n.parsedType!==$.array)return v(n,{code:g.invalid_type,expected:$.array,received:n.parsedType}),H;if(o.exactLength!==null){let a=n.data.length>o.exactLength.value,f=n.data.length<o.exactLength.value;if(a||f)v(n,{code:a?g.too_big:g.too_small,minimum:f?o.exactLength.value:void 0,maximum:a?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),b.dirty()}if(o.minLength!==null){if(n.data.length<o.minLength.value)v(n,{code:g.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),b.dirty()}if(o.maxLength!==null){if(n.data.length>o.maxLength.value)v(n,{code:g.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),b.dirty()}if(n.common.async)return Promise.all([...n.data].map((a,f)=>{return o.type._parseAsync(new U(n,a,n.path,f))})).then((a)=>{return L.mergeArray(b,a)});let l=[...n.data].map((a,f)=>{return o.type._parseSync(new U(n,a,n.path,f))});return L.mergeArray(b,l)}get element(){return this._def.type}min(t,n){return new W({...this._def,minLength:{value:t,message:q.toString(n)}})}max(t,n){return new W({...this._def,maxLength:{value:t,message:q.toString(n)}})}length(t,n){return new W({...this._def,exactLength:{value:t,message:q.toString(n)}})}nonempty(t){return this.min(1,t)}};W.create=(t,n)=>{return new W({type:t,minLength:null,maxLength:null,exactLength:null,typeName:E.ZodArray,...Y(n)})};Q=class Q extends M{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=X.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==$.object){let h=this._getOrReturnCtx(t);return v(h,{code:g.invalid_type,expected:$.object,received:h.parsedType}),H}let{status:b,ctx:o}=this._processInputParams(t),{shape:l,keys:a}=this._getCached(),f=[];if(!(this._def.catchall instanceof p&&this._def.unknownKeys==="strip")){for(let h in o.data)if(!a.includes(h))f.push(h)}let r=[];for(let h of a){let A=l[h],S=o.data[h];r.push({key:{status:"valid",value:h},value:A._parse(new U(o,S,o.path,h)),alwaysSet:h in o.data})}if(this._def.catchall instanceof p){let h=this._def.unknownKeys;if(h==="passthrough")for(let A of f)r.push({key:{status:"valid",value:A},value:{status:"valid",value:o.data[A]}});else if(h==="strict"){if(f.length>0)v(o,{code:g.unrecognized_keys,keys:f}),b.dirty()}else if(h==="strip");else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let h=this._def.catchall;for(let A of f){let S=o.data[A];r.push({key:{status:"valid",value:A},value:h._parse(new U(o,S,o.path,A)),alwaysSet:A in o.data})}}if(o.common.async)return Promise.resolve().then(async()=>{let h=[];for(let A of r){let S=await A.key,G=await A.value;h.push({key:S,value:G,alwaysSet:A.alwaysSet})}return h}).then((h)=>{return L.mergeObjectSync(b,h)});else return L.mergeObjectSync(b,r)}get shape(){return this._def.shape()}strict(t){return q.errToObj,new Q({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,b)=>{let o=this._def.errorMap?.(n,b).message??b.defaultError;if(n.code==="unrecognized_keys")return{message:q.errToObj(t).message??o};return{message:o}}}:{}})}strip(){return new Q({...this._def,unknownKeys:"strip"})}passthrough(){return new Q({...this._def,unknownKeys:"passthrough"})}extend(t){return new Q({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Q({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:E.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Q({...this._def,catchall:t})}pick(t){let n={};for(let b of X.objectKeys(t))if(t[b]&&this.shape[b])n[b]=this.shape[b];return new Q({...this._def,shape:()=>n})}omit(t){let n={};for(let b of X.objectKeys(this.shape))if(!t[b])n[b]=this.shape[b];return new Q({...this._def,shape:()=>n})}deepPartial(){return lt(this)}partial(t){let n={};for(let b of X.objectKeys(this.shape)){let o=this.shape[b];if(t&&!t[b])n[b]=o;else n[b]=o.optional()}return new Q({...this._def,shape:()=>n})}required(t){let n={};for(let b of X.objectKeys(this.shape))if(t&&!t[b])n[b]=this.shape[b];else{let l=this.shape[b];while(l instanceof d)l=l._def.innerType;n[b]=l}return new Q({...this._def,shape:()=>n})}keyof(){return co(X.objectKeys(this.shape))}};Q.create=(t,n)=>{return new Q({shape:()=>t,unknownKeys:"strip",catchall:p.create(),typeName:E.ZodObject,...Y(n)})};Q.strictCreate=(t,n)=>{return new Q({shape:()=>t,unknownKeys:"strict",catchall:p.create(),typeName:E.ZodObject,...Y(n)})};Q.lazycreate=(t,n)=>{return new Q({shape:t,unknownKeys:"strip",catchall:p.create(),typeName:E.ZodObject,...Y(n)})};gt=class gt extends M{_parse(t){let{ctx:n}=this._processInputParams(t),b=this._def.options;function o(l){for(let f of l)if(f.result.status==="valid")return f.result;for(let f of l)if(f.result.status==="dirty")return n.common.issues.push(...f.ctx.common.issues),f.result;let a=l.map((f)=>new R(f.ctx.common.issues));return v(n,{code:g.invalid_union,unionErrors:a}),H}if(n.common.async)return Promise.all(b.map(async(l)=>{let a={...n,common:{...n.common,issues:[]},parent:null};return{result:await l._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(o);else{let l=void 0,a=[];for(let r of b){let h={...n,common:{...n.common,issues:[]},parent:null},A=r._parseSync({data:n.data,path:n.path,parent:h});if(A.status==="valid")return A;else if(A.status==="dirty"&&!l)l={result:A,ctx:h};if(h.common.issues.length)a.push(h.common.issues)}if(l)return n.common.issues.push(...l.ctx.common.issues),l.result;let f=a.map((r)=>new R(r));return v(n,{code:g.invalid_union,unionErrors:f}),H}}get options(){return this._def.options}};gt.create=(t,n)=>{return new gt({options:t,typeName:E.ZodUnion,...Y(n)})};Vt=class Vt extends M{_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==$.object)return v(n,{code:g.invalid_type,expected:$.object,received:n.parsedType}),H;let b=this.discriminator,o=n.data[b],l=this.optionsMap.get(o);if(!l)return v(n,{code:g.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[b]}),H;if(n.common.async)return l._parseAsync({data:n.data,path:n.path,parent:n});else return l._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,b){let o=new Map;for(let l of n){let a=u(l.shape[t]);if(!a.length)throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let f of a){if(o.has(f))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(f)}`);o.set(f,l)}}return new Vt({typeName:E.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Y(b)})}};$t=class $t extends M{_parse(t){let{status:n,ctx:b}=this._processInputParams(t),o=(l,a)=>{if(Ut(l)||Ut(a))return H;let f=Yn(l.value,a.value);if(!f.valid)return v(b,{code:g.invalid_intersection_types}),H;if(jt(l)||jt(a))n.dirty();return{status:n.value,value:f.data}};if(b.common.async)return Promise.all([this._def.left._parseAsync({data:b.data,path:b.path,parent:b}),this._def.right._parseAsync({data:b.data,path:b.path,parent:b})]).then(([l,a])=>o(l,a));else return o(this._def.left._parseSync({data:b.data,path:b.path,parent:b}),this._def.right._parseSync({data:b.data,path:b.path,parent:b}))}};$t.create=(t,n,b)=>{return new $t({left:t,right:n,typeName:E.ZodIntersection,...Y(b)})};N=class N extends M{_parse(t){let{status:n,ctx:b}=this._processInputParams(t);if(b.parsedType!==$.array)return v(b,{code:g.invalid_type,expected:$.array,received:b.parsedType}),H;if(b.data.length<this._def.items.length)return v(b,{code:g.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),H;if(!this._def.rest&&b.data.length>this._def.items.length)v(b,{code:g.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty();let l=[...b.data].map((a,f)=>{let r=this._def.items[f]||this._def.rest;if(!r)return null;return r._parse(new U(b,a,b.path,f))}).filter((a)=>!!a);if(b.common.async)return Promise.all(l).then((a)=>{return L.mergeArray(n,a)});else return L.mergeArray(n,l)}get items(){return this._def.items}rest(t){return new N({...this._def,rest:t})}};N.create=(t,n)=>{if(!Array.isArray(t))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new N({items:t,typeName:E.ZodTuple,rest:null,...Y(n)})};St=class St extends M{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:b}=this._processInputParams(t);if(b.parsedType!==$.object)return v(b,{code:g.invalid_type,expected:$.object,received:b.parsedType}),H;let o=[],l=this._def.keyType,a=this._def.valueType;for(let f in b.data)o.push({key:l._parse(new U(b,f,b.path,f)),value:a._parse(new U(b,b.data[f],b.path,f)),alwaysSet:f in b.data});if(b.common.async)return L.mergeObjectAsync(n,o);else return L.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,b){if(n instanceof M)return new St({keyType:t,valueType:n,typeName:E.ZodRecord,...Y(b)});return new St({keyType:D.create(),valueType:t,typeName:E.ZodRecord,...Y(n)})}};mt=class mt extends M{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:b}=this._processInputParams(t);if(b.parsedType!==$.map)return v(b,{code:g.invalid_type,expected:$.map,received:b.parsedType}),H;let o=this._def.keyType,l=this._def.valueType,a=[...b.data.entries()].map(([f,r],h)=>{return{key:o._parse(new U(b,f,b.path,[h,"key"])),value:l._parse(new U(b,r,b.path,[h,"value"]))}});if(b.common.async){let f=new Map;return Promise.resolve().then(async()=>{for(let r of a){let h=await r.key,A=await r.value;if(h.status==="aborted"||A.status==="aborted")return H;if(h.status==="dirty"||A.status==="dirty")n.dirty();f.set(h.value,A.value)}return{status:n.value,value:f}})}else{let f=new Map;for(let r of a){let{key:h,value:A}=r;if(h.status==="aborted"||A.status==="aborted")return H;if(h.status==="dirty"||A.status==="dirty")n.dirty();f.set(h.value,A.value)}return{status:n.value,value:f}}}};mt.create=(t,n,b)=>{return new mt({valueType:n,keyType:t,typeName:E.ZodMap,...Y(b)})};tt=class tt extends M{_parse(t){let{status:n,ctx:b}=this._processInputParams(t);if(b.parsedType!==$.set)return v(b,{code:g.invalid_type,expected:$.set,received:b.parsedType}),H;let o=this._def;if(o.minSize!==null){if(b.data.size<o.minSize.value)v(b,{code:g.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()}if(o.maxSize!==null){if(b.data.size>o.maxSize.value)v(b,{code:g.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty()}let l=this._def.valueType;function a(r){let h=new Set;for(let A of r){if(A.status==="aborted")return H;if(A.status==="dirty")n.dirty();h.add(A.value)}return{status:n.value,value:h}}let f=[...b.data.values()].map((r,h)=>l._parse(new U(b,r,b.path,h)));if(b.common.async)return Promise.all(f).then((r)=>a(r));else return a(f)}min(t,n){return new tt({...this._def,minSize:{value:t,message:q.toString(n)}})}max(t,n){return new tt({...this._def,maxSize:{value:t,message:q.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:E.ZodSet,...Y(n)})};at=class at extends M{constructor(){super(...arguments);this.validate=this.implement}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==$.function)return v(n,{code:g.invalid_type,expected:$.function,received:n.parsedType}),H;function b(f,r){return Yt({data:f,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ot(),K].filter((h)=>!!h),issueData:{code:g.invalid_arguments,argumentsError:r}})}function o(f,r){return Yt({data:f,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ot(),K].filter((h)=>!!h),issueData:{code:g.invalid_return_type,returnTypeError:r}})}let l={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof nt){let f=this;return F(async function(...r){let h=new R([]),A=await f._def.args.parseAsync(r,l).catch((J)=>{throw h.addIssue(b(r,J)),h}),S=await Reflect.apply(a,this,A);return await f._def.returns._def.type.parseAsync(S,l).catch((J)=>{throw h.addIssue(o(S,J)),h})})}else{let f=this;return F(function(...r){let h=f._def.args.safeParse(r,l);if(!h.success)throw new R([b(r,h.error)]);let A=Reflect.apply(a,this,h.data),S=f._def.returns.safeParse(A,l);if(!S.success)throw new R([o(A,S.error)]);return S.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new at({...this._def,args:N.create(t).rest(T.create())})}returns(t){return new at({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,b){return new at({args:t?t:N.create([]).rest(T.create()),returns:n||T.create(),typeName:E.ZodFunction,...Y(b)})}};vt=class vt extends M{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})}};vt.create=(t,n)=>{return new vt({getter:t,typeName:E.ZodLazy,...Y(n)})};wt=class wt extends M{_parse(t){if(t.data!==this._def.value){let n=this._getOrReturnCtx(t);return v(n,{received:n.data,code:g.invalid_literal,expected:this._def.value}),H}return{status:"valid",value:t.data}}get value(){return this._def.value}};wt.create=(t,n)=>{return new wt({value:t,typeName:E.ZodLiteral,...Y(n)})};e=class e extends M{_parse(t){if(typeof t.data!=="string"){let n=this._getOrReturnCtx(t),b=this._def.values;return v(n,{expected:X.joinValues(b),received:n.parsedType,code:g.invalid_type}),H}if(!this._cache)this._cache=new Set(this._def.values);if(!this._cache.has(t.data)){let n=this._getOrReturnCtx(t),b=this._def.values;return v(n,{received:n.data,code:g.invalid_enum_value,options:b}),H}return F(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 e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter((b)=>!t.includes(b)),{...this._def,...n})}};e.create=co;ct=class ct extends M{_parse(t){let n=X.getValidEnumValues(this._def.values),b=this._getOrReturnCtx(t);if(b.parsedType!==$.string&&b.parsedType!==$.number){let o=X.objectValues(n);return v(b,{expected:X.joinValues(o),received:b.parsedType,code:g.invalid_type}),H}if(!this._cache)this._cache=new Set(X.getValidEnumValues(this._def.values));if(!this._cache.has(t.data)){let o=X.objectValues(n);return v(b,{received:b.data,code:g.invalid_enum_value,options:o}),H}return F(t.data)}get enum(){return this._def.values}};ct.create=(t,n)=>{return new ct({values:t,typeName:E.ZodNativeEnum,...Y(n)})};nt=class nt extends M{unwrap(){return this._def.type}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==$.promise&&n.common.async===!1)return v(n,{code:g.invalid_type,expected:$.promise,received:n.parsedType}),H;let b=n.parsedType===$.promise?n.data:Promise.resolve(n.data);return F(b.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:E.ZodPromise,...Y(n)})};j=class j extends M{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===E.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:n,ctx:b}=this._processInputParams(t),o=this._def.effect||null,l={addIssue:(a)=>{if(v(b,a),a.fatal)n.abort();else n.dirty()},get path(){return b.path}};if(l.addIssue=l.addIssue.bind(l),o.type==="preprocess"){let a=o.transform(b.data,l);if(b.common.async)return Promise.resolve(a).then(async(f)=>{if(n.value==="aborted")return H;let r=await this._def.schema._parseAsync({data:f,path:b.path,parent:b});if(r.status==="aborted")return H;if(r.status==="dirty")return Z(r.value);if(n.value==="dirty")return Z(r.value);return r});else{if(n.value==="aborted")return H;let f=this._def.schema._parseSync({data:a,path:b.path,parent:b});if(f.status==="aborted")return H;if(f.status==="dirty")return Z(f.value);if(n.value==="dirty")return Z(f.value);return f}}if(o.type==="refinement"){let a=(f)=>{let r=o.refinement(f,l);if(b.common.async)return Promise.resolve(r);if(r instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return f};if(b.common.async===!1){let f=this._def.schema._parseSync({data:b.data,path:b.path,parent:b});if(f.status==="aborted")return H;if(f.status==="dirty")n.dirty();return a(f.value),{status:n.value,value:f.value}}else return this._def.schema._parseAsync({data:b.data,path:b.path,parent:b}).then((f)=>{if(f.status==="aborted")return H;if(f.status==="dirty")n.dirty();return a(f.value).then(()=>{return{status:n.value,value:f.value}})})}if(o.type==="transform")if(b.common.async===!1){let a=this._def.schema._parseSync({data:b.data,path:b.path,parent:b});if(!P(a))return H;let f=o.transform(a.value,l);if(f instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:f}}else return this._def.schema._parseAsync({data:b.data,path:b.path,parent:b}).then((a)=>{if(!P(a))return H;return Promise.resolve(o.transform(a.value,l)).then((f)=>({status:n.value,value:f}))});X.assertNever(o)}};j.create=(t,n,b)=>{return new j({schema:t,typeName:E.ZodEffects,effect:n,...Y(b)})};j.createWithPreprocess=(t,n,b)=>{return new j({schema:n,effect:{type:"preprocess",transform:t},typeName:E.ZodEffects,...Y(b)})};d=class d extends M{_parse(t){if(this._getType(t)===$.undefined)return F(void 0);return this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};d.create=(t,n)=>{return new d({innerType:t,typeName:E.ZodOptional,...Y(n)})};i=class i extends M{_parse(t){if(this._getType(t)===$.null)return F(null);return this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};i.create=(t,n)=>{return new i({innerType:t,typeName:E.ZodNullable,...Y(n)})};_t=class _t extends M{_parse(t){let{ctx:n}=this._processInputParams(t),b=n.data;if(n.parsedType===$.undefined)b=this._def.defaultValue();return this._def.innerType._parse({data:b,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};_t.create=(t,n)=>{return new _t({innerType:t,typeName:E.ZodDefault,defaultValue:typeof n.default==="function"?n.default:()=>n.default,...Y(n)})};At=class At extends M{_parse(t){let{ctx:n}=this._processInputParams(t),b={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:b.data,path:b.path,parent:{...b}});if(bt(o))return o.then((l)=>{return{status:"valid",value:l.status==="valid"?l.value:this._def.catchValue({get error(){return new R(b.common.issues)},input:b.data})}});else return{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new R(b.common.issues)},input:b.data})}}removeCatch(){return this._def.innerType}};At.create=(t,n)=>{return new At({innerType:t,typeName:E.ZodCatch,catchValue:typeof n.catch==="function"?n.catch:()=>n.catch,...Y(n)})};kt=class kt extends M{_parse(t){if(this._getType(t)!==$.nan){let b=this._getOrReturnCtx(t);return v(b,{code:g.invalid_type,expected:$.nan,received:b.parsedType}),H}return{status:"valid",value:t.data}}};kt.create=(t)=>{return new kt({typeName:E.ZodNaN,...Y(t)})};fb=Symbol("zod_brand");pt=class pt extends M{_parse(t){let{ctx:n}=this._processInputParams(t),b=n.data;return this._def.type._parse({data:b,path:n.path,parent:n})}unwrap(){return this._def.type}};Qt=class Qt extends M{_parse(t){let{status:n,ctx:b}=this._processInputParams(t);if(b.common.async)return(async()=>{let l=await this._def.in._parseAsync({data:b.data,path:b.path,parent:b});if(l.status==="aborted")return H;if(l.status==="dirty")return n.dirty(),Z(l.value);else return this._def.out._parseAsync({data:l.value,path:b.path,parent:b})})();else{let o=this._def.in._parseSync({data:b.data,path:b.path,parent:b});if(o.status==="aborted")return H;if(o.status==="dirty")return n.dirty(),{status:"dirty",value:o.value};else return this._def.out._parseSync({data:o.value,path:b.path,parent:b})}}static create(t,n){return new Qt({in:t,out:n,typeName:E.ZodPipeline})}};qt=class qt extends M{_parse(t){let n=this._def.innerType._parse(t),b=(o)=>{if(P(o))o.value=Object.freeze(o.value);return o};return bt(n)?n.then((o)=>b(o)):b(n)}unwrap(){return this._def.innerType}};qt.create=(t,n)=>{return new qt({innerType:t,typeName:E.ZodReadonly,...Y(n)})};rb={object:Q.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"})(E||(E={}));Ao=D.create,qo=C.create,gb=kt.create,$b=y.create,Ho=ft.create,vb=s.create,wb=Mt.create,cb=rt.create,_b=ht.create,Ab=z.create,qb=T.create,Hb=p.create,Eb=Xt.create,xb=W.create,Yb=Q.create,Mb=Q.strictCreate,Xb=gt.create,Sb=Vt.create,mb=$t.create,kb=N.create,Qb=St.create,Jb=mt.create,Gb=tt.create,Lb=at.create,Fb=vt.create,Rb=wt.create,Bb=e.create,Ob=ct.create,Db=nt.create,Wb=j.create,db=d.create,Ub=i.create,jb=j.createWithPreprocess,Vb=Qt.create,ub={string:(t)=>D.create({...t,coerce:!0}),number:(t)=>C.create({...t,coerce:!0}),boolean:(t)=>ft.create({...t,coerce:!0}),bigint:(t)=>y.create({...t,coerce:!0}),date:(t)=>s.create({...t,coerce:!0})},ib=H});var w={};k(w,{void:()=>Eb,util:()=>X,unknown:()=>qb,union:()=>Xb,undefined:()=>cb,tuple:()=>kb,transformer:()=>Wb,symbol:()=>wb,string:()=>Ao,strictObject:()=>Mb,setErrorMap:()=>U0,set:()=>Gb,record:()=>Qb,quotelessJson:()=>W0,promise:()=>Db,preprocess:()=>jb,pipeline:()=>Vb,ostring:()=>pb,optional:()=>db,onumber:()=>Nb,oboolean:()=>Kb,objectUtil:()=>qn,object:()=>Yb,number:()=>qo,nullable:()=>Ub,null:()=>_b,never:()=>Hb,nativeEnum:()=>Ob,nan:()=>gb,map:()=>Jb,makeIssue:()=>Yt,literal:()=>Rb,lazy:()=>Fb,late:()=>rb,isValid:()=>P,isDirty:()=>jt,isAsync:()=>bt,isAborted:()=>Ut,intersection:()=>mb,instanceof:()=>hb,getParsedType:()=>V,getErrorMap:()=>ot,function:()=>Lb,enum:()=>Bb,effect:()=>Wb,discriminatedUnion:()=>Sb,defaultErrorMap:()=>K,datetimeRegex:()=>wo,date:()=>vb,custom:()=>_o,coerce:()=>ub,boolean:()=>Ho,bigint:()=>$b,array:()=>xb,any:()=>Ab,addIssueToContext:()=>v,ZodVoid:()=>Xt,ZodUnknown:()=>T,ZodUnion:()=>gt,ZodUndefined:()=>rt,ZodType:()=>M,ZodTuple:()=>N,ZodTransformer:()=>j,ZodSymbol:()=>Mt,ZodString:()=>D,ZodSet:()=>tt,ZodSchema:()=>M,ZodRecord:()=>St,ZodReadonly:()=>qt,ZodPromise:()=>nt,ZodPipeline:()=>Qt,ZodParsedType:()=>$,ZodOptional:()=>d,ZodObject:()=>Q,ZodNumber:()=>C,ZodNullable:()=>i,ZodNull:()=>ht,ZodNever:()=>p,ZodNativeEnum:()=>ct,ZodNaN:()=>kt,ZodMap:()=>mt,ZodLiteral:()=>wt,ZodLazy:()=>vt,ZodIssueCode:()=>g,ZodIntersection:()=>$t,ZodFunction:()=>at,ZodFirstPartyTypeKind:()=>E,ZodError:()=>R,ZodEnum:()=>e,ZodEffects:()=>j,ZodDiscriminatedUnion:()=>Vt,ZodDefault:()=>_t,ZodDate:()=>s,ZodCatch:()=>At,ZodBranded:()=>pt,ZodBoolean:()=>ft,ZodBigInt:()=>y,ZodArray:()=>W,ZodAny:()=>z,Schema:()=>M,ParseStatus:()=>L,OK:()=>F,NEVER:()=>ib,INVALID:()=>H,EMPTY_PATH:()=>j0,DIRTY:()=>Z,BRAND:()=>fb});var Mn=x(()=>{dt();En();fo();xt();Eo();Wt()});var xo=x(()=>{Mn();Mn()});function Xn(t){if(t===null||typeof t!=="object")return t;if(Array.isArray(t))return t.map(Xn);let n={};for(let b of Object.keys(t))n[b]=Xn(t[b]);return n}var Ib,Ya;var Yo=x(()=>{Ib={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}},Ya=Xn(Ib)});class Jt{static validate(t,n){try{return{success:!0,data:t.parse(n)}}catch(b){if(b instanceof w.ZodError){let o={};return b.errors.forEach((l)=>{let a=l.path.join(".");o[a]=l.message}),{success:!1,errors:o}}return{success:!1,errors:{general:"Validation failed"}}}}static validateField(t,n){try{return t.parse(n),{success:!0}}catch(b){if(b instanceof w.ZodError)return{success:!1,error:b.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 Mo,I;var Sn=x(()=>{xo();Yo();Mo={login:w.object({email:w.string().min(1,"Email is required").email("Please enter a valid email address"),password:w.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:w.object({name:w.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:w.string().min(1,"Email is required").email("Please enter a valid email address"),password:w.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:w.string()}).refine((t)=>t.password===t.confirmPassword,{message:"Passwords don't match",path:["confirmPassword"]}),auth:{register:w.object({action:w.literal("register"),email:w.string().min(1,"Email is required").email("Please enter a valid email address"),username:w.string().min(3,"Username must be at least 3 characters").max(30,"Username must be less than 30 characters"),password:w.string().min(8,"Password must be at least 8 characters"),full_name:w.string().min(2,"Full name is required").max(100,"Full name is too long")}),login:w.object({action:w.literal("login"),email:w.string().min(1,"Email is required").email("Please enter a valid email address"),password:w.string().min(8,"Password must be at least 8 characters")}),logout:w.object({action:w.literal("logout")}),action:w.discriminatedUnion("action",[w.object({action:w.literal("register")}).merge(w.object({email:w.string().min(1,"Email is required").email("Please enter a valid email address"),username:w.string().min(3,"Username must be at least 3 characters").max(30,"Username must be less than 30 characters"),password:w.string().min(8,"Password must be at least 8 characters"),full_name:w.string().min(2,"Full name is required").max(100,"Full name is too long")})),w.object({action:w.literal("login")}).merge(w.object({email:w.string().min(1,"Email is required").email("Please enter a valid email address"),password:w.string().min(8,"Password must be at least 8 characters")})),w.object({action:w.literal("logout")})])},contact:w.object({name:w.string().min(2,"Name must be at least 2 characters").max(100,"Name is too long"),email:w.string().email("Please enter a valid email address"),message:w.string().min(10,"Message must be at least 10 characters").max(1000,"Message is too long")}),email:w.string().min(1,"Email is required").email("Please enter a valid email address"),password:w.string().min(8,"Password must be at least 8 characters").regex(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)/,"Password must contain uppercase, lowercase, and number"),phone:w.string().regex(/^[\+]?[1-9][\d]{0,15}$/,"Please enter a valid phone number"),url:w.string().min(1,"URL is required").url("Please enter a valid URL"),required:w.string().min(1,"This field is required"),positiveNumber:w.number().positive("Must be a positive number"),integer:w.number().int("Must be a whole number"),futureDate:w.date().min(new Date,"Date must be in the future"),imageFile:w.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:w.object({full_name:w.string().min(2,"Full name must be at least 2 characters").max(100,"Full name is too long").optional(),bio:w.string().max(500,"Bio must be less than 500 characters").nullable().optional(),avatar_url:w.string().url("Please enter a valid URL").nullable().optional(),theme:w.enum(["africanity","dark","light","system"]).optional(),language:w.string().min(2).max(10).optional()}),project:w.object({name:w.string().min(1,"Project name is required").max(100,"Project name is too long"),description:w.string().max(1000,"Description is too long").nullable().optional(),repository_url:w.string().url("Please enter a valid repository URL").nullable().optional(),demo_url:w.string().url("Please enter a valid demo URL").nullable().optional(),tags:w.array(w.string()).optional(),is_public:w.boolean().optional()})};I={required:(t="This field is required")=>w.string().min(1,t),email:(t="Please enter a valid email address")=>w.string().email(t),minLength:(t,n)=>w.string().min(t,n||`Must be at least ${t} characters`),maxLength:(t,n)=>w.string().max(t,n||`Must be less than ${t} characters`),pattern:(t,n)=>w.string().regex(t,n),numeric:(t="Must be a number")=>w.string().regex(/^\d+$/,t),phone:(t="Please enter a valid phone number")=>w.string().regex(/^[\+]?[1-9][\d]{0,15}$/,t),url:(t="Please enter a valid URL")=>w.string().min(1,"URL is required").url(t)}});var Xo={};k(Xo,{default:()=>Pb,AfriInput:()=>Nt});var Nt,Pb;var So=x(()=>{m();Sn();Nt=class Nt extends c{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"),b=t.value;if(this.hasAttribute("required")&&!b.trim()){this.setAttribute("error","This field is required");return}if(n&&b.trim()){let l=this._getValidationSchema(n);if(l){let a=Jt.validateField(l,b);if(!a.success)this.setAttribute("error",a.error);else this.removeAttribute("error")}}}_getValidationSchema(t){let n={email:I.email(),password:I.password(),phone:I.phone(),url:I.url(),required:I.required()};if(t.includes(":")){let[b,o]=t.split(":"),l=parseInt(o);switch(b){case"minLength":return I.minLength(l);case"maxLength":return I.maxLength(l);case"pattern":return I.pattern(new RegExp(o),"Invalid format")}}return n[t]||null}attributeChangedCallback(){this.render()}render(){let t=this.getAttribute("type")||"text",n=this.getAttribute("name")||"",b=this.getAttribute("label")||"",o=this.getAttribute("placeholder")||"",l=this.getAttribute("error")||"",a=this.getAttribute("helper")||"",f=this.getAttribute("theme")||"tanzania",r=this.getAttribute("icon")||"",h=this.hasAttribute("required"),A=this.getAttribute("aria-label"),S=this.getAttribute("aria-describedby"),G={tanzania:{focus:"#1EB53A",error:"#DC3545"},maasai:{focus:"#FF0000",error:"#8B0000"},ndebele:{focus:"#4169E1",error:"#DC143C"}},J=G[f]||G.tanzania,O=[];if(l)O.push(`error-${this._uniqueId}`);else if(a)O.push(`helper-${this._uniqueId}`);if(S)O.push(...S.split(" "));let vn=O.length>0?`aria-describedby="${O.join(" ")}"`:"";this.shadowRoot.innerHTML=`
|
|
628
|
+
`}};d("af-navbar",Wt);tl=Wt});var E,Sn,$,W=(t)=>{switch(typeof t){case"undefined":return $.undefined;case"string":return $.string;case"number":return Number.isNaN(t)?$.nan:$.number;case"boolean":return $.boolean;case"function":return $.function;case"bigint":return $.bigint;case"symbol":return $.symbol;case"object":if(Array.isArray(t))return $.array;if(t===null)return $.null;if(t.then&&typeof t.then==="function"&&t.catch&&typeof t.catch==="function")return $.promise;if(typeof Map<"u"&&t instanceof Map)return $.map;if(typeof Set<"u"&&t instanceof Set)return $.set;if(typeof Date<"u"&&t instanceof Date)return $.date;return $.object;default:return $.unknown}};var Et=A(()=>{(function(t){t.assertEqual=(l)=>{};function n(l){}t.assertIs=n;function a(l){throw Error()}t.assertNever=a,t.arrayToEnum=(l)=>{let b={};for(let r of l)b[r]=r;return b},t.getValidEnumValues=(l)=>{let b=t.objectKeys(l).filter((h)=>typeof l[l[h]]!=="number"),r={};for(let h of b)r[h]=l[h];return t.objectValues(r)},t.objectValues=(l)=>{return t.objectKeys(l).map(function(b){return l[b]})},t.objectKeys=typeof Object.keys==="function"?(l)=>Object.keys(l):(l)=>{let b=[];for(let r in l)if(Object.prototype.hasOwnProperty.call(l,r))b.push(r);return b},t.find=(l,b)=>{for(let r of l)if(b(r))return r;return},t.isInteger=typeof Number.isInteger==="function"?(l)=>Number.isInteger(l):(l)=>typeof l==="number"&&Number.isFinite(l)&&Math.floor(l)===l;function o(l,b=" | "){return l.map((r)=>typeof r==="string"?`'${r}'`:r).join(b)}t.joinValues=o,t.jsonStringifyReplacer=(l,b)=>{if(typeof b==="bigint")return b.toString();return b}})(E||(E={}));(function(t){t.mergeShapes=(n,a)=>{return{...n,...a}}})(Sn||(Sn={}));$=E.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"])});var g,nl=(t)=>{return JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:")},G;var Ut=A(()=>{Et();g=E.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"]);G=class G extends Error{get errors(){return this.issues}constructor(t){super();this.issues=[],this.addIssue=(a)=>{this.issues=[...this.issues,a]},this.addIssues=(a=[])=>{this.issues=[...this.issues,...a]};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(l){return l.message},a={_errors:[]},o=(l)=>{for(let b of l.issues)if(b.code==="invalid_union")b.unionErrors.map(o);else if(b.code==="invalid_return_type")o(b.returnTypeError);else if(b.code==="invalid_arguments")o(b.argumentsError);else if(b.path.length===0)a._errors.push(n(b));else{let r=a,h=0;while(h<b.path.length){let f=b.path[h];if(h!==b.path.length-1)r[f]=r[f]||{_errors:[]};else r[f]=r[f]||{_errors:[]},r[f]._errors.push(n(b));r=r[f],h++}}};return o(this),a}static assert(t){if(!(t instanceof G))throw Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,E.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=(n)=>n.message){let n={},a=[];for(let o of this.issues)if(o.path.length>0){let l=o.path[0];n[l]=n[l]||[],n[l].push(t(o))}else a.push(t(o));return{formErrors:a,fieldErrors:n}}get formErrors(){return this.flatten()}};G.create=(t)=>{return new G(t)}});var ol=(t,n)=>{let a;switch(t.code){case g.invalid_type:if(t.received===$.undefined)a="Required";else a=`Expected ${t.expected}, received ${t.received}`;break;case g.invalid_literal:a=`Invalid literal value, expected ${JSON.stringify(t.expected,E.jsonStringifyReplacer)}`;break;case g.unrecognized_keys:a=`Unrecognized key(s) in object: ${E.joinValues(t.keys,", ")}`;break;case g.invalid_union:a="Invalid input";break;case g.invalid_union_discriminator:a=`Invalid discriminator value. Expected ${E.joinValues(t.options)}`;break;case g.invalid_enum_value:a=`Invalid enum value. Expected ${E.joinValues(t.options)}, received '${t.received}'`;break;case g.invalid_arguments:a="Invalid function arguments";break;case g.invalid_return_type:a="Invalid function return type";break;case g.invalid_date:a="Invalid date";break;case g.invalid_string:if(typeof t.validation==="object")if("includes"in t.validation){if(a=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position==="number")a=`${a} at one or more positions greater than or equal to ${t.validation.position}`}else if("startsWith"in t.validation)a=`Invalid input: must start with "${t.validation.startsWith}"`;else if("endsWith"in t.validation)a=`Invalid input: must end with "${t.validation.endsWith}"`;else E.assertNever(t.validation);else if(t.validation!=="regex")a=`Invalid ${t.validation}`;else a="Invalid";break;case g.too_small:if(t.type==="array")a=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`;else if(t.type==="string")a=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`;else if(t.type==="number")a=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`;else if(t.type==="bigint")a=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`;else if(t.type==="date")a=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`;else a="Invalid input";break;case g.too_big:if(t.type==="array")a=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`;else if(t.type==="string")a=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`;else if(t.type==="number")a=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`;else if(t.type==="bigint")a=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`;else if(t.type==="date")a=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`;else a="Invalid input";break;case g.custom:a="Invalid input";break;case g.invalid_intersection_types:a="Intersection results could not be merged";break;case g.not_multiple_of:a=`Number must be a multiple of ${t.multipleOf}`;break;case g.not_finite:a="Number must be finite";break;default:a=n.defaultError,E.assertNever(t)}return{message:a}},j;var Ln=A(()=>{Ut();Et();j=ol});function al(t){qo=t}function ot(){return qo}var qo;var Vt=A(()=>{Ln();qo=j});function v(t,n){let a=ot(),o=Mt({issueData:n,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,a,a===j?void 0:j].filter((l)=>!!l)});t.common.issues.push(o)}class Q{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 a=[];for(let o of n){if(o.status==="aborted")return m;if(o.status==="dirty")t.dirty();a.push(o.value)}return{status:t.value,value:a}}static async mergeObjectAsync(t,n){let a=[];for(let o of n){let l=await o.key,b=await o.value;a.push({key:l,value:b})}return Q.mergeObjectSync(t,a)}static mergeObjectSync(t,n){let a={};for(let o of n){let{key:l,value:b}=o;if(l.status==="aborted")return m;if(b.status==="aborted")return m;if(l.status==="dirty")t.dirty();if(b.status==="dirty")t.dirty();if(l.value!=="__proto__"&&(typeof b.value<"u"||o.alwaysSet))a[l.value]=b.value}return{status:t.value,value:a}}}var Mt=(t)=>{let{data:n,path:a,errorMaps:o,issueData:l}=t,b=[...a,...l.path||[]],r={...l,path:b};if(l.message!==void 0)return{...l,path:b,message:l.message};let h="",f=o.filter((_)=>!!_).slice().reverse();for(let _ of f)h=_(r,{data:n,defaultError:h}).message;return{...l,path:b,message:h}},ll,m,Z=(t)=>({status:"dirty",value:t}),J=(t)=>({status:"valid",value:t}),jt=(t)=>t.status==="aborted",et=(t)=>t.status==="dirty",I=(t)=>t.status==="valid",at=(t)=>typeof Promise<"u"&&t instanceof Promise;var Xn=A(()=>{Vt();Ln();ll=[];m=Object.freeze({status:"aborted"})});var po=()=>{};var i;var Ho=A(()=>{(function(t){t.errToObj=(n)=>typeof n==="string"?{message:n}:n||{},t.toString=(n)=>typeof n==="string"?n:n?.message})(i||(i={}))});class D{constructor(t,n,a,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=a,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 k(t){if(!t)return{};let{errorMap:n,invalid_type_error:a,required_error:o,description:l}=t;if(n&&(a||o))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if(n)return{errorMap:n,description:l};return{errorMap:(r,h)=>{let{message:f}=t;if(r.code==="invalid_enum_value")return{message:f??h.defaultError};if(typeof h.data>"u")return{message:f??o??h.defaultError};if(r.code!=="invalid_type")return{message:h.defaultError};return{message:f??a??h.defaultError}},description:l}}class p{get description(){return this._def.description}_getType(t){return W(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:W(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Q,ctx:{common:t.parent.common,data:t.data,parsedType:W(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let n=this._parse(t);if(at(n))throw Error("Synchronous parse encountered promise.");return n}_parseAsync(t){let n=this._parse(t);return Promise.resolve(n)}parse(t,n){let a=this.safeParse(t,n);if(a.success)return a.data;throw a.error}safeParse(t,n){let a={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:W(t)},o=this._parseSync({data:t,path:a.path,parent:a});return Eo(a,o)}"~validate"(t){let n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:W(t)};if(!this["~standard"].async)try{let a=this._parseSync({data:t,path:[],parent:n});return I(a)?{value:a.value}:{issues:n.common.issues}}catch(a){if(a?.message?.toLowerCase()?.includes("encountered"))this["~standard"].async=!0;n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then((a)=>I(a)?{value:a.value}:{issues:n.common.issues})}async parseAsync(t,n){let a=await this.safeParseAsync(t,n);if(a.success)return a.data;throw a.error}async safeParseAsync(t,n){let a={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:W(t)},o=this._parse({data:t,path:a.path,parent:a}),l=await(at(o)?o:Promise.resolve(o));return Eo(a,l)}refine(t,n){let a=(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,l)=>{let b=t(o),r=()=>l.addIssue({code:g.custom,...a(o)});if(typeof Promise<"u"&&b instanceof Promise)return b.then((h)=>{if(!h)return r(),!1;else return!0});if(!b)return r(),!1;else return!0})}refinement(t,n){return this._refinement((a,o)=>{if(!t(a))return o.addIssue(typeof n==="function"?n(a,o):n),!1;else return!0})}_refinement(t){return new O({schema:this,typeName:x.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 B.create(this,this._def)}nullable(){return N.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return u.create(this)}promise(){return nt.create(this,this._def)}or(t){return gt.create([this,t],this._def)}and(t){return ct.create(this,t,this._def)}transform(t){return new O({...k(this._def),schema:this,typeName:x.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let n=typeof t==="function"?t:()=>t;return new dt({...k(this._def),innerType:this,defaultValue:n,typeName:x.ZodDefault})}brand(){return new Kt({typeName:x.ZodBranded,type:this,...k(this._def)})}catch(t){let n=typeof t==="function"?t:()=>t;return new _t({...k(this._def),innerType:this,catchValue:n,typeName:x.ZodCatch})}describe(t){return new this.constructor({...this._def,description:t})}pipe(t){return Jt.create(this,t)}readonly(){return it.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}function So(t){let n="[0-5]\\d";if(t.precision)n=`${n}\\.\\d{${t.precision}}`;else if(t.precision==null)n=`${n}(\\.\\d+)?`;let a=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${n})${a}`}function ql(t){return new RegExp(`^${So(t)}$`)}function Lo(t){let n=`${Yo}T${So(t)}`,a=[];if(a.push(t.local?"Z?":"Z"),t.offset)a.push("([+-]\\d{2}:?\\d{2})");return n=`${n}(${a.join("|")})`,new RegExp(`^${n}$`)}function pl(t,n){if((n==="v4"||!n)&&dl.test(t))return!0;if((n==="v6"||!n)&&il.test(t))return!0;return!1}function Hl(t,n){if(!cl.test(t))return!1;try{let[a]=t.split(".");if(!a)return!1;let o=a.replace(/-/g,"+").replace(/_/g,"/").padEnd(a.length+(4-a.length%4)%4,"="),l=JSON.parse(atob(o));if(typeof l!=="object"||l===null)return!1;if("typ"in l&&l?.typ!=="JWT")return!1;if(!l.alg)return!1;if(n&&l.alg!==n)return!1;return!0}catch{return!1}}function El(t,n){if((n==="v4"||!n)&&_l.test(t))return!0;if((n==="v6"||!n)&&Al.test(t))return!0;return!1}function Ml(t,n){let a=(t.toString().split(".")[1]||"").length,o=(n.toString().split(".")[1]||"").length,l=a>o?a:o,b=Number.parseInt(t.toFixed(l).replace(".","")),r=Number.parseInt(n.toFixed(l).replace(".",""));return b%r/10**l}function lt(t){if(t instanceof S){let n={};for(let a in t.shape){let o=t.shape[a];n[a]=B.create(lt(o))}return new S({...t._def,shape:()=>n})}else if(t instanceof u)return new u({...t._def,type:lt(t.element)});else if(t instanceof B)return B.create(lt(t.unwrap()));else if(t instanceof N)return N.create(lt(t.unwrap()));else if(t instanceof V)return V.create(t.items.map((n)=>lt(n)));else return t}function Jn(t,n){let a=W(t),o=W(n);if(t===n)return{valid:!0,data:t};else if(a===$.object&&o===$.object){let l=E.objectKeys(n),b=E.objectKeys(t).filter((h)=>l.indexOf(h)!==-1),r={...t,...n};for(let h of b){let f=Jn(t[h],n[h]);if(!f.valid)return{valid:!1};r[h]=f.data}return{valid:!0,data:r}}else if(a===$.array&&o===$.array){if(t.length!==n.length)return{valid:!1};let l=[];for(let b=0;b<t.length;b++){let r=t[b],h=n[b],f=Jn(r,h);if(!f.valid)return{valid:!1};l.push(f.data)}return{valid:!0,data:l}}else if(a===$.date&&o===$.date&&+t===+n)return{valid:!0,data:t};else return{valid:!1}}function Xo(t,n){return new y({values:t,typeName:x.ZodEnum,...k(n)})}function Mo(t,n){let a=typeof t==="function"?t(n):typeof t==="string"?{message:t}:t;return typeof a==="string"?{message:a}:a}function Qo(t,n={},a){if(t)return z.create().superRefine((o,l)=>{let b=t(o);if(b instanceof Promise)return b.then((r)=>{if(!r){let h=Mo(n,o),f=h.fatal??a??!0;l.addIssue({code:"custom",...h,fatal:f})}});if(!b){let r=Mo(n,o),h=r.fatal??a??!0;l.addIssue({code:"custom",...r,fatal:h})}return});return z.create()}var Eo=(t,n)=>{if(I(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 a=new G(t.common.issues);return this._error=a,this._error}}}},bl,rl,hl,fl,gl,cl,$l,vl,wl="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Qn,dl,_l,il,Al,ml,xl,Yo="((\\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])))",kl,F,C,T,rt,s,Yt,ht,ft,z,P,U,St,u,S,gt,e=(t)=>{if(t instanceof $t)return e(t.schema);else if(t instanceof O)return e(t.innerType());else if(t instanceof vt)return[t.value];else if(t instanceof y)return t.options;else if(t instanceof wt)return E.objectValues(t.enum);else if(t instanceof dt)return e(t._def.innerType);else if(t instanceof ht)return[void 0];else if(t instanceof ft)return[null];else if(t instanceof B)return[void 0,...e(t.unwrap())];else if(t instanceof N)return[null,...e(t.unwrap())];else if(t instanceof Kt)return e(t.unwrap());else if(t instanceof it)return e(t.unwrap());else if(t instanceof _t)return e(t._def.innerType);else return[]},Nt,ct,V,Lt,Xt,tt,bt,$t,vt,y,wt,nt,O,B,N,dt,_t,Qt,Yl,Kt,Jt,it,Sl,x,Ll=(t,n={message:`Input not instance of ${t.name}`})=>Qo((a)=>a instanceof t,n),Jo,Go,Xl,Ql,Ro,Jl,Gl,Rl,Fl,ul,Bl,Dl,Ol,Wl,Ul,Vl,jl,el,Nl,Kl,Il,Pl,Cl,Tl,yl,Zl,sl,zl,tb,nb,ob,ab,lb,bb,rb=()=>Jo().optional(),hb=()=>Go().optional(),fb=()=>Ro().optional(),gb,cb;var Fo=A(()=>{Ut();Vt();Ho();Xn();Et();bl=/^c[^\s-]{8,}$/i,rl=/^[0-9a-z]+$/,hl=/^[0-9A-HJKMNP-TV-Z]{26}$/i,fl=/^[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,gl=/^[a-z0-9_-]{21}$/i,cl=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,$l=/^[-+]?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)?)??$/,vl=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,dl=/^(?:(?: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])$/,_l=/^(?:(?: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])$/,il=/^(([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]))$/,Al=/^(([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])$/,ml=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,xl=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,kl=new RegExp(`^${Yo}$`);F=class F extends p{_parse(t){if(this._def.coerce)t.data=String(t.data);if(this._getType(t)!==$.string){let l=this._getOrReturnCtx(t);return v(l,{code:g.invalid_type,expected:$.string,received:l.parsedType}),m}let a=new Q,o=void 0;for(let l of this._def.checks)if(l.kind==="min"){if(t.data.length<l.value)o=this._getOrReturnCtx(t,o),v(o,{code:g.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),a.dirty()}else if(l.kind==="max"){if(t.data.length>l.value)o=this._getOrReturnCtx(t,o),v(o,{code:g.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),a.dirty()}else if(l.kind==="length"){let b=t.data.length>l.value,r=t.data.length<l.value;if(b||r){if(o=this._getOrReturnCtx(t,o),b)v(o,{code:g.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message});else if(r)v(o,{code:g.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message});a.dirty()}}else if(l.kind==="email"){if(!vl.test(t.data))o=this._getOrReturnCtx(t,o),v(o,{validation:"email",code:g.invalid_string,message:l.message}),a.dirty()}else if(l.kind==="emoji"){if(!Qn)Qn=new RegExp(wl,"u");if(!Qn.test(t.data))o=this._getOrReturnCtx(t,o),v(o,{validation:"emoji",code:g.invalid_string,message:l.message}),a.dirty()}else if(l.kind==="uuid"){if(!fl.test(t.data))o=this._getOrReturnCtx(t,o),v(o,{validation:"uuid",code:g.invalid_string,message:l.message}),a.dirty()}else if(l.kind==="nanoid"){if(!gl.test(t.data))o=this._getOrReturnCtx(t,o),v(o,{validation:"nanoid",code:g.invalid_string,message:l.message}),a.dirty()}else if(l.kind==="cuid"){if(!bl.test(t.data))o=this._getOrReturnCtx(t,o),v(o,{validation:"cuid",code:g.invalid_string,message:l.message}),a.dirty()}else if(l.kind==="cuid2"){if(!rl.test(t.data))o=this._getOrReturnCtx(t,o),v(o,{validation:"cuid2",code:g.invalid_string,message:l.message}),a.dirty()}else if(l.kind==="ulid"){if(!hl.test(t.data))o=this._getOrReturnCtx(t,o),v(o,{validation:"ulid",code:g.invalid_string,message:l.message}),a.dirty()}else if(l.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),v(o,{validation:"url",code:g.invalid_string,message:l.message}),a.dirty()}else if(l.kind==="regex"){if(l.regex.lastIndex=0,!l.regex.test(t.data))o=this._getOrReturnCtx(t,o),v(o,{validation:"regex",code:g.invalid_string,message:l.message}),a.dirty()}else if(l.kind==="trim")t.data=t.data.trim();else if(l.kind==="includes"){if(!t.data.includes(l.value,l.position))o=this._getOrReturnCtx(t,o),v(o,{code:g.invalid_string,validation:{includes:l.value,position:l.position},message:l.message}),a.dirty()}else if(l.kind==="toLowerCase")t.data=t.data.toLowerCase();else if(l.kind==="toUpperCase")t.data=t.data.toUpperCase();else if(l.kind==="startsWith"){if(!t.data.startsWith(l.value))o=this._getOrReturnCtx(t,o),v(o,{code:g.invalid_string,validation:{startsWith:l.value},message:l.message}),a.dirty()}else if(l.kind==="endsWith"){if(!t.data.endsWith(l.value))o=this._getOrReturnCtx(t,o),v(o,{code:g.invalid_string,validation:{endsWith:l.value},message:l.message}),a.dirty()}else if(l.kind==="datetime"){if(!Lo(l).test(t.data))o=this._getOrReturnCtx(t,o),v(o,{code:g.invalid_string,validation:"datetime",message:l.message}),a.dirty()}else if(l.kind==="date"){if(!kl.test(t.data))o=this._getOrReturnCtx(t,o),v(o,{code:g.invalid_string,validation:"date",message:l.message}),a.dirty()}else if(l.kind==="time"){if(!ql(l).test(t.data))o=this._getOrReturnCtx(t,o),v(o,{code:g.invalid_string,validation:"time",message:l.message}),a.dirty()}else if(l.kind==="duration"){if(!$l.test(t.data))o=this._getOrReturnCtx(t,o),v(o,{validation:"duration",code:g.invalid_string,message:l.message}),a.dirty()}else if(l.kind==="ip"){if(!pl(t.data,l.version))o=this._getOrReturnCtx(t,o),v(o,{validation:"ip",code:g.invalid_string,message:l.message}),a.dirty()}else if(l.kind==="jwt"){if(!Hl(t.data,l.alg))o=this._getOrReturnCtx(t,o),v(o,{validation:"jwt",code:g.invalid_string,message:l.message}),a.dirty()}else if(l.kind==="cidr"){if(!El(t.data,l.version))o=this._getOrReturnCtx(t,o),v(o,{validation:"cidr",code:g.invalid_string,message:l.message}),a.dirty()}else if(l.kind==="base64"){if(!ml.test(t.data))o=this._getOrReturnCtx(t,o),v(o,{validation:"base64",code:g.invalid_string,message:l.message}),a.dirty()}else if(l.kind==="base64url"){if(!xl.test(t.data))o=this._getOrReturnCtx(t,o),v(o,{validation:"base64url",code:g.invalid_string,message:l.message}),a.dirty()}else E.assertNever(l);return{status:a.value,value:t.data}}_regex(t,n,a){return this.refinement((o)=>t.test(o),{validation:n,code:g.invalid_string,...i.errToObj(a)})}_addCheck(t){return new F({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...i.errToObj(t)})}url(t){return this._addCheck({kind:"url",...i.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...i.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...i.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...i.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...i.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...i.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...i.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...i.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...i.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...i.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...i.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...i.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,...i.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,...i.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...i.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...i.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...i.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...i.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...i.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...i.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...i.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...i.errToObj(n)})}nonempty(t){return this.min(1,i.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:x.ZodString,coerce:t?.coerce??!1,...k(t)})};C=class C extends p{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)!==$.number){let l=this._getOrReturnCtx(t);return v(l,{code:g.invalid_type,expected:$.number,received:l.parsedType}),m}let a=void 0,o=new Q;for(let l of this._def.checks)if(l.kind==="int"){if(!E.isInteger(t.data))a=this._getOrReturnCtx(t,a),v(a,{code:g.invalid_type,expected:"integer",received:"float",message:l.message}),o.dirty()}else if(l.kind==="min"){if(l.inclusive?t.data<l.value:t.data<=l.value)a=this._getOrReturnCtx(t,a),v(a,{code:g.too_small,minimum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),o.dirty()}else if(l.kind==="max"){if(l.inclusive?t.data>l.value:t.data>=l.value)a=this._getOrReturnCtx(t,a),v(a,{code:g.too_big,maximum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),o.dirty()}else if(l.kind==="multipleOf"){if(Ml(t.data,l.value)!==0)a=this._getOrReturnCtx(t,a),v(a,{code:g.not_multiple_of,multipleOf:l.value,message:l.message}),o.dirty()}else if(l.kind==="finite"){if(!Number.isFinite(t.data))a=this._getOrReturnCtx(t,a),v(a,{code:g.not_finite,message:l.message}),o.dirty()}else E.assertNever(l);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,i.toString(n))}gt(t,n){return this.setLimit("min",t,!1,i.toString(n))}lte(t,n){return this.setLimit("max",t,!0,i.toString(n))}lt(t,n){return this.setLimit("max",t,!1,i.toString(n))}setLimit(t,n,a,o){return new C({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:a,message:i.toString(o)}]})}_addCheck(t){return new C({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:i.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:i.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:i.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:i.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:i.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:i.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:i.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:i.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:i.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"&&E.isInteger(t.value))}get isFinite(){let t=null,n=null;for(let a of this._def.checks)if(a.kind==="finite"||a.kind==="int"||a.kind==="multipleOf")return!0;else if(a.kind==="min"){if(n===null||a.value>n)n=a.value}else if(a.kind==="max"){if(t===null||a.value<t)t=a.value}return Number.isFinite(n)&&Number.isFinite(t)}};C.create=(t)=>{return new C({checks:[],typeName:x.ZodNumber,coerce:t?.coerce||!1,...k(t)})};T=class T extends p{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)!==$.bigint)return this._getInvalidInput(t);let a=void 0,o=new Q;for(let l of this._def.checks)if(l.kind==="min"){if(l.inclusive?t.data<l.value:t.data<=l.value)a=this._getOrReturnCtx(t,a),v(a,{code:g.too_small,type:"bigint",minimum:l.value,inclusive:l.inclusive,message:l.message}),o.dirty()}else if(l.kind==="max"){if(l.inclusive?t.data>l.value:t.data>=l.value)a=this._getOrReturnCtx(t,a),v(a,{code:g.too_big,type:"bigint",maximum:l.value,inclusive:l.inclusive,message:l.message}),o.dirty()}else if(l.kind==="multipleOf"){if(t.data%l.value!==BigInt(0))a=this._getOrReturnCtx(t,a),v(a,{code:g.not_multiple_of,multipleOf:l.value,message:l.message}),o.dirty()}else E.assertNever(l);return{status:o.value,value:t.data}}_getInvalidInput(t){let n=this._getOrReturnCtx(t);return v(n,{code:g.invalid_type,expected:$.bigint,received:n.parsedType}),m}gte(t,n){return this.setLimit("min",t,!0,i.toString(n))}gt(t,n){return this.setLimit("min",t,!1,i.toString(n))}lte(t,n){return this.setLimit("max",t,!0,i.toString(n))}lt(t,n){return this.setLimit("max",t,!1,i.toString(n))}setLimit(t,n,a,o){return new T({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:a,message:i.toString(o)}]})}_addCheck(t){return new T({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:i.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:i.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:i.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:i.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:i.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}};T.create=(t)=>{return new T({checks:[],typeName:x.ZodBigInt,coerce:t?.coerce??!1,...k(t)})};rt=class rt extends p{_parse(t){if(this._def.coerce)t.data=Boolean(t.data);if(this._getType(t)!==$.boolean){let a=this._getOrReturnCtx(t);return v(a,{code:g.invalid_type,expected:$.boolean,received:a.parsedType}),m}return J(t.data)}};rt.create=(t)=>{return new rt({typeName:x.ZodBoolean,coerce:t?.coerce||!1,...k(t)})};s=class s extends p{_parse(t){if(this._def.coerce)t.data=new Date(t.data);if(this._getType(t)!==$.date){let l=this._getOrReturnCtx(t);return v(l,{code:g.invalid_type,expected:$.date,received:l.parsedType}),m}if(Number.isNaN(t.data.getTime())){let l=this._getOrReturnCtx(t);return v(l,{code:g.invalid_date}),m}let a=new Q,o=void 0;for(let l of this._def.checks)if(l.kind==="min"){if(t.data.getTime()<l.value)o=this._getOrReturnCtx(t,o),v(o,{code:g.too_small,message:l.message,inclusive:!0,exact:!1,minimum:l.value,type:"date"}),a.dirty()}else if(l.kind==="max"){if(t.data.getTime()>l.value)o=this._getOrReturnCtx(t,o),v(o,{code:g.too_big,message:l.message,inclusive:!0,exact:!1,maximum:l.value,type:"date"}),a.dirty()}else E.assertNever(l);return{status:a.value,value:new Date(t.data.getTime())}}_addCheck(t){return new s({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:i.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:i.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}};s.create=(t)=>{return new s({checks:[],coerce:t?.coerce||!1,typeName:x.ZodDate,...k(t)})};Yt=class Yt extends p{_parse(t){if(this._getType(t)!==$.symbol){let a=this._getOrReturnCtx(t);return v(a,{code:g.invalid_type,expected:$.symbol,received:a.parsedType}),m}return J(t.data)}};Yt.create=(t)=>{return new Yt({typeName:x.ZodSymbol,...k(t)})};ht=class ht extends p{_parse(t){if(this._getType(t)!==$.undefined){let a=this._getOrReturnCtx(t);return v(a,{code:g.invalid_type,expected:$.undefined,received:a.parsedType}),m}return J(t.data)}};ht.create=(t)=>{return new ht({typeName:x.ZodUndefined,...k(t)})};ft=class ft extends p{_parse(t){if(this._getType(t)!==$.null){let a=this._getOrReturnCtx(t);return v(a,{code:g.invalid_type,expected:$.null,received:a.parsedType}),m}return J(t.data)}};ft.create=(t)=>{return new ft({typeName:x.ZodNull,...k(t)})};z=class z extends p{constructor(){super(...arguments);this._any=!0}_parse(t){return J(t.data)}};z.create=(t)=>{return new z({typeName:x.ZodAny,...k(t)})};P=class P extends p{constructor(){super(...arguments);this._unknown=!0}_parse(t){return J(t.data)}};P.create=(t)=>{return new P({typeName:x.ZodUnknown,...k(t)})};U=class U extends p{_parse(t){let n=this._getOrReturnCtx(t);return v(n,{code:g.invalid_type,expected:$.never,received:n.parsedType}),m}};U.create=(t)=>{return new U({typeName:x.ZodNever,...k(t)})};St=class St extends p{_parse(t){if(this._getType(t)!==$.undefined){let a=this._getOrReturnCtx(t);return v(a,{code:g.invalid_type,expected:$.void,received:a.parsedType}),m}return J(t.data)}};St.create=(t)=>{return new St({typeName:x.ZodVoid,...k(t)})};u=class u extends p{_parse(t){let{ctx:n,status:a}=this._processInputParams(t),o=this._def;if(n.parsedType!==$.array)return v(n,{code:g.invalid_type,expected:$.array,received:n.parsedType}),m;if(o.exactLength!==null){let b=n.data.length>o.exactLength.value,r=n.data.length<o.exactLength.value;if(b||r)v(n,{code:b?g.too_big:g.too_small,minimum:r?o.exactLength.value:void 0,maximum:b?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),a.dirty()}if(o.minLength!==null){if(n.data.length<o.minLength.value)v(n,{code:g.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),a.dirty()}if(o.maxLength!==null){if(n.data.length>o.maxLength.value)v(n,{code:g.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),a.dirty()}if(n.common.async)return Promise.all([...n.data].map((b,r)=>{return o.type._parseAsync(new D(n,b,n.path,r))})).then((b)=>{return Q.mergeArray(a,b)});let l=[...n.data].map((b,r)=>{return o.type._parseSync(new D(n,b,n.path,r))});return Q.mergeArray(a,l)}get element(){return this._def.type}min(t,n){return new u({...this._def,minLength:{value:t,message:i.toString(n)}})}max(t,n){return new u({...this._def,maxLength:{value:t,message:i.toString(n)}})}length(t,n){return new u({...this._def,exactLength:{value:t,message:i.toString(n)}})}nonempty(t){return this.min(1,t)}};u.create=(t,n)=>{return new u({type:t,minLength:null,maxLength:null,exactLength:null,typeName:x.ZodArray,...k(n)})};S=class S extends p{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=E.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==$.object){let f=this._getOrReturnCtx(t);return v(f,{code:g.invalid_type,expected:$.object,received:f.parsedType}),m}let{status:a,ctx:o}=this._processInputParams(t),{shape:l,keys:b}=this._getCached(),r=[];if(!(this._def.catchall instanceof U&&this._def.unknownKeys==="strip")){for(let f in o.data)if(!b.includes(f))r.push(f)}let h=[];for(let f of b){let _=l[f],M=o.data[f];h.push({key:{status:"valid",value:f},value:_._parse(new D(o,M,o.path,f)),alwaysSet:f in o.data})}if(this._def.catchall instanceof U){let f=this._def.unknownKeys;if(f==="passthrough")for(let _ of r)h.push({key:{status:"valid",value:_},value:{status:"valid",value:o.data[_]}});else if(f==="strict"){if(r.length>0)v(o,{code:g.unrecognized_keys,keys:r}),a.dirty()}else if(f==="strip");else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let f=this._def.catchall;for(let _ of r){let M=o.data[_];h.push({key:{status:"valid",value:_},value:f._parse(new D(o,M,o.path,_)),alwaysSet:_ in o.data})}}if(o.common.async)return Promise.resolve().then(async()=>{let f=[];for(let _ of h){let M=await _.key,X=await _.value;f.push({key:M,value:X,alwaysSet:_.alwaysSet})}return f}).then((f)=>{return Q.mergeObjectSync(a,f)});else return Q.mergeObjectSync(a,h)}get shape(){return this._def.shape()}strict(t){return i.errToObj,new S({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,a)=>{let o=this._def.errorMap?.(n,a).message??a.defaultError;if(n.code==="unrecognized_keys")return{message:i.errToObj(t).message??o};return{message:o}}}:{}})}strip(){return new S({...this._def,unknownKeys:"strip"})}passthrough(){return new S({...this._def,unknownKeys:"passthrough"})}extend(t){return new S({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new S({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:x.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new S({...this._def,catchall:t})}pick(t){let n={};for(let a of E.objectKeys(t))if(t[a]&&this.shape[a])n[a]=this.shape[a];return new S({...this._def,shape:()=>n})}omit(t){let n={};for(let a of E.objectKeys(this.shape))if(!t[a])n[a]=this.shape[a];return new S({...this._def,shape:()=>n})}deepPartial(){return lt(this)}partial(t){let n={};for(let a of E.objectKeys(this.shape)){let o=this.shape[a];if(t&&!t[a])n[a]=o;else n[a]=o.optional()}return new S({...this._def,shape:()=>n})}required(t){let n={};for(let a of E.objectKeys(this.shape))if(t&&!t[a])n[a]=this.shape[a];else{let l=this.shape[a];while(l instanceof B)l=l._def.innerType;n[a]=l}return new S({...this._def,shape:()=>n})}keyof(){return Xo(E.objectKeys(this.shape))}};S.create=(t,n)=>{return new S({shape:()=>t,unknownKeys:"strip",catchall:U.create(),typeName:x.ZodObject,...k(n)})};S.strictCreate=(t,n)=>{return new S({shape:()=>t,unknownKeys:"strict",catchall:U.create(),typeName:x.ZodObject,...k(n)})};S.lazycreate=(t,n)=>{return new S({shape:t,unknownKeys:"strip",catchall:U.create(),typeName:x.ZodObject,...k(n)})};gt=class gt extends p{_parse(t){let{ctx:n}=this._processInputParams(t),a=this._def.options;function o(l){for(let r of l)if(r.result.status==="valid")return r.result;for(let r of l)if(r.result.status==="dirty")return n.common.issues.push(...r.ctx.common.issues),r.result;let b=l.map((r)=>new G(r.ctx.common.issues));return v(n,{code:g.invalid_union,unionErrors:b}),m}if(n.common.async)return Promise.all(a.map(async(l)=>{let b={...n,common:{...n.common,issues:[]},parent:null};return{result:await l._parseAsync({data:n.data,path:n.path,parent:b}),ctx:b}})).then(o);else{let l=void 0,b=[];for(let h of a){let f={...n,common:{...n.common,issues:[]},parent:null},_=h._parseSync({data:n.data,path:n.path,parent:f});if(_.status==="valid")return _;else if(_.status==="dirty"&&!l)l={result:_,ctx:f};if(f.common.issues.length)b.push(f.common.issues)}if(l)return n.common.issues.push(...l.ctx.common.issues),l.result;let r=b.map((h)=>new G(h));return v(n,{code:g.invalid_union,unionErrors:r}),m}}get options(){return this._def.options}};gt.create=(t,n)=>{return new gt({options:t,typeName:x.ZodUnion,...k(n)})};Nt=class Nt extends p{_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==$.object)return v(n,{code:g.invalid_type,expected:$.object,received:n.parsedType}),m;let a=this.discriminator,o=n.data[a],l=this.optionsMap.get(o);if(!l)return v(n,{code:g.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[a]}),m;if(n.common.async)return l._parseAsync({data:n.data,path:n.path,parent:n});else return l._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,a){let o=new Map;for(let l of n){let b=e(l.shape[t]);if(!b.length)throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let r of b){if(o.has(r))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`);o.set(r,l)}}return new Nt({typeName:x.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...k(a)})}};ct=class ct extends p{_parse(t){let{status:n,ctx:a}=this._processInputParams(t),o=(l,b)=>{if(jt(l)||jt(b))return m;let r=Jn(l.value,b.value);if(!r.valid)return v(a,{code:g.invalid_intersection_types}),m;if(et(l)||et(b))n.dirty();return{status:n.value,value:r.data}};if(a.common.async)return Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(([l,b])=>o(l,b));else return o(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}};ct.create=(t,n,a)=>{return new ct({left:t,right:n,typeName:x.ZodIntersection,...k(a)})};V=class V extends p{_parse(t){let{status:n,ctx:a}=this._processInputParams(t);if(a.parsedType!==$.array)return v(a,{code:g.invalid_type,expected:$.array,received:a.parsedType}),m;if(a.data.length<this._def.items.length)return v(a,{code:g.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),m;if(!this._def.rest&&a.data.length>this._def.items.length)v(a,{code:g.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty();let l=[...a.data].map((b,r)=>{let h=this._def.items[r]||this._def.rest;if(!h)return null;return h._parse(new D(a,b,a.path,r))}).filter((b)=>!!b);if(a.common.async)return Promise.all(l).then((b)=>{return Q.mergeArray(n,b)});else return Q.mergeArray(n,l)}get items(){return this._def.items}rest(t){return new V({...this._def,rest:t})}};V.create=(t,n)=>{if(!Array.isArray(t))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new V({items:t,typeName:x.ZodTuple,rest:null,...k(n)})};Lt=class Lt extends p{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:a}=this._processInputParams(t);if(a.parsedType!==$.object)return v(a,{code:g.invalid_type,expected:$.object,received:a.parsedType}),m;let o=[],l=this._def.keyType,b=this._def.valueType;for(let r in a.data)o.push({key:l._parse(new D(a,r,a.path,r)),value:b._parse(new D(a,a.data[r],a.path,r)),alwaysSet:r in a.data});if(a.common.async)return Q.mergeObjectAsync(n,o);else return Q.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,a){if(n instanceof p)return new Lt({keyType:t,valueType:n,typeName:x.ZodRecord,...k(a)});return new Lt({keyType:F.create(),valueType:t,typeName:x.ZodRecord,...k(n)})}};Xt=class Xt extends p{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:a}=this._processInputParams(t);if(a.parsedType!==$.map)return v(a,{code:g.invalid_type,expected:$.map,received:a.parsedType}),m;let o=this._def.keyType,l=this._def.valueType,b=[...a.data.entries()].map(([r,h],f)=>{return{key:o._parse(new D(a,r,a.path,[f,"key"])),value:l._parse(new D(a,h,a.path,[f,"value"]))}});if(a.common.async){let r=new Map;return Promise.resolve().then(async()=>{for(let h of b){let f=await h.key,_=await h.value;if(f.status==="aborted"||_.status==="aborted")return m;if(f.status==="dirty"||_.status==="dirty")n.dirty();r.set(f.value,_.value)}return{status:n.value,value:r}})}else{let r=new Map;for(let h of b){let{key:f,value:_}=h;if(f.status==="aborted"||_.status==="aborted")return m;if(f.status==="dirty"||_.status==="dirty")n.dirty();r.set(f.value,_.value)}return{status:n.value,value:r}}}};Xt.create=(t,n,a)=>{return new Xt({valueType:n,keyType:t,typeName:x.ZodMap,...k(a)})};tt=class tt extends p{_parse(t){let{status:n,ctx:a}=this._processInputParams(t);if(a.parsedType!==$.set)return v(a,{code:g.invalid_type,expected:$.set,received:a.parsedType}),m;let o=this._def;if(o.minSize!==null){if(a.data.size<o.minSize.value)v(a,{code:g.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()}if(o.maxSize!==null){if(a.data.size>o.maxSize.value)v(a,{code:g.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty()}let l=this._def.valueType;function b(h){let f=new Set;for(let _ of h){if(_.status==="aborted")return m;if(_.status==="dirty")n.dirty();f.add(_.value)}return{status:n.value,value:f}}let r=[...a.data.values()].map((h,f)=>l._parse(new D(a,h,a.path,f)));if(a.common.async)return Promise.all(r).then((h)=>b(h));else return b(r)}min(t,n){return new tt({...this._def,minSize:{value:t,message:i.toString(n)}})}max(t,n){return new tt({...this._def,maxSize:{value:t,message:i.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:x.ZodSet,...k(n)})};bt=class bt extends p{constructor(){super(...arguments);this.validate=this.implement}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==$.function)return v(n,{code:g.invalid_type,expected:$.function,received:n.parsedType}),m;function a(r,h){return Mt({data:r,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ot(),j].filter((f)=>!!f),issueData:{code:g.invalid_arguments,argumentsError:h}})}function o(r,h){return Mt({data:r,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ot(),j].filter((f)=>!!f),issueData:{code:g.invalid_return_type,returnTypeError:h}})}let l={errorMap:n.common.contextualErrorMap},b=n.data;if(this._def.returns instanceof nt){let r=this;return J(async function(...h){let f=new G([]),_=await r._def.args.parseAsync(h,l).catch((L)=>{throw f.addIssue(a(h,L)),f}),M=await Reflect.apply(b,this,_);return await r._def.returns._def.type.parseAsync(M,l).catch((L)=>{throw f.addIssue(o(M,L)),f})})}else{let r=this;return J(function(...h){let f=r._def.args.safeParse(h,l);if(!f.success)throw new G([a(h,f.error)]);let _=Reflect.apply(b,this,f.data),M=r._def.returns.safeParse(_,l);if(!M.success)throw new G([o(_,M.error)]);return M.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new bt({...this._def,args:V.create(t).rest(P.create())})}returns(t){return new bt({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,a){return new bt({args:t?t:V.create([]).rest(P.create()),returns:n||P.create(),typeName:x.ZodFunction,...k(a)})}};$t=class $t extends p{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})}};$t.create=(t,n)=>{return new $t({getter:t,typeName:x.ZodLazy,...k(n)})};vt=class vt extends p{_parse(t){if(t.data!==this._def.value){let n=this._getOrReturnCtx(t);return v(n,{received:n.data,code:g.invalid_literal,expected:this._def.value}),m}return{status:"valid",value:t.data}}get value(){return this._def.value}};vt.create=(t,n)=>{return new vt({value:t,typeName:x.ZodLiteral,...k(n)})};y=class y extends p{_parse(t){if(typeof t.data!=="string"){let n=this._getOrReturnCtx(t),a=this._def.values;return v(n,{expected:E.joinValues(a),received:n.parsedType,code:g.invalid_type}),m}if(!this._cache)this._cache=new Set(this._def.values);if(!this._cache.has(t.data)){let n=this._getOrReturnCtx(t),a=this._def.values;return v(n,{received:n.data,code:g.invalid_enum_value,options:a}),m}return J(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 y.create(t,{...this._def,...n})}exclude(t,n=this._def){return y.create(this.options.filter((a)=>!t.includes(a)),{...this._def,...n})}};y.create=Xo;wt=class wt extends p{_parse(t){let n=E.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(t);if(a.parsedType!==$.string&&a.parsedType!==$.number){let o=E.objectValues(n);return v(a,{expected:E.joinValues(o),received:a.parsedType,code:g.invalid_type}),m}if(!this._cache)this._cache=new Set(E.getValidEnumValues(this._def.values));if(!this._cache.has(t.data)){let o=E.objectValues(n);return v(a,{received:a.data,code:g.invalid_enum_value,options:o}),m}return J(t.data)}get enum(){return this._def.values}};wt.create=(t,n)=>{return new wt({values:t,typeName:x.ZodNativeEnum,...k(n)})};nt=class nt extends p{unwrap(){return this._def.type}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==$.promise&&n.common.async===!1)return v(n,{code:g.invalid_type,expected:$.promise,received:n.parsedType}),m;let a=n.parsedType===$.promise?n.data:Promise.resolve(n.data);return J(a.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:x.ZodPromise,...k(n)})};O=class O extends p{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===x.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:n,ctx:a}=this._processInputParams(t),o=this._def.effect||null,l={addIssue:(b)=>{if(v(a,b),b.fatal)n.abort();else n.dirty()},get path(){return a.path}};if(l.addIssue=l.addIssue.bind(l),o.type==="preprocess"){let b=o.transform(a.data,l);if(a.common.async)return Promise.resolve(b).then(async(r)=>{if(n.value==="aborted")return m;let h=await this._def.schema._parseAsync({data:r,path:a.path,parent:a});if(h.status==="aborted")return m;if(h.status==="dirty")return Z(h.value);if(n.value==="dirty")return Z(h.value);return h});else{if(n.value==="aborted")return m;let r=this._def.schema._parseSync({data:b,path:a.path,parent:a});if(r.status==="aborted")return m;if(r.status==="dirty")return Z(r.value);if(n.value==="dirty")return Z(r.value);return r}}if(o.type==="refinement"){let b=(r)=>{let h=o.refinement(r,l);if(a.common.async)return Promise.resolve(h);if(h instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return r};if(a.common.async===!1){let r=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(r.status==="aborted")return m;if(r.status==="dirty")n.dirty();return b(r.value),{status:n.value,value:r.value}}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then((r)=>{if(r.status==="aborted")return m;if(r.status==="dirty")n.dirty();return b(r.value).then(()=>{return{status:n.value,value:r.value}})})}if(o.type==="transform")if(a.common.async===!1){let b=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!I(b))return m;let r=o.transform(b.value,l);if(r instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:r}}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then((b)=>{if(!I(b))return m;return Promise.resolve(o.transform(b.value,l)).then((r)=>({status:n.value,value:r}))});E.assertNever(o)}};O.create=(t,n,a)=>{return new O({schema:t,typeName:x.ZodEffects,effect:n,...k(a)})};O.createWithPreprocess=(t,n,a)=>{return new O({schema:n,effect:{type:"preprocess",transform:t},typeName:x.ZodEffects,...k(a)})};B=class B extends p{_parse(t){if(this._getType(t)===$.undefined)return J(void 0);return this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};B.create=(t,n)=>{return new B({innerType:t,typeName:x.ZodOptional,...k(n)})};N=class N extends p{_parse(t){if(this._getType(t)===$.null)return J(null);return this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};N.create=(t,n)=>{return new N({innerType:t,typeName:x.ZodNullable,...k(n)})};dt=class dt extends p{_parse(t){let{ctx:n}=this._processInputParams(t),a=n.data;if(n.parsedType===$.undefined)a=this._def.defaultValue();return this._def.innerType._parse({data:a,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};dt.create=(t,n)=>{return new dt({innerType:t,typeName:x.ZodDefault,defaultValue:typeof n.default==="function"?n.default:()=>n.default,...k(n)})};_t=class _t extends p{_parse(t){let{ctx:n}=this._processInputParams(t),a={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});if(at(o))return o.then((l)=>{return{status:"valid",value:l.status==="valid"?l.value:this._def.catchValue({get error(){return new G(a.common.issues)},input:a.data})}});else return{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new G(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}};_t.create=(t,n)=>{return new _t({innerType:t,typeName:x.ZodCatch,catchValue:typeof n.catch==="function"?n.catch:()=>n.catch,...k(n)})};Qt=class Qt extends p{_parse(t){if(this._getType(t)!==$.nan){let a=this._getOrReturnCtx(t);return v(a,{code:g.invalid_type,expected:$.nan,received:a.parsedType}),m}return{status:"valid",value:t.data}}};Qt.create=(t)=>{return new Qt({typeName:x.ZodNaN,...k(t)})};Yl=Symbol("zod_brand");Kt=class Kt extends p{_parse(t){let{ctx:n}=this._processInputParams(t),a=n.data;return this._def.type._parse({data:a,path:n.path,parent:n})}unwrap(){return this._def.type}};Jt=class Jt extends p{_parse(t){let{status:n,ctx:a}=this._processInputParams(t);if(a.common.async)return(async()=>{let l=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});if(l.status==="aborted")return m;if(l.status==="dirty")return n.dirty(),Z(l.value);else return this._def.out._parseAsync({data:l.value,path:a.path,parent:a})})();else{let o=this._def.in._parseSync({data:a.data,path:a.path,parent:a});if(o.status==="aborted")return m;if(o.status==="dirty")return n.dirty(),{status:"dirty",value:o.value};else return this._def.out._parseSync({data:o.value,path:a.path,parent:a})}}static create(t,n){return new Jt({in:t,out:n,typeName:x.ZodPipeline})}};it=class it extends p{_parse(t){let n=this._def.innerType._parse(t),a=(o)=>{if(I(o))o.value=Object.freeze(o.value);return o};return at(n)?n.then((o)=>a(o)):a(n)}unwrap(){return this._def.innerType}};it.create=(t,n)=>{return new it({innerType:t,typeName:x.ZodReadonly,...k(n)})};Sl={object:S.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"})(x||(x={}));Jo=F.create,Go=C.create,Xl=Qt.create,Ql=T.create,Ro=rt.create,Jl=s.create,Gl=Yt.create,Rl=ht.create,Fl=ft.create,ul=z.create,Bl=P.create,Dl=U.create,Ol=St.create,Wl=u.create,Ul=S.create,Vl=S.strictCreate,jl=gt.create,el=Nt.create,Nl=ct.create,Kl=V.create,Il=Lt.create,Pl=Xt.create,Cl=tt.create,Tl=bt.create,yl=$t.create,Zl=vt.create,sl=y.create,zl=wt.create,tb=nt.create,nb=O.create,ob=B.create,ab=N.create,lb=O.createWithPreprocess,bb=Jt.create,gb={string:(t)=>F.create({...t,coerce:!0}),number:(t)=>C.create({...t,coerce:!0}),boolean:(t)=>rt.create({...t,coerce:!0}),bigint:(t)=>T.create({...t,coerce:!0}),date:(t)=>s.create({...t,coerce:!0})},cb=m});var w={};H(w,{void:()=>Ol,util:()=>E,unknown:()=>Bl,union:()=>jl,undefined:()=>Rl,tuple:()=>Kl,transformer:()=>nb,symbol:()=>Gl,string:()=>Jo,strictObject:()=>Vl,setErrorMap:()=>al,set:()=>Cl,record:()=>Il,quotelessJson:()=>nl,promise:()=>tb,preprocess:()=>lb,pipeline:()=>bb,ostring:()=>rb,optional:()=>ob,onumber:()=>hb,oboolean:()=>fb,objectUtil:()=>Sn,object:()=>Ul,number:()=>Go,nullable:()=>ab,null:()=>Fl,never:()=>Dl,nativeEnum:()=>zl,nan:()=>Xl,map:()=>Pl,makeIssue:()=>Mt,literal:()=>Zl,lazy:()=>yl,late:()=>Sl,isValid:()=>I,isDirty:()=>et,isAsync:()=>at,isAborted:()=>jt,intersection:()=>Nl,instanceof:()=>Ll,getParsedType:()=>W,getErrorMap:()=>ot,function:()=>Tl,enum:()=>sl,effect:()=>nb,discriminatedUnion:()=>el,defaultErrorMap:()=>j,datetimeRegex:()=>Lo,date:()=>Jl,custom:()=>Qo,coerce:()=>gb,boolean:()=>Ro,bigint:()=>Ql,array:()=>Wl,any:()=>ul,addIssueToContext:()=>v,ZodVoid:()=>St,ZodUnknown:()=>P,ZodUnion:()=>gt,ZodUndefined:()=>ht,ZodType:()=>p,ZodTuple:()=>V,ZodTransformer:()=>O,ZodSymbol:()=>Yt,ZodString:()=>F,ZodSet:()=>tt,ZodSchema:()=>p,ZodRecord:()=>Lt,ZodReadonly:()=>it,ZodPromise:()=>nt,ZodPipeline:()=>Jt,ZodParsedType:()=>$,ZodOptional:()=>B,ZodObject:()=>S,ZodNumber:()=>C,ZodNullable:()=>N,ZodNull:()=>ft,ZodNever:()=>U,ZodNativeEnum:()=>wt,ZodNaN:()=>Qt,ZodMap:()=>Xt,ZodLiteral:()=>vt,ZodLazy:()=>$t,ZodIssueCode:()=>g,ZodIntersection:()=>ct,ZodFunction:()=>bt,ZodFirstPartyTypeKind:()=>x,ZodError:()=>G,ZodEnum:()=>y,ZodEffects:()=>O,ZodDiscriminatedUnion:()=>Nt,ZodDefault:()=>dt,ZodDate:()=>s,ZodCatch:()=>_t,ZodBranded:()=>Kt,ZodBoolean:()=>rt,ZodBigInt:()=>T,ZodArray:()=>u,ZodAny:()=>z,Schema:()=>p,ParseStatus:()=>Q,OK:()=>J,NEVER:()=>cb,INVALID:()=>m,EMPTY_PATH:()=>ll,DIRTY:()=>Z,BRAND:()=>Yl});var Gn=A(()=>{Vt();Xn();po();Et();Fo();Ut()});var uo=A(()=>{Gn();Gn()});function Rn(t){if(t===null||typeof t!=="object")return t;if(Array.isArray(t))return t.map(Rn);let n={};for(let a of Object.keys(t))n[a]=Rn(t[a]);return n}var $b,Kr;var Bo=A(()=>{$b={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}},Kr=Rn($b)});class Gt{static validate(t,n){try{return{success:!0,data:t.parse(n)}}catch(a){if(a instanceof w.ZodError){let o={};return a.errors.forEach((l)=>{let b=l.path.join(".");o[b]=l.message}),{success:!1,errors:o}}return{success:!1,errors:{general:"Validation failed"}}}}static validateField(t,n){try{return t.parse(n),{success:!0}}catch(a){if(a instanceof w.ZodError)return{success:!1,error:a.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 Do,K;var Fn=A(()=>{uo();Bo();Do={login:w.object({email:w.string().min(1,"Email is required").email("Please enter a valid email address"),password:w.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:w.object({name:w.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:w.string().min(1,"Email is required").email("Please enter a valid email address"),password:w.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:w.string()}).refine((t)=>t.password===t.confirmPassword,{message:"Passwords don't match",path:["confirmPassword"]}),auth:{register:w.object({action:w.literal("register"),email:w.string().min(1,"Email is required").email("Please enter a valid email address"),username:w.string().min(3,"Username must be at least 3 characters").max(30,"Username must be less than 30 characters"),password:w.string().min(8,"Password must be at least 8 characters"),full_name:w.string().min(2,"Full name is required").max(100,"Full name is too long")}),login:w.object({action:w.literal("login"),email:w.string().min(1,"Email is required").email("Please enter a valid email address"),password:w.string().min(8,"Password must be at least 8 characters")}),logout:w.object({action:w.literal("logout")}),action:w.discriminatedUnion("action",[w.object({action:w.literal("register")}).merge(w.object({email:w.string().min(1,"Email is required").email("Please enter a valid email address"),username:w.string().min(3,"Username must be at least 3 characters").max(30,"Username must be less than 30 characters"),password:w.string().min(8,"Password must be at least 8 characters"),full_name:w.string().min(2,"Full name is required").max(100,"Full name is too long")})),w.object({action:w.literal("login")}).merge(w.object({email:w.string().min(1,"Email is required").email("Please enter a valid email address"),password:w.string().min(8,"Password must be at least 8 characters")})),w.object({action:w.literal("logout")})])},contact:w.object({name:w.string().min(2,"Name must be at least 2 characters").max(100,"Name is too long"),email:w.string().email("Please enter a valid email address"),message:w.string().min(10,"Message must be at least 10 characters").max(1000,"Message is too long")}),email:w.string().min(1,"Email is required").email("Please enter a valid email address"),password:w.string().min(8,"Password must be at least 8 characters").regex(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)/,"Password must contain uppercase, lowercase, and number"),phone:w.string().regex(/^[\+]?[1-9][\d]{0,15}$/,"Please enter a valid phone number"),url:w.string().min(1,"URL is required").url("Please enter a valid URL"),required:w.string().min(1,"This field is required"),positiveNumber:w.number().positive("Must be a positive number"),integer:w.number().int("Must be a whole number"),futureDate:w.date().min(new Date,"Date must be in the future"),imageFile:w.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:w.object({full_name:w.string().min(2,"Full name must be at least 2 characters").max(100,"Full name is too long").optional(),bio:w.string().max(500,"Bio must be less than 500 characters").nullable().optional(),avatar_url:w.string().url("Please enter a valid URL").nullable().optional(),theme:w.enum(["africanity","dark","light","system"]).optional(),language:w.string().min(2).max(10).optional()}),project:w.object({name:w.string().min(1,"Project name is required").max(100,"Project name is too long"),description:w.string().max(1000,"Description is too long").nullable().optional(),repository_url:w.string().url("Please enter a valid repository URL").nullable().optional(),demo_url:w.string().url("Please enter a valid demo URL").nullable().optional(),tags:w.array(w.string()).optional(),is_public:w.boolean().optional()})};K={required:(t="This field is required")=>w.string().min(1,t),email:(t="Please enter a valid email address")=>w.string().email(t),minLength:(t,n)=>w.string().min(t,n||`Must be at least ${t} characters`),maxLength:(t,n)=>w.string().max(t,n||`Must be less than ${t} characters`),pattern:(t,n)=>w.string().regex(t,n),numeric:(t="Must be a number")=>w.string().regex(/^\d+$/,t),phone:(t="Please enter a valid phone number")=>w.string().regex(/^[\+]?[1-9][\d]{0,15}$/,t),url:(t="Please enter a valid URL")=>w.string().min(1,"URL is required").url(t)}});var Oo={};H(Oo,{default:()=>vb,AfriInput:()=>It});var It,vb;var Wo=A(()=>{q();Fn();It=class It extends c{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"),a=t.value;if(this.hasAttribute("required")&&!a.trim()){this.setAttribute("error","This field is required");return}if(n&&a.trim()){let l=this._getValidationSchema(n);if(l){let b=Gt.validateField(l,a);if(!b.success)this.setAttribute("error",b.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[a,o]=t.split(":"),l=parseInt(o);switch(a){case"minLength":return K.minLength(l);case"maxLength":return K.maxLength(l);case"pattern":return K.pattern(new RegExp(o),"Invalid format")}}return n[t]||null}attributeChangedCallback(){this.render()}render(){let t=this.getAttribute("type")||"text",n=this.getAttribute("name")||"",a=this.getAttribute("label")||"",o=this.getAttribute("placeholder")||"",l=this.getAttribute("error")||"",b=this.getAttribute("helper")||"",r=this.getAttribute("theme")||"tanzania",h=this.getAttribute("icon")||"",f=this.hasAttribute("required"),_=this.getAttribute("aria-label"),M=this.getAttribute("aria-describedby"),X={tanzania:{focus:"#1EB53A",error:"#DC3545"},maasai:{focus:"#FF0000",error:"#8B0000"},ndebele:{focus:"#4169E1",error:"#DC143C"}},L=X[r]||X.tanzania,R=[];if(l)R.push(`error-${this._uniqueId}`);else if(b)R.push(`helper-${this._uniqueId}`);if(M)R.push(...M.split(" "));let An=R.length>0?`aria-describedby="${R.join(" ")}"`:"";this.shadowRoot.innerHTML=`
|
|
379
629
|
<style>
|
|
380
630
|
:host {
|
|
381
631
|
display: block;
|
|
@@ -395,7 +645,7 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
395
645
|
}
|
|
396
646
|
|
|
397
647
|
.required-star {
|
|
398
|
-
color: ${
|
|
648
|
+
color: ${L.error};
|
|
399
649
|
margin-left: 2px;
|
|
400
650
|
}
|
|
401
651
|
|
|
@@ -408,7 +658,7 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
408
658
|
input {
|
|
409
659
|
width: 100%;
|
|
410
660
|
padding: 10px 13px;
|
|
411
|
-
${
|
|
661
|
+
${h?"padding-left: 40px;":""}
|
|
412
662
|
font-size: 15px;
|
|
413
663
|
border: 2px solid #ddd;
|
|
414
664
|
border-radius: 5px;
|
|
@@ -419,12 +669,12 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
419
669
|
|
|
420
670
|
input:focus {
|
|
421
671
|
outline: none;
|
|
422
|
-
border-color: ${l?
|
|
423
|
-
box-shadow: 0 0 0 3px ${l?
|
|
672
|
+
border-color: ${l?L.error:L.focus};
|
|
673
|
+
box-shadow: 0 0 0 3px ${l?L.error+"20":L.focus+"20"};
|
|
424
674
|
}
|
|
425
675
|
|
|
426
676
|
input.has-error {
|
|
427
|
-
border-color: ${
|
|
677
|
+
border-color: ${L.error};
|
|
428
678
|
}
|
|
429
679
|
|
|
430
680
|
.icon {
|
|
@@ -444,30 +694,30 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
444
694
|
.error-text {
|
|
445
695
|
font-size: 12px;
|
|
446
696
|
margin-top: 4px;
|
|
447
|
-
color: ${
|
|
697
|
+
color: ${L.error};
|
|
448
698
|
}
|
|
449
699
|
</style>
|
|
450
700
|
|
|
451
701
|
<div class="input-wrapper">
|
|
452
|
-
${
|
|
702
|
+
${a?`<label for="input-${this._uniqueId}">${a}${f?'<span class="required-star">*</span>':""}</label>`:""}
|
|
453
703
|
<div class="input-container">
|
|
454
|
-
${
|
|
704
|
+
${h?`<span class="icon">${h}</span>`:""}
|
|
455
705
|
<input
|
|
456
706
|
id="input-${this._uniqueId}"
|
|
457
707
|
name="${n}"
|
|
458
708
|
type="${t}"
|
|
459
709
|
placeholder="${o}"
|
|
460
710
|
class="${l?"has-error":""}"
|
|
461
|
-
${
|
|
462
|
-
${
|
|
711
|
+
${f?"required":""}
|
|
712
|
+
${_?`aria-label="${_}"`:""}
|
|
463
713
|
${l?'aria-invalid="true"':""}
|
|
464
|
-
${
|
|
714
|
+
${An}
|
|
465
715
|
/>
|
|
466
716
|
</div>
|
|
467
717
|
${l?`<div id="error-${this._uniqueId}" class="error-text" role="alert">${l}</div>`:""}
|
|
468
|
-
${
|
|
718
|
+
${b&&!l?`<div id="helper-${this._uniqueId}" class="helper-text">${b}</div>`:""}
|
|
469
719
|
</div>
|
|
470
|
-
`}};
|
|
720
|
+
`}};d("af-input",It);vb=It});var Uo={};H(Uo,{default:()=>wb,AfriAlert:()=>Pt});var Pt,wb;var Vo=A(()=>{q();Pt=class Pt extends c{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")||"",a=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:"ℹ"}},l=o[t]||o.info;this.shadowRoot.innerHTML=`
|
|
471
721
|
<style>
|
|
472
722
|
:host {
|
|
473
723
|
display: block;
|
|
@@ -545,36 +795,36 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
545
795
|
${n?`<div class="title">${n}</div>`:""}
|
|
546
796
|
<slot></slot>
|
|
547
797
|
</div>
|
|
548
|
-
${
|
|
798
|
+
${a?'<button class="close-btn" aria-label="Dismiss">×</button>':""}
|
|
549
799
|
</div>
|
|
550
|
-
`}};
|
|
551
|
-
align-items: ${
|
|
552
|
-
justify-items: ${
|
|
553
|
-
gap: ${
|
|
554
|
-
`;switch(t){case"sidebar":return
|
|
800
|
+
`}};d("af-alert",Pt);wb=Pt});var jo={};H(jo,{AfriGrid:()=>un});function db(t,n){let{sidebarSide:a="left",sidebarWidth:o="280px",minWidth:l="280px",gap:b="24px",columns:r,rows:h,align:f="stretch",justify:_="stretch",dense:M=!1}=n,X=M?"dense":"",L=`
|
|
801
|
+
align-items: ${f};
|
|
802
|
+
justify-items: ${_};
|
|
803
|
+
gap: ${b};
|
|
804
|
+
`;switch(t){case"sidebar":return a==="right"?`display: grid; grid-template-columns: 1fr ${o}; ${L}`:`display: grid; grid-template-columns: ${o} 1fr; ${L}`;case"holy-grail":return`
|
|
555
805
|
display: grid;
|
|
556
806
|
grid-template-columns: ${o} 1fr ${o};
|
|
557
807
|
grid-template-rows: auto 1fr auto;
|
|
558
|
-
${
|
|
808
|
+
${L}
|
|
559
809
|
`;case"bento":return`
|
|
560
810
|
display: grid;
|
|
561
811
|
grid-template-columns: repeat(12, 1fr);
|
|
562
812
|
grid-auto-rows: minmax(120px, auto);
|
|
563
|
-
grid-auto-flow: row ${
|
|
564
|
-
${
|
|
813
|
+
grid-auto-flow: row ${X};
|
|
814
|
+
${L}
|
|
565
815
|
`;case"masonry":return`
|
|
566
816
|
display: grid;
|
|
567
817
|
grid-template-columns: repeat(auto-fill, minmax(${l}, 1fr));
|
|
568
818
|
grid-template-rows: masonry;
|
|
569
|
-
grid-auto-flow: row ${
|
|
570
|
-
${
|
|
571
|
-
`;case"auto":default:{let
|
|
819
|
+
grid-auto-flow: row ${X};
|
|
820
|
+
${L}
|
|
821
|
+
`;case"auto":default:{let R=r?`repeat(${r}, 1fr)`:`repeat(auto-fit, minmax(${l}, 1fr))`,An=h?`repeat(${h}, 1fr)`:"auto";return`
|
|
572
822
|
display: grid;
|
|
573
|
-
grid-template-columns: ${
|
|
574
|
-
${
|
|
575
|
-
grid-auto-flow: row ${
|
|
576
|
-
${
|
|
577
|
-
`}}}var
|
|
823
|
+
grid-template-columns: ${R};
|
|
824
|
+
${h?`grid-template-rows: ${An};`:""}
|
|
825
|
+
grid-auto-flow: row ${X};
|
|
826
|
+
${L}
|
|
827
|
+
`}}}var un;var eo=A(()=>{q();un=class un extends c{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`
|
|
578
828
|
@media (max-width: 768px) {
|
|
579
829
|
.grid {
|
|
580
830
|
grid-template-columns: repeat(auto-fit, minmax(min(${t.minWidth}, 100%), 1fr));
|
|
@@ -591,7 +841,7 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
591
841
|
grid-template-columns: 1fr;
|
|
592
842
|
}
|
|
593
843
|
}
|
|
594
|
-
`}render(){let t=this._getAttrs(),n=
|
|
844
|
+
`}render(){let t=this._getAttrs(),n=db(t.layout,t),a=this._buildResponsiveBreakpoints(t)+this._buildSidebarResponsive(t);this.shadowRoot.innerHTML=Y`
|
|
595
845
|
<style>
|
|
596
846
|
:host {
|
|
597
847
|
display: block;
|
|
@@ -610,7 +860,7 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
610
860
|
min-width: 0; /* Prevent overflow in grid context */
|
|
611
861
|
}
|
|
612
862
|
|
|
613
|
-
${
|
|
863
|
+
${a}
|
|
614
864
|
</style>
|
|
615
865
|
|
|
616
866
|
<div
|
|
@@ -621,7 +871,7 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
621
871
|
>
|
|
622
872
|
<slot></slot>
|
|
623
873
|
</div>
|
|
624
|
-
`}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
|
|
874
|
+
`}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 a of n){let o=a.contentRect.width;if(Math.abs(o-t)>10)t=o,this.emit("af-grid-resize",{width:o,height:a.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",un)});var No={};H(No,{AfriSection:()=>Bn});var Bn;var Ko=A(()=>{q();Bn=class Bn extends c{render(){let t=this.getAttribute("variant")||"default",n=this.getAttribute("title");this.shadowRoot.innerHTML=Y`
|
|
625
875
|
<style>
|
|
626
876
|
:host { display: block; width: 100%; }
|
|
627
877
|
.section {
|
|
@@ -648,20 +898,20 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
648
898
|
}
|
|
649
899
|
</style>
|
|
650
900
|
<section class="section">
|
|
651
|
-
${n?
|
|
901
|
+
${n?Y`
|
|
652
902
|
<div class="section-header">
|
|
653
903
|
<h2>${n}</h2>
|
|
654
904
|
</div>
|
|
655
905
|
`:""}
|
|
656
906
|
<slot></slot>
|
|
657
907
|
</section>
|
|
658
|
-
`}connectedCallback(){this.render()}};
|
|
908
|
+
`}connectedCallback(){this.render()}};d("af-section",Bn)});var Io={};H(Io,{default:()=>_b,AfriIcon:()=>Ct});var Ct,_b;var Po=A(()=>{q();Ct=class Ct extends c{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=`
|
|
659
909
|
<style>
|
|
660
910
|
:host { display: inline-flex; vertical-align: middle; }
|
|
661
911
|
svg { width: ${n}px; height: ${n}px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
|
|
662
912
|
</style>
|
|
663
913
|
<svg viewBox="0 0 24 24">${o}</svg>
|
|
664
|
-
`}};
|
|
914
|
+
`}};d("af-icon",Ct);_b=Ct});var Co={};H(Co,{default:()=>ib,AfriAccordion:()=>Tt});var Tt,ib;var To=A(()=>{q();Tt=class Tt extends c{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,a)=>{n.addEventListener("click",()=>{this._toggleItem(a)})})}_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"]'),a=n?Array.from(n.children):[],o={tanzania:{accent:"#1EB53A"},maasai:{accent:"#FF0000"},ndebele:{accent:"#4169E1"}},l=o[t]||o.tanzania;this.shadowRoot.innerHTML=`
|
|
665
915
|
<style>
|
|
666
916
|
:host {
|
|
667
917
|
display: block;
|
|
@@ -739,32 +989,32 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
739
989
|
</style>
|
|
740
990
|
|
|
741
991
|
<div class="accordion">
|
|
742
|
-
${
|
|
992
|
+
${a.map((b,r)=>{let h=this._openItems.has(r),f=`accordion-header-${this._uniqueId}-${r}`,_=`accordion-panel-${this._uniqueId}-${r}`;return`
|
|
743
993
|
<div class="accordion-item">
|
|
744
994
|
<button
|
|
745
|
-
class="accordion-header ${
|
|
746
|
-
aria-expanded="${
|
|
747
|
-
aria-controls="${
|
|
748
|
-
id="${
|
|
995
|
+
class="accordion-header ${h?"active":""}"
|
|
996
|
+
aria-expanded="${h}"
|
|
997
|
+
aria-controls="${_}"
|
|
998
|
+
id="${f}"
|
|
749
999
|
>
|
|
750
|
-
<span>${
|
|
1000
|
+
<span>${b.getAttribute("title")||`Item ${r+1}`}</span>
|
|
751
1001
|
<span class="accordion-icon">▼</span>
|
|
752
1002
|
</button>
|
|
753
1003
|
<div
|
|
754
|
-
class="accordion-content ${
|
|
755
|
-
id="${
|
|
1004
|
+
class="accordion-content ${h?"open":""}"
|
|
1005
|
+
id="${_}"
|
|
756
1006
|
role="region"
|
|
757
|
-
aria-labelledby="${
|
|
1007
|
+
aria-labelledby="${f}"
|
|
758
1008
|
>
|
|
759
1009
|
<div class="accordion-body">
|
|
760
|
-
${
|
|
1010
|
+
${b.innerHTML}
|
|
761
1011
|
</div>
|
|
762
1012
|
</div>
|
|
763
1013
|
</div>
|
|
764
1014
|
`}).join("")}
|
|
765
1015
|
</div>
|
|
766
1016
|
<slot name="items"></slot>
|
|
767
|
-
`}};
|
|
1017
|
+
`}};d("af-accordion",Tt);ib=Tt});var yo={};H(yo,{default:()=>Ab,AfriHero:()=>yt});var yt,Ab;var Zo=A(()=>{q();Ot();pt();yt=class yt extends c{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")||"",a=this.getAttribute("pattern")||"",o=this.getAttribute("variant")||"default";this.shadowRoot.innerHTML=`
|
|
768
1018
|
<style>
|
|
769
1019
|
:host {
|
|
770
1020
|
display: flex;
|
|
@@ -832,11 +1082,11 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
832
1082
|
z-index: 2;
|
|
833
1083
|
}
|
|
834
1084
|
|
|
835
|
-
${
|
|
1085
|
+
${a?`
|
|
836
1086
|
.pattern-bg {
|
|
837
1087
|
position: absolute;
|
|
838
1088
|
inset: 0;
|
|
839
|
-
background-image: url('${
|
|
1089
|
+
background-image: url('${a}');
|
|
840
1090
|
background-size: cover;
|
|
841
1091
|
background-position: center;
|
|
842
1092
|
opacity: 0.15;
|
|
@@ -854,7 +1104,7 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
854
1104
|
|
|
855
1105
|
<div class="aura"></div>
|
|
856
1106
|
<div class="mesh"></div>
|
|
857
|
-
${
|
|
1107
|
+
${a?'<div class="pattern-bg"></div>':""}
|
|
858
1108
|
|
|
859
1109
|
<div class="content">
|
|
860
1110
|
<h1>${t}</h1>
|
|
@@ -864,7 +1114,7 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
864
1114
|
</div>
|
|
865
1115
|
<slot></slot>
|
|
866
1116
|
</div>
|
|
867
|
-
`}};
|
|
1117
|
+
`}};d("af-hero",yt);Ab=yt});var so={};H(so,{default:()=>mb,AfriTable:()=>Zt});var Zt,mb;var zo=A(()=>{q();Zt=class Zt extends c{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 a=t[this._sortColumn],o=n[this._sortColumn],l=this._sortDirection==="asc"?1:-1;if(typeof a==="number")return(a-o)*l;return String(a).localeCompare(String(o))*l})}render(){let t=this.getAttribute("theme")||"tanzania",n=this.hasAttribute("striped"),a=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"}},l=o[t]||o.tanzania,b=this._getSortedData();this.shadowRoot.innerHTML=`
|
|
868
1118
|
<style>
|
|
869
1119
|
:host {
|
|
870
1120
|
display: block;
|
|
@@ -914,7 +1164,7 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
914
1164
|
}
|
|
915
1165
|
`:""}
|
|
916
1166
|
|
|
917
|
-
${
|
|
1167
|
+
${a?`
|
|
918
1168
|
tbody tr:hover {
|
|
919
1169
|
background: ${l.accent}20;
|
|
920
1170
|
}
|
|
@@ -931,20 +1181,20 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
931
1181
|
<table>
|
|
932
1182
|
<thead>
|
|
933
1183
|
<tr>
|
|
934
|
-
${this._columns.map((
|
|
935
|
-
<th data-column="${
|
|
936
|
-
${
|
|
1184
|
+
${this._columns.map((r)=>`
|
|
1185
|
+
<th data-column="${r.key}">
|
|
1186
|
+
${r.label}
|
|
937
1187
|
<span class="sort-icon">
|
|
938
|
-
${this._sortColumn===
|
|
1188
|
+
${this._sortColumn===r.key?this._sortDirection==="asc"?"↑":"↓":"↕"}
|
|
939
1189
|
</span>
|
|
940
1190
|
</th>
|
|
941
1191
|
`).join("")}
|
|
942
1192
|
</tr>
|
|
943
1193
|
</thead>
|
|
944
1194
|
<tbody>
|
|
945
|
-
${
|
|
1195
|
+
${b.length?b.map((r)=>`
|
|
946
1196
|
<tr>
|
|
947
|
-
${this._columns.map((
|
|
1197
|
+
${this._columns.map((h)=>`<td>${r[h.key]??""}</td>`).join("")}
|
|
948
1198
|
</tr>
|
|
949
1199
|
`).join(""):`
|
|
950
1200
|
<tr>
|
|
@@ -954,7 +1204,7 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
954
1204
|
</tbody>
|
|
955
1205
|
</table>
|
|
956
1206
|
</div>
|
|
957
|
-
`,this.shadowRoot.querySelectorAll("th").forEach((
|
|
1207
|
+
`,this.shadowRoot.querySelectorAll("th").forEach((r)=>{r.addEventListener("click",()=>{this._handleSort(r.dataset.column)})})}};d("af-table",Zt);mb=Zt});var ta={};H(ta,{default:()=>xb,AfriModal:()=>st});var st,xb;var na=A(()=>{q();st=class st extends c{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"])',a=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[...a,...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 a=n[0],o=n[n.length-1];if(t.shiftKey){if(document.activeElement===a)t.preventDefault(),o.focus()}else if(document.activeElement===o)t.preventDefault(),a.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,a){if(this.render(),t==="open")this._setupListeners()}render(){let t=this.hasAttribute("open"),n=this.getAttribute("theme")||"tanzania",a=this.getAttribute("size")||"md",o={tanzania:{accent:"#1EB53A"},maasai:{accent:"#FF0000"},ndebele:{accent:"#4169E1"}},l=o[n]||o.tanzania,b={sm:"400px",md:"560px",lg:"720px",full:"95vw"},r=this.getAttribute("aria-label"),h=this.getAttribute("aria-labelledby")||"modal-title";this.shadowRoot.innerHTML=`
|
|
958
1208
|
<style>
|
|
959
1209
|
:host {
|
|
960
1210
|
font-family: 'Inter', system-ui, sans-serif;
|
|
@@ -981,7 +1231,7 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
981
1231
|
background: white;
|
|
982
1232
|
border-radius: 8px;
|
|
983
1233
|
width: 100%;
|
|
984
|
-
max-width: ${a
|
|
1234
|
+
max-width: ${b[a]||b.md};
|
|
985
1235
|
max-height: 90vh;
|
|
986
1236
|
overflow: hidden;
|
|
987
1237
|
display: flex;
|
|
@@ -1045,7 +1295,7 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
1045
1295
|
</style>
|
|
1046
1296
|
|
|
1047
1297
|
<div class="backdrop">
|
|
1048
|
-
<div class="modal" role="dialog" aria-modal="true" ${
|
|
1298
|
+
<div class="modal" role="dialog" aria-modal="true" ${r?`aria-label="${r}"`:`aria-labelledby="${h}"`}>
|
|
1049
1299
|
<div class="modal-header">
|
|
1050
1300
|
<slot name="header" id="modal-title"></slot>
|
|
1051
1301
|
<button class="close-btn" aria-label="Close modal">×</button>
|
|
@@ -1058,7 +1308,7 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
1058
1308
|
</div>
|
|
1059
1309
|
</div>
|
|
1060
1310
|
</div>
|
|
1061
|
-
`}};
|
|
1311
|
+
`}};d("af-modal",st);xb=st});var oa={};H(oa,{default:()=>kb,AfriTabs:()=>zt});var zt,kb;var aa=A(()=>{q();zt=class zt extends c{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"]'),a=n?Array.from(n.children):[];if(a.length===0)return;switch(t.key){case"ArrowLeft":t.preventDefault(),this._activeTab=this._activeTab>0?this._activeTab-1:a.length-1,this.render(),this._setupTabs(),this._focusActiveTab();break;case"ArrowRight":t.preventDefault(),this._activeTab=this._activeTab<a.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=a.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,a)=>{n.addEventListener("click",()=>{this._activeTab=a,this.render(),this._setupTabs(),this.emit("af-tab-change",{index:a,tab:n.textContent})})})}attributeChangedCallback(){this.render(),this._setupTabs()}render(){let t=this.getAttribute("theme")||"tanzania",n=this.querySelector('[slot="tabs"]'),a=n?Array.from(n.children):[],o={tanzania:{active:"#1EB53A",text:"#FFFFFF"},maasai:{active:"#FF0000",text:"#FFFFFF"},ndebele:{active:"#4169E1",text:"#FFFFFF"}},l=o[t]||o.tanzania;this.shadowRoot.innerHTML=`
|
|
1062
1312
|
<style>
|
|
1063
1313
|
:host {
|
|
1064
1314
|
display: block;
|
|
@@ -1130,30 +1380,30 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
1130
1380
|
|
|
1131
1381
|
<div class="tabs-container">
|
|
1132
1382
|
<div class="tab-list" role="tablist">
|
|
1133
|
-
${
|
|
1134
|
-
<button class="tab-button ${
|
|
1383
|
+
${a.map((b,r)=>`
|
|
1384
|
+
<button class="tab-button ${r===this._activeTab?"active":""}"
|
|
1135
1385
|
role="tab"
|
|
1136
|
-
aria-selected="${
|
|
1137
|
-
aria-controls="panel-${
|
|
1138
|
-
tabindex="${
|
|
1139
|
-
id="tab-${
|
|
1140
|
-
${
|
|
1386
|
+
aria-selected="${r===this._activeTab}"
|
|
1387
|
+
aria-controls="panel-${r}"
|
|
1388
|
+
tabindex="${r===this._activeTab?"0":"-1"}"
|
|
1389
|
+
id="tab-${r}">
|
|
1390
|
+
${b.getAttribute("label")||`Tab ${r+1}`}
|
|
1141
1391
|
</button>
|
|
1142
1392
|
`).join("")}
|
|
1143
1393
|
</div>
|
|
1144
1394
|
<div class="tab-panels">
|
|
1145
|
-
${
|
|
1146
|
-
<div class="tab-panel ${
|
|
1395
|
+
${a.map((b,r)=>`
|
|
1396
|
+
<div class="tab-panel ${r===this._activeTab?"active":""}"
|
|
1147
1397
|
role="tabpanel"
|
|
1148
|
-
id="panel-${
|
|
1149
|
-
aria-labelledby="tab-${
|
|
1150
|
-
${
|
|
1398
|
+
id="panel-${r}"
|
|
1399
|
+
aria-labelledby="tab-${r}">
|
|
1400
|
+
${b.innerHTML}
|
|
1151
1401
|
</div>
|
|
1152
1402
|
`).join("")}
|
|
1153
1403
|
</div>
|
|
1154
1404
|
</div>
|
|
1155
1405
|
<slot name="tabs"></slot>
|
|
1156
|
-
`}};
|
|
1406
|
+
`}};d("af-tabs",zt);kb=zt});var la={};H(la,{default:()=>qb,AfriSidebar:()=>tn});var tn,qb;var ba=A(()=>{q();Ot();pt();tn=class tn extends c{static get observedAttributes(){return["position"]}constructor(){super();this._unsubscribe=null}connectedCallback(){super.connectedCallback(),this._unsubscribe=Dt(()=>{this.updateUI()}),this.render()}disconnectedCallback(){if(this._unsubscribe)this._unsubscribe()}updateUI(){let t=Ht.ui.sidebarCollapsed,n=this.shadowRoot.querySelector(".sidebar"),a=this.shadowRoot.querySelector(".sidebar-title"),o=this.shadowRoot.getElementById("toggle"),l=this.shadowRoot.querySelector(".sidebar-content");if(n)n.style.width=t?"60px":"260px";if(a)a.style.opacity=t?"0":"1";if(l)l.style.padding=t?"12px":"20px";if(o)o.innerHTML=t?"→":"← Collapse"}render(){let t=this.getAttribute("position")||"left",n=Ht.ui.sidebarCollapsed;this.shadowRoot.innerHTML=`
|
|
1157
1407
|
<style>
|
|
1158
1408
|
:host {
|
|
1159
1409
|
display: block;
|
|
@@ -1262,7 +1512,7 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
1262
1512
|
</button>
|
|
1263
1513
|
</div>
|
|
1264
1514
|
</aside>
|
|
1265
|
-
`,this.shadowRoot.getElementById("toggle").addEventListener("click",()=>{actions.toggleSidebar()})}};
|
|
1515
|
+
`,this.shadowRoot.getElementById("toggle").addEventListener("click",()=>{actions.toggleSidebar()})}};d("af-sidebar",tn);qb=tn});var ra={};H(ra,{default:()=>pb,AfriDropdown:()=>nn});var nn,pb;var ha=A(()=>{q();nn=class nn extends c{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=`
|
|
1266
1516
|
<style>
|
|
1267
1517
|
:host {
|
|
1268
1518
|
display: inline-block;
|
|
@@ -1344,7 +1594,7 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
1344
1594
|
<div class="dropdown-menu" role="menu" ${n?"":'aria-hidden="true"'}>
|
|
1345
1595
|
<slot></slot>
|
|
1346
1596
|
</div>
|
|
1347
|
-
`,this.shadowRoot.getElementById("trigger").addEventListener("click",(
|
|
1597
|
+
`,this.shadowRoot.getElementById("trigger").addEventListener("click",(a)=>{a.stopPropagation(),this.toggle()})}};d("af-dropdown",nn);pb=nn});var fa={};H(fa,{default:()=>Hb,AfriSelect:()=>on});var on,Hb;var ga=A(()=>{q();on=class on extends c{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",(a)=>{this._handleKeydown(a)}),this.shadowRoot.querySelectorAll(".select-option").forEach((a,o)=>{a.addEventListener("click",()=>{this._selectOption(o)})}),document.addEventListener("click",(a)=>{if(!this.contains(a.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 a=this._selectedIndex+t;if(a<0)a=n.length-1;if(a>=n.length)a=0;this._selectedIndex=a,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",a=this.getAttribute("theme")||"tanzania",o=this.getAttribute("error")||"",l=this.hasAttribute("required"),b=this.getAttribute("aria-label"),r=this.getAttribute("aria-describedby"),h={tanzania:{focus:"#1EB53A",error:"#DC3545"},maasai:{focus:"#FF0000",error:"#8B0000"},ndebele:{focus:"#4169E1",error:"#DC143C"}},f=h[a]||h.tanzania,_=[];if(o)_.push(`error-${this._uniqueId}`);if(r)_.push(...r.split(" "));let M=_.length>0?`aria-describedby="${_.join(" ")}"`:"",X=this._selectedIndex>=0?this._options[this._selectedIndex]?.label:n;this.shadowRoot.innerHTML=`
|
|
1348
1598
|
<style>
|
|
1349
1599
|
:host {
|
|
1350
1600
|
display: block;
|
|
@@ -1361,7 +1611,7 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
1361
1611
|
}
|
|
1362
1612
|
|
|
1363
1613
|
.required-star {
|
|
1364
|
-
color: ${
|
|
1614
|
+
color: ${f.error};
|
|
1365
1615
|
margin-left: 2px;
|
|
1366
1616
|
}
|
|
1367
1617
|
|
|
@@ -1373,7 +1623,7 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
1373
1623
|
width: 100%;
|
|
1374
1624
|
padding: 10px 40px 10px 13px;
|
|
1375
1625
|
font-size: 15px;
|
|
1376
|
-
border: 2px solid ${o?
|
|
1626
|
+
border: 2px solid ${o?f.error:"#ddd"};
|
|
1377
1627
|
border-radius: 5px;
|
|
1378
1628
|
background: white;
|
|
1379
1629
|
cursor: pointer;
|
|
@@ -1386,8 +1636,8 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
1386
1636
|
.select-trigger:focus,
|
|
1387
1637
|
.select-trigger.open {
|
|
1388
1638
|
outline: none;
|
|
1389
|
-
border-color: ${o?
|
|
1390
|
-
box-shadow: 0 0 0 3px ${o?
|
|
1639
|
+
border-color: ${o?f.error:f.focus};
|
|
1640
|
+
box-shadow: 0 0 0 3px ${o?f.error+"20":f.focus+"20"};
|
|
1391
1641
|
}
|
|
1392
1642
|
|
|
1393
1643
|
.select-arrow {
|
|
@@ -1433,18 +1683,18 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
1433
1683
|
}
|
|
1434
1684
|
|
|
1435
1685
|
.select-option:hover {
|
|
1436
|
-
background: ${
|
|
1686
|
+
background: ${f.focus}15;
|
|
1437
1687
|
}
|
|
1438
1688
|
|
|
1439
1689
|
.select-option.selected {
|
|
1440
|
-
background: ${
|
|
1690
|
+
background: ${f.focus};
|
|
1441
1691
|
color: white;
|
|
1442
1692
|
}
|
|
1443
1693
|
|
|
1444
1694
|
.error-text {
|
|
1445
1695
|
font-size: 12px;
|
|
1446
1696
|
margin-top: 4px;
|
|
1447
|
-
color: ${
|
|
1697
|
+
color: ${f.error};
|
|
1448
1698
|
}
|
|
1449
1699
|
|
|
1450
1700
|
::slotted(option) {
|
|
@@ -1459,28 +1709,28 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
1459
1709
|
class="select-trigger ${this._isOpen?"open":""}"
|
|
1460
1710
|
aria-expanded="${this._isOpen}"
|
|
1461
1711
|
aria-haspopup="listbox"
|
|
1462
|
-
${
|
|
1712
|
+
${b?`aria-label="${b}"`:""}
|
|
1463
1713
|
${o?'aria-invalid="true"':""}
|
|
1464
|
-
${
|
|
1465
|
-
${
|
|
1714
|
+
${M}>
|
|
1715
|
+
${X}
|
|
1466
1716
|
</button>
|
|
1467
1717
|
<span class="select-arrow" aria-hidden="true">▼</span>
|
|
1468
1718
|
<div class="select-dropdown ${this._isOpen?"open":""}"
|
|
1469
1719
|
role="listbox"
|
|
1470
1720
|
aria-hidden="${!this._isOpen}">
|
|
1471
|
-
${this._options.map((
|
|
1472
|
-
<div class="select-option ${
|
|
1473
|
-
data-index="${
|
|
1721
|
+
${this._options.map((L,R)=>`
|
|
1722
|
+
<div class="select-option ${R===this._selectedIndex?"selected":""}"
|
|
1723
|
+
data-index="${R}"
|
|
1474
1724
|
role="option"
|
|
1475
|
-
aria-selected="${
|
|
1476
|
-
${
|
|
1725
|
+
aria-selected="${R===this._selectedIndex}">
|
|
1726
|
+
${L.label}
|
|
1477
1727
|
</div>
|
|
1478
1728
|
`).join("")}
|
|
1479
1729
|
</div>
|
|
1480
1730
|
</div>
|
|
1481
1731
|
${o?`<div id="error-${this._uniqueId}" class="error-text" role="alert">${o}</div>`:""}
|
|
1482
1732
|
<slot></slot>
|
|
1483
|
-
`}};
|
|
1733
|
+
`}};d("af-select",on);Hb=on});var ca={};H(ca,{default:()=>Eb,AfriForm:()=>an});var an,Eb;var $a=A(()=>{q();Fn();an=class an extends c{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,a=this.querySelector('[type="submit"]')||this.shadowRoot.querySelector('button[type="submit"]'),o=this.getAttribute("schema"),l=o?this._getSchema(o):null,b=this.getAttribute("action"),r=this.getAttribute("method")||"GET",h=new FormData(n),f=Object.fromEntries(h.entries());if(Array.from(this.querySelectorAll("af-input")).forEach((M)=>{let X=M.getAttribute("name");if(X)f[X]=M.value}),l){let M=Gt.validate(l,f);if(!M.success){this._showValidationErrors(M.errors),this.emit("af-validation-error",{errors:M.errors});return}}if(!b)return;if(a){var _=a.textContent;a.textContent="Wait...",a.disabled=!0}try{let M=await fetch(b,{method:r,headers:{"Content-Type":"application/json"},body:JSON.stringify(f)});if(M.ok)this.emit("success",await M.json()),this.setAttribute("success","Form submitted successfully!"),this.removeAttribute("error");else{let X=await M.text();this.emit("error",X),this.setAttribute("error",X),this.removeAttribute("success")}}catch(M){this.emit("error",M.message),this.setAttribute("error",M.message),this.removeAttribute("success")}finally{if(a)a.textContent=_,a.disabled=!1}}_getSchema(t){return Do[t]||null}_showValidationErrors(t){this.shadowRoot.querySelectorAll(".field-error").forEach((n)=>n.remove()),Object.entries(t).forEach(([n,a])=>{let o=this.querySelector(`[name="${n}"]`);if(o)if(o.tagName==="AF-INPUT")o.setAttribute("error",a);else{let l=document.createElement("div");l.className="field-error",l.textContent=a,l.style.color="red",l.style.fontSize="12px",l.style.marginTop="4px",o.parentNode.insertBefore(l,o.nextSibling)}})}};d("af-form",an);Eb=an});var va={};H(va,{default:()=>Mb,AfriTooltip:()=>ln});var ln,Mb;var wa=A(()=>{q();ln=class ln extends c{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",a={top:`
|
|
1484
1734
|
bottom: 100%;
|
|
1485
1735
|
left: 50%;
|
|
1486
1736
|
transform: translateX(-50%) translateY(-8px);
|
|
@@ -1511,7 +1761,7 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
1511
1761
|
|
|
1512
1762
|
.tooltip-content {
|
|
1513
1763
|
position: absolute;
|
|
1514
|
-
${
|
|
1764
|
+
${a[n]}
|
|
1515
1765
|
padding: 8px 12px;
|
|
1516
1766
|
background: #1e1e1e;
|
|
1517
1767
|
border: 1px solid #2a2a2a;
|
|
@@ -1569,7 +1819,7 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
1569
1819
|
<slot></slot>
|
|
1570
1820
|
</span>
|
|
1571
1821
|
<div class="tooltip-content" id="${this._tooltipId}" role="tooltip" aria-hidden="true">${t}</div>
|
|
1572
|
-
`}};
|
|
1822
|
+
`}};d("af-tooltip",ln);Mb=ln});var da={};H(da,{default:()=>Yb,AfriToast:()=>bn});var bn,Yb;var _a=A(()=>{q();bn=class bn extends c{static get observedAttributes(){return["type","message","duration"]}constructor(){super();this.render()}show(t,n="info",a=4000){if(this.setAttribute("message",t),this.setAttribute("type",n),this.render(),this.shadowRoot.querySelector(".toast").classList.add("show"),a>0)setTimeout(()=>this.hide(),a)}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")||"",a={success:"✓",error:"✗",warning:"⚠",info:"ℹ"},o={success:"#1EB53A",error:"#EF3340",warning:"#FCD116",info:"#00A3DD"};this.shadowRoot.innerHTML=`
|
|
1573
1823
|
<style>
|
|
1574
1824
|
:host {
|
|
1575
1825
|
position: fixed;
|
|
@@ -1637,13 +1887,13 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
1637
1887
|
</style>
|
|
1638
1888
|
|
|
1639
1889
|
<div class="toast">
|
|
1640
|
-
<span class="toast-icon">${
|
|
1890
|
+
<span class="toast-icon">${a[t]}</span>
|
|
1641
1891
|
<div class="toast-content">
|
|
1642
1892
|
<div class="toast-message">${n}</div>
|
|
1643
1893
|
</div>
|
|
1644
1894
|
<button class="toast-close" id="close">×</button>
|
|
1645
1895
|
</div>
|
|
1646
|
-
`,this.shadowRoot.getElementById("close")?.addEventListener("click",()=>this.hide())}};
|
|
1896
|
+
`,this.shadowRoot.getElementById("close")?.addEventListener("click",()=>this.hide())}};d("af-toast",bn);Yb=bn});var ia={};H(ia,{default:()=>Sb,AfriBadge:()=>rn});var rn,Sb;var Aa=A(()=>{q();rn=class rn extends c{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",a=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"}},l=o[t]||o.default,b={sm:{padding:"2px 6px",fontSize:"11px"},md:{padding:"4px 10px",fontSize:"13px"},lg:{padding:"6px 14px",fontSize:"15px"}},r=b[n]||b.md;this.shadowRoot.innerHTML=`
|
|
1647
1897
|
<style>
|
|
1648
1898
|
:host {
|
|
1649
1899
|
display: inline-block;
|
|
@@ -1654,8 +1904,8 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
1654
1904
|
display: inline-flex;
|
|
1655
1905
|
align-items: center;
|
|
1656
1906
|
gap: 5px;
|
|
1657
|
-
padding: ${
|
|
1658
|
-
font-size: ${
|
|
1907
|
+
padding: ${r.padding};
|
|
1908
|
+
font-size: ${r.fontSize};
|
|
1659
1909
|
font-weight: 600;
|
|
1660
1910
|
background: ${l.bg};
|
|
1661
1911
|
color: ${l.text};
|
|
@@ -1682,9 +1932,9 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
1682
1932
|
|
|
1683
1933
|
<span class="badge">
|
|
1684
1934
|
<slot></slot>
|
|
1685
|
-
${
|
|
1935
|
+
${a?'<button class="remove-btn" aria-label="Remove">×</button>':""}
|
|
1686
1936
|
</span>
|
|
1687
|
-
`}};
|
|
1937
|
+
`}};d("af-badge",rn);Sb=rn});var ma={};H(ma,{default:()=>Lb,AfriAvatar:()=>hn});var hn,Lb;var xa=A(()=>{q();hn=class hn extends c{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")||"",a=this.getAttribute("size")||"md",o=this.getAttribute("status"),l=this.getAttribute("theme")||"tanzania",b={tanzania:"#1EB53A",maasai:"#FF0000",ndebele:"#4169E1",gold:"#FCD116"},r=b[l]||b.tanzania,h={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"}},f=h[a]||h.md,_={online:"#28a745",offline:"#6c757d",busy:"#dc3545",away:"#ffc107"};this.shadowRoot.innerHTML=`
|
|
1688
1938
|
<style>
|
|
1689
1939
|
:host {
|
|
1690
1940
|
display: inline-block;
|
|
@@ -1693,16 +1943,16 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
1693
1943
|
|
|
1694
1944
|
.avatar {
|
|
1695
1945
|
position: relative;
|
|
1696
|
-
width: ${
|
|
1697
|
-
height: ${
|
|
1946
|
+
width: ${f.size};
|
|
1947
|
+
height: ${f.size};
|
|
1698
1948
|
border-radius: 50%;
|
|
1699
1949
|
display: flex;
|
|
1700
1950
|
align-items: center;
|
|
1701
1951
|
justify-content: center;
|
|
1702
|
-
background: ${
|
|
1952
|
+
background: ${r};
|
|
1703
1953
|
color: white;
|
|
1704
1954
|
font-weight: 600;
|
|
1705
|
-
font-size: ${
|
|
1955
|
+
font-size: ${f.font};
|
|
1706
1956
|
overflow: hidden;
|
|
1707
1957
|
}
|
|
1708
1958
|
|
|
@@ -1716,11 +1966,11 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
1716
1966
|
position: absolute;
|
|
1717
1967
|
bottom: 0;
|
|
1718
1968
|
right: 0;
|
|
1719
|
-
width: ${
|
|
1720
|
-
height: ${
|
|
1969
|
+
width: ${f.status};
|
|
1970
|
+
height: ${f.status};
|
|
1721
1971
|
border-radius: 50%;
|
|
1722
1972
|
border: 2px solid white;
|
|
1723
|
-
background: ${o?
|
|
1973
|
+
background: ${o?_[o]||_.offline:"transparent"};
|
|
1724
1974
|
}
|
|
1725
1975
|
</style>
|
|
1726
1976
|
|
|
@@ -1728,7 +1978,7 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
1728
1978
|
${t?`<img src="${t}" alt="${n}" />`:this._getInitials(n)}
|
|
1729
1979
|
${o?'<span class="status"></span>':""}
|
|
1730
1980
|
</div>
|
|
1731
|
-
`}};
|
|
1981
|
+
`}};d("af-avatar",hn);Lb=hn});var ka={};H(ka,{default:()=>Xb,AfriProgress:()=>fn});var fn,Xb;var qa=A(()=>{q();fn=class fn extends c{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,a=this.getAttribute("theme")||"tanzania",o=this.getAttribute("size")||"md",l=this.getAttribute("label"),b=this.hasAttribute("animated"),r=Math.min(100,Math.max(0,t/n*100)),h={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"}},f=h[a]||h.tanzania,_={sm:"6px",md:"10px",lg:"16px"},M=_[o]||_.md;this.shadowRoot.innerHTML=`
|
|
1732
1982
|
<style>
|
|
1733
1983
|
:host {
|
|
1734
1984
|
display: block;
|
|
@@ -1757,19 +2007,19 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
1757
2007
|
|
|
1758
2008
|
.progress-track {
|
|
1759
2009
|
width: 100%;
|
|
1760
|
-
height: ${
|
|
1761
|
-
background: ${
|
|
2010
|
+
height: ${M};
|
|
2011
|
+
background: ${f.track};
|
|
1762
2012
|
border-radius: 100px;
|
|
1763
2013
|
overflow: hidden;
|
|
1764
2014
|
}
|
|
1765
2015
|
|
|
1766
2016
|
.progress-bar {
|
|
1767
2017
|
height: 100%;
|
|
1768
|
-
width: ${
|
|
1769
|
-
background: ${
|
|
2018
|
+
width: ${r}%;
|
|
2019
|
+
background: ${f.bar};
|
|
1770
2020
|
border-radius: 100px;
|
|
1771
2021
|
transition: width 500ms ease-out;
|
|
1772
|
-
${
|
|
2022
|
+
${b?`
|
|
1773
2023
|
background-size: 30px 30px;
|
|
1774
2024
|
background-image: linear-gradient(
|
|
1775
2025
|
135deg,
|
|
@@ -1795,7 +2045,7 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
1795
2045
|
${`
|
|
1796
2046
|
<div class="progress-header">
|
|
1797
2047
|
<span class="progress-label">${l||""}</span>
|
|
1798
|
-
<span class="progress-value">${
|
|
2048
|
+
<span class="progress-value">${r.toFixed(0)}%</span>
|
|
1799
2049
|
</div>
|
|
1800
2050
|
`}
|
|
1801
2051
|
<div class="progress-track">
|
|
@@ -1805,7 +2055,7 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
1805
2055
|
aria-valuemax="${n}"></div>
|
|
1806
2056
|
</div>
|
|
1807
2057
|
</div>
|
|
1808
|
-
`}};
|
|
2058
|
+
`}};d("af-progress",fn);Xb=fn});var pa={};H(pa,{default:()=>Qb,AfriLoader:()=>gn});var gn,Qb;var Ha=A(()=>{q();gn=class gn extends c{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",a=this.getAttribute("type")||"spiral",o={spiral:`M25,25 m0,-20 a20,20 0 1,1 0,40 a20,20 0 1,1 0,-40
|
|
1809
2059
|
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=`
|
|
1810
2060
|
<style>
|
|
1811
2061
|
:host {
|
|
@@ -1833,10 +2083,10 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
1833
2083
|
</style>
|
|
1834
2084
|
<div class="loader">
|
|
1835
2085
|
<svg viewBox="0 0 50 50">
|
|
1836
|
-
${
|
|
2086
|
+
${a==="spiral"?`<path d="${o.spiral}" fill="none" stroke="currentColor" stroke-width="4" stroke-linecap="round" />`:a==="sun"?`<path d="${o.sun}" stroke="currentColor" stroke-width="4" stroke-linecap="round" />`:`<path d="${o.diamond}" fill="none" stroke="currentColor" stroke-width="4" />`}
|
|
1837
2087
|
</svg>
|
|
1838
2088
|
</div>
|
|
1839
|
-
`}};
|
|
2089
|
+
`}};d("af-loader",gn);Qb=gn});var Ea={};H(Ea,{default:()=>Jb,AfriSkeleton:()=>cn});var cn,Jb;var Ma=A(()=>{q();cn=class cn extends c{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%",a=this.getAttribute("height")||"auto",o=parseInt(this.getAttribute("lines"))||1,l={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"}},b=l[t]||l.text;this.shadowRoot.innerHTML=`
|
|
1840
2090
|
<style>
|
|
1841
2091
|
:host {
|
|
1842
2092
|
display: block;
|
|
@@ -1851,7 +2101,7 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
1851
2101
|
);
|
|
1852
2102
|
background-size: 200% 100%;
|
|
1853
2103
|
animation: shimmer 1.5s infinite;
|
|
1854
|
-
border-radius: ${
|
|
2104
|
+
border-radius: ${b.borderRadius};
|
|
1855
2105
|
}
|
|
1856
2106
|
|
|
1857
2107
|
@keyframes shimmer {
|
|
@@ -1860,8 +2110,8 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
1860
2110
|
}
|
|
1861
2111
|
|
|
1862
2112
|
.skeleton-line {
|
|
1863
|
-
width: ${t==="text"?n:
|
|
1864
|
-
height: ${
|
|
2113
|
+
width: ${t==="text"?n:b.width||n};
|
|
2114
|
+
height: ${b.height};
|
|
1865
2115
|
margin-bottom: 8px;
|
|
1866
2116
|
}
|
|
1867
2117
|
|
|
@@ -1871,21 +2121,21 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
1871
2121
|
}
|
|
1872
2122
|
</style>
|
|
1873
2123
|
|
|
1874
|
-
${t==="text"||t==="title"?Array(o).fill(0).map(()=>'<div class="skeleton skeleton-line"></div>').join(""):`<div class="skeleton" style="width: ${
|
|
1875
|
-
`}};
|
|
1876
|
-
L${n*0.625},0 L${n*0.75},${
|
|
1877
|
-
L${n*0.9},${
|
|
1878
|
-
L${n*0.7},${
|
|
1879
|
-
L${n*0.5},${
|
|
1880
|
-
L${n*0.3},${
|
|
1881
|
-
L${n*0.1},${
|
|
2124
|
+
${t==="text"||t==="title"?Array(o).fill(0).map(()=>'<div class="skeleton skeleton-line"></div>').join(""):`<div class="skeleton" style="width: ${b.width||n}; height: ${b.height||a};"></div>`}
|
|
2125
|
+
`}};d("af-skeleton",cn);Jb=cn});var Ya={};H(Ya,{default:()=>Gb,AfriDivider:()=>$n});var $n,Gb;var Sa=A(()=>{q();$n=class $n extends c{static get observedAttributes(){return["pattern","height","color","flip"]}constructor(){super();this.render()}attributeChangedCallback(){this.render()}_getPatternPath(t,n,a){switch(t||"zigzag"){case"zigzag":return`M0,${a} L${n/4},0 L${n/2},${a} L${n*0.75},0 L${n},${a} V${a+10} H0 Z`;case"waves":return`M0,${a/2} Q${n/4},0 ${n/2},${a/2} T${n},${a/2} V${a} H0 Z`;case"triangles":return`M0,${a} L${n/8},0 L${n/4},${a} L${n*0.375},0 L${n/2},${a}
|
|
2126
|
+
L${n*0.625},0 L${n*0.75},${a} L${n*0.875},0 L${n},${a} V${a+10} H0 Z`;case"diamonds":return`M0,0 H${n} V${a/2}
|
|
2127
|
+
L${n*0.9},${a} L${n*0.8},${a/2}
|
|
2128
|
+
L${n*0.7},${a} L${n*0.6},${a/2}
|
|
2129
|
+
L${n*0.5},${a} L${n*0.4},${a/2}
|
|
2130
|
+
L${n*0.3},${a} L${n*0.2},${a/2}
|
|
2131
|
+
L${n*0.1},${a} L0,${a/2} Z`;default:return`M0,0 H${n} V${a} H0 Z`}}render(){let t=this.getAttribute("pattern")||"zigzag",n=this.getAttribute("height")||"50",a=this.getAttribute("color")||"currentColor",o=this.hasAttribute("flip");this.shadowRoot.innerHTML=`
|
|
1882
2132
|
<style>
|
|
1883
2133
|
:host {
|
|
1884
2134
|
display: block;
|
|
1885
2135
|
line-height: 0;
|
|
1886
2136
|
width: 100%;
|
|
1887
2137
|
overflow: hidden;
|
|
1888
|
-
color: ${
|
|
2138
|
+
color: ${a};
|
|
1889
2139
|
}
|
|
1890
2140
|
svg {
|
|
1891
2141
|
display: block;
|
|
@@ -1897,9 +2147,9 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
1897
2147
|
<svg viewBox="0 0 100 ${n}" preserveAspectRatio="none">
|
|
1898
2148
|
<path d="${this._getPatternPath(t,100,parseInt(n))}" fill="currentColor" />
|
|
1899
2149
|
</svg>
|
|
1900
|
-
`}};
|
|
2150
|
+
`}};d("af-divider",$n);Gb=$n});function Rb(t,n,a=50,o=50){let l=[];for(let b=0;b<t;b++){let r=2*Math.PI*b/t-Math.PI/2,h=a+n*Math.cos(r),f=o+n*Math.sin(r);l.push(`${h.toFixed(2)},${f.toFixed(2)}`)}return l.join(" ")}function Dn({primaryColor:t="#FF0000",secondaryColor:n="#000000",backgroundColor:a="#8B0000",stripeWidth:o=4,size:l=40}={}){let b=`
|
|
1901
2151
|
<svg xmlns="http://www.w3.org/2000/svg" width="${l}" height="${l}" viewBox="0 0 ${l} ${l}">
|
|
1902
|
-
<rect width="${l}" height="${l}" fill="${
|
|
2152
|
+
<rect width="${l}" height="${l}" fill="${a}"/>
|
|
1903
2153
|
<rect x="0" y="0" width="${l}" height="${o}" fill="${t}" opacity="0.8"/>
|
|
1904
2154
|
<rect x="0" y="${l/2-o/2}" width="${l}" height="${o}" fill="${n}" opacity="0.6"/>
|
|
1905
2155
|
<rect x="0" y="${l-o}" width="${l}" height="${o}" fill="${t}" opacity="0.8"/>
|
|
@@ -1907,32 +2157,32 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
1907
2157
|
<rect x="${l/2-o/2}" y="0" width="${o}" height="${l}" fill="${n}" opacity="0.4"/>
|
|
1908
2158
|
<rect x="${l-o}" y="0" width="${o}" height="${l}" fill="${t}" opacity="0.5"/>
|
|
1909
2159
|
</svg>
|
|
1910
|
-
`;return`data:image/svg+xml,${encodeURIComponent(
|
|
2160
|
+
`;return`data:image/svg+xml,${encodeURIComponent(b.trim())}`}function On({earthColor:t="#8B4513",ochreColor:n="#CD853F",charcoalColor:a="#2F2F2F",size:o=50}={}){let l=`
|
|
1911
2161
|
<svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}">
|
|
1912
2162
|
<rect width="${o}" height="${o}" fill="${t}"/>
|
|
1913
2163
|
<!-- Cave art inspired figures -->
|
|
1914
2164
|
<circle cx="${o*0.3}" cy="${o*0.3}" r="${o*0.08}" fill="${n}"/>
|
|
1915
|
-
<line x1="${o*0.3}" y1="${o*0.38}" x2="${o*0.3}" y2="${o*0.6}" stroke="${
|
|
1916
|
-
<line x1="${o*0.2}" y1="${o*0.45}" x2="${o*0.4}" y2="${o*0.45}" stroke="${
|
|
2165
|
+
<line x1="${o*0.3}" y1="${o*0.38}" x2="${o*0.3}" y2="${o*0.6}" stroke="${a}" stroke-width="2"/>
|
|
2166
|
+
<line x1="${o*0.2}" y1="${o*0.45}" x2="${o*0.4}" y2="${o*0.45}" stroke="${a}" stroke-width="2"/>
|
|
1917
2167
|
<!-- Animal figure -->
|
|
1918
2168
|
<ellipse cx="${o*0.7}" cy="${o*0.5}" rx="${o*0.15}" ry="${o*0.08}" fill="${n}"/>
|
|
1919
|
-
<line x1="${o*0.6}" y1="${o*0.58}" x2="${o*0.6}" y2="${o*0.7}" stroke="${
|
|
1920
|
-
<line x1="${o*0.8}" y1="${o*0.58}" x2="${o*0.8}" y2="${o*0.7}" stroke="${
|
|
2169
|
+
<line x1="${o*0.6}" y1="${o*0.58}" x2="${o*0.6}" y2="${o*0.7}" stroke="${a}" stroke-width="2"/>
|
|
2170
|
+
<line x1="${o*0.8}" y1="${o*0.58}" x2="${o*0.8}" y2="${o*0.7}" stroke="${a}" stroke-width="2"/>
|
|
1921
2171
|
<!-- Dots like ancient markings -->
|
|
1922
2172
|
<circle cx="${o*0.15}" cy="${o*0.8}" r="3" fill="${n}"/>
|
|
1923
2173
|
<circle cx="${o*0.85}" cy="${o*0.2}" r="3" fill="${n}"/>
|
|
1924
2174
|
</svg>
|
|
1925
|
-
`;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function
|
|
1926
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="${
|
|
1927
|
-
<rect width="${
|
|
2175
|
+
`;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function Wn({primaryColor:t="#1EB53A",accentColor:n="#FCD116",size:a=30}={}){let o=`
|
|
2176
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="${a}" height="${a}" viewBox="0 0 ${a} ${a}">
|
|
2177
|
+
<rect width="${a}" height="${a}" fill="${t}"/>
|
|
1928
2178
|
<!-- Pindo (Border) Motifs: Cashew/Triangle -->
|
|
1929
|
-
<path d="M0,0 L${
|
|
1930
|
-
<path d="M${
|
|
1931
|
-
<circle cx="${
|
|
2179
|
+
<path d="M0,0 L${a/2},${a/2} L0,${a} Z" fill="${n}"/>
|
|
2180
|
+
<path d="M${a},0 L${a/2},${a/2} L${a},${a} Z" fill="${n}"/>
|
|
2181
|
+
<circle cx="${a/2}" cy="${a/2}" r="${a*0.15}" fill="none" stroke="${n}" stroke-width="2"/>
|
|
1932
2182
|
</svg>
|
|
1933
|
-
`;return`data:image/svg+xml,${encodeURIComponent(o.trim())}`}function
|
|
2183
|
+
`;return`data:image/svg+xml,${encodeURIComponent(o.trim())}`}function Fb({primaryColor:t="#FF6B00",secondaryColor:n="#002B5C",backgroundColor:a="#FFFFFF",size:o=40}={}){let l=`
|
|
1934
2184
|
<svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}">
|
|
1935
|
-
<rect width="${o}" height="${o}" fill="${
|
|
2185
|
+
<rect width="${o}" height="${o}" fill="${a}"/>
|
|
1936
2186
|
<!-- Border pattern -->
|
|
1937
2187
|
<rect x="0" y="0" width="${o}" height="${o*0.1}" fill="${t}"/>
|
|
1938
2188
|
<rect x="0" y="${o*0.9}" width="${o}" height="${o*0.1}" fill="${t}"/>
|
|
@@ -1942,9 +2192,9 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
1942
2192
|
<circle cx="${o*0.5}" cy="${o*0.5}" r="${o*0.15}" fill="${n}"/>
|
|
1943
2193
|
<text x="${o*0.5}" y="${o*0.55}" text-anchor="middle" fill="${t}" font-size="${o*0.08}">KANGA</text>
|
|
1944
2194
|
</svg>
|
|
1945
|
-
`;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function
|
|
2195
|
+
`;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function ub({primaryColor:t="#8B4513",secondaryColor:n="#DAA520",backgroundColor:a="#F5F5DC",size:o=30}={}){let l=`
|
|
1946
2196
|
<svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}">
|
|
1947
|
-
<rect width="${o}" height="${o}" fill="${
|
|
2197
|
+
<rect width="${o}" height="${o}" fill="${a}"/>
|
|
1948
2198
|
<!-- Kuba geometric border -->
|
|
1949
2199
|
<polygon points="0,0 ${o*0.3},0 0,${o*0.3}" fill="${t}"/>
|
|
1950
2200
|
<polygon points="${o},0 ${o*0.7},0 ${o},${o*0.3}" fill="${t}"/>
|
|
@@ -1953,9 +2203,9 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
1953
2203
|
<!-- Center diamond -->
|
|
1954
2204
|
<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}"/>
|
|
1955
2205
|
</svg>
|
|
1956
|
-
`;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function
|
|
2206
|
+
`;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function Bb({primaryColor:t="#FF0000",secondaryColor:n="#000000",accentColor:a="#FFFFFF",size:o=40}={}){let l=`
|
|
1957
2207
|
<svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}">
|
|
1958
|
-
<rect width="${o}" height="${o}" fill="${
|
|
2208
|
+
<rect width="${o}" height="${o}" fill="${a}"/>
|
|
1959
2209
|
<!-- Bead pattern -->
|
|
1960
2210
|
<circle cx="${o*0.2}" cy="${o*0.2}" r="${o*0.08}" fill="${t}"/>
|
|
1961
2211
|
<circle cx="${o*0.5}" cy="${o*0.2}" r="${o*0.08}" fill="${n}"/>
|
|
@@ -1967,9 +2217,9 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
1967
2217
|
<circle cx="${o*0.5}" cy="${o*0.8}" r="${o*0.08}" fill="${n}"/>
|
|
1968
2218
|
<circle cx="${o*0.8}" cy="${o*0.8}" r="${o*0.08}" fill="${t}"/>
|
|
1969
2219
|
</svg>
|
|
1970
|
-
`;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function
|
|
2220
|
+
`;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function Db({primaryColor:t="#8B0000",secondaryColor:n="#FFD700",backgroundColor:a="#654321",size:o=50}={}){let l=`
|
|
1971
2221
|
<svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}">
|
|
1972
|
-
<ellipse cx="${o*0.5}" cy="${o*0.5}" rx="${o*0.4}" ry="${o*0.45}" fill="${
|
|
2222
|
+
<ellipse cx="${o*0.5}" cy="${o*0.5}" rx="${o*0.4}" ry="${o*0.45}" fill="${a}"/>
|
|
1973
2223
|
<!-- Shield patterns -->
|
|
1974
2224
|
<ellipse cx="${o*0.5}" cy="${o*0.3}" rx="${o*0.2}" ry="${o*0.15}" fill="${t}"/>
|
|
1975
2225
|
<rect x="${o*0.4}" y="${o*0.5}" width="${o*0.2}" height="${o*0.3}" fill="${n}"/>
|
|
@@ -1977,21 +2227,21 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
1977
2227
|
<line x1="${o*0.3}" y1="${o*0.2}" x2="${o*0.7}" y2="${o*0.2}" stroke="${t}" stroke-width="3"/>
|
|
1978
2228
|
<line x1="${o*0.3}" y1="${o*0.8}" x2="${o*0.7}" y2="${o*0.8}" stroke="${t}" stroke-width="3"/>
|
|
1979
2229
|
</svg>
|
|
1980
|
-
`;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function
|
|
2230
|
+
`;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function Ob({primaryColor:t="#FF1493",secondaryColor:n="#00FF00",accentColor:a="#FFFF00",backgroundColor:o="#FFFFFF",size:l=50}={}){let b=`
|
|
1981
2231
|
<svg xmlns="http://www.w3.org/2000/svg" width="${l}" height="${l}" viewBox="0 0 ${l} ${l}">
|
|
1982
2232
|
<rect width="${l}" height="${l}" fill="${o}"/>
|
|
1983
2233
|
<!-- Ndebele geometric patterns -->
|
|
1984
2234
|
<polygon points="${l*0.2},${l*0.2} ${l*0.4},${l*0.2} ${l*0.3},${l*0.4}" fill="${t}"/>
|
|
1985
2235
|
<polygon points="${l*0.6},${l*0.2} ${l*0.8},${l*0.2} ${l*0.7},${l*0.4}" fill="${n}"/>
|
|
1986
|
-
<polygon points="${l*0.2},${l*0.6} ${l*0.4},${l*0.6} ${l*0.3},${l*0.8}" fill="${
|
|
2236
|
+
<polygon points="${l*0.2},${l*0.6} ${l*0.4},${l*0.6} ${l*0.3},${l*0.8}" fill="${a}"/>
|
|
1987
2237
|
<polygon points="${l*0.6},${l*0.6} ${l*0.8},${l*0.6} ${l*0.7},${l*0.8}" fill="${t}"/>
|
|
1988
2238
|
<!-- Center design -->
|
|
1989
2239
|
<circle cx="${l*0.5}" cy="${l*0.5}" r="${l*0.15}" fill="${n}"/>
|
|
1990
|
-
<rect x="${l*0.45}" y="${l*0.45}" width="${l*0.1}" height="${l*0.1}" fill="${
|
|
2240
|
+
<rect x="${l*0.45}" y="${l*0.45}" width="${l*0.1}" height="${l*0.1}" fill="${a}"/>
|
|
1991
2241
|
</svg>
|
|
1992
|
-
`;return`data:image/svg+xml,${encodeURIComponent(
|
|
2242
|
+
`;return`data:image/svg+xml,${encodeURIComponent(b.trim())}`}function Un({primaryColor:t="#00A3DD",secondaryColor:n="#FCD116",backgroundColor:a="#1EB53A",size:o=50}={}){let l=`
|
|
1993
2243
|
<svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}">
|
|
1994
|
-
<rect width="${o}" height="${o}" fill="${
|
|
2244
|
+
<rect width="${o}" height="${o}" fill="${a}"/>
|
|
1995
2245
|
<circle cx="${o*0.25}" cy="${o*0.25}" r="${o*0.2}" fill="${t}" opacity="0.8"/>
|
|
1996
2246
|
<circle cx="${o*0.75}" cy="${o*0.75}" r="${o*0.2}" fill="${t}" opacity="0.8"/>
|
|
1997
2247
|
<circle cx="${o*0.25}" cy="${o*0.25}" r="${o*0.1}" fill="${n}"/>
|
|
@@ -1999,63 +2249,63 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
1999
2249
|
<circle cx="${o*0.75}" cy="${o*0.25}" r="${o*0.08}" fill="${n}" opacity="0.6"/>
|
|
2000
2250
|
<circle cx="${o*0.25}" cy="${o*0.75}" r="${o*0.08}" fill="${n}" opacity="0.6"/>
|
|
2001
2251
|
</svg>
|
|
2002
|
-
`;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function
|
|
2252
|
+
`;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function Vn({colors:t=["#FFD700","#228B22","#DC143C","#000000"],size:n=60}={}){let[a,o,l,b]=t,r=n/6,h=`
|
|
2003
2253
|
<svg xmlns="http://www.w3.org/2000/svg" width="${n}" height="${n}" viewBox="0 0 ${n} ${n}">
|
|
2004
|
-
<rect width="${n}" height="${n}" fill="${
|
|
2254
|
+
<rect width="${n}" height="${n}" fill="${b}"/>
|
|
2005
2255
|
<!-- Horizontal bands -->
|
|
2006
|
-
<rect x="0" y="0" width="${n}" height="${
|
|
2007
|
-
<rect x="0" y="${
|
|
2008
|
-
<rect x="0" y="${
|
|
2009
|
-
<rect x="0" y="${
|
|
2010
|
-
<rect x="0" y="${
|
|
2011
|
-
<rect x="0" y="${
|
|
2256
|
+
<rect x="0" y="0" width="${n}" height="${r}" fill="${a}"/>
|
|
2257
|
+
<rect x="0" y="${r}" width="${n}" height="${r}" fill="${o}"/>
|
|
2258
|
+
<rect x="0" y="${r*2}" width="${n}" height="${r}" fill="${l}"/>
|
|
2259
|
+
<rect x="0" y="${r*3}" width="${n}" height="${r}" fill="${a}"/>
|
|
2260
|
+
<rect x="0" y="${r*4}" width="${n}" height="${r}" fill="${o}"/>
|
|
2261
|
+
<rect x="0" y="${r*5}" width="${n}" height="${r}" fill="${l}"/>
|
|
2012
2262
|
<!-- Vertical accents -->
|
|
2013
|
-
<rect x="${n*0.2}" y="0" width="3" height="${n}" fill="${
|
|
2014
|
-
<rect x="${n*0.4}" y="0" width="3" height="${n}" fill="${
|
|
2015
|
-
<rect x="${n*0.6}" y="0" width="3" height="${n}" fill="${
|
|
2016
|
-
<rect x="${n*0.8}" y="0" width="3" height="${n}" fill="${
|
|
2263
|
+
<rect x="${n*0.2}" y="0" width="3" height="${n}" fill="${b}" opacity="0.5"/>
|
|
2264
|
+
<rect x="${n*0.4}" y="0" width="3" height="${n}" fill="${b}" opacity="0.5"/>
|
|
2265
|
+
<rect x="${n*0.6}" y="0" width="3" height="${n}" fill="${b}" opacity="0.5"/>
|
|
2266
|
+
<rect x="${n*0.8}" y="0" width="3" height="${n}" fill="${b}" opacity="0.5"/>
|
|
2017
2267
|
<!-- Kente squares -->
|
|
2018
|
-
<rect x="${n*0.1}" y="${n*0.1}" width="${n*0.15}" height="${n*0.15}" fill="${
|
|
2019
|
-
<rect x="${n*0.75}" y="${n*0.75}" width="${n*0.15}" height="${n*0.15}" fill="${l}" stroke="${
|
|
2268
|
+
<rect x="${n*0.1}" y="${n*0.1}" width="${n*0.15}" height="${n*0.15}" fill="${a}" stroke="${b}" stroke-width="1"/>
|
|
2269
|
+
<rect x="${n*0.75}" y="${n*0.75}" width="${n*0.15}" height="${n*0.15}" fill="${l}" stroke="${b}" stroke-width="1"/>
|
|
2020
2270
|
</svg>
|
|
2021
|
-
`;return`data:image/svg+xml,${encodeURIComponent(
|
|
2022
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="${
|
|
2023
|
-
<rect width="${
|
|
2271
|
+
`;return`data:image/svg+xml,${encodeURIComponent(h.trim())}`}function jn({symbolColor:t="#000000",backgroundColor:n="#CD853F",size:a=50}={}){let o=`
|
|
2272
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="${a}" height="${a}" viewBox="0 0 ${a} ${a}">
|
|
2273
|
+
<rect width="${a}" height="${a}" fill="${n}"/>
|
|
2024
2274
|
<!-- Sankofa-inspired heart shape (go back and get it) -->
|
|
2025
|
-
<path d="M${
|
|
2026
|
-
C${
|
|
2027
|
-
L${
|
|
2028
|
-
L${
|
|
2029
|
-
C${
|
|
2275
|
+
<path d="M${a*0.5} ${a*0.2}
|
|
2276
|
+
C${a*0.3} ${a*0.1} ${a*0.15} ${a*0.3} ${a*0.25} ${a*0.5}
|
|
2277
|
+
L${a*0.5} ${a*0.8}
|
|
2278
|
+
L${a*0.75} ${a*0.5}
|
|
2279
|
+
C${a*0.85} ${a*0.3} ${a*0.7} ${a*0.1} ${a*0.5} ${a*0.2}"
|
|
2030
2280
|
fill="none" stroke="${t}" stroke-width="3"/>
|
|
2031
2281
|
<!-- Spiral detail -->
|
|
2032
|
-
<circle cx="${
|
|
2033
|
-
<circle cx="${
|
|
2282
|
+
<circle cx="${a*0.35}" cy="${a*0.45}" r="${a*0.08}" fill="none" stroke="${t}" stroke-width="2"/>
|
|
2283
|
+
<circle cx="${a*0.65}" cy="${a*0.45}" r="${a*0.08}" fill="none" stroke="${t}" stroke-width="2"/>
|
|
2034
2284
|
</svg>
|
|
2035
|
-
`;return`data:image/svg+xml,${encodeURIComponent(o.trim())}`}function
|
|
2285
|
+
`;return`data:image/svg+xml,${encodeURIComponent(o.trim())}`}function en({colors:t=["#4B0082","#FFD700","#FFFFFF"],size:n=50}={}){let[a,o,l]=t,b=n/10,r=`
|
|
2036
2286
|
<svg xmlns="http://www.w3.org/2000/svg" width="${n}" height="${n}" viewBox="0 0 ${n} ${n}">
|
|
2037
|
-
<rect width="${n}" height="${n}" fill="${
|
|
2287
|
+
<rect width="${n}" height="${n}" fill="${a}"/>
|
|
2038
2288
|
<!-- Horizontal stripes -->
|
|
2039
|
-
<rect x="0" y="${
|
|
2040
|
-
<rect x="0" y="${
|
|
2041
|
-
<rect x="0" y="${
|
|
2042
|
-
<rect x="0" y="${
|
|
2043
|
-
<rect x="0" y="${
|
|
2289
|
+
<rect x="0" y="${b}" width="${n}" height="${b*0.5}" fill="${o}"/>
|
|
2290
|
+
<rect x="0" y="${b*3}" width="${n}" height="${b*0.5}" fill="${l}"/>
|
|
2291
|
+
<rect x="0" y="${b*5}" width="${n}" height="${b*0.5}" fill="${o}"/>
|
|
2292
|
+
<rect x="0" y="${b*7}" width="${n}" height="${b*0.5}" fill="${l}"/>
|
|
2293
|
+
<rect x="0" y="${b*9}" width="${n}" height="${b*0.5}" fill="${o}"/>
|
|
2044
2294
|
<!-- Vertical accent lines -->
|
|
2045
|
-
<rect x="${n*0.48}" y="0" width="${
|
|
2295
|
+
<rect x="${n*0.48}" y="0" width="${b*0.4}" height="${n}" fill="${o}" opacity="0.7"/>
|
|
2046
2296
|
<!-- Diamond motifs -->
|
|
2047
2297
|
<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}"
|
|
2048
2298
|
fill="${o}" stroke="${l}" stroke-width="1"/>
|
|
2049
2299
|
<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}"
|
|
2050
2300
|
fill="${o}" stroke="${l}" stroke-width="1"/>
|
|
2051
2301
|
</svg>
|
|
2052
|
-
`;return`data:image/svg+xml,${encodeURIComponent(
|
|
2302
|
+
`;return`data:image/svg+xml,${encodeURIComponent(r.trim())}`}function Nn({primaryColor:t="#FF6B00",secondaryColor:n="#00A86B",accentColor:a="#FFD700",backgroundColor:o="#FFFFFF",size:l=60}={}){let b=`
|
|
2053
2303
|
<svg xmlns="http://www.w3.org/2000/svg" width="${l}" height="${l}" viewBox="0 0 ${l} ${l}">
|
|
2054
2304
|
<rect width="${l}" height="${l}" fill="${o}"/>
|
|
2055
2305
|
<!-- Bold circular motifs -->
|
|
2056
2306
|
<circle cx="${l*0.3}" cy="${l*0.3}" r="${l*0.25}" fill="${t}"/>
|
|
2057
2307
|
<circle cx="${l*0.3}" cy="${l*0.3}" r="${l*0.15}" fill="${n}"/>
|
|
2058
|
-
<circle cx="${l*0.3}" cy="${l*0.3}" r="${l*0.08}" fill="${
|
|
2308
|
+
<circle cx="${l*0.3}" cy="${l*0.3}" r="${l*0.08}" fill="${a}"/>
|
|
2059
2309
|
|
|
2060
2310
|
<circle cx="${l*0.8}" cy="${l*0.8}" r="${l*0.2}" fill="${n}"/>
|
|
2061
2311
|
<circle cx="${l*0.8}" cy="${l*0.8}" r="${l*0.1}" fill="${t}"/>
|
|
@@ -2065,10 +2315,10 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
2065
2315
|
stroke="${t}" stroke-width="4"/>
|
|
2066
2316
|
|
|
2067
2317
|
<!-- Small dots -->
|
|
2068
|
-
<circle cx="${l*0.1}" cy="${l*0.8}" r="${l*0.05}" fill="${
|
|
2069
|
-
<circle cx="${l*0.9}" cy="${l*0.2}" r="${l*0.05}" fill="${
|
|
2318
|
+
<circle cx="${l*0.1}" cy="${l*0.8}" r="${l*0.05}" fill="${a}"/>
|
|
2319
|
+
<circle cx="${l*0.9}" cy="${l*0.2}" r="${l*0.05}" fill="${a}"/>
|
|
2070
2320
|
</svg>
|
|
2071
|
-
`;return`data:image/svg+xml,${encodeURIComponent(
|
|
2321
|
+
`;return`data:image/svg+xml,${encodeURIComponent(b.trim())}`}function Kn({primaryColor:t="#000000",secondaryColor:n="#FFFFFF",accentColor:a="#8B4513",size:o=60}={}){let l=`
|
|
2072
2322
|
<svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}">
|
|
2073
2323
|
<rect width="${o}" height="${o}" fill="${t}"/>
|
|
2074
2324
|
<!-- Zigzags -->
|
|
@@ -2082,23 +2332,23 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
2082
2332
|
<line x1="${o*0.75}" y1="${o*0.4}" x2="${o*0.75}" y2="${o*0.6}" stroke="${n}" stroke-width="2"/>
|
|
2083
2333
|
<line x1="${o*0.65}" y1="${o*0.5}" x2="${o*0.85}" y2="${o*0.5}" stroke="${n}" stroke-width="2"/>
|
|
2084
2334
|
<!-- Dots -->
|
|
2085
|
-
<circle cx="${o*0.5}" cy="${o*0.5}" r="${o*0.08}" fill="${
|
|
2335
|
+
<circle cx="${o*0.5}" cy="${o*0.5}" r="${o*0.08}" fill="${a}"/>
|
|
2086
2336
|
</svg>
|
|
2087
|
-
`;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function
|
|
2088
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="${
|
|
2089
|
-
<rect width="${
|
|
2337
|
+
`;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function In({primaryColor:t="#D2B48C",secondaryColor:n="#3E2723",size:a=60}={}){let o=`
|
|
2338
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="${a}" height="${a}" viewBox="0 0 ${a} ${a}">
|
|
2339
|
+
<rect width="${a}" height="${a}" fill="${t}"/>
|
|
2090
2340
|
<!-- Interlocking diamonds/rectangles -->
|
|
2091
|
-
<rect x="${
|
|
2092
|
-
<rect x="${
|
|
2093
|
-
<rect x="${
|
|
2341
|
+
<rect x="${a*0.1}" y="${a*0.1}" width="${a*0.3}" height="${a*0.3}" fill="${n}"/>
|
|
2342
|
+
<rect x="${a*0.6}" y="${a*0.6}" width="${a*0.3}" height="${a*0.3}" fill="${n}"/>
|
|
2343
|
+
<rect x="${a*0.6}" y="${a*0.1}" width="${a*0.3}" height="${a*0.3}"
|
|
2094
2344
|
fill="none" stroke="${n}" stroke-width="4"/>
|
|
2095
|
-
<rect x="${
|
|
2345
|
+
<rect x="${a*0.1}" y="${a*0.6}" width="${a*0.3}" height="${a*0.3}"
|
|
2096
2346
|
fill="none" stroke="${n}" stroke-width="4"/>
|
|
2097
2347
|
<!-- Center lines -->
|
|
2098
|
-
<line x1="${
|
|
2099
|
-
<line x1="${
|
|
2348
|
+
<line x1="${a*0.4}" y1="${a*0.5}" x2="${a*0.6}" y2="${a*0.5}" stroke="${n}" stroke-width="2"/>
|
|
2349
|
+
<line x1="${a*0.5}" y1="${a*0.4}" x2="${a*0.5}" y2="${a*0.6}" stroke="${n}" stroke-width="2"/>
|
|
2100
2350
|
</svg>
|
|
2101
|
-
`;return`data:image/svg+xml,${encodeURIComponent(o.trim())}`}function
|
|
2351
|
+
`;return`data:image/svg+xml,${encodeURIComponent(o.trim())}`}function Pn({primaryColor:t="#000000",secondaryColor:n="#FFFFFF",accentColor:a="#B22222",size:o=60}={}){let l=`
|
|
2102
2352
|
<svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}">
|
|
2103
2353
|
<rect width="${o}" height="${o}" fill="${n}"/>
|
|
2104
2354
|
<!-- Spiral/Diamond Motif -->
|
|
@@ -2112,58 +2362,58 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
2112
2362
|
L${o*0.5} ${o*0.7}
|
|
2113
2363
|
L${o*0.3} ${o*0.5} Z"
|
|
2114
2364
|
fill="${n}"/>
|
|
2115
|
-
<circle cx="${o*0.5}" cy="${o*0.5}" r="${o*0.1}" fill="${
|
|
2365
|
+
<circle cx="${o*0.5}" cy="${o*0.5}" r="${o*0.1}" fill="${a}"/>
|
|
2116
2366
|
</svg>
|
|
2117
|
-
`;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function
|
|
2118
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="${
|
|
2119
|
-
<rect width="${
|
|
2367
|
+
`;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function Cn({colors:t=["#009E60","#FCDD09","#EF3340"],backgroundColor:n="#FFFFFF",size:a=40}={}){let[o,l,b]=t,r=`
|
|
2368
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="${a}" height="${a}" viewBox="0 0 ${a} ${a}">
|
|
2369
|
+
<rect width="${a}" height="${a}" fill="${n}"/>
|
|
2120
2370
|
<!-- Diamond Chain -->
|
|
2121
|
-
<polygon points="${
|
|
2371
|
+
<polygon points="${a*0.5},0 ${a},${a*0.5} ${a*0.5},${a} 0,${a*0.5}"
|
|
2122
2372
|
fill="${o}" opacity="0.2"/>
|
|
2123
|
-
<polygon points="${
|
|
2373
|
+
<polygon points="${a*0.5},${a*0.2} ${a*0.8},${a*0.5} ${a*0.5},${a*0.8} ${a*0.2},${a*0.5}"
|
|
2124
2374
|
fill="${l}"/>
|
|
2125
|
-
<rect x="${
|
|
2375
|
+
<rect x="${a*0.4}" y="${a*0.4}" width="${a*0.2}" height="${a*0.2}" fill="${b}"/>
|
|
2126
2376
|
<!-- Side accents -->
|
|
2127
|
-
<line x1="0" y1="0" x2="0" y2="${
|
|
2128
|
-
<line x1="${
|
|
2377
|
+
<line x1="0" y1="0" x2="0" y2="${a}" stroke="${o}" stroke-width="4"/>
|
|
2378
|
+
<line x1="${a}" y1="0" x2="${a}" y2="${a}" stroke="${o}" stroke-width="4"/>
|
|
2129
2379
|
</svg>
|
|
2130
|
-
`;return`data:image/svg+xml,${encodeURIComponent(
|
|
2380
|
+
`;return`data:image/svg+xml,${encodeURIComponent(r.trim())}`}function Tn({colors:t=["#FFD700","#4169E1","#FF69B4","#228B22"],size:n=60,strokeWidth:a=2}={}){let[o,l,b,r]=t,h=`
|
|
2131
2381
|
<svg xmlns="http://www.w3.org/2000/svg" width="${n}" height="${n}" viewBox="0 0 ${n} ${n}">
|
|
2132
2382
|
<rect width="${n}" height="${n}" fill="#FFFFFF"/>
|
|
2133
|
-
<rect x="${
|
|
2134
|
-
width="${n-
|
|
2135
|
-
fill="none" stroke="#000000" stroke-width="${
|
|
2383
|
+
<rect x="${a}" y="${a}"
|
|
2384
|
+
width="${n-a*2}" height="${n-a*2}"
|
|
2385
|
+
fill="none" stroke="#000000" stroke-width="${a}"/>
|
|
2136
2386
|
<rect x="${n*0.15}" y="${n*0.15}" width="${n*0.35}" height="${n*0.35}"
|
|
2137
|
-
fill="${o}" stroke="#000000" stroke-width="${
|
|
2387
|
+
fill="${o}" stroke="#000000" stroke-width="${a/2}"/>
|
|
2138
2388
|
<rect x="${n*0.5}" y="${n*0.15}" width="${n*0.35}" height="${n*0.35}"
|
|
2139
|
-
fill="${l}" stroke="#000000" stroke-width="${
|
|
2389
|
+
fill="${l}" stroke="#000000" stroke-width="${a/2}"/>
|
|
2140
2390
|
<rect x="${n*0.15}" y="${n*0.5}" width="${n*0.35}" height="${n*0.35}"
|
|
2141
|
-
fill="${
|
|
2391
|
+
fill="${b}" stroke="#000000" stroke-width="${a/2}"/>
|
|
2142
2392
|
<rect x="${n*0.5}" y="${n*0.5}" width="${n*0.35}" height="${n*0.35}"
|
|
2143
|
-
fill="${
|
|
2393
|
+
fill="${r}" stroke="#000000" stroke-width="${a/2}"/>
|
|
2144
2394
|
<polygon points="${n/2},${n*0.3} ${n*0.7},${n/2} ${n/2},${n*0.7} ${n*0.3},${n/2}"
|
|
2145
|
-
fill="#FFFFFF" stroke="#000000" stroke-width="${
|
|
2395
|
+
fill="#FFFFFF" stroke="#000000" stroke-width="${a}"/>
|
|
2146
2396
|
</svg>
|
|
2147
|
-
`;return`data:image/svg+xml,${encodeURIComponent(
|
|
2397
|
+
`;return`data:image/svg+xml,${encodeURIComponent(h.trim())}`}function yn({colors:t=["#FFFFFF","#000000","#FF0000","#00A86B","#FFD700"],size:n=50}={}){let[a,o,l,b,r]=t,h=n/10,f=`
|
|
2148
2398
|
<svg xmlns="http://www.w3.org/2000/svg" width="${n}" height="${n}" viewBox="0 0 ${n} ${n}">
|
|
2149
2399
|
<rect width="${n}" height="${n}" fill="${o}"/>
|
|
2150
2400
|
<!-- Triangle pattern (isivivane - sacred cairn) -->
|
|
2151
2401
|
<polygon points="${n*0.5},${n*0.1} ${n*0.9},${n*0.9} ${n*0.1},${n*0.9}"
|
|
2152
|
-
fill="none" stroke="${
|
|
2402
|
+
fill="none" stroke="${a}" stroke-width="2"/>
|
|
2153
2403
|
<polygon points="${n*0.5},${n*0.25} ${n*0.75},${n*0.75} ${n*0.25},${n*0.75}"
|
|
2154
2404
|
fill="${l}"/>
|
|
2155
2405
|
<!-- Beadwork dots -->
|
|
2156
|
-
<circle cx="${n*0.5}" cy="${n*0.35}" r="${
|
|
2157
|
-
<circle cx="${n*0.35}" cy="${n*0.6}" r="${
|
|
2158
|
-
<circle cx="${n*0.65}" cy="${n*0.6}" r="${
|
|
2159
|
-
<circle cx="${n*0.5}" cy="${n*0.8}" r="${
|
|
2406
|
+
<circle cx="${n*0.5}" cy="${n*0.35}" r="${h}" fill="${a}"/>
|
|
2407
|
+
<circle cx="${n*0.35}" cy="${n*0.6}" r="${h}" fill="${b}"/>
|
|
2408
|
+
<circle cx="${n*0.65}" cy="${n*0.6}" r="${h}" fill="${r}"/>
|
|
2409
|
+
<circle cx="${n*0.5}" cy="${n*0.8}" r="${h}" fill="${a}"/>
|
|
2160
2410
|
<!-- Border dots -->
|
|
2161
|
-
<circle cx="${n*0.1}" cy="${n*0.1}" r="${
|
|
2162
|
-
<circle cx="${n*0.9}" cy="${n*0.1}" r="${
|
|
2411
|
+
<circle cx="${n*0.1}" cy="${n*0.1}" r="${h*0.7}" fill="${l}"/>
|
|
2412
|
+
<circle cx="${n*0.9}" cy="${n*0.1}" r="${h*0.7}" fill="${b}"/>
|
|
2163
2413
|
</svg>
|
|
2164
|
-
`;return`data:image/svg+xml,${encodeURIComponent(
|
|
2414
|
+
`;return`data:image/svg+xml,${encodeURIComponent(f.trim())}`}function Zn({colors:t=["#3E5EB9","#FECD00","#B10C0C","#FFFFFF"],size:n=50}={}){let[a,o,l,b]=t,r=`
|
|
2165
2415
|
<svg xmlns="http://www.w3.org/2000/svg" width="${n}" height="${n}" viewBox="0 0 ${n} ${n}">
|
|
2166
|
-
<rect width="${n}" height="${n}" fill="${
|
|
2416
|
+
<rect width="${n}" height="${n}" fill="${a}"/>
|
|
2167
2417
|
<!-- Shield shape (central to Eswatini culture) -->
|
|
2168
2418
|
<ellipse cx="${n*0.5}" cy="${n*0.45}" rx="${n*0.35}" ry="${n*0.4}"
|
|
2169
2419
|
fill="${o}" stroke="${l}" stroke-width="3"/>
|
|
@@ -2172,18 +2422,18 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
2172
2422
|
fill="${l}"/>
|
|
2173
2423
|
<!-- Feather accents -->
|
|
2174
2424
|
<line x1="${n*0.5}" y1="${n*0.05}" x2="${n*0.5}" y2="${n*0.2}"
|
|
2175
|
-
stroke="${
|
|
2425
|
+
stroke="${b}" stroke-width="3"/>
|
|
2176
2426
|
<line x1="${n*0.4}" y1="${n*0.08}" x2="${n*0.45}" y2="${n*0.15}"
|
|
2177
|
-
stroke="${
|
|
2427
|
+
stroke="${b}" stroke-width="2"/>
|
|
2178
2428
|
<line x1="${n*0.6}" y1="${n*0.08}" x2="${n*0.55}" y2="${n*0.15}"
|
|
2179
|
-
stroke="${
|
|
2429
|
+
stroke="${b}" stroke-width="2"/>
|
|
2180
2430
|
<!-- Spear points -->
|
|
2181
|
-
<polygon points="${n*0.1},${n*0.3} ${n*0.05},${n*0.5} ${n*0.15},${n*0.5}" fill="${
|
|
2182
|
-
<polygon points="${n*0.9},${n*0.3} ${n*0.85},${n*0.5} ${n*0.95},${n*0.5}" fill="${
|
|
2431
|
+
<polygon points="${n*0.1},${n*0.3} ${n*0.05},${n*0.5} ${n*0.15},${n*0.5}" fill="${b}"/>
|
|
2432
|
+
<polygon points="${n*0.9},${n*0.3} ${n*0.85},${n*0.5} ${n*0.95},${n*0.5}" fill="${b}"/>
|
|
2183
2433
|
</svg>
|
|
2184
|
-
`;return`data:image/svg+xml,${encodeURIComponent(
|
|
2434
|
+
`;return`data:image/svg+xml,${encodeURIComponent(r.trim())}`}function sn({primaryColor:t="#FFFFFF",accentColor:n="#00A86B",backgroundColor:a="#1a1a2e",size:o=50}={}){let l=`
|
|
2185
2435
|
<svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}">
|
|
2186
|
-
<rect width="${o}" height="${o}" fill="${
|
|
2436
|
+
<rect width="${o}" height="${o}" fill="${a}"/>
|
|
2187
2437
|
<!-- Horizontal bands -->
|
|
2188
2438
|
<rect x="0" y="${o*0.2}" width="${o}" height="${o*0.1}" fill="${t}"/>
|
|
2189
2439
|
<rect x="0" y="${o*0.7}" width="${o}" height="${o*0.1}" fill="${t}"/>
|
|
@@ -2199,54 +2449,54 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
2199
2449
|
<polygon points="0,${o} ${o*0.15},${o} 0,${o*0.85}" fill="${n}"/>
|
|
2200
2450
|
<polygon points="${o},${o} ${o*0.85},${o} ${o},${o*0.85}" fill="${n}"/>
|
|
2201
2451
|
</svg>
|
|
2202
|
-
`;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function
|
|
2452
|
+
`;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function Wb(t,n){t.style.backgroundImage=`url("${n}")`,t.style.backgroundRepeat="repeat"}function zn({primaryColor:t="#8B0000",secondaryColor:n="#000000",accentColor:a="#FFD700",backgroundColor:o="#F5F5DC",size:l=60}={}){let b=`
|
|
2203
2453
|
<svg xmlns="http://www.w3.org/2000/svg" width="${l}" height="${l}" viewBox="0 0 ${l} ${l}">
|
|
2204
2454
|
<rect width="${l}" height="${l}" fill="${o}"/>
|
|
2205
2455
|
<!-- Lozenge (Diamond) - universal protective symbol -->
|
|
2206
2456
|
<polygon points="${l*0.5},${l*0.1} ${l*0.9},${l*0.5} ${l*0.5},${l*0.9} ${l*0.1},${l*0.5}"
|
|
2207
2457
|
fill="${t}" stroke="${n}" stroke-width="2"/>
|
|
2208
2458
|
<!-- Inner geometric details -->
|
|
2209
|
-
<line x1="${l*0.5}" y1="${l*0.1}" x2="${l*0.5}" y2="${l*0.9}" stroke="${
|
|
2210
|
-
<line x1="${l*0.1}" y1="${l*0.5}" x2="${l*0.9}" y2="${l*0.5}" stroke="${
|
|
2459
|
+
<line x1="${l*0.5}" y1="${l*0.1}" x2="${l*0.5}" y2="${l*0.9}" stroke="${a}" stroke-width="2"/>
|
|
2460
|
+
<line x1="${l*0.1}" y1="${l*0.5}" x2="${l*0.9}" y2="${l*0.5}" stroke="${a}" stroke-width="2"/>
|
|
2211
2461
|
<!-- X symbols (Fibula/Cross) -->
|
|
2212
2462
|
<line x1="${l*0.4}" y1="${l*0.4}" x2="${l*0.6}" y2="${l*0.6}" stroke="${n}" stroke-width="2"/>
|
|
2213
2463
|
<line x1="${l*0.6}" y1="${l*0.4}" x2="${l*0.4}" y2="${l*0.6}" stroke="${n}" stroke-width="2"/>
|
|
2214
2464
|
</svg>
|
|
2215
|
-
`;return`data:image/svg+xml,${encodeURIComponent(
|
|
2465
|
+
`;return`data:image/svg+xml,${encodeURIComponent(b.trim())}`}function to({primaryColor:t="#4B0082",secondaryColor:n="#8A2BE2",accentColor:a="#FFFFFF",size:o=50}={}){let l=`
|
|
2216
2466
|
<svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}">
|
|
2217
2467
|
<rect width="${o}" height="${o}" fill="${t}"/>
|
|
2218
2468
|
<!-- Resist circles (Oniko) -->
|
|
2219
2469
|
<circle cx="${o*0.5}" cy="${o*0.5}" r="${o*0.35}" fill="none" stroke="${n}" stroke-width="3"/>
|
|
2220
|
-
<circle cx="${o*0.5}" cy="${o*0.5}" r="${o*0.25}" fill="none" stroke="${
|
|
2221
|
-
<circle cx="${o*0.5}" cy="${o*0.5}" r="${o*0.1}" fill="${
|
|
2470
|
+
<circle cx="${o*0.5}" cy="${o*0.5}" r="${o*0.25}" fill="none" stroke="${a}" stroke-width="2" stroke-dasharray="4 2"/>
|
|
2471
|
+
<circle cx="${o*0.5}" cy="${o*0.5}" r="${o*0.1}" fill="${a}" opacity="0.8"/>
|
|
2222
2472
|
<!-- Corner ripples -->
|
|
2223
2473
|
<path d="M0,0 Q${o*0.2},0 ${o*0.2},${o*0.2} Q0,${o*0.2} 0,0" fill="${n}"/>
|
|
2224
2474
|
<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}"/>
|
|
2225
2475
|
</svg>
|
|
2226
|
-
`;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function
|
|
2476
|
+
`;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function Ub({primaryColor:t="#2D3D6B",secondaryColor:n="#6B8CC7",accentColor:a="#FFFFFF",size:o=60}={}){let l=`
|
|
2227
2477
|
<svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}">
|
|
2228
2478
|
<rect width="${o}" height="${o}" fill="${t}"/>
|
|
2229
2479
|
<!-- Southern Cross / Tuareg Star -->
|
|
2230
2480
|
<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"
|
|
2231
|
-
fill="none" stroke="${
|
|
2481
|
+
fill="none" stroke="${a}" stroke-width="2"/>
|
|
2232
2482
|
<circle cx="${o*0.5}" cy="${o*0.5}" r="${o*0.1}" fill="${n}"/>
|
|
2233
2483
|
</svg>
|
|
2234
|
-
`;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function
|
|
2235
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="${
|
|
2236
|
-
<rect width="${
|
|
2237
|
-
<path d="M${
|
|
2484
|
+
`;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function Vb({inkColor:t="#3A2E2C",parchmentColor:n="#F4E4BC",size:a=50}={}){let o=`
|
|
2485
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="${a}" height="${a}" viewBox="0 0 ${a} ${a}">
|
|
2486
|
+
<rect width="${a}" height="${a}" fill="${n}"/>
|
|
2487
|
+
<path d="M${a*0.2} ${a*0.2} L${a*0.4} ${a*0.2} M${a*0.3} ${a*0.2} L${a*0.3} ${a*0.5} Q${a*0.4} ${a*0.6} ${a*0.2} ${a*0.7}"
|
|
2238
2488
|
fill="none" stroke="${t}" stroke-width="3" stroke-linecap="round"/>
|
|
2239
|
-
<path d="M${
|
|
2489
|
+
<path d="M${a*0.6} ${a*0.3} C${a*0.8} ${a*0.3} ${a*0.8} ${a*0.6} ${a*0.6} ${a*0.6} L${a*0.8} ${a*0.8}"
|
|
2240
2490
|
fill="none" stroke="${t}" stroke-width="3" stroke-linecap="round"/>
|
|
2241
2491
|
</svg>
|
|
2242
|
-
`;return`data:image/svg+xml,${encodeURIComponent(o.trim())}`}function
|
|
2492
|
+
`;return`data:image/svg+xml,${encodeURIComponent(o.trim())}`}function jb({clayColor:t="#4E342E",earthColor:n="#3E2723",accentColor:a="#BCAAA4",size:o=60}={}){let l=`
|
|
2243
2493
|
<svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}">
|
|
2244
2494
|
<rect width="${o}" height="${o}" fill="${n}"/>
|
|
2245
2495
|
<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}"
|
|
2246
|
-
fill="${t}" stroke="${
|
|
2496
|
+
fill="${t}" stroke="${a}" stroke-width="2"/>
|
|
2247
2497
|
</svg>
|
|
2248
|
-
`;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function
|
|
2249
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="${
|
|
2498
|
+
`;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function La({primaryColor:t="#334155",secondaryColor:n="#1e293b",size:a=100}={}){let o=`
|
|
2499
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="${a}" height="${a}" viewBox="0 0 100 100">
|
|
2250
2500
|
<rect width="100" height="100" fill="${n}"/>
|
|
2251
2501
|
<path d="M10 10 H90 V90 H10 Z" fill="none" stroke="${t}" stroke-width="0.5" opacity="0.3"/>
|
|
2252
2502
|
<path d="M20 20 V50 H50 V80 H80" fill="none" stroke="${t}" stroke-width="1"/>
|
|
@@ -2254,7 +2504,7 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
2254
2504
|
<circle cx="80" cy="80" r="2" fill="${t}"/>
|
|
2255
2505
|
<circle cx="50" cy="50" r="1.5" fill="${t}"/>
|
|
2256
2506
|
</svg>
|
|
2257
|
-
`;return`data:image/svg+xml,${encodeURIComponent(o.trim())}`}var
|
|
2507
|
+
`;return`data:image/svg+xml,${encodeURIComponent(o.trim())}`}var no;var vn=A(()=>{no={generatePolygon:Rb,generateShuka:Dn,generateHadzabe:On,generateKanga:Fb,generateKangaBorder:Wn,generateKitenge:Un,generateMasaiShield:Db,generateTibeb:Cn,generateImigongo:Pn,generateKente:Vn,generateAdinkra:jn,generateAsoOke:en,generateAnkara:Nn,generateBogolan:Kn,generateAdire:to,generateKuba:In,generateKubaBorder:ub,generateBerber:zn,generateNdebele:Tn,generateNdebelePaint:Ob,generateZulu:yn,generateZuluBeads:Bb,generateSwazi:Zn,generateXhosa:sn,applyPattern:Wb,generateTuareg:Ub,generateGeez:Vb,generateBoli:jb,generateCircuit:La,circuit:La}});var Xa={};H(Xa,{default:()=>Nb,KangaCard:()=>wn});var wn,Nb;var Qa=A(()=>{q();vn();wn=class wn extends c{static get observedAttributes(){return["theme","proverb","proverb-translation"]}constructor(){super();this.render()}connectedCallback(){this.loadStyles(),this.applyTheme()}attributeChangedCallback(t,n,a){if(n!==a)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 a=generateKangaBorder({primaryColor:t.primary,accentColor:t.accent});n.style.backgroundImage=`url("${a}")`,n.style.backgroundRepeat="repeat"}}render(){let t=this.getAttribute("proverb")||"",n=this.getAttribute("proverb-translation")||"",a=this.getThemeColors();this.shadowRoot.innerHTML=`
|
|
2258
2508
|
<style>
|
|
2259
2509
|
:host {
|
|
2260
2510
|
display: block;
|
|
@@ -2277,7 +2527,7 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
2277
2527
|
/* Pindo - Decorative Border */
|
|
2278
2528
|
.pindo {
|
|
2279
2529
|
padding: var(--space-13, 13px);
|
|
2280
|
-
background-color: ${
|
|
2530
|
+
background-color: ${a.primary};
|
|
2281
2531
|
}
|
|
2282
2532
|
|
|
2283
2533
|
/* Mji - Central Content Area */
|
|
@@ -2289,8 +2539,8 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
2289
2539
|
|
|
2290
2540
|
/* Jina - Proverb Inscription */
|
|
2291
2541
|
.jina {
|
|
2292
|
-
background-color: ${
|
|
2293
|
-
color: ${
|
|
2542
|
+
background-color: ${a.border};
|
|
2543
|
+
color: ${a.text};
|
|
2294
2544
|
padding: var(--space-8, 8px) var(--space-13, 13px);
|
|
2295
2545
|
text-align: center;
|
|
2296
2546
|
font-style: italic;
|
|
@@ -2317,7 +2567,7 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
2317
2567
|
}
|
|
2318
2568
|
|
|
2319
2569
|
::slotted(h1), ::slotted(h2), ::slotted(h3) {
|
|
2320
|
-
color: ${
|
|
2570
|
+
color: ${a.primary};
|
|
2321
2571
|
margin-bottom: var(--space-8, 8px);
|
|
2322
2572
|
}
|
|
2323
2573
|
</style>
|
|
@@ -2336,7 +2586,7 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
2336
2586
|
</div>
|
|
2337
2587
|
`:'<div class="jina"><slot name="proverb"></slot></div>'}
|
|
2338
2588
|
</article>
|
|
2339
|
-
`,this.applyTheme()}};
|
|
2589
|
+
`,this.applyTheme()}};d("af-kanga-card",wn);Nb=wn});var Ja={};H(Ja,{default:()=>Kb,CulturalCard:()=>dn});var dn,Kb;var Ga=A(()=>{q();vn();dn=class dn extends c{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"),a=this._cultures[t]||this._cultures.maasai,o=no[a.pattern],l=o?o():"";this.shadowRoot.innerHTML=`
|
|
2340
2590
|
<style>
|
|
2341
2591
|
:host {
|
|
2342
2592
|
display: block;
|
|
@@ -2378,7 +2628,7 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
2378
2628
|
position: absolute;
|
|
2379
2629
|
bottom: 10px;
|
|
2380
2630
|
left: 10px;
|
|
2381
|
-
background: ${
|
|
2631
|
+
background: ${a.colors.primary};
|
|
2382
2632
|
color: white;
|
|
2383
2633
|
padding: 4px 12px;
|
|
2384
2634
|
border-radius: 20px;
|
|
@@ -2413,7 +2663,7 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
2413
2663
|
.card-title h3 {
|
|
2414
2664
|
margin: 0;
|
|
2415
2665
|
font-size: 18px;
|
|
2416
|
-
color: ${
|
|
2666
|
+
color: ${a.colors.primary};
|
|
2417
2667
|
}
|
|
2418
2668
|
|
|
2419
2669
|
.culture-icon {
|
|
@@ -2422,7 +2672,7 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
2422
2672
|
border-radius: 50%;
|
|
2423
2673
|
background-image: url("${l}");
|
|
2424
2674
|
background-size: cover;
|
|
2425
|
-
border: 2px solid ${
|
|
2675
|
+
border: 2px solid ${a.colors.accent};
|
|
2426
2676
|
}
|
|
2427
2677
|
|
|
2428
2678
|
.card-content {
|
|
@@ -2434,7 +2684,7 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
2434
2684
|
width: 100%;
|
|
2435
2685
|
padding: 10px;
|
|
2436
2686
|
margin-top: 15px;
|
|
2437
|
-
border: 2px solid ${
|
|
2687
|
+
border: 2px solid ${a.colors.primary};
|
|
2438
2688
|
border-radius: 6px;
|
|
2439
2689
|
font-family: inherit;
|
|
2440
2690
|
font-size: 14px;
|
|
@@ -2444,7 +2694,7 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
2444
2694
|
|
|
2445
2695
|
.culture-selector:focus {
|
|
2446
2696
|
outline: none;
|
|
2447
|
-
box-shadow: 0 0 0 3px ${
|
|
2697
|
+
box-shadow: 0 0 0 3px ${a.colors.primary}30;
|
|
2448
2698
|
}
|
|
2449
2699
|
|
|
2450
2700
|
select option {
|
|
@@ -2460,13 +2710,13 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
2460
2710
|
<article class="cultural-card">
|
|
2461
2711
|
<div class="pattern-header">
|
|
2462
2712
|
<div class="pattern-overlay"></div>
|
|
2463
|
-
<span class="culture-badge">${
|
|
2464
|
-
<span class="region-badge">\uD83D\uDCCD ${
|
|
2713
|
+
<span class="culture-badge">${a.name}</span>
|
|
2714
|
+
<span class="region-badge">\uD83D\uDCCD ${a.region}</span>
|
|
2465
2715
|
</div>
|
|
2466
2716
|
<div class="card-body">
|
|
2467
2717
|
<div class="card-title">
|
|
2468
2718
|
<div class="culture-icon"></div>
|
|
2469
|
-
<h3>${
|
|
2719
|
+
<h3>${a.name} Pattern</h3>
|
|
2470
2720
|
</div>
|
|
2471
2721
|
<div class="card-content">
|
|
2472
2722
|
<slot></slot>
|
|
@@ -2501,7 +2751,7 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
2501
2751
|
`:""}
|
|
2502
2752
|
</div>
|
|
2503
2753
|
</article>
|
|
2504
|
-
`}};
|
|
2754
|
+
`}};d("af-cultural-card",dn);Kb=dn});var Ra={};H(Ra,{default:()=>Ib,PatternShowcase:()=>_n});var _n,Ib;var Fa=A(()=>{q();vn();_n=class _n extends c{static get observedAttributes(){return["region","size"]}constructor(){super();this._allPatterns=[{key:"shuka",name:"Maasai Shuka",region:"east",country:"Tanzania/Kenya",fn:Dn,meaning:"Bravery, Unity, Identity"},{key:"hadzabe",name:"Hadzabe",region:"east",country:"Tanzania",fn:On,meaning:"Ancient traditions, Hunter-gatherer heritage"},{key:"kanga",name:"Kanga",region:"east",country:"Tanzania/Kenya",fn:Wn,meaning:"Communication, Proverbs, Femininity"},{key:"kitenge",name:"Kitenge",region:"east",country:"East Africa",fn:Un,meaning:"Celebration, African identity"},{key:"tibeb",name:"Tibeb",region:"east",country:"Ethiopia",fn:Cn,meaning:"Faith, Tradition, Celebration"},{key:"kente",name:"Kente",region:"west",country:"Ghana",fn:Vn,meaning:"Royalty, Wisdom, Celebration"},{key:"adinkra",name:"Adinkra",region:"west",country:"Ghana",fn:jn,meaning:"Philosophy, Proverbs, Wisdom"},{key:"bogolan",name:"Bogolan",region:"west",country:"Mali",fn:Kn,meaning:"Earth energy, Protection, Healing"},{key:"asooke",name:"Aso-Oke",region:"west",country:"Nigeria",fn:en,meaning:"Prestige, Celebration, Heritage"},{key:"adire",name:"Adire (Indigo)",region:"west",country:"Nigeria",fn:to,meaning:"Creativity, Uniqueness, Depth"},{key:"ankara",name:"Ankara",region:"west",country:"West Africa",fn:Nn,meaning:"Boldness, Pan-African pride"},{key:"kuba",name:"Kuba Shoowa",region:"central",country:"DRC",fn:In,meaning:"Status, Mathematics, Eternity"},{key:"imigongo",name:"Imigongo",region:"central",country:"Rwanda",fn:Pn,meaning:"Resilience, Strength, Artistry"},{key:"berber",name:"Berber",region:"north",country:"North Africa",fn:zn,meaning:"Protection, Nature, Identity"},{key:"ndebele",name:"Ndebele",region:"south",country:"South Africa",fn:Tn,meaning:"Artistry, Marriage, Status"},{key:"zulu",name:"Zulu Beadwork",region:"south",country:"South Africa",fn:yn,meaning:"Love letters, Community"},{key:"swazi",name:"Swazi",region:"south",country:"Eswatini",fn:Zn,meaning:"Monarchy, Warriors, Pride"},{key:"xhosa",name:"Xhosa",region:"south",country:"South Africa",fn:sn,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,a=this._allPatterns.find((o)=>o.key===n);if(a)this.emit("af-pattern-select",{pattern:a})})})}attributeChangedCallback(){this.render(),this._setupHovers()}render(){let t=this.getAttribute("region")||"all",n=this.getAttribute("size")||"md",a=t==="all"?this._allPatterns:this._allPatterns.filter((b)=>b.region===t),o={sm:80,md:120,lg:160},l=o[n]||o.md;this.shadowRoot.innerHTML=`
|
|
2505
2755
|
<style>
|
|
2506
2756
|
:host {
|
|
2507
2757
|
display: block;
|
|
@@ -2621,20 +2871,20 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
2621
2871
|
</div>
|
|
2622
2872
|
|
|
2623
2873
|
<div class="pattern-grid">
|
|
2624
|
-
${
|
|
2625
|
-
<div class="pattern-item" data-key="${
|
|
2626
|
-
<div class="pattern-preview" style="background-image: url('${
|
|
2874
|
+
${a.map((b)=>`
|
|
2875
|
+
<div class="pattern-item" data-key="${b.key}">
|
|
2876
|
+
<div class="pattern-preview" style="background-image: url('${b.fn()}')"></div>
|
|
2627
2877
|
<div class="pattern-info">
|
|
2628
|
-
<span class="region-label region-${
|
|
2629
|
-
<div class="pattern-name">${
|
|
2630
|
-
<div class="pattern-country">${
|
|
2631
|
-
<div class="pattern-meaning">${
|
|
2878
|
+
<span class="region-label region-${b.region}">${b.region.charAt(0).toUpperCase()+b.region.slice(1)}</span>
|
|
2879
|
+
<div class="pattern-name">${b.name}</div>
|
|
2880
|
+
<div class="pattern-country">${b.country}</div>
|
|
2881
|
+
<div class="pattern-meaning">${b.meaning}</div>
|
|
2632
2882
|
</div>
|
|
2633
2883
|
</div>
|
|
2634
2884
|
`).join("")}
|
|
2635
2885
|
</div>
|
|
2636
2886
|
</div>
|
|
2637
|
-
`,this.shadowRoot.querySelectorAll(".region-tab").forEach((
|
|
2887
|
+
`,this.shadowRoot.querySelectorAll(".region-tab").forEach((b)=>{b.addEventListener("click",()=>{this.setAttribute("region",b.dataset.region)})})}};d("af-pattern-showcase",_n);Ib=_n});var ua={};H(ua,{AfriLanguageSwitcher:()=>oo});var oo;var Ba=A(()=>{q();oo=class oo extends c{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",a=t.find((o)=>o.code===n)||t[0];this.shadowRoot.innerHTML=Y`
|
|
2638
2888
|
<style>
|
|
2639
2889
|
:host { display: inline-block; position: relative; font-family: var(--font-body); }
|
|
2640
2890
|
.switcher-btn {
|
|
@@ -2675,17 +2925,17 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
2675
2925
|
|
|
2676
2926
|
<button class="switcher-btn">
|
|
2677
2927
|
<span>🌍</span>
|
|
2678
|
-
<span>${
|
|
2928
|
+
<span>${a.name}</span>
|
|
2679
2929
|
</button>
|
|
2680
2930
|
|
|
2681
2931
|
<div class="dropdown">
|
|
2682
|
-
${t.map((o)=>
|
|
2932
|
+
${t.map((o)=>Y`
|
|
2683
2933
|
<div class="lang-option" data-code="${o.code}" dir="${o.dir||"ltr"}">
|
|
2684
2934
|
${o.name}
|
|
2685
2935
|
</div>
|
|
2686
2936
|
`)}
|
|
2687
2937
|
</div>
|
|
2688
|
-
`,this.shadowRoot.querySelector(".switcher-btn").onclick=()=>{this.toggleAttribute("open")},this.shadowRoot.querySelectorAll(".lang-option").forEach((o)=>{o.onclick=()=>{let l=o.dataset.code;if(this.setAttribute("current",l),this.removeAttribute("open"),this.emit("lang-change",{code:l}),l==="ar")document.documentElement.dir="rtl";else document.documentElement.dir="ltr"}})}connectedCallback(){this.render()}attributeChangedCallback(){this.render()}};
|
|
2938
|
+
`,this.shadowRoot.querySelector(".switcher-btn").onclick=()=>{this.toggleAttribute("open")},this.shadowRoot.querySelectorAll(".lang-option").forEach((o)=>{o.onclick=()=>{let l=o.dataset.code;if(this.setAttribute("current",l),this.removeAttribute("open"),this.emit("lang-change",{code:l}),l==="ar")document.documentElement.dir="rtl";else document.documentElement.dir="ltr"}})}connectedCallback(){this.render()}attributeChangedCallback(){this.render()}};d("af-language-switcher",oo)});var Da={};H(Da,{AfriAuth:()=>ao});var ao;var Oa=A(()=>{q();ao=class ao extends c{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",(a)=>{a.preventDefault(),this.mode=this.mode==="login"?"register":"login",this.render(),this.setupEvents()});if(t)t.addEventListener("submit",async(a)=>{a.preventDefault();let o=this.shadowRoot.querySelector("#email").value,l=this.shadowRoot.querySelector("#password").value,b=this.shadowRoot.querySelector(".feedback");b.textContent="Processing...";try{let h=await(await fetch("/api/auth",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:this.mode,email:o,password:l})})).json();if(h.error)b.textContent=h.error,b.style.color="#ef4444";else b.textContent="Success! Redirecting...",b.style.color="#22c55e",setTimeout(()=>window.location.href="/",1000)}catch(r){b.textContent="Network Error"}})}render(){let t=this.mode==="login";this.shadowRoot.innerHTML=`
|
|
2689
2939
|
<style>
|
|
2690
2940
|
:host {
|
|
2691
2941
|
display: block;
|
|
@@ -2783,7 +3033,7 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
2783
3033
|
<span class="toggle-mode">${t?"Create an account":"Sign in"}</span>
|
|
2784
3034
|
</div>
|
|
2785
3035
|
</div>
|
|
2786
|
-
`}};
|
|
3036
|
+
`}};d("af-auth",ao)});var Wa={};H(Wa,{default:()=>Pb});var lo,Pb;var Ua=A(()=>{q();lo=class lo extends c{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=Y`
|
|
2787
3037
|
<style>
|
|
2788
3038
|
.toggle-btn {
|
|
2789
3039
|
background: var(--bg-surface-elevated, var(--afri-obsidian));
|
|
@@ -2812,7 +3062,7 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
2812
3062
|
<span class="icon">\${isDark ? '🌙' : '☀️'}</span>
|
|
2813
3063
|
<span>\${isDark ? 'Dark Mode' : 'Light Mode'}</span>
|
|
2814
3064
|
</button>
|
|
2815
|
-
`;let n=this.shadowRoot.querySelector(".toggle-btn");if(n)n.addEventListener("click",()=>this.toggleTheme())}};
|
|
3065
|
+
`;let n=this.shadowRoot.querySelector(".toggle-btn");if(n)n.addEventListener("click",()=>this.toggleTheme())}};d("af-theme-toggle",lo);Pb=lo});q();q();class kn extends c{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.",a={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=a[t]||a.tanzania;if(this._hasError){this.shadowRoot.innerHTML=`
|
|
2816
3066
|
<style>
|
|
2817
3067
|
:host { display: block; width: 100%; font-family: 'Inter', system-ui, sans-serif; }
|
|
2818
3068
|
.boundary-error {
|
|
@@ -2883,6 +3133,6 @@ var Q0=Object.defineProperty;var J0=(t)=>t;function G0(t,n){this[t]=J0.bind(null
|
|
|
2883
3133
|
`,this.shadowRoot.getElementById("retry-btn").addEventListener("click",()=>{this.reset()});return}this.shadowRoot.innerHTML=`
|
|
2884
3134
|
<style>:host { display: block; }</style>
|
|
2885
3135
|
<slot></slot>
|
|
2886
|
-
`}}
|
|
3136
|
+
`}}d("af-error-boundary",kn);qn();pn();Hn();En();Mn();var Cb={"af-button":()=>Promise.resolve().then(() => (wo(),vo)),"af-card":()=>Promise.resolve().then(() => (io(),_o)),"af-navbar":()=>Promise.resolve().then(() => (ko(),xo)),"af-input":()=>Promise.resolve().then(() => (Wo(),Oo)),"af-alert":()=>Promise.resolve().then(() => (Vo(),Uo)),"af-grid":()=>Promise.resolve().then(() => (eo(),jo)),"af-section":()=>Promise.resolve().then(() => (Ko(),No)),"af-icon":()=>Promise.resolve().then(() => (Po(),Io)),"af-ui-button":()=>Promise.resolve().then(() => (qn(),ho)),"af-ui-card":()=>Promise.resolve().then(() => (pn(),fo)),"af-ui-input":()=>Promise.resolve().then(() => (Hn(),go)),"af-ui-badge":()=>Promise.resolve().then(() => (En(),co)),"af-ui-switch":()=>Promise.resolve().then(() => (Mn(),$o)),"af-accordion":()=>Promise.resolve().then(() => (To(),Co)),"af-hero":()=>Promise.resolve().then(() => (Zo(),yo)),"af-table":()=>Promise.resolve().then(() => (zo(),so)),"af-modal":()=>Promise.resolve().then(() => (na(),ta)),"af-tabs":()=>Promise.resolve().then(() => (aa(),oa)),"af-sidebar":()=>Promise.resolve().then(() => (ba(),la)),"af-dropdown":()=>Promise.resolve().then(() => (ha(),ra)),"af-select":()=>Promise.resolve().then(() => (ga(),fa)),"af-form":()=>Promise.resolve().then(() => ($a(),ca)),"af-tooltip":()=>Promise.resolve().then(() => (wa(),va)),"af-toast":()=>Promise.resolve().then(() => (_a(),da)),"af-badge":()=>Promise.resolve().then(() => (Aa(),ia)),"af-avatar":()=>Promise.resolve().then(() => (xa(),ma)),"af-progress":()=>Promise.resolve().then(() => (qa(),ka)),"af-loader":()=>Promise.resolve().then(() => (Ha(),pa)),"af-skeleton":()=>Promise.resolve().then(() => (Ma(),Ea)),"af-divider":()=>Promise.resolve().then(() => (Sa(),Ya)),"af-kanga-card":()=>Promise.resolve().then(() => (Qa(),Xa)),"af-cultural-card":()=>Promise.resolve().then(() => (Ga(),Ja)),"af-pattern-showcase":()=>Promise.resolve().then(() => (Fa(),Ra)),"af-language-switcher":()=>Promise.resolve().then(() => (Ba(),ua)),"af-auth":()=>Promise.resolve().then(() => (Oa(),Da)),"af-theme-toggle":()=>Promise.resolve().then(() => (Ua(),Wa))},j0=Cb;export{j0 as default,Cb as componentMap,qt as AfriUISwitch,xt as AfriUIInput,mt as AfriUICard,At as AfriUIButton,kt as AfriUIBadge,kn as AfriErrorBoundary,c as AfriCodeComponent};
|
|
2887
3137
|
|
|
2888
|
-
//# debugId=
|
|
3138
|
+
//# debugId=0BB2E5F17B5C61C964756E2164756E21
|