@africode/core 5.0.6 → 5.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/AGENTS.md +2 -0
  2. package/COMPONENT_SCHEMA.json +1 -0
  3. package/README.md +2 -0
  4. package/components/breadcrumb.js +72 -0
  5. package/components/carousel.js +32 -0
  6. package/components/cart-drawer.js +28 -0
  7. package/components/code-block.js +20 -0
  8. package/components/contact-form.js +25 -0
  9. package/components/cookie-consent.js +23 -0
  10. package/components/cta-banner.js +38 -0
  11. package/components/dashboard-activity-list.js +103 -0
  12. package/components/dashboard-card.js +85 -0
  13. package/components/dashboard-metric.js +81 -0
  14. package/components/dashboard-shell.js +85 -0
  15. package/components/dashboard-topbar.js +84 -0
  16. package/components/faq-accordion.js +23 -0
  17. package/components/feature-grid.js +85 -0
  18. package/components/file-uploader.js +22 -0
  19. package/components/filter-bar.js +19 -0
  20. package/components/footer.js +113 -0
  21. package/components/gallery.js +22 -0
  22. package/components/index.js +47 -0
  23. package/components/newsletter-signup.js +24 -0
  24. package/components/pagination.js +31 -0
  25. package/components/pricing-card.js +100 -0
  26. package/components/product-card.js +41 -0
  27. package/components/search-box.js +24 -0
  28. package/components/simple-chart.js +22 -0
  29. package/components/stepper.js +28 -0
  30. package/components/team-grid.js +23 -0
  31. package/components/testimonial.js +94 -0
  32. package/components/ui-avatar.js +79 -0
  33. package/components/ui-chip.js +87 -0
  34. package/components/ui-popover.js +84 -0
  35. package/components/ui-progress-ring.js +60 -0
  36. package/components/ui-select.js +85 -0
  37. package/components/ui-stat.js +75 -0
  38. package/components/ui-table.js +69 -0
  39. package/components/ui-tabs.js +99 -0
  40. package/components/ui-tag.js +64 -0
  41. package/components/ui-textarea.js +84 -0
  42. package/components/ui-tooltip.js +66 -0
  43. package/components/video-player.js +22 -0
  44. package/dist/africode.js +1480 -549
  45. package/dist/africode.js.map +25 -4
  46. package/dist/build-info.json +3 -3
  47. package/dist/components.js +1506 -575
  48. package/dist/components.js.map +25 -4
  49. package/package.json +1 -1
package/dist/africode.js CHANGED
@@ -1,353 +1,353 @@
1
- var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null,n)}var i=(t,n)=>{for(var b in n)Rb(t,b,{get:n[b],enumerable:!0,configurable:!0,set:Db.bind(n,b)})};var x=(t,n)=>()=>(t&&(n=t(t=0)),n);function $t(t){if(jt.has(t))return jt.get(t);let b=new Proxy(t,{get(o,l,a){let h=Reflect.get(o,l,a);if(h!==null&&typeof h==="object")return $t(h);return h},set(o,l,a,h){let f=Reflect.get(o,l,h);if(f!==a){let r=Reflect.set(o,l,a,h);if(r)On(h,a,f,l);return r}return!0},deleteProperty(o,l){let a=Reflect.get(o,l),h=Reflect.deleteProperty(o,l);if(h){let f=jt.get(o);On(f,void 0,a,l)}return h}});return jt.set(t,b),b}function y(t,n){if(!It.has(t))It.set(t,new Set);let b=It.get(t);return b.add(n),()=>{b.delete(n)}}function On(t,n,b,o){let l=It.get(t);if(!l)return;l.forEach((a)=>{try{a(n,b,o)}catch(h){console.error("[AfriCode State] Subscriber error:",h)}})}class Do{constructor(){this.store={}}get(t){return t.split("/").reduce((n,b)=>n?.[b],this.store)}set(t,n){let b=t.split("/"),o=this.store;while(b.length>1){let l=b.shift();if(!o[l]||typeof o[l]!=="object")o[l]={};o=o[l]}o[b[0]]=n}getAll(){return this.store}}function Wn(t){let n=t,b=new Set,o=()=>{return n},l=(a)=>{if(n!==a)n=typeof a==="function"?a(n):a,b.forEach((h)=>h()),On()};return o.subscribe=(a)=>{return b.add(a),()=>b.delete(a)},[o,l]}function mn(t){return t(),y(t)}var It,jt,ja;var bt=x(()=>{It=new WeakMap,jt=new WeakMap;ja=new Do});var Eb,D,Eo;var Qt=x(()=>{bt();Eb={theme:"light",language:"en",ui:{sidebarCollapsed:!1,theme:"dark",activePage:"home"},user:{name:"Guest",permissions:[]},config:{animationsEnabled:!0,soundEnabled:!1}},D=$t(Eb),Eo={setTheme(t){if(["dark","light","system"].includes(t))D.theme=t,D.ui.theme=t},setLanguage(t){D.language=t},toggleSidebar(t){if(typeof t==="boolean")D.ui.sidebarCollapsed=t;else D.ui.sidebarCollapsed=!D.ui.sidebarCollapsed},setActivePage(t){D.ui.activePage=t}}});function Ob(t,n,b=50,o=50){let l=[];for(let a=0;a<t;a++){let h=2*Math.PI*a/t-Math.PI/2,f=b+n*Math.cos(h),r=o+n*Math.sin(h);l.push(`${f.toFixed(2)},${r.toFixed(2)}`)}return l.join(" ")}function pn({primaryColor:t="#FF0000",secondaryColor:n="#000000",backgroundColor:b="#8B0000",stripeWidth:o=4,size:l=40}={}){let a=`
2
- <svg xmlns="http://www.w3.org/2000/svg" width="${l}" height="${l}" viewBox="0 0 ${l} ${l}">
3
- <rect width="${l}" height="${l}" fill="${b}"/>
4
- <rect x="0" y="0" width="${l}" height="${o}" fill="${t}" opacity="0.8"/>
5
- <rect x="0" y="${l/2-o/2}" width="${l}" height="${o}" fill="${n}" opacity="0.6"/>
6
- <rect x="0" y="${l-o}" width="${l}" height="${o}" fill="${t}" opacity="0.8"/>
7
- <rect x="0" y="0" width="${o}" height="${l}" fill="${t}" opacity="0.5"/>
8
- <rect x="${l/2-o/2}" y="0" width="${o}" height="${l}" fill="${n}" opacity="0.4"/>
9
- <rect x="${l-o}" y="0" width="${o}" height="${l}" fill="${t}" opacity="0.5"/>
1
+ var Wl=Object.defineProperty;var Ul=(t)=>t;function Vl(t,n){this[t]=Ul.bind(null,n)}var s=(t,n)=>{for(var o in n)Wl(t,o,{get:n[o],enumerable:!0,configurable:!0,set:Vl.bind(n,o)})};var m=(t,n)=>()=>(t&&(n=t(t=0)),n);function ft(t){if(dn.has(t))return dn.get(t);let o=new Proxy(t,{get(r,a,l){let b=Reflect.get(r,a,l);if(b!==null&&typeof b==="object")return ft(b);return b},set(r,a,l,b){let e=Reflect.get(r,a,b);if(e!==l){let i=Reflect.set(r,a,l,b);if(i)oo(b,l,e,a);return i}return!0},deleteProperty(r,a){let l=Reflect.get(r,a),b=Reflect.deleteProperty(r,a);if(b){let e=dn.get(r);oo(e,void 0,l,a)}return b}});return dn.set(t,o),o}function I(t,n){if(!gn.has(t))gn.set(t,new Set);let o=gn.get(t);return o.add(n),()=>{o.delete(n)}}function oo(t,n,o,r){let a=gn.get(t);if(!a)return;a.forEach((l)=>{try{l(n,o,r)}catch(b){console.error("[AfriCode State] Subscriber error:",b)}})}class Ar{constructor(){this.store={}}get(t){return t.split("/").reduce((n,o)=>n?.[o],this.store)}set(t,n){let o=t.split("/"),r=this.store;while(o.length>1){let a=o.shift();if(!r[a]||typeof r[a]!=="object")r[a]={};r=r[a]}r[o[0]]=n}getAll(){return this.store}}function ro(t){let n=t,o=new Set,r=()=>{return n},a=(l)=>{if(n!==l)n=typeof l==="function"?l(n):l,o.forEach((b)=>b()),oo()};return r.subscribe=(l)=>{return o.add(l),()=>o.delete(l)},[r,a]}function ao(t){return t(),I(t)}var gn,dn,xi;var rt=m(()=>{gn=new WeakMap,dn=new WeakMap;xi=new Ar});var Nl,Q,_r;var Ht=m(()=>{rt();Nl={theme:"light",language:"en",ui:{sidebarCollapsed:!1,theme:"dark",activePage:"home"},user:{name:"Guest",permissions:[]},config:{animationsEnabled:!0,soundEnabled:!1}},Q=ft(Nl),_r={setTheme(t){if(["dark","light","system"].includes(t))Q.theme=t,Q.ui.theme=t},setLanguage(t){Q.language=t},toggleSidebar(t){if(typeof t==="boolean")Q.ui.sidebarCollapsed=t;else Q.ui.sidebarCollapsed=!Q.ui.sidebarCollapsed},setActivePage(t){Q.ui.activePage=t}}});function Kl(t,n,o=50,r=50){let a=[];for(let l=0;l<t;l++){let b=2*Math.PI*l/t-Math.PI/2,e=o+n*Math.cos(b),i=r+n*Math.sin(b);a.push(`${e.toFixed(2)},${i.toFixed(2)}`)}return a.join(" ")}function lo({primaryColor:t="#FF0000",secondaryColor:n="#000000",backgroundColor:o="#8B0000",stripeWidth:r=4,size:a=40}={}){let l=`
2
+ <svg xmlns="http://www.w3.org/2000/svg" width="${a}" height="${a}" viewBox="0 0 ${a} ${a}">
3
+ <rect width="${a}" height="${a}" fill="${o}"/>
4
+ <rect x="0" y="0" width="${a}" height="${r}" fill="${t}" opacity="0.8"/>
5
+ <rect x="0" y="${a/2-r/2}" width="${a}" height="${r}" fill="${n}" opacity="0.6"/>
6
+ <rect x="0" y="${a-r}" width="${a}" height="${r}" fill="${t}" opacity="0.8"/>
7
+ <rect x="0" y="0" width="${r}" height="${a}" fill="${t}" opacity="0.5"/>
8
+ <rect x="${a/2-r/2}" y="0" width="${r}" height="${a}" fill="${n}" opacity="0.4"/>
9
+ <rect x="${a-r}" y="0" width="${r}" height="${a}" fill="${t}" opacity="0.5"/>
10
10
  </svg>
11
- `;return`data:image/svg+xml,${encodeURIComponent(a.trim())}`}function un({earthColor:t="#8B4513",ochreColor:n="#CD853F",charcoalColor:b="#2F2F2F",size:o=50}={}){let l=`
12
- <svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}">
13
- <rect width="${o}" height="${o}" fill="${t}"/>
11
+ `;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function bo({earthColor:t="#8B4513",ochreColor:n="#CD853F",charcoalColor:o="#2F2F2F",size:r=50}={}){let a=`
12
+ <svg xmlns="http://www.w3.org/2000/svg" width="${r}" height="${r}" viewBox="0 0 ${r} ${r}">
13
+ <rect width="${r}" height="${r}" fill="${t}"/>
14
14
  <!-- Cave art inspired figures -->
15
- <circle cx="${o*0.3}" cy="${o*0.3}" r="${o*0.08}" fill="${n}"/>
16
- <line x1="${o*0.3}" y1="${o*0.38}" x2="${o*0.3}" y2="${o*0.6}" stroke="${b}" stroke-width="2"/>
17
- <line x1="${o*0.2}" y1="${o*0.45}" x2="${o*0.4}" y2="${o*0.45}" stroke="${b}" stroke-width="2"/>
15
+ <circle cx="${r*0.3}" cy="${r*0.3}" r="${r*0.08}" fill="${n}"/>
16
+ <line x1="${r*0.3}" y1="${r*0.38}" x2="${r*0.3}" y2="${r*0.6}" stroke="${o}" stroke-width="2"/>
17
+ <line x1="${r*0.2}" y1="${r*0.45}" x2="${r*0.4}" y2="${r*0.45}" stroke="${o}" stroke-width="2"/>
18
18
  <!-- Animal figure -->
19
- <ellipse cx="${o*0.7}" cy="${o*0.5}" rx="${o*0.15}" ry="${o*0.08}" fill="${n}"/>
20
- <line x1="${o*0.6}" y1="${o*0.58}" x2="${o*0.6}" y2="${o*0.7}" stroke="${b}" stroke-width="2"/>
21
- <line x1="${o*0.8}" y1="${o*0.58}" x2="${o*0.8}" y2="${o*0.7}" stroke="${b}" stroke-width="2"/>
19
+ <ellipse cx="${r*0.7}" cy="${r*0.5}" rx="${r*0.15}" ry="${r*0.08}" fill="${n}"/>
20
+ <line x1="${r*0.6}" y1="${r*0.58}" x2="${r*0.6}" y2="${r*0.7}" stroke="${o}" stroke-width="2"/>
21
+ <line x1="${r*0.8}" y1="${r*0.58}" x2="${r*0.8}" y2="${r*0.7}" stroke="${o}" stroke-width="2"/>
22
22
  <!-- Dots like ancient markings -->
23
- <circle cx="${o*0.15}" cy="${o*0.8}" r="3" fill="${n}"/>
24
- <circle cx="${o*0.85}" cy="${o*0.2}" r="3" fill="${n}"/>
23
+ <circle cx="${r*0.15}" cy="${r*0.8}" r="3" fill="${n}"/>
24
+ <circle cx="${r*0.85}" cy="${r*0.2}" r="3" fill="${n}"/>
25
25
  </svg>
26
- `;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function Un({primaryColor:t="#1EB53A",accentColor:n="#FCD116",size:b=30}={}){let o=`
27
- <svg xmlns="http://www.w3.org/2000/svg" width="${b}" height="${b}" viewBox="0 0 ${b} ${b}">
28
- <rect width="${b}" height="${b}" fill="${t}"/>
26
+ `;return`data:image/svg+xml,${encodeURIComponent(a.trim())}`}function eo({primaryColor:t="#1EB53A",accentColor:n="#FCD116",size:o=30}={}){let r=`
27
+ <svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}">
28
+ <rect width="${o}" height="${o}" fill="${t}"/>
29
29
  <!-- Pindo (Border) Motifs: Cashew/Triangle -->
30
- <path d="M0,0 L${b/2},${b/2} L0,${b} Z" fill="${n}"/>
31
- <path d="M${b},0 L${b/2},${b/2} L${b},${b} Z" fill="${n}"/>
32
- <circle cx="${b/2}" cy="${b/2}" r="${b*0.15}" fill="none" stroke="${n}" stroke-width="2"/>
30
+ <path d="M0,0 L${o/2},${o/2} L0,${o} Z" fill="${n}"/>
31
+ <path d="M${o},0 L${o/2},${o/2} L${o},${o} Z" fill="${n}"/>
32
+ <circle cx="${o/2}" cy="${o/2}" r="${o*0.15}" fill="none" stroke="${n}" stroke-width="2"/>
33
33
  </svg>
34
- `;return`data:image/svg+xml,${encodeURIComponent(o.trim())}`}function Wb({primaryColor:t="#FF6B00",secondaryColor:n="#002B5C",backgroundColor:b="#FFFFFF",size:o=40}={}){let l=`
35
- <svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}">
36
- <rect width="${o}" height="${o}" fill="${b}"/>
34
+ `;return`data:image/svg+xml,${encodeURIComponent(r.trim())}`}function jl({primaryColor:t="#FF6B00",secondaryColor:n="#002B5C",backgroundColor:o="#FFFFFF",size:r=40}={}){let a=`
35
+ <svg xmlns="http://www.w3.org/2000/svg" width="${r}" height="${r}" viewBox="0 0 ${r} ${r}">
36
+ <rect width="${r}" height="${r}" fill="${o}"/>
37
37
  <!-- Border pattern -->
38
- <rect x="0" y="0" width="${o}" height="${o*0.1}" fill="${t}"/>
39
- <rect x="0" y="${o*0.9}" width="${o}" height="${o*0.1}" fill="${t}"/>
40
- <rect x="0" y="0" width="${o*0.1}" height="${o}" fill="${t}"/>
41
- <rect x="${o*0.9}" y="0" width="${o*0.1}" height="${o}" fill="${t}"/>
38
+ <rect x="0" y="0" width="${r}" height="${r*0.1}" fill="${t}"/>
39
+ <rect x="0" y="${r*0.9}" width="${r}" height="${r*0.1}" fill="${t}"/>
40
+ <rect x="0" y="0" width="${r*0.1}" height="${r}" fill="${t}"/>
41
+ <rect x="${r*0.9}" y="0" width="${r*0.1}" height="${r}" fill="${t}"/>
42
42
  <!-- Center motif -->
43
- <circle cx="${o*0.5}" cy="${o*0.5}" r="${o*0.15}" fill="${n}"/>
44
- <text x="${o*0.5}" y="${o*0.55}" text-anchor="middle" fill="${t}" font-size="${o*0.08}">KANGA</text>
43
+ <circle cx="${r*0.5}" cy="${r*0.5}" r="${r*0.15}" fill="${n}"/>
44
+ <text x="${r*0.5}" y="${r*0.55}" text-anchor="middle" fill="${t}" font-size="${r*0.08}">KANGA</text>
45
45
  </svg>
46
- `;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function mb({primaryColor:t="#8B4513",secondaryColor:n="#DAA520",backgroundColor:b="#F5F5DC",size:o=30}={}){let l=`
47
- <svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}">
48
- <rect width="${o}" height="${o}" fill="${b}"/>
46
+ `;return`data:image/svg+xml,${encodeURIComponent(a.trim())}`}function yl({primaryColor:t="#8B4513",secondaryColor:n="#DAA520",backgroundColor:o="#F5F5DC",size:r=30}={}){let a=`
47
+ <svg xmlns="http://www.w3.org/2000/svg" width="${r}" height="${r}" viewBox="0 0 ${r} ${r}">
48
+ <rect width="${r}" height="${r}" fill="${o}"/>
49
49
  <!-- Kuba geometric border -->
50
- <polygon points="0,0 ${o*0.3},0 0,${o*0.3}" fill="${t}"/>
51
- <polygon points="${o},0 ${o*0.7},0 ${o},${o*0.3}" fill="${t}"/>
52
- <polygon points="0,${o} ${o*0.3},${o} 0,${o*0.7}" fill="${t}"/>
53
- <polygon points="${o},${o} ${o*0.7},${o} ${o},${o*0.7}" fill="${t}"/>
50
+ <polygon points="0,0 ${r*0.3},0 0,${r*0.3}" fill="${t}"/>
51
+ <polygon points="${r},0 ${r*0.7},0 ${r},${r*0.3}" fill="${t}"/>
52
+ <polygon points="0,${r} ${r*0.3},${r} 0,${r*0.7}" fill="${t}"/>
53
+ <polygon points="${r},${r} ${r*0.7},${r} ${r},${r*0.7}" fill="${t}"/>
54
54
  <!-- Center diamond -->
55
- <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}"/>
55
+ <polygon points="${r*0.5},${r*0.3} ${r*0.7},${r*0.5} ${r*0.5},${r*0.7} ${r*0.3},${r*0.5}" fill="${n}"/>
56
56
  </svg>
57
- `;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function pb({primaryColor:t="#FF0000",secondaryColor:n="#000000",accentColor:b="#FFFFFF",size:o=40}={}){let l=`
58
- <svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}">
59
- <rect width="${o}" height="${o}" fill="${b}"/>
57
+ `;return`data:image/svg+xml,${encodeURIComponent(a.trim())}`}function Cl({primaryColor:t="#FF0000",secondaryColor:n="#000000",accentColor:o="#FFFFFF",size:r=40}={}){let a=`
58
+ <svg xmlns="http://www.w3.org/2000/svg" width="${r}" height="${r}" viewBox="0 0 ${r} ${r}">
59
+ <rect width="${r}" height="${r}" fill="${o}"/>
60
60
  <!-- Bead pattern -->
61
- <circle cx="${o*0.2}" cy="${o*0.2}" r="${o*0.08}" fill="${t}"/>
62
- <circle cx="${o*0.5}" cy="${o*0.2}" r="${o*0.08}" fill="${n}"/>
63
- <circle cx="${o*0.8}" cy="${o*0.2}" r="${o*0.08}" fill="${t}"/>
64
- <circle cx="${o*0.2}" cy="${o*0.5}" r="${o*0.08}" fill="${n}"/>
65
- <circle cx="${o*0.5}" cy="${o*0.5}" r="${o*0.08}" fill="${t}"/>
66
- <circle cx="${o*0.8}" cy="${o*0.5}" r="${o*0.08}" fill="${n}"/>
67
- <circle cx="${o*0.2}" cy="${o*0.8}" r="${o*0.08}" fill="${t}"/>
68
- <circle cx="${o*0.5}" cy="${o*0.8}" r="${o*0.08}" fill="${n}"/>
69
- <circle cx="${o*0.8}" cy="${o*0.8}" r="${o*0.08}" fill="${t}"/>
61
+ <circle cx="${r*0.2}" cy="${r*0.2}" r="${r*0.08}" fill="${t}"/>
62
+ <circle cx="${r*0.5}" cy="${r*0.2}" r="${r*0.08}" fill="${n}"/>
63
+ <circle cx="${r*0.8}" cy="${r*0.2}" r="${r*0.08}" fill="${t}"/>
64
+ <circle cx="${r*0.2}" cy="${r*0.5}" r="${r*0.08}" fill="${n}"/>
65
+ <circle cx="${r*0.5}" cy="${r*0.5}" r="${r*0.08}" fill="${t}"/>
66
+ <circle cx="${r*0.8}" cy="${r*0.5}" r="${r*0.08}" fill="${n}"/>
67
+ <circle cx="${r*0.2}" cy="${r*0.8}" r="${r*0.08}" fill="${t}"/>
68
+ <circle cx="${r*0.5}" cy="${r*0.8}" r="${r*0.08}" fill="${n}"/>
69
+ <circle cx="${r*0.8}" cy="${r*0.8}" r="${r*0.08}" fill="${t}"/>
70
70
  </svg>
71
- `;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function ub({primaryColor:t="#8B0000",secondaryColor:n="#FFD700",backgroundColor:b="#654321",size:o=50}={}){let l=`
72
- <svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}">
73
- <ellipse cx="${o*0.5}" cy="${o*0.5}" rx="${o*0.4}" ry="${o*0.45}" fill="${b}"/>
71
+ `;return`data:image/svg+xml,${encodeURIComponent(a.trim())}`}function Il({primaryColor:t="#8B0000",secondaryColor:n="#FFD700",backgroundColor:o="#654321",size:r=50}={}){let a=`
72
+ <svg xmlns="http://www.w3.org/2000/svg" width="${r}" height="${r}" viewBox="0 0 ${r} ${r}">
73
+ <ellipse cx="${r*0.5}" cy="${r*0.5}" rx="${r*0.4}" ry="${r*0.45}" fill="${o}"/>
74
74
  <!-- Shield patterns -->
75
- <ellipse cx="${o*0.5}" cy="${o*0.3}" rx="${o*0.2}" ry="${o*0.15}" fill="${t}"/>
76
- <rect x="${o*0.4}" y="${o*0.5}" width="${o*0.2}" height="${o*0.3}" fill="${n}"/>
75
+ <ellipse cx="${r*0.5}" cy="${r*0.3}" rx="${r*0.2}" ry="${r*0.15}" fill="${t}"/>
76
+ <rect x="${r*0.4}" y="${r*0.5}" width="${r*0.2}" height="${r*0.3}" fill="${n}"/>
77
77
  <!-- Decorative lines -->
78
- <line x1="${o*0.3}" y1="${o*0.2}" x2="${o*0.7}" y2="${o*0.2}" stroke="${t}" stroke-width="3"/>
79
- <line x1="${o*0.3}" y1="${o*0.8}" x2="${o*0.7}" y2="${o*0.8}" stroke="${t}" stroke-width="3"/>
78
+ <line x1="${r*0.3}" y1="${r*0.2}" x2="${r*0.7}" y2="${r*0.2}" stroke="${t}" stroke-width="3"/>
79
+ <line x1="${r*0.3}" y1="${r*0.8}" x2="${r*0.7}" y2="${r*0.8}" stroke="${t}" stroke-width="3"/>
80
80
  </svg>
81
- `;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function Ub({primaryColor:t="#FF1493",secondaryColor:n="#00FF00",accentColor:b="#FFFF00",backgroundColor:o="#FFFFFF",size:l=50}={}){let a=`
82
- <svg xmlns="http://www.w3.org/2000/svg" width="${l}" height="${l}" viewBox="0 0 ${l} ${l}">
83
- <rect width="${l}" height="${l}" fill="${o}"/>
81
+ `;return`data:image/svg+xml,${encodeURIComponent(a.trim())}`}function Pl({primaryColor:t="#FF1493",secondaryColor:n="#00FF00",accentColor:o="#FFFF00",backgroundColor:r="#FFFFFF",size:a=50}={}){let l=`
82
+ <svg xmlns="http://www.w3.org/2000/svg" width="${a}" height="${a}" viewBox="0 0 ${a} ${a}">
83
+ <rect width="${a}" height="${a}" fill="${r}"/>
84
84
  <!-- Ndebele geometric patterns -->
85
- <polygon points="${l*0.2},${l*0.2} ${l*0.4},${l*0.2} ${l*0.3},${l*0.4}" fill="${t}"/>
86
- <polygon points="${l*0.6},${l*0.2} ${l*0.8},${l*0.2} ${l*0.7},${l*0.4}" fill="${n}"/>
87
- <polygon points="${l*0.2},${l*0.6} ${l*0.4},${l*0.6} ${l*0.3},${l*0.8}" fill="${b}"/>
88
- <polygon points="${l*0.6},${l*0.6} ${l*0.8},${l*0.6} ${l*0.7},${l*0.8}" fill="${t}"/>
85
+ <polygon points="${a*0.2},${a*0.2} ${a*0.4},${a*0.2} ${a*0.3},${a*0.4}" fill="${t}"/>
86
+ <polygon points="${a*0.6},${a*0.2} ${a*0.8},${a*0.2} ${a*0.7},${a*0.4}" fill="${n}"/>
87
+ <polygon points="${a*0.2},${a*0.6} ${a*0.4},${a*0.6} ${a*0.3},${a*0.8}" fill="${o}"/>
88
+ <polygon points="${a*0.6},${a*0.6} ${a*0.8},${a*0.6} ${a*0.7},${a*0.8}" fill="${t}"/>
89
89
  <!-- Center design -->
90
- <circle cx="${l*0.5}" cy="${l*0.5}" r="${l*0.15}" fill="${n}"/>
91
- <rect x="${l*0.45}" y="${l*0.45}" width="${l*0.1}" height="${l*0.1}" fill="${b}"/>
90
+ <circle cx="${a*0.5}" cy="${a*0.5}" r="${a*0.15}" fill="${n}"/>
91
+ <rect x="${a*0.45}" y="${a*0.45}" width="${a*0.1}" height="${a*0.1}" fill="${o}"/>
92
92
  </svg>
93
- `;return`data:image/svg+xml,${encodeURIComponent(a.trim())}`}function Vn({primaryColor:t="#00A3DD",secondaryColor:n="#FCD116",backgroundColor:b="#1EB53A",size:o=50}={}){let l=`
94
- <svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}">
95
- <rect width="${o}" height="${o}" fill="${b}"/>
96
- <circle cx="${o*0.25}" cy="${o*0.25}" r="${o*0.2}" fill="${t}" opacity="0.8"/>
97
- <circle cx="${o*0.75}" cy="${o*0.75}" r="${o*0.2}" fill="${t}" opacity="0.8"/>
98
- <circle cx="${o*0.25}" cy="${o*0.25}" r="${o*0.1}" fill="${n}"/>
99
- <circle cx="${o*0.75}" cy="${o*0.75}" r="${o*0.1}" fill="${n}"/>
100
- <circle cx="${o*0.75}" cy="${o*0.25}" r="${o*0.08}" fill="${n}" opacity="0.6"/>
101
- <circle cx="${o*0.25}" cy="${o*0.75}" r="${o*0.08}" fill="${n}" opacity="0.6"/>
93
+ `;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function io({primaryColor:t="#00A3DD",secondaryColor:n="#FCD116",backgroundColor:o="#1EB53A",size:r=50}={}){let a=`
94
+ <svg xmlns="http://www.w3.org/2000/svg" width="${r}" height="${r}" viewBox="0 0 ${r} ${r}">
95
+ <rect width="${r}" height="${r}" fill="${o}"/>
96
+ <circle cx="${r*0.25}" cy="${r*0.25}" r="${r*0.2}" fill="${t}" opacity="0.8"/>
97
+ <circle cx="${r*0.75}" cy="${r*0.75}" r="${r*0.2}" fill="${t}" opacity="0.8"/>
98
+ <circle cx="${r*0.25}" cy="${r*0.25}" r="${r*0.1}" fill="${n}"/>
99
+ <circle cx="${r*0.75}" cy="${r*0.75}" r="${r*0.1}" fill="${n}"/>
100
+ <circle cx="${r*0.75}" cy="${r*0.25}" r="${r*0.08}" fill="${n}" opacity="0.6"/>
101
+ <circle cx="${r*0.25}" cy="${r*0.75}" r="${r*0.08}" fill="${n}" opacity="0.6"/>
102
102
  </svg>
103
- `;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function Nn({colors:t=["#FFD700","#228B22","#DC143C","#000000"],size:n=60}={}){let[b,o,l,a]=t,h=n/6,f=`
103
+ `;return`data:image/svg+xml,${encodeURIComponent(a.trim())}`}function ho({colors:t=["#FFD700","#228B22","#DC143C","#000000"],size:n=60}={}){let[o,r,a,l]=t,b=n/6,e=`
104
104
  <svg xmlns="http://www.w3.org/2000/svg" width="${n}" height="${n}" viewBox="0 0 ${n} ${n}">
105
- <rect width="${n}" height="${n}" fill="${a}"/>
105
+ <rect width="${n}" height="${n}" fill="${l}"/>
106
106
  <!-- Horizontal bands -->
107
- <rect x="0" y="0" width="${n}" height="${h}" fill="${b}"/>
108
- <rect x="0" y="${h}" width="${n}" height="${h}" fill="${o}"/>
109
- <rect x="0" y="${h*2}" width="${n}" height="${h}" fill="${l}"/>
110
- <rect x="0" y="${h*3}" width="${n}" height="${h}" fill="${b}"/>
111
- <rect x="0" y="${h*4}" width="${n}" height="${h}" fill="${o}"/>
112
- <rect x="0" y="${h*5}" width="${n}" height="${h}" fill="${l}"/>
107
+ <rect x="0" y="0" width="${n}" height="${b}" fill="${o}"/>
108
+ <rect x="0" y="${b}" width="${n}" height="${b}" fill="${r}"/>
109
+ <rect x="0" y="${b*2}" width="${n}" height="${b}" fill="${a}"/>
110
+ <rect x="0" y="${b*3}" width="${n}" height="${b}" fill="${o}"/>
111
+ <rect x="0" y="${b*4}" width="${n}" height="${b}" fill="${r}"/>
112
+ <rect x="0" y="${b*5}" width="${n}" height="${b}" fill="${a}"/>
113
113
  <!-- Vertical accents -->
114
- <rect x="${n*0.2}" y="0" width="3" height="${n}" fill="${a}" opacity="0.5"/>
115
- <rect x="${n*0.4}" y="0" width="3" height="${n}" fill="${a}" opacity="0.5"/>
116
- <rect x="${n*0.6}" y="0" width="3" height="${n}" fill="${a}" opacity="0.5"/>
117
- <rect x="${n*0.8}" y="0" width="3" height="${n}" fill="${a}" opacity="0.5"/>
114
+ <rect x="${n*0.2}" y="0" width="3" height="${n}" fill="${l}" opacity="0.5"/>
115
+ <rect x="${n*0.4}" y="0" width="3" height="${n}" fill="${l}" opacity="0.5"/>
116
+ <rect x="${n*0.6}" y="0" width="3" height="${n}" fill="${l}" opacity="0.5"/>
117
+ <rect x="${n*0.8}" y="0" width="3" height="${n}" fill="${l}" opacity="0.5"/>
118
118
  <!-- Kente squares -->
119
- <rect x="${n*0.1}" y="${n*0.1}" width="${n*0.15}" height="${n*0.15}" fill="${b}" stroke="${a}" stroke-width="1"/>
120
- <rect x="${n*0.75}" y="${n*0.75}" width="${n*0.15}" height="${n*0.15}" fill="${l}" stroke="${a}" stroke-width="1"/>
119
+ <rect x="${n*0.1}" y="${n*0.1}" width="${n*0.15}" height="${n*0.15}" fill="${o}" stroke="${l}" stroke-width="1"/>
120
+ <rect x="${n*0.75}" y="${n*0.75}" width="${n*0.15}" height="${n*0.15}" fill="${a}" stroke="${l}" stroke-width="1"/>
121
121
  </svg>
122
- `;return`data:image/svg+xml,${encodeURIComponent(f.trim())}`}function Kn({symbolColor:t="#000000",backgroundColor:n="#CD853F",size:b=50}={}){let o=`
123
- <svg xmlns="http://www.w3.org/2000/svg" width="${b}" height="${b}" viewBox="0 0 ${b} ${b}">
124
- <rect width="${b}" height="${b}" fill="${n}"/>
122
+ `;return`data:image/svg+xml,${encodeURIComponent(e.trim())}`}function fo({symbolColor:t="#000000",backgroundColor:n="#CD853F",size:o=50}={}){let r=`
123
+ <svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}">
124
+ <rect width="${o}" height="${o}" fill="${n}"/>
125
125
  <!-- Sankofa-inspired heart shape (go back and get it) -->
126
- <path d="M${b*0.5} ${b*0.2}
127
- C${b*0.3} ${b*0.1} ${b*0.15} ${b*0.3} ${b*0.25} ${b*0.5}
128
- L${b*0.5} ${b*0.8}
129
- L${b*0.75} ${b*0.5}
130
- C${b*0.85} ${b*0.3} ${b*0.7} ${b*0.1} ${b*0.5} ${b*0.2}"
126
+ <path d="M${o*0.5} ${o*0.2}
127
+ C${o*0.3} ${o*0.1} ${o*0.15} ${o*0.3} ${o*0.25} ${o*0.5}
128
+ L${o*0.5} ${o*0.8}
129
+ L${o*0.75} ${o*0.5}
130
+ C${o*0.85} ${o*0.3} ${o*0.7} ${o*0.1} ${o*0.5} ${o*0.2}"
131
131
  fill="none" stroke="${t}" stroke-width="3"/>
132
132
  <!-- Spiral detail -->
133
- <circle cx="${b*0.35}" cy="${b*0.45}" r="${b*0.08}" fill="none" stroke="${t}" stroke-width="2"/>
134
- <circle cx="${b*0.65}" cy="${b*0.45}" r="${b*0.08}" fill="none" stroke="${t}" stroke-width="2"/>
133
+ <circle cx="${o*0.35}" cy="${o*0.45}" r="${o*0.08}" fill="none" stroke="${t}" stroke-width="2"/>
134
+ <circle cx="${o*0.65}" cy="${o*0.45}" r="${o*0.08}" fill="none" stroke="${t}" stroke-width="2"/>
135
135
  </svg>
136
- `;return`data:image/svg+xml,${encodeURIComponent(o.trim())}`}function jn({colors:t=["#4B0082","#FFD700","#FFFFFF"],size:n=50}={}){let[b,o,l]=t,a=n/10,h=`
136
+ `;return`data:image/svg+xml,${encodeURIComponent(r.trim())}`}function co({colors:t=["#4B0082","#FFD700","#FFFFFF"],size:n=50}={}){let[o,r,a]=t,l=n/10,b=`
137
137
  <svg xmlns="http://www.w3.org/2000/svg" width="${n}" height="${n}" viewBox="0 0 ${n} ${n}">
138
- <rect width="${n}" height="${n}" fill="${b}"/>
138
+ <rect width="${n}" height="${n}" fill="${o}"/>
139
139
  <!-- Horizontal stripes -->
140
- <rect x="0" y="${a}" width="${n}" height="${a*0.5}" fill="${o}"/>
141
- <rect x="0" y="${a*3}" width="${n}" height="${a*0.5}" fill="${l}"/>
142
- <rect x="0" y="${a*5}" width="${n}" height="${a*0.5}" fill="${o}"/>
143
- <rect x="0" y="${a*7}" width="${n}" height="${a*0.5}" fill="${l}"/>
144
- <rect x="0" y="${a*9}" width="${n}" height="${a*0.5}" fill="${o}"/>
140
+ <rect x="0" y="${l}" width="${n}" height="${l*0.5}" fill="${r}"/>
141
+ <rect x="0" y="${l*3}" width="${n}" height="${l*0.5}" fill="${a}"/>
142
+ <rect x="0" y="${l*5}" width="${n}" height="${l*0.5}" fill="${r}"/>
143
+ <rect x="0" y="${l*7}" width="${n}" height="${l*0.5}" fill="${a}"/>
144
+ <rect x="0" y="${l*9}" width="${n}" height="${l*0.5}" fill="${r}"/>
145
145
  <!-- Vertical accent lines -->
146
- <rect x="${n*0.48}" y="0" width="${a*0.4}" height="${n}" fill="${o}" opacity="0.7"/>
146
+ <rect x="${n*0.48}" y="0" width="${l*0.4}" height="${n}" fill="${r}" opacity="0.7"/>
147
147
  <!-- Diamond motifs -->
148
148
  <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}"
149
- fill="${o}" stroke="${l}" stroke-width="1"/>
149
+ fill="${r}" stroke="${a}" stroke-width="1"/>
150
150
  <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}"
151
- fill="${o}" stroke="${l}" stroke-width="1"/>
151
+ fill="${r}" stroke="${a}" stroke-width="1"/>
152
152
  </svg>
153
- `;return`data:image/svg+xml,${encodeURIComponent(h.trim())}`}function In({primaryColor:t="#FF6B00",secondaryColor:n="#00A86B",accentColor:b="#FFD700",backgroundColor:o="#FFFFFF",size:l=60}={}){let a=`
154
- <svg xmlns="http://www.w3.org/2000/svg" width="${l}" height="${l}" viewBox="0 0 ${l} ${l}">
155
- <rect width="${l}" height="${l}" fill="${o}"/>
153
+ `;return`data:image/svg+xml,${encodeURIComponent(b.trim())}`}function go({primaryColor:t="#FF6B00",secondaryColor:n="#00A86B",accentColor:o="#FFD700",backgroundColor:r="#FFFFFF",size:a=60}={}){let l=`
154
+ <svg xmlns="http://www.w3.org/2000/svg" width="${a}" height="${a}" viewBox="0 0 ${a} ${a}">
155
+ <rect width="${a}" height="${a}" fill="${r}"/>
156
156
  <!-- Bold circular motifs -->
157
- <circle cx="${l*0.3}" cy="${l*0.3}" r="${l*0.25}" fill="${t}"/>
158
- <circle cx="${l*0.3}" cy="${l*0.3}" r="${l*0.15}" fill="${n}"/>
159
- <circle cx="${l*0.3}" cy="${l*0.3}" r="${l*0.08}" fill="${b}"/>
157
+ <circle cx="${a*0.3}" cy="${a*0.3}" r="${a*0.25}" fill="${t}"/>
158
+ <circle cx="${a*0.3}" cy="${a*0.3}" r="${a*0.15}" fill="${n}"/>
159
+ <circle cx="${a*0.3}" cy="${a*0.3}" r="${a*0.08}" fill="${o}"/>
160
160
 
161
- <circle cx="${l*0.8}" cy="${l*0.8}" r="${l*0.2}" fill="${n}"/>
162
- <circle cx="${l*0.8}" cy="${l*0.8}" r="${l*0.1}" fill="${t}"/>
161
+ <circle cx="${a*0.8}" cy="${a*0.8}" r="${a*0.2}" fill="${n}"/>
162
+ <circle cx="${a*0.8}" cy="${a*0.8}" r="${a*0.1}" fill="${t}"/>
163
163
 
164
164
  <!-- Connecting lines -->
165
- <line x1="${l*0.45}" y1="${l*0.45}" x2="${l*0.65}" y2="${l*0.65}"
165
+ <line x1="${a*0.45}" y1="${a*0.45}" x2="${a*0.65}" y2="${a*0.65}"
166
166
  stroke="${t}" stroke-width="4"/>
167
167
 
168
168
  <!-- Small dots -->
169
- <circle cx="${l*0.1}" cy="${l*0.8}" r="${l*0.05}" fill="${b}"/>
170
- <circle cx="${l*0.9}" cy="${l*0.2}" r="${l*0.05}" fill="${b}"/>
169
+ <circle cx="${a*0.1}" cy="${a*0.8}" r="${a*0.05}" fill="${o}"/>
170
+ <circle cx="${a*0.9}" cy="${a*0.2}" r="${a*0.05}" fill="${o}"/>
171
171
  </svg>
172
- `;return`data:image/svg+xml,${encodeURIComponent(a.trim())}`}function Pn({primaryColor:t="#000000",secondaryColor:n="#FFFFFF",accentColor:b="#8B4513",size:o=60}={}){let l=`
173
- <svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}">
174
- <rect width="${o}" height="${o}" fill="${t}"/>
172
+ `;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function vo({primaryColor:t="#000000",secondaryColor:n="#FFFFFF",accentColor:o="#8B4513",size:r=60}={}){let a=`
173
+ <svg xmlns="http://www.w3.org/2000/svg" width="${r}" height="${r}" viewBox="0 0 ${r} ${r}">
174
+ <rect width="${r}" height="${r}" fill="${t}"/>
175
175
  <!-- Zigzags -->
176
- <polyline points="0,${o*0.2} ${o*0.25},0 ${o*0.5},${o*0.2} ${o*0.75},0 ${o},${o*0.2}"
176
+ <polyline points="0,${r*0.2} ${r*0.25},0 ${r*0.5},${r*0.2} ${r*0.75},0 ${r},${r*0.2}"
177
177
  fill="none" stroke="${n}" stroke-width="3"/>
178
- <polyline points="0,${o*0.8} ${o*0.25},${o} ${o*0.5},${o*0.8} ${o*0.75},${o} ${o},${o*0.8}"
178
+ <polyline points="0,${r*0.8} ${r*0.25},${r} ${r*0.5},${r*0.8} ${r*0.75},${r} ${r},${r*0.8}"
179
179
  fill="none" stroke="${n}" stroke-width="3"/>
180
180
  <!-- Crosses -->
181
- <line x1="${o*0.25}" y1="${o*0.4}" x2="${o*0.25}" y2="${o*0.6}" stroke="${n}" stroke-width="2"/>
182
- <line x1="${o*0.15}" y1="${o*0.5}" x2="${o*0.35}" y2="${o*0.5}" stroke="${n}" stroke-width="2"/>
183
- <line x1="${o*0.75}" y1="${o*0.4}" x2="${o*0.75}" y2="${o*0.6}" stroke="${n}" stroke-width="2"/>
184
- <line x1="${o*0.65}" y1="${o*0.5}" x2="${o*0.85}" y2="${o*0.5}" stroke="${n}" stroke-width="2"/>
181
+ <line x1="${r*0.25}" y1="${r*0.4}" x2="${r*0.25}" y2="${r*0.6}" stroke="${n}" stroke-width="2"/>
182
+ <line x1="${r*0.15}" y1="${r*0.5}" x2="${r*0.35}" y2="${r*0.5}" stroke="${n}" stroke-width="2"/>
183
+ <line x1="${r*0.75}" y1="${r*0.4}" x2="${r*0.75}" y2="${r*0.6}" stroke="${n}" stroke-width="2"/>
184
+ <line x1="${r*0.65}" y1="${r*0.5}" x2="${r*0.85}" y2="${r*0.5}" stroke="${n}" stroke-width="2"/>
185
185
  <!-- Dots -->
186
- <circle cx="${o*0.5}" cy="${o*0.5}" r="${o*0.08}" fill="${b}"/>
186
+ <circle cx="${r*0.5}" cy="${r*0.5}" r="${r*0.08}" fill="${o}"/>
187
187
  </svg>
188
- `;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function Tn({primaryColor:t="#D2B48C",secondaryColor:n="#3E2723",size:b=60}={}){let o=`
189
- <svg xmlns="http://www.w3.org/2000/svg" width="${b}" height="${b}" viewBox="0 0 ${b} ${b}">
190
- <rect width="${b}" height="${b}" fill="${t}"/>
188
+ `;return`data:image/svg+xml,${encodeURIComponent(a.trim())}`}function po({primaryColor:t="#D2B48C",secondaryColor:n="#3E2723",size:o=60}={}){let r=`
189
+ <svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}">
190
+ <rect width="${o}" height="${o}" fill="${t}"/>
191
191
  <!-- Interlocking diamonds/rectangles -->
192
- <rect x="${b*0.1}" y="${b*0.1}" width="${b*0.3}" height="${b*0.3}" fill="${n}"/>
193
- <rect x="${b*0.6}" y="${b*0.6}" width="${b*0.3}" height="${b*0.3}" fill="${n}"/>
194
- <rect x="${b*0.6}" y="${b*0.1}" width="${b*0.3}" height="${b*0.3}"
192
+ <rect x="${o*0.1}" y="${o*0.1}" width="${o*0.3}" height="${o*0.3}" fill="${n}"/>
193
+ <rect x="${o*0.6}" y="${o*0.6}" width="${o*0.3}" height="${o*0.3}" fill="${n}"/>
194
+ <rect x="${o*0.6}" y="${o*0.1}" width="${o*0.3}" height="${o*0.3}"
195
195
  fill="none" stroke="${n}" stroke-width="4"/>
196
- <rect x="${b*0.1}" y="${b*0.6}" width="${b*0.3}" height="${b*0.3}"
196
+ <rect x="${o*0.1}" y="${o*0.6}" width="${o*0.3}" height="${o*0.3}"
197
197
  fill="none" stroke="${n}" stroke-width="4"/>
198
198
  <!-- Center lines -->
199
- <line x1="${b*0.4}" y1="${b*0.5}" x2="${b*0.6}" y2="${b*0.5}" stroke="${n}" stroke-width="2"/>
200
- <line x1="${b*0.5}" y1="${b*0.4}" x2="${b*0.5}" y2="${b*0.6}" stroke="${n}" stroke-width="2"/>
199
+ <line x1="${o*0.4}" y1="${o*0.5}" x2="${o*0.6}" y2="${o*0.5}" stroke="${n}" stroke-width="2"/>
200
+ <line x1="${o*0.5}" y1="${o*0.4}" x2="${o*0.5}" y2="${o*0.6}" stroke="${n}" stroke-width="2"/>
201
201
  </svg>
202
- `;return`data:image/svg+xml,${encodeURIComponent(o.trim())}`}function Cn({primaryColor:t="#000000",secondaryColor:n="#FFFFFF",accentColor:b="#B22222",size:o=60}={}){let l=`
203
- <svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}">
204
- <rect width="${o}" height="${o}" fill="${n}"/>
202
+ `;return`data:image/svg+xml,${encodeURIComponent(r.trim())}`}function mo({primaryColor:t="#000000",secondaryColor:n="#FFFFFF",accentColor:o="#B22222",size:r=60}={}){let a=`
203
+ <svg xmlns="http://www.w3.org/2000/svg" width="${r}" height="${r}" viewBox="0 0 ${r} ${r}">
204
+ <rect width="${r}" height="${r}" fill="${n}"/>
205
205
  <!-- Spiral/Diamond Motif -->
206
- <path d="M${o*0.5} ${o*0.1}
207
- L${o*0.9} ${o*0.5}
208
- L${o*0.5} ${o*0.9}
209
- L${o*0.1} ${o*0.5} Z"
206
+ <path d="M${r*0.5} ${r*0.1}
207
+ L${r*0.9} ${r*0.5}
208
+ L${r*0.5} ${r*0.9}
209
+ L${r*0.1} ${r*0.5} Z"
210
210
  fill="${t}"/>
211
- <path d="M${o*0.5} ${o*0.3}
212
- L${o*0.7} ${o*0.5}
213
- L${o*0.5} ${o*0.7}
214
- L${o*0.3} ${o*0.5} Z"
211
+ <path d="M${r*0.5} ${r*0.3}
212
+ L${r*0.7} ${r*0.5}
213
+ L${r*0.5} ${r*0.7}
214
+ L${r*0.3} ${r*0.5} Z"
215
215
  fill="${n}"/>
216
- <circle cx="${o*0.5}" cy="${o*0.5}" r="${o*0.1}" fill="${b}"/>
216
+ <circle cx="${r*0.5}" cy="${r*0.5}" r="${r*0.1}" fill="${o}"/>
217
217
  </svg>
218
- `;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function yn({colors:t=["#009E60","#FCDD09","#EF3340"],backgroundColor:n="#FFFFFF",size:b=40}={}){let[o,l,a]=t,h=`
219
- <svg xmlns="http://www.w3.org/2000/svg" width="${b}" height="${b}" viewBox="0 0 ${b} ${b}">
220
- <rect width="${b}" height="${b}" fill="${n}"/>
218
+ `;return`data:image/svg+xml,${encodeURIComponent(a.trim())}`}function $o({colors:t=["#009E60","#FCDD09","#EF3340"],backgroundColor:n="#FFFFFF",size:o=40}={}){let[r,a,l]=t,b=`
219
+ <svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}">
220
+ <rect width="${o}" height="${o}" fill="${n}"/>
221
221
  <!-- Diamond Chain -->
222
- <polygon points="${b*0.5},0 ${b},${b*0.5} ${b*0.5},${b} 0,${b*0.5}"
223
- fill="${o}" opacity="0.2"/>
224
- <polygon points="${b*0.5},${b*0.2} ${b*0.8},${b*0.5} ${b*0.5},${b*0.8} ${b*0.2},${b*0.5}"
225
- fill="${l}"/>
226
- <rect x="${b*0.4}" y="${b*0.4}" width="${b*0.2}" height="${b*0.2}" fill="${a}"/>
222
+ <polygon points="${o*0.5},0 ${o},${o*0.5} ${o*0.5},${o} 0,${o*0.5}"
223
+ fill="${r}" opacity="0.2"/>
224
+ <polygon points="${o*0.5},${o*0.2} ${o*0.8},${o*0.5} ${o*0.5},${o*0.8} ${o*0.2},${o*0.5}"
225
+ fill="${a}"/>
226
+ <rect x="${o*0.4}" y="${o*0.4}" width="${o*0.2}" height="${o*0.2}" fill="${l}"/>
227
227
  <!-- Side accents -->
228
- <line x1="0" y1="0" x2="0" y2="${b}" stroke="${o}" stroke-width="4"/>
229
- <line x1="${b}" y1="0" x2="${b}" y2="${b}" stroke="${o}" stroke-width="4"/>
228
+ <line x1="0" y1="0" x2="0" y2="${o}" stroke="${r}" stroke-width="4"/>
229
+ <line x1="${o}" y1="0" x2="${o}" y2="${o}" stroke="${r}" stroke-width="4"/>
230
230
  </svg>
231
- `;return`data:image/svg+xml,${encodeURIComponent(h.trim())}`}function en({colors:t=["#FFD700","#4169E1","#FF69B4","#228B22"],size:n=60,strokeWidth:b=2}={}){let[o,l,a,h]=t,f=`
231
+ `;return`data:image/svg+xml,${encodeURIComponent(b.trim())}`}function wo({colors:t=["#FFD700","#4169E1","#FF69B4","#228B22"],size:n=60,strokeWidth:o=2}={}){let[r,a,l,b]=t,e=`
232
232
  <svg xmlns="http://www.w3.org/2000/svg" width="${n}" height="${n}" viewBox="0 0 ${n} ${n}">
233
233
  <rect width="${n}" height="${n}" fill="#FFFFFF"/>
234
- <rect x="${b}" y="${b}"
235
- width="${n-b*2}" height="${n-b*2}"
236
- fill="none" stroke="#000000" stroke-width="${b}"/>
234
+ <rect x="${o}" y="${o}"
235
+ width="${n-o*2}" height="${n-o*2}"
236
+ fill="none" stroke="#000000" stroke-width="${o}"/>
237
237
  <rect x="${n*0.15}" y="${n*0.15}" width="${n*0.35}" height="${n*0.35}"
238
- fill="${o}" stroke="#000000" stroke-width="${b/2}"/>
238
+ fill="${r}" stroke="#000000" stroke-width="${o/2}"/>
239
239
  <rect x="${n*0.5}" y="${n*0.15}" width="${n*0.35}" height="${n*0.35}"
240
- fill="${l}" stroke="#000000" stroke-width="${b/2}"/>
240
+ fill="${a}" stroke="#000000" stroke-width="${o/2}"/>
241
241
  <rect x="${n*0.15}" y="${n*0.5}" width="${n*0.35}" height="${n*0.35}"
242
- fill="${a}" stroke="#000000" stroke-width="${b/2}"/>
242
+ fill="${l}" stroke="#000000" stroke-width="${o/2}"/>
243
243
  <rect x="${n*0.5}" y="${n*0.5}" width="${n*0.35}" height="${n*0.35}"
244
- fill="${h}" stroke="#000000" stroke-width="${b/2}"/>
244
+ fill="${b}" stroke="#000000" stroke-width="${o/2}"/>
245
245
  <polygon points="${n/2},${n*0.3} ${n*0.7},${n/2} ${n/2},${n*0.7} ${n*0.3},${n/2}"
246
- fill="#FFFFFF" stroke="#000000" stroke-width="${b}"/>
246
+ fill="#FFFFFF" stroke="#000000" stroke-width="${o}"/>
247
247
  </svg>
248
- `;return`data:image/svg+xml,${encodeURIComponent(f.trim())}`}function Zn({colors:t=["#FFFFFF","#000000","#FF0000","#00A86B","#FFD700"],size:n=50}={}){let[b,o,l,a,h]=t,f=n/10,r=`
248
+ `;return`data:image/svg+xml,${encodeURIComponent(e.trim())}`}function uo({colors:t=["#FFFFFF","#000000","#FF0000","#00A86B","#FFD700"],size:n=50}={}){let[o,r,a,l,b]=t,e=n/10,i=`
249
249
  <svg xmlns="http://www.w3.org/2000/svg" width="${n}" height="${n}" viewBox="0 0 ${n} ${n}">
250
- <rect width="${n}" height="${n}" fill="${o}"/>
250
+ <rect width="${n}" height="${n}" fill="${r}"/>
251
251
  <!-- Triangle pattern (isivivane - sacred cairn) -->
252
252
  <polygon points="${n*0.5},${n*0.1} ${n*0.9},${n*0.9} ${n*0.1},${n*0.9}"
253
- fill="none" stroke="${b}" stroke-width="2"/>
253
+ fill="none" stroke="${o}" stroke-width="2"/>
254
254
  <polygon points="${n*0.5},${n*0.25} ${n*0.75},${n*0.75} ${n*0.25},${n*0.75}"
255
- fill="${l}"/>
255
+ fill="${a}"/>
256
256
  <!-- Beadwork dots -->
257
- <circle cx="${n*0.5}" cy="${n*0.35}" r="${f}" fill="${b}"/>
258
- <circle cx="${n*0.35}" cy="${n*0.6}" r="${f}" fill="${a}"/>
259
- <circle cx="${n*0.65}" cy="${n*0.6}" r="${f}" fill="${h}"/>
260
- <circle cx="${n*0.5}" cy="${n*0.8}" r="${f}" fill="${b}"/>
257
+ <circle cx="${n*0.5}" cy="${n*0.35}" r="${e}" fill="${o}"/>
258
+ <circle cx="${n*0.35}" cy="${n*0.6}" r="${e}" fill="${l}"/>
259
+ <circle cx="${n*0.65}" cy="${n*0.6}" r="${e}" fill="${b}"/>
260
+ <circle cx="${n*0.5}" cy="${n*0.8}" r="${e}" fill="${o}"/>
261
261
  <!-- Border dots -->
262
- <circle cx="${n*0.1}" cy="${n*0.1}" r="${f*0.7}" fill="${l}"/>
263
- <circle cx="${n*0.9}" cy="${n*0.1}" r="${f*0.7}" fill="${a}"/>
262
+ <circle cx="${n*0.1}" cy="${n*0.1}" r="${e*0.7}" fill="${a}"/>
263
+ <circle cx="${n*0.9}" cy="${n*0.1}" r="${e*0.7}" fill="${l}"/>
264
264
  </svg>
265
- `;return`data:image/svg+xml,${encodeURIComponent(r.trim())}`}function sn({colors:t=["#3E5EB9","#FECD00","#B10C0C","#FFFFFF"],size:n=50}={}){let[b,o,l,a]=t,h=`
265
+ `;return`data:image/svg+xml,${encodeURIComponent(i.trim())}`}function so({colors:t=["#3E5EB9","#FECD00","#B10C0C","#FFFFFF"],size:n=50}={}){let[o,r,a,l]=t,b=`
266
266
  <svg xmlns="http://www.w3.org/2000/svg" width="${n}" height="${n}" viewBox="0 0 ${n} ${n}">
267
- <rect width="${n}" height="${n}" fill="${b}"/>
267
+ <rect width="${n}" height="${n}" fill="${o}"/>
268
268
  <!-- Shield shape (central to Eswatini culture) -->
269
269
  <ellipse cx="${n*0.5}" cy="${n*0.45}" rx="${n*0.35}" ry="${n*0.4}"
270
- fill="${o}" stroke="${l}" stroke-width="3"/>
270
+ fill="${r}" stroke="${a}" stroke-width="3"/>
271
271
  <!-- Inner pattern -->
272
272
  <ellipse cx="${n*0.5}" cy="${n*0.45}" rx="${n*0.2}" ry="${n*0.25}"
273
- fill="${l}"/>
273
+ fill="${a}"/>
274
274
  <!-- Feather accents -->
275
275
  <line x1="${n*0.5}" y1="${n*0.05}" x2="${n*0.5}" y2="${n*0.2}"
276
- stroke="${a}" stroke-width="3"/>
276
+ stroke="${l}" stroke-width="3"/>
277
277
  <line x1="${n*0.4}" y1="${n*0.08}" x2="${n*0.45}" y2="${n*0.15}"
278
- stroke="${a}" stroke-width="2"/>
278
+ stroke="${l}" stroke-width="2"/>
279
279
  <line x1="${n*0.6}" y1="${n*0.08}" x2="${n*0.55}" y2="${n*0.15}"
280
- stroke="${a}" stroke-width="2"/>
280
+ stroke="${l}" stroke-width="2"/>
281
281
  <!-- Spear points -->
282
- <polygon points="${n*0.1},${n*0.3} ${n*0.05},${n*0.5} ${n*0.15},${n*0.5}" fill="${a}"/>
283
- <polygon points="${n*0.9},${n*0.3} ${n*0.85},${n*0.5} ${n*0.95},${n*0.5}" fill="${a}"/>
282
+ <polygon points="${n*0.1},${n*0.3} ${n*0.05},${n*0.5} ${n*0.15},${n*0.5}" fill="${l}"/>
283
+ <polygon points="${n*0.9},${n*0.3} ${n*0.85},${n*0.5} ${n*0.95},${n*0.5}" fill="${l}"/>
284
284
  </svg>
285
- `;return`data:image/svg+xml,${encodeURIComponent(h.trim())}`}function zn({primaryColor:t="#FFFFFF",accentColor:n="#00A86B",backgroundColor:b="#1a1a2e",size:o=50}={}){let l=`
286
- <svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}">
287
- <rect width="${o}" height="${o}" fill="${b}"/>
285
+ `;return`data:image/svg+xml,${encodeURIComponent(b.trim())}`}function xo({primaryColor:t="#FFFFFF",accentColor:n="#00A86B",backgroundColor:o="#1a1a2e",size:r=50}={}){let a=`
286
+ <svg xmlns="http://www.w3.org/2000/svg" width="${r}" height="${r}" viewBox="0 0 ${r} ${r}">
287
+ <rect width="${r}" height="${r}" fill="${o}"/>
288
288
  <!-- Horizontal bands -->
289
- <rect x="0" y="${o*0.2}" width="${o}" height="${o*0.1}" fill="${t}"/>
290
- <rect x="0" y="${o*0.7}" width="${o}" height="${o*0.1}" fill="${t}"/>
289
+ <rect x="0" y="${r*0.2}" width="${r}" height="${r*0.1}" fill="${t}"/>
290
+ <rect x="0" y="${r*0.7}" width="${r}" height="${r*0.1}" fill="${t}"/>
291
291
  <!-- Vertical bands -->
292
- <rect x="${o*0.2}" y="0" width="${o*0.1}" height="${o}" fill="${n}"/>
293
- <rect x="${o*0.7}" y="0" width="${o*0.1}" height="${o}" fill="${n}"/>
292
+ <rect x="${r*0.2}" y="0" width="${r*0.1}" height="${r}" fill="${n}"/>
293
+ <rect x="${r*0.7}" y="0" width="${r*0.1}" height="${r}" fill="${n}"/>
294
294
  <!-- Central diamond -->
295
- <polygon points="${o*0.5},${o*0.35} ${o*0.65},${o*0.5} ${o*0.5},${o*0.65} ${o*0.35},${o*0.5}"
295
+ <polygon points="${r*0.5},${r*0.35} ${r*0.65},${r*0.5} ${r*0.5},${r*0.65} ${r*0.35},${r*0.5}"
296
296
  fill="${n}" stroke="${t}" stroke-width="2"/>
297
297
  <!-- Corner triangles -->
298
- <polygon points="0,0 ${o*0.15},0 0,${o*0.15}" fill="${n}"/>
299
- <polygon points="${o},0 ${o*0.85},0 ${o},${o*0.15}" fill="${n}"/>
300
- <polygon points="0,${o} ${o*0.15},${o} 0,${o*0.85}" fill="${n}"/>
301
- <polygon points="${o},${o} ${o*0.85},${o} ${o},${o*0.85}" fill="${n}"/>
298
+ <polygon points="0,0 ${r*0.15},0 0,${r*0.15}" fill="${n}"/>
299
+ <polygon points="${r},0 ${r*0.85},0 ${r},${r*0.15}" fill="${n}"/>
300
+ <polygon points="0,${r} ${r*0.15},${r} 0,${r*0.85}" fill="${n}"/>
301
+ <polygon points="${r},${r} ${r*0.85},${r} ${r},${r*0.85}" fill="${n}"/>
302
302
  </svg>
303
- `;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function Vb(t,n){t.style.backgroundImage=`url("${n}")`,t.style.backgroundRepeat="repeat"}function to({primaryColor:t="#8B0000",secondaryColor:n="#000000",accentColor:b="#FFD700",backgroundColor:o="#F5F5DC",size:l=60}={}){let a=`
304
- <svg xmlns="http://www.w3.org/2000/svg" width="${l}" height="${l}" viewBox="0 0 ${l} ${l}">
305
- <rect width="${l}" height="${l}" fill="${o}"/>
303
+ `;return`data:image/svg+xml,${encodeURIComponent(a.trim())}`}function Tl(t,n){t.style.backgroundImage=`url("${n}")`,t.style.backgroundRepeat="repeat"}function Ao({primaryColor:t="#8B0000",secondaryColor:n="#000000",accentColor:o="#FFD700",backgroundColor:r="#F5F5DC",size:a=60}={}){let l=`
304
+ <svg xmlns="http://www.w3.org/2000/svg" width="${a}" height="${a}" viewBox="0 0 ${a} ${a}">
305
+ <rect width="${a}" height="${a}" fill="${r}"/>
306
306
  <!-- Lozenge (Diamond) - universal protective symbol -->
307
- <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}"
307
+ <polygon points="${a*0.5},${a*0.1} ${a*0.9},${a*0.5} ${a*0.5},${a*0.9} ${a*0.1},${a*0.5}"
308
308
  fill="${t}" stroke="${n}" stroke-width="2"/>
309
309
  <!-- Inner geometric details -->
310
- <line x1="${l*0.5}" y1="${l*0.1}" x2="${l*0.5}" y2="${l*0.9}" stroke="${b}" stroke-width="2"/>
311
- <line x1="${l*0.1}" y1="${l*0.5}" x2="${l*0.9}" y2="${l*0.5}" stroke="${b}" stroke-width="2"/>
310
+ <line x1="${a*0.5}" y1="${a*0.1}" x2="${a*0.5}" y2="${a*0.9}" stroke="${o}" stroke-width="2"/>
311
+ <line x1="${a*0.1}" y1="${a*0.5}" x2="${a*0.9}" y2="${a*0.5}" stroke="${o}" stroke-width="2"/>
312
312
  <!-- X symbols (Fibula/Cross) -->
313
- <line x1="${l*0.4}" y1="${l*0.4}" x2="${l*0.6}" y2="${l*0.6}" stroke="${n}" stroke-width="2"/>
314
- <line x1="${l*0.6}" y1="${l*0.4}" x2="${l*0.4}" y2="${l*0.6}" stroke="${n}" stroke-width="2"/>
313
+ <line x1="${a*0.4}" y1="${a*0.4}" x2="${a*0.6}" y2="${a*0.6}" stroke="${n}" stroke-width="2"/>
314
+ <line x1="${a*0.6}" y1="${a*0.4}" x2="${a*0.4}" y2="${a*0.6}" stroke="${n}" stroke-width="2"/>
315
315
  </svg>
316
- `;return`data:image/svg+xml,${encodeURIComponent(a.trim())}`}function no({primaryColor:t="#4B0082",secondaryColor:n="#8A2BE2",accentColor:b="#FFFFFF",size:o=50}={}){let l=`
317
- <svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}">
318
- <rect width="${o}" height="${o}" fill="${t}"/>
316
+ `;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function _o({primaryColor:t="#4B0082",secondaryColor:n="#8A2BE2",accentColor:o="#FFFFFF",size:r=50}={}){let a=`
317
+ <svg xmlns="http://www.w3.org/2000/svg" width="${r}" height="${r}" viewBox="0 0 ${r} ${r}">
318
+ <rect width="${r}" height="${r}" fill="${t}"/>
319
319
  <!-- Resist circles (Oniko) -->
320
- <circle cx="${o*0.5}" cy="${o*0.5}" r="${o*0.35}" fill="none" stroke="${n}" stroke-width="3"/>
321
- <circle cx="${o*0.5}" cy="${o*0.5}" r="${o*0.25}" fill="none" stroke="${b}" stroke-width="2" stroke-dasharray="4 2"/>
322
- <circle cx="${o*0.5}" cy="${o*0.5}" r="${o*0.1}" fill="${b}" opacity="0.8"/>
320
+ <circle cx="${r*0.5}" cy="${r*0.5}" r="${r*0.35}" fill="none" stroke="${n}" stroke-width="3"/>
321
+ <circle cx="${r*0.5}" cy="${r*0.5}" r="${r*0.25}" fill="none" stroke="${o}" stroke-width="2" stroke-dasharray="4 2"/>
322
+ <circle cx="${r*0.5}" cy="${r*0.5}" r="${r*0.1}" fill="${o}" opacity="0.8"/>
323
323
  <!-- Corner ripples -->
324
- <path d="M0,0 Q${o*0.2},0 ${o*0.2},${o*0.2} Q0,${o*0.2} 0,0" fill="${n}"/>
325
- <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}"/>
324
+ <path d="M0,0 Q${r*0.2},0 ${r*0.2},${r*0.2} Q0,${r*0.2} 0,0" fill="${n}"/>
325
+ <path d="M${r},${r} Q${r*0.8},${r} ${r*0.8},${r*0.8} Q${r},${r*0.8} ${r},${r}" fill="${n}"/>
326
326
  </svg>
327
- `;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function Nb({primaryColor:t="#2D3D6B",secondaryColor:n="#6B8CC7",accentColor:b="#FFFFFF",size:o=60}={}){let l=`
328
- <svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}">
329
- <rect width="${o}" height="${o}" fill="${t}"/>
327
+ `;return`data:image/svg+xml,${encodeURIComponent(a.trim())}`}function Zl({primaryColor:t="#2D3D6B",secondaryColor:n="#6B8CC7",accentColor:o="#FFFFFF",size:r=60}={}){let a=`
328
+ <svg xmlns="http://www.w3.org/2000/svg" width="${r}" height="${r}" viewBox="0 0 ${r} ${r}">
329
+ <rect width="${r}" height="${r}" fill="${t}"/>
330
330
  <!-- Southern Cross / Tuareg Star -->
331
- <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"
332
- fill="none" stroke="${b}" stroke-width="2"/>
333
- <circle cx="${o*0.5}" cy="${o*0.5}" r="${o*0.1}" fill="${n}"/>
331
+ <path d="M${r*0.5} 0 L${r*0.6} ${r*0.4} L${r} ${r*0.5} L${r*0.6} ${r*0.6} L${r*0.5} ${r} L${r*0.4} ${r*0.6} L0 ${r*0.5} L${r*0.4} ${r*0.4} Z"
332
+ fill="none" stroke="${o}" stroke-width="2"/>
333
+ <circle cx="${r*0.5}" cy="${r*0.5}" r="${r*0.1}" fill="${n}"/>
334
334
  </svg>
335
- `;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function Kb({inkColor:t="#3A2E2C",parchmentColor:n="#F4E4BC",size:b=50}={}){let o=`
336
- <svg xmlns="http://www.w3.org/2000/svg" width="${b}" height="${b}" viewBox="0 0 ${b} ${b}">
337
- <rect width="${b}" height="${b}" fill="${n}"/>
338
- <path d="M${b*0.2} ${b*0.2} L${b*0.4} ${b*0.2} M${b*0.3} ${b*0.2} L${b*0.3} ${b*0.5} Q${b*0.4} ${b*0.6} ${b*0.2} ${b*0.7}"
335
+ `;return`data:image/svg+xml,${encodeURIComponent(a.trim())}`}function zl({inkColor:t="#3A2E2C",parchmentColor:n="#F4E4BC",size:o=50}={}){let r=`
336
+ <svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}">
337
+ <rect width="${o}" height="${o}" fill="${n}"/>
338
+ <path d="M${o*0.2} ${o*0.2} L${o*0.4} ${o*0.2} M${o*0.3} ${o*0.2} L${o*0.3} ${o*0.5} Q${o*0.4} ${o*0.6} ${o*0.2} ${o*0.7}"
339
339
  fill="none" stroke="${t}" stroke-width="3" stroke-linecap="round"/>
340
- <path d="M${b*0.6} ${b*0.3} C${b*0.8} ${b*0.3} ${b*0.8} ${b*0.6} ${b*0.6} ${b*0.6} L${b*0.8} ${b*0.8}"
340
+ <path d="M${o*0.6} ${o*0.3} C${o*0.8} ${o*0.3} ${o*0.8} ${o*0.6} ${o*0.6} ${o*0.6} L${o*0.8} ${o*0.8}"
341
341
  fill="none" stroke="${t}" stroke-width="3" stroke-linecap="round"/>
342
342
  </svg>
343
- `;return`data:image/svg+xml,${encodeURIComponent(o.trim())}`}function jb({clayColor:t="#4E342E",earthColor:n="#3E2723",accentColor:b="#BCAAA4",size:o=60}={}){let l=`
344
- <svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}">
345
- <rect width="${o}" height="${o}" fill="${n}"/>
346
- <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}"
347
- fill="${t}" stroke="${b}" stroke-width="2"/>
343
+ `;return`data:image/svg+xml,${encodeURIComponent(r.trim())}`}function tb({clayColor:t="#4E342E",earthColor:n="#3E2723",accentColor:o="#BCAAA4",size:r=60}={}){let a=`
344
+ <svg xmlns="http://www.w3.org/2000/svg" width="${r}" height="${r}" viewBox="0 0 ${r} ${r}">
345
+ <rect width="${r}" height="${r}" fill="${n}"/>
346
+ <path d="M${r*0.2} ${r*0.5} Q${r*0.3} ${r*0.2} ${r*0.5} ${r*0.3} T${r*0.8} ${r*0.5} Q${r*0.7} ${r*0.8} ${r*0.5} ${r*0.7} T${r*0.2} ${r*0.5}"
347
+ fill="${t}" stroke="${o}" stroke-width="2"/>
348
348
  </svg>
349
- `;return`data:image/svg+xml,${encodeURIComponent(l.trim())}`}function Oo({primaryColor:t="#334155",secondaryColor:n="#1e293b",size:b=100}={}){let o=`
350
- <svg xmlns="http://www.w3.org/2000/svg" width="${b}" height="${b}" viewBox="0 0 100 100">
349
+ `;return`data:image/svg+xml,${encodeURIComponent(a.trim())}`}function kr({primaryColor:t="#334155",secondaryColor:n="#1e293b",size:o=100}={}){let r=`
350
+ <svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 100 100">
351
351
  <rect width="100" height="100" fill="${n}"/>
352
352
  <path d="M10 10 H90 V90 H10 Z" fill="none" stroke="${t}" stroke-width="0.5" opacity="0.3"/>
353
353
  <path d="M20 20 V50 H50 V80 H80" fill="none" stroke="${t}" stroke-width="1"/>
@@ -355,20 +355,20 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
355
355
  <circle cx="80" cy="80" r="2" fill="${t}"/>
356
356
  <circle cx="50" cy="50" r="1.5" fill="${t}"/>
357
357
  </svg>
358
- `;return`data:image/svg+xml,${encodeURIComponent(o.trim())}`}var Jt;var Gt=x(()=>{Jt={generatePolygon:Ob,generateShuka:pn,generateHadzabe:un,generateKanga:Wb,generateKangaBorder:Un,generateKitenge:Vn,generateMasaiShield:ub,generateTibeb:yn,generateImigongo:Cn,generateKente:Nn,generateAdinkra:Kn,generateAsoOke:jn,generateAnkara:In,generateBogolan:Pn,generateAdire:no,generateKuba:Tn,generateKubaBorder:mb,generateBerber:to,generateNdebele:en,generateNdebelePaint:Ub,generateZulu:Zn,generateZuluBeads:pb,generateSwazi:sn,generateXhosa:zn,applyPattern:Vb,generateTuareg:Nb,generateGeez:Kb,generateBoli:jb,generateCircuit:Oo,circuit:Oo}});class lo{constructor(t){this.value=t,this.__type="RawHtml",Object.freeze(this)}toString(){return this.value}valueOf(){return this.value}}function Tb(t){return String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function uo({title:t="AfriCode App",meta:n="",stylesheet:b="/styles/africanity.css",children:o}={}){return Q`<!DOCTYPE html>
358
+ `;return`data:image/svg+xml,${encodeURIComponent(r.trim())}`}var Lt;var Mt=m(()=>{Lt={generatePolygon:Kl,generateShuka:lo,generateHadzabe:bo,generateKanga:jl,generateKangaBorder:eo,generateKitenge:io,generateMasaiShield:Il,generateTibeb:$o,generateImigongo:mo,generateKente:ho,generateAdinkra:fo,generateAsoOke:co,generateAnkara:go,generateBogolan:vo,generateAdire:_o,generateKuba:po,generateKubaBorder:yl,generateBerber:Ao,generateNdebele:wo,generateNdebelePaint:Pl,generateZulu:uo,generateZuluBeads:Cl,generateSwazi:so,generateXhosa:xo,applyPattern:Tl,generateTuareg:Zl,generateGeez:zl,generateBoli:tb,generateCircuit:kr,circuit:kr}});class Ho{constructor(t){this.value=t,this.__type="RawHtml",Object.freeze(this)}toString(){return this.value}valueOf(){return this.value}}function rb(t){return String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function Mr({title:t="AfriCode App",meta:n="",stylesheet:o="/styles/africanity.css",children:r}={}){return d`<!DOCTYPE html>
359
359
  <html lang="en">
360
360
  <head>
361
361
  <meta charset="UTF-8">
362
362
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
363
363
  <title>${t}</title>
364
364
  ${n}
365
- ${b?Q`<link rel="stylesheet" href="${b}">`:""}
365
+ ${o?d`<link rel="stylesheet" href="${o}">`:""}
366
366
  <script type="module" src="/core/sdk.js"></script>
367
367
  </head>
368
368
  <body>
369
- ${o}
369
+ ${r}
370
370
  </body>
371
- </html>`}function Uo(t){if(t instanceof lo)return t.toString();if(Array.isArray(t))return t.map(Uo).join("");if(t===null||t===void 0||t===!1)return"";if(t===!0)return"true";return Tb(t)}var Q=(t,...n)=>{let b="";for(let o=0;o<t.length;o++)if(b+=t[o],o<n.length)b+=Uo(n[o]);return new lo(b)};var M,ao,$,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 St=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 h of l)a[h]=h;return a},t.getValidEnumValues=(l)=>{let a=t.objectKeys(l).filter((f)=>typeof l[l[f]]!=="number"),h={};for(let f of a)h[f]=l[f];return t.objectValues(h)},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 h in l)if(Object.prototype.hasOwnProperty.call(l,h))a.push(h);return a},t.find=(l,a)=>{for(let h of l)if(a(h))return h;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((h)=>typeof h==="string"?`'${h}'`:h).join(a)}t.joinValues=o,t.jsonStringifyReplacer=(l,a)=>{if(typeof a==="bigint")return a.toString();return a}})(M||(M={}));(function(t){t.mergeShapes=(n,b)=>{return{...n,...b}}})(ao||(ao={}));$=M.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"])});var g,Cb=(t)=>{return JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:")},E;var Tt=x(()=>{St();g=M.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"]);E=class E 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 h=b,f=0;while(f<a.path.length){let r=a.path[f];if(f!==a.path.length-1)h[r]=h[r]||{_errors:[]};else h[r]=h[r]||{_errors:[]},h[r]._errors.push(n(a));h=h[r],f++}}};return o(this),b}static assert(t){if(!(t instanceof E))throw Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,M.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()}};E.create=(t)=>{return new E(t)}});var yb=(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,M.jsonStringifyReplacer)}`;break;case g.unrecognized_keys:b=`Unrecognized key(s) in object: ${M.joinValues(t.keys,", ")}`;break;case g.invalid_union:b="Invalid input";break;case g.invalid_union_discriminator:b=`Invalid discriminator value. Expected ${M.joinValues(t.options)}`;break;case g.invalid_enum_value:b=`Invalid enum value. Expected ${M.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 M.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,M.assertNever(t)}return{message:b}},P;var ho=x(()=>{Tt();St();P=yb});function eb(t){Vo=t}function ct(){return Vo}var Vo;var Ct=x(()=>{ho();Vo=P});function w(t,n){let b=ct(),o=Ft({issueData:n,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,b,b===P?void 0:P].filter((l)=>!!l)});t.common.issues.push(o)}class F{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 q;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 F.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 q;if(a.status==="aborted")return q;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 Ft=(t)=>{let{data:n,path:b,errorMaps:o,issueData:l}=t,a=[...b,...l.path||[]],h={...l,path:a};if(l.message!==void 0)return{...l,path:a,message:l.message};let f="",r=o.filter((A)=>!!A).slice().reverse();for(let A of r)f=A(h,{data:n,defaultError:f}).message;return{...l,path:a,message:f}},Zb,q,lt=(t)=>({status:"dirty",value:t}),R=(t)=>({status:"valid",value:t}),yt=(t)=>t.status==="aborted",et=(t)=>t.status==="dirty",e=(t)=>t.status==="valid",vt=(t)=>typeof Promise<"u"&&t instanceof Promise;var fo=x(()=>{Ct();ho();Zb=[];q=Object.freeze({status:"aborted"})});var No=()=>{};var d;var Ko=x(()=>{(function(t){t.errToObj=(n)=>typeof n==="string"?{message:n}:n||{},t.toString=(n)=>typeof n==="string"?n:n?.message})(d||(d={}))});class p{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 H(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:(h,f)=>{let{message:r}=t;if(h.code==="invalid_enum_value")return{message:r??f.defaultError};if(typeof f.data>"u")return{message:r??o??f.defaultError};if(h.code!=="invalid_type")return{message:f.defaultError};return{message:r??b??f.defaultError}},description:l}}class Y{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 F,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(vt(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 jo(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 e(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)=>e(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(vt(o)?o:Promise.resolve(o));return jo(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),h=()=>l.addIssue({code:g.custom,...b(o)});if(typeof Promise<"u"&&a instanceof Promise)return a.then((f)=>{if(!f)return h(),!1;else return!0});if(!a)return h(),!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 u({schema:this,typeName:k.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 m.create(this,this._def)}nullable(){return C.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return W.create(this)}promise(){return rt.create(this,this._def)}or(t){return qt.create([this,t],this._def)}and(t){return kt.create(this,t,this._def)}transform(t){return new u({...H(this._def),schema:this,typeName:k.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let n=typeof t==="function"?t:()=>t;return new it({...H(this._def),innerType:this,defaultValue:n,typeName:k.ZodDefault})}brand(){return new st({typeName:k.ZodBranded,type:this,...H(this._def)})}catch(t){let n=typeof t==="function"?t:()=>t;return new Lt({...H(this._def),innerType:this,catchValue:n,typeName:k.ZodCatch})}describe(t){return new this.constructor({...this._def,description:t})}pipe(t){return Wt.create(this,t)}readonly(){return Mt.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}function To(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 _l(t){return new RegExp(`^${To(t)}$`)}function Co(t){let n=`${Po}T${To(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 Al(t,n){if((n==="v4"||!n)&&fl.test(t))return!0;if((n==="v6"||!n)&&gl.test(t))return!0;return!1}function dl(t,n){if(!bl.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 xl(t,n){if((n==="v4"||!n)&&rl.test(t))return!0;if((n==="v6"||!n)&&$l.test(t))return!0;return!1}function ql(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(".","")),h=Number.parseInt(n.toFixed(l).replace(".",""));return a%h/10**l}function wt(t){if(t instanceof J){let n={};for(let b in t.shape){let o=t.shape[b];n[b]=m.create(wt(o))}return new J({...t._def,shape:()=>n})}else if(t instanceof W)return new W({...t._def,type:wt(t.element)});else if(t instanceof m)return m.create(wt(t.unwrap()));else if(t instanceof C)return C.create(wt(t.unwrap()));else if(t instanceof K)return K.create(t.items.map((n)=>wt(n)));else return t}function go(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=M.objectKeys(n),a=M.objectKeys(t).filter((f)=>l.indexOf(f)!==-1),h={...t,...n};for(let f of a){let r=go(t[f],n[f]);if(!r.valid)return{valid:!1};h[f]=r.data}return{valid:!0,data:h}}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 h=t[a],f=n[a],r=go(h,f);if(!r.valid)return{valid:!1};l.push(r.data)}return{valid:!0,data:l}}else if(b===$.date&&o===$.date&&+t===+n)return{valid:!0,data:t};else return{valid:!1}}function yo(t,n){return new tt({values:t,typeName:k.ZodEnum,...H(n)})}function Io(t,n){let b=typeof t==="function"?t(n):typeof t==="string"?{message:t}:t;return typeof b==="string"?{message:b}:b}function eo(t,n={},b){if(t)return ht.create().superRefine((o,l)=>{let a=t(o);if(a instanceof Promise)return a.then((h)=>{if(!h){let f=Io(n,o),r=f.fatal??b??!0;l.addIssue({code:"custom",...f,fatal:r})}});if(!a){let h=Io(n,o),f=h.fatal??b??!0;l.addIssue({code:"custom",...h,fatal:f})}return});return ht.create()}var jo=(t,n)=>{if(e(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 E(t.common.issues);return this._error=b,this._error}}}},sb,zb,tl,nl,ol,bl,ll,al,hl="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",ro,fl,rl,gl,$l,cl,vl,Po="((\\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])))",wl,O,s,z,At,at,Rt,dt,xt,ht,Z,N,Bt,W,J,qt,T=(t)=>{if(t instanceof Ht)return T(t.schema);else if(t instanceof u)return T(t.innerType());else if(t instanceof Yt)return[t.value];else if(t instanceof tt)return t.options;else if(t instanceof Xt)return M.objectValues(t.enum);else if(t instanceof it)return T(t._def.innerType);else if(t instanceof dt)return[void 0];else if(t instanceof xt)return[null];else if(t instanceof m)return[void 0,...T(t.unwrap())];else if(t instanceof C)return[null,...T(t.unwrap())];else if(t instanceof st)return T(t.unwrap());else if(t instanceof Mt)return T(t.unwrap());else if(t instanceof Lt)return T(t._def.innerType);else return[]},Zt,kt,K,Dt,Et,ft,_t,Ht,Yt,tt,Xt,rt,u,m,C,it,Lt,Ot,kl,st,Wt,Mt,Hl,k,Yl=(t,n={message:`Input not instance of ${t.name}`})=>eo((b)=>b instanceof t,n),Zo,so,Xl,il,zo,Ll,Ml,Ql,Jl,Gl,Sl,Fl,Rl,Bl,Dl,El,Ol,Wl,ml,pl,ul,Ul,Vl,Nl,Kl,jl,Il,Pl,Tl,Cl,yl,el,Zl,sl,zl=()=>Zo().optional(),ta=()=>so().optional(),na=()=>zo().optional(),oa,ba;var t0=x(()=>{Tt();Ct();Ko();fo();St();sb=/^c[^\s-]{8,}$/i,zb=/^[0-9a-z]+$/,tl=/^[0-9A-HJKMNP-TV-Z]{26}$/i,nl=/^[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,ol=/^[a-z0-9_-]{21}$/i,bl=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,ll=/^[-+]?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)?)??$/,al=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,fl=/^(?:(?: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])$/,rl=/^(?:(?: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])$/,gl=/^(([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]))$/,$l=/^(([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])$/,cl=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,vl=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,wl=new RegExp(`^${Po}$`);O=class O extends Y{_parse(t){if(this._def.coerce)t.data=String(t.data);if(this._getType(t)!==$.string){let l=this._getOrReturnCtx(t);return w(l,{code:g.invalid_type,expected:$.string,received:l.parsedType}),q}let b=new F,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),w(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),w(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,h=t.data.length<l.value;if(a||h){if(o=this._getOrReturnCtx(t,o),a)w(o,{code:g.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message});else if(h)w(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(!al.test(t.data))o=this._getOrReturnCtx(t,o),w(o,{validation:"email",code:g.invalid_string,message:l.message}),b.dirty()}else if(l.kind==="emoji"){if(!ro)ro=new RegExp(hl,"u");if(!ro.test(t.data))o=this._getOrReturnCtx(t,o),w(o,{validation:"emoji",code:g.invalid_string,message:l.message}),b.dirty()}else if(l.kind==="uuid"){if(!nl.test(t.data))o=this._getOrReturnCtx(t,o),w(o,{validation:"uuid",code:g.invalid_string,message:l.message}),b.dirty()}else if(l.kind==="nanoid"){if(!ol.test(t.data))o=this._getOrReturnCtx(t,o),w(o,{validation:"nanoid",code:g.invalid_string,message:l.message}),b.dirty()}else if(l.kind==="cuid"){if(!sb.test(t.data))o=this._getOrReturnCtx(t,o),w(o,{validation:"cuid",code:g.invalid_string,message:l.message}),b.dirty()}else if(l.kind==="cuid2"){if(!zb.test(t.data))o=this._getOrReturnCtx(t,o),w(o,{validation:"cuid2",code:g.invalid_string,message:l.message}),b.dirty()}else if(l.kind==="ulid"){if(!tl.test(t.data))o=this._getOrReturnCtx(t,o),w(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),w(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),w(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),w(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),w(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),w(o,{code:g.invalid_string,validation:{endsWith:l.value},message:l.message}),b.dirty()}else if(l.kind==="datetime"){if(!Co(l).test(t.data))o=this._getOrReturnCtx(t,o),w(o,{code:g.invalid_string,validation:"datetime",message:l.message}),b.dirty()}else if(l.kind==="date"){if(!wl.test(t.data))o=this._getOrReturnCtx(t,o),w(o,{code:g.invalid_string,validation:"date",message:l.message}),b.dirty()}else if(l.kind==="time"){if(!_l(l).test(t.data))o=this._getOrReturnCtx(t,o),w(o,{code:g.invalid_string,validation:"time",message:l.message}),b.dirty()}else if(l.kind==="duration"){if(!ll.test(t.data))o=this._getOrReturnCtx(t,o),w(o,{validation:"duration",code:g.invalid_string,message:l.message}),b.dirty()}else if(l.kind==="ip"){if(!Al(t.data,l.version))o=this._getOrReturnCtx(t,o),w(o,{validation:"ip",code:g.invalid_string,message:l.message}),b.dirty()}else if(l.kind==="jwt"){if(!dl(t.data,l.alg))o=this._getOrReturnCtx(t,o),w(o,{validation:"jwt",code:g.invalid_string,message:l.message}),b.dirty()}else if(l.kind==="cidr"){if(!xl(t.data,l.version))o=this._getOrReturnCtx(t,o),w(o,{validation:"cidr",code:g.invalid_string,message:l.message}),b.dirty()}else if(l.kind==="base64"){if(!cl.test(t.data))o=this._getOrReturnCtx(t,o),w(o,{validation:"base64",code:g.invalid_string,message:l.message}),b.dirty()}else if(l.kind==="base64url"){if(!vl.test(t.data))o=this._getOrReturnCtx(t,o),w(o,{validation:"base64url",code:g.invalid_string,message:l.message}),b.dirty()}else M.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,...d.errToObj(b)})}_addCheck(t){return new O({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...d.errToObj(t)})}url(t){return this._addCheck({kind:"url",...d.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...d.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...d.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...d.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...d.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...d.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...d.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...d.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...d.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...d.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...d.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...d.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,...d.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,...d.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...d.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...d.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...d.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...d.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...d.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...d.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...d.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...d.errToObj(n)})}nonempty(t){return this.min(1,d.errToObj(t))}trim(){return new O({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new O({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new O({...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}};O.create=(t)=>{return new O({checks:[],typeName:k.ZodString,coerce:t?.coerce??!1,...H(t)})};s=class s extends Y{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 w(l,{code:g.invalid_type,expected:$.number,received:l.parsedType}),q}let b=void 0,o=new F;for(let l of this._def.checks)if(l.kind==="int"){if(!M.isInteger(t.data))b=this._getOrReturnCtx(t,b),w(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),w(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),w(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(ql(t.data,l.value)!==0)b=this._getOrReturnCtx(t,b),w(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),w(b,{code:g.not_finite,message:l.message}),o.dirty()}else M.assertNever(l);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,d.toString(n))}gt(t,n){return this.setLimit("min",t,!1,d.toString(n))}lte(t,n){return this.setLimit("max",t,!0,d.toString(n))}lt(t,n){return this.setLimit("max",t,!1,d.toString(n))}setLimit(t,n,b,o){return new s({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:b,message:d.toString(o)}]})}_addCheck(t){return new s({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:d.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:d.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:d.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:d.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:d.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:d.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:d.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:d.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:d.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"&&M.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)}};s.create=(t)=>{return new s({checks:[],typeName:k.ZodNumber,coerce:t?.coerce||!1,...H(t)})};z=class z extends Y{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 F;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),w(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),w(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),w(b,{code:g.not_multiple_of,multipleOf:l.value,message:l.message}),o.dirty()}else M.assertNever(l);return{status:o.value,value:t.data}}_getInvalidInput(t){let n=this._getOrReturnCtx(t);return w(n,{code:g.invalid_type,expected:$.bigint,received:n.parsedType}),q}gte(t,n){return this.setLimit("min",t,!0,d.toString(n))}gt(t,n){return this.setLimit("min",t,!1,d.toString(n))}lte(t,n){return this.setLimit("max",t,!0,d.toString(n))}lt(t,n){return this.setLimit("max",t,!1,d.toString(n))}setLimit(t,n,b,o){return new z({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:b,message:d.toString(o)}]})}_addCheck(t){return new z({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:d.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:d.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:d.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:d.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:d.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}};z.create=(t)=>{return new z({checks:[],typeName:k.ZodBigInt,coerce:t?.coerce??!1,...H(t)})};At=class At extends Y{_parse(t){if(this._def.coerce)t.data=Boolean(t.data);if(this._getType(t)!==$.boolean){let b=this._getOrReturnCtx(t);return w(b,{code:g.invalid_type,expected:$.boolean,received:b.parsedType}),q}return R(t.data)}};At.create=(t)=>{return new At({typeName:k.ZodBoolean,coerce:t?.coerce||!1,...H(t)})};at=class at extends Y{_parse(t){if(this._def.coerce)t.data=new Date(t.data);if(this._getType(t)!==$.date){let l=this._getOrReturnCtx(t);return w(l,{code:g.invalid_type,expected:$.date,received:l.parsedType}),q}if(Number.isNaN(t.data.getTime())){let l=this._getOrReturnCtx(t);return w(l,{code:g.invalid_date}),q}let b=new F,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),w(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),w(o,{code:g.too_big,message:l.message,inclusive:!0,exact:!1,maximum:l.value,type:"date"}),b.dirty()}else M.assertNever(l);return{status:b.value,value:new Date(t.data.getTime())}}_addCheck(t){return new at({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:d.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:d.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}};at.create=(t)=>{return new at({checks:[],coerce:t?.coerce||!1,typeName:k.ZodDate,...H(t)})};Rt=class Rt extends Y{_parse(t){if(this._getType(t)!==$.symbol){let b=this._getOrReturnCtx(t);return w(b,{code:g.invalid_type,expected:$.symbol,received:b.parsedType}),q}return R(t.data)}};Rt.create=(t)=>{return new Rt({typeName:k.ZodSymbol,...H(t)})};dt=class dt extends Y{_parse(t){if(this._getType(t)!==$.undefined){let b=this._getOrReturnCtx(t);return w(b,{code:g.invalid_type,expected:$.undefined,received:b.parsedType}),q}return R(t.data)}};dt.create=(t)=>{return new dt({typeName:k.ZodUndefined,...H(t)})};xt=class xt extends Y{_parse(t){if(this._getType(t)!==$.null){let b=this._getOrReturnCtx(t);return w(b,{code:g.invalid_type,expected:$.null,received:b.parsedType}),q}return R(t.data)}};xt.create=(t)=>{return new xt({typeName:k.ZodNull,...H(t)})};ht=class ht extends Y{constructor(){super(...arguments);this._any=!0}_parse(t){return R(t.data)}};ht.create=(t)=>{return new ht({typeName:k.ZodAny,...H(t)})};Z=class Z extends Y{constructor(){super(...arguments);this._unknown=!0}_parse(t){return R(t.data)}};Z.create=(t)=>{return new Z({typeName:k.ZodUnknown,...H(t)})};N=class N extends Y{_parse(t){let n=this._getOrReturnCtx(t);return w(n,{code:g.invalid_type,expected:$.never,received:n.parsedType}),q}};N.create=(t)=>{return new N({typeName:k.ZodNever,...H(t)})};Bt=class Bt extends Y{_parse(t){if(this._getType(t)!==$.undefined){let b=this._getOrReturnCtx(t);return w(b,{code:g.invalid_type,expected:$.void,received:b.parsedType}),q}return R(t.data)}};Bt.create=(t)=>{return new Bt({typeName:k.ZodVoid,...H(t)})};W=class W extends Y{_parse(t){let{ctx:n,status:b}=this._processInputParams(t),o=this._def;if(n.parsedType!==$.array)return w(n,{code:g.invalid_type,expected:$.array,received:n.parsedType}),q;if(o.exactLength!==null){let a=n.data.length>o.exactLength.value,h=n.data.length<o.exactLength.value;if(a||h)w(n,{code:a?g.too_big:g.too_small,minimum:h?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)w(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)w(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,h)=>{return o.type._parseAsync(new p(n,a,n.path,h))})).then((a)=>{return F.mergeArray(b,a)});let l=[...n.data].map((a,h)=>{return o.type._parseSync(new p(n,a,n.path,h))});return F.mergeArray(b,l)}get element(){return this._def.type}min(t,n){return new W({...this._def,minLength:{value:t,message:d.toString(n)}})}max(t,n){return new W({...this._def,maxLength:{value:t,message:d.toString(n)}})}length(t,n){return new W({...this._def,exactLength:{value:t,message:d.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:k.ZodArray,...H(n)})};J=class J extends Y{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=M.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==$.object){let r=this._getOrReturnCtx(t);return w(r,{code:g.invalid_type,expected:$.object,received:r.parsedType}),q}let{status:b,ctx:o}=this._processInputParams(t),{shape:l,keys:a}=this._getCached(),h=[];if(!(this._def.catchall instanceof N&&this._def.unknownKeys==="strip")){for(let r in o.data)if(!a.includes(r))h.push(r)}let f=[];for(let r of a){let A=l[r],L=o.data[r];f.push({key:{status:"valid",value:r},value:A._parse(new p(o,L,o.path,r)),alwaysSet:r in o.data})}if(this._def.catchall instanceof N){let r=this._def.unknownKeys;if(r==="passthrough")for(let A of h)f.push({key:{status:"valid",value:A},value:{status:"valid",value:o.data[A]}});else if(r==="strict"){if(h.length>0)w(o,{code:g.unrecognized_keys,keys:h}),b.dirty()}else if(r==="strip");else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let r=this._def.catchall;for(let A of h){let L=o.data[A];f.push({key:{status:"valid",value:A},value:r._parse(new p(o,L,o.path,A)),alwaysSet:A in o.data})}}if(o.common.async)return Promise.resolve().then(async()=>{let r=[];for(let A of f){let L=await A.key,S=await A.value;r.push({key:L,value:S,alwaysSet:A.alwaysSet})}return r}).then((r)=>{return F.mergeObjectSync(b,r)});else return F.mergeObjectSync(b,f)}get shape(){return this._def.shape()}strict(t){return d.errToObj,new J({...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:d.errToObj(t).message??o};return{message:o}}}:{}})}strip(){return new J({...this._def,unknownKeys:"strip"})}passthrough(){return new J({...this._def,unknownKeys:"passthrough"})}extend(t){return new J({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new J({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:k.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new J({...this._def,catchall:t})}pick(t){let n={};for(let b of M.objectKeys(t))if(t[b]&&this.shape[b])n[b]=this.shape[b];return new J({...this._def,shape:()=>n})}omit(t){let n={};for(let b of M.objectKeys(this.shape))if(!t[b])n[b]=this.shape[b];return new J({...this._def,shape:()=>n})}deepPartial(){return wt(this)}partial(t){let n={};for(let b of M.objectKeys(this.shape)){let o=this.shape[b];if(t&&!t[b])n[b]=o;else n[b]=o.optional()}return new J({...this._def,shape:()=>n})}required(t){let n={};for(let b of M.objectKeys(this.shape))if(t&&!t[b])n[b]=this.shape[b];else{let l=this.shape[b];while(l instanceof m)l=l._def.innerType;n[b]=l}return new J({...this._def,shape:()=>n})}keyof(){return yo(M.objectKeys(this.shape))}};J.create=(t,n)=>{return new J({shape:()=>t,unknownKeys:"strip",catchall:N.create(),typeName:k.ZodObject,...H(n)})};J.strictCreate=(t,n)=>{return new J({shape:()=>t,unknownKeys:"strict",catchall:N.create(),typeName:k.ZodObject,...H(n)})};J.lazycreate=(t,n)=>{return new J({shape:t,unknownKeys:"strip",catchall:N.create(),typeName:k.ZodObject,...H(n)})};qt=class qt extends Y{_parse(t){let{ctx:n}=this._processInputParams(t),b=this._def.options;function o(l){for(let h of l)if(h.result.status==="valid")return h.result;for(let h of l)if(h.result.status==="dirty")return n.common.issues.push(...h.ctx.common.issues),h.result;let a=l.map((h)=>new E(h.ctx.common.issues));return w(n,{code:g.invalid_union,unionErrors:a}),q}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 f of b){let r={...n,common:{...n.common,issues:[]},parent:null},A=f._parseSync({data:n.data,path:n.path,parent:r});if(A.status==="valid")return A;else if(A.status==="dirty"&&!l)l={result:A,ctx:r};if(r.common.issues.length)a.push(r.common.issues)}if(l)return n.common.issues.push(...l.ctx.common.issues),l.result;let h=a.map((f)=>new E(f));return w(n,{code:g.invalid_union,unionErrors:h}),q}}get options(){return this._def.options}};qt.create=(t,n)=>{return new qt({options:t,typeName:k.ZodUnion,...H(n)})};Zt=class Zt extends Y{_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==$.object)return w(n,{code:g.invalid_type,expected:$.object,received:n.parsedType}),q;let b=this.discriminator,o=n.data[b],l=this.optionsMap.get(o);if(!l)return w(n,{code:g.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[b]}),q;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=T(l.shape[t]);if(!a.length)throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let h of a){if(o.has(h))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(h)}`);o.set(h,l)}}return new Zt({typeName:k.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...H(b)})}};kt=class kt extends Y{_parse(t){let{status:n,ctx:b}=this._processInputParams(t),o=(l,a)=>{if(yt(l)||yt(a))return q;let h=go(l.value,a.value);if(!h.valid)return w(b,{code:g.invalid_intersection_types}),q;if(et(l)||et(a))n.dirty();return{status:n.value,value:h.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}))}};kt.create=(t,n,b)=>{return new kt({left:t,right:n,typeName:k.ZodIntersection,...H(b)})};K=class K extends Y{_parse(t){let{status:n,ctx:b}=this._processInputParams(t);if(b.parsedType!==$.array)return w(b,{code:g.invalid_type,expected:$.array,received:b.parsedType}),q;if(b.data.length<this._def.items.length)return w(b,{code:g.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),q;if(!this._def.rest&&b.data.length>this._def.items.length)w(b,{code:g.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty();let l=[...b.data].map((a,h)=>{let f=this._def.items[h]||this._def.rest;if(!f)return null;return f._parse(new p(b,a,b.path,h))}).filter((a)=>!!a);if(b.common.async)return Promise.all(l).then((a)=>{return F.mergeArray(n,a)});else return F.mergeArray(n,l)}get items(){return this._def.items}rest(t){return new K({...this._def,rest:t})}};K.create=(t,n)=>{if(!Array.isArray(t))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new K({items:t,typeName:k.ZodTuple,rest:null,...H(n)})};Dt=class Dt extends Y{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 w(b,{code:g.invalid_type,expected:$.object,received:b.parsedType}),q;let o=[],l=this._def.keyType,a=this._def.valueType;for(let h in b.data)o.push({key:l._parse(new p(b,h,b.path,h)),value:a._parse(new p(b,b.data[h],b.path,h)),alwaysSet:h in b.data});if(b.common.async)return F.mergeObjectAsync(n,o);else return F.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,b){if(n instanceof Y)return new Dt({keyType:t,valueType:n,typeName:k.ZodRecord,...H(b)});return new Dt({keyType:O.create(),valueType:t,typeName:k.ZodRecord,...H(n)})}};Et=class Et extends Y{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 w(b,{code:g.invalid_type,expected:$.map,received:b.parsedType}),q;let o=this._def.keyType,l=this._def.valueType,a=[...b.data.entries()].map(([h,f],r)=>{return{key:o._parse(new p(b,h,b.path,[r,"key"])),value:l._parse(new p(b,f,b.path,[r,"value"]))}});if(b.common.async){let h=new Map;return Promise.resolve().then(async()=>{for(let f of a){let r=await f.key,A=await f.value;if(r.status==="aborted"||A.status==="aborted")return q;if(r.status==="dirty"||A.status==="dirty")n.dirty();h.set(r.value,A.value)}return{status:n.value,value:h}})}else{let h=new Map;for(let f of a){let{key:r,value:A}=f;if(r.status==="aborted"||A.status==="aborted")return q;if(r.status==="dirty"||A.status==="dirty")n.dirty();h.set(r.value,A.value)}return{status:n.value,value:h}}}};Et.create=(t,n,b)=>{return new Et({valueType:n,keyType:t,typeName:k.ZodMap,...H(b)})};ft=class ft extends Y{_parse(t){let{status:n,ctx:b}=this._processInputParams(t);if(b.parsedType!==$.set)return w(b,{code:g.invalid_type,expected:$.set,received:b.parsedType}),q;let o=this._def;if(o.minSize!==null){if(b.data.size<o.minSize.value)w(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)w(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(f){let r=new Set;for(let A of f){if(A.status==="aborted")return q;if(A.status==="dirty")n.dirty();r.add(A.value)}return{status:n.value,value:r}}let h=[...b.data.values()].map((f,r)=>l._parse(new p(b,f,b.path,r)));if(b.common.async)return Promise.all(h).then((f)=>a(f));else return a(h)}min(t,n){return new ft({...this._def,minSize:{value:t,message:d.toString(n)}})}max(t,n){return new ft({...this._def,maxSize:{value:t,message:d.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}};ft.create=(t,n)=>{return new ft({valueType:t,minSize:null,maxSize:null,typeName:k.ZodSet,...H(n)})};_t=class _t extends Y{constructor(){super(...arguments);this.validate=this.implement}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==$.function)return w(n,{code:g.invalid_type,expected:$.function,received:n.parsedType}),q;function b(h,f){return Ft({data:h,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ct(),P].filter((r)=>!!r),issueData:{code:g.invalid_arguments,argumentsError:f}})}function o(h,f){return Ft({data:h,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ct(),P].filter((r)=>!!r),issueData:{code:g.invalid_return_type,returnTypeError:f}})}let l={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof rt){let h=this;return R(async function(...f){let r=new E([]),A=await h._def.args.parseAsync(f,l).catch((G)=>{throw r.addIssue(b(f,G)),r}),L=await Reflect.apply(a,this,A);return await h._def.returns._def.type.parseAsync(L,l).catch((G)=>{throw r.addIssue(o(L,G)),r})})}else{let h=this;return R(function(...f){let r=h._def.args.safeParse(f,l);if(!r.success)throw new E([b(f,r.error)]);let A=Reflect.apply(a,this,r.data),L=h._def.returns.safeParse(A,l);if(!L.success)throw new E([o(A,L.error)]);return L.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new _t({...this._def,args:K.create(t).rest(Z.create())})}returns(t){return new _t({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,b){return new _t({args:t?t:K.create([]).rest(Z.create()),returns:n||Z.create(),typeName:k.ZodFunction,...H(b)})}};Ht=class Ht extends Y{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})}};Ht.create=(t,n)=>{return new Ht({getter:t,typeName:k.ZodLazy,...H(n)})};Yt=class Yt extends Y{_parse(t){if(t.data!==this._def.value){let n=this._getOrReturnCtx(t);return w(n,{received:n.data,code:g.invalid_literal,expected:this._def.value}),q}return{status:"valid",value:t.data}}get value(){return this._def.value}};Yt.create=(t,n)=>{return new Yt({value:t,typeName:k.ZodLiteral,...H(n)})};tt=class tt extends Y{_parse(t){if(typeof t.data!=="string"){let n=this._getOrReturnCtx(t),b=this._def.values;return w(n,{expected:M.joinValues(b),received:n.parsedType,code:g.invalid_type}),q}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 w(n,{received:n.data,code:g.invalid_enum_value,options:b}),q}return R(t.data)}get options(){return this._def.values}get enum(){let t={};for(let n of this._def.values)t[n]=n;return t}get Values(){let t={};for(let n of this._def.values)t[n]=n;return t}get Enum(){let t={};for(let n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return tt.create(t,{...this._def,...n})}exclude(t,n=this._def){return tt.create(this.options.filter((b)=>!t.includes(b)),{...this._def,...n})}};tt.create=yo;Xt=class Xt extends Y{_parse(t){let n=M.getValidEnumValues(this._def.values),b=this._getOrReturnCtx(t);if(b.parsedType!==$.string&&b.parsedType!==$.number){let o=M.objectValues(n);return w(b,{expected:M.joinValues(o),received:b.parsedType,code:g.invalid_type}),q}if(!this._cache)this._cache=new Set(M.getValidEnumValues(this._def.values));if(!this._cache.has(t.data)){let o=M.objectValues(n);return w(b,{received:b.data,code:g.invalid_enum_value,options:o}),q}return R(t.data)}get enum(){return this._def.values}};Xt.create=(t,n)=>{return new Xt({values:t,typeName:k.ZodNativeEnum,...H(n)})};rt=class rt extends Y{unwrap(){return this._def.type}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==$.promise&&n.common.async===!1)return w(n,{code:g.invalid_type,expected:$.promise,received:n.parsedType}),q;let b=n.parsedType===$.promise?n.data:Promise.resolve(n.data);return R(b.then((o)=>{return this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})}))}};rt.create=(t,n)=>{return new rt({type:t,typeName:k.ZodPromise,...H(n)})};u=class u extends Y{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===k.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(w(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(h)=>{if(n.value==="aborted")return q;let f=await this._def.schema._parseAsync({data:h,path:b.path,parent:b});if(f.status==="aborted")return q;if(f.status==="dirty")return lt(f.value);if(n.value==="dirty")return lt(f.value);return f});else{if(n.value==="aborted")return q;let h=this._def.schema._parseSync({data:a,path:b.path,parent:b});if(h.status==="aborted")return q;if(h.status==="dirty")return lt(h.value);if(n.value==="dirty")return lt(h.value);return h}}if(o.type==="refinement"){let a=(h)=>{let f=o.refinement(h,l);if(b.common.async)return Promise.resolve(f);if(f instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return h};if(b.common.async===!1){let h=this._def.schema._parseSync({data:b.data,path:b.path,parent:b});if(h.status==="aborted")return q;if(h.status==="dirty")n.dirty();return a(h.value),{status:n.value,value:h.value}}else return this._def.schema._parseAsync({data:b.data,path:b.path,parent:b}).then((h)=>{if(h.status==="aborted")return q;if(h.status==="dirty")n.dirty();return a(h.value).then(()=>{return{status:n.value,value:h.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(!e(a))return q;let h=o.transform(a.value,l);if(h instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:h}}else return this._def.schema._parseAsync({data:b.data,path:b.path,parent:b}).then((a)=>{if(!e(a))return q;return Promise.resolve(o.transform(a.value,l)).then((h)=>({status:n.value,value:h}))});M.assertNever(o)}};u.create=(t,n,b)=>{return new u({schema:t,typeName:k.ZodEffects,effect:n,...H(b)})};u.createWithPreprocess=(t,n,b)=>{return new u({schema:n,effect:{type:"preprocess",transform:t},typeName:k.ZodEffects,...H(b)})};m=class m extends Y{_parse(t){if(this._getType(t)===$.undefined)return R(void 0);return this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};m.create=(t,n)=>{return new m({innerType:t,typeName:k.ZodOptional,...H(n)})};C=class C extends Y{_parse(t){if(this._getType(t)===$.null)return R(null);return this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};C.create=(t,n)=>{return new C({innerType:t,typeName:k.ZodNullable,...H(n)})};it=class it extends Y{_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}};it.create=(t,n)=>{return new it({innerType:t,typeName:k.ZodDefault,defaultValue:typeof n.default==="function"?n.default:()=>n.default,...H(n)})};Lt=class Lt extends Y{_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(vt(o))return o.then((l)=>{return{status:"valid",value:l.status==="valid"?l.value:this._def.catchValue({get error(){return new E(b.common.issues)},input:b.data})}});else return{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new E(b.common.issues)},input:b.data})}}removeCatch(){return this._def.innerType}};Lt.create=(t,n)=>{return new Lt({innerType:t,typeName:k.ZodCatch,catchValue:typeof n.catch==="function"?n.catch:()=>n.catch,...H(n)})};Ot=class Ot extends Y{_parse(t){if(this._getType(t)!==$.nan){let b=this._getOrReturnCtx(t);return w(b,{code:g.invalid_type,expected:$.nan,received:b.parsedType}),q}return{status:"valid",value:t.data}}};Ot.create=(t)=>{return new Ot({typeName:k.ZodNaN,...H(t)})};kl=Symbol("zod_brand");st=class st extends Y{_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}};Wt=class Wt extends Y{_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 q;if(l.status==="dirty")return n.dirty(),lt(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 q;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 Wt({in:t,out:n,typeName:k.ZodPipeline})}};Mt=class Mt extends Y{_parse(t){let n=this._def.innerType._parse(t),b=(o)=>{if(e(o))o.value=Object.freeze(o.value);return o};return vt(n)?n.then((o)=>b(o)):b(n)}unwrap(){return this._def.innerType}};Mt.create=(t,n)=>{return new Mt({innerType:t,typeName:k.ZodReadonly,...H(n)})};Hl={object:J.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"})(k||(k={}));Zo=O.create,so=s.create,Xl=Ot.create,il=z.create,zo=At.create,Ll=at.create,Ml=Rt.create,Ql=dt.create,Jl=xt.create,Gl=ht.create,Sl=Z.create,Fl=N.create,Rl=Bt.create,Bl=W.create,Dl=J.create,El=J.strictCreate,Ol=qt.create,Wl=Zt.create,ml=kt.create,pl=K.create,ul=Dt.create,Ul=Et.create,Vl=ft.create,Nl=_t.create,Kl=Ht.create,jl=Yt.create,Il=tt.create,Pl=Xt.create,Tl=rt.create,Cl=u.create,yl=m.create,el=C.create,Zl=u.createWithPreprocess,sl=Wt.create,oa={string:(t)=>O.create({...t,coerce:!0}),number:(t)=>s.create({...t,coerce:!0}),boolean:(t)=>At.create({...t,coerce:!0}),bigint:(t)=>z.create({...t,coerce:!0}),date:(t)=>at.create({...t,coerce:!0})},ba=q});var v={};i(v,{void:()=>Rl,util:()=>M,unknown:()=>Sl,union:()=>Ol,undefined:()=>Ql,tuple:()=>pl,transformer:()=>Cl,symbol:()=>Ml,string:()=>Zo,strictObject:()=>El,setErrorMap:()=>eb,set:()=>Vl,record:()=>ul,quotelessJson:()=>Cb,promise:()=>Tl,preprocess:()=>Zl,pipeline:()=>sl,ostring:()=>zl,optional:()=>yl,onumber:()=>ta,oboolean:()=>na,objectUtil:()=>ao,object:()=>Dl,number:()=>so,nullable:()=>el,null:()=>Jl,never:()=>Fl,nativeEnum:()=>Pl,nan:()=>Xl,map:()=>Ul,makeIssue:()=>Ft,literal:()=>jl,lazy:()=>Kl,late:()=>Hl,isValid:()=>e,isDirty:()=>et,isAsync:()=>vt,isAborted:()=>yt,intersection:()=>ml,instanceof:()=>Yl,getParsedType:()=>V,getErrorMap:()=>ct,function:()=>Nl,enum:()=>Il,effect:()=>Cl,discriminatedUnion:()=>Wl,defaultErrorMap:()=>P,datetimeRegex:()=>Co,date:()=>Ll,custom:()=>eo,coerce:()=>oa,boolean:()=>zo,bigint:()=>il,array:()=>Bl,any:()=>Gl,addIssueToContext:()=>w,ZodVoid:()=>Bt,ZodUnknown:()=>Z,ZodUnion:()=>qt,ZodUndefined:()=>dt,ZodType:()=>Y,ZodTuple:()=>K,ZodTransformer:()=>u,ZodSymbol:()=>Rt,ZodString:()=>O,ZodSet:()=>ft,ZodSchema:()=>Y,ZodRecord:()=>Dt,ZodReadonly:()=>Mt,ZodPromise:()=>rt,ZodPipeline:()=>Wt,ZodParsedType:()=>$,ZodOptional:()=>m,ZodObject:()=>J,ZodNumber:()=>s,ZodNullable:()=>C,ZodNull:()=>xt,ZodNever:()=>N,ZodNativeEnum:()=>Xt,ZodNaN:()=>Ot,ZodMap:()=>Et,ZodLiteral:()=>Yt,ZodLazy:()=>Ht,ZodIssueCode:()=>g,ZodIntersection:()=>kt,ZodFunction:()=>_t,ZodFirstPartyTypeKind:()=>k,ZodError:()=>E,ZodEnum:()=>tt,ZodEffects:()=>u,ZodDiscriminatedUnion:()=>Zt,ZodDefault:()=>it,ZodDate:()=>at,ZodCatch:()=>Lt,ZodBranded:()=>st,ZodBoolean:()=>At,ZodBigInt:()=>z,ZodArray:()=>W,ZodAny:()=>ht,Schema:()=>Y,ParseStatus:()=>F,OK:()=>R,NEVER:()=>ba,INVALID:()=>q,EMPTY_PATH:()=>Zb,DIRTY:()=>lt,BRAND:()=>kl});var $o=x(()=>{Ct();fo();No();St();t0();Tt()});var n0=x(()=>{$o();$o()});function co(t,...n){if(la())return;(console[t]||console.log).call(console,...n)}var la=()=>Boolean(globalThis.__AFRICODE_TEST__||globalThis.__AFRICODE_SILENT_LOGS__);function zt(t){if(t===null||typeof t!=="object")return t;if(Array.isArray(t))return t.map(zt);let n={};for(let b of Object.keys(t))n[b]=zt(t[b]);return n}function l0(t,n){let b={...t};for(let o of Object.keys(n))if(n[o]!==null&&typeof n[o]==="object"&&!Array.isArray(n[o])&&typeof t[o]==="object"&&!Array.isArray(t[o]))b[o]=l0(t[o]||{},n[o]);else b[o]=n[o];return b}function a0(t={}){return b0=l0(o0,t),aa=!0,mt()}function mt(){return Object.freeze(zt(b0))}var o0,b0,aa=!1;var vo=x(()=>{o0={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}},b0=zt(o0)});class gt{static validate(t,n){try{return{success:!0,data:t.parse(n)}}catch(b){if(b instanceof v.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 v.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)}}class j{constructor(t,n="string"){this._baseSchema=t,this._fieldType=n,this._isNullable=!1,this._isOptional=!1,this._emptyAsNull=!1,this._trim=!1,this._customMessage=null}nullable(){return this._isNullable=!0,this}optional(){return this._isOptional=!0,this}emptyAsNull(){if(!this._isNullable)throw Error(`[AfriCode] .emptyAsNull() requires .nullable() to be called first. Use: afri.${this._fieldType}().nullable().emptyAsNull()`);return this._emptyAsNull=!0,this}trim(){return this._trim=!0,this}message(t){return this._customMessage=t,this}build(){let t=this._baseSchema;if(this._isNullable)t=t.nullable();if(this._isOptional)t=t.optional();return t}getMeta(){return{fieldType:this._fieldType,isNullable:this._isNullable,isOptional:this._isOptional,emptyAsNull:this._emptyAsNull,trim:this._trim}}}function f0(t,n){let b={...n},o=!1;try{o=mt().validation?.trimStrings===!0}catch{}for(let[l,a]of Object.entries(t)){if(!(a instanceof j))continue;let h=a.getMeta(),f=b[l];if(typeof f==="string"&&(h.trim||o))b[l]=f.trim();if(h.emptyAsNull&&b[l]==="")b[l]=null}return b}function r0(t){let n={};for(let[b,o]of Object.entries(t))if(o instanceof j)n[b]=o.build();else n[b]=o;return v.object(n)}var tn,U,h0;var nn=x(()=>{n0();vo();tn={login:v.object({email:v.string().min(1,"Email is required").email("Please enter a valid email address"),password:v.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:v.object({name:v.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:v.string().min(1,"Email is required").email("Please enter a valid email address"),password:v.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:v.string()}).refine((t)=>t.password===t.confirmPassword,{message:"Passwords don't match",path:["confirmPassword"]}),auth:{register:v.object({action:v.literal("register"),email:v.string().min(1,"Email is required").email("Please enter a valid email address"),username:v.string().min(3,"Username must be at least 3 characters").max(30,"Username must be less than 30 characters"),password:v.string().min(8,"Password must be at least 8 characters"),full_name:v.string().min(2,"Full name is required").max(100,"Full name is too long")}),login:v.object({action:v.literal("login"),email:v.string().min(1,"Email is required").email("Please enter a valid email address"),password:v.string().min(8,"Password must be at least 8 characters")}),logout:v.object({action:v.literal("logout")}),action:v.discriminatedUnion("action",[v.object({action:v.literal("register")}).merge(v.object({email:v.string().min(1,"Email is required").email("Please enter a valid email address"),username:v.string().min(3,"Username must be at least 3 characters").max(30,"Username must be less than 30 characters"),password:v.string().min(8,"Password must be at least 8 characters"),full_name:v.string().min(2,"Full name is required").max(100,"Full name is too long")})),v.object({action:v.literal("login")}).merge(v.object({email:v.string().min(1,"Email is required").email("Please enter a valid email address"),password:v.string().min(8,"Password must be at least 8 characters")})),v.object({action:v.literal("logout")})])},contact:v.object({name:v.string().min(2,"Name must be at least 2 characters").max(100,"Name is too long"),email:v.string().email("Please enter a valid email address"),message:v.string().min(10,"Message must be at least 10 characters").max(1000,"Message is too long")}),email:v.string().min(1,"Email is required").email("Please enter a valid email address"),password:v.string().min(8,"Password must be at least 8 characters").regex(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)/,"Password must contain uppercase, lowercase, and number"),phone:v.string().regex(/^[\+]?[1-9][\d]{0,15}$/,"Please enter a valid phone number"),url:v.string().min(1,"URL is required").url("Please enter a valid URL"),required:v.string().min(1,"This field is required"),positiveNumber:v.number().positive("Must be a positive number"),integer:v.number().int("Must be a whole number"),futureDate:v.date().min(new Date,"Date must be in the future"),imageFile:v.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:v.object({full_name:v.string().min(2,"Full name must be at least 2 characters").max(100,"Full name is too long").optional(),bio:v.string().max(500,"Bio must be less than 500 characters").nullable().optional(),avatar_url:v.string().url("Please enter a valid URL").nullable().optional(),theme:v.enum(["africanity","dark","light","system"]).optional(),language:v.string().min(2).max(10).optional()}),project:v.object({name:v.string().min(1,"Project name is required").max(100,"Project name is too long"),description:v.string().max(1000,"Description is too long").nullable().optional(),repository_url:v.string().url("Please enter a valid repository URL").nullable().optional(),demo_url:v.string().url("Please enter a valid demo URL").nullable().optional(),tags:v.array(v.string()).optional(),is_public:v.boolean().optional()})};U={required:(t="This field is required")=>v.string().min(1,t),email:(t="Please enter a valid email address")=>v.string().email(t),minLength:(t,n)=>v.string().min(t,n||`Must be at least ${t} characters`),maxLength:(t,n)=>v.string().max(t,n||`Must be less than ${t} characters`),pattern:(t,n)=>v.string().regex(t,n),numeric:(t="Must be a number")=>v.string().regex(/^\d+$/,t),phone:(t="Please enter a valid phone number")=>v.string().regex(/^[\+]?[1-9][\d]{0,15}$/,t),url:(t="Please enter a valid URL")=>v.string().min(1,"URL is required").url(t)};h0={url(t="Please enter a valid URL"){return new j(v.string().min(1,"URL cannot be empty").url(t),"url")},email(t="Please enter a valid email address"){return new j(v.string().min(1,"Email cannot be empty").email(t),"email")},string(t={}){let n=v.string();if(t.min!==void 0)n=n.min(t.min,t.message||`Must be at least ${t.min} characters`);if(t.max!==void 0)n=n.max(t.max,t.message||`Must be less than ${t.max} characters`);return new j(n,"string")},number(t={}){let n=v.number();if(t.min!==void 0)n=n.min(t.min);if(t.max!==void 0)n=n.max(t.max);if(t.int)n=n.int("Must be a whole number");return new j(n,"number")},phone(t="Please enter a valid phone number"){return new j(v.string().regex(/^[\+]?[1-9][\d]{0,15}$/,t),"phone")}}});function _(t,n){if(typeof customElements>"u")return;if(!customElements.get(t))customElements.define(t,n)}var fa,A0,c;var X=x(()=>{fa=globalThis.HTMLElement??class{},A0=typeof CSSStyleSheet<"u";c=class c extends fa{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=`
371
+ </html>`}function Yr(t){if(t instanceof Ho)return t.toString();if(Array.isArray(t))return t.map(Yr).join("");if(t===null||t===void 0||t===!1)return"";if(t===!0)return"true";return rb(t)}var d=(t,...n)=>{let o="";for(let r=0;r<t.length;r++)if(o+=t[r],r<n.length)o+=Yr(n[r]);return new Ho(o)};var H,Lo,g,W=(t)=>{switch(typeof t){case"undefined":return g.undefined;case"string":return g.string;case"number":return Number.isNaN(t)?g.nan:g.number;case"boolean":return g.boolean;case"function":return g.function;case"bigint":return g.bigint;case"symbol":return g.symbol;case"object":if(Array.isArray(t))return g.array;if(t===null)return g.null;if(t.then&&typeof t.then==="function"&&t.catch&&typeof t.catch==="function")return g.promise;if(typeof Map<"u"&&t instanceof Map)return g.map;if(typeof Set<"u"&&t instanceof Set)return g.set;if(typeof Date<"u"&&t instanceof Date)return g.date;return g.object;default:return g.unknown}};var Yt=m(()=>{(function(t){t.assertEqual=(a)=>{};function n(a){}t.assertIs=n;function o(a){throw Error()}t.assertNever=o,t.arrayToEnum=(a)=>{let l={};for(let b of a)l[b]=b;return l},t.getValidEnumValues=(a)=>{let l=t.objectKeys(a).filter((e)=>typeof a[a[e]]!=="number"),b={};for(let e of l)b[e]=a[e];return t.objectValues(b)},t.objectValues=(a)=>{return t.objectKeys(a).map(function(l){return a[l]})},t.objectKeys=typeof Object.keys==="function"?(a)=>Object.keys(a):(a)=>{let l=[];for(let b in a)if(Object.prototype.hasOwnProperty.call(a,b))l.push(b);return l},t.find=(a,l)=>{for(let b of a)if(l(b))return b;return},t.isInteger=typeof Number.isInteger==="function"?(a)=>Number.isInteger(a):(a)=>typeof a==="number"&&Number.isFinite(a)&&Math.floor(a)===a;function r(a,l=" | "){return a.map((b)=>typeof b==="string"?`'${b}'`:b).join(l)}t.joinValues=r,t.jsonStringifyReplacer=(a,l)=>{if(typeof l==="bigint")return l.toString();return l}})(H||(H={}));(function(t){t.mergeShapes=(n,o)=>{return{...n,...o}}})(Lo||(Lo={}));g=H.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"])});var c,ab=(t)=>{return JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:")},J;var pn=m(()=>{Yt();c=H.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"]);J=class J extends Error{get errors(){return this.issues}constructor(t){super();this.issues=[],this.addIssue=(o)=>{this.issues=[...this.issues,o]},this.addIssues=(o=[])=>{this.issues=[...this.issues,...o]};let n=new.target.prototype;if(Object.setPrototypeOf)Object.setPrototypeOf(this,n);else this.__proto__=n;this.name="ZodError",this.issues=t}format(t){let n=t||function(a){return a.message},o={_errors:[]},r=(a)=>{for(let l of a.issues)if(l.code==="invalid_union")l.unionErrors.map(r);else if(l.code==="invalid_return_type")r(l.returnTypeError);else if(l.code==="invalid_arguments")r(l.argumentsError);else if(l.path.length===0)o._errors.push(n(l));else{let b=o,e=0;while(e<l.path.length){let i=l.path[e];if(e!==l.path.length-1)b[i]=b[i]||{_errors:[]};else b[i]=b[i]||{_errors:[]},b[i]._errors.push(n(l));b=b[i],e++}}};return r(this),o}static assert(t){if(!(t instanceof J))throw Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,H.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=(n)=>n.message){let n={},o=[];for(let r of this.issues)if(r.path.length>0){let a=r.path[0];n[a]=n[a]||[],n[a].push(t(r))}else o.push(t(r));return{formErrors:o,fieldErrors:n}}get formErrors(){return this.flatten()}};J.create=(t)=>{return new J(t)}});var lb=(t,n)=>{let o;switch(t.code){case c.invalid_type:if(t.received===g.undefined)o="Required";else o=`Expected ${t.expected}, received ${t.received}`;break;case c.invalid_literal:o=`Invalid literal value, expected ${JSON.stringify(t.expected,H.jsonStringifyReplacer)}`;break;case c.unrecognized_keys:o=`Unrecognized key(s) in object: ${H.joinValues(t.keys,", ")}`;break;case c.invalid_union:o="Invalid input";break;case c.invalid_union_discriminator:o=`Invalid discriminator value. Expected ${H.joinValues(t.options)}`;break;case c.invalid_enum_value:o=`Invalid enum value. Expected ${H.joinValues(t.options)}, received '${t.received}'`;break;case c.invalid_arguments:o="Invalid function arguments";break;case c.invalid_return_type:o="Invalid function return type";break;case c.invalid_date:o="Invalid date";break;case c.invalid_string:if(typeof t.validation==="object")if("includes"in t.validation){if(o=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position==="number")o=`${o} at one or more positions greater than or equal to ${t.validation.position}`}else if("startsWith"in t.validation)o=`Invalid input: must start with "${t.validation.startsWith}"`;else if("endsWith"in t.validation)o=`Invalid input: must end with "${t.validation.endsWith}"`;else H.assertNever(t.validation);else if(t.validation!=="regex")o=`Invalid ${t.validation}`;else o="Invalid";break;case c.too_small:if(t.type==="array")o=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`;else if(t.type==="string")o=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`;else if(t.type==="number")o=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`;else if(t.type==="bigint")o=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`;else if(t.type==="date")o=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`;else o="Invalid input";break;case c.too_big:if(t.type==="array")o=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`;else if(t.type==="string")o=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`;else if(t.type==="number")o=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`;else if(t.type==="bigint")o=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`;else if(t.type==="date")o=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`;else o="Invalid input";break;case c.custom:o="Invalid input";break;case c.invalid_intersection_types:o="Intersection results could not be merged";break;case c.not_multiple_of:o=`Number must be a multiple of ${t.multipleOf}`;break;case c.not_finite:o="Number must be finite";break;default:o=n.defaultError,H.assertNever(t)}return{message:o}},j;var Mo=m(()=>{pn();Yt();j=lb});function bb(t){Sr=t}function ct(){return Sr}var Sr;var mn=m(()=>{Mo();Sr=j});function p(t,n){let o=ct(),r=St({issueData:n,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,o,o===j?void 0:j].filter((a)=>!!a)});t.common.issues.push(r)}class S{constructor(){this.value="valid"}dirty(){if(this.value==="valid")this.value="dirty"}abort(){if(this.value!=="aborted")this.value="aborted"}static mergeArray(t,n){let o=[];for(let r of n){if(r.status==="aborted")return x;if(r.status==="dirty")t.dirty();o.push(r.value)}return{status:t.value,value:o}}static async mergeObjectAsync(t,n){let o=[];for(let r of n){let a=await r.key,l=await r.value;o.push({key:a,value:l})}return S.mergeObjectSync(t,o)}static mergeObjectSync(t,n){let o={};for(let r of n){let{key:a,value:l}=r;if(a.status==="aborted")return x;if(l.status==="aborted")return x;if(a.status==="dirty")t.dirty();if(l.status==="dirty")t.dirty();if(a.value!=="__proto__"&&(typeof l.value<"u"||r.alwaysSet))o[a.value]=l.value}return{status:t.value,value:o}}}var St=(t)=>{let{data:n,path:o,errorMaps:r,issueData:a}=t,l=[...o,...a.path||[]],b={...a,path:l};if(a.message!==void 0)return{...a,path:l,message:a.message};let e="",i=r.filter(($)=>!!$).slice().reverse();for(let $ of i)e=$(b,{data:n,defaultError:e}).message;return{...a,path:l,message:e}},eb,x,at=(t)=>({status:"dirty",value:t}),R=(t)=>({status:"valid",value:t}),$n=(t)=>t.status==="aborted",wn=(t)=>t.status==="dirty",P=(t)=>t.status==="valid",dt=(t)=>typeof Promise<"u"&&t instanceof Promise;var Yo=m(()=>{mn();Mo();eb=[];x=Object.freeze({status:"aborted"})});var Rr=()=>{};var w;var Xr=m(()=>{(function(t){t.errToObj=(n)=>typeof n==="string"?{message:n}:n||{},t.toString=(n)=>typeof n==="string"?n:n?.message})(w||(w={}))});class E{constructor(t,n,o,r){this._cachedPath=[],this.parent=t,this.data=n,this._path=o,this._key=r}get path(){if(!this._cachedPath.length)if(Array.isArray(this._key))this._cachedPath.push(...this._path,...this._key);else this._cachedPath.push(...this._path,this._key);return this._cachedPath}}function _(t){if(!t)return{};let{errorMap:n,invalid_type_error:o,required_error:r,description:a}=t;if(n&&(o||r))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if(n)return{errorMap:n,description:a};return{errorMap:(b,e)=>{let{message:i}=t;if(b.code==="invalid_enum_value")return{message:i??e.defaultError};if(typeof e.data>"u")return{message:i??r??e.defaultError};if(b.code!=="invalid_type")return{message:e.defaultError};return{message:i??o??e.defaultError}},description:a}}class k{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 S,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(dt(n))throw Error("Synchronous parse encountered promise.");return n}_parseAsync(t){let n=this._parse(t);return Promise.resolve(n)}parse(t,n){let o=this.safeParse(t,n);if(o.success)return o.data;throw o.error}safeParse(t,n){let o={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:W(t)},r=this._parseSync({data:t,path:o.path,parent:o});return Qr(o,r)}"~validate"(t){let n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:W(t)};if(!this["~standard"].async)try{let o=this._parseSync({data:t,path:[],parent:n});return P(o)?{value:o.value}:{issues:n.common.issues}}catch(o){if(o?.message?.toLowerCase()?.includes("encountered"))this["~standard"].async=!0;n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then((o)=>P(o)?{value:o.value}:{issues:n.common.issues})}async parseAsync(t,n){let o=await this.safeParseAsync(t,n);if(o.success)return o.data;throw o.error}async safeParseAsync(t,n){let o={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:W(t)},r=this._parse({data:t,path:o.path,parent:o}),a=await(dt(r)?r:Promise.resolve(r));return Qr(o,a)}refine(t,n){let o=(r)=>{if(typeof n==="string"||typeof n>"u")return{message:n};else if(typeof n==="function")return n(r);else return n};return this._refinement((r,a)=>{let l=t(r),b=()=>a.addIssue({code:c.custom,...o(r)});if(typeof Promise<"u"&&l instanceof Promise)return l.then((e)=>{if(!e)return b(),!1;else return!0});if(!l)return b(),!1;else return!0})}refinement(t,n){return this._refinement((o,r)=>{if(!t(o))return r.addIssue(typeof n==="function"?n(o,r):n),!1;else return!0})}_refinement(t){return new D({schema:this,typeName:A.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:(n)=>this["~validate"](n)}}optional(){return B.create(this,this._def)}nullable(){return C.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return F.create(this)}promise(){return it.create(this,this._def)}or(t){return wt.create([this,t],this._def)}and(t){return ut.create(this,t,this._def)}transform(t){return new D({..._(this._def),schema:this,typeName:A.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let n=typeof t==="function"?t:()=>t;return new _t({..._(this._def),innerType:this,defaultValue:n,typeName:A.ZodDefault})}brand(){return new sn({typeName:A.ZodBranded,type:this,..._(this._def)})}catch(t){let n=typeof t==="function"?t:()=>t;return new kt({..._(this._def),innerType:this,catchValue:n,typeName:A.ZodCatch})}describe(t){return new this.constructor({...this._def,description:t})}pipe(t){return Ft.create(this,t)}readonly(){return qt.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}function Fr(t){let n="[0-5]\\d";if(t.precision)n=`${n}\\.\\d{${t.precision}}`;else if(t.precision==null)n=`${n}(\\.\\d+)?`;let o=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${n})${o}`}function kb(t){return new RegExp(`^${Fr(t)}$`)}function Br(t){let n=`${Gr}T${Fr(t)}`,o=[];if(o.push(t.local?"Z?":"Z"),t.offset)o.push("([+-]\\d{2}:?\\d{2})");return n=`${n}(${o.join("|")})`,new RegExp(`^${n}$`)}function qb(t,n){if((n==="v4"||!n)&&$b.test(t))return!0;if((n==="v6"||!n)&&ub.test(t))return!0;return!1}function Hb(t,n){if(!gb.test(t))return!1;try{let[o]=t.split(".");if(!o)return!1;let r=o.replace(/-/g,"+").replace(/_/g,"/").padEnd(o.length+(4-o.length%4)%4,"="),a=JSON.parse(atob(r));if(typeof a!=="object"||a===null)return!1;if("typ"in a&&a?.typ!=="JWT")return!1;if(!a.alg)return!1;if(n&&a.alg!==n)return!1;return!0}catch{return!1}}function Lb(t,n){if((n==="v4"||!n)&&wb.test(t))return!0;if((n==="v6"||!n)&&sb.test(t))return!0;return!1}function Mb(t,n){let o=(t.toString().split(".")[1]||"").length,r=(n.toString().split(".")[1]||"").length,a=o>r?o:r,l=Number.parseInt(t.toFixed(a).replace(".","")),b=Number.parseInt(n.toFixed(a).replace(".",""));return l%b/10**a}function gt(t){if(t instanceof L){let n={};for(let o in t.shape){let r=t.shape[o];n[o]=B.create(gt(r))}return new L({...t._def,shape:()=>n})}else if(t instanceof F)return new F({...t._def,type:gt(t.element)});else if(t instanceof B)return B.create(gt(t.unwrap()));else if(t instanceof C)return C.create(gt(t.unwrap()));else if(t instanceof V)return V.create(t.items.map((n)=>gt(n)));else return t}function Ro(t,n){let o=W(t),r=W(n);if(t===n)return{valid:!0,data:t};else if(o===g.object&&r===g.object){let a=H.objectKeys(n),l=H.objectKeys(t).filter((e)=>a.indexOf(e)!==-1),b={...t,...n};for(let e of l){let i=Ro(t[e],n[e]);if(!i.valid)return{valid:!1};b[e]=i.data}return{valid:!0,data:b}}else if(o===g.array&&r===g.array){if(t.length!==n.length)return{valid:!1};let a=[];for(let l=0;l<t.length;l++){let b=t[l],e=n[l],i=Ro(b,e);if(!i.valid)return{valid:!1};a.push(i.data)}return{valid:!0,data:a}}else if(o===g.date&&r===g.date&&+t===+n)return{valid:!0,data:t};else return{valid:!1}}function Er(t,n){return new tt({values:t,typeName:A.ZodEnum,..._(n)})}function Jr(t,n){let o=typeof t==="function"?t(n):typeof t==="string"?{message:t}:t;return typeof o==="string"?{message:o}:o}function Dr(t,n={},o){if(t)return bt.create().superRefine((r,a)=>{let l=t(r);if(l instanceof Promise)return l.then((b)=>{if(!b){let e=Jr(n,r),i=e.fatal??o??!0;a.addIssue({code:"custom",...e,fatal:i})}});if(!l){let b=Jr(n,r),e=b.fatal??o??!0;a.addIssue({code:"custom",...b,fatal:e})}return});return bt.create()}var Qr=(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 o=new J(t.common.issues);return this._error=o,this._error}}}},ib,hb,fb,cb,db,gb,vb,pb,mb="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",So,$b,wb,ub,sb,xb,Ab,Gr="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",_b,G,Z,z,pt,lt,Rt,mt,$t,bt,T,U,Xt,F,L,wt,y=(t)=>{if(t instanceof st)return y(t.schema);else if(t instanceof D)return y(t.innerType());else if(t instanceof xt)return[t.value];else if(t instanceof tt)return t.options;else if(t instanceof At)return H.objectValues(t.enum);else if(t instanceof _t)return y(t._def.innerType);else if(t instanceof mt)return[void 0];else if(t instanceof $t)return[null];else if(t instanceof B)return[void 0,...y(t.unwrap())];else if(t instanceof C)return[null,...y(t.unwrap())];else if(t instanceof sn)return y(t.unwrap());else if(t instanceof qt)return y(t.unwrap());else if(t instanceof kt)return y(t._def.innerType);else return[]},un,ut,V,Qt,Jt,et,vt,st,xt,tt,At,it,D,B,C,_t,kt,Gt,Yb,sn,Ft,qt,Sb,A,Rb=(t,n={message:`Input not instance of ${t.name}`})=>Dr((o)=>o instanceof t,n),Or,Wr,Xb,Qb,Ur,Jb,Gb,Fb,Bb,Eb,Db,Ob,Wb,Ub,Vb,Nb,Kb,jb,yb,Cb,Ib,Pb,Tb,Zb,zb,te,ne,oe,re,ae,le,be,ee,ie,he=()=>Or().optional(),fe=()=>Wr().optional(),ce=()=>Ur().optional(),de,ge;var Vr=m(()=>{pn();mn();Xr();Yo();Yt();ib=/^c[^\s-]{8,}$/i,hb=/^[0-9a-z]+$/,fb=/^[0-9A-HJKMNP-TV-Z]{26}$/i,cb=/^[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,db=/^[a-z0-9_-]{21}$/i,gb=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,vb=/^[-+]?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)?)??$/,pb=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,$b=/^(?:(?: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])$/,wb=/^(?:(?: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])$/,ub=/^(([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]))$/,sb=/^(([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])$/,xb=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ab=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,_b=new RegExp(`^${Gr}$`);G=class G extends k{_parse(t){if(this._def.coerce)t.data=String(t.data);if(this._getType(t)!==g.string){let a=this._getOrReturnCtx(t);return p(a,{code:c.invalid_type,expected:g.string,received:a.parsedType}),x}let o=new S,r=void 0;for(let a of this._def.checks)if(a.kind==="min"){if(t.data.length<a.value)r=this._getOrReturnCtx(t,r),p(r,{code:c.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),o.dirty()}else if(a.kind==="max"){if(t.data.length>a.value)r=this._getOrReturnCtx(t,r),p(r,{code:c.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),o.dirty()}else if(a.kind==="length"){let l=t.data.length>a.value,b=t.data.length<a.value;if(l||b){if(r=this._getOrReturnCtx(t,r),l)p(r,{code:c.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message});else if(b)p(r,{code:c.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message});o.dirty()}}else if(a.kind==="email"){if(!pb.test(t.data))r=this._getOrReturnCtx(t,r),p(r,{validation:"email",code:c.invalid_string,message:a.message}),o.dirty()}else if(a.kind==="emoji"){if(!So)So=new RegExp(mb,"u");if(!So.test(t.data))r=this._getOrReturnCtx(t,r),p(r,{validation:"emoji",code:c.invalid_string,message:a.message}),o.dirty()}else if(a.kind==="uuid"){if(!cb.test(t.data))r=this._getOrReturnCtx(t,r),p(r,{validation:"uuid",code:c.invalid_string,message:a.message}),o.dirty()}else if(a.kind==="nanoid"){if(!db.test(t.data))r=this._getOrReturnCtx(t,r),p(r,{validation:"nanoid",code:c.invalid_string,message:a.message}),o.dirty()}else if(a.kind==="cuid"){if(!ib.test(t.data))r=this._getOrReturnCtx(t,r),p(r,{validation:"cuid",code:c.invalid_string,message:a.message}),o.dirty()}else if(a.kind==="cuid2"){if(!hb.test(t.data))r=this._getOrReturnCtx(t,r),p(r,{validation:"cuid2",code:c.invalid_string,message:a.message}),o.dirty()}else if(a.kind==="ulid"){if(!fb.test(t.data))r=this._getOrReturnCtx(t,r),p(r,{validation:"ulid",code:c.invalid_string,message:a.message}),o.dirty()}else if(a.kind==="url")try{new URL(t.data)}catch{r=this._getOrReturnCtx(t,r),p(r,{validation:"url",code:c.invalid_string,message:a.message}),o.dirty()}else if(a.kind==="regex"){if(a.regex.lastIndex=0,!a.regex.test(t.data))r=this._getOrReturnCtx(t,r),p(r,{validation:"regex",code:c.invalid_string,message:a.message}),o.dirty()}else if(a.kind==="trim")t.data=t.data.trim();else if(a.kind==="includes"){if(!t.data.includes(a.value,a.position))r=this._getOrReturnCtx(t,r),p(r,{code:c.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),o.dirty()}else if(a.kind==="toLowerCase")t.data=t.data.toLowerCase();else if(a.kind==="toUpperCase")t.data=t.data.toUpperCase();else if(a.kind==="startsWith"){if(!t.data.startsWith(a.value))r=this._getOrReturnCtx(t,r),p(r,{code:c.invalid_string,validation:{startsWith:a.value},message:a.message}),o.dirty()}else if(a.kind==="endsWith"){if(!t.data.endsWith(a.value))r=this._getOrReturnCtx(t,r),p(r,{code:c.invalid_string,validation:{endsWith:a.value},message:a.message}),o.dirty()}else if(a.kind==="datetime"){if(!Br(a).test(t.data))r=this._getOrReturnCtx(t,r),p(r,{code:c.invalid_string,validation:"datetime",message:a.message}),o.dirty()}else if(a.kind==="date"){if(!_b.test(t.data))r=this._getOrReturnCtx(t,r),p(r,{code:c.invalid_string,validation:"date",message:a.message}),o.dirty()}else if(a.kind==="time"){if(!kb(a).test(t.data))r=this._getOrReturnCtx(t,r),p(r,{code:c.invalid_string,validation:"time",message:a.message}),o.dirty()}else if(a.kind==="duration"){if(!vb.test(t.data))r=this._getOrReturnCtx(t,r),p(r,{validation:"duration",code:c.invalid_string,message:a.message}),o.dirty()}else if(a.kind==="ip"){if(!qb(t.data,a.version))r=this._getOrReturnCtx(t,r),p(r,{validation:"ip",code:c.invalid_string,message:a.message}),o.dirty()}else if(a.kind==="jwt"){if(!Hb(t.data,a.alg))r=this._getOrReturnCtx(t,r),p(r,{validation:"jwt",code:c.invalid_string,message:a.message}),o.dirty()}else if(a.kind==="cidr"){if(!Lb(t.data,a.version))r=this._getOrReturnCtx(t,r),p(r,{validation:"cidr",code:c.invalid_string,message:a.message}),o.dirty()}else if(a.kind==="base64"){if(!xb.test(t.data))r=this._getOrReturnCtx(t,r),p(r,{validation:"base64",code:c.invalid_string,message:a.message}),o.dirty()}else if(a.kind==="base64url"){if(!Ab.test(t.data))r=this._getOrReturnCtx(t,r),p(r,{validation:"base64url",code:c.invalid_string,message:a.message}),o.dirty()}else H.assertNever(a);return{status:o.value,value:t.data}}_regex(t,n,o){return this.refinement((r)=>t.test(r),{validation:n,code:c.invalid_string,...w.errToObj(o)})}_addCheck(t){return new G({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...w.errToObj(t)})}url(t){return this._addCheck({kind:"url",...w.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...w.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...w.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...w.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...w.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...w.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...w.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...w.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...w.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...w.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...w.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...w.errToObj(t)})}datetime(t){if(typeof t==="string")return this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t});return this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...w.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){if(typeof t==="string")return this._addCheck({kind:"time",precision:null,message:t});return this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...w.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...w.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...w.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...w.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...w.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...w.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...w.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...w.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...w.errToObj(n)})}nonempty(t){return this.min(1,w.errToObj(t))}trim(){return new G({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new G({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new G({...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}};G.create=(t)=>{return new G({checks:[],typeName:A.ZodString,coerce:t?.coerce??!1,..._(t)})};Z=class Z extends k{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce)t.data=Number(t.data);if(this._getType(t)!==g.number){let a=this._getOrReturnCtx(t);return p(a,{code:c.invalid_type,expected:g.number,received:a.parsedType}),x}let o=void 0,r=new S;for(let a of this._def.checks)if(a.kind==="int"){if(!H.isInteger(t.data))o=this._getOrReturnCtx(t,o),p(o,{code:c.invalid_type,expected:"integer",received:"float",message:a.message}),r.dirty()}else if(a.kind==="min"){if(a.inclusive?t.data<a.value:t.data<=a.value)o=this._getOrReturnCtx(t,o),p(o,{code:c.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),r.dirty()}else if(a.kind==="max"){if(a.inclusive?t.data>a.value:t.data>=a.value)o=this._getOrReturnCtx(t,o),p(o,{code:c.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),r.dirty()}else if(a.kind==="multipleOf"){if(Mb(t.data,a.value)!==0)o=this._getOrReturnCtx(t,o),p(o,{code:c.not_multiple_of,multipleOf:a.value,message:a.message}),r.dirty()}else if(a.kind==="finite"){if(!Number.isFinite(t.data))o=this._getOrReturnCtx(t,o),p(o,{code:c.not_finite,message:a.message}),r.dirty()}else H.assertNever(a);return{status:r.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,w.toString(n))}gt(t,n){return this.setLimit("min",t,!1,w.toString(n))}lte(t,n){return this.setLimit("max",t,!0,w.toString(n))}lt(t,n){return this.setLimit("max",t,!1,w.toString(n))}setLimit(t,n,o,r){return new Z({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:o,message:w.toString(r)}]})}_addCheck(t){return new Z({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:w.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:w.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:w.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:w.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:w.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:w.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:w.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:w.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:w.toString(t)})}get minValue(){let t=null;for(let n of this._def.checks)if(n.kind==="min"){if(t===null||n.value>t)t=n.value}return t}get maxValue(){let t=null;for(let n of this._def.checks)if(n.kind==="max"){if(t===null||n.value<t)t=n.value}return t}get isInt(){return!!this._def.checks.find((t)=>t.kind==="int"||t.kind==="multipleOf"&&H.isInteger(t.value))}get isFinite(){let t=null,n=null;for(let o of this._def.checks)if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return!0;else if(o.kind==="min"){if(n===null||o.value>n)n=o.value}else if(o.kind==="max"){if(t===null||o.value<t)t=o.value}return Number.isFinite(n)&&Number.isFinite(t)}};Z.create=(t)=>{return new Z({checks:[],typeName:A.ZodNumber,coerce:t?.coerce||!1,..._(t)})};z=class z extends k{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==g.bigint)return this._getInvalidInput(t);let o=void 0,r=new S;for(let a of this._def.checks)if(a.kind==="min"){if(a.inclusive?t.data<a.value:t.data<=a.value)o=this._getOrReturnCtx(t,o),p(o,{code:c.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),r.dirty()}else if(a.kind==="max"){if(a.inclusive?t.data>a.value:t.data>=a.value)o=this._getOrReturnCtx(t,o),p(o,{code:c.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),r.dirty()}else if(a.kind==="multipleOf"){if(t.data%a.value!==BigInt(0))o=this._getOrReturnCtx(t,o),p(o,{code:c.not_multiple_of,multipleOf:a.value,message:a.message}),r.dirty()}else H.assertNever(a);return{status:r.value,value:t.data}}_getInvalidInput(t){let n=this._getOrReturnCtx(t);return p(n,{code:c.invalid_type,expected:g.bigint,received:n.parsedType}),x}gte(t,n){return this.setLimit("min",t,!0,w.toString(n))}gt(t,n){return this.setLimit("min",t,!1,w.toString(n))}lte(t,n){return this.setLimit("max",t,!0,w.toString(n))}lt(t,n){return this.setLimit("max",t,!1,w.toString(n))}setLimit(t,n,o,r){return new z({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:o,message:w.toString(r)}]})}_addCheck(t){return new z({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:w.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:w.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:w.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:w.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:w.toString(n)})}get minValue(){let t=null;for(let n of this._def.checks)if(n.kind==="min"){if(t===null||n.value>t)t=n.value}return t}get maxValue(){let t=null;for(let n of this._def.checks)if(n.kind==="max"){if(t===null||n.value<t)t=n.value}return t}};z.create=(t)=>{return new z({checks:[],typeName:A.ZodBigInt,coerce:t?.coerce??!1,..._(t)})};pt=class pt extends k{_parse(t){if(this._def.coerce)t.data=Boolean(t.data);if(this._getType(t)!==g.boolean){let o=this._getOrReturnCtx(t);return p(o,{code:c.invalid_type,expected:g.boolean,received:o.parsedType}),x}return R(t.data)}};pt.create=(t)=>{return new pt({typeName:A.ZodBoolean,coerce:t?.coerce||!1,..._(t)})};lt=class lt extends k{_parse(t){if(this._def.coerce)t.data=new Date(t.data);if(this._getType(t)!==g.date){let a=this._getOrReturnCtx(t);return p(a,{code:c.invalid_type,expected:g.date,received:a.parsedType}),x}if(Number.isNaN(t.data.getTime())){let a=this._getOrReturnCtx(t);return p(a,{code:c.invalid_date}),x}let o=new S,r=void 0;for(let a of this._def.checks)if(a.kind==="min"){if(t.data.getTime()<a.value)r=this._getOrReturnCtx(t,r),p(r,{code:c.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),o.dirty()}else if(a.kind==="max"){if(t.data.getTime()>a.value)r=this._getOrReturnCtx(t,r),p(r,{code:c.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),o.dirty()}else H.assertNever(a);return{status:o.value,value:new Date(t.data.getTime())}}_addCheck(t){return new lt({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:w.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:w.toString(n)})}get minDate(){let t=null;for(let n of this._def.checks)if(n.kind==="min"){if(t===null||n.value>t)t=n.value}return t!=null?new Date(t):null}get maxDate(){let t=null;for(let n of this._def.checks)if(n.kind==="max"){if(t===null||n.value<t)t=n.value}return t!=null?new Date(t):null}};lt.create=(t)=>{return new lt({checks:[],coerce:t?.coerce||!1,typeName:A.ZodDate,..._(t)})};Rt=class Rt extends k{_parse(t){if(this._getType(t)!==g.symbol){let o=this._getOrReturnCtx(t);return p(o,{code:c.invalid_type,expected:g.symbol,received:o.parsedType}),x}return R(t.data)}};Rt.create=(t)=>{return new Rt({typeName:A.ZodSymbol,..._(t)})};mt=class mt extends k{_parse(t){if(this._getType(t)!==g.undefined){let o=this._getOrReturnCtx(t);return p(o,{code:c.invalid_type,expected:g.undefined,received:o.parsedType}),x}return R(t.data)}};mt.create=(t)=>{return new mt({typeName:A.ZodUndefined,..._(t)})};$t=class $t extends k{_parse(t){if(this._getType(t)!==g.null){let o=this._getOrReturnCtx(t);return p(o,{code:c.invalid_type,expected:g.null,received:o.parsedType}),x}return R(t.data)}};$t.create=(t)=>{return new $t({typeName:A.ZodNull,..._(t)})};bt=class bt extends k{constructor(){super(...arguments);this._any=!0}_parse(t){return R(t.data)}};bt.create=(t)=>{return new bt({typeName:A.ZodAny,..._(t)})};T=class T extends k{constructor(){super(...arguments);this._unknown=!0}_parse(t){return R(t.data)}};T.create=(t)=>{return new T({typeName:A.ZodUnknown,..._(t)})};U=class U extends k{_parse(t){let n=this._getOrReturnCtx(t);return p(n,{code:c.invalid_type,expected:g.never,received:n.parsedType}),x}};U.create=(t)=>{return new U({typeName:A.ZodNever,..._(t)})};Xt=class Xt extends k{_parse(t){if(this._getType(t)!==g.undefined){let o=this._getOrReturnCtx(t);return p(o,{code:c.invalid_type,expected:g.void,received:o.parsedType}),x}return R(t.data)}};Xt.create=(t)=>{return new Xt({typeName:A.ZodVoid,..._(t)})};F=class F extends k{_parse(t){let{ctx:n,status:o}=this._processInputParams(t),r=this._def;if(n.parsedType!==g.array)return p(n,{code:c.invalid_type,expected:g.array,received:n.parsedType}),x;if(r.exactLength!==null){let l=n.data.length>r.exactLength.value,b=n.data.length<r.exactLength.value;if(l||b)p(n,{code:l?c.too_big:c.too_small,minimum:b?r.exactLength.value:void 0,maximum:l?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),o.dirty()}if(r.minLength!==null){if(n.data.length<r.minLength.value)p(n,{code:c.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),o.dirty()}if(r.maxLength!==null){if(n.data.length>r.maxLength.value)p(n,{code:c.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),o.dirty()}if(n.common.async)return Promise.all([...n.data].map((l,b)=>{return r.type._parseAsync(new E(n,l,n.path,b))})).then((l)=>{return S.mergeArray(o,l)});let a=[...n.data].map((l,b)=>{return r.type._parseSync(new E(n,l,n.path,b))});return S.mergeArray(o,a)}get element(){return this._def.type}min(t,n){return new F({...this._def,minLength:{value:t,message:w.toString(n)}})}max(t,n){return new F({...this._def,maxLength:{value:t,message:w.toString(n)}})}length(t,n){return new F({...this._def,exactLength:{value:t,message:w.toString(n)}})}nonempty(t){return this.min(1,t)}};F.create=(t,n)=>{return new F({type:t,minLength:null,maxLength:null,exactLength:null,typeName:A.ZodArray,..._(n)})};L=class L extends k{constructor(){super(...arguments);this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),n=H.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==g.object){let i=this._getOrReturnCtx(t);return p(i,{code:c.invalid_type,expected:g.object,received:i.parsedType}),x}let{status:o,ctx:r}=this._processInputParams(t),{shape:a,keys:l}=this._getCached(),b=[];if(!(this._def.catchall instanceof U&&this._def.unknownKeys==="strip")){for(let i in r.data)if(!l.includes(i))b.push(i)}let e=[];for(let i of l){let $=a[i],q=r.data[i];e.push({key:{status:"valid",value:i},value:$._parse(new E(r,q,r.path,i)),alwaysSet:i in r.data})}if(this._def.catchall instanceof U){let i=this._def.unknownKeys;if(i==="passthrough")for(let $ of b)e.push({key:{status:"valid",value:$},value:{status:"valid",value:r.data[$]}});else if(i==="strict"){if(b.length>0)p(r,{code:c.unrecognized_keys,keys:b}),o.dirty()}else if(i==="strip");else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let i=this._def.catchall;for(let $ of b){let q=r.data[$];e.push({key:{status:"valid",value:$},value:i._parse(new E(r,q,r.path,$)),alwaysSet:$ in r.data})}}if(r.common.async)return Promise.resolve().then(async()=>{let i=[];for(let $ of e){let q=await $.key,Y=await $.value;i.push({key:q,value:Y,alwaysSet:$.alwaysSet})}return i}).then((i)=>{return S.mergeObjectSync(o,i)});else return S.mergeObjectSync(o,e)}get shape(){return this._def.shape()}strict(t){return w.errToObj,new L({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,o)=>{let r=this._def.errorMap?.(n,o).message??o.defaultError;if(n.code==="unrecognized_keys")return{message:w.errToObj(t).message??r};return{message:r}}}:{}})}strip(){return new L({...this._def,unknownKeys:"strip"})}passthrough(){return new L({...this._def,unknownKeys:"passthrough"})}extend(t){return new L({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new L({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:A.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new L({...this._def,catchall:t})}pick(t){let n={};for(let o of H.objectKeys(t))if(t[o]&&this.shape[o])n[o]=this.shape[o];return new L({...this._def,shape:()=>n})}omit(t){let n={};for(let o of H.objectKeys(this.shape))if(!t[o])n[o]=this.shape[o];return new L({...this._def,shape:()=>n})}deepPartial(){return gt(this)}partial(t){let n={};for(let o of H.objectKeys(this.shape)){let r=this.shape[o];if(t&&!t[o])n[o]=r;else n[o]=r.optional()}return new L({...this._def,shape:()=>n})}required(t){let n={};for(let o of H.objectKeys(this.shape))if(t&&!t[o])n[o]=this.shape[o];else{let a=this.shape[o];while(a instanceof B)a=a._def.innerType;n[o]=a}return new L({...this._def,shape:()=>n})}keyof(){return Er(H.objectKeys(this.shape))}};L.create=(t,n)=>{return new L({shape:()=>t,unknownKeys:"strip",catchall:U.create(),typeName:A.ZodObject,..._(n)})};L.strictCreate=(t,n)=>{return new L({shape:()=>t,unknownKeys:"strict",catchall:U.create(),typeName:A.ZodObject,..._(n)})};L.lazycreate=(t,n)=>{return new L({shape:t,unknownKeys:"strip",catchall:U.create(),typeName:A.ZodObject,..._(n)})};wt=class wt extends k{_parse(t){let{ctx:n}=this._processInputParams(t),o=this._def.options;function r(a){for(let b of a)if(b.result.status==="valid")return b.result;for(let b of a)if(b.result.status==="dirty")return n.common.issues.push(...b.ctx.common.issues),b.result;let l=a.map((b)=>new J(b.ctx.common.issues));return p(n,{code:c.invalid_union,unionErrors:l}),x}if(n.common.async)return Promise.all(o.map(async(a)=>{let l={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:l}),ctx:l}})).then(r);else{let a=void 0,l=[];for(let e of o){let i={...n,common:{...n.common,issues:[]},parent:null},$=e._parseSync({data:n.data,path:n.path,parent:i});if($.status==="valid")return $;else if($.status==="dirty"&&!a)a={result:$,ctx:i};if(i.common.issues.length)l.push(i.common.issues)}if(a)return n.common.issues.push(...a.ctx.common.issues),a.result;let b=l.map((e)=>new J(e));return p(n,{code:c.invalid_union,unionErrors:b}),x}}get options(){return this._def.options}};wt.create=(t,n)=>{return new wt({options:t,typeName:A.ZodUnion,..._(n)})};un=class un extends k{_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==g.object)return p(n,{code:c.invalid_type,expected:g.object,received:n.parsedType}),x;let o=this.discriminator,r=n.data[o],a=this.optionsMap.get(r);if(!a)return p(n,{code:c.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),x;if(n.common.async)return a._parseAsync({data:n.data,path:n.path,parent:n});else return a._parseSync({data:n.data,path:n.path,parent:n})}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,o){let r=new Map;for(let a of n){let l=y(a.shape[t]);if(!l.length)throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let b of l){if(r.has(b))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(b)}`);r.set(b,a)}}return new un({typeName:A.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:r,..._(o)})}};ut=class ut extends k{_parse(t){let{status:n,ctx:o}=this._processInputParams(t),r=(a,l)=>{if($n(a)||$n(l))return x;let b=Ro(a.value,l.value);if(!b.valid)return p(o,{code:c.invalid_intersection_types}),x;if(wn(a)||wn(l))n.dirty();return{status:n.value,value:b.data}};if(o.common.async)return Promise.all([this._def.left._parseAsync({data:o.data,path:o.path,parent:o}),this._def.right._parseAsync({data:o.data,path:o.path,parent:o})]).then(([a,l])=>r(a,l));else return r(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}};ut.create=(t,n,o)=>{return new ut({left:t,right:n,typeName:A.ZodIntersection,..._(o)})};V=class V extends k{_parse(t){let{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==g.array)return p(o,{code:c.invalid_type,expected:g.array,received:o.parsedType}),x;if(o.data.length<this._def.items.length)return p(o,{code:c.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),x;if(!this._def.rest&&o.data.length>this._def.items.length)p(o,{code:c.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty();let a=[...o.data].map((l,b)=>{let e=this._def.items[b]||this._def.rest;if(!e)return null;return e._parse(new E(o,l,o.path,b))}).filter((l)=>!!l);if(o.common.async)return Promise.all(a).then((l)=>{return S.mergeArray(n,l)});else return S.mergeArray(n,a)}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:A.ZodTuple,rest:null,..._(n)})};Qt=class Qt extends k{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==g.object)return p(o,{code:c.invalid_type,expected:g.object,received:o.parsedType}),x;let r=[],a=this._def.keyType,l=this._def.valueType;for(let b in o.data)r.push({key:a._parse(new E(o,b,o.path,b)),value:l._parse(new E(o,o.data[b],o.path,b)),alwaysSet:b in o.data});if(o.common.async)return S.mergeObjectAsync(n,r);else return S.mergeObjectSync(n,r)}get element(){return this._def.valueType}static create(t,n,o){if(n instanceof k)return new Qt({keyType:t,valueType:n,typeName:A.ZodRecord,..._(o)});return new Qt({keyType:G.create(),valueType:t,typeName:A.ZodRecord,..._(n)})}};Jt=class Jt extends k{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==g.map)return p(o,{code:c.invalid_type,expected:g.map,received:o.parsedType}),x;let r=this._def.keyType,a=this._def.valueType,l=[...o.data.entries()].map(([b,e],i)=>{return{key:r._parse(new E(o,b,o.path,[i,"key"])),value:a._parse(new E(o,e,o.path,[i,"value"]))}});if(o.common.async){let b=new Map;return Promise.resolve().then(async()=>{for(let e of l){let i=await e.key,$=await e.value;if(i.status==="aborted"||$.status==="aborted")return x;if(i.status==="dirty"||$.status==="dirty")n.dirty();b.set(i.value,$.value)}return{status:n.value,value:b}})}else{let b=new Map;for(let e of l){let{key:i,value:$}=e;if(i.status==="aborted"||$.status==="aborted")return x;if(i.status==="dirty"||$.status==="dirty")n.dirty();b.set(i.value,$.value)}return{status:n.value,value:b}}}};Jt.create=(t,n,o)=>{return new Jt({valueType:n,keyType:t,typeName:A.ZodMap,..._(o)})};et=class et extends k{_parse(t){let{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==g.set)return p(o,{code:c.invalid_type,expected:g.set,received:o.parsedType}),x;let r=this._def;if(r.minSize!==null){if(o.data.size<r.minSize.value)p(o,{code:c.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),n.dirty()}if(r.maxSize!==null){if(o.data.size>r.maxSize.value)p(o,{code:c.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),n.dirty()}let a=this._def.valueType;function l(e){let i=new Set;for(let $ of e){if($.status==="aborted")return x;if($.status==="dirty")n.dirty();i.add($.value)}return{status:n.value,value:i}}let b=[...o.data.values()].map((e,i)=>a._parse(new E(o,e,o.path,i)));if(o.common.async)return Promise.all(b).then((e)=>l(e));else return l(b)}min(t,n){return new et({...this._def,minSize:{value:t,message:w.toString(n)}})}max(t,n){return new et({...this._def,maxSize:{value:t,message:w.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}};et.create=(t,n)=>{return new et({valueType:t,minSize:null,maxSize:null,typeName:A.ZodSet,..._(n)})};vt=class vt extends k{constructor(){super(...arguments);this.validate=this.implement}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==g.function)return p(n,{code:c.invalid_type,expected:g.function,received:n.parsedType}),x;function o(b,e){return St({data:b,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ct(),j].filter((i)=>!!i),issueData:{code:c.invalid_arguments,argumentsError:e}})}function r(b,e){return St({data:b,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ct(),j].filter((i)=>!!i),issueData:{code:c.invalid_return_type,returnTypeError:e}})}let a={errorMap:n.common.contextualErrorMap},l=n.data;if(this._def.returns instanceof it){let b=this;return R(async function(...e){let i=new J([]),$=await b._def.args.parseAsync(e,a).catch((M)=>{throw i.addIssue(o(e,M)),i}),q=await Reflect.apply(l,this,$);return await b._def.returns._def.type.parseAsync(q,a).catch((M)=>{throw i.addIssue(r(q,M)),i})})}else{let b=this;return R(function(...e){let i=b._def.args.safeParse(e,a);if(!i.success)throw new J([o(e,i.error)]);let $=Reflect.apply(l,this,i.data),q=b._def.returns.safeParse($,a);if(!q.success)throw new J([r($,q.error)]);return q.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new vt({...this._def,args:V.create(t).rest(T.create())})}returns(t){return new vt({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,o){return new vt({args:t?t:V.create([]).rest(T.create()),returns:n||T.create(),typeName:A.ZodFunction,..._(o)})}};st=class st extends k{get schema(){return this._def.getter()}_parse(t){let{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}};st.create=(t,n)=>{return new st({getter:t,typeName:A.ZodLazy,..._(n)})};xt=class xt extends k{_parse(t){if(t.data!==this._def.value){let n=this._getOrReturnCtx(t);return p(n,{received:n.data,code:c.invalid_literal,expected:this._def.value}),x}return{status:"valid",value:t.data}}get value(){return this._def.value}};xt.create=(t,n)=>{return new xt({value:t,typeName:A.ZodLiteral,..._(n)})};tt=class tt extends k{_parse(t){if(typeof t.data!=="string"){let n=this._getOrReturnCtx(t),o=this._def.values;return p(n,{expected:H.joinValues(o),received:n.parsedType,code:c.invalid_type}),x}if(!this._cache)this._cache=new Set(this._def.values);if(!this._cache.has(t.data)){let n=this._getOrReturnCtx(t),o=this._def.values;return p(n,{received:n.data,code:c.invalid_enum_value,options:o}),x}return R(t.data)}get options(){return this._def.values}get enum(){let t={};for(let n of this._def.values)t[n]=n;return t}get Values(){let t={};for(let n of this._def.values)t[n]=n;return t}get Enum(){let t={};for(let n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return tt.create(t,{...this._def,...n})}exclude(t,n=this._def){return tt.create(this.options.filter((o)=>!t.includes(o)),{...this._def,...n})}};tt.create=Er;At=class At extends k{_parse(t){let n=H.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(t);if(o.parsedType!==g.string&&o.parsedType!==g.number){let r=H.objectValues(n);return p(o,{expected:H.joinValues(r),received:o.parsedType,code:c.invalid_type}),x}if(!this._cache)this._cache=new Set(H.getValidEnumValues(this._def.values));if(!this._cache.has(t.data)){let r=H.objectValues(n);return p(o,{received:o.data,code:c.invalid_enum_value,options:r}),x}return R(t.data)}get enum(){return this._def.values}};At.create=(t,n)=>{return new At({values:t,typeName:A.ZodNativeEnum,..._(n)})};it=class it extends k{unwrap(){return this._def.type}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==g.promise&&n.common.async===!1)return p(n,{code:c.invalid_type,expected:g.promise,received:n.parsedType}),x;let o=n.parsedType===g.promise?n.data:Promise.resolve(n.data);return R(o.then((r)=>{return this._def.type.parseAsync(r,{path:n.path,errorMap:n.common.contextualErrorMap})}))}};it.create=(t,n)=>{return new it({type:t,typeName:A.ZodPromise,..._(n)})};D=class D extends k{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===A.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:n,ctx:o}=this._processInputParams(t),r=this._def.effect||null,a={addIssue:(l)=>{if(p(o,l),l.fatal)n.abort();else n.dirty()},get path(){return o.path}};if(a.addIssue=a.addIssue.bind(a),r.type==="preprocess"){let l=r.transform(o.data,a);if(o.common.async)return Promise.resolve(l).then(async(b)=>{if(n.value==="aborted")return x;let e=await this._def.schema._parseAsync({data:b,path:o.path,parent:o});if(e.status==="aborted")return x;if(e.status==="dirty")return at(e.value);if(n.value==="dirty")return at(e.value);return e});else{if(n.value==="aborted")return x;let b=this._def.schema._parseSync({data:l,path:o.path,parent:o});if(b.status==="aborted")return x;if(b.status==="dirty")return at(b.value);if(n.value==="dirty")return at(b.value);return b}}if(r.type==="refinement"){let l=(b)=>{let e=r.refinement(b,a);if(o.common.async)return Promise.resolve(e);if(e instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return b};if(o.common.async===!1){let b=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(b.status==="aborted")return x;if(b.status==="dirty")n.dirty();return l(b.value),{status:n.value,value:b.value}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then((b)=>{if(b.status==="aborted")return x;if(b.status==="dirty")n.dirty();return l(b.value).then(()=>{return{status:n.value,value:b.value}})})}if(r.type==="transform")if(o.common.async===!1){let l=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!P(l))return x;let b=r.transform(l.value,a);if(b instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:b}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then((l)=>{if(!P(l))return x;return Promise.resolve(r.transform(l.value,a)).then((b)=>({status:n.value,value:b}))});H.assertNever(r)}};D.create=(t,n,o)=>{return new D({schema:t,typeName:A.ZodEffects,effect:n,..._(o)})};D.createWithPreprocess=(t,n,o)=>{return new D({schema:n,effect:{type:"preprocess",transform:t},typeName:A.ZodEffects,..._(o)})};B=class B extends k{_parse(t){if(this._getType(t)===g.undefined)return R(void 0);return this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};B.create=(t,n)=>{return new B({innerType:t,typeName:A.ZodOptional,..._(n)})};C=class C extends k{_parse(t){if(this._getType(t)===g.null)return R(null);return this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};C.create=(t,n)=>{return new C({innerType:t,typeName:A.ZodNullable,..._(n)})};_t=class _t extends k{_parse(t){let{ctx:n}=this._processInputParams(t),o=n.data;if(n.parsedType===g.undefined)o=this._def.defaultValue();return this._def.innerType._parse({data:o,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};_t.create=(t,n)=>{return new _t({innerType:t,typeName:A.ZodDefault,defaultValue:typeof n.default==="function"?n.default:()=>n.default,..._(n)})};kt=class kt extends k{_parse(t){let{ctx:n}=this._processInputParams(t),o={...n,common:{...n.common,issues:[]}},r=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});if(dt(r))return r.then((a)=>{return{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new J(o.common.issues)},input:o.data})}});else return{status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new J(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}};kt.create=(t,n)=>{return new kt({innerType:t,typeName:A.ZodCatch,catchValue:typeof n.catch==="function"?n.catch:()=>n.catch,..._(n)})};Gt=class Gt extends k{_parse(t){if(this._getType(t)!==g.nan){let o=this._getOrReturnCtx(t);return p(o,{code:c.invalid_type,expected:g.nan,received:o.parsedType}),x}return{status:"valid",value:t.data}}};Gt.create=(t)=>{return new Gt({typeName:A.ZodNaN,..._(t)})};Yb=Symbol("zod_brand");sn=class sn extends k{_parse(t){let{ctx:n}=this._processInputParams(t),o=n.data;return this._def.type._parse({data:o,path:n.path,parent:n})}unwrap(){return this._def.type}};Ft=class Ft extends k{_parse(t){let{status:n,ctx:o}=this._processInputParams(t);if(o.common.async)return(async()=>{let a=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});if(a.status==="aborted")return x;if(a.status==="dirty")return n.dirty(),at(a.value);else return this._def.out._parseAsync({data:a.value,path:o.path,parent:o})})();else{let r=this._def.in._parseSync({data:o.data,path:o.path,parent:o});if(r.status==="aborted")return x;if(r.status==="dirty")return n.dirty(),{status:"dirty",value:r.value};else return this._def.out._parseSync({data:r.value,path:o.path,parent:o})}}static create(t,n){return new Ft({in:t,out:n,typeName:A.ZodPipeline})}};qt=class qt extends k{_parse(t){let n=this._def.innerType._parse(t),o=(r)=>{if(P(r))r.value=Object.freeze(r.value);return r};return dt(n)?n.then((r)=>o(r)):o(n)}unwrap(){return this._def.innerType}};qt.create=(t,n)=>{return new qt({innerType:t,typeName:A.ZodReadonly,..._(n)})};Sb={object:L.lazycreate};(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(A||(A={}));Or=G.create,Wr=Z.create,Xb=Gt.create,Qb=z.create,Ur=pt.create,Jb=lt.create,Gb=Rt.create,Fb=mt.create,Bb=$t.create,Eb=bt.create,Db=T.create,Ob=U.create,Wb=Xt.create,Ub=F.create,Vb=L.create,Nb=L.strictCreate,Kb=wt.create,jb=un.create,yb=ut.create,Cb=V.create,Ib=Qt.create,Pb=Jt.create,Tb=et.create,Zb=vt.create,zb=st.create,te=xt.create,ne=tt.create,oe=At.create,re=it.create,ae=D.create,le=B.create,be=C.create,ee=D.createWithPreprocess,ie=Ft.create,de={string:(t)=>G.create({...t,coerce:!0}),number:(t)=>Z.create({...t,coerce:!0}),boolean:(t)=>pt.create({...t,coerce:!0}),bigint:(t)=>z.create({...t,coerce:!0}),date:(t)=>lt.create({...t,coerce:!0})},ge=x});var v={};s(v,{void:()=>Wb,util:()=>H,unknown:()=>Db,union:()=>Kb,undefined:()=>Fb,tuple:()=>Cb,transformer:()=>ae,symbol:()=>Gb,string:()=>Or,strictObject:()=>Nb,setErrorMap:()=>bb,set:()=>Tb,record:()=>Ib,quotelessJson:()=>ab,promise:()=>re,preprocess:()=>ee,pipeline:()=>ie,ostring:()=>he,optional:()=>le,onumber:()=>fe,oboolean:()=>ce,objectUtil:()=>Lo,object:()=>Vb,number:()=>Wr,nullable:()=>be,null:()=>Bb,never:()=>Ob,nativeEnum:()=>oe,nan:()=>Xb,map:()=>Pb,makeIssue:()=>St,literal:()=>te,lazy:()=>zb,late:()=>Sb,isValid:()=>P,isDirty:()=>wn,isAsync:()=>dt,isAborted:()=>$n,intersection:()=>yb,instanceof:()=>Rb,getParsedType:()=>W,getErrorMap:()=>ct,function:()=>Zb,enum:()=>ne,effect:()=>ae,discriminatedUnion:()=>jb,defaultErrorMap:()=>j,datetimeRegex:()=>Br,date:()=>Jb,custom:()=>Dr,coerce:()=>de,boolean:()=>Ur,bigint:()=>Qb,array:()=>Ub,any:()=>Eb,addIssueToContext:()=>p,ZodVoid:()=>Xt,ZodUnknown:()=>T,ZodUnion:()=>wt,ZodUndefined:()=>mt,ZodType:()=>k,ZodTuple:()=>V,ZodTransformer:()=>D,ZodSymbol:()=>Rt,ZodString:()=>G,ZodSet:()=>et,ZodSchema:()=>k,ZodRecord:()=>Qt,ZodReadonly:()=>qt,ZodPromise:()=>it,ZodPipeline:()=>Ft,ZodParsedType:()=>g,ZodOptional:()=>B,ZodObject:()=>L,ZodNumber:()=>Z,ZodNullable:()=>C,ZodNull:()=>$t,ZodNever:()=>U,ZodNativeEnum:()=>At,ZodNaN:()=>Gt,ZodMap:()=>Jt,ZodLiteral:()=>xt,ZodLazy:()=>st,ZodIssueCode:()=>c,ZodIntersection:()=>ut,ZodFunction:()=>vt,ZodFirstPartyTypeKind:()=>A,ZodError:()=>J,ZodEnum:()=>tt,ZodEffects:()=>D,ZodDiscriminatedUnion:()=>un,ZodDefault:()=>_t,ZodDate:()=>lt,ZodCatch:()=>kt,ZodBranded:()=>sn,ZodBoolean:()=>pt,ZodBigInt:()=>z,ZodArray:()=>F,ZodAny:()=>bt,Schema:()=>k,ParseStatus:()=>S,OK:()=>R,NEVER:()=>ge,INVALID:()=>x,EMPTY_PATH:()=>eb,DIRTY:()=>at,BRAND:()=>Yb});var Xo=m(()=>{mn();Yo();Rr();Yt();Vr();pn()});var Nr=m(()=>{Xo();Xo()});function Qo(t,...n){if(ve())return;(console[t]||console.log).call(console,...n)}var ve=()=>Boolean(globalThis.__AFRICODE_TEST__||globalThis.__AFRICODE_SILENT_LOGS__);function xn(t){if(t===null||typeof t!=="object")return t;if(Array.isArray(t))return t.map(xn);let n={};for(let o of Object.keys(t))n[o]=xn(t[o]);return n}function yr(t,n){let o={...t};for(let r of Object.keys(n))if(n[r]!==null&&typeof n[r]==="object"&&!Array.isArray(n[r])&&typeof t[r]==="object"&&!Array.isArray(t[r]))o[r]=yr(t[r]||{},n[r]);else o[r]=n[r];return o}function Cr(t={}){return jr=yr(Kr,t),pe=!0,Bt()}function Bt(){return Object.freeze(xn(jr))}var Kr,jr,pe=!1;var Jo=m(()=>{Kr={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}},jr=xn(Kr)});class ht{static validate(t,n){try{return{success:!0,data:t.parse(n)}}catch(o){if(o instanceof v.ZodError){let r={};return o.errors.forEach((a)=>{let l=a.path.join(".");r[l]=a.message}),{success:!1,errors:r}}return{success:!1,errors:{general:"Validation failed"}}}}static validateField(t,n){try{return t.parse(n),{success:!0}}catch(o){if(o instanceof v.ZodError)return{success:!1,error:o.errors[0]?.message||"Invalid value"};return{success:!1,error:"Validation failed"}}}static getFieldError(t,n){if(t.success)return null;return t.errors?.[n]||null}static hasFieldError(t,n){return!!this.getFieldError(t,n)}}class N{constructor(t,n="string"){this._baseSchema=t,this._fieldType=n,this._isNullable=!1,this._isOptional=!1,this._emptyAsNull=!1,this._trim=!1,this._customMessage=null}nullable(){return this._isNullable=!0,this}optional(){return this._isOptional=!0,this}emptyAsNull(){if(!this._isNullable)throw Error(`[AfriCode] .emptyAsNull() requires .nullable() to be called first. Use: afri.${this._fieldType}().nullable().emptyAsNull()`);return this._emptyAsNull=!0,this}trim(){return this._trim=!0,this}message(t){return this._customMessage=t,this}build(){let t=this._baseSchema;if(this._isNullable)t=t.nullable();if(this._isOptional)t=t.optional();return t}getMeta(){return{fieldType:this._fieldType,isNullable:this._isNullable,isOptional:this._isOptional,emptyAsNull:this._emptyAsNull,trim:this._trim}}}function Pr(t,n){let o={...n},r=!1;try{r=Bt().validation?.trimStrings===!0}catch{}for(let[a,l]of Object.entries(t)){if(!(l instanceof N))continue;let b=l.getMeta(),e=o[a];if(typeof e==="string"&&(b.trim||r))o[a]=e.trim();if(b.emptyAsNull&&o[a]==="")o[a]=null}return o}function Tr(t){let n={};for(let[o,r]of Object.entries(t))if(r instanceof N)n[o]=r.build();else n[o]=r;return v.object(n)}var An,O,Ir;var _n=m(()=>{Nr();Jo();An={login:v.object({email:v.string().min(1,"Email is required").email("Please enter a valid email address"),password:v.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:v.object({name:v.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:v.string().min(1,"Email is required").email("Please enter a valid email address"),password:v.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:v.string()}).refine((t)=>t.password===t.confirmPassword,{message:"Passwords don't match",path:["confirmPassword"]}),auth:{register:v.object({action:v.literal("register"),email:v.string().min(1,"Email is required").email("Please enter a valid email address"),username:v.string().min(3,"Username must be at least 3 characters").max(30,"Username must be less than 30 characters"),password:v.string().min(8,"Password must be at least 8 characters"),full_name:v.string().min(2,"Full name is required").max(100,"Full name is too long")}),login:v.object({action:v.literal("login"),email:v.string().min(1,"Email is required").email("Please enter a valid email address"),password:v.string().min(8,"Password must be at least 8 characters")}),logout:v.object({action:v.literal("logout")}),action:v.discriminatedUnion("action",[v.object({action:v.literal("register")}).merge(v.object({email:v.string().min(1,"Email is required").email("Please enter a valid email address"),username:v.string().min(3,"Username must be at least 3 characters").max(30,"Username must be less than 30 characters"),password:v.string().min(8,"Password must be at least 8 characters"),full_name:v.string().min(2,"Full name is required").max(100,"Full name is too long")})),v.object({action:v.literal("login")}).merge(v.object({email:v.string().min(1,"Email is required").email("Please enter a valid email address"),password:v.string().min(8,"Password must be at least 8 characters")})),v.object({action:v.literal("logout")})])},contact:v.object({name:v.string().min(2,"Name must be at least 2 characters").max(100,"Name is too long"),email:v.string().email("Please enter a valid email address"),message:v.string().min(10,"Message must be at least 10 characters").max(1000,"Message is too long")}),email:v.string().min(1,"Email is required").email("Please enter a valid email address"),password:v.string().min(8,"Password must be at least 8 characters").regex(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)/,"Password must contain uppercase, lowercase, and number"),phone:v.string().regex(/^[\+]?[1-9][\d]{0,15}$/,"Please enter a valid phone number"),url:v.string().min(1,"URL is required").url("Please enter a valid URL"),required:v.string().min(1,"This field is required"),positiveNumber:v.number().positive("Must be a positive number"),integer:v.number().int("Must be a whole number"),futureDate:v.date().min(new Date,"Date must be in the future"),imageFile:v.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:v.object({full_name:v.string().min(2,"Full name must be at least 2 characters").max(100,"Full name is too long").optional(),bio:v.string().max(500,"Bio must be less than 500 characters").nullable().optional(),avatar_url:v.string().url("Please enter a valid URL").nullable().optional(),theme:v.enum(["africanity","dark","light","system"]).optional(),language:v.string().min(2).max(10).optional()}),project:v.object({name:v.string().min(1,"Project name is required").max(100,"Project name is too long"),description:v.string().max(1000,"Description is too long").nullable().optional(),repository_url:v.string().url("Please enter a valid repository URL").nullable().optional(),demo_url:v.string().url("Please enter a valid demo URL").nullable().optional(),tags:v.array(v.string()).optional(),is_public:v.boolean().optional()})};O={required:(t="This field is required")=>v.string().min(1,t),email:(t="Please enter a valid email address")=>v.string().email(t),minLength:(t,n)=>v.string().min(t,n||`Must be at least ${t} characters`),maxLength:(t,n)=>v.string().max(t,n||`Must be less than ${t} characters`),pattern:(t,n)=>v.string().regex(t,n),numeric:(t="Must be a number")=>v.string().regex(/^\d+$/,t),phone:(t="Please enter a valid phone number")=>v.string().regex(/^[\+]?[1-9][\d]{0,15}$/,t),url:(t="Please enter a valid URL")=>v.string().min(1,"URL is required").url(t)};Ir={url(t="Please enter a valid URL"){return new N(v.string().min(1,"URL cannot be empty").url(t),"url")},email(t="Please enter a valid email address"){return new N(v.string().min(1,"Email cannot be empty").email(t),"email")},string(t={}){let n=v.string();if(t.min!==void 0)n=n.min(t.min,t.message||`Must be at least ${t.min} characters`);if(t.max!==void 0)n=n.max(t.max,t.message||`Must be less than ${t.max} characters`);return new N(n,"string")},number(t={}){let n=v.number();if(t.min!==void 0)n=n.min(t.min);if(t.max!==void 0)n=n.max(t.max);if(t.int)n=n.int("Must be a whole number");return new N(n,"number")},phone(t="Please enter a valid phone number"){return new N(v.string().regex(/^[\+]?[1-9][\d]{0,15}$/,t),"phone")}}});function f(t,n){if(typeof customElements>"u")return;if(!customElements.get(t))customElements.define(t,n)}var $e,aa,h;var u=m(()=>{$e=globalThis.HTMLElement??class{},aa=typeof CSSStyleSheet<"u";h=class h extends $e{constructor(){super();this.attachShadow({mode:"open"});let t=this.render;if(t&&typeof t==="function")this.render=()=>{try{t.call(this),this.removeAttribute("has-error")}catch(n){console.error(`[AfriCode] Rendering error in <${this.localName}>:`,n),this.setAttribute("has-error","true"),this.shadowRoot.innerHTML=`
372
372
  <style>
373
373
  .af-local-error {
374
374
  padding: 1rem;
@@ -387,7 +387,7 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
387
387
  <span aria-hidden="true">⚠️</span>
388
388
  <span>Failed to render</span>
389
389
  </div>
390
- `,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(!A0)return;if(!(t instanceof CSSStyleSheet))return;if(!c.globalSheets.includes(t))c.globalSheets.push(t)}async loadStyles(t=""){if(!this.shadowRoot)return;let b=A0&&"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 a=c.styleCache.get(o);if(b)this.shadowRoot.adoptedStyleSheets=[a,...c.globalSheets];else this._applyFallbackStyle(a?.cssText||a?.text||a||"");return}try{let a=l;if(!a){let h=await fetch("/styles/africanity.css");if(!h.ok)throw Error(`Unable to load stylesheet: ${h.status}`);a=await h.text()}if(b){let h=new CSSStyleSheet;h.replaceSync(a),c.styleCache.set(o,h),this.shadowRoot.adoptedStyleSheets=[h,...c.globalSheets];return}this._applyFallbackStyle(a),c.styleCache.set(o,{text:a})}catch(a){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:b={},text:o=""}={}){let l=document.createElement(t);if(n.length)l.classList.add(...n);if(Object.entries(b).forEach(([a,h])=>l.setAttribute(a,h)),o)l.textContent=o;return l}emit(t,n){this.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0,composed:!0}))}}});var d0={};i(d0,{default:()=>ra,AfriUIButton:()=>ut});var ut,ra;var io=x(()=>{X();ut=class ut 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",b=this.hasAttribute("disabled"),o=this.hasAttribute("loading"),l=this.getAttribute("aria-label")||"";this.shadowRoot.innerHTML=Q`
390
+ `,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(!aa)return;if(!(t instanceof CSSStyleSheet))return;if(!h.globalSheets.includes(t))h.globalSheets.push(t)}async loadStyles(t=""){if(!this.shadowRoot)return;let o=aa&&"adoptedStyleSheets"in this.shadowRoot,r=typeof t==="string"&&t.length>0?t:"/styles/africanity.css",a=typeof t==="string"&&t.length>0?t:null;if(h.styleCache.has(r)){let l=h.styleCache.get(r);if(o)this.shadowRoot.adoptedStyleSheets=[l,...h.globalSheets];else this._applyFallbackStyle(l?.cssText||l?.text||l||"");return}try{let l=a;if(!l){let b=await fetch("/styles/africanity.css");if(!b.ok)throw Error(`Unable to load stylesheet: ${b.status}`);l=await b.text()}if(o){let b=new CSSStyleSheet;b.replaceSync(l),h.styleCache.set(r,b),this.shadowRoot.adoptedStyleSheets=[b,...h.globalSheets];return}this._applyFallbackStyle(l),h.styleCache.set(r,{text:l})}catch(l){this._applyFallbackStyle(a||"")}}_applyFallbackStyle(t){if(!this.shadowRoot)return;let n=this.shadowRoot.querySelector("style[data-africode-core-styles]");if(!n)n=document.createElement("style"),n.setAttribute("data-africode-core-styles",""),this.shadowRoot.prepend(n);n.textContent=t}spacing(t){return`var(--space-${t})`}createElement(t,{classes:n=[],attributes:o={},text:r=""}={}){let a=document.createElement(t);if(n.length)a.classList.add(...n);if(Object.entries(o).forEach(([l,b])=>a.setAttribute(l,b)),r)a.textContent=r;return a}emit(t,n){this.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0,composed:!0}))}}});var la={};s(la,{default:()=>we,AfriUIButton:()=>Dt});var Dt,we;var No=m(()=>{u();Dt=class Dt extends h{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",o=this.hasAttribute("disabled"),r=this.hasAttribute("loading"),a=this.getAttribute("aria-label")||"";this.shadowRoot.innerHTML=d`
391
391
  <style>
392
392
  :host { display: inline-block; }
393
393
 
@@ -480,14 +480,14 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
480
480
 
481
481
  <button
482
482
  class="${t} ${n}"
483
- ${b?"disabled":""}
484
- ${l?`aria-label="${l}"`:""}
485
- ${o?'aria-busy="true"':""}
483
+ ${o?"disabled":""}
484
+ ${a?`aria-label="${a}"`:""}
485
+ ${r?'aria-busy="true"':""}
486
486
  >
487
- ${o?Q`<span class="spinner"></span>`:""}
487
+ ${r?d`<span class="spinner"></span>`:""}
488
488
  <slot></slot>
489
489
  </button>
490
- `}};_("af-ui-button",ut);ra=ut});var x0={};i(x0,{default:()=>ga,AfriUICard:()=>Ut});var Ut,ga;var Lo=x(()=>{X();Ut=class Ut 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"),b=this.hasAttribute("clickable");this.shadowRoot.innerHTML=Q`
490
+ `}};f("af-ui-button",Dt);we=Dt});var ba={};s(ba,{default:()=>ue,AfriUICard:()=>Ot});var Ot,ue;var Ko=m(()=>{u();Ot=class Ot extends h{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"),o=this.hasAttribute("clickable");this.shadowRoot.innerHTML=d`
491
491
  <style>
492
492
  :host { display: block; }
493
493
 
@@ -517,7 +517,7 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
517
517
  <article class="card ${t}">
518
518
  <slot></slot>
519
519
  </article>
520
- `}};_("af-ui-card",Ut);ga=Ut});var q0={};i(q0,{default:()=>$a,AfriUIInput:()=>Vt});var Vt,$a;var Mo=x(()=>{X();Vt=class Vt 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")||"",b=this.getAttribute("type")||"text",o=this.getAttribute("value")||"",l=this.hasAttribute("disabled"),a=this.getAttribute("error")||"";this.shadowRoot.innerHTML=Q`
520
+ `}};f("af-ui-card",Ot);ue=Ot});var ea={};s(ea,{default:()=>se,AfriUIInput:()=>Wt});var Wt,se;var jo=m(()=>{u();Wt=class Wt extends h{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")||"",o=this.getAttribute("type")||"text",r=this.getAttribute("value")||"",a=this.hasAttribute("disabled"),l=this.getAttribute("error")||"";this.shadowRoot.innerHTML=d`
521
521
  <style>
522
522
  :host { display: block; font-family: 'Inter', system-ui, sans-serif; }
523
523
 
@@ -565,17 +565,17 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
565
565
  </style>
566
566
 
567
567
  <div class="field">
568
- ${t?Q`<label>${t}</label>`:""}
568
+ ${t?d`<label>${t}</label>`:""}
569
569
  <input
570
- type="${b}"
570
+ type="${o}"
571
571
  placeholder="${n}"
572
- value="${o}"
573
- ${l?"disabled":""}
574
- aria-invalid="${Boolean(a)}"
572
+ value="${r}"
573
+ ${a?"disabled":""}
574
+ aria-invalid="${Boolean(l)}"
575
575
  />
576
- <div class="error">${a}</div>
576
+ <div class="error">${l}</div>
577
577
  </div>
578
- `}};_("af-ui-input",Vt);$a=Vt});var k0={};i(k0,{default:()=>ca,AfriUIBadge:()=>Nt});var Nt,ca;var Qo=x(()=>{X();Nt=class Nt 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",b=this.hasAttribute("pill");this.shadowRoot.innerHTML=Q`
578
+ `}};f("af-ui-input",Wt);se=Wt});var ia={};s(ia,{default:()=>xe,AfriUIBadge:()=>Ut});var Ut,xe;var yo=m(()=>{u();Ut=class Ut extends h{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",o=this.hasAttribute("pill");this.shadowRoot.innerHTML=d`
579
579
  <style>
580
580
  :host { display: inline-block; font-family: 'Inter', system-ui, sans-serif; }
581
581
 
@@ -584,7 +584,7 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
584
584
  align-items: center;
585
585
  justify-content: center;
586
586
  gap: 0.4rem;
587
- border-radius: ${b?"999px":"0.6rem"};
587
+ border-radius: ${o?"999px":"0.6rem"};
588
588
  padding: ${n==="sm"?"0.25rem 0.65rem":n==="lg"?"0.55rem 1rem":"0.4rem 0.8rem"};
589
589
  font-size: ${n==="sm"?"0.75rem":n==="lg"?"0.95rem":"0.85rem"};
590
590
  font-weight: 700;
@@ -602,16 +602,16 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
602
602
  </style>
603
603
 
604
604
  <span class="badge ${t}"><slot></slot></span>
605
- `}};_("af-ui-badge",Nt);ca=Nt});var H0={};i(H0,{default:()=>va,AfriUISwitch:()=>Kt});var Kt,va;var Jo=x(()=>{X();Kt=class Kt 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"),b=this.getAttribute("size")||"md",o=b==="sm"?{width:36,height:20,knob:14}:b==="lg"?{width:56,height:32,knob:24}:{width:48,height:28,knob:20},l=t?"true":"false";this.shadowRoot.innerHTML=Q`
605
+ `}};f("af-ui-badge",Ut);xe=Ut});var ha={};s(ha,{default:()=>Ae,AfriUISwitch:()=>Vt});var Vt,Ae;var Co=m(()=>{u();Vt=class Vt extends h{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"),o=this.getAttribute("size")||"md",r=o==="sm"?{width:36,height:20,knob:14}:o==="lg"?{width:56,height:32,knob:24}:{width:48,height:28,knob:20},a=t?"true":"false";this.shadowRoot.innerHTML=d`
606
606
  <style>
607
607
  :host { display: inline-block; }
608
608
 
609
609
  button {
610
610
  all: unset;
611
611
  position: relative;
612
- width: ${o.width}px;
613
- height: ${o.height}px;
614
- border-radius: ${o.height/2}px;
612
+ width: ${r.width}px;
613
+ height: ${r.height}px;
614
+ border-radius: ${r.height/2}px;
615
615
  background: ${t?"#2563eb":"#e5e7eb"};
616
616
  cursor: ${n?"not-allowed":"pointer"};
617
617
  transition: background 180ms ease;
@@ -621,10 +621,10 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
621
621
  .knob {
622
622
  position: absolute;
623
623
  top: 50%;
624
- left: ${t?`${o.width-o.knob-4}px`:"4px"};
624
+ left: ${t?`${r.width-r.knob-4}px`:"4px"};
625
625
  transform: translateY(-50%);
626
- width: ${o.knob}px;
627
- height: ${o.knob}px;
626
+ width: ${r.knob}px;
627
+ height: ${r.knob}px;
628
628
  border-radius: 999px;
629
629
  background: #ffffff;
630
630
  transition: left 180ms ease;
@@ -634,114 +634,1045 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
634
634
  button:disabled { opacity: 0.65; }
635
635
  </style>
636
636
 
637
- <button role="switch" aria-checked="${l}" ${n?"disabled":""}>
637
+ <button role="switch" aria-checked="${a}" ${n?"disabled":""}>
638
638
  <span class="knob"></span>
639
639
  </button>
640
- `}};_("af-ui-switch",Kt);va=Kt});var Y0={};i(Y0,{default:()=>wa,AfriButton:()=>bn});var bn,wa;var X0=x(()=>{X();bn=class bn 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",b=this.getAttribute("theme")||"tanzania",o=this.hasAttribute("disabled"),l=this.hasAttribute("loading"),a=this.getAttribute("icon"),h=this.getAttribute("aria-label"),f={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"}},r=f[b]||f.tanzania;this.shadowRoot.innerHTML=`
640
+ `}};f("af-ui-switch",Vt);Ae=Vt});var fa={};s(fa,{default:()=>_e,AfriUISelect:()=>Nt});var Nt,_e;var Io=m(()=>{u();Nt=class Nt extends h{static get observedAttributes(){return["label","placeholder","disabled","error"]}constructor(){super();this.render()}connectedCallback(){this._attachListeners(),this.loadStyles()}attributeChangedCallback(){this.render(),this._attachListeners()}_attachListeners(){let t=this.shadowRoot.querySelector("select");if(!t)return;t.addEventListener("change",()=>{this.emit("af-ui-select",{value:t.value})})}render(){let t=this.getAttribute("label")||"",n=this.getAttribute("placeholder")||"Select an option",o=this.hasAttribute("disabled"),r=this.getAttribute("error")||"";this.shadowRoot.innerHTML=d`
641
641
  <style>
642
- :host {
643
- display: inline-block;
642
+ :host { display: block; font-family: 'Inter', system-ui, sans-serif; }
643
+
644
+ .field { display: grid; gap: 0.5rem; }
645
+ label { font-size: 0.85rem; font-weight: 600; color: #111827; }
646
+ select {
647
+ width: 100%;
648
+ border: 1px solid #d1d5db;
649
+ border-radius: 0.75rem;
650
+ padding: 0.9rem 1rem;
651
+ background: #fff;
652
+ color: #111827;
653
+ appearance: none;
654
+ font-size: 0.95rem;
655
+ outline: none;
656
+ transition: border-color 150ms ease, box-shadow 150ms ease;
644
657
  }
658
+ select:focus {
659
+ border-color: #2563eb;
660
+ box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
661
+ }
662
+ select:disabled { background: #f8fafc; cursor: not-allowed; }
645
663
 
646
- button {
647
- font-family: 'Inter', system-ui, sans-serif;
664
+ .hint { font-size: 0.85rem; color: #6b7280; }
665
+ .error { color: #dc2626; font-size: 0.8rem; min-height: 1rem; }
666
+ </style>
667
+
668
+ <div class="field">
669
+ ${t?d`<label>${t}</label>`:""}
670
+ <select ${o?"disabled":""}>
671
+ <option disabled selected hidden>${n}</option>
672
+ <slot></slot>
673
+ </select>
674
+ <div class="error">${r}</div>
675
+ </div>
676
+ `}};f("af-ui-select",Nt);_e=Nt});var ca={};s(ca,{default:()=>ke,AfriUITextarea:()=>Kt});var Kt,ke;var Po=m(()=>{u();Kt=class Kt extends h{static get observedAttributes(){return["label","placeholder","rows","disabled","error"]}constructor(){super();this.render()}connectedCallback(){this._attachListeners(),this.loadStyles()}attributeChangedCallback(){this.render(),this._attachListeners()}_attachListeners(){let t=this.shadowRoot.querySelector("textarea");if(!t)return;t.addEventListener("input",()=>{this.emit("af-ui-textarea",{value:t.value})})}render(){let t=this.getAttribute("label")||"",n=this.getAttribute("placeholder")||"",o=this.getAttribute("rows")||"4",r=this.hasAttribute("disabled"),a=this.getAttribute("error")||"";this.shadowRoot.innerHTML=d`
677
+ <style>
678
+ :host { display: block; font-family: 'Inter', system-ui, sans-serif; }
679
+
680
+ .field { display: grid; gap: 0.5rem; }
681
+ label { font-size: 0.85rem; font-weight: 600; color: #111827; }
682
+ textarea {
683
+ width: 100%;
684
+ min-height: 120px;
685
+ border: 1px solid #d1d5db;
686
+ border-radius: 0.75rem;
687
+ padding: 1rem;
688
+ font-size: 0.95rem;
689
+ font-family: inherit;
690
+ color: #111827;
691
+ resize: vertical;
692
+ background: #fff;
693
+ transition: border-color 150ms ease, box-shadow 150ms ease;
694
+ }
695
+ textarea:focus {
696
+ border-color: #2563eb;
697
+ box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
698
+ outline: none;
699
+ }
700
+ textarea:disabled { background: #f8fafc; cursor: not-allowed; }
701
+
702
+ .error { color: #dc2626; font-size: 0.8rem; min-height: 1rem; }
703
+ </style>
704
+
705
+ <div class="field">
706
+ ${t?d`<label>${t}</label>`:""}
707
+ <textarea rows="${o}" placeholder="${n}" ${r?"disabled":""}></textarea>
708
+ <div class="error">${a}</div>
709
+ </div>
710
+ `}};f("af-ui-textarea",Kt);ke=Kt});var da={};s(da,{default:()=>qe,AfriUIChip:()=>jt});var jt,qe;var To=m(()=>{u();jt=class jt extends h{static get observedAttributes(){return["variant","size","dismissible"]}constructor(){super();this.render()}connectedCallback(){this.render(),this._attachListeners()}attributeChangedCallback(){this.render(),this._attachListeners()}_attachListeners(){let t=this.shadowRoot.querySelector(".chip button");if(!t)return;t.addEventListener("click",(n)=>{n.stopPropagation(),this.emit("af-ui-chip-dismiss",{})})}render(){let t=this.getAttribute("variant")||"neutral",n=this.getAttribute("size")||"md",o=this.hasAttribute("dismissible");this.shadowRoot.innerHTML=d`
711
+ <style>
712
+ :host { display: inline-flex; }
713
+
714
+ .chip {
715
+ display: inline-flex;
716
+ align-items: center;
717
+ gap: 0.5rem;
718
+ border-radius: 999px;
719
+ padding: ${n==="sm"?"0.35rem 0.75rem":"0.45rem 1rem"};
720
+ font-size: ${n==="sm"?"0.75rem":"0.85rem"};
648
721
  font-weight: 600;
722
+ background: #f8fafc;
723
+ color: #0f172a;
724
+ border: 1px solid rgba(15, 23, 42, 0.08);
725
+ }
726
+
727
+ .chip.primary { background: #eff6ff; color: #1d4ed8; }
728
+ .chip.success { background: #dcfce7; color: #166534; }
729
+ .chip.warning { background: #fef3c7; color: #92400e; }
730
+ .chip.danger { background: #fee2e2; color: #991b1b; }
731
+ .chip.neutral { background: #f8fafc; color: #0f172a; }
732
+
733
+ button {
649
734
  border: none;
650
- border-radius: 5px;
735
+ background: transparent;
736
+ color: inherit;
651
737
  cursor: pointer;
738
+ font-size: 0.95rem;
739
+ padding: 0;
740
+ line-height: 1;
741
+ }
742
+ </style>
743
+
744
+ <span class="chip ${t}">
745
+ <slot></slot>
746
+ ${o?d`<button aria-label="Remove">×</button>`:""}
747
+ </span>
748
+ `}};f("af-ui-chip",jt);qe=jt});var ga={};s(ga,{default:()=>He,AfriUITag:()=>yt});var yt,He;var Zo=m(()=>{u();yt=class yt extends h{static get observedAttributes(){return["variant","size"]}constructor(){super();this.render()}attributeChangedCallback(){this.render()}render(){let t=this.getAttribute("variant")||"secondary",n=this.getAttribute("size")||"md",o={sm:"0.25rem 0.6rem",md:"0.35rem 0.8rem",lg:"0.5rem 1rem"};this.shadowRoot.innerHTML=d`
749
+ <style>
750
+ :host { display: inline-block; font-family: 'Inter', sans-serif; }
751
+
752
+ .tag {
652
753
  display: inline-flex;
653
754
  align-items: center;
654
755
  justify-content: center;
655
- gap: 8px;
656
- transition: all 200ms ease-out;
756
+ gap: 0.35rem;
757
+ padding: ${o[n]};
758
+ border-radius: 999px;
759
+ font-size: ${n==="sm"?"0.75rem":n==="lg"?"0.95rem":"0.85rem"};
760
+ font-weight: 600;
761
+ color: #111827;
762
+ background: #f8fafc;
763
+ border: 1px solid rgba(15, 23, 42, 0.08);
764
+ }
765
+
766
+ .tag.primary { background: #dbeafe; color: #1e40af; }
767
+ .tag.success { background: #d1fae5; color: #14532d; }
768
+ .tag.warning { background: #fde68a; color: #92400e; }
769
+ .tag.danger { background: #fecaca; color: #991b1b; }
770
+ .tag.secondary { background: #f3f4f6; color: #1f2937; }
771
+ </style>
772
+
773
+ <span class="tag ${t}"><slot></slot></span>
774
+ `}};f("af-ui-tag",yt);He=yt});var va={};s(va,{default:()=>Le,AfriUIAvatar:()=>Ct});var Ct,Le;var zo=m(()=>{u();Ct=class Ct extends h{static get observedAttributes(){return["src","initials","size","badge"]}constructor(){super();this.render()}attributeChangedCallback(){this.render()}render(){let t=this.getAttribute("src"),n=this.getAttribute("initials")||"AC",o=this.getAttribute("size")||"md",r=o==="sm"?"32px":o==="lg"?"64px":"48px",a=this.getAttribute("badge");this.shadowRoot.innerHTML=d`
775
+ <style>
776
+ :host { display: inline-flex; }
777
+
778
+ .avatar {
657
779
  position: relative;
780
+ width: ${r};
781
+ height: ${r};
782
+ border-radius: 999px;
658
783
  overflow: hidden;
784
+ background: linear-gradient(135deg, #1eb53a, #fcd116);
785
+ color: #fff;
786
+ display: inline-flex;
787
+ align-items: center;
788
+ justify-content: center;
789
+ font-weight: 700;
790
+ font-size: ${o==="sm"?"0.85rem":o==="lg"?"1.25rem":"1rem"};
659
791
  }
660
792
 
661
- /* Sizes */
662
- .size-sm { padding: 5px 13px; font-size: 13px; }
663
- .size-md { padding: 8px 21px; font-size: 15px; }
664
- .size-lg { padding: 13px 34px; font-size: 17px; }
665
-
666
- /* Variants */
667
- .variant-primary {
668
- background: ${r.primary};
669
- color: ${r.text};
793
+ img {
794
+ width: 100%;
795
+ height: 100%;
796
+ object-fit: cover;
797
+ display: block;
670
798
  }
671
- .variant-primary:hover:not(:disabled) {
672
- filter: brightness(1.1);
673
- transform: translateY(-2px);
674
- box-shadow: 0 4px 12px rgba(0,0,0,0.2);
799
+
800
+ .badge {
801
+ position: absolute;
802
+ bottom: -2px;
803
+ right: -2px;
804
+ background: #2563eb;
805
+ color: #fff;
806
+ border-radius: 999px;
807
+ padding: 0.15rem 0.45rem;
808
+ font-size: 0.65rem;
809
+ font-weight: 700;
675
810
  }
811
+ </style>
676
812
 
677
- .variant-secondary {
678
- background: transparent;
679
- color: ${r.primary};
680
- border: 2px solid ${r.primary};
813
+ <div class="avatar">
814
+ ${t?d`<img src="${t}" alt="Avatar" />`:d`<span>${n}</span>`}
815
+ ${a?d`<span class="badge">${a}</span>`:""}
816
+ </div>
817
+ `}};f("af-ui-avatar",Ct);Le=Ct});var pa={};s(pa,{default:()=>Me,AfriUIProgressRing:()=>It});var It,Me;var tr=m(()=>{u();It=class It extends h{static get observedAttributes(){return["value","size","stroke","label"]}constructor(){super();this.render()}attributeChangedCallback(){this.render()}render(){let t=Number(this.getAttribute("value")||0),n=Number(this.getAttribute("size")||96),o=Number(this.getAttribute("stroke")||10),r=this.getAttribute("label")||"",a=(n-o)/2,l=2*Math.PI*a,b=l-t/100*l;this.shadowRoot.innerHTML=d`
818
+ <style>
819
+ :host { display: inline-flex; align-items: center; justify-content: center; }
820
+ .ring { position: relative; width: ${n}px; height: ${n}px; }
821
+ svg { transform: rotate(-90deg); width: 100%; height: 100%; }
822
+ circle { fill: none; stroke-width: ${o}; stroke-linecap: round; }
823
+ .bg { stroke: rgba(15, 23, 42, 0.12); }
824
+ .progress { stroke: #2563eb; stroke-dasharray: ${l}; stroke-dashoffset: ${b}; transition: stroke-dashoffset 0.35s ease; }
825
+ .label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #111827; font-family: 'Inter', sans-serif; }
826
+ .value { font-size: 1rem; font-weight: 700; }
827
+ .subtitle { font-size: 0.75rem; color: #6b7280; }
828
+ </style>
829
+ <div class="ring" role="progressbar" aria-valuenow="${t}" aria-valuemin="0" aria-valuemax="100">
830
+ <svg viewBox="0 0 ${n} ${n}">
831
+ <circle class="bg" cx="${n/2}" cy="${n/2}" r="${a}" />
832
+ <circle class="progress" cx="${n/2}" cy="${n/2}" r="${a}" />
833
+ </svg>
834
+ <div class="label">
835
+ <div class="value">${t}%</div>
836
+ ${r?d`<div class="subtitle">${r}</div>`:""}
837
+ </div>
838
+ </div>
839
+ `}};f("af-ui-progress-ring",It);Me=It});var ma={};s(ma,{default:()=>Ye,AfriUITooltip:()=>Pt});var Pt,Ye;var nr=m(()=>{u();Pt=class Pt extends h{static get observedAttributes(){return["text","position"]}constructor(){super();this.render()}attributeChangedCallback(){this.render()}render(){let t=this.getAttribute("text")||"",n=this.getAttribute("position")||"top";this.shadowRoot.innerHTML=d`
840
+ <style>
841
+ :host { position: relative; display: inline-flex; }
842
+
843
+ .tooltip {
844
+ position: absolute;
845
+ white-space: nowrap;
846
+ padding: 0.55rem 0.75rem;
847
+ background: rgba(15, 23, 42, 0.95);
848
+ color: #fff;
849
+ border-radius: 0.65rem;
850
+ font-size: 0.75rem;
851
+ transform: translateY(-8px);
852
+ opacity: 0;
853
+ pointer-events: none;
854
+ transition: opacity 0.2s ease, transform 0.2s ease;
855
+ z-index: 100;
681
856
  }
682
- .variant-secondary:hover:not(:disabled) {
683
- background: ${r.primary};
684
- color: ${r.text};
857
+ :host(:hover) .tooltip { opacity: 1; transform: translateY(0); }
858
+ .tooltip::after {
859
+ content: '';
860
+ position: absolute;
861
+ width: 0;
862
+ height: 0;
863
+ border-style: solid;
685
864
  }
686
-
687
- .variant-ghost {
688
- background: transparent;
689
- color: ${r.primary};
865
+ .tooltip.top { bottom: 100%; left: 50%; transform: translate(-50%, -8px); }
866
+ .tooltip.top::after { top: 100%; left: 50%; transform: translateX(-50%); border-width: 6px 6px 0 6px; border-color: rgba(15,23,42,0.95) transparent transparent transparent; }
867
+ .tooltip.bottom { top: 100%; left: 50%; transform: translate(-50%, 8px); }
868
+ .tooltip.bottom::after { bottom: 100%; left: 50%; transform: translateX(-50%); border-width: 0 6px 6px 6px; border-color: transparent transparent rgba(15,23,42,0.95) transparent; }
869
+ </style>
870
+ <slot></slot>
871
+ <div class="tooltip ${n}" role="tooltip">${t}</div>
872
+ `}};f("af-ui-tooltip",Pt);Ye=Pt});var $a={};s($a,{default:()=>Se,AfriUIPopover:()=>Tt});var Tt,Se;var or=m(()=>{u();Tt=class Tt extends h{static get observedAttributes(){return["label","open"]}constructor(){super();this._open=this.hasAttribute("open"),this.render()}connectedCallback(){this._attachListeners()}attributeChangedCallback(){this._open=this.hasAttribute("open"),this.render(),this._attachListeners()}_attachListeners(){let t=this.shadowRoot.querySelector(".trigger");if(!t)return;t.addEventListener("click",()=>{if(this._open=!this._open,this._open)this.setAttribute("open","");else this.removeAttribute("open");this.render(),this._attachListeners()})}render(){let t=this.getAttribute("label")||"Open",n=this._open;this.shadowRoot.innerHTML=d`
873
+ <style>
874
+ :host { position: relative; display: inline-flex; }
875
+ .trigger {
876
+ border: 1px solid #cbd5e1;
877
+ border-radius: 0.75rem;
878
+ padding: 0.75rem 1rem;
879
+ background: #fff;
880
+ color: #111827;
881
+ cursor: pointer;
882
+ font-family: 'Inter', sans-serif;
883
+ font-weight: 600;
690
884
  }
691
- .variant-ghost:hover:not(:disabled) {
692
- background: rgba(0,0,0,0.05);
885
+ .panel {
886
+ position: absolute;
887
+ top: calc(100% + 0.5rem);
888
+ right: 0;
889
+ min-width: 220px;
890
+ background: #ffffff;
891
+ border: 1px solid #e5e7eb;
892
+ box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
893
+ border-radius: 1rem;
894
+ padding: 1rem;
895
+ opacity: ${n?"1":"0"};
896
+ visibility: ${n?"visible":"hidden"};
897
+ transform: ${n?"translateY(0)":"translateY(-10px)"};
898
+ transition: opacity 180ms ease, transform 180ms ease;
899
+ z-index: 10;
693
900
  }
901
+ </style>
902
+ <button class="trigger" type="button">${t}</button>
903
+ <div class="panel"><slot></slot></div>
904
+ `}};f("af-ui-popover",Tt);Se=Tt});var wa={};s(wa,{default:()=>Re,AfriUITabs:()=>Zt,AfriUITabPanel:()=>rr});var Zt,rr,Re;var ar=m(()=>{u();Zt=class Zt extends h{static get observedAttributes(){return["active"]}constructor(){super();this._active=this.getAttribute("active")||"0",this.render()}connectedCallback(){this._attachListeners()}attributeChangedCallback(){this._active=this.getAttribute("active")||"0",this.render(),this._attachListeners()}_attachListeners(){this.shadowRoot.querySelectorAll('[role="tab"]').forEach((n)=>{n.addEventListener("click",()=>{let o=n.getAttribute("data-index");this.setAttribute("active",o)})})}render(){let t=this._active,n=Array.from(this.children).filter((o)=>o.tagName.toLowerCase()==="ui-tab-panel");this.shadowRoot.innerHTML=d`
905
+ <style>
906
+ :host { display: block; font-family: 'Inter', system-ui, sans-serif; }
694
907
 
695
- .variant-gradient {
696
- background: linear-gradient(135deg, ${r.primary} 0%, ${r.accent} 100%);
697
- color: ${r.text};
908
+ .tab-list {
909
+ display: flex;
910
+ gap: 0.5rem;
911
+ border-bottom: 1px solid #e5e7eb;
912
+ margin-bottom: 1rem;
698
913
  }
699
- .variant-gradient:hover:not(:disabled) {
700
- transform: translateY(-2px);
701
- box-shadow: 0 6px 20px rgba(0,0,0,0.25);
914
+ button {
915
+ all: unset;
916
+ cursor: pointer;
917
+ padding: 0.75rem 1rem;
918
+ border-radius: 999px;
919
+ color: #334155;
920
+ font-weight: 600;
702
921
  }
703
-
704
- /* States */
705
- button:disabled {
706
- opacity: 0.5;
707
- cursor: not-allowed;
922
+ button.active {
923
+ background: #2563eb;
924
+ color: #fff;
708
925
  }
709
-
710
- button:active:not(:disabled) {
711
- transform: translateY(0);
926
+ .panel { display: none; }
927
+ .panel.active { display: block; }
928
+ </style>
929
+ <div class="tab-list" role="tablist">
930
+ ${n.map((o,r)=>d`
931
+ <button
932
+ role="tab"
933
+ data-index="${r}"
934
+ class="${String(r)===String(t)?"active":""}"
935
+ aria-selected="${String(r)===String(t)}"
936
+ >
937
+ ${o.getAttribute("label")||`Tab ${r+1}`}
938
+ </button>
939
+ `).join("")}
940
+ </div>
941
+ ${n.map((o,r)=>d`
942
+ <div class="panel ${String(r)===String(t)?"active":""}" role="tabpanel">
943
+ ${o.innerHTML}
944
+ </div>
945
+ `).join("")}
946
+ `}};rr=class rr extends h{render(){this.shadowRoot.innerHTML=d`<slot></slot>`}};f("af-ui-tabs",Zt);f("ui-tab-panel",rr);Re=Zt});var ua={};s(ua,{default:()=>Xe,AfriUITable:()=>zt});var zt,Xe;var lr=m(()=>{u();zt=class zt extends h{static get observedAttributes(){return["striped","bordered","compact"]}constructor(){super();this.render()}attributeChangedCallback(){this.render()}render(){let t=this.hasAttribute("striped"),n=this.hasAttribute("bordered"),o=this.hasAttribute("compact");this.shadowRoot.innerHTML=d`
947
+ <style>
948
+ :host { display: block; overflow-x: auto; }
949
+ table {
950
+ width: 100%;
951
+ border-collapse: collapse;
952
+ min-width: 100%;
953
+ font-family: 'Inter', system-ui, sans-serif;
954
+ color: #0f172a;
712
955
  }
713
-
714
- /* Loading spinner */
715
- .spinner {
716
- width: 16px;
717
- height: 16px;
718
- border: 2px solid transparent;
719
- border-top-color: currentColor;
720
- border-radius: 50%;
721
- animation: spin 0.8s linear infinite;
956
+ th, td {
957
+ padding: ${o?"0.75rem":"1rem"};
958
+ text-align: left;
959
+ border-bottom: 1px solid #e5e7eb;
722
960
  }
723
-
724
- @keyframes spin {
725
- to { transform: rotate(360deg); }
961
+ th {
962
+ font-size: 0.85rem;
963
+ font-weight: 700;
964
+ color: #334155;
965
+ text-transform: uppercase;
966
+ letter-spacing: 0.04em;
726
967
  }
727
-
728
- /* Icon */
729
- .icon {
730
- font-size: 1.1em;
968
+ tbody tr {
969
+ background: #fff;
970
+ }
971
+ tbody tr:nth-child(even) {
972
+ background: ${t?"#f8fafc":"#fff"};
973
+ }
974
+ table.bordered th, table.bordered td {
975
+ border: 1px solid #e5e7eb;
731
976
  }
732
977
  </style>
733
-
734
- <button
735
- class="variant-${t} size-${n}"
736
- ${o?"disabled":""}
737
- ${h?`aria-label="${h}"`:""}
738
- ${l?'aria-busy="true"':""}
978
+ <table class="${n?"bordered":""}">
979
+ <slot></slot>
980
+ </table>
981
+ `}};f("af-ui-table",zt);Xe=zt});var sa={};s(sa,{default:()=>Qe,AfriUIStat:()=>tn});var tn,Qe;var br=m(()=>{u();tn=class tn extends h{static get observedAttributes(){return["label","value","delta","trend"]}constructor(){super();this.render()}attributeChangedCallback(){this.render()}render(){let t=this.getAttribute("label")||"Metric",n=this.getAttribute("value")||"0",o=this.getAttribute("delta")||"",r=this.getAttribute("trend")||"neutral",a=r==="positive"?"#16a34a":r==="negative"?"#dc2626":"#475569";this.shadowRoot.innerHTML=d`
982
+ <style>
983
+ :host { display: block; font-family: 'Inter', sans-serif; }
984
+ .stat {
985
+ display: grid;
986
+ gap: 0.5rem;
987
+ padding: 1.25rem;
988
+ border-radius: 1rem;
989
+ background: #ffffff;
990
+ border: 1px solid #e5e7eb;
991
+ box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
992
+ }
993
+ .label {
994
+ font-size: 0.85rem;
995
+ font-weight: 700;
996
+ color: #475569;
997
+ text-transform: uppercase;
998
+ letter-spacing: 0.08em;
999
+ }
1000
+ .value {
1001
+ font-size: 2.25rem;
1002
+ font-weight: 800;
1003
+ color: #0f172a;
1004
+ }
1005
+ .delta {
1006
+ display: inline-flex;
1007
+ align-items: center;
1008
+ gap: 0.35rem;
1009
+ color: ${a};
1010
+ font-size: 0.95rem;
1011
+ font-weight: 700;
1012
+ }
1013
+ </style>
1014
+ <div class="stat">
1015
+ <div class="label">${t}</div>
1016
+ <div class="value">${n}</div>
1017
+ ${o?d`<div class="delta">${o}</div>`:""}
1018
+ </div>
1019
+ `}};f("af-ui-stat",tn);Qe=tn});var xa={};s(xa,{default:()=>Je,AfriFooter:()=>nn});var nn,Je;var er=m(()=>{u();nn=class nn extends h{static get observedAttributes(){return["company","year"]}constructor(){super();this.render()}attributeChangedCallback(){this.render()}render(){let t=this.getAttribute("company")||"AfriCode",n=this.getAttribute("year")||new Date().getFullYear();this.shadowRoot.innerHTML=d`
1020
+ <style>
1021
+ :host {
1022
+ display: block;
1023
+ width: 100%;
1024
+ box-sizing: border-box;
1025
+ background: #0f172a;
1026
+ color: #e2e8f0;
1027
+ font-family: 'Inter', system-ui, sans-serif;
1028
+ }
1029
+
1030
+ .footer {
1031
+ padding: 48px 5%;
1032
+ max-width: 1280px;
1033
+ margin: 0 auto;
1034
+ display: grid;
1035
+ gap: 2rem;
1036
+ grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
1037
+ }
1038
+
1039
+ .brand {
1040
+ display: grid;
1041
+ gap: 0.75rem;
1042
+ }
1043
+
1044
+ .brand h3 {
1045
+ margin: 0;
1046
+ font-size: 1.25rem;
1047
+ color: #ffffff;
1048
+ }
1049
+
1050
+ .links {
1051
+ display: grid;
1052
+ gap: 0.5rem;
1053
+ }
1054
+
1055
+ .links slot {
1056
+ display: grid;
1057
+ gap: 0.5rem;
1058
+ }
1059
+
1060
+ a {
1061
+ color: #94a3b8;
1062
+ text-decoration: none;
1063
+ }
1064
+
1065
+ a:hover {
1066
+ color: #ffffff;
1067
+ }
1068
+
1069
+ .bottom {
1070
+ grid-column: 1 / -1;
1071
+ display: flex;
1072
+ flex-wrap: wrap;
1073
+ align-items: center;
1074
+ justify-content: space-between;
1075
+ gap: 1rem;
1076
+ padding-top: 1.5rem;
1077
+ border-top: 1px solid rgba(226, 232, 240, 0.12);
1078
+ color: #94a3b8;
1079
+ font-size: 0.95rem;
1080
+ }
1081
+ </style>
1082
+
1083
+ <footer class="footer">
1084
+ <div class="brand">
1085
+ <h3>${t}</h3>
1086
+ <slot name="description"></slot>
1087
+ </div>
1088
+ <div class="links">
1089
+ <slot name="links"></slot>
1090
+ </div>
1091
+ <div class="links">
1092
+ <slot name="resources"></slot>
1093
+ </div>
1094
+ <div class="bottom">
1095
+ <span>© ${n} ${t}. All rights reserved.</span>
1096
+ <slot name="legal"></slot>
1097
+ </div>
1098
+ </footer>
1099
+ `}};f("af-footer",nn);Je=nn});var Aa={};s(Aa,{default:()=>Ge,AfriBreadcrumb:()=>on});var on,Ge;var ir=m(()=>{u();on=class on extends h{static get observedAttributes(){return["separator"]}constructor(){super();this.render()}attributeChangedCallback(){this.render()}render(){let t=this.getAttribute("separator")||"/";this.shadowRoot.innerHTML=d`
1100
+ <style>
1101
+ :host {
1102
+ display: block;
1103
+ font-family: 'Inter', system-ui, sans-serif;
1104
+ color: #475569;
1105
+ font-size: 0.9rem;
1106
+ }
1107
+
1108
+ nav {
1109
+ display: flex;
1110
+ flex-wrap: wrap;
1111
+ gap: 0.5rem;
1112
+ align-items: center;
1113
+ }
1114
+
1115
+ .crumb {
1116
+ display: inline-flex;
1117
+ align-items: center;
1118
+ gap: 0.35rem;
1119
+ }
1120
+
1121
+ .separator {
1122
+ color: #cbd5e1;
1123
+ }
1124
+
1125
+ ::slotted(a) {
1126
+ color: #0f172a;
1127
+ text-decoration: none;
1128
+ font-weight: 600;
1129
+ }
1130
+
1131
+ ::slotted(a:hover) {
1132
+ text-decoration: underline;
1133
+ }
1134
+ </style>
1135
+
1136
+ <nav aria-label="Breadcrumb">
1137
+ <slot></slot>
1138
+ </nav>
1139
+ `}};f("af-breadcrumb",on);Ge=on});var _a={};s(_a,{default:()=>Fe,AfriFeatureGrid:()=>rn});var rn,Fe;var hr=m(()=>{u();rn=class rn extends h{static get observedAttributes(){return["columns"]}constructor(){super();this.render()}attributeChangedCallback(){this.render()}render(){let t=this.getAttribute("columns")||"3";this.shadowRoot.innerHTML=d`
1140
+ <style>
1141
+ :host {
1142
+ display: block;
1143
+ width: 100%;
1144
+ box-sizing: border-box;
1145
+ font-family: 'Inter', system-ui, sans-serif;
1146
+ }
1147
+
1148
+ .grid {
1149
+ display: grid;
1150
+ gap: 1.5rem;
1151
+ grid-template-columns: repeat(${t}, minmax(0, 1fr));
1152
+ }
1153
+
1154
+ @media (max-width: 1024px) {
1155
+ .grid {
1156
+ grid-template-columns: repeat(2, minmax(0, 1fr));
1157
+ }
1158
+ }
1159
+
1160
+ @media (max-width: 640px) {
1161
+ .grid {
1162
+ grid-template-columns: 1fr;
1163
+ }
1164
+ }
1165
+
1166
+ ::slotted(.feature-card) {
1167
+ display: grid;
1168
+ gap: 0.75rem;
1169
+ padding: 1.5rem;
1170
+ border-radius: 24px;
1171
+ background: #ffffff;
1172
+ border: 1px solid rgba(15, 23, 42, 0.08);
1173
+ box-shadow: 0 12px 32px rgba(15, 23, 42, 0.04);
1174
+ }
1175
+
1176
+ ::slotted(.feature-card h3) {
1177
+ margin: 0;
1178
+ font-size: 1.1rem;
1179
+ color: #0f172a;
1180
+ }
1181
+
1182
+ ::slotted(.feature-card p) {
1183
+ margin: 0;
1184
+ color: #475569;
1185
+ line-height: 1.7;
1186
+ }
1187
+ </style>
1188
+
1189
+ <div class="grid">
1190
+ <slot></slot>
1191
+ </div>
1192
+ `}};f("af-feature-grid",rn);Fe=rn});var ka={};s(ka,{default:()=>Be,AfriPricingCard:()=>an});var an,Be;var fr=m(()=>{u();an=class an extends h{static get observedAttributes(){return["title","price","frequency","highlight"]}constructor(){super();this.render()}attributeChangedCallback(){this.render()}render(){let t=this.getAttribute("title")||"Standard",n=this.getAttribute("price")||"$49",o=this.getAttribute("frequency")||"per month",r=this.hasAttribute("highlight");this.shadowRoot.innerHTML=d`
1193
+ <style>
1194
+ :host {
1195
+ display: block;
1196
+ font-family: 'Inter', system-ui, sans-serif;
1197
+ }
1198
+
1199
+ .card {
1200
+ display: grid;
1201
+ gap: 1rem;
1202
+ padding: 1.75rem;
1203
+ border-radius: 28px;
1204
+ background: ${r?"linear-gradient(180deg, #1EB53A, #0f172a)":"#ffffff"};
1205
+ color: ${r?"#ffffff":"#0f172a"};
1206
+ border: 1px solid rgba(15, 23, 42, 0.08);
1207
+ box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
1208
+ }
1209
+
1210
+ .title {
1211
+ margin: 0;
1212
+ font-size: 1.2rem;
1213
+ font-weight: 700;
1214
+ }
1215
+
1216
+ .price {
1217
+ font-size: 2.75rem;
1218
+ font-weight: 800;
1219
+ line-height: 1;
1220
+ }
1221
+
1222
+ .frequency {
1223
+ color: ${r?"rgba(255,255,255,0.8)":"#64748b"};
1224
+ font-size: 0.95rem;
1225
+ margin-top: -0.25rem;
1226
+ }
1227
+
1228
+ .features {
1229
+ display: grid;
1230
+ gap: 0.75rem;
1231
+ }
1232
+
1233
+ ::slotted(.feature) {
1234
+ color: ${r?"#e2e8f0":"#475569"};
1235
+ font-size: 0.95rem;
1236
+ display: flex;
1237
+ align-items: center;
1238
+ gap: 0.5rem;
1239
+ }
1240
+
1241
+ .footer {
1242
+ margin-top: 1rem;
1243
+ }
1244
+ </style>
1245
+
1246
+ <div class="card">
1247
+ <div>
1248
+ <h3 class="title">${t}</h3>
1249
+ <div class="price">${n}</div>
1250
+ <div class="frequency">${o}</div>
1251
+ </div>
1252
+ <div class="features">
1253
+ <slot></slot>
1254
+ </div>
1255
+ <div class="footer"><slot name="action"></slot></div>
1256
+ </div>
1257
+ `}};f("af-pricing-card",an);Be=an});var qa={};s(qa,{default:()=>Ee,AfriTestimonial:()=>ln});var ln,Ee;var cr=m(()=>{u();ln=class ln extends h{static get observedAttributes(){return["author","role","company"]}constructor(){super();this.render()}attributeChangedCallback(){this.render()}render(){let t=this.getAttribute("author")||"Customer",n=this.getAttribute("role")||"Founder",o=this.getAttribute("company")||"";this.shadowRoot.innerHTML=d`
1258
+ <style>
1259
+ :host {
1260
+ display: block;
1261
+ font-family: 'Inter', system-ui, sans-serif;
1262
+ color: #0f172a;
1263
+ }
1264
+
1265
+ .testimonial {
1266
+ display: grid;
1267
+ gap: 1rem;
1268
+ padding: 1.75rem;
1269
+ border-radius: 24px;
1270
+ background: #ffffff;
1271
+ border: 1px solid rgba(15, 23, 42, 0.08);
1272
+ box-shadow: 0 16px 32px rgba(15, 23, 42, 0.06);
1273
+ }
1274
+
1275
+ .quote {
1276
+ font-size: 1rem;
1277
+ line-height: 1.8;
1278
+ color: #475569;
1279
+ position: relative;
1280
+ padding-left: 1rem;
1281
+ }
1282
+
1283
+ .quote::before {
1284
+ content: '“';
1285
+ position: absolute;
1286
+ left: 0;
1287
+ top: 0;
1288
+ font-size: 3rem;
1289
+ color: #1EB53A;
1290
+ line-height: 1;
1291
+ }
1292
+
1293
+ .author {
1294
+ display: flex;
1295
+ flex-direction: column;
1296
+ gap: 0.125rem;
1297
+ color: #0f172a;
1298
+ }
1299
+
1300
+ .name {
1301
+ font-weight: 700;
1302
+ }
1303
+
1304
+ .meta {
1305
+ color: #64748b;
1306
+ font-size: 0.9rem;
1307
+ }
1308
+ </style>
1309
+
1310
+ <article class="testimonial">
1311
+ <div class="quote"><slot></slot></div>
1312
+ <div class="author">
1313
+ <span class="name">${t}</span>
1314
+ <span class="meta">${n}${o?` · ${o}`:""}</span>
1315
+ </div>
1316
+ </article>
1317
+ `}};f("af-testimonial",ln);Ee=ln});var Ha={};s(Ha,{default:()=>De,AfriDashboardShell:()=>bn});var bn,De;var dr=m(()=>{u();bn=class bn extends h{static get observedAttributes(){return["sidebar-width","topbar-height"]}constructor(){super();this.render()}attributeChangedCallback(){this.render()}render(){let t=this.getAttribute("sidebar-width")||"280px",n=this.getAttribute("topbar-height")||"72px";this.shadowRoot.innerHTML=d`
1318
+ <style>
1319
+ :host {
1320
+ display: block;
1321
+ min-height: 100vh;
1322
+ font-family: 'Inter', system-ui, sans-serif;
1323
+ color: var(--af-text, #0f172a);
1324
+ background: var(--af-bg, #f8fafc);
1325
+ }
1326
+
1327
+ .dashboard-shell {
1328
+ display: grid;
1329
+ grid-template-columns: ${t} minmax(0, 1fr);
1330
+ grid-template-rows: ${n} minmax(0, 1fr);
1331
+ min-height: 100vh;
1332
+ gap: 1rem;
1333
+ }
1334
+
1335
+ .sidebar {
1336
+ grid-row: 1 / span 2;
1337
+ background: transparent;
1338
+ }
1339
+
1340
+ .topbar {
1341
+ grid-column: 2 / 3;
1342
+ position: sticky;
1343
+ top: 0;
1344
+ z-index: 10;
1345
+ background: var(--af-surface, #ffffff);
1346
+ border-bottom: 1px solid rgba(15, 23, 42, 0.08);
1347
+ box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
1348
+ }
1349
+
1350
+ .content {
1351
+ grid-column: 2 / 3;
1352
+ padding: 24px;
1353
+ min-height: calc(100vh - ${n});
1354
+ background: transparent;
1355
+ overflow: hidden;
1356
+ }
1357
+
1358
+ ::slotted([slot="sidebar"]) {
1359
+ height: 100%;
1360
+ }
1361
+ </style>
1362
+
1363
+ <div class="dashboard-shell">
1364
+ <aside class="sidebar"><slot name="sidebar"></slot></aside>
1365
+ <header class="topbar"><slot name="topbar"></slot></header>
1366
+ <main class="content"><slot></slot></main>
1367
+ </div>
1368
+ `}};f("af-dashboard-shell",bn);De=bn});var La={};s(La,{default:()=>Oe,AfriDashboardTopbar:()=>en});var en,Oe;var gr=m(()=>{u();en=class en extends h{static get observedAttributes(){return["title","description"]}constructor(){super();this.render()}attributeChangedCallback(){this.render()}render(){let t=this.getAttribute("title")||"Dashboard",n=this.getAttribute("description")||"";this.shadowRoot.innerHTML=d`
1369
+ <style>
1370
+ :host {
1371
+ display: block;
1372
+ width: 100%;
1373
+ font-family: 'Inter', system-ui, sans-serif;
1374
+ }
1375
+
1376
+ .topbar {
1377
+ display: flex;
1378
+ align-items: center;
1379
+ justify-content: space-between;
1380
+ padding: 1rem 1.5rem;
1381
+ gap: 1rem;
1382
+ min-height: 72px;
1383
+ box-sizing: border-box;
1384
+ }
1385
+
1386
+ .heading {
1387
+ display: grid;
1388
+ gap: 0.25rem;
1389
+ }
1390
+
1391
+ .title {
1392
+ margin: 0;
1393
+ font-size: 1.1rem;
1394
+ font-weight: 700;
1395
+ color: #0f172a;
1396
+ }
1397
+
1398
+ .description {
1399
+ margin: 0;
1400
+ color: #475569;
1401
+ font-size: 0.95rem;
1402
+ }
1403
+
1404
+ .actions {
1405
+ display: flex;
1406
+ gap: 0.75rem;
1407
+ align-items: center;
1408
+ flex-wrap: wrap;
1409
+ }
1410
+ </style>
1411
+
1412
+ <div class="topbar">
1413
+ <div class="heading">
1414
+ <div class="title">${t}</div>
1415
+ ${n?d`<div class="description">${n}</div>`:""}
1416
+ </div>
1417
+ <div class="actions"><slot name="actions"></slot></div>
1418
+ </div>
1419
+ `}};f("af-dashboard-topbar",en);Oe=en});var Ma={};s(Ma,{default:()=>We,AfriDashboardCard:()=>hn});var hn,We;var vr=m(()=>{u();hn=class hn extends h{static get observedAttributes(){return["title","variant"]}constructor(){super();this.render()}attributeChangedCallback(){this.render()}render(){let t=this.getAttribute("title")||"",n=this.getAttribute("variant")||"surface",o={surface:{background:"#ffffff",border:"1px solid rgba(15, 23, 42, 0.08)",shadow:"0 18px 36px rgba(15, 23, 42, 0.04)"},elevated:{background:"linear-gradient(180deg, #ffffff 0%, #f8fafc 100%)",border:"1px solid rgba(15, 23, 42, 0.12)",shadow:"0 24px 48px rgba(15, 23, 42, 0.08)"}},r=o[n]||o.surface;this.shadowRoot.innerHTML=d`
1420
+ <style>
1421
+ :host {
1422
+ display: block;
1423
+ font-family: 'Inter', system-ui, sans-serif;
1424
+ }
1425
+
1426
+ .card {
1427
+ background: ${r.background};
1428
+ border: ${r.border};
1429
+ border-radius: 24px;
1430
+ box-shadow: ${r.shadow};
1431
+ padding: 1.5rem;
1432
+ min-height: 100px;
1433
+ overflow: hidden;
1434
+ }
1435
+
1436
+ .header {
1437
+ display: flex;
1438
+ align-items: center;
1439
+ justify-content: space-between;
1440
+ gap: 0.75rem;
1441
+ margin-bottom: 1rem;
1442
+ }
1443
+
1444
+ .title {
1445
+ margin: 0;
1446
+ font-size: 1rem;
1447
+ font-weight: 700;
1448
+ color: #0f172a;
1449
+ }
1450
+ </style>
1451
+
1452
+ <div class="card">
1453
+ ${t?d`<div class="header"><h3 class="title">${t}</h3><slot name="header"></slot></div>`:""}
1454
+ <div class="body"><slot></slot></div>
1455
+ </div>
1456
+ `}};f("af-dashboard-card",hn);We=hn});var Ya={};s(Ya,{default:()=>Ue,AfriDashboardMetric:()=>fn});var fn,Ue;var pr=m(()=>{u();fn=class fn extends h{static get observedAttributes(){return["label","value","delta","trend"]}constructor(){super();this.render()}attributeChangedCallback(){this.render()}render(){let t=this.getAttribute("label")||"Metric",n=this.getAttribute("value")||"0",o=this.getAttribute("delta")||"",r=this.getAttribute("trend")||"neutral",a=r==="positive"?"#16a34a":r==="negative"?"#dc2626":"#475569";this.shadowRoot.innerHTML=d`
1457
+ <style>
1458
+ :host {
1459
+ display: block;
1460
+ font-family: 'Inter', system-ui, sans-serif;
1461
+ }
1462
+
1463
+ .metric {
1464
+ display: grid;
1465
+ gap: 0.5rem;
1466
+ padding: 1.25rem;
1467
+ border-radius: 24px;
1468
+ background: #ffffff;
1469
+ border: 1px solid rgba(15, 23, 42, 0.08);
1470
+ }
1471
+
1472
+ .label {
1473
+ color: #6b7280;
1474
+ text-transform: uppercase;
1475
+ letter-spacing: 0.14em;
1476
+ font-size: 0.75rem;
1477
+ font-weight: 700;
1478
+ }
1479
+
1480
+ .value {
1481
+ font-size: 2rem;
1482
+ font-weight: 800;
1483
+ color: #0f172a;
1484
+ }
1485
+
1486
+ .delta {
1487
+ display: inline-flex;
1488
+ align-items: center;
1489
+ gap: 0.4rem;
1490
+ font-weight: 700;
1491
+ color: ${a};
1492
+ font-size: 0.92rem;
1493
+ }
1494
+ </style>
1495
+
1496
+ <div class="metric">
1497
+ <div class="label">${t}</div>
1498
+ <div class="value">${n}</div>
1499
+ ${o?d`<div class="delta">${o}</div>`:""}
1500
+ </div>
1501
+ `}};f("af-dashboard-metric",fn);Ue=fn});var Sa={};s(Sa,{default:()=>Ve,AfriDashboardActivityList:()=>cn});var cn,Ve;var mr=m(()=>{u();cn=class cn extends h{static get observedAttributes(){return["title","empty-text"]}constructor(){super();this.render()}attributeChangedCallback(){this.render()}render(){let t=this.getAttribute("title")||"Recent Activity",n=this.getAttribute("empty-text")||"No recent activity available.";this.shadowRoot.innerHTML=d`
1502
+ <style>
1503
+ :host {
1504
+ display: block;
1505
+ font-family: 'Inter', system-ui, sans-serif;
1506
+ }
1507
+
1508
+ .activity-card {
1509
+ display: grid;
1510
+ gap: 1rem;
1511
+ padding: 1.5rem;
1512
+ border-radius: 24px;
1513
+ background: #ffffff;
1514
+ border: 1px solid rgba(15, 23, 42, 0.08);
1515
+ }
1516
+
1517
+ .header {
1518
+ display: flex;
1519
+ align-items: center;
1520
+ justify-content: space-between;
1521
+ gap: 0.75rem;
1522
+ }
1523
+
1524
+ .title {
1525
+ margin: 0;
1526
+ font-size: 1rem;
1527
+ font-weight: 700;
1528
+ color: #0f172a;
1529
+ }
1530
+
1531
+ .list {
1532
+ display: grid;
1533
+ gap: 0.5rem;
1534
+ }
1535
+
1536
+ .item {
1537
+ padding: 0.95rem 1rem;
1538
+ border-radius: 18px;
1539
+ background: #f8fafc;
1540
+ border: 1px solid rgba(15, 23, 42, 0.04);
1541
+ }
1542
+
1543
+ .item-title {
1544
+ font-size: 0.95rem;
1545
+ font-weight: 600;
1546
+ color: #0f172a;
1547
+ margin: 0 0 0.25rem;
1548
+ }
1549
+
1550
+ .item-meta {
1551
+ margin: 0;
1552
+ color: #6b7280;
1553
+ font-size: 0.85rem;
1554
+ }
1555
+
1556
+ .empty {
1557
+ color: #6b7280;
1558
+ font-size: 0.95rem;
1559
+ padding: 1rem 0;
1560
+ }
1561
+ </style>
1562
+
1563
+ <div class="activity-card">
1564
+ <div class="header"><h3 class="title">${t}</h3></div>
1565
+ <div class="list">
1566
+ <slot>
1567
+ <div class="empty">${n}</div>
1568
+ </slot>
1569
+ </div>
1570
+ </div>
1571
+ `}};f("af-dashboard-activity-list",cn);Ve=cn});var Ra={};s(Ra,{default:()=>Ne,AfriButton:()=>qn});var qn,Ne;var Xa=m(()=>{u();qn=class qn extends h{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",o=this.getAttribute("theme")||"tanzania",r=this.hasAttribute("disabled"),a=this.hasAttribute("loading"),l=this.getAttribute("icon"),b=this.getAttribute("aria-label"),e={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"}},i=e[o]||e.tanzania;this.shadowRoot.innerHTML=`
1572
+ <style>
1573
+ :host {
1574
+ display: inline-block;
1575
+ }
1576
+
1577
+ button {
1578
+ font-family: 'Inter', system-ui, sans-serif;
1579
+ font-weight: 600;
1580
+ border: none;
1581
+ border-radius: 5px;
1582
+ cursor: pointer;
1583
+ display: inline-flex;
1584
+ align-items: center;
1585
+ justify-content: center;
1586
+ gap: 8px;
1587
+ transition: all 200ms ease-out;
1588
+ position: relative;
1589
+ overflow: hidden;
1590
+ }
1591
+
1592
+ /* Sizes */
1593
+ .size-sm { padding: 5px 13px; font-size: 13px; }
1594
+ .size-md { padding: 8px 21px; font-size: 15px; }
1595
+ .size-lg { padding: 13px 34px; font-size: 17px; }
1596
+
1597
+ /* Variants */
1598
+ .variant-primary {
1599
+ background: ${i.primary};
1600
+ color: ${i.text};
1601
+ }
1602
+ .variant-primary:hover:not(:disabled) {
1603
+ filter: brightness(1.1);
1604
+ transform: translateY(-2px);
1605
+ box-shadow: 0 4px 12px rgba(0,0,0,0.2);
1606
+ }
1607
+
1608
+ .variant-secondary {
1609
+ background: transparent;
1610
+ color: ${i.primary};
1611
+ border: 2px solid ${i.primary};
1612
+ }
1613
+ .variant-secondary:hover:not(:disabled) {
1614
+ background: ${i.primary};
1615
+ color: ${i.text};
1616
+ }
1617
+
1618
+ .variant-ghost {
1619
+ background: transparent;
1620
+ color: ${i.primary};
1621
+ }
1622
+ .variant-ghost:hover:not(:disabled) {
1623
+ background: rgba(0,0,0,0.05);
1624
+ }
1625
+
1626
+ .variant-gradient {
1627
+ background: linear-gradient(135deg, ${i.primary} 0%, ${i.accent} 100%);
1628
+ color: ${i.text};
1629
+ }
1630
+ .variant-gradient:hover:not(:disabled) {
1631
+ transform: translateY(-2px);
1632
+ box-shadow: 0 6px 20px rgba(0,0,0,0.25);
1633
+ }
1634
+
1635
+ /* States */
1636
+ button:disabled {
1637
+ opacity: 0.5;
1638
+ cursor: not-allowed;
1639
+ }
1640
+
1641
+ button:active:not(:disabled) {
1642
+ transform: translateY(0);
1643
+ }
1644
+
1645
+ /* Loading spinner */
1646
+ .spinner {
1647
+ width: 16px;
1648
+ height: 16px;
1649
+ border: 2px solid transparent;
1650
+ border-top-color: currentColor;
1651
+ border-radius: 50%;
1652
+ animation: spin 0.8s linear infinite;
1653
+ }
1654
+
1655
+ @keyframes spin {
1656
+ to { transform: rotate(360deg); }
1657
+ }
1658
+
1659
+ /* Icon */
1660
+ .icon {
1661
+ font-size: 1.1em;
1662
+ }
1663
+ </style>
1664
+
1665
+ <button
1666
+ class="variant-${t} size-${n}"
1667
+ ${r?"disabled":""}
1668
+ ${b?`aria-label="${b}"`:""}
1669
+ ${a?'aria-busy="true"':""}
739
1670
  >
740
- ${l?'<span class="spinner"></span>':""}
741
- ${a&&!l?`<span class="icon">${a}</span>`:""}
1671
+ ${a?'<span class="spinner"></span>':""}
1672
+ ${l&&!a?`<span class="icon">${l}</span>`:""}
742
1673
  <slot></slot>
743
1674
  </button>
744
- `}};_("af-button",bn);wa=bn});var i0={};i(i0,{default:()=>_a,AfriCard:()=>ln});var ln,_a;var L0=x(()=>{X();ln=class ln 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",b=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"}},h={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`
1675
+ `}};f("af-button",qn);Ne=qn});var Qa={};s(Qa,{default:()=>Ke,AfriCard:()=>Hn});var Hn,Ke;var Ja=m(()=>{u();Hn=class Hn extends h{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",o=this.hasAttribute("clickable"),r=this.getAttribute("image"),a={default:{accent:"#333",border:"#eee"},tanzania:{accent:"#1EB53A",border:"#1EB53A"},maasai:{accent:"#FF0000",border:"#8B0000"},ndebele:{accent:"#4169E1",border:"#4169E1"}},b={elevated:"box-shadow: 0 2px 12px rgba(0,0,0,0.1);",outlined:`border: 2px solid ${(a[t]||a.default).border};`,flat:"background: #f8f9fa;"};this.shadowRoot.innerHTML=html`
745
1676
  <style>
746
1677
  :host {
747
1678
  display: block;
@@ -756,7 +1687,7 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
756
1687
  overflow: hidden;
757
1688
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
758
1689
  position: relative;
759
- ${b?"cursor: pointer;":""}
1690
+ ${o?"cursor: pointer;":""}
760
1691
  }
761
1692
 
762
1693
  .card::before {
@@ -767,7 +1698,7 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
767
1698
  pointer-events: none;
768
1699
  }
769
1700
 
770
- ${b?`
1701
+ ${o?`
771
1702
  .card:hover {
772
1703
  transform: translateY(-8px);
773
1704
  border-color: rgba(252, 209, 22, 0.4);
@@ -809,7 +1740,7 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
809
1740
  </style>
810
1741
 
811
1742
  <article class="card">
812
- ${o?`<img class="card-image" src="${o}" alt="" />`:""}
1743
+ ${r?`<img class="card-image" src="${r}" alt="" />`:""}
813
1744
  <div class="card-body">
814
1745
  <slot></slot>
815
1746
  </div>
@@ -819,7 +1750,7 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
819
1750
  </div>
820
1751
  `:""}
821
1752
  </article>
822
- `}};_("af-card",ln);_a=ln});var M0={};i(M0,{default:()=>Aa,AfriNavbar:()=>an});var an,Aa;var Q0=x(()=>{X();Qt();bt();an=class an 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",b=this.hasAttribute("sticky");this.shadowRoot.innerHTML=`
1753
+ `}};f("af-card",Hn);Ke=Hn});var Ga={};s(Ga,{default:()=>je,AfriNavbar:()=>Ln});var Ln,je;var Fa=m(()=>{u();Ht();rt();Ln=class Ln extends h{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",o=this.hasAttribute("sticky");this.shadowRoot.innerHTML=`
823
1754
  <style>
824
1755
  :host {
825
1756
  display: block;
@@ -995,7 +1926,7 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
995
1926
  <slot></slot>
996
1927
  </div>
997
1928
  </nav>
998
- `}};_("af-navbar",an);Aa=an});var J0={};i(J0,{default:()=>da,AfriInput:()=>hn});var hn,da;var G0=x(()=>{X();nn();hn=class hn 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=gt.validateField(l,b);if(!a.success)this.setAttribute("error",a.error);else this.removeAttribute("error")}}}_getValidationSchema(t){let n={email:U.email(),password:U.password(),phone:U.phone(),url:U.url(),required:U.required()};if(t.includes(":")){let[b,o]=t.split(":"),l=parseInt(o);switch(b){case"minLength":return U.minLength(l);case"maxLength":return U.maxLength(l);case"pattern":return U.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")||"",h=this.getAttribute("theme")||"tanzania",f=this.getAttribute("icon")||"",r=this.hasAttribute("required"),A=this.getAttribute("aria-label"),L=this.getAttribute("aria-describedby"),S={tanzania:{focus:"#1EB53A",error:"#DC3545"},maasai:{focus:"#FF0000",error:"#8B0000"},ndebele:{focus:"#4169E1",error:"#DC143C"}},G=S[h]||S.tanzania,B=[];if(l)B.push(`error-${this._uniqueId}`);else if(a)B.push(`helper-${this._uniqueId}`);if(L)B.push(...L.split(" "));let En=B.length>0?`aria-describedby="${B.join(" ")}"`:"";this.shadowRoot.innerHTML=`
1929
+ `}};f("af-navbar",Ln);je=Ln});var Ba={};s(Ba,{default:()=>ye,AfriInput:()=>Mn});var Mn,ye;var Ea=m(()=>{u();_n();Mn=class Mn extends h{static get observedAttributes(){return["type","name","label","placeholder","error","helper","theme","icon","required","aria-label","aria-describedby","validation"]}constructor(){super();this._uniqueId=Math.random().toString(36).substr(2,9),this.render()}get value(){return this.shadowRoot.querySelector("input")?.value||""}set value(t){let n=this.shadowRoot.querySelector("input");if(n)n.value=t}connectedCallback(){this._attachInputListeners(),this.loadStyles()}attributeChangedCallback(){this.render(),this._attachInputListeners()}_attachInputListeners(){let t=this.shadowRoot.querySelector("input");if(!t)return;t.addEventListener("input",(n)=>{if(this.emit("af-input",{value:n.target.value}),this.hasAttribute("error"))this.removeAttribute("error")}),t.addEventListener("blur",()=>{this.emit("af-blur",{value:this.value}),this._validateInput()})}_setupValidation(){if(!this.getAttribute("validation"))return;let n=this.shadowRoot.querySelector("input");if(!n)return;n.addEventListener("input",()=>{if(this.hasAttribute("error"))this.removeAttribute("error")})}_validateInput(){let t=this.shadowRoot.querySelector("input");if(!t)return;let n=this.getAttribute("validation"),o=t.value;if(this.hasAttribute("required")&&!o.trim()){this.setAttribute("error","This field is required");return}if(n&&o.trim()){let a=this._getValidationSchema(n);if(a){let l=ht.validateField(a,o);if(!l.success)this.setAttribute("error",l.error);else this.removeAttribute("error")}}}_getValidationSchema(t){let n={email:O.email(),password:O.password(),phone:O.phone(),url:O.url(),required:O.required()};if(t.includes(":")){let[o,r]=t.split(":"),a=parseInt(r);switch(o){case"minLength":return O.minLength(a);case"maxLength":return O.maxLength(a);case"pattern":return O.pattern(new RegExp(r),"Invalid format")}}return n[t]||null}attributeChangedCallback(){this.render()}render(){let t=this.getAttribute("type")||"text",n=this.getAttribute("name")||"",o=this.getAttribute("label")||"",r=this.getAttribute("placeholder")||"",a=this.getAttribute("error")||"",l=this.getAttribute("helper")||"",b=this.getAttribute("theme")||"tanzania",e=this.getAttribute("icon")||"",i=this.hasAttribute("required"),$=this.getAttribute("aria-label"),q=this.getAttribute("aria-describedby"),Y={tanzania:{focus:"#1EB53A",error:"#DC3545"},maasai:{focus:"#FF0000",error:"#8B0000"},ndebele:{focus:"#4169E1",error:"#DC143C"}},M=Y[b]||Y.tanzania,X=[];if(a)X.push(`error-${this._uniqueId}`);else if(l)X.push(`helper-${this._uniqueId}`);if(q)X.push(...q.split(" "));let no=X.length>0?`aria-describedby="${X.join(" ")}"`:"";this.shadowRoot.innerHTML=`
999
1930
  <style>
1000
1931
  :host {
1001
1932
  display: block;
@@ -1015,7 +1946,7 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
1015
1946
  }
1016
1947
 
1017
1948
  .required-star {
1018
- color: ${G.error};
1949
+ color: ${M.error};
1019
1950
  margin-left: 2px;
1020
1951
  }
1021
1952
 
@@ -1028,7 +1959,7 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
1028
1959
  input {
1029
1960
  width: 100%;
1030
1961
  padding: 10px 13px;
1031
- ${f?"padding-left: 40px;":""}
1962
+ ${e?"padding-left: 40px;":""}
1032
1963
  font-size: 15px;
1033
1964
  border: 2px solid #ddd;
1034
1965
  border-radius: 5px;
@@ -1039,12 +1970,12 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
1039
1970
 
1040
1971
  input:focus {
1041
1972
  outline: none;
1042
- border-color: ${l?G.error:G.focus};
1043
- box-shadow: 0 0 0 3px ${l?G.error+"20":G.focus+"20"};
1973
+ border-color: ${a?M.error:M.focus};
1974
+ box-shadow: 0 0 0 3px ${a?M.error+"20":M.focus+"20"};
1044
1975
  }
1045
1976
 
1046
1977
  input.has-error {
1047
- border-color: ${G.error};
1978
+ border-color: ${M.error};
1048
1979
  }
1049
1980
 
1050
1981
  .icon {
@@ -1064,30 +1995,30 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
1064
1995
  .error-text {
1065
1996
  font-size: 12px;
1066
1997
  margin-top: 4px;
1067
- color: ${G.error};
1998
+ color: ${M.error};
1068
1999
  }
1069
2000
  </style>
1070
2001
 
1071
2002
  <div class="input-wrapper">
1072
- ${b?`<label for="input-${this._uniqueId}">${b}${r?'<span class="required-star">*</span>':""}</label>`:""}
2003
+ ${o?`<label for="input-${this._uniqueId}">${o}${i?'<span class="required-star">*</span>':""}</label>`:""}
1073
2004
  <div class="input-container">
1074
- ${f?`<span class="icon">${f}</span>`:""}
2005
+ ${e?`<span class="icon">${e}</span>`:""}
1075
2006
  <input
1076
2007
  id="input-${this._uniqueId}"
1077
2008
  name="${n}"
1078
2009
  type="${t}"
1079
- placeholder="${o}"
1080
- class="${l?"has-error":""}"
1081
- ${r?"required":""}
1082
- ${A?`aria-label="${A}"`:""}
1083
- ${l?'aria-invalid="true"':""}
1084
- ${En}
2010
+ placeholder="${r}"
2011
+ class="${a?"has-error":""}"
2012
+ ${i?"required":""}
2013
+ ${$?`aria-label="${$}"`:""}
2014
+ ${a?'aria-invalid="true"':""}
2015
+ ${no}
1085
2016
  />
1086
2017
  </div>
1087
- ${l?`<div id="error-${this._uniqueId}" class="error-text" role="alert">${l}</div>`:""}
1088
- ${a&&!l?`<div id="helper-${this._uniqueId}" class="helper-text">${a}</div>`:""}
2018
+ ${a?`<div id="error-${this._uniqueId}" class="error-text" role="alert">${a}</div>`:""}
2019
+ ${l&&!a?`<div id="helper-${this._uniqueId}" class="helper-text">${l}</div>`:""}
1089
2020
  </div>
1090
- `}};_("af-input",hn);da=hn});var S0={};i(S0,{default:()=>xa,AfriAlert:()=>fn});var fn,xa;var F0=x(()=>{X();fn=class fn 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")||"",b=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=`
2021
+ `}};f("af-input",Mn);ye=Mn});var Da={};s(Da,{default:()=>Ce,AfriAlert:()=>Yn});var Yn,Ce;var Oa=m(()=>{u();Yn=class Yn extends h{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")||"",o=this.hasAttribute("dismissible"),r={success:{bg:"#d4edda",border:"#1EB53A",text:"#155724",icon:"✓"},warning:{bg:"#fff3cd",border:"#FCD116",text:"#856404",icon:"⚠"},error:{bg:"#f8d7da",border:"#DC3545",text:"#721c24",icon:"✕"},info:{bg:"#d1ecf1",border:"#00A3DD",text:"#0c5460",icon:"ℹ"}},a=r[t]||r.info;this.shadowRoot.innerHTML=`
1091
2022
  <style>
1092
2023
  :host {
1093
2024
  display: block;
@@ -1097,9 +2028,9 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
1097
2028
  .alert {
1098
2029
  padding: 13px 21px;
1099
2030
  border-radius: 5px;
1100
- border-left: 4px solid ${l.border};
1101
- background: ${l.bg};
1102
- color: ${l.text};
2031
+ border-left: 4px solid ${a.border};
2032
+ background: ${a.bg};
2033
+ color: ${a.text};
1103
2034
  display: flex;
1104
2035
  align-items: flex-start;
1105
2036
  gap: 13px;
@@ -1125,7 +2056,7 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
1125
2056
  display: flex;
1126
2057
  align-items: center;
1127
2058
  justify-content: center;
1128
- background: ${l.border};
2059
+ background: ${a.border};
1129
2060
  color: white;
1130
2061
  border-radius: 50%;
1131
2062
  }
@@ -1144,7 +2075,7 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
1144
2075
  border: none;
1145
2076
  font-size: 18px;
1146
2077
  cursor: pointer;
1147
- color: ${l.text};
2078
+ color: ${a.text};
1148
2079
  opacity: 0.7;
1149
2080
  padding: 0;
1150
2081
  line-height: 1;
@@ -1160,41 +2091,41 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
1160
2091
  </style>
1161
2092
 
1162
2093
  <div class="alert" role="alert">
1163
- <span class="icon">${l.icon}</span>
2094
+ <span class="icon">${a.icon}</span>
1164
2095
  <div class="content">
1165
2096
  ${n?`<div class="title">${n}</div>`:""}
1166
2097
  <slot></slot>
1167
2098
  </div>
1168
- ${b?'<button class="close-btn" aria-label="Dismiss">×</button>':""}
2099
+ ${o?'<button class="close-btn" aria-label="Dismiss">×</button>':""}
1169
2100
  </div>
1170
- `}};_("af-alert",fn);xa=fn});var R0={};i(R0,{AfriGrid:()=>Go});function qa(t,n){let{sidebarSide:b="left",sidebarWidth:o="280px",minWidth:l="280px",gap:a="24px",columns:h,rows:f,align:r="stretch",justify:A="stretch",dense:L=!1}=n,S=L?"dense":"",G=`
1171
- align-items: ${r};
1172
- justify-items: ${A};
1173
- gap: ${a};
1174
- `;switch(t){case"sidebar":return b==="right"?`display: grid; grid-template-columns: 1fr ${o}; ${G}`:`display: grid; grid-template-columns: ${o} 1fr; ${G}`;case"holy-grail":return`
2101
+ `}};f("af-alert",Yn);Ce=Yn});var Wa={};s(Wa,{AfriGrid:()=>$r});function Ie(t,n){let{sidebarSide:o="left",sidebarWidth:r="280px",minWidth:a="280px",gap:l="24px",columns:b,rows:e,align:i="stretch",justify:$="stretch",dense:q=!1}=n,Y=q?"dense":"",M=`
2102
+ align-items: ${i};
2103
+ justify-items: ${$};
2104
+ gap: ${l};
2105
+ `;switch(t){case"sidebar":return o==="right"?`display: grid; grid-template-columns: 1fr ${r}; ${M}`:`display: grid; grid-template-columns: ${r} 1fr; ${M}`;case"holy-grail":return`
1175
2106
  display: grid;
1176
- grid-template-columns: ${o} 1fr ${o};
2107
+ grid-template-columns: ${r} 1fr ${r};
1177
2108
  grid-template-rows: auto 1fr auto;
1178
- ${G}
2109
+ ${M}
1179
2110
  `;case"bento":return`
1180
2111
  display: grid;
1181
2112
  grid-template-columns: repeat(12, 1fr);
1182
2113
  grid-auto-rows: minmax(120px, auto);
1183
- grid-auto-flow: row ${S};
1184
- ${G}
2114
+ grid-auto-flow: row ${Y};
2115
+ ${M}
1185
2116
  `;case"masonry":return`
1186
2117
  display: grid;
1187
- grid-template-columns: repeat(auto-fill, minmax(${l}, 1fr));
2118
+ grid-template-columns: repeat(auto-fill, minmax(${a}, 1fr));
1188
2119
  grid-template-rows: masonry;
1189
- grid-auto-flow: row ${S};
1190
- ${G}
1191
- `;case"auto":default:{let B=h?`repeat(${h}, 1fr)`:`repeat(auto-fit, minmax(${l}, 1fr))`,En=f?`repeat(${f}, 1fr)`:"auto";return`
2120
+ grid-auto-flow: row ${Y};
2121
+ ${M}
2122
+ `;case"auto":default:{let X=b?`repeat(${b}, 1fr)`:`repeat(auto-fit, minmax(${a}, 1fr))`,no=e?`repeat(${e}, 1fr)`:"auto";return`
1192
2123
  display: grid;
1193
- grid-template-columns: ${B};
1194
- ${f?`grid-template-rows: ${En};`:""}
1195
- grid-auto-flow: row ${S};
1196
- ${G}
1197
- `}}}var Go;var B0=x(()=>{X();Go=class Go 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`
2124
+ grid-template-columns: ${X};
2125
+ ${e?`grid-template-rows: ${no};`:""}
2126
+ grid-auto-flow: row ${Y};
2127
+ ${M}
2128
+ `}}}var $r;var Ua=m(()=>{u();$r=class $r extends h{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`
1198
2129
  @media (max-width: 768px) {
1199
2130
  .grid {
1200
2131
  grid-template-columns: repeat(auto-fit, minmax(min(${t.minWidth}, 100%), 1fr));
@@ -1211,7 +2142,7 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
1211
2142
  grid-template-columns: 1fr;
1212
2143
  }
1213
2144
  }
1214
- `}render(){let t=this._getAttrs(),n=qa(t.layout,t),b=this._buildResponsiveBreakpoints(t)+this._buildSidebarResponsive(t);this.shadowRoot.innerHTML=Q`
2145
+ `}render(){let t=this._getAttrs(),n=Ie(t.layout,t),o=this._buildResponsiveBreakpoints(t)+this._buildSidebarResponsive(t);this.shadowRoot.innerHTML=d`
1215
2146
  <style>
1216
2147
  :host {
1217
2148
  display: block;
@@ -1230,7 +2161,7 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
1230
2161
  min-width: 0; /* Prevent overflow in grid context */
1231
2162
  }
1232
2163
 
1233
- ${b}
2164
+ ${o}
1234
2165
  </style>
1235
2166
 
1236
2167
  <div
@@ -1241,7 +2172,7 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
1241
2172
  >
1242
2173
  <slot></slot>
1243
2174
  </div>
1244
- `}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 b of n){let o=b.contentRect.width;if(Math.abs(o-t)>10)t=o,this.emit("af-grid-resize",{width:o,height:b.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")}};_("af-grid",Go)});var D0={};i(D0,{AfriSection:()=>So});var So;var E0=x(()=>{X();So=class So extends c{render(){let t=this.getAttribute("variant")||"default",n=this.getAttribute("title");this.shadowRoot.innerHTML=Q`
2175
+ `}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 o of n){let r=o.contentRect.width;if(Math.abs(r-t)>10)t=r,this.emit("af-grid-resize",{width:r,height:o.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")}};f("af-grid",$r)});var Va={};s(Va,{AfriSection:()=>wr});var wr;var Na=m(()=>{u();wr=class wr extends h{render(){let t=this.getAttribute("variant")||"default",n=this.getAttribute("title");this.shadowRoot.innerHTML=d`
1245
2176
  <style>
1246
2177
  :host { display: block; width: 100%; }
1247
2178
  .section {
@@ -1268,20 +2199,20 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
1268
2199
  }
1269
2200
  </style>
1270
2201
  <section class="section">
1271
- ${n?Q`
2202
+ ${n?d`
1272
2203
  <div class="section-header">
1273
2204
  <h2>${n}</h2>
1274
2205
  </div>
1275
2206
  `:""}
1276
2207
  <slot></slot>
1277
2208
  </section>
1278
- `}connectedCallback(){this.render()}};_("af-section",So)});var O0={};i(O0,{default:()=>ka,AfriIcon:()=>rn});var rn,ka;var W0=x(()=>{X();rn=class rn 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=`
2209
+ `}connectedCallback(){this.render()}};f("af-section",wr)});var Ka={};s(Ka,{default:()=>Pe,AfriIcon:()=>Sn});var Sn,Pe;var ja=m(()=>{u();Sn=class Sn extends h{static get observedAttributes(){return["name","size"]}connectedCallback(){this.render()}render(){let t=this.getAttribute("name")||"circle",n=this.getAttribute("size")||"24",r={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=`
1279
2210
  <style>
1280
2211
  :host { display: inline-flex; vertical-align: middle; }
1281
2212
  svg { width: ${n}px; height: ${n}px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
1282
2213
  </style>
1283
- <svg viewBox="0 0 24 24">${o}</svg>
1284
- `}};_("af-icon",rn);ka=rn});var m0={};i(m0,{default:()=>Ha,AfriAccordion:()=>gn});var gn,Ha;var p0=x(()=>{X();gn=class gn 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,b)=>{n.addEventListener("click",()=>{this._toggleItem(b)})})}_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"]'),b=n?Array.from(n.children):[],o={tanzania:{accent:"#1EB53A"},maasai:{accent:"#FF0000"},ndebele:{accent:"#4169E1"}},l=o[t]||o.tanzania;this.shadowRoot.innerHTML=`
2214
+ <svg viewBox="0 0 24 24">${r}</svg>
2215
+ `}};f("af-icon",Sn);Pe=Sn});var ya={};s(ya,{default:()=>Te,AfriAccordion:()=>Rn});var Rn,Te;var Ca=m(()=>{u();Rn=class Rn extends h{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,o)=>{n.addEventListener("click",()=>{this._toggleItem(o)})})}_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"]'),o=n?Array.from(n.children):[],r={tanzania:{accent:"#1EB53A"},maasai:{accent:"#FF0000"},ndebele:{accent:"#4169E1"}},a=r[t]||r.tanzania;this.shadowRoot.innerHTML=`
1285
2216
  <style>
1286
2217
  :host {
1287
2218
  display: block;
@@ -1324,7 +2255,7 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
1324
2255
  }
1325
2256
 
1326
2257
  .accordion-header.active {
1327
- color: ${l.accent};
2258
+ color: ${a.accent};
1328
2259
  }
1329
2260
 
1330
2261
  .accordion-icon {
@@ -1359,32 +2290,32 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
1359
2290
  </style>
1360
2291
 
1361
2292
  <div class="accordion">
1362
- ${b.map((a,h)=>{let f=this._openItems.has(h),r=`accordion-header-${this._uniqueId}-${h}`,A=`accordion-panel-${this._uniqueId}-${h}`;return`
2293
+ ${o.map((l,b)=>{let e=this._openItems.has(b),i=`accordion-header-${this._uniqueId}-${b}`,$=`accordion-panel-${this._uniqueId}-${b}`;return`
1363
2294
  <div class="accordion-item">
1364
2295
  <button
1365
- class="accordion-header ${f?"active":""}"
1366
- aria-expanded="${f}"
1367
- aria-controls="${A}"
1368
- id="${r}"
2296
+ class="accordion-header ${e?"active":""}"
2297
+ aria-expanded="${e}"
2298
+ aria-controls="${$}"
2299
+ id="${i}"
1369
2300
  >
1370
- <span>${a.getAttribute("title")||`Item ${h+1}`}</span>
2301
+ <span>${l.getAttribute("title")||`Item ${b+1}`}</span>
1371
2302
  <span class="accordion-icon">▼</span>
1372
2303
  </button>
1373
2304
  <div
1374
- class="accordion-content ${f?"open":""}"
1375
- id="${A}"
2305
+ class="accordion-content ${e?"open":""}"
2306
+ id="${$}"
1376
2307
  role="region"
1377
- aria-labelledby="${r}"
2308
+ aria-labelledby="${i}"
1378
2309
  >
1379
2310
  <div class="accordion-body">
1380
- ${a.innerHTML}
2311
+ ${l.innerHTML}
1381
2312
  </div>
1382
2313
  </div>
1383
2314
  </div>
1384
2315
  `}).join("")}
1385
2316
  </div>
1386
2317
  <slot name="items"></slot>
1387
- `}};_("af-accordion",gn);Ha=gn});var u0={};i(u0,{default:()=>Ya,AfriHero:()=>$n});var $n,Ya;var U0=x(()=>{X();Qt();bt();$n=class $n 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")||"",b=this.getAttribute("pattern")||"",o=this.getAttribute("variant")||"default";this.shadowRoot.innerHTML=`
2318
+ `}};f("af-accordion",Rn);Te=Rn});var Ia={};s(Ia,{default:()=>Ze,AfriHero:()=>Xn});var Xn,Ze;var Pa=m(()=>{u();Ht();rt();Xn=class Xn extends h{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")||"",o=this.getAttribute("pattern")||"",r=this.getAttribute("variant")||"default";this.shadowRoot.innerHTML=`
1388
2319
  <style>
1389
2320
  :host {
1390
2321
  display: flex;
@@ -1452,11 +2383,11 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
1452
2383
  z-index: 2;
1453
2384
  }
1454
2385
 
1455
- ${b?`
2386
+ ${o?`
1456
2387
  .pattern-bg {
1457
2388
  position: absolute;
1458
2389
  inset: 0;
1459
- background-image: url('${b}');
2390
+ background-image: url('${o}');
1460
2391
  background-size: cover;
1461
2392
  background-position: center;
1462
2393
  opacity: 0.15;
@@ -1474,7 +2405,7 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
1474
2405
 
1475
2406
  <div class="aura"></div>
1476
2407
  <div class="mesh"></div>
1477
- ${b?'<div class="pattern-bg"></div>':""}
2408
+ ${o?'<div class="pattern-bg"></div>':""}
1478
2409
 
1479
2410
  <div class="content">
1480
2411
  <h1>${t}</h1>
@@ -1484,7 +2415,7 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
1484
2415
  </div>
1485
2416
  <slot></slot>
1486
2417
  </div>
1487
- `}};_("af-hero",$n);Ya=$n});var V0={};i(V0,{default:()=>Xa,AfriTable:()=>cn});var cn,Xa;var N0=x(()=>{X();cn=class cn 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 b=t[this._sortColumn],o=n[this._sortColumn],l=this._sortDirection==="asc"?1:-1;if(typeof b==="number")return(b-o)*l;return String(b).localeCompare(String(o))*l})}render(){let t=this.getAttribute("theme")||"tanzania",n=this.hasAttribute("striped"),b=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,a=this._getSortedData();this.shadowRoot.innerHTML=`
2418
+ `}};f("af-hero",Xn);Ze=Xn});var Ta={};s(Ta,{default:()=>ze,AfriTable:()=>Qn});var Qn,ze;var Za=m(()=>{u();Qn=class Qn extends h{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 o=t[this._sortColumn],r=n[this._sortColumn],a=this._sortDirection==="asc"?1:-1;if(typeof o==="number")return(o-r)*a;return String(o).localeCompare(String(r))*a})}render(){let t=this.getAttribute("theme")||"tanzania",n=this.hasAttribute("striped"),o=this.hasAttribute("hoverable"),r={tanzania:{header:"#1EB53A",text:"#FFFFFF",accent:"#FCD116"},maasai:{header:"#8B0000",text:"#FFFFFF",accent:"#FF0000"},ndebele:{header:"#4169E1",text:"#FFFFFF",accent:"#FFD700"}},a=r[t]||r.tanzania,l=this._getSortedData();this.shadowRoot.innerHTML=`
1488
2419
  <style>
1489
2420
  :host {
1490
2421
  display: block;
@@ -1504,8 +2435,8 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
1504
2435
  }
1505
2436
 
1506
2437
  th {
1507
- background: ${l.header};
1508
- color: ${l.text};
2438
+ background: ${a.header};
2439
+ color: ${a.text};
1509
2440
  padding: 13px;
1510
2441
  text-align: left;
1511
2442
  font-weight: 600;
@@ -1534,9 +2465,9 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
1534
2465
  }
1535
2466
  `:""}
1536
2467
 
1537
- ${b?`
2468
+ ${o?`
1538
2469
  tbody tr:hover {
1539
- background: ${l.accent}20;
2470
+ background: ${a.accent}20;
1540
2471
  }
1541
2472
  `:""}
1542
2473
 
@@ -1551,20 +2482,20 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
1551
2482
  <table>
1552
2483
  <thead>
1553
2484
  <tr>
1554
- ${this._columns.map((h)=>`
1555
- <th data-column="${h.key}">
1556
- ${h.label}
2485
+ ${this._columns.map((b)=>`
2486
+ <th data-column="${b.key}">
2487
+ ${b.label}
1557
2488
  <span class="sort-icon">
1558
- ${this._sortColumn===h.key?this._sortDirection==="asc"?"↑":"↓":"↕"}
2489
+ ${this._sortColumn===b.key?this._sortDirection==="asc"?"↑":"↓":"↕"}
1559
2490
  </span>
1560
2491
  </th>
1561
2492
  `).join("")}
1562
2493
  </tr>
1563
2494
  </thead>
1564
2495
  <tbody>
1565
- ${a.length?a.map((h)=>`
2496
+ ${l.length?l.map((b)=>`
1566
2497
  <tr>
1567
- ${this._columns.map((f)=>`<td>${h[f.key]??""}</td>`).join("")}
2498
+ ${this._columns.map((e)=>`<td>${b[e.key]??""}</td>`).join("")}
1568
2499
  </tr>
1569
2500
  `).join(""):`
1570
2501
  <tr>
@@ -1574,7 +2505,7 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
1574
2505
  </tbody>
1575
2506
  </table>
1576
2507
  </div>
1577
- `,this.shadowRoot.querySelectorAll("th").forEach((h)=>{h.addEventListener("click",()=>{this._handleSort(h.dataset.column)})})}};_("af-table",cn);Xa=cn});var K0={};i(K0,{default:()=>ia,AfriModal:()=>vn});var vn,ia;var j0=x(()=>{X();vn=class vn 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"])',b=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[...b,...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 b=n[0],o=n[n.length-1];if(t.shiftKey){if(document.activeElement===b)t.preventDefault(),o.focus()}else if(document.activeElement===o)t.preventDefault(),b.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,b){if(this.render(),t==="open")this._setupListeners()}render(){let t=this.hasAttribute("open"),n=this.getAttribute("theme")||"tanzania",b=this.getAttribute("size")||"md",o={tanzania:{accent:"#1EB53A"},maasai:{accent:"#FF0000"},ndebele:{accent:"#4169E1"}},l=o[n]||o.tanzania,a={sm:"400px",md:"560px",lg:"720px",full:"95vw"},h=this.getAttribute("aria-label"),f=this.getAttribute("aria-labelledby")||"modal-title";this.shadowRoot.innerHTML=`
2508
+ `,this.shadowRoot.querySelectorAll("th").forEach((b)=>{b.addEventListener("click",()=>{this._handleSort(b.dataset.column)})})}};f("af-table",Qn);ze=Qn});var za={};s(za,{default:()=>ti,AfriModal:()=>Jn});var Jn,ti;var tl=m(()=>{u();Jn=class Jn extends h{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"])',o=Array.from(t?.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')||[]),r=Array.from(this.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'));return[...o,...r]}_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 o=n[0],r=n[n.length-1];if(t.shiftKey){if(document.activeElement===o)t.preventDefault(),r.focus()}else if(document.activeElement===r)t.preventDefault(),o.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,o){if(this.render(),t==="open")this._setupListeners()}render(){let t=this.hasAttribute("open"),n=this.getAttribute("theme")||"tanzania",o=this.getAttribute("size")||"md",r={tanzania:{accent:"#1EB53A"},maasai:{accent:"#FF0000"},ndebele:{accent:"#4169E1"}},a=r[n]||r.tanzania,l={sm:"400px",md:"560px",lg:"720px",full:"95vw"},b=this.getAttribute("aria-label"),e=this.getAttribute("aria-labelledby")||"modal-title";this.shadowRoot.innerHTML=`
1578
2509
  <style>
1579
2510
  :host {
1580
2511
  font-family: 'Inter', system-ui, sans-serif;
@@ -1601,7 +2532,7 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
1601
2532
  background: white;
1602
2533
  border-radius: 8px;
1603
2534
  width: 100%;
1604
- max-width: ${a[b]||a.md};
2535
+ max-width: ${l[o]||l.md};
1605
2536
  max-height: 90vh;
1606
2537
  overflow: hidden;
1607
2538
  display: flex;
@@ -1646,7 +2577,7 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
1646
2577
  }
1647
2578
 
1648
2579
  .close-btn:hover {
1649
- color: ${l.accent};
2580
+ color: ${a.accent};
1650
2581
  }
1651
2582
 
1652
2583
  .modal-body {
@@ -1665,7 +2596,7 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
1665
2596
  </style>
1666
2597
 
1667
2598
  <div class="backdrop">
1668
- <div class="modal" role="dialog" aria-modal="true" ${h?`aria-label="${h}"`:`aria-labelledby="${f}"`}>
2599
+ <div class="modal" role="dialog" aria-modal="true" ${b?`aria-label="${b}"`:`aria-labelledby="${e}"`}>
1669
2600
  <div class="modal-header">
1670
2601
  <slot name="header" id="modal-title"></slot>
1671
2602
  <button class="close-btn" aria-label="Close modal">×</button>
@@ -1678,7 +2609,7 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
1678
2609
  </div>
1679
2610
  </div>
1680
2611
  </div>
1681
- `}};_("af-modal",vn);ia=vn});var I0={};i(I0,{default:()=>La,AfriTabs:()=>wn});var wn,La;var P0=x(()=>{X();wn=class wn 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"]'),b=n?Array.from(n.children):[];if(b.length===0)return;switch(t.key){case"ArrowLeft":t.preventDefault(),this._activeTab=this._activeTab>0?this._activeTab-1:b.length-1,this.render(),this._setupTabs(),this._focusActiveTab();break;case"ArrowRight":t.preventDefault(),this._activeTab=this._activeTab<b.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=b.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,b)=>{n.addEventListener("click",()=>{this._activeTab=b,this.render(),this._setupTabs(),this.emit("af-tab-change",{index:b,tab:n.textContent})})})}attributeChangedCallback(){this.render(),this._setupTabs()}render(){let t=this.getAttribute("theme")||"tanzania",n=this.querySelector('[slot="tabs"]'),b=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=`
2612
+ `}};f("af-modal",Jn);ti=Jn});var nl={};s(nl,{default:()=>ni,AfriTabs:()=>Gn});var Gn,ni;var ol=m(()=>{u();Gn=class Gn extends h{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"]'),o=n?Array.from(n.children):[];if(o.length===0)return;switch(t.key){case"ArrowLeft":t.preventDefault(),this._activeTab=this._activeTab>0?this._activeTab-1:o.length-1,this.render(),this._setupTabs(),this._focusActiveTab();break;case"ArrowRight":t.preventDefault(),this._activeTab=this._activeTab<o.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=o.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,o)=>{n.addEventListener("click",()=>{this._activeTab=o,this.render(),this._setupTabs(),this.emit("af-tab-change",{index:o,tab:n.textContent})})})}attributeChangedCallback(){this.render(),this._setupTabs()}render(){let t=this.getAttribute("theme")||"tanzania",n=this.querySelector('[slot="tabs"]'),o=n?Array.from(n.children):[],r={tanzania:{active:"#1EB53A",text:"#FFFFFF"},maasai:{active:"#FF0000",text:"#FFFFFF"},ndebele:{active:"#4169E1",text:"#FFFFFF"}},a=r[t]||r.tanzania;this.shadowRoot.innerHTML=`
1682
2613
  <style>
1683
2614
  :host {
1684
2615
  display: block;
@@ -1714,13 +2645,13 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
1714
2645
  }
1715
2646
 
1716
2647
  .tab-button:hover {
1717
- color: ${l.active};
2648
+ color: ${a.active};
1718
2649
  background: rgba(0,0,0,0.03);
1719
2650
  }
1720
2651
 
1721
2652
  .tab-button.active {
1722
- color: ${l.active};
1723
- border-bottom-color: ${l.active};
2653
+ color: ${a.active};
2654
+ border-bottom-color: ${a.active};
1724
2655
  background: white;
1725
2656
  }
1726
2657
 
@@ -1750,30 +2681,30 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
1750
2681
 
1751
2682
  <div class="tabs-container">
1752
2683
  <div class="tab-list" role="tablist">
1753
- ${b.map((a,h)=>`
1754
- <button class="tab-button ${h===this._activeTab?"active":""}"
2684
+ ${o.map((l,b)=>`
2685
+ <button class="tab-button ${b===this._activeTab?"active":""}"
1755
2686
  role="tab"
1756
- aria-selected="${h===this._activeTab}"
1757
- aria-controls="panel-${h}"
1758
- tabindex="${h===this._activeTab?"0":"-1"}"
1759
- id="tab-${h}">
1760
- ${a.getAttribute("label")||`Tab ${h+1}`}
2687
+ aria-selected="${b===this._activeTab}"
2688
+ aria-controls="panel-${b}"
2689
+ tabindex="${b===this._activeTab?"0":"-1"}"
2690
+ id="tab-${b}">
2691
+ ${l.getAttribute("label")||`Tab ${b+1}`}
1761
2692
  </button>
1762
2693
  `).join("")}
1763
2694
  </div>
1764
2695
  <div class="tab-panels">
1765
- ${b.map((a,h)=>`
1766
- <div class="tab-panel ${h===this._activeTab?"active":""}"
2696
+ ${o.map((l,b)=>`
2697
+ <div class="tab-panel ${b===this._activeTab?"active":""}"
1767
2698
  role="tabpanel"
1768
- id="panel-${h}"
1769
- aria-labelledby="tab-${h}">
1770
- ${a.innerHTML}
2699
+ id="panel-${b}"
2700
+ aria-labelledby="tab-${b}">
2701
+ ${l.innerHTML}
1771
2702
  </div>
1772
2703
  `).join("")}
1773
2704
  </div>
1774
2705
  </div>
1775
2706
  <slot name="tabs"></slot>
1776
- `}};_("af-tabs",wn);La=wn});var T0={};i(T0,{default:()=>Ma,AfriSidebar:()=>_n});var _n,Ma;var C0=x(()=>{X();Qt();bt();_n=class _n extends c{static get observedAttributes(){return["position"]}constructor(){super();this._unsubscribe=null}connectedCallback(){super.connectedCallback(),this._unsubscribe=y(()=>{this.updateUI()}),this.render()}disconnectedCallback(){if(this._unsubscribe)this._unsubscribe()}updateUI(){let t=D.ui.sidebarCollapsed,n=this.shadowRoot.querySelector(".sidebar"),b=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(b)b.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=D.ui.sidebarCollapsed;this.shadowRoot.innerHTML=`
2707
+ `}};f("af-tabs",Gn);ni=Gn});var rl={};s(rl,{default:()=>oi,AfriSidebar:()=>Fn});var Fn,oi;var al=m(()=>{u();Ht();rt();Fn=class Fn extends h{static get observedAttributes(){return["position"]}constructor(){super();this._unsubscribe=null}connectedCallback(){super.connectedCallback(),this._unsubscribe=I(()=>{this.updateUI()}),this.render()}disconnectedCallback(){if(this._unsubscribe)this._unsubscribe()}updateUI(){let t=Q.ui.sidebarCollapsed,n=this.shadowRoot.querySelector(".sidebar"),o=this.shadowRoot.querySelector(".sidebar-title"),r=this.shadowRoot.getElementById("toggle"),a=this.shadowRoot.querySelector(".sidebar-content");if(n)n.style.width=t?"60px":"260px";if(o)o.style.opacity=t?"0":"1";if(a)a.style.padding=t?"12px":"20px";if(r)r.innerHTML=t?"→":"← Collapse"}render(){let t=this.getAttribute("position")||"left",n=Q.ui.sidebarCollapsed;this.shadowRoot.innerHTML=`
1777
2708
  <style>
1778
2709
  :host {
1779
2710
  display: block;
@@ -1882,7 +2813,7 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
1882
2813
  </button>
1883
2814
  </div>
1884
2815
  </aside>
1885
- `,this.shadowRoot.getElementById("toggle").addEventListener("click",()=>{actions.toggleSidebar()})}};_("af-sidebar",_n);Ma=_n});var y0={};i(y0,{default:()=>Qa,AfriDropdown:()=>An});var An,Qa;var e0=x(()=>{X();An=class An 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=`
2816
+ `,this.shadowRoot.getElementById("toggle").addEventListener("click",()=>{actions.toggleSidebar()})}};f("af-sidebar",Fn);oi=Fn});var ll={};s(ll,{default:()=>ri,AfriDropdown:()=>Bn});var Bn,ri;var bl=m(()=>{u();Bn=class Bn extends h{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=`
1886
2817
  <style>
1887
2818
  :host {
1888
2819
  display: inline-block;
@@ -1964,7 +2895,7 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
1964
2895
  <div class="dropdown-menu" role="menu" ${n?"":'aria-hidden="true"'}>
1965
2896
  <slot></slot>
1966
2897
  </div>
1967
- `,this.shadowRoot.getElementById("trigger").addEventListener("click",(b)=>{b.stopPropagation(),this.toggle()})}};_("af-dropdown",An);Qa=An});var Z0={};i(Z0,{default:()=>Ja,AfriSelect:()=>dn});var dn,Ja;var s0=x(()=>{X();dn=class dn 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",(b)=>{this._handleKeydown(b)}),this.shadowRoot.querySelectorAll(".select-option").forEach((b,o)=>{b.addEventListener("click",()=>{this._selectOption(o)})}),document.addEventListener("click",(b)=>{if(!this.contains(b.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 b=this._selectedIndex+t;if(b<0)b=n.length-1;if(b>=n.length)b=0;this._selectedIndex=b,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",b=this.getAttribute("theme")||"tanzania",o=this.getAttribute("error")||"",l=this.hasAttribute("required"),a=this.getAttribute("aria-label"),h=this.getAttribute("aria-describedby"),f={tanzania:{focus:"#1EB53A",error:"#DC3545"},maasai:{focus:"#FF0000",error:"#8B0000"},ndebele:{focus:"#4169E1",error:"#DC143C"}},r=f[b]||f.tanzania,A=[];if(o)A.push(`error-${this._uniqueId}`);if(h)A.push(...h.split(" "));let L=A.length>0?`aria-describedby="${A.join(" ")}"`:"",S=this._selectedIndex>=0?this._options[this._selectedIndex]?.label:n;this.shadowRoot.innerHTML=`
2898
+ `,this.shadowRoot.getElementById("trigger").addEventListener("click",(o)=>{o.stopPropagation(),this.toggle()})}};f("af-dropdown",Bn);ri=Bn});var el={};s(el,{default:()=>ai,AfriSelect:()=>En});var En,ai;var il=m(()=>{u();En=class En extends h{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",(o)=>{this._handleKeydown(o)}),this.shadowRoot.querySelectorAll(".select-option").forEach((o,r)=>{o.addEventListener("click",()=>{this._selectOption(r)})}),document.addEventListener("click",(o)=>{if(!this.contains(o.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 o=this._selectedIndex+t;if(o<0)o=n.length-1;if(o>=n.length)o=0;this._selectedIndex=o,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",o=this.getAttribute("theme")||"tanzania",r=this.getAttribute("error")||"",a=this.hasAttribute("required"),l=this.getAttribute("aria-label"),b=this.getAttribute("aria-describedby"),e={tanzania:{focus:"#1EB53A",error:"#DC3545"},maasai:{focus:"#FF0000",error:"#8B0000"},ndebele:{focus:"#4169E1",error:"#DC143C"}},i=e[o]||e.tanzania,$=[];if(r)$.push(`error-${this._uniqueId}`);if(b)$.push(...b.split(" "));let q=$.length>0?`aria-describedby="${$.join(" ")}"`:"",Y=this._selectedIndex>=0?this._options[this._selectedIndex]?.label:n;this.shadowRoot.innerHTML=`
1968
2899
  <style>
1969
2900
  :host {
1970
2901
  display: block;
@@ -1981,7 +2912,7 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
1981
2912
  }
1982
2913
 
1983
2914
  .required-star {
1984
- color: ${r.error};
2915
+ color: ${i.error};
1985
2916
  margin-left: 2px;
1986
2917
  }
1987
2918
 
@@ -1993,7 +2924,7 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
1993
2924
  width: 100%;
1994
2925
  padding: 10px 40px 10px 13px;
1995
2926
  font-size: 15px;
1996
- border: 2px solid ${o?r.error:"#ddd"};
2927
+ border: 2px solid ${r?i.error:"#ddd"};
1997
2928
  border-radius: 5px;
1998
2929
  background: white;
1999
2930
  cursor: pointer;
@@ -2006,8 +2937,8 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
2006
2937
  .select-trigger:focus,
2007
2938
  .select-trigger.open {
2008
2939
  outline: none;
2009
- border-color: ${o?r.error:r.focus};
2010
- box-shadow: 0 0 0 3px ${o?r.error+"20":r.focus+"20"};
2940
+ border-color: ${r?i.error:i.focus};
2941
+ box-shadow: 0 0 0 3px ${r?i.error+"20":i.focus+"20"};
2011
2942
  }
2012
2943
 
2013
2944
  .select-arrow {
@@ -2053,18 +2984,18 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
2053
2984
  }
2054
2985
 
2055
2986
  .select-option:hover {
2056
- background: ${r.focus}15;
2987
+ background: ${i.focus}15;
2057
2988
  }
2058
2989
 
2059
2990
  .select-option.selected {
2060
- background: ${r.focus};
2991
+ background: ${i.focus};
2061
2992
  color: white;
2062
2993
  }
2063
2994
 
2064
2995
  .error-text {
2065
2996
  font-size: 12px;
2066
2997
  margin-top: 4px;
2067
- color: ${r.error};
2998
+ color: ${i.error};
2068
2999
  }
2069
3000
 
2070
3001
  ::slotted(option) {
@@ -2072,35 +3003,35 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
2072
3003
  }
2073
3004
  </style>
2074
3005
 
2075
- ${t?`<label for="select-${this._uniqueId}">${t}${l?'<span class="required-star">*</span>':""}</label>`:""}
3006
+ ${t?`<label for="select-${this._uniqueId}">${t}${a?'<span class="required-star">*</span>':""}</label>`:""}
2076
3007
  <div class="select-container">
2077
3008
  <button type="button"
2078
3009
  id="select-${this._uniqueId}"
2079
3010
  class="select-trigger ${this._isOpen?"open":""}"
2080
3011
  aria-expanded="${this._isOpen}"
2081
3012
  aria-haspopup="listbox"
2082
- ${a?`aria-label="${a}"`:""}
2083
- ${o?'aria-invalid="true"':""}
2084
- ${L}>
2085
- ${S}
3013
+ ${l?`aria-label="${l}"`:""}
3014
+ ${r?'aria-invalid="true"':""}
3015
+ ${q}>
3016
+ ${Y}
2086
3017
  </button>
2087
3018
  <span class="select-arrow" aria-hidden="true">▼</span>
2088
3019
  <div class="select-dropdown ${this._isOpen?"open":""}"
2089
3020
  role="listbox"
2090
3021
  aria-hidden="${!this._isOpen}">
2091
- ${this._options.map((G,B)=>`
2092
- <div class="select-option ${B===this._selectedIndex?"selected":""}"
2093
- data-index="${B}"
3022
+ ${this._options.map((M,X)=>`
3023
+ <div class="select-option ${X===this._selectedIndex?"selected":""}"
3024
+ data-index="${X}"
2094
3025
  role="option"
2095
- aria-selected="${B===this._selectedIndex}">
2096
- ${G.label}
3026
+ aria-selected="${X===this._selectedIndex}">
3027
+ ${M.label}
2097
3028
  </div>
2098
3029
  `).join("")}
2099
3030
  </div>
2100
3031
  </div>
2101
- ${o?`<div id="error-${this._uniqueId}" class="error-text" role="alert">${o}</div>`:""}
3032
+ ${r?`<div id="error-${this._uniqueId}" class="error-text" role="alert">${r}</div>`:""}
2102
3033
  <slot></slot>
2103
- `}};_("af-select",dn);Ja=dn});var z0={};i(z0,{default:()=>Ga,AfriForm:()=>xn});var xn,Ga;var tb=x(()=>{X();nn();xn=class xn 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,b=this.querySelector('[type="submit"]')||this.shadowRoot.querySelector('button[type="submit"]'),o=this.getAttribute("schema"),l=o?this._getSchema(o):null,a=this.getAttribute("action"),h=this.getAttribute("method")||"GET",f=new FormData(n),r=Object.fromEntries(f.entries());if(Array.from(this.querySelectorAll("af-input")).forEach((L)=>{let S=L.getAttribute("name");if(S)r[S]=L.value}),l){let L=gt.validate(l,r);if(!L.success){this._showValidationErrors(L.errors),this.emit("af-validation-error",{errors:L.errors});return}}if(!a)return;if(b){var A=b.textContent;b.textContent="Wait...",b.disabled=!0}try{let L=await fetch(a,{method:h,headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(L.ok)this.emit("success",await L.json()),this.setAttribute("success","Form submitted successfully!"),this.removeAttribute("error");else{let S=await L.text();this.emit("error",S),this.setAttribute("error",S),this.removeAttribute("success")}}catch(L){this.emit("error",L.message),this.setAttribute("error",L.message),this.removeAttribute("success")}finally{if(b)b.textContent=A,b.disabled=!1}}_getSchema(t){return tn[t]||null}_showValidationErrors(t){this.shadowRoot.querySelectorAll(".field-error").forEach((n)=>n.remove()),Object.entries(t).forEach(([n,b])=>{let o=this.querySelector(`[name="${n}"]`);if(o)if(o.tagName==="AF-INPUT")o.setAttribute("error",b);else{let l=document.createElement("div");l.className="field-error",l.textContent=b,l.style.color="red",l.style.fontSize="12px",l.style.marginTop="4px",o.parentNode.insertBefore(l,o.nextSibling)}})}};_("af-form",xn);Ga=xn});var nb={};i(nb,{default:()=>Sa,AfriTooltip:()=>qn});var qn,Sa;var ob=x(()=>{X();qn=class qn 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",b={top:`
3034
+ `}};f("af-select",En);ai=En});var hl={};s(hl,{default:()=>li,AfriForm:()=>Dn});var Dn,li;var fl=m(()=>{u();_n();Dn=class Dn extends h{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,o=this.querySelector('[type="submit"]')||this.shadowRoot.querySelector('button[type="submit"]'),r=this.getAttribute("schema"),a=r?this._getSchema(r):null,l=this.getAttribute("action"),b=this.getAttribute("method")||"GET",e=new FormData(n),i=Object.fromEntries(e.entries());if(Array.from(this.querySelectorAll("af-input")).forEach((q)=>{let Y=q.getAttribute("name");if(Y)i[Y]=q.value}),a){let q=ht.validate(a,i);if(!q.success){this._showValidationErrors(q.errors),this.emit("af-validation-error",{errors:q.errors});return}}if(!l)return;if(o){var $=o.textContent;o.textContent="Wait...",o.disabled=!0}try{let q=await fetch(l,{method:b,headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(q.ok)this.emit("success",await q.json()),this.setAttribute("success","Form submitted successfully!"),this.removeAttribute("error");else{let Y=await q.text();this.emit("error",Y),this.setAttribute("error",Y),this.removeAttribute("success")}}catch(q){this.emit("error",q.message),this.setAttribute("error",q.message),this.removeAttribute("success")}finally{if(o)o.textContent=$,o.disabled=!1}}_getSchema(t){return An[t]||null}_showValidationErrors(t){this.shadowRoot.querySelectorAll(".field-error").forEach((n)=>n.remove()),Object.entries(t).forEach(([n,o])=>{let r=this.querySelector(`[name="${n}"]`);if(r)if(r.tagName==="AF-INPUT")r.setAttribute("error",o);else{let a=document.createElement("div");a.className="field-error",a.textContent=o,a.style.color="red",a.style.fontSize="12px",a.style.marginTop="4px",r.parentNode.insertBefore(a,r.nextSibling)}})}};f("af-form",Dn);li=Dn});var cl={};s(cl,{default:()=>bi,AfriTooltip:()=>On});var On,bi;var dl=m(()=>{u();On=class On extends h{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",o={top:`
2104
3035
  bottom: 100%;
2105
3036
  left: 50%;
2106
3037
  transform: translateX(-50%) translateY(-8px);
@@ -2131,7 +3062,7 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
2131
3062
 
2132
3063
  .tooltip-content {
2133
3064
  position: absolute;
2134
- ${b[n]}
3065
+ ${o[n]}
2135
3066
  padding: 8px 12px;
2136
3067
  background: #1e1e1e;
2137
3068
  border: 1px solid #2a2a2a;
@@ -2189,7 +3120,7 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
2189
3120
  <slot></slot>
2190
3121
  </span>
2191
3122
  <div class="tooltip-content" id="${this._tooltipId}" role="tooltip" aria-hidden="true">${t}</div>
2192
- `}};_("af-tooltip",qn);Sa=qn});var bb={};i(bb,{default:()=>Fa,AfriToast:()=>kn});var kn,Fa;var lb=x(()=>{X();kn=class kn extends c{static get observedAttributes(){return["type","message","duration"]}constructor(){super();this.render()}show(t,n="info",b=4000){if(this.setAttribute("message",t),this.setAttribute("type",n),this.render(),this.shadowRoot.querySelector(".toast").classList.add("show"),b>0)setTimeout(()=>this.hide(),b)}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")||"",b={success:"✓",error:"✗",warning:"⚠",info:"ℹ"},o={success:"#1EB53A",error:"#EF3340",warning:"#FCD116",info:"#00A3DD"};this.shadowRoot.innerHTML=`
3123
+ `}};f("af-tooltip",On);bi=On});var gl={};s(gl,{default:()=>ei,AfriToast:()=>Wn});var Wn,ei;var vl=m(()=>{u();Wn=class Wn extends h{static get observedAttributes(){return["type","message","duration"]}constructor(){super();this.render()}show(t,n="info",o=4000){if(this.setAttribute("message",t),this.setAttribute("type",n),this.render(),this.shadowRoot.querySelector(".toast").classList.add("show"),o>0)setTimeout(()=>this.hide(),o)}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")||"",o={success:"✓",error:"✗",warning:"⚠",info:"ℹ"},r={success:"#1EB53A",error:"#EF3340",warning:"#FCD116",info:"#00A3DD"};this.shadowRoot.innerHTML=`
2193
3124
  <style>
2194
3125
  :host {
2195
3126
  position: fixed;
@@ -2206,7 +3137,7 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
2206
3137
  padding: 16px 20px;
2207
3138
  background: #121212;
2208
3139
  border: 1px solid #1e1e1e;
2209
- border-left: 4px solid ${o[t]};
3140
+ border-left: 4px solid ${r[t]};
2210
3141
  border-radius: 8px;
2211
3142
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
2212
3143
  transform: translateX(120%);
@@ -2223,8 +3154,8 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
2223
3154
  width: 28px;
2224
3155
  height: 28px;
2225
3156
  border-radius: 50%;
2226
- background: ${o[t]}20;
2227
- color: ${o[t]};
3157
+ background: ${r[t]}20;
3158
+ color: ${r[t]};
2228
3159
  display: flex;
2229
3160
  align-items: center;
2230
3161
  justify-content: center;
@@ -2257,13 +3188,13 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
2257
3188
  </style>
2258
3189
 
2259
3190
  <div class="toast">
2260
- <span class="toast-icon">${b[t]}</span>
3191
+ <span class="toast-icon">${o[t]}</span>
2261
3192
  <div class="toast-content">
2262
3193
  <div class="toast-message">${n}</div>
2263
3194
  </div>
2264
3195
  <button class="toast-close" id="close">×</button>
2265
3196
  </div>
2266
- `,this.shadowRoot.getElementById("close")?.addEventListener("click",()=>this.hide())}};_("af-toast",kn);Fa=kn});var ab={};i(ab,{default:()=>Ra,AfriBadge:()=>Hn});var Hn,Ra;var hb=x(()=>{X();Hn=class Hn 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",b=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,a={sm:{padding:"2px 6px",fontSize:"11px"},md:{padding:"4px 10px",fontSize:"13px"},lg:{padding:"6px 14px",fontSize:"15px"}},h=a[n]||a.md;this.shadowRoot.innerHTML=`
3197
+ `,this.shadowRoot.getElementById("close")?.addEventListener("click",()=>this.hide())}};f("af-toast",Wn);ei=Wn});var pl={};s(pl,{default:()=>ii,AfriBadge:()=>Un});var Un,ii;var ml=m(()=>{u();Un=class Un extends h{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",o=this.hasAttribute("removable"),r={default:{bg:"#e9ecef",text:"#495057"},success:{bg:"#d4edda",text:"#155724"},warning:{bg:"#fff3cd",text:"#856404"},error:{bg:"#f8d7da",text:"#721c24"},info:{bg:"#d1ecf1",text:"#0c5460"},tanzania:{bg:"#1EB53A",text:"#FFFFFF"},maasai:{bg:"#FF0000",text:"#FFFFFF"},ndebele:{bg:"#4169E1",text:"#FFFFFF"},gold:{bg:"#FCD116",text:"#000000"}},a=r[t]||r.default,l={sm:{padding:"2px 6px",fontSize:"11px"},md:{padding:"4px 10px",fontSize:"13px"},lg:{padding:"6px 14px",fontSize:"15px"}},b=l[n]||l.md;this.shadowRoot.innerHTML=`
2267
3198
  <style>
2268
3199
  :host {
2269
3200
  display: inline-block;
@@ -2274,11 +3205,11 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
2274
3205
  display: inline-flex;
2275
3206
  align-items: center;
2276
3207
  gap: 5px;
2277
- padding: ${h.padding};
2278
- font-size: ${h.fontSize};
3208
+ padding: ${b.padding};
3209
+ font-size: ${b.fontSize};
2279
3210
  font-weight: 600;
2280
- background: ${l.bg};
2281
- color: ${l.text};
3211
+ background: ${a.bg};
3212
+ color: ${a.text};
2282
3213
  border-radius: 100px;
2283
3214
  white-space: nowrap;
2284
3215
  }
@@ -2302,9 +3233,9 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
2302
3233
 
2303
3234
  <span class="badge">
2304
3235
  <slot></slot>
2305
- ${b?'<button class="remove-btn" aria-label="Remove">×</button>':""}
3236
+ ${o?'<button class="remove-btn" aria-label="Remove">×</button>':""}
2306
3237
  </span>
2307
- `}};_("af-badge",Hn);Ra=Hn});var fb={};i(fb,{default:()=>Ba,AfriAvatar:()=>Yn});var Yn,Ba;var rb=x(()=>{X();Yn=class Yn 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")||"",b=this.getAttribute("size")||"md",o=this.getAttribute("status"),l=this.getAttribute("theme")||"tanzania",a={tanzania:"#1EB53A",maasai:"#FF0000",ndebele:"#4169E1",gold:"#FCD116"},h=a[l]||a.tanzania,f={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"}},r=f[b]||f.md,A={online:"#28a745",offline:"#6c757d",busy:"#dc3545",away:"#ffc107"};this.shadowRoot.innerHTML=`
3238
+ `}};f("af-badge",Un);ii=Un});var $l={};s($l,{default:()=>hi,AfriAvatar:()=>Vn});var Vn,hi;var wl=m(()=>{u();Vn=class Vn extends h{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")||"",o=this.getAttribute("size")||"md",r=this.getAttribute("status"),a=this.getAttribute("theme")||"tanzania",l={tanzania:"#1EB53A",maasai:"#FF0000",ndebele:"#4169E1",gold:"#FCD116"},b=l[a]||l.tanzania,e={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"}},i=e[o]||e.md,$={online:"#28a745",offline:"#6c757d",busy:"#dc3545",away:"#ffc107"};this.shadowRoot.innerHTML=`
2308
3239
  <style>
2309
3240
  :host {
2310
3241
  display: inline-block;
@@ -2313,16 +3244,16 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
2313
3244
 
2314
3245
  .avatar {
2315
3246
  position: relative;
2316
- width: ${r.size};
2317
- height: ${r.size};
3247
+ width: ${i.size};
3248
+ height: ${i.size};
2318
3249
  border-radius: 50%;
2319
3250
  display: flex;
2320
3251
  align-items: center;
2321
3252
  justify-content: center;
2322
- background: ${h};
3253
+ background: ${b};
2323
3254
  color: white;
2324
3255
  font-weight: 600;
2325
- font-size: ${r.font};
3256
+ font-size: ${i.font};
2326
3257
  overflow: hidden;
2327
3258
  }
2328
3259
 
@@ -2336,19 +3267,19 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
2336
3267
  position: absolute;
2337
3268
  bottom: 0;
2338
3269
  right: 0;
2339
- width: ${r.status};
2340
- height: ${r.status};
3270
+ width: ${i.status};
3271
+ height: ${i.status};
2341
3272
  border-radius: 50%;
2342
3273
  border: 2px solid white;
2343
- background: ${o?A[o]||A.offline:"transparent"};
3274
+ background: ${r?$[r]||$.offline:"transparent"};
2344
3275
  }
2345
3276
  </style>
2346
3277
 
2347
3278
  <div class="avatar" title="${n}">
2348
3279
  ${t?`<img src="${t}" alt="${n}" />`:this._getInitials(n)}
2349
- ${o?'<span class="status"></span>':""}
3280
+ ${r?'<span class="status"></span>':""}
2350
3281
  </div>
2351
- `}};_("af-avatar",Yn);Ba=Yn});var gb={};i(gb,{default:()=>Da,AfriProgress:()=>Xn});var Xn,Da;var $b=x(()=>{X();Xn=class Xn 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,b=this.getAttribute("theme")||"tanzania",o=this.getAttribute("size")||"md",l=this.getAttribute("label"),a=this.hasAttribute("animated"),h=Math.min(100,Math.max(0,t/n*100)),f={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"}},r=f[b]||f.tanzania,A={sm:"6px",md:"10px",lg:"16px"},L=A[o]||A.md;this.shadowRoot.innerHTML=`
3282
+ `}};f("af-avatar",Vn);hi=Vn});var ul={};s(ul,{default:()=>fi,AfriProgress:()=>Nn});var Nn,fi;var sl=m(()=>{u();Nn=class Nn extends h{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,o=this.getAttribute("theme")||"tanzania",r=this.getAttribute("size")||"md",a=this.getAttribute("label"),l=this.hasAttribute("animated"),b=Math.min(100,Math.max(0,t/n*100)),e={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"}},i=e[o]||e.tanzania,$={sm:"6px",md:"10px",lg:"16px"},q=$[r]||$.md;this.shadowRoot.innerHTML=`
2352
3283
  <style>
2353
3284
  :host {
2354
3285
  display: block;
@@ -2377,19 +3308,19 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
2377
3308
 
2378
3309
  .progress-track {
2379
3310
  width: 100%;
2380
- height: ${L};
2381
- background: ${r.track};
3311
+ height: ${q};
3312
+ background: ${i.track};
2382
3313
  border-radius: 100px;
2383
3314
  overflow: hidden;
2384
3315
  }
2385
3316
 
2386
3317
  .progress-bar {
2387
3318
  height: 100%;
2388
- width: ${h}%;
2389
- background: ${r.bar};
3319
+ width: ${b}%;
3320
+ background: ${i.bar};
2390
3321
  border-radius: 100px;
2391
3322
  transition: width 500ms ease-out;
2392
- ${a?`
3323
+ ${l?`
2393
3324
  background-size: 30px 30px;
2394
3325
  background-image: linear-gradient(
2395
3326
  135deg,
@@ -2414,8 +3345,8 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
2414
3345
  <div class="progress-container">
2415
3346
  ${`
2416
3347
  <div class="progress-header">
2417
- <span class="progress-label">${l||""}</span>
2418
- <span class="progress-value">${h.toFixed(0)}%</span>
3348
+ <span class="progress-label">${a||""}</span>
3349
+ <span class="progress-value">${b.toFixed(0)}%</span>
2419
3350
  </div>
2420
3351
  `}
2421
3352
  <div class="progress-track">
@@ -2425,7 +3356,7 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
2425
3356
  aria-valuemax="${n}"></div>
2426
3357
  </div>
2427
3358
  </div>
2428
- `}};_("af-progress",Xn);Da=Xn});var cb={};i(cb,{default:()=>Ea,AfriLoader:()=>Ln});var Ln,Ea;var vb=x(()=>{X();Ln=class Ln 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",b=this.getAttribute("type")||"spiral",o={spiral:`M25,25 m0,-20 a20,20 0 1,1 0,40 a20,20 0 1,1 0,-40
3359
+ `}};f("af-progress",Nn);fi=Nn});var xl={};s(xl,{default:()=>ci,AfriLoader:()=>Kn});var Kn,ci;var Al=m(()=>{u();Kn=class Kn extends h{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",o=this.getAttribute("type")||"spiral",r={spiral:`M25,25 m0,-20 a20,20 0 1,1 0,40 a20,20 0 1,1 0,-40
2429
3360
  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=`
2430
3361
  <style>
2431
3362
  :host {
@@ -2453,10 +3384,10 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
2453
3384
  </style>
2454
3385
  <div class="loader">
2455
3386
  <svg viewBox="0 0 50 50">
2456
- ${b==="spiral"?`<path d="${o.spiral}" fill="none" stroke="currentColor" stroke-width="4" stroke-linecap="round" />`:b==="sun"?`<path d="${o.sun}" stroke="currentColor" stroke-width="4" stroke-linecap="round" />`:`<path d="${o.diamond}" fill="none" stroke="currentColor" stroke-width="4" />`}
3387
+ ${o==="spiral"?`<path d="${r.spiral}" fill="none" stroke="currentColor" stroke-width="4" stroke-linecap="round" />`:o==="sun"?`<path d="${r.sun}" stroke="currentColor" stroke-width="4" stroke-linecap="round" />`:`<path d="${r.diamond}" fill="none" stroke="currentColor" stroke-width="4" />`}
2457
3388
  </svg>
2458
3389
  </div>
2459
- `}};_("af-loader",Ln);Ea=Ln});var wb={};i(wb,{default:()=>Oa,AfriSkeleton:()=>Mn});var Mn,Oa;var _b=x(()=>{X();Mn=class Mn 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%",b=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"}},a=l[t]||l.text;this.shadowRoot.innerHTML=`
3390
+ `}};f("af-loader",Kn);ci=Kn});var _l={};s(_l,{default:()=>di,AfriSkeleton:()=>jn});var jn,di;var kl=m(()=>{u();jn=class jn extends h{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%",o=this.getAttribute("height")||"auto",r=parseInt(this.getAttribute("lines"))||1,a={text:{height:"16px",borderRadius:"4px"},title:{height:"28px",borderRadius:"4px"},avatar:{width:"48px",height:"48px",borderRadius:"50%"},card:{height:"200px",borderRadius:"12px"},button:{height:"40px",borderRadius:"6px",width:"120px"}},l=a[t]||a.text;this.shadowRoot.innerHTML=`
2460
3391
  <style>
2461
3392
  :host {
2462
3393
  display: block;
@@ -2471,7 +3402,7 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
2471
3402
  );
2472
3403
  background-size: 200% 100%;
2473
3404
  animation: shimmer 1.5s infinite;
2474
- border-radius: ${a.borderRadius};
3405
+ border-radius: ${l.borderRadius};
2475
3406
  }
2476
3407
 
2477
3408
  @keyframes shimmer {
@@ -2480,8 +3411,8 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
2480
3411
  }
2481
3412
 
2482
3413
  .skeleton-line {
2483
- width: ${t==="text"?n:a.width||n};
2484
- height: ${a.height};
3414
+ width: ${t==="text"?n:l.width||n};
3415
+ height: ${l.height};
2485
3416
  margin-bottom: 8px;
2486
3417
  }
2487
3418
 
@@ -2491,33 +3422,33 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
2491
3422
  }
2492
3423
  </style>
2493
3424
 
2494
- ${t==="text"||t==="title"?Array(o).fill(0).map(()=>'<div class="skeleton skeleton-line"></div>').join(""):`<div class="skeleton" style="width: ${a.width||n}; height: ${a.height||b};"></div>`}
2495
- `}};_("af-skeleton",Mn);Oa=Mn});var Ab={};i(Ab,{default:()=>Wa,AfriDivider:()=>Qn});var Qn,Wa;var db=x(()=>{X();Qn=class Qn extends c{static get observedAttributes(){return["pattern","height","color","flip"]}constructor(){super();this.render()}attributeChangedCallback(){this.render()}_getPatternPath(t,n,b){switch(t||"zigzag"){case"zigzag":return`M0,${b} L${n/4},0 L${n/2},${b} L${n*0.75},0 L${n},${b} V${b+10} H0 Z`;case"waves":return`M0,${b/2} Q${n/4},0 ${n/2},${b/2} T${n},${b/2} V${b} H0 Z`;case"triangles":return`M0,${b} L${n/8},0 L${n/4},${b} L${n*0.375},0 L${n/2},${b}
2496
- L${n*0.625},0 L${n*0.75},${b} L${n*0.875},0 L${n},${b} V${b+10} H0 Z`;case"diamonds":return`M0,0 H${n} V${b/2}
2497
- L${n*0.9},${b} L${n*0.8},${b/2}
2498
- L${n*0.7},${b} L${n*0.6},${b/2}
2499
- L${n*0.5},${b} L${n*0.4},${b/2}
2500
- L${n*0.3},${b} L${n*0.2},${b/2}
2501
- L${n*0.1},${b} L0,${b/2} Z`;default:return`M0,0 H${n} V${b} H0 Z`}}render(){let t=this.getAttribute("pattern")||"zigzag",n=this.getAttribute("height")||"50",b=this.getAttribute("color")||"currentColor",o=this.hasAttribute("flip");this.shadowRoot.innerHTML=`
3425
+ ${t==="text"||t==="title"?Array(r).fill(0).map(()=>'<div class="skeleton skeleton-line"></div>').join(""):`<div class="skeleton" style="width: ${l.width||n}; height: ${l.height||o};"></div>`}
3426
+ `}};f("af-skeleton",jn);di=jn});var ql={};s(ql,{default:()=>gi,AfriDivider:()=>yn});var yn,gi;var Hl=m(()=>{u();yn=class yn extends h{static get observedAttributes(){return["pattern","height","color","flip"]}constructor(){super();this.render()}attributeChangedCallback(){this.render()}_getPatternPath(t,n,o){switch(t||"zigzag"){case"zigzag":return`M0,${o} L${n/4},0 L${n/2},${o} L${n*0.75},0 L${n},${o} V${o+10} H0 Z`;case"waves":return`M0,${o/2} Q${n/4},0 ${n/2},${o/2} T${n},${o/2} V${o} H0 Z`;case"triangles":return`M0,${o} L${n/8},0 L${n/4},${o} L${n*0.375},0 L${n/2},${o}
3427
+ L${n*0.625},0 L${n*0.75},${o} L${n*0.875},0 L${n},${o} V${o+10} H0 Z`;case"diamonds":return`M0,0 H${n} V${o/2}
3428
+ L${n*0.9},${o} L${n*0.8},${o/2}
3429
+ L${n*0.7},${o} L${n*0.6},${o/2}
3430
+ L${n*0.5},${o} L${n*0.4},${o/2}
3431
+ L${n*0.3},${o} L${n*0.2},${o/2}
3432
+ L${n*0.1},${o} L0,${o/2} Z`;default:return`M0,0 H${n} V${o} H0 Z`}}render(){let t=this.getAttribute("pattern")||"zigzag",n=this.getAttribute("height")||"50",o=this.getAttribute("color")||"currentColor",r=this.hasAttribute("flip");this.shadowRoot.innerHTML=`
2502
3433
  <style>
2503
3434
  :host {
2504
3435
  display: block;
2505
3436
  line-height: 0;
2506
3437
  width: 100%;
2507
3438
  overflow: hidden;
2508
- color: ${b};
3439
+ color: ${o};
2509
3440
  }
2510
3441
  svg {
2511
3442
  display: block;
2512
3443
  width: 100%;
2513
3444
  height: ${n}px;
2514
- ${o?"transform: rotate(180deg);":""}
3445
+ ${r?"transform: rotate(180deg);":""}
2515
3446
  }
2516
3447
  </style>
2517
3448
  <svg viewBox="0 0 100 ${n}" preserveAspectRatio="none">
2518
3449
  <path d="${this._getPatternPath(t,100,parseInt(n))}" fill="currentColor" />
2519
3450
  </svg>
2520
- `}};_("af-divider",Qn);Wa=Qn});var xb={};i(xb,{default:()=>ma,KangaCard:()=>Jn});var Jn,ma;var qb=x(()=>{X();Gt();Jn=class Jn extends c{static get observedAttributes(){return["theme","proverb","proverb-translation"]}constructor(){super();this.render()}connectedCallback(){this.loadStyles(),this.applyTheme()}attributeChangedCallback(t,n,b){if(n!==b)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 b=generateKangaBorder({primaryColor:t.primary,accentColor:t.accent});n.style.backgroundImage=`url("${b}")`,n.style.backgroundRepeat="repeat"}}render(){let t=this.getAttribute("proverb")||"",n=this.getAttribute("proverb-translation")||"",b=this.getThemeColors();this.shadowRoot.innerHTML=`
3451
+ `}};f("af-divider",yn);gi=yn});var Ll={};s(Ll,{default:()=>vi,KangaCard:()=>Cn});var Cn,vi;var Ml=m(()=>{u();Mt();Cn=class Cn extends h{static get observedAttributes(){return["theme","proverb","proverb-translation"]}constructor(){super();this.render()}connectedCallback(){this.loadStyles(),this.applyTheme()}attributeChangedCallback(t,n,o){if(n!==o)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 o=generateKangaBorder({primaryColor:t.primary,accentColor:t.accent});n.style.backgroundImage=`url("${o}")`,n.style.backgroundRepeat="repeat"}}render(){let t=this.getAttribute("proverb")||"",n=this.getAttribute("proverb-translation")||"",o=this.getThemeColors();this.shadowRoot.innerHTML=`
2521
3452
  <style>
2522
3453
  :host {
2523
3454
  display: block;
@@ -2540,7 +3471,7 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
2540
3471
  /* Pindo - Decorative Border */
2541
3472
  .pindo {
2542
3473
  padding: var(--space-13, 13px);
2543
- background-color: ${b.primary};
3474
+ background-color: ${o.primary};
2544
3475
  }
2545
3476
 
2546
3477
  /* Mji - Central Content Area */
@@ -2552,8 +3483,8 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
2552
3483
 
2553
3484
  /* Jina - Proverb Inscription */
2554
3485
  .jina {
2555
- background-color: ${b.border};
2556
- color: ${b.text};
3486
+ background-color: ${o.border};
3487
+ color: ${o.text};
2557
3488
  padding: var(--space-8, 8px) var(--space-13, 13px);
2558
3489
  text-align: center;
2559
3490
  font-style: italic;
@@ -2580,7 +3511,7 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
2580
3511
  }
2581
3512
 
2582
3513
  ::slotted(h1), ::slotted(h2), ::slotted(h3) {
2583
- color: ${b.primary};
3514
+ color: ${o.primary};
2584
3515
  margin-bottom: var(--space-8, 8px);
2585
3516
  }
2586
3517
  </style>
@@ -2599,7 +3530,7 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
2599
3530
  </div>
2600
3531
  `:'<div class="jina"><slot name="proverb"></slot></div>'}
2601
3532
  </article>
2602
- `,this.applyTheme()}};_("af-kanga-card",Jn);ma=Jn});var kb={};i(kb,{default:()=>pa,CulturalCard:()=>Gn});var Gn,pa;var Hb=x(()=>{X();Gt();Gn=class Gn 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"),b=this._cultures[t]||this._cultures.maasai,o=Jt[b.pattern],l=o?o():"";this.shadowRoot.innerHTML=`
3533
+ `,this.applyTheme()}};f("af-kanga-card",Cn);vi=Cn});var Yl={};s(Yl,{default:()=>pi,CulturalCard:()=>In});var In,pi;var Sl=m(()=>{u();Mt();In=class In extends h{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"),o=this._cultures[t]||this._cultures.maasai,r=Lt[o.pattern],a=r?r():"";this.shadowRoot.innerHTML=`
2603
3534
  <style>
2604
3535
  :host {
2605
3536
  display: block;
@@ -2620,7 +3551,7 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
2620
3551
 
2621
3552
  .pattern-header {
2622
3553
  height: 120px;
2623
- background-image: url("${l}");
3554
+ background-image: url("${a}");
2624
3555
  background-repeat: repeat;
2625
3556
  position: relative;
2626
3557
  animation: patternShift 20s linear infinite;
@@ -2641,7 +3572,7 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
2641
3572
  position: absolute;
2642
3573
  bottom: 10px;
2643
3574
  left: 10px;
2644
- background: ${b.colors.primary};
3575
+ background: ${o.colors.primary};
2645
3576
  color: white;
2646
3577
  padding: 4px 12px;
2647
3578
  border-radius: 20px;
@@ -2676,16 +3607,16 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
2676
3607
  .card-title h3 {
2677
3608
  margin: 0;
2678
3609
  font-size: 18px;
2679
- color: ${b.colors.primary};
3610
+ color: ${o.colors.primary};
2680
3611
  }
2681
3612
 
2682
3613
  .culture-icon {
2683
3614
  width: 40px;
2684
3615
  height: 40px;
2685
3616
  border-radius: 50%;
2686
- background-image: url("${l}");
3617
+ background-image: url("${a}");
2687
3618
  background-size: cover;
2688
- border: 2px solid ${b.colors.accent};
3619
+ border: 2px solid ${o.colors.accent};
2689
3620
  }
2690
3621
 
2691
3622
  .card-content {
@@ -2697,7 +3628,7 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
2697
3628
  width: 100%;
2698
3629
  padding: 10px;
2699
3630
  margin-top: 15px;
2700
- border: 2px solid ${b.colors.primary};
3631
+ border: 2px solid ${o.colors.primary};
2701
3632
  border-radius: 6px;
2702
3633
  font-family: inherit;
2703
3634
  font-size: 14px;
@@ -2707,7 +3638,7 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
2707
3638
 
2708
3639
  .culture-selector:focus {
2709
3640
  outline: none;
2710
- box-shadow: 0 0 0 3px ${b.colors.primary}30;
3641
+ box-shadow: 0 0 0 3px ${o.colors.primary}30;
2711
3642
  }
2712
3643
 
2713
3644
  select option {
@@ -2723,13 +3654,13 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
2723
3654
  <article class="cultural-card">
2724
3655
  <div class="pattern-header">
2725
3656
  <div class="pattern-overlay"></div>
2726
- <span class="culture-badge">${b.name}</span>
2727
- <span class="region-badge">\uD83D\uDCCD ${b.region}</span>
3657
+ <span class="culture-badge">${o.name}</span>
3658
+ <span class="region-badge">\uD83D\uDCCD ${o.region}</span>
2728
3659
  </div>
2729
3660
  <div class="card-body">
2730
3661
  <div class="card-title">
2731
3662
  <div class="culture-icon"></div>
2732
- <h3>${b.name} Pattern</h3>
3663
+ <h3>${o.name} Pattern</h3>
2733
3664
  </div>
2734
3665
  <div class="card-content">
2735
3666
  <slot></slot>
@@ -2764,7 +3695,7 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
2764
3695
  `:""}
2765
3696
  </div>
2766
3697
  </article>
2767
- `}};_("af-cultural-card",Gn);pa=Gn});var Yb={};i(Yb,{default:()=>ua,PatternShowcase:()=>Sn});var Sn,ua;var Xb=x(()=>{X();Gt();Sn=class Sn extends c{static get observedAttributes(){return["region","size"]}constructor(){super();this._allPatterns=[{key:"shuka",name:"Maasai Shuka",region:"east",country:"Tanzania/Kenya",fn:pn,meaning:"Bravery, Unity, Identity"},{key:"hadzabe",name:"Hadzabe",region:"east",country:"Tanzania",fn:un,meaning:"Ancient traditions, Hunter-gatherer heritage"},{key:"kanga",name:"Kanga",region:"east",country:"Tanzania/Kenya",fn:Un,meaning:"Communication, Proverbs, Femininity"},{key:"kitenge",name:"Kitenge",region:"east",country:"East Africa",fn:Vn,meaning:"Celebration, African identity"},{key:"tibeb",name:"Tibeb",region:"east",country:"Ethiopia",fn:yn,meaning:"Faith, Tradition, Celebration"},{key:"kente",name:"Kente",region:"west",country:"Ghana",fn:Nn,meaning:"Royalty, Wisdom, Celebration"},{key:"adinkra",name:"Adinkra",region:"west",country:"Ghana",fn:Kn,meaning:"Philosophy, Proverbs, Wisdom"},{key:"bogolan",name:"Bogolan",region:"west",country:"Mali",fn:Pn,meaning:"Earth energy, Protection, Healing"},{key:"asooke",name:"Aso-Oke",region:"west",country:"Nigeria",fn:jn,meaning:"Prestige, Celebration, Heritage"},{key:"adire",name:"Adire (Indigo)",region:"west",country:"Nigeria",fn:no,meaning:"Creativity, Uniqueness, Depth"},{key:"ankara",name:"Ankara",region:"west",country:"West Africa",fn:In,meaning:"Boldness, Pan-African pride"},{key:"kuba",name:"Kuba Shoowa",region:"central",country:"DRC",fn:Tn,meaning:"Status, Mathematics, Eternity"},{key:"imigongo",name:"Imigongo",region:"central",country:"Rwanda",fn:Cn,meaning:"Resilience, Strength, Artistry"},{key:"berber",name:"Berber",region:"north",country:"North Africa",fn:to,meaning:"Protection, Nature, Identity"},{key:"ndebele",name:"Ndebele",region:"south",country:"South Africa",fn:en,meaning:"Artistry, Marriage, Status"},{key:"zulu",name:"Zulu Beadwork",region:"south",country:"South Africa",fn:Zn,meaning:"Love letters, Community"},{key:"swazi",name:"Swazi",region:"south",country:"Eswatini",fn:sn,meaning:"Monarchy, Warriors, Pride"},{key:"xhosa",name:"Xhosa",region:"south",country:"South Africa",fn:zn,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,b=this._allPatterns.find((o)=>o.key===n);if(b)this.emit("af-pattern-select",{pattern:b})})})}attributeChangedCallback(){this.render(),this._setupHovers()}render(){let t=this.getAttribute("region")||"all",n=this.getAttribute("size")||"md",b=t==="all"?this._allPatterns:this._allPatterns.filter((a)=>a.region===t),o={sm:80,md:120,lg:160},l=o[n]||o.md;this.shadowRoot.innerHTML=`
3698
+ `}};f("af-cultural-card",In);pi=In});var Rl={};s(Rl,{default:()=>mi,PatternShowcase:()=>Pn});var Pn,mi;var Xl=m(()=>{u();Mt();Pn=class Pn extends h{static get observedAttributes(){return["region","size"]}constructor(){super();this._allPatterns=[{key:"shuka",name:"Maasai Shuka",region:"east",country:"Tanzania/Kenya",fn:lo,meaning:"Bravery, Unity, Identity"},{key:"hadzabe",name:"Hadzabe",region:"east",country:"Tanzania",fn:bo,meaning:"Ancient traditions, Hunter-gatherer heritage"},{key:"kanga",name:"Kanga",region:"east",country:"Tanzania/Kenya",fn:eo,meaning:"Communication, Proverbs, Femininity"},{key:"kitenge",name:"Kitenge",region:"east",country:"East Africa",fn:io,meaning:"Celebration, African identity"},{key:"tibeb",name:"Tibeb",region:"east",country:"Ethiopia",fn:$o,meaning:"Faith, Tradition, Celebration"},{key:"kente",name:"Kente",region:"west",country:"Ghana",fn:ho,meaning:"Royalty, Wisdom, Celebration"},{key:"adinkra",name:"Adinkra",region:"west",country:"Ghana",fn:fo,meaning:"Philosophy, Proverbs, Wisdom"},{key:"bogolan",name:"Bogolan",region:"west",country:"Mali",fn:vo,meaning:"Earth energy, Protection, Healing"},{key:"asooke",name:"Aso-Oke",region:"west",country:"Nigeria",fn:co,meaning:"Prestige, Celebration, Heritage"},{key:"adire",name:"Adire (Indigo)",region:"west",country:"Nigeria",fn:_o,meaning:"Creativity, Uniqueness, Depth"},{key:"ankara",name:"Ankara",region:"west",country:"West Africa",fn:go,meaning:"Boldness, Pan-African pride"},{key:"kuba",name:"Kuba Shoowa",region:"central",country:"DRC",fn:po,meaning:"Status, Mathematics, Eternity"},{key:"imigongo",name:"Imigongo",region:"central",country:"Rwanda",fn:mo,meaning:"Resilience, Strength, Artistry"},{key:"berber",name:"Berber",region:"north",country:"North Africa",fn:Ao,meaning:"Protection, Nature, Identity"},{key:"ndebele",name:"Ndebele",region:"south",country:"South Africa",fn:wo,meaning:"Artistry, Marriage, Status"},{key:"zulu",name:"Zulu Beadwork",region:"south",country:"South Africa",fn:uo,meaning:"Love letters, Community"},{key:"swazi",name:"Swazi",region:"south",country:"Eswatini",fn:so,meaning:"Monarchy, Warriors, Pride"},{key:"xhosa",name:"Xhosa",region:"south",country:"South Africa",fn:xo,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,o=this._allPatterns.find((r)=>r.key===n);if(o)this.emit("af-pattern-select",{pattern:o})})})}attributeChangedCallback(){this.render(),this._setupHovers()}render(){let t=this.getAttribute("region")||"all",n=this.getAttribute("size")||"md",o=t==="all"?this._allPatterns:this._allPatterns.filter((l)=>l.region===t),r={sm:80,md:120,lg:160},a=r[n]||r.md;this.shadowRoot.innerHTML=`
2768
3699
  <style>
2769
3700
  :host {
2770
3701
  display: block;
@@ -2806,7 +3737,7 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
2806
3737
 
2807
3738
  .pattern-grid {
2808
3739
  display: grid;
2809
- grid-template-columns: repeat(auto-fill, minmax(${l+40}px, 1fr));
3740
+ grid-template-columns: repeat(auto-fill, minmax(${a+40}px, 1fr));
2810
3741
  gap: 16px;
2811
3742
  }
2812
3743
 
@@ -2826,7 +3757,7 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
2826
3757
 
2827
3758
  .pattern-preview {
2828
3759
  inline-size: 100%;
2829
- block-size: ${l}px;
3760
+ block-size: ${a}px;
2830
3761
  background-repeat: repeat;
2831
3762
  transition: background-position 10s linear;
2832
3763
  }
@@ -2884,20 +3815,20 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
2884
3815
  </div>
2885
3816
 
2886
3817
  <div class="pattern-grid">
2887
- ${b.map((a)=>`
2888
- <div class="pattern-item" data-key="${a.key}">
2889
- <div class="pattern-preview" style="background-image: url('${a.fn()}')"></div>
3818
+ ${o.map((l)=>`
3819
+ <div class="pattern-item" data-key="${l.key}">
3820
+ <div class="pattern-preview" style="background-image: url('${l.fn()}')"></div>
2890
3821
  <div class="pattern-info">
2891
- <span class="region-label region-${a.region}">${a.region.charAt(0).toUpperCase()+a.region.slice(1)}</span>
2892
- <div class="pattern-name">${a.name}</div>
2893
- <div class="pattern-country">${a.country}</div>
2894
- <div class="pattern-meaning">${a.meaning}</div>
3822
+ <span class="region-label region-${l.region}">${l.region.charAt(0).toUpperCase()+l.region.slice(1)}</span>
3823
+ <div class="pattern-name">${l.name}</div>
3824
+ <div class="pattern-country">${l.country}</div>
3825
+ <div class="pattern-meaning">${l.meaning}</div>
2895
3826
  </div>
2896
3827
  </div>
2897
3828
  `).join("")}
2898
3829
  </div>
2899
3830
  </div>
2900
- `,this.shadowRoot.querySelectorAll(".region-tab").forEach((a)=>{a.addEventListener("click",()=>{this.setAttribute("region",a.dataset.region)})})}};_("af-pattern-showcase",Sn);ua=Sn});var ib={};i(ib,{AfriLanguageSwitcher:()=>Fo});var Fo;var Lb=x(()=>{X();Fo=class Fo 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",b=t.find((o)=>o.code===n)||t[0];this.shadowRoot.innerHTML=Q`
3831
+ `,this.shadowRoot.querySelectorAll(".region-tab").forEach((l)=>{l.addEventListener("click",()=>{this.setAttribute("region",l.dataset.region)})})}};f("af-pattern-showcase",Pn);mi=Pn});var Ql={};s(Ql,{AfriLanguageSwitcher:()=>ur});var ur;var Jl=m(()=>{u();ur=class ur extends h{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",o=t.find((r)=>r.code===n)||t[0];this.shadowRoot.innerHTML=d`
2901
3832
  <style>
2902
3833
  :host { display: inline-block; position: relative; font-family: var(--font-body); }
2903
3834
  .switcher-btn {
@@ -2938,17 +3869,17 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
2938
3869
 
2939
3870
  <button class="switcher-btn">
2940
3871
  <span>🌍</span>
2941
- <span>${b.name}</span>
3872
+ <span>${o.name}</span>
2942
3873
  </button>
2943
3874
 
2944
3875
  <div class="dropdown">
2945
- ${t.map((o)=>Q`
2946
- <div class="lang-option" data-code="${o.code}" dir="${o.dir||"ltr"}">
2947
- ${o.name}
3876
+ ${t.map((r)=>d`
3877
+ <div class="lang-option" data-code="${r.code}" dir="${r.dir||"ltr"}">
3878
+ ${r.name}
2948
3879
  </div>
2949
3880
  `)}
2950
3881
  </div>
2951
- `,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()}};_("af-language-switcher",Fo)});var Mb={};i(Mb,{AfriAuth:()=>Ro});var Ro;var Qb=x(()=>{X();Ro=class Ro 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",(b)=>{b.preventDefault(),this.mode=this.mode==="login"?"register":"login",this.render(),this.setupEvents()});if(t)t.addEventListener("submit",async(b)=>{b.preventDefault();let o=this.shadowRoot.querySelector("#email").value,l=this.shadowRoot.querySelector("#password").value,a=this.shadowRoot.querySelector(".feedback");a.textContent="Processing...";try{let f=await(await fetch("/api/auth",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:this.mode,email:o,password:l})})).json();if(f.error)a.textContent=f.error,a.style.color="#ef4444";else a.textContent="Success! Redirecting...",a.style.color="#22c55e",setTimeout(()=>window.location.href="/",1000)}catch(h){a.textContent="Network Error"}})}render(){let t=this.mode==="login";this.shadowRoot.innerHTML=`
3882
+ `,this.shadowRoot.querySelector(".switcher-btn").onclick=()=>{this.toggleAttribute("open")},this.shadowRoot.querySelectorAll(".lang-option").forEach((r)=>{r.onclick=()=>{let a=r.dataset.code;if(this.setAttribute("current",a),this.removeAttribute("open"),this.emit("lang-change",{code:a}),a==="ar")document.documentElement.dir="rtl";else document.documentElement.dir="ltr"}})}connectedCallback(){this.render()}attributeChangedCallback(){this.render()}};f("af-language-switcher",ur)});var Gl={};s(Gl,{AfriAuth:()=>sr});var sr;var Fl=m(()=>{u();sr=class sr extends h{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",(o)=>{o.preventDefault(),this.mode=this.mode==="login"?"register":"login",this.render(),this.setupEvents()});if(t)t.addEventListener("submit",async(o)=>{o.preventDefault();let r=this.shadowRoot.querySelector("#email").value,a=this.shadowRoot.querySelector("#password").value,l=this.shadowRoot.querySelector(".feedback");l.textContent="Processing...";try{let e=await(await fetch("/api/auth",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:this.mode,email:r,password:a})})).json();if(e.error)l.textContent=e.error,l.style.color="#ef4444";else l.textContent="Success! Redirecting...",l.style.color="#22c55e",setTimeout(()=>window.location.href="/",1000)}catch(b){l.textContent="Network Error"}})}render(){let t=this.mode==="login";this.shadowRoot.innerHTML=`
2952
3883
  <style>
2953
3884
  :host {
2954
3885
  display: block;
@@ -3046,7 +3977,7 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
3046
3977
  <span class="toggle-mode">${t?"Create an account":"Sign in"}</span>
3047
3978
  </div>
3048
3979
  </div>
3049
- `}};_("af-auth",Ro)});var Jb={};i(Jb,{default:()=>Ua});var Bo,Ua;var Gb=x(()=>{X();Bo=class Bo 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=Q`
3980
+ `}};f("af-auth",sr)});var Bl={};s(Bl,{default:()=>$i});var xr,$i;var El=m(()=>{u();xr=class xr extends h{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=d`
3050
3981
  <style>
3051
3982
  .toggle-btn {
3052
3983
  background: var(--bg-surface-elevated, var(--afri-obsidian));
@@ -3075,13 +4006,13 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
3075
4006
  <span class="icon">\${isDark ? '🌙' : '☀️'}</span>
3076
4007
  <span>\${isDark ? 'Dark Mode' : 'Light Mode'}</span>
3077
4008
  </button>
3078
- `;let n=this.shadowRoot.querySelector(".toggle-btn");if(n)n.addEventListener("click",()=>this.toggleTheme())}};_("af-theme-toggle",Bo);Ua=Bo});bt();Qt();Gt();var oo={};i(oo,{transitionPage:()=>mo,default:()=>Pb,animateStaggered:()=>Wo,Easing:()=>Pt});var Pt={DrumBeat:"cubic-bezier(0.1, 0.9, 0.2, 1.0)",KoraPluck:"cubic-bezier(0.34, 1.56, 0.64, 1)",RiverFlow:"cubic-bezier(0.4, 0.0, 0.2, 1)"};function Wo(t,{delay:n=50,duration:b=600,easing:o=Pt.DrumBeat,y:l=20,scale:a=0.95}={}){let h=typeof t==="string"?document.querySelectorAll(t):t;if(!h||h.length===0)return;let f=new IntersectionObserver((r)=>{r.forEach((A,L)=>{if(A.isIntersecting){let S=Math.random()*10,G=L*n+S,B=A.target;B.animate([{opacity:0,transform:`translateY(${l}px) scale(${a})`},{opacity:1,transform:"translateY(0) scale(1)"}],{duration:b,delay:G,easing:o,fill:"forwards"}),f.unobserve(B),B.style.opacity="1"}})},{threshold:0.1});h.forEach((r)=>{r.style.opacity="0",f.observe(r)})}function mo(t){document.body.animate([{opacity:1,transform:"scale(1)"},{opacity:0,transform:"scale(0.98)"}],{duration:200,easing:"ease-in"}).onfinish=()=>{t(),document.body.animate([{opacity:0,transform:"scale(1.02)"},{opacity:1,transform:"scale(1)"}],{duration:400,easing:Pt.DrumBeat})}}var Pb={Easing:Pt,animateStaggered:Wo,transitionPage:mo};function po(t){if(typeof window>"u")return;if(!("IntersectionObserver"in window)){Object.values(t).forEach((b)=>b());return}let n=new IntersectionObserver((b)=>{b.forEach((o)=>{if(o.isIntersecting){let l=o.target.tagName.toLowerCase(),a=t[l];if(a)console.log(`\uD83C\uDFDD️ Hydrating Island: <${l}>`),a().then(()=>{delete t[l]}).catch((h)=>console.error(`Failed to hydrate <${l}>`,h));n.unobserve(o.target)}})},{rootMargin:"50px 0px"});Object.keys(t).forEach((b)=>{document.querySelectorAll(b).forEach((o)=>n.observe(o))})}nn();vo();var g0="afri_session",ha=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function wo(t=""){return t.split(";").map((n)=>n.trim()).filter(Boolean).reduce((n,b)=>{let o=b.indexOf("=");if(o===-1)return n;let l=b.slice(0,o).trim(),a=b.slice(o+1).trim();return n[l]=a,n},{})}function _o(){return crypto.randomUUID()}function $0(t){let n=t?.headers?.get?.("cookie")||"",o=wo(n).afri_session;if(o&&ha.test(o))return o;return _o()}class c0{constructor(){this.sessions=new Map}ensure(t){if(!this.sessions.has(t))this.sessions.set(t,{data:{counter:{value:0}},meta:{createdAt:new Date,lastSeenAt:new Date}});return this.sessions.get(t)}touch(t){let n=this.ensure(t);return n.meta.lastSeenAt=new Date,n}has(t){return this.sessions.has(t)}get(t){return this.touch(t).data}set(t,n,b){let o=this.get(t),l=n.split("/"),a=o;while(l.length>1){let h=l.shift();if(!a[h]||typeof a[h]!=="object")a[h]={};a=a[h]}return a[l[0]]=b,b}delete(t){return this.sessions.delete(t)}clear(){this.sessions.clear()}}var I=new c0;var v0={incrementCounter(t){let o=(I.get(t).counter?.value||0)+1;return I.set(t,"counter/value",o),o},resetCounter(t){return I.set(t,"counter/value",0),0},getCounter(t){return I.get(t).counter?.value||0}};class Ao{constructor(){this.middlewares=[]}use(t){if(typeof t!=="function")throw Error("Middleware must be a function");return this.middlewares.push(t),this}async run(t){for(let n of this.middlewares){let b=await n(t);if(b instanceof Response)return b;if(b?.response)return b.response;if(b?.context)Object.assign(t,b.context)}return null}}function w0(){return async(t)=>{return co("log",`[AfriCode] ${t.req.method} ${t.pathname}`),{}}}function _0(t={}){return async(n)=>{let{protectedPaths:b=[],authorize:o=()=>!1,unauthorizedResponse:l=()=>new Response("Unauthorized",{status:401})}=t;if(b.some((h)=>n.pathname.startsWith(h))){if(!await o(n))return{response:l(n)}}return{}}}class nt extends Error{constructor(t,n="INTERNAL_ERROR",b={},o=500){super(t);this.name="AfriCodeError",this.code=n,this.context=b,this.statusCode=o,this.timestamp=new Date().toISOString()}toJSON(){return{error:{code:this.code,message:this.message,...this.context.field?{field:this.context.field}:{},...Object.keys(this.context).length>0?{context:this.context}:{}}}}toResponse(){return new Response(JSON.stringify(this.toJSON()),{status:this.statusCode,headers:{"Content-Type":"application/json"}})}}class on extends nt{constructor(t,n=null,b={}){super(t,"VALIDATION_FAILED",{field:n,...b},422);this.name="ValidationError"}static fromZodError(t){let n=t.issues[0],b=n?.path?.join(".")||null,o=n?.message||"Validation failed";return new on(o,b,{issues:t.issues.map((l)=>({field:l.path.join("."),message:l.message,code:l.code}))})}}class xo extends nt{constructor(t,n){let b=n===""?"an empty string":`"${n}"`;super(`Field '${t}' must be a valid URL or null. Got ${b}.`,"INVALID_URL",{field:t,received:n},422);this.name="InvalidUrlError"}}class pt extends nt{constructor(t,n="SECURITY_VIOLATION",b={},o=403){super(t,n,b,o);this.name="SecurityError"}}class qo extends pt{constructor(t="missing"){let n={missing:"CSRF token missing. Include the token in both the cookie and the X-CSRF-Token header.",mismatch:"CSRF token mismatch. The header token does not match the cookie token."};super(n[t]||n.missing,"CSRF_FAILURE",{reason:t});this.name="CsrfError"}}class ko extends pt{constructor(t,n="Too many requests. Please try again later."){super(n,"RATE_LIMIT_EXCEEDED",{retryAfter:t},429);this.name="RateLimitError"}}class Ho extends nt{constructor(t,n=null,b={}){super(t,"DATABASE_ERROR",{operation:n,...b},500);this.name="DatabaseError"}}class Yo extends nt{constructor(t,n,b={}){super(`Component Error in <${n}>: ${t}`,"COMPONENT_ERROR",{componentName:n,...b},500);this.name="ComponentError"}}X();X();class Xo 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.",b={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=b[t]||b.tanzania;if(this._hasError){this.shadowRoot.innerHTML=`
4009
+ `;let n=this.shadowRoot.querySelector(".toggle-btn");if(n)n.addEventListener("click",()=>this.toggleTheme())}};f("af-theme-toggle",xr);$i=xr});rt();Ht();Mt();var ko={};s(ko,{transitionPage:()=>Hr,default:()=>ob,animateStaggered:()=>qr,Easing:()=>vn});var vn={DrumBeat:"cubic-bezier(0.1, 0.9, 0.2, 1.0)",KoraPluck:"cubic-bezier(0.34, 1.56, 0.64, 1)",RiverFlow:"cubic-bezier(0.4, 0.0, 0.2, 1)"};function qr(t,{delay:n=50,duration:o=600,easing:r=vn.DrumBeat,y:a=20,scale:l=0.95}={}){let b=typeof t==="string"?document.querySelectorAll(t):t;if(!b||b.length===0)return;let e=new IntersectionObserver((i)=>{i.forEach(($,q)=>{if($.isIntersecting){let Y=Math.random()*10,M=q*n+Y,X=$.target;X.animate([{opacity:0,transform:`translateY(${a}px) scale(${l})`},{opacity:1,transform:"translateY(0) scale(1)"}],{duration:o,delay:M,easing:r,fill:"forwards"}),e.unobserve(X),X.style.opacity="1"}})},{threshold:0.1});b.forEach((i)=>{i.style.opacity="0",e.observe(i)})}function Hr(t){document.body.animate([{opacity:1,transform:"scale(1)"},{opacity:0,transform:"scale(0.98)"}],{duration:200,easing:"ease-in"}).onfinish=()=>{t(),document.body.animate([{opacity:0,transform:"scale(1.02)"},{opacity:1,transform:"scale(1)"}],{duration:400,easing:vn.DrumBeat})}}var ob={Easing:vn,animateStaggered:qr,transitionPage:Hr};function Lr(t){if(typeof window>"u")return;if(!("IntersectionObserver"in window)){Object.values(t).forEach((o)=>o());return}let n=new IntersectionObserver((o)=>{o.forEach((r)=>{if(r.isIntersecting){let a=r.target.tagName.toLowerCase(),l=t[a];if(l)console.log(`\uD83C\uDFDD️ Hydrating Island: <${a}>`),l().then(()=>{delete t[a]}).catch((b)=>console.error(`Failed to hydrate <${a}>`,b));n.unobserve(r.target)}})},{rootMargin:"50px 0px"});Object.keys(t).forEach((o)=>{document.querySelectorAll(o).forEach((r)=>n.observe(r))})}_n();Jo();var Zr="afri_session",me=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function Go(t=""){return t.split(";").map((n)=>n.trim()).filter(Boolean).reduce((n,o)=>{let r=o.indexOf("=");if(r===-1)return n;let a=o.slice(0,r).trim(),l=o.slice(r+1).trim();return n[a]=l,n},{})}function Fo(){return crypto.randomUUID()}function zr(t){let n=t?.headers?.get?.("cookie")||"",r=Go(n).afri_session;if(r&&me.test(r))return r;return Fo()}class ta{constructor(){this.sessions=new Map}ensure(t){if(!this.sessions.has(t))this.sessions.set(t,{data:{counter:{value:0}},meta:{createdAt:new Date,lastSeenAt:new Date}});return this.sessions.get(t)}touch(t){let n=this.ensure(t);return n.meta.lastSeenAt=new Date,n}has(t){return this.sessions.has(t)}get(t){return this.touch(t).data}set(t,n,o){let r=this.get(t),a=n.split("/"),l=r;while(a.length>1){let b=a.shift();if(!l[b]||typeof l[b]!=="object")l[b]={};l=l[b]}return l[a[0]]=o,o}delete(t){return this.sessions.delete(t)}clear(){this.sessions.clear()}}var K=new ta;var na={incrementCounter(t){let r=(K.get(t).counter?.value||0)+1;return K.set(t,"counter/value",r),r},resetCounter(t){return K.set(t,"counter/value",0),0},getCounter(t){return K.get(t).counter?.value||0}};class Bo{constructor(){this.middlewares=[]}use(t){if(typeof t!=="function")throw Error("Middleware must be a function");return this.middlewares.push(t),this}async run(t){for(let n of this.middlewares){let o=await n(t);if(o instanceof Response)return o;if(o?.response)return o.response;if(o?.context)Object.assign(t,o.context)}return null}}function oa(){return async(t)=>{return Qo("log",`[AfriCode] ${t.req.method} ${t.pathname}`),{}}}function ra(t={}){return async(n)=>{let{protectedPaths:o=[],authorize:r=()=>!1,unauthorizedResponse:a=()=>new Response("Unauthorized",{status:401})}=t;if(o.some((b)=>n.pathname.startsWith(b))){if(!await r(n))return{response:a(n)}}return{}}}class nt extends Error{constructor(t,n="INTERNAL_ERROR",o={},r=500){super(t);this.name="AfriCodeError",this.code=n,this.context=o,this.statusCode=r,this.timestamp=new Date().toISOString()}toJSON(){return{error:{code:this.code,message:this.message,...this.context.field?{field:this.context.field}:{},...Object.keys(this.context).length>0?{context:this.context}:{}}}}toResponse(){return new Response(JSON.stringify(this.toJSON()),{status:this.statusCode,headers:{"Content-Type":"application/json"}})}}class kn extends nt{constructor(t,n=null,o={}){super(t,"VALIDATION_FAILED",{field:n,...o},422);this.name="ValidationError"}static fromZodError(t){let n=t.issues[0],o=n?.path?.join(".")||null,r=n?.message||"Validation failed";return new kn(r,o,{issues:t.issues.map((a)=>({field:a.path.join("."),message:a.message,code:a.code}))})}}class Eo extends nt{constructor(t,n){let o=n===""?"an empty string":`"${n}"`;super(`Field '${t}' must be a valid URL or null. Got ${o}.`,"INVALID_URL",{field:t,received:n},422);this.name="InvalidUrlError"}}class Et extends nt{constructor(t,n="SECURITY_VIOLATION",o={},r=403){super(t,n,o,r);this.name="SecurityError"}}class Do extends Et{constructor(t="missing"){let n={missing:"CSRF token missing. Include the token in both the cookie and the X-CSRF-Token header.",mismatch:"CSRF token mismatch. The header token does not match the cookie token."};super(n[t]||n.missing,"CSRF_FAILURE",{reason:t});this.name="CsrfError"}}class Oo extends Et{constructor(t,n="Too many requests. Please try again later."){super(n,"RATE_LIMIT_EXCEEDED",{retryAfter:t},429);this.name="RateLimitError"}}class Wo extends nt{constructor(t,n=null,o={}){super(t,"DATABASE_ERROR",{operation:n,...o},500);this.name="DatabaseError"}}class Uo extends nt{constructor(t,n,o={}){super(`Component Error in <${n}>: ${t}`,"COMPONENT_ERROR",{componentName:n,...o},500);this.name="ComponentError"}}u();u();class Vo extends h{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.",o={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"}},r=o[t]||o.tanzania;if(this._hasError){this.shadowRoot.innerHTML=`
3079
4010
  <style>
3080
4011
  :host { display: block; width: 100%; font-family: 'Inter', system-ui, sans-serif; }
3081
4012
  .boundary-error {
3082
- background: ${o.bg};
3083
- border-left: 4px solid ${o.border};
3084
- color: ${o.text};
4013
+ background: ${r.bg};
4014
+ border-left: 4px solid ${r.border};
4015
+ color: ${r.text};
3085
4016
  padding: 16px 20px;
3086
4017
  border-radius: 4px;
3087
4018
  margin: 12px 0;
@@ -3114,8 +4045,8 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
3114
4045
  }
3115
4046
  button {
3116
4047
  background: transparent;
3117
- border: 1px solid ${o.border};
3118
- color: ${o.text};
4048
+ border: 1px solid ${r.border};
4049
+ color: ${r.text};
3119
4050
  padding: 6px 12px;
3120
4051
  border-radius: 4px;
3121
4052
  cursor: pointer;
@@ -3146,7 +4077,7 @@ var Rb=Object.defineProperty;var Bb=(t)=>t;function Db(t,n){this[t]=Bb.bind(null
3146
4077
  `,this.shadowRoot.getElementById("retry-btn").addEventListener("click",()=>{this.reset()});return}this.shadowRoot.innerHTML=`
3147
4078
  <style>:host { display: block; }</style>
3148
4079
  <slot></slot>
3149
- `}}_("af-error-boundary",Xo);io();Lo();Mo();Qo();Jo();var Fn={"af-button":()=>Promise.resolve().then(() => (X0(),Y0)),"af-card":()=>Promise.resolve().then(() => (L0(),i0)),"af-navbar":()=>Promise.resolve().then(() => (Q0(),M0)),"af-input":()=>Promise.resolve().then(() => (G0(),J0)),"af-alert":()=>Promise.resolve().then(() => (F0(),S0)),"af-grid":()=>Promise.resolve().then(() => (B0(),R0)),"af-section":()=>Promise.resolve().then(() => (E0(),D0)),"af-icon":()=>Promise.resolve().then(() => (W0(),O0)),"af-ui-button":()=>Promise.resolve().then(() => (io(),d0)),"af-ui-card":()=>Promise.resolve().then(() => (Lo(),x0)),"af-ui-input":()=>Promise.resolve().then(() => (Mo(),q0)),"af-ui-badge":()=>Promise.resolve().then(() => (Qo(),k0)),"af-ui-switch":()=>Promise.resolve().then(() => (Jo(),H0)),"af-accordion":()=>Promise.resolve().then(() => (p0(),m0)),"af-hero":()=>Promise.resolve().then(() => (U0(),u0)),"af-table":()=>Promise.resolve().then(() => (N0(),V0)),"af-modal":()=>Promise.resolve().then(() => (j0(),K0)),"af-tabs":()=>Promise.resolve().then(() => (P0(),I0)),"af-sidebar":()=>Promise.resolve().then(() => (C0(),T0)),"af-dropdown":()=>Promise.resolve().then(() => (e0(),y0)),"af-select":()=>Promise.resolve().then(() => (s0(),Z0)),"af-form":()=>Promise.resolve().then(() => (tb(),z0)),"af-tooltip":()=>Promise.resolve().then(() => (ob(),nb)),"af-toast":()=>Promise.resolve().then(() => (lb(),bb)),"af-badge":()=>Promise.resolve().then(() => (hb(),ab)),"af-avatar":()=>Promise.resolve().then(() => (rb(),fb)),"af-progress":()=>Promise.resolve().then(() => ($b(),gb)),"af-loader":()=>Promise.resolve().then(() => (vb(),cb)),"af-skeleton":()=>Promise.resolve().then(() => (_b(),wb)),"af-divider":()=>Promise.resolve().then(() => (db(),Ab)),"af-kanga-card":()=>Promise.resolve().then(() => (qb(),xb)),"af-cultural-card":()=>Promise.resolve().then(() => (Hb(),kb)),"af-pattern-showcase":()=>Promise.resolve().then(() => (Xb(),Yb)),"af-language-switcher":()=>Promise.resolve().then(() => (Lb(),ib)),"af-auth":()=>Promise.resolve().then(() => (Qb(),Mb)),"af-theme-toggle":()=>Promise.resolve().then(() => (Gb(),Jb))};var ot={COMPONENT:"component",FORM:"form",LIST:"list",CARD:"card",MODAL:"modal",TOAST:"toast",PROGRESS:"progress"},Kf={component:{type:"object",properties:{id:{type:"string"},type:{type:"string",enum:Object.values(ot)},props:{type:"object"},children:{type:"array",items:{$ref:"#"}}},required:["id","type"]}};function Sb(t){return String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function Rn(t){if(Array.isArray(t))return t.map(Rn).join("");if(t===null||t===void 0||t===!1)return"";if(typeof t==="string"||typeof t==="number"||typeof t==="boolean")return Sb(t);if(typeof t!=="object")return"";let n=t.tag||t.tagName;if(!n)return"";let b=t.props||{},o=Object.entries(b).filter(([,a])=>a!==null&&a!==void 0&&a!==!1).map(([a,h])=>h===!0?a:`${a}="${Sb(h)}"`).join(" "),l=Rn(t.children??t.content??"");return`<${n}${o?` ${o}`:""}>${l}</${n}>`}function Va(t){return/<\s*script\b|on\w+\s*=|javascript:/i.test(String(t))}class Bn{constructor(t){this.root=t,this.components=new Map}render(t){if(!t||!t.type)throw Error("Invalid A2UI message");if(t.html!==void 0){if(Va(t.html))throw Error("Unsafe HTML is not allowed in A2UI render messages");throw Error("Raw HTML payloads are not supported in A2UI render messages")}let n=Array.isArray(t.components)?t.components.map(Rn).join(""):Rn(t.component||t);if(t.id)this.components.set(t.id,{id:t.id,type:t.type,props:t.props||{},children:t.children||t.components||[]});if(this.root&&typeof this.root.appendChild==="function"&&typeof document<"u"&&n){let o=document.createElement("div");o.innerHTML=n;while(o.firstChild)this.root.appendChild(o.firstChild)}return n}createElement(t){let{type:n,props:b={},children:o=[]}=t,l;switch(n){case ot.COMPONENT:l=this.createCustomComponent(b);break;case ot.FORM:l=this.createForm(b);break;case ot.LIST:l=this.createList(b);break;case ot.CARD:l=this.createCard(b);break;case ot.MODAL:l=this.createModal(b);break;case ot.TOAST:l=this.createToast(b);break;case ot.PROGRESS:l=this.createProgress(b);break;default:throw Error(`Unknown A2UI component type: ${n}`)}if(o.length>0)for(let a of o){let h=this.createElement(a);l.appendChild(h)}return l}createCustomComponent({tag:t,...n}){let b=document.createElement(t||"div");return Object.assign(b,n),b}createForm({fields:t=[],onSubmit:n}){let b=document.createElement("af-form");for(let o of t){let l=document.createElement("af-input");l.setAttribute("name",o.name),l.setAttribute("placeholder",o.placeholder||""),l.setAttribute("type",o.type||"text"),b.appendChild(l)}if(n)b.addEventListener("submit",n);return b}createList({items:t=[]}){let n=document.createElement("af-grid");for(let b of t){let o=this.createCard(b);n.appendChild(o)}return n}createCard({title:t,content:n,image:b}){let o=document.createElement("af-card");if(t){let l=document.createElement("h3");l.textContent=t,o.appendChild(l)}if(n){let l=document.createElement("p");l.textContent=n,o.appendChild(l)}if(b){let l=document.createElement("img");l.src=b,l.alt=t||"Card image",o.appendChild(l)}return o}createModal({title:t,content:n,actions:b=[]}){let o=document.createElement("af-modal");if(o.setAttribute("open",""),t){let a=document.createElement("h2");a.slot="header",a.textContent=t,o.appendChild(a)}if(n){let a=document.createElement("p");a.textContent=n,o.appendChild(a)}let l=document.createElement("div");l.slot="footer";for(let a of b){let h=document.createElement("af-button");if(h.textContent=a.label,a.primary)h.setAttribute("variant","primary");if(a.onClick)h.addEventListener("click",a.onClick);l.appendChild(h)}return o.appendChild(l),o}createToast({message:t,type:n="info",duration:b=3000}){let o=document.createElement("af-toast");return o.setAttribute("type",n),o.textContent=t,setTimeout(()=>{o.remove()},b),o}createProgress({value:t=0,max:n=100,label:b}){let o=document.createElement("af-progress");if(o.setAttribute("value",t),o.setAttribute("max",n),b)o.setAttribute("label",b);return o}update(t,n){let b=this.components.get(t);if(b)Object.assign(b,n)}remove(t){let n=this.components.get(t);if(n)n.remove(),this.components.delete(t)}}class Dn{constructor(t){this.renderer=t,this.messageQueue=[],this.messageHandlers=[],this.isProcessing=!1}onMessage(t){if(typeof t==="function")this.messageHandlers.push(t)}sendMessage(t){return this.processMessage(t)}processMessage(t){if(typeof t==="string")try{t=JSON.parse(t)}catch{return console.warn("Invalid A2UI message format:",t),null}if(t?.type==="render"&&this.renderer)return this.renderer.render(t);for(let n of this.messageHandlers)n(t);return t}processQueue(){if(this.isProcessing||this.messageQueue.length===0)return;this.isProcessing=!0;while(this.messageQueue.length>0){let t=this.messageQueue.shift();try{this.renderer.render(t)}catch(n){console.error("A2UI render error:",n)}}this.isProcessing=!1}async handleStream(t){let n=t.getReader(),b=new TextDecoder,o="";while(!0){let{done:l,value:a}=await n.read();if(l)break;o+=b.decode(a,{stream:!0});let h=o.split(`
3150
- `);o=h.pop();for(let f of h)if(f.trim())this.processMessage(f.trim())}if(o.trim())this.processMessage(o.trim())}createStream(){let t=new Set;return{subscribe(n){if(typeof n!=="function")return()=>{};return t.add(n),()=>t.delete(n)},push(n){for(let b of t)b(n)}}}validateAgainstSchema(t){let n=t?.tag||t?.tagName;return Promise.resolve(Boolean(n&&Fn[n]))}}function Fb(t){if(typeof document>"u")t=null;else t=t||document.body;let n=new Bn(t),b=new Dn(n);if(typeof window<"u")window.a2ui={render:(o)=>b.processMessage(o),handleStream:(o)=>b.handleStream(o),update:(o,l)=>n.update(o,l),remove:(o)=>n.remove(o),sendMessage:(o)=>b.sendMessage(o),onMessage:(o)=>b.onMessage(o),createStream:()=>b.createStream(),validateAgainstSchema:(o)=>b.validateAgainstSchema(o)};return{renderer:n,protocol:b}}bt();function Na(t={}){if(typeof window<"u"){console.log("\uD83C\uDF0D AfriCode Browser SDK Initialized");let n={...Fn,...t};if(Object.keys(n).length>0)po(n)}}var ar={createReactiveState:$t,subscribe:y,createSignal:Wn,createEffect:mn,store:D,actions:Eo,patterns:Jt,motion:oo,html:Q,Layout:uo,schemas:tn,Validation:gt,rules:U,afri:h0,AfriFieldBuilder:j,normalizeInput:f0,buildSchema:r0,createFramework:a0,getConfig:mt,getRequestIdentity:$0,parseCookieHeader:wo,createSessionId:_o,SESSION_COOKIE_NAME:g0,sessionStore:I,runtimeActions:v0,MiddlewareManager:Ao,loggerMiddleware:w0,authMiddleware:_0,AfriCodeError:nt,ValidationError:on,InvalidUrlError:xo,SecurityError:pt,CsrfError:qo,RateLimitError:ko,DatabaseError:Ho,ComponentError:Yo,initA2UI:Fb,A2UIRenderer:Bn,A2UIProtocol:Dn,init:Na};export{y as subscribe,D as store,I as sessionStore,tn as schemas,v0 as runtimeActions,U as rules,Jt as patterns,wo as parseCookieHeader,f0 as normalizeInput,oo as motion,w0 as loggerMiddleware,Fb as initA2UI,Na as init,Q as html,$0 as getRequestIdentity,mt as getConfig,ar as default,Wn as createSignal,_o as createSessionId,$t as createReactiveState,a0 as createFramework,mn as createEffect,r0 as buildSchema,_0 as authMiddleware,h0 as afri,Eo as actions,on as ValidationError,gt as Validation,pt as SecurityError,g0 as SESSION_COOKIE_NAME,ko as RateLimitError,Ao as MiddlewareManager,uo as Layout,xo as InvalidUrlError,Ho as DatabaseError,qo as CsrfError,Yo as ComponentError,j as AfriFieldBuilder,nt as AfriCodeError,Bn as A2UIRenderer,Dn as A2UIProtocol};
4080
+ `}}f("af-error-boundary",Vo);No();Ko();jo();yo();Co();Io();Po();To();Zo();zo();tr();nr();or();ar();lr();br();er();ir();hr();fr();cr();dr();gr();vr();pr();mr();var Tn={"af-button":()=>Promise.resolve().then(() => (Xa(),Ra)),"af-card":()=>Promise.resolve().then(() => (Ja(),Qa)),"af-navbar":()=>Promise.resolve().then(() => (Fa(),Ga)),"af-input":()=>Promise.resolve().then(() => (Ea(),Ba)),"af-alert":()=>Promise.resolve().then(() => (Oa(),Da)),"af-grid":()=>Promise.resolve().then(() => (Ua(),Wa)),"af-section":()=>Promise.resolve().then(() => (Na(),Va)),"af-icon":()=>Promise.resolve().then(() => (ja(),Ka)),"af-ui-button":()=>Promise.resolve().then(() => (No(),la)),"af-ui-card":()=>Promise.resolve().then(() => (Ko(),ba)),"af-ui-input":()=>Promise.resolve().then(() => (jo(),ea)),"af-ui-badge":()=>Promise.resolve().then(() => (yo(),ia)),"af-ui-switch":()=>Promise.resolve().then(() => (Co(),ha)),"af-ui-select":()=>Promise.resolve().then(() => (Io(),fa)),"af-ui-textarea":()=>Promise.resolve().then(() => (Po(),ca)),"af-ui-chip":()=>Promise.resolve().then(() => (To(),da)),"af-ui-tag":()=>Promise.resolve().then(() => (Zo(),ga)),"af-ui-avatar":()=>Promise.resolve().then(() => (zo(),va)),"af-ui-progress-ring":()=>Promise.resolve().then(() => (tr(),pa)),"af-ui-tooltip":()=>Promise.resolve().then(() => (nr(),ma)),"af-ui-popover":()=>Promise.resolve().then(() => (or(),$a)),"af-ui-tabs":()=>Promise.resolve().then(() => (ar(),wa)),"af-ui-table":()=>Promise.resolve().then(() => (lr(),ua)),"af-ui-stat":()=>Promise.resolve().then(() => (br(),sa)),"af-footer":()=>Promise.resolve().then(() => (er(),xa)),"af-breadcrumb":()=>Promise.resolve().then(() => (ir(),Aa)),"af-feature-grid":()=>Promise.resolve().then(() => (hr(),_a)),"af-pricing-card":()=>Promise.resolve().then(() => (fr(),ka)),"af-testimonial":()=>Promise.resolve().then(() => (cr(),qa)),"af-dashboard-shell":()=>Promise.resolve().then(() => (dr(),Ha)),"af-dashboard-topbar":()=>Promise.resolve().then(() => (gr(),La)),"af-dashboard-card":()=>Promise.resolve().then(() => (vr(),Ma)),"af-dashboard-metric":()=>Promise.resolve().then(() => (pr(),Ya)),"af-dashboard-activity-list":()=>Promise.resolve().then(() => (mr(),Sa)),"af-accordion":()=>Promise.resolve().then(() => (Ca(),ya)),"af-hero":()=>Promise.resolve().then(() => (Pa(),Ia)),"af-table":()=>Promise.resolve().then(() => (Za(),Ta)),"af-modal":()=>Promise.resolve().then(() => (tl(),za)),"af-tabs":()=>Promise.resolve().then(() => (ol(),nl)),"af-sidebar":()=>Promise.resolve().then(() => (al(),rl)),"af-dropdown":()=>Promise.resolve().then(() => (bl(),ll)),"af-select":()=>Promise.resolve().then(() => (il(),el)),"af-form":()=>Promise.resolve().then(() => (fl(),hl)),"af-tooltip":()=>Promise.resolve().then(() => (dl(),cl)),"af-toast":()=>Promise.resolve().then(() => (vl(),gl)),"af-badge":()=>Promise.resolve().then(() => (ml(),pl)),"af-avatar":()=>Promise.resolve().then(() => (wl(),$l)),"af-progress":()=>Promise.resolve().then(() => (sl(),ul)),"af-loader":()=>Promise.resolve().then(() => (Al(),xl)),"af-skeleton":()=>Promise.resolve().then(() => (kl(),_l)),"af-divider":()=>Promise.resolve().then(() => (Hl(),ql)),"af-kanga-card":()=>Promise.resolve().then(() => (Ml(),Ll)),"af-cultural-card":()=>Promise.resolve().then(() => (Sl(),Yl)),"af-pattern-showcase":()=>Promise.resolve().then(() => (Xl(),Rl)),"af-language-switcher":()=>Promise.resolve().then(() => (Jl(),Ql)),"af-auth":()=>Promise.resolve().then(() => (Fl(),Gl)),"af-theme-toggle":()=>Promise.resolve().then(() => (El(),Bl))};var ot={COMPONENT:"component",FORM:"form",LIST:"list",CARD:"card",MODAL:"modal",TOAST:"toast",PROGRESS:"progress"},ef={component:{type:"object",properties:{id:{type:"string"},type:{type:"string",enum:Object.values(ot)},props:{type:"object"},children:{type:"array",items:{$ref:"#"}}},required:["id","type"]}};function Dl(t){return String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function Zn(t){if(Array.isArray(t))return t.map(Zn).join("");if(t===null||t===void 0||t===!1)return"";if(typeof t==="string"||typeof t==="number"||typeof t==="boolean")return Dl(t);if(typeof t!=="object")return"";let n=t.tag||t.tagName;if(!n)return"";let o=t.props||{},r=Object.entries(o).filter(([,l])=>l!==null&&l!==void 0&&l!==!1).map(([l,b])=>b===!0?l:`${l}="${Dl(b)}"`).join(" "),a=Zn(t.children??t.content??"");return`<${n}${r?` ${r}`:""}>${a}</${n}>`}function wi(t){return/<\s*script\b|on\w+\s*=|javascript:/i.test(String(t))}class zn{constructor(t){this.root=t,this.components=new Map}render(t){if(!t||!t.type)throw Error("Invalid A2UI message");if(t.html!==void 0){if(wi(t.html))throw Error("Unsafe HTML is not allowed in A2UI render messages");throw Error("Raw HTML payloads are not supported in A2UI render messages")}let n=Array.isArray(t.components)?t.components.map(Zn).join(""):Zn(t.component||t);if(t.id)this.components.set(t.id,{id:t.id,type:t.type,props:t.props||{},children:t.children||t.components||[]});if(this.root&&typeof this.root.appendChild==="function"&&typeof document<"u"&&n){let r=document.createElement("div");r.innerHTML=n;while(r.firstChild)this.root.appendChild(r.firstChild)}return n}createElement(t){let{type:n,props:o={},children:r=[]}=t,a;switch(n){case ot.COMPONENT:a=this.createCustomComponent(o);break;case ot.FORM:a=this.createForm(o);break;case ot.LIST:a=this.createList(o);break;case ot.CARD:a=this.createCard(o);break;case ot.MODAL:a=this.createModal(o);break;case ot.TOAST:a=this.createToast(o);break;case ot.PROGRESS:a=this.createProgress(o);break;default:throw Error(`Unknown A2UI component type: ${n}`)}if(r.length>0)for(let l of r){let b=this.createElement(l);a.appendChild(b)}return a}createCustomComponent({tag:t,...n}){let o=document.createElement(t||"div");return Object.assign(o,n),o}createForm({fields:t=[],onSubmit:n}){let o=document.createElement("af-form");for(let r of t){let a=document.createElement("af-input");a.setAttribute("name",r.name),a.setAttribute("placeholder",r.placeholder||""),a.setAttribute("type",r.type||"text"),o.appendChild(a)}if(n)o.addEventListener("submit",n);return o}createList({items:t=[]}){let n=document.createElement("af-grid");for(let o of t){let r=this.createCard(o);n.appendChild(r)}return n}createCard({title:t,content:n,image:o}){let r=document.createElement("af-card");if(t){let a=document.createElement("h3");a.textContent=t,r.appendChild(a)}if(n){let a=document.createElement("p");a.textContent=n,r.appendChild(a)}if(o){let a=document.createElement("img");a.src=o,a.alt=t||"Card image",r.appendChild(a)}return r}createModal({title:t,content:n,actions:o=[]}){let r=document.createElement("af-modal");if(r.setAttribute("open",""),t){let l=document.createElement("h2");l.slot="header",l.textContent=t,r.appendChild(l)}if(n){let l=document.createElement("p");l.textContent=n,r.appendChild(l)}let a=document.createElement("div");a.slot="footer";for(let l of o){let b=document.createElement("af-button");if(b.textContent=l.label,l.primary)b.setAttribute("variant","primary");if(l.onClick)b.addEventListener("click",l.onClick);a.appendChild(b)}return r.appendChild(a),r}createToast({message:t,type:n="info",duration:o=3000}){let r=document.createElement("af-toast");return r.setAttribute("type",n),r.textContent=t,setTimeout(()=>{r.remove()},o),r}createProgress({value:t=0,max:n=100,label:o}){let r=document.createElement("af-progress");if(r.setAttribute("value",t),r.setAttribute("max",n),o)r.setAttribute("label",o);return r}update(t,n){let o=this.components.get(t);if(o)Object.assign(o,n)}remove(t){let n=this.components.get(t);if(n)n.remove(),this.components.delete(t)}}class to{constructor(t){this.renderer=t,this.messageQueue=[],this.messageHandlers=[],this.isProcessing=!1}onMessage(t){if(typeof t==="function")this.messageHandlers.push(t)}sendMessage(t){return this.processMessage(t)}processMessage(t){if(typeof t==="string")try{t=JSON.parse(t)}catch{return console.warn("Invalid A2UI message format:",t),null}if(t?.type==="render"&&this.renderer)return this.renderer.render(t);for(let n of this.messageHandlers)n(t);return t}processQueue(){if(this.isProcessing||this.messageQueue.length===0)return;this.isProcessing=!0;while(this.messageQueue.length>0){let t=this.messageQueue.shift();try{this.renderer.render(t)}catch(n){console.error("A2UI render error:",n)}}this.isProcessing=!1}async handleStream(t){let n=t.getReader(),o=new TextDecoder,r="";while(!0){let{done:a,value:l}=await n.read();if(a)break;r+=o.decode(l,{stream:!0});let b=r.split(`
4081
+ `);r=b.pop();for(let e of b)if(e.trim())this.processMessage(e.trim())}if(r.trim())this.processMessage(r.trim())}createStream(){let t=new Set;return{subscribe(n){if(typeof n!=="function")return()=>{};return t.add(n),()=>t.delete(n)},push(n){for(let o of t)o(n)}}}validateAgainstSchema(t){let n=t?.tag||t?.tagName;return Promise.resolve(Boolean(n&&Tn[n]))}}function Ol(t){if(typeof document>"u")t=null;else t=t||document.body;let n=new zn(t),o=new to(n);if(typeof window<"u")window.a2ui={render:(r)=>o.processMessage(r),handleStream:(r)=>o.handleStream(r),update:(r,a)=>n.update(r,a),remove:(r)=>n.remove(r),sendMessage:(r)=>o.sendMessage(r),onMessage:(r)=>o.onMessage(r),createStream:()=>o.createStream(),validateAgainstSchema:(r)=>o.validateAgainstSchema(r)};return{renderer:n,protocol:o}}rt();function ui(t={}){if(typeof window<"u"){console.log("\uD83C\uDF0D AfriCode Browser SDK Initialized");let n={...Tn,...t};if(Object.keys(n).length>0)Lr(n)}}var kf={createReactiveState:ft,subscribe:I,createSignal:ro,createEffect:ao,store:Q,actions:_r,patterns:Lt,motion:ko,html:d,Layout:Mr,schemas:An,Validation:ht,rules:O,afri:Ir,AfriFieldBuilder:N,normalizeInput:Pr,buildSchema:Tr,createFramework:Cr,getConfig:Bt,getRequestIdentity:zr,parseCookieHeader:Go,createSessionId:Fo,SESSION_COOKIE_NAME:Zr,sessionStore:K,runtimeActions:na,MiddlewareManager:Bo,loggerMiddleware:oa,authMiddleware:ra,AfriCodeError:nt,ValidationError:kn,InvalidUrlError:Eo,SecurityError:Et,CsrfError:Do,RateLimitError:Oo,DatabaseError:Wo,ComponentError:Uo,initA2UI:Ol,A2UIRenderer:zn,A2UIProtocol:to,init:ui};export{I as subscribe,Q as store,K as sessionStore,An as schemas,na as runtimeActions,O as rules,Lt as patterns,Go as parseCookieHeader,Pr as normalizeInput,ko as motion,oa as loggerMiddleware,Ol as initA2UI,ui as init,d as html,zr as getRequestIdentity,Bt as getConfig,kf as default,ro as createSignal,Fo as createSessionId,ft as createReactiveState,Cr as createFramework,ao as createEffect,Tr as buildSchema,ra as authMiddleware,Ir as afri,_r as actions,kn as ValidationError,ht as Validation,Et as SecurityError,Zr as SESSION_COOKIE_NAME,Oo as RateLimitError,Bo as MiddlewareManager,Mr as Layout,Eo as InvalidUrlError,Wo as DatabaseError,Do as CsrfError,Uo as ComponentError,N as AfriFieldBuilder,nt as AfriCodeError,zn as A2UIRenderer,to as A2UIProtocol};
3151
4082
 
3152
- //# debugId=93BD7AC2977DAFC264756E2164756E21
4083
+ //# debugId=9D0AC151CA9BD62664756E2164756E21