1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1883],{37854:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_/[app_key]/payment_return_link",function(){return n(30849)}])},30849:function(e,t,n){"use strict";n.r(t),n.d(t,{PAYMENT_STATE_COOKIE:function(){return d},PAYMENT_STATE_MESSAGE:function(){return w},PAYMENT_STATE_STORAGE_KEY:function(){return m},__N_SSP:function(){return f},default:function(){return p}});var s=n(15436),i=n(49898),c=n(71089),a=n(44645),r=n(23509),l=n(1503),o=n(40079),u=n(64162),f=!0;let d="payment_state",m="hamdast_payment_state",w="hamdast_payment_state";function _(e){(0,l.setCookie)(d,e,{path:"/",sameSite:"lax"});try{localStorage.setItem(m,JSON.stringify({status:e,at:Date.now()}))}catch(e){}try{var t;null===(t=window.opener)||void 0===t||t.postMessage({type:w,status:e},"*")}catch(e){}}function x(){try{window.close()}catch(e){}}function p(){let{query:e,isReady:t}=(0,o.useRouter)(),[n,l]=(0,u.useState)(!1),f=(0,u.useMemo)(()=>t?function(e){let t=[e.hamdast_status,e.status,e.Status,e.payment_status,e.result,e.Result,e.state,e.State].flatMap(e=>Array.isArray(e)?e:null!=e?[e]:[]).map(e=>String(e).trim().toLowerCase()).filter(Boolean);if(t.some(e=>e.includes("success")||"true"===e||"ok"===e||"paid"===e||"1"===e||"done"===e||"complete"===e||"completed"===e))return"success";if(t.some(e=>e.includes("cancel")||"false"===e||"failed"===e||"fail"===e||"0"===e||e.includes("error")))return"cancel";{let e=window.location.hash.replace(/^#/,"").toLowerCase();if(e.includes("success")||"true"===e||"ok"===e)return"success";if(e.includes("cancel")||"false"===e||e.includes("fail"))return"cancel"}}(e):void 0,[t,e]);return(0,u.useEffect)(()=>{if(!t)return;if(f){_(f),x();let e=window.setTimeout(x,300),t=window.setTimeout(x,1200),n=window.setTimeout(()=>_(f),200),s=window.setTimeout(()=>l(!0),2500);return()=>{window.clearTimeout(e),window.clearTimeout(t),window.clearTimeout(n),window.clearTimeout(s)}}let e=window.setTimeout(()=>l(!0),1500);return()=>window.clearTimeout(e)},[t,f]),(0,s.jsxs)("div",{className:"flex flex-col gap-4 justify-center items-center h-screen w-full",children:[(0,s.jsxs)("div",{className:"flex flex-col justify-center items-center gap-2",children:[(0,s.jsx)(a.Z,{}),(0,s.jsx)("span",{className:"text-sm font-medium",children:"Ú©Ù Û Ù ÙØªØ¸Ø± ب٠اÙÛØ¯"}),!f&&n&&(0,s.jsx)(r.Z,{fontSize:"xs",className:"text-center text-slate-500 max-w-xs",children:"ÙØ¶Ø¹Ûت پرداخت از درگا٠٠شخص ÙØ´Ø¯. ÙØªÛج٠را Ø¯Ø³ØªÛ Ø§ÙØªØ®Ø§Ø¨ Ú©ÙÛØ¯."})]}),n&&(0,s.jsxs)("div",{className:"flex flex-col gap-3 w-60",children:[(0,s.jsx)(c.Z,{}),(0,s.jsx)(r.Z,{fontSize:"xs",className:"text-center",children:"اگر ÙÙÙØ² Ù ÙØªÙÙ ÙØ´Ø¯ÛØ¯Ø Ø±ÙÛ Ø¯Ú©Ù Ù Ø²ÛØ± بزÙÛØ¯."}),(0,s.jsx)(i.Z,{size:"sm",block:!0,onClick:()=>{_("success"),x()},children:"پرداخت را Ø§ÙØ¬Ø§Ù داد٠"}),(0,s.jsx)(i.Z,{size:"sm",block:!0,variant:"text",onClick:()=>{_("cancel"),x()},children:"پرداخت را ÙØºÙ کرد٠"})]})]})}}},function(e){e.O(0,[1258,7991,9492,9791,6251,7326,6842,6221,3093,3015,5954,5755,1199,4671,6886,6733,2361,3540,1582,2447,4629,265,396,2888,170,179],function(){return e(e.s=37854)}),_N_E=e.O()}]); 2//# sourceMappingURL=payment_return_link-7b67616d036ee06b.js.map
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.