PageSourceSearch

https://www.yattajapan.com/_next/static/chunks/pages/account/account-details-61b6a4edf452ad94.js

js yattajapan.com collected 2026-09-27 05:27:22 UTC 10,908 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[663],{64148:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/account/account-details",function(){return s(72701)}])},10978:function(e,t,s){"use strict";var l=s(85893),a=s(65898),n=s(73213),i=s(43484),r=s(87536),o=s(48352),c=s(67294);let d={title:"common:text-subscribe-heading",description:"common:text-subscribe-description",buttonText:"common:button-subscribe",successText:"common:text-subscribe-success"},m={subscription_email:""};t.Z=e=>{var t;let{className:s="px-5 sm:px-8 md:px-16 2xl:px-24",disableBorderRadius:u=!1}=e,[x,f]=(0,c.useState)(!1),[p,g]=(0,c.useState)(!1),{register:h,handleSubmit:v,formState:{errors:b}}=(0,r.cI)({defaultValues:m}),{t:y}=(0,o.$G)(),{title:N,description:j,buttonText:w,successText:S}=d;async function Z(e){g(!0),fetch("/api/subscribe",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}).then(e=>{g(!1),200===e.status&&f(!0)})}return(0,l.jsxs)("div",{className:"".concat(s," flex flex-col xl:flex-row justify-center xl:justify-between items-center rounded-lg bg-gray-200 py-10 md:py-14 lg:py-16"),children:[(0,l.jsxs)("div",{className:"lg:-mt-2 xl:-mt-0.5 text-center xl:text-start mb-7 md:mb-8 lg:mb-9 xl:mb-0",children:[(0,l.jsx)(a.Z,{variant:"mediumHeading",className:"sm:mb-0 md:mb-2.5 lg:mb-3 xl:mb-3.5",children:y("".concat(N))}),(0,l.jsx)("p",{className:"text-body text-xs md:text-sm leading-6 md:leading-7",children:y("".concat(j))})]}),x?(0,l.jsx)("div",{className:"text-center",children:(0,l.jsx)("p",{className:"text-heading text-xl",children:y("".concat(S))})}):(0,l.jsx)("form",{onSubmit:v(Z),className:"flex-shrink-0 w-full sm:w-96 md:w-[545px]",noValidate:!0,children:(0,l.jsxs)("div",{className:"flex flex-col sm:flex-row items-start justify-end",children:[(0,l.jsx)(n.Z,{disableBorderRadius:u,placeholderKey:"forms:placeholder-email-subscribe",type:"email",variant:"solid",className:"w-full",inputClassName:"px-4 lg:px-7 h-12 lg:h-14 text-center sm:text-start bg-white",...h("subscription_email",{required:"forms:email-required",pattern:{value:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:"forms:email-error"}}),errorKey:null===(t=b.subscription_email)||void 0===t?void 0:t.message}),(0,l.jsx)(i.Z,{loading:p,disableBorderRadius:u,className:"mt-3 sm:mt-0 w-full sm:w-auto sm:ms-2 md:h-full flex-shrink-0",children:(0,l.jsx)("span",{className:"lg:py-0.5",children:y("".concat(w))})})]})})]})}},8803:function(e,t,s){"use strict";s.d(t,{Z:function(){return y}});var l=s(85893),a=s(27127),n=s(71199),i=s(41664),r=s.n(i),o=s(11163),c=s(60155),d=s(13971),m=s(48352),u=s(99741),x=s(49517);function f(){var e,t,s;let{pathname:a}=(0,o.useRouter)(),n="/".concat(a.split("/").slice(2,3)[0]),{t:i}=(0,m.$G)("common"),{data:f}=(0,x.k1)(),p=null==f?void 0:null===(s=f.customer)||void 0===s?void 0:null===(t=s.subscriptionContracts)||void 0===t?void 0:null===(e=t.nodes)||void 0===e?void 0:e.some(e=>["ACTIVE","PAUSED","CANCELLED"].includes(e.status)),g=[{slug:d.Z.ACCOUNT,name:"text-dashboard",icon:(0,l.jsx)(c.yl6,{className:"w-5 h-5"})},{slug:d.Z.ORDERS,name:"text-orders",icon:(0,l.jsx)(c.toq,{className:"w-5 h-5"})},...p?[{slug:d.Z.SUBSCRIPTIONS,name:"text-subscriptions",icon:(0,l.jsx)(c.CQs,{className:"w-5 h-5"})}]:[],{slug:d.Z.ACCOUNT_DETAILS,name:"text-account-details",icon:(0,l.jsx)(c.FJ3,{className:"w-5 h-5"})}];return(0,l.jsxs)("nav",{className:"flex flex-col md:w-2/6 2xl:w-4/12 md:pe-8 lg:pe-12 xl:pe-16 2xl:pe-20 pb-2 md:pb-0",children:[g.map(e=>{let t="/".concat(e.slug.split("/").slice(2,3)[0]);return(0,l.jsx)(r(),{legacyBehavior:!0,href:e.slug,children:(0,l.jsxs)("a",{className:n===t?"bg-gray-100 font-semibold flex items-center cursor-pointer text-sm lg:text-base text-heading py-3.5 px-4 lg:px-5 rounded mb-2 ":"flex items-center cursor-pointer text-sm lg:text-base text-heading font-normal py-3.5 px-4 lg:px-5 rounded mb-2",children:[e.icon,(0,l.jsx)("span",{className:"ps-2",children:i("".concat(e.name))})]})},e.slug)}),(0,l.jsxs)("button",{className:"flex items-center cursor-pointer text-sm lg:text-base text-heading font-normal py-3.5 px-4 lg:px-5 focus:outline-none",onClick:()=>(0,u.hY)(),children:[(0,l.jsx)(c.qgu,{className:"w-5 h-5"}),(0,l.jsx)("span",{className:"ps-2",children:i("text-logout")})]})]})}var p=s(10978),g=s(67294),h=s(76362),v=function(e,t,s){if(!h.jU)return[t,h.ZT,h.ZT];if(!e)throw Error("useLocalStorage key may not be falsy");var l=s?s.raw?function(e){return e}:s.deserializer:JSON.parse,a=(0,g.useRef)(function(e){try{var a=s?s.raw?String:s.serializer:JSON.stringify,n=localStorage.getItem(e);if(null!==n)return l(n);return t&&localStorage.setItem(e,a(t)),t}catch(e){return t}}),n=(0,g.useState)(function(){return a.current(e)}),i=n[0],r=n[1];(0,g.useLayoutEffect)(function(){return r(a.current(e))},[e]);var o=(0,g.useCallback)(function(t){try{var a="function"==typeof t?t(i):t;if(void 0===a)return;var n=void 0;n=s?s.raw?"string"==typeof a?a:JSON.stringify(a):s.serializer?s.serializer(a):JSON.stringify(a):JSON.stringify(a),localStorage.setItem(e,n),r(l(n))}catch(e){}},[e,r]);return[i,o,(0,g.useCallback)(function(){try{localStorage.removeItem(e),r(void 0)}catch(e){}},[e,r])]},b=s(25405),y=e=>{let{children:t}=e,{isAuthorized:s}=(0,b.l8)(),i=(0,o.useRouter)(),[r,c]=v("auth",JSON.stringify({})),{error:d}=(0,x.k1)();return(0,g.useEffect)(()=>{!1===s&&(i.push("/"),(0,u.D_)(i,c))},[s]),(0,g.useEffect)(()=>{var e;console.log("error",d),(null==d?void 0:null===(e=d.response)||void 0===e?void 0:e.status)===401&&((0,u.Zz)(),(0,u.D_)(i,c))},[d]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(a.Z,{pageHeader:"text-page-my-account"}),(0,l.jsxs)(n.Z,{children:[(0,l.jsx)("div",{className:"py-16 lg:py-20 px-0 xl:max-w-screen-xl mx-auto flex  md:flex-row w-full",children:(0,l.jsxs)("div",{className:"flex flex-col md:flex-row w-full",children:[(0,l.jsx)(f,{}),(0,l.jsx)("div",{className:"md:w-4/6 2xl:w-8/12 mt-4 md:mt-0",children:t})]})}),(0,l.jsx)(p.Z,{})]})]})}},27127:function(e,t,s){"use strict";var l=s(85893),a=s(48352);t.Z=e=>{let{pageSubHeader:t="text-page-explore",pageHeader:s="text-page-header"}=e,{t:n}=(0,a.$G)("common");return(0,l.jsxs)("div",{className:"flex justify-center p-6 md:p-10 2xl:p-8 relative bg-no-repeat bg-center bg-cover",style:{backgroundImage:"url(/assets/images/page-header.webp)"},children:[(0,l.jsx)("div",{className:"absolute top-0 start-0 bg-black w-full h-full opacity-50 transition-opacity duration-500 group-hover:opacity-80"}),(0,l.jsx)("div",{className:"w-full flex items-center justify-center relative z-10 py-10 md:py-14 lg:py-20 xl:py-24 2xl:py-32",children:(0,l.jsx)("h2",{className:"text-xl md:text-2xl lg:text-3xl font-bold text-white text-center",children:n("".concat(s))})})]})}},65898:function(e,t,s){"use strict";var l=s(85893);s(67294);var a=s(93967),n=s.n(a);t.Z=e=>{let{style:t,className:s,variant:a="body",children:i,html:r}=e,o=r?{dangerouslySetInnerHTML:{__html:r}}:{};return(0,l.jsx)({body:"p",mediumHeading:"h3",heading:"h4",pageHeading:"h1",subHeading:"h2"}[a],{className:n()({"text-sm sm:leading-6 leading-7":"body"===a,"text-body":"body"===a,"text-lg md:text-xl lg:text-2xl 2xl:text-3xl xl:leading-10 font-bold":"mediumHeading"===a,"text-heading":"mediumHeading"===a||"heading"===a||"pageHeading"===a||"subHeading"===a,"text-sm md:text-base xl:text-lg font-semibold":"heading"===a,"text-2xl font-bold":"pageHeading"===a,"text-lg md:text-2xl xl:text-3xl 2xl:text-4xl  font-bold":"subHeading"===a},s),style:t,...o,children:i})}},72701:function(e,t,s){"use strict";s.r(t),s.d(t,{__N_SSG:function(){return v},default:function(){return b}});var l=s(85893),a=s(60390),n=s(8803),i=s(73213),r=s(43484),o=s(87536),c=s(82023),d=s(65734),m=s(48352),u=s(49517),x=s(67294),f=s(65898),p=s(41664),g=s.n(p),h=()=>{var e,t,s,a,n,p,h;let{data:v}=(0,u.k1)(),b={firstName:(null==v?void 0:null===(e=v.customer)||void 0===e?void 0:e.firstName)||"",lastName:(null==v?void 0:null===(t=v.customer)||void 0===t?void 0:t.lastName)||""},{mutate:y,isLoading:N}=(0,u.cS)(),{t:j}=(0,m.$G)(),{register:w,reset:S,handleSubmit:Z,formState:{errors:_}}=(0,o.cI)({defaultValues:b});return(0,x.useEffect)(()=>{var e,t;S({firstName:(null==v?void 0:null===(e=v.customer)||void 0===e?void 0:e.firstName)||"",lastName:(null==v?void 0:null===(t=v.customer)||void 0===t?void 0:t.lastName)||""})},[v]),(0,l.jsxs)(c.E.div,{layout:!0,initial:"from",animate:"to",exit:"from",variants:(0,d.E)(.35),className:"w-full flex flex-col",children:[(0,l.jsx)("h2",{className:"text-lg md:text-xl xl:text-2xl font-bold text-heading mb-6 xl:mb-8",children:j("common:text-account-details")}),(0,l.jsx)("form",{onSubmit:Z(function(e){y(e)}),className:"w-full mx-auto flex flex-col justify-center ",noValidate:!0,children:(0,l.jsxs)("div",{className:"flex flex-col space-y-4 sm:sp
1ace-y-5",children:[(0,l.jsxs)("div",{className:"flex flex-col sm:flex-row sm:space-s-3 space-y-4 sm:space-y-0",children:[(0,l.jsx)(i.Z,{labelKey:"forms:label-first-name",...w("firstName",{required:"forms:first-name-required"}),variant:"solid",className:"w-full sm:w-1/2",errorKey:null===(s=_.firstName)||void 0===s?void 0:s.message}),(0,l.jsx)(i.Z,{labelKey:"forms:label-last-name",...w("lastName",{required:"forms:last-name-required"}),variant:"solid",className:"w-full sm:w-1/2",errorKey:null===(a=_.lastName)||void 0===a?void 0:a.message})]}),(0,l.jsx)("div",{className:"relative",children:(0,l.jsx)(r.Z,{type:"submit",loading:N,disabled:N,className:"h-12 mt-3 w-full sm:w-32",children:j("common:button-save")})})]})}),(0,l.jsx)("h3",{className:"text-lg xl:text-xl font-bold text-heading my-6 xl:my-8",children:j("common:text-account-address")}),null==v?void 0:null===(h=v.customer)||void 0===h?void 0:null===(p=h.addresses)||void 0===p?void 0:null===(n=p.nodes)||void 0===n?void 0:n.map(e=>(0,l.jsxs)("div",{className:"flex mb-4",children:[null==e?void 0:e.formatted.map(e=>(0,l.jsx)("div",{className:"flex-auto",children:(0,l.jsx)(f.Z,{className:"text-base",children:e})})),(0,l.jsx)("div",{className:"flex-auto",children:(0,l.jsx)(g(),{href:"/account/address/".concat(null==e?void 0:e.id.split("gid://shopify/CustomerAddress/").pop().split("?")[0]),className:"text-sm leading-4 bg-heading text-white px-4 py-2.5 inline-block rounded-md hover:text-white hover:bg-gray-600",children:j("button-edit")})})]}))]})},v=!0;function b(){return(0,l.jsx)(n.Z,{children:(0,l.jsx)(h,{})})}b.Layout=a.Z},65734:function(e,t,s){"use strict";function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.5;return{from:{position:"relative",top:"50px",opacity:0,transition:{type:"easeInOut",duration:e}},to:{position:"relative",top:"0",opacity:1,transition:{type:"easeInOut",duration:e}}}}s.d(t,{E:function(){return l}})}},function(e){e.O(0,[445,617,848,390,774,888,179],function(){return e(e.s=64148)}),_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.