PageSourceSearch

https://mangia.lamanna.com.au/_next/static/chunks/pages/gifting/co…/RecipientDetails-57467abdab3334b4.js

js lamanna.com.au collected 2026-10-10 01:31:58 UTC 5,651 bytes, 3 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5593],{10149:(e,s,a)=>{"use strict";a.r(s),a.d(s,{default:()=>f});var t=a(37876),r=a(14232),l=a(84014),i=a(36982);let n=e=>i.kk.test(e.trim()),o=e=>i.YO.test(e.trim()),c=e=>/^[^\d!@#$%^&*()_+=[\]{};':"\\|,.<>/?]{1,}$/.test(e.trim()),m=({form:e,onChange:s,identifierType:a})=>{let i=(0,l.A)(),[m,f]=(0,r.useState)({}),x=e=>f(s=>({...s,[e]:!0})),d=e=>f(s=>({...s,[e]:!1})),u=()=>{switch(a){case"Email":return i("egift.form.email");case"Phone":return i("egift.form.phone");default:return i("egift.form.email-or-phone")}},p={firstName:e=>c(e)?null:i("egift.form.error.invalid-first-name"),lastName:e=>c(e)?null:i("egift.form.error.invalid-last-name"),email:e=>n(e)?null:i("egift.form.error.invalid-email"),phone:e=>o(e)?null:i("egift.form.error.invalid-phone"),identifier:e=>"Email"!==a||n(e)?"Phone"!==a||o(e)?null:i("egift.form.error.invalid-phone"):i("egift.form.error.invalid-email")},h={firstName:i("egift.form.first-name"),lastName:i("egift.form.last-name"),email:i("egift.form.email"),phone:i("egift.form.phone"),identifier:u()},g=s=>{var a;let t;return m[s]?(a=e[s]??"",(t=a?.trim()??"")?p[s]?.(t)??null:`${h[s]??s} ${i("egift.form.error.is-required")}`):null},N=(e,s)=>`w-full h-11 border focus:ring-2 focus:outline-none rounded-[0.5rem] px-4 text-sm transition-colors ${s?"bg-base-200 border-error focus:ring-error/40":"bg-base-200 border-transparent focus:ring-primary"}`,j=g("firstName"),b=g("lastName"),v=g("email"),w=g("phone"),k=g("identifier");return(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsxs)("label",{className:"text-xs uppercase tracking-wider font-bold text-base-content/60",children:[i("egift.form.first-name")," ",(0,t.jsx)("span",{className:"text-error",children:"*"})]}),(0,t.jsx)("input",{type:"text",value:e.firstName,onChange:e=>s("firstName",e.target.value),onFocus:()=>d("firstName"),onBlur:()=>x("firstName"),className:N("firstName",j)}),j&&(0,t.jsx)("p",{className:"text-xs text-error",children:j})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsxs)("label",{className:"text-xs uppercase tracking-wider font-bold text-base-content/60",children:[i("egift.form.last-name")," ",(0,t.jsx)("span",{className:"text-error",children:"*"})]}),(0,t.jsx)("input",{type:"text",value:e.lastName,onChange:e=>s("lastName",e.target.value),onFocus:()=>d("lastName"),onBlur:()=>x("lastName"),className:N("lastName",b)}),b&&(0,t.jsx)("p",{className:"text-xs text-error",children:b})]})]}),"EmailAndPhone"===a?(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsxs)("label",{className:"text-xs uppercase tracking-wider font-bold text-base-content/60",children:[i("egift.form.email")," ",(0,t.jsx)("span",{className:"text-error",children:"*"})]}),(0,t.jsx)("input",{type:"email",value:e.email??"",onChange:e=>s("email",e.target.value),onFocus:()=>d("email"),onBlur:()=>x("email"),className:N("email",v)}),v&&(0,t.jsx)("p",{className:"text-xs text-error",children:v})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsxs)("label",{className:"text-xs uppercase tracking-wider font-bold text-base-content/60",children:[i("egift.form.phone")," ",(0,t.jsx)("span",{className:"text-error",children:"*"})]}),(0,t.jsx)("input",{type:"tel",value:e.phone??"",onChange:e=>s("phone",e.target.value),onFocus:()=>d("phone"),onBlur:()=>x("phone"),className:N("phone",w)}),w&&(0,t.jsx)("p",{className:"text-xs text-error",children:w})]})]}):(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsxs)("label",{className:"text-xs uppercase tracking-wider font-bold text-base-content/60",children:[u()," ",(0,t.jsx)("span",{className:"text-error",children:"*"})]}),(0,t.jsx)("input",{type:(e=>{switch(e){case"Email":return"email";case"Phone":return"tel";default:return"text"}})(a),value:e.identifier,onChange:e=>s("identifier",e.target.value),onFocus:()=>d("identifier"),onBlur:()=>x("identifier"),className:N("identifier",k)}),k&&(0,t.jsx)("p",{className:"text-xs text-error",children:k})]})]})},f=({sendToMyself:e,onToggleSendToMyself:s,senderForm:a,recipientForm:r,onSenderChange:i,onRecipientChange:n,identifierType:o,showSenderInfo:c=!0})=>{let f=(0,l.A)();return(0,t.jsxs)("div",{className:"flex flex-col gap-6",children:[c&&(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsx)("h2",{className:"text-lg font-bold",children:f("egift.form.your-details")}),(0,t.jsx)(m,{form:a,onChange:i,identifierType:o})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between p-4 bg-base-200 rounded-[0.5rem]",children:[(0,t.jsx)("span",{className:"text-sm font-semibold",children:f("egift.form.send-to-myself")}),(0,t.jsx)("button",{role:"switch","aria-checked":e,"aria-label":f("egift.form.send-to-myself"),onClick:()=>s(!e),className:`w-10 h-6 rounded-full relative transition-colors
2            ${e?"bg-primary":"bg-base-300"}`,children:(0,t.jsx)("span",{className:`absolute top-1 left-1 w-4 h-4 bg-base-100 rounded-full transition-transform
3              ${e?"translate-x-4":"translate-x-0"}`})})]}),!e&&(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsx)("h2",{className:"text-lg font-bold",children:f("egift.form.recipient-details")}),(0,t.jsx)(m,{form:r,onChange:n,identifierType:o})]})]})}},46200:(e,s,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/gifting/components/RecipientDetails",function(){return a(10149)}])}},e=>{e.O(0,[636,6593,8792],()=>
3e(e.s=46200)),_N_E=e.O()}]);

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.