PageSourceSearch

https://www.arabianranchesgolfclub.com/assets/Checkout-CouLj37o.js

js arabianranchesgolfclub.com collected 2026-10-04 08:21:43 UTC 22,950 bytes, 1 lines download raw bytes

1import{f as ee,j as e,m as ae,h as te}from"./index-DE7Jdl42.js";import{e as ne,i as se,b as o,N as re,L as ie}from"./react-vendor-BZz07tLZ.js";const oe=[["Afghanistan","af","+93"],["Åland Islands","ax","+358"],["Albania","al","+355"],["Algeria","dz","+213"],["American Samoa","as","+1684"],["Andorra","ad","+376"],["Angola","ao","+244"],["Anguilla","ai","+1264"],["Antigua and Barbuda","ag","+1268"],["Argentina","ar","+54"],["Armenia","am","+374"],["Aruba","aw","+297"],["Australia","au","+61"],["Austria","at","+43"],["Azerbaijan","az","+994"],["Bahamas","bs","+1242"],["Bahrain","bh","+973"],["Bangladesh","bd","+880"],["Barbados","bb","+1246"],["Belarus","by","+375"],["Belgium","be","+32"],["Belize","bz","+501"],["Benin","bj","+229"],["Bermuda","bm","+1441"],["Bhutan","bt","+975"],["Bolivia","bo","+591"],["Bonaire, Sint Eustatius and Saba","bq","+599"],["Bosnia and Herzegovina","ba","+387"],["Botswana","bw","+267"],["Brazil","br","+55"],["British Indian Ocean Territory","io","+246"],["Brunei Darussalam","bn","+673"],["Bulgaria","bg","+359"],["Burkina Faso","bf","+226"],["Burundi","bi","+257"],["Cambodia","kh","+855"],["Cameroon","cm","+237"],["Canada","ca","+1"],["Cape Verde","cv","+238"],["Cayman Islands","ky","+1345"],["Central African Republic","cf","+236"],["Chad","td","+235"],["Chile","cl","+56"],["China","cn","+86"],["Christmas Island","cx","+61"],["Cocos (Keeling) Islands","cc","+61"],["Colombia","co","+57"],["Comoros","km","+269"],["Congo","cg","+242"],["Congo, Democratic Republic of the","cd","+243"],["Cook Islands","ck","+682"],["Costa Rica","cr","+506"],["Côte d'Ivoire","ci","+225"],["Croatia","hr","+385"],["Cuba","cu","+53"],["Curaçao","cw","+599"],["Cyprus","cy","+357"],["Czech Republic","cz","+420"],["Denmark","dk","+45"],["Djibouti","dj","+253"],["Dominica","dm","+1767"],["Dominican Republic","do","+1809"],["Ecuador","ec","+593"],["Egypt","eg","+20"],["El Salvador","sv","+503"],["Equatorial Guinea","gq","+240"],["Eritrea","er","+291"],["Estonia","ee","+372"],["Eswatini","sz","+268"],["Ethiopia","et","+251"],["Falkland Islands","fk","+500"],["Faroe Islands","fo","+298"],["Fiji","fj","+679"],["Finland","fi","+358"],["France","fr","+33"],["French Guiana","gf","+594"],["French Polynesia","pf","+689"],["Gabon","ga","+241"],["Gambia","gm","+220"],["Georgia","ge","+995"],["Germany","de","+49"],["Ghana","gh","+233"],["Gibraltar","gi","+350"],["Greece","gr","+30"],["Greenland","gl","+299"],["Grenada","gd","+1473"],["Guadeloupe","gp","+590"],["Guam","gu","+1671"],["Guatemala","gt","+502"],["Guernsey","gg","+44"],["Guinea","gn","+224"],["Guinea-Bissau","gw","+245"],["Guyana","gy","+592"],["Haiti","ht","+509"],["Honduras","hn","+504"],["Hong Kong","hk","+852"],["Hungary","hu","+36"],["Iceland","is","+354"],["India","in","+91"],["Indonesia","id","+62"],["Iran","ir","+98"],["Iraq","iq","+964"],["Ireland","ie","+353"],["Isle of Man","im","+44"],["Israel","il","+972"],["Italy","it","+39"],["Jamaica","jm","+1876"],["Japan","jp","+81"],["Jersey","je","+44"],["Jordan","jo","+962"],["Kazakhstan","kz","+7"],["Kenya","ke","+254"],["Kiribati","ki","+686"],["Korea, North","kp","+850"],["Korea, South","kr","+82"],["Kuwait","kw","+965"],["Kyrgyzstan","kg","+996"],["Laos","la","+856"],["Latvia","lv","+371"],["Lebanon","lb","+961"],["Lesotho","ls","+266"],["Liberia","lr","+231"],["Libya","ly","+218"],["Liechtenstein","li","+423"],["Lithuania","lt","+370"],["Luxembourg","lu","+352"],["Macao","mo","+853"],["Madagascar","mg","+261"],["Malawi","mw","+265"],["Malaysia","my","+60"],["Maldives","mv","+960"],["Mali","ml","+223"],["Malta","mt","+356"],["Marshall Islands","mh","+692"],["Martinique","mq","+596"],["Mauritania","mr","+222"],["Mauritius","mu","+230"],["Mayotte","yt","+262"],["Mexico","mx","+52"],["Micronesia","fm","+691"],["Moldova","md","+373"],["Monaco","mc","+377"],["Mongolia","mn","+976"],["Montenegro","me","+382"],["Montserrat","ms","+1664"],["Morocco","ma","+212"],["Mozambique","mz","+258"],["Myanmar","mm","+95"],["Namibia","na","+264"],["Nauru","nr","+674"],["Nepal","np","+977"],["Netherlands","nl","+31"],["New Caledonia","nc","+687"],["New Zealand","nz","+64"],["Nicaragua","ni","+505"],["Niger","ne","+227"],["Nigeria","ng","+234"],["Niue","nu","+683"],["Norfolk Island","nf","+672"],["North Macedonia","mk","+389"],["Northern Mariana Islands","mp","+1670"],["Norway","no","+47"],["Oman","om","+968"],["Pakistan","pk","+92"],["Palau","pw","+680"],["Palestine","ps","+970"],["Panama","pa","+507"],["Papua New Guinea","pg","+675"],["Paraguay","py","+595"],["Peru","pe","+51"],["Philippines","ph","+63"],["Poland","pl","+48"],["Portugal","pt","+351"],["Puerto Rico","pr","+1787"],["Qatar","qa","+974"],["Réunion","re","+262"],["Romania","ro","+40"],["Russia","ru","+7"],["Rwanda","rw","+250"],["Saint Barthélemy","bl","+590"],["Saint Helena","sh","+290"],["Saint Kitts and Nevis","kn","+1869"],["Saint Lucia","lc","+1758"],["Saint Martin (French part)","mf","+590"],["Saint Pierre and Miquelon","pm","+508"],["Saint Vincent and the Grenadines","vc","+1784"],["Samoa","ws","+685"],["San Marino","sm","+378"],["Sao Tome and Principe","st","+239"],["Saudi Arabia","sa","+966"],["Senegal","sn","+221"],["Serbia","rs","+381"],["Seychelles","sc","+248"],["Sierra Leone","sl","+232"],["Singapore","sg","+65"],["Sint Maarten (Dutch part)","sx","+1721"],["Slovakia","sk","+421"],["Slovenia","si","+386"],["Solomon Islands","sb","+677"],["S
1omalia","so","+252"],["South Africa","za","+27"],["South Sudan","ss","+211"],["Spain","es","+34"],["Sri Lanka","lk","+94"],["Sudan","sd","+249"],["Suriname","sr","+597"],["Sweden","se","+46"],["Switzerland","ch","+41"],["Syria","sy","+963"],["Taiwan","tw","+886"],["Tajikistan","tj","+992"],["Tanzania","tz","+255"],["Thailand","th","+66"],["Timor-Leste","tl","+670"],["Togo","tg","+228"],["Tokelau","tk","+690"],["Tonga","to","+676"],["Trinidad and Tobago","tt","+1868"],["Tunisia","tn","+216"],["Turkey","tr","+90"],["Turkmenistan","tm","+993"],["Turks and Caicos Islands","tc","+1649"],["Tuvalu","tv","+688"],["Uganda","ug","+256"],["Ukraine","ua","+380"],["United Arab Emirates","ae","+971"],["United Kingdom","gb","+44"],["United States","us","+1"],["Uruguay","uy","+598"],["Uzbekistan","uz","+998"],["Vanuatu","vu","+678"],["Vatican City","va","+379"],["Venezuela","ve","+58"],["Vietnam","vn","+84"],["Virgin Islands (British)","vg","+1284"],["Virgin Islands (U.S.)","vi","+1340"],["Wallis and Futuna","wf","+681"],["Yemen","ye","+967"],["Zambia","zm","+260"],["Zimbabwe","zw","+263"]],D=oe.map(([t,r,i])=>({code:r,dial:i,label:`${t} (${i})`})),le="ae",N="iframeEHGCreditCard",v="ProcessCheckoutPayment",ce=1e4,de=250;function ue(){if(!(typeof document>"u"||typeof window>"u")){for(const t of Array.from(document.querySelectorAll('script[data-noon-checkout="1"]')))t.remove();Reflect.deleteProperty(window,v);for(const t of Array.from(document.querySelectorAll('[id^="np-lightBox"]')))t.remove();document.getElementById(N)?.remove()}}function me(){if(typeof document>"u"||document.getElementById(N))return;const t=document.createElement("div");t.id=N,t.style.position="fixed",t.style.inset="0",t.style.pointerEvents="none",t.style.zIndex="0",document.body.appendChild(t)}function pe(t){return new Promise((r,i)=>{if(typeof document>"u"){i(new Error("noon-lightbox: document is unavailable"));return}const l=document.querySelector(`script[data-noon-checkout="1"][src="${t}"]`);if(l){if(l.dataset.loaded==="1"){r();return}l.addEventListener("load",()=>r(),{once:!0}),l.addEventListener("error",()=>i(new Error("noon-lightbox: SDK script failed to load")),{once:!0});return}const s=document.createElement("script");s.src=t,s.async=!0,s.dataset.noonCheckout="1",s.addEventListener("load",()=>{s.dataset.loaded="1",r()},{once:!0}),s.addEventListener("error",()=>i(new Error("noon-lightbox: SDK script failed to load")),{once:!0}),document.head.appendChild(s)})}function he(t){return new Promise((r,i)=>{if(typeof window>"u"){i(new Error("noon-lightbox: window is unavailable"));return}const l=Date.now(),s=()=>{const g=window[v];if(typeof g=="function"){r(g);return}if(Date.now()-l>t){i(new Error(`noon-lightbox: SDK global "${v}" not available after ${t}ms`));return}window.setTimeout(s,de)};s()})}function xe(t){return new Promise((r,i)=>{(async()=>{try{ue(),me(),await pe(t.checkoutJsUrl),(await he(ce))({Checkout_Method:1,SecureVerification_Method:1,Frame_Id:N,Call_Back:s=>r(s??{})})}catch(l){i(l)}})()})}const ge="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAtCAYAAABYtc7wAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAABCQAAAQkBux2dpgAAABJ0RVh0U29mdHdhcmUAZXpnaWYuY29toMOzWAAADy1JREFUeJztm3t01dWVxz/7/G4eNzwrjKi1C3wVLXAD3JCAjszl3dyAtSoOVQjY1nGmOqBLqC7XjMXOuHQ6dYS6asUnSVqmNbRqgURoCBFrgYQbkhuxPoCiDh1QUZ553fv77fnj3hvuMw8RZrWL71pZK3fvsx+/s3/n/M4+Zx8ZVzTth0Y1G8ARtPPEkB/s3l3ZOa7QVyAqixC5FhgB5AIfIwRBXz52OLdsz57qDk4DY8f6BlvZ5iaQ2YqOAi4CHOAAEFRhnd3m+k0wuOnk6diJobBw2pAQOleQ2aBXARcCYYQDouxyYN2gPOelurq69r7oHV/kmyhqrj9Fke2B+s0vT5o0yd0Rds9HmAOMB4YCHQIfqmodhhcad2wJxOuS8YVTTwD9uigq80T4lqLf6MGP/WJ0XmD7lh19cR7A5/O5jraaewXuA77UQ/ODovww0FD7FKB9tQUwatTc7Nz+n96vqvcCA7tvrR+i8mBjQ+3q3ur3Tpj6Ty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TLvHnyZHvyJaZlQIeIPuHxl7d4SspqLEejl2bl0VhAHMm2fSgrgGOAUWhA9M6ReTnzYqurLqMbFrwuQgnodtDxwEhBV2d15kxDpUKgau7cF9MOWcfuvBFAoaqlan7G4gWxnD8KVArmrRSmyssClbg/S8jIbWSvQKUiKQlac9XC9WI7BdE8RgXyEQ6APuRW87dvv7Qw8Uw9K/uEQKWIplSrqNj7BSpVpSGN52ppeE4kaZWtAr+J5warSneI7XiJLLEvRmUysFeFm4NVC56NZeqhYFVpdqbO+aIQna/fA4ar4mupLn3tTNv8S8NZ3VzsHOa+FRiu0HAuGOlxNoutRYSlAIL8x9mz+5cFF1BDL28znQ7GFJd/HZWLQJpG9st5Od29sXOA/wOtUEnzTOc6UAAAADV0RVh0Q29tbWVudABDb252ZXJ0ZWQgd2l0aCBlemdpZi5jb20gU1ZHIHRvIFBORyBjb252ZXJ0ZXIsKeMjAAAAAElFTkSuQmCC",A=(t,r)=>new Intl.NumberFormat("en-AE",{style:"currency",currency:r.toUpperCase()}).format(t),be="pp_system_default",V=.05;function Ae(){const{cart:t,isLoading:r,setEmail:i,setBillingAddress:l,setCartMetadata:s,reset:g}=ee(),L=ne(),[G]=se(),K=G.get("payment_failed")==="1",[S,Z]=o.useState(""),[C,F]=o.useState(""),[k,X]=o.useState(""),[b,z]=o.useState(le),[B,H]=o.useState(""),[q,J]=o.useState(""),[E,Y]=o.useState(""),[O,M]=o.useState({}),[I,w]=o.useState(!1),[P,T]=o.useState(null),R=o.useMemo(()=>D.find(a=>a.code===b)?.dial??"+971",[b]);if(o.useEffect(()=>{t&&M(a=>{const n={};for(const c of t.items??[]){const m=Number(c.quantity??0),d=a[c.id]??[];n[c.id]=Array.from({length:m},(p,x)=>d[x]??"")}return n})},[t]),r)return e.jsx("div",{className:"pt-[150px] pb-16 max-w-3xl mx-auto px-4 text-gray-500",children:"Loading…"});if(!t||(t.items?.length??0)===0)return e.jsx(re,{to:"/cart",replace:!0});const f=t.currency_code??"aed",j=(t.items??[]).reduce((a,n)=>a+Number(n.unit_price??0)*Number(n.quantity??0),0),U=Math.round(j*(V/(1+V))*100)/100,Q=Math.round((j-U)*100)/100,W=(a,n,c)=>{M(m=>{const p=[...m[a]??[]];return p[n]=c,{...m,[a]:p}})},_=async a=>{a.preventDefault(),T(null),w(!0);try{const n=B.replace(/[^0-9]/g,"").replace(/^0+/,""),c=`${R}${n}`;await i(k),await l({first_name:S,last_name:C,phone:c,country_code:b}),await s({ube_membership_number:q.trim()||null,additional_info:E.trim()||null,guest_names_by_item:O}),await ae.store.payment.initiatePaymentSession(t,{provider_id:be});const{postUrl:m,noonCheckoutJsUrl:d,transactionUUID:p}=await te.initCheckout(t.id);if(d){const x=await xe({checkoutJsUrl:d}),$=new URLSearchParams({cart:t.id,txn:p,merchantReference:x.merchantReference??t.id,orderId:x.orderId??"",paymentType:x.paymentType??"",responseMessage:x.message??""});window.location.assign(`/checkout/success/?${$.toString()}`);return}window.location.href=m}catch(n){const c=n instanceof Error?n.message:"Checkout failed";if(/already completed/i.test(c)){g(),w(!1),L("/store",{replace:!0});return}console.error("checkout failed:",n),T("Payment is currently experiencing issues. Please try again shortly."),w(!1)}},u="w-full border border-gray-300 px-3 py-2.5 text-[14px] text-[#262626] focus:outline-none focus:border-[#339f9a]",h="block text-xs uppercase tracking-wider text-[#262626] mb-2",y="text-[18px] font-light text-[#262626] pb-2 border-b border-gray-200";return e.jsx("div",{className:"bg-white min-h-[calc(100vh-200px)] pt-[120px] pb-20",children:e.jsxs("div",{className:"max-w-5xl mx-auto px-4",children:[K&&e.jsx("div",{className:"border-t-4 border-[#b81c23] mb-6 pt-4",children:e.jsx("p",{className:"text-[#b81c23] text-[15px] m-0",children:"Thank y
1ou for shopping with us. However, the payment failed. Please try again."})}),e.jsx("h1",{className:"text-[34px] font-light text-[#262626] mb-8",children:"Checkout"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-10",children:[e.jsxs("form",{id:"checkout-form",onSubmit:_,className:"md:col-span-2 flex flex-col gap-8",children:[e.jsxs("section",{className:"bg-[#f7f7f7] p-5",children:[e.jsx("h2",{className:y,children:"Billing details"}),P&&e.jsx("p",{className:"bg-red-50 border border-red-200 text-red-800 px-4 py-2 text-sm mt-4",children:P}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 mt-5",children:[e.jsxs("label",{children:[e.jsxs("span",{className:h,children:["First name"," ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsx("input",{type:"text",required:!0,value:S,onChange:a=>Z(a.target.value),className:u})]}),e.jsxs("label",{children:[e.jsxs("span",{className:h,children:["Last name"," ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsx("input",{type:"text",required:!0,value:C,onChange:a=>F(a.target.value),className:u})]})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-[180px_1fr] gap-4 mt-4",children:[e.jsxs("label",{children:[e.jsxs("span",{className:h,children:["Country"," ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsx("select",{value:b,onChange:a=>z(a.target.value),className:u,children:D.map(a=>e.jsx("option",{value:a.code,children:a.label},a.code))})]}),e.jsxs("label",{children:[e.jsxs("span",{className:h,children:["Phone"," ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{className:"flex",children:[e.jsx("span",{className:"border border-r-0 border-gray-300 px-3 py-2.5 text-[14px] text-[#63666a] bg-white",children:R}),e.jsx("input",{type:"tel",required:!0,placeholder:"503998756",value:
1B,onChange:a=>H(a.target.value),className:`${u} flex-1`})]})]})]}),e.jsxs("label",{className:"block mt-4",children:[e.jsxs("span",{className:h,children:["Email address"," ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsx("input",{type:"email",required:!0,value:k,onChange:a=>X(a.target.value),className:u})]})]}),e.jsxs("section",{className:"bg-[#f7f7f7] p-5",children:[e.jsx("h2",{className:y,children:"Guest Details"}),e.jsx("div",{className:"flex flex-col gap-5 mt-5",children:(t.items??[]).map(a=>{const n=Number(a.quantity??0),c=O[a.id]??[];return e.jsxs("div",{children:[e.jsxs("p",{className:"text-[14px] text-[#262626] mb-1",children:[a.product_title,a.variant_title?` · ${a.variant_title}`:""]}),e.jsx("div",{className:"flex flex-col gap-3",children:Array.from({length:n}).map((m,d)=>e.jsxs("label",{children:[e.jsxs("span",{className:h,children:["Guest ",d+1]}),e.jsx("input",{type:"text",required:!0,value:c[d]??"",onChange:p=>W(a.id,d,p.target.value),className:u})]},`${a.id}-${d}`))})]},a.id)})})]}),e.jsxs("section",{className:"bg-[#f7f7f7] p-5",children:[e.jsxs("h2",{className:y,children:["U By Emaar Membership Number"," ",e.jsx("span",{className:"text-[13px] text-[#63666a] font-normal",children:"(Optional)"})]}),e.jsx("label",{className:"block mt-5",children:e.jsx("input",{type:"text",placeholder:"Enter your U By Emaar Membership Number",value:q,onChange:a=>J(a.target.value),className:u})})]}),e.jsxs("section",{className:"bg-[#f7f7f7] p-5",children:[e.jsx("h2",{className:y,children:"Additional information"}),e.jsx("label",{className:"block mt-5",children:e.jsx("textarea",{rows:4,value:E,onChange:a=>Y(a.target.value),className:`${u} resize-none`})})]})]}),e.jsxs("aside",{className:"border border-gray-200 p-6 h-fit",children:[e.jsx("h2",{className:"text-[18px] font-light text-[#262626] pb-2 border-b border-gray-200 mb-4",children:"Order Summary"}),e.jsx("ul",{className:"list-none m-0 p-0",children:(t.items??[]).map(a=>e.jsxs("li",{className:"flex justify-between gap-4 py-3 border-b border-gray-100 text-[14px]",children:[e.jsxs("span",{className:"text-[#262626]",children:[a.product_title,a.variant_title?` · ${a.variant_title}`:"",e.jsxs("span",{className:"text-[#63666a]",children:[" ","× ",a.quantity]})]}),e.jsx("span",{className:"text-[#262626] whitespace-nowrap font-medium",children:A(Number(a.unit_price??0)*Number(a.quantity??0),f)})]},a.id))}),e.jsxs("div",{className:"flex justify-between mt-5 text-[14px]",children:[e.jsx("span",{className:"text-[#63666a]",children:"Subtotal"}),e.jsx("span",{className:"text-[#262626] font-medium",children:A(Q,f)})]}),e.jsxs("div",{className:"flex justify-between mt-3 text-[14px]",children:[e.jsx("span",{className:"text-[#63666a]",children:"VAT"}),e.jsx("span",{className:"text-[#262626] font-medium",children:A(U,f)})]}),e.jsxs("div",{className:"flex justify-between items-baseline mt-4 pt-4 border-t border-gray-200",children:[e.jsx("span",{className:"text-[15px] text-[#262626]",children:"Total"}),e.jsx("span",{className:"text-[20px] text-[#262626] font-medium",children:A(j,f)}
1)]}),e.jsxs("div",{className:"mt-6 pt-5 border-t border-gray-200",children:[e.jsxs("label",{className:"flex items-center justify-between gap-3 cursor-pointer",children:[e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"radio",checked:!0,readOnly:!0,name:"payment_method",className:"accent-[#339f9a]"}),e.jsx("span",{className:"text-[14px] text-[#262626]",children:"noonpay"})]}),e.jsx("img",{src:ge,alt:"noon payments",width:80,height:36,className:"h-9 w-auto"})]}),e.jsx("p",{className:"bg-gray-50 text-[12px] text-[#63666a] px-3 py-2.5 mt-3 leading-[1.5]",children:"Pay securely through noon payments."})]}),e.jsxs("p",{className:"text-[12px] text-[#63666a] mt-4 leading-[1.5]",children:["Your personal data will be used to process your order, support your experience throughout this website, and for other purposes described in our"," ",e.jsx("a",{href:"https://www.arabianranchesgolfclub.com/privacy-policy/",target:"_blank",rel:"noopener noreferrer",className:"text-[#339f9a] underline",children:"privacy policy"}),"."]}),e.jsx("button",{type:"submit",form:"checkout-form",disabled:I,className:"block w-full bg-[#339f9a] text-white px-8 h-12 uppercase tracking-wider text-sm font-medium hover:bg-[#2c8a86] disabled:opacity-50 mt-5",children:I?"Opening payment…":"Place order"}),e.jsx(ie,{to:"/cart",className:"block text-[13px] text-[#63666a] hover:text-[#339f9a] mt-4",children:"← Back to cart"})]})]})]})})}export{Ae as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.