PageSourceSearch

https://taaghche.com/tmp/_next/static/chunks/pages/payment/subscription-b27c733da66995e0.js

js taaghche.com collected 2026-09-24 09:18:07 UTC 12,748 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1086],{85625:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/payment/subscription",function(){return n(45530)}])},14564:function(e,t,n){"use strict";var o=n(85893),i=n(67799),s=n(68547),c=n(59860),a=n.n(c);t.Z=e=>{let{appBrowser:t=i.OG.WebView}=e;return t===i.OG.WebView||void 0===t?(0,o.jsx)("div",{className:a().loading,children:(0,o.jsx)(s.Z,{})}):(0,o.jsx)(s.Z,{})}},80899:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var o=n(85893),i=n(67294),s=n(73935),c=n(97163),a=n(67799),l=n(26299),r=n.n(l);class d extends i.PureComponent{componentDidMount(){"undefined"!=typeof document&&(this.modalRoot=document.body,this.modalRoot.appendChild(this.el),this.props.isOpen&&(document.body.style.overflow="hidden",this.setBodyOverflow=!0))}componentDidUpdate(e){"undefined"!=typeof document&&(this.props.isOpen&&!e.isOpen?(document.body.style.overflow="hidden",this.setBodyOverflow=!0):!this.props.isOpen&&e.isOpen&&this.setBodyOverflow&&(document.body.style.overflow="auto",this.setBodyOverflow=!1))}componentWillUnmount(){this.modalRoot.removeChild(this.el),document.body.style.overflow="auto"}render(){let{isOpen:e,isfull:t,children:n,forArticle:i=!1}=this.props;return e?i?(0,o.jsx)("div",{children:t?(0,o.jsx)("div",{className:r().back,onClick:this.handleBackdropClick,children:n}):(0,o.jsx)("div",{className:"".concat(r().overlay),onClick:this.handleBackdropClick,children:n})}):(0,s.createPortal)((0,o.jsx)("div",{children:t?(0,o.jsx)("div",{className:r().back,onClick:this.handleBackdropClick,children:n}):(0,o.jsx)("div",{className:"".concat(r().overlay," ").concat(this.context===a.Q2.dark?r().dark:""),onClick:this.handleBackdropClick,children:n})}),this.el):null}constructor(e){super(e),this.modalRoot=null,this.setBodyOverflow=!1,this.handleBackdropClick=e=>{var t;if(e.target!==e.currentTarget)return;let n=null!==(t=this.props.onClickOverlay)&&void 0!==t?t:this.props.closeModal;null==n||n()},this.el="undefined"!=typeof document?document.createElement("div"):{}}}d.contextType=c.Ni},31373:function(e,t,n){"use strict";var o=n(85893),i=n(67294),s=n(60550),c=n(18387),a=n.n(c),l=n(62823);t.Z=e=>{let{off:t,className:n}=e,c=(0,i.useCallback)(e=>(0,s.Iq)((0,s.oC)(e)),[]),r=Math.min(100,Math.max(5,10*Math.round(t/10)));return(0,o.jsxs)("div",{className:"".concat(a().offPercent," ").concat(n),style:{backgroundColor:l.e[r]},children:[c(t),(0,o.jsx)("span",{children:"٪"})]})}},86098:function(e,t,n){"use strict";n.d(t,{FO:function(){return l},RX:function(){return c},hM:function(){return a},sb:function(){return s},x5:function(){return i}});var o=n(76446);let i=async e=>await o.Mc.get("/sale/api/buy/subscription".concat(e),{}),s=async function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=arguments.length>4?arguments[4]:void 0,c=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,l="?a=".concat(e,"&f=").concat(s,"&isfromMvc=false&usedCredit=").concat(i);return await o.Mc.get("".concat(c?"/sale/externalpaymentmethods":"/sale/subdiscount").concat(c?l+"&orderId=".concat(a):l+"&sub=".concat(t)+(n?"&code=".concat(n):"")),{})},c=(e,t)=>o.Mc.post("/sale/pay?f=".concat(e),t),a=e=>{let t="";return e.split("&").forEach(e=>{t+=e.replace("=","")+","}),t.slice(1,t.length-1)},l=async e=>await o.Mc.get("/sale/api/buy/external-payment".concat(e),{})},36492:function(e,t,n){"use strict";n.d(t,{ZP:function(){return b}});var o=n(85893),i=n(67294),s=n(31373),c=n(87447),a=n(60550),l=n(25441),r=n.n(l),d=n(80899),u=n(23461),p=n.n(u),h=e=>{let{isOpen:t,onClose:n}=e;return(0,o.jsx)(d.Z,{isOpen:t,isfull:!1,closeModal:n,onClickOverlay:n,children:(0,o.jsxs)("div",{className:p().modalContent,children:[(0,o.jsx)("span",{className:"".concat(p().close," icon-close"),onClick:n}),(0,o.jsxs)("p",{className:p().modalText,children:["خرید این طرح امکان‌پذیر نیست؛",(0,o.jsx)("br",{}),"مدت اشتراک‌ات با این طرح از حداکثر ۲سال مجاز بیشتر می‌شود"]})]})})};let _=["weekPlan","MonthPlan","3MonthPlan","6MonthPlan","YearPlan"],f={8:"اشتراک یک‌ساله",3:"اشتراک ۶ ماهه",2:"اشتراک ۳ ماهه",1:"اشتراک ۱ ماهه",10:"اشتراک ۱ ماهه",80:"اشتراک یک‌ساله",30:"اشتراک ۶ ماهه",20:"اشتراک ۳ ماهه"},m=e=>{let{Price:t,BeforeOffPrice:n,buySubscription:l,Type:d,index:u,isForeign:p=!1,buttonTitle:m="خرید اشتراک",recommended:b=!1,Valid:x=!0}=e,y=(0,i.useCallback)(e=>(0,a.Iq)((0,a.oC)(e)),[]),v=(0,i.useMemo)(()=>Math.floor(100*(n-t)/n),[t,n,p]),k=b?r().recommended:"",g=x?"":r().invalid,[w,O]=(0,i.useState)(!1);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:"".concat(r().optionContainer," ").concat(k," ").concat(g),onClick:e=>{x||(e.stopPropagation(),O(!0))},children:[!x&&(0,o.jsx)("div",{className:r().locked,onClick:()=>{console.log("clicked"),O(!0)},children:(0,o.jsx)("img",{src:"/icons/ic-option-lock.svg",alt:"locked"})}),b&&(0,o.jsxs)("div",{className:"".concat(r().optionHeader," ").concat(g),children:["پیشنهاد ",c.Z.appNameFA]}),(0,o.jsx)("div",{className:"".concat(r().optionWrapper),children:(0,o.jsxs)("div",{className:r().optionContent,children:[(0,o.jsx)("div",{className:r().topContent,children:(0,o.jsx)("h3",{className:r().title,children:f[d]})}),(0,o.jsxs)("div",{className:"".concat(r().price," ").concat(k),children:[v>0&&(0,o.jsxs)("div",{className:r().offSection,children:[(0,o.jsx)("div",{className:r().beforeOffPrice,children:p?(0,a.oC)(n):y(n/10)}),(0,o.jsx)(s.Z,{off:v})]}),(0,o.jsxs)("div",{className:r().priceValue,children:[p?(0,a.oC)(t):y(t/10)," ",(0,o.jsx)("span",{children:p?"$":"تومان"})]})]}),(0,o.jsx)("div",{id:"Website_tg_Subscription_"+_[u],className:"".concat(r().buyButton," ").concat(k),onClick:()=>l(d),children:m})]})})]}),(0,o.jsx)(h,{isOpen:w,onClose:()=>O(!1)})]})};var b=e=>{let{options:t,buySubscription:n,isForeign:i,specialPaymentMethods:s=null,buttonTitle:c="خرید اشتراک"}=e;return(0,o.jsxs)("div",{className:"".concat(r().SubscriptionWrapper," container"),children:[(0,o.jsxs)("h4",{className:r().subscriptionTitle,children:["طرح‌های اشتراک ","طاقچه بی‌نهایت"]}),(0,o.jsx)("div",{className:r().specialPaymentMethods,children:null==s?void 0:s.map((e,t)=>(0,o.jsxs)("div",{className:r().specialPaymentMethod,children:[(0,o.jsx)("img",{src:e.ImageUri,alt:e.Title,className:r().specialPaymentMethodImage}),(0,o.jsx)("p",{className:r().specialPaymentMethodDescription,children:"با اسنپ‌پی الان بخر بعدا پرداخت کن !"})]},t))}),(0,o.jsx)("div",{className:r().subscriptionOptions,children:[...t].map((e,t)=>(0,o.jsx)(m,{recommended:e.Recommended,...e,buySubscription:n,index:t,isForeign:i,buttonTitle:c},e.Title))})]})}},28036:function(e,t,n){"use strict";var o=n(55386),i=n(6998),s=n(67294);t.Z=e=>{let{isMobile:t}=(0,o.V)(),{windowWidth:n}
1=(0,i.Z)(),[c,a]=(0,s.useState)(t);return(0,s.useEffect)(()=>{n&&a(n<e)},[n]),c}},45530:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return g},default:function(){return w}});var o=n(85893),i=n(11163),s=n(67294),c=n(14564),a=n(44419),l=n(92331),r=n(55386),d=n(28036),u=n(36492),p=n(86098),h=n(51471),_=n.n(h),f=()=>{let[e,t]=(0,s.useState)(),[n,h]=(0,s.useState)(),[f,m]=(0,s.useState)(),[b,x]=(0,s.useState)(),y=(0,s.useContext)(a.Xo),v=(0,s.useContext)(l.qd),k=(0,s.useContext)(l.b5),{isWebView:g}=(0,r.V)(),w=(0,d.Z)(576),O=(0,i.useRouter)();return(0,s.useEffect)(()=>{let e=O.query.giftthemeurl?"&isGift=true":"";return(0,p.x5)(window.location.search+e+(w?"&isDesktop=false":"&isDesktop=true")).then(e=>{e?(h(e.IsExtending),t(e.Options),m(e.Foreign),x(e.SpecialPaymentMethods)):O.replace("https://taaghche.com/paymentservice/sale/Error?e=704")}),y({showFooter:!1,showCopyRight:!1}),v({showHeader:!1,showMenu:!1,showShadow:!1}),k(!1),()=>{y({showFooter:!0,showCopyRight:!0}),k(!0),v({showHeader:!0,showMenu:!0,showShadow:!0})}},[]),e?(0,o.jsx)(o.Fragment,{children:(0,o.jsx)("div",{className:"".concat(_().backgroundColor),children:(0,o.jsxs)("div",{className:"".concat(_().subpay," container"),children:[!g&&(0,o.jsx)("div",{className:_().back,children:(0,o.jsxs)("div",{className:_().backIcon,onClick:O.back,children:[(0,o.jsx)("div",{className:"icon-chevron_right"}),"بازگشت"]})}),(0,o.jsxs)("h1",{className:_().title,children:[n?"تمدید":"خرید"," اشتراک بی‌‌نهایت"]}),(0,o.jsx)("div",{className:_().options,children:(0,o.jsx)(u.ZP,{options:e.map(e=>({...e,Type:e.SubscriptionType})),buySubscription:e=>{window.location.href="/payment/subscription/".concat(e).concat(window.location.search)},isForeign:f,specialPaymentMethods:b})})]})})}):(0,o.jsx)(c.Z,{})},m=n(9008),b=n.n(m),x=n(87447),y=n(93989),v=n(91655),k=n(67799),g=!0,w=()=>{let[e,t]=(0,s.useState)(!0);return(0,s.useEffect)(()=>{let n=window.location.search;n.includes("giftthemeurl=")?window.location.replace("/subscription/giftcard"):!(n.includes("a=")&&n.includes("ws="))&&e?y.n2.userSession?(y.uR.setLastRoute(window.location.href),window.location.replace("/login")):(0,v.aX)(k.an.Subscription,null,null,!1).then(e=>{(null==e?void 0:e.status)==k.kF.Success?window.location.replace(e.result.paymentUrl):(y.uR.setLastRoute("payment/subscription"),window.location.replace("/login"))}):t(!1)},[]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(b(),{children:[(0,o.jsx)("title",{children:" خرید اشتراک ".concat(x.Z.appNameFA," بی‌نهایت | ").concat(x.Z.appNameFA," ")}),(0,o.jsx)("meta",{name:"robots",content:"noindex"})]}),e?(0,o.jsx)(c.Z,{}):(0,o.jsx)(f,{})]})}},62823:function(e,t,n){"use strict";n.d(t,{e:function(){return i}});let o={cream:"#fcfcfc",boxTop:"#fcfcfc",boxBottom:"#f2f2ef",textDark:"#000000",textSecondaryBold:"#5a5a5a",textThird:"#b2b2b2",grayLight:"#f5f5f5",gold:"#ffc007",textPrimary:"#202020",textSecondary:"#808080",gray:"#f5f5f5",green:"#00a2a4",greenLight:"#5dc5c0",greenVeryLight:"#e6f6f7",greenAccent:"#33b5b6",greenBorder:"#99dadb",greenDark:"#004142",greenSemi:"#cceced",white:"#ffffff"};({...o});let i={5:"#F9AF55",10:"#F9AF55",15:"#F9AF55",20:"#F9AF55",25:"#F9AF55",30:"#F37154",35:"#F37154",40:"#F37154",45:"#F37154",50:"#F24B25",55:"#F24B25",60:"#F24B25",65:"#F24B25",70:"#C72500",75:"#C72500",80:"#9B2323",85:"#9B2323",90:"#9B2323",100:"#9B2323"};t.Z=o},59860:function(e){e.exports={loading:"fullScreenLoading_loading__OXHe7"}},26299:function(e){e.exports={back:"modal_back__6USx7",BackFlash:"modal_BackFlash__b92aa",overlay:"modal_overlay__MR62_",OverlayFlash:"modal_OverlayFlash__9gYzB",content:"modal_content__ChqFp",OverlayFlashDark:"modal_OverlayFlashDark__H8t0a",dark:"modal_dark__Q7Thb"}},18387:function(e){e.exports={offPercent:"offPercentage_offPercent__vJ66a"}},51471:function(e){e.exports={backgroundColor:"subPay_backgroundColor__zCORa",subscriptionWhat:"subPay_subscriptionWhat__ZqK1O",subpay:"subPay_subpay__bsNTb",title:"subPay_title__QLLfJ",subtitle:"subPay_subtitle__2tU69",back:"subPay_back__enihh",backIcon:"subPay_backIcon__EtwZx",options:"subPay_options__gOVD9"}},25441:function(e){e.exports={SubscriptionWrapper:"InfiniteOptions_SubscriptionWrapper__q6ykf",subscriptionTitle:"InfiniteOptions_subscriptionTitle__VHfGA",specialPaymentMethods:"InfiniteOptions_specialPaymentMethods__kvRtG",specialPaymentMethod:"InfiniteOptions_specialPaymentMethod__wB1JX",specialPaymentMethodImage:"InfiniteOptions_specialPaymentMethodImage__7adUW",specialPaymentMethodDescription:"InfiniteOptions_specialPaymentMethodDescription__OkKpQ",subscriptionOptions:"InfiniteOptions_subscriptionOptions__27xUu",optionContainer:"InfiniteOptions_optionContainer__0WPvc",recommended:"InfiniteOptions_recommended__AJN6f",invalid:"InfiniteOptions_invali
1d__1Rbkb",optionHeader:"InfiniteOptions_optionHeader__9xq4K",optionWrapper:"InfiniteOptions_optionWrapper__ci5i3",locked:"InfiniteOptions_locked__CC5ho",optionContent:"InfiniteOptions_optionContent__fkxrk",topContent:"InfiniteOptions_topContent__2iR7F",description:"InfiniteOptions_description__8BFeE",title:"InfiniteOptions_title__B_oy7",price:"InfiniteOptions_price__YzJdr",priceValue:"InfiniteOptions_priceValue___8Rzu",offSection:"InfiniteOptions_offSection__1Yi_C",beforeOffPrice:"InfiniteOptions_beforeOffPrice___WBMc",offPercent:"InfiniteOptions_offPercent__O5q6Y",buyButton:"InfiniteOptions_buyButton__PbGP6"}},23461:function(e){e.exports={modalContent:"twoYearSubModal_modalContent__emAxz",modalText:"twoYearSubModal_modalText__GB_Sd",close:"twoYearSubModal_close__wtMDu"}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=85625)}),_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.