1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3632],{84620:function(e,t,n){n.d(t,{K$:function(){return m},Kf:function(){return p},ZP:function(){return f}});var a=n(47568),r=n(10253),i=n(70655),s=n(85893),l=n(68398),c=n(45551),o=n(1801),d=n(25675),u=n.n(d),x=n(67294),m={teal:"from-[#1DE9CF] via-[#02A994] to-[#01594E]",navy:"from-[#4A6FC0] via-[#1F3A73] to-[#0B1733]",purple:"from-[#A780FF] via-[#6A3FD1] to-[#2E1470]",rose:"from-[#FF8FAB] via-[#E0456C] to-[#7E1535]",orange:"from-[#FFC06E] via-[#F57F17] to-[#8F3F00]",graphite:"from-[#6B7482] via-[#343B46] to-[#101318]",gold:"from-[#F0D58C] via-[#C49A3A] to-[#6B4D0E]"},p={teal:"ÙÛØ±ÙزÙâØ§Û",navy:"سرÙ
ÙâØ§Û",purple:"بÙÙØ´",rose:"ØµÙØ±ØªÛ",orange:"ÙØ§Ø±ÙجÛ",graphite:"Ø¯ÙØ¯Û",gold:"Ø·ÙØ§ÛÛ"};function g(){return(g=(0,a.Z)(function(e){var t,n;return(0,i.__generator)(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,navigator.clipboard.writeText(e)];case 1:return a.sent(),[2,!0];case 2:a.sent();try{return(t=document.createElement("textarea")).value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select(),n=document.execCommand("copy"),document.body.removeChild(t),[2,n]}catch(e){return[2,!1]}return[3,3];case 3:return[2]}})})).apply(this,arguments)}function h(e){var t,n=e.value,o=e.label,d=e.onDark,u=(0,r.Z)((0,x.useState)(!1),2),m=u[0],p=u[1];return(0,s.jsx)("button",{type:"button","aria-label":"Ú©Ù¾Û ".concat(o),onClick:(t=(0,a.Z)(function(e){return(0,i.__generator)(this,function(t){switch(t.label){case 0:return e.stopPropagation(),[4,function(e){return g.apply(this,arguments)}(n)];case 1:if(!t.sent())return[2];return p(!0),setTimeout(function(){return p(!1)},1600),c.Z.message([{type:l.L.SUCCESS,title:"".concat(o," Ú©Ù¾Û Ø´Ø¯")}]),[2]}})}),function(e){return t.apply(this,arguments)}),className:"shrink-0 w-36 h-36 rounded-10 flex items-center justify-center transition ".concat(void 0!==d&&d?"bg-white/15 hover:bg-white/25 text-white":m?"bg-[#03D6BB1F] text-primary-main":"bg-gray-F0F0F0 hover:bg-gray-E5E5E6 text-black"),children:(0,s.jsx)("i",{className:"".concat(m?"icon-Tick":"icon-Copy"," text-20")})})}function b(e){var t=e.label,n=e.display,a=e.value,r=e.ltr,i=void 0===r||r;return(0,s.jsxs)("div",{className:"flex items-center justify-between gap-x-12 px-14 py-10",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"text-10 leading-17 text-gray-616E7C",children:t}),(0,s.jsx)("p",{dir:i?"ltr":void 0,className:"text-14 leading-24 text-black truncate text-right ".concat(i?"font-m-en":"font-m"),children:n})]}),(0,s.jsx)(h,{value:a,label:t})]})}function f(e){var t,n,a,r,i=e.card,l=e.showDetails,c=null!==(n=m[i.theme])&&void 0!==n?n:m.teal,d=(null===(t=i.bank_name)||void 0===t?void 0:t.trim())||(0,o.w$)(i.card_number)||"کارت باÙÚ©Û",x=(null!==(a=i.card_number)&&void 0!==a?a:"").replace(/\D/g,""),p=(null!==(r=i.shaba)&&void 0!==r?r:"").replace(/\D/g,"");return(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"relative overflow-hidden w-full aspect-[1.586/1] rounded-20 bg-gradient-to-br ".concat(c," text-white p-20 flex flex-col shadow-[0_16px_32px_-14px_rgba(24,39,58,0.55)]"),children:[(0,s.jsx)("span",{"aria-hidden":!0,className:"absolute -top-[70px] -left-[50px] w-[190px] h-[190px] rounded-full bg-white/10"}),(0,s.jsx)("span",{"aria-hidden":!0,className:"absolute -bottom-[90px] -right-[40px] w-[220px] h-[220px] rounded-full bg-black/10"}),(0,s.jsx)("span",{"aria-hidden":!0,className:"absolute inset-0 bg-[url('/assets/Wallet-Effect.svg')] bg-cover bg-no-repeat opacity-30"}),(0,s.jsxs)("div",{className:"relative flex items-start justify-between gap-x-12",children:[(0,s.jsx)("p",{className:"text-16 leading-28 font-m drop-shadow-[0px_2px_4px_rgba(0,0,0,0.2)] truncate",children:d}),(0,s.jsx)(u(),{src:"/assets/logos/Logo-white-landscape.svg",width:80,height:19,alt:"",className:"opacity-90 shrink-0 mt-4",style:{height:"auto"}})]}),(0,s.jsxs)("div",{className:"relative mt-auto",children:[(0,s.jsx)("span",{"aria-hidden":!0,
1className:"block w-[38px] h-[28px] rounded-6 bg-gradient-to-br from-[#FBEFC4] via-[#E2C271] to-[#B08A35] mb-12 shadow-[inset_0_0_0_1px_rgba(0,0,0,0.12)]"}),x?(0,s.jsxs)("div",{className:"flex items-center justify-between gap-x-8",children:[(0,s.jsx)(h,{value:x,label:"Ø´Ù
ار٠کارت",onDark:!0}),(0,s.jsx)("span",{dir:"ltr",className:"font-b-en text-20 md:text-[22px] leading-32 tracking-[0.06em] whitespace-nowrap drop-shadow-[0px_2px_4px_rgba(0,0,0,0.25)]",children:(0,o.YC)(x)})]}):p?(0,s.jsx)("p",{dir:"ltr",className:"font-m-en text-14 leading-24 text-right drop-shadow-[0px_2px_4px_rgba(0,0,0,0.25)]",children:(0,o.Lm)(p)}):i.account_number?(0,s.jsx)("p",{dir:"ltr",className:"font-m-en text-16 leading-28 text-right",children:i.account_number}):null,(0,s.jsx)("div",{className:"flex items-end justify-between mt-8",children:(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"text-10 leading-17 opacity-80",children:"Ø¨Ù ÙØ§Ù
"}),(0,s.jsx)("p",{className:"text-14 leading-24 font-m truncate drop-shadow-[0px_2px_4px_rgba(0,0,0,0.2)]",children:i.owner_name})]})})]})]}),(void 0===l||l)&&(0,s.jsxs)("div",{className:"mt-12 rounded-16 border-1 border-solid border-gray-E5E5E6 divide-y divide-gray-E5E5E6 bg-white",children:[!!x&&(0,s.jsx)(b,{label:"Ø´Ù
ار٠کارت",display:(0,o.YC)(x),value:x}),!!i.account_number&&(0,s.jsx)(b,{label:"Ø´Ù
Ø§Ø±Ù ØØ³Ø§Ø¨",display:i.account_number,value:i.account_number}),!!p&&(0,s.jsx)(b,{label:"Ø´Ù
ار٠شبا",display:(0,o.Lm)(p),value:"IR".concat(p)}),(0,s.jsx)(b,{label:"ØµØ§ØØ¨ ØØ³Ø§Ø¨",display:i.owner_name,value:i.owner_name,ltr:!1})]})]})}},43632:function(e,t,n){n.d(t,{HH:function(){return j},ZP:function(){return N},iG:function(){return y},ru:function(){return f}});var a=n(26042),r=n(99534),i=n(10253),s=n(36305),l=n(85893),c=n(56286),o=n(47300),d=n(68398),u=n(45551),x=n(1801),m=n(48228),p=n(36492),g=n(67294),h=n(84620),b=function(e,t){return e.kind===t.kind&&("card"===e.kind||e.id===t.id)},f=function(e){return"".concat(Math.round(e).toLocaleString("en-US")," تÙÙ
اÙ")};function v(e){var t=e.text,n=e.phone,a=e.amount,r=e.code,i=t.split(/(\{phone\}|\{amount\}|\{code\})/g),s=null==n?void 0:n.replace(/[^\d+]/g,"");return(0,l.jsxs)("div",{className:"rounded-16 bg-[#FFF8EB] border-1 border-solid border-[#FFE2A8] p-14",children:[(0,l.jsxs)("div",{className:"flex gap-x-10",children:[(0,l.jsx)("i",{className:"icon-Information text-20 text-[#B26A00] shrink-0"}),(0,l.jsx)("p",{className:"text-12 leading-22 text-[#5C3B00]",children:i.map(function(e,t){return"{phone}"===e?n?(0,l.jsx)("b",{dir:"ltr",className:"font-b inline-block",children:n},t):null:"{amount}"===e?a?(0,l.jsx)("b",{className:"font-b",children:f(a)},t):null:"{code}"===e?r?(0,l.jsx)("b",{dir:"ltr",className:"font-b inline-block",children:r},t):null:(0,l.jsx)(g.Fragment,{children:e},t)})})]}),!!s&&(0,l.jsxs)("a",{href:"sms:".concat(s),className:"mt-12 flex md:hidden items-center justify-center gap-x-8 rounded-10 bg-white border-1 border-solid border-[#FFE2A8] py-10 text-14 leading-24 font-m text-[#8A5A00]",children:[(0,l.jsx)("i",{className:"icon-SendMessage text-20"}),"Ø§Ø±Ø³Ø§Ù Ù¾ÛØ§Ù
Ú© ب٠",(0,l.jsx)("span",{dir:"ltr",children:n})]})]})}function y(e){var t,n,a=e.methods,r=e.amount,c=e.code,d=e.onGateway,u=e.gatewayLoading,m=e.gatewayDisabled,p=e.payLabel,y=e.cardFooter,j=a.gateways,N=a.cards,w=(0,g.useMemo)(function(){return(0,s.Z)(j.map(function(e){return{kind:"gateway",id:e.id}})).concat((0,s.Z)(N.length?[{kind:"card"}]:[]))},[j,N]),F=(0,i.Z)((0,g.useState)(null!==(t=w[0])&&void 0!==t?t:null),2),_=F[0],k=F[1],E=(0,i.Z)((0,g.useState)(0),2),C=E[0],A=E[1];if((0,g.useEffect)(function(){var e;k(function(t){return t&&w.some(function(e){return b(e,t)})?t:null!==(e=w[0])&&void 0!==e?e:null})},[w]),(0,g.useEffect)(function(){C>=N.length&&A(0)},[N.length,C]),!w.length)return(0,l.jsxs)("div",{className:"rounded-16 border-1 border-dashed border-gray-C4CAD3 p-20 text-center",children:[(0,l.jsx)("i",{className:"icon-Pay text-32 text-gray-9B9BAA"}),(0,l.jsx)("p",{className:"mt-8 text-14 leading-24 font-m text-black",children:"Ø±ÙØ´ Ù¾Ø±Ø¯Ø§Ø®ØªÛ ÙØ¹Ø§Ù ÙÛØ³Øª"}),(0,l.jsx)("p",{className:"mt-4 text-12 leading-21 text-gray-616E7C",children:"در ØØ§Ù ØØ§Ø¶Ø± اÙ
کا٠پرداخت ÙØ¹Ø§Ù ÙÛØ³Øª. ÙØ·Ùا٠با Ù¾Ø´ØªÛØ¨Ø§ÙÛ ØªÙ
اس بگÛ
1Ø±ÛØ¯."})]});var B=(null==_?void 0:_.kind)==="gateway"?j.find(function(e){return e.id===_.id}):void 0,D=null!==(n=N[C])&&void 0!==n?n:N[0];return(0,l.jsxs)("div",{className:"flex flex-col gap-y-16",children:[w.length>1&&(0,l.jsxs)("div",{role:"radiogroup","aria-label":"Ø±ÙØ´ پرداخت",className:"flex flex-col gap-y-8",children:[(0,l.jsx)("p",{className:"text-14 leading-24 font-m text-zilgara mb-4",children:"Ø±ÙØ´ پرداخت را Ø§ÙØªØ®Ø§Ø¨ Ú©ÙÛØ¯"}),w.map(function(e){var t=!!_&&b(e,_),n="gateway"===e.kind?j.find(function(t){return t.id===e.id}):void 0;return(0,l.jsxs)("button",{type:"button",role:"radio","aria-checked":t,onClick:function(){return k(e)},className:"flex items-center gap-x-12 rounded-12 border-1 border-solid px-14 py-12 text-right transition ".concat(t?"border-primary-main bg-[#03D6BB0F] shadow-[0_0_0_1px_#03D6BB]":"border-gray-C4CAD3 bg-white"),children:[(0,l.jsx)("span",{className:"w-20 h-20 rounded-full border-2 border-solid flex items-center justify-center shrink-0 ".concat(t?"border-primary-main":"border-gray-C4CAD3"),children:t&&(0,l.jsx)("span",{className:"w-10 h-10 rounded-full bg-primary-main"})}),(0,l.jsx)("span",{className:"w-40 h-40 rounded-10 flex items-center justify-center shrink-0 ".concat(n?"bg-[#E8F1FF] text-[#1B4F9C]":"bg-[#FFF4E0] text-[#B26A00]"),children:(0,l.jsx)("i",{className:"".concat(n?"icon-Pay":"icon-CardBank"," text-24")})}),(0,l.jsxs)("span",{className:"flex-1 min-w-0",children:[(0,l.jsx)("span",{className:"block text-14 leading-24 font-m text-black truncate",children:n?n.title:"کارت ب٠کارت"}),(0,l.jsx)("span",{className:"block text-12 leading-20 text-gray-616E7C",children:n?"پرداخت Ø¢ÙÙØ§Û٠با تÙ
اÙ
کارتâÙØ§Û عض٠شتاب":N.length>1?"ÙØ§Ø±Ûز ب٠ÛÚ©Û Ø§Ø² ".concat(N.length.toLocaleString("fa-IR")," ØØ³Ø§Ø¨ Ù Ø§Ø±Ø³Ø§Ù Ø±Ø³ÛØ¯"):"ÙØ§Ø±Ûز Ø¨Ù ØØ³Ø§Ø¨ Ù Ø§Ø±Ø³Ø§Ù Ø±Ø³ÛØ¯"})]})]},"gateway"===e.kind?"g".concat(e.id):"card")})]}),!!B&&(0,l.jsxs)("div",{children:[1===w.length&&(0,l.jsxs)("p",{className:"mb-12 flex items-center gap-x-8 text-12 leading-21 text-gray-616E7C",children:[(0,l.jsx)("i",{className:"icon-Pay text-20 text-primary-main"}),"پرداخت Ø¢ÙÙØ§Û٠از طرÛ٠درگا٠",B.title]}),(0,l.jsx)(o.z,{isFullWidth:!0,isLoading:u,loadingText:"در ØØ§Ù Ø§ÙØªÙا٠ب٠درگاÙâ¦",disabled:m,onClick:function(){return d(B.id)},children:null!=p?p:r?"پرداخت ".concat(f(r)):"Ø§ÙØªÙا٠ب٠درگا٠پرداخت"})]}),(null==_?void 0:_.kind)==="card"&&!!D&&(0,l.jsxs)("div",{className:"flex flex-col gap-y-12",children:[N.length>1&&(0,l.jsx)("div",{className:"flex gap-x-8 overflow-x-auto pb-4",role:"tablist","aria-label":"ØØ³Ø§Ø¨ Ù
ÙØµØ¯",children:N.map(function(e,t){return(0,l.jsx)("button",{type:"button",role:"tab","aria-selected":t===C,onClick:function(){return A(t)},className:"shrink-0 rounded-100 px-14 py-6 text-12 leading-20 border-1 border-solid transition ".concat(t===C?"bg-black text-white border-black":"bg-white text-black border-gray-C4CAD3"),children:e.bank_name||(0,x.w$)(e.card_number)||"ØØ³Ø§Ø¨ ".concat((t+1).toLocaleString("fa-IR"))},e.id)})}),!!r&&(0,l.jsxs)("div",{className:"flex items-center justify-between rounded-12 bg-gray-F0F0F0 px-14 py-10",children:[(0,l.jsx)("span",{className:"text-12 leading-21 text-gray-616E7C",children:"Ù
Ø¨ÙØº ÙØ§Ø¨Ù ÙØ§Ø±Ûز"}),(0,l.jsx)("span",{className:"text-16 leading-28 font-m text-black",children:f(r)})]}),(0,l.jsx)(h.ZP,{card:D}),!!a.card_text&&(0,l.jsx)(v,{text:a.card_text,phone:a.receipt_phone,amount:r,code:c}),null==y?void 0:y(D)]})]})}function j(){return(0,m.D)(c.Vv,{onSuccess:function(e){return window.location.assign(e)},onError:function(e){return u.Z.message([{type:d.L.ERROR,title:e instanceof Error?e.message:d.i}])}})}function N(e){var t=e.context,n=(0,r.Z)(e,["context"]),i=(0,p.a)({queryKey:["paymentMethods",t],queryFn:function(){return(0,c.Q8)(t)},staleTime:6e4}),s=i.data,d=i.isLoading,u=i.isError,x=i.refetch,m=i.isFetching;return d?(0,l.jsxs)("div",{className:"flex flex-col gap-y-8","aria-busy":"true",children:[(0,l.jsx)("div",{className:"h-[64px] rounded-12 bg-gray-F0F0F0 animate-pulse"}),(0,l.jsx)("div",{className:"h-[64px] rounded-12 bg-gray-F0F0F0 animate-pulse"})]}):u||!s?(0,l.jsxs)("div",{className:"rounded-16 border-1 border-solid border-gray-E5E5E6 p-20 text-center",children:[(0,l.jsx)("p",{className:"text-14 leading-24 text-black mb-12",children:"Ø±ÙØ´âÙØ§Û پرداخت Ø¨Ø§Ø±Ú¯Ø°Ø§Ø±Û ÙØ´Ø¯."}),(0,l.jsx)(o.z,{variant:"outlined",color:"black",onClick:function(){return x()},isLoading:m,children:"ØªÙØ§Ø´ Ø¯ÙØ¨Ø§Ø±Ù"})]}):(0,l.jsx)(y,(0,a.Z)({methods:s},n))}},1801:function(e,t,n){n.d(t,{Lm:function(){return s},YC:function(){return i},w$:function(){return r}});var a={603799:"باÙÚ© Ù
ÙÛ",589210:"باÙÚ© سپÙ",627961:"باÙÚ© ØµÙØ¹Øª Ù Ù
عدÙ",603770:"باÙÚ© Ú©Ø´Ø§ÙØ±Ø²Û",628023:"باÙÚ© Ù
سکÙ",627760:"پست باÙÚ©",502908:"باÙÚ© ØªÙØ³Ø¹Ù تعاÙÙ",627648:"باÙÚ© ØªÙØ³Ø¹Ù صادرات",207177:"باÙÚ© ØªÙØ³Ø¹Ù صادرات",627412:"باÙÚ© Ø§ÙØªØµØ§Ø¯ ÙÙÛÙ",622106:"باÙÚ© Ù¾Ø§Ø±Ø³ÛØ§Ù",639194:"باÙÚ© Ù¾Ø§Ø±Ø³ÛØ§Ù",627884:"باÙÚ© Ù¾Ø§Ø±Ø³ÛØ§Ù",502229:"باÙÚ© پاسارگاد",639347:"باÙÚ© پاسارگاد",627488:"باÙÚ© Ú©Ø§Ø±Ø¢ÙØ±ÛÙ",502910:"باÙÚ© Ú©Ø§Ø±Ø¢ÙØ±ÛÙ",621986:"باÙÚ© ساÙ
اÙ",639346:"باÙÚ© سÛÙØ§",639607:"باÙÚ© سرÙ
اÛÙ",636214:"باÙÚ© Ø¢ÛÙØ¯Ù",502806:"باÙÚ© Ø´ÙØ±",504706:"باÙÚ© Ø´ÙØ±",502938:"باÙÚ© دÛ",603769:"باÙÚ© صادرات",610433:"باÙÚ© Ù
ÙØª",991975:"باÙÚ© Ù
ÙØª",627353:"باÙÚ© تجارت",585983:"باÙÚ© تجارت",589463:"باÙÚ© Ø±ÙØ§Ù",505785:"باÙÚ© Ø§ÛØ±Ø§Ù زÙ
ÛÙ",636795:"باÙÚ© Ù
رکزÛ",606373:"باÙÚ© ÙØ±Ø¶âØ§ÙØØ³ÙÙ Ù
ÙØ± Ø§ÛØ±Ø§Ù",639370:"باÙÚ© Ù
ÙØ± Ø§ÙØªØµØ§Ø¯",505416:"باÙÚ© گردشگرÛ",505426:"باÙÚ© گردشگرÛ",585947:"باÙÚ© Ø®Ø§ÙØ±Ù
ÛØ§ÙÙ",628157:"Ù
ؤØ
1³Ø³Ù Ø§Ø¹ØªØ¨Ø§Ø±Û ØªÙØ³Ø¹Ù",505801:"Ù
Ø¤Ø³Ø³Ù Ø§Ø¹ØªØ¨Ø§Ø±Û Ú©ÙØ«Ø±",507677:"Ù
Ø¤Ø³Ø³Ù Ø§Ø¹ØªØ¨Ø§Ø±Û ÙÙØ±",639599:"باÙÚ© ÙÙØ§Ù
ÛÙ",504172:"باÙÚ© ÙØ±Ø¶âØ§ÙØØ³ÙÙ Ø±Ø³Ø§ÙØª"};function r(e){var t,n=(null!=e?e:"").replace(/\D/g,"");return n.length>=6&&null!==(t=a[n.slice(0,6)])&&void 0!==t?t:null}function i(e){return(null!=e?e:"").replace(/\D/g,"").replace(/(.{4})(?=.)/g,"$1 ")}function s(e){var t=(null!=e?e:"").replace(/\D/g,"");return t?"IR".concat(t).replace(/(.{4})(?=.)/g,"$1 "):""}}}]);
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.