import{j as n,r as g,f as w,R as G}from"./app-DBtZ8h0a.js";import{I as F}from"./InputGroup-y7VQa4RO.js";import{S as I}from"./SelectInput-C3GOCL2Z.js";import{c as N}from"./utils-B0kY8eQi.js";import{C as M}from"./circle-alert-DuosJsOu.js";import{c as D}from"./createLucideIcon-ivHVH1Cm.js";import{C as O}from"./circle-check-big-CjF5UNvc.js";/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const H=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],V=D("CircleCheck",H);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const W=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Z=D("Info",W);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Y=[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]],J=D("OctagonAlert",Y);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const $=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],z=D("TriangleAlert",$),R=({title:r,children:c})=>n.jsxs("div",{className:"space-y-2",children:[n.jsx("h2",{className:"border-l-4 border-blue-500 bg-blue-100 text-lg font-semibold p-2",children:r}),c]}),la=({step:r,data:c,onChange:e,errors:t})=>{const[m,d]=g.useState({prov:!1,kab:!1,kec:!1,desa:!1}),[s,h]=g.useState({provinsi:[],kabupaten:[],kecamatan:[],kelurahan:[]}),[v,B]=g.useState("alamat1"),[y,A]=g.useState({});g.useEffect(()=>{x("provinsi")},[]);const x=async(i,a)=>{const u=i==="provinsi"?"prov":i==="kabupaten"?"kab":i==="kecamatan"?"kec":"desa";d(l=>({...l,[u]:!0}));try{const l=a?{kod:a}:{},p=await w.get(route("api.wilayah",l));if(p.data.success){const o=Array.isArray(p.data.data)?p.data.data.map(S=>({id:S.id,nama:S.nama})):[];h(S=>({...S,[i]:o}))}}catch(l){console.error(`Error fetching ${i}:`,l)}finally{d(l=>({...l,[u]:!1}))}},k=g.useCallback(async(i,a,u,l)=>{B(i),A(o=>({...o,[`${i}.${a}`]:!0}));let p={...c[i],[a]:u,...l?{[`${a}Name`]:l}:{}};a==="prov"?(p={...p,kab:"",kec:"",desa:""},h(o=>({...o,kabupaten:[],kecamatan:[],kelurahan:[]})),u&&await x("kabupaten",u)):a==="kab"?(p={...p,kec:"",desa:""},h(o=>({...o,kecamatan:[],kelurahan:[]})),u&&await x("kecamatan",u)):a==="kec"&&(p={...p,desa:""},h(o=>({...o,kelurahan:[]})),u&&await x("kelurahan",u)),e(i,p)},[c,e]),E=g.useCallback((i,a,u)=>{A(l=>({...l,[`${i}.${a}`]:!0})),e(i,{...c[i],[a]:u})},[c,e]),b=g.useCallback((i,a,u,l,p=!1)=>{const o=c[i][a]||"",S=m[a],P=S||a==="kab"&&!c[i].prov||a==="kec"&&!c[i].kab||a==="desa"&&!c[i].kec,K=`${i}.${a}`,T=l.map(U=>({value:U.id,label:U.nama,disabled:!1}));return n.jsx(I,{name:K,id:`${i}-${a}`,allowEmpty:!0,label:u,value:o,onChange:U=>{const C=l.find(j=>j.id===U);k(i,a,U,C==null?void 0:C.nama)},options:S?[]:T,placeholder:S?"Loading...":"-- Pilih --",disabled:P,required:p,errors:t})},[c,m,y,t,k]),f=g.useCallback((i,a,u)=>{const l=u==null?void 0:u.includes("*"),p=a===v?s:{provinsi:s.provinsi,kabupaten:c[a].prov?s.kabupaten:[],kecamatan:c[a].kab?s.kecamatan:[],kelurahan:c[a].kec?s.kelurahan:[]};return n.jsxs("div",{className:"bg-gray-50 p-4 rounded-lg space-y-4",children:[u&&n.jsx("h3",{className:"font-bold text-sm text-red-700",children:u}),n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b(a,"prov","Provinsi",p.provinsi,l),b(a,"kab","Kabupaten/Kota",p.kabupaten,l)]}),n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b(a,"kec","Kecamatan",p.kecamatan,l),b(a,"desa","Desa/Kelurahan",p.kelurahan,l)]}),n.jsx(F,{name:`${a}.addr`,id:`${i}-addr`,label:"Alamat Lengkap",placeholder:"Jl. Contoh No. 123",value:c[a].addr,onChange:o=>E(a,"addr",o),onBlur:()=>A(o=>({...o,[`${a}.addr`]:!0})),required:l,type:"text",error:t==null?void 0:t[`${a}.addr`],touched:y[`${a}.addr`]}),n.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[n.jsx(F,{name:`${a}.rt`,id:`${i}-rt`,label:"RT",placeholder:"001",value:c[a].rt,onChange:o=>E(a,"rt",o),onBlur:()=>A(o=>({...o,[`${a}.rt`]:!0})),required:l,type:"number",error:t==null?void 0:t[`${a}.rt`],touched:y[`${a}.rt`],maxLength:3,max:3}),n.jsx(F,{name:`${a}.rw`,id:`${i}-rw`,label:"RW",placeholder:"002",value:c[a].rw,onChange:o=>E(a,"rw",o),onBlur:()=>A(o=>({...o,[`${a}.rw`]:!0})),required:l,type:"number",error:t==null?void 0:t[`${a}.rw`],touched:y[`${a}.rw`],max:3}),n.jsx(F,{name:`${a}.kodpos`,id:`${i}-kodpos`,label:"Kode Pos",placeholder:"12345",value:c[a].kodpos,onChange:o=>E(a,"kodpos",o),onBlur:()=>A(o=>({...o,[`${a}.kodpos`]:!0})),required:l,type:"number",error:t==null?void 0:t[`${a}.kodpos`],touched:y[`${a}.kodpos`],max:3})]})]})},[v,c,t,E,s,b,y]);return n.jsx(R,{title:"Alamat",children:n.jsxs("div",{className:"space-y-4",children:[r==="WNA"?f("alamat-domisili","alamat1","Alamat Domisili *"):c.temtin!==""&&f("alamat-ktp","alamat1","*Alamat Sesuai KTP"),r==="WNI"&&n.jsx(I,{name:"temtin",id:"tempat-tinggal",allowEmpty:!0,label:"Dimana Anda Tinggal?",value:c.temtin,onChange:i=>{A(a=>({...a,temtin:!0})),e("temtin",i)},placeholder:"-- Pilih --",options:[{value:"0",label:"Sesuai KTP"},{value:"1",label:"Alamat Lain"}],required:!0,errors:t,triggerClassName:t!=null&&t.temtin?"border-destructive":""}),c.temtin==="1"&&f("alamat-tinggal","alamat2","*Alamat Tempat Tinggal")]})})},ra=({data:r,onChange:c,errors:e})=>{const[t,m]=G.useState(r);G.useEffect(()=>{m(r)},[r]);const d=(s,h)=>{m(v=>({...v,[s]:h})),c(s,h)};return n.jsx(R,{title:"Informasi Kontak",children:n.jsxs("div",{className:"space-y-4 bg-gray-50 p-6 rounded-lg",children:[n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-1",children:[n.jsx("label",{htmlFor:"hub",className:N("block text-sm font-medium",(e==null?void 0:e.hub)&&"text-red-500"),children:"Hubungan dengan Peserta Didik *"}),n.jsxs("select",{id:"hub",className:N("w-full px-3 py-2 border rounded-md focus:outline-none focus:ring-2",e!=null&&e.hub?"border-red-500":"border-gray-300 focus:ring-primary"),value:t.hub,onChange:s=>d("hub",s.target.value),onBlur:()=>!t.hub&&c("hub",t.hub),children:[n.jsx("option",{value:"",children:"Pilih"}),n.jsx("option",{value:"0",children:"Ayah"}),n.jsx("option",{value:"1",children:"Ibu"}),n.jsx("option",{value:"2",children:"Wali"})]}),(e==null?void 0:e.hub)&&n.jsxs("p",{className:"flex items-center gap-2 text-xs text-red-500 mt-1",children:[n.jsx(M,{className:"w-4 h-4"}),e.hub]})]}),n.jsxs("div",{className:"space-y-1",children:[n.jsx("label",{htmlFor:"tel",className:N("block text-sm font-medium",(e==null?void 0:e.tel)&&"text-red-500"),children:"Nomor WhatsApp *"}),n.jsx("input",{id:"tel",type:"tel",className:N("w-full px-3 py-2 border rounded-md focus:outline-none focus:ring-2",e!=null&&e.tel?"border-red-500":"border-gray-300 focus:ring-primary"),value:t.tel,onChange:s=>d("tel",s.target.value),onBlur:()=>c("tel",t.tel)}),(e==null?void 0:e.tel)&&n.jsxs("p",{className:"flex items-center gap-2 text-xs text-red-500 mt-1",children:[n.jsx(M,{className:"w-4 h-4"}),e.tel]})]})]}),n.jsxs("div",{className:"space-y-1",children:[n.jsx("label",{htmlFor:"email",className:N("block text-sm font-medium",(e==null?void 0:e.email)&&"text-red-500"),children:"Email *"}),n.jsx("input",{id:"email",type:"email",className:N("w-full px-3 py-2 border rounded-md focus:outline-none focus:ring-2",e!=null&&e.email?"border-red-500":"border-gray-300 focus:ring-primary"),value:t.email,onChange:s=>d("email",s.target.value),onBlur:()=>c("email",t.email)}),(e==null?void 0:e.email)&&n.jsxs("p",{className:"flex items-center gap-2 text-xs text-red-500 mt-1",children:[n.jsx(M,{className:"w-4 h-4"}),e.email]})]})]})})},oa=G.memo(({step:r,processing:c,errors:e={},previews:t={},onChange:m})=>{const[d,s]=g.useState(t.ktpPreview||null),[h,v]=g.useState(t.pasporPreview||null),[B,y]=g.useState({ktpFile:!1,pasporFile:!1}),[A,x]=g.useState({ktpFile:"",pasporFile:""});g.useEffect(()=>{s(t.ktpPreview||null),v(t.pasporPreview||null)},[t.ktpPreview,t.pasporPreview]),g.useEffect(()=>{c&&(s(null),v(null))},[c]),g.useEffect(()=>()=>{d&&URL.revokeObjectURL(d),h&&URL.revokeObjectURL(h)},[d,h]);const k=i=>i.type.match("image/(jpeg|png|jpg)")?i.size>2*1024*1024?"Ukuran file maksimal 2MB":null:"Hanya file gambar (JPEG/PNG/JPG) yang diperbolehkan",E=g.useCallback((i,a)=>{var o;const u=((o=i.target.files)==null?void 0:o[0])||null;if(y(S=>({...S,[a]:!0})),x(S=>({...S,[a]:""})),!u){m==null||m(a,null),a==="ktpFile"?s(null):v(null);return}const l=k(u);if(l){x(S=>({...S,[a]:l})),i.target.value="";return}m==null||m(a,u);const p=URL.createObjectURL(u);a==="ktpFile"?s(p):v(p)},[m]),b=g.useCallback(i=>{m==null||m(i,null),i==="ktpFile"?s(null):v(null),y(a=>({...a,[i]:!0})),x(a=>({...a,[i]:""}))},[m]),f=g.useCallback((i,a,u,l)=>{const p=i==="ktpFile"?"KTP":"Paspor/KITAS",o=A[i]||e[i],S=(B[i]||A[i]||e[i])&&o;return n.jsxs("div",{id:i,className:"space-y-2",children:[n.jsxs("label",{className:"block text-sm font-medium text-gray-700",children:[a," *"]}),n.jsxs("div",{className:"flex flex-col space-y-2",children:[u?n.jsxs("div",{className:"relative group",children:[n.jsx("img",{src:u,alt:`Preview ${a}`,className:"max-w-full h-auto max-h-64 rounded border border-gray-200"}),n.jsx("div",{className:"absolute inset-0 bg-black/50 bg-opacity-0 group-hover:bg-opacity-30 transition-all duration-200 flex items-center justify-center opacity-0 group-hover:opacity-100",children:n.jsx("button",{type:"button",className:"bg-red-500 text-white rounded-full p-2 hover:bg-red-600 transition-colors",onClick:()=>b(i),"aria-label":`Hapus ${a}`,children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:n.jsx("path",{fillRule:"evenodd",d:"M9 2a1 1 0 00-.894.553L7.382 4H4a1 1 0 000 2v10a2 2 0 002 2h8a2 2 0 002-2V6a1 1 0 100-2h-3.382l-.724-1.447A1 1 0 0011 2H9zM7 8a1 1 0 012 0v6a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v6a1 1 0 102 0V8a1 1 0 00-1-1z",clipRule:"evenodd"})})})})]}):n.jsx(n.Fragment,{children:n.jsxs("label",{className:`flex flex-col items-center justify-center px-4 py-8 bg-white rounded-md border-2 border-dashed ${S?"border-red-300":"border-gray-300"} cursor-pointer hover:bg-gray-50 transition-colors`,children:[n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-12 w-12 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),n.jsxs("span",{className:"mt-2 text-sm font-medium text-gray-700",children:["Upload ",p]}),n.jsx("span",{className:"text-xs text-gray-500 mt-1",children:"Format: JPG/PNG, maksimal 2MB"}),n.jsx("input",{id:i,name:i,type:"file",accept:"image/jpeg, image/png, image/jpg",className:"hidden",onChange:P=>E(P,i),disabled:c,required:!0})]})}),S&&n.jsxs("p",{className:"text-xs text-red-500 mt-1 flex items-center gap-2",children:[n.jsx(M,{className:"text-red-500 w-5 h-5"}),n.jsx("span",{children:o})]})]})]})},[e,A,E,b,c,B]);return n.jsx(R,{title:"Upload Dokumen",children:n.jsx("div",{className:"space-y-6 bg-gray-50 p-6 rounded-lg",children:r==="WNI"?f("ktpFile","Foto KTP",d,s):f("pasporFile","Paspor/KITAS",h,v)})})});/*! countries-list v3.1.1 by Annexare | MIT */var L={AD:{name:"Andorra",native:"Andorra",phone:[376],continent:"EU",capital:"Andorra la Vella",currency:["EUR"],languages:["ca"]},AE:{name:"United Arab Emirates",native:"دولة الإمارات العربية المتحدة",phone:[971],continent:"AS",capital:"Abu Dhabi",currency:["AED"],languages:["ar"]},AF:{name:"Afghanistan",native:"افغانستان",phone:[93],continent:"AS",capital:"Kabul",currency:["AFN"],languages:["ps","uz","tk"]},AG:{name:"Antigua and Barbuda",native:"Antigua and Barbuda",phone:[1268],continent:"NA",capital:"Saint John's",currency:["XCD"],languages:["en"]},AI:{name:"Anguilla",native:"Anguilla",phone:[1264],continent:"NA",capital:"The Valley",currency:["XCD"],languages:["en"]},AL:{name:"Albania",native:"Shqipëria",phone:[355],continent:"EU",capital:"Tirana",currency:["ALL"],languages:["sq"]},AM:{name:"Armenia",native:"Հայաստան",phone:[374],continent:"AS",capital:"Yerevan",currency:["AMD"],languages:["hy","ru"]},AO:{name:"Angola",native:"Angola",phone:[244],continent:"AF",capital:"Luanda",currency:["AOA"],languages:["pt"]},AQ:{name:"Antarctica",native:"Antarctica",phone:[672],continent:"AN",capital:"",currency:[],languages:[]},AR:{name:"Argentina",native:"Argentina",phone:[54],continent:"SA",capital:"Buenos Aires",currency:["ARS"],languages:["es","gn"]},AS:{name:"American Samoa",native:"American Samoa",phone:[1684],continent:"OC",capital:"Pago Pago",currency:["USD"],languages:["en","sm"]},AT:{name:"Austria",native:"Österreich",phone:[43],continent:"EU",capital:"Vienna",currency:["EUR"],languages:["de"]},AU:{name:"Australia",native:"Australia",phone:[61],continent:"OC",capital:"Canberra",currency:["AUD"],languages:["en"]},AW:{name:"Aruba",native:"Aruba",phone:[297],continent:"NA",capital:"Oranjestad",currency:["AWG"],languages:["nl","pa"]},AX:{name:"Aland",native:"Åland",phone:[358],continent:"EU",capital:"Mariehamn",currency:["EUR"],languages:["sv"],partOf:"FI"},AZ:{name:"Azerbaijan",native:"Azərbaycan",phone:[994],continent:"AS",continents:["AS","EU"],capital:"Baku",currency:["AZN"],languages:["az"]},BA:{name:"Bosnia and Herzegovina",native:"Bosna i Hercegovina",phone:[387],continent:"EU",capital:"Sarajevo",currency:["BAM"],languages:["bs","hr","sr"]},BB:{name:"Barbados",native:"Barbados",phone:[1246],continent:"NA",capital:"Bridgetown",currency:["BBD"],languages:["en"]},BD:{name:"Bangladesh",native:"Bangladesh",phone:[880],continent:"AS",capital:"Dhaka",currency:["BDT"],languages:["bn"]},BE:{name:"Belgium",native:"België",phone:[32],continent:"EU",capital:"Brussels",currency:["EUR"],languages:["nl","fr","de"]},BF:{name:"Burkina Faso",native:"Burkina Faso",phone:[226],continent:"AF",capital:"Ouagadougou",currency:["XOF"],languages:["fr","ff"]},BG:{name:"Bulgaria",native:"България",phone:[359],continent:"EU",capital:"Sofia",currency:["BGN"],languages:["bg"]},BH:{name:"Bahrain",native:"‏البحرين",phone:[973],continent:"AS",capital:"Manama",currency:["BHD"],languages:["ar"]},BI:{name:"Burundi",native:"Burundi",phone:[257],continent:"AF",capital:"Bujumbura",currency:["BIF"],languages:["fr","rn"]},BJ:{name:"Benin",native:"Bénin",phone:[229],continent:"AF",capital:"Porto-Novo",currency:["XOF"],languages:["fr"]},BL:{name:"Saint Barthelemy",native:"Saint-Barthélemy",phone:[590],continent:"NA",capital:"Gustavia",currency:["EUR"],languages:["fr"]},BM:{name:"Bermuda",native:"Bermuda",phone:[1441],continent:"NA",capital:"Hamilton",currency:["BMD"],languages:["en"]},BN:{name:"Brunei",native:"Negara Brunei Darussalam",phone:[673],continent:"AS",capital:"Bandar Seri Begawan",currency:["BND"],languages:["ms"]},BO:{name:"Bolivia",native:"Bolivia",phone:[591],continent:"SA",capital:"Sucre",currency:["BOB","BOV"],languages:["es","ay","qu"]},BQ:{name:"Bonaire",native:"Bonaire",phone:[5997],continent:"NA",capital:"Kralendijk",currency:["USD"],languages:["nl"]},BR:{name:"Brazil",native:"Brasil",phone:[55],continent:"SA",capital:"Brasília",currency:["BRL"],languages:["pt"]},BS:{name:"Bahamas",native:"Bahamas",phone:[1242],continent:"NA",capital:"Nassau",currency:["BSD"],languages:["en"]},BT:{name:"Bhutan",native:"ʼbrug-yul",phone:[975],continent:"AS",capital:"Thimphu",currency:["BTN","INR"],languages:["dz"]},BV:{name:"Bouvet Island",native:"Bouvetøya",phone:[47],continent:"AN",capital:"",currency:["NOK"],languages:["no","nb","nn"]},BW:{name:"Botswana",native:"Botswana",phone:[267],continent:"AF",capital:"Gaborone",currency:["BWP"],languages:["en","tn"]},BY:{name:"Belarus",native:"Белару́сь",phone:[375],continent:"EU",capital:"Minsk",currency:["BYN"],languages:["be","ru"]},BZ:{name:"Belize",native:"Belize",phone:[501],continent:"NA",capital:"Belmopan",currency:["BZD"],languages:["en","es"]},CA:{name:"Canada",native:"Canada",phone:[1],continent:"NA",capital:"Ottawa",currency:["CAD"],languages:["en","fr"]},CC:{name:"Cocos (Keeling) Islands",native:"Cocos (Keeling) Islands",phone:[61],continent:"AS",capital:"West Island",currency:["AUD"],languages:["en"]},CD:{name:"Democratic Republic of the Congo",native:"République démocratique du Congo",phone:[243],continent:"AF",capital:"Kinshasa",currency:["CDF"],languages:["fr","ln","kg","sw","lu"]},CF:{name:"Central African Republic",native:"Ködörösêse tî Bêafrîka",phone:[236],continent:"AF",capital:"Bangui",currency:["XAF"],languages:["fr","sg"]},CG:{name:"Republic of the Congo",native:"République du Congo",phone:[242],continent:"AF",capital:"Brazzaville",currency:["XAF"],languages:["fr","ln"]},CH:{name:"Switzerland",native:"Schweiz",phone:[41],continent:"EU",capital:"Bern",currency:["CHE","CHF","CHW"],languages:["de","fr","it"]},CI:{name:"Ivory Coast",native:"Côte d'Ivoire",phone:[225],continent:"AF",capital:"Yamoussoukro",currency:["XOF"],languages:["fr"]},CK:{name:"Cook Islands",native:"Cook Islands",phone:[682],continent:"OC",capital:"Avarua",currency:["NZD"],languages:["en"]},CL:{name:"Chile",native:"Chile",phone:[56],continent:"SA",capital:"Santiago",currency:["CLF","CLP"],languages:["es"]},CM:{name:"Cameroon",native:"Cameroon",phone:[237],continent:"AF",capital:"Yaoundé",currency:["XAF"],languages:["en","fr"]},CN:{name:"China",native:"中国",phone:[86],continent:"AS",capital:"Beijing",currency:["CNY"],languages:["zh"]},CO:{name:"Colombia",native:"Colombia",phone:[57],continent:"SA",capital:"Bogotá",currency:["COP"],languages:["es"]},CR:{name:"Costa Rica",native:"Costa Rica",phone:[506],continent:"NA",capital:"San José",currency:["CRC"],languages:["es"]},CU:{name:"Cuba",native:"Cuba",phone:[53],continent:"NA",capital:"Havana",currency:["CUC","CUP"],languages:["es"]},CV:{name:"Cape Verde",native:"Cabo Verde",phone:[238],continent:"AF",capital:"Praia",currency:["CVE"],languages:["pt"]},CW:{name:"Curacao",native:"Curaçao",phone:[5999],continent:"NA",capital:"Willemstad",currency:["ANG"],languages:["nl","pa","en"]},CX:{name:"Christmas Island",native:"Christmas Island",phone:[61],continent:"AS",capital:"Flying Fish Cove",currency:["AUD"],languages:["en"]},CY:{name:"Cyprus",native:"Κύπρος",phone:[357],continent:"EU",capital:"Nicosia",currency:["EUR"],languages:["el","tr","hy"]},CZ:{name:"Czech Republic",native:"Česká republika",phone:[420],continent:"EU",capital:"Prague",currency:["CZK"],languages:["cs"]},DE:{name:"Germany",native:"Deutschland",phone:[49],continent:"EU",capital:"Berlin",currency:["EUR"],languages:["de"]},DJ:{name:"Djibouti",native:"Djibouti",phone:[253],continent:"AF",capital:"Djibouti",currency:["DJF"],languages:["fr","ar"]},DK:{name:"Denmark",native:"Danmark",phone:[45],continent:"EU",continents:["EU","NA"],capital:"Copenhagen",currency:["DKK"],languages:["da"]},DM:{name:"Dominica",native:"Dominica",phone:[1767],continent:"NA",capital:"Roseau",currency:["XCD"],languages:["en"]},DO:{name:"Dominican Republic",native:"República Dominicana",phone:[1809,1829,1849],continent:"NA",capital:"Santo Domingo",currency:["DOP"],languages:["es"]},DZ:{name:"Algeria",native:"الجزائر",phone:[213],continent:"AF",capital:"Algiers",currency:["DZD"],languages:["ar"]},EC:{name:"Ecuador",native:"Ecuador",phone:[593],continent:"SA",capital:"Quito",currency:["USD"],languages:["es"]},EE:{name:"Estonia",native:"Eesti",phone:[372],continent:"EU",capital:"Tallinn",currency:["EUR"],languages:["et"]},EG:{name:"Egypt",native:"مصر‎",phone:[20],continent:"AF",continents:["AF","AS"],capital:"Cairo",currency:["EGP"],languages:["ar"]},EH:{name:"Western Sahara",native:"الصحراء الغربية",phone:[212],continent:"AF",capital:"El Aaiún",currency:["MAD","DZD","MRU"],languages:["es"]},ER:{name:"Eritrea",native:"ኤርትራ",phone:[291],continent:"AF",capital:"Asmara",currency:["ERN"],languages:["ti","ar","en"]},ES:{name:"Spain",native:"España",phone:[34],continent:"EU",capital:"Madrid",currency:["EUR"],languages:["es","eu","ca","gl","oc"]},ET:{name:"Ethiopia",native:"ኢትዮጵያ",phone:[251],continent:"AF",capital:"Addis Ababa",currency:["ETB"],languages:["am"]},FI:{name:"Finland",native:"Suomi",phone:[358],continent:"EU",capital:"Helsinki",currency:["EUR"],languages:["fi","sv"]},FJ:{name:"Fiji",native:"Fiji",phone:[679],continent:"OC",capital:"Suva",currency:["FJD"],languages:["en","fj","hi","ur"]},FK:{name:"Falkland Islands",native:"Falkland Islands",phone:[500],continent:"SA",capital:"Stanley",currency:["FKP"],languages:["en"]},FM:{name:"Micronesia",native:"Micronesia",phone:[691],continent:"OC",capital:"Palikir",currency:["USD"],languages:["en"]},FO:{name:"Faroe Islands",native:"Føroyar",phone:[298],continent:"EU",capital:"Tórshavn",currency:["DKK"],languages:["fo"]},FR:{name:"France",native:"France",phone:[33],continent:"EU",capital:"Paris",currency:["EUR"],languages:["fr"]},GA:{name:"Gabon",native:"Gabon",phone:[241],continent:"AF",capital:"Libreville",currency:["XAF"],languages:["fr"]},GB:{name:"United Kingdom",native:"United Kingdom",phone:[44],continent:"EU",capital:"London",currency:["GBP"],languages:["en"]},GD:{name:"Grenada",native:"Grenada",phone:[1473],continent:"NA",capital:"St. George's",currency:["XCD"],languages:["en"]},GE:{name:"Georgia",native:"საქართველო",phone:[995],continent:"AS",continents:["AS","EU"],capital:"Tbilisi",currency:["GEL"],languages:["ka"]},GF:{name:"French Guiana",native:"Guyane française",phone:[594],continent:"SA",capital:"Cayenne",currency:["EUR"],languages:["fr"]},GG:{name:"Guernsey",native:"Guernsey",phone:[44],continent:"EU",capital:"St. Peter Port",currency:["GBP"],languages:["en","fr"]},GH:{name:"Ghana",native:"Ghana",phone:[233],continent:"AF",capital:"Accra",currency:["GHS"],languages:["en"]},GI:{name:"Gibraltar",native:"Gibraltar",phone:[350],continent:"EU",capital:"Gibraltar",currency:["GIP"],languages:["en"]},GL:{name:"Greenland",native:"Kalaallit Nunaat",phone:[299],continent:"NA",capital:"Nuuk",currency:["DKK"],languages:["kl"]},GM:{name:"Gambia",native:"Gambia",phone:[220],continent:"AF",capital:"Banjul",currency:["GMD"],languages:["en"]},GN:{name:"Guinea",native:"Guinée",phone:[224],continent:"AF",capital:"Conakry",currency:["GNF"],languages:["fr","ff"]},GP:{name:"Guadeloupe",native:"Guadeloupe",phone:[590],continent:"NA",capital:"Basse-Terre",currency:["EUR"],languages:["fr"]},GQ:{name:"Equatorial Guinea",native:"Guinea Ecuatorial",phone:[240],continent:"AF",capital:"Malabo",currency:["XAF"],languages:["es","fr"]},GR:{name:"Greece",native:"Ελλάδα",phone:[30],continent:"EU",capital:"Athens",currency:["EUR"],languages:["el"]},GS:{name:"South Georgia and the South Sandwich Islands",native:"South Georgia",phone:[500],continent:"AN",capital:"King Edward Point",currency:["GBP"],languages:["en"]},GT:{name:"Guatemala",native:"Guatemala",phone:[502],continent:"NA",capital:"Guatemala City",currency:["GTQ"],languages:["es"]},GU:{name:"Guam",native:"Guam",phone:[1671],continent:"OC",capital:"Hagåtña",currency:["USD"],languages:["en","ch","es"]},GW:{name:"Guinea-Bissau",native:"Guiné-Bissau",phone:[245],continent:"AF",capital:"Bissau",currency:["XOF"],languages:["pt"]},GY:{name:"Guyana",native:"Guyana",phone:[592],continent:"SA",capital:"Georgetown",currency:["GYD"],languages:["en"]},HK:{name:"Hong Kong",native:"香港",phone:[852],continent:"AS",capital:"City of Victoria",currency:["HKD"],languages:["zh","en"]},HM:{name:"Heard Island and McDonald Islands",native:"Heard Island and McDonald Islands",phone:[61],continent:"AN",capital:"",currency:["AUD"],languages:["en"]},HN:{name:"Honduras",native:"Honduras",phone:[504],continent:"NA",capital:"Tegucigalpa",currency:["HNL"],languages:["es"]},HR:{name:"Croatia",native:"Hrvatska",phone:[385],continent:"EU",capital:"Zagreb",currency:["EUR"],languages:["hr"]},HT:{name:"Haiti",native:"Haïti",phone:[509],continent:"NA",capital:"Port-au-Prince",currency:["HTG","USD"],languages:["fr","ht"]},HU:{name:"Hungary",native:"Magyarország",phone:[36],continent:"EU",capital:"Budapest",currency:["HUF"],languages:["hu"]},ID:{name:"Indonesia",native:"Indonesia",phone:[62],continent:"AS",capital:"Jakarta",currency:["IDR"],languages:["id"]},IE:{name:"Ireland",native:"Éire",phone:[353],continent:"EU",capital:"Dublin",currency:["EUR"],languages:["ga","en"]},IL:{name:"Israel",native:"יִשְׂרָאֵל",phone:[972],continent:"AS",capital:"Jerusalem",currency:["ILS"],languages:["he","ar"]},IM:{name:"Isle of Man",native:"Isle of Man",phone:[44],continent:"EU",capital:"Douglas",currency:["GBP"],languages:["en","gv"]},IN:{name:"India",native:"भारत",phone:[91],continent:"AS",capital:"New Delhi",currency:["INR"],languages:["hi","en"]},IO:{name:"British Indian Ocean Territory",native:"British Indian Ocean Territory",phone:[246],continent:"AS",capital:"Diego Garcia",currency:["USD"],languages:["en"]},IQ:{name:"Iraq",native:"العراق",phone:[964],continent:"AS",capital:"Baghdad",currency:["IQD"],languages:["ar","ku"]},IR:{name:"Iran",native:"ایران",phone:[98],continent:"AS",capital:"Tehran",currency:["IRR"],languages:["fa"]},IS:{name:"Iceland",native:"Ísland",phone:[354],continent:"EU",capital:"Reykjavik",currency:["ISK"],languages:["is"]},IT:{name:"Italy",native:"Italia",phone:[39],continent:"EU",capital:"Rome",currency:["EUR"],languages:["it"]},JE:{name:"Jersey",native:"Jersey",phone:[44],continent:"EU",capital:"Saint Helier",currency:["GBP"],languages:["en","fr"]},JM:{name:"Jamaica",native:"Jamaica",phone:[1876],continent:"NA",capital:"Kingston",currency:["JMD"],languages:["en"]},JO:{name:"Jordan",native:"الأردن",phone:[962],continent:"AS",capital:"Amman",currency:["JOD"],languages:["ar"]},JP:{name:"Japan",native:"日本",phone:[81],continent:"AS",capital:"Tokyo",currency:["JPY"],languages:["ja"]},KE:{name:"Kenya",native:"Kenya",phone:[254],continent:"AF",capital:"Nairobi",currency:["KES"],languages:["en","sw"]},KG:{name:"Kyrgyzstan",native:"Кыргызстан",phone:[996],continent:"AS",capital:"Bishkek",currency:["KGS"],languages:["ky","ru"]},KH:{name:"Cambodia",native:"Kâmpŭchéa",phone:[855],continent:"AS",capital:"Phnom Penh",currency:["KHR"],languages:["km"]},KI:{name:"Kiribati",native:"Kiribati",phone:[686],continent:"OC",capital:"South Tarawa",currency:["AUD"],languages:["en"]},KM:{name:"Comoros",native:"Komori",phone:[269],continent:"AF",capital:"Moroni",currency:["KMF"],languages:["ar","fr"]},KN:{name:"Saint Kitts and Nevis",native:"Saint Kitts and Nevis",phone:[1869],continent:"NA",capital:"Basseterre",currency:["XCD"],languages:["en"]},KP:{name:"North Korea",native:"북한",phone:[850],continent:"AS",capital:"Pyongyang",currency:["KPW"],languages:["ko"]},KR:{name:"South Korea",native:"대한민국",phone:[82],continent:"AS",capital:"Seoul",currency:["KRW"],languages:["ko"]},KW:{name:"Kuwait",native:"الكويت",phone:[965],continent:"AS",capital:"Kuwait City",currency:["KWD"],languages:["ar"]},KY:{name:"Cayman Islands",native:"Cayman Islands",phone:[1345],continent:"NA",capital:"George Town",currency:["KYD"],languages:["en"]},KZ:{name:"Kazakhstan",native:"Қазақстан",phone:[7],continent:"AS",continents:["AS","EU"],capital:"Astana",currency:["KZT"],languages:["kk","ru"]},LA:{name:"Laos",native:"ສປປລາວ",phone:[856],continent:"AS",capital:"Vientiane",currency:["LAK"],languages:["lo"]},LB:{name:"Lebanon",native:"لبنان",phone:[961],continent:"AS",capital:"Beirut",currency:["LBP"],languages:["ar","fr"]},LC:{name:"Saint Lucia",native:"Saint Lucia",phone:[1758],continent:"NA",capital:"Castries",currency:["XCD"],languages:["en"]},LI:{name:"Liechtenstein",native:"Liechtenstein",phone:[423],continent:"EU",capital:"Vaduz",currency:["CHF"],languages:["de"]},LK:{name:"Sri Lanka",native:"śrī laṃkāva",phone:[94],continent:"AS",capital:"Colombo",currency:["LKR"],languages:["si","ta"]},LR:{name:"Liberia",native:"Liberia",phone:[231],continent:"AF",capital:"Monrovia",currency:["LRD"],languages:["en"]},LS:{name:"Lesotho",native:"Lesotho",phone:[266],continent:"AF",capital:"Maseru",currency:["LSL","ZAR"],languages:["en","st"]},LT:{name:"Lithuania",native:"Lietuva",phone:[370],continent:"EU",capital:"Vilnius",currency:["EUR"],languages:["lt"]},LU:{name:"Luxembourg",native:"Luxembourg",phone:[352],continent:"EU",capital:"Luxembourg",currency:["EUR"],languages:["fr","de","lb"]},LV:{name:"Latvia",native:"Latvija",phone:[371],continent:"EU",capital:"Riga",currency:["EUR"],languages:["lv"]},LY:{name:"Libya",native:"‏ليبيا",phone:[218],continent:"AF",capital:"Tripoli",currency:["LYD"],languages:["ar"]},MA:{name:"Morocco",native:"المغرب",phone:[212],continent:"AF",capital:"Rabat",currency:["MAD"],languages:["ar"]},MC:{name:"Monaco",native:"Monaco",phone:[377],continent:"EU",capital:"Monaco",currency:["EUR"],languages:["fr"]},MD:{name:"Moldova",native:"Moldova",phone:[373],continent:"EU",capital:"Chișinău",currency:["MDL"],languages:["ro"]},ME:{name:"Montenegro",native:"Црна Гора",phone:[382],continent:"EU",capital:"Podgorica",currency:["EUR"],languages:["sr","bs","sq","hr"]},MF:{name:"Saint Martin",native:"Saint-Martin",phone:[590],continent:"NA",capital:"Marigot",currency:["EUR"],languages:["en","fr","nl"]},MG:{name:"Madagascar",native:"Madagasikara",phone:[261],continent:"AF",capital:"Antananarivo",currency:["MGA"],languages:["fr","mg"]},MH:{name:"Marshall Islands",native:"M̧ajeļ",phone:[692],continent:"OC",capital:"Majuro",currency:["USD"],languages:["en","mh"]},MK:{name:"North Macedonia",native:"Северна Македонија",phone:[389],continent:"EU",capital:"Skopje",currency:["MKD"],languages:["mk"]},ML:{name:"Mali",native:"Mali",phone:[223],continent:"AF",capital:"Bamako",currency:["XOF"],languages:["fr"]},MM:{name:"Myanmar (Burma)",native:"မြန်မာ",phone:[95],continent:"AS",capital:"Naypyidaw",currency:["MMK"],languages:["my"]},MN:{name:"Mongolia",native:"Монгол улс",phone:[976],continent:"AS",capital:"Ulan Bator",currency:["MNT"],languages:["mn"]},MO:{name:"Macao",native:"澳門",phone:[853],continent:"AS",capital:"",currency:["MOP"],languages:["zh","pt"]},MP:{name:"Northern Mariana Islands",native:"Northern Mariana Islands",phone:[1670],continent:"OC",capital:"Saipan",currency:["USD"],languages:["en","ch"]},MQ:{name:"Martinique",native:"Martinique",phone:[596],continent:"NA",capital:"Fort-de-France",currency:["EUR"],languages:["fr"]},MR:{name:"Mauritania",native:"موريتانيا",phone:[222],continent:"AF",capital:"Nouakchott",currency:["MRU"],languages:["ar"]},MS:{name:"Montserrat",native:"Montserrat",phone:[1664],continent:"NA",capital:"Plymouth",currency:["XCD"],languages:["en"]},MT:{name:"Malta",native:"Malta",phone:[356],continent:"EU",capital:"Valletta",currency:["EUR"],languages:["mt","en"]},MU:{name:"Mauritius",native:"Maurice",phone:[230],continent:"AF",capital:"Port Louis",currency:["MUR"],languages:["en"]},MV:{name:"Maldives",native:"Maldives",phone:[960],continent:"AS",capital:"Malé",currency:["MVR"],languages:["dv"]},MW:{name:"Malawi",native:"Malawi",phone:[265],continent:"AF",capital:"Lilongwe",currency:["MWK"],languages:["en","ny"]},MX:{name:"Mexico",native:"México",phone:[52],continent:"NA",capital:"Mexico City",currency:["MXN"],languages:["es"]},MY:{name:"Malaysia",native:"Malaysia",phone:[60],continent:"AS",capital:"Kuala Lumpur",currency:["MYR"],languages:["ms"]},MZ:{name:"Mozambique",native:"Moçambique",phone:[258],continent:"AF",capital:"Maputo",currency:["MZN"],languages:["pt"]},NA:{name:"Namibia",native:"Namibia",phone:[264],continent:"AF",capital:"Windhoek",currency:["NAD","ZAR"],languages:["en","af"]},NC:{name:"New Caledonia",native:"Nouvelle-Calédonie",phone:[687],continent:"OC",capital:"Nouméa",currency:["XPF"],languages:["fr"]},NE:{name:"Niger",native:"Niger",phone:[227],continent:"AF",capital:"Niamey",currency:["XOF"],languages:["fr"]},NF:{name:"Norfolk Island",native:"Norfolk Island",phone:[672],continent:"OC",capital:"Kingston",currency:["AUD"],languages:["en"]},NG:{name:"Nigeria",native:"Nigeria",phone:[234],continent:"AF",capital:"Abuja",currency:["NGN"],languages:["en"]},NI:{name:"Nicaragua",native:"Nicaragua",phone:[505],continent:"NA",capital:"Managua",currency:["NIO"],languages:["es"]},NL:{name:"Netherlands",native:"Nederland",phone:[31],continent:"EU",capital:"Amsterdam",currency:["EUR"],languages:["nl"]},NO:{name:"Norway",native:"Norge",phone:[47],continent:"EU",capital:"Oslo",currency:["NOK"],languages:["no","nb","nn"]},NP:{name:"Nepal",native:"नेपाल",phone:[977],continent:"AS",capital:"Kathmandu",currency:["NPR"],languages:["ne"]},NR:{name:"Nauru",native:"Nauru",phone:[674],continent:"OC",capital:"Yaren",currency:["AUD"],languages:["en","na"]},NU:{name:"Niue",native:"Niuē",phone:[683],continent:"OC",capital:"Alofi",currency:["NZD"],languages:["en"]},NZ:{name:"New Zealand",native:"New Zealand",phone:[64],continent:"OC",capital:"Wellington",currency:["NZD"],languages:["en","mi"]},OM:{name:"Oman",native:"عمان",phone:[968],continent:"AS",capital:"Muscat",currency:["OMR"],languages:["ar"]},PA:{name:"Panama",native:"Panamá",phone:[507],continent:"NA",capital:"Panama City",currency:["PAB","USD"],languages:["es"]},PE:{name:"Peru",native:"Perú",phone:[51],continent:"SA",capital:"Lima",currency:["PEN"],languages:["es"]},PF:{name:"French Polynesia",native:"Polynésie française",phone:[689],continent:"OC",capital:"Papeetē",currency:["XPF"],languages:["fr"]},PG:{name:"Papua New Guinea",native:"Papua Niugini",phone:[675],continent:"OC",capital:"Port Moresby",currency:["PGK"],languages:["en"]},PH:{name:"Philippines",native:"Pilipinas",phone:[63],continent:"AS",capital:"Manila",currency:["PHP"],languages:["en"]},PK:{name:"Pakistan",native:"Pakistan",phone:[92],continent:"AS",capital:"Islamabad",currency:["PKR"],languages:["en","ur"]},PL:{name:"Poland",native:"Polska",phone:[48],continent:"EU",capital:"Warsaw",currency:["PLN"],languages:["pl"]},PM:{name:"Saint Pierre and Miquelon",native:"Saint-Pierre-et-Miquelon",phone:[508],continent:"NA",capital:"Saint-Pierre",currency:["EUR"],languages:["fr"]},PN:{name:"Pitcairn Islands",native:"Pitcairn Islands",phone:[64],continent:"OC",capital:"Adamstown",currency:["NZD"],languages:["en"]},PR:{name:"Puerto Rico",native:"Puerto Rico",phone:[1787,1939],continent:"NA",capital:"San Juan",currency:["USD"],languages:["es","en"]},PS:{name:"Palestine",native:"فلسطين",phone:[970],continent:"AS",capital:"Ramallah",currency:["ILS"],languages:["ar"]},PT:{name:"Portugal",native:"Portugal",phone:[351],continent:"EU",capital:"Lisbon",currency:["EUR"],languages:["pt"]},PW:{name:"Palau",native:"Palau",phone:[680],continent:"OC",capital:"Ngerulmud",currency:["USD"],languages:["en"]},PY:{name:"Paraguay",native:"Paraguay",phone:[595],continent:"SA",capital:"Asunción",currency:["PYG"],languages:["es","gn"]},QA:{name:"Qatar",native:"قطر",phone:[974],continent:"AS",capital:"Doha",currency:["QAR"],languages:["ar"]},RE:{name:"Reunion",native:"La Réunion",phone:[262],continent:"AF",capital:"Saint-Denis",currency:["EUR"],languages:["fr"]},RO:{name:"Romania",native:"România",phone:[40],continent:"EU",capital:"Bucharest",currency:["RON"],languages:["ro"]},RS:{name:"Serbia",native:"Србија",phone:[381],continent:"EU",capital:"Belgrade",currency:["RSD"],languages:["sr"]},RU:{name:"Russia",native:"Россия",phone:[7],continent:"AS",continents:["AS","EU"],capital:"Moscow",currency:["RUB"],languages:["ru"]},RW:{name:"Rwanda",native:"Rwanda",phone:[250],continent:"AF",capital:"Kigali",currency:["RWF"],languages:["rw","en","fr"]},SA:{name:"Saudi Arabia",native:"العربية السعودية",phone:[966],continent:"AS",capital:"Riyadh",currency:["SAR"],languages:["ar"]},SB:{name:"Solomon Islands",native:"Solomon Islands",phone:[677],continent:"OC",capital:"Honiara",currency:["SBD"],languages:["en"]},SC:{name:"Seychelles",native:"Seychelles",phone:[248],continent:"AF",capital:"Victoria",currency:["SCR"],languages:["fr","en"]},SD:{name:"Sudan",native:"السودان",phone:[249],continent:"AF",capital:"Khartoum",currency:["SDG"],languages:["ar","en"]},SE:{name:"Sweden",native:"Sverige",phone:[46],continent:"EU",capital:"Stockholm",currency:["SEK"],languages:["sv"]},SG:{name:"Singapore",native:"Singapore",phone:[65],continent:"AS",capital:"Singapore",currency:["SGD"],languages:["en","ms","ta","zh"]},SH:{name:"Saint Helena",native:"Saint Helena",phone:[290],continent:"AF",capital:"Jamestown",currency:["SHP"],languages:["en"]},SI:{name:"Slovenia",native:"Slovenija",phone:[386],continent:"EU",capital:"Ljubljana",currency:["EUR"],languages:["sl"]},SJ:{name:"Svalbard and Jan Mayen",native:"Svalbard og Jan Mayen",phone:[4779],continent:"EU",capital:"Longyearbyen",currency:["NOK"],languages:["no"]},SK:{name:"Slovakia",native:"Slovensko",phone:[421],continent:"EU",capital:"Bratislava",currency:["EUR"],languages:["sk"]},SL:{name:"Sierra Leone",native:"Sierra Leone",phone:[232],continent:"AF",capital:"Freetown",currency:["SLL"],languages:["en"]},SM:{name:"San Marino",native:"San Marino",phone:[378],continent:"EU",capital:"City of San Marino",currency:["EUR"],languages:["it"]},SN:{name:"Senegal",native:"Sénégal",phone:[221],continent:"AF",capital:"Dakar",currency:["XOF"],languages:["fr"]},SO:{name:"Somalia",native:"Soomaaliya",phone:[252],continent:"AF",capital:"Mogadishu",currency:["SOS"],languages:["so","ar"]},SR:{name:"Suriname",native:"Suriname",phone:[597],continent:"SA",capital:"Paramaribo",currency:["SRD"],languages:["nl"]},SS:{name:"South Sudan",native:"South Sudan",phone:[211],continent:"AF",capital:"Juba",currency:["SSP"],languages:["en"]},ST:{name:"Sao Tome and Principe",native:"São Tomé e Príncipe",phone:[239],continent:"AF",capital:"São Tomé",currency:["STN"],languages:["pt"]},SV:{name:"El Salvador",native:"El Salvador",phone:[503],continent:"NA",capital:"San Salvador",currency:["SVC","USD"],languages:["es"]},SX:{name:"Sint Maarten",native:"Sint Maarten",phone:[1721],continent:"NA",capital:"Philipsburg",currency:["ANG"],languages:["nl","en"]},SY:{name:"Syria",native:"سوريا",phone:[963],continent:"AS",capital:"Damascus",currency:["SYP"],languages:["ar"]},SZ:{name:"Eswatini",native:"Eswatini",phone:[268],continent:"AF",capital:"Lobamba",currency:["SZL"],languages:["en","ss"]},TC:{name:"Turks and Caicos Islands",native:"Turks and Caicos Islands",phone:[1649],continent:"NA",capital:"Cockburn Town",currency:["USD"],languages:["en"]},TD:{name:"Chad",native:"Tchad",phone:[235],continent:"AF",capital:"N'Djamena",currency:["XAF"],languages:["fr","ar"]},TF:{name:"French Southern Territories",native:"Territoire des Terres australes et antarctiques fr",phone:[262],continent:"AN",capital:"Port-aux-Français",currency:["EUR"],languages:["fr"]},TG:{name:"Togo",native:"Togo",phone:[228],continent:"AF",capital:"Lomé",currency:["XOF"],languages:["fr"]},TH:{name:"Thailand",native:"ประเทศไทย",phone:[66],continent:"AS",capital:"Bangkok",currency:["THB"],languages:["th"]},TJ:{name:"Tajikistan",native:"Тоҷикистон",phone:[992],continent:"AS",capital:"Dushanbe",currency:["TJS"],languages:["tg","ru"]},TK:{name:"Tokelau",native:"Tokelau",phone:[690],continent:"OC",capital:"Fakaofo",currency:["NZD"],languages:["en"]},TL:{name:"East Timor",native:"Timor-Leste",phone:[670],continent:"OC",capital:"Dili",currency:["USD"],languages:["pt"]},TM:{name:"Turkmenistan",native:"Türkmenistan",phone:[993],continent:"AS",capital:"Ashgabat",currency:["TMT"],languages:["tk","ru"]},TN:{name:"Tunisia",native:"تونس",phone:[216],continent:"AF",capital:"Tunis",currency:["TND"],languages:["ar"]},TO:{name:"Tonga",native:"Tonga",phone:[676],continent:"OC",capital:"Nuku'alofa",currency:["TOP"],languages:["en","to"]},TR:{name:"Turkey",native:"Türkiye",phone:[90],continent:"AS",continents:["AS","EU"],capital:"Ankara",currency:["TRY"],languages:["tr"]},TT:{name:"Trinidad and Tobago",native:"Trinidad and Tobago",phone:[1868],continent:"NA",capital:"Port of Spain",currency:["TTD"],languages:["en"]},TV:{name:"Tuvalu",native:"Tuvalu",phone:[688],continent:"OC",capital:"Funafuti",currency:["AUD"],languages:["en"]},TW:{name:"Taiwan",native:"臺灣",phone:[886],continent:"AS",capital:"Taipei",currency:["TWD"],languages:["zh"]},TZ:{name:"Tanzania",native:"Tanzania",phone:[255],continent:"AF",capital:"Dodoma",currency:["TZS"],languages:["sw","en"]},UA:{name:"Ukraine",native:"Україна",phone:[380],continent:"EU",capital:"Kyiv",currency:["UAH"],languages:["uk"]},UG:{name:"Uganda",native:"Uganda",phone:[256],continent:"AF",capital:"Kampala",currency:["UGX"],languages:["en","sw"]},UM:{name:"U.S. Minor Outlying Islands",native:"United States Minor Outlying Islands",phone:[1],continent:"OC",capital:"",currency:["USD"],languages:["en"]},US:{name:"United States",native:"United States",phone:[1],continent:"NA",capital:"Washington D.C.",currency:["USD","USN","USS"],languages:["en"]},UY:{name:"Uruguay",native:"Uruguay",phone:[598],continent:"SA",capital:"Montevideo",currency:["UYI","UYU"],languages:["es"]},UZ:{name:"Uzbekistan",native:"O'zbekiston",phone:[998],continent:"AS",capital:"Tashkent",currency:["UZS"],languages:["uz","ru"]},VA:{name:"Vatican City",native:"Vaticano",phone:[379],continent:"EU",capital:"Vatican City",currency:["EUR"],languages:["it","la"]},VC:{name:"Saint Vincent and the Grenadines",native:"Saint Vincent and the Grenadines",phone:[1784],continent:"NA",capital:"Kingstown",currency:["XCD"],languages:["en"]},VE:{name:"Venezuela",native:"Venezuela",phone:[58],continent:"SA",capital:"Caracas",currency:["VES"],languages:["es"]},VG:{name:"British Virgin Islands",native:"British Virgin Islands",phone:[1284],continent:"NA",capital:"Road Town",currency:["USD"],languages:["en"]},VI:{name:"U.S. Virgin Islands",native:"United States Virgin Islands",phone:[1340],continent:"NA",capital:"Charlotte Amalie",currency:["USD"],languages:["en"]},VN:{name:"Vietnam",native:"Việt Nam",phone:[84],continent:"AS",capital:"Hanoi",currency:["VND"],languages:["vi"]},VU:{name:"Vanuatu",native:"Vanuatu",phone:[678],continent:"OC",capital:"Port Vila",currency:["VUV"],languages:["bi","en","fr"]},WF:{name:"Wallis and Futuna",native:"Wallis et Futuna",phone:[681],continent:"OC",capital:"Mata-Utu",currency:["XPF"],languages:["fr"]},WS:{name:"Samoa",native:"Samoa",phone:[685],continent:"OC",capital:"Apia",currency:["WST"],languages:["sm","en"]},XK:{name:"Kosovo",native:"Republika e Kosovës",phone:[377,381,383,386],continent:"EU",capital:"Pristina",currency:["EUR"],languages:["sq","sr"],userAssigned:!0},YE:{name:"Yemen",native:"اليَمَن",phone:[967],continent:"AS",capital:"Sana'a",currency:["YER"],languages:["ar"]},YT:{name:"Mayotte",native:"Mayotte",phone:[262],continent:"AF",capital:"Mamoudzou",currency:["EUR"],languages:["fr"]},ZA:{name:"South Africa",native:"South Africa",phone:[27],continent:"AF",capital:"Pretoria",currency:["ZAR"],languages:["af","en","nr","st","ss","tn","ts","ve","xh","zu"]},ZM:{name:"Zambia",native:"Zambia",phone:[260],continent:"AF",capital:"Lusaka",currency:["ZMW"],languages:["en"]},ZW:{name:"Zimbabwe",native:"Zimbabwe",phone:[263],continent:"AF",capital:"Harare",currency:["USD","ZAR","BWP","GBP","AUD","CNY","INR","JPY"],languages:["en","sn","nd"]}},X={AD:"AND",AE:"ARE",AF:"AFG",AG:"ATG",AI:"AIA",AL:"ALB",AM:"ARM",AO:"AGO",AQ:"ATA",AR:"ARG",AS:"ASM",AT:"AUT",AU:"AUS",AW:"ABW",AX:"ALA",AZ:"AZE",BA:"BIH",BB:"BRB",BD:"BGD",BE:"BEL",BF:"BFA",BG:"BGR",BH:"BHR",BI:"BDI",BJ:"BEN",BL:"BLM",BM:"BMU",BN:"BRN",BO:"BOL",BQ:"BES",BR:"BRA",BS:"BHS",BT:"BTN",BV:"BVT",BW:"BWA",BY:"BLR",BZ:"BLZ",CA:"CAN",CC:"CCK",CD:"COD",CF:"CAF",CG:"COG",CH:"CHE",CI:"CIV",CK:"COK",CL:"CHL",CM:"CMR",CN:"CHN",CO:"COL",CR:"CRI",CU:"CUB",CV:"CPV",CW:"CUW",CX:"CXR",CY:"CYP",CZ:"CZE",DE:"DEU",DJ:"DJI",DK:"DNK",DM:"DMA",DO:"DOM",DZ:"DZA",EC:"ECU",EE:"EST",EG:"EGY",EH:"ESH",ER:"ERI",ES:"ESP",ET:"ETH",FI:"FIN",FJ:"FJI",FK:"FLK",FM:"FSM",FO:"FRO",FR:"FRA",GA:"GAB",GB:"GBR",GD:"GRD",GE:"GEO",GF:"GUF",GG:"GGY",GH:"GHA",GI:"GIB",GL:"GRL",GM:"GMB",GN:"GIN",GP:"GLP",GQ:"GNQ",GR:"GRC",GS:"SGS",GT:"GTM",GU:"GUM",GW:"GNB",GY:"GUY",HK:"HKG",HM:"HMD",HN:"HND",HR:"HRV",HT:"HTI",HU:"HUN",ID:"IDN",IE:"IRL",IL:"ISR",IM:"IMN",IN:"IND",IO:"IOT",IQ:"IRQ",IR:"IRN",IS:"ISL",IT:"ITA",JE:"JEY",JM:"JAM",JO:"JOR",JP:"JPN",KE:"KEN",KG:"KGZ",KH:"KHM",KI:"KIR",KM:"COM",KN:"KNA",KP:"PRK",KR:"KOR",KW:"KWT",KY:"CYM",KZ:"KAZ",LA:"LAO",LB:"LBN",LC:"LCA",LI:"LIE",LK:"LKA",LR:"LBR",LS:"LSO",LT:"LTU",LU:"LUX",LV:"LVA",LY:"LBY",MA:"MAR",MC:"MCO",MD:"MDA",ME:"MNE",MF:"MAF",MG:"MDG",MH:"MHL",MK:"MKD",ML:"MLI",MM:"MMR",MN:"MNG",MO:"MAC",MP:"MNP",MQ:"MTQ",MR:"MRT",MS:"MSR",MT:"MLT",MU:"MUS",MV:"MDV",MW:"MWI",MX:"MEX",MY:"MYS",MZ:"MOZ",NA:"NAM",NC:"NCL",NE:"NER",NF:"NFK",NG:"NGA",NI:"NIC",NL:"NLD",NO:"NOR",NP:"NPL",NR:"NRU",NU:"NIU",NZ:"NZL",OM:"OMN",PA:"PAN",PE:"PER",PF:"PYF",PG:"PNG",PH:"PHL",PK:"PAK",PL:"POL",PM:"SPM",PN:"PCN",PR:"PRI",PS:"PSE",PT:"PRT",PW:"PLW",PY:"PRY",QA:"QAT",RE:"REU",RO:"ROU",RS:"SRB",RU:"RUS",RW:"RWA",SA:"SAU",SB:"SLB",SC:"SYC",SD:"SDN",SE:"SWE",SG:"SGP",SH:"SHN",SI:"SVN",SJ:"SJM",SK:"SVK",SL:"SLE",SM:"SMR",SN:"SEN",SO:"SOM",SR:"SUR",SS:"SSD",ST:"STP",SV:"SLV",SX:"SXM",SY:"SYR",SZ:"SWZ",TC:"TCA",TD:"TCD",TF:"ATF",TG:"TGO",TH:"THA",TJ:"TJK",TK:"TKL",TL:"TLS",TM:"TKM",TN:"TUN",TO:"TON",TR:"TUR",TT:"TTO",TV:"TUV",TW:"TWN",TZ:"TZA",UA:"UKR",UG:"UGA",UM:"UMI",US:"USA",UY:"URY",UZ:"UZB",VA:"VAT",VC:"VCT",VE:"VEN",VG:"VGB",VI:"VIR",VN:"VNM",VU:"VUT",WF:"WLF",WS:"WSM",XK:"XKX",YE:"YEM",YT:"MYT",ZA:"ZAF",ZM:"ZMB",ZW:"ZWE"},q=r=>({...L[r],iso2:r,iso3:X[r]}),Q=()=>Object.keys(L).map(r=>q(r));Q();const sa=({data:r,step:c,errors:e,onChange:t})=>{const[m,d]=g.useState(!1),[s,h]=g.useState(""),[v,B]=g.useState([]),[y,A]=g.useState(""),x=g.useRef(null),k=g.useRef(null);g.useEffect(()=>{const a=Object.entries(L).map(([u,l])=>({code:u,name:l.name,native:l.native})).sort((u,l)=>u.name.localeCompare(l.name));if(B(a),r.warneg){const u=a.find(l=>l.code===r.warneg);A((u==null?void 0:u.name)||"")}},[r.warneg]);const E=g.useCallback(()=>v.filter(a=>`${a.name} ${a.native} ${a.code}`.toLowerCase().includes(s.toLowerCase())),[v,s]);g.useEffect(()=>{const a=u=>{x.current&&!x.current.contains(u.target)&&d(!1)};return document.addEventListener("mousedown",a),()=>document.removeEventListener("mousedown",a)},[]);const b=a=>{t==null||t("warneg",a.code),t==null||t("warnegName",a.name),A(a.name),d(!1),h(""),a.code!=="ID"&&(t==null||t("temtin","0"))},f=a=>{const u=a.target.value;if(A(u),h(u),d(!0),r.warneg){const l=v.find(p=>p.code===r.warneg);(!l||!u.includes(l.name))&&(t==null||t("warneg",""),t==null||t("warnegName",""))}},i=a=>{(a.key==="Backspace"||a.key==="Delete")&&r.warneg&&(m||(d(!0),h(""),A(""),t==null||t("warneg",""),t==null||t("warnegName","")))};return n.jsx(R,{title:"Informasi Pribadi",children:n.jsxs("div",{className:"space-y-4 bg-gray-50 p-6 rounded-lg",children:[n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-1 relative",children:[n.jsx("label",{htmlFor:"warneg",className:N("block text-sm font-medium text-gray-700",y.trim()&&!r.warneg&&"text-red-500"),children:"Kewarganegaraan *"}),n.jsxs("div",{className:"relative",ref:x,children:[n.jsx("input",{id:"warneg",type:"text",ref:k,className:N("w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-primary",(e==null?void 0:e.warneg)&&"border-red-500",y.trim()&&!r.warneg&&"border-2 border-red-500"),value:y||s,onFocus:()=>d(!0),onChange:a=>f(a),onKeyDown:i,placeholder:"Pilih negara",required:!0}),m&&n.jsx("div",{className:"absolute z-10 mt-1 w-full max-h-60 overflow-auto bg-white border border-gray-300 rounded-md shadow-lg",children:E().length>0?E().map(a=>n.jsx("div",{className:`px-3 py-2 hover:bg-gray-100 cursor-pointer ${r.warneg===a.code?"bg-primary text-white":""}`,onClick:()=>b(a),children:a.name},a.code)):n.jsx("div",{className:"px-3 py-2 text-gray-500",children:"Tidak ditemukan"})}),(e==null?void 0:e.warneg)&&n.jsxs("p",{className:"flex items-center gap-2 text-xs text-red-500 mt-1",children:[n.jsx(M,{className:"text-red-500 w-4 h-4"}),e==null?void 0:e.warneg]}),y.trim()&&!r.warneg&&n.jsxs("p",{className:"flex items-center gap-2 text-xs text-red-500 mt-1",children:[n.jsx(M,{className:"text-red-500 w-4 h-4"}),"Anda belum memilih Negara"]})]})]}),y.trim()&&r.warneg&&n.jsxs("div",{className:"space-y-1",children:[n.jsxs("label",{htmlFor:"nama",className:N("block text-sm font-medium text-gray-700",(e==null?void 0:e.nama)&&"text-red-500"),children:[c==="WNI"?"Nama sesuai KTP":"Nama Lengkap"," *"]}),n.jsx("input",{id:"nama",type:"text",className:N("w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-primary",(e==null?void 0:e.nama)&&"border-red-500"),value:r.nama,onChange:a=>{t==null||t("nama",a.target.value),t==null||t("nama",a.target.value)},required:!0}),(e==null?void 0:e.nama)&&n.jsxs("p",{className:"flex items-center gap-2 text-xs text-red-500 mt-1",children:[n.jsx(M,{className:"text-red-500 w-4 h-4"}),e==null?void 0:e.nama]})]})]}),c!==null&&(c==="WNI"?n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-1",children:[n.jsx("label",{htmlFor:"nik",className:N("block text-sm font-medium text-gray-700",(e==null?void 0:e.nik)&&"text-red-500"),children:"NIK *"}),n.jsx("input",{id:"nik",type:"text",pattern:"[0-9]*",inputMode:"numeric",className:N("w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-primary",(e==null?void 0:e.nik)&&"border-red-500"),value:r.nik,onChange:a=>{/^\d*$/.test(a.target.value)&&a.target.value.length<=16&&(t==null||t("nik",a.target.value)),t==null||t("nik",a.target.value)},minLength:16,maxLength:16,required:c==="WNI",title:"NIK harus 16 digit angka"}),(e==null?void 0:e.nik)&&n.jsxs("p",{className:"flex items-center gap-2 text-xs text-red-500 mt-1",children:[n.jsx(M,{className:"text-red-500 w-4 h-4"}),e==null?void 0:e.nik]})]}),n.jsxs("div",{className:"space-y-1",children:[n.jsx("label",{htmlFor:"kk",className:N("block text-sm font-medium text-gray-700",(e==null?void 0:e.kk)&&"text-red-500"),children:"Nomor KK"}),n.jsx("input",{id:"kk",type:"text",pattern:"[0-9]*",inputMode:"numeric",className:N("w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-primary",(e==null?void 0:e.kk)&&"border-red-500"),value:r.kk,onChange:a=>{/^\d*$/.test(a.target.value)&&a.target.value.length<=16&&(t==null||t("kk",a.target.value)),t==null||t("kk",a.target.value)},required:c==="WNI",minLength:16,maxLength:16,title:"Nomor KK harus 16 digit angka"}),(e==null?void 0:e.kk)&&n.jsxs("p",{className:"flex items-center gap-2 text-xs text-red-500 mt-1",children:[n.jsx(M,{className:"text-red-500 w-4 h-4"}),e==null?void 0:e.kk]})]})]}):n.jsxs("div",{className:"space-y-1",children:[n.jsx("label",{htmlFor:"paspor",className:N("block text-sm font-medium text-gray-700",(e==null?void 0:e.paspor)&&"text-red-500"),children:"Nomor Paspor *"}),n.jsx("input",{id:"paspor",type:"text",className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-primary",value:r.paspor,onChange:a=>{t==null||t("paspor",a.target.value),t==null||t("paspor",a.target.value)},required:c==="WNA"}),(e==null?void 0:e.paspor)&&n.jsxs("p",{className:"flex items-center gap-2 text-xs text-red-500 mt-1",children:[n.jsx(M,{className:"text-red-500 w-4 h-4"}),e==null?void 0:e.paspor]})]}))]})})},_={info:{bg:"bg-blue-50",border:"border-l-4 border-blue-500",text:"text-blue-700",icon:Z},warning:{bg:"bg-amber-50",border:"border-l-4 border-amber-500",text:"text-amber-700",icon:z},danger:{bg:"bg-red-50",border:"border-l-4 border-red-500",text:"text-red-700",icon:J},success:{bg:"bg-green-50",border:"border-l-4 border-green-500",text:"text-green-700",icon:V}},ga=({title:r,items:c,variant:e="info",description:t,showIcon:m=!0,showItemIcons:d=!0})=>{const{bg:s,border:h,text:v,icon:B}=_[e];return n.jsx("div",{className:`${s} ${h} ${v} p-4 rounded-lg mb-6`,children:n.jsxs("div",{className:"flex items-start gap-3",children:[m&&n.jsx(B,{className:"flex-shrink-0 mt-1",size:20}),n.jsxs("div",{className:"text-sm text-left flex-1",children:[n.jsx("h1",{className:"font-semibold mb-2",children:r}),t&&n.jsx("p",{className:"mb-3",children:t}),c.length>0&&n.jsx("ul",{className:"space-y-2",children:c.map((y,A)=>n.jsxs("li",{className:"flex items-start",children:[d&&n.jsx(O,{className:"flex-shrink-0 mt-1 mr-2",size:16}),y]},A))})]})]})})};export{la as A,oa as D,ga as I,ra as K,sa as P};
